var gce=Object.defineProperty;var yce=(t,e,n)=>e in t?gce(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var kv=(t,e,n)=>yce(t,typeof e!="symbol"?e+"":e,n);function vce(t,e){for(var n=0;n<e.length;n++){const r=e[n];if(typeof r!="string"&&!Array.isArray(r)){for(const s in r)if(s!=="default"&&!(s in t)){const o=Object.getOwnPropertyDescriptor(r,s);o&&Object.defineProperty(t,s,o.get?o:{enumerable:!0,get:()=>r[s]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))r(s);new MutationObserver(s=>{for(const o of s)if(o.type==="childList")for(const i of o.addedNodes)i.tagName==="LINK"&&i.rel==="modulepreload"&&r(i)}).observe(document,{childList:!0,subtree:!0});function n(s){const o={};return s.integrity&&(o.integrity=s.integrity),s.referrerPolicy&&(o.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?o.credentials="include":s.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(s){if(s.ep)return;s.ep=!0;const o=n(s);fetch(s.href,o)}})();var Ev=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function ks(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var p6={exports:{}},K1={};/**
 * @license React
 * react-jsx-runtime.production.js
 *
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var HL;function bce(){if(HL)return K1;HL=1;var t=Symbol.for("react.transitional.element"),e=Symbol.for("react.fragment");function n(r,s,o){var i=null;if(o!==void 0&&(i=""+o),s.key!==void 0&&(i=""+s.key),"key"in s){o={};for(var a in s)a!=="key"&&(o[a]=s[a])}else o=s;return s=o.ref,{$$typeof:t,type:r,key:i,ref:s!==void 0?s:null,props:o}}return K1.Fragment=e,K1.jsx=n,K1.jsxs=n,K1}var UL;function xce(){return UL||(UL=1,p6.exports=bce()),p6.exports}var d=xce(),h6={exports:{}},X1={},m6={exports:{}},g6={};/**
 * @license React
 * scheduler.production.js
 *
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var VL;function wce(){return VL||(VL=1,(function(t){function e(I,H){var $=I.length;I.push(H);e:for(;0<$;){var V=$-1>>>1,q=I[V];if(0<s(q,H))I[V]=H,I[$]=q,$=V;else break e}}function n(I){return I.length===0?null:I[0]}function r(I){if(I.length===0)return null;var H=I[0],$=I.pop();if($!==H){I[0]=$;e:for(var V=0,q=I.length,U=q>>>1;V<U;){var W=2*(V+1)-1,Y=I[W],G=W+1,K=I[G];if(0>s(Y,$))G<q&&0>s(K,Y)?(I[V]=K,I[G]=$,V=G):(I[V]=Y,I[W]=$,V=W);else if(G<q&&0>s(K,$))I[V]=K,I[G]=$,V=G;else break e}}return H}function s(I,H){var $=I.sortIndex-H.sortIndex;return $!==0?$:I.id-H.id}if(t.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var o=performance;t.unstable_now=function(){return o.now()}}else{var i=Date,a=i.now();t.unstable_now=function(){return i.now()-a}}var l=[],c=[],u=1,f=null,h=3,m=!1,y=!1,v=!1,b=!1,w=typeof setTimeout=="function"?setTimeout:null,C=typeof clearTimeout=="function"?clearTimeout:null,k=typeof setImmediate<"u"?setImmediate:null;function E(I){for(var H=n(c);H!==null;){if(H.callback===null)r(c);else if(H.startTime<=I)r(c),H.sortIndex=H.expirationTime,e(l,H);else break;H=n(c)}}function j(I){if(v=!1,E(I),!y)if(n(l)!==null)y=!0,A||(A=!0,z());else{var H=n(c);H!==null&&P(j,H.startTime-I)}}var A=!1,M=-1,_=5,D=-1;function R(){return b?!0:!(t.unstable_now()-D<_)}function N(){if(b=!1,A){var I=t.unstable_now();D=I;var H=!0;try{e:{y=!1,v&&(v=!1,C(M),M=-1),m=!0;var $=h;try{t:{for(E(I),f=n(l);f!==null&&!(f.expirationTime>I&&R());){var V=f.callback;if(typeof V=="function"){f.callback=null,h=f.priorityLevel;var q=V(f.expirationTime<=I);if(I=t.unstable_now(),typeof q=="function"){f.callback=q,E(I),H=!0;break t}f===n(l)&&r(l),E(I)}else r(l);f=n(l)}if(f!==null)H=!0;else{var U=n(c);U!==null&&P(j,U.startTime-I),H=!1}}break e}finally{f=null,h=$,m=!1}H=void 0}}finally{H?z():A=!1}}}var z;if(typeof k=="function")z=function(){k(N)};else if(typeof MessageChannel<"u"){var B=new MessageChannel,L=B.port2;B.port1.onmessage=N,z=function(){L.postMessage(null)}}else z=function(){w(N,0)};function P(I,H){M=w(function(){I(t.unstable_now())},H)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(I){I.callback=null},t.unstable_forceFrameRate=function(I){0>I||125<I?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):_=0<I?Math.floor(1e3/I):5},t.unstable_getCurrentPriorityLevel=function(){return h},t.unstable_next=function(I){switch(h){case 1:case 2:case 3:var H=3;break;default:H=h}var $=h;h=H;try{return I()}finally{h=$}},t.unstable_requestPaint=function(){b=!0},t.unstable_runWithPriority=function(I,H){switch(I){case 1:case 2:case 3:case 4:case 5:break;default:I=3}var $=h;h=I;try{return H()}finally{h=$}},t.unstable_scheduleCallback=function(I,H,$){var V=t.unstable_now();switch(typeof $=="object"&&$!==null?($=$.delay,$=typeof $=="number"&&0<$?V+$:V):$=V,I){case 1:var q=-1;break;case 2:q=250;break;case 5:q=1073741823;break;case 4:q=1e4;break;default:q=5e3}return q=$+q,I={id:u++,callback:H,priorityLevel:I,startTime:$,expirationTime:q,sortIndex:-1},$>V?(I.sortIndex=$,e(c,I),n(l)===null&&I===n(c)&&(v?(C(M),M=-1):v=!0,P(j,$-V))):(I.sortIndex=q,e(l,I),y||m||(y=!0,A||(A=!0,z()))),I},t.unstable_shouldYield=R,t.unstable_wrapCallback=function(I){var H=h;return function(){var $=h;h=H;try{return I.apply(this,arguments)}finally{h=$}}}})(g6)),g6}var qL;function Sce(){return qL||(qL=1,m6.exports=wce()),m6.exports}var y6={exports:{}},Sn={};/**
 * @license React
 * react.production.js
 *
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var WL;function Cce(){if(WL)return Sn;WL=1;var t=Symbol.for("react.transitional.element"),e=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),o=Symbol.for("react.consumer"),i=Symbol.for("react.context"),a=Symbol.for("react.forward_ref"),l=Symbol.for("react.suspense"),c=Symbol.for("react.memo"),u=Symbol.for("react.lazy"),f=Symbol.for("react.activity"),h=Symbol.iterator;function m(U){return U===null||typeof U!="object"?null:(U=h&&U[h]||U["@@iterator"],typeof U=="function"?U:null)}var y={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},v=Object.assign,b={};function w(U,W,Y){this.props=U,this.context=W,this.refs=b,this.updater=Y||y}w.prototype.isReactComponent={},w.prototype.setState=function(U,W){if(typeof U!="object"&&typeof U!="function"&&U!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,U,W,"setState")},w.prototype.forceUpdate=function(U){this.updater.enqueueForceUpdate(this,U,"forceUpdate")};function C(){}C.prototype=w.prototype;function k(U,W,Y){this.props=U,this.context=W,this.refs=b,this.updater=Y||y}var E=k.prototype=new C;E.constructor=k,v(E,w.prototype),E.isPureReactComponent=!0;var j=Array.isArray;function A(){}var M={H:null,A:null,T:null,S:null},_=Object.prototype.hasOwnProperty;function D(U,W,Y){var G=Y.ref;return{$$typeof:t,type:U,key:W,ref:G!==void 0?G:null,props:Y}}function R(U,W){return D(U.type,W,U.props)}function N(U){return typeof U=="object"&&U!==null&&U.$$typeof===t}function z(U){var W={"=":"=0",":":"=2"};return"$"+U.replace(/[=:]/g,function(Y){return W[Y]})}var B=/\/+/g;function L(U,W){return typeof U=="object"&&U!==null&&U.key!=null?z(""+U.key):W.toString(36)}function P(U){switch(U.status){case"fulfilled":return U.value;case"rejected":throw U.reason;default:switch(typeof U.status=="string"?U.then(A,A):(U.status="pending",U.then(function(W){U.status==="pending"&&(U.status="fulfilled",U.value=W)},function(W){U.status==="pending"&&(U.status="rejected",U.reason=W)})),U.status){case"fulfilled":return U.value;case"rejected":throw U.reason}}throw U}function I(U,W,Y,G,K){var Q=typeof U;(Q==="undefined"||Q==="boolean")&&(U=null);var Z=!1;if(U===null)Z=!0;else switch(Q){case"bigint":case"string":case"number":Z=!0;break;case"object":switch(U.$$typeof){case t:case e:Z=!0;break;case u:return Z=U._init,I(Z(U._payload),W,Y,G,K)}}if(Z)return K=K(U),Z=G===""?"."+L(U,0):G,j(K)?(Y="",Z!=null&&(Y=Z.replace(B,"$&/")+"/"),I(K,W,Y,"",function(se){return se})):K!=null&&(N(K)&&(K=R(K,Y+(K.key==null||U&&U.key===K.key?"":(""+K.key).replace(B,"$&/")+"/")+Z)),W.push(K)),1;Z=0;var J=G===""?".":G+":";if(j(U))for(var ne=0;ne<U.length;ne++)G=U[ne],Q=J+L(G,ne),Z+=I(G,W,Y,Q,K);else if(ne=m(U),typeof ne=="function")for(U=ne.call(U),ne=0;!(G=U.next()).done;)G=G.value,Q=J+L(G,ne++),Z+=I(G,W,Y,Q,K);else if(Q==="object"){if(typeof U.then=="function")return I(P(U),W,Y,G,K);throw W=String(U),Error("Objects are not valid as a React child (found: "+(W==="[object Object]"?"object with keys {"+Object.keys(U).join(", ")+"}":W)+"). If you meant to render a collection of children, use an array instead.")}return Z}function H(U,W,Y){if(U==null)return U;var G=[],K=0;return I(U,G,"","",function(Q){return W.call(Y,Q,K++)}),G}function $(U){if(U._status===-1){var W=U._result;W=W(),W.then(function(Y){(U._status===0||U._status===-1)&&(U._status=1,U._result=Y)},function(Y){(U._status===0||U._status===-1)&&(U._status=2,U._result=Y)}),U._status===-1&&(U._status=0,U._result=W)}if(U._status===1)return U._result.default;throw U._result}var V=typeof reportError=="function"?reportError:function(U){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var W=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof U=="object"&&U!==null&&typeof U.message=="string"?String(U.message):String(U),error:U});if(!window.dispatchEvent(W))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",U);return}console.error(U)},q={map:H,forEach:function(U,W,Y){H(U,function(){W.apply(this,arguments)},Y)},count:function(U){var W=0;return H(U,function(){W++}),W},toArray:function(U){return H(U,function(W){return W})||[]},only:function(U){if(!N(U))throw Error("React.Children.only expected to receive a single React element child.");return U}};return Sn.Activity=f,Sn.Children=q,Sn.Component=w,Sn.Fragment=n,Sn.Profiler=s,Sn.PureComponent=k,Sn.StrictMode=r,Sn.Suspense=l,Sn.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=M,Sn.__COMPILER_RUNTIME={__proto__:null,c:function(U){return M.H.useMemoCache(U)}},Sn.cache=function(U){return function(){return U.apply(null,arguments)}},Sn.cacheSignal=function(){return null},Sn.cloneElement=function(U,W,Y){if(U==null)throw Error("The argument must be a React element, but you passed "+U+".");var G=v({},U.props),K=U.key;if(W!=null)for(Q in W.key!==void 0&&(K=""+W.key),W)!_.call(W,Q)||Q==="key"||Q==="__self"||Q==="__source"||Q==="ref"&&W.ref===void 0||(G[Q]=W[Q]);var Q=arguments.length-2;if(Q===1)G.children=Y;else if(1<Q){for(var Z=Array(Q),J=0;J<Q;J++)Z[J]=arguments[J+2];G.children=Z}return D(U.type,K,G)},Sn.createContext=function(U){return U={$$typeof:i,_currentValue:U,_currentValue2:U,_threadCount:0,Provider:null,Consumer:null},U.Provider=U,U.Consumer={$$typeof:o,_context:U},U},Sn.createElement=function(U,W,Y){var G,K={},Q=null;if(W!=null)for(G in W.key!==void 0&&(Q=""+W.key),W)_.call(W,G)&&G!=="key"&&G!=="__self"&&G!=="__source"&&(K[G]=W[G]);var Z=arguments.length-2;if(Z===1)K.children=Y;else if(1<Z){for(var J=Array(Z),ne=0;ne<Z;ne++)J[ne]=arguments[ne+2];K.children=J}if(U&&U.defaultProps)for(G in Z=U.defaultProps,Z)K[G]===void 0&&(K[G]=Z[G]);return D(U,Q,K)},Sn.createRef=function(){return{current:null}},Sn.forwardRef=function(U){return{$$typeof:a,render:U}},Sn.isValidElement=N,Sn.lazy=function(U){return{$$typeof:u,_payload:{_status:-1,_result:U},_init:$}},Sn.memo=function(U,W){return{$$typeof:c,type:U,compare:W===void 0?null:W}},Sn.startTransition=function(U){var W=M.T,Y={};M.T=Y;try{var G=U(),K=M.S;K!==null&&K(Y,G),typeof G=="object"&&G!==null&&typeof G.then=="function"&&G.then(A,V)}catch(Q){V(Q)}finally{W!==null&&Y.types!==null&&(W.types=Y.types),M.T=W}},Sn.unstable_useCacheRefresh=function(){return M.H.useCacheRefresh()},Sn.use=function(U){return M.H.use(U)},Sn.useActionState=function(U,W,Y){return M.H.useActionState(U,W,Y)},Sn.useCallback=function(U,W){return M.H.useCallback(U,W)},Sn.useContext=function(U){return M.H.useContext(U)},Sn.useDebugValue=function(){},Sn.useDeferredValue=function(U,W){return M.H.useDeferredValue(U,W)},Sn.useEffect=function(U,W){return M.H.useEffect(U,W)},Sn.useEffectEvent=function(U){return M.H.useEffectEvent(U)},Sn.useId=function(){return M.H.useId()},Sn.useImperativeHandle=function(U,W,Y){return M.H.useImperativeHandle(U,W,Y)},Sn.useInsertionEffect=function(U,W){return M.H.useInsertionEffect(U,W)},Sn.useLayoutEffect=function(U,W){return M.H.useLayoutEffect(U,W)},Sn.useMemo=function(U,W){return M.H.useMemo(U,W)},Sn.useOptimistic=function(U,W){return M.H.useOptimistic(U,W)},Sn.useReducer=function(U,W,Y){return M.H.useReducer(U,W,Y)},Sn.useRef=function(U){return M.H.useRef(U)},Sn.useState=function(U){return M.H.useState(U)},Sn.useSyncExternalStore=function(U,W,Y){return M.H.useSyncExternalStore(U,W,Y)},Sn.useTransition=function(){return M.H.useTransition()},Sn.version="19.2.4",Sn}var YL;function Zf(){return YL||(YL=1,y6.exports=Cce()),y6.exports}var v6={exports:{}},so={};/**
 * @license React
 * react-dom.production.js
 *
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var GL;function kce(){if(GL)return so;GL=1;var t=Zf();function e(l){var c="https://react.dev/errors/"+l;if(1<arguments.length){c+="?args[]="+encodeURIComponent(arguments[1]);for(var u=2;u<arguments.length;u++)c+="&args[]="+encodeURIComponent(arguments[u])}return"Minified React error #"+l+"; visit "+c+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function n(){}var r={d:{f:n,r:function(){throw Error(e(522))},D:n,C:n,L:n,m:n,X:n,S:n,M:n},p:0,findDOMNode:null},s=Symbol.for("react.portal");function o(l,c,u){var f=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:s,key:f==null?null:""+f,children:l,containerInfo:c,implementation:u}}var i=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function a(l,c){if(l==="font")return"";if(typeof c=="string")return c==="use-credentials"?c:""}return so.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=r,so.createPortal=function(l,c){var u=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!c||c.nodeType!==1&&c.nodeType!==9&&c.nodeType!==11)throw Error(e(299));return o(l,c,null,u)},so.flushSync=function(l){var c=i.T,u=r.p;try{if(i.T=null,r.p=2,l)return l()}finally{i.T=c,r.p=u,r.d.f()}},so.preconnect=function(l,c){typeof l=="string"&&(c?(c=c.crossOrigin,c=typeof c=="string"?c==="use-credentials"?c:"":void 0):c=null,r.d.C(l,c))},so.prefetchDNS=function(l){typeof l=="string"&&r.d.D(l)},so.preinit=function(l,c){if(typeof l=="string"&&c&&typeof c.as=="string"){var u=c.as,f=a(u,c.crossOrigin),h=typeof c.integrity=="string"?c.integrity:void 0,m=typeof c.fetchPriority=="string"?c.fetchPriority:void 0;u==="style"?r.d.S(l,typeof c.precedence=="string"?c.precedence:void 0,{crossOrigin:f,integrity:h,fetchPriority:m}):u==="script"&&r.d.X(l,{crossOrigin:f,integrity:h,fetchPriority:m,nonce:typeof c.nonce=="string"?c.nonce:void 0})}},so.preinitModule=function(l,c){if(typeof l=="string")if(typeof c=="object"&&c!==null){if(c.as==null||c.as==="script"){var u=a(c.as,c.crossOrigin);r.d.M(l,{crossOrigin:u,integrity:typeof c.integrity=="string"?c.integrity:void 0,nonce:typeof c.nonce=="string"?c.nonce:void 0})}}else c==null&&r.d.M(l)},so.preload=function(l,c){if(typeof l=="string"&&typeof c=="object"&&c!==null&&typeof c.as=="string"){var u=c.as,f=a(u,c.crossOrigin);r.d.L(l,u,{crossOrigin:f,integrity:typeof c.integrity=="string"?c.integrity:void 0,nonce:typeof c.nonce=="string"?c.nonce:void 0,type:typeof c.type=="string"?c.type:void 0,fetchPriority:typeof c.fetchPriority=="string"?c.fetchPriority:void 0,referrerPolicy:typeof c.referrerPolicy=="string"?c.referrerPolicy:void 0,imageSrcSet:typeof c.imageSrcSet=="string"?c.imageSrcSet:void 0,imageSizes:typeof c.imageSizes=="string"?c.imageSizes:void 0,media:typeof c.media=="string"?c.media:void 0})}},so.preloadModule=function(l,c){if(typeof l=="string")if(c){var u=a(c.as,c.crossOrigin);r.d.m(l,{as:typeof c.as=="string"&&c.as!=="script"?c.as:void 0,crossOrigin:u,integrity:typeof c.integrity=="string"?c.integrity:void 0})}else r.d.m(l)},so.requestFormReset=function(l){r.d.r(l)},so.unstable_batchedUpdates=function(l,c){return l(c)},so.useFormState=function(l,c,u){return i.H.useFormState(l,c,u)},so.useFormStatus=function(){return i.H.useHostTransitionStatus()},so.version="19.2.4",so}var KL;function GY(){if(KL)return v6.exports;KL=1;function t(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(e){console.error(e)}}return t(),v6.exports=kce(),v6.exports}/**
 * @license React
 * react-dom-client.production.js
 *
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var XL;function Ece(){if(XL)return X1;XL=1;var t=Sce(),e=Zf(),n=GY();function r(p){var g="https://react.dev/errors/"+p;if(1<arguments.length){g+="?args[]="+encodeURIComponent(arguments[1]);for(var x=2;x<arguments.length;x++)g+="&args[]="+encodeURIComponent(arguments[x])}return"Minified React error #"+p+"; visit "+g+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function s(p){return!(!p||p.nodeType!==1&&p.nodeType!==9&&p.nodeType!==11)}function o(p){var g=p,x=p;if(p.alternate)for(;g.return;)g=g.return;else{p=g;do g=p,(g.flags&4098)!==0&&(x=g.return),p=g.return;while(p)}return g.tag===3?x:null}function i(p){if(p.tag===13){var g=p.memoizedState;if(g===null&&(p=p.alternate,p!==null&&(g=p.memoizedState)),g!==null)return g.dehydrated}return null}function a(p){if(p.tag===31){var g=p.memoizedState;if(g===null&&(p=p.alternate,p!==null&&(g=p.memoizedState)),g!==null)return g.dehydrated}return null}function l(p){if(o(p)!==p)throw Error(r(188))}function c(p){var g=p.alternate;if(!g){if(g=o(p),g===null)throw Error(r(188));return g!==p?null:p}for(var x=p,T=g;;){var O=x.return;if(O===null)break;var F=O.alternate;if(F===null){if(T=O.return,T!==null){x=T;continue}break}if(O.child===F.child){for(F=O.child;F;){if(F===x)return l(O),p;if(F===T)return l(O),g;F=F.sibling}throw Error(r(188))}if(x.return!==T.return)x=O,T=F;else{for(var X=!1,te=O.child;te;){if(te===x){X=!0,x=O,T=F;break}if(te===T){X=!0,T=O,x=F;break}te=te.sibling}if(!X){for(te=F.child;te;){if(te===x){X=!0,x=F,T=O;break}if(te===T){X=!0,T=F,x=O;break}te=te.sibling}if(!X)throw Error(r(189))}}if(x.alternate!==T)throw Error(r(190))}if(x.tag!==3)throw Error(r(188));return x.stateNode.current===x?p:g}function u(p){var g=p.tag;if(g===5||g===26||g===27||g===6)return p;for(p=p.child;p!==null;){if(g=u(p),g!==null)return g;p=p.sibling}return null}var f=Object.assign,h=Symbol.for("react.element"),m=Symbol.for("react.transitional.element"),y=Symbol.for("react.portal"),v=Symbol.for("react.fragment"),b=Symbol.for("react.strict_mode"),w=Symbol.for("react.profiler"),C=Symbol.for("react.consumer"),k=Symbol.for("react.context"),E=Symbol.for("react.forward_ref"),j=Symbol.for("react.suspense"),A=Symbol.for("react.suspense_list"),M=Symbol.for("react.memo"),_=Symbol.for("react.lazy"),D=Symbol.for("react.activity"),R=Symbol.for("react.memo_cache_sentinel"),N=Symbol.iterator;function z(p){return p===null||typeof p!="object"?null:(p=N&&p[N]||p["@@iterator"],typeof p=="function"?p:null)}var B=Symbol.for("react.client.reference");function L(p){if(p==null)return null;if(typeof p=="function")return p.$$typeof===B?null:p.displayName||p.name||null;if(typeof p=="string")return p;switch(p){case v:return"Fragment";case w:return"Profiler";case b:return"StrictMode";case j:return"Suspense";case A:return"SuspenseList";case D:return"Activity"}if(typeof p=="object")switch(p.$$typeof){case y:return"Portal";case k:return p.displayName||"Context";case C:return(p._context.displayName||"Context")+".Consumer";case E:var g=p.render;return p=p.displayName,p||(p=g.displayName||g.name||"",p=p!==""?"ForwardRef("+p+")":"ForwardRef"),p;case M:return g=p.displayName||null,g!==null?g:L(p.type)||"Memo";case _:g=p._payload,p=p._init;try{return L(p(g))}catch{}}return null}var P=Array.isArray,I=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,H=n.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,$={pending:!1,data:null,method:null,action:null},V=[],q=-1;function U(p){return{current:p}}function W(p){0>q||(p.current=V[q],V[q]=null,q--)}function Y(p,g){q++,V[q]=p.current,p.current=g}var G=U(null),K=U(null),Q=U(null),Z=U(null);function J(p,g){switch(Y(Q,g),Y(K,p),Y(G,null),g.nodeType){case 9:case 11:p=(p=g.documentElement)&&(p=p.namespaceURI)?dL(p):0;break;default:if(p=g.tagName,g=g.namespaceURI)g=dL(g),p=fL(g,p);else switch(p){case"svg":p=1;break;case"math":p=2;break;default:p=0}}W(G),Y(G,p)}function ne(){W(G),W(K),W(Q)}function se(p){p.memoizedState!==null&&Y(Z,p);var g=G.current,x=fL(g,p.type);g!==x&&(Y(K,p),Y(G,x))}function ce(p){K.current===p&&(W(G),W(K)),Z.current===p&&(W(Z),q1._currentValue=$)}var fe,le;function be(p){if(fe===void 0)try{throw Error()}catch(x){var g=x.stack.trim().match(/\n( *(at )?)/);fe=g&&g[1]||"",le=-1<x.stack.indexOf(`
    at`)?" (<anonymous>)":-1<x.stack.indexOf("@")?"@unknown:0:0":""}return`
`+fe+p+le}var je=!1;function pe(p,g){if(!p||je)return"";je=!0;var x=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var T={DetermineComponentFrameRoot:function(){try{if(g){var it=function(){throw Error()};if(Object.defineProperty(it.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(it,[])}catch(Pe){var Oe=Pe}Reflect.construct(p,[],it)}else{try{it.call()}catch(Pe){Oe=Pe}p.call(it.prototype)}}else{try{throw Error()}catch(Pe){Oe=Pe}(it=p())&&typeof it.catch=="function"&&it.catch(function(){})}}catch(Pe){if(Pe&&Oe&&typeof Pe.stack=="string")return[Pe.stack,Oe.stack]}return[null,null]}};T.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var O=Object.getOwnPropertyDescriptor(T.DetermineComponentFrameRoot,"name");O&&O.configurable&&Object.defineProperty(T.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var F=T.DetermineComponentFrameRoot(),X=F[0],te=F[1];if(X&&te){var he=X.split(`
`),Ie=te.split(`
`);for(O=T=0;T<he.length&&!he[T].includes("DetermineComponentFrameRoot");)T++;for(;O<Ie.length&&!Ie[O].includes("DetermineComponentFrameRoot");)O++;if(T===he.length||O===Ie.length)for(T=he.length-1,O=Ie.length-1;1<=T&&0<=O&&he[T]!==Ie[O];)O--;for(;1<=T&&0<=O;T--,O--)if(he[T]!==Ie[O]){if(T!==1||O!==1)do if(T--,O--,0>O||he[T]!==Ie[O]){var Xe=`
`+he[T].replace(" at new "," at ");return p.displayName&&Xe.includes("<anonymous>")&&(Xe=Xe.replace("<anonymous>",p.displayName)),Xe}while(1<=T&&0<=O);break}}}finally{je=!1,Error.prepareStackTrace=x}return(x=p?p.displayName||p.name:"")?be(x):""}function _e(p,g){switch(p.tag){case 26:case 27:case 5:return be(p.type);case 16:return be("Lazy");case 13:return p.child!==g&&g!==null?be("Suspense Fallback"):be("Suspense");case 19:return be("SuspenseList");case 0:case 15:return pe(p.type,!1);case 11:return pe(p.type.render,!1);case 1:return pe(p.type,!0);case 31:return be("Activity");default:return""}}function Ce(p){try{var g="",x=null;do g+=_e(p,x),x=p,p=p.return;while(p);return g}catch(T){return`
Error generating stack: `+T.message+`
`+T.stack}}var Te=Object.prototype.hasOwnProperty,Ae=t.unstable_scheduleCallback,Ze=t.unstable_cancelCallback,He=t.unstable_shouldYield,lt=t.unstable_requestPaint,Ye=t.unstable_now,ge=t.unstable_getCurrentPriorityLevel,Fe=t.unstable_ImmediatePriority,Se=t.unstable_UserBlockingPriority,qe=t.unstable_NormalPriority,ot=t.unstable_LowPriority,$e=t.unstable_IdlePriority,pt=t.log,gt=t.unstable_setDisableYieldValue,Pt=null,at=null;function nt(p){if(typeof pt=="function"&&gt(p),at&&typeof at.setStrictMode=="function")try{at.setStrictMode(Pt,p)}catch{}}var We=Math.clz32?Math.clz32:Ot,At=Math.log,St=Math.LN2;function Ot(p){return p>>>=0,p===0?32:31-(At(p)/St|0)|0}var Tt=256,kt=262144,jt=4194304;function vt(p){var g=p&42;if(g!==0)return g;switch(p&-p){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return p&261888;case 262144:case 524288:case 1048576:case 2097152:return p&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return p&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return p}}function Yt(p,g,x){var T=p.pendingLanes;if(T===0)return 0;var O=0,F=p.suspendedLanes,X=p.pingedLanes;p=p.warmLanes;var te=T&134217727;return te!==0?(T=te&~F,T!==0?O=vt(T):(X&=te,X!==0?O=vt(X):x||(x=te&~p,x!==0&&(O=vt(x))))):(te=T&~F,te!==0?O=vt(te):X!==0?O=vt(X):x||(x=T&~p,x!==0&&(O=vt(x)))),O===0?0:g!==0&&g!==O&&(g&F)===0&&(F=O&-O,x=g&-g,F>=x||F===32&&(x&4194048)!==0)?g:O}function Vt(p,g){return(p.pendingLanes&~(p.suspendedLanes&~p.pingedLanes)&g)===0}function Nt(p,g){switch(p){case 1:case 2:case 4:case 8:case 64:return g+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return g+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Ht(){var p=jt;return jt<<=1,(jt&62914560)===0&&(jt=4194304),p}function cn(p){for(var g=[],x=0;31>x;x++)g.push(p);return g}function qt(p,g){p.pendingLanes|=g,g!==268435456&&(p.suspendedLanes=0,p.pingedLanes=0,p.warmLanes=0)}function Kt(p,g,x,T,O,F){var X=p.pendingLanes;p.pendingLanes=x,p.suspendedLanes=0,p.pingedLanes=0,p.warmLanes=0,p.expiredLanes&=x,p.entangledLanes&=x,p.errorRecoveryDisabledLanes&=x,p.shellSuspendCounter=0;var te=p.entanglements,he=p.expirationTimes,Ie=p.hiddenUpdates;for(x=X&~x;0<x;){var Xe=31-We(x),it=1<<Xe;te[Xe]=0,he[Xe]=-1;var Oe=Ie[Xe];if(Oe!==null)for(Ie[Xe]=null,Xe=0;Xe<Oe.length;Xe++){var Pe=Oe[Xe];Pe!==null&&(Pe.lane&=-536870913)}x&=~it}T!==0&&yn(p,T,0),F!==0&&O===0&&p.tag!==0&&(p.suspendedLanes|=F&~(X&~g))}function yn(p,g,x){p.pendingLanes|=g,p.suspendedLanes&=~g;var T=31-We(g);p.entangledLanes|=g,p.entanglements[T]=p.entanglements[T]|1073741824|x&261930}function ee(p,g){var x=p.entangledLanes|=g;for(p=p.entanglements;x;){var T=31-We(x),O=1<<T;O&g|p[T]&g&&(p[T]|=g),x&=~O}}function ae(p,g){var x=g&-g;return x=(x&42)!==0?1:de(x),(x&(p.suspendedLanes|g))!==0?0:x}function de(p){switch(p){case 2:p=1;break;case 8:p=4;break;case 32:p=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:p=128;break;case 268435456:p=134217728;break;default:p=0}return p}function Ee(p){return p&=-p,2<p?8<p?(p&134217727)!==0?32:268435456:8:2}function De(){var p=H.p;return p!==0?p:(p=window.event,p===void 0?32:NL(p.type))}function Qe(p,g){var x=H.p;try{return H.p=p,g()}finally{H.p=x}}var mt=Math.random().toString(36).slice(2),rt="__reactFiber$"+mt,st="__reactProps$"+mt,Mt="__reactContainer$"+mt,Ut="__reactEvents$"+mt,Lt="__reactListeners$"+mt,Xt="__reactHandles$"+mt,mn="__reactResources$"+mt,ht="__reactMarker$"+mt;function oe(p){delete p[rt],delete p[st],delete p[Ut],delete p[Lt],delete p[Xt]}function Ne(p){var g=p[rt];if(g)return g;for(var x=p.parentNode;x;){if(g=x[Mt]||x[rt]){if(x=g.alternate,g.child!==null||x!==null&&x.child!==null)for(p=bL(p);p!==null;){if(x=p[rt])return x;p=bL(p)}return g}p=x,x=p.parentNode}return null}function ut(p){if(p=p[rt]||p[Mt]){var g=p.tag;if(g===5||g===6||g===13||g===31||g===26||g===27||g===3)return p}return null}function un(p){var g=p.tag;if(g===5||g===26||g===27||g===6)return p.stateNode;throw Error(r(33))}function Mn(p){var g=p[mn];return g||(g=p[mn]={hoistableStyles:new Map,hoistableScripts:new Map}),g}function nn(p){p[ht]=!0}var Ge=new Set,Rt={};function Zt(p,g){$t(p,g),$t(p+"Capture",g)}function $t(p,g){for(Rt[p]=g,p=0;p<g.length;p++)Ge.add(g[p])}var en=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),rn={},In={};function dn(p){return Te.call(In,p)?!0:Te.call(rn,p)?!1:en.test(p)?In[p]=!0:(rn[p]=!0,!1)}function jn(p,g,x){if(dn(g))if(x===null)p.removeAttribute(g);else{switch(typeof x){case"undefined":case"function":case"symbol":p.removeAttribute(g);return;case"boolean":var T=g.toLowerCase().slice(0,5);if(T!=="data-"&&T!=="aria-"){p.removeAttribute(g);return}}p.setAttribute(g,""+x)}}function ds(p,g,x){if(x===null)p.removeAttribute(g);else{switch(typeof x){case"undefined":case"function":case"symbol":case"boolean":p.removeAttribute(g);return}p.setAttribute(g,""+x)}}function Cr(p,g,x,T){if(T===null)p.removeAttribute(x);else{switch(typeof T){case"undefined":case"function":case"symbol":case"boolean":p.removeAttribute(x);return}p.setAttributeNS(g,x,""+T)}}function On(p){switch(typeof p){case"bigint":case"boolean":case"number":case"string":case"undefined":return p;case"object":return p;default:return""}}function ji(p){var g=p.type;return(p=p.nodeName)&&p.toLowerCase()==="input"&&(g==="checkbox"||g==="radio")}function Kc(p,g,x){var T=Object.getOwnPropertyDescriptor(p.constructor.prototype,g);if(!p.hasOwnProperty(g)&&typeof T<"u"&&typeof T.get=="function"&&typeof T.set=="function"){var O=T.get,F=T.set;return Object.defineProperty(p,g,{configurable:!0,get:function(){return O.call(this)},set:function(X){x=""+X,F.call(this,X)}}),Object.defineProperty(p,g,{enumerable:T.enumerable}),{getValue:function(){return x},setValue:function(X){x=""+X},stopTracking:function(){p._valueTracker=null,delete p[g]}}}}function zd(p){if(!p._valueTracker){var g=ji(p)?"checked":"value";p._valueTracker=Kc(p,g,""+p[g])}}function hy(p){if(!p)return!1;var g=p._valueTracker;if(!g)return!0;var x=g.getValue(),T="";return p&&(T=ji(p)?p.checked?"true":"false":p.value),p=T,p!==x?(g.setValue(p),!0):!1}function vp(p){if(p=p||(typeof document<"u"?document:void 0),typeof p>"u")return null;try{return p.activeElement||p.body}catch{return p.body}}var fC=/[\n"\\]/g;function zo(p){return p.replace(fC,function(g){return"\\"+g.charCodeAt(0).toString(16)+" "})}function n1(p,g,x,T,O,F,X,te){p.name="",X!=null&&typeof X!="function"&&typeof X!="symbol"&&typeof X!="boolean"?p.type=X:p.removeAttribute("type"),g!=null?X==="number"?(g===0&&p.value===""||p.value!=g)&&(p.value=""+On(g)):p.value!==""+On(g)&&(p.value=""+On(g)):X!=="submit"&&X!=="reset"||p.removeAttribute("value"),g!=null?bp(p,X,On(g)):x!=null?bp(p,X,On(x)):T!=null&&p.removeAttribute("value"),O==null&&F!=null&&(p.defaultChecked=!!F),O!=null&&(p.checked=O&&typeof O!="function"&&typeof O!="symbol"),te!=null&&typeof te!="function"&&typeof te!="symbol"&&typeof te!="boolean"?p.name=""+On(te):p.removeAttribute("name")}function r1(p,g,x,T,O,F,X,te){if(F!=null&&typeof F!="function"&&typeof F!="symbol"&&typeof F!="boolean"&&(p.type=F),g!=null||x!=null){if(!(F!=="submit"&&F!=="reset"||g!=null)){zd(p);return}x=x!=null?""+On(x):"",g=g!=null?""+On(g):x,te||g===p.value||(p.value=g),p.defaultValue=g}T=T??O,T=typeof T!="function"&&typeof T!="symbol"&&!!T,p.checked=te?p.checked:!!T,p.defaultChecked=!!T,X!=null&&typeof X!="function"&&typeof X!="symbol"&&typeof X!="boolean"&&(p.name=X),zd(p)}function bp(p,g,x){g==="number"&&vp(p.ownerDocument)===p||p.defaultValue===""+x||(p.defaultValue=""+x)}function zl(p,g,x,T){if(p=p.options,g){g={};for(var O=0;O<x.length;O++)g["$"+x[O]]=!0;for(x=0;x<p.length;x++)O=g.hasOwnProperty("$"+p[x].value),p[x].selected!==O&&(p[x].selected=O),O&&T&&(p[x].defaultSelected=!0)}else{for(x=""+On(x),g=null,O=0;O<p.length;O++){if(p[O].value===x){p[O].selected=!0,T&&(p[O].defaultSelected=!0);return}g!==null||p[O].disabled||(g=p[O])}g!==null&&(g.selected=!0)}}function s1(p,g,x){if(g!=null&&(g=""+On(g),g!==p.value&&(p.value=g),x==null)){p.defaultValue!==g&&(p.defaultValue=g);return}p.defaultValue=x!=null?""+On(x):""}function o1(p,g,x,T){if(g==null){if(T!=null){if(x!=null)throw Error(r(92));if(P(T)){if(1<T.length)throw Error(r(93));T=T[0]}x=T}x==null&&(x=""),g=x}x=On(g),p.defaultValue=x,T=p.textContent,T===x&&T!==""&&T!==null&&(p.value=T),zd(p)}function Pl(p,g){if(g){var x=p.firstChild;if(x&&x===p.lastChild&&x.nodeType===3){x.nodeValue=g;return}}p.textContent=g}var my=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function i1(p,g,x){var T=g.indexOf("--")===0;x==null||typeof x=="boolean"||x===""?T?p.setProperty(g,""):g==="float"?p.cssFloat="":p[g]="":T?p.setProperty(g,x):typeof x!="number"||x===0||my.has(g)?g==="float"?p.cssFloat=x:p[g]=(""+x).trim():p[g]=x+"px"}function a1(p,g,x){if(g!=null&&typeof g!="object")throw Error(r(62));if(p=p.style,x!=null){for(var T in x)!x.hasOwnProperty(T)||g!=null&&g.hasOwnProperty(T)||(T.indexOf("--")===0?p.setProperty(T,""):T==="float"?p.cssFloat="":p[T]="");for(var O in g)T=g[O],g.hasOwnProperty(O)&&x[O]!==T&&i1(p,O,T)}else for(var F in g)g.hasOwnProperty(F)&&i1(p,F,g[F])}function Ue(p){if(p.indexOf("-")===-1)return!1;switch(p){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 Qt=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),bn=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function Un(p){return bn.test(""+p)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":p}function or(){}var qr=null;function ro(p){return p=p.target||p.srcElement||window,p.correspondingUseElement&&(p=p.correspondingUseElement),p.nodeType===3?p.parentNode:p}var bo=null,xo=null;function Xc(p){var g=ut(p);if(g&&(p=g.stateNode)){var x=p[st]||null;e:switch(p=g.stateNode,g.type){case"input":if(n1(p,x.value,x.defaultValue,x.defaultValue,x.checked,x.defaultChecked,x.type,x.name),g=x.name,x.type==="radio"&&g!=null){for(x=p;x.parentNode;)x=x.parentNode;for(x=x.querySelectorAll('input[name="'+zo(""+g)+'"][type="radio"]'),g=0;g<x.length;g++){var T=x[g];if(T!==p&&T.form===p.form){var O=T[st]||null;if(!O)throw Error(r(90));n1(T,O.value,O.defaultValue,O.defaultValue,O.checked,O.defaultChecked,O.type,O.name)}}for(g=0;g<x.length;g++)T=x[g],T.form===p.form&&hy(T)}break e;case"textarea":s1(p,x.value,x.defaultValue);break e;case"select":g=x.value,g!=null&&zl(p,!!x.multiple,g,!1)}}}var xp=!1;function dI(p,g,x){if(xp)return p(g,x);xp=!0;try{var T=p(g);return T}finally{if(xp=!1,(bo!==null||xo!==null)&&(nv(),bo&&(g=bo,p=xo,xo=bo=null,Xc(g),p)))for(g=0;g<p.length;g++)Xc(p[g])}}function l1(p,g){var x=p.stateNode;if(x===null)return null;var T=x[st]||null;if(T===null)return null;x=T[g];e:switch(g){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(T=!T.disabled)||(p=p.type,T=!(p==="button"||p==="input"||p==="select"||p==="textarea")),p=!T;break e;default:p=!1}if(p)return null;if(x&&typeof x!="function")throw Error(r(231,g,typeof x));return x}var Bl=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),pC=!1;if(Bl)try{var c1={};Object.defineProperty(c1,"passive",{get:function(){pC=!0}}),window.addEventListener("test",c1,c1),window.removeEventListener("test",c1,c1)}catch{pC=!1}var Zc=null,hC=null,gy=null;function fI(){if(gy)return gy;var p,g=hC,x=g.length,T,O="value"in Zc?Zc.value:Zc.textContent,F=O.length;for(p=0;p<x&&g[p]===O[p];p++);var X=x-p;for(T=1;T<=X&&g[x-T]===O[F-T];T++);return gy=O.slice(p,1<T?1-T:void 0)}function yy(p){var g=p.keyCode;return"charCode"in p?(p=p.charCode,p===0&&g===13&&(p=13)):p=g,p===10&&(p=13),32<=p||p===13?p:0}function vy(){return!0}function pI(){return!1}function Po(p){function g(x,T,O,F,X){this._reactName=x,this._targetInst=O,this.type=T,this.nativeEvent=F,this.target=X,this.currentTarget=null;for(var te in p)p.hasOwnProperty(te)&&(x=p[te],this[te]=x?x(F):F[te]);return this.isDefaultPrevented=(F.defaultPrevented!=null?F.defaultPrevented:F.returnValue===!1)?vy:pI,this.isPropagationStopped=pI,this}return f(g.prototype,{preventDefault:function(){this.defaultPrevented=!0;var x=this.nativeEvent;x&&(x.preventDefault?x.preventDefault():typeof x.returnValue!="unknown"&&(x.returnValue=!1),this.isDefaultPrevented=vy)},stopPropagation:function(){var x=this.nativeEvent;x&&(x.stopPropagation?x.stopPropagation():typeof x.cancelBubble!="unknown"&&(x.cancelBubble=!0),this.isPropagationStopped=vy)},persist:function(){},isPersistent:vy}),g}var Pd={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(p){return p.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},by=Po(Pd),u1=f({},Pd,{view:0,detail:0}),hae=Po(u1),mC,gC,d1,xy=f({},u1,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:vC,button:0,buttons:0,relatedTarget:function(p){return p.relatedTarget===void 0?p.fromElement===p.srcElement?p.toElement:p.fromElement:p.relatedTarget},movementX:function(p){return"movementX"in p?p.movementX:(p!==d1&&(d1&&p.type==="mousemove"?(mC=p.screenX-d1.screenX,gC=p.screenY-d1.screenY):gC=mC=0,d1=p),mC)},movementY:function(p){return"movementY"in p?p.movementY:gC}}),hI=Po(xy),mae=f({},xy,{dataTransfer:0}),gae=Po(mae),yae=f({},u1,{relatedTarget:0}),yC=Po(yae),vae=f({},Pd,{animationName:0,elapsedTime:0,pseudoElement:0}),bae=Po(vae),xae=f({},Pd,{clipboardData:function(p){return"clipboardData"in p?p.clipboardData:window.clipboardData}}),wae=Po(xae),Sae=f({},Pd,{data:0}),mI=Po(Sae),Cae={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},kae={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"},Eae={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Tae(p){var g=this.nativeEvent;return g.getModifierState?g.getModifierState(p):(p=Eae[p])?!!g[p]:!1}function vC(){return Tae}var Mae=f({},u1,{key:function(p){if(p.key){var g=Cae[p.key]||p.key;if(g!=="Unidentified")return g}return p.type==="keypress"?(p=yy(p),p===13?"Enter":String.fromCharCode(p)):p.type==="keydown"||p.type==="keyup"?kae[p.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:vC,charCode:function(p){return p.type==="keypress"?yy(p):0},keyCode:function(p){return p.type==="keydown"||p.type==="keyup"?p.keyCode:0},which:function(p){return p.type==="keypress"?yy(p):p.type==="keydown"||p.type==="keyup"?p.keyCode:0}}),jae=Po(Mae),Aae=f({},xy,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),gI=Po(Aae),_ae=f({},u1,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:vC}),Rae=Po(_ae),Dae=f({},Pd,{propertyName:0,elapsedTime:0,pseudoElement:0}),Iae=Po(Dae),Oae=f({},xy,{deltaX:function(p){return"deltaX"in p?p.deltaX:"wheelDeltaX"in p?-p.wheelDeltaX:0},deltaY:function(p){return"deltaY"in p?p.deltaY:"wheelDeltaY"in p?-p.wheelDeltaY:"wheelDelta"in p?-p.wheelDelta:0},deltaZ:0,deltaMode:0}),Nae=Po(Oae),Lae=f({},Pd,{newState:0,oldState:0}),$ae=Po(Lae),Fae=[9,13,27,32],bC=Bl&&"CompositionEvent"in window,f1=null;Bl&&"documentMode"in document&&(f1=document.documentMode);var zae=Bl&&"TextEvent"in window&&!f1,yI=Bl&&(!bC||f1&&8<f1&&11>=f1),vI=" ",bI=!1;function xI(p,g){switch(p){case"keyup":return Fae.indexOf(g.keyCode)!==-1;case"keydown":return g.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function wI(p){return p=p.detail,typeof p=="object"&&"data"in p?p.data:null}var wp=!1;function Pae(p,g){switch(p){case"compositionend":return wI(g);case"keypress":return g.which!==32?null:(bI=!0,vI);case"textInput":return p=g.data,p===vI&&bI?null:p;default:return null}}function Bae(p,g){if(wp)return p==="compositionend"||!bC&&xI(p,g)?(p=fI(),gy=hC=Zc=null,wp=!1,p):null;switch(p){case"paste":return null;case"keypress":if(!(g.ctrlKey||g.altKey||g.metaKey)||g.ctrlKey&&g.altKey){if(g.char&&1<g.char.length)return g.char;if(g.which)return String.fromCharCode(g.which)}return null;case"compositionend":return yI&&g.locale!=="ko"?null:g.data;default:return null}}var Hae={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 SI(p){var g=p&&p.nodeName&&p.nodeName.toLowerCase();return g==="input"?!!Hae[p.type]:g==="textarea"}function CI(p,g,x,T){bo?xo?xo.push(T):xo=[T]:bo=T,g=cv(g,"onChange"),0<g.length&&(x=new by("onChange","change",null,x,T),p.push({event:x,listeners:g}))}var p1=null,h1=null;function Uae(p){oL(p,0)}function wy(p){var g=un(p);if(hy(g))return p}function kI(p,g){if(p==="change")return g}var EI=!1;if(Bl){var xC;if(Bl){var wC="oninput"in document;if(!wC){var TI=document.createElement("div");TI.setAttribute("oninput","return;"),wC=typeof TI.oninput=="function"}xC=wC}else xC=!1;EI=xC&&(!document.documentMode||9<document.documentMode)}function MI(){p1&&(p1.detachEvent("onpropertychange",jI),h1=p1=null)}function jI(p){if(p.propertyName==="value"&&wy(h1)){var g=[];CI(g,h1,p,ro(p)),dI(Uae,g)}}function Vae(p,g,x){p==="focusin"?(MI(),p1=g,h1=x,p1.attachEvent("onpropertychange",jI)):p==="focusout"&&MI()}function qae(p){if(p==="selectionchange"||p==="keyup"||p==="keydown")return wy(h1)}function Wae(p,g){if(p==="click")return wy(g)}function Yae(p,g){if(p==="input"||p==="change")return wy(g)}function Gae(p,g){return p===g&&(p!==0||1/p===1/g)||p!==p&&g!==g}var ii=typeof Object.is=="function"?Object.is:Gae;function m1(p,g){if(ii(p,g))return!0;if(typeof p!="object"||p===null||typeof g!="object"||g===null)return!1;var x=Object.keys(p),T=Object.keys(g);if(x.length!==T.length)return!1;for(T=0;T<x.length;T++){var O=x[T];if(!Te.call(g,O)||!ii(p[O],g[O]))return!1}return!0}function AI(p){for(;p&&p.firstChild;)p=p.firstChild;return p}function _I(p,g){var x=AI(p);p=0;for(var T;x;){if(x.nodeType===3){if(T=p+x.textContent.length,p<=g&&T>=g)return{node:x,offset:g-p};p=T}e:{for(;x;){if(x.nextSibling){x=x.nextSibling;break e}x=x.parentNode}x=void 0}x=AI(x)}}function RI(p,g){return p&&g?p===g?!0:p&&p.nodeType===3?!1:g&&g.nodeType===3?RI(p,g.parentNode):"contains"in p?p.contains(g):p.compareDocumentPosition?!!(p.compareDocumentPosition(g)&16):!1:!1}function DI(p){p=p!=null&&p.ownerDocument!=null&&p.ownerDocument.defaultView!=null?p.ownerDocument.defaultView:window;for(var g=vp(p.document);g instanceof p.HTMLIFrameElement;){try{var x=typeof g.contentWindow.location.href=="string"}catch{x=!1}if(x)p=g.contentWindow;else break;g=vp(p.document)}return g}function SC(p){var g=p&&p.nodeName&&p.nodeName.toLowerCase();return g&&(g==="input"&&(p.type==="text"||p.type==="search"||p.type==="tel"||p.type==="url"||p.type==="password")||g==="textarea"||p.contentEditable==="true")}var Kae=Bl&&"documentMode"in document&&11>=document.documentMode,Sp=null,CC=null,g1=null,kC=!1;function II(p,g,x){var T=x.window===x?x.document:x.nodeType===9?x:x.ownerDocument;kC||Sp==null||Sp!==vp(T)||(T=Sp,"selectionStart"in T&&SC(T)?T={start:T.selectionStart,end:T.selectionEnd}:(T=(T.ownerDocument&&T.ownerDocument.defaultView||window).getSelection(),T={anchorNode:T.anchorNode,anchorOffset:T.anchorOffset,focusNode:T.focusNode,focusOffset:T.focusOffset}),g1&&m1(g1,T)||(g1=T,T=cv(CC,"onSelect"),0<T.length&&(g=new by("onSelect","select",null,g,x),p.push({event:g,listeners:T}),g.target=Sp)))}function Bd(p,g){var x={};return x[p.toLowerCase()]=g.toLowerCase(),x["Webkit"+p]="webkit"+g,x["Moz"+p]="moz"+g,x}var Cp={animationend:Bd("Animation","AnimationEnd"),animationiteration:Bd("Animation","AnimationIteration"),animationstart:Bd("Animation","AnimationStart"),transitionrun:Bd("Transition","TransitionRun"),transitionstart:Bd("Transition","TransitionStart"),transitioncancel:Bd("Transition","TransitionCancel"),transitionend:Bd("Transition","TransitionEnd")},EC={},OI={};Bl&&(OI=document.createElement("div").style,"AnimationEvent"in window||(delete Cp.animationend.animation,delete Cp.animationiteration.animation,delete Cp.animationstart.animation),"TransitionEvent"in window||delete Cp.transitionend.transition);function Hd(p){if(EC[p])return EC[p];if(!Cp[p])return p;var g=Cp[p],x;for(x in g)if(g.hasOwnProperty(x)&&x in OI)return EC[p]=g[x];return p}var NI=Hd("animationend"),LI=Hd("animationiteration"),$I=Hd("animationstart"),Xae=Hd("transitionrun"),Zae=Hd("transitionstart"),Qae=Hd("transitioncancel"),FI=Hd("transitionend"),zI=new Map,TC="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");TC.push("scrollEnd");function ca(p,g){zI.set(p,g),Zt(g,[p])}var Sy=typeof reportError=="function"?reportError:function(p){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var g=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof p=="object"&&p!==null&&typeof p.message=="string"?String(p.message):String(p),error:p});if(!window.dispatchEvent(g))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",p);return}console.error(p)},Ai=[],kp=0,MC=0;function Cy(){for(var p=kp,g=MC=kp=0;g<p;){var x=Ai[g];Ai[g++]=null;var T=Ai[g];Ai[g++]=null;var O=Ai[g];Ai[g++]=null;var F=Ai[g];if(Ai[g++]=null,T!==null&&O!==null){var X=T.pending;X===null?O.next=O:(O.next=X.next,X.next=O),T.pending=O}F!==0&&PI(x,O,F)}}function ky(p,g,x,T){Ai[kp++]=p,Ai[kp++]=g,Ai[kp++]=x,Ai[kp++]=T,MC|=T,p.lanes|=T,p=p.alternate,p!==null&&(p.lanes|=T)}function jC(p,g,x,T){return ky(p,g,x,T),Ey(p)}function Ud(p,g){return ky(p,null,null,g),Ey(p)}function PI(p,g,x){p.lanes|=x;var T=p.alternate;T!==null&&(T.lanes|=x);for(var O=!1,F=p.return;F!==null;)F.childLanes|=x,T=F.alternate,T!==null&&(T.childLanes|=x),F.tag===22&&(p=F.stateNode,p===null||p._visibility&1||(O=!0)),p=F,F=F.return;return p.tag===3?(F=p.stateNode,O&&g!==null&&(O=31-We(x),p=F.hiddenUpdates,T=p[O],T===null?p[O]=[g]:T.push(g),g.lane=x|536870912),F):null}function Ey(p){if(50<F1)throw F1=0,$5=null,Error(r(185));for(var g=p.return;g!==null;)p=g,g=p.return;return p.tag===3?p.stateNode:null}var Ep={};function Jae(p,g,x,T){this.tag=p,this.key=x,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=g,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=T,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function ai(p,g,x,T){return new Jae(p,g,x,T)}function AC(p){return p=p.prototype,!(!p||!p.isReactComponent)}function Hl(p,g){var x=p.alternate;return x===null?(x=ai(p.tag,g,p.key,p.mode),x.elementType=p.elementType,x.type=p.type,x.stateNode=p.stateNode,x.alternate=p,p.alternate=x):(x.pendingProps=g,x.type=p.type,x.flags=0,x.subtreeFlags=0,x.deletions=null),x.flags=p.flags&65011712,x.childLanes=p.childLanes,x.lanes=p.lanes,x.child=p.child,x.memoizedProps=p.memoizedProps,x.memoizedState=p.memoizedState,x.updateQueue=p.updateQueue,g=p.dependencies,x.dependencies=g===null?null:{lanes:g.lanes,firstContext:g.firstContext},x.sibling=p.sibling,x.index=p.index,x.ref=p.ref,x.refCleanup=p.refCleanup,x}function BI(p,g){p.flags&=65011714;var x=p.alternate;return x===null?(p.childLanes=0,p.lanes=g,p.child=null,p.subtreeFlags=0,p.memoizedProps=null,p.memoizedState=null,p.updateQueue=null,p.dependencies=null,p.stateNode=null):(p.childLanes=x.childLanes,p.lanes=x.lanes,p.child=x.child,p.subtreeFlags=0,p.deletions=null,p.memoizedProps=x.memoizedProps,p.memoizedState=x.memoizedState,p.updateQueue=x.updateQueue,p.type=x.type,g=x.dependencies,p.dependencies=g===null?null:{lanes:g.lanes,firstContext:g.firstContext}),p}function Ty(p,g,x,T,O,F){var X=0;if(T=p,typeof p=="function")AC(p)&&(X=1);else if(typeof p=="string")X=sce(p,x,G.current)?26:p==="html"||p==="head"||p==="body"?27:5;else e:switch(p){case D:return p=ai(31,x,g,O),p.elementType=D,p.lanes=F,p;case v:return Vd(x.children,O,F,g);case b:X=8,O|=24;break;case w:return p=ai(12,x,g,O|2),p.elementType=w,p.lanes=F,p;case j:return p=ai(13,x,g,O),p.elementType=j,p.lanes=F,p;case A:return p=ai(19,x,g,O),p.elementType=A,p.lanes=F,p;default:if(typeof p=="object"&&p!==null)switch(p.$$typeof){case k:X=10;break e;case C:X=9;break e;case E:X=11;break e;case M:X=14;break e;case _:X=16,T=null;break e}X=29,x=Error(r(130,p===null?"null":typeof p,"")),T=null}return g=ai(X,x,g,O),g.elementType=p,g.type=T,g.lanes=F,g}function Vd(p,g,x,T){return p=ai(7,p,T,g),p.lanes=x,p}function _C(p,g,x){return p=ai(6,p,null,g),p.lanes=x,p}function HI(p){var g=ai(18,null,null,0);return g.stateNode=p,g}function RC(p,g,x){return g=ai(4,p.children!==null?p.children:[],p.key,g),g.lanes=x,g.stateNode={containerInfo:p.containerInfo,pendingChildren:null,implementation:p.implementation},g}var UI=new WeakMap;function _i(p,g){if(typeof p=="object"&&p!==null){var x=UI.get(p);return x!==void 0?x:(g={value:p,source:g,stack:Ce(g)},UI.set(p,g),g)}return{value:p,source:g,stack:Ce(g)}}var Tp=[],Mp=0,My=null,y1=0,Ri=[],Di=0,Qc=null,Ga=1,Ka="";function Ul(p,g){Tp[Mp++]=y1,Tp[Mp++]=My,My=p,y1=g}function VI(p,g,x){Ri[Di++]=Ga,Ri[Di++]=Ka,Ri[Di++]=Qc,Qc=p;var T=Ga;p=Ka;var O=32-We(T)-1;T&=~(1<<O),x+=1;var F=32-We(g)+O;if(30<F){var X=O-O%5;F=(T&(1<<X)-1).toString(32),T>>=X,O-=X,Ga=1<<32-We(g)+O|x<<O|T,Ka=F+p}else Ga=1<<F|x<<O|T,Ka=p}function DC(p){p.return!==null&&(Ul(p,1),VI(p,1,0))}function IC(p){for(;p===My;)My=Tp[--Mp],Tp[Mp]=null,y1=Tp[--Mp],Tp[Mp]=null;for(;p===Qc;)Qc=Ri[--Di],Ri[Di]=null,Ka=Ri[--Di],Ri[Di]=null,Ga=Ri[--Di],Ri[Di]=null}function qI(p,g){Ri[Di++]=Ga,Ri[Di++]=Ka,Ri[Di++]=Qc,Ga=g.id,Ka=g.overflow,Qc=p}var Hs=null,jr=null,Pn=!1,Jc=null,Ii=!1,OC=Error(r(519));function eu(p){var g=Error(r(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw v1(_i(g,p)),OC}function WI(p){var g=p.stateNode,x=p.type,T=p.memoizedProps;switch(g[rt]=p,g[st]=T,x){case"dialog":Ln("cancel",g),Ln("close",g);break;case"iframe":case"object":case"embed":Ln("load",g);break;case"video":case"audio":for(x=0;x<P1.length;x++)Ln(P1[x],g);break;case"source":Ln("error",g);break;case"img":case"image":case"link":Ln("error",g),Ln("load",g);break;case"details":Ln("toggle",g);break;case"input":Ln("invalid",g),r1(g,T.value,T.defaultValue,T.checked,T.defaultChecked,T.type,T.name,!0);break;case"select":Ln("invalid",g);break;case"textarea":Ln("invalid",g),o1(g,T.value,T.defaultValue,T.children)}x=T.children,typeof x!="string"&&typeof x!="number"&&typeof x!="bigint"||g.textContent===""+x||T.suppressHydrationWarning===!0||cL(g.textContent,x)?(T.popover!=null&&(Ln("beforetoggle",g),Ln("toggle",g)),T.onScroll!=null&&Ln("scroll",g),T.onScrollEnd!=null&&Ln("scrollend",g),T.onClick!=null&&(g.onclick=or),g=!0):g=!1,g||eu(p,!0)}function YI(p){for(Hs=p.return;Hs;)switch(Hs.tag){case 5:case 31:case 13:Ii=!1;return;case 27:case 3:Ii=!0;return;default:Hs=Hs.return}}function jp(p){if(p!==Hs)return!1;if(!Pn)return YI(p),Pn=!0,!1;var g=p.tag,x;if((x=g!==3&&g!==27)&&((x=g===5)&&(x=p.type,x=!(x!=="form"&&x!=="button")||Q5(p.type,p.memoizedProps)),x=!x),x&&jr&&eu(p),YI(p),g===13){if(p=p.memoizedState,p=p!==null?p.dehydrated:null,!p)throw Error(r(317));jr=vL(p)}else if(g===31){if(p=p.memoizedState,p=p!==null?p.dehydrated:null,!p)throw Error(r(317));jr=vL(p)}else g===27?(g=jr,hu(p.type)?(p=r6,r6=null,jr=p):jr=g):jr=Hs?Ni(p.stateNode.nextSibling):null;return!0}function qd(){jr=Hs=null,Pn=!1}function NC(){var p=Jc;return p!==null&&(Vo===null?Vo=p:Vo.push.apply(Vo,p),Jc=null),p}function v1(p){Jc===null?Jc=[p]:Jc.push(p)}var LC=U(null),Wd=null,Vl=null;function tu(p,g,x){Y(LC,g._currentValue),g._currentValue=x}function ql(p){p._currentValue=LC.current,W(LC)}function $C(p,g,x){for(;p!==null;){var T=p.alternate;if((p.childLanes&g)!==g?(p.childLanes|=g,T!==null&&(T.childLanes|=g)):T!==null&&(T.childLanes&g)!==g&&(T.childLanes|=g),p===x)break;p=p.return}}function FC(p,g,x,T){var O=p.child;for(O!==null&&(O.return=p);O!==null;){var F=O.dependencies;if(F!==null){var X=O.child;F=F.firstContext;e:for(;F!==null;){var te=F;F=O;for(var he=0;he<g.length;he++)if(te.context===g[he]){F.lanes|=x,te=F.alternate,te!==null&&(te.lanes|=x),$C(F.return,x,p),T||(X=null);break e}F=te.next}}else if(O.tag===18){if(X=O.return,X===null)throw Error(r(341));X.lanes|=x,F=X.alternate,F!==null&&(F.lanes|=x),$C(X,x,p),X=null}else X=O.child;if(X!==null)X.return=O;else for(X=O;X!==null;){if(X===p){X=null;break}if(O=X.sibling,O!==null){O.return=X.return,X=O;break}X=X.return}O=X}}function Ap(p,g,x,T){p=null;for(var O=g,F=!1;O!==null;){if(!F){if((O.flags&524288)!==0)F=!0;else if((O.flags&262144)!==0)break}if(O.tag===10){var X=O.alternate;if(X===null)throw Error(r(387));if(X=X.memoizedProps,X!==null){var te=O.type;ii(O.pendingProps.value,X.value)||(p!==null?p.push(te):p=[te])}}else if(O===Z.current){if(X=O.alternate,X===null)throw Error(r(387));X.memoizedState.memoizedState!==O.memoizedState.memoizedState&&(p!==null?p.push(q1):p=[q1])}O=O.return}p!==null&&FC(g,p,x,T),g.flags|=262144}function jy(p){for(p=p.firstContext;p!==null;){if(!ii(p.context._currentValue,p.memoizedValue))return!0;p=p.next}return!1}function Yd(p){Wd=p,Vl=null,p=p.dependencies,p!==null&&(p.firstContext=null)}function Us(p){return GI(Wd,p)}function Ay(p,g){return Wd===null&&Yd(p),GI(p,g)}function GI(p,g){var x=g._currentValue;if(g={context:g,memoizedValue:x,next:null},Vl===null){if(p===null)throw Error(r(308));Vl=g,p.dependencies={lanes:0,firstContext:g},p.flags|=524288}else Vl=Vl.next=g;return x}var ele=typeof AbortController<"u"?AbortController:function(){var p=[],g=this.signal={aborted:!1,addEventListener:function(x,T){p.push(T)}};this.abort=function(){g.aborted=!0,p.forEach(function(x){return x()})}},tle=t.unstable_scheduleCallback,nle=t.unstable_NormalPriority,fs={$$typeof:k,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function zC(){return{controller:new ele,data:new Map,refCount:0}}function b1(p){p.refCount--,p.refCount===0&&tle(nle,function(){p.controller.abort()})}var x1=null,PC=0,_p=0,Rp=null;function rle(p,g){if(x1===null){var x=x1=[];PC=0,_p=U5(),Rp={status:"pending",value:void 0,then:function(T){x.push(T)}}}return PC++,g.then(KI,KI),g}function KI(){if(--PC===0&&x1!==null){Rp!==null&&(Rp.status="fulfilled");var p=x1;x1=null,_p=0,Rp=null;for(var g=0;g<p.length;g++)(0,p[g])()}}function sle(p,g){var x=[],T={status:"pending",value:null,reason:null,then:function(O){x.push(O)}};return p.then(function(){T.status="fulfilled",T.value=g;for(var O=0;O<x.length;O++)(0,x[O])(g)},function(O){for(T.status="rejected",T.reason=O,O=0;O<x.length;O++)(0,x[O])(void 0)}),T}var XI=I.S;I.S=function(p,g){IN=Ye(),typeof g=="object"&&g!==null&&typeof g.then=="function"&&rle(p,g),XI!==null&&XI(p,g)};var Gd=U(null);function BC(){var p=Gd.current;return p!==null?p:gr.pooledCache}function _y(p,g){g===null?Y(Gd,Gd.current):Y(Gd,g.pool)}function ZI(){var p=BC();return p===null?null:{parent:fs._currentValue,pool:p}}var Dp=Error(r(460)),HC=Error(r(474)),Ry=Error(r(542)),Dy={then:function(){}};function QI(p){return p=p.status,p==="fulfilled"||p==="rejected"}function JI(p,g,x){switch(x=p[x],x===void 0?p.push(g):x!==g&&(g.then(or,or),g=x),g.status){case"fulfilled":return g.value;case"rejected":throw p=g.reason,tO(p),p;default:if(typeof g.status=="string")g.then(or,or);else{if(p=gr,p!==null&&100<p.shellSuspendCounter)throw Error(r(482));p=g,p.status="pending",p.then(function(T){if(g.status==="pending"){var O=g;O.status="fulfilled",O.value=T}},function(T){if(g.status==="pending"){var O=g;O.status="rejected",O.reason=T}})}switch(g.status){case"fulfilled":return g.value;case"rejected":throw p=g.reason,tO(p),p}throw Xd=g,Dp}}function Kd(p){try{var g=p._init;return g(p._payload)}catch(x){throw x!==null&&typeof x=="object"&&typeof x.then=="function"?(Xd=x,Dp):x}}var Xd=null;function eO(){if(Xd===null)throw Error(r(459));var p=Xd;return Xd=null,p}function tO(p){if(p===Dp||p===Ry)throw Error(r(483))}var Ip=null,w1=0;function Iy(p){var g=w1;return w1+=1,Ip===null&&(Ip=[]),JI(Ip,p,g)}function S1(p,g){g=g.props.ref,p.ref=g!==void 0?g:null}function Oy(p,g){throw g.$$typeof===h?Error(r(525)):(p=Object.prototype.toString.call(g),Error(r(31,p==="[object Object]"?"object with keys {"+Object.keys(g).join(", ")+"}":p)))}function nO(p){function g(ke,ye){if(p){var Re=ke.deletions;Re===null?(ke.deletions=[ye],ke.flags|=16):Re.push(ye)}}function x(ke,ye){if(!p)return null;for(;ye!==null;)g(ke,ye),ye=ye.sibling;return null}function T(ke){for(var ye=new Map;ke!==null;)ke.key!==null?ye.set(ke.key,ke):ye.set(ke.index,ke),ke=ke.sibling;return ye}function O(ke,ye){return ke=Hl(ke,ye),ke.index=0,ke.sibling=null,ke}function F(ke,ye,Re){return ke.index=Re,p?(Re=ke.alternate,Re!==null?(Re=Re.index,Re<ye?(ke.flags|=67108866,ye):Re):(ke.flags|=67108866,ye)):(ke.flags|=1048576,ye)}function X(ke){return p&&ke.alternate===null&&(ke.flags|=67108866),ke}function te(ke,ye,Re,tt){return ye===null||ye.tag!==6?(ye=_C(Re,ke.mode,tt),ye.return=ke,ye):(ye=O(ye,Re),ye.return=ke,ye)}function he(ke,ye,Re,tt){var sn=Re.type;return sn===v?Xe(ke,ye,Re.props.children,tt,Re.key):ye!==null&&(ye.elementType===sn||typeof sn=="object"&&sn!==null&&sn.$$typeof===_&&Kd(sn)===ye.type)?(ye=O(ye,Re.props),S1(ye,Re),ye.return=ke,ye):(ye=Ty(Re.type,Re.key,Re.props,null,ke.mode,tt),S1(ye,Re),ye.return=ke,ye)}function Ie(ke,ye,Re,tt){return ye===null||ye.tag!==4||ye.stateNode.containerInfo!==Re.containerInfo||ye.stateNode.implementation!==Re.implementation?(ye=RC(Re,ke.mode,tt),ye.return=ke,ye):(ye=O(ye,Re.children||[]),ye.return=ke,ye)}function Xe(ke,ye,Re,tt,sn){return ye===null||ye.tag!==7?(ye=Vd(Re,ke.mode,tt,sn),ye.return=ke,ye):(ye=O(ye,Re),ye.return=ke,ye)}function it(ke,ye,Re){if(typeof ye=="string"&&ye!==""||typeof ye=="number"||typeof ye=="bigint")return ye=_C(""+ye,ke.mode,Re),ye.return=ke,ye;if(typeof ye=="object"&&ye!==null){switch(ye.$$typeof){case m:return Re=Ty(ye.type,ye.key,ye.props,null,ke.mode,Re),S1(Re,ye),Re.return=ke,Re;case y:return ye=RC(ye,ke.mode,Re),ye.return=ke,ye;case _:return ye=Kd(ye),it(ke,ye,Re)}if(P(ye)||z(ye))return ye=Vd(ye,ke.mode,Re,null),ye.return=ke,ye;if(typeof ye.then=="function")return it(ke,Iy(ye),Re);if(ye.$$typeof===k)return it(ke,Ay(ke,ye),Re);Oy(ke,ye)}return null}function Oe(ke,ye,Re,tt){var sn=ye!==null?ye.key:null;if(typeof Re=="string"&&Re!==""||typeof Re=="number"||typeof Re=="bigint")return sn!==null?null:te(ke,ye,""+Re,tt);if(typeof Re=="object"&&Re!==null){switch(Re.$$typeof){case m:return Re.key===sn?he(ke,ye,Re,tt):null;case y:return Re.key===sn?Ie(ke,ye,Re,tt):null;case _:return Re=Kd(Re),Oe(ke,ye,Re,tt)}if(P(Re)||z(Re))return sn!==null?null:Xe(ke,ye,Re,tt,null);if(typeof Re.then=="function")return Oe(ke,ye,Iy(Re),tt);if(Re.$$typeof===k)return Oe(ke,ye,Ay(ke,Re),tt);Oy(ke,Re)}return null}function Pe(ke,ye,Re,tt,sn){if(typeof tt=="string"&&tt!==""||typeof tt=="number"||typeof tt=="bigint")return ke=ke.get(Re)||null,te(ye,ke,""+tt,sn);if(typeof tt=="object"&&tt!==null){switch(tt.$$typeof){case m:return ke=ke.get(tt.key===null?Re:tt.key)||null,he(ye,ke,tt,sn);case y:return ke=ke.get(tt.key===null?Re:tt.key)||null,Ie(ye,ke,tt,sn);case _:return tt=Kd(tt),Pe(ke,ye,Re,tt,sn)}if(P(tt)||z(tt))return ke=ke.get(Re)||null,Xe(ye,ke,tt,sn,null);if(typeof tt.then=="function")return Pe(ke,ye,Re,Iy(tt),sn);if(tt.$$typeof===k)return Pe(ke,ye,Re,Ay(ye,tt),sn);Oy(ye,tt)}return null}function Wt(ke,ye,Re,tt){for(var sn=null,Vn=null,Gt=ye,kn=ye=0,zn=null;Gt!==null&&kn<Re.length;kn++){Gt.index>kn?(zn=Gt,Gt=null):zn=Gt.sibling;var qn=Oe(ke,Gt,Re[kn],tt);if(qn===null){Gt===null&&(Gt=zn);break}p&&Gt&&qn.alternate===null&&g(ke,Gt),ye=F(qn,ye,kn),Vn===null?sn=qn:Vn.sibling=qn,Vn=qn,Gt=zn}if(kn===Re.length)return x(ke,Gt),Pn&&Ul(ke,kn),sn;if(Gt===null){for(;kn<Re.length;kn++)Gt=it(ke,Re[kn],tt),Gt!==null&&(ye=F(Gt,ye,kn),Vn===null?sn=Gt:Vn.sibling=Gt,Vn=Gt);return Pn&&Ul(ke,kn),sn}for(Gt=T(Gt);kn<Re.length;kn++)zn=Pe(Gt,ke,kn,Re[kn],tt),zn!==null&&(p&&zn.alternate!==null&&Gt.delete(zn.key===null?kn:zn.key),ye=F(zn,ye,kn),Vn===null?sn=zn:Vn.sibling=zn,Vn=zn);return p&&Gt.forEach(function(bu){return g(ke,bu)}),Pn&&Ul(ke,kn),sn}function fn(ke,ye,Re,tt){if(Re==null)throw Error(r(151));for(var sn=null,Vn=null,Gt=ye,kn=ye=0,zn=null,qn=Re.next();Gt!==null&&!qn.done;kn++,qn=Re.next()){Gt.index>kn?(zn=Gt,Gt=null):zn=Gt.sibling;var bu=Oe(ke,Gt,qn.value,tt);if(bu===null){Gt===null&&(Gt=zn);break}p&&Gt&&bu.alternate===null&&g(ke,Gt),ye=F(bu,ye,kn),Vn===null?sn=bu:Vn.sibling=bu,Vn=bu,Gt=zn}if(qn.done)return x(ke,Gt),Pn&&Ul(ke,kn),sn;if(Gt===null){for(;!qn.done;kn++,qn=Re.next())qn=it(ke,qn.value,tt),qn!==null&&(ye=F(qn,ye,kn),Vn===null?sn=qn:Vn.sibling=qn,Vn=qn);return Pn&&Ul(ke,kn),sn}for(Gt=T(Gt);!qn.done;kn++,qn=Re.next())qn=Pe(Gt,ke,kn,qn.value,tt),qn!==null&&(p&&qn.alternate!==null&&Gt.delete(qn.key===null?kn:qn.key),ye=F(qn,ye,kn),Vn===null?sn=qn:Vn.sibling=qn,Vn=qn);return p&&Gt.forEach(function(mce){return g(ke,mce)}),Pn&&Ul(ke,kn),sn}function pr(ke,ye,Re,tt){if(typeof Re=="object"&&Re!==null&&Re.type===v&&Re.key===null&&(Re=Re.props.children),typeof Re=="object"&&Re!==null){switch(Re.$$typeof){case m:e:{for(var sn=Re.key;ye!==null;){if(ye.key===sn){if(sn=Re.type,sn===v){if(ye.tag===7){x(ke,ye.sibling),tt=O(ye,Re.props.children),tt.return=ke,ke=tt;break e}}else if(ye.elementType===sn||typeof sn=="object"&&sn!==null&&sn.$$typeof===_&&Kd(sn)===ye.type){x(ke,ye.sibling),tt=O(ye,Re.props),S1(tt,Re),tt.return=ke,ke=tt;break e}x(ke,ye);break}else g(ke,ye);ye=ye.sibling}Re.type===v?(tt=Vd(Re.props.children,ke.mode,tt,Re.key),tt.return=ke,ke=tt):(tt=Ty(Re.type,Re.key,Re.props,null,ke.mode,tt),S1(tt,Re),tt.return=ke,ke=tt)}return X(ke);case y:e:{for(sn=Re.key;ye!==null;){if(ye.key===sn)if(ye.tag===4&&ye.stateNode.containerInfo===Re.containerInfo&&ye.stateNode.implementation===Re.implementation){x(ke,ye.sibling),tt=O(ye,Re.children||[]),tt.return=ke,ke=tt;break e}else{x(ke,ye);break}else g(ke,ye);ye=ye.sibling}tt=RC(Re,ke.mode,tt),tt.return=ke,ke=tt}return X(ke);case _:return Re=Kd(Re),pr(ke,ye,Re,tt)}if(P(Re))return Wt(ke,ye,Re,tt);if(z(Re)){if(sn=z(Re),typeof sn!="function")throw Error(r(150));return Re=sn.call(Re),fn(ke,ye,Re,tt)}if(typeof Re.then=="function")return pr(ke,ye,Iy(Re),tt);if(Re.$$typeof===k)return pr(ke,ye,Ay(ke,Re),tt);Oy(ke,Re)}return typeof Re=="string"&&Re!==""||typeof Re=="number"||typeof Re=="bigint"?(Re=""+Re,ye!==null&&ye.tag===6?(x(ke,ye.sibling),tt=O(ye,Re),tt.return=ke,ke=tt):(x(ke,ye),tt=_C(Re,ke.mode,tt),tt.return=ke,ke=tt),X(ke)):x(ke,ye)}return function(ke,ye,Re,tt){try{w1=0;var sn=pr(ke,ye,Re,tt);return Ip=null,sn}catch(Gt){if(Gt===Dp||Gt===Ry)throw Gt;var Vn=ai(29,Gt,null,ke.mode);return Vn.lanes=tt,Vn.return=ke,Vn}finally{}}}var Zd=nO(!0),rO=nO(!1),nu=!1;function UC(p){p.updateQueue={baseState:p.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function VC(p,g){p=p.updateQueue,g.updateQueue===p&&(g.updateQueue={baseState:p.baseState,firstBaseUpdate:p.firstBaseUpdate,lastBaseUpdate:p.lastBaseUpdate,shared:p.shared,callbacks:null})}function ru(p){return{lane:p,tag:0,payload:null,callback:null,next:null}}function su(p,g,x){var T=p.updateQueue;if(T===null)return null;if(T=T.shared,(Gn&2)!==0){var O=T.pending;return O===null?g.next=g:(g.next=O.next,O.next=g),T.pending=g,g=Ey(p),PI(p,null,x),g}return ky(p,T,g,x),Ey(p)}function C1(p,g,x){if(g=g.updateQueue,g!==null&&(g=g.shared,(x&4194048)!==0)){var T=g.lanes;T&=p.pendingLanes,x|=T,g.lanes=x,ee(p,x)}}function qC(p,g){var x=p.updateQueue,T=p.alternate;if(T!==null&&(T=T.updateQueue,x===T)){var O=null,F=null;if(x=x.firstBaseUpdate,x!==null){do{var X={lane:x.lane,tag:x.tag,payload:x.payload,callback:null,next:null};F===null?O=F=X:F=F.next=X,x=x.next}while(x!==null);F===null?O=F=g:F=F.next=g}else O=F=g;x={baseState:T.baseState,firstBaseUpdate:O,lastBaseUpdate:F,shared:T.shared,callbacks:T.callbacks},p.updateQueue=x;return}p=x.lastBaseUpdate,p===null?x.firstBaseUpdate=g:p.next=g,x.lastBaseUpdate=g}var WC=!1;function k1(){if(WC){var p=Rp;if(p!==null)throw p}}function E1(p,g,x,T){WC=!1;var O=p.updateQueue;nu=!1;var F=O.firstBaseUpdate,X=O.lastBaseUpdate,te=O.shared.pending;if(te!==null){O.shared.pending=null;var he=te,Ie=he.next;he.next=null,X===null?F=Ie:X.next=Ie,X=he;var Xe=p.alternate;Xe!==null&&(Xe=Xe.updateQueue,te=Xe.lastBaseUpdate,te!==X&&(te===null?Xe.firstBaseUpdate=Ie:te.next=Ie,Xe.lastBaseUpdate=he))}if(F!==null){var it=O.baseState;X=0,Xe=Ie=he=null,te=F;do{var Oe=te.lane&-536870913,Pe=Oe!==te.lane;if(Pe?(Fn&Oe)===Oe:(T&Oe)===Oe){Oe!==0&&Oe===_p&&(WC=!0),Xe!==null&&(Xe=Xe.next={lane:0,tag:te.tag,payload:te.payload,callback:null,next:null});e:{var Wt=p,fn=te;Oe=g;var pr=x;switch(fn.tag){case 1:if(Wt=fn.payload,typeof Wt=="function"){it=Wt.call(pr,it,Oe);break e}it=Wt;break e;case 3:Wt.flags=Wt.flags&-65537|128;case 0:if(Wt=fn.payload,Oe=typeof Wt=="function"?Wt.call(pr,it,Oe):Wt,Oe==null)break e;it=f({},it,Oe);break e;case 2:nu=!0}}Oe=te.callback,Oe!==null&&(p.flags|=64,Pe&&(p.flags|=8192),Pe=O.callbacks,Pe===null?O.callbacks=[Oe]:Pe.push(Oe))}else Pe={lane:Oe,tag:te.tag,payload:te.payload,callback:te.callback,next:null},Xe===null?(Ie=Xe=Pe,he=it):Xe=Xe.next=Pe,X|=Oe;if(te=te.next,te===null){if(te=O.shared.pending,te===null)break;Pe=te,te=Pe.next,Pe.next=null,O.lastBaseUpdate=Pe,O.shared.pending=null}}while(!0);Xe===null&&(he=it),O.baseState=he,O.firstBaseUpdate=Ie,O.lastBaseUpdate=Xe,F===null&&(O.shared.lanes=0),cu|=X,p.lanes=X,p.memoizedState=it}}function sO(p,g){if(typeof p!="function")throw Error(r(191,p));p.call(g)}function oO(p,g){var x=p.callbacks;if(x!==null)for(p.callbacks=null,p=0;p<x.length;p++)sO(x[p],g)}var Op=U(null),Ny=U(0);function iO(p,g){p=ec,Y(Ny,p),Y(Op,g),ec=p|g.baseLanes}function YC(){Y(Ny,ec),Y(Op,Op.current)}function GC(){ec=Ny.current,W(Op),W(Ny)}var li=U(null),Oi=null;function ou(p){var g=p.alternate;Y(ns,ns.current&1),Y(li,p),Oi===null&&(g===null||Op.current!==null||g.memoizedState!==null)&&(Oi=p)}function KC(p){Y(ns,ns.current),Y(li,p),Oi===null&&(Oi=p)}function aO(p){p.tag===22?(Y(ns,ns.current),Y(li,p),Oi===null&&(Oi=p)):iu()}function iu(){Y(ns,ns.current),Y(li,li.current)}function ci(p){W(li),Oi===p&&(Oi=null),W(ns)}var ns=U(0);function Ly(p){for(var g=p;g!==null;){if(g.tag===13){var x=g.memoizedState;if(x!==null&&(x=x.dehydrated,x===null||t6(x)||n6(x)))return g}else if(g.tag===19&&(g.memoizedProps.revealOrder==="forwards"||g.memoizedProps.revealOrder==="backwards"||g.memoizedProps.revealOrder==="unstable_legacy-backwards"||g.memoizedProps.revealOrder==="together")){if((g.flags&128)!==0)return g}else if(g.child!==null){g.child.return=g,g=g.child;continue}if(g===p)break;for(;g.sibling===null;){if(g.return===null||g.return===p)return null;g=g.return}g.sibling.return=g.return,g=g.sibling}return null}var Wl=0,Cn=null,dr=null,ps=null,$y=!1,Np=!1,Qd=!1,Fy=0,T1=0,Lp=null,ole=0;function Wr(){throw Error(r(321))}function XC(p,g){if(g===null)return!1;for(var x=0;x<g.length&&x<p.length;x++)if(!ii(p[x],g[x]))return!1;return!0}function ZC(p,g,x,T,O,F){return Wl=F,Cn=g,g.memoizedState=null,g.updateQueue=null,g.lanes=0,I.H=p===null||p.memoizedState===null?VO:f5,Qd=!1,F=x(T,O),Qd=!1,Np&&(F=cO(g,x,T,O)),lO(p),F}function lO(p){I.H=A1;var g=dr!==null&&dr.next!==null;if(Wl=0,ps=dr=Cn=null,$y=!1,T1=0,Lp=null,g)throw Error(r(300));p===null||hs||(p=p.dependencies,p!==null&&jy(p)&&(hs=!0))}function cO(p,g,x,T){Cn=p;var O=0;do{if(Np&&(Lp=null),T1=0,Np=!1,25<=O)throw Error(r(301));if(O+=1,ps=dr=null,p.updateQueue!=null){var F=p.updateQueue;F.lastEffect=null,F.events=null,F.stores=null,F.memoCache!=null&&(F.memoCache.index=0)}I.H=qO,F=g(x,T)}while(Np);return F}function ile(){var p=I.H,g=p.useState()[0];return g=typeof g.then=="function"?M1(g):g,p=p.useState()[0],(dr!==null?dr.memoizedState:null)!==p&&(Cn.flags|=1024),g}function QC(){var p=Fy!==0;return Fy=0,p}function JC(p,g,x){g.updateQueue=p.updateQueue,g.flags&=-2053,p.lanes&=~x}function e5(p){if($y){for(p=p.memoizedState;p!==null;){var g=p.queue;g!==null&&(g.pending=null),p=p.next}$y=!1}Wl=0,ps=dr=Cn=null,Np=!1,T1=Fy=0,Lp=null}function wo(){var p={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return ps===null?Cn.memoizedState=ps=p:ps=ps.next=p,ps}function rs(){if(dr===null){var p=Cn.alternate;p=p!==null?p.memoizedState:null}else p=dr.next;var g=ps===null?Cn.memoizedState:ps.next;if(g!==null)ps=g,dr=p;else{if(p===null)throw Cn.alternate===null?Error(r(467)):Error(r(310));dr=p,p={memoizedState:dr.memoizedState,baseState:dr.baseState,baseQueue:dr.baseQueue,queue:dr.queue,next:null},ps===null?Cn.memoizedState=ps=p:ps=ps.next=p}return ps}function zy(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function M1(p){var g=T1;return T1+=1,Lp===null&&(Lp=[]),p=JI(Lp,p,g),g=Cn,(ps===null?g.memoizedState:ps.next)===null&&(g=g.alternate,I.H=g===null||g.memoizedState===null?VO:f5),p}function Py(p){if(p!==null&&typeof p=="object"){if(typeof p.then=="function")return M1(p);if(p.$$typeof===k)return Us(p)}throw Error(r(438,String(p)))}function t5(p){var g=null,x=Cn.updateQueue;if(x!==null&&(g=x.memoCache),g==null){var T=Cn.alternate;T!==null&&(T=T.updateQueue,T!==null&&(T=T.memoCache,T!=null&&(g={data:T.data.map(function(O){return O.slice()}),index:0})))}if(g==null&&(g={data:[],index:0}),x===null&&(x=zy(),Cn.updateQueue=x),x.memoCache=g,x=g.data[g.index],x===void 0)for(x=g.data[g.index]=Array(p),T=0;T<p;T++)x[T]=R;return g.index++,x}function Yl(p,g){return typeof g=="function"?g(p):g}function By(p){var g=rs();return n5(g,dr,p)}function n5(p,g,x){var T=p.queue;if(T===null)throw Error(r(311));T.lastRenderedReducer=x;var O=p.baseQueue,F=T.pending;if(F!==null){if(O!==null){var X=O.next;O.next=F.next,F.next=X}g.baseQueue=O=F,T.pending=null}if(F=p.baseState,O===null)p.memoizedState=F;else{g=O.next;var te=X=null,he=null,Ie=g,Xe=!1;do{var it=Ie.lane&-536870913;if(it!==Ie.lane?(Fn&it)===it:(Wl&it)===it){var Oe=Ie.revertLane;if(Oe===0)he!==null&&(he=he.next={lane:0,revertLane:0,gesture:null,action:Ie.action,hasEagerState:Ie.hasEagerState,eagerState:Ie.eagerState,next:null}),it===_p&&(Xe=!0);else if((Wl&Oe)===Oe){Ie=Ie.next,Oe===_p&&(Xe=!0);continue}else it={lane:0,revertLane:Ie.revertLane,gesture:null,action:Ie.action,hasEagerState:Ie.hasEagerState,eagerState:Ie.eagerState,next:null},he===null?(te=he=it,X=F):he=he.next=it,Cn.lanes|=Oe,cu|=Oe;it=Ie.action,Qd&&x(F,it),F=Ie.hasEagerState?Ie.eagerState:x(F,it)}else Oe={lane:it,revertLane:Ie.revertLane,gesture:Ie.gesture,action:Ie.action,hasEagerState:Ie.hasEagerState,eagerState:Ie.eagerState,next:null},he===null?(te=he=Oe,X=F):he=he.next=Oe,Cn.lanes|=it,cu|=it;Ie=Ie.next}while(Ie!==null&&Ie!==g);if(he===null?X=F:he.next=te,!ii(F,p.memoizedState)&&(hs=!0,Xe&&(x=Rp,x!==null)))throw x;p.memoizedState=F,p.baseState=X,p.baseQueue=he,T.lastRenderedState=F}return O===null&&(T.lanes=0),[p.memoizedState,T.dispatch]}function r5(p){var g=rs(),x=g.queue;if(x===null)throw Error(r(311));x.lastRenderedReducer=p;var T=x.dispatch,O=x.pending,F=g.memoizedState;if(O!==null){x.pending=null;var X=O=O.next;do F=p(F,X.action),X=X.next;while(X!==O);ii(F,g.memoizedState)||(hs=!0),g.memoizedState=F,g.baseQueue===null&&(g.baseState=F),x.lastRenderedState=F}return[F,T]}function uO(p,g,x){var T=Cn,O=rs(),F=Pn;if(F){if(x===void 0)throw Error(r(407));x=x()}else x=g();var X=!ii((dr||O).memoizedState,x);if(X&&(O.memoizedState=x,hs=!0),O=O.queue,i5(pO.bind(null,T,O,p),[p]),O.getSnapshot!==g||X||ps!==null&&ps.memoizedState.tag&1){if(T.flags|=2048,$p(9,{destroy:void 0},fO.bind(null,T,O,x,g),null),gr===null)throw Error(r(349));F||(Wl&127)!==0||dO(T,g,x)}return x}function dO(p,g,x){p.flags|=16384,p={getSnapshot:g,value:x},g=Cn.updateQueue,g===null?(g=zy(),Cn.updateQueue=g,g.stores=[p]):(x=g.stores,x===null?g.stores=[p]:x.push(p))}function fO(p,g,x,T){g.value=x,g.getSnapshot=T,hO(g)&&mO(p)}function pO(p,g,x){return x(function(){hO(g)&&mO(p)})}function hO(p){var g=p.getSnapshot;p=p.value;try{var x=g();return!ii(p,x)}catch{return!0}}function mO(p){var g=Ud(p,2);g!==null&&qo(g,p,2)}function s5(p){var g=wo();if(typeof p=="function"){var x=p;if(p=x(),Qd){nt(!0);try{x()}finally{nt(!1)}}}return g.memoizedState=g.baseState=p,g.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Yl,lastRenderedState:p},g}function gO(p,g,x,T){return p.baseState=x,n5(p,dr,typeof T=="function"?T:Yl)}function ale(p,g,x,T,O){if(Vy(p))throw Error(r(485));if(p=g.action,p!==null){var F={payload:O,action:p,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(X){F.listeners.push(X)}};I.T!==null?x(!0):F.isTransition=!1,T(F),x=g.pending,x===null?(F.next=g.pending=F,yO(g,F)):(F.next=x.next,g.pending=x.next=F)}}function yO(p,g){var x=g.action,T=g.payload,O=p.state;if(g.isTransition){var F=I.T,X={};I.T=X;try{var te=x(O,T),he=I.S;he!==null&&he(X,te),vO(p,g,te)}catch(Ie){o5(p,g,Ie)}finally{F!==null&&X.types!==null&&(F.types=X.types),I.T=F}}else try{F=x(O,T),vO(p,g,F)}catch(Ie){o5(p,g,Ie)}}function vO(p,g,x){x!==null&&typeof x=="object"&&typeof x.then=="function"?x.then(function(T){bO(p,g,T)},function(T){return o5(p,g,T)}):bO(p,g,x)}function bO(p,g,x){g.status="fulfilled",g.value=x,xO(g),p.state=x,g=p.pending,g!==null&&(x=g.next,x===g?p.pending=null:(x=x.next,g.next=x,yO(p,x)))}function o5(p,g,x){var T=p.pending;if(p.pending=null,T!==null){T=T.next;do g.status="rejected",g.reason=x,xO(g),g=g.next;while(g!==T)}p.action=null}function xO(p){p=p.listeners;for(var g=0;g<p.length;g++)(0,p[g])()}function wO(p,g){return g}function SO(p,g){if(Pn){var x=gr.formState;if(x!==null){e:{var T=Cn;if(Pn){if(jr){t:{for(var O=jr,F=Ii;O.nodeType!==8;){if(!F){O=null;break t}if(O=Ni(O.nextSibling),O===null){O=null;break t}}F=O.data,O=F==="F!"||F==="F"?O:null}if(O){jr=Ni(O.nextSibling),T=O.data==="F!";break e}}eu(T)}T=!1}T&&(g=x[0])}}return x=wo(),x.memoizedState=x.baseState=g,T={pending:null,lanes:0,dispatch:null,lastRenderedReducer:wO,lastRenderedState:g},x.queue=T,x=BO.bind(null,Cn,T),T.dispatch=x,T=s5(!1),F=d5.bind(null,Cn,!1,T.queue),T=wo(),O={state:g,dispatch:null,action:p,pending:null},T.queue=O,x=ale.bind(null,Cn,O,F,x),O.dispatch=x,T.memoizedState=p,[g,x,!1]}function CO(p){var g=rs();return kO(g,dr,p)}function kO(p,g,x){if(g=n5(p,g,wO)[0],p=By(Yl)[0],typeof g=="object"&&g!==null&&typeof g.then=="function")try{var T=M1(g)}catch(X){throw X===Dp?Ry:X}else T=g;g=rs();var O=g.queue,F=O.dispatch;return x!==g.memoizedState&&(Cn.flags|=2048,$p(9,{destroy:void 0},lle.bind(null,O,x),null)),[T,F,p]}function lle(p,g){p.action=g}function EO(p){var g=rs(),x=dr;if(x!==null)return kO(g,x,p);rs(),g=g.memoizedState,x=rs();var T=x.queue.dispatch;return x.memoizedState=p,[g,T,!1]}function $p(p,g,x,T){return p={tag:p,create:x,deps:T,inst:g,next:null},g=Cn.updateQueue,g===null&&(g=zy(),Cn.updateQueue=g),x=g.lastEffect,x===null?g.lastEffect=p.next=p:(T=x.next,x.next=p,p.next=T,g.lastEffect=p),p}function TO(){return rs().memoizedState}function Hy(p,g,x,T){var O=wo();Cn.flags|=p,O.memoizedState=$p(1|g,{destroy:void 0},x,T===void 0?null:T)}function Uy(p,g,x,T){var O=rs();T=T===void 0?null:T;var F=O.memoizedState.inst;dr!==null&&T!==null&&XC(T,dr.memoizedState.deps)?O.memoizedState=$p(g,F,x,T):(Cn.flags|=p,O.memoizedState=$p(1|g,F,x,T))}function MO(p,g){Hy(8390656,8,p,g)}function i5(p,g){Uy(2048,8,p,g)}function cle(p){Cn.flags|=4;var g=Cn.updateQueue;if(g===null)g=zy(),Cn.updateQueue=g,g.events=[p];else{var x=g.events;x===null?g.events=[p]:x.push(p)}}function jO(p){var g=rs().memoizedState;return cle({ref:g,nextImpl:p}),function(){if((Gn&2)!==0)throw Error(r(440));return g.impl.apply(void 0,arguments)}}function AO(p,g){return Uy(4,2,p,g)}function _O(p,g){return Uy(4,4,p,g)}function RO(p,g){if(typeof g=="function"){p=p();var x=g(p);return function(){typeof x=="function"?x():g(null)}}if(g!=null)return p=p(),g.current=p,function(){g.current=null}}function DO(p,g,x){x=x!=null?x.concat([p]):null,Uy(4,4,RO.bind(null,g,p),x)}function a5(){}function IO(p,g){var x=rs();g=g===void 0?null:g;var T=x.memoizedState;return g!==null&&XC(g,T[1])?T[0]:(x.memoizedState=[p,g],p)}function OO(p,g){var x=rs();g=g===void 0?null:g;var T=x.memoizedState;if(g!==null&&XC(g,T[1]))return T[0];if(T=p(),Qd){nt(!0);try{p()}finally{nt(!1)}}return x.memoizedState=[T,g],T}function l5(p,g,x){return x===void 0||(Wl&1073741824)!==0&&(Fn&261930)===0?p.memoizedState=g:(p.memoizedState=x,p=NN(),Cn.lanes|=p,cu|=p,x)}function NO(p,g,x,T){return ii(x,g)?x:Op.current!==null?(p=l5(p,x,T),ii(p,g)||(hs=!0),p):(Wl&42)===0||(Wl&1073741824)!==0&&(Fn&261930)===0?(hs=!0,p.memoizedState=x):(p=NN(),Cn.lanes|=p,cu|=p,g)}function LO(p,g,x,T,O){var F=H.p;H.p=F!==0&&8>F?F:8;var X=I.T,te={};I.T=te,d5(p,!1,g,x);try{var he=O(),Ie=I.S;if(Ie!==null&&Ie(te,he),he!==null&&typeof he=="object"&&typeof he.then=="function"){var Xe=sle(he,T);j1(p,g,Xe,fi(p))}else j1(p,g,T,fi(p))}catch(it){j1(p,g,{then:function(){},status:"rejected",reason:it},fi())}finally{H.p=F,X!==null&&te.types!==null&&(X.types=te.types),I.T=X}}function ule(){}function c5(p,g,x,T){if(p.tag!==5)throw Error(r(476));var O=$O(p).queue;LO(p,O,g,$,x===null?ule:function(){return FO(p),x(T)})}function $O(p){var g=p.memoizedState;if(g!==null)return g;g={memoizedState:$,baseState:$,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Yl,lastRenderedState:$},next:null};var x={};return g.next={memoizedState:x,baseState:x,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Yl,lastRenderedState:x},next:null},p.memoizedState=g,p=p.alternate,p!==null&&(p.memoizedState=g),g}function FO(p){var g=$O(p);g.next===null&&(g=p.alternate.memoizedState),j1(p,g.next.queue,{},fi())}function u5(){return Us(q1)}function zO(){return rs().memoizedState}function PO(){return rs().memoizedState}function dle(p){for(var g=p.return;g!==null;){switch(g.tag){case 24:case 3:var x=fi();p=ru(x);var T=su(g,p,x);T!==null&&(qo(T,g,x),C1(T,g,x)),g={cache:zC()},p.payload=g;return}g=g.return}}function fle(p,g,x){var T=fi();x={lane:T,revertLane:0,gesture:null,action:x,hasEagerState:!1,eagerState:null,next:null},Vy(p)?HO(g,x):(x=jC(p,g,x,T),x!==null&&(qo(x,p,T),UO(x,g,T)))}function BO(p,g,x){var T=fi();j1(p,g,x,T)}function j1(p,g,x,T){var O={lane:T,revertLane:0,gesture:null,action:x,hasEagerState:!1,eagerState:null,next:null};if(Vy(p))HO(g,O);else{var F=p.alternate;if(p.lanes===0&&(F===null||F.lanes===0)&&(F=g.lastRenderedReducer,F!==null))try{var X=g.lastRenderedState,te=F(X,x);if(O.hasEagerState=!0,O.eagerState=te,ii(te,X))return ky(p,g,O,0),gr===null&&Cy(),!1}catch{}finally{}if(x=jC(p,g,O,T),x!==null)return qo(x,p,T),UO(x,g,T),!0}return!1}function d5(p,g,x,T){if(T={lane:2,revertLane:U5(),gesture:null,action:T,hasEagerState:!1,eagerState:null,next:null},Vy(p)){if(g)throw Error(r(479))}else g=jC(p,x,T,2),g!==null&&qo(g,p,2)}function Vy(p){var g=p.alternate;return p===Cn||g!==null&&g===Cn}function HO(p,g){Np=$y=!0;var x=p.pending;x===null?g.next=g:(g.next=x.next,x.next=g),p.pending=g}function UO(p,g,x){if((x&4194048)!==0){var T=g.lanes;T&=p.pendingLanes,x|=T,g.lanes=x,ee(p,x)}}var A1={readContext:Us,use:Py,useCallback:Wr,useContext:Wr,useEffect:Wr,useImperativeHandle:Wr,useLayoutEffect:Wr,useInsertionEffect:Wr,useMemo:Wr,useReducer:Wr,useRef:Wr,useState:Wr,useDebugValue:Wr,useDeferredValue:Wr,useTransition:Wr,useSyncExternalStore:Wr,useId:Wr,useHostTransitionStatus:Wr,useFormState:Wr,useActionState:Wr,useOptimistic:Wr,useMemoCache:Wr,useCacheRefresh:Wr};A1.useEffectEvent=Wr;var VO={readContext:Us,use:Py,useCallback:function(p,g){return wo().memoizedState=[p,g===void 0?null:g],p},useContext:Us,useEffect:MO,useImperativeHandle:function(p,g,x){x=x!=null?x.concat([p]):null,Hy(4194308,4,RO.bind(null,g,p),x)},useLayoutEffect:function(p,g){return Hy(4194308,4,p,g)},useInsertionEffect:function(p,g){Hy(4,2,p,g)},useMemo:function(p,g){var x=wo();g=g===void 0?null:g;var T=p();if(Qd){nt(!0);try{p()}finally{nt(!1)}}return x.memoizedState=[T,g],T},useReducer:function(p,g,x){var T=wo();if(x!==void 0){var O=x(g);if(Qd){nt(!0);try{x(g)}finally{nt(!1)}}}else O=g;return T.memoizedState=T.baseState=O,p={pending:null,lanes:0,dispatch:null,lastRenderedReducer:p,lastRenderedState:O},T.queue=p,p=p.dispatch=fle.bind(null,Cn,p),[T.memoizedState,p]},useRef:function(p){var g=wo();return p={current:p},g.memoizedState=p},useState:function(p){p=s5(p);var g=p.queue,x=BO.bind(null,Cn,g);return g.dispatch=x,[p.memoizedState,x]},useDebugValue:a5,useDeferredValue:function(p,g){var x=wo();return l5(x,p,g)},useTransition:function(){var p=s5(!1);return p=LO.bind(null,Cn,p.queue,!0,!1),wo().memoizedState=p,[!1,p]},useSyncExternalStore:function(p,g,x){var T=Cn,O=wo();if(Pn){if(x===void 0)throw Error(r(407));x=x()}else{if(x=g(),gr===null)throw Error(r(349));(Fn&127)!==0||dO(T,g,x)}O.memoizedState=x;var F={value:x,getSnapshot:g};return O.queue=F,MO(pO.bind(null,T,F,p),[p]),T.flags|=2048,$p(9,{destroy:void 0},fO.bind(null,T,F,x,g),null),x},useId:function(){var p=wo(),g=gr.identifierPrefix;if(Pn){var x=Ka,T=Ga;x=(T&~(1<<32-We(T)-1)).toString(32)+x,g="_"+g+"R_"+x,x=Fy++,0<x&&(g+="H"+x.toString(32)),g+="_"}else x=ole++,g="_"+g+"r_"+x.toString(32)+"_";return p.memoizedState=g},useHostTransitionStatus:u5,useFormState:SO,useActionState:SO,useOptimistic:function(p){var g=wo();g.memoizedState=g.baseState=p;var x={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return g.queue=x,g=d5.bind(null,Cn,!0,x),x.dispatch=g,[p,g]},useMemoCache:t5,useCacheRefresh:function(){return wo().memoizedState=dle.bind(null,Cn)},useEffectEvent:function(p){var g=wo(),x={impl:p};return g.memoizedState=x,function(){if((Gn&2)!==0)throw Error(r(440));return x.impl.apply(void 0,arguments)}}},f5={readContext:Us,use:Py,useCallback:IO,useContext:Us,useEffect:i5,useImperativeHandle:DO,useInsertionEffect:AO,useLayoutEffect:_O,useMemo:OO,useReducer:By,useRef:TO,useState:function(){return By(Yl)},useDebugValue:a5,useDeferredValue:function(p,g){var x=rs();return NO(x,dr.memoizedState,p,g)},useTransition:function(){var p=By(Yl)[0],g=rs().memoizedState;return[typeof p=="boolean"?p:M1(p),g]},useSyncExternalStore:uO,useId:zO,useHostTransitionStatus:u5,useFormState:CO,useActionState:CO,useOptimistic:function(p,g){var x=rs();return gO(x,dr,p,g)},useMemoCache:t5,useCacheRefresh:PO};f5.useEffectEvent=jO;var qO={readContext:Us,use:Py,useCallback:IO,useContext:Us,useEffect:i5,useImperativeHandle:DO,useInsertionEffect:AO,useLayoutEffect:_O,useMemo:OO,useReducer:r5,useRef:TO,useState:function(){return r5(Yl)},useDebugValue:a5,useDeferredValue:function(p,g){var x=rs();return dr===null?l5(x,p,g):NO(x,dr.memoizedState,p,g)},useTransition:function(){var p=r5(Yl)[0],g=rs().memoizedState;return[typeof p=="boolean"?p:M1(p),g]},useSyncExternalStore:uO,useId:zO,useHostTransitionStatus:u5,useFormState:EO,useActionState:EO,useOptimistic:function(p,g){var x=rs();return dr!==null?gO(x,dr,p,g):(x.baseState=p,[p,x.queue.dispatch])},useMemoCache:t5,useCacheRefresh:PO};qO.useEffectEvent=jO;function p5(p,g,x,T){g=p.memoizedState,x=x(T,g),x=x==null?g:f({},g,x),p.memoizedState=x,p.lanes===0&&(p.updateQueue.baseState=x)}var h5={enqueueSetState:function(p,g,x){p=p._reactInternals;var T=fi(),O=ru(T);O.payload=g,x!=null&&(O.callback=x),g=su(p,O,T),g!==null&&(qo(g,p,T),C1(g,p,T))},enqueueReplaceState:function(p,g,x){p=p._reactInternals;var T=fi(),O=ru(T);O.tag=1,O.payload=g,x!=null&&(O.callback=x),g=su(p,O,T),g!==null&&(qo(g,p,T),C1(g,p,T))},enqueueForceUpdate:function(p,g){p=p._reactInternals;var x=fi(),T=ru(x);T.tag=2,g!=null&&(T.callback=g),g=su(p,T,x),g!==null&&(qo(g,p,x),C1(g,p,x))}};function WO(p,g,x,T,O,F,X){return p=p.stateNode,typeof p.shouldComponentUpdate=="function"?p.shouldComponentUpdate(T,F,X):g.prototype&&g.prototype.isPureReactComponent?!m1(x,T)||!m1(O,F):!0}function YO(p,g,x,T){p=g.state,typeof g.componentWillReceiveProps=="function"&&g.componentWillReceiveProps(x,T),typeof g.UNSAFE_componentWillReceiveProps=="function"&&g.UNSAFE_componentWillReceiveProps(x,T),g.state!==p&&h5.enqueueReplaceState(g,g.state,null)}function Jd(p,g){var x=g;if("ref"in g){x={};for(var T in g)T!=="ref"&&(x[T]=g[T])}if(p=p.defaultProps){x===g&&(x=f({},x));for(var O in p)x[O]===void 0&&(x[O]=p[O])}return x}function GO(p){Sy(p)}function KO(p){console.error(p)}function XO(p){Sy(p)}function qy(p,g){try{var x=p.onUncaughtError;x(g.value,{componentStack:g.stack})}catch(T){setTimeout(function(){throw T})}}function ZO(p,g,x){try{var T=p.onCaughtError;T(x.value,{componentStack:x.stack,errorBoundary:g.tag===1?g.stateNode:null})}catch(O){setTimeout(function(){throw O})}}function m5(p,g,x){return x=ru(x),x.tag=3,x.payload={element:null},x.callback=function(){qy(p,g)},x}function QO(p){return p=ru(p),p.tag=3,p}function JO(p,g,x,T){var O=x.type.getDerivedStateFromError;if(typeof O=="function"){var F=T.value;p.payload=function(){return O(F)},p.callback=function(){ZO(g,x,T)}}var X=x.stateNode;X!==null&&typeof X.componentDidCatch=="function"&&(p.callback=function(){ZO(g,x,T),typeof O!="function"&&(uu===null?uu=new Set([this]):uu.add(this));var te=T.stack;this.componentDidCatch(T.value,{componentStack:te!==null?te:""})})}function ple(p,g,x,T,O){if(x.flags|=32768,T!==null&&typeof T=="object"&&typeof T.then=="function"){if(g=x.alternate,g!==null&&Ap(g,x,O,!0),x=li.current,x!==null){switch(x.tag){case 31:case 13:return Oi===null?rv():x.alternate===null&&Yr===0&&(Yr=3),x.flags&=-257,x.flags|=65536,x.lanes=O,T===Dy?x.flags|=16384:(g=x.updateQueue,g===null?x.updateQueue=new Set([T]):g.add(T),P5(p,T,O)),!1;case 22:return x.flags|=65536,T===Dy?x.flags|=16384:(g=x.updateQueue,g===null?(g={transitions:null,markerInstances:null,retryQueue:new Set([T])},x.updateQueue=g):(x=g.retryQueue,x===null?g.retryQueue=new Set([T]):x.add(T)),P5(p,T,O)),!1}throw Error(r(435,x.tag))}return P5(p,T,O),rv(),!1}if(Pn)return g=li.current,g!==null?((g.flags&65536)===0&&(g.flags|=256),g.flags|=65536,g.lanes=O,T!==OC&&(p=Error(r(422),{cause:T}),v1(_i(p,x)))):(T!==OC&&(g=Error(r(423),{cause:T}),v1(_i(g,x))),p=p.current.alternate,p.flags|=65536,O&=-O,p.lanes|=O,T=_i(T,x),O=m5(p.stateNode,T,O),qC(p,O),Yr!==4&&(Yr=2)),!1;var F=Error(r(520),{cause:T});if(F=_i(F,x),$1===null?$1=[F]:$1.push(F),Yr!==4&&(Yr=2),g===null)return!0;T=_i(T,x),x=g;do{switch(x.tag){case 3:return x.flags|=65536,p=O&-O,x.lanes|=p,p=m5(x.stateNode,T,p),qC(x,p),!1;case 1:if(g=x.type,F=x.stateNode,(x.flags&128)===0&&(typeof g.getDerivedStateFromError=="function"||F!==null&&typeof F.componentDidCatch=="function"&&(uu===null||!uu.has(F))))return x.flags|=65536,O&=-O,x.lanes|=O,O=QO(O),JO(O,p,x,T),qC(x,O),!1}x=x.return}while(x!==null);return!1}var g5=Error(r(461)),hs=!1;function Vs(p,g,x,T){g.child=p===null?rO(g,null,x,T):Zd(g,p.child,x,T)}function eN(p,g,x,T,O){x=x.render;var F=g.ref;if("ref"in T){var X={};for(var te in T)te!=="ref"&&(X[te]=T[te])}else X=T;return Yd(g),T=ZC(p,g,x,X,F,O),te=QC(),p!==null&&!hs?(JC(p,g,O),Gl(p,g,O)):(Pn&&te&&DC(g),g.flags|=1,Vs(p,g,T,O),g.child)}function tN(p,g,x,T,O){if(p===null){var F=x.type;return typeof F=="function"&&!AC(F)&&F.defaultProps===void 0&&x.compare===null?(g.tag=15,g.type=F,nN(p,g,F,T,O)):(p=Ty(x.type,null,T,g,g.mode,O),p.ref=g.ref,p.return=g,g.child=p)}if(F=p.child,!k5(p,O)){var X=F.memoizedProps;if(x=x.compare,x=x!==null?x:m1,x(X,T)&&p.ref===g.ref)return Gl(p,g,O)}return g.flags|=1,p=Hl(F,T),p.ref=g.ref,p.return=g,g.child=p}function nN(p,g,x,T,O){if(p!==null){var F=p.memoizedProps;if(m1(F,T)&&p.ref===g.ref)if(hs=!1,g.pendingProps=T=F,k5(p,O))(p.flags&131072)!==0&&(hs=!0);else return g.lanes=p.lanes,Gl(p,g,O)}return y5(p,g,x,T,O)}function rN(p,g,x,T){var O=T.children,F=p!==null?p.memoizedState:null;if(p===null&&g.stateNode===null&&(g.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),T.mode==="hidden"){if((g.flags&128)!==0){if(F=F!==null?F.baseLanes|x:x,p!==null){for(T=g.child=p.child,O=0;T!==null;)O=O|T.lanes|T.childLanes,T=T.sibling;T=O&~F}else T=0,g.child=null;return sN(p,g,F,x,T)}if((x&536870912)!==0)g.memoizedState={baseLanes:0,cachePool:null},p!==null&&_y(g,F!==null?F.cachePool:null),F!==null?iO(g,F):YC(),aO(g);else return T=g.lanes=536870912,sN(p,g,F!==null?F.baseLanes|x:x,x,T)}else F!==null?(_y(g,F.cachePool),iO(g,F),iu(),g.memoizedState=null):(p!==null&&_y(g,null),YC(),iu());return Vs(p,g,O,x),g.child}function _1(p,g){return p!==null&&p.tag===22||g.stateNode!==null||(g.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),g.sibling}function sN(p,g,x,T,O){var F=BC();return F=F===null?null:{parent:fs._currentValue,pool:F},g.memoizedState={baseLanes:x,cachePool:F},p!==null&&_y(g,null),YC(),aO(g),p!==null&&Ap(p,g,T,!0),g.childLanes=O,null}function Wy(p,g){return g=Gy({mode:g.mode,children:g.children},p.mode),g.ref=p.ref,p.child=g,g.return=p,g}function oN(p,g,x){return Zd(g,p.child,null,x),p=Wy(g,g.pendingProps),p.flags|=2,ci(g),g.memoizedState=null,p}function hle(p,g,x){var T=g.pendingProps,O=(g.flags&128)!==0;if(g.flags&=-129,p===null){if(Pn){if(T.mode==="hidden")return p=Wy(g,T),g.lanes=536870912,_1(null,p);if(KC(g),(p=jr)?(p=yL(p,Ii),p=p!==null&&p.data==="&"?p:null,p!==null&&(g.memoizedState={dehydrated:p,treeContext:Qc!==null?{id:Ga,overflow:Ka}:null,retryLane:536870912,hydrationErrors:null},x=HI(p),x.return=g,g.child=x,Hs=g,jr=null)):p=null,p===null)throw eu(g);return g.lanes=536870912,null}return Wy(g,T)}var F=p.memoizedState;if(F!==null){var X=F.dehydrated;if(KC(g),O)if(g.flags&256)g.flags&=-257,g=oN(p,g,x);else if(g.memoizedState!==null)g.child=p.child,g.flags|=128,g=null;else throw Error(r(558));else if(hs||Ap(p,g,x,!1),O=(x&p.childLanes)!==0,hs||O){if(T=gr,T!==null&&(X=ae(T,x),X!==0&&X!==F.retryLane))throw F.retryLane=X,Ud(p,X),qo(T,p,X),g5;rv(),g=oN(p,g,x)}else p=F.treeContext,jr=Ni(X.nextSibling),Hs=g,Pn=!0,Jc=null,Ii=!1,p!==null&&qI(g,p),g=Wy(g,T),g.flags|=4096;return g}return p=Hl(p.child,{mode:T.mode,children:T.children}),p.ref=g.ref,g.child=p,p.return=g,p}function Yy(p,g){var x=g.ref;if(x===null)p!==null&&p.ref!==null&&(g.flags|=4194816);else{if(typeof x!="function"&&typeof x!="object")throw Error(r(284));(p===null||p.ref!==x)&&(g.flags|=4194816)}}function y5(p,g,x,T,O){return Yd(g),x=ZC(p,g,x,T,void 0,O),T=QC(),p!==null&&!hs?(JC(p,g,O),Gl(p,g,O)):(Pn&&T&&DC(g),g.flags|=1,Vs(p,g,x,O),g.child)}function iN(p,g,x,T,O,F){return Yd(g),g.updateQueue=null,x=cO(g,T,x,O),lO(p),T=QC(),p!==null&&!hs?(JC(p,g,F),Gl(p,g,F)):(Pn&&T&&DC(g),g.flags|=1,Vs(p,g,x,F),g.child)}function aN(p,g,x,T,O){if(Yd(g),g.stateNode===null){var F=Ep,X=x.contextType;typeof X=="object"&&X!==null&&(F=Us(X)),F=new x(T,F),g.memoizedState=F.state!==null&&F.state!==void 0?F.state:null,F.updater=h5,g.stateNode=F,F._reactInternals=g,F=g.stateNode,F.props=T,F.state=g.memoizedState,F.refs={},UC(g),X=x.contextType,F.context=typeof X=="object"&&X!==null?Us(X):Ep,F.state=g.memoizedState,X=x.getDerivedStateFromProps,typeof X=="function"&&(p5(g,x,X,T),F.state=g.memoizedState),typeof x.getDerivedStateFromProps=="function"||typeof F.getSnapshotBeforeUpdate=="function"||typeof F.UNSAFE_componentWillMount!="function"&&typeof F.componentWillMount!="function"||(X=F.state,typeof F.componentWillMount=="function"&&F.componentWillMount(),typeof F.UNSAFE_componentWillMount=="function"&&F.UNSAFE_componentWillMount(),X!==F.state&&h5.enqueueReplaceState(F,F.state,null),E1(g,T,F,O),k1(),F.state=g.memoizedState),typeof F.componentDidMount=="function"&&(g.flags|=4194308),T=!0}else if(p===null){F=g.stateNode;var te=g.memoizedProps,he=Jd(x,te);F.props=he;var Ie=F.context,Xe=x.contextType;X=Ep,typeof Xe=="object"&&Xe!==null&&(X=Us(Xe));var it=x.getDerivedStateFromProps;Xe=typeof it=="function"||typeof F.getSnapshotBeforeUpdate=="function",te=g.pendingProps!==te,Xe||typeof F.UNSAFE_componentWillReceiveProps!="function"&&typeof F.componentWillReceiveProps!="function"||(te||Ie!==X)&&YO(g,F,T,X),nu=!1;var Oe=g.memoizedState;F.state=Oe,E1(g,T,F,O),k1(),Ie=g.memoizedState,te||Oe!==Ie||nu?(typeof it=="function"&&(p5(g,x,it,T),Ie=g.memoizedState),(he=nu||WO(g,x,he,T,Oe,Ie,X))?(Xe||typeof F.UNSAFE_componentWillMount!="function"&&typeof F.componentWillMount!="function"||(typeof F.componentWillMount=="function"&&F.componentWillMount(),typeof F.UNSAFE_componentWillMount=="function"&&F.UNSAFE_componentWillMount()),typeof F.componentDidMount=="function"&&(g.flags|=4194308)):(typeof F.componentDidMount=="function"&&(g.flags|=4194308),g.memoizedProps=T,g.memoizedState=Ie),F.props=T,F.state=Ie,F.context=X,T=he):(typeof F.componentDidMount=="function"&&(g.flags|=4194308),T=!1)}else{F=g.stateNode,VC(p,g),X=g.memoizedProps,Xe=Jd(x,X),F.props=Xe,it=g.pendingProps,Oe=F.context,Ie=x.contextType,he=Ep,typeof Ie=="object"&&Ie!==null&&(he=Us(Ie)),te=x.getDerivedStateFromProps,(Ie=typeof te=="function"||typeof F.getSnapshotBeforeUpdate=="function")||typeof F.UNSAFE_componentWillReceiveProps!="function"&&typeof F.componentWillReceiveProps!="function"||(X!==it||Oe!==he)&&YO(g,F,T,he),nu=!1,Oe=g.memoizedState,F.state=Oe,E1(g,T,F,O),k1();var Pe=g.memoizedState;X!==it||Oe!==Pe||nu||p!==null&&p.dependencies!==null&&jy(p.dependencies)?(typeof te=="function"&&(p5(g,x,te,T),Pe=g.memoizedState),(Xe=nu||WO(g,x,Xe,T,Oe,Pe,he)||p!==null&&p.dependencies!==null&&jy(p.dependencies))?(Ie||typeof F.UNSAFE_componentWillUpdate!="function"&&typeof F.componentWillUpdate!="function"||(typeof F.componentWillUpdate=="function"&&F.componentWillUpdate(T,Pe,he),typeof F.UNSAFE_componentWillUpdate=="function"&&F.UNSAFE_componentWillUpdate(T,Pe,he)),typeof F.componentDidUpdate=="function"&&(g.flags|=4),typeof F.getSnapshotBeforeUpdate=="function"&&(g.flags|=1024)):(typeof F.componentDidUpdate!="function"||X===p.memoizedProps&&Oe===p.memoizedState||(g.flags|=4),typeof F.getSnapshotBeforeUpdate!="function"||X===p.memoizedProps&&Oe===p.memoizedState||(g.flags|=1024),g.memoizedProps=T,g.memoizedState=Pe),F.props=T,F.state=Pe,F.context=he,T=Xe):(typeof F.componentDidUpdate!="function"||X===p.memoizedProps&&Oe===p.memoizedState||(g.flags|=4),typeof F.getSnapshotBeforeUpdate!="function"||X===p.memoizedProps&&Oe===p.memoizedState||(g.flags|=1024),T=!1)}return F=T,Yy(p,g),T=(g.flags&128)!==0,F||T?(F=g.stateNode,x=T&&typeof x.getDerivedStateFromError!="function"?null:F.render(),g.flags|=1,p!==null&&T?(g.child=Zd(g,p.child,null,O),g.child=Zd(g,null,x,O)):Vs(p,g,x,O),g.memoizedState=F.state,p=g.child):p=Gl(p,g,O),p}function lN(p,g,x,T){return qd(),g.flags|=256,Vs(p,g,x,T),g.child}var v5={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function b5(p){return{baseLanes:p,cachePool:ZI()}}function x5(p,g,x){return p=p!==null?p.childLanes&~x:0,g&&(p|=di),p}function cN(p,g,x){var T=g.pendingProps,O=!1,F=(g.flags&128)!==0,X;if((X=F)||(X=p!==null&&p.memoizedState===null?!1:(ns.current&2)!==0),X&&(O=!0,g.flags&=-129),X=(g.flags&32)!==0,g.flags&=-33,p===null){if(Pn){if(O?ou(g):iu(),(p=jr)?(p=yL(p,Ii),p=p!==null&&p.data!=="&"?p:null,p!==null&&(g.memoizedState={dehydrated:p,treeContext:Qc!==null?{id:Ga,overflow:Ka}:null,retryLane:536870912,hydrationErrors:null},x=HI(p),x.return=g,g.child=x,Hs=g,jr=null)):p=null,p===null)throw eu(g);return n6(p)?g.lanes=32:g.lanes=536870912,null}var te=T.children;return T=T.fallback,O?(iu(),O=g.mode,te=Gy({mode:"hidden",children:te},O),T=Vd(T,O,x,null),te.return=g,T.return=g,te.sibling=T,g.child=te,T=g.child,T.memoizedState=b5(x),T.childLanes=x5(p,X,x),g.memoizedState=v5,_1(null,T)):(ou(g),w5(g,te))}var he=p.memoizedState;if(he!==null&&(te=he.dehydrated,te!==null)){if(F)g.flags&256?(ou(g),g.flags&=-257,g=S5(p,g,x)):g.memoizedState!==null?(iu(),g.child=p.child,g.flags|=128,g=null):(iu(),te=T.fallback,O=g.mode,T=Gy({mode:"visible",children:T.children},O),te=Vd(te,O,x,null),te.flags|=2,T.return=g,te.return=g,T.sibling=te,g.child=T,Zd(g,p.child,null,x),T=g.child,T.memoizedState=b5(x),T.childLanes=x5(p,X,x),g.memoizedState=v5,g=_1(null,T));else if(ou(g),n6(te)){if(X=te.nextSibling&&te.nextSibling.dataset,X)var Ie=X.dgst;X=Ie,T=Error(r(419)),T.stack="",T.digest=X,v1({value:T,source:null,stack:null}),g=S5(p,g,x)}else if(hs||Ap(p,g,x,!1),X=(x&p.childLanes)!==0,hs||X){if(X=gr,X!==null&&(T=ae(X,x),T!==0&&T!==he.retryLane))throw he.retryLane=T,Ud(p,T),qo(X,p,T),g5;t6(te)||rv(),g=S5(p,g,x)}else t6(te)?(g.flags|=192,g.child=p.child,g=null):(p=he.treeContext,jr=Ni(te.nextSibling),Hs=g,Pn=!0,Jc=null,Ii=!1,p!==null&&qI(g,p),g=w5(g,T.children),g.flags|=4096);return g}return O?(iu(),te=T.fallback,O=g.mode,he=p.child,Ie=he.sibling,T=Hl(he,{mode:"hidden",children:T.children}),T.subtreeFlags=he.subtreeFlags&65011712,Ie!==null?te=Hl(Ie,te):(te=Vd(te,O,x,null),te.flags|=2),te.return=g,T.return=g,T.sibling=te,g.child=T,_1(null,T),T=g.child,te=p.child.memoizedState,te===null?te=b5(x):(O=te.cachePool,O!==null?(he=fs._currentValue,O=O.parent!==he?{parent:he,pool:he}:O):O=ZI(),te={baseLanes:te.baseLanes|x,cachePool:O}),T.memoizedState=te,T.childLanes=x5(p,X,x),g.memoizedState=v5,_1(p.child,T)):(ou(g),x=p.child,p=x.sibling,x=Hl(x,{mode:"visible",children:T.children}),x.return=g,x.sibling=null,p!==null&&(X=g.deletions,X===null?(g.deletions=[p],g.flags|=16):X.push(p)),g.child=x,g.memoizedState=null,x)}function w5(p,g){return g=Gy({mode:"visible",children:g},p.mode),g.return=p,p.child=g}function Gy(p,g){return p=ai(22,p,null,g),p.lanes=0,p}function S5(p,g,x){return Zd(g,p.child,null,x),p=w5(g,g.pendingProps.children),p.flags|=2,g.memoizedState=null,p}function uN(p,g,x){p.lanes|=g;var T=p.alternate;T!==null&&(T.lanes|=g),$C(p.return,g,x)}function C5(p,g,x,T,O,F){var X=p.memoizedState;X===null?p.memoizedState={isBackwards:g,rendering:null,renderingStartTime:0,last:T,tail:x,tailMode:O,treeForkCount:F}:(X.isBackwards=g,X.rendering=null,X.renderingStartTime=0,X.last=T,X.tail=x,X.tailMode=O,X.treeForkCount=F)}function dN(p,g,x){var T=g.pendingProps,O=T.revealOrder,F=T.tail;T=T.children;var X=ns.current,te=(X&2)!==0;if(te?(X=X&1|2,g.flags|=128):X&=1,Y(ns,X),Vs(p,g,T,x),T=Pn?y1:0,!te&&p!==null&&(p.flags&128)!==0)e:for(p=g.child;p!==null;){if(p.tag===13)p.memoizedState!==null&&uN(p,x,g);else if(p.tag===19)uN(p,x,g);else if(p.child!==null){p.child.return=p,p=p.child;continue}if(p===g)break e;for(;p.sibling===null;){if(p.return===null||p.return===g)break e;p=p.return}p.sibling.return=p.return,p=p.sibling}switch(O){case"forwards":for(x=g.child,O=null;x!==null;)p=x.alternate,p!==null&&Ly(p)===null&&(O=x),x=x.sibling;x=O,x===null?(O=g.child,g.child=null):(O=x.sibling,x.sibling=null),C5(g,!1,O,x,F,T);break;case"backwards":case"unstable_legacy-backwards":for(x=null,O=g.child,g.child=null;O!==null;){if(p=O.alternate,p!==null&&Ly(p)===null){g.child=O;break}p=O.sibling,O.sibling=x,x=O,O=p}C5(g,!0,x,null,F,T);break;case"together":C5(g,!1,null,null,void 0,T);break;default:g.memoizedState=null}return g.child}function Gl(p,g,x){if(p!==null&&(g.dependencies=p.dependencies),cu|=g.lanes,(x&g.childLanes)===0)if(p!==null){if(Ap(p,g,x,!1),(x&g.childLanes)===0)return null}else return null;if(p!==null&&g.child!==p.child)throw Error(r(153));if(g.child!==null){for(p=g.child,x=Hl(p,p.pendingProps),g.child=x,x.return=g;p.sibling!==null;)p=p.sibling,x=x.sibling=Hl(p,p.pendingProps),x.return=g;x.sibling=null}return g.child}function k5(p,g){return(p.lanes&g)!==0?!0:(p=p.dependencies,!!(p!==null&&jy(p)))}function mle(p,g,x){switch(g.tag){case 3:J(g,g.stateNode.containerInfo),tu(g,fs,p.memoizedState.cache),qd();break;case 27:case 5:se(g);break;case 4:J(g,g.stateNode.containerInfo);break;case 10:tu(g,g.type,g.memoizedProps.value);break;case 31:if(g.memoizedState!==null)return g.flags|=128,KC(g),null;break;case 13:var T=g.memoizedState;if(T!==null)return T.dehydrated!==null?(ou(g),g.flags|=128,null):(x&g.child.childLanes)!==0?cN(p,g,x):(ou(g),p=Gl(p,g,x),p!==null?p.sibling:null);ou(g);break;case 19:var O=(p.flags&128)!==0;if(T=(x&g.childLanes)!==0,T||(Ap(p,g,x,!1),T=(x&g.childLanes)!==0),O){if(T)return dN(p,g,x);g.flags|=128}if(O=g.memoizedState,O!==null&&(O.rendering=null,O.tail=null,O.lastEffect=null),Y(ns,ns.current),T)break;return null;case 22:return g.lanes=0,rN(p,g,x,g.pendingProps);case 24:tu(g,fs,p.memoizedState.cache)}return Gl(p,g,x)}function fN(p,g,x){if(p!==null)if(p.memoizedProps!==g.pendingProps)hs=!0;else{if(!k5(p,x)&&(g.flags&128)===0)return hs=!1,mle(p,g,x);hs=(p.flags&131072)!==0}else hs=!1,Pn&&(g.flags&1048576)!==0&&VI(g,y1,g.index);switch(g.lanes=0,g.tag){case 16:e:{var T=g.pendingProps;if(p=Kd(g.elementType),g.type=p,typeof p=="function")AC(p)?(T=Jd(p,T),g.tag=1,g=aN(null,g,p,T,x)):(g.tag=0,g=y5(null,g,p,T,x));else{if(p!=null){var O=p.$$typeof;if(O===E){g.tag=11,g=eN(null,g,p,T,x);break e}else if(O===M){g.tag=14,g=tN(null,g,p,T,x);break e}}throw g=L(p)||p,Error(r(306,g,""))}}return g;case 0:return y5(p,g,g.type,g.pendingProps,x);case 1:return T=g.type,O=Jd(T,g.pendingProps),aN(p,g,T,O,x);case 3:e:{if(J(g,g.stateNode.containerInfo),p===null)throw Error(r(387));T=g.pendingProps;var F=g.memoizedState;O=F.element,VC(p,g),E1(g,T,null,x);var X=g.memoizedState;if(T=X.cache,tu(g,fs,T),T!==F.cache&&FC(g,[fs],x,!0),k1(),T=X.element,F.isDehydrated)if(F={element:T,isDehydrated:!1,cache:X.cache},g.updateQueue.baseState=F,g.memoizedState=F,g.flags&256){g=lN(p,g,T,x);break e}else if(T!==O){O=_i(Error(r(424)),g),v1(O),g=lN(p,g,T,x);break e}else{switch(p=g.stateNode.containerInfo,p.nodeType){case 9:p=p.body;break;default:p=p.nodeName==="HTML"?p.ownerDocument.body:p}for(jr=Ni(p.firstChild),Hs=g,Pn=!0,Jc=null,Ii=!0,x=rO(g,null,T,x),g.child=x;x;)x.flags=x.flags&-3|4096,x=x.sibling}else{if(qd(),T===O){g=Gl(p,g,x);break e}Vs(p,g,T,x)}g=g.child}return g;case 26:return Yy(p,g),p===null?(x=CL(g.type,null,g.pendingProps,null))?g.memoizedState=x:Pn||(x=g.type,p=g.pendingProps,T=uv(Q.current).createElement(x),T[rt]=g,T[st]=p,qs(T,x,p),nn(T),g.stateNode=T):g.memoizedState=CL(g.type,p.memoizedProps,g.pendingProps,p.memoizedState),null;case 27:return se(g),p===null&&Pn&&(T=g.stateNode=xL(g.type,g.pendingProps,Q.current),Hs=g,Ii=!0,O=jr,hu(g.type)?(r6=O,jr=Ni(T.firstChild)):jr=O),Vs(p,g,g.pendingProps.children,x),Yy(p,g),p===null&&(g.flags|=4194304),g.child;case 5:return p===null&&Pn&&((O=T=jr)&&(T=qle(T,g.type,g.pendingProps,Ii),T!==null?(g.stateNode=T,Hs=g,jr=Ni(T.firstChild),Ii=!1,O=!0):O=!1),O||eu(g)),se(g),O=g.type,F=g.pendingProps,X=p!==null?p.memoizedProps:null,T=F.children,Q5(O,F)?T=null:X!==null&&Q5(O,X)&&(g.flags|=32),g.memoizedState!==null&&(O=ZC(p,g,ile,null,null,x),q1._currentValue=O),Yy(p,g),Vs(p,g,T,x),g.child;case 6:return p===null&&Pn&&((p=x=jr)&&(x=Wle(x,g.pendingProps,Ii),x!==null?(g.stateNode=x,Hs=g,jr=null,p=!0):p=!1),p||eu(g)),null;case 13:return cN(p,g,x);case 4:return J(g,g.stateNode.containerInfo),T=g.pendingProps,p===null?g.child=Zd(g,null,T,x):Vs(p,g,T,x),g.child;case 11:return eN(p,g,g.type,g.pendingProps,x);case 7:return Vs(p,g,g.pendingProps,x),g.child;case 8:return Vs(p,g,g.pendingProps.children,x),g.child;case 12:return Vs(p,g,g.pendingProps.children,x),g.child;case 10:return T=g.pendingProps,tu(g,g.type,T.value),Vs(p,g,T.children,x),g.child;case 9:return O=g.type._context,T=g.pendingProps.children,Yd(g),O=Us(O),T=T(O),g.flags|=1,Vs(p,g,T,x),g.child;case 14:return tN(p,g,g.type,g.pendingProps,x);case 15:return nN(p,g,g.type,g.pendingProps,x);case 19:return dN(p,g,x);case 31:return hle(p,g,x);case 22:return rN(p,g,x,g.pendingProps);case 24:return Yd(g),T=Us(fs),p===null?(O=BC(),O===null&&(O=gr,F=zC(),O.pooledCache=F,F.refCount++,F!==null&&(O.pooledCacheLanes|=x),O=F),g.memoizedState={parent:T,cache:O},UC(g),tu(g,fs,O)):((p.lanes&x)!==0&&(VC(p,g),E1(g,null,null,x),k1()),O=p.memoizedState,F=g.memoizedState,O.parent!==T?(O={parent:T,cache:T},g.memoizedState=O,g.lanes===0&&(g.memoizedState=g.updateQueue.baseState=O),tu(g,fs,T)):(T=F.cache,tu(g,fs,T),T!==O.cache&&FC(g,[fs],x,!0))),Vs(p,g,g.pendingProps.children,x),g.child;case 29:throw g.pendingProps}throw Error(r(156,g.tag))}function Kl(p){p.flags|=4}function E5(p,g,x,T,O){if((g=(p.mode&32)!==0)&&(g=!1),g){if(p.flags|=16777216,(O&335544128)===O)if(p.stateNode.complete)p.flags|=8192;else if(zN())p.flags|=8192;else throw Xd=Dy,HC}else p.flags&=-16777217}function pN(p,g){if(g.type!=="stylesheet"||(g.state.loading&4)!==0)p.flags&=-16777217;else if(p.flags|=16777216,!jL(g))if(zN())p.flags|=8192;else throw Xd=Dy,HC}function Ky(p,g){g!==null&&(p.flags|=4),p.flags&16384&&(g=p.tag!==22?Ht():536870912,p.lanes|=g,Bp|=g)}function R1(p,g){if(!Pn)switch(p.tailMode){case"hidden":g=p.tail;for(var x=null;g!==null;)g.alternate!==null&&(x=g),g=g.sibling;x===null?p.tail=null:x.sibling=null;break;case"collapsed":x=p.tail;for(var T=null;x!==null;)x.alternate!==null&&(T=x),x=x.sibling;T===null?g||p.tail===null?p.tail=null:p.tail.sibling=null:T.sibling=null}}function Ar(p){var g=p.alternate!==null&&p.alternate.child===p.child,x=0,T=0;if(g)for(var O=p.child;O!==null;)x|=O.lanes|O.childLanes,T|=O.subtreeFlags&65011712,T|=O.flags&65011712,O.return=p,O=O.sibling;else for(O=p.child;O!==null;)x|=O.lanes|O.childLanes,T|=O.subtreeFlags,T|=O.flags,O.return=p,O=O.sibling;return p.subtreeFlags|=T,p.childLanes=x,g}function gle(p,g,x){var T=g.pendingProps;switch(IC(g),g.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ar(g),null;case 1:return Ar(g),null;case 3:return x=g.stateNode,T=null,p!==null&&(T=p.memoizedState.cache),g.memoizedState.cache!==T&&(g.flags|=2048),ql(fs),ne(),x.pendingContext&&(x.context=x.pendingContext,x.pendingContext=null),(p===null||p.child===null)&&(jp(g)?Kl(g):p===null||p.memoizedState.isDehydrated&&(g.flags&256)===0||(g.flags|=1024,NC())),Ar(g),null;case 26:var O=g.type,F=g.memoizedState;return p===null?(Kl(g),F!==null?(Ar(g),pN(g,F)):(Ar(g),E5(g,O,null,T,x))):F?F!==p.memoizedState?(Kl(g),Ar(g),pN(g,F)):(Ar(g),g.flags&=-16777217):(p=p.memoizedProps,p!==T&&Kl(g),Ar(g),E5(g,O,p,T,x)),null;case 27:if(ce(g),x=Q.current,O=g.type,p!==null&&g.stateNode!=null)p.memoizedProps!==T&&Kl(g);else{if(!T){if(g.stateNode===null)throw Error(r(166));return Ar(g),null}p=G.current,jp(g)?WI(g):(p=xL(O,T,x),g.stateNode=p,Kl(g))}return Ar(g),null;case 5:if(ce(g),O=g.type,p!==null&&g.stateNode!=null)p.memoizedProps!==T&&Kl(g);else{if(!T){if(g.stateNode===null)throw Error(r(166));return Ar(g),null}if(F=G.current,jp(g))WI(g);else{var X=uv(Q.current);switch(F){case 1:F=X.createElementNS("http://www.w3.org/2000/svg",O);break;case 2:F=X.createElementNS("http://www.w3.org/1998/Math/MathML",O);break;default:switch(O){case"svg":F=X.createElementNS("http://www.w3.org/2000/svg",O);break;case"math":F=X.createElementNS("http://www.w3.org/1998/Math/MathML",O);break;case"script":F=X.createElement("div"),F.innerHTML="<script><\/script>",F=F.removeChild(F.firstChild);break;case"select":F=typeof T.is=="string"?X.createElement("select",{is:T.is}):X.createElement("select"),T.multiple?F.multiple=!0:T.size&&(F.size=T.size);break;default:F=typeof T.is=="string"?X.createElement(O,{is:T.is}):X.createElement(O)}}F[rt]=g,F[st]=T;e:for(X=g.child;X!==null;){if(X.tag===5||X.tag===6)F.appendChild(X.stateNode);else if(X.tag!==4&&X.tag!==27&&X.child!==null){X.child.return=X,X=X.child;continue}if(X===g)break e;for(;X.sibling===null;){if(X.return===null||X.return===g)break e;X=X.return}X.sibling.return=X.return,X=X.sibling}g.stateNode=F;e:switch(qs(F,O,T),O){case"button":case"input":case"select":case"textarea":T=!!T.autoFocus;break e;case"img":T=!0;break e;default:T=!1}T&&Kl(g)}}return Ar(g),E5(g,g.type,p===null?null:p.memoizedProps,g.pendingProps,x),null;case 6:if(p&&g.stateNode!=null)p.memoizedProps!==T&&Kl(g);else{if(typeof T!="string"&&g.stateNode===null)throw Error(r(166));if(p=Q.current,jp(g)){if(p=g.stateNode,x=g.memoizedProps,T=null,O=Hs,O!==null)switch(O.tag){case 27:case 5:T=O.memoizedProps}p[rt]=g,p=!!(p.nodeValue===x||T!==null&&T.suppressHydrationWarning===!0||cL(p.nodeValue,x)),p||eu(g,!0)}else p=uv(p).createTextNode(T),p[rt]=g,g.stateNode=p}return Ar(g),null;case 31:if(x=g.memoizedState,p===null||p.memoizedState!==null){if(T=jp(g),x!==null){if(p===null){if(!T)throw Error(r(318));if(p=g.memoizedState,p=p!==null?p.dehydrated:null,!p)throw Error(r(557));p[rt]=g}else qd(),(g.flags&128)===0&&(g.memoizedState=null),g.flags|=4;Ar(g),p=!1}else x=NC(),p!==null&&p.memoizedState!==null&&(p.memoizedState.hydrationErrors=x),p=!0;if(!p)return g.flags&256?(ci(g),g):(ci(g),null);if((g.flags&128)!==0)throw Error(r(558))}return Ar(g),null;case 13:if(T=g.memoizedState,p===null||p.memoizedState!==null&&p.memoizedState.dehydrated!==null){if(O=jp(g),T!==null&&T.dehydrated!==null){if(p===null){if(!O)throw Error(r(318));if(O=g.memoizedState,O=O!==null?O.dehydrated:null,!O)throw Error(r(317));O[rt]=g}else qd(),(g.flags&128)===0&&(g.memoizedState=null),g.flags|=4;Ar(g),O=!1}else O=NC(),p!==null&&p.memoizedState!==null&&(p.memoizedState.hydrationErrors=O),O=!0;if(!O)return g.flags&256?(ci(g),g):(ci(g),null)}return ci(g),(g.flags&128)!==0?(g.lanes=x,g):(x=T!==null,p=p!==null&&p.memoizedState!==null,x&&(T=g.child,O=null,T.alternate!==null&&T.alternate.memoizedState!==null&&T.alternate.memoizedState.cachePool!==null&&(O=T.alternate.memoizedState.cachePool.pool),F=null,T.memoizedState!==null&&T.memoizedState.cachePool!==null&&(F=T.memoizedState.cachePool.pool),F!==O&&(T.flags|=2048)),x!==p&&x&&(g.child.flags|=8192),Ky(g,g.updateQueue),Ar(g),null);case 4:return ne(),p===null&&Y5(g.stateNode.containerInfo),Ar(g),null;case 10:return ql(g.type),Ar(g),null;case 19:if(W(ns),T=g.memoizedState,T===null)return Ar(g),null;if(O=(g.flags&128)!==0,F=T.rendering,F===null)if(O)R1(T,!1);else{if(Yr!==0||p!==null&&(p.flags&128)!==0)for(p=g.child;p!==null;){if(F=Ly(p),F!==null){for(g.flags|=128,R1(T,!1),p=F.updateQueue,g.updateQueue=p,Ky(g,p),g.subtreeFlags=0,p=x,x=g.child;x!==null;)BI(x,p),x=x.sibling;return Y(ns,ns.current&1|2),Pn&&Ul(g,T.treeForkCount),g.child}p=p.sibling}T.tail!==null&&Ye()>ev&&(g.flags|=128,O=!0,R1(T,!1),g.lanes=4194304)}else{if(!O)if(p=Ly(F),p!==null){if(g.flags|=128,O=!0,p=p.updateQueue,g.updateQueue=p,Ky(g,p),R1(T,!0),T.tail===null&&T.tailMode==="hidden"&&!F.alternate&&!Pn)return Ar(g),null}else 2*Ye()-T.renderingStartTime>ev&&x!==536870912&&(g.flags|=128,O=!0,R1(T,!1),g.lanes=4194304);T.isBackwards?(F.sibling=g.child,g.child=F):(p=T.last,p!==null?p.sibling=F:g.child=F,T.last=F)}return T.tail!==null?(p=T.tail,T.rendering=p,T.tail=p.sibling,T.renderingStartTime=Ye(),p.sibling=null,x=ns.current,Y(ns,O?x&1|2:x&1),Pn&&Ul(g,T.treeForkCount),p):(Ar(g),null);case 22:case 23:return ci(g),GC(),T=g.memoizedState!==null,p!==null?p.memoizedState!==null!==T&&(g.flags|=8192):T&&(g.flags|=8192),T?(x&536870912)!==0&&(g.flags&128)===0&&(Ar(g),g.subtreeFlags&6&&(g.flags|=8192)):Ar(g),x=g.updateQueue,x!==null&&Ky(g,x.retryQueue),x=null,p!==null&&p.memoizedState!==null&&p.memoizedState.cachePool!==null&&(x=p.memoizedState.cachePool.pool),T=null,g.memoizedState!==null&&g.memoizedState.cachePool!==null&&(T=g.memoizedState.cachePool.pool),T!==x&&(g.flags|=2048),p!==null&&W(Gd),null;case 24:return x=null,p!==null&&(x=p.memoizedState.cache),g.memoizedState.cache!==x&&(g.flags|=2048),ql(fs),Ar(g),null;case 25:return null;case 30:return null}throw Error(r(156,g.tag))}function yle(p,g){switch(IC(g),g.tag){case 1:return p=g.flags,p&65536?(g.flags=p&-65537|128,g):null;case 3:return ql(fs),ne(),p=g.flags,(p&65536)!==0&&(p&128)===0?(g.flags=p&-65537|128,g):null;case 26:case 27:case 5:return ce(g),null;case 31:if(g.memoizedState!==null){if(ci(g),g.alternate===null)throw Error(r(340));qd()}return p=g.flags,p&65536?(g.flags=p&-65537|128,g):null;case 13:if(ci(g),p=g.memoizedState,p!==null&&p.dehydrated!==null){if(g.alternate===null)throw Error(r(340));qd()}return p=g.flags,p&65536?(g.flags=p&-65537|128,g):null;case 19:return W(ns),null;case 4:return ne(),null;case 10:return ql(g.type),null;case 22:case 23:return ci(g),GC(),p!==null&&W(Gd),p=g.flags,p&65536?(g.flags=p&-65537|128,g):null;case 24:return ql(fs),null;case 25:return null;default:return null}}function hN(p,g){switch(IC(g),g.tag){case 3:ql(fs),ne();break;case 26:case 27:case 5:ce(g);break;case 4:ne();break;case 31:g.memoizedState!==null&&ci(g);break;case 13:ci(g);break;case 19:W(ns);break;case 10:ql(g.type);break;case 22:case 23:ci(g),GC(),p!==null&&W(Gd);break;case 24:ql(fs)}}function D1(p,g){try{var x=g.updateQueue,T=x!==null?x.lastEffect:null;if(T!==null){var O=T.next;x=O;do{if((x.tag&p)===p){T=void 0;var F=x.create,X=x.inst;T=F(),X.destroy=T}x=x.next}while(x!==O)}}catch(te){ar(g,g.return,te)}}function au(p,g,x){try{var T=g.updateQueue,O=T!==null?T.lastEffect:null;if(O!==null){var F=O.next;T=F;do{if((T.tag&p)===p){var X=T.inst,te=X.destroy;if(te!==void 0){X.destroy=void 0,O=g;var he=x,Ie=te;try{Ie()}catch(Xe){ar(O,he,Xe)}}}T=T.next}while(T!==F)}}catch(Xe){ar(g,g.return,Xe)}}function mN(p){var g=p.updateQueue;if(g!==null){var x=p.stateNode;try{oO(g,x)}catch(T){ar(p,p.return,T)}}}function gN(p,g,x){x.props=Jd(p.type,p.memoizedProps),x.state=p.memoizedState;try{x.componentWillUnmount()}catch(T){ar(p,g,T)}}function I1(p,g){try{var x=p.ref;if(x!==null){switch(p.tag){case 26:case 27:case 5:var T=p.stateNode;break;case 30:T=p.stateNode;break;default:T=p.stateNode}typeof x=="function"?p.refCleanup=x(T):x.current=T}}catch(O){ar(p,g,O)}}function Xa(p,g){var x=p.ref,T=p.refCleanup;if(x!==null)if(typeof T=="function")try{T()}catch(O){ar(p,g,O)}finally{p.refCleanup=null,p=p.alternate,p!=null&&(p.refCleanup=null)}else if(typeof x=="function")try{x(null)}catch(O){ar(p,g,O)}else x.current=null}function yN(p){var g=p.type,x=p.memoizedProps,T=p.stateNode;try{e:switch(g){case"button":case"input":case"select":case"textarea":x.autoFocus&&T.focus();break e;case"img":x.src?T.src=x.src:x.srcSet&&(T.srcset=x.srcSet)}}catch(O){ar(p,p.return,O)}}function T5(p,g,x){try{var T=p.stateNode;zle(T,p.type,x,g),T[st]=g}catch(O){ar(p,p.return,O)}}function vN(p){return p.tag===5||p.tag===3||p.tag===26||p.tag===27&&hu(p.type)||p.tag===4}function M5(p){e:for(;;){for(;p.sibling===null;){if(p.return===null||vN(p.return))return null;p=p.return}for(p.sibling.return=p.return,p=p.sibling;p.tag!==5&&p.tag!==6&&p.tag!==18;){if(p.tag===27&&hu(p.type)||p.flags&2||p.child===null||p.tag===4)continue e;p.child.return=p,p=p.child}if(!(p.flags&2))return p.stateNode}}function j5(p,g,x){var T=p.tag;if(T===5||T===6)p=p.stateNode,g?(x.nodeType===9?x.body:x.nodeName==="HTML"?x.ownerDocument.body:x).insertBefore(p,g):(g=x.nodeType===9?x.body:x.nodeName==="HTML"?x.ownerDocument.body:x,g.appendChild(p),x=x._reactRootContainer,x!=null||g.onclick!==null||(g.onclick=or));else if(T!==4&&(T===27&&hu(p.type)&&(x=p.stateNode,g=null),p=p.child,p!==null))for(j5(p,g,x),p=p.sibling;p!==null;)j5(p,g,x),p=p.sibling}function Xy(p,g,x){var T=p.tag;if(T===5||T===6)p=p.stateNode,g?x.insertBefore(p,g):x.appendChild(p);else if(T!==4&&(T===27&&hu(p.type)&&(x=p.stateNode),p=p.child,p!==null))for(Xy(p,g,x),p=p.sibling;p!==null;)Xy(p,g,x),p=p.sibling}function bN(p){var g=p.stateNode,x=p.memoizedProps;try{for(var T=p.type,O=g.attributes;O.length;)g.removeAttributeNode(O[0]);qs(g,T,x),g[rt]=p,g[st]=x}catch(F){ar(p,p.return,F)}}var Xl=!1,ms=!1,A5=!1,xN=typeof WeakSet=="function"?WeakSet:Set,Ds=null;function vle(p,g){if(p=p.containerInfo,X5=yv,p=DI(p),SC(p)){if("selectionStart"in p)var x={start:p.selectionStart,end:p.selectionEnd};else e:{x=(x=p.ownerDocument)&&x.defaultView||window;var T=x.getSelection&&x.getSelection();if(T&&T.rangeCount!==0){x=T.anchorNode;var O=T.anchorOffset,F=T.focusNode;T=T.focusOffset;try{x.nodeType,F.nodeType}catch{x=null;break e}var X=0,te=-1,he=-1,Ie=0,Xe=0,it=p,Oe=null;t:for(;;){for(var Pe;it!==x||O!==0&&it.nodeType!==3||(te=X+O),it!==F||T!==0&&it.nodeType!==3||(he=X+T),it.nodeType===3&&(X+=it.nodeValue.length),(Pe=it.firstChild)!==null;)Oe=it,it=Pe;for(;;){if(it===p)break t;if(Oe===x&&++Ie===O&&(te=X),Oe===F&&++Xe===T&&(he=X),(Pe=it.nextSibling)!==null)break;it=Oe,Oe=it.parentNode}it=Pe}x=te===-1||he===-1?null:{start:te,end:he}}else x=null}x=x||{start:0,end:0}}else x=null;for(Z5={focusedElem:p,selectionRange:x},yv=!1,Ds=g;Ds!==null;)if(g=Ds,p=g.child,(g.subtreeFlags&1028)!==0&&p!==null)p.return=g,Ds=p;else for(;Ds!==null;){switch(g=Ds,F=g.alternate,p=g.flags,g.tag){case 0:if((p&4)!==0&&(p=g.updateQueue,p=p!==null?p.events:null,p!==null))for(x=0;x<p.length;x++)O=p[x],O.ref.impl=O.nextImpl;break;case 11:case 15:break;case 1:if((p&1024)!==0&&F!==null){p=void 0,x=g,O=F.memoizedProps,F=F.memoizedState,T=x.stateNode;try{var Wt=Jd(x.type,O);p=T.getSnapshotBeforeUpdate(Wt,F),T.__reactInternalSnapshotBeforeUpdate=p}catch(fn){ar(x,x.return,fn)}}break;case 3:if((p&1024)!==0){if(p=g.stateNode.containerInfo,x=p.nodeType,x===9)e6(p);else if(x===1)switch(p.nodeName){case"HEAD":case"HTML":case"BODY":e6(p);break;default:p.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((p&1024)!==0)throw Error(r(163))}if(p=g.sibling,p!==null){p.return=g.return,Ds=p;break}Ds=g.return}}function wN(p,g,x){var T=x.flags;switch(x.tag){case 0:case 11:case 15:Ql(p,x),T&4&&D1(5,x);break;case 1:if(Ql(p,x),T&4)if(p=x.stateNode,g===null)try{p.componentDidMount()}catch(X){ar(x,x.return,X)}else{var O=Jd(x.type,g.memoizedProps);g=g.memoizedState;try{p.componentDidUpdate(O,g,p.__reactInternalSnapshotBeforeUpdate)}catch(X){ar(x,x.return,X)}}T&64&&mN(x),T&512&&I1(x,x.return);break;case 3:if(Ql(p,x),T&64&&(p=x.updateQueue,p!==null)){if(g=null,x.child!==null)switch(x.child.tag){case 27:case 5:g=x.child.stateNode;break;case 1:g=x.child.stateNode}try{oO(p,g)}catch(X){ar(x,x.return,X)}}break;case 27:g===null&&T&4&&bN(x);case 26:case 5:Ql(p,x),g===null&&T&4&&yN(x),T&512&&I1(x,x.return);break;case 12:Ql(p,x);break;case 31:Ql(p,x),T&4&&kN(p,x);break;case 13:Ql(p,x),T&4&&EN(p,x),T&64&&(p=x.memoizedState,p!==null&&(p=p.dehydrated,p!==null&&(x=Mle.bind(null,x),Yle(p,x))));break;case 22:if(T=x.memoizedState!==null||Xl,!T){g=g!==null&&g.memoizedState!==null||ms,O=Xl;var F=ms;Xl=T,(ms=g)&&!F?Jl(p,x,(x.subtreeFlags&8772)!==0):Ql(p,x),Xl=O,ms=F}break;case 30:break;default:Ql(p,x)}}function SN(p){var g=p.alternate;g!==null&&(p.alternate=null,SN(g)),p.child=null,p.deletions=null,p.sibling=null,p.tag===5&&(g=p.stateNode,g!==null&&oe(g)),p.stateNode=null,p.return=null,p.dependencies=null,p.memoizedProps=null,p.memoizedState=null,p.pendingProps=null,p.stateNode=null,p.updateQueue=null}var Nr=null,Bo=!1;function Zl(p,g,x){for(x=x.child;x!==null;)CN(p,g,x),x=x.sibling}function CN(p,g,x){if(at&&typeof at.onCommitFiberUnmount=="function")try{at.onCommitFiberUnmount(Pt,x)}catch{}switch(x.tag){case 26:ms||Xa(x,g),Zl(p,g,x),x.memoizedState?x.memoizedState.count--:x.stateNode&&(x=x.stateNode,x.parentNode.removeChild(x));break;case 27:ms||Xa(x,g);var T=Nr,O=Bo;hu(x.type)&&(Nr=x.stateNode,Bo=!1),Zl(p,g,x),H1(x.stateNode),Nr=T,Bo=O;break;case 5:ms||Xa(x,g);case 6:if(T=Nr,O=Bo,Nr=null,Zl(p,g,x),Nr=T,Bo=O,Nr!==null)if(Bo)try{(Nr.nodeType===9?Nr.body:Nr.nodeName==="HTML"?Nr.ownerDocument.body:Nr).removeChild(x.stateNode)}catch(F){ar(x,g,F)}else try{Nr.removeChild(x.stateNode)}catch(F){ar(x,g,F)}break;case 18:Nr!==null&&(Bo?(p=Nr,mL(p.nodeType===9?p.body:p.nodeName==="HTML"?p.ownerDocument.body:p,x.stateNode),Kp(p)):mL(Nr,x.stateNode));break;case 4:T=Nr,O=Bo,Nr=x.stateNode.containerInfo,Bo=!0,Zl(p,g,x),Nr=T,Bo=O;break;case 0:case 11:case 14:case 15:au(2,x,g),ms||au(4,x,g),Zl(p,g,x);break;case 1:ms||(Xa(x,g),T=x.stateNode,typeof T.componentWillUnmount=="function"&&gN(x,g,T)),Zl(p,g,x);break;case 21:Zl(p,g,x);break;case 22:ms=(T=ms)||x.memoizedState!==null,Zl(p,g,x),ms=T;break;default:Zl(p,g,x)}}function kN(p,g){if(g.memoizedState===null&&(p=g.alternate,p!==null&&(p=p.memoizedState,p!==null))){p=p.dehydrated;try{Kp(p)}catch(x){ar(g,g.return,x)}}}function EN(p,g){if(g.memoizedState===null&&(p=g.alternate,p!==null&&(p=p.memoizedState,p!==null&&(p=p.dehydrated,p!==null))))try{Kp(p)}catch(x){ar(g,g.return,x)}}function ble(p){switch(p.tag){case 31:case 13:case 19:var g=p.stateNode;return g===null&&(g=p.stateNode=new xN),g;case 22:return p=p.stateNode,g=p._retryCache,g===null&&(g=p._retryCache=new xN),g;default:throw Error(r(435,p.tag))}}function Zy(p,g){var x=ble(p);g.forEach(function(T){if(!x.has(T)){x.add(T);var O=jle.bind(null,p,T);T.then(O,O)}})}function Ho(p,g){var x=g.deletions;if(x!==null)for(var T=0;T<x.length;T++){var O=x[T],F=p,X=g,te=X;e:for(;te!==null;){switch(te.tag){case 27:if(hu(te.type)){Nr=te.stateNode,Bo=!1;break e}break;case 5:Nr=te.stateNode,Bo=!1;break e;case 3:case 4:Nr=te.stateNode.containerInfo,Bo=!0;break e}te=te.return}if(Nr===null)throw Error(r(160));CN(F,X,O),Nr=null,Bo=!1,F=O.alternate,F!==null&&(F.return=null),O.return=null}if(g.subtreeFlags&13886)for(g=g.child;g!==null;)TN(g,p),g=g.sibling}var ua=null;function TN(p,g){var x=p.alternate,T=p.flags;switch(p.tag){case 0:case 11:case 14:case 15:Ho(g,p),Uo(p),T&4&&(au(3,p,p.return),D1(3,p),au(5,p,p.return));break;case 1:Ho(g,p),Uo(p),T&512&&(ms||x===null||Xa(x,x.return)),T&64&&Xl&&(p=p.updateQueue,p!==null&&(T=p.callbacks,T!==null&&(x=p.shared.hiddenCallbacks,p.shared.hiddenCallbacks=x===null?T:x.concat(T))));break;case 26:var O=ua;if(Ho(g,p),Uo(p),T&512&&(ms||x===null||Xa(x,x.return)),T&4){var F=x!==null?x.memoizedState:null;if(T=p.memoizedState,x===null)if(T===null)if(p.stateNode===null){e:{T=p.type,x=p.memoizedProps,O=O.ownerDocument||O;t:switch(T){case"title":F=O.getElementsByTagName("title")[0],(!F||F[ht]||F[rt]||F.namespaceURI==="http://www.w3.org/2000/svg"||F.hasAttribute("itemprop"))&&(F=O.createElement(T),O.head.insertBefore(F,O.querySelector("head > title"))),qs(F,T,x),F[rt]=p,nn(F),T=F;break e;case"link":var X=TL("link","href",O).get(T+(x.href||""));if(X){for(var te=0;te<X.length;te++)if(F=X[te],F.getAttribute("href")===(x.href==null||x.href===""?null:x.href)&&F.getAttribute("rel")===(x.rel==null?null:x.rel)&&F.getAttribute("title")===(x.title==null?null:x.title)&&F.getAttribute("crossorigin")===(x.crossOrigin==null?null:x.crossOrigin)){X.splice(te,1);break t}}F=O.createElement(T),qs(F,T,x),O.head.appendChild(F);break;case"meta":if(X=TL("meta","content",O).get(T+(x.content||""))){for(te=0;te<X.length;te++)if(F=X[te],F.getAttribute("content")===(x.content==null?null:""+x.content)&&F.getAttribute("name")===(x.name==null?null:x.name)&&F.getAttribute("property")===(x.property==null?null:x.property)&&F.getAttribute("http-equiv")===(x.httpEquiv==null?null:x.httpEquiv)&&F.getAttribute("charset")===(x.charSet==null?null:x.charSet)){X.splice(te,1);break t}}F=O.createElement(T),qs(F,T,x),O.head.appendChild(F);break;default:throw Error(r(468,T))}F[rt]=p,nn(F),T=F}p.stateNode=T}else ML(O,p.type,p.stateNode);else p.stateNode=EL(O,T,p.memoizedProps);else F!==T?(F===null?x.stateNode!==null&&(x=x.stateNode,x.parentNode.removeChild(x)):F.count--,T===null?ML(O,p.type,p.stateNode):EL(O,T,p.memoizedProps)):T===null&&p.stateNode!==null&&T5(p,p.memoizedProps,x.memoizedProps)}break;case 27:Ho(g,p),Uo(p),T&512&&(ms||x===null||Xa(x,x.return)),x!==null&&T&4&&T5(p,p.memoizedProps,x.memoizedProps);break;case 5:if(Ho(g,p),Uo(p),T&512&&(ms||x===null||Xa(x,x.return)),p.flags&32){O=p.stateNode;try{Pl(O,"")}catch(Wt){ar(p,p.return,Wt)}}T&4&&p.stateNode!=null&&(O=p.memoizedProps,T5(p,O,x!==null?x.memoizedProps:O)),T&1024&&(A5=!0);break;case 6:if(Ho(g,p),Uo(p),T&4){if(p.stateNode===null)throw Error(r(162));T=p.memoizedProps,x=p.stateNode;try{x.nodeValue=T}catch(Wt){ar(p,p.return,Wt)}}break;case 3:if(pv=null,O=ua,ua=dv(g.containerInfo),Ho(g,p),ua=O,Uo(p),T&4&&x!==null&&x.memoizedState.isDehydrated)try{Kp(g.containerInfo)}catch(Wt){ar(p,p.return,Wt)}A5&&(A5=!1,MN(p));break;case 4:T=ua,ua=dv(p.stateNode.containerInfo),Ho(g,p),Uo(p),ua=T;break;case 12:Ho(g,p),Uo(p);break;case 31:Ho(g,p),Uo(p),T&4&&(T=p.updateQueue,T!==null&&(p.updateQueue=null,Zy(p,T)));break;case 13:Ho(g,p),Uo(p),p.child.flags&8192&&p.memoizedState!==null!=(x!==null&&x.memoizedState!==null)&&(Jy=Ye()),T&4&&(T=p.updateQueue,T!==null&&(p.updateQueue=null,Zy(p,T)));break;case 22:O=p.memoizedState!==null;var he=x!==null&&x.memoizedState!==null,Ie=Xl,Xe=ms;if(Xl=Ie||O,ms=Xe||he,Ho(g,p),ms=Xe,Xl=Ie,Uo(p),T&8192)e:for(g=p.stateNode,g._visibility=O?g._visibility&-2:g._visibility|1,O&&(x===null||he||Xl||ms||ef(p)),x=null,g=p;;){if(g.tag===5||g.tag===26){if(x===null){he=x=g;try{if(F=he.stateNode,O)X=F.style,typeof X.setProperty=="function"?X.setProperty("display","none","important"):X.display="none";else{te=he.stateNode;var it=he.memoizedProps.style,Oe=it!=null&&it.hasOwnProperty("display")?it.display:null;te.style.display=Oe==null||typeof Oe=="boolean"?"":(""+Oe).trim()}}catch(Wt){ar(he,he.return,Wt)}}}else if(g.tag===6){if(x===null){he=g;try{he.stateNode.nodeValue=O?"":he.memoizedProps}catch(Wt){ar(he,he.return,Wt)}}}else if(g.tag===18){if(x===null){he=g;try{var Pe=he.stateNode;O?gL(Pe,!0):gL(he.stateNode,!1)}catch(Wt){ar(he,he.return,Wt)}}}else if((g.tag!==22&&g.tag!==23||g.memoizedState===null||g===p)&&g.child!==null){g.child.return=g,g=g.child;continue}if(g===p)break e;for(;g.sibling===null;){if(g.return===null||g.return===p)break e;x===g&&(x=null),g=g.return}x===g&&(x=null),g.sibling.return=g.return,g=g.sibling}T&4&&(T=p.updateQueue,T!==null&&(x=T.retryQueue,x!==null&&(T.retryQueue=null,Zy(p,x))));break;case 19:Ho(g,p),Uo(p),T&4&&(T=p.updateQueue,T!==null&&(p.updateQueue=null,Zy(p,T)));break;case 30:break;case 21:break;default:Ho(g,p),Uo(p)}}function Uo(p){var g=p.flags;if(g&2){try{for(var x,T=p.return;T!==null;){if(vN(T)){x=T;break}T=T.return}if(x==null)throw Error(r(160));switch(x.tag){case 27:var O=x.stateNode,F=M5(p);Xy(p,F,O);break;case 5:var X=x.stateNode;x.flags&32&&(Pl(X,""),x.flags&=-33);var te=M5(p);Xy(p,te,X);break;case 3:case 4:var he=x.stateNode.containerInfo,Ie=M5(p);j5(p,Ie,he);break;default:throw Error(r(161))}}catch(Xe){ar(p,p.return,Xe)}p.flags&=-3}g&4096&&(p.flags&=-4097)}function MN(p){if(p.subtreeFlags&1024)for(p=p.child;p!==null;){var g=p;MN(g),g.tag===5&&g.flags&1024&&g.stateNode.reset(),p=p.sibling}}function Ql(p,g){if(g.subtreeFlags&8772)for(g=g.child;g!==null;)wN(p,g.alternate,g),g=g.sibling}function ef(p){for(p=p.child;p!==null;){var g=p;switch(g.tag){case 0:case 11:case 14:case 15:au(4,g,g.return),ef(g);break;case 1:Xa(g,g.return);var x=g.stateNode;typeof x.componentWillUnmount=="function"&&gN(g,g.return,x),ef(g);break;case 27:H1(g.stateNode);case 26:case 5:Xa(g,g.return),ef(g);break;case 22:g.memoizedState===null&&ef(g);break;case 30:ef(g);break;default:ef(g)}p=p.sibling}}function Jl(p,g,x){for(x=x&&(g.subtreeFlags&8772)!==0,g=g.child;g!==null;){var T=g.alternate,O=p,F=g,X=F.flags;switch(F.tag){case 0:case 11:case 15:Jl(O,F,x),D1(4,F);break;case 1:if(Jl(O,F,x),T=F,O=T.stateNode,typeof O.componentDidMount=="function")try{O.componentDidMount()}catch(Ie){ar(T,T.return,Ie)}if(T=F,O=T.updateQueue,O!==null){var te=T.stateNode;try{var he=O.shared.hiddenCallbacks;if(he!==null)for(O.shared.hiddenCallbacks=null,O=0;O<he.length;O++)sO(he[O],te)}catch(Ie){ar(T,T.return,Ie)}}x&&X&64&&mN(F),I1(F,F.return);break;case 27:bN(F);case 26:case 5:Jl(O,F,x),x&&T===null&&X&4&&yN(F),I1(F,F.return);break;case 12:Jl(O,F,x);break;case 31:Jl(O,F,x),x&&X&4&&kN(O,F);break;case 13:Jl(O,F,x),x&&X&4&&EN(O,F);break;case 22:F.memoizedState===null&&Jl(O,F,x),I1(F,F.return);break;case 30:break;default:Jl(O,F,x)}g=g.sibling}}function _5(p,g){var x=null;p!==null&&p.memoizedState!==null&&p.memoizedState.cachePool!==null&&(x=p.memoizedState.cachePool.pool),p=null,g.memoizedState!==null&&g.memoizedState.cachePool!==null&&(p=g.memoizedState.cachePool.pool),p!==x&&(p!=null&&p.refCount++,x!=null&&b1(x))}function R5(p,g){p=null,g.alternate!==null&&(p=g.alternate.memoizedState.cache),g=g.memoizedState.cache,g!==p&&(g.refCount++,p!=null&&b1(p))}function da(p,g,x,T){if(g.subtreeFlags&10256)for(g=g.child;g!==null;)jN(p,g,x,T),g=g.sibling}function jN(p,g,x,T){var O=g.flags;switch(g.tag){case 0:case 11:case 15:da(p,g,x,T),O&2048&&D1(9,g);break;case 1:da(p,g,x,T);break;case 3:da(p,g,x,T),O&2048&&(p=null,g.alternate!==null&&(p=g.alternate.memoizedState.cache),g=g.memoizedState.cache,g!==p&&(g.refCount++,p!=null&&b1(p)));break;case 12:if(O&2048){da(p,g,x,T),p=g.stateNode;try{var F=g.memoizedProps,X=F.id,te=F.onPostCommit;typeof te=="function"&&te(X,g.alternate===null?"mount":"update",p.passiveEffectDuration,-0)}catch(he){ar(g,g.return,he)}}else da(p,g,x,T);break;case 31:da(p,g,x,T);break;case 13:da(p,g,x,T);break;case 23:break;case 22:F=g.stateNode,X=g.alternate,g.memoizedState!==null?F._visibility&2?da(p,g,x,T):O1(p,g):F._visibility&2?da(p,g,x,T):(F._visibility|=2,Fp(p,g,x,T,(g.subtreeFlags&10256)!==0||!1)),O&2048&&_5(X,g);break;case 24:da(p,g,x,T),O&2048&&R5(g.alternate,g);break;default:da(p,g,x,T)}}function Fp(p,g,x,T,O){for(O=O&&((g.subtreeFlags&10256)!==0||!1),g=g.child;g!==null;){var F=p,X=g,te=x,he=T,Ie=X.flags;switch(X.tag){case 0:case 11:case 15:Fp(F,X,te,he,O),D1(8,X);break;case 23:break;case 22:var Xe=X.stateNode;X.memoizedState!==null?Xe._visibility&2?Fp(F,X,te,he,O):O1(F,X):(Xe._visibility|=2,Fp(F,X,te,he,O)),O&&Ie&2048&&_5(X.alternate,X);break;case 24:Fp(F,X,te,he,O),O&&Ie&2048&&R5(X.alternate,X);break;default:Fp(F,X,te,he,O)}g=g.sibling}}function O1(p,g){if(g.subtreeFlags&10256)for(g=g.child;g!==null;){var x=p,T=g,O=T.flags;switch(T.tag){case 22:O1(x,T),O&2048&&_5(T.alternate,T);break;case 24:O1(x,T),O&2048&&R5(T.alternate,T);break;default:O1(x,T)}g=g.sibling}}var N1=8192;function zp(p,g,x){if(p.subtreeFlags&N1)for(p=p.child;p!==null;)AN(p,g,x),p=p.sibling}function AN(p,g,x){switch(p.tag){case 26:zp(p,g,x),p.flags&N1&&p.memoizedState!==null&&oce(x,ua,p.memoizedState,p.memoizedProps);break;case 5:zp(p,g,x);break;case 3:case 4:var T=ua;ua=dv(p.stateNode.containerInfo),zp(p,g,x),ua=T;break;case 22:p.memoizedState===null&&(T=p.alternate,T!==null&&T.memoizedState!==null?(T=N1,N1=16777216,zp(p,g,x),N1=T):zp(p,g,x));break;default:zp(p,g,x)}}function _N(p){var g=p.alternate;if(g!==null&&(p=g.child,p!==null)){g.child=null;do g=p.sibling,p.sibling=null,p=g;while(p!==null)}}function L1(p){var g=p.deletions;if((p.flags&16)!==0){if(g!==null)for(var x=0;x<g.length;x++){var T=g[x];Ds=T,DN(T,p)}_N(p)}if(p.subtreeFlags&10256)for(p=p.child;p!==null;)RN(p),p=p.sibling}function RN(p){switch(p.tag){case 0:case 11:case 15:L1(p),p.flags&2048&&au(9,p,p.return);break;case 3:L1(p);break;case 12:L1(p);break;case 22:var g=p.stateNode;p.memoizedState!==null&&g._visibility&2&&(p.return===null||p.return.tag!==13)?(g._visibility&=-3,Qy(p)):L1(p);break;default:L1(p)}}function Qy(p){var g=p.deletions;if((p.flags&16)!==0){if(g!==null)for(var x=0;x<g.length;x++){var T=g[x];Ds=T,DN(T,p)}_N(p)}for(p=p.child;p!==null;){switch(g=p,g.tag){case 0:case 11:case 15:au(8,g,g.return),Qy(g);break;case 22:x=g.stateNode,x._visibility&2&&(x._visibility&=-3,Qy(g));break;default:Qy(g)}p=p.sibling}}function DN(p,g){for(;Ds!==null;){var x=Ds;switch(x.tag){case 0:case 11:case 15:au(8,x,g);break;case 23:case 22:if(x.memoizedState!==null&&x.memoizedState.cachePool!==null){var T=x.memoizedState.cachePool.pool;T!=null&&T.refCount++}break;case 24:b1(x.memoizedState.cache)}if(T=x.child,T!==null)T.return=x,Ds=T;else e:for(x=p;Ds!==null;){T=Ds;var O=T.sibling,F=T.return;if(SN(T),T===x){Ds=null;break e}if(O!==null){O.return=F,Ds=O;break e}Ds=F}}}var xle={getCacheForType:function(p){var g=Us(fs),x=g.data.get(p);return x===void 0&&(x=p(),g.data.set(p,x)),x},cacheSignal:function(){return Us(fs).controller.signal}},wle=typeof WeakMap=="function"?WeakMap:Map,Gn=0,gr=null,Nn=null,Fn=0,ir=0,ui=null,lu=!1,Pp=!1,D5=!1,ec=0,Yr=0,cu=0,tf=0,I5=0,di=0,Bp=0,$1=null,Vo=null,O5=!1,Jy=0,IN=0,ev=1/0,tv=null,uu=null,Ts=0,du=null,Hp=null,tc=0,N5=0,L5=null,ON=null,F1=0,$5=null;function fi(){return(Gn&2)!==0&&Fn!==0?Fn&-Fn:I.T!==null?U5():De()}function NN(){if(di===0)if((Fn&536870912)===0||Pn){var p=kt;kt<<=1,(kt&3932160)===0&&(kt=262144),di=p}else di=536870912;return p=li.current,p!==null&&(p.flags|=32),di}function qo(p,g,x){(p===gr&&(ir===2||ir===9)||p.cancelPendingCommit!==null)&&(Up(p,0),fu(p,Fn,di,!1)),qt(p,x),((Gn&2)===0||p!==gr)&&(p===gr&&((Gn&2)===0&&(tf|=x),Yr===4&&fu(p,Fn,di,!1)),Za(p))}function LN(p,g,x){if((Gn&6)!==0)throw Error(r(327));var T=!x&&(g&127)===0&&(g&p.expiredLanes)===0||Vt(p,g),O=T?kle(p,g):z5(p,g,!0),F=T;do{if(O===0){Pp&&!T&&fu(p,g,0,!1);break}else{if(x=p.current.alternate,F&&!Sle(x)){O=z5(p,g,!1),F=!1;continue}if(O===2){if(F=g,p.errorRecoveryDisabledLanes&F)var X=0;else X=p.pendingLanes&-536870913,X=X!==0?X:X&536870912?536870912:0;if(X!==0){g=X;e:{var te=p;O=$1;var he=te.current.memoizedState.isDehydrated;if(he&&(Up(te,X).flags|=256),X=z5(te,X,!1),X!==2){if(D5&&!he){te.errorRecoveryDisabledLanes|=F,tf|=F,O=4;break e}F=Vo,Vo=O,F!==null&&(Vo===null?Vo=F:Vo.push.apply(Vo,F))}O=X}if(F=!1,O!==2)continue}}if(O===1){Up(p,0),fu(p,g,0,!0);break}e:{switch(T=p,F=O,F){case 0:case 1:throw Error(r(345));case 4:if((g&4194048)!==g)break;case 6:fu(T,g,di,!lu);break e;case 2:Vo=null;break;case 3:case 5:break;default:throw Error(r(329))}if((g&62914560)===g&&(O=Jy+300-Ye(),10<O)){if(fu(T,g,di,!lu),Yt(T,0,!0)!==0)break e;tc=g,T.timeoutHandle=pL($N.bind(null,T,x,Vo,tv,O5,g,di,tf,Bp,lu,F,"Throttled",-0,0),O);break e}$N(T,x,Vo,tv,O5,g,di,tf,Bp,lu,F,null,-0,0)}}break}while(!0);Za(p)}function $N(p,g,x,T,O,F,X,te,he,Ie,Xe,it,Oe,Pe){if(p.timeoutHandle=-1,it=g.subtreeFlags,it&8192||(it&16785408)===16785408){it={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:or},AN(g,F,it);var Wt=(F&62914560)===F?Jy-Ye():(F&4194048)===F?IN-Ye():0;if(Wt=ice(it,Wt),Wt!==null){tc=F,p.cancelPendingCommit=Wt(qN.bind(null,p,g,F,x,T,O,X,te,he,Xe,it,null,Oe,Pe)),fu(p,F,X,!Ie);return}}qN(p,g,F,x,T,O,X,te,he)}function Sle(p){for(var g=p;;){var x=g.tag;if((x===0||x===11||x===15)&&g.flags&16384&&(x=g.updateQueue,x!==null&&(x=x.stores,x!==null)))for(var T=0;T<x.length;T++){var O=x[T],F=O.getSnapshot;O=O.value;try{if(!ii(F(),O))return!1}catch{return!1}}if(x=g.child,g.subtreeFlags&16384&&x!==null)x.return=g,g=x;else{if(g===p)break;for(;g.sibling===null;){if(g.return===null||g.return===p)return!0;g=g.return}g.sibling.return=g.return,g=g.sibling}}return!0}function fu(p,g,x,T){g&=~I5,g&=~tf,p.suspendedLanes|=g,p.pingedLanes&=~g,T&&(p.warmLanes|=g),T=p.expirationTimes;for(var O=g;0<O;){var F=31-We(O),X=1<<F;T[F]=-1,O&=~X}x!==0&&yn(p,x,g)}function nv(){return(Gn&6)===0?(z1(0),!1):!0}function F5(){if(Nn!==null){if(ir===0)var p=Nn.return;else p=Nn,Vl=Wd=null,e5(p),Ip=null,w1=0,p=Nn;for(;p!==null;)hN(p.alternate,p),p=p.return;Nn=null}}function Up(p,g){var x=p.timeoutHandle;x!==-1&&(p.timeoutHandle=-1,Hle(x)),x=p.cancelPendingCommit,x!==null&&(p.cancelPendingCommit=null,x()),tc=0,F5(),gr=p,Nn=x=Hl(p.current,null),Fn=g,ir=0,ui=null,lu=!1,Pp=Vt(p,g),D5=!1,Bp=di=I5=tf=cu=Yr=0,Vo=$1=null,O5=!1,(g&8)!==0&&(g|=g&32);var T=p.entangledLanes;if(T!==0)for(p=p.entanglements,T&=g;0<T;){var O=31-We(T),F=1<<O;g|=p[O],T&=~F}return ec=g,Cy(),x}function FN(p,g){Cn=null,I.H=A1,g===Dp||g===Ry?(g=eO(),ir=3):g===HC?(g=eO(),ir=4):ir=g===g5?8:g!==null&&typeof g=="object"&&typeof g.then=="function"?6:1,ui=g,Nn===null&&(Yr=1,qy(p,_i(g,p.current)))}function zN(){var p=li.current;return p===null?!0:(Fn&4194048)===Fn?Oi===null:(Fn&62914560)===Fn||(Fn&536870912)!==0?p===Oi:!1}function PN(){var p=I.H;return I.H=A1,p===null?A1:p}function BN(){var p=I.A;return I.A=xle,p}function rv(){Yr=4,lu||(Fn&4194048)!==Fn&&li.current!==null||(Pp=!0),(cu&134217727)===0&&(tf&134217727)===0||gr===null||fu(gr,Fn,di,!1)}function z5(p,g,x){var T=Gn;Gn|=2;var O=PN(),F=BN();(gr!==p||Fn!==g)&&(tv=null,Up(p,g)),g=!1;var X=Yr;e:do try{if(ir!==0&&Nn!==null){var te=Nn,he=ui;switch(ir){case 8:F5(),X=6;break e;case 3:case 2:case 9:case 6:li.current===null&&(g=!0);var Ie=ir;if(ir=0,ui=null,Vp(p,te,he,Ie),x&&Pp){X=0;break e}break;default:Ie=ir,ir=0,ui=null,Vp(p,te,he,Ie)}}Cle(),X=Yr;break}catch(Xe){FN(p,Xe)}while(!0);return g&&p.shellSuspendCounter++,Vl=Wd=null,Gn=T,I.H=O,I.A=F,Nn===null&&(gr=null,Fn=0,Cy()),X}function Cle(){for(;Nn!==null;)HN(Nn)}function kle(p,g){var x=Gn;Gn|=2;var T=PN(),O=BN();gr!==p||Fn!==g?(tv=null,ev=Ye()+500,Up(p,g)):Pp=Vt(p,g);e:do try{if(ir!==0&&Nn!==null){g=Nn;var F=ui;t:switch(ir){case 1:ir=0,ui=null,Vp(p,g,F,1);break;case 2:case 9:if(QI(F)){ir=0,ui=null,UN(g);break}g=function(){ir!==2&&ir!==9||gr!==p||(ir=7),Za(p)},F.then(g,g);break e;case 3:ir=7;break e;case 4:ir=5;break e;case 7:QI(F)?(ir=0,ui=null,UN(g)):(ir=0,ui=null,Vp(p,g,F,7));break;case 5:var X=null;switch(Nn.tag){case 26:X=Nn.memoizedState;case 5:case 27:var te=Nn;if(X?jL(X):te.stateNode.complete){ir=0,ui=null;var he=te.sibling;if(he!==null)Nn=he;else{var Ie=te.return;Ie!==null?(Nn=Ie,sv(Ie)):Nn=null}break t}}ir=0,ui=null,Vp(p,g,F,5);break;case 6:ir=0,ui=null,Vp(p,g,F,6);break;case 8:F5(),Yr=6;break e;default:throw Error(r(462))}}Ele();break}catch(Xe){FN(p,Xe)}while(!0);return Vl=Wd=null,I.H=T,I.A=O,Gn=x,Nn!==null?0:(gr=null,Fn=0,Cy(),Yr)}function Ele(){for(;Nn!==null&&!He();)HN(Nn)}function HN(p){var g=fN(p.alternate,p,ec);p.memoizedProps=p.pendingProps,g===null?sv(p):Nn=g}function UN(p){var g=p,x=g.alternate;switch(g.tag){case 15:case 0:g=iN(x,g,g.pendingProps,g.type,void 0,Fn);break;case 11:g=iN(x,g,g.pendingProps,g.type.render,g.ref,Fn);break;case 5:e5(g);default:hN(x,g),g=Nn=BI(g,ec),g=fN(x,g,ec)}p.memoizedProps=p.pendingProps,g===null?sv(p):Nn=g}function Vp(p,g,x,T){Vl=Wd=null,e5(g),Ip=null,w1=0;var O=g.return;try{if(ple(p,O,g,x,Fn)){Yr=1,qy(p,_i(x,p.current)),Nn=null;return}}catch(F){if(O!==null)throw Nn=O,F;Yr=1,qy(p,_i(x,p.current)),Nn=null;return}g.flags&32768?(Pn||T===1?p=!0:Pp||(Fn&536870912)!==0?p=!1:(lu=p=!0,(T===2||T===9||T===3||T===6)&&(T=li.current,T!==null&&T.tag===13&&(T.flags|=16384))),VN(g,p)):sv(g)}function sv(p){var g=p;do{if((g.flags&32768)!==0){VN(g,lu);return}p=g.return;var x=gle(g.alternate,g,ec);if(x!==null){Nn=x;return}if(g=g.sibling,g!==null){Nn=g;return}Nn=g=p}while(g!==null);Yr===0&&(Yr=5)}function VN(p,g){do{var x=yle(p.alternate,p);if(x!==null){x.flags&=32767,Nn=x;return}if(x=p.return,x!==null&&(x.flags|=32768,x.subtreeFlags=0,x.deletions=null),!g&&(p=p.sibling,p!==null)){Nn=p;return}Nn=p=x}while(p!==null);Yr=6,Nn=null}function qN(p,g,x,T,O,F,X,te,he){p.cancelPendingCommit=null;do ov();while(Ts!==0);if((Gn&6)!==0)throw Error(r(327));if(g!==null){if(g===p.current)throw Error(r(177));if(F=g.lanes|g.childLanes,F|=MC,Kt(p,x,F,X,te,he),p===gr&&(Nn=gr=null,Fn=0),Hp=g,du=p,tc=x,N5=F,L5=O,ON=T,(g.subtreeFlags&10256)!==0||(g.flags&10256)!==0?(p.callbackNode=null,p.callbackPriority=0,Ale(qe,function(){return XN(),null})):(p.callbackNode=null,p.callbackPriority=0),T=(g.flags&13878)!==0,(g.subtreeFlags&13878)!==0||T){T=I.T,I.T=null,O=H.p,H.p=2,X=Gn,Gn|=4;try{vle(p,g,x)}finally{Gn=X,H.p=O,I.T=T}}Ts=1,WN(),YN(),GN()}}function WN(){if(Ts===1){Ts=0;var p=du,g=Hp,x=(g.flags&13878)!==0;if((g.subtreeFlags&13878)!==0||x){x=I.T,I.T=null;var T=H.p;H.p=2;var O=Gn;Gn|=4;try{TN(g,p);var F=Z5,X=DI(p.containerInfo),te=F.focusedElem,he=F.selectionRange;if(X!==te&&te&&te.ownerDocument&&RI(te.ownerDocument.documentElement,te)){if(he!==null&&SC(te)){var Ie=he.start,Xe=he.end;if(Xe===void 0&&(Xe=Ie),"selectionStart"in te)te.selectionStart=Ie,te.selectionEnd=Math.min(Xe,te.value.length);else{var it=te.ownerDocument||document,Oe=it&&it.defaultView||window;if(Oe.getSelection){var Pe=Oe.getSelection(),Wt=te.textContent.length,fn=Math.min(he.start,Wt),pr=he.end===void 0?fn:Math.min(he.end,Wt);!Pe.extend&&fn>pr&&(X=pr,pr=fn,fn=X);var ke=_I(te,fn),ye=_I(te,pr);if(ke&&ye&&(Pe.rangeCount!==1||Pe.anchorNode!==ke.node||Pe.anchorOffset!==ke.offset||Pe.focusNode!==ye.node||Pe.focusOffset!==ye.offset)){var Re=it.createRange();Re.setStart(ke.node,ke.offset),Pe.removeAllRanges(),fn>pr?(Pe.addRange(Re),Pe.extend(ye.node,ye.offset)):(Re.setEnd(ye.node,ye.offset),Pe.addRange(Re))}}}}for(it=[],Pe=te;Pe=Pe.parentNode;)Pe.nodeType===1&&it.push({element:Pe,left:Pe.scrollLeft,top:Pe.scrollTop});for(typeof te.focus=="function"&&te.focus(),te=0;te<it.length;te++){var tt=it[te];tt.element.scrollLeft=tt.left,tt.element.scrollTop=tt.top}}yv=!!X5,Z5=X5=null}finally{Gn=O,H.p=T,I.T=x}}p.current=g,Ts=2}}function YN(){if(Ts===2){Ts=0;var p=du,g=Hp,x=(g.flags&8772)!==0;if((g.subtreeFlags&8772)!==0||x){x=I.T,I.T=null;var T=H.p;H.p=2;var O=Gn;Gn|=4;try{wN(p,g.alternate,g)}finally{Gn=O,H.p=T,I.T=x}}Ts=3}}function GN(){if(Ts===4||Ts===3){Ts=0,lt();var p=du,g=Hp,x=tc,T=ON;(g.subtreeFlags&10256)!==0||(g.flags&10256)!==0?Ts=5:(Ts=0,Hp=du=null,KN(p,p.pendingLanes));var O=p.pendingLanes;if(O===0&&(uu=null),Ee(x),g=g.stateNode,at&&typeof at.onCommitFiberRoot=="function")try{at.onCommitFiberRoot(Pt,g,void 0,(g.current.flags&128)===128)}catch{}if(T!==null){g=I.T,O=H.p,H.p=2,I.T=null;try{for(var F=p.onRecoverableError,X=0;X<T.length;X++){var te=T[X];F(te.value,{componentStack:te.stack})}}finally{I.T=g,H.p=O}}(tc&3)!==0&&ov(),Za(p),O=p.pendingLanes,(x&261930)!==0&&(O&42)!==0?p===$5?F1++:(F1=0,$5=p):F1=0,z1(0)}}function KN(p,g){(p.pooledCacheLanes&=g)===0&&(g=p.pooledCache,g!=null&&(p.pooledCache=null,b1(g)))}function ov(){return WN(),YN(),GN(),XN()}function XN(){if(Ts!==5)return!1;var p=du,g=N5;N5=0;var x=Ee(tc),T=I.T,O=H.p;try{H.p=32>x?32:x,I.T=null,x=L5,L5=null;var F=du,X=tc;if(Ts=0,Hp=du=null,tc=0,(Gn&6)!==0)throw Error(r(331));var te=Gn;if(Gn|=4,RN(F.current),jN(F,F.current,X,x),Gn=te,z1(0,!1),at&&typeof at.onPostCommitFiberRoot=="function")try{at.onPostCommitFiberRoot(Pt,F)}catch{}return!0}finally{H.p=O,I.T=T,KN(p,g)}}function ZN(p,g,x){g=_i(x,g),g=m5(p.stateNode,g,2),p=su(p,g,2),p!==null&&(qt(p,2),Za(p))}function ar(p,g,x){if(p.tag===3)ZN(p,p,x);else for(;g!==null;){if(g.tag===3){ZN(g,p,x);break}else if(g.tag===1){var T=g.stateNode;if(typeof g.type.getDerivedStateFromError=="function"||typeof T.componentDidCatch=="function"&&(uu===null||!uu.has(T))){p=_i(x,p),x=QO(2),T=su(g,x,2),T!==null&&(JO(x,T,g,p),qt(T,2),Za(T));break}}g=g.return}}function P5(p,g,x){var T=p.pingCache;if(T===null){T=p.pingCache=new wle;var O=new Set;T.set(g,O)}else O=T.get(g),O===void 0&&(O=new Set,T.set(g,O));O.has(x)||(D5=!0,O.add(x),p=Tle.bind(null,p,g,x),g.then(p,p))}function Tle(p,g,x){var T=p.pingCache;T!==null&&T.delete(g),p.pingedLanes|=p.suspendedLanes&x,p.warmLanes&=~x,gr===p&&(Fn&x)===x&&(Yr===4||Yr===3&&(Fn&62914560)===Fn&&300>Ye()-Jy?(Gn&2)===0&&Up(p,0):I5|=x,Bp===Fn&&(Bp=0)),Za(p)}function QN(p,g){g===0&&(g=Ht()),p=Ud(p,g),p!==null&&(qt(p,g),Za(p))}function Mle(p){var g=p.memoizedState,x=0;g!==null&&(x=g.retryLane),QN(p,x)}function jle(p,g){var x=0;switch(p.tag){case 31:case 13:var T=p.stateNode,O=p.memoizedState;O!==null&&(x=O.retryLane);break;case 19:T=p.stateNode;break;case 22:T=p.stateNode._retryCache;break;default:throw Error(r(314))}T!==null&&T.delete(g),QN(p,x)}function Ale(p,g){return Ae(p,g)}var iv=null,qp=null,B5=!1,av=!1,H5=!1,pu=0;function Za(p){p!==qp&&p.next===null&&(qp===null?iv=qp=p:qp=qp.next=p),av=!0,B5||(B5=!0,Rle())}function z1(p,g){if(!H5&&av){H5=!0;do for(var x=!1,T=iv;T!==null;){if(p!==0){var O=T.pendingLanes;if(O===0)var F=0;else{var X=T.suspendedLanes,te=T.pingedLanes;F=(1<<31-We(42|p)+1)-1,F&=O&~(X&~te),F=F&201326741?F&201326741|1:F?F|2:0}F!==0&&(x=!0,nL(T,F))}else F=Fn,F=Yt(T,T===gr?F:0,T.cancelPendingCommit!==null||T.timeoutHandle!==-1),(F&3)===0||Vt(T,F)||(x=!0,nL(T,F));T=T.next}while(x);H5=!1}}function _le(){JN()}function JN(){av=B5=!1;var p=0;pu!==0&&Ble()&&(p=pu);for(var g=Ye(),x=null,T=iv;T!==null;){var O=T.next,F=eL(T,g);F===0?(T.next=null,x===null?iv=O:x.next=O,O===null&&(qp=x)):(x=T,(p!==0||(F&3)!==0)&&(av=!0)),T=O}Ts!==0&&Ts!==5||z1(p),pu!==0&&(pu=0)}function eL(p,g){for(var x=p.suspendedLanes,T=p.pingedLanes,O=p.expirationTimes,F=p.pendingLanes&-62914561;0<F;){var X=31-We(F),te=1<<X,he=O[X];he===-1?((te&x)===0||(te&T)!==0)&&(O[X]=Nt(te,g)):he<=g&&(p.expiredLanes|=te),F&=~te}if(g=gr,x=Fn,x=Yt(p,p===g?x:0,p.cancelPendingCommit!==null||p.timeoutHandle!==-1),T=p.callbackNode,x===0||p===g&&(ir===2||ir===9)||p.cancelPendingCommit!==null)return T!==null&&T!==null&&Ze(T),p.callbackNode=null,p.callbackPriority=0;if((x&3)===0||Vt(p,x)){if(g=x&-x,g===p.callbackPriority)return g;switch(T!==null&&Ze(T),Ee(x)){case 2:case 8:x=Se;break;case 32:x=qe;break;case 268435456:x=$e;break;default:x=qe}return T=tL.bind(null,p),x=Ae(x,T),p.callbackPriority=g,p.callbackNode=x,g}return T!==null&&T!==null&&Ze(T),p.callbackPriority=2,p.callbackNode=null,2}function tL(p,g){if(Ts!==0&&Ts!==5)return p.callbackNode=null,p.callbackPriority=0,null;var x=p.callbackNode;if(ov()&&p.callbackNode!==x)return null;var T=Fn;return T=Yt(p,p===gr?T:0,p.cancelPendingCommit!==null||p.timeoutHandle!==-1),T===0?null:(LN(p,T,g),eL(p,Ye()),p.callbackNode!=null&&p.callbackNode===x?tL.bind(null,p):null)}function nL(p,g){if(ov())return null;LN(p,g,!0)}function Rle(){Ule(function(){(Gn&6)!==0?Ae(Fe,_le):JN()})}function U5(){if(pu===0){var p=_p;p===0&&(p=Tt,Tt<<=1,(Tt&261888)===0&&(Tt=256)),pu=p}return pu}function rL(p){return p==null||typeof p=="symbol"||typeof p=="boolean"?null:typeof p=="function"?p:Un(""+p)}function sL(p,g){var x=g.ownerDocument.createElement("input");return x.name=g.name,x.value=g.value,p.id&&x.setAttribute("form",p.id),g.parentNode.insertBefore(x,g),p=new FormData(p),x.parentNode.removeChild(x),p}function Dle(p,g,x,T,O){if(g==="submit"&&x&&x.stateNode===O){var F=rL((O[st]||null).action),X=T.submitter;X&&(g=(g=X[st]||null)?rL(g.formAction):X.getAttribute("formAction"),g!==null&&(F=g,X=null));var te=new by("action","action",null,T,O);p.push({event:te,listeners:[{instance:null,listener:function(){if(T.defaultPrevented){if(pu!==0){var he=X?sL(O,X):new FormData(O);c5(x,{pending:!0,data:he,method:O.method,action:F},null,he)}}else typeof F=="function"&&(te.preventDefault(),he=X?sL(O,X):new FormData(O),c5(x,{pending:!0,data:he,method:O.method,action:F},F,he))},currentTarget:O}]})}}for(var V5=0;V5<TC.length;V5++){var q5=TC[V5],Ile=q5.toLowerCase(),Ole=q5[0].toUpperCase()+q5.slice(1);ca(Ile,"on"+Ole)}ca(NI,"onAnimationEnd"),ca(LI,"onAnimationIteration"),ca($I,"onAnimationStart"),ca("dblclick","onDoubleClick"),ca("focusin","onFocus"),ca("focusout","onBlur"),ca(Xae,"onTransitionRun"),ca(Zae,"onTransitionStart"),ca(Qae,"onTransitionCancel"),ca(FI,"onTransitionEnd"),$t("onMouseEnter",["mouseout","mouseover"]),$t("onMouseLeave",["mouseout","mouseover"]),$t("onPointerEnter",["pointerout","pointerover"]),$t("onPointerLeave",["pointerout","pointerover"]),Zt("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Zt("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Zt("onBeforeInput",["compositionend","keypress","textInput","paste"]),Zt("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Zt("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Zt("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var P1="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(" "),Nle=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(P1));function oL(p,g){g=(g&4)!==0;for(var x=0;x<p.length;x++){var T=p[x],O=T.event;T=T.listeners;e:{var F=void 0;if(g)for(var X=T.length-1;0<=X;X--){var te=T[X],he=te.instance,Ie=te.currentTarget;if(te=te.listener,he!==F&&O.isPropagationStopped())break e;F=te,O.currentTarget=Ie;try{F(O)}catch(Xe){Sy(Xe)}O.currentTarget=null,F=he}else for(X=0;X<T.length;X++){if(te=T[X],he=te.instance,Ie=te.currentTarget,te=te.listener,he!==F&&O.isPropagationStopped())break e;F=te,O.currentTarget=Ie;try{F(O)}catch(Xe){Sy(Xe)}O.currentTarget=null,F=he}}}}function Ln(p,g){var x=g[Ut];x===void 0&&(x=g[Ut]=new Set);var T=p+"__bubble";x.has(T)||(iL(g,p,2,!1),x.add(T))}function W5(p,g,x){var T=0;g&&(T|=4),iL(x,p,T,g)}var lv="_reactListening"+Math.random().toString(36).slice(2);function Y5(p){if(!p[lv]){p[lv]=!0,Ge.forEach(function(x){x!=="selectionchange"&&(Nle.has(x)||W5(x,!1,p),W5(x,!0,p))});var g=p.nodeType===9?p:p.ownerDocument;g===null||g[lv]||(g[lv]=!0,W5("selectionchange",!1,g))}}function iL(p,g,x,T){switch(NL(g)){case 2:var O=cce;break;case 8:O=uce;break;default:O=l6}x=O.bind(null,g,x,p),O=void 0,!pC||g!=="touchstart"&&g!=="touchmove"&&g!=="wheel"||(O=!0),T?O!==void 0?p.addEventListener(g,x,{capture:!0,passive:O}):p.addEventListener(g,x,!0):O!==void 0?p.addEventListener(g,x,{passive:O}):p.addEventListener(g,x,!1)}function G5(p,g,x,T,O){var F=T;if((g&1)===0&&(g&2)===0&&T!==null)e:for(;;){if(T===null)return;var X=T.tag;if(X===3||X===4){var te=T.stateNode.containerInfo;if(te===O)break;if(X===4)for(X=T.return;X!==null;){var he=X.tag;if((he===3||he===4)&&X.stateNode.containerInfo===O)return;X=X.return}for(;te!==null;){if(X=Ne(te),X===null)return;if(he=X.tag,he===5||he===6||he===26||he===27){T=F=X;continue e}te=te.parentNode}}T=T.return}dI(function(){var Ie=F,Xe=ro(x),it=[];e:{var Oe=zI.get(p);if(Oe!==void 0){var Pe=by,Wt=p;switch(p){case"keypress":if(yy(x)===0)break e;case"keydown":case"keyup":Pe=jae;break;case"focusin":Wt="focus",Pe=yC;break;case"focusout":Wt="blur",Pe=yC;break;case"beforeblur":case"afterblur":Pe=yC;break;case"click":if(x.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":Pe=hI;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":Pe=gae;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":Pe=Rae;break;case NI:case LI:case $I:Pe=bae;break;case FI:Pe=Iae;break;case"scroll":case"scrollend":Pe=hae;break;case"wheel":Pe=Nae;break;case"copy":case"cut":case"paste":Pe=wae;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":Pe=gI;break;case"toggle":case"beforetoggle":Pe=$ae}var fn=(g&4)!==0,pr=!fn&&(p==="scroll"||p==="scrollend"),ke=fn?Oe!==null?Oe+"Capture":null:Oe;fn=[];for(var ye=Ie,Re;ye!==null;){var tt=ye;if(Re=tt.stateNode,tt=tt.tag,tt!==5&&tt!==26&&tt!==27||Re===null||ke===null||(tt=l1(ye,ke),tt!=null&&fn.push(B1(ye,tt,Re))),pr)break;ye=ye.return}0<fn.length&&(Oe=new Pe(Oe,Wt,null,x,Xe),it.push({event:Oe,listeners:fn}))}}if((g&7)===0){e:{if(Oe=p==="mouseover"||p==="pointerover",Pe=p==="mouseout"||p==="pointerout",Oe&&x!==qr&&(Wt=x.relatedTarget||x.fromElement)&&(Ne(Wt)||Wt[Mt]))break e;if((Pe||Oe)&&(Oe=Xe.window===Xe?Xe:(Oe=Xe.ownerDocument)?Oe.defaultView||Oe.parentWindow:window,Pe?(Wt=x.relatedTarget||x.toElement,Pe=Ie,Wt=Wt?Ne(Wt):null,Wt!==null&&(pr=o(Wt),fn=Wt.tag,Wt!==pr||fn!==5&&fn!==27&&fn!==6)&&(Wt=null)):(Pe=null,Wt=Ie),Pe!==Wt)){if(fn=hI,tt="onMouseLeave",ke="onMouseEnter",ye="mouse",(p==="pointerout"||p==="pointerover")&&(fn=gI,tt="onPointerLeave",ke="onPointerEnter",ye="pointer"),pr=Pe==null?Oe:un(Pe),Re=Wt==null?Oe:un(Wt),Oe=new fn(tt,ye+"leave",Pe,x,Xe),Oe.target=pr,Oe.relatedTarget=Re,tt=null,Ne(Xe)===Ie&&(fn=new fn(ke,ye+"enter",Wt,x,Xe),fn.target=Re,fn.relatedTarget=pr,tt=fn),pr=tt,Pe&&Wt)t:{for(fn=Lle,ke=Pe,ye=Wt,Re=0,tt=ke;tt;tt=fn(tt))Re++;tt=0;for(var sn=ye;sn;sn=fn(sn))tt++;for(;0<Re-tt;)ke=fn(ke),Re--;for(;0<tt-Re;)ye=fn(ye),tt--;for(;Re--;){if(ke===ye||ye!==null&&ke===ye.alternate){fn=ke;break t}ke=fn(ke),ye=fn(ye)}fn=null}else fn=null;Pe!==null&&aL(it,Oe,Pe,fn,!1),Wt!==null&&pr!==null&&aL(it,pr,Wt,fn,!0)}}e:{if(Oe=Ie?un(Ie):window,Pe=Oe.nodeName&&Oe.nodeName.toLowerCase(),Pe==="select"||Pe==="input"&&Oe.type==="file")var Vn=kI;else if(SI(Oe))if(EI)Vn=Yae;else{Vn=qae;var Gt=Vae}else Pe=Oe.nodeName,!Pe||Pe.toLowerCase()!=="input"||Oe.type!=="checkbox"&&Oe.type!=="radio"?Ie&&Ue(Ie.elementType)&&(Vn=kI):Vn=Wae;if(Vn&&(Vn=Vn(p,Ie))){CI(it,Vn,x,Xe);break e}Gt&&Gt(p,Oe,Ie),p==="focusout"&&Ie&&Oe.type==="number"&&Ie.memoizedProps.value!=null&&bp(Oe,"number",Oe.value)}switch(Gt=Ie?un(Ie):window,p){case"focusin":(SI(Gt)||Gt.contentEditable==="true")&&(Sp=Gt,CC=Ie,g1=null);break;case"focusout":g1=CC=Sp=null;break;case"mousedown":kC=!0;break;case"contextmenu":case"mouseup":case"dragend":kC=!1,II(it,x,Xe);break;case"selectionchange":if(Kae)break;case"keydown":case"keyup":II(it,x,Xe)}var kn;if(bC)e:{switch(p){case"compositionstart":var zn="onCompositionStart";break e;case"compositionend":zn="onCompositionEnd";break e;case"compositionupdate":zn="onCompositionUpdate";break e}zn=void 0}else wp?xI(p,x)&&(zn="onCompositionEnd"):p==="keydown"&&x.keyCode===229&&(zn="onCompositionStart");zn&&(yI&&x.locale!=="ko"&&(wp||zn!=="onCompositionStart"?zn==="onCompositionEnd"&&wp&&(kn=fI()):(Zc=Xe,hC="value"in Zc?Zc.value:Zc.textContent,wp=!0)),Gt=cv(Ie,zn),0<Gt.length&&(zn=new mI(zn,p,null,x,Xe),it.push({event:zn,listeners:Gt}),kn?zn.data=kn:(kn=wI(x),kn!==null&&(zn.data=kn)))),(kn=zae?Pae(p,x):Bae(p,x))&&(zn=cv(Ie,"onBeforeInput"),0<zn.length&&(Gt=new mI("onBeforeInput","beforeinput",null,x,Xe),it.push({event:Gt,listeners:zn}),Gt.data=kn)),Dle(it,p,Ie,x,Xe)}oL(it,g)})}function B1(p,g,x){return{instance:p,listener:g,currentTarget:x}}function cv(p,g){for(var x=g+"Capture",T=[];p!==null;){var O=p,F=O.stateNode;if(O=O.tag,O!==5&&O!==26&&O!==27||F===null||(O=l1(p,x),O!=null&&T.unshift(B1(p,O,F)),O=l1(p,g),O!=null&&T.push(B1(p,O,F))),p.tag===3)return T;p=p.return}return[]}function Lle(p){if(p===null)return null;do p=p.return;while(p&&p.tag!==5&&p.tag!==27);return p||null}function aL(p,g,x,T,O){for(var F=g._reactName,X=[];x!==null&&x!==T;){var te=x,he=te.alternate,Ie=te.stateNode;if(te=te.tag,he!==null&&he===T)break;te!==5&&te!==26&&te!==27||Ie===null||(he=Ie,O?(Ie=l1(x,F),Ie!=null&&X.unshift(B1(x,Ie,he))):O||(Ie=l1(x,F),Ie!=null&&X.push(B1(x,Ie,he)))),x=x.return}X.length!==0&&p.push({event:g,listeners:X})}var $le=/\r\n?/g,Fle=/\u0000|\uFFFD/g;function lL(p){return(typeof p=="string"?p:""+p).replace($le,`
`).replace(Fle,"")}function cL(p,g){return g=lL(g),lL(p)===g}function fr(p,g,x,T,O,F){switch(x){case"children":typeof T=="string"?g==="body"||g==="textarea"&&T===""||Pl(p,T):(typeof T=="number"||typeof T=="bigint")&&g!=="body"&&Pl(p,""+T);break;case"className":ds(p,"class",T);break;case"tabIndex":ds(p,"tabindex",T);break;case"dir":case"role":case"viewBox":case"width":case"height":ds(p,x,T);break;case"style":a1(p,T,F);break;case"data":if(g!=="object"){ds(p,"data",T);break}case"src":case"href":if(T===""&&(g!=="a"||x!=="href")){p.removeAttribute(x);break}if(T==null||typeof T=="function"||typeof T=="symbol"||typeof T=="boolean"){p.removeAttribute(x);break}T=Un(""+T),p.setAttribute(x,T);break;case"action":case"formAction":if(typeof T=="function"){p.setAttribute(x,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof F=="function"&&(x==="formAction"?(g!=="input"&&fr(p,g,"name",O.name,O,null),fr(p,g,"formEncType",O.formEncType,O,null),fr(p,g,"formMethod",O.formMethod,O,null),fr(p,g,"formTarget",O.formTarget,O,null)):(fr(p,g,"encType",O.encType,O,null),fr(p,g,"method",O.method,O,null),fr(p,g,"target",O.target,O,null)));if(T==null||typeof T=="symbol"||typeof T=="boolean"){p.removeAttribute(x);break}T=Un(""+T),p.setAttribute(x,T);break;case"onClick":T!=null&&(p.onclick=or);break;case"onScroll":T!=null&&Ln("scroll",p);break;case"onScrollEnd":T!=null&&Ln("scrollend",p);break;case"dangerouslySetInnerHTML":if(T!=null){if(typeof T!="object"||!("__html"in T))throw Error(r(61));if(x=T.__html,x!=null){if(O.children!=null)throw Error(r(60));p.innerHTML=x}}break;case"multiple":p.multiple=T&&typeof T!="function"&&typeof T!="symbol";break;case"muted":p.muted=T&&typeof T!="function"&&typeof T!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(T==null||typeof T=="function"||typeof T=="boolean"||typeof T=="symbol"){p.removeAttribute("xlink:href");break}x=Un(""+T),p.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",x);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":T!=null&&typeof T!="function"&&typeof T!="symbol"?p.setAttribute(x,""+T):p.removeAttribute(x);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":T&&typeof T!="function"&&typeof T!="symbol"?p.setAttribute(x,""):p.removeAttribute(x);break;case"capture":case"download":T===!0?p.setAttribute(x,""):T!==!1&&T!=null&&typeof T!="function"&&typeof T!="symbol"?p.setAttribute(x,T):p.removeAttribute(x);break;case"cols":case"rows":case"size":case"span":T!=null&&typeof T!="function"&&typeof T!="symbol"&&!isNaN(T)&&1<=T?p.setAttribute(x,T):p.removeAttribute(x);break;case"rowSpan":case"start":T==null||typeof T=="function"||typeof T=="symbol"||isNaN(T)?p.removeAttribute(x):p.setAttribute(x,T);break;case"popover":Ln("beforetoggle",p),Ln("toggle",p),jn(p,"popover",T);break;case"xlinkActuate":Cr(p,"http://www.w3.org/1999/xlink","xlink:actuate",T);break;case"xlinkArcrole":Cr(p,"http://www.w3.org/1999/xlink","xlink:arcrole",T);break;case"xlinkRole":Cr(p,"http://www.w3.org/1999/xlink","xlink:role",T);break;case"xlinkShow":Cr(p,"http://www.w3.org/1999/xlink","xlink:show",T);break;case"xlinkTitle":Cr(p,"http://www.w3.org/1999/xlink","xlink:title",T);break;case"xlinkType":Cr(p,"http://www.w3.org/1999/xlink","xlink:type",T);break;case"xmlBase":Cr(p,"http://www.w3.org/XML/1998/namespace","xml:base",T);break;case"xmlLang":Cr(p,"http://www.w3.org/XML/1998/namespace","xml:lang",T);break;case"xmlSpace":Cr(p,"http://www.w3.org/XML/1998/namespace","xml:space",T);break;case"is":jn(p,"is",T);break;case"innerText":case"textContent":break;default:(!(2<x.length)||x[0]!=="o"&&x[0]!=="O"||x[1]!=="n"&&x[1]!=="N")&&(x=Qt.get(x)||x,jn(p,x,T))}}function K5(p,g,x,T,O,F){switch(x){case"style":a1(p,T,F);break;case"dangerouslySetInnerHTML":if(T!=null){if(typeof T!="object"||!("__html"in T))throw Error(r(61));if(x=T.__html,x!=null){if(O.children!=null)throw Error(r(60));p.innerHTML=x}}break;case"children":typeof T=="string"?Pl(p,T):(typeof T=="number"||typeof T=="bigint")&&Pl(p,""+T);break;case"onScroll":T!=null&&Ln("scroll",p);break;case"onScrollEnd":T!=null&&Ln("scrollend",p);break;case"onClick":T!=null&&(p.onclick=or);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Rt.hasOwnProperty(x))e:{if(x[0]==="o"&&x[1]==="n"&&(O=x.endsWith("Capture"),g=x.slice(2,O?x.length-7:void 0),F=p[st]||null,F=F!=null?F[x]:null,typeof F=="function"&&p.removeEventListener(g,F,O),typeof T=="function")){typeof F!="function"&&F!==null&&(x in p?p[x]=null:p.hasAttribute(x)&&p.removeAttribute(x)),p.addEventListener(g,T,O);break e}x in p?p[x]=T:T===!0?p.setAttribute(x,""):jn(p,x,T)}}}function qs(p,g,x){switch(g){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Ln("error",p),Ln("load",p);var T=!1,O=!1,F;for(F in x)if(x.hasOwnProperty(F)){var X=x[F];if(X!=null)switch(F){case"src":T=!0;break;case"srcSet":O=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,g));default:fr(p,g,F,X,x,null)}}O&&fr(p,g,"srcSet",x.srcSet,x,null),T&&fr(p,g,"src",x.src,x,null);return;case"input":Ln("invalid",p);var te=F=X=O=null,he=null,Ie=null;for(T in x)if(x.hasOwnProperty(T)){var Xe=x[T];if(Xe!=null)switch(T){case"name":O=Xe;break;case"type":X=Xe;break;case"checked":he=Xe;break;case"defaultChecked":Ie=Xe;break;case"value":F=Xe;break;case"defaultValue":te=Xe;break;case"children":case"dangerouslySetInnerHTML":if(Xe!=null)throw Error(r(137,g));break;default:fr(p,g,T,Xe,x,null)}}r1(p,F,te,he,Ie,X,O,!1);return;case"select":Ln("invalid",p),T=X=F=null;for(O in x)if(x.hasOwnProperty(O)&&(te=x[O],te!=null))switch(O){case"value":F=te;break;case"defaultValue":X=te;break;case"multiple":T=te;default:fr(p,g,O,te,x,null)}g=F,x=X,p.multiple=!!T,g!=null?zl(p,!!T,g,!1):x!=null&&zl(p,!!T,x,!0);return;case"textarea":Ln("invalid",p),F=O=T=null;for(X in x)if(x.hasOwnProperty(X)&&(te=x[X],te!=null))switch(X){case"value":T=te;break;case"defaultValue":O=te;break;case"children":F=te;break;case"dangerouslySetInnerHTML":if(te!=null)throw Error(r(91));break;default:fr(p,g,X,te,x,null)}o1(p,T,O,F);return;case"option":for(he in x)if(x.hasOwnProperty(he)&&(T=x[he],T!=null))switch(he){case"selected":p.selected=T&&typeof T!="function"&&typeof T!="symbol";break;default:fr(p,g,he,T,x,null)}return;case"dialog":Ln("beforetoggle",p),Ln("toggle",p),Ln("cancel",p),Ln("close",p);break;case"iframe":case"object":Ln("load",p);break;case"video":case"audio":for(T=0;T<P1.length;T++)Ln(P1[T],p);break;case"image":Ln("error",p),Ln("load",p);break;case"details":Ln("toggle",p);break;case"embed":case"source":case"link":Ln("error",p),Ln("load",p);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(Ie in x)if(x.hasOwnProperty(Ie)&&(T=x[Ie],T!=null))switch(Ie){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,g));default:fr(p,g,Ie,T,x,null)}return;default:if(Ue(g)){for(Xe in x)x.hasOwnProperty(Xe)&&(T=x[Xe],T!==void 0&&K5(p,g,Xe,T,x,void 0));return}}for(te in x)x.hasOwnProperty(te)&&(T=x[te],T!=null&&fr(p,g,te,T,x,null))}function zle(p,g,x,T){switch(g){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var O=null,F=null,X=null,te=null,he=null,Ie=null,Xe=null;for(Pe in x){var it=x[Pe];if(x.hasOwnProperty(Pe)&&it!=null)switch(Pe){case"checked":break;case"value":break;case"defaultValue":he=it;default:T.hasOwnProperty(Pe)||fr(p,g,Pe,null,T,it)}}for(var Oe in T){var Pe=T[Oe];if(it=x[Oe],T.hasOwnProperty(Oe)&&(Pe!=null||it!=null))switch(Oe){case"type":F=Pe;break;case"name":O=Pe;break;case"checked":Ie=Pe;break;case"defaultChecked":Xe=Pe;break;case"value":X=Pe;break;case"defaultValue":te=Pe;break;case"children":case"dangerouslySetInnerHTML":if(Pe!=null)throw Error(r(137,g));break;default:Pe!==it&&fr(p,g,Oe,Pe,T,it)}}n1(p,X,te,he,Ie,Xe,F,O);return;case"select":Pe=X=te=Oe=null;for(F in x)if(he=x[F],x.hasOwnProperty(F)&&he!=null)switch(F){case"value":break;case"multiple":Pe=he;default:T.hasOwnProperty(F)||fr(p,g,F,null,T,he)}for(O in T)if(F=T[O],he=x[O],T.hasOwnProperty(O)&&(F!=null||he!=null))switch(O){case"value":Oe=F;break;case"defaultValue":te=F;break;case"multiple":X=F;default:F!==he&&fr(p,g,O,F,T,he)}g=te,x=X,T=Pe,Oe!=null?zl(p,!!x,Oe,!1):!!T!=!!x&&(g!=null?zl(p,!!x,g,!0):zl(p,!!x,x?[]:"",!1));return;case"textarea":Pe=Oe=null;for(te in x)if(O=x[te],x.hasOwnProperty(te)&&O!=null&&!T.hasOwnProperty(te))switch(te){case"value":break;case"children":break;default:fr(p,g,te,null,T,O)}for(X in T)if(O=T[X],F=x[X],T.hasOwnProperty(X)&&(O!=null||F!=null))switch(X){case"value":Oe=O;break;case"defaultValue":Pe=O;break;case"children":break;case"dangerouslySetInnerHTML":if(O!=null)throw Error(r(91));break;default:O!==F&&fr(p,g,X,O,T,F)}s1(p,Oe,Pe);return;case"option":for(var Wt in x)if(Oe=x[Wt],x.hasOwnProperty(Wt)&&Oe!=null&&!T.hasOwnProperty(Wt))switch(Wt){case"selected":p.selected=!1;break;default:fr(p,g,Wt,null,T,Oe)}for(he in T)if(Oe=T[he],Pe=x[he],T.hasOwnProperty(he)&&Oe!==Pe&&(Oe!=null||Pe!=null))switch(he){case"selected":p.selected=Oe&&typeof Oe!="function"&&typeof Oe!="symbol";break;default:fr(p,g,he,Oe,T,Pe)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var fn in x)Oe=x[fn],x.hasOwnProperty(fn)&&Oe!=null&&!T.hasOwnProperty(fn)&&fr(p,g,fn,null,T,Oe);for(Ie in T)if(Oe=T[Ie],Pe=x[Ie],T.hasOwnProperty(Ie)&&Oe!==Pe&&(Oe!=null||Pe!=null))switch(Ie){case"children":case"dangerouslySetInnerHTML":if(Oe!=null)throw Error(r(137,g));break;default:fr(p,g,Ie,Oe,T,Pe)}return;default:if(Ue(g)){for(var pr in x)Oe=x[pr],x.hasOwnProperty(pr)&&Oe!==void 0&&!T.hasOwnProperty(pr)&&K5(p,g,pr,void 0,T,Oe);for(Xe in T)Oe=T[Xe],Pe=x[Xe],!T.hasOwnProperty(Xe)||Oe===Pe||Oe===void 0&&Pe===void 0||K5(p,g,Xe,Oe,T,Pe);return}}for(var ke in x)Oe=x[ke],x.hasOwnProperty(ke)&&Oe!=null&&!T.hasOwnProperty(ke)&&fr(p,g,ke,null,T,Oe);for(it in T)Oe=T[it],Pe=x[it],!T.hasOwnProperty(it)||Oe===Pe||Oe==null&&Pe==null||fr(p,g,it,Oe,T,Pe)}function uL(p){switch(p){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function Ple(){if(typeof performance.getEntriesByType=="function"){for(var p=0,g=0,x=performance.getEntriesByType("resource"),T=0;T<x.length;T++){var O=x[T],F=O.transferSize,X=O.initiatorType,te=O.duration;if(F&&te&&uL(X)){for(X=0,te=O.responseEnd,T+=1;T<x.length;T++){var he=x[T],Ie=he.startTime;if(Ie>te)break;var Xe=he.transferSize,it=he.initiatorType;Xe&&uL(it)&&(he=he.responseEnd,X+=Xe*(he<te?1:(te-Ie)/(he-Ie)))}if(--T,g+=8*(F+X)/(O.duration/1e3),p++,10<p)break}}if(0<p)return g/p/1e6}return navigator.connection&&(p=navigator.connection.downlink,typeof p=="number")?p:5}var X5=null,Z5=null;function uv(p){return p.nodeType===9?p:p.ownerDocument}function dL(p){switch(p){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function fL(p,g){if(p===0)switch(g){case"svg":return 1;case"math":return 2;default:return 0}return p===1&&g==="foreignObject"?0:p}function Q5(p,g){return p==="textarea"||p==="noscript"||typeof g.children=="string"||typeof g.children=="number"||typeof g.children=="bigint"||typeof g.dangerouslySetInnerHTML=="object"&&g.dangerouslySetInnerHTML!==null&&g.dangerouslySetInnerHTML.__html!=null}var J5=null;function Ble(){var p=window.event;return p&&p.type==="popstate"?p===J5?!1:(J5=p,!0):(J5=null,!1)}var pL=typeof setTimeout=="function"?setTimeout:void 0,Hle=typeof clearTimeout=="function"?clearTimeout:void 0,hL=typeof Promise=="function"?Promise:void 0,Ule=typeof queueMicrotask=="function"?queueMicrotask:typeof hL<"u"?function(p){return hL.resolve(null).then(p).catch(Vle)}:pL;function Vle(p){setTimeout(function(){throw p})}function hu(p){return p==="head"}function mL(p,g){var x=g,T=0;do{var O=x.nextSibling;if(p.removeChild(x),O&&O.nodeType===8)if(x=O.data,x==="/$"||x==="/&"){if(T===0){p.removeChild(O),Kp(g);return}T--}else if(x==="$"||x==="$?"||x==="$~"||x==="$!"||x==="&")T++;else if(x==="html")H1(p.ownerDocument.documentElement);else if(x==="head"){x=p.ownerDocument.head,H1(x);for(var F=x.firstChild;F;){var X=F.nextSibling,te=F.nodeName;F[ht]||te==="SCRIPT"||te==="STYLE"||te==="LINK"&&F.rel.toLowerCase()==="stylesheet"||x.removeChild(F),F=X}}else x==="body"&&H1(p.ownerDocument.body);x=O}while(x);Kp(g)}function gL(p,g){var x=p;p=0;do{var T=x.nextSibling;if(x.nodeType===1?g?(x._stashedDisplay=x.style.display,x.style.display="none"):(x.style.display=x._stashedDisplay||"",x.getAttribute("style")===""&&x.removeAttribute("style")):x.nodeType===3&&(g?(x._stashedText=x.nodeValue,x.nodeValue=""):x.nodeValue=x._stashedText||""),T&&T.nodeType===8)if(x=T.data,x==="/$"){if(p===0)break;p--}else x!=="$"&&x!=="$?"&&x!=="$~"&&x!=="$!"||p++;x=T}while(x)}function e6(p){var g=p.firstChild;for(g&&g.nodeType===10&&(g=g.nextSibling);g;){var x=g;switch(g=g.nextSibling,x.nodeName){case"HTML":case"HEAD":case"BODY":e6(x),oe(x);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(x.rel.toLowerCase()==="stylesheet")continue}p.removeChild(x)}}function qle(p,g,x,T){for(;p.nodeType===1;){var O=x;if(p.nodeName.toLowerCase()!==g.toLowerCase()){if(!T&&(p.nodeName!=="INPUT"||p.type!=="hidden"))break}else if(T){if(!p[ht])switch(g){case"meta":if(!p.hasAttribute("itemprop"))break;return p;case"link":if(F=p.getAttribute("rel"),F==="stylesheet"&&p.hasAttribute("data-precedence"))break;if(F!==O.rel||p.getAttribute("href")!==(O.href==null||O.href===""?null:O.href)||p.getAttribute("crossorigin")!==(O.crossOrigin==null?null:O.crossOrigin)||p.getAttribute("title")!==(O.title==null?null:O.title))break;return p;case"style":if(p.hasAttribute("data-precedence"))break;return p;case"script":if(F=p.getAttribute("src"),(F!==(O.src==null?null:O.src)||p.getAttribute("type")!==(O.type==null?null:O.type)||p.getAttribute("crossorigin")!==(O.crossOrigin==null?null:O.crossOrigin))&&F&&p.hasAttribute("async")&&!p.hasAttribute("itemprop"))break;return p;default:return p}}else if(g==="input"&&p.type==="hidden"){var F=O.name==null?null:""+O.name;if(O.type==="hidden"&&p.getAttribute("name")===F)return p}else return p;if(p=Ni(p.nextSibling),p===null)break}return null}function Wle(p,g,x){if(g==="")return null;for(;p.nodeType!==3;)if((p.nodeType!==1||p.nodeName!=="INPUT"||p.type!=="hidden")&&!x||(p=Ni(p.nextSibling),p===null))return null;return p}function yL(p,g){for(;p.nodeType!==8;)if((p.nodeType!==1||p.nodeName!=="INPUT"||p.type!=="hidden")&&!g||(p=Ni(p.nextSibling),p===null))return null;return p}function t6(p){return p.data==="$?"||p.data==="$~"}function n6(p){return p.data==="$!"||p.data==="$?"&&p.ownerDocument.readyState!=="loading"}function Yle(p,g){var x=p.ownerDocument;if(p.data==="$~")p._reactRetry=g;else if(p.data!=="$?"||x.readyState!=="loading")g();else{var T=function(){g(),x.removeEventListener("DOMContentLoaded",T)};x.addEventListener("DOMContentLoaded",T),p._reactRetry=T}}function Ni(p){for(;p!=null;p=p.nextSibling){var g=p.nodeType;if(g===1||g===3)break;if(g===8){if(g=p.data,g==="$"||g==="$!"||g==="$?"||g==="$~"||g==="&"||g==="F!"||g==="F")break;if(g==="/$"||g==="/&")return null}}return p}var r6=null;function vL(p){p=p.nextSibling;for(var g=0;p;){if(p.nodeType===8){var x=p.data;if(x==="/$"||x==="/&"){if(g===0)return Ni(p.nextSibling);g--}else x!=="$"&&x!=="$!"&&x!=="$?"&&x!=="$~"&&x!=="&"||g++}p=p.nextSibling}return null}function bL(p){p=p.previousSibling;for(var g=0;p;){if(p.nodeType===8){var x=p.data;if(x==="$"||x==="$!"||x==="$?"||x==="$~"||x==="&"){if(g===0)return p;g--}else x!=="/$"&&x!=="/&"||g++}p=p.previousSibling}return null}function xL(p,g,x){switch(g=uv(x),p){case"html":if(p=g.documentElement,!p)throw Error(r(452));return p;case"head":if(p=g.head,!p)throw Error(r(453));return p;case"body":if(p=g.body,!p)throw Error(r(454));return p;default:throw Error(r(451))}}function H1(p){for(var g=p.attributes;g.length;)p.removeAttributeNode(g[0]);oe(p)}var Li=new Map,wL=new Set;function dv(p){return typeof p.getRootNode=="function"?p.getRootNode():p.nodeType===9?p:p.ownerDocument}var nc=H.d;H.d={f:Gle,r:Kle,D:Xle,C:Zle,L:Qle,m:Jle,X:tce,S:ece,M:nce};function Gle(){var p=nc.f(),g=nv();return p||g}function Kle(p){var g=ut(p);g!==null&&g.tag===5&&g.type==="form"?FO(g):nc.r(p)}var Wp=typeof document>"u"?null:document;function SL(p,g,x){var T=Wp;if(T&&typeof g=="string"&&g){var O=zo(g);O='link[rel="'+p+'"][href="'+O+'"]',typeof x=="string"&&(O+='[crossorigin="'+x+'"]'),wL.has(O)||(wL.add(O),p={rel:p,crossOrigin:x,href:g},T.querySelector(O)===null&&(g=T.createElement("link"),qs(g,"link",p),nn(g),T.head.appendChild(g)))}}function Xle(p){nc.D(p),SL("dns-prefetch",p,null)}function Zle(p,g){nc.C(p,g),SL("preconnect",p,g)}function Qle(p,g,x){nc.L(p,g,x);var T=Wp;if(T&&p&&g){var O='link[rel="preload"][as="'+zo(g)+'"]';g==="image"&&x&&x.imageSrcSet?(O+='[imagesrcset="'+zo(x.imageSrcSet)+'"]',typeof x.imageSizes=="string"&&(O+='[imagesizes="'+zo(x.imageSizes)+'"]')):O+='[href="'+zo(p)+'"]';var F=O;switch(g){case"style":F=Yp(p);break;case"script":F=Gp(p)}Li.has(F)||(p=f({rel:"preload",href:g==="image"&&x&&x.imageSrcSet?void 0:p,as:g},x),Li.set(F,p),T.querySelector(O)!==null||g==="style"&&T.querySelector(U1(F))||g==="script"&&T.querySelector(V1(F))||(g=T.createElement("link"),qs(g,"link",p),nn(g),T.head.appendChild(g)))}}function Jle(p,g){nc.m(p,g);var x=Wp;if(x&&p){var T=g&&typeof g.as=="string"?g.as:"script",O='link[rel="modulepreload"][as="'+zo(T)+'"][href="'+zo(p)+'"]',F=O;switch(T){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":F=Gp(p)}if(!Li.has(F)&&(p=f({rel:"modulepreload",href:p},g),Li.set(F,p),x.querySelector(O)===null)){switch(T){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(x.querySelector(V1(F)))return}T=x.createElement("link"),qs(T,"link",p),nn(T),x.head.appendChild(T)}}}function ece(p,g,x){nc.S(p,g,x);var T=Wp;if(T&&p){var O=Mn(T).hoistableStyles,F=Yp(p);g=g||"default";var X=O.get(F);if(!X){var te={loading:0,preload:null};if(X=T.querySelector(U1(F)))te.loading=5;else{p=f({rel:"stylesheet",href:p,"data-precedence":g},x),(x=Li.get(F))&&s6(p,x);var he=X=T.createElement("link");nn(he),qs(he,"link",p),he._p=new Promise(function(Ie,Xe){he.onload=Ie,he.onerror=Xe}),he.addEventListener("load",function(){te.loading|=1}),he.addEventListener("error",function(){te.loading|=2}),te.loading|=4,fv(X,g,T)}X={type:"stylesheet",instance:X,count:1,state:te},O.set(F,X)}}}function tce(p,g){nc.X(p,g);var x=Wp;if(x&&p){var T=Mn(x).hoistableScripts,O=Gp(p),F=T.get(O);F||(F=x.querySelector(V1(O)),F||(p=f({src:p,async:!0},g),(g=Li.get(O))&&o6(p,g),F=x.createElement("script"),nn(F),qs(F,"link",p),x.head.appendChild(F)),F={type:"script",instance:F,count:1,state:null},T.set(O,F))}}function nce(p,g){nc.M(p,g);var x=Wp;if(x&&p){var T=Mn(x).hoistableScripts,O=Gp(p),F=T.get(O);F||(F=x.querySelector(V1(O)),F||(p=f({src:p,async:!0,type:"module"},g),(g=Li.get(O))&&o6(p,g),F=x.createElement("script"),nn(F),qs(F,"link",p),x.head.appendChild(F)),F={type:"script",instance:F,count:1,state:null},T.set(O,F))}}function CL(p,g,x,T){var O=(O=Q.current)?dv(O):null;if(!O)throw Error(r(446));switch(p){case"meta":case"title":return null;case"style":return typeof x.precedence=="string"&&typeof x.href=="string"?(g=Yp(x.href),x=Mn(O).hoistableStyles,T=x.get(g),T||(T={type:"style",instance:null,count:0,state:null},x.set(g,T)),T):{type:"void",instance:null,count:0,state:null};case"link":if(x.rel==="stylesheet"&&typeof x.href=="string"&&typeof x.precedence=="string"){p=Yp(x.href);var F=Mn(O).hoistableStyles,X=F.get(p);if(X||(O=O.ownerDocument||O,X={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},F.set(p,X),(F=O.querySelector(U1(p)))&&!F._p&&(X.instance=F,X.state.loading=5),Li.has(p)||(x={rel:"preload",as:"style",href:x.href,crossOrigin:x.crossOrigin,integrity:x.integrity,media:x.media,hrefLang:x.hrefLang,referrerPolicy:x.referrerPolicy},Li.set(p,x),F||rce(O,p,x,X.state))),g&&T===null)throw Error(r(528,""));return X}if(g&&T!==null)throw Error(r(529,""));return null;case"script":return g=x.async,x=x.src,typeof x=="string"&&g&&typeof g!="function"&&typeof g!="symbol"?(g=Gp(x),x=Mn(O).hoistableScripts,T=x.get(g),T||(T={type:"script",instance:null,count:0,state:null},x.set(g,T)),T):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,p))}}function Yp(p){return'href="'+zo(p)+'"'}function U1(p){return'link[rel="stylesheet"]['+p+"]"}function kL(p){return f({},p,{"data-precedence":p.precedence,precedence:null})}function rce(p,g,x,T){p.querySelector('link[rel="preload"][as="style"]['+g+"]")?T.loading=1:(g=p.createElement("link"),T.preload=g,g.addEventListener("load",function(){return T.loading|=1}),g.addEventListener("error",function(){return T.loading|=2}),qs(g,"link",x),nn(g),p.head.appendChild(g))}function Gp(p){return'[src="'+zo(p)+'"]'}function V1(p){return"script[async]"+p}function EL(p,g,x){if(g.count++,g.instance===null)switch(g.type){case"style":var T=p.querySelector('style[data-href~="'+zo(x.href)+'"]');if(T)return g.instance=T,nn(T),T;var O=f({},x,{"data-href":x.href,"data-precedence":x.precedence,href:null,precedence:null});return T=(p.ownerDocument||p).createElement("style"),nn(T),qs(T,"style",O),fv(T,x.precedence,p),g.instance=T;case"stylesheet":O=Yp(x.href);var F=p.querySelector(U1(O));if(F)return g.state.loading|=4,g.instance=F,nn(F),F;T=kL(x),(O=Li.get(O))&&s6(T,O),F=(p.ownerDocument||p).createElement("link"),nn(F);var X=F;return X._p=new Promise(function(te,he){X.onload=te,X.onerror=he}),qs(F,"link",T),g.state.loading|=4,fv(F,x.precedence,p),g.instance=F;case"script":return F=Gp(x.src),(O=p.querySelector(V1(F)))?(g.instance=O,nn(O),O):(T=x,(O=Li.get(F))&&(T=f({},x),o6(T,O)),p=p.ownerDocument||p,O=p.createElement("script"),nn(O),qs(O,"link",T),p.head.appendChild(O),g.instance=O);case"void":return null;default:throw Error(r(443,g.type))}else g.type==="stylesheet"&&(g.state.loading&4)===0&&(T=g.instance,g.state.loading|=4,fv(T,x.precedence,p));return g.instance}function fv(p,g,x){for(var T=x.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),O=T.length?T[T.length-1]:null,F=O,X=0;X<T.length;X++){var te=T[X];if(te.dataset.precedence===g)F=te;else if(F!==O)break}F?F.parentNode.insertBefore(p,F.nextSibling):(g=x.nodeType===9?x.head:x,g.insertBefore(p,g.firstChild))}function s6(p,g){p.crossOrigin==null&&(p.crossOrigin=g.crossOrigin),p.referrerPolicy==null&&(p.referrerPolicy=g.referrerPolicy),p.title==null&&(p.title=g.title)}function o6(p,g){p.crossOrigin==null&&(p.crossOrigin=g.crossOrigin),p.referrerPolicy==null&&(p.referrerPolicy=g.referrerPolicy),p.integrity==null&&(p.integrity=g.integrity)}var pv=null;function TL(p,g,x){if(pv===null){var T=new Map,O=pv=new Map;O.set(x,T)}else O=pv,T=O.get(x),T||(T=new Map,O.set(x,T));if(T.has(p))return T;for(T.set(p,null),x=x.getElementsByTagName(p),O=0;O<x.length;O++){var F=x[O];if(!(F[ht]||F[rt]||p==="link"&&F.getAttribute("rel")==="stylesheet")&&F.namespaceURI!=="http://www.w3.org/2000/svg"){var X=F.getAttribute(g)||"";X=p+X;var te=T.get(X);te?te.push(F):T.set(X,[F])}}return T}function ML(p,g,x){p=p.ownerDocument||p,p.head.insertBefore(x,g==="title"?p.querySelector("head > title"):null)}function sce(p,g,x){if(x===1||g.itemProp!=null)return!1;switch(p){case"meta":case"title":return!0;case"style":if(typeof g.precedence!="string"||typeof g.href!="string"||g.href==="")break;return!0;case"link":if(typeof g.rel!="string"||typeof g.href!="string"||g.href===""||g.onLoad||g.onError)break;switch(g.rel){case"stylesheet":return p=g.disabled,typeof g.precedence=="string"&&p==null;default:return!0}case"script":if(g.async&&typeof g.async!="function"&&typeof g.async!="symbol"&&!g.onLoad&&!g.onError&&g.src&&typeof g.src=="string")return!0}return!1}function jL(p){return!(p.type==="stylesheet"&&(p.state.loading&3)===0)}function oce(p,g,x,T){if(x.type==="stylesheet"&&(typeof T.media!="string"||matchMedia(T.media).matches!==!1)&&(x.state.loading&4)===0){if(x.instance===null){var O=Yp(T.href),F=g.querySelector(U1(O));if(F){g=F._p,g!==null&&typeof g=="object"&&typeof g.then=="function"&&(p.count++,p=hv.bind(p),g.then(p,p)),x.state.loading|=4,x.instance=F,nn(F);return}F=g.ownerDocument||g,T=kL(T),(O=Li.get(O))&&s6(T,O),F=F.createElement("link"),nn(F);var X=F;X._p=new Promise(function(te,he){X.onload=te,X.onerror=he}),qs(F,"link",T),x.instance=F}p.stylesheets===null&&(p.stylesheets=new Map),p.stylesheets.set(x,g),(g=x.state.preload)&&(x.state.loading&3)===0&&(p.count++,x=hv.bind(p),g.addEventListener("load",x),g.addEventListener("error",x))}}var i6=0;function ice(p,g){return p.stylesheets&&p.count===0&&gv(p,p.stylesheets),0<p.count||0<p.imgCount?function(x){var T=setTimeout(function(){if(p.stylesheets&&gv(p,p.stylesheets),p.unsuspend){var F=p.unsuspend;p.unsuspend=null,F()}},6e4+g);0<p.imgBytes&&i6===0&&(i6=62500*Ple());var O=setTimeout(function(){if(p.waitingForImages=!1,p.count===0&&(p.stylesheets&&gv(p,p.stylesheets),p.unsuspend)){var F=p.unsuspend;p.unsuspend=null,F()}},(p.imgBytes>i6?50:800)+g);return p.unsuspend=x,function(){p.unsuspend=null,clearTimeout(T),clearTimeout(O)}}:null}function hv(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)gv(this,this.stylesheets);else if(this.unsuspend){var p=this.unsuspend;this.unsuspend=null,p()}}}var mv=null;function gv(p,g){p.stylesheets=null,p.unsuspend!==null&&(p.count++,mv=new Map,g.forEach(ace,p),mv=null,hv.call(p))}function ace(p,g){if(!(g.state.loading&4)){var x=mv.get(p);if(x)var T=x.get(null);else{x=new Map,mv.set(p,x);for(var O=p.querySelectorAll("link[data-precedence],style[data-precedence]"),F=0;F<O.length;F++){var X=O[F];(X.nodeName==="LINK"||X.getAttribute("media")!=="not all")&&(x.set(X.dataset.precedence,X),T=X)}T&&x.set(null,T)}O=g.instance,X=O.getAttribute("data-precedence"),F=x.get(X)||T,F===T&&x.set(null,O),x.set(X,O),this.count++,T=hv.bind(this),O.addEventListener("load",T),O.addEventListener("error",T),F?F.parentNode.insertBefore(O,F.nextSibling):(p=p.nodeType===9?p.head:p,p.insertBefore(O,p.firstChild)),g.state.loading|=4}}var q1={$$typeof:k,Provider:null,Consumer:null,_currentValue:$,_currentValue2:$,_threadCount:0};function lce(p,g,x,T,O,F,X,te,he){this.tag=1,this.containerInfo=p,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=cn(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=cn(0),this.hiddenUpdates=cn(null),this.identifierPrefix=T,this.onUncaughtError=O,this.onCaughtError=F,this.onRecoverableError=X,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=he,this.incompleteTransitions=new Map}function AL(p,g,x,T,O,F,X,te,he,Ie,Xe,it){return p=new lce(p,g,x,X,he,Ie,Xe,it,te),g=1,F===!0&&(g|=24),F=ai(3,null,null,g),p.current=F,F.stateNode=p,g=zC(),g.refCount++,p.pooledCache=g,g.refCount++,F.memoizedState={element:T,isDehydrated:x,cache:g},UC(F),p}function _L(p){return p?(p=Ep,p):Ep}function RL(p,g,x,T,O,F){O=_L(O),T.context===null?T.context=O:T.pendingContext=O,T=ru(g),T.payload={element:x},F=F===void 0?null:F,F!==null&&(T.callback=F),x=su(p,T,g),x!==null&&(qo(x,p,g),C1(x,p,g))}function DL(p,g){if(p=p.memoizedState,p!==null&&p.dehydrated!==null){var x=p.retryLane;p.retryLane=x!==0&&x<g?x:g}}function a6(p,g){DL(p,g),(p=p.alternate)&&DL(p,g)}function IL(p){if(p.tag===13||p.tag===31){var g=Ud(p,67108864);g!==null&&qo(g,p,67108864),a6(p,67108864)}}function OL(p){if(p.tag===13||p.tag===31){var g=fi();g=de(g);var x=Ud(p,g);x!==null&&qo(x,p,g),a6(p,g)}}var yv=!0;function cce(p,g,x,T){var O=I.T;I.T=null;var F=H.p;try{H.p=2,l6(p,g,x,T)}finally{H.p=F,I.T=O}}function uce(p,g,x,T){var O=I.T;I.T=null;var F=H.p;try{H.p=8,l6(p,g,x,T)}finally{H.p=F,I.T=O}}function l6(p,g,x,T){if(yv){var O=c6(T);if(O===null)G5(p,g,T,vv,x),LL(p,T);else if(fce(O,p,g,x,T))T.stopPropagation();else if(LL(p,T),g&4&&-1<dce.indexOf(p)){for(;O!==null;){var F=ut(O);if(F!==null)switch(F.tag){case 3:if(F=F.stateNode,F.current.memoizedState.isDehydrated){var X=vt(F.pendingLanes);if(X!==0){var te=F;for(te.pendingLanes|=2,te.entangledLanes|=2;X;){var he=1<<31-We(X);te.entanglements[1]|=he,X&=~he}Za(F),(Gn&6)===0&&(ev=Ye()+500,z1(0))}}break;case 31:case 13:te=Ud(F,2),te!==null&&qo(te,F,2),nv(),a6(F,2)}if(F=c6(T),F===null&&G5(p,g,T,vv,x),F===O)break;O=F}O!==null&&T.stopPropagation()}else G5(p,g,T,null,x)}}function c6(p){return p=ro(p),u6(p)}var vv=null;function u6(p){if(vv=null,p=Ne(p),p!==null){var g=o(p);if(g===null)p=null;else{var x=g.tag;if(x===13){if(p=i(g),p!==null)return p;p=null}else if(x===31){if(p=a(g),p!==null)return p;p=null}else if(x===3){if(g.stateNode.current.memoizedState.isDehydrated)return g.tag===3?g.stateNode.containerInfo:null;p=null}else g!==p&&(p=null)}}return vv=p,null}function NL(p){switch(p){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(ge()){case Fe:return 2;case Se:return 8;case qe:case ot:return 32;case $e:return 268435456;default:return 32}default:return 32}}var d6=!1,mu=null,gu=null,yu=null,W1=new Map,Y1=new Map,vu=[],dce="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function LL(p,g){switch(p){case"focusin":case"focusout":mu=null;break;case"dragenter":case"dragleave":gu=null;break;case"mouseover":case"mouseout":yu=null;break;case"pointerover":case"pointerout":W1.delete(g.pointerId);break;case"gotpointercapture":case"lostpointercapture":Y1.delete(g.pointerId)}}function G1(p,g,x,T,O,F){return p===null||p.nativeEvent!==F?(p={blockedOn:g,domEventName:x,eventSystemFlags:T,nativeEvent:F,targetContainers:[O]},g!==null&&(g=ut(g),g!==null&&IL(g)),p):(p.eventSystemFlags|=T,g=p.targetContainers,O!==null&&g.indexOf(O)===-1&&g.push(O),p)}function fce(p,g,x,T,O){switch(g){case"focusin":return mu=G1(mu,p,g,x,T,O),!0;case"dragenter":return gu=G1(gu,p,g,x,T,O),!0;case"mouseover":return yu=G1(yu,p,g,x,T,O),!0;case"pointerover":var F=O.pointerId;return W1.set(F,G1(W1.get(F)||null,p,g,x,T,O)),!0;case"gotpointercapture":return F=O.pointerId,Y1.set(F,G1(Y1.get(F)||null,p,g,x,T,O)),!0}return!1}function $L(p){var g=Ne(p.target);if(g!==null){var x=o(g);if(x!==null){if(g=x.tag,g===13){if(g=i(x),g!==null){p.blockedOn=g,Qe(p.priority,function(){OL(x)});return}}else if(g===31){if(g=a(x),g!==null){p.blockedOn=g,Qe(p.priority,function(){OL(x)});return}}else if(g===3&&x.stateNode.current.memoizedState.isDehydrated){p.blockedOn=x.tag===3?x.stateNode.containerInfo:null;return}}}p.blockedOn=null}function bv(p){if(p.blockedOn!==null)return!1;for(var g=p.targetContainers;0<g.length;){var x=c6(p.nativeEvent);if(x===null){x=p.nativeEvent;var T=new x.constructor(x.type,x);qr=T,x.target.dispatchEvent(T),qr=null}else return g=ut(x),g!==null&&IL(g),p.blockedOn=x,!1;g.shift()}return!0}function FL(p,g,x){bv(p)&&x.delete(g)}function pce(){d6=!1,mu!==null&&bv(mu)&&(mu=null),gu!==null&&bv(gu)&&(gu=null),yu!==null&&bv(yu)&&(yu=null),W1.forEach(FL),Y1.forEach(FL)}function xv(p,g){p.blockedOn===g&&(p.blockedOn=null,d6||(d6=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,pce)))}var wv=null;function zL(p){wv!==p&&(wv=p,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){wv===p&&(wv=null);for(var g=0;g<p.length;g+=3){var x=p[g],T=p[g+1],O=p[g+2];if(typeof T!="function"){if(u6(T||x)===null)continue;break}var F=ut(x);F!==null&&(p.splice(g,3),g-=3,c5(F,{pending:!0,data:O,method:x.method,action:T},T,O))}}))}function Kp(p){function g(he){return xv(he,p)}mu!==null&&xv(mu,p),gu!==null&&xv(gu,p),yu!==null&&xv(yu,p),W1.forEach(g),Y1.forEach(g);for(var x=0;x<vu.length;x++){var T=vu[x];T.blockedOn===p&&(T.blockedOn=null)}for(;0<vu.length&&(x=vu[0],x.blockedOn===null);)$L(x),x.blockedOn===null&&vu.shift();if(x=(p.ownerDocument||p).$$reactFormReplay,x!=null)for(T=0;T<x.length;T+=3){var O=x[T],F=x[T+1],X=O[st]||null;if(typeof F=="function")X||zL(x);else if(X){var te=null;if(F&&F.hasAttribute("formAction")){if(O=F,X=F[st]||null)te=X.formAction;else if(u6(O)!==null)continue}else te=X.action;typeof te=="function"?x[T+1]=te:(x.splice(T,3),T-=3),zL(x)}}}function PL(){function p(F){F.canIntercept&&F.info==="react-transition"&&F.intercept({handler:function(){return new Promise(function(X){return O=X})},focusReset:"manual",scroll:"manual"})}function g(){O!==null&&(O(),O=null),T||setTimeout(x,20)}function x(){if(!T&&!navigation.transition){var F=navigation.currentEntry;F&&F.url!=null&&navigation.navigate(F.url,{state:F.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var T=!1,O=null;return navigation.addEventListener("navigate",p),navigation.addEventListener("navigatesuccess",g),navigation.addEventListener("navigateerror",g),setTimeout(x,100),function(){T=!0,navigation.removeEventListener("navigate",p),navigation.removeEventListener("navigatesuccess",g),navigation.removeEventListener("navigateerror",g),O!==null&&(O(),O=null)}}}function f6(p){this._internalRoot=p}Sv.prototype.render=f6.prototype.render=function(p){var g=this._internalRoot;if(g===null)throw Error(r(409));var x=g.current,T=fi();RL(x,T,p,g,null,null)},Sv.prototype.unmount=f6.prototype.unmount=function(){var p=this._internalRoot;if(p!==null){this._internalRoot=null;var g=p.containerInfo;RL(p.current,2,null,p,null,null),nv(),g[Mt]=null}};function Sv(p){this._internalRoot=p}Sv.prototype.unstable_scheduleHydration=function(p){if(p){var g=De();p={blockedOn:null,target:p,priority:g};for(var x=0;x<vu.length&&g!==0&&g<vu[x].priority;x++);vu.splice(x,0,p),x===0&&$L(p)}};var BL=e.version;if(BL!=="19.2.4")throw Error(r(527,BL,"19.2.4"));H.findDOMNode=function(p){var g=p._reactInternals;if(g===void 0)throw typeof p.render=="function"?Error(r(188)):(p=Object.keys(p).join(","),Error(r(268,p)));return p=c(g),p=p!==null?u(p):null,p=p===null?null:p.stateNode,p};var hce={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:I,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Cv=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Cv.isDisabled&&Cv.supportsFiber)try{Pt=Cv.inject(hce),at=Cv}catch{}}return X1.createRoot=function(p,g){if(!s(p))throw Error(r(299));var x=!1,T="",O=GO,F=KO,X=XO;return g!=null&&(g.unstable_strictMode===!0&&(x=!0),g.identifierPrefix!==void 0&&(T=g.identifierPrefix),g.onUncaughtError!==void 0&&(O=g.onUncaughtError),g.onCaughtError!==void 0&&(F=g.onCaughtError),g.onRecoverableError!==void 0&&(X=g.onRecoverableError)),g=AL(p,1,!1,null,null,x,T,null,O,F,X,PL),p[Mt]=g.current,Y5(p),new f6(g)},X1.hydrateRoot=function(p,g,x){if(!s(p))throw Error(r(299));var T=!1,O="",F=GO,X=KO,te=XO,he=null;return x!=null&&(x.unstable_strictMode===!0&&(T=!0),x.identifierPrefix!==void 0&&(O=x.identifierPrefix),x.onUncaughtError!==void 0&&(F=x.onUncaughtError),x.onCaughtError!==void 0&&(X=x.onCaughtError),x.onRecoverableError!==void 0&&(te=x.onRecoverableError),x.formState!==void 0&&(he=x.formState)),g=AL(p,1,!0,g,x??null,T,O,he,F,X,te,PL),g.context=_L(null),x=g.current,T=fi(),T=de(T),O=ru(T),O.callback=null,su(x,O,T),x=T,g.current.lanes=x,qt(g,x),Za(g),p[Mt]=g.current,Y5(p),new Sv(g)},X1.version="19.2.4",X1}var ZL;function Tce(){if(ZL)return h6.exports;ZL=1;function t(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(e){console.error(e)}}return t(),h6.exports=Ece(),h6.exports}var Mce=Tce();const jce=ks(Mce);var S=Zf();const It=ks(S),lg=vce({__proto__:null,default:It},[S]);var b6={exports:{}},x6={};/**
 * @license React
 * use-sync-external-store-with-selector.production.js
 *
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var QL;function Ace(){if(QL)return x6;QL=1;var t=Zf();function e(l,c){return l===c&&(l!==0||1/l===1/c)||l!==l&&c!==c}var n=typeof Object.is=="function"?Object.is:e,r=t.useSyncExternalStore,s=t.useRef,o=t.useEffect,i=t.useMemo,a=t.useDebugValue;return x6.useSyncExternalStoreWithSelector=function(l,c,u,f,h){var m=s(null);if(m.current===null){var y={hasValue:!1,value:null};m.current=y}else y=m.current;m=i(function(){function b(j){if(!w){if(w=!0,C=j,j=f(j),h!==void 0&&y.hasValue){var A=y.value;if(h(A,j))return k=A}return k=j}if(A=k,n(C,j))return A;var M=f(j);return h!==void 0&&h(A,M)?(C=j,A):(C=j,k=M)}var w=!1,C,k,E=u===void 0?null:u;return[function(){return b(c())},E===null?void 0:function(){return b(E())}]},[c,u,f,h]);var v=r(l,m[0],m[1]);return o(function(){y.hasValue=!0,y.value=v},[v]),a(v),v},x6}var JL;function _ce(){return JL||(JL=1,b6.exports=Ace()),b6.exports}var Rce=_ce();function Dce(t){t()}function Ice(){let t=null,e=null;return{clear(){t=null,e=null},notify(){Dce(()=>{let n=t;for(;n;)n.callback(),n=n.next})},get(){const n=[];let r=t;for(;r;)n.push(r),r=r.next;return n},subscribe(n){let r=!0;const s=e={callback:n,next:null,prev:e};return s.prev?s.prev.next=s:t=s,function(){!r||t===null||(r=!1,s.next?s.next.prev=s.prev:e=s.prev,s.prev?s.prev.next=s.next:t=s.next)}}}}var e$={notify(){},get:()=>[]};function Oce(t,e){let n,r=e$,s=0,o=!1;function i(v){u();const b=r.subscribe(v);let w=!1;return()=>{w||(w=!0,b(),f())}}function a(){r.notify()}function l(){y.onStateChange&&y.onStateChange()}function c(){return o}function u(){s++,n||(n=t.subscribe(l),r=Ice())}function f(){s--,n&&s===0&&(n(),n=void 0,r.clear(),r=e$)}function h(){o||(o=!0,u())}function m(){o&&(o=!1,f())}const y={addNestedSub:i,notifyNestedSubs:a,handleChangeWrapper:l,isSubscribed:c,trySubscribe:h,tryUnsubscribe:m,getListeners:()=>r};return y}var Nce=()=>typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",Lce=Nce(),$ce=()=>typeof navigator<"u"&&navigator.product==="ReactNative",Fce=$ce(),zce=()=>Lce||Fce?S.useLayoutEffect:S.useEffect,Pce=zce(),w6=Symbol.for("react-redux-context"),S6=typeof globalThis<"u"?globalThis:{};function Bce(){if(!S.createContext)return{};const t=S6[w6]??(S6[w6]=new Map);let e=t.get(S.createContext);return e||(e=S.createContext(null),t.set(S.createContext,e)),e}var od=Bce();function Hce(t){const{children:e,context:n,serverState:r,store:s}=t,o=S.useMemo(()=>{const l=Oce(s);return{store:s,subscription:l,getServerState:r?()=>r:void 0}},[s,r]),i=S.useMemo(()=>s.getState(),[s]);Pce(()=>{const{subscription:l}=o;return l.onStateChange=l.notifyNestedSubs,l.trySubscribe(),i!==s.getState()&&l.notifyNestedSubs(),()=>{l.tryUnsubscribe(),l.onStateChange=void 0}},[o,i]);const a=n||od;return S.createElement(a.Provider,{value:o},e)}var Uce=Hce;function KM(t=od){return function(){return S.useContext(t)}}var KY=KM();function XY(t=od){const e=t===od?KY:KM(t),n=()=>{const{store:r}=e();return r};return Object.assign(n,{withTypes:()=>n}),n}var Vce=XY();function qce(t=od){const e=t===od?Vce:XY(t),n=()=>e().dispatch;return Object.assign(n,{withTypes:()=>n}),n}var cs=qce(),Wce=(t,e)=>t===e;function Yce(t=od){const e=t===od?KY:KM(t),n=(r,s={})=>{const{equalityFn:o=Wce}=typeof s=="function"?{equalityFn:s}:s,i=e(),{store:a,subscription:l,getServerState:c}=i;S.useRef(!0);const u=S.useCallback({[r.name](h){return r(h)}}[r.name],[r]),f=Rce.useSyncExternalStoreWithSelector(l.addNestedSub,a.getState,c||a.getState,u,o);return S.useDebugValue(f),f};return Object.assign(n,{withTypes:()=>n}),n}var br=Yce();/**
 * react-router v7.13.0
 *
 * Copyright (c) Remix Software Inc.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE.md file in the root directory of this source tree.
 *
 * @license MIT
 */var ZY=t=>{throw TypeError(t)},Gce=(t,e,n)=>e.has(t)||ZY("Cannot "+n),C6=(t,e,n)=>(Gce(t,e,"read from private field"),n?n.call(t):e.get(t)),Kce=(t,e,n)=>e.has(t)?ZY("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,n),t$="popstate";function Xce(t={}){function e(r,s){let{pathname:o,search:i,hash:a}=r.location;return cg("",{pathname:o,search:i,hash:a},s.state&&s.state.usr||null,s.state&&s.state.key||"default")}function n(r,s){return typeof s=="string"?s:Cl(s)}return Qce(e,n,null,t)}function _n(t,e){if(t===!1||t===null||typeof t>"u")throw new Error(e)}function is(t,e){if(!t){typeof console<"u"&&console.warn(e);try{throw new Error(e)}catch{}}}function Zce(){return Math.random().toString(36).substring(2,10)}function n$(t,e){return{usr:t.state,key:t.key,idx:e}}function cg(t,e,n=null,r){return{pathname:typeof t=="string"?t:t.pathname,search:"",hash:"",...typeof e=="string"?gd(e):e,state:n,key:e&&e.key||r||Zce()}}function Cl({pathname:t="/",search:e="",hash:n=""}){return e&&e!=="?"&&(t+=e.charAt(0)==="?"?e:"?"+e),n&&n!=="#"&&(t+=n.charAt(0)==="#"?n:"#"+n),t}function gd(t){let e={};if(t){let n=t.indexOf("#");n>=0&&(e.hash=t.substring(n),t=t.substring(0,n));let r=t.indexOf("?");r>=0&&(e.search=t.substring(r),t=t.substring(0,r)),t&&(e.pathname=t)}return e}function Qce(t,e,n,r={}){let{window:s=document.defaultView,v5Compat:o=!1}=r,i=s.history,a="POP",l=null,c=u();c==null&&(c=0,i.replaceState({...i.state,idx:c},""));function u(){return(i.state||{idx:null}).idx}function f(){a="POP";let b=u(),w=b==null?null:b-c;c=b,l&&l({action:a,location:v.location,delta:w})}function h(b,w){a="PUSH";let C=cg(v.location,b,w);c=u()+1;let k=n$(C,c),E=v.createHref(C);try{i.pushState(k,"",E)}catch(j){if(j instanceof DOMException&&j.name==="DataCloneError")throw j;s.location.assign(E)}o&&l&&l({action:a,location:v.location,delta:1})}function m(b,w){a="REPLACE";let C=cg(v.location,b,w);c=u();let k=n$(C,c),E=v.createHref(C);i.replaceState(k,"",E),o&&l&&l({action:a,location:v.location,delta:0})}function y(b){return QY(b)}let v={get action(){return a},get location(){return t(s,i)},listen(b){if(l)throw new Error("A history only accepts one active listener");return s.addEventListener(t$,f),l=b,()=>{s.removeEventListener(t$,f),l=null}},createHref(b){return e(s,b)},createURL:y,encodeLocation(b){let w=y(b);return{pathname:w.pathname,search:w.search,hash:w.hash}},push:h,replace:m,go(b){return i.go(b)}};return v}function QY(t,e=!1){let n="http://localhost";typeof window<"u"&&(n=window.location.origin!=="null"?window.location.origin:window.location.href),_n(n,"No window.location.(origin|href) available to create URL");let r=typeof t=="string"?t:Cl(t);return r=r.replace(/ $/,"%20"),!e&&r.startsWith("//")&&(r=n+r),new URL(r,n)}var k0,r$=class{constructor(t){if(Kce(this,k0,new Map),t)for(let[e,n]of t)this.set(e,n)}get(t){if(C6(this,k0).has(t))return C6(this,k0).get(t);if(t.defaultValue!==void 0)return t.defaultValue;throw new Error("No value found for context")}set(t,e){C6(this,k0).set(t,e)}};k0=new WeakMap;var Jce=new Set(["lazy","caseSensitive","path","id","index","children"]);function eue(t){return Jce.has(t)}var tue=new Set(["lazy","caseSensitive","path","id","index","middleware","children"]);function nue(t){return tue.has(t)}function rue(t){return t.index===!0}function ug(t,e,n=[],r={},s=!1){return t.map((o,i)=>{let a=[...n,String(i)],l=typeof o.id=="string"?o.id:a.join("-");if(_n(o.index!==!0||!o.children,"Cannot specify children on an index route"),_n(s||!r[l],`Found a route id collision on id "${l}".  Route id's must be globally unique within Data Router usages`),rue(o)){let c={...o,id:l};return r[l]=s$(c,e(c)),c}else{let c={...o,id:l,children:void 0};return r[l]=s$(c,e(c)),o.children&&(c.children=ug(o.children,e,a,r,s)),c}})}function s$(t,e){return Object.assign(t,{...e,...typeof e.lazy=="object"&&e.lazy!=null?{lazy:{...t.lazy,...e.lazy}}:{}})}function Nu(t,e,n="/"){return E0(t,e,n,!1)}function E0(t,e,n,r){let s=typeof e=="string"?gd(e):e,o=ea(s.pathname||"/",n);if(o==null)return null;let i=JY(t);oue(i);let a=null;for(let l=0;a==null&&l<i.length;++l){let c=gue(o);a=hue(i[l],c,r)}return a}function sue(t,e){let{route:n,pathname:r,params:s}=t;return{id:n.id,pathname:r,params:s,data:e[n.id],loaderData:e[n.id],handle:n.handle}}function JY(t,e=[],n=[],r="",s=!1){let o=(i,a,l=s,c)=>{let u={relativePath:c===void 0?i.path||"":c,caseSensitive:i.caseSensitive===!0,childrenIndex:a,route:i};if(u.relativePath.startsWith("/")){if(!u.relativePath.startsWith(r)&&l)return;_n(u.relativePath.startsWith(r),`Absolute route path "${u.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),u.relativePath=u.relativePath.slice(r.length)}let f=ml([r,u.relativePath]),h=n.concat(u);i.children&&i.children.length>0&&(_n(i.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${f}".`),JY(i.children,e,h,f,l)),!(i.path==null&&!i.index)&&e.push({path:f,score:fue(f,i.index),routesMeta:h})};return t.forEach((i,a)=>{var l;if(i.path===""||!((l=i.path)!=null&&l.includes("?")))o(i,a);else for(let c of eG(i.path))o(i,a,!0,c)}),e}function eG(t){let e=t.split("/");if(e.length===0)return[];let[n,...r]=e,s=n.endsWith("?"),o=n.replace(/\?$/,"");if(r.length===0)return s?[o,""]:[o];let i=eG(r.join("/")),a=[];return a.push(...i.map(l=>l===""?o:[o,l].join("/"))),s&&a.push(...i),a.map(l=>t.startsWith("/")&&l===""?"/":l)}function oue(t){t.sort((e,n)=>e.score!==n.score?n.score-e.score:pue(e.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}var iue=/^:[\w-]+$/,aue=3,lue=2,cue=1,uue=10,due=-2,o$=t=>t==="*";function fue(t,e){let n=t.split("/"),r=n.length;return n.some(o$)&&(r+=due),e&&(r+=lue),n.filter(s=>!o$(s)).reduce((s,o)=>s+(iue.test(o)?aue:o===""?cue:uue),r)}function pue(t,e){return t.length===e.length&&t.slice(0,-1).every((r,s)=>r===e[s])?t[t.length-1]-e[e.length-1]:0}function hue(t,e,n=!1){let{routesMeta:r}=t,s={},o="/",i=[];for(let a=0;a<r.length;++a){let l=r[a],c=a===r.length-1,u=o==="/"?e:e.slice(o.length)||"/",f=Hh({path:l.relativePath,caseSensitive:l.caseSensitive,end:c},u),h=l.route;if(!f&&c&&n&&!r[r.length-1].route.index&&(f=Hh({path:l.relativePath,caseSensitive:l.caseSensitive,end:!1},u)),!f)return null;Object.assign(s,f.params),i.push({params:s,pathname:ml([o,f.pathname]),pathnameBase:bue(ml([o,f.pathnameBase])),route:h}),f.pathnameBase!=="/"&&(o=ml([o,f.pathnameBase]))}return i}function Hh(t,e){typeof t=="string"&&(t={path:t,caseSensitive:!1,end:!0});let[n,r]=mue(t.path,t.caseSensitive,t.end),s=e.match(n);if(!s)return null;let o=s[0],i=o.replace(/(.)\/+$/,"$1"),a=s.slice(1);return{params:r.reduce((c,{paramName:u,isOptional:f},h)=>{if(u==="*"){let y=a[h]||"";i=o.slice(0,o.length-y.length).replace(/(.)\/+$/,"$1")}const m=a[h];return f&&!m?c[u]=void 0:c[u]=(m||"").replace(/%2F/g,"/"),c},{}),pathname:o,pathnameBase:i,pattern:t}}function mue(t,e=!1,n=!0){is(t==="*"||!t.endsWith("*")||t.endsWith("/*"),`Route path "${t}" will be treated as if it were "${t.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${t.replace(/\*$/,"/*")}".`);let r=[],s="^"+t.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(i,a,l)=>(r.push({paramName:a,isOptional:l!=null}),l?"/?([^\\/]+)?":"/([^\\/]+)")).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return t.endsWith("*")?(r.push({paramName:"*"}),s+=t==="*"||t==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?s+="\\/*$":t!==""&&t!=="/"&&(s+="(?:(?=\\/|$))"),[new RegExp(s,e?void 0:"i"),r]}function gue(t){try{return t.split("/").map(e=>decodeURIComponent(e).replace(/\//g,"%2F")).join("/")}catch(e){return is(!1,`The URL path "${t}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${e}).`),t}}function ea(t,e){if(e==="/")return t;if(!t.toLowerCase().startsWith(e.toLowerCase()))return null;let n=e.endsWith("/")?e.length-1:e.length,r=t.charAt(n);return r&&r!=="/"?null:t.slice(n)||"/"}function yue({basename:t,pathname:e}){return e==="/"?t:ml([t,e])}var tG=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,XM=t=>tG.test(t);function vue(t,e="/"){let{pathname:n,search:r="",hash:s=""}=typeof t=="string"?gd(t):t,o;return n?(n=n.replace(/\/\/+/g,"/"),n.startsWith("/")?o=i$(n.substring(1),"/"):o=i$(n,e)):o=e,{pathname:o,search:xue(r),hash:wue(s)}}function i$(t,e){let n=e.replace(/\/+$/,"").split("/");return t.split("/").forEach(s=>{s===".."?n.length>1&&n.pop():s!=="."&&n.push(s)}),n.length>1?n.join("/"):"/"}function k6(t,e,n,r){return`Cannot include a '${t}' character in a manually specified \`to.${e}\` field [${JSON.stringify(r)}].  Please separate it out to the \`to.${n}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function nG(t){return t.filter((e,n)=>n===0||e.route.path&&e.route.path.length>0)}function $w(t){let e=nG(t);return e.map((n,r)=>r===e.length-1?n.pathname:n.pathnameBase)}function Fw(t,e,n,r=!1){let s;typeof t=="string"?s=gd(t):(s={...t},_n(!s.pathname||!s.pathname.includes("?"),k6("?","pathname","search",s)),_n(!s.pathname||!s.pathname.includes("#"),k6("#","pathname","hash",s)),_n(!s.search||!s.search.includes("#"),k6("#","search","hash",s)));let o=t===""||s.pathname==="",i=o?"/":s.pathname,a;if(i==null)a=n;else{let f=e.length-1;if(!r&&i.startsWith("..")){let h=i.split("/");for(;h[0]==="..";)h.shift(),f-=1;s.pathname=h.join("/")}a=f>=0?e[f]:"/"}let l=vue(s,a),c=i&&i!=="/"&&i.endsWith("/"),u=(o||i===".")&&n.endsWith("/");return!l.pathname.endsWith("/")&&(c||u)&&(l.pathname+="/"),l}var ml=t=>t.join("/").replace(/\/\/+/g,"/"),bue=t=>t.replace(/\/+$/,"").replace(/^\/*/,"/"),xue=t=>!t||t==="?"?"":t.startsWith("?")?t:"?"+t,wue=t=>!t||t==="#"?"":t.startsWith("#")?t:"#"+t,t2=class{constructor(t,e,n,r=!1){this.status=t,this.statusText=e||"",this.internal=r,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}};function dg(t){return t!=null&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.internal=="boolean"&&"data"in t}function n2(t){return t.map(e=>e.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var rG=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function sG(t,e){let n=t;if(typeof n!="string"||!tG.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let r=n,s=!1;if(rG)try{let o=new URL(window.location.href),i=n.startsWith("//")?new URL(o.protocol+n):new URL(n),a=ea(i.pathname,e);i.origin===o.origin&&a!=null?n=a+i.search+i.hash:s=!0}catch{is(!1,`<Link to="${n}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:r,isExternal:s,to:n}}var Hu=Symbol("Uninstrumented");function Sue(t,e){let n={lazy:[],"lazy.loader":[],"lazy.action":[],"lazy.middleware":[],middleware:[],loader:[],action:[]};t.forEach(s=>s({id:e.id,index:e.index,path:e.path,instrument(o){let i=Object.keys(n);for(let a of i)o[a]&&n[a].push(o[a])}}));let r={};if(typeof e.lazy=="function"&&n.lazy.length>0){let s=Sh(n.lazy,e.lazy,()=>{});s&&(r.lazy=s)}if(typeof e.lazy=="object"){let s=e.lazy;["middleware","loader","action"].forEach(o=>{let i=s[o],a=n[`lazy.${o}`];if(typeof i=="function"&&a.length>0){let l=Sh(a,i,()=>{});l&&(r.lazy=Object.assign(r.lazy||{},{[o]:l}))}})}return["loader","action"].forEach(s=>{let o=e[s];if(typeof o=="function"&&n[s].length>0){let i=o[Hu]??o,a=Sh(n[s],i,(...l)=>a$(l[0]));a&&(s==="loader"&&i.hydrate===!0&&(a.hydrate=!0),a[Hu]=i,r[s]=a)}}),e.middleware&&e.middleware.length>0&&n.middleware.length>0&&(r.middleware=e.middleware.map(s=>{let o=s[Hu]??s,i=Sh(n.middleware,o,(...a)=>a$(a[0]));return i?(i[Hu]=o,i):s})),r}function Cue(t,e){let n={navigate:[],fetch:[]};if(e.forEach(r=>r({instrument(s){let o=Object.keys(s);for(let i of o)s[i]&&n[i].push(s[i])}})),n.navigate.length>0){let r=t.navigate[Hu]??t.navigate,s=Sh(n.navigate,r,(...o)=>{let[i,a]=o;return{to:typeof i=="number"||typeof i=="string"?i:i?Cl(i):".",...l$(t,a??{})}});s&&(s[Hu]=r,t.navigate=s)}if(n.fetch.length>0){let r=t.fetch[Hu]??t.fetch,s=Sh(n.fetch,r,(...o)=>{let[i,,a,l]=o;return{href:a??".",fetcherKey:i,...l$(t,l??{})}});s&&(s[Hu]=r,t.fetch=s)}return t}function Sh(t,e,n){return t.length===0?null:async(...r)=>{let s=await oG(t,n(...r),()=>e(...r),t.length-1);if(s.type==="error")throw s.value;return s.value}}async function oG(t,e,n,r){let s=t[r],o;if(s){let i,a=async()=>(i?console.error("You cannot call instrumented handlers more than once"):i=oG(t,e,n,r-1),o=await i,_n(o,"Expected a result"),o.type==="error"&&o.value instanceof Error?{status:"error",error:o.value}:{status:"success",error:void 0});try{await s(a,e)}catch(l){console.error("An instrumentation function threw an error:",l)}i||await a(),await i}else try{o={type:"success",value:await n()}}catch(i){o={type:"error",value:i}}return o||{type:"error",value:new Error("No result assigned in instrumentation chain.")}}function a$(t){let{request:e,context:n,params:r,unstable_pattern:s}=t;return{request:kue(e),params:{...r},unstable_pattern:s,context:Eue(n)}}function l$(t,e){return{currentUrl:Cl(t.state.location),..."formMethod"in e?{formMethod:e.formMethod}:{},..."formEncType"in e?{formEncType:e.formEncType}:{},..."formData"in e?{formData:e.formData}:{},..."body"in e?{body:e.body}:{}}}function kue(t){return{method:t.method,url:t.url,headers:{get:(...e)=>t.headers.get(...e)}}}function Eue(t){if(Mue(t)){let e={...t};return Object.freeze(e),e}else return{get:e=>t.get(e)}}var Tue=Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function Mue(t){if(t===null||typeof t!="object")return!1;const e=Object.getPrototypeOf(t);return e===Object.prototype||e===null||Object.getOwnPropertyNames(e).sort().join("\0")===Tue}var iG=["POST","PUT","PATCH","DELETE"],jue=new Set(iG),Aue=["GET",...iG],_ue=new Set(Aue),aG=new Set([301,302,303,307,308]),Rue=new Set([307,308]),E6={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Due={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Z1={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},Iue=t=>({hasErrorBoundary:!!t.hasErrorBoundary}),lG="remix-router-transitions",cG=Symbol("ResetLoaderData");function Oue(t){const e=t.window?t.window:typeof window<"u"?window:void 0,n=typeof e<"u"&&typeof e.document<"u"&&typeof e.document.createElement<"u";_n(t.routes.length>0,"You must provide a non-empty routes array to createRouter");let r=t.hydrationRouteProperties||[],s=t.mapRouteProperties||Iue,o=s;if(t.unstable_instrumentations){let ee=t.unstable_instrumentations;o=ae=>({...s(ae),...Sue(ee.map(de=>de.route).filter(Boolean),ae)})}let i={},a=ug(t.routes,o,void 0,i),l,c=t.basename||"/";c.startsWith("/")||(c=`/${c}`);let u=t.dataStrategy||zue,f={...t.future},h=null,m=new Set,y=null,v=null,b=null,w=t.hydrationData!=null,C=Nu(a,t.history.location,c),k=!1,E=null,j;if(C==null&&!t.patchRoutesOnNavigation){let ee=Hi(404,{pathname:t.history.location.pathname}),{matches:ae,route:de}=Tv(a);j=!0,C=ae,E={[de.id]:ee}}else if(C&&!t.hydrationData&&Ht(C,a,t.history.location.pathname).active&&(C=null),C)if(C.some(ee=>ee.route.lazy))j=!1;else if(!C.some(ee=>ZM(ee.route)))j=!0;else{let ee=t.hydrationData?t.hydrationData.loaderData:null,ae=t.hydrationData?t.hydrationData.errors:null;if(ae){let de=C.findIndex(Ee=>ae[Ee.route.id]!==void 0);j=C.slice(0,de+1).every(Ee=>!SE(Ee.route,ee,ae))}else j=C.every(de=>!SE(de.route,ee,ae))}else{j=!1,C=[];let ee=Ht(null,a,t.history.location.pathname);ee.active&&ee.matches&&(k=!0,C=ee.matches)}let A,M={historyAction:t.history.action,location:t.history.location,matches:C,initialized:j,navigation:E6,restoreScrollPosition:t.hydrationData!=null?!1:null,preventScrollReset:!1,revalidation:"idle",loaderData:t.hydrationData&&t.hydrationData.loaderData||{},actionData:t.hydrationData&&t.hydrationData.actionData||null,errors:t.hydrationData&&t.hydrationData.errors||E,fetchers:new Map,blockers:new Map},_="POP",D=null,R=!1,N,z=!1,B=new Map,L=null,P=!1,I=!1,H=new Set,$=new Map,V=0,q=-1,U=new Map,W=new Set,Y=new Map,G=new Map,K=new Set,Q=new Map,Z,J=null;function ne(){if(h=t.history.listen(({action:ee,location:ae,delta:de})=>{if(Z){Z(),Z=void 0;return}is(Q.size===0||de!=null,"You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs.  This can also happen if you are using createHashRouter and the user manually changes the URL.");let Ee=kt({currentLocation:M.location,nextLocation:ae,historyAction:ee});if(Ee&&de!=null){let De=new Promise(Qe=>{Z=Qe});t.history.go(de*-1),Tt(Ee,{state:"blocked",location:ae,proceed(){Tt(Ee,{state:"proceeding",proceed:void 0,reset:void 0,location:ae}),De.then(()=>t.history.go(de))},reset(){let Qe=new Map(M.blockers);Qe.set(Ee,Z1),fe({blockers:Qe})}}),D==null||D.resolve(),D=null;return}return pe(ee,ae)}),n){rde(e,B);let ee=()=>sde(e,B);e.addEventListener("pagehide",ee),L=()=>e.removeEventListener("pagehide",ee)}return M.initialized||pe("POP",M.location,{initialHydration:!0}),A}function se(){h&&h(),L&&L(),m.clear(),N&&N.abort(),M.fetchers.forEach((ee,ae)=>gt(ae)),M.blockers.forEach((ee,ae)=>Ot(ae))}function ce(ee){return m.add(ee),()=>m.delete(ee)}function fe(ee,ae={}){ee.matches&&(ee.matches=ee.matches.map(De=>{let Qe=i[De.route.id],mt=De.route;return mt.element!==Qe.element||mt.errorElement!==Qe.errorElement||mt.hydrateFallbackElement!==Qe.hydrateFallbackElement?{...De,route:Qe}:De})),M={...M,...ee};let de=[],Ee=[];M.fetchers.forEach((De,Qe)=>{De.state==="idle"&&(K.has(Qe)?de.push(Qe):Ee.push(Qe))}),K.forEach(De=>{!M.fetchers.has(De)&&!$.has(De)&&de.push(De)}),[...m].forEach(De=>De(M,{deletedFetchers:de,newErrors:ee.errors??null,viewTransitionOpts:ae.viewTransitionOpts,flushSync:ae.flushSync===!0})),de.forEach(De=>gt(De)),Ee.forEach(De=>M.fetchers.delete(De))}function le(ee,ae,{flushSync:de}={}){var Ut,Lt;let Ee=M.actionData!=null&&M.navigation.formMethod!=null&&ao(M.navigation.formMethod)&&M.navigation.state==="loading"&&((Ut=ee.state)==null?void 0:Ut._isRedirect)!==!0,De;ae.actionData?Object.keys(ae.actionData).length>0?De=ae.actionData:De=null:Ee?De=M.actionData:De=null;let Qe=ae.loaderData?v$(M.loaderData,ae.loaderData,ae.matches||[],ae.errors):M.loaderData,mt=M.blockers;mt.size>0&&(mt=new Map(mt),mt.forEach((Xt,mn)=>mt.set(mn,Z1)));let rt=P?!1:Nt(ee,ae.matches||M.matches),st=R===!0||M.navigation.formMethod!=null&&ao(M.navigation.formMethod)&&((Lt=ee.state)==null?void 0:Lt._isRedirect)!==!0;l&&(a=l,l=void 0),P||_==="POP"||(_==="PUSH"?t.history.push(ee,ee.state):_==="REPLACE"&&t.history.replace(ee,ee.state));let Mt;if(_==="POP"){let Xt=B.get(M.location.pathname);Xt&&Xt.has(ee.pathname)?Mt={currentLocation:M.location,nextLocation:ee}:B.has(ee.pathname)&&(Mt={currentLocation:ee,nextLocation:M.location})}else if(z){let Xt=B.get(M.location.pathname);Xt?Xt.add(ee.pathname):(Xt=new Set([ee.pathname]),B.set(M.location.pathname,Xt)),Mt={currentLocation:M.location,nextLocation:ee}}fe({...ae,actionData:De,loaderData:Qe,historyAction:_,location:ee,initialized:!0,navigation:E6,revalidation:"idle",restoreScrollPosition:rt,preventScrollReset:st,blockers:mt},{viewTransitionOpts:Mt,flushSync:de===!0}),_="POP",R=!1,z=!1,P=!1,I=!1,D==null||D.resolve(),D=null,J==null||J.resolve(),J=null}async function be(ee,ae){if(D==null||D.resolve(),D=null,typeof ee=="number"){D||(D=S$());let mn=D.promise;return t.history.go(ee),mn}let de=wE(M.location,M.matches,c,ee,ae==null?void 0:ae.fromRouteId,ae==null?void 0:ae.relative),{path:Ee,submission:De,error:Qe}=c$(!1,de,ae),mt=M.location,rt=cg(M.location,Ee,ae&&ae.state);rt={...rt,...t.history.encodeLocation(rt)};let st=ae&&ae.replace!=null?ae.replace:void 0,Mt="PUSH";st===!0?Mt="REPLACE":st===!1||De!=null&&ao(De.formMethod)&&De.formAction===M.location.pathname+M.location.search&&(Mt="REPLACE");let Ut=ae&&"preventScrollReset"in ae?ae.preventScrollReset===!0:void 0,Lt=(ae&&ae.flushSync)===!0,Xt=kt({currentLocation:mt,nextLocation:rt,historyAction:Mt});if(Xt){Tt(Xt,{state:"blocked",location:rt,proceed(){Tt(Xt,{state:"proceeding",proceed:void 0,reset:void 0,location:rt}),be(ee,ae)},reset(){let mn=new Map(M.blockers);mn.set(Xt,Z1),fe({blockers:mn})}});return}await pe(Mt,rt,{submission:De,pendingError:Qe,preventScrollReset:Ut,replace:ae&&ae.replace,enableViewTransition:ae&&ae.viewTransition,flushSync:Lt,callSiteDefaultShouldRevalidate:ae&&ae.unstable_defaultShouldRevalidate})}function je(){J||(J=S$()),Se(),fe({revalidation:"loading"});let ee=J.promise;return M.navigation.state==="submitting"?ee:M.navigation.state==="idle"?(pe(M.historyAction,M.location,{startUninterruptedRevalidation:!0}),ee):(pe(_||M.historyAction,M.navigation.location,{overrideNavigation:M.navigation,enableViewTransition:z===!0}),ee)}async function pe(ee,ae,de){N&&N.abort(),N=null,_=ee,P=(de&&de.startUninterruptedRevalidation)===!0,Vt(M.location,M.matches),R=(de&&de.preventScrollReset)===!0,z=(de&&de.enableViewTransition)===!0;let Ee=l||a,De=de&&de.overrideNavigation,Qe=de!=null&&de.initialHydration&&M.matches&&M.matches.length>0&&!k?M.matches:Nu(Ee,ae,c),mt=(de&&de.flushSync)===!0;if(Qe&&M.initialized&&!I&&Yue(M.location,ae)&&!(de&&de.submission&&ao(de.submission.formMethod))){le(ae,{matches:Qe},{flushSync:mt});return}let rt=Ht(Qe,Ee,ae.pathname);if(rt.active&&rt.matches&&(Qe=rt.matches),!Qe){let{error:oe,notFoundMatches:Ne,route:ut}=jt(ae.pathname);le(ae,{matches:Ne,loaderData:{},errors:{[ut.id]:oe}},{flushSync:mt});return}N=new AbortController;let st=hh(t.history,ae,N.signal,de&&de.submission),Mt=t.getContext?await t.getContext():new r$,Ut;if(de&&de.pendingError)Ut=[Lu(Qe).route.id,{type:"error",error:de.pendingError}];else if(de&&de.submission&&ao(de.submission.formMethod)){let oe=await _e(st,ae,de.submission,Qe,Mt,rt.active,de&&de.initialHydration===!0,{replace:de.replace,flushSync:mt});if(oe.shortCircuited)return;if(oe.pendingActionResult){let[Ne,ut]=oe.pendingActionResult;if(pi(ut)&&dg(ut.error)&&ut.error.status===404){N=null,le(ae,{matches:oe.matches,loaderData:{},errors:{[Ne]:ut.error}});return}}Qe=oe.matches||Qe,Ut=oe.pendingActionResult,De=T6(ae,de.submission),mt=!1,rt.active=!1,st=hh(t.history,st.url,st.signal)}let{shortCircuited:Lt,matches:Xt,loaderData:mn,errors:ht}=await Ce(st,ae,Qe,Mt,rt.active,De,de&&de.submission,de&&de.fetcherSubmission,de&&de.replace,de&&de.initialHydration===!0,mt,Ut,de&&de.callSiteDefaultShouldRevalidate);Lt||(N=null,le(ae,{matches:Xt||Qe,...b$(Ut),loaderData:mn,errors:ht}))}async function _e(ee,ae,de,Ee,De,Qe,mt,rt={}){Se();let st=tde(ae,de);if(fe({navigation:st},{flushSync:rt.flushSync===!0}),Qe){let Lt=await cn(Ee,ae.pathname,ee.signal);if(Lt.type==="aborted")return{shortCircuited:!0};if(Lt.type==="error"){if(Lt.partialMatches.length===0){let{matches:mn,route:ht}=Tv(a);return{matches:mn,pendingActionResult:[ht.id,{type:"error",error:Lt.error}]}}let Xt=Lu(Lt.partialMatches).route.id;return{matches:Lt.partialMatches,pendingActionResult:[Xt,{type:"error",error:Lt.error}]}}else if(Lt.matches)Ee=Lt.matches;else{let{notFoundMatches:Xt,error:mn,route:ht}=jt(ae.pathname);return{matches:Xt,pendingActionResult:[ht.id,{type:"error",error:mn}]}}}let Mt,Ut=Fb(Ee,ae);if(!Ut.route.action&&!Ut.route.lazy)Mt={type:"error",error:Hi(405,{method:ee.method,pathname:ae.pathname,routeId:Ut.route.id})};else{let Lt=Ah(o,i,ee,Ee,Ut,mt?[]:r,De),Xt=await ge(ee,Lt,De,null);if(Mt=Xt[Ut.route.id],!Mt){for(let mn of Ee)if(Xt[mn.route.id]){Mt=Xt[mn.route.id];break}}if(ee.signal.aborted)return{shortCircuited:!0}}if(pf(Mt)){let Lt;return rt&&rt.replace!=null?Lt=rt.replace:Lt=m$(Mt.response.headers.get("Location"),new URL(ee.url),c,t.history)===M.location.pathname+M.location.search,await Ye(ee,Mt,!0,{submission:de,replace:Lt}),{shortCircuited:!0}}if(pi(Mt)){let Lt=Lu(Ee,Ut.route.id);return(rt&&rt.replace)!==!0&&(_="PUSH"),{matches:Ee,pendingActionResult:[Lt.route.id,Mt,Ut.route.id]}}return{matches:Ee,pendingActionResult:[Ut.route.id,Mt]}}async function Ce(ee,ae,de,Ee,De,Qe,mt,rt,st,Mt,Ut,Lt,Xt){let mn=Qe||T6(ae,mt),ht=mt||rt||w$(mn),oe=!P&&!Mt;if(De){if(oe){let jn=Te(Lt);fe({navigation:mn,...jn!==void 0?{actionData:jn}:{}},{flushSync:Ut})}let dn=await cn(de,ae.pathname,ee.signal);if(dn.type==="aborted")return{shortCircuited:!0};if(dn.type==="error"){if(dn.partialMatches.length===0){let{matches:ds,route:Cr}=Tv(a);return{matches:ds,loaderData:{},errors:{[Cr.id]:dn.error}}}let jn=Lu(dn.partialMatches).route.id;return{matches:dn.partialMatches,loaderData:{},errors:{[jn]:dn.error}}}else if(dn.matches)de=dn.matches;else{let{error:jn,notFoundMatches:ds,route:Cr}=jt(ae.pathname);return{matches:ds,loaderData:{},errors:{[Cr.id]:jn}}}}let Ne=l||a,{dsMatches:ut,revalidatingFetchers:un}=u$(ee,Ee,o,i,t.history,M,de,ht,ae,Mt?[]:r,Mt===!0,I,H,K,Y,W,Ne,c,t.patchRoutesOnNavigation!=null,Lt,Xt);if(q=++V,!t.dataStrategy&&!ut.some(dn=>dn.shouldLoad)&&!ut.some(dn=>dn.route.middleware&&dn.route.middleware.length>0)&&un.length===0){let dn=We();return le(ae,{matches:de,loaderData:{},errors:Lt&&pi(Lt[1])?{[Lt[0]]:Lt[1].error}:null,...b$(Lt),...dn?{fetchers:new Map(M.fetchers)}:{}},{flushSync:Ut}),{shortCircuited:!0}}if(oe){let dn={};if(!De){dn.navigation=mn;let jn=Te(Lt);jn!==void 0&&(dn.actionData=jn)}un.length>0&&(dn.fetchers=Ae(un)),fe(dn,{flushSync:Ut})}un.forEach(dn=>{at(dn.key),dn.controller&&$.set(dn.key,dn.controller)});let Mn=()=>un.forEach(dn=>at(dn.key));N&&N.signal.addEventListener("abort",Mn);let{loaderResults:nn,fetcherResults:Ge}=await Fe(ut,un,ee,Ee);if(ee.signal.aborted)return{shortCircuited:!0};N&&N.signal.removeEventListener("abort",Mn),un.forEach(dn=>$.delete(dn.key));let Rt=Mv(nn);if(Rt)return await Ye(ee,Rt.result,!0,{replace:st}),{shortCircuited:!0};if(Rt=Mv(Ge),Rt)return W.add(Rt.key),await Ye(ee,Rt.result,!0,{replace:st}),{shortCircuited:!0};let{loaderData:Zt,errors:$t}=y$(M,de,nn,Lt,un,Ge);Mt&&M.errors&&($t={...M.errors,...$t});let en=We(),rn=At(q),In=en||rn||un.length>0;return{matches:de,loaderData:Zt,errors:$t,...In?{fetchers:new Map(M.fetchers)}:{}}}function Te(ee){if(ee&&!pi(ee[1]))return{[ee[0]]:ee[1].data};if(M.actionData)return Object.keys(M.actionData).length===0?null:M.actionData}function Ae(ee){return ee.forEach(ae=>{let de=M.fetchers.get(ae.key),Ee=Q1(void 0,de?de.data:void 0);M.fetchers.set(ae.key,Ee)}),new Map(M.fetchers)}async function Ze(ee,ae,de,Ee){at(ee);let De=(Ee&&Ee.flushSync)===!0,Qe=l||a,mt=wE(M.location,M.matches,c,de,ae,Ee==null?void 0:Ee.relative),rt=Nu(Qe,mt,c),st=Ht(rt,Qe,mt);if(st.active&&st.matches&&(rt=st.matches),!rt){ot(ee,ae,Hi(404,{pathname:mt}),{flushSync:De});return}let{path:Mt,submission:Ut,error:Lt}=c$(!0,mt,Ee);if(Lt){ot(ee,ae,Lt,{flushSync:De});return}let Xt=t.getContext?await t.getContext():new r$,mn=(Ee&&Ee.preventScrollReset)===!0;if(Ut&&ao(Ut.formMethod)){await He(ee,ae,Mt,rt,Xt,st.active,De,mn,Ut,Ee&&Ee.unstable_defaultShouldRevalidate);return}Y.set(ee,{routeId:ae,path:Mt}),await lt(ee,ae,Mt,rt,Xt,st.active,De,mn,Ut)}async function He(ee,ae,de,Ee,De,Qe,mt,rt,st,Mt){Se(),Y.delete(ee);let Ut=M.fetchers.get(ee);qe(ee,nde(st,Ut),{flushSync:mt});let Lt=new AbortController,Xt=hh(t.history,de,Lt.signal,st);if(Qe){let On=await cn(Ee,new URL(Xt.url).pathname,Xt.signal,ee);if(On.type==="aborted")return;if(On.type==="error"){ot(ee,ae,On.error,{flushSync:mt});return}else if(On.matches)Ee=On.matches;else{ot(ee,ae,Hi(404,{pathname:de}),{flushSync:mt});return}}let mn=Fb(Ee,de);if(!mn.route.action&&!mn.route.lazy){let On=Hi(405,{method:st.formMethod,pathname:de,routeId:ae});ot(ee,ae,On,{flushSync:mt});return}$.set(ee,Lt);let ht=V,oe=Ah(o,i,Xt,Ee,mn,r,De),Ne=await ge(Xt,oe,De,ee),ut=Ne[mn.route.id];if(!ut){for(let On of oe)if(Ne[On.route.id]){ut=Ne[On.route.id];break}}if(Xt.signal.aborted){$.get(ee)===Lt&&$.delete(ee);return}if(K.has(ee)){if(pf(ut)||pi(ut)){qe(ee,ic(void 0));return}}else{if(pf(ut))if($.delete(ee),q>ht){qe(ee,ic(void 0));return}else return W.add(ee),qe(ee,Q1(st)),Ye(Xt,ut,!1,{fetcherSubmission:st,preventScrollReset:rt});if(pi(ut)){ot(ee,ae,ut.error);return}}let un=M.navigation.location||M.location,Mn=hh(t.history,un,Lt.signal),nn=l||a,Ge=M.navigation.state!=="idle"?Nu(nn,M.navigation.location,c):M.matches;_n(Ge,"Didn't find any matches after fetcher action");let Rt=++V;U.set(ee,Rt);let Zt=Q1(st,ut.data);M.fetchers.set(ee,Zt);let{dsMatches:$t,revalidatingFetchers:en}=u$(Mn,De,o,i,t.history,M,Ge,st,un,r,!1,I,H,K,Y,W,nn,c,t.patchRoutesOnNavigation!=null,[mn.route.id,ut],Mt);en.filter(On=>On.key!==ee).forEach(On=>{let ji=On.key,Kc=M.fetchers.get(ji),zd=Q1(void 0,Kc?Kc.data:void 0);M.fetchers.set(ji,zd),at(ji),On.controller&&$.set(ji,On.controller)}),fe({fetchers:new Map(M.fetchers)});let rn=()=>en.forEach(On=>at(On.key));Lt.signal.addEventListener("abort",rn);let{loaderResults:In,fetcherResults:dn}=await Fe($t,en,Mn,De);if(Lt.signal.aborted)return;if(Lt.signal.removeEventListener("abort",rn),U.delete(ee),$.delete(ee),en.forEach(On=>$.delete(On.key)),M.fetchers.has(ee)){let On=ic(ut.data);M.fetchers.set(ee,On)}let jn=Mv(In);if(jn)return Ye(Mn,jn.result,!1,{preventScrollReset:rt});if(jn=Mv(dn),jn)return W.add(jn.key),Ye(Mn,jn.result,!1,{preventScrollReset:rt});let{loaderData:ds,errors:Cr}=y$(M,Ge,In,void 0,en,dn);At(Rt),M.navigation.state==="loading"&&Rt>q?(_n(_,"Expected pending action"),N&&N.abort(),le(M.navigation.location,{matches:Ge,loaderData:ds,errors:Cr,fetchers:new Map(M.fetchers)})):(fe({errors:Cr,loaderData:v$(M.loaderData,ds,Ge,Cr),fetchers:new Map(M.fetchers)}),I=!1)}async function lt(ee,ae,de,Ee,De,Qe,mt,rt,st){let Mt=M.fetchers.get(ee);qe(ee,Q1(st,Mt?Mt.data:void 0),{flushSync:mt});let Ut=new AbortController,Lt=hh(t.history,de,Ut.signal);if(Qe){let ut=await cn(Ee,new URL(Lt.url).pathname,Lt.signal,ee);if(ut.type==="aborted")return;if(ut.type==="error"){ot(ee,ae,ut.error,{flushSync:mt});return}else if(ut.matches)Ee=ut.matches;else{ot(ee,ae,Hi(404,{pathname:de}),{flushSync:mt});return}}let Xt=Fb(Ee,de);$.set(ee,Ut);let mn=V,ht=Ah(o,i,Lt,Ee,Xt,r,De),Ne=(await ge(Lt,ht,De,ee))[Xt.route.id];if($.get(ee)===Ut&&$.delete(ee),!Lt.signal.aborted){if(K.has(ee)){qe(ee,ic(void 0));return}if(pf(Ne))if(q>mn){qe(ee,ic(void 0));return}else{W.add(ee),await Ye(Lt,Ne,!1,{preventScrollReset:rt});return}if(pi(Ne)){ot(ee,ae,Ne.error);return}qe(ee,ic(Ne.data))}}async function Ye(ee,ae,de,{submission:Ee,fetcherSubmission:De,preventScrollReset:Qe,replace:mt}={}){de||(D==null||D.resolve(),D=null),ae.response.headers.has("X-Remix-Revalidate")&&(I=!0);let rt=ae.response.headers.get("Location");_n(rt,"Expected a Location header on the redirect Response"),rt=m$(rt,new URL(ee.url),c,t.history);let st=cg(M.location,rt,{_isRedirect:!0});if(n){let ht=!1;if(ae.response.headers.has("X-Remix-Reload-Document"))ht=!0;else if(XM(rt)){const oe=QY(rt,!0);ht=oe.origin!==e.location.origin||ea(oe.pathname,c)==null}if(ht){mt?e.location.replace(rt):e.location.assign(rt);return}}N=null;let Mt=mt===!0||ae.response.headers.has("X-Remix-Replace")?"REPLACE":"PUSH",{formMethod:Ut,formAction:Lt,formEncType:Xt}=M.navigation;!Ee&&!De&&Ut&&Lt&&Xt&&(Ee=w$(M.navigation));let mn=Ee||De;if(Rue.has(ae.response.status)&&mn&&ao(mn.formMethod))await pe(Mt,st,{submission:{...mn,formAction:rt},preventScrollReset:Qe||R,enableViewTransition:de?z:void 0});else{let ht=T6(st,Ee);await pe(Mt,st,{overrideNavigation:ht,fetcherSubmission:De,preventScrollReset:Qe||R,enableViewTransition:de?z:void 0})}}async function ge(ee,ae,de,Ee){var mt;let De,Qe={};try{De=await Bue(u,ee,ae,Ee,de,!1)}catch(rt){return ae.filter(st=>st.shouldLoad).forEach(st=>{Qe[st.route.id]={type:"error",error:rt}}),Qe}if(ee.signal.aborted)return Qe;if(!ao(ee.method))for(let rt of ae){if(((mt=De[rt.route.id])==null?void 0:mt.type)==="error")break;!De.hasOwnProperty(rt.route.id)&&!M.loaderData.hasOwnProperty(rt.route.id)&&(!M.errors||!M.errors.hasOwnProperty(rt.route.id))&&rt.shouldCallHandler()&&(De[rt.route.id]={type:"error",result:new Error(`No result returned from dataStrategy for route ${rt.route.id}`)})}for(let[rt,st]of Object.entries(De))if(Zue(st)){let Mt=st.result;Qe[rt]={type:"redirect",response:que(Mt,ee,rt,ae,c)}}else Qe[rt]=await Vue(st);return Qe}async function Fe(ee,ae,de,Ee){let De=ge(de,ee,Ee,null),Qe=Promise.all(ae.map(async st=>{if(st.matches&&st.match&&st.request&&st.controller){let Ut=(await ge(st.request,st.matches,Ee,st.key))[st.match.route.id];return{[st.key]:Ut}}else return Promise.resolve({[st.key]:{type:"error",error:Hi(404,{pathname:st.path})}})})),mt=await De,rt=(await Qe).reduce((st,Mt)=>Object.assign(st,Mt),{});return{loaderResults:mt,fetcherResults:rt}}function Se(){I=!0,Y.forEach((ee,ae)=>{$.has(ae)&&H.add(ae),at(ae)})}function qe(ee,ae,de={}){M.fetchers.set(ee,ae),fe({fetchers:new Map(M.fetchers)},{flushSync:(de&&de.flushSync)===!0})}function ot(ee,ae,de,Ee={}){let De=Lu(M.matches,ae);gt(ee),fe({errors:{[De.route.id]:de},fetchers:new Map(M.fetchers)},{flushSync:(Ee&&Ee.flushSync)===!0})}function $e(ee){return G.set(ee,(G.get(ee)||0)+1),K.has(ee)&&K.delete(ee),M.fetchers.get(ee)||Due}function pt(ee,ae){at(ee,ae==null?void 0:ae.reason),qe(ee,ic(null))}function gt(ee){let ae=M.fetchers.get(ee);$.has(ee)&&!(ae&&ae.state==="loading"&&U.has(ee))&&at(ee),Y.delete(ee),U.delete(ee),W.delete(ee),K.delete(ee),H.delete(ee),M.fetchers.delete(ee)}function Pt(ee){let ae=(G.get(ee)||0)-1;ae<=0?(G.delete(ee),K.add(ee)):G.set(ee,ae),fe({fetchers:new Map(M.fetchers)})}function at(ee,ae){let de=$.get(ee);de&&(de.abort(ae),$.delete(ee))}function nt(ee){for(let ae of ee){let de=$e(ae),Ee=ic(de.data);M.fetchers.set(ae,Ee)}}function We(){let ee=[],ae=!1;for(let de of W){let Ee=M.fetchers.get(de);_n(Ee,`Expected fetcher: ${de}`),Ee.state==="loading"&&(W.delete(de),ee.push(de),ae=!0)}return nt(ee),ae}function At(ee){let ae=[];for(let[de,Ee]of U)if(Ee<ee){let De=M.fetchers.get(de);_n(De,`Expected fetcher: ${de}`),De.state==="loading"&&(at(de),U.delete(de),ae.push(de))}return nt(ae),ae.length>0}function St(ee,ae){let de=M.blockers.get(ee)||Z1;return Q.get(ee)!==ae&&Q.set(ee,ae),de}function Ot(ee){M.blockers.delete(ee),Q.delete(ee)}function Tt(ee,ae){let de=M.blockers.get(ee)||Z1;_n(de.state==="unblocked"&&ae.state==="blocked"||de.state==="blocked"&&ae.state==="blocked"||de.state==="blocked"&&ae.state==="proceeding"||de.state==="blocked"&&ae.state==="unblocked"||de.state==="proceeding"&&ae.state==="unblocked",`Invalid blocker state transition: ${de.state} -> ${ae.state}`);let Ee=new Map(M.blockers);Ee.set(ee,ae),fe({blockers:Ee})}function kt({currentLocation:ee,nextLocation:ae,historyAction:de}){if(Q.size===0)return;Q.size>1&&is(!1,"A router only supports one blocker at a time");let Ee=Array.from(Q.entries()),[De,Qe]=Ee[Ee.length-1],mt=M.blockers.get(De);if(!(mt&&mt.state==="proceeding")&&Qe({currentLocation:ee,nextLocation:ae,historyAction:de}))return De}function jt(ee){let ae=Hi(404,{pathname:ee}),de=l||a,{matches:Ee,route:De}=Tv(de);return{notFoundMatches:Ee,route:De,error:ae}}function vt(ee,ae,de){if(y=ee,b=ae,v=de||null,!w&&M.navigation===E6){w=!0;let Ee=Nt(M.location,M.matches);Ee!=null&&fe({restoreScrollPosition:Ee})}return()=>{y=null,b=null,v=null}}function Yt(ee,ae){return v&&v(ee,ae.map(Ee=>sue(Ee,M.loaderData)))||ee.key}function Vt(ee,ae){if(y&&b){let de=Yt(ee,ae);y[de]=b()}}function Nt(ee,ae){if(y){let de=Yt(ee,ae),Ee=y[de];if(typeof Ee=="number")return Ee}return null}function Ht(ee,ae,de){if(t.patchRoutesOnNavigation)if(ee){if(Object.keys(ee[0].params).length>0)return{active:!0,matches:E0(ae,de,c,!0)}}else return{active:!0,matches:E0(ae,de,c,!0)||[]};return{active:!1,matches:null}}async function cn(ee,ae,de,Ee){if(!t.patchRoutesOnNavigation)return{type:"success",matches:ee};let De=ee;for(;;){let Qe=l==null,mt=l||a,rt=i;try{await t.patchRoutesOnNavigation({signal:de,path:ae,matches:De,fetcherKey:Ee,patch:(Ut,Lt)=>{de.aborted||d$(Ut,Lt,mt,rt,o,!1)}})}catch(Ut){return{type:"error",error:Ut,partialMatches:De}}finally{Qe&&!de.aborted&&(a=[...a])}if(de.aborted)return{type:"aborted"};let st=Nu(mt,ae,c),Mt=null;if(st){if(Object.keys(st[0].params).length===0)return{type:"success",matches:st};if(Mt=E0(mt,ae,c,!0),!(Mt&&De.length<Mt.length&&qt(De,Mt.slice(0,De.length))))return{type:"success",matches:st}}if(Mt||(Mt=E0(mt,ae,c,!0)),!Mt||qt(De,Mt))return{type:"success",matches:null};De=Mt}}function qt(ee,ae){return ee.length===ae.length&&ee.every((de,Ee)=>de.route.id===ae[Ee].route.id)}function Kt(ee){i={},l=ug(ee,o,void 0,i)}function yn(ee,ae,de=!1){let Ee=l==null;d$(ee,ae,l||a,i,o,de),Ee&&(a=[...a],fe({}))}return A={get basename(){return c},get future(){return f},get state(){return M},get routes(){return a},get window(){return e},initialize:ne,subscribe:ce,enableScrollRestoration:vt,navigate:be,fetch:Ze,revalidate:je,createHref:ee=>t.history.createHref(ee),encodeLocation:ee=>t.history.encodeLocation(ee),getFetcher:$e,resetFetcher:pt,deleteFetcher:Pt,dispose:se,getBlocker:St,deleteBlocker:Ot,patchRoutes:yn,_internalFetchControllers:$,_internalSetRoutes:Kt,_internalSetStateDoNotUseOrYouWillBreakYourApp(ee){fe(ee)}},t.unstable_instrumentations&&(A=Cue(A,t.unstable_instrumentations.map(ee=>ee.router).filter(Boolean))),A}function Nue(t){return t!=null&&("formData"in t&&t.formData!=null||"body"in t&&t.body!==void 0)}function wE(t,e,n,r,s,o){let i,a;if(s){i=[];for(let c of e)if(i.push(c),c.route.id===s){a=c;break}}else i=e,a=e[e.length-1];let l=Fw(r||".",$w(i),ea(t.pathname,n)||t.pathname,o==="path");if(r==null&&(l.search=t.search,l.hash=t.hash),(r==null||r===""||r===".")&&a){let c=JM(l.search);if(a.route.index&&!c)l.search=l.search?l.search.replace(/^\?/,"?index&"):"?index";else if(!a.route.index&&c){let u=new URLSearchParams(l.search),f=u.getAll("index");u.delete("index"),f.filter(m=>m).forEach(m=>u.append("index",m));let h=u.toString();l.search=h?`?${h}`:""}}return n!=="/"&&(l.pathname=yue({basename:n,pathname:l.pathname})),Cl(l)}function c$(t,e,n){if(!n||!Nue(n))return{path:e};if(n.formMethod&&!ede(n.formMethod))return{path:e,error:Hi(405,{method:n.formMethod})};let r=()=>({path:e,error:Hi(400,{type:"invalid-body"})}),o=(n.formMethod||"get").toUpperCase(),i=mG(e);if(n.body!==void 0){if(n.formEncType==="text/plain"){if(!ao(o))return r();let f=typeof n.body=="string"?n.body:n.body instanceof FormData||n.body instanceof URLSearchParams?Array.from(n.body.entries()).reduce((h,[m,y])=>`${h}${m}=${y}
`,""):String(n.body);return{path:e,submission:{formMethod:o,formAction:i,formEncType:n.formEncType,formData:void 0,json:void 0,text:f}}}else if(n.formEncType==="application/json"){if(!ao(o))return r();try{let f=typeof n.body=="string"?JSON.parse(n.body):n.body;return{path:e,submission:{formMethod:o,formAction:i,formEncType:n.formEncType,formData:void 0,json:f,text:void 0}}}catch{return r()}}}_n(typeof FormData=="function","FormData is not available in this environment");let a,l;if(n.formData)a=kE(n.formData),l=n.formData;else if(n.body instanceof FormData)a=kE(n.body),l=n.body;else if(n.body instanceof URLSearchParams)a=n.body,l=g$(a);else if(n.body==null)a=new URLSearchParams,l=new FormData;else try{a=new URLSearchParams(n.body),l=g$(a)}catch{return r()}let c={formMethod:o,formAction:i,formEncType:n&&n.formEncType||"application/x-www-form-urlencoded",formData:l,json:void 0,text:void 0};if(ao(c.formMethod))return{path:e,submission:c};let u=gd(e);return t&&u.search&&JM(u.search)&&a.append("index",""),u.search=`?${a}`,{path:Cl(u),submission:c}}function u$(t,e,n,r,s,o,i,a,l,c,u,f,h,m,y,v,b,w,C,k,E){var P;let j=k?pi(k[1])?k[1].error:k[1].data:void 0,A=s.createURL(o.location),M=s.createURL(l),_;if(u&&o.errors){let I=Object.keys(o.errors)[0];_=i.findIndex(H=>H.route.id===I)}else if(k&&pi(k[1])){let I=k[0];_=i.findIndex(H=>H.route.id===I)-1}let D=k?k[1].statusCode:void 0,R=D&&D>=400,N={currentUrl:A,currentParams:((P=o.matches[0])==null?void 0:P.params)||{},nextUrl:M,nextParams:i[0].params,...a,actionResult:j,actionStatus:D},z=n2(i),B=i.map((I,H)=>{let{route:$}=I,V=null;if(_!=null&&H>_?V=!1:$.lazy?V=!0:ZM($)?u?V=SE($,o.loaderData,o.errors):Lue(o.loaderData,o.matches[H],I)&&(V=!0):V=!1,V!==null)return CE(n,r,t,z,I,c,e,V);let q=!1;typeof E=="boolean"?q=E:R?q=!1:(f||A.pathname+A.search===M.pathname+M.search||A.search!==M.search||$ue(o.matches[H],I))&&(q=!0);let U={...N,defaultShouldRevalidate:q},W=z0(I,U);return CE(n,r,t,z,I,c,e,W,U,E)}),L=[];return y.forEach((I,H)=>{if(u||!i.some(K=>K.route.id===I.routeId)||m.has(H))return;let $=o.fetchers.get(H),V=$&&$.state!=="idle"&&$.data===void 0,q=Nu(b,I.path,w);if(!q){if(C&&V)return;L.push({key:H,routeId:I.routeId,path:I.path,matches:null,match:null,request:null,controller:null});return}if(v.has(H))return;let U=Fb(q,I.path),W=new AbortController,Y=hh(s,I.path,W.signal),G=null;if(h.has(H))h.delete(H),G=Ah(n,r,Y,q,U,c,e);else if(V)f&&(G=Ah(n,r,Y,q,U,c,e));else{let K;typeof E=="boolean"?K=E:R?K=!1:K=f;let Q={...N,defaultShouldRevalidate:K};z0(U,Q)&&(G=Ah(n,r,Y,q,U,c,e,Q))}G&&L.push({key:H,routeId:I.routeId,path:I.path,matches:G,match:U,request:Y,controller:W})}),{dsMatches:B,revalidatingFetchers:L}}function ZM(t){return t.loader!=null||t.middleware!=null&&t.middleware.length>0}function SE(t,e,n){if(t.lazy)return!0;if(!ZM(t))return!1;let r=e!=null&&t.id in e,s=n!=null&&n[t.id]!==void 0;return!r&&s?!1:typeof t.loader=="function"&&t.loader.hydrate===!0?!0:!r&&!s}function Lue(t,e,n){let r=!e||n.route.id!==e.route.id,s=!t.hasOwnProperty(n.route.id);return r||s}function $ue(t,e){let n=t.route.path;return t.pathname!==e.pathname||n!=null&&n.endsWith("*")&&t.params["*"]!==e.params["*"]}function z0(t,e){if(t.route.shouldRevalidate){let n=t.route.shouldRevalidate(e);if(typeof n=="boolean")return n}return e.defaultShouldRevalidate}function d$(t,e,n,r,s,o){let i;if(t){let c=r[t];_n(c,`No route found to patch children into: routeId = ${t}`),c.children||(c.children=[]),i=c.children}else i=n;let a=[],l=[];if(e.forEach(c=>{let u=i.find(f=>uG(c,f));u?l.push({existingRoute:u,newRoute:c}):a.push(c)}),a.length>0){let c=ug(a,s,[t||"_","patch",String((i==null?void 0:i.length)||"0")],r);i.push(...c)}if(o&&l.length>0)for(let c=0;c<l.length;c++){let{existingRoute:u,newRoute:f}=l[c],h=u,[m]=ug([f],s,[],{},!0);Object.assign(h,{element:m.element?m.element:h.element,errorElement:m.errorElement?m.errorElement:h.errorElement,hydrateFallbackElement:m.hydrateFallbackElement?m.hydrateFallbackElement:h.hydrateFallbackElement})}}function uG(t,e){return"id"in t&&"id"in e&&t.id===e.id?!0:t.index===e.index&&t.path===e.path&&t.caseSensitive===e.caseSensitive?(!t.children||t.children.length===0)&&(!e.children||e.children.length===0)?!0:t.children.every((n,r)=>{var s;return(s=e.children)==null?void 0:s.some(o=>uG(n,o))}):!1}var f$=new WeakMap,dG=({key:t,route:e,manifest:n,mapRouteProperties:r})=>{let s=n[e.id];if(_n(s,"No route found in manifest"),!s.lazy||typeof s.lazy!="object")return;let o=s.lazy[t];if(!o)return;let i=f$.get(s);i||(i={},f$.set(s,i));let a=i[t];if(a)return a;let l=(async()=>{let c=eue(t),f=s[t]!==void 0&&t!=="hasErrorBoundary";if(c)is(!c,"Route property "+t+" is not a supported lazy route property. This property will be ignored."),i[t]=Promise.resolve();else if(f)is(!1,`Route "${s.id}" has a static property "${t}" defined. The lazy property will be ignored.`);else{let h=await o();h!=null&&(Object.assign(s,{[t]:h}),Object.assign(s,r(s)))}typeof s.lazy=="object"&&(s.lazy[t]=void 0,Object.values(s.lazy).every(h=>h===void 0)&&(s.lazy=void 0))})();return i[t]=l,l},p$=new WeakMap;function Fue(t,e,n,r,s){let o=n[t.id];if(_n(o,"No route found in manifest"),!t.lazy)return{lazyRoutePromise:void 0,lazyHandlerPromise:void 0};if(typeof t.lazy=="function"){let u=p$.get(o);if(u)return{lazyRoutePromise:u,lazyHandlerPromise:u};let f=(async()=>{_n(typeof t.lazy=="function","No lazy route function found");let h=await t.lazy(),m={};for(let y in h){let v=h[y];if(v===void 0)continue;let b=nue(y),C=o[y]!==void 0&&y!=="hasErrorBoundary";b?is(!b,"Route property "+y+" is not a supported property to be returned from a lazy route function. This property will be ignored."):C?is(!C,`Route "${o.id}" has a static property "${y}" defined but its lazy function is also returning a value for this property. The lazy route property "${y}" will be ignored.`):m[y]=v}Object.assign(o,m),Object.assign(o,{...r(o),lazy:void 0})})();return p$.set(o,f),f.catch(()=>{}),{lazyRoutePromise:f,lazyHandlerPromise:f}}let i=Object.keys(t.lazy),a=[],l;for(let u of i){if(s&&s.includes(u))continue;let f=dG({key:u,route:t,manifest:n,mapRouteProperties:r});f&&(a.push(f),u===e&&(l=f))}let c=a.length>0?Promise.all(a).then(()=>{}):void 0;return c==null||c.catch(()=>{}),l==null||l.catch(()=>{}),{lazyRoutePromise:c,lazyHandlerPromise:l}}async function h$(t){let e=t.matches.filter(s=>s.shouldLoad),n={};return(await Promise.all(e.map(s=>s.resolve()))).forEach((s,o)=>{n[e[o].route.id]=s}),n}async function zue(t){return t.matches.some(e=>e.route.middleware)?fG(t,()=>h$(t)):h$(t)}function fG(t,e){return Pue(t,e,r=>{if(Jue(r))throw r;return r},Kue,n);function n(r,s,o){if(o)return Promise.resolve(Object.assign(o.value,{[s]:{type:"error",result:r}}));{let{matches:i}=t,a=Math.min(Math.max(i.findIndex(c=>c.route.id===s),0),Math.max(i.findIndex(c=>c.shouldCallHandler()),0)),l=Lu(i,i[a].route.id).route.id;return Promise.resolve({[l]:{type:"error",result:r}})}}}async function Pue(t,e,n,r,s){let{matches:o,request:i,params:a,context:l,unstable_pattern:c}=t,u=o.flatMap(h=>h.route.middleware?h.route.middleware.map(m=>[h.route.id,m]):[]);return await pG({request:i,params:a,context:l,unstable_pattern:c},u,e,n,r,s)}async function pG(t,e,n,r,s,o,i=0){let{request:a}=t;if(a.signal.aborted)throw a.signal.reason??new Error(`Request aborted: ${a.method} ${a.url}`);let l=e[i];if(!l)return await n();let[c,u]=l,f,h=async()=>{if(f)throw new Error("You may only call `next()` once per middleware");try{return f={value:await pG(t,e,n,r,s,o,i+1)},f.value}catch(m){return f={value:await o(m,c,f)},f.value}};try{let m=await u(t,h),y=m!=null?r(m):void 0;return s(y)?y:f?y??f.value:(f={value:await h()},f.value)}catch(m){return await o(m,c,f)}}function hG(t,e,n,r,s){let o=dG({key:"middleware",route:r.route,manifest:e,mapRouteProperties:t}),i=Fue(r.route,ao(n.method)?"action":"loader",e,t,s);return{middleware:o,route:i.lazyRoutePromise,handler:i.lazyHandlerPromise}}function CE(t,e,n,r,s,o,i,a,l=null,c){let u=!1,f=hG(t,e,n,s,o);return{...s,_lazyPromises:f,shouldLoad:a,shouldRevalidateArgs:l,shouldCallHandler(h){return u=!0,l?typeof c=="boolean"?z0(s,{...l,defaultShouldRevalidate:c}):typeof h=="boolean"?z0(s,{...l,defaultShouldRevalidate:h}):z0(s,l):a},resolve(h){let{lazy:m,loader:y,middleware:v}=s.route,b=u||a||h&&!ao(n.method)&&(m||y),w=v&&v.length>0&&!y&&!m;return b&&(ao(n.method)||!w)?Hue({request:n,unstable_pattern:r,match:s,lazyHandlerPromise:f==null?void 0:f.handler,lazyRoutePromise:f==null?void 0:f.route,handlerOverride:h,scopedContext:i}):Promise.resolve({type:"data",result:void 0})}}}function Ah(t,e,n,r,s,o,i,a=null){return r.map(l=>l.route.id!==s.route.id?{...l,shouldLoad:!1,shouldRevalidateArgs:a,shouldCallHandler:()=>!1,_lazyPromises:hG(t,e,n,l,o),resolve:()=>Promise.resolve({type:"data",result:void 0})}:CE(t,e,n,n2(r),l,o,i,!0,a))}async function Bue(t,e,n,r,s,o){n.some(c=>{var u;return(u=c._lazyPromises)==null?void 0:u.middleware})&&await Promise.all(n.map(c=>{var u;return(u=c._lazyPromises)==null?void 0:u.middleware}));let i={request:e,unstable_pattern:n2(n),params:n[0].params,context:s,matches:n},l=await t({...i,fetcherKey:r,runClientMiddleware:c=>{let u=i;return fG(u,()=>c({...u,fetcherKey:r,runClientMiddleware:()=>{throw new Error("Cannot call `runClientMiddleware()` from within an `runClientMiddleware` handler")}}))}});try{await Promise.all(n.flatMap(c=>{var u,f;return[(u=c._lazyPromises)==null?void 0:u.handler,(f=c._lazyPromises)==null?void 0:f.route]}))}catch{}return l}async function Hue({request:t,unstable_pattern:e,match:n,lazyHandlerPromise:r,lazyRoutePromise:s,handlerOverride:o,scopedContext:i}){let a,l,c=ao(t.method),u=c?"action":"loader",f=h=>{let m,y=new Promise((w,C)=>m=C);l=()=>m(),t.signal.addEventListener("abort",l);let v=w=>typeof h!="function"?Promise.reject(new Error(`You cannot call the handler for a route which defines a boolean "${u}" [routeId: ${n.route.id}]`)):h({request:t,unstable_pattern:e,params:n.params,context:i},...w!==void 0?[w]:[]),b=(async()=>{try{return{type:"data",result:await(o?o(C=>v(C)):v())}}catch(w){return{type:"error",result:w}}})();return Promise.race([b,y])};try{let h=c?n.route.action:n.route.loader;if(r||s)if(h){let m,[y]=await Promise.all([f(h).catch(v=>{m=v}),r,s]);if(m!==void 0)throw m;a=y}else{await r;let m=c?n.route.action:n.route.loader;if(m)[a]=await Promise.all([f(m),s]);else if(u==="action"){let y=new URL(t.url),v=y.pathname+y.search;throw Hi(405,{method:t.method,pathname:v,routeId:n.route.id})}else return{type:"data",result:void 0}}else if(h)a=await f(h);else{let m=new URL(t.url),y=m.pathname+m.search;throw Hi(404,{pathname:y})}}catch(h){return{type:"error",result:h}}finally{l&&t.signal.removeEventListener("abort",l)}return a}async function Uue(t){let e=t.headers.get("Content-Type");return e&&/\bapplication\/json\b/.test(e)?t.body==null?null:t.json():t.text()}async function Vue(t){var r,s,o,i,a;let{result:e,type:n}=t;if(QM(e)){let l;try{l=await Uue(e)}catch(c){return{type:"error",error:c}}return n==="error"?{type:"error",error:new t2(e.status,e.statusText,l),statusCode:e.status,headers:e.headers}:{type:"data",data:l,statusCode:e.status,headers:e.headers}}return n==="error"?x$(e)?e.data instanceof Error?{type:"error",error:e.data,statusCode:(r=e.init)==null?void 0:r.status,headers:(s=e.init)!=null&&s.headers?new Headers(e.init.headers):void 0}:{type:"error",error:Gue(e),statusCode:dg(e)?e.status:void 0,headers:(o=e.init)!=null&&o.headers?new Headers(e.init.headers):void 0}:{type:"error",error:e,statusCode:dg(e)?e.status:void 0}:x$(e)?{type:"data",data:e.data,statusCode:(i=e.init)==null?void 0:i.status,headers:(a=e.init)!=null&&a.headers?new Headers(e.init.headers):void 0}:{type:"data",data:e}}function que(t,e,n,r,s){let o=t.headers.get("Location");if(_n(o,"Redirects returned/thrown from loaders/actions must have a Location header"),!XM(o)){let i=r.slice(0,r.findIndex(a=>a.route.id===n)+1);o=wE(new URL(e.url),i,s,o),t.headers.set("Location",o)}return t}function m$(t,e,n,r){let s=["about:","blob:","chrome:","chrome-untrusted:","content:","data:","devtools:","file:","filesystem:","javascript:"];if(XM(t)){let o=t,i=o.startsWith("//")?new URL(e.protocol+o):new URL(o);if(s.includes(i.protocol))throw new Error("Invalid redirect location");let a=ea(i.pathname,n)!=null;if(i.origin===e.origin&&a)return i.pathname+i.search+i.hash}try{let o=r.createURL(t);if(s.includes(o.protocol))throw new Error("Invalid redirect location")}catch{}return t}function hh(t,e,n,r){let s=t.createURL(mG(e)).toString(),o={signal:n};if(r&&ao(r.formMethod)){let{formMethod:i,formEncType:a}=r;o.method=i.toUpperCase(),a==="application/json"?(o.headers=new Headers({"Content-Type":a}),o.body=JSON.stringify(r.json)):a==="text/plain"?o.body=r.text:a==="application/x-www-form-urlencoded"&&r.formData?o.body=kE(r.formData):o.body=r.formData}return new Request(s,o)}function kE(t){let e=new URLSearchParams;for(let[n,r]of t.entries())e.append(n,typeof r=="string"?r:r.name);return e}function g$(t){let e=new FormData;for(let[n,r]of t.entries())e.append(n,r);return e}function Wue(t,e,n,r=!1,s=!1){let o={},i=null,a,l=!1,c={},u=n&&pi(n[1])?n[1].error:void 0;return t.forEach(f=>{if(!(f.route.id in e))return;let h=f.route.id,m=e[h];if(_n(!pf(m),"Cannot handle redirect results in processLoaderData"),pi(m)){let y=m.error;if(u!==void 0&&(y=u,u=void 0),i=i||{},s)i[h]=y;else{let v=Lu(t,h);i[v.route.id]==null&&(i[v.route.id]=y)}r||(o[h]=cG),l||(l=!0,a=dg(m.error)?m.error.status:500),m.headers&&(c[h]=m.headers)}else o[h]=m.data,m.statusCode&&m.statusCode!==200&&!l&&(a=m.statusCode),m.headers&&(c[h]=m.headers)}),u!==void 0&&n&&(i={[n[0]]:u},n[2]&&(o[n[2]]=void 0)),{loaderData:o,errors:i,statusCode:a||200,loaderHeaders:c}}function y$(t,e,n,r,s,o){let{loaderData:i,errors:a}=Wue(e,n,r);return s.filter(l=>!l.matches||l.matches.some(c=>c.shouldLoad)).forEach(l=>{let{key:c,match:u,controller:f}=l;if(f&&f.signal.aborted)return;let h=o[c];if(_n(h,"Did not find corresponding fetcher result"),pi(h)){let m=Lu(t.matches,u==null?void 0:u.route.id);a&&a[m.route.id]||(a={...a,[m.route.id]:h.error}),t.fetchers.delete(c)}else if(pf(h))_n(!1,"Unhandled fetcher revalidation redirect");else{let m=ic(h.data);t.fetchers.set(c,m)}}),{loaderData:i,errors:a}}function v$(t,e,n,r){let s=Object.entries(e).filter(([,o])=>o!==cG).reduce((o,[i,a])=>(o[i]=a,o),{});for(let o of n){let i=o.route.id;if(!e.hasOwnProperty(i)&&t.hasOwnProperty(i)&&o.route.loader&&(s[i]=t[i]),r&&r.hasOwnProperty(i))break}return s}function b$(t){return t?pi(t[1])?{actionData:{}}:{actionData:{[t[0]]:t[1].data}}:{}}function Lu(t,e){return(e?t.slice(0,t.findIndex(r=>r.route.id===e)+1):[...t]).reverse().find(r=>r.route.hasErrorBoundary===!0)||t[0]}function Tv(t){let e=t.length===1?t[0]:t.find(n=>n.index||!n.path||n.path==="/")||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:e}],route:e}}function Hi(t,{pathname:e,routeId:n,method:r,type:s,message:o}={}){let i="Unknown Server Error",a="Unknown @remix-run/router error";return t===400?(i="Bad Request",r&&e&&n?a=`You made a ${r} request to "${e}" but did not provide a \`loader\` for route "${n}", so there is no way to handle the request.`:s==="invalid-body"&&(a="Unable to encode submission body")):t===403?(i="Forbidden",a=`Route "${n}" does not match URL "${e}"`):t===404?(i="Not Found",a=`No route matches URL "${e}"`):t===405&&(i="Method Not Allowed",r&&e&&n?a=`You made a ${r.toUpperCase()} request to "${e}" but did not provide an \`action\` for route "${n}", so there is no way to handle the request.`:r&&(a=`Invalid request method "${r.toUpperCase()}"`)),new t2(t||500,i,new Error(a),!0)}function Mv(t){let e=Object.entries(t);for(let n=e.length-1;n>=0;n--){let[r,s]=e[n];if(pf(s))return{key:r,result:s}}}function mG(t){let e=typeof t=="string"?gd(t):t;return Cl({...e,hash:""})}function Yue(t,e){return t.pathname!==e.pathname||t.search!==e.search?!1:t.hash===""?e.hash!=="":t.hash===e.hash?!0:e.hash!==""}function Gue(t){var e,n;return new t2(((e=t.init)==null?void 0:e.status)??500,((n=t.init)==null?void 0:n.statusText)??"Internal Server Error",t.data)}function Kue(t){return t!=null&&typeof t=="object"&&Object.entries(t).every(([e,n])=>typeof e=="string"&&Xue(n))}function Xue(t){return t!=null&&typeof t=="object"&&"type"in t&&"result"in t&&(t.type==="data"||t.type==="error")}function Zue(t){return QM(t.result)&&aG.has(t.result.status)}function pi(t){return t.type==="error"}function pf(t){return(t&&t.type)==="redirect"}function x$(t){return typeof t=="object"&&t!=null&&"type"in t&&"data"in t&&"init"in t&&t.type==="DataWithResponseInit"}function QM(t){return t!=null&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.headers=="object"&&typeof t.body<"u"}function Que(t){return aG.has(t)}function Jue(t){return QM(t)&&Que(t.status)&&t.headers.has("Location")}function ede(t){return _ue.has(t.toUpperCase())}function ao(t){return jue.has(t.toUpperCase())}function JM(t){return new URLSearchParams(t).getAll("index").some(e=>e==="")}function Fb(t,e){let n=typeof e=="string"?gd(e).search:e.search;if(t[t.length-1].route.index&&JM(n||""))return t[t.length-1];let r=nG(t);return r[r.length-1]}function w$(t){let{formMethod:e,formAction:n,formEncType:r,text:s,formData:o,json:i}=t;if(!(!e||!n||!r)){if(s!=null)return{formMethod:e,formAction:n,formEncType:r,formData:void 0,json:void 0,text:s};if(o!=null)return{formMethod:e,formAction:n,formEncType:r,formData:o,json:void 0,text:void 0};if(i!==void 0)return{formMethod:e,formAction:n,formEncType:r,formData:void 0,json:i,text:void 0}}}function T6(t,e){return e?{state:"loading",location:t,formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text}:{state:"loading",location:t,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function tde(t,e){return{state:"submitting",location:t,formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text}}function Q1(t,e){return t?{state:"loading",formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text,data:e}:{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:e}}function nde(t,e){return{state:"submitting",formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text,data:e?e.data:void 0}}function ic(t){return{state:"idle",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:t}}function rde(t,e){try{let n=t.sessionStorage.getItem(lG);if(n){let r=JSON.parse(n);for(let[s,o]of Object.entries(r||{}))o&&Array.isArray(o)&&e.set(s,new Set(o||[]))}}catch{}}function sde(t,e){if(e.size>0){let n={};for(let[r,s]of e)n[r]=[...s];try{t.sessionStorage.setItem(lG,JSON.stringify(n))}catch(r){is(!1,`Failed to save applied view transitions in sessionStorage (${r}).`)}}}function S$(){let t,e,n=new Promise((r,s)=>{t=async o=>{r(o);try{await n}catch{}},e=async o=>{s(o);try{await n}catch{}}});return{promise:n,resolve:t,reject:e}}var Qf=S.createContext(null);Qf.displayName="DataRouter";var r2=S.createContext(null);r2.displayName="DataRouterState";var gG=S.createContext(!1);function ode(){return S.useContext(gG)}var ej=S.createContext({isTransitioning:!1});ej.displayName="ViewTransition";var yG=S.createContext(new Map);yG.displayName="Fetchers";var ide=S.createContext(null);ide.displayName="Await";var Ei=S.createContext(null);Ei.displayName="Navigation";var zw=S.createContext(null);zw.displayName="Location";var sa=S.createContext({outlet:null,matches:[],isDataRoute:!1});sa.displayName="Route";var tj=S.createContext(null);tj.displayName="RouteError";var vG="REACT_ROUTER_ERROR",ade="REDIRECT",lde="ROUTE_ERROR_RESPONSE";function cde(t){if(t.startsWith(`${vG}:${ade}:{`))try{let e=JSON.parse(t.slice(28));if(typeof e=="object"&&e&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.location=="string"&&typeof e.reloadDocument=="boolean"&&typeof e.replace=="boolean")return e}catch{}}function ude(t){if(t.startsWith(`${vG}:${lde}:{`))try{let e=JSON.parse(t.slice(40));if(typeof e=="object"&&e&&typeof e.status=="number"&&typeof e.statusText=="string")return new t2(e.status,e.statusText,e.data)}catch{}}function dde(t,{relative:e}={}){_n(Cm(),"useHref() may be used only in the context of a <Router> component.");let{basename:n,navigator:r}=S.useContext(Ei),{hash:s,pathname:o,search:i}=s2(t,{relative:e}),a=o;return n!=="/"&&(a=o==="/"?n:ml([n,o])),r.createHref({pathname:a,search:i,hash:s})}function Cm(){return S.useContext(zw)!=null}function wn(){return _n(Cm(),"useLocation() may be used only in the context of a <Router> component."),S.useContext(zw).location}var bG="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function xG(t){S.useContext(Ei).static||S.useLayoutEffect(t)}function Er(){let{isDataRoute:t}=S.useContext(sa);return t?Tde():fde()}function fde(){_n(Cm(),"useNavigate() may be used only in the context of a <Router> component.");let t=S.useContext(Qf),{basename:e,navigator:n}=S.useContext(Ei),{matches:r}=S.useContext(sa),{pathname:s}=wn(),o=JSON.stringify($w(r)),i=S.useRef(!1);return xG(()=>{i.current=!0}),S.useCallback((l,c={})=>{if(is(i.current,bG),!i.current)return;if(typeof l=="number"){n.go(l);return}let u=Fw(l,JSON.parse(o),s,c.relative==="path");t==null&&e!=="/"&&(u.pathname=u.pathname==="/"?e:ml([e,u.pathname])),(c.replace?n.replace:n.push)(u,c.state,c)},[e,n,o,s,t])}var pde=S.createContext(null);function hde(t){let e=S.useContext(sa).outlet;return S.useMemo(()=>e&&S.createElement(pde.Provider,{value:t},e),[e,t])}function sr(){let{matches:t}=S.useContext(sa),e=t[t.length-1];return e?e.params:{}}function s2(t,{relative:e}={}){let{matches:n}=S.useContext(sa),{pathname:r}=wn(),s=JSON.stringify($w(n));return S.useMemo(()=>Fw(t,JSON.parse(s),r,e==="path"),[t,s,r,e])}function mde(t,e,n,r,s){_n(Cm(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:o}=S.useContext(Ei),{matches:i}=S.useContext(sa),a=i[i.length-1],l=a?a.params:{},c=a?a.pathname:"/",u=a?a.pathnameBase:"/",f=a&&a.route;{let C=f&&f.path||"";SG(c,!f||C.endsWith("*")||C.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${c}" (under <Route path="${C}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.

Please change the parent <Route path="${C}"> to <Route path="${C==="/"?"*":`${C}/*`}">.`)}let h=wn(),m;m=h;let y=m.pathname||"/",v=y;if(u!=="/"){let C=u.replace(/^\//,"").split("/");v="/"+y.replace(/^\//,"").split("/").slice(C.length).join("/")}let b=Nu(t,{pathname:v});return is(f||b!=null,`No routes matched location "${m.pathname}${m.search}${m.hash}" `),is(b==null||b[b.length-1].route.element!==void 0||b[b.length-1].route.Component!==void 0||b[b.length-1].route.lazy!==void 0,`Matched leaf route at location "${m.pathname}${m.search}${m.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`),xde(b&&b.map(C=>Object.assign({},C,{params:Object.assign({},l,C.params),pathname:ml([u,o.encodeLocation?o.encodeLocation(C.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:C.pathname]),pathnameBase:C.pathnameBase==="/"?u:ml([u,o.encodeLocation?o.encodeLocation(C.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:C.pathnameBase])})),i,n,r,s)}function gde(){let t=Ede(),e=dg(t)?`${t.status} ${t.statusText}`:t instanceof Error?t.message:JSON.stringify(t),n=t instanceof Error?t.stack:null,r="rgba(200,200,200, 0.5)",s={padding:"0.5rem",backgroundColor:r},o={padding:"2px 4px",backgroundColor:r},i=null;return console.error("Error handled by React Router default ErrorBoundary:",t),i=S.createElement(S.Fragment,null,S.createElement("p",null,"💿 Hey developer 👋"),S.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",S.createElement("code",{style:o},"ErrorBoundary")," or"," ",S.createElement("code",{style:o},"errorElement")," prop on your route.")),S.createElement(S.Fragment,null,S.createElement("h2",null,"Unexpected Application Error!"),S.createElement("h3",{style:{fontStyle:"italic"}},e),n?S.createElement("pre",{style:s},n):null,i)}var yde=S.createElement(gde,null),wG=class extends S.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,e){return e.location!==t.location||e.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:e.error,location:e.location,revalidation:t.revalidation||e.revalidation}}componentDidCatch(t,e){this.props.onError?this.props.onError(t,e):console.error("React Router caught the following error during render",t)}render(){let t=this.state.error;if(this.context&&typeof t=="object"&&t&&"digest"in t&&typeof t.digest=="string"){const n=ude(t.digest);n&&(t=n)}let e=t!==void 0?S.createElement(sa.Provider,{value:this.props.routeContext},S.createElement(tj.Provider,{value:t,children:this.props.component})):this.props.children;return this.context?S.createElement(vde,{error:t},e):e}};wG.contextType=gG;var M6=new WeakMap;function vde({children:t,error:e}){let{basename:n}=S.useContext(Ei);if(typeof e=="object"&&e&&"digest"in e&&typeof e.digest=="string"){let r=cde(e.digest);if(r){let s=M6.get(e);if(s)throw s;let o=sG(r.location,n);if(rG&&!M6.get(e))if(o.isExternal||r.reloadDocument)window.location.href=o.absoluteURL||o.to;else{const i=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(o.to,{replace:r.replace}));throw M6.set(e,i),i}return S.createElement("meta",{httpEquiv:"refresh",content:`0;url=${o.absoluteURL||o.to}`})}}return t}function bde({routeContext:t,match:e,children:n}){let r=S.useContext(Qf);return r&&r.static&&r.staticContext&&(e.route.errorElement||e.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=e.route.id),S.createElement(sa.Provider,{value:t},n)}function xde(t,e=[],n=null,r=null,s=null){if(t==null){if(!n)return null;if(n.errors)t=n.matches;else if(e.length===0&&!n.initialized&&n.matches.length>0)t=n.matches;else return null}let o=t,i=n==null?void 0:n.errors;if(i!=null){let u=o.findIndex(f=>f.route.id&&(i==null?void 0:i[f.route.id])!==void 0);_n(u>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(i).join(",")}`),o=o.slice(0,Math.min(o.length,u+1))}let a=!1,l=-1;if(n)for(let u=0;u<o.length;u++){let f=o[u];if((f.route.HydrateFallback||f.route.hydrateFallbackElement)&&(l=u),f.route.id){let{loaderData:h,errors:m}=n,y=f.route.loader&&!h.hasOwnProperty(f.route.id)&&(!m||m[f.route.id]===void 0);if(f.route.lazy||y){a=!0,l>=0?o=o.slice(0,l+1):o=[o[0]];break}}}let c=n&&r?(u,f)=>{var h,m;r(u,{location:n.location,params:((m=(h=n.matches)==null?void 0:h[0])==null?void 0:m.params)??{},unstable_pattern:n2(n.matches),errorInfo:f})}:void 0;return o.reduceRight((u,f,h)=>{let m,y=!1,v=null,b=null;n&&(m=i&&f.route.id?i[f.route.id]:void 0,v=f.route.errorElement||yde,a&&(l<0&&h===0?(SG("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),y=!0,b=null):l===h&&(y=!0,b=f.route.hydrateFallbackElement||null)));let w=e.concat(o.slice(0,h+1)),C=()=>{let k;return m?k=v:y?k=b:f.route.Component?k=S.createElement(f.route.Component,null):f.route.element?k=f.route.element:k=u,S.createElement(bde,{match:f,routeContext:{outlet:u,matches:w,isDataRoute:n!=null},children:k})};return n&&(f.route.ErrorBoundary||f.route.errorElement||h===0)?S.createElement(wG,{location:n.location,revalidation:n.revalidation,component:v,error:m,children:C(),routeContext:{outlet:null,matches:w,isDataRoute:!0},onError:c}):C()},null)}function nj(t){return`${t} must be used within a data router.  See https://reactrouter.com/en/main/routers/picking-a-router.`}function wde(t){let e=S.useContext(Qf);return _n(e,nj(t)),e}function Sde(t){let e=S.useContext(r2);return _n(e,nj(t)),e}function Cde(t){let e=S.useContext(sa);return _n(e,nj(t)),e}function rj(t){let e=Cde(t),n=e.matches[e.matches.length-1];return _n(n.route.id,`${t} can only be used on routes that contain a unique "id"`),n.route.id}function kde(){return rj("useRouteId")}function Ede(){var r;let t=S.useContext(tj),e=Sde("useRouteError"),n=rj("useRouteError");return t!==void 0?t:(r=e.errors)==null?void 0:r[n]}function Tde(){let{router:t}=wde("useNavigate"),e=rj("useNavigate"),n=S.useRef(!1);return xG(()=>{n.current=!0}),S.useCallback(async(s,o={})=>{is(n.current,bG),n.current&&(typeof s=="number"?await t.navigate(s):await t.navigate(s,{fromRouteId:e,...o}))},[t,e])}var C$={};function SG(t,e,n){!e&&!C$[t]&&(C$[t]=!0,is(!1,n))}var k$={};function E$(t,e){!t&&!k$[e]&&(k$[e]=!0,console.warn(e))}var Mde="useOptimistic",T$=lg[Mde],jde=()=>{};function Ade(t){return T$?T$(t):[t,jde]}function _de(t){let e={hasErrorBoundary:t.hasErrorBoundary||t.ErrorBoundary!=null||t.errorElement!=null};return t.Component&&(t.element&&is(!1,"You should not include both `Component` and `element` on your route - `Component` will be used."),Object.assign(e,{element:S.createElement(t.Component),Component:void 0})),t.HydrateFallback&&(t.hydrateFallbackElement&&is(!1,"You should not include both `HydrateFallback` and `hydrateFallbackElement` on your route - `HydrateFallback` will be used."),Object.assign(e,{hydrateFallbackElement:S.createElement(t.HydrateFallback),HydrateFallback:void 0})),t.ErrorBoundary&&(t.errorElement&&is(!1,"You should not include both `ErrorBoundary` and `errorElement` on your route - `ErrorBoundary` will be used."),Object.assign(e,{errorElement:S.createElement(t.ErrorBoundary),ErrorBoundary:void 0})),e}var Rde=["HydrateFallback","hydrateFallbackElement"],Dde=class{constructor(){this.status="pending",this.promise=new Promise((t,e)=>{this.resolve=n=>{this.status==="pending"&&(this.status="resolved",t(n))},this.reject=n=>{this.status==="pending"&&(this.status="rejected",e(n))}})}};function Ide({router:t,flushSync:e,onError:n,unstable_useTransitions:r}){r=ode()||r;let[o,i]=S.useState(t.state),[a,l]=Ade(o),[c,u]=S.useState(),[f,h]=S.useState({isTransitioning:!1}),[m,y]=S.useState(),[v,b]=S.useState(),[w,C]=S.useState(),k=S.useRef(new Map),E=S.useCallback((_,{deletedFetchers:D,newErrors:R,flushSync:N,viewTransitionOpts:z})=>{R&&n&&Object.values(R).forEach(L=>{var P;return n(L,{location:_.location,params:((P=_.matches[0])==null?void 0:P.params)??{},unstable_pattern:n2(_.matches)})}),_.fetchers.forEach((L,P)=>{L.data!==void 0&&k.current.set(P,L.data)}),D.forEach(L=>k.current.delete(L)),E$(N===!1||e!=null,'You provided the `flushSync` option to a router update, but you are not using the `<RouterProvider>` from `react-router/dom` so `ReactDOM.flushSync()` is unavailable.  Please update your app to `import { RouterProvider } from "react-router/dom"` and ensure you have `react-dom` installed as a dependency to use the `flushSync` option.');let B=t.window!=null&&t.window.document!=null&&typeof t.window.document.startViewTransition=="function";if(E$(z==null||B,"You provided the `viewTransition` option to a router update, but you do not appear to be running in a DOM environment as `window.startViewTransition` is not available."),!z||!B){e&&N?e(()=>i(_)):r===!1?i(_):S.startTransition(()=>{r===!0&&l(L=>M$(L,_)),i(_)});return}if(e&&N){e(()=>{v&&(m==null||m.resolve(),v.skipTransition()),h({isTransitioning:!0,flushSync:!0,currentLocation:z.currentLocation,nextLocation:z.nextLocation})});let L=t.window.document.startViewTransition(()=>{e(()=>i(_))});L.finished.finally(()=>{e(()=>{y(void 0),b(void 0),u(void 0),h({isTransitioning:!1})})}),e(()=>b(L));return}v?(m==null||m.resolve(),v.skipTransition(),C({state:_,currentLocation:z.currentLocation,nextLocation:z.nextLocation})):(u(_),h({isTransitioning:!0,flushSync:!1,currentLocation:z.currentLocation,nextLocation:z.nextLocation}))},[t.window,e,v,m,r,l,n]);S.useLayoutEffect(()=>t.subscribe(E),[t,E]),S.useEffect(()=>{f.isTransitioning&&!f.flushSync&&y(new Dde)},[f]),S.useEffect(()=>{if(m&&c&&t.window){let _=c,D=m.promise,R=t.window.document.startViewTransition(async()=>{r===!1?i(_):S.startTransition(()=>{r===!0&&l(N=>M$(N,_)),i(_)}),await D});R.finished.finally(()=>{y(void 0),b(void 0),u(void 0),h({isTransitioning:!1})}),b(R)}},[c,m,t.window,r,l]),S.useEffect(()=>{m&&c&&a.location.key===c.location.key&&m.resolve()},[m,v,a.location,c]),S.useEffect(()=>{!f.isTransitioning&&w&&(u(w.state),h({isTransitioning:!0,flushSync:!1,currentLocation:w.currentLocation,nextLocation:w.nextLocation}),C(void 0))},[f.isTransitioning,w]);let j=S.useMemo(()=>({createHref:t.createHref,encodeLocation:t.encodeLocation,go:_=>t.navigate(_),push:(_,D,R)=>t.navigate(_,{state:D,preventScrollReset:R==null?void 0:R.preventScrollReset}),replace:(_,D,R)=>t.navigate(_,{replace:!0,state:D,preventScrollReset:R==null?void 0:R.preventScrollReset})}),[t]),A=t.basename||"/",M=S.useMemo(()=>({router:t,navigator:j,static:!1,basename:A,onError:n}),[t,j,A,n]);return S.createElement(S.Fragment,null,S.createElement(Qf.Provider,{value:M},S.createElement(r2.Provider,{value:a},S.createElement(yG.Provider,{value:k.current},S.createElement(ej.Provider,{value:f},S.createElement(Lde,{basename:A,location:a.location,navigationType:a.historyAction,navigator:j,unstable_useTransitions:r},S.createElement(Ode,{routes:t.routes,future:t.future,state:a,onError:n})))))),null)}function M$(t,e){return{...t,navigation:e.navigation.state!=="idle"?e.navigation:t.navigation,revalidation:e.revalidation!=="idle"?e.revalidation:t.revalidation,actionData:e.navigation.state!=="submitting"?e.actionData:t.actionData,fetchers:e.fetchers}}var Ode=S.memo(Nde);function Nde({routes:t,future:e,state:n,onError:r}){return mde(t,void 0,n,r,e)}function o2({to:t,replace:e,state:n,relative:r}){_n(Cm(),"<Navigate> may be used only in the context of a <Router> component.");let{static:s}=S.useContext(Ei);is(!s,"<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.");let{matches:o}=S.useContext(sa),{pathname:i}=wn(),a=Er(),l=Fw(t,$w(o),i,r==="path"),c=JSON.stringify(l);return S.useEffect(()=>{a(JSON.parse(c),{replace:e,state:n,relative:r})},[a,c,r,e,n]),null}function sj(t){return hde(t.context)}function Lde({basename:t="/",children:e=null,location:n,navigationType:r="POP",navigator:s,static:o=!1,unstable_useTransitions:i}){_n(!Cm(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let a=t.replace(/^\/*/,"/"),l=S.useMemo(()=>({basename:a,navigator:s,static:o,unstable_useTransitions:i,future:{}}),[a,s,o,i]);typeof n=="string"&&(n=gd(n));let{pathname:c="/",search:u="",hash:f="",state:h=null,key:m="default"}=n,y=S.useMemo(()=>{let v=ea(c,a);return v==null?null:{location:{pathname:v,search:u,hash:f,state:h,key:m},navigationType:r}},[a,c,u,f,h,m,r]);return is(y!=null,`<Router basename="${a}"> is not able to match the URL "${c}${u}${f}" because it does not start with the basename, so the <Router> won't render anything.`),y==null?null:S.createElement(Ei.Provider,{value:l},S.createElement(zw.Provider,{children:e,value:y}))}var zb="get",Pb="application/x-www-form-urlencoded";function Pw(t){return typeof HTMLElement<"u"&&t instanceof HTMLElement}function $de(t){return Pw(t)&&t.tagName.toLowerCase()==="button"}function Fde(t){return Pw(t)&&t.tagName.toLowerCase()==="form"}function zde(t){return Pw(t)&&t.tagName.toLowerCase()==="input"}function Pde(t){return!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)}function Bde(t,e){return t.button===0&&(!e||e==="_self")&&!Pde(t)}var jv=null;function Hde(){if(jv===null)try{new FormData(document.createElement("form"),0),jv=!1}catch{jv=!0}return jv}var Ude=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function j6(t){return t!=null&&!Ude.has(t)?(is(!1,`"${t}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Pb}"`),null):t}function Vde(t,e){let n,r,s,o,i;if(Fde(t)){let a=t.getAttribute("action");r=a?ea(a,e):null,n=t.getAttribute("method")||zb,s=j6(t.getAttribute("enctype"))||Pb,o=new FormData(t)}else if($de(t)||zde(t)&&(t.type==="submit"||t.type==="image")){let a=t.form;if(a==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let l=t.getAttribute("formaction")||a.getAttribute("action");if(r=l?ea(l,e):null,n=t.getAttribute("formmethod")||a.getAttribute("method")||zb,s=j6(t.getAttribute("formenctype"))||j6(a.getAttribute("enctype"))||Pb,o=new FormData(a,t),!Hde()){let{name:c,type:u,value:f}=t;if(u==="image"){let h=c?`${c}.`:"";o.append(`${h}x`,"0"),o.append(`${h}y`,"0")}else c&&o.append(c,f)}}else{if(Pw(t))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');n=zb,r=null,s=Pb,i=t}return o&&s==="text/plain"&&(i=o,o=void 0),{action:r,method:n.toLowerCase(),encType:s,formData:o,body:i}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function oj(t,e){if(t===!1||t===null||typeof t>"u")throw new Error(e)}function qde(t,e,n,r){let s=typeof t=="string"?new URL(t,typeof window>"u"?"server://singlefetch/":window.location.origin):t;return n?s.pathname.endsWith("/")?s.pathname=`${s.pathname}_.${r}`:s.pathname=`${s.pathname}.${r}`:s.pathname==="/"?s.pathname=`_root.${r}`:e&&ea(s.pathname,e)==="/"?s.pathname=`${e.replace(/\/$/,"")}/_root.${r}`:s.pathname=`${s.pathname.replace(/\/$/,"")}.${r}`,s}async function Wde(t,e){if(t.id in e)return e[t.id];try{let n=await import(t.module);return e[t.id]=n,n}catch(n){return console.error(`Error loading route module \`${t.module}\`, reloading page...`),console.error(n),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function Yde(t){return t==null?!1:t.href==null?t.rel==="preload"&&typeof t.imageSrcSet=="string"&&typeof t.imageSizes=="string":typeof t.rel=="string"&&typeof t.href=="string"}async function Gde(t,e,n){let r=await Promise.all(t.map(async s=>{let o=e.routes[s.route.id];if(o){let i=await Wde(o,n);return i.links?i.links():[]}return[]}));return Qde(r.flat(1).filter(Yde).filter(s=>s.rel==="stylesheet"||s.rel==="preload").map(s=>s.rel==="stylesheet"?{...s,rel:"prefetch",as:"style"}:{...s,rel:"prefetch"}))}function j$(t,e,n,r,s,o){let i=(l,c)=>n[c]?l.route.id!==n[c].route.id:!0,a=(l,c)=>{var u;return n[c].pathname!==l.pathname||((u=n[c].route.path)==null?void 0:u.endsWith("*"))&&n[c].params["*"]!==l.params["*"]};return o==="assets"?e.filter((l,c)=>i(l,c)||a(l,c)):o==="data"?e.filter((l,c)=>{var f;let u=r.routes[l.route.id];if(!u||!u.hasLoader)return!1;if(i(l,c)||a(l,c))return!0;if(l.route.shouldRevalidate){let h=l.route.shouldRevalidate({currentUrl:new URL(s.pathname+s.search+s.hash,window.origin),currentParams:((f=n[0])==null?void 0:f.params)||{},nextUrl:new URL(t,window.origin),nextParams:l.params,defaultShouldRevalidate:!0});if(typeof h=="boolean")return h}return!0}):[]}function Kde(t,e,{includeHydrateFallback:n}={}){return Xde(t.map(r=>{let s=e.routes[r.route.id];if(!s)return[];let o=[s.module];return s.clientActionModule&&(o=o.concat(s.clientActionModule)),s.clientLoaderModule&&(o=o.concat(s.clientLoaderModule)),n&&s.hydrateFallbackModule&&(o=o.concat(s.hydrateFallbackModule)),s.imports&&(o=o.concat(s.imports)),o}).flat(1))}function Xde(t){return[...new Set(t)]}function Zde(t){let e={},n=Object.keys(t).sort();for(let r of n)e[r]=t[r];return e}function Qde(t,e){let n=new Set;return new Set(e),t.reduce((r,s)=>{let o=JSON.stringify(Zde(s));return n.has(o)||(n.add(o),r.push({key:o,link:s})),r},[])}function CG(){let t=S.useContext(Qf);return oj(t,"You must render this element inside a <DataRouterContext.Provider> element"),t}function Jde(){let t=S.useContext(r2);return oj(t,"You must render this element inside a <DataRouterStateContext.Provider> element"),t}var ij=S.createContext(void 0);ij.displayName="FrameworkContext";function kG(){let t=S.useContext(ij);return oj(t,"You must render this element inside a <HydratedRouter> element"),t}function efe(t,e){let n=S.useContext(ij),[r,s]=S.useState(!1),[o,i]=S.useState(!1),{onFocus:a,onBlur:l,onMouseEnter:c,onMouseLeave:u,onTouchStart:f}=e,h=S.useRef(null);S.useEffect(()=>{if(t==="render"&&i(!0),t==="viewport"){let v=w=>{w.forEach(C=>{i(C.isIntersecting)})},b=new IntersectionObserver(v,{threshold:.5});return h.current&&b.observe(h.current),()=>{b.disconnect()}}},[t]),S.useEffect(()=>{if(r){let v=setTimeout(()=>{i(!0)},100);return()=>{clearTimeout(v)}}},[r]);let m=()=>{s(!0)},y=()=>{s(!1),i(!1)};return n?t!=="intent"?[o,h,{}]:[o,h,{onFocus:J1(a,m),onBlur:J1(l,y),onMouseEnter:J1(c,m),onMouseLeave:J1(u,y),onTouchStart:J1(f,m)}]:[!1,h,{}]}function J1(t,e){return n=>{t&&t(n),n.defaultPrevented||e(n)}}function tfe({page:t,...e}){let{router:n}=CG(),r=S.useMemo(()=>Nu(n.routes,t,n.basename),[n.routes,t,n.basename]);return r?S.createElement(rfe,{page:t,matches:r,...e}):null}function nfe(t){let{manifest:e,routeModules:n}=kG(),[r,s]=S.useState([]);return S.useEffect(()=>{let o=!1;return Gde(t,e,n).then(i=>{o||s(i)}),()=>{o=!0}},[t,e,n]),r}function rfe({page:t,matches:e,...n}){let r=wn(),{future:s,manifest:o,routeModules:i}=kG(),{basename:a}=CG(),{loaderData:l,matches:c}=Jde(),u=S.useMemo(()=>j$(t,e,c,o,r,"data"),[t,e,c,o,r]),f=S.useMemo(()=>j$(t,e,c,o,r,"assets"),[t,e,c,o,r]),h=S.useMemo(()=>{if(t===r.pathname+r.search+r.hash)return[];let v=new Set,b=!1;if(e.forEach(C=>{var E;let k=o.routes[C.route.id];!k||!k.hasLoader||(!u.some(j=>j.route.id===C.route.id)&&C.route.id in l&&((E=i[C.route.id])!=null&&E.shouldRevalidate)||k.hasClientLoader?b=!0:v.add(C.route.id))}),v.size===0)return[];let w=qde(t,a,s.unstable_trailingSlashAwareDataRequests,"data");return b&&v.size>0&&w.searchParams.set("_routes",e.filter(C=>v.has(C.route.id)).map(C=>C.route.id).join(",")),[w.pathname+w.search]},[a,s.unstable_trailingSlashAwareDataRequests,l,r,o,u,e,t,i]),m=S.useMemo(()=>Kde(f,o),[f,o]),y=nfe(f);return S.createElement(S.Fragment,null,h.map(v=>S.createElement("link",{key:v,rel:"prefetch",as:"fetch",href:v,...n})),m.map(v=>S.createElement("link",{key:v,rel:"modulepreload",href:v,...n})),y.map(({key:v,link:b})=>S.createElement("link",{key:v,nonce:n.nonce,...b,crossOrigin:b.crossOrigin??n.crossOrigin})))}function sfe(...t){return e=>{t.forEach(n=>{typeof n=="function"?n(e):n!=null&&(n.current=e)})}}var ofe=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{ofe&&(window.__reactRouterVersion="7.13.0")}catch{}function ife(t,e){return Oue({basename:e==null?void 0:e.basename,getContext:e==null?void 0:e.getContext,future:e==null?void 0:e.future,history:Xce({window:e==null?void 0:e.window}),hydrationData:(e==null?void 0:e.hydrationData)||afe(),routes:t,mapRouteProperties:_de,hydrationRouteProperties:Rde,dataStrategy:e==null?void 0:e.dataStrategy,patchRoutesOnNavigation:e==null?void 0:e.patchRoutesOnNavigation,window:e==null?void 0:e.window,unstable_instrumentations:e==null?void 0:e.unstable_instrumentations}).initialize()}function afe(){let t=window==null?void 0:window.__staticRouterHydrationData;return t&&t.errors&&(t={...t,errors:lfe(t.errors)}),t}function lfe(t){if(!t)return null;let e=Object.entries(t),n={};for(let[r,s]of e)if(s&&s.__type==="RouteErrorResponse")n[r]=new t2(s.status,s.statusText,s.data,s.internal===!0);else if(s&&s.__type==="Error"){if(s.__subType){let o=window[s.__subType];if(typeof o=="function")try{let i=new o(s.message);i.stack="",n[r]=i}catch{}}if(n[r]==null){let o=new Error(s.message);o.stack="",n[r]=o}}else n[r]=s;return n}var EG=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,aj=S.forwardRef(function({onClick:e,discover:n="render",prefetch:r="none",relative:s,reloadDocument:o,replace:i,state:a,target:l,to:c,preventScrollReset:u,viewTransition:f,unstable_defaultShouldRevalidate:h,...m},y){let{basename:v,unstable_useTransitions:b}=S.useContext(Ei),w=typeof c=="string"&&EG.test(c),C=sG(c,v);c=C.to;let k=dde(c,{relative:s}),[E,j,A]=efe(r,m),M=dfe(c,{replace:i,state:a,target:l,preventScrollReset:u,relative:s,viewTransition:f,unstable_defaultShouldRevalidate:h,unstable_useTransitions:b});function _(R){e&&e(R),R.defaultPrevented||M(R)}let D=S.createElement("a",{...m,...A,href:C.absoluteURL||k,onClick:C.isExternal||o?e:_,ref:sfe(y,j),target:l,"data-discover":!w&&n==="render"?"true":void 0});return E&&!w?S.createElement(S.Fragment,null,D,S.createElement(tfe,{page:k})):D});aj.displayName="Link";var TG=S.forwardRef(function({"aria-current":e="page",caseSensitive:n=!1,className:r="",end:s=!1,style:o,to:i,viewTransition:a,children:l,...c},u){let f=s2(i,{relative:c.relative}),h=wn(),m=S.useContext(r2),{navigator:y,basename:v}=S.useContext(Ei),b=m!=null&&gfe(f)&&a===!0,w=y.encodeLocation?y.encodeLocation(f).pathname:f.pathname,C=h.pathname,k=m&&m.navigation&&m.navigation.location?m.navigation.location.pathname:null;n||(C=C.toLowerCase(),k=k?k.toLowerCase():null,w=w.toLowerCase()),k&&v&&(k=ea(k,v)||k);const E=w!=="/"&&w.endsWith("/")?w.length-1:w.length;let j=C===w||!s&&C.startsWith(w)&&C.charAt(E)==="/",A=k!=null&&(k===w||!s&&k.startsWith(w)&&k.charAt(w.length)==="/"),M={isActive:j,isPending:A,isTransitioning:b},_=j?e:void 0,D;typeof r=="function"?D=r(M):D=[r,j?"active":null,A?"pending":null,b?"transitioning":null].filter(Boolean).join(" ");let R=typeof o=="function"?o(M):o;return S.createElement(aj,{...c,"aria-current":_,className:D,ref:u,style:R,to:i,viewTransition:a},typeof l=="function"?l(M):l)});TG.displayName="NavLink";var cfe=S.forwardRef(({discover:t="render",fetcherKey:e,navigate:n,reloadDocument:r,replace:s,state:o,method:i=zb,action:a,onSubmit:l,relative:c,preventScrollReset:u,viewTransition:f,unstable_defaultShouldRevalidate:h,...m},y)=>{let{unstable_useTransitions:v}=S.useContext(Ei),b=hfe(),w=mfe(a,{relative:c}),C=i.toLowerCase()==="get"?"get":"post",k=typeof a=="string"&&EG.test(a),E=j=>{if(l&&l(j),j.defaultPrevented)return;j.preventDefault();let A=j.nativeEvent.submitter,M=(A==null?void 0:A.getAttribute("formmethod"))||i,_=()=>b(A||j.currentTarget,{fetcherKey:e,method:M,navigate:n,replace:s,state:o,relative:c,preventScrollReset:u,viewTransition:f,unstable_defaultShouldRevalidate:h});v&&n!==!1?S.startTransition(()=>_()):_()};return S.createElement("form",{ref:y,method:C,action:w,onSubmit:r?l:E,...m,"data-discover":!k&&t==="render"?"true":void 0})});cfe.displayName="Form";function ufe(t){return`${t} must be used within a data router.  See https://reactrouter.com/en/main/routers/picking-a-router.`}function MG(t){let e=S.useContext(Qf);return _n(e,ufe(t)),e}function dfe(t,{target:e,replace:n,state:r,preventScrollReset:s,relative:o,viewTransition:i,unstable_defaultShouldRevalidate:a,unstable_useTransitions:l}={}){let c=Er(),u=wn(),f=s2(t,{relative:o});return S.useCallback(h=>{if(Bde(h,e)){h.preventDefault();let m=n!==void 0?n:Cl(u)===Cl(f),y=()=>c(t,{replace:m,state:r,preventScrollReset:s,relative:o,viewTransition:i,unstable_defaultShouldRevalidate:a});l?S.startTransition(()=>y()):y()}},[u,c,f,n,r,e,t,s,o,i,a,l])}var ffe=0,pfe=()=>`__${String(++ffe)}__`;function hfe(){let{router:t}=MG("useSubmit"),{basename:e}=S.useContext(Ei),n=kde(),r=t.fetch,s=t.navigate;return S.useCallback(async(o,i={})=>{let{action:a,method:l,encType:c,formData:u,body:f}=Vde(o,e);if(i.navigate===!1){let h=i.fetcherKey||pfe();await r(h,n,i.action||a,{unstable_defaultShouldRevalidate:i.unstable_defaultShouldRevalidate,preventScrollReset:i.preventScrollReset,formData:u,body:f,formMethod:i.method||l,formEncType:i.encType||c,flushSync:i.flushSync})}else await s(i.action||a,{unstable_defaultShouldRevalidate:i.unstable_defaultShouldRevalidate,preventScrollReset:i.preventScrollReset,formData:u,body:f,formMethod:i.method||l,formEncType:i.encType||c,replace:i.replace,state:i.state,fromRouteId:n,flushSync:i.flushSync,viewTransition:i.viewTransition})},[r,s,e,n])}function mfe(t,{relative:e}={}){let{basename:n}=S.useContext(Ei),r=S.useContext(sa);_n(r,"useFormAction must be used inside a RouteContext");let[s]=r.matches.slice(-1),o={...s2(t||".",{relative:e})},i=wn();if(t==null){o.search=i.search;let a=new URLSearchParams(o.search),l=a.getAll("index");if(l.some(u=>u==="")){a.delete("index"),l.filter(f=>f).forEach(f=>a.append("index",f));let u=a.toString();o.search=u?`?${u}`:""}}return(!t||t===".")&&s.route.index&&(o.search=o.search?o.search.replace(/^\?/,"?index&"):"?index"),n!=="/"&&(o.pathname=o.pathname==="/"?n:ml([n,o.pathname])),Cl(o)}function gfe(t,{relative:e}={}){let n=S.useContext(ej);_n(n!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`.  Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=MG("useViewTransitionState"),s=s2(t,{relative:e});if(!n.isTransitioning)return!1;let o=ea(n.currentLocation.pathname,r)||n.currentLocation.pathname,i=ea(n.nextLocation.pathname,r)||n.nextLocation.pathname;return Hh(s.pathname,i)!=null||Hh(s.pathname,o)!=null}var Xo=GY();const Ch=ks(Xo);function yfe(t){return S.createElement(Ide,{flushSync:Xo.flushSync,...t})}var ll=function(){return ll=Object.assign||function(e){for(var n,r=1,s=arguments.length;r<s;r++){n=arguments[r];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},ll.apply(this,arguments)};function jG(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,r=Object.getOwnPropertySymbols(t);s<r.length;s++)e.indexOf(r[s])<0&&Object.prototype.propertyIsEnumerable.call(t,r[s])&&(n[r[s]]=t[r[s]]);return n}function Jf(t,e,n,r){function s(o){return o instanceof n?o:new n(function(i){i(o)})}return new(n||(n=Promise))(function(o,i){function a(u){try{c(r.next(u))}catch(f){i(f)}}function l(u){try{c(r.throw(u))}catch(f){i(f)}}function c(u){u.done?o(u.value):s(u.value).then(a,l)}c((r=r.apply(t,e||[])).next())})}function vfe(t,e,n){if(n||arguments.length===2)for(var r=0,s=e.length,o;r<s;r++)(o||!(r in e))&&(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))}var Bb="right-scroll-bar-position",Hb="width-before-scroll-bar",bfe="with-scroll-bars-hidden",xfe="--removed-body-scroll-bar-size";function A6(t,e){return typeof t=="function"?t(e):t&&(t.current=e),t}function wfe(t,e){var n=S.useState(function(){return{value:t,callback:e,facade:{get current(){return n.value},set current(r){var s=n.value;s!==r&&(n.value=r,n.callback(r,s))}}}})[0];return n.callback=e,n.facade}var Sfe=typeof window<"u"?S.useLayoutEffect:S.useEffect,A$=new WeakMap;function Cfe(t,e){var n=wfe(null,function(r){return t.forEach(function(s){return A6(s,r)})});return Sfe(function(){var r=A$.get(n);if(r){var s=new Set(r),o=new Set(t),i=n.current;s.forEach(function(a){o.has(a)||A6(a,null)}),o.forEach(function(a){s.has(a)||A6(a,i)})}A$.set(n,t)},[t]),n}function kfe(t){return t}function Efe(t,e){e===void 0&&(e=kfe);var n=[],r=!1,s={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:t},useMedium:function(o){var i=e(o,r);return n.push(i),function(){n=n.filter(function(a){return a!==i})}},assignSyncMedium:function(o){for(r=!0;n.length;){var i=n;n=[],i.forEach(o)}n={push:function(a){return o(a)},filter:function(){return n}}},assignMedium:function(o){r=!0;var i=[];if(n.length){var a=n;n=[],a.forEach(o),i=n}var l=function(){var u=i;i=[],u.forEach(o)},c=function(){return Promise.resolve().then(l)};c(),n={push:function(u){i.push(u),c()},filter:function(u){return i=i.filter(u),n}}}};return s}function Tfe(t){t===void 0&&(t={});var e=Efe(null);return e.options=ll({async:!0,ssr:!1},t),e}var AG=function(t){var e=t.sideCar,n=jG(t,["sideCar"]);if(!e)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=e.read();if(!r)throw new Error("Sidecar medium not found");return S.createElement(r,ll({},n))};AG.isSideCarExport=!0;function Mfe(t,e){return t.useMedium(e),AG}var _G=Tfe(),_6=function(){},Bw=S.forwardRef(function(t,e){var n=S.useRef(null),r=S.useState({onScrollCapture:_6,onWheelCapture:_6,onTouchMoveCapture:_6}),s=r[0],o=r[1],i=t.forwardProps,a=t.children,l=t.className,c=t.removeScrollBar,u=t.enabled,f=t.shards,h=t.sideCar,m=t.noRelative,y=t.noIsolation,v=t.inert,b=t.allowPinchZoom,w=t.as,C=w===void 0?"div":w,k=t.gapMode,E=jG(t,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),j=h,A=Cfe([n,e]),M=ll(ll({},E),s);return S.createElement(S.Fragment,null,u&&S.createElement(j,{sideCar:_G,removeScrollBar:c,shards:f,noRelative:m,noIsolation:y,inert:v,setCallbacks:o,allowPinchZoom:!!b,lockRef:n,gapMode:k}),i?S.cloneElement(S.Children.only(a),ll(ll({},M),{ref:A})):S.createElement(C,ll({},M,{className:l,ref:A}),a))});Bw.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Bw.classNames={fullWidth:Hb,zeroRight:Bb};var jfe=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function Afe(){if(!document)return null;var t=document.createElement("style");t.type="text/css";var e=jfe();return e&&t.setAttribute("nonce",e),t}function _fe(t,e){t.styleSheet?t.styleSheet.cssText=e:t.appendChild(document.createTextNode(e))}function Rfe(t){var e=document.head||document.getElementsByTagName("head")[0];e.appendChild(t)}var Dfe=function(){var t=0,e=null;return{add:function(n){t==0&&(e=Afe())&&(_fe(e,n),Rfe(e)),t++},remove:function(){t--,!t&&e&&(e.parentNode&&e.parentNode.removeChild(e),e=null)}}},Ife=function(){var t=Dfe();return function(e,n){S.useEffect(function(){return t.add(e),function(){t.remove()}},[e&&n])}},RG=function(){var t=Ife(),e=function(n){var r=n.styles,s=n.dynamic;return t(r,s),null};return e},Ofe={left:0,top:0,right:0,gap:0},R6=function(t){return parseInt(t||"",10)||0},Nfe=function(t){var e=window.getComputedStyle(document.body),n=e[t==="padding"?"paddingLeft":"marginLeft"],r=e[t==="padding"?"paddingTop":"marginTop"],s=e[t==="padding"?"paddingRight":"marginRight"];return[R6(n),R6(r),R6(s)]},Lfe=function(t){if(t===void 0&&(t="margin"),typeof window>"u")return Ofe;var e=Nfe(t),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:e[0],top:e[1],right:e[2],gap:Math.max(0,r-n+e[2]-e[0])}},$fe=RG(),_h="data-scroll-locked",Ffe=function(t,e,n,r){var s=t.left,o=t.top,i=t.right,a=t.gap;return n===void 0&&(n="margin"),`
  .`.concat(bfe,` {
   overflow: hidden `).concat(r,`;
   padding-right: `).concat(a,"px ").concat(r,`;
  }
  body[`).concat(_h,`] {
    overflow: hidden `).concat(r,`;
    overscroll-behavior: contain;
    `).concat([e&&"position: relative ".concat(r,";"),n==="margin"&&`
    padding-left: `.concat(s,`px;
    padding-top: `).concat(o,`px;
    padding-right: `).concat(i,`px;
    margin-left:0;
    margin-top:0;
    margin-right: `).concat(a,"px ").concat(r,`;
    `),n==="padding"&&"padding-right: ".concat(a,"px ").concat(r,";")].filter(Boolean).join(""),`
  }
  
  .`).concat(Bb,` {
    right: `).concat(a,"px ").concat(r,`;
  }
  
  .`).concat(Hb,` {
    margin-right: `).concat(a,"px ").concat(r,`;
  }
  
  .`).concat(Bb," .").concat(Bb,` {
    right: 0 `).concat(r,`;
  }
  
  .`).concat(Hb," .").concat(Hb,` {
    margin-right: 0 `).concat(r,`;
  }
  
  body[`).concat(_h,`] {
    `).concat(xfe,": ").concat(a,`px;
  }
`)},_$=function(){var t=parseInt(document.body.getAttribute(_h)||"0",10);return isFinite(t)?t:0},zfe=function(){S.useEffect(function(){return document.body.setAttribute(_h,(_$()+1).toString()),function(){var t=_$()-1;t<=0?document.body.removeAttribute(_h):document.body.setAttribute(_h,t.toString())}},[])},Pfe=function(t){var e=t.noRelative,n=t.noImportant,r=t.gapMode,s=r===void 0?"margin":r;zfe();var o=S.useMemo(function(){return Lfe(s)},[s]);return S.createElement($fe,{styles:Ffe(o,!e,s,n?"":"!important")})},EE=!1;if(typeof window<"u")try{var Av=Object.defineProperty({},"passive",{get:function(){return EE=!0,!0}});window.addEventListener("test",Av,Av),window.removeEventListener("test",Av,Av)}catch{EE=!1}var Xp=EE?{passive:!1}:!1,Bfe=function(t){return t.tagName==="TEXTAREA"},DG=function(t,e){if(!(t instanceof Element))return!1;var n=window.getComputedStyle(t);return n[e]!=="hidden"&&!(n.overflowY===n.overflowX&&!Bfe(t)&&n[e]==="visible")},Hfe=function(t){return DG(t,"overflowY")},Ufe=function(t){return DG(t,"overflowX")},R$=function(t,e){var n=e.ownerDocument,r=e;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var s=IG(t,r);if(s){var o=OG(t,r),i=o[1],a=o[2];if(i>a)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},Vfe=function(t){var e=t.scrollTop,n=t.scrollHeight,r=t.clientHeight;return[e,n,r]},qfe=function(t){var e=t.scrollLeft,n=t.scrollWidth,r=t.clientWidth;return[e,n,r]},IG=function(t,e){return t==="v"?Hfe(e):Ufe(e)},OG=function(t,e){return t==="v"?Vfe(e):qfe(e)},Wfe=function(t,e){return t==="h"&&e==="rtl"?-1:1},Yfe=function(t,e,n,r,s){var o=Wfe(t,window.getComputedStyle(e).direction),i=o*r,a=n.target,l=e.contains(a),c=!1,u=i>0,f=0,h=0;do{if(!a)break;var m=OG(t,a),y=m[0],v=m[1],b=m[2],w=v-b-o*y;(y||w)&&IG(t,a)&&(f+=w,h+=y);var C=a.parentNode;a=C&&C.nodeType===Node.DOCUMENT_FRAGMENT_NODE?C.host:C}while(!l&&a!==document.body||l&&(e.contains(a)||e===a));return(u&&Math.abs(f)<1||!u&&Math.abs(h)<1)&&(c=!0),c},_v=function(t){return"changedTouches"in t?[t.changedTouches[0].clientX,t.changedTouches[0].clientY]:[0,0]},D$=function(t){return[t.deltaX,t.deltaY]},I$=function(t){return t&&"current"in t?t.current:t},Gfe=function(t,e){return t[0]===e[0]&&t[1]===e[1]},Kfe=function(t){return`
  .block-interactivity-`.concat(t,` {pointer-events: none;}
  .allow-interactivity-`).concat(t,` {pointer-events: all;}
`)},Xfe=0,Zp=[];function Zfe(t){var e=S.useRef([]),n=S.useRef([0,0]),r=S.useRef(),s=S.useState(Xfe++)[0],o=S.useState(RG)[0],i=S.useRef(t);S.useEffect(function(){i.current=t},[t]),S.useEffect(function(){if(t.inert){document.body.classList.add("block-interactivity-".concat(s));var v=vfe([t.lockRef.current],(t.shards||[]).map(I$),!0).filter(Boolean);return v.forEach(function(b){return b.classList.add("allow-interactivity-".concat(s))}),function(){document.body.classList.remove("block-interactivity-".concat(s)),v.forEach(function(b){return b.classList.remove("allow-interactivity-".concat(s))})}}},[t.inert,t.lockRef.current,t.shards]);var a=S.useCallback(function(v,b){if("touches"in v&&v.touches.length===2||v.type==="wheel"&&v.ctrlKey)return!i.current.allowPinchZoom;var w=_v(v),C=n.current,k="deltaX"in v?v.deltaX:C[0]-w[0],E="deltaY"in v?v.deltaY:C[1]-w[1],j,A=v.target,M=Math.abs(k)>Math.abs(E)?"h":"v";if("touches"in v&&M==="h"&&A.type==="range")return!1;var _=window.getSelection(),D=_&&_.anchorNode,R=D?D===A||D.contains(A):!1;if(R)return!1;var N=R$(M,A);if(!N)return!0;if(N?j=M:(j=M==="v"?"h":"v",N=R$(M,A)),!N)return!1;if(!r.current&&"changedTouches"in v&&(k||E)&&(r.current=j),!j)return!0;var z=r.current||j;return Yfe(z,b,v,z==="h"?k:E)},[]),l=S.useCallback(function(v){var b=v;if(!(!Zp.length||Zp[Zp.length-1]!==o)){var w="deltaY"in b?D$(b):_v(b),C=e.current.filter(function(j){return j.name===b.type&&(j.target===b.target||b.target===j.shadowParent)&&Gfe(j.delta,w)})[0];if(C&&C.should){b.cancelable&&b.preventDefault();return}if(!C){var k=(i.current.shards||[]).map(I$).filter(Boolean).filter(function(j){return j.contains(b.target)}),E=k.length>0?a(b,k[0]):!i.current.noIsolation;E&&b.cancelable&&b.preventDefault()}}},[]),c=S.useCallback(function(v,b,w,C){var k={name:v,delta:b,target:w,should:C,shadowParent:Qfe(w)};e.current.push(k),setTimeout(function(){e.current=e.current.filter(function(E){return E!==k})},1)},[]),u=S.useCallback(function(v){n.current=_v(v),r.current=void 0},[]),f=S.useCallback(function(v){c(v.type,D$(v),v.target,a(v,t.lockRef.current))},[]),h=S.useCallback(function(v){c(v.type,_v(v),v.target,a(v,t.lockRef.current))},[]);S.useEffect(function(){return Zp.push(o),t.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:h}),document.addEventListener("wheel",l,Xp),document.addEventListener("touchmove",l,Xp),document.addEventListener("touchstart",u,Xp),function(){Zp=Zp.filter(function(v){return v!==o}),document.removeEventListener("wheel",l,Xp),document.removeEventListener("touchmove",l,Xp),document.removeEventListener("touchstart",u,Xp)}},[]);var m=t.removeScrollBar,y=t.inert;return S.createElement(S.Fragment,null,y?S.createElement(o,{styles:Kfe(s)}):null,m?S.createElement(Pfe,{noRelative:t.noRelative,gapMode:t.gapMode}):null)}function Qfe(t){for(var e=null;t!==null;)t instanceof ShadowRoot&&(e=t.host,t=t.host),t=t.parentNode;return e}const Jfe=Mfe(_G,Zfe);var Df=S.forwardRef(function(t,e){return S.createElement(Bw,ll({},t,{ref:e,sideCar:Jfe}))});Df.classNames=Bw.classNames;function as(t){return Object.keys(t)}function D6(t){return t&&typeof t=="object"&&!Array.isArray(t)}function lj(t,e){const n={...t},r=e;return D6(t)&&D6(e)&&Object.keys(e).forEach(s=>{D6(r[s])&&s in t?n[s]=lj(n[s],r[s]):n[s]=r[s]}),n}function epe(t){return t.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`)}function tpe(t){var e;return typeof t!="string"||!t.includes("var(--mantine-scale)")?t:(e=t.match(/^calc\((.*?)\)$/))==null?void 0:e[1].split("*")[0].trim()}function If(t){const e=tpe(t);return typeof e=="number"?e:typeof e=="string"?e.includes("calc")||e.includes("var")?e:e.includes("px")?Number(e.replace("px","")):e.includes("rem")?Number(e.replace("rem",""))*16:e.includes("em")?Number(e.replace("em",""))*16:Number(e):NaN}function O$(t){return t==="0rem"?"0rem":`calc(${t} * var(--mantine-scale))`}function NG(t,{shouldScale:e=!1}={}){function n(r){if(r===0||r==="0")return`0${t}`;if(typeof r=="number"){const s=`${r/16}${t}`;return e?O$(s):s}if(typeof r=="string"){if(r===""||r.startsWith("calc(")||r.startsWith("clamp(")||r.includes("rgba("))return r;if(r.includes(","))return r.split(",").map(o=>n(o)).join(",");if(r.includes(" "))return r.split(" ").map(o=>n(o)).join(" ");const s=r.replace("px","");if(!Number.isNaN(Number(s))){const o=`${Number(s)/16}${t}`;return e?O$(o):o}}return r}return n}const Me=NG("rem",{shouldScale:!0}),Uh=NG("em");function km(t){return Object.keys(t).reduce((e,n)=>(t[n]!==void 0&&(e[n]=t[n]),e),{})}function LG(t){if(typeof t=="number")return!0;if(typeof t=="string"){if(t.startsWith("calc(")||t.startsWith("var(")||t.includes(" ")&&t.trim()!=="")return!0;const e=/^[+-]?[0-9]+(\.[0-9]+)?(px|em|rem|ex|ch|lh|rlh|vw|vh|vmin|vmax|vb|vi|svw|svh|lvw|lvh|dvw|dvh|cm|mm|in|pt|pc|q|cqw|cqh|cqi|cqb|cqmin|cqmax|%)?$/;return t.trim().split(/\s+/).every(r=>e.test(r))}return!1}function i2(t){return Array.isArray(t)||t===null?!1:typeof t=="object"?t.type!==S.Fragment:!1}function zs(t){const e=S.createContext(null);return[({children:s,value:o})=>d.jsx(e.Provider,{value:o,children:s}),()=>{const s=S.useContext(e);if(s===null)throw new Error(t);return s}]}function za(t=null){const e=S.createContext(t);return[({children:s,value:o})=>d.jsx(e.Provider,{value:o,children:s}),()=>S.useContext(e)]}function Fx(t,e){return n=>{if(typeof n!="string"||n.trim().length===0)throw new Error(e);return`${t}-${n}`}}function zx(t,e){let n=t;for(;(n=n.parentElement)&&!n.matches(e););return n}function npe(t,e,n){for(let r=t-1;r>=0;r-=1)if(!e[r].disabled)return r;if(n){for(let r=e.length-1;r>-1;r-=1)if(!e[r].disabled)return r}return t}function rpe(t,e,n){for(let r=t+1;r<e.length;r+=1)if(!e[r].disabled)return r;if(n){for(let r=0;r<e.length;r+=1)if(!e[r].disabled)return r}return t}function spe(t,e,n){return zx(t,n)===zx(e,n)}function Hw({parentSelector:t,siblingSelector:e,onKeyDown:n,loop:r=!0,activateOnFocus:s=!1,dir:o="rtl",orientation:i}){return a=>{var y;n==null||n(a);const l=Array.from(((y=zx(a.currentTarget,t))==null?void 0:y.querySelectorAll(e))||[]).filter(v=>spe(a.currentTarget,v,t)),c=l.findIndex(v=>a.currentTarget===v),u=rpe(c,l,r),f=npe(c,l,r),h=o==="rtl"?f:u,m=o==="rtl"?u:f;switch(a.key){case"ArrowRight":{i==="horizontal"&&(a.stopPropagation(),a.preventDefault(),l[h].focus(),s&&l[h].click());break}case"ArrowLeft":{i==="horizontal"&&(a.stopPropagation(),a.preventDefault(),l[m].focus(),s&&l[m].click());break}case"ArrowUp":{i==="vertical"&&(a.stopPropagation(),a.preventDefault(),l[f].focus(),s&&l[f].click());break}case"ArrowDown":{i==="vertical"&&(a.stopPropagation(),a.preventDefault(),l[u].focus(),s&&l[u].click());break}case"Home":{a.stopPropagation(),a.preventDefault(),!l[0].disabled&&l[0].focus();break}case"End":{a.stopPropagation(),a.preventDefault();const v=l.length-1;!l[v].disabled&&l[v].focus();break}}}}const ope={app:100,modal:200,popover:300,overlay:400,max:9999};function Ps(t){return ope[t]}const $G=()=>{};function ipe(t,e={active:!0}){return typeof t!="function"||!e.active?e.onKeyDown||$G:n=>{var r;n.key==="Escape"&&(t(n),(r=e.onTrigger)==null||r.call(e))}}function an(t,e="size",n=!0){if(t!==void 0)return LG(t)?n?Me(t):t:`var(--${e}-${t})`}function ss(t){return an(t,"mantine-spacing")}function Wn(t){return t===void 0?"var(--mantine-radius-default)":an(t,"mantine-radius")}function Ur(t){return an(t,"mantine-font-size")}function FG(t){return an(t,"mantine-line-height",!1)}function cj(t){if(t)return an(t,"mantine-shadow",!1)}function bs(t,e){return n=>{t==null||t(n),e==null||e(n)}}function uj(t,e){return t in e?If(e[t]):If(t)}function TE(t,e){const n=t.map(r=>({value:r,px:uj(r,e)}));return n.sort((r,s)=>r.px-s.px),n}function Rh(t){return typeof t=="object"&&t!==null?"base"in t?t.base:void 0:t}function ape(t,e,n){var r;return n?Array.from(((r=zx(n,e))==null?void 0:r.querySelectorAll(t))||[]).findIndex(s=>s===n):null}function fg(t,e,n){return e===void 0&&n===void 0?t:e!==void 0&&n===void 0?Math.max(t,e):Math.min(e===void 0&&n!==void 0?t:Math.max(t,e),n)}function gl(t="mantine-"){return`${t}${Math.random().toString(36).slice(2,11)}`}function lpe(t,e){if(t===e||Number.isNaN(t)&&Number.isNaN(e))return!0;if(!(t instanceof Object)||!(e instanceof Object))return!1;const n=Object.keys(t),{length:r}=n;if(r!==Object.keys(e).length)return!1;for(let s=0;s<r;s+=1){const o=n[s];if(!(o in e)||t[o]!==e[o]&&!(Number.isNaN(t[o])&&Number.isNaN(e[o])))return!1}return!0}function N$(t){return typeof t!="string"?"":t.charAt(0).toUpperCase()+t.slice(1)}function uf(t){const e=S.useRef(t);return S.useEffect(()=>{e.current=t}),S.useMemo(()=>((...n)=>{var r;return(r=e.current)==null?void 0:r.call(e,...n)}),[])}function Uw(t,e){const{delay:n,flushOnUnmount:r,leading:s}=typeof e=="number"?{delay:e,flushOnUnmount:!1,leading:!1}:e,o=uf(t),i=S.useRef(0),a=S.useMemo(()=>{const l=Object.assign((...c)=>{window.clearTimeout(i.current);const u=l._isFirstCall;l._isFirstCall=!1;function f(){window.clearTimeout(i.current),i.current=0,l._isFirstCall=!0}if(s&&u){o(...c);const y=()=>{f()},v=()=>{i.current!==0&&(f(),o(...c))},b=()=>{f()};l.flush=v,l.cancel=b,i.current=window.setTimeout(y,n);return}if(s&&!u){const y=()=>{i.current!==0&&(f(),o(...c))},v=()=>{f()};l.flush=y,l.cancel=v;const b=()=>{f()};i.current=window.setTimeout(b,n);return}const h=()=>{i.current!==0&&(f(),o(...c))},m=()=>{f()};l.flush=h,l.cancel=m,i.current=window.setTimeout(h,n)},{flush:()=>{},cancel:()=>{},_isFirstCall:!0});return l},[o,n,s]);return S.useEffect(()=>()=>{r?a.flush():a.cancel()},[a,r]),a}const cpe=["mousedown","touchstart"];function Em(t,e,n){const r=S.useRef(null),s=e||cpe;return S.useEffect(()=>{const o=i=>{const{target:a}=i??{};if(Array.isArray(n)){const l=!document.body.contains(a)&&(a==null?void 0:a.tagName)!=="HTML";n.every(u=>!!u&&!i.composedPath().includes(u))&&!l&&t(i)}else r.current&&!r.current.contains(a)&&t(i)};return s.forEach(i=>document.addEventListener(i,o)),()=>{s.forEach(i=>document.removeEventListener(i,o))}},[r,t,n]),r}function upe(t,e){try{return t.addEventListener("change",e),()=>t.removeEventListener("change",e)}catch{return t.addListener(e),()=>t.removeListener(e)}}function dpe(t,e){return typeof window<"u"&&"matchMedia"in window?window.matchMedia(t).matches:!1}function Vh(t,e,{getInitialValueInEffect:n}={getInitialValueInEffect:!0}){const[r,s]=S.useState(n?e:dpe(t));return S.useEffect(()=>{try{const o=window.matchMedia(t);return s(o.matches),upe(o,i=>s(i.matches))}catch{return}},[t]),r||!1}function fpe(t,e){return Vh("(prefers-color-scheme: dark)",t==="dark",e)?"dark":"light"}function ppe(t,e,n={leading:!1}){const[r,s]=S.useState(t),o=S.useRef(null),i=S.useRef(!0),a=()=>window.clearTimeout(o.current);S.useEffect(()=>a,[]);const l=S.useCallback(c=>{a(),i.current&&n.leading?s(c):o.current=window.setTimeout(()=>{i.current=!0,s(c)},e),i.current=!1},[n.leading]);return[r,l]}const yd=typeof document<"u"?S.useLayoutEffect:S.useEffect;function kl(t,e){const n=S.useRef(!1);S.useEffect(()=>()=>{n.current=!1},[]),S.useEffect(()=>{if(n.current)return t();n.current=!0},e)}function zG({opened:t,shouldReturnFocus:e=!0}){const n=S.useRef(null),r=()=>{var s;n.current&&"focus"in n.current&&typeof n.current.focus=="function"&&((s=n.current)==null||s.focus({preventScroll:!0}))};return kl(()=>{let s=-1;const o=i=>{i.key==="Tab"&&window.clearTimeout(s)};return document.addEventListener("keydown",o),t?n.current=document.activeElement:e&&(s=window.setTimeout(r,10)),()=>{window.clearTimeout(s),document.removeEventListener("keydown",o)}},[t,e]),r}const hpe=/input|select|textarea|button|object/,PG="a, input, select, textarea, button, object, [tabindex]";function mpe(t){return t.style.display==="none"}function gpe(t){if(t.getAttribute("aria-hidden")||t.getAttribute("hidden")||t.getAttribute("type")==="hidden")return!1;let n=t;for(;n&&!(n===document.body||n.nodeType===11);){if(mpe(n))return!1;n=n.parentNode}return!0}function BG(t){let e=t.getAttribute("tabindex");return e===null&&(e=void 0),parseInt(e,10)}function ME(t){const e=t.nodeName.toLowerCase(),n=!Number.isNaN(BG(t));return(hpe.test(e)&&!t.disabled||t instanceof HTMLAnchorElement&&t.href||n)&&gpe(t)}function HG(t){const e=BG(t);return(Number.isNaN(e)||e>=0)&&ME(t)}function ype(t){return Array.from(t.querySelectorAll(PG)).filter(HG)}function vpe(t,e){const n=ype(t);if(!n.length){e.preventDefault();return}const r=n[e.shiftKey?0:n.length-1],s=t.getRootNode();let o=r===s.activeElement||t===s.activeElement;const i=s.activeElement;if(i.tagName==="INPUT"&&i.getAttribute("type")==="radio"&&(o=n.filter(u=>u.getAttribute("type")==="radio"&&u.getAttribute("name")===i.getAttribute("name")).includes(r)),!o)return;e.preventDefault();const l=n[e.shiftKey?n.length-1:0];l&&l.focus()}function bpe(t=!0){const e=S.useRef(null),n=s=>{let o=s.querySelector("[data-autofocus]");if(!o){const i=Array.from(s.querySelectorAll(PG));o=i.find(HG)||i.find(ME)||null,!o&&ME(s)&&(o=s)}o&&o.focus({preventScroll:!0})},r=S.useCallback(s=>{t&&s!==null&&e.current!==s&&(s?(setTimeout(()=>{s.getRootNode()&&n(s)}),e.current=s):e.current=null)},[t]);return S.useEffect(()=>{if(!t)return;e.current&&setTimeout(()=>n(e.current));const s=o=>{o.key==="Tab"&&e.current&&vpe(e.current,o)};return document.addEventListener("keydown",s),()=>document.removeEventListener("keydown",s)},[t]),r}const xpe=t=>(t+1)%1e6;function wpe(){const[,t]=S.useReducer(xpe,0);return t}const Spe=It.useId||(()=>{});function Cpe(){const t=Spe();return t?`mantine-${t.replace(/:/g,"")}`:""}function _s(t){const e=Cpe(),[n,r]=S.useState(e);return yd(()=>{r(gl())},[]),typeof t=="string"?t:typeof window>"u"?e:n}function UG(t,e,{autoInvoke:n=!1}={}){const[r,s]=S.useState(!1),o=S.useRef(null),i=S.useRef(null),a=S.useCallback(()=>{s(u=>(!u&&(!o.current||o.current===-1)&&(o.current=window.setInterval(i.current,e)),!0))},[]),l=S.useCallback(()=>{s(!1),window.clearInterval(o.current||-1),o.current=-1},[]),c=S.useCallback(()=>{r?l():a()},[r]);return S.useEffect(()=>(i.current=t,r&&a(),l),[t,r,e]),S.useEffect(()=>{n&&a()},[]),{start:a,stop:l,toggle:c,active:r}}function Tc(t,e,n){S.useEffect(()=>(window.addEventListener(t,e,n),()=>window.removeEventListener(t,e,n)),[t,e])}function kpe(t,e="use-local-storage"){try{return JSON.stringify(t)}catch{throw new Error(`@mantine/hooks ${e}: Failed to serialize the value`)}}function Epe(t){try{return t&&JSON.parse(t)}catch{return t}}function Tpe(t){return{getItem:s=>{try{return window[t].getItem(s)}catch{return console.warn("use-local-storage: Failed to get value from storage, localStorage is blocked"),null}},setItem:(s,o)=>{try{window[t].setItem(s,o)}catch{console.warn("use-local-storage: Failed to set value to storage, localStorage is blocked")}},removeItem:s=>{try{window[t].removeItem(s)}catch{console.warn("use-local-storage: Failed to remove value from storage, localStorage is blocked")}}}}function Mpe(t,e){const n="mantine-local-storage",{getItem:r,setItem:s,removeItem:o}=Tpe(t);return function({key:a,defaultValue:l,getInitialValueInEffect:c=!0,sync:u=!0,deserialize:f=Epe,serialize:h=m=>kpe(m,e)}){const m=S.useCallback(C=>{let k;try{k=typeof window>"u"||!(t in window)||window[t]===null||!!C}catch{k=!0}if(k)return l;const E=r(a);return E!==null?f(E):l},[a,l]),[y,v]=S.useState(m(c)),b=S.useCallback(C=>{C instanceof Function?v(k=>{const E=C(k);return s(a,h(E)),queueMicrotask(()=>{window.dispatchEvent(new CustomEvent(n,{detail:{key:a,value:C(k)}}))}),E}):(s(a,h(C)),window.dispatchEvent(new CustomEvent(n,{detail:{key:a,value:C}})),v(C))},[a]),w=S.useCallback(()=>{o(a),v(l),window.dispatchEvent(new CustomEvent(n,{detail:{key:a,value:l}}))},[a,l]);return Tc("storage",C=>{u&&C.storageArea===window[t]&&C.key===a&&v(f(C.newValue??void 0))}),Tc(n,C=>{u&&C.detail.key===a&&v(C.detail.value)}),S.useEffect(()=>{l!==void 0&&y===void 0&&b(l)},[l,y,b]),S.useEffect(()=>{const C=m();C!==void 0&&b(C)},[a]),[y===void 0?l:y,b,w]}}function jpe(t){return Mpe("localStorage","use-local-storage")(t)}function pg(t,e){if(typeof t=="function")return t(e);typeof t=="object"&&t!==null&&"current"in t&&(t.current=e)}function VG(...t){const e=new Map;return n=>{if(t.forEach(r=>{const s=pg(r,n);s&&e.set(r,s)}),e.size>0)return()=>{t.forEach(r=>{const s=e.get(r);s&&typeof s=="function"?s():pg(r,null)}),e.clear()}}}function Vr(...t){return S.useCallback(VG(...t),t)}function qG(t){return{x:fg(t.x,0,1),y:fg(t.y,0,1)}}function WG(t,e,n="ltr"){const r=S.useRef(!1),s=S.useRef(!1),o=S.useRef(0),[i,a]=S.useState(!1),l=S.useRef(null);return S.useEffect(()=>{r.current=!0},[]),{ref:S.useCallback(u=>{if(l.current&&(l.current(),l.current=null),!u)return;const f=({x:E,y:j})=>{cancelAnimationFrame(o.current),o.current=requestAnimationFrame(()=>{if(r.current&&u){u.style.userSelect="none";const A=u.getBoundingClientRect();if(A.width&&A.height){const M=fg((E-A.left)/A.width,0,1);t({x:n==="ltr"?M:1-M,y:fg((j-A.top)/A.height,0,1)})}}})},h=()=>{document.addEventListener("mousemove",w),document.addEventListener("mouseup",v),document.addEventListener("touchmove",k,{passive:!1}),document.addEventListener("touchend",v)},m=()=>{document.removeEventListener("mousemove",w),document.removeEventListener("mouseup",v),document.removeEventListener("touchmove",k),document.removeEventListener("touchend",v)},y=()=>{!s.current&&r.current&&(s.current=!0,typeof(e==null?void 0:e.onScrubStart)=="function"&&e.onScrubStart(),a(!0),h())},v=()=>{s.current&&r.current&&(s.current=!1,a(!1),m(),setTimeout(()=>{typeof(e==null?void 0:e.onScrubEnd)=="function"&&e.onScrubEnd()},0))},b=E=>{y(),E.preventDefault(),w(E)},w=E=>f({x:E.clientX,y:E.clientY}),C=E=>{E.cancelable&&E.preventDefault(),y(),k(E)},k=E=>{E.cancelable&&E.preventDefault(),f({x:E.changedTouches[0].clientX,y:E.changedTouches[0].clientY})};u.addEventListener("mousedown",b),u.addEventListener("touchstart",C,{passive:!1}),l.current=()=>{u.removeEventListener("mousedown",b),u.removeEventListener("touchstart",C)}},[n,t]),active:i}}function ls({value:t,defaultValue:e,finalValue:n,onChange:r=()=>{}}){const[s,o]=S.useState(e!==void 0?e:n),i=(a,...l)=>{o(a),r==null||r(a,...l)};return t!==void 0?[t,r,!0]:[s,i,!1]}function xu(t,e){const n=e-t+1;return Array.from({length:n},(r,s)=>s+t)}const Rv="dots";function YG({total:t,siblings:e=1,boundaries:n=1,page:r,initialPage:s=1,onChange:o}){const i=Math.max(Math.trunc(t),0),[a,l]=ls({value:r,onChange:o,defaultValue:s,finalValue:s}),c=v=>{v<=0?l(1):v>i?l(i):l(v)},u=()=>c(a+1),f=()=>c(a-1),h=()=>c(1),m=()=>c(i);return{range:S.useMemo(()=>{if(e*2+3+n*2>=i)return xu(1,i);const b=Math.max(a-e,n),w=Math.min(a+e,i-n),C=b>n+2,k=w<i-(n+1);if(!C&&k){const E=e*2+n+2;return[...xu(1,E),Rv,...xu(i-(n-1),i)]}if(C&&!k){const E=n+1+2*e;return[...xu(1,n),Rv,...xu(i-E,i)]}return[...xu(1,n),Rv,...xu(b,w),Rv,...xu(i-n+1,i)]},[i,e,a]),active:a,setPage:c,next:u,previous:f,first:h,last:m}}function Vw(t,e){return Vh("(prefers-reduced-motion: reduce)",t,e)}function Ape(t,e){if(!t||!e)return!1;if(t===e)return!0;if(t.length!==e.length)return!1;for(let n=0;n<t.length;n+=1)if(!lpe(t[n],e[n]))return!1;return!0}function _pe(t){const e=S.useRef([]),n=S.useRef(0);return Ape(e.current,t)||(e.current=t,n.current+=1),[n.current]}function Rpe(t,e){S.useEffect(t,_pe(e))}const L$={passive:!0};function Dpe(){const[t,e]=S.useState({width:0,height:0}),n=S.useCallback(()=>{e({width:window.innerWidth||0,height:window.innerHeight||0})},[]);return Tc("resize",n,L$),Tc("orientationchange",n,L$),S.useEffect(n,[]),t}function I6(){return typeof window<"u"?{x:window.scrollX,y:window.scrollY}:{x:0,y:0}}function Ipe({x:t,y:e}){if(typeof window<"u"){const n={behavior:"smooth"};typeof t=="number"&&(n.left=t),typeof e=="number"&&(n.top=e),window.scrollTo(n)}}function Ope(){const[t,e]=S.useState({x:0,y:0});return Tc("scroll",()=>e(I6())),Tc("resize",()=>e(I6())),S.useEffect(()=>{e(I6())},[]),[t,Ipe]}function Npe(){const[t,e]=S.useState(!1),n=S.useRef(null),r=S.useCallback(()=>{e(!0)},[]),s=S.useCallback(()=>{e(!1)},[]);return{ref:S.useCallback(i=>{n.current&&(n.current.removeEventListener("mouseenter",r),n.current.removeEventListener("mouseleave",s)),i&&(i.addEventListener("mouseenter",r),i.addEventListener("mouseleave",s)),n.current=i},[r,s]),hovered:t}}function Lpe(t){return e=>{if(!e)t(e);else if(typeof e=="function")t(e);else if(typeof e=="object"&&"nativeEvent"in e){const{currentTarget:n}=e;n.type==="checkbox"?t(n.checked):t(n.value)}else t(e)}}function $pe(t){const[e,n]=S.useState(t);return[e,Lpe(n)]}function Rs(t=!1,e={}){const[n,r]=S.useState(t),s=S.useCallback(()=>{r(a=>{var l;return a||((l=e.onOpen)==null||l.call(e),!0)})},[e.onOpen]),o=S.useCallback(()=>{r(a=>{var l;return a&&((l=e.onClose)==null||l.call(e),!1)})},[e.onClose]),i=S.useCallback(()=>{n?o():s()},[o,s,n]);return[n,{open:s,close:o,toggle:i}]}function Fpe(t,e,n={autoInvoke:!1}){const r=S.useRef(null),s=S.useCallback((...i)=>{r.current||(r.current=window.setTimeout(()=>{t(i),r.current=null},e))},[e]),o=S.useCallback(()=>{r.current&&(window.clearTimeout(r.current),r.current=null)},[]);return S.useEffect(()=>(n.autoInvoke&&s(),o),[o,s]),{start:s,clear:o}}function zpe(t){const e=S.useRef(void 0);return S.useEffect(()=>{e.current=t},[t]),e.current}function Ppe(t,e,n){const r=S.useRef(null),s=S.useRef(null);return S.useEffect(()=>{const o=typeof n=="function"?n():n;return(o||s.current)&&(r.current=new MutationObserver(t),r.current.observe(o||s.current,e)),()=>{var i;(i=r.current)==null||i.disconnect()}},[t,e]),s}function Bpe(){const[t,e]=S.useState(!1);return S.useEffect(()=>e(!0),[]),t}function Hpe(t,e){window.dispatchEvent(new CustomEvent(t,{detail:e}))}function Upe(t){function e(r){const s=Object.keys(r).reduce((o,i)=>(o[`${t}:${i}`]=a=>r[i](a.detail),o),{});yd(()=>(Object.keys(s).forEach(o=>{window.removeEventListener(o,s[o]),window.addEventListener(o,s[o])}),()=>Object.keys(s).forEach(o=>{window.removeEventListener(o,s[o])})),[s])}function n(r){return(...s)=>Hpe(`${t}:${String(r)}`,s[0])}return[e,n]}var Vpe={};function qpe(){return typeof process<"u"&&Vpe?"production":"development"}function qw(t){var n;const e=It.version;return typeof It.version!="string"||e.startsWith("18.")?t==null?void 0:t.ref:(n=t==null?void 0:t.props)==null?void 0:n.ref}function Ub(t,e=document){const n=e.querySelector(t);if(n)return n;const r=e.querySelectorAll("*");for(let s=0;s<r.length;s+=1){const o=r[s];if(o.shadowRoot){const i=Ub(t,o.shadowRoot);if(i)return i}}return null}function Tu(t,e=document){const n=[],r=e.querySelectorAll(t);n.push(...Array.from(r));const s=e.querySelectorAll("*");for(let o=0;o<s.length;o+=1){const i=s[o];if(i.shadowRoot){const a=Tu(t,i.shadowRoot);n.push(...a)}}return n}function wu(t){if(!t)return document;const e=t.getRootNode();return e instanceof ShadowRoot||e instanceof Document?e:document}function vd(t){const e=S.Children.toArray(t);return e.length!==1||!i2(e[0])?null:e[0]}function GG(t){var e,n,r="";if(typeof t=="string"||typeof t=="number")r+=t;else if(typeof t=="object")if(Array.isArray(t)){var s=t.length;for(e=0;e<s;e++)t[e]&&(n=GG(t[e]))&&(r&&(r+=" "),r+=n)}else for(n in t)t[n]&&(r&&(r+=" "),r+=n);return r}function Fr(){for(var t,e,n=0,r="",s=arguments.length;n<s;n++)(t=arguments[n])&&(e=GG(t))&&(r&&(r+=" "),r+=e);return r}const Wpe={};function Ype(t){const e={};return t.forEach(n=>{Object.entries(n).forEach(([r,s])=>{e[r]?e[r]=Fr(e[r],s):e[r]=s})}),e}function Ww({theme:t,classNames:e,props:n,stylesCtx:r}){const o=(Array.isArray(e)?e:[e]).map(i=>typeof i=="function"?i(t,n,r):i||Wpe);return Ype(o)}function Px({theme:t,styles:e,props:n,stylesCtx:r}){return(Array.isArray(e)?e:[e]).reduce((o,i)=>typeof i=="function"?{...o,...i(t,n,r)}:{...o,...i},{})}const dj=S.createContext(null);function Nc(){const t=S.useContext(dj);if(!t)throw new Error("[@mantine/core] MantineProvider was not found in tree");return t}function Gpe(){return Nc().cssVariablesResolver}function Kpe(){return Nc().classNamesPrefix}function Yw(){return Nc().getStyleNonce}function Xpe(){return Nc().withStaticClasses}function Zpe(){return Nc().headless}function Qpe(){var t;return(t=Nc().stylesTransform)==null?void 0:t.sx}function Jpe(){var t;return(t=Nc().stylesTransform)==null?void 0:t.styles}function Gw(){return Nc().env||"default"}function ehe(t){return/^#?([0-9A-F]{3}){1,2}([0-9A-F]{2})?$/i.test(t)}function the(t){let e=t.replace("#","");if(e.length===3){const i=e.split("");e=[i[0],i[0],i[1],i[1],i[2],i[2]].join("")}if(e.length===8){const i=parseInt(e.slice(6,8),16)/255;return{r:parseInt(e.slice(0,2),16),g:parseInt(e.slice(2,4),16),b:parseInt(e.slice(4,6),16),a:i}}const n=parseInt(e,16),r=n>>16&255,s=n>>8&255,o=n&255;return{r,g:s,b:o,a:1}}function nhe(t){const[e,n,r,s]=t.replace(/[^0-9,./]/g,"").split(/[/,]/).map(Number);return{r:e,g:n,b:r,a:s===void 0?1:s}}function rhe(t){const e=/^hsla?\(\s*(\d+)\s*,\s*(\d+%)\s*,\s*(\d+%)\s*(,\s*(0?\.\d+|\d+(\.\d+)?))?\s*\)$/i,n=t.match(e);if(!n)return{r:0,g:0,b:0,a:1};const r=parseInt(n[1],10),s=parseInt(n[2],10)/100,o=parseInt(n[3],10)/100,i=n[5]?parseFloat(n[5]):void 0,a=(1-Math.abs(2*o-1))*s,l=r/60,c=a*(1-Math.abs(l%2-1)),u=o-a/2;let f,h,m;return l>=0&&l<1?(f=a,h=c,m=0):l>=1&&l<2?(f=c,h=a,m=0):l>=2&&l<3?(f=0,h=a,m=c):l>=3&&l<4?(f=0,h=c,m=a):l>=4&&l<5?(f=c,h=0,m=a):(f=a,h=0,m=c),{r:Math.round((f+u)*255),g:Math.round((h+u)*255),b:Math.round((m+u)*255),a:i||1}}function Kw(t){return ehe(t)?the(t):t.startsWith("rgb")?nhe(t):t.startsWith("hsl")?rhe(t):{r:0,g:0,b:0,a:1}}function T0(t,e){if(t.startsWith("var("))return`color-mix(in srgb, ${t}, black ${e*100}%)`;const{r:n,g:r,b:s,a:o}=Kw(t),i=1-e,a=l=>Math.round(l*i);return`rgba(${a(n)}, ${a(r)}, ${a(s)}, ${o})`}function hg(t,e){return typeof t.primaryShade=="number"?t.primaryShade:e==="dark"?t.primaryShade.dark:t.primaryShade.light}function O6(t){return t<=.03928?t/12.92:((t+.055)/1.055)**2.4}function she(t){const e=t.match(/oklch\((.*?)%\s/);return e?parseFloat(e[1]):null}function KG(t){if(t.startsWith("oklch("))return(she(t)||0)/100;const{r:e,g:n,b:r}=Kw(t),s=e/255,o=n/255,i=r/255,a=O6(s),l=O6(o),c=O6(i);return .2126*a+.7152*l+.0722*c}function ma(t,e=.179){return t.startsWith("var(")?!1:KG(t)>e}function oa({color:t,theme:e,colorScheme:n}){if(typeof t!="string")throw new Error(`[@mantine/core] Failed to parse color. Expected color to be a string, instead got ${typeof t}`);if(t==="bright")return{color:t,value:n==="dark"?e.white:e.black,shade:void 0,isThemeColor:!1,isLight:ma(n==="dark"?e.white:e.black,e.luminanceThreshold),variable:"--mantine-color-bright"};if(t==="dimmed")return{color:t,value:n==="dark"?e.colors.dark[2]:e.colors.gray[7],shade:void 0,isThemeColor:!1,isLight:ma(n==="dark"?e.colors.dark[2]:e.colors.gray[6],e.luminanceThreshold),variable:"--mantine-color-dimmed"};if(t==="white"||t==="black")return{color:t,value:t==="white"?e.white:e.black,shade:void 0,isThemeColor:!1,isLight:ma(t==="white"?e.white:e.black,e.luminanceThreshold),variable:`--mantine-color-${t}`};const[r,s]=t.split("."),o=s?Number(s):void 0,i=r in e.colors;if(i){const a=o!==void 0?e.colors[r][o]:e.colors[r][hg(e,n||"light")];return{color:r,value:a,shade:o,isThemeColor:i,isLight:ma(a,e.luminanceThreshold),variable:s?`--mantine-color-${r}-${o}`:`--mantine-color-${r}-filled`}}return{color:t,value:t,isThemeColor:i,isLight:ma(t,e.luminanceThreshold),shade:o,variable:void 0}}function xr(t,e){const n=oa({color:t||e.primaryColor,theme:e});return n.variable?`var(${n.variable})`:t}function jE(t,e){const n={from:(t==null?void 0:t.from)||e.defaultGradient.from,to:(t==null?void 0:t.to)||e.defaultGradient.to,deg:(t==null?void 0:t.deg)??e.defaultGradient.deg??0},r=xr(n.from,e),s=xr(n.to,e);return`linear-gradient(${n.deg}deg, ${r} 0%, ${s} 100%)`}function tl(t,e){if(typeof t!="string"||e>1||e<0)return"rgba(0, 0, 0, 1)";if(t.startsWith("var(")){const o=(1-e)*100;return`color-mix(in srgb, ${t}, transparent ${o}%)`}if(t.startsWith("oklch"))return t.includes("/")?t.replace(/\/\s*[\d.]+\s*\)/,`/ ${e})`):t.replace(")",` / ${e})`);const{r:n,g:r,b:s}=Kw(t);return`rgba(${n}, ${r}, ${s}, ${e})`}const Qp=tl,ohe=({color:t,theme:e,variant:n,gradient:r,autoContrast:s})=>{const o=oa({color:t,theme:e}),i=typeof s=="boolean"?s:e.autoContrast;if(n==="none")return{background:"transparent",hover:"transparent",color:"inherit",border:"none"};if(n==="filled"){const a=i&&o.isLight?"var(--mantine-color-black)":"var(--mantine-color-white)";return o.isThemeColor?o.shade===void 0?{background:`var(--mantine-color-${t}-filled)`,hover:`var(--mantine-color-${t}-filled-hover)`,color:a,border:`${Me(1)} solid transparent`}:{background:`var(--mantine-color-${o.color}-${o.shade})`,hover:`var(--mantine-color-${o.color}-${o.shade===9?8:o.shade+1})`,color:a,border:`${Me(1)} solid transparent`}:{background:t,hover:T0(t,.1),color:a,border:`${Me(1)} solid transparent`}}if(n==="light"){if(o.isThemeColor){if(o.shade===void 0)return{background:`var(--mantine-color-${t}-light)`,hover:`var(--mantine-color-${t}-light-hover)`,color:`var(--mantine-color-${t}-light-color)`,border:`${Me(1)} solid transparent`};const a=e.colors[o.color][o.shade];return{background:tl(a,.1),hover:tl(a,.12),color:`var(--mantine-color-${o.color}-${Math.min(o.shade,6)})`,border:`${Me(1)} solid transparent`}}return{background:tl(t,.1),hover:tl(t,.12),color:t,border:`${Me(1)} solid transparent`}}if(n==="outline")return o.isThemeColor?o.shade===void 0?{background:"transparent",hover:`var(--mantine-color-${t}-outline-hover)`,color:`var(--mantine-color-${t}-outline)`,border:`${Me(1)} solid var(--mantine-color-${t}-outline)`}:{background:"transparent",hover:tl(e.colors[o.color][o.shade],.05),color:`var(--mantine-color-${o.color}-${o.shade})`,border:`${Me(1)} solid var(--mantine-color-${o.color}-${o.shade})`}:{background:"transparent",hover:tl(t,.05),color:t,border:`${Me(1)} solid ${t}`};if(n==="subtle"){if(o.isThemeColor){if(o.shade===void 0)return{background:"transparent",hover:`var(--mantine-color-${t}-light-hover)`,color:`var(--mantine-color-${t}-light-color)`,border:`${Me(1)} solid transparent`};const a=e.colors[o.color][o.shade];return{background:"transparent",hover:tl(a,.12),color:`var(--mantine-color-${o.color}-${Math.min(o.shade,6)})`,border:`${Me(1)} solid transparent`}}return{background:"transparent",hover:tl(t,.12),color:t,border:`${Me(1)} solid transparent`}}return n==="transparent"?o.isThemeColor?o.shade===void 0?{background:"transparent",hover:"transparent",color:`var(--mantine-color-${t}-light-color)`,border:`${Me(1)} solid transparent`}:{background:"transparent",hover:"transparent",color:`var(--mantine-color-${o.color}-${Math.min(o.shade,6)})`,border:`${Me(1)} solid transparent`}:{background:"transparent",hover:"transparent",color:t,border:`${Me(1)} solid transparent`}:n==="white"?o.isThemeColor?o.shade===void 0?{background:"var(--mantine-color-white)",hover:T0(e.white,.01),color:`var(--mantine-color-${t}-filled)`,border:`${Me(1)} solid transparent`}:{background:"var(--mantine-color-white)",hover:T0(e.white,.01),color:`var(--mantine-color-${o.color}-${o.shade})`,border:`${Me(1)} solid transparent`}:{background:"var(--mantine-color-white)",hover:T0(e.white,.01),color:t,border:`${Me(1)} solid transparent`}:n==="gradient"?{background:jE(r,e),hover:jE(r,e),color:"var(--mantine-color-white)",border:"none"}:n==="default"?{background:"var(--mantine-color-default)",hover:"var(--mantine-color-default-hover)",color:"var(--mantine-color-default-color)",border:`${Me(1)} solid var(--mantine-color-default-border)`}:{}},ihe={dark:["#C9C9C9","#b8b8b8","#828282","#696969","#424242","#3b3b3b","#2e2e2e","#242424","#1f1f1f","#141414"],gray:["#f8f9fa","#f1f3f5","#e9ecef","#dee2e6","#ced4da","#adb5bd","#868e96","#495057","#343a40","#212529"],red:["#fff5f5","#ffe3e3","#ffc9c9","#ffa8a8","#ff8787","#ff6b6b","#fa5252","#f03e3e","#e03131","#c92a2a"],pink:["#fff0f6","#ffdeeb","#fcc2d7","#faa2c1","#f783ac","#f06595","#e64980","#d6336c","#c2255c","#a61e4d"],grape:["#f8f0fc","#f3d9fa","#eebefa","#e599f7","#da77f2","#cc5de8","#be4bdb","#ae3ec9","#9c36b5","#862e9c"],violet:["#f3f0ff","#e5dbff","#d0bfff","#b197fc","#9775fa","#845ef7","#7950f2","#7048e8","#6741d9","#5f3dc4"],indigo:["#edf2ff","#dbe4ff","#bac8ff","#91a7ff","#748ffc","#5c7cfa","#4c6ef5","#4263eb","#3b5bdb","#364fc7"],blue:["#e7f5ff","#d0ebff","#a5d8ff","#74c0fc","#4dabf7","#339af0","#228be6","#1c7ed6","#1971c2","#1864ab"],cyan:["#e3fafc","#c5f6fa","#99e9f2","#66d9e8","#3bc9db","#22b8cf","#15aabf","#1098ad","#0c8599","#0b7285"],teal:["#e6fcf5","#c3fae8","#96f2d7","#63e6be","#38d9a9","#20c997","#12b886","#0ca678","#099268","#087f5b"],green:["#ebfbee","#d3f9d8","#b2f2bb","#8ce99a","#69db7c","#51cf66","#40c057","#37b24d","#2f9e44","#2b8a3e"],lime:["#f4fce3","#e9fac8","#d8f5a2","#c0eb75","#a9e34b","#94d82d","#82c91e","#74b816","#66a80f","#5c940d"],yellow:["#fff9db","#fff3bf","#ffec99","#ffe066","#ffd43b","#fcc419","#fab005","#f59f00","#f08c00","#e67700"],orange:["#fff4e6","#ffe8cc","#ffd8a8","#ffc078","#ffa94d","#ff922b","#fd7e14","#f76707","#e8590c","#d9480f"]},$$="-apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji",a2={scale:1,fontSmoothing:!0,focusRing:"auto",white:"#fff",black:"#000",colors:ihe,primaryShade:{light:6,dark:8},primaryColor:"blue",variantColorResolver:ohe,autoContrast:!1,luminanceThreshold:.3,fontFamily:$$,fontFamilyMonospace:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, Liberation Mono, Courier New, monospace",respectReducedMotion:!1,cursorType:"default",defaultGradient:{from:"blue",to:"cyan",deg:45},defaultRadius:"sm",activeClassName:"mantine-active",focusClassName:"",headings:{fontFamily:$$,fontWeight:"700",textWrap:"wrap",sizes:{h1:{fontSize:Me(34),lineHeight:"1.3"},h2:{fontSize:Me(26),lineHeight:"1.35"},h3:{fontSize:Me(22),lineHeight:"1.4"},h4:{fontSize:Me(18),lineHeight:"1.45"},h5:{fontSize:Me(16),lineHeight:"1.5"},h6:{fontSize:Me(14),lineHeight:"1.5"}}},fontSizes:{xs:Me(12),sm:Me(14),md:Me(16),lg:Me(18),xl:Me(20)},lineHeights:{xs:"1.4",sm:"1.45",md:"1.55",lg:"1.6",xl:"1.65"},radius:{xs:Me(2),sm:Me(4),md:Me(8),lg:Me(16),xl:Me(32)},spacing:{xs:Me(10),sm:Me(12),md:Me(16),lg:Me(20),xl:Me(32)},breakpoints:{xs:"36em",sm:"48em",md:"62em",lg:"75em",xl:"88em"},shadows:{xs:`0 ${Me(1)} ${Me(3)} rgba(0, 0, 0, 0.05), 0 ${Me(1)} ${Me(2)} rgba(0, 0, 0, 0.1)`,sm:`0 ${Me(1)} ${Me(3)} rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 ${Me(10)} ${Me(15)} ${Me(-5)}, rgba(0, 0, 0, 0.04) 0 ${Me(7)} ${Me(7)} ${Me(-5)}`,md:`0 ${Me(1)} ${Me(3)} rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 ${Me(20)} ${Me(25)} ${Me(-5)}, rgba(0, 0, 0, 0.04) 0 ${Me(10)} ${Me(10)} ${Me(-5)}`,lg:`0 ${Me(1)} ${Me(3)} rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 ${Me(28)} ${Me(23)} ${Me(-7)}, rgba(0, 0, 0, 0.04) 0 ${Me(12)} ${Me(12)} ${Me(-7)}`,xl:`0 ${Me(1)} ${Me(3)} rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 ${Me(36)} ${Me(28)} ${Me(-7)}, rgba(0, 0, 0, 0.04) 0 ${Me(17)} ${Me(17)} ${Me(-7)}`},other:{},components:{}};function F$(t){return t==="auto"||t==="dark"||t==="light"}function ahe({key:t="mantine-color-scheme-value"}={}){let e;return{get:n=>{if(typeof window>"u")return n;try{const r=window.localStorage.getItem(t);return F$(r)?r:n}catch{return n}},set:n=>{try{window.localStorage.setItem(t,n)}catch(r){console.warn("[@mantine/core] Local storage color scheme manager was unable to save color scheme.",r)}},subscribe:n=>{e=r=>{r.storageArea===window.localStorage&&r.key===t&&F$(r.newValue)&&n(r.newValue)},window.addEventListener("storage",e)},unsubscribe:()=>{window.removeEventListener("storage",e)},clear:()=>{window.localStorage.removeItem(t)}}}const lhe="[@mantine/core] MantineProvider: Invalid theme.primaryColor, it accepts only key of theme.colors, learn more – https://mantine.dev/theming/colors/#primary-color",z$="[@mantine/core] MantineProvider: Invalid theme.primaryShade, it accepts only 0-9 integers or an object { light: 0-9, dark: 0-9 }";function N6(t){return t<0||t>9?!1:parseInt(t.toString(),10)===t}function P$(t){if(!(t.primaryColor in t.colors))throw new Error(lhe);if(typeof t.primaryShade=="object"&&(!N6(t.primaryShade.dark)||!N6(t.primaryShade.light)))throw new Error(z$);if(typeof t.primaryShade=="number"&&!N6(t.primaryShade))throw new Error(z$)}function fj(t,e){var r;if(!e)return P$(t),t;const n=lj(t,e);return e.fontFamily&&!((r=e.headings)!=null&&r.fontFamily)&&(n.headings.fontFamily=e.fontFamily),P$(n),n}const pj=S.createContext(null),che=()=>S.useContext(pj)||a2;function Tr(){const t=S.useContext(pj);if(!t)throw new Error("@mantine/core: MantineProvider was not found in component tree, make sure you have it in your app");return t}function XG({theme:t,children:e,inherit:n=!0}){const r=che(),s=S.useMemo(()=>fj(n?r:a2,t),[t,r,n]);return d.jsx(pj.Provider,{value:s,children:e})}XG.displayName="@mantine/core/MantineThemeProvider";function uhe(){const t=Tr(),e=Yw(),n=as(t.breakpoints).reduce((r,s)=>{const o=t.breakpoints[s].includes("px"),i=If(t.breakpoints[s]),a=o?`${i-.1}px`:Uh(i-.1),l=o?`${i}px`:Uh(i);return`${r}@media (max-width: ${a}) {.mantine-visible-from-${s} {display: none !important;}}@media (min-width: ${l}) {.mantine-hidden-from-${s} {display: none !important;}}`},"");return d.jsx("style",{"data-mantine-styles":"classes",nonce:e==null?void 0:e(),dangerouslySetInnerHTML:{__html:n}})}function L6(t){return Object.entries(t).map(([e,n])=>`${e}: ${n};`).join("")}function ZG(t,e){const n=e?[e]:[":root",":host"],r=L6(t.variables),s=r?`${n.join(", ")}{${r}}`:"",o=L6(t.dark),i=L6(t.light),a=u=>n.map(f=>f===":host"?`${f}([data-mantine-color-scheme="${u}"])`:`${f}[data-mantine-color-scheme="${u}"]`).join(", "),l=o?`${a("dark")}{${o}}`:"",c=i?`${a("light")}{${i}}`:"";return`${s}

${l}

${c}`}function Lc({color:t,theme:e,autoContrast:n}){return(typeof n=="boolean"?n:e.autoContrast)&&oa({color:t||e.primaryColor,theme:e}).isLight?"var(--mantine-color-black)":"var(--mantine-color-white)"}function B$(t,e){return Lc({color:t.colors[t.primaryColor][hg(t,e)],theme:t,autoContrast:null})}function Dv({theme:t,color:e,colorScheme:n,name:r=e,withColorValues:s=!0}){if(!t.colors[e])return{};if(n==="light"){const a=hg(t,"light"),l={[`--mantine-color-${r}-text`]:`var(--mantine-color-${r}-filled)`,[`--mantine-color-${r}-filled`]:`var(--mantine-color-${r}-${a})`,[`--mantine-color-${r}-filled-hover`]:`var(--mantine-color-${r}-${a===9?8:a+1})`,[`--mantine-color-${r}-light`]:Qp(t.colors[e][a],.1),[`--mantine-color-${r}-light-hover`]:Qp(t.colors[e][a],.12),[`--mantine-color-${r}-light-color`]:`var(--mantine-color-${r}-${a})`,[`--mantine-color-${r}-outline`]:`var(--mantine-color-${r}-${a})`,[`--mantine-color-${r}-outline-hover`]:Qp(t.colors[e][a],.05)};return s?{[`--mantine-color-${r}-0`]:t.colors[e][0],[`--mantine-color-${r}-1`]:t.colors[e][1],[`--mantine-color-${r}-2`]:t.colors[e][2],[`--mantine-color-${r}-3`]:t.colors[e][3],[`--mantine-color-${r}-4`]:t.colors[e][4],[`--mantine-color-${r}-5`]:t.colors[e][5],[`--mantine-color-${r}-6`]:t.colors[e][6],[`--mantine-color-${r}-7`]:t.colors[e][7],[`--mantine-color-${r}-8`]:t.colors[e][8],[`--mantine-color-${r}-9`]:t.colors[e][9],...l}:l}const o=hg(t,"dark"),i={[`--mantine-color-${r}-text`]:`var(--mantine-color-${r}-4)`,[`--mantine-color-${r}-filled`]:`var(--mantine-color-${r}-${o})`,[`--mantine-color-${r}-filled-hover`]:`var(--mantine-color-${r}-${o===9?8:o+1})`,[`--mantine-color-${r}-light`]:Qp(t.colors[e][Math.max(0,o-2)],.15),[`--mantine-color-${r}-light-hover`]:Qp(t.colors[e][Math.max(0,o-2)],.2),[`--mantine-color-${r}-light-color`]:`var(--mantine-color-${r}-${Math.max(o-5,0)})`,[`--mantine-color-${r}-outline`]:`var(--mantine-color-${r}-${Math.max(o-4,0)})`,[`--mantine-color-${r}-outline-hover`]:Qp(t.colors[e][Math.max(o-4,0)],.05)};return s?{[`--mantine-color-${r}-0`]:t.colors[e][0],[`--mantine-color-${r}-1`]:t.colors[e][1],[`--mantine-color-${r}-2`]:t.colors[e][2],[`--mantine-color-${r}-3`]:t.colors[e][3],[`--mantine-color-${r}-4`]:t.colors[e][4],[`--mantine-color-${r}-5`]:t.colors[e][5],[`--mantine-color-${r}-6`]:t.colors[e][6],[`--mantine-color-${r}-7`]:t.colors[e][7],[`--mantine-color-${r}-8`]:t.colors[e][8],[`--mantine-color-${r}-9`]:t.colors[e][9],...i}:i}function Iv(t){return Array.isArray(t)?t:Array(10).fill(t)}function dhe(t){return!!t&&typeof t=="object"&&"mantine-virtual-color"in t}function Jp(t,e,n){as(e).forEach(r=>Object.assign(t,{[`--mantine-${n}-${r}`]:e[r]}))}const QG=t=>{const e=hg(t,"light"),n=t.defaultRadius in t.radius?t.radius[t.defaultRadius]:Me(t.defaultRadius),r={variables:{"--mantine-z-index-app":"100","--mantine-z-index-modal":"200","--mantine-z-index-popover":"300","--mantine-z-index-overlay":"400","--mantine-z-index-max":"9999","--mantine-scale":t.scale.toString(),"--mantine-cursor-type":t.cursorType,"--mantine-webkit-font-smoothing":t.fontSmoothing?"antialiased":"unset","--mantine-moz-font-smoothing":t.fontSmoothing?"grayscale":"unset","--mantine-color-white":t.white,"--mantine-color-black":t.black,"--mantine-line-height":t.lineHeights.md,"--mantine-font-family":t.fontFamily,"--mantine-font-family-monospace":t.fontFamilyMonospace,"--mantine-font-family-headings":t.headings.fontFamily,"--mantine-heading-font-weight":t.headings.fontWeight,"--mantine-heading-text-wrap":t.headings.textWrap,"--mantine-radius-default":n,"--mantine-primary-color-filled":`var(--mantine-color-${t.primaryColor}-filled)`,"--mantine-primary-color-filled-hover":`var(--mantine-color-${t.primaryColor}-filled-hover)`,"--mantine-primary-color-light":`var(--mantine-color-${t.primaryColor}-light)`,"--mantine-primary-color-light-hover":`var(--mantine-color-${t.primaryColor}-light-hover)`,"--mantine-primary-color-light-color":`var(--mantine-color-${t.primaryColor}-light-color)`},light:{"--mantine-color-scheme":"light","--mantine-primary-color-contrast":B$(t,"light"),"--mantine-color-bright":"var(--mantine-color-black)","--mantine-color-text":t.black,"--mantine-color-body":t.white,"--mantine-color-error":"var(--mantine-color-red-6)","--mantine-color-placeholder":"var(--mantine-color-gray-5)","--mantine-color-anchor":`var(--mantine-color-${t.primaryColor}-${e})`,"--mantine-color-default":"var(--mantine-color-white)","--mantine-color-default-hover":"var(--mantine-color-gray-0)","--mantine-color-default-color":"var(--mantine-color-black)","--mantine-color-default-border":"var(--mantine-color-gray-4)","--mantine-color-dimmed":"var(--mantine-color-gray-6)","--mantine-color-disabled":"var(--mantine-color-gray-2)","--mantine-color-disabled-color":"var(--mantine-color-gray-5)","--mantine-color-disabled-border":"var(--mantine-color-gray-3)"},dark:{"--mantine-color-scheme":"dark","--mantine-primary-color-contrast":B$(t,"dark"),"--mantine-color-bright":"var(--mantine-color-white)","--mantine-color-text":"var(--mantine-color-dark-0)","--mantine-color-body":"var(--mantine-color-dark-7)","--mantine-color-error":"var(--mantine-color-red-8)","--mantine-color-placeholder":"var(--mantine-color-dark-3)","--mantine-color-anchor":`var(--mantine-color-${t.primaryColor}-4)`,"--mantine-color-default":"var(--mantine-color-dark-6)","--mantine-color-default-hover":"var(--mantine-color-dark-5)","--mantine-color-default-color":"var(--mantine-color-white)","--mantine-color-default-border":"var(--mantine-color-dark-4)","--mantine-color-dimmed":"var(--mantine-color-dark-2)","--mantine-color-disabled":"var(--mantine-color-dark-6)","--mantine-color-disabled-color":"var(--mantine-color-dark-3)","--mantine-color-disabled-border":"var(--mantine-color-dark-4)"}};Jp(r.variables,t.breakpoints,"breakpoint"),Jp(r.variables,t.spacing,"spacing"),Jp(r.variables,t.fontSizes,"font-size"),Jp(r.variables,t.lineHeights,"line-height"),Jp(r.variables,t.shadows,"shadow"),Jp(r.variables,t.radius,"radius"),t.colors[t.primaryColor].forEach((o,i)=>{r.variables[`--mantine-primary-color-${i}`]=`var(--mantine-color-${t.primaryColor}-${i})`}),as(t.colors).forEach(o=>{const i=t.colors[o];if(dhe(i)){Object.assign(r.light,Dv({theme:t,name:i.name,color:i.light,colorScheme:"light",withColorValues:!0})),Object.assign(r.dark,Dv({theme:t,name:i.name,color:i.dark,colorScheme:"dark",withColorValues:!0}));return}i.forEach((a,l)=>{r.variables[`--mantine-color-${o}-${l}`]=a}),Object.assign(r.light,Dv({theme:t,color:o,colorScheme:"light",withColorValues:!1})),Object.assign(r.dark,Dv({theme:t,color:o,colorScheme:"dark",withColorValues:!1}))});const s=t.headings.sizes;return as(s).forEach(o=>{r.variables[`--mantine-${o}-font-size`]=s[o].fontSize,r.variables[`--mantine-${o}-line-height`]=s[o].lineHeight,r.variables[`--mantine-${o}-font-weight`]=s[o].fontWeight||t.headings.fontWeight}),r};function fhe({theme:t,generator:e}){const n=QG(t),r=e==null?void 0:e(t);return r?lj(n,r):n}const $6=QG(a2);function phe(t){const e={variables:{},light:{},dark:{}};return as(t.variables).forEach(n=>{$6.variables[n]!==t.variables[n]&&(e.variables[n]=t.variables[n])}),as(t.light).forEach(n=>{$6.light[n]!==t.light[n]&&(e.light[n]=t.light[n])}),as(t.dark).forEach(n=>{$6.dark[n]!==t.dark[n]&&(e.dark[n]=t.dark[n])}),e}function hhe(t){return ZG({variables:{},dark:{"--mantine-color-scheme":"dark"},light:{"--mantine-color-scheme":"light"}},t)}function JG({cssVariablesSelector:t,deduplicateCssVariables:e}){const n=Tr(),r=Yw(),s=Gpe(),o=fhe({theme:n,generator:s}),i=(t===void 0||t===":root"||t===":host")&&e,a=i?phe(o):o,l=ZG(a,t);return l?d.jsx("style",{"data-mantine-styles":!0,nonce:r==null?void 0:r(),dangerouslySetInnerHTML:{__html:`${l}${i?"":hhe(t)}`}}):null}JG.displayName="@mantine/CssVariables";function eh(t,e){var s,o;const n=typeof window<"u"&&"matchMedia"in window&&((s=window.matchMedia("(prefers-color-scheme: dark)"))==null?void 0:s.matches),r=t!=="auto"?t:n?"dark":"light";(o=e())==null||o.setAttribute("data-mantine-color-scheme",r)}function mhe({manager:t,defaultColorScheme:e,getRootElement:n,forceColorScheme:r}){const s=S.useRef(null),[o,i]=S.useState(()=>t.get(e)),a=r||o,l=S.useCallback(u=>{r||(eh(u,n),i(u),t.set(u))},[t.set,a,r]),c=S.useCallback(()=>{i(e),eh(e,n),t.clear()},[t.clear,e]);return S.useEffect(()=>(t.subscribe(l),t.unsubscribe),[t.subscribe,t.unsubscribe]),yd(()=>{eh(t.get(e),n)},[]),S.useEffect(()=>{var f;if(r)return eh(r,n),()=>{};r===void 0&&eh(o,n),typeof window<"u"&&"matchMedia"in window&&(s.current=window.matchMedia("(prefers-color-scheme: dark)"));const u=h=>{o==="auto"&&eh(h.matches?"dark":"light",n)};return(f=s.current)==null||f.addEventListener("change",u),()=>{var h;return(h=s.current)==null?void 0:h.removeEventListener("change",u)}},[o,r]),{colorScheme:a,setColorScheme:l,clearColorScheme:c}}function ghe({respectReducedMotion:t,getRootElement:e}){yd(()=>{var n;t&&((n=e())==null||n.setAttribute("data-respect-reduced-motion","true"))},[t])}function l2({theme:t,children:e,getStyleNonce:n,withStaticClasses:r=!0,withGlobalClasses:s=!0,deduplicateCssVariables:o=!0,withCssVariables:i=!0,cssVariablesSelector:a,classNamesPrefix:l="mantine",colorSchemeManager:c=ahe(),defaultColorScheme:u="light",getRootElement:f=()=>document.documentElement,cssVariablesResolver:h,forceColorScheme:m,stylesTransform:y,env:v}){const{colorScheme:b,setColorScheme:w,clearColorScheme:C}=mhe({defaultColorScheme:u,forceColorScheme:m,manager:c,getRootElement:f});return ghe({respectReducedMotion:(t==null?void 0:t.respectReducedMotion)||!1,getRootElement:f}),d.jsx(dj.Provider,{value:{colorScheme:b,setColorScheme:w,clearColorScheme:C,getRootElement:f,classNamesPrefix:l,getStyleNonce:n,cssVariablesResolver:h,cssVariablesSelector:a??":root",withStaticClasses:r,stylesTransform:y,env:v},children:d.jsxs(XG,{theme:t,children:[i&&d.jsx(JG,{cssVariablesSelector:a,deduplicateCssVariables:o}),s&&d.jsx(uhe,{}),e]})})}l2.displayName="@mantine/core/MantineProvider";function Ti({classNames:t,styles:e,props:n,stylesCtx:r}){const s=Tr();return{resolvedClassNames:Ww({theme:s,classNames:t,props:n,stylesCtx:r||void 0}),resolvedStyles:Px({theme:s,styles:e,props:n,stylesCtx:r||void 0})}}const yhe={always:"mantine-focus-always",auto:"mantine-focus-auto",never:"mantine-focus-never"};function vhe({theme:t,options:e,unstyled:n}){return Fr((e==null?void 0:e.focusable)&&!n&&(t.focusClassName||yhe[t.focusRing]),(e==null?void 0:e.active)&&!n&&t.activeClassName)}function bhe({selector:t,stylesCtx:e,options:n,props:r,theme:s}){return Ww({theme:s,classNames:n==null?void 0:n.classNames,props:(n==null?void 0:n.props)||r,stylesCtx:e})[t]}function H$({selector:t,stylesCtx:e,theme:n,classNames:r,props:s}){return Ww({theme:n,classNames:r,props:s,stylesCtx:e})[t]}function xhe({rootSelector:t,selector:e,className:n}){return t===e?n:void 0}function whe({selector:t,classes:e,unstyled:n}){return n?void 0:e[t]}function She({themeName:t,classNamesPrefix:e,selector:n,withStaticClass:r}){return r===!1?[]:t.map(s=>`${e}-${s}-${n}`)}function Che({themeName:t,theme:e,selector:n,props:r,stylesCtx:s}){return t.map(o=>{var i,a;return(a=Ww({theme:e,classNames:(i=e.components[o])==null?void 0:i.classNames,props:r,stylesCtx:s}))==null?void 0:a[n]})}function khe({options:t,classes:e,selector:n,unstyled:r}){return t!=null&&t.variant&&!r?e[`${n}--${t.variant}`]:void 0}function Ehe({theme:t,options:e,themeName:n,selector:r,classNamesPrefix:s,classNames:o,classes:i,unstyled:a,className:l,rootSelector:c,props:u,stylesCtx:f,withStaticClasses:h,headless:m,transformedStyles:y}){return Fr(vhe({theme:t,options:e,unstyled:a||m}),Che({theme:t,themeName:n,selector:r,props:u,stylesCtx:f}),khe({options:e,classes:i,selector:r,unstyled:a}),H$({selector:r,stylesCtx:f,theme:t,classNames:o,props:u}),H$({selector:r,stylesCtx:f,theme:t,classNames:y,props:u}),bhe({selector:r,stylesCtx:f,options:e,props:u,theme:t}),xhe({rootSelector:c,selector:r,className:l}),whe({selector:r,classes:i,unstyled:a||m}),h&&!m&&She({themeName:n,classNamesPrefix:s,selector:r,withStaticClass:e==null?void 0:e.withStaticClass}),e==null?void 0:e.className)}function The({theme:t,themeName:e,props:n,stylesCtx:r,selector:s}){return e.map(o=>{var i;return Px({theme:t,styles:(i=t.components[o])==null?void 0:i.styles,props:n,stylesCtx:r})[s]}).reduce((o,i)=>({...o,...i}),{})}function AE({style:t,theme:e}){return Array.isArray(t)?[...t].reduce((n,r)=>({...n,...AE({style:r,theme:e})}),{}):typeof t=="function"?t(e):t??{}}function Mhe(t){return t.reduce((e,n)=>(n&&Object.keys(n).forEach(r=>{e[r]={...e[r],...km(n[r])}}),e),{})}function jhe({vars:t,varsResolver:e,theme:n,props:r,stylesCtx:s,selector:o,themeName:i,headless:a}){var l;return(l=Mhe([a?{}:e==null?void 0:e(n,r,s),...i.map(c=>{var u,f,h;return(h=(f=(u=n.components)==null?void 0:u[c])==null?void 0:f.vars)==null?void 0:h.call(f,n,r,s)}),t==null?void 0:t(n,r,s)]))==null?void 0:l[o]}function Ahe({theme:t,themeName:e,selector:n,options:r,props:s,stylesCtx:o,rootSelector:i,styles:a,style:l,vars:c,varsResolver:u,headless:f,withStylesTransform:h}){return{...!h&&The({theme:t,themeName:e,props:s,stylesCtx:o,selector:n}),...!h&&Px({theme:t,styles:a,props:s,stylesCtx:o})[n],...!h&&Px({theme:t,styles:r==null?void 0:r.styles,props:(r==null?void 0:r.props)||s,stylesCtx:o})[n],...jhe({theme:t,props:s,stylesCtx:o,vars:c,varsResolver:u,selector:n,themeName:e,headless:f}),...i===n?AE({style:l,theme:t}):null,...AE({style:r==null?void 0:r.style,theme:t})}}function _he({props:t,stylesCtx:e,themeName:n}){var i;const r=Tr(),s=(i=Jpe())==null?void 0:i();return{getTransformedStyles:a=>s?[...a.map(c=>s(c,{props:t,theme:r,ctx:e})),...n.map(c=>{var u;return s((u=r.components[c])==null?void 0:u.styles,{props:t,theme:r,ctx:e})})].filter(Boolean):[],withStylesTransform:!!s}}function Et({name:t,classes:e,props:n,stylesCtx:r,className:s,style:o,rootSelector:i="root",unstyled:a,classNames:l,styles:c,vars:u,varsResolver:f,attributes:h}){const m=Tr(),y=Kpe(),v=Xpe(),b=Zpe(),w=(Array.isArray(t)?t:[t]).filter(E=>E),{withStylesTransform:C,getTransformedStyles:k}=_he({props:n,stylesCtx:r,themeName:w});return(E,j)=>({className:Ehe({theme:m,options:j,themeName:w,selector:E,classNamesPrefix:y,classNames:l,classes:e,unstyled:a,className:s,rootSelector:i,props:n,stylesCtx:r,withStaticClasses:v,headless:b,transformedStyles:k([j==null?void 0:j.styles,c])}),style:Ahe({theme:m,themeName:w,selector:E,options:j,props:n,stylesCtx:r,rootSelector:i,styles:c,style:o,vars:u,varsResolver:f,headless:b,withStylesTransform:C}),...h==null?void 0:h[E]})}function Rhe(t,e){if(t.startsWith("var("))return`color-mix(in srgb, ${t}, white ${e*100}%)`;const{r:n,g:r,b:s,a:o}=Kw(t),i=a=>Math.round(a+(255-a)*e);return`rgba(${i(n)}, ${i(r)}, ${i(s)}, ${o})`}function ep(t,e){return typeof t=="boolean"?t:e.autoContrast}function U$(t){const e=document.createElement("style");return e.setAttribute("data-mantine-styles","inline"),e.innerHTML="*, *::before, *::after {transition: none !important;}",e.setAttribute("data-mantine-disable-transition","true"),t&&e.setAttribute("nonce",t),document.head.appendChild(e),()=>document.querySelectorAll("[data-mantine-disable-transition]").forEach(r=>r.remove())}function eK({keepTransitions:t}={}){const e=S.useRef($G),n=S.useRef(-1),r=S.useContext(dj),s=Yw(),o=S.useRef(s==null?void 0:s());if(!r)throw new Error("[@mantine/core] MantineProvider was not found in tree");const i=f=>{r.setColorScheme(f),e.current=t?()=>{}:U$(o.current),window.clearTimeout(n.current),n.current=window.setTimeout(()=>{var h;(h=e.current)==null||h.call(e)},10)},a=()=>{r.clearColorScheme(),e.current=t?()=>{}:U$(o.current),window.clearTimeout(n.current),n.current=window.setTimeout(()=>{var f;(f=e.current)==null||f.call(e)},10)},l=fpe("light",{getInitialValueInEffect:!1}),c=r.colorScheme==="auto"?l:r.colorScheme,u=S.useCallback(()=>i(c==="light"?"dark":"light"),[i,c]);return S.useEffect(()=>()=>{var f;(f=e.current)==null||f.call(e),window.clearTimeout(n.current)},[]),{colorScheme:r.colorScheme,setColorScheme:i,clearColorScheme:a,toggleColorScheme:u}}const Dhe=({defaultColorScheme:t,localStorageKey:e,forceColorScheme:n})=>n?`document.documentElement.setAttribute("data-mantine-color-scheme", '${n}');`:`try {
  var _colorScheme = window.localStorage.getItem("${e}");
  var colorScheme = _colorScheme === "light" || _colorScheme === "dark" || _colorScheme === "auto" ? _colorScheme : "${t}";
  var computedColorScheme = colorScheme !== "auto" ? colorScheme : window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light";
  document.documentElement.setAttribute("data-mantine-color-scheme", computedColorScheme);
} catch (e) {}
`;function Ihe({defaultColorScheme:t="light",localStorageKey:e="mantine-color-scheme-value",forceColorScheme:n,...r}){const s=["light","dark","auto"].includes(t)?t:"light";return d.jsx("script",{...r,"data-mantine-script":!0,dangerouslySetInnerHTML:{__html:Dhe({defaultColorScheme:s,localStorageKey:e,forceColorScheme:n})}})}function we(t,e,n){var i;const r=Tr(),s=(i=r.components[t])==null?void 0:i.defaultProps,o=typeof s=="function"?s(r):s;return{...e,...o,...km(n)}}function F6(t){return as(t).reduce((e,n)=>t[n]!==void 0?`${e}${epe(n)}:${t[n]};`:e,"").trim()}function Ohe({selector:t,styles:e,media:n,container:r}){const s=e?F6(e):"",o=Array.isArray(n)?n.map(a=>`@media${a.query}{${t}{${F6(a.styles)}}}`):[],i=Array.isArray(r)?r.map(a=>`@container ${a.query}{${t}{${F6(a.styles)}}}`):[];return`${s?`${t}{${s}}`:""}${o.join("")}${i.join("")}`.trim()}function c2(t){const e=Yw();return d.jsx("style",{"data-mantine-styles":"inline",nonce:e==null?void 0:e(),dangerouslySetInnerHTML:{__html:Ohe(t)}})}function bd(t){const{m:e,mx:n,my:r,mt:s,mb:o,ml:i,mr:a,me:l,ms:c,p:u,px:f,py:h,pt:m,pb:y,pl:v,pr:b,pe:w,ps:C,bd:k,bdrs:E,bg:j,c:A,opacity:M,ff:_,fz:D,fw:R,lts:N,ta:z,lh:B,fs:L,tt:P,td:I,w:H,miw:$,maw:V,h:q,mih:U,mah:W,bgsz:Y,bgp:G,bgr:K,bga:Q,pos:Z,top:J,left:ne,bottom:se,right:ce,inset:fe,display:le,flex:be,hiddenFrom:je,visibleFrom:pe,lightHidden:_e,darkHidden:Ce,sx:Te,...Ae}=t;return{styleProps:km({m:e,mx:n,my:r,mt:s,mb:o,ml:i,mr:a,me:l,ms:c,p:u,px:f,py:h,pt:m,pb:y,pl:v,pr:b,pe:w,ps:C,bd:k,bg:j,c:A,opacity:M,ff:_,fz:D,fw:R,lts:N,ta:z,lh:B,fs:L,tt:P,td:I,w:H,miw:$,maw:V,h:q,mih:U,mah:W,bgsz:Y,bgp:G,bgr:K,bga:Q,pos:Z,top:J,left:ne,bottom:se,right:ce,inset:fe,display:le,flex:be,bdrs:E,hiddenFrom:je,visibleFrom:pe,lightHidden:_e,darkHidden:Ce,sx:Te}),rest:Ae}}const Nhe={m:{type:"spacing",property:"margin"},mt:{type:"spacing",property:"marginTop"},mb:{type:"spacing",property:"marginBottom"},ml:{type:"spacing",property:"marginLeft"},mr:{type:"spacing",property:"marginRight"},ms:{type:"spacing",property:"marginInlineStart"},me:{type:"spacing",property:"marginInlineEnd"},mx:{type:"spacing",property:"marginInline"},my:{type:"spacing",property:"marginBlock"},p:{type:"spacing",property:"padding"},pt:{type:"spacing",property:"paddingTop"},pb:{type:"spacing",property:"paddingBottom"},pl:{type:"spacing",property:"paddingLeft"},pr:{type:"spacing",property:"paddingRight"},ps:{type:"spacing",property:"paddingInlineStart"},pe:{type:"spacing",property:"paddingInlineEnd"},px:{type:"spacing",property:"paddingInline"},py:{type:"spacing",property:"paddingBlock"},bd:{type:"border",property:"border"},bdrs:{type:"radius",property:"borderRadius"},bg:{type:"color",property:"background"},c:{type:"textColor",property:"color"},opacity:{type:"identity",property:"opacity"},ff:{type:"fontFamily",property:"fontFamily"},fz:{type:"fontSize",property:"fontSize"},fw:{type:"identity",property:"fontWeight"},lts:{type:"size",property:"letterSpacing"},ta:{type:"identity",property:"textAlign"},lh:{type:"lineHeight",property:"lineHeight"},fs:{type:"identity",property:"fontStyle"},tt:{type:"identity",property:"textTransform"},td:{type:"identity",property:"textDecoration"},w:{type:"spacing",property:"width"},miw:{type:"spacing",property:"minWidth"},maw:{type:"spacing",property:"maxWidth"},h:{type:"spacing",property:"height"},mih:{type:"spacing",property:"minHeight"},mah:{type:"spacing",property:"maxHeight"},bgsz:{type:"size",property:"backgroundSize"},bgp:{type:"identity",property:"backgroundPosition"},bgr:{type:"identity",property:"backgroundRepeat"},bga:{type:"identity",property:"backgroundAttachment"},pos:{type:"identity",property:"position"},top:{type:"size",property:"top"},left:{type:"size",property:"left"},bottom:{type:"size",property:"bottom"},right:{type:"size",property:"right"},inset:{type:"size",property:"inset"},display:{type:"identity",property:"display"},flex:{type:"identity",property:"flex"}};function hj(t,e){const n=oa({color:t,theme:e});return n.color==="dimmed"?"var(--mantine-color-dimmed)":n.color==="bright"?"var(--mantine-color-bright)":n.variable?`var(${n.variable})`:n.color}function Lhe(t,e){const n=oa({color:t,theme:e});return n.isThemeColor&&n.shade===void 0?`var(--mantine-color-${n.color}-text)`:hj(t,e)}function $he(t,e){if(typeof t=="number")return Me(t);if(typeof t=="string"){const[n,r,...s]=t.split(" ").filter(i=>i.trim()!=="");let o=`${Me(n)}`;return r&&(o+=` ${r}`),s.length>0&&(o+=` ${hj(s.join(" "),e)}`),o.trim()}return t}const V$={text:"var(--mantine-font-family)",mono:"var(--mantine-font-family-monospace)",monospace:"var(--mantine-font-family-monospace)",heading:"var(--mantine-font-family-headings)",headings:"var(--mantine-font-family-headings)"};function Fhe(t){return typeof t=="string"&&t in V$?V$[t]:t}const zhe=["h1","h2","h3","h4","h5","h6"];function Phe(t,e){return typeof t=="string"&&t in e.fontSizes?`var(--mantine-font-size-${t})`:typeof t=="string"&&zhe.includes(t)?`var(--mantine-${t}-font-size)`:typeof t=="number"||typeof t=="string"?Me(t):t}function Bhe(t){return t}const Hhe=["h1","h2","h3","h4","h5","h6"];function Uhe(t,e){return typeof t=="string"&&t in e.lineHeights?`var(--mantine-line-height-${t})`:typeof t=="string"&&Hhe.includes(t)?`var(--mantine-${t}-line-height)`:t}function Vhe(t,e){return typeof t=="string"&&t in e.radius?`var(--mantine-radius-${t})`:typeof t=="number"||typeof t=="string"?Me(t):t}function qhe(t){return typeof t=="number"?Me(t):t}function Whe(t,e){if(typeof t=="number")return Me(t);if(typeof t=="string"){const n=t.replace("-","");if(!(n in e.spacing))return Me(t);const r=`--mantine-spacing-${n}`;return t.startsWith("-")?`calc(var(${r}) * -1)`:`var(${r})`}return t}const z6={color:hj,textColor:Lhe,fontSize:Phe,spacing:Whe,radius:Vhe,identity:Bhe,size:qhe,lineHeight:Uhe,fontFamily:Fhe,border:$he};function q$(t){return t.replace("(min-width: ","").replace("em)","")}function Yhe({media:t,...e}){const r=Object.keys(t).sort((s,o)=>Number(q$(s))-Number(q$(o))).map(s=>({query:s,styles:t[s]}));return{...e,media:r}}function Ghe(t){if(typeof t!="object"||t===null)return!1;const e=Object.keys(t);return!(e.length===1&&e[0]==="base")}function Khe(t){return typeof t=="object"&&t!==null?"base"in t?t.base:void 0:t}function Xhe(t){return typeof t=="object"&&t!==null?as(t).filter(e=>e!=="base"):[]}function Zhe(t,e){return typeof t=="object"&&t!==null&&e in t?t[e]:t}function tK({styleProps:t,data:e,theme:n}){return Yhe(as(t).reduce((r,s)=>{if(s==="hiddenFrom"||s==="visibleFrom"||s==="sx")return r;const o=e[s],i=Array.isArray(o.property)?o.property:[o.property],a=Khe(t[s]);if(!Ghe(t[s]))return i.forEach(c=>{r.inlineStyles[c]=z6[o.type](a,n)}),r;r.hasResponsiveStyles=!0;const l=Xhe(t[s]);return i.forEach(c=>{a!=null&&(r.styles[c]=z6[o.type](a,n)),l.forEach(u=>{const f=`(min-width: ${n.breakpoints[u]})`;r.media[f]={...r.media[f],[c]:z6[o.type](Zhe(t[s],u),n)}})}),r},{hasResponsiveStyles:!1,styles:{},inlineStyles:{},media:{}}))}function mj(){return`__m__-${S.useId().replace(/[:«»]/g,"")}`}function gj(t,e){return Array.isArray(t)?[...t].reduce((n,r)=>({...n,...gj(r,e)}),{}):typeof t=="function"?t(e):t??{}}function nK(t){return t.startsWith("data-")?t:`data-${t}`}function Qhe(t){return Object.keys(t).reduce((e,n)=>{const r=t[n];return r===void 0||r===""||r===!1||r===null||(e[nK(n)]=t[n]),e},{})}function rK(t){return t?typeof t=="string"?{[nK(t)]:!0}:Array.isArray(t)?[...t].reduce((e,n)=>({...e,...rK(n)}),{}):Qhe(t):null}function _E(t,e){return Array.isArray(t)?[...t].reduce((n,r)=>({...n,..._E(r,e)}),{}):typeof t=="function"?t(e):t??{}}function Jhe({theme:t,style:e,vars:n,styleProps:r}){const s=_E(e,t),o=_E(n,t);return{...s,...o,...r}}const sK=S.forwardRef(({component:t,style:e,__vars:n,className:r,variant:s,mod:o,size:i,hiddenFrom:a,visibleFrom:l,lightHidden:c,darkHidden:u,renderRoot:f,__size:h,...m},y)=>{var _;const v=Tr(),b=t||"div",{styleProps:w,rest:C}=bd(m),k=Qpe(),E=(_=k==null?void 0:k())==null?void 0:_(w.sx),j=mj(),A=tK({styleProps:w,theme:v,data:Nhe}),M={ref:y,style:Jhe({theme:v,style:e,vars:n,styleProps:A.inlineStyles}),className:Fr(r,E,{[j]:A.hasResponsiveStyles,"mantine-light-hidden":c,"mantine-dark-hidden":u,[`mantine-hidden-from-${a}`]:a,[`mantine-visible-from-${l}`]:l}),"data-variant":s,"data-size":LG(i)?void 0:i||void 0,size:h,...rK(o),...C};return d.jsxs(d.Fragment,{children:[A.hasResponsiveStyles&&d.jsx(c2,{selector:`.${j}`,styles:A.styles,media:A.media}),typeof f=="function"?f(M):d.jsx(b,{...M})]})});sK.displayName="@mantine/core/Box";const ie=sK;function oK(t){return t}function iK(t){const e=t;return n=>{const r=S.forwardRef((s,o)=>d.jsx(e,{...n,...s,ref:o}));return r.extend=e.extend,r.displayName=`WithProps(${e.displayName})`,r}}function Be(t){const e=S.forwardRef(t);return e.extend=oK,e.withProps=n=>{const r=S.forwardRef((s,o)=>d.jsx(e,{...n,...s,ref:o}));return r.extend=e.extend,r.displayName=`WithProps(${e.displayName})`,r},e}function us(t){const e=S.forwardRef(t);return e.withProps=n=>{const r=S.forwardRef((s,o)=>d.jsx(e,{...n,...s,ref:o}));return r.extend=e.extend,r.displayName=`WithProps(${e.displayName})`,r},e.extend=oK,e}const eme=S.createContext({dir:"ltr",toggleDirection:()=>{},setDirection:()=>{}});function $c(){return S.useContext(eme)}function tme(t){if(!t||typeof t=="string")return 0;const e=t/36;return Math.round((4+15*e**.25+e/5)*10)}function P6(t){return t!=null&&t.current?t.current.scrollHeight:"auto"}const e0=typeof window<"u"&&window.requestAnimationFrame,W$=0,nme=t=>({height:0,overflow:"hidden",...t?{}:{display:"none"}});function rme({transitionDuration:t,transitionTimingFunction:e="ease",onTransitionEnd:n=()=>{},opened:r,keepMounted:s=!1}){const o=S.useRef(null),i=nme(s),[a,l]=S.useState(r?{}:i),c=y=>{Xo.flushSync(()=>l(y))},u=y=>{c(v=>({...v,...y}))};function f(y){const v=t||tme(y);return{transition:`height ${v}ms ${e}, opacity ${v}ms ${e}`}}kl(()=>{typeof e0=="function"&&e0(r?()=>{u({willChange:"height",display:"block",overflow:"hidden"}),e0(()=>{const y=P6(o);u({...f(y),height:y})})}:()=>{const y=P6(o);u({...f(y),willChange:"height",height:y}),e0(()=>u({height:W$,overflow:"hidden"}))})},[r]);const h=y=>{if(!(y.target!==o.current||y.propertyName!=="height"))if(r){const v=P6(o);v===a.height?c({}):u({height:v}),n()}else a.height===W$&&(c(i),n())};function m({style:y={},refKey:v="ref",...b}={}){const w=b[v],C={"aria-hidden":!r,...b,[v]:VG(o,w),onTransitionEnd:h,style:{boxSizing:"border-box",...y,...a}};return It.version.startsWith("18")?r||(C.inert=""):C.inert=!r,C}return m}const sme={transitionDuration:200,transitionTimingFunction:"ease",animateOpacity:!0},tp=Be((t,e)=>{const{children:n,in:r,transitionDuration:s,transitionTimingFunction:o,style:i,onTransitionEnd:a,animateOpacity:l,keepMounted:c,...u}=we("Collapse",sme,t),f=Tr(),h=Vw(),y=(f.respectReducedMotion?h:!1)?0:s,v=rme({opened:r,transitionDuration:y,transitionTimingFunction:o,onTransitionEnd:a,keepMounted:c});return y===0?r?d.jsx(ie,{...u,children:n}):null:d.jsx(ie,{...v({style:{opacity:r||!l?1:0,transition:l?`opacity ${y}ms ${o}`:"none",...gj(i,f)},ref:e,...u}),children:n})});tp.displayName="@mantine/core/Collapse";function Xw(){return typeof window<"u"}function Tm(t){return aK(t)?(t.nodeName||"").toLowerCase():"#document"}function Qo(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function Rl(t){var e;return(e=(aK(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function aK(t){return Xw()?t instanceof Node||t instanceof Qo(t).Node:!1}function Ir(t){return Xw()?t instanceof Element||t instanceof Qo(t).Element:!1}function Si(t){return Xw()?t instanceof HTMLElement||t instanceof Qo(t).HTMLElement:!1}function RE(t){return!Xw()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof Qo(t).ShadowRoot}const ome=new Set(["inline","contents"]);function u2(t){const{overflow:e,overflowX:n,overflowY:r,display:s}=ta(t);return/auto|scroll|overlay|hidden|clip/.test(e+r+n)&&!ome.has(s)}const ime=new Set(["table","td","th"]);function ame(t){return ime.has(Tm(t))}const lme=[":popover-open",":modal"];function Zw(t){return lme.some(e=>{try{return t.matches(e)}catch{return!1}})}const cme=["transform","translate","scale","rotate","perspective"],ume=["transform","translate","scale","rotate","perspective","filter"],dme=["paint","layout","strict","content"];function yj(t){const e=Qw(),n=Ir(t)?ta(t):t;return cme.some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!e&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!e&&(n.filter?n.filter!=="none":!1)||ume.some(r=>(n.willChange||"").includes(r))||dme.some(r=>(n.contain||"").includes(r))}function fme(t){let e=Mc(t);for(;Si(e)&&!mc(e);){if(yj(e))return e;if(Zw(e))return null;e=Mc(e)}return null}function Qw(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const pme=new Set(["html","body","#document"]);function mc(t){return pme.has(Tm(t))}function ta(t){return Qo(t).getComputedStyle(t)}function Jw(t){return Ir(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function Mc(t){if(Tm(t)==="html")return t;const e=t.assignedSlot||t.parentNode||RE(t)&&t.host||Rl(t);return RE(e)?e.host:e}function lK(t){const e=Mc(t);return mc(e)?t.ownerDocument?t.ownerDocument.body:t.body:Si(e)&&u2(e)?e:lK(e)}function gc(t,e,n){var r;e===void 0&&(e=[]),n===void 0&&(n=!0);const s=lK(t),o=s===((r=t.ownerDocument)==null?void 0:r.body),i=Qo(s);if(o){const a=DE(i);return e.concat(i,i.visualViewport||[],u2(s)?s:[],a&&n?gc(a):[])}return e.concat(s,gc(s,[],n))}function DE(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}const cK=["top","right","bottom","left"],Y$=["start","end"],G$=cK.reduce((t,e)=>t.concat(e,e+"-"+Y$[0],e+"-"+Y$[1]),[]),_a=Math.min,lo=Math.max,Bx=Math.round,Ov=Math.floor,yl=t=>({x:t,y:t}),hme={left:"right",right:"left",bottom:"top",top:"bottom"},mme={start:"end",end:"start"};function IE(t,e,n){return lo(t,_a(e,n))}function Ra(t,e){return typeof t=="function"?t(e):t}function Ci(t){return t.split("-")[0]}function Ea(t){return t.split("-")[1]}function vj(t){return t==="x"?"y":"x"}function bj(t){return t==="y"?"height":"width"}const gme=new Set(["top","bottom"]);function wa(t){return gme.has(Ci(t))?"y":"x"}function xj(t){return vj(wa(t))}function uK(t,e,n){n===void 0&&(n=!1);const r=Ea(t),s=xj(t),o=bj(s);let i=s==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return e.reference[o]>e.floating[o]&&(i=Ux(i)),[i,Ux(i)]}function yme(t){const e=Ux(t);return[Hx(t),e,Hx(e)]}function Hx(t){return t.replace(/start|end/g,e=>mme[e])}const K$=["left","right"],X$=["right","left"],vme=["top","bottom"],bme=["bottom","top"];function xme(t,e,n){switch(t){case"top":case"bottom":return n?e?X$:K$:e?K$:X$;case"left":case"right":return e?vme:bme;default:return[]}}function wme(t,e,n,r){const s=Ea(t);let o=xme(Ci(t),n==="start",r);return s&&(o=o.map(i=>i+"-"+s),e&&(o=o.concat(o.map(Hx)))),o}function Ux(t){return t.replace(/left|right|bottom|top/g,e=>hme[e])}function Sme(t){return{top:0,right:0,bottom:0,left:0,...t}}function wj(t){return typeof t!="number"?Sme(t):{top:t,right:t,bottom:t,left:t}}function qh(t){const{x:e,y:n,width:r,height:s}=t;return{width:r,height:s,top:n,left:e,right:e+r,bottom:n+s,x:e,y:n}}function Cme(){const t=navigator.userAgentData;return t!=null&&t.platform?t.platform:navigator.platform}function kme(){const t=navigator.userAgentData;return t&&Array.isArray(t.brands)?t.brands.map(e=>{let{brand:n,version:r}=e;return n+"/"+r}).join(" "):navigator.userAgent}function Eme(){return/apple/i.test(navigator.vendor)}function Tme(){return Cme().toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints}function Mme(){return kme().includes("jsdom/")}const Z$="data-floating-ui-focusable",jme="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function Q$(t){let e=t.activeElement;for(;((n=e)==null||(n=n.shadowRoot)==null?void 0:n.activeElement)!=null;){var n;e=e.shadowRoot.activeElement}return e}function mg(t,e){if(!t||!e)return!1;const n=e.getRootNode==null?void 0:e.getRootNode();if(t.contains(e))return!0;if(n&&RE(n)){let r=e;for(;r;){if(t===r)return!0;r=r.parentNode||r.host}}return!1}function mh(t){return"composedPath"in t?t.composedPath()[0]:t.target}function B6(t,e){if(e==null)return!1;if("composedPath"in t)return t.composedPath().includes(e);const n=t;return n.target!=null&&e.contains(n.target)}function Ame(t){return t.matches("html,body")}function hf(t){return(t==null?void 0:t.ownerDocument)||document}function _me(t){return Si(t)&&t.matches(jme)}function Rme(t){if(!t||Mme())return!0;try{return t.matches(":focus-visible")}catch{return!0}}function Dme(t){return t?t.hasAttribute(Z$)?t:t.querySelector("["+Z$+"]")||t:null}function Vb(t,e,n){return n===void 0&&(n=!0),t.filter(s=>{var o;return s.parentId===e&&(!n||((o=s.context)==null?void 0:o.open))}).flatMap(s=>[s,...Vb(t,s.id,n)])}function Ime(t){return"nativeEvent"in t}function OE(t,e){const n=["mouse","pen"];return n.push("",void 0),n.includes(t)}var Ome=typeof document<"u",Nme=function(){},vl=Ome?S.useLayoutEffect:Nme;const Lme={...lg};function Nv(t){const e=S.useRef(t);return vl(()=>{e.current=t}),e}const $me=Lme.useInsertionEffect,Fme=$me||(t=>t());function cl(t){const e=S.useRef(()=>{});return Fme(()=>{e.current=t}),S.useCallback(function(){for(var n=arguments.length,r=new Array(n),s=0;s<n;s++)r[s]=arguments[s];return e.current==null?void 0:e.current(...r)},[])}function J$(t,e,n){let{reference:r,floating:s}=t;const o=wa(e),i=xj(e),a=bj(i),l=Ci(e),c=o==="y",u=r.x+r.width/2-s.width/2,f=r.y+r.height/2-s.height/2,h=r[a]/2-s[a]/2;let m;switch(l){case"top":m={x:u,y:r.y-s.height};break;case"bottom":m={x:u,y:r.y+r.height};break;case"right":m={x:r.x+r.width,y:f};break;case"left":m={x:r.x-s.width,y:f};break;default:m={x:r.x,y:r.y}}switch(Ea(e)){case"start":m[i]-=h*(n&&c?-1:1);break;case"end":m[i]+=h*(n&&c?-1:1);break}return m}async function zme(t,e){var n;e===void 0&&(e={});const{x:r,y:s,platform:o,rects:i,elements:a,strategy:l}=t,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:f="floating",altBoundary:h=!1,padding:m=0}=Ra(e,t),y=wj(m),b=a[h?f==="floating"?"reference":"floating":f],w=qh(await o.getClippingRect({element:(n=await(o.isElement==null?void 0:o.isElement(b)))==null||n?b:b.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(a.floating)),boundary:c,rootBoundary:u,strategy:l})),C=f==="floating"?{x:r,y:s,width:i.floating.width,height:i.floating.height}:i.reference,k=await(o.getOffsetParent==null?void 0:o.getOffsetParent(a.floating)),E=await(o.isElement==null?void 0:o.isElement(k))?await(o.getScale==null?void 0:o.getScale(k))||{x:1,y:1}:{x:1,y:1},j=qh(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:C,offsetParent:k,strategy:l}):C);return{top:(w.top-j.top+y.top)/E.y,bottom:(j.bottom-w.bottom+y.bottom)/E.y,left:(w.left-j.left+y.left)/E.x,right:(j.right-w.right+y.right)/E.x}}const Pme=async(t,e,n)=>{const{placement:r="bottom",strategy:s="absolute",middleware:o=[],platform:i}=n,a=o.filter(Boolean),l=await(i.isRTL==null?void 0:i.isRTL(e));let c=await i.getElementRects({reference:t,floating:e,strategy:s}),{x:u,y:f}=J$(c,r,l),h=r,m={},y=0;for(let b=0;b<a.length;b++){var v;const{name:w,fn:C}=a[b],{x:k,y:E,data:j,reset:A}=await C({x:u,y:f,initialPlacement:r,placement:h,strategy:s,middlewareData:m,rects:c,platform:{...i,detectOverflow:(v=i.detectOverflow)!=null?v:zme},elements:{reference:t,floating:e}});u=k??u,f=E??f,m={...m,[w]:{...m[w],...j}},A&&y<=50&&(y++,typeof A=="object"&&(A.placement&&(h=A.placement),A.rects&&(c=A.rects===!0?await i.getElementRects({reference:t,floating:e,strategy:s}):A.rects),{x:u,y:f}=J$(c,h,l)),b=-1)}return{x:u,y:f,placement:h,strategy:s,middlewareData:m}},Bme=t=>({name:"arrow",options:t,async fn(e){const{x:n,y:r,placement:s,rects:o,platform:i,elements:a,middlewareData:l}=e,{element:c,padding:u=0}=Ra(t,e)||{};if(c==null)return{};const f=wj(u),h={x:n,y:r},m=xj(s),y=bj(m),v=await i.getDimensions(c),b=m==="y",w=b?"top":"left",C=b?"bottom":"right",k=b?"clientHeight":"clientWidth",E=o.reference[y]+o.reference[m]-h[m]-o.floating[y],j=h[m]-o.reference[m],A=await(i.getOffsetParent==null?void 0:i.getOffsetParent(c));let M=A?A[k]:0;(!M||!await(i.isElement==null?void 0:i.isElement(A)))&&(M=a.floating[k]||o.floating[y]);const _=E/2-j/2,D=M/2-v[y]/2-1,R=_a(f[w],D),N=_a(f[C],D),z=R,B=M-v[y]-N,L=M/2-v[y]/2+_,P=IE(z,L,B),I=!l.arrow&&Ea(s)!=null&&L!==P&&o.reference[y]/2-(L<z?R:N)-v[y]/2<0,H=I?L<z?L-z:L-B:0;return{[m]:h[m]+H,data:{[m]:P,centerOffset:L-P-H,...I&&{alignmentOffset:H}},reset:I}}});function Hme(t,e,n){return(t?[...n.filter(s=>Ea(s)===t),...n.filter(s=>Ea(s)!==t)]:n.filter(s=>Ci(s)===s)).filter(s=>t?Ea(s)===t||(e?Hx(s)!==s:!1):!0)}const Ume=function(t){return t===void 0&&(t={}),{name:"autoPlacement",options:t,async fn(e){var n,r,s;const{rects:o,middlewareData:i,placement:a,platform:l,elements:c}=e,{crossAxis:u=!1,alignment:f,allowedPlacements:h=G$,autoAlignment:m=!0,...y}=Ra(t,e),v=f!==void 0||h===G$?Hme(f||null,m,h):h,b=await l.detectOverflow(e,y),w=((n=i.autoPlacement)==null?void 0:n.index)||0,C=v[w];if(C==null)return{};const k=uK(C,o,await(l.isRTL==null?void 0:l.isRTL(c.floating)));if(a!==C)return{reset:{placement:v[0]}};const E=[b[Ci(C)],b[k[0]],b[k[1]]],j=[...((r=i.autoPlacement)==null?void 0:r.overflows)||[],{placement:C,overflows:E}],A=v[w+1];if(A)return{data:{index:w+1,overflows:j},reset:{placement:A}};const M=j.map(R=>{const N=Ea(R.placement);return[R.placement,N&&u?R.overflows.slice(0,2).reduce((z,B)=>z+B,0):R.overflows[0],R.overflows]}).sort((R,N)=>R[1]-N[1]),D=((s=M.filter(R=>R[2].slice(0,Ea(R[0])?2:3).every(N=>N<=0))[0])==null?void 0:s[0])||M[0][0];return D!==a?{data:{index:w+1,overflows:j},reset:{placement:D}}:{}}}},Vme=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var n,r;const{placement:s,middlewareData:o,rects:i,initialPlacement:a,platform:l,elements:c}=e,{mainAxis:u=!0,crossAxis:f=!0,fallbackPlacements:h,fallbackStrategy:m="bestFit",fallbackAxisSideDirection:y="none",flipAlignment:v=!0,...b}=Ra(t,e);if((n=o.arrow)!=null&&n.alignmentOffset)return{};const w=Ci(s),C=wa(a),k=Ci(a)===a,E=await(l.isRTL==null?void 0:l.isRTL(c.floating)),j=h||(k||!v?[Ux(a)]:yme(a)),A=y!=="none";!h&&A&&j.push(...wme(a,v,y,E));const M=[a,...j],_=await l.detectOverflow(e,b),D=[];let R=((r=o.flip)==null?void 0:r.overflows)||[];if(u&&D.push(_[w]),f){const L=uK(s,i,E);D.push(_[L[0]],_[L[1]])}if(R=[...R,{placement:s,overflows:D}],!D.every(L=>L<=0)){var N,z;const L=(((N=o.flip)==null?void 0:N.index)||0)+1,P=M[L];if(P&&(!(f==="alignment"?C!==wa(P):!1)||R.every($=>wa($.placement)===C?$.overflows[0]>0:!0)))return{data:{index:L,overflows:R},reset:{placement:P}};let I=(z=R.filter(H=>H.overflows[0]<=0).sort((H,$)=>H.overflows[1]-$.overflows[1])[0])==null?void 0:z.placement;if(!I)switch(m){case"bestFit":{var B;const H=(B=R.filter($=>{if(A){const V=wa($.placement);return V===C||V==="y"}return!0}).map($=>[$.placement,$.overflows.filter(V=>V>0).reduce((V,q)=>V+q,0)]).sort(($,V)=>$[1]-V[1])[0])==null?void 0:B[0];H&&(I=H);break}case"initialPlacement":I=a;break}if(s!==I)return{reset:{placement:I}}}return{}}}};function eF(t,e){return{top:t.top-e.height,right:t.right-e.width,bottom:t.bottom-e.height,left:t.left-e.width}}function tF(t){return cK.some(e=>t[e]>=0)}const qme=function(t){return t===void 0&&(t={}),{name:"hide",options:t,async fn(e){const{rects:n,platform:r}=e,{strategy:s="referenceHidden",...o}=Ra(t,e);switch(s){case"referenceHidden":{const i=await r.detectOverflow(e,{...o,elementContext:"reference"}),a=eF(i,n.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:tF(a)}}}case"escaped":{const i=await r.detectOverflow(e,{...o,altBoundary:!0}),a=eF(i,n.floating);return{data:{escapedOffsets:a,escaped:tF(a)}}}default:return{}}}}};function dK(t){const e=_a(...t.map(o=>o.left)),n=_a(...t.map(o=>o.top)),r=lo(...t.map(o=>o.right)),s=lo(...t.map(o=>o.bottom));return{x:e,y:n,width:r-e,height:s-n}}function Wme(t){const e=t.slice().sort((s,o)=>s.y-o.y),n=[];let r=null;for(let s=0;s<e.length;s++){const o=e[s];!r||o.y-r.y>r.height/2?n.push([o]):n[n.length-1].push(o),r=o}return n.map(s=>qh(dK(s)))}const Yme=function(t){return t===void 0&&(t={}),{name:"inline",options:t,async fn(e){const{placement:n,elements:r,rects:s,platform:o,strategy:i}=e,{padding:a=2,x:l,y:c}=Ra(t,e),u=Array.from(await(o.getClientRects==null?void 0:o.getClientRects(r.reference))||[]),f=Wme(u),h=qh(dK(u)),m=wj(a);function y(){if(f.length===2&&f[0].left>f[1].right&&l!=null&&c!=null)return f.find(b=>l>b.left-m.left&&l<b.right+m.right&&c>b.top-m.top&&c<b.bottom+m.bottom)||h;if(f.length>=2){if(wa(n)==="y"){const R=f[0],N=f[f.length-1],z=Ci(n)==="top",B=R.top,L=N.bottom,P=z?R.left:N.left,I=z?R.right:N.right,H=I-P,$=L-B;return{top:B,bottom:L,left:P,right:I,width:H,height:$,x:P,y:B}}const b=Ci(n)==="left",w=lo(...f.map(R=>R.right)),C=_a(...f.map(R=>R.left)),k=f.filter(R=>b?R.left===C:R.right===w),E=k[0].top,j=k[k.length-1].bottom,A=C,M=w,_=M-A,D=j-E;return{top:E,bottom:j,left:A,right:M,width:_,height:D,x:A,y:E}}return h}const v=await o.getElementRects({reference:{getBoundingClientRect:y},floating:r.floating,strategy:i});return s.reference.x!==v.reference.x||s.reference.y!==v.reference.y||s.reference.width!==v.reference.width||s.reference.height!==v.reference.height?{reset:{rects:v}}:{}}}},fK=new Set(["left","top"]);async function Gme(t,e){const{placement:n,platform:r,elements:s}=t,o=await(r.isRTL==null?void 0:r.isRTL(s.floating)),i=Ci(n),a=Ea(n),l=wa(n)==="y",c=fK.has(i)?-1:1,u=o&&l?-1:1,f=Ra(e,t);let{mainAxis:h,crossAxis:m,alignmentAxis:y}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return a&&typeof y=="number"&&(m=a==="end"?y*-1:y),l?{x:m*u,y:h*c}:{x:h*c,y:m*u}}const Kme=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var n,r;const{x:s,y:o,placement:i,middlewareData:a}=e,l=await Gme(e,t);return i===((n=a.offset)==null?void 0:n.placement)&&(r=a.arrow)!=null&&r.alignmentOffset?{}:{x:s+l.x,y:o+l.y,data:{...l,placement:i}}}}},Xme=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:n,y:r,placement:s,platform:o}=e,{mainAxis:i=!0,crossAxis:a=!1,limiter:l={fn:w=>{let{x:C,y:k}=w;return{x:C,y:k}}},...c}=Ra(t,e),u={x:n,y:r},f=await o.detectOverflow(e,c),h=wa(Ci(s)),m=vj(h);let y=u[m],v=u[h];if(i){const w=m==="y"?"top":"left",C=m==="y"?"bottom":"right",k=y+f[w],E=y-f[C];y=IE(k,y,E)}if(a){const w=h==="y"?"top":"left",C=h==="y"?"bottom":"right",k=v+f[w],E=v-f[C];v=IE(k,v,E)}const b=l.fn({...e,[m]:y,[h]:v});return{...b,data:{x:b.x-n,y:b.y-r,enabled:{[m]:i,[h]:a}}}}}},Zme=function(t){return t===void 0&&(t={}),{options:t,fn(e){const{x:n,y:r,placement:s,rects:o,middlewareData:i}=e,{offset:a=0,mainAxis:l=!0,crossAxis:c=!0}=Ra(t,e),u={x:n,y:r},f=wa(s),h=vj(f);let m=u[h],y=u[f];const v=Ra(a,e),b=typeof v=="number"?{mainAxis:v,crossAxis:0}:{mainAxis:0,crossAxis:0,...v};if(l){const k=h==="y"?"height":"width",E=o.reference[h]-o.floating[k]+b.mainAxis,j=o.reference[h]+o.reference[k]-b.mainAxis;m<E?m=E:m>j&&(m=j)}if(c){var w,C;const k=h==="y"?"width":"height",E=fK.has(Ci(s)),j=o.reference[f]-o.floating[k]+(E&&((w=i.offset)==null?void 0:w[f])||0)+(E?0:b.crossAxis),A=o.reference[f]+o.reference[k]+(E?0:((C=i.offset)==null?void 0:C[f])||0)-(E?b.crossAxis:0);y<j?y=j:y>A&&(y=A)}return{[h]:m,[f]:y}}}},Qme=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(e){var n,r;const{placement:s,rects:o,platform:i,elements:a}=e,{apply:l=()=>{},...c}=Ra(t,e),u=await i.detectOverflow(e,c),f=Ci(s),h=Ea(s),m=wa(s)==="y",{width:y,height:v}=o.floating;let b,w;f==="top"||f==="bottom"?(b=f,w=h===(await(i.isRTL==null?void 0:i.isRTL(a.floating))?"start":"end")?"left":"right"):(w=f,b=h==="end"?"top":"bottom");const C=v-u.top-u.bottom,k=y-u.left-u.right,E=_a(v-u[b],C),j=_a(y-u[w],k),A=!e.middlewareData.shift;let M=E,_=j;if((n=e.middlewareData.shift)!=null&&n.enabled.x&&(_=k),(r=e.middlewareData.shift)!=null&&r.enabled.y&&(M=C),A&&!h){const R=lo(u.left,0),N=lo(u.right,0),z=lo(u.top,0),B=lo(u.bottom,0);m?_=y-2*(R!==0||N!==0?R+N:lo(u.left,u.right)):M=v-2*(z!==0||B!==0?z+B:lo(u.top,u.bottom))}await l({...e,availableWidth:_,availableHeight:M});const D=await i.getDimensions(a.floating);return y!==D.width||v!==D.height?{reset:{rects:!0}}:{}}}};function pK(t){const e=ta(t);let n=parseFloat(e.width)||0,r=parseFloat(e.height)||0;const s=Si(t),o=s?t.offsetWidth:n,i=s?t.offsetHeight:r,a=Bx(n)!==o||Bx(r)!==i;return a&&(n=o,r=i),{width:n,height:r,$:a}}function Sj(t){return Ir(t)?t:t.contextElement}function Dh(t){const e=Sj(t);if(!Si(e))return yl(1);const n=e.getBoundingClientRect(),{width:r,height:s,$:o}=pK(e);let i=(o?Bx(n.width):n.width)/r,a=(o?Bx(n.height):n.height)/s;return(!i||!Number.isFinite(i))&&(i=1),(!a||!Number.isFinite(a))&&(a=1),{x:i,y:a}}const Jme=yl(0);function hK(t){const e=Qo(t);return!Qw()||!e.visualViewport?Jme:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function e1e(t,e,n){return e===void 0&&(e=!1),!n||e&&n!==Qo(t)?!1:e}function Of(t,e,n,r){e===void 0&&(e=!1),n===void 0&&(n=!1);const s=t.getBoundingClientRect(),o=Sj(t);let i=yl(1);e&&(r?Ir(r)&&(i=Dh(r)):i=Dh(t));const a=e1e(o,n,r)?hK(o):yl(0);let l=(s.left+a.x)/i.x,c=(s.top+a.y)/i.y,u=s.width/i.x,f=s.height/i.y;if(o){const h=Qo(o),m=r&&Ir(r)?Qo(r):r;let y=h,v=DE(y);for(;v&&r&&m!==y;){const b=Dh(v),w=v.getBoundingClientRect(),C=ta(v),k=w.left+(v.clientLeft+parseFloat(C.paddingLeft))*b.x,E=w.top+(v.clientTop+parseFloat(C.paddingTop))*b.y;l*=b.x,c*=b.y,u*=b.x,f*=b.y,l+=k,c+=E,y=Qo(v),v=DE(y)}}return qh({width:u,height:f,x:l,y:c})}function e4(t,e){const n=Jw(t).scrollLeft;return e?e.left+n:Of(Rl(t)).left+n}function mK(t,e){const n=t.getBoundingClientRect(),r=n.left+e.scrollLeft-e4(t,n),s=n.top+e.scrollTop;return{x:r,y:s}}function t1e(t){let{elements:e,rect:n,offsetParent:r,strategy:s}=t;const o=s==="fixed",i=Rl(r),a=e?Zw(e.floating):!1;if(r===i||a&&o)return n;let l={scrollLeft:0,scrollTop:0},c=yl(1);const u=yl(0),f=Si(r);if((f||!f&&!o)&&((Tm(r)!=="body"||u2(i))&&(l=Jw(r)),Si(r))){const m=Of(r);c=Dh(r),u.x=m.x+r.clientLeft,u.y=m.y+r.clientTop}const h=i&&!f&&!o?mK(i,l):yl(0);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+u.x+h.x,y:n.y*c.y-l.scrollTop*c.y+u.y+h.y}}function n1e(t){return Array.from(t.getClientRects())}function r1e(t){const e=Rl(t),n=Jw(t),r=t.ownerDocument.body,s=lo(e.scrollWidth,e.clientWidth,r.scrollWidth,r.clientWidth),o=lo(e.scrollHeight,e.clientHeight,r.scrollHeight,r.clientHeight);let i=-n.scrollLeft+e4(t);const a=-n.scrollTop;return ta(r).direction==="rtl"&&(i+=lo(e.clientWidth,r.clientWidth)-s),{width:s,height:o,x:i,y:a}}const nF=25;function s1e(t,e){const n=Qo(t),r=Rl(t),s=n.visualViewport;let o=r.clientWidth,i=r.clientHeight,a=0,l=0;if(s){o=s.width,i=s.height;const u=Qw();(!u||u&&e==="fixed")&&(a=s.offsetLeft,l=s.offsetTop)}const c=e4(r);if(c<=0){const u=r.ownerDocument,f=u.body,h=getComputedStyle(f),m=u.compatMode==="CSS1Compat"&&parseFloat(h.marginLeft)+parseFloat(h.marginRight)||0,y=Math.abs(r.clientWidth-f.clientWidth-m);y<=nF&&(o-=y)}else c<=nF&&(o+=c);return{width:o,height:i,x:a,y:l}}const o1e=new Set(["absolute","fixed"]);function i1e(t,e){const n=Of(t,!0,e==="fixed"),r=n.top+t.clientTop,s=n.left+t.clientLeft,o=Si(t)?Dh(t):yl(1),i=t.clientWidth*o.x,a=t.clientHeight*o.y,l=s*o.x,c=r*o.y;return{width:i,height:a,x:l,y:c}}function rF(t,e,n){let r;if(e==="viewport")r=s1e(t,n);else if(e==="document")r=r1e(Rl(t));else if(Ir(e))r=i1e(e,n);else{const s=hK(t);r={x:e.x-s.x,y:e.y-s.y,width:e.width,height:e.height}}return qh(r)}function gK(t,e){const n=Mc(t);return n===e||!Ir(n)||mc(n)?!1:ta(n).position==="fixed"||gK(n,e)}function a1e(t,e){const n=e.get(t);if(n)return n;let r=gc(t,[],!1).filter(a=>Ir(a)&&Tm(a)!=="body"),s=null;const o=ta(t).position==="fixed";let i=o?Mc(t):t;for(;Ir(i)&&!mc(i);){const a=ta(i),l=yj(i);!l&&a.position==="fixed"&&(s=null),(o?!l&&!s:!l&&a.position==="static"&&!!s&&o1e.has(s.position)||u2(i)&&!l&&gK(t,i))?r=r.filter(u=>u!==i):s=a,i=Mc(i)}return e.set(t,r),r}function l1e(t){let{element:e,boundary:n,rootBoundary:r,strategy:s}=t;const i=[...n==="clippingAncestors"?Zw(e)?[]:a1e(e,this._c):[].concat(n),r],a=i[0],l=i.reduce((c,u)=>{const f=rF(e,u,s);return c.top=lo(f.top,c.top),c.right=_a(f.right,c.right),c.bottom=_a(f.bottom,c.bottom),c.left=lo(f.left,c.left),c},rF(e,a,s));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function c1e(t){const{width:e,height:n}=pK(t);return{width:e,height:n}}function u1e(t,e,n){const r=Si(e),s=Rl(e),o=n==="fixed",i=Of(t,!0,o,e);let a={scrollLeft:0,scrollTop:0};const l=yl(0);function c(){l.x=e4(s)}if(r||!r&&!o)if((Tm(e)!=="body"||u2(s))&&(a=Jw(e)),r){const m=Of(e,!0,o,e);l.x=m.x+e.clientLeft,l.y=m.y+e.clientTop}else s&&c();o&&!r&&s&&c();const u=s&&!r&&!o?mK(s,a):yl(0),f=i.left+a.scrollLeft-l.x-u.x,h=i.top+a.scrollTop-l.y-u.y;return{x:f,y:h,width:i.width,height:i.height}}function H6(t){return ta(t).position==="static"}function sF(t,e){if(!Si(t)||ta(t).position==="fixed")return null;if(e)return e(t);let n=t.offsetParent;return Rl(t)===n&&(n=n.ownerDocument.body),n}function yK(t,e){const n=Qo(t);if(Zw(t))return n;if(!Si(t)){let s=Mc(t);for(;s&&!mc(s);){if(Ir(s)&&!H6(s))return s;s=Mc(s)}return n}let r=sF(t,e);for(;r&&ame(r)&&H6(r);)r=sF(r,e);return r&&mc(r)&&H6(r)&&!yj(r)?n:r||fme(t)||n}const d1e=async function(t){const e=this.getOffsetParent||yK,n=this.getDimensions,r=await n(t.floating);return{reference:u1e(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function f1e(t){return ta(t).direction==="rtl"}const p1e={convertOffsetParentRelativeRectToViewportRelativeRect:t1e,getDocumentElement:Rl,getClippingRect:l1e,getOffsetParent:yK,getElementRects:d1e,getClientRects:n1e,getDimensions:c1e,getScale:Dh,isElement:Ir,isRTL:f1e};function vK(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function h1e(t,e){let n=null,r;const s=Rl(t);function o(){var a;clearTimeout(r),(a=n)==null||a.disconnect(),n=null}function i(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),o();const c=t.getBoundingClientRect(),{left:u,top:f,width:h,height:m}=c;if(a||e(),!h||!m)return;const y=Ov(f),v=Ov(s.clientWidth-(u+h)),b=Ov(s.clientHeight-(f+m)),w=Ov(u),k={rootMargin:-y+"px "+-v+"px "+-b+"px "+-w+"px",threshold:lo(0,_a(1,l))||1};let E=!0;function j(A){const M=A[0].intersectionRatio;if(M!==l){if(!E)return i();M?i(!1,M):r=setTimeout(()=>{i(!1,1e-7)},1e3)}M===1&&!vK(c,t.getBoundingClientRect())&&i(),E=!1}try{n=new IntersectionObserver(j,{...k,root:s.ownerDocument})}catch{n=new IntersectionObserver(j,k)}n.observe(t)}return i(!0),o}function NE(t,e,n,r){r===void 0&&(r={});const{ancestorScroll:s=!0,ancestorResize:o=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,c=Sj(t),u=s||o?[...c?gc(c):[],...gc(e)]:[];u.forEach(w=>{s&&w.addEventListener("scroll",n,{passive:!0}),o&&w.addEventListener("resize",n)});const f=c&&a?h1e(c,n):null;let h=-1,m=null;i&&(m=new ResizeObserver(w=>{let[C]=w;C&&C.target===c&&m&&(m.unobserve(e),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var k;(k=m)==null||k.observe(e)})),n()}),c&&!l&&m.observe(c),m.observe(e));let y,v=l?Of(t):null;l&&b();function b(){const w=Of(t);v&&!vK(v,w)&&n(),v=w,y=requestAnimationFrame(b)}return n(),()=>{var w;u.forEach(C=>{s&&C.removeEventListener("scroll",n),o&&C.removeEventListener("resize",n)}),f==null||f(),(w=m)==null||w.disconnect(),m=null,l&&cancelAnimationFrame(y)}}const Cj=Kme,bK=Ume,kj=Xme,Ej=Vme,Tj=Qme,Mj=qme,Vx=Bme,jj=Yme,m1e=Zme,Aj=(t,e,n)=>{const r=new Map,s={platform:p1e,...n},o={...s.platform,_c:r};return Pme(t,e,{...s,platform:o})};var g1e=typeof document<"u",y1e=function(){},qb=g1e?S.useLayoutEffect:y1e;function qx(t,e){if(t===e)return!0;if(typeof t!=typeof e)return!1;if(typeof t=="function"&&t.toString()===e.toString())return!0;let n,r,s;if(t&&e&&typeof t=="object"){if(Array.isArray(t)){if(n=t.length,n!==e.length)return!1;for(r=n;r--!==0;)if(!qx(t[r],e[r]))return!1;return!0}if(s=Object.keys(t),n=s.length,n!==Object.keys(e).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(e,s[r]))return!1;for(r=n;r--!==0;){const o=s[r];if(!(o==="_owner"&&t.$$typeof)&&!qx(t[o],e[o]))return!1}return!0}return t!==t&&e!==e}function xK(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function oF(t,e){const n=xK(t);return Math.round(e*n)/n}function U6(t){const e=S.useRef(t);return qb(()=>{e.current=t}),e}function v1e(t){t===void 0&&(t={});const{placement:e="bottom",strategy:n="absolute",middleware:r=[],platform:s,elements:{reference:o,floating:i}={},transform:a=!0,whileElementsMounted:l,open:c}=t,[u,f]=S.useState({x:0,y:0,strategy:n,placement:e,middlewareData:{},isPositioned:!1}),[h,m]=S.useState(r);qx(h,r)||m(r);const[y,v]=S.useState(null),[b,w]=S.useState(null),C=S.useCallback($=>{$!==A.current&&(A.current=$,v($))},[]),k=S.useCallback($=>{$!==M.current&&(M.current=$,w($))},[]),E=o||y,j=i||b,A=S.useRef(null),M=S.useRef(null),_=S.useRef(u),D=l!=null,R=U6(l),N=U6(s),z=U6(c),B=S.useCallback(()=>{if(!A.current||!M.current)return;const $={placement:e,strategy:n,middleware:h};N.current&&($.platform=N.current),Aj(A.current,M.current,$).then(V=>{const q={...V,isPositioned:z.current!==!1};L.current&&!qx(_.current,q)&&(_.current=q,Xo.flushSync(()=>{f(q)}))})},[h,e,n,N,z]);qb(()=>{c===!1&&_.current.isPositioned&&(_.current.isPositioned=!1,f($=>({...$,isPositioned:!1})))},[c]);const L=S.useRef(!1);qb(()=>(L.current=!0,()=>{L.current=!1}),[]),qb(()=>{if(E&&(A.current=E),j&&(M.current=j),E&&j){if(R.current)return R.current(E,j,B);B()}},[E,j,B,R,D]);const P=S.useMemo(()=>({reference:A,floating:M,setReference:C,setFloating:k}),[C,k]),I=S.useMemo(()=>({reference:E,floating:j}),[E,j]),H=S.useMemo(()=>{const $={position:n,left:0,top:0};if(!I.floating)return $;const V=oF(I.floating,u.x),q=oF(I.floating,u.y);return a?{...$,transform:"translate("+V+"px, "+q+"px)",...xK(I.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:V,top:q}},[n,a,I.floating,u.x,u.y]);return S.useMemo(()=>({...u,update:B,refs:P,elements:I,floatingStyles:H}),[u,B,P,I,H])}const b1e=t=>{function e(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:t,fn(n){const{element:r,padding:s}=typeof t=="function"?t(n):t;return r&&e(r)?r.current!=null?Vx({element:r.current,padding:s}).fn(n):{}:r?Vx({element:r,padding:s}).fn(n):{}}}},wK=(t,e)=>({...Cj(t),options:[t,e]}),_j=(t,e)=>({...kj(t),options:[t,e]}),iF=(t,e)=>({...m1e(t),options:[t,e]}),Wx=(t,e)=>({...Ej(t),options:[t,e]}),x1e=(t,e)=>({...Tj(t),options:[t,e]}),w1e=(t,e)=>({...Mj(t),options:[t,e]}),P0=(t,e)=>({...jj(t),options:[t,e]}),SK=(t,e)=>({...b1e(t),options:[t,e]});function CK(t){const e=S.useRef(void 0),n=S.useCallback(r=>{const s=t.map(o=>{if(o!=null){if(typeof o=="function"){const i=o,a=i(r);return typeof a=="function"?a:()=>{i(null)}}return o.current=r,()=>{o.current=null}}});return()=>{s.forEach(o=>o==null?void 0:o())}},t);return S.useMemo(()=>t.every(r=>r==null)?null:r=>{e.current&&(e.current(),e.current=void 0),r!=null&&(e.current=n(r))},t)}const S1e="data-floating-ui-focusable",aF="active",lF="selected",C1e={...lg};let cF=!1,k1e=0;const uF=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+k1e++;function E1e(){const[t,e]=S.useState(()=>cF?uF():void 0);return vl(()=>{t==null&&e(uF())},[]),S.useEffect(()=>{cF=!0},[]),t}const T1e=C1e.useId,kK=T1e||E1e;function M1e(){const t=new Map;return{emit(e,n){var r;(r=t.get(e))==null||r.forEach(s=>s(n))},on(e,n){t.has(e)||t.set(e,new Set),t.get(e).add(n)},off(e,n){var r;(r=t.get(e))==null||r.delete(n)}}}const j1e=S.createContext(null),A1e=S.createContext(null),Rj=()=>{var t;return((t=S.useContext(j1e))==null?void 0:t.id)||null},Dj=()=>S.useContext(A1e);function Ij(t){return"data-floating-ui-"+t}function zi(t){t.current!==-1&&(clearTimeout(t.current),t.current=-1)}const dF=Ij("safe-polygon");function Wb(t,e,n){if(n&&!OE(n))return 0;if(typeof t=="number")return t;if(typeof t=="function"){const r=t();return typeof r=="number"?r:r==null?void 0:r[e]}return t==null?void 0:t[e]}function V6(t){return typeof t=="function"?t():t}function EK(t,e){e===void 0&&(e={});const{open:n,onOpenChange:r,dataRef:s,events:o,elements:i}=t,{enabled:a=!0,delay:l=0,handleClose:c=null,mouseOnly:u=!1,restMs:f=0,move:h=!0}=e,m=Dj(),y=Rj(),v=Nv(c),b=Nv(l),w=Nv(n),C=Nv(f),k=S.useRef(),E=S.useRef(-1),j=S.useRef(),A=S.useRef(-1),M=S.useRef(!0),_=S.useRef(!1),D=S.useRef(()=>{}),R=S.useRef(!1),N=cl(()=>{var H;const $=(H=s.current.openEvent)==null?void 0:H.type;return($==null?void 0:$.includes("mouse"))&&$!=="mousedown"});S.useEffect(()=>{if(!a)return;function H($){let{open:V}=$;V||(zi(E),zi(A),M.current=!0,R.current=!1)}return o.on("openchange",H),()=>{o.off("openchange",H)}},[a,o]),S.useEffect(()=>{if(!a||!v.current||!n)return;function H(V){N()&&r(!1,V,"hover")}const $=hf(i.floating).documentElement;return $.addEventListener("mouseleave",H),()=>{$.removeEventListener("mouseleave",H)}},[i.floating,n,r,a,v,N]);const z=S.useCallback(function(H,$,V){$===void 0&&($=!0),V===void 0&&(V="hover");const q=Wb(b.current,"close",k.current);q&&!j.current?(zi(E),E.current=window.setTimeout(()=>r(!1,H,V),q)):$&&(zi(E),r(!1,H,V))},[b,r]),B=cl(()=>{D.current(),j.current=void 0}),L=cl(()=>{if(_.current){const H=hf(i.floating).body;H.style.pointerEvents="",H.removeAttribute(dF),_.current=!1}}),P=cl(()=>s.current.openEvent?["click","mousedown"].includes(s.current.openEvent.type):!1);S.useEffect(()=>{if(!a)return;function H(W){if(zi(E),M.current=!1,u&&!OE(k.current)||V6(C.current)>0&&!Wb(b.current,"open"))return;const Y=Wb(b.current,"open",k.current);Y?E.current=window.setTimeout(()=>{w.current||r(!0,W,"hover")},Y):n||r(!0,W,"hover")}function $(W){if(P()){L();return}D.current();const Y=hf(i.floating);if(zi(A),R.current=!1,v.current&&s.current.floatingContext){n||zi(E),j.current=v.current({...s.current.floatingContext,tree:m,x:W.clientX,y:W.clientY,onClose(){L(),B(),P()||z(W,!0,"safe-polygon")}});const K=j.current;Y.addEventListener("mousemove",K),D.current=()=>{Y.removeEventListener("mousemove",K)};return}(k.current==="touch"?!mg(i.floating,W.relatedTarget):!0)&&z(W)}function V(W){P()||s.current.floatingContext&&(v.current==null||v.current({...s.current.floatingContext,tree:m,x:W.clientX,y:W.clientY,onClose(){L(),B(),P()||z(W)}})(W))}function q(){zi(E)}function U(W){P()||z(W,!1)}if(Ir(i.domReference)){const W=i.domReference,Y=i.floating;return n&&W.addEventListener("mouseleave",V),h&&W.addEventListener("mousemove",H,{once:!0}),W.addEventListener("mouseenter",H),W.addEventListener("mouseleave",$),Y&&(Y.addEventListener("mouseleave",V),Y.addEventListener("mouseenter",q),Y.addEventListener("mouseleave",U)),()=>{n&&W.removeEventListener("mouseleave",V),h&&W.removeEventListener("mousemove",H),W.removeEventListener("mouseenter",H),W.removeEventListener("mouseleave",$),Y&&(Y.removeEventListener("mouseleave",V),Y.removeEventListener("mouseenter",q),Y.removeEventListener("mouseleave",U))}}},[i,a,t,u,h,z,B,L,r,n,w,m,b,v,s,P,C]),vl(()=>{var H;if(a&&n&&(H=v.current)!=null&&(H=H.__options)!=null&&H.blockPointerEvents&&N()){_.current=!0;const V=i.floating;if(Ir(i.domReference)&&V){var $;const q=hf(i.floating).body;q.setAttribute(dF,"");const U=i.domReference,W=m==null||($=m.nodesRef.current.find(Y=>Y.id===y))==null||($=$.context)==null?void 0:$.elements.floating;return W&&(W.style.pointerEvents=""),q.style.pointerEvents="none",U.style.pointerEvents="auto",V.style.pointerEvents="auto",()=>{q.style.pointerEvents="",U.style.pointerEvents="",V.style.pointerEvents=""}}}},[a,n,y,i,m,v,N]),vl(()=>{n||(k.current=void 0,R.current=!1,B(),L())},[n,B,L]),S.useEffect(()=>()=>{B(),zi(E),zi(A),L()},[a,i.domReference,B,L]);const I=S.useMemo(()=>{function H($){k.current=$.pointerType}return{onPointerDown:H,onPointerEnter:H,onMouseMove($){const{nativeEvent:V}=$;function q(){!M.current&&!w.current&&r(!0,V,"hover")}u&&!OE(k.current)||n||V6(C.current)===0||R.current&&$.movementX**2+$.movementY**2<2||(zi(A),k.current==="touch"?q():(R.current=!0,A.current=window.setTimeout(q,V6(C.current))))}}},[u,r,n,w,C]);return S.useMemo(()=>a?{reference:I}:{},[a,I])}const LE=()=>{},TK=S.createContext({delay:0,initialDelay:0,timeoutMs:0,currentId:null,setCurrentId:LE,setState:LE,isInstantPhase:!1}),_1e=()=>S.useContext(TK);function MK(t){const{children:e,delay:n,timeoutMs:r=0}=t,[s,o]=S.useReducer((l,c)=>({...l,...c}),{delay:n,timeoutMs:r,initialDelay:n,currentId:null,isInstantPhase:!1}),i=S.useRef(null),a=S.useCallback(l=>{o({currentId:l})},[]);return vl(()=>{s.currentId?i.current===null?i.current=s.currentId:s.isInstantPhase||o({isInstantPhase:!0}):(s.isInstantPhase&&o({isInstantPhase:!1}),i.current=null)},[s.currentId,s.isInstantPhase]),d.jsx(TK.Provider,{value:S.useMemo(()=>({...s,setState:o,setCurrentId:a}),[s,a]),children:e})}function jK(t,e){e===void 0&&(e={});const{open:n,onOpenChange:r,floatingId:s}=t,{id:o,enabled:i=!0}=e,a=o??s,l=_1e(),{currentId:c,setCurrentId:u,initialDelay:f,setState:h,timeoutMs:m}=l;return vl(()=>{i&&c&&(h({delay:{open:1,close:Wb(f,"close")}}),c!==a&&r(!1))},[i,a,r,h,c,f]),vl(()=>{function y(){r(!1),h({delay:f,currentId:null})}if(i&&c&&!n&&c===a){if(m){const v=window.setTimeout(y,m);return()=>{clearTimeout(v)}}y()}},[i,n,h,c,a,r,f,m]),vl(()=>{i&&(u===LE||!n||u(a))},[i,n,u,a]),l}const R1e={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},D1e={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},fF=t=>{var e,n;return{escapeKey:typeof t=="boolean"?t:(e=t==null?void 0:t.escapeKey)!=null?e:!1,outsidePress:typeof t=="boolean"?t:(n=t==null?void 0:t.outsidePress)!=null?n:!0}};function AK(t,e){e===void 0&&(e={});const{open:n,onOpenChange:r,elements:s,dataRef:o}=t,{enabled:i=!0,escapeKey:a=!0,outsidePress:l=!0,outsidePressEvent:c="pointerdown",referencePress:u=!1,referencePressEvent:f="pointerdown",ancestorScroll:h=!1,bubbles:m,capture:y}=e,v=Dj(),b=cl(typeof l=="function"?l:()=>!1),w=typeof l=="function"?b:l,C=S.useRef(!1),{escapeKey:k,outsidePress:E}=fF(m),{escapeKey:j,outsidePress:A}=fF(y),M=S.useRef(!1),_=cl(L=>{var P;if(!n||!i||!a||L.key!=="Escape"||M.current)return;const I=(P=o.current.floatingContext)==null?void 0:P.nodeId,H=v?Vb(v.nodesRef.current,I):[];if(!k&&(L.stopPropagation(),H.length>0)){let $=!0;if(H.forEach(V=>{var q;if((q=V.context)!=null&&q.open&&!V.context.dataRef.current.__escapeKeyBubbles){$=!1;return}}),!$)return}r(!1,Ime(L)?L.nativeEvent:L,"escape-key")}),D=cl(L=>{var P;const I=()=>{var H;_(L),(H=mh(L))==null||H.removeEventListener("keydown",I)};(P=mh(L))==null||P.addEventListener("keydown",I)}),R=cl(L=>{var P;const I=o.current.insideReactTree;o.current.insideReactTree=!1;const H=C.current;if(C.current=!1,c==="click"&&H||I||typeof w=="function"&&!w(L))return;const $=mh(L),V="["+Ij("inert")+"]",q=hf(s.floating).querySelectorAll(V);let U=Ir($)?$:null;for(;U&&!mc(U);){const K=Mc(U);if(mc(K)||!Ir(K))break;U=K}if(q.length&&Ir($)&&!Ame($)&&!mg($,s.floating)&&Array.from(q).every(K=>!mg(U,K)))return;if(Si($)&&B){const K=mc($),Q=ta($),Z=/auto|scroll/,J=K||Z.test(Q.overflowX),ne=K||Z.test(Q.overflowY),se=J&&$.clientWidth>0&&$.scrollWidth>$.clientWidth,ce=ne&&$.clientHeight>0&&$.scrollHeight>$.clientHeight,fe=Q.direction==="rtl",le=ce&&(fe?L.offsetX<=$.offsetWidth-$.clientWidth:L.offsetX>$.clientWidth),be=se&&L.offsetY>$.clientHeight;if(le||be)return}const W=(P=o.current.floatingContext)==null?void 0:P.nodeId,Y=v&&Vb(v.nodesRef.current,W).some(K=>{var Q;return B6(L,(Q=K.context)==null?void 0:Q.elements.floating)});if(B6(L,s.floating)||B6(L,s.domReference)||Y)return;const G=v?Vb(v.nodesRef.current,W):[];if(G.length>0){let K=!0;if(G.forEach(Q=>{var Z;if((Z=Q.context)!=null&&Z.open&&!Q.context.dataRef.current.__outsidePressBubbles){K=!1;return}}),!K)return}r(!1,L,"outside-press")}),N=cl(L=>{var P;const I=()=>{var H;R(L),(H=mh(L))==null||H.removeEventListener(c,I)};(P=mh(L))==null||P.addEventListener(c,I)});S.useEffect(()=>{if(!n||!i)return;o.current.__escapeKeyBubbles=k,o.current.__outsidePressBubbles=E;let L=-1;function P(q){r(!1,q,"ancestor-scroll")}function I(){window.clearTimeout(L),M.current=!0}function H(){L=window.setTimeout(()=>{M.current=!1},Qw()?5:0)}const $=hf(s.floating);a&&($.addEventListener("keydown",j?D:_,j),$.addEventListener("compositionstart",I),$.addEventListener("compositionend",H)),w&&$.addEventListener(c,A?N:R,A);let V=[];return h&&(Ir(s.domReference)&&(V=gc(s.domReference)),Ir(s.floating)&&(V=V.concat(gc(s.floating))),!Ir(s.reference)&&s.reference&&s.reference.contextElement&&(V=V.concat(gc(s.reference.contextElement)))),V=V.filter(q=>{var U;return q!==((U=$.defaultView)==null?void 0:U.visualViewport)}),V.forEach(q=>{q.addEventListener("scroll",P,{passive:!0})}),()=>{a&&($.removeEventListener("keydown",j?D:_,j),$.removeEventListener("compositionstart",I),$.removeEventListener("compositionend",H)),w&&$.removeEventListener(c,A?N:R,A),V.forEach(q=>{q.removeEventListener("scroll",P)}),window.clearTimeout(L)}},[o,s,a,w,c,n,r,h,i,k,E,_,j,D,R,A,N]),S.useEffect(()=>{o.current.insideReactTree=!1},[o,w,c]);const z=S.useMemo(()=>({onKeyDown:_,...u&&{[R1e[f]]:L=>{r(!1,L.nativeEvent,"reference-press")},...f!=="click"&&{onClick(L){r(!1,L.nativeEvent,"reference-press")}}}}),[_,r,u,f]),B=S.useMemo(()=>({onKeyDown:_,onMouseDown(){C.current=!0},onMouseUp(){C.current=!0},[D1e[c]]:()=>{o.current.insideReactTree=!0}}),[_,c,o]);return S.useMemo(()=>i?{reference:z,floating:B}:{},[i,z,B])}function I1e(t){const{open:e=!1,onOpenChange:n,elements:r}=t,s=kK(),o=S.useRef({}),[i]=S.useState(()=>M1e()),a=Rj()!=null,[l,c]=S.useState(r.reference),u=cl((m,y,v)=>{o.current.openEvent=m?y:void 0,i.emit("openchange",{open:m,event:y,reason:v,nested:a}),n==null||n(m,y,v)}),f=S.useMemo(()=>({setPositionReference:c}),[]),h=S.useMemo(()=>({reference:l||r.reference||null,floating:r.floating||null,domReference:r.reference}),[l,r.reference,r.floating]);return S.useMemo(()=>({dataRef:o,open:e,onOpenChange:u,elements:h,events:i,floatingId:s,refs:f}),[e,u,h,i,s,f])}function t4(t){t===void 0&&(t={});const{nodeId:e}=t,n=I1e({...t,elements:{reference:null,floating:null,...t.elements}}),r=t.rootContext||n,s=r.elements,[o,i]=S.useState(null),[a,l]=S.useState(null),u=(s==null?void 0:s.domReference)||o,f=S.useRef(null),h=Dj();vl(()=>{u&&(f.current=u)},[u]);const m=v1e({...t,elements:{...s,...a&&{reference:a}}}),y=S.useCallback(k=>{const E=Ir(k)?{getBoundingClientRect:()=>k.getBoundingClientRect(),getClientRects:()=>k.getClientRects(),contextElement:k}:k;l(E),m.refs.setReference(E)},[m.refs]),v=S.useCallback(k=>{(Ir(k)||k===null)&&(f.current=k,i(k)),(Ir(m.refs.reference.current)||m.refs.reference.current===null||k!==null&&!Ir(k))&&m.refs.setReference(k)},[m.refs]),b=S.useMemo(()=>({...m.refs,setReference:v,setPositionReference:y,domReference:f}),[m.refs,v,y]),w=S.useMemo(()=>({...m.elements,domReference:u}),[m.elements,u]),C=S.useMemo(()=>({...m,...r,refs:b,elements:w,nodeId:e}),[m,b,w,e,r]);return vl(()=>{r.dataRef.current.floatingContext=C;const k=h==null?void 0:h.nodesRef.current.find(E=>E.id===e);k&&(k.context=C)}),S.useMemo(()=>({...m,context:C,refs:b,elements:w}),[m,b,w,C])}function q6(){return Tme()&&Eme()}function O1e(t,e){e===void 0&&(e={});const{open:n,onOpenChange:r,events:s,dataRef:o,elements:i}=t,{enabled:a=!0,visibleOnly:l=!0}=e,c=S.useRef(!1),u=S.useRef(-1),f=S.useRef(!0);S.useEffect(()=>{if(!a)return;const m=Qo(i.domReference);function y(){!n&&Si(i.domReference)&&i.domReference===Q$(hf(i.domReference))&&(c.current=!0)}function v(){f.current=!0}function b(){f.current=!1}return m.addEventListener("blur",y),q6()&&(m.addEventListener("keydown",v,!0),m.addEventListener("pointerdown",b,!0)),()=>{m.removeEventListener("blur",y),q6()&&(m.removeEventListener("keydown",v,!0),m.removeEventListener("pointerdown",b,!0))}},[i.domReference,n,a]),S.useEffect(()=>{if(!a)return;function m(y){let{reason:v}=y;(v==="reference-press"||v==="escape-key")&&(c.current=!0)}return s.on("openchange",m),()=>{s.off("openchange",m)}},[s,a]),S.useEffect(()=>()=>{zi(u)},[]);const h=S.useMemo(()=>({onMouseLeave(){c.current=!1},onFocus(m){if(c.current)return;const y=mh(m.nativeEvent);if(l&&Ir(y)){if(q6()&&!m.relatedTarget){if(!f.current&&!_me(y))return}else if(!Rme(y))return}r(!0,m.nativeEvent,"focus")},onBlur(m){c.current=!1;const y=m.relatedTarget,v=m.nativeEvent,b=Ir(y)&&y.hasAttribute(Ij("focus-guard"))&&y.getAttribute("data-type")==="outside";u.current=window.setTimeout(()=>{var w;const C=Q$(i.domReference?i.domReference.ownerDocument:document);!y&&C===i.domReference||mg((w=o.current.floatingContext)==null?void 0:w.refs.floating.current,C)||mg(i.domReference,C)||b||r(!1,v,"focus")})}}),[o,i.domReference,r,l]);return S.useMemo(()=>a?{reference:h}:{},[a,h])}function W6(t,e,n){const r=new Map,s=n==="item";let o=t;if(s&&t){const{[aF]:i,[lF]:a,...l}=t;o=l}return{...n==="floating"&&{tabIndex:-1,[S1e]:""},...o,...e.map(i=>{const a=i?i[n]:null;return typeof a=="function"?t?a(t):null:a}).concat(t).reduce((i,a)=>(a&&Object.entries(a).forEach(l=>{let[c,u]=l;if(!(s&&[aF,lF].includes(c)))if(c.indexOf("on")===0){if(r.has(c)||r.set(c,[]),typeof u=="function"){var f;(f=r.get(c))==null||f.push(u),i[c]=function(){for(var h,m=arguments.length,y=new Array(m),v=0;v<m;v++)y[v]=arguments[v];return(h=r.get(c))==null?void 0:h.map(b=>b(...y)).find(b=>b!==void 0)}}}else i[c]=u}),i),{})}}function _K(t){t===void 0&&(t=[]);const e=t.map(a=>a==null?void 0:a.reference),n=t.map(a=>a==null?void 0:a.floating),r=t.map(a=>a==null?void 0:a.item),s=S.useCallback(a=>W6(a,t,"reference"),e),o=S.useCallback(a=>W6(a,t,"floating"),n),i=S.useCallback(a=>W6(a,t,"item"),r);return S.useMemo(()=>({getReferenceProps:s,getFloatingProps:o,getItemProps:i}),[s,o,i])}const N1e=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function RK(t,e){var n,r;e===void 0&&(e={});const{open:s,elements:o,floatingId:i}=t,{enabled:a=!0,role:l="dialog"}=e,c=kK(),u=((n=o.domReference)==null?void 0:n.id)||c,f=S.useMemo(()=>{var C;return((C=Dme(o.floating))==null?void 0:C.id)||i},[o.floating,i]),h=(r=N1e.get(l))!=null?r:l,y=Rj()!=null,v=S.useMemo(()=>h==="tooltip"||l==="label"?{["aria-"+(l==="label"?"labelledby":"describedby")]:s?f:void 0}:{"aria-expanded":s?"true":"false","aria-haspopup":h==="alertdialog"?"dialog":h,"aria-controls":s?f:void 0,...h==="listbox"&&{role:"combobox"},...h==="menu"&&{id:u},...h==="menu"&&y&&{role:"menuitem"},...l==="select"&&{"aria-autocomplete":"none"},...l==="combobox"&&{"aria-autocomplete":"list"}},[h,f,y,s,u,l]),b=S.useMemo(()=>{const C={id:f,...h&&{role:h}};return h==="tooltip"||l==="label"?C:{...C,...h==="menu"&&{"aria-labelledby":u}}},[h,f,u,l]),w=S.useCallback(C=>{let{active:k,selected:E}=C;const j={role:"option",...k&&{id:f+"-fui-option"}};switch(l){case"select":case"combobox":return{...j,"aria-selected":E}}return{}},[f,l]);return S.useMemo(()=>a?{reference:v,floating:b,item:w}:{},[a,v,b,w])}var Oj={root:"m_d57069b5",content:"m_b1336c6",viewport:"m_c0783ff9",viewportInner:"m_f8f631dd",scrollbar:"m_c44ba933",thumb:"m_d8b5e363",corner:"m_21657268"};const[L1e,ia]=zs("ScrollArea.Root component was not found in tree");function Wh(t,e){const n=uf(e);yd(()=>{let r=0;if(t){const s=new ResizeObserver(()=>{cancelAnimationFrame(r),r=window.requestAnimationFrame(n)});return s.observe(t),()=>{window.cancelAnimationFrame(r),s.unobserve(t)}}},[t,n])}const $1e=S.forwardRef((t,e)=>{const{style:n,...r}=t,s=ia(),[o,i]=S.useState(0),[a,l]=S.useState(0),c=!!(o&&a);return Wh(s.scrollbarX,()=>{var f;const u=((f=s.scrollbarX)==null?void 0:f.offsetHeight)||0;s.onCornerHeightChange(u),l(u)}),Wh(s.scrollbarY,()=>{var f;const u=((f=s.scrollbarY)==null?void 0:f.offsetWidth)||0;s.onCornerWidthChange(u),i(u)}),c?d.jsx("div",{...r,ref:e,style:{...n,width:o,height:a}}):null}),F1e=S.forwardRef((t,e)=>{const n=ia(),r=!!(n.scrollbarX&&n.scrollbarY);return n.type!=="scroll"&&r?d.jsx($1e,{...t,ref:e}):null}),z1e={scrollHideDelay:1e3,type:"hover"},DK=S.forwardRef((t,e)=>{const{type:n,scrollHideDelay:r,scrollbars:s,getStyles:o,...i}=we("ScrollAreaRoot",z1e,t),[a,l]=S.useState(null),[c,u]=S.useState(null),[f,h]=S.useState(null),[m,y]=S.useState(null),[v,b]=S.useState(null),[w,C]=S.useState(0),[k,E]=S.useState(0),[j,A]=S.useState(!1),[M,_]=S.useState(!1),D=Vr(e,R=>l(R));return d.jsx(L1e,{value:{type:n,scrollHideDelay:r,scrollArea:a,viewport:c,onViewportChange:u,content:f,onContentChange:h,scrollbarX:m,onScrollbarXChange:y,scrollbarXEnabled:j,onScrollbarXEnabledChange:A,scrollbarY:v,onScrollbarYChange:b,scrollbarYEnabled:M,onScrollbarYEnabledChange:_,onCornerWidthChange:C,onCornerHeightChange:E,getStyles:o},children:d.jsx(ie,{...i,ref:D,__vars:{"--sa-corner-width":s!=="xy"?"0px":`${w}px`,"--sa-corner-height":s!=="xy"?"0px":`${k}px`}})})});DK.displayName="@mantine/core/ScrollAreaRoot";function IK(t,e){const n=t/e;return Number.isNaN(n)?0:n}function n4(t){const e=IK(t.viewport,t.content),n=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,r=(t.scrollbar.size-n)*e;return Math.max(r,18)}function OK(t,e){return n=>{if(t[0]===t[1]||e[0]===e[1])return e[0];const r=(e[1]-e[0])/(t[1]-t[0]);return e[0]+r*(n-t[0])}}function P1e(t,[e,n]){return Math.min(n,Math.max(e,t))}function pF(t,e,n="ltr"){const r=n4(e),s=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,o=e.scrollbar.size-s,i=e.content-e.viewport,a=o-r,l=n==="ltr"?[0,i]:[i*-1,0],c=P1e(t,l);return OK([0,i],[0,a])(c)}function B1e(t,e,n,r="ltr"){const s=n4(n),o=s/2,i=e||o,a=s-i,l=n.scrollbar.paddingStart+i,c=n.scrollbar.size-n.scrollbar.paddingEnd-a,u=n.content-n.viewport,f=r==="ltr"?[0,u]:[u*-1,0];return OK([l,c],f)(t)}function NK(t,e){return t>0&&t<e}function Uu(t){return t?parseInt(t,10):0}function wf(t,e,{checkForDefaultPrevented:n=!0}={}){return r=>{t==null||t(r),(n===!1||!r.defaultPrevented)&&(e==null||e(r))}}const[H1e,LK]=zs("ScrollAreaScrollbar was not found in tree"),$K=S.forwardRef((t,e)=>{const{sizes:n,hasThumb:r,onThumbChange:s,onThumbPointerUp:o,onThumbPointerDown:i,onThumbPositionChange:a,onDragScroll:l,onWheelScroll:c,onResize:u,...f}=t,h=ia(),[m,y]=S.useState(null),v=Vr(e,_=>y(_)),b=S.useRef(null),w=S.useRef(""),{viewport:C}=h,k=n.content-n.viewport,E=uf(c),j=uf(a),A=Uw(u,10),M=_=>{if(b.current){const D=_.clientX-b.current.left,R=_.clientY-b.current.top;l({x:D,y:R})}};return S.useEffect(()=>{const _=D=>{const R=D.target;(m==null?void 0:m.contains(R))&&E(D,k)};return document.addEventListener("wheel",_,{passive:!1}),()=>document.removeEventListener("wheel",_,{passive:!1})},[C,m,k,E]),S.useEffect(j,[n,j]),Wh(m,A),Wh(h.content,A),d.jsx(H1e,{value:{scrollbar:m,hasThumb:r,onThumbChange:uf(s),onThumbPointerUp:uf(o),onThumbPositionChange:j,onThumbPointerDown:uf(i)},children:d.jsx("div",{...f,ref:v,"data-mantine-scrollbar":!0,style:{position:"absolute",...f.style},onPointerDown:wf(t.onPointerDown,_=>{_.preventDefault(),_.button===0&&(_.target.setPointerCapture(_.pointerId),b.current=m.getBoundingClientRect(),w.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",M(_))}),onPointerMove:wf(t.onPointerMove,M),onPointerUp:wf(t.onPointerUp,_=>{const D=_.target;D.hasPointerCapture(_.pointerId)&&(_.preventDefault(),D.releasePointerCapture(_.pointerId))}),onLostPointerCapture:()=>{document.body.style.webkitUserSelect=w.current,b.current=null}})})}),FK=S.forwardRef((t,e)=>{const{sizes:n,onSizesChange:r,style:s,...o}=t,i=ia(),[a,l]=S.useState(),c=S.useRef(null),u=Vr(e,c,i.onScrollbarXChange);return S.useEffect(()=>{c.current&&l(getComputedStyle(c.current))},[c]),d.jsx($K,{"data-orientation":"horizontal",...o,ref:u,sizes:n,style:{...s,"--sa-thumb-width":`${n4(n)}px`},onThumbPointerDown:f=>t.onThumbPointerDown(f.x),onDragScroll:f=>t.onDragScroll(f.x),onWheelScroll:(f,h)=>{if(i.viewport){const m=i.viewport.scrollLeft+f.deltaX;t.onWheelScroll(m),NK(m,h)&&f.preventDefault()}},onResize:()=>{c.current&&i.viewport&&a&&r({content:i.viewport.scrollWidth,viewport:i.viewport.offsetWidth,scrollbar:{size:c.current.clientWidth,paddingStart:Uu(a.paddingLeft),paddingEnd:Uu(a.paddingRight)}})}})});FK.displayName="@mantine/core/ScrollAreaScrollbarX";const zK=S.forwardRef((t,e)=>{const{sizes:n,onSizesChange:r,style:s,...o}=t,i=ia(),[a,l]=S.useState(),c=S.useRef(null),u=Vr(e,c,i.onScrollbarYChange);return S.useEffect(()=>{c.current&&l(window.getComputedStyle(c.current))},[]),d.jsx($K,{...o,"data-orientation":"vertical",ref:u,sizes:n,style:{"--sa-thumb-height":`${n4(n)}px`,...s},onThumbPointerDown:f=>t.onThumbPointerDown(f.y),onDragScroll:f=>t.onDragScroll(f.y),onWheelScroll:(f,h)=>{if(i.viewport){const m=i.viewport.scrollTop+f.deltaY;t.onWheelScroll(m),NK(m,h)&&f.preventDefault()}},onResize:()=>{c.current&&i.viewport&&a&&r({content:i.viewport.scrollHeight,viewport:i.viewport.offsetHeight,scrollbar:{size:c.current.clientHeight,paddingStart:Uu(a.paddingTop),paddingEnd:Uu(a.paddingBottom)}})}})});zK.displayName="@mantine/core/ScrollAreaScrollbarY";const r4=S.forwardRef((t,e)=>{const{orientation:n="vertical",...r}=t,{dir:s}=$c(),o=ia(),i=S.useRef(null),a=S.useRef(0),[l,c]=S.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),u=IK(l.viewport,l.content),f={...r,sizes:l,onSizesChange:c,hasThumb:u>0&&u<1,onThumbChange:m=>{i.current=m},onThumbPointerUp:()=>{a.current=0},onThumbPointerDown:m=>{a.current=m}},h=(m,y)=>B1e(m,a.current,l,y);return n==="horizontal"?d.jsx(FK,{...f,ref:e,onThumbPositionChange:()=>{if(o.viewport&&i.current){const m=o.viewport.scrollLeft,y=pF(m,l,s);i.current.style.transform=`translate3d(${y}px, 0, 0)`}},onWheelScroll:m=>{o.viewport&&(o.viewport.scrollLeft=m)},onDragScroll:m=>{o.viewport&&(o.viewport.scrollLeft=h(m,s))}}):n==="vertical"?d.jsx(zK,{...f,ref:e,onThumbPositionChange:()=>{if(o.viewport&&i.current){const m=o.viewport.scrollTop,y=pF(m,l);l.scrollbar.size===0?i.current.style.setProperty("--thumb-opacity","0"):i.current.style.setProperty("--thumb-opacity","1"),i.current.style.transform=`translate3d(0, ${y}px, 0)`}},onWheelScroll:m=>{o.viewport&&(o.viewport.scrollTop=m)},onDragScroll:m=>{o.viewport&&(o.viewport.scrollTop=h(m))}}):null});r4.displayName="@mantine/core/ScrollAreaScrollbarVisible";const Nj=S.forwardRef((t,e)=>{const n=ia(),{forceMount:r,...s}=t,[o,i]=S.useState(!1),a=t.orientation==="horizontal",l=Uw(()=>{if(n.viewport){const c=n.viewport.offsetWidth<n.viewport.scrollWidth,u=n.viewport.offsetHeight<n.viewport.scrollHeight;i(a?c:u)}},10);return Wh(n.viewport,l),Wh(n.content,l),r||o?d.jsx(r4,{"data-state":o?"visible":"hidden",...s,ref:e}):null});Nj.displayName="@mantine/core/ScrollAreaScrollbarAuto";const PK=S.forwardRef((t,e)=>{const{forceMount:n,...r}=t,s=ia(),[o,i]=S.useState(!1);return S.useEffect(()=>{const{scrollArea:a}=s;let l=0;if(a){const c=()=>{window.clearTimeout(l),i(!0)},u=()=>{l=window.setTimeout(()=>i(!1),s.scrollHideDelay)};return a.addEventListener("pointerenter",c),a.addEventListener("pointerleave",u),()=>{window.clearTimeout(l),a.removeEventListener("pointerenter",c),a.removeEventListener("pointerleave",u)}}},[s.scrollArea,s.scrollHideDelay]),n||o?d.jsx(Nj,{"data-state":o?"visible":"hidden",...r,ref:e}):null});PK.displayName="@mantine/core/ScrollAreaScrollbarHover";const U1e=S.forwardRef((t,e)=>{const{forceMount:n,...r}=t,s=ia(),o=t.orientation==="horizontal",[i,a]=S.useState("hidden"),l=Uw(()=>a("idle"),100);return S.useEffect(()=>{if(i==="idle"){const c=window.setTimeout(()=>a("hidden"),s.scrollHideDelay);return()=>window.clearTimeout(c)}},[i,s.scrollHideDelay]),S.useEffect(()=>{const{viewport:c}=s,u=o?"scrollLeft":"scrollTop";if(c){let f=c[u];const h=()=>{const m=c[u];f!==m&&(a("scrolling"),l()),f=m};return c.addEventListener("scroll",h),()=>c.removeEventListener("scroll",h)}},[s.viewport,o,l]),n||i!=="hidden"?d.jsx(r4,{"data-state":i==="hidden"?"hidden":"visible",...r,ref:e,onPointerEnter:wf(t.onPointerEnter,()=>a("interacting")),onPointerLeave:wf(t.onPointerLeave,()=>a("idle"))}):null}),$E=S.forwardRef((t,e)=>{const{forceMount:n,...r}=t,s=ia(),{onScrollbarXEnabledChange:o,onScrollbarYEnabledChange:i}=s,a=t.orientation==="horizontal";return S.useEffect(()=>(a?o(!0):i(!0),()=>{a?o(!1):i(!1)}),[a,o,i]),s.type==="hover"?d.jsx(PK,{...r,ref:e,forceMount:n}):s.type==="scroll"?d.jsx(U1e,{...r,ref:e,forceMount:n}):s.type==="auto"?d.jsx(Nj,{...r,ref:e,forceMount:n}):s.type==="always"?d.jsx(r4,{...r,ref:e}):null});$E.displayName="@mantine/core/ScrollAreaScrollbar";function V1e(t,e=()=>{}){let n={left:t.scrollLeft,top:t.scrollTop},r=0;return(function s(){const o={left:t.scrollLeft,top:t.scrollTop},i=n.left!==o.left,a=n.top!==o.top;(i||a)&&e(),n=o,r=window.requestAnimationFrame(s)})(),()=>window.cancelAnimationFrame(r)}const BK=S.forwardRef((t,e)=>{const{style:n,...r}=t,s=ia(),o=LK(),{onThumbPositionChange:i}=o,a=Vr(e,u=>o.onThumbChange(u)),l=S.useRef(void 0),c=Uw(()=>{l.current&&(l.current(),l.current=void 0)},100);return S.useEffect(()=>{const{viewport:u}=s;if(u){const f=()=>{if(c(),!l.current){const h=V1e(u,i);l.current=h,i()}};return i(),u.addEventListener("scroll",f),()=>u.removeEventListener("scroll",f)}},[s.viewport,c,i]),d.jsx("div",{"data-state":o.hasThumb?"visible":"hidden",...r,ref:a,style:{width:"var(--sa-thumb-width)",height:"var(--sa-thumb-height)",...n},onPointerDownCapture:wf(t.onPointerDownCapture,u=>{const h=u.target.getBoundingClientRect(),m=u.clientX-h.left,y=u.clientY-h.top;o.onThumbPointerDown({x:m,y})}),onPointerUp:wf(t.onPointerUp,o.onThumbPointerUp)})});BK.displayName="@mantine/core/ScrollAreaThumb";const FE=S.forwardRef((t,e)=>{const{forceMount:n,...r}=t,s=LK();return n||s.hasThumb?d.jsx(BK,{ref:e,...r}):null});FE.displayName="@mantine/core/ScrollAreaThumb";const HK=S.forwardRef(({children:t,style:e,onWheel:n,...r},s)=>{const o=ia(),i=Vr(s,o.onViewportChange),a=l=>{if(n==null||n(l),o.scrollbarXEnabled&&o.viewport&&l.shiftKey){const{scrollTop:c,scrollHeight:u,clientHeight:f,scrollWidth:h,clientWidth:m}=o.viewport,y=c<1,v=c>=u-f-1;h>m&&(y||v)&&l.stopPropagation()}};return d.jsx(ie,{...r,ref:i,onWheel:a,style:{overflowX:o.scrollbarXEnabled?"scroll":"hidden",overflowY:o.scrollbarYEnabled?"scroll":"hidden",...e},children:d.jsx("div",{...o.getStyles("content"),ref:o.onContentChange,children:t})})});HK.displayName="@mantine/core/ScrollAreaViewport";const UK={scrollHideDelay:1e3,type:"hover",scrollbars:"xy"},q1e=(t,{scrollbarSize:e,overscrollBehavior:n,scrollbars:r})=>{let s=n;return n&&r&&(r==="x"?s=`${n} auto`:r==="y"&&(s=`auto ${n}`)),{root:{"--scrollarea-scrollbar-size":Me(e),"--scrollarea-over-scroll-behavior":s}}},Jr=Be((t,e)=>{const n=we("ScrollArea",UK,t),{classNames:r,className:s,style:o,styles:i,unstyled:a,scrollbarSize:l,vars:c,type:u,scrollHideDelay:f,viewportProps:h,viewportRef:m,onScrollPositionChange:y,children:v,offsetScrollbars:b,scrollbars:w,onBottomReached:C,onTopReached:k,overscrollBehavior:E,attributes:j,...A}=n,[M,_]=S.useState(!1),[D,R]=S.useState(!1),[N,z]=S.useState(!1),B=Et({name:"ScrollArea",props:n,classes:Oj,className:s,style:o,classNames:r,styles:i,unstyled:a,attributes:j,vars:c,varsResolver:q1e}),L=S.useRef(null),P=CK([m,L]);return S.useEffect(()=>{if(!L.current||b!=="present")return;const I=L.current,H=new ResizeObserver(()=>{const{scrollHeight:$,clientHeight:V,scrollWidth:q,clientWidth:U}=I;R($>V),z(q>U)});return H.observe(I),()=>H.disconnect()},[L,b]),d.jsxs(DK,{getStyles:B,type:u==="never"?"always":u,scrollHideDelay:f,ref:e,scrollbars:w,...B("root"),...A,children:[d.jsx(HK,{...h,...B("viewport",{style:h==null?void 0:h.style}),ref:P,"data-offset-scrollbars":b===!0?"xy":b||void 0,"data-scrollbars":w||void 0,"data-horizontal-hidden":b==="present"&&!N?"true":void 0,"data-vertical-hidden":b==="present"&&!D?"true":void 0,onScroll:I=>{var q;(q=h==null?void 0:h.onScroll)==null||q.call(h,I),y==null||y({x:I.currentTarget.scrollLeft,y:I.currentTarget.scrollTop});const{scrollTop:H,scrollHeight:$,clientHeight:V}=I.currentTarget;H-($-V)>=-.8&&(C==null||C()),H===0&&(k==null||k())},children:v}),(w==="xy"||w==="x")&&d.jsx($E,{...B("scrollbar"),orientation:"horizontal","data-hidden":u==="never"||b==="present"&&!N?!0:void 0,forceMount:!0,onMouseEnter:()=>_(!0),onMouseLeave:()=>_(!1),children:d.jsx(FE,{...B("thumb")})}),(w==="xy"||w==="y")&&d.jsx($E,{...B("scrollbar"),orientation:"vertical","data-hidden":u==="never"||b==="present"&&!D?!0:void 0,forceMount:!0,onMouseEnter:()=>_(!0),onMouseLeave:()=>_(!1),children:d.jsx(FE,{...B("thumb")})}),d.jsx(F1e,{...B("corner"),"data-hovered":M||void 0,"data-hidden":u==="never"||void 0})]})});Jr.displayName="@mantine/core/ScrollArea";const Lj=Be((t,e)=>{const{children:n,classNames:r,styles:s,scrollbarSize:o,scrollHideDelay:i,type:a,dir:l,offsetScrollbars:c,overscrollBehavior:u,viewportRef:f,onScrollPositionChange:h,unstyled:m,variant:y,viewportProps:v,scrollbars:b,style:w,vars:C,onBottomReached:k,onTopReached:E,onOverflowChange:j,...A}=we("ScrollAreaAutosize",UK,t),M=S.useRef(null),_=CK([f,M]),[D,R]=S.useState(!1),N=S.useRef(!1);return S.useEffect(()=>{if(!j)return;const z=M.current;if(!z)return;const B=()=>{const P=z.scrollHeight>z.clientHeight;P!==D&&(N.current?j==null||j(P):(N.current=!0,P&&(j==null||j(!0))),R(P))};B();const L=new ResizeObserver(B);return L.observe(z),()=>L.disconnect()},[j,D]),d.jsx(ie,{...A,ref:e,style:[{display:"flex",overflow:"hidden"},w],children:d.jsx(ie,{style:{display:"flex",flexDirection:"column",flex:1,overflow:"hidden",...b==="y"&&{minWidth:0},...b==="x"&&{minHeight:0},...b==="xy"&&{minWidth:0,minHeight:0},...b===!1&&{minWidth:0,minHeight:0}},children:d.jsx(Jr,{classNames:r,styles:s,scrollHideDelay:i,scrollbarSize:o,type:a,dir:l,offsetScrollbars:c,overscrollBehavior:u,viewportRef:_,onScrollPositionChange:h,unstyled:m,variant:y,viewportProps:v,vars:C,scrollbars:b,onBottomReached:k,onTopReached:E,"data-autosize":"true",children:n})})})});Jr.classes=Oj;Lj.displayName="@mantine/core/ScrollAreaAutosize";Lj.classes=Oj;Jr.Autosize=Lj;var VK={root:"m_87cf2631"};const W1e={__staticSelector:"UnstyledButton"},En=us((t,e)=>{const n=we("UnstyledButton",W1e,t),{className:r,component:s="button",__staticSelector:o,unstyled:i,classNames:a,styles:l,style:c,attributes:u,...f}=n,h=Et({name:o,props:n,classes:VK,className:r,style:c,classNames:a,styles:l,unstyled:i,attributes:u});return d.jsx(ie,{...h("root",{focusable:!0}),component:s,ref:e,type:s==="button"?"button":void 0,...f})});En.classes=VK;En.displayName="@mantine/core/UnstyledButton";var qK={root:"m_515a97f8"};const $j=Be((t,e)=>{const n=we("VisuallyHidden",null,t),{classNames:r,className:s,style:o,styles:i,unstyled:a,vars:l,attributes:c,...u}=n,f=Et({name:"VisuallyHidden",classes:qK,props:n,className:s,style:o,classNames:r,styles:i,unstyled:a,attributes:c});return d.jsx(ie,{component:"span",ref:e,...f("root"),...u})});$j.classes=qK;$j.displayName="@mantine/core/VisuallyHidden";var WK={root:"m_1b7284a3"};const Y1e=(t,{radius:e,shadow:n})=>({root:{"--paper-radius":e===void 0?void 0:Wn(e),"--paper-shadow":cj(n)}}),xd=us((t,e)=>{const n=we("Paper",null,t),{classNames:r,className:s,style:o,styles:i,unstyled:a,withBorder:l,vars:c,radius:u,shadow:f,variant:h,mod:m,attributes:y,...v}=n,b=Et({name:"Paper",props:n,classes:WK,className:s,style:o,classNames:r,styles:i,unstyled:a,attributes:y,vars:c,varsResolver:Y1e});return d.jsx(ie,{ref:e,mod:[{"data-with-border":l},m],...b("root"),variant:h,...v})});xd.classes=WK;xd.displayName="@mantine/core/Paper";function hF(t,e,n,r){return t==="center"||r==="center"?{top:e}:t==="end"?{bottom:n}:t==="start"?{top:n}:{}}function mF(t,e,n,r,s){return t==="center"||r==="center"?{left:e}:t==="end"?{[s==="ltr"?"right":"left"]:n}:t==="start"?{[s==="ltr"?"left":"right"]:n}:{}}const G1e={bottom:"borderTopLeftRadius",left:"borderTopRightRadius",right:"borderBottomLeftRadius",top:"borderBottomRightRadius"};function K1e({position:t,arrowSize:e,arrowOffset:n,arrowRadius:r,arrowPosition:s,arrowX:o,arrowY:i,dir:a}){const[l,c="center"]=t.split("-"),u={width:e,height:e,transform:"rotate(45deg)",position:"absolute",[G1e[l]]:r},f=-e/2;return l==="left"?{...u,...hF(c,i,n,s),right:f,borderLeftColor:"transparent",borderBottomColor:"transparent",clipPath:"polygon(100% 0, 0 0, 100% 100%)"}:l==="right"?{...u,...hF(c,i,n,s),left:f,borderRightColor:"transparent",borderTopColor:"transparent",clipPath:"polygon(0 100%, 0 0, 100% 100%)"}:l==="top"?{...u,...mF(c,o,n,s,a),bottom:f,borderTopColor:"transparent",borderLeftColor:"transparent",clipPath:"polygon(0 100%, 100% 100%, 100% 0)"}:l==="bottom"?{...u,...mF(c,o,n,s,a),top:f,borderBottomColor:"transparent",borderRightColor:"transparent",clipPath:"polygon(0 100%, 0 0, 100% 0)"}:{}}const Yx=S.forwardRef(({position:t,arrowSize:e,arrowOffset:n,arrowRadius:r,arrowPosition:s,visible:o,arrowX:i,arrowY:a,style:l,...c},u)=>{const{dir:f}=$c();return o?d.jsx("div",{...c,ref:u,style:{...l,...K1e({position:t,arrowSize:e,arrowOffset:n,arrowRadius:r,arrowPosition:s,dir:f,arrowX:i,arrowY:a})}}):null});Yx.displayName="@mantine/core/FloatingArrow";function YK(t,e){if(t==="rtl"&&(e.includes("right")||e.includes("left"))){const[n,r]=e.split("-"),s=n==="right"?"left":"right";return r===void 0?s:`${s}-${r}`}return e}var GK={root:"m_9814e45f"};const X1e={zIndex:Ps("modal")},Z1e=(t,{gradient:e,color:n,backgroundOpacity:r,blur:s,radius:o,zIndex:i})=>({root:{"--overlay-bg":e||(n!==void 0||r!==void 0)&&tl(n||"#000",r??.6)||void 0,"--overlay-filter":s?`blur(${Me(s)})`:void 0,"--overlay-radius":o===void 0?void 0:Wn(o),"--overlay-z-index":i==null?void 0:i.toString()}}),Yh=us((t,e)=>{const n=we("Overlay",X1e,t),{classNames:r,className:s,style:o,styles:i,unstyled:a,vars:l,fixed:c,center:u,children:f,radius:h,zIndex:m,gradient:y,blur:v,color:b,backgroundOpacity:w,mod:C,attributes:k,...E}=n,j=Et({name:"Overlay",props:n,classes:GK,className:s,style:o,classNames:r,styles:i,unstyled:a,attributes:k,vars:l,varsResolver:Z1e});return d.jsx(ie,{ref:e,...j("root"),mod:[{center:u,fixed:c},C],...E,children:f})});Yh.classes=GK;Yh.displayName="@mantine/core/Overlay";function Y6(t){const e=document.createElement("div");return e.setAttribute("data-portal","true"),typeof t.className=="string"&&e.classList.add(...t.className.split(" ").filter(Boolean)),typeof t.style=="object"&&Object.assign(e.style,t.style),typeof t.id=="string"&&e.setAttribute("id",t.id),e}function Q1e({target:t,reuseTargetNode:e,...n}){if(t)return typeof t=="string"?document.querySelector(t)||Y6(n):t;if(e){const r=document.querySelector("[data-mantine-shared-portal-node]");if(r)return r;const s=Y6(n);return s.setAttribute("data-mantine-shared-portal-node","true"),document.body.appendChild(s),s}return Y6(n)}const J1e={reuseTargetNode:!0},Fj=Be((t,e)=>{const{children:n,target:r,reuseTargetNode:s,...o}=we("Portal",J1e,t),[i,a]=S.useState(!1),l=S.useRef(null);return yd(()=>(a(!0),l.current=Q1e({target:r,reuseTargetNode:s,...o}),pg(e,l.current),!r&&!s&&l.current&&document.body.appendChild(l.current),()=>{!r&&!s&&l.current&&document.body.removeChild(l.current)}),[r]),!i||!l.current?null:Xo.createPortal(d.jsx(d.Fragment,{children:n}),l.current)});Fj.displayName="@mantine/core/Portal";const jc=Be(({withinPortal:t=!0,children:e,...n},r)=>Gw()==="test"||!t?d.jsx(d.Fragment,{children:e}):d.jsx(Fj,{ref:r,...n,children:e}));jc.displayName="@mantine/core/OptionalPortal";const t0=t=>({in:{opacity:1,transform:"scale(1)"},out:{opacity:0,transform:`scale(.9) translateY(${t==="bottom"?10:-10}px)`},transitionProperty:"transform, opacity"}),Lv={fade:{in:{opacity:1},out:{opacity:0},transitionProperty:"opacity"},"fade-up":{in:{opacity:1,transform:"translateY(0)"},out:{opacity:0,transform:"translateY(30px)"},transitionProperty:"opacity, transform"},"fade-down":{in:{opacity:1,transform:"translateY(0)"},out:{opacity:0,transform:"translateY(-30px)"},transitionProperty:"opacity, transform"},"fade-left":{in:{opacity:1,transform:"translateX(0)"},out:{opacity:0,transform:"translateX(30px)"},transitionProperty:"opacity, transform"},"fade-right":{in:{opacity:1,transform:"translateX(0)"},out:{opacity:0,transform:"translateX(-30px)"},transitionProperty:"opacity, transform"},scale:{in:{opacity:1,transform:"scale(1)"},out:{opacity:0,transform:"scale(0)"},common:{transformOrigin:"top"},transitionProperty:"transform, opacity"},"scale-y":{in:{opacity:1,transform:"scaleY(1)"},out:{opacity:0,transform:"scaleY(0)"},common:{transformOrigin:"top"},transitionProperty:"transform, opacity"},"scale-x":{in:{opacity:1,transform:"scaleX(1)"},out:{opacity:0,transform:"scaleX(0)"},common:{transformOrigin:"left"},transitionProperty:"transform, opacity"},"skew-up":{in:{opacity:1,transform:"translateY(0) skew(0deg, 0deg)"},out:{opacity:0,transform:"translateY(-20px) skew(-10deg, -5deg)"},common:{transformOrigin:"top"},transitionProperty:"transform, opacity"},"skew-down":{in:{opacity:1,transform:"translateY(0) skew(0deg, 0deg)"},out:{opacity:0,transform:"translateY(20px) skew(-10deg, -5deg)"},common:{transformOrigin:"bottom"},transitionProperty:"transform, opacity"},"rotate-left":{in:{opacity:1,transform:"translateY(0) rotate(0deg)"},out:{opacity:0,transform:"translateY(20px) rotate(-5deg)"},common:{transformOrigin:"bottom"},transitionProperty:"transform, opacity"},"rotate-right":{in:{opacity:1,transform:"translateY(0) rotate(0deg)"},out:{opacity:0,transform:"translateY(20px) rotate(5deg)"},common:{transformOrigin:"top"},transitionProperty:"transform, opacity"},"slide-down":{in:{opacity:1,transform:"translateY(0)"},out:{opacity:0,transform:"translateY(-100%)"},common:{transformOrigin:"top"},transitionProperty:"transform, opacity"},"slide-up":{in:{opacity:1,transform:"translateY(0)"},out:{opacity:0,transform:"translateY(100%)"},common:{transformOrigin:"bottom"},transitionProperty:"transform, opacity"},"slide-left":{in:{opacity:1,transform:"translateX(0)"},out:{opacity:0,transform:"translateX(100%)"},common:{transformOrigin:"left"},transitionProperty:"transform, opacity"},"slide-right":{in:{opacity:1,transform:"translateX(0)"},out:{opacity:0,transform:"translateX(-100%)"},common:{transformOrigin:"right"},transitionProperty:"transform, opacity"},pop:{...t0("bottom"),common:{transformOrigin:"center center"}},"pop-bottom-left":{...t0("bottom"),common:{transformOrigin:"bottom left"}},"pop-bottom-right":{...t0("bottom"),common:{transformOrigin:"bottom right"}},"pop-top-left":{...t0("top"),common:{transformOrigin:"top left"}},"pop-top-right":{...t0("top"),common:{transformOrigin:"top right"}}},gF={entering:"in",entered:"in",exiting:"out",exited:"out","pre-exiting":"out","pre-entering":"out"};function e0e({transition:t,state:e,duration:n,timingFunction:r}){const s={WebkitBackfaceVisibility:"hidden",transitionDuration:`${n}ms`,transitionTimingFunction:r};return typeof t=="string"?t in Lv?{transitionProperty:Lv[t].transitionProperty,...s,...Lv[t].common,...Lv[t][gF[e]]}:{}:{transitionProperty:t.transitionProperty,...s,...t.common,...t[gF[e]]}}function t0e({duration:t,exitDuration:e,timingFunction:n,mounted:r,onEnter:s,onExit:o,onEntered:i,onExited:a,enterDelay:l,exitDelay:c}){const u=Tr(),f=Vw(),h=u.respectReducedMotion?f:!1,[m,y]=S.useState(h?0:t),[v,b]=S.useState(r?"entered":"exited"),w=S.useRef(-1),C=S.useRef(-1),k=S.useRef(-1);function E(){window.clearTimeout(w.current),window.clearTimeout(C.current),cancelAnimationFrame(k.current)}const j=M=>{E();const _=M?s:o,D=M?i:a,R=h?0:M?t:e;y(R),R===0?(typeof _=="function"&&_(),typeof D=="function"&&D(),b(M?"entered":"exited")):k.current=requestAnimationFrame(()=>{Ch.flushSync(()=>{b(M?"pre-entering":"pre-exiting")}),k.current=requestAnimationFrame(()=>{typeof _=="function"&&_(),b(M?"entering":"exiting"),w.current=window.setTimeout(()=>{typeof D=="function"&&D(),b(M?"entered":"exited")},R)})})},A=M=>{if(E(),typeof(M?l:c)!="number"){j(M);return}C.current=window.setTimeout(()=>{j(M)},M?l:c)};return kl(()=>{A(r)},[r]),S.useEffect(()=>()=>{E()},[]),{transitionDuration:m,transitionStatus:v,transitionTimingFunction:n||"ease"}}function na({keepMounted:t,transition:e="fade",duration:n=250,exitDuration:r=n,mounted:s,children:o,timingFunction:i="ease",onExit:a,onEntered:l,onEnter:c,onExited:u,enterDelay:f,exitDelay:h}){const m=Gw(),{transitionDuration:y,transitionStatus:v,transitionTimingFunction:b}=t0e({mounted:s,exitDuration:r,duration:n,timingFunction:i,onExit:a,onEntered:l,onEnter:c,onExited:u,enterDelay:f,exitDelay:h});return y===0||m==="test"?s?d.jsx(d.Fragment,{children:o({})}):t?o({display:"none"}):null:v==="exited"?t?o({display:"none"}):null:d.jsx(d.Fragment,{children:o(e0e({transition:e,duration:y,state:v,timingFunction:b}))})}na.displayName="@mantine/core/Transition";const[n0e,KK]=zs("Popover component was not found in the tree");var XK={dropdown:"m_38a85659",arrow:"m_a31dc6c1",overlay:"m_3d7bc908"};function s4({children:t,active:e=!0,refProp:n="ref",innerRef:r}){const s=bpe(e),o=Vr(s,r),i=vd(t);return i?S.cloneElement(i,{[n]:o}):t}function ZK(t){return d.jsx($j,{tabIndex:-1,"data-autofocus":!0,...t})}s4.displayName="@mantine/core/FocusTrap";ZK.displayName="@mantine/core/FocusTrapInitialFocus";s4.InitialFocus=ZK;const zj=Be((t,e)=>{var b,w,C,k;const n=we("PopoverDropdown",null,t),{className:r,style:s,vars:o,children:i,onKeyDownCapture:a,variant:l,classNames:c,styles:u,...f}=n,h=KK(),m=zG({opened:h.opened,shouldReturnFocus:h.returnFocus}),y=h.withRoles?{"aria-labelledby":h.getTargetId(),id:h.getDropdownId(),role:"dialog",tabIndex:-1}:{},v=Vr(e,h.floating);return h.disabled?null:d.jsx(jc,{...h.portalProps,withinPortal:h.withinPortal,children:d.jsx(na,{mounted:h.opened,...h.transitionProps,transition:((b=h.transitionProps)==null?void 0:b.transition)||"fade",duration:((w=h.transitionProps)==null?void 0:w.duration)??150,keepMounted:h.keepMounted,exitDuration:typeof((C=h.transitionProps)==null?void 0:C.exitDuration)=="number"?h.transitionProps.exitDuration:(k=h.transitionProps)==null?void 0:k.duration,children:E=>d.jsx(s4,{active:h.trapFocus&&h.opened,innerRef:v,children:d.jsxs(ie,{...y,...f,variant:l,onKeyDownCapture:ipe(()=>{var j,A;(j=h.onClose)==null||j.call(h),(A=h.onDismiss)==null||A.call(h)},{active:h.closeOnEscape,onTrigger:m,onKeyDown:a}),"data-position":h.placement,"data-fixed":h.floatingStrategy==="fixed"||void 0,...h.getStyles("dropdown",{className:r,props:n,classNames:c,styles:u,style:[{...E,zIndex:h.zIndex,top:h.y??0,left:h.x??0,width:h.width==="target"?void 0:Me(h.width),...h.referenceHidden?{display:"none"}:null},h.resolvedStyles.dropdown,u==null?void 0:u.dropdown,s]}),children:[i,d.jsx(Yx,{ref:h.arrowRef,arrowX:h.arrowX,arrowY:h.arrowY,visible:h.withArrow,position:h.placement,arrowSize:h.arrowSize,arrowRadius:h.arrowRadius,arrowOffset:h.arrowOffset,arrowPosition:h.arrowPosition,...h.getStyles("arrow",{props:n,classNames:c,styles:u})})]})})})})});zj.classes=XK;zj.displayName="@mantine/core/PopoverDropdown";const r0e={refProp:"ref",popupType:"dialog"},QK=Be((t,e)=>{const{children:n,refProp:r,popupType:s,...o}=we("PopoverTarget",r0e,t),i=vd(n);if(!i)throw new Error("Popover.Target component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported");const a=o,l=KK(),c=Vr(l.reference,qw(i),e),u=l.withRoles?{"aria-haspopup":s,"aria-expanded":l.opened,"aria-controls":l.opened?l.getDropdownId():void 0,id:l.getTargetId()}:{},f=i.props;return S.cloneElement(i,{...a,...u,...l.targetProps,className:Fr(l.targetProps.className,a.className,f.className),[r]:c,...l.controlled?null:{onClick:()=>{var h;l.onToggle(),(h=f.onClick)==null||h.call(f)}}})});QK.displayName="@mantine/core/PopoverTarget";function s0e(t){if(t===void 0)return{shift:!0,flip:!0};const e={...t};return t.shift===void 0&&(e.shift=!0),t.flip===void 0&&(e.flip=!0),e}function o0e(t,e,n){const r=s0e(t.middlewares),s=[wK(t.offset),w1e()];return t.dropdownVisible&&n!=="test"&&t.preventPositionChangeWhenVisible&&(r.flip=!1),r.flip&&s.push(typeof r.flip=="boolean"?Wx():Wx(r.flip)),r.shift&&s.push(_j(typeof r.shift=="boolean"?{limiter:iF(),padding:5}:{limiter:iF(),padding:5,...r.shift})),r.inline&&s.push(typeof r.inline=="boolean"?P0():P0(r.inline)),s.push(SK({element:t.arrowRef,padding:t.arrowOffset})),(r.size||t.width==="target")&&s.push(x1e({...typeof r.size=="boolean"?{}:r.size,apply({rects:o,availableWidth:i,availableHeight:a,...l}){var f;const u=((f=e().refs.floating.current)==null?void 0:f.style)??{};r.size&&(typeof r.size=="object"&&r.size.apply?r.size.apply({rects:o,availableWidth:i,availableHeight:a,...l}):Object.assign(u,{maxWidth:`${i}px`,maxHeight:`${a}px`})),t.width==="target"&&Object.assign(u,{width:`${o.reference.width}px`})}})),s}function i0e(t){const e=Gw(),[n,r]=ls({value:t.opened,defaultValue:t.defaultOpened,finalValue:!1,onChange:t.onChange}),s=S.useRef(n),o=()=>{n&&!t.disabled&&r(!1)},i=()=>{t.disabled||r(!n)},a=t4({strategy:t.strategy,placement:t.preventPositionChangeWhenVisible?t.positionRef.current:t.position,middleware:o0e(t,()=>a,e),whileElementsMounted:t.keepMounted?void 0:NE});return S.useEffect(()=>{if(!(!a.refs.reference.current||!a.refs.floating.current)&&n)return NE(a.refs.reference.current,a.refs.floating.current,a.update)},[n,a.update]),kl(()=>{var l;(l=t.onPositionChange)==null||l.call(t,a.placement),t.positionRef.current=a.placement},[a.placement,t.preventPositionChangeWhenVisible]),kl(()=>{var l,c;n!==s.current&&(n?(c=t.onOpen)==null||c.call(t):(l=t.onClose)==null||l.call(t)),s.current=n},[n,t.onClose,t.onOpen]),yd(()=>{let l=-1;return n&&(l=window.setTimeout(()=>t.setDropdownVisible(!0),4)),()=>{window.clearTimeout(l)}},[n,t.position]),{floating:a,controlled:typeof t.opened=="boolean",opened:n,onClose:o,onToggle:i}}const a0e={position:"bottom",offset:8,positionDependencies:[],transitionProps:{transition:"fade",duration:150},middlewares:{flip:!0,shift:!0,inline:!1},arrowSize:7,arrowOffset:5,arrowRadius:0,arrowPosition:"side",closeOnClickOutside:!0,withinPortal:!0,closeOnEscape:!0,trapFocus:!1,withRoles:!0,returnFocus:!1,withOverlay:!1,hideDetached:!0,clickOutsideEvents:["mousedown","touchstart"],zIndex:Ps("popover"),__staticSelector:"Popover",width:"max-content"},l0e=(t,{radius:e,shadow:n})=>({dropdown:{"--popover-radius":e===void 0?void 0:Wn(e),"--popover-shadow":cj(n)}});function Dt(t){var gt,Pt,at,nt,We,At,St;const e=we("Popover",a0e,t),{children:n,position:r,offset:s,onPositionChange:o,positionDependencies:i,opened:a,transitionProps:l,onExitTransitionEnd:c,onEnterTransitionEnd:u,width:f,middlewares:h,withArrow:m,arrowSize:y,arrowOffset:v,arrowRadius:b,arrowPosition:w,unstyled:C,classNames:k,styles:E,closeOnClickOutside:j,withinPortal:A,portalProps:M,closeOnEscape:_,clickOutsideEvents:D,trapFocus:R,onClose:N,onDismiss:z,onOpen:B,onChange:L,zIndex:P,radius:I,shadow:H,id:$,defaultOpened:V,__staticSelector:q,withRoles:U,disabled:W,returnFocus:Y,variant:G,keepMounted:K,vars:Q,floatingStrategy:Z,withOverlay:J,overlayProps:ne,hideDetached:se,attributes:ce,preventPositionChangeWhenVisible:fe,...le}=e,be=Et({name:q,props:e,classes:XK,classNames:k,styles:E,unstyled:C,attributes:ce,rootSelector:"dropdown",vars:Q,varsResolver:l0e}),{resolvedStyles:je}=Ti({classNames:k,styles:E,props:e}),[pe,_e]=S.useState(a??V??!1),Ce=S.useRef(r),Te=S.useRef(null),[Ae,Ze]=S.useState(null),[He,lt]=S.useState(null),{dir:Ye}=$c(),ge=Gw(),Fe=_s($),Se=i0e({middlewares:h,width:f,position:YK(Ye,r),offset:typeof s=="number"?s+(m?y/2:0):s,arrowRef:Te,arrowOffset:v,onPositionChange:o,positionDependencies:i,opened:a,defaultOpened:V,onChange:L,onOpen:B,onClose:N,onDismiss:z,strategy:Z,dropdownVisible:pe,setDropdownVisible:_e,positionRef:Ce,disabled:W,preventPositionChangeWhenVisible:fe,keepMounted:K});Em(()=>{j&&(Se.onClose(),z==null||z())},D,[Ae,He]);const qe=S.useCallback(Ot=>{Ze(Ot),Se.floating.refs.setReference(Ot)},[Se.floating.refs.setReference]),ot=S.useCallback(Ot=>{lt(Ot),Se.floating.refs.setFloating(Ot)},[Se.floating.refs.setFloating]),$e=S.useCallback(()=>{var Ot;(Ot=l==null?void 0:l.onExited)==null||Ot.call(l),c==null||c(),_e(!1),fe||(Ce.current=r)},[l==null?void 0:l.onExited,c,fe,r]),pt=S.useCallback(()=>{var Ot;(Ot=l==null?void 0:l.onEntered)==null||Ot.call(l),u==null||u()},[l==null?void 0:l.onEntered,u]);return d.jsxs(n0e,{value:{returnFocus:Y,disabled:W,controlled:Se.controlled,reference:qe,floating:ot,x:Se.floating.x,y:Se.floating.y,arrowX:(at=(Pt=(gt=Se.floating)==null?void 0:gt.middlewareData)==null?void 0:Pt.arrow)==null?void 0:at.x,arrowY:(At=(We=(nt=Se.floating)==null?void 0:nt.middlewareData)==null?void 0:We.arrow)==null?void 0:At.y,opened:Se.opened,arrowRef:Te,transitionProps:{...l,onExited:$e,onEntered:pt},width:f,withArrow:m,arrowSize:y,arrowOffset:v,arrowRadius:b,arrowPosition:w,placement:Se.floating.placement,trapFocus:R,withinPortal:A,portalProps:M,zIndex:P,radius:I,shadow:H,closeOnEscape:_,onDismiss:z,onClose:Se.onClose,onToggle:Se.onToggle,getTargetId:()=>`${Fe}-target`,getDropdownId:()=>`${Fe}-dropdown`,withRoles:U,targetProps:le,__staticSelector:q,classNames:k,styles:E,unstyled:C,variant:G,keepMounted:K,getStyles:be,resolvedStyles:je,floatingStrategy:Z,referenceHidden:se&&ge!=="test"?(St=Se.floating.middlewareData.hide)==null?void 0:St.referenceHidden:!1},children:[n,J&&d.jsx(na,{transition:"fade",mounted:Se.opened,duration:(l==null?void 0:l.duration)||250,exitDuration:(l==null?void 0:l.exitDuration)||250,children:Ot=>d.jsx(jc,{withinPortal:A,children:d.jsx(Yh,{...ne,...be("overlay",{className:ne==null?void 0:ne.className,style:[Ot,ne==null?void 0:ne.style]})})})})]})}Dt.Target=QK;Dt.Dropdown=zj;Dt.displayName="@mantine/core/Popover";Dt.extend=t=>t;var Sa={root:"m_5ae2e3c",barsLoader:"m_7a2bd4cd",bar:"m_870bb79","bars-loader-animation":"m_5d2b3b9d",dotsLoader:"m_4e3f22d7",dot:"m_870c4af","loader-dots-animation":"m_aac34a1",ovalLoader:"m_b34414df","oval-loader-animation":"m_f8e89c4b"};const JK=S.forwardRef(({className:t,...e},n)=>d.jsxs(ie,{component:"span",className:Fr(Sa.barsLoader,t),...e,ref:n,children:[d.jsx("span",{className:Sa.bar}),d.jsx("span",{className:Sa.bar}),d.jsx("span",{className:Sa.bar})]}));JK.displayName="@mantine/core/Bars";const eX=S.forwardRef(({className:t,...e},n)=>d.jsxs(ie,{component:"span",className:Fr(Sa.dotsLoader,t),...e,ref:n,children:[d.jsx("span",{className:Sa.dot}),d.jsx("span",{className:Sa.dot}),d.jsx("span",{className:Sa.dot})]}));eX.displayName="@mantine/core/Dots";const tX=S.forwardRef(({className:t,...e},n)=>d.jsx(ie,{component:"span",className:Fr(Sa.ovalLoader,t),...e,ref:n}));tX.displayName="@mantine/core/Oval";const nX={bars:JK,oval:tX,dots:eX},c0e={loaders:nX,type:"oval"},u0e=(t,{size:e,color:n})=>({root:{"--loader-size":an(e,"loader-size"),"--loader-color":n?xr(n,t):void 0}}),Bs=Be((t,e)=>{const n=we("Loader",c0e,t),{size:r,color:s,type:o,vars:i,className:a,style:l,classNames:c,styles:u,unstyled:f,loaders:h,variant:m,children:y,attributes:v,...b}=n,w=Et({name:"Loader",props:n,classes:Sa,className:a,style:l,classNames:c,styles:u,unstyled:f,attributes:v,vars:i,varsResolver:u0e});return y?d.jsx(ie,{...w("root"),ref:e,...b,children:y}):d.jsx(ie,{...w("root"),ref:e,component:h[o],variant:m,size:r,...b})});Bs.defaultLoaders=nX;Bs.classes=Sa;Bs.displayName="@mantine/core/Loader";var Mm={root:"m_8d3f4000",icon:"m_8d3afb97",loader:"m_302b9fb1",group:"m_1a0f1b21",groupSection:"m_437b6484"};const yF={orientation:"horizontal"},d0e=(t,{borderWidth:e})=>({group:{"--ai-border-width":Me(e)}}),Pj=Be((t,e)=>{const n=we("ActionIconGroup",yF,t),{className:r,style:s,classNames:o,styles:i,unstyled:a,orientation:l,vars:c,borderWidth:u,variant:f,mod:h,attributes:m,...y}=we("ActionIconGroup",yF,t),v=Et({name:"ActionIconGroup",props:n,classes:Mm,className:r,style:s,classNames:o,styles:i,unstyled:a,attributes:m,vars:c,varsResolver:d0e,rootSelector:"group"});return d.jsx(ie,{...v("group"),ref:e,variant:f,mod:[{"data-orientation":l},h],role:"group",...y})});Pj.classes=Mm;Pj.displayName="@mantine/core/ActionIconGroup";const f0e=(t,{radius:e,color:n,gradient:r,variant:s,autoContrast:o,size:i})=>{const a=t.variantColorResolver({color:n||t.primaryColor,theme:t,gradient:r,variant:s||"filled",autoContrast:o});return{groupSection:{"--section-height":an(i,"section-height"),"--section-padding-x":an(i,"section-padding-x"),"--section-fz":Ur(i),"--section-radius":e===void 0?void 0:Wn(e),"--section-bg":n||s?a.background:void 0,"--section-color":a.color,"--section-bd":n||s?a.border:void 0}}},Bj=Be((t,e)=>{const n=we("ActionIconGroupSection",null,t),{className:r,style:s,classNames:o,styles:i,unstyled:a,vars:l,variant:c,gradient:u,radius:f,autoContrast:h,attributes:m,...y}=n,v=Et({name:"ActionIconGroupSection",props:n,classes:Mm,className:r,style:s,classNames:o,styles:i,unstyled:a,attributes:m,vars:l,varsResolver:f0e,rootSelector:"groupSection"});return d.jsx(ie,{...v("groupSection"),ref:e,variant:c,...y})});Bj.classes=Mm;Bj.displayName="@mantine/core/ActionIconGroupSection";const p0e=(t,{size:e,radius:n,variant:r,gradient:s,color:o,autoContrast:i})=>{const a=t.variantColorResolver({color:o||t.primaryColor,theme:t,gradient:s,variant:r||"filled",autoContrast:i});return{root:{"--ai-size":an(e,"ai-size"),"--ai-radius":n===void 0?void 0:Wn(n),"--ai-bg":o||r?a.background:void 0,"--ai-hover":o||r?a.hover:void 0,"--ai-hover-color":o||r?a.hoverColor:void 0,"--ai-color":a.color,"--ai-bd":o||r?a.border:void 0}}},Ve=us((t,e)=>{const n=we("ActionIcon",null,t),{className:r,unstyled:s,variant:o,classNames:i,styles:a,style:l,loading:c,loaderProps:u,size:f,color:h,radius:m,__staticSelector:y,gradient:v,vars:b,children:w,disabled:C,"data-disabled":k,autoContrast:E,mod:j,attributes:A,...M}=n,_=Et({name:["ActionIcon",y],props:n,className:r,style:l,classes:Mm,classNames:i,styles:a,unstyled:s,attributes:A,vars:b,varsResolver:p0e});return d.jsxs(En,{..._("root",{active:!C&&!c&&!k}),...M,unstyled:s,variant:o,size:f,disabled:C||c,ref:e,mod:[{loading:c,disabled:C||k},j],children:[typeof c=="boolean"&&d.jsx(na,{mounted:c,transition:"slide-down",duration:150,children:D=>d.jsx(ie,{component:"span",..._("loader",{style:D}),"aria-hidden":!0,children:d.jsx(Bs,{color:"var(--ai-color)",size:"calc(var(--ai-size) * 0.55)",...u})})}),d.jsx(ie,{component:"span",mod:{loading:c},..._("icon"),children:w})]})});Ve.classes=Mm;Ve.displayName="@mantine/core/ActionIcon";Ve.Group=Pj;Ve.GroupSection=Bj;const rX=S.forwardRef(({size:t="var(--cb-icon-size, 70%)",style:e,...n},r)=>d.jsx("svg",{viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{...e,width:t,height:t},ref:r,...n,children:d.jsx("path",{d:"M11.7816 4.03157C12.0062 3.80702 12.0062 3.44295 11.7816 3.2184C11.5571 2.99385 11.193 2.99385 10.9685 3.2184L7.50005 6.68682L4.03164 3.2184C3.80708 2.99385 3.44301 2.99385 3.21846 3.2184C2.99391 3.44295 2.99391 3.80702 3.21846 4.03157L6.68688 7.49999L3.21846 10.9684C2.99391 11.193 2.99391 11.557 3.21846 11.7816C3.44301 12.0061 3.80708 12.0061 4.03164 11.7816L7.50005 8.31316L10.9685 11.7816C11.193 12.0061 11.5571 12.0061 11.7816 11.7816C12.0062 11.557 12.0062 11.193 11.7816 10.9684L8.31322 7.49999L11.7816 4.03157Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})}));rX.displayName="@mantine/core/CloseIcon";var sX={root:"m_86a44da5","root--subtle":"m_220c80f2"};const h0e={variant:"subtle"},m0e=(t,{size:e,radius:n,iconSize:r})=>({root:{"--cb-size":an(e,"cb-size"),"--cb-radius":n===void 0?void 0:Wn(n),"--cb-icon-size":Me(r)}}),jm=us((t,e)=>{const n=we("CloseButton",h0e,t),{iconSize:r,children:s,vars:o,radius:i,className:a,classNames:l,style:c,styles:u,unstyled:f,"data-disabled":h,disabled:m,variant:y,icon:v,mod:b,attributes:w,__staticSelector:C,...k}=n,E=Et({name:C||"CloseButton",props:n,className:a,style:c,classes:sX,classNames:l,styles:u,unstyled:f,attributes:w,vars:o,varsResolver:m0e});return d.jsxs(En,{ref:e,...k,unstyled:f,variant:y,disabled:m,mod:[{disabled:m||h},b],...E("root",{variant:y,active:!m&&!h}),children:[v||d.jsx(rX,{}),s]})});jm.classes=sX;jm.displayName="@mantine/core/CloseButton";function g0e(t){return S.Children.toArray(t).filter(Boolean)}var oX={root:"m_4081bf90"};const y0e={preventGrowOverflow:!0,gap:"md",align:"center",justify:"flex-start",wrap:"wrap"},v0e=(t,{grow:e,preventGrowOverflow:n,gap:r,align:s,justify:o,wrap:i},{childWidth:a})=>({root:{"--group-child-width":e&&n?a:void 0,"--group-gap":ss(r),"--group-align":s,"--group-justify":o,"--group-wrap":i}}),ve=Be((t,e)=>{const n=we("Group",y0e,t),{classNames:r,className:s,style:o,styles:i,unstyled:a,children:l,gap:c,align:u,justify:f,wrap:h,grow:m,preventGrowOverflow:y,vars:v,variant:b,__size:w,mod:C,attributes:k,...E}=n,j=g0e(l),A=j.length,M=ss(c??"md"),D={childWidth:`calc(${100/A}% - (${M} - ${M} / ${A}))`},R=Et({name:"Group",props:n,stylesCtx:D,className:s,style:o,classes:oX,classNames:r,styles:i,unstyled:a,attributes:k,vars:v,varsResolver:v0e});return d.jsx(ie,{...R("root"),ref:e,variant:b,mod:[{grow:m},C],size:w,...E,children:j})});ve.classes=oX;ve.displayName="@mantine/core/Group";const[b0e,Fc]=zs("ModalBase component was not found in tree");function x0e({opened:t,transitionDuration:e}){const[n,r]=S.useState(t),s=S.useRef(-1),i=Vw()?0:e;return S.useEffect(()=>(t?(r(!0),window.clearTimeout(s.current)):i===0?r(!1):s.current=window.setTimeout(()=>r(!1),i),()=>window.clearTimeout(s.current)),[t,i]),n}function w0e({id:t,transitionProps:e,opened:n,trapFocus:r,closeOnEscape:s,onClose:o,returnFocus:i}){const a=_s(t),[l,c]=S.useState(!1),[u,f]=S.useState(!1),h=typeof(e==null?void 0:e.duration)=="number"?e==null?void 0:e.duration:200,m=x0e({opened:n,transitionDuration:h});return Tc("keydown",y=>{var v;y.key==="Escape"&&s&&!y.isComposing&&n&&((v=y.target)==null?void 0:v.getAttribute("data-mantine-stop-propagation"))!=="true"&&o()},{capture:!0}),zG({opened:n,shouldReturnFocus:r&&i}),{_id:a,titleMounted:l,bodyMounted:u,shouldLockScroll:m,setTitleMounted:c,setBodyMounted:f}}const Hj=S.forwardRef(({keepMounted:t,opened:e,onClose:n,id:r,transitionProps:s,onExitTransitionEnd:o,onEnterTransitionEnd:i,trapFocus:a,closeOnEscape:l,returnFocus:c,closeOnClickOutside:u,withinPortal:f,portalProps:h,lockScroll:m,children:y,zIndex:v,shadow:b,padding:w,__vars:C,unstyled:k,removeScrollProps:E,...j},A)=>{const{_id:M,titleMounted:_,bodyMounted:D,shouldLockScroll:R,setTitleMounted:N,setBodyMounted:z}=w0e({id:r,transitionProps:s,opened:e,trapFocus:a,closeOnEscape:l,onClose:n,returnFocus:c}),{key:B,...L}=E||{};return d.jsx(jc,{...h,withinPortal:f,children:d.jsx(b0e,{value:{opened:e,onClose:n,closeOnClickOutside:u,onExitTransitionEnd:o,onEnterTransitionEnd:i,transitionProps:{...s,keepMounted:t},getTitleId:()=>`${M}-title`,getBodyId:()=>`${M}-body`,titleMounted:_,bodyMounted:D,setTitleMounted:N,setBodyMounted:z,trapFocus:a,closeOnEscape:l,zIndex:v,unstyled:k},children:d.jsx(Df,{enabled:R&&m,...L,children:d.jsx(ie,{ref:A,...j,__vars:{...C,"--mb-z-index":(v||Ps("modal")).toString(),"--mb-shadow":cj(b),"--mb-padding":ss(w)},children:y})},B)})})});Hj.displayName="@mantine/core/ModalBase";var Gh={title:"m_615af6c9",header:"m_b5489c3c",inner:"m_60c222c7",content:"m_fd1ab0aa",close:"m_606cb269",body:"m_5df29311"};function S0e(){const t=Fc();return S.useEffect(()=>(t.setBodyMounted(!0),()=>t.setBodyMounted(!1)),[]),t.getBodyId()}const Uj=S.forwardRef(({className:t,...e},n)=>{const r=S0e(),s=Fc();return d.jsx(ie,{ref:n,...e,id:r,className:Fr({[Gh.body]:!s.unstyled},t)})});Uj.displayName="@mantine/core/ModalBaseBody";const Vj=S.forwardRef(({className:t,onClick:e,...n},r)=>{const s=Fc();return d.jsx(jm,{ref:r,...n,onClick:o=>{s.onClose(),e==null||e(o)},className:Fr({[Gh.close]:!s.unstyled},t),unstyled:s.unstyled})});Vj.displayName="@mantine/core/ModalBaseCloseButton";const qj=S.forwardRef(({transitionProps:t,className:e,innerProps:n,onKeyDown:r,style:s,...o},i)=>{const a=Fc();return d.jsx(na,{mounted:a.opened,transition:"pop",...a.transitionProps,onExited:()=>{var l,c,u;(l=a.onExitTransitionEnd)==null||l.call(a),(u=(c=a.transitionProps)==null?void 0:c.onExited)==null||u.call(c)},onEntered:()=>{var l,c,u;(l=a.onEnterTransitionEnd)==null||l.call(a),(u=(c=a.transitionProps)==null?void 0:c.onEntered)==null||u.call(c)},...t,children:l=>d.jsx("div",{...n,className:Fr({[Gh.inner]:!a.unstyled},n.className),children:d.jsx(s4,{active:a.opened&&a.trapFocus,innerRef:i,children:d.jsx(xd,{...o,component:"section",role:"dialog",tabIndex:-1,"aria-modal":!0,"aria-describedby":a.bodyMounted?a.getBodyId():void 0,"aria-labelledby":a.titleMounted?a.getTitleId():void 0,style:[s,l],className:Fr({[Gh.content]:!a.unstyled},e),unstyled:a.unstyled,children:o.children})})})})});qj.displayName="@mantine/core/ModalBaseContent";const Wj=S.forwardRef(({className:t,...e},n)=>{const r=Fc();return d.jsx(ie,{component:"header",ref:n,className:Fr({[Gh.header]:!r.unstyled},t),...e})});Wj.displayName="@mantine/core/ModalBaseHeader";const C0e={duration:200,timingFunction:"ease",transition:"fade"};function k0e(t){const e=Fc();return{...C0e,...e.transitionProps,...t}}const Yj=S.forwardRef(({onClick:t,transitionProps:e,style:n,visible:r,...s},o)=>{const i=Fc(),a=k0e(e);return d.jsx(na,{mounted:r!==void 0?r:i.opened,...a,transition:"fade",children:l=>d.jsx(Yh,{ref:o,fixed:!0,style:[n,l],zIndex:i.zIndex,unstyled:i.unstyled,onClick:c=>{t==null||t(c),i.closeOnClickOutside&&i.onClose()},...s})})});Yj.displayName="@mantine/core/ModalBaseOverlay";function E0e(){const t=Fc();return S.useEffect(()=>(t.setTitleMounted(!0),()=>t.setTitleMounted(!1)),[]),t.getTitleId()}const Gj=S.forwardRef(({className:t,...e},n)=>{const r=E0e(),s=Fc();return d.jsx(ie,{component:"h2",ref:n,className:Fr({[Gh.title]:!s.unstyled},t),...e,id:r})});Gj.displayName="@mantine/core/ModalBaseTitle";function iX({children:t}){return d.jsx(d.Fragment,{children:t})}const[T0e,M0e]=za({size:"sm"});var aa={wrapper:"m_6c018570",input:"m_8fb7ebe7",section:"m_82577fc2",placeholder:"m_88bacfd0",root:"m_46b77525",label:"m_8fdc1311",required:"m_78a94662",error:"m_8f816625",description:"m_fe47ce59"};const aX=Be((t,e)=>{const n=we("InputClearButton",null,t),{size:r,variant:s,vars:o,classNames:i,styles:a,...l}=n,c=M0e(),{resolvedClassNames:u,resolvedStyles:f}=Ti({classNames:i,styles:a,props:n});return d.jsx(jm,{variant:s||"transparent",ref:e,size:r||(c==null?void 0:c.size)||"sm",classNames:u,styles:f,__staticSelector:"InputClearButton",style:{pointerEvents:"all",background:"var(--input-bg)",...l.style},...l})});aX.displayName="@mantine/core/InputClearButton";const j0e={xs:7,sm:8,md:10,lg:12,xl:15};function A0e({__clearable:t,__clearSection:e,rightSection:n,__defaultRightSection:r,size:s="sm"}){const o=t&&e;return o&&(n||r)?d.jsxs("div",{"data-combined-clear-section":!0,style:{display:"flex",gap:2,alignItems:"center",paddingInlineEnd:j0e[s]},children:[o,n||r]}):n===null?null:n||o||r}const[_0e,Am]=za({offsetBottom:!1,offsetTop:!1,describedBy:void 0,getStyles:null,inputId:void 0,labelId:void 0}),R0e=(t,{size:e})=>({description:{"--input-description-size":e===void 0?void 0:`calc(${Ur(e)} - ${Me(2)})`}}),o4=Be((t,e)=>{const n=we("InputDescription",null,t),{classNames:r,className:s,style:o,styles:i,unstyled:a,vars:l,size:c,__staticSelector:u,__inheritStyles:f=!0,attributes:h,variant:m,...y}=we("InputDescription",null,n),v=Am(),b=Et({name:["InputWrapper",u],props:n,classes:aa,className:s,style:o,classNames:r,styles:i,unstyled:a,attributes:h,rootSelector:"description",vars:l,varsResolver:R0e}),w=f&&(v==null?void 0:v.getStyles)||b;return d.jsx(ie,{component:"p",ref:e,variant:m,size:c,...w("description",v!=null&&v.getStyles?{className:s,style:o}:void 0),...y})});o4.classes=aa;o4.displayName="@mantine/core/InputDescription";const D0e=(t,{size:e})=>({error:{"--input-error-size":e===void 0?void 0:`calc(${Ur(e)} - ${Me(2)})`}}),i4=Be((t,e)=>{const n=we("InputError",null,t),{classNames:r,className:s,style:o,styles:i,unstyled:a,vars:l,size:c,attributes:u,__staticSelector:f,__inheritStyles:h=!0,variant:m,...y}=n,v=Et({name:["InputWrapper",f],props:n,classes:aa,className:s,style:o,classNames:r,styles:i,unstyled:a,attributes:u,rootSelector:"error",vars:l,varsResolver:D0e}),b=Am(),w=h&&(b==null?void 0:b.getStyles)||v;return d.jsx(ie,{component:"p",ref:e,variant:m,size:c,...w("error",b!=null&&b.getStyles?{className:s,style:o}:void 0),...y})});i4.classes=aa;i4.displayName="@mantine/core/InputError";const vF={labelElement:"label"},I0e=(t,{size:e})=>({label:{"--input-label-size":Ur(e),"--input-asterisk-color":void 0}}),a4=Be((t,e)=>{const n=we("InputLabel",vF,t),{classNames:r,className:s,style:o,styles:i,unstyled:a,vars:l,labelElement:c,size:u,required:f,htmlFor:h,onMouseDown:m,children:y,__staticSelector:v,variant:b,mod:w,attributes:C,...k}=we("InputLabel",vF,n),E=Et({name:["InputWrapper",v],props:n,classes:aa,className:s,style:o,classNames:r,styles:i,unstyled:a,attributes:C,rootSelector:"label",vars:l,varsResolver:I0e}),j=Am(),A=(j==null?void 0:j.getStyles)||E;return d.jsxs(ie,{...A("label",j!=null&&j.getStyles?{className:s,style:o}:void 0),component:c,variant:b,size:u,ref:e,htmlFor:c==="label"?h:void 0,mod:[{required:f},w],onMouseDown:M=>{m==null||m(M),!M.defaultPrevented&&M.detail>1&&M.preventDefault()},...k,children:[y,f&&d.jsx("span",{...A("required"),"aria-hidden":!0,children:" *"})]})});a4.classes=aa;a4.displayName="@mantine/core/InputLabel";const Kj=Be((t,e)=>{const n=we("InputPlaceholder",null,t),{classNames:r,className:s,style:o,styles:i,unstyled:a,vars:l,__staticSelector:c,variant:u,error:f,mod:h,attributes:m,...y}=n,v=Et({name:["InputPlaceholder",c],props:n,classes:aa,className:s,style:o,classNames:r,styles:i,unstyled:a,attributes:m,rootSelector:"placeholder"});return d.jsx(ie,{...v("placeholder"),mod:[{error:!!f},h],component:"span",variant:u,ref:e,...y})});Kj.classes=aa;Kj.displayName="@mantine/core/InputPlaceholder";function O0e(t,{hasDescription:e,hasError:n}){const r=t.findIndex(l=>l==="input"),s=t.slice(0,r),o=t.slice(r+1),i=e&&s.includes("description")||n&&s.includes("error");return{offsetBottom:e&&o.includes("description")||n&&o.includes("error"),offsetTop:i}}const N0e={labelElement:"label",inputContainer:t=>t,inputWrapperOrder:["label","description","input","error"]},L0e=(t,{size:e})=>({label:{"--input-label-size":Ur(e),"--input-asterisk-color":void 0},error:{"--input-error-size":e===void 0?void 0:`calc(${Ur(e)} - ${Me(2)})`},description:{"--input-description-size":e===void 0?void 0:`calc(${Ur(e)} - ${Me(2)})`}}),Xj=Be((t,e)=>{const n=we("InputWrapper",N0e,t),{classNames:r,className:s,style:o,styles:i,unstyled:a,vars:l,size:c,variant:u,__staticSelector:f,inputContainer:h,inputWrapperOrder:m,label:y,error:v,description:b,labelProps:w,descriptionProps:C,errorProps:k,labelElement:E,children:j,withAsterisk:A,id:M,required:_,__stylesApiProps:D,mod:R,attributes:N,...z}=n,B=Et({name:["InputWrapper",f],props:D||n,classes:aa,className:s,style:o,classNames:r,styles:i,unstyled:a,attributes:N,vars:l,varsResolver:L0e}),L={size:c,variant:u,__staticSelector:f},P=_s(M),I=typeof A=="boolean"?A:_,H=(k==null?void 0:k.id)||`${P}-error`,$=(C==null?void 0:C.id)||`${P}-description`,V=P,q=!!v&&typeof v!="boolean",U=!!b,W=`${q?H:""} ${U?$:""}`,Y=W.trim().length>0?W.trim():void 0,G=(w==null?void 0:w.id)||`${P}-label`,K=y&&d.jsx(a4,{labelElement:E,id:G,htmlFor:V,required:I,...L,...w,children:y},"label"),Q=U&&d.jsx(o4,{...C,...L,size:(C==null?void 0:C.size)||L.size,id:(C==null?void 0:C.id)||$,children:b},"description"),Z=d.jsx(S.Fragment,{children:h(j)},"input"),J=q&&S.createElement(i4,{...k,...L,size:(k==null?void 0:k.size)||L.size,key:"error",id:(k==null?void 0:k.id)||H},v),ne=m.map(se=>{switch(se){case"label":return K;case"input":return Z;case"description":return Q;case"error":return J;default:return null}});return d.jsx(_0e,{value:{getStyles:B,describedBy:Y,inputId:V,labelId:G,...O0e(m,{hasDescription:U,hasError:q})},children:d.jsx(ie,{ref:e,variant:u,size:c,mod:[{error:!!v},R],...B("root"),...z,children:ne})})});Xj.classes=aa;Xj.displayName="@mantine/core/InputWrapper";const $0e={variant:"default",leftSectionPointerEvents:"none",rightSectionPointerEvents:"none",withAria:!0,withErrorStyles:!0,size:"sm"},F0e=(t,e,n)=>({wrapper:{"--input-margin-top":n.offsetTop?"calc(var(--mantine-spacing-xs) / 2)":void 0,"--input-margin-bottom":n.offsetBottom?"calc(var(--mantine-spacing-xs) / 2)":void 0,"--input-height":an(e.size,"input-height"),"--input-fz":Ur(e.size),"--input-radius":e.radius===void 0?void 0:Wn(e.radius),"--input-left-section-width":e.leftSectionWidth!==void 0?Me(e.leftSectionWidth):void 0,"--input-right-section-width":e.rightSectionWidth!==void 0?Me(e.rightSectionWidth):void 0,"--input-padding-y":e.multiline?an(e.size,"input-padding-y"):void 0,"--input-left-section-pointer-events":e.leftSectionPointerEvents,"--input-right-section-pointer-events":e.rightSectionPointerEvents}}),Hn=us((t,e)=>{const n=we("Input",$0e,t),{classNames:r,className:s,style:o,styles:i,unstyled:a,required:l,__staticSelector:c,__stylesApiProps:u,size:f,wrapperProps:h,error:m,disabled:y,leftSection:v,leftSectionProps:b,leftSectionWidth:w,rightSection:C,rightSectionProps:k,rightSectionWidth:E,rightSectionPointerEvents:j,leftSectionPointerEvents:A,variant:M,vars:_,pointer:D,multiline:R,radius:N,id:z,withAria:B,withErrorStyles:L,mod:P,inputSize:I,attributes:H,__clearSection:$,__clearable:V,__defaultRightSection:q,...U}=n,{styleProps:W,rest:Y}=bd(U),G=Am(),K={offsetBottom:G==null?void 0:G.offsetBottom,offsetTop:G==null?void 0:G.offsetTop},Q=Et({name:["Input",c],props:u||n,classes:aa,className:s,style:o,classNames:r,styles:i,unstyled:a,attributes:H,stylesCtx:K,rootSelector:"wrapper",vars:_,varsResolver:F0e}),Z=B?{required:l,disabled:y,"aria-invalid":!!m,"aria-describedby":G==null?void 0:G.describedBy,id:(G==null?void 0:G.inputId)||z}:{},J=A0e({__clearable:V,__clearSection:$,rightSection:C,__defaultRightSection:q,size:f});return d.jsx(T0e,{value:{size:f||"sm"},children:d.jsxs(ie,{...Q("wrapper"),...W,...h,mod:[{error:!!m&&L,pointer:D,disabled:y,multiline:R,"data-with-right-section":!!J,"data-with-left-section":!!v},P],variant:M,size:f,children:[v&&d.jsx("div",{...b,"data-position":"left",...Q("section",{className:b==null?void 0:b.className,style:b==null?void 0:b.style}),children:v}),d.jsx(ie,{component:"input",...Y,...Z,ref:e,required:l,mod:{disabled:y,error:!!m&&L},variant:M,__size:I,...Q("input")}),J&&d.jsx("div",{...k,"data-position":"right",...Q("section",{className:k==null?void 0:k.className,style:k==null?void 0:k.style}),children:J})]})})});Hn.classes=aa;Hn.Wrapper=Xj;Hn.Label=a4;Hn.Error=i4;Hn.Description=o4;Hn.Placeholder=Kj;Hn.ClearButton=aX;Hn.displayName="@mantine/core/Input";function lX(t,e,n){const r=we(t,e,n),{label:s,description:o,error:i,required:a,classNames:l,styles:c,className:u,unstyled:f,__staticSelector:h,__stylesApiProps:m,errorProps:y,labelProps:v,descriptionProps:b,wrapperProps:w,id:C,size:k,style:E,inputContainer:j,inputWrapperOrder:A,withAsterisk:M,variant:_,vars:D,mod:R,attributes:N,...z}=r,{styleProps:B,rest:L}=bd(z),P={label:s,description:o,error:i,required:a,classNames:l,className:u,__staticSelector:h,__stylesApiProps:m||r,errorProps:y,labelProps:v,descriptionProps:b,unstyled:f,styles:c,size:k,style:E,inputContainer:j,inputWrapperOrder:A,withAsterisk:M,variant:_,id:C,mod:R,attributes:N,...w};return{...L,classNames:l,styles:c,unstyled:f,wrapperProps:{...P,...B},inputProps:{required:a,classNames:l,styles:c,unstyled:f,size:k,__staticSelector:h,__stylesApiProps:m||r,error:i,variant:_,id:C,attributes:N}}}const z0e={__staticSelector:"InputBase",withAria:!0,size:"sm"},Pa=us((t,e)=>{const{inputProps:n,wrapperProps:r,...s}=lX("InputBase",z0e,t);return d.jsx(Hn.Wrapper,{...r,children:d.jsx(Hn,{...n,...s,ref:e})})});Pa.classes={...Hn.classes,...Hn.Wrapper.classes};Pa.displayName="@mantine/core/InputBase";const P0e={gap:{type:"spacing",property:"gap"},rowGap:{type:"spacing",property:"rowGap"},columnGap:{type:"spacing",property:"columnGap"},align:{type:"identity",property:"alignItems"},justify:{type:"identity",property:"justifyContent"},wrap:{type:"identity",property:"flexWrap"},direction:{type:"identity",property:"flexDirection"}};var cX={root:"m_8bffd616"};const xe=us((t,e)=>{const n=we("Flex",null,t),{classNames:r,className:s,style:o,styles:i,unstyled:a,vars:l,gap:c,rowGap:u,columnGap:f,align:h,justify:m,wrap:y,direction:v,attributes:b,...w}=n,C=Et({name:"Flex",classes:cX,props:n,className:s,style:o,classNames:r,styles:i,unstyled:a,attributes:b,vars:l}),k=Tr(),E=mj(),j=tK({styleProps:{gap:c,rowGap:u,columnGap:f,align:h,justify:m,wrap:y,direction:v},theme:k,data:P0e});return d.jsxs(d.Fragment,{children:[j.hasResponsiveStyles&&d.jsx(c2,{selector:`.${E}`,styles:j.styles,media:j.media}),d.jsx(ie,{ref:e,...C("root",{className:E,style:km(j.inlineStyles)}),...w})]})});xe.classes=cX;xe.displayName="@mantine/core/Flex";var uX={root:"m_96b553a6"};function B0e(t,e){if(!e||!t)return!1;let n=e.parentNode;for(;n!=null;){if(n===t)return!0;n=n.parentNode}return!1}function H0e({target:t,parent:e,ref:n,displayAfterTransitionEnd:r}){const s=S.useRef(-1),[o,i]=S.useState(!1),[a,l]=S.useState(typeof r=="boolean"?r:!1),c=()=>{if(!t||!e||!n.current)return;const m=t.getBoundingClientRect(),y=e.getBoundingClientRect(),v=window.getComputedStyle(t),b=window.getComputedStyle(e),w=Uu(v.borderTopWidth)+Uu(b.borderTopWidth),C=Uu(v.borderLeftWidth)+Uu(b.borderLeftWidth),k={top:m.top-y.top-w,left:m.left-y.left-C,width:m.width,height:m.height};n.current.style.transform=`translateY(${k.top}px) translateX(${k.left}px)`,n.current.style.width=`${k.width}px`,n.current.style.height=`${k.height}px`},u=()=>{window.clearTimeout(s.current),n.current&&(n.current.style.transitionDuration="0ms"),c(),s.current=window.setTimeout(()=>{n.current&&(n.current.style.transitionDuration="")},30)},f=S.useRef(null),h=S.useRef(null);return S.useEffect(()=>{if(c(),t)return f.current=new ResizeObserver(u),f.current.observe(t),e&&(h.current=new ResizeObserver(u),h.current.observe(e)),()=>{var m,y;(m=f.current)==null||m.disconnect(),(y=h.current)==null||y.disconnect()}},[e,t]),S.useEffect(()=>{if(e){const m=y=>{B0e(y.target,e)&&(u(),l(!1))};return e.addEventListener("transitionend",m),()=>{e.removeEventListener("transitionend",m)}}},[e]),Fpe(()=>{qpe()!=="test"&&i(!0)},20,{autoInvoke:!0}),Ppe(m=>{m.forEach(y=>{y.type==="attributes"&&y.attributeName==="dir"&&u()})},{attributes:!0,attributeFilter:["dir"]},()=>document.documentElement),{initialized:o,hidden:a}}const U0e=(t,{transitionDuration:e})=>({root:{"--transition-duration":typeof e=="number"?`${e}ms`:e}}),Zj=Be((t,e)=>{const n=we("FloatingIndicator",null,t),{classNames:r,className:s,style:o,styles:i,unstyled:a,vars:l,target:c,parent:u,transitionDuration:f,mod:h,displayAfterTransitionEnd:m,attributes:y,...v}=n,b=Et({name:"FloatingIndicator",classes:uX,props:n,className:s,style:o,classNames:r,styles:i,unstyled:a,attributes:y,vars:l,varsResolver:U0e}),w=S.useRef(null),{initialized:C,hidden:k}=H0e({target:c,parent:u,ref:w,displayAfterTransitionEnd:m}),E=Vr(e,w);return!c||!u?null:d.jsx(ie,{ref:E,mod:[{initialized:C,hidden:k},h],...b("root"),...v})});Zj.displayName="@mantine/core/FloatingIndicator";Zj.classes=uX;function dX({open:t,close:e,openDelay:n,closeDelay:r}){const s=S.useRef(-1),o=S.useRef(-1),i=()=>{window.clearTimeout(s.current),window.clearTimeout(o.current)},a=()=>{i(),n===0||n===void 0?t():s.current=window.setTimeout(t,n)},l=()=>{i(),r===0||r===void 0?e():o.current=window.setTimeout(e,r)};return S.useEffect(()=>i,[]),{openDropdown:a,closeDropdown:l}}const[V0e,Qj]=zs("Accordion component was not found in the tree");var d2={root:"m_9bdbb667",panel:"m_df78851f",content:"m_4ba554d4",itemTitle:"m_8fa820a0",control:"m_4ba585b8","control--default":"m_6939a5e9","control--contained":"m_4271d21b",label:"m_df3ffa0f",chevron:"m_3f35ae96",icon:"m_9bd771fe",item:"m_9bd7b098","item--default":"m_fe19b709","item--contained":"m_1f921b3b","item--filled":"m_2cdf939a","item--separated":"m_9f59b069"};function Nf({style:t,size:e=16,...n}){return d.jsx("svg",{viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{...t,width:Me(e),height:Me(e),display:"block"},...n,children:d.jsx("path",{d:"M3.13523 6.15803C3.3241 5.95657 3.64052 5.94637 3.84197 6.13523L7.5 9.56464L11.158 6.13523C11.3595 5.94637 11.6759 5.95657 11.8648 6.15803C12.0536 6.35949 12.0434 6.67591 11.842 6.86477L7.84197 10.6148C7.64964 10.7951 7.35036 10.7951 7.15803 10.6148L3.15803 6.86477C2.95657 6.67591 2.94637 6.35949 3.13523 6.15803Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})})}Nf.displayName="@mantine/core/AccordionChevron";const[q0e,fX]=zs("Accordion.Item component was not found in the tree"),Jj=Be((t,e)=>{const{classNames:n,className:r,style:s,styles:o,vars:i,chevron:a,icon:l,onClick:c,onKeyDown:u,children:f,disabled:h,mod:m,...y}=we("AccordionControl",null,t),{value:v}=fX(),b=Qj(),w=b.isItemActive(v),C=typeof b.order=="number",k=`h${b.order}`,E=d.jsxs(En,{...y,...b.getStyles("control",{className:r,classNames:n,style:s,styles:o,variant:b.variant}),unstyled:b.unstyled,mod:["accordion-control",{active:w,"chevron-position":b.chevronPosition,disabled:h},m],ref:e,onClick:j=>{c==null||c(j),b.onChange(v)},type:"button",disabled:h,"aria-expanded":w,"aria-controls":b.getRegionId(v),id:b.getControlId(v),onKeyDown:Hw({siblingSelector:"[data-accordion-control]",parentSelector:"[data-accordion]",activateOnFocus:!1,loop:b.loop,orientation:"vertical",onKeyDown:u}),children:[d.jsx(ie,{component:"span",mod:{rotate:!b.disableChevronRotation&&w,position:b.chevronPosition},...b.getStyles("chevron",{classNames:n,styles:o}),children:a||b.chevron}),d.jsx("span",{...b.getStyles("label",{classNames:n,styles:o}),children:f}),l&&d.jsx(ie,{component:"span",mod:{"chevron-position":b.chevronPosition},...b.getStyles("icon",{classNames:n,styles:o}),children:l})]});return C?d.jsx(k,{...b.getStyles("itemTitle",{classNames:n,styles:o}),children:E}):E});Jj.displayName="@mantine/core/AccordionControl";Jj.classes=d2;const eA=Be((t,e)=>{const{classNames:n,className:r,style:s,styles:o,vars:i,value:a,mod:l,...c}=we("AccordionItem",null,t),u=Qj();return d.jsx(q0e,{value:{value:a},children:d.jsx(ie,{ref:e,mod:[{active:u.isItemActive(a)},l],...u.getStyles("item",{className:r,classNames:n,styles:o,style:s,variant:u.variant}),...c})})});eA.displayName="@mantine/core/AccordionItem";eA.classes=d2;const tA=Be((t,e)=>{const{classNames:n,className:r,style:s,styles:o,vars:i,children:a,...l}=we("AccordionPanel",null,t),{value:c}=fX(),u=Qj();return d.jsx(tp,{ref:e,...u.getStyles("panel",{className:r,classNames:n,style:s,styles:o}),...l,in:u.isItemActive(c),transitionDuration:u.transitionDuration??200,role:"region",id:u.getRegionId(c),"aria-labelledby":u.getControlId(c),children:d.jsx("div",{...u.getStyles("content",{classNames:n,styles:o}),children:a})})});tA.displayName="@mantine/core/AccordionPanel";tA.classes=d2;const W0e={multiple:!1,disableChevronRotation:!1,chevronPosition:"right",variant:"default",chevronSize:"auto",chevronIconSize:16},Y0e=(t,{transitionDuration:e,chevronSize:n,radius:r})=>({root:{"--accordion-transition-duration":e===void 0?void 0:`${e}ms`,"--accordion-chevron-size":n===void 0?void 0:Me(n),"--accordion-radius":r===void 0?void 0:Wn(r)}});function vi(t){const e=we("Accordion",W0e,t),{classNames:n,className:r,style:s,styles:o,unstyled:i,vars:a,children:l,multiple:c,value:u,defaultValue:f,onChange:h,id:m,loop:y,transitionDuration:v,disableChevronRotation:b,chevronPosition:w,chevronSize:C,order:k,chevron:E,variant:j,radius:A,chevronIconSize:M,attributes:_,...D}=e,R=_s(m),[N,z]=ls({value:u,defaultValue:f,finalValue:c?[]:null,onChange:h}),B=I=>Array.isArray(N)?N.includes(I):I===N,L=I=>{const H=Array.isArray(N)?N.includes(I)?N.filter($=>$!==I):[...N,I]:I===N?null:I;z(H)},P=Et({name:"Accordion",classes:d2,props:e,className:r,style:s,classNames:n,styles:o,unstyled:i,attributes:_,vars:a,varsResolver:Y0e});return d.jsx(V0e,{value:{isItemActive:B,onChange:L,getControlId:Fx(`${R}-control`,"Accordion.Item component was rendered with invalid value or without value"),getRegionId:Fx(`${R}-panel`,"Accordion.Item component was rendered with invalid value or without value"),chevron:E===null?null:E||d.jsx(Nf,{size:M}),transitionDuration:v,disableChevronRotation:b,chevronPosition:w,order:k,loop:y,getStyles:P,variant:j,unstyled:i},children:d.jsx(ie,{...P("root"),id:R,...D,variant:j,"data-accordion":!0,children:l})})}const G0e=t=>t;vi.extend=G0e;vi.withProps=iK(vi);vi.classes=d2;vi.displayName="@mantine/core/Accordion";vi.Item=eA;vi.Panel=tA;vi.Control=Jj;vi.Chevron=Nf;var pX={root:"m_b6d8b162"};function K0e(t){if(t==="start")return"start";if(t==="end"||t)return"end"}const X0e={inherit:!1},Z0e=(t,{variant:e,lineClamp:n,gradient:r,size:s,color:o})=>({root:{"--text-fz":Ur(s),"--text-lh":FG(s),"--text-gradient":e==="gradient"?jE(r,t):void 0,"--text-line-clamp":typeof n=="number"?n.toString():void 0,"--text-color":o?xr(o,t):void 0}}),ue=us((t,e)=>{const n=we("Text",X0e,t),{lineClamp:r,truncate:s,inline:o,inherit:i,gradient:a,span:l,__staticSelector:c,vars:u,className:f,style:h,classNames:m,styles:y,unstyled:v,variant:b,mod:w,size:C,attributes:k,...E}=n,j=Et({name:["Text",c],props:n,classes:pX,className:f,style:h,classNames:m,styles:y,unstyled:v,attributes:k,vars:u,varsResolver:Z0e});return d.jsx(ie,{...j("root",{focusable:!0}),ref:e,component:l?"span":"p",variant:b,mod:[{"data-truncate":K0e(s),"data-line-clamp":typeof r=="number","data-inline":o,"data-inherit":i},w],size:C,...E})});ue.classes=pX;ue.displayName="@mantine/core/Text";var hX={root:"m_849cf0da"};const Q0e={underline:"hover"},Kh=us((t,e)=>{const{underline:n,className:r,unstyled:s,mod:o,...i}=we("Anchor",Q0e,t);return d.jsx(ue,{component:"a",ref:e,className:Fr({[hX.root]:!s},r),...i,mod:[{underline:n},o],__staticSelector:"Anchor",unstyled:s})});Kh.classes=hX;Kh.displayName="@mantine/core/Anchor";const[J0e,_m]=zs("AppShell was not found in tree");var wd={root:"m_89ab340",navbar:"m_45252eee",aside:"m_9cdde9a",header:"m_3b16f56b",main:"m_8983817",footer:"m_3840c879",section:"m_6dcfc7c7"};const nA=Be((t,e)=>{const{classNames:n,className:r,style:s,styles:o,unstyled:i,vars:a,withBorder:l,zIndex:c,mod:u,...f}=we("AppShellAside",null,t),h=_m();return h.disabled?null:d.jsx(ie,{component:"aside",ref:e,mod:[{"with-border":l??h.withBorder},u],...h.getStyles("aside",{className:Fr({[Df.classNames.zeroRight]:h.offsetScrollbars},r),classNames:n,styles:o,style:s}),...f,__vars:{"--app-shell-aside-z-index":`calc(${c??h.zIndex} + 1)`}})});nA.classes=wd;nA.displayName="@mantine/core/AppShellAside";const rA=Be((t,e)=>{var m;const{classNames:n,className:r,style:s,styles:o,unstyled:i,vars:a,withBorder:l,zIndex:c,mod:u,...f}=we("AppShellFooter",null,t),h=_m();return h.disabled?null:d.jsx(ie,{component:"footer",ref:e,mod:[{"with-border":l??h.withBorder},u],...h.getStyles("footer",{className:Fr({[Df.classNames.zeroRight]:h.offsetScrollbars},r),classNames:n,styles:o,style:s}),...f,__vars:{"--app-shell-footer-z-index":(m=c??h.zIndex)==null?void 0:m.toString()}})});rA.classes=wd;rA.displayName="@mantine/core/AppShellFooter";const sA=Be((t,e)=>{var m;const{classNames:n,className:r,style:s,styles:o,unstyled:i,vars:a,withBorder:l,zIndex:c,mod:u,...f}=we("AppShellHeader",null,t),h=_m();return h.disabled?null:d.jsx(ie,{component:"header",ref:e,mod:[{"with-border":l??h.withBorder},u],...h.getStyles("header",{className:Fr({[Df.classNames.zeroRight]:h.offsetScrollbars},r),classNames:n,styles:o,style:s}),...f,__vars:{"--app-shell-header-z-index":(m=c??h.zIndex)==null?void 0:m.toString()}})});sA.classes=wd;sA.displayName="@mantine/core/AppShellHeader";const oA=Be((t,e)=>{const{classNames:n,className:r,style:s,styles:o,vars:i,...a}=we("AppShellMain",null,t),l=_m();return d.jsx(ie,{component:"main",ref:e,...l.getStyles("main",{className:r,style:s,classNames:n,styles:o}),...a})});oA.classes=wd;oA.displayName="@mantine/core/AppShellMain";function f2(t){return typeof t=="object"?t.base:t}function p2(t){const e=typeof t=="object"&&t!==null&&typeof t.base<"u"&&Object.keys(t).length===1;return typeof t=="number"||typeof t=="string"||e}function h2(t){return!(typeof t!="object"||t===null||Object.keys(t).length===1&&"base"in t)}function ege({baseStyles:t,minMediaStyles:e,maxMediaStyles:n,aside:r,theme:s,mode:o}){var c,u,f;const i=r==null?void 0:r.width,a="translateX(var(--app-shell-aside-width))",l="translateX(calc(var(--app-shell-aside-width) * -1))";if(r!=null&&r.breakpoint&&!((c=r==null?void 0:r.collapsed)!=null&&c.mobile)&&(n[r==null?void 0:r.breakpoint]=n[r==null?void 0:r.breakpoint]||{},o==="fixed"?(n[r==null?void 0:r.breakpoint]["--app-shell-aside-width"]="100%",n[r==null?void 0:r.breakpoint]["--app-shell-aside-offset"]="0px"):(n[r==null?void 0:r.breakpoint]["--app-shell-aside-width"]="0px",n[r==null?void 0:r.breakpoint]["--app-shell-aside-offset"]="0px")),p2(i)){const h=Me(f2(i));t["--app-shell-aside-width"]=h,t["--app-shell-aside-offset"]=h}if(h2(i)&&(typeof i.base<"u"&&(t["--app-shell-aside-width"]=Me(i.base),t["--app-shell-aside-offset"]=Me(i.base)),as(i).forEach(h=>{h!=="base"&&(e[h]=e[h]||{},e[h]["--app-shell-aside-width"]=Me(i[h]),e[h]["--app-shell-aside-offset"]=Me(i[h]))})),r!=null&&r.breakpoint&&o==="static"&&(e[r.breakpoint]=e[r.breakpoint]||{},e[r.breakpoint]["--app-shell-aside-position"]="sticky",e[r.breakpoint]["--app-shell-aside-grid-row"]="2",e[r.breakpoint]["--app-shell-aside-grid-column"]="3",e[r.breakpoint]["--app-shell-main-column-end"]="3"),(u=r==null?void 0:r.collapsed)!=null&&u.desktop){const h=r.breakpoint;e[h]=e[h]||{},e[h]["--app-shell-aside-transform"]=a,e[h]["--app-shell-aside-transform-rtl"]=l,o==="fixed"?e[h]["--app-shell-aside-offset"]="0px !important":(e[h]["--app-shell-aside-width"]="0px",e[h]["--app-shell-aside-display"]="none",e[h]["--app-shell-main-column-end"]="-1"),e[h]["--app-shell-aside-scroll-locked-visibility"]="hidden"}if((f=r==null?void 0:r.collapsed)!=null&&f.mobile){const h=uj(r.breakpoint,s.breakpoints)-.1;n[h]=n[h]||{},o==="fixed"?(n[h]["--app-shell-aside-width"]="100%",n[h]["--app-shell-aside-offset"]="0px"):n[h]["--app-shell-aside-width"]="0px",n[h]["--app-shell-aside-transform"]=a,n[h]["--app-shell-aside-transform-rtl"]=l,n[h]["--app-shell-aside-scroll-locked-visibility"]="hidden"}}function tge({baseStyles:t,minMediaStyles:e,footer:n,mode:r}){const s=n==null?void 0:n.height,o="translateY(var(--app-shell-footer-height))",i=r==="static"?!0:(n==null?void 0:n.offset)??!0;if(r==="static"&&n&&(t["--app-shell-footer-position"]="sticky",t["--app-shell-footer-grid-column"]="1 / -1",t["--app-shell-footer-grid-row"]="3"),p2(s)){const a=Me(f2(s));t["--app-shell-footer-height"]=a,i&&(t["--app-shell-footer-offset"]=a)}h2(s)&&(typeof s.base<"u"&&(t["--app-shell-footer-height"]=Me(s.base),i&&(t["--app-shell-footer-offset"]=Me(s.base))),as(s).forEach(a=>{a!=="base"&&(e[a]=e[a]||{},e[a]["--app-shell-footer-height"]=Me(s[a]),i&&(e[a]["--app-shell-footer-offset"]=Me(s[a])))})),n!=null&&n.collapsed&&(t["--app-shell-footer-transform"]=o,r==="fixed"&&(t["--app-shell-footer-offset"]="0px !important"))}function nge({baseStyles:t,minMediaStyles:e,header:n,mode:r}){const s=n==null?void 0:n.height,o="translateY(calc(var(--app-shell-header-height) * -1))",i=r==="static"?!0:(n==null?void 0:n.offset)??!0;if(r==="static"&&n&&(t["--app-shell-header-position"]="sticky",t["--app-shell-header-grid-column"]="1 / -1",t["--app-shell-header-grid-row"]="1"),p2(s)){const a=Me(f2(s));t["--app-shell-header-height"]=a,i&&(t["--app-shell-header-offset"]=a)}h2(s)&&(typeof s.base<"u"&&(t["--app-shell-header-height"]=Me(s.base),i&&(t["--app-shell-header-offset"]=Me(s.base))),as(s).forEach(a=>{a!=="base"&&(e[a]=e[a]||{},e[a]["--app-shell-header-height"]=Me(s[a]),i&&(e[a]["--app-shell-header-offset"]=Me(s[a])))})),n!=null&&n.collapsed&&(t["--app-shell-header-transform"]=o,r==="fixed"&&(t["--app-shell-header-offset"]="0px !important"))}function rge({baseStyles:t,minMediaStyles:e,maxMediaStyles:n,navbar:r,theme:s,mode:o}){var c,u,f;const i=r==null?void 0:r.width,a="translateX(calc(var(--app-shell-navbar-width) * -1))",l="translateX(var(--app-shell-navbar-width))";if(r!=null&&r.breakpoint&&!((c=r==null?void 0:r.collapsed)!=null&&c.mobile)&&(n[r==null?void 0:r.breakpoint]=n[r==null?void 0:r.breakpoint]||{},n[r==null?void 0:r.breakpoint]["--app-shell-navbar-offset"]="0px",n[r==null?void 0:r.breakpoint]["--app-shell-navbar-width"]="100%",o==="static"&&(n[r==null?void 0:r.breakpoint]["--app-shell-navbar-grid-width"]="0px")),p2(i)){const h=Me(f2(i));t["--app-shell-navbar-width"]=h,t["--app-shell-navbar-offset"]=h,o==="static"&&(t["--app-shell-navbar-grid-width"]=h)}if(h2(i)&&(typeof i.base<"u"&&(t["--app-shell-navbar-width"]=Me(i.base),t["--app-shell-navbar-offset"]=Me(i.base),o==="static"&&(t["--app-shell-navbar-grid-width"]=Me(i.base))),as(i).forEach(h=>{h!=="base"&&(e[h]=e[h]||{},e[h]["--app-shell-navbar-width"]=Me(i[h]),e[h]["--app-shell-navbar-offset"]=Me(i[h]),o==="static"&&(e[h]["--app-shell-navbar-grid-width"]=Me(i[h])))})),r!=null&&r.breakpoint&&o==="static"&&(e[r.breakpoint]=e[r.breakpoint]||{},e[r.breakpoint]["--app-shell-navbar-position"]="sticky",e[r.breakpoint]["--app-shell-navbar-grid-row"]="2",e[r.breakpoint]["--app-shell-navbar-grid-column"]="1",e[r.breakpoint]["--app-shell-main-column-start"]="2"),(u=r==null?void 0:r.collapsed)!=null&&u.desktop){const h=r.breakpoint;e[h]=e[h]||{},e[h]["--app-shell-navbar-transform"]=a,e[h]["--app-shell-navbar-transform-rtl"]=l,o==="fixed"?e[h]["--app-shell-navbar-offset"]="0px !important":(e[h]["--app-shell-navbar-width"]="0px",e[h]["--app-shell-navbar-display"]="none",e[h]["--app-shell-main-column-start"]="1")}if((f=r==null?void 0:r.collapsed)!=null&&f.mobile){const h=uj(r.breakpoint,s.breakpoints)-.1;n[h]=n[h]||{},n[h]["--app-shell-navbar-width"]="100%",n[h]["--app-shell-navbar-offset"]="0px",o==="static"&&(n[h]["--app-shell-navbar-grid-width"]="0px"),n[h]["--app-shell-navbar-transform"]=a,n[h]["--app-shell-navbar-transform-rtl"]=l}}function G6(t){return Number(t)===0?"0px":ss(t)}function sge({padding:t,baseStyles:e,minMediaStyles:n}){p2(t)&&(e["--app-shell-padding"]=G6(f2(t))),h2(t)&&(t.base&&(e["--app-shell-padding"]=G6(t.base)),as(t).forEach(r=>{r!=="base"&&(n[r]=n[r]||{},n[r]["--app-shell-padding"]=G6(t[r]))}))}function oge({navbar:t,header:e,footer:n,aside:r,padding:s,theme:o,mode:i}){const a={},l={},c={};i==="static"&&(c["--app-shell-main-grid-column"]="1 / -1",c["--app-shell-main-grid-row"]="2"),rge({baseStyles:c,minMediaStyles:a,maxMediaStyles:l,navbar:t,theme:o,mode:i}),ege({baseStyles:c,minMediaStyles:a,maxMediaStyles:l,aside:r,theme:o,mode:i}),nge({baseStyles:c,minMediaStyles:a,header:e,mode:i}),tge({baseStyles:c,minMediaStyles:a,footer:n,mode:i}),sge({baseStyles:c,minMediaStyles:a,padding:s});const u=TE(as(a),o.breakpoints).map(m=>({query:`(min-width: ${Uh(m.px)})`,styles:a[m.value]})),f=TE(as(l),o.breakpoints).map(m=>({query:`(max-width: ${Uh(m.px)})`,styles:l[m.value]})),h=[...u,...f];return{baseStyles:c,media:h}}function ige({navbar:t,header:e,aside:n,footer:r,padding:s,mode:o,selector:i}){const a=Tr(),l=Nc(),{media:c,baseStyles:u}=oge({navbar:t,header:e,footer:r,aside:n,padding:s,theme:a,mode:o});return d.jsx(c2,{media:c,styles:u,selector:i||l.cssVariablesSelector})}const iA=Be((t,e)=>{const{classNames:n,className:r,style:s,styles:o,unstyled:i,vars:a,withBorder:l,zIndex:c,mod:u,...f}=we("AppShellNavbar",null,t),h=_m();return h.disabled?null:d.jsx(ie,{component:"nav",ref:e,mod:[{"with-border":l??h.withBorder},u],...h.getStyles("navbar",{className:r,classNames:n,styles:o,style:s}),...f,__vars:{"--app-shell-navbar-z-index":`calc(${c??h.zIndex} + 1)`}})});iA.classes=wd;iA.displayName="@mantine/core/AppShellNavbar";const aA=us((t,e)=>{const{classNames:n,className:r,style:s,styles:o,vars:i,grow:a,mod:l,...c}=we("AppShellSection",null,t),u=_m();return d.jsx(ie,{ref:e,mod:[{grow:a},l],...u.getStyles("section",{className:r,style:s,classNames:n,styles:o}),...c})});aA.classes=wd;aA.displayName="@mantine/core/AppShellSection";function age({transitionDuration:t,disabled:e}){const[n,r]=S.useState(!0),s=S.useRef(-1),o=S.useRef(-1);return Tc("resize",()=>{r(!0),clearTimeout(s.current),s.current=window.setTimeout(()=>S.startTransition(()=>{r(!1)}),200)}),yd(()=>{r(!0),clearTimeout(o.current),o.current=window.setTimeout(()=>S.startTransition(()=>{r(!1)}),t||0)},[e,t]),n}const lge={withBorder:!0,padding:0,transitionDuration:200,transitionTimingFunction:"ease",zIndex:Ps("app"),mode:"fixed"},cge=(t,{transitionDuration:e,transitionTimingFunction:n})=>({root:{"--app-shell-transition-duration":`${e}ms`,"--app-shell-transition-timing-function":n}}),$r=Be((t,e)=>{const n=we("AppShell",lge,t),{classNames:r,className:s,style:o,styles:i,unstyled:a,vars:l,navbar:c,withBorder:u,padding:f,transitionDuration:h,transitionTimingFunction:m,header:y,zIndex:v,layout:b,disabled:w,aside:C,footer:k,offsetScrollbars:E=!0,mode:j,mod:A,attributes:M,id:_,...D}=n,R=Et({name:"AppShell",classes:wd,props:n,className:s,style:o,classNames:r,styles:i,unstyled:a,attributes:M,vars:l,varsResolver:cge}),N=age({disabled:w,transitionDuration:h}),z=_s(_);return d.jsxs(J0e,{value:{getStyles:R,withBorder:u,zIndex:v,disabled:w,offsetScrollbars:E,mode:j},children:[d.jsx(ige,{navbar:c,header:y,aside:C,footer:k,padding:f,mode:j,selector:j==="static"?`#${z}`:void 0}),d.jsx(ie,{ref:e,...R("root"),mod:[{resizing:N,layout:b,disabled:w,mode:j},A],id:z,...D})]})});$r.classes=wd;$r.displayName="@mantine/core/AppShell";$r.Navbar=iA;$r.Header=sA;$r.Main=oA;$r.Aside=nA;$r.Footer=rA;$r.Section=aA;function mX(t){return typeof t=="string"?{value:t,label:t}:"value"in t&&!("label"in t)?{value:t.value,label:t.value,disabled:t.disabled}:typeof t=="number"?{value:t.toString(),label:t.toString()}:"group"in t?{group:t.group,items:t.items.map(e=>mX(e))}:t}function gX(t){return t?t.map(e=>mX(e)):[]}function lA(t){return t.reduce((e,n)=>"group"in n?{...e,...lA(n.items)}:(e[n.value]=n,e),{})}var _o={dropdown:"m_88b62a41",search:"m_985517d8",options:"m_b2821a6e",option:"m_92253aa5",empty:"m_2530cd1d",header:"m_858f94bd",footer:"m_82b967cb",group:"m_254f3e4f",groupLabel:"m_2bb2e9e5",chevron:"m_2943220b",optionsDropdownOption:"m_390b5f4",optionsDropdownCheckIcon:"m_8ee53fc2",optionsDropdownCheckPlaceholder:"m_a530ee0a"};const uge={error:null},dge=(t,{size:e,color:n})=>({chevron:{"--combobox-chevron-size":an(e,"combobox-chevron-size"),"--combobox-chevron-color":n?xr(n,t):void 0}}),cA=Be((t,e)=>{const n=we("ComboboxChevron",uge,t),{size:r,error:s,style:o,className:i,classNames:a,styles:l,unstyled:c,vars:u,mod:f,...h}=n,m=Et({name:"ComboboxChevron",classes:_o,props:n,style:o,className:i,classNames:a,styles:l,unstyled:c,vars:u,varsResolver:dge,rootSelector:"chevron"});return d.jsx(ie,{component:"svg",...h,...m("chevron"),size:r,viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",mod:["combobox-chevron",{error:s},f],ref:e,children:d.jsx("path",{d:"M4.93179 5.43179C4.75605 5.60753 4.75605 5.89245 4.93179 6.06819C5.10753 6.24392 5.39245 6.24392 5.56819 6.06819L7.49999 4.13638L9.43179 6.06819C9.60753 6.24392 9.89245 6.24392 10.0682 6.06819C10.2439 5.89245 10.2439 5.60753 10.0682 5.43179L7.81819 3.18179C7.73379 3.0974 7.61933 3.04999 7.49999 3.04999C7.38064 3.04999 7.26618 3.0974 7.18179 3.18179L4.93179 5.43179ZM10.0682 9.56819C10.2439 9.39245 10.2439 9.10753 10.0682 8.93179C9.89245 8.75606 9.60753 8.75606 9.43179 8.93179L7.49999 10.8636L5.56819 8.93179C5.39245 8.75606 5.10753 8.75606 4.93179 8.93179C4.75605 9.10753 4.75605 9.39245 4.93179 9.56819L7.18179 11.8182C7.35753 11.9939 7.64245 11.9939 7.81819 11.8182L10.0682 9.56819Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})})});cA.classes=_o;cA.displayName="@mantine/core/ComboboxChevron";const[fge,la]=zs("Combobox component was not found in tree"),yX=S.forwardRef(({size:t,onMouseDown:e,onClick:n,onClear:r,...s},o)=>d.jsx(Hn.ClearButton,{ref:o,tabIndex:-1,"aria-hidden":!0,...s,onMouseDown:i=>{i.preventDefault(),e==null||e(i)},onClick:i=>{r(),n==null||n(i)}}));yX.displayName="@mantine/core/ComboboxClearButton";const uA=Be((t,e)=>{const{classNames:n,styles:r,className:s,style:o,hidden:i,...a}=we("ComboboxDropdown",null,t),l=la();return d.jsx(Dt.Dropdown,{...a,ref:e,role:"presentation","data-hidden":i||void 0,...l.getStyles("dropdown",{className:s,style:o,classNames:n,styles:r})})});uA.classes=_o;uA.displayName="@mantine/core/ComboboxDropdown";const pge={refProp:"ref"},vX=Be((t,e)=>{const{children:n,refProp:r}=we("ComboboxDropdownTarget",pge,t);if(la(),!i2(n))throw new Error("Combobox.DropdownTarget component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported");return d.jsx(Dt.Target,{ref:e,refProp:r,children:n})});vX.displayName="@mantine/core/ComboboxDropdownTarget";const dA=Be((t,e)=>{const{classNames:n,className:r,style:s,styles:o,vars:i,...a}=we("ComboboxEmpty",null,t),l=la();return d.jsx(ie,{ref:e,...l.getStyles("empty",{className:r,classNames:n,styles:o,style:s}),...a})});dA.classes=_o;dA.displayName="@mantine/core/ComboboxEmpty";function fA({onKeyDown:t,withKeyboardNavigation:e,withAriaAttributes:n,withExpandedAttribute:r,targetType:s,autoComplete:o}){const i=la(),[a,l]=S.useState(null),c=f=>{if(t==null||t(f),!i.readOnly&&e){if(f.nativeEvent.isComposing)return;if(f.nativeEvent.code==="ArrowDown"&&(f.preventDefault(),i.store.dropdownOpened?l(i.store.selectNextOption()):(i.store.openDropdown("keyboard"),l(i.store.selectActiveOption()),i.store.updateSelectedOptionIndex("selected",{scrollIntoView:!0}))),f.nativeEvent.code==="ArrowUp"&&(f.preventDefault(),i.store.dropdownOpened?l(i.store.selectPreviousOption()):(i.store.openDropdown("keyboard"),l(i.store.selectActiveOption()),i.store.updateSelectedOptionIndex("selected",{scrollIntoView:!0}))),f.nativeEvent.code==="Enter"||f.nativeEvent.code==="NumpadEnter"){if(f.nativeEvent.keyCode===229)return;const h=i.store.getSelectedOptionIndex();i.store.dropdownOpened&&h!==-1?(f.preventDefault(),i.store.clickSelectedOption()):s==="button"&&(f.preventDefault(),i.store.openDropdown("keyboard"))}f.key==="Escape"&&i.store.closeDropdown("keyboard"),f.nativeEvent.code==="Space"&&s==="button"&&(f.preventDefault(),i.store.toggleDropdown("keyboard"))}};return{...n?{"aria-haspopup":"listbox","aria-expanded":r?!!(i.store.listId&&i.store.dropdownOpened):void 0,"aria-controls":i.store.dropdownOpened&&i.store.listId?i.store.listId:void 0,"aria-activedescendant":i.store.dropdownOpened&&a||void 0,autoComplete:o,"data-expanded":i.store.dropdownOpened||void 0,"data-mantine-stop-propagation":i.store.dropdownOpened||void 0}:{},onKeyDown:c}}const hge={refProp:"ref",targetType:"input",withKeyboardNavigation:!0,withAriaAttributes:!0,withExpandedAttribute:!1,autoComplete:"off"},bX=Be((t,e)=>{const{children:n,refProp:r,withKeyboardNavigation:s,withAriaAttributes:o,withExpandedAttribute:i,targetType:a,autoComplete:l,...c}=we("ComboboxEventsTarget",hge,t),u=vd(n);if(!u)throw new Error("Combobox.EventsTarget component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported");const f=la(),h=fA({targetType:a,withAriaAttributes:o,withKeyboardNavigation:s,withExpandedAttribute:i,onKeyDown:u.props.onKeyDown,autoComplete:l});return S.cloneElement(u,{...h,...c,[r]:Vr(e,f.store.targetRef,qw(u))})});bX.displayName="@mantine/core/ComboboxEventsTarget";const pA=Be((t,e)=>{const{classNames:n,className:r,style:s,styles:o,vars:i,...a}=we("ComboboxFooter",null,t),l=la();return d.jsx(ie,{ref:e,...l.getStyles("footer",{className:r,classNames:n,style:s,styles:o}),...a,onMouseDown:c=>{c.preventDefault()}})});pA.classes=_o;pA.displayName="@mantine/core/ComboboxFooter";const hA=Be((t,e)=>{const{classNames:n,className:r,style:s,styles:o,vars:i,children:a,label:l,id:c,...u}=we("ComboboxGroup",null,t),f=la(),h=_s(c);return d.jsxs(ie,{ref:e,role:"group","aria-labelledby":l?h:void 0,...f.getStyles("group",{className:r,classNames:n,style:s,styles:o}),...u,children:[l&&d.jsx("div",{id:h,...f.getStyles("groupLabel",{classNames:n,styles:o}),children:l}),a]})});hA.classes=_o;hA.displayName="@mantine/core/ComboboxGroup";const mA=Be((t,e)=>{const{classNames:n,className:r,style:s,styles:o,vars:i,...a}=we("ComboboxHeader",null,t),l=la();return d.jsx(ie,{ref:e,...l.getStyles("header",{className:r,classNames:n,style:s,styles:o}),...a,onMouseDown:c=>{c.preventDefault()}})});mA.classes=_o;mA.displayName="@mantine/core/ComboboxHeader";function xX({value:t,valuesDivider:e=",",...n}){return d.jsx("input",{type:"hidden",value:Array.isArray(t)?t.join(e):t||"",...n})}xX.displayName="@mantine/core/ComboboxHiddenInput";const gA=Be((t,e)=>{const n=we("ComboboxOption",null,t),{classNames:r,className:s,style:o,styles:i,vars:a,onClick:l,id:c,active:u,onMouseDown:f,onMouseOver:h,disabled:m,selected:y,mod:v,...b}=n,w=la(),C=S.useId(),k=c||C;return d.jsx(ie,{...w.getStyles("option",{className:s,classNames:r,styles:i,style:o}),...b,ref:e,id:k,mod:["combobox-option",{"combobox-active":u,"combobox-disabled":m,"combobox-selected":y},v],role:"option",onClick:E=>{var j;m?E.preventDefault():((j=w.onOptionSubmit)==null||j.call(w,n.value,n),l==null||l(E))},onMouseDown:E=>{E.preventDefault(),f==null||f(E)},onMouseOver:E=>{w.resetSelectionOnOptionHover&&w.store.resetSelectedOption(),h==null||h(E)}})});gA.classes=_o;gA.displayName="@mantine/core/ComboboxOption";const yA=Be((t,e)=>{const n=we("ComboboxOptions",null,t),{classNames:r,className:s,style:o,styles:i,id:a,onMouseDown:l,labelledBy:c,...u}=n,f=la(),h=_s(a);return S.useEffect(()=>{f.store.setListId(h)},[h]),d.jsx(ie,{ref:e,...f.getStyles("options",{className:s,style:o,classNames:r,styles:i}),...u,id:h,role:"listbox","aria-labelledby":c,onMouseDown:m=>{m.preventDefault(),l==null||l(m)}})});yA.classes=_o;yA.displayName="@mantine/core/ComboboxOptions";const mge={withAriaAttributes:!0,withKeyboardNavigation:!0},vA=Be((t,e)=>{const n=we("ComboboxSearch",mge,t),{classNames:r,styles:s,unstyled:o,vars:i,withAriaAttributes:a,onKeyDown:l,withKeyboardNavigation:c,size:u,...f}=n,h=la(),m=h.getStyles("search"),y=fA({targetType:"input",withAriaAttributes:a,withKeyboardNavigation:c,withExpandedAttribute:!1,onKeyDown:l,autoComplete:"off"});return d.jsx(Hn,{ref:Vr(e,h.store.searchRef),classNames:[{input:m.className},r],styles:[{input:m.style},s],size:u||h.size,...y,...f,__staticSelector:"Combobox"})});vA.classes=_o;vA.displayName="@mantine/core/ComboboxSearch";const gge={refProp:"ref",targetType:"input",withKeyboardNavigation:!0,withAriaAttributes:!0,withExpandedAttribute:!1,autoComplete:"off"},wX=Be((t,e)=>{const{children:n,refProp:r,withKeyboardNavigation:s,withAriaAttributes:o,withExpandedAttribute:i,targetType:a,autoComplete:l,...c}=we("ComboboxTarget",gge,t),u=vd(n);if(!u)throw new Error("Combobox.Target component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported");const f=la(),h=fA({targetType:a,withAriaAttributes:o,withKeyboardNavigation:s,withExpandedAttribute:i,onKeyDown:u.props.onKeyDown,autoComplete:l}),m=S.cloneElement(u,{...h,...c});return d.jsx(Dt.Target,{ref:Vr(e,f.store.targetRef),children:m})});wX.displayName="@mantine/core/ComboboxTarget";function yge(t,e,n){for(let r=t-1;r>=0;r-=1)if(!e[r].hasAttribute("data-combobox-disabled"))return r;if(n){for(let r=e.length-1;r>-1;r-=1)if(!e[r].hasAttribute("data-combobox-disabled"))return r}return t}function vge(t,e,n){for(let r=t+1;r<e.length;r+=1)if(!e[r].hasAttribute("data-combobox-disabled"))return r;if(n){for(let r=0;r<e.length;r+=1)if(!e[r].hasAttribute("data-combobox-disabled"))return r}return t}function bge(t){for(let e=0;e<t.length;e+=1)if(!t[e].hasAttribute("data-combobox-disabled"))return e;return-1}function zc({defaultOpened:t,opened:e,onOpenedChange:n,onDropdownClose:r,onDropdownOpen:s,loop:o=!0,scrollBehavior:i="instant"}={}){const[a,l]=ls({value:e,defaultValue:t,finalValue:!1,onChange:n}),c=S.useRef(null),u=S.useRef(-1),f=S.useRef(null),h=S.useRef(null),m=S.useRef(-1),y=S.useRef(-1),v=S.useRef(-1),b=S.useCallback((I="unknown")=>{a||(l(!0),s==null||s(I))},[l,s,a]),w=S.useCallback((I="unknown")=>{a&&(l(!1),r==null||r(I))},[l,r,a]),C=S.useCallback((I="unknown")=>{a?w(I):b(I)},[w,b,a]),k=S.useCallback(()=>{const I=wu(h.current),H=Ub(`#${c.current} [data-combobox-selected]`,I);H==null||H.removeAttribute("data-combobox-selected"),H==null||H.removeAttribute("aria-selected")},[]),E=S.useCallback(I=>{const H=wu(h.current),$=Ub(`#${c.current}`,H),V=$?Tu("[data-combobox-option]",$):null;if(!V)return null;const q=I>=V.length?0:I<0?V.length-1:I;return u.current=q,V!=null&&V[q]&&!V[q].hasAttribute("data-combobox-disabled")?(k(),V[q].setAttribute("data-combobox-selected","true"),V[q].setAttribute("aria-selected","true"),V[q].scrollIntoView({block:"nearest",behavior:i}),V[q].id):null},[i,k]),j=S.useCallback(()=>{const I=wu(h.current),H=Ub(`#${c.current} [data-combobox-active]`,I);if(H){const V=Tu(`#${c.current} [data-combobox-option]`,I).findIndex(q=>q===H);return E(V)}return E(0)},[E]),A=S.useCallback(()=>{const I=wu(h.current),H=Tu(`#${c.current} [data-combobox-option]`,I);return E(vge(u.current,H,o))},[E,o]),M=S.useCallback(()=>{const I=wu(h.current),H=Tu(`#${c.current} [data-combobox-option]`,I);return E(yge(u.current,H,o))},[E,o]),_=S.useCallback(()=>{const I=wu(h.current),H=Tu(`#${c.current} [data-combobox-option]`,I);return E(bge(H))},[E]),D=S.useCallback((I="selected",H)=>{v.current=window.setTimeout(()=>{var U;const $=wu(h.current),V=Tu(`#${c.current} [data-combobox-option]`,$),q=V.findIndex(W=>W.hasAttribute(`data-combobox-${I}`));u.current=q,H!=null&&H.scrollIntoView&&((U=V[q])==null||U.scrollIntoView({block:"nearest",behavior:i}))},0)},[]),R=S.useCallback(()=>{u.current=-1,k()},[k]),N=S.useCallback(()=>{const I=wu(h.current),H=Tu(`#${c.current} [data-combobox-option]`,I),$=H==null?void 0:H[u.current];$==null||$.click()},[]),z=S.useCallback(I=>{c.current=I},[]),B=S.useCallback(()=>{m.current=window.setTimeout(()=>{var I;return(I=f.current)==null?void 0:I.focus()},0)},[]),L=S.useCallback(()=>{y.current=window.setTimeout(()=>{var I;return(I=h.current)==null?void 0:I.focus()},0)},[]),P=S.useCallback(()=>u.current,[]);return S.useEffect(()=>()=>{window.clearTimeout(m.current),window.clearTimeout(y.current),window.clearTimeout(v.current)},[]),{dropdownOpened:a,openDropdown:b,closeDropdown:w,toggleDropdown:C,selectedOptionIndex:u.current,getSelectedOptionIndex:P,selectOption:E,selectFirstOption:_,selectActiveOption:j,selectNextOption:A,selectPreviousOption:M,resetSelectedOption:R,updateSelectedOptionIndex:D,listId:c.current,setListId:z,clickSelectedOption:N,searchRef:f,focusSearchInput:B,targetRef:h,focusTarget:L}}const xge={keepMounted:!0,withinPortal:!0,resetSelectionOnOptionHover:!1,width:"target",transitionProps:{transition:"fade",duration:0},size:"sm"},wge=(t,{size:e,dropdownPadding:n})=>({options:{"--combobox-option-fz":Ur(e),"--combobox-option-padding":an(e,"combobox-option-padding")},dropdown:{"--combobox-padding":n===void 0?void 0:Me(n),"--combobox-option-fz":Ur(e),"--combobox-option-padding":an(e,"combobox-option-padding")}});function Ft(t){const e=we("Combobox",xge,t),{classNames:n,styles:r,unstyled:s,children:o,store:i,vars:a,onOptionSubmit:l,onClose:c,size:u,dropdownPadding:f,resetSelectionOnOptionHover:h,__staticSelector:m,readOnly:y,attributes:v,...b}=e,w=zc(),C=i||w,k=Et({name:m||"Combobox",classes:_o,props:e,classNames:n,styles:r,unstyled:s,attributes:v,vars:a,varsResolver:wge}),E=()=>{c==null||c(),C.closeDropdown()};return d.jsx(fge,{value:{getStyles:k,store:C,onOptionSubmit:l,size:u,resetSelectionOnOptionHover:h,readOnly:y},children:d.jsx(Dt,{opened:C.dropdownOpened,preventPositionChangeWhenVisible:!1,...b,onChange:j=>!j&&E(),withRoles:!1,unstyled:s,children:o})})}const Sge=t=>t;Ft.extend=Sge;Ft.classes=_o;Ft.displayName="@mantine/core/Combobox";Ft.Target=wX;Ft.Dropdown=uA;Ft.Options=yA;Ft.Option=gA;Ft.Search=vA;Ft.Empty=dA;Ft.Chevron=cA;Ft.Footer=pA;Ft.Header=mA;Ft.EventsTarget=bX;Ft.DropdownTarget=vX;Ft.Group=hA;Ft.ClearButton=yX;Ft.HiddenInput=xX;var SX={root:"m_5f75b09e",body:"m_5f6e695e",labelWrapper:"m_d3ea56bb",label:"m_8ee546b8",description:"m_328f68c0",error:"m_8e8a99cc"};const CX=SX,l4=S.forwardRef(({__staticSelector:t,__stylesApiProps:e,className:n,classNames:r,styles:s,unstyled:o,children:i,label:a,description:l,id:c,disabled:u,error:f,size:h,labelPosition:m="left",bodyElement:y="div",labelElement:v="label",variant:b,style:w,vars:C,mod:k,attributes:E,...j},A)=>{const M=Et({name:t,props:e,className:n,style:w,classes:SX,classNames:r,styles:s,unstyled:o,attributes:E});return d.jsx(ie,{...M("root"),ref:A,__vars:{"--label-fz":Ur(h),"--label-lh":an(h,"label-lh")},mod:[{"label-position":m},k],variant:b,size:h,...j,children:d.jsxs(ie,{component:y,htmlFor:y==="label"?c:void 0,...M("body"),children:[i,d.jsxs("div",{...M("labelWrapper"),"data-disabled":u||void 0,children:[a&&d.jsx(ie,{component:v,htmlFor:v==="label"?c:void 0,...M("label"),"data-disabled":u||void 0,children:a}),l&&d.jsx(Hn.Description,{size:h,__inheritStyles:!1,...M("description"),children:l}),f&&typeof f!="boolean"&&d.jsx(Hn.Error,{size:h,__inheritStyles:!1,...M("error"),children:f})]})]})})});l4.displayName="@mantine/core/InlineInput";var kX={root:"m_bf2d988c",inner:"m_26062bec",input:"m_26063560",icon:"m_bf295423","input--outline":"m_215c4542"};const EX=S.createContext(null),Cge=EX.Provider,TX=()=>S.useContext(EX),[kge,Ege]=za();var MX={card:"m_26775b0a"};const Tge={withBorder:!0},Mge=(t,{radius:e})=>({card:{"--card-radius":Wn(e)}}),bA=Be((t,e)=>{const n=we("CheckboxCard",Tge,t),{classNames:r,className:s,style:o,styles:i,unstyled:a,vars:l,checked:c,mod:u,withBorder:f,value:h,onClick:m,defaultChecked:y,onChange:v,attributes:b,...w}=n,C=Et({name:"CheckboxCard",classes:MX,props:n,className:s,style:o,classNames:r,styles:i,unstyled:a,attributes:b,vars:l,varsResolver:Mge,rootSelector:"card"}),k=TX(),E=typeof c=="boolean"?c:k?k.value.includes(h||""):void 0,[j,A]=ls({value:E,defaultValue:y,finalValue:!1,onChange:v});return d.jsx(kge,{value:{checked:j},children:d.jsx(En,{ref:e,mod:[{"with-border":f,checked:j},u],...C("card"),...w,role:"checkbox","aria-checked":j,onClick:M=>{m==null||m(M),k==null||k.onChange(h||""),A(!j)}})})});bA.displayName="@mantine/core/CheckboxCard";bA.classes=MX;function xA({children:t,role:e}){const n=Am();return n?d.jsx("div",{role:e,"aria-labelledby":n.labelId,"aria-describedby":n.describedBy,children:t}):d.jsx(d.Fragment,{children:t})}const wA=Be((t,e)=>{const{value:n,defaultValue:r,onChange:s,size:o,wrapperProps:i,children:a,readOnly:l,disabled:c,...u}=we("CheckboxGroup",null,t),[f,h]=ls({value:n,defaultValue:r,finalValue:[],onChange:s}),m=y=>{const v=typeof y=="string"?y:y.currentTarget.value;!l&&h(f.includes(v)?f.filter(b=>b!==v):[...f,v])};return d.jsx(Cge,{value:{value:f,onChange:m,size:o,disabled:c},children:d.jsx(Hn.Wrapper,{size:o,ref:e,...i,...u,labelElement:"div",__staticSelector:"CheckboxGroup",children:d.jsx(xA,{role:"group",children:a})})})});wA.classes=Hn.Wrapper.classes;wA.displayName="@mantine/core/CheckboxGroup";function c4({size:t,style:e,...n}){const r=t!==void 0?{width:Me(t),height:Me(t),...e}:e;return d.jsx("svg",{viewBox:"0 0 10 7",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:r,"aria-hidden":!0,...n,children:d.jsx("path",{d:"M4 4.586L1.707 2.293A1 1 0 1 0 .293 3.707l3 3a.997.997 0 0 0 1.414 0l5-5A1 1 0 1 0 8.293.293L4 4.586z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})})}function jX({indeterminate:t,...e}){return t?d.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 32 6","aria-hidden":!0,...e,children:d.jsx("rect",{width:"32",height:"6",fill:"currentColor",rx:"3"})}):d.jsx(c4,{...e})}var AX={indicator:"m_5e5256ee",icon:"m_1b1c543a","indicator--outline":"m_76e20374"};const jge={icon:jX,variant:"filled"},Age=(t,{radius:e,color:n,size:r,iconColor:s,variant:o,autoContrast:i})=>{const a=oa({color:n||t.primaryColor,theme:t}),l=a.isThemeColor&&a.shade===void 0?`var(--mantine-color-${a.color}-outline)`:a.color;return{indicator:{"--checkbox-size":an(r,"checkbox-size"),"--checkbox-radius":e===void 0?void 0:Wn(e),"--checkbox-color":o==="outline"?l:xr(n,t),"--checkbox-icon-color":s?xr(s,t):ep(i,t)?Lc({color:n,theme:t,autoContrast:i}):void 0}}},SA=Be((t,e)=>{const n=we("CheckboxIndicator",jge,t),{classNames:r,className:s,style:o,styles:i,unstyled:a,vars:l,icon:c,indeterminate:u,radius:f,color:h,iconColor:m,autoContrast:y,checked:v,mod:b,variant:w,disabled:C,attributes:k,...E}=n,j=Et({name:"CheckboxIndicator",classes:AX,props:n,className:s,style:o,classNames:r,styles:i,unstyled:a,attributes:k,vars:l,varsResolver:Age,rootSelector:"indicator"}),A=Ege(),M=typeof v=="boolean"||typeof u=="boolean"?v||u:(A==null?void 0:A.checked)||!1;return d.jsx(ie,{ref:e,...j("indicator",{variant:w}),variant:w,mod:[{checked:M,disabled:C},b],...E,children:d.jsx(c,{indeterminate:u,...j("icon")})})});SA.displayName="@mantine/core/CheckboxIndicator";SA.classes=AX;const _ge={labelPosition:"right",icon:jX,variant:"filled"},Rge=(t,{radius:e,color:n,size:r,iconColor:s,variant:o,autoContrast:i})=>{const a=oa({color:n||t.primaryColor,theme:t}),l=a.isThemeColor&&a.shade===void 0?`var(--mantine-color-${a.color}-outline)`:a.color;return{root:{"--checkbox-size":an(r,"checkbox-size"),"--checkbox-radius":e===void 0?void 0:Wn(e),"--checkbox-color":o==="outline"?l:xr(n,t),"--checkbox-icon-color":s?xr(s,t):ep(i,t)?Lc({color:n,theme:t,autoContrast:i}):void 0}}},Or=Be((t,e)=>{const n=we("Checkbox",_ge,t),{classNames:r,className:s,style:o,styles:i,unstyled:a,vars:l,color:c,label:u,id:f,size:h,radius:m,wrapperProps:y,checked:v,labelPosition:b,description:w,error:C,disabled:k,variant:E,indeterminate:j,icon:A,rootRef:M,iconColor:_,onChange:D,autoContrast:R,mod:N,attributes:z,...B}=n,L=TX(),P=h||(L==null?void 0:L.size),I=Et({name:"Checkbox",props:n,classes:kX,className:s,style:o,classNames:r,styles:i,unstyled:a,attributes:z,vars:l,varsResolver:Rge}),{styleProps:H,rest:$}=bd(B),V=_s(f),q={checked:(L==null?void 0:L.value.includes($.value))??v,onChange:Y=>{L==null||L.onChange(Y),D==null||D(Y)},disabled:(L==null?void 0:L.disabled)??k},U=S.useRef(null),W=e||U;return S.useEffect(()=>{W&&"current"in W&&W.current&&(W.current.indeterminate=j||!1,j?W.current.setAttribute("data-indeterminate","true"):W.current.removeAttribute("data-indeterminate"))},[j,W]),d.jsx(l4,{...I("root"),__staticSelector:"Checkbox",__stylesApiProps:n,id:V,size:P,labelPosition:b,label:u,description:w,error:C,disabled:q.disabled,classNames:r,styles:i,unstyled:a,"data-checked":q.checked||v||void 0,variant:E,ref:M,mod:N,inert:$.inert,...H,...y,children:d.jsxs(ie,{...I("inner"),mod:{"data-label-position":b},children:[d.jsx(ie,{component:"input",id:V,ref:W,mod:{error:!!C},...I("input",{focusable:!0,variant:E}),...$,...q,inert:$.inert,type:"checkbox"}),d.jsx(A,{indeterminate:j,...I("icon")})]})})});Or.classes={...kX,...CX};Or.displayName="@mantine/core/Checkbox";Or.Group=wA;Or.Indicator=SA;Or.Card=bA;function Xh(t){return"group"in t}function _X({options:t,search:e,limit:n}){const r=e.trim().toLowerCase(),s=[];for(let o=0;o<t.length;o+=1){const i=t[o];if(s.length===n)return s;Xh(i)&&s.push({group:i.group,items:_X({options:i.items,search:e,limit:n-s.length})}),Xh(i)||i.label.toLowerCase().includes(r)&&s.push(i)}return s}function Dge(t){if(t.length===0)return!0;for(const e of t)if(!("group"in e)||e.items.length>0)return!1;return!0}function RX(t,e=new Set){if(Array.isArray(t))for(const n of t)if(Xh(n))RX(n.items,e);else{if(typeof n.value>"u")throw new Error("[@mantine/core] Each option must have value property");if(typeof n.value!="string")throw new Error(`[@mantine/core] Option value must be a string, other data formats are not supported, got ${typeof n.value}`);if(e.has(n.value))throw new Error(`[@mantine/core] Duplicate options are not supported. Option with value "${n.value}" was provided more than once`);e.add(n.value)}}function Ige(t,e){return Array.isArray(t)?t.includes(e):t===e}function DX({data:t,withCheckIcon:e,withAlignedLabels:n,value:r,checkIconPosition:s,unstyled:o,renderOption:i}){if(!Xh(t)){const l=Ige(r,t.value),c=e&&(l?d.jsx(c4,{className:_o.optionsDropdownCheckIcon}):n?d.jsx("div",{className:_o.optionsDropdownCheckPlaceholder}):null),u=d.jsxs(d.Fragment,{children:[s==="left"&&c,d.jsx("span",{children:t.label}),s==="right"&&c]});return d.jsx(Ft.Option,{value:t.value,disabled:t.disabled,className:Fr({[_o.optionsDropdownOption]:!o}),"data-reverse":s==="right"||void 0,"data-checked":l||void 0,"aria-selected":l,active:l,children:typeof i=="function"?i({option:t,checked:l}):u})}const a=t.items.map(l=>d.jsx(DX,{data:l,value:r,unstyled:o,withCheckIcon:e,withAlignedLabels:n,checkIconPosition:s,renderOption:i},l.value));return d.jsx(Ft.Group,{label:t.group,children:a})}function IX({data:t,hidden:e,hiddenWhenEmpty:n,filter:r,search:s,limit:o,maxDropdownHeight:i,withScrollArea:a=!0,filterOptions:l=!0,withCheckIcon:c=!1,withAlignedLabels:u=!1,value:f,checkIconPosition:h,nothingFoundMessage:m,unstyled:y,labelId:v,renderOption:b,scrollAreaProps:w,"aria-label":C}){RX(t);const E=typeof s=="string"?(r||_X)({options:t,search:l?s:"",limit:o??1/0}):t,j=Dge(E),A=E.map(M=>d.jsx(DX,{data:M,withCheckIcon:c,withAlignedLabels:u,value:f,checkIconPosition:h,unstyled:y,renderOption:b},Xh(M)?M.group:M.value));return d.jsx(Ft.Dropdown,{hidden:e||n&&j,"data-composed":!0,children:d.jsxs(Ft.Options,{labelledBy:v,"aria-label":C,children:[a?d.jsx(Jr.Autosize,{mah:i??220,type:"scroll",scrollbarSize:"var(--combobox-padding)",offsetScrollbars:"y",...w,children:A}):A,j&&m&&d.jsx(Ft.Empty,{children:m})]})})}var u4={group:"m_11def92b",root:"m_f85678b6",image:"m_11f8ac07",placeholder:"m_104cd71f"};const OX=S.createContext(null),Oge=OX.Provider;function Nge(){return{withinGroup:!!S.useContext(OX)}}const Lge=(t,{spacing:e})=>({group:{"--ag-spacing":ss(e)}}),CA=Be((t,e)=>{const n=we("AvatarGroup",null,t),{classNames:r,className:s,style:o,styles:i,unstyled:a,vars:l,spacing:c,attributes:u,...f}=n,h=Et({name:"AvatarGroup",classes:u4,props:n,className:s,style:o,classNames:r,styles:i,unstyled:a,attributes:u,vars:l,varsResolver:Lge,rootSelector:"group"});return d.jsx(Oge,{value:!0,children:d.jsx(ie,{ref:e,...h("group"),...f})})});CA.classes=u4;CA.displayName="@mantine/core/AvatarGroup";function $ge(t){return d.jsx("svg",{...t,"data-avatar-placeholder-icon":!0,viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:d.jsx("path",{d:"M0.877014 7.49988C0.877014 3.84219 3.84216 0.877045 7.49985 0.877045C11.1575 0.877045 14.1227 3.84219 14.1227 7.49988C14.1227 11.1575 11.1575 14.1227 7.49985 14.1227C3.84216 14.1227 0.877014 11.1575 0.877014 7.49988ZM7.49985 1.82704C4.36683 1.82704 1.82701 4.36686 1.82701 7.49988C1.82701 8.97196 2.38774 10.3131 3.30727 11.3213C4.19074 9.94119 5.73818 9.02499 7.50023 9.02499C9.26206 9.02499 10.8093 9.94097 11.6929 11.3208C12.6121 10.3127 13.1727 8.97172 13.1727 7.49988C13.1727 4.36686 10.6328 1.82704 7.49985 1.82704ZM10.9818 11.9787C10.2839 10.7795 8.9857 9.97499 7.50023 9.97499C6.01458 9.97499 4.71624 10.7797 4.01845 11.9791C4.97952 12.7272 6.18765 13.1727 7.49985 13.1727C8.81227 13.1727 10.0206 12.727 10.9818 11.9787ZM5.14999 6.50487C5.14999 5.207 6.20212 4.15487 7.49999 4.15487C8.79786 4.15487 9.84999 5.207 9.84999 6.50487C9.84999 7.80274 8.79786 8.85487 7.49999 8.85487C6.20212 8.85487 5.14999 7.80274 5.14999 6.50487ZM7.49999 5.10487C6.72679 5.10487 6.09999 5.73167 6.09999 6.50487C6.09999 7.27807 6.72679 7.90487 7.49999 7.90487C8.27319 7.90487 8.89999 7.27807 8.89999 6.50487C8.89999 5.73167 8.27319 5.10487 7.49999 5.10487Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})})}function Fge(t){let e=0;for(let n=0;n<t.length;n+=1){const r=t.charCodeAt(n);e=(e<<5)-e+r,e|=0}return e}const zge=["blue","cyan","grape","green","indigo","lime","orange","pink","red","teal","violet"];function Pge(t,e=zge){const n=Fge(t),r=Math.abs(n)%e.length;return e[r]}function Bge(t,e=2){const n=t.split(" ");return n.length===1?t.slice(0,e).toUpperCase():n.map(r=>r[0]).slice(0,e).join("").toUpperCase()}const Hge=(t,{size:e,radius:n,variant:r,gradient:s,color:o,autoContrast:i,name:a,allowedInitialsColors:l})=>{const c=o==="initials"&&typeof a=="string"?Pge(a,l):o,u=t.variantColorResolver({color:c||"gray",theme:t,gradient:s,variant:r||"light",autoContrast:i});return{root:{"--avatar-size":an(e,"avatar-size"),"--avatar-radius":n===void 0?void 0:Wn(n),"--avatar-bg":c||r?u.background:void 0,"--avatar-color":c||r?u.color:void 0,"--avatar-bd":c||r?u.border:void 0}}},Pc=us((t,e)=>{const n=we("Avatar",null,t),{classNames:r,className:s,style:o,styles:i,unstyled:a,vars:l,src:c,alt:u,radius:f,color:h,gradient:m,imageProps:y,children:v,autoContrast:b,mod:w,name:C,allowedInitialsColors:k,attributes:E,...j}=n,A=Nge(),[M,_]=S.useState(!c),D=Et({name:"Avatar",props:n,classes:u4,className:s,style:o,classNames:r,styles:i,unstyled:a,attributes:E,vars:l,varsResolver:Hge});return S.useEffect(()=>_(!c),[c]),d.jsx(ie,{...D("root"),mod:[{"within-group":A.withinGroup},w],ref:e,...j,children:M||!c?d.jsx("span",{...D("placeholder"),title:u,children:v||typeof C=="string"&&Bge(C)||d.jsx($ge,{})}):d.jsx("img",{...y,...D("image"),src:c,alt:u,onError:R=>{var N;_(!0),(N=y==null?void 0:y.onError)==null||N.call(y,R)}})})});Pc.classes=u4;Pc.displayName="@mantine/core/Avatar";Pc.Group=CA;var NX={root:"m_347db0ec","root--dot":"m_fbd81e3d",label:"m_5add502a",section:"m_91fdda9b"};const Uge=(t,{radius:e,color:n,gradient:r,variant:s,size:o,autoContrast:i,circle:a})=>{const l=t.variantColorResolver({color:n||t.primaryColor,theme:t,gradient:r,variant:s||"filled",autoContrast:i});return{root:{"--badge-height":an(o,"badge-height"),"--badge-padding-x":an(o,"badge-padding-x"),"--badge-fz":an(o,"badge-fz"),"--badge-radius":a||e===void 0?void 0:Wn(e),"--badge-bg":n||s?l.background:void 0,"--badge-color":n||s?l.color:void 0,"--badge-bd":n||s?l.border:void 0,"--badge-dot-color":s==="dot"?xr(n,t):void 0}}},Bc=us((t,e)=>{const n=we("Badge",null,t),{classNames:r,className:s,style:o,styles:i,unstyled:a,vars:l,radius:c,color:u,gradient:f,leftSection:h,rightSection:m,children:y,variant:v,fullWidth:b,autoContrast:w,circle:C,mod:k,attributes:E,...j}=n,A=Et({name:"Badge",props:n,classes:NX,className:s,style:o,classNames:r,styles:i,unstyled:a,attributes:E,vars:l,varsResolver:Uge});return d.jsxs(ie,{variant:v,mod:[{block:b,circle:C,"with-right-section":!!m,"with-left-section":!!h},k],...A("root",{variant:v}),ref:e,...j,children:[h&&d.jsx("span",{...A("section"),"data-position":"left",children:h}),d.jsx("span",{...A("label"),children:y}),m&&d.jsx("span",{...A("section"),"data-position":"right",children:m})]})});Bc.classes=NX;Bc.displayName="@mantine/core/Badge";var LX={root:"m_8b3717df",breadcrumb:"m_f678d540",separator:"m_3b8f2208"};const Vge={separator:"/"},qge=(t,{separatorMargin:e})=>({root:{"--bc-separator-margin":ss(e)}}),kA=Be((t,e)=>{const n=we("Breadcrumbs",Vge,t),{classNames:r,className:s,style:o,styles:i,unstyled:a,vars:l,children:c,separator:u,separatorMargin:f,attributes:h,...m}=n,y=Et({name:"Breadcrumbs",classes:LX,props:n,className:s,style:o,classNames:r,styles:i,unstyled:a,attributes:h,vars:l,varsResolver:qge}),v=S.Children.toArray(c).reduce((b,w,C,k)=>{var j;const E=i2(w)?S.cloneElement(w,{...y("breadcrumb",{className:(j=w.props)==null?void 0:j.className}),key:C}):S.createElement("div",{...y("breadcrumb"),key:C},w);return b.push(E),C!==k.length-1&&b.push(S.createElement(ie,{...y("separator"),key:`separator-${C}`},u)),b},[]);return d.jsx(ie,{ref:e,...y("root"),...m,children:v})});kA.classes=LX;kA.displayName="@mantine/core/Breadcrumbs";var Rm={root:"m_77c9d27d",inner:"m_80f1301b",label:"m_811560b9",section:"m_a74036a",loader:"m_a25b86ee",group:"m_80d6d844",groupSection:"m_70be2a01"};const bF={orientation:"horizontal"},Wge=(t,{borderWidth:e})=>({group:{"--button-border-width":Me(e)}}),EA=Be((t,e)=>{const n=we("ButtonGroup",bF,t),{className:r,style:s,classNames:o,styles:i,unstyled:a,orientation:l,vars:c,borderWidth:u,variant:f,mod:h,attributes:m,...y}=we("ButtonGroup",bF,t),v=Et({name:"ButtonGroup",props:n,classes:Rm,className:r,style:s,classNames:o,styles:i,unstyled:a,attributes:m,vars:c,varsResolver:Wge,rootSelector:"group"});return d.jsx(ie,{...v("group"),ref:e,variant:f,mod:[{"data-orientation":l},h],role:"group",...y})});EA.classes=Rm;EA.displayName="@mantine/core/ButtonGroup";const Yge=(t,{radius:e,color:n,gradient:r,variant:s,autoContrast:o,size:i})=>{const a=t.variantColorResolver({color:n||t.primaryColor,theme:t,gradient:r,variant:s||"filled",autoContrast:o});return{groupSection:{"--section-height":an(i,"section-height"),"--section-padding-x":an(i,"section-padding-x"),"--section-fz":i!=null&&i.includes("compact")?Ur(i.replace("compact-","")):Ur(i),"--section-radius":e===void 0?void 0:Wn(e),"--section-bg":n||s?a.background:void 0,"--section-color":a.color,"--section-bd":n||s?a.border:void 0}}},TA=Be((t,e)=>{const n=we("ButtonGroupSection",null,t),{className:r,style:s,classNames:o,styles:i,unstyled:a,vars:l,variant:c,gradient:u,radius:f,autoContrast:h,attributes:m,...y}=n,v=Et({name:"ButtonGroupSection",props:n,classes:Rm,className:r,style:s,classNames:o,styles:i,unstyled:a,attributes:m,vars:l,varsResolver:Yge,rootSelector:"groupSection"});return d.jsx(ie,{...v("groupSection"),ref:e,variant:c,...y})});TA.classes=Rm;TA.displayName="@mantine/core/ButtonGroupSection";const Gge={in:{opacity:1,transform:`translate(-50%, calc(-50% + ${Me(1)}))`},out:{opacity:0,transform:"translate(-50%, -200%)"},common:{transformOrigin:"center"},transitionProperty:"transform, opacity"},Kge=(t,{radius:e,color:n,gradient:r,variant:s,size:o,justify:i,autoContrast:a})=>{const l=t.variantColorResolver({color:n||t.primaryColor,theme:t,gradient:r,variant:s||"filled",autoContrast:a});return{root:{"--button-justify":i,"--button-height":an(o,"button-height"),"--button-padding-x":an(o,"button-padding-x"),"--button-fz":o!=null&&o.includes("compact")?Ur(o.replace("compact-","")):Ur(o),"--button-radius":e===void 0?void 0:Wn(e),"--button-bg":n||s?l.background:void 0,"--button-hover":n||s?l.hover:void 0,"--button-color":l.color,"--button-bd":n||s?l.border:void 0,"--button-hover-color":n||s?l.hoverColor:void 0}}},yt=us((t,e)=>{const n=we("Button",null,t),{style:r,vars:s,className:o,color:i,disabled:a,children:l,leftSection:c,rightSection:u,fullWidth:f,variant:h,radius:m,loading:y,loaderProps:v,gradient:b,classNames:w,styles:C,unstyled:k,"data-disabled":E,autoContrast:j,mod:A,attributes:M,..._}=n,D=Et({name:"Button",props:n,classes:Rm,className:o,style:r,classNames:w,styles:C,unstyled:k,attributes:M,vars:s,varsResolver:Kge}),R=!!c,N=!!u;return d.jsxs(En,{ref:e,...D("root",{active:!a&&!y&&!E}),unstyled:k,variant:h,disabled:a||y,mod:[{disabled:a||E,loading:y,block:f,"with-left-section":R,"with-right-section":N},A],..._,children:[typeof y=="boolean"&&d.jsx(na,{mounted:y,transition:Gge,duration:150,children:z=>d.jsx(ie,{component:"span",...D("loader",{style:z}),"aria-hidden":!0,children:d.jsx(Bs,{color:"var(--button-color)",size:"calc(var(--button-height) / 1.8)",...v})})}),d.jsxs("span",{...D("inner"),children:[c&&d.jsx(ie,{component:"span",...D("section"),mod:{position:"left"},children:c}),d.jsx(ie,{component:"span",mod:{loading:y},...D("label"),children:l}),u&&d.jsx(ie,{component:"span",...D("section"),mod:{position:"right"},children:u})]})]})});yt.classes=Rm;yt.displayName="@mantine/core/Button";yt.Group=EA;yt.GroupSection=TA;var $X={root:"m_4451eb3a"};const m2=us((t,e)=>{const n=we("Center",null,t),{classNames:r,className:s,style:o,styles:i,unstyled:a,vars:l,inline:c,mod:u,attributes:f,...h}=n,m=Et({name:"Center",props:n,classes:$X,className:s,style:o,classNames:r,styles:i,unstyled:a,attributes:f,vars:l});return d.jsx(ie,{ref:e,mod:[{inline:c},u],...m("root"),...h})});m2.classes=$X;m2.displayName="@mantine/core/Center";var FX={root:"m_de3d2490",colorOverlay:"m_862f3d1b",shadowOverlay:"m_98ae7f22",alphaOverlay:"m_95709ac0",childrenOverlay:"m_93e74e3"};const xF={withShadow:!0},Xge=(t,{radius:e,size:n})=>({root:{"--cs-radius":e===void 0?void 0:Wn(e),"--cs-size":Me(n)}}),id=us((t,e)=>{const n=we("ColorSwatch",xF,t),{classNames:r,className:s,style:o,styles:i,unstyled:a,vars:l,color:c,size:u,radius:f,withShadow:h,children:m,variant:y,attributes:v,...b}=we("ColorSwatch",xF,n),w=Et({name:"ColorSwatch",props:n,classes:FX,className:s,style:o,classNames:r,styles:i,unstyled:a,attributes:v,vars:l,varsResolver:Xge});return d.jsxs(ie,{ref:e,variant:y,size:u,...w("root",{focusable:!0}),...b,children:[d.jsx("span",{...w("alphaOverlay")}),h&&d.jsx("span",{...w("shadowOverlay")}),d.jsx("span",{...w("colorOverlay",{style:{backgroundColor:c}})}),d.jsx("span",{...w("childrenOverlay"),children:m})]})});id.classes=FX;id.displayName="@mantine/core/ColorSwatch";const[Zge,MA]=za(null);var jA={wrapper:"m_fee9c77",preview:"m_9dddfbac",body:"m_bffecc3e",sliders:"m_3283bb96",thumb:"m_40d572ba",swatch:"m_d8ee6fd8",swatches:"m_5711e686",saturation:"m_202a296e",saturationOverlay:"m_11b3db02",slider:"m_d856d47d",sliderOverlay:"m_8f327113"};const AA=S.forwardRef(({position:t,...e},n)=>d.jsx(ie,{ref:n,__vars:{"--thumb-y-offset":`${t.y*100}%`,"--thumb-x-offset":`${t.x*100}%`},...e}));AA.displayName="@mantine/core/ColorPickerThumb";const _A=Be((t,e)=>{var V;const n=we("ColorSlider",null,t),{classNames:r,className:s,style:o,styles:i,unstyled:a,vars:l,onChange:c,onChangeEnd:u,maxValue:f,round:h,size:m="md",focusable:y=!0,value:v,overlays:b,thumbColor:w="transparent",onScrubStart:C,onScrubEnd:k,__staticSelector:E="ColorPicker",attributes:j,...A}=n,M=Et({name:E,classes:jA,props:n,className:s,style:o,classNames:r,styles:i,unstyled:a,attributes:j}),D=((V=MA())==null?void 0:V.getStyles)||M,R=Tr(),[N,z]=S.useState({y:0,x:v/f}),B=S.useRef(N),L=q=>h?Math.round(q*f):q*f,{ref:P}=WG(({x:q,y:U})=>{B.current={x:q,y:U},c==null||c(L(q))},{onScrubEnd:()=>{const{x:q}=B.current;u==null||u(L(q)),k==null||k()},onScrubStart:C});kl(()=>{z({y:0,x:v/f})},[v]);const I=(q,U)=>{q.preventDefault();const W=qG(U);c==null||c(L(W.x)),u==null||u(L(W.x))},H=q=>{switch(q.key){case"ArrowRight":{I(q,{x:N.x+.05,y:N.y});break}case"ArrowLeft":{I(q,{x:N.x-.05,y:N.y});break}}},$=b.map((q,U)=>S.createElement("div",{...D("sliderOverlay"),style:q,key:U}));return d.jsxs(ie,{...A,ref:Vr(P,e),...D("slider"),role:"slider","aria-valuenow":v,"aria-valuemax":f,"aria-valuemin":0,tabIndex:y?0:-1,onKeyDown:H,"data-focus-ring":R.focusRing,__vars:{"--cp-thumb-size":`var(--cp-thumb-size-${m})`},children:[$,d.jsx(AA,{position:N,...D("thumb",{style:{top:Me(1),background:w}})})]})});_A.displayName="@mantine/core/ColorSlider";function Ki(t,e=0,n=10**e){return Math.round(n*t)/n}function Qge({h:t,s:e,l:n,a:r}){const s=e*((n<50?n:100-n)/100);return{h:t,s:s>0?2*s/(n+s)*100:0,v:n+s,a:r}}const Jge={grad:360/400,turn:360,rad:360/(Math.PI*2)};function e2e(t,e="deg"){return Number(t)*(Jge[e]||1)}const t2e=/hsla?\(?\s*(-?\d*\.?\d+)(deg|rad|grad|turn)?[,\s]+(-?\d*\.?\d+)%?[,\s]+(-?\d*\.?\d+)%?,?\s*[/\s]*(-?\d*\.?\d+)?(%)?\s*\)?/i;function wF(t){const e=t2e.exec(t);return e?Qge({h:e2e(e[1],e[2]),s:Number(e[3]),l:Number(e[4]),a:e[5]===void 0?1:Number(e[5])/(e[6]?100:1)}):{h:0,s:0,v:0,a:1}}function zE({r:t,g:e,b:n,a:r}){const s=Math.max(t,e,n),o=s-Math.min(t,e,n),i=o?s===t?(e-n)/o:s===e?2+(n-t)/o:4+(t-e)/o:0;return{h:Ki(60*(i<0?i+6:i),3),s:Ki(s?o/s*100:0,3),v:Ki(s/255*100,3),a:r}}function PE(t){const e=t[0]==="#"?t.slice(1):t;return e.length===3?zE({r:parseInt(e[0]+e[0],16),g:parseInt(e[1]+e[1],16),b:parseInt(e[2]+e[2],16),a:1}):zE({r:parseInt(e.slice(0,2),16),g:parseInt(e.slice(2,4),16),b:parseInt(e.slice(4,6),16),a:1})}function n2e(t){const e=t[0]==="#"?t.slice(1):t,n=i=>Ki(parseInt(i,16)/255,3);if(e.length===4){const i=e.slice(0,3),a=n(e[3]+e[3]);return{...PE(i),a}}const r=e.slice(0,6),s=n(e.slice(6,8));return{...PE(r),a:s}}const r2e=/rgba?\(?\s*(-?\d*\.?\d+)(%)?[,\s]+(-?\d*\.?\d+)(%)?[,\s]+(-?\d*\.?\d+)(%)?,?\s*[/\s]*(-?\d*\.?\d+)?(%)?\s*\)?/i;function SF(t){const e=r2e.exec(t);return e?zE({r:Number(e[1])/(e[2]?100/255:1),g:Number(e[3])/(e[4]?100/255:1),b:Number(e[5])/(e[6]?100/255:1),a:e[7]===void 0?1:Number(e[7])/(e[8]?100:1)}):{h:0,s:0,v:0,a:1}}const zX={hex:/^#?([0-9A-F]{3}){1,2}$/i,hexa:/^#?([0-9A-F]{4}){1,2}$/i,rgb:/^rgb\((\d+),\s*(\d+),\s*(\d+)(?:,\s*(\d+(?:\.\d+)?))?\)$/i,rgba:/^rgba\((\d+),\s*(\d+),\s*(\d+)(?:,\s*(\d+(?:\.\d+)?))?\)$/i,hsl:/hsl\(\s*(\d+)\s*,\s*(\d+(?:\.\d+)?%)\s*,\s*(\d+(?:\.\d+)?%)\)/i,hsla:/^hsla\((\d+),\s*([\d.]+)%,\s*([\d.]+)%,\s*(\d*(?:\.\d+)?)\)$/i},s2e={hex:PE,hexa:n2e,rgb:SF,rgba:SF,hsl:wF,hsla:wF};function o2e(t){for(const[,e]of Object.entries(zX))if(e.test(t))return!0;return!1}function $v(t){if(typeof t!="string")return{h:0,s:0,v:0,a:1};if(t==="transparent")return{h:0,s:0,v:0,a:0};const e=t.trim();for(const[n,r]of Object.entries(zX))if(r.test(e))return s2e[n](e);return{h:0,s:0,v:0,a:1}}const PX=S.forwardRef((t,e)=>{const{value:n,onChange:r,onChangeEnd:s,color:o,...i}=we("AlphaSlider",null,t);return d.jsx(_A,{...i,ref:e,value:n,onChange:a=>r==null?void 0:r(Ki(a,2)),onChangeEnd:a=>s==null?void 0:s(Ki(a,2)),maxValue:1,round:!1,"data-alpha":!0,overlays:[{backgroundImage:"linear-gradient(45deg, var(--slider-checkers) 25%, transparent 25%), linear-gradient(-45deg, var(--slider-checkers) 25%, transparent 25%), linear-gradient(45deg, transparent 75%, var(--slider-checkers) 75%), linear-gradient(-45deg, var(--mantine-color-body) 75%, var(--slider-checkers) 75%)",backgroundSize:`${Me(8)} ${Me(8)}`,backgroundPosition:`0 0, 0 ${Me(4)}, ${Me(4)} ${Me(-4)}, ${Me(-4)} 0`},{backgroundImage:`linear-gradient(90deg, transparent, ${o})`},{boxShadow:`rgba(0, 0, 0, .1) 0 0 0 ${Me(1)} inset, rgb(0, 0, 0, .15) 0 0 ${Me(4)} inset`}]})});PX.displayName="@mantine/core/AlphaSlider";function BX({h:t,s:e,v:n,a:r}){const s=t/360*6,o=e/100,i=n/100,a=Math.floor(s),l=i*(1-o),c=i*(1-(s-a)*o),u=i*(1-(1-s+a)*o),f=a%6;return{r:Ki([i,c,l,l,u,i][f]*255),g:Ki([u,i,i,c,l,l][f]*255),b:Ki([l,l,u,i,i,c][f]*255),a:Ki(r,2)}}function CF(t,e){const{r:n,g:r,b:s,a:o}=BX(t);return e?`rgba(${n}, ${r}, ${s}, ${Ki(o,2)})`:`rgb(${n}, ${r}, ${s})`}function kF({h:t,s:e,v:n,a:r},s){const o=(200-e)*n/100,i={h:Math.round(t),s:Math.round(o>0&&o<200?e*n/100/(o<=100?o:200-o)*100:0),l:Math.round(o/2)};return s?`hsla(${i.h}, ${i.s}%, ${i.l}%, ${Ki(r,2)})`:`hsl(${i.h}, ${i.s}%, ${i.l}%)`}function Yb(t){const e=t.toString(16);return e.length<2?`0${e}`:e}function HX(t){const{r:e,g:n,b:r}=BX(t);return`#${Yb(e)}${Yb(n)}${Yb(r)}`}function i2e(t){const e=Math.round(t.a*255);return`${HX(t)}${Yb(e)}`}const K6={hex:HX,hexa:t=>i2e(t),rgb:t=>CF(t,!1),rgba:t=>CF(t,!0),hsl:t=>kF(t,!1),hsla:t=>kF(t,!0)};function Mu(t,e){return e?t in K6?K6[t](e):K6.hex(e):"#000000"}const UX=S.forwardRef((t,e)=>{const{value:n,onChange:r,onChangeEnd:s,color:o,...i}=we("HueSlider",{},t);return d.jsx(_A,{...i,ref:e,value:n,onChange:r,onChangeEnd:s,maxValue:360,thumbColor:`hsl(${n}, 100%, 50%)`,round:!0,"data-hue":!0,overlays:[{backgroundImage:"linear-gradient(to right,hsl(0,100%,50%),hsl(60,100%,50%),hsl(120,100%,50%),hsl(170,100%,50%),hsl(240,100%,50%),hsl(300,100%,50%),hsl(360,100%,50%))"},{boxShadow:`rgba(0, 0, 0, .1) 0 0 0 ${Me(1)} inset, rgb(0, 0, 0, .15) 0 0 ${Me(4)} inset`}]})});UX.displayName="@mantine/core/HueSlider";function VX({className:t,onChange:e,onChangeEnd:n,value:r,saturationLabel:s,focusable:o=!0,size:i,color:a,onScrubStart:l,onScrubEnd:c,...u}){const{getStyles:f}=MA(),[h,m]=S.useState({x:r.s/100,y:1-r.v/100}),y=S.useRef(h),{ref:v}=WG(({x:C,y:k})=>{y.current={x:C,y:k},e({s:Math.round(C*100),v:Math.round((1-k)*100)})},{onScrubEnd:()=>{const{x:C,y:k}=y.current;n({s:Math.round(C*100),v:Math.round((1-k)*100)}),c==null||c()},onScrubStart:l});S.useEffect(()=>{m({x:r.s/100,y:1-r.v/100})},[r.s,r.v]);const b=(C,k)=>{C.preventDefault();const E=qG(k);e({s:Math.round(E.x*100),v:Math.round((1-E.y)*100)}),n({s:Math.round(E.x*100),v:Math.round((1-E.y)*100)})},w=C=>{switch(C.key){case"ArrowUp":{b(C,{y:h.y-.05,x:h.x});break}case"ArrowDown":{b(C,{y:h.y+.05,x:h.x});break}case"ArrowRight":{b(C,{x:h.x+.05,y:h.y});break}case"ArrowLeft":{b(C,{x:h.x-.05,y:h.y});break}}};return d.jsxs(ie,{...f("saturation"),ref:v,...u,role:"slider","aria-label":s,"aria-valuenow":h.x,"aria-valuetext":Mu("rgba",r),tabIndex:o?0:-1,onKeyDown:w,children:[d.jsx("div",{...f("saturationOverlay",{style:{backgroundColor:`hsl(${r.h}, 100%, 50%)`}})}),d.jsx("div",{...f("saturationOverlay",{style:{backgroundImage:"linear-gradient(90deg, #fff, transparent)"}})}),d.jsx("div",{...f("saturationOverlay",{style:{backgroundImage:"linear-gradient(0deg, #000, transparent)"}})}),d.jsx(AA,{position:h,...f("thumb",{style:{backgroundColor:a}})})]})}VX.displayName="@mantine/core/Saturation";const qX=S.forwardRef(({className:t,datatype:e,setValue:n,onChangeEnd:r,size:s,focusable:o,data:i,swatchesPerRow:a,value:l,...c},u)=>{const f=MA(),h=i.map((m,y)=>S.createElement(id,{...f.getStyles("swatch"),unstyled:f.unstyled,component:"button",type:"button",color:m,key:y,radius:"sm",onClick:()=>{n(m),r==null||r(m)},"aria-label":m,tabIndex:o?0:-1,"data-swatch":!0},l===m&&d.jsx(c4,{size:"35%",color:KG(m)<.5?"white":"black"})));return d.jsx(ie,{...f.getStyles("swatches"),ref:u,...c,children:h})});qX.displayName="@mantine/core/Swatches";const a2e={swatchesPerRow:7,withPicker:!0,focusable:!0,size:"md",__staticSelector:"ColorPicker"},l2e=(t,{size:e,swatchesPerRow:n})=>({wrapper:{"--cp-preview-size":an(e,"cp-preview-size"),"--cp-width":an(e,"cp-width"),"--cp-body-spacing":ss(e),"--cp-swatch-size":`${100/n}%`,"--cp-thumb-size":an(e,"cp-thumb-size"),"--cp-saturation-height":an(e,"cp-saturation-height")}}),RA=Be((t,e)=>{const n=we("ColorPicker",a2e,t),{classNames:r,className:s,style:o,styles:i,unstyled:a,vars:l,format:c="hex",value:u,defaultValue:f,onChange:h,onChangeEnd:m,withPicker:y,size:v,saturationLabel:b,hueLabel:w,alphaLabel:C,focusable:k,swatches:E,swatchesPerRow:j,fullWidth:A,onColorSwatchClick:M,__staticSelector:_,mod:D,attributes:R,...N}=n,z=Et({name:_,props:n,classes:jA,className:s,style:o,classNames:r,styles:i,unstyled:a,attributes:R,rootSelector:"wrapper",vars:l,varsResolver:l2e}),B=S.useRef(c||"hex"),L=S.useRef(""),P=S.useRef(-1),I=S.useRef(!1),H=c==="hexa"||c==="rgba"||c==="hsla",[$,V,q]=ls({value:u,defaultValue:f,finalValue:"#FFFFFF",onChange:h}),[U,W]=S.useState($v($)),Y=()=>{window.clearTimeout(P.current),I.current=!0},G=()=>{window.clearTimeout(P.current),P.current=window.setTimeout(()=>{I.current=!1},200)},K=Q=>{W(Z=>{const J={...Z,...Q};return L.current=Mu(B.current,J),J}),V(L.current)};return kl(()=>{typeof u=="string"&&o2e(u)&&!I.current&&W($v(u))},[u]),kl(()=>{B.current=c||"hex",V(Mu(B.current,U))},[c]),d.jsx(Zge,{value:{getStyles:z,unstyled:a},children:d.jsxs(ie,{ref:e,...z("wrapper"),size:v,mod:[{"full-width":A},D],...N,children:[y&&d.jsxs(d.Fragment,{children:[d.jsx(VX,{value:U,onChange:K,onChangeEnd:({s:Q,v:Z})=>m==null?void 0:m(Mu(B.current,{...U,s:Q,v:Z})),color:$,size:v,focusable:k,saturationLabel:b,onScrubStart:Y,onScrubEnd:G}),d.jsxs("div",{...z("body"),children:[d.jsxs("div",{...z("sliders"),children:[d.jsx(UX,{value:U.h,onChange:Q=>K({h:Q}),onChangeEnd:Q=>m==null?void 0:m(Mu(B.current,{...U,h:Q})),size:v,focusable:k,"aria-label":w,onScrubStart:Y,onScrubEnd:G}),H&&d.jsx(PX,{value:U.a,onChange:Q=>K({a:Q}),onChangeEnd:Q=>{m==null||m(Mu(B.current,{...U,a:Q}))},size:v,color:Mu("hex",U),focusable:k,"aria-label":C,onScrubStart:Y,onScrubEnd:G})]}),H&&d.jsx(id,{color:$,radius:"sm",size:"var(--cp-preview-size)",...z("preview")})]})]}),Array.isArray(E)&&d.jsx(qX,{data:E,swatchesPerRow:j,focusable:k,setValue:V,value:$,onChangeEnd:Q=>{const Z=Mu(c,$v(Q));M==null||M(Z),m==null||m(Z),q||W($v(Q))}})]})})});RA.classes=jA;RA.displayName="@mantine/core/ColorPicker";var WX={root:"m_3eebeb36",label:"m_9e365f20"};const c2e={orientation:"horizontal"},u2e=(t,{color:e,variant:n,size:r})=>({root:{"--divider-color":e?xr(e,t):void 0,"--divider-border-style":n,"--divider-size":an(r,"divider-size")}}),Da=Be((t,e)=>{const n=we("Divider",c2e,t),{classNames:r,className:s,style:o,styles:i,unstyled:a,vars:l,color:c,orientation:u,label:f,labelPosition:h,mod:m,attributes:y,...v}=n,b=Et({name:"Divider",classes:WX,props:n,className:s,style:o,classNames:r,styles:i,unstyled:a,attributes:y,vars:l,varsResolver:u2e});return d.jsx(ie,{ref:e,mod:[{orientation:u,"with-label":!!f},m],...b("root"),...v,role:"separator",children:f&&d.jsx(ie,{component:"span",mod:{position:h},...b("label"),children:f})})});Da.classes=WX;Da.displayName="@mantine/core/Divider";var Hc={root:"m_f11b401e",header:"m_5a7c2c9",content:"m_b8a05bbd",inner:"m_31cd769a"};const[d2e,Dm]=zs("Drawer component was not found in tree"),d4=Be((t,e)=>{const n=we("DrawerBody",null,t),{classNames:r,className:s,style:o,styles:i,vars:a,...l}=n,c=Dm();return d.jsx(Uj,{ref:e,...c.getStyles("body",{classNames:r,style:o,styles:i,className:s}),...l})});d4.classes=Hc;d4.displayName="@mantine/core/DrawerBody";const f4=Be((t,e)=>{const n=we("DrawerCloseButton",null,t),{classNames:r,className:s,style:o,styles:i,vars:a,...l}=n,c=Dm();return d.jsx(Vj,{ref:e,...c.getStyles("close",{classNames:r,style:o,styles:i,className:s}),...l})});f4.classes=Hc;f4.displayName="@mantine/core/DrawerCloseButton";const p4=Be((t,e)=>{const n=we("DrawerContent",null,t),{classNames:r,className:s,style:o,styles:i,vars:a,children:l,radius:c,__hidden:u,...f}=n,h=Dm(),m=h.scrollAreaComponent||iX;return d.jsx(qj,{...h.getStyles("content",{className:s,style:o,styles:i,classNames:r}),innerProps:h.getStyles("inner",{className:s,style:o,styles:i,classNames:r}),ref:e,...f,radius:c||h.radius||0,"data-hidden":u||void 0,children:d.jsx(m,{style:{height:"calc(100vh - var(--drawer-offset) * 2)"},children:l})})});p4.classes=Hc;p4.displayName="@mantine/core/DrawerContent";const h4=Be((t,e)=>{const n=we("DrawerHeader",null,t),{classNames:r,className:s,style:o,styles:i,vars:a,...l}=n,c=Dm();return d.jsx(Wj,{ref:e,...c.getStyles("header",{classNames:r,style:o,styles:i,className:s}),...l})});h4.classes=Hc;h4.displayName="@mantine/core/DrawerHeader";const m4=Be((t,e)=>{const n=we("DrawerOverlay",null,t),{classNames:r,className:s,style:o,styles:i,vars:a,...l}=n,c=Dm();return d.jsx(Yj,{ref:e,...c.getStyles("overlay",{classNames:r,style:o,styles:i,className:s}),...l})});m4.classes=Hc;m4.displayName="@mantine/core/DrawerOverlay";function f2e(t){switch(t){case"top":return"flex-start";case"bottom":return"flex-end";default:return}}function p2e(t){if(t==="top"||t==="bottom")return"0 0 calc(100% - var(--drawer-offset, 0rem) * 2)"}const h2e={top:"slide-down",bottom:"slide-up",left:"slide-right",right:"slide-left"},m2e={top:"slide-down",bottom:"slide-up",right:"slide-right",left:"slide-left"},g2e={closeOnClickOutside:!0,withinPortal:!0,lockScroll:!0,trapFocus:!0,returnFocus:!0,closeOnEscape:!0,keepMounted:!1,zIndex:Ps("modal"),position:"left"},y2e=(t,{position:e,size:n,offset:r})=>({root:{"--drawer-size":an(n,"drawer-size"),"--drawer-flex":p2e(e),"--drawer-height":e==="left"||e==="right"?void 0:"var(--drawer-size)","--drawer-align":f2e(e),"--drawer-justify":e==="right"?"flex-end":void 0,"--drawer-offset":Me(r)}}),g4=Be((t,e)=>{const n=we("DrawerRoot",g2e,t),{classNames:r,className:s,style:o,styles:i,unstyled:a,vars:l,scrollAreaComponent:c,position:u,transitionProps:f,radius:h,attributes:m,...y}=n,{dir:v}=$c(),b=Et({name:"Drawer",classes:Hc,props:n,className:s,style:o,classNames:r,styles:i,unstyled:a,attributes:m,vars:l,varsResolver:y2e}),w=(v==="rtl"?m2e:h2e)[u];return d.jsx(d2e,{value:{scrollAreaComponent:c,getStyles:b,radius:h},children:d.jsx(Hj,{ref:e,...b("root"),transitionProps:{transition:w,...f},"data-offset-scrollbars":c===Jr.Autosize||void 0,unstyled:a,...y})})});g4.classes=Hc;g4.displayName="@mantine/core/DrawerRoot";const[v2e,b2e]=za();function YX({children:t}){const[e,n]=S.useState([]),[r,s]=S.useState(Ps("modal"));return d.jsx(v2e,{value:{stack:e,addModal:(o,i)=>{n(a=>[...new Set([...a,o])]),s(a=>typeof i=="number"&&typeof a=="number"?Math.max(a,i):a)},removeModal:o=>n(i=>i.filter(a=>a!==o)),getZIndex:o=>`calc(${r} + ${e.indexOf(o)} + 1)`,currentId:e[e.length-1],maxZIndex:r},children:t})}YX.displayName="@mantine/core/DrawerStack";const y4=Be((t,e)=>{const n=we("DrawerTitle",null,t),{classNames:r,className:s,style:o,styles:i,vars:a,...l}=n,c=Dm();return d.jsx(Gj,{ref:e,...c.getStyles("title",{classNames:r,style:o,styles:i,className:s}),...l})});y4.classes=Hc;y4.displayName="@mantine/core/DrawerTitle";const x2e={closeOnClickOutside:!0,withinPortal:!0,lockScroll:!0,trapFocus:!0,returnFocus:!0,closeOnEscape:!0,keepMounted:!1,zIndex:Ps("modal"),withOverlay:!0,withCloseButton:!0},Xr=Be((t,e)=>{const{title:n,withOverlay:r,overlayProps:s,withCloseButton:o,closeButtonProps:i,children:a,opened:l,stackId:c,zIndex:u,...f}=we("Drawer",x2e,t),h=b2e(),m=!!n||o,y=h&&c?{closeOnEscape:h.currentId===c,trapFocus:h.currentId===c,zIndex:h.getZIndex(c)}:{},v=r===!1?!1:c&&h?h.currentId===c:l;return S.useEffect(()=>{h&&c&&(l?h.addModal(c,u||Ps("modal")):h.removeModal(c))},[l,c,u]),d.jsxs(g4,{ref:e,opened:l,zIndex:h&&c?h.getZIndex(c):u,...f,...y,children:[r&&d.jsx(m4,{visible:v,transitionProps:h&&c?{duration:0}:void 0,...s}),d.jsxs(p4,{__hidden:h&&c&&l?c!==h.currentId:!1,children:[m&&d.jsxs(h4,{children:[n&&d.jsx(y4,{children:n}),o&&d.jsx(f4,{...i})]}),d.jsx(d4,{children:a})]})]})});Xr.classes=Hc;Xr.displayName="@mantine/core/Drawer";Xr.Root=g4;Xr.Overlay=m4;Xr.Content=p4;Xr.Body=d4;Xr.Header=h4;Xr.Title=y4;Xr.CloseButton=f4;Xr.Stack=YX;const w2e={multiple:!1},GX=S.forwardRef((t,e)=>{const{onChange:n,children:r,multiple:s,accept:o,name:i,form:a,resetRef:l,disabled:c,capture:u,inputProps:f,...h}=we("FileButton",w2e,t),m=S.useRef(null),y=()=>{var w;!c&&((w=m.current)==null||w.click())},v=w=>{if(w.currentTarget.files===null)return n(s?[]:null);n(s?Array.from(w.currentTarget.files):w.currentTarget.files[0]||null)};return pg(l,()=>{m.current&&(m.current.value="")}),d.jsxs(d.Fragment,{children:[d.jsx("input",{style:{display:"none"},type:"file",accept:o,multiple:s,onChange:v,ref:Vr(e,m),name:i,form:a,capture:u,...f}),r({onClick:y,...h})]})});GX.displayName="@mantine/core/FileButton";function EF({color:t,theme:e,defaultShade:n}){const r=oa({color:t,theme:e});return r.isThemeColor?r.shade===void 0?`var(--mantine-color-${r.color}-${n})`:`var(${r.variable})`:t}var KX={root:"m_bcb3f3c2"};const S2e={color:"yellow"},C2e=(t,{color:e})=>({root:{"--mark-bg-dark":EF({color:e,theme:t,defaultShade:5}),"--mark-bg-light":EF({color:e,theme:t,defaultShade:2})}}),DA=Be((t,e)=>{const n=we("Mark",S2e,t),{classNames:r,className:s,style:o,styles:i,unstyled:a,vars:l,color:c,variant:u,attributes:f,...h}=n,m=Et({name:"Mark",props:n,className:s,style:o,classes:KX,classNames:r,styles:i,unstyled:a,attributes:f,vars:l,varsResolver:C2e});return d.jsx(ie,{component:"mark",ref:e,variant:u,...m("root"),...h})});DA.classes=KX;DA.displayName="@mantine/core/Mark";function TF(t){return t.replace(/[-[\]{}()*+?.,\\^$|#]/g,"\\$&")}function k2e(t,e){if(e==null)return[{chunk:t,highlighted:!1}];const n=Array.isArray(e)?e.map(TF):TF(e);if(!(Array.isArray(n)?n.filter(a=>a.trim().length>0).length>0:n.trim()!==""))return[{chunk:t,highlighted:!1}];const s=typeof n=="string"?n.trim():n.filter(a=>a.trim().length!==0).map(a=>a.trim()).sort((a,l)=>l.length-a.length).join("|"),o=new RegExp(`(${s})`,"gi");return t.split(o).map(a=>({chunk:a,highlighted:o.test(a)})).filter(({chunk:a})=>a)}const Mo=us((t,e)=>{const{unstyled:n,children:r,highlight:s,highlightStyles:o,color:i,...a}=we("Highlight",null,t),l=k2e(r,s);return d.jsx(ue,{unstyled:n,ref:e,...a,__staticSelector:"Highlight",children:l.map(({chunk:c,highlighted:u},f)=>u?d.jsx(DA,{unstyled:n,color:i,style:o,"data-highlight":c,children:c},f):d.jsx("span",{children:c},f))})});Mo.classes=ue.classes;Mo.displayName="@mantine/core/Highlight";const[E2e,XX]=zs("HoverCard component was not found in the tree"),ZX=S.createContext(!1),T2e=ZX.Provider,IA=()=>S.useContext(ZX);function QX(t){const{children:e,onMouseEnter:n,onMouseLeave:r,...s}=we("HoverCardDropdown",null,t),o=XX();if(IA()&&o.getFloatingProps&&o.floating){const c=o.getFloatingProps();return d.jsx(Dt.Dropdown,{ref:o.floating,...c,onMouseEnter:bs(n,c.onMouseEnter),onMouseLeave:bs(r,c.onMouseLeave),...s,children:e})}const a=bs(n,o.openDropdown),l=bs(r,o.closeDropdown);return d.jsx(Dt.Dropdown,{onMouseEnter:a,onMouseLeave:l,...s,children:e})}QX.displayName="@mantine/core/HoverCardDropdown";const M2e={openDelay:0,closeDelay:0};function OA(t){const{openDelay:e,closeDelay:n,children:r}=we("HoverCardGroup",M2e,t);return d.jsx(T2e,{value:!0,children:d.jsx(MK,{delay:{open:e,close:n},children:r})})}OA.displayName="@mantine/core/HoverCardGroup";OA.extend=t=>t;const j2e={refProp:"ref"},JX=S.forwardRef((t,e)=>{const{children:n,refProp:r,eventPropsWrapperName:s,...o}=we("HoverCardTarget",j2e,t),i=vd(n);if(!i)throw new Error("HoverCard.Target component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported");const a=XX();if(IA()&&a.getReferenceProps&&a.reference){const h=a.getReferenceProps();return d.jsx(Dt.Target,{refProp:r,ref:e,...o,children:S.cloneElement(i,s?{[s]:{...h,ref:a.reference}}:{...h,ref:a.reference})})}const c=bs(i.props.onMouseEnter,a.openDropdown),u=bs(i.props.onMouseLeave,a.closeDropdown),f={onMouseEnter:c,onMouseLeave:u};return d.jsx(Dt.Target,{refProp:r,ref:e,...o,children:S.cloneElement(i,s?{[s]:f}:f)})});JX.displayName="@mantine/core/HoverCardTarget";function A2e(t){const[e,n]=S.useState(t.defaultOpened),s=typeof t.opened=="boolean"?t.opened:e,o=IA(),i=_s(),a=S.useRef(-1),l=S.useRef(-1),c=S.useCallback(()=>{window.clearTimeout(a.current),window.clearTimeout(l.current)},[]),u=S.useCallback(k=>{var E,j;n(k),k?(y(i),(E=t.onOpen)==null||E.call(t)):(j=t.onClose)==null||j.call(t)},[i,t.onOpen,t.onClose]),{context:f,refs:h}=t4({open:s,onOpenChange:u}),{delay:m,setCurrentId:y}=jK(f,{id:i}),{getReferenceProps:v,getFloatingProps:b}=_K([EK(f,{enabled:!0,delay:o?m:{open:t.openDelay,close:t.closeDelay}}),RK(f,{role:"dialog"}),AK(f,{enabled:o})]),w=S.useCallback(()=>{o||(c(),t.openDelay===0||t.openDelay===void 0?u(!0):a.current=window.setTimeout(()=>u(!0),t.openDelay))},[o,c,t.openDelay,u]),C=S.useCallback(()=>{o||(c(),t.closeDelay===0||t.closeDelay===void 0?u(!1):l.current=window.setTimeout(()=>u(!1),t.closeDelay))},[o,c,t.closeDelay,u]);return S.useEffect(()=>()=>c(),[c]),{opened:s,reference:h.setReference,floating:h.setFloating,getReferenceProps:v,getFloatingProps:b,openDropdown:w,closeDropdown:C}}const _2e={openDelay:0,closeDelay:150,initiallyOpened:!1};function Ta(t){const{children:e,onOpen:n,onClose:r,openDelay:s,closeDelay:o,initiallyOpened:i,...a}=we("HoverCard",_2e,t),l=A2e({openDelay:s,closeDelay:o,defaultOpened:i,onOpen:n,onClose:r});return d.jsx(E2e,{value:{openDropdown:l.openDropdown,closeDropdown:l.closeDropdown,getReferenceProps:l.getReferenceProps,getFloatingProps:l.getFloatingProps,reference:l.reference,floating:l.floating},children:d.jsx(Dt,{...a,opened:l.opened,__staticSelector:"HoverCard",children:e})})}Ta.displayName="@mantine/core/HoverCard";Ta.Target=JX;Ta.Dropdown=QX;Ta.Group=OA;Ta.extend=t=>t;var eZ={root:"m_9e117634"};const R2e=(t,{radius:e,fit:n})=>({root:{"--image-radius":e===void 0?void 0:Wn(e),"--image-object-fit":n}}),Sd=us((t,e)=>{const n=we("Image",null,t),{classNames:r,className:s,style:o,styles:i,unstyled:a,vars:l,onError:c,src:u,radius:f,fit:h,fallbackSrc:m,mod:y,attributes:v,...b}=n,[w,C]=S.useState(!u);S.useEffect(()=>C(!u),[u]);const k=Et({name:"Image",classes:eZ,props:n,className:s,style:o,classNames:r,styles:i,unstyled:a,attributes:v,vars:l,varsResolver:R2e});return w&&m?d.jsx(ie,{component:"img",ref:e,src:m,...k("root"),onError:c,mod:["fallback",y],...b}):d.jsx(ie,{component:"img",ref:e,...k("root"),src:u,onError:E=>{c==null||c(E),C(!0)},mod:y,...b})});Sd.classes=eZ;Sd.displayName="@mantine/core/Image";function D2e(t="top-end",e=0){const n={"--indicator-top":void 0,"--indicator-bottom":void 0,"--indicator-left":void 0,"--indicator-right":void 0,"--indicator-translate-x":void 0,"--indicator-translate-y":void 0},r=Me(e),[s,o]=t.split("-");return s==="top"&&(n["--indicator-top"]=r,n["--indicator-translate-y"]="-50%"),s==="middle"&&(n["--indicator-top"]="50%",n["--indicator-translate-y"]="-50%"),s==="bottom"&&(n["--indicator-bottom"]=r,n["--indicator-translate-y"]="50%"),o==="start"&&(n["--indicator-left"]=r,n["--indicator-translate-x"]="-50%"),o==="center"&&(n["--indicator-left"]="50%",n["--indicator-translate-x"]="-50%"),o==="end"&&(n["--indicator-right"]=r,n["--indicator-translate-x"]="50%"),n}var tZ={root:"m_e5262200",indicator:"m_760d1fb1",processing:"m_885901b1"};const I2e={position:"top-end",offset:0},O2e=(t,{color:e,position:n,offset:r,size:s,radius:o,zIndex:i,autoContrast:a})=>({root:{"--indicator-color":e?xr(e,t):void 0,"--indicator-text-color":ep(a,t)?Lc({color:e,theme:t,autoContrast:a}):void 0,"--indicator-size":Me(s),"--indicator-radius":o===void 0?void 0:Wn(o),"--indicator-z-index":i==null?void 0:i.toString(),...D2e(n,r)}}),g2=Be((t,e)=>{const n=we("Indicator",I2e,t),{classNames:r,className:s,style:o,styles:i,unstyled:a,vars:l,children:c,position:u,offset:f,inline:h,label:m,radius:y,color:v,withBorder:b,disabled:w,processing:C,zIndex:k,autoContrast:E,mod:j,attributes:A,...M}=n,_=Et({name:"Indicator",classes:tZ,props:n,className:s,style:o,classNames:r,styles:i,unstyled:a,attributes:A,vars:l,varsResolver:O2e});return d.jsxs(ie,{ref:e,..._("root"),mod:[{inline:h},j],...M,children:[!w&&d.jsx(ie,{mod:{"with-label":!!m,"with-border":b,processing:C},..._("indicator"),children:m}),c]})});g2.classes=tZ;g2.displayName="@mantine/core/Indicator";function Zh(){return Zh=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)({}).hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Zh.apply(null,arguments)}function NA(t,e){if(t==null)return{};var n={};for(var r in t)if({}.hasOwnProperty.call(t,r)){if(e.indexOf(r)!==-1)continue;n[r]=t[r]}return n}const[N2e,L2e]=zs("List component was not found in tree");var LA={root:"m_abbac491",item:"m_abb6bec2",itemWrapper:"m_75cd9f71",itemIcon:"m_60f83e5b"};const $A=Be((t,e)=>{const n=we("ListItem",null,t),{classNames:r,className:s,style:o,styles:i,vars:a,icon:l,children:c,mod:u,...f}=n,h=L2e(),m=l||h.icon,y={classNames:r,styles:i};return d.jsx(ie,{...h.getStyles("item",{...y,className:s,style:o}),component:"li",mod:[{"with-icon":!!m,centered:h.center},u],ref:e,...f,children:d.jsxs("div",{...h.getStyles("itemWrapper",y),children:[m&&d.jsx("span",{...h.getStyles("itemIcon",y),children:m}),d.jsx("span",{...h.getStyles("itemLabel",y),children:c})]})})});$A.classes=LA;$A.displayName="@mantine/core/ListItem";const $2e={type:"unordered"},F2e=(t,{size:e,spacing:n})=>({root:{"--list-fz":Ur(e),"--list-lh":FG(e),"--list-spacing":ss(n)}}),Qr=Be((t,e)=>{const n=we("List",$2e,t),{classNames:r,className:s,style:o,styles:i,unstyled:a,vars:l,children:c,type:u,withPadding:f,icon:h,spacing:m,center:y,listStyleType:v,mod:b,attributes:w,...C}=n,k=Et({name:"List",classes:LA,props:n,className:s,style:o,classNames:r,styles:i,unstyled:a,attributes:w,vars:l,varsResolver:F2e});return d.jsx(N2e,{value:{center:y,icon:h,getStyles:k},children:d.jsx(ie,{...k("root",{style:{listStyleType:v}}),component:u==="unordered"?"ul":"ol",mod:[{"with-padding":f,type:h?"none":v},b],ref:e,...C,children:c})})});Qr.classes=LA;Qr.displayName="@mantine/core/List";Qr.Item=$A;var nZ={root:"m_6e45937b",loader:"m_e8eb006c",overlay:"m_df587f17"};const MF={transitionProps:{transition:"fade",duration:0},overlayProps:{backgroundOpacity:.75},zIndex:Ps("overlay")},z2e=(t,{zIndex:e})=>({root:{"--lo-z-index":e==null?void 0:e.toString()}}),y2=Be((t,e)=>{const n=we("LoadingOverlay",MF,t),{classNames:r,className:s,style:o,styles:i,unstyled:a,vars:l,transitionProps:c,loaderProps:u,overlayProps:f,visible:h,zIndex:m,attributes:y,...v}=n,b=Tr(),w=Et({name:"LoadingOverlay",classes:nZ,props:n,className:s,style:o,classNames:r,styles:i,unstyled:a,attributes:y,vars:l,varsResolver:z2e}),C={...MF.overlayProps,...f};return d.jsx(na,{transition:"fade",...c,mounted:!!h,children:k=>d.jsxs(ie,{...w("root",{style:k}),ref:e,...v,children:[d.jsx(Bs,{...w("loader"),unstyled:a,...u}),d.jsx(Yh,{...C,...w("overlay"),darkHidden:!0,unstyled:a,color:(f==null?void 0:f.color)||b.white}),d.jsx(Yh,{...C,...w("overlay"),lightHidden:!0,unstyled:a,color:(f==null?void 0:f.color)||b.colors.dark[5]})]})})});y2.classes=nZ;y2.displayName="@mantine/core/LoadingOverlay";const[P2e,Cd]=zs("Menu component was not found in the tree");var kd={dropdown:"m_dc9b7c9f",label:"m_9bfac126",divider:"m_efdf90cb",item:"m_99ac2aa1",itemLabel:"m_5476e0d3",itemSection:"m_8b75e504",chevron:"m_b85b0bed"};const FA=Be((t,e)=>{const{classNames:n,className:r,style:s,styles:o,vars:i,...a}=we("MenuDivider",null,t),l=Cd();return d.jsx(ie,{ref:e,...l.getStyles("divider",{className:r,style:s,styles:o,classNames:n}),...a})});FA.classes=kd;FA.displayName="@mantine/core/MenuDivider";const zA=Be((t,e)=>{const{classNames:n,className:r,style:s,styles:o,vars:i,onMouseEnter:a,onMouseLeave:l,onKeyDown:c,children:u,...f}=we("MenuDropdown",null,t),h=S.useRef(null),m=Cd(),y=bs(c,w=>{var C,k;(w.key==="ArrowUp"||w.key==="ArrowDown")&&(w.preventDefault(),(k=(C=h.current)==null?void 0:C.querySelectorAll("[data-menu-item]:not(:disabled)")[0])==null||k.focus())}),v=bs(a,()=>(m.trigger==="hover"||m.trigger==="click-hover")&&m.openDropdown()),b=bs(l,()=>(m.trigger==="hover"||m.trigger==="click-hover")&&m.closeDropdown());return d.jsxs(Dt.Dropdown,{...f,onMouseEnter:v,onMouseLeave:b,role:"menu","aria-orientation":"vertical",ref:Vr(e,h),...m.getStyles("dropdown",{className:r,style:s,styles:o,classNames:n,withStaticClass:!1}),tabIndex:-1,"data-menu-dropdown":!0,onKeyDown:y,children:[m.withInitialFocusPlaceholder&&d.jsx("div",{tabIndex:-1,"data-autofocus":!0,"data-mantine-stop-propagation":!0,style:{outline:0}}),u]})});zA.classes=kd;zA.displayName="@mantine/core/MenuDropdown";const[B2e,v4]=za(),PA=us((t,e)=>{const{classNames:n,className:r,style:s,styles:o,vars:i,color:a,closeMenuOnClick:l,leftSection:c,rightSection:u,children:f,disabled:h,"data-disabled":m,...y}=we("MenuItem",null,t),v=Cd(),b=v4(),w=Tr(),{dir:C}=$c(),k=S.useRef(null),E=y,j=bs(E.onClick,()=>{m||(typeof l=="boolean"?l&&v.closeDropdownImmediately():v.closeOnItemClick&&v.closeDropdownImmediately())}),A=a?w.variantColorResolver({color:a,theme:w,variant:"light"}):void 0,M=a?oa({color:a,theme:w}):null,_=bs(E.onKeyDown,D=>{D.key==="ArrowLeft"&&b&&(b.close(),b.focusParentItem())});return d.jsxs(En,{onMouseDown:D=>D.preventDefault(),...y,unstyled:v.unstyled,tabIndex:v.menuItemTabIndex,...v.getStyles("item",{className:r,style:s,styles:o,classNames:n}),ref:Vr(k,e),role:"menuitem",disabled:h,"data-menu-item":!0,"data-disabled":h||m||void 0,"data-mantine-stop-propagation":!0,onClick:j,onKeyDown:Hw({siblingSelector:"[data-menu-item]:not([data-disabled])",parentSelector:"[data-menu-dropdown]",activateOnFocus:!1,loop:v.loop,dir:C,orientation:"vertical",onKeyDown:_}),__vars:{"--menu-item-color":M!=null&&M.isThemeColor&&(M==null?void 0:M.shade)===void 0?`var(--mantine-color-${M.color}-6)`:A==null?void 0:A.color,"--menu-item-hover":A==null?void 0:A.hover},children:[c&&d.jsx("div",{...v.getStyles("itemSection",{styles:o,classNames:n}),"data-position":"left",children:c}),f&&d.jsx("div",{...v.getStyles("itemLabel",{styles:o,classNames:n}),children:f}),u&&d.jsx("div",{...v.getStyles("itemSection",{styles:o,classNames:n}),"data-position":"right",children:u})]})});PA.classes=kd;PA.displayName="@mantine/core/MenuItem";const BA=Be((t,e)=>{const{classNames:n,className:r,style:s,styles:o,vars:i,...a}=we("MenuLabel",null,t),l=Cd();return d.jsx(ie,{ref:e,...l.getStyles("label",{className:r,style:s,styles:o,classNames:n}),...a})});BA.classes=kd;BA.displayName="@mantine/core/MenuLabel";const HA=Be((t,e)=>{const{classNames:n,className:r,style:s,styles:o,vars:i,onMouseEnter:a,onMouseLeave:l,onKeyDown:c,children:u,...f}=we("MenuSubDropdown",null,t),h=S.useRef(null),m=Cd(),y=v4(),v=bs(a,y==null?void 0:y.open),b=bs(l,y==null?void 0:y.close);return d.jsx(Dt.Dropdown,{...f,onMouseEnter:v,onMouseLeave:b,role:"menu","aria-orientation":"vertical",ref:Vr(e,h),...m.getStyles("dropdown",{className:r,style:s,styles:o,classNames:n,withStaticClass:!1}),tabIndex:-1,"data-menu-dropdown":!0,children:u})});HA.classes=kd;HA.displayName="@mantine/core/MenuSubDropdown";const UA=us((t,e)=>{const{classNames:n,className:r,style:s,styles:o,vars:i,color:a,leftSection:l,rightSection:c,children:u,disabled:f,"data-disabled":h,closeMenuOnClick:m,...y}=we("MenuSubItem",null,t),v=Cd(),b=v4(),w=Tr(),{dir:C}=$c(),k=S.useRef(null),E=y,j=a?w.variantColorResolver({color:a,theme:w,variant:"light"}):void 0,A=a?oa({color:a,theme:w}):null,M=bs(E.onKeyDown,N=>{N.key==="ArrowRight"&&(b==null||b.open(),b==null||b.focusFirstItem()),N.key==="ArrowLeft"&&(b!=null&&b.parentContext)&&(b.parentContext.close(),b.parentContext.focusParentItem())}),_=bs(E.onClick,()=>{!h&&m&&v.closeDropdownImmediately()}),D=bs(E.onMouseEnter,b==null?void 0:b.open),R=bs(E.onMouseLeave,b==null?void 0:b.close);return d.jsxs(En,{onMouseDown:N=>N.preventDefault(),...y,unstyled:v.unstyled,tabIndex:v.menuItemTabIndex,...v.getStyles("item",{className:r,style:s,styles:o,classNames:n}),ref:Vr(k,e),role:"menuitem",disabled:f,"data-menu-item":!0,"data-sub-menu-item":!0,"data-disabled":f||h||void 0,"data-mantine-stop-propagation":!0,onMouseEnter:D,onMouseLeave:R,onClick:_,onKeyDown:Hw({siblingSelector:"[data-menu-item]:not([data-disabled])",parentSelector:"[data-menu-dropdown]",activateOnFocus:!1,loop:v.loop,dir:C,orientation:"vertical",onKeyDown:M}),__vars:{"--menu-item-color":A!=null&&A.isThemeColor&&(A==null?void 0:A.shade)===void 0?`var(--mantine-color-${A.color}-6)`:j==null?void 0:j.color,"--menu-item-hover":j==null?void 0:j.hover},children:[l&&d.jsx("div",{...v.getStyles("itemSection",{styles:o,classNames:n}),"data-position":"left",children:l}),u&&d.jsx("div",{...v.getStyles("itemLabel",{styles:o,classNames:n}),children:u}),d.jsx("div",{...v.getStyles("itemSection",{styles:o,classNames:n}),"data-position":"right",children:c||d.jsx(Nf,{...v.getStyles("chevron"),size:14})})]})});UA.classes=kd;UA.displayName="@mantine/core/MenuSubItem";function rZ({children:t,refProp:e}){if(!i2(t))throw new Error("Menu.Sub.Target component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported");return Cd(),d.jsx(Dt.Target,{refProp:e,popupType:"menu",children:t})}rZ.displayName="@mantine/core/MenuSubTarget";const H2e={offset:0,position:"right-start",transitionProps:{duration:0},openDelay:0,middlewares:{shift:{crossAxis:!0}}};function Im(t){const{children:e,closeDelay:n,openDelay:r,...s}=we("MenuSub",H2e,t),o=_s(),[i,{open:a,close:l}]=Rs(!1),c=v4(),{openDropdown:u,closeDropdown:f}=dX({open:a,close:l,closeDelay:n,openDelay:r}),h=()=>window.setTimeout(()=>{var y,v;(v=(y=document.getElementById(`${o}-dropdown`))==null?void 0:y.querySelectorAll("[data-menu-item]:not([data-disabled])")[0])==null||v.focus()},16),m=()=>window.setTimeout(()=>{var y;(y=document.getElementById(`${o}-target`))==null||y.focus()},16);return d.jsx(B2e,{value:{opened:i,close:f,open:u,focusFirstItem:h,focusParentItem:m,parentContext:c},children:d.jsx(Dt,{opened:i,withinPortal:!1,withArrow:!1,id:o,...s,children:e})})}Im.extend=t=>t;Im.displayName="@mantine/core/MenuSub";Im.Target=rZ;Im.Dropdown=HA;Im.Item=UA;const U2e={refProp:"ref"},sZ=S.forwardRef((t,e)=>{const{children:n,refProp:r,...s}=we("MenuTarget",U2e,t),o=vd(n);if(!o)throw new Error("Menu.Target component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported");const i=Cd(),a=o.props,l=bs(a.onClick,()=>{i.trigger==="click"?i.toggleDropdown():i.trigger==="click-hover"&&(i.setOpenedViaClick(!0),i.opened||i.openDropdown())}),c=bs(a.onMouseEnter,()=>(i.trigger==="hover"||i.trigger==="click-hover")&&i.openDropdown()),u=bs(a.onMouseLeave,()=>{(i.trigger==="hover"||i.trigger==="click-hover"&&!i.openedViaClick)&&i.closeDropdown()});return d.jsx(Dt.Target,{refProp:r,popupType:"menu",ref:e,...s,children:S.cloneElement(o,{onClick:l,onMouseEnter:c,onMouseLeave:u,"data-expanded":i.opened?!0:void 0})})});sZ.displayName="@mantine/core/MenuTarget";const V2e={trapFocus:!0,closeOnItemClick:!0,withInitialFocusPlaceholder:!0,clickOutsideEvents:["mousedown","touchstart","keydown"],loop:!0,trigger:"click",openDelay:0,closeDelay:100,menuItemTabIndex:-1};function et(t){const e=we("Menu",V2e,t),{children:n,onOpen:r,onClose:s,opened:o,defaultOpened:i,trapFocus:a,onChange:l,closeOnItemClick:c,loop:u,closeOnEscape:f,trigger:h,openDelay:m,closeDelay:y,classNames:v,styles:b,unstyled:w,variant:C,vars:k,menuItemTabIndex:E,keepMounted:j,withInitialFocusPlaceholder:A,attributes:M,..._}=e,D=Et({name:"Menu",classes:kd,props:e,classNames:v,styles:b,unstyled:w,attributes:M}),[R,N]=ls({value:o,defaultValue:i,finalValue:!1,onChange:l}),[z,B]=S.useState(!1),L=()=>{N(!1),B(!1),R&&(s==null||s())},P=()=>{N(!0),!R&&(r==null||r())},I=()=>{R?L():P()},{openDropdown:H,closeDropdown:$}=dX({open:P,close:L,closeDelay:y,openDelay:m}),V=W=>ape("[data-menu-item]","[data-menu-dropdown]",W),{resolvedClassNames:q,resolvedStyles:U}=Ti({classNames:v,styles:b,props:e});return d.jsx(P2e,{value:{getStyles:D,opened:R,toggleDropdown:I,getItemIndex:V,openedViaClick:z,setOpenedViaClick:B,closeOnItemClick:c,closeDropdown:h==="click"?L:$,openDropdown:h==="click"?P:H,closeDropdownImmediately:L,loop:u,trigger:h,unstyled:w,menuItemTabIndex:E,withInitialFocusPlaceholder:A},children:d.jsx(Dt,{returnFocus:!0,..._,opened:R,onChange:I,defaultOpened:i,trapFocus:j?!1:a,closeOnEscape:f,__staticSelector:"Menu",classNames:q,styles:U,unstyled:w,variant:C,keepMounted:j,children:n})})}et.extend=t=>t;et.withProps=iK(et);et.classes=kd;et.displayName="@mantine/core/Menu";et.Item=PA;et.Label=BA;et.Dropdown=zA;et.Target=sZ;et.Divider=FA;et.Sub=Im;var Uc={root:"m_9df02822",content:"m_54c44539",inner:"m_1f958f16",header:"m_d0e2b9cd"};const[q2e,Om]=zs("Modal component was not found in tree"),b4=Be((t,e)=>{const n=we("ModalBody",null,t),{classNames:r,className:s,style:o,styles:i,vars:a,...l}=n,c=Om();return d.jsx(Uj,{ref:e,...c.getStyles("body",{classNames:r,style:o,styles:i,className:s}),...l})});b4.classes=Uc;b4.displayName="@mantine/core/ModalBody";const x4=Be((t,e)=>{const n=we("ModalCloseButton",null,t),{classNames:r,className:s,style:o,styles:i,vars:a,...l}=n,c=Om();return d.jsx(Vj,{ref:e,...c.getStyles("close",{classNames:r,style:o,styles:i,className:s}),...l})});x4.classes=Uc;x4.displayName="@mantine/core/ModalCloseButton";const w4=Be((t,e)=>{const n=we("ModalContent",null,t),{classNames:r,className:s,style:o,styles:i,vars:a,children:l,__hidden:c,...u}=n,f=Om(),h=f.scrollAreaComponent||iX;return d.jsx(qj,{...f.getStyles("content",{className:s,style:o,styles:i,classNames:r}),innerProps:f.getStyles("inner",{className:s,style:o,styles:i,classNames:r}),"data-full-screen":f.fullScreen||void 0,"data-modal-content":!0,"data-hidden":c||void 0,ref:e,...u,children:d.jsx(h,{style:{maxHeight:f.fullScreen?"100dvh":`calc(100dvh - (${Me(f.yOffset)} * 2))`},children:l})})});w4.classes=Uc;w4.displayName="@mantine/core/ModalContent";const S4=Be((t,e)=>{const n=we("ModalHeader",null,t),{classNames:r,className:s,style:o,styles:i,vars:a,...l}=n,c=Om();return d.jsx(Wj,{ref:e,...c.getStyles("header",{classNames:r,style:o,styles:i,className:s}),...l})});S4.classes=Uc;S4.displayName="@mantine/core/ModalHeader";const C4=Be((t,e)=>{const n=we("ModalOverlay",null,t),{classNames:r,className:s,style:o,styles:i,vars:a,...l}=n,c=Om();return d.jsx(Yj,{ref:e,...c.getStyles("overlay",{classNames:r,style:o,styles:i,className:s}),...l})});C4.classes=Uc;C4.displayName="@mantine/core/ModalOverlay";const W2e={__staticSelector:"Modal",closeOnClickOutside:!0,withinPortal:!0,lockScroll:!0,trapFocus:!0,returnFocus:!0,closeOnEscape:!0,keepMounted:!1,zIndex:Ps("modal"),transitionProps:{duration:200,transition:"fade-down"},yOffset:"5dvh"},Y2e=(t,{radius:e,size:n,yOffset:r,xOffset:s})=>({root:{"--modal-radius":e===void 0?void 0:Wn(e),"--modal-size":an(n,"modal-size"),"--modal-y-offset":Me(r),"--modal-x-offset":Me(s)}}),k4=Be((t,e)=>{const n=we("ModalRoot",W2e,t),{classNames:r,className:s,style:o,styles:i,unstyled:a,vars:l,yOffset:c,scrollAreaComponent:u,radius:f,fullScreen:h,centered:m,xOffset:y,__staticSelector:v,attributes:b,...w}=n,C=Et({name:v,classes:Uc,props:n,className:s,style:o,classNames:r,styles:i,unstyled:a,attributes:b,vars:l,varsResolver:Y2e});return d.jsx(q2e,{value:{yOffset:c,scrollAreaComponent:u,getStyles:C,fullScreen:h},children:d.jsx(Hj,{ref:e,...C("root"),"data-full-screen":h||void 0,"data-centered":m||void 0,"data-offset-scrollbars":u===Jr.Autosize||void 0,unstyled:a,...w})})});k4.classes=Uc;k4.displayName="@mantine/core/ModalRoot";const[G2e,K2e]=za();function oZ({children:t}){const[e,n]=S.useState([]),[r,s]=S.useState(Ps("modal"));return d.jsx(G2e,{value:{stack:e,addModal:(o,i)=>{n(a=>[...new Set([...a,o])]),s(a=>typeof i=="number"&&typeof a=="number"?Math.max(a,i):a)},removeModal:o=>n(i=>i.filter(a=>a!==o)),getZIndex:o=>`calc(${r} + ${e.indexOf(o)} + 1)`,currentId:e[e.length-1],maxZIndex:r},children:t})}oZ.displayName="@mantine/core/ModalStack";const E4=Be((t,e)=>{const n=we("ModalTitle",null,t),{classNames:r,className:s,style:o,styles:i,vars:a,...l}=n,c=Om();return d.jsx(Gj,{ref:e,...c.getStyles("title",{classNames:r,style:o,styles:i,className:s}),...l})});E4.classes=Uc;E4.displayName="@mantine/core/ModalTitle";const X2e={closeOnClickOutside:!0,withinPortal:!0,lockScroll:!0,trapFocus:!0,returnFocus:!0,closeOnEscape:!0,keepMounted:!1,zIndex:Ps("modal"),transitionProps:{duration:200,transition:"fade-down"},withOverlay:!0,withCloseButton:!0},nr=Be((t,e)=>{const{title:n,withOverlay:r,overlayProps:s,withCloseButton:o,closeButtonProps:i,children:a,radius:l,opened:c,stackId:u,zIndex:f,...h}=we("Modal",X2e,t),m=K2e(),y=!!n||o,v=m&&u?{closeOnEscape:m.currentId===u,trapFocus:m.currentId===u,zIndex:m.getZIndex(u)}:{},b=r===!1?!1:u&&m?m.currentId===u:c;return S.useEffect(()=>{m&&u&&(c?m.addModal(u,f||Ps("modal")):m.removeModal(u))},[c,u,f]),d.jsxs(k4,{ref:e,radius:l,opened:c,zIndex:m&&u?m.getZIndex(u):f,...h,...v,children:[r&&d.jsx(C4,{visible:b,transitionProps:m&&u?{duration:0}:void 0,...s}),d.jsxs(w4,{radius:l,__hidden:m&&u&&c?u!==m.currentId:!1,children:[y&&d.jsxs(S4,{children:[n&&d.jsx(E4,{children:n}),o&&d.jsx(x4,{...i})]}),d.jsx(b4,{children:a})]})]})});nr.classes=Uc;nr.displayName="@mantine/core/Modal";nr.Root=k4;nr.Overlay=C4;nr.Content=w4;nr.Body=b4;nr.Header=S4;nr.Title=E4;nr.CloseButton=x4;nr.Stack=oZ;const[Z2e,VA]=za();var T4={root:"m_7cda1cd6","root--default":"m_44da308b","root--contrast":"m_e3a01f8",label:"m_1e0e6180",remove:"m_ae386778",group:"m_1dcfd90b"};const[Q2e,J2e]=za(),eye=(t,{gap:e},{size:n})=>({group:{"--pg-gap":e!==void 0?an(e):an(n,"pg-gap")}}),qA=Be((t,e)=>{const n=we("PillGroup",null,t),{classNames:r,className:s,style:o,styles:i,unstyled:a,vars:l,size:c,disabled:u,attributes:f,...h}=n,m=VA(),y=(m==null?void 0:m.size)||c||void 0,v=Et({name:"PillGroup",classes:T4,props:n,className:s,style:o,classNames:r,styles:i,unstyled:a,attributes:f,vars:l,varsResolver:eye,stylesCtx:{size:y},rootSelector:"group"});return d.jsx(Q2e,{value:{size:y,disabled:u},children:d.jsx(ie,{ref:e,size:y,...v("group"),...h})})});qA.classes=T4;qA.displayName="@mantine/core/PillGroup";const tye={variant:"default"},nye=(t,{radius:e},{size:n})=>({root:{"--pill-fz":an(n,"pill-fz"),"--pill-height":an(n,"pill-height"),"--pill-radius":e===void 0?void 0:Wn(e)}}),El=Be((t,e)=>{const n=we("Pill",tye,t),{classNames:r,className:s,style:o,styles:i,unstyled:a,vars:l,variant:c,children:u,withRemoveButton:f,onRemove:h,removeButtonProps:m,radius:y,size:v,disabled:b,mod:w,attributes:C,...k}=n,E=J2e(),j=VA(),A=v||(E==null?void 0:E.size)||void 0,M=(j==null?void 0:j.variant)==="filled"?"contrast":c||"default",_=Et({name:"Pill",classes:T4,props:n,className:s,style:o,classNames:r,styles:i,unstyled:a,attributes:C,vars:l,varsResolver:nye,stylesCtx:{size:A}});return d.jsxs(ie,{component:"span",ref:e,variant:M,size:A,..._("root",{variant:M}),mod:[{"with-remove":f&&!b,disabled:b||(E==null?void 0:E.disabled)},w],...k,children:[d.jsx("span",{..._("label"),children:u}),f&&d.jsx(jm,{variant:"transparent",radius:y,tabIndex:-1,"aria-hidden":!0,unstyled:a,...m,..._("remove",{className:m==null?void 0:m.className,style:m==null?void 0:m.style}),onMouseDown:D=>{var R;D.preventDefault(),D.stopPropagation(),(R=m==null?void 0:m.onMouseDown)==null||R.call(m,D)},onClick:D=>{var R;D.stopPropagation(),h==null||h(),(R=m==null?void 0:m.onClick)==null||R.call(m,D)}})]})});El.classes=T4;El.displayName="@mantine/core/Pill";El.Group=qA;var iZ={field:"m_45c4369d"};const rye={type:"visible"},WA=Be((t,e)=>{const n=we("PillsInputField",rye,t),{classNames:r,className:s,style:o,styles:i,unstyled:a,vars:l,type:c,disabled:u,id:f,pointer:h,mod:m,attributes:y,...v}=n,b=VA(),w=Am(),C=Et({name:"PillsInputField",classes:iZ,props:n,className:s,style:o,classNames:r,styles:i,unstyled:a,attributes:y,rootSelector:"field"}),k=u||(b==null?void 0:b.disabled);return d.jsx(ie,{component:"input",ref:Vr(e,b==null?void 0:b.fieldRef),"data-type":c,disabled:k,mod:[{disabled:k,pointer:h},m],...C("field"),...v,id:(w==null?void 0:w.inputId)||f,"aria-invalid":b==null?void 0:b.hasError,"aria-describedby":w==null?void 0:w.describedBy,type:"text",onMouseDown:E=>!h&&E.stopPropagation()})});WA.classes=iZ;WA.displayName="@mantine/core/PillsInputField";const sye={size:"sm"},Qh=Be((t,e)=>{const n=we("PillsInput",sye,t),{children:r,onMouseDown:s,onClick:o,size:i,disabled:a,__staticSelector:l,error:c,variant:u,...f}=n,h=S.useRef(null);return d.jsx(Z2e,{value:{fieldRef:h,size:i,disabled:a,hasError:!!c,variant:u},children:d.jsx(Pa,{size:i,error:c,variant:u,component:"div",ref:e,"data-no-overflow":!0,onMouseDown:m=>{var y;m.preventDefault(),s==null||s(m),(y=h.current)==null||y.focus()},onClick:m=>{var v;m.preventDefault();const y=m.currentTarget.closest("fieldset");y!=null&&y.disabled||((v=h.current)==null||v.focus(),o==null||o(m))},...f,multiline:!0,disabled:a,__staticSelector:l||"PillsInput",withAria:!1,children:r})})});Qh.displayName="@mantine/core/PillsInput";Qh.Field=WA;function oye({data:t,value:e}){const n=e.map(s=>s.trim().toLowerCase());return t.reduce((s,o)=>(Xh(o)?s.push({group:o.group,items:o.items.filter(i=>n.indexOf(i.value.toLowerCase().trim())===-1)}):n.indexOf(o.value.toLowerCase().trim())===-1&&s.push(o),s),[])}const jF={xs:41,sm:50,md:60,lg:72,xl:89},iye={maxValues:1/0,withCheckIcon:!0,checkIconPosition:"left",hiddenInputValuesDivider:",",clearSearchOnChange:!0,openOnFocus:!0,size:"sm"},YA=Be((t,e)=>{const n=we("MultiSelect",iye,t),{classNames:r,className:s,style:o,styles:i,unstyled:a,vars:l,size:c,value:u,defaultValue:f,onChange:h,onKeyDown:m,variant:y,data:v,dropdownOpened:b,defaultDropdownOpened:w,onDropdownOpen:C,onDropdownClose:k,selectFirstOptionOnChange:E,selectFirstOptionOnDropdownOpen:j,onOptionSubmit:A,comboboxProps:M,filter:_,limit:D,withScrollArea:R,maxDropdownHeight:N,searchValue:z,defaultSearchValue:B,onSearchChange:L,readOnly:P,disabled:I,onFocus:H,onBlur:$,radius:V,rightSection:q,rightSectionWidth:U,rightSectionPointerEvents:W,rightSectionProps:Y,leftSection:G,leftSectionWidth:K,leftSectionPointerEvents:Q,leftSectionProps:Z,inputContainer:J,inputWrapperOrder:ne,withAsterisk:se,labelProps:ce,descriptionProps:fe,errorProps:le,wrapperProps:be,description:je,label:pe,error:_e,maxValues:Ce,searchable:Te,nothingFoundMessage:Ae,withCheckIcon:Ze,withAlignedLabels:He,checkIconPosition:lt,hidePickedOptions:Ye,withErrorStyles:ge,name:Fe,form:Se,id:qe,clearable:ot,clearButtonProps:$e,hiddenInputProps:pt,placeholder:gt,hiddenInputValuesDivider:Pt,required:at,mod:nt,renderOption:We,onRemove:At,onClear:St,scrollAreaProps:Ot,chevronColor:Tt,attributes:kt,clearSearchOnChange:jt,openOnFocus:vt,...Yt}=n,Vt=_s(qe),Nt=gX(v),Ht=lA(Nt),cn=S.useRef({}),qt=zc({opened:b,defaultOpened:w,onDropdownOpen:()=>{C==null||C(),j&&qt.selectFirstOption()},onDropdownClose:()=>{k==null||k(),qt.resetSelectedOption()}}),{styleProps:Kt,rest:{type:yn,autoComplete:ee,...ae}}=bd(Yt),[de,Ee]=ls({value:u,defaultValue:f,finalValue:[],onChange:h}),[De,Qe]=ls({value:z,defaultValue:B,finalValue:"",onChange:L}),mt=Ne=>{Qe(Ne),qt.resetSelectedOption()},rt=Et({name:"MultiSelect",classes:{},props:n,classNames:r,styles:i,unstyled:a,attributes:kt}),{resolvedClassNames:st,resolvedStyles:Mt}=Ti({props:n,styles:i,classNames:r}),Ut=Ne=>{m==null||m(Ne),Ne.key===" "&&!Te&&(Ne.preventDefault(),qt.toggleDropdown()),Ne.key==="Backspace"&&De.length===0&&de.length>0&&(At==null||At(de[de.length-1]),Ee(de.slice(0,de.length-1)))},Lt=de.map((Ne,ut)=>{var Mn;const un=Ht[Ne]||cn.current[Ne];return d.jsx(El,{withRemoveButton:!P&&!((Mn=Ht[Ne])!=null&&Mn.disabled),onRemove:()=>{Ee(de.filter(nn=>Ne!==nn)),At==null||At(Ne)},unstyled:a,disabled:I,...rt("pill"),children:(un==null?void 0:un.label)||Ne},`${Ne}-${ut}`)});S.useEffect(()=>{E&&qt.selectFirstOption()},[E,De]),S.useEffect(()=>{de.forEach(Ne=>{Ne in Ht&&(cn.current[Ne]=Ht[Ne])})},[Ht,de]);const Xt=d.jsx(Ft.ClearButton,{...$e,onClear:()=>{St==null||St(),Ee([]),mt("")}}),mn=oye({data:Nt,value:de}),ht=ot&&de.length>0&&!I&&!P,oe=ht?{paddingInlineEnd:jF[c]??jF.sm}:void 0;return d.jsxs(d.Fragment,{children:[d.jsxs(Ft,{store:qt,classNames:st,styles:Mt,unstyled:a,size:c,readOnly:P,__staticSelector:"MultiSelect",attributes:kt,onOptionSubmit:Ne=>{A==null||A(Ne),jt&&mt(""),qt.updateSelectedOptionIndex("selected"),de.includes(Ht[Ne].value)?(Ee(de.filter(ut=>ut!==Ht[Ne].value)),At==null||At(Ht[Ne].value)):de.length<Ce&&Ee([...de,Ht[Ne].value])},...M,children:[d.jsx(Ft.DropdownTarget,{children:d.jsx(Qh,{...Kt,__staticSelector:"MultiSelect",classNames:st,styles:Mt,unstyled:a,size:c,className:s,style:o,variant:y,disabled:I,radius:V,__defaultRightSection:d.jsx(Ft.Chevron,{size:c,error:_e,unstyled:a,color:Tt}),__clearSection:Xt,__clearable:ht,rightSection:q,rightSectionPointerEvents:W||"none",rightSectionWidth:U,rightSectionProps:Y,leftSection:G,leftSectionWidth:K,leftSectionPointerEvents:Q,leftSectionProps:Z,inputContainer:J,inputWrapperOrder:ne,withAsterisk:se,labelProps:ce,descriptionProps:fe,errorProps:le,wrapperProps:be,description:je,label:pe,error:_e,withErrorStyles:ge,__stylesApiProps:{...n,rightSectionPointerEvents:W||"none",multiline:!0},pointer:!Te,onClick:()=>Te?qt.openDropdown():qt.toggleDropdown(),"data-expanded":qt.dropdownOpened||void 0,id:Vt,required:at,mod:nt,attributes:kt,children:d.jsxs(El.Group,{attributes:kt,disabled:I,unstyled:a,...rt("pillsList",{style:oe}),children:[Lt,d.jsx(Ft.EventsTarget,{autoComplete:ee,children:d.jsx(Qh.Field,{...ae,ref:e,id:Vt,placeholder:gt,type:!Te&&!gt?"hidden":"visible",...rt("inputField"),unstyled:a,onFocus:Ne=>{H==null||H(Ne),vt&&Te&&qt.openDropdown()},onBlur:Ne=>{$==null||$(Ne),qt.closeDropdown(),mt("")},onKeyDown:Ut,value:De,onChange:Ne=>{mt(Ne.currentTarget.value),Te&&qt.openDropdown(),E&&qt.selectFirstOption()},disabled:I,readOnly:P||!Te,pointer:!Te})})]})})}),d.jsx(IX,{data:Ye?mn:Nt,hidden:P||I,filter:_,search:De,limit:D,hiddenWhenEmpty:!Ae,withScrollArea:R,maxDropdownHeight:N,filterOptions:Te,value:de,checkIconPosition:lt,withCheckIcon:Ze,withAlignedLabels:He,nothingFoundMessage:Ae,unstyled:a,labelId:pe?`${Vt}-label`:void 0,"aria-label":pe?void 0:Yt["aria-label"],renderOption:We,scrollAreaProps:Ot})]}),d.jsx(Ft.HiddenInput,{name:Fe,valuesDivider:Pt,value:de,form:Se,disabled:I,...pt})]})});YA.classes={...Pa.classes,...Ft.classes};YA.displayName="@mantine/core/MultiSelect";var aZ={root:"m_f0824112",description:"m_57492dcc",section:"m_690090b5",label:"m_1f6ac4c4",body:"m_f07af9d2",children:"m_e17b862f",chevron:"m_1fd8a00b"};const aye=(t,{variant:e,color:n,childrenOffset:r,autoContrast:s})=>{const o=t.variantColorResolver({color:n||t.primaryColor,theme:t,variant:e||"light",autoContrast:s});return{root:{"--nl-bg":n||e?o.background:void 0,"--nl-hover":n||e?o.hover:void 0,"--nl-color":n||e?o.color:void 0},children:{"--nl-offset":ss(r)}}},ya=us((t,e)=>{const n=we("NavLink",null,t),{classNames:r,className:s,style:o,styles:i,unstyled:a,vars:l,opened:c,defaultOpened:u,onChange:f,children:h,active:m,disabled:y,leftSection:v,rightSection:b,label:w,description:C,disableRightSectionRotation:k,noWrap:E,childrenOffset:j,autoContrast:A,mod:M,attributes:_,onClick:D,onKeyDown:R,...N}=n,z=Et({name:"NavLink",props:n,classes:aZ,className:s,style:o,classNames:r,styles:i,unstyled:a,attributes:_,vars:l,varsResolver:aye}),[B,L]=ls({value:c,defaultValue:u,finalValue:!1,onChange:f}),P=!!h,I=H=>{D==null||D(H),P&&(H.preventDefault(),L(!B))};return d.jsxs(d.Fragment,{children:[d.jsxs(En,{...z("root"),component:"a",ref:e,onClick:I,onKeyDown:H=>{R==null||R(H),H.nativeEvent.code==="Space"&&P&&(H.preventDefault(),L(!B))},unstyled:a,mod:[{disabled:y,active:m,expanded:B},M],...N,children:[v&&d.jsx(ie,{component:"span",...z("section"),mod:{position:"left"},children:v}),d.jsxs(ie,{...z("body"),mod:{"no-wrap":E},children:[d.jsx(ie,{component:"span",...z("label"),children:w}),d.jsx(ie,{component:"span",mod:{active:m},...z("description"),children:C})]}),(P||b!==void 0)&&d.jsx(ie,{...z("section"),component:"span",mod:{rotate:B&&!k,position:"right"},children:P?b!==void 0?b:d.jsx(Nf,{...z("chevron")}):b})]}),P&&d.jsx(tp,{in:B,...z("collapse"),children:d.jsx("div",{...z("children"),children:h})})]})});ya.classes=aZ;ya.displayName="@mantine/core/NavLink";var lZ={root:"m_a513464",icon:"m_a4ceffb",loader:"m_b0920b15",body:"m_a49ed24",title:"m_3feedf16",description:"m_3d733a3a",closeButton:"m_919a4d88"};const lye={withCloseButton:!0},cye=(t,{radius:e,color:n})=>({root:{"--notification-radius":e===void 0?void 0:Wn(e),"--notification-color":n?xr(n,t):void 0}}),GA=Be((t,e)=>{const n=we("Notification",lye,t),{className:r,color:s,radius:o,loading:i,withCloseButton:a,withBorder:l,title:c,icon:u,children:f,onClose:h,closeButtonProps:m,classNames:y,style:v,styles:b,unstyled:w,vars:C,mod:k,loaderProps:E,role:j,attributes:A,...M}=n,_=Et({name:"Notification",classes:lZ,props:n,className:r,style:v,classNames:y,styles:b,unstyled:w,attributes:A,vars:C,varsResolver:cye});return d.jsxs(ie,{..._("root"),mod:[{"data-with-icon":!!u||i,"data-with-border":l},k],ref:e,role:j||"alert",...M,children:[u&&!i&&d.jsx("div",{..._("icon"),children:u}),i&&d.jsx(Bs,{size:28,color:s,...E,..._("loader")}),d.jsxs("div",{..._("body"),children:[c&&d.jsx("div",{..._("title"),children:c}),d.jsx(ie,{..._("description"),mod:{"data-with-title":!!c},children:f})]}),a&&d.jsx(jm,{iconSize:16,color:"gray",...m,unstyled:w,onClick:h,..._("closeButton")})]})});GA.classes=lZ;GA.displayName="@mantine/core/Notification";var BE={root:"m_f61ca620",input:"m_ccf8da4c",innerInput:"m_f2d85dd2",visibilityToggle:"m_b1072d44"};const uye=({reveal:t})=>d.jsx("svg",{viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{width:"var(--psi-icon-size)",height:"var(--psi-icon-size)"},children:d.jsx("path",{d:t?"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"})}),dye={visibilityToggleIcon:uye},fye=(t,{size:e})=>({root:{"--psi-icon-size":an(e,"psi-icon-size"),"--psi-button-size":an(e,"psi-button-size")}}),KA=Be((t,e)=>{const n=we("PasswordInput",dye,t),{classNames:r,className:s,style:o,styles:i,unstyled:a,vars:l,required:c,error:u,leftSection:f,disabled:h,id:m,variant:y,inputContainer:v,description:b,label:w,size:C,errorProps:k,descriptionProps:E,labelProps:j,withAsterisk:A,inputWrapperOrder:M,wrapperProps:_,radius:D,rightSection:R,rightSectionWidth:N,rightSectionPointerEvents:z,leftSectionWidth:B,visible:L,defaultVisible:P,onVisibilityChange:I,visibilityToggleIcon:H,visibilityToggleButtonProps:$,rightSectionProps:V,leftSectionProps:q,leftSectionPointerEvents:U,withErrorStyles:W,mod:Y,attributes:G,...K}=n,Q=_s(m),[Z,J]=ls({value:L,defaultValue:P,finalValue:!1,onChange:I}),ne=()=>J(!Z),se=Et({name:"PasswordInput",classes:BE,props:n,className:s,style:o,classNames:r,styles:i,unstyled:a,attributes:G,vars:l,varsResolver:fye}),{resolvedClassNames:ce,resolvedStyles:fe}=Ti({classNames:r,styles:i,props:n}),{styleProps:le,rest:be}=bd(K),je=(k==null?void 0:k.id)||`${Q}-error`,pe=(E==null?void 0:E.id)||`${Q}-description`,Te=`${!!u&&typeof u!="boolean"?je:""} ${!!b?pe:""}`,Ae=Te.trim().length>0?Te.trim():void 0,Ze=d.jsx(Ve,{...se("visibilityToggle"),disabled:h,radius:D,"aria-hidden":!$,"aria-pressed":Z,tabIndex:-1,...$,variant:($==null?void 0:$.variant)??"subtle",color:"gray",unstyled:a,onTouchEnd:He=>{var lt;He.preventDefault(),(lt=$==null?void 0:$.onTouchEnd)==null||lt.call($,He),ne()},onMouseDown:He=>{var lt;He.preventDefault(),(lt=$==null?void 0:$.onMouseDown)==null||lt.call($,He),ne()},onKeyDown:He=>{var lt;(lt=$==null?void 0:$.onKeyDown)==null||lt.call($,He),He.key===" "&&(He.preventDefault(),ne())},children:d.jsx(H,{reveal:Z})});return d.jsx(Hn.Wrapper,{required:c,id:Q,label:w,error:u,description:b,size:C,classNames:ce,styles:fe,__staticSelector:"PasswordInput",unstyled:a,withAsterisk:A,inputWrapperOrder:M,inputContainer:v,variant:y,labelProps:{...j,htmlFor:Q},descriptionProps:{...E,id:pe},errorProps:{...k,id:je},mod:Y,attributes:G,...se("root"),...le,..._,children:d.jsx(Hn,{component:"div",error:u,leftSection:f,size:C,classNames:{...ce,input:Fr(BE.input,ce.input)},styles:fe,radius:D,disabled:h,__staticSelector:"PasswordInput",rightSectionWidth:N,rightSection:R??Ze,variant:y,unstyled:a,leftSectionWidth:B,rightSectionPointerEvents:z||"all",rightSectionProps:V,leftSectionProps:q,leftSectionPointerEvents:U,withAria:!1,withErrorStyles:W,attributes:G,children:d.jsx("input",{required:c,"data-invalid":!!u||void 0,"data-with-left-section":!!f||void 0,...se("innerInput"),disabled:h,id:Q,ref:e,...be,"aria-describedby":Ae,autoComplete:be.autoComplete||"off",type:Z?"text":"password"})})})});KA.classes={...Pa.classes,...BE};KA.displayName="@mantine/core/PasswordInput";var v2={root:"m_db6d6462",section:"m_2242eb65","stripes-animation":"m_81a374bd","stripes-animation-vertical":"m_e0fb7a86",label:"m_91e40b74"};const[pye,cZ]=zs("Progress.Root component was not found in tree"),XA=Be((t,e)=>{const{classNames:n,className:r,style:s,styles:o,vars:i,...a}=we("ProgressLabel",null,t),l=cZ();return d.jsx(ie,{ref:e,...l.getStyles("label",{className:r,style:s,classNames:n,styles:o}),...a})});XA.classes=v2;XA.displayName="@mantine/core/ProgressLabel";const hye=(t,{size:e,radius:n,transitionDuration:r})=>({root:{"--progress-size":an(e,"progress-size"),"--progress-radius":n===void 0?void 0:Wn(n),"--progress-transition-duration":typeof r=="number"?`${r}ms`:void 0}}),M4=Be((t,e)=>{const n=we("ProgressRoot",null,t),{classNames:r,className:s,style:o,styles:i,unstyled:a,vars:l,autoContrast:c,transitionDuration:u,orientation:f,attributes:h,mod:m,...y}=n,v=Et({name:"Progress",classes:v2,props:n,className:s,style:o,classNames:r,styles:i,unstyled:a,attributes:h,vars:l,varsResolver:hye});return d.jsx(pye,{value:{getStyles:v,autoContrast:c},children:d.jsx(ie,{ref:e,mod:[{orientation:f},m],...v("root"),...y})})});M4.classes=v2;M4.displayName="@mantine/core/ProgressRoot";const mye={withAria:!0},j4=Be((t,e)=>{const{classNames:n,className:r,style:s,styles:o,vars:i,value:a,withAria:l,color:c,striped:u,animated:f,mod:h,...m}=we("ProgressSection",mye,t),y=cZ(),v=Tr(),b=l?{role:"progressbar","aria-valuemax":100,"aria-valuemin":0,"aria-valuenow":a,"aria-valuetext":`${a}%`}:{};return d.jsx(ie,{ref:e,...y.getStyles("section",{className:r,classNames:n,styles:o,style:s}),...m,...b,mod:[{striped:u||f,animated:f},h],__vars:{"--progress-section-size":`${a}%`,"--progress-section-color":xr(c,v),"--progress-label-color":ep(y.autoContrast,v)?Lc({color:c,theme:v,autoContrast:y.autoContrast}):void 0}})});j4.classes=v2;j4.displayName="@mantine/core/ProgressSection";const yc=Be((t,e)=>{const n=we("Progress",null,t),{value:r,classNames:s,styles:o,vars:i,color:a,striped:l,animated:c,"aria-label":u,...f}=n,{resolvedClassNames:h,resolvedStyles:m}=Ti({classNames:s,styles:o,props:n});return d.jsx(M4,{ref:e,classNames:h,styles:m,vars:i,...f,children:d.jsx(j4,{value:r,color:a,striped:l,animated:c,"aria-label":u})})});yc.classes=v2;yc.displayName="@mantine/core/Progress";yc.Section=j4;yc.Root=M4;yc.Label=XA;var uZ={root:"m_f3f1af94",inner:"m_89c4f5e4",icon:"m_f3ed6b2b",radio:"m_8a3dbb89","radio--outline":"m_1bfe9d39"};const[gye,dZ]=za(),[yye,vye]=za();var fZ={card:"m_9dc8ae12"};const bye={withBorder:!0},xye=(t,{radius:e})=>({card:{"--card-radius":Wn(e)}}),ZA=Be((t,e)=>{const n=we("RadioCard",bye,t),{classNames:r,className:s,style:o,styles:i,unstyled:a,vars:l,checked:c,mod:u,withBorder:f,value:h,onClick:m,name:y,onKeyDown:v,attributes:b,...w}=n,C=Et({name:"RadioCard",classes:fZ,props:n,className:s,style:o,classNames:r,styles:i,unstyled:a,attributes:b,vars:l,varsResolver:xye,rootSelector:"card"}),{dir:k}=$c(),E=dZ(),j=typeof c=="boolean"?c:(E==null?void 0:E.value)===h||!1,A=y||(E==null?void 0:E.name),M=_=>{if(v==null||v(_),["ArrowDown","ArrowUp","ArrowLeft","ArrowRight"].includes(_.nativeEvent.code)){_.preventDefault();const D=Array.from(document.querySelectorAll(`[role="radio"][name="${A||"__mantine"}"]`)),R=D.findIndex(B=>B===_.target),N=R+1>=D.length?0:R+1,z=R-1<0?D.length-1:R-1;_.nativeEvent.code==="ArrowDown"&&(D[N].focus(),D[N].click()),_.nativeEvent.code==="ArrowUp"&&(D[z].focus(),D[z].click()),_.nativeEvent.code==="ArrowLeft"&&(D[k==="ltr"?z:N].focus(),D[k==="ltr"?z:N].click()),_.nativeEvent.code==="ArrowRight"&&(D[k==="ltr"?N:z].focus(),D[k==="ltr"?N:z].click())}};return d.jsx(yye,{value:{checked:j},children:d.jsx(En,{ref:e,mod:[{"with-border":f,checked:j},u],...C("card"),...w,role:"radio","aria-checked":j,name:A,onClick:_=>{m==null||m(_),E==null||E.onChange(h||"")},onKeyDown:M})})});ZA.displayName="@mantine/core/RadioCard";ZA.classes=fZ;const QA=Be((t,e)=>{const{value:n,defaultValue:r,onChange:s,size:o,wrapperProps:i,children:a,name:l,readOnly:c,disabled:u,...f}=we("RadioGroup",null,t),h=_s(l),[m,y]=ls({value:n,defaultValue:r,finalValue:"",onChange:s}),v=b=>!c&&y(typeof b=="string"?b:b.currentTarget.value);return d.jsx(gye,{value:{value:m,onChange:v,size:o,name:h,disabled:u},children:d.jsx(Hn.Wrapper,{size:o,ref:e,...i,...f,labelElement:"div",__staticSelector:"RadioGroup",children:d.jsx(xA,{role:"radiogroup",children:a})})})});QA.classes=Hn.Wrapper.classes;QA.displayName="@mantine/core/RadioGroup";function pZ({size:t,style:e,...n}){return d.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 5 5",style:{width:Me(t),height:Me(t),...e},"aria-hidden":!0,...n,children:d.jsx("circle",{cx:"2.5",cy:"2.5",r:"2.5",fill:"currentColor"})})}var hZ={indicator:"m_717d7ff6",icon:"m_3e4da632","indicator--outline":"m_2980836c"};const wye={icon:pZ},Sye=(t,{radius:e,color:n,size:r,iconColor:s,variant:o,autoContrast:i})=>{const a=oa({color:n||t.primaryColor,theme:t}),l=a.isThemeColor&&a.shade===void 0?`var(--mantine-color-${a.color}-outline)`:a.color;return{indicator:{"--radio-size":an(r,"radio-size"),"--radio-radius":e===void 0?void 0:Wn(e),"--radio-color":o==="outline"?l:xr(n,t),"--radio-icon-size":an(r,"radio-icon-size"),"--radio-icon-color":s?xr(s,t):ep(i,t)?Lc({color:n,theme:t,autoContrast:i}):void 0}}},JA=Be((t,e)=>{const n=we("RadioIndicator",wye,t),{classNames:r,className:s,style:o,styles:i,unstyled:a,vars:l,icon:c,radius:u,color:f,iconColor:h,autoContrast:m,checked:y,mod:v,variant:b,disabled:w,attributes:C,...k}=n,E=Et({name:"RadioIndicator",classes:hZ,props:n,className:s,style:o,classNames:r,styles:i,unstyled:a,attributes:C,vars:l,varsResolver:Sye,rootSelector:"indicator"}),j=vye(),A=typeof y=="boolean"?y:(j==null?void 0:j.checked)||!1;return d.jsx(ie,{ref:e,...E("indicator",{variant:b}),variant:b,mod:[{checked:A,disabled:w},v],...k,children:d.jsx(c,{...E("icon")})})});JA.displayName="@mantine/core/RadioIndicator";JA.classes=hZ;const Cye={labelPosition:"right"},kye=(t,{size:e,radius:n,color:r,iconColor:s,variant:o,autoContrast:i})=>{const a=oa({color:r||t.primaryColor,theme:t}),l=a.isThemeColor&&a.shade===void 0?`var(--mantine-color-${a.color}-outline)`:a.color;return{root:{"--radio-size":an(e,"radio-size"),"--radio-radius":n===void 0?void 0:Wn(n),"--radio-color":o==="outline"?l:xr(r,t),"--radio-icon-color":s?xr(s,t):ep(i,t)?Lc({color:r,theme:t,autoContrast:i}):void 0,"--radio-icon-size":an(e,"radio-icon-size")}}},Wo=Be((t,e)=>{const n=we("Radio",Cye,t),{classNames:r,className:s,style:o,styles:i,unstyled:a,vars:l,id:c,size:u,label:f,labelPosition:h,description:m,error:y,radius:v,color:b,variant:w,disabled:C,wrapperProps:k,icon:E=pZ,rootRef:j,iconColor:A,onChange:M,mod:_,attributes:D,checked:R,...N}=n,z=Et({name:"Radio",classes:uZ,props:n,className:s,style:o,classNames:r,styles:i,unstyled:a,attributes:D,vars:l,varsResolver:kye}),B=dZ(),L=(B==null?void 0:B.size)??u,P=n.size?u:L,{styleProps:I,rest:H}=bd(N),$=_s(c),V=B?B.value===H.value:void 0,q={checked:V??R,name:(B==null?void 0:B.name)??H.name,onChange:U=>{B==null||B.onChange(U),M==null||M(U)},disabled:(B==null?void 0:B.disabled)??C};return d.jsx(l4,{...z("root"),__staticSelector:"Radio",__stylesApiProps:n,id:$,size:P,labelPosition:h,label:f,description:m,error:y,disabled:q.disabled,classNames:r,styles:i,unstyled:a,"data-checked":(V??R)||void 0,variant:w,ref:j,mod:_,...I,...k,children:d.jsxs(ie,{...z("inner"),mod:{"label-position":h},children:[d.jsx(ie,{...z("radio",{focusable:!0,variant:w}),...H,...q,component:"input",mod:{error:!!y},ref:e,id:$,type:"radio"}),d.jsx(E,{...z("icon"),"aria-hidden":!0})]})})});Wo.classes=uZ;Wo.displayName="@mantine/core/Radio";Wo.Group=QA;Wo.Card=ZA;Wo.Indicator=JA;const Eye={duration:100,transition:"fade"};function AF(t,e){return{...Eye,...e,...t}}var A4={tooltip:"m_1b3c8819",arrow:"m_f898399f"};function Tye({offset:t,position:e,defaultOpened:n}){const[r,s]=S.useState(n),o=S.useRef(null),{x:i,y:a,elements:l,refs:c,update:u,placement:f}=t4({placement:e,middleware:[_j({crossAxis:!0,padding:5,rootBoundary:"document"})]}),h=f.includes("right")?t:e.includes("left")?t*-1:0,m=f.includes("bottom")?t:e.includes("top")?t*-1:0,y=S.useCallback(({clientX:v,clientY:b})=>{c.setPositionReference({getBoundingClientRect(){return{width:0,height:0,x:v,y:b,left:v+h,top:b+m,right:v,bottom:b}}})},[l.reference]);return S.useEffect(()=>{if(c.floating.current){const v=o.current;v.addEventListener("mousemove",y);const b=gc(c.floating.current);return b.forEach(w=>{w.addEventListener("scroll",u)}),()=>{v.removeEventListener("mousemove",y),b.forEach(w=>{w.removeEventListener("scroll",u)})}}},[l.reference,c.floating.current,u,y,r]),{handleMouseMove:y,x:i,y:a,opened:r,setOpened:s,boundaryRef:o,floating:c.setFloating}}const Mye={refProp:"ref",withinPortal:!0,offset:10,position:"right",zIndex:Ps("popover")},jye=(t,{radius:e,color:n})=>({tooltip:{"--tooltip-radius":e===void 0?void 0:Wn(e),"--tooltip-bg":n?xr(n,t):void 0,"--tooltip-color":n?"var(--mantine-color-white)":void 0}}),e_=Be((t,e)=>{const n=we("TooltipFloating",Mye,t),{children:r,refProp:s,withinPortal:o,style:i,className:a,classNames:l,styles:c,unstyled:u,radius:f,color:h,label:m,offset:y,position:v,multiline:b,zIndex:w,disabled:C,defaultOpened:k,variant:E,vars:j,portalProps:A,attributes:M,..._}=n,D=Tr(),R=Et({name:"TooltipFloating",props:n,classes:A4,className:a,style:i,classNames:l,styles:c,unstyled:u,attributes:M,rootSelector:"tooltip",vars:j,varsResolver:jye}),{handleMouseMove:N,x:z,y:B,opened:L,boundaryRef:P,floating:I,setOpened:H}=Tye({offset:y,position:v,defaultOpened:k}),$=vd(r);if(!$)throw new Error("[@mantine/core] Tooltip.Floating component children should be an element or a component that accepts ref, fragments, strings, numbers and other primitive values are not supported");const V=Vr(P,qw($),e),q=$.props,U=Y=>{var G;(G=q.onMouseEnter)==null||G.call(q,Y),N(Y),H(!0)},W=Y=>{var G;(G=q.onMouseLeave)==null||G.call(q,Y),H(!1)};return d.jsxs(d.Fragment,{children:[d.jsx(jc,{...A,withinPortal:o,children:d.jsx(ie,{..._,...R("tooltip",{style:{...gj(i,D),zIndex:w,display:!C&&L?"block":"none",top:(B&&Math.round(B))??"",left:(z&&Math.round(z))??""}}),variant:E,ref:I,mod:{multiline:b},children:m})}),S.cloneElement($,{...q,[s]:V,onMouseEnter:U,onMouseLeave:W})]})});e_.classes=A4;e_.displayName="@mantine/core/TooltipFloating";const mZ=S.createContext(!1),Aye=mZ.Provider,_ye=()=>S.useContext(mZ),Rye={openDelay:0,closeDelay:0};function t_(t){const{openDelay:e,closeDelay:n,children:r}=we("TooltipGroup",Rye,t);return d.jsx(Aye,{value:!0,children:d.jsx(MK,{delay:{open:e,close:n},children:r})})}t_.displayName="@mantine/core/TooltipGroup";t_.extend=t=>t;function Dye(t){if(t===void 0)return{shift:!0,flip:!0};const e={...t};return t.shift===void 0&&(e.shift=!0),t.flip===void 0&&(e.flip=!0),e}function Iye(t){const e=Dye(t.middlewares),n=[wK(t.offset)];return e.shift&&n.push(_j(typeof e.shift=="boolean"?{padding:8}:{padding:8,...e.shift})),e.flip&&n.push(typeof e.flip=="boolean"?Wx():Wx(e.flip)),n.push(SK({element:t.arrowRef,padding:t.arrowOffset})),e.inline?n.push(typeof e.inline=="boolean"?P0():P0(e.inline)):t.inline&&n.push(P0()),n}function Oye(t){var j,A,M;const[e,n]=S.useState(t.defaultOpened),s=typeof t.opened=="boolean"?t.opened:e,o=_ye(),i=_s(),a=S.useCallback(_=>{n(_),_&&w(i)},[i]),{x:l,y:c,context:u,refs:f,placement:h,middlewareData:{arrow:{x:m,y}={}}}=t4({strategy:t.strategy,placement:t.position,open:s,onOpenChange:a,middleware:Iye(t),whileElementsMounted:NE}),{delay:v,currentId:b,setCurrentId:w}=jK(u,{id:i}),{getReferenceProps:C,getFloatingProps:k}=_K([EK(u,{enabled:(j=t.events)==null?void 0:j.hover,delay:o?v:{open:t.openDelay,close:t.closeDelay},mouseOnly:!((A=t.events)!=null&&A.touch)}),O1e(u,{enabled:(M=t.events)==null?void 0:M.focus,visibleOnly:!0}),RK(u,{role:"tooltip"}),AK(u,{enabled:typeof t.opened>"u"})]);kl(()=>{var _;(_=t.onPositionChange)==null||_.call(t,h)},[h]);const E=s&&b&&b!==i;return{x:l,y:c,arrowX:m,arrowY:y,reference:f.setReference,floating:f.setFloating,getFloatingProps:k,getReferenceProps:C,isGroupPhase:E,opened:s,placement:h}}const _F={position:"top",refProp:"ref",withinPortal:!0,arrowSize:4,arrowOffset:5,arrowRadius:0,arrowPosition:"side",offset:5,transitionProps:{duration:100,transition:"fade"},events:{hover:!0,focus:!1,touch:!1},zIndex:Ps("popover"),positionDependencies:[],middlewares:{flip:!0,shift:!0,inline:!1}},Nye=(t,{radius:e,color:n,variant:r,autoContrast:s})=>{const o=t.variantColorResolver({theme:t,color:n||t.primaryColor,autoContrast:s,variant:r||"filled"});return{tooltip:{"--tooltip-radius":e===void 0?void 0:Wn(e),"--tooltip-bg":n?o.background:void 0,"--tooltip-color":n?o.color:void 0}}},on=Be((t,e)=>{const n=we("Tooltip",_F,t),{children:r,position:s,refProp:o,label:i,openDelay:a,closeDelay:l,onPositionChange:c,opened:u,defaultOpened:f,withinPortal:h,radius:m,color:y,classNames:v,styles:b,unstyled:w,style:C,className:k,withArrow:E,arrowSize:j,arrowOffset:A,arrowRadius:M,arrowPosition:_,offset:D,transitionProps:R,multiline:N,events:z,zIndex:B,disabled:L,positionDependencies:P,onClick:I,onMouseEnter:H,onMouseLeave:$,inline:V,variant:q,keepMounted:U,vars:W,portalProps:Y,mod:G,floatingStrategy:K,middlewares:Q,autoContrast:Z,attributes:J,target:ne,...se}=we("Tooltip",_F,n),{dir:ce}=$c(),fe=S.useRef(null),le=Oye({position:YK(ce,s),closeDelay:l,openDelay:a,onPositionChange:c,opened:u,defaultOpened:f,events:z,arrowRef:fe,arrowOffset:A,offset:typeof D=="number"?D+(E?j/2:0):D,positionDependencies:[...P,ne??r],inline:V,strategy:K,middlewares:Q});S.useEffect(()=>{const Te=ne instanceof HTMLElement?ne:typeof ne=="string"?document.querySelector(ne):(ne==null?void 0:ne.current)||null;Te&&le.reference(Te)},[ne,le]);const be=Et({name:"Tooltip",props:n,classes:A4,className:k,style:C,classNames:v,styles:b,unstyled:w,attributes:J,rootSelector:"tooltip",vars:W,varsResolver:Nye}),je=vd(r);if(!ne&&!je)return null;if(ne){const Te=AF(R,{duration:100,transition:"fade"});return d.jsx(d.Fragment,{children:d.jsx(jc,{...Y,withinPortal:h,children:d.jsx(na,{...Te,keepMounted:U,mounted:!L&&!!le.opened,duration:le.isGroupPhase?10:Te.duration,children:Ae=>d.jsxs(ie,{...se,"data-fixed":K==="fixed"||void 0,variant:q,mod:[{multiline:N},G],...le.getFloatingProps({ref:le.floating,className:be("tooltip").className,style:{...be("tooltip").style,...Ae,zIndex:B,top:le.y??0,left:le.x??0}}),children:[i,d.jsx(Yx,{ref:fe,arrowX:le.arrowX,arrowY:le.arrowY,visible:E,position:le.placement,arrowSize:j,arrowOffset:A,arrowRadius:M,arrowPosition:_,...be("arrow")})]})})})})}const pe=je.props,_e=Vr(le.reference,qw(je),e),Ce=AF(R,{duration:100,transition:"fade"});return d.jsxs(d.Fragment,{children:[d.jsx(jc,{...Y,withinPortal:h,children:d.jsx(na,{...Ce,keepMounted:U,mounted:!L&&!!le.opened,duration:le.isGroupPhase?10:Ce.duration,children:Te=>d.jsxs(ie,{...se,"data-fixed":K==="fixed"||void 0,variant:q,mod:[{multiline:N},G],...le.getFloatingProps({ref:le.floating,className:be("tooltip").className,style:{...be("tooltip").style,...Te,zIndex:B,top:le.y??0,left:le.x??0}}),children:[i,d.jsx(Yx,{ref:fe,arrowX:le.arrowX,arrowY:le.arrowY,visible:E,position:le.placement,arrowSize:j,arrowOffset:A,arrowRadius:M,arrowPosition:_,...be("arrow")})]})})}),S.cloneElement(je,le.getReferenceProps({onClick:I,onMouseEnter:H,onMouseLeave:$,onMouseMove:n.onMouseMove,onPointerDown:n.onPointerDown,onPointerEnter:n.onPointerEnter,...pe,className:Fr(k,pe.className),[o]:_e}))]})});on.classes=A4;on.displayName="@mantine/core/Tooltip";on.Floating=e_;on.Group=t_;function Lye({size:t,thickness:e,sum:n,value:r,root:s,offset:o}){const i=(t*.9-e*2)/2,a=Math.PI*i*2/100,l=s||r===void 0?`${(100-n)*a}, ${n*a}`:`${r*a}, ${(100-r)*a}`;return{strokeWidth:Number.isNaN(e)?12:e,cx:t/2||0,cy:t/2||0,r:i||0,transform:s?`scale(1, -1) translate(0, -${t})`:void 0,strokeDasharray:l,strokeDashoffset:s?0:o||0}}function gZ({size:t,value:e,offset:n,sum:r,thickness:s,root:o,color:i,lineRoundCaps:a,tooltip:l,getStyles:c,display:u,...f}){const h=Tr();return d.jsx(on.Floating,{disabled:!l,label:l,children:d.jsx(ie,{component:"circle",...f,...c("curve"),__vars:{"--curve-color":i?xr(i,h):void 0},fill:"none",strokeLinecap:a?"round":"butt",...Lye({sum:r,size:t,thickness:s,value:e,offset:n,root:o})})})}gZ.displayName="@mantine/core/Curve";function $ye({size:t,thickness:e,sections:n,renderRoundedLineCaps:r,rootColor:s}){const o=n.reduce((u,f)=>u+f.value,0),i=Math.PI*((t*.9-e*2)/2)*2;let a=i;const l=[],c=[];for(let u=0;u<n.length;u+=1)l.push({sum:o,offset:a,data:n[u],root:!1}),a-=n[u].value/100*i;if(l.push({sum:o,offset:a,data:{color:s},root:!0}),c.push({...l[l.length-1],lineRoundCaps:!1}),l.length>2){c.push({...l[0],lineRoundCaps:r}),c.push({...l[l.length-2],lineRoundCaps:r});for(let u=1;u<=l.length-3;u+=1)c.push({...l[u],lineRoundCaps:!1})}else c.push({...l[0],lineRoundCaps:r});return c}var yZ={root:"m_b32e4812",svg:"m_d43b5134",curve:"m_b1ca1fbf",label:"m_b23f9dc4"};function Fye(t,e){return Math.min(t||12,(e||120)/4)}const zye={size:120,thickness:12},Pye=(t,{size:e,thickness:n,transitionDuration:r})=>({root:{"--rp-size":Me(e),"--rp-label-offset":Me(n*2),"--rp-transition-duration":r?`${r}ms`:void 0}}),n_=Be((t,e)=>{const n=we("RingProgress",zye,t),{classNames:r,className:s,style:o,styles:i,unstyled:a,vars:l,label:c,sections:u,size:f,thickness:h,roundCaps:m,rootColor:y,transitionDuration:v,attributes:b,...w}=n,C=Et({name:"RingProgress",classes:yZ,props:n,className:s,style:o,classNames:r,styles:i,unstyled:a,attributes:b,vars:l,varsResolver:Pye}),k=Fye(h,f),E=$ye({size:f,thickness:k,sections:u,renderRoundedLineCaps:m,rootColor:y}).map(({data:j,sum:A,root:M,lineRoundCaps:_,offset:D},R)=>S.createElement(gZ,{...j,key:R,size:f,thickness:k,sum:A,offset:D,color:j==null?void 0:j.color,root:M,lineRoundCaps:_,getStyles:C}));return d.jsxs(ie,{...C("root"),size:f,ref:e,...w,children:[d.jsx("svg",{...C("svg"),children:E}),c&&d.jsx("div",{...C("label"),children:c})]})});n_.classes=yZ;n_.displayName="@mantine/core/RingProgress";var vZ={root:"m_cf365364",indicator:"m_9e182ccd",label:"m_1738fcb2",input:"m_1714d588",control:"m_69686b9b",innerLabel:"m_78882f40"};const Bye={withItemsBorders:!0},Hye=(t,{radius:e,color:n,transitionDuration:r,size:s,transitionTimingFunction:o})=>({root:{"--sc-radius":e===void 0?void 0:Wn(e),"--sc-color":n?xr(n,t):void 0,"--sc-shadow":n?void 0:"var(--mantine-shadow-xs)","--sc-transition-duration":r===void 0?void 0:`${r}ms`,"--sc-transition-timing-function":o,"--sc-padding":an(s,"sc-padding"),"--sc-font-size":Ur(s)}}),_4=Be((t,e)=>{var ne,se;const n=we("SegmentedControl",Bye,t),{classNames:r,className:s,style:o,styles:i,unstyled:a,vars:l,data:c,value:u,defaultValue:f,onChange:h,size:m,name:y,disabled:v,readOnly:b,fullWidth:w,orientation:C,radius:k,color:E,transitionDuration:j,transitionTimingFunction:A,variant:M,autoContrast:_,withItemsBorders:D,mod:R,attributes:N,...z}=n,B=Et({name:"SegmentedControl",props:n,classes:vZ,className:s,style:o,classNames:r,styles:i,unstyled:a,attributes:N,vars:l,varsResolver:Hye}),L=Tr(),P=c.map(ce=>typeof ce=="string"?{label:ce,value:ce}:ce),I=Bpe(),[H,$]=S.useState(gl()),[V,q]=S.useState(null),[U,W]=S.useState({}),Y=(ce,fe)=>{U[fe]=ce,W(U)},[G,K]=ls({value:u,defaultValue:f,finalValue:Array.isArray(c)?((ne=P.find(ce=>!ce.disabled))==null?void 0:ne.value)??((se=c[0])==null?void 0:se.value)??null:null,onChange:h}),Q=_s(y),Z=P.map(ce=>S.createElement(ie,{...B("control"),mod:{active:G===ce.value,orientation:C},key:ce.value},S.createElement("input",{...B("input"),disabled:v||ce.disabled,type:"radio",name:Q,value:ce.value,id:`${Q}-${ce.value}`,checked:G===ce.value,onChange:()=>!b&&K(ce.value),"data-focus-ring":L.focusRing,key:`${ce.value}-input`}),S.createElement(ie,{component:"label",...B("label"),mod:{active:G===ce.value&&!(v||ce.disabled),disabled:v||ce.disabled,"read-only":b},htmlFor:`${Q}-${ce.value}`,ref:fe=>Y(fe,ce.value),__vars:{"--sc-label-color":E!==void 0?Lc({color:E,theme:L,autoContrast:_}):void 0},key:`${ce.value}-label`},d.jsx("span",{...B("innerLabel"),children:ce.label})))),J=Vr(e,ce=>q(ce));return Rpe(()=>{$(gl())},[c.length]),c.length===0?null:d.jsxs(ie,{...B("root"),variant:M,size:m,ref:J,mod:[{"full-width":w,orientation:C,initialized:I,"with-items-borders":D},R],...z,role:"radiogroup","data-disabled":v,children:[typeof G=="string"&&d.jsx(Zj,{target:U[G],parent:V,component:"span",transitionDuration:"var(--sc-transition-duration)",...B("indicator")},H),Z]})});_4.classes=vZ;_4.displayName="@mantine/core/SegmentedControl";const Uye={withCheckIcon:!0,allowDeselect:!0,checkIconPosition:"left",openOnFocus:!0},Ia=Be((t,e)=>{const n=we("Select",Uye,t),{classNames:r,styles:s,unstyled:o,vars:i,dropdownOpened:a,defaultDropdownOpened:l,onDropdownClose:c,onDropdownOpen:u,onFocus:f,onBlur:h,onClick:m,onChange:y,data:v,value:b,defaultValue:w,selectFirstOptionOnChange:C,selectFirstOptionOnDropdownOpen:k,onOptionSubmit:E,comboboxProps:j,readOnly:A,disabled:M,filter:_,limit:D,withScrollArea:R,maxDropdownHeight:N,size:z,searchable:B,rightSection:L,checkIconPosition:P,withCheckIcon:I,withAlignedLabels:H,nothingFoundMessage:$,name:V,form:q,searchValue:U,defaultSearchValue:W,onSearchChange:Y,allowDeselect:G,error:K,rightSectionPointerEvents:Q,id:Z,clearable:J,clearButtonProps:ne,hiddenInputProps:se,renderOption:ce,onClear:fe,autoComplete:le,scrollAreaProps:be,__defaultRightSection:je,__clearSection:pe,__clearable:_e,chevronColor:Ce,autoSelectOnBlur:Te,openOnFocus:Ae,attributes:Ze,...He}=n,lt=S.useMemo(()=>gX(v),[v]),Ye=S.useRef({}),ge=S.useMemo(()=>lA(lt),[lt]),Fe=_s(Z),[Se,qe,ot]=ls({value:b,defaultValue:w,finalValue:null,onChange:y}),$e=typeof Se=="string"?Se in ge?ge[Se]:Ye.current[Se]:void 0,pt=zpe($e),[gt,Pt,at]=ls({value:U,defaultValue:W,finalValue:$e?$e.label:"",onChange:Y}),nt=zc({opened:a,defaultOpened:l,onDropdownOpen:()=>{u==null||u(),k?nt.selectFirstOption():nt.updateSelectedOptionIndex("active",{scrollIntoView:!0})},onDropdownClose:()=>{c==null||c(),setTimeout(nt.resetSelectedOption,0)}}),We=kt=>{Pt(kt),nt.resetSelectedOption()},{resolvedClassNames:At,resolvedStyles:St}=Ti({props:n,styles:s,classNames:r});S.useEffect(()=>{C&&nt.selectFirstOption()},[C,gt]),S.useEffect(()=>{b===null&&We(""),typeof b=="string"&&$e&&((pt==null?void 0:pt.value)!==$e.value||(pt==null?void 0:pt.label)!==$e.label)&&We($e.label)},[b,$e]),S.useEffect(()=>{var kt,jt;!ot&&!at&&We(typeof Se=="string"?Se in ge?(kt=ge[Se])==null?void 0:kt.label:((jt=Ye.current[Se])==null?void 0:jt.label)||"":"")},[ge,Se]),S.useEffect(()=>{Se&&Se in ge&&(Ye.current[Se]=ge[Se])},[ge,Se]);const Ot=d.jsx(Ft.ClearButton,{...ne,onClear:()=>{qe(null,null),We(""),fe==null||fe()}}),Tt=J&&!!Se&&!M&&!A;return d.jsxs(d.Fragment,{children:[d.jsxs(Ft,{store:nt,__staticSelector:"Select",classNames:At,styles:St,unstyled:o,readOnly:A,size:z,attributes:Ze,keepMounted:Te,onOptionSubmit:kt=>{E==null||E(kt);const jt=G&&ge[kt].value===Se?null:ge[kt],vt=jt?jt.value:null;vt!==Se&&qe(vt,jt),!ot&&We(typeof vt=="string"&&(jt==null?void 0:jt.label)||""),nt.closeDropdown()},...j,children:[d.jsx(Ft.Target,{targetType:B?"input":"button",autoComplete:le,children:d.jsx(Pa,{id:Fe,ref:e,__defaultRightSection:d.jsx(Ft.Chevron,{size:z,error:K,unstyled:o,color:Ce}),__clearSection:Ot,__clearable:Tt,rightSection:L,rightSectionPointerEvents:Q||"none",...He,size:z,__staticSelector:"Select",disabled:M,readOnly:A||!B,value:gt,onChange:kt=>{We(kt.currentTarget.value),nt.openDropdown(),C&&nt.selectFirstOption()},onFocus:kt=>{Ae&&B&&nt.openDropdown(),f==null||f(kt)},onBlur:kt=>{Te&&nt.clickSelectedOption(),B&&nt.closeDropdown();const jt=typeof Se=="string"&&(Se in ge?ge[Se]:Ye.current[Se]);We(jt&&jt.label||""),h==null||h(kt)},onClick:kt=>{B?nt.openDropdown():nt.toggleDropdown(),m==null||m(kt)},classNames:At,styles:St,unstyled:o,pointer:!B,error:K,attributes:Ze})}),d.jsx(IX,{data:lt,hidden:A||M,filter:_,search:gt,limit:D,hiddenWhenEmpty:!$,withScrollArea:R,maxDropdownHeight:N,filterOptions:!!B&&($e==null?void 0:$e.label)!==gt,value:Se,checkIconPosition:P,withCheckIcon:I,withAlignedLabels:H,nothingFoundMessage:$,unstyled:o,labelId:He.label?`${Fe}-label`:void 0,"aria-label":He.label?void 0:He["aria-label"],renderOption:ce,scrollAreaProps:be})]}),d.jsx(Ft.HiddenInput,{value:Se,name:V,form:q,disabled:M,...se})]})});Ia.classes={...Pa.classes,...Ft.classes};Ia.displayName="@mantine/core/Select";var bZ={container:"m_925c2d2c",root:"m_2415a157"};function Vye({spacing:t,verticalSpacing:e,cols:n,selector:r}){var u;const s=Tr(),o=e===void 0?t:e,i=km({"--sg-spacing-x":ss(Rh(t)),"--sg-spacing-y":ss(Rh(o)),"--sg-cols":(u=Rh(n))==null?void 0:u.toString()}),a=as(s.breakpoints).reduce((f,h)=>(f[h]||(f[h]={}),typeof t=="object"&&t[h]!==void 0&&(f[h]["--sg-spacing-x"]=ss(t[h])),typeof o=="object"&&o[h]!==void 0&&(f[h]["--sg-spacing-y"]=ss(o[h])),typeof n=="object"&&n[h]!==void 0&&(f[h]["--sg-cols"]=n[h]),f),{}),c=TE(as(a),s.breakpoints).filter(f=>as(a[f.value]).length>0).map(f=>({query:`(min-width: ${s.breakpoints[f.value]})`,styles:a[f.value]}));return d.jsx(c2,{styles:i,media:c,selector:r})}function X6(t){return typeof t=="object"&&t!==null?as(t):[]}function qye(t){return t.sort((e,n)=>If(e)-If(n))}function Wye({spacing:t,verticalSpacing:e,cols:n}){const r=Array.from(new Set([...X6(t),...X6(e),...X6(n)]));return qye(r)}function Yye({spacing:t,verticalSpacing:e,cols:n,selector:r}){var c;const s=e===void 0?t:e,o=km({"--sg-spacing-x":ss(Rh(t)),"--sg-spacing-y":ss(Rh(s)),"--sg-cols":(c=Rh(n))==null?void 0:c.toString()}),i=Wye({spacing:t,verticalSpacing:e,cols:n}),a=i.reduce((u,f)=>(u[f]||(u[f]={}),typeof t=="object"&&t[f]!==void 0&&(u[f]["--sg-spacing-x"]=ss(t[f])),typeof s=="object"&&s[f]!==void 0&&(u[f]["--sg-spacing-y"]=ss(s[f])),typeof n=="object"&&n[f]!==void 0&&(u[f]["--sg-cols"]=n[f]),u),{}),l=i.map(u=>({query:`simple-grid (min-width: ${u})`,styles:a[u]}));return d.jsx(c2,{styles:o,container:l,selector:r})}const Gye={cols:1,spacing:"md",type:"media"},r_=Be((t,e)=>{const n=we("SimpleGrid",Gye,t),{classNames:r,className:s,style:o,styles:i,unstyled:a,vars:l,cols:c,verticalSpacing:u,spacing:f,type:h,attributes:m,...y}=n,v=Et({name:"SimpleGrid",classes:bZ,props:n,className:s,style:o,classNames:r,styles:i,unstyled:a,attributes:m,vars:l}),b=mj();return h==="container"?d.jsxs(d.Fragment,{children:[d.jsx(Yye,{...n,selector:`.${b}`}),d.jsx("div",{...v("container"),children:d.jsx(ie,{ref:e,...v("root",{className:b}),...y})})]}):d.jsxs(d.Fragment,{children:[d.jsx(Vye,{...n,selector:`.${b}`}),d.jsx(ie,{ref:e,...v("root",{className:b}),...y})]})});r_.classes=bZ;r_.displayName="@mantine/core/SimpleGrid";var xZ={root:"m_18320242","skeleton-fade":"m_299c329c"};const Kye={visible:!0,animate:!0},Xye=(t,{width:e,height:n,radius:r,circle:s})=>({root:{"--skeleton-height":Me(n),"--skeleton-width":Me(s?n:e),"--skeleton-radius":s?"1000px":r===void 0?void 0:Wn(r)}}),s_=Be((t,e)=>{const n=we("Skeleton",Kye,t),{classNames:r,className:s,style:o,styles:i,unstyled:a,vars:l,width:c,height:u,circle:f,visible:h,radius:m,animate:y,mod:v,attributes:b,...w}=n,C=Et({name:"Skeleton",classes:xZ,props:n,className:s,style:o,classNames:r,styles:i,unstyled:a,attributes:b,vars:l,varsResolver:Xye});return d.jsx(ie,{ref:e,...C("root"),mod:[{visible:h,animate:y},v],...w})});s_.classes=xZ;s_.displayName="@mantine/core/Skeleton";var wZ={root:"m_6d731127"};const Zye={gap:"md",align:"stretch",justify:"flex-start"},Qye=(t,{gap:e,align:n,justify:r})=>({root:{"--stack-gap":ss(e),"--stack-align":n,"--stack-justify":r}}),bt=Be((t,e)=>{const n=we("Stack",Zye,t),{classNames:r,className:s,style:o,styles:i,unstyled:a,vars:l,align:c,justify:u,gap:f,variant:h,attributes:m,...y}=n,v=Et({name:"Stack",props:n,classes:wZ,className:s,style:o,classNames:r,styles:i,unstyled:a,attributes:m,vars:l,varsResolver:Qye});return d.jsx(ie,{ref:e,...v("root"),variant:h,...y})});bt.classes=wZ;bt.displayName="@mantine/core/Stack";var SZ={root:"m_5f93f3bb",input:"m_926b4011",track:"m_9307d992",thumb:"m_93039a1d",trackLabel:"m_8277e082"};const CZ=S.createContext(null),Jye=CZ.Provider,eve=()=>S.useContext(CZ),o_=Be((t,e)=>{const{value:n,defaultValue:r,onChange:s,size:o,wrapperProps:i,children:a,readOnly:l,disabled:c,...u}=we("SwitchGroup",null,t),[f,h]=ls({value:n,defaultValue:r,finalValue:[],onChange:s}),m=y=>{const v=y.currentTarget.value;!l&&h(f.includes(v)?f.filter(b=>b!==v):[...f,v])};return d.jsx(Jye,{value:{value:f,onChange:m,size:o,disabled:c},children:d.jsx(Hn.Wrapper,{size:o,ref:e,...i,...u,labelElement:"div",__staticSelector:"SwitchGroup",children:d.jsx(xA,{role:"group",children:a})})})});o_.classes=Hn.Wrapper.classes;o_.displayName="@mantine/core/SwitchGroup";const tve={labelPosition:"right",withThumbIndicator:!0},nve=(t,{radius:e,color:n,size:r})=>({root:{"--switch-radius":e===void 0?void 0:Wn(e),"--switch-height":an(r,"switch-height"),"--switch-width":an(r,"switch-width"),"--switch-thumb-size":an(r,"switch-thumb-size"),"--switch-label-font-size":an(r,"switch-label-font-size"),"--switch-track-label-padding":an(r,"switch-track-label-padding"),"--switch-color":n?xr(n,t):void 0}}),Xi=Be((t,e)=>{const n=we("Switch",tve,t),{classNames:r,className:s,style:o,styles:i,unstyled:a,vars:l,color:c,label:u,offLabel:f,onLabel:h,id:m,size:y,radius:v,wrapperProps:b,thumbIcon:w,checked:C,defaultChecked:k,onChange:E,labelPosition:j,description:A,error:M,disabled:_,variant:D,rootRef:R,mod:N,withThumbIndicator:z,attributes:B,...L}=n,P=eve(),I=y||(P==null?void 0:P.size),H=Et({name:"Switch",props:n,classes:SZ,className:s,style:o,classNames:r,styles:i,unstyled:a,attributes:B,vars:l,varsResolver:nve}),{styleProps:$,rest:V}=bd(L),q=_s(m),U={checked:(P==null?void 0:P.value.includes(V.value))??C,onChange:G=>{P==null||P.onChange(G),E==null||E(G)},disabled:(P==null?void 0:P.disabled)??_},[W,Y]=ls({value:U.checked??C,defaultValue:k,finalValue:!1});return d.jsxs(l4,{...H("root"),__staticSelector:"Switch",__stylesApiProps:n,id:q,size:I,labelPosition:j,label:u,description:A,error:M,disabled:U.disabled,bodyElement:"label",labelElement:"span",classNames:r,styles:i,unstyled:a,"data-checked":U.checked,variant:D,ref:R,mod:N,inert:V.inert,...$,...b,children:[d.jsx("input",{...V,...U,checked:W,"data-checked":U.checked,onChange:G=>{var K;(K=U.onChange)==null||K.call(U,G),Y(G.currentTarget.checked)},id:q,ref:e,type:"checkbox",role:"switch",inert:V.inert,...H("input")}),d.jsxs(ie,{"aria-hidden":"true",component:"span",mod:{error:M,"label-position":j,"without-labels":!h&&!f},...H("track"),children:[d.jsx(ie,{component:"span",mod:{"reduce-motion":!0,"with-thumb-indicator":z&&!w},...H("thumb"),children:w}),d.jsx("span",{...H("trackLabel"),children:W?h:f})]})]})});Xi.classes={...SZ,...CX};Xi.displayName="@mantine/core/Switch";Xi.Group=o_;const[rve,sve]=zs("Table component was not found in the tree");var b2={table:"m_b23fa0ef",th:"m_4e7aa4f3",tr:"m_4e7aa4fd",td:"m_4e7aa4ef",tbody:"m_b2404537",thead:"m_b242d975",caption:"m_9e5a3ac7",scrollContainer:"m_a100c15",scrollContainerInner:"m_62259741"};function ove(t,e){if(!e)return;const n={};return e.columnBorder&&t.withColumnBorders&&(n["data-with-column-border"]=!0),e.rowBorder&&t.withRowBorders&&(n["data-with-row-border"]=!0),e.striped&&t.striped&&(n["data-striped"]=t.striped),e.highlightOnHover&&t.highlightOnHover&&(n["data-hover"]=!0),e.captionSide&&t.captionSide&&(n["data-side"]=t.captionSide),e.stickyHeader&&t.stickyHeader&&(n["data-sticky"]=!0),n}function np(t,e){const n=`Table${t.charAt(0).toUpperCase()}${t.slice(1)}`,r=Be((s,o)=>{const i=we(n,{},s),{classNames:a,className:l,style:c,styles:u,...f}=i,h=sve();return d.jsx(ie,{component:t,ref:o,...ove(h,e),...h.getStyles(t,{className:l,classNames:a,style:c,styles:u,props:i}),...f})});return r.displayName=`@mantine/core/${n}`,r.classes=b2,r}const HE=np("th",{columnBorder:!0}),kZ=np("td",{columnBorder:!0}),Gb=np("tr",{rowBorder:!0,striped:!0,highlightOnHover:!0}),EZ=np("thead",{stickyHeader:!0}),TZ=np("tbody"),MZ=np("tfoot"),jZ=np("caption",{captionSide:!0});function i_({data:t}){return d.jsxs(d.Fragment,{children:[t.caption&&d.jsx(jZ,{children:t.caption}),t.head&&d.jsx(EZ,{children:d.jsx(Gb,{children:t.head.map((e,n)=>d.jsx(HE,{children:e},n))})}),t.body&&d.jsx(TZ,{children:t.body.map((e,n)=>d.jsx(Gb,{children:e.map((r,s)=>d.jsx(kZ,{children:r},s))},n))}),t.foot&&d.jsx(MZ,{children:d.jsx(Gb,{children:t.foot.map((e,n)=>d.jsx(HE,{children:e},n))})})]})}i_.displayName="@mantine/core/TableDataRenderer";const ive={type:"scrollarea"},ave=(t,{minWidth:e,maxHeight:n,type:r})=>({scrollContainer:{"--table-min-width":Me(e),"--table-max-height":Me(n),"--table-overflow":r==="native"?"auto":void 0}}),a_=Be((t,e)=>{const n=we("TableScrollContainer",ive,t),{classNames:r,className:s,style:o,styles:i,unstyled:a,vars:l,children:c,minWidth:u,maxHeight:f,type:h,scrollAreaProps:m,attributes:y,...v}=n,b=Et({name:"TableScrollContainer",classes:b2,props:n,className:s,style:o,classNames:r,styles:i,unstyled:a,attributes:y,vars:l,varsResolver:ave,rootSelector:"scrollContainer"});return d.jsx(ie,{component:h==="scrollarea"?Jr:"div",...h==="scrollarea"?f?{offsetScrollbars:"xy",...m}:{offsetScrollbars:"x",...m}:{},ref:e,...b("scrollContainer"),...v,children:d.jsx("div",{...b("scrollContainerInner"),children:c})})});a_.classes=b2;a_.displayName="@mantine/core/TableScrollContainer";const lve={withRowBorders:!0,verticalSpacing:7},cve=(t,{layout:e,captionSide:n,horizontalSpacing:r,verticalSpacing:s,borderColor:o,stripedColor:i,highlightOnHoverColor:a,striped:l,highlightOnHover:c,stickyHeaderOffset:u,stickyHeader:f})=>({table:{"--table-layout":e,"--table-caption-side":n,"--table-horizontal-spacing":ss(r),"--table-vertical-spacing":ss(s),"--table-border-color":o?xr(o,t):void 0,"--table-striped-color":l&&i?xr(i,t):void 0,"--table-highlight-on-hover-color":c&&a?xr(a,t):void 0,"--table-sticky-header-offset":f?Me(u):void 0}}),Lr=Be((t,e)=>{const n=we("Table",lve,t),{classNames:r,className:s,style:o,styles:i,unstyled:a,vars:l,horizontalSpacing:c,verticalSpacing:u,captionSide:f,stripedColor:h,highlightOnHoverColor:m,striped:y,highlightOnHover:v,withColumnBorders:b,withRowBorders:w,withTableBorder:C,borderColor:k,layout:E,variant:j,data:A,children:M,stickyHeader:_,stickyHeaderOffset:D,mod:R,tabularNums:N,attributes:z,...B}=n,L=Et({name:"Table",props:n,className:s,style:o,classes:b2,classNames:r,styles:i,unstyled:a,attributes:z,rootSelector:"table",vars:l,varsResolver:cve});return d.jsx(rve,{value:{getStyles:L,stickyHeader:_,striped:y===!0?"odd":y||void 0,highlightOnHover:v,withColumnBorders:b,withRowBorders:w,captionSide:f||"bottom"},children:d.jsx(ie,{component:"table",variant:j,ref:e,mod:[{"data-with-table-border":C,"data-tabular-nums":N},R],...L("table"),...B,children:M||!!A&&d.jsx(i_,{data:A})})})});Lr.classes=b2;Lr.displayName="@mantine/core/Table";Lr.Td=kZ;Lr.Th=HE;Lr.Tr=Gb;Lr.Thead=EZ;Lr.Tbody=TZ;Lr.Tfoot=MZ;Lr.Caption=jZ;Lr.ScrollContainer=a_;Lr.DataRenderer=i_;const[uve,l_]=zs("Tabs component was not found in the tree");var x2={root:"m_89d60db1","list--default":"m_576c9d4",list:"m_89d33d6d",tab:"m_4ec4dce6",panel:"m_b0c91715",tabSection:"m_fc420b1f",tabLabel:"m_42bbd1ae","tab--default":"m_539e827b","list--outline":"m_6772fbd5","tab--outline":"m_b59ab47c","tab--pills":"m_c3381914"};const c_=Be((t,e)=>{const n=we("TabsList",null,t),{children:r,className:s,grow:o,justify:i,classNames:a,styles:l,style:c,mod:u,...f}=n,h=l_();return d.jsx(ie,{...f,...h.getStyles("list",{className:s,style:c,classNames:a,styles:l,props:n,variant:h.variant}),ref:e,role:"tablist",variant:h.variant,mod:[{grow:o,orientation:h.orientation,placement:h.orientation==="vertical"&&h.placement,inverted:h.inverted},u],"aria-orientation":h.orientation,__vars:{"--tabs-justify":i},children:r})});c_.classes=x2;c_.displayName="@mantine/core/TabsList";const u_=Be((t,e)=>{const n=we("TabsPanel",null,t),{children:r,className:s,value:o,classNames:i,styles:a,style:l,mod:c,keepMounted:u,...f}=n,h=l_(),m=h.value===o,y=h.keepMounted||u||m?r:null;return d.jsx(ie,{...h.getStyles("panel",{className:s,classNames:i,styles:a,style:[l,m?void 0:{display:"none"}],props:n}),ref:e,mod:[{orientation:h.orientation},c],role:"tabpanel",id:h.getPanelId(o),"aria-labelledby":h.getTabId(o),...f,children:y})});u_.classes=x2;u_.displayName="@mantine/core/TabsPanel";const d_=Be((t,e)=>{const n=we("TabsTab",null,t),{className:r,children:s,rightSection:o,leftSection:i,value:a,onClick:l,onKeyDown:c,disabled:u,color:f,style:h,classNames:m,styles:y,vars:v,mod:b,tabIndex:w,...C}=n,k=Tr(),{dir:E}=$c(),j=l_(),A=a===j.value,M=D=>{j.onChange(j.allowTabDeactivation&&a===j.value?null:a),l==null||l(D)},_={classNames:m,styles:y,props:n};return d.jsxs(En,{...j.getStyles("tab",{className:r,style:h,variant:j.variant,..._}),disabled:u,unstyled:j.unstyled,variant:j.variant,mod:[{active:A,disabled:u,orientation:j.orientation,inverted:j.inverted,placement:j.orientation==="vertical"&&j.placement},b],ref:e,role:"tab",id:j.getTabId(a),"aria-selected":A,tabIndex:w!==void 0?w:A||j.value===null?0:-1,"aria-controls":j.getPanelId(a),onClick:M,__vars:{"--tabs-color":f?xr(f,k):void 0},onKeyDown:Hw({siblingSelector:'[role="tab"]',parentSelector:'[role="tablist"]',activateOnFocus:j.activateTabWithKeyboard,loop:j.loop,orientation:j.orientation||"horizontal",dir:E,onKeyDown:c}),...C,children:[i&&d.jsx("span",{...j.getStyles("tabSection",_),"data-position":"left",children:i}),s&&d.jsx("span",{...j.getStyles("tabLabel",_),children:s}),o&&d.jsx("span",{...j.getStyles("tabSection",_),"data-position":"right",children:o})]})});d_.classes=x2;d_.displayName="@mantine/core/TabsTab";const RF="Tabs.Tab or Tabs.Panel component was rendered with invalid value or without value",dve={keepMounted:!0,orientation:"horizontal",loop:!0,activateTabWithKeyboard:!0,variant:"default",placement:"left"},fve=(t,{radius:e,color:n,autoContrast:r})=>({root:{"--tabs-radius":Wn(e),"--tabs-color":xr(n,t),"--tabs-text-color":ep(r,t)?Lc({color:n,theme:t,autoContrast:r}):void 0}}),ga=Be((t,e)=>{const n=we("Tabs",dve,t),{defaultValue:r,value:s,onChange:o,orientation:i,children:a,loop:l,id:c,activateTabWithKeyboard:u,allowTabDeactivation:f,variant:h,color:m,radius:y,inverted:v,placement:b,keepMounted:w,classNames:C,styles:k,unstyled:E,className:j,style:A,vars:M,autoContrast:_,mod:D,attributes:R,...N}=n,z=_s(c),[B,L]=ls({value:s,defaultValue:r,finalValue:null,onChange:o}),P=Et({name:"Tabs",props:n,classes:x2,className:j,style:A,classNames:C,styles:k,unstyled:E,attributes:R,vars:M,varsResolver:fve});return d.jsx(uve,{value:{placement:b,value:B,orientation:i,id:z,loop:l,activateTabWithKeyboard:u,getTabId:Fx(`${z}-tab`,RF),getPanelId:Fx(`${z}-panel`,RF),onChange:L,allowTabDeactivation:f,variant:h,color:m,radius:y,inverted:v,keepMounted:w,unstyled:E,getStyles:P},children:d.jsx(ie,{ref:e,id:z,variant:h,mod:[{orientation:i,inverted:i==="horizontal"&&v,placement:i==="vertical"&&b},D],...P("root"),...N,children:a})})});ga.classes=x2;ga.displayName="@mantine/core/Tabs";ga.Tab=d_;ga.Panel=u_;ga.List=c_;const es=Be((t,e)=>{const n=we("TextInput",null,t);return d.jsx(Pa,{component:"input",ref:e,...n,__staticSelector:"TextInput"})});es.classes=Pa.classes;es.displayName="@mantine/core/TextInput";const pve=["h1","h2","h3","h4","h5","h6"],hve=["xs","sm","md","lg","xl"];function mve(t,e){const n=e!==void 0?e:`h${t}`;return pve.includes(n)?{fontSize:`var(--mantine-${n}-font-size)`,fontWeight:`var(--mantine-${n}-font-weight)`,lineHeight:`var(--mantine-${n}-line-height)`}:hve.includes(n)?{fontSize:`var(--mantine-font-size-${n})`,fontWeight:`var(--mantine-h${t}-font-weight)`,lineHeight:`var(--mantine-h${t}-line-height)`}:{fontSize:Me(n),fontWeight:`var(--mantine-h${t}-font-weight)`,lineHeight:`var(--mantine-h${t}-line-height)`}}var AZ={root:"m_8a5d1357"};const gve={order:1},yve=(t,{order:e,size:n,lineClamp:r,textWrap:s})=>{const o=mve(e||1,n);return{root:{"--title-fw":o.fontWeight,"--title-lh":o.lineHeight,"--title-fz":o.fontSize,"--title-line-clamp":typeof r=="number"?r.toString():void 0,"--title-text-wrap":s}}},Ca=Be((t,e)=>{const n=we("Title",gve,t),{classNames:r,className:s,style:o,styles:i,unstyled:a,order:l,vars:c,size:u,variant:f,lineClamp:h,textWrap:m,mod:y,attributes:v,...b}=n,w=Et({name:"Title",props:n,classes:AZ,className:s,style:o,classNames:r,styles:i,unstyled:a,attributes:v,vars:c,varsResolver:yve});return[1,2,3,4,5,6].includes(l)?d.jsx(ie,{...w("root"),component:`h${l}`,variant:f,ref:e,mod:[{order:l,"data-line-clamp":typeof h=="number"},y],size:u,...b}):null});Ca.classes=AZ;Ca.displayName="@mantine/core/Title";var _Z={root:"m_d08caa0"};const f_=Be((t,e)=>{const n=we("Typography",null,t),{classNames:r,className:s,style:o,styles:i,unstyled:a,attributes:l,...c}=n,u=Et({name:"Typography",classes:_Z,props:n,className:s,style:o,classNames:r,styles:i,unstyled:a,attributes:l});return d.jsx(ie,{ref:e,...u("root"),...c})});f_.classes=_Z;f_.displayName="@mantine/core/Typography";function Ys(t){return`Minified Redux error #${t}; visit https://redux.js.org/Errors?code=${t} for the full message or use the non-minified dev environment for full errors. `}var vve=typeof Symbol=="function"&&Symbol.observable||"@@observable",DF=vve,Z6=()=>Math.random().toString(36).substring(7).split("").join("."),bve={INIT:`@@redux/INIT${Z6()}`,REPLACE:`@@redux/REPLACE${Z6()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${Z6()}`},Gx=bve;function p_(t){if(typeof t!="object"||t===null)return!1;let e=t;for(;Object.getPrototypeOf(e)!==null;)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e||Object.getPrototypeOf(t)===null}function RZ(t,e,n){if(typeof t!="function")throw new Error(Ys(2));if(typeof e=="function"&&typeof n=="function"||typeof n=="function"&&typeof arguments[3]=="function")throw new Error(Ys(0));if(typeof e=="function"&&typeof n>"u"&&(n=e,e=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(Ys(1));return n(RZ)(t,e)}let r=t,s=e,o=new Map,i=o,a=0,l=!1;function c(){i===o&&(i=new Map,o.forEach((b,w)=>{i.set(w,b)}))}function u(){if(l)throw new Error(Ys(3));return s}function f(b){if(typeof b!="function")throw new Error(Ys(4));if(l)throw new Error(Ys(5));let w=!0;c();const C=a++;return i.set(C,b),function(){if(w){if(l)throw new Error(Ys(6));w=!1,c(),i.delete(C),o=null}}}function h(b){if(!p_(b))throw new Error(Ys(7));if(typeof b.type>"u")throw new Error(Ys(8));if(typeof b.type!="string")throw new Error(Ys(17));if(l)throw new Error(Ys(9));try{l=!0,s=r(s,b)}finally{l=!1}return(o=i).forEach(C=>{C()}),b}function m(b){if(typeof b!="function")throw new Error(Ys(10));r=b,h({type:Gx.REPLACE})}function y(){const b=f;return{subscribe(w){if(typeof w!="object"||w===null)throw new Error(Ys(11));function C(){const E=w;E.next&&E.next(u())}return C(),{unsubscribe:b(C)}},[DF](){return this}}}return h({type:Gx.INIT}),{dispatch:h,subscribe:f,getState:u,replaceReducer:m,[DF]:y}}function xve(t){Object.keys(t).forEach(e=>{const n=t[e];if(typeof n(void 0,{type:Gx.INIT})>"u")throw new Error(Ys(12));if(typeof n(void 0,{type:Gx.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(Ys(13))})}function wve(t){const e=Object.keys(t),n={};for(let o=0;o<e.length;o++){const i=e[o];typeof t[i]=="function"&&(n[i]=t[i])}const r=Object.keys(n);let s;try{xve(n)}catch(o){s=o}return function(i={},a){if(s)throw s;let l=!1;const c={};for(let u=0;u<r.length;u++){const f=r[u],h=n[f],m=i[f],y=h(m,a);if(typeof y>"u")throw a&&a.type,new Error(Ys(14));c[f]=y,l=l||y!==m}return l=l||r.length!==Object.keys(i).length,l?c:i}}function Kx(...t){return t.length===0?e=>e:t.length===1?t[0]:t.reduce((e,n)=>(...r)=>e(n(...r)))}function Sve(...t){return e=>(n,r)=>{const s=e(n,r);let o=()=>{throw new Error(Ys(15))};const i={getState:s.getState,dispatch:(l,...c)=>o(l,...c)},a=t.map(l=>l(i));return o=Kx(...a)(s.dispatch),{...s,dispatch:o}}}function Cve(t){return p_(t)&&"type"in t&&typeof t.type=="string"}var DZ=Symbol.for("immer-nothing"),IF=Symbol.for("immer-draftable"),Ro=Symbol.for("immer-state");function va(t,...e){throw new Error(`[Immer] minified error nr: ${t}. Full error at: https://bit.ly/3cXEKWf`)}var yi=Object,Jh=yi.getPrototypeOf,Xx="constructor",R4="prototype",UE="configurable",Zx="enumerable",Kb="writable",gg="value",Ac=t=>!!t&&!!t[Ro];function Oa(t){var e;return t?IZ(t)||I4(t)||!!t[IF]||!!((e=t[Xx])!=null&&e[IF])||O4(t)||N4(t):!1}var kve=yi[R4][Xx].toString(),OF=new WeakMap;function IZ(t){if(!t||!h_(t))return!1;const e=Jh(t);if(e===null||e===yi[R4])return!0;const n=yi.hasOwnProperty.call(e,Xx)&&e[Xx];if(n===Object)return!0;if(!gh(n))return!1;let r=OF.get(n);return r===void 0&&(r=Function.toString.call(n),OF.set(n,r)),r===kve}function D4(t,e,n=!0){w2(t)===0?(n?Reflect.ownKeys(t):yi.keys(t)).forEach(s=>{e(s,t[s],t)}):t.forEach((r,s)=>e(s,r,t))}function w2(t){const e=t[Ro];return e?e.type_:I4(t)?1:O4(t)?2:N4(t)?3:0}var NF=(t,e,n=w2(t))=>n===2?t.has(e):yi[R4].hasOwnProperty.call(t,e),VE=(t,e,n=w2(t))=>n===2?t.get(e):t[e],Qx=(t,e,n,r=w2(t))=>{r===2?t.set(e,n):r===3?t.add(n):t[e]=n};function Eve(t,e){return t===e?t!==0||1/t===1/e:t!==t&&e!==e}var I4=Array.isArray,O4=t=>t instanceof Map,N4=t=>t instanceof Set,h_=t=>typeof t=="object",gh=t=>typeof t=="function",Q6=t=>typeof t=="boolean";function Tve(t){const e=+t;return Number.isInteger(e)&&String(e)===t}var uc=t=>t.copy_||t.base_,m_=t=>t.modified_?t.copy_:t.base_;function qE(t,e){if(O4(t))return new Map(t);if(N4(t))return new Set(t);if(I4(t))return Array[R4].slice.call(t);const n=IZ(t);if(e===!0||e==="class_only"&&!n){const r=yi.getOwnPropertyDescriptors(t);delete r[Ro];let s=Reflect.ownKeys(r);for(let o=0;o<s.length;o++){const i=s[o],a=r[i];a[Kb]===!1&&(a[Kb]=!0,a[UE]=!0),(a.get||a.set)&&(r[i]={[UE]:!0,[Kb]:!0,[Zx]:a[Zx],[gg]:t[i]})}return yi.create(Jh(t),r)}else{const r=Jh(t);if(r!==null&&n)return{...t};const s=yi.create(r);return yi.assign(s,t)}}function g_(t,e=!1){return L4(t)||Ac(t)||!Oa(t)||(w2(t)>1&&yi.defineProperties(t,{set:Fv,add:Fv,clear:Fv,delete:Fv}),yi.freeze(t),e&&D4(t,(n,r)=>{g_(r,!0)},!1)),t}function Mve(){va(2)}var Fv={[gg]:Mve};function L4(t){return t===null||!h_(t)?!0:yi.isFrozen(t)}var Jx="MapSet",WE="Patches",LF="ArrayMethods",OZ={};function Lf(t){const e=OZ[t];return e||va(0,t),e}var $F=t=>!!OZ[t],yg,NZ=()=>yg,jve=(t,e)=>({drafts_:[],parent_:t,immer_:e,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:$F(Jx)?Lf(Jx):void 0,arrayMethodsPlugin_:$F(LF)?Lf(LF):void 0});function FF(t,e){e&&(t.patchPlugin_=Lf(WE),t.patches_=[],t.inversePatches_=[],t.patchListener_=e)}function YE(t){GE(t),t.drafts_.forEach(Ave),t.drafts_=null}function GE(t){t===yg&&(yg=t.parent_)}var zF=t=>yg=jve(yg,t);function Ave(t){const e=t[Ro];e.type_===0||e.type_===1?e.revoke_():e.revoked_=!0}function PF(t,e){e.unfinalizedDrafts_=e.drafts_.length;const n=e.drafts_[0];if(t!==void 0&&t!==n){n[Ro].modified_&&(YE(e),va(4)),Oa(t)&&(t=BF(e,t));const{patchPlugin_:s}=e;s&&s.generateReplacementPatches_(n[Ro].base_,t,e)}else t=BF(e,n);return _ve(e,t,!0),YE(e),e.patches_&&e.patchListener_(e.patches_,e.inversePatches_),t!==DZ?t:void 0}function BF(t,e){if(L4(e))return e;const n=e[Ro];if(!n)return e3(e,t.handledSet_,t);if(!$4(n,t))return e;if(!n.modified_)return n.base_;if(!n.finalized_){const{callbacks_:r}=n;if(r)for(;r.length>0;)r.pop()(t);FZ(n,t)}return n.copy_}function _ve(t,e,n=!1){!t.parent_&&t.immer_.autoFreeze_&&t.canAutoFreeze_&&g_(e,n)}function LZ(t){t.finalized_=!0,t.scope_.unfinalizedDrafts_--}var $4=(t,e)=>t.scope_===e,Rve=[];function $Z(t,e,n,r){const s=uc(t),o=t.type_;if(r!==void 0&&VE(s,r,o)===e){Qx(s,r,n,o);return}if(!t.draftLocations_){const a=t.draftLocations_=new Map;D4(s,(l,c)=>{if(Ac(c)){const u=a.get(c)||[];u.push(l),a.set(c,u)}})}const i=t.draftLocations_.get(e)??Rve;for(const a of i)Qx(s,a,n,o)}function Dve(t,e,n){t.callbacks_.push(function(s){var a;const o=e;if(!o||!$4(o,s))return;(a=s.mapSetPlugin_)==null||a.fixSetContents(o);const i=m_(o);$Z(t,o.draft_??o,i,n),FZ(o,s)})}function FZ(t,e){var r;if(t.modified_&&!t.finalized_&&(t.type_===3||t.type_===1&&t.allIndicesReassigned_||(((r=t.assigned_)==null?void 0:r.size)??0)>0)){const{patchPlugin_:s}=e;if(s){const o=s.getPath(t);o&&s.generatePatches_(t,o,e)}LZ(t)}}function Ive(t,e,n){const{scope_:r}=t;if(Ac(n)){const s=n[Ro];$4(s,r)&&s.callbacks_.push(function(){Xb(t);const i=m_(s);$Z(t,n,i,e)})}else Oa(n)&&t.callbacks_.push(function(){const o=uc(t);t.type_===3?o.has(n)&&e3(n,r.handledSet_,r):VE(o,e,t.type_)===n&&r.drafts_.length>1&&(t.assigned_.get(e)??!1)===!0&&t.copy_&&e3(VE(t.copy_,e,t.type_),r.handledSet_,r)})}function e3(t,e,n){return!n.immer_.autoFreeze_&&n.unfinalizedDrafts_<1||Ac(t)||e.has(t)||!Oa(t)||L4(t)||(e.add(t),D4(t,(r,s)=>{if(Ac(s)){const o=s[Ro];if($4(o,n)){const i=m_(o);Qx(t,r,i,t.type_),LZ(o)}}else Oa(s)&&e3(s,e,n)})),t}function Ove(t,e){const n=I4(t),r={type_:n?1:0,scope_:e?e.scope_:NZ(),modified_:!1,finalized_:!1,assigned_:void 0,parent_:e,base_:t,draft_:null,copy_:null,revoke_:null,isManual_:!1,callbacks_:void 0};let s=r,o=t3;n&&(s=[r],o=vg);const{revoke:i,proxy:a}=Proxy.revocable(s,o);return r.draft_=a,r.revoke_=i,[a,r]}var t3={get(t,e){if(e===Ro)return t;let n=t.scope_.arrayMethodsPlugin_;const r=t.type_===1&&typeof e=="string";if(r&&n!=null&&n.isArrayOperationMethod(e))return n.createMethodInterceptor(t,e);const s=uc(t);if(!NF(s,e,t.type_))return Nve(t,s,e);const o=s[e];if(t.finalized_||!Oa(o)||r&&t.operationMethod&&(n!=null&&n.isMutatingArrayMethod(t.operationMethod))&&Tve(e))return o;if(o===J6(t.base_,e)){Xb(t);const i=t.type_===1?+e:e,a=XE(t.scope_,o,t,i);return t.copy_[i]=a}return o},has(t,e){return e in uc(t)},ownKeys(t){return Reflect.ownKeys(uc(t))},set(t,e,n){const r=zZ(uc(t),e);if(r!=null&&r.set)return r.set.call(t.draft_,n),!0;if(!t.modified_){const s=J6(uc(t),e),o=s==null?void 0:s[Ro];if(o&&o.base_===n)return t.copy_[e]=n,t.assigned_.set(e,!1),!0;if(Eve(n,s)&&(n!==void 0||NF(t.base_,e,t.type_)))return!0;Xb(t),KE(t)}return t.copy_[e]===n&&(n!==void 0||e in t.copy_)||Number.isNaN(n)&&Number.isNaN(t.copy_[e])||(t.copy_[e]=n,t.assigned_.set(e,!0),Ive(t,e,n)),!0},deleteProperty(t,e){return Xb(t),J6(t.base_,e)!==void 0||e in t.base_?(t.assigned_.set(e,!1),KE(t)):t.assigned_.delete(e),t.copy_&&delete t.copy_[e],!0},getOwnPropertyDescriptor(t,e){const n=uc(t),r=Reflect.getOwnPropertyDescriptor(n,e);return r&&{[Kb]:!0,[UE]:t.type_!==1||e!=="length",[Zx]:r[Zx],[gg]:n[e]}},defineProperty(){va(11)},getPrototypeOf(t){return Jh(t.base_)},setPrototypeOf(){va(12)}},vg={};for(let t in t3){let e=t3[t];vg[t]=function(){const n=arguments;return n[0]=n[0][0],e.apply(this,n)}}vg.deleteProperty=function(t,e){return vg.set.call(this,t,e,void 0)};vg.set=function(t,e,n){return t3.set.call(this,t[0],e,n,t[0])};function J6(t,e){const n=t[Ro];return(n?uc(n):t)[e]}function Nve(t,e,n){var s;const r=zZ(e,n);return r?gg in r?r[gg]:(s=r.get)==null?void 0:s.call(t.draft_):void 0}function zZ(t,e){if(!(e in t))return;let n=Jh(t);for(;n;){const r=Object.getOwnPropertyDescriptor(n,e);if(r)return r;n=Jh(n)}}function KE(t){t.modified_||(t.modified_=!0,t.parent_&&KE(t.parent_))}function Xb(t){t.copy_||(t.assigned_=new Map,t.copy_=qE(t.base_,t.scope_.immer_.useStrictShallowCopy_))}var Lve=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(n,r,s)=>{if(gh(n)&&!gh(r)){const i=r;r=n;const a=this;return function(c=i,...u){return a.produce(c,f=>r.call(this,f,...u))}}gh(r)||va(6),s!==void 0&&!gh(s)&&va(7);let o;if(Oa(n)){const i=zF(this),a=XE(i,n,void 0);let l=!0;try{o=r(a),l=!1}finally{l?YE(i):GE(i)}return FF(i,s),PF(o,i)}else if(!n||!h_(n)){if(o=r(n),o===void 0&&(o=n),o===DZ&&(o=void 0),this.autoFreeze_&&g_(o,!0),s){const i=[],a=[];Lf(WE).generateReplacementPatches_(n,o,{patches_:i,inversePatches_:a}),s(i,a)}return o}else va(1,n)},this.produceWithPatches=(n,r)=>{if(gh(n))return(a,...l)=>this.produceWithPatches(a,c=>n(c,...l));let s,o;return[this.produce(n,r,(a,l)=>{s=a,o=l}),s,o]},Q6(e==null?void 0:e.autoFreeze)&&this.setAutoFreeze(e.autoFreeze),Q6(e==null?void 0:e.useStrictShallowCopy)&&this.setUseStrictShallowCopy(e.useStrictShallowCopy),Q6(e==null?void 0:e.useStrictIteration)&&this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){Oa(e)||va(8),Ac(e)&&(e=$ve(e));const n=zF(this),r=XE(n,e,void 0);return r[Ro].isManual_=!0,GE(n),r}finishDraft(e,n){const r=e&&e[Ro];(!r||!r.isManual_)&&va(9);const{scope_:s}=r;return FF(s,n),PF(void 0,s)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}setUseStrictIteration(e){this.useStrictIteration_=e}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(e,n){let r;for(r=n.length-1;r>=0;r--){const o=n[r];if(o.path.length===0&&o.op==="replace"){e=o.value;break}}r>-1&&(n=n.slice(r+1));const s=Lf(WE).applyPatches_;return Ac(e)?s(e,n):this.produce(e,o=>s(o,n))}};function XE(t,e,n,r){const[s,o]=O4(e)?Lf(Jx).proxyMap_(e,n):N4(e)?Lf(Jx).proxySet_(e,n):Ove(e,n);return((n==null?void 0:n.scope_)??NZ()).drafts_.push(s),o.callbacks_=(n==null?void 0:n.callbacks_)??[],o.key_=r,n&&r!==void 0?Dve(n,o,r):o.callbacks_.push(function(l){var u;(u=l.mapSetPlugin_)==null||u.fixSetContents(o);const{patchPlugin_:c}=l;o.modified_&&c&&c.generatePatches_(o,[],l)}),s}function $ve(t){return Ac(t)||va(10,t),PZ(t)}function PZ(t){if(!Oa(t)||L4(t))return t;const e=t[Ro];let n,r=!0;if(e){if(!e.modified_)return e.base_;e.finalized_=!0,n=qE(t,e.scope_.immer_.useStrictShallowCopy_),r=e.scope_.immer_.shouldUseStrictIteration()}else n=qE(t,!0);return D4(n,(s,o)=>{Qx(n,s,PZ(o))},r),e&&(e.finalized_=!1),n}var Fve=new Lve,BZ=Fve.produce;function zve(t,e=`expected a function, instead received ${typeof t}`){if(typeof t!="function")throw new TypeError(e)}function Pve(t,e=`expected an object, instead received ${typeof t}`){if(typeof t!="object")throw new TypeError(e)}function Bve(t,e="expected all items to be functions, instead received the following types: "){if(!t.every(n=>typeof n=="function")){const n=t.map(r=>typeof r=="function"?`function ${r.name||"unnamed"}()`:typeof r).join(", ");throw new TypeError(`${e}[${n}]`)}}var HF=t=>Array.isArray(t)?t:[t];function Hve(t){const e=Array.isArray(t[0])?t[0]:t;return Bve(e,"createSelector expects all input-selectors to be functions, but received the following types: "),e}function Uve(t,e){const n=[],{length:r}=t;for(let s=0;s<r;s++)n.push(t[s].apply(null,e));return n}var Vve=class{constructor(e){this.value=e}deref(){return this.value}},qve=typeof WeakRef<"u"?WeakRef:Vve,Wve=0,UF=1;function zv(){return{s:Wve,v:void 0,o:null,p:null}}function HZ(t,e={}){let n=zv();const{resultEqualityCheck:r}=e;let s,o=0;function i(){var f;let a=n;const{length:l}=arguments;for(let h=0,m=l;h<m;h++){const y=arguments[h];if(typeof y=="function"||typeof y=="object"&&y!==null){let v=a.o;v===null&&(a.o=v=new WeakMap);const b=v.get(y);b===void 0?(a=zv(),v.set(y,a)):a=b}else{let v=a.p;v===null&&(a.p=v=new Map);const b=v.get(y);b===void 0?(a=zv(),v.set(y,a)):a=b}}const c=a;let u;if(a.s===UF)u=a.v;else if(u=t.apply(null,arguments),o++,r){const h=((f=s==null?void 0:s.deref)==null?void 0:f.call(s))??s;h!=null&&r(h,u)&&(u=h,o!==0&&o--),s=typeof u=="object"&&u!==null||typeof u=="function"?new qve(u):u}return c.s=UF,c.v=u,u}return i.clearCache=()=>{n=zv(),i.resetResultsCount()},i.resultsCount=()=>o,i.resetResultsCount=()=>{o=0},i}function Yve(t,...e){const n=typeof t=="function"?{memoize:t,memoizeOptions:e}:t,r=(...s)=>{let o=0,i=0,a,l={},c=s.pop();typeof c=="object"&&(l=c,c=s.pop()),zve(c,`createSelector expects an output function after the inputs, but received: [${typeof c}]`);const u={...n,...l},{memoize:f,memoizeOptions:h=[],argsMemoize:m=HZ,argsMemoizeOptions:y=[]}=u,v=HF(h),b=HF(y),w=Hve(s),C=f(function(){return o++,c.apply(null,arguments)},...v),k=m(function(){i++;const j=Uve(w,arguments);return a=C.apply(null,j),a},...b);return Object.assign(k,{resultFunc:c,memoizedResultFunc:C,dependencies:w,dependencyRecomputations:()=>i,resetDependencyRecomputations:()=>{i=0},lastResult:()=>a,recomputations:()=>o,resetRecomputations:()=>{o=0},memoize:f,argsMemoize:m})};return Object.assign(r,{withTypes:()=>r}),r}var rp=Yve(HZ),Gve=Object.assign((t,e=rp)=>{Pve(t,`createStructuredSelector expects first argument to be an object where each property is a selector, instead received a ${typeof t}`);const n=Object.keys(t),r=n.map(o=>t[o]);return e(r,(...o)=>o.reduce((i,a,l)=>(i[n[l]]=a,i),{}))},{withTypes:()=>Gve});function UZ(t){return({dispatch:n,getState:r})=>s=>o=>typeof o=="function"?o(n,r,t):s(o)}var Kve=UZ(),Xve=UZ,Zve=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?Kx:Kx.apply(null,arguments)},Qve=t=>t&&typeof t.match=="function";function B0(t,e){function n(...r){if(e){let s=e(...r);if(!s)throw new Error(vc(0));return{type:t,payload:s.payload,..."meta"in s&&{meta:s.meta},..."error"in s&&{error:s.error}}}return{type:t,payload:r[0]}}return n.toString=()=>`${t}`,n.type=t,n.match=r=>Cve(r)&&r.type===t,n}var VZ=class M0 extends Array{constructor(...e){super(...e),Object.setPrototypeOf(this,M0.prototype)}static get[Symbol.species](){return M0}concat(...e){return super.concat.apply(this,e)}prepend(...e){return e.length===1&&Array.isArray(e[0])?new M0(...e[0].concat(this)):new M0(...e.concat(this))}};function VF(t){return Oa(t)?BZ(t,()=>{}):t}function Pv(t,e,n){return t.has(e)?t.get(e):t.set(e,n(e)).get(e)}function Jve(t){return typeof t=="boolean"}var ebe=()=>function(e){const{thunk:n=!0,immutableCheck:r=!0,serializableCheck:s=!0,actionCreatorCheck:o=!0}=e??{};let i=new VZ;return n&&(Jve(n)?i.push(Kve):i.push(Xve(n.extraArgument))),i},tbe="RTK_autoBatch",qF=t=>e=>{setTimeout(e,t)},nbe=(t={type:"raf"})=>e=>(...n)=>{const r=e(...n);let s=!0,o=!1,i=!1;const a=new Set,l=t.type==="tick"?queueMicrotask:t.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:qF(10):t.type==="callback"?t.queueNotification:qF(t.timeout),c=()=>{i=!1,o&&(o=!1,a.forEach(u=>u()))};return Object.assign({},r,{subscribe(u){const f=()=>s&&u(),h=r.subscribe(f);return a.add(u),()=>{h(),a.delete(u)}},dispatch(u){var f;try{return s=!((f=u==null?void 0:u.meta)!=null&&f[tbe]),o=!s,o&&(i||(i=!0,l(c))),r.dispatch(u)}finally{s=!0}}})},rbe=t=>function(n){const{autoBatch:r=!0}=n??{};let s=new VZ(t);return r&&s.push(nbe(typeof r=="object"?r:void 0)),s};function sbe(t){const e=ebe(),{reducer:n=void 0,middleware:r,devTools:s=!0,preloadedState:o=void 0,enhancers:i=void 0}=t||{};let a;if(typeof n=="function")a=n;else if(p_(n))a=wve(n);else throw new Error(vc(1));let l;typeof r=="function"?l=r(e):l=e();let c=Kx;s&&(c=Zve({trace:!1,...typeof s=="object"&&s}));const u=Sve(...l),f=rbe(u);let h=typeof i=="function"?i(f):f();const m=c(...h);return RZ(a,o,m)}function qZ(t){const e={},n=[];let r;const s={addCase(o,i){const a=typeof o=="string"?o:o.type;if(!a)throw new Error(vc(28));if(a in e)throw new Error(vc(29));return e[a]=i,s},addAsyncThunk(o,i){return i.pending&&(e[o.pending.type]=i.pending),i.rejected&&(e[o.rejected.type]=i.rejected),i.fulfilled&&(e[o.fulfilled.type]=i.fulfilled),i.settled&&n.push({matcher:o.settled,reducer:i.settled}),s},addMatcher(o,i){return n.push({matcher:o,reducer:i}),s},addDefaultCase(o){return r=o,s}};return t(s),[e,n,r]}function obe(t){return typeof t=="function"}function ibe(t,e){let[n,r,s]=qZ(e),o;if(obe(t))o=()=>VF(t());else{const a=VF(t);o=()=>a}function i(a=o(),l){let c=[n[l.type],...r.filter(({matcher:u})=>u(l)).map(({reducer:u})=>u)];return c.filter(u=>!!u).length===0&&(c=[s]),c.reduce((u,f)=>{if(f)if(Ac(u)){const m=f(u,l);return m===void 0?u:m}else{if(Oa(u))return BZ(u,h=>f(h,l));{const h=f(u,l);if(h===void 0){if(u===null)return u;throw Error("A case reducer on a non-draftable value must not return undefined")}return h}}return u},a)}return i.getInitialState=o,i}var abe=(t,e)=>Qve(t)?t.match(e):t(e);function lbe(...t){return e=>t.some(n=>abe(n,e))}var cbe="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",ube=(t=21)=>{let e="",n=t;for(;n--;)e+=cbe[Math.random()*64|0];return e},dbe=["name","message","stack","code"],ek=class{constructor(e,n){kv(this,"_type");this.payload=e,this.meta=n}},WF=class{constructor(e,n){kv(this,"_type");this.payload=e,this.meta=n}},fbe=t=>{if(typeof t=="object"&&t!==null){const e={};for(const n of dbe)typeof t[n]=="string"&&(e[n]=t[n]);return e}return{message:String(t)}},YF="External signal was aborted",pn=(()=>{function t(e,n,r){const s=B0(e+"/fulfilled",(l,c,u,f)=>({payload:l,meta:{...f||{},arg:u,requestId:c,requestStatus:"fulfilled"}})),o=B0(e+"/pending",(l,c,u)=>({payload:void 0,meta:{...u||{},arg:c,requestId:l,requestStatus:"pending"}})),i=B0(e+"/rejected",(l,c,u,f,h)=>({payload:f,error:(r&&r.serializeError||fbe)(l||"Rejected"),meta:{...h||{},arg:u,requestId:c,rejectedWithValue:!!f,requestStatus:"rejected",aborted:(l==null?void 0:l.name)==="AbortError",condition:(l==null?void 0:l.name)==="ConditionError"}}));function a(l,{signal:c}={}){return(u,f,h)=>{const m=r!=null&&r.idGenerator?r.idGenerator(l):ube(),y=new AbortController;let v,b;function w(k){b=k,y.abort()}c&&(c.aborted?w(YF):c.addEventListener("abort",()=>w(YF),{once:!0}));const C=(async function(){var j,A;let k;try{let M=(j=r==null?void 0:r.condition)==null?void 0:j.call(r,l,{getState:f,extra:h});if(pbe(M)&&(M=await M),M===!1||y.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};const _=new Promise((D,R)=>{v=()=>{R({name:"AbortError",message:b||"Aborted"})},y.signal.addEventListener("abort",v,{once:!0})});u(o(m,l,(A=r==null?void 0:r.getPendingMeta)==null?void 0:A.call(r,{requestId:m,arg:l},{getState:f,extra:h}))),k=await Promise.race([_,Promise.resolve(n(l,{dispatch:u,getState:f,extra:h,requestId:m,signal:y.signal,abort:w,rejectWithValue:(D,R)=>new ek(D,R),fulfillWithValue:(D,R)=>new WF(D,R)})).then(D=>{if(D instanceof ek)throw D;return D instanceof WF?s(D.payload,m,l,D.meta):s(D,m,l)})])}catch(M){k=M instanceof ek?i(null,m,l,M.payload,M.meta):i(M,m,l)}finally{v&&y.signal.removeEventListener("abort",v)}return r&&!r.dispatchConditionRejection&&i.match(k)&&k.meta.condition||u(k),k})();return Object.assign(C,{abort:w,requestId:m,arg:l,unwrap(){return C.then(y_)}})}}return Object.assign(a,{pending:o,rejected:i,fulfilled:s,settled:lbe(i,s),typePrefix:e})}return t.withTypes=()=>t,t})();function y_(t){if(t.meta&&t.meta.rejectedWithValue)throw t.payload;if(t.error)throw t.error;return t.payload}function pbe(t){return t!==null&&typeof t=="object"&&typeof t.then=="function"}var hbe=Symbol.for("rtk-slice-createasyncthunk");function mbe(t,e){return`${t}/${e}`}function gbe({creators:t}={}){var n;const e=(n=t==null?void 0:t.asyncThunk)==null?void 0:n[hbe];return function(s){const{name:o,reducerPath:i=o}=s;if(!o)throw new Error(vc(11));const a=(typeof s.reducers=="function"?s.reducers(vbe()):s.reducers)||{},l=Object.keys(a),c={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},u={addCase(E,j){const A=typeof E=="string"?E:E.type;if(!A)throw new Error(vc(12));if(A in c.sliceCaseReducersByType)throw new Error(vc(13));return c.sliceCaseReducersByType[A]=j,u},addMatcher(E,j){return c.sliceMatchers.push({matcher:E,reducer:j}),u},exposeAction(E,j){return c.actionCreators[E]=j,u},exposeCaseReducer(E,j){return c.sliceCaseReducersByName[E]=j,u}};l.forEach(E=>{const j=a[E],A={reducerName:E,type:mbe(o,E),createNotation:typeof s.reducers=="function"};xbe(j)?Sbe(A,j,u,e):bbe(A,j,u)});function f(){const[E={},j=[],A=void 0]=typeof s.extraReducers=="function"?qZ(s.extraReducers):[s.extraReducers],M={...E,...c.sliceCaseReducersByType};return ibe(s.initialState,_=>{for(let D in M)_.addCase(D,M[D]);for(let D of c.sliceMatchers)_.addMatcher(D.matcher,D.reducer);for(let D of j)_.addMatcher(D.matcher,D.reducer);A&&_.addDefaultCase(A)})}const h=E=>E,m=new Map,y=new WeakMap;let v;function b(E,j){return v||(v=f()),v(E,j)}function w(){return v||(v=f()),v.getInitialState()}function C(E,j=!1){function A(_){let D=_[E];return typeof D>"u"&&j&&(D=Pv(y,A,w)),D}function M(_=h){const D=Pv(m,j,()=>new WeakMap);return Pv(D,_,()=>{const R={};for(const[N,z]of Object.entries(s.selectors??{}))R[N]=ybe(z,_,()=>Pv(y,_,w),j);return R})}return{reducerPath:E,getSelectors:M,get selectors(){return M(A)},selectSlice:A}}const k={name:o,reducer:b,actions:c.actionCreators,caseReducers:c.sliceCaseReducersByName,getInitialState:w,...C(i),injectInto(E,{reducerPath:j,...A}={}){const M=j??i;return E.inject({reducerPath:M,reducer:b},A),{...k,...C(M,!0)}}};return k}}function ybe(t,e,n,r){function s(o,...i){let a=e(o);return typeof a>"u"&&r&&(a=n()),t(a,...i)}return s.unwrapped=t,s}var oi=gbe();function vbe(){function t(e,n){return{_reducerDefinitionType:"asyncThunk",payloadCreator:e,...n}}return t.withTypes=()=>t,{reducer(e){return Object.assign({[e.name](...n){return e(...n)}}[e.name],{_reducerDefinitionType:"reducer"})},preparedReducer(e,n){return{_reducerDefinitionType:"reducerWithPrepare",prepare:e,reducer:n}},asyncThunk:t}}function bbe({type:t,reducerName:e,createNotation:n},r,s){let o,i;if("reducer"in r){if(n&&!wbe(r))throw new Error(vc(17));o=r.reducer,i=r.prepare}else o=r;s.addCase(t,o).exposeCaseReducer(e,o).exposeAction(e,i?B0(t,i):B0(t))}function xbe(t){return t._reducerDefinitionType==="asyncThunk"}function wbe(t){return t._reducerDefinitionType==="reducerWithPrepare"}function Sbe({type:t,reducerName:e},n,r,s){if(!s)throw new Error(vc(18));const{payloadCreator:o,fulfilled:i,pending:a,rejected:l,settled:c,options:u}=n,f=s(t,o,u);r.exposeAction(e,f),i&&r.addCase(f.fulfilled,i),a&&r.addCase(f.pending,a),l&&r.addCase(f.rejected,l),c&&r.addMatcher(f.settled,c),r.exposeCaseReducer(e,{fulfilled:i||Bv,pending:a||Bv,rejected:l||Bv,settled:c||Bv})}function Bv(){}function vc(t){return`Minified Redux Toolkit error #${t}; visit https://redux-toolkit.js.org/Errors?code=${t} for the full message or use the non-minified dev environment for full errors. `}const xn=t=>typeof t=="string",n0=()=>{let t,e;const n=new Promise((r,s)=>{t=r,e=s});return n.resolve=t,n.reject=e,n},GF=t=>t==null?"":""+t,Cbe=(t,e,n)=>{t.forEach(r=>{e[r]&&(n[r]=e[r])})},kbe=/###/g,KF=t=>t&&t.indexOf("###")>-1?t.replace(kbe,"."):t,XF=t=>!t||xn(t),H0=(t,e,n)=>{const r=xn(e)?e.split("."):e;let s=0;for(;s<r.length-1;){if(XF(t))return{};const o=KF(r[s]);!t[o]&&n&&(t[o]=new n),Object.prototype.hasOwnProperty.call(t,o)?t=t[o]:t={},++s}return XF(t)?{}:{obj:t,k:KF(r[s])}},ZF=(t,e,n)=>{const{obj:r,k:s}=H0(t,e,Object);if(r!==void 0||e.length===1){r[s]=n;return}let o=e[e.length-1],i=e.slice(0,e.length-1),a=H0(t,i,Object);for(;a.obj===void 0&&i.length;)o=`${i[i.length-1]}.${o}`,i=i.slice(0,i.length-1),a=H0(t,i,Object),a&&a.obj&&typeof a.obj[`${a.k}.${o}`]<"u"&&(a.obj=void 0);a.obj[`${a.k}.${o}`]=n},Ebe=(t,e,n,r)=>{const{obj:s,k:o}=H0(t,e,Object);s[o]=s[o]||[],s[o].push(n)},n3=(t,e)=>{const{obj:n,k:r}=H0(t,e);if(n)return n[r]},Tbe=(t,e,n)=>{const r=n3(t,n);return r!==void 0?r:n3(e,n)},WZ=(t,e,n)=>{for(const r in e)r!=="__proto__"&&r!=="constructor"&&(r in t?xn(t[r])||t[r]instanceof String||xn(e[r])||e[r]instanceof String?n&&(t[r]=e[r]):WZ(t[r],e[r],n):t[r]=e[r]);return t},th=t=>t.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var Mbe={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};const jbe=t=>xn(t)?t.replace(/[&<>"'\/]/g,e=>Mbe[e]):t;class Abe{constructor(e){this.capacity=e,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(e){const n=this.regExpMap.get(e);if(n!==void 0)return n;const r=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,r),this.regExpQueue.push(e),r}}const _be=[" ",",","?","!",";"],Rbe=new Abe(20),Dbe=(t,e,n)=>{e=e||"",n=n||"";const r=_be.filter(i=>e.indexOf(i)<0&&n.indexOf(i)<0);if(r.length===0)return!0;const s=Rbe.getRegExp(`(${r.map(i=>i==="?"?"\\?":i).join("|")})`);let o=!s.test(t);if(!o){const i=t.indexOf(n);i>0&&!s.test(t.substring(0,i))&&(o=!0)}return o},ZE=function(t,e){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:".";if(!t)return;if(t[e])return t[e];const r=e.split(n);let s=t;for(let o=0;o<r.length;){if(!s||typeof s!="object")return;let i,a="";for(let l=o;l<r.length;++l)if(l!==o&&(a+=n),a+=r[l],i=s[a],i!==void 0){if(["string","number","boolean"].indexOf(typeof i)>-1&&l<r.length-1)continue;o+=l-o+1;break}s=i}return s},r3=t=>t&&t.replace("_","-"),Ibe={type:"logger",log(t){this.output("log",t)},warn(t){this.output("warn",t)},error(t){this.output("error",t)},output(t,e){console&&console[t]&&console[t].apply(console,e)}};class s3{constructor(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.init(e,n)}init(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.prefix=n.prefix||"i18next:",this.logger=e||Ibe,this.options=n,this.debug=n.debug}log(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return this.forward(n,"log","",!0)}warn(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return this.forward(n,"warn","",!0)}error(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return this.forward(n,"error","")}deprecate(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return this.forward(n,"warn","WARNING DEPRECATED: ",!0)}forward(e,n,r,s){return s&&!this.debug?null:(xn(e[0])&&(e[0]=`${r}${this.prefix} ${e[0]}`),this.logger[n](e))}create(e){return new s3(this.logger,{prefix:`${this.prefix}:${e}:`,...this.options})}clone(e){return e=e||this.options,e.prefix=e.prefix||this.prefix,new s3(this.logger,e)}}var hl=new s3;let F4=class{constructor(){this.observers={}}on(e,n){return e.split(" ").forEach(r=>{this.observers[r]||(this.observers[r]=new Map);const s=this.observers[r].get(n)||0;this.observers[r].set(n,s+1)}),this}off(e,n){if(this.observers[e]){if(!n){delete this.observers[e];return}this.observers[e].delete(n)}}emit(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),s=1;s<n;s++)r[s-1]=arguments[s];this.observers[e]&&Array.from(this.observers[e].entries()).forEach(i=>{let[a,l]=i;for(let c=0;c<l;c++)a(...r)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(i=>{let[a,l]=i;for(let c=0;c<l;c++)a.apply(a,[e,...r])})}};class QF extends F4{constructor(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{ns:["translation"],defaultNS:"translation"};super(),this.data=e||{},this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(e){this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}removeNamespaces(e){const n=this.options.ns.indexOf(e);n>-1&&this.options.ns.splice(n,1)}getResource(e,n,r){let s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const o=s.keySeparator!==void 0?s.keySeparator:this.options.keySeparator,i=s.ignoreJSONStructure!==void 0?s.ignoreJSONStructure:this.options.ignoreJSONStructure;let a;e.indexOf(".")>-1?a=e.split("."):(a=[e,n],r&&(Array.isArray(r)?a.push(...r):xn(r)&&o?a.push(...r.split(o)):a.push(r)));const l=n3(this.data,a);return!l&&!n&&!r&&e.indexOf(".")>-1&&(e=a[0],n=a[1],r=a.slice(2).join(".")),l||!i||!xn(r)?l:ZE(this.data&&this.data[e]&&this.data[e][n],r,o)}addResource(e,n,r,s){let o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{silent:!1};const i=o.keySeparator!==void 0?o.keySeparator:this.options.keySeparator;let a=[e,n];r&&(a=a.concat(i?r.split(i):r)),e.indexOf(".")>-1&&(a=e.split("."),s=n,n=a[1]),this.addNamespaces(n),ZF(this.data,a,s),o.silent||this.emit("added",e,n,r,s)}addResources(e,n,r){let s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{silent:!1};for(const o in r)(xn(r[o])||Array.isArray(r[o]))&&this.addResource(e,n,o,r[o],{silent:!0});s.silent||this.emit("added",e,n,r)}addResourceBundle(e,n,r,s,o){let i=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:!1,skipCopy:!1},a=[e,n];e.indexOf(".")>-1&&(a=e.split("."),s=r,r=n,n=a[1]),this.addNamespaces(n);let l=n3(this.data,a)||{};i.skipCopy||(r=JSON.parse(JSON.stringify(r))),s?WZ(l,r,o):l={...l,...r},ZF(this.data,a,l),i.silent||this.emit("added",e,n,r)}removeResourceBundle(e,n){this.hasResourceBundle(e,n)&&delete this.data[e][n],this.removeNamespaces(n),this.emit("removed",e,n)}hasResourceBundle(e,n){return this.getResource(e,n)!==void 0}getResourceBundle(e,n){return n||(n=this.options.defaultNS),this.options.compatibilityAPI==="v1"?{...this.getResource(e,n)}:this.getResource(e,n)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){const n=this.getDataByLanguage(e);return!!(n&&Object.keys(n)||[]).find(s=>n[s]&&Object.keys(n[s]).length>0)}toJSON(){return this.data}}var YZ={processors:{},addPostProcessor(t){this.processors[t.name]=t},handle(t,e,n,r,s){return t.forEach(o=>{this.processors[o]&&(e=this.processors[o].process(e,n,r,s))}),e}};const JF={};class o3 extends F4{constructor(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(),Cbe(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],e,this),this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=hl.create("translator")}changeLanguage(e){e&&(this.language=e)}exists(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};if(e==null)return!1;const r=this.resolve(e,n);return r&&r.res!==void 0}extractFromKey(e,n){let r=n.nsSeparator!==void 0?n.nsSeparator:this.options.nsSeparator;r===void 0&&(r=":");const s=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator;let o=n.ns||this.options.defaultNS||[];const i=r&&e.indexOf(r)>-1,a=!this.options.userDefinedKeySeparator&&!n.keySeparator&&!this.options.userDefinedNsSeparator&&!n.nsSeparator&&!Dbe(e,r,s);if(i&&!a){const l=e.match(this.interpolator.nestingRegexp);if(l&&l.length>0)return{key:e,namespaces:xn(o)?[o]:o};const c=e.split(r);(r!==s||r===s&&this.options.ns.indexOf(c[0])>-1)&&(o=c.shift()),e=c.join(s)}return{key:e,namespaces:xn(o)?[o]:o}}translate(e,n,r){if(typeof n!="object"&&this.options.overloadTranslationOptionHandler&&(n=this.options.overloadTranslationOptionHandler(arguments)),typeof n=="object"&&(n={...n}),n||(n={}),e==null)return"";Array.isArray(e)||(e=[String(e)]);const s=n.returnDetails!==void 0?n.returnDetails:this.options.returnDetails,o=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator,{key:i,namespaces:a}=this.extractFromKey(e[e.length-1],n),l=a[a.length-1],c=n.lng||this.language,u=n.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(c&&c.toLowerCase()==="cimode"){if(u){const E=n.nsSeparator||this.options.nsSeparator;return s?{res:`${l}${E}${i}`,usedKey:i,exactUsedKey:i,usedLng:c,usedNS:l,usedParams:this.getUsedParamsDetails(n)}:`${l}${E}${i}`}return s?{res:i,usedKey:i,exactUsedKey:i,usedLng:c,usedNS:l,usedParams:this.getUsedParamsDetails(n)}:i}const f=this.resolve(e,n);let h=f&&f.res;const m=f&&f.usedKey||i,y=f&&f.exactUsedKey||i,v=Object.prototype.toString.apply(h),b=["[object Number]","[object Function]","[object RegExp]"],w=n.joinArrays!==void 0?n.joinArrays:this.options.joinArrays,C=!this.i18nFormat||this.i18nFormat.handleAsObject,k=!xn(h)&&typeof h!="boolean"&&typeof h!="number";if(C&&h&&k&&b.indexOf(v)<0&&!(xn(w)&&Array.isArray(h))){if(!n.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const E=this.options.returnedObjectHandler?this.options.returnedObjectHandler(m,h,{...n,ns:a}):`key '${i} (${this.language})' returned an object instead of string.`;return s?(f.res=E,f.usedParams=this.getUsedParamsDetails(n),f):E}if(o){const E=Array.isArray(h),j=E?[]:{},A=E?y:m;for(const M in h)if(Object.prototype.hasOwnProperty.call(h,M)){const _=`${A}${o}${M}`;j[M]=this.translate(_,{...n,joinArrays:!1,ns:a}),j[M]===_&&(j[M]=h[M])}h=j}}else if(C&&xn(w)&&Array.isArray(h))h=h.join(w),h&&(h=this.extendTranslation(h,e,n,r));else{let E=!1,j=!1;const A=n.count!==void 0&&!xn(n.count),M=o3.hasDefaultValue(n),_=A?this.pluralResolver.getSuffix(c,n.count,n):"",D=n.ordinal&&A?this.pluralResolver.getSuffix(c,n.count,{ordinal:!1}):"",R=A&&!n.ordinal&&n.count===0&&this.pluralResolver.shouldUseIntlApi(),N=R&&n[`defaultValue${this.options.pluralSeparator}zero`]||n[`defaultValue${_}`]||n[`defaultValue${D}`]||n.defaultValue;!this.isValidLookup(h)&&M&&(E=!0,h=N),this.isValidLookup(h)||(j=!0,h=i);const B=(n.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&j?void 0:h,L=M&&N!==h&&this.options.updateMissing;if(j||E||L){if(this.logger.log(L?"updateKey":"missingKey",c,l,i,L?N:h),o){const $=this.resolve(i,{...n,keySeparator:!1});$&&$.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let P=[];const I=this.languageUtils.getFallbackCodes(this.options.fallbackLng,n.lng||this.language);if(this.options.saveMissingTo==="fallback"&&I&&I[0])for(let $=0;$<I.length;$++)P.push(I[$]);else this.options.saveMissingTo==="all"?P=this.languageUtils.toResolveHierarchy(n.lng||this.language):P.push(n.lng||this.language);const H=($,V,q)=>{const U=M&&q!==h?q:B;this.options.missingKeyHandler?this.options.missingKeyHandler($,l,V,U,L,n):this.backendConnector&&this.backendConnector.saveMissing&&this.backendConnector.saveMissing($,l,V,U,L,n),this.emit("missingKey",$,l,V,h)};this.options.saveMissing&&(this.options.saveMissingPlurals&&A?P.forEach($=>{const V=this.pluralResolver.getSuffixes($,n);R&&n[`defaultValue${this.options.pluralSeparator}zero`]&&V.indexOf(`${this.options.pluralSeparator}zero`)<0&&V.push(`${this.options.pluralSeparator}zero`),V.forEach(q=>{H([$],i+q,n[`defaultValue${q}`]||N)})}):H(P,i,N))}h=this.extendTranslation(h,e,n,f,r),j&&h===i&&this.options.appendNamespaceToMissingKey&&(h=`${l}:${i}`),(j||E)&&this.options.parseMissingKeyHandler&&(this.options.compatibilityAPI!=="v1"?h=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${l}:${i}`:i,E?h:void 0):h=this.options.parseMissingKeyHandler(h))}return s?(f.res=h,f.usedParams=this.getUsedParamsDetails(n),f):h}extendTranslation(e,n,r,s,o){var i=this;if(this.i18nFormat&&this.i18nFormat.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...r},r.lng||this.language||s.usedLng,s.usedNS,s.usedKey,{resolved:s});else if(!r.skipInterpolation){r.interpolation&&this.interpolator.init({...r,interpolation:{...this.options.interpolation,...r.interpolation}});const c=xn(e)&&(r&&r.interpolation&&r.interpolation.skipOnVariables!==void 0?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let u;if(c){const h=e.match(this.interpolator.nestingRegexp);u=h&&h.length}let f=r.replace&&!xn(r.replace)?r.replace:r;if(this.options.interpolation.defaultVariables&&(f={...this.options.interpolation.defaultVariables,...f}),e=this.interpolator.interpolate(e,f,r.lng||this.language||s.usedLng,r),c){const h=e.match(this.interpolator.nestingRegexp),m=h&&h.length;u<m&&(r.nest=!1)}!r.lng&&this.options.compatibilityAPI!=="v1"&&s&&s.res&&(r.lng=this.language||s.usedLng),r.nest!==!1&&(e=this.interpolator.nest(e,function(){for(var h=arguments.length,m=new Array(h),y=0;y<h;y++)m[y]=arguments[y];return o&&o[0]===m[0]&&!r.context?(i.logger.warn(`It seems you are nesting recursively key: ${m[0]} in key: ${n[0]}`),null):i.translate(...m,n)},r)),r.interpolation&&this.interpolator.reset()}const a=r.postProcess||this.options.postProcess,l=xn(a)?[a]:a;return e!=null&&l&&l.length&&r.applyPostProcessor!==!1&&(e=YZ.handle(l,e,n,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...s,usedParams:this.getUsedParamsDetails(r)},...r}:r,this)),e}resolve(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r,s,o,i,a;return xn(e)&&(e=[e]),e.forEach(l=>{if(this.isValidLookup(r))return;const c=this.extractFromKey(l,n),u=c.key;s=u;let f=c.namespaces;this.options.fallbackNS&&(f=f.concat(this.options.fallbackNS));const h=n.count!==void 0&&!xn(n.count),m=h&&!n.ordinal&&n.count===0&&this.pluralResolver.shouldUseIntlApi(),y=n.context!==void 0&&(xn(n.context)||typeof n.context=="number")&&n.context!=="",v=n.lngs?n.lngs:this.languageUtils.toResolveHierarchy(n.lng||this.language,n.fallbackLng);f.forEach(b=>{this.isValidLookup(r)||(a=b,!JF[`${v[0]}-${b}`]&&this.utils&&this.utils.hasLoadedNamespace&&!this.utils.hasLoadedNamespace(a)&&(JF[`${v[0]}-${b}`]=!0,this.logger.warn(`key "${s}" for languages "${v.join(", ")}" won't get resolved as namespace "${a}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),v.forEach(w=>{if(this.isValidLookup(r))return;i=w;const C=[u];if(this.i18nFormat&&this.i18nFormat.addLookupKeys)this.i18nFormat.addLookupKeys(C,u,w,b,n);else{let E;h&&(E=this.pluralResolver.getSuffix(w,n.count,n));const j=`${this.options.pluralSeparator}zero`,A=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(h&&(C.push(u+E),n.ordinal&&E.indexOf(A)===0&&C.push(u+E.replace(A,this.options.pluralSeparator)),m&&C.push(u+j)),y){const M=`${u}${this.options.contextSeparator}${n.context}`;C.push(M),h&&(C.push(M+E),n.ordinal&&E.indexOf(A)===0&&C.push(M+E.replace(A,this.options.pluralSeparator)),m&&C.push(M+j))}}let k;for(;k=C.pop();)this.isValidLookup(r)||(o=k,r=this.getResource(w,b,k,n))}))})}),{res:r,usedKey:s,exactUsedKey:o,usedLng:i,usedNS:a}}isValidLookup(e){return e!==void 0&&!(!this.options.returnNull&&e===null)&&!(!this.options.returnEmptyString&&e==="")}getResource(e,n,r){let s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(e,n,r,s):this.resourceStore.getResource(e,n,r,s)}getUsedParamsDetails(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const n=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],r=e.replace&&!xn(e.replace);let s=r?e.replace:e;if(r&&typeof e.count<"u"&&(s.count=e.count),this.options.interpolation.defaultVariables&&(s={...this.options.interpolation.defaultVariables,...s}),!r){s={...s};for(const o of n)delete s[o]}return s}static hasDefaultValue(e){const n="defaultValue";for(const r in e)if(Object.prototype.hasOwnProperty.call(e,r)&&n===r.substring(0,n.length)&&e[r]!==void 0)return!0;return!1}}const tk=t=>t.charAt(0).toUpperCase()+t.slice(1);class ez{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=hl.create("languageUtils")}getScriptPartFromCode(e){if(e=r3(e),!e||e.indexOf("-")<0)return null;const n=e.split("-");return n.length===2||(n.pop(),n[n.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(n.join("-"))}getLanguagePartFromCode(e){if(e=r3(e),!e||e.indexOf("-")<0)return e;const n=e.split("-");return this.formatLanguageCode(n[0])}formatLanguageCode(e){if(xn(e)&&e.indexOf("-")>-1){if(typeof Intl<"u"&&typeof Intl.getCanonicalLocales<"u")try{let s=Intl.getCanonicalLocales(e)[0];if(s&&this.options.lowerCaseLng&&(s=s.toLowerCase()),s)return s}catch{}const n=["hans","hant","latn","cyrl","cans","mong","arab"];let r=e.split("-");return this.options.lowerCaseLng?r=r.map(s=>s.toLowerCase()):r.length===2?(r[0]=r[0].toLowerCase(),r[1]=r[1].toUpperCase(),n.indexOf(r[1].toLowerCase())>-1&&(r[1]=tk(r[1].toLowerCase()))):r.length===3&&(r[0]=r[0].toLowerCase(),r[1].length===2&&(r[1]=r[1].toUpperCase()),r[0]!=="sgn"&&r[2].length===2&&(r[2]=r[2].toUpperCase()),n.indexOf(r[1].toLowerCase())>-1&&(r[1]=tk(r[1].toLowerCase())),n.indexOf(r[2].toLowerCase())>-1&&(r[2]=tk(r[2].toLowerCase()))),r.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}isSupportedCode(e){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}getBestMatchFromCodes(e){if(!e)return null;let n;return e.forEach(r=>{if(n)return;const s=this.formatLanguageCode(r);(!this.options.supportedLngs||this.isSupportedCode(s))&&(n=s)}),!n&&this.options.supportedLngs&&e.forEach(r=>{if(n)return;const s=this.getLanguagePartFromCode(r);if(this.isSupportedCode(s))return n=s;n=this.options.supportedLngs.find(o=>{if(o===s)return o;if(!(o.indexOf("-")<0&&s.indexOf("-")<0)&&(o.indexOf("-")>0&&s.indexOf("-")<0&&o.substring(0,o.indexOf("-"))===s||o.indexOf(s)===0&&s.length>1))return o})}),n||(n=this.getFallbackCodes(this.options.fallbackLng)[0]),n}getFallbackCodes(e,n){if(!e)return[];if(typeof e=="function"&&(e=e(n)),xn(e)&&(e=[e]),Array.isArray(e))return e;if(!n)return e.default||[];let r=e[n];return r||(r=e[this.getScriptPartFromCode(n)]),r||(r=e[this.formatLanguageCode(n)]),r||(r=e[this.getLanguagePartFromCode(n)]),r||(r=e.default),r||[]}toResolveHierarchy(e,n){const r=this.getFallbackCodes(n||this.options.fallbackLng||[],e),s=[],o=i=>{i&&(this.isSupportedCode(i)?s.push(i):this.logger.warn(`rejecting language code not found in supportedLngs: ${i}`))};return xn(e)&&(e.indexOf("-")>-1||e.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&o(this.formatLanguageCode(e)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&o(this.getScriptPartFromCode(e)),this.options.load!=="currentOnly"&&o(this.getLanguagePartFromCode(e))):xn(e)&&o(this.formatLanguageCode(e)),r.forEach(i=>{s.indexOf(i)<0&&o(this.formatLanguageCode(i))}),s}}let Obe=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kk","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],Nbe={1:t=>+(t>1),2:t=>+(t!=1),3:t=>0,4:t=>t%10==1&&t%100!=11?0:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?1:2,5:t=>t==0?0:t==1?1:t==2?2:t%100>=3&&t%100<=10?3:t%100>=11?4:5,6:t=>t==1?0:t>=2&&t<=4?1:2,7:t=>t==1?0:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?1:2,8:t=>t==1?0:t==2?1:t!=8&&t!=11?2:3,9:t=>+(t>=2),10:t=>t==1?0:t==2?1:t<7?2:t<11?3:4,11:t=>t==1||t==11?0:t==2||t==12?1:t>2&&t<20?2:3,12:t=>+(t%10!=1||t%100==11),13:t=>+(t!==0),14:t=>t==1?0:t==2?1:t==3?2:3,15:t=>t%10==1&&t%100!=11?0:t%10>=2&&(t%100<10||t%100>=20)?1:2,16:t=>t%10==1&&t%100!=11?0:t!==0?1:2,17:t=>t==1||t%10==1&&t%100!=11?0:1,18:t=>t==0?0:t==1?1:2,19:t=>t==1?0:t==0||t%100>1&&t%100<11?1:t%100>10&&t%100<20?2:3,20:t=>t==1?0:t==0||t%100>0&&t%100<20?1:2,21:t=>t%100==1?1:t%100==2?2:t%100==3||t%100==4?3:0,22:t=>t==1?0:t==2?1:(t<0||t>10)&&t%10==0?2:3};const Lbe=["v1","v2","v3"],$be=["v4"],tz={zero:0,one:1,two:2,few:3,many:4,other:5},Fbe=()=>{const t={};return Obe.forEach(e=>{e.lngs.forEach(n=>{t[n]={numbers:e.nr,plurals:Nbe[e.fc]}})}),t};class zbe{constructor(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.languageUtils=e,this.options=n,this.logger=hl.create("pluralResolver"),(!this.options.compatibilityJSON||$be.includes(this.options.compatibilityJSON))&&(typeof Intl>"u"||!Intl.PluralRules)&&(this.options.compatibilityJSON="v3",this.logger.error("Your environment seems not to be Intl API compatible, use an Intl.PluralRules polyfill. Will fallback to the compatibilityJSON v3 format handling.")),this.rules=Fbe(),this.pluralRulesCache={}}addRule(e,n){this.rules[e]=n}clearCache(){this.pluralRulesCache={}}getRule(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.shouldUseIntlApi()){const r=r3(e==="dev"?"en":e),s=n.ordinal?"ordinal":"cardinal",o=JSON.stringify({cleanedCode:r,type:s});if(o in this.pluralRulesCache)return this.pluralRulesCache[o];let i;try{i=new Intl.PluralRules(r,{type:s})}catch{if(!e.match(/-|_/))return;const l=this.languageUtils.getLanguagePartFromCode(e);i=this.getRule(l,n)}return this.pluralRulesCache[o]=i,i}return this.rules[e]||this.rules[this.languageUtils.getLanguagePartFromCode(e)]}needsPlural(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const r=this.getRule(e,n);return this.shouldUseIntlApi()?r&&r.resolvedOptions().pluralCategories.length>1:r&&r.numbers.length>1}getPluralFormsOfKey(e,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.getSuffixes(e,r).map(s=>`${n}${s}`)}getSuffixes(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const r=this.getRule(e,n);return r?this.shouldUseIntlApi()?r.resolvedOptions().pluralCategories.sort((s,o)=>tz[s]-tz[o]).map(s=>`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${s}`):r.numbers.map(s=>this.getSuffix(e,s,n)):[]}getSuffix(e,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const s=this.getRule(e,r);return s?this.shouldUseIntlApi()?`${this.options.prepend}${r.ordinal?`ordinal${this.options.prepend}`:""}${s.select(n)}`:this.getSuffixRetroCompatible(s,n):(this.logger.warn(`no plural rule found for: ${e}`),"")}getSuffixRetroCompatible(e,n){const r=e.noAbs?e.plurals(n):e.plurals(Math.abs(n));let s=e.numbers[r];this.options.simplifyPluralSuffix&&e.numbers.length===2&&e.numbers[0]===1&&(s===2?s="plural":s===1&&(s=""));const o=()=>this.options.prepend&&s.toString()?this.options.prepend+s.toString():s.toString();return this.options.compatibilityJSON==="v1"?s===1?"":typeof s=="number"?`_plural_${s.toString()}`:o():this.options.compatibilityJSON==="v2"||this.options.simplifyPluralSuffix&&e.numbers.length===2&&e.numbers[0]===1?o():this.options.prepend&&r.toString()?this.options.prepend+r.toString():r.toString()}shouldUseIntlApi(){return!Lbe.includes(this.options.compatibilityJSON)}}const nz=function(t,e,n){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:".",s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,o=Tbe(t,e,n);return!o&&s&&xn(n)&&(o=ZE(t,n,r),o===void 0&&(o=ZE(e,n,r))),o},nk=t=>t.replace(/\$/g,"$$$$");class Pbe{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=hl.create("interpolator"),this.options=e,this.format=e.interpolation&&e.interpolation.format||(n=>n),this.init(e)}init(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};e.interpolation||(e.interpolation={escapeValue:!0});const{escape:n,escapeValue:r,useRawValueToEscape:s,prefix:o,prefixEscaped:i,suffix:a,suffixEscaped:l,formatSeparator:c,unescapeSuffix:u,unescapePrefix:f,nestingPrefix:h,nestingPrefixEscaped:m,nestingSuffix:y,nestingSuffixEscaped:v,nestingOptionsSeparator:b,maxReplaces:w,alwaysFormat:C}=e.interpolation;this.escape=n!==void 0?n:jbe,this.escapeValue=r!==void 0?r:!0,this.useRawValueToEscape=s!==void 0?s:!1,this.prefix=o?th(o):i||"{{",this.suffix=a?th(a):l||"}}",this.formatSeparator=c||",",this.unescapePrefix=u?"":f||"-",this.unescapeSuffix=this.unescapePrefix?"":u||"",this.nestingPrefix=h?th(h):m||th("$t("),this.nestingSuffix=y?th(y):v||th(")"),this.nestingOptionsSeparator=b||",",this.maxReplaces=w||1e3,this.alwaysFormat=C!==void 0?C:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const e=(n,r)=>n&&n.source===r?(n.lastIndex=0,n):new RegExp(r,"g");this.regexp=e(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=e(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=e(this.nestingRegexp,`${this.nestingPrefix}(.+?)${this.nestingSuffix}`)}interpolate(e,n,r,s){let o,i,a;const l=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},c=m=>{if(m.indexOf(this.formatSeparator)<0){const w=nz(n,l,m,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(w,void 0,r,{...s,...n,interpolationkey:m}):w}const y=m.split(this.formatSeparator),v=y.shift().trim(),b=y.join(this.formatSeparator).trim();return this.format(nz(n,l,v,this.options.keySeparator,this.options.ignoreJSONStructure),b,r,{...s,...n,interpolationkey:v})};this.resetRegExp();const u=s&&s.missingInterpolationHandler||this.options.missingInterpolationHandler,f=s&&s.interpolation&&s.interpolation.skipOnVariables!==void 0?s.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:m=>nk(m)},{regex:this.regexp,safeValue:m=>this.escapeValue?nk(this.escape(m)):nk(m)}].forEach(m=>{for(a=0;o=m.regex.exec(e);){const y=o[1].trim();if(i=c(y),i===void 0)if(typeof u=="function"){const b=u(e,o,s);i=xn(b)?b:""}else if(s&&Object.prototype.hasOwnProperty.call(s,y))i="";else if(f){i=o[0];continue}else this.logger.warn(`missed to pass in variable ${y} for interpolating ${e}`),i="";else!xn(i)&&!this.useRawValueToEscape&&(i=GF(i));const v=m.safeValue(i);if(e=e.replace(o[0],v),f?(m.regex.lastIndex+=i.length,m.regex.lastIndex-=o[0].length):m.regex.lastIndex=0,a++,a>=this.maxReplaces)break}}),e}nest(e,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},s,o,i;const a=(l,c)=>{const u=this.nestingOptionsSeparator;if(l.indexOf(u)<0)return l;const f=l.split(new RegExp(`${u}[ ]*{`));let h=`{${f[1]}`;l=f[0],h=this.interpolate(h,i);const m=h.match(/'/g),y=h.match(/"/g);(m&&m.length%2===0&&!y||y.length%2!==0)&&(h=h.replace(/'/g,'"'));try{i=JSON.parse(h),c&&(i={...c,...i})}catch(v){return this.logger.warn(`failed parsing options string in nesting for key ${l}`,v),`${l}${u}${h}`}return i.defaultValue&&i.defaultValue.indexOf(this.prefix)>-1&&delete i.defaultValue,l};for(;s=this.nestingRegexp.exec(e);){let l=[];i={...r},i=i.replace&&!xn(i.replace)?i.replace:i,i.applyPostProcessor=!1,delete i.defaultValue;let c=!1;if(s[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(s[1])){const u=s[1].split(this.formatSeparator).map(f=>f.trim());s[1]=u.shift(),l=u,c=!0}if(o=n(a.call(this,s[1].trim(),i),i),o&&s[0]===e&&!xn(o))return o;xn(o)||(o=GF(o)),o||(this.logger.warn(`missed to resolve ${s[1]} for nesting ${e}`),o=""),c&&(o=l.reduce((u,f)=>this.format(u,f,r.lng,{...r,interpolationkey:s[1].trim()}),o.trim())),e=e.replace(s[0],o),this.regexp.lastIndex=0}return e}}const Bbe=t=>{let e=t.toLowerCase().trim();const n={};if(t.indexOf("(")>-1){const r=t.split("(");e=r[0].toLowerCase().trim();const s=r[1].substring(0,r[1].length-1);e==="currency"&&s.indexOf(":")<0?n.currency||(n.currency=s.trim()):e==="relativetime"&&s.indexOf(":")<0?n.range||(n.range=s.trim()):s.split(";").forEach(i=>{if(i){const[a,...l]=i.split(":"),c=l.join(":").trim().replace(/^'+|'+$/g,""),u=a.trim();n[u]||(n[u]=c),c==="false"&&(n[u]=!1),c==="true"&&(n[u]=!0),isNaN(c)||(n[u]=parseInt(c,10))}})}return{formatName:e,formatOptions:n}},nh=t=>{const e={};return(n,r,s)=>{let o=s;s&&s.interpolationkey&&s.formatParams&&s.formatParams[s.interpolationkey]&&s[s.interpolationkey]&&(o={...o,[s.interpolationkey]:void 0});const i=r+JSON.stringify(o);let a=e[i];return a||(a=t(r3(r),s),e[i]=a),a(n)}};class Hbe{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=hl.create("formatter"),this.options=e,this.formats={number:nh((n,r)=>{const s=new Intl.NumberFormat(n,{...r});return o=>s.format(o)}),currency:nh((n,r)=>{const s=new Intl.NumberFormat(n,{...r,style:"currency"});return o=>s.format(o)}),datetime:nh((n,r)=>{const s=new Intl.DateTimeFormat(n,{...r});return o=>s.format(o)}),relativetime:nh((n,r)=>{const s=new Intl.RelativeTimeFormat(n,{...r});return o=>s.format(o,r.range||"day")}),list:nh((n,r)=>{const s=new Intl.ListFormat(n,{...r});return o=>s.format(o)})},this.init(e)}init(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};this.formatSeparator=n.interpolation.formatSeparator||","}add(e,n){this.formats[e.toLowerCase().trim()]=n}addCached(e,n){this.formats[e.toLowerCase().trim()]=nh(n)}format(e,n,r){let s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const o=n.split(this.formatSeparator);if(o.length>1&&o[0].indexOf("(")>1&&o[0].indexOf(")")<0&&o.find(a=>a.indexOf(")")>-1)){const a=o.findIndex(l=>l.indexOf(")")>-1);o[0]=[o[0],...o.splice(1,a)].join(this.formatSeparator)}return o.reduce((a,l)=>{const{formatName:c,formatOptions:u}=Bbe(l);if(this.formats[c]){let f=a;try{const h=s&&s.formatParams&&s.formatParams[s.interpolationkey]||{},m=h.locale||h.lng||s.locale||s.lng||r;f=this.formats[c](a,m,{...u,...s,...h})}catch(h){this.logger.warn(h)}return f}else this.logger.warn(`there was no format function for ${c}`);return a},e)}}const Ube=(t,e)=>{t.pending[e]!==void 0&&(delete t.pending[e],t.pendingCount--)};class Vbe extends F4{constructor(e,n,r){let s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};super(),this.backend=e,this.store=n,this.services=r,this.languageUtils=r.languageUtils,this.options=s,this.logger=hl.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=s.maxParallelReads||10,this.readingCalls=0,this.maxRetries=s.maxRetries>=0?s.maxRetries:5,this.retryTimeout=s.retryTimeout>=1?s.retryTimeout:350,this.state={},this.queue=[],this.backend&&this.backend.init&&this.backend.init(r,s.backend,s)}queueLoad(e,n,r,s){const o={},i={},a={},l={};return e.forEach(c=>{let u=!0;n.forEach(f=>{const h=`${c}|${f}`;!r.reload&&this.store.hasResourceBundle(c,f)?this.state[h]=2:this.state[h]<0||(this.state[h]===1?i[h]===void 0&&(i[h]=!0):(this.state[h]=1,u=!1,i[h]===void 0&&(i[h]=!0),o[h]===void 0&&(o[h]=!0),l[f]===void 0&&(l[f]=!0)))}),u||(a[c]=!0)}),(Object.keys(o).length||Object.keys(i).length)&&this.queue.push({pending:i,pendingCount:Object.keys(i).length,loaded:{},errors:[],callback:s}),{toLoad:Object.keys(o),pending:Object.keys(i),toLoadLanguages:Object.keys(a),toLoadNamespaces:Object.keys(l)}}loaded(e,n,r){const s=e.split("|"),o=s[0],i=s[1];n&&this.emit("failedLoading",o,i,n),!n&&r&&this.store.addResourceBundle(o,i,r,void 0,void 0,{skipCopy:!0}),this.state[e]=n?-1:2,n&&r&&(this.state[e]=0);const a={};this.queue.forEach(l=>{Ebe(l.loaded,[o],i),Ube(l,e),n&&l.errors.push(n),l.pendingCount===0&&!l.done&&(Object.keys(l.loaded).forEach(c=>{a[c]||(a[c]={});const u=l.loaded[c];u.length&&u.forEach(f=>{a[c][f]===void 0&&(a[c][f]=!0)})}),l.done=!0,l.errors.length?l.callback(l.errors):l.callback())}),this.emit("loaded",a),this.queue=this.queue.filter(l=>!l.done)}read(e,n,r){let s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.retryTimeout,i=arguments.length>5?arguments[5]:void 0;if(!e.length)return i(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:e,ns:n,fcName:r,tried:s,wait:o,callback:i});return}this.readingCalls++;const a=(c,u)=>{if(this.readingCalls--,this.waitingReads.length>0){const f=this.waitingReads.shift();this.read(f.lng,f.ns,f.fcName,f.tried,f.wait,f.callback)}if(c&&u&&s<this.maxRetries){setTimeout(()=>{this.read.call(this,e,n,r,s+1,o*2,i)},o);return}i(c,u)},l=this.backend[r].bind(this.backend);if(l.length===2){try{const c=l(e,n);c&&typeof c.then=="function"?c.then(u=>a(null,u)).catch(a):a(null,c)}catch(c){a(c)}return}return l(e,n,a)}prepareLoading(e,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},s=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),s&&s();xn(e)&&(e=this.languageUtils.toResolveHierarchy(e)),xn(n)&&(n=[n]);const o=this.queueLoad(e,n,r,s);if(!o.toLoad.length)return o.pending.length||s(),null;o.toLoad.forEach(i=>{this.loadOne(i)})}load(e,n,r){this.prepareLoading(e,n,{},r)}reload(e,n,r){this.prepareLoading(e,n,{reload:!0},r)}loadOne(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";const r=e.split("|"),s=r[0],o=r[1];this.read(s,o,"read",void 0,void 0,(i,a)=>{i&&this.logger.warn(`${n}loading namespace ${o} for language ${s} failed`,i),!i&&a&&this.logger.log(`${n}loaded namespace ${o} for language ${s}`,a),this.loaded(e,i,a)})}saveMissing(e,n,r,s,o){let i=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{},a=arguments.length>6&&arguments[6]!==void 0?arguments[6]:()=>{};if(this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(n)){this.logger.warn(`did not save key "${r}" as the namespace "${n}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(r==null||r==="")){if(this.backend&&this.backend.create){const l={...i,isUpdate:o},c=this.backend.create.bind(this.backend);if(c.length<6)try{let u;c.length===5?u=c(e,n,r,s,l):u=c(e,n,r,s),u&&typeof u.then=="function"?u.then(f=>a(null,f)).catch(a):a(null,u)}catch(u){a(u)}else c(e,n,r,s,a,l)}!e||!e[0]||this.store.addResource(e[0],n,r,s)}}}const rz=()=>({debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:t=>{let e={};if(typeof t[1]=="object"&&(e=t[1]),xn(t[1])&&(e.defaultValue=t[1]),xn(t[2])&&(e.tDescription=t[2]),typeof t[2]=="object"||typeof t[3]=="object"){const n=t[3]||t[2];Object.keys(n).forEach(r=>{e[r]=n[r]})}return e},interpolation:{escapeValue:!0,format:t=>t,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}),sz=t=>(xn(t.ns)&&(t.ns=[t.ns]),xn(t.fallbackLng)&&(t.fallbackLng=[t.fallbackLng]),xn(t.fallbackNS)&&(t.fallbackNS=[t.fallbackNS]),t.supportedLngs&&t.supportedLngs.indexOf("cimode")<0&&(t.supportedLngs=t.supportedLngs.concat(["cimode"])),t),Hv=()=>{},qbe=t=>{Object.getOwnPropertyNames(Object.getPrototypeOf(t)).forEach(n=>{typeof t[n]=="function"&&(t[n]=t[n].bind(t))})};class bg extends F4{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;if(super(),this.options=sz(e),this.services={},this.logger=hl,this.modules={external:[]},qbe(this),n&&!this.isInitialized&&!e.isClone){if(!this.options.initImmediate)return this.init(e,n),this;setTimeout(()=>{this.init(e,n)},0)}}init(){var e=this;let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;this.isInitializing=!0,typeof n=="function"&&(r=n,n={}),!n.defaultNS&&n.defaultNS!==!1&&n.ns&&(xn(n.ns)?n.defaultNS=n.ns:n.ns.indexOf("translation")<0&&(n.defaultNS=n.ns[0]));const s=rz();this.options={...s,...this.options,...sz(n)},this.options.compatibilityAPI!=="v1"&&(this.options.interpolation={...s.interpolation,...this.options.interpolation}),n.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=n.keySeparator),n.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=n.nsSeparator);const o=u=>u?typeof u=="function"?new u:u:null;if(!this.options.isClone){this.modules.logger?hl.init(o(this.modules.logger),this.options):hl.init(null,this.options);let u;this.modules.formatter?u=this.modules.formatter:typeof Intl<"u"&&(u=Hbe);const f=new ez(this.options);this.store=new QF(this.options.resources,this.options);const h=this.services;h.logger=hl,h.resourceStore=this.store,h.languageUtils=f,h.pluralResolver=new zbe(f,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),u&&(!this.options.interpolation.format||this.options.interpolation.format===s.interpolation.format)&&(h.formatter=o(u),h.formatter.init(h,this.options),this.options.interpolation.format=h.formatter.format.bind(h.formatter)),h.interpolator=new Pbe(this.options),h.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},h.backendConnector=new Vbe(o(this.modules.backend),h.resourceStore,h,this.options),h.backendConnector.on("*",function(m){for(var y=arguments.length,v=new Array(y>1?y-1:0),b=1;b<y;b++)v[b-1]=arguments[b];e.emit(m,...v)}),this.modules.languageDetector&&(h.languageDetector=o(this.modules.languageDetector),h.languageDetector.init&&h.languageDetector.init(h,this.options.detection,this.options)),this.modules.i18nFormat&&(h.i18nFormat=o(this.modules.i18nFormat),h.i18nFormat.init&&h.i18nFormat.init(this)),this.translator=new o3(this.services,this.options),this.translator.on("*",function(m){for(var y=arguments.length,v=new Array(y>1?y-1:0),b=1;b<y;b++)v[b-1]=arguments[b];e.emit(m,...v)}),this.modules.external.forEach(m=>{m.init&&m.init(this)})}if(this.format=this.options.interpolation.format,r||(r=Hv),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const u=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);u.length>0&&u[0]!=="dev"&&(this.options.lng=u[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(u=>{this[u]=function(){return e.store[u](...arguments)}}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(u=>{this[u]=function(){return e.store[u](...arguments),e}});const l=n0(),c=()=>{const u=(f,h)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),l.resolve(h),r(f,h)};if(this.languages&&this.options.compatibilityAPI!=="v1"&&!this.isInitialized)return u(null,this.t.bind(this));this.changeLanguage(this.options.lng,u)};return this.options.resources||!this.options.initImmediate?c():setTimeout(c,0),l}loadResources(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Hv;const s=xn(e)?e:this.language;if(typeof e=="function"&&(r=e),!this.options.resources||this.options.partialBundledLanguages){if(s&&s.toLowerCase()==="cimode"&&(!this.options.preload||this.options.preload.length===0))return r();const o=[],i=a=>{if(!a||a==="cimode")return;this.services.languageUtils.toResolveHierarchy(a).forEach(c=>{c!=="cimode"&&o.indexOf(c)<0&&o.push(c)})};s?i(s):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(l=>i(l)),this.options.preload&&this.options.preload.forEach(a=>i(a)),this.services.backendConnector.load(o,this.options.ns,a=>{!a&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),r(a)})}else r(null)}reloadResources(e,n,r){const s=n0();return typeof e=="function"&&(r=e,e=void 0),typeof n=="function"&&(r=n,n=void 0),e||(e=this.languages),n||(n=this.options.ns),r||(r=Hv),this.services.backendConnector.reload(e,n,o=>{s.resolve(),r(o)}),s}use(e){if(!e)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return e.type==="backend"&&(this.modules.backend=e),(e.type==="logger"||e.log&&e.warn&&e.error)&&(this.modules.logger=e),e.type==="languageDetector"&&(this.modules.languageDetector=e),e.type==="i18nFormat"&&(this.modules.i18nFormat=e),e.type==="postProcessor"&&YZ.addPostProcessor(e),e.type==="formatter"&&(this.modules.formatter=e),e.type==="3rdParty"&&this.modules.external.push(e),this}setResolvedLanguage(e){if(!(!e||!this.languages)&&!(["cimode","dev"].indexOf(e)>-1))for(let n=0;n<this.languages.length;n++){const r=this.languages[n];if(!(["cimode","dev"].indexOf(r)>-1)&&this.store.hasLanguageSomeTranslations(r)){this.resolvedLanguage=r;break}}}changeLanguage(e,n){var r=this;this.isLanguageChangingTo=e;const s=n0();this.emit("languageChanging",e);const o=l=>{this.language=l,this.languages=this.services.languageUtils.toResolveHierarchy(l),this.resolvedLanguage=void 0,this.setResolvedLanguage(l)},i=(l,c)=>{c?(o(c),this.translator.changeLanguage(c),this.isLanguageChangingTo=void 0,this.emit("languageChanged",c),this.logger.log("languageChanged",c)):this.isLanguageChangingTo=void 0,s.resolve(function(){return r.t(...arguments)}),n&&n(l,function(){return r.t(...arguments)})},a=l=>{!e&&!l&&this.services.languageDetector&&(l=[]);const c=xn(l)?l:this.services.languageUtils.getBestMatchFromCodes(l);c&&(this.language||o(c),this.translator.language||this.translator.changeLanguage(c),this.services.languageDetector&&this.services.languageDetector.cacheUserLanguage&&this.services.languageDetector.cacheUserLanguage(c)),this.loadResources(c,u=>{i(u,c)})};return!e&&this.services.languageDetector&&!this.services.languageDetector.async?a(this.services.languageDetector.detect()):!e&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(a):this.services.languageDetector.detect(a):a(e),s}getFixedT(e,n,r){var s=this;const o=function(i,a){let l;if(typeof a!="object"){for(var c=arguments.length,u=new Array(c>2?c-2:0),f=2;f<c;f++)u[f-2]=arguments[f];l=s.options.overloadTranslationOptionHandler([i,a].concat(u))}else l={...a};l.lng=l.lng||o.lng,l.lngs=l.lngs||o.lngs,l.ns=l.ns||o.ns,l.keyPrefix!==""&&(l.keyPrefix=l.keyPrefix||r||o.keyPrefix);const h=s.options.keySeparator||".";let m;return l.keyPrefix&&Array.isArray(i)?m=i.map(y=>`${l.keyPrefix}${h}${y}`):m=l.keyPrefix?`${l.keyPrefix}${h}${i}`:i,s.t(m,l)};return xn(e)?o.lng=e:o.lngs=e,o.ns=n,o.keyPrefix=r,o}t(){return this.translator&&this.translator.translate(...arguments)}exists(){return this.translator&&this.translator.exists(...arguments)}setDefaultNamespace(e){this.options.defaultNS=e}hasLoadedNamespace(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const r=n.lng||this.resolvedLanguage||this.languages[0],s=this.options?this.options.fallbackLng:!1,o=this.languages[this.languages.length-1];if(r.toLowerCase()==="cimode")return!0;const i=(a,l)=>{const c=this.services.backendConnector.state[`${a}|${l}`];return c===-1||c===0||c===2};if(n.precheck){const a=n.precheck(this,i);if(a!==void 0)return a}return!!(this.hasResourceBundle(r,e)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||i(r,e)&&(!s||i(o,e)))}loadNamespaces(e,n){const r=n0();return this.options.ns?(xn(e)&&(e=[e]),e.forEach(s=>{this.options.ns.indexOf(s)<0&&this.options.ns.push(s)}),this.loadResources(s=>{r.resolve(),n&&n(s)}),r):(n&&n(),Promise.resolve())}loadLanguages(e,n){const r=n0();xn(e)&&(e=[e]);const s=this.options.preload||[],o=e.filter(i=>s.indexOf(i)<0&&this.services.languageUtils.isSupportedCode(i));return o.length?(this.options.preload=s.concat(o),this.loadResources(i=>{r.resolve(),n&&n(i)}),r):(n&&n(),Promise.resolve())}dir(e){if(e||(e=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),!e)return"rtl";const n=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],r=this.services&&this.services.languageUtils||new ez(rz());return n.indexOf(r.getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;return new bg(e,n)}cloneInstance(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Hv;const r=e.forkResourceStore;r&&delete e.forkResourceStore;const s={...this.options,...e,isClone:!0},o=new bg(s);return(e.debug!==void 0||e.prefix!==void 0)&&(o.logger=o.logger.clone(e)),["store","services","language"].forEach(a=>{o[a]=this[a]}),o.services={...this.services},o.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},r&&(o.store=new QF(this.store.data,s),o.services.resourceStore=o.store),o.translator=new o3(o.services,s),o.translator.on("*",function(a){for(var l=arguments.length,c=new Array(l>1?l-1:0),u=1;u<l;u++)c[u-1]=arguments[u];o.emit(a,...c)}),o.init(s,n),o.translator.options=s,o.translator.backendConnector.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},o}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const vn=bg.createInstance();vn.createInstance=bg.createInstance;vn.createInstance;vn.dir;vn.init;vn.loadResources;vn.reloadResources;vn.use;vn.changeLanguage;vn.getFixedT;const Ih=vn.t;vn.exists;vn.setDefaultNamespace;vn.hasLoadedNamespace;vn.loadNamespaces;vn.loadLanguages;var rk,oz;function Wbe(){return oz||(oz=1,rk={area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0}),rk}var Ybe=Wbe();const Gbe=ks(Ybe);var Kbe=/\s([^'"/\s><]+?)[\s/>]|([^\s=]+)=\s?(".*?"|'.*?')/g;function iz(t){var e={type:"tag",name:"",voidElement:!1,attrs:{},children:[]},n=t.match(/<\/?([^\s]+?)[/\s>]/);if(n&&(e.name=n[1],(Gbe[n[1]]||t.charAt(t.length-2)==="/")&&(e.voidElement=!0),e.name.startsWith("!--"))){var r=t.indexOf("-->");return{type:"comment",comment:r!==-1?t.slice(4,r):""}}for(var s=new RegExp(Kbe),o=null;(o=s.exec(t))!==null;)if(o[0].trim())if(o[1]){var i=o[1].trim(),a=[i,""];i.indexOf("=")>-1&&(a=i.split("=")),e.attrs[a[0]]=a[1],s.lastIndex--}else o[2]&&(e.attrs[o[2]]=o[3].trim().substring(1,o[3].length-1));return e}var Xbe=/<[a-zA-Z0-9\-\!\/](?:"[^"]*"|'[^']*'|[^'">])*>/g,Zbe=/^\s*$/,Qbe=Object.create(null);function GZ(t,e){switch(e.type){case"text":return t+e.content;case"tag":return t+="<"+e.name+(e.attrs?(function(n){var r=[];for(var s in n)r.push(s+'="'+n[s]+'"');return r.length?" "+r.join(" "):""})(e.attrs):"")+(e.voidElement?"/>":">"),e.voidElement?t:t+e.children.reduce(GZ,"")+"</"+e.name+">";case"comment":return t+"<!--"+e.comment+"-->"}}var Jbe={parse:function(t,e){e||(e={}),e.components||(e.components=Qbe);var n,r=[],s=[],o=-1,i=!1;if(t.indexOf("<")!==0){var a=t.indexOf("<");r.push({type:"text",content:a===-1?t:t.substring(0,a)})}return t.replace(Xbe,function(l,c){if(i){if(l!=="</"+n.name+">")return;i=!1}var u,f=l.charAt(1)!=="/",h=l.startsWith("<!--"),m=c+l.length,y=t.charAt(m);if(h){var v=iz(l);return o<0?(r.push(v),r):((u=s[o]).children.push(v),r)}if(f&&(o++,(n=iz(l)).type==="tag"&&e.components[n.name]&&(n.type="component",i=!0),n.voidElement||i||!y||y==="<"||n.children.push({type:"text",content:t.slice(m,t.indexOf("<",m))}),o===0&&r.push(n),(u=s[o-1])&&u.children.push(n),s[o]=n),(!f||n.voidElement)&&(o>-1&&(n.voidElement||n.name===l.slice(2,-1))&&(o--,n=o===-1?r:s[o]),!i&&y!=="<"&&y)){u=o===-1?r:s[o].children;var b=t.indexOf("<",m),w=t.slice(m,b===-1?void 0:b);Zbe.test(w)&&(w=" "),(b>-1&&o+u.length>=0||w!==" ")&&u.push({type:"text",content:w})}}),r},stringify:function(t){return t.reduce(function(e,n){return e+GZ("",n)},"")}};function Zb(){if(console&&console.warn){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];typeof e[0]=="string"&&(e[0]=`react-i18next:: ${e[0]}`),console.warn(...e)}}const az={};function i3(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];typeof e[0]=="string"&&az[e[0]]||(typeof e[0]=="string"&&(az[e[0]]=new Date),Zb(...e))}const KZ=(t,e)=>()=>{if(t.isInitialized)e();else{const n=()=>{setTimeout(()=>{t.off("initialized",n)},0),e()};t.on("initialized",n)}};function lz(t,e,n){t.loadNamespaces(e,KZ(t,n))}function cz(t,e,n,r){typeof n=="string"&&(n=[n]),n.forEach(s=>{t.options.ns.indexOf(s)<0&&t.options.ns.push(s)}),t.loadLanguages(e,KZ(t,r))}function exe(t,e){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const r=e.languages[0],s=e.options?e.options.fallbackLng:!1,o=e.languages[e.languages.length-1];if(r.toLowerCase()==="cimode")return!0;const i=(a,l)=>{const c=e.services.backendConnector.state[`${a}|${l}`];return c===-1||c===2};return n.bindI18n&&n.bindI18n.indexOf("languageChanging")>-1&&e.services.backendConnector.backend&&e.isLanguageChangingTo&&!i(e.isLanguageChangingTo,t)?!1:!!(e.hasResourceBundle(r,t)||!e.services.backendConnector.backend||e.options.resources&&!e.options.partialBundledLanguages||i(r,t)&&(!s||i(o,t)))}function txe(t,e){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return!e.languages||!e.languages.length?(i3("i18n.languages were undefined or empty",e.languages),!0):e.options.ignoreJSONStructure!==void 0?e.hasLoadedNamespace(t,{lng:n.lng,precheck:(s,o)=>{if(n.bindI18n&&n.bindI18n.indexOf("languageChanging")>-1&&s.services.backendConnector.backend&&s.isLanguageChangingTo&&!o(s.isLanguageChangingTo,t))return!1}}):exe(t,e,n)}const nxe=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,rxe={"&amp;":"&","&#38;":"&","&lt;":"<","&#60;":"<","&gt;":">","&#62;":">","&apos;":"'","&#39;":"'","&quot;":'"',"&#34;":'"',"&nbsp;":" ","&#160;":" ","&copy;":"©","&#169;":"©","&reg;":"®","&#174;":"®","&hellip;":"…","&#8230;":"…","&#x2F;":"/","&#47;":"/"},sxe=t=>rxe[t],oxe=t=>t.replace(nxe,sxe);let QE={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:oxe};function ixe(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};QE={...QE,...t}}function XZ(){return QE}let ZZ;function axe(t){ZZ=t}function v_(){return ZZ}function sk(t,e){if(!t)return!1;const n=t.props?t.props.children:t.children;return e?n.length>0:!!n}function ok(t){if(!t)return[];const e=t.props?t.props.children:t.children;return t.props&&t.props.i18nIsDynamicList?kh(e):e}function lxe(t){return Object.prototype.toString.call(t)!=="[object Array]"?!1:t.every(e=>S.isValidElement(e))}function kh(t){return Array.isArray(t)?t:[t]}function cxe(t,e){const n={...e};return n.props=Object.assign(t.props,e.props),n}function QZ(t,e){if(!t)return"";let n="";const r=kh(t),s=e.transSupportBasicHtmlNodes&&e.transKeepBasicHtmlNodesFor?e.transKeepBasicHtmlNodesFor:[];return r.forEach((o,i)=>{if(typeof o=="string")n+=`${o}`;else if(S.isValidElement(o)){const a=Object.keys(o.props).length,l=s.indexOf(o.type)>-1,c=o.props.children;if(!c&&l&&a===0)n+=`<${o.type}/>`;else if(!c&&(!l||a!==0))n+=`<${i}></${i}>`;else if(o.props.i18nIsDynamicList)n+=`<${i}></${i}>`;else if(l&&a===1&&typeof c=="string")n+=`<${o.type}>${c}</${o.type}>`;else{const u=QZ(c,e);n+=`<${i}>${u}</${i}>`}}else if(o===null)Zb("Trans: the passed in value is invalid - seems you passed in a null child.");else if(typeof o=="object"){const{format:a,...l}=o,c=Object.keys(l);if(c.length===1){const u=a?`${c[0]}, ${a}`:c[0];n+=`{{${u}}}`}else Zb("react-i18next: the passed in object contained more than one variable - the object should look like {{ value, format }} where format is optional.",o)}else Zb("Trans: the passed in value is invalid - seems you passed in a variable like {number} - please pass in variables for interpolation as full objects like {{number}}.",o)}),n}function uxe(t,e,n,r,s,o){if(e==="")return[];const i=r.transKeepBasicHtmlNodesFor||[],a=e&&new RegExp(i.map(b=>`<${b}`).join("|")).test(e);if(!t&&!a&&!o)return[e];const l={};function c(b){kh(b).forEach(C=>{typeof C!="string"&&(sk(C)?c(ok(C)):typeof C=="object"&&!S.isValidElement(C)&&Object.assign(l,C))})}c(t);const u=Jbe.parse(`<0>${e}</0>`),f={...l,...s};function h(b,w,C){const k=ok(b),E=y(k,w.children,C);return lxe(k)&&E.length===0||b.props&&b.props.i18nIsDynamicList?k:E}function m(b,w,C,k,E){b.dummy?(b.children=w,C.push(S.cloneElement(b,{key:k},E?void 0:w))):C.push(...S.Children.map([b],j=>{const A={...j.props};return delete A.i18nIsDynamicList,It.createElement(j.type,Zh({},A,{key:k,ref:j.ref},E?{}:{children:w}))}))}function y(b,w,C){const k=kh(b);return kh(w).reduce((j,A,M)=>{const _=A.children&&A.children[0]&&A.children[0].content&&n.services.interpolator.interpolate(A.children[0].content,f,n.language);if(A.type==="tag"){let D=k[parseInt(A.name,10)];C.length===1&&!D&&(D=C[0][A.name]),D||(D={});const R=Object.keys(A.attrs).length!==0?cxe({props:A.attrs},D):D,N=S.isValidElement(R),z=N&&sk(A,!0)&&!A.voidElement,B=a&&typeof R=="object"&&R.dummy&&!N,L=typeof t=="object"&&t!==null&&Object.hasOwnProperty.call(t,A.name);if(typeof R=="string"){const P=n.services.interpolator.interpolate(R,f,n.language);j.push(P)}else if(sk(R)||z){const P=h(R,A,C);m(R,P,j,M)}else if(B){const P=y(k,A.children,C);m(R,P,j,M)}else if(Number.isNaN(parseFloat(A.name)))if(L){const P=h(R,A,C);m(R,P,j,M,A.voidElement)}else if(r.transSupportBasicHtmlNodes&&i.indexOf(A.name)>-1)if(A.voidElement)j.push(S.createElement(A.name,{key:`${A.name}-${M}`}));else{const P=y(k,A.children,C);j.push(S.createElement(A.name,{key:`${A.name}-${M}`},P))}else if(A.voidElement)j.push(`<${A.name} />`);else{const P=y(k,A.children,C);j.push(`<${A.name}>${P}</${A.name}>`)}else if(typeof R=="object"&&!N){const P=A.children[0]?_:null;P&&j.push(P)}else m(R,_,j,M,A.children.length!==1||!_)}else if(A.type==="text"){const D=r.transWrapTextNodes,R=o?r.unescape(n.services.interpolator.interpolate(A.content,f,n.language)):n.services.interpolator.interpolate(A.content,f,n.language);D?j.push(S.createElement(D,{key:`${A.name}-${M}`},R)):j.push(R)}return j},[])}const v=y([{dummy:!0,children:t||[]}],u,kh(t||[]));return ok(v[0])}function dxe(t){let{children:e,count:n,parent:r,i18nKey:s,context:o,tOptions:i={},values:a,defaults:l,components:c,ns:u,i18n:f,t:h,shouldUnescape:m,...y}=t;const v=f||v_();if(!v)return i3("You will need to pass in an i18next instance by using i18nextReactModule"),e;const b=h||v.t.bind(v)||(z=>z);o&&(i.context=o);const w={...XZ(),...v.options&&v.options.react};let C=u||b.ns||v.options&&v.options.defaultNS;C=typeof C=="string"?[C]:C||["translation"];const k=QZ(e,w),E=l||k||w.transEmptyNodeValue||s,{hashTransKey:j}=w,A=s||(j?j(k||E):k||E);v.options&&v.options.interpolation&&v.options.interpolation.defaultVariables&&(a=a&&Object.keys(a).length>0?{...a,...v.options.interpolation.defaultVariables}:{...v.options.interpolation.defaultVariables});const M=a?i.interpolation:{interpolation:{...i.interpolation,prefix:"#$?",suffix:"?$#"}},_={...i,count:n,...a,...M,defaultValue:E,ns:C},D=A?b(A,_):E;c&&Object.keys(c).forEach(z=>{const B=c[z];if(typeof B.type=="function"||!B.props||!B.props.children||D.indexOf(`${z}/>`)<0&&D.indexOf(`${z} />`)<0)return;function L(){return It.createElement(It.Fragment,null,B)}c[z]=It.createElement(L,null)});const R=uxe(c||e,D,v,w,_,m),N=r!==void 0?r:w.defaultTransParent;return N?S.createElement(N,y,R):R}const fxe={type:"3rdParty",init(t){ixe(t.options.react),axe(t)}},JZ=S.createContext();class pxe{constructor(){this.usedNamespaces={}}addUsedNamespaces(e){e.forEach(n=>{this.usedNamespaces[n]||(this.usedNamespaces[n]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}function S2(t){let{children:e,count:n,parent:r,i18nKey:s,context:o,tOptions:i={},values:a,defaults:l,components:c,ns:u,i18n:f,t:h,shouldUnescape:m,...y}=t;const{i18n:v,defaultNS:b}=S.useContext(JZ)||{},w=f||v||v_(),C=h||w&&w.t.bind(w);return dxe({children:e,count:n,parent:r,i18nKey:s,context:o,tOptions:i,values:a,defaults:l,components:c,ns:u||C&&C.ns||b||w&&w.options&&w.options.defaultNS,i18n:w,t:h,shouldUnescape:m,...y})}const hxe=(t,e)=>{const n=S.useRef();return S.useEffect(()=>{n.current=t},[t,e]),n.current};function Le(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const{i18n:n}=e,{i18n:r,defaultNS:s}=S.useContext(JZ)||{},o=n||r||v_();if(o&&!o.reportNamespaces&&(o.reportNamespaces=new pxe),!o){i3("You will need to pass in an i18next instance by using initReactI18next");const k=(j,A)=>typeof A=="string"?A:A&&typeof A=="object"&&typeof A.defaultValue=="string"?A.defaultValue:Array.isArray(j)?j[j.length-1]:j,E=[k,{},!1];return E.t=k,E.i18n={},E.ready=!1,E}o.options.react&&o.options.react.wait!==void 0&&i3("It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");const i={...XZ(),...o.options.react,...e},{useSuspense:a,keyPrefix:l}=i;let c=t||s||o.options&&o.options.defaultNS;c=typeof c=="string"?[c]:c||["translation"],o.reportNamespaces.addUsedNamespaces&&o.reportNamespaces.addUsedNamespaces(c);const u=(o.isInitialized||o.initializedStoreOnce)&&c.every(k=>txe(k,o,i));function f(){return o.getFixedT(e.lng||null,i.nsMode==="fallback"?c:c[0],l)}const[h,m]=S.useState(f);let y=c.join();e.lng&&(y=`${e.lng}${y}`);const v=hxe(y),b=S.useRef(!0);S.useEffect(()=>{const{bindI18n:k,bindI18nStore:E}=i;b.current=!0,!u&&!a&&(e.lng?cz(o,e.lng,c,()=>{b.current&&m(f)}):lz(o,c,()=>{b.current&&m(f)})),u&&v&&v!==y&&b.current&&m(f);function j(){b.current&&m(f)}return k&&o&&o.on(k,j),E&&o&&o.store.on(E,j),()=>{b.current=!1,k&&o&&k.split(" ").forEach(A=>o.off(A,j)),E&&o&&E.split(" ").forEach(A=>o.store.off(A,j))}},[o,y]);const w=S.useRef(!0);S.useEffect(()=>{b.current&&!w.current&&m(f),w.current=!1},[o,l]);const C=[h,o,u];if(C.t=h,C.i18n=o,C.ready=u,u||!u&&!a)return C;throw new Promise(k=>{e.lng?cz(o,e.lng,c,()=>k()):lz(o,c,()=>k())})}var mxe=Object.defineProperty,gxe=(t,e,n)=>e in t?mxe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,a3=(t,e,n)=>gxe(t,typeof e!="symbol"?e+"":e,n);const yxe={accent:Iv("#339AF0"),primary:Iv(["#f7f7f7","#f7f7f7","#f7f7f7","#f7f7f7","#f7f7f7","#f7f7f7","#343a40","#f7f7f7","#f7f7f7","#f7f7f7"]),secondary:Iv("#868e96"),warning:Iv("#FA5252"),grey:["#F7F9FB","#EEF3F9","#E6EDF5","#DAE3ED","#C9D3E0","#A9B4C6","#818DA1","#4C576A","#31394A","#1E232E"]},vxe={cursorType:"pointer",colors:yxe},An={DiskFileShared:1,DiskFileCommented:2,DiskFileMentioned:3,DiskFileUploaded:23,DiskFilePermissionGranted:24,DiskFileDownloadReady:25,DiskLinkGenerated:26,DiskDirectoryShared:200,DiskRoomShared:201,ProjectShared:400,ProjectTaskCreated:401,ProjectTaskDeleted:402,ProjectTaskUpdated:403,ProjectTaskMoved:404,ProjectTaskStatusChanged:405,ProjectTaskCommented:406,ProjectMyTaskDeleted:420,ProjectMyTaskUpdated:421,ProjectMyTaskMoved:422,ProjectMyTaskStatusChanged:423,ProjectMyTaskCommented:424,ProjectTaskUnassigned:425,ProjectTaskAssigned:426,ProjectTaskMentioned:427,ProjectTaskAttachmentAdded:429,ProjectSprintCreated:450,AdminRoleAssigned:500,AdminRoleDeleted:501,MailMessageImportant:550,MailMessageReceived:551,CalendarShared:600,CalendarEventCanceled:601,CalendarEventInvited:602,CalendarEventUpdated:603,CalendarEventUpcoming:604},dc={Unread:0,Read:1},eQ=()=>{const{colorScheme:t}=eK();return{isDark:t==="dark",colorScheme:t}},C2=({children:t})=>d.jsx(bt,{gap:2,w:"100%",style:{flexGrow:1},children:t});function tQ(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Qb={exports:{}},bxe=Qb.exports,uz;function nQ(){return uz||(uz=1,(function(t,e){(function(n,r){t.exports=r()})(bxe,function(){var n=1e3,r=6e4,s=36e5,o="millisecond",i="second",a="minute",l="hour",c="day",u="week",f="month",h="quarter",m="year",y="date",v="Invalid Date",b=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,w=/\[([^\]]+)]|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,C={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(L){var P=["th","st","nd","rd"],I=L%100;return"["+L+(P[(I-20)%10]||P[I]||P[0])+"]"}},k=function(L,P,I){var H=String(L);return!H||H.length>=P?L:""+Array(P+1-H.length).join(I)+L},E={s:k,z:function(L){var P=-L.utcOffset(),I=Math.abs(P),H=Math.floor(I/60),$=I%60;return(P<=0?"+":"-")+k(H,2,"0")+":"+k($,2,"0")},m:function L(P,I){if(P.date()<I.date())return-L(I,P);var H=12*(I.year()-P.year())+(I.month()-P.month()),$=P.clone().add(H,f),V=I-$<0,q=P.clone().add(H+(V?-1:1),f);return+(-(H+(I-$)/(V?$-q:q-$))||0)},a:function(L){return L<0?Math.ceil(L)||0:Math.floor(L)},p:function(L){return{M:f,y:m,w:u,d:c,D:y,h:l,m:a,s:i,ms:o,Q:h}[L]||String(L||"").toLowerCase().replace(/s$/,"")},u:function(L){return L===void 0}},j="en",A={};A[j]=C;var M="$isDayjsObject",_=function(L){return L instanceof z||!(!L||!L[M])},D=function L(P,I,H){var $;if(!P)return j;if(typeof P=="string"){var V=P.toLowerCase();A[V]&&($=V),I&&(A[V]=I,$=V);var q=P.split("-");if(!$&&q.length>1)return L(q[0])}else{var U=P.name;A[U]=P,$=U}return!H&&$&&(j=$),$||!H&&j},R=function(L,P){if(_(L))return L.clone();var I=typeof P=="object"?P:{};return I.date=L,I.args=arguments,new z(I)},N=E;N.l=D,N.i=_,N.w=function(L,P){return R(L,{locale:P.$L,utc:P.$u,x:P.$x,$offset:P.$offset})};var z=(function(){function L(I){this.$L=D(I.locale,null,!0),this.parse(I),this.$x=this.$x||I.x||{},this[M]=!0}var P=L.prototype;return P.parse=function(I){this.$d=(function(H){var $=H.date,V=H.utc;if($===null)return new Date(NaN);if(N.u($))return new Date;if($ instanceof Date)return new Date($);if(typeof $=="string"&&!/Z$/i.test($)){var q=$.match(b);if(q){var U=q[2]-1||0,W=(q[7]||"0").substring(0,3);return V?new Date(Date.UTC(q[1],U,q[3]||1,q[4]||0,q[5]||0,q[6]||0,W)):new Date(q[1],U,q[3]||1,q[4]||0,q[5]||0,q[6]||0,W)}}return new Date($)})(I),this.init()},P.init=function(){var I=this.$d;this.$y=I.getFullYear(),this.$M=I.getMonth(),this.$D=I.getDate(),this.$W=I.getDay(),this.$H=I.getHours(),this.$m=I.getMinutes(),this.$s=I.getSeconds(),this.$ms=I.getMilliseconds()},P.$utils=function(){return N},P.isValid=function(){return this.$d.toString()!==v},P.isSame=function(I,H){var $=R(I);return this.startOf(H)<=$&&$<=this.endOf(H)},P.isAfter=function(I,H){return R(I)<this.startOf(H)},P.isBefore=function(I,H){return this.endOf(H)<R(I)},P.$g=function(I,H,$){return N.u(I)?this[H]:this.set($,I)},P.unix=function(){return Math.floor(this.valueOf()/1e3)},P.valueOf=function(){return this.$d.getTime()},P.startOf=function(I,H){var $=this,V=!!N.u(H)||H,q=N.p(I),U=function(ne,se){var ce=N.w($.$u?Date.UTC($.$y,se,ne):new Date($.$y,se,ne),$);return V?ce:ce.endOf(c)},W=function(ne,se){return N.w($.toDate()[ne].apply($.toDate("s"),(V?[0,0,0,0]:[23,59,59,999]).slice(se)),$)},Y=this.$W,G=this.$M,K=this.$D,Q="set"+(this.$u?"UTC":"");switch(q){case m:return V?U(1,0):U(31,11);case f:return V?U(1,G):U(0,G+1);case u:var Z=this.$locale().weekStart||0,J=(Y<Z?Y+7:Y)-Z;return U(V?K-J:K+(6-J),G);case c:case y:return W(Q+"Hours",0);case l:return W(Q+"Minutes",1);case a:return W(Q+"Seconds",2);case i:return W(Q+"Milliseconds",3);default:return this.clone()}},P.endOf=function(I){return this.startOf(I,!1)},P.$set=function(I,H){var $,V=N.p(I),q="set"+(this.$u?"UTC":""),U=($={},$[c]=q+"Date",$[y]=q+"Date",$[f]=q+"Month",$[m]=q+"FullYear",$[l]=q+"Hours",$[a]=q+"Minutes",$[i]=q+"Seconds",$[o]=q+"Milliseconds",$)[V],W=V===c?this.$D+(H-this.$W):H;if(V===f||V===m){var Y=this.clone().set(y,1);Y.$d[U](W),Y.init(),this.$d=Y.set(y,Math.min(this.$D,Y.daysInMonth())).$d}else U&&this.$d[U](W);return this.init(),this},P.set=function(I,H){return this.clone().$set(I,H)},P.get=function(I){return this[N.p(I)]()},P.add=function(I,H){var $,V=this;I=Number(I);var q=N.p(H),U=function(G){var K=R(V);return N.w(K.date(K.date()+Math.round(G*I)),V)};if(q===f)return this.set(f,this.$M+I);if(q===m)return this.set(m,this.$y+I);if(q===c)return U(1);if(q===u)return U(7);var W=($={},$[a]=r,$[l]=s,$[i]=n,$)[q]||1,Y=this.$d.getTime()+I*W;return N.w(Y,this)},P.subtract=function(I,H){return this.add(-1*I,H)},P.format=function(I){var H=this,$=this.$locale();if(!this.isValid())return $.invalidDate||v;var V=I||"YYYY-MM-DDTHH:mm:ssZ",q=N.z(this),U=this.$H,W=this.$m,Y=this.$M,G=$.weekdays,K=$.months,Q=$.meridiem,Z=function(se,ce,fe,le){return se&&(se[ce]||se(H,V))||fe[ce].slice(0,le)},J=function(se){return N.s(U%12||12,se,"0")},ne=Q||function(se,ce,fe){var le=se<12?"AM":"PM";return fe?le.toLowerCase():le};return V.replace(w,function(se,ce){return ce||(function(fe){switch(fe){case"YY":return String(H.$y).slice(-2);case"YYYY":return N.s(H.$y,4,"0");case"M":return Y+1;case"MM":return N.s(Y+1,2,"0");case"MMM":return Z($.monthsShort,Y,K,3);case"MMMM":return Z(K,Y);case"D":return H.$D;case"DD":return N.s(H.$D,2,"0");case"d":return String(H.$W);case"dd":return Z($.weekdaysMin,H.$W,G,2);case"ddd":return Z($.weekdaysShort,H.$W,G,3);case"dddd":return G[H.$W];case"H":return String(U);case"HH":return N.s(U,2,"0");case"h":return J(1);case"hh":return J(2);case"a":return ne(U,W,!0);case"A":return ne(U,W,!1);case"m":return String(W);case"mm":return N.s(W,2,"0");case"s":return String(H.$s);case"ss":return N.s(H.$s,2,"0");case"SSS":return N.s(H.$ms,3,"0");case"Z":return q}return null})(se)||q.replace(":","")})},P.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},P.diff=function(I,H,$){var V,q=this,U=N.p(H),W=R(I),Y=(W.utcOffset()-this.utcOffset())*r,G=this-W,K=function(){return N.m(q,W)};switch(U){case m:V=K()/12;break;case f:V=K();break;case h:V=K()/3;break;case u:V=(G-Y)/6048e5;break;case c:V=(G-Y)/864e5;break;case l:V=G/s;break;case a:V=G/r;break;case i:V=G/n;break;default:V=G}return $?V:N.a(V)},P.daysInMonth=function(){return this.endOf(f).$D},P.$locale=function(){return A[this.$L]},P.locale=function(I,H){if(!I)return this.$L;var $=this.clone(),V=D(I,H,!0);return V&&($.$L=V),$},P.clone=function(){return N.w(this.$d,this)},P.toDate=function(){return new Date(this.valueOf())},P.toJSON=function(){return this.isValid()?this.toISOString():null},P.toISOString=function(){return this.$d.toISOString()},P.toString=function(){return this.$d.toUTCString()},L})(),B=z.prototype;return R.prototype=B,[["$ms",o],["$s",i],["$m",a],["$H",l],["$W",c],["$M",f],["$y",m],["$D",y]].forEach(function(L){B[L[1]]=function(P){return this.$g(P,L[0],L[1])}}),R.extend=function(L,P){return L.$i||(L(P,z,R),L.$i=!0),R},R.locale=D,R.isDayjs=_,R.unix=function(L){return R(1e3*L)},R.en=A[j],R.Ls=A,R.p={},R})})(Qb)),Qb.exports}var xxe=nQ();const Oh=tQ(xxe);var Jb={exports:{}},wxe=Jb.exports,dz;function Sxe(){return dz||(dz=1,(function(t,e){(function(n,r){t.exports=r(nQ())})(wxe,function(n){function r(y){return y&&typeof y=="object"&&"default"in y?y:{default:y}}var s=r(n),o="января_февраля_марта_апреля_мая_июня_июля_августа_сентября_октября_ноября_декабря".split("_"),i="январь_февраль_март_апрель_май_июнь_июль_август_сентябрь_октябрь_ноябрь_декабрь".split("_"),a="янв._февр._мар._апр._мая_июня_июля_авг._сент._окт._нояб._дек.".split("_"),l="янв._февр._март_апр._май_июнь_июль_авг._сент._окт._нояб._дек.".split("_"),c=/D[oD]?(\[[^[\]]*\]|\s)+MMMM?/;function u(y,v,b){var w,C;return b==="m"?v?"минута":"минуту":y+" "+(w=+y,C={mm:v?"минута_минуты_минут":"минуту_минуты_минут",hh:"час_часа_часов",dd:"день_дня_дней",MM:"месяц_месяца_месяцев",yy:"год_года_лет"}[b].split("_"),w%10==1&&w%100!=11?C[0]:w%10>=2&&w%10<=4&&(w%100<10||w%100>=20)?C[1]:C[2])}var f=function(y,v){return c.test(v)?o[y.month()]:i[y.month()]};f.s=i,f.f=o;var h=function(y,v){return c.test(v)?a[y.month()]:l[y.month()]};h.s=l,h.f=a;var m={name:"ru",weekdays:"воскресенье_понедельник_вторник_среда_четверг_пятница_суббота".split("_"),weekdaysShort:"вск_пнд_втр_срд_чтв_птн_сбт".split("_"),weekdaysMin:"вс_пн_вт_ср_чт_пт_сб".split("_"),months:f,monthsShort:h,weekStart:1,yearStart:4,formats:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY г.",LLL:"D MMMM YYYY г., H:mm",LLLL:"dddd, D MMMM YYYY г., H:mm"},relativeTime:{future:"через %s",past:"%s назад",s:"несколько секунд",m:u,mm:u,h:"час",hh:u,d:"день",dd:u,M:"месяц",MM:u,y:"год",yy:u},ordinal:function(y){return y},meridiem:function(y){return y<4?"ночи":y<12?"утра":y<17?"дня":"вечера"}};return s.default.locale(m,null,!0),m})})(Jb)),Jb.exports}Sxe();const Cxe=t=>{if(!t)return"";const e=vn.language.split("-")[0];Oh.locale(e);const n=Oh(t),r=Oh();if(n.isSame(r,"day"))return new Intl.DateTimeFormat(e,{hour:"2-digit",minute:"2-digit"}).format(n.toDate());if(n.isSame(r,"year")){const i=new Intl.DateTimeFormat(e,{day:"numeric",month:"long"}).format(n.toDate()),[a,l]=i.split(" "),c=l.length>4?l.slice(0,3)+".":l;return`${a} ${c}`}return new Intl.DateTimeFormat(e).format(n.toDate())},kxe=t=>{if(!t||typeof t!="string")return 0;const e=t.trim();if(e.includes(".")){const[r,...s]=e.split("."),o=parseInt(r,10);if(isNaN(o))return 0;if(s.length>0){const a=s.join(".").split(":").map(l=>parseInt(l,10));if(a.some(l=>isNaN(l)))return 0;if(a.length===3){const[l,c,u]=a;return o*86400+l*3600+c*60+u}}return o*86400}const n=e.split(":").map(r=>parseInt(r,10));if(n.some(r=>isNaN(r)))return 0;if(n.length===2){const[r,s]=n;return r*60+s}else if(n.length===3){const[r,s,o]=n;return r*3600+s*60+o}else if(n.length===4){const[r,s,o,i]=n;return r*86400+s*3600+o*60+i}return 0};function JE(t){return`Minified Redux error #${t}; visit https://redux.js.org/Errors?code=${t} for the full message or use the non-minified dev environment for full errors. `}var ik=()=>Math.random().toString(36).substring(7).split("").join("."),Exe={INIT:`@@redux/INIT${ik()}`,REPLACE:`@@redux/REPLACE${ik()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${ik()}`},fz=Exe;function ad(t){if(typeof t!="object"||t===null)return!1;let e=t;for(;Object.getPrototypeOf(e)!==null;)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e||Object.getPrototypeOf(t)===null}function Txe(t){Object.keys(t).forEach(e=>{const n=t[e];if(typeof n(void 0,{type:fz.INIT})>"u")throw new Error(JE(12));if(typeof n(void 0,{type:fz.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(JE(13))})}function Mxe(t){const e=Object.keys(t),n={};for(let o=0;o<e.length;o++){const i=e[o];typeof t[i]=="function"&&(n[i]=t[i])}const r=Object.keys(n);let s;try{Txe(n)}catch(o){s=o}return function(i={},a){if(s)throw s;let l=!1;const c={};for(let u=0;u<r.length;u++){const f=r[u],h=n[f],m=i[f],y=h(m,a);if(typeof y>"u")throw a&&a.type,new Error(JE(14));c[f]=y,l=l||y!==m}return l=l||r.length!==Object.keys(i).length,l?c:i}}function rQ(t){return ad(t)&&"type"in t&&typeof t.type=="string"}var b_=Symbol.for("immer-nothing"),U0=Symbol.for("immer-draftable"),ni=Symbol.for("immer-state");function Js(t,...e){throw new Error(`[Immer] minified error nr: ${t}. Full error at: https://bit.ly/3cXEKWf`)}var $f=Object.getPrototypeOf;function Tl(t){return!!t&&!!t[ni]}function Na(t){var e;return t?sQ(t)||Array.isArray(t)||!!t[U0]||!!((e=t.constructor)!=null&&e[U0])||k2(t)||E2(t):!1}var jxe=Object.prototype.constructor.toString();function sQ(t){if(!t||typeof t!="object")return!1;const e=$f(t);if(e===null)return!0;const n=Object.hasOwnProperty.call(e,"constructor")&&e.constructor;return n===Object?!0:typeof n=="function"&&Function.toString.call(n)===jxe}function Axe(t){return Tl(t)||Js(15,t),t[ni].base_}function xg(t,e){Ff(t)===0?Reflect.ownKeys(t).forEach(n=>{e(n,t[n],t)}):t.forEach((n,r)=>e(r,n,t))}function Ff(t){const e=t[ni];return e?e.type_:Array.isArray(t)?1:k2(t)?2:E2(t)?3:0}function wg(t,e){return Ff(t)===2?t.has(e):Object.prototype.hasOwnProperty.call(t,e)}function ak(t,e){return Ff(t)===2?t.get(e):t[e]}function oQ(t,e,n){const r=Ff(t);r===2?t.set(e,n):r===3?t.add(n):t[e]=n}function _xe(t,e){return t===e?t!==0||1/t===1/e:t!==t&&e!==e}function k2(t){return t instanceof Map}function E2(t){return t instanceof Set}function sf(t){return t.copy_||t.base_}function eT(t,e){if(k2(t))return new Map(t);if(E2(t))return new Set(t);if(Array.isArray(t))return Array.prototype.slice.call(t);const n=sQ(t);if(e===!0||e==="class_only"&&!n){const r=Object.getOwnPropertyDescriptors(t);delete r[ni];let s=Reflect.ownKeys(r);for(let o=0;o<s.length;o++){const i=s[o],a=r[i];a.writable===!1&&(a.writable=!0,a.configurable=!0),(a.get||a.set)&&(r[i]={configurable:!0,writable:!0,enumerable:a.enumerable,value:t[i]})}return Object.create($f(t),r)}else{const r=$f(t);if(r!==null&&n)return{...t};const s=Object.create(r);return Object.assign(s,t)}}function x_(t,e=!1){return z4(t)||Tl(t)||!Na(t)||(Ff(t)>1&&(t.set=t.add=t.clear=t.delete=Rxe),Object.freeze(t),e&&Object.entries(t).forEach(([n,r])=>x_(r,!0))),t}function Rxe(){Js(2)}function z4(t){return Object.isFrozen(t)}var tT={};function zf(t){const e=tT[t];return e||Js(0,t),e}function Dxe(t,e){tT[t]||(tT[t]=e)}var Sg;function iQ(){return Sg}function Ixe(t,e){return{drafts_:[],parent_:t,immer_:e,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function pz(t,e){e&&(zf("Patches"),t.patches_=[],t.inversePatches_=[],t.patchListener_=e)}function nT(t){rT(t),t.drafts_.forEach(Oxe),t.drafts_=null}function rT(t){t===Sg&&(Sg=t.parent_)}function hz(t){return Sg=Ixe(Sg,t)}function Oxe(t){const e=t[ni];e.type_===0||e.type_===1?e.revoke_():e.revoked_=!0}function mz(t,e){e.unfinalizedDrafts_=e.drafts_.length;const n=e.drafts_[0];return t!==void 0&&t!==n?(n[ni].modified_&&(nT(e),Js(4)),Na(t)&&(t=l3(e,t),e.parent_||c3(e,t)),e.patches_&&zf("Patches").generateReplacementPatches_(n[ni].base_,t,e.patches_,e.inversePatches_)):t=l3(e,n,[]),nT(e),e.patches_&&e.patchListener_(e.patches_,e.inversePatches_),t!==b_?t:void 0}function l3(t,e,n){if(z4(e))return e;const r=e[ni];if(!r)return xg(e,(s,o)=>gz(t,r,e,s,o,n)),e;if(r.scope_!==t)return e;if(!r.modified_)return c3(t,r.base_,!0),r.base_;if(!r.finalized_){r.finalized_=!0,r.scope_.unfinalizedDrafts_--;const s=r.copy_;let o=s,i=!1;r.type_===3&&(o=new Set(s),s.clear(),i=!0),xg(o,(a,l)=>gz(t,r,s,a,l,n,i)),c3(t,s,!1),n&&t.patches_&&zf("Patches").generatePatches_(r,n,t.patches_,t.inversePatches_)}return r.copy_}function gz(t,e,n,r,s,o,i){if(Tl(s)){const a=o&&e&&e.type_!==3&&!wg(e.assigned_,r)?o.concat(r):void 0,l=l3(t,s,a);if(oQ(n,r,l),Tl(l))t.canAutoFreeze_=!1;else return}else i&&n.add(s);if(Na(s)&&!z4(s)){if(!t.immer_.autoFreeze_&&t.unfinalizedDrafts_<1)return;l3(t,s),(!e||!e.scope_.parent_)&&typeof r!="symbol"&&Object.prototype.propertyIsEnumerable.call(n,r)&&c3(t,s)}}function c3(t,e,n=!1){!t.parent_&&t.immer_.autoFreeze_&&t.canAutoFreeze_&&x_(e,n)}function Nxe(t,e){const n=Array.isArray(t),r={type_:n?1:0,scope_:e?e.scope_:iQ(),modified_:!1,finalized_:!1,assigned_:{},parent_:e,base_:t,draft_:null,copy_:null,revoke_:null,isManual_:!1};let s=r,o=w_;n&&(s=[r],o=Cg);const{revoke:i,proxy:a}=Proxy.revocable(s,o);return r.draft_=a,r.revoke_=i,a}var w_={get(t,e){if(e===ni)return t;const n=sf(t);if(!wg(n,e))return Lxe(t,n,e);const r=n[e];return t.finalized_||!Na(r)?r:r===lk(t.base_,e)?(ck(t),t.copy_[e]=oT(r,t)):r},has(t,e){return e in sf(t)},ownKeys(t){return Reflect.ownKeys(sf(t))},set(t,e,n){const r=aQ(sf(t),e);if(r!=null&&r.set)return r.set.call(t.draft_,n),!0;if(!t.modified_){const s=lk(sf(t),e),o=s==null?void 0:s[ni];if(o&&o.base_===n)return t.copy_[e]=n,t.assigned_[e]=!1,!0;if(_xe(n,s)&&(n!==void 0||wg(t.base_,e)))return!0;ck(t),sT(t)}return t.copy_[e]===n&&(n!==void 0||e in t.copy_)||Number.isNaN(n)&&Number.isNaN(t.copy_[e])||(t.copy_[e]=n,t.assigned_[e]=!0),!0},deleteProperty(t,e){return lk(t.base_,e)!==void 0||e in t.base_?(t.assigned_[e]=!1,ck(t),sT(t)):delete t.assigned_[e],t.copy_&&delete t.copy_[e],!0},getOwnPropertyDescriptor(t,e){const n=sf(t),r=Reflect.getOwnPropertyDescriptor(n,e);return r&&{writable:!0,configurable:t.type_!==1||e!=="length",enumerable:r.enumerable,value:n[e]}},defineProperty(){Js(11)},getPrototypeOf(t){return $f(t.base_)},setPrototypeOf(){Js(12)}},Cg={};xg(w_,(t,e)=>{Cg[t]=function(){return arguments[0]=arguments[0][0],e.apply(this,arguments)}});Cg.deleteProperty=function(t,e){return Cg.set.call(this,t,e,void 0)};Cg.set=function(t,e,n){return w_.set.call(this,t[0],e,n,t[0])};function lk(t,e){const n=t[ni];return(n?sf(n):t)[e]}function Lxe(t,e,n){var r;const s=aQ(e,n);return s?"value"in s?s.value:(r=s.get)==null?void 0:r.call(t.draft_):void 0}function aQ(t,e){if(!(e in t))return;let n=$f(t);for(;n;){const r=Object.getOwnPropertyDescriptor(n,e);if(r)return r;n=$f(n)}}function sT(t){t.modified_||(t.modified_=!0,t.parent_&&sT(t.parent_))}function ck(t){t.copy_||(t.copy_=eT(t.base_,t.scope_.immer_.useStrictShallowCopy_))}var $xe=class{constructor(t){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(e,n,r)=>{if(typeof e=="function"&&typeof n!="function"){const o=n;n=e;const i=this;return function(l=o,...c){return i.produce(l,u=>n.call(this,u,...c))}}typeof n!="function"&&Js(6),r!==void 0&&typeof r!="function"&&Js(7);let s;if(Na(e)){const o=hz(this),i=oT(e,void 0);let a=!0;try{s=n(i),a=!1}finally{a?nT(o):rT(o)}return pz(o,r),mz(s,o)}else if(!e||typeof e!="object"){if(s=n(e),s===void 0&&(s=e),s===b_&&(s=void 0),this.autoFreeze_&&x_(s,!0),r){const o=[],i=[];zf("Patches").generateReplacementPatches_(e,s,o,i),r(o,i)}return s}else Js(1,e)},this.produceWithPatches=(e,n)=>{if(typeof e=="function")return(i,...a)=>this.produceWithPatches(i,l=>e(l,...a));let r,s;return[this.produce(e,n,(i,a)=>{r=i,s=a}),r,s]},typeof(t==null?void 0:t.autoFreeze)=="boolean"&&this.setAutoFreeze(t.autoFreeze),typeof(t==null?void 0:t.useStrictShallowCopy)=="boolean"&&this.setUseStrictShallowCopy(t.useStrictShallowCopy)}createDraft(t){Na(t)||Js(8),Tl(t)&&(t=Fxe(t));const e=hz(this),n=oT(t,void 0);return n[ni].isManual_=!0,rT(e),n}finishDraft(t,e){const n=t&&t[ni];(!n||!n.isManual_)&&Js(9);const{scope_:r}=n;return pz(r,e),mz(void 0,r)}setAutoFreeze(t){this.autoFreeze_=t}setUseStrictShallowCopy(t){this.useStrictShallowCopy_=t}applyPatches(t,e){let n;for(n=e.length-1;n>=0;n--){const s=e[n];if(s.path.length===0&&s.op==="replace"){t=s.value;break}}n>-1&&(e=e.slice(n+1));const r=zf("Patches").applyPatches_;return Tl(t)?r(t,e):this.produce(t,s=>r(s,e))}};function oT(t,e){const n=k2(t)?zf("MapSet").proxyMap_(t,e):E2(t)?zf("MapSet").proxySet_(t,e):Nxe(t,e);return(e?e.scope_:iQ()).drafts_.push(n),n}function Fxe(t){return Tl(t)||Js(10,t),lQ(t)}function lQ(t){if(!Na(t)||z4(t))return t;const e=t[ni];let n;if(e){if(!e.modified_)return e.base_;e.finalized_=!0,n=eT(t,e.scope_.immer_.useStrictShallowCopy_)}else n=eT(t,!0);return xg(n,(r,s)=>{oQ(n,r,lQ(s))}),e&&(e.finalized_=!1),n}function zxe(){const e="replace",r="remove";function s(h,m,y,v){switch(h.type_){case 0:case 2:return i(h,m,y,v);case 1:return o(h,m,y,v);case 3:return a(h,m,y,v)}}function o(h,m,y,v){let{base_:b,assigned_:w}=h,C=h.copy_;C.length<b.length&&([b,C]=[C,b],[y,v]=[v,y]);for(let k=0;k<b.length;k++)if(w[k]&&C[k]!==b[k]){const E=m.concat([k]);y.push({op:e,path:E,value:f(C[k])}),v.push({op:e,path:E,value:f(b[k])})}for(let k=b.length;k<C.length;k++){const E=m.concat([k]);y.push({op:"add",path:E,value:f(C[k])})}for(let k=C.length-1;b.length<=k;--k){const E=m.concat([k]);v.push({op:r,path:E})}}function i(h,m,y,v){const{base_:b,copy_:w}=h;xg(h.assigned_,(C,k)=>{const E=ak(b,C),j=ak(w,C),A=k?wg(b,C)?e:"add":r;if(E===j&&A===e)return;const M=m.concat(C);y.push(A===r?{op:A,path:M}:{op:A,path:M,value:j}),v.push(A==="add"?{op:r,path:M}:A===r?{op:"add",path:M,value:f(E)}:{op:e,path:M,value:f(E)})})}function a(h,m,y,v){let{base_:b,copy_:w}=h,C=0;b.forEach(k=>{if(!w.has(k)){const E=m.concat([C]);y.push({op:r,path:E,value:k}),v.unshift({op:"add",path:E,value:k})}C++}),C=0,w.forEach(k=>{if(!b.has(k)){const E=m.concat([C]);y.push({op:"add",path:E,value:k}),v.unshift({op:r,path:E,value:k})}C++})}function l(h,m,y,v){y.push({op:e,path:[],value:m===b_?void 0:m}),v.push({op:e,path:[],value:h})}function c(h,m){return m.forEach(y=>{const{path:v,op:b}=y;let w=h;for(let j=0;j<v.length-1;j++){const A=Ff(w);let M=v[j];typeof M!="string"&&typeof M!="number"&&(M=""+M),(A===0||A===1)&&(M==="__proto__"||M==="constructor")&&Js(19),typeof w=="function"&&M==="prototype"&&Js(19),w=ak(w,M),typeof w!="object"&&Js(18,v.join("/"))}const C=Ff(w),k=u(y.value),E=v[v.length-1];switch(b){case e:switch(C){case 2:return w.set(E,k);case 3:Js(16);default:return w[E]=k}case"add":switch(C){case 1:return E==="-"?w.push(k):w.splice(E,0,k);case 2:return w.set(E,k);case 3:return w.add(k);default:return w[E]=k}case r:switch(C){case 1:return w.splice(E,1);case 2:return w.delete(E);case 3:return w.delete(y.value);default:return delete w[E]}default:Js(17,b)}}),h}function u(h){if(!Na(h))return h;if(Array.isArray(h))return h.map(u);if(k2(h))return new Map(Array.from(h.entries()).map(([y,v])=>[y,u(v)]));if(E2(h))return new Set(Array.from(h).map(u));const m=Object.create($f(h));for(const y in h)m[y]=u(h[y]);return wg(h,U0)&&(m[U0]=h[U0]),m}function f(h){return Tl(h)?u(h):h}Dxe("Patches",{applyPatches_:c,generatePatches_:s,generateReplacementPatches_:l})}var ki=new $xe,T2=ki.produce,cQ=ki.produceWithPatches.bind(ki);ki.setAutoFreeze.bind(ki);ki.setUseStrictShallowCopy.bind(ki);var yz=ki.applyPatches.bind(ki);ki.createDraft.bind(ki);ki.finishDraft.bind(ki);function Pxe(t,e=`expected a function, instead received ${typeof t}`){if(typeof t!="function")throw new TypeError(e)}function Bxe(t,e=`expected an object, instead received ${typeof t}`){if(typeof t!="object")throw new TypeError(e)}function Hxe(t,e="expected all items to be functions, instead received the following types: "){if(!t.every(n=>typeof n=="function")){const n=t.map(r=>typeof r=="function"?`function ${r.name||"unnamed"}()`:typeof r).join(", ");throw new TypeError(`${e}[${n}]`)}}var vz=t=>Array.isArray(t)?t:[t];function Uxe(t){const e=Array.isArray(t[0])?t[0]:t;return Hxe(e,"createSelector expects all input-selectors to be functions, but received the following types: "),e}function Vxe(t,e){const n=[],{length:r}=t;for(let s=0;s<r;s++)n.push(t[s].apply(null,e));return n}var qxe=class{constructor(t){this.value=t}deref(){return this.value}},Wxe=typeof WeakRef<"u"?WeakRef:qxe,Yxe=0,bz=1;function Uv(){return{s:Yxe,v:void 0,o:null,p:null}}function u3(t,e={}){let n=Uv();const{resultEqualityCheck:r}=e;let s,o=0;function i(){var a;let l=n;const{length:c}=arguments;for(let h=0,m=c;h<m;h++){const y=arguments[h];if(typeof y=="function"||typeof y=="object"&&y!==null){let v=l.o;v===null&&(l.o=v=new WeakMap);const b=v.get(y);b===void 0?(l=Uv(),v.set(y,l)):l=b}else{let v=l.p;v===null&&(l.p=v=new Map);const b=v.get(y);b===void 0?(l=Uv(),v.set(y,l)):l=b}}const u=l;let f;if(l.s===bz)f=l.v;else if(f=t.apply(null,arguments),o++,r){const h=((a=s==null?void 0:s.deref)==null?void 0:a.call(s))??s;h!=null&&r(h,f)&&(f=h,o!==0&&o--),s=typeof f=="object"&&f!==null||typeof f=="function"?new Wxe(f):f}return u.s=bz,u.v=f,f}return i.clearCache=()=>{n=Uv(),i.resetResultsCount()},i.resultsCount=()=>o,i.resetResultsCount=()=>{o=0},i}function Gxe(t,...e){const n=typeof t=="function"?{memoize:t,memoizeOptions:e}:t,r=(...s)=>{let o=0,i=0,a,l={},c=s.pop();typeof c=="object"&&(l=c,c=s.pop()),Pxe(c,`createSelector expects an output function after the inputs, but received: [${typeof c}]`);const u={...n,...l},{memoize:f,memoizeOptions:h=[],argsMemoize:m=u3,argsMemoizeOptions:y=[]}=u,v=vz(h),b=vz(y),w=Uxe(s),C=f(function(){return o++,c.apply(null,arguments)},...v),k=m(function(){i++;const j=Vxe(w,arguments);return a=C.apply(null,j),a},...b);return Object.assign(k,{resultFunc:c,memoizedResultFunc:C,dependencies:w,dependencyRecomputations:()=>i,resetDependencyRecomputations:()=>{i=0},lastResult:()=>a,recomputations:()=>o,resetRecomputations:()=>{o=0},memoize:f,argsMemoize:m})};return Object.assign(r,{withTypes:()=>r}),r}var S_=Gxe(u3),Kxe=Object.assign((t,e=S_)=>{Bxe(t,`createStructuredSelector expects first argument to be an object where each property is a selector, instead received a ${typeof t}`);const n=Object.keys(t),r=n.map(o=>t[o]);return e(r,(...o)=>o.reduce((i,a,l)=>(i[n[l]]=a,i),{}))},{withTypes:()=>Kxe}),Xxe=t=>t&&typeof t.match=="function";function Ma(t,e){function n(...r){if(e){let s=e(...r);if(!s)throw new Error(bl(0));return{type:t,payload:s.payload,..."meta"in s&&{meta:s.meta},..."error"in s&&{error:s.error}}}return{type:t,payload:r[0]}}return n.toString=()=>`${t}`,n.type=t,n.match=r=>rQ(r)&&r.type===t,n}function xz(t){return Na(t)?T2(t,()=>{}):t}function wz(t,e,n){return t.has(e)?t.get(e):t.set(e,n(e)).get(e)}var Eh="RTK_autoBatch",r0=()=>t=>({payload:t,meta:{[Eh]:!0}});function uQ(t){const e={},n=[];let r;const s={addCase(o,i){const a=typeof o=="string"?o:o.type;if(!a)throw new Error(bl(28));if(a in e)throw new Error(bl(29));return e[a]=i,s},addMatcher(o,i){return n.push({matcher:o,reducer:i}),s},addDefaultCase(o){return r=o,s}};return t(s),[e,n,r]}function Zxe(t){return typeof t=="function"}function Qxe(t,e){let[n,r,s]=uQ(e),o;if(Zxe(t))o=()=>xz(t());else{const a=xz(t);o=()=>a}function i(a=o(),l){let c=[n[l.type],...r.filter(({matcher:u})=>u(l)).map(({reducer:u})=>u)];return c.filter(u=>!!u).length===0&&(c=[s]),c.reduce((u,f)=>{if(f)if(Tl(u)){const m=f(u,l);return m===void 0?u:m}else{if(Na(u))return T2(u,h=>f(h,l));{const h=f(u,l);if(h===void 0){if(u===null)return u;throw Error("A case reducer on a non-draftable value must not return undefined")}return h}}return u},a)}return i.getInitialState=o,i}var dQ=(t,e)=>Xxe(t)?t.match(e):t(e);function _c(...t){return e=>t.some(n=>dQ(n,e))}function V0(...t){return e=>t.every(n=>dQ(n,e))}function P4(t,e){if(!t||!t.meta)return!1;const n=typeof t.meta.requestId=="string",r=e.indexOf(t.meta.requestStatus)>-1;return n&&r}function M2(t){return typeof t[0]=="function"&&"pending"in t[0]&&"fulfilled"in t[0]&&"rejected"in t[0]}function C_(...t){return t.length===0?e=>P4(e,["pending"]):M2(t)?_c(...t.map(e=>e.pending)):C_()(t[0])}function em(...t){return t.length===0?e=>P4(e,["rejected"]):M2(t)?_c(...t.map(e=>e.rejected)):em()(t[0])}function B4(...t){const e=n=>n&&n.meta&&n.meta.rejectedWithValue;return t.length===0?V0(em(...t),e):M2(t)?V0(em(...t),e):B4()(t[0])}function ld(...t){return t.length===0?e=>P4(e,["fulfilled"]):M2(t)?_c(...t.map(e=>e.fulfilled)):ld()(t[0])}function iT(...t){return t.length===0?e=>P4(e,["pending","fulfilled","rejected"]):M2(t)?_c(...t.flatMap(e=>[e.pending,e.rejected,e.fulfilled])):iT()(t[0])}var Jxe="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",k_=(t=21)=>{let e="",n=t;for(;n--;)e+=Jxe[Math.random()*64|0];return e},e3e=["name","message","stack","code"],uk=class{constructor(t,e){a3(this,"_type"),this.payload=t,this.meta=e}},Sz=class{constructor(t,e){a3(this,"_type"),this.payload=t,this.meta=e}},t3e=t=>{if(typeof t=="object"&&t!==null){const e={};for(const n of e3e)typeof t[n]=="string"&&(e[n]=t[n]);return e}return{message:String(t)}},Cz=(()=>{function t(e,n,r){const s=Ma(e+"/fulfilled",(l,c,u,f)=>({payload:l,meta:{...f||{},arg:u,requestId:c,requestStatus:"fulfilled"}})),o=Ma(e+"/pending",(l,c,u)=>({payload:void 0,meta:{...u||{},arg:c,requestId:l,requestStatus:"pending"}})),i=Ma(e+"/rejected",(l,c,u,f,h)=>({payload:f,error:(r&&r.serializeError||t3e)(l||"Rejected"),meta:{...h||{},arg:u,requestId:c,rejectedWithValue:!!f,requestStatus:"rejected",aborted:(l==null?void 0:l.name)==="AbortError",condition:(l==null?void 0:l.name)==="ConditionError"}}));function a(l){return(c,u,f)=>{const h=r!=null&&r.idGenerator?r.idGenerator(l):k_(),m=new AbortController;let y,v;function b(C){v=C,m.abort()}const w=(async function(){var C,k;let E;try{let A=(C=r==null?void 0:r.condition)==null?void 0:C.call(r,l,{getState:u,extra:f});if(r3e(A)&&(A=await A),A===!1||m.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};const M=new Promise((_,D)=>{y=()=>{D({name:"AbortError",message:v||"Aborted"})},m.signal.addEventListener("abort",y)});c(o(h,l,(k=r==null?void 0:r.getPendingMeta)==null?void 0:k.call(r,{requestId:h,arg:l},{getState:u,extra:f}))),E=await Promise.race([M,Promise.resolve(n(l,{dispatch:c,getState:u,extra:f,requestId:h,signal:m.signal,abort:b,rejectWithValue:(_,D)=>new uk(_,D),fulfillWithValue:(_,D)=>new Sz(_,D)})).then(_=>{if(_ instanceof uk)throw _;return _ instanceof Sz?s(_.payload,h,l,_.meta):s(_,h,l)})])}catch(A){E=A instanceof uk?i(null,h,l,A.payload,A.meta):i(A,h,l)}finally{y&&m.signal.removeEventListener("abort",y)}return r&&!r.dispatchConditionRejection&&i.match(E)&&E.meta.condition||c(E),E})();return Object.assign(w,{abort:b,requestId:h,arg:l,unwrap(){return w.then(n3e)}})}}return Object.assign(a,{pending:o,rejected:i,fulfilled:s,settled:_c(i,s),typePrefix:e})}return t.withTypes=()=>t,t})();function n3e(t){if(t.meta&&t.meta.rejectedWithValue)throw t.payload;if(t.error)throw t.error;return t.payload}function r3e(t){return t!==null&&typeof t=="object"&&typeof t.then=="function"}var s3e=Symbol.for("rtk-slice-createasyncthunk");function o3e(t,e){return`${t}/${e}`}function i3e({creators:t}={}){var e;const n=(e=t==null?void 0:t.asyncThunk)==null?void 0:e[s3e];return function(s){const{name:o,reducerPath:i=o}=s;if(!o)throw new Error(bl(11));const a=(typeof s.reducers=="function"?s.reducers(l3e()):s.reducers)||{},l=Object.keys(a),c={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},u={addCase(k,E){const j=typeof k=="string"?k:k.type;if(!j)throw new Error(bl(12));if(j in c.sliceCaseReducersByType)throw new Error(bl(13));return c.sliceCaseReducersByType[j]=E,u},addMatcher(k,E){return c.sliceMatchers.push({matcher:k,reducer:E}),u},exposeAction(k,E){return c.actionCreators[k]=E,u},exposeCaseReducer(k,E){return c.sliceCaseReducersByName[k]=E,u}};l.forEach(k=>{const E=a[k],j={reducerName:k,type:o3e(o,k),createNotation:typeof s.reducers=="function"};u3e(E)?f3e(j,E,u,n):c3e(j,E,u)});function f(){const[k={},E=[],j=void 0]=typeof s.extraReducers=="function"?uQ(s.extraReducers):[s.extraReducers],A={...k,...c.sliceCaseReducersByType};return Qxe(s.initialState,M=>{for(let _ in A)M.addCase(_,A[_]);for(let _ of c.sliceMatchers)M.addMatcher(_.matcher,_.reducer);for(let _ of E)M.addMatcher(_.matcher,_.reducer);j&&M.addDefaultCase(j)})}const h=k=>k,m=new Map;let y;function v(k,E){return y||(y=f()),y(k,E)}function b(){return y||(y=f()),y.getInitialState()}function w(k,E=!1){function j(M){let _=M[k];return typeof _>"u"&&E&&(_=b()),_}function A(M=h){const _=wz(m,E,()=>new WeakMap);return wz(_,M,()=>{const D={};for(const[R,N]of Object.entries(s.selectors??{}))D[R]=a3e(N,M,b,E);return D})}return{reducerPath:k,getSelectors:A,get selectors(){return A(j)},selectSlice:j}}const C={name:o,reducer:v,actions:c.actionCreators,caseReducers:c.sliceCaseReducersByName,getInitialState:b,...w(i),injectInto(k,{reducerPath:E,...j}={}){const A=E??i;return k.inject({reducerPath:A,reducer:v},j),{...C,...w(A,!0)}}};return C}}function a3e(t,e,n,r){function s(o,...i){let a=e(o);return typeof a>"u"&&r&&(a=n()),t(a,...i)}return s.unwrapped=t,s}var rh=i3e();function l3e(){function t(e,n){return{_reducerDefinitionType:"asyncThunk",payloadCreator:e,...n}}return t.withTypes=()=>t,{reducer(e){return Object.assign({[e.name](...n){return e(...n)}}[e.name],{_reducerDefinitionType:"reducer"})},preparedReducer(e,n){return{_reducerDefinitionType:"reducerWithPrepare",prepare:e,reducer:n}},asyncThunk:t}}function c3e({type:t,reducerName:e,createNotation:n},r,s){let o,i;if("reducer"in r){if(n&&!d3e(r))throw new Error(bl(17));o=r.reducer,i=r.prepare}else o=r;s.addCase(t,o).exposeCaseReducer(e,o).exposeAction(e,i?Ma(t,i):Ma(t))}function u3e(t){return t._reducerDefinitionType==="asyncThunk"}function d3e(t){return t._reducerDefinitionType==="reducerWithPrepare"}function f3e({type:t,reducerName:e},n,r,s){if(!s)throw new Error(bl(18));const{payloadCreator:o,fulfilled:i,pending:a,rejected:l,settled:c,options:u}=n,f=s(t,o,u);r.exposeAction(e,f),i&&r.addCase(f.fulfilled,i),a&&r.addCase(f.pending,a),l&&r.addCase(f.rejected,l),c&&r.addMatcher(f.settled,c),r.exposeCaseReducer(e,{fulfilled:i||Vv,pending:a||Vv,rejected:l||Vv,settled:c||Vv})}function Vv(){}function bl(t){return`Minified Redux Toolkit error #${t}; visit https://redux-toolkit.js.org/Errors?code=${t} for the full message or use the non-minified dev environment for full errors. `}var fQ=(t=>(t.uninitialized="uninitialized",t.pending="pending",t.fulfilled="fulfilled",t.rejected="rejected",t))(fQ||{});function p3e(t){return{status:t,isUninitialized:t==="uninitialized",isLoading:t==="pending",isSuccess:t==="fulfilled",isError:t==="rejected"}}var kz=ad;function pQ(t,e){if(t===e||!(kz(t)&&kz(e)||Array.isArray(t)&&Array.isArray(e)))return e;const n=Object.keys(e),r=Object.keys(t);let s=n.length===r.length;const o=Array.isArray(e)?[]:{};for(const i of n)o[i]=pQ(t[i],e[i]),s&&(s=t[i]===o[i]);return s?t:o}function Nh(t){let e=0;for(const n in t)e++;return e}var Ez=t=>[].concat(...t);function h3e(t){return new RegExp("(^|:)//").test(t)}function m3e(){return typeof document>"u"?!0:document.visibilityState!=="hidden"}function d3(t){return t!=null}function g3e(){return typeof navigator>"u"||navigator.onLine===void 0?!0:navigator.onLine}var y3e=t=>t.replace(/\/$/,""),v3e=t=>t.replace(/^\//,"");function b3e(t,e){if(!t)return e;if(!e)return t;if(h3e(e))return e;const n=t.endsWith("/")||!e.startsWith("?")?"/":"";return t=y3e(t),e=v3e(e),`${t}${n}${e}`}function x3e(t,e,n){return t.has(e)?t.get(e):t.set(e,n).get(e)}var Tz=(...t)=>fetch(...t),w3e=t=>t.status>=200&&t.status<=299,S3e=t=>/ion\/(vnd\.api\+)?json/.test(t.get("content-type")||"");function Mz(t){if(!ad(t))return t;const e={...t};for(const[n,r]of Object.entries(e))r===void 0&&delete e[n];return e}function C3e({baseUrl:t,prepareHeaders:e=f=>f,fetchFn:n=Tz,paramsSerializer:r,isJsonContentType:s=S3e,jsonContentType:o="application/json",jsonReplacer:i,timeout:a,responseHandler:l,validateStatus:c,...u}={}){return typeof fetch>"u"&&n===Tz&&console.warn("Warning: `fetch` is not available. Please supply a custom `fetchFn` property to use `fetchBaseQuery` on SSR environments."),async(h,m,y)=>{const{getState:v,extra:b,endpoint:w,forced:C,type:k}=m;let E,{url:j,headers:A=new Headers(u.headers),params:M=void 0,responseHandler:_=l??"json",validateStatus:D=c??w3e,timeout:R=a,...N}=typeof h=="string"?{url:h}:h,z,B=m.signal;R&&(z=new AbortController,m.signal.addEventListener("abort",z.abort),B=z.signal);let L={...u,signal:B,...N};A=new Headers(Mz(A)),L.headers=await e(A,{getState:v,arg:h,extra:b,endpoint:w,forced:C,type:k,extraOptions:y})||A;const P=G=>typeof G=="object"&&(ad(G)||Array.isArray(G)||typeof G.toJSON=="function");if(!L.headers.has("content-type")&&P(L.body)&&L.headers.set("content-type",o),P(L.body)&&s(L.headers)&&(L.body=JSON.stringify(L.body,i)),M){const G=~j.indexOf("?")?"&":"?",K=r?r(M):new URLSearchParams(Mz(M));j+=G+K}j=b3e(t,j);const I=new Request(j,L);E={request:new Request(j,L)};let $,V=!1,q=z&&setTimeout(()=>{V=!0,z.abort()},R);try{$=await n(I)}catch(G){return{error:{status:V?"TIMEOUT_ERROR":"FETCH_ERROR",error:String(G)},meta:E}}finally{q&&clearTimeout(q),z==null||z.signal.removeEventListener("abort",z.abort)}const U=$.clone();E.response=U;let W,Y="";try{let G;if(await Promise.all([f($,_).then(K=>W=K,K=>G=K),U.text().then(K=>Y=K,()=>{})]),G)throw G}catch(G){return{error:{status:"PARSING_ERROR",originalStatus:$.status,data:Y,error:String(G)},meta:E}}return D($,W)?{data:W,meta:E}:{error:{status:$.status,data:W},meta:E}};async function f(h,m){if(typeof m=="function")return m(h);if(m==="content-type"&&(m=s(h.headers)?"json":"text"),m==="json"){const y=await h.text();return y.length?JSON.parse(y):null}return h.text()}}var jz=class{constructor(t,e=void 0){this.value=t,this.meta=e}},E_=Ma("__rtkq/focused"),hQ=Ma("__rtkq/unfocused"),T_=Ma("__rtkq/online"),mQ=Ma("__rtkq/offline");function gQ(t){return t.type==="query"}function k3e(t){return t.type==="mutation"}function M_(t,e,n,r,s,o){return E3e(t)?t(e,n,r,s).filter(d3).map(aT).map(o):Array.isArray(t)?t.map(aT).map(o):[]}function E3e(t){return typeof t=="function"}function aT(t){return typeof t=="string"?{type:t}:t}function T3e(t,e){return t.catch(e)}var kg=Symbol("forceQueryFn"),lT=t=>typeof t[kg]=="function";function M3e({serializeQueryArgs:t,queryThunk:e,mutationThunk:n,api:r,context:s}){const o=new Map,i=new Map,{unsubscribeQueryResult:a,removeMutationResult:l,updateSubscriptionOptions:c}=r.internalActions;return{buildInitiateQuery:y,buildInitiateMutation:v,getRunningQueryThunk:u,getRunningMutationThunk:f,getRunningQueriesThunk:h,getRunningMutationsThunk:m};function u(b,w){return C=>{var k;const E=s.endpointDefinitions[b],j=t({queryArgs:w,endpointDefinition:E,endpointName:b});return(k=o.get(C))==null?void 0:k[j]}}function f(b,w){return C=>{var k;return(k=i.get(C))==null?void 0:k[w]}}function h(){return b=>Object.values(o.get(b)||{}).filter(d3)}function m(){return b=>Object.values(i.get(b)||{}).filter(d3)}function y(b,w){const C=(k,{subscribe:E=!0,forceRefetch:j,subscriptionOptions:A,[kg]:M,..._}={})=>(D,R)=>{var N;const z=t({queryArgs:k,endpointDefinition:w,endpointName:b}),B=e({..._,type:"query",subscribe:E,forceRefetch:j,subscriptionOptions:A,endpointName:b,originalArgs:k,queryCacheKey:z,[kg]:M}),L=r.endpoints[b].select(k),P=D(B),I=L(R()),{requestId:H,abort:$}=P,V=I.requestId!==H,q=(N=o.get(D))==null?void 0:N[z],U=()=>L(R()),W=Object.assign(M?P.then(U):V&&!q?Promise.resolve(I):Promise.all([q,P]).then(U),{arg:k,requestId:H,subscriptionOptions:A,queryCacheKey:z,abort:$,async unwrap(){const Y=await W;if(Y.isError)throw Y.error;return Y.data},refetch:()=>D(C(k,{subscribe:!1,forceRefetch:!0})),unsubscribe(){E&&D(a({queryCacheKey:z,requestId:H}))},updateSubscriptionOptions(Y){W.subscriptionOptions=Y,D(c({endpointName:b,requestId:H,queryCacheKey:z,options:Y}))}});if(!q&&!V&&!M){const Y=x3e(o,D,{});Y[z]=W,W.then(()=>{delete Y[z],Nh(Y)||o.delete(D)})}return W};return C}function v(b){return(w,{track:C=!0,fixedCacheKey:k}={})=>(E,j)=>{const A=n({type:"mutation",endpointName:b,originalArgs:w,track:C,fixedCacheKey:k}),M=E(A),{requestId:_,abort:D,unwrap:R}=M,N=T3e(M.unwrap().then(P=>({data:P})),P=>({error:P})),z=()=>{E(l({requestId:_,fixedCacheKey:k}))},B=Object.assign(N,{arg:M.arg,requestId:_,abort:D,unwrap:R,reset:z}),L=i.get(E)||{};return i.set(E,L),L[_]=B,B.then(()=>{delete L[_],Nh(L)||i.delete(E)}),k&&(L[k]=B,B.then(()=>{L[k]===B&&(delete L[k],Nh(L)||i.delete(E))})),B}}}function Az(t){return t}function j3e({reducerPath:t,baseQuery:e,context:{endpointDefinitions:n},serializeQueryArgs:r,api:s,assertTagType:o}){const i=(C,k,E,j)=>(A,M)=>{const _=n[C],D=r({queryArgs:k,endpointDefinition:_,endpointName:C});if(A(s.internalActions.queryResultPatched({queryCacheKey:D,patches:E})),!j)return;const R=s.endpoints[C].select(k)(M()),N=M_(_.providesTags,R.data,void 0,k,{},o);A(s.internalActions.updateProvidedBy({queryCacheKey:D,providedTags:N}))},a=(C,k,E,j=!0)=>(A,M)=>{const D=s.endpoints[C].select(k)(M()),R={patches:[],inversePatches:[],undo:()=>A(s.util.patchQueryData(C,k,R.inversePatches,j))};if(D.status==="uninitialized")return R;let N;if("data"in D)if(Na(D.data)){const[z,B,L]=cQ(D.data,E);R.patches.push(...B),R.inversePatches.push(...L),N=z}else N=E(D.data),R.patches.push({op:"replace",path:[],value:N}),R.inversePatches.push({op:"replace",path:[],value:D.data});return R.patches.length===0||A(s.util.patchQueryData(C,k,R.patches,j)),R},l=(C,k,E)=>j=>j(s.endpoints[C].initiate(k,{subscribe:!1,forceRefetch:!0,[kg]:()=>({data:E})})),c=async(C,{signal:k,abort:E,rejectWithValue:j,fulfillWithValue:A,dispatch:M,getState:_,extra:D})=>{const R=n[C.endpointName];try{let N=Az,z;const B={signal:k,abort:E,dispatch:M,getState:_,extra:D,endpoint:C.endpointName,type:C.type,forced:C.type==="query"?u(C,_()):void 0,queryCacheKey:C.type==="query"?C.queryCacheKey:void 0},L=C.type==="query"?C[kg]:void 0;if(L?z=L():R.query?(z=await e(R.query(C.originalArgs),B,R.extraOptions),R.transformResponse&&(N=R.transformResponse)):z=await R.queryFn(C.originalArgs,B,R.extraOptions,P=>e(P,B,R.extraOptions)),typeof process<"u",z.error)throw new jz(z.error,z.meta);return A(await N(z.data,z.meta,C.originalArgs),{fulfilledTimeStamp:Date.now(),baseQueryMeta:z.meta,[Eh]:!0})}catch(N){let z=N;if(z instanceof jz){let B=Az;R.query&&R.transformErrorResponse&&(B=R.transformErrorResponse);try{return j(await B(z.value,z.meta,C.originalArgs),{baseQueryMeta:z.meta,[Eh]:!0})}catch(L){z=L}}throw console.error(z),z}};function u(C,k){var E,j,A;const M=(j=(E=k[t])==null?void 0:E.queries)==null?void 0:j[C.queryCacheKey],_=(A=k[t])==null?void 0:A.config.refetchOnMountOrArgChange,D=M==null?void 0:M.fulfilledTimeStamp,R=C.forceRefetch??(C.subscribe&&_);return R?R===!0||(Number(new Date)-Number(D))/1e3>=R:!1}const f=Cz(`${t}/executeQuery`,c,{getPendingMeta(){return{startedTimeStamp:Date.now(),[Eh]:!0}},condition(C,{getState:k}){var E,j,A;const M=k(),_=(j=(E=M[t])==null?void 0:E.queries)==null?void 0:j[C.queryCacheKey],D=_==null?void 0:_.fulfilledTimeStamp,R=C.originalArgs,N=_==null?void 0:_.originalArgs,z=n[C.endpointName];return lT(C)?!0:(_==null?void 0:_.status)==="pending"?!1:u(C,M)||gQ(z)&&((A=z==null?void 0:z.forceRefetch)!=null&&A.call(z,{currentArg:R,previousArg:N,endpointState:_,state:M}))?!0:!D},dispatchConditionRejection:!0}),h=Cz(`${t}/executeMutation`,c,{getPendingMeta(){return{startedTimeStamp:Date.now(),[Eh]:!0}}}),m=C=>"force"in C,y=C=>"ifOlderThan"in C,v=(C,k,E)=>(j,A)=>{const M=m(E)&&E.force,_=y(E)&&E.ifOlderThan,D=(N=!0)=>{const z={forceRefetch:N,isPrefetch:!0};return s.endpoints[C].initiate(k,z)},R=s.endpoints[C].select(k)(A());if(M)j(D());else if(_){const N=R==null?void 0:R.fulfilledTimeStamp;if(!N){j(D());return}(Number(new Date)-Number(new Date(N)))/1e3>=_&&j(D())}else j(D(!1))};function b(C){return k=>{var E,j;return((j=(E=k==null?void 0:k.meta)==null?void 0:E.arg)==null?void 0:j.endpointName)===C}}function w(C,k){return{matchPending:V0(C_(C),b(k)),matchFulfilled:V0(ld(C),b(k)),matchRejected:V0(em(C),b(k))}}return{queryThunk:f,mutationThunk:h,prefetch:v,updateQueryData:a,upsertQueryData:l,patchQueryData:i,buildMatchThunkActions:w}}function yQ(t,e,n,r){return M_(n[t.meta.arg.endpointName][e],ld(t)?t.payload:void 0,B4(t)?t.payload:void 0,t.meta.arg.originalArgs,"baseQueryMeta"in t.meta?t.meta.baseQueryMeta:void 0,r)}function qv(t,e,n){const r=t[e];r&&n(r)}function Eg(t){return("arg"in t?t.arg.fixedCacheKey:t.fixedCacheKey)??t.requestId}function _z(t,e,n){const r=t[Eg(e)];r&&n(r)}var s0={};function A3e({reducerPath:t,queryThunk:e,mutationThunk:n,serializeQueryArgs:r,context:{endpointDefinitions:s,apiUid:o,extractRehydrationInfo:i,hasRehydrationInfo:a},assertTagType:l,config:c}){const u=Ma(`${t}/resetApiState`);function f(A,M,_,D){var R;A[R=M.queryCacheKey]??(A[R]={status:"uninitialized",endpointName:M.endpointName}),qv(A,M.queryCacheKey,N=>{N.status="pending",N.requestId=_&&N.requestId?N.requestId:D.requestId,M.originalArgs!==void 0&&(N.originalArgs=M.originalArgs),N.startedTimeStamp=D.startedTimeStamp})}function h(A,M,_){qv(A,M.arg.queryCacheKey,D=>{if(D.requestId!==M.requestId&&!lT(M.arg))return;const{merge:R}=s[M.arg.endpointName];if(D.status="fulfilled",R)if(D.data!==void 0){const{fulfilledTimeStamp:N,arg:z,baseQueryMeta:B,requestId:L}=M;let P=T2(D.data,I=>R(I,_,{arg:z.originalArgs,baseQueryMeta:B,fulfilledTimeStamp:N,requestId:L}));D.data=P}else D.data=_;else D.data=s[M.arg.endpointName].structuralSharing??!0?pQ(Tl(D.data)?Axe(D.data):D.data,_):_;delete D.error,D.fulfilledTimeStamp=M.fulfilledTimeStamp})}const m=rh({name:`${t}/queries`,initialState:s0,reducers:{removeQueryResult:{reducer(A,{payload:{queryCacheKey:M}}){delete A[M]},prepare:r0()},cacheEntriesUpserted:{reducer(A,M){for(const _ of M.payload){const{queryDescription:D,value:R}=_;f(A,D,!0,{requestId:M.meta.requestId,startedTimeStamp:M.meta.timestamp}),h(A,{arg:D,requestId:M.meta.requestId,fulfilledTimeStamp:M.meta.timestamp,baseQueryMeta:{}},R)}},prepare:A=>({payload:A.map(D=>{const{endpointName:R,arg:N,value:z}=D,B=s[R];return{queryDescription:{type:"query",endpointName:R,originalArgs:D.arg,queryCacheKey:r({queryArgs:N,endpointDefinition:B,endpointName:R})},value:z}}),meta:{[Eh]:!0,requestId:k_(),timestamp:Date.now()}})},queryResultPatched:{reducer(A,{payload:{queryCacheKey:M,patches:_}}){qv(A,M,D=>{D.data=yz(D.data,_.concat())})},prepare:r0()}},extraReducers(A){A.addCase(e.pending,(M,{meta:_,meta:{arg:D}})=>{const R=lT(D);f(M,D,R,_)}).addCase(e.fulfilled,(M,{meta:_,payload:D})=>{h(M,_,D)}).addCase(e.rejected,(M,{meta:{condition:_,arg:D,requestId:R},error:N,payload:z})=>{qv(M,D.queryCacheKey,B=>{if(!_){if(B.requestId!==R)return;B.status="rejected",B.error=z??N}})}).addMatcher(a,(M,_)=>{const{queries:D}=i(_);for(const[R,N]of Object.entries(D))((N==null?void 0:N.status)==="fulfilled"||(N==null?void 0:N.status)==="rejected")&&(M[R]=N)})}}),y=rh({name:`${t}/mutations`,initialState:s0,reducers:{removeMutationResult:{reducer(A,{payload:M}){const _=Eg(M);_ in A&&delete A[_]},prepare:r0()}},extraReducers(A){A.addCase(n.pending,(M,{meta:_,meta:{requestId:D,arg:R,startedTimeStamp:N}})=>{R.track&&(M[Eg(_)]={requestId:D,status:"pending",endpointName:R.endpointName,startedTimeStamp:N})}).addCase(n.fulfilled,(M,{payload:_,meta:D})=>{D.arg.track&&_z(M,D,R=>{R.requestId===D.requestId&&(R.status="fulfilled",R.data=_,R.fulfilledTimeStamp=D.fulfilledTimeStamp)})}).addCase(n.rejected,(M,{payload:_,error:D,meta:R})=>{R.arg.track&&_z(M,R,N=>{N.requestId===R.requestId&&(N.status="rejected",N.error=_??D)})}).addMatcher(a,(M,_)=>{const{mutations:D}=i(_);for(const[R,N]of Object.entries(D))((N==null?void 0:N.status)==="fulfilled"||(N==null?void 0:N.status)==="rejected")&&R!==(N==null?void 0:N.requestId)&&(M[R]=N)})}}),v=rh({name:`${t}/invalidation`,initialState:s0,reducers:{updateProvidedBy:{reducer(A,M){var _,D;const{queryCacheKey:R,providedTags:N}=M.payload;for(const z of Object.values(A))for(const B of Object.values(z)){const L=B.indexOf(R);L!==-1&&B.splice(L,1)}for(const{type:z,id:B}of N){const L=(_=A[z]??(A[z]={}))[D=B||"__internal_without_id"]??(_[D]=[]);L.includes(R)||L.push(R)}},prepare:r0()}},extraReducers(A){A.addCase(m.actions.removeQueryResult,(M,{payload:{queryCacheKey:_}})=>{for(const D of Object.values(M))for(const R of Object.values(D)){const N=R.indexOf(_);N!==-1&&R.splice(N,1)}}).addMatcher(a,(M,_)=>{var D,R;const{provided:N}=i(_);for(const[z,B]of Object.entries(N))for(const[L,P]of Object.entries(B)){const I=(D=M[z]??(M[z]={}))[R=L||"__internal_without_id"]??(D[R]=[]);for(const H of P)I.includes(H)||I.push(H)}}).addMatcher(_c(ld(e),B4(e)),(M,_)=>{const D=yQ(_,"providesTags",s,l),{queryCacheKey:R}=_.meta.arg;v.caseReducers.updateProvidedBy(M,v.actions.updateProvidedBy({queryCacheKey:R,providedTags:D}))})}}),b=rh({name:`${t}/subscriptions`,initialState:s0,reducers:{updateSubscriptionOptions(A,M){},unsubscribeQueryResult(A,M){},internal_getRTKQSubscriptions(){}}}),w=rh({name:`${t}/internalSubscriptions`,initialState:s0,reducers:{subscriptionsUpdated:{reducer(A,M){return yz(A,M.payload)},prepare:r0()}}}),C=rh({name:`${t}/config`,initialState:{online:g3e(),focused:m3e(),middlewareRegistered:!1,...c},reducers:{middlewareRegistered(A,{payload:M}){A.middlewareRegistered=A.middlewareRegistered==="conflict"||o!==M?"conflict":!0}},extraReducers:A=>{A.addCase(T_,M=>{M.online=!0}).addCase(mQ,M=>{M.online=!1}).addCase(E_,M=>{M.focused=!0}).addCase(hQ,M=>{M.focused=!1}).addMatcher(a,M=>({...M}))}}),k=Mxe({queries:m.reducer,mutations:y.reducer,provided:v.reducer,subscriptions:w.reducer,config:C.reducer}),E=(A,M)=>k(u.match(M)?void 0:A,M),j={...C.actions,...m.actions,...b.actions,...w.actions,...y.actions,...v.actions,resetApiState:u};return{reducer:E,actions:j}}var $u=Symbol.for("RTKQ/skipToken"),vQ={status:"uninitialized"},Rz=T2(vQ,()=>{}),Dz=T2(vQ,()=>{});function _3e({serializeQueryArgs:t,reducerPath:e,createSelector:n}){const r=f=>Rz,s=f=>Dz;return{buildQuerySelector:a,buildMutationSelector:l,selectInvalidatedBy:c,selectCachedArgsForQuery:u};function o(f){return{...f,...p3e(f.status)}}function i(f){return f[e]}function a(f,h){return m=>{if(m===$u)return n(r,o);const y=t({queryArgs:m,endpointDefinition:h,endpointName:f});return n(b=>{var w,C;return((C=(w=i(b))==null?void 0:w.queries)==null?void 0:C[y])??Rz},o)}}function l(){return f=>{let h;return typeof f=="object"?h=Eg(f)??$u:h=f,n(h===$u?s:v=>{var b,w;return((w=(b=i(v))==null?void 0:b.mutations)==null?void 0:w[h])??Dz},o)}}function c(f,h){const m=f[e],y=new Set;for(const v of h.filter(d3).map(aT)){const b=m.provided[v.type];if(!b)continue;let w=(v.id!==void 0?b[v.id]:Ez(Object.values(b)))??[];for(const C of w)y.add(C)}return Ez(Array.from(y.values()).map(v=>{const b=m.queries[v];return b?[{queryCacheKey:v,endpointName:b.endpointName,originalArgs:b.originalArgs}]:[]}))}function u(f,h){return Object.values(f[e].queries).filter(m=>(m==null?void 0:m.endpointName)===h&&m.status!=="uninitialized").map(m=>m.originalArgs)}}var Wv=WeakMap?new WeakMap:void 0,Iz=({endpointName:t,queryArgs:e})=>{let n="";const r=Wv==null?void 0:Wv.get(e);if(typeof r=="string")n=r;else{const s=JSON.stringify(e,(o,i)=>(i=typeof i=="bigint"?{$bigint:i.toString()}:i,i=ad(i)?Object.keys(i).sort().reduce((a,l)=>(a[l]=i[l],a),{}):i,i));ad(e)&&(Wv==null||Wv.set(e,s)),n=s}return`${t}(${n})`};function R3e(...t){return function(n){const r=u3(c=>{var u;return(u=n.extractRehydrationInfo)==null?void 0:u.call(n,c,{reducerPath:n.reducerPath??"api"})}),s={reducerPath:"api",keepUnusedDataFor:60,refetchOnMountOrArgChange:!1,refetchOnFocus:!1,refetchOnReconnect:!1,invalidationBehavior:"delayed",...n,extractRehydrationInfo:r,serializeQueryArgs(c){let u=Iz;if("serializeQueryArgs"in c.endpointDefinition){const f=c.endpointDefinition.serializeQueryArgs;u=h=>{const m=f(h);return typeof m=="string"?m:Iz({...h,queryArgs:m})}}else n.serializeQueryArgs&&(u=n.serializeQueryArgs);return u(c)},tagTypes:[...n.tagTypes||[]]},o={endpointDefinitions:{},batch(c){c()},apiUid:k_(),extractRehydrationInfo:r,hasRehydrationInfo:u3(c=>r(c)!=null)},i={injectEndpoints:l,enhanceEndpoints({addTagTypes:c,endpoints:u}){if(c)for(const f of c)s.tagTypes.includes(f)||s.tagTypes.push(f);if(u)for(const[f,h]of Object.entries(u))typeof h=="function"?h(o.endpointDefinitions[f]):Object.assign(o.endpointDefinitions[f]||{},h);return i}},a=t.map(c=>c.init(i,s,o));function l(c){const u=c.endpoints({query:f=>({...f,type:"query"}),mutation:f=>({...f,type:"mutation"})});for(const[f,h]of Object.entries(u)){if(c.overrideExisting!==!0&&f in o.endpointDefinitions){if(c.overrideExisting==="throw")throw new Error(bl(39));continue}o.endpointDefinitions[f]=h;for(const m of a)m.injectEndpoint(f,h)}return i}return i.injectEndpoints({endpoints:n.endpoints})}}function Su(t,...e){return Object.assign(t,...e)}var D3e=({api:t,queryThunk:e,internalState:n})=>{const r=`${t.reducerPath}/subscriptions`;let s=null,o=null;const{updateSubscriptionOptions:i,unsubscribeQueryResult:a}=t.internalActions,l=(m,y)=>{var v,b,w;if(i.match(y)){const{queryCacheKey:k,requestId:E,options:j}=y.payload;return(v=m==null?void 0:m[k])!=null&&v[E]&&(m[k][E]=j),!0}if(a.match(y)){const{queryCacheKey:k,requestId:E}=y.payload;return m[k]&&delete m[k][E],!0}if(t.internalActions.removeQueryResult.match(y))return delete m[y.payload.queryCacheKey],!0;if(e.pending.match(y)){const{meta:{arg:k,requestId:E}}=y,j=m[b=k.queryCacheKey]??(m[b]={});return j[`${E}_running`]={},k.subscribe&&(j[E]=k.subscriptionOptions??j[E]??{}),!0}let C=!1;if(e.fulfilled.match(y)||e.rejected.match(y)){const k=m[y.meta.arg.queryCacheKey]||{},E=`${y.meta.requestId}_running`;C||(C=!!k[E]),delete k[E]}if(e.rejected.match(y)){const{meta:{condition:k,arg:E,requestId:j}}=y;if(k&&E.subscribe){const A=m[w=E.queryCacheKey]??(m[w]={});A[j]=E.subscriptionOptions??A[j]??{},C=!0}}return C},c=()=>n.currentSubscriptions,h={getSubscriptions:c,getSubscriptionCount:m=>{const v=c()[m]??{};return Nh(v)},isRequestSubscribed:(m,y)=>{var v;const b=c();return!!((v=b==null?void 0:b[m])!=null&&v[y])}};return(m,y)=>{if(s||(s=JSON.parse(JSON.stringify(n.currentSubscriptions))),t.util.resetApiState.match(m))return s=n.currentSubscriptions={},o=null,[!0,!1];if(t.internalActions.internal_getRTKQSubscriptions.match(m))return[!1,h];const v=l(n.currentSubscriptions,m);let b=!0;if(v){o||(o=setTimeout(()=>{const k=JSON.parse(JSON.stringify(n.currentSubscriptions)),[,E]=cQ(s,()=>k);y.next(t.internalActions.subscriptionsUpdated(E)),s=k,o=null},500));const w=typeof m.type=="string"&&!!m.type.startsWith(r),C=e.rejected.match(m)&&m.meta.condition&&!!m.meta.arg.subscribe;b=!w&&!C}return[b,!1]}};function I3e(t){for(const e in t)return!1;return!0}var O3e=2147483647/1e3-1,N3e=({reducerPath:t,api:e,queryThunk:n,context:r,internalState:s})=>{const{removeQueryResult:o,unsubscribeQueryResult:i,cacheEntriesUpserted:a}=e.internalActions,l=_c(i.match,n.fulfilled,n.rejected,a.match);function c(m){const y=s.currentSubscriptions[m];return!!y&&!I3e(y)}const u={},f=(m,y,v)=>{var b;if(l(m)){const w=y.getState()[t];let C;if(a.match(m))C=m.payload.map(k=>k.queryDescription.queryCacheKey);else{const{queryCacheKey:k}=i.match(m)?m.payload:m.meta.arg;C=[k]}for(const k of C)h(k,(b=w.queries[k])==null?void 0:b.endpointName,y,w.config)}if(e.util.resetApiState.match(m))for(const[w,C]of Object.entries(u))C&&clearTimeout(C),delete u[w];if(r.hasRehydrationInfo(m)){const w=y.getState()[t],{queries:C}=r.extractRehydrationInfo(m);for(const[k,E]of Object.entries(C))h(k,E==null?void 0:E.endpointName,y,w.config)}};function h(m,y,v,b){const w=r.endpointDefinitions[y],C=(w==null?void 0:w.keepUnusedDataFor)??b.keepUnusedDataFor;if(C===1/0)return;const k=Math.max(0,Math.min(C,O3e));if(!c(m)){const E=u[m];E&&clearTimeout(E),u[m]=setTimeout(()=>{c(m)||v.dispatch(o({queryCacheKey:m})),delete u[m]},k*1e3)}}return f},Oz=new Error("Promise never resolved before cacheEntryRemoved."),L3e=({api:t,reducerPath:e,context:n,queryThunk:r,mutationThunk:s,internalState:o})=>{const i=iT(r),a=iT(s),l=ld(r,s),c={};function u(v,b,w){const C=c[v];C!=null&&C.valueResolved&&(C.valueResolved({data:b,meta:w}),delete C.valueResolved)}function f(v){const b=c[v];b&&(delete c[v],b.cacheEntryRemoved())}const h=(v,b,w)=>{const C=m(v);function k(E,j,A,M){const _=w[e].queries[j],D=b.getState()[e].queries[j];!_&&D&&y(E,M,j,b,A)}if(r.pending.match(v))k(v.meta.arg.endpointName,C,v.meta.requestId,v.meta.arg.originalArgs);else if(t.internalActions.cacheEntriesUpserted.match(v))for(const{queryDescription:E,value:j}of v.payload){const{endpointName:A,originalArgs:M,queryCacheKey:_}=E;k(A,_,v.meta.requestId,M),u(_,j,{})}else if(s.pending.match(v))b.getState()[e].mutations[C]&&y(v.meta.arg.endpointName,v.meta.arg.originalArgs,C,b,v.meta.requestId);else if(l(v))u(C,v.payload,v.meta.baseQueryMeta);else if(t.internalActions.removeQueryResult.match(v)||t.internalActions.removeMutationResult.match(v))f(C);else if(t.util.resetApiState.match(v))for(const E of Object.keys(c))f(E)};function m(v){return i(v)?v.meta.arg.queryCacheKey:a(v)?v.meta.arg.fixedCacheKey??v.meta.requestId:t.internalActions.removeQueryResult.match(v)?v.payload.queryCacheKey:t.internalActions.removeMutationResult.match(v)?Eg(v.payload):""}function y(v,b,w,C,k){const E=n.endpointDefinitions[v],j=E==null?void 0:E.onCacheEntryAdded;if(!j)return;const A={},M=new Promise(B=>{A.cacheEntryRemoved=B}),_=Promise.race([new Promise(B=>{A.valueResolved=B}),M.then(()=>{throw Oz})]);_.catch(()=>{}),c[w]=A;const D=t.endpoints[v].select(E.type==="query"?b:w),R=C.dispatch((B,L,P)=>P),N={...C,getCacheEntry:()=>D(C.getState()),requestId:k,extra:R,updateCachedData:E.type==="query"?B=>C.dispatch(t.util.updateQueryData(v,b,B)):void 0,cacheDataLoaded:_,cacheEntryRemoved:M},z=j(b,N);Promise.resolve(z).catch(B=>{if(B!==Oz)throw B})}return h},$3e=({api:t,context:{apiUid:e},reducerPath:n})=>(r,s)=>{t.util.resetApiState.match(r)&&s.dispatch(t.internalActions.middlewareRegistered(e))},F3e=({reducerPath:t,context:e,context:{endpointDefinitions:n},mutationThunk:r,queryThunk:s,api:o,assertTagType:i,refetchQuery:a,internalState:l})=>{const{removeQueryResult:c}=o.internalActions,u=_c(ld(r),B4(r)),f=_c(ld(r,s),em(r,s));let h=[];const m=(b,w)=>{u(b)?v(yQ(b,"invalidatesTags",n,i),w):f(b)?v([],w):o.util.invalidateTags.match(b)&&v(M_(b.payload,void 0,void 0,void 0,void 0,i),w)};function y(b){var w,C;for(const k in b.queries)if(((w=b.queries[k])==null?void 0:w.status)==="pending")return!0;for(const k in b.mutations)if(((C=b.mutations[k])==null?void 0:C.status)==="pending")return!0;return!1}function v(b,w){const C=w.getState(),k=C[t];if(h.push(...b),k.config.invalidationBehavior==="delayed"&&y(k))return;const E=h;if(h=[],E.length===0)return;const j=o.util.selectInvalidatedBy(C,E);e.batch(()=>{const A=Array.from(j.values());for(const{queryCacheKey:M}of A){const _=k.queries[M],D=l.currentSubscriptions[M]??{};_&&(Nh(D)===0?w.dispatch(c({queryCacheKey:M})):_.status!=="uninitialized"&&w.dispatch(a(_)))}})}return m},z3e=({reducerPath:t,queryThunk:e,api:n,refetchQuery:r,internalState:s})=>{const o={},i=(h,m)=>{(n.internalActions.updateSubscriptionOptions.match(h)||n.internalActions.unsubscribeQueryResult.match(h))&&l(h.payload,m),(e.pending.match(h)||e.rejected.match(h)&&h.meta.condition)&&l(h.meta.arg,m),(e.fulfilled.match(h)||e.rejected.match(h)&&!h.meta.condition)&&a(h.meta.arg,m),n.util.resetApiState.match(h)&&u()};function a({queryCacheKey:h},m){const y=m.getState()[t],v=y.queries[h],b=s.currentSubscriptions[h];if(!v||v.status==="uninitialized")return;const{lowestPollingInterval:w,skipPollingIfUnfocused:C}=f(b);if(!Number.isFinite(w))return;const k=o[h];k!=null&&k.timeout&&(clearTimeout(k.timeout),k.timeout=void 0);const E=Date.now()+w;o[h]={nextPollTimestamp:E,pollingInterval:w,timeout:setTimeout(()=>{(y.config.focused||!C)&&m.dispatch(r(v)),a({queryCacheKey:h},m)},w)}}function l({queryCacheKey:h},m){const v=m.getState()[t].queries[h],b=s.currentSubscriptions[h];if(!v||v.status==="uninitialized")return;const{lowestPollingInterval:w}=f(b);if(!Number.isFinite(w)){c(h);return}const C=o[h],k=Date.now()+w;(!C||k<C.nextPollTimestamp)&&a({queryCacheKey:h},m)}function c(h){const m=o[h];m!=null&&m.timeout&&clearTimeout(m.timeout),delete o[h]}function u(){for(const h of Object.keys(o))c(h)}function f(h={}){let m=!1,y=Number.POSITIVE_INFINITY;for(let v in h)h[v].pollingInterval&&(y=Math.min(h[v].pollingInterval,y),m=h[v].skipPollingIfUnfocused||m);return{lowestPollingInterval:y,skipPollingIfUnfocused:m}}return i},P3e=({api:t,context:e,queryThunk:n,mutationThunk:r})=>{const s=C_(n,r),o=em(n,r),i=ld(n,r),a={};return(c,u)=>{var f,h;if(s(c)){const{requestId:m,arg:{endpointName:y,originalArgs:v}}=c.meta,b=e.endpointDefinitions[y],w=b==null?void 0:b.onQueryStarted;if(w){const C={},k=new Promise((M,_)=>{C.resolve=M,C.reject=_});k.catch(()=>{}),a[m]=C;const E=t.endpoints[y].select(b.type==="query"?v:m),j=u.dispatch((M,_,D)=>D),A={...u,getCacheEntry:()=>E(u.getState()),requestId:m,extra:j,updateCachedData:b.type==="query"?M=>u.dispatch(t.util.updateQueryData(y,v,M)):void 0,queryFulfilled:k};w(v,A)}}else if(i(c)){const{requestId:m,baseQueryMeta:y}=c.meta;(f=a[m])==null||f.resolve({data:c.payload,meta:y}),delete a[m]}else if(o(c)){const{requestId:m,rejectedWithValue:y,baseQueryMeta:v}=c.meta;(h=a[m])==null||h.reject({error:c.payload??c.error,isUnhandledError:!y,meta:v}),delete a[m]}}},B3e=({reducerPath:t,context:e,api:n,refetchQuery:r,internalState:s})=>{const{removeQueryResult:o}=n.internalActions,i=(l,c)=>{E_.match(l)&&a(c,"refetchOnFocus"),T_.match(l)&&a(c,"refetchOnReconnect")};function a(l,c){const u=l.getState()[t],f=u.queries,h=s.currentSubscriptions;e.batch(()=>{for(const m of Object.keys(h)){const y=f[m],v=h[m];if(!v||!y)continue;(Object.values(v).some(w=>w[c]===!0)||Object.values(v).every(w=>w[c]===void 0)&&u.config[c])&&(Nh(v)===0?l.dispatch(o({queryCacheKey:m})):y.status!=="uninitialized"&&l.dispatch(r(y)))}})}return i};function H3e(t){const{reducerPath:e,queryThunk:n,api:r,context:s}=t,{apiUid:o}=s,i={invalidateTags:Ma(`${e}/invalidateTags`)},a=f=>f.type.startsWith(`${e}/`),l=[$3e,N3e,F3e,z3e,L3e,P3e];return{middleware:f=>{let h=!1;const y={...t,internalState:{currentSubscriptions:{}},refetchQuery:u,isThisApiSliceAction:a},v=l.map(C=>C(y)),b=D3e(y),w=B3e(y);return C=>k=>{if(!rQ(k))return C(k);h||(h=!0,f.dispatch(r.internalActions.middlewareRegistered(o)));const E={...f,next:C},j=f.getState(),[A,M]=b(k,E,j);let _;if(A?_=C(k):_=M,f.getState()[e]&&(w(k,E,j),a(k)||s.hasRehydrationInfo(k)))for(const D of v)D(k,E,j);return _}},actions:i};function u(f){return t.api.endpoints[f.endpointName].initiate(f.originalArgs,{subscribe:!1,forceRefetch:!0})}}var Nz=Symbol(),U3e=({createSelector:t=S_}={})=>({name:Nz,init(e,{baseQuery:n,tagTypes:r,reducerPath:s,serializeQueryArgs:o,keepUnusedDataFor:i,refetchOnMountOrArgChange:a,refetchOnFocus:l,refetchOnReconnect:c,invalidationBehavior:u},f){zxe();const h=$=>$;Object.assign(e,{reducerPath:s,endpoints:{},internalActions:{onOnline:T_,onOffline:mQ,onFocus:E_,onFocusLost:hQ},util:{}});const{queryThunk:m,mutationThunk:y,patchQueryData:v,updateQueryData:b,upsertQueryData:w,prefetch:C,buildMatchThunkActions:k}=j3e({baseQuery:n,reducerPath:s,context:f,api:e,serializeQueryArgs:o,assertTagType:h}),{reducer:E,actions:j}=A3e({context:f,queryThunk:m,mutationThunk:y,serializeQueryArgs:o,reducerPath:s,assertTagType:h,config:{refetchOnFocus:l,refetchOnReconnect:c,refetchOnMountOrArgChange:a,keepUnusedDataFor:i,reducerPath:s,invalidationBehavior:u}});Su(e.util,{patchQueryData:v,updateQueryData:b,upsertQueryData:w,prefetch:C,resetApiState:j.resetApiState,upsertQueryEntries:j.cacheEntriesUpserted}),Su(e.internalActions,j);const{middleware:A,actions:M}=H3e({reducerPath:s,context:f,queryThunk:m,mutationThunk:y,api:e,assertTagType:h});Su(e.util,M),Su(e,{reducer:E,middleware:A});const{buildQuerySelector:_,buildMutationSelector:D,selectInvalidatedBy:R,selectCachedArgsForQuery:N}=_3e({serializeQueryArgs:o,reducerPath:s,createSelector:t});Su(e.util,{selectInvalidatedBy:R,selectCachedArgsForQuery:N});const{buildInitiateQuery:z,buildInitiateMutation:B,getRunningMutationThunk:L,getRunningMutationsThunk:P,getRunningQueriesThunk:I,getRunningQueryThunk:H}=M3e({queryThunk:m,mutationThunk:y,api:e,serializeQueryArgs:o,context:f});return Su(e.util,{getRunningMutationThunk:L,getRunningMutationsThunk:P,getRunningQueryThunk:H,getRunningQueriesThunk:I}),{name:Nz,injectEndpoint($,V){var q;const U=e;(q=U.endpoints)[$]??(q[$]={}),gQ(V)?Su(U.endpoints[$],{name:$,select:_($,V),initiate:z($,V)},k(m,$)):k3e(V)&&Su(U.endpoints[$],{name:$,select:D(),initiate:B($)},k(y,$))}}}});const V3e="/api",q3e="http://localhost:3050",W3e=async t=>(t.set("Content-Type","application/json"),t),Y3e=({url:t,baseUrl:e,isMockEndpoint:n,isMock:r})=>`${(n!==void 0?n:r)?q3e:e||V3e}${t}`,H4=(t,e={isMock:!1})=>{const{baseUrl:n,isMock:r}=e||{};return async(s,o,i)=>{var a;const l=Y3e({url:t,baseUrl:n,isMockEndpoint:(a=o.meta)==null?void 0:a.isMock,isMock:r});return C3e({baseUrl:l,prepareHeaders:W3e})(s,o,i)}};var ex={exports:{}},G3e=ex.exports,Lz;function K3e(){return Lz||(Lz=1,(function(t,e){(function(n,r){t.exports=r()})(G3e,function(){var n,r,s=1e3,o=6e4,i=36e5,a=864e5,l=/\[([^\]]+)]|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,c=31536e6,u=2628e6,f=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/,h={years:c,months:u,days:a,hours:i,minutes:o,seconds:s,milliseconds:1,weeks:6048e5},m=function(A){return A instanceof E},y=function(A,M,_){return new E(A,_,M.$l)},v=function(A){return r.p(A)+"s"},b=function(A){return A<0},w=function(A){return b(A)?Math.ceil(A):Math.floor(A)},C=function(A){return Math.abs(A)},k=function(A,M){return A?b(A)?{negative:!0,format:""+C(A)+M}:{negative:!1,format:""+A+M}:{negative:!1,format:""}},E=(function(){function A(_,D,R){var N=this;if(this.$d={},this.$l=R,_===void 0&&(this.$ms=0,this.parseFromMilliseconds()),D)return y(_*h[v(D)],this);if(typeof _=="number")return this.$ms=_,this.parseFromMilliseconds(),this;if(typeof _=="object")return Object.keys(_).forEach(function(L){N.$d[v(L)]=_[L]}),this.calMilliseconds(),this;if(typeof _=="string"){var z=_.match(f);if(z){var B=z.slice(2).map(function(L){return L!=null?Number(L):0});return this.$d.years=B[0],this.$d.months=B[1],this.$d.weeks=B[2],this.$d.days=B[3],this.$d.hours=B[4],this.$d.minutes=B[5],this.$d.seconds=B[6],this.calMilliseconds(),this}}return this}var M=A.prototype;return M.calMilliseconds=function(){var _=this;this.$ms=Object.keys(this.$d).reduce(function(D,R){return D+(_.$d[R]||0)*h[R]},0)},M.parseFromMilliseconds=function(){var _=this.$ms;this.$d.years=w(_/c),_%=c,this.$d.months=w(_/u),_%=u,this.$d.days=w(_/a),_%=a,this.$d.hours=w(_/i),_%=i,this.$d.minutes=w(_/o),_%=o,this.$d.seconds=w(_/s),_%=s,this.$d.milliseconds=_},M.toISOString=function(){var _=k(this.$d.years,"Y"),D=k(this.$d.months,"M"),R=+this.$d.days||0;this.$d.weeks&&(R+=7*this.$d.weeks);var N=k(R,"D"),z=k(this.$d.hours,"H"),B=k(this.$d.minutes,"M"),L=this.$d.seconds||0;this.$d.milliseconds&&(L+=this.$d.milliseconds/1e3,L=Math.round(1e3*L)/1e3);var P=k(L,"S"),I=_.negative||D.negative||N.negative||z.negative||B.negative||P.negative,H=z.format||B.format||P.format?"T":"",$=(I?"-":"")+"P"+_.format+D.format+N.format+H+z.format+B.format+P.format;return $==="P"||$==="-P"?"P0D":$},M.toJSON=function(){return this.toISOString()},M.format=function(_){var D=_||"YYYY-MM-DDTHH:mm:ss",R={Y:this.$d.years,YY:r.s(this.$d.years,2,"0"),YYYY:r.s(this.$d.years,4,"0"),M:this.$d.months,MM:r.s(this.$d.months,2,"0"),D:this.$d.days,DD:r.s(this.$d.days,2,"0"),H:this.$d.hours,HH:r.s(this.$d.hours,2,"0"),m:this.$d.minutes,mm:r.s(this.$d.minutes,2,"0"),s:this.$d.seconds,ss:r.s(this.$d.seconds,2,"0"),SSS:r.s(this.$d.milliseconds,3,"0")};return D.replace(l,function(N,z){return z||String(R[N])})},M.as=function(_){return this.$ms/h[v(_)]},M.get=function(_){var D=this.$ms,R=v(_);return R==="milliseconds"?D%=1e3:D=R==="weeks"?w(D/h[R]):this.$d[R],D||0},M.add=function(_,D,R){var N;return N=D?_*h[v(D)]:m(_)?_.$ms:y(_,this).$ms,y(this.$ms+N*(R?-1:1),this)},M.subtract=function(_,D){return this.add(_,D,!0)},M.locale=function(_){var D=this.clone();return D.$l=_,D},M.clone=function(){return y(this.$ms,this)},M.humanize=function(_){return n().add(this.$ms,"ms").locale(this.$l).fromNow(!_)},M.valueOf=function(){return this.asMilliseconds()},M.milliseconds=function(){return this.get("milliseconds")},M.asMilliseconds=function(){return this.as("milliseconds")},M.seconds=function(){return this.get("seconds")},M.asSeconds=function(){return this.as("seconds")},M.minutes=function(){return this.get("minutes")},M.asMinutes=function(){return this.as("minutes")},M.hours=function(){return this.get("hours")},M.asHours=function(){return this.as("hours")},M.days=function(){return this.get("days")},M.asDays=function(){return this.as("days")},M.weeks=function(){return this.get("weeks")},M.asWeeks=function(){return this.as("weeks")},M.months=function(){return this.get("months")},M.asMonths=function(){return this.as("months")},M.years=function(){return this.get("years")},M.asYears=function(){return this.as("years")},A})(),j=function(A,M,_){return A.add(M.years()*_,"y").add(M.months()*_,"M").add(M.days()*_,"d").add(M.hours()*_,"h").add(M.minutes()*_,"m").add(M.seconds()*_,"s").add(M.milliseconds()*_,"ms")};return function(A,M,_){n=_,r=_().$utils(),_.duration=function(N,z){var B=_.locale();return y(N,{$l:B},z)},_.isDuration=m;var D=M.prototype.add,R=M.prototype.subtract;M.prototype.add=function(N,z){return m(N)?j(this,N,1):D.bind(this)(N,z)},M.prototype.subtract=function(N,z){return m(N)?j(this,N,-1):R.bind(this)(N,z)}}})})(ex)),ex.exports}var X3e=K3e();const Z3e=tQ(X3e);Oh.extend(Z3e);const bQ=(t,e)=>{let n;if(typeof t=="string"){if(!t)return t;const l=new Date(t),c=new Date;if(isNaN(l.getTime()))return console.warn("Invalid date format for duration formatter:",t),t;const u=l.getTime()-c.getTime();if(u<=0)return e?e("ds:notifications.duration.started",{defaultValue:"Started"}):"Started";n=Math.floor(u/1e3)}else{if(typeof t!="number"||t<=0)return e?e("ds:notifications.duration.started",{defaultValue:"Started"}):"Started";n=Math.floor(t)}const r=Oh.duration(n,"seconds"),s=r.weeks(),o=r.days(),i=r.hours(),a=r.minutes();if(e)try{if(s>0)return e("ds:notifications.duration.week",{count:s});if(o>0)return e("ds:notifications.duration.day",{count:o});if(i>0&&a>0){const l=e("ds:notifications.duration.hour",{count:i}),c=e("ds:notifications.duration.minute",{count:a});return`${l} ${c}`}return i>0?e("ds:notifications.duration.hour",{count:i}):a>0?e("ds:notifications.duration.minute",{count:a}):e("ds:notifications.duration.lessThanMinute")}catch(l){console.warn("UI Kit duration translation failed, falling back to English:",l)}return s>0?`${s}w`:o>0?`${o}d`:i>0&&a>0?`${i}:${a.toString().padStart(2,"0")}`:i>0?`${i}:00`:a>0?`${a}m`:"<1m"},Q3e=(t,e)=>!t||typeof t=="string"&&t.trim()===""?(e==null?void 0:e.fallback)||(e==null?void 0:e[0]):t,J3e=(t,e)=>{if(t<=0)return e?e("ds:notifications.CalendarEventUpcoming.started",{defaultValue:"started"}):"started";{const n=bQ(t,e);return`${e?e("ds:notifications.CalendarEventUpcoming.willStartIn",{defaultValue:"will start in"}):"will start in"} <strong>${n}</strong>`}},j2=({title:t,date:e,isMobile:n})=>d.jsxs(ve,{justify:"space-between",pr:"xs",children:[d.jsx(ue,{c:"primary",size:n?"sm":"md",fw:600,children:t}),d.jsx(ue,{size:"sm",c:"grey.5",children:Cxe(e)})]}),A2=({children:t,isMobile:e})=>d.jsx(ue,{size:e?"xs":"sm",c:"primary",lineClamp:4,style:{wordBreak:"break-word"},children:t}),ewe=({children:t})=>{const{isDark:e}=eQ();return d.jsx(xd,{p:"xs",radius:"lg",bg:e?"gray.7":"gray.1",c:"grey.6",style:{borderTopLeftRadius:0},children:d.jsx(ue,{size:"xs",fs:"italic",fw:400,lineClamp:2,style:{wordBreak:"break-word"},children:t})})},_2=({source:t,subject:e,isMobile:n})=>d.jsx(ve,{children:d.jsxs(ue,{style:{fontSize:n?"10px":"12px",wordBreak:"break-all"},c:"secondary",lineClamp:1,children:[t," • ",e]})}),twe=t=>({[An.DiskFileShared]:"DiskFileShared",[An.DiskFileCommented]:"DiskFileCommented",[An.DiskFileMentioned]:"DiskFileMentioned",[An.DiskFileUploaded]:"DiskFileUploaded",[An.DiskFilePermissionGranted]:"DiskFilePermissionGranted",[An.DiskFileDownloadReady]:"DiskFileDownloadReady",[An.DiskLinkGenerated]:"DiskLinkGenerated",[An.DiskDirectoryShared]:"DiskDirectoryShared",[An.DiskRoomShared]:"DiskRoomShared",[An.ProjectShared]:"ProjectShared",[An.ProjectTaskCreated]:"ProjectTaskCreated",[An.ProjectTaskDeleted]:"ProjectTaskDeleted",[An.ProjectTaskUpdated]:"ProjectTaskUpdated",[An.ProjectTaskMoved]:"ProjectTaskMoved",[An.ProjectTaskStatusChanged]:"ProjectTaskStatusChanged",[An.ProjectTaskCommented]:"ProjectTaskCommented",[An.ProjectMyTaskDeleted]:"ProjectMyTaskDeleted",[An.ProjectMyTaskUpdated]:"ProjectMyTaskUpdated",[An.ProjectMyTaskMoved]:"ProjectMyTaskMoved",[An.ProjectMyTaskStatusChanged]:"ProjectMyTaskStatusChanged",[An.ProjectMyTaskCommented]:"ProjectMyTaskCommented",[An.ProjectTaskUnassigned]:"ProjectTaskUnassigned",[An.ProjectTaskAssigned]:"ProjectTaskAssigned",[An.ProjectTaskMentioned]:"ProjectTaskMentioned",[An.ProjectTaskAttachmentAdded]:"ProjectTaskAttachmentAdded",[An.ProjectSprintCreated]:"ProjectSprintCreated",[An.AdminRoleAssigned]:"AdminRoleAssigned",[An.AdminRoleDeleted]:"AdminRoleDeleted",[An.MailMessageImportant]:"MailMessageImportant",[An.MailMessageReceived]:"MailMessageReceived",[An.CalendarShared]:"CalendarShared",[An.CalendarEventCanceled]:"CalendarEventCanceled",[An.CalendarEventInvited]:"CalendarEventInvited",[An.CalendarEventUpdated]:"CalendarEventUpdated",[An.CalendarEventUpcoming]:"CalendarEventUpcoming"})[t]||"unknown",nwe=({notification:t,isMobile:e})=>{const{t:n}=Le(),r=twe(t.type);return d.jsxs(C2,{children:[d.jsx(j2,{title:n(`ds:notifications.${r}.title`),date:t.date,isMobile:e}),d.jsx(A2,{isMobile:e,children:d.jsx(S2,{i18nKey:`ds:notifications.${r}.description`,values:t,components:{strong:d.jsx("strong",{},"strong"),br:d.jsx("br",{},"br")}})}),t.action.description&&d.jsx(ewe,{children:t.action.description}),d.jsx(_2,{source:t.source.title,subject:t.action.subject,isMobile:e})]})};var j_=(t=>(t.GET="GET",t.POST="POST",t.PUT="PUT",t.PATCH="PATCH",t.DELETE="DELETE",t))(j_||{});const Yo={System:0,Disk:1,Projects:2,Calendar:3,Mail:4,Contacts:5,Admin:6,Forms:7,Draw:8,Payments:9,Team:10,Pages:11},rwe={Deny:-4096,OnlyUpload:-1024,FreeBusy:-64,CanDownload:-16,Read:0,Comment:1,Review:2,Write:4,Delete:8,FullInternal:256,Full:512,Lock:4096,LockPrint:8192,LockCopy:16384,LockDownload:32768},Tg={Completed:2,Blocked:3,Error:4},swe={en:{success:{title:"File link generated",description:"Your file <a><strong>«{{fileName}}»</strong></a> has been successfully validated."},error:{title:"Failed to generate link",description:"Your file <strong>«{{fileName}}»</strong> didn't pass validation. Try again."}},ru:{success:{title:"Ссылка на файл сгенерирована",description:"Ваш файл <a><strong>«{{fileName}}»</strong></a> успешно прошёл проверку."},error:{title:"Ссылка не создана",description:"Ваш файл <strong>«{{fileName}}»</strong> не прошёл проверку. Поробуйте снова."}}},owe=({notification:t,isMobile:e})=>{const{i18n:n}=Le(),r=n.language==="ru"?"ru":"en",s=t.action.dlpCheckStatus===Tg.Completed,o=swe[r][s?"success":"error"],i={fileName:t.action.subject};return d.jsxs(C2,{children:[d.jsx(j2,{title:o.title,date:t.date,isMobile:e}),d.jsx(A2,{isMobile:e,children:d.jsx(S2,{i18nKey:o.description,values:i,components:{strong:d.jsx("strong",{},"strong"),a:d.jsx("a",{href:t.action.externalLinkUrl,target:"_blank",rel:"noopener noreferrer"},"link")}})}),d.jsx(_2,{source:t.source.title,subject:t.action.subject,isMobile:e})]})},iwe={en:{completed:{title:"File Uploaded",description:"The file <strong>«{{fileName}}»</strong> has been uploaded and checked successfully."},blocked:{title:"File Upload Blocked",description:"The file <strong>«{{fileName}}»</strong> was blocked by DLP policy."},error:{title:"File Upload Error",description:"An error occurred while checking the file <strong>«{{fileName}}»</strong>."}},ru:{completed:{title:"Файл загружен",description:"Файл <strong>«{{fileName}}»</strong> был загружен и успешно проверен."},blocked:{title:"Загрузка файла отклонена",description:"Файл <strong>«{{fileName}}»</strong> был заблокирован политикой DLP."},error:{title:"Ошибка при загрузке файла",description:"Произошла ошибка при проверке файла <strong>«{{fileName}}»</strong>."}}},awe=({notification:t,isMobile:e})=>{const{i18n:n}=Le(),r=n.language==="ru"?"ru":"en",s=t.action.dlpCheckStatus;let o="completed";s&&(s===Tg.Blocked?o="blocked":s===Tg.Error&&(o="error"));const i=iwe[r][o],a={fileName:t.action.subject};return d.jsxs(C2,{children:[d.jsx(j2,{title:i.title,date:t.date,isMobile:e}),d.jsx(A2,{isMobile:e,children:d.jsx(S2,{i18nKey:i.description,values:a,components:{strong:d.jsx("strong",{},"strong")}})}),d.jsx(_2,{source:t.source.title,subject:t.action.subject,isMobile:e})]})},lwe={en:{success:{title:"Permissions granted",description:"<strong>«{{roleName}}»</strong> permissions granted to user <strong>{{userName}}</strong>. Your file has been successfully validated."},error:{title:"Failed to grant permissions",description:"Failed to grant permissions to user. Your file didn't pass validation. Try again."}},ru:{success:{title:"Права выданы",description:"Права <strong>«{{roleName}}»</strong> пользователю <strong>{{userName}}</strong> выданы. Ваш файл успешно прошёл проверку."},error:{title:"Доступ не выдан",description:"Ваш файл не прошёл проверку. Попробуйте снова."}}},cwe=({notification:t,isMobile:e})=>{const{i18n:n}=Le(),r=n.language==="ru"?"ru":"en",s=t.action.dlpCheckStatus===Tg.Completed,o=lwe[r][s?"success":"error"],i={roleName:t.action.roleName||"",userName:t.action.targetUserName||""};return d.jsxs(C2,{children:[d.jsx(j2,{title:o.title,date:t.date,isMobile:e}),d.jsx(A2,{isMobile:e,children:d.jsx(S2,{i18nKey:o.description,values:i,components:{strong:d.jsx("strong",{},"strong")}})}),d.jsx(_2,{source:t.source.title,subject:t.action.subject,isMobile:e})]})},uwe={en:{success:{title:"File is ready to download",description:"Your file <a><strong>«{{fileName}}»</strong></a> has been successfully validated and is ready to download."},error:{title:"Unable to download file",description:"Your file didn't pass validation. Try again."}},ru:{success:{title:"Файл готов к скачиванию",description:"Ваш файл <a><strong>«{{fileName}}»</strong></a> успешно прошёл проверку и готов к скачиванию."},error:{title:"Не удаётся скачать файл",description:"Ваш файл не прошёл проверку. Попробуйте снова."}}},dwe=({notification:t,isMobile:e})=>{const{i18n:n}=Le(),r=n.language==="ru"?"ru":"en",s=t.action.dlpCheckStatus===Tg.Completed,o=uwe[r][s?"success":"error"],i=o.title.replace("{{fileName}}",t.action.subject),a={fileName:t.action.subject};return d.jsxs(C2,{children:[d.jsx(j2,{title:i,date:t.date,isMobile:e}),d.jsx(A2,{isMobile:e,children:d.jsx(S2,{values:a,i18nKey:o.description,components:{strong:d.jsx("strong",{},"strong"),a:d.jsx("a",{href:t.action.downloadUrl,target:"_blank",rel:"noopener noreferrer"},"link")}})}),d.jsx(_2,{source:t.source.title,subject:t.action.subject,isMobile:e})]})},fwe={[An.DiskLinkGenerated]:owe,[An.DiskFileUploaded]:awe,[An.DiskFilePermissionGranted]:cwe,[An.DiskFileDownloadReady]:dwe},pwe=t=>fwe[t]||nwe,hwe=({notification:t,indicatorSlot:e,avatarSlot:n,onClick:r})=>{const{isDark:s}=eQ(),o=S.useRef(null),{hovered:i,ref:a}=Npe(),[l,c]=S.useState(!0),u=S.useMemo(()=>pwe(t.type),[t.type]);S.useEffect(()=>{var h;c((((h=o==null?void 0:o.current)==null?void 0:h.offsetWidth)||0)<576)},[o]);const f=()=>{r&&r(t)};return d.jsx("a",{href:t.action.subjectUrl,style:{textDecoration:"none"},target:"_blank",onClick:f,ref:o,children:d.jsxs(xe,{gap:"xs",p:"sm",style:h=>({backgroundColor:i?s?h.colors.gray[8]:h.colors.gray[0]:"transparent"}),ref:a,children:[n?d.jsx(n,{notification:t,size:l?30:40}):d.jsx(Pc,{title:t.actor,src:t.imageUrl,color:"cyan",size:l?30:40}),d.jsx(u,{notification:t,isMobile:l},t.id),e&&d.jsx(ie,{mt:l?1:3,children:d.jsx(e,{hovered:i,notification:t})})]})})},mwe="notifications:new",gwe=t=>{const e=new CustomEvent(mwe,{detail:{notifications:t}});window.dispatchEvent(e)};/**
 * @license @tabler/icons-react v3.28.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */var ywe={outline:{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},filled:{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"currentColor",stroke:"none"}};/**
 * @license @tabler/icons-react v3.28.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const Ba=(t,e,n,r)=>{const s=S.forwardRef(({color:o="currentColor",size:i=24,stroke:a=2,title:l,className:c,children:u,...f},h)=>S.createElement("svg",{ref:h,...ywe[t],width:i,height:i,className:["tabler-icon",`tabler-icon-${e}`,c].join(" "),...t==="filled"?{fill:o}:{strokeWidth:a,stroke:o},...f},[l&&S.createElement("title",{key:"svg-title"},l),...r.map(([m,y])=>S.createElement(m,y)),...Array.isArray(u)?u:[u]]));return s.displayName=`${n}`,s};/**
 * @license @tabler/icons-react v3.28.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */var vwe=Ba("outline","archive","IconArchive",[["path",{d:"M3 4m0 2a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v0a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2z",key:"svg-0"}],["path",{d:"M5 8v10a2 2 0 0 0 2 2h10a2 2 0 0 0 2 -2v-10",key:"svg-1"}],["path",{d:"M10 12l4 0",key:"svg-2"}]]);/**
 * @license @tabler/icons-react v3.28.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */var bwe=Ba("outline","bell","IconBell",[["path",{d:"M10 5a2 2 0 1 1 4 0a7 7 0 0 1 4 6v3a4 4 0 0 0 2 3h-16a4 4 0 0 0 2 -3v-3a7 7 0 0 1 4 -6",key:"svg-0"}],["path",{d:"M9 17v1a3 3 0 0 0 6 0v-1",key:"svg-1"}]]);/**
 * @license @tabler/icons-react v3.28.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */var xwe=Ba("outline","building-skyscraper","IconBuildingSkyscraper",[["path",{d:"M3 21l18 0",key:"svg-0"}],["path",{d:"M5 21v-14l8 -4v18",key:"svg-1"}],["path",{d:"M19 21v-10l-6 -4",key:"svg-2"}],["path",{d:"M9 9l0 .01",key:"svg-3"}],["path",{d:"M9 12l0 .01",key:"svg-4"}],["path",{d:"M9 15l0 .01",key:"svg-5"}],["path",{d:"M9 18l0 .01",key:"svg-6"}]]);/**
 * @license @tabler/icons-react v3.28.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */var wwe=Ba("outline","calendar-event","IconCalendarEvent",[["path",{d:"M4 5m0 2a2 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",key:"svg-0"}],["path",{d:"M16 3l0 4",key:"svg-1"}],["path",{d:"M8 3l0 4",key:"svg-2"}],["path",{d:"M4 11l16 0",key:"svg-3"}],["path",{d:"M8 15h2v2h-2z",key:"svg-4"}]]);/**
 * @license @tabler/icons-react v3.28.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */var Swe=Ba("outline","checks","IconChecks",[["path",{d:"M7 12l5 5l10 -10",key:"svg-0"}],["path",{d:"M2 12l5 5m5 -5l5 -5",key:"svg-1"}]]);/**
 * @license @tabler/icons-react v3.28.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */var Cwe=Ba("outline","mail","IconMail",[["path",{d:"M3 7a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v10a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2v-10z",key:"svg-0"}],["path",{d:"M3 7l9 6l9 -6",key:"svg-1"}]]);/**
 * @license @tabler/icons-react v3.28.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */var kwe=Ba("outline","settings","IconSettings",[["path",{d:"M10.325 4.317c.426 -1.756 2.924 -1.756 3.35 0a1.724 1.724 0 0 0 2.573 1.066c1.543 -.94 3.31 .826 2.37 2.37a1.724 1.724 0 0 0 1.065 2.572c1.756 .426 1.756 2.924 0 3.35a1.724 1.724 0 0 0 -1.066 2.573c.94 1.543 -.826 3.31 -2.37 2.37a1.724 1.724 0 0 0 -2.572 1.065c-.426 1.756 -2.924 1.756 -3.35 0a1.724 1.724 0 0 0 -2.573 -1.066c-1.543 .94 -3.31 -.826 -2.37 -2.37a1.724 1.724 0 0 0 -1.065 -2.572c-1.756 -.426 -1.756 -2.924 0 -3.35a1.724 1.724 0 0 0 1.066 -2.573c-.94 -1.543 .826 -3.31 2.37 -2.37c1 .608 2.296 .07 2.572 -1.065z",key:"svg-0"}],["path",{d:"M9 12a3 3 0 1 0 6 0a3 3 0 0 0 -6 0",key:"svg-1"}]]);/**
 * @license @tabler/icons-react v3.28.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */var Ewe=Ba("outline","star","IconStar",[["path",{d:"M12 17.75l-6.172 3.245l1.179 -6.873l-5 -4.867l6.9 -1l3.086 -6.253l3.086 6.253l6.9 1l-5 4.867l1.179 6.873z",key:"svg-0"}]]);/**
 * @license @tabler/icons-react v3.28.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */var Twe=Ba("outline","user-plus","IconUserPlus",[["path",{d:"M8 7a4 4 0 1 0 8 0a4 4 0 0 0 -8 0",key:"svg-0"}],["path",{d:"M16 19h6",key:"svg-1"}],["path",{d:"M19 16v6",key:"svg-2"}],["path",{d:"M6 21v-2a4 4 0 0 1 4 -4h4",key:"svg-3"}]]);/**
 * @license @tabler/icons-react v3.28.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */var Mwe=Ba("outline","users","IconUsers",[["path",{d:"M9 7m-4 0a4 4 0 1 0 8 0a4 4 0 1 0 -8 0",key:"svg-0"}],["path",{d:"M3 21v-2a4 4 0 0 1 4 -4h4a4 4 0 0 1 4 4v2",key:"svg-1"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"svg-2"}],["path",{d:"M21 21v-2a4 4 0 0 0 -3 -3.85",key:"svg-3"}]]);/**
 * @license @tabler/icons-react v3.28.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */var jwe=Ba("filled","star-filled","IconStarFilled",[["path",{d:"M8.243 7.34l-6.38 .925l-.113 .023a1 1 0 0 0 -.44 1.684l4.622 4.499l-1.09 6.355l-.013 .11a1 1 0 0 0 1.464 .944l5.706 -3l5.693 3l.1 .046a1 1 0 0 0 1.352 -1.1l-1.091 -6.355l4.624 -4.5l.078 -.085a1 1 0 0 0 -.633 -1.62l-6.38 -.926l-2.852 -5.78a1 1 0 0 0 -1.794 0l-2.853 5.78z",key:"svg-0"}]]),dk={exports:{}},fk={};/**
 * @license React
 * use-sync-external-store-with-selector.production.js
 *
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var $z;function Awe(){if($z)return fk;$z=1;var t=It;function e(l,c){return l===c&&(l!==0||1/l===1/c)||l!==l&&c!==c}var n=typeof Object.is=="function"?Object.is:e,r=t.useSyncExternalStore,s=t.useRef,o=t.useEffect,i=t.useMemo,a=t.useDebugValue;return fk.useSyncExternalStoreWithSelector=function(l,c,u,f,h){var m=s(null);if(m.current===null){var y={hasValue:!1,value:null};m.current=y}else y=m.current;m=i(function(){function b(j){if(!w){if(w=!0,C=j,j=f(j),h!==void 0&&y.hasValue){var A=y.value;if(h(A,j))return k=A}return k=j}if(A=k,n(C,j))return A;var M=f(j);return h!==void 0&&h(A,M)?(C=j,A):(C=j,k=M)}var w=!1,C,k,E=u===void 0?null:u;return[function(){return b(c())},E===null?void 0:function(){return b(E())}]},[c,u,f,h]);var v=r(l,m[0],m[1]);return o(function(){y.hasValue=!0,y.value=v},[v]),a(v),v},fk}var Fz;function _we(){return Fz||(Fz=1,dk.exports=Awe()),dk.exports}var Rwe=_we();function Dwe(t){t()}function zz(t,e){return t===e?t!==0||e!==0||1/t===1/e:t!==t&&e!==e}function q0(t,e){if(zz(t,e))return!0;if(typeof t!="object"||t===null||typeof e!="object"||e===null)return!1;const n=Object.keys(t),r=Object.keys(e);if(n.length!==r.length)return!1;for(let s=0;s<n.length;s++)if(!Object.prototype.hasOwnProperty.call(e,n[s])||!zz(t[n[s]],e[n[s]]))return!1;return!0}var Pz=Symbol.for("react-redux-context"),Bz=typeof globalThis<"u"?globalThis:{};function Iwe(){if(!S.createContext)return{};const t=Bz[Pz]??(Bz[Pz]=new Map);let e=t.get(S.createContext);return e||(e=S.createContext(null),t.set(S.createContext,e)),e}var Pf=Iwe();function A_(t=Pf){return function(){return S.useContext(t)}}var xQ=A_();function wQ(t=Pf){const e=t===Pf?xQ:A_(t),n=()=>{const{store:r}=e();return r};return Object.assign(n,{withTypes:()=>n}),n}var SQ=wQ();function Owe(t=Pf){const e=t===Pf?SQ:wQ(t),n=()=>e().dispatch;return Object.assign(n,{withTypes:()=>n}),n}var Nwe=Owe(),Lwe=(t,e)=>t===e;function $we(t=Pf){const e=t===Pf?xQ:A_(t),n=(r,s={})=>{const{equalityFn:o=Lwe}=typeof s=="function"?{equalityFn:s}:s,i=e(),{store:a,subscription:l,getServerState:c}=i;S.useRef(!0);const u=S.useCallback({[r.name](h){return r(h)}}[r.name],[r]),f=Rwe.useSyncExternalStoreWithSelector(l.addNestedSub,a.getState,c||a.getState,u,o);return S.useDebugValue(f),f};return Object.assign(n,{withTypes:()=>n}),n}var Fwe=$we(),zwe=Dwe;function pk(t){return t.replace(t[0],t[0].toUpperCase())}function Pwe(t){return t.type==="query"}function Bwe(t){return t.type==="mutation"}function Yv(t,...e){return Object.assign(t,...e)}var Gv=WeakMap?new WeakMap:void 0,Hwe=({endpointName:t,queryArgs:e})=>{let n="";const r=Gv==null?void 0:Gv.get(e);if(typeof r=="string")n=r;else{const s=JSON.stringify(e,(o,i)=>(i=typeof i=="bigint"?{$bigint:i.toString()}:i,i=ad(i)?Object.keys(i).sort().reduce((a,l)=>(a[l]=i[l],a),{}):i,i));ad(e)&&(Gv==null||Gv.set(e,s)),n=s}return`${t}(${n})`},hk=Symbol();function Hz(t,e,n,r){const s=S.useMemo(()=>({queryArgs:t,serialized:typeof t=="object"?e({queryArgs:t,endpointDefinition:n,endpointName:r}):t}),[t,e,n,r]),o=S.useRef(s);return S.useEffect(()=>{o.current.serialized!==s.serialized&&(o.current=s)},[s]),o.current.serialized===s.serialized?o.current.queryArgs:t}function mk(t){const e=S.useRef(t);return S.useEffect(()=>{q0(e.current,t)||(e.current=t)},[t]),q0(e.current,t)?e.current:t}var Uwe=()=>typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",Vwe=Uwe(),qwe=()=>typeof navigator<"u"&&navigator.product==="ReactNative",Wwe=qwe(),Ywe=()=>Vwe||Wwe?S.useLayoutEffect:S.useEffect,Gwe=Ywe(),Kwe=t=>t.isUninitialized?{...t,isUninitialized:!1,isFetching:!0,isLoading:t.data===void 0,status:fQ.pending}:t;function Xwe({api:t,moduleOptions:{batch:e,hooks:{useDispatch:n,useSelector:r,useStore:s},unstable__sideEffectsInRender:o,createSelector:i},serializeQueryArgs:a,context:l}){const c=o?y=>y():S.useEffect;return{buildQueryHooks:h,buildMutationHook:m,usePrefetch:f};function u(y,v,b){if(v!=null&&v.endpointName&&y.isUninitialized){const{endpointName:A}=v,M=l.endpointDefinitions[A];b!==$u&&a({queryArgs:v.originalArgs,endpointDefinition:M,endpointName:A})===a({queryArgs:b,endpointDefinition:M,endpointName:A})&&(v=void 0)}let w=y.isSuccess?y.data:v==null?void 0:v.data;w===void 0&&(w=y.data);const C=w!==void 0,k=y.isLoading,E=(!v||v.isLoading||v.isUninitialized)&&!C&&k,j=y.isSuccess||C&&(k&&!(v!=null&&v.isError)||y.isUninitialized);return{...y,data:w,currentData:y.data,isFetching:k,isLoading:E,isSuccess:j}}function f(y,v){const b=n(),w=mk(v);return S.useCallback((C,k)=>b(t.util.prefetch(y,C,{...w,...k})),[y,b,w])}function h(y){const v=(C,{refetchOnReconnect:k,refetchOnFocus:E,refetchOnMountOrArgChange:j,skip:A=!1,pollingInterval:M=0,skipPollingIfUnfocused:_=!1}={})=>{const{initiate:D}=t.endpoints[y],R=n(),N=S.useRef(void 0);if(!N.current){const q=R(t.internalActions.internal_getRTKQSubscriptions());N.current=q}const z=Hz(A?$u:C,Hwe,l.endpointDefinitions[y],y),B=mk({refetchOnReconnect:k,refetchOnFocus:E,pollingInterval:M,skipPollingIfUnfocused:_}),L=S.useRef(!1),P=S.useRef(void 0);let{queryCacheKey:I,requestId:H}=P.current||{},$=!1;I&&H&&($=N.current.isRequestSubscribed(I,H));const V=!$&&L.current;return c(()=>{L.current=$}),c(()=>{V&&(P.current=void 0)},[V]),c(()=>{var q;const U=P.current;if(z===$u){U==null||U.unsubscribe(),P.current=void 0;return}const W=(q=P.current)==null?void 0:q.subscriptionOptions;if(!U||U.arg!==z){U==null||U.unsubscribe();const Y=R(D(z,{subscriptionOptions:B,forceRefetch:j}));P.current=Y}else B!==W&&U.updateSubscriptionOptions(B)},[R,D,j,z,B,V]),S.useEffect(()=>()=>{var q;(q=P.current)==null||q.unsubscribe(),P.current=void 0},[]),S.useMemo(()=>({refetch:()=>{var q;if(!P.current)throw new Error(bl(38));return(q=P.current)==null?void 0:q.refetch()}}),[])},b=({refetchOnReconnect:C,refetchOnFocus:k,pollingInterval:E=0,skipPollingIfUnfocused:j=!1}={})=>{const{initiate:A}=t.endpoints[y],M=n(),[_,D]=S.useState(hk),R=S.useRef(void 0),N=mk({refetchOnReconnect:C,refetchOnFocus:k,pollingInterval:E,skipPollingIfUnfocused:j});c(()=>{var P,I;const H=(P=R.current)==null?void 0:P.subscriptionOptions;N!==H&&((I=R.current)==null||I.updateSubscriptionOptions(N))},[N]);const z=S.useRef(N);c(()=>{z.current=N},[N]);const B=S.useCallback(function(P,I=!1){let H;return e(()=>{var $;($=R.current)==null||$.unsubscribe(),R.current=H=M(A(P,{subscriptionOptions:z.current,forceRefetch:!I})),D(P)}),H},[M,A]),L=S.useCallback(()=>{var P,I;(P=R.current)!=null&&P.queryCacheKey&&M(t.internalActions.removeQueryResult({queryCacheKey:(I=R.current)==null?void 0:I.queryCacheKey}))},[M]);return S.useEffect(()=>()=>{var P;(P=R==null?void 0:R.current)==null||P.unsubscribe()},[]),S.useEffect(()=>{_!==hk&&!R.current&&B(_,!0)},[_,B]),S.useMemo(()=>[B,_,{reset:L}],[B,_,L])},w=(C,{skip:k=!1,selectFromResult:E}={})=>{const{select:j}=t.endpoints[y],A=Hz(k?$u:C,a,l.endpointDefinitions[y],y),M=S.useRef(void 0),_=S.useMemo(()=>i([j(A),(B,L)=>L,B=>A],u,{memoizeOptions:{resultEqualityCheck:q0}}),[j,A]),D=S.useMemo(()=>E?i([_],E,{devModeChecks:{identityFunctionCheck:"never"}}):_,[_,E]),R=r(B=>D(B,M.current),q0),N=s(),z=_(N.getState(),M.current);return Gwe(()=>{M.current=z},[z]),R};return{useQueryState:w,useQuerySubscription:v,useLazyQuerySubscription:b,useLazyQuery(C){const[k,E,{reset:j}]=b(C),A=w(E,{...C,skip:E===hk}),M=S.useMemo(()=>({lastArg:E}),[E]);return S.useMemo(()=>[k,{...A,reset:j},M],[k,A,j,M])},useQuery(C,k){const E=v(C,k),j=w(C,{selectFromResult:C===$u||k!=null&&k.skip?void 0:Kwe,...k}),{data:A,status:M,isLoading:_,isSuccess:D,isError:R,error:N}=j;return S.useDebugValue({data:A,status:M,isLoading:_,isSuccess:D,isError:R,error:N}),S.useMemo(()=>({...j,...E}),[j,E])}}}function m(y){return({selectFromResult:v,fixedCacheKey:b}={})=>{const{select:w,initiate:C}=t.endpoints[y],k=n(),[E,j]=S.useState();S.useEffect(()=>()=>{E!=null&&E.arg.fixedCacheKey||E==null||E.reset()},[E]);const A=S.useCallback(function(U){const W=k(C(U,{fixedCacheKey:b}));return j(W),W},[k,C,b]),{requestId:M}=E||{},_=S.useMemo(()=>w({fixedCacheKey:b,requestId:E==null?void 0:E.requestId}),[b,E,w]),D=S.useMemo(()=>v?i([_],v):_,[v,_]),R=r(D,q0),N=b==null?E==null?void 0:E.arg.originalArgs:void 0,z=S.useCallback(()=>{e(()=>{E&&j(void 0),b&&k(t.internalActions.removeMutationResult({requestId:M,fixedCacheKey:b}))})},[k,b,E,M]),{endpointName:B,data:L,status:P,isLoading:I,isSuccess:H,isError:$,error:V}=R;S.useDebugValue({endpointName:B,data:L,status:P,isLoading:I,isSuccess:H,isError:$,error:V});const q=S.useMemo(()=>({...R,originalArgs:N,reset:z}),[R,N,z]);return S.useMemo(()=>[A,q],[A,q])}}}var Zwe=Symbol(),Qwe=({batch:t=zwe,hooks:e={useDispatch:Nwe,useSelector:Fwe,useStore:SQ},createSelector:n=S_,unstable__sideEffectsInRender:r=!1,...s}={})=>({name:Zwe,init(o,{serializeQueryArgs:i},a){const l=o,{buildQueryHooks:c,buildMutationHook:u,usePrefetch:f}=Xwe({api:o,moduleOptions:{batch:t,hooks:e,unstable__sideEffectsInRender:r,createSelector:n},serializeQueryArgs:i,context:a});return Yv(l,{usePrefetch:f}),Yv(a,{batch:t}),{injectEndpoint(h,m){if(Pwe(m)){const{useQuery:y,useLazyQuery:v,useLazyQuerySubscription:b,useQueryState:w,useQuerySubscription:C}=c(h);Yv(l.endpoints[h],{useQuery:y,useLazyQuery:v,useLazyQuerySubscription:b,useQueryState:w,useQuerySubscription:C}),o[`use${pk(h)}Query`]=y,o[`useLazy${pk(h)}Query`]=v}else if(Bwe(m)){const y=u(h);Yv(l.endpoints[h],{useMutation:y}),o[`use${pk(h)}Mutation`]=y}}}}}),U4=R3e(U3e(),Qwe());class CQ{constructor(e,n,r){a3(this,"data"),a3(this,"t"),this.t=n,this.data=Object.keys(e).reduce((s,o)=>{const i=e[o];return(typeof i=="number"||typeof i=="string")&&(s[i]={id:i,title:n(`${r}.${o}`)}),s},{})}get(e){return this.data[e]||{id:e,title:this.t("dictionary:unknown")}}getAll(){return Object.values(this.data)}}class Jwe extends CQ{constructor(){super(rwe,Ih,"ds:dictionary.accessType")}}class e4e extends CQ{constructor(){super(Yo,Ih,"ds:dictionary.module")}}const Uz=t=>{var e;const n=new e4e,r=new Jwe;return{id:t.Id,date:t.Date,type:t.NotificationType,title:t.Name,imageUrl:t.ImageUrl,source:n.get(t.Source),actor:t.Name,userId:t.UserId,action:{title:t.Payload.Title,subject:t.Payload.Subject,accessType:r.get(t.Payload.AccessType),subjectUrl:t.Payload.SubjectUrl,status:t.Payload.Status,dlpCheckStatus:t.Payload.Status,externalLinkUrl:t.Payload.ExternalLinkUrl,downloadUrl:t.Payload.DownloadUrl||void 0,roleName:t.Payload.RoleName,targetUserName:t.Payload.TargetUserName,movedTo:t.Payload.MoveTo,description:(e=t.Payload.Description)==null?void 0:e.replace(/<[^>]+>/g,"").trim(),project:t.Payload.Project,customerName:t.Payload.CustomerName,timeUntilStart:t.Payload.TimeUntilStart?kxe(t.Payload.TimeUntilStart):void 0,startsAt:t.Payload.StartsAt},isRead:t.State,isNew:!1}},Sf=U4({reducerPath:"DCNotificationApi",baseQuery:H4("/v1/notifications"),tagTypes:["Notifications","UnreadNotifications"],endpoints:t=>({getNotifications:t.query({query:({count:e=10,offset:n=0,isAll:r=!1}={count:10,offset:0,isAll:!1})=>({method:"POST",url:"/",body:{FilterConditions:[],Count:e,Offset:n,IsAll:r}}),transformResponse:e=>({notifications:e.Items.map(n=>Uz(n)),lastSeenAt:e.ReadDate,count:e.Items.length||0,unreadCount:e.UnreadCount}),serializeQueryArgs:({endpointName:e})=>e,forceRefetch({currentArg:e,previousArg:n}){return e!==n},merge:(e,n)=>{const r=new Map(e.notifications.map(s=>[s.id,s]));return n.notifications.forEach(s=>{r.set(s.id,s)}),{notifications:Array.from(r.values()),lastSeenAt:n.lastSeenAt,count:n.notifications.length,unreadCount:n.unreadCount}},providesTags:["Notifications"]}),getUnreadNotifications:t.query({query:({count:e=10,offset:n=0,isAll:r=!1}={count:10,offset:0,isAll:!1})=>({method:"POST",url:"/",body:{FilterConditions:[{Type:20,NumValues:[0]}],Count:e,Offset:n,IsAll:r}}),transformResponse:e=>({notifications:e.Items.map(n=>Uz(n)),lastSeenAt:e.ReadDate,count:e.Items.length,unreadCount:e.UnreadCount}),serializeQueryArgs:({endpointName:e})=>e,forceRefetch({currentArg:e,previousArg:n}){return e!==n},merge:(e,n)=>{const r=new Map(e.notifications.map(s=>[s.id,s]));return n.notifications.forEach(s=>{r.set(s.id,s)}),{notifications:Array.from(r.values()),lastSeenAt:n.lastSeenAt,count:n.notifications.length,unreadCount:n.unreadCount}},providesTags:["UnreadNotifications"]}),markAsRead:t.mutation({query:({id:e,value:n})=>({url:"/mark",method:"POST",body:{Id:e,State:n}}),async onQueryStarted({id:e,value:n},{dispatch:r,queryFulfilled:s,getState:o}){const i=r(Sf.util.updateQueryData("getNotifications",{},l=>{e||l.notifications.forEach(u=>{u.isRead=dc.Read});const c=l.notifications.find(u=>u.id===e);c&&(c.isRead=c.isRead?dc.Unread:dc.Read)})),a=r(Sf.util.updateQueryData("getUnreadNotifications",{},l=>{var c;if(e||(l.notifications=[],l.unreadCount=0),l.notifications.find(f=>f.id===e))l.notifications=l.notifications.filter(f=>f.id!==e),l.unreadCount-=1;else if(n===dc.Unread){const m=(c=Sf.endpoints.getNotifications.select({})(o()).data)==null?void 0:c.notifications.find(y=>y.id===e);m&&(l.notifications.push(m),l.unreadCount+=1)}}));try{await s}catch{i.undo(),a.undo()}}}),markAsSeen:t.mutation({query:()=>({url:"/setreaddate",method:"POST",body:{Date:new Date().toISOString()}})})})}),{useGetNotificationsQuery:kQ,useGetUnreadNotificationsQuery:t4e,useMarkAsReadMutation:__,useMarkAsSeenMutation:n4e}=Sf,r4e=({interval:t=1e4}={interval:1e4})=>{const[e,n]=S.useState(t),[r,s]=S.useState(!1),{data:{notifications:o=[],lastSeenAt:i=""}={},isLoading:a}=kQ({count:20},{pollingInterval:e});return S.useEffect(()=>{const l=o.some(c=>new Date(c.date)>new Date(i));if(s(l),n(l?0:t),l){const c=o.filter(u=>new Date(u.date)>new Date(i));gwe(c)}},[o,i]),{notifications:o,haveNew:r,isLoading:a}},s4e=(t,e=Date.now().toString())=>{const{t:n}=Le(),r=(o,i)=>new Date(i.date).getTime()-new Date(o.date).getTime();return S.useMemo(()=>{const o=t.filter(a=>new Date(a.date)>new Date(e)).sort(r),i=t.filter(a=>new Date(a.date)<=new Date(e)).sort(r);return[{id:1,title:n("ds:notifications.modal.groups.new"),items:o},{id:2,title:n("ds:notifications.modal.groups.older"),items:i}]},[t,e,n])},o4e=({hovered:t,notification:e})=>{const n=({...i})=>d.jsx(c4,{...i,size:8}),[r]=__(),s=i=>{r({id:e.id,value:i.target.checked?dc.Unread:dc.Read})},o=S.useMemo(()=>e.isRead,[e.isRead]);return d.jsx(Or,{checked:!o,onChange:s,onClick:i=>i.stopPropagation(),radius:"xl",size:"xs",icon:n,iconColor:t?"white":"blue.4",color:t?"blue.5":"blue.4",styles:i=>({input:{borderColor:t?i.colors.grey[5]:i.colors.grey[3]}})})},EQ=({title:t,children:e,...n})=>d.jsxs(ie,{...n,children:[d.jsx(ue,{style:{fontSize:"10px"},ml:"sm",c:"secondary",tt:"uppercase",children:t}),d.jsx(Qr,{listStyleType:"none",children:e})]});EQ.Item=Qr.Item;const Vz=({notifications:t,lastSeenAt:e,avatarSlot:n,...r})=>{const s=s4e(t,e),[o]=__(),i=a=>{a.isRead===dc.Unread&&o({id:a.id,value:dc.Read})};return d.jsx(bt,{gap:"sm",...r,children:s.map(a=>a.items.length?d.jsx(EQ,{title:a.title,maw:"900px",children:a.items.map(l=>d.jsx("li",{children:d.jsx(hwe,{notification:l,avatarSlot:n,indicatorSlot:o4e,onClick:i})},l.id))},a.id):null)})},i4e=()=>{const{t}=Le(["ds"]),[e]=__(),n=()=>{e({id:null,value:dc.Read})};return d.jsx(yt,{variant:"subtle",size:"xs",fw:400,leftSection:d.jsx(Swe,{size:14}),onClick:n,children:t("notifications.modal.allAsReadButton")})},a4e="_root_16nkv_1",l4e="_list_16nkv_7",c4e="_tab_16nkv_12",u4e="_header_16nkv_26",d4e="_headerDark_16nkv_30",f4e="_shrink_16nkv_35",sh={root:a4e,list:l4e,tab:c4e,header:u4e,headerDark:d4e,shrink:f4e};function qz({children:t,isLoading:e=!1,height:n=500,threshold:r=250,disabled:s=!1,onLoadMore:o}){const i=S.useRef(null),a=S.useCallback(({y:l})=>{var c;const u=(c=i.current)==null?void 0:c.querySelector(".mantine-ScrollArea-viewport");if(!(u!=null&&u.clientHeight)||!(u!=null&&u.scrollHeight))return;l+u.clientHeight+r>=u.scrollHeight&&o&&!e&&!s&&o()},[r,o,e,s]);return d.jsx(Jr,{ref:i,h:n,scrollbars:"y",onScrollPositionChange:a,children:d.jsxs(bt,{gap:"md",children:[t,e&&!s&&d.jsx(m2,{py:"md",children:d.jsx(Bs,{size:"sm"})})]})})}function p4e({initialCount:t=10}){const[e,n]=S.useState(0),[r]=S.useState(t),[s,o]=S.useState(!0),{data:i,isFetching:a,isLoading:l}=kQ({count:r,offset:e});return S.useEffect(()=>{(!(i!=null&&i.count)||i.count<r)&&o(!1)},[i==null?void 0:i.notifications,r]),{loadMore:()=>{!a&&!l&&s&&n(u=>u+r)},isLoading:a||l,notifications:(i==null?void 0:i.notifications)??[],hasMore:s,lastSeenAt:(i==null?void 0:i.lastSeenAt)??""}}function h4e({initialCount:t=10}){const[e,n]=S.useState(0),[r]=S.useState(t),[s,o]=S.useState(!0),{data:i,isFetching:a,isLoading:l,refetch:c}=t4e({count:r,offset:e},{refetchOnMountOrArgChange:!0}),u=((i==null?void 0:i.unreadCount)||0)>999?"999+":i==null?void 0:i.unreadCount;return S.useEffect(()=>{(!(i!=null&&i.count)||i.count<r)&&o(!1)},[i==null?void 0:i.notifications,r]),{loadMore:()=>{!a&&!l&&s&&n(h=>h+r)},isLoading:a||l,hasMore:s,refetch:c,notifications:(i==null?void 0:i.notifications)??[],lastSeenAt:(i==null?void 0:i.lastSeenAt)??"",unreadCount:u}}const m4e="data:image/svg+xml,%3csvg%20width='126'%20height='114'%20viewBox='0%200%20126%20114'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M84.885%2041.6769C75.9426%2041.6769%2066.8399%2041.3136%2058.3249%2038.9418C49.9701%2036.6234%2042.2991%2032.1255%2035.4615%2026.9225C30.9849%2023.5357%2026.9144%2020.8434%2021.1024%2021.2493C15.4153%2021.5518%209.97646%2023.6757%205.5894%2027.3071C-1.80382%2033.7815%20-0.692703%2045.7688%202.26672%2054.177C6.71121%2066.8587%2020.237%2075.6836%2031.7328%2081.4101C45.0128%2088.0448%2059.607%2091.891%2074.2332%2094.1132C87.0538%2096.0577%20103.528%2097.4786%20114.639%2089.1025C124.843%2081.4101%20127.642%2063.8459%20125.142%2051.9868C124.536%2048.4802%20122.67%2045.3155%20119.896%2043.0871C112.727%2037.8521%20102.033%2041.3457%2093.9769%2041.5273C90.9854%2041.5914%2087.9406%2041.6555%2084.885%2041.6769Z'%20fill='%23F3F6FA'/%3e%3cpath%20d='M63.004%20111.502C84.6649%20111.502%20102.224%20110.406%20102.224%20109.055C102.224%20107.704%2084.6649%20106.609%2063.004%20106.609C41.3432%20106.609%2023.7836%20107.704%2023.7836%20109.055C23.7836%20110.406%2041.3432%20111.502%2063.004%20111.502Z'%20fill='%23F3F6FA'/%3e%3cpath%20d='M111.946%2014.8919C112.525%2014.8919%20112.993%2014.4231%20112.993%2013.8449C112.993%2013.2666%20112.525%2012.7979%20111.946%2012.7979C111.368%2012.7979%20110.899%2013.2666%20110.899%2013.8449C110.899%2014.4231%20111.368%2014.8919%20111.946%2014.8919Z'%20fill='%23DAE3ED'/%3e%3cpath%20d='M42.2992%206.12162C42.8774%206.12162%2043.3462%205.65286%2043.3462%205.07461C43.3462%204.49636%2042.8774%204.02759%2042.2992%204.02759C41.7209%204.02759%2041.2521%204.49636%2041.2521%205.07461C41.2521%205.65286%2041.7209%206.12162%2042.2992%206.12162Z'%20fill='%23DAE3ED'/%3e%3cpath%20d='M84.5803%2037.3028C85.1586%2037.3028%2085.6274%2036.834%2085.6274%2036.2558C85.6274%2035.6775%2085.1586%2035.2087%2084.5803%2035.2087C84.0021%2035.2087%2083.5333%2035.6775%2083.5333%2036.2558C83.5333%2036.834%2084.0021%2037.3028%2084.5803%2037.3028Z'%20fill='%23DAE3ED'/%3e%3cpath%20d='M82.7137%20102.169C83.2919%20102.169%2083.7607%20101.701%2083.7607%20101.122C83.7607%20100.544%2083.2919%20100.075%2082.7137%20100.075C82.1354%20100.075%2081.6667%20100.544%2081.6667%20101.122C81.6667%20101.701%2082.1354%20102.169%2082.7137%20102.169Z'%20fill='%23DAE3ED'/%3e%3cpath%20d='M82.9076%201.14111V5.73517'%20stroke='%23C9D3E0'%20stroke-width='2.2894'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M80.6112%203.43896H85.2053'%20stroke='%23C9D3E0'%20stroke-width='2.2894'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M6.97446%2012.342V16.9361'%20stroke='%23C9D3E0'%20stroke-width='2.2894'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M4.66666%2014.6372H9.2714'%20stroke='%23C9D3E0'%20stroke-width='2.2894'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M11.519%2084.4858V89.0906'%20stroke='%23C9D3E0'%20stroke-width='2.2894'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M9.21118%2086.7837H13.8159'%20stroke='%23C9D3E0'%20stroke-width='2.2894'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M111.963%2030.542V35.1361'%20stroke='%23C9D3E0'%20stroke-width='2.2894'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M109.667%2032.8398H114.261'%20stroke='%23C9D3E0'%20stroke-width='2.2894'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M54.3083%2023.6459C54.3083%2021.2668%2055.2486%2018.9852%2056.9224%2017.3029C58.5962%2015.6206%2060.8663%2014.6755%2063.2333%2014.6755C65.6004%2014.6755%2067.8705%2015.6206%2069.5443%2017.3029C71.218%2018.9852%2072.1583%2021.2668%2072.1583%2023.6459C77.2831%2026.0815%2081.6519%2029.8728%2084.7964%2034.6135C87.9408%2039.3543%2089.7425%2044.8657%2090.0083%2050.557V64.0126C90.3442%2066.801%2091.3267%2069.4713%2092.8769%2071.8084C94.4271%2074.1455%2096.5015%2076.0841%2098.9333%2077.4681H27.5333C29.9651%2076.0841%2032.0396%2074.1455%2033.5898%2071.8084C35.1399%2069.4713%2036.1225%2066.801%2036.4583%2064.0126V50.557C36.7241%2044.8657%2038.5258%2039.3543%2041.6703%2034.6135C44.8148%2029.8728%2049.1835%2026.0815%2054.3083%2023.6459Z'%20fill='white'/%3e%3cpath%20d='M49.8458%2077.4681V81.9533C49.8458%2085.522%2051.2563%2088.9444%2053.7669%2091.4678C56.2776%2093.9912%2059.6827%2095.4089%2063.2333%2095.4089C66.7839%2095.4089%2070.1891%2093.9912%2072.6997%2091.4678C75.2104%2088.9444%2076.6208%2085.522%2076.6208%2081.9533V77.4681'%20fill='white'/%3e%3cpath%20d='M49.8458%2077.4681V81.9533C49.8458%2085.522%2051.2563%2088.9444%2053.7669%2091.4678C56.2776%2093.9912%2059.6827%2095.4089%2063.2333%2095.4089C66.7839%2095.4089%2070.1891%2093.9912%2072.6997%2091.4678C75.2104%2088.9444%2076.6208%2085.522%2076.6208%2081.9533V77.4681M54.3083%2023.6459C54.3083%2021.2668%2055.2486%2018.9852%2056.9224%2017.3029C58.5962%2015.6206%2060.8663%2014.6755%2063.2333%2014.6755C65.6004%2014.6755%2067.8705%2015.6206%2069.5443%2017.3029C71.218%2018.9852%2072.1583%2021.2668%2072.1583%2023.6459C77.2831%2026.0815%2081.6519%2029.8728%2084.7964%2034.6135C87.9408%2039.3543%2089.7425%2044.8657%2090.0083%2050.557V64.0126C90.3442%2066.801%2091.3267%2069.4713%2092.8769%2071.8084C94.4271%2074.1455%2096.5015%2076.0841%2098.9333%2077.4681H27.5333C29.9651%2076.0841%2032.0396%2074.1455%2033.5898%2071.8084C35.1399%2069.4713%2036.1225%2066.801%2036.4583%2064.0126V50.557C36.7241%2044.8657%2038.5258%2039.3543%2041.6703%2034.6135C44.8148%2029.8728%2049.1835%2026.0815%2054.3083%2023.6459Z'%20stroke='%23C9D3E0'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M56%2031.9421C48.3%2033.3421%2041.86%2045.8488%2042.2333%2058.5421M82.3667%2046.1755C84.2334%2051.5421%2084.2334%2053.6421%2084.2334%2058.5421M48.7667%2046.1755C46.9%2051.5421%2046.9%2053.6421%2046.9%2058.5421'%20stroke='%23C9D3E0'%20stroke-width='2'%20stroke-linecap='round'/%3e%3c/svg%3e",Wz=({title:t,description:e})=>d.jsx(xe,{justify:"center",align:"center",children:d.jsxs(bt,{gap:"md",justify:"center",align:"center",w:"350",children:[d.jsx(Sd,{src:m4e,alt:"Bell",w:"126"}),d.jsxs(bt,{justify:"center",align:"center",gap:0,children:[d.jsx(ue,{c:"primary",size:"lg",fw:500,children:t}),d.jsx(ue,{c:"secondary",size:"sm",ta:"center",children:e})]})]})}),Yz=({url:t,children:e,tooltip:n})=>d.jsx(aj,{to:t,children:d.jsx(on,{disabled:!n,label:n,position:"bottom",withArrow:!0,children:d.jsx(Ve,{size:"lg",variant:"subtle",c:"grey.6",children:e})})}),g4e=t=>{const e=t.ModuleSettings.ModuleUrls.filter(n=>n.HasAccess);return{userId:t.UserId,modules:e.reduce((n,r)=>(n[Yo[r.Name]]={url:r.Url},n),{})}},f3=U4({reducerPath:"DCSettingsApi",baseQuery:H4("/v1"),tagTypes:["Settings","User"],endpoints:t=>({getSettings:t.query({query:()=>({method:j_.GET,url:"/settings"}),transformResponse:e=>g4e(e),providesTags:["Settings"]})})}),{useGetSettingsQuery:TQ}=f3,MQ=()=>{const{data:t,isLoading:e}=TQ();return{modules:(t==null?void 0:t.modules)||null,isLoading:e}},jQ=t=>{var e;const{data:n,isLoading:r}=TQ();return{module:((e=n==null?void 0:n.modules)==null?void 0:e[t])||null,isLoading:r}},y4e=t=>({id:t.Id,fullName:`${t.Surname} ${t.FirstName} ${t.MiddleName}`.trim(),firstName:t.FirstName,lastName:t.Surname,middleName:t.MiddleName,email:t.Email,avatarUrl:t.Avatar,organization:{id:t.Customer.Id,title:t.Customer.Title}}),p3=U4({reducerPath:"DCUserApi",baseQuery:H4("/v1"),tagTypes:["User"],endpoints:t=>({getCurrentUser:t.query({query:()=>({method:j_.GET,url:"/user"}),transformResponse:e=>y4e(e),providesTags:["User"]})})}),{useGetCurrentUserQuery:AQ}=p3,v4e=()=>{const{data:t}=AQ();return t??{}},b4e=()=>{const{module:t}=jQ(Yo.Admin),{id:e}=v4e();return{settingsUrl:`${t==null?void 0:t.url}/profile/${e}/notification-settings`,archiveUrl:`${t==null?void 0:t.url}/profile/${e}/notifications`}},x4e="data:image/svg+xml,%3csvg%20width='18'%20height='22'%20viewBox='0%200%2018%2022'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M8.98198%200.544189C5.59973%200.544189%202.85786%203.21918%202.85786%206.51896C2.85786%209.81867%205.59973%2012.4937%208.98198%2012.4937C12.3642%2012.4937%2015.1061%209.81867%2015.1061%206.51896C15.1061%203.21918%2012.3642%200.544189%208.98198%200.544189ZM16.808%2015.4772C17.9682%2016.2061%2017.9116%2017.795%2016.855%2018.6609C14.7261%2020.4052%2011.9801%2021.4559%208.98229%2021.4559C6.00442%2021.4559%203.27467%2020.4191%201.15175%2018.6952C0.0857694%2017.8296%200.0292887%2016.2327%201.19454%2015.499C1.55729%2015.2706%201.95233%2015.0705%202.38106%2014.8981C4.10603%2014.2043%206.30925%2013.9874%208.98213%2013.9874C11.6685%2013.9874%2013.8842%2014.1904%2015.6137%2014.8768C16.0457%2015.0482%2016.4435%2015.2482%2016.808%2015.4772Z'%20fill='white'/%3e%3c/svg%3e";function w4e(t,e){if(!t||e.length===0)return e[0];let n=0;for(let s=0;s<t.length;s++)n=t.charCodeAt(s)+((n<<5)-n);const r=Math.abs(n)%e.length;return e[r]}function _Q(t){return t!=null&&t.trim()&&t.trim().split(/\s+/).slice(0,2).map(r=>{var s;return(s=r[0])==null?void 0:s.toUpperCase()}).filter(Boolean).join("")||null}const S4e=["#FFA94D","#FFD43B","#A9E34B","#69DB7C","#38D9A9","#3BC9DB","#4DABF7","#748FFC","#9775FA","#DA77F2","#F783AC","#FF8787"];function C4e(t,e){return S.useMemo(()=>{const n=String(t==null?void 0:t.id)||e||"",r=!(t!=null&&t.id)&&!e?"var(--mantine-color-gray-4)":w4e(n,S4e),s=(t==null?void 0:t.id)&&k4e(t)||_Q(e);return{color:r,initials:s}},[t,e])}function k4e({fullName:t,firstName:e,middleName:n,lastName:r,email:s}){const o=r==null?void 0:r[0],i=e==null?void 0:e[0],a=n==null?void 0:n[0];return r&&e?`${o}${i}`.toUpperCase():t?_Q(t):e&&n?`${i}`.toUpperCase():r&&n?`${o}`.toUpperCase():n?`${a}`.toUpperCase():s?s[0].toUpperCase():null}const RQ=S.forwardRef(({user:t,fallbackSrc:e,fallback:n,avatarProps:r,...s},o)=>{const{color:i,initials:a}=C4e(t,n);return d.jsx(Pc,{src:(t==null?void 0:t.avatarUrl)||e,radius:60,tt:"uppercase",color:i,styles:{placeholder:{color:"white",backgroundColor:i,fontWeight:500}},ref:o,...s,...r,children:a||d.jsx(Sd,{src:x4e,alt:"User avatar placeholder",w:"60%",h:"60%",fit:"contain"})})}),Gz=t=>({id:t.Id,contactId:t.Contact.Id,userId:t.Contact.UserId,fullName:t.Contact.FullName,firstName:t.Contact.FirstName,lastName:t.Contact.Surname,middleName:t.Contact.MiddleName,email:t.Contact.Email,position:t.Contact.Position,organization:t.Contact.Company,isFavourite:t.IsFavorite,haveAvatar:t.Contact.HasAvatar,isPersonal:t.IsPersonal}),E4e=t=>({Id:t.id,IsFavorite:t.isFavourite,IsPersonal:t.isPersonal,Contact:{Id:t.contactId,FullName:t.fullName,FirstName:t.firstName,Email:t.email,Position:t.position,Company:t.organization,HasAvatar:t.haveAvatar||!1}}),h3=U4({reducerPath:"DCContactApi",baseQuery:H4("/v1"),tagTypes:["Contacts"],endpoints:t=>({getContact:t.query({query:({name:e,phone:n,email:r,contactId:s})=>({method:"POST",url:"/addressbook/Links",body:{ContactIds:s?[s]:[],Like:e,Email:r,Phone:n}}),transformResponse:(e,n,{id:r})=>{var s;if(r){const o=e.Items.find(i=>i.Contact.UserId===r);if(o)return Gz(o)}return(s=e==null?void 0:e.Items)!=null&&s[0]?Gz(e.Items[0]):null},providesTags:["Contacts"]}),addContact:t.mutation({query:e=>({method:"POST",url:"/addressbook/SaveLink",body:E4e(e)}),invalidatesTags:["Contacts"]}),addToFavourite:t.mutation({query:({id:e})=>({method:"POST",url:"/Favorites/Add",body:{EntityIds:[e],Type:15}}),invalidatesTags:["Contacts"]}),removeFromFavourite:t.mutation({query:({id:e})=>({method:"POST",url:"/Favorites/Delete",body:{EntityIds:[e],Type:15}}),invalidatesTags:["Contacts"]})})}),{useGetContactQuery:T4e,useAddContactMutation:M4e,useAddToFavouriteMutation:j4e,useRemoveFromFavouriteMutation:A4e}=h3,Kz=["#FFA94D","#FFD43B","#A9E34B","#69DB7C","#38D9A9","#3BC9DB","#4DABF7","#748FFC","#9775FA","#DA77F2","#F783AC","#FF8787"],_4e=t=>{if(typeof t!="string")throw new Error("Input must be a string");const e=n=>n.trim()===""?0:Array.from(n).reduce((r,s)=>r+s.charCodeAt(0),0)%Kz.length;return(()=>{try{const n=e(t);return Kz[n]}catch(n){return console.error("Error generating color:",n),"#FFFFFF"}})()},R4e=t=>!t||!t.userId?null:{id:t.userId,fullName:t.fullName||"",firstName:t.firstName||"",lastName:t.lastName||"",middleName:t.middleName||"",email:t.email||"",avatarUrl:t.haveAvatar?`/api/v2/profile/getAvatar?&id=${t.contactId}&type=Contact`:""},Xz=({contact:t,fallbackSrc:e,actions:n})=>{var r,s;const o=R4e(t),i=_4e(((r=t==null?void 0:t.userId)==null?void 0:r.toString())||((s=t==null?void 0:t.contactId)==null?void 0:s.toString())||""),a=S.useMemo(()=>[t.fullName,t.position,t.email].filter(Boolean),[t]);return d.jsxs(bt,{gap:0,children:[d.jsxs(ve,{gap:10,align:"stretch",wrap:"nowrap",children:[d.jsx(RQ,{user:o,fallbackSrc:e,avatarProps:{size:48,color:i}}),d.jsxs(bt,{gap:0,w:"100%",justify:"center",children:[d.jsx(ue,{size:"lg",c:"primary",truncate:!0,w:290,children:a.length?a[0]:t.phone}),a[1]&&d.jsx(ue,{size:"sm",c:"secondary",truncate:!0,w:290,children:a[1]})]})]}),d.jsxs(bt,{gap:0,ml:58,children:[a[2]&&d.jsx(ue,{size:"sm",c:"primary",mt:4,truncate:!0,w:290,children:a[2]}),!!n&&d.jsx(ie,{mt:"sm",children:n})]})]})},R_=({baseUrl:t,contact:e})=>{const[n]=M4e(),r=S.useMemo(()=>e.id?e.organization?d.jsx(xwe,{stroke:1.2,size:18}):d.jsx(Mwe,{stroke:1.4,size:18}):d.jsx(Twe,{stroke:1.2,size:18}),[e,e==null?void 0:e.isPersonal]),s=()=>{const o=t;e!=null&&e.id?window.open(`${o}/contact/${e.id}/`,"_blank"):n(e)};return d.jsx(yt,{size:"compact-md",radius:"sm",variant:"light",color:"accent",leftSection:r,fw:400,onClick:s,disabled:!e.id&&!e.email,children:d.jsx(ue,{size:"xs",children:e.id?e.organization?Ih("ds:contact.card.actions.addToContacts.organization"):Ih("ds:contact.card.actions.addToContacts.inContacts"):Ih("ds:contact.card.actions.addToContacts.add")})})},DQ=({baseUrl:t,email:e})=>{const n=()=>{const r=t,s=Oh().format("YYYY-MM-DD");window.open(`${r}/event/new/${s}/?add=${e}`,"_blank")};return d.jsx(Ve,{size:30,variant:"light",color:"accent",onClick:n,children:d.jsx(wwe,{stroke:1.2,size:22})})},D4e=({baseUrl:t,email:e,name:n})=>{const r=()=>{const s=t,o=n?`${n}<${e}>`:e;window.open(`${s}/inbox?to=${o}`,"_blank")};return d.jsx(Ve,{size:30,variant:"light",color:"accent",onClick:r,children:d.jsx(Cwe,{stroke:1.2,size:22})})},IQ=({contact:t})=>{const[e,n]=S.useState(t.isFavourite),[r]=j4e(),[s]=A4e(),o=()=>{n(i=>!i),e?s({id:t.contactId}):r({id:t.contactId})};return d.jsx(Ve,{size:30,variant:"subtle",color:e?"yellow.4":"gray.6",onClick:o,children:e?d.jsx(jwe,{size:22}):d.jsx(Ewe,{stroke:1.2,size:22})})},I4e=({contact:t})=>{const{modules:e}=MQ();return e?d.jsxs(ve,{justify:"space-between",children:[d.jsxs(ve,{gap:"xs",children:[t.email&&d.jsxs(d.Fragment,{children:[e[Yo.Mail]&&d.jsx(D4e,{baseUrl:e[Yo.Mail].url,email:t.email,name:t.fullName}),e[Yo.Calendar]&&d.jsx(DQ,{baseUrl:e[Yo.Calendar].url,email:t.email})]}),e[Yo.Contacts]&&d.jsx(R_,{baseUrl:e[Yo.Contacts].url,contact:t})]}),d.jsx(IQ,{contact:t})]}):null},O4e=({id:t,contactId:e,name:n,email:r,phone:s,fallbackSrc:o,nameFallback:i,actions:a})=>{const{data:l,isLoading:c}=T4e({id:t,contactId:e,name:n,email:r,phone:s}),{module:u,isLoading:f}=jQ(Yo.Contacts);if(c||f)return d.jsx(d.Fragment,{children:d.jsx(xe,{justify:"center",align:"center",h:100,children:d.jsx(Bs,{size:"sm",color:"gray.5"})})});if(!l){const h={fullName:n||i,email:r,phone:s};return d.jsx(Xz,{contact:h,fallbackSrc:o,actions:h.email&&(u==null?void 0:u.url)&&d.jsx(R_,{baseUrl:u.url,contact:h})})}return d.jsx(d.Fragment,{children:d.jsx(Xz,{fallbackSrc:o,contact:l,actions:a?a({contact:l}):d.jsx(I4e,{contact:l})})})},OQ=({children:t,actions:e,hoverCardProps:n={},fallbackSrc:r,nameFallback:s,...o})=>d.jsxs(Ta,{openDelay:700,radius:"md",shadow:"lg",width:380,trapFocus:!0,...n,children:[d.jsx(Ta.Target,{children:t}),d.jsx(Ta.Dropdown,{p:"sm",onMouseDown:i=>{i.stopPropagation()},onClick:i=>{i.stopPropagation(),i.preventDefault()},children:d.jsx(O4e,{...o,actions:e,fallbackSrc:r,nameFallback:s})})]}),Zz=({notification:t,...e})=>{const n=S.useMemo(()=>t.userId?{id:t.userId,fullName:t.actor,avatarUrl:t.imageUrl||""}:null,[t]);return d.jsx(ie,{onClick:r=>{r.stopPropagation(),r.preventDefault()},children:d.jsx(OQ,{id:t.userId,name:t.actor,children:d.jsx(RQ,{user:n,avatarProps:{size:30,...e}})})})},N4e=()=>{var t;const{t:e}=Le(["ds"]),[n,r]=S.useState("all"),{loadMore:s,isLoading:o,notifications:i,hasMore:a,lastSeenAt:l}=p4e({initialCount:20}),{settingsUrl:c,archiveUrl:u}=b4e(),{loadMore:f,isLoading:h,notifications:m,hasMore:y,lastSeenAt:v,refetch:b,unreadCount:w}=h4e({initialCount:20}),{data:C,isLoading:k}=AQ(),E=(t=C==null?void 0:C.organization)==null?void 0:t.title;S.useEffect(()=>{n==="unread"&&b()},[n,b]);const j=!m.length,A=!i.length,M=n==="all"?A:j,{colorScheme:_}=eK(),D=_==="dark";return d.jsxs(bt,{h:"100%",gap:0,style:{overflow:"hidden"},children:[d.jsxs(ve,{justify:"space-between",px:"sm",mt:"sm",mb:"xs",children:[d.jsx(ue,{c:"primary",fw:500,children:e("notifications.modal.title")}),d.jsxs(ve,{gap:"0",children:[d.jsx(Yz,{url:u,tooltip:e("notifications.modal.archiveButton"),children:d.jsx(vwe,{size:18,stroke:1})}),d.jsx(Yz,{url:c,tooltip:e("notifications.modal.settingsButton"),children:d.jsx(kwe,{size:18,stroke:1})})]})]}),d.jsx(ga,{value:n,onChange:r,classNames:sh,children:d.jsxs(bt,{gap:0,h:"100%",children:[d.jsxs(ve,{justify:"space-between",wrap:"nowrap",gap:0,px:"sm",className:D?sh.headerDark:sh.header,children:[d.jsxs(ga.List,{style:{flexWrap:"nowrap"},children:[d.jsx(ga.Tab,{value:"all",children:e("notifications.modal.tabs.all")}),d.jsxs(ga.Tab,{value:"unread",disabled:A,children:[e("notifications.modal.tabs.unread")," ",w||""]})]}),d.jsx(i4e,{})]}),d.jsxs(bt,{gap:0,h:"100%",style:{justifyContent:M?"center":"flex-start"},className:sh.shrink,children:[d.jsx(ga.Panel,{value:"all",className:sh.shrink,children:d.jsx(qz,{height:"100%",onLoadMore:s,isLoading:o||k,disabled:!a||A,children:A?d.jsx(Wz,{title:e("ds:notifications.modal.empty.title"),description:e("ds:notifications.modal.empty.description",{serviceName:E})}):d.jsx(Vz,{avatarSlot:Zz,notifications:i,lastSeenAt:l,py:"sm"})})}),d.jsx(ga.Panel,{value:"unread",className:sh.shrink,children:d.jsx(qz,{height:"100%",onLoadMore:f,isLoading:h,disabled:!y||j,children:j?d.jsx(Wz,{title:e("ds:notifications.modal.emptyUnread.title"),description:e("ds:notifications.modal.emptyUnread.description",{serviceName:E})}):d.jsx(Vz,{avatarSlot:Zz,notifications:m,lastSeenAt:v,py:"sm"})})})]})]})})]})},Qz=({actionIconProps:t={}})=>{const[e,n]=S.useState(!1),{haveNew:r}=r4e(),[s]=n4e(),o=i=>{i&&n(!0),s()};return S.useEffect(()=>{n(!1)},[r]),d.jsxs(et,{position:"bottom-end",shadow:"sm",offset:15,radius:16,keepMounted:!1,onChange:o,children:[d.jsx(et.Target,{children:d.jsx(Ve,{size:"lg",...t,children:d.jsx(g2,{size:12,color:"red",withBorder:!0,offset:3,disabled:!r||e,style:{borderColor:"transparent"},children:d.jsx(bwe,{size:22})})})}),d.jsx(et.Dropdown,{w:400,h:565,p:0,children:d.jsx(N4e,{})})]})},L4e={[Sf.reducerPath]:Sf.reducer,[h3.reducerPath]:h3.reducer,[f3.reducerPath]:f3.reducer,[p3.reducerPath]:p3.reducer},$4e=[Sf.middleware,h3.middleware,f3.middleware,p3.middleware],F4e={title:"Уведомления",tabs:{all:"Все",unread:"Непрочитанные"},groups:{new:"Новые",older:"Полученные ранее"},empty:{title:"Новых уведомлений нет",description:"Здесь отображаются все важные уведомления сервисов {{serviceName}}"},emptyUnread:{title:"Непрочитанных уведомлений нет",description:"Здесь отображаются непрочитанные уведомления сервисов {{serviceName}}"},allAsReadButton:"Все как прочитанные",archiveButton:"Архив уведомлений",settingsButton:"Настройки уведомлений"},z4e={title:"Настройка уведомлений",modules:{admin:{roleChange:"Изменение группы",login:"Авторизация с другого устройства"},project:{taskChange:"Изменения задач в спринте",assignedTaskChanged:"Изменения задач назначенных на тебя",taskAssign:"Назначение на задачу",commentMention:"Упоминание в комментариях",projectAccess:"Выдача доступа к проекту",newSprint:"Новый спринт создан"}}},P4e={title:"Изменен доступ к файлу",description:"<strong>{{actor}}</strong> изменил настройки доступа к файлу <strong>«{{action.subject}}»</strong>.<br />Текущий уровень доступа: <strong>«{{action.accessType.title}}»</strong>."},B4e={title:"Новый комментарий к файлу",description:"<strong>{{actor}}</strong> оставил новый комментарий к файлу <strong>«{{action.subject}}»</strong>."},H4e={title:"Вас упомянули в комментарии",description:"<strong>{{actor}}</strong> упомянул вас в комментарии к файлу <strong>«{{action.subject}}»</strong>."},U4e={title:"Файл загружен",description:"Файл <strong>«{{action.subject}}»</strong> был загружен и успешно проверен."},V4e={title:"Загрузка файла заблокирована",description:"Файл <strong>«{{action.subject}}»</strong> был заблокирован политикой DLP."},q4e={title:"Ошибка при загрузке файла",description:"Произошла ошибка при проверке файла <strong>«{{action.subject}}»</strong>."},W4e={title:"Ссылка на файл сгенерирована",description:'Ваш файл <strong>«{{action.subject}}»</strong> успешно прошёл проверку. <a href="{{action.externalLinkUrl}}" target="_blank" rel="noopener noreferrer">Ссылка</a>'},Y4e={title:"Не удалось сгенерировать ссылку на файл",description:"Ваш файл <strong>«{{action.subject}}»</strong> не прошёл проверку. Попробуйте снова."},G4e={title:"Изменен доступ к папке",description:"<strong>{{actor}}</strong> изменил настройки доступа к папке <strong>«{{action.subject}}»</strong>. Текущий уровень доступа: <strong>«{{action.accessType.title}}»</strong>."},K4e={title:"Доступ к комнате",description:"Теперь у вас есть доступ уровня <strong>«{{action.accessType.title}}»</strong> к комнате <strong>«{{action.subject}}»</strong>."},X4e={title:"Доступ к проекту",description:"Теперь у вас есть доступ уровня <strong>«{{action.accessType.title}}»</strong> к проекту <strong>«{{action.subject}}»</strong>."},Z4e={title:"Новая задача создана",description:"<strong>{{actor}}</strong> создал(а) новую задачу <strong>«{{action.title}}»</strong>."},Q4e={title:"Задача удалена",description:"<strong>{{actor}}</strong> удалил задачу <strong>«{{action.title}}»</strong>."},J4e={title:"Детали задачи обновлены",description:"<strong>{{actor}}</strong> обновил(а) задачу <strong>«{{action.title}}»</strong>."},eSe={title:"Задача перемещена",description:"<strong>{{actor}}</strong> переместил(а) задачу <strong>«{{action.title}}»</strong> в <strong>«{{action.movedTo}}»</strong>."},tSe={title:"Статус задачи изменен",description:"<strong>{{actor}}</strong> переместил(а) задачу <strong>«{{action.title}}»</strong> в статус <strong>«{{action.status}}»</strong>."},nSe={title:"Новый комментарий к задаче",description:"<strong>{{actor}}</strong> оставил(а) новый комментарий к задаче <strong>«{{action.title}}»</strong>."},rSe={title:"Задача удалена",description:"<strong>{{actor}}</strong> удалил задачу <strong>«{{action.title}}»</strong>."},sSe={title:"Детали задачи обновлены",description:"<strong>{{actor}}</strong> обновил(а) задачу <strong>«{{action.title}}»</strong>."},oSe={title:"Задача перемещена",description:"<strong>{{actor}}</strong> переместил(а) задачу <strong>«{{action.title}}»</strong> в <strong>«{{action.movedTo}}»</strong>."},iSe={title:"Статус задачи изменен",description:"<strong>{{actor}}</strong> переместил(а) задачу <strong>«{{action.title}}»</strong> в статус <strong>«{{action.status}}»</strong>."},aSe={title:"Новый комментарий к задаче",description:"<strong>{{actor}}</strong> оставил(а) новый комментарий к задаче <strong>«{{action.title}}»</strong>."},lSe={title:"Вы исключены из задачи",description:"<strong>{{actor}}</strong> исключил(а) вас из задачи <strong>«{{action.title}}»</strong>."},cSe={title:"Вам назначена задача",description:"<strong>{{actor}}</strong> назначил(а) вас на задачу <strong>«{{action.title}}»</strong>."},uSe={title:"Вас упомянули в комментарии",description:"<strong>{{actor}}</strong> упомянул(а) вас в комментарии к задаче <strong>«{{action.title}}»</strong>."},dSe={title:"Новое вложение в задаче",description:"<strong>{{actor}}</strong> добавил(а) новое вложение к задаче <strong>«{{action.title}}»</strong>."},fSe={title:"Новый спринт создан",description:"Новый спринт <strong>«{{action.subject}}»</strong> был создан в проекте <strong>«{{action.project}}»</strong>."},pSe={title:"Вам назначена новая группа",description:"Вам назначена группа <strong>«{{action.subject}}»</strong> в проекте <strong>«{{action.customerName}}»</strong>."},hSe={title:"Ваша группа удалена",description:"Вас удалили из группы <strong>«{{action.subject}}»</strong> в проекте <strong>«{{action.customerName}}»</strong>."},mSe={title:"Сообщение с флагом «Важное»",description:"<strong>{{actor}}</strong> отправил(а) новое сообщение с флагом «Важное»"},gSe={title:"Новое сообщение",description:"<strong>{{actor}}</strong> отправил(а) новое сообщение"},ySe={title:"Доступ к календарю",description:"Теперь у вас есть доступ уровня <strong>«{{action.accessType.title}}»</strong> к календарю <strong>«{{action.subject}}»</strong>."},vSe={title:"Событие отменено",description:"Событие <strong>«{{action.title}}»</strong> было отменено <strong>{{actor}}</strong>."},bSe={title:"Вы приглашены на событие",description:"<strong>{{actor}}</strong> пригласил(а) вас на событие <strong>«{{action.title}}»</strong>."},xSe={title:"Детали события обновлены",description:"<strong>{{actor}}</strong> обновил(а) детали события <strong>«{{action.title}}»</strong>."},wSe={title:"Запланированное событие",description:"Событие <strong>«{{action.title, defaultValue(fallback:Без заголовка)}}»</strong> {{action.timeUntilStart, eventStatusDescription}}.",started:"началось",willStartIn:"начнется через"},SSe={week_one:"{{count}} неделю",week_few:"{{count}} недели",week_many:"{{count}} недель",day_one:"{{count}} день",day_few:"{{count}} дня",day_many:"{{count}} дней",hour_one:"{{count}} час",hour_few:"{{count}} часа",hour_many:"{{count}} часов",minute_one:"{{count}} минуту",minute_few:"{{count}} минуты",minute_many:"{{count}} минут",second_one:"{{count}} секунду",second_few:"{{count}} секунды",second_many:"{{count}} секунд",lessThanMinute:"меньше минуты",started:"началось"},CSe={modal:F4e,settingsPage:z4e,DiskFileShared:P4e,DiskFileCommented:B4e,DiskFileMentioned:H4e,DiskFileUploaded:U4e,DiskFileUploadedBlocked:V4e,DiskFileUploadedError:q4e,DiskLinkGenerated:W4e,DiskLinkGeneratedError:Y4e,DiskDirectoryShared:G4e,DiskRoomShared:K4e,ProjectShared:X4e,ProjectTaskCreated:Z4e,ProjectTaskDeleted:Q4e,ProjectTaskUpdated:J4e,ProjectTaskMoved:eSe,ProjectTaskStatusChanged:tSe,ProjectTaskCommented:nSe,ProjectMyTaskDeleted:rSe,ProjectMyTaskUpdated:sSe,ProjectMyTaskMoved:oSe,ProjectMyTaskStatusChanged:iSe,ProjectMyTaskCommented:aSe,ProjectTaskUnassigned:lSe,ProjectTaskAssigned:cSe,ProjectTaskMentioned:uSe,ProjectTaskAttachmentAdded:dSe,ProjectSprintCreated:fSe,AdminRoleAssigned:pSe,AdminRoleDeleted:hSe,MailMessageImportant:mSe,MailMessageReceived:gSe,CalendarShared:ySe,CalendarEventCanceled:vSe,CalendarEventInvited:bSe,CalendarEventUpdated:xSe,CalendarEventUpcoming:wSe,duration:SSe},kSe={title:"Notifications",tabs:{all:"All",unread:"Unread"},groups:{new:"New",older:"Received earlier"},empty:{title:"No new notifications",description:"All important notifications from {{serviceName}} services are collected here"},emptyUnread:{title:"No unread notifications",description:"Here are displayed unread notifications from {{serviceName}} services"},allAsReadButton:"Mark all as read",archiveButton:"All notifications",settingsButton:"Notification Settings"},ESe={title:"Notification Settings",modules:{admin:{roleChange:"Group Change",login:"Login from Another Device"},project:{taskChange:"Task Changes in Sprint",assignedTaskChanged:"Assigned Task Changes",taskAssign:"Task Assignment",commentMention:"Mention in Comments",projectAccess:"Project Access Granted",newSprint:"New Sprint Created"}}},TSe={title:"File Access Changed",description:"<strong>{{actor}}</strong> changed access settings for the file <strong>«{{action.subject}}»</strong>.<br />Current access level: <strong>«{{action.accessType.title}}»</strong>."},MSe={title:"New Comment on File",description:"<strong>{{actor}}</strong> left a new comment on the file <strong>«{{action.subject}}»</strong>."},jSe={title:"You've Been Mentioned",description:"<strong>{{actor}}</strong> mentioned you in a comment on the file <strong>«{{action.subject}}»</strong>."},ASe={title:"File Uploaded",description:"The file <strong>«{{action.subject}}»</strong> has been uploaded and checked successfully."},_Se={title:"File Upload Blocked",description:"The file <strong>«{{action.subject}}»</strong> was blocked by DLP policy."},RSe={title:"File Upload Error",description:"An error occurred while checking the file <strong>«{{action.subject}}»</strong>."},DSe={title:"File link generated",description:'Your file <strong>«{{action.subject}}»</strong> has been successfully validated. <a href="{{action.externalLinkUrl}}" target="_blank" rel="noopener noreferrer">Link</a>'},ISe={title:"Failed to generate file link",description:"Your file <strong>«{{action.subject}}»</strong> didn't pass validation. Try again."},OSe={title:"Folder Access Changed",description:"<strong>{{actor}}</strong> changed access settings for the folder <strong>«{{action.subject}}»</strong>. Current access level: <strong>«{{action.accessType.title}}»</strong>."},NSe={title:"Access Granted to Room",description:"You now have <strong>«{{action.accessType.title}}»</strong> access to the room <strong>«{{action.subject}}»</strong>."},LSe={title:"Access Granted to Project",description:"You now have <strong>«{{action.accessType.title}}»</strong> access to the project <strong>«{{action.subject}}»</strong>."},$Se={title:"New Task Created",description:"<strong>{{actor}}</strong> created a new task <strong>«{{action.title}}»</strong>."},FSe={title:"Task Deleted",description:"The task <strong>«{{action.title}}»</strong> was deleted by <strong>{{actor}}</strong>."},zSe={title:"Task Details Updated",description:"<strong>{{actor}}</strong> updated the task <strong>«{{action.title}}»</strong>."},PSe={title:"Task Moved",description:"<strong>{{actor}}</strong> moved the task <strong>«{{action.title}}»</strong> to <strong>«{{action.movedTo}}»</strong>."},BSe={title:"Task Status Changed",description:"<strong>{{actor}}</strong> moved the task <strong>«{{action.title}}»</strong> to <strong>«{{action.status}}»</strong>."},HSe={title:"New Comment on Task",description:"<strong>{{actor}}</strong> left a new comment on the task <strong>«{{action.title}}»</strong>."},USe={title:"Task Deleted",description:"The task <strong>«{{action.title}}»</strong> was deleted by <strong>{{actor}}</strong>."},VSe={title:"Task Details Updated",description:"<strong>{{actor}}</strong> updated the task <strong>«{{action.title}}»</strong>."},qSe={title:"Task Moved",description:"<strong>{{actor}}</strong> moved the task <strong>«{{action.title}}»</strong> to <strong>«{{action.movedTo}}»</strong>."},WSe={title:"Task Status Changed",description:"<strong>{{actor}}</strong> moved the task <strong>«{{action.title}}»</strong> to <strong>«{{action.status}}»</strong>."},YSe={title:"New Comment on Task",description:"<strong>{{actor}}</strong> left a new comment on the task <strong>«{{action.title}}»</strong>."},GSe={title:"Unassigned from Task",description:"<strong>{{actor}}</strong> unassigned you from the task <strong>«{{action.title}}»</strong>."},KSe={title:"Assigned a Task",description:"<strong>{{actor}}</strong> assigned you to the task <strong>«{{action.title}}»</strong>."},XSe={title:"You've Been Mentioned",description:"<strong>{{actor}}</strong> mentioned you in a comment on the task <strong>«{{action.title}}»</strong>."},ZSe={title:"New Attachment in Task",description:"<strong>{{actor}}</strong> added a new attachment to the task <strong>«{{action.title}}»</strong>."},QSe={title:"New Sprint Created",description:"A new sprint <strong>«{{action.subject}}»</strong> has been created in the project <strong>«{{action.project}}»</strong>."},JSe={title:"Assigned to a New Group",description:"You have been assigned to the group <strong>«{{action.subject}}»</strong> in <strong>«{{action.customerName}}»</strong>."},eCe={title:"Group Has Been Removed",description:"You have been removed from the <strong>«{{action.subject}}»</strong> group in <strong>«{{action.customerName}}»</strong>."},tCe={title:'Message with "Important" Tag',description:'<strong>{{actor}}</strong> sent a new message tagged as "Important"'},nCe={title:"New Message",description:"<strong>{{actor}}</strong> sent a new message"},rCe={title:"Access Granted to Calendar",description:"You now have <strong>«{{action.accessType.title}}»</strong> access to the calendar <strong>«{{action.subject}}»</strong>."},sCe={title:"Event Canceled",description:"The event <strong>«{{action.title}}»</strong> was canceled by <strong>{{actor}}</strong>."},oCe={title:"Invite to Event",description:"<strong>{{actor}}</strong> invited you to the event <strong>«{{action.title}}»</strong>."},iCe={title:"Event Details Updated",description:"<strong>{{actor}}</strong> updated the event <strong>«{{action.title}}»</strong>."},aCe={title:"Upcoming Event",description:"Event <strong>«{{action.title, defaultValue(fallback: Untitled)}}»</strong> {{action.timeUntilStart, eventStatusDescription}}.",started:"started",willStartIn:"will start in"},lCe={week_one:"{{count}} week",week_other:"{{count}} weeks",day_one:"{{count}} day",day_other:"{{count}} days",hour_one:"{{count}} hour",hour_other:"{{count}} hours",minute_one:"{{count}} minute",minute_other:"{{count}} minutes",second_one:"{{count}} second",second_other:"{{count}} seconds",lessThanMinute:"less than a minute",started:"started"},cCe={modal:kSe,settingsPage:ESe,DiskFileShared:TSe,DiskFileCommented:MSe,DiskFileMentioned:jSe,DiskFileUploaded:ASe,DiskFileUploadedBlocked:_Se,DiskFileUploadedError:RSe,DiskLinkGenerated:DSe,DiskLinkGeneratedError:ISe,DiskDirectoryShared:OSe,DiskRoomShared:NSe,ProjectShared:LSe,ProjectTaskCreated:$Se,ProjectTaskDeleted:FSe,ProjectTaskUpdated:zSe,ProjectTaskMoved:PSe,ProjectTaskStatusChanged:BSe,ProjectTaskCommented:HSe,ProjectMyTaskDeleted:USe,ProjectMyTaskUpdated:VSe,ProjectMyTaskMoved:qSe,ProjectMyTaskStatusChanged:WSe,ProjectMyTaskCommented:YSe,ProjectTaskUnassigned:GSe,ProjectTaskAssigned:KSe,ProjectTaskMentioned:XSe,ProjectTaskAttachmentAdded:ZSe,ProjectSprintCreated:QSe,AdminRoleAssigned:JSe,AdminRoleDeleted:eCe,MailMessageImportant:tCe,MailMessageReceived:nCe,CalendarShared:rCe,CalendarEventCanceled:sCe,CalendarEventInvited:oCe,CalendarEventUpdated:iCe,CalendarEventUpcoming:aCe,duration:lCe},uCe="Неизвестно",dCe={Off:"Отключено",All:"Все модули",Self:"Этот модуль"},fCe={Deny:"Запретить",OnlyUpload:"Только загрузка",FreeBusy:"Свободен/Занят",CanDownload:"Можно скачать",Read:"Чтение",Comment:"Комментировать",Review:"Рецензировать",Write:"Запись",Delete:"Удалить",FullInternal:"Полный внутренний",Full:"Полный",Lock:"Заблокировать",LockPrint:"Заблокировать печать",LockCopy:"Заблокировать копирование",LockDownload:"Заблокировать скачивание"},pCe={System:"Система",Disk:"Диск",Projects:"Проекты",Calendar:"Календарь",Mail:"Почта",Contacts:"Контакты",Admin:"Управление"},hCe={RoleChange:"Изменения ролей",Login:"Авторизация с другого устройства",TaskChange:"Изменения задач в спринте",AssignedTaskChange:"Изменения задач назначенных на тебя",TaskAssign:"Назначение на задачу",CommentMention:"Упоминание в комментариях",ProjectAccess:"Выдача доступа к проекту",SprintCreated:"Новый спринт создан",NewMessage:"Новое входящее сообщение",ReplyToImportantMessage:"Ответ на важное сообщение",DiskCommentMention:"Упоминание в комментариях",DiskAccess:"Выдача доступа",DiskFull:"Заканчивается место на диске",AvailableDocumentChange:"Изменения доступным мне документов",MyDocumentChange:"Изменения моих документов",UpcomingEvent:"Уведомление о предстоящем событии",EventInvite:"Приглашение в событие",EventChange:"Изменение событий в твоем календаре или где ты участник",SharedEventChange:"Изменение событий в пошареных тебе календарях",CalendarShared:"Выдача доступа к каленадрю"},mCe={Completed:"Завершено",Blocked:"Заблокировано",Error:"Ошибка"},gCe={unknown:uCe,notificationSetting:dCe,accessType:fCe,module:pCe,notificationSettingType:hCe,fileUploadStatus:mCe},yCe="Unknown",vCe={Off:"Off",All:"All modules",Self:"This module"},bCe={Deny:"Deny",OnlyUpload:"Upload Only",FreeBusy:"Free/Busy",CanDownload:"Can Download",Read:"Read",Comment:"Comment",Review:"Review",Write:"Write",Delete:"Delete",FullInternal:"Full Internal",Full:"Full",Lock:"Lock",LockPrint:"Lock Print",LockCopy:"Lock Copy",LockDownload:"Lock Download"},xCe={System:"System",Disk:"Disk",Projects:"Projects",Calendar:"Calendar",Mail:"Mail",Contacts:"Contacts",Admin:"Admin"},wCe={Completed:"Completed",Blocked:"Blocked",Error:"Error"},SCe={unknown:yCe,notificationSetting:vCe,accessType:bCe,module:xCe,fileUploadStatus:wCe},CCe={actions:{addToContacts:{inContacts:"Личные",add:"Добавить",organization:"Организация"}}},kCe={card:CCe},ECe={actions:{addToContacts:{inContacts:"Personal",add:"Add",organization:"Organization"}}},TCe={card:ECe},MCe={ru:{notifications:CSe,dictionary:gCe,contact:kCe},en:{notifications:cCe,dictionary:SCe,contact:TCe}},jCe={type:"3rdParty",init(t){setTimeout(()=>{try{let e=null;if(t.resourceStore&&t.resourceStore.addResourceBundle?e=t.resourceStore.addResourceBundle.bind(t.resourceStore):t.addResourceBundle&&(e=t.addResourceBundle.bind(t)),!e){console.error("No resource add method available");return}Object.entries(MCe).forEach(([n,r])=>{e(n,"ds",r,!0,!0)})}catch(e){console.error("Failed to add UI Kit translations:",e)}},100)}},ACe={type:"formatter",init(t){var e;try{(e=t==null?void 0:t.services)!=null&&e.formatter&&(t.services.formatter.add("duration",n=>bQ(n,t==null?void 0:t.t)),t.services.formatter.add("upper",n=>n&&n.toUpperCase()),t.services.formatter.add("defaultValue",(n,r,s)=>Q3e(n,s)),t.services.formatter.add("eventStatusDescription",n=>J3e(n,t==null?void 0:t.t)))}catch(n){console.error("Failed to register UI Kit formatters:",n)}}},_Ce={type:"3rdParty",init(t){jCe.init(t),ACe.init(t)}},RCe={selectedAccount:"-1",isRendered:!1},NQ=oi({name:"accountFilter",initialState:RCe,reducers:{setSelectedAccount:(t,e)=>{t.selectedAccount=e.payload},resetAccountFilter:t=>{t.selectedAccount="-1"},setIsRendered:(t,e)=>{t.isRendered=e.payload}}}),{setSelectedAccount:Kv,resetAccountFilter:LQ,setIsRendered:DCe}=NQ.actions,ICe=NQ.reducer,Ed=t=>t.accountFilter.selectedAccount,OCe={totalSizeById:{}},$Q=oi({name:"attachmentLinks",initialState:OCe,reducers:{setMultipleLinks(t,e){Object.assign(t,e.payload)},setTotalAttachmentSize(t,e){t.totalSizeById[e.payload.id]=e.payload.calculateSize}}}),{setMultipleLinks:NCe,setTotalAttachmentSize:LCe}=$Q.actions,FQ=t=>t.attachmentLinks,$Ce=t=>e=>e.attachmentLinks.totalSizeById[t]??0,FCe=$Q.reducer,zCe={isOpened:!1,ownerId:null},zQ=oi({name:"cardContextMenu",initialState:zCe,reducers:{openMenu(t,e){t.isOpened=!0,t.ownerId=e.payload},closeMenu(t){t.isOpened=!1,t.ownerId=null}}}),{openMenu:PCe,closeMenu:Dr}=zQ.actions,Td=t=>t.cardContextMenu,BCe=zQ.reducer,HCe={isContactContextMenuOpen:!1},PQ=oi({name:"contactContextMenu",initialState:HCe,reducers:{setContactContextMenuOpen(t,e){t.isContactContextMenuOpen=e.payload}}}),{setContactContextMenuOpen:Xv}=PQ.actions,UCe=PQ.reducer,VCe={isContextMenuOpen:!1},BQ=oi({name:"contextMenu",initialState:VCe,reducers:{setContextMenuOpen(t,e){t.isContextMenuOpen=e.payload}}}),{setContextMenuOpen:tm}=BQ.actions,qCe=BQ.reducer;/**
 * @license @tabler/icons-react v3.36.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */var WCe={outline:{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},filled:{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"currentColor",stroke:"none"}};/**
 * @license @tabler/icons-react v3.36.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const dt=(t,e,n,r)=>{const s=S.forwardRef(({color:o="currentColor",size:i=24,stroke:a=2,title:l,className:c,children:u,...f},h)=>S.createElement("svg",{ref:h,...WCe[t],width:i,height:i,className:["tabler-icon",`tabler-icon-${e}`,c].join(" "),...t==="filled"?{fill:o}:{strokeWidth:a,stroke:o},...f},[l&&S.createElement("title",{key:"svg-title"},l),...r.map(([m,y])=>S.createElement(m,y)),...Array.isArray(u)?u:[u]]));return s.displayName=`${n}`,s};/**
 * @license @tabler/icons-react v3.36.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const YCe=[["path",{d:"M12 6a2 2 0 1 0 4 0a2 2 0 1 0 -4 0",key:"svg-0"}],["path",{d:"M4 6l8 0",key:"svg-1"}],["path",{d:"M16 6l4 0",key:"svg-2"}],["path",{d:"M6 12a2 2 0 1 0 4 0a2 2 0 1 0 -4 0",key:"svg-3"}],["path",{d:"M4 12l2 0",key:"svg-4"}],["path",{d:"M10 12l10 0",key:"svg-5"}],["path",{d:"M15 18a2 2 0 1 0 4 0a2 2 0 1 0 -4 0",key:"svg-6"}],["path",{d:"M4 18l11 0",key:"svg-7"}],["path",{d:"M19 18l1 0",key:"svg-8"}]],HQ=dt("outline","adjustments-horizontal","AdjustmentsHorizontal",YCe);/**
 * @license @tabler/icons-react v3.36.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const GCe=[["path",{d:"M3 12a9 9 0 1 0 18 0a9 9 0 0 0 -18 0",key:"svg-0"}],["path",{d:"M12 8v4",key:"svg-1"}],["path",{d:"M12 16h.01",key:"svg-2"}]],bc=dt("outline","alert-circle","AlertCircle",GCe);/**
 * @license @tabler/icons-react v3.36.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const KCe=[["path",{d:"M12 9v4",key:"svg-0"}],["path",{d:"M10.363 3.591l-8.106 13.534a1.914 1.914 0 0 0 1.636 2.871h16.214a1.914 1.914 0 0 0 1.636 -2.87l-8.106 -13.536a1.914 1.914 0 0 0 -3.274 0",key:"svg-1"}],["path",{d:"M12 16h.01",key:"svg-2"}]],XCe=dt("outline","alert-triangle","AlertTriangle",KCe);/**
 * @license @tabler/icons-react v3.36.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const ZCe=[["path",{d:"M4 11.319c0 3.102 .444 5.319 2.222 7.978c1.351 1.797 3.156 2.247 5.08 .988c.426 -.268 .97 -.268 1.397 0c1.923 1.26 3.728 .809 5.079 -.988c1.778 -2.66 2.222 -4.876 2.222 -7.977c0 -2.661 -1.99 -5.32 -4.444 -5.32c-1.267 0 -2.41 .693 -3.22 1.44a.5 .5 0 0 1 -.672 0c-.809 -.746 -1.953 -1.44 -3.22 -1.44c-2.454 0 -4.444 2.66 -4.444 5.319",key:"svg-0"}],["path",{d:"M7 12c0 -1.47 .454 -2.34 1.5 -3",key:"svg-1"}],["path",{d:"M12 7c0 -1.2 .867 -4 3 -4",key:"svg-2"}]],QCe=dt("outline","apple","Apple",ZCe);/**
 * @license @tabler/icons-react v3.36.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const JCe=[["path",{d:"M3 6a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2",key:"svg-0"}],["path",{d:"M5 8v10a2 2 0 0 0 2 2h10a2 2 0 0 0 2 -2v-10",key:"svg-1"}],["path",{d:"M10 12l4 0",key:"svg-2"}]],Cf=dt("outline","archive","Archive",JCe);/**
 * @license @tabler/icons-react v3.36.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const e5e=[["path",{d:"M5 12l14 0",key:"svg-0"}],["path",{d:"M5 12l6 6",key:"svg-1"}],["path",{d:"M5 12l6 -6",key:"svg-2"}]],UQ=dt("outline","arrow-left","ArrowLeft",e5e);/**
 * @license @tabler/icons-react v3.36.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const t5e=[["path",{d:"M18 10h-4v-4",key:"svg-0"}],["path",{d:"M20 4l-6 6",key:"svg-1"}],["path",{d:"M6 14h4v4",key:"svg-2"}],["path",{d:"M10 14l-6 6",key:"svg-3"}]],n5e=dt("outline","arrows-diagonal-minimize-2","ArrowsDiagonalMinimize2",t5e);/**
 * @license @tabler/icons-react v3.36.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const r5e=[["path",{d:"M16 4l4 0l0 4",key:"svg-0"}],["path",{d:"M14 10l6 -6",key:"svg-1"}],["path",{d:"M8 20l-4 0l0 -4",key:"svg-2"}],["path",{d:"M4 20l6 -6",key:"svg-3"}]],s5e=dt("outline","arrows-diagonal","ArrowsDiagonal",r5e);/**
 * @license @tabler/icons-react v3.36.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const o5e=[["path",{d:"M3 7a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v10a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2v-10",key:"svg-0"}],["path",{d:"M7 12v-3h3",key:"svg-1"}],["path",{d:"M17 12v3h-3",key:"svg-2"}]],i5e=dt("outline","aspect-ratio","AspectRatio",o5e);/**
 * @license @tabler/icons-react v3.36.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const a5e=[["path",{d:"M8 12a4 4 0 1 0 8 0a4 4 0 1 0 -8 0",key:"svg-0"}],["path",{d:"M16 12v1.5a2.5 2.5 0 0 0 5 0v-1.5a9 9 0 1 0 -5.5 8.28",key:"svg-1"}]],VQ=dt("outline","at","At",a5e);/**
 * @license @tabler/icons-react v3.36.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const l5e=[["path",{d:"M9 9v-1a3 3 0 0 1 6 0v1",key:"svg-0"}],["path",{d:"M8 9h8a6 6 0 0 1 1 3v3a5 5 0 0 1 -10 0v-3a6 6 0 0 1 1 -3",key:"svg-1"}],["path",{d:"M3 13l4 0",key:"svg-2"}],["path",{d:"M17 13l4 0",key:"svg-3"}],["path",{d:"M12 20l0 -6",key:"svg-4"}],["path",{d:"M4 19l3.35 -2",key:"svg-5"}],["path",{d:"M20 19l-3.35 -2",key:"svg-6"}],["path",{d:"M4 7l3.75 2.4",key:"svg-7"}],["path",{d:"M20 7l-3.75 2.4",key:"svg-8"}]],c5e=dt("outline","bug","Bug",l5e);/**
 * @license @tabler/icons-react v3.36.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const u5e=[["path",{d:"M3 12h1m8 -9v1m8 8h1m-15.4 -6.4l.7 .7m12.1 -.7l-.7 .7",key:"svg-0"}],["path",{d:"M9 16a5 5 0 1 1 6 0a3.5 3.5 0 0 0 -1 3a2 2 0 0 1 -4 0a3.5 3.5 0 0 0 -1 -3",key:"svg-1"}],["path",{d:"M9.7 17l4.6 0",key:"svg-2"}]],d5e=dt("outline","bulb","Bulb",u5e);/**
 * @license @tabler/icons-react v3.36.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const f5e=[["path",{d:"M12.5 21h-6.5a2 2 0 0 1 -2 -2v-12a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v5",key:"svg-0"}],["path",{d:"M16 3v4",key:"svg-1"}],["path",{d:"M8 3v4",key:"svg-2"}],["path",{d:"M4 11h16",key:"svg-3"}],["path",{d:"M16 19a3 3 0 1 0 6 0a3 3 0 1 0 -6 0",key:"svg-4"}],["path",{d:"M17 21l4 -4",key:"svg-5"}]],p5e=dt("outline","calendar-cancel","CalendarCancel",f5e);/**
 * @license @tabler/icons-react v3.36.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const h5e=[["path",{d:"M11.5 21h-5.5a2 2 0 0 1 -2 -2v-12a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v6",key:"svg-0"}],["path",{d:"M16 3v4",key:"svg-1"}],["path",{d:"M8 3v4",key:"svg-2"}],["path",{d:"M4 11h16",key:"svg-3"}],["path",{d:"M15 19l2 2l4 -4",key:"svg-4"}]],m5e=dt("outline","calendar-check","CalendarCheck",h5e);/**
 * @license @tabler/icons-react v3.36.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const g5e=[["path",{d:"M4 7a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2l0 -12",key:"svg-0"}],["path",{d:"M16 3l0 4",key:"svg-1"}],["path",{d:"M8 3l0 4",key:"svg-2"}],["path",{d:"M4 11l16 0",key:"svg-3"}],["path",{d:"M8 15h2v2h-2l0 -2",key:"svg-4"}]],y5e=dt("outline","calendar-event","CalendarEvent",g5e);/**
 * @license @tabler/icons-react v3.36.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const v5e=[["path",{d:"M15 21h-9a2 2 0 0 1 -2 -2v-12a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v4",key:"svg-0"}],["path",{d:"M16 3v4",key:"svg-1"}],["path",{d:"M8 3v4",key:"svg-2"}],["path",{d:"M4 11h16",key:"svg-3"}],["path",{d:"M19 22v.01",key:"svg-4"}],["path",{d:"M19 19a2.003 2.003 0 0 0 .914 -3.782a1.98 1.98 0 0 0 -2.414 .483",key:"svg-5"}]],b5e=dt("outline","calendar-question","CalendarQuestion",v5e);/**
 * @license @tabler/icons-react v3.36.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const x5e=[["path",{d:"M13 21h-7a2 2 0 0 1 -2 -2v-12a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v6.5",key:"svg-0"}],["path",{d:"M16 3v4",key:"svg-1"}],["path",{d:"M8 3v4",key:"svg-2"}],["path",{d:"M4 11h16",key:"svg-3"}],["path",{d:"M22 22l-5 -5",key:"svg-4"}],["path",{d:"M17 22l5 -5",key:"svg-5"}]],w5e=dt("outline","calendar-x","CalendarX",x5e);/**
 * @license @tabler/icons-react v3.36.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const S5e=[["path",{d:"M4 7a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2v-12",key:"svg-0"}],["path",{d:"M16 3v4",key:"svg-1"}],["path",{d:"M8 3v4",key:"svg-2"}],["path",{d:"M4 11h16",key:"svg-3"}],["path",{d:"M11 15h1",key:"svg-4"}],["path",{d:"M12 15v3",key:"svg-5"}]],C5e=dt("outline","calendar","Calendar",S5e);/**
 * @license @tabler/icons-react v3.36.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const k5e=[["path",{d:"M12 15a3 3 0 1 0 6 0a3 3 0 1 0 -6 0",key:"svg-0"}],["path",{d:"M13 17.5v4.5l2 -1.5l2 1.5v-4.5",key:"svg-1"}],["path",{d:"M10 19h-5a2 2 0 0 1 -2 -2v-10c0 -1.1 .9 -2 2 -2h14a2 2 0 0 1 2 2v10a2 2 0 0 1 -1 1.73",key:"svg-2"}],["path",{d:"M6 9l12 0",key:"svg-3"}],["path",{d:"M6 12l3 0",key:"svg-4"}],["path",{d:"M6 15l2 0",key:"svg-5"}]],E5e=dt("outline","certificate","Certificate",k5e);/**
 * @license @tabler/icons-react v3.36.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const T5e=[["path",{d:"M5 12l5 5l10 -10",key:"svg-0"}]],Ko=dt("outline","check","Check",T5e);/**
 * @license @tabler/icons-react v3.36.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const M5e=[["path",{d:"M6 9l6 6l6 -6",key:"svg-0"}]],Nm=dt("outline","chevron-down","ChevronDown",M5e);/**
 * @license @tabler/icons-react v3.36.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const j5e=[["path",{d:"M15 6l-6 6l6 6",key:"svg-0"}]],yo=dt("outline","chevron-left","ChevronLeft",j5e);/**
 * @license @tabler/icons-react v3.36.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const A5e=[["path",{d:"M9 6l6 6l-6 6",key:"svg-0"}]],Yi=dt("outline","chevron-right","ChevronRight",A5e);/**
 * @license @tabler/icons-react v3.36.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const _5e=[["path",{d:"M17 15l4 4m0 -4l-4 4",key:"svg-0"}],["path",{d:"M7 6v-1h11v1",key:"svg-1"}],["path",{d:"M7 19l4 0",key:"svg-2"}],["path",{d:"M13 5l-4 14",key:"svg-3"}]],R5e=dt("outline","clear-formatting","ClearFormatting",_5e);/**
 * @license @tabler/icons-react v3.36.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const D5e=[["path",{d:"M3 12a9 9 0 1 0 18 0a9 9 0 1 0 -18 0",key:"svg-0"}],["path",{d:"M12 12l3 2",key:"svg-1"}],["path",{d:"M12 7v5",key:"svg-2"}]],xc=dt("outline","clock-hour-4","ClockHour4",D5e);/**
 * @license @tabler/icons-react v3.36.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const I5e=[["path",{d:"M3 12a9 9 0 1 0 18 0a9 9 0 0 0 -18 0",key:"svg-0"}],["path",{d:"M12 7v5l3 3",key:"svg-1"}]],O5e=dt("outline","clock","Clock",I5e);/**
 * @license @tabler/icons-react v3.36.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const N5e=[["path",{d:"M14 4h4a1 1 0 0 1 1 1v14a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1v-14a1 1 0 0 1 1 -1",key:"svg-0"}],["path",{d:"M5 12l4 0",key:"svg-1"}],["path",{d:"M7 10l0 4",key:"svg-2"}]],L5e=dt("outline","column-insert-left","ColumnInsertLeft",N5e);/**
 * @license @tabler/icons-react v3.36.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const $5e=[["path",{d:"M6 4h4a1 1 0 0 1 1 1v14a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1v-14a1 1 0 0 1 1 -1",key:"svg-0"}],["path",{d:"M15 12l4 0",key:"svg-1"}],["path",{d:"M17 10l0 4",key:"svg-2"}]],F5e=dt("outline","column-insert-right","ColumnInsertRight",$5e);/**
 * @license @tabler/icons-react v3.36.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const z5e=[["path",{d:"M6 4h4a1 1 0 0 1 1 1v14a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1v-14a1 1 0 0 1 1 -1",key:"svg-0"}],["path",{d:"M16 10l4 4",key:"svg-1"}],["path",{d:"M16 14l4 -4",key:"svg-2"}]],P5e=dt("outline","column-remove","ColumnRemove",z5e);/**
 * @license @tabler/icons-react v3.36.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const B5e=[["path",{d:"M4 6l5.5 0",key:"svg-0"}],["path",{d:"M4 10l5.5 0",key:"svg-1"}],["path",{d:"M4 14l5.5 0",key:"svg-2"}],["path",{d:"M4 18l5.5 0",key:"svg-3"}],["path",{d:"M14.5 6l5.5 0",key:"svg-4"}],["path",{d:"M14.5 10l5.5 0",key:"svg-5"}],["path",{d:"M14.5 14l5.5 0",key:"svg-6"}],["path",{d:"M14.5 18l5.5 0",key:"svg-7"}]],H5e=dt("outline","columns","Columns",B5e);/**
 * @license @tabler/icons-react v3.36.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const U5e=[["path",{d:"M7 9.667a2.667 2.667 0 0 1 2.667 -2.667h8.666a2.667 2.667 0 0 1 2.667 2.667v8.666a2.667 2.667 0 0 1 -2.667 2.667h-8.666a2.667 2.667 0 0 1 -2.667 -2.667l0 -8.666",key:"svg-0"}],["path",{d:"M4.012 16.737a2.005 2.005 0 0 1 -1.012 -1.737v-10c0 -1.1 .9 -2 2 -2h10c.75 0 1.158 .385 1.5 1",key:"svg-1"}]],m3=dt("outline","copy","Copy",U5e);/**
 * @license @tabler/icons-react v3.36.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const V5e=[["path",{d:"M19 18v-6a3 3 0 0 0 -3 -3h-7",key:"svg-0"}],["path",{d:"M13 13l-4 -4l4 -4m-5 8l-4 -4l4 -4",key:"svg-1"}]],V4=dt("outline","corner-up-left-double","CornerUpLeftDouble",V5e);/**
 * @license @tabler/icons-react v3.36.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const q5e=[["path",{d:"M18 18v-6a3 3 0 0 0 -3 -3h-10l4 -4m0 8l-4 -4",key:"svg-0"}]],g3=dt("outline","corner-up-left","CornerUpLeft",q5e);/**
 * @license @tabler/icons-react v3.36.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const W5e=[["path",{d:"M6 18v-6a3 3 0 0 1 3 -3h10l-4 -4m0 8l4 -4",key:"svg-0"}]],q4=dt("outline","corner-up-right","CornerUpRight",W5e);/**
 * @license @tabler/icons-react v3.36.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const Y5e=[["path",{d:"M4 17a3 3 0 1 0 6 0a3 3 0 1 0 -6 0",key:"svg-0"}],["path",{d:"M14 17a3 3 0 1 0 6 0a3 3 0 1 0 -6 0",key:"svg-1"}],["path",{d:"M9.15 14.85l8.85 -10.85",key:"svg-2"}],["path",{d:"M6 4l8.85 10.85",key:"svg-3"}]],G5e=dt("outline","cut","Cut",Y5e);/**
 * @license @tabler/icons-react v3.36.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const K5e=[["path",{d:"M3 19l18 0",key:"svg-0"}],["path",{d:"M5 7a1 1 0 0 1 1 -1h12a1 1 0 0 1 1 1v8a1 1 0 0 1 -1 1h-12a1 1 0 0 1 -1 -1l0 -8",key:"svg-1"}]],X5e=dt("outline","device-laptop","DeviceLaptop",K5e);/**
 * @license @tabler/icons-react v3.36.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const Z5e=[["path",{d:"M9 10l3 -3l3 3",key:"svg-0"}],["path",{d:"M9 14l3 3l3 -3",key:"svg-1"}]],Q5e=dt("outline","direction","Direction",Z5e);/**
 * @license @tabler/icons-react v3.36.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const J5e=[["path",{d:"M3 12a9 9 0 1 0 18 0a9 9 0 1 0 -18 0",key:"svg-0"}],["path",{d:"M8 12l0 .01",key:"svg-1"}],["path",{d:"M12 12l0 .01",key:"svg-2"}],["path",{d:"M16 12l0 .01",key:"svg-3"}]],e6e=dt("outline","dots-circle-horizontal","DotsCircleHorizontal",J5e);/**
 * @license @tabler/icons-react v3.36.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const t6e=[["path",{d:"M11 12a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-0"}],["path",{d:"M11 19a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-1"}],["path",{d:"M11 5a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-2"}]],Rc=dt("outline","dots-vertical","DotsVertical",t6e);/**
 * @license @tabler/icons-react v3.36.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const n6e=[["path",{d:"M4 17v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2 -2v-2",key:"svg-0"}],["path",{d:"M7 11l5 5l5 -5",key:"svg-1"}],["path",{d:"M12 4l0 12",key:"svg-2"}]],r6e=dt("outline","download","Download",n6e);/**
 * @license @tabler/icons-react v3.36.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const s6e=[["path",{d:"M3 12a9 9 0 1 0 18 0a9 9 0 1 0 -18 0",key:"svg-0"}],["path",{d:"M12 9v4",key:"svg-1"}],["path",{d:"M12 16v.01",key:"svg-2"}]],o6e=dt("outline","exclamation-circle","ExclamationCircle",s6e);/**
 * @license @tabler/icons-react v3.36.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const i6e=[["path",{d:"M12 6h-6a2 2 0 0 0 -2 2v10a2 2 0 0 0 2 2h10a2 2 0 0 0 2 -2v-6",key:"svg-0"}],["path",{d:"M11 13l9 -9",key:"svg-1"}],["path",{d:"M15 4h5v5",key:"svg-2"}]],qQ=dt("outline","external-link","ExternalLink",i6e);/**
 * @license @tabler/icons-react v3.36.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const a6e=[["path",{d:"M10 12a2 2 0 1 0 4 0a2 2 0 0 0 -4 0",key:"svg-0"}],["path",{d:"M21 12c-2.4 4 -5.4 6 -9 6c-3.6 0 -6.6 -2 -9 -6c2.4 -4 5.4 -6 9 -6c3.6 0 6.6 2 9 6",key:"svg-1"}]],l6e=dt("outline","eye","Eye",a6e);/**
 * @license @tabler/icons-react v3.36.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const c6e=[["path",{d:"M14 3v4a1 1 0 0 0 1 1h4",key:"svg-0"}],["path",{d:"M17 21h-10a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2",key:"svg-1"}],["path",{d:"M10 13l-1 2l1 2",key:"svg-2"}],["path",{d:"M14 13l1 2l-1 2",key:"svg-3"}]],u6e=dt("outline","file-code","FileCode",c6e);/**
 * @license @tabler/icons-react v3.36.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const d6e=[["path",{d:"M14 3v4a1 1 0 0 0 1 1h4",key:"svg-0"}],["path",{d:"M17 21h-10a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2",key:"svg-1"}],["path",{d:"M8 11h8v7h-8l0 -7",key:"svg-2"}],["path",{d:"M8 15h8",key:"svg-3"}],["path",{d:"M11 11v7",key:"svg-4"}]],f6e=dt("outline","file-spreadsheet","FileSpreadsheet",d6e);/**
 * @license @tabler/icons-react v3.36.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const p6e=[["path",{d:"M14 3v4a1 1 0 0 0 1 1h4",key:"svg-0"}],["path",{d:"M17 21h-10a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2",key:"svg-1"}],["path",{d:"M9 9l1 0",key:"svg-2"}],["path",{d:"M9 13l6 0",key:"svg-3"}],["path",{d:"M9 17l6 0",key:"svg-4"}]],WQ=dt("outline","file-text","FileText",p6e);/**
 * @license @tabler/icons-react v3.36.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const h6e=[["path",{d:"M14 3v4a1 1 0 0 0 1 1h4",key:"svg-0"}],["path",{d:"M5 12v-7a2 2 0 0 1 2 -2h7l5 5v4",key:"svg-1"}],["path",{d:"M5 15v6h1a2 2 0 0 0 2 -2v-2a2 2 0 0 0 -2 -2h-1",key:"svg-2"}],["path",{d:"M20 16.5a1.5 1.5 0 0 0 -3 0v3a1.5 1.5 0 0 0 3 0",key:"svg-3"}],["path",{d:"M12.5 15a1.5 1.5 0 0 1 1.5 1.5v3a1.5 1.5 0 0 1 -3 0v-3a1.5 1.5 0 0 1 1.5 -1.5",key:"svg-4"}]],m6e=dt("outline","file-type-doc","FileTypeDoc",h6e);/**
 * @license @tabler/icons-react v3.36.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const g6e=[["path",{d:"M14 3v4a1 1 0 0 0 1 1h4",key:"svg-0"}],["path",{d:"M5 12v-7a2 2 0 0 1 2 -2h7l5 5v4",key:"svg-1"}],["path",{d:"M5 18h1.5a1.5 1.5 0 0 0 0 -3h-1.5v6",key:"svg-2"}],["path",{d:"M17 18h2",key:"svg-3"}],["path",{d:"M20 15h-3v6",key:"svg-4"}],["path",{d:"M11 15v6h1a2 2 0 0 0 2 -2v-2a2 2 0 0 0 -2 -2h-1",key:"svg-5"}]],y6e=dt("outline","file-type-pdf","FileTypePdf",g6e);/**
 * @license @tabler/icons-react v3.36.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const v6e=[["path",{d:"M13.758 19.414l-4.758 1.586v-8.5l-4.48 -4.928a2 2 0 0 1 -.52 -1.345v-2.227h16v2.172a2 2 0 0 1 -.586 1.414l-4.414 4.414v1.5",key:"svg-0"}],["path",{d:"M22 22l-5 -5",key:"svg-1"}],["path",{d:"M17 22l5 -5",key:"svg-2"}]],b6e=dt("outline","filter-x","FilterX",v6e);/**
 * @license @tabler/icons-react v3.36.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const x6e=[["path",{d:"M4 4h16v2.172a2 2 0 0 1 -.586 1.414l-4.414 4.414v7l-6 2v-8.5l-4.48 -4.928a2 2 0 0 1 -.52 -1.345v-2.227",key:"svg-0"}]],w6e=dt("outline","filter","Filter",x6e);/**
 * @license @tabler/icons-react v3.36.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const S6e=[["path",{d:"M5 14h14l-4.5 -4.5l4.5 -4.5h-14v16",key:"svg-0"}]],Ku=dt("outline","flag-3","Flag3",S6e);/**
 * @license @tabler/icons-react v3.36.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const C6e=[["path",{d:"M12 19h-7a2 2 0 0 1 -2 -2v-11a2 2 0 0 1 2 -2h4l3 3h7a2 2 0 0 1 2 2v3.5",key:"svg-0"}],["path",{d:"M19 22v-6",key:"svg-1"}],["path",{d:"M22 19l-3 -3l-3 3",key:"svg-2"}]],tx=dt("outline","folder-up","FolderUp",C6e);/**
 * @license @tabler/icons-react v3.36.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const k6e=[["path",{d:"M5 4h4l3 3h7a2 2 0 0 1 2 2v8a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2v-11a2 2 0 0 1 2 -2",key:"svg-0"}]],R2=dt("outline","folder","Folder",k6e);/**
 * @license @tabler/icons-react v3.36.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const E6e=[["path",{d:"M4 5a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-0"}],["path",{d:"M11 5a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-1"}],["path",{d:"M18 5a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-2"}],["path",{d:"M4 12a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-3"}],["path",{d:"M11 12a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-4"}],["path",{d:"M18 12a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-5"}],["path",{d:"M4 19a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-6"}],["path",{d:"M11 19a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-7"}],["path",{d:"M18 19a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-8"}]],T6e=dt("outline","grid-dots","GridDots",E6e);/**
 * @license @tabler/icons-react v3.36.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const M6e=[["path",{d:"M8 13v-7.5a1.5 1.5 0 0 1 3 0v6.5",key:"svg-0"}],["path",{d:"M11 5.5v-2a1.5 1.5 0 1 1 3 0v8.5",key:"svg-1"}],["path",{d:"M14 5.5a1.5 1.5 0 0 1 3 0v6.5",key:"svg-2"}],["path",{d:"M17 7.5a1.5 1.5 0 0 1 3 0v8.5a6 6 0 0 1 -6 6h-2h.208a6 6 0 0 1 -5.012 -2.7a69.74 69.74 0 0 1 -.196 -.3c-.312 -.479 -1.407 -2.388 -3.286 -5.728a1.5 1.5 0 0 1 .536 -2.022a1.867 1.867 0 0 1 2.28 .28l1.47 1.47",key:"svg-3"}]],j6e=dt("outline","hand-stop","HandStop",M6e);/**
 * @license @tabler/icons-react v3.36.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const A6e=[["path",{d:"M19.5 12.572l-7.5 7.428l-7.5 -7.428a5 5 0 1 1 7.5 -6.566a5 5 0 1 1 7.5 6.572",key:"svg-0"}]],_6e=dt("outline","heart","Heart",A6e);/**
 * @license @tabler/icons-react v3.36.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const R6e=[["path",{d:"M4 6a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2l0 -12",key:"svg-0"}],["path",{d:"M4 13h3l3 3h4l3 -3h3",key:"svg-1"}]],YQ=dt("outline","inbox","Inbox",R6e);/**
 * @license @tabler/icons-react v3.36.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const D6e=[["path",{d:"M19 8.268a2 2 0 0 1 1 1.732v8a2 2 0 0 1 -2 2h-8a2 2 0 0 1 -2 -2v-8a2 2 0 0 1 2 -2h3",key:"svg-0"}],["path",{d:"M5 15.734a2 2 0 0 1 -1 -1.734v-8a2 2 0 0 1 2 -2h8a2 2 0 0 1 2 2v8a2 2 0 0 1 -2 2h-3",key:"svg-1"}]],I6e=dt("outline","layers-linked","LayersLinked",D6e);/**
 * @license @tabler/icons-react v3.36.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const O6e=[["path",{d:"M4 6a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2l0 -12",key:"svg-0"}],["path",{d:"M4 12l16 0",key:"svg-1"}]],N6e=dt("outline","layout-rows","LayoutRows",O6e);/**
 * @license @tabler/icons-react v3.36.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const L6e=[["path",{d:"M4 6a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2l0 -12",key:"svg-0"}],["path",{d:"M9 4l0 16",key:"svg-1"}]],GQ=dt("outline","layout-sidebar","LayoutSidebar",L6e);/**
 * @license @tabler/icons-react v3.36.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const $6e=[["path",{d:"M4 6a2 2 0 0 1 2 -2h2a2 2 0 0 1 2 2v1a2 2 0 0 1 -2 2h-2a2 2 0 0 1 -2 -2l0 -1",key:"svg-0"}],["path",{d:"M4 15a2 2 0 0 1 2 -2h2a2 2 0 0 1 2 2v3a2 2 0 0 1 -2 2h-2a2 2 0 0 1 -2 -2l0 -3",key:"svg-1"}],["path",{d:"M14 6a2 2 0 0 1 2 -2h2a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-2a2 2 0 0 1 -2 -2l0 -12",key:"svg-2"}]],F6e=dt("outline","layout","Layout",$6e);/**
 * @license @tabler/icons-react v3.36.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const z6e=[["path",{d:"M7 20v-12a4 4 0 0 1 4 -4h2a4 4 0 0 1 4 4v12",key:"svg-0"}],["path",{d:"M7 13l10 0",key:"svg-1"}]],Jz=dt("outline","letter-a","LetterA",z6e);/**
 * @license @tabler/icons-react v3.36.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const P6e=[["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",key:"svg-0"}],["path",{d:"M9 12h12l-3 -3",key:"svg-1"}],["path",{d:"M18 15l3 -3",key:"svg-2"}]],B6e=dt("outline","logout","Logout",P6e);/**
 * @license @tabler/icons-react v3.36.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const H6e=[["path",{d:"M3 9l9 6l9 -6l-9 -6l-9 6",key:"svg-0"}],["path",{d:"M21 9v10a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2v-10",key:"svg-1"}],["path",{d:"M3 19l6 -6",key:"svg-2"}],["path",{d:"M15 13l6 6",key:"svg-3"}]],nx=dt("outline","mail-opened","MailOpened",H6e);/**
 * @license @tabler/icons-react v3.36.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const U6e=[["path",{d:"M3 7a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v10a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2v-10",key:"svg-0"}],["path",{d:"M3 7l9 6l9 -6",key:"svg-1"}]],kf=dt("outline","mail","Mail",U6e);/**
 * @license @tabler/icons-react v3.36.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const V6e=[["path",{d:"M4 6l16 0",key:"svg-0"}],["path",{d:"M4 12l16 0",key:"svg-1"}],["path",{d:"M4 18l16 0",key:"svg-2"}]],q6e=dt("outline","menu-2","Menu2",V6e);/**
 * @license @tabler/icons-react v3.36.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const W6e=[["path",{d:"M5 12l14 0",key:"svg-0"}]],W4=dt("outline","minus","Minus",W6e);/**
 * @license @tabler/icons-react v3.36.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const Y6e=[["path",{d:"M3 12a9 9 0 1 0 18 0a9 9 0 1 0 -18 0",key:"svg-0"}],["path",{d:"M9 10l.01 0",key:"svg-1"}],["path",{d:"M15 10l.01 0",key:"svg-2"}],["path",{d:"M9.5 15a3.5 3.5 0 0 0 5 0",key:"svg-3"}]],D_=dt("outline","mood-smile","MoodSmile",Y6e);/**
 * @license @tabler/icons-react v3.36.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const G6e=[["path",{d:"M3 17a3 3 0 1 0 6 0a3 3 0 0 0 -6 0",key:"svg-0"}],["path",{d:"M13 17a3 3 0 1 0 6 0a3 3 0 0 0 -6 0",key:"svg-1"}],["path",{d:"M9 17v-13h10v13",key:"svg-2"}],["path",{d:"M9 8h10",key:"svg-3"}]],K6e=dt("outline","music","Music",G6e);/**
 * @license @tabler/icons-react v3.36.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const X6e=[["path",{d:"M15 7l-6.5 6.5a1.5 1.5 0 0 0 3 3l6.5 -6.5a3 3 0 0 0 -6 -6l-6.5 6.5a4.5 4.5 0 0 0 9 9l6.5 -6.5",key:"svg-0"}]],D2=dt("outline","paperclip","Paperclip",X6e);/**
 * @license @tabler/icons-react v3.36.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const Z6e=[["path",{d:"M4 20h4l10.5 -10.5a2.828 2.828 0 1 0 -4 -4l-10.5 10.5v4",key:"svg-0"}],["path",{d:"M13.5 6.5l4 4",key:"svg-1"}]],Y4=dt("outline","pencil","Pencil",Z6e);/**
 * @license @tabler/icons-react v3.36.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const Q6e=[["path",{d:"M15 8h.01",key:"svg-0"}],["path",{d:"M3 6a3 3 0 0 1 3 -3h12a3 3 0 0 1 3 3v12a3 3 0 0 1 -3 3h-12a3 3 0 0 1 -3 -3v-12",key:"svg-1"}],["path",{d:"M3 16l5 -5c.928 -.893 2.072 -.893 3 0l5 5",key:"svg-2"}],["path",{d:"M14 14l1 -1c.928 -.893 2.072 -.893 3 0l3 3",key:"svg-3"}]],KQ=dt("outline","photo","Photo",Q6e);/**
 * @license @tabler/icons-react v3.36.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const J6e=[["path",{d:"M7 4v16l13 -8l-13 -8",key:"svg-0"}]],eke=dt("outline","player-play","PlayerPlay",J6e);/**
 * @license @tabler/icons-react v3.36.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const tke=[["path",{d:"M12 5l0 14",key:"svg-0"}],["path",{d:"M5 12l14 0",key:"svg-1"}]],nm=dt("outline","plus","Plus",tke);/**
 * @license @tabler/icons-react v3.36.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const nke=[["path",{d:"M7 6a7.75 7.75 0 1 0 10 0",key:"svg-0"}],["path",{d:"M12 4l0 8",key:"svg-1"}]],rke=dt("outline","power","Power",nke);/**
 * @license @tabler/icons-react v3.36.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const ske=[["path",{d:"M3 4l18 0",key:"svg-0"}],["path",{d:"M4 4v10a2 2 0 0 0 2 2h12a2 2 0 0 0 2 -2v-10",key:"svg-1"}],["path",{d:"M12 16l0 4",key:"svg-2"}],["path",{d:"M9 20l6 0",key:"svg-3"}],["path",{d:"M8 12l3 -3l2 2l3 -3",key:"svg-4"}]],oke=dt("outline","presentation","Presentation",ske);/**
 * @license @tabler/icons-react v3.36.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const ike=[["path",{d:"M17 17h2a2 2 0 0 0 2 -2v-4a2 2 0 0 0 -2 -2h-14a2 2 0 0 0 -2 2v4a2 2 0 0 0 2 2h2",key:"svg-0"}],["path",{d:"M17 9v-4a2 2 0 0 0 -2 -2h-6a2 2 0 0 0 -2 2v4",key:"svg-1"}],["path",{d:"M7 15a2 2 0 0 1 2 -2h6a2 2 0 0 1 2 2v4a2 2 0 0 1 -2 2h-6a2 2 0 0 1 -2 -2l0 -4",key:"svg-2"}]],XQ=dt("outline","printer","Printer",ike);/**
 * @license @tabler/icons-react v3.36.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const ake=[["path",{d:"M20 11a8.1 8.1 0 0 0 -15.5 -2m-.5 -4v4h4",key:"svg-0"}],["path",{d:"M4 13a8.1 8.1 0 0 0 15.5 2m.5 4v-4h-4",key:"svg-1"}]],mf=dt("outline","refresh","Refresh",ake);/**
 * @license @tabler/icons-react v3.36.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const lke=[["path",{d:"M4 11v8a1 1 0 0 0 1 1h8m-9 -14v-1a1 1 0 0 1 1 -1h1m5 0h2m5 0h1a1 1 0 0 1 1 1v1m0 5v2m0 5v1a1 1 0 0 1 -1 1h-1",key:"svg-0"}],["path",{d:"M4 12h7a1 1 0 0 1 1 1v7",key:"svg-1"}]],cke=dt("outline","resize","Resize",lke);/**
 * @license @tabler/icons-react v3.36.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const uke=[["path",{d:"M20 6v4a1 1 0 0 1 -1 1h-14a1 1 0 0 1 -1 -1v-4a1 1 0 0 1 1 -1h14a1 1 0 0 1 1 1",key:"svg-0"}],["path",{d:"M12 15l0 4",key:"svg-1"}],["path",{d:"M14 17l-4 0",key:"svg-2"}]],dke=dt("outline","row-insert-bottom","RowInsertBottom",uke);/**
 * @license @tabler/icons-react v3.36.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const fke=[["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 -1",key:"svg-0"}],["path",{d:"M12 9v-4",key:"svg-1"}],["path",{d:"M10 7l4 0",key:"svg-2"}]],pke=dt("outline","row-insert-top","RowInsertTop",fke);/**
 * @license @tabler/icons-react v3.36.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const hke=[["path",{d:"M20 6v4a1 1 0 0 1 -1 1h-14a1 1 0 0 1 -1 -1v-4a1 1 0 0 1 1 -1h14a1 1 0 0 1 1 1",key:"svg-0"}],["path",{d:"M10 16l4 4",key:"svg-1"}],["path",{d:"M10 20l4 -4",key:"svg-2"}]],mke=dt("outline","row-remove","RowRemove",hke);/**
 * @license @tabler/icons-react v3.36.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const gke=[["path",{d:"M3 10a7 7 0 1 0 14 0a7 7 0 1 0 -14 0",key:"svg-0"}],["path",{d:"M21 21l-6 -6",key:"svg-1"}]],G4=dt("outline","search","Search",gke);/**
 * @license @tabler/icons-react v3.36.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const yke=[["path",{d:"M10 14l11 -11",key:"svg-0"}],["path",{d:"M21 3l-6.5 18a.55 .55 0 0 1 -1 0l-3.5 -7l-7 -3.5a.55 .55 0 0 1 0 -1l18 -6.5",key:"svg-1"}]],I_=dt("outline","send","Send",yke);/**
 * @license @tabler/icons-react v3.36.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const vke=[["path",{d:"M10.325 4.317c.426 -1.756 2.924 -1.756 3.35 0a1.724 1.724 0 0 0 2.573 1.066c1.543 -.94 3.31 .826 2.37 2.37a1.724 1.724 0 0 0 1.065 2.572c1.756 .426 1.756 2.924 0 3.35a1.724 1.724 0 0 0 -1.066 2.573c.94 1.543 -.826 3.31 -2.37 2.37a1.724 1.724 0 0 0 -2.572 1.065c-.426 1.756 -2.924 1.756 -3.35 0a1.724 1.724 0 0 0 -2.573 -1.066c-1.543 .94 -3.31 -.826 -2.37 -2.37a1.724 1.724 0 0 0 -1.065 -2.572c-1.756 -.426 -1.756 -2.924 0 -3.35a1.724 1.724 0 0 0 1.066 -2.573c-.94 -1.543 .826 -3.31 2.37 -2.37c1 .608 2.296 .07 2.572 -1.065",key:"svg-0"}],["path",{d:"M9 12a3 3 0 1 0 6 0a3 3 0 0 0 -6 0",key:"svg-1"}]],ZQ=dt("outline","settings","Settings",vke);/**
 * @license @tabler/icons-react v3.36.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const bke=[["path",{d:"M3 17c3.333 -3.333 5 -6 5 -8c0 -3 -1 -3 -2 -3s-2.032 1.085 -2 3c.034 2.048 1.658 4.877 2.5 6c1.5 2 2.5 2.5 3.5 1l2 -3c.333 2.667 1.333 4 3 4c.53 0 2.639 -2 3 -2c.517 0 1.517 .667 3 2",key:"svg-0"}]],xke=dt("outline","signature","Signature",bke);/**
 * @license @tabler/icons-react v3.36.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const wke=[["path",{d:"M19 8.71l-5.333 -4.148a2.666 2.666 0 0 0 -3.274 0l-5.334 4.148a2.665 2.665 0 0 0 -1.029 2.105v7.2a2 2 0 0 0 2 2h12a2 2 0 0 0 2 -2v-7.2c0 -.823 -.38 -1.6 -1.03 -2.105",key:"svg-0"}],["path",{d:"M16 15c-2.21 1.333 -5.792 1.333 -8 0",key:"svg-1"}]],Ske=dt("outline","smart-home","SmartHome",wke);/**
 * @license @tabler/icons-react v3.36.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const Cke=[["path",{d:"M3 5a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v14a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2v-14",key:"svg-0"}]],kke=dt("outline","square","Square",Cke);/**
 * @license @tabler/icons-react v3.36.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const Eke=[["path",{d:"M7 3h12a2 2 0 0 1 2 2v12m-.585 3.413a1.994 1.994 0 0 1 -1.415 .587h-14a2 2 0 0 1 -2 -2v-14c0 -.55 .223 -1.05 .583 -1.412",key:"svg-0"}],["path",{d:"M3 10h7m4 0h7",key:"svg-1"}],["path",{d:"M10 3v3m0 4v11",key:"svg-2"}],["path",{d:"M3 3l18 18",key:"svg-3"}]],Tke=dt("outline","table-off","TableOff",Eke);/**
 * @license @tabler/icons-react v3.36.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const Mke=[["path",{d:"M12.5 21h-7.5a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v7.5",key:"svg-0"}],["path",{d:"M3 10h18",key:"svg-1"}],["path",{d:"M10 3v18",key:"svg-2"}],["path",{d:"M16 19h6",key:"svg-3"}],["path",{d:"M19 16v6",key:"svg-4"}]],jke=dt("outline","table-plus","TablePlus",Mke);/**
 * @license @tabler/icons-react v3.36.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const Ake=[["path",{d:"M3 5a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v14a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2v-14",key:"svg-0"}],["path",{d:"M3 10h18",key:"svg-1"}],["path",{d:"M10 3v18",key:"svg-2"}]],_ke=dt("outline","table","Table",Ake);/**
 * @license @tabler/icons-react v3.36.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const Rke=[["path",{d:"M6.5 7.5a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-0"}],["path",{d:"M3 6v5.172a2 2 0 0 0 .586 1.414l7.71 7.71a2.41 2.41 0 0 0 3.408 0l5.592 -5.592a2.41 2.41 0 0 0 0 -3.408l-7.71 -7.71a2 2 0 0 0 -1.414 -.586h-5.172a3 3 0 0 0 -3 3",key:"svg-1"}]],Zv=dt("outline","tag","Tag",Rke);/**
 * @license @tabler/icons-react v3.36.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const Dke=[["path",{d:"M4 5a1 1 0 0 1 1 -1h14a1 1 0 0 1 1 1v2a1 1 0 0 1 -1 1h-14a1 1 0 0 1 -1 -1l0 -2",key:"svg-0"}],["path",{d:"M4 13a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v6a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1l0 -6",key:"svg-1"}],["path",{d:"M14 12l6 0",key:"svg-2"}],["path",{d:"M14 16l6 0",key:"svg-3"}],["path",{d:"M14 20l6 0",key:"svg-4"}]],QQ=dt("outline","template","Template",Dke);/**
 * @license @tabler/icons-react v3.36.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const Ike=[["path",{d:"M9 15v-7a3 3 0 0 1 6 0v7",key:"svg-0"}],["path",{d:"M9 11h6",key:"svg-1"}],["path",{d:"M5 19h14",key:"svg-2"}]],Oke=dt("outline","text-color","TextColor",Ike);/**
 * @license @tabler/icons-react v3.36.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const Nke=[["path",{d:"M4 7l16 0",key:"svg-0"}],["path",{d:"M10 11l0 6",key:"svg-1"}],["path",{d:"M14 11l0 6",key:"svg-2"}],["path",{d:"M5 7l1 12a2 2 0 0 0 2 2h8a2 2 0 0 0 2 -2l1 -12",key:"svg-3"}],["path",{d:"M9 7v-3a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v3",key:"svg-4"}]],Eo=dt("outline","trash","Trash",Nke);/**
 * @license @tabler/icons-react v3.36.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const Lke=[["path",{d:"M8 21l8 0",key:"svg-0"}],["path",{d:"M12 17l0 4",key:"svg-1"}],["path",{d:"M7 4l10 0",key:"svg-2"}],["path",{d:"M17 4v8a5 5 0 0 1 -10 0v-8",key:"svg-3"}],["path",{d:"M3 9a2 2 0 1 0 4 0a2 2 0 1 0 -4 0",key:"svg-4"}],["path",{d:"M17 9a2 2 0 1 0 4 0a2 2 0 1 0 -4 0",key:"svg-5"}]],$ke=dt("outline","trophy","Trophy",Lke);/**
 * @license @tabler/icons-react v3.36.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const Fke=[["path",{d:"M3 12a9 9 0 1 0 18 0a9 9 0 1 0 -18 0",key:"svg-0"}],["path",{d:"M9 10a3 3 0 1 0 6 0a3 3 0 1 0 -6 0",key:"svg-1"}],["path",{d:"M6.168 18.849a4 4 0 0 1 3.832 -2.849h4a4 4 0 0 1 3.834 2.855",key:"svg-2"}]],zke=dt("outline","user-circle","UserCircle",Fke);/**
 * @license @tabler/icons-react v3.36.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const Pke=[["path",{d:"M8 7a4 4 0 1 0 8 0a4 4 0 0 0 -8 0",key:"svg-0"}],["path",{d:"M16 19h6",key:"svg-1"}],["path",{d:"M19 16v6",key:"svg-2"}],["path",{d:"M6 21v-2a4 4 0 0 1 4 -4h4",key:"svg-3"}]],JQ=dt("outline","user-plus","UserPlus",Pke);/**
 * @license @tabler/icons-react v3.36.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const Bke=[["path",{d:"M8 7a4 4 0 1 0 8 0a4 4 0 0 0 -8 0",key:"svg-0"}],["path",{d:"M6 21v-2a4 4 0 0 1 4 -4h1.5",key:"svg-1"}],["path",{d:"M15 18a3 3 0 1 0 6 0a3 3 0 1 0 -6 0",key:"svg-2"}],["path",{d:"M20.2 20.2l1.8 1.8",key:"svg-3"}]],Hke=dt("outline","user-search","UserSearch",Bke);/**
 * @license @tabler/icons-react v3.36.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const Uke=[["path",{d:"M5 7a4 4 0 1 0 8 0a4 4 0 1 0 -8 0",key:"svg-0"}],["path",{d:"M3 21v-2a4 4 0 0 1 4 -4h4a4 4 0 0 1 4 4v2",key:"svg-1"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"svg-2"}],["path",{d:"M21 21v-2a4 4 0 0 0 -3 -3.85",key:"svg-3"}]],rm=dt("outline","users","Users",Uke);/**
 * @license @tabler/icons-react v3.36.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const Vke=[["path",{d:"M3 4a1 1 0 0 1 1 -1h2a1 1 0 0 1 1 1v2a1 1 0 0 1 -1 1h-2a1 1 0 0 1 -1 -1l0 -2",key:"svg-0"}],["path",{d:"M17 4a1 1 0 0 1 1 -1h2a1 1 0 0 1 1 1v2a1 1 0 0 1 -1 1h-2a1 1 0 0 1 -1 -1l0 -2",key:"svg-1"}],["path",{d:"M17 18a1 1 0 0 1 1 -1h2a1 1 0 0 1 1 1v2a1 1 0 0 1 -1 1h-2a1 1 0 0 1 -1 -1l0 -2",key:"svg-2"}],["path",{d:"M3 18a1 1 0 0 1 1 -1h2a1 1 0 0 1 1 1v2a1 1 0 0 1 -1 1h-2a1 1 0 0 1 -1 -1l0 -2",key:"svg-3"}],["path",{d:"M5 7l0 10",key:"svg-4"}],["path",{d:"M19 7l0 10",key:"svg-5"}],["path",{d:"M7 5l10 0",key:"svg-6"}],["path",{d:"M7 19l10 0",key:"svg-7"}]],qke=dt("outline","vector","Vector",Vke);/**
 * @license @tabler/icons-react v3.36.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const Wke=[["path",{d:"M15 10l4.553 -2.276a1 1 0 0 1 1.447 .894v6.764a1 1 0 0 1 -1.447 .894l-4.553 -2.276v-4",key:"svg-0"}],["path",{d:"M3 8a2 2 0 0 1 2 -2h8a2 2 0 0 1 2 2v8a2 2 0 0 1 -2 2h-8a2 2 0 0 1 -2 -2l0 -8",key:"svg-1"}]],Yke=dt("outline","video","Video",Wke);/**
 * @license @tabler/icons-react v3.36.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const Gke=[["path",{d:"M20.048 16.033a9 9 0 0 0 -12.094 -12.075m-2.321 1.682a9 9 0 0 0 12.733 12.723",key:"svg-0"}],["path",{d:"M3 3l18 18",key:"svg-1"}]],gk=dt("outline","wash-dryclean-off","WashDrycleanOff",Gke);/**
 * @license @tabler/icons-react v3.36.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const Kke=[["path",{d:"M18 6l-12 12",key:"svg-0"}],["path",{d:"M6 6l12 12",key:"svg-1"}]],po=dt("outline","x","X",Kke);/**
 * @license @tabler/icons-react v3.36.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const Xke=[["path",{d:"M3 10a7 7 0 1 0 14 0a7 7 0 1 0 -14 0",key:"svg-0"}],["path",{d:"M7 10l6 0",key:"svg-1"}],["path",{d:"M21 21l-6 -6",key:"svg-2"}]],Zke=dt("outline","zoom-out","ZoomOut",Xke);/**
 * @license @tabler/icons-react v3.36.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const Qke=[["path",{d:"M11.172 2a3 3 0 0 1 2.121 .879l7.71 7.71a3.41 3.41 0 0 1 0 4.822l-5.592 5.592a3.41 3.41 0 0 1 -4.822 0l-7.71 -7.71a3 3 0 0 1 -.879 -2.121v-5.172a4 4 0 0 1 4 -4zm-3.672 3.5a2 2 0 0 0 -1.995 1.85l-.005 .15a2 2 0 1 0 2 -2",key:"svg-0"}]],eJ=dt("filled","tag-filled","TagFilled",Qke),Jke="data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M10%2014L21%203M10%2014L2.99958%2010.5C2.90384%2010.4561%202.82271%2010.3857%202.76583%2010.2971C2.70895%2010.2084%202.67871%2010.1053%202.67871%2010C2.67871%209.89468%202.70895%209.79158%202.76583%209.70295C2.82271%209.61431%202.90384%209.54387%202.99958%209.5L21%203M10%2014L12.4173%2021.0448M21%203L18.2463%2010.7629M18.9039%2016.496V18L19.9039%2019M14.9039%2018C14.9039%2019.0609%2015.3253%2020.0783%2016.0755%2020.8284C16.8256%2021.5786%2017.843%2022%2018.9039%2022C19.9648%2022%2020.9822%2021.5786%2021.7323%2020.8284C22.4825%2020.0783%2022.9039%2019.0609%2022.9039%2018C22.9039%2016.9391%2022.4825%2015.9217%2021.7323%2015.1716C20.9822%2014.4214%2019.9648%2014%2018.9039%2014C17.843%2014%2016.8256%2014.4214%2016.0755%2015.1716C15.3253%2015.9217%2014.9039%2016.9391%2014.9039%2018Z'%20stroke='%23343A40'%20stroke-width='1.2'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e",Je={INBOX:1,SENT:4,DRAFTS:8,SPAM:16,TRASH:128,OUTBOX:2,ARCHIVE:512,SNOOZED:4096,TEMPLATES:2048,ERRORS:8192,SHARING:-1,USER:1024},Lm=t=>t===Je.OUTBOX,tJ=t=>t===Je.SHARING,e9e=t=>t===Je.ERRORS,I2=(t,e,n)=>Lm(t==null?void 0:t.Type)||e!=null&&e.length>0&&n!=null&&e.includes(n),nJ=(t,e,n)=>{const r=t.find(s=>s.Id===e);return r?Lm(n)?r.TotalCount:r.UnreadCount:0},O_=[{Name:"inbox",label:"readOnlyLabels.inbox",path:"/inbox",icon:d.jsx(YQ,{stroke:1.5,size:22}),Type:1,Order:1,role:"read"},{Name:"sent",label:"readOnlyLabels.sent",path:"/sent",icon:d.jsx(I_,{stroke:1.5,size:22}),Type:4,Order:2,role:"read"},{Name:"outbox",label:"readOnlyLabels.outbox",path:"/outbox",icon:d.jsx("img",{src:Jke,alt:"outbox-messages",width:22,height:22}),Type:2,Order:3,role:"read"},{Name:"drafts",label:"readOnlyLabels.drafts",path:"/drafts",icon:d.jsx(WQ,{stroke:1.5,size:22}),Type:8,Order:4,role:"read"},{Name:"snoozed",label:"readOnlyLabels.snoozed",path:"/snoozed",icon:d.jsx(xc,{stroke:1.5,size:22}),Type:4096,Order:5,role:"read"},{Name:"junk",label:"readOnlyLabels.junk",path:"/junk",icon:d.jsx(bc,{stroke:1.5,size:22}),Type:16,Order:6,role:"read"},{Name:"trash",label:"readOnlyLabels.trash",path:"/trash",icon:d.jsx(Eo,{stroke:1.5,size:22}),Type:128,Order:7,role:"read"},{Name:"archive",label:"readOnlyLabels.archive",path:"/archive",icon:d.jsx(Cf,{stroke:1.5,size:22}),Type:512,Order:8,role:"read"},{Name:"Templates",label:"readOnlyLabels.templates",path:"/Templates",icon:d.jsx(QQ,{stroke:1.5,size:22}),Type:2048,Order:9,role:"read"},{Name:"errors",label:"readOnlyLabels.errors",path:"/errors",icon:d.jsx(R2,{stroke:1.5,size:22}),Type:8192,Order:9,role:"read"},{Name:"shared",label:"readOnlyLabels.shared",path:"/shared",icon:d.jsx(rm,{stroke:1.5,size:22}),Type:-1,Order:10,role:"read"}],cT=(t,e,n)=>{const r=O_.find(o=>o.Type===t.Type),s=`${e}/${encodeURIComponent(t.Name)}`;return r?{...r,Type:r.Type,label:n(r.label),Id:t.Id,UserEmailId:t.UserEmailId,Status:t.Status,ExternalId:t.ExternalId,ParentId:t.ParentId,role:r.role||"",icon:"",Children:(t.Children||[]).map(o=>cT(o,s,n)),path:s}:{Name:t.Name,Id:t.Id,UserEmailId:t.UserEmailId,ExternalId:t.ExternalId,ParentId:t.ParentId,label:t.Name,path:s,Order:t.Order,Status:t.Status,role:"",icon:"",Type:t.Type,Children:(t.Children||[]).map(o=>cT(o,s,n))}},rJ=(t,e)=>t.map(n=>cT(n,`/${n.UserEmailId}`,e)).sort((n,r)=>{const s=n.Order||1e3,o=r.Order||1e3;return s-o}),sJ=t=>{var e;return`
        <p>-------- Пересылаемое сообщение --------</p>
        <p>${t!=null&&t.Timestamp?new Date(t.Timestamp).toLocaleDateString():""} ${(e=t==null?void 0:t.To)==null?void 0:e.join(", ")} <${t.From.Address}></p>
        ${t.HtmlBody}
        <p>-------- Конец пересылаемого сообщения --------</p>
      `},t9e=t=>`
    <p>${new Date(t.Date).toLocaleString("ru",{year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric"})}, ${t.From.Name??""} &#60;${t.From.Address}&#62;</p>
    ${t.HtmlBody}
  `,N_=(t,e)=>{const n=vn.language==="ru",r=e?` (${e})`:"",i=`${t}${r} ${t?"-":""} ${n?"Р7-Почта":"R7-Mail"}`;document.title=i},L_=(t,e,n)=>{const r=nJ(t,e,n);return r>99?"99+":r};function oJ(t,e){return function(){return t.apply(e,arguments)}}const{toString:n9e}=Object.prototype,{getPrototypeOf:$_}=Object,{iterator:K4,toStringTag:iJ}=Symbol,X4=(t=>e=>{const n=n9e.call(e);return t[n]||(t[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Ha=t=>(t=t.toLowerCase(),e=>X4(e)===t),Z4=t=>e=>typeof e===t,{isArray:$m}=Array,sm=Z4("undefined");function O2(t){return t!==null&&!sm(t)&&t.constructor!==null&&!sm(t.constructor)&&Jo(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}const aJ=Ha("ArrayBuffer");function r9e(t){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&aJ(t.buffer),e}const s9e=Z4("string"),Jo=Z4("function"),lJ=Z4("number"),N2=t=>t!==null&&typeof t=="object",o9e=t=>t===!0||t===!1,rx=t=>{if(X4(t)!=="object")return!1;const e=$_(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(iJ in t)&&!(K4 in t)},i9e=t=>{if(!N2(t)||O2(t))return!1;try{return Object.keys(t).length===0&&Object.getPrototypeOf(t)===Object.prototype}catch{return!1}},a9e=Ha("Date"),l9e=Ha("File"),c9e=Ha("Blob"),u9e=Ha("FileList"),d9e=t=>N2(t)&&Jo(t.pipe),f9e=t=>{let e;return t&&(typeof FormData=="function"&&t instanceof FormData||Jo(t.append)&&((e=X4(t))==="formdata"||e==="object"&&Jo(t.toString)&&t.toString()==="[object FormData]"))},p9e=Ha("URLSearchParams"),[h9e,m9e,g9e,y9e]=["ReadableStream","Request","Response","Headers"].map(Ha),v9e=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function L2(t,e,{allOwnKeys:n=!1}={}){if(t===null||typeof t>"u")return;let r,s;if(typeof t!="object"&&(t=[t]),$m(t))for(r=0,s=t.length;r<s;r++)e.call(null,t[r],r,t);else{if(O2(t))return;const o=n?Object.getOwnPropertyNames(t):Object.keys(t),i=o.length;let a;for(r=0;r<i;r++)a=o[r],e.call(null,t[a],a,t)}}function cJ(t,e){if(O2(t))return null;e=e.toLowerCase();const n=Object.keys(t);let r=n.length,s;for(;r-- >0;)if(s=n[r],e===s.toLowerCase())return s;return null}const gf=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,uJ=t=>!sm(t)&&t!==gf;function uT(){const{caseless:t,skipUndefined:e}=uJ(this)&&this||{},n={},r=(s,o)=>{if(o==="__proto__"||o==="constructor"||o==="prototype")return;const i=t&&cJ(n,o)||o;rx(n[i])&&rx(s)?n[i]=uT(n[i],s):rx(s)?n[i]=uT({},s):$m(s)?n[i]=s.slice():(!e||!sm(s))&&(n[i]=s)};for(let s=0,o=arguments.length;s<o;s++)arguments[s]&&L2(arguments[s],r);return n}const b9e=(t,e,n,{allOwnKeys:r}={})=>(L2(e,(s,o)=>{n&&Jo(s)?Object.defineProperty(t,o,{value:oJ(s,n),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(t,o,{value:s,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:r}),t),x9e=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),w9e=(t,e,n,r)=>{t.prototype=Object.create(e.prototype,r),Object.defineProperty(t.prototype,"constructor",{value:t,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(t,"super",{value:e.prototype}),n&&Object.assign(t.prototype,n)},S9e=(t,e,n,r)=>{let s,o,i;const a={};if(e=e||{},t==null)return e;do{for(s=Object.getOwnPropertyNames(t),o=s.length;o-- >0;)i=s[o],(!r||r(i,t,e))&&!a[i]&&(e[i]=t[i],a[i]=!0);t=n!==!1&&$_(t)}while(t&&(!n||n(t,e))&&t!==Object.prototype);return e},C9e=(t,e,n)=>{t=String(t),(n===void 0||n>t.length)&&(n=t.length),n-=e.length;const r=t.indexOf(e,n);return r!==-1&&r===n},k9e=t=>{if(!t)return null;if($m(t))return t;let e=t.length;if(!lJ(e))return null;const n=new Array(e);for(;e-- >0;)n[e]=t[e];return n},E9e=(t=>e=>t&&e instanceof t)(typeof Uint8Array<"u"&&$_(Uint8Array)),T9e=(t,e)=>{const r=(t&&t[K4]).call(t);let s;for(;(s=r.next())&&!s.done;){const o=s.value;e.call(t,o[0],o[1])}},M9e=(t,e)=>{let n;const r=[];for(;(n=t.exec(e))!==null;)r.push(n);return r},j9e=Ha("HTMLFormElement"),A9e=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,s){return r.toUpperCase()+s}),eP=(({hasOwnProperty:t})=>(e,n)=>t.call(e,n))(Object.prototype),_9e=Ha("RegExp"),dJ=(t,e)=>{const n=Object.getOwnPropertyDescriptors(t),r={};L2(n,(s,o)=>{let i;(i=e(s,o,t))!==!1&&(r[o]=i||s)}),Object.defineProperties(t,r)},R9e=t=>{dJ(t,(e,n)=>{if(Jo(t)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=t[n];if(Jo(r)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},D9e=(t,e)=>{const n={},r=s=>{s.forEach(o=>{n[o]=!0})};return $m(t)?r(t):r(String(t).split(e)),n},I9e=()=>{},O9e=(t,e)=>t!=null&&Number.isFinite(t=+t)?t:e;function N9e(t){return!!(t&&Jo(t.append)&&t[iJ]==="FormData"&&t[K4])}const L9e=t=>{const e=new Array(10),n=(r,s)=>{if(N2(r)){if(e.indexOf(r)>=0)return;if(O2(r))return r;if(!("toJSON"in r)){e[s]=r;const o=$m(r)?[]:{};return L2(r,(i,a)=>{const l=n(i,s+1);!sm(l)&&(o[a]=l)}),e[s]=void 0,o}}return r};return n(t,0)},$9e=Ha("AsyncFunction"),F9e=t=>t&&(N2(t)||Jo(t))&&Jo(t.then)&&Jo(t.catch),fJ=((t,e)=>t?setImmediate:e?((n,r)=>(gf.addEventListener("message",({source:s,data:o})=>{s===gf&&o===n&&r.length&&r.shift()()},!1),s=>{r.push(s),gf.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",Jo(gf.postMessage)),z9e=typeof queueMicrotask<"u"?queueMicrotask.bind(gf):typeof process<"u"&&process.nextTick||fJ,P9e=t=>t!=null&&Jo(t[K4]),ze={isArray:$m,isArrayBuffer:aJ,isBuffer:O2,isFormData:f9e,isArrayBufferView:r9e,isString:s9e,isNumber:lJ,isBoolean:o9e,isObject:N2,isPlainObject:rx,isEmptyObject:i9e,isReadableStream:h9e,isRequest:m9e,isResponse:g9e,isHeaders:y9e,isUndefined:sm,isDate:a9e,isFile:l9e,isBlob:c9e,isRegExp:_9e,isFunction:Jo,isStream:d9e,isURLSearchParams:p9e,isTypedArray:E9e,isFileList:u9e,forEach:L2,merge:uT,extend:b9e,trim:v9e,stripBOM:x9e,inherits:w9e,toFlatObject:S9e,kindOf:X4,kindOfTest:Ha,endsWith:C9e,toArray:k9e,forEachEntry:T9e,matchAll:M9e,isHTMLForm:j9e,hasOwnProperty:eP,hasOwnProp:eP,reduceDescriptors:dJ,freezeMethods:R9e,toObjectSet:D9e,toCamelCase:A9e,noop:I9e,toFiniteNumber:O9e,findKey:cJ,global:gf,isContextDefined:uJ,isSpecCompliantForm:N9e,toJSONObject:L9e,isAsyncFn:$9e,isThenable:F9e,setImmediate:fJ,asap:z9e,isIterable:P9e};let gn=class pJ extends Error{static from(e,n,r,s,o,i){const a=new pJ(e.message,n||e.code,r,s,o);return a.cause=e,a.name=e.name,i&&Object.assign(a,i),a}constructor(e,n,r,s,o){super(e),this.name="AxiosError",this.isAxiosError=!0,n&&(this.code=n),r&&(this.config=r),s&&(this.request=s),o&&(this.response=o,this.status=o.status)}toJSON(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:ze.toJSONObject(this.config),code:this.code,status:this.status}}};gn.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE";gn.ERR_BAD_OPTION="ERR_BAD_OPTION";gn.ECONNABORTED="ECONNABORTED";gn.ETIMEDOUT="ETIMEDOUT";gn.ERR_NETWORK="ERR_NETWORK";gn.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS";gn.ERR_DEPRECATED="ERR_DEPRECATED";gn.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE";gn.ERR_BAD_REQUEST="ERR_BAD_REQUEST";gn.ERR_CANCELED="ERR_CANCELED";gn.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT";gn.ERR_INVALID_URL="ERR_INVALID_URL";const B9e=null;function dT(t){return ze.isPlainObject(t)||ze.isArray(t)}function hJ(t){return ze.endsWith(t,"[]")?t.slice(0,-2):t}function tP(t,e,n){return t?t.concat(e).map(function(s,o){return s=hJ(s),!n&&o?"["+s+"]":s}).join(n?".":""):e}function H9e(t){return ze.isArray(t)&&!t.some(dT)}const U9e=ze.toFlatObject(ze,{},null,function(e){return/^is[A-Z]/.test(e)});function Q4(t,e,n){if(!ze.isObject(t))throw new TypeError("target must be an object");e=e||new FormData,n=ze.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(v,b){return!ze.isUndefined(b[v])});const r=n.metaTokens,s=n.visitor||u,o=n.dots,i=n.indexes,l=(n.Blob||typeof Blob<"u"&&Blob)&&ze.isSpecCompliantForm(e);if(!ze.isFunction(s))throw new TypeError("visitor must be a function");function c(y){if(y===null)return"";if(ze.isDate(y))return y.toISOString();if(ze.isBoolean(y))return y.toString();if(!l&&ze.isBlob(y))throw new gn("Blob is not supported. Use a Buffer instead.");return ze.isArrayBuffer(y)||ze.isTypedArray(y)?l&&typeof Blob=="function"?new Blob([y]):Buffer.from(y):y}function u(y,v,b){let w=y;if(y&&!b&&typeof y=="object"){if(ze.endsWith(v,"{}"))v=r?v:v.slice(0,-2),y=JSON.stringify(y);else if(ze.isArray(y)&&H9e(y)||(ze.isFileList(y)||ze.endsWith(v,"[]"))&&(w=ze.toArray(y)))return v=hJ(v),w.forEach(function(k,E){!(ze.isUndefined(k)||k===null)&&e.append(i===!0?tP([v],E,o):i===null?v:v+"[]",c(k))}),!1}return dT(y)?!0:(e.append(tP(b,v,o),c(y)),!1)}const f=[],h=Object.assign(U9e,{defaultVisitor:u,convertValue:c,isVisitable:dT});function m(y,v){if(!ze.isUndefined(y)){if(f.indexOf(y)!==-1)throw Error("Circular reference detected in "+v.join("."));f.push(y),ze.forEach(y,function(w,C){(!(ze.isUndefined(w)||w===null)&&s.call(e,w,ze.isString(C)?C.trim():C,v,h))===!0&&m(w,v?v.concat(C):[C])}),f.pop()}}if(!ze.isObject(t))throw new TypeError("data must be an object");return m(t),e}function nP(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,function(r){return e[r]})}function F_(t,e){this._pairs=[],t&&Q4(t,this,e)}const mJ=F_.prototype;mJ.append=function(e,n){this._pairs.push([e,n])};mJ.toString=function(e){const n=e?function(r){return e.call(this,r,nP)}:nP;return this._pairs.map(function(s){return n(s[0])+"="+n(s[1])},"").join("&")};function V9e(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function gJ(t,e,n){if(!e)return t;const r=n&&n.encode||V9e,s=ze.isFunction(n)?{serialize:n}:n,o=s&&s.serialize;let i;if(o?i=o(e,s):i=ze.isURLSearchParams(e)?e.toString():new F_(e,s).toString(r),i){const a=t.indexOf("#");a!==-1&&(t=t.slice(0,a)),t+=(t.indexOf("?")===-1?"?":"&")+i}return t}class rP{constructor(){this.handlers=[]}use(e,n,r){return this.handlers.push({fulfilled:e,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){ze.forEach(this.handlers,function(r){r!==null&&e(r)})}}const z_={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0},q9e=typeof URLSearchParams<"u"?URLSearchParams:F_,W9e=typeof FormData<"u"?FormData:null,Y9e=typeof Blob<"u"?Blob:null,G9e={isBrowser:!0,classes:{URLSearchParams:q9e,FormData:W9e,Blob:Y9e},protocols:["http","https","file","blob","url","data"]},P_=typeof window<"u"&&typeof document<"u",fT=typeof navigator=="object"&&navigator||void 0,K9e=P_&&(!fT||["ReactNative","NativeScript","NS"].indexOf(fT.product)<0),X9e=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Z9e=P_&&window.location.href||"http://localhost",Q9e=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:P_,hasStandardBrowserEnv:K9e,hasStandardBrowserWebWorkerEnv:X9e,navigator:fT,origin:Z9e},Symbol.toStringTag,{value:"Module"})),uo={...Q9e,...G9e};function J9e(t,e){return Q4(t,new uo.classes.URLSearchParams,{visitor:function(n,r,s,o){return uo.isNode&&ze.isBuffer(n)?(this.append(r,n.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)},...e})}function e8e(t){return ze.matchAll(/\w+|\[(\w*)]/g,t).map(e=>e[0]==="[]"?"":e[1]||e[0])}function t8e(t){const e={},n=Object.keys(t);let r;const s=n.length;let o;for(r=0;r<s;r++)o=n[r],e[o]=t[o];return e}function yJ(t){function e(n,r,s,o){let i=n[o++];if(i==="__proto__")return!0;const a=Number.isFinite(+i),l=o>=n.length;return i=!i&&ze.isArray(s)?s.length:i,l?(ze.hasOwnProp(s,i)?s[i]=[s[i],r]:s[i]=r,!a):((!s[i]||!ze.isObject(s[i]))&&(s[i]=[]),e(n,r,s[i],o)&&ze.isArray(s[i])&&(s[i]=t8e(s[i])),!a)}if(ze.isFormData(t)&&ze.isFunction(t.entries)){const n={};return ze.forEachEntry(t,(r,s)=>{e(e8e(r),s,n,0)}),n}return null}function n8e(t,e,n){if(ze.isString(t))try{return(e||JSON.parse)(t),ze.trim(t)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(t)}const $2={transitional:z_,adapter:["xhr","http","fetch"],transformRequest:[function(e,n){const r=n.getContentType()||"",s=r.indexOf("application/json")>-1,o=ze.isObject(e);if(o&&ze.isHTMLForm(e)&&(e=new FormData(e)),ze.isFormData(e))return s?JSON.stringify(yJ(e)):e;if(ze.isArrayBuffer(e)||ze.isBuffer(e)||ze.isStream(e)||ze.isFile(e)||ze.isBlob(e)||ze.isReadableStream(e))return e;if(ze.isArrayBufferView(e))return e.buffer;if(ze.isURLSearchParams(e))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let a;if(o){if(r.indexOf("application/x-www-form-urlencoded")>-1)return J9e(e,this.formSerializer).toString();if((a=ze.isFileList(e))||r.indexOf("multipart/form-data")>-1){const l=this.env&&this.env.FormData;return Q4(a?{"files[]":e}:e,l&&new l,this.formSerializer)}}return o||s?(n.setContentType("application/json",!1),n8e(e)):e}],transformResponse:[function(e){const n=this.transitional||$2.transitional,r=n&&n.forcedJSONParsing,s=this.responseType==="json";if(ze.isResponse(e)||ze.isReadableStream(e))return e;if(e&&ze.isString(e)&&(r&&!this.responseType||s)){const i=!(n&&n.silentJSONParsing)&&s;try{return JSON.parse(e,this.parseReviver)}catch(a){if(i)throw a.name==="SyntaxError"?gn.from(a,gn.ERR_BAD_RESPONSE,this,null,this.response):a}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:uo.classes.FormData,Blob:uo.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};ze.forEach(["delete","get","head","post","put","patch"],t=>{$2.headers[t]={}});const r8e=ze.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),s8e=t=>{const e={};let n,r,s;return t&&t.split(`
`).forEach(function(i){s=i.indexOf(":"),n=i.substring(0,s).trim().toLowerCase(),r=i.substring(s+1).trim(),!(!n||e[n]&&r8e[n])&&(n==="set-cookie"?e[n]?e[n].push(r):e[n]=[r]:e[n]=e[n]?e[n]+", "+r:r)}),e},sP=Symbol("internals");function o0(t){return t&&String(t).trim().toLowerCase()}function sx(t){return t===!1||t==null?t:ze.isArray(t)?t.map(sx):String(t)}function o8e(t){const e=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(t);)e[r[1]]=r[2];return e}const i8e=t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());function yk(t,e,n,r,s){if(ze.isFunction(r))return r.call(this,e,n);if(s&&(e=n),!!ze.isString(e)){if(ze.isString(r))return e.indexOf(r)!==-1;if(ze.isRegExp(r))return r.test(e)}}function a8e(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,n,r)=>n.toUpperCase()+r)}function l8e(t,e){const n=ze.toCamelCase(" "+e);["get","set","has"].forEach(r=>{Object.defineProperty(t,r+n,{value:function(s,o,i){return this[r].call(this,e,s,o,i)},configurable:!0})})}let ei=class{constructor(e){e&&this.set(e)}set(e,n,r){const s=this;function o(a,l,c){const u=o0(l);if(!u)throw new Error("header name must be a non-empty string");const f=ze.findKey(s,u);(!f||s[f]===void 0||c===!0||c===void 0&&s[f]!==!1)&&(s[f||l]=sx(a))}const i=(a,l)=>ze.forEach(a,(c,u)=>o(c,u,l));if(ze.isPlainObject(e)||e instanceof this.constructor)i(e,n);else if(ze.isString(e)&&(e=e.trim())&&!i8e(e))i(s8e(e),n);else if(ze.isObject(e)&&ze.isIterable(e)){let a={},l,c;for(const u of e){if(!ze.isArray(u))throw TypeError("Object iterator must return a key-value pair");a[c=u[0]]=(l=a[c])?ze.isArray(l)?[...l,u[1]]:[l,u[1]]:u[1]}i(a,n)}else e!=null&&o(n,e,r);return this}get(e,n){if(e=o0(e),e){const r=ze.findKey(this,e);if(r){const s=this[r];if(!n)return s;if(n===!0)return o8e(s);if(ze.isFunction(n))return n.call(this,s,r);if(ze.isRegExp(n))return n.exec(s);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,n){if(e=o0(e),e){const r=ze.findKey(this,e);return!!(r&&this[r]!==void 0&&(!n||yk(this,this[r],r,n)))}return!1}delete(e,n){const r=this;let s=!1;function o(i){if(i=o0(i),i){const a=ze.findKey(r,i);a&&(!n||yk(r,r[a],a,n))&&(delete r[a],s=!0)}}return ze.isArray(e)?e.forEach(o):o(e),s}clear(e){const n=Object.keys(this);let r=n.length,s=!1;for(;r--;){const o=n[r];(!e||yk(this,this[o],o,e,!0))&&(delete this[o],s=!0)}return s}normalize(e){const n=this,r={};return ze.forEach(this,(s,o)=>{const i=ze.findKey(r,o);if(i){n[i]=sx(s),delete n[o];return}const a=e?a8e(o):String(o).trim();a!==o&&delete n[o],n[a]=sx(s),r[a]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const n=Object.create(null);return ze.forEach(this,(r,s)=>{r!=null&&r!==!1&&(n[s]=e&&ze.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,n])=>e+": "+n).join(`
`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...n){const r=new this(e);return n.forEach(s=>r.set(s)),r}static accessor(e){const r=(this[sP]=this[sP]={accessors:{}}).accessors,s=this.prototype;function o(i){const a=o0(i);r[a]||(l8e(s,i),r[a]=!0)}return ze.isArray(e)?e.forEach(o):o(e),this}};ei.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);ze.reduceDescriptors(ei.prototype,({value:t},e)=>{let n=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(r){this[n]=r}}});ze.freezeMethods(ei);function vk(t,e){const n=this||$2,r=e||n,s=ei.from(r.headers);let o=r.data;return ze.forEach(t,function(a){o=a.call(n,o,s.normalize(),e?e.status:void 0)}),s.normalize(),o}function vJ(t){return!!(t&&t.__CANCEL__)}let F2=class extends gn{constructor(e,n,r){super(e??"canceled",gn.ERR_CANCELED,n,r),this.name="CanceledError",this.__CANCEL__=!0}};function bJ(t,e,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?t(n):e(new gn("Request failed with status code "+n.status,[gn.ERR_BAD_REQUEST,gn.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function c8e(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}function u8e(t,e){t=t||10;const n=new Array(t),r=new Array(t);let s=0,o=0,i;return e=e!==void 0?e:1e3,function(l){const c=Date.now(),u=r[o];i||(i=c),n[s]=l,r[s]=c;let f=o,h=0;for(;f!==s;)h+=n[f++],f=f%t;if(s=(s+1)%t,s===o&&(o=(o+1)%t),c-i<e)return;const m=u&&c-u;return m?Math.round(h*1e3/m):void 0}}function d8e(t,e){let n=0,r=1e3/e,s,o;const i=(c,u=Date.now())=>{n=u,s=null,o&&(clearTimeout(o),o=null),t(...c)};return[(...c)=>{const u=Date.now(),f=u-n;f>=r?i(c,u):(s=c,o||(o=setTimeout(()=>{o=null,i(s)},r-f)))},()=>s&&i(s)]}const y3=(t,e,n=3)=>{let r=0;const s=u8e(50,250);return d8e(o=>{const i=o.loaded,a=o.lengthComputable?o.total:void 0,l=i-r,c=s(l),u=i<=a;r=i;const f={loaded:i,total:a,progress:a?i/a:void 0,bytes:l,rate:c||void 0,estimated:c&&a&&u?(a-i)/c:void 0,event:o,lengthComputable:a!=null,[e?"download":"upload"]:!0};t(f)},n)},oP=(t,e)=>{const n=t!=null;return[r=>e[0]({lengthComputable:n,total:t,loaded:r}),e[1]]},iP=t=>(...e)=>ze.asap(()=>t(...e)),f8e=uo.hasStandardBrowserEnv?((t,e)=>n=>(n=new URL(n,uo.origin),t.protocol===n.protocol&&t.host===n.host&&(e||t.port===n.port)))(new URL(uo.origin),uo.navigator&&/(msie|trident)/i.test(uo.navigator.userAgent)):()=>!0,p8e=uo.hasStandardBrowserEnv?{write(t,e,n,r,s,o,i){if(typeof document>"u")return;const a=[`${t}=${encodeURIComponent(e)}`];ze.isNumber(n)&&a.push(`expires=${new Date(n).toUTCString()}`),ze.isString(r)&&a.push(`path=${r}`),ze.isString(s)&&a.push(`domain=${s}`),o===!0&&a.push("secure"),ze.isString(i)&&a.push(`SameSite=${i}`),document.cookie=a.join("; ")},read(t){if(typeof document>"u")return null;const e=document.cookie.match(new RegExp("(?:^|; )"+t+"=([^;]*)"));return e?decodeURIComponent(e[1]):null},remove(t){this.write(t,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function h8e(t){return typeof t!="string"?!1:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function m8e(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}function xJ(t,e,n){let r=!h8e(e);return t&&(r||n==!1)?m8e(t,e):e}const aP=t=>t instanceof ei?{...t}:t;function Bf(t,e){e=e||{};const n={};function r(c,u,f,h){return ze.isPlainObject(c)&&ze.isPlainObject(u)?ze.merge.call({caseless:h},c,u):ze.isPlainObject(u)?ze.merge({},u):ze.isArray(u)?u.slice():u}function s(c,u,f,h){if(ze.isUndefined(u)){if(!ze.isUndefined(c))return r(void 0,c,f,h)}else return r(c,u,f,h)}function o(c,u){if(!ze.isUndefined(u))return r(void 0,u)}function i(c,u){if(ze.isUndefined(u)){if(!ze.isUndefined(c))return r(void 0,c)}else return r(void 0,u)}function a(c,u,f){if(f in e)return r(c,u);if(f in t)return r(void 0,c)}const l={url:o,method:o,data:o,baseURL:i,transformRequest:i,transformResponse:i,paramsSerializer:i,timeout:i,timeoutMessage:i,withCredentials:i,withXSRFToken:i,adapter:i,responseType:i,xsrfCookieName:i,xsrfHeaderName:i,onUploadProgress:i,onDownloadProgress:i,decompress:i,maxContentLength:i,maxBodyLength:i,beforeRedirect:i,transport:i,httpAgent:i,httpsAgent:i,cancelToken:i,socketPath:i,responseEncoding:i,validateStatus:a,headers:(c,u,f)=>s(aP(c),aP(u),f,!0)};return ze.forEach(Object.keys({...t,...e}),function(u){if(u==="__proto__"||u==="constructor"||u==="prototype")return;const f=ze.hasOwnProp(l,u)?l[u]:s,h=f(t[u],e[u],u);ze.isUndefined(h)&&f!==a||(n[u]=h)}),n}const wJ=t=>{const e=Bf({},t);let{data:n,withXSRFToken:r,xsrfHeaderName:s,xsrfCookieName:o,headers:i,auth:a}=e;if(e.headers=i=ei.from(i),e.url=gJ(xJ(e.baseURL,e.url,e.allowAbsoluteUrls),t.params,t.paramsSerializer),a&&i.set("Authorization","Basic "+btoa((a.username||"")+":"+(a.password?unescape(encodeURIComponent(a.password)):""))),ze.isFormData(n)){if(uo.hasStandardBrowserEnv||uo.hasStandardBrowserWebWorkerEnv)i.setContentType(void 0);else if(ze.isFunction(n.getHeaders)){const l=n.getHeaders(),c=["content-type","content-length"];Object.entries(l).forEach(([u,f])=>{c.includes(u.toLowerCase())&&i.set(u,f)})}}if(uo.hasStandardBrowserEnv&&(r&&ze.isFunction(r)&&(r=r(e)),r||r!==!1&&f8e(e.url))){const l=s&&o&&p8e.read(o);l&&i.set(s,l)}return e},g8e=typeof XMLHttpRequest<"u",y8e=g8e&&function(t){return new Promise(function(n,r){const s=wJ(t);let o=s.data;const i=ei.from(s.headers).normalize();let{responseType:a,onUploadProgress:l,onDownloadProgress:c}=s,u,f,h,m,y;function v(){m&&m(),y&&y(),s.cancelToken&&s.cancelToken.unsubscribe(u),s.signal&&s.signal.removeEventListener("abort",u)}let b=new XMLHttpRequest;b.open(s.method.toUpperCase(),s.url,!0),b.timeout=s.timeout;function w(){if(!b)return;const k=ei.from("getAllResponseHeaders"in b&&b.getAllResponseHeaders()),j={data:!a||a==="text"||a==="json"?b.responseText:b.response,status:b.status,statusText:b.statusText,headers:k,config:t,request:b};bJ(function(M){n(M),v()},function(M){r(M),v()},j),b=null}"onloadend"in b?b.onloadend=w:b.onreadystatechange=function(){!b||b.readyState!==4||b.status===0&&!(b.responseURL&&b.responseURL.indexOf("file:")===0)||setTimeout(w)},b.onabort=function(){b&&(r(new gn("Request aborted",gn.ECONNABORTED,t,b)),b=null)},b.onerror=function(E){const j=E&&E.message?E.message:"Network Error",A=new gn(j,gn.ERR_NETWORK,t,b);A.event=E||null,r(A),b=null},b.ontimeout=function(){let E=s.timeout?"timeout of "+s.timeout+"ms exceeded":"timeout exceeded";const j=s.transitional||z_;s.timeoutErrorMessage&&(E=s.timeoutErrorMessage),r(new gn(E,j.clarifyTimeoutError?gn.ETIMEDOUT:gn.ECONNABORTED,t,b)),b=null},o===void 0&&i.setContentType(null),"setRequestHeader"in b&&ze.forEach(i.toJSON(),function(E,j){b.setRequestHeader(j,E)}),ze.isUndefined(s.withCredentials)||(b.withCredentials=!!s.withCredentials),a&&a!=="json"&&(b.responseType=s.responseType),c&&([h,y]=y3(c,!0),b.addEventListener("progress",h)),l&&b.upload&&([f,m]=y3(l),b.upload.addEventListener("progress",f),b.upload.addEventListener("loadend",m)),(s.cancelToken||s.signal)&&(u=k=>{b&&(r(!k||k.type?new F2(null,t,b):k),b.abort(),b=null)},s.cancelToken&&s.cancelToken.subscribe(u),s.signal&&(s.signal.aborted?u():s.signal.addEventListener("abort",u)));const C=c8e(s.url);if(C&&uo.protocols.indexOf(C)===-1){r(new gn("Unsupported protocol "+C+":",gn.ERR_BAD_REQUEST,t));return}b.send(o||null)})},v8e=(t,e)=>{const{length:n}=t=t?t.filter(Boolean):[];if(e||n){let r=new AbortController,s;const o=function(c){if(!s){s=!0,a();const u=c instanceof Error?c:this.reason;r.abort(u instanceof gn?u:new F2(u instanceof Error?u.message:u))}};let i=e&&setTimeout(()=>{i=null,o(new gn(`timeout of ${e}ms exceeded`,gn.ETIMEDOUT))},e);const a=()=>{t&&(i&&clearTimeout(i),i=null,t.forEach(c=>{c.unsubscribe?c.unsubscribe(o):c.removeEventListener("abort",o)}),t=null)};t.forEach(c=>c.addEventListener("abort",o));const{signal:l}=r;return l.unsubscribe=()=>ze.asap(a),l}},b8e=function*(t,e){let n=t.byteLength;if(n<e){yield t;return}let r=0,s;for(;r<n;)s=r+e,yield t.slice(r,s),r=s},x8e=async function*(t,e){for await(const n of w8e(t))yield*b8e(n,e)},w8e=async function*(t){if(t[Symbol.asyncIterator]){yield*t;return}const e=t.getReader();try{for(;;){const{done:n,value:r}=await e.read();if(n)break;yield r}}finally{await e.cancel()}},lP=(t,e,n,r)=>{const s=x8e(t,e);let o=0,i,a=l=>{i||(i=!0,r&&r(l))};return new ReadableStream({async pull(l){try{const{done:c,value:u}=await s.next();if(c){a(),l.close();return}let f=u.byteLength;if(n){let h=o+=f;n(h)}l.enqueue(new Uint8Array(u))}catch(c){throw a(c),c}},cancel(l){return a(l),s.return()}},{highWaterMark:2})},cP=64*1024,{isFunction:Qv}=ze,S8e=(({Request:t,Response:e})=>({Request:t,Response:e}))(ze.global),{ReadableStream:uP,TextEncoder:dP}=ze.global,fP=(t,...e)=>{try{return!!t(...e)}catch{return!1}},C8e=t=>{t=ze.merge.call({skipUndefined:!0},S8e,t);const{fetch:e,Request:n,Response:r}=t,s=e?Qv(e):typeof fetch=="function",o=Qv(n),i=Qv(r);if(!s)return!1;const a=s&&Qv(uP),l=s&&(typeof dP=="function"?(y=>v=>y.encode(v))(new dP):async y=>new Uint8Array(await new n(y).arrayBuffer())),c=o&&a&&fP(()=>{let y=!1;const v=new n(uo.origin,{body:new uP,method:"POST",get duplex(){return y=!0,"half"}}).headers.has("Content-Type");return y&&!v}),u=i&&a&&fP(()=>ze.isReadableStream(new r("").body)),f={stream:u&&(y=>y.body)};s&&["text","arrayBuffer","blob","formData","stream"].forEach(y=>{!f[y]&&(f[y]=(v,b)=>{let w=v&&v[y];if(w)return w.call(v);throw new gn(`Response type '${y}' is not supported`,gn.ERR_NOT_SUPPORT,b)})});const h=async y=>{if(y==null)return 0;if(ze.isBlob(y))return y.size;if(ze.isSpecCompliantForm(y))return(await new n(uo.origin,{method:"POST",body:y}).arrayBuffer()).byteLength;if(ze.isArrayBufferView(y)||ze.isArrayBuffer(y))return y.byteLength;if(ze.isURLSearchParams(y)&&(y=y+""),ze.isString(y))return(await l(y)).byteLength},m=async(y,v)=>{const b=ze.toFiniteNumber(y.getContentLength());return b??h(v)};return async y=>{let{url:v,method:b,data:w,signal:C,cancelToken:k,timeout:E,onDownloadProgress:j,onUploadProgress:A,responseType:M,headers:_,withCredentials:D="same-origin",fetchOptions:R}=wJ(y),N=e||fetch;M=M?(M+"").toLowerCase():"text";let z=v8e([C,k&&k.toAbortSignal()],E),B=null;const L=z&&z.unsubscribe&&(()=>{z.unsubscribe()});let P;try{if(A&&c&&b!=="get"&&b!=="head"&&(P=await m(_,w))!==0){let U=new n(v,{method:"POST",body:w,duplex:"half"}),W;if(ze.isFormData(w)&&(W=U.headers.get("content-type"))&&_.setContentType(W),U.body){const[Y,G]=oP(P,y3(iP(A)));w=lP(U.body,cP,Y,G)}}ze.isString(D)||(D=D?"include":"omit");const I=o&&"credentials"in n.prototype,H={...R,signal:z,method:b.toUpperCase(),headers:_.normalize().toJSON(),body:w,duplex:"half",credentials:I?D:void 0};B=o&&new n(v,H);let $=await(o?N(B,R):N(v,H));const V=u&&(M==="stream"||M==="response");if(u&&(j||V&&L)){const U={};["status","statusText","headers"].forEach(K=>{U[K]=$[K]});const W=ze.toFiniteNumber($.headers.get("content-length")),[Y,G]=j&&oP(W,y3(iP(j),!0))||[];$=new r(lP($.body,cP,Y,()=>{G&&G(),L&&L()}),U)}M=M||"text";let q=await f[ze.findKey(f,M)||"text"]($,y);return!V&&L&&L(),await new Promise((U,W)=>{bJ(U,W,{data:q,headers:ei.from($.headers),status:$.status,statusText:$.statusText,config:y,request:B})})}catch(I){throw L&&L(),I&&I.name==="TypeError"&&/Load failed|fetch/i.test(I.message)?Object.assign(new gn("Network Error",gn.ERR_NETWORK,y,B,I&&I.response),{cause:I.cause||I}):gn.from(I,I&&I.code,y,B,I&&I.response)}}},k8e=new Map,SJ=t=>{let e=t&&t.env||{};const{fetch:n,Request:r,Response:s}=e,o=[r,s,n];let i=o.length,a=i,l,c,u=k8e;for(;a--;)l=o[a],c=u.get(l),c===void 0&&u.set(l,c=a?new Map:C8e(e)),u=c;return c};SJ();const B_={http:B9e,xhr:y8e,fetch:{get:SJ}};ze.forEach(B_,(t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch{}Object.defineProperty(t,"adapterName",{value:e})}});const pP=t=>`- ${t}`,E8e=t=>ze.isFunction(t)||t===null||t===!1;function T8e(t,e){t=ze.isArray(t)?t:[t];const{length:n}=t;let r,s;const o={};for(let i=0;i<n;i++){r=t[i];let a;if(s=r,!E8e(r)&&(s=B_[(a=String(r)).toLowerCase()],s===void 0))throw new gn(`Unknown adapter '${a}'`);if(s&&(ze.isFunction(s)||(s=s.get(e))))break;o[a||"#"+i]=s}if(!s){const i=Object.entries(o).map(([l,c])=>`adapter ${l} `+(c===!1?"is not supported by the environment":"is not available in the build"));let a=n?i.length>1?`since :
`+i.map(pP).join(`
`):" "+pP(i[0]):"as no adapter specified";throw new gn("There is no suitable adapter to dispatch the request "+a,"ERR_NOT_SUPPORT")}return s}const CJ={getAdapter:T8e,adapters:B_};function bk(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new F2(null,t)}function hP(t){return bk(t),t.headers=ei.from(t.headers),t.data=vk.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),CJ.getAdapter(t.adapter||$2.adapter,t)(t).then(function(r){return bk(t),r.data=vk.call(t,t.transformResponse,r),r.headers=ei.from(r.headers),r},function(r){return vJ(r)||(bk(t),r&&r.response&&(r.response.data=vk.call(t,t.transformResponse,r.response),r.response.headers=ei.from(r.response.headers))),Promise.reject(r)})}const kJ="1.13.5",J4={};["object","boolean","number","function","string","symbol"].forEach((t,e)=>{J4[t]=function(r){return typeof r===t||"a"+(e<1?"n ":" ")+t}});const mP={};J4.transitional=function(e,n,r){function s(o,i){return"[Axios v"+kJ+"] Transitional option '"+o+"'"+i+(r?". "+r:"")}return(o,i,a)=>{if(e===!1)throw new gn(s(i," has been removed"+(n?" in "+n:"")),gn.ERR_DEPRECATED);return n&&!mP[i]&&(mP[i]=!0,console.warn(s(i," has been deprecated since v"+n+" and will be removed in the near future"))),e?e(o,i,a):!0}};J4.spelling=function(e){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${e}`),!0)};function M8e(t,e,n){if(typeof t!="object")throw new gn("options must be an object",gn.ERR_BAD_OPTION_VALUE);const r=Object.keys(t);let s=r.length;for(;s-- >0;){const o=r[s],i=e[o];if(i){const a=t[o],l=a===void 0||i(a,o,t);if(l!==!0)throw new gn("option "+o+" must be "+l,gn.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new gn("Unknown option "+o,gn.ERR_BAD_OPTION)}}const ox={assertOptions:M8e,validators:J4},$i=ox.validators;let Ef=class{constructor(e){this.defaults=e||{},this.interceptors={request:new rP,response:new rP}}async request(e,n){try{return await this._request(e,n)}catch(r){if(r instanceof Error){let s={};Error.captureStackTrace?Error.captureStackTrace(s):s=new Error;const o=s.stack?s.stack.replace(/^.+\n/,""):"";try{r.stack?o&&!String(r.stack).endsWith(o.replace(/^.+\n.+\n/,""))&&(r.stack+=`
`+o):r.stack=o}catch{}}throw r}}_request(e,n){typeof e=="string"?(n=n||{},n.url=e):n=e||{},n=Bf(this.defaults,n);const{transitional:r,paramsSerializer:s,headers:o}=n;r!==void 0&&ox.assertOptions(r,{silentJSONParsing:$i.transitional($i.boolean),forcedJSONParsing:$i.transitional($i.boolean),clarifyTimeoutError:$i.transitional($i.boolean),legacyInterceptorReqResOrdering:$i.transitional($i.boolean)},!1),s!=null&&(ze.isFunction(s)?n.paramsSerializer={serialize:s}:ox.assertOptions(s,{encode:$i.function,serialize:$i.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),ox.assertOptions(n,{baseUrl:$i.spelling("baseURL"),withXsrfToken:$i.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let i=o&&ze.merge(o.common,o[n.method]);o&&ze.forEach(["delete","get","head","post","put","patch","common"],y=>{delete o[y]}),n.headers=ei.concat(i,o);const a=[];let l=!0;this.interceptors.request.forEach(function(v){if(typeof v.runWhen=="function"&&v.runWhen(n)===!1)return;l=l&&v.synchronous;const b=n.transitional||z_;b&&b.legacyInterceptorReqResOrdering?a.unshift(v.fulfilled,v.rejected):a.push(v.fulfilled,v.rejected)});const c=[];this.interceptors.response.forEach(function(v){c.push(v.fulfilled,v.rejected)});let u,f=0,h;if(!l){const y=[hP.bind(this),void 0];for(y.unshift(...a),y.push(...c),h=y.length,u=Promise.resolve(n);f<h;)u=u.then(y[f++],y[f++]);return u}h=a.length;let m=n;for(;f<h;){const y=a[f++],v=a[f++];try{m=y(m)}catch(b){v.call(this,b);break}}try{u=hP.call(this,m)}catch(y){return Promise.reject(y)}for(f=0,h=c.length;f<h;)u=u.then(c[f++],c[f++]);return u}getUri(e){e=Bf(this.defaults,e);const n=xJ(e.baseURL,e.url,e.allowAbsoluteUrls);return gJ(n,e.params,e.paramsSerializer)}};ze.forEach(["delete","get","head","options"],function(e){Ef.prototype[e]=function(n,r){return this.request(Bf(r||{},{method:e,url:n,data:(r||{}).data}))}});ze.forEach(["post","put","patch"],function(e){function n(r){return function(o,i,a){return this.request(Bf(a||{},{method:e,headers:r?{"Content-Type":"multipart/form-data"}:{},url:o,data:i}))}}Ef.prototype[e]=n(),Ef.prototype[e+"Form"]=n(!0)});let j8e=class EJ{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(o){n=o});const r=this;this.promise.then(s=>{if(!r._listeners)return;let o=r._listeners.length;for(;o-- >0;)r._listeners[o](s);r._listeners=null}),this.promise.then=s=>{let o;const i=new Promise(a=>{r.subscribe(a),o=a}).then(s);return i.cancel=function(){r.unsubscribe(o)},i},e(function(o,i,a){r.reason||(r.reason=new F2(o,i,a),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const n=this._listeners.indexOf(e);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const e=new AbortController,n=r=>{e.abort(r)};return this.subscribe(n),e.signal.unsubscribe=()=>this.unsubscribe(n),e.signal}static source(){let e;return{token:new EJ(function(s){e=s}),cancel:e}}};function A8e(t){return function(n){return t.apply(null,n)}}function _8e(t){return ze.isObject(t)&&t.isAxiosError===!0}const pT={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(pT).forEach(([t,e])=>{pT[e]=t});function TJ(t){const e=new Ef(t),n=oJ(Ef.prototype.request,e);return ze.extend(n,Ef.prototype,e,{allOwnKeys:!0}),ze.extend(n,e,null,{allOwnKeys:!0}),n.create=function(s){return TJ(Bf(t,s))},n}const Ct=TJ($2);Ct.Axios=Ef;Ct.CanceledError=F2;Ct.CancelToken=j8e;Ct.isCancel=vJ;Ct.VERSION=kJ;Ct.toFormData=Q4;Ct.AxiosError=gn;Ct.Cancel=Ct.CanceledError;Ct.all=function(e){return Promise.all(e)};Ct.spread=A8e;Ct.isAxiosError=_8e;Ct.mergeConfig=Bf;Ct.AxiosHeaders=ei;Ct.formToJSON=t=>yJ(ze.isHTMLForm(t)?new FormData(t):t);Ct.getAdapter=CJ.getAdapter;Ct.HttpStatusCode=pT;Ct.default=Ct;const{Axios:bpt,AxiosError:xpt,CanceledError:wpt,isCancel:Spt,CancelToken:Cpt,VERSION:kpt,all:Ept,Cancel:Tpt,isAxiosError:R8e,spread:Mpt,toFormData:jpt,AxiosHeaders:Apt,HttpStatusCode:_pt,formToJSON:Rpt,getAdapter:Dpt,mergeConfig:Ipt}=Ct,D8e="/api/",I8e=3e4,O8e=3e5,hT=64,MJ=48,N8e=65,L8e=280,v3=25,H_={pdf:{fileType:"pdf",documentType:"word",mimeType:"application/pdf",iconType:"pdf"},word:{fileType:"docx",documentType:"word",mimeType:"application/vnd.openxmlformats-officedocument.wordprocessingml.document",iconType:"doc"},word_old:{fileType:"doc",documentType:"word",mimeType:"application/msword",iconType:"doc"},rtf:{fileType:"rtf",documentType:"word",mimeType:"application/rtf",iconType:"doc"},odt:{fileType:"odt",documentType:"word",mimeType:"application/vnd.oasis.opendocument.text",iconType:"doc"},excel:{fileType:"xlsx",documentType:"cell",mimeType:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",iconType:"excel"},ods:{fileType:"ods",documentType:"cell",mimeType:"application/vnd.oasis.opendocument.spreadsheet",iconType:"excel"},excel_old:{fileType:"xls",documentType:"cell",mimeType:"application/vnd.ms-excel",iconType:"excel"},csv:{fileType:"csv",documentType:"cell",mimeType:"text/csv",iconType:"excel"},powerPoint:{fileType:"pptx",documentType:"slide",mimeType:"application/vnd.openxmlformats-officedocument.presentationml.presentation",iconType:"ppt"},powerPoint_old:{fileType:"ppt",documentType:"slide",mimeType:"application/vnd.ms-powerpoint",iconType:"ppt"},odp:{fileType:"odp",documentType:"slide",mimeType:"application/vnd.oasis.opendocument.presentation",iconType:"ppt"},draw:{fileType:"draw",mimeType:"application/x-draw",iconType:"draw"},text:{fileType:"txt",documentType:"text",mimeType:"text/plain",iconType:"doc"},imgGif:{mimeType:"image/gif",fileType:"png",iconType:"image"},imgPng:{mimeType:"image/png",fileType:"png",iconType:"image"},imgJpeg:{mimeType:"image/jpeg",fileType:"jpeg",iconType:"image"},imgJpg:{mimeType:"image/jpg",fileType:"jpg",iconType:"image"},imgSvg:{mimeType:"image/svg",iconType:"image"},imgSvg2:{mimeType:"image/svg+xml",iconType:"image"},webp:{mimeType:"image/webp",iconType:"image"},gif:{mimeType:"image/gif",iconType:"image"},videoMp4:{mimeType:"video/mp4",fileType:"mp4",iconType:"video"},webm:{mimeType:"video/webm",fileType:"webm",iconType:"video"},audio:{mimeType:"audio/mpeg",fileType:"audio",iconType:"audio"}},hr={Move:0,AutoReply:2,SentCopy:3},xs={NotEqual:0,Equal:1,ContainAddressBook:8,NotContainAddressBook:4},As={From:1,To:2,Subject:3,Body:4,Cc:5,Bcc:6};var Mg=(t=>(t[t.Unknown=0]="Unknown",t[t.File=1]="File",t[t.Document=2]="Document",t[t.Directory=3]="Directory",t[t.Customer=4]="Customer",t[t.User=5]="User",t[t.Favorite=6]="Favorite",t[t.Event=7]="Event",t[t.Call=8]="Call",t[t.Visitor=9]="Visitor",t[t.Reception=10]="Reception",t[t.Birthday=11]="Birthday",t[t.Meeting=12]="Meeting",t[t.Calendar=14]="Calendar",t[t.Contact=15]="Contact",t[t.Application=16]="Application",t[t.UserGroup=17]="UserGroup",t[t.ClientApplication=18]="ClientApplication",t[t.OfflineDocument=30]="OfflineDocument",t[t.EmailFolder=31]="EmailFolder",t[t.EmailMessage=32]="EmailMessage",t[t.EmailAttachment=33]="EmailAttachment",t[t.Role=34]="Role",t[t.EventParticipant=35]="EventParticipant",t[t.AddressBook=36]="AddressBook",t[t.ChangeEvent=37]="ChangeEvent",t[t.UserEmail=48]="UserEmail",t))(Mg||{});const j0={folderId:"-1",SearchContext:{Body:"",Subject:"",From:"",To:"",StartDate:"",EndDate:"",Query:"",HasAttachments:!1,WasRead:!0,IsImportant:!1,Labels:[]},offset:0,size:v3,sortOrder:1,orderField:"Id"},bi={Read:0,Edit:8,Full:512},$8e=()=>Ct.get("v1/email/Folders"),F8e=t=>Ct.delete("v1/email/DeleteFolder",{params:t}),z8e=(t,e)=>Ct.get("v1/email/Messages",{params:t,signal:e}),P8e=(t,e)=>Ct.post("v1/email/Messages",t,{signal:e}),jJ=t=>Ct.get("v1/email/GetMessage",{params:t}),AJ=t=>Ct.get("v1/email/Attachments",{params:t,responseType:"blob"}),B8e=t=>Ct.post("v1/email/MarkAsRead",t),H8e=t=>Ct.post("v1/email/Delete",t),U8e=t=>Ct.delete("/v1/email/Clear",{params:t}),V8e=t=>Ct.put("v1/email/RevokeMessage",{ids:t}),q8e=t=>Ct.post("v1/email/Send",t),W8e=t=>Ct.post("v1/email/saveDraft",t,{headers:{"X-R7-IsCloseDraft":!!t.addHeader}}),Y8e=t=>Ct.post("v1/email/MoveMessage",t),G8e=t=>Ct.put(`v1/email/CancelSend?messageId=${t.id}`),U_=t=>Ct.get("v1/Link/Generate",{params:t}),K8e=t=>Ct.put("v1/Link/Edit",t),X8e=t=>Ct.get(`v1/Link/Info?uid=${t.uid}`),Z8e=t=>Ct.get("v1/email/Create",{params:t}),Q8e=t=>Ct.put(`v1/email/RenameFolder?id=${t.id}&name=${t.name}`,{params:t}),J8e=t=>Ct.post("v1/email/label",t),_J=()=>Ct.post("v1/email/Counters",{}),e7e=()=>Ct.get("v1/email/settings?returnAll=true"),t7e=()=>Ct.get("v1/settings"),n7e=t=>Ct.post("v1/email/settings",t),r7e=t=>Ct.post("v1/email/runfilter",t),s7e=()=>Ct.get("v1/addressbook"),RJ=t=>Ct.post("v1/addressbook/Links",t),o7e=t=>Ct.delete("v1/EmailAddressBook",{params:t}),DJ=t=>Ct.get("v1/email/SaveToDisk",{params:t}),i7e=t=>Ct.put(`v1/email/FoldersStatus?id=${t.folderId}&status=${t.status}`),a7e=t=>Ct.post("v1/email/MarkAsFavorite",t),l7e=()=>Ct.get("v1/email/Items"),c7e=t=>Ct.get(`v1/event-invitation/event/${t.messageId}`),u7e=t=>Ct.put(`v1/event-invitation/accept/${t.messageId}`),d7e=t=>Ct.put(`v1/event-invitation/decline/${t.messageId}`),f7e=t=>Ct.put(`v1/event-invitation/tentative/${t.messageId}`),p7e=t=>Ct.post("v1/share",t),h7e=t=>Ct.get(`v1/Share?entityId=${t}&entityType=${Mg.UserEmail}`),m7e=t=>Ct.post("v1/User/get",{Ids:t}),g7e=t=>Ct.post("v1/User/search",t),y7e=t=>Ct.delete("v1/Share/Delete",{params:t}),v7e=t=>Ct.get(`v1/Share/Access?entityId=${t}&entityType=${Mg.UserEmail}`),b7e=()=>Ct.get("v1/calendars/timezones"),x7e=(t,e)=>Ct.put(`v1/email/ScheduleEmailSent?messageId=${t}&scheduledDate=${e}`),w7e=t=>Ct.post("v1/email/Snooze",{messageIds:t.messageIds,snoozeDelaySeconds:t.snoozeDelaySeconds}),S7e=t=>Ct.put(`v1/email/Unsnooze?messageId=${t.messageId}`),C7e=t=>Ct.get("v1/email/SnoozedMessages",{params:t});var ix={exports:{}},k7e=ix.exports,gP;function IJ(){return gP||(gP=1,(function(t,e){(function(n,r){t.exports=r()})(k7e,(function(){var n=1e3,r=6e4,s=36e5,o="millisecond",i="second",a="minute",l="hour",c="day",u="week",f="month",h="quarter",m="year",y="date",v="Invalid Date",b=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,w=/\[([^\]]+)]|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,C={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(L){var P=["th","st","nd","rd"],I=L%100;return"["+L+(P[(I-20)%10]||P[I]||P[0])+"]"}},k=function(L,P,I){var H=String(L);return!H||H.length>=P?L:""+Array(P+1-H.length).join(I)+L},E={s:k,z:function(L){var P=-L.utcOffset(),I=Math.abs(P),H=Math.floor(I/60),$=I%60;return(P<=0?"+":"-")+k(H,2,"0")+":"+k($,2,"0")},m:function L(P,I){if(P.date()<I.date())return-L(I,P);var H=12*(I.year()-P.year())+(I.month()-P.month()),$=P.clone().add(H,f),V=I-$<0,q=P.clone().add(H+(V?-1:1),f);return+(-(H+(I-$)/(V?$-q:q-$))||0)},a:function(L){return L<0?Math.ceil(L)||0:Math.floor(L)},p:function(L){return{M:f,y:m,w:u,d:c,D:y,h:l,m:a,s:i,ms:o,Q:h}[L]||String(L||"").toLowerCase().replace(/s$/,"")},u:function(L){return L===void 0}},j="en",A={};A[j]=C;var M="$isDayjsObject",_=function(L){return L instanceof z||!(!L||!L[M])},D=function L(P,I,H){var $;if(!P)return j;if(typeof P=="string"){var V=P.toLowerCase();A[V]&&($=V),I&&(A[V]=I,$=V);var q=P.split("-");if(!$&&q.length>1)return L(q[0])}else{var U=P.name;A[U]=P,$=U}return!H&&$&&(j=$),$||!H&&j},R=function(L,P){if(_(L))return L.clone();var I=typeof P=="object"?P:{};return I.date=L,I.args=arguments,new z(I)},N=E;N.l=D,N.i=_,N.w=function(L,P){return R(L,{locale:P.$L,utc:P.$u,x:P.$x,$offset:P.$offset})};var z=(function(){function L(I){this.$L=D(I.locale,null,!0),this.parse(I),this.$x=this.$x||I.x||{},this[M]=!0}var P=L.prototype;return P.parse=function(I){this.$d=(function(H){var $=H.date,V=H.utc;if($===null)return new Date(NaN);if(N.u($))return new Date;if($ instanceof Date)return new Date($);if(typeof $=="string"&&!/Z$/i.test($)){var q=$.match(b);if(q){var U=q[2]-1||0,W=(q[7]||"0").substring(0,3);return V?new Date(Date.UTC(q[1],U,q[3]||1,q[4]||0,q[5]||0,q[6]||0,W)):new Date(q[1],U,q[3]||1,q[4]||0,q[5]||0,q[6]||0,W)}}return new Date($)})(I),this.init()},P.init=function(){var I=this.$d;this.$y=I.getFullYear(),this.$M=I.getMonth(),this.$D=I.getDate(),this.$W=I.getDay(),this.$H=I.getHours(),this.$m=I.getMinutes(),this.$s=I.getSeconds(),this.$ms=I.getMilliseconds()},P.$utils=function(){return N},P.isValid=function(){return this.$d.toString()!==v},P.isSame=function(I,H){var $=R(I);return this.startOf(H)<=$&&$<=this.endOf(H)},P.isAfter=function(I,H){return R(I)<this.startOf(H)},P.isBefore=function(I,H){return this.endOf(H)<R(I)},P.$g=function(I,H,$){return N.u(I)?this[H]:this.set($,I)},P.unix=function(){return Math.floor(this.valueOf()/1e3)},P.valueOf=function(){return this.$d.getTime()},P.startOf=function(I,H){var $=this,V=!!N.u(H)||H,q=N.p(I),U=function(ne,se){var ce=N.w($.$u?Date.UTC($.$y,se,ne):new Date($.$y,se,ne),$);return V?ce:ce.endOf(c)},W=function(ne,se){return N.w($.toDate()[ne].apply($.toDate("s"),(V?[0,0,0,0]:[23,59,59,999]).slice(se)),$)},Y=this.$W,G=this.$M,K=this.$D,Q="set"+(this.$u?"UTC":"");switch(q){case m:return V?U(1,0):U(31,11);case f:return V?U(1,G):U(0,G+1);case u:var Z=this.$locale().weekStart||0,J=(Y<Z?Y+7:Y)-Z;return U(V?K-J:K+(6-J),G);case c:case y:return W(Q+"Hours",0);case l:return W(Q+"Minutes",1);case a:return W(Q+"Seconds",2);case i:return W(Q+"Milliseconds",3);default:return this.clone()}},P.endOf=function(I){return this.startOf(I,!1)},P.$set=function(I,H){var $,V=N.p(I),q="set"+(this.$u?"UTC":""),U=($={},$[c]=q+"Date",$[y]=q+"Date",$[f]=q+"Month",$[m]=q+"FullYear",$[l]=q+"Hours",$[a]=q+"Minutes",$[i]=q+"Seconds",$[o]=q+"Milliseconds",$)[V],W=V===c?this.$D+(H-this.$W):H;if(V===f||V===m){var Y=this.clone().set(y,1);Y.$d[U](W),Y.init(),this.$d=Y.set(y,Math.min(this.$D,Y.daysInMonth())).$d}else U&&this.$d[U](W);return this.init(),this},P.set=function(I,H){return this.clone().$set(I,H)},P.get=function(I){return this[N.p(I)]()},P.add=function(I,H){var $,V=this;I=Number(I);var q=N.p(H),U=function(G){var K=R(V);return N.w(K.date(K.date()+Math.round(G*I)),V)};if(q===f)return this.set(f,this.$M+I);if(q===m)return this.set(m,this.$y+I);if(q===c)return U(1);if(q===u)return U(7);var W=($={},$[a]=r,$[l]=s,$[i]=n,$)[q]||1,Y=this.$d.getTime()+I*W;return N.w(Y,this)},P.subtract=function(I,H){return this.add(-1*I,H)},P.format=function(I){var H=this,$=this.$locale();if(!this.isValid())return $.invalidDate||v;var V=I||"YYYY-MM-DDTHH:mm:ssZ",q=N.z(this),U=this.$H,W=this.$m,Y=this.$M,G=$.weekdays,K=$.months,Q=$.meridiem,Z=function(se,ce,fe,le){return se&&(se[ce]||se(H,V))||fe[ce].slice(0,le)},J=function(se){return N.s(U%12||12,se,"0")},ne=Q||function(se,ce,fe){var le=se<12?"AM":"PM";return fe?le.toLowerCase():le};return V.replace(w,(function(se,ce){return ce||(function(fe){switch(fe){case"YY":return String(H.$y).slice(-2);case"YYYY":return N.s(H.$y,4,"0");case"M":return Y+1;case"MM":return N.s(Y+1,2,"0");case"MMM":return Z($.monthsShort,Y,K,3);case"MMMM":return Z(K,Y);case"D":return H.$D;case"DD":return N.s(H.$D,2,"0");case"d":return String(H.$W);case"dd":return Z($.weekdaysMin,H.$W,G,2);case"ddd":return Z($.weekdaysShort,H.$W,G,3);case"dddd":return G[H.$W];case"H":return String(U);case"HH":return N.s(U,2,"0");case"h":return J(1);case"hh":return J(2);case"a":return ne(U,W,!0);case"A":return ne(U,W,!1);case"m":return String(W);case"mm":return N.s(W,2,"0");case"s":return String(H.$s);case"ss":return N.s(H.$s,2,"0");case"SSS":return N.s(H.$ms,3,"0");case"Z":return q}return null})(se)||q.replace(":","")}))},P.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},P.diff=function(I,H,$){var V,q=this,U=N.p(H),W=R(I),Y=(W.utcOffset()-this.utcOffset())*r,G=this-W,K=function(){return N.m(q,W)};switch(U){case m:V=K()/12;break;case f:V=K();break;case h:V=K()/3;break;case u:V=(G-Y)/6048e5;break;case c:V=(G-Y)/864e5;break;case l:V=G/s;break;case a:V=G/r;break;case i:V=G/n;break;default:V=G}return $?V:N.a(V)},P.daysInMonth=function(){return this.endOf(f).$D},P.$locale=function(){return A[this.$L]},P.locale=function(I,H){if(!I)return this.$L;var $=this.clone(),V=D(I,H,!0);return V&&($.$L=V),$},P.clone=function(){return N.w(this.$d,this)},P.toDate=function(){return new Date(this.valueOf())},P.toJSON=function(){return this.isValid()?this.toISOString():null},P.toISOString=function(){return this.$d.toISOString()},P.toString=function(){return this.$d.toUTCString()},L})(),B=z.prototype;return R.prototype=B,[["$ms",o],["$s",i],["$m",a],["$H",l],["$W",c],["$M",f],["$y",m],["$D",y]].forEach((function(L){B[L[1]]=function(P){return this.$g(P,L[0],L[1])}})),R.extend=function(L,P){return L.$i||(L(P,z,R),L.$i=!0),R},R.locale=D,R.isDayjs=_,R.unix=function(L){return R(1e3*L)},R.en=A[j],R.Ls=A,R.p={},R}))})(ix)),ix.exports}var E7e=IJ();const Ke=ks(E7e),OJ=({email:t,data:e})=>{const r=t.folders.filter(o=>o.Name==="inbox").reduce((o,i)=>{var l;const a=((l=e==null?void 0:e.find(c=>c.Id===i.Id))==null?void 0:l.UnreadCount)||0;return o+a},0),s=document.querySelector("head > link[type='image/x-icon']");if(s){const o=r>0?"/favnew.ico":"/favorite.ico";s.href!==window.location.origin+o&&(s.href=o)}};var ax={exports:{}},T7e=ax.exports,yP;function M7e(){return yP||(yP=1,(function(t,e){(function(n,r){t.exports=r()})(T7e,(function(){var n={year:0,month:1,day:2,hour:3,minute:4,second:5},r={};return function(s,o,i){var a,l=function(h,m,y){y===void 0&&(y={});var v=new Date(h),b=(function(w,C){C===void 0&&(C={});var k=C.timeZoneName||"short",E=w+"|"+k,j=r[E];return j||(j=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:w,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",timeZoneName:k}),r[E]=j),j})(m,y);return b.formatToParts(v)},c=function(h,m){for(var y=l(h,m),v=[],b=0;b<y.length;b+=1){var w=y[b],C=w.type,k=w.value,E=n[C];E>=0&&(v[E]=parseInt(k,10))}var j=v[3],A=j===24?0:j,M=v[0]+"-"+v[1]+"-"+v[2]+" "+A+":"+v[4]+":"+v[5]+":000",_=+h;return(i.utc(M).valueOf()-(_-=_%1e3))/6e4},u=o.prototype;u.tz=function(h,m){h===void 0&&(h=a);var y,v=this.utcOffset(),b=this.toDate(),w=b.toLocaleString("en-US",{timeZone:h}),C=Math.round((b-new Date(w))/1e3/60),k=15*-Math.round(b.getTimezoneOffset()/15)-C;if(!Number(k))y=this.utcOffset(0,m);else if(y=i(w,{locale:this.$L}).$set("millisecond",this.$ms).utcOffset(k,!0),m){var E=y.utcOffset();y=y.add(v-E,"minute")}return y.$x.$timezone=h,y},u.offsetName=function(h){var m=this.$x.$timezone||i.tz.guess(),y=l(this.valueOf(),m,{timeZoneName:h}).find((function(v){return v.type.toLowerCase()==="timezonename"}));return y&&y.value};var f=u.startOf;u.startOf=function(h,m){if(!this.$x||!this.$x.$timezone)return f.call(this,h,m);var y=i(this.format("YYYY-MM-DD HH:mm:ss:SSS"),{locale:this.$L});return f.call(y,h,m).tz(this.$x.$timezone,!0)},i.tz=function(h,m,y){var v=y&&m,b=y||m||a,w=c(+i(),b);if(typeof h!="string")return i(h).tz(b);var C=(function(A,M,_){var D=A-60*M*1e3,R=c(D,_);if(M===R)return[D,M];var N=c(D-=60*(R-M)*1e3,_);return R===N?[D,R]:[A-60*Math.min(R,N)*1e3,Math.max(R,N)]})(i.utc(h,v).valueOf(),w,b),k=C[0],E=C[1],j=i(k).utcOffset(E);return j.$x.$timezone=b,j},i.tz.guess=function(){return Intl.DateTimeFormat().resolvedOptions().timeZone},i.tz.setDefault=function(h){a=h}}}))})(ax)),ax.exports}var j7e=M7e();const NJ=ks(j7e);var lx={exports:{}},A7e=lx.exports,vP;function _7e(){return vP||(vP=1,(function(t,e){(function(n,r){t.exports=r()})(A7e,(function(){var n="minute",r=/[+-]\d\d(?::?\d\d)?/g,s=/([+-]|\d\d)/g;return function(o,i,a){var l=i.prototype;a.utc=function(v){var b={date:v,utc:!0,args:arguments};return new i(b)},l.utc=function(v){var b=a(this.toDate(),{locale:this.$L,utc:!0});return v?b.add(this.utcOffset(),n):b},l.local=function(){return a(this.toDate(),{locale:this.$L,utc:!1})};var c=l.parse;l.parse=function(v){v.utc&&(this.$u=!0),this.$utils().u(v.$offset)||(this.$offset=v.$offset),c.call(this,v)};var u=l.init;l.init=function(){if(this.$u){var v=this.$d;this.$y=v.getUTCFullYear(),this.$M=v.getUTCMonth(),this.$D=v.getUTCDate(),this.$W=v.getUTCDay(),this.$H=v.getUTCHours(),this.$m=v.getUTCMinutes(),this.$s=v.getUTCSeconds(),this.$ms=v.getUTCMilliseconds()}else u.call(this)};var f=l.utcOffset;l.utcOffset=function(v,b){var w=this.$utils().u;if(w(v))return this.$u?0:w(this.$offset)?f.call(this):this.$offset;if(typeof v=="string"&&(v=(function(j){j===void 0&&(j="");var A=j.match(r);if(!A)return null;var M=(""+A[0]).match(s)||["-",0,0],_=M[0],D=60*+M[1]+ +M[2];return D===0?0:_==="+"?D:-D})(v),v===null))return this;var C=Math.abs(v)<=16?60*v:v;if(C===0)return this.utc(b);var k=this.clone();if(b)return k.$offset=C,k.$u=!1,k;var E=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();return(k=this.local().add(C+E,n)).$offset=C,k.$x.$localOffset=E,k};var h=l.format;l.format=function(v){var b=v||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return h.call(this,b)},l.valueOf=function(){var v=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*v},l.isUTC=function(){return!!this.$u},l.toISOString=function(){return this.toDate().toISOString()},l.toString=function(){return this.toDate().toUTCString()};var m=l.toDate;l.toDate=function(v){return v==="s"&&this.$offset?a(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():m.call(this)};var y=l.diff;l.diff=function(v,b,w){if(v&&this.$u===v.$u)return y.call(this,v,b,w);var C=this.local(),k=a(v).local();return y.call(C,k,b,w)}}}))})(lx)),lx.exports}var R7e=_7e();const LJ=ks(R7e);Ke.extend(LJ);Ke.extend(NJ);const D7e=t=>{let e={};return t.forEach((n,r)=>{const o=Ke().tz(n.TzIdName).utcOffset(),i=o>=0?"+":"-",a=Math.abs(o),l=Math.floor(a/60),c=a%60,u=`UTC${i}${String(l).padStart(2,"0")}:${String(c).padStart(2,"0")}`;e[n.Id||r]={value:String(n.Id||r),label:`(${u}) ${Ih(`timezones.${n.TzIdName}`)}`,utc:n.UtcOffset,utcOffsetMinutes:n.UtcOffsetMinutes,tzName:n.TzIdName}}),{timeZones:e}},I7e=()=>Ct("v1/user"),cx=pn("user/getCurrentUserThunk",async()=>(await I7e()).data),O7e={currentUser:null,currentUserStatus:"initial"},$J=oi({name:"user",initialState:O7e,reducers:{setCurrentUser:(t,e)=>{t.currentUser=e.payload}},extraReducers:t=>t.addCase(cx.pending,(e,n)=>{e.currentUserStatus="pending"}).addCase(cx.fulfilled,(e,n)=>{e.currentUserStatus="fulfilled",e.currentUser=n.payload}).addCase(cx.rejected,(e,n)=>{e.currentUserStatus="rejected"})}),N7e=$J.reducer,{setCurrentUser:Opt}=$J.actions,Md=t=>t.user.currentUser,L7e=t=>t.user.currentUserStatus,$7e={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"}},F7e=(t,e,n)=>{let r;const s=$7e[t];return typeof s=="string"?r=s:e===1?r=s.one:r=s.other.replace("{{count}}",e.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};function Lh(t){return(e={})=>{const n=e.width?String(e.width):t.defaultWidth;return t.formats[n]||t.formats[t.defaultWidth]}}const z7e={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},P7e={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},B7e={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},H7e={date:Lh({formats:z7e,defaultWidth:"full"}),time:Lh({formats:P7e,defaultWidth:"full"}),dateTime:Lh({formats:B7e,defaultWidth:"full"})},U7e={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},V7e=(t,e,n,r)=>U7e[t];function ul(t){return(e,n)=>{const r=n!=null&&n.context?String(n.context):"standalone";let s;if(r==="formatting"&&t.formattingValues){const i=t.defaultFormattingWidth||t.defaultWidth,a=n!=null&&n.width?String(n.width):i;s=t.formattingValues[a]||t.formattingValues[i]}else{const i=t.defaultWidth,a=n!=null&&n.width?String(n.width):t.defaultWidth;s=t.values[a]||t.values[i]}const o=t.argumentCallback?t.argumentCallback(e):e;return s[o]}}const q7e={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},W7e={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},Y7e={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"]},G7e={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"]},K7e={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"}},X7e={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"}},Z7e=(t,e)=>{const n=Number(t),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},Q7e={ordinalNumber:Z7e,era:ul({values:q7e,defaultWidth:"wide"}),quarter:ul({values:W7e,defaultWidth:"wide",argumentCallback:t=>t-1}),month:ul({values:Y7e,defaultWidth:"wide"}),day:ul({values:G7e,defaultWidth:"wide"}),dayPeriod:ul({values:K7e,defaultWidth:"wide",formattingValues:X7e,defaultFormattingWidth:"wide"})};function dl(t){return(e,n={})=>{const r=n.width,s=r&&t.matchPatterns[r]||t.matchPatterns[t.defaultMatchWidth],o=e.match(s);if(!o)return null;const i=o[0],a=r&&t.parsePatterns[r]||t.parsePatterns[t.defaultParseWidth],l=Array.isArray(a)?eEe(a,f=>f.test(i)):J7e(a,f=>f.test(i));let c;c=t.valueCallback?t.valueCallback(l):l,c=n.valueCallback?n.valueCallback(c):c;const u=e.slice(i.length);return{value:c,rest:u}}}function J7e(t,e){for(const n in t)if(Object.prototype.hasOwnProperty.call(t,n)&&e(t[n]))return n}function eEe(t,e){for(let n=0;n<t.length;n++)if(e(t[n]))return n}function FJ(t){return(e,n={})=>{const r=e.match(t.matchPattern);if(!r)return null;const s=r[0],o=e.match(t.parsePattern);if(!o)return null;let i=t.valueCallback?t.valueCallback(o[0]):o[0];i=n.valueCallback?n.valueCallback(i):i;const a=e.slice(s.length);return{value:i,rest:a}}}const tEe=/^(\d+)(th|st|nd|rd)?/i,nEe=/\d+/i,rEe={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},sEe={any:[/^b/i,/^(a|c)/i]},oEe={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},iEe={any:[/1/i,/2/i,/3/i,/4/i]},aEe={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},lEe={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]},cEe={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},uEe={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]},dEe={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},fEe={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}},pEe={ordinalNumber:FJ({matchPattern:tEe,parsePattern:nEe,valueCallback:t=>parseInt(t,10)}),era:dl({matchPatterns:rEe,defaultMatchWidth:"wide",parsePatterns:sEe,defaultParseWidth:"any"}),quarter:dl({matchPatterns:oEe,defaultMatchWidth:"wide",parsePatterns:iEe,defaultParseWidth:"any",valueCallback:t=>t+1}),month:dl({matchPatterns:aEe,defaultMatchWidth:"wide",parsePatterns:lEe,defaultParseWidth:"any"}),day:dl({matchPatterns:cEe,defaultMatchWidth:"wide",parsePatterns:uEe,defaultParseWidth:"any"}),dayPeriod:dl({matchPatterns:dEe,defaultMatchWidth:"any",parsePatterns:fEe,defaultParseWidth:"any"})},zJ={code:"en-US",formatDistance:F7e,formatLong:H7e,formatRelative:V7e,localize:Q7e,match:pEe,options:{weekStartsOn:0,firstWeekContainsDate:1}};let hEe={};function z2(){return hEe}const PJ=6048e5,mEe=864e5,bP=Symbol.for("constructDateFrom");function cd(t,e){return typeof t=="function"?t(e):t&&typeof t=="object"&&bP in t?t[bP](e):t instanceof Date?new t.constructor(e):new Date(e)}function Ua(t,e){return cd(e||t,t)}function xP(t){const e=Ua(t),n=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return n.setUTCFullYear(e.getFullYear()),+t-+n}function BJ(t,...e){const n=cd.bind(null,t||e.find(r=>typeof r=="object"));return e.map(n)}function wP(t,e){const n=Ua(t,e==null?void 0:e.in);return n.setHours(0,0,0,0),n}function gEe(t,e,n){const[r,s]=BJ(n==null?void 0:n.in,t,e),o=wP(r),i=wP(s),a=+o-xP(o),l=+i-xP(i);return Math.round((a-l)/mEe)}function yEe(t,e){const n=Ua(t,e==null?void 0:e.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}function vEe(t,e){const n=Ua(t,e==null?void 0:e.in);return gEe(n,yEe(n))+1}function Hf(t,e){var a,l,c,u;const n=z2(),r=(e==null?void 0:e.weekStartsOn)??((l=(a=e==null?void 0:e.locale)==null?void 0:a.options)==null?void 0:l.weekStartsOn)??n.weekStartsOn??((u=(c=n.locale)==null?void 0:c.options)==null?void 0:u.weekStartsOn)??0,s=Ua(t,e==null?void 0:e.in),o=s.getDay(),i=(o<r?7:0)+o-r;return s.setDate(s.getDate()-i),s.setHours(0,0,0,0),s}function b3(t,e){return Hf(t,{...e,weekStartsOn:1})}function HJ(t,e){const n=Ua(t,e==null?void 0:e.in),r=n.getFullYear(),s=cd(n,0);s.setFullYear(r+1,0,4),s.setHours(0,0,0,0);const o=b3(s),i=cd(n,0);i.setFullYear(r,0,4),i.setHours(0,0,0,0);const a=b3(i);return n.getTime()>=o.getTime()?r+1:n.getTime()>=a.getTime()?r:r-1}function bEe(t,e){const n=HJ(t,e),r=cd(t,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),b3(r)}function xEe(t,e){const n=Ua(t,e==null?void 0:e.in),r=+b3(n)-+bEe(n);return Math.round(r/PJ)+1}function UJ(t,e){var u,f,h,m;const n=Ua(t,e==null?void 0:e.in),r=n.getFullYear(),s=z2(),o=(e==null?void 0:e.firstWeekContainsDate)??((f=(u=e==null?void 0:e.locale)==null?void 0:u.options)==null?void 0:f.firstWeekContainsDate)??s.firstWeekContainsDate??((m=(h=s.locale)==null?void 0:h.options)==null?void 0:m.firstWeekContainsDate)??1,i=cd((e==null?void 0:e.in)||t,0);i.setFullYear(r+1,0,o),i.setHours(0,0,0,0);const a=Hf(i,e),l=cd((e==null?void 0:e.in)||t,0);l.setFullYear(r,0,o),l.setHours(0,0,0,0);const c=Hf(l,e);return+n>=+a?r+1:+n>=+c?r:r-1}function wEe(t,e){var a,l,c,u;const n=z2(),r=(e==null?void 0:e.firstWeekContainsDate)??((l=(a=e==null?void 0:e.locale)==null?void 0:a.options)==null?void 0:l.firstWeekContainsDate)??n.firstWeekContainsDate??((u=(c=n.locale)==null?void 0:c.options)==null?void 0:u.firstWeekContainsDate)??1,s=UJ(t,e),o=cd((e==null?void 0:e.in)||t,0);return o.setFullYear(s,0,r),o.setHours(0,0,0,0),Hf(o,e)}function SEe(t,e){const n=Ua(t,e==null?void 0:e.in),r=+Hf(n,e)-+wEe(n,e);return Math.round(r/PJ)+1}function lr(t,e){const n=t<0?"-":"",r=Math.abs(t).toString().padStart(e,"0");return n+r}const Cu={y(t,e){const n=t.getFullYear(),r=n>0?n:1-n;return lr(e==="yy"?r%100:r,e.length)},M(t,e){const n=t.getMonth();return e==="M"?String(n+1):lr(n+1,2)},d(t,e){return lr(t.getDate(),e.length)},a(t,e){const n=t.getHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h(t,e){return lr(t.getHours()%12||12,e.length)},H(t,e){return lr(t.getHours(),e.length)},m(t,e){return lr(t.getMinutes(),e.length)},s(t,e){return lr(t.getSeconds(),e.length)},S(t,e){const n=e.length,r=t.getMilliseconds(),s=Math.trunc(r*Math.pow(10,n-3));return lr(s,e.length)}},oh={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},SP={G:function(t,e,n){const r=t.getFullYear()>0?1:0;switch(e){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});case"GGGG":default:return n.era(r,{width:"wide"})}},y:function(t,e,n){if(e==="yo"){const r=t.getFullYear(),s=r>0?r:1-r;return n.ordinalNumber(s,{unit:"year"})}return Cu.y(t,e)},Y:function(t,e,n,r){const s=UJ(t,r),o=s>0?s:1-s;if(e==="YY"){const i=o%100;return lr(i,2)}return e==="Yo"?n.ordinalNumber(o,{unit:"year"}):lr(o,e.length)},R:function(t,e){const n=HJ(t);return lr(n,e.length)},u:function(t,e){const n=t.getFullYear();return lr(n,e.length)},Q:function(t,e,n){const r=Math.ceil((t.getMonth()+1)/3);switch(e){case"Q":return String(r);case"QQ":return lr(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(t,e,n){const r=Math.ceil((t.getMonth()+1)/3);switch(e){case"q":return String(r);case"qq":return lr(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(t,e,n){const r=t.getMonth();switch(e){case"M":case"MM":return Cu.M(t,e);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(t,e,n){const r=t.getMonth();switch(e){case"L":return String(r+1);case"LL":return lr(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(t,e,n,r){const s=SEe(t,r);return e==="wo"?n.ordinalNumber(s,{unit:"week"}):lr(s,e.length)},I:function(t,e,n){const r=xEe(t);return e==="Io"?n.ordinalNumber(r,{unit:"week"}):lr(r,e.length)},d:function(t,e,n){return e==="do"?n.ordinalNumber(t.getDate(),{unit:"date"}):Cu.d(t,e)},D:function(t,e,n){const r=vEe(t);return e==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):lr(r,e.length)},E:function(t,e,n){const r=t.getDay();switch(e){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});case"EEEE":default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(t,e,n,r){const s=t.getDay(),o=(s-r.weekStartsOn+8)%7||7;switch(e){case"e":return String(o);case"ee":return lr(o,2);case"eo":return n.ordinalNumber(o,{unit:"day"});case"eee":return n.day(s,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(s,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(s,{width:"short",context:"formatting"});case"eeee":default:return n.day(s,{width:"wide",context:"formatting"})}},c:function(t,e,n,r){const s=t.getDay(),o=(s-r.weekStartsOn+8)%7||7;switch(e){case"c":return String(o);case"cc":return lr(o,e.length);case"co":return n.ordinalNumber(o,{unit:"day"});case"ccc":return n.day(s,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(s,{width:"narrow",context:"standalone"});case"cccccc":return n.day(s,{width:"short",context:"standalone"});case"cccc":default:return n.day(s,{width:"wide",context:"standalone"})}},i:function(t,e,n){const r=t.getDay(),s=r===0?7:r;switch(e){case"i":return String(s);case"ii":return lr(s,e.length);case"io":return n.ordinalNumber(s,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});case"iiii":default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(t,e,n){const s=t.getHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return n.dayPeriod(s,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(s,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(s,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(s,{width:"wide",context:"formatting"})}},b:function(t,e,n){const r=t.getHours();let s;switch(r===12?s=oh.noon:r===0?s=oh.midnight:s=r/12>=1?"pm":"am",e){case"b":case"bb":return n.dayPeriod(s,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(s,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(s,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(s,{width:"wide",context:"formatting"})}},B:function(t,e,n){const r=t.getHours();let s;switch(r>=17?s=oh.evening:r>=12?s=oh.afternoon:r>=4?s=oh.morning:s=oh.night,e){case"B":case"BB":case"BBB":return n.dayPeriod(s,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(s,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(s,{width:"wide",context:"formatting"})}},h:function(t,e,n){if(e==="ho"){let r=t.getHours()%12;return r===0&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return Cu.h(t,e)},H:function(t,e,n){return e==="Ho"?n.ordinalNumber(t.getHours(),{unit:"hour"}):Cu.H(t,e)},K:function(t,e,n){const r=t.getHours()%12;return e==="Ko"?n.ordinalNumber(r,{unit:"hour"}):lr(r,e.length)},k:function(t,e,n){let r=t.getHours();return r===0&&(r=24),e==="ko"?n.ordinalNumber(r,{unit:"hour"}):lr(r,e.length)},m:function(t,e,n){return e==="mo"?n.ordinalNumber(t.getMinutes(),{unit:"minute"}):Cu.m(t,e)},s:function(t,e,n){return e==="so"?n.ordinalNumber(t.getSeconds(),{unit:"second"}):Cu.s(t,e)},S:function(t,e){return Cu.S(t,e)},X:function(t,e,n){const r=t.getTimezoneOffset();if(r===0)return"Z";switch(e){case"X":return kP(r);case"XXXX":case"XX":return of(r);case"XXXXX":case"XXX":default:return of(r,":")}},x:function(t,e,n){const r=t.getTimezoneOffset();switch(e){case"x":return kP(r);case"xxxx":case"xx":return of(r);case"xxxxx":case"xxx":default:return of(r,":")}},O:function(t,e,n){const r=t.getTimezoneOffset();switch(e){case"O":case"OO":case"OOO":return"GMT"+CP(r,":");case"OOOO":default:return"GMT"+of(r,":")}},z:function(t,e,n){const r=t.getTimezoneOffset();switch(e){case"z":case"zz":case"zzz":return"GMT"+CP(r,":");case"zzzz":default:return"GMT"+of(r,":")}},t:function(t,e,n){const r=Math.trunc(+t/1e3);return lr(r,e.length)},T:function(t,e,n){return lr(+t,e.length)}};function CP(t,e=""){const n=t>0?"-":"+",r=Math.abs(t),s=Math.trunc(r/60),o=r%60;return o===0?n+String(s):n+String(s)+e+lr(o,2)}function kP(t,e){return t%60===0?(t>0?"-":"+")+lr(Math.abs(t)/60,2):of(t,e)}function of(t,e=""){const n=t>0?"-":"+",r=Math.abs(t),s=lr(Math.trunc(r/60),2),o=lr(r%60,2);return n+s+e+o}const EP=(t,e)=>{switch(t){case"P":return e.date({width:"short"});case"PP":return e.date({width:"medium"});case"PPP":return e.date({width:"long"});case"PPPP":default:return e.date({width:"full"})}},VJ=(t,e)=>{switch(t){case"p":return e.time({width:"short"});case"pp":return e.time({width:"medium"});case"ppp":return e.time({width:"long"});case"pppp":default:return e.time({width:"full"})}},CEe=(t,e)=>{const n=t.match(/(P+)(p+)?/)||[],r=n[1],s=n[2];if(!s)return EP(t,e);let o;switch(r){case"P":o=e.dateTime({width:"short"});break;case"PP":o=e.dateTime({width:"medium"});break;case"PPP":o=e.dateTime({width:"long"});break;case"PPPP":default:o=e.dateTime({width:"full"});break}return o.replace("{{date}}",EP(r,e)).replace("{{time}}",VJ(s,e))},kEe={p:VJ,P:CEe},EEe=/^D+$/,TEe=/^Y+$/,MEe=["D","DD","YY","YYYY"];function jEe(t){return EEe.test(t)}function AEe(t){return TEe.test(t)}function _Ee(t,e,n){const r=REe(t,e,n);if(console.warn(r),MEe.includes(t))throw new RangeError(r)}function REe(t,e,n){const r=t[0]==="Y"?"years":"days of the month";return`Use \`${t.toLowerCase()}\` instead of \`${t}\` (in \`${e}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}function DEe(t){return t instanceof Date||typeof t=="object"&&Object.prototype.toString.call(t)==="[object Date]"}function IEe(t){return!(!DEe(t)&&typeof t!="number"||isNaN(+Ua(t)))}const OEe=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,NEe=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,LEe=/^'([^]*?)'?$/,$Ee=/''/g,FEe=/[a-zA-Z]/;function zEe(t,e,n){var u,f,h,m,y,v,b,w;const r=z2(),s=(n==null?void 0:n.locale)??r.locale??zJ,o=(n==null?void 0:n.firstWeekContainsDate)??((f=(u=n==null?void 0:n.locale)==null?void 0:u.options)==null?void 0:f.firstWeekContainsDate)??r.firstWeekContainsDate??((m=(h=r.locale)==null?void 0:h.options)==null?void 0:m.firstWeekContainsDate)??1,i=(n==null?void 0:n.weekStartsOn)??((v=(y=n==null?void 0:n.locale)==null?void 0:y.options)==null?void 0:v.weekStartsOn)??r.weekStartsOn??((w=(b=r.locale)==null?void 0:b.options)==null?void 0:w.weekStartsOn)??0,a=Ua(t,n==null?void 0:n.in);if(!IEe(a))throw new RangeError("Invalid time value");let l=e.match(NEe).map(C=>{const k=C[0];if(k==="p"||k==="P"){const E=kEe[k];return E(C,s.formatLong)}return C}).join("").match(OEe).map(C=>{if(C==="''")return{isToken:!1,value:"'"};const k=C[0];if(k==="'")return{isToken:!1,value:PEe(C)};if(SP[k])return{isToken:!0,value:C};if(k.match(FEe))throw new RangeError("Format string contains an unescaped latin alphabet character `"+k+"`");return{isToken:!1,value:C}});s.localize.preprocessor&&(l=s.localize.preprocessor(a,l));const c={firstWeekContainsDate:o,weekStartsOn:i,locale:s};return l.map(C=>{if(!C.isToken)return C.value;const k=C.value;(!(n!=null&&n.useAdditionalWeekYearTokens)&&AEe(k)||!(n!=null&&n.useAdditionalDayOfYearTokens)&&jEe(k))&&_Ee(k,e,String(t));const E=SP[k[0]];return E(a,k,s.localize,c)}).join("")}function PEe(t){const e=t.match(LEe);return e?e[1].replace($Ee,"'"):t}function BEe(){return Object.assign({},z2())}function TP(t,e,n){const[r,s]=BJ(n==null?void 0:n.in,t,e);return+Hf(r,n)==+Hf(s,n)}function MP(t,e,n){const r=BEe(),s=VEe(t,n.timeZone,n.locale??r.locale);return"formatToParts"in s?HEe(s,e):UEe(s,e)}function HEe(t,e){const n=t.formatToParts(e);for(let r=n.length-1;r>=0;--r)if(n[r].type==="timeZoneName")return n[r].value}function UEe(t,e){const n=t.format(e).replace(/\u200E/g,""),r=/ [\w-+ ]+$/.exec(n);return r?r[0].substr(1):""}function VEe(t,e,n){return new Intl.DateTimeFormat(n?[n.code,"en-US"]:void 0,{timeZone:e,timeZoneName:t})}function qEe(t,e){const n=XEe(e);return"formatToParts"in n?YEe(n,t):GEe(n,t)}const WEe={year:0,month:1,day:2,hour:3,minute:4,second:5};function YEe(t,e){try{const n=t.formatToParts(e),r=[];for(let s=0;s<n.length;s++){const o=WEe[n[s].type];o!==void 0&&(r[o]=parseInt(n[s].value,10))}return r}catch(n){if(n instanceof RangeError)return[NaN];throw n}}function GEe(t,e){const n=t.format(e),r=/(\d+)\/(\d+)\/(\d+),? (\d+):(\d+):(\d+)/.exec(n);return[parseInt(r[3],10),parseInt(r[1],10),parseInt(r[2],10),parseInt(r[4],10),parseInt(r[5],10),parseInt(r[6],10)]}const xk={},jP=new Intl.DateTimeFormat("en-US",{hourCycle:"h23",timeZone:"America/New_York",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"}).format(new Date("2014-06-25T04:00:00.123Z")),KEe=jP==="06/25/2014, 00:00:00"||jP==="‎06‎/‎25‎/‎2014‎ ‎00‎:‎00‎:‎00";function XEe(t){return xk[t]||(xk[t]=KEe?new Intl.DateTimeFormat("en-US",{hourCycle:"h23",timeZone:t,year:"numeric",month:"numeric",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"}):new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:t,year:"numeric",month:"numeric",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"})),xk[t]}function qJ(t,e,n,r,s,o,i){const a=new Date(0);return a.setUTCFullYear(t,e,n),a.setUTCHours(r,s,o,i),a}const AP=36e5,ZEe=6e4,wk={timezoneZ:/^(Z)$/,timezoneHH:/^([+-]\d{2})$/,timezoneHHMM:/^([+-])(\d{2}):?(\d{2})$/};function eS(t,e,n){if(!t)return 0;let r=wk.timezoneZ.exec(t);if(r)return 0;let s,o;if(r=wk.timezoneHH.exec(t),r)return s=parseInt(r[1],10),_P(s)?-(s*AP):NaN;if(r=wk.timezoneHHMM.exec(t),r){s=parseInt(r[2],10);const i=parseInt(r[3],10);return _P(s,i)?(o=Math.abs(s)*AP+i*ZEe,r[1]==="+"?-o:o):NaN}if(eTe(t)){e=new Date(e||Date.now());const i=n?e:QEe(e),a=mT(i,t);return-(n?a:JEe(e,a,t))}return NaN}function QEe(t){return qJ(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds())}function mT(t,e){const n=qEe(t,e),r=qJ(n[0],n[1]-1,n[2],n[3]%24,n[4],n[5],0).getTime();let s=t.getTime();const o=s%1e3;return s-=o>=0?o:1e3+o,r-s}function JEe(t,e,n){let s=t.getTime()-e;const o=mT(new Date(s),n);if(e===o)return e;s-=o-e;const i=mT(new Date(s),n);return o===i?o:Math.max(o,i)}function _P(t,e){return-23<=t&&t<=23&&(e==null||0<=e&&e<=59)}const RP={};function eTe(t){if(RP[t])return!0;try{return new Intl.DateTimeFormat(void 0,{timeZone:t}),RP[t]=!0,!0}catch{return!1}}const tTe=60*1e3,nTe={X:function(t,e,n){const r=Sk(n.timeZone,t);if(r===0)return"Z";switch(e){case"X":return DP(r);case"XXXX":case"XX":return yh(r);case"XXXXX":case"XXX":default:return yh(r,":")}},x:function(t,e,n){const r=Sk(n.timeZone,t);switch(e){case"x":return DP(r);case"xxxx":case"xx":return yh(r);case"xxxxx":case"xxx":default:return yh(r,":")}},O:function(t,e,n){const r=Sk(n.timeZone,t);switch(e){case"O":case"OO":case"OOO":return"GMT"+rTe(r,":");case"OOOO":default:return"GMT"+yh(r,":")}},z:function(t,e,n){switch(e){case"z":case"zz":case"zzz":return MP("short",t,n);case"zzzz":default:return MP("long",t,n)}}};function Sk(t,e){const n=t?eS(t,e,!0)/tTe:(e==null?void 0:e.getTimezoneOffset())??0;if(Number.isNaN(n))throw new RangeError("Invalid time zone specified: "+t);return n}function x3(t,e){const n=t<0?"-":"";let r=Math.abs(t).toString();for(;r.length<e;)r="0"+r;return n+r}function yh(t,e=""){const n=t>0?"-":"+",r=Math.abs(t),s=x3(Math.floor(r/60),2),o=x3(Math.floor(r%60),2);return n+s+e+o}function DP(t,e){return t%60===0?(t>0?"-":"+")+x3(Math.abs(t)/60,2):yh(t,e)}function rTe(t,e=""){const n=t>0?"-":"+",r=Math.abs(t),s=Math.floor(r/60),o=r%60;return o===0?n+String(s):n+String(s)+e+x3(o,2)}function IP(t){const e=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return e.setUTCFullYear(t.getFullYear()),+t-+e}const sTe=/(Z|[+-]\d{2}(?::?\d{2})?| UTC| [a-zA-Z]+\/[a-zA-Z_]+(?:\/[a-zA-Z_]+)?)$/,Ck=36e5,OP=6e4,oTe=2,To={dateTimePattern:/^([0-9W+-]+)(T| )(.*)/,datePattern:/^([0-9W+-]+)(.*)/,YY:/^(\d{2})$/,YYY:[/^([+-]\d{2})$/,/^([+-]\d{3})$/,/^([+-]\d{4})$/],YYYY:/^(\d{4})/,YYYYY:[/^([+-]\d{4})/,/^([+-]\d{5})/,/^([+-]\d{6})/],MM:/^-(\d{2})$/,DDD:/^-?(\d{3})$/,MMDD:/^-?(\d{2})-?(\d{2})$/,Www:/^-?W(\d{2})$/,WwwD:/^-?W(\d{2})-?(\d{1})$/,HH:/^(\d{2}([.,]\d*)?)$/,HHMM:/^(\d{2}):?(\d{2}([.,]\d*)?)$/,HHMMSS:/^(\d{2}):?(\d{2}):?(\d{2}([.,]\d*)?)$/,timeZone:sTe};function WJ(t,e={}){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");if(t===null)return new Date(NaN);const n=e.additionalDigits==null?oTe:Number(e.additionalDigits);if(n!==2&&n!==1&&n!==0)throw new RangeError("additionalDigits must be 0, 1 or 2");if(t instanceof Date||typeof t=="object"&&Object.prototype.toString.call(t)==="[object Date]")return new Date(t.getTime());if(typeof t=="number"||Object.prototype.toString.call(t)==="[object Number]")return new Date(t);if(Object.prototype.toString.call(t)!=="[object String]")return new Date(NaN);const r=iTe(t),{year:s,restDateString:o}=aTe(r.date,n),i=lTe(o,s);if(i===null||isNaN(i.getTime()))return new Date(NaN);if(i){const a=i.getTime();let l=0,c;if(r.time&&(l=cTe(r.time),l===null||isNaN(l)))return new Date(NaN);if(r.timeZone||e.timeZone){if(c=eS(r.timeZone||e.timeZone,new Date(a+l)),isNaN(c))return new Date(NaN)}else c=IP(new Date(a+l)),c=IP(new Date(a+l+c));return new Date(a+l+c)}else return new Date(NaN)}function iTe(t){const e={};let n=To.dateTimePattern.exec(t),r;if(n?(e.date=n[1],r=n[3]):(n=To.datePattern.exec(t),n?(e.date=n[1],r=n[2]):(e.date=null,r=t)),r){const s=To.timeZone.exec(r);s?(e.time=r.replace(s[1],""),e.timeZone=s[1].trim()):e.time=r}return e}function aTe(t,e){if(t){const n=To.YYY[e],r=To.YYYYY[e];let s=To.YYYY.exec(t)||r.exec(t);if(s){const o=s[1];return{year:parseInt(o,10),restDateString:t.slice(o.length)}}if(s=To.YY.exec(t)||n.exec(t),s){const o=s[1];return{year:parseInt(o,10)*100,restDateString:t.slice(o.length)}}}return{year:null}}function lTe(t,e){if(e===null)return null;let n,r,s;if(!t||!t.length)return n=new Date(0),n.setUTCFullYear(e),n;let o=To.MM.exec(t);if(o)return n=new Date(0),r=parseInt(o[1],10)-1,LP(e,r)?(n.setUTCFullYear(e,r),n):new Date(NaN);if(o=To.DDD.exec(t),o){n=new Date(0);const i=parseInt(o[1],10);return fTe(e,i)?(n.setUTCFullYear(e,0,i),n):new Date(NaN)}if(o=To.MMDD.exec(t),o){n=new Date(0),r=parseInt(o[1],10)-1;const i=parseInt(o[2],10);return LP(e,r,i)?(n.setUTCFullYear(e,r,i),n):new Date(NaN)}if(o=To.Www.exec(t),o)return s=parseInt(o[1],10)-1,$P(s)?NP(e,s):new Date(NaN);if(o=To.WwwD.exec(t),o){s=parseInt(o[1],10)-1;const i=parseInt(o[2],10)-1;return $P(s,i)?NP(e,s,i):new Date(NaN)}return null}function cTe(t){let e,n,r=To.HH.exec(t);if(r)return e=parseFloat(r[1].replace(",",".")),kk(e)?e%24*Ck:NaN;if(r=To.HHMM.exec(t),r)return e=parseInt(r[1],10),n=parseFloat(r[2].replace(",",".")),kk(e,n)?e%24*Ck+n*OP:NaN;if(r=To.HHMMSS.exec(t),r){e=parseInt(r[1],10),n=parseInt(r[2],10);const s=parseFloat(r[3].replace(",","."));return kk(e,n,s)?e%24*Ck+n*OP+s*1e3:NaN}return null}function NP(t,e,n){e=e||0,n=n||0;const r=new Date(0);r.setUTCFullYear(t,0,4);const s=r.getUTCDay()||7,o=e*7+n+1-s;return r.setUTCDate(r.getUTCDate()+o),r}const uTe=[31,28,31,30,31,30,31,31,30,31,30,31],dTe=[31,29,31,30,31,30,31,31,30,31,30,31];function YJ(t){return t%400===0||t%4===0&&t%100!==0}function LP(t,e,n){if(e<0||e>11)return!1;if(n!=null){if(n<1)return!1;const r=YJ(t);if(r&&n>dTe[e]||!r&&n>uTe[e])return!1}return!0}function fTe(t,e){if(e<1)return!1;const n=YJ(t);return!(n&&e>366||!n&&e>365)}function $P(t,e){return!(t<0||t>52||e!=null&&(e<0||e>6))}function kk(t,e,n){return!(t<0||t>=25||e!=null&&(e<0||e>=60)||n!=null&&(n<0||n>=60))}const pTe=/([xXOz]+)|''|'(''|[^'])+('|$)/g;function Ek(t,e,n={}){e=String(e);const r=e.match(pTe);if(r){const s=WJ(n.originalDate||t,n);e=r.reduce(function(o,i){if(i[0]==="'")return o;const a=o.indexOf(i),l=o[a-1]==="'",c=o.replace(i,"'"+nTe[i[0]](s,i,n)+"'");return l?c.substring(0,a-1)+c.substring(a+1):c},e)}return zEe(t,e,n)}function hTe(t,e,n){t=WJ(t,n);const r=eS(e,t,!0),s=new Date(t.getTime()-r),o=new Date(0);return o.setFullYear(s.getUTCFullYear(),s.getUTCMonth(),s.getUTCDate()),o.setHours(s.getUTCHours(),s.getUTCMinutes(),s.getUTCSeconds(),s.getUTCMilliseconds()),o}function mTe(t,e){return-eS(t,e)}const _u=t=>{if(t){const e=String(t.getHours()).padStart(2,"0"),n=String(t.getMinutes()).padStart(2,"0");return`${e}:${n}`}return null},w3=()=>{const t=[];for(let e=0;e<24;e++){let n=e<10?"0"+e:e;t.push(`${n}:00`),t.push(`${n}:30`)}return t},A0=(t,e)=>!e||!t?0:mTe(e,t)+new Date().getTimezoneOffset()*60*1e3,FP=(t,e)=>{const n=new Date(t);return new Date(n.getTime()-A0(n,e)).toISOString()},zP=(t,e,n,r=O8e)=>{const s=Date.now(),o=n.find(i=>i.Contact.Email===t);return o!=null&&o.timestamp&&s-o.timestamp<r?o:e==null?void 0:e.find(i=>i.Contact.Email===t)};function gTe(t,e){const n=new URL(t).origin,r=new URL("/doc.html",n);return r.searchParams.set("uid",e),r.toString()}function Ms(t){if(!t)return null;if(t instanceof Date)return isNaN(t.getTime())?null:t;const e=t.match(/^(\d{4})-(\d{2})-(\d{2})$/);if(e){const[,r,s,o]=e,i=new Date(Number(r),Number(s)-1,Number(o));return isNaN(i.getTime())?null:i}const n=new Date(t);return isNaN(n.getTime())?null:n}function V_(t,e){const n=new Set,r=[];for(const s of t){const o=s.type;if(o===void 0||!e.includes(o)){r.push(s);continue}n.has(o)||(n.add(o),r.push(s))}return r}let fl=null;const ja=pn("email/getFoldersThunk",async(t,{dispatch:e})=>{var n,r,s;try{const o=await $8e(),i=o.data,a=rJ(i,vn.t)||[];e(nee(a));const l=()=>{e(ja())};return vn.on("languageChanged",l),o.data}catch(o){return((n=o==null?void 0:o.response)==null?void 0:n.status)===406&&((s=(r=o.response)==null?void 0:r.data)!=null&&s.ErrorMessage.includes("setup integration")),[]}}),ux=pn("email/addFolderThunk",async(t,{rejectWithValue:e})=>{try{const{data:n}=await Z8e(t);return n}catch(n){return Ct.isAxiosError(n)&&n.response?e({status:n.response.status,message:n.response.data.ErrorMessage,error:n}):e({status:500,error:n})}}),dx=pn("email/editFolderThunk",async t=>{const{data:e}=await Q8e(t);return e}),fx=pn("email/deleteFolderThunk",async t=>(await F8e(t),t.folderId)),GJ=pn("email/getEmailServersThunk",async()=>{var t,e,n;try{return(await l7e()).data}catch(r){return((t=r==null?void 0:r.response)==null?void 0:t.status)===406&&((n=(e=r.response)==null?void 0:e.data)!=null&&n.ErrorMessage.includes("setup integration")),[]}}),q_=pn("email/wrapGetMessages",async(t,{dispatch:e,getState:n})=>{const{email:r}=n(),s=r!=null&&r.isUseSearchFilters?{offset:0}:{offset:0,folderId:t?+t:0};await e(ur(s))}),KJ=pn("email/markMessagesAsFavorite",async(t,{dispatch:e})=>{try{await a7e(t),t.shouldUpdateMessages&&await e(q_(t!=null&&t.folderId?+(t==null?void 0:t.folderId):void 0))}catch{}}),Tk=pn("email/getMessagesThunk",async(t,{dispatch:e,getState:n})=>{var o,i;fl&&fl.abort(),fl=new AbortController;const{email:r}=n(),s={...r.messagesRequest,...t,query:((i=(o=r==null?void 0:r.messagesSearchRequest)==null?void 0:o.SearchContext)==null?void 0:i.Query)||""};e(ud(!1)),e(nS(s));try{return(await z8e(s,fl.signal)).data}finally{fl=null}}),ur=pn("email/searchMessageThunk",async(t,{dispatch:e,getState:n})=>{var i,a,l,c,u,f,h;fl&&fl.abort();const r="emailId-";fl=new AbortController;const{email:s}=n();let o={...s==null?void 0:s.messagesSearchRequest,...t,SearchContext:{...t.SearchContext}};if(!t.folderId&&s.isUseSearchFilters&&(s==null?void 0:s.messagesSearchRequest.folderId)==="-1"&&delete o.folderId,(!t.SearchContext||((i=o.UserEmailIds)==null?void 0:i.length)===0||o!=null&&o.folderId&&o.folderId.toString()!=="-1"&&!o.folderId.toString().includes(r))&&delete o.UserEmailIds,(a=o.folderId)!=null&&a.toString().includes(r)?delete o.folderId:(s==null?void 0:s.messagesSearchRequest.folderId)!=="-1"&&delete o.UserEmailIds,(t.folderId==="-1"||!t.folderId)&&delete o.folderId,!((l=o.SearchContext)!=null&&l.HasAttachments)&&o.SearchContext&&(o.SearchContext.HasAttachments=void 0),!((c=o.SearchContext)!=null&&c.IsImportant)&&o.SearchContext&&(o.SearchContext.IsImportant=void 0),(u=o.SearchContext)!=null&&u.WasRead&&o.SearchContext&&(o.SearchContext.WasRead=void 0),e(im(t)),(f=o==null?void 0:o.SearchContext)!=null&&f.StartDate){const m=FP(o.SearchContext.StartDate,s.globalSettings.Timezone.Name);o={...o,SearchContext:{...o.SearchContext,StartDate:m}}}if((h=o==null?void 0:o.SearchContext)!=null&&h.EndDate){const m=FP(o.SearchContext.EndDate,s.globalSettings.Timezone.Name);o={...o,SearchContext:{...o.SearchContext,EndDate:m}}}try{const m=await P8e({...o},fl.signal);return fl=null,m.data}finally{}}),xl=pn("email/getSingleMessageThunk",async t=>{const{data:e}=await jJ(t);return e}),W_=pn("email/getCardMessageThunk",async t=>{const{data:e}=await jJ(t);return e}),P2=pn("email/markAsReadThunk",async(t,{dispatch:e})=>{e(OTe({Ids:t.Ids,WasRead:(t==null?void 0:t.WasRead)??!0}));const n=await B8e(t);return e(Vc()),n.data}),Aa=pn("email/moveMessageThunk",async t=>(await Y8e(t)).data),tS=pn("email/cancelMessageSendingThunk",async t=>(await G8e(t)).data);pn("email/cancelMessageThunk",async(t,{dispatch:e})=>{try{await V8e(t.ids),e(C3(t.externalId))}catch{throw Error()}});const jg=pn("email/deleteMessageThunk",async(t,{dispatch:e})=>{e(C3(t.Ids)),await H8e({folderId:t.folderId,Ids:t.Ids})}),px=pn("email/cleanTrashThunk",async(t,{dispatch:e})=>{await U8e({folderId:t.folderId}),e(NTe())}),gT=pn("email/sendThunk",async t=>(await q8e(t)).data),PP=pn("email/saveDraftThunk",async t=>(await W8e(t)).data),om=pn("email/changeLabelThunk",async(t,{dispatch:e})=>{const n=await J8e(t);return t.shouldUpdateMessages&&await e(q_(t!=null&&t.folderId?+(t==null?void 0:t.folderId):void 0)),n.data}),Vc=pn("email/countersThunk",async(t,{getState:e})=>{const{data:n}=await _J(),{email:r}=e();return OJ({email:r,data:n}),n}),yTe=pn("email/countersThunk",async(t,{dispatch:e,getState:n})=>{const{email:r}=n(),{data:s}=await _J();return OJ({email:r,data:s}),!!s.find(i=>i.Id===r.messagesRequest.folderId&&i.TotalCount!==r.messages.Count)&&!r.isUseSearchFilters&&await e(ur({...r.messagesSearchRequest})),s}),hx=pn("email/getSettingsThunk",async()=>(await e7e()).data),XJ=pn("email/getGlobalSettingsThunk",async()=>(await t7e()).data),vTe=pn("email/markOpenFolders",async t=>(await i7e(t)).data),Ml=pn("email/setSettingsThunk",async({Struct:t,UserEmailId:e},{getState:n})=>{const{email:r}=n(),s=r.settings.find(i=>i.UserEmailId===e)||r.settings[0];return(await n7e({Id:s.Id,Struct:t,UserEmailId:e})).data}),ZJ=pn("email/getAddressBookThunk",async t=>{const{data:e}=await RJ({like:t.like,OrderField:""});return e}),QJ=pn("email/getAddressBooksThunk",async()=>{const{data:t}=await s7e();return t});pn("email/deleteAddressBookThunk",async t=>{const{data:e}=await o7e(t);return e});const mx=pn("email/getEmailEventThunk",async(t,{rejectWithValue:e})=>{try{const{data:n}=await c7e(t);return n}catch(n){return n.response&&n.response.status===404?e("Event not found (404)"):e(n.message)}}),bTe=pn("email/acceptEmailEventThunk",async t=>{const{data:e}=await u7e(t);return e}),xTe=pn("email/declineEmailEventThunk",async t=>{const{data:e}=await d7e(t);return e}),wTe=pn("email/tentativeEmailEventThunk",async t=>{const{data:e}=await f7e(t);return e}),i0=t=>{const e=new Map;return t.forEach(n=>{e.set(n.Id,n)}),Object.fromEntries(e)},gx=pn("email/runFilterThunk",async t=>(await r7e(t)).data),STe=pn("email/sharingEmailThunk",async t=>{const{data:e}=await p7e(t);return e}),S3=pn("email/getSharedEmailThunk",async t=>{const{data:e}=await h7e(t);return e}),yT=pn("email/getSharedUsersThunk",async t=>{const{data:e}=await m7e(t);return e}),JJ=pn("email/searchUsersThunk",async t=>{const{data:e}=await g7e(t);return e}),CTe=pn("email/unShareEmailThunk",async t=>{const{data:e}=await y7e(t);return e}),eee=pn("email/getSharedRightsThunk",async t=>{const{data:e}=await v7e(t);return e}),kTe=pn("calendar/getTimeZonesThunk",async()=>({data:(await b7e()).data})),ETe=pn("email/scheduleThunk",async({messageId:t,scheduledDate:e})=>{const n=Ke(e).utc().format("YYYY-MM-DDTHH:mm:ss[Z]");return(await x7e(t,n)).data}),TTe=pn("email/snoozeMessagesThunk",async t=>{const{messageIds:e,snoozeDelaySeconds:n}=t;return await w7e({messageIds:e,snoozeDelaySeconds:n}),{messageIds:e,snoozeDelaySeconds:n}}),tee=pn("email/unsnoozeMessageThunk",async t=>(await S7e(t)).data),Ag=pn("email/getSnoozedMessagesThunk",async t=>(await C7e(t)).data),BP={draftFolderId:null,folders:[],foldersMenu:[],foldersStatus:"initial",filtersStatus:"initial",isUseSearchFilters:!1,triggeredSearchFilter:!1,emailItems:[],paginationPage:1,emailEvent:null,messagesRequest:{folderId:null,offset:0,size:v3,sortOrder:1,orderField:"Id",query:""},messagesSearchRequest:{folderId:"-1",SearchContext:{Query:"",Body:"",Subject:"",From:"",To:"",StartDate:"",EndDate:"",HasAttachments:!1,IsImportant:!1,WasRead:!0,Labels:[]},offset:0,size:v3,sortOrder:1,orderField:"Id",UserEmailIds:[]},fastFilter:{sortOrder:1,WasRead:!0},messages:{Count:0,Items:[],UnreadCount:0},messagesMap:{},messagesStatus:"initial",loadedFolderId:null,selectMessageId:null,singleMessage:null,singleMessageStatus:"initial",singleMessageLoading:!1,cardMessage:null,hashMapAddressBook:{},counters:[],settings:[],settingsStatus:"initial",globalSettings:{UserId:-1,ModuleSettings:void 0},addressBook:{TotalCount:0,Items:[]},addressBooks:[],checkedAddressBooks:[],matchedFolder:null,selectedEmails:[],draggingEmail:null,isDragMoving:!1,isSplit:localStorage.getItem("isSplit")?localStorage.getItem("isSplit")==="true":!0,isSearch:!1,navMenuOpened:!0,emailListScrolling:!1,mobileMessageModalOpened:!1,sharedEmail:null,sharedUsers:[],sharedUsersStatus:"initial",usersForSharing:[],mySharedEmails:null,signs:{},timeZones:{},snoozedMessagesMap:{},activeUserEmailId:null},W0=oi({name:"email",initialState:BP,reducers:{setActiveUserEmailId:(t,e)=>{t.activeUserEmailId=e.payload},setIsUseSearchFilters:(t,e)=>{t.isUseSearchFilters=e.payload},setTriggerSearchFilter:t=>{t.triggeredSearchFilter=!t.triggeredSearchFilter},setMessagesRequest:(t,e)=>{t.messagesRequest={...t.messagesRequest,...e.payload}},setHashMapAddressBook:(t,e)=>{var r;const n=e.payload;for(const s in t.hashMapAddressBook)(r=t.hashMapAddressBook[s])!=null&&r.name&&!n[s]&&(n[s]={...n[s],name:t.hashMapAddressBook[s].name});t.hashMapAddressBook=n},setMessagesSearchRequest:(t,e)=>{t.messagesSearchRequest={...t.messagesSearchRequest,...e.payload}},setSelectedMessageId:(t,e)=>{t.selectMessageId=e.payload},updateCheckedAddresses:(t,e)=>{const n=t.checkedAddressBooks.find(s=>s.Id===e.payload.Id),r=Date.now();n?t.checkedAddressBooks=t.checkedAddressBooks.map(s=>s.Id===e.payload.Id?{...e.payload,timestamp:r}:s):t.checkedAddressBooks.push({...e.payload,timestamp:r})},resetMessagesRequest:t=>{t.messagesRequest=BP.messagesRequest},updateMessage:(t,e)=>{t.messages.Items=t.messages.Items.map(n=>n.Id!==e.payload.Id?n:{...n,...e.payload}),t.messagesMap=i0(t.messages.Items)},updateFastFilters(t,e){t.fastFilter={...t.fastFilter,...e.payload}},bulkUpdateMessage:(t,e)=>{t.messages.Items=t.messages.Items.map(n=>e.payload.Ids.includes(n.Id)?{...n,...e.payload}:n),t.messagesMap=i0(t.messages.Items)},updateSingleMessage:(t,e)=>{t.singleMessage&&t.singleMessage.Id===e.payload.Id&&(t.singleMessage={...t.singleMessage,...e.payload})},setSingleMessage:(t,e)=>{t.singleMessage=e.payload},updateCardMessage:(t,e)=>{t.cardMessage&&t.cardMessage.Id===e.payload.Id&&(t.cardMessage={...t.cardMessage,...e.payload})},updateCardMessageFlag:(t,e)=>{t.cardMessage&&t.cardMessage.Id===e.payload.Id&&(t.cardMessage.Important=e.payload.Important)},deleteMessages:(t,e)=>{t.messages.Items=t.messages.Items.filter(n=>!e.payload.includes(n.ExternalId)),t.messagesMap=i0(t.messages.Items)},cleanMessages:t=>{t.messages.Items=[],t.messagesMap={}},resetSingleMessage:t=>{t.singleMessage=null},incrementCounterUnread:(t,e)=>{if(e.payload.folderId){const n=t.counters.find(r=>r.Id===e.payload.folderId);n?n.UnreadCount=n.UnreadCount+e.payload.count:t.counters.push({UnreadCount:e.payload.count,TotalCount:e.payload.count,Id:e.payload.folderId})}else t.counters=t.counters.map(n=>n.Id!==t.messagesSearchRequest.folderId?n:{...n,UnreadCount:n.UnreadCount+e.payload.count})},decrementCounterUnread:(t,e)=>{t.counters=t.counters.map(n=>n.Id!==t.messagesSearchRequest.folderId?n:{...n,UnreadCount:n.UnreadCount-e.payload})},removeCardMessage:t=>{t.cardMessage=null},setMatchedFolder:(t,e)=>{t.matchedFolder=e.payload},setFoldersMenu:(t,e)=>{t.foldersMenu=e.payload},setPaginationPage:(t,e)=>{t.paginationPage=e.payload},setMessagesLoading:t=>{t.messagesStatus="pending"},setSelectedEmails:(t,e)=>{t.selectedEmails=e.payload},setDraggingEmail:(t,e)=>{t.draggingEmail=e.payload},setIsDragMoving:(t,e)=>{t.isDragMoving=e.payload},setIsSplit:(t,e)=>{t.isSplit=e.payload,localStorage.setItem("isSplit",e.payload)},setIsSearch:(t,e)=>{t.isSearch=e.payload},setNavMenuOpened:(t,e)=>{t.navMenuOpened=e.payload},setEmailListScrolling:(t,e)=>{t.emailListScrolling=e.payload},openMobileMessageModal:t=>{t.mobileMessageModalOpened=!0},closeMobileMessageModal:t=>{t.mobileMessageModalOpened=!1}},extraReducers:t=>t.addCase(gx.pending,e=>{e.filtersStatus="pending"}).addCase(gx.fulfilled,e=>{e.filtersStatus="fulfilled"}).addCase(gx.rejected,e=>{e.filtersStatus="rejected"}).addCase(ja.pending,e=>{e.foldersStatus="pending"}).addCase(ja.fulfilled,(e,n)=>{var s;e.foldersStatus="fulfilled";const r=(s=n.payload)==null?void 0:s.filter(o=>o.Name==="drafts");for(const o of r)e.draftFolderId={...e.draftFolderId,[o.UserEmailId]:o.Id};e.folders=n.payload}).addCase(ux.pending,e=>{e.foldersStatus="pending"}).addCase(ux.fulfilled,(e,n)=>{e.foldersStatus="fulfilled",e.folders.push(n.payload)}).addCase(ux.rejected,e=>{e.foldersStatus="rejected"}).addCase(dx.pending,e=>{e.foldersStatus="pending"}).addCase(dx.fulfilled,(e,n)=>{const r=e.folders.findIndex(s=>s.Id===n.payload.id);r!==-1&&(e.folders[r]=n.payload),e.foldersStatus="fulfilled"}).addCase(dx.rejected,e=>{e.foldersStatus="rejected"}).addCase(fx.pending,e=>{e.foldersStatus="pending"}).addCase(fx.fulfilled,(e,n)=>{e.folders=e.folders.filter(r=>r.Id!==n.payload),e.foldersStatus="fulfilled"}).addCase(fx.rejected,e=>{e.foldersStatus="rejected"}).addCase(ja.rejected,e=>{e.foldersStatus="rejected"}).addCase(Tk.pending,e=>{e.messagesStatus="pending"}).addCase(Tk.fulfilled,(e,n)=>{e.messagesStatus="fulfilled",e.messages=n.payload,e.messagesMap=i0(n.payload.Items)}).addCase(Tk.rejected,e=>{e.messagesStatus="rejected"}).addCase(ur.pending,e=>{e.messagesStatus="pending"}).addCase(ur.fulfilled,(e,n)=>{e.messagesStatus="fulfilled",e.messages=n.payload,e.messagesMap=i0(n.payload.Items);const r=n.meta.arg.folderId;e.loadedFolderId=r?Number(r):null}).addCase(gT.pending,e=>{e.messagesStatus="pending"}).addCase(gT.fulfilled,e=>{e.messagesStatus="fulfilled"}).addCase(ur.rejected,e=>{e.messagesStatus="rejected"}).addCase(xl.pending,e=>{e.singleMessage=null,e.singleMessageLoading=!0,e.singleMessageStatus="pending"}).addCase(xl.fulfilled,(e,n)=>{e.singleMessageLoading=!1,e.singleMessage=n.payload,e.singleMessageStatus="fulfilled"}).addCase(xl.rejected,e=>{e.singleMessageLoading=!1,e.singleMessageStatus="rejected"}).addCase(jg.pending,e=>{e.messagesStatus="pending"}).addCase(jg.fulfilled,e=>{e.messagesStatus="fulfilled"}).addCase(W_.fulfilled,(e,n)=>{e.cardMessage=n.payload}).addCase(Vc.fulfilled,(e,n)=>{e.counters=n.payload}).addCase(hx.pending,e=>{e.settingsStatus="pending"}).addCase(hx.fulfilled,(e,n)=>{var r,s,o;try{const i=(o=(s=(r=n.payload)==null?void 0:r.Struct)==null?void 0:s.Sign)==null?void 0:o.Value;(!i||JSON.parse(i))&&(e.settings=n.payload,n.payload.forEach(a=>{var l;a.UserEmailId&&(e.signs={...e.signs,[a.UserEmailId]:(l=a.Struct)==null?void 0:l.Sign})})),e.settingsStatus="fulfilled"}catch{}}).addCase(hx.rejected,e=>{e.settingsStatus="rejected"}).addCase(Ml.pending,(e,n)=>{const r=e.settings.map(s=>s.UserEmailId===n.meta.arg.UserEmailId?{...s,Struct:n.meta.arg.Struct}:s);e.settings=r}).addCase(Ml.fulfilled,(e,n)=>{var s,o;const r=e.settings.map(i=>i.UserEmailId===n.payload.UserEmailId?n.payload:i);e.settings=r,n.payload.UserEmailId&&(e.signs={...e.signs,[n.payload.UserEmailId]:(o=(s=n.payload)==null?void 0:s.Struct)==null?void 0:o.Sign})}).addCase(ZJ.fulfilled,(e,n)=>{e.addressBook=n.payload}).addCase(QJ.fulfilled,(e,n)=>{e.addressBooks=n.payload}).addCase(mx.fulfilled,(e,n)=>{e.emailEvent=n.payload}).addCase(XJ.fulfilled,(e,n)=>{e.globalSettings=n.payload}).addCase(GJ.fulfilled,(e,n)=>{e.emailItems=n.payload}).addCase(Aa.rejected,e=>{e.messagesStatus="rejected"}).addCase(Aa.pending,e=>{e.messagesStatus="pending"}).addCase(Aa.fulfilled,(e,n)=>{var r;e.messagesStatus="fulfilled",(r=e==null?void 0:e.singleMessage)!=null&&r.Id&&n.meta.arg.Ids.includes(e.singleMessage.Id)&&(e.singleMessage.FolderId=n.meta.arg.toId)}).addCase(om.pending,e=>{e.messagesStatus="pending"}).addCase(om.fulfilled,(e,n)=>{e.messagesStatus="fulfilled";const{ids:r,labelIds:s,enabled:o}=n.meta.arg,i=a=>{const l=new Set(a??[]);return o?s.forEach(c=>l.add(c)):s.forEach(c=>l.delete(c)),Array.from(l)};r.forEach(a=>{var f;const l=Number(a),c=e.messages.Items.find(h=>h.Id===l),u=e.cardMessage;c&&W0.caseReducers.updateMessage(e,{type:"messages/updateMessage",payload:{Id:l,Labels:i(c.Labels)}}),(u==null?void 0:u.Id)===l&&W0.caseReducers.updateCardMessage(e,{type:"messages/updateCardMessage",payload:{Id:l,Labels:i(u.Labels)}}),((f=e.singleMessage)==null?void 0:f.Id)===l&&W0.caseReducers.updateSingleMessage(e,{type:"messages/updateSingleMessage",payload:{Id:l,Labels:i(e.singleMessage.Labels)}})})}).addCase(px.rejected,e=>{e.messagesStatus="rejected"}).addCase(px.pending,e=>{e.messagesStatus="pending"}).addCase(px.fulfilled,e=>{e.messagesStatus="fulfilled"}).addCase(P2.fulfilled,(e,n)=>{e!=null&&e.singleMessage&&n.meta.arg.Ids.includes(e.singleMessage.Id)&&(e.singleMessage.WasRead=!!n.meta.arg.WasRead)}).addCase(S3.pending,e=>{e.sharedUsersStatus="pending"}).addCase(S3.fulfilled,(e,n)=>{e.sharedEmail=n.payload,n.payload.UserAccessRights.length===0&&(e.sharedUsersStatus="fulfilled",e.sharedUsers=[])}).addCase(yT.pending,e=>{e.sharedUsersStatus="pending",e.sharedUsers=[]}).addCase(yT.fulfilled,(e,n)=>{e.sharedUsersStatus="fulfilled",e.sharedUsers=n.payload}).addCase(JJ.fulfilled,(e,n)=>{e.usersForSharing=n.payload}).addCase(eee.fulfilled,(e,n)=>{e.mySharedEmails={...e.mySharedEmails,[n.meta.arg]:n.payload}}).addCase(kTe.fulfilled,(e,n)=>{const{data:r}=n.payload,{timeZones:s}=D7e(r);e.timeZones=s}).addCase(Ag.fulfilled,(e,n)=>{const r={};for(const s of n.payload)r[s.MessageId]=s;e.snoozedMessagesMap={...e.snoozedMessagesMap,...r}}).addCase(tee.fulfilled,(e,n)=>{const r=n.meta.arg.messageId;r&&delete e.snoozedMessagesMap[r]})}),MTe=W0.reducer,{setSingleMessage:Npt,setHashMapAddressBook:jTe,setIsUseSearchFilters:ud,setTriggerSearchFilter:ATe,setMessagesRequest:nS,setMessagesSearchRequest:im,resetMessagesRequest:_Te,updateCheckedAddresses:RTe,setSelectedMessageId:Ns,updateMessage:Vu,updateCardMessage:DTe,updateCardMessageFlag:ITe,bulkUpdateMessage:OTe,updateSingleMessage:rS,deleteMessages:C3,setPaginationPage:Dc,cleanMessages:NTe,resetSingleMessage:jo,incrementCounterUnread:sS,decrementCounterUnread:fc,removeCardMessage:oS,setMatchedFolder:LTe,setFoldersMenu:nee,setMessagesLoading:ree,setSelectedEmails:k3,setDraggingEmail:ih,setIsDragMoving:HP,setIsSplit:$Te,setIsSearch:FTe,setNavMenuOpened:zTe,setEmailListScrolling:vT,openMobileMessageModal:see,closeMobileMessageModal:E3,setActiveUserEmailId:PTe,updateFastFilters:Jv}=W0.actions,Dl=t=>t.email.folders,Va=t=>t.email.foldersMenu,BTe=t=>t.email.foldersStatus,HTe=t=>t.email.filtersStatus,oee=t=>t.email.draftFolderId,UTe=t=>{var e;return(e=t.email.folders.find(n=>n.Name==="inbox"))==null?void 0:e.Id},sp=rp([Dl],t=>t.filter(e=>e.Name==="outbox").map(e=>e.Id)),VTe=rp([Dl],t=>t.filter(e=>e.Name==="junk").map(e=>e.Id)),iee=rp([Dl],t=>t.filter(e=>e.Name==="snoozed").map(e=>e.Id)),Dn=rp([t=>t.email.emailItems,Md],(t,e)=>[...t].sort(n=>n.Email===e.Email?-1:1)),op=t=>t.email.hashMapAddressBook,qTe=t=>t.email.triggeredSearchFilter,iS=t=>t.email.isUseSearchFilters,mr=t=>t.email.messagesSearchRequest,qc=t=>t.email.messages,Fm=t=>t.email.messagesMap,ip=t=>t.email.messagesStatus,WTe=t=>t.email.loadedFolderId,B2=t=>t.email.mobileMessageModalOpened,zm=t=>t.email.selectMessageId,$o=t=>t.email.singleMessage,aee=t=>t.email.singleMessageStatus,Y_=t=>t.email.singleMessageLoading,G_=t=>t.email.cardMessage,lee=t=>t.email.counters,jd=rp([t=>t.email.settings,(t,e)=>e],(t,e)=>(t==null?void 0:t.find(r=>r.UserEmailId===e))||t[0]||{Id:0,Struct:{Sign:{Value:"",IsAddToNew:!1,IsAddToReply:!1},Filters:[]},UserEmailId:e||0}),H2=t=>t.email.settingsStatus,YTe=t=>t.email.addressBooks,Pm=t=>t.email.globalSettings,Bm=t=>{var e,n;return(n=(e=t.email.globalSettings)==null?void 0:e.Timezone)==null?void 0:n.Name},qa=t=>{var e;return(e=t.email.globalSettings)==null?void 0:e.ModuleSettings},GTe=t=>t.email.matchedFolder,K_=t=>t.email.selectedEmails,X_=t=>t.email.draggingEmail,KTe=t=>t.email.isDragMoving,Z_=t=>t.email.isSplit,Q_=t=>t.email.navMenuOpened,cee=t=>t.email.emailListScrolling,XTe=t=>t.email.checkedAddressBooks,ZTe=t=>t.email.sharedEmail,QTe=t=>t.email.sharedUsers,JTe=t=>t.email.sharedUsersStatus,eMe=t=>t.email.usersForSharing,aS=t=>t.email.paginationPage,tMe=t=>t.email.signs,J_=t=>t.email.fastFilter,eR=t=>t.email.snoozedMessagesMap,uee=t=>t.email.activeUserEmailId,zr=rp(Va,t=>{let e=[];const n=(r,s=0)=>{const o={...r,level:s};e.push(o),r.Children&&r.Children.length>0&&r.Children.forEach(i=>n(i,s+1))};return t.forEach(r=>n(r)),e}),nMe=t=>Ct.post("v1/EmailLabels",t),rMe=()=>Ct.get("v1/EmailLabels"),sMe=t=>Ct.delete(`v1/EmailLabels?Id=${t}`),Xu=pn("emailLabels/getEmailLabelsThunk",async()=>(await rMe()).data),yx=pn("emailLabels/emailLabelThunk",async t=>(await nMe(t)).data),vx=pn("emailLabels/deleteEmailLabelThunk",async t=>(await sMe(t)).data),oMe={items:[],selectedLabel:-1,labelStatus:"initial"},dee=oi({name:"emailLabels",initialState:oMe,reducers:{setSelectedEmailLabel:(t,e)=>{t.selectedLabel=e.payload.label}},extraReducers:t=>t.addCase(Xu.fulfilled,(e,n)=>{e.items=n.payload,e.labelStatus="fulfilled"}).addCase(Xu.pending,e=>{e.labelStatus="pending"}).addCase(Xu.rejected,e=>{e.labelStatus="rejected"}).addCase(yx.fulfilled,(e,n)=>{e.labelStatus="fulfilled"}).addCase(yx.pending,e=>{e.labelStatus="pending"}).addCase(yx.rejected,e=>{e.labelStatus="rejected"}).addCase(vx.fulfilled,(e,n)=>{e.items=e.items.filter(r=>r.Id!==n.meta.arg),e.labelStatus="fulfilled"}).addCase(vx.pending,e=>{e.labelStatus="pending"}).addCase(vx.rejected,e=>{e.labelStatus="rejected"})}),iMe=dee.reducer,{setSelectedEmailLabel:tR}=dee.actions,U2=t=>t.emailLabels.items,nR=t=>t.emailLabels.selectedLabel,fee=t=>t.emailLabels.labelStatus,ts=()=>{const{t}=Le(),e=wn(),{pathname:n}=e,r=re(Va),s=re(nR),o=re(iS),i=re(lee),a=S.useCallback((l,c)=>{if(!l)return null;for(const u of l){if(u.path.toLowerCase()===c.toLowerCase())return u;if(u.Children&&u.Children.length>0){const f=a(u.Children,c);if(f)return f}}return null},[]);return S.useEffect(()=>{if(s&&s!==-1)return;const l=a(r,n??"inbox");!l&&!o||N_(o?t("search_result"):(l==null?void 0:l.label)||"",o?0:L_(i,(l==null?void 0:l.Id)||0,l==null?void 0:l.Type))},[a,r,n,s,o,i,t]),S.useMemo(()=>a(r,n??"inbox"),[a,r,n])},aMe=t=>Ct.put(`v1/UserReaction?entityType=${t.entityType}&entityId=${t.Id}&type=${t.type}`,{}),lMe=t=>Ct.get(`v1/UserReaction?entityType=${t.entityType}&entityId=${t.Id}`),bT=pn("emojis/getEmojis",async t=>(await lMe(t)).data),cMe=pn("emojis/addEmojis",async t=>(await aMe(t)).data),uMe={items:[]},pee=oi({name:"emojis",initialState:uMe,reducers:{emptyEmojiList:t=>{t.items=[]}},extraReducers:t=>t.addCase(bT.fulfilled,(e,n)=>{e.items=n.payload})}),{emptyEmojiList:dMe}=pee.actions,fMe=pee.reducer,pMe=t=>t.emojis.items,hMe={isMessageCardWindowOpen:!1},hee=oi({name:"messageCardWindow",initialState:hMe,reducers:{setMessageCardWindowOpen(t,e){t.isMessageCardWindowOpen=e.payload}}}),{setMessageCardWindowOpen:rR}=hee.actions,mMe=hee.reducer,gMe={persistentSelectedMessages:[],anchorIndex:null,combinedMessages:[]},T3=oi({name:"messageSelection",initialState:gMe,reducers:{setPersistentSelectedMessages:(t,e)=>{t.persistentSelectedMessages=e.payload},setAnchorIndex:(t,e)=>{t.anchorIndex=e.payload},syncMessagesWithCombined:(t,e)=>{t.combinedMessages=e.payload;const n=new Map(e.payload.map(r=>[r.Id,r]));t.persistentSelectedMessages=t.persistentSelectedMessages.map(r=>n.get(r.Id)||r)},selectRange:(t,e)=>{const{shouldCheck:n,currentIndex:r}=e.payload,s=t.combinedMessages,o=t.anchorIndex??r,i=Math.min(o,r),a=Math.max(o,r),l=s.slice(i,a+1);if(n){const c=new Set(t.persistentSelectedMessages.map(f=>f.Id)),u=l.filter(f=>!c.has(f.Id));t.persistentSelectedMessages=[...t.persistentSelectedMessages,...u]}else{const c=new Set(l.map(u=>u.Id));t.persistentSelectedMessages=t.persistentSelectedMessages.filter(u=>!c.has(u.Id))}},toggleMessage:(t,e)=>{const{message:n,index:r}=e.payload;t.persistentSelectedMessages.some(o=>o.Id===n.Id)?t.persistentSelectedMessages=t.persistentSelectedMessages.filter(o=>o.Id!==n.Id):t.persistentSelectedMessages=[...t.persistentSelectedMessages,n],r!==-1&&(t.anchorIndex=r)},toggleAll:t=>{const e=t.combinedMessages,n=t.persistentSelectedMessages.map(s=>s.Id),r=e.map(s=>s.Id);if(r.some(s=>n.includes(s)))t.persistentSelectedMessages=t.persistentSelectedMessages.filter(s=>!r.includes(s.Id));else{const s=e.filter(o=>!n.includes(o.Id));t.persistentSelectedMessages=[...t.persistentSelectedMessages,...s]}},clearSelection:t=>{t.persistentSelectedMessages=[],t.anchorIndex=null},updateSelectedMessagesFieldDirect:(t,e)=>{const{field:n,value:r}=e.payload;t.persistentSelectedMessages.some(o=>o[n]!==r)&&(t.persistentSelectedMessages=t.persistentSelectedMessages.map(o=>({...o,[n]:r})))},replaceSelectedMessages:(t,e)=>{t.persistentSelectedMessages=e.payload},validateAnchorIndex:(t,e)=>{const n=e.payload;t.anchorIndex!==null&&(t.anchorIndex<0||t.anchorIndex>=n)&&(t.anchorIndex=null)}}}),yMe=(t,e)=>(n,r)=>{const s=r().messageSelection.persistentSelectedMessages;if(typeof e=="function"){const o=s.map(i=>{const a=i[t],l=e(a);return{...i,[t]:l}});n(T3.actions.replaceSelectedMessages(o))}else n(T3.actions.updateSelectedMessagesFieldDirect({field:t,value:e}))},{setPersistentSelectedMessages:Lpt,setAnchorIndex:$pt,syncMessagesWithCombined:vMe,selectRange:bMe,toggleMessage:xMe,toggleAll:wMe,clearSelection:mee,replaceSelectedMessages:Fpt,updateSelectedMessagesFieldDirect:zpt,validateAnchorIndex:SMe}=T3.actions,CMe=T3.reducer,kMe=t=>t.messageSelection.persistentSelectedMessages,EMe={highlightStrings:[],reqPayload:{},formValues:{}},gee=oi({name:"search",initialState:EMe,reducers:{setSearchHighlightStrings:(t,e)=>{t.highlightStrings=e.payload},setSearchReqPayload:(t,e)=>{t.reqPayload={...t.reqPayload,...e.payload}},setSearchFormValues:(t,e)=>{t.formValues={...t.formValues,...e.payload}},clearSearchHighlightQuery:t=>{t.highlightStrings=[]}}}),{setSearchHighlightStrings:yee,setSearchReqPayload:TMe,setSearchFormValues:lS,clearSearchHighlightQuery:MMe}=gee.actions,jMe=gee.reducer,AMe={shareDiskOpenedById:{},fileAccessOpenedById:{},largeFilesUploadOpenedById:{}},vee=oi({name:"sendForm",initialState:AMe,reducers:{setShareDiskOpened(t,e){t.shareDiskOpenedById[e.payload.id]=e.payload.opened},setFileAccessOpened(t,e){t.fileAccessOpenedById[e.payload.id]=e.payload.opened},setLargeFilesUploadOpened(t,e){t.largeFilesUploadOpenedById[e.payload.id]=e.payload.opened}}}),{setShareDiskOpened:xT,setFileAccessOpened:M3,setLargeFilesUploadOpened:dd}=vee.actions,sR=t=>e=>e.sendForm.shareDiskOpenedById[t]??!1,bee=t=>e=>e.sendForm.fileAccessOpenedById[t]??!1,oR=t=>e=>e.sendForm.largeFilesUploadOpenedById[t]??!1,_Me=vee.reducer,RMe={opened:!1,messageIds:[]},xee=oi({name:"snoozeModal",initialState:RMe,reducers:{openSnoozeModal(t,e){t.opened=!0,t.messageIds=e.payload.messageIds},closeSnoozeModal(t){t.opened=!1,t.messageIds=[]}}}),{openSnoozeModal:UP,closeSnoozeModal:wee}=xee.actions,See=t=>t.snoozeModal.opened,Cee=t=>t.snoozeModal.messageIds,DMe=xee.reducer,IMe=sbe({reducer:{user:N7e,email:MTe,emailLabels:iMe,emojis:fMe,search:jMe,contextMenu:qCe,cardContextMenu:BCe,contactContextMenu:UCe,messageCardWindow:mMe,attachmentLinks:FCe,sendForm:_Me,messageSelection:CMe,accountFilter:ICe,snoozeModal:DMe,...L4e},middleware:t=>t().concat(...$4e)}),zt=()=>cs(),re=br;var bx={exports:{}},OMe=bx.exports,VP;function NMe(){return VP||(VP=1,(function(t,e){(function(n,r){t.exports=r(IJ())})(OMe,(function(n){function r(y){return y&&typeof y=="object"&&"default"in y?y:{default:y}}var s=r(n),o="января_февраля_марта_апреля_мая_июня_июля_августа_сентября_октября_ноября_декабря".split("_"),i="январь_февраль_март_апрель_май_июнь_июль_август_сентябрь_октябрь_ноябрь_декабрь".split("_"),a="янв._февр._мар._апр._мая_июня_июля_авг._сент._окт._нояб._дек.".split("_"),l="янв._февр._март_апр._май_июнь_июль_авг._сент._окт._нояб._дек.".split("_"),c=/D[oD]?(\[[^[\]]*\]|\s)+MMMM?/;function u(y,v,b){var w,C;return b==="m"?v?"минута":"минуту":y+" "+(w=+y,C={mm:v?"минута_минуты_минут":"минуту_минуты_минут",hh:"час_часа_часов",dd:"день_дня_дней",MM:"месяц_месяца_месяцев",yy:"год_года_лет"}[b].split("_"),w%10==1&&w%100!=11?C[0]:w%10>=2&&w%10<=4&&(w%100<10||w%100>=20)?C[1]:C[2])}var f=function(y,v){return c.test(v)?o[y.month()]:i[y.month()]};f.s=i,f.f=o;var h=function(y,v){return c.test(v)?a[y.month()]:l[y.month()]};h.s=l,h.f=a;var m={name:"ru",weekdays:"воскресенье_понедельник_вторник_среда_четверг_пятница_суббота".split("_"),weekdaysShort:"вск_пнд_втр_срд_чтв_птн_сбт".split("_"),weekdaysMin:"вс_пн_вт_ср_чт_пт_сб".split("_"),months:f,monthsShort:h,weekStart:1,yearStart:4,formats:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY г.",LLL:"D MMMM YYYY г., H:mm",LLLL:"dddd, D MMMM YYYY г., H:mm"},relativeTime:{future:"через %s",past:"%s назад",s:"несколько секунд",m:u,mm:u,h:"час",hh:u,d:"день",dd:u,M:"месяц",MM:u,y:"год",yy:u},ordinal:function(y){return y},meridiem:function(y){return y<4?"ночи":y<12?"утра":y<17?"дня":"вечера"}};return s.default.locale(m,null,!0),m}))})(bx)),bx.exports}NMe();function LMe(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return S.useMemo(()=>r=>{e.forEach(s=>s(r))},e)}const cS=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function Hm(t){const e=Object.prototype.toString.call(t);return e==="[object Window]"||e==="[object global]"}function iR(t){return"nodeType"in t}function Fo(t){var e,n;return t?Hm(t)?t:iR(t)&&(e=(n=t.ownerDocument)==null?void 0:n.defaultView)!=null?e:window:window}function aR(t){const{Document:e}=Fo(t);return t instanceof e}function V2(t){return Hm(t)?!1:t instanceof Fo(t).HTMLElement}function kee(t){return t instanceof Fo(t).SVGElement}function Um(t){return t?Hm(t)?t.document:iR(t)?aR(t)?t:V2(t)||kee(t)?t.ownerDocument:document:document:document}const La=cS?S.useLayoutEffect:S.useEffect;function uS(t){const e=S.useRef(t);return La(()=>{e.current=t}),S.useCallback(function(){for(var n=arguments.length,r=new Array(n),s=0;s<n;s++)r[s]=arguments[s];return e.current==null?void 0:e.current(...r)},[])}function $Me(){const t=S.useRef(null),e=S.useCallback((r,s)=>{t.current=setInterval(r,s)},[]),n=S.useCallback(()=>{t.current!==null&&(clearInterval(t.current),t.current=null)},[]);return[e,n]}function _g(t,e){e===void 0&&(e=[t]);const n=S.useRef(t);return La(()=>{n.current!==t&&(n.current=t)},e),n}function q2(t,e){const n=S.useRef();return S.useMemo(()=>{const r=t(n.current);return n.current=r,r},[...e])}function j3(t){const e=uS(t),n=S.useRef(null),r=S.useCallback(s=>{s!==n.current&&(e==null||e(s,n.current)),n.current=s},[]);return[n,r]}function A3(t){const e=S.useRef();return S.useEffect(()=>{e.current=t},[t]),e.current}let Mk={};function W2(t,e){return S.useMemo(()=>{if(e)return e;const n=Mk[t]==null?0:Mk[t]+1;return Mk[t]=n,t+"-"+n},[t,e])}function Eee(t){return function(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),s=1;s<n;s++)r[s-1]=arguments[s];return r.reduce((o,i)=>{const a=Object.entries(i);for(const[l,c]of a){const u=o[l];u!=null&&(o[l]=u+t*c)}return o},{...e})}}const $h=Eee(1),_3=Eee(-1);function FMe(t){return"clientX"in t&&"clientY"in t}function dS(t){if(!t)return!1;const{KeyboardEvent:e}=Fo(t.target);return e&&t instanceof e}function zMe(t){if(!t)return!1;const{TouchEvent:e}=Fo(t.target);return e&&t instanceof e}function am(t){if(zMe(t)){if(t.touches&&t.touches.length){const{clientX:e,clientY:n}=t.touches[0];return{x:e,y:n}}else if(t.changedTouches&&t.changedTouches.length){const{clientX:e,clientY:n}=t.changedTouches[0];return{x:e,y:n}}}return FMe(t)?{x:t.clientX,y:t.clientY}:null}const Ic=Object.freeze({Translate:{toString(t){if(!t)return;const{x:e,y:n}=t;return"translate3d("+(e?Math.round(e):0)+"px, "+(n?Math.round(n):0)+"px, 0)"}},Scale:{toString(t){if(!t)return;const{scaleX:e,scaleY:n}=t;return"scaleX("+e+") scaleY("+n+")"}},Transform:{toString(t){if(t)return[Ic.Translate.toString(t),Ic.Scale.toString(t)].join(" ")}},Transition:{toString(t){let{property:e,duration:n,easing:r}=t;return e+" "+n+"ms "+r}}}),qP="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function PMe(t){return t.matches(qP)?t:t.querySelector(qP)}const BMe={display:"none"};function HMe(t){let{id:e,value:n}=t;return It.createElement("div",{id:e,style:BMe},n)}function UMe(t){let{id:e,announcement:n,ariaLiveType:r="assertive"}=t;const s={position:"fixed",top:0,left:0,width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"};return It.createElement("div",{id:e,style:s,role:"status","aria-live":r,"aria-atomic":!0},n)}function VMe(){const[t,e]=S.useState("");return{announce:S.useCallback(r=>{r!=null&&e(r)},[]),announcement:t}}const Tee=S.createContext(null);function Mee(t){const e=S.useContext(Tee);S.useEffect(()=>{if(!e)throw new Error("useDndMonitor must be used within a children of <DndContext>");return e(t)},[t,e])}function qMe(){const[t]=S.useState(()=>new Set),e=S.useCallback(r=>(t.add(r),()=>t.delete(r)),[t]);return[S.useCallback(r=>{let{type:s,event:o}=r;t.forEach(i=>{var a;return(a=i[s])==null?void 0:a.call(i,o)})},[t]),e]}const WMe={draggable:`
    To pick up a draggable item, press the space bar.
    While dragging, use the arrow keys to move the item.
    Press space again to drop the item in its new position, or press escape to cancel.
  `},YMe={onDragStart(t){let{active:e}=t;return"Picked up draggable item "+e.id+"."},onDragOver(t){let{active:e,over:n}=t;return n?"Draggable item "+e.id+" was moved over droppable area "+n.id+".":"Draggable item "+e.id+" is no longer over a droppable area."},onDragEnd(t){let{active:e,over:n}=t;return n?"Draggable item "+e.id+" was dropped over droppable area "+n.id:"Draggable item "+e.id+" was dropped."},onDragCancel(t){let{active:e}=t;return"Dragging was cancelled. Draggable item "+e.id+" was dropped."}};function GMe(t){let{announcements:e=YMe,container:n,hiddenTextDescribedById:r,screenReaderInstructions:s=WMe}=t;const{announce:o,announcement:i}=VMe(),a=W2("DndLiveRegion"),[l,c]=S.useState(!1);if(S.useEffect(()=>{c(!0)},[]),Mee(S.useMemo(()=>({onDragStart(f){let{active:h}=f;o(e.onDragStart({active:h}))},onDragMove(f){let{active:h,over:m}=f;e.onDragMove&&o(e.onDragMove({active:h,over:m}))},onDragOver(f){let{active:h,over:m}=f;o(e.onDragOver({active:h,over:m}))},onDragEnd(f){let{active:h,over:m}=f;o(e.onDragEnd({active:h,over:m}))},onDragCancel(f){let{active:h,over:m}=f;o(e.onDragCancel({active:h,over:m}))}}),[o,e])),!l)return null;const u=It.createElement(It.Fragment,null,It.createElement(HMe,{id:r,value:s.draggable}),It.createElement(UMe,{id:a,announcement:i}));return n?Xo.createPortal(u,n):u}var js;(function(t){t.DragStart="dragStart",t.DragMove="dragMove",t.DragEnd="dragEnd",t.DragCancel="dragCancel",t.DragOver="dragOver",t.RegisterDroppable="registerDroppable",t.SetDroppableDisabled="setDroppableDisabled",t.UnregisterDroppable="unregisterDroppable"})(js||(js={}));function R3(){}function Rg(t,e){return S.useMemo(()=>({sensor:t,options:e??{}}),[t,e])}function jee(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return S.useMemo(()=>[...e].filter(r=>r!=null),[...e])}const $a=Object.freeze({x:0,y:0});function KMe(t,e){const n=am(t);if(!n)return"0 0";const r={x:(n.x-e.left)/e.width*100,y:(n.y-e.top)/e.height*100};return r.x+"% "+r.y+"%"}function XMe(t,e){let{data:{value:n}}=t,{data:{value:r}}=e;return r-n}function ZMe(t,e){if(!t||t.length===0)return null;const[n]=t;return n[e]}function QMe(t,e){const n=Math.max(e.top,t.top),r=Math.max(e.left,t.left),s=Math.min(e.left+e.width,t.left+t.width),o=Math.min(e.top+e.height,t.top+t.height),i=s-r,a=o-n;if(r<s&&n<o){const l=e.width*e.height,c=t.width*t.height,u=i*a,f=u/(l+c-u);return Number(f.toFixed(4))}return 0}const lR=t=>{let{collisionRect:e,droppableRects:n,droppableContainers:r}=t;const s=[];for(const o of r){const{id:i}=o,a=n.get(i);if(a){const l=QMe(a,e);l>0&&s.push({id:i,data:{droppableContainer:o,value:l}})}}return s.sort(XMe)};function JMe(t,e,n){return{...t,scaleX:e&&n?e.width/n.width:1,scaleY:e&&n?e.height/n.height:1}}function Aee(t,e){return t&&e?{x:t.left-e.left,y:t.top-e.top}:$a}function eje(t){return function(n){for(var r=arguments.length,s=new Array(r>1?r-1:0),o=1;o<r;o++)s[o-1]=arguments[o];return s.reduce((i,a)=>({...i,top:i.top+t*a.y,bottom:i.bottom+t*a.y,left:i.left+t*a.x,right:i.right+t*a.x}),{...n})}}const tje=eje(1);function _ee(t){if(t.startsWith("matrix3d(")){const e=t.slice(9,-1).split(/, /);return{x:+e[12],y:+e[13],scaleX:+e[0],scaleY:+e[5]}}else if(t.startsWith("matrix(")){const e=t.slice(7,-1).split(/, /);return{x:+e[4],y:+e[5],scaleX:+e[0],scaleY:+e[3]}}return null}function nje(t,e,n){const r=_ee(e);if(!r)return t;const{scaleX:s,scaleY:o,x:i,y:a}=r,l=t.left-i-(1-s)*parseFloat(n),c=t.top-a-(1-o)*parseFloat(n.slice(n.indexOf(" ")+1)),u=s?t.width/s:t.width,f=o?t.height/o:t.height;return{width:u,height:f,top:c,right:l+u,bottom:c+f,left:l}}const rje={ignoreTransform:!1};function Vm(t,e){e===void 0&&(e=rje);let n=t.getBoundingClientRect();if(e.ignoreTransform){const{transform:c,transformOrigin:u}=Fo(t).getComputedStyle(t);c&&(n=nje(n,c,u))}const{top:r,left:s,width:o,height:i,bottom:a,right:l}=n;return{top:r,left:s,width:o,height:i,bottom:a,right:l}}function WP(t){return Vm(t,{ignoreTransform:!0})}function sje(t){const e=t.innerWidth,n=t.innerHeight;return{top:0,left:0,right:e,bottom:n,width:e,height:n}}function oje(t,e){return e===void 0&&(e=Fo(t).getComputedStyle(t)),e.position==="fixed"}function ije(t,e){e===void 0&&(e=Fo(t).getComputedStyle(t));const n=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some(s=>{const o=e[s];return typeof o=="string"?n.test(o):!1})}function cR(t,e){const n=[];function r(s){if(e!=null&&n.length>=e||!s)return n;if(aR(s)&&s.scrollingElement!=null&&!n.includes(s.scrollingElement))return n.push(s.scrollingElement),n;if(!V2(s)||kee(s)||n.includes(s))return n;const o=Fo(t).getComputedStyle(s);return s!==t&&ije(s,o)&&n.push(s),oje(s,o)?n:r(s.parentNode)}return t?r(t):n}function Ree(t){const[e]=cR(t,1);return e??null}function jk(t){return!cS||!t?null:Hm(t)?t:iR(t)?aR(t)||t===Um(t).scrollingElement?window:V2(t)?t:null:null}function Dee(t){return Hm(t)?t.scrollX:t.scrollLeft}function Iee(t){return Hm(t)?t.scrollY:t.scrollTop}function wT(t){return{x:Dee(t),y:Iee(t)}}var Is;(function(t){t[t.Forward=1]="Forward",t[t.Backward=-1]="Backward"})(Is||(Is={}));function Oee(t){return!cS||!t?!1:t===document.scrollingElement}function Nee(t){const e={x:0,y:0},n=Oee(t)?{height:window.innerHeight,width:window.innerWidth}:{height:t.clientHeight,width:t.clientWidth},r={x:t.scrollWidth-n.width,y:t.scrollHeight-n.height},s=t.scrollTop<=e.y,o=t.scrollLeft<=e.x,i=t.scrollTop>=r.y,a=t.scrollLeft>=r.x;return{isTop:s,isLeft:o,isBottom:i,isRight:a,maxScroll:r,minScroll:e}}const aje={x:.2,y:.2};function lje(t,e,n,r,s){let{top:o,left:i,right:a,bottom:l}=n;r===void 0&&(r=10),s===void 0&&(s=aje);const{isTop:c,isBottom:u,isLeft:f,isRight:h}=Nee(t),m={x:0,y:0},y={x:0,y:0},v={height:e.height*s.y,width:e.width*s.x};return!c&&o<=e.top+v.height?(m.y=Is.Backward,y.y=r*Math.abs((e.top+v.height-o)/v.height)):!u&&l>=e.bottom-v.height&&(m.y=Is.Forward,y.y=r*Math.abs((e.bottom-v.height-l)/v.height)),!h&&a>=e.right-v.width?(m.x=Is.Forward,y.x=r*Math.abs((e.right-v.width-a)/v.width)):!f&&i<=e.left+v.width&&(m.x=Is.Backward,y.x=r*Math.abs((e.left+v.width-i)/v.width)),{direction:m,speed:y}}function cje(t){if(t===document.scrollingElement){const{innerWidth:o,innerHeight:i}=window;return{top:0,left:0,right:o,bottom:i,width:o,height:i}}const{top:e,left:n,right:r,bottom:s}=t.getBoundingClientRect();return{top:e,left:n,right:r,bottom:s,width:t.clientWidth,height:t.clientHeight}}function Lee(t){return t.reduce((e,n)=>$h(e,wT(n)),$a)}function uje(t){return t.reduce((e,n)=>e+Dee(n),0)}function dje(t){return t.reduce((e,n)=>e+Iee(n),0)}function $ee(t,e){if(e===void 0&&(e=Vm),!t)return;const{top:n,left:r,bottom:s,right:o}=e(t);Ree(t)&&(s<=0||o<=0||n>=window.innerHeight||r>=window.innerWidth)&&t.scrollIntoView({block:"center",inline:"center"})}const fje=[["x",["left","right"],uje],["y",["top","bottom"],dje]];class uR{constructor(e,n){this.rect=void 0,this.width=void 0,this.height=void 0,this.top=void 0,this.bottom=void 0,this.right=void 0,this.left=void 0;const r=cR(n),s=Lee(r);this.rect={...e},this.width=e.width,this.height=e.height;for(const[o,i,a]of fje)for(const l of i)Object.defineProperty(this,l,{get:()=>{const c=a(r),u=s[o]-c;return this.rect[l]+u},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class Y0{constructor(e){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach(n=>{var r;return(r=this.target)==null?void 0:r.removeEventListener(...n)})},this.target=e}add(e,n,r){var s;(s=this.target)==null||s.addEventListener(e,n,r),this.listeners.push([e,n,r])}}function pje(t){const{EventTarget:e}=Fo(t);return t instanceof e?t:Um(t)}function Ak(t,e){const n=Math.abs(t.x),r=Math.abs(t.y);return typeof e=="number"?Math.sqrt(n**2+r**2)>e:"x"in e&&"y"in e?n>e.x&&r>e.y:"x"in e?n>e.x:"y"in e?r>e.y:!1}var Ui;(function(t){t.Click="click",t.DragStart="dragstart",t.Keydown="keydown",t.ContextMenu="contextmenu",t.Resize="resize",t.SelectionChange="selectionchange",t.VisibilityChange="visibilitychange"})(Ui||(Ui={}));function YP(t){t.preventDefault()}function hje(t){t.stopPropagation()}var Zn;(function(t){t.Space="Space",t.Down="ArrowDown",t.Right="ArrowRight",t.Left="ArrowLeft",t.Up="ArrowUp",t.Esc="Escape",t.Enter="Enter",t.Tab="Tab"})(Zn||(Zn={}));const Fee={start:[Zn.Space,Zn.Enter],cancel:[Zn.Esc],end:[Zn.Space,Zn.Enter,Zn.Tab]},mje=(t,e)=>{let{currentCoordinates:n}=e;switch(t.code){case Zn.Right:return{...n,x:n.x+25};case Zn.Left:return{...n,x:n.x-25};case Zn.Down:return{...n,y:n.y+25};case Zn.Up:return{...n,y:n.y-25}}};class zee{constructor(e){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=e;const{event:{target:n}}=e;this.props=e,this.listeners=new Y0(Um(n)),this.windowListeners=new Y0(Fo(n)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(Ui.Resize,this.handleCancel),this.windowListeners.add(Ui.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(Ui.Keydown,this.handleKeyDown))}handleStart(){const{activeNode:e,onStart:n}=this.props,r=e.node.current;r&&$ee(r),n($a)}handleKeyDown(e){if(dS(e)){const{active:n,context:r,options:s}=this.props,{keyboardCodes:o=Fee,coordinateGetter:i=mje,scrollBehavior:a="smooth"}=s,{code:l}=e;if(o.end.includes(l)){this.handleEnd(e);return}if(o.cancel.includes(l)){this.handleCancel(e);return}const{collisionRect:c}=r.current,u=c?{x:c.left,y:c.top}:$a;this.referenceCoordinates||(this.referenceCoordinates=u);const f=i(e,{active:n,context:r.current,currentCoordinates:u});if(f){const h=_3(f,u),m={x:0,y:0},{scrollableAncestors:y}=r.current;for(const v of y){const b=e.code,{isTop:w,isRight:C,isLeft:k,isBottom:E,maxScroll:j,minScroll:A}=Nee(v),M=cje(v),_={x:Math.min(b===Zn.Right?M.right-M.width/2:M.right,Math.max(b===Zn.Right?M.left:M.left+M.width/2,f.x)),y:Math.min(b===Zn.Down?M.bottom-M.height/2:M.bottom,Math.max(b===Zn.Down?M.top:M.top+M.height/2,f.y))},D=b===Zn.Right&&!C||b===Zn.Left&&!k,R=b===Zn.Down&&!E||b===Zn.Up&&!w;if(D&&_.x!==f.x){const N=v.scrollLeft+h.x,z=b===Zn.Right&&N<=j.x||b===Zn.Left&&N>=A.x;if(z&&!h.y){v.scrollTo({left:N,behavior:a});return}z?m.x=v.scrollLeft-N:m.x=b===Zn.Right?v.scrollLeft-j.x:v.scrollLeft-A.x,m.x&&v.scrollBy({left:-m.x,behavior:a});break}else if(R&&_.y!==f.y){const N=v.scrollTop+h.y,z=b===Zn.Down&&N<=j.y||b===Zn.Up&&N>=A.y;if(z&&!h.x){v.scrollTo({top:N,behavior:a});return}z?m.y=v.scrollTop-N:m.y=b===Zn.Down?v.scrollTop-j.y:v.scrollTop-A.y,m.y&&v.scrollBy({top:-m.y,behavior:a});break}}this.handleMove(e,$h(_3(f,this.referenceCoordinates),m))}}}handleMove(e,n){const{onMove:r}=this.props;e.preventDefault(),r(n)}handleEnd(e){const{onEnd:n}=this.props;e.preventDefault(),this.detach(),n()}handleCancel(e){const{onCancel:n}=this.props;e.preventDefault(),this.detach(),n()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}}zee.activators=[{eventName:"onKeyDown",handler:(t,e,n)=>{let{keyboardCodes:r=Fee,onActivation:s}=e,{active:o}=n;const{code:i}=t.nativeEvent;if(r.start.includes(i)){const a=o.activatorNode.current;return a&&t.target!==a?!1:(t.preventDefault(),s==null||s({event:t.nativeEvent}),!0)}return!1}}];function GP(t){return!!(t&&"distance"in t)}function KP(t){return!!(t&&"delay"in t)}class dR{constructor(e,n,r){var s;r===void 0&&(r=pje(e.event.target)),this.props=void 0,this.events=void 0,this.autoScrollEnabled=!0,this.document=void 0,this.activated=!1,this.initialCoordinates=void 0,this.timeoutId=null,this.listeners=void 0,this.documentListeners=void 0,this.windowListeners=void 0,this.props=e,this.events=n;const{event:o}=e,{target:i}=o;this.props=e,this.events=n,this.document=Um(i),this.documentListeners=new Y0(this.document),this.listeners=new Y0(r),this.windowListeners=new Y0(Fo(i)),this.initialCoordinates=(s=am(o))!=null?s:$a,this.handleStart=this.handleStart.bind(this),this.handleMove=this.handleMove.bind(this),this.handleEnd=this.handleEnd.bind(this),this.handleCancel=this.handleCancel.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.removeTextSelection=this.removeTextSelection.bind(this),this.attach()}attach(){const{events:e,props:{options:{activationConstraint:n,bypassActivationConstraint:r}}}=this;if(this.listeners.add(e.move.name,this.handleMove,{passive:!1}),this.listeners.add(e.end.name,this.handleEnd),e.cancel&&this.listeners.add(e.cancel.name,this.handleCancel),this.windowListeners.add(Ui.Resize,this.handleCancel),this.windowListeners.add(Ui.DragStart,YP),this.windowListeners.add(Ui.VisibilityChange,this.handleCancel),this.windowListeners.add(Ui.ContextMenu,YP),this.documentListeners.add(Ui.Keydown,this.handleKeydown),n){if(r!=null&&r({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(KP(n)){this.timeoutId=setTimeout(this.handleStart,n.delay),this.handlePending(n);return}if(GP(n)){this.handlePending(n);return}}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),this.timeoutId!==null&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handlePending(e,n){const{active:r,onPending:s}=this.props;s(r,e,this.initialCoordinates,n)}handleStart(){const{initialCoordinates:e}=this,{onStart:n}=this.props;e&&(this.activated=!0,this.documentListeners.add(Ui.Click,hje,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(Ui.SelectionChange,this.removeTextSelection),n(e))}handleMove(e){var n;const{activated:r,initialCoordinates:s,props:o}=this,{onMove:i,options:{activationConstraint:a}}=o;if(!s)return;const l=(n=am(e))!=null?n:$a,c=_3(s,l);if(!r&&a){if(GP(a)){if(a.tolerance!=null&&Ak(c,a.tolerance))return this.handleCancel();if(Ak(c,a.distance))return this.handleStart()}if(KP(a)&&Ak(c,a.tolerance))return this.handleCancel();this.handlePending(a,c);return}e.cancelable&&e.preventDefault(),i(l)}handleEnd(){const{onAbort:e,onEnd:n}=this.props;this.detach(),this.activated||e(this.props.active),n()}handleCancel(){const{onAbort:e,onCancel:n}=this.props;this.detach(),this.activated||e(this.props.active),n()}handleKeydown(e){e.code===Zn.Esc&&this.handleCancel()}removeTextSelection(){var e;(e=this.document.getSelection())==null||e.removeAllRanges()}}const gje={cancel:{name:"pointercancel"},move:{name:"pointermove"},end:{name:"pointerup"}};class Pee extends dR{constructor(e){const{event:n}=e,r=Um(n.target);super(e,gje,r)}}Pee.activators=[{eventName:"onPointerDown",handler:(t,e)=>{let{nativeEvent:n}=t,{onActivation:r}=e;return!n.isPrimary||n.button!==0?!1:(r==null||r({event:n}),!0)}}];const yje={move:{name:"mousemove"},end:{name:"mouseup"}};var ST;(function(t){t[t.RightClick=2]="RightClick"})(ST||(ST={}));class fS extends dR{constructor(e){super(e,yje,Um(e.event.target))}}fS.activators=[{eventName:"onMouseDown",handler:(t,e)=>{let{nativeEvent:n}=t,{onActivation:r}=e;return n.button===ST.RightClick?!1:(r==null||r({event:n}),!0)}}];const _k={cancel:{name:"touchcancel"},move:{name:"touchmove"},end:{name:"touchend"}};class fR extends dR{constructor(e){super(e,_k)}static setup(){return window.addEventListener(_k.move.name,e,{capture:!1,passive:!1}),function(){window.removeEventListener(_k.move.name,e)};function e(){}}}fR.activators=[{eventName:"onTouchStart",handler:(t,e)=>{let{nativeEvent:n}=t,{onActivation:r}=e;const{touches:s}=n;return s.length>1?!1:(r==null||r({event:n}),!0)}}];var G0;(function(t){t[t.Pointer=0]="Pointer",t[t.DraggableRect=1]="DraggableRect"})(G0||(G0={}));var D3;(function(t){t[t.TreeOrder=0]="TreeOrder",t[t.ReversedTreeOrder=1]="ReversedTreeOrder"})(D3||(D3={}));function vje(t){let{acceleration:e,activator:n=G0.Pointer,canScroll:r,draggingRect:s,enabled:o,interval:i=5,order:a=D3.TreeOrder,pointerCoordinates:l,scrollableAncestors:c,scrollableAncestorRects:u,delta:f,threshold:h}=t;const m=xje({delta:f,disabled:!o}),[y,v]=$Me(),b=S.useRef({x:0,y:0}),w=S.useRef({x:0,y:0}),C=S.useMemo(()=>{switch(n){case G0.Pointer:return l?{top:l.y,bottom:l.y,left:l.x,right:l.x}:null;case G0.DraggableRect:return s}},[n,s,l]),k=S.useRef(null),E=S.useCallback(()=>{const A=k.current;if(!A)return;const M=b.current.x*w.current.x,_=b.current.y*w.current.y;A.scrollBy(M,_)},[]),j=S.useMemo(()=>a===D3.TreeOrder?[...c].reverse():c,[a,c]);S.useEffect(()=>{if(!o||!c.length||!C){v();return}for(const A of j){if((r==null?void 0:r(A))===!1)continue;const M=c.indexOf(A),_=u[M];if(!_)continue;const{direction:D,speed:R}=lje(A,_,C,e,h);for(const N of["x","y"])m[N][D[N]]||(R[N]=0,D[N]=0);if(R.x>0||R.y>0){v(),k.current=A,y(E,i),b.current=R,w.current=D;return}}b.current={x:0,y:0},w.current={x:0,y:0},v()},[e,E,r,v,o,i,JSON.stringify(C),JSON.stringify(m),y,c,j,u,JSON.stringify(h)])}const bje={x:{[Is.Backward]:!1,[Is.Forward]:!1},y:{[Is.Backward]:!1,[Is.Forward]:!1}};function xje(t){let{delta:e,disabled:n}=t;const r=A3(e);return q2(s=>{if(n||!r||!s)return bje;const o={x:Math.sign(e.x-r.x),y:Math.sign(e.y-r.y)};return{x:{[Is.Backward]:s.x[Is.Backward]||o.x===-1,[Is.Forward]:s.x[Is.Forward]||o.x===1},y:{[Is.Backward]:s.y[Is.Backward]||o.y===-1,[Is.Forward]:s.y[Is.Forward]||o.y===1}}},[n,e,r])}function wje(t,e){const n=e!=null?t.get(e):void 0,r=n?n.node.current:null;return q2(s=>{var o;return e==null?null:(o=r??s)!=null?o:null},[r,e])}function Sje(t,e){return S.useMemo(()=>t.reduce((n,r)=>{const{sensor:s}=r,o=s.activators.map(i=>({eventName:i.eventName,handler:e(i.handler,r)}));return[...n,...o]},[]),[t,e])}var Dg;(function(t){t[t.Always=0]="Always",t[t.BeforeDragging=1]="BeforeDragging",t[t.WhileDragging=2]="WhileDragging"})(Dg||(Dg={}));var CT;(function(t){t.Optimized="optimized"})(CT||(CT={}));const XP=new Map;function Cje(t,e){let{dragging:n,dependencies:r,config:s}=e;const[o,i]=S.useState(null),{frequency:a,measure:l,strategy:c}=s,u=S.useRef(t),f=b(),h=_g(f),m=S.useCallback(function(w){w===void 0&&(w=[]),!h.current&&i(C=>C===null?w:C.concat(w.filter(k=>!C.includes(k))))},[h]),y=S.useRef(null),v=q2(w=>{if(f&&!n)return XP;if(!w||w===XP||u.current!==t||o!=null){const C=new Map;for(let k of t){if(!k)continue;if(o&&o.length>0&&!o.includes(k.id)&&k.rect.current){C.set(k.id,k.rect.current);continue}const E=k.node.current,j=E?new uR(l(E),E):null;k.rect.current=j,j&&C.set(k.id,j)}return C}return w},[t,o,n,f,l]);return S.useEffect(()=>{u.current=t},[t]),S.useEffect(()=>{f||m()},[n,f]),S.useEffect(()=>{o&&o.length>0&&i(null)},[JSON.stringify(o)]),S.useEffect(()=>{f||typeof a!="number"||y.current!==null||(y.current=setTimeout(()=>{m(),y.current=null},a))},[a,f,m,...r]),{droppableRects:v,measureDroppableContainers:m,measuringScheduled:o!=null};function b(){switch(c){case Dg.Always:return!1;case Dg.BeforeDragging:return n;default:return!n}}}function pR(t,e){return q2(n=>t?n||(typeof e=="function"?e(t):t):null,[e,t])}function kje(t,e){return pR(t,e)}function Eje(t){let{callback:e,disabled:n}=t;const r=uS(e),s=S.useMemo(()=>{if(n||typeof window>"u"||typeof window.MutationObserver>"u")return;const{MutationObserver:o}=window;return new o(r)},[r,n]);return S.useEffect(()=>()=>s==null?void 0:s.disconnect(),[s]),s}function pS(t){let{callback:e,disabled:n}=t;const r=uS(e),s=S.useMemo(()=>{if(n||typeof window>"u"||typeof window.ResizeObserver>"u")return;const{ResizeObserver:o}=window;return new o(r)},[n]);return S.useEffect(()=>()=>s==null?void 0:s.disconnect(),[s]),s}function Tje(t){return new uR(Vm(t),t)}function ZP(t,e,n){e===void 0&&(e=Tje);const[r,s]=S.useState(null);function o(){s(l=>{if(!t)return null;if(t.isConnected===!1){var c;return(c=l??n)!=null?c:null}const u=e(t);return JSON.stringify(l)===JSON.stringify(u)?l:u})}const i=Eje({callback(l){if(t)for(const c of l){const{type:u,target:f}=c;if(u==="childList"&&f instanceof HTMLElement&&f.contains(t)){o();break}}}}),a=pS({callback:o});return La(()=>{o(),t?(a==null||a.observe(t),i==null||i.observe(document.body,{childList:!0,subtree:!0})):(a==null||a.disconnect(),i==null||i.disconnect())},[t]),r}function Mje(t){const e=pR(t);return Aee(t,e)}const QP=[];function jje(t){const e=S.useRef(t),n=q2(r=>t?r&&r!==QP&&t&&e.current&&t.parentNode===e.current.parentNode?r:cR(t):QP,[t]);return S.useEffect(()=>{e.current=t},[t]),n}function Aje(t){const[e,n]=S.useState(null),r=S.useRef(t),s=S.useCallback(o=>{const i=jk(o.target);i&&n(a=>a?(a.set(i,wT(i)),new Map(a)):null)},[]);return S.useEffect(()=>{const o=r.current;if(t!==o){i(o);const a=t.map(l=>{const c=jk(l);return c?(c.addEventListener("scroll",s,{passive:!0}),[c,wT(c)]):null}).filter(l=>l!=null);n(a.length?new Map(a):null),r.current=t}return()=>{i(t),i(o)};function i(a){a.forEach(l=>{const c=jk(l);c==null||c.removeEventListener("scroll",s)})}},[s,t]),S.useMemo(()=>t.length?e?Array.from(e.values()).reduce((o,i)=>$h(o,i),$a):Lee(t):$a,[t,e])}function JP(t,e){e===void 0&&(e=[]);const n=S.useRef(null);return S.useEffect(()=>{n.current=null},e),S.useEffect(()=>{const r=t!==$a;r&&!n.current&&(n.current=t),!r&&n.current&&(n.current=null)},[t]),n.current?_3(t,n.current):$a}function _je(t){S.useEffect(()=>{if(!cS)return;const e=t.map(n=>{let{sensor:r}=n;return r.setup==null?void 0:r.setup()});return()=>{for(const n of e)n==null||n()}},t.map(e=>{let{sensor:n}=e;return n}))}function Rje(t,e){return S.useMemo(()=>t.reduce((n,r)=>{let{eventName:s,handler:o}=r;return n[s]=i=>{o(i,e)},n},{}),[t,e])}function Bee(t){return S.useMemo(()=>t?sje(t):null,[t])}const eB=[];function Dje(t,e){e===void 0&&(e=Vm);const[n]=t,r=Bee(n?Fo(n):null),[s,o]=S.useState(eB);function i(){o(()=>t.length?t.map(l=>Oee(l)?r:new uR(e(l),l)):eB)}const a=pS({callback:i});return La(()=>{a==null||a.disconnect(),i(),t.forEach(l=>a==null?void 0:a.observe(l))},[t]),s}function Hee(t){if(!t)return null;if(t.children.length>1)return t;const e=t.children[0];return V2(e)?e:t}function Ije(t){let{measure:e}=t;const[n,r]=S.useState(null),s=S.useCallback(c=>{for(const{target:u}of c)if(V2(u)){r(f=>{const h=e(u);return f?{...f,width:h.width,height:h.height}:h});break}},[e]),o=pS({callback:s}),i=S.useCallback(c=>{const u=Hee(c);o==null||o.disconnect(),u&&(o==null||o.observe(u)),r(u?e(u):null)},[e,o]),[a,l]=j3(i);return S.useMemo(()=>({nodeRef:a,rect:n,setRef:l}),[n,a,l])}const Oje=[{sensor:Pee,options:{}},{sensor:zee,options:{}}],Nje={current:{}},xx={draggable:{measure:WP},droppable:{measure:WP,strategy:Dg.WhileDragging,frequency:CT.Optimized},dragOverlay:{measure:Vm}};class K0 extends Map{get(e){var n;return e!=null&&(n=super.get(e))!=null?n:void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter(e=>{let{disabled:n}=e;return!n})}getNodeFor(e){var n,r;return(n=(r=this.get(e))==null?void 0:r.node.current)!=null?n:void 0}}const Lje={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new K0,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:R3},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:xx,measureDroppableContainers:R3,windowRect:null,measuringScheduled:!1},Uee={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:R3,draggableNodes:new Map,over:null,measureDroppableContainers:R3},Y2=S.createContext(Uee),Vee=S.createContext(Lje);function $je(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new K0}}}function Fje(t,e){switch(e.type){case js.DragStart:return{...t,draggable:{...t.draggable,initialCoordinates:e.initialCoordinates,active:e.active}};case js.DragMove:return t.draggable.active==null?t:{...t,draggable:{...t.draggable,translate:{x:e.coordinates.x-t.draggable.initialCoordinates.x,y:e.coordinates.y-t.draggable.initialCoordinates.y}}};case js.DragEnd:case js.DragCancel:return{...t,draggable:{...t.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case js.RegisterDroppable:{const{element:n}=e,{id:r}=n,s=new K0(t.droppable.containers);return s.set(r,n),{...t,droppable:{...t.droppable,containers:s}}}case js.SetDroppableDisabled:{const{id:n,key:r,disabled:s}=e,o=t.droppable.containers.get(n);if(!o||r!==o.key)return t;const i=new K0(t.droppable.containers);return i.set(n,{...o,disabled:s}),{...t,droppable:{...t.droppable,containers:i}}}case js.UnregisterDroppable:{const{id:n,key:r}=e,s=t.droppable.containers.get(n);if(!s||r!==s.key)return t;const o=new K0(t.droppable.containers);return o.delete(n),{...t,droppable:{...t.droppable,containers:o}}}default:return t}}function zje(t){let{disabled:e}=t;const{active:n,activatorEvent:r,draggableNodes:s}=S.useContext(Y2),o=A3(r),i=A3(n==null?void 0:n.id);return S.useEffect(()=>{if(!e&&!r&&o&&i!=null){if(!dS(o)||document.activeElement===o.target)return;const a=s.get(i);if(!a)return;const{activatorNode:l,node:c}=a;if(!l.current&&!c.current)return;requestAnimationFrame(()=>{for(const u of[l.current,c.current]){if(!u)continue;const f=PMe(u);if(f){f.focus();break}}})}},[r,e,s,i,o]),null}function qee(t,e){let{transform:n,...r}=e;return t!=null&&t.length?t.reduce((s,o)=>o({transform:s,...r}),n):n}function Pje(t){return S.useMemo(()=>({draggable:{...xx.draggable,...t==null?void 0:t.draggable},droppable:{...xx.droppable,...t==null?void 0:t.droppable},dragOverlay:{...xx.dragOverlay,...t==null?void 0:t.dragOverlay}}),[t==null?void 0:t.draggable,t==null?void 0:t.droppable,t==null?void 0:t.dragOverlay])}function Bje(t){let{activeNode:e,measure:n,initialRect:r,config:s=!0}=t;const o=S.useRef(!1),{x:i,y:a}=typeof s=="boolean"?{x:s,y:s}:s;La(()=>{if(!i&&!a||!e){o.current=!1;return}if(o.current||!r)return;const c=e==null?void 0:e.node.current;if(!c||c.isConnected===!1)return;const u=n(c),f=Aee(u,r);if(i||(f.x=0),a||(f.y=0),o.current=!0,Math.abs(f.x)>0||Math.abs(f.y)>0){const h=Ree(c);h&&h.scrollBy({top:f.y,left:f.x})}},[e,i,a,r,n])}const hS=S.createContext({...$a,scaleX:1,scaleY:1});var Ru;(function(t){t[t.Uninitialized=0]="Uninitialized",t[t.Initializing=1]="Initializing",t[t.Initialized=2]="Initialized"})(Ru||(Ru={}));const hR=S.memo(function(e){var n,r,s,o;let{id:i,accessibility:a,autoScroll:l=!0,children:c,sensors:u=Oje,collisionDetection:f=lR,measuring:h,modifiers:m,...y}=e;const v=S.useReducer(Fje,void 0,$je),[b,w]=v,[C,k]=qMe(),[E,j]=S.useState(Ru.Uninitialized),A=E===Ru.Initialized,{draggable:{active:M,nodes:_,translate:D},droppable:{containers:R}}=b,N=M!=null?_.get(M):null,z=S.useRef({initial:null,translated:null}),B=S.useMemo(()=>{var jt;return M!=null?{id:M,data:(jt=N==null?void 0:N.data)!=null?jt:Nje,rect:z}:null},[M,N]),L=S.useRef(null),[P,I]=S.useState(null),[H,$]=S.useState(null),V=_g(y,Object.values(y)),q=W2("DndDescribedBy",i),U=S.useMemo(()=>R.getEnabled(),[R]),W=Pje(h),{droppableRects:Y,measureDroppableContainers:G,measuringScheduled:K}=Cje(U,{dragging:A,dependencies:[D.x,D.y],config:W.droppable}),Q=wje(_,M),Z=S.useMemo(()=>H?am(H):null,[H]),J=kt(),ne=kje(Q,W.draggable.measure);Bje({activeNode:M!=null?_.get(M):null,config:J.layoutShiftCompensation,initialRect:ne,measure:W.draggable.measure});const se=ZP(Q,W.draggable.measure,ne),ce=ZP(Q?Q.parentElement:null),fe=S.useRef({activatorEvent:null,active:null,activeNode:Q,collisionRect:null,collisions:null,droppableRects:Y,draggableNodes:_,draggingNode:null,draggingNodeRect:null,droppableContainers:R,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),le=R.getNodeFor((n=fe.current.over)==null?void 0:n.id),be=Ije({measure:W.dragOverlay.measure}),je=(r=be.nodeRef.current)!=null?r:Q,pe=A?(s=be.rect)!=null?s:se:null,_e=!!(be.nodeRef.current&&be.rect),Ce=Mje(_e?null:se),Te=Bee(je?Fo(je):null),Ae=jje(A?le??Q:null),Ze=Dje(Ae),He=qee(m,{transform:{x:D.x-Ce.x,y:D.y-Ce.y,scaleX:1,scaleY:1},activatorEvent:H,active:B,activeNodeRect:se,containerNodeRect:ce,draggingNodeRect:pe,over:fe.current.over,overlayNodeRect:be.rect,scrollableAncestors:Ae,scrollableAncestorRects:Ze,windowRect:Te}),lt=Z?$h(Z,D):null,Ye=Aje(Ae),ge=JP(Ye),Fe=JP(Ye,[se]),Se=$h(He,ge),qe=pe?tje(pe,He):null,ot=B&&qe?f({active:B,collisionRect:qe,droppableRects:Y,droppableContainers:U,pointerCoordinates:lt}):null,$e=ZMe(ot,"id"),[pt,gt]=S.useState(null),Pt=_e?He:$h(He,Fe),at=JMe(Pt,(o=pt==null?void 0:pt.rect)!=null?o:null,se),nt=S.useRef(null),We=S.useCallback((jt,vt)=>{let{sensor:Yt,options:Vt}=vt;if(L.current==null)return;const Nt=_.get(L.current);if(!Nt)return;const Ht=jt.nativeEvent,cn=new Yt({active:L.current,activeNode:Nt,event:Ht,options:Vt,context:fe,onAbort(Kt){if(!_.get(Kt))return;const{onDragAbort:ee}=V.current,ae={id:Kt};ee==null||ee(ae),C({type:"onDragAbort",event:ae})},onPending(Kt,yn,ee,ae){if(!_.get(Kt))return;const{onDragPending:Ee}=V.current,De={id:Kt,constraint:yn,initialCoordinates:ee,offset:ae};Ee==null||Ee(De),C({type:"onDragPending",event:De})},onStart(Kt){const yn=L.current;if(yn==null)return;const ee=_.get(yn);if(!ee)return;const{onDragStart:ae}=V.current,de={activatorEvent:Ht,active:{id:yn,data:ee.data,rect:z}};Xo.unstable_batchedUpdates(()=>{ae==null||ae(de),j(Ru.Initializing),w({type:js.DragStart,initialCoordinates:Kt,active:yn}),C({type:"onDragStart",event:de}),I(nt.current),$(Ht)})},onMove(Kt){w({type:js.DragMove,coordinates:Kt})},onEnd:qt(js.DragEnd),onCancel:qt(js.DragCancel)});nt.current=cn;function qt(Kt){return async function(){const{active:ee,collisions:ae,over:de,scrollAdjustedTranslate:Ee}=fe.current;let De=null;if(ee&&Ee){const{cancelDrop:Qe}=V.current;De={activatorEvent:Ht,active:ee,collisions:ae,delta:Ee,over:de},Kt===js.DragEnd&&typeof Qe=="function"&&await Promise.resolve(Qe(De))&&(Kt=js.DragCancel)}L.current=null,Xo.unstable_batchedUpdates(()=>{w({type:Kt}),j(Ru.Uninitialized),gt(null),I(null),$(null),nt.current=null;const Qe=Kt===js.DragEnd?"onDragEnd":"onDragCancel";if(De){const mt=V.current[Qe];mt==null||mt(De),C({type:Qe,event:De})}})}}},[_]),At=S.useCallback((jt,vt)=>(Yt,Vt)=>{const Nt=Yt.nativeEvent,Ht=_.get(Vt);if(L.current!==null||!Ht||Nt.dndKit||Nt.defaultPrevented)return;const cn={active:Ht};jt(Yt,vt.options,cn)===!0&&(Nt.dndKit={capturedBy:vt.sensor},L.current=Vt,We(Yt,vt))},[_,We]),St=Sje(u,At);_je(u),La(()=>{se&&E===Ru.Initializing&&j(Ru.Initialized)},[se,E]),S.useEffect(()=>{const{onDragMove:jt}=V.current,{active:vt,activatorEvent:Yt,collisions:Vt,over:Nt}=fe.current;if(!vt||!Yt)return;const Ht={active:vt,activatorEvent:Yt,collisions:Vt,delta:{x:Se.x,y:Se.y},over:Nt};Xo.unstable_batchedUpdates(()=>{jt==null||jt(Ht),C({type:"onDragMove",event:Ht})})},[Se.x,Se.y]),S.useEffect(()=>{const{active:jt,activatorEvent:vt,collisions:Yt,droppableContainers:Vt,scrollAdjustedTranslate:Nt}=fe.current;if(!jt||L.current==null||!vt||!Nt)return;const{onDragOver:Ht}=V.current,cn=Vt.get($e),qt=cn&&cn.rect.current?{id:cn.id,rect:cn.rect.current,data:cn.data,disabled:cn.disabled}:null,Kt={active:jt,activatorEvent:vt,collisions:Yt,delta:{x:Nt.x,y:Nt.y},over:qt};Xo.unstable_batchedUpdates(()=>{gt(qt),Ht==null||Ht(Kt),C({type:"onDragOver",event:Kt})})},[$e]),La(()=>{fe.current={activatorEvent:H,active:B,activeNode:Q,collisionRect:qe,collisions:ot,droppableRects:Y,draggableNodes:_,draggingNode:je,draggingNodeRect:pe,droppableContainers:R,over:pt,scrollableAncestors:Ae,scrollAdjustedTranslate:Se},z.current={initial:pe,translated:qe}},[B,Q,ot,qe,_,je,pe,Y,R,pt,Ae,Se]),vje({...J,delta:D,draggingRect:qe,pointerCoordinates:lt,scrollableAncestors:Ae,scrollableAncestorRects:Ze});const Ot=S.useMemo(()=>({active:B,activeNode:Q,activeNodeRect:se,activatorEvent:H,collisions:ot,containerNodeRect:ce,dragOverlay:be,draggableNodes:_,droppableContainers:R,droppableRects:Y,over:pt,measureDroppableContainers:G,scrollableAncestors:Ae,scrollableAncestorRects:Ze,measuringConfiguration:W,measuringScheduled:K,windowRect:Te}),[B,Q,se,H,ot,ce,be,_,R,Y,pt,G,Ae,Ze,W,K,Te]),Tt=S.useMemo(()=>({activatorEvent:H,activators:St,active:B,activeNodeRect:se,ariaDescribedById:{draggable:q},dispatch:w,draggableNodes:_,over:pt,measureDroppableContainers:G}),[H,St,B,se,w,q,_,pt,G]);return It.createElement(Tee.Provider,{value:k},It.createElement(Y2.Provider,{value:Tt},It.createElement(Vee.Provider,{value:Ot},It.createElement(hS.Provider,{value:at},c)),It.createElement(zje,{disabled:(a==null?void 0:a.restoreFocus)===!1})),It.createElement(GMe,{...a,hiddenTextDescribedById:q}));function kt(){const jt=(P==null?void 0:P.autoScrollEnabled)===!1,vt=typeof l=="object"?l.enabled===!1:l===!1,Yt=A&&!jt&&!vt;return typeof l=="object"?{...l,enabled:Yt}:{enabled:Yt}}}),Hje=S.createContext(null),tB="button",Uje="Draggable";function mS(t){let{id:e,data:n,disabled:r=!1,attributes:s}=t;const o=W2(Uje),{activators:i,activatorEvent:a,active:l,activeNodeRect:c,ariaDescribedById:u,draggableNodes:f,over:h}=S.useContext(Y2),{role:m=tB,roleDescription:y="draggable",tabIndex:v=0}=s??{},b=(l==null?void 0:l.id)===e,w=S.useContext(b?hS:Hje),[C,k]=j3(),[E,j]=j3(),A=Rje(i,e),M=_g(n);La(()=>(f.set(e,{id:e,key:o,node:C,activatorNode:E,data:M}),()=>{const D=f.get(e);D&&D.key===o&&f.delete(e)}),[f,e]);const _=S.useMemo(()=>({role:m,tabIndex:v,"aria-disabled":r,"aria-pressed":b&&m===tB?!0:void 0,"aria-roledescription":y,"aria-describedby":u.draggable}),[r,m,v,b,y,u.draggable]);return{active:l,activatorEvent:a,activeNodeRect:c,attributes:_,isDragging:b,listeners:r?void 0:A,node:C,over:h,setNodeRef:k,setActivatorNodeRef:j,transform:w}}function Wee(){return S.useContext(Vee)}const Vje="Droppable",qje={timeout:25};function mR(t){let{data:e,disabled:n=!1,id:r,resizeObserverConfig:s}=t;const o=W2(Vje),{active:i,dispatch:a,over:l,measureDroppableContainers:c}=S.useContext(Y2),u=S.useRef({disabled:n}),f=S.useRef(!1),h=S.useRef(null),m=S.useRef(null),{disabled:y,updateMeasurementsFor:v,timeout:b}={...qje,...s},w=_g(v??r),C=S.useCallback(()=>{if(!f.current){f.current=!0;return}m.current!=null&&clearTimeout(m.current),m.current=setTimeout(()=>{c(Array.isArray(w.current)?w.current:[w.current]),m.current=null},b)},[b]),k=pS({callback:C,disabled:y||!i}),E=S.useCallback((_,D)=>{k&&(D&&(k.unobserve(D),f.current=!1),_&&k.observe(_))},[k]),[j,A]=j3(E),M=_g(e);return S.useEffect(()=>{!k||!j.current||(k.disconnect(),f.current=!1,k.observe(j.current))},[j,k]),S.useEffect(()=>(a({type:js.RegisterDroppable,element:{id:r,key:o,disabled:n,node:j,rect:h,data:M}}),()=>a({type:js.UnregisterDroppable,key:o,id:r})),[r]),S.useEffect(()=>{n!==u.current.disabled&&(a({type:js.SetDroppableDisabled,id:r,key:o,disabled:n}),u.current.disabled=n)},[r,o,n,a]),{active:i,rect:h,isOver:(l==null?void 0:l.id)===r,node:j,over:l,setNodeRef:A}}function Wje(t){let{animation:e,children:n}=t;const[r,s]=S.useState(null),[o,i]=S.useState(null),a=A3(n);return!n&&!r&&a&&s(a),La(()=>{if(!o)return;const l=r==null?void 0:r.key,c=r==null?void 0:r.props.id;if(l==null||c==null){s(null);return}Promise.resolve(e(c,o)).then(()=>{s(null)})},[e,r,o]),It.createElement(It.Fragment,null,n,r?S.cloneElement(r,{ref:i}):null)}const Yje={x:0,y:0,scaleX:1,scaleY:1};function Gje(t){let{children:e}=t;return It.createElement(Y2.Provider,{value:Uee},It.createElement(hS.Provider,{value:Yje},e))}const Kje={position:"fixed",touchAction:"none"},Xje=t=>dS(t)?"transform 250ms ease":void 0,Zje=S.forwardRef((t,e)=>{let{as:n,activatorEvent:r,adjustScale:s,children:o,className:i,rect:a,style:l,transform:c,transition:u=Xje}=t;if(!a)return null;const f=s?c:{...c,scaleX:1,scaleY:1},h={...Kje,width:a.width,height:a.height,top:a.top,left:a.left,transform:Ic.Transform.toString(f),transformOrigin:s&&r?KMe(r,a):void 0,transition:typeof u=="function"?u(r):u,...l};return It.createElement(n,{className:i,style:h,ref:e},o)}),Qje=t=>e=>{let{active:n,dragOverlay:r}=e;const s={},{styles:o,className:i}=t;if(o!=null&&o.active)for(const[a,l]of Object.entries(o.active))l!==void 0&&(s[a]=n.node.style.getPropertyValue(a),n.node.style.setProperty(a,l));if(o!=null&&o.dragOverlay)for(const[a,l]of Object.entries(o.dragOverlay))l!==void 0&&r.node.style.setProperty(a,l);return i!=null&&i.active&&n.node.classList.add(i.active),i!=null&&i.dragOverlay&&r.node.classList.add(i.dragOverlay),function(){for(const[l,c]of Object.entries(s))n.node.style.setProperty(l,c);i!=null&&i.active&&n.node.classList.remove(i.active)}},Jje=t=>{let{transform:{initial:e,final:n}}=t;return[{transform:Ic.Transform.toString(e)},{transform:Ic.Transform.toString(n)}]},eAe={duration:250,easing:"ease",keyframes:Jje,sideEffects:Qje({styles:{active:{opacity:"0"}}})};function tAe(t){let{config:e,draggableNodes:n,droppableContainers:r,measuringConfiguration:s}=t;return uS((o,i)=>{if(e===null)return;const a=n.get(o);if(!a)return;const l=a.node.current;if(!l)return;const c=Hee(i);if(!c)return;const{transform:u}=Fo(i).getComputedStyle(i),f=_ee(u);if(!f)return;const h=typeof e=="function"?e:nAe(e);return $ee(l,s.draggable.measure),h({active:{id:o,data:a.data,node:l,rect:s.draggable.measure(l)},draggableNodes:n,dragOverlay:{node:i,rect:s.dragOverlay.measure(c)},droppableContainers:r,measuringConfiguration:s,transform:f})})}function nAe(t){const{duration:e,easing:n,sideEffects:r,keyframes:s}={...eAe,...t};return o=>{let{active:i,dragOverlay:a,transform:l,...c}=o;if(!e)return;const u={x:a.rect.left-i.rect.left,y:a.rect.top-i.rect.top},f={scaleX:l.scaleX!==1?i.rect.width*l.scaleX/a.rect.width:1,scaleY:l.scaleY!==1?i.rect.height*l.scaleY/a.rect.height:1},h={x:l.x-u.x,y:l.y-u.y,...f},m=s({...c,active:i,dragOverlay:a,transform:{initial:l,final:h}}),[y]=m,v=m[m.length-1];if(JSON.stringify(y)===JSON.stringify(v))return;const b=r==null?void 0:r({active:i,dragOverlay:a,...c}),w=a.node.animate(m,{duration:e,easing:n,fill:"forwards"});return new Promise(C=>{w.onfinish=()=>{b==null||b(),C()}})}}let nB=0;function rAe(t){return S.useMemo(()=>{if(t!=null)return nB++,nB},[t])}const Yee=It.memo(t=>{let{adjustScale:e=!1,children:n,dropAnimation:r,style:s,transition:o,modifiers:i,wrapperElement:a="div",className:l,zIndex:c=999}=t;const{activatorEvent:u,active:f,activeNodeRect:h,containerNodeRect:m,draggableNodes:y,droppableContainers:v,dragOverlay:b,over:w,measuringConfiguration:C,scrollableAncestors:k,scrollableAncestorRects:E,windowRect:j}=Wee(),A=S.useContext(hS),M=rAe(f==null?void 0:f.id),_=qee(i,{activatorEvent:u,active:f,activeNodeRect:h,containerNodeRect:m,draggingNodeRect:b.rect,over:w,overlayNodeRect:b.rect,scrollableAncestors:k,scrollableAncestorRects:E,transform:A,windowRect:j}),D=pR(h),R=tAe({config:r,draggableNodes:y,droppableContainers:v,measuringConfiguration:C}),N=D?b.setRef:void 0;return It.createElement(Gje,null,It.createElement(Wje,{animation:R},f&&M?It.createElement(Zje,{key:M,id:f.id,ref:N,as:a,activatorEvent:u,adjustScale:e,className:l,transition:o,rect:D,style:{zIndex:c,...s},transform:_},n):null))});function sAe(t,e,n){const r={...t};return e.top+t.y<=n.top?r.y=n.top-e.top:e.bottom+t.y>=n.top+n.height&&(r.y=n.top+n.height-e.bottom),e.left+t.x<=n.left?r.x=n.left-e.left:e.right+t.x>=n.left+n.width&&(r.x=n.left+n.width-e.right),r}const oAe=t=>{let{draggingNodeRect:e,transform:n,scrollableAncestorRects:r}=t;const s=r[0];return!e||!s?n:sAe(n,e,s)},iAe=t=>{let{activatorEvent:e,draggingNodeRect:n,transform:r}=t;if(n&&e){const s=am(e);if(!s)return r;const o=s.x-n.left,i=s.y-n.top;return{...r,x:r.x+o-n.width/2,y:r.y+i-n.height/2}}return r};function aAe({type:t,date:e,locale:n,format:r,labelSeparator:s}){const o=i=>Ke(i).locale(n).format(r);return t==="default"?e===null?"":o(e):t==="multiple"?e.map(o).join(", "):t==="range"&&Array.isArray(e)?e[0]&&e[1]?`${o(e[0])} ${s} ${o(e[1])}`:e[0]?`${o(e[0])} ${s} `:"":""}function lAe({formatter:t,...e}){return(t||aAe)(e)}function cAe({direction:t,levelIndex:e,rowIndex:n,cellIndex:r,size:s}){switch(t){case"up":return e===0&&n===0?null:n===0?{levelIndex:e-1,rowIndex:r<=s[e-1][s[e-1].length-1]-1?s[e-1].length-1:s[e-1].length-2,cellIndex:r}:{levelIndex:e,rowIndex:n-1,cellIndex:r};case"down":return n===s[e].length-1?{levelIndex:e+1,rowIndex:0,cellIndex:r}:n===s[e].length-2&&r>=s[e][s[e].length-1]?{levelIndex:e+1,rowIndex:0,cellIndex:r}:{levelIndex:e,rowIndex:n+1,cellIndex:r};case"left":return e===0&&n===0&&r===0?null:n===0&&r===0?{levelIndex:e-1,rowIndex:s[e-1].length-1,cellIndex:s[e-1][s[e-1].length-1]-1}:r===0?{levelIndex:e,rowIndex:n-1,cellIndex:s[e][n-1]-1}:{levelIndex:e,rowIndex:n,cellIndex:r-1};case"right":return n===s[e].length-1&&r===s[e][n]-1?{levelIndex:e+1,rowIndex:0,cellIndex:0}:r===s[e][n]-1?{levelIndex:e,rowIndex:n+1,cellIndex:0}:{levelIndex:e,rowIndex:n,cellIndex:r+1};default:return{levelIndex:e,rowIndex:n,cellIndex:r}}}function Gee({controlsRef:t,direction:e,levelIndex:n,rowIndex:r,cellIndex:s,size:o}){var l,c,u;const i=cAe({direction:e,size:o,rowIndex:r,cellIndex:s,levelIndex:n});if(!i)return;const a=(u=(c=(l=t.current)==null?void 0:l[i.levelIndex])==null?void 0:c[i.rowIndex])==null?void 0:u[i.cellIndex];a&&(a.disabled||a.getAttribute("data-hidden")||a.getAttribute("data-outside")?Gee({controlsRef:t,direction:e,levelIndex:i.levelIndex,cellIndex:i.cellIndex,rowIndex:i.rowIndex,size:o}):a.focus())}function uAe(t){switch(t){case"ArrowDown":return"down";case"ArrowUp":return"up";case"ArrowRight":return"right";case"ArrowLeft":return"left";default:return null}}function dAe(t){var e;return(e=t.current)==null?void 0:e.map(n=>n.map(r=>r.length))}function gR({controlsRef:t,levelIndex:e,rowIndex:n,cellIndex:r,event:s}){const o=uAe(s.key);if(o){s.preventDefault();const i=dAe(t);Gee({controlsRef:t,direction:o,levelIndex:e,rowIndex:n,cellIndex:r,size:i})}}function fo(t){return t==null||t===""?t:Ke(t).format("YYYY-MM-DD")}function Kee(t){return t==null||t===""?t:Ke(t).format("YYYY-MM-DD HH:mm:ss")}function fAe({minDate:t,maxDate:e}){const n=Ke();return!t&&!e?fo(n):t&&Ke(n).isBefore(t)?fo(t):e&&Ke(n).isAfter(e)?fo(e):fo(n)}const Xee={locale:"en",firstDayOfWeek:1,weekendDays:[0,6],labelSeparator:"–",consistentWeeks:!1},Zee=S.createContext(Xee);function pAe({settings:t,children:e}){return d.jsx(Zee.Provider,{value:{...Xee,...t},children:e})}function Ad(){const t=S.useContext(Zee),e=S.useCallback(o=>o||t.locale,[t.locale]),n=S.useCallback(o=>typeof o=="number"?o:t.firstDayOfWeek,[t.firstDayOfWeek]),r=S.useCallback(o=>Array.isArray(o)?o:t.weekendDays,[t.weekendDays]),s=S.useCallback(o=>typeof o=="string"?o:t.labelSeparator,[t.labelSeparator]);return{...t,getLocale:e,getFirstDayOfWeek:n,getWeekendDays:r,getLabelSeparator:s}}function hAe({value:t,type:e,withTime:n}){const r=n?Kee:fo;if(e==="range"&&Array.isArray(t)){const s=r(t[0]),o=r(t[1]);return s?o?`${s} – ${o}`:`${s} –`:""}return e==="multiple"&&Array.isArray(t)?t.filter(Boolean).join(", "):!Array.isArray(t)&&t?r(t):""}function Qee({value:t,type:e,name:n,form:r,withTime:s=!1}){return d.jsx("input",{type:"hidden",value:hAe({value:t,type:e,withTime:s}),name:n,form:r})}Qee.displayName="@mantine/dates/HiddenDatesInput";var Jee={day:"m_396ce5cb"};const mAe=(t,{size:e})=>({day:{"--day-size":an(e,"day-size")}}),yR=Be((t,e)=>{const n=we("Day",null,t),{classNames:r,className:s,style:o,styles:i,unstyled:a,vars:l,date:c,disabled:u,__staticSelector:f,weekend:h,outside:m,selected:y,renderDay:v,inRange:b,firstInRange:w,lastInRange:C,hidden:k,static:E,highlightToday:j,attributes:A,...M}=n,_=Et({name:f||"Day",classes:Jee,props:n,className:s,style:o,classNames:r,styles:i,unstyled:a,attributes:A,vars:l,varsResolver:mAe,rootSelector:"day"});return d.jsx(En,{..._("day",{style:k?{display:"none"}:void 0}),component:E?"div":"button",ref:e,disabled:u,"data-today":Ke(c).isSame(new Date,"day")||void 0,"data-hidden":k||void 0,"data-highlight-today":j||void 0,"data-disabled":u||void 0,"data-weekend":!u&&!m&&h||void 0,"data-outside":!u&&m||void 0,"data-selected":!u&&y||void 0,"data-in-range":b&&!u||void 0,"data-first-in-range":w&&!u||void 0,"data-last-in-range":C&&!u||void 0,"data-static":E||void 0,unstyled:a,...M,children:(v==null?void 0:v(c))||Ke(c).date()})});yR.classes=Jee;yR.displayName="@mantine/dates/Day";function gAe({locale:t,format:e="dd",firstDayOfWeek:n=1}){const r=Ke().day(n),s=[];for(let o=0;o<7;o+=1)typeof e=="string"?s.push(Ke(r).add(o,"days").locale(t).format(e)):s.push(e(Ke(r).add(o,"days").format("YYYY-MM-DD")));return s}var ete={weekday:"m_18a3eca"};const yAe=(t,{size:e})=>({weekdaysRow:{"--wr-fz":Ur(e),"--wr-spacing":ss(e)}}),vR=Be((t,e)=>{const n=we("WeekdaysRow",null,t),{classNames:r,className:s,style:o,styles:i,unstyled:a,vars:l,locale:c,firstDayOfWeek:u,weekdayFormat:f,cellComponent:h="th",__staticSelector:m,withWeekNumbers:y,attributes:v,...b}=n,w=Et({name:m||"WeekdaysRow",classes:ete,props:n,className:s,style:o,classNames:r,styles:i,unstyled:a,attributes:v,vars:l,varsResolver:yAe,rootSelector:"weekdaysRow"}),C=Ad(),k=gAe({locale:C.getLocale(c),format:f,firstDayOfWeek:C.getFirstDayOfWeek(u)}).map((E,j)=>d.jsx(h,{...w("weekday"),children:E},j));return d.jsxs(ie,{component:"tr",ref:e,...w("weekdaysRow"),...b,children:[y&&d.jsx(h,{...w("weekday"),children:"#"}),k]})});vR.classes=ete;vR.displayName="@mantine/dates/WeekdaysRow";function vAe(t,e=1){let n=Ke(t);if(!n.isValid())return n;const r=e===0?6:e-1;for(;n.day()!==r;)n=n.add(1,"day");return n.format("YYYY-MM-DD")}function bAe(t,e=1){let n=Ke(t);for(;n.day()!==e;)n=n.subtract(1,"day");return n.format("YYYY-MM-DD")}function xAe({month:t,firstDayOfWeek:e=1,consistentWeeks:n}){const r=Ke(t).subtract(Ke(t).date()-1,"day"),s=Ke(r.format("YYYY-M-D")),o=s.format("YYYY-MM-DD"),i=s.add(+s.daysInMonth()-1,"day").format("YYYY-MM-DD"),a=vAe(i,e),l=[];let c=Ke(bAe(o,e));for(;Ke(c).isBefore(a,"day");){const u=[];for(let f=0;f<7;f+=1)u.push(c.format("YYYY-MM-DD")),c=c.add(1,"day");l.push(u)}if(n&&l.length<6){const u=l[l.length-1],f=u[u.length-1];let h=Ke(f).add(1,"day");for(;l.length<6;){const m=[];for(let y=0;y<7;y+=1)m.push(h.format("YYYY-MM-DD")),h=h.add(1,"day");l.push(m)}}return l}function bR(t,e){return Ke(t).format("YYYY-MM")===Ke(e).format("YYYY-MM")}function tte(t,e){return e?Ke(t).isAfter(Ke(e).subtract(1,"day"),"day"):!0}function nte(t,e){return e?Ke(t).isBefore(Ke(e).add(1,"day"),"day"):!0}function wAe({dates:t,minDate:e,maxDate:n,getDayProps:r,excludeDate:s,hideOutsideDates:o,month:i}){const a=t.flat().filter(u=>{var f;return nte(u,n)&&tte(u,e)&&!(s!=null&&s(u))&&!((f=r==null?void 0:r(u))!=null&&f.disabled)&&(!o||bR(u,i))}),l=a.find(u=>{var f;return(f=r==null?void 0:r(u))==null?void 0:f.selected});if(l)return l;const c=a.find(u=>Ke().isSame(u,"date"));return c||a[0]}var wx={exports:{}},SAe=wx.exports,rB;function CAe(){return rB||(rB=1,(function(t,e){(function(n,r){t.exports=r()})(SAe,(function(){var n="day";return function(r,s,o){var i=function(c){return c.add(4-c.isoWeekday(),n)},a=s.prototype;a.isoWeekYear=function(){return i(this).year()},a.isoWeek=function(c){if(!this.$utils().u(c))return this.add(7*(c-this.isoWeek()),n);var u,f,h,m,y=i(this),v=(u=this.isoWeekYear(),f=this.$u,h=(f?o.utc:o)().year(u).startOf("year"),m=4-h.isoWeekday(),h.isoWeekday()>4&&(m+=7),h.add(m,n));return y.diff(v,"week")+1},a.isoWeekday=function(c){return this.$utils().u(c)?this.day()||7:this.day(this.day()%7?c:c-7)};var l=a.startOf;a.startOf=function(c,u){var f=this.$utils(),h=!!f.u(u)||u;return f.p(c)==="isoweek"?h?this.date(this.date()-(this.isoWeekday()-1)).startOf("day"):this.date(this.date()-1-(this.isoWeekday()-1)+7).endOf("day"):l.bind(this)(c,u)}}}))})(wx)),wx.exports}var kAe=CAe();const EAe=ks(kAe);Ke.extend(EAe);function TAe(t){const e=t.find(n=>Ke(n).day()===1);return Ke(e).isoWeek()}var rte={month:"m_cc9820d3",monthCell:"m_8f457cd5",weekNumber:"m_6cff9dea"};const MAe={withCellSpacing:!0},jAe=(t,{size:e})=>({weekNumber:{"--wn-fz":Ur(e),"--wn-size":an(e,"wn-size")}}),gS=Be((t,e)=>{const n=we("Month",MAe,t),{classNames:r,className:s,style:o,styles:i,unstyled:a,vars:l,__staticSelector:c,locale:u,firstDayOfWeek:f,weekdayFormat:h,month:m,weekendDays:y,getDayProps:v,excludeDate:b,minDate:w,maxDate:C,renderDay:k,hideOutsideDates:E,hideWeekdays:j,getDayAriaLabel:A,static:M,__getDayRef:_,__onDayKeyDown:D,__onDayClick:R,__onDayMouseEnter:N,__preventFocus:z,__stopPropagation:B,withCellSpacing:L,size:P,highlightToday:I,withWeekNumbers:H,attributes:$,...V}=n,q=Et({name:c||"Month",classes:rte,props:n,className:s,style:o,classNames:r,styles:i,unstyled:a,attributes:$,vars:l,varsResolver:jAe,rootSelector:"month"}),U=Ad(),W=xAe({month:m,firstDayOfWeek:U.getFirstDayOfWeek(f),consistentWeeks:U.consistentWeeks}),Y=wAe({dates:W,minDate:fo(w),maxDate:fo(C),getDayProps:v,excludeDate:b,hideOutsideDates:E,month:m}),{resolvedClassNames:G,resolvedStyles:K}=Ti({classNames:r,styles:i,props:n}),Q=W.map((Z,J)=>{const ne=Z.map((se,ce)=>{const fe=!bR(se,m),le=(A==null?void 0:A(se))||Ke(se).locale(u||U.locale).format("D MMMM YYYY"),be=v==null?void 0:v(se),je=Ke(se).isSame(Y,"date");return d.jsx("td",{...q("monthCell"),"data-with-spacing":L||void 0,children:d.jsx(yR,{__staticSelector:c||"Month",classNames:G,styles:K,unstyled:a,"data-mantine-stop-propagation":B||void 0,highlightToday:I,renderDay:k,date:se,size:P,weekend:U.getWeekendDays(y).includes(Ke(se).get("day")),outside:fe,hidden:E?fe:!1,"aria-label":le,static:M,disabled:(b==null?void 0:b(se))||!nte(se,fo(C))||!tte(se,fo(w)),ref:pe=>{pe&&(_==null||_(J,ce,pe))},...be,onKeyDown:pe=>{var _e;(_e=be==null?void 0:be.onKeyDown)==null||_e.call(be,pe),D==null||D(pe,{rowIndex:J,cellIndex:ce,date:se})},onMouseEnter:pe=>{var _e;(_e=be==null?void 0:be.onMouseEnter)==null||_e.call(be,pe),N==null||N(pe,se)},onClick:pe=>{var _e;(_e=be==null?void 0:be.onClick)==null||_e.call(be,pe),R==null||R(pe,se)},onMouseDown:pe=>{var _e;(_e=be==null?void 0:be.onMouseDown)==null||_e.call(be,pe),z&&pe.preventDefault()},tabIndex:z||!je?-1:0})},se.toString())});return d.jsxs("tr",{...q("monthRow"),children:[H&&d.jsx("td",{...q("weekNumber"),children:TAe(Z)}),ne]},J)});return d.jsxs(ie,{component:"table",...q("month"),size:P,ref:e,...V,children:[!j&&d.jsx("thead",{...q("monthThead"),children:d.jsx(vR,{__staticSelector:c||"Month",locale:u,firstDayOfWeek:f,weekdayFormat:h,size:P,classNames:G,styles:K,unstyled:a,withWeekNumbers:H})}),d.jsx("tbody",{...q("monthTbody"),children:Q})]})});gS.classes=rte;gS.displayName="@mantine/dates/Month";var ste={pickerControl:"m_dc6a3c71"};const AAe=(t,{size:e})=>({pickerControl:{"--dpc-fz":Ur(e),"--dpc-size":an(e,"dpc-size")}}),yS=Be((t,e)=>{const n=we("PickerControl",null,t),{classNames:r,className:s,style:o,styles:i,unstyled:a,vars:l,firstInRange:c,lastInRange:u,inRange:f,__staticSelector:h,selected:m,disabled:y,attributes:v,...b}=n,w=Et({name:h||"PickerControl",classes:ste,props:n,className:s,style:o,classNames:r,styles:i,unstyled:a,attributes:v,vars:l,varsResolver:AAe,rootSelector:"pickerControl"});return d.jsx(En,{...w("pickerControl"),ref:e,unstyled:a,"data-picker-control":!0,"data-selected":m&&!y||void 0,"data-disabled":y||void 0,"data-in-range":f&&!y&&!m||void 0,"data-first-in-range":c&&!y||void 0,"data-last-in-range":u&&!y||void 0,disabled:y,...b})});yS.classes=ste;yS.displayName="@mantine/dates/PickerControl";function ote({year:t,minDate:e,maxDate:n}){return!e&&!n?!1:!!(e&&Ke(t).isBefore(e,"year")||n&&Ke(t).isAfter(n,"year"))}function _Ae({years:t,minDate:e,maxDate:n,getYearControlProps:r}){const s=t.flat().filter(a=>{var l;return!ote({year:a,minDate:e,maxDate:n})&&!((l=r==null?void 0:r(a))!=null&&l.disabled)}),o=s.find(a=>{var l;return(l=r==null?void 0:r(a))==null?void 0:l.selected});if(o)return o;const i=s.find(a=>Ke().isSame(a,"year"));return i||s[0]}function ite(t){const e=Ke(t).year(),n=e-e%10;let r=0;const s=[[],[],[],[]];for(let o=0;o<4;o+=1){const i=o===3?1:3;for(let a=0;a<i;a+=1)s[o].push(Ke(new Date(n+r,0)).format("YYYY-MM-DD")),r+=1}return s}var ate={yearsList:"m_9206547b",yearsListCell:"m_c5a19c7d"};const RAe={yearsListFormat:"YYYY",withCellSpacing:!0},vS=Be((t,e)=>{const n=we("YearsList",RAe,t),{classNames:r,className:s,style:o,styles:i,unstyled:a,vars:l,decade:c,yearsListFormat:u,locale:f,minDate:h,maxDate:m,getYearControlProps:y,__staticSelector:v,__getControlRef:b,__onControlKeyDown:w,__onControlClick:C,__onControlMouseEnter:k,__preventFocus:E,__stopPropagation:j,withCellSpacing:A,size:M,attributes:_,...D}=n,R=Et({name:v||"YearsList",classes:ate,props:n,className:s,style:o,classNames:r,styles:i,unstyled:a,attributes:_,vars:l,rootSelector:"yearsList"}),N=Ad(),z=ite(c),B=_Ae({years:z,minDate:h,maxDate:m,getYearControlProps:y}),L=z.map((P,I)=>{const H=P.map(($,V)=>{const q=y==null?void 0:y($),U=Ke($).isSame(B,"year");return d.jsx("td",{...R("yearsListCell"),"data-with-spacing":A||void 0,children:d.jsx(yS,{...R("yearsListControl"),size:M,unstyled:a,"data-mantine-stop-propagation":j||void 0,disabled:ote({year:$,minDate:h,maxDate:m}),ref:W=>{W&&(b==null||b(I,V,W))},...q,onKeyDown:W=>{var Y;(Y=q==null?void 0:q.onKeyDown)==null||Y.call(q,W),w==null||w(W,{rowIndex:I,cellIndex:V,date:$})},onClick:W=>{var Y;(Y=q==null?void 0:q.onClick)==null||Y.call(q,W),C==null||C(W,$)},onMouseEnter:W=>{var Y;(Y=q==null?void 0:q.onMouseEnter)==null||Y.call(q,W),k==null||k(W,$)},onMouseDown:W=>{var Y;(Y=q==null?void 0:q.onMouseDown)==null||Y.call(q,W),E&&W.preventDefault()},tabIndex:E||!U?-1:0,children:(q==null?void 0:q.children)??Ke($).locale(N.getLocale(f)).format(u)})},V)});return d.jsx("tr",{...R("yearsListRow"),children:H},I)});return d.jsx(ie,{component:"table",ref:e,size:M,...R("yearsList"),...D,children:d.jsx("tbody",{children:L})})});vS.classes=ate;vS.displayName="@mantine/dates/YearsList";function lte({month:t,minDate:e,maxDate:n}){return!e&&!n?!1:!!(e&&Ke(t).isBefore(e,"month")||n&&Ke(t).isAfter(n,"month"))}function DAe({months:t,minDate:e,maxDate:n,getMonthControlProps:r}){const s=t.flat().filter(a=>{var l;return!lte({month:a,minDate:e,maxDate:n})&&!((l=r==null?void 0:r(a))!=null&&l.disabled)}),o=s.find(a=>{var l;return(l=r==null?void 0:r(a))==null?void 0:l.selected});if(o)return o;const i=s.find(a=>Ke().isSame(a,"month"));return i||s[0]}function IAe(t){const e=Ke(t).startOf("year").toDate(),n=[[],[],[],[]];let r=0;for(let s=0;s<4;s+=1)for(let o=0;o<3;o+=1)n[s].push(Ke(e).add(r,"months").format("YYYY-MM-DD")),r+=1;return n}var cte={monthsList:"m_2a6c32d",monthsListCell:"m_fe27622f"};const OAe={monthsListFormat:"MMM",withCellSpacing:!0},bS=Be((t,e)=>{const n=we("MonthsList",OAe,t),{classNames:r,className:s,style:o,styles:i,unstyled:a,vars:l,__staticSelector:c,year:u,monthsListFormat:f,locale:h,minDate:m,maxDate:y,getMonthControlProps:v,__getControlRef:b,__onControlKeyDown:w,__onControlClick:C,__onControlMouseEnter:k,__preventFocus:E,__stopPropagation:j,withCellSpacing:A,size:M,attributes:_,...D}=n,R=Et({name:c||"MonthsList",classes:cte,props:n,className:s,style:o,classNames:r,styles:i,unstyled:a,attributes:_,vars:l,rootSelector:"monthsList"}),N=Ad(),z=IAe(u),B=DAe({months:z,minDate:fo(m),maxDate:fo(y),getMonthControlProps:v}),L=z.map((P,I)=>{const H=P.map(($,V)=>{const q=v==null?void 0:v($),U=Ke($).isSame(B,"month");return d.jsx("td",{...R("monthsListCell"),"data-with-spacing":A||void 0,children:d.jsx(yS,{...R("monthsListControl"),size:M,unstyled:a,__staticSelector:c||"MonthsList","data-mantine-stop-propagation":j||void 0,disabled:lte({month:$,minDate:fo(m),maxDate:fo(y)}),ref:W=>{W&&(b==null||b(I,V,W))},...q,onKeyDown:W=>{var Y;(Y=q==null?void 0:q.onKeyDown)==null||Y.call(q,W),w==null||w(W,{rowIndex:I,cellIndex:V,date:$})},onClick:W=>{var Y;(Y=q==null?void 0:q.onClick)==null||Y.call(q,W),C==null||C(W,$)},onMouseEnter:W=>{var Y;(Y=q==null?void 0:q.onMouseEnter)==null||Y.call(q,W),k==null||k(W,$)},onMouseDown:W=>{var Y;(Y=q==null?void 0:q.onMouseDown)==null||Y.call(q,W),E&&W.preventDefault()},tabIndex:E||!U?-1:0,children:(q==null?void 0:q.children)??Ke($).locale(N.getLocale(h)).format(f)})},V)});return d.jsx("tr",{...R("monthsListRow"),children:H},I)});return d.jsx(ie,{component:"table",ref:e,size:M,...R("monthsList"),...D,children:d.jsx("tbody",{children:L})})});bS.classes=cte;bS.displayName="@mantine/dates/MonthsList";var ute={calendarHeader:"m_730a79ed",calendarHeaderLevel:"m_f6645d97",calendarHeaderControl:"m_2351eeb0",calendarHeaderControlIcon:"m_367dc749"};const NAe={hasNextLevel:!0,withNext:!0,withPrevious:!0,headerControlsOrder:["previous","level","next"]},LAe=(t,{size:e})=>({calendarHeader:{"--dch-control-size":an(e,"dch-control-size"),"--dch-fz":Ur(e)}}),_d=Be((t,e)=>{const n=we("CalendarHeader",NAe,t),{classNames:r,className:s,style:o,styles:i,unstyled:a,vars:l,nextIcon:c,previousIcon:u,nextLabel:f,previousLabel:h,onNext:m,onPrevious:y,onLevelClick:v,label:b,nextDisabled:w,previousDisabled:C,hasNextLevel:k,levelControlAriaLabel:E,withNext:j,withPrevious:A,headerControlsOrder:M,__staticSelector:_,__preventFocus:D,__stopPropagation:R,attributes:N,...z}=n,B=Et({name:_||"CalendarHeader",classes:ute,props:n,className:s,style:o,classNames:r,styles:i,unstyled:a,attributes:N,vars:l,varsResolver:LAe,rootSelector:"calendarHeader"}),L=D?V=>V.preventDefault():void 0,P=A&&S.createElement(En,{...B("calendarHeaderControl"),key:"previous","data-direction":"previous","aria-label":h,onClick:y,unstyled:a,onMouseDown:L,disabled:C,"data-disabled":C||void 0,tabIndex:D||C?-1:0,"data-mantine-stop-propagation":R||void 0},u||d.jsx(Nf,{...B("calendarHeaderControlIcon"),"data-direction":"previous",size:"45%"})),I=S.createElement(En,{component:k?"button":"div",...B("calendarHeaderLevel"),key:"level",onClick:k?v:void 0,unstyled:a,onMouseDown:k?L:void 0,disabled:!k,"data-static":!k||void 0,"aria-label":E,tabIndex:D||!k?-1:0,"data-mantine-stop-propagation":R||void 0},b),H=j&&S.createElement(En,{...B("calendarHeaderControl"),key:"next","data-direction":"next","aria-label":f,onClick:m,unstyled:a,onMouseDown:L,disabled:w,"data-disabled":w||void 0,tabIndex:D||w?-1:0,"data-mantine-stop-propagation":R||void 0},c||d.jsx(Nf,{...B("calendarHeaderControlIcon"),"data-direction":"next",size:"45%"})),$=M.map(V=>V==="previous"?P:V==="level"?I:V==="next"?H:null);return d.jsx(ie,{...B("calendarHeader"),ref:e,...z,children:$})});_d.classes=ute;_d.displayName="@mantine/dates/CalendarHeader";function $Ae(t){const e=ite(t);return[e[0][0],e[3][0]]}const FAe={decadeLabelFormat:"YYYY"},xS=Be((t,e)=>{const n=we("DecadeLevel",FAe,t),{decade:r,locale:s,minDate:o,maxDate:i,yearsListFormat:a,getYearControlProps:l,__getControlRef:c,__onControlKeyDown:u,__onControlClick:f,__onControlMouseEnter:h,withCellSpacing:m,__preventFocus:y,nextIcon:v,previousIcon:b,nextLabel:w,previousLabel:C,onNext:k,onPrevious:E,nextDisabled:j,previousDisabled:A,levelControlAriaLabel:M,withNext:_,withPrevious:D,headerControlsOrder:R,decadeLabelFormat:N,classNames:z,styles:B,unstyled:L,__staticSelector:P,__stopPropagation:I,size:H,attributes:$,...V}=n,q=Ad(),[U,W]=$Ae(r),Y={__staticSelector:P||"DecadeLevel",classNames:z,styles:B,unstyled:L,size:H,attributes:$},G=typeof j=="boolean"?j:i?!Ke(W).endOf("year").isBefore(i):!1,K=typeof A=="boolean"?A:o?!Ke(U).startOf("year").isAfter(o):!1,Q=(Z,J)=>Ke(Z).locale(s||q.locale).format(J);return d.jsxs(ie,{"data-decade-level":!0,size:H,ref:e,...V,children:[d.jsx(_d,{label:typeof N=="function"?N(U,W):`${Q(U,N)} – ${Q(W,N)}`,__preventFocus:y,__stopPropagation:I,nextIcon:v,previousIcon:b,nextLabel:w,previousLabel:C,onNext:k,onPrevious:E,nextDisabled:G,previousDisabled:K,hasNextLevel:!1,levelControlAriaLabel:M,withNext:_,withPrevious:D,headerControlsOrder:R,...Y}),d.jsx(vS,{decade:r,locale:s,minDate:o,maxDate:i,yearsListFormat:a,getYearControlProps:l,__getControlRef:c,__onControlKeyDown:u,__onControlClick:f,__onControlMouseEnter:h,__preventFocus:y,__stopPropagation:I,withCellSpacing:m,...Y})]})});xS.classes={...vS.classes,..._d.classes};xS.displayName="@mantine/dates/DecadeLevel";const zAe={yearLabelFormat:"YYYY"},wS=Be((t,e)=>{const n=we("YearLevel",zAe,t),{year:r,locale:s,minDate:o,maxDate:i,monthsListFormat:a,getMonthControlProps:l,__getControlRef:c,__onControlKeyDown:u,__onControlClick:f,__onControlMouseEnter:h,withCellSpacing:m,__preventFocus:y,nextIcon:v,previousIcon:b,nextLabel:w,previousLabel:C,onNext:k,onPrevious:E,onLevelClick:j,nextDisabled:A,previousDisabled:M,hasNextLevel:_,levelControlAriaLabel:D,withNext:R,withPrevious:N,headerControlsOrder:z,yearLabelFormat:B,__staticSelector:L,__stopPropagation:P,size:I,classNames:H,styles:$,unstyled:V,attributes:q,...U}=n,W=Ad(),Y={__staticSelector:L||"YearLevel",classNames:H,styles:$,unstyled:V,size:I,attributes:q},G=typeof A=="boolean"?A:i?!Ke(r).endOf("year").isBefore(i):!1,K=typeof M=="boolean"?M:o?!Ke(r).startOf("year").isAfter(o):!1;return d.jsxs(ie,{"data-year-level":!0,size:I,ref:e,...U,children:[d.jsx(_d,{label:typeof B=="function"?B(r):Ke(r).locale(s||W.locale).format(B),__preventFocus:y,__stopPropagation:P,nextIcon:v,previousIcon:b,nextLabel:w,previousLabel:C,onNext:k,onPrevious:E,onLevelClick:j,nextDisabled:G,previousDisabled:K,hasNextLevel:_,levelControlAriaLabel:D,withNext:R,withPrevious:N,headerControlsOrder:z,...Y}),d.jsx(bS,{year:r,locale:s,minDate:o,maxDate:i,monthsListFormat:a,getMonthControlProps:l,__getControlRef:c,__onControlKeyDown:u,__onControlClick:f,__onControlMouseEnter:h,__preventFocus:y,__stopPropagation:P,withCellSpacing:m,...Y})]})});wS.classes={..._d.classes,...bS.classes};wS.displayName="@mantine/dates/YearLevel";const PAe={monthLabelFormat:"MMMM YYYY"},SS=Be((t,e)=>{const n=we("MonthLevel",PAe,t),{month:r,locale:s,firstDayOfWeek:o,weekdayFormat:i,weekendDays:a,getDayProps:l,excludeDate:c,minDate:u,maxDate:f,renderDay:h,hideOutsideDates:m,hideWeekdays:y,getDayAriaLabel:v,__getDayRef:b,__onDayKeyDown:w,__onDayClick:C,__onDayMouseEnter:k,withCellSpacing:E,highlightToday:j,withWeekNumbers:A,__preventFocus:M,__stopPropagation:_,nextIcon:D,previousIcon:R,nextLabel:N,previousLabel:z,onNext:B,onPrevious:L,onLevelClick:P,nextDisabled:I,previousDisabled:H,hasNextLevel:$,levelControlAriaLabel:V,withNext:q,withPrevious:U,headerControlsOrder:W,monthLabelFormat:Y,classNames:G,styles:K,unstyled:Q,__staticSelector:Z,size:J,static:ne,attributes:se,...ce}=n,fe=Ad(),le={__staticSelector:Z||"MonthLevel",classNames:G,styles:K,unstyled:Q,size:J,attributes:se},be=typeof I=="boolean"?I:f?!Ke(r).endOf("month").isBefore(f):!1,je=typeof H=="boolean"?H:u?!Ke(r).startOf("month").isAfter(u):!1;return d.jsxs(ie,{"data-month-level":!0,size:J,ref:e,...ce,children:[d.jsx(_d,{label:typeof Y=="function"?Y(r):Ke(r).locale(s||fe.locale).format(Y),__preventFocus:M,__stopPropagation:_,nextIcon:D,previousIcon:R,nextLabel:N,previousLabel:z,onNext:B,onPrevious:L,onLevelClick:P,nextDisabled:be,previousDisabled:je,hasNextLevel:$,levelControlAriaLabel:V,withNext:q,withPrevious:U,headerControlsOrder:W,...le}),d.jsx(gS,{month:r,locale:s,firstDayOfWeek:o,weekdayFormat:i,weekendDays:a,getDayProps:l,excludeDate:c,minDate:u,maxDate:f,renderDay:h,hideOutsideDates:m,hideWeekdays:y,getDayAriaLabel:v,__getDayRef:b,__onDayKeyDown:w,__onDayClick:C,__onDayMouseEnter:k,__preventFocus:M,__stopPropagation:_,static:ne,withCellSpacing:E,highlightToday:j,withWeekNumbers:A,...le})]})});SS.classes={...gS.classes,..._d.classes};SS.displayName="@mantine/dates/MonthLevel";var dte={levelsGroup:"m_30b26e33"};const Rd=Be((t,e)=>{const n=we("LevelsGroup",null,t),{classNames:r,className:s,style:o,styles:i,unstyled:a,vars:l,__staticSelector:c,attributes:u,...f}=n,h=Et({name:c||"LevelsGroup",classes:dte,props:n,className:s,style:o,classNames:r,styles:i,unstyled:a,attributes:u,vars:l,rootSelector:"levelsGroup"});return d.jsx(ie,{ref:e,...h("levelsGroup"),...f})});Rd.classes=dte;Rd.displayName="@mantine/dates/LevelsGroup";const BAe={numberOfColumns:1},CS=Be((t,e)=>{const n=we("DecadeLevelGroup",BAe,t),{decade:r,locale:s,minDate:o,maxDate:i,yearsListFormat:a,getYearControlProps:l,__onControlClick:c,__onControlMouseEnter:u,withCellSpacing:f,__preventFocus:h,nextIcon:m,previousIcon:y,nextLabel:v,previousLabel:b,onNext:w,onPrevious:C,nextDisabled:k,previousDisabled:E,headerControlsOrder:j,classNames:A,styles:M,unstyled:_,__staticSelector:D,__stopPropagation:R,numberOfColumns:N,levelControlAriaLabel:z,decadeLabelFormat:B,size:L,vars:P,attributes:I,...H}=n,$=S.useRef([]),V=Array(N).fill(0).map((q,U)=>{const W=Ke(r).add(U*10,"years").format("YYYY-MM-DD");return d.jsx(xS,{size:L,yearsListFormat:a,decade:W,withNext:U===N-1,withPrevious:U===0,decadeLabelFormat:B,__onControlClick:c,__onControlMouseEnter:u,__onControlKeyDown:(Y,G)=>gR({levelIndex:U,rowIndex:G.rowIndex,cellIndex:G.cellIndex,event:Y,controlsRef:$}),__getControlRef:(Y,G,K)=>{Array.isArray($.current[U])||($.current[U]=[]),Array.isArray($.current[U][Y])||($.current[U][Y]=[]),$.current[U][Y][G]=K},levelControlAriaLabel:typeof z=="function"?z(W):z,locale:s,minDate:o,maxDate:i,__preventFocus:h,__stopPropagation:R,nextIcon:m,previousIcon:y,nextLabel:v,previousLabel:b,onNext:w,onPrevious:C,nextDisabled:k,previousDisabled:E,getYearControlProps:l,__staticSelector:D||"DecadeLevelGroup",classNames:A,styles:M,unstyled:_,withCellSpacing:f,headerControlsOrder:j,attributes:I},U)});return d.jsx(Rd,{classNames:A,styles:M,__staticSelector:D||"DecadeLevelGroup",ref:e,size:L,unstyled:_,attributes:I,...H,children:V})});CS.classes={...Rd.classes,...xS.classes};CS.displayName="@mantine/dates/DecadeLevelGroup";const HAe={numberOfColumns:1},kS=Be((t,e)=>{const n=we("YearLevelGroup",HAe,t),{year:r,locale:s,minDate:o,maxDate:i,monthsListFormat:a,getMonthControlProps:l,__onControlClick:c,__onControlMouseEnter:u,withCellSpacing:f,__preventFocus:h,nextIcon:m,previousIcon:y,nextLabel:v,previousLabel:b,onNext:w,onPrevious:C,onLevelClick:k,nextDisabled:E,previousDisabled:j,hasNextLevel:A,headerControlsOrder:M,classNames:_,styles:D,unstyled:R,__staticSelector:N,__stopPropagation:z,numberOfColumns:B,levelControlAriaLabel:L,yearLabelFormat:P,size:I,vars:H,attributes:$,...V}=n,q=S.useRef([]),U=Array(B).fill(0).map((W,Y)=>{const G=Ke(r).add(Y,"years").format("YYYY-MM-DD");return d.jsx(wS,{size:I,monthsListFormat:a,year:G,withNext:Y===B-1,withPrevious:Y===0,yearLabelFormat:P,__stopPropagation:z,__onControlClick:c,__onControlMouseEnter:u,__onControlKeyDown:(K,Q)=>gR({levelIndex:Y,rowIndex:Q.rowIndex,cellIndex:Q.cellIndex,event:K,controlsRef:q}),__getControlRef:(K,Q,Z)=>{Array.isArray(q.current[Y])||(q.current[Y]=[]),Array.isArray(q.current[Y][K])||(q.current[Y][K]=[]),q.current[Y][K][Q]=Z},levelControlAriaLabel:typeof L=="function"?L(G):L,locale:s,minDate:o,maxDate:i,__preventFocus:h,nextIcon:m,previousIcon:y,nextLabel:v,previousLabel:b,onNext:w,onPrevious:C,onLevelClick:k,nextDisabled:E,previousDisabled:j,hasNextLevel:A,getMonthControlProps:l,classNames:_,styles:D,unstyled:R,__staticSelector:N||"YearLevelGroup",withCellSpacing:f,headerControlsOrder:M,attributes:$},Y)});return d.jsx(Rd,{classNames:_,styles:D,__staticSelector:N||"YearLevelGroup",ref:e,size:I,unstyled:R,attributes:$,...V,children:U})});kS.classes={...wS.classes,...Rd.classes};kS.displayName="@mantine/dates/YearLevelGroup";const UAe={numberOfColumns:1},ES=Be((t,e)=>{const n=we("MonthLevelGroup",UAe,t),{month:r,locale:s,firstDayOfWeek:o,weekdayFormat:i,weekendDays:a,getDayProps:l,excludeDate:c,minDate:u,maxDate:f,renderDay:h,hideOutsideDates:m,hideWeekdays:y,getDayAriaLabel:v,__onDayClick:b,__onDayMouseEnter:w,withCellSpacing:C,highlightToday:k,withWeekNumbers:E,__preventFocus:j,nextIcon:A,previousIcon:M,nextLabel:_,previousLabel:D,onNext:R,onPrevious:N,onLevelClick:z,nextDisabled:B,previousDisabled:L,hasNextLevel:P,headerControlsOrder:I,classNames:H,styles:$,unstyled:V,numberOfColumns:q,levelControlAriaLabel:U,monthLabelFormat:W,__staticSelector:Y,__stopPropagation:G,size:K,static:Q,vars:Z,attributes:J,...ne}=n,se=S.useRef([]),ce=Array(q).fill(0).map((fe,le)=>{const be=Ke(r).add(le,"months").format("YYYY-MM-DD");return d.jsx(SS,{month:be,withNext:le===q-1,withPrevious:le===0,monthLabelFormat:W,__stopPropagation:G,__onDayClick:b,__onDayMouseEnter:w,__onDayKeyDown:(je,pe)=>gR({levelIndex:le,rowIndex:pe.rowIndex,cellIndex:pe.cellIndex,event:je,controlsRef:se}),__getDayRef:(je,pe,_e)=>{Array.isArray(se.current[le])||(se.current[le]=[]),Array.isArray(se.current[le][je])||(se.current[le][je]=[]),se.current[le][je][pe]=_e},levelControlAriaLabel:typeof U=="function"?U(be):U,locale:s,firstDayOfWeek:o,weekdayFormat:i,weekendDays:a,getDayProps:l,excludeDate:c,minDate:u,maxDate:f,renderDay:h,hideOutsideDates:m,hideWeekdays:y,getDayAriaLabel:v,__preventFocus:j,nextIcon:A,previousIcon:M,nextLabel:_,previousLabel:D,onNext:R,onPrevious:N,onLevelClick:z,nextDisabled:B,previousDisabled:L,hasNextLevel:P,classNames:H,styles:$,unstyled:V,__staticSelector:Y||"MonthLevelGroup",size:K,static:Q,withCellSpacing:C,highlightToday:k,withWeekNumbers:E,headerControlsOrder:I,attributes:J},le)});return d.jsx(Rd,{classNames:H,styles:$,__staticSelector:Y||"MonthLevelGroup",ref:e,size:K,attributes:J,...ne,children:ce})});ES.classes={...Rd.classes,...SS.classes};ES.displayName="@mantine/dates/MonthLevelGroup";var fte={input:"m_6fa5e2aa"};const TS=Be((t,e)=>{const{inputProps:n,wrapperProps:r,placeholder:s,classNames:o,styles:i,unstyled:a,popoverProps:l,modalProps:c,dropdownType:u,children:f,formattedValue:h,dropdownHandlers:m,dropdownOpened:y,onClick:v,clearable:b,onClear:w,clearButtonProps:C,rightSection:k,shouldClear:E,readOnly:j,disabled:A,value:M,name:_,form:D,type:R,onDropdownClose:N,withTime:z,...B}=lX("PickerInputBase",{size:"sm"},t),L=d.jsx(Hn.ClearButton,{onClick:w,unstyled:a,...C}),P=()=>{R==="range"&&Array.isArray(M)&&M[0]&&!M[1]&&w(),m.close()};return d.jsxs(d.Fragment,{children:[u==="modal"&&!j&&d.jsx(nr,{opened:y,onClose:P,withCloseButton:!1,size:"auto","data-dates-modal":!0,unstyled:a,...c,children:f}),d.jsx(Hn.Wrapper,{...r,children:d.jsxs(Dt,{position:"bottom-start",opened:y,trapFocus:!0,returnFocus:!1,unstyled:a,onClose:N,...l,disabled:(l==null?void 0:l.disabled)||u==="modal"||j,onChange:I=>{var H;I||((H=l==null?void 0:l.onClose)==null||H.call(l),P())},children:[d.jsx(Dt.Target,{children:d.jsx(Hn,{"data-dates-input":!0,"data-read-only":j||void 0,disabled:A,component:"button",type:"button",multiline:!0,onClick:I=>{v==null||v(I),m.toggle()},__clearSection:L,__clearable:b&&E&&!j&&!A,rightSection:k,...n,ref:e,classNames:{...o,input:Fr(fte.input,o==null?void 0:o.input)},...B,children:h||d.jsx(Hn.Placeholder,{error:n.error,unstyled:a,classNames:o,styles:i,__staticSelector:n.__staticSelector,children:s})})}),d.jsx(Dt.Dropdown,{"data-dates-dropdown":!0,children:f})]})}),d.jsx(Qee,{value:M,name:_,form:D,type:R,withTime:z})]})});TS.classes=fte;TS.displayName="@mantine/dates/PickerInputBase";const sB=t=>t==="range"?[null,null]:t==="multiple"?[]:null,oB=(t,e)=>{const n=e?Kee:fo;return Array.isArray(t)?t.map(n):n(t)};function xR({type:t,value:e,defaultValue:n,onChange:r,withTime:s=!1}){const o=S.useRef(t),[i,a,l]=ls({value:oB(e,s),defaultValue:oB(n,s),finalValue:sB(t),onChange:r});let c=i;return o.current!==t&&(o.current=t,e===void 0&&(c=n!==void 0?n:sB(t),a(c))),[c,a,l]}function Rk(t,e){return t?t==="month"?0:t==="year"?1:2:e||0}function VAe(t){return t===0?"month":t===1?"year":"decade"}function a0(t,e,n){return VAe(fg(Rk(t,0),Rk(e,0),Rk(n,2)))}const qAe={maxLevel:"decade",minLevel:"month",__updateDateOnYearSelect:!0,__updateDateOnMonthSelect:!0,enableKeyboardNavigation:!0},G2=Be((t,e)=>{const n=we("Calendar",qAe,t),{vars:r,maxLevel:s,minLevel:o,defaultLevel:i,level:a,onLevelChange:l,date:c,defaultDate:u,onDateChange:f,numberOfColumns:h,columnsToScroll:m,ariaLabels:y,nextLabel:v,previousLabel:b,onYearSelect:w,onMonthSelect:C,onYearMouseEnter:k,onMonthMouseEnter:E,headerControlsOrder:j,__updateDateOnYearSelect:A,__updateDateOnMonthSelect:M,__setDateRef:_,__setLevelRef:D,firstDayOfWeek:R,weekdayFormat:N,weekendDays:z,getDayProps:B,excludeDate:L,renderDay:P,hideOutsideDates:I,hideWeekdays:H,getDayAriaLabel:$,monthLabelFormat:V,nextIcon:q,previousIcon:U,__onDayClick:W,__onDayMouseEnter:Y,withCellSpacing:G,highlightToday:K,withWeekNumbers:Q,monthsListFormat:Z,getMonthControlProps:J,yearLabelFormat:ne,yearsListFormat:se,getYearControlProps:ce,decadeLabelFormat:fe,classNames:le,styles:be,unstyled:je,minDate:pe,maxDate:_e,locale:Ce,__staticSelector:Te,size:Ae,__preventFocus:Ze,__stopPropagation:He,onNextDecade:lt,onPreviousDecade:Ye,onNextYear:ge,onPreviousYear:Fe,onNextMonth:Se,onPreviousMonth:qe,static:ot,enableKeyboardNavigation:$e,attributes:pt,...gt}=n,{resolvedClassNames:Pt,resolvedStyles:at}=Ti({classNames:le,styles:be,props:n}),[nt,We]=ls({value:a?a0(a,o,s):void 0,defaultValue:i?a0(i,o,s):void 0,finalValue:a0(void 0,o,s),onChange:l}),[At,St]=xR({type:"default",value:fo(c),defaultValue:fo(u),onChange:f});S.useImperativeHandle(_,()=>ee=>{St(ee)}),S.useImperativeHandle(D,()=>ee=>{We(ee)});const Ot={__staticSelector:Te||"Calendar",styles:at,classNames:Pt,unstyled:je,size:Ae,attributes:pt},Tt=m||h||1,kt=new Date,jt=pe&&Ke(kt).isAfter(pe)?pe:Ke(kt).format("YYYY-MM-DD"),vt=At||jt,Yt=()=>{const ee=Ke(vt).add(Tt,"month").format("YYYY-MM-DD");Se==null||Se(ee),St(ee)},Vt=()=>{const ee=Ke(vt).subtract(Tt,"month").format("YYYY-MM-DD");qe==null||qe(ee),St(ee)},Nt=()=>{const ee=Ke(vt).add(Tt,"year").format("YYYY-MM-DD");ge==null||ge(ee),St(ee)},Ht=()=>{const ee=Ke(vt).subtract(Tt,"year").format("YYYY-MM-DD");Fe==null||Fe(ee),St(ee)},cn=()=>{const ee=Ke(vt).add(10*Tt,"year").format("YYYY-MM-DD");lt==null||lt(ee),St(ee)},qt=()=>{const ee=Ke(vt).subtract(10*Tt,"year").format("YYYY-MM-DD");Ye==null||Ye(ee),St(ee)},Kt=S.useRef(null);S.useEffect(()=>{if(!$e||ot)return;const ee=ae=>{var De;if(!((De=Kt.current)!=null&&De.contains(document.activeElement)))return;const de=ae.ctrlKey||ae.metaKey,Ee=ae.shiftKey;switch(ae.key){case"ArrowUp":de&&Ee?(ae.preventDefault(),qt()):de&&(ae.preventDefault(),Ht());break;case"ArrowDown":de&&Ee?(ae.preventDefault(),cn()):de&&(ae.preventDefault(),Nt());break;case"y":case"Y":nt==="month"&&(ae.preventDefault(),We("year"));break}};return document.addEventListener("keydown",ee),()=>{document.removeEventListener("keydown",ee)}},[$e,ot,nt,Nt,Ht,cn,qt]);const yn=ee=>{Kt.current=ee,typeof e=="function"?e(ee):e&&(e.current=ee)};return d.jsxs(ie,{ref:yn,size:Ae,"data-calendar":!0,...gt,children:[nt==="month"&&d.jsx(ES,{month:vt,minDate:pe,maxDate:_e,firstDayOfWeek:R,weekdayFormat:N,weekendDays:z,getDayProps:B,excludeDate:L,renderDay:P,hideOutsideDates:I,hideWeekdays:H,getDayAriaLabel:$,onNext:Yt,onPrevious:Vt,hasNextLevel:s!=="month",onLevelClick:()=>We("year"),numberOfColumns:h,locale:Ce,levelControlAriaLabel:y==null?void 0:y.monthLevelControl,nextLabel:(y==null?void 0:y.nextMonth)??v,nextIcon:q,previousLabel:(y==null?void 0:y.previousMonth)??b,previousIcon:U,monthLabelFormat:V,__onDayClick:W,__onDayMouseEnter:Y,__preventFocus:Ze,__stopPropagation:He,static:ot,withCellSpacing:G,highlightToday:K,withWeekNumbers:Q,headerControlsOrder:j,...Ot}),nt==="year"&&d.jsx(kS,{year:vt,numberOfColumns:h,minDate:pe,maxDate:_e,monthsListFormat:Z,getMonthControlProps:J,locale:Ce,onNext:Nt,onPrevious:Ht,hasNextLevel:s!=="month"&&s!=="year",onLevelClick:()=>We("decade"),levelControlAriaLabel:y==null?void 0:y.yearLevelControl,nextLabel:(y==null?void 0:y.nextYear)??v,nextIcon:q,previousLabel:(y==null?void 0:y.previousYear)??b,previousIcon:U,yearLabelFormat:ne,__onControlMouseEnter:E,__onControlClick:(ee,ae)=>{M&&St(ae),We(a0("month",o,s)),C==null||C(ae)},__preventFocus:Ze,__stopPropagation:He,withCellSpacing:G,headerControlsOrder:j,...Ot}),nt==="decade"&&d.jsx(CS,{decade:vt,minDate:pe,maxDate:_e,yearsListFormat:se,getYearControlProps:ce,locale:Ce,onNext:cn,onPrevious:qt,numberOfColumns:h,nextLabel:(y==null?void 0:y.nextDecade)??v,nextIcon:q,previousLabel:(y==null?void 0:y.previousDecade)??b,previousIcon:U,decadeLabelFormat:fe,__onControlMouseEnter:k,__onControlClick:(ee,ae)=>{A&&St(ae),We(a0("year",o,s)),w==null||w(ae)},__preventFocus:Ze,__stopPropagation:He,withCellSpacing:G,headerControlsOrder:j,...Ot})]})});G2.classes={...CS.classes,...kS.classes,...ES.classes};G2.displayName="@mantine/dates/Calendar";function pte(t){const{maxLevel:e,minLevel:n,defaultLevel:r,level:s,onLevelChange:o,nextIcon:i,previousIcon:a,date:l,defaultDate:c,onDateChange:u,numberOfColumns:f,columnsToScroll:h,ariaLabels:m,nextLabel:y,previousLabel:v,onYearSelect:b,onMonthSelect:w,onYearMouseEnter:C,onMonthMouseEnter:k,onNextMonth:E,onPreviousMonth:j,onNextYear:A,onPreviousYear:M,onNextDecade:_,onPreviousDecade:D,withCellSpacing:R,highlightToday:N,__updateDateOnYearSelect:z,__updateDateOnMonthSelect:B,__setDateRef:L,__setLevelRef:P,withWeekNumbers:I,headerControlsOrder:H,firstDayOfWeek:$,weekdayFormat:V,weekendDays:q,getDayProps:U,excludeDate:W,renderDay:Y,hideOutsideDates:G,hideWeekdays:K,getDayAriaLabel:Q,monthLabelFormat:Z,monthsListFormat:J,getMonthControlProps:ne,yearLabelFormat:se,yearsListFormat:ce,getYearControlProps:fe,decadeLabelFormat:le,allowSingleDateInRange:be,allowDeselect:je,minDate:pe,maxDate:_e,locale:Ce,...Te}=t;return{calendarProps:{maxLevel:e,minLevel:n,defaultLevel:r,level:s,onLevelChange:o,nextIcon:i,previousIcon:a,date:l,defaultDate:c,onDateChange:u,numberOfColumns:f,columnsToScroll:h,ariaLabels:m,nextLabel:y,previousLabel:v,onYearSelect:b,onMonthSelect:w,onYearMouseEnter:C,onMonthMouseEnter:k,onNextMonth:E,onPreviousMonth:j,onNextYear:A,onPreviousYear:M,onNextDecade:_,onPreviousDecade:D,withCellSpacing:R,highlightToday:N,__updateDateOnYearSelect:z,__updateDateOnMonthSelect:B,__setDateRef:L,withWeekNumbers:I,headerControlsOrder:H,firstDayOfWeek:$,weekdayFormat:V,weekendDays:q,getDayProps:U,excludeDate:W,renderDay:Y,hideOutsideDates:G,hideWeekdays:K,getDayAriaLabel:Q,monthLabelFormat:Z,monthsListFormat:J,getMonthControlProps:ne,yearLabelFormat:se,yearsListFormat:ce,getYearControlProps:fe,decadeLabelFormat:le,allowSingleDateInRange:be,allowDeselect:je,minDate:pe,maxDate:_e,locale:Ce},others:Te}}function iB(t,e){const n=[...e].sort((r,s)=>Ke(r).isAfter(Ke(s))?1:-1);return Ke(n[0]).startOf("day").subtract(1,"ms").isBefore(t)&&Ke(n[1]).endOf("day").add(1,"ms").isAfter(t)}function WAe({type:t,level:e,value:n,defaultValue:r,onChange:s,allowSingleDateInRange:o,allowDeselect:i,onMouseLeave:a}){const[l,c]=xR({type:t,value:n,defaultValue:r,onChange:s}),[u,f]=S.useState(t==="range"&&l[0]&&!l[1]?l[0]:null),[h,m]=S.useState(null),y=j=>{if(t==="range"){if(u&&!l[1]){if(Ke(j).isSame(u,e)&&!o){f(null),m(null),c([null,null]);return}const A=[j,u];A.sort((M,_)=>Ke(M).isAfter(Ke(_))?1:-1),c(A),m(null),f(null);return}if(l[0]&&!l[1]&&Ke(j).isSame(l[0],e)&&!o){f(null),m(null),c([null,null]);return}c([j,null]),m(null),f(j);return}if(t==="multiple"){l.some(A=>Ke(A).isSame(j,e))?c(l.filter(A=>!Ke(A).isSame(j,e))):c([...l,j]);return}l&&i&&Ke(j).isSame(l,e)?c(null):c(j)},v=j=>u&&h?iB(j,[h,u]):l[0]&&l[1]?iB(j,l):!1,b=t==="range"?j=>{a==null||a(j),m(null)}:a,w=j=>l[0]&&Ke(j).isSame(l[0],e)?!(h&&Ke(h).isBefore(l[0])):!1,C=j=>l[1]?Ke(j).isSame(l[1],e):!l[0]||!h?!1:Ke(h).isBefore(l[0])&&Ke(j).isSame(l[0],e),k=j=>{if(t==="range")return{selected:l.some(M=>M&&Ke(M).isSame(j,e)),inRange:v(j),firstInRange:w(j),lastInRange:C(j),"data-autofocus":!!l[0]&&Ke(l[0]).isSame(j,e)||void 0};if(t==="multiple")return{selected:l.some(M=>M&&Ke(M).isSame(j,e)),"data-autofocus":!!l[0]&&Ke(l[0]).isSame(j,e)||void 0};const A=Ke(l).isSame(j,e);return{selected:A,"data-autofocus":A||void 0}},E=t==="range"&&u?m:()=>{};return S.useEffect(()=>{if(t==="range")if(l[0]&&!l[1])f(l[0]);else{const j=l[0]==null&&l[1]==null,A=l[0]!=null&&l[1]!=null;(j||A)&&(f(null),m(null))}},[l]),{onDateChange:y,onRootMouseLeave:b,onHoveredDateChange:E,getControlProps:k,_value:l,setValue:c}}var YAe={datePickerRoot:"m_765a40cf",presetsList:"m_d6a681e1",presetButton:"m_acd30b22"};const GAe=(t,{size:e})=>({datePickerRoot:{"--preset-font-size":Ur(e)}}),KAe={type:"default",defaultLevel:"month",numberOfColumns:1,size:"sm"},K2=Be((t,e)=>{const n=we("DatePicker",KAe,t),{allowDeselect:r,allowSingleDateInRange:s,value:o,defaultValue:i,onChange:a,onMouseLeave:l,classNames:c,styles:u,__staticSelector:f,__onDayClick:h,__onDayMouseEnter:m,__onPresetSelect:y,__stopPropagation:v,presets:b,className:w,style:C,unstyled:k,size:E,vars:j,attributes:A,...M}=n,{calendarProps:_,others:D}=pte(M),R=S.useRef(null),N=S.useRef(null),z=Et({name:f||"DatePicker",classes:YAe,props:n,className:w,style:C,classNames:c,styles:u,unstyled:k,attributes:A,rootSelector:b?"datePickerRoot":void 0,varsResolver:GAe,vars:j}),{onDateChange:B,onRootMouseLeave:L,onHoveredDateChange:P,getControlProps:I,_value:H,setValue:$}=WAe({type:D.type,level:"day",allowDeselect:r,allowSingleDateInRange:s,value:o,defaultValue:i,onChange:a,onMouseLeave:l}),{resolvedClassNames:V,resolvedStyles:q}=Ti({classNames:c,styles:u,props:n}),U=d.jsx(G2,{ref:e,classNames:V,styles:q,__staticSelector:f||"DatePicker",onMouseLeave:L,size:E,..._,...b?{}:D,__stopPropagation:v,__setDateRef:R,__setLevelRef:N,minLevel:_.minLevel||"month",__onDayMouseEnter:(G,K)=>{P(K),m==null||m(G,K)},__onDayClick:(G,K)=>{B(K),h==null||h(G,K)},getDayProps:G=>{var K;return{...I(G),...(K=_.getDayProps)==null?void 0:K.call(_,G)}},getMonthControlProps:G=>{var K;return{selected:typeof H=="string"?bR(G,H):!1,...(K=_.getMonthControlProps)==null?void 0:K.call(_,G)}},getYearControlProps:G=>{var K;return{selected:typeof H=="string"?Ke(G).isSame(H,"year"):!1,...(K=_.getYearControlProps)==null?void 0:K.call(_,G)}},hideOutsideDates:_.hideOutsideDates??_.numberOfColumns!==1,...b?{}:{className:w,style:C,attributes:A}});if(!b)return U;const W=G=>{var Q,Z;const K=Array.isArray(G)?G[0]:G;K!==void 0&&((Q=R.current)==null||Q.call(R,K),(Z=N.current)==null||Z.call(N,"month"),y?y(K):$(G))},Y=b.map((G,K)=>d.jsx(En,{...z("presetButton"),onClick:()=>W(G.value),onMouseDown:Q=>Q.preventDefault(),"data-mantine-stop-propagation":v||void 0,children:G.label},K));return d.jsxs(ie,{...z("datePickerRoot"),size:E,...D,children:[d.jsx("div",{...z("presetsList"),children:Y}),U]})});K2.classes=G2.classes;K2.displayName="@mantine/dates/DatePicker";function XAe({type:t,value:e,defaultValue:n,onChange:r,locale:s,format:o,closeOnChange:i,sortDates:a,labelSeparator:l,valueFormatter:c}){const u=Ad(),[f,h]=Rs(!1),[m,y]=xR({type:t,value:e,defaultValue:n,onChange:r}),v=lAe({type:t,date:m,locale:u.getLocale(s),format:o,labelSeparator:u.getLabelSeparator(l),formatter:c}),b=k=>{i&&(t==="default"&&h.close(),t==="range"&&k[0]&&k[1]&&h.close()),y(a&&t==="multiple"?[...k].sort((E,j)=>Ke(E).isAfter(Ke(j))?1:-1):k)},w=()=>b(t==="range"?[null,null]:t==="multiple"?[]:null),C=t==="range"?!!m[0]:t==="multiple"?m.length>0:m!==null;return{_value:m,setValue:b,onClear:w,shouldClear:C,formattedValue:v,dropdownOpened:f,dropdownHandlers:h}}const ZAe={type:"default",valueFormat:"MMMM D, YYYY",closeOnChange:!0,sortDates:!0,dropdownType:"popover"},Ig=Be((t,e)=>{const n=we("DatePickerInput",ZAe,t),{type:r,value:s,defaultValue:o,onChange:i,valueFormat:a,labelSeparator:l,locale:c,classNames:u,styles:f,unstyled:h,closeOnChange:m,size:y,variant:v,dropdownType:b,sortDates:w,minDate:C,maxDate:k,vars:E,defaultDate:j,valueFormatter:A,presets:M,attributes:_,...D}=n,{resolvedClassNames:R,resolvedStyles:N}=Ti({classNames:u,styles:f,props:n}),{calendarProps:z,others:B}=pte(D),{_value:L,setValue:P,formattedValue:I,dropdownHandlers:H,dropdownOpened:$,onClear:V,shouldClear:q}=XAe({type:r,value:s,defaultValue:o,onChange:i,locale:c,format:a,labelSeparator:l,closeOnChange:m,sortDates:w,valueFormatter:A}),U=Array.isArray(L)?L[0]||j:L||j;return d.jsx(TS,{formattedValue:I,dropdownOpened:$,dropdownHandlers:H,classNames:R,styles:N,unstyled:h,ref:e,onClear:V,shouldClear:q,value:L,size:y,variant:v,dropdownType:b,...B,type:r,__staticSelector:"DatePickerInput",attributes:_,children:d.jsx(K2,{...z,size:y,variant:v,type:r,value:L,defaultDate:U||fAe({maxDate:k,minDate:C}),onChange:P,locale:c,classNames:R,styles:N,unstyled:h,__staticSelector:"DatePickerInput",__stopPropagation:b==="popover",minDate:C,maxDate:k,presets:M,attributes:_})})});Ig.classes={...TS.classes,...K2.classes};Ig.displayName="@mantine/dates/DatePickerInput";const wR=S.createContext(null);wR.displayName="@mantine/modals/ModalsContext";function QAe(){const t=S.useContext(wR);if(!t)throw new Error("[@mantine/modals] useModals hook was called outside of context, wrap your app with ModalsProvider component");return t}function JAe({id:t,cancelProps:e,confirmProps:n,labels:r={cancel:"",confirm:""},closeOnConfirm:s=!0,closeOnCancel:o=!0,groupProps:i,onCancel:a,onConfirm:l,children:c}){const{cancel:u,confirm:f}=r,h=QAe(),m=v=>{typeof(e==null?void 0:e.onClick)=="function"&&(e==null||e.onClick(v)),typeof a=="function"&&a(),o&&h.closeModal(t)},y=v=>{typeof(n==null?void 0:n.onClick)=="function"&&(n==null||n.onClick(v)),typeof l=="function"&&l(),s&&h.closeModal(t)};return d.jsxs(d.Fragment,{children:[c&&d.jsx(ie,{mb:"md",children:c}),d.jsxs(ve,{mt:c?0:"md",justify:"flex-end",...i,children:[d.jsx(yt,{variant:"default",...e,onClick:m,children:(e==null?void 0:e.children)||u}),d.jsx(yt,{...n,onClick:y,children:(n==null?void 0:n.children)||f})]})]})}const[e_e,ap]=Upe("mantine-modals"),X2=t=>{const e=t.modalId||gl();return ap("openModal")({...t,modalId:e}),e},qm=t=>{const e=t.modalId||gl();return ap("openConfirmModal")({...t,modalId:e}),e},t_e=t=>{const e=t.modalId||gl();return ap("openContextModal")({...t,modalId:e}),e},n_e=ap("closeModal"),Ao=ap("closeAllModals"),r_e=t=>ap("updateModal")(t),s_e=t=>ap("updateContextModal")(t),o_e={open:X2,close:n_e,closeAll:Ao,openConfirmModal:qm,openContextModal:t_e,updateModal:r_e,updateContextModal:s_e};function aB(t,e){var n,r,s,o;e&&t.type==="confirm"&&((r=(n=t.props).onCancel)==null||r.call(n)),(o=(s=t.props).onClose)==null||o.call(s)}function i_e(t,e){var n;switch(e.type){case"OPEN":return{current:e.modal,modals:[...t.modals,e.modal]};case"CLOSE":{const r=t.modals.find(o=>o.id===e.modalId);if(!r)return t;aB(r,e.canceled);const s=t.modals.filter(o=>o.id!==e.modalId);return{current:s[s.length-1]||t.current,modals:s}}case"CLOSE_ALL":return t.modals.length?(t.modals.concat().reverse().forEach(r=>{aB(r,e.canceled)}),{current:t.current,modals:[]}):t;case"UPDATE":{const{modalId:r,newProps:s}=e,o=t.modals.map(a=>a.id!==r?a:a.type==="content"||a.type==="confirm"?{...a,props:{...a.props,...s}}:a.type==="context"?{...a,props:{...a.props,...s,innerProps:{...a.props.innerProps,...s.innerProps}}}:a),i=((n=t.current)==null?void 0:n.id)===r&&o.find(a=>a.id===r)||t.current;return{...t,modals:o,current:i}}default:return t}}function a_e(t){if(!t)return{confirmProps:{},modalProps:{}};const{id:e,children:n,onCancel:r,onConfirm:s,closeOnConfirm:o,closeOnCancel:i,cancelProps:a,confirmProps:l,groupProps:c,labels:u,...f}=t;return{confirmProps:{id:e,children:n,onCancel:r,onConfirm:s,closeOnConfirm:o,closeOnCancel:i,cancelProps:a,confirmProps:l,groupProps:c,labels:u},modalProps:{id:e,...f}}}function l_e({children:t,modalProps:e,labels:n,modals:r}){const[s,o]=S.useReducer(i_e,{modals:[],current:null}),i=S.useRef(s);i.current=s;const a=S.useCallback(C=>{o({type:"CLOSE_ALL",canceled:C})},[i,o]),l=S.useCallback(({modalId:C,...k})=>{const E=C||gl();return o({type:"OPEN",modal:{id:E,type:"content",props:k}}),E},[o]),c=S.useCallback(({modalId:C,...k})=>{const E=C||gl();return o({type:"OPEN",modal:{id:E,type:"confirm",props:k}}),E},[o]),u=S.useCallback((C,{modalId:k,...E})=>{const j=k||gl();return o({type:"OPEN",modal:{id:j,type:"context",props:E,ctx:C}}),j},[o]),f=S.useCallback((C,k)=>{o({type:"CLOSE",modalId:C,canceled:k})},[i,o]),h=S.useCallback(({modalId:C,...k})=>{o({type:"UPDATE",modalId:C,newProps:k})},[o]),m=S.useCallback(({modalId:C,...k})=>{o({type:"UPDATE",modalId:C,newProps:k})},[o]);e_e({openModal:l,openConfirmModal:c,openContextModal:({modal:C,...k})=>u(C,k),closeModal:f,closeContextModal:f,closeAllModals:a,updateModal:h,updateContextModal:m});const y={modalProps:e||{},modals:s.modals,openModal:l,openConfirmModal:c,openContextModal:u,closeModal:f,closeContextModal:f,closeAll:a,updateModal:h,updateContextModal:m},v=()=>{const C=i.current.current;switch(C==null?void 0:C.type){case"context":{const{innerProps:k,...E}=C.props,j=r[C.ctx];return{modalProps:E,content:d.jsx(j,{innerProps:k,context:y,id:C.id})}}case"confirm":{const{modalProps:k,confirmProps:E}=a_e(C.props);return{modalProps:k,content:d.jsx(JAe,{...E,id:C.id,labels:C.props.labels||n})}}case"content":{const{children:k,...E}=C.props;return{modalProps:E,content:k}}default:return{modalProps:{},content:null}}},{modalProps:b,content:w}=v();return d.jsxs(wR.Provider,{value:y,children:[d.jsx(nr,{zIndex:Ps("modal")+1,...e,...b,opened:s.modals.length>0,onClose:()=>{var C;return f((C=s.current)==null?void 0:C.id)},children:w}),t]})}function c_e(t){let e=t,n=!1;const r=new Set;return{getState(){return e},updateState(s){e=typeof s=="function"?s(e):s},setState(s){this.updateState(s),r.forEach(o=>o(e))},initialize(s){n||(e=s,n=!0)},subscribe(s){return r.add(s),()=>r.delete(s)}}}function u_e(t){return S.useSyncExternalStore(t.subscribe,()=>t.getState(),()=>t.getState())}function d_e(t,e,n){const r=[],s=[],o={};for(const i of t){const a=i.position||e;o[a]=o[a]||0,o[a]+=1,o[a]<=n?s.push(i):r.push(i)}return{notifications:s,queue:r}}const f_e=()=>c_e({notifications:[],queue:[],defaultPosition:"bottom-right",limit:5}),lp=f_e(),p_e=(t=lp)=>u_e(t);function Wm(t,e){const n=t.getState(),r=e([...n.notifications,...n.queue]),s=d_e(r,n.defaultPosition,n.limit);t.setState({notifications:s.notifications,queue:s.queue,limit:n.limit,defaultPosition:n.defaultPosition})}function lm(t,e=lp){const n=t.id||gl();return Wm(e,r=>t.id&&r.some(s=>s.id===t.id)?r:[...r,{...t,id:n}]),n}function Zu(t,e=lp){return Wm(e,n=>n.filter(r=>{var s;return r.id===t?((s=r.onClose)==null||s.call(r,r),!1):!0})),t}function h_e(t,e=lp){return Wm(e,n=>n.map(r=>r.id===t.id?{...r,...t}:r)),t.id}function m_e(t=lp){Wm(t,()=>[])}function g_e(t=lp){Wm(t,e=>e.slice(0,t.getState().limit))}const Ym={show:lm,hide:Zu,update:h_e,clean:m_e,cleanQueue:g_e,updateState:Wm};function kT(t,e){return kT=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},kT(t,e)}function MS(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,kT(t,e)}var Dk={exports:{}},Ik,lB;function y_e(){if(lB)return Ik;lB=1;var t="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return Ik=t,Ik}var Ok,cB;function v_e(){if(cB)return Ok;cB=1;var t=y_e();function e(){}function n(){}return n.resetWarningCache=e,Ok=function(){function r(i,a,l,c,u,f){if(f!==t){var h=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 h.name="Invariant Violation",h}}r.isRequired=r;function s(){return r}var o={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:s,element:r,elementType:r,instanceOf:s,node:r,objectOf:s,oneOf:s,oneOfType:s,shape:s,exact:s,checkPropTypes:n,resetWarningCache:e};return o.PropTypes=o,o},Ok}var uB;function b_e(){return uB||(uB=1,Dk.exports=v_e()()),Dk.exports}var x_e=b_e();const yr=ks(x_e);function w_e(t,e){return t.classList?!!e&&t.classList.contains(e):(" "+(t.className.baseVal||t.className)+" ").indexOf(" "+e+" ")!==-1}function S_e(t,e){t.classList?t.classList.add(e):w_e(t,e)||(typeof t.className=="string"?t.className=t.className+" "+e:t.setAttribute("class",(t.className&&t.className.baseVal||"")+" "+e))}function dB(t,e){return t.replace(new RegExp("(^|\\s)"+e+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}function C_e(t,e){t.classList?t.classList.remove(e):typeof t.className=="string"?t.className=dB(t.className,e):t.setAttribute("class",dB(t.className&&t.className.baseVal||"",e))}const fB={disabled:!1},Og=It.createContext(null);var hte=function(e){return e.scrollTop},_0="unmounted",af="exited",qi="entering",pl="entered",Ng="exiting",Il=(function(t){MS(e,t);function e(r,s){var o;o=t.call(this,r,s)||this;var i=s,a=i&&!i.isMounting?r.enter:r.appear,l;return o.appearStatus=null,r.in?a?(l=af,o.appearStatus=qi):l=pl:r.unmountOnExit||r.mountOnEnter?l=_0:l=af,o.state={status:l},o.nextCallback=null,o}e.getDerivedStateFromProps=function(s,o){var i=s.in;return i&&o.status===_0?{status:af}:null};var n=e.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(s){var o=null;if(s!==this.props){var i=this.state.status;this.props.in?i!==qi&&i!==pl&&(o=qi):(i===qi||i===pl)&&(o=Ng)}this.updateStatus(!1,o)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var s=this.props.timeout,o,i,a;return o=i=a=s,s!=null&&typeof s!="number"&&(o=s.exit,i=s.enter,a=s.appear!==void 0?s.appear:i),{exit:o,enter:i,appear:a}},n.updateStatus=function(s,o){if(s===void 0&&(s=!1),o!==null)if(this.cancelNextCallback(),o===qi){if(this.props.unmountOnExit||this.props.mountOnEnter){var i=this.props.nodeRef?this.props.nodeRef.current:Ch.findDOMNode(this);i&&hte(i)}this.performEnter(s)}else this.performExit();else this.props.unmountOnExit&&this.state.status===af&&this.setState({status:_0})},n.performEnter=function(s){var o=this,i=this.props.enter,a=this.context?this.context.isMounting:s,l=this.props.nodeRef?[a]:[Ch.findDOMNode(this),a],c=l[0],u=l[1],f=this.getTimeouts(),h=a?f.appear:f.enter;if(!s&&!i||fB.disabled){this.safeSetState({status:pl},function(){o.props.onEntered(c)});return}this.props.onEnter(c,u),this.safeSetState({status:qi},function(){o.props.onEntering(c,u),o.onTransitionEnd(h,function(){o.safeSetState({status:pl},function(){o.props.onEntered(c,u)})})})},n.performExit=function(){var s=this,o=this.props.exit,i=this.getTimeouts(),a=this.props.nodeRef?void 0:Ch.findDOMNode(this);if(!o||fB.disabled){this.safeSetState({status:af},function(){s.props.onExited(a)});return}this.props.onExit(a),this.safeSetState({status:Ng},function(){s.props.onExiting(a),s.onTransitionEnd(i.exit,function(){s.safeSetState({status:af},function(){s.props.onExited(a)})})})},n.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(s,o){o=this.setNextCallback(o),this.setState(s,o)},n.setNextCallback=function(s){var o=this,i=!0;return this.nextCallback=function(a){i&&(i=!1,o.nextCallback=null,s(a))},this.nextCallback.cancel=function(){i=!1},this.nextCallback},n.onTransitionEnd=function(s,o){this.setNextCallback(o);var i=this.props.nodeRef?this.props.nodeRef.current:Ch.findDOMNode(this),a=s==null&&!this.props.addEndListener;if(!i||a){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var l=this.props.nodeRef?[this.nextCallback]:[i,this.nextCallback],c=l[0],u=l[1];this.props.addEndListener(c,u)}s!=null&&setTimeout(this.nextCallback,s)},n.render=function(){var s=this.state.status;if(s===_0)return null;var o=this.props,i=o.children;o.in,o.mountOnEnter,o.unmountOnExit,o.appear,o.enter,o.exit,o.timeout,o.addEndListener,o.onEnter,o.onEntering,o.onEntered,o.onExit,o.onExiting,o.onExited,o.nodeRef;var a=NA(o,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return It.createElement(Og.Provider,{value:null},typeof i=="function"?i(s,a):It.cloneElement(It.Children.only(i),a))},e})(It.Component);Il.contextType=Og;Il.propTypes={};function ah(){}Il.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:ah,onEntering:ah,onEntered:ah,onExit:ah,onExiting:ah,onExited:ah};Il.UNMOUNTED=_0;Il.EXITED=af;Il.ENTERING=qi;Il.ENTERED=pl;Il.EXITING=Ng;var k_e=function(e,n){return e&&n&&n.split(" ").forEach(function(r){return S_e(e,r)})},Nk=function(e,n){return e&&n&&n.split(" ").forEach(function(r){return C_e(e,r)})},Z2=(function(t){MS(e,t);function e(){for(var r,s=arguments.length,o=new Array(s),i=0;i<s;i++)o[i]=arguments[i];return r=t.call.apply(t,[this].concat(o))||this,r.appliedClasses={appear:{},enter:{},exit:{}},r.onEnter=function(a,l){var c=r.resolveArguments(a,l),u=c[0],f=c[1];r.removeClasses(u,"exit"),r.addClass(u,f?"appear":"enter","base"),r.props.onEnter&&r.props.onEnter(a,l)},r.onEntering=function(a,l){var c=r.resolveArguments(a,l),u=c[0],f=c[1],h=f?"appear":"enter";r.addClass(u,h,"active"),r.props.onEntering&&r.props.onEntering(a,l)},r.onEntered=function(a,l){var c=r.resolveArguments(a,l),u=c[0],f=c[1],h=f?"appear":"enter";r.removeClasses(u,h),r.addClass(u,h,"done"),r.props.onEntered&&r.props.onEntered(a,l)},r.onExit=function(a){var l=r.resolveArguments(a),c=l[0];r.removeClasses(c,"appear"),r.removeClasses(c,"enter"),r.addClass(c,"exit","base"),r.props.onExit&&r.props.onExit(a)},r.onExiting=function(a){var l=r.resolveArguments(a),c=l[0];r.addClass(c,"exit","active"),r.props.onExiting&&r.props.onExiting(a)},r.onExited=function(a){var l=r.resolveArguments(a),c=l[0];r.removeClasses(c,"exit"),r.addClass(c,"exit","done"),r.props.onExited&&r.props.onExited(a)},r.resolveArguments=function(a,l){return r.props.nodeRef?[r.props.nodeRef.current,a]:[a,l]},r.getClassNames=function(a){var l=r.props.classNames,c=typeof l=="string",u=c&&l?l+"-":"",f=c?""+u+a:l[a],h=c?f+"-active":l[a+"Active"],m=c?f+"-done":l[a+"Done"];return{baseClassName:f,activeClassName:h,doneClassName:m}},r}var n=e.prototype;return n.addClass=function(s,o,i){var a=this.getClassNames(o)[i+"ClassName"],l=this.getClassNames("enter"),c=l.doneClassName;o==="appear"&&i==="done"&&c&&(a+=" "+c),i==="active"&&s&&hte(s),a&&(this.appliedClasses[o][i]=a,k_e(s,a))},n.removeClasses=function(s,o){var i=this.appliedClasses[o],a=i.base,l=i.active,c=i.done;this.appliedClasses[o]={},a&&Nk(s,a),l&&Nk(s,l),c&&Nk(s,c)},n.render=function(){var s=this.props;s.classNames;var o=NA(s,["classNames"]);return It.createElement(Il,Zh({},o,{onEnter:this.onEnter,onEntered:this.onEntered,onEntering:this.onEntering,onExit:this.onExit,onExiting:this.onExiting,onExited:this.onExited}))},e})(It.Component);Z2.defaultProps={classNames:""};Z2.propTypes={};function E_e(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function SR(t,e){var n=function(o){return e&&S.isValidElement(o)?e(o):o},r=Object.create(null);return t&&S.Children.map(t,function(s){return s}).forEach(function(s){r[s.key]=n(s)}),r}function T_e(t,e){t=t||{},e=e||{};function n(u){return u in e?e[u]:t[u]}var r=Object.create(null),s=[];for(var o in t)o in e?s.length&&(r[o]=s,s=[]):s.push(o);var i,a={};for(var l in e){if(r[l])for(i=0;i<r[l].length;i++){var c=r[l][i];a[r[l][i]]=n(c)}a[l]=n(l)}for(i=0;i<s.length;i++)a[s[i]]=n(s[i]);return a}function yf(t,e,n){return n[e]!=null?n[e]:t.props[e]}function M_e(t,e){return SR(t.children,function(n){return S.cloneElement(n,{onExited:e.bind(null,n),in:!0,appear:yf(n,"appear",t),enter:yf(n,"enter",t),exit:yf(n,"exit",t)})})}function j_e(t,e,n){var r=SR(t.children),s=T_e(e,r);return Object.keys(s).forEach(function(o){var i=s[o];if(S.isValidElement(i)){var a=o in e,l=o in r,c=e[o],u=S.isValidElement(c)&&!c.props.in;l&&(!a||u)?s[o]=S.cloneElement(i,{onExited:n.bind(null,i),in:!0,exit:yf(i,"exit",t),enter:yf(i,"enter",t)}):!l&&a&&!u?s[o]=S.cloneElement(i,{in:!1}):l&&a&&S.isValidElement(c)&&(s[o]=S.cloneElement(i,{onExited:n.bind(null,i),in:c.props.in,exit:yf(i,"exit",t),enter:yf(i,"enter",t)}))}}),s}var A_e=Object.values||function(t){return Object.keys(t).map(function(e){return t[e]})},__e={component:"div",childFactory:function(e){return e}},ol=(function(t){MS(e,t);function e(r,s){var o;o=t.call(this,r,s)||this;var i=o.handleExited.bind(E_e(o));return o.state={contextValue:{isMounting:!0},handleExited:i,firstRender:!0},o}var n=e.prototype;return n.componentDidMount=function(){this.mounted=!0,this.setState({contextValue:{isMounting:!1}})},n.componentWillUnmount=function(){this.mounted=!1},e.getDerivedStateFromProps=function(s,o){var i=o.children,a=o.handleExited,l=o.firstRender;return{children:l?M_e(s,a):j_e(s,i,a),firstRender:!1}},n.handleExited=function(s,o){var i=SR(this.props.children);s.key in i||(s.props.onExited&&s.props.onExited(o),this.mounted&&this.setState(function(a){var l=Zh({},a.children);return delete l[s.key],{children:l}}))},n.render=function(){var s=this.props,o=s.component,i=s.childFactory,a=NA(s,["component","childFactory"]),l=this.state.contextValue,c=A_e(this.state.children).map(i);return delete a.appear,delete a.enter,delete a.exit,o===null?It.createElement(Og.Provider,{value:l},c):It.createElement(Og.Provider,{value:l},It.createElement(o,a,c))},e})(It.Component);ol.propTypes={};ol.defaultProps=__e;var eb,tb;function R_e(t,e){return!(t===e||It.isValidElement(t)&&It.isValidElement(e)&&t.key!=null&&t.key===e.key)}var cm={out:"out-in",in:"in-out"},I3=function(e,n,r){return function(){var s;e.props[n]&&(s=e.props)[n].apply(s,arguments),r()}},D_e=(eb={},eb[cm.out]=function(t){var e=t.current,n=t.changeState;return It.cloneElement(e,{in:!1,onExited:I3(e,"onExited",function(){n(qi,null)})})},eb[cm.in]=function(t){var e=t.current,n=t.changeState,r=t.children;return[e,It.cloneElement(r,{in:!0,onEntered:I3(r,"onEntered",function(){n(qi)})})]},eb),I_e=(tb={},tb[cm.out]=function(t){var e=t.children,n=t.changeState;return It.cloneElement(e,{in:!0,onEntered:I3(e,"onEntered",function(){n(pl,It.cloneElement(e,{in:!0}))})})},tb[cm.in]=function(t){var e=t.current,n=t.children,r=t.changeState;return[It.cloneElement(e,{in:!1,onExited:I3(e,"onExited",function(){r(pl,It.cloneElement(n,{in:!0}))})}),It.cloneElement(n,{in:!0})]},tb),CR=(function(t){MS(e,t);function e(){for(var r,s=arguments.length,o=new Array(s),i=0;i<s;i++)o[i]=arguments[i];return r=t.call.apply(t,[this].concat(o))||this,r.state={status:pl,current:null},r.appeared=!1,r.changeState=function(a,l){l===void 0&&(l=r.state.current),r.setState({status:a,current:l})},r}var n=e.prototype;return n.componentDidMount=function(){this.appeared=!0},e.getDerivedStateFromProps=function(s,o){return s.children==null?{current:null}:o.status===qi&&s.mode===cm.in?{status:qi}:o.current&&R_e(o.current,s.children)?{status:Ng}:{current:It.cloneElement(s.children,{in:!0})}},n.render=function(){var s=this.props,o=s.children,i=s.mode,a=this.state,l=a.status,c=a.current,u={children:o,current:c,changeState:this.changeState,status:l},f;switch(l){case qi:f=I_e[i](u);break;case Ng:f=D_e[i](u);break;case pl:f=c}return It.createElement(Og.Provider,{value:{isMounting:!this.appeared}},f)},e})(It.Component);CR.propTypes={};CR.defaultProps={mode:cm.out};const mte=["bottom-center","bottom-left","bottom-right","top-center","top-left","top-right"];function O_e(t,e){return t.reduce((n,r)=>(n[r.position||e].push(r),n),mte.reduce((n,r)=>(n[r]=[],n),{}))}const pB={left:"translateX(-100%)",right:"translateX(100%)","top-center":"translateY(-100%)","bottom-center":"translateY(100%)"},N_e={left:"translateX(0)",right:"translateX(0)","top-center":"translateY(0)","bottom-center":"translateY(0)"};function L_e({state:t,maxHeight:e,position:n,transitionDuration:r}){const[s,o]=n.split("-"),i=o==="center"?`${s}-center`:o,a={opacity:0,maxHeight:e,transform:pB[i],transitionDuration:`${r}ms, ${r}ms, ${r}ms`,transitionTimingFunction:"cubic-bezier(.51,.3,0,1.21), cubic-bezier(.51,.3,0,1.21), linear",transitionProperty:"opacity, transform, max-height"},l={opacity:1,transform:N_e[i]},c={opacity:0,maxHeight:0,transform:pB[i]};return{...a,...{entering:l,entered:l,exiting:c,exited:c}[t]}}function $_e(t,e){return typeof e=="number"?e:e===!1||t===!1?!1:t}const gte=S.forwardRef(({data:t,onHide:e,autoClose:n,...r},s)=>{const{autoClose:o,message:i,...a}=t,l=$_e(n,t.autoClose),c=S.useRef(-1),u=()=>window.clearTimeout(c.current),f=()=>{e(t.id),u()},h=()=>{typeof l=="number"&&(c.current=window.setTimeout(f,l))};return S.useEffect(()=>{var m;(m=t.onOpen)==null||m.call(t,t)},[]),S.useEffect(()=>(h(),u),[l]),d.jsx(GA,{...r,...a,onClose:f,ref:s,onMouseEnter:u,onMouseLeave:h,children:i})});gte.displayName="@mantine/notifications/NotificationContainer";var yte={root:"m_b37d9ac7",notification:"m_5ed0edd0"};const F_e=Il,z_e={position:"bottom-right",autoClose:4e3,transitionDuration:250,containerWidth:440,notificationMaxHeight:200,limit:5,zIndex:Ps("overlay"),store:lp,withinPortal:!0},P_e=(t,{zIndex:e,containerWidth:n})=>({root:{"--notifications-z-index":e==null?void 0:e.toString(),"--notifications-container-width":Me(n)}}),Wc=Be((t,e)=>{const n=we("Notifications",z_e,t),{classNames:r,className:s,style:o,styles:i,unstyled:a,vars:l,position:c,autoClose:u,transitionDuration:f,containerWidth:h,notificationMaxHeight:m,limit:y,zIndex:v,store:b,portalProps:w,withinPortal:C,...k}=n,E=Tr(),j=p_e(b),A=wpe(),M=Vw(),_=S.useRef({}),D=S.useRef(0),N=(E.respectReducedMotion?M:!1)?1:f,z=Et({name:"Notifications",classes:yte,props:n,className:s,style:o,classNames:r,styles:i,unstyled:a,vars:l,varsResolver:P_e});S.useEffect(()=>{b==null||b.updateState(P=>({...P,limit:y||5,defaultPosition:c}))},[y,c]),kl(()=>{j.notifications.length>D.current&&setTimeout(()=>A(),0),D.current=j.notifications.length},[j.notifications]);const B=O_e(j.notifications,c),L=mte.reduce((P,I)=>(P[I]=B[I].map(({style:H,...$})=>d.jsx(F_e,{timeout:N,onEnter:()=>_.current[$.id].offsetHeight,nodeRef:{current:_.current[$.id]},children:V=>d.jsx(gte,{ref:q=>{q&&(_.current[$.id]=q)},data:$,onHide:q=>Zu(q,b),autoClose:u,...z("notification",{style:{...L_e({state:V,position:I,transitionDuration:N,maxHeight:m}),...H}})})},$.id)),P),{});return d.jsxs(jc,{withinPortal:C,...w,children:[d.jsx(ie,{...z("root"),"data-position":"top-center",ref:e,...k,children:d.jsx(ol,{children:L["top-center"]})}),d.jsx(ie,{...z("root"),"data-position":"top-left",...k,children:d.jsx(ol,{children:L["top-left"]})}),d.jsx(ie,{...z("root",{className:Df.classNames.fullWidth}),"data-position":"top-right",...k,children:d.jsx(ol,{children:L["top-right"]})}),d.jsx(ie,{...z("root",{className:Df.classNames.fullWidth}),"data-position":"bottom-right",...k,children:d.jsx(ol,{children:L["bottom-right"]})}),d.jsx(ie,{...z("root"),"data-position":"bottom-left",...k,children:d.jsx(ol,{children:L["bottom-left"]})}),d.jsx(ie,{...z("root"),"data-position":"bottom-center",...k,children:d.jsx(ol,{children:L["bottom-center"]})})]})});Wc.classes=yte;Wc.displayName="@mantine/notifications/Notifications";Wc.show=Ym.show;Wc.hide=Ym.hide;Wc.update=Ym.update;Wc.clean=Ym.clean;Wc.cleanQueue=Ym.cleanQueue;Wc.updateState=Ym.updateState;const B_e="PROD-1773649570[16.03.2026, 10:26:10]-89498af3";var Lk={exports:{}},$k={};/**
 * @license React
 * react-compiler-runtime.production.js
 *
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var hB;function H_e(){if(hB)return $k;hB=1;var t=Zf().__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;return $k.c=function(e){return t.H.useMemoCache(e)},$k}var mB;function U_e(){return mB||(mB=1,Lk.exports=H_e()),Lk.exports}var me=U_e();function V_e(t){if(t.sheet)return t.sheet;for(var e=0;e<document.styleSheets.length;e++)if(document.styleSheets[e].ownerNode===t)return document.styleSheets[e]}function q_e(t){var e=document.createElement("style");return e.setAttribute("data-emotion",t.key),t.nonce!==void 0&&e.setAttribute("nonce",t.nonce),e.appendChild(document.createTextNode("")),e.setAttribute("data-s",""),e}var W_e=(function(){function t(n){var r=this;this._insertTag=function(s){var o;r.tags.length===0?r.insertionPoint?o=r.insertionPoint.nextSibling:r.prepend?o=r.container.firstChild:o=r.before:o=r.tags[r.tags.length-1].nextSibling,r.container.insertBefore(s,o),r.tags.push(s)},this.isSpeedy=n.speedy===void 0?!0:n.speedy,this.tags=[],this.ctr=0,this.nonce=n.nonce,this.key=n.key,this.container=n.container,this.prepend=n.prepend,this.insertionPoint=n.insertionPoint,this.before=null}var e=t.prototype;return e.hydrate=function(r){r.forEach(this._insertTag)},e.insert=function(r){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(q_e(this));var s=this.tags[this.tags.length-1];if(this.isSpeedy){var o=V_e(s);try{o.insertRule(r,o.cssRules.length)}catch{}}else s.appendChild(document.createTextNode(r));this.ctr++},e.flush=function(){this.tags.forEach(function(r){var s;return(s=r.parentNode)==null?void 0:s.removeChild(r)}),this.tags=[],this.ctr=0},t})(),oo="-ms-",O3="-moz-",Kn="-webkit-",vte="comm",kR="rule",ER="decl",Y_e="@import",bte="@keyframes",G_e="@layer",K_e=Math.abs,jS=String.fromCharCode,X_e=Object.assign;function Z_e(t,e){return Xs(t,0)^45?(((e<<2^Xs(t,0))<<2^Xs(t,1))<<2^Xs(t,2))<<2^Xs(t,3):0}function xte(t){return t.trim()}function Q_e(t,e){return(t=e.exec(t))?t[0]:t}function Xn(t,e,n){return t.replace(e,n)}function ET(t,e){return t.indexOf(e)}function Xs(t,e){return t.charCodeAt(e)|0}function Lg(t,e,n){return t.slice(e,n)}function il(t){return t.length}function TR(t){return t.length}function nb(t,e){return e.push(t),t}function J_e(t,e){return t.map(e).join("")}var AS=1,um=1,wte=0,ri=0,ys=0,Gm="";function _S(t,e,n,r,s,o,i){return{value:t,root:e,parent:n,type:r,props:s,children:o,line:AS,column:um,length:i,return:""}}function l0(t,e){return X_e(_S("",null,null,"",null,null,0),t,{length:-t.length},e)}function eRe(){return ys}function tRe(){return ys=ri>0?Xs(Gm,--ri):0,um--,ys===10&&(um=1,AS--),ys}function xi(){return ys=ri<wte?Xs(Gm,ri++):0,um++,ys===10&&(um=1,AS++),ys}function wl(){return Xs(Gm,ri)}function Sx(){return ri}function Q2(t,e){return Lg(Gm,t,e)}function $g(t){switch(t){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 Ste(t){return AS=um=1,wte=il(Gm=t),ri=0,[]}function Cte(t){return Gm="",t}function Cx(t){return xte(Q2(ri-1,TT(t===91?t+2:t===40?t+1:t)))}function nRe(t){for(;(ys=wl())&&ys<33;)xi();return $g(t)>2||$g(ys)>3?"":" "}function rRe(t,e){for(;--e&&xi()&&!(ys<48||ys>102||ys>57&&ys<65||ys>70&&ys<97););return Q2(t,Sx()+(e<6&&wl()==32&&xi()==32))}function TT(t){for(;xi();)switch(ys){case t:return ri;case 34:case 39:t!==34&&t!==39&&TT(ys);break;case 40:t===41&&TT(t);break;case 92:xi();break}return ri}function sRe(t,e){for(;xi()&&t+ys!==57;)if(t+ys===84&&wl()===47)break;return"/*"+Q2(e,ri-1)+"*"+jS(t===47?t:xi())}function oRe(t){for(;!$g(wl());)xi();return Q2(t,ri)}function iRe(t){return Cte(kx("",null,null,null,[""],t=Ste(t),0,[0],t))}function kx(t,e,n,r,s,o,i,a,l){for(var c=0,u=0,f=i,h=0,m=0,y=0,v=1,b=1,w=1,C=0,k="",E=s,j=o,A=r,M=k;b;)switch(y=C,C=xi()){case 40:if(y!=108&&Xs(M,f-1)==58){ET(M+=Xn(Cx(C),"&","&\f"),"&\f")!=-1&&(w=-1);break}case 34:case 39:case 91:M+=Cx(C);break;case 9:case 10:case 13:case 32:M+=nRe(y);break;case 92:M+=rRe(Sx()-1,7);continue;case 47:switch(wl()){case 42:case 47:nb(aRe(sRe(xi(),Sx()),e,n),l);break;default:M+="/"}break;case 123*v:a[c++]=il(M)*w;case 125*v:case 59:case 0:switch(C){case 0:case 125:b=0;case 59+u:w==-1&&(M=Xn(M,/\f/g,"")),m>0&&il(M)-f&&nb(m>32?yB(M+";",r,n,f-1):yB(Xn(M," ","")+";",r,n,f-2),l);break;case 59:M+=";";default:if(nb(A=gB(M,e,n,c,u,s,a,k,E=[],j=[],f),o),C===123)if(u===0)kx(M,e,A,A,E,o,f,a,j);else switch(h===99&&Xs(M,3)===110?100:h){case 100:case 108:case 109:case 115:kx(t,A,A,r&&nb(gB(t,A,A,0,0,s,a,k,s,E=[],f),j),s,j,f,a,r?E:j);break;default:kx(M,A,A,A,[""],j,0,a,j)}}c=u=m=0,v=w=1,k=M="",f=i;break;case 58:f=1+il(M),m=y;default:if(v<1){if(C==123)--v;else if(C==125&&v++==0&&tRe()==125)continue}switch(M+=jS(C),C*v){case 38:w=u>0?1:(M+="\f",-1);break;case 44:a[c++]=(il(M)-1)*w,w=1;break;case 64:wl()===45&&(M+=Cx(xi())),h=wl(),u=f=il(k=M+=oRe(Sx())),C++;break;case 45:y===45&&il(M)==2&&(v=0)}}return o}function gB(t,e,n,r,s,o,i,a,l,c,u){for(var f=s-1,h=s===0?o:[""],m=TR(h),y=0,v=0,b=0;y<r;++y)for(var w=0,C=Lg(t,f+1,f=K_e(v=i[y])),k=t;w<m;++w)(k=xte(v>0?h[w]+" "+C:Xn(C,/&\f/g,h[w])))&&(l[b++]=k);return _S(t,e,n,s===0?kR:a,l,c,u)}function aRe(t,e,n){return _S(t,e,n,vte,jS(eRe()),Lg(t,2,-2),0)}function yB(t,e,n,r){return _S(t,e,n,ER,Lg(t,0,r),Lg(t,r+1,-1),r)}function Fh(t,e){for(var n="",r=TR(t),s=0;s<r;s++)n+=e(t[s],s,t,e)||"";return n}function lRe(t,e,n,r){switch(t.type){case G_e:if(t.children.length)break;case Y_e:case ER:return t.return=t.return||t.value;case vte:return"";case bte:return t.return=t.value+"{"+Fh(t.children,r)+"}";case kR:t.value=t.props.join(",")}return il(n=Fh(t.children,r))?t.return=t.value+"{"+n+"}":""}function cRe(t){var e=TR(t);return function(n,r,s,o){for(var i="",a=0;a<e;a++)i+=t[a](n,r,s,o)||"";return i}}function uRe(t){return function(e){e.root||(e=e.return)&&t(e)}}function kte(t){var e=Object.create(null);return function(n){return e[n]===void 0&&(e[n]=t(n)),e[n]}}var dRe=function(e,n,r){for(var s=0,o=0;s=o,o=wl(),s===38&&o===12&&(n[r]=1),!$g(o);)xi();return Q2(e,ri)},fRe=function(e,n){var r=-1,s=44;do switch($g(s)){case 0:s===38&&wl()===12&&(n[r]=1),e[r]+=dRe(ri-1,n,r);break;case 2:e[r]+=Cx(s);break;case 4:if(s===44){e[++r]=wl()===58?"&\f":"",n[r]=e[r].length;break}default:e[r]+=jS(s)}while(s=xi());return e},pRe=function(e,n){return Cte(fRe(Ste(e),n))},vB=new WeakMap,hRe=function(e){if(!(e.type!=="rule"||!e.parent||e.length<1)){for(var n=e.value,r=e.parent,s=e.column===r.column&&e.line===r.line;r.type!=="rule";)if(r=r.parent,!r)return;if(!(e.props.length===1&&n.charCodeAt(0)!==58&&!vB.get(r))&&!s){vB.set(e,!0);for(var o=[],i=pRe(n,o),a=r.props,l=0,c=0;l<i.length;l++)for(var u=0;u<a.length;u++,c++)e.props[c]=o[l]?i[l].replace(/&\f/g,a[u]):a[u]+" "+i[l]}}},mRe=function(e){if(e.type==="decl"){var n=e.value;n.charCodeAt(0)===108&&n.charCodeAt(2)===98&&(e.return="",e.value="")}};function Ete(t,e){switch(Z_e(t,e)){case 5103:return Kn+"print-"+t+t;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 Kn+t+t;case 5349:case 4246:case 4810:case 6968:case 2756:return Kn+t+O3+t+oo+t+t;case 6828:case 4268:return Kn+t+oo+t+t;case 6165:return Kn+t+oo+"flex-"+t+t;case 5187:return Kn+t+Xn(t,/(\w+).+(:[^]+)/,Kn+"box-$1$2"+oo+"flex-$1$2")+t;case 5443:return Kn+t+oo+"flex-item-"+Xn(t,/flex-|-self/,"")+t;case 4675:return Kn+t+oo+"flex-line-pack"+Xn(t,/align-content|flex-|-self/,"")+t;case 5548:return Kn+t+oo+Xn(t,"shrink","negative")+t;case 5292:return Kn+t+oo+Xn(t,"basis","preferred-size")+t;case 6060:return Kn+"box-"+Xn(t,"-grow","")+Kn+t+oo+Xn(t,"grow","positive")+t;case 4554:return Kn+Xn(t,/([^-])(transform)/g,"$1"+Kn+"$2")+t;case 6187:return Xn(Xn(Xn(t,/(zoom-|grab)/,Kn+"$1"),/(image-set)/,Kn+"$1"),t,"")+t;case 5495:case 3959:return Xn(t,/(image-set\([^]*)/,Kn+"$1$`$1");case 4968:return Xn(Xn(t,/(.+:)(flex-)?(.*)/,Kn+"box-pack:$3"+oo+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+Kn+t+t;case 4095:case 3583:case 4068:case 2532:return Xn(t,/(.+)-inline(.+)/,Kn+"$1$2")+t;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(il(t)-1-e>6)switch(Xs(t,e+1)){case 109:if(Xs(t,e+4)!==45)break;case 102:return Xn(t,/(.+:)(.+)-([^]+)/,"$1"+Kn+"$2-$3$1"+O3+(Xs(t,e+3)==108?"$3":"$2-$3"))+t;case 115:return~ET(t,"stretch")?Ete(Xn(t,"stretch","fill-available"),e)+t:t}break;case 4949:if(Xs(t,e+1)!==115)break;case 6444:switch(Xs(t,il(t)-3-(~ET(t,"!important")&&10))){case 107:return Xn(t,":",":"+Kn)+t;case 101:return Xn(t,/(.+:)([^;!]+)(;|!.+)?/,"$1"+Kn+(Xs(t,14)===45?"inline-":"")+"box$3$1"+Kn+"$2$3$1"+oo+"$2box$3")+t}break;case 5936:switch(Xs(t,e+11)){case 114:return Kn+t+oo+Xn(t,/[svh]\w+-[tblr]{2}/,"tb")+t;case 108:return Kn+t+oo+Xn(t,/[svh]\w+-[tblr]{2}/,"tb-rl")+t;case 45:return Kn+t+oo+Xn(t,/[svh]\w+-[tblr]{2}/,"lr")+t}return Kn+t+oo+t+t}return t}var gRe=function(e,n,r,s){if(e.length>-1&&!e.return)switch(e.type){case ER:e.return=Ete(e.value,e.length);break;case bte:return Fh([l0(e,{value:Xn(e.value,"@","@"+Kn)})],s);case kR:if(e.length)return J_e(e.props,function(o){switch(Q_e(o,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return Fh([l0(e,{props:[Xn(o,/:(read-\w+)/,":"+O3+"$1")]})],s);case"::placeholder":return Fh([l0(e,{props:[Xn(o,/:(plac\w+)/,":"+Kn+"input-$1")]}),l0(e,{props:[Xn(o,/:(plac\w+)/,":"+O3+"$1")]}),l0(e,{props:[Xn(o,/:(plac\w+)/,oo+"input-$1")]})],s)}return""})}},yRe=[gRe],vRe=function(e){var n=e.key;if(n==="css"){var r=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(r,function(v){var b=v.getAttribute("data-emotion");b.indexOf(" ")!==-1&&(document.head.appendChild(v),v.setAttribute("data-s",""))})}var s=e.stylisPlugins||yRe,o={},i,a=[];i=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+n+' "]'),function(v){for(var b=v.getAttribute("data-emotion").split(" "),w=1;w<b.length;w++)o[b[w]]=!0;a.push(v)});var l,c=[hRe,mRe];{var u,f=[lRe,uRe(function(v){u.insert(v)})],h=cRe(c.concat(s,f)),m=function(b){return Fh(iRe(b),h)};l=function(b,w,C,k){u=C,m(b?b+"{"+w.styles+"}":w.styles),k&&(y.inserted[w.name]=!0)}}var y={key:n,sheet:new W_e({key:n,container:i,nonce:e.nonce,speedy:e.speedy,prepend:e.prepend,insertionPoint:e.insertionPoint}),nonce:e.nonce,inserted:o,registered:{},insert:l};return y.sheet.hydrate(a),y},Fk={exports:{}},Jn={};/** @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 bB;function bRe(){if(bB)return Jn;bB=1;var t=typeof Symbol=="function"&&Symbol.for,e=t?Symbol.for("react.element"):60103,n=t?Symbol.for("react.portal"):60106,r=t?Symbol.for("react.fragment"):60107,s=t?Symbol.for("react.strict_mode"):60108,o=t?Symbol.for("react.profiler"):60114,i=t?Symbol.for("react.provider"):60109,a=t?Symbol.for("react.context"):60110,l=t?Symbol.for("react.async_mode"):60111,c=t?Symbol.for("react.concurrent_mode"):60111,u=t?Symbol.for("react.forward_ref"):60112,f=t?Symbol.for("react.suspense"):60113,h=t?Symbol.for("react.suspense_list"):60120,m=t?Symbol.for("react.memo"):60115,y=t?Symbol.for("react.lazy"):60116,v=t?Symbol.for("react.block"):60121,b=t?Symbol.for("react.fundamental"):60117,w=t?Symbol.for("react.responder"):60118,C=t?Symbol.for("react.scope"):60119;function k(j){if(typeof j=="object"&&j!==null){var A=j.$$typeof;switch(A){case e:switch(j=j.type,j){case l:case c:case r:case o:case s:case f:return j;default:switch(j=j&&j.$$typeof,j){case a:case u:case y:case m:case i:return j;default:return A}}case n:return A}}}function E(j){return k(j)===c}return Jn.AsyncMode=l,Jn.ConcurrentMode=c,Jn.ContextConsumer=a,Jn.ContextProvider=i,Jn.Element=e,Jn.ForwardRef=u,Jn.Fragment=r,Jn.Lazy=y,Jn.Memo=m,Jn.Portal=n,Jn.Profiler=o,Jn.StrictMode=s,Jn.Suspense=f,Jn.isAsyncMode=function(j){return E(j)||k(j)===l},Jn.isConcurrentMode=E,Jn.isContextConsumer=function(j){return k(j)===a},Jn.isContextProvider=function(j){return k(j)===i},Jn.isElement=function(j){return typeof j=="object"&&j!==null&&j.$$typeof===e},Jn.isForwardRef=function(j){return k(j)===u},Jn.isFragment=function(j){return k(j)===r},Jn.isLazy=function(j){return k(j)===y},Jn.isMemo=function(j){return k(j)===m},Jn.isPortal=function(j){return k(j)===n},Jn.isProfiler=function(j){return k(j)===o},Jn.isStrictMode=function(j){return k(j)===s},Jn.isSuspense=function(j){return k(j)===f},Jn.isValidElementType=function(j){return typeof j=="string"||typeof j=="function"||j===r||j===c||j===o||j===s||j===f||j===h||typeof j=="object"&&j!==null&&(j.$$typeof===y||j.$$typeof===m||j.$$typeof===i||j.$$typeof===a||j.$$typeof===u||j.$$typeof===b||j.$$typeof===w||j.$$typeof===C||j.$$typeof===v)},Jn.typeOf=k,Jn}var xB;function xRe(){return xB||(xB=1,Fk.exports=bRe()),Fk.exports}var zk,wB;function wRe(){if(wB)return zk;wB=1;var t=xRe(),e={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},n={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},r={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},s={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},o={};o[t.ForwardRef]=r,o[t.Memo]=s;function i(y){return t.isMemo(y)?s:o[y.$$typeof]||e}var a=Object.defineProperty,l=Object.getOwnPropertyNames,c=Object.getOwnPropertySymbols,u=Object.getOwnPropertyDescriptor,f=Object.getPrototypeOf,h=Object.prototype;function m(y,v,b){if(typeof v!="string"){if(h){var w=f(v);w&&w!==h&&m(y,w,b)}var C=l(v);c&&(C=C.concat(c(v)));for(var k=i(y),E=i(v),j=0;j<C.length;++j){var A=C[j];if(!n[A]&&!(b&&b[A])&&!(E&&E[A])&&!(k&&k[A])){var M=u(v,A);try{a(y,A,M)}catch{}}}}return y}return zk=m,zk}wRe();var SRe=!0;function MR(t,e,n){var r="";return n.split(" ").forEach(function(s){t[s]!==void 0?e.push(t[s]+";"):s&&(r+=s+" ")}),r}var jR=function(e,n,r){var s=e.key+"-"+n.name;(r===!1||SRe===!1)&&e.registered[s]===void 0&&(e.registered[s]=n.styles)},RS=function(e,n,r){jR(e,n,r);var s=e.key+"-"+n.name;if(e.inserted[n.name]===void 0){var o=n;do e.insert(n===o?"."+s:"",o,e.sheet,!0),o=o.next;while(o!==void 0)}};function CRe(t){for(var e=0,n,r=0,s=t.length;s>=4;++r,s-=4)n=t.charCodeAt(r)&255|(t.charCodeAt(++r)&255)<<8|(t.charCodeAt(++r)&255)<<16|(t.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,e=(n&65535)*1540483477+((n>>>16)*59797<<16)^(e&65535)*1540483477+((e>>>16)*59797<<16);switch(s){case 3:e^=(t.charCodeAt(r+2)&255)<<16;case 2:e^=(t.charCodeAt(r+1)&255)<<8;case 1:e^=t.charCodeAt(r)&255,e=(e&65535)*1540483477+((e>>>16)*59797<<16)}return e^=e>>>13,e=(e&65535)*1540483477+((e>>>16)*59797<<16),((e^e>>>15)>>>0).toString(36)}var kRe={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,scale: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},ERe=/[A-Z]|^ms/g,TRe=/_EMO_([^_]+?)_([^]*?)_EMO_/g,Tte=function(e){return e.charCodeAt(1)===45},SB=function(e){return e!=null&&typeof e!="boolean"},Pk=kte(function(t){return Tte(t)?t:t.replace(ERe,"-$&").toLowerCase()}),CB=function(e,n){switch(e){case"animation":case"animationName":if(typeof n=="string")return n.replace(TRe,function(r,s,o){return al={name:s,styles:o,next:al},s})}return kRe[e]!==1&&!Tte(e)&&typeof n=="number"&&n!==0?n+"px":n};function Fg(t,e,n){if(n==null)return"";var r=n;if(r.__emotion_styles!==void 0)return r;switch(typeof n){case"boolean":return"";case"object":{var s=n;if(s.anim===1)return al={name:s.name,styles:s.styles,next:al},s.name;var o=n;if(o.styles!==void 0){var i=o.next;if(i!==void 0)for(;i!==void 0;)al={name:i.name,styles:i.styles,next:al},i=i.next;var a=o.styles+";";return a}return MRe(t,e,n)}case"function":{if(t!==void 0){var l=al,c=n(t);return al=l,Fg(t,e,c)}break}}var u=n;if(e==null)return u;var f=e[u];return f!==void 0?f:u}function MRe(t,e,n){var r="";if(Array.isArray(n))for(var s=0;s<n.length;s++)r+=Fg(t,e,n[s])+";";else for(var o in n){var i=n[o];if(typeof i!="object"){var a=i;e!=null&&e[a]!==void 0?r+=o+"{"+e[a]+"}":SB(a)&&(r+=Pk(o)+":"+CB(o,a)+";")}else if(Array.isArray(i)&&typeof i[0]=="string"&&(e==null||e[i[0]]===void 0))for(var l=0;l<i.length;l++)SB(i[l])&&(r+=Pk(o)+":"+CB(o,i[l])+";");else{var c=Fg(t,e,i);switch(o){case"animation":case"animationName":{r+=Pk(o)+":"+c+";";break}default:r+=o+"{"+c+"}"}}}return r}var kB=/label:\s*([^\s;{]+)\s*(;|$)/g,al;function J2(t,e,n){if(t.length===1&&typeof t[0]=="object"&&t[0]!==null&&t[0].styles!==void 0)return t[0];var r=!0,s="";al=void 0;var o=t[0];if(o==null||o.raw===void 0)r=!1,s+=Fg(n,e,o);else{var i=o;s+=i[0]}for(var a=1;a<t.length;a++)if(s+=Fg(n,e,t[a]),r){var l=o;s+=l[a]}kB.lastIndex=0;for(var c="",u;(u=kB.exec(s))!==null;)c+="-"+u[1];var f=CRe(s)+c;return{name:f,styles:s,next:al}}var jRe=function(e){return e()},Mte=lg.useInsertionEffect?lg.useInsertionEffect:!1,jte=Mte||jRe,EB=Mte||S.useLayoutEffect,Ate=S.createContext(typeof HTMLElement<"u"?vRe({key:"css"}):null);Ate.Provider;var DS=function(e){return S.forwardRef(function(n,r){var s=S.useContext(Ate);return e(n,s,r)})},AR=S.createContext({}),_R={}.hasOwnProperty,MT="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",ARe=function(e,n){var r={};for(var s in n)_R.call(n,s)&&(r[s]=n[s]);return r[MT]=e,r},_Re=function(e){var n=e.cache,r=e.serialized,s=e.isStringTag;return jR(n,r,s),jte(function(){return RS(n,r,s)}),null},RRe=DS(function(t,e,n){var r=t.css;typeof r=="string"&&e.registered[r]!==void 0&&(r=e.registered[r]);var s=t[MT],o=[r],i="";typeof t.className=="string"?i=MR(e.registered,o,t.className):t.className!=null&&(i=t.className+" ");var a=J2(o,void 0,S.useContext(AR));i+=e.key+"-"+a.name;var l={};for(var c in t)_R.call(t,c)&&c!=="css"&&c!==MT&&(l[c]=t[c]);return l.className=i,n&&(l.ref=n),S.createElement(S.Fragment,null,S.createElement(_Re,{cache:e,serialized:a,isStringTag:typeof s=="string"}),S.createElement(s,l))}),DRe=RRe,TB=function(e,n){var r=arguments;if(n==null||!_R.call(n,"css"))return S.createElement.apply(void 0,r);var s=r.length,o=new Array(s);o[0]=DRe,o[1]=ARe(e,n);for(var i=2;i<s;i++)o[i]=r[i];return S.createElement.apply(null,o)};(function(t){var e;e||(e=t.JSX||(t.JSX={}))})(TB||(TB={}));var IRe=DS(function(t,e){var n=t.styles,r=J2([n],void 0,S.useContext(AR)),s=S.useRef();return EB(function(){var o=e.key+"-global",i=new e.sheet.constructor({key:o,nonce:e.sheet.nonce,container:e.sheet.container,speedy:e.sheet.isSpeedy}),a=!1,l=document.querySelector('style[data-emotion="'+o+" "+r.name+'"]');return e.sheet.tags.length&&(i.before=e.sheet.tags[0]),l!==null&&(a=!0,l.setAttribute("data-emotion",o),i.hydrate([l])),s.current=[i,a],function(){i.flush()}},[e]),EB(function(){var o=s.current,i=o[0],a=o[1];if(a){o[1]=!1;return}if(r.next!==void 0&&RS(e,r.next,!0),i.tags.length){var l=i.tags[i.tags.length-1].nextElementSibling;i.before=l,i.flush()}e.insert("",r,i,!1)},[e,r.name]),null});function ORe(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return J2(e)}const _te=S.createContext(null);function NRe(){const t=S.useContext(_te);if(t===null)throw new Error("Emotion cache is not available in context, make sure that you have MantineEmotionProvider in the component tree");return t}const LRe=DS(({children:t,cache:e},n)=>d.jsx(_te.Provider,{value:e||n,children:t}));function $Re(t,e){const n=S.useRef(null);return(!n.current||e.length!==n.current.prevDeps.length||n.current.prevDeps.map((r,s)=>r===e[s]).indexOf(!1)>=0)&&(n.current={v:t(),prevDeps:[...e]}),n.current.v}const Bk="ref";function FRe(t){let e;if(t.length!==1)return{args:t,ref:e};const[n]=t;if(!(n instanceof Object))return{args:t,ref:e};if(!(Bk in n))return{args:t,ref:e};e=n[Bk];const r={...n};return delete r[Bk],{args:[r],ref:e}}const{cssFactory:zRe}=(()=>{function t(n,r,s){const o=[],i=MR(n,o,s);return o.length<2?s:i+r(o)}function e(n){const{cache:r}=n,s=(...i)=>{const{ref:a,args:l}=FRe(i),c=J2(l,r.registered);return RS(r,c,!1),`${r.key}-${c.name}${a===void 0?"":` ${a}`}`};return{css:s,cx:(...i)=>t(r.registered,s,Fr(i))}}return{cssFactory:e}})();function RR(){const t=NRe();return $Re(()=>zRe({cache:t}),[t])}function PRe(t){return`___ref-${t||""}`}function MB(t,e){return e in t.breakpoints&&typeof e!="number"?If(t.breakpoints[e]):If(e)}const DR=t=>({light:'[data-mantine-color-scheme="light"] &',dark:'[data-mantine-color-scheme="dark"] &',rtl:'[dir="rtl"] &',ltr:'[dir="ltr"] &',notRtl:'[dir="ltr"] &',notLtr:'[dir="rtl"] &',ref:PRe,smallerThan:e=>`@media (max-width: ${Uh(MB(t,e)-.1)})`,largerThan:e=>`@media (min-width: ${Uh(MB(t,e))})`});function Rte(t){const e=typeof t=="function"?t:()=>t;return function(r){const s=Tr(),o=DR(s),i=e(s,r,o),{css:a,cx:l}=RR();return{classes:Object.keys(i).reduce((u,f)=>(u[f]=a(i[f]),u),{}),cx:l,theme:s}}}function BRe(){const t=Tr(),{css:e}=RR();return n=>{const r=typeof n=="function"?n(t,DR(t)):n;return r?e(r):""}}function HRe(){const t=Tr(),{css:e}=RR();return(n,r)=>{if(!n)return{};const s=typeof n=="function"?n(t,r.props,DR(t)):n;return Object.keys(s).reduce((o,i)=>{const a=s[i],l=typeof a=="function"?a(t):a;return{...o,[i]:e(l)}},{})}}const URe={sx:BRe,styles:HRe};function VRe({styles:t}){const e=Tr();return d.jsx(IRe,{styles:ORe(typeof t=="function"?t(e):t)})}const qRe={...vxe,breakpoints:{xs:"30em",sm:"48em",md:"64em",lg:"74em",xl:"90em"},fontSizes:{md:"14px",lg:"16px",xl:"20px"},fontFamily:"Roboto, sans-serif",headings:{fontFamily:"Roboto, sans-serif"},components:{Notification:{styles:{title:{fontSize:"12px"},description:{fontSize:"12px"}}},Button:{styles:{inner:{fontWeight:400}}},Modal:{styles:{title:{fontSize:18,fontWeight:500}}},Tooltip:{styles:{tooltip:{fontSize:12}}},Badge:{defaultProps:{fw:400,tt:"none"}},Menu:{defaultProps:{shadow:"md"}},Divider:{defaultProps:{color:ma("dark")?"dark.4":"gray.3"}},ActionIcon:{defaultProps:{styles:t=>({root:{backgroundColor:"transparent",color:ma("dark")?t.colors.dark[4]:t.colors.gray[6],"&:hover":{backgroundColor:ma("dark")?t.colors.dark[5]:t.colors.gray[0],color:ma("dark")?t.colors.dark[4]:t.colors.gray[6]},"&:active":{backgroundColor:ma("dark")?t.colors.dark[5]:t.colors.gray[0],color:ma("dark")?t.colors.dark[4]:t.colors.gray[6]},"&[data-disabled], &[disabled]":{color:"#ced4da",backgroundColor:"#f1f3f5",cursor:"not-allowed",borderColor:"#f1f3f5",backgroundImage:"none"}}})}}}},WRe=t=>({a:{color:t.colors.blue[3],textDecoration:"none","&:hover":{textDecoration:"none"}}}),YRe=t=>{const e=me.c(5),{children:n}=t;let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=fj(a2,qRe),e[0]=r):r=e[0];const s=r;let o;e[1]===Symbol.for("react.memo_cache_sentinel")?(o=d.jsx(Ihe,{defaultColorScheme:"light"}),e[1]=o):o=e[1];let i;e[2]===Symbol.for("react.memo_cache_sentinel")?(i=d.jsx(VRe,{styles:WRe}),e[2]=i):i=e[2];let a;return e[3]!==n?(a=d.jsxs(d.Fragment,{children:[o,d.jsxs(l2,{defaultColorScheme:"light",stylesTransform:URe,theme:s,withGlobalClasses:!0,withCssVariables:!0,withStaticClasses:!0,children:[i,d.jsx(LRe,{children:n})]})]}),e[3]=n,e[4]=a):a=e[4],a},GRe="/assets/server-error-Bn9FznP0.png",KRe="_wrapper_12mjz_1",XRe={wrapper:KRe},xt=t=>{const e=me.c(3),[n,r]=S.useState(window.innerWidth<=t);let s,o;return e[0]!==t?(s=()=>{const i=function(){r(window.innerWidth<=t)};return window.addEventListener("resize",i),i(),()=>window.removeEventListener("resize",i)},o=[t],e[0]=t,e[1]=s,e[2]=o):(s=e[1],o=e[2]),S.useEffect(s,o),n},jl=t=>{const e=me.c(5),{children:n,hasHeader:r}=t,s=xt(1024),o=r?s?`calc(100dvh - ${MJ}px)`:`calc(100dvh - ${hT}px)`:"100dvh";let i;e[0]!==o?(i={height:o},e[0]=o,e[1]=i):i=e[1];let a;return e[2]!==n||e[3]!==i?(a=d.jsx("div",{style:i,className:XRe.wrapper,children:n}),e[2]=n,e[3]=i,e[4]=a):a=e[4],a},Oc=t=>{const e=me.c(21),{heading:n,description:r,handleButtonClick:s,buttonText:o,img:i,propDescWidth:a}=t,{width:l}=Dpe(),c=l>768?"xl":"md",u=l>768?26:19,f=l>768?300:250,h=l>768?16:14,m=l>768?"":"0 20px";let y;e[0]===Symbol.for("react.memo_cache_sentinel")?(y={objectFit:"contain"},e[0]=y):y=e[0];let v;e[1]!==i?(v=d.jsx(Sd,{src:i,w:270,h:240,style:y}),e[1]=i,e[2]=v):v=e[2];let b;e[3]!==u||e[4]!==n||e[5]!==c?(b=d.jsx(ue,{size:c,fw:500,fz:u,children:n}),e[3]=u,e[4]=n,e[5]=c,e[6]=b):b=e[6];const w=a||f;let C;e[7]!==h||e[8]!==m||e[9]!==r||e[10]!==w?(C=d.jsx(ue,{color:"dimmed",maw:w,ta:"center",fz:h,p:m,children:r}),e[7]=h,e[8]=m,e[9]=r,e[10]=w,e[11]=C):C=e[11];let k;e[12]===Symbol.for("react.memo_cache_sentinel")?(k={fontWeight:500},e[12]=k):k=e[12];let E;e[13]!==o||e[14]!==s?(E=d.jsx(yt,{fz:14,size:"sm",mt:20,sx:k,onClick:s,children:o}),e[13]=o,e[14]=s,e[15]=E):E=e[15];let j;return e[16]!==v||e[17]!==b||e[18]!==C||e[19]!==E?(j=d.jsxs(xe,{mih:500,w:"100%",direction:"column",gap:"xs",align:"center",justify:"center",children:[v,b,C,E]}),e[16]=v,e[17]=b,e[18]=C,e[19]=E,e[20]=j):j=e[20],j},ZRe=t=>{localStorage.setItem("showFeatures",t)};/*! @license DOMPurify 3.3.1 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.3.1/LICENSE */const{entries:Dte,setPrototypeOf:jB,isFrozen:QRe,getPrototypeOf:JRe,getOwnPropertyDescriptor:eDe}=Object;let{freeze:Do,seal:ra,create:jT}=Object,{apply:AT,construct:_T}=typeof Reflect<"u"&&Reflect;Do||(Do=function(e){return e});ra||(ra=function(e){return e});AT||(AT=function(e,n){for(var r=arguments.length,s=new Array(r>2?r-2:0),o=2;o<r;o++)s[o-2]=arguments[o];return e.apply(n,s)});_T||(_T=function(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),s=1;s<n;s++)r[s-1]=arguments[s];return new e(...r)});const rb=Io(Array.prototype.forEach),tDe=Io(Array.prototype.lastIndexOf),AB=Io(Array.prototype.pop),c0=Io(Array.prototype.push),nDe=Io(Array.prototype.splice),Ex=Io(String.prototype.toLowerCase),Hk=Io(String.prototype.toString),Uk=Io(String.prototype.match),u0=Io(String.prototype.replace),rDe=Io(String.prototype.indexOf),sDe=Io(String.prototype.trim),ha=Io(Object.prototype.hasOwnProperty),So=Io(RegExp.prototype.test),d0=oDe(TypeError);function Io(t){return function(e){e instanceof RegExp&&(e.lastIndex=0);for(var n=arguments.length,r=new Array(n>1?n-1:0),s=1;s<n;s++)r[s-1]=arguments[s];return AT(t,e,r)}}function oDe(t){return function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return _T(t,n)}}function Rn(t,e){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Ex;jB&&jB(t,null);let r=e.length;for(;r--;){let s=e[r];if(typeof s=="string"){const o=n(s);o!==s&&(QRe(e)||(e[r]=o),s=o)}t[s]=!0}return t}function iDe(t){for(let e=0;e<t.length;e++)ha(t,e)||(t[e]=null);return t}function el(t){const e=jT(null);for(const[n,r]of Dte(t))ha(t,n)&&(Array.isArray(r)?e[n]=iDe(r):r&&typeof r=="object"&&r.constructor===Object?e[n]=el(r):e[n]=r);return e}function f0(t,e){for(;t!==null;){const r=eDe(t,e);if(r){if(r.get)return Io(r.get);if(typeof r.value=="function")return Io(r.value)}t=JRe(t)}function n(){return null}return n}const _B=Do(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),Vk=Do(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),qk=Do(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),aDe=Do(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),Wk=Do(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),lDe=Do(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),RB=Do(["#text"]),DB=Do(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),Yk=Do(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),IB=Do(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),sb=Do(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),cDe=ra(/\{\{[\w\W]*|[\w\W]*\}\}/gm),uDe=ra(/<%[\w\W]*|[\w\W]*%>/gm),dDe=ra(/\$\{[\w\W]*/gm),fDe=ra(/^data-[\-\w.\u00B7-\uFFFF]+$/),pDe=ra(/^aria-[\-\w]+$/),Ite=ra(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),hDe=ra(/^(?:\w+script|data):/i),mDe=ra(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Ote=ra(/^html$/i),gDe=ra(/^[a-z][.\w]*(-[.\w]+)+$/i);var OB=Object.freeze({__proto__:null,ARIA_ATTR:pDe,ATTR_WHITESPACE:mDe,CUSTOM_ELEMENT:gDe,DATA_ATTR:fDe,DOCTYPE_NAME:Ote,ERB_EXPR:uDe,IS_ALLOWED_URI:Ite,IS_SCRIPT_OR_DATA:hDe,MUSTACHE_EXPR:cDe,TMPLIT_EXPR:dDe});const p0={element:1,text:3,progressingInstruction:7,comment:8,document:9},yDe=function(){return typeof window>"u"?null:window},vDe=function(e,n){if(typeof e!="object"||typeof e.createPolicy!="function")return null;let r=null;const s="data-tt-policy-suffix";n&&n.hasAttribute(s)&&(r=n.getAttribute(s));const o="dompurify"+(r?"#"+r:"");try{return e.createPolicy(o,{createHTML(i){return i},createScriptURL(i){return i}})}catch{return console.warn("TrustedTypes policy "+o+" could not be created."),null}},NB=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function Nte(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:yDe();const e=ht=>Nte(ht);if(e.version="3.3.1",e.removed=[],!t||!t.document||t.document.nodeType!==p0.document||!t.Element)return e.isSupported=!1,e;let{document:n}=t;const r=n,s=r.currentScript,{DocumentFragment:o,HTMLTemplateElement:i,Node:a,Element:l,NodeFilter:c,NamedNodeMap:u=t.NamedNodeMap||t.MozNamedAttrMap,HTMLFormElement:f,DOMParser:h,trustedTypes:m}=t,y=l.prototype,v=f0(y,"cloneNode"),b=f0(y,"remove"),w=f0(y,"nextSibling"),C=f0(y,"childNodes"),k=f0(y,"parentNode");if(typeof i=="function"){const ht=n.createElement("template");ht.content&&ht.content.ownerDocument&&(n=ht.content.ownerDocument)}let E,j="";const{implementation:A,createNodeIterator:M,createDocumentFragment:_,getElementsByTagName:D}=n,{importNode:R}=r;let N=NB();e.isSupported=typeof Dte=="function"&&typeof k=="function"&&A&&A.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:z,ERB_EXPR:B,TMPLIT_EXPR:L,DATA_ATTR:P,ARIA_ATTR:I,IS_SCRIPT_OR_DATA:H,ATTR_WHITESPACE:$,CUSTOM_ELEMENT:V}=OB;let{IS_ALLOWED_URI:q}=OB,U=null;const W=Rn({},[..._B,...Vk,...qk,...Wk,...RB]);let Y=null;const G=Rn({},[...DB,...Yk,...IB,...sb]);let K=Object.seal(jT(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Q=null,Z=null;const J=Object.seal(jT(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let ne=!0,se=!0,ce=!1,fe=!0,le=!1,be=!0,je=!1,pe=!1,_e=!1,Ce=!1,Te=!1,Ae=!1,Ze=!0,He=!1;const lt="user-content-";let Ye=!0,ge=!1,Fe={},Se=null;const qe=Rn({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let ot=null;const $e=Rn({},["audio","video","img","source","image","track"]);let pt=null;const gt=Rn({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Pt="http://www.w3.org/1998/Math/MathML",at="http://www.w3.org/2000/svg",nt="http://www.w3.org/1999/xhtml";let We=nt,At=!1,St=null;const Ot=Rn({},[Pt,at,nt],Hk);let Tt=Rn({},["mi","mo","mn","ms","mtext"]),kt=Rn({},["annotation-xml"]);const jt=Rn({},["title","style","font","a","script"]);let vt=null;const Yt=["application/xhtml+xml","text/html"],Vt="text/html";let Nt=null,Ht=null;const cn=n.createElement("form"),qt=function(oe){return oe instanceof RegExp||oe instanceof Function},Kt=function(){let oe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(Ht&&Ht===oe)){if((!oe||typeof oe!="object")&&(oe={}),oe=el(oe),vt=Yt.indexOf(oe.PARSER_MEDIA_TYPE)===-1?Vt:oe.PARSER_MEDIA_TYPE,Nt=vt==="application/xhtml+xml"?Hk:Ex,U=ha(oe,"ALLOWED_TAGS")?Rn({},oe.ALLOWED_TAGS,Nt):W,Y=ha(oe,"ALLOWED_ATTR")?Rn({},oe.ALLOWED_ATTR,Nt):G,St=ha(oe,"ALLOWED_NAMESPACES")?Rn({},oe.ALLOWED_NAMESPACES,Hk):Ot,pt=ha(oe,"ADD_URI_SAFE_ATTR")?Rn(el(gt),oe.ADD_URI_SAFE_ATTR,Nt):gt,ot=ha(oe,"ADD_DATA_URI_TAGS")?Rn(el($e),oe.ADD_DATA_URI_TAGS,Nt):$e,Se=ha(oe,"FORBID_CONTENTS")?Rn({},oe.FORBID_CONTENTS,Nt):qe,Q=ha(oe,"FORBID_TAGS")?Rn({},oe.FORBID_TAGS,Nt):el({}),Z=ha(oe,"FORBID_ATTR")?Rn({},oe.FORBID_ATTR,Nt):el({}),Fe=ha(oe,"USE_PROFILES")?oe.USE_PROFILES:!1,ne=oe.ALLOW_ARIA_ATTR!==!1,se=oe.ALLOW_DATA_ATTR!==!1,ce=oe.ALLOW_UNKNOWN_PROTOCOLS||!1,fe=oe.ALLOW_SELF_CLOSE_IN_ATTR!==!1,le=oe.SAFE_FOR_TEMPLATES||!1,be=oe.SAFE_FOR_XML!==!1,je=oe.WHOLE_DOCUMENT||!1,Ce=oe.RETURN_DOM||!1,Te=oe.RETURN_DOM_FRAGMENT||!1,Ae=oe.RETURN_TRUSTED_TYPE||!1,_e=oe.FORCE_BODY||!1,Ze=oe.SANITIZE_DOM!==!1,He=oe.SANITIZE_NAMED_PROPS||!1,Ye=oe.KEEP_CONTENT!==!1,ge=oe.IN_PLACE||!1,q=oe.ALLOWED_URI_REGEXP||Ite,We=oe.NAMESPACE||nt,Tt=oe.MATHML_TEXT_INTEGRATION_POINTS||Tt,kt=oe.HTML_INTEGRATION_POINTS||kt,K=oe.CUSTOM_ELEMENT_HANDLING||{},oe.CUSTOM_ELEMENT_HANDLING&&qt(oe.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(K.tagNameCheck=oe.CUSTOM_ELEMENT_HANDLING.tagNameCheck),oe.CUSTOM_ELEMENT_HANDLING&&qt(oe.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(K.attributeNameCheck=oe.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),oe.CUSTOM_ELEMENT_HANDLING&&typeof oe.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(K.allowCustomizedBuiltInElements=oe.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),le&&(se=!1),Te&&(Ce=!0),Fe&&(U=Rn({},RB),Y=[],Fe.html===!0&&(Rn(U,_B),Rn(Y,DB)),Fe.svg===!0&&(Rn(U,Vk),Rn(Y,Yk),Rn(Y,sb)),Fe.svgFilters===!0&&(Rn(U,qk),Rn(Y,Yk),Rn(Y,sb)),Fe.mathMl===!0&&(Rn(U,Wk),Rn(Y,IB),Rn(Y,sb))),oe.ADD_TAGS&&(typeof oe.ADD_TAGS=="function"?J.tagCheck=oe.ADD_TAGS:(U===W&&(U=el(U)),Rn(U,oe.ADD_TAGS,Nt))),oe.ADD_ATTR&&(typeof oe.ADD_ATTR=="function"?J.attributeCheck=oe.ADD_ATTR:(Y===G&&(Y=el(Y)),Rn(Y,oe.ADD_ATTR,Nt))),oe.ADD_URI_SAFE_ATTR&&Rn(pt,oe.ADD_URI_SAFE_ATTR,Nt),oe.FORBID_CONTENTS&&(Se===qe&&(Se=el(Se)),Rn(Se,oe.FORBID_CONTENTS,Nt)),oe.ADD_FORBID_CONTENTS&&(Se===qe&&(Se=el(Se)),Rn(Se,oe.ADD_FORBID_CONTENTS,Nt)),Ye&&(U["#text"]=!0),je&&Rn(U,["html","head","body"]),U.table&&(Rn(U,["tbody"]),delete Q.tbody),oe.TRUSTED_TYPES_POLICY){if(typeof oe.TRUSTED_TYPES_POLICY.createHTML!="function")throw d0('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof oe.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw d0('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');E=oe.TRUSTED_TYPES_POLICY,j=E.createHTML("")}else E===void 0&&(E=vDe(m,s)),E!==null&&typeof j=="string"&&(j=E.createHTML(""));Do&&Do(oe),Ht=oe}},yn=Rn({},[...Vk,...qk,...aDe]),ee=Rn({},[...Wk,...lDe]),ae=function(oe){let Ne=k(oe);(!Ne||!Ne.tagName)&&(Ne={namespaceURI:We,tagName:"template"});const ut=Ex(oe.tagName),un=Ex(Ne.tagName);return St[oe.namespaceURI]?oe.namespaceURI===at?Ne.namespaceURI===nt?ut==="svg":Ne.namespaceURI===Pt?ut==="svg"&&(un==="annotation-xml"||Tt[un]):!!yn[ut]:oe.namespaceURI===Pt?Ne.namespaceURI===nt?ut==="math":Ne.namespaceURI===at?ut==="math"&&kt[un]:!!ee[ut]:oe.namespaceURI===nt?Ne.namespaceURI===at&&!kt[un]||Ne.namespaceURI===Pt&&!Tt[un]?!1:!ee[ut]&&(jt[ut]||!yn[ut]):!!(vt==="application/xhtml+xml"&&St[oe.namespaceURI]):!1},de=function(oe){c0(e.removed,{element:oe});try{k(oe).removeChild(oe)}catch{b(oe)}},Ee=function(oe,Ne){try{c0(e.removed,{attribute:Ne.getAttributeNode(oe),from:Ne})}catch{c0(e.removed,{attribute:null,from:Ne})}if(Ne.removeAttribute(oe),oe==="is")if(Ce||Te)try{de(Ne)}catch{}else try{Ne.setAttribute(oe,"")}catch{}},De=function(oe){let Ne=null,ut=null;if(_e)oe="<remove></remove>"+oe;else{const nn=Uk(oe,/^[\r\n\t ]+/);ut=nn&&nn[0]}vt==="application/xhtml+xml"&&We===nt&&(oe='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+oe+"</body></html>");const un=E?E.createHTML(oe):oe;if(We===nt)try{Ne=new h().parseFromString(un,vt)}catch{}if(!Ne||!Ne.documentElement){Ne=A.createDocument(We,"template",null);try{Ne.documentElement.innerHTML=At?j:un}catch{}}const Mn=Ne.body||Ne.documentElement;return oe&&ut&&Mn.insertBefore(n.createTextNode(ut),Mn.childNodes[0]||null),We===nt?D.call(Ne,je?"html":"body")[0]:je?Ne.documentElement:Mn},Qe=function(oe){return M.call(oe.ownerDocument||oe,oe,c.SHOW_ELEMENT|c.SHOW_COMMENT|c.SHOW_TEXT|c.SHOW_PROCESSING_INSTRUCTION|c.SHOW_CDATA_SECTION,null)},mt=function(oe){return oe instanceof f&&(typeof oe.nodeName!="string"||typeof oe.textContent!="string"||typeof oe.removeChild!="function"||!(oe.attributes instanceof u)||typeof oe.removeAttribute!="function"||typeof oe.setAttribute!="function"||typeof oe.namespaceURI!="string"||typeof oe.insertBefore!="function"||typeof oe.hasChildNodes!="function")},rt=function(oe){return typeof a=="function"&&oe instanceof a};function st(ht,oe,Ne){rb(ht,ut=>{ut.call(e,oe,Ne,Ht)})}const Mt=function(oe){let Ne=null;if(st(N.beforeSanitizeElements,oe,null),mt(oe))return de(oe),!0;const ut=Nt(oe.nodeName);if(st(N.uponSanitizeElement,oe,{tagName:ut,allowedTags:U}),be&&oe.hasChildNodes()&&!rt(oe.firstElementChild)&&So(/<[/\w!]/g,oe.innerHTML)&&So(/<[/\w!]/g,oe.textContent)||oe.nodeType===p0.progressingInstruction||be&&oe.nodeType===p0.comment&&So(/<[/\w]/g,oe.data))return de(oe),!0;if(!(J.tagCheck instanceof Function&&J.tagCheck(ut))&&(!U[ut]||Q[ut])){if(!Q[ut]&&Lt(ut)&&(K.tagNameCheck instanceof RegExp&&So(K.tagNameCheck,ut)||K.tagNameCheck instanceof Function&&K.tagNameCheck(ut)))return!1;if(Ye&&!Se[ut]){const un=k(oe)||oe.parentNode,Mn=C(oe)||oe.childNodes;if(Mn&&un){const nn=Mn.length;for(let Ge=nn-1;Ge>=0;--Ge){const Rt=v(Mn[Ge],!0);Rt.__removalCount=(oe.__removalCount||0)+1,un.insertBefore(Rt,w(oe))}}}return de(oe),!0}return oe instanceof l&&!ae(oe)||(ut==="noscript"||ut==="noembed"||ut==="noframes")&&So(/<\/no(script|embed|frames)/i,oe.innerHTML)?(de(oe),!0):(le&&oe.nodeType===p0.text&&(Ne=oe.textContent,rb([z,B,L],un=>{Ne=u0(Ne,un," ")}),oe.textContent!==Ne&&(c0(e.removed,{element:oe.cloneNode()}),oe.textContent=Ne)),st(N.afterSanitizeElements,oe,null),!1)},Ut=function(oe,Ne,ut){if(Ze&&(Ne==="id"||Ne==="name")&&(ut in n||ut in cn))return!1;if(!(se&&!Z[Ne]&&So(P,Ne))){if(!(ne&&So(I,Ne))){if(!(J.attributeCheck instanceof Function&&J.attributeCheck(Ne,oe))){if(!Y[Ne]||Z[Ne]){if(!(Lt(oe)&&(K.tagNameCheck instanceof RegExp&&So(K.tagNameCheck,oe)||K.tagNameCheck instanceof Function&&K.tagNameCheck(oe))&&(K.attributeNameCheck instanceof RegExp&&So(K.attributeNameCheck,Ne)||K.attributeNameCheck instanceof Function&&K.attributeNameCheck(Ne,oe))||Ne==="is"&&K.allowCustomizedBuiltInElements&&(K.tagNameCheck instanceof RegExp&&So(K.tagNameCheck,ut)||K.tagNameCheck instanceof Function&&K.tagNameCheck(ut))))return!1}else if(!pt[Ne]){if(!So(q,u0(ut,$,""))){if(!((Ne==="src"||Ne==="xlink:href"||Ne==="href")&&oe!=="script"&&rDe(ut,"data:")===0&&ot[oe])){if(!(ce&&!So(H,u0(ut,$,"")))){if(ut)return!1}}}}}}}return!0},Lt=function(oe){return oe!=="annotation-xml"&&Uk(oe,V)},Xt=function(oe){st(N.beforeSanitizeAttributes,oe,null);const{attributes:Ne}=oe;if(!Ne||mt(oe))return;const ut={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:Y,forceKeepAttr:void 0};let un=Ne.length;for(;un--;){const Mn=Ne[un],{name:nn,namespaceURI:Ge,value:Rt}=Mn,Zt=Nt(nn),$t=Rt;let en=nn==="value"?$t:sDe($t);if(ut.attrName=Zt,ut.attrValue=en,ut.keepAttr=!0,ut.forceKeepAttr=void 0,st(N.uponSanitizeAttribute,oe,ut),en=ut.attrValue,He&&(Zt==="id"||Zt==="name")&&(Ee(nn,oe),en=lt+en),be&&So(/((--!?|])>)|<\/(style|title|textarea)/i,en)){Ee(nn,oe);continue}if(Zt==="attributename"&&Uk(en,"href")){Ee(nn,oe);continue}if(ut.forceKeepAttr)continue;if(!ut.keepAttr){Ee(nn,oe);continue}if(!fe&&So(/\/>/i,en)){Ee(nn,oe);continue}le&&rb([z,B,L],In=>{en=u0(en,In," ")});const rn=Nt(oe.nodeName);if(!Ut(rn,Zt,en)){Ee(nn,oe);continue}if(E&&typeof m=="object"&&typeof m.getAttributeType=="function"&&!Ge)switch(m.getAttributeType(rn,Zt)){case"TrustedHTML":{en=E.createHTML(en);break}case"TrustedScriptURL":{en=E.createScriptURL(en);break}}if(en!==$t)try{Ge?oe.setAttributeNS(Ge,nn,en):oe.setAttribute(nn,en),mt(oe)?de(oe):AB(e.removed)}catch{Ee(nn,oe)}}st(N.afterSanitizeAttributes,oe,null)},mn=function ht(oe){let Ne=null;const ut=Qe(oe);for(st(N.beforeSanitizeShadowDOM,oe,null);Ne=ut.nextNode();)st(N.uponSanitizeShadowNode,Ne,null),Mt(Ne),Xt(Ne),Ne.content instanceof o&&ht(Ne.content);st(N.afterSanitizeShadowDOM,oe,null)};return e.sanitize=function(ht){let oe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Ne=null,ut=null,un=null,Mn=null;if(At=!ht,At&&(ht="<!-->"),typeof ht!="string"&&!rt(ht))if(typeof ht.toString=="function"){if(ht=ht.toString(),typeof ht!="string")throw d0("dirty is not a string, aborting")}else throw d0("toString is not a function");if(!e.isSupported)return ht;if(pe||Kt(oe),e.removed=[],typeof ht=="string"&&(ge=!1),ge){if(ht.nodeName){const Rt=Nt(ht.nodeName);if(!U[Rt]||Q[Rt])throw d0("root node is forbidden and cannot be sanitized in-place")}}else if(ht instanceof a)Ne=De("<!---->"),ut=Ne.ownerDocument.importNode(ht,!0),ut.nodeType===p0.element&&ut.nodeName==="BODY"||ut.nodeName==="HTML"?Ne=ut:Ne.appendChild(ut);else{if(!Ce&&!le&&!je&&ht.indexOf("<")===-1)return E&&Ae?E.createHTML(ht):ht;if(Ne=De(ht),!Ne)return Ce?null:Ae?j:""}Ne&&_e&&de(Ne.firstChild);const nn=Qe(ge?ht:Ne);for(;un=nn.nextNode();)Mt(un),Xt(un),un.content instanceof o&&mn(un.content);if(ge)return ht;if(Ce){if(Te)for(Mn=_.call(Ne.ownerDocument);Ne.firstChild;)Mn.appendChild(Ne.firstChild);else Mn=Ne;return(Y.shadowroot||Y.shadowrootmode)&&(Mn=R.call(r,Mn,!0)),Mn}let Ge=je?Ne.outerHTML:Ne.innerHTML;return je&&U["!doctype"]&&Ne.ownerDocument&&Ne.ownerDocument.doctype&&Ne.ownerDocument.doctype.name&&So(Ote,Ne.ownerDocument.doctype.name)&&(Ge="<!DOCTYPE "+Ne.ownerDocument.doctype.name+`>
`+Ge),le&&rb([z,B,L],Rt=>{Ge=u0(Ge,Rt," ")}),E&&Ae?E.createHTML(Ge):Ge},e.setConfig=function(){let ht=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Kt(ht),pe=!0},e.clearConfig=function(){Ht=null,pe=!1},e.isValidAttribute=function(ht,oe,Ne){Ht||Kt({});const ut=Nt(ht),un=Nt(oe);return Ut(ut,un,Ne)},e.addHook=function(ht,oe){typeof oe=="function"&&c0(N[ht],oe)},e.removeHook=function(ht,oe){if(oe!==void 0){const Ne=tDe(N[ht],oe);return Ne===-1?void 0:nDe(N[ht],Ne,1)[0]}return AB(N[ht])},e.removeHooks=function(ht){N[ht]=[]},e.removeAllHooks=function(){N=NB()},e}var Lte=Nte();const IR=({attachmentId:t})=>{window.open(`/doc.html?id=${t}`,"_blank","")},LB=["#FFA94D","#FFD43B","#A9E34B","#69DB7C","#38D9A9","#3BC9DB","#4DABF7","#748FFC","#9775FA","#DA77F2","#F783AC","#FF8787"],OR=t=>{if(typeof t!="string")throw new Error("Input must be a string");const e=n=>n.trim()===""?0:Array.from(n).reduce((r,s)=>r+s.charCodeAt(0),0)%LB.length;return(()=>{try{const n=e(t);return LB[n]}catch(n){return console.error("Error generating color:",n),"#FFFFFF"}})()},cp=({label:t,size:e,item:n})=>{const r=re(op),s=OR(t||""),o=S.useCallback(()=>{var u,f,h,m,y,v,b,w,C,k;const a=r[t];if(typeof(a==null?void 0:a.name)=="string"&&a.name.trim()){const E=a.name.trim().split(" ");return(((f=(u=E[0])==null?void 0:u[0])==null?void 0:f.toUpperCase())||"")+(((m=(h=E[1])==null?void 0:h[0])==null?void 0:m.toUpperCase())||"")}const l=(t||"").trim(),c=l.split(" ");return c.length>=2?(((v=(y=c[0])==null?void 0:y[0])==null?void 0:v.toUpperCase())||"")+(((w=(b=c[1])==null?void 0:b[0])==null?void 0:w.toUpperCase())||""):l[0]==='"'||l[0]==="'"?(C=l[1])==null?void 0:C.toUpperCase():(k=l[0])==null?void 0:k.toUpperCase()},[r.length,t]),i=S.useMemo(()=>{var c,u;const a=n?n==null?void 0:n.Contact.Id:(c=r[t])==null?void 0:c.id;return(n?n==null?void 0:n.Contact.HasAvatar:(u=r[t])==null?void 0:u.hasAvatar)?`/api/v2/profile/getAvatar?&id=${a}&type=Contact`:null},[r.length,t,n]);return d.jsx(Pc,{sx:{border:"2px solid white",span:{background:`${s} `,color:"white",border:0}},src:i,radius:"xl",color:"blue",size:e,children:o()})},$te=t=>{const e=me.c(3),{onClick:n}=t;let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=d.jsx(ie,{component:Rc,stroke:1.4,style:bDe}),e[0]=r):r=e[0];let s;return e[1]!==n?(s=d.jsx(Ve,{onClick:n,ml:"auto",size:23,children:r}),e[1]=n,e[2]=s):s=e[2],s};function bDe(t){return{color:t.colors.gray[6]}}const xDe=t=>{const e=me.c(38),{supportedList:n,attachment:r,handleAttachmentOpen:s,handleAttachmentToDisk:o,handleAttachmentToCalendar:i,handleAttachmentDownload:a,opened:l,toggle:c}=t,{t:u}=Le();let f;e[0]===Symbol.for("react.memo_cache_sentinel")?(f={display:"flex"},e[0]=f):f=e[0];let h;e[1]!==c?(h=d.jsx(et.Target,{children:d.jsx("span",{style:f,children:d.jsx($te,{onClick:M=>{M.stopPropagation(),c()}})})}),e[1]=c,e[2]=h):h=e[2];let m;e[3]!==r||e[4]!==s||e[5]!==n||e[6]!==u?(m=!!n.find(M=>M.mimeType===r.MimeType)&&d.jsx(et.Item,{px:10,py:5,fz:14,onClick:M=>(M.stopPropagation(),s(r)),children:u("view")}),e[3]=r,e[4]=s,e[5]=n,e[6]=u,e[7]=m):m=e[7];let y;e[8]!==r||e[9]!==a?(y=M=>(M.stopPropagation(),a(r)),e[8]=r,e[9]=a,e[10]=y):y=e[10];let v;e[11]!==u?(v=u("download"),e[11]=u,e[12]=v):v=e[12];let b;e[13]!==y||e[14]!==v?(b=d.jsx(et.Item,{px:10,py:5,fz:14,onClick:y,children:v}),e[13]=y,e[14]=v,e[15]=b):b=e[15];let w;e[16]!==r||e[17]!==o?(w=M=>(M.stopPropagation(),o(r)),e[16]=r,e[17]=o,e[18]=w):w=e[18];let C;e[19]!==u?(C=u("downloadToDisk"),e[19]=u,e[20]=C):C=e[20];let k;e[21]!==w||e[22]!==C?(k=d.jsx(et.Item,{px:10,py:5,fz:14,onClick:w,children:C}),e[21]=w,e[22]=C,e[23]=k):k=e[23];let E;e[24]!==r.FileName||e[25]!==i||e[26]!==u?(E=r.FileName.indexOf("ics")!==-1&&d.jsx(et.Item,{px:10,py:5,fz:14,onClick:()=>i(r.FileName),children:u("addToCalendar")}),e[24]=r.FileName,e[25]=i,e[26]=u,e[27]=E):E=e[27];let j;e[28]!==E||e[29]!==m||e[30]!==b||e[31]!==k?(j=d.jsxs(et.Dropdown,{children:[m,b,k,E]}),e[28]=E,e[29]=m,e[30]=b,e[31]=k,e[32]=j):j=e[32];let A;return e[33]!==l||e[34]!==j||e[35]!==h||e[36]!==c?(A=d.jsxs(et,{radius:"md",opened:l,closeOnEscape:!0,onChange:c,children:[h,j]}),e[33]=l,e[34]=j,e[35]=h,e[36]=c,e[37]=A):A=e[37],A},wDe="_line_wrap_vaslt_1",SDe="_line_vaslt_1",$B={line_wrap:wDe,line:SDe},CDe=80,kDe=t=>{const e=me.c(8),{onClose:n}=t,[r,s]=S.useState(null);let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=m=>{s(m.touches[0].clientY)},e[0]=o):o=e[0];const i=o;let a;e[1]!==n||e[2]!==r?(a=m=>{if(r==null)return;m.touches[0].clientY-r>CDe&&(n(),s(null))},e[1]=n,e[2]=r,e[3]=a):a=e[3];const l=a;let c;e[4]===Symbol.for("react.memo_cache_sentinel")?(c=()=>s(null),e[4]=c):c=e[4];const u=c;let f;e[5]===Symbol.for("react.memo_cache_sentinel")?(f=d.jsx("span",{className:$B.line}),e[5]=f):f=e[5];let h;return e[6]!==l?(h=d.jsx("div",{className:$B.line_wrap,onTouchStart:i,onTouchMove:l,onTouchEnd:u,onClick:EDe,children:f}),e[6]=l,e[7]=h):h=e[7],h};function EDe(t){return t.stopPropagation()}const Km=t=>{const e=me.c(21),{opened:n,onClose:r,trigger:s,children:o,maxHeight:i,showHandle:a}=t,l=i===void 0?"60dvh":i,c=a===void 0?!0:a;let u;e[0]===Symbol.for("react.memo_cache_sentinel")?(u={duration:200,timingFunction:"ease-out",transition:"slide-up"},e[0]=u):u=e[0];let f;e[1]!==r?(f={backgroundOpacity:.5,blur:4,onPointerDownCapture:C=>{C.preventDefault(),C.stopPropagation(),r()},onClickCapture:TDe},e[1]=r,e[2]=f):f=e[2];let h;e[3]!==l?(h={borderTopLeftRadius:16,borderTopRightRadius:16,borderBottomLeftRadius:0,borderBottomRightRadius:0,padding:"0",height:"auto",maxHeight:l,overflow:"hidden",display:"flex",flexDirection:"column"},e[3]=l,e[4]=h):h=e[4];let m;e[5]===Symbol.for("react.memo_cache_sentinel")?(m={padding:"45px 0 0",overflow:"auto"},e[5]=m):m=e[5];let y;e[6]!==h?(y={content:h,body:m},e[6]=h,e[7]=y):y=e[7];let v;e[8]!==r||e[9]!==c?(v=c&&d.jsx(kDe,{onClose:r}),e[8]=r,e[9]=c,e[10]=v):v=e[10];let b;e[11]!==o||e[12]!==r||e[13]!==n||e[14]!==f||e[15]!==y||e[16]!==v?(b=d.jsxs(Xr,{opened:n,onClose:r,position:"bottom",withCloseButton:!1,size:"auto",transitionProps:u,overlayProps:f,closeOnClickOutside:!0,styles:y,children:[v,o]}),e[11]=o,e[12]=r,e[13]=n,e[14]=f,e[15]=y,e[16]=v,e[17]=b):b=e[17];let w;return e[18]!==b||e[19]!==s?(w=d.jsxs(d.Fragment,{children:[s,b]}),e[18]=b,e[19]=s,e[20]=w):w=e[20],w};function TDe(t){t.preventDefault(),t.stopPropagation()}const MDe=t=>{const e=me.c(48),{supportedList:n,attachment:r,handleAttachmentOpen:s,handleAttachmentToDisk:o,handleAttachmentToCalendar:i,handleAttachmentDownload:a,opened:l,toggle:c}=t,{t:u}=Le();let f;e[0]!==c?(f=d.jsx($te,{onClick:N=>{N.stopPropagation(),c()}}),e[0]=c,e[1]=f):f=e[1];let h;e[2]===Symbol.for("react.memo_cache_sentinel")?(h={itemWrapper:{width:"100%"}},e[2]=h):h=e[2];let m;e[3]!==r||e[4]!==s||e[5]!==n||e[6]!==u||e[7]!==c?(m=!!n.find(N=>N.mimeType===r.MimeType)&&d.jsx(d.Fragment,{children:d.jsx(Qr.Item,{p:8,px:"md",py:"3px",fz:14,w:"100%",styles:{itemLabel:{width:"100%"}},children:d.jsx(En,{onClick:N=>(N.stopPropagation(),c(),s(r)),w:"100%",children:d.jsx(ve,{children:d.jsx(ue,{fz:14,c:"#343A40",children:u("view")})})})})}),e[3]=r,e[4]=s,e[5]=n,e[6]=u,e[7]=c,e[8]=m):m=e[8];let y;e[9]===Symbol.for("react.memo_cache_sentinel")?(y={itemLabel:{width:"100%"}},e[9]=y):y=e[9];let v;e[10]!==r||e[11]!==a||e[12]!==c?(v=N=>(N.stopPropagation(),c(),a(r)),e[10]=r,e[11]=a,e[12]=c,e[13]=v):v=e[13];let b;e[14]!==u?(b=u("download"),e[14]=u,e[15]=b):b=e[15];let w;e[16]!==b?(w=d.jsx(ve,{children:d.jsx(ue,{fz:14,c:"#343A40",children:b})}),e[16]=b,e[17]=w):w=e[17];let C;e[18]!==v||e[19]!==w?(C=d.jsx(Qr.Item,{p:8,px:"md",py:"3px",fz:14,w:"100%",styles:y,children:d.jsx(En,{onClick:v,w:"100%",children:w})}),e[18]=v,e[19]=w,e[20]=C):C=e[20];let k;e[21]===Symbol.for("react.memo_cache_sentinel")?(k={itemLabel:{width:"100%"}},e[21]=k):k=e[21];let E;e[22]!==r||e[23]!==o||e[24]!==c?(E=N=>(N.stopPropagation(),c(),o(r)),e[22]=r,e[23]=o,e[24]=c,e[25]=E):E=e[25];let j;e[26]!==u?(j=u("downloadToDisk"),e[26]=u,e[27]=j):j=e[27];let A;e[28]!==j?(A=d.jsx(ve,{children:d.jsx(ue,{fz:14,c:"#343A40",children:j})}),e[28]=j,e[29]=A):A=e[29];let M;e[30]!==E||e[31]!==A?(M=d.jsx(Qr.Item,{p:8,px:"md",py:"3px",fz:14,w:"100%",styles:k,children:d.jsx(En,{onClick:E,w:"100%",children:A})}),e[30]=E,e[31]=A,e[32]=M):M=e[32];let _;e[33]!==r.FileName||e[34]!==i||e[35]!==u||e[36]!==c?(_=r.FileName.indexOf("ics")!==-1&&d.jsx(Qr.Item,{p:8,px:"md",py:"3px",fz:14,w:"100%",styles:{itemLabel:{width:"100%"}},children:d.jsx(En,{onClick:()=>{c(),i(r.FileName)},w:"100%",children:d.jsx(ve,{children:d.jsx(ue,{fz:14,c:"#343A40",children:u("addToCalendar")})})})}),e[33]=r.FileName,e[34]=i,e[35]=u,e[36]=c,e[37]=_):_=e[37];let D;e[38]!==M||e[39]!==_||e[40]!==m||e[41]!==C?(D=d.jsxs(Qr,{spacing:"xs",size:"sm",center:!0,p:"10px 0",styles:h,children:[m,C,M,_]}),e[38]=M,e[39]=_,e[40]=m,e[41]=C,e[42]=D):D=e[42];let R;return e[43]!==l||e[44]!==f||e[45]!==D||e[46]!==c?(R=d.jsx(Km,{opened:l,onClose:c,trigger:f,children:D}),e[43]=l,e[44]=f,e[45]=D,e[46]=c,e[47]=R):R=e[47],R},Fte=t=>{const e=me.c(10),{supportedList:n,attachment:r,handleAttachmentOpen:s,handleAttachmentToDisk:o,handleAttachmentToCalendar:i,handleAttachmentDownload:a}=t,l=xt(575),[c,u]=S.useState(!1);let f;e[0]===Symbol.for("react.memo_cache_sentinel")?(f=()=>u(jDe),e[0]=f):f=e[0];const h=f;let m;return e[1]!==r||e[2]!==a||e[3]!==s||e[4]!==i||e[5]!==o||e[6]!==l||e[7]!==c||e[8]!==n?(m=d.jsx(d.Fragment,{children:l?d.jsx(MDe,{attachment:r,handleAttachmentOpen:s,handleAttachmentDownload:a,handleAttachmentToDisk:o,handleAttachmentToCalendar:i,supportedList:n,opened:c,toggle:h}):d.jsx(xDe,{attachment:r,handleAttachmentOpen:s,handleAttachmentDownload:a,handleAttachmentToDisk:o,handleAttachmentToCalendar:i,supportedList:n,opened:c,toggle:h})}),e[1]=r,e[2]=a,e[3]=s,e[4]=i,e[5]=o,e[6]=l,e[7]=c,e[8]=n,e[9]=m):m=e[9],m};function jDe(t){return!t}const zte=t=>{const e=me.c(3),{onClick:n}=t;let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=d.jsx(Rc,{stroke:1.5,size:20}),e[0]=r):r=e[0];let s;return e[1]!==n?(s=d.jsx(Ve,{size:20,onClick:n,children:r}),e[1]=n,e[2]=s):s=e[2],s},NR=new Map;function ADe(t,e){NR.set(t,e)}function _De(t){return NR.get(t)}const RDe=t=>{NR.delete(t)},Mi=S.createContext(null),DDe=t=>{const e=me.c(18),{children:n,defaultProps:r}=t;let s;e[0]!==r?(s=r||{type:"new"},e[0]=r,e[1]=s):s=e[1];const o=s;let i;e[2]===Symbol.for("react.memo_cache_sentinel")?(i=[],e[2]=i):i=e[2];const[a,l]=S.useState(i);let c;e[3]!==o?(c=A=>{const M={...o,...A},_={id:`window-${Date.now()}`,props:M,isActive:!0,isOpen:!0,isFullScreen:!1,isMinimize:!1,prevIsFullScreen:!1,enablePreventClosing:!1,hasMoved:!1};l(D=>[...D,_])},e[3]=o,e[4]=c):c=e[4];const u=c;let f;e[5]===Symbol.for("react.memo_cache_sentinel")?(f=A=>{l(M=>M.filter(_=>_.id!==A))},e[5]=f):f=e[5];const h=f;let m,y,v,b,w,C;e[6]===Symbol.for("react.memo_cache_sentinel")?(b=A=>{C(A,{isMinimize:!0,isFullScreen:!1})},y=A=>{C(A,{isMinimize:!1})},m=A=>{C(A,{isFullScreen:!0,prevIsFullScreen:!0})},v=A=>{C(A,{isFullScreen:!1,prevIsFullScreen:!1})},C=(A,M)=>{l(_=>_.map(D=>D.id===A?{...D,...M}:D))},w=A=>{var _;l(D=>D.map(R=>R.id===A?{...R,isActive:!0,isMinimize:!1}:R));const M=_De(A);M==null||M.commands.focus("end"),(_=document.getElementById(A))==null||_.click()},e[6]=m,e[7]=y,e[8]=v,e[9]=b,e[10]=w,e[11]=C):(m=e[6],y=e[7],v=e[8],b=e[9],w=e[10],C=e[11]);const k=w;let E;e[12]!==u||e[13]!==a?(E={windows:a,openSendWindow:u,closeSendWindow:h,minimizeWindow:b,expandWindow:y,expandFullScreenWindow:m,minimizeFullScreenWindow:v,updateWindow:C,focusWindow:k},e[12]=u,e[13]=a,e[14]=E):E=e[14];let j;return e[15]!==n||e[16]!==E?(j=d.jsx(Mi.Provider,{value:E,children:n}),e[15]=n,e[16]=E,e[17]=j):j=e[17],j},Fa=t=>{var k;const e=me.c(18),n=S.useRef(null),r=xt(1024),s=Er(),{pathname:o}=wn(),i=wn(),a=S.useContext(Mi),l=re(Dn);let c;e[0]!==o?(c=o.startsWith("/search"),e[0]=o,e[1]=c):c=e[1];const u=c;let f;e[2]!==o?(f=o.includes("tags"),e[2]=o,e[3]=f):f=e[3];const h=f;let m;e[4]!==o?(m=o.includes("/message"),e[4]=o,e[5]=m):m=e[5];const y=m,{emailId:v}=sr();let b;e:{if(Number.isFinite(Number(v))){b=v;break e}b=`${(k=l[0])==null?void 0:k.Id}`}const w=b;let C;return e[6]!==w||e[7]!==v||e[8]!==l||e[9]!==h||e[10]!==y||e[11]!==r||e[12]!==u||e[13]!==i||e[14]!==s||e[15]!==t||e[16]!==a?(C=E=>{const j={...t,...E};if(r){const M=new URLSearchParams(i.search).get("to"),_=M?`?to=${encodeURIComponent(M)}`:"";s(`/${w}/send${_}`,{state:{...j,closeCallbackRef:n,fromSendModal:!0}})}else if(a){const{openSendWindow:A}=a;if(A(j),!Number.isFinite(Number(v))&&!u&&!h&&!y){const M=i.pathname,_=i.search;s(`/${l[0].Id}${M}${_}`)}}},e[6]=w,e[7]=v,e[8]=l,e[9]=h,e[10]=y,e[11]=r,e[12]=u,e[13]=i,e[14]=s,e[15]=t,e[16]=a,e[17]=C):C=e[17],C};function IS(t){var b,w;const e=me.c(20),n=sr(),r=re(Dn),s=re(zr);let o;e[0]!==s||e[1]!==t.FolderId||e[2]!==n.emailId?(o=n.emailId?+n.emailId:(b=s==null?void 0:s.find(C=>C.Id===(t==null?void 0:t.FolderId)))==null?void 0:b.UserEmailId,e[0]=s,e[1]=t.FolderId,e[2]=n.emailId,e[3]=o):o=e[3];const i=o;let a;e[4]!==i||e[5]!==r?(a=(w=r.find(C=>C.Id===Number(i)))==null?void 0:w.Email,e[4]=i,e[5]=r,e[6]=a):a=e[6];const l=a;let c;e[7]!==l?(c=l?{Address:l}:void 0,e[7]=l,e[8]=c):c=e[8];let u;e[9]===Symbol.for("react.memo_cache_sentinel")?(u=[],e[9]=u):u=e[9];const f=t.Subject;let h;e[10]!==t?(h=sJ(t),e[10]=t,e[11]=h):h=e[11];let m;e[12]!==t.Attachments?(m=t.Attachments??[],e[12]=t.Attachments,e[13]=m):m=e[13];let y;return e[14]!==t.Id||e[15]!==t.Subject||e[16]!==c||e[17]!==h||e[18]!==m?(y={type:"forward",From:c,To:u,Subject:f,HtmlBody:h,Attachments:m,ReplyToId:t.Id},e[14]=t.Id,e[15]=t.Subject,e[16]=c,e[17]=h,e[18]=m,e[19]=y):y=e[19],Fa(y)}const IDe=/(?:[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]{2,})+|\"([^\"]+)\"\s*<([a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]{2,})+)>|([a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]{2,})+)|([^\s]+(?:\s+[^\s]+)*)\s*<([a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]{2,})+)>|<([^\s]+(?:\s+[^\s]+)*)>\s*<([a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]{2,})+)>)/,ODe=/[)!@#$%&*()__+}{":?\/|,~\[\]\\\^]+.*$/,NDe=t=>ODe.test(t),LDe=t=>t.endsWith("."),$De=t=>t.includes("<")&&!t.includes(">")||t.includes(">")&&!t.includes("<"),FDe=t=>{const e=t.match(/^\s*([^<]*)\s*<([^>]+)>$/);return e?/\s/.test(e[2]):!1},zDe=t=>/\s/.test(t)&&!/^\s*[^<]*\s*<[^>]+>$/i.test(t),PDe=t=>/<[^>]+>[^<>\s]+/.test(t),BDe=t=>/<[^>]+>\s*<[^>]+>/.test(t),zg=t=>{const e=(t.match(/@/g)||[]).length,n=t.indexOf("@"),r=t.slice(n+1);return e===1&&IDe.test(t)&&!NDe(r)&&!LDe(r)&&!$De(t)&&!FDe(t)&&!zDe(t)&&!PDe(t)&&!BDe(t)},Gk=t=>{const e=/(?:[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*|"[^"]*"\s*<[^>]+>|[^<\s]+(?:\s+[^<\s]+)*\s*<[^>]+>|<[^>]+>|\S+)/g,n=t.split(/[;,]+/).map(o=>o.trim().match(e)).filter(Boolean).flat().filter(o=>o!==null),r=n.filter(o=>zg(o)),s=n.filter(o=>!zg(o));return{validEmails:r,invalidEmails:s}},cr=t=>{const e=/"([^"]*)"\s*<([^>]+)>|([^<\s]+(?:\s+[^<\s]+)*)\s*<([^>]+)>|<([^>]+)>|([^<>]+)/,n=t.match(e);if(n){let r=n[1]||n[3]||"";const s=n[2]||n[4]||n[5]||n[6]||t;return r=r.replace(/['"]/g,"").trim(),{name:r,email:s}}return{name:"",email:t}},X0=(t,e)=>{const n=new Set(t.map(r=>cr(r).email));return e.filter(r=>{const{email:s}=cr(r);return!n.has(s)})},qu=t=>{const e=document.activeElement,n=document.createElement("textarea");n.value=t,n.style.position="fixed",n.style.opacity="0",n.style.pointerEvents="none",document.body.appendChild(n),n.focus(),n.select();try{document.execCommand("copy")}catch(r){console.error("Failed to copy text: ",r)}document.body.removeChild(n),e&&e.focus()},HDe=t=>{if(!t.length)return;const e=t.join(", "),n=document.activeElement,r=document.createElement("textarea");r.value=e,r.style.position="fixed",r.style.opacity="0",r.style.pointerEvents="none",document.body.appendChild(r),r.focus(),r.select();try{document.execCommand("copy")}catch(s){console.error("Failed to copy array:",s)}document.body.removeChild(r),n==null||n.focus()},FB=(t,e)=>{const{email:n}=cr(t[e]);return n},zB=(t,e)=>{let n="";for(let r=0;r<t.length;r++)if(e.includes(r)){const{email:s}=cr(t[r]);if(s!=null){n=s;break}}return n},RT=(t,e,n)=>{const r=[];return t.forEach((s,o)=>{var i,a,l,c;e.includes(o)&&((a=(i=n[s])==null?void 0:i.name)!=null&&a.trim()?r.push(`${(c=(l=n[s])==null?void 0:l.name)==null?void 0:c.trim()} <${s}>`):r.push(s))}),r.join(", ")},UDe=(t,e)=>{const n=[...t].sort((o,i)=>o-i);let r=-1,s=-1;for(let o=0;o<n.length;o++)if(n[o]===e){for(r=o,s=o;s<n.length-1&&n[s+1]===n[s]+1;)s++;for(;r>0&&n[r-1]===n[r]-1;)r--;break}return n.slice(r,s+1)},VDe=(t,e,n,r,s,o,i,a)=>{if(n)r.includes(t)?o(r.filter(l=>l!==t)):(o([...r,t]),i(t)),a(t);else if(e&&s!==null){const l=Math.min(s,t),c=Math.max(s,t),u=Array.from({length:c-l+1},(v,b)=>b+l),f=UDe(r,s),h=f[0],m=f[f.length-1];let y=r.filter(v=>v<h||v>m);y=[...y,...u],y=y.reduce((v,b)=>(v.includes(b)||v.push(b),v),[]),y.sort((v,b)=>v-b),o(y),i(t)}else o([t]),i(t),a(t)},qDe=(t,e,n,r,s)=>{e.includes(t)?(r(t),s(t)):(n([t]),r(t),s(t))},PB=(t,e,n,r,s)=>{const o=e==="right"?t+1:t-1,i=o>=0&&o<n.length?[o]:[];r(i),s(o>=0&&o<n.length?o:null)},BB=(t,e,n,r,s,o,i,a)=>{const l=e==="right"?t+1:t-1;if(n&&l>=0&&l<r.length){const c=a(l,e);c&&o(c),i(l)}},Kk=t=>t?t.map(e=>{const{name:n,email:r}=cr(e),s=n.trim().replace(/['"]/g,""),o=r.trim().toLowerCase();return s.toLowerCase()===o?o:s?`"${s}" <${r}>`:r}):[];function OS(t){var C,k;const e=me.c(29),n=sr(),r=re(Dn),s=re(zr);let o;e[0]!==s||e[1]!==t.FolderId||e[2]!==n.emailId?(o=n.emailId?+n.emailId:(C=s==null?void 0:s.find(E=>E.Id===(t==null?void 0:t.FolderId)))==null?void 0:C.UserEmailId,e[0]=s,e[1]=t.FolderId,e[2]=n.emailId,e[3]=o):o=e[3];const i=o;let a,l,c,u,f,h;if(e[4]!==i||e[5]!==r||e[6]!==t.Bcc||e[7]!==t.Cc||e[8]!==t.From.Address||e[9]!==t.To){const E=(k=r.find(_=>_.Id===Number(i)))==null?void 0:k.Email,j=Kk(t.To),A=Kk(t.Cc),M=Kk(t.Bcc);f=Fa,a="replyToAll",l=E?{Address:E}:void 0,c=[...t.From.Address!==E?[t.From.Address]:[],...new Set([...j?j.filter(_=>E&&!_.includes(E)):[]])],u=[...new Set([...A?A.filter(_=>E&&!_.includes(E)):[]])],h=new Set([...M?M.filter(_=>E&&!_.includes(E)):[]]),e[4]=i,e[5]=r,e[6]=t.Bcc,e[7]=t.Cc,e[8]=t.From.Address,e[9]=t.To,e[10]=a,e[11]=l,e[12]=c,e[13]=u,e[14]=f,e[15]=h}else a=e[10],l=e[11],c=e[12],u=e[13],f=e[14],h=e[15];let m;e[16]!==h?(m=[...h],e[16]=h,e[17]=m):m=e[17];const y=t.Subject;let v;e[18]!==t?(v=sJ(t),e[18]=t,e[19]=v):v=e[19];let b;return e[20]!==t.Id||e[21]!==t.Subject||e[22]!==a||e[23]!==l||e[24]!==c||e[25]!==u||e[26]!==m||e[27]!==v?(b={type:a,From:l,To:c,Cc:u,Bcc:m,Subject:y,HtmlBody:v,ReplyToId:t.Id},e[20]=t.Id,e[21]=t.Subject,e[22]=a,e[23]=l,e[24]=c,e[25]=u,e[26]=m,e[27]=v,e[28]=b):b=e[28],f(b)}const WDe=t=>{const e=me.c(20),{message:n,isDraftFolder:r,handlePrint:s,toggleMenuOpened:o}=t,{t:i}=Le(),a=xt(1024),l=OS(n),c=IS(n),u=a?200:104;let f;e[0]!==o?(f=d.jsx(et.Target,{children:d.jsx("span",{children:d.jsx(zte,{onClick:()=>o})})}),e[0]=o,e[1]=f):f=e[1];let h;e[2]===Symbol.for("react.memo_cache_sentinel")?(h=d.jsx(XQ,{size:18}),e[2]=h):h=e[2];let m;e[3]!==i?(m=i("printing"),e[3]=i,e[4]=m):m=e[4];let y;e[5]!==s||e[6]!==m?(y=d.jsx(et.Item,{color:"#343A40",px:10,py:5,fz:14,leftSection:h,onClick:s,children:m}),e[5]=s,e[6]=m,e[7]=y):y=e[7];let v;e[8]!==r||e[9]!==c||e[10]!==l||e[11]!==i?(v=!r&&d.jsxs(d.Fragment,{children:[d.jsx(et.Item,{color:"#343A40",px:10,py:5,fz:14,leftSection:d.jsx(V4,{size:18}),onClick:()=>l(),children:i("replyToAll")}),d.jsx(et.Item,{color:"#343A40",px:10,py:5,fz:14,leftSection:d.jsx(q4,{size:18}),onClick:()=>c(),children:i("forward")})]}),e[8]=r,e[9]=c,e[10]=l,e[11]=i,e[12]=v):v=e[12];let b;e[13]!==y||e[14]!==v?(b=d.jsxs(et.Dropdown,{children:[y,v]}),e[13]=y,e[14]=v,e[15]=b):b=e[15];let w;return e[16]!==u||e[17]!==f||e[18]!==b?(w=d.jsxs(et,{position:"bottom-start",zIndex:u,children:[f,b]}),e[16]=u,e[17]=f,e[18]=b,e[19]=w):w=e[19],w},YDe=t=>{const e=me.c(23),{message:n,isDraftFolder:r,handlePrint:s}=t,{t:o}=Le(),i=OS(n),a=IS(n),[l,c]=S.useState(!1);let u;e[0]===Symbol.for("react.memo_cache_sentinel")?(u=()=>c(GDe),e[0]=u):u=e[0];const f=u;let h;e[1]===Symbol.for("react.memo_cache_sentinel")?(h=d.jsx(zte,{onClick:f}),e[1]=h):h=e[1];let m;e[2]===Symbol.for("react.memo_cache_sentinel")?(m={itemWrapper:{width:"100%"}},e[2]=m):m=e[2];let y;e[3]===Symbol.for("react.memo_cache_sentinel")?(y=d.jsx(XQ,{size:18,color:"#343A40"}),e[3]=y):y=e[3];let v;e[4]===Symbol.for("react.memo_cache_sentinel")?(v={itemLabel:{width:"100%"}},e[4]=v):v=e[4];let b;e[5]!==o?(b=o("printing"),e[5]=o,e[6]=b):b=e[6];let w;e[7]!==b?(w=d.jsx(ve,{children:d.jsx(ue,{fz:14,c:"#343A40",children:b})}),e[7]=b,e[8]=w):w=e[8];let C;e[9]!==s||e[10]!==w?(C=d.jsx(Qr.Item,{p:8,icon:y,px:"md",py:"3px",fz:14,w:"100%",styles:v,children:d.jsx(En,{onClick:s,w:"100%",children:w})}),e[9]=s,e[10]=w,e[11]=C):C=e[11];let k;e[12]!==r||e[13]!==a||e[14]!==i||e[15]!==o?(k=!r&&d.jsxs(d.Fragment,{children:[d.jsx(Qr.Item,{p:8,icon:d.jsx(V4,{size:18,color:"#343A40"}),px:"md",py:"3px",fz:14,w:"100%",styles:{itemLabel:{width:"100%"}},children:d.jsx(En,{onClick:()=>i(),w:"100%",children:d.jsx(ve,{children:d.jsx(ue,{fz:14,c:"#343A40",children:o("replyToAll")})})})}),d.jsx(Qr.Item,{p:8,icon:d.jsx(q4,{size:18,color:"#343A40"}),px:"md",py:"3px",fz:14,w:"100%",styles:{itemLabel:{width:"100%"}},children:d.jsx(En,{onClick:()=>a(),w:"100%",children:d.jsx(ve,{children:d.jsx(ue,{fz:14,c:"#343A40",children:o("forward")})})})})]}),e[12]=r,e[13]=a,e[14]=i,e[15]=o,e[16]=k):k=e[16];let E;e[17]!==C||e[18]!==k?(E=d.jsxs(Qr,{spacing:"xs",size:"sm",center:!0,p:"10px 0",styles:m,children:[C,k]}),e[17]=C,e[18]=k,e[19]=E):E=e[19];let j;return e[20]!==l||e[21]!==E?(j=d.jsx(Km,{opened:l,onClose:f,trigger:h,children:E}),e[20]=l,e[21]=E,e[22]=j):j=e[22],j};function GDe(t){return!t}const Pte=t=>{const e=me.c(7),{message:n,isDraftFolder:r,handlePrint:s,opened:o,toggleMenuOpened:i}=t,a=xt(575);let l;return e[0]!==s||e[1]!==r||e[2]!==a||e[3]!==n||e[4]!==o||e[5]!==i?(l=d.jsx(d.Fragment,{children:a?d.jsx(YDe,{message:n,isDraftFolder:r,handlePrint:s,opened:o,toggleMenuOpened:i}):d.jsx(WDe,{message:n,isDraftFolder:r,handlePrint:s,toggleMenuOpened:i})}),e[0]=s,e[1]=r,e[2]=a,e[3]=n,e[4]=o,e[5]=i,e[6]=l):l=e[6],l},Wi={link:{color:"#343A40",textDecoration:"none"},icons:{width:"22px"},size:{marginRight:"10px"},closeButton:{display:"none"},loaderImg:{display:"none"},googleImage:{paddingRight:"10px",verticalAlign:"bottom",height:"20px"}};var KDe=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|fetchpriority|fetchPriority|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|popover|popoverTarget|popoverTargetAction|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,XDe=kte(function(t){return KDe.test(t)||t.charCodeAt(0)===111&&t.charCodeAt(1)===110&&t.charCodeAt(2)<91}),ZDe=XDe,QDe=function(e){return e!=="theme"},HB=function(e){return typeof e=="string"&&e.charCodeAt(0)>96?ZDe:QDe},UB=function(e,n,r){var s;if(n){var o=n.shouldForwardProp;s=e.__emotion_forwardProp&&o?function(i){return e.__emotion_forwardProp(i)&&o(i)}:o}return typeof s!="function"&&r&&(s=e.__emotion_forwardProp),s},JDe=function(e){var n=e.cache,r=e.serialized,s=e.isStringTag;return jR(n,r,s),jte(function(){return RS(n,r,s)}),null},eIe=function t(e,n){var r=e.__emotion_real===e,s=r&&e.__emotion_base||e,o,i;n!==void 0&&(o=n.label,i=n.target);var a=UB(e,n,r),l=a||HB(s),c=!l("as");return function(){var u=arguments,f=r&&e.__emotion_styles!==void 0?e.__emotion_styles.slice(0):[];if(o!==void 0&&f.push("label:"+o+";"),u[0]==null||u[0].raw===void 0)f.push.apply(f,u);else{var h=u[0];f.push(h[0]);for(var m=u.length,y=1;y<m;y++)f.push(u[y],h[y])}var v=DS(function(b,w,C){var k=c&&b.as||s,E="",j=[],A=b;if(b.theme==null){A={};for(var M in b)A[M]=b[M];A.theme=S.useContext(AR)}typeof b.className=="string"?E=MR(w.registered,j,b.className):b.className!=null&&(E=b.className+" ");var _=J2(f.concat(j),w.registered,A);E+=w.key+"-"+_.name,i!==void 0&&(E+=" "+i);var D=c&&a===void 0?HB(k):l,R={};for(var N in b)c&&N==="as"||D(N)&&(R[N]=b[N]);return R.className=E,C&&(R.ref=C),S.createElement(S.Fragment,null,S.createElement(JDe,{cache:w,serialized:_,isStringTag:typeof k=="string"}),S.createElement(k,R))});return v.displayName=o!==void 0?o:"Styled("+(typeof s=="string"?s:s.displayName||s.name||"Component")+")",v.defaultProps=e.defaultProps,v.__emotion_real=v,v.__emotion_base=s,v.__emotion_styles=f,v.__emotion_forwardProp=a,Object.defineProperty(v,"toString",{value:function(){return"."+i}}),v.withComponent=function(b,w){var C=t(b,Zh({},n,w,{shouldForwardProp:UB(v,w,!0)}));return C.apply(void 0,f)},v}},tIe=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"],dm=eIe.bind(null);tIe.forEach(function(t){dm[t]=dm(t)});const LR="data:image/svg+xml,%3csvg%20width='12'%20height='20'%20viewBox='0%200%2012%2020'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M10.5%201L1.5%2010L10.5%2019'%20stroke='%23868E96'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e",Bte=t=>{const e=me.c(14),{onClick:n,isOpen:r,hiddenCount:s}=t,{t:o}=Le(),a=!xt(1024);let l;e[0]!==s||e[1]!==a?(l=a&&d.jsxs(ue,{ml:3,c:"#31394A",fz:"13px",fw:500,children:["еще"," ",s]}),e[0]=s,e[1]=a,e[2]=l):l=e[2];let c;e[3]!==o?(c=o("back"),e[3]=o,e[4]=c):c=e[4];const u=r?"rotate(90deg)":"rotate(-90deg)";let f;e[5]!==u?(f={marginLeft:"3px",marginRight:"0",height:"8px",transform:u},e[5]=u,e[6]=f):f=e[6];let h;e[7]!==c||e[8]!==f?(h=d.jsx("img",{src:LR,alt:c,className:"arrow-icon",style:f}),e[7]=c,e[8]=f,e[9]=h):h=e[9];let m;return e[10]!==n||e[11]!==l||e[12]!==h?(m=d.jsxs(nIe,{onClick:n,children:[l,h]}),e[10]=n,e[11]=l,e[12]=h,e[13]=m):m=e[13],m},nIe=dm.button`
  padding: 0;
  gap: 5px;
  height: 20px;
  display: flex;
  justify-content: center;
  align-items: center;
  border: none;
  cursor: pointer;
  background: transparent;

  &.inner {
    justify-content: flex-start;
  }
`,rIe="_addressItemText_1d6ip_23",sIe="_addressItemText_focused_1d6ip_31",oIe="_addressItemText_selected_1d6ip_38",Xk={addressItemText:rIe,addressItemText_focused:sIe,addressItemText_selected:oIe},iIe=(t,e)=>t&&e?`${t} <${e}>`:t||e||"",aIe=(t,e,n=3)=>t.length<=n?null:Math.max(0,t.length-n),lIe=(t,e)=>{const n=`${e}-`;return t.startsWith(n)?t.slice(n.length):t},cIe=(t,...e)=>{if(typeof t=="function")return t(...e)},Hte=({address:t,emailItems:e,activeUserEmailId:n})=>{var l;const r=e==null?void 0:e.find(c=>c.Id===n);if(((l=r==null?void 0:r.Email)==null?void 0:l.toLowerCase())===(t==null?void 0:t.toLowerCase()))return vn.t("toMe");const s=/(?:"?([^"]*)"?\s)?(?:<?(.+@[^>]+)>?)/,o=t.match(s);let i="",a="";return o?(i=o[1]||"",a=o[2]||"",a=a.split("@")[0],i||a):t},uIe="_actionWrapper_9o9jb_1",dIe="_favorite_9o9jb_15",VB={actionWrapper:uIe,favorite:dIe},fIe=t=>{var E;const e=me.c(28),{contact:n}=t,{modules:r}=MQ(),s=Er(),o=zt(),i=re(mr),a=(E=i==null?void 0:i.SearchContext)==null?void 0:E.Labels,{formValues:l}=br(pIe);let c;e[0]!==n.email?(c={type:"new",To:[n.email]},e[0]=n.email,e[1]=c):c=e[1];const u=Fa(c);let f;e[2]!==a||e[3]!==n.email||e[4]!==o||e[5]!==l||e[6]!==i.SearchContext||e[7]!==s?(f=async()=>{const j=a||[],A=l.folderId!=="-1",M={...l,SearchContext:{...i.SearchContext,From:n.email,Labels:j}};(M.folderId==="-1"||!A)&&delete M.folderId,o(lS(M)),await o(ur(M)),s("/search")},e[2]=a,e[3]=n.email,e[4]=o,e[5]=l,e[6]=i.SearchContext,e[7]=s,e[8]=f):f=e[8];const h=f;let m;e[9]!==n.email||e[10]!==r||e[11]!==u?(m=n.email&&d.jsxs(d.Fragment,{children:[d.jsx(Ve,{bg:"#E7F5FF",h:30,w:30,onClick:()=>u(),id:"contact-card",children:d.jsx(kf,{stroke:1.5,width:22,height:22,color:"#339AF0"})}),r[Yo.Calendar]&&d.jsx(DQ,{baseUrl:r[Yo.Calendar].url,email:n.email})]}),e[9]=n.email,e[10]=r,e[11]=u,e[12]=m):m=e[12];let y;e[13]===Symbol.for("react.memo_cache_sentinel")?(y=d.jsx(G4,{stroke:1.5,width:22,height:22,color:"#339AF0"}),e[13]=y):y=e[13];let v;e[14]!==h?(v=d.jsx(Ve,{bg:"#E7F5FF",h:30,w:30,onClick:h,id:"contact-card",children:y}),e[14]=h,e[15]=v):v=e[15];let b;e[16]!==n||e[17]!==r?(b=r[Yo.Contacts]&&d.jsx(R_,{baseUrl:r[Yo.Contacts].url,contact:n}),e[16]=n,e[17]=r,e[18]=b):b=e[18];let w;e[19]!==m||e[20]!==v||e[21]!==b?(w=d.jsxs(ve,{gap:4,align:"flex-end",className:VB.actionWrapper,children:[m,v,b]}),e[19]=m,e[20]=v,e[21]=b,e[22]=w):w=e[22];let C;e[23]!==n?(C=d.jsx(xe,{className:VB.favorite,children:d.jsx(IQ,{contact:n})}),e[23]=n,e[24]=C):C=e[24];let k;return e[25]!==w||e[26]!==C?(k=d.jsxs(ve,{justify:"space-between",id:"contact-card-actions",onClick:hIe,children:[w,C]}),e[25]=w,e[26]=C,e[27]=k):k=e[27],k};function pIe(t){return t.search}function hIe(t){return t.stopPropagation()}const Oo=S.forwardRef((t,e)=>{const n=me.c(37);let r,s,o,i,a,l,c,u,f,h,m;n[0]!==t?({children:r,itemEmail:a,itemTitle:l,floatingStrategy:o,withinPortal:m,openDelay:f,disabled:s,overflow:h,onOpen:u,onClose:c,...i}=t,n[0]=t,n[1]=r,n[2]=s,n[3]=o,n[4]=i,n[5]=a,n[6]=l,n[7]=c,n[8]=u,n[9]=f,n[10]=h,n[11]=m):(r=n[1],s=n[2],o=n[3],i=n[4],a=n[5],l=n[6],c=n[7],u=n[8],f=n[9],h=n[10],m=n[11]);const y=f===void 0?900:f,v=h===void 0?"":h,b=xt(1024);let w;n[12]!==a?(w=a?cr(a):{email:""},n[12]=a,n[13]=w):w=n[13];const{email:C}=w,k=S.useRef(null);let E;if(n[14]!==c?(E=()=>({forceClose:()=>{if(!k.current)return;["mouseleave","mouseout","blur","focusout"].forEach(z=>{var L;const B=new MouseEvent(z,{bubbles:!0,cancelable:!0,view:window,relatedTarget:document.body});(L=k.current)==null||L.dispatchEvent(B)}),c==null||c()}}),n[14]=c,n[15]=E):E=n[15],S.useImperativeHandle(e,E),!a){let N;n[16]===Symbol.for("react.memo_cache_sentinel")?(N={overflow:"hidden",width:"inherit"},n[16]=N):N=n[16];let z;return n[17]!==r?(z=d.jsx("div",{style:N,children:r}),n[17]=r,n[18]=z):z=n[18],z}const j=C||void 0,A=b||s;let M;n[19]!==o||n[20]!==i||n[21]!==c||n[22]!==u||n[23]!==y||n[24]!==A||n[25]!==m?(M={disabled:A,floatingStrategy:o,withinPortal:m,openDelay:y,trapFocus:!1,onOpen:u,onClose:c,...i},n[19]=o,n[20]=i,n[21]=c,n[22]=u,n[23]=y,n[24]=A,n[25]=m,n[26]=M):M=n[26];let _;n[27]!==v?(_={overflow:v,width:"inherit"},n[27]=v,n[28]=_):_=n[28];let D;n[29]!==r||n[30]!==_?(D=d.jsx("div",{ref:k,style:_,children:r}),n[29]=r,n[30]=_,n[31]=D):D=n[31];let R;return n[32]!==l||n[33]!==j||n[34]!==M||n[35]!==D?(R=d.jsx(OQ,{email:j,nameFallback:l,hoverCardProps:M,actions:mIe,children:D}),n[32]=l,n[33]=j,n[34]=M,n[35]=D,n[36]=R):R=n[36],R});Oo.displayName="ContactCard";function mIe(t){return d.jsx(fIe,{contact:t.contact})}const Ute=({items:t,opened:e,setSelectedEmail:n,selectedEmail:r,rowKey:s,activeListId:o,setActiveListId:i})=>{const a=navigator.platform.toUpperCase().includes("MAC"),l=xt(1024),c=!l,u=br(uee),f=zt(),{t:h}=Le(),{highlightStrings:m}=br($=>$.search),y=re(Dn),[v,b]=S.useState(null),[w,C]=S.useState(null),[k,E]=S.useState(null),[j,A]=S.useState(null),M=S.useMemo(()=>t.slice(0,e?t.length:3),[t,e]),_=S.useCallback(()=>n(null),[n]),D=$=>{$.preventDefault(),$.stopPropagation()},R=()=>{cIe(i,s)},N=S.useCallback($=>{b($),_()},[_]),z=S.useCallback(()=>{f(Xv(!1)),b(null),_()},[f,_]),B=$=>qu($),L=$=>HDe($),P=($,V,q,U)=>{D($),f(Xv(!0)),i(V),C(q),E(q),A(null),N(U)},I=($,V)=>{var G;if(!$.shiftKey)return;D($),R();const q=(G=window.getSelection)==null?void 0:G.call(window);q!=null&&q.rangeCount&&q.removeAllRanges();const U=k??w??V,W=Math.min(U,V),Y=Math.max(U,V);E(U),A({from:W,to:Y}),C(V),_()},H=($,V,q,U)=>{if($.stopPropagation(),R(),!$.shiftKey){if(C(V),E(V),A(null),!c){N(q);return}z(),n(U)}};return S.useEffect(()=>{const $=V=>{const q=V.target,U=q.tagName==="INPUT"||q.tagName==="TEXTAREA"||q.isContentEditable;if(V.key==="Escape"){z();return}if(!(a?V.metaKey:V.ctrlKey)||U)return;if(V.code==="KeyC"&&!V.shiftKey){if(o!==s)return;if(V.preventDefault(),j){const G=M.slice(j.from,j.to+1);L(G);return}r&&B(lIe(r,s))}};return window.addEventListener("keydown",$),()=>window.removeEventListener("keydown",$)},[r,M,a,o,s,j,z]),S.useEffect(()=>{const $=V=>{if(!o||o!==s)return;if(V.key==="Enter"){if(w==null)return;V.preventDefault();const Q=M[w];if(!Q)return;const Z=cr(Q);f(Xv(!0)),N(Z.email);return}const q=V.key==="ArrowLeft",U=V.key==="ArrowRight";if(!q&&!U)return;const W=V.target;if(W.tagName==="INPUT"||W.tagName==="TEXTAREA"||W.isContentEditable)return;V.preventDefault(),v&&z(),_();const G=w??0,K=U?Math.min(G+1,M.length-1):Math.max(G-1,0);if(V.shiftKey){const Q=k??G,Z=Math.min(Q,K),J=Math.max(Q,K);E(Q),A({from:Z,to:J}),C(K);return}A(null),E(K),C(K)};return window.addEventListener("keydown",$),()=>window.removeEventListener("keydown",$)},[w,o,s,n,M,z,_,v,N,k,f]),S.useEffect(()=>{o!==s&&(C(null),b(null),A(null),E(null))},[o,s,n]),S.useEffect(()=>{v||f(Xv(!1))},[v,f]),M.map(($,V)=>{const q=$?cr($):{name:"",email:""},U=iIe(q.name,q.email),W=V===t.length-1,Y=t.length>3,G=`${s}-${q.email}`,K=w===V||r===G||v===q.email,Q=j?V>=j.from&&V<=j.to:!1;return d.jsxs(et,{opened:v===q.email,closeOnItemClick:!0,closeOnClickOutside:!0,onClose:z,radius:8,styles:{dropdown:{border:"none",boxShadow:`
        0px 0px 1px rgba(16, 24, 40, 0.20),
        0px 2px 3px rgba(16, 24, 40, 0.12)
      `},item:{"&:focus":{outline:"none"},"&:focus-visible":{outline:"none",boxShadow:"none"}}},children:[d.jsx(et.Target,{children:d.jsx("span",{onContextMenu:Z=>P(Z,s,V,q.email),onMouseDown:Z=>I(Z,V),onClick:Z=>H(Z,V,q.email,G),children:d.jsx(Oo,{itemEmail:q.email,itemTitle:q.name,floatingStrategy:"fixed",withinPortal:!1,disabled:!c||K||v!==null||Q,children:d.jsxs(ue,{fz:13,fw:400,children:[d.jsx(Mo,{fz:13,component:"span",highlight:m,className:[Xk.addressItemText,Q?Xk.addressItemText_selected:"",K?Xk.addressItemText_focused:""].join(" "),children:l?U:Hte({emailItems:y,address:$,activeUserEmailId:u})},`${q.email}-${V}`),(!W||!e&&Y)&&d.jsx("span",{style:{color:"#818DA1"},children:","})]},`${q.email}-${V}`)},`${q.email}-${V}`)})}),d.jsxs(et.Dropdown,{onKeyDownCapture:Z=>{(Z.key==="ArrowUp"||Z.key==="ArrowDown")&&Z.stopPropagation()},children:[d.jsx(et.Item,{color:"#343A40",leftSection:d.jsx(m3,{size:15}),onClick:()=>B(U),children:h("contextMenu.copy")}),d.jsx(on,{label:d.jsxs("div",{children:[d.jsx(ue,{fz:"xs",fw:500,children:h("copyDesc")}),d.jsxs(ue,{fz:"xs",c:"dimmed",children:[h("copySelect"),": Shift + ←/→"]}),d.jsxs(ue,{fz:"xs",c:"dimmed",children:[h("contextMenu.copy"),": ",a?"⌘ + C":"Ctrl + C"]})]}),position:"right",withArrow:!0,multiline:!0,w:220,children:d.jsx(ie,{component:"span",style:{display:"block"},children:d.jsx(et.Item,{color:"#343A40",leftSection:d.jsx(m3,{size:15}),onClick:()=>L(t),children:h("contextMenu.copyAll")})})})]})]},`${q.email}-${V}`)})},gIe=t=>{var j,A;const e=me.c(13),{addressFields:n}=t,{t:r}=Le();let s;e[0]===Symbol.for("react.memo_cache_sentinel")?(s={},e[0]=s):s=e[0];const[o,i]=It.useState(s),[a,l]=S.useState(null),[c,u]=S.useState(null);let f;e[1]===Symbol.for("react.memo_cache_sentinel")?(f=()=>{l(null),u(null)},e[1]=f):f=e[1];const h=f;let m;e[2]===Symbol.for("react.memo_cache_sentinel")?(m=()=>{h()},e[2]=m):m=e[2];const y=Em(m),v=vn.language==="ru",b=(j=n[1])==null?void 0:j.key,w=(A=n[2])==null?void 0:A.key;let C;e[3]===Symbol.for("react.memo_cache_sentinel")?(C=M=>{i(_=>({..._,[M]:!_[M]}))},e[3]=C):C=e[3];const k=C;let E;return e[4]!==c||e[5]!==n||e[6]!==w||e[7]!==b||e[8]!==o||e[9]!==y||e[10]!==a||e[11]!==r?(E=n.map(M=>{const{key:_,value:D}=M,R=o[_],N=aIe(D,R,3);return d.jsxs(xe,{mb:3,ref:y,children:[d.jsxs(ue,{c:"#818DA1",fz:13,fw:400,mr:v?_===b?"10px":"15px":_===w?"23px":"29px",sx:{flexWrap:"wrap",wordBreak:"break-all",flex:"0 0 auto"},children:[r(_),":"]}),d.jsxs(xe,{align:"center",wrap:"wrap",onClick:h,children:[d.jsx(Ute,{opened:R,items:D,selectedEmail:a,setSelectedEmail:l,activeListId:c,setActiveListId:u,rowKey:_}),N&&!R&&d.jsx(Bte,{onClick:()=>k(_),isOpen:o[_],hiddenCount:N})]})]},_)}),e[4]=c,e[5]=n,e[6]=w,e[7]=b,e[8]=o,e[9]=y,e[10]=a,e[11]=r,e[12]=E):E=e[12],E},yIe=t=>{const e=me.c(26),{message:n,onToggleMobile:r}=t,{t:s}=Le(),i=!xt(1024),a=re(Dn),l=br(uee);let c,u,f,h,m,y,v;if(e[0]!==l||e[1]!==a||e[2]!==i||e[3]!==n.Bcc||e[4]!==n.Cc||e[5]!==n.To||e[6]!==r||e[7]!==s){const w=[{key:"to",value:n.To},{key:"cc",value:n.Cc},{key:"bcc",value:n.Bcc}].filter(vIe);c=ue,u="#818DA1",f=i?void 0:"2px",h=13,m=!0,e[15]!==i||e[16]!==r?(y=i?void 0:C=>{C.stopPropagation(),r==null||r()},e[15]=i,e[16]=r,e[17]=y):y=e[17],v=w.length?w.map(C=>{const{key:k,value:E}=C;return`${s(k)}: ${E.map(j=>Hte({emailItems:a,address:j,activeUserEmailId:l})).join(", ")}`}).join(", "):`${s("to")}:`,e[0]=l,e[1]=a,e[2]=i,e[3]=n.Bcc,e[4]=n.Cc,e[5]=n.To,e[6]=r,e[7]=s,e[8]=c,e[9]=u,e[10]=f,e[11]=h,e[12]=m,e[13]=y,e[14]=v}else c=e[8],u=e[9],f=e[10],h=e[11],m=e[12],y=e[13],v=e[14];let b;return e[18]!==c||e[19]!==u||e[20]!==f||e[21]!==h||e[22]!==m||e[23]!==y||e[24]!==v?(b=d.jsx(c,{c:u,mr:f,fz:h,truncate:m,onClick:y,children:v}),e[18]=c,e[19]=u,e[20]=f,e[21]=h,e[22]=m,e[23]=y,e[24]=v,e[25]=b):b=e[25],b};function vIe(t){const{value:e}=t;return e==null?void 0:e.length}const bIe=t=>{var q,U;const e=me.c(50),{addressFields:n,message:r}=t,[s,o]=S.useState(!1),[i,a]=S.useState(null),[l,c]=S.useState(null);let u;e[0]===Symbol.for("react.memo_cache_sentinel")?(u=()=>{a(null),c(null)},e[0]=u):u=e[0];const f=u;let h;e[1]===Symbol.for("react.memo_cache_sentinel")?(h=()=>{f()},e[1]=h):h=e[1];const m=Em(h),{t:y}=Le(),v=vn.language==="ru",b=(q=n[1])==null?void 0:q.key,w=(U=n[2])==null?void 0:U.key;let C;e[2]===Symbol.for("react.memo_cache_sentinel")?(C=()=>{o(xIe)},e[2]=C):C=e[2];const k=C;let E;e[3]===Symbol.for("react.memo_cache_sentinel")?(E={display:"flex",alignItems:"baseline",cursor:"pointer"},e[3]=E):E=e[3];let j;e[4]!==r?(j=d.jsx(yIe,{message:r,onToggleMobile:k}),e[4]=r,e[5]=j):j=e[5];let A;e[6]!==s?(A=d.jsx(Bte,{onClick:k,isOpen:s}),e[6]=s,e[7]=A):A=e[7];let M;e[8]!==m||e[9]!==j||e[10]!==A?(M=d.jsxs(ie,{ref:m,mr:70,sx:E,children:[j," ",A]}),e[8]=m,e[9]=j,e[10]=A,e[11]=M):M=e[11];let _;e[12]===Symbol.for("react.memo_cache_sentinel")?(_={marginLeft:"-60px",marginTop:"15px",borderRadius:"8px",padding:"12px",border:"1px solid #ebebeb",backgroundColor:"#fff"},e[12]=_):_=e[12];const D=n.length?5:"";let R;e[13]===Symbol.for("react.memo_cache_sentinel")?(R={flexWrap:"wrap",wordBreak:"break-all",flex:"0 0 auto"},e[13]=R):R=e[13];let N;e[14]!==y?(N=y("from"),e[14]=y,e[15]=N):N=e[15];let z;e[16]!==N?(z=d.jsxs(ue,{c:"#818DA1",fz:13,fw:500,sx:R,children:[N,":"]}),e[16]=N,e[17]=z):z=e[17];const B=r.From.Name||r.From.Address;let L;e[18]!==B?(L=d.jsx(ue,{c:"#818DA1",fz:13,fw:400,children:B}),e[18]=B,e[19]=L):L=e[19];let P;e[20]!==z||e[21]!==L||e[22]!==D?(P=d.jsxs(xe,{gap:v?32:13,fz:13,mb:D,wrap:"wrap",children:[z," ",L]}),e[20]=z,e[21]=L,e[22]=D,e[23]=P):P=e[23];let I;if(e[24]!==l||e[25]!==n||e[26]!==w||e[27]!==b||e[28]!==s||e[29]!==i||e[30]!==y){let W;e[32]!==l||e[33]!==n.length||e[34]!==w||e[35]!==b||e[36]!==s||e[37]!==i||e[38]!==y?(W=(Y,G)=>{const{key:K,value:Q}=Y,Z=n.length-1===G;return d.jsxs(xe,{wrap:"wrap",mb:Z?"":5,children:[d.jsxs(ue,{c:"#818DA1",fz:13,fw:500,mr:v?K===b?"10px":"15px":K===w?"23px":"29px",sx:{display:"flex",flexWrap:"wrap",wordBreak:"break-all",flex:"0 0 auto"},children:[y(K),":"]}),d.jsx(Ute,{opened:s,items:Q,selectedEmail:i,setSelectedEmail:a,activeListId:l,setActiveListId:c,rowKey:K})]},K)},e[32]=l,e[33]=n.length,e[34]=w,e[35]=b,e[36]=s,e[37]=i,e[38]=y,e[39]=W):W=e[39],I=n.map(W),e[24]=l,e[25]=n,e[26]=w,e[27]=b,e[28]=s,e[29]=i,e[30]=y,e[31]=I}else I=e[31];let H;e[40]!==P||e[41]!==I?(H=d.jsxs(d.Fragment,{children:[P,I]}),e[40]=P,e[41]=I,e[42]=H):H=e[42];let $;e[43]!==s||e[44]!==m||e[45]!==H?($=d.jsx(tp,{style:_,in:s,ref:m,children:H}),e[43]=s,e[44]=m,e[45]=H,e[46]=$):$=e[46];let V;return e[47]!==$||e[48]!==M?(V=d.jsxs(d.Fragment,{children:[M,$]}),e[47]=$,e[48]=M,e[49]=V):V=e[49],V};function xIe(t){return!t}const wIe=t=>{const e=me.c(7),{addressFields:n,message:r}=t,s=xt(1024),o=!s;let i;e[0]!==n||e[1]!==o||e[2]!==r?(i=d.jsx(d.Fragment,{children:o?d.jsx(gIe,{addressFields:n}):d.jsx(bIe,{addressFields:n,message:r})}),e[0]=n,e[1]=o,e[2]=r,e[3]=i):i=e[3];let a;return e[4]!==s||e[5]!==i?(a=d.jsx(d.Fragment,{children:d.jsx(SIe,{isMobile:s,className:"popup-id",children:i})}),e[4]=s,e[5]=i,e[6]=a):a=e[6],a},SIe=dm.div`
  margin-top: 0;
  z-index: 10;
  background-color: ${({isMobile:t})=>"#fff"};
  cursor: initial;
  max-height: ${({isMobile:t})=>t?"":"300px"};
  user-select: text;
  -webkit-user-select: text;
  -moz-user-select: text;
  -ms-user-select: text;

  .mantine-Text-root {
    word-break: break-all;
  }

  &::-webkit-scrollbar {
    width: 4px;
  }

  &::-webkit-scrollbar-track {
    background: #fff;
  }

  &::-webkit-scrollbar-thumb {
    background: #a2b0c38c;
    border-radius: 10px;
  }

  &::-webkit-scrollbar-thumb:hover {
    background: #555;
  }

  scrollbar-width: thin;
  scrollbar-color: #a2b0c38c #fff;
`,Vte=t=>{const e=me.c(15),{message:n}=t,{t:r}=Le();let s;e[0]!==n.To?(s={key:"to",value:n.To},e[0]=n.To,e[1]=s):s=e[1];let o;e[2]!==n.Cc?(o={key:"cc",value:n.Cc},e[2]=n.Cc,e[3]=o):o=e[3];let i;e[4]!==n.Bcc?(i={key:"bcc",value:n.Bcc},e[4]=n.Bcc,e[5]=i):i=e[5];let a;e[6]!==s||e[7]!==o||e[8]!==i?(a=[s,o,i].filter(CIe),e[6]=s,e[7]=o,e[8]=i,e[9]=a):a=e[9];const l=a;let c;e[10]===Symbol.for("react.memo_cache_sentinel")?(c={position:"relative",alignItems:"center",width:"auto"},e[10]=c):c=e[10];let u;return e[11]!==l||e[12]!==n||e[13]!==r?(u=d.jsx(ie,{sx:c,children:!l||l.length===0?d.jsxs(ue,{c:"#818DA1",fz:13,children:[r("to"),":"]}):d.jsx(wIe,{addressFields:l,message:n})}),e[11]=l,e[12]=n,e[13]=r,e[14]=u):u=e[14],u};function CIe(t){var e;return((e=t.value)==null?void 0:e.length)>0}const kIe=[Je.OUTBOX,Je.SENT],NS=t=>{const e=me.c(5),n=re(zr);let r;if(e[0]!==n||e[1]!==t){let s;e[3]!==t?(s=a=>a.Id===t,e[3]=t,e[4]=s):s=e[4];const o=n.find(s),i=(o==null?void 0:o.Type)||Je.INBOX;r=kIe.includes(i),e[0]=n,e[1]=t,e[2]=r}else r=e[2];return r},$R=t=>{const e=me.c(12),{address:n,folderId:r,name:s,fromMessageHeader:o}=t,{t:i}=Le(),a=re(ip)==="fulfilled",l=NS(r);let c;e[0]!==n||e[1]!==o||e[2]!==s||e[3]!==l||e[4]!==i?(c=()=>{const b=s||n;if(o)return`${i("from")}: ${b}`;if(l){const w=[];return n.split(",").forEach(k=>{let E;const j=/"([^"]+)"/,A=/<([^<>]+)>/;let M=j.exec(k);M?E=M[1].trim():(M=A.exec(k),M?E=M[1].trim():E=k.trim()),w.push(E)}),`${i("to")}: ${w.join(", ")}`}return b},e[0]=n,e[1]=o,e[2]=s,e[3]=l,e[4]=i,e[5]=c):c=e[5];const u=c;let f;e[6]!==u?(f=u(),e[6]=u,e[7]=f):f=e[7];const[h,m]=S.useState(f);let y,v;return e[8]!==u||e[9]!==a?(y=()=>{a&&m(u())},v=[u,a],e[8]=u,e[9]=a,e[10]=y,e[11]=v):(y=e[10],v=e[11]),S.useEffect(y,v),h};function h0(t,e){if(t.one!==void 0&&e===1)return t.one;const n=e%10,r=e%100;return n===1&&r!==11?t.singularNominative.replace("{{count}}",String(e)):n>=2&&n<=4&&(r<10||r>20)?t.singularGenitive.replace("{{count}}",String(e)):t.pluralGenitive.replace("{{count}}",String(e))}function Co(t){return(e,n)=>n!=null&&n.addSuffix?n.comparison&&n.comparison>0?t.future?h0(t.future,e):"через "+h0(t.regular,e):t.past?h0(t.past,e):h0(t.regular,e)+" назад":h0(t.regular,e)}const EIe={lessThanXSeconds:Co({regular:{one:"меньше секунды",singularNominative:"меньше {{count}} секунды",singularGenitive:"меньше {{count}} секунд",pluralGenitive:"меньше {{count}} секунд"},future:{one:"меньше, чем через секунду",singularNominative:"меньше, чем через {{count}} секунду",singularGenitive:"меньше, чем через {{count}} секунды",pluralGenitive:"меньше, чем через {{count}} секунд"}}),xSeconds:Co({regular:{singularNominative:"{{count}} секунда",singularGenitive:"{{count}} секунды",pluralGenitive:"{{count}} секунд"},past:{singularNominative:"{{count}} секунду назад",singularGenitive:"{{count}} секунды назад",pluralGenitive:"{{count}} секунд назад"},future:{singularNominative:"через {{count}} секунду",singularGenitive:"через {{count}} секунды",pluralGenitive:"через {{count}} секунд"}}),halfAMinute:(t,e)=>e!=null&&e.addSuffix?e.comparison&&e.comparison>0?"через полминуты":"полминуты назад":"полминуты",lessThanXMinutes:Co({regular:{one:"меньше минуты",singularNominative:"меньше {{count}} минуты",singularGenitive:"меньше {{count}} минут",pluralGenitive:"меньше {{count}} минут"},future:{one:"меньше, чем через минуту",singularNominative:"меньше, чем через {{count}} минуту",singularGenitive:"меньше, чем через {{count}} минуты",pluralGenitive:"меньше, чем через {{count}} минут"}}),xMinutes:Co({regular:{singularNominative:"{{count}} минута",singularGenitive:"{{count}} минуты",pluralGenitive:"{{count}} минут"},past:{singularNominative:"{{count}} минуту назад",singularGenitive:"{{count}} минуты назад",pluralGenitive:"{{count}} минут назад"},future:{singularNominative:"через {{count}} минуту",singularGenitive:"через {{count}} минуты",pluralGenitive:"через {{count}} минут"}}),aboutXHours:Co({regular:{singularNominative:"около {{count}} часа",singularGenitive:"около {{count}} часов",pluralGenitive:"около {{count}} часов"},future:{singularNominative:"приблизительно через {{count}} час",singularGenitive:"приблизительно через {{count}} часа",pluralGenitive:"приблизительно через {{count}} часов"}}),xHours:Co({regular:{singularNominative:"{{count}} час",singularGenitive:"{{count}} часа",pluralGenitive:"{{count}} часов"}}),xDays:Co({regular:{singularNominative:"{{count}} день",singularGenitive:"{{count}} дня",pluralGenitive:"{{count}} дней"}}),aboutXWeeks:Co({regular:{singularNominative:"около {{count}} недели",singularGenitive:"около {{count}} недель",pluralGenitive:"около {{count}} недель"},future:{singularNominative:"приблизительно через {{count}} неделю",singularGenitive:"приблизительно через {{count}} недели",pluralGenitive:"приблизительно через {{count}} недель"}}),xWeeks:Co({regular:{singularNominative:"{{count}} неделя",singularGenitive:"{{count}} недели",pluralGenitive:"{{count}} недель"}}),aboutXMonths:Co({regular:{singularNominative:"около {{count}} месяца",singularGenitive:"около {{count}} месяцев",pluralGenitive:"около {{count}} месяцев"},future:{singularNominative:"приблизительно через {{count}} месяц",singularGenitive:"приблизительно через {{count}} месяца",pluralGenitive:"приблизительно через {{count}} месяцев"}}),xMonths:Co({regular:{singularNominative:"{{count}} месяц",singularGenitive:"{{count}} месяца",pluralGenitive:"{{count}} месяцев"}}),aboutXYears:Co({regular:{singularNominative:"около {{count}} года",singularGenitive:"около {{count}} лет",pluralGenitive:"около {{count}} лет"},future:{singularNominative:"приблизительно через {{count}} год",singularGenitive:"приблизительно через {{count}} года",pluralGenitive:"приблизительно через {{count}} лет"}}),xYears:Co({regular:{singularNominative:"{{count}} год",singularGenitive:"{{count}} года",pluralGenitive:"{{count}} лет"}}),overXYears:Co({regular:{singularNominative:"больше {{count}} года",singularGenitive:"больше {{count}} лет",pluralGenitive:"больше {{count}} лет"},future:{singularNominative:"больше, чем через {{count}} год",singularGenitive:"больше, чем через {{count}} года",pluralGenitive:"больше, чем через {{count}} лет"}}),almostXYears:Co({regular:{singularNominative:"почти {{count}} год",singularGenitive:"почти {{count}} года",pluralGenitive:"почти {{count}} лет"},future:{singularNominative:"почти через {{count}} год",singularGenitive:"почти через {{count}} года",pluralGenitive:"почти через {{count}} лет"}})},TIe=(t,e,n)=>EIe[t](e,n),MIe={full:"EEEE, d MMMM y 'г.'",long:"d MMMM y 'г.'",medium:"d MMM y 'г.'",short:"dd.MM.y"},jIe={full:"H:mm:ss zzzz",long:"H:mm:ss z",medium:"H:mm:ss",short:"H:mm"},AIe={any:"{{date}}, {{time}}"},_Ie={date:Lh({formats:MIe,defaultWidth:"full"}),time:Lh({formats:jIe,defaultWidth:"full"}),dateTime:Lh({formats:AIe,defaultWidth:"any"})},FR=["воскресенье","понедельник","вторник","среду","четверг","пятницу","субботу"];function RIe(t){const e=FR[t];switch(t){case 0:return"'в прошлое "+e+" в' p";case 1:case 2:case 4:return"'в прошлый "+e+" в' p";case 3:case 5:case 6:return"'в прошлую "+e+" в' p"}}function qB(t){const e=FR[t];return t===2?"'во "+e+" в' p":"'в "+e+" в' p"}function DIe(t){const e=FR[t];switch(t){case 0:return"'в следующее "+e+" в' p";case 1:case 2:case 4:return"'в следующий "+e+" в' p";case 3:case 5:case 6:return"'в следующую "+e+" в' p"}}const IIe={lastWeek:(t,e,n)=>{const r=t.getDay();return TP(t,e,n)?qB(r):RIe(r)},yesterday:"'вчера в' p",today:"'сегодня в' p",tomorrow:"'завтра в' p",nextWeek:(t,e,n)=>{const r=t.getDay();return TP(t,e,n)?qB(r):DIe(r)},other:"P"},OIe=(t,e,n,r)=>{const s=IIe[t];return typeof s=="function"?s(e,n,r):s},NIe={narrow:["до н.э.","н.э."],abbreviated:["до н. э.","н. э."],wide:["до нашей эры","нашей эры"]},LIe={narrow:["1","2","3","4"],abbreviated:["1-й кв.","2-й кв.","3-й кв.","4-й кв."],wide:["1-й квартал","2-й квартал","3-й квартал","4-й квартал"]},$Ie={narrow:["Я","Ф","М","А","М","И","И","А","С","О","Н","Д"],abbreviated:["янв.","фев.","март","апр.","май","июнь","июль","авг.","сент.","окт.","нояб.","дек."],wide:["январь","февраль","март","апрель","май","июнь","июль","август","сентябрь","октябрь","ноябрь","декабрь"]},FIe={narrow:["Я","Ф","М","А","М","И","И","А","С","О","Н","Д"],abbreviated:["янв.","фев.","мар.","апр.","мая","июн.","июл.","авг.","сент.","окт.","нояб.","дек."],wide:["января","февраля","марта","апреля","мая","июня","июля","августа","сентября","октября","ноября","декабря"]},zIe={narrow:["В","П","В","С","Ч","П","С"],short:["вс","пн","вт","ср","чт","пт","сб"],abbreviated:["вск","пнд","втр","срд","чтв","птн","суб"],wide:["воскресенье","понедельник","вторник","среда","четверг","пятница","суббота"]},PIe={narrow:{am:"ДП",pm:"ПП",midnight:"полн.",noon:"полд.",morning:"утро",afternoon:"день",evening:"веч.",night:"ночь"},abbreviated:{am:"ДП",pm:"ПП",midnight:"полн.",noon:"полд.",morning:"утро",afternoon:"день",evening:"веч.",night:"ночь"},wide:{am:"ДП",pm:"ПП",midnight:"полночь",noon:"полдень",morning:"утро",afternoon:"день",evening:"вечер",night:"ночь"}},BIe={narrow:{am:"ДП",pm:"ПП",midnight:"полн.",noon:"полд.",morning:"утра",afternoon:"дня",evening:"веч.",night:"ночи"},abbreviated:{am:"ДП",pm:"ПП",midnight:"полн.",noon:"полд.",morning:"утра",afternoon:"дня",evening:"веч.",night:"ночи"},wide:{am:"ДП",pm:"ПП",midnight:"полночь",noon:"полдень",morning:"утра",afternoon:"дня",evening:"вечера",night:"ночи"}},HIe=(t,e)=>{const n=Number(t),r=e==null?void 0:e.unit;let s;return r==="date"?s="-е":r==="week"||r==="minute"||r==="second"?s="-я":s="-й",n+s},UIe={ordinalNumber:HIe,era:ul({values:NIe,defaultWidth:"wide"}),quarter:ul({values:LIe,defaultWidth:"wide",argumentCallback:t=>t-1}),month:ul({values:$Ie,defaultWidth:"wide",formattingValues:FIe,defaultFormattingWidth:"wide"}),day:ul({values:zIe,defaultWidth:"wide"}),dayPeriod:ul({values:PIe,defaultWidth:"any",formattingValues:BIe,defaultFormattingWidth:"wide"})},VIe=/^(\d+)(-?(е|я|й|ое|ье|ая|ья|ый|ой|ий|ый))?/i,qIe=/\d+/i,WIe={narrow:/^((до )?н\.?\s?э\.?)/i,abbreviated:/^((до )?н\.?\s?э\.?)/i,wide:/^(до нашей эры|нашей эры|наша эра)/i},YIe={any:[/^д/i,/^н/i]},GIe={narrow:/^[1234]/i,abbreviated:/^[1234](-?[ыои]?й?)? кв.?/i,wide:/^[1234](-?[ыои]?й?)? квартал/i},KIe={any:[/1/i,/2/i,/3/i,/4/i]},XIe={narrow:/^[яфмаисонд]/i,abbreviated:/^(янв|фев|март?|апр|ма[йя]|июн[ья]?|июл[ья]?|авг|сент?|окт|нояб?|дек)\.?/i,wide:/^(январ[ья]|феврал[ья]|марта?|апрел[ья]|ма[йя]|июн[ья]|июл[ья]|августа?|сентябр[ья]|октябр[ья]|октябр[ья]|ноябр[ья]|декабр[ья])/i},ZIe={narrow:[/^я/i,/^ф/i,/^м/i,/^а/i,/^м/i,/^и/i,/^и/i,/^а/i,/^с/i,/^о/i,/^н/i,/^я/i],any:[/^я/i,/^ф/i,/^мар/i,/^ап/i,/^ма[йя]/i,/^июн/i,/^июл/i,/^ав/i,/^с/i,/^о/i,/^н/i,/^д/i]},QIe={narrow:/^[впсч]/i,short:/^(вс|во|пн|по|вт|ср|чт|че|пт|пя|сб|су)\.?/i,abbreviated:/^(вск|вос|пнд|пон|втр|вто|срд|сре|чтв|чет|птн|пят|суб).?/i,wide:/^(воскресень[ея]|понедельника?|вторника?|сред[аы]|четверга?|пятниц[аы]|суббот[аы])/i},JIe={narrow:[/^в/i,/^п/i,/^в/i,/^с/i,/^ч/i,/^п/i,/^с/i],any:[/^в[ос]/i,/^п[он]/i,/^в/i,/^ср/i,/^ч/i,/^п[ят]/i,/^с[уб]/i]},eOe={narrow:/^([дп]п|полн\.?|полд\.?|утр[оа]|день|дня|веч\.?|ноч[ьи])/i,abbreviated:/^([дп]п|полн\.?|полд\.?|утр[оа]|день|дня|веч\.?|ноч[ьи])/i,wide:/^([дп]п|полночь|полдень|утр[оа]|день|дня|вечера?|ноч[ьи])/i},tOe={any:{am:/^дп/i,pm:/^пп/i,midnight:/^полн/i,noon:/^полд/i,morning:/^у/i,afternoon:/^д[ен]/i,evening:/^в/i,night:/^н/i}},nOe={ordinalNumber:FJ({matchPattern:VIe,parsePattern:qIe,valueCallback:t=>parseInt(t,10)}),era:dl({matchPatterns:WIe,defaultMatchWidth:"wide",parsePatterns:YIe,defaultParseWidth:"any"}),quarter:dl({matchPatterns:GIe,defaultMatchWidth:"wide",parsePatterns:KIe,defaultParseWidth:"any",valueCallback:t=>t+1}),month:dl({matchPatterns:XIe,defaultMatchWidth:"wide",parsePatterns:ZIe,defaultParseWidth:"any"}),day:dl({matchPatterns:QIe,defaultMatchWidth:"wide",parsePatterns:JIe,defaultParseWidth:"any"}),dayPeriod:dl({matchPatterns:eOe,defaultMatchWidth:"wide",parsePatterns:tOe,defaultParseWidth:"any"})},rOe={code:"ru",formatDistance:TIe,formatLong:_Ie,formatRelative:OIe,localize:UIe,match:nOe,options:{weekStartsOn:1,firstWeekContainsDate:1}},sOe="d MMM",oOe="d MMM HH:mm",ey=(t,e=!0,n)=>S.useMemo(()=>{if(!t||isNaN(new Date(t).getTime()))return"";const r=new Date(t);if(isNaN(r.getTime()))return"";const s=new Date,o=n&&n.trim()?n:Intl.DateTimeFormat().resolvedOptions().timeZone,i=hTe(r,o),a=vn.language==="ru"?rOe:zJ;return i.toDateString()===s.toDateString()?Ek(i,"HH:mm",{timeZone:n??"UTC",locale:a}):r.getFullYear()===s.getFullYear()?Ek(i,e?oOe:sOe,{timeZone:n??"UTC",locale:a}).replace(",",""):Ek(i,"yyyy-MM-dd",{timeZone:n??"UTC",locale:a}).replace(",","").replace(".","")},[t,n,e,vn.language]),qte=t=>{const e=Fa({type:"new"});S.useEffect(()=>{(()=>{t==null||t.querySelectorAll('a[href^="mailto:"]').forEach(r=>{const s=o=>{var a;o.preventDefault();const i=(a=r.getAttribute("href"))==null?void 0:a.substring(7);i&&e({type:"new",To:[i]})};r.removeEventListener("click",s),r.addEventListener("click",s)})})()},[t])},Wte=t=>{const e=(t.Body||"").replace(/\[image: [^\]]+\]/g,"").trim(),n=t.HtmlBody||e;if(n)try{const s=new DOMParser().parseFromString(n,"text/html"),o=s.querySelectorAll('[data-attachment-link="true"]'),i=new Set;o.forEach(c=>{var f,h;const u=((h=(f=c.querySelector("a"))==null?void 0:f.textContent)==null?void 0:h.trim())||"";if(!u){c.remove();return}if(i.has(u)){c.remove();return}i.add(u),c.replaceWith(s.createTextNode(`
${u}
`))}),s.querySelectorAll('script[type="application/ld+json"]').forEach(c=>c.remove()),s.querySelectorAll("style").forEach(c=>c.remove()),s.querySelectorAll("[style]").forEach(c=>c.removeAttribute("style")),s.querySelectorAll("br").forEach(c=>c.replaceWith(`
`)),s.querySelectorAll("p").forEach(c=>{c.prepend(document.createTextNode(`
`)),c.append(document.createTextNode(`
`))});const a=c=>{if(c.nodeType===Node.TEXT_NODE){const u=/\u200C/.test(c.textContent),f=/\uFEFF/.test(c.textContent);(u||f)&&(c.textContent=c.textContent.replace(/\u200C/g,""),c.textContent=c.textContent.replace(/\uFEFF/g,""),c.textContent=c.textContent.replace(/\s+/g,""),c.textContent=c.textContent.replace(/\n\s*\n/g,`
`))}else c.childNodes.forEach(a)};return a(s.body),(s.body.textContent||"").trim()}catch{return""}},iOe="data:image/svg+xml,%3csvg%20id='icon-file'%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%20style='fill:%20grey;'%3e%3cpath%20d='M2%204C2%202.34315%203.34315%201%205%201H14.7574C15.553%201%2016.3161%201.31607%2016.8787%201.87868L19%204L21.1213%206.12132C21.6839%206.68393%2022%207.44699%2022%208.24264V20C22%2021.6569%2020.6569%2023%2019%2023H5C3.34315%2023%202%2021.6569%202%2020V4Z'%20fill='%2381A3C5'%20fill-opacity='0.55'%3e%3c/path%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M15%206.5L15%201L16%201L16%206.5C16%206.77614%2016.2239%207%2016.5%207L22%207L22%208L16.5%208C15.6716%208%2015%207.32843%2015%206.5Z'%20fill='white'%3e%3c/path%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M6.5%2012.5C6.5%2012.2239%206.72386%2012%207%2012H17C17.2761%2012%2017.5%2012.2239%2017.5%2012.5C17.5%2012.7761%2017.2761%2013%2017%2013H7C6.72386%2013%206.5%2012.7761%206.5%2012.5Z'%20fill='white'%3e%3c/path%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M6.5%2015C6.5%2014.7239%206.72386%2014.5%207%2014.5H17C17.2761%2014.5%2017.5%2014.7239%2017.5%2015C17.5%2015.2761%2017.2761%2015.5%2017%2015.5H7C6.72386%2015.5%206.5%2015.2761%206.5%2015Z'%20fill='white'%3e%3c/path%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M6.5%2017.5C6.5%2017.2239%206.72386%2017%207%2017H17C17.2761%2017%2017.5%2017.2239%2017.5%2017.5C17.5%2017.7761%2017.2761%2018%2017%2018H7C6.72386%2018%206.5%2017.7761%206.5%2017.5Z'%20fill='white'%3e%3c/path%3e%3c/svg%3e",aOe="data:image/svg+xml,%3csvg%20id='icon-doc'%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%20style='fill:%20cornflowerblue;%20flex-shrink:%200;'%3e%3crect%20x='2'%20y='1'%20width='20'%20height='22'%20rx='3'%20fill='%23228BE6'%3e%3c/rect%3e%3cpath%20d='M6%207.9999C6%207.66853%206.26863%207.3999%206.6%207.3999H17.4C17.7314%207.3999%2018%207.66853%2018%207.9999C18%208.33127%2017.7314%208.5999%2017.4%208.5999H6.6C6.26863%208.5999%206%208.33127%206%207.9999Z'%20fill='white'%3e%3c/path%3e%3cpath%20d='M6%2011.9999C6%2011.6685%206.26863%2011.3999%206.6%2011.3999H17.4C17.7314%2011.3999%2018%2011.6685%2018%2011.9999C18%2012.3313%2017.7314%2012.5999%2017.4%2012.5999H6.6C6.26863%2012.5999%206%2012.3313%206%2011.9999Z'%20fill='white'%3e%3c/path%3e%3cpath%20d='M6.6%2015.3999C6.26863%2015.3999%206%2015.6685%206%2015.9999C6%2016.3313%206.26863%2016.5999%206.6%2016.5999H14.4C14.7314%2016.5999%2015%2016.3313%2015%2015.9999C15%2015.6685%2014.7314%2015.3999%2014.4%2015.3999H6.6Z'%20fill='white'%3e%3c/path%3e%3c/svg%3e",lOe="data:image/svg+xml,%3csvg%20id='icon-draw'%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%20style='fill:%20red;%20flex-shrink:%200;'%3e%3crect%20x='2'%20y='1'%20width='20'%20height='22'%20rx='3'%20fill='%23E64980'%3e%3c/rect%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M9.79932%209.37741V5.83398H18.1565V14.1911H14.6127C14.6127%2016.8496%2012.4576%2019.0048%209.79904%2019.0048C7.14051%2019.0048%204.98535%2016.8496%204.98535%2014.1911C4.98535%2011.5326%207.14079%209.37741%209.79932%209.37741C9.79941%209.37741%209.79922%209.37741%209.79932%209.37741ZM10.9993%207.03398H16.9565V12.9911H14.462C14.0272%2011.2969%2012.6935%209.96308%2010.9993%209.52826V7.03398ZM13.4127%2014.1911C13.4127%2016.1869%2011.7948%2017.8048%209.79904%2017.8048C7.80325%2017.8048%206.18535%2016.1869%206.18535%2014.1911C6.18535%2012.1953%207.80325%2010.5774%209.79904%2010.5774C9.79894%2010.5774%209.79913%2010.5774%209.79904%2010.5774L9.79932%2014.1911H13.4127ZM13.2087%2012.9911H10.9993V10.7815C12.0297%2011.1442%2012.8461%2011.9607%2013.2087%2012.9911Z'%20fill='white'%3e%3c/path%3e%3c/svg%3e",cOe="data:image/svg+xml,%3csvg%20id='icon-image'%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%20style='fill:%20mediumpurple;%20flex-shrink:%200;'%3e%3crect%20x='2'%20y='1'%20width='20'%20height='22'%20rx='3'%20fill='%234DABF7'%3e%3c/rect%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M14.6215%2010.4561C14.9164%2010.1761%2015.3807%2010.1821%2015.6683%2010.4697L19.6683%2014.4697C19.9612%2014.7626%2019.9612%2015.2374%2019.6683%2015.5303C19.3754%2015.8232%2018.9005%2015.8232%2018.6076%2015.5303L15.1244%2012.0471L11.4422%2015.5439C11.152%2015.8194%2010.6967%2015.8186%2010.4075%2015.5421L9.00646%2014.2027L5.6785%2017.5304C5.38559%2017.8232%204.91072%2017.8232%204.61784%2017.5303C4.32496%2017.2374%204.32498%2016.7625%204.61789%2016.4696L8.46439%2012.6235C8.75265%2012.3353%209.21834%2012.33%209.51298%2012.6117L10.9275%2013.9641L14.6215%2010.4561Z'%20fill='white'%3e%3c/path%3e%3cpath%20d='M10.0001%208.5C10.0001%209.32843%209.32853%2010%208.50011%2010C7.67168%2010%207.00011%209.32843%207.00011%208.5C7.00011%207.67157%207.67168%207%208.50011%207C9.32853%207%2010.0001%207.67157%2010.0001%208.5Z'%20fill='white'%3e%3c/path%3e%3c/svg%3e",uOe="data:image/svg+xml,%3csvg%20id='icon-video'%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%20style='fill:%20mediumorchid;%20flex-shrink:%200;'%3e%3crect%20x='2'%20y='1'%20width='20'%20height='22'%20rx='3'%20fill='%23F59F00'%3e%3c/rect%3e%3cpath%20d='M8.7627%207.75794V16.2419C8.76267%2016.3363%208.78782%2016.4289%208.83554%2016.5103C8.88327%2016.5917%208.95184%2016.6588%209.0342%2016.7049C9.11655%2016.7509%209.20969%2016.7742%209.30402%2016.7722C9.39834%2016.7702%209.49044%2016.7431%209.57079%2016.6937L16.464%2012.4517C16.5412%2012.4043%2016.605%2012.3378%2016.6492%2012.2587C16.6934%2012.1796%2016.7167%2012.0905%2016.7167%2011.9999C16.7167%2011.9093%2016.6934%2011.8202%2016.6492%2011.7411C16.605%2011.662%2016.5412%2011.5956%2016.464%2011.5482L9.57079%207.30617C9.49044%207.25673%209.39834%207.22963%209.30402%207.22765C9.20969%207.22568%209.11655%207.24892%209.0342%207.29496C8.95184%207.341%208.88327%207.40817%208.83554%207.48956C8.78782%207.57094%208.76267%207.66359%208.7627%207.75794Z'%20fill='white'%3e%3c/path%3e%3c/svg%3e",dOe="data:image/svg+xml,%3csvg%20id='icon-audio'%20height='24'%20width='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%20style='fill:%20grey;%20flex-shrink:%200;'%3e%3crect%20x='2'%20y='1'%20width='20'%20height='22'%20rx='3'%20fill='%23CC5DE8'%3e%3c/rect%3e%3cpath%20d='M15.0909%209V13.566C14.8235%2013.4066%2014.513%2013.3153%2014.1818%2013.3153C13.1777%2013.3153%2012.3636%2014.1543%2012.3636%2015.1892C12.3636%2016.2241%2013.1777%2017.0631%2014.1818%2017.0631C15.186%2017.0631%2016%2016.2241%2016%2015.1892V6.75018C16%206.23185%2015.5017%205.86997%2015.0281%206.0443L9.20994%208.18588C8.92049%208.29242%208.72727%208.57499%208.72727%208.89176V14.5029C8.45984%2014.3435%208.14935%2014.2522%207.81818%2014.2522C6.81403%2014.2522%206%2015.0912%206%2016.1261C6%2017.161%206.81403%2018%207.81818%2018C8.82234%2018%209.63636%2017.161%209.63636%2016.1261V11.0077L15.0909%209Z'%20fill='white'%3e%3c/path%3e%3c/svg%3e",fOe="data:image/svg+xml,%3csvg%20id='icon-pdf'%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%20style='fill:%20red;%20flex-shrink:%200;'%3e%3crect%20x='2'%20y='1'%20width='20'%20height='22'%20rx='3'%20fill='%23F03E3E'%3e%3c/rect%3e%3cpath%20d='M7.40272%209.3772C8.0638%209.3772%208.54619%209.51969%208.84987%209.80468C9.15354%2010.0873%209.30538%2010.4774%209.30538%2010.975C9.30538%2011.1993%209.27151%2011.4142%209.20377%2011.6197C9.13602%2011.823%209.02506%2012.004%208.87089%2012.1629C8.71905%2012.3217%208.51582%2012.4479%208.2612%2012.5413C8.00657%2012.6324%207.69238%2012.678%207.31862%2012.678H6.85259V14.5H5.76636V9.3772H7.40272ZM7.34666%2010.2672H6.85259V11.7879H7.21C7.41323%2011.7879%207.5896%2011.7611%207.7391%2011.7073C7.88861%2011.6536%208.00424%2011.5695%208.086%2011.4551C8.16776%2011.3406%208.20864%2011.1934%208.20864%2011.0136C8.20864%2010.7613%208.13856%2010.5744%207.9984%2010.4529C7.85824%2010.3291%207.64099%2010.2672%207.34666%2010.2672Z'%20fill='white'%3e%3c/path%3e%3cpath%20d='M14.5228%2011.8896C14.5228%2012.4665%2014.4119%2012.9489%2014.1899%2013.3367C13.9704%2013.7221%2013.6515%2014.013%2013.2334%2014.2092C12.8152%2014.4031%2012.3118%2014.5%2011.7231%2014.5H10.2725V9.3772H11.8808C12.4181%209.3772%2012.8841%209.47297%2013.2789%209.66452C13.6737%209.85374%2013.9797%2010.1352%2014.1969%2010.509C14.4142%2010.8804%2014.5228%2011.3406%2014.5228%2011.8896ZM13.3945%2011.9176C13.3945%2011.5392%2013.3385%2011.2285%2013.2263%2010.9855C13.1166%2010.7402%2012.953%2010.5592%2012.7358%2010.4424C12.5209%2010.3256%2012.2546%2010.2672%2011.9369%2010.2672H11.3587V13.603H11.8247C12.355%2013.603%2012.7486%2013.4617%2013.0056%2013.179C13.2649%2012.8964%2013.3945%2012.4759%2013.3945%2011.9176Z'%20fill='white'%3e%3c/path%3e%3cpath%20d='M16.6532%2014.5H15.5845V9.3772H18.5209V10.2672H16.6532V11.5882H18.3912V12.4747H16.6532V14.5Z'%20fill='white'%3e%3c/path%3e%3c/svg%3e",pOe="data:image/svg+xml,%3csvg%20id='icon-ppt'%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%20style='fill:%20darkorange;%20flex-shrink:%200;'%3e%3crect%20x='2'%20y='1'%20width='20'%20height='22'%20rx='3'%20fill='%23F76707'%3e%3c/rect%3e%3cpath%20d='M19%2012C19%2010.8953%2018.7386%209.80634%2018.237%208.82207C17.7355%207.8378%2017.0082%206.98619%2016.1145%206.33688L12%2012H19Z'%20fill='white'%3e%3c/path%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M12%2017.8C15.2033%2017.8%2017.8%2015.2033%2017.8%2012C17.8%208.79675%2015.2033%206.2%2012%206.2C8.79675%206.2%206.2%208.79675%206.2%2012C6.2%2015.2033%208.79675%2017.8%2012%2017.8ZM12%2019C15.866%2019%2019%2015.866%2019%2012C19%208.13401%2015.866%205%2012%205C8.13401%205%205%208.13401%205%2012C5%2015.866%208.13401%2019%2012%2019Z'%20fill='white'%3e%3c/path%3e%3c/svg%3e",hOe="data:image/svg+xml,%3csvg%20id='icon-excel'%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%20style='fill:%20forestgreen;%20flex-shrink:%200;'%3e%3crect%20x='2'%20y='1'%20width='20'%20height='22'%20rx='3'%20fill='%2337B24D'%3e%3c/rect%3e%3cpath%20d='M4%208.6C4%208.26863%204.26863%208%204.6%208H19.4C19.7314%208%2020%208.26863%2020%208.6C20%208.93137%2019.7314%209.2%2019.4%209.2H4.6C4.26863%209.2%204%208.93137%204%208.6Z'%20fill='white'%3e%3c/path%3e%3cpath%20d='M8.6%2020C8.26863%2020%208%2019.7314%208%2019.4L8%204.6C8%204.26863%208.26863%204%208.6%204C8.93137%204%209.2%204.26863%209.2%204.6L9.2%2019.4C9.2%2019.7314%208.93137%2020%208.6%2020Z'%20fill='white'%3e%3c/path%3e%3c/svg%3e",Qu=t=>{switch(t){case"application/pdf":return d.jsx("img",{src:fOe,alt:"pdf",width:20,height:20});case"application/vnd.openxmlformats-officedocument.wordprocessingml.document":case"application/msword":case"application/rtf":case"application/vnd.oasis.opendocument.text":case"text/plain":return d.jsx("img",{src:aOe,alt:"pdf",width:20,height:20});case"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":case"application/vnd.oasis.opendocument.spreadsheet":case"application/vnd.ms-excel":case"text/csv":return d.jsx("img",{src:hOe,alt:"pdf",width:20,height:20});case"application/vnd.openxmlformats-officedocument.presentationml.presentation":case"application/vnd.ms-powerpoint":case"application/vnd.oasis.opendocument.presentation":return d.jsx("img",{src:pOe,alt:"pdf",width:20,height:20});case"application/x-draw":return d.jsx("img",{src:lOe,alt:"pdf",width:20,height:20});case"image/jpeg":case"image/png":case"image/jpg":case"image/svg":case"image/svg+xml":return d.jsx("img",{src:cOe,alt:"pdf",width:20,height:20});case"video/mp4":case"video/webm":case"video/quicktime":case"mov":case"MPEG-4":return d.jsx("img",{src:uOe,alt:"pdf",width:20,height:20});case"audio/mpeg":return d.jsx("img",{src:dOe,alt:"pdf",width:20,height:20});default:return d.jsx("img",{src:iOe,alt:"pdf",width:20,height:20})}},Xm=t=>{if(!t||isNaN(t)||t<0)return"0";const e=vn.language,n={ru:["б","Кб","Мб","Гб","Тб"],en:["b","Kb","Mb","Gb","Tb"]},r=n[e]||n.en;let s=0,o=Number(t);for(;o>1024&&s<r.length-1;)o/=1024,s++;return`${o.toFixed(2)} ${r[s]}`},mOe=t=>t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),gOe=t=>{const e=(t??[]).map(n=>n==null?void 0:n.trim()).filter(Boolean);return e.length?(e.sort((n,r)=>r.length-n.length),new RegExp(`(${e.map(mOe).join("|")})`,"giu")):null};function Yte(t,e){if(!t)return t;const n=gOe(e);if(!n)return t;const r=document.createElement("div");r.innerHTML=t;const s=new Set(["SCRIPT","STYLE","NOSCRIPT","TEXTAREA","PRE","CODE","MARK"]),o=i=>{for(const a of Array.from(i.childNodes))if(a.nodeType===Node.TEXT_NODE){const l=a.nodeValue??"";if(!l||l.search(n)===-1)continue;const c=document.createElement("span");c.innerHTML=l.replace(n,"<mark>$1</mark>"),a.replaceWith(...Array.from(c.childNodes))}else if(a.nodeType===Node.ELEMENT_NODE){const l=a;if(s.has(l.tagName))continue;o(l)}};return o(r),r.innerHTML}function zR(t){var u,f;const e=wn(),n=sr(),r=re(Dn),s=re(zr),o=n.emailId?+n.emailId:(u=s==null?void 0:s.find(h=>h.Id===(t==null?void 0:t.FolderId)))==null?void 0:u.UserEmailId,i=(f=r.find(h=>h.Id===Number(o)))==null?void 0:f.Email,a=S.useMemo(()=>{var h,m,y,v;if(e.pathname.includes("/message/")){const b=(h=s.find(w=>w.Id===(t==null?void 0:t.FolderId)))==null?void 0:h.UserEmailId;if(b)return((m=r.find(w=>w.Id===b))==null?void 0:m.Email)||""}else return((y=r.find(b=>b.Id===Number(o)))==null?void 0:y.Email)||"";return((v=r[0])==null?void 0:v.Email)||""},[s,o,r,e.pathname,t==null?void 0:t.FolderId]),l=()=>e.pathname.includes("/sent")||a===t.From.Address?(t==null?void 0:t.To)&&t.To[0]:t.From.Address;return Fa({type:"reply",From:i?{Address:i}:void 0,To:l()?[l()]:[],Subject:t.Subject,HtmlBody:t9e(t),ReplyToId:t.Id})}const Ol=t=>{var u;const e=me.c(8),n=re(Dn),{emailId:r}=sr();let s;e[0]!==t||e[1]!==r||e[2]!==n?(s=(u=n.find(f=>f.Id===(t||Number(r))))==null?void 0:u.AccessType,e[0]=t,e[1]=r,e[2]=n,e[3]=s):s=e[3];const o=s,i=o===bi.Read,a=o===bi.Edit,l=o===bi.Full;let c;return e[4]!==i||e[5]!==a||e[6]!==l?(c={read:i,edit:a,full:l},e[4]=i,e[5]=a,e[6]=l,e[7]=c):c=e[7],c};function Gte(t){if(!t)throw new Error("Invalid print target element");const e="print-wrapper",n="print-element",r=`
  @page {
    size: A4
  }
  .noprint {
    display: none !important
  }
  body div#root > div {
    overflow: initial;
  }
  div {
    height:auto !important;
  }
  body > div:not(.${n}) {
    display: none;
  }
  main {
    padding: 0 !important;
  }
  body.${e} *:not(.${n}) {
    visibility:hidden;
  }
  body.${e} .${n} {
    width: 100%;
    height: 100%;
    left:0;
    top:0;
    position:absolute;
  }
  body.${e} .${n} * {
    visibility:initial;
    margin: 0;
  }
  .mantine-Menu-dropdown{
    display: none;
  }
  `,s=document.getElementsByTagName("head")[0],o=document.createElement("style");o.setAttribute("type","text/css"),o.setAttribute("media","print"),o.appendChild(document.createTextNode(r)),s.appendChild(o),document.body.classList.add(e),t.classList.add(n);const i=t.parentNode;return document.body.appendChild(t),window.print(),i==null||i.appendChild(t),document.body.classList.remove(e),t.classList.remove(n),s.removeChild(o),!1}const Kte=t=>{const e=zt(),n=re(XTe),[r,s]=S.useState(null),[o,i]=S.useState(!1),a=S.useRef(!1),l=S.useRef(new Set),c=S.useCallback(async()=>{if(t&&!a.current&&!l.current.has(t)){if(zP(t,r,n)){l.current.add(t);return}try{i(!0),a.current=!0;const{data:f}=await RJ({like:t,OrderField:""});s(f.Items);const h=f.Items.find(m=>m.Contact.Email===t);h&&e(RTe(h))}catch(f){console.error("Ошибка в загрузке данных",f),s(null)}finally{i(!1),a.current=!1,l.current.add(t)}}},[t,n,e]);return{selected:S.useMemo(()=>zP(t??"",r,n),[t,r,n]),prepareData:c,checked:n,dispatch:e,loading:o}},ob=3,yOe=S.memo(t=>{const e=me.c(23),{folderId:n,message:r,openedChainMenuIndex:s,setOpenedChainMenuIndex:o}=t;let i;e[0]!==r.Children?(i=r.Children??[],e[0]=r.Children,e[1]=i):i=e[1];const a=i,[l,c]=S.useState(a.length<=ob);let u;e[2]!==a||e[3]!==l?(u=l?a:[a[0],...Array.from({length:ob}).map((y,v)=>a[v===0?0:a.length-ob+v])],e[2]=a,e[3]=l,e[4]=u):u=e[4];const f=u;let h;if(e[5]!==a.length||e[6]!==f||e[7]!==l||e[8]!==n||e[9]!==r||e[10]!==s||e[11]!==o){let y;e[13]!==a.length||e[14]!==f.length||e[15]!==l||e[16]!==n||e[17]!==r||e[18]!==s||e[19]!==o?(y=(v,b)=>b===1&&!l?d.jsx(vOe,{count:a.length-ob,onExpand:()=>c(!0)},"toggle"):d.jsx(bOe,{isFirst:b===0,folderId:n,message:v,parent:r,disabledExpand:b===f.length-1,menuOpened:s===b,onMenuChange:w=>o(w?b:null)},v.Id),e[13]=a.length,e[14]=f.length,e[15]=l,e[16]=n,e[17]=r,e[18]=s,e[19]=o,e[20]=y):y=e[20],h=f.map(y),e[5]=a.length,e[6]=f,e[7]=l,e[8]=n,e[9]=r,e[10]=s,e[11]=o,e[12]=h}else h=e[12];let m;return e[21]!==h?(m=d.jsx(bt,{gap:0,children:h}),e[21]=h,e[22]=m):m=e[22],m}),vOe=t=>{const e=me.c(6),{count:n,onExpand:r}=t;let s;e[0]!==n?(s=d.jsx(ve,{justify:"center",pl:20,sx:SOe,children:d.jsxs(Bc,{variant:"filled",pos:"absolute",children:["+",n]})}),e[0]=n,e[1]=s):s=e[1];let o;e[2]===Symbol.for("react.memo_cache_sentinel")?(o=d.jsx(En,{bg:"#fff",h:40,w:40,fz:12,fw:500,sx:COe,children:d.jsx(Q5e,{stroke:1,size:28})}),e[2]=o):o=e[2];let i;return e[3]!==r||e[4]!==s?(i=d.jsxs(En,{component:"div",pl:20,pr:20,py:"sm",onClick:r,style:wOe,children:[s,o]}),e[3]=r,e[4]=s,e[5]=i):i=e[5],i},bOe=({isFirst:t,folderId:e,message:n,parent:r,disabledExpand:s,menuOpened:o,onMenuChange:i})=>{var I,H;const{t:a}=Le(),l=re(qa),c=xt(1024),u=re(Bm),f=re(zr),{selected:h,prepareData:m}=Kte(n.From.Address),v=typeof(h==null?void 0:h.Name)=="string"&&!h.Name.includes("@")?h.Name:n.From.Name||n.From.Address,{read:b}=Ol((I=f==null?void 0:f.find($=>$.Id===(r==null?void 0:r.FolderId)))==null?void 0:I.UserEmailId),{highlightStrings:w}=br($=>$.search),C=$R({address:n.From.Address,folderId:e,name:n.From.Name||n.From.Address,fromMessageHeader:!0}),k=Object.values(H_),E=S.useRef(null),j=()=>{Gte(E.current)},A=zR(n),M=ey(n.Date,!0,u),[_,D]=S.useState(s),R=()=>!s&&D($=>!$),N=$=>{!$.target.closest("button")&&!$.target.closest(".popup-id")&&R()},z=async $=>{IR({attachmentId:$.Id})},B=async $=>{const V=await DJ({folderId:e,messageId:n.Id,fileName:$.FileName});lm({title:"Успешно",message:`${a("notifications.messages.savingFile",{data:V.data.Description})}`,color:"teal",icon:d.jsx(Ko,{stroke:1.5,size:16})})},L=async $=>{if(!n)return;const V=await AJ({folderId:e,Id:n.Id,FileName:$.FileName}),q=document.createElement("a");q.download=$.FileName,q.href=URL.createObjectURL(V.data),q.click(),URL.revokeObjectURL(q.href)},P=async $=>{var q;const V=(q=l==null?void 0:l.ModuleUrls.find(U=>U.Name==="Calendar"))==null?void 0:q.Url;window.open(`${V}/event/new_event?folderId=${e}&externalId=${n.ExternalId}&FileName=${$}`)};return S.useEffect(()=>{m()},[n.From.Address]),d.jsxs(bt,{ref:E,gap:"xs",py:"xs",px:"md",sx:$=>({borderTop:t?"":`1px solid ${$.colors.gray[3]}`}),children:[d.jsxs(xe,{sx:{cursor:s?"":"pointer",userSelect:"none",flexGrow:1},onClick:N,children:[d.jsx(Oo,{itemEmail:n.From.Address,itemTitle:n.From.Name,children:d.jsx("span",{style:{display:"flex",marginRight:"13px"},children:d.jsx(cp,{label:v,size:48,item:h})})}),d.jsxs(bt,{miw:100,gap:0,sx:{flexGrow:1,marginTop:"1px"},children:[d.jsxs(ve,{wrap:"nowrap",gap:"sm",justify:"space-between",children:[d.jsx(Oo,{itemEmail:n.From.Address,itemTitle:n.From.Name,children:d.jsxs(ie,{sx:{display:"grid",gridTemplateColumns:"auto auto",alignItems:"center"},children:[d.jsx(Mo,{fw:700,fz:14,lineClamp:1,highlight:w,component:"div",sx:{display:"block",whiteSpace:"nowrap"},children:C}),c&&d.jsx("span",{style:{marginLeft:"10px",fontSize:"11px",color:"#909296",flexShrink:0,alignSelf:"flex-end",fontWeight:"400",lineHeight:"2"},children:M})]})}),d.jsx(ie,{h:20,sx:{flexShrink:0},children:_?!b&&d.jsxs(ve,{mr:c?0:"-7px",gap:"xs",sx:{alignSelf:"flex-end",alignItems:"center"},children:[d.jsx(on,{label:a("reply"),children:d.jsx(Ve,{size:20,onClick:()=>A(),children:d.jsx(g3,{stroke:1.5,size:20})})}),d.jsx(Pte,{message:n,handlePrint:j,opened:o,toggleMenuOpened:()=>i})]}):d.jsx(d.Fragment,{children:n.HasAttachments&&d.jsx(ie,{component:D2,stroke:1.5,h:20,w:20,c:"dimmed"})})})]}),d.jsxs(ve,{wrap:"nowrap",gap:"30px",justify:"space-between",children:[_?d.jsx(ie,{w:0,sx:{flexGrow:1},children:d.jsx(Vte,{message:n})}):d.jsx(Mo,{w:0,sx:{flexGrow:1},truncate:!0,highlight:w,children:Wte(n)||""}),!c&&d.jsx(ue,{c:"dimmed",fz:12,sx:{alignSelf:"flex-start",color:"#909296",flexShrink:0},children:M})]})]})]}),_&&!!((H=n.Attachments)!=null&&H.length)&&d.jsx(ve,{gap:"xs",className:"noprint",sx:{padding:"0"},children:n.Attachments.map(($,V)=>d.jsxs(ve,{onClick:()=>{if($.FileName.indexOf("ics")===-1&&k.find(q=>q.mimeType===$.MimeType))return z($)},wrap:"wrap",h:40,w:"100%",maw:300,pl:6,pr:6,gap:"xs",align:"center",sx:q=>({cursor:"pointer",justifyContent:"space-between",flexWrap:"nowrap",span:{marginRight:0},backgroundColor:"#9EAEC31C",borderRadius:q.radius.sm,"@media (min-width: 1025px)":{"&:hover":{backgroundColor:"#9eaec336"}}}),children:[d.jsx(on,{label:$.FileName,children:d.jsxs(xe,{justify:"space-between",align:"center",sx:{width:"calc(100% - 75px)",flex:"1 1 100%",marginRight:5},children:[d.jsxs(xe,{justify:"flex-start",align:"center",w:"100%",gap:5,sx:{overflow:"hidden"},children:[Qu($.MimeType),d.jsx(ue,{truncate:"end",c:"#343A40",mt:1,fz:14,size:"xs",children:$.FileName})]}),d.jsx(ue,{fz:12,ml:10,c:"dimmed",sx:{whiteSpace:"nowrap"},children:Xm($.Size)})]})}),d.jsx(Fte,{attachment:$,handleAttachmentOpen:z,handleAttachmentDownload:L,handleAttachmentToDisk:B,handleAttachmentToCalendar:P,supportedList:k})]},V))}),(s||_)&&d.jsx(ie,{ml:"xs",className:"fclgjkfgjgk",sx:{overflow:"auto"},children:d.jsx(xOe,{message:n})})]})},xOe=({message:t})=>{var r;const e=S.useRef(null);qte((r=e.current)==null?void 0:r.shadowRoot);const{highlightStrings:n}=br(s=>s.search);return S.useEffect(()=>{var C;if(!e.current)return;const s=((C=e.current)==null?void 0:C.shadowRoot)??e.current.attachShadow({mode:"open"});let o=t.HtmlBody?t.HtmlBody:t.Body?t.Body.replace(/\r\n|\n|\r/g,"<br />"):"";o=Yte(o,n),o=o.replaceAll("#e8eaed","3c4043").replaceAll("<p>",'<p style="margin: 0; padding: 0; word-wrap: break-word;">').replaceAll("</p>","<br></p>").replaceAll("<img ",'<img style="object-fit: contain; max-width: 100%; height: auto; border: none" ');const i=document.createElement("div");i.innerHTML=Lte.sanitize(o,{ADD_ATTR:["target","rel"],ALLOW_DATA_ATTR:!0});const a=document.createElement("textarea"),l=document.createTreeWalker(i,NodeFilter.SHOW_TEXT);let c;for(;c=l.nextNode();)a.innerHTML=c.nodeValue??"",c.nodeValue=a.value;s.replaceChildren(...i.childNodes);const u=(k,E)=>{k.forEach(j=>{Object.assign(j.style,E)})};s.querySelectorAll("span[data-attachment-link]").forEach(k=>{k.onmouseover=null,k.onmouseout=null});const h=s.querySelectorAll(".gmail_drive_chip img");u(h,Wi.googleImage);const m=s.querySelectorAll("img[data-loader]");u(m,Wi.loaderImg);const y=s.querySelectorAll("span[data-size]");u(y,Wi.size);const v=s.querySelectorAll("span[data-file-type]");u(v,Wi.icons);const b=s.querySelectorAll("span a");u(b,Wi.link);const w=s.querySelectorAll('img[alt="close"]');u(w,Wi.closeButton)},[t,n]),d.jsx(ie,{ref:e})};function wOe(t){return{borderTop:`1px solid ${t.colors.gray[3]}`,position:"relative","&:hover > *":{backgroundColor:t.colors.gray[0]}}}function SOe(t){return{borderTop:`1px solid ${t.colors.gray[3]}`,borderBottom:`1px solid ${t.colors.gray[3]}`,position:"absolute",left:0,top:"calc(50% - 5px)",height:10,width:"100%",zIndex:-1}}function COe(t){return{borderRadius:"50%",border:`1px solid ${t.colors.gray[3]}`,display:"flex",alignItems:"center",justifyContent:"center",paddingTop:3}}const kOe="_calendarResponse_1tbhd_1",EOe="_calendarResponse__inner_1tbhd_8",TOe="_calendarResponse__link_1tbhd_14",MOe="_calendarResponse__popover_1tbhd_20",jOe="_calendarResponse__popover_label_1tbhd_26",AOe="_calendarResponse__approveText_1tbhd_32",_Oe="_calendarResponse__button_1tbhd_35",ROe="_calendarResponse__button_active_1tbhd_45",DOe="_calendarResponse__arrow_btn_1tbhd_56",IOe="_arrowIcon_1tbhd_81",OOe="_fadeIn_1tbhd_91",NOe="_calendarResponse__arrow_btn_opened_1tbhd_107",LOe="_calendarResponse__collapse_1tbhd_110",eo={calendarResponse:kOe,calendarResponse__inner:EOe,calendarResponse__link:TOe,calendarResponse__popover:MOe,calendarResponse__popover_label:jOe,calendarResponse__approveText:AOe,calendarResponse__button:_Oe,calendarResponse__button_active:ROe,calendarResponse__arrow_btn:DOe,arrowIcon:IOe,fadeIn:OOe,calendarResponse__arrow_btn_opened:NOe,calendarResponse__collapse:LOe},$Oe=()=>{const t=me.c(4),{t:e}=Le();let n;t[0]!==e?(n=e("calendarIntegration.eventDenied"),t[0]=e,t[1]=n):n=t[1];let r;return t[2]!==n?(r=d.jsx(ue,{w:"100%",c:"dimmed",fz:12,children:n}),t[2]=n,t[3]=r):r=t[3],r},FOe=t=>{const e=me.c(20),{handleAnswerEvent:n,invitation:r}=t,{t:s}=Le();let o;e[0]!==s?(o=s("calendarIntegration.yes"),e[0]=s,e[1]=o):o=e[1];let i;e[2]!==o?(i={cssStyles:eo.calendarResponse__button,variant:"default",name:o,answer:"accept",height:35},e[2]=o,e[3]=i):i=e[3];let a;e[4]!==s?(a=s("calendarIntegration.possible"),e[4]=s,e[5]=a):a=e[5];let l;e[6]!==a?(l={cssStyles:eo.calendarResponse__button,variant:"default",name:a,answer:"tentative",height:35},e[6]=a,e[7]=l):l=e[7];let c;e[8]!==s?(c=s("calendarIntegration.no"),e[8]=s,e[9]=c):c=e[9];let u;e[10]!==c?(u={cssStyles:eo.calendarResponse__button,variant:"default",name:c,answer:"decline",height:35},e[10]=c,e[11]=u):u=e[11];let f;e[12]!==i||e[13]!==l||e[14]!==u?(f=[i,l,u],e[12]=i,e[13]=l,e[14]=u,e[15]=f):f=e[15];const h=f;let m;return e[16]!==h||e[17]!==n||e[18]!==r?(m=d.jsx(d.Fragment,{children:h.map(y=>d.jsx(yt,{className:`${y.cssStyles} ${r===y.answer?eo.calendarResponse__button_active:""}`,onClick:()=>n(y.answer),variant:y.variant,h:y.height,styles:{label:{fontSize:"12px"}},children:y.name},y.answer))}),e[16]=h,e[17]=n,e[18]=r,e[19]=m):m=e[19],m},zOe=t=>{const e=me.c(14),{t:n,inlineEmails:r,hasMany:s,content:o,opened:i,setOpened:a}=t;let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l={display:"flex"},e[0]=l):l=e[0];let c;e[1]===Symbol.for("react.memo_cache_sentinel")?(c=d.jsx("div",{style:l,children:d.jsx(rm,{size:16,color:"#868e96",style:{marginTop:"-1px"}})}),e[1]=c):c=e[1];let u;e[2]===Symbol.for("react.memo_cache_sentinel")?(u={display:"block"},e[2]=u):u=e[2];let f;e[3]!==r?(f=d.jsx(ue,{c:"dimmed",fz:12,truncate:"end",lineClamp:1,style:u,children:r}),e[3]=r,e[4]=f):f=e[4];let h;e[5]!==o||e[6]!==s||e[7]!==i||e[8]!==a||e[9]!==n?(h=s&&d.jsxs(Dt,{opened:i,onChange:a,width:350,position:"bottom-end",offset:7,children:[d.jsx(Dt.Target,{children:d.jsx("button",{className:eo.calendarResponse__arrow_btn,onClick:y=>{y.stopPropagation(),a(POe)},onMouseDown:BOe,"aria-expanded":i,children:d.jsx("img",{src:LR,alt:n("back"),height:20,className:eo.arrowIcon,style:{marginRight:"0",height:"8px"}})})}),d.jsx(Dt.Dropdown,{className:eo.calendarResponse__popover,children:o})]}),e[5]=o,e[6]=s,e[7]=i,e[8]=a,e[9]=n,e[10]=h):h=e[10];let m;return e[11]!==f||e[12]!==h?(m=d.jsxs(xe,{w:"100%",justify:"flex-start",align:"center",gap:5,children:[c,f,h]}),e[11]=f,e[12]=h,e[13]=m):m=e[13],m};function POe(t){return!t}function BOe(t){return t.stopPropagation()}const HOe=t=>{const e=me.c(20),{t:n,inlineEmails:r,hasMany:s,content:o,collapsedOpened:i,toggle:a}=t;let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l={display:"flex"},e[0]=l):l=e[0];let c;e[1]===Symbol.for("react.memo_cache_sentinel")?(c=d.jsx("div",{style:l,children:d.jsx(rm,{size:16,color:"#868e96",style:{marginTop:"-1px"}})}),e[1]=c):c=e[1];let u;e[2]===Symbol.for("react.memo_cache_sentinel")?(u={display:"block"},e[2]=u):u=e[2];let f;e[3]!==r?(f=d.jsx(ue,{c:"dimmed",fz:12,truncate:"end",lineClamp:1,style:u,children:r}),e[3]=r,e[4]=f):f=e[4];let h;e[5]!==i||e[6]!==s||e[7]!==n?(h=s&&d.jsx("button",{className:`${eo.calendarResponse__arrow_btn} ${i?eo.calendarResponse__arrow_btn_opened:""}`,children:d.jsx("img",{src:LR,alt:n("back"),height:20,style:{marginRight:"0",height:"8px"}})}),e[5]=i,e[6]=s,e[7]=n,e[8]=h):h=e[8];let m;e[9]!==f||e[10]!==h||e[11]!==a?(m=d.jsxs(xe,{w:"100%",justify:"flex-start",align:"center",gap:5,onClick:a,children:[c,f,h]}),e[9]=f,e[10]=h,e[11]=a,e[12]=m):m=e[12];let y;e[13]!==i||e[14]!==o||e[15]!==s?(y=s&&d.jsx(ie,{className:eo.calendarResponse__collapse,children:d.jsx(tp,{in:i,children:o})}),e[13]=i,e[14]=o,e[15]=s,e[16]=y):y=e[16];let v;return e[17]!==m||e[18]!==y?(v=d.jsxs(d.Fragment,{children:[m,y]}),e[17]=m,e[18]=y,e[19]=v):v=e[19],v},UOe=t=>{var W;const e=me.c(48),{formattedDate:n,emailEvent:r,inlineEmails:s,popOverEmails:o,inlineOrganizer:i,COUNT:a,handleClickToCalendar:l,handleAnswerEvent:c,invitation:u,opened:f,setOpened:h}=t,{t:m}=Le(),y=xt(1024),v=(((W=r==null?void 0:r.Participants)==null?void 0:W.length)||0)>a,[b,w]=Rs(!1),{toggle:C}=w;let k;e[0]===Symbol.for("react.memo_cache_sentinel")?(k=d.jsx("span",{className:eo.calendarResponse__popover_label,children:"Организатор:"}),e[0]=k):k=e[0];let E;e[1]!==i?(E=d.jsxs(ue,{fz:12,mb:2,children:[k," ",i]}),e[1]=i,e[2]=E):E=e[2];let j;e[3]===Symbol.for("react.memo_cache_sentinel")?(j=d.jsx("span",{className:eo.calendarResponse__popover_label,children:"Участники:"}),e[3]=j):j=e[3];let A;e[4]!==o?(A=d.jsxs(ue,{fz:12,children:[j," ",o]}),e[4]=o,e[5]=A):A=e[5];let M;e[6]!==E||e[7]!==A?(M=d.jsx(Jr.Autosize,{mah:140,children:d.jsxs(ie,{children:[E,A]})}),e[6]=E,e[7]=A,e[8]=M):M=e[8];const _=M;let D;e[9]===Symbol.for("react.memo_cache_sentinel")?(D=d.jsx(O5e,{size:16,color:"#868e96",style:{marginTop:"-1px"}}),e[9]=D):D=e[9];let R;e[10]!==n?(R=d.jsxs(xe,{justify:"flex-start",align:"center",gap:5,children:[D,d.jsx(ue,{w:"100%",c:"dimmed",fz:12,children:n})]}),e[10]=n,e[11]=R):R=e[11];let N;e[12]!==b||e[13]!==_||e[14]!==(r==null?void 0:r.Participants)||e[15]!==v||e[16]!==s||e[17]!==y||e[18]!==f||e[19]!==h||e[20]!==m||e[21]!==C?(N=(r==null?void 0:r.Participants)&&d.jsx(d.Fragment,{children:y?d.jsx(HOe,{t:m,inlineEmails:s,hasMany:v,content:_,collapsedOpened:b,toggle:C}):d.jsx(zOe,{t:m,inlineEmails:s,hasMany:v,content:_,opened:f,setOpened:h})}),e[12]=b,e[13]=_,e[14]=r==null?void 0:r.Participants,e[15]=v,e[16]=s,e[17]=y,e[18]=f,e[19]=h,e[20]=m,e[21]=C,e[22]=N):N=e[22];let z;e[23]!==m?(z=m("calendarIntegration.approveInvitation"),e[23]=m,e[24]=z):z=e[24];let B;e[25]!==z?(B=d.jsx(ue,{w:"100%",c:"dimmed",fz:10,mt:20,className:eo.calendarResponse__approveText,children:z}),e[25]=z,e[26]=B):B=e[26];let L;e[27]!==c||e[28]!==u?(L=d.jsx(ve,{gap:5,children:d.jsx(FOe,{handleAnswerEvent:c,invitation:u})}),e[27]=c,e[28]=u,e[29]=L):L=e[29];let P;e[30]!==l?(P=()=>l(),e[30]=l,e[31]=P):P=e[31];let I;e[32]!==m?(I=m("calendarIntegration.openCalendar"),e[32]=m,e[33]=I):I=e[33];let H;e[34]!==P||e[35]!==I?(H=d.jsx(Kh,{onClick:P,target:"_blank",className:eo.calendarResponse__link,children:I}),e[34]=P,e[35]=I,e[36]=H):H=e[36];let $;e[37]===Symbol.for("react.memo_cache_sentinel")?($=d.jsx(qQ,{size:16,color:"#228be6",style:{marginTop:"-1px"}}),e[37]=$):$=e[37];let V;e[38]!==H?(V=d.jsxs(ve,{gap:5,children:[H," ",$]}),e[38]=H,e[39]=V):V=e[39];let q;e[40]!==L||e[41]!==V?(q=d.jsxs(ve,{w:"100%",gap:5,justify:"space-between",children:[L,V]}),e[40]=L,e[41]=V,e[42]=q):q=e[42];let U;return e[43]!==B||e[44]!==q||e[45]!==R||e[46]!==N?(U=d.jsxs(ve,{w:"100%",className:eo.calendarResponse__inner,gap:"xs",children:[R,N,B,q]}),e[43]=B,e[44]=q,e[45]=R,e[46]=N,e[47]=U):U=e[47],U},VOe=()=>{const t=me.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=d.jsx(ve,{p:"15px 16px",justify:"center",h:"auto",children:d.jsx(Bs,{color:"#dee2e6",size:"md",type:"dots"})}),t[0]=e):e=t[0],e},qOe=()=>{const t=me.c(4),{t:e}=Le();let n;t[0]!==e?(n=e("calendarIntegration.eventOutdated"),t[0]=e,t[1]=n):n=t[1];let r;return t[2]!==n?(r=d.jsx(ue,{w:"100%",c:"dimmed",fz:12,children:n}),t[2]=n,t[3]=r):r=t[3],r},WOe=t=>{let e=t.replace(/-::~:~:(?:(?!-::~:~:-)[\s\S])*?-::~:~:-/g,"");return e=e.replace(/^.*-::~:~:.*$/gm,""),e=e.replace(/Присоединиться через Google Meet:.*(\r?\n)?/g,""),e=e.replace(/Подробнее о Google Meet.*(\r?\n)?/g,""),e=e.replace(/Не изменяйте данные в этом разделе\./g,""),e=e.replace(/https?:\/\/(meet|support)\.google\.com\S*/g,""),e=e.replace(/\s{2,}/g," ").trim(),e},YOe=t=>{const e=me.c(7),{content:n}=t;let r;e[0]!==n?(r=WOe(n),e[0]=n,e[1]=r):r=e[1];const s=r;let o;e[2]!==s?(o={__html:s},e[2]=s,e[3]=o):o=e[3];let i;e[4]===Symbol.for("react.memo_cache_sentinel")?(i={whiteSpace:"pre-line"},e[4]=i):i=e[4];let a;return e[5]!==o?(a=d.jsx("span",{dangerouslySetInnerHTML:o,style:i}),e[5]=o,e[6]=a):a=e[6],a},PR=()=>{const t=me.c(2);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e={width:"100%",height:"100%",position:"fixed",zIndex:999,left:0,top:0,paddingBottom:"10px",display:"flex",justifyContent:"center",alignItems:"center",backgroundColor:"#fff"},t[0]=e):e=t[0];let n;return t[1]===Symbol.for("react.memo_cache_sentinel")?(n=d.jsx(ve,{justify:"center",sx:e,children:d.jsx(ve,{gap:"xs",px:10,py:7,children:d.jsx(Bs,{size:"md",type:"dots"})})}),t[1]=n):n=t[1],n},ty=()=>{const t=me.c(2);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e={width:"100%",zIndex:999,minHeight:"100vh",height:"initial",paddingBottom:"10px",display:"flex",justifyContent:"center",alignItems:"center",backgroundColor:"#fff"},t[0]=e):e=t[0];let n;return t[1]===Symbol.for("react.memo_cache_sentinel")?(n=d.jsx(ve,{justify:"center",sx:e,children:d.jsx(ve,{gap:"xs",px:10,py:7,children:d.jsx(Bs,{size:"md",type:"dots"})})}),t[1]=n):n=t[1],n},GOe=({options:t,selectedOption:e,onSelect:n})=>{const r=S.useRef(null),s=S.useRef(null),o=S.useRef(null),i=S.useRef(!1),a=S.useRef(null),l=S.useRef(!1),c=S.useRef(null),u=(A,M)=>{let _=null;return(...D)=>{const R=Date.now();!o.current||R-o.current>=M?(A(D),o.current=R):_||(_=setTimeout(()=>{o.current=Date.now(),A(D),_=null},M-(R-o.current)))}},f=(A,M,_=300)=>{const D=A.scrollTop,R=M-D;if(Math.abs(R)<1)return;const N=Date.now(),z=()=>{const B=Date.now()-N,L=Math.min(B/_,1),P=1-Math.pow(1-L,3);A.scrollTop=D+R*P,L<1&&requestAnimationFrame(z)};requestAnimationFrame(z)},m=u(()=>{const A=r.current;A&&(i.current=!0,a.current&&clearTimeout(a.current),a.current=window.setTimeout(()=>{i.current=!1;const{scrollTop:M,clientHeight:_}=A,D=M+_/2;let R=null,N=1/0,z=null;if(t.forEach((B,L)=>{if(L>=A.children.length)return;const P=A.children[L];if(!P)return;const{offsetTop:I,offsetHeight:H}=P,$=I+H/2,V=Math.abs(D-$);V<N&&(R=B,N=V,z=P)}),R!==null&&(n(R),z)){const B=z,L=B.offsetTop+B.offsetHeight/2-_/2;f(A,L)}},150))},100),y=()=>{i.current=!0},v=()=>{i.current=!0},b=(A,M)=>{l.current||(a.current&&(clearTimeout(a.current),a.current=null),l.current=!1,i.current=!1,n(A),requestAnimationFrame(()=>{const _=r.current;if(!_)return;let D=null;if(M)D=M;else{const B=t.indexOf(A);B>=0&&B<_.children.length?D=_.children[B]:Array.from(_.children).forEach(L=>{var P;((P=L.textContent)==null?void 0:P.trim())===A&&(D=L)})}if(!D)return;const{clientHeight:R}=_,z=D.offsetTop+D.offsetHeight/2-R/2;f(_,z)}))},w=A=>{l.current=!1,c.current=A.clientY},C=A=>{c.current!==null&&Math.abs(A.clientY-c.current)>5&&(l.current=!0)},k=A=>{var M;l.current=!1,c.current=((M=A.touches[0])==null?void 0:M.clientY)??null},E=A=>{c.current!==null&&A.touches[0]&&Math.abs(A.touches[0].clientY-c.current)>5&&(l.current=!0)},j=A=>M=>{const _=M.currentTarget;b(A,_)};return S.useEffect(()=>{const A=r.current,M=s.current;if(!A||!M)return;const _=A.getBoundingClientRect(),D=M.getBoundingClientRect();A.scrollTop=D.top-_.top-_.height/2+D.height/2},[]),S.useEffect(()=>()=>{a.current&&clearTimeout(a.current)},[]),d.jsx(ie,{ref:r,onScroll:m,onMouseDown:y,onTouchStart:v,style:{overflowY:"scroll",whiteSpace:"nowrap",scrollbarWidth:"none",height:"256px",position:"relative",WebkitOverflowScrolling:"touch"},children:t.map((A,M)=>d.jsx(ue,{ref:A===e?s:null,onMouseDown:w,onMouseMove:C,onTouchStart:k,onTouchMove:E,onClick:j(A),variant:A===e?"filled":"subtle",size:"xs",sx:{display:"block",cursor:"pointer",fontSize:14,backgroundColor:e===A?"#339AF0":"#FFFFFF",color:e===A?"#FFFFFF":"black",padding:"6px 10px",borderRadius:4,marginTop:M===0?"112px":0,marginBottom:M===t.length-1?"112px":0},children:A},M))})},Xte=t=>{const e=me.c(72),{placeholder:n,title:r,minDate:s,onStartDateChange:o,onEndDateChange:i,hideEndDate:a,hideToday:l,startValue:c,customInputStyles:u,...f}=t,h=a===void 0?!1:a,m=l===void 0?!1:l,y=c===void 0?null:c,[v,b]=S.useState(!1),[w,C]=S.useState(y);let k;e[0]!==y?(k=_u(y),e[0]=y,e[1]=k):k=e[1];const[E,j]=S.useState(k),[A,M]=S.useState(f.endValue??null),[_,D]=S.useState(_u(f.endValue??null)),[R,N]=S.useState("start"),z=Ke(y),B=f.endValue?Ke(f.endValue):null,{t:L}=Le();let P;e[2]!==w?(P=w==null?void 0:w.toDateString(),e[2]=w,e[3]=P):P=e[3];const I=Ke(new Date(`${P} ${E??"00:00"}`)),H=A?Ke(new Date(`${A==null?void 0:A.toDateString()} ${_??"00:00"}`)):null;let $;e[4]!==R?($=R==="start"?{input:{border:"1px solid #228be6"}}:{},e[4]=R,e[5]=$):$=e[5];const V=$,q=R==="start"?w:A,U=R==="start"?E:_;let W;e[6]!==y?(W=vt=>{vt==="start"?(C(y),j(_u(y))):(M(y),D(_u(y))),b(!0),N(vt)},e[6]=y,e[7]=W):W=e[7];const Y=W;let G;e[8]===Symbol.for("react.memo_cache_sentinel")?(G=()=>{b(!1)},e[8]=G):G=e[8];const K=G;let Q;e[9]!==R?(Q=vt=>{R==="start"?C(vt):M(vt)},e[9]=R,e[10]=Q):Q=e[10];const Z=Q;let J;e[11]!==R?(J=vt=>{R==="start"?j(vt):D(vt)},e[11]=R,e[12]=J):J=e[12];const ne=J;let se;e[13]!==K||e[14]!==i||e[15]!==o||e[16]!==A||e[17]!==_||e[18]!==w||e[19]!==E?(se=()=>{w?o==null||o(new Date(`${w==null?void 0:w.toDateString()} ${E??"00:00"}`)):o==null||o(null),A?i==null||i(new Date(`${A==null?void 0:A.toDateString()} ${_??"00:00"}`)):i==null||i(null),K()},e[13]=K,e[14]=i,e[15]=o,e[16]=A,e[17]=_,e[18]=w,e[19]=E,e[20]=se):se=e[20];const ce=se;let fe;e[21]===Symbol.for("react.memo_cache_sentinel")?(fe=()=>{M(null),D(null)},e[21]=fe):fe=e[21];const le=fe;let be,je;e[22]!==y?(be=()=>{C(y),j(_u(y))},je=[y],e[22]=y,e[23]=be,e[24]=je):(be=e[23],je=e[24]),S.useEffect(be,je),S.useEffect(()=>{M(f.endValue??null),D(_u(f.endValue??null))},[f.endValue]);let pe;e[25]!==u?(pe={...WB,...u},e[25]=u,e[26]=pe):pe=e[26];const _e=y?z.format("DD.MM.YYYY HH:mm"):"";let Ce;e[27]!==Y?(Ce=()=>Y("start"),e[27]=Y,e[28]=Ce):Ce=e[28];let Te;e[29]!==n||e[30]!==f||e[31]!==pe||e[32]!==_e||e[33]!==Ce?(Te=d.jsx(Hn,{maw:"320px",placeholder:n,styles:pe,...f,value:_e,onClick:Ce,readOnly:!0}),e[29]=n,e[30]=f,e[31]=pe,e[32]=_e,e[33]=Ce,e[34]=Te):Te=e[34];let Ae;e[35]===Symbol.for("react.memo_cache_sentinel")?(Ae=d.jsx(Xr.Overlay,{}),e[35]=Ae):Ae=e[35];let Ze;e[36]!==r?(Ze=r&&d.jsx(Xr.Title,{children:r}),e[36]=r,e[37]=Ze):Ze=e[37];const He=m?"auto":"100%";let lt;e[38]!==m||e[39]!==Z||e[40]!==L?(lt=!m&&d.jsx(yt,{fz:16,p:0,variant:"subtle",onClick:()=>Z(new Date),children:L("settings.today")}),e[38]=m,e[39]=Z,e[40]=L,e[41]=lt):lt=e[41];let Ye;e[42]===Symbol.for("react.memo_cache_sentinel")?(Ye=d.jsx(Xr.CloseButton,{}),e[42]=Ye):Ye=e[42];let ge;e[43]!==He||e[44]!==lt?(ge=d.jsxs(xe,{w:He,align:"center",justify:"space-between",children:[lt,Ye]}),e[43]=He,e[44]=lt,e[45]=ge):ge=e[45];let Fe;e[46]!==Ze||e[47]!==ge?(Fe=d.jsxs(Xr.Header,{children:[Ze,ge]}),e[46]=Ze,e[47]=ge,e[48]=Fe):Fe=e[48];let Se;e[49]===Symbol.for("react.memo_cache_sentinel")?(Se=()=>N("start"),e[49]=Se):Se=e[49];const qe=xe,ot="100%",$e=16,pt=20,gt="auto",Pt=K2,at=R==="start"?s:I==null?void 0:I.toDate();let nt;e[50]!==Z?(nt=vt=>Z(vt==null?null:vt instanceof Date?vt:new Date(vt)),e[50]=Z,e[51]=nt):nt=e[51];let We;e[52]!==Pt||e[53]!==q||e[54]!==at||e[55]!==nt?(We=d.jsx(Pt,{minDate:at,value:q,onChange:nt}),e[52]=Pt,e[53]=q,e[54]=at,e[55]=nt,e[56]=We):We=e[56];let At;e[57]===Symbol.for("react.memo_cache_sentinel")?(At=w3(),e[57]=At):At=e[57];let St;e[58]!==ne?(St=vt=>ne(vt),e[58]=ne,e[59]=St):St=e[59];let Ot;e[60]!==U||e[61]!==St?(Ot=d.jsx(GOe,{options:At,selectedOption:U,onSelect:St},U),e[60]=U,e[61]=St,e[62]=Ot):Ot=e[62];let Tt;e[63]!==qe||e[64]!==We||e[65]!==Ot?(Tt=d.jsxs(qe,{maw:ot,px:$e,gap:pt,m:gt,children:[We,Ot]}),e[63]=qe,e[64]=We,e[65]=Ot,e[66]=Tt):Tt=e[66];let kt;e[67]!==L?(kt=L("settings.apply"),e[67]=L,e[68]=kt):kt=e[68];let jt;return e[69]!==ce||e[70]!==kt?(jt=d.jsx(xe,{px:16,pt:8,pb:12,justify:"center",gap:8,mt:"auto",children:d.jsx(yt,{fz:18,size:"lg",w:"100%",maw:"320px",onClick:ce,children:kt})}),e[69]=ce,e[70]=kt,e[71]=jt):jt=e[71],d.jsxs(d.Fragment,{children:[Te,!h&&d.jsx(Hn,{maw:"320px",placeholder:n,styles:WB,rightSection:f.endValue&&d.jsx(Ve,{onClick:()=>i==null?void 0:i(null),children:d.jsx(po,{size:"1rem",style:{display:"block",opacity:.5}})}),...f,value:B?B.format("DD/MM/YYYY HH:mm"):"",onClick:()=>Y("end"),readOnly:!0}),d.jsxs(Xr.Root,{opened:v,position:"bottom",size:495,onClose:K,styles:KOe,children:[Ae,d.jsxs(Xr.Content,{children:[Fe,d.jsxs(bt,{flex:1,children:[d.jsxs(xe,{gap:4,px:16,justify:"center",children:[d.jsx(Hn,{w:h?"100%":"50%",maw:h?"320px":"50%",readOnly:!0,value:I==null?void 0:I.format("DD.MM.YYYY HH:mm"),onClick:Se,style:V,styles:u}),!h&&d.jsx(Hn,{readOnly:!0,w:"50%",value:(H==null?void 0:H.format("DD/MM/YYYY HH:mm"))??"",onClick:()=>N("end"),rightSection:f.endValue&&d.jsx(Ve,{onClick:le,children:d.jsx(po,{size:"1rem",style:{display:"block",opacity:.5}})}),style:V,styles:u})]}),Tt,jt]})]})]})]})},WB={wrapper:{marginBottom:0,width:"100%"}},KOe={header:{paddingRight:16},content:{borderRadius:"16px 16px 0 0 !important",color:"#343A40",display:"flex",flexDirection:"column"},title:{fontSize:20,fontWeight:600,color:"#343A40"},close:{color:"#FFFFFF",backgroundColor:"rgba(134, 142, 150, 0.4)",borderRadius:11,width:20,height:20,minWidth:20,minHeight:20,svg:{width:14,height:14}}},BR=Rte(()=>({wrapper:{marginBottom:0}})),ny=Rte(t=>({mobileSwitchBox:{gap:32,display:"flex",flexDirection:"row","@media (max-width: 1025px)":{width:"100%",gap:16,flexDirection:"column",padding:`${t.spacing.xl} ${t.spacing.sm} ${t.spacing.xl} ${t.spacing.lg}`,backgroundColor:t.colors.gray[1],borderRadius:t.radius.lg}},row:{paddingLeft:t.spacing.md,gap:4,wordWrap:"break-word",maxWidth:"100%"},firstColumn:{paddingLeft:36,alignItems:"flex-start",wordWrap:"break-word"}})),HR=t=>({padding:t.spacing.md,paddingLeft:6,width:"100%",backgroundColor:"#FFF",zIndex:9,"@media (min-width: 1024px)":{padding:`${t.spacing.md} ${t.spacing.md} ${t.spacing.md} 52px`,marginBottom:32,width:"auto"}}),XOe=t=>({...HR(t),boxShadow:"0px 2px 8px 0px rgba(16, 24, 40, 0.10), 0px 2px 3px 0px rgba(16, 24, 40, 0.12), 0px 0px 1px 0px rgba(16, 24, 40, 0.20)"}),si={lineHeight:"32px",fontWeight:500},ws={root:{width:"100%","@media (min-width: 1024px)":{width:"auto"}},input:{fontSize:14,border:"none","&[data-invalid]":{border:"1px solid","::placeholder":{color:"#ADB5BD"}},"&:focus:not[data-invalid]":{border:"none"},"@media (min-width: 1024px)":{backgroundColor:"#F5F6F8"}},option:{fontSize:"12px"},error:{fontSize:"10px"},...BR},ZOe={...ws,input:{...ws.input,"@media (max-width: 1024px)":{backgroundColor:"#F5F6F8"}}},Fu={label:{fontSize:16,"@media (min-width: 1024px)":{fontSize:14}},labelWrapper:{width:"100%"},track:{flexShrink:0},body:{alignItems:"center"}},DT=t=>({color:t.colors.gray[8],fontWeight:500,fontSize:20,lineHeight:"24px","@media (min-width: 1024px)":{fontSize:18}}),Zk=t=>({label:{color:t.colors.gray[6],fontSize:14}}),QOe={input:{fontSize:18,"&:focus":{border:"none"}},...BR},IT={display:"flex",justifyContent:"space-between",width:"100%",gap:0,"@media (min-width: 1024px)":{width:"auto"}},JOe={"@media (min-width: 1024px)":{display:"block"}},Zte=t=>({alignItems:"flex-start","@media (max-width: 1024px)":{width:"100%",padding:t.spacing.lg,paddingBottom:t.spacing.sm,backgroundColor:t.colors.gray[1],borderRadius:t.radius.lg}}),eNe=t=>({bottom:0,width:"100%",zIndex:9,alignItems:"center",height:56,justifyContent:"center",borderTop:`1px solid ${t.colors.gray[2]}`,backgroundColor:"#FFFFFF"}),tNe=t=>({fontSize:t.fontSizes.xs,paddingLeft:"36px",textAlign:"left",color:"inherit",fontWeight:500}),YB=t=>({textAlign:"left",fontSize:t.fontSizes.xs,paddingLeft:t.spacing.md,color:"inherit",fontWeight:500}),nf=t=>({fontSize:t.fontSizes.md}),nNe=t=>({color:"black",backgroundColor:t.colors.gray[1],padding:"4px 8px",fontSize:t.fontSizes.md,borderRadius:t.radius.sm}),GB={outside:{justifyContent:"flex-end",paddingRight:16},inner:{alignItems:"center",alignSelf:"flex-end",gap:8,paddingRight:16,paddingLeft:16}},Qte={width:"30px",height:"30px"},rNe=t=>({root:{borderRadius:t.radius.md,backgroundColor:t.colors.gray[0],padding:"12px 12px 12px 20px","&[data-active] .mantine-NavLink-label":{fontWeight:500}},label:{fontSize:t.fontSizes.lg,color:t.colors.gray[8]}}),sNe=t=>({height:22,padding:"0 8px",color:t.colors.gray[6]}),oNe=t=>({backgroundColor:t.colors.gray[0]}),KB=t=>({lineHeight:"32px",padding:`${t.spacing.md} 0`,fontWeight:500}),iNe={width:"36px",height:"36px"},m0=t=>({root:{borderRadius:t.radius.md,paddingLeft:24,"&[data-active]":{backgroundColor:"#2031520F","&:hover":{backgroundColor:"#2031520F"}},"&:hover":{backgroundColor:"#2031520F"},"&[data-active] .mantine-NavLink-label":{fontWeight:500}},label:{fontSize:t.fontSizes.lg,color:t.colors.gray[8]}}),g0=t=>({root:{borderRadius:t.radius.md,backgroundColor:t.colors.gray[0],padding:"12px 12px 12px 24px","&[data-active] .mantine-NavLink-label":{fontWeight:500}},label:{fontSize:t.fontSizes.lg,color:t.colors.gray[8]}}),aNe=()=>({outline:"none","&:focus":{outline:"none"}}),Zm=()=>({root:{"&[data-disabled]":{backgroundColor:"transparent"},"&:disabled":{backgroundColor:"transparent"}}}),up=()=>({root:{padding:0,"&[data-disabled]":{backgroundColor:"transparent"},"&:disabled":{backgroundColor:"transparent"},"&:active":{backgroundColor:"transparent"}}}),lNe={cursor:"pointer",display:"flex",alignItems:"center"},cNe=t=>{const e=me.c(28);let n,r,s,o;e[0]!==t?({data:n,placeholder:r,title:o,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o):(n=e[1],r=e[2],s=e[3],o=e[4]);const[i,a]=S.useState(!1);let l;e[5]===Symbol.for("react.memo_cache_sentinel")?(l=()=>{a(!0)},e[5]=l):l=e[5];const c=l;let u;e[6]===Symbol.for("react.memo_cache_sentinel")?(u=()=>{a(!1)},e[6]=u):u=e[6];const f=u;let h;e[7]!==s?(h=j=>{s.onChange(j),f()},e[7]=s,e[8]=h):h=e[8];const m=h;let y;e[9]===Symbol.for("react.memo_cache_sentinel")?(y=d.jsx(bt,{sx:dNe,onClick:c,children:d.jsx(Nm,{size:"1rem",color:"#868E96"})}),e[9]=y):y=e[9];let v;e[10]!==m?(v=j=>m(j??""),e[10]=m,e[11]=v):v=e[11];let b;e[12]!==n||e[13]!==r||e[14]!==s||e[15]!==v?(b=d.jsx(Ia,{readOnly:!0,w:"100%",data:n,placeholder:r,styles:uNe,rightSection:y,...s,value:s.value,onClick:c,onChange:v}),e[12]=n,e[13]=r,e[14]=s,e[15]=v,e[16]=b):b=e[16];const w=o??r;let C;e[17]!==n||e[18]!==s.value||e[19]!==m?(C=n==null?void 0:n.map(j=>{const{label:A,value:M}=j;return d.jsxs(xe,{justify:"space-between",align:"center",children:[d.jsx(ue,{w:"100%",fz:16,py:12,onClick:()=>m(M),children:A}),s.value===M&&d.jsx(Ko,{size:24,color:"#339AF0"})]},M)}),e[17]=n,e[18]=s.value,e[19]=m,e[20]=C):C=e[20];let k;e[21]!==i||e[22]!==w||e[23]!==C?(k=d.jsx(Xr,{opened:i,position:"bottom",onClose:f,title:w,styles:fNe,children:C}),e[21]=i,e[22]=w,e[23]=C,e[24]=k):k=e[24];let E;return e[25]!==b||e[26]!==k?(E=d.jsxs(d.Fragment,{children:[b,k]}),e[25]=b,e[26]=k,e[27]=E):E=e[27],E},uNe={input:{fontSize:14,"&[data-invalid]":{border:"1px solid","::placeholder":{color:"#ADB5BD"}},"&:focus:not[data-invalid]":{border:"none"}},...BR},dNe={flex:1,alignItems:"center",height:"100%",justifyContent:"center"},fNe={header:{paddingRight:16},content:{borderRadius:"16px 16px 0 0 !important",color:"#343A40"},title:{fontSize:20,fontWeight:600,color:"#343A40"},close:{color:"#FFFFFF",backgroundColor:"rgba(134, 142, 150, 0.4)",borderRadius:11,width:20,height:20,minWidth:20,minHeight:20,svg:{width:14,height:14}}},Mr=()=>{const t=me.c(7),{t:e}=Le();let n;t[0]!==e?(n=(l,c)=>lm({message:l,title:e("notifications.status.success"),color:"teal",...c}),t[0]=e,t[1]=n):n=t[1];const r=n;let s;t[2]!==e?(s=(l,c)=>lm({message:l,title:e("notifications.status.error"),color:"red",...c}),t[2]=e,t[3]=s):s=t[3];const o=s,i=pNe;let a;return t[4]!==o||t[5]!==r?(a={success:r,error:o,custom:i},t[4]=o,t[5]=r,t[6]=a):a=t[6],a};function pNe(t,e){return lm({message:t,...e})}function Gs(t){this.content=t}Gs.prototype={constructor:Gs,find:function(t){for(var e=0;e<this.content.length;e+=2)if(this.content[e]===t)return e;return-1},get:function(t){var e=this.find(t);return e==-1?void 0:this.content[e+1]},update:function(t,e,n){var r=n&&n!=t?this.remove(n):this,s=r.find(t),o=r.content.slice();return s==-1?o.push(n||t,e):(o[s+1]=e,n&&(o[s]=n)),new Gs(o)},remove:function(t){var e=this.find(t);if(e==-1)return this;var n=this.content.slice();return n.splice(e,2),new Gs(n)},addToStart:function(t,e){return new Gs([t,e].concat(this.remove(t).content))},addToEnd:function(t,e){var n=this.remove(t).content.slice();return n.push(t,e),new Gs(n)},addBefore:function(t,e,n){var r=this.remove(e),s=r.content.slice(),o=r.find(t);return s.splice(o==-1?s.length:o,0,e,n),new Gs(s)},forEach:function(t){for(var e=0;e<this.content.length;e+=2)t(this.content[e],this.content[e+1])},prepend:function(t){return t=Gs.from(t),t.size?new Gs(t.content.concat(this.subtract(t).content)):this},append:function(t){return t=Gs.from(t),t.size?new Gs(this.subtract(t).content.concat(t.content)):this},subtract:function(t){var e=this;t=Gs.from(t);for(var n=0;n<t.content.length;n+=2)e=e.remove(t.content[n]);return e},toObject:function(){var t={};return this.forEach(function(e,n){t[e]=n}),t},get size(){return this.content.length>>1}};Gs.from=function(t){if(t instanceof Gs)return t;var e=[];if(t)for(var n in t)e.push(n,t[n]);return new Gs(e)};function Jte(t,e,n){for(let r=0;;r++){if(r==t.childCount||r==e.childCount)return t.childCount==e.childCount?null:n;let s=t.child(r),o=e.child(r);if(s==o){n+=s.nodeSize;continue}if(!s.sameMarkup(o))return n;if(s.isText&&s.text!=o.text){for(let i=0;s.text[i]==o.text[i];i++)n++;return n}if(s.content.size||o.content.size){let i=Jte(s.content,o.content,n+1);if(i!=null)return i}n+=s.nodeSize}}function ene(t,e,n,r){for(let s=t.childCount,o=e.childCount;;){if(s==0||o==0)return s==o?null:{a:n,b:r};let i=t.child(--s),a=e.child(--o),l=i.nodeSize;if(i==a){n-=l,r-=l;continue}if(!i.sameMarkup(a))return{a:n,b:r};if(i.isText&&i.text!=a.text){let c=0,u=Math.min(i.text.length,a.text.length);for(;c<u&&i.text[i.text.length-c-1]==a.text[a.text.length-c-1];)c++,n--,r--;return{a:n,b:r}}if(i.content.size||a.content.size){let c=ene(i.content,a.content,n-1,r-1);if(c)return c}n-=l,r-=l}}class ct{constructor(e,n){if(this.content=e,this.size=n||0,n==null)for(let r=0;r<e.length;r++)this.size+=e[r].nodeSize}nodesBetween(e,n,r,s=0,o){for(let i=0,a=0;a<n;i++){let l=this.content[i],c=a+l.nodeSize;if(c>e&&r(l,s+a,o||null,i)!==!1&&l.content.size){let u=a+1;l.nodesBetween(Math.max(0,e-u),Math.min(l.content.size,n-u),r,s+u)}a=c}}descendants(e){this.nodesBetween(0,this.size,e)}textBetween(e,n,r,s){let o="",i=!0;return this.nodesBetween(e,n,(a,l)=>{let c=a.isText?a.text.slice(Math.max(e,l)-l,n-l):a.isLeaf?s?typeof s=="function"?s(a):s:a.type.spec.leafText?a.type.spec.leafText(a):"":"";a.isBlock&&(a.isLeaf&&c||a.isTextblock)&&r&&(i?i=!1:o+=r),o+=c},0),o}append(e){if(!e.size)return this;if(!this.size)return e;let n=this.lastChild,r=e.firstChild,s=this.content.slice(),o=0;for(n.isText&&n.sameMarkup(r)&&(s[s.length-1]=n.withText(n.text+r.text),o=1);o<e.content.length;o++)s.push(e.content[o]);return new ct(s,this.size+e.size)}cut(e,n=this.size){if(e==0&&n==this.size)return this;let r=[],s=0;if(n>e)for(let o=0,i=0;i<n;o++){let a=this.content[o],l=i+a.nodeSize;l>e&&((i<e||l>n)&&(a.isText?a=a.cut(Math.max(0,e-i),Math.min(a.text.length,n-i)):a=a.cut(Math.max(0,e-i-1),Math.min(a.content.size,n-i-1))),r.push(a),s+=a.nodeSize),i=l}return new ct(r,s)}cutByIndex(e,n){return e==n?ct.empty:e==0&&n==this.content.length?this:new ct(this.content.slice(e,n))}replaceChild(e,n){let r=this.content[e];if(r==n)return this;let s=this.content.slice(),o=this.size+n.nodeSize-r.nodeSize;return s[e]=n,new ct(s,o)}addToStart(e){return new ct([e].concat(this.content),this.size+e.nodeSize)}addToEnd(e){return new ct(this.content.concat(e),this.size+e.nodeSize)}eq(e){if(this.content.length!=e.content.length)return!1;for(let n=0;n<this.content.length;n++)if(!this.content[n].eq(e.content[n]))return!1;return!0}get firstChild(){return this.content.length?this.content[0]:null}get lastChild(){return this.content.length?this.content[this.content.length-1]:null}get childCount(){return this.content.length}child(e){let n=this.content[e];if(!n)throw new RangeError("Index "+e+" out of range for "+this);return n}maybeChild(e){return this.content[e]||null}forEach(e){for(let n=0,r=0;n<this.content.length;n++){let s=this.content[n];e(s,r,n),r+=s.nodeSize}}findDiffStart(e,n=0){return Jte(this,e,n)}findDiffEnd(e,n=this.size,r=e.size){return ene(this,e,n,r)}findIndex(e){if(e==0)return ib(0,e);if(e==this.size)return ib(this.content.length,e);if(e>this.size||e<0)throw new RangeError(`Position ${e} outside of fragment (${this})`);for(let n=0,r=0;;n++){let s=this.child(n),o=r+s.nodeSize;if(o>=e)return o==e?ib(n+1,o):ib(n,r);r=o}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map(e=>e.toJSON()):null}static fromJSON(e,n){if(!n)return ct.empty;if(!Array.isArray(n))throw new RangeError("Invalid input for Fragment.fromJSON");return new ct(n.map(e.nodeFromJSON))}static fromArray(e){if(!e.length)return ct.empty;let n,r=0;for(let s=0;s<e.length;s++){let o=e[s];r+=o.nodeSize,s&&o.isText&&e[s-1].sameMarkup(o)?(n||(n=e.slice(0,s)),n[n.length-1]=o.withText(n[n.length-1].text+o.text)):n&&n.push(o)}return new ct(n||e,r)}static from(e){if(!e)return ct.empty;if(e instanceof ct)return e;if(Array.isArray(e))return this.fromArray(e);if(e.attrs)return new ct([e],e.nodeSize);throw new RangeError("Can not convert "+e+" to a Fragment"+(e.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}}ct.empty=new ct([],0);const Qk={index:0,offset:0};function ib(t,e){return Qk.index=t,Qk.offset=e,Qk}function N3(t,e){if(t===e)return!0;if(!(t&&typeof t=="object")||!(e&&typeof e=="object"))return!1;let n=Array.isArray(t);if(Array.isArray(e)!=n)return!1;if(n){if(t.length!=e.length)return!1;for(let r=0;r<t.length;r++)if(!N3(t[r],e[r]))return!1}else{for(let r in t)if(!(r in e)||!N3(t[r],e[r]))return!1;for(let r in e)if(!(r in t))return!1}return!0}let vr=class OT{constructor(e,n){this.type=e,this.attrs=n}addToSet(e){let n,r=!1;for(let s=0;s<e.length;s++){let o=e[s];if(this.eq(o))return e;if(this.type.excludes(o.type))n||(n=e.slice(0,s));else{if(o.type.excludes(this.type))return e;!r&&o.type.rank>this.type.rank&&(n||(n=e.slice(0,s)),n.push(this),r=!0),n&&n.push(o)}}return n||(n=e.slice()),r||n.push(this),n}removeFromSet(e){for(let n=0;n<e.length;n++)if(this.eq(e[n]))return e.slice(0,n).concat(e.slice(n+1));return e}isInSet(e){for(let n=0;n<e.length;n++)if(this.eq(e[n]))return!0;return!1}eq(e){return this==e||this.type==e.type&&N3(this.attrs,e.attrs)}toJSON(){let e={type:this.type.name};for(let n in this.attrs){e.attrs=this.attrs;break}return e}static fromJSON(e,n){if(!n)throw new RangeError("Invalid input for Mark.fromJSON");let r=e.marks[n.type];if(!r)throw new RangeError(`There is no mark type ${n.type} in this schema`);let s=r.create(n.attrs);return r.checkAttrs(s.attrs),s}static sameSet(e,n){if(e==n)return!0;if(e.length!=n.length)return!1;for(let r=0;r<e.length;r++)if(!e[r].eq(n[r]))return!1;return!0}static setFrom(e){if(!e||Array.isArray(e)&&e.length==0)return OT.none;if(e instanceof OT)return[e];let n=e.slice();return n.sort((r,s)=>r.type.rank-s.type.rank),n}};vr.none=[];class L3 extends Error{}class _t{constructor(e,n,r){this.content=e,this.openStart=n,this.openEnd=r}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(e,n){let r=nne(this.content,e+this.openStart,n);return r&&new _t(r,this.openStart,this.openEnd)}removeBetween(e,n){return new _t(tne(this.content,e+this.openStart,n+this.openStart),this.openStart,this.openEnd)}eq(e){return this.content.eq(e.content)&&this.openStart==e.openStart&&this.openEnd==e.openEnd}toString(){return this.content+"("+this.openStart+","+this.openEnd+")"}toJSON(){if(!this.content.size)return null;let e={content:this.content.toJSON()};return this.openStart>0&&(e.openStart=this.openStart),this.openEnd>0&&(e.openEnd=this.openEnd),e}static fromJSON(e,n){if(!n)return _t.empty;let r=n.openStart||0,s=n.openEnd||0;if(typeof r!="number"||typeof s!="number")throw new RangeError("Invalid input for Slice.fromJSON");return new _t(ct.fromJSON(e,n.content),r,s)}static maxOpen(e,n=!0){let r=0,s=0;for(let o=e.firstChild;o&&!o.isLeaf&&(n||!o.type.spec.isolating);o=o.firstChild)r++;for(let o=e.lastChild;o&&!o.isLeaf&&(n||!o.type.spec.isolating);o=o.lastChild)s++;return new _t(e,r,s)}}_t.empty=new _t(ct.empty,0,0);function tne(t,e,n){let{index:r,offset:s}=t.findIndex(e),o=t.maybeChild(r),{index:i,offset:a}=t.findIndex(n);if(s==e||o.isText){if(a!=n&&!t.child(i).isText)throw new RangeError("Removing non-flat range");return t.cut(0,e).append(t.cut(n))}if(r!=i)throw new RangeError("Removing non-flat range");return t.replaceChild(r,o.copy(tne(o.content,e-s-1,n-s-1)))}function nne(t,e,n,r){let{index:s,offset:o}=t.findIndex(e),i=t.maybeChild(s);if(o==e||i.isText)return r&&!r.canReplace(s,s,n)?null:t.cut(0,e).append(n).append(t.cut(e));let a=nne(i.content,e-o-1,n,i);return a&&t.replaceChild(s,i.copy(a))}function hNe(t,e,n){if(n.openStart>t.depth)throw new L3("Inserted content deeper than insertion position");if(t.depth-n.openStart!=e.depth-n.openEnd)throw new L3("Inconsistent open depths");return rne(t,e,n,0)}function rne(t,e,n,r){let s=t.index(r),o=t.node(r);if(s==e.index(r)&&r<t.depth-n.openStart){let i=rne(t,e,n,r+1);return o.copy(o.content.replaceChild(s,i))}else if(n.content.size)if(!n.openStart&&!n.openEnd&&t.depth==r&&e.depth==r){let i=t.parent,a=i.content;return Mf(i,a.cut(0,t.parentOffset).append(n.content).append(a.cut(e.parentOffset)))}else{let{start:i,end:a}=mNe(n,t);return Mf(o,one(t,i,a,e,r))}else return Mf(o,$3(t,e,r))}function sne(t,e){if(!e.type.compatibleContent(t.type))throw new L3("Cannot join "+e.type.name+" onto "+t.type.name)}function NT(t,e,n){let r=t.node(n);return sne(r,e.node(n)),r}function Tf(t,e){let n=e.length-1;n>=0&&t.isText&&t.sameMarkup(e[n])?e[n]=t.withText(e[n].text+t.text):e.push(t)}function Z0(t,e,n,r){let s=(e||t).node(n),o=0,i=e?e.index(n):s.childCount;t&&(o=t.index(n),t.depth>n?o++:t.textOffset&&(Tf(t.nodeAfter,r),o++));for(let a=o;a<i;a++)Tf(s.child(a),r);e&&e.depth==n&&e.textOffset&&Tf(e.nodeBefore,r)}function Mf(t,e){return t.type.checkContent(e),t.copy(e)}function one(t,e,n,r,s){let o=t.depth>s&&NT(t,e,s+1),i=r.depth>s&&NT(n,r,s+1),a=[];return Z0(null,t,s,a),o&&i&&e.index(s)==n.index(s)?(sne(o,i),Tf(Mf(o,one(t,e,n,r,s+1)),a)):(o&&Tf(Mf(o,$3(t,e,s+1)),a),Z0(e,n,s,a),i&&Tf(Mf(i,$3(n,r,s+1)),a)),Z0(r,null,s,a),new ct(a)}function $3(t,e,n){let r=[];if(Z0(null,t,n,r),t.depth>n){let s=NT(t,e,n+1);Tf(Mf(s,$3(t,e,n+1)),r)}return Z0(e,null,n,r),new ct(r)}function mNe(t,e){let n=e.depth-t.openStart,s=e.node(n).copy(t.content);for(let o=n-1;o>=0;o--)s=e.node(o).copy(ct.from(s));return{start:s.resolveNoCache(t.openStart+n),end:s.resolveNoCache(s.content.size-t.openEnd-n)}}class Pg{constructor(e,n,r){this.pos=e,this.path=n,this.parentOffset=r,this.depth=n.length/3-1}resolveDepth(e){return e==null?this.depth:e<0?this.depth+e:e}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(e){return this.path[this.resolveDepth(e)*3]}index(e){return this.path[this.resolveDepth(e)*3+1]}indexAfter(e){return e=this.resolveDepth(e),this.index(e)+(e==this.depth&&!this.textOffset?0:1)}start(e){return e=this.resolveDepth(e),e==0?0:this.path[e*3-1]+1}end(e){return e=this.resolveDepth(e),this.start(e)+this.node(e).content.size}before(e){if(e=this.resolveDepth(e),!e)throw new RangeError("There is no position before the top-level node");return e==this.depth+1?this.pos:this.path[e*3-1]}after(e){if(e=this.resolveDepth(e),!e)throw new RangeError("There is no position after the top-level node");return e==this.depth+1?this.pos:this.path[e*3-1]+this.path[e*3].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let e=this.parent,n=this.index(this.depth);if(n==e.childCount)return null;let r=this.pos-this.path[this.path.length-1],s=e.child(n);return r?e.child(n).cut(r):s}get nodeBefore(){let e=this.index(this.depth),n=this.pos-this.path[this.path.length-1];return n?this.parent.child(e).cut(0,n):e==0?null:this.parent.child(e-1)}posAtIndex(e,n){n=this.resolveDepth(n);let r=this.path[n*3],s=n==0?0:this.path[n*3-1]+1;for(let o=0;o<e;o++)s+=r.child(o).nodeSize;return s}marks(){let e=this.parent,n=this.index();if(e.content.size==0)return vr.none;if(this.textOffset)return e.child(n).marks;let r=e.maybeChild(n-1),s=e.maybeChild(n);if(!r){let a=r;r=s,s=a}let o=r.marks;for(var i=0;i<o.length;i++)o[i].type.spec.inclusive===!1&&(!s||!o[i].isInSet(s.marks))&&(o=o[i--].removeFromSet(o));return o}marksAcross(e){let n=this.parent.maybeChild(this.index());if(!n||!n.isInline)return null;let r=n.marks,s=e.parent.maybeChild(e.index());for(var o=0;o<r.length;o++)r[o].type.spec.inclusive===!1&&(!s||!r[o].isInSet(s.marks))&&(r=r[o--].removeFromSet(r));return r}sharedDepth(e){for(let n=this.depth;n>0;n--)if(this.start(n)<=e&&this.end(n)>=e)return n;return 0}blockRange(e=this,n){if(e.pos<this.pos)return e.blockRange(this);for(let r=this.depth-(this.parent.inlineContent||this.pos==e.pos?1:0);r>=0;r--)if(e.pos<=this.end(r)&&(!n||n(this.node(r))))return new F3(this,e,r);return null}sameParent(e){return this.pos-this.parentOffset==e.pos-e.parentOffset}max(e){return e.pos>this.pos?e:this}min(e){return e.pos<this.pos?e:this}toString(){let e="";for(let n=1;n<=this.depth;n++)e+=(e?"/":"")+this.node(n).type.name+"_"+this.index(n-1);return e+":"+this.parentOffset}static resolve(e,n){if(!(n>=0&&n<=e.content.size))throw new RangeError("Position "+n+" out of range");let r=[],s=0,o=n;for(let i=e;;){let{index:a,offset:l}=i.content.findIndex(o),c=o-l;if(r.push(i,a,s+l),!c||(i=i.child(a),i.isText))break;o=c-1,s+=l+1}return new Pg(n,r,o)}static resolveCached(e,n){let r=XB.get(e);if(r)for(let o=0;o<r.elts.length;o++){let i=r.elts[o];if(i.pos==n)return i}else XB.set(e,r=new gNe);let s=r.elts[r.i]=Pg.resolve(e,n);return r.i=(r.i+1)%yNe,s}}class gNe{constructor(){this.elts=[],this.i=0}}const yNe=12,XB=new WeakMap;class F3{constructor(e,n,r){this.$from=e,this.$to=n,this.depth=r}get start(){return this.$from.before(this.depth+1)}get end(){return this.$to.after(this.depth+1)}get parent(){return this.$from.node(this.depth)}get startIndex(){return this.$from.index(this.depth)}get endIndex(){return this.$to.indexAfter(this.depth)}}const vNe=Object.create(null);let Ju=class LT{constructor(e,n,r,s=vr.none){this.type=e,this.attrs=n,this.marks=s,this.content=r||ct.empty}get children(){return this.content.content}get nodeSize(){return this.isLeaf?1:2+this.content.size}get childCount(){return this.content.childCount}child(e){return this.content.child(e)}maybeChild(e){return this.content.maybeChild(e)}forEach(e){this.content.forEach(e)}nodesBetween(e,n,r,s=0){this.content.nodesBetween(e,n,r,s,this)}descendants(e){this.nodesBetween(0,this.content.size,e)}get textContent(){return this.isLeaf&&this.type.spec.leafText?this.type.spec.leafText(this):this.textBetween(0,this.content.size,"")}textBetween(e,n,r,s){return this.content.textBetween(e,n,r,s)}get firstChild(){return this.content.firstChild}get lastChild(){return this.content.lastChild}eq(e){return this==e||this.sameMarkup(e)&&this.content.eq(e.content)}sameMarkup(e){return this.hasMarkup(e.type,e.attrs,e.marks)}hasMarkup(e,n,r){return this.type==e&&N3(this.attrs,n||e.defaultAttrs||vNe)&&vr.sameSet(this.marks,r||vr.none)}copy(e=null){return e==this.content?this:new LT(this.type,this.attrs,e,this.marks)}mark(e){return e==this.marks?this:new LT(this.type,this.attrs,this.content,e)}cut(e,n=this.content.size){return e==0&&n==this.content.size?this:this.copy(this.content.cut(e,n))}slice(e,n=this.content.size,r=!1){if(e==n)return _t.empty;let s=this.resolve(e),o=this.resolve(n),i=r?0:s.sharedDepth(n),a=s.start(i),c=s.node(i).content.cut(s.pos-a,o.pos-a);return new _t(c,s.depth-i,o.depth-i)}replace(e,n,r){return hNe(this.resolve(e),this.resolve(n),r)}nodeAt(e){for(let n=this;;){let{index:r,offset:s}=n.content.findIndex(e);if(n=n.maybeChild(r),!n)return null;if(s==e||n.isText)return n;e-=s+1}}childAfter(e){let{index:n,offset:r}=this.content.findIndex(e);return{node:this.content.maybeChild(n),index:n,offset:r}}childBefore(e){if(e==0)return{node:null,index:0,offset:0};let{index:n,offset:r}=this.content.findIndex(e);if(r<e)return{node:this.content.child(n),index:n,offset:r};let s=this.content.child(n-1);return{node:s,index:n-1,offset:r-s.nodeSize}}resolve(e){return Pg.resolveCached(this,e)}resolveNoCache(e){return Pg.resolve(this,e)}rangeHasMark(e,n,r){let s=!1;return n>e&&this.nodesBetween(e,n,o=>(r.isInSet(o.marks)&&(s=!0),!s)),s}get isBlock(){return this.type.isBlock}get isTextblock(){return this.type.isTextblock}get inlineContent(){return this.type.inlineContent}get isInline(){return this.type.isInline}get isText(){return this.type.isText}get isLeaf(){return this.type.isLeaf}get isAtom(){return this.type.isAtom}toString(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);let e=this.type.name;return this.content.size&&(e+="("+this.content.toStringInner()+")"),ine(this.marks,e)}contentMatchAt(e){let n=this.type.contentMatch.matchFragment(this.content,0,e);if(!n)throw new Error("Called contentMatchAt on a node with invalid content");return n}canReplace(e,n,r=ct.empty,s=0,o=r.childCount){let i=this.contentMatchAt(e).matchFragment(r,s,o),a=i&&i.matchFragment(this.content,n);if(!a||!a.validEnd)return!1;for(let l=s;l<o;l++)if(!this.type.allowsMarks(r.child(l).marks))return!1;return!0}canReplaceWith(e,n,r,s){if(s&&!this.type.allowsMarks(s))return!1;let o=this.contentMatchAt(e).matchType(r),i=o&&o.matchFragment(this.content,n);return i?i.validEnd:!1}canAppend(e){return e.content.size?this.canReplace(this.childCount,this.childCount,e.content):this.type.compatibleContent(e.type)}check(){this.type.checkContent(this.content),this.type.checkAttrs(this.attrs);let e=vr.none;for(let n=0;n<this.marks.length;n++){let r=this.marks[n];r.type.checkAttrs(r.attrs),e=r.addToSet(e)}if(!vr.sameSet(e,this.marks))throw new RangeError(`Invalid collection of marks for node ${this.type.name}: ${this.marks.map(n=>n.type.name)}`);this.content.forEach(n=>n.check())}toJSON(){let e={type:this.type.name};for(let n in this.attrs){e.attrs=this.attrs;break}return this.content.size&&(e.content=this.content.toJSON()),this.marks.length&&(e.marks=this.marks.map(n=>n.toJSON())),e}static fromJSON(e,n){if(!n)throw new RangeError("Invalid input for Node.fromJSON");let r;if(n.marks){if(!Array.isArray(n.marks))throw new RangeError("Invalid mark data for Node.fromJSON");r=n.marks.map(e.markFromJSON)}if(n.type=="text"){if(typeof n.text!="string")throw new RangeError("Invalid text node in JSON");return e.text(n.text,r)}let s=ct.fromJSON(e,n.content),o=e.nodeType(n.type).create(n.attrs,s,r);return o.type.checkAttrs(o.attrs),o}};Ju.prototype.text=void 0;class z3 extends Ju{constructor(e,n,r,s){if(super(e,n,null,s),!r)throw new RangeError("Empty text nodes are not allowed");this.text=r}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):ine(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(e,n){return this.text.slice(e,n)}get nodeSize(){return this.text.length}mark(e){return e==this.marks?this:new z3(this.type,this.attrs,this.text,e)}withText(e){return e==this.text?this:new z3(this.type,this.attrs,e,this.marks)}cut(e=0,n=this.text.length){return e==0&&n==this.text.length?this:this.withText(this.text.slice(e,n))}eq(e){return this.sameMarkup(e)&&this.text==e.text}toJSON(){let e=super.toJSON();return e.text=this.text,e}}function ine(t,e){for(let n=t.length-1;n>=0;n--)e=t[n].type.name+"("+e+")";return e}class Uf{constructor(e){this.validEnd=e,this.next=[],this.wrapCache=[]}static parse(e,n){let r=new bNe(e,n);if(r.next==null)return Uf.empty;let s=ane(r);r.next&&r.err("Unexpected trailing text");let o=TNe(ENe(s));return MNe(o,r),o}matchType(e){for(let n=0;n<this.next.length;n++)if(this.next[n].type==e)return this.next[n].next;return null}matchFragment(e,n=0,r=e.childCount){let s=this;for(let o=n;s&&o<r;o++)s=s.matchType(e.child(o).type);return s}get inlineContent(){return this.next.length!=0&&this.next[0].type.isInline}get defaultType(){for(let e=0;e<this.next.length;e++){let{type:n}=this.next[e];if(!(n.isText||n.hasRequiredAttrs()))return n}return null}compatible(e){for(let n=0;n<this.next.length;n++)for(let r=0;r<e.next.length;r++)if(this.next[n].type==e.next[r].type)return!0;return!1}fillBefore(e,n=!1,r=0){let s=[this];function o(i,a){let l=i.matchFragment(e,r);if(l&&(!n||l.validEnd))return ct.from(a.map(c=>c.createAndFill()));for(let c=0;c<i.next.length;c++){let{type:u,next:f}=i.next[c];if(!(u.isText||u.hasRequiredAttrs())&&s.indexOf(f)==-1){s.push(f);let h=o(f,a.concat(u));if(h)return h}}return null}return o(this,[])}findWrapping(e){for(let r=0;r<this.wrapCache.length;r+=2)if(this.wrapCache[r]==e)return this.wrapCache[r+1];let n=this.computeWrapping(e);return this.wrapCache.push(e,n),n}computeWrapping(e){let n=Object.create(null),r=[{match:this,type:null,via:null}];for(;r.length;){let s=r.shift(),o=s.match;if(o.matchType(e)){let i=[];for(let a=s;a.type;a=a.via)i.push(a.type);return i.reverse()}for(let i=0;i<o.next.length;i++){let{type:a,next:l}=o.next[i];!a.isLeaf&&!a.hasRequiredAttrs()&&!(a.name in n)&&(!s.type||l.validEnd)&&(r.push({match:a.contentMatch,type:a,via:s}),n[a.name]=!0)}}return null}get edgeCount(){return this.next.length}edge(e){if(e>=this.next.length)throw new RangeError(`There's no ${e}th edge in this content match`);return this.next[e]}toString(){let e=[];function n(r){e.push(r);for(let s=0;s<r.next.length;s++)e.indexOf(r.next[s].next)==-1&&n(r.next[s].next)}return n(this),e.map((r,s)=>{let o=s+(r.validEnd?"*":" ")+" ";for(let i=0;i<r.next.length;i++)o+=(i?", ":"")+r.next[i].type.name+"->"+e.indexOf(r.next[i].next);return o}).join(`
`)}}Uf.empty=new Uf(!0);class bNe{constructor(e,n){this.string=e,this.nodeTypes=n,this.inline=null,this.pos=0,this.tokens=e.split(/\s*(?=\b|\W|$)/),this.tokens[this.tokens.length-1]==""&&this.tokens.pop(),this.tokens[0]==""&&this.tokens.shift()}get next(){return this.tokens[this.pos]}eat(e){return this.next==e&&(this.pos++||!0)}err(e){throw new SyntaxError(e+" (in content expression '"+this.string+"')")}}function ane(t){let e=[];do e.push(xNe(t));while(t.eat("|"));return e.length==1?e[0]:{type:"choice",exprs:e}}function xNe(t){let e=[];do e.push(wNe(t));while(t.next&&t.next!=")"&&t.next!="|");return e.length==1?e[0]:{type:"seq",exprs:e}}function wNe(t){let e=kNe(t);for(;;)if(t.eat("+"))e={type:"plus",expr:e};else if(t.eat("*"))e={type:"star",expr:e};else if(t.eat("?"))e={type:"opt",expr:e};else if(t.eat("{"))e=SNe(t,e);else break;return e}function ZB(t){/\D/.test(t.next)&&t.err("Expected number, got '"+t.next+"'");let e=Number(t.next);return t.pos++,e}function SNe(t,e){let n=ZB(t),r=n;return t.eat(",")&&(t.next!="}"?r=ZB(t):r=-1),t.eat("}")||t.err("Unclosed braced range"),{type:"range",min:n,max:r,expr:e}}function CNe(t,e){let n=t.nodeTypes,r=n[e];if(r)return[r];let s=[];for(let o in n){let i=n[o];i.isInGroup(e)&&s.push(i)}return s.length==0&&t.err("No node type or group '"+e+"' found"),s}function kNe(t){if(t.eat("(")){let e=ane(t);return t.eat(")")||t.err("Missing closing paren"),e}else if(/\W/.test(t.next))t.err("Unexpected token '"+t.next+"'");else{let e=CNe(t,t.next).map(n=>(t.inline==null?t.inline=n.isInline:t.inline!=n.isInline&&t.err("Mixing inline and block content"),{type:"name",value:n}));return t.pos++,e.length==1?e[0]:{type:"choice",exprs:e}}}function ENe(t){let e=[[]];return s(o(t,0),n()),e;function n(){return e.push([])-1}function r(i,a,l){let c={term:l,to:a};return e[i].push(c),c}function s(i,a){i.forEach(l=>l.to=a)}function o(i,a){if(i.type=="choice")return i.exprs.reduce((l,c)=>l.concat(o(c,a)),[]);if(i.type=="seq")for(let l=0;;l++){let c=o(i.exprs[l],a);if(l==i.exprs.length-1)return c;s(c,a=n())}else if(i.type=="star"){let l=n();return r(a,l),s(o(i.expr,l),l),[r(l)]}else if(i.type=="plus"){let l=n();return s(o(i.expr,a),l),s(o(i.expr,l),l),[r(l)]}else{if(i.type=="opt")return[r(a)].concat(o(i.expr,a));if(i.type=="range"){let l=a;for(let c=0;c<i.min;c++){let u=n();s(o(i.expr,l),u),l=u}if(i.max==-1)s(o(i.expr,l),l);else for(let c=i.min;c<i.max;c++){let u=n();r(l,u),s(o(i.expr,l),u),l=u}return[r(l)]}else{if(i.type=="name")return[r(a,void 0,i.value)];throw new Error("Unknown expr type")}}}}function lne(t,e){return e-t}function QB(t,e){let n=[];return r(e),n.sort(lne);function r(s){let o=t[s];if(o.length==1&&!o[0].term)return r(o[0].to);n.push(s);for(let i=0;i<o.length;i++){let{term:a,to:l}=o[i];!a&&n.indexOf(l)==-1&&r(l)}}}function TNe(t){let e=Object.create(null);return n(QB(t,0));function n(r){let s=[];r.forEach(i=>{t[i].forEach(({term:a,to:l})=>{if(!a)return;let c;for(let u=0;u<s.length;u++)s[u][0]==a&&(c=s[u][1]);QB(t,l).forEach(u=>{c||s.push([a,c=[]]),c.indexOf(u)==-1&&c.push(u)})})});let o=e[r.join(",")]=new Uf(r.indexOf(t.length-1)>-1);for(let i=0;i<s.length;i++){let a=s[i][1].sort(lne);o.next.push({type:s[i][0],next:e[a.join(",")]||n(a)})}return o}}function MNe(t,e){for(let n=0,r=[t];n<r.length;n++){let s=r[n],o=!s.validEnd,i=[];for(let a=0;a<s.next.length;a++){let{type:l,next:c}=s.next[a];i.push(l.name),o&&!(l.isText||l.hasRequiredAttrs())&&(o=!1),r.indexOf(c)==-1&&r.push(c)}o&&e.err("Only non-generatable nodes ("+i.join(", ")+") in a required position (see https://prosemirror.net/docs/guide/#generatable)")}}function cne(t){let e=Object.create(null);for(let n in t){let r=t[n];if(!r.hasDefault)return null;e[n]=r.default}return e}function une(t,e){let n=Object.create(null);for(let r in t){let s=e&&e[r];if(s===void 0){let o=t[r];if(o.hasDefault)s=o.default;else throw new RangeError("No value supplied for attribute "+r)}n[r]=s}return n}function dne(t,e,n,r){for(let s in e)if(!(s in t))throw new RangeError(`Unsupported attribute ${s} for ${n} of type ${s}`);for(let s in t){let o=t[s];o.validate&&o.validate(e[s])}}function fne(t,e){let n=Object.create(null);if(e)for(let r in e)n[r]=new ANe(t,r,e[r]);return n}let JB=class pne{constructor(e,n,r){this.name=e,this.schema=n,this.spec=r,this.markSet=null,this.groups=r.group?r.group.split(" "):[],this.attrs=fne(e,r.attrs),this.defaultAttrs=cne(this.attrs),this.contentMatch=null,this.inlineContent=null,this.isBlock=!(r.inline||e=="text"),this.isText=e=="text"}get isInline(){return!this.isBlock}get isTextblock(){return this.isBlock&&this.inlineContent}get isLeaf(){return this.contentMatch==Uf.empty}get isAtom(){return this.isLeaf||!!this.spec.atom}isInGroup(e){return this.groups.indexOf(e)>-1}get whitespace(){return this.spec.whitespace||(this.spec.code?"pre":"normal")}hasRequiredAttrs(){for(let e in this.attrs)if(this.attrs[e].isRequired)return!0;return!1}compatibleContent(e){return this==e||this.contentMatch.compatible(e.contentMatch)}computeAttrs(e){return!e&&this.defaultAttrs?this.defaultAttrs:une(this.attrs,e)}create(e=null,n,r){if(this.isText)throw new Error("NodeType.create can't construct text nodes");return new Ju(this,this.computeAttrs(e),ct.from(n),vr.setFrom(r))}createChecked(e=null,n,r){return n=ct.from(n),this.checkContent(n),new Ju(this,this.computeAttrs(e),n,vr.setFrom(r))}createAndFill(e=null,n,r){if(e=this.computeAttrs(e),n=ct.from(n),n.size){let i=this.contentMatch.fillBefore(n);if(!i)return null;n=i.append(n)}let s=this.contentMatch.matchFragment(n),o=s&&s.fillBefore(ct.empty,!0);return o?new Ju(this,e,n.append(o),vr.setFrom(r)):null}validContent(e){let n=this.contentMatch.matchFragment(e);if(!n||!n.validEnd)return!1;for(let r=0;r<e.childCount;r++)if(!this.allowsMarks(e.child(r).marks))return!1;return!0}checkContent(e){if(!this.validContent(e))throw new RangeError(`Invalid content for node ${this.name}: ${e.toString().slice(0,50)}`)}checkAttrs(e){dne(this.attrs,e,"node",this.name)}allowsMarkType(e){return this.markSet==null||this.markSet.indexOf(e)>-1}allowsMarks(e){if(this.markSet==null)return!0;for(let n=0;n<e.length;n++)if(!this.allowsMarkType(e[n].type))return!1;return!0}allowedMarks(e){if(this.markSet==null)return e;let n;for(let r=0;r<e.length;r++)this.allowsMarkType(e[r].type)?n&&n.push(e[r]):n||(n=e.slice(0,r));return n?n.length?n:vr.none:e}static compile(e,n){let r=Object.create(null);e.forEach((o,i)=>r[o]=new pne(o,n,i));let s=n.spec.topNode||"doc";if(!r[s])throw new RangeError("Schema is missing its top node type ('"+s+"')");if(!r.text)throw new RangeError("Every schema needs a 'text' type");for(let o in r.text.attrs)throw new RangeError("The text node type should not have attributes");return r}};function jNe(t,e,n){let r=n.split("|");return s=>{let o=s===null?"null":typeof s;if(r.indexOf(o)<0)throw new RangeError(`Expected value of type ${r} for attribute ${e} on type ${t}, got ${o}`)}}class ANe{constructor(e,n,r){this.hasDefault=Object.prototype.hasOwnProperty.call(r,"default"),this.default=r.default,this.validate=typeof r.validate=="string"?jNe(e,n,r.validate):r.validate}get isRequired(){return!this.hasDefault}}class LS{constructor(e,n,r,s){this.name=e,this.rank=n,this.schema=r,this.spec=s,this.attrs=fne(e,s.attrs),this.excluded=null;let o=cne(this.attrs);this.instance=o?new vr(this,o):null}create(e=null){return!e&&this.instance?this.instance:new vr(this,une(this.attrs,e))}static compile(e,n){let r=Object.create(null),s=0;return e.forEach((o,i)=>r[o]=new LS(o,s++,n,i)),r}removeFromSet(e){for(var n=0;n<e.length;n++)e[n].type==this&&(e=e.slice(0,n).concat(e.slice(n+1)),n--);return e}isInSet(e){for(let n=0;n<e.length;n++)if(e[n].type==this)return e[n]}checkAttrs(e){dne(this.attrs,e,"mark",this.name)}excludes(e){return this.excluded.indexOf(e)>-1}}class hne{constructor(e){this.linebreakReplacement=null,this.cached=Object.create(null);let n=this.spec={};for(let s in e)n[s]=e[s];n.nodes=Gs.from(e.nodes),n.marks=Gs.from(e.marks||{}),this.nodes=JB.compile(this.spec.nodes,this),this.marks=LS.compile(this.spec.marks,this);let r=Object.create(null);for(let s in this.nodes){if(s in this.marks)throw new RangeError(s+" can not be both a node and a mark");let o=this.nodes[s],i=o.spec.content||"",a=o.spec.marks;if(o.contentMatch=r[i]||(r[i]=Uf.parse(i,this.nodes)),o.inlineContent=o.contentMatch.inlineContent,o.spec.linebreakReplacement){if(this.linebreakReplacement)throw new RangeError("Multiple linebreak nodes defined");if(!o.isInline||!o.isLeaf)throw new RangeError("Linebreak replacement nodes must be inline leaf nodes");this.linebreakReplacement=o}o.markSet=a=="_"?null:a?eH(this,a.split(" ")):a==""||!o.inlineContent?[]:null}for(let s in this.marks){let o=this.marks[s],i=o.spec.excludes;o.excluded=i==null?[o]:i==""?[]:eH(this,i.split(" "))}this.nodeFromJSON=s=>Ju.fromJSON(this,s),this.markFromJSON=s=>vr.fromJSON(this,s),this.topNodeType=this.nodes[this.spec.topNode||"doc"],this.cached.wrappings=Object.create(null)}node(e,n=null,r,s){if(typeof e=="string")e=this.nodeType(e);else if(e instanceof JB){if(e.schema!=this)throw new RangeError("Node type from different schema used ("+e.name+")")}else throw new RangeError("Invalid node type: "+e);return e.createChecked(n,r,s)}text(e,n){let r=this.nodes.text;return new z3(r,r.defaultAttrs,e,vr.setFrom(n))}mark(e,n){return typeof e=="string"&&(e=this.marks[e]),e.create(n)}nodeType(e){let n=this.nodes[e];if(!n)throw new RangeError("Unknown node type: "+e);return n}}function eH(t,e){let n=[];for(let r=0;r<e.length;r++){let s=e[r],o=t.marks[s],i=o;if(o)n.push(o);else for(let a in t.marks){let l=t.marks[a];(s=="_"||l.spec.group&&l.spec.group.split(" ").indexOf(s)>-1)&&n.push(i=l)}if(!i)throw new SyntaxError("Unknown mark type: '"+e[r]+"'")}return n}function _Ne(t){return t.tag!=null}function RNe(t){return t.style!=null}let Q0=class $T{constructor(e,n){this.schema=e,this.rules=n,this.tags=[],this.styles=[];let r=this.matchedStyles=[];n.forEach(s=>{if(_Ne(s))this.tags.push(s);else if(RNe(s)){let o=/[^=]*/.exec(s.style)[0];r.indexOf(o)<0&&r.push(o),this.styles.push(s)}}),this.normalizeLists=!this.tags.some(s=>{if(!/^(ul|ol)\b/.test(s.tag)||!s.node)return!1;let o=e.nodes[s.node];return o.contentMatch.matchType(o)})}parse(e,n={}){let r=new nH(this,n,!1);return r.addAll(e,vr.none,n.from,n.to),r.finish()}parseSlice(e,n={}){let r=new nH(this,n,!0);return r.addAll(e,vr.none,n.from,n.to),_t.maxOpen(r.finish())}matchTag(e,n,r){for(let s=r?this.tags.indexOf(r)+1:0;s<this.tags.length;s++){let o=this.tags[s];if(ONe(e,o.tag)&&(o.namespace===void 0||e.namespaceURI==o.namespace)&&(!o.context||n.matchesContext(o.context))){if(o.getAttrs){let i=o.getAttrs(e);if(i===!1)continue;o.attrs=i||void 0}return o}}}matchStyle(e,n,r,s){for(let o=s?this.styles.indexOf(s)+1:0;o<this.styles.length;o++){let i=this.styles[o],a=i.style;if(!(a.indexOf(e)!=0||i.context&&!r.matchesContext(i.context)||a.length>e.length&&(a.charCodeAt(e.length)!=61||a.slice(e.length+1)!=n))){if(i.getAttrs){let l=i.getAttrs(n);if(l===!1)continue;i.attrs=l||void 0}return i}}}static schemaRules(e){let n=[];function r(s){let o=s.priority==null?50:s.priority,i=0;for(;i<n.length;i++){let a=n[i];if((a.priority==null?50:a.priority)<o)break}n.splice(i,0,s)}for(let s in e.marks){let o=e.marks[s].spec.parseDOM;o&&o.forEach(i=>{r(i=rH(i)),i.mark||i.ignore||i.clearMark||(i.mark=s)})}for(let s in e.nodes){let o=e.nodes[s].spec.parseDOM;o&&o.forEach(i=>{r(i=rH(i)),i.node||i.ignore||i.mark||(i.node=s)})}return n}static fromSchema(e){return e.cached.domParser||(e.cached.domParser=new $T(e,$T.schemaRules(e)))}};const mne={address:!0,article:!0,aside:!0,blockquote:!0,canvas:!0,dd:!0,div:!0,dl:!0,fieldset:!0,figcaption:!0,figure:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,li:!0,noscript:!0,ol:!0,output:!0,p:!0,pre:!0,section:!0,table:!0,tfoot:!0,ul:!0},DNe={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},gne={ol:!0,ul:!0},Bg=1,FT=2,J0=4;function tH(t,e,n){return e!=null?(e?Bg:0)|(e==="full"?FT:0):t&&t.whitespace=="pre"?Bg|FT:n&~J0}class ab{constructor(e,n,r,s,o,i){this.type=e,this.attrs=n,this.marks=r,this.solid=s,this.options=i,this.content=[],this.activeMarks=vr.none,this.match=o||(i&J0?null:e.contentMatch)}findWrapping(e){if(!this.match){if(!this.type)return[];let n=this.type.contentMatch.fillBefore(ct.from(e));if(n)this.match=this.type.contentMatch.matchFragment(n);else{let r=this.type.contentMatch,s;return(s=r.findWrapping(e.type))?(this.match=r,s):null}}return this.match.findWrapping(e.type)}finish(e){if(!(this.options&Bg)){let r=this.content[this.content.length-1],s;if(r&&r.isText&&(s=/[ \t\r\n\u000c]+$/.exec(r.text))){let o=r;r.text.length==s[0].length?this.content.pop():this.content[this.content.length-1]=o.withText(o.text.slice(0,o.text.length-s[0].length))}}let n=ct.from(this.content);return!e&&this.match&&(n=n.append(this.match.fillBefore(ct.empty,!0))),this.type?this.type.create(this.attrs,n,this.marks):n}inlineContext(e){return this.type?this.type.inlineContent:this.content.length?this.content[0].isInline:e.parentNode&&!mne.hasOwnProperty(e.parentNode.nodeName.toLowerCase())}}class nH{constructor(e,n,r){this.parser=e,this.options=n,this.isOpen=r,this.open=0,this.localPreserveWS=!1;let s=n.topNode,o,i=tH(null,n.preserveWhitespace,0)|(r?J0:0);s?o=new ab(s.type,s.attrs,vr.none,!0,n.topMatch||s.type.contentMatch,i):r?o=new ab(null,null,vr.none,!0,null,i):o=new ab(e.schema.topNodeType,null,vr.none,!0,null,i),this.nodes=[o],this.find=n.findPositions,this.needsBlock=!1}get top(){return this.nodes[this.open]}addDOM(e,n){e.nodeType==3?this.addTextNode(e,n):e.nodeType==1&&this.addElement(e,n)}addTextNode(e,n){let r=e.nodeValue,s=this.top,o=s.options&FT?"full":this.localPreserveWS||(s.options&Bg)>0,{schema:i}=this.parser;if(o==="full"||s.inlineContext(e)||/[^ \t\r\n\u000c]/.test(r)){if(o)if(o==="full")r=r.replace(/\r\n?/g,`
`);else if(i.linebreakReplacement&&/[\r\n]/.test(r)&&this.top.findWrapping(i.linebreakReplacement.create())){let a=r.split(/\r?\n|\r/);for(let l=0;l<a.length;l++)l&&this.insertNode(i.linebreakReplacement.create(),n,!0),a[l]&&this.insertNode(i.text(a[l]),n,!/\S/.test(a[l]));r=""}else r=r.replace(/\r?\n|\r/g," ");else if(r=r.replace(/[ \t\r\n\u000c]+/g," "),/^[ \t\r\n\u000c]/.test(r)&&this.open==this.nodes.length-1){let a=s.content[s.content.length-1],l=e.previousSibling;(!a||l&&l.nodeName=="BR"||a.isText&&/[ \t\r\n\u000c]$/.test(a.text))&&(r=r.slice(1))}r&&this.insertNode(i.text(r),n,!/\S/.test(r)),this.findInText(e)}else this.findInside(e)}addElement(e,n,r){let s=this.localPreserveWS,o=this.top;(e.tagName=="PRE"||/pre/.test(e.style&&e.style.whiteSpace))&&(this.localPreserveWS=!0);let i=e.nodeName.toLowerCase(),a;gne.hasOwnProperty(i)&&this.parser.normalizeLists&&INe(e);let l=this.options.ruleFromNode&&this.options.ruleFromNode(e)||(a=this.parser.matchTag(e,this,r));e:if(l?l.ignore:DNe.hasOwnProperty(i))this.findInside(e),this.ignoreFallback(e,n);else if(!l||l.skip||l.closeParent){l&&l.closeParent?this.open=Math.max(0,this.open-1):l&&l.skip.nodeType&&(e=l.skip);let c,u=this.needsBlock;if(mne.hasOwnProperty(i))o.content.length&&o.content[0].isInline&&this.open&&(this.open--,o=this.top),c=!0,o.type||(this.needsBlock=!0);else if(!e.firstChild){this.leafFallback(e,n);break e}let f=l&&l.skip?n:this.readStyles(e,n);f&&this.addAll(e,f),c&&this.sync(o),this.needsBlock=u}else{let c=this.readStyles(e,n);c&&this.addElementByRule(e,l,c,l.consuming===!1?a:void 0)}this.localPreserveWS=s}leafFallback(e,n){e.nodeName=="BR"&&this.top.type&&this.top.type.inlineContent&&this.addTextNode(e.ownerDocument.createTextNode(`
`),n)}ignoreFallback(e,n){e.nodeName=="BR"&&(!this.top.type||!this.top.type.inlineContent)&&this.findPlace(this.parser.schema.text("-"),n,!0)}readStyles(e,n){let r=e.style;if(r&&r.length)for(let s=0;s<this.parser.matchedStyles.length;s++){let o=this.parser.matchedStyles[s],i=r.getPropertyValue(o);if(i)for(let a=void 0;;){let l=this.parser.matchStyle(o,i,this,a);if(!l)break;if(l.ignore)return null;if(l.clearMark?n=n.filter(c=>!l.clearMark(c)):n=n.concat(this.parser.schema.marks[l.mark].create(l.attrs)),l.consuming===!1)a=l;else break}}return n}addElementByRule(e,n,r,s){let o,i;if(n.node)if(i=this.parser.schema.nodes[n.node],i.isLeaf)this.insertNode(i.create(n.attrs),r,e.nodeName=="BR")||this.leafFallback(e,r);else{let l=this.enter(i,n.attrs||null,r,n.preserveWhitespace);l&&(o=!0,r=l)}else{let l=this.parser.schema.marks[n.mark];r=r.concat(l.create(n.attrs))}let a=this.top;if(i&&i.isLeaf)this.findInside(e);else if(s)this.addElement(e,r,s);else if(n.getContent)this.findInside(e),n.getContent(e,this.parser.schema).forEach(l=>this.insertNode(l,r,!1));else{let l=e;typeof n.contentElement=="string"?l=e.querySelector(n.contentElement):typeof n.contentElement=="function"?l=n.contentElement(e):n.contentElement&&(l=n.contentElement),this.findAround(e,l,!0),this.addAll(l,r),this.findAround(e,l,!1)}o&&this.sync(a)&&this.open--}addAll(e,n,r,s){let o=r||0;for(let i=r?e.childNodes[r]:e.firstChild,a=s==null?null:e.childNodes[s];i!=a;i=i.nextSibling,++o)this.findAtPoint(e,o),this.addDOM(i,n);this.findAtPoint(e,o)}findPlace(e,n,r){let s,o;for(let i=this.open,a=0;i>=0;i--){let l=this.nodes[i],c=l.findWrapping(e);if(c&&(!s||s.length>c.length+a)&&(s=c,o=l,!c.length))break;if(l.solid){if(r)break;a+=2}}if(!s)return null;this.sync(o);for(let i=0;i<s.length;i++)n=this.enterInner(s[i],null,n,!1);return n}insertNode(e,n,r){if(e.isInline&&this.needsBlock&&!this.top.type){let o=this.textblockFromContext();o&&(n=this.enterInner(o,null,n))}let s=this.findPlace(e,n,r);if(s){this.closeExtra();let o=this.top;o.match&&(o.match=o.match.matchType(e.type));let i=vr.none;for(let a of s.concat(e.marks))(o.type?o.type.allowsMarkType(a.type):sH(a.type,e.type))&&(i=a.addToSet(i));return o.content.push(e.mark(i)),!0}return!1}enter(e,n,r,s){let o=this.findPlace(e.create(n),r,!1);return o&&(o=this.enterInner(e,n,r,!0,s)),o}enterInner(e,n,r,s=!1,o){this.closeExtra();let i=this.top;i.match=i.match&&i.match.matchType(e);let a=tH(e,o,i.options);i.options&J0&&i.content.length==0&&(a|=J0);let l=vr.none;return r=r.filter(c=>(i.type?i.type.allowsMarkType(c.type):sH(c.type,e))?(l=c.addToSet(l),!1):!0),this.nodes.push(new ab(e,n,l,s,null,a)),this.open++,r}closeExtra(e=!1){let n=this.nodes.length-1;if(n>this.open){for(;n>this.open;n--)this.nodes[n-1].content.push(this.nodes[n].finish(e));this.nodes.length=this.open+1}}finish(){return this.open=0,this.closeExtra(this.isOpen),this.nodes[0].finish(!!(this.isOpen||this.options.topOpen))}sync(e){for(let n=this.open;n>=0;n--){if(this.nodes[n]==e)return this.open=n,!0;this.localPreserveWS&&(this.nodes[n].options|=Bg)}return!1}get currentPos(){this.closeExtra();let e=0;for(let n=this.open;n>=0;n--){let r=this.nodes[n].content;for(let s=r.length-1;s>=0;s--)e+=r[s].nodeSize;n&&e++}return e}findAtPoint(e,n){if(this.find)for(let r=0;r<this.find.length;r++)this.find[r].node==e&&this.find[r].offset==n&&(this.find[r].pos=this.currentPos)}findInside(e){if(this.find)for(let n=0;n<this.find.length;n++)this.find[n].pos==null&&e.nodeType==1&&e.contains(this.find[n].node)&&(this.find[n].pos=this.currentPos)}findAround(e,n,r){if(e!=n&&this.find)for(let s=0;s<this.find.length;s++)this.find[s].pos==null&&e.nodeType==1&&e.contains(this.find[s].node)&&n.compareDocumentPosition(this.find[s].node)&(r?2:4)&&(this.find[s].pos=this.currentPos)}findInText(e){if(this.find)for(let n=0;n<this.find.length;n++)this.find[n].node==e&&(this.find[n].pos=this.currentPos-(e.nodeValue.length-this.find[n].offset))}matchesContext(e){if(e.indexOf("|")>-1)return e.split(/\s*\|\s*/).some(this.matchesContext,this);let n=e.split("/"),r=this.options.context,s=!this.isOpen&&(!r||r.parent.type==this.nodes[0].type),o=-(r?r.depth+1:0)+(s?0:1),i=(a,l)=>{for(;a>=0;a--){let c=n[a];if(c==""){if(a==n.length-1||a==0)continue;for(;l>=o;l--)if(i(a-1,l))return!0;return!1}else{let u=l>0||l==0&&s?this.nodes[l].type:r&&l>=o?r.node(l-o).type:null;if(!u||u.name!=c&&!u.isInGroup(c))return!1;l--}}return!0};return i(n.length-1,this.open)}textblockFromContext(){let e=this.options.context;if(e)for(let n=e.depth;n>=0;n--){let r=e.node(n).contentMatchAt(e.indexAfter(n)).defaultType;if(r&&r.isTextblock&&r.defaultAttrs)return r}for(let n in this.parser.schema.nodes){let r=this.parser.schema.nodes[n];if(r.isTextblock&&r.defaultAttrs)return r}}}function INe(t){for(let e=t.firstChild,n=null;e;e=e.nextSibling){let r=e.nodeType==1?e.nodeName.toLowerCase():null;r&&gne.hasOwnProperty(r)&&n?(n.appendChild(e),e=n):r=="li"?n=e:r&&(n=null)}}function ONe(t,e){return(t.matches||t.msMatchesSelector||t.webkitMatchesSelector||t.mozMatchesSelector).call(t,e)}function rH(t){let e={};for(let n in t)e[n]=t[n];return e}function sH(t,e){let n=e.schema.nodes;for(let r in n){let s=n[r];if(!s.allowsMarkType(t))continue;let o=[],i=a=>{o.push(a);for(let l=0;l<a.edgeCount;l++){let{type:c,next:u}=a.edge(l);if(c==e||o.indexOf(u)<0&&i(u))return!0}};if(i(s.contentMatch))return!0}}class dp{constructor(e,n){this.nodes=e,this.marks=n}serializeFragment(e,n={},r){r||(r=Jk(n).createDocumentFragment());let s=r,o=[];return e.forEach(i=>{if(o.length||i.marks.length){let a=0,l=0;for(;a<o.length&&l<i.marks.length;){let c=i.marks[l];if(!this.marks[c.type.name]){l++;continue}if(!c.eq(o[a][0])||c.type.spec.spanning===!1)break;a++,l++}for(;a<o.length;)s=o.pop()[1];for(;l<i.marks.length;){let c=i.marks[l++],u=this.serializeMark(c,i.isInline,n);u&&(o.push([c,s]),s.appendChild(u.dom),s=u.contentDOM||u.dom)}}s.appendChild(this.serializeNodeInner(i,n))}),r}serializeNodeInner(e,n){let{dom:r,contentDOM:s}=Tx(Jk(n),this.nodes[e.type.name](e),null,e.attrs);if(s){if(e.isLeaf)throw new RangeError("Content hole not allowed in a leaf node spec");this.serializeFragment(e.content,n,s)}return r}serializeNode(e,n={}){let r=this.serializeNodeInner(e,n);for(let s=e.marks.length-1;s>=0;s--){let o=this.serializeMark(e.marks[s],e.isInline,n);o&&((o.contentDOM||o.dom).appendChild(r),r=o.dom)}return r}serializeMark(e,n,r={}){let s=this.marks[e.type.name];return s&&Tx(Jk(r),s(e,n),null,e.attrs)}static renderSpec(e,n,r=null,s){return Tx(e,n,r,s)}static fromSchema(e){return e.cached.domSerializer||(e.cached.domSerializer=new dp(this.nodesFromSchema(e),this.marksFromSchema(e)))}static nodesFromSchema(e){let n=oH(e.nodes);return n.text||(n.text=r=>r.text),n}static marksFromSchema(e){return oH(e.marks)}}function oH(t){let e={};for(let n in t){let r=t[n].spec.toDOM;r&&(e[n]=r)}return e}function Jk(t){return t.document||window.document}const iH=new WeakMap;function NNe(t){let e=iH.get(t);return e===void 0&&iH.set(t,e=LNe(t)),e}function LNe(t){let e=null;function n(r){if(r&&typeof r=="object")if(Array.isArray(r))if(typeof r[0]=="string")e||(e=[]),e.push(r);else for(let s=0;s<r.length;s++)n(r[s]);else for(let s in r)n(r[s])}return n(t),e}function Tx(t,e,n,r){if(typeof e=="string")return{dom:t.createTextNode(e)};if(e.nodeType!=null)return{dom:e};if(e.dom&&e.dom.nodeType!=null)return e;let s=e[0],o;if(typeof s!="string")throw new RangeError("Invalid array passed to renderSpec");if(r&&(o=NNe(r))&&o.indexOf(e)>-1)throw new RangeError("Using an array from an attribute object as a DOM spec. This may be an attempted cross site scripting attack.");let i=s.indexOf(" ");i>0&&(n=s.slice(0,i),s=s.slice(i+1));let a,l=n?t.createElementNS(n,s):t.createElement(s),c=e[1],u=1;if(c&&typeof c=="object"&&c.nodeType==null&&!Array.isArray(c)){u=2;for(let f in c)if(c[f]!=null){let h=f.indexOf(" ");h>0?l.setAttributeNS(f.slice(0,h),f.slice(h+1),c[f]):f=="style"&&l.style?l.style.cssText=c[f]:l.setAttribute(f,c[f])}}for(let f=u;f<e.length;f++){let h=e[f];if(h===0){if(f<e.length-1||f>u)throw new RangeError("Content hole must be the only child of its parent node");return{dom:l,contentDOM:l}}else{let{dom:m,contentDOM:y}=Tx(t,h,n,r);if(l.appendChild(m),y){if(a)throw new RangeError("Multiple content holes");a=y}}}return{dom:l,contentDOM:a}}const yne=65535,vne=Math.pow(2,16);function $Ne(t,e){return t+e*vne}function aH(t){return t&yne}function FNe(t){return(t-(t&yne))/vne}const bne=1,xne=2,Mx=4,wne=8;class zT{constructor(e,n,r){this.pos=e,this.delInfo=n,this.recover=r}get deleted(){return(this.delInfo&wne)>0}get deletedBefore(){return(this.delInfo&(bne|Mx))>0}get deletedAfter(){return(this.delInfo&(xne|Mx))>0}get deletedAcross(){return(this.delInfo&Mx)>0}}class mi{constructor(e,n=!1){if(this.ranges=e,this.inverted=n,!e.length&&mi.empty)return mi.empty}recover(e){let n=0,r=aH(e);if(!this.inverted)for(let s=0;s<r;s++)n+=this.ranges[s*3+2]-this.ranges[s*3+1];return this.ranges[r*3]+n+FNe(e)}mapResult(e,n=1){return this._map(e,n,!1)}map(e,n=1){return this._map(e,n,!0)}_map(e,n,r){let s=0,o=this.inverted?2:1,i=this.inverted?1:2;for(let a=0;a<this.ranges.length;a+=3){let l=this.ranges[a]-(this.inverted?s:0);if(l>e)break;let c=this.ranges[a+o],u=this.ranges[a+i],f=l+c;if(e<=f){let h=c?e==l?-1:e==f?1:n:n,m=l+s+(h<0?0:u);if(r)return m;let y=e==(n<0?l:f)?null:$Ne(a/3,e-l),v=e==l?xne:e==f?bne:Mx;return(n<0?e!=l:e!=f)&&(v|=wne),new zT(m,v,y)}s+=u-c}return r?e+s:new zT(e+s,0,null)}touches(e,n){let r=0,s=aH(n),o=this.inverted?2:1,i=this.inverted?1:2;for(let a=0;a<this.ranges.length;a+=3){let l=this.ranges[a]-(this.inverted?r:0);if(l>e)break;let c=this.ranges[a+o],u=l+c;if(e<=u&&a==s*3)return!0;r+=this.ranges[a+i]-c}return!1}forEach(e){let n=this.inverted?2:1,r=this.inverted?1:2;for(let s=0,o=0;s<this.ranges.length;s+=3){let i=this.ranges[s],a=i-(this.inverted?o:0),l=i+(this.inverted?0:o),c=this.ranges[s+n],u=this.ranges[s+r];e(a,a+c,l,l+u),o+=u-c}}invert(){return new mi(this.ranges,!this.inverted)}toString(){return(this.inverted?"-":"")+JSON.stringify(this.ranges)}static offset(e){return e==0?mi.empty:new mi(e<0?[0,-e,0]:[0,0,e])}}mi.empty=new mi([]);class Hg{constructor(e,n,r=0,s=e?e.length:0){this.mirror=n,this.from=r,this.to=s,this._maps=e||[],this.ownData=!(e||n)}get maps(){return this._maps}slice(e=0,n=this.maps.length){return new Hg(this._maps,this.mirror,e,n)}appendMap(e,n){this.ownData||(this._maps=this._maps.slice(),this.mirror=this.mirror&&this.mirror.slice(),this.ownData=!0),this.to=this._maps.push(e),n!=null&&this.setMirror(this._maps.length-1,n)}appendMapping(e){for(let n=0,r=this._maps.length;n<e._maps.length;n++){let s=e.getMirror(n);this.appendMap(e._maps[n],s!=null&&s<n?r+s:void 0)}}getMirror(e){if(this.mirror){for(let n=0;n<this.mirror.length;n++)if(this.mirror[n]==e)return this.mirror[n+(n%2?-1:1)]}}setMirror(e,n){this.mirror||(this.mirror=[]),this.mirror.push(e,n)}appendMappingInverted(e){for(let n=e.maps.length-1,r=this._maps.length+e._maps.length;n>=0;n--){let s=e.getMirror(n);this.appendMap(e._maps[n].invert(),s!=null&&s>n?r-s-1:void 0)}}invert(){let e=new Hg;return e.appendMappingInverted(this),e}map(e,n=1){if(this.mirror)return this._map(e,n,!0);for(let r=this.from;r<this.to;r++)e=this._maps[r].map(e,n);return e}mapResult(e,n=1){return this._map(e,n,!1)}_map(e,n,r){let s=0;for(let o=this.from;o<this.to;o++){let i=this._maps[o],a=i.mapResult(e,n);if(a.recover!=null){let l=this.getMirror(o);if(l!=null&&l>o&&l<this.to){o=l,e=this._maps[l].recover(a.recover);continue}}s|=a.delInfo,e=a.pos}return r?e:new zT(e,s,null)}}const e9=Object.create(null);class vo{getMap(){return mi.empty}merge(e){return null}static fromJSON(e,n){if(!n||!n.stepType)throw new RangeError("Invalid input for Step.fromJSON");let r=e9[n.stepType];if(!r)throw new RangeError(`No step type ${n.stepType} defined`);return r.fromJSON(e,n)}static jsonID(e,n){if(e in e9)throw new RangeError("Duplicate use of step JSON ID "+e);return e9[e]=n,n.prototype.jsonID=e,n}}class Ss{constructor(e,n){this.doc=e,this.failed=n}static ok(e){return new Ss(e,null)}static fail(e){return new Ss(null,e)}static fromReplace(e,n,r,s){try{return Ss.ok(e.replace(n,r,s))}catch(o){if(o instanceof L3)return Ss.fail(o.message);throw o}}}function UR(t,e,n){let r=[];for(let s=0;s<t.childCount;s++){let o=t.child(s);o.content.size&&(o=o.copy(UR(o.content,e,o))),o.isInline&&(o=e(o,n,s)),r.push(o)}return ct.fromArray(r)}class Wu extends vo{constructor(e,n,r){super(),this.from=e,this.to=n,this.mark=r}apply(e){let n=e.slice(this.from,this.to),r=e.resolve(this.from),s=r.node(r.sharedDepth(this.to)),o=new _t(UR(n.content,(i,a)=>!i.isAtom||!a.type.allowsMarkType(this.mark.type)?i:i.mark(this.mark.addToSet(i.marks)),s),n.openStart,n.openEnd);return Ss.fromReplace(e,this.from,this.to,o)}invert(){return new ka(this.from,this.to,this.mark)}map(e){let n=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return n.deleted&&r.deleted||n.pos>=r.pos?null:new Wu(n.pos,r.pos,this.mark)}merge(e){return e instanceof Wu&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new Wu(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark):null}toJSON(){return{stepType:"addMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(e,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for AddMarkStep.fromJSON");return new Wu(n.from,n.to,e.markFromJSON(n.mark))}}vo.jsonID("addMark",Wu);class ka extends vo{constructor(e,n,r){super(),this.from=e,this.to=n,this.mark=r}apply(e){let n=e.slice(this.from,this.to),r=new _t(UR(n.content,s=>s.mark(this.mark.removeFromSet(s.marks)),e),n.openStart,n.openEnd);return Ss.fromReplace(e,this.from,this.to,r)}invert(){return new Wu(this.from,this.to,this.mark)}map(e){let n=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return n.deleted&&r.deleted||n.pos>=r.pos?null:new ka(n.pos,r.pos,this.mark)}merge(e){return e instanceof ka&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new ka(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark):null}toJSON(){return{stepType:"removeMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(e,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for RemoveMarkStep.fromJSON");return new ka(n.from,n.to,e.markFromJSON(n.mark))}}vo.jsonID("removeMark",ka);class Yu extends vo{constructor(e,n){super(),this.pos=e,this.mark=n}apply(e){let n=e.nodeAt(this.pos);if(!n)return Ss.fail("No node at mark step's position");let r=n.type.create(n.attrs,null,this.mark.addToSet(n.marks));return Ss.fromReplace(e,this.pos,this.pos+1,new _t(ct.from(r),0,n.isLeaf?0:1))}invert(e){let n=e.nodeAt(this.pos);if(n){let r=this.mark.addToSet(n.marks);if(r.length==n.marks.length){for(let s=0;s<n.marks.length;s++)if(!n.marks[s].isInSet(r))return new Yu(this.pos,n.marks[s]);return new Yu(this.pos,this.mark)}}return new Vf(this.pos,this.mark)}map(e){let n=e.mapResult(this.pos,1);return n.deletedAfter?null:new Yu(n.pos,this.mark)}toJSON(){return{stepType:"addNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(e,n){if(typeof n.pos!="number")throw new RangeError("Invalid input for AddNodeMarkStep.fromJSON");return new Yu(n.pos,e.markFromJSON(n.mark))}}vo.jsonID("addNodeMark",Yu);class Vf extends vo{constructor(e,n){super(),this.pos=e,this.mark=n}apply(e){let n=e.nodeAt(this.pos);if(!n)return Ss.fail("No node at mark step's position");let r=n.type.create(n.attrs,null,this.mark.removeFromSet(n.marks));return Ss.fromReplace(e,this.pos,this.pos+1,new _t(ct.from(r),0,n.isLeaf?0:1))}invert(e){let n=e.nodeAt(this.pos);return!n||!this.mark.isInSet(n.marks)?this:new Yu(this.pos,this.mark)}map(e){let n=e.mapResult(this.pos,1);return n.deletedAfter?null:new Vf(n.pos,this.mark)}toJSON(){return{stepType:"removeNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(e,n){if(typeof n.pos!="number")throw new RangeError("Invalid input for RemoveNodeMarkStep.fromJSON");return new Vf(n.pos,e.markFromJSON(n.mark))}}vo.jsonID("removeNodeMark",Vf);class Os extends vo{constructor(e,n,r,s=!1){super(),this.from=e,this.to=n,this.slice=r,this.structure=s}apply(e){return this.structure&&PT(e,this.from,this.to)?Ss.fail("Structure replace would overwrite content"):Ss.fromReplace(e,this.from,this.to,this.slice)}getMap(){return new mi([this.from,this.to-this.from,this.slice.size])}invert(e){return new Os(this.from,this.from+this.slice.size,e.slice(this.from,this.to))}map(e){let n=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return n.deletedAcross&&r.deletedAcross?null:new Os(n.pos,Math.max(n.pos,r.pos),this.slice,this.structure)}merge(e){if(!(e instanceof Os)||e.structure||this.structure)return null;if(this.from+this.slice.size==e.from&&!this.slice.openEnd&&!e.slice.openStart){let n=this.slice.size+e.slice.size==0?_t.empty:new _t(this.slice.content.append(e.slice.content),this.slice.openStart,e.slice.openEnd);return new Os(this.from,this.to+(e.to-e.from),n,this.structure)}else if(e.to==this.from&&!this.slice.openStart&&!e.slice.openEnd){let n=this.slice.size+e.slice.size==0?_t.empty:new _t(e.slice.content.append(this.slice.content),e.slice.openStart,this.slice.openEnd);return new Os(e.from,this.to,n,this.structure)}else return null}toJSON(){let e={stepType:"replace",from:this.from,to:this.to};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}static fromJSON(e,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for ReplaceStep.fromJSON");return new Os(n.from,n.to,_t.fromJSON(e,n.slice),!!n.structure)}}vo.jsonID("replace",Os);class $s extends vo{constructor(e,n,r,s,o,i,a=!1){super(),this.from=e,this.to=n,this.gapFrom=r,this.gapTo=s,this.slice=o,this.insert=i,this.structure=a}apply(e){if(this.structure&&(PT(e,this.from,this.gapFrom)||PT(e,this.gapTo,this.to)))return Ss.fail("Structure gap-replace would overwrite content");let n=e.slice(this.gapFrom,this.gapTo);if(n.openStart||n.openEnd)return Ss.fail("Gap is not a flat range");let r=this.slice.insertAt(this.insert,n.content);return r?Ss.fromReplace(e,this.from,this.to,r):Ss.fail("Content does not fit in gap")}getMap(){return new mi([this.from,this.gapFrom-this.from,this.insert,this.gapTo,this.to-this.gapTo,this.slice.size-this.insert])}invert(e){let n=this.gapTo-this.gapFrom;return new $s(this.from,this.from+this.slice.size+n,this.from+this.insert,this.from+this.insert+n,e.slice(this.from,this.to).removeBetween(this.gapFrom-this.from,this.gapTo-this.from),this.gapFrom-this.from,this.structure)}map(e){let n=e.mapResult(this.from,1),r=e.mapResult(this.to,-1),s=this.from==this.gapFrom?n.pos:e.map(this.gapFrom,-1),o=this.to==this.gapTo?r.pos:e.map(this.gapTo,1);return n.deletedAcross&&r.deletedAcross||s<n.pos||o>r.pos?null:new $s(n.pos,r.pos,s,o,this.slice,this.insert,this.structure)}toJSON(){let e={stepType:"replaceAround",from:this.from,to:this.to,gapFrom:this.gapFrom,gapTo:this.gapTo,insert:this.insert};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}static fromJSON(e,n){if(typeof n.from!="number"||typeof n.to!="number"||typeof n.gapFrom!="number"||typeof n.gapTo!="number"||typeof n.insert!="number")throw new RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new $s(n.from,n.to,n.gapFrom,n.gapTo,_t.fromJSON(e,n.slice),n.insert,!!n.structure)}}vo.jsonID("replaceAround",$s);function PT(t,e,n){let r=t.resolve(e),s=n-e,o=r.depth;for(;s>0&&o>0&&r.indexAfter(o)==r.node(o).childCount;)o--,s--;if(s>0){let i=r.node(o).maybeChild(r.indexAfter(o));for(;s>0;){if(!i||i.isLeaf)return!0;i=i.firstChild,s--}}return!1}function zNe(t,e,n,r){let s=[],o=[],i,a;t.doc.nodesBetween(e,n,(l,c,u)=>{if(!l.isInline)return;let f=l.marks;if(!r.isInSet(f)&&u.type.allowsMarkType(r.type)){let h=Math.max(c,e),m=Math.min(c+l.nodeSize,n),y=r.addToSet(f);for(let v=0;v<f.length;v++)f[v].isInSet(y)||(i&&i.to==h&&i.mark.eq(f[v])?i.to=m:s.push(i=new ka(h,m,f[v])));a&&a.to==h?a.to=m:o.push(a=new Wu(h,m,r))}}),s.forEach(l=>t.step(l)),o.forEach(l=>t.step(l))}function PNe(t,e,n,r){let s=[],o=0;t.doc.nodesBetween(e,n,(i,a)=>{if(!i.isInline)return;o++;let l=null;if(r instanceof LS){let c=i.marks,u;for(;u=r.isInSet(c);)(l||(l=[])).push(u),c=u.removeFromSet(c)}else r?r.isInSet(i.marks)&&(l=[r]):l=i.marks;if(l&&l.length){let c=Math.min(a+i.nodeSize,n);for(let u=0;u<l.length;u++){let f=l[u],h;for(let m=0;m<s.length;m++){let y=s[m];y.step==o-1&&f.eq(s[m].style)&&(h=y)}h?(h.to=c,h.step=o):s.push({style:f,from:Math.max(a,e),to:c,step:o})}}}),s.forEach(i=>t.step(new ka(i.from,i.to,i.style)))}function VR(t,e,n,r=n.contentMatch,s=!0){let o=t.doc.nodeAt(e),i=[],a=e+1;for(let l=0;l<o.childCount;l++){let c=o.child(l),u=a+c.nodeSize,f=r.matchType(c.type);if(!f)i.push(new Os(a,u,_t.empty));else{r=f;for(let h=0;h<c.marks.length;h++)n.allowsMarkType(c.marks[h].type)||t.step(new ka(a,u,c.marks[h]));if(s&&c.isText&&n.whitespace!="pre"){let h,m=/\r?\n|\r/g,y;for(;h=m.exec(c.text);)y||(y=new _t(ct.from(n.schema.text(" ",n.allowedMarks(c.marks))),0,0)),i.push(new Os(a+h.index,a+h.index+h[0].length,y))}}a=u}if(!r.validEnd){let l=r.fillBefore(ct.empty,!0);t.replace(a,a,new _t(l,0,0))}for(let l=i.length-1;l>=0;l--)t.step(i[l])}function BNe(t,e,n){return(e==0||t.canReplace(e,t.childCount))&&(n==t.childCount||t.canReplace(0,n))}function Qm(t){let n=t.parent.content.cutByIndex(t.startIndex,t.endIndex);for(let r=t.depth,s=0,o=0;;--r){let i=t.$from.node(r),a=t.$from.index(r)+s,l=t.$to.indexAfter(r)-o;if(r<t.depth&&i.canReplace(a,l,n))return r;if(r==0||i.type.spec.isolating||!BNe(i,a,l))break;a&&(s=1),l<i.childCount&&(o=1)}return null}function HNe(t,e,n){let{$from:r,$to:s,depth:o}=e,i=r.before(o+1),a=s.after(o+1),l=i,c=a,u=ct.empty,f=0;for(let y=o,v=!1;y>n;y--)v||r.index(y)>0?(v=!0,u=ct.from(r.node(y).copy(u)),f++):l--;let h=ct.empty,m=0;for(let y=o,v=!1;y>n;y--)v||s.after(y+1)<s.end(y)?(v=!0,h=ct.from(s.node(y).copy(h)),m++):c++;t.step(new $s(l,c,i,a,new _t(u.append(h),f,m),u.size-f,!0))}function qR(t,e,n=null,r=t){let s=UNe(t,e),o=s&&VNe(r,e);return o?s.map(lH).concat({type:e,attrs:n}).concat(o.map(lH)):null}function lH(t){return{type:t,attrs:null}}function UNe(t,e){let{parent:n,startIndex:r,endIndex:s}=t,o=n.contentMatchAt(r).findWrapping(e);if(!o)return null;let i=o.length?o[0]:e;return n.canReplaceWith(r,s,i)?o:null}function VNe(t,e){let{parent:n,startIndex:r,endIndex:s}=t,o=n.child(r),i=e.contentMatch.findWrapping(o.type);if(!i)return null;let l=(i.length?i[i.length-1]:e).contentMatch;for(let c=r;l&&c<s;c++)l=l.matchType(n.child(c).type);return!l||!l.validEnd?null:i}function qNe(t,e,n){let r=ct.empty;for(let i=n.length-1;i>=0;i--){if(r.size){let a=n[i].type.contentMatch.matchFragment(r);if(!a||!a.validEnd)throw new RangeError("Wrapper type given to Transform.wrap does not form valid content of its parent wrapper")}r=ct.from(n[i].type.create(n[i].attrs,r))}let s=e.start,o=e.end;t.step(new $s(s,o,s,o,new _t(r,0,0),n.length,!0))}function WNe(t,e,n,r,s){if(!r.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock");let o=t.steps.length;t.doc.nodesBetween(e,n,(i,a)=>{let l=typeof s=="function"?s(i):s;if(i.isTextblock&&!i.hasMarkup(r,l)&&YNe(t.doc,t.mapping.slice(o).map(a),r)){let c=null;if(r.schema.linebreakReplacement){let m=r.whitespace=="pre",y=!!r.contentMatch.matchType(r.schema.linebreakReplacement);m&&!y?c=!1:!m&&y&&(c=!0)}c===!1&&Cne(t,i,a,o),VR(t,t.mapping.slice(o).map(a,1),r,void 0,c===null);let u=t.mapping.slice(o),f=u.map(a,1),h=u.map(a+i.nodeSize,1);return t.step(new $s(f,h,f+1,h-1,new _t(ct.from(r.create(l,null,i.marks)),0,0),1,!0)),c===!0&&Sne(t,i,a,o),!1}})}function Sne(t,e,n,r){e.forEach((s,o)=>{if(s.isText){let i,a=/\r?\n|\r/g;for(;i=a.exec(s.text);){let l=t.mapping.slice(r).map(n+1+o+i.index);t.replaceWith(l,l+1,e.type.schema.linebreakReplacement.create())}}})}function Cne(t,e,n,r){e.forEach((s,o)=>{if(s.type==s.type.schema.linebreakReplacement){let i=t.mapping.slice(r).map(n+1+o);t.replaceWith(i,i+1,e.type.schema.text(`
`))}})}function YNe(t,e,n){let r=t.resolve(e),s=r.index();return r.parent.canReplaceWith(s,s+1,n)}function GNe(t,e,n,r,s){let o=t.doc.nodeAt(e);if(!o)throw new RangeError("No node at given position");n||(n=o.type);let i=n.create(r,null,s||o.marks);if(o.isLeaf)return t.replaceWith(e,e+o.nodeSize,i);if(!n.validContent(o.content))throw new RangeError("Invalid content for node type "+n.name);t.step(new $s(e,e+o.nodeSize,e+1,e+o.nodeSize-1,new _t(ct.from(i),0,0),1,!0))}function wc(t,e,n=1,r){let s=t.resolve(e),o=s.depth-n,i=r&&r[r.length-1]||s.parent;if(o<0||s.parent.type.spec.isolating||!s.parent.canReplace(s.index(),s.parent.childCount)||!i.type.validContent(s.parent.content.cutByIndex(s.index(),s.parent.childCount)))return!1;for(let c=s.depth-1,u=n-2;c>o;c--,u--){let f=s.node(c),h=s.index(c);if(f.type.spec.isolating)return!1;let m=f.content.cutByIndex(h,f.childCount),y=r&&r[u+1];y&&(m=m.replaceChild(0,y.type.create(y.attrs)));let v=r&&r[u]||f;if(!f.canReplace(h+1,f.childCount)||!v.type.validContent(m))return!1}let a=s.indexAfter(o),l=r&&r[0];return s.node(o).canReplaceWith(a,a,l?l.type:s.node(o+1).type)}function KNe(t,e,n=1,r){let s=t.doc.resolve(e),o=ct.empty,i=ct.empty;for(let a=s.depth,l=s.depth-n,c=n-1;a>l;a--,c--){o=ct.from(s.node(a).copy(o));let u=r&&r[c];i=ct.from(u?u.type.create(u.attrs,i):s.node(a).copy(i))}t.step(new Os(e,e,new _t(o.append(i),n,n),!0))}function Dd(t,e){let n=t.resolve(e),r=n.index();return kne(n.nodeBefore,n.nodeAfter)&&n.parent.canReplace(r,r+1)}function XNe(t,e){e.content.size||t.type.compatibleContent(e.type);let n=t.contentMatchAt(t.childCount),{linebreakReplacement:r}=t.type.schema;for(let s=0;s<e.childCount;s++){let o=e.child(s),i=o.type==r?t.type.schema.nodes.text:o.type;if(n=n.matchType(i),!n||!t.type.allowsMarks(o.marks))return!1}return n.validEnd}function kne(t,e){return!!(t&&e&&!t.isLeaf&&XNe(t,e))}function $S(t,e,n=-1){let r=t.resolve(e);for(let s=r.depth;;s--){let o,i,a=r.index(s);if(s==r.depth?(o=r.nodeBefore,i=r.nodeAfter):n>0?(o=r.node(s+1),a++,i=r.node(s).maybeChild(a)):(o=r.node(s).maybeChild(a-1),i=r.node(s+1)),o&&!o.isTextblock&&kne(o,i)&&r.node(s).canReplace(a,a+1))return e;if(s==0)break;e=n<0?r.before(s):r.after(s)}}function ZNe(t,e,n){let r=null,{linebreakReplacement:s}=t.doc.type.schema,o=t.doc.resolve(e-n),i=o.node().type;if(s&&i.inlineContent){let u=i.whitespace=="pre",f=!!i.contentMatch.matchType(s);u&&!f?r=!1:!u&&f&&(r=!0)}let a=t.steps.length;if(r===!1){let u=t.doc.resolve(e+n);Cne(t,u.node(),u.before(),a)}i.inlineContent&&VR(t,e+n-1,i,o.node().contentMatchAt(o.index()),r==null);let l=t.mapping.slice(a),c=l.map(e-n);if(t.step(new Os(c,l.map(e+n,-1),_t.empty,!0)),r===!0){let u=t.doc.resolve(c);Sne(t,u.node(),u.before(),t.steps.length)}return t}function QNe(t,e,n){let r=t.resolve(e);if(r.parent.canReplaceWith(r.index(),r.index(),n))return e;if(r.parentOffset==0)for(let s=r.depth-1;s>=0;s--){let o=r.index(s);if(r.node(s).canReplaceWith(o,o,n))return r.before(s+1);if(o>0)return null}if(r.parentOffset==r.parent.content.size)for(let s=r.depth-1;s>=0;s--){let o=r.indexAfter(s);if(r.node(s).canReplaceWith(o,o,n))return r.after(s+1);if(o<r.node(s).childCount)return null}return null}function Ene(t,e,n){let r=t.resolve(e);if(!n.content.size)return e;let s=n.content;for(let o=0;o<n.openStart;o++)s=s.firstChild.content;for(let o=1;o<=(n.openStart==0&&n.size?2:1);o++)for(let i=r.depth;i>=0;i--){let a=i==r.depth?0:r.pos<=(r.start(i+1)+r.end(i+1))/2?-1:1,l=r.index(i)+(a>0?1:0),c=r.node(i),u=!1;if(o==1)u=c.canReplace(l,l,s);else{let f=c.contentMatchAt(l).findWrapping(s.firstChild.type);u=f&&c.canReplaceWith(l,l,f[0])}if(u)return a==0?r.pos:a<0?r.before(i+1):r.after(i+1)}return null}function FS(t,e,n=e,r=_t.empty){if(e==n&&!r.size)return null;let s=t.resolve(e),o=t.resolve(n);return Tne(s,o,r)?new Os(e,n,r):new JNe(s,o,r).fit()}function Tne(t,e,n){return!n.openStart&&!n.openEnd&&t.start()==e.start()&&t.parent.canReplace(t.index(),e.index(),n.content)}class JNe{constructor(e,n,r){this.$from=e,this.$to=n,this.unplaced=r,this.frontier=[],this.placed=ct.empty;for(let s=0;s<=e.depth;s++){let o=e.node(s);this.frontier.push({type:o.type,match:o.contentMatchAt(e.indexAfter(s))})}for(let s=e.depth;s>0;s--)this.placed=ct.from(e.node(s).copy(this.placed))}get depth(){return this.frontier.length-1}fit(){for(;this.unplaced.size;){let c=this.findFittable();c?this.placeNodes(c):this.openMore()||this.dropNode()}let e=this.mustMoveInline(),n=this.placed.size-this.depth-this.$from.depth,r=this.$from,s=this.close(e<0?this.$to:r.doc.resolve(e));if(!s)return null;let o=this.placed,i=r.depth,a=s.depth;for(;i&&a&&o.childCount==1;)o=o.firstChild.content,i--,a--;let l=new _t(o,i,a);return e>-1?new $s(r.pos,e,this.$to.pos,this.$to.end(),l,n):l.size||r.pos!=this.$to.pos?new Os(r.pos,s.pos,l):null}findFittable(){let e=this.unplaced.openStart;for(let n=this.unplaced.content,r=0,s=this.unplaced.openEnd;r<e;r++){let o=n.firstChild;if(n.childCount>1&&(s=0),o.type.spec.isolating&&s<=r){e=r;break}n=o.content}for(let n=1;n<=2;n++)for(let r=n==1?e:this.unplaced.openStart;r>=0;r--){let s,o=null;r?(o=t9(this.unplaced.content,r-1).firstChild,s=o.content):s=this.unplaced.content;let i=s.firstChild;for(let a=this.depth;a>=0;a--){let{type:l,match:c}=this.frontier[a],u,f=null;if(n==1&&(i?c.matchType(i.type)||(f=c.fillBefore(ct.from(i),!1)):o&&l.compatibleContent(o.type)))return{sliceDepth:r,frontierDepth:a,parent:o,inject:f};if(n==2&&i&&(u=c.findWrapping(i.type)))return{sliceDepth:r,frontierDepth:a,parent:o,wrap:u};if(o&&c.matchType(o.type))break}}}openMore(){let{content:e,openStart:n,openEnd:r}=this.unplaced,s=t9(e,n);return!s.childCount||s.firstChild.isLeaf?!1:(this.unplaced=new _t(e,n+1,Math.max(r,s.size+n>=e.size-r?n+1:0)),!0)}dropNode(){let{content:e,openStart:n,openEnd:r}=this.unplaced,s=t9(e,n);if(s.childCount<=1&&n>0){let o=e.size-n<=n+s.size;this.unplaced=new _t(R0(e,n-1,1),n-1,o?n-1:r)}else this.unplaced=new _t(R0(e,n,1),n,r)}placeNodes({sliceDepth:e,frontierDepth:n,parent:r,inject:s,wrap:o}){for(;this.depth>n;)this.closeFrontierNode();if(o)for(let v=0;v<o.length;v++)this.openFrontierNode(o[v]);let i=this.unplaced,a=r?r.content:i.content,l=i.openStart-e,c=0,u=[],{match:f,type:h}=this.frontier[n];if(s){for(let v=0;v<s.childCount;v++)u.push(s.child(v));f=f.matchFragment(s)}let m=a.size+e-(i.content.size-i.openEnd);for(;c<a.childCount;){let v=a.child(c),b=f.matchType(v.type);if(!b)break;c++,(c>1||l==0||v.content.size)&&(f=b,u.push(Mne(v.mark(h.allowedMarks(v.marks)),c==1?l:0,c==a.childCount?m:-1)))}let y=c==a.childCount;y||(m=-1),this.placed=D0(this.placed,n,ct.from(u)),this.frontier[n].match=f,y&&m<0&&r&&r.type==this.frontier[this.depth].type&&this.frontier.length>1&&this.closeFrontierNode();for(let v=0,b=a;v<m;v++){let w=b.lastChild;this.frontier.push({type:w.type,match:w.contentMatchAt(w.childCount)}),b=w.content}this.unplaced=y?e==0?_t.empty:new _t(R0(i.content,e-1,1),e-1,m<0?i.openEnd:e-1):new _t(R0(i.content,e,c),i.openStart,i.openEnd)}mustMoveInline(){if(!this.$to.parent.isTextblock)return-1;let e=this.frontier[this.depth],n;if(!e.type.isTextblock||!n9(this.$to,this.$to.depth,e.type,e.match,!1)||this.$to.depth==this.depth&&(n=this.findCloseLevel(this.$to))&&n.depth==this.depth)return-1;let{depth:r}=this.$to,s=this.$to.after(r);for(;r>1&&s==this.$to.end(--r);)++s;return s}findCloseLevel(e){e:for(let n=Math.min(this.depth,e.depth);n>=0;n--){let{match:r,type:s}=this.frontier[n],o=n<e.depth&&e.end(n+1)==e.pos+(e.depth-(n+1)),i=n9(e,n,s,r,o);if(i){for(let a=n-1;a>=0;a--){let{match:l,type:c}=this.frontier[a],u=n9(e,a,c,l,!0);if(!u||u.childCount)continue e}return{depth:n,fit:i,move:o?e.doc.resolve(e.after(n+1)):e}}}}close(e){let n=this.findCloseLevel(e);if(!n)return null;for(;this.depth>n.depth;)this.closeFrontierNode();n.fit.childCount&&(this.placed=D0(this.placed,n.depth,n.fit)),e=n.move;for(let r=n.depth+1;r<=e.depth;r++){let s=e.node(r),o=s.type.contentMatch.fillBefore(s.content,!0,e.index(r));this.openFrontierNode(s.type,s.attrs,o)}return e}openFrontierNode(e,n=null,r){let s=this.frontier[this.depth];s.match=s.match.matchType(e),this.placed=D0(this.placed,this.depth,ct.from(e.create(n,r))),this.frontier.push({type:e,match:e.contentMatch})}closeFrontierNode(){let n=this.frontier.pop().match.fillBefore(ct.empty,!0);n.childCount&&(this.placed=D0(this.placed,this.frontier.length,n))}}function R0(t,e,n){return e==0?t.cutByIndex(n,t.childCount):t.replaceChild(0,t.firstChild.copy(R0(t.firstChild.content,e-1,n)))}function D0(t,e,n){return e==0?t.append(n):t.replaceChild(t.childCount-1,t.lastChild.copy(D0(t.lastChild.content,e-1,n)))}function t9(t,e){for(let n=0;n<e;n++)t=t.firstChild.content;return t}function Mne(t,e,n){if(e<=0)return t;let r=t.content;return e>1&&(r=r.replaceChild(0,Mne(r.firstChild,e-1,r.childCount==1?n-1:0))),e>0&&(r=t.type.contentMatch.fillBefore(r).append(r),n<=0&&(r=r.append(t.type.contentMatch.matchFragment(r).fillBefore(ct.empty,!0)))),t.copy(r)}function n9(t,e,n,r,s){let o=t.node(e),i=s?t.indexAfter(e):t.index(e);if(i==o.childCount&&!n.compatibleContent(o.type))return null;let a=r.fillBefore(o.content,!0,i);return a&&!eLe(n,o.content,i)?a:null}function eLe(t,e,n){for(let r=n;r<e.childCount;r++)if(!t.allowsMarks(e.child(r).marks))return!0;return!1}function tLe(t){return t.spec.defining||t.spec.definingForContent}function nLe(t,e,n,r){if(!r.size)return t.deleteRange(e,n);let s=t.doc.resolve(e),o=t.doc.resolve(n);if(Tne(s,o,r))return t.step(new Os(e,n,r));let i=Ane(s,o);i[i.length-1]==0&&i.pop();let a=-(s.depth+1);i.unshift(a);for(let h=s.depth,m=s.pos-1;h>0;h--,m--){let y=s.node(h).type.spec;if(y.defining||y.definingAsContext||y.isolating)break;i.indexOf(h)>-1?a=h:s.before(h)==m&&i.splice(1,0,-h)}let l=i.indexOf(a),c=[],u=r.openStart;for(let h=r.content,m=0;;m++){let y=h.firstChild;if(c.push(y),m==r.openStart)break;h=y.content}for(let h=u-1;h>=0;h--){let m=c[h],y=tLe(m.type);if(y&&!m.sameMarkup(s.node(Math.abs(a)-1)))u=h;else if(y||!m.type.isTextblock)break}for(let h=r.openStart;h>=0;h--){let m=(h+u+1)%(r.openStart+1),y=c[m];if(y)for(let v=0;v<i.length;v++){let b=i[(v+l)%i.length],w=!0;b<0&&(w=!1,b=-b);let C=s.node(b-1),k=s.index(b-1);if(C.canReplaceWith(k,k,y.type,y.marks))return t.replace(s.before(b),w?o.after(b):n,new _t(jne(r.content,0,r.openStart,m),m,r.openEnd))}}let f=t.steps.length;for(let h=i.length-1;h>=0&&(t.replace(e,n,r),!(t.steps.length>f));h--){let m=i[h];m<0||(e=s.before(m),n=o.after(m))}}function jne(t,e,n,r,s){if(e<n){let o=t.firstChild;t=t.replaceChild(0,o.copy(jne(o.content,e+1,n,r,o)))}if(e>r){let o=s.contentMatchAt(0),i=o.fillBefore(t).append(t);t=i.append(o.matchFragment(i).fillBefore(ct.empty,!0))}return t}function rLe(t,e,n,r){if(!r.isInline&&e==n&&t.doc.resolve(e).parent.content.size){let s=QNe(t.doc,e,r.type);s!=null&&(e=n=s)}t.replaceRange(e,n,new _t(ct.from(r),0,0))}function sLe(t,e,n){let r=t.doc.resolve(e),s=t.doc.resolve(n),o=Ane(r,s);for(let i=0;i<o.length;i++){let a=o[i],l=i==o.length-1;if(l&&a==0||r.node(a).type.contentMatch.validEnd)return t.delete(r.start(a),s.end(a));if(a>0&&(l||r.node(a-1).canReplace(r.index(a-1),s.indexAfter(a-1))))return t.delete(r.before(a),s.after(a))}for(let i=1;i<=r.depth&&i<=s.depth;i++)if(e-r.start(i)==r.depth-i&&n>r.end(i)&&s.end(i)-n!=s.depth-i&&r.start(i-1)==s.start(i-1)&&r.node(i-1).canReplace(r.index(i-1),s.index(i-1)))return t.delete(r.before(i),n);t.delete(e,n)}function Ane(t,e){let n=[],r=Math.min(t.depth,e.depth);for(let s=r;s>=0;s--){let o=t.start(s);if(o<t.pos-(t.depth-s)||e.end(s)>e.pos+(e.depth-s)||t.node(s).type.spec.isolating||e.node(s).type.spec.isolating)break;(o==e.start(s)||s==t.depth&&s==e.depth&&t.parent.inlineContent&&e.parent.inlineContent&&s&&e.start(s-1)==o-1)&&n.push(s)}return n}class zh extends vo{constructor(e,n,r){super(),this.pos=e,this.attr=n,this.value=r}apply(e){let n=e.nodeAt(this.pos);if(!n)return Ss.fail("No node at attribute step's position");let r=Object.create(null);for(let o in n.attrs)r[o]=n.attrs[o];r[this.attr]=this.value;let s=n.type.create(r,null,n.marks);return Ss.fromReplace(e,this.pos,this.pos+1,new _t(ct.from(s),0,n.isLeaf?0:1))}getMap(){return mi.empty}invert(e){return new zh(this.pos,this.attr,e.nodeAt(this.pos).attrs[this.attr])}map(e){let n=e.mapResult(this.pos,1);return n.deletedAfter?null:new zh(n.pos,this.attr,this.value)}toJSON(){return{stepType:"attr",pos:this.pos,attr:this.attr,value:this.value}}static fromJSON(e,n){if(typeof n.pos!="number"||typeof n.attr!="string")throw new RangeError("Invalid input for AttrStep.fromJSON");return new zh(n.pos,n.attr,n.value)}}vo.jsonID("attr",zh);class Ug extends vo{constructor(e,n){super(),this.attr=e,this.value=n}apply(e){let n=Object.create(null);for(let s in e.attrs)n[s]=e.attrs[s];n[this.attr]=this.value;let r=e.type.create(n,e.content,e.marks);return Ss.ok(r)}getMap(){return mi.empty}invert(e){return new Ug(this.attr,e.attrs[this.attr])}map(e){return this}toJSON(){return{stepType:"docAttr",attr:this.attr,value:this.value}}static fromJSON(e,n){if(typeof n.attr!="string")throw new RangeError("Invalid input for DocAttrStep.fromJSON");return new Ug(n.attr,n.value)}}vo.jsonID("docAttr",Ug);let fm=class extends Error{};fm=function t(e){let n=Error.call(this,e);return n.__proto__=t.prototype,n};fm.prototype=Object.create(Error.prototype);fm.prototype.constructor=fm;fm.prototype.name="TransformError";class WR{constructor(e){this.doc=e,this.steps=[],this.docs=[],this.mapping=new Hg}get before(){return this.docs.length?this.docs[0]:this.doc}step(e){let n=this.maybeStep(e);if(n.failed)throw new fm(n.failed);return this}maybeStep(e){let n=e.apply(this.doc);return n.failed||this.addStep(e,n.doc),n}get docChanged(){return this.steps.length>0}changedRange(){let e=1e9,n=-1e9;for(let r=0;r<this.mapping.maps.length;r++){let s=this.mapping.maps[r];r&&(e=s.map(e,1),n=s.map(n,-1)),s.forEach((o,i,a,l)=>{e=Math.min(e,a),n=Math.max(n,l)})}return e==1e9?null:{from:e,to:n}}addStep(e,n){this.docs.push(this.doc),this.steps.push(e),this.mapping.appendMap(e.getMap()),this.doc=n}replace(e,n=e,r=_t.empty){let s=FS(this.doc,e,n,r);return s&&this.step(s),this}replaceWith(e,n,r){return this.replace(e,n,new _t(ct.from(r),0,0))}delete(e,n){return this.replace(e,n,_t.empty)}insert(e,n){return this.replaceWith(e,e,n)}replaceRange(e,n,r){return nLe(this,e,n,r),this}replaceRangeWith(e,n,r){return rLe(this,e,n,r),this}deleteRange(e,n){return sLe(this,e,n),this}lift(e,n){return HNe(this,e,n),this}join(e,n=1){return ZNe(this,e,n),this}wrap(e,n){return qNe(this,e,n),this}setBlockType(e,n=e,r,s=null){return WNe(this,e,n,r,s),this}setNodeMarkup(e,n,r=null,s){return GNe(this,e,n,r,s),this}setNodeAttribute(e,n,r){return this.step(new zh(e,n,r)),this}setDocAttribute(e,n){return this.step(new Ug(e,n)),this}addNodeMark(e,n){return this.step(new Yu(e,n)),this}removeNodeMark(e,n){let r=this.doc.nodeAt(e);if(!r)throw new RangeError("No node at position "+e);if(n instanceof vr)n.isInSet(r.marks)&&this.step(new Vf(e,n));else{let s=r.marks,o,i=[];for(;o=n.isInSet(s);)i.push(new Vf(e,o)),s=o.removeFromSet(s);for(let a=i.length-1;a>=0;a--)this.step(i[a])}return this}split(e,n=1,r){return KNe(this,e,n,r),this}addMark(e,n,r){return zNe(this,e,n,r),this}removeMark(e,n,r){return PNe(this,e,n,r),this}clearIncompatible(e,n,r){return VR(this,e,n,r),this}}const r9=Object.create(null);class hn{constructor(e,n,r){this.$anchor=e,this.$head=n,this.ranges=r||[new _ne(e.min(n),e.max(n))]}get anchor(){return this.$anchor.pos}get head(){return this.$head.pos}get from(){return this.$from.pos}get to(){return this.$to.pos}get $from(){return this.ranges[0].$from}get $to(){return this.ranges[0].$to}get empty(){let e=this.ranges;for(let n=0;n<e.length;n++)if(e[n].$from.pos!=e[n].$to.pos)return!1;return!0}content(){return this.$from.doc.slice(this.from,this.to,!0)}replace(e,n=_t.empty){let r=n.content.lastChild,s=null;for(let a=0;a<n.openEnd;a++)s=r,r=r.lastChild;let o=e.steps.length,i=this.ranges;for(let a=0;a<i.length;a++){let{$from:l,$to:c}=i[a],u=e.mapping.slice(o);e.replaceRange(u.map(l.pos),u.map(c.pos),a?_t.empty:n),a==0&&dH(e,o,(r?r.isInline:s&&s.isTextblock)?-1:1)}}replaceWith(e,n){let r=e.steps.length,s=this.ranges;for(let o=0;o<s.length;o++){let{$from:i,$to:a}=s[o],l=e.mapping.slice(r),c=l.map(i.pos),u=l.map(a.pos);o?e.deleteRange(c,u):(e.replaceRangeWith(c,u,n),dH(e,r,n.isInline?-1:1))}}static findFrom(e,n,r=!1){let s=e.parent.inlineContent?new ln(e):vh(e.node(0),e.parent,e.pos,e.index(),n,r);if(s)return s;for(let o=e.depth-1;o>=0;o--){let i=n<0?vh(e.node(0),e.node(o),e.before(o+1),e.index(o),n,r):vh(e.node(0),e.node(o),e.after(o+1),e.index(o)+1,n,r);if(i)return i}return null}static near(e,n=1){return this.findFrom(e,n)||this.findFrom(e,-n)||new wi(e.node(0))}static atStart(e){return vh(e,e,0,0,1)||new wi(e)}static atEnd(e){return vh(e,e,e.content.size,e.childCount,-1)||new wi(e)}static fromJSON(e,n){if(!n||!n.type)throw new RangeError("Invalid input for Selection.fromJSON");let r=r9[n.type];if(!r)throw new RangeError(`No selection type ${n.type} defined`);return r.fromJSON(e,n)}static jsonID(e,n){if(e in r9)throw new RangeError("Duplicate use of selection JSON ID "+e);return r9[e]=n,n.prototype.jsonID=e,n}getBookmark(){return ln.between(this.$anchor,this.$head).getBookmark()}}hn.prototype.visible=!0;class _ne{constructor(e,n){this.$from=e,this.$to=n}}let cH=!1;function uH(t){!cH&&!t.parent.inlineContent&&(cH=!0,console.warn("TextSelection endpoint not pointing into a node with inline content ("+t.parent.type.name+")"))}class ln extends hn{constructor(e,n=e){uH(e),uH(n),super(e,n)}get $cursor(){return this.$anchor.pos==this.$head.pos?this.$head:null}map(e,n){let r=e.resolve(n.map(this.head));if(!r.parent.inlineContent)return hn.near(r);let s=e.resolve(n.map(this.anchor));return new ln(s.parent.inlineContent?s:r,r)}replace(e,n=_t.empty){if(super.replace(e,n),n==_t.empty){let r=this.$from.marksAcross(this.$to);r&&e.ensureMarks(r)}}eq(e){return e instanceof ln&&e.anchor==this.anchor&&e.head==this.head}getBookmark(){return new zS(this.anchor,this.head)}toJSON(){return{type:"text",anchor:this.anchor,head:this.head}}static fromJSON(e,n){if(typeof n.anchor!="number"||typeof n.head!="number")throw new RangeError("Invalid input for TextSelection.fromJSON");return new ln(e.resolve(n.anchor),e.resolve(n.head))}static create(e,n,r=n){let s=e.resolve(n);return new this(s,r==n?s:e.resolve(r))}static between(e,n,r){let s=e.pos-n.pos;if((!r||s)&&(r=s>=0?1:-1),!n.parent.inlineContent){let o=hn.findFrom(n,r,!0)||hn.findFrom(n,-r,!0);if(o)n=o.$head;else return hn.near(n,r)}return e.parent.inlineContent||(s==0?e=n:(e=(hn.findFrom(e,-r,!0)||hn.findFrom(e,r,!0)).$anchor,e.pos<n.pos!=s<0&&(e=n))),new ln(e,n)}}hn.jsonID("text",ln);class zS{constructor(e,n){this.anchor=e,this.head=n}map(e){return new zS(e.map(this.anchor),e.map(this.head))}resolve(e){return ln.between(e.resolve(this.anchor),e.resolve(this.head))}}class Jt extends hn{constructor(e){let n=e.nodeAfter,r=e.node(0).resolve(e.pos+n.nodeSize);super(e,r),this.node=n}map(e,n){let{deleted:r,pos:s}=n.mapResult(this.anchor),o=e.resolve(s);return r?hn.near(o):new Jt(o)}content(){return new _t(ct.from(this.node),0,0)}eq(e){return e instanceof Jt&&e.anchor==this.anchor}toJSON(){return{type:"node",anchor:this.anchor}}getBookmark(){return new YR(this.anchor)}static fromJSON(e,n){if(typeof n.anchor!="number")throw new RangeError("Invalid input for NodeSelection.fromJSON");return new Jt(e.resolve(n.anchor))}static create(e,n){return new Jt(e.resolve(n))}static isSelectable(e){return!e.isText&&e.type.spec.selectable!==!1}}Jt.prototype.visible=!1;hn.jsonID("node",Jt);class YR{constructor(e){this.anchor=e}map(e){let{deleted:n,pos:r}=e.mapResult(this.anchor);return n?new zS(r,r):new YR(r)}resolve(e){let n=e.resolve(this.anchor),r=n.nodeAfter;return r&&Jt.isSelectable(r)?new Jt(n):hn.near(n)}}class wi extends hn{constructor(e){super(e.resolve(0),e.resolve(e.content.size))}replace(e,n=_t.empty){if(n==_t.empty){e.delete(0,e.doc.content.size);let r=hn.atStart(e.doc);r.eq(e.selection)||e.setSelection(r)}else super.replace(e,n)}toJSON(){return{type:"all"}}static fromJSON(e){return new wi(e)}map(e){return new wi(e)}eq(e){return e instanceof wi}getBookmark(){return oLe}}hn.jsonID("all",wi);const oLe={map(){return this},resolve(t){return new wi(t)}};function vh(t,e,n,r,s,o=!1){if(e.inlineContent)return ln.create(t,n);for(let i=r-(s>0?0:1);s>0?i<e.childCount:i>=0;i+=s){let a=e.child(i);if(a.isAtom){if(!o&&Jt.isSelectable(a))return Jt.create(t,n-(s<0?a.nodeSize:0))}else{let l=vh(t,a,n+s,s<0?a.childCount:0,s,o);if(l)return l}n+=a.nodeSize*s}return null}function dH(t,e,n){let r=t.steps.length-1;if(r<e)return;let s=t.steps[r];if(!(s instanceof Os||s instanceof $s))return;let o=t.mapping.maps[r],i;o.forEach((a,l,c,u)=>{i==null&&(i=u)}),t.setSelection(hn.near(t.doc.resolve(i),n))}const fH=1,lb=2,pH=4;class iLe extends WR{constructor(e){super(e.doc),this.curSelectionFor=0,this.updated=0,this.meta=Object.create(null),this.time=Date.now(),this.curSelection=e.selection,this.storedMarks=e.storedMarks}get selection(){return this.curSelectionFor<this.steps.length&&(this.curSelection=this.curSelection.map(this.doc,this.mapping.slice(this.curSelectionFor)),this.curSelectionFor=this.steps.length),this.curSelection}setSelection(e){if(e.$from.doc!=this.doc)throw new RangeError("Selection passed to setSelection must point at the current document");return this.curSelection=e,this.curSelectionFor=this.steps.length,this.updated=(this.updated|fH)&~lb,this.storedMarks=null,this}get selectionSet(){return(this.updated&fH)>0}setStoredMarks(e){return this.storedMarks=e,this.updated|=lb,this}ensureMarks(e){return vr.sameSet(this.storedMarks||this.selection.$from.marks(),e)||this.setStoredMarks(e),this}addStoredMark(e){return this.ensureMarks(e.addToSet(this.storedMarks||this.selection.$head.marks()))}removeStoredMark(e){return this.ensureMarks(e.removeFromSet(this.storedMarks||this.selection.$head.marks()))}get storedMarksSet(){return(this.updated&lb)>0}addStep(e,n){super.addStep(e,n),this.updated=this.updated&~lb,this.storedMarks=null}setTime(e){return this.time=e,this}replaceSelection(e){return this.selection.replace(this,e),this}replaceSelectionWith(e,n=!0){let r=this.selection;return n&&(e=e.mark(this.storedMarks||(r.empty?r.$from.marks():r.$from.marksAcross(r.$to)||vr.none))),r.replaceWith(this,e),this}deleteSelection(){return this.selection.replace(this),this}insertText(e,n,r){let s=this.doc.type.schema;if(n==null)return e?this.replaceSelectionWith(s.text(e),!0):this.deleteSelection();{if(r==null&&(r=n),!e)return this.deleteRange(n,r);let o=this.storedMarks;if(!o){let i=this.doc.resolve(n);o=r==n?i.marks():i.marksAcross(this.doc.resolve(r))}return this.replaceRangeWith(n,r,s.text(e,o)),!this.selection.empty&&this.selection.to==n+e.length&&this.setSelection(hn.near(this.selection.$to)),this}}setMeta(e,n){return this.meta[typeof e=="string"?e:e.key]=n,this}getMeta(e){return this.meta[typeof e=="string"?e:e.key]}get isGeneric(){for(let e in this.meta)return!1;return!0}scrollIntoView(){return this.updated|=pH,this}get scrolledIntoView(){return(this.updated&pH)>0}}function hH(t,e){return!e||!t?t:t.bind(e)}class I0{constructor(e,n,r){this.name=e,this.init=hH(n.init,r),this.apply=hH(n.apply,r)}}const aLe=[new I0("doc",{init(t){return t.doc||t.schema.topNodeType.createAndFill()},apply(t){return t.doc}}),new I0("selection",{init(t,e){return t.selection||hn.atStart(e.doc)},apply(t){return t.selection}}),new I0("storedMarks",{init(t){return t.storedMarks||null},apply(t,e,n,r){return r.selection.$cursor?t.storedMarks:null}}),new I0("scrollToSelection",{init(){return 0},apply(t,e){return t.scrolledIntoView?e+1:e}})];class s9{constructor(e,n){this.schema=e,this.plugins=[],this.pluginsByKey=Object.create(null),this.fields=aLe.slice(),n&&n.forEach(r=>{if(this.pluginsByKey[r.key])throw new RangeError("Adding different instances of a keyed plugin ("+r.key+")");this.plugins.push(r),this.pluginsByKey[r.key]=r,r.spec.state&&this.fields.push(new I0(r.key,r.spec.state,r))})}}class Th{constructor(e){this.config=e}get schema(){return this.config.schema}get plugins(){return this.config.plugins}apply(e){return this.applyTransaction(e).state}filterTransaction(e,n=-1){for(let r=0;r<this.config.plugins.length;r++)if(r!=n){let s=this.config.plugins[r];if(s.spec.filterTransaction&&!s.spec.filterTransaction.call(s,e,this))return!1}return!0}applyTransaction(e){if(!this.filterTransaction(e))return{state:this,transactions:[]};let n=[e],r=this.applyInner(e),s=null;for(;;){let o=!1;for(let i=0;i<this.config.plugins.length;i++){let a=this.config.plugins[i];if(a.spec.appendTransaction){let l=s?s[i].n:0,c=s?s[i].state:this,u=l<n.length&&a.spec.appendTransaction.call(a,l?n.slice(l):n,c,r);if(u&&r.filterTransaction(u,i)){if(u.setMeta("appendedTransaction",e),!s){s=[];for(let f=0;f<this.config.plugins.length;f++)s.push(f<i?{state:r,n:n.length}:{state:this,n:0})}n.push(u),r=r.applyInner(u),o=!0}s&&(s[i]={state:r,n:n.length})}}if(!o)return{state:r,transactions:n}}}applyInner(e){if(!e.before.eq(this.doc))throw new RangeError("Applying a mismatched transaction");let n=new Th(this.config),r=this.config.fields;for(let s=0;s<r.length;s++){let o=r[s];n[o.name]=o.apply(e,this[o.name],this,n)}return n}get tr(){return new iLe(this)}static create(e){let n=new s9(e.doc?e.doc.type.schema:e.schema,e.plugins),r=new Th(n);for(let s=0;s<n.fields.length;s++)r[n.fields[s].name]=n.fields[s].init(e,r);return r}reconfigure(e){let n=new s9(this.schema,e.plugins),r=n.fields,s=new Th(n);for(let o=0;o<r.length;o++){let i=r[o].name;s[i]=this.hasOwnProperty(i)?this[i]:r[o].init(e,s)}return s}toJSON(e){let n={doc:this.doc.toJSON(),selection:this.selection.toJSON()};if(this.storedMarks&&(n.storedMarks=this.storedMarks.map(r=>r.toJSON())),e&&typeof e=="object")for(let r in e){if(r=="doc"||r=="selection")throw new RangeError("The JSON fields `doc` and `selection` are reserved");let s=e[r],o=s.spec.state;o&&o.toJSON&&(n[r]=o.toJSON.call(s,this[s.key]))}return n}static fromJSON(e,n,r){if(!n)throw new RangeError("Invalid input for EditorState.fromJSON");if(!e.schema)throw new RangeError("Required config field 'schema' missing");let s=new s9(e.schema,e.plugins),o=new Th(s);return s.fields.forEach(i=>{if(i.name=="doc")o.doc=Ju.fromJSON(e.schema,n.doc);else if(i.name=="selection")o.selection=hn.fromJSON(o.doc,n.selection);else if(i.name=="storedMarks")n.storedMarks&&(o.storedMarks=n.storedMarks.map(e.schema.markFromJSON));else{if(r)for(let a in r){let l=r[a],c=l.spec.state;if(l.key==i.name&&c&&c.fromJSON&&Object.prototype.hasOwnProperty.call(n,a)){o[i.name]=c.fromJSON.call(l,e,n[a],o);return}}o[i.name]=i.init(e,o)}}),o}}function Rne(t,e,n){for(let r in t){let s=t[r];s instanceof Function?s=s.bind(e):r=="handleDOMEvents"&&(s=Rne(s,e,{})),n[r]=s}return n}class Sr{constructor(e){this.spec=e,this.props={},e.props&&Rne(e.props,this,this.props),this.key=e.key?e.key.key:Dne("plugin")}getState(e){return e[this.key]}}const o9=Object.create(null);function Dne(t){return t in o9?t+"$"+ ++o9[t]:(o9[t]=0,t+"$")}class Pr{constructor(e="key"){this.key=Dne(e)}get(e){return e.config.pluginsByKey[this.key]}getState(e){return e[this.key]}}const GR=(t,e)=>t.selection.empty?!1:(e&&e(t.tr.deleteSelection().scrollIntoView()),!0);function Ine(t,e){let{$cursor:n}=t.selection;return!n||(e?!e.endOfTextblock("backward",t):n.parentOffset>0)?null:n}const One=(t,e,n)=>{let r=Ine(t,n);if(!r)return!1;let s=KR(r);if(!s){let i=r.blockRange(),a=i&&Qm(i);return a==null?!1:(e&&e(t.tr.lift(i,a).scrollIntoView()),!0)}let o=s.nodeBefore;if(Une(t,s,e,-1))return!0;if(r.parent.content.size==0&&(pm(o,"end")||Jt.isSelectable(o)))for(let i=r.depth;;i--){let a=FS(t.doc,r.before(i),r.after(i),_t.empty);if(a&&a.slice.size<a.to-a.from){if(e){let l=t.tr.step(a);l.setSelection(pm(o,"end")?hn.findFrom(l.doc.resolve(l.mapping.map(s.pos,-1)),-1):Jt.create(l.doc,s.pos-o.nodeSize)),e(l.scrollIntoView())}return!0}if(i==1||r.node(i-1).childCount>1)break}return o.isAtom&&s.depth==r.depth-1?(e&&e(t.tr.delete(s.pos-o.nodeSize,s.pos).scrollIntoView()),!0):!1},lLe=(t,e,n)=>{let r=Ine(t,n);if(!r)return!1;let s=KR(r);return s?Nne(t,s,e):!1},cLe=(t,e,n)=>{let r=$ne(t,n);if(!r)return!1;let s=XR(r);return s?Nne(t,s,e):!1};function Nne(t,e,n){let r=e.nodeBefore,s=r,o=e.pos-1;for(;!s.isTextblock;o--){if(s.type.spec.isolating)return!1;let u=s.lastChild;if(!u)return!1;s=u}let i=e.nodeAfter,a=i,l=e.pos+1;for(;!a.isTextblock;l++){if(a.type.spec.isolating)return!1;let u=a.firstChild;if(!u)return!1;a=u}let c=FS(t.doc,o,l,_t.empty);if(!c||c.from!=o||c instanceof Os&&c.slice.size>=l-o)return!1;if(n){let u=t.tr.step(c);u.setSelection(ln.create(u.doc,o)),n(u.scrollIntoView())}return!0}function pm(t,e,n=!1){for(let r=t;r;r=e=="start"?r.firstChild:r.lastChild){if(r.isTextblock)return!0;if(n&&r.childCount!=1)return!1}return!1}const Lne=(t,e,n)=>{let{$head:r,empty:s}=t.selection,o=r;if(!s)return!1;if(r.parent.isTextblock){if(n?!n.endOfTextblock("backward",t):r.parentOffset>0)return!1;o=KR(r)}let i=o&&o.nodeBefore;return!i||!Jt.isSelectable(i)?!1:(e&&e(t.tr.setSelection(Jt.create(t.doc,o.pos-i.nodeSize)).scrollIntoView()),!0)};function KR(t){if(!t.parent.type.spec.isolating)for(let e=t.depth-1;e>=0;e--){if(t.index(e)>0)return t.doc.resolve(t.before(e+1));if(t.node(e).type.spec.isolating)break}return null}function $ne(t,e){let{$cursor:n}=t.selection;return!n||(e?!e.endOfTextblock("forward",t):n.parentOffset<n.parent.content.size)?null:n}const Fne=(t,e,n)=>{let r=$ne(t,n);if(!r)return!1;let s=XR(r);if(!s)return!1;let o=s.nodeAfter;if(Une(t,s,e,1))return!0;if(r.parent.content.size==0&&(pm(o,"start")||Jt.isSelectable(o))){let i=FS(t.doc,r.before(),r.after(),_t.empty);if(i&&i.slice.size<i.to-i.from){if(e){let a=t.tr.step(i);a.setSelection(pm(o,"start")?hn.findFrom(a.doc.resolve(a.mapping.map(s.pos)),1):Jt.create(a.doc,a.mapping.map(s.pos))),e(a.scrollIntoView())}return!0}}return o.isAtom&&s.depth==r.depth-1?(e&&e(t.tr.delete(s.pos,s.pos+o.nodeSize).scrollIntoView()),!0):!1},zne=(t,e,n)=>{let{$head:r,empty:s}=t.selection,o=r;if(!s)return!1;if(r.parent.isTextblock){if(n?!n.endOfTextblock("forward",t):r.parentOffset<r.parent.content.size)return!1;o=XR(r)}let i=o&&o.nodeAfter;return!i||!Jt.isSelectable(i)?!1:(e&&e(t.tr.setSelection(Jt.create(t.doc,o.pos)).scrollIntoView()),!0)};function XR(t){if(!t.parent.type.spec.isolating)for(let e=t.depth-1;e>=0;e--){let n=t.node(e);if(t.index(e)+1<n.childCount)return t.doc.resolve(t.after(e+1));if(n.type.spec.isolating)break}return null}const uLe=(t,e)=>{let n=t.selection,r=n instanceof Jt,s;if(r){if(n.node.isTextblock||!Dd(t.doc,n.from))return!1;s=n.from}else if(s=$S(t.doc,n.from,-1),s==null)return!1;if(e){let o=t.tr.join(s);r&&o.setSelection(Jt.create(o.doc,s-t.doc.resolve(s).nodeBefore.nodeSize)),e(o.scrollIntoView())}return!0},dLe=(t,e)=>{let n=t.selection,r;if(n instanceof Jt){if(n.node.isTextblock||!Dd(t.doc,n.to))return!1;r=n.to}else if(r=$S(t.doc,n.to,1),r==null)return!1;return e&&e(t.tr.join(r).scrollIntoView()),!0},fLe=(t,e)=>{let{$from:n,$to:r}=t.selection,s=n.blockRange(r),o=s&&Qm(s);return o==null?!1:(e&&e(t.tr.lift(s,o).scrollIntoView()),!0)},Pne=(t,e)=>{let{$head:n,$anchor:r}=t.selection;return!n.parent.type.spec.code||!n.sameParent(r)?!1:(e&&e(t.tr.insertText(`
`).scrollIntoView()),!0)};function ZR(t){for(let e=0;e<t.edgeCount;e++){let{type:n}=t.edge(e);if(n.isTextblock&&!n.hasRequiredAttrs())return n}return null}const pLe=(t,e)=>{let{$head:n,$anchor:r}=t.selection;if(!n.parent.type.spec.code||!n.sameParent(r))return!1;let s=n.node(-1),o=n.indexAfter(-1),i=ZR(s.contentMatchAt(o));if(!i||!s.canReplaceWith(o,o,i))return!1;if(e){let a=n.after(),l=t.tr.replaceWith(a,a,i.createAndFill());l.setSelection(hn.near(l.doc.resolve(a),1)),e(l.scrollIntoView())}return!0},Bne=(t,e)=>{let n=t.selection,{$from:r,$to:s}=n;if(n instanceof wi||r.parent.inlineContent||s.parent.inlineContent)return!1;let o=ZR(s.parent.contentMatchAt(s.indexAfter()));if(!o||!o.isTextblock)return!1;if(e){let i=(!r.parentOffset&&s.index()<s.parent.childCount?r:s).pos,a=t.tr.insert(i,o.createAndFill());a.setSelection(ln.create(a.doc,i+1)),e(a.scrollIntoView())}return!0},Hne=(t,e)=>{let{$cursor:n}=t.selection;if(!n||n.parent.content.size)return!1;if(n.depth>1&&n.after()!=n.end(-1)){let o=n.before();if(wc(t.doc,o))return e&&e(t.tr.split(o).scrollIntoView()),!0}let r=n.blockRange(),s=r&&Qm(r);return s==null?!1:(e&&e(t.tr.lift(r,s).scrollIntoView()),!0)};function hLe(t){return(e,n)=>{let{$from:r,$to:s}=e.selection;if(e.selection instanceof Jt&&e.selection.node.isBlock)return!r.parentOffset||!wc(e.doc,r.pos)?!1:(n&&n(e.tr.split(r.pos).scrollIntoView()),!0);if(!r.depth)return!1;let o=[],i,a,l=!1,c=!1;for(let m=r.depth;;m--)if(r.node(m).isBlock){l=r.end(m)==r.pos+(r.depth-m),c=r.start(m)==r.pos-(r.depth-m),a=ZR(r.node(m-1).contentMatchAt(r.indexAfter(m-1))),o.unshift(l&&a?{type:a}:null),i=m;break}else{if(m==1)return!1;o.unshift(null)}let u=e.tr;(e.selection instanceof ln||e.selection instanceof wi)&&u.deleteSelection();let f=u.mapping.map(r.pos),h=wc(u.doc,f,o.length,o);if(h||(o[0]=a?{type:a}:null,h=wc(u.doc,f,o.length,o)),!h)return!1;if(u.split(f,o.length,o),!l&&c&&r.node(i).type!=a){let m=u.mapping.map(r.before(i)),y=u.doc.resolve(m);a&&r.node(i-1).canReplaceWith(y.index(),y.index()+1,a)&&u.setNodeMarkup(u.mapping.map(r.before(i)),a)}return n&&n(u.scrollIntoView()),!0}}const mLe=hLe(),gLe=(t,e)=>{let{$from:n,to:r}=t.selection,s,o=n.sharedDepth(r);return o==0?!1:(s=n.before(o),e&&e(t.tr.setSelection(Jt.create(t.doc,s))),!0)};function yLe(t,e,n){let r=e.nodeBefore,s=e.nodeAfter,o=e.index();return!r||!s||!r.type.compatibleContent(s.type)?!1:!r.content.size&&e.parent.canReplace(o-1,o)?(n&&n(t.tr.delete(e.pos-r.nodeSize,e.pos).scrollIntoView()),!0):!e.parent.canReplace(o,o+1)||!(s.isTextblock||Dd(t.doc,e.pos))?!1:(n&&n(t.tr.join(e.pos).scrollIntoView()),!0)}function Une(t,e,n,r){let s=e.nodeBefore,o=e.nodeAfter,i,a,l=s.type.spec.isolating||o.type.spec.isolating;if(!l&&yLe(t,e,n))return!0;let c=!l&&e.parent.canReplace(e.index(),e.index()+1);if(c&&(i=(a=s.contentMatchAt(s.childCount)).findWrapping(o.type))&&a.matchType(i[0]||o.type).validEnd){if(n){let m=e.pos+o.nodeSize,y=ct.empty;for(let w=i.length-1;w>=0;w--)y=ct.from(i[w].create(null,y));y=ct.from(s.copy(y));let v=t.tr.step(new $s(e.pos-1,m,e.pos,m,new _t(y,1,0),i.length,!0)),b=v.doc.resolve(m+2*i.length);b.nodeAfter&&b.nodeAfter.type==s.type&&Dd(v.doc,b.pos)&&v.join(b.pos),n(v.scrollIntoView())}return!0}let u=o.type.spec.isolating||r>0&&l?null:hn.findFrom(e,1),f=u&&u.$from.blockRange(u.$to),h=f&&Qm(f);if(h!=null&&h>=e.depth)return n&&n(t.tr.lift(f,h).scrollIntoView()),!0;if(c&&pm(o,"start",!0)&&pm(s,"end")){let m=s,y=[];for(;y.push(m),!m.isTextblock;)m=m.lastChild;let v=o,b=1;for(;!v.isTextblock;v=v.firstChild)b++;if(m.canReplace(m.childCount,m.childCount,v.content)){if(n){let w=ct.empty;for(let k=y.length-1;k>=0;k--)w=ct.from(y[k].copy(w));let C=t.tr.step(new $s(e.pos-y.length,e.pos+o.nodeSize,e.pos+b,e.pos+o.nodeSize-b,new _t(w,y.length,0),0,!0));n(C.scrollIntoView())}return!0}}return!1}function Vne(t){return function(e,n){let r=e.selection,s=t<0?r.$from:r.$to,o=s.depth;for(;s.node(o).isInline;){if(!o)return!1;o--}return s.node(o).isTextblock?(n&&n(e.tr.setSelection(ln.create(e.doc,t<0?s.start(o):s.end(o)))),!0):!1}}const vLe=Vne(-1),bLe=Vne(1);function xLe(t,e=null){return function(n,r){let{$from:s,$to:o}=n.selection,i=s.blockRange(o),a=i&&qR(i,t,e);return a?(r&&r(n.tr.wrap(i,a).scrollIntoView()),!0):!1}}function mH(t,e=null){return function(n,r){let s=!1;for(let o=0;o<n.selection.ranges.length&&!s;o++){let{$from:{pos:i},$to:{pos:a}}=n.selection.ranges[o];n.doc.nodesBetween(i,a,(l,c)=>{if(s)return!1;if(!(!l.isTextblock||l.hasMarkup(t,e)))if(l.type==t)s=!0;else{let u=n.doc.resolve(c),f=u.index();s=u.parent.canReplaceWith(f,f+1,t)}})}if(!s)return!1;if(r){let o=n.tr;for(let i=0;i<n.selection.ranges.length;i++){let{$from:{pos:a},$to:{pos:l}}=n.selection.ranges[i];o.setBlockType(a,l,t,e)}r(o.scrollIntoView())}return!0}}function QR(...t){return function(e,n,r){for(let s=0;s<t.length;s++)if(t[s](e,n,r))return!0;return!1}}QR(GR,One,Lne);QR(GR,Fne,zne);QR(Pne,Bne,Hne,mLe);typeof navigator<"u"?/Mac|iP(hone|[oa]d)/.test(navigator.platform):typeof os<"u"&&os.platform&&os.platform()=="darwin";function wLe(t,e=null){return function(n,r){let{$from:s,$to:o}=n.selection,i=s.blockRange(o);if(!i)return!1;let a=r?n.tr:null;return SLe(a,i,t,e)?(r&&r(a.scrollIntoView()),!0):!1}}function SLe(t,e,n,r=null){let s=!1,o=e,i=e.$from.doc;if(e.depth>=2&&e.$from.node(e.depth-1).type.compatibleContent(n)&&e.startIndex==0){if(e.$from.index(e.depth-1)==0)return!1;let l=i.resolve(e.start-2);o=new F3(l,l,e.depth),e.endIndex<e.parent.childCount&&(e=new F3(e.$from,i.resolve(e.$to.end(e.depth)),e.depth)),s=!0}let a=qR(o,n,r,e);return a?(t&&CLe(t,e,a,s,n),!0):!1}function CLe(t,e,n,r,s){let o=ct.empty;for(let u=n.length-1;u>=0;u--)o=ct.from(n[u].type.create(n[u].attrs,o));t.step(new $s(e.start-(r?2:0),e.end,e.start,e.end,new _t(o,0,0),n.length,!0));let i=0;for(let u=0;u<n.length;u++)n[u].type==s&&(i=u+1);let a=n.length-i,l=e.start+n.length-(r?2:0),c=e.parent;for(let u=e.startIndex,f=e.endIndex,h=!0;u<f;u++,h=!1)!h&&wc(t.doc,l,a)&&(t.split(l,a),l+=2*a),l+=c.child(u).nodeSize;return t}function kLe(t){return function(e,n){let{$from:r,$to:s}=e.selection,o=r.blockRange(s,i=>i.childCount>0&&i.firstChild.type==t);return o?n?r.node(o.depth-1).type==t?ELe(e,n,t,o):TLe(e,n,o):!0:!1}}function ELe(t,e,n,r){let s=t.tr,o=r.end,i=r.$to.end(r.depth);o<i&&(s.step(new $s(o-1,i,o,i,new _t(ct.from(n.create(null,r.parent.copy())),1,0),1,!0)),r=new F3(s.doc.resolve(r.$from.pos),s.doc.resolve(i),r.depth));const a=Qm(r);if(a==null)return!1;s.lift(r,a);let l=s.doc.resolve(s.mapping.map(o,-1)-1);return Dd(s.doc,l.pos)&&l.nodeBefore.type==l.nodeAfter.type&&s.join(l.pos),e(s.scrollIntoView()),!0}function TLe(t,e,n){let r=t.tr,s=n.parent;for(let m=n.end,y=n.endIndex-1,v=n.startIndex;y>v;y--)m-=s.child(y).nodeSize,r.delete(m-1,m+1);let o=r.doc.resolve(n.start),i=o.nodeAfter;if(r.mapping.map(n.end)!=n.start+o.nodeAfter.nodeSize)return!1;let a=n.startIndex==0,l=n.endIndex==s.childCount,c=o.node(-1),u=o.index(-1);if(!c.canReplace(u+(a?0:1),u+1,i.content.append(l?ct.empty:ct.from(s))))return!1;let f=o.pos,h=f+i.nodeSize;return r.step(new $s(f-(a?1:0),h+(l?1:0),f+1,h-1,new _t((a?ct.empty:ct.from(s.copy(ct.empty))).append(l?ct.empty:ct.from(s.copy(ct.empty))),a?0:1,l?0:1),a?0:1)),e(r.scrollIntoView()),!0}function MLe(t){return function(e,n){let{$from:r,$to:s}=e.selection,o=r.blockRange(s,c=>c.childCount>0&&c.firstChild.type==t);if(!o)return!1;let i=o.startIndex;if(i==0)return!1;let a=o.parent,l=a.child(i-1);if(l.type!=t)return!1;if(n){let c=l.lastChild&&l.lastChild.type==a.type,u=ct.from(c?t.create():null),f=new _t(ct.from(t.create(null,ct.from(a.type.create(null,u)))),c?3:1,0),h=o.start,m=o.end;n(e.tr.step(new $s(h-(c?3:1),m,h,m,f,1,!0)).scrollIntoView())}return!0}}const Zs=function(t){for(var e=0;;e++)if(t=t.previousSibling,!t)return e},hm=function(t){let e=t.assignedSlot||t.parentNode;return e&&e.nodeType==11?e.host:e};let BT=null;const cc=function(t,e,n){let r=BT||(BT=document.createRange());return r.setEnd(t,n??t.nodeValue.length),r.setStart(t,e||0),r},jLe=function(){BT=null},qf=function(t,e,n,r){return n&&(gH(t,e,n,r,-1)||gH(t,e,n,r,1))},ALe=/^(img|br|input|textarea|hr)$/i;function gH(t,e,n,r,s){for(var o;;){if(t==n&&e==r)return!0;if(e==(s<0?0:Gi(t))){let i=t.parentNode;if(!i||i.nodeType!=1||ry(t)||ALe.test(t.nodeName)||t.contentEditable=="false")return!1;e=Zs(t)+(s<0?0:1),t=i}else if(t.nodeType==1){let i=t.childNodes[e+(s<0?-1:0)];if(i.nodeType==1&&i.contentEditable=="false")if(!((o=i.pmViewDesc)===null||o===void 0)&&o.ignoreForSelection)e+=s;else return!1;else t=i,e=s<0?Gi(t):0}else return!1}}function Gi(t){return t.nodeType==3?t.nodeValue.length:t.childNodes.length}function _Le(t,e){for(;;){if(t.nodeType==3&&e)return t;if(t.nodeType==1&&e>0){if(t.contentEditable=="false")return null;t=t.childNodes[e-1],e=Gi(t)}else if(t.parentNode&&!ry(t))e=Zs(t),t=t.parentNode;else return null}}function RLe(t,e){for(;;){if(t.nodeType==3&&e<t.nodeValue.length)return t;if(t.nodeType==1&&e<t.childNodes.length){if(t.contentEditable=="false")return null;t=t.childNodes[e],e=0}else if(t.parentNode&&!ry(t))e=Zs(t)+1,t=t.parentNode;else return null}}function DLe(t,e,n){for(let r=e==0,s=e==Gi(t);r||s;){if(t==n)return!0;let o=Zs(t);if(t=t.parentNode,!t)return!1;r=r&&o==0,s=s&&o==Gi(t)}}function ry(t){let e;for(let n=t;n&&!(e=n.pmViewDesc);n=n.parentNode);return e&&e.node&&e.node.isBlock&&(e.dom==t||e.contentDOM==t)}const PS=function(t){return t.focusNode&&qf(t.focusNode,t.focusOffset,t.anchorNode,t.anchorOffset)};function df(t,e){let n=document.createEvent("Event");return n.initEvent("keydown",!0,!0),n.keyCode=t,n.key=n.code=e,n}function ILe(t){let e=t.activeElement;for(;e&&e.shadowRoot;)e=e.shadowRoot.activeElement;return e}function OLe(t,e,n){if(t.caretPositionFromPoint)try{let r=t.caretPositionFromPoint(e,n);if(r)return{node:r.offsetNode,offset:Math.min(Gi(r.offsetNode),r.offset)}}catch{}if(t.caretRangeFromPoint){let r=t.caretRangeFromPoint(e,n);if(r)return{node:r.startContainer,offset:Math.min(Gi(r.startContainer),r.startOffset)}}}const Al=typeof navigator<"u"?navigator:null,yH=typeof document<"u"?document:null,Id=Al&&Al.userAgent||"",HT=/Edge\/(\d+)/.exec(Id),qne=/MSIE \d/.exec(Id),UT=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(Id),ti=!!(qne||UT||HT),ed=qne?document.documentMode:UT?+UT[1]:HT?+HT[1]:0,Zi=!ti&&/gecko\/(\d+)/i.test(Id);Zi&&+(/Firefox\/(\d+)/.exec(Id)||[0,0])[1];const VT=!ti&&/Chrome\/(\d+)/.exec(Id),to=!!VT,Wne=VT?+VT[1]:0,ho=!ti&&!!Al&&/Apple Computer/.test(Al.vendor),mm=ho&&(/Mobile\/\w+/.test(Id)||!!Al&&Al.maxTouchPoints>2),Vi=mm||(Al?/Mac/.test(Al.platform):!1),Yne=Al?/Win/.test(Al.platform):!1,pc=/Android \d/.test(Id),sy=!!yH&&"webkitFontSmoothing"in yH.documentElement.style,NLe=sy?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0;function LLe(t){let e=t.defaultView&&t.defaultView.visualViewport;return e?{left:0,right:e.width,top:0,bottom:e.height}:{left:0,right:t.documentElement.clientWidth,top:0,bottom:t.documentElement.clientHeight}}function rc(t,e){return typeof t=="number"?t:t[e]}function $Le(t){let e=t.getBoundingClientRect(),n=e.width/t.offsetWidth||1,r=e.height/t.offsetHeight||1;return{left:e.left,right:e.left+t.clientWidth*n,top:e.top,bottom:e.top+t.clientHeight*r}}function vH(t,e,n){let r=t.someProp("scrollThreshold")||0,s=t.someProp("scrollMargin")||5,o=t.dom.ownerDocument;for(let i=n||t.dom;i;){if(i.nodeType!=1){i=hm(i);continue}let a=i,l=a==o.body,c=l?LLe(o):$Le(a),u=0,f=0;if(e.top<c.top+rc(r,"top")?f=-(c.top-e.top+rc(s,"top")):e.bottom>c.bottom-rc(r,"bottom")&&(f=e.bottom-e.top>c.bottom-c.top?e.top+rc(s,"top")-c.top:e.bottom-c.bottom+rc(s,"bottom")),e.left<c.left+rc(r,"left")?u=-(c.left-e.left+rc(s,"left")):e.right>c.right-rc(r,"right")&&(u=e.right-c.right+rc(s,"right")),u||f)if(l)o.defaultView.scrollBy(u,f);else{let m=a.scrollLeft,y=a.scrollTop;f&&(a.scrollTop+=f),u&&(a.scrollLeft+=u);let v=a.scrollLeft-m,b=a.scrollTop-y;e={left:e.left-v,top:e.top-b,right:e.right-v,bottom:e.bottom-b}}let h=l?"fixed":getComputedStyle(i).position;if(/^(fixed|sticky)$/.test(h))break;i=h=="absolute"?i.offsetParent:hm(i)}}function FLe(t){let e=t.dom.getBoundingClientRect(),n=Math.max(0,e.top),r,s;for(let o=(e.left+e.right)/2,i=n+1;i<Math.min(innerHeight,e.bottom);i+=5){let a=t.root.elementFromPoint(o,i);if(!a||a==t.dom||!t.dom.contains(a))continue;let l=a.getBoundingClientRect();if(l.top>=n-20){r=a,s=l.top;break}}return{refDOM:r,refTop:s,stack:Gne(t.dom)}}function Gne(t){let e=[],n=t.ownerDocument;for(let r=t;r&&(e.push({dom:r,top:r.scrollTop,left:r.scrollLeft}),t!=n);r=hm(r));return e}function zLe({refDOM:t,refTop:e,stack:n}){let r=t?t.getBoundingClientRect().top:0;Kne(n,r==0?0:r-e)}function Kne(t,e){for(let n=0;n<t.length;n++){let{dom:r,top:s,left:o}=t[n];r.scrollTop!=s+e&&(r.scrollTop=s+e),r.scrollLeft!=o&&(r.scrollLeft=o)}}let lh=null;function PLe(t){if(t.setActive)return t.setActive();if(lh)return t.focus(lh);let e=Gne(t);t.focus(lh==null?{get preventScroll(){return lh={preventScroll:!0},!0}}:void 0),lh||(lh=!1,Kne(e,0))}function Xne(t,e){let n,r=2e8,s,o=0,i=e.top,a=e.top,l,c;for(let u=t.firstChild,f=0;u;u=u.nextSibling,f++){let h;if(u.nodeType==1)h=u.getClientRects();else if(u.nodeType==3)h=cc(u).getClientRects();else continue;for(let m=0;m<h.length;m++){let y=h[m];if(y.top<=i&&y.bottom>=a){i=Math.max(y.bottom,i),a=Math.min(y.top,a);let v=y.left>e.left?y.left-e.left:y.right<e.left?e.left-y.right:0;if(v<r){n=u,r=v,s=v&&n.nodeType==3?{left:y.right<e.left?y.right:y.left,top:e.top}:e,u.nodeType==1&&v&&(o=f+(e.left>=(y.left+y.right)/2?1:0));continue}}else y.top>e.top&&!l&&y.left<=e.left&&y.right>=e.left&&(l=u,c={left:Math.max(y.left,Math.min(y.right,e.left)),top:y.top});!n&&(e.left>=y.right&&e.top>=y.top||e.left>=y.left&&e.top>=y.bottom)&&(o=f+1)}}return!n&&l&&(n=l,s=c,r=0),n&&n.nodeType==3?BLe(n,s):!n||r&&n.nodeType==1?{node:t,offset:o}:Xne(n,s)}function BLe(t,e){let n=t.nodeValue.length,r=document.createRange(),s;for(let o=0;o<n;o++){r.setEnd(t,o+1),r.setStart(t,o);let i=ju(r,1);if(i.top!=i.bottom&&JR(e,i)){s={node:t,offset:o+(e.left>=(i.left+i.right)/2?1:0)};break}}return r.detach(),s||{node:t,offset:0}}function JR(t,e){return t.left>=e.left-1&&t.left<=e.right+1&&t.top>=e.top-1&&t.top<=e.bottom+1}function HLe(t,e){let n=t.parentNode;return n&&/^li$/i.test(n.nodeName)&&e.left<t.getBoundingClientRect().left?n:t}function ULe(t,e,n){let{node:r,offset:s}=Xne(e,n),o=-1;if(r.nodeType==1&&!r.firstChild){let i=r.getBoundingClientRect();o=i.left!=i.right&&n.left>(i.left+i.right)/2?1:-1}return t.docView.posFromDOM(r,s,o)}function VLe(t,e,n,r){let s=-1;for(let o=e,i=!1;o!=t.dom;){let a=t.docView.nearestDesc(o,!0),l;if(!a)return null;if(a.dom.nodeType==1&&(a.node.isBlock&&a.parent||!a.contentDOM)&&((l=a.dom.getBoundingClientRect()).width||l.height)&&(a.node.isBlock&&a.parent&&!/^T(R|BODY|HEAD|FOOT)$/.test(a.dom.nodeName)&&(!i&&l.left>r.left||l.top>r.top?s=a.posBefore:(!i&&l.right<r.left||l.bottom<r.top)&&(s=a.posAfter),i=!0),!a.contentDOM&&s<0&&!a.node.isText))return(a.node.isBlock?r.top<(l.top+l.bottom)/2:r.left<(l.left+l.right)/2)?a.posBefore:a.posAfter;o=a.dom.parentNode}return s>-1?s:t.docView.posFromDOM(e,n,-1)}function Zne(t,e,n){let r=t.childNodes.length;if(r&&n.top<n.bottom)for(let s=Math.max(0,Math.min(r-1,Math.floor(r*(e.top-n.top)/(n.bottom-n.top))-2)),o=s;;){let i=t.childNodes[o];if(i.nodeType==1){let a=i.getClientRects();for(let l=0;l<a.length;l++){let c=a[l];if(JR(e,c))return Zne(i,e,c)}}if((o=(o+1)%r)==s)break}return t}function qLe(t,e){let n=t.dom.ownerDocument,r,s=0,o=OLe(n,e.left,e.top);o&&({node:r,offset:s}=o);let i=(t.root.elementFromPoint?t.root:n).elementFromPoint(e.left,e.top),a;if(!i||!t.dom.contains(i.nodeType!=1?i.parentNode:i)){let c=t.dom.getBoundingClientRect();if(!JR(e,c)||(i=Zne(t.dom,e,c),!i))return null}if(ho)for(let c=i;r&&c;c=hm(c))c.draggable&&(r=void 0);if(i=HLe(i,e),r){if(Zi&&r.nodeType==1&&(s=Math.min(s,r.childNodes.length),s<r.childNodes.length)){let u=r.childNodes[s],f;u.nodeName=="IMG"&&(f=u.getBoundingClientRect()).right<=e.left&&f.bottom>e.top&&s++}let c;sy&&s&&r.nodeType==1&&(c=r.childNodes[s-1]).nodeType==1&&c.contentEditable=="false"&&c.getBoundingClientRect().top>=e.top&&s--,r==t.dom&&s==r.childNodes.length-1&&r.lastChild.nodeType==1&&e.top>r.lastChild.getBoundingClientRect().bottom?a=t.state.doc.content.size:(s==0||r.nodeType!=1||r.childNodes[s-1].nodeName!="BR")&&(a=VLe(t,r,s,e))}a==null&&(a=ULe(t,i,e));let l=t.docView.nearestDesc(i,!0);return{pos:a,inside:l?l.posAtStart-l.border:-1}}function bH(t){return t.top<t.bottom||t.left<t.right}function ju(t,e){let n=t.getClientRects();if(n.length){let r=n[e<0?0:n.length-1];if(bH(r))return r}return Array.prototype.find.call(n,bH)||t.getBoundingClientRect()}const WLe=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/;function Qne(t,e,n){let{node:r,offset:s,atom:o}=t.docView.domFromPos(e,n<0?-1:1),i=sy||Zi;if(r.nodeType==3)if(i&&(WLe.test(r.nodeValue)||(n<0?!s:s==r.nodeValue.length))){let l=ju(cc(r,s,s),n);if(Zi&&s&&/\s/.test(r.nodeValue[s-1])&&s<r.nodeValue.length){let c=ju(cc(r,s-1,s-1),-1);if(c.top==l.top){let u=ju(cc(r,s,s+1),-1);if(u.top!=l.top)return y0(u,u.left<c.left)}}return l}else{let l=s,c=s,u=n<0?1:-1;return n<0&&!s?(c++,u=-1):n>=0&&s==r.nodeValue.length?(l--,u=1):n<0?l--:c++,y0(ju(cc(r,l,c),u),u<0)}if(!t.state.doc.resolve(e-(o||0)).parent.inlineContent){if(o==null&&s&&(n<0||s==Gi(r))){let l=r.childNodes[s-1];if(l.nodeType==1)return i9(l.getBoundingClientRect(),!1)}if(o==null&&s<Gi(r)){let l=r.childNodes[s];if(l.nodeType==1)return i9(l.getBoundingClientRect(),!0)}return i9(r.getBoundingClientRect(),n>=0)}if(o==null&&s&&(n<0||s==Gi(r))){let l=r.childNodes[s-1],c=l.nodeType==3?cc(l,Gi(l)-(i?0:1)):l.nodeType==1&&(l.nodeName!="BR"||!l.nextSibling)?l:null;if(c)return y0(ju(c,1),!1)}if(o==null&&s<Gi(r)){let l=r.childNodes[s];for(;l.pmViewDesc&&l.pmViewDesc.ignoreForCoords;)l=l.nextSibling;let c=l?l.nodeType==3?cc(l,0,i?0:1):l.nodeType==1?l:null:null;if(c)return y0(ju(c,-1),!0)}return y0(ju(r.nodeType==3?cc(r):r,-n),n>=0)}function y0(t,e){if(t.width==0)return t;let n=e?t.left:t.right;return{top:t.top,bottom:t.bottom,left:n,right:n}}function i9(t,e){if(t.height==0)return t;let n=e?t.top:t.bottom;return{top:n,bottom:n,left:t.left,right:t.right}}function Jne(t,e,n){let r=t.state,s=t.root.activeElement;r!=e&&t.updateState(e),s!=t.dom&&t.focus();try{return n()}finally{r!=e&&t.updateState(r),s!=t.dom&&s&&s.focus()}}function YLe(t,e,n){let r=e.selection,s=n=="up"?r.$from:r.$to;return Jne(t,e,()=>{let{node:o}=t.docView.domFromPos(s.pos,n=="up"?-1:1);for(;;){let a=t.docView.nearestDesc(o,!0);if(!a)break;if(a.node.isBlock){o=a.contentDOM||a.dom;break}o=a.dom.parentNode}let i=Qne(t,s.pos,1);for(let a=o.firstChild;a;a=a.nextSibling){let l;if(a.nodeType==1)l=a.getClientRects();else if(a.nodeType==3)l=cc(a,0,a.nodeValue.length).getClientRects();else continue;for(let c=0;c<l.length;c++){let u=l[c];if(u.bottom>u.top+1&&(n=="up"?i.top-u.top>(u.bottom-i.top)*2:u.bottom-i.bottom>(i.bottom-u.top)*2))return!1}}return!0})}const GLe=/[\u0590-\u08ac]/;function KLe(t,e,n){let{$head:r}=e.selection;if(!r.parent.isTextblock)return!1;let s=r.parentOffset,o=!s,i=s==r.parent.content.size,a=t.domSelection();return a?!GLe.test(r.parent.textContent)||!a.modify?n=="left"||n=="backward"?o:i:Jne(t,e,()=>{let{focusNode:l,focusOffset:c,anchorNode:u,anchorOffset:f}=t.domSelectionRange(),h=a.caretBidiLevel;a.modify("move",n,"character");let m=r.depth?t.docView.domAfterPos(r.before()):t.dom,{focusNode:y,focusOffset:v}=t.domSelectionRange(),b=y&&!m.contains(y.nodeType==1?y:y.parentNode)||l==y&&c==v;try{a.collapse(u,f),l&&(l!=u||c!=f)&&a.extend&&a.extend(l,c)}catch{}return h!=null&&(a.caretBidiLevel=h),b}):r.pos==r.start()||r.pos==r.end()}let xH=null,wH=null,SH=!1;function XLe(t,e,n){return xH==e&&wH==n?SH:(xH=e,wH=n,SH=n=="up"||n=="down"?YLe(t,e,n):KLe(t,e,n))}const Qi=0,CH=1,vf=2,_l=3;class oy{constructor(e,n,r,s){this.parent=e,this.children=n,this.dom=r,this.contentDOM=s,this.dirty=Qi,r.pmViewDesc=this}matchesWidget(e){return!1}matchesMark(e){return!1}matchesNode(e,n,r){return!1}matchesHack(e){return!1}parseRule(){return null}stopEvent(e){return!1}get size(){let e=0;for(let n=0;n<this.children.length;n++)e+=this.children[n].size;return e}get border(){return 0}destroy(){this.parent=void 0,this.dom.pmViewDesc==this&&(this.dom.pmViewDesc=void 0);for(let e=0;e<this.children.length;e++)this.children[e].destroy()}posBeforeChild(e){for(let n=0,r=this.posAtStart;;n++){let s=this.children[n];if(s==e)return r;r+=s.size}}get posBefore(){return this.parent.posBeforeChild(this)}get posAtStart(){return this.parent?this.parent.posBeforeChild(this)+this.border:0}get posAfter(){return this.posBefore+this.size}get posAtEnd(){return this.posAtStart+this.size-2*this.border}localPosFromDOM(e,n,r){if(this.contentDOM&&this.contentDOM.contains(e.nodeType==1?e:e.parentNode))if(r<0){let o,i;if(e==this.contentDOM)o=e.childNodes[n-1];else{for(;e.parentNode!=this.contentDOM;)e=e.parentNode;o=e.previousSibling}for(;o&&!((i=o.pmViewDesc)&&i.parent==this);)o=o.previousSibling;return o?this.posBeforeChild(i)+i.size:this.posAtStart}else{let o,i;if(e==this.contentDOM)o=e.childNodes[n];else{for(;e.parentNode!=this.contentDOM;)e=e.parentNode;o=e.nextSibling}for(;o&&!((i=o.pmViewDesc)&&i.parent==this);)o=o.nextSibling;return o?this.posBeforeChild(i):this.posAtEnd}let s;if(e==this.dom&&this.contentDOM)s=n>Zs(this.contentDOM);else if(this.contentDOM&&this.contentDOM!=this.dom&&this.dom.contains(this.contentDOM))s=e.compareDocumentPosition(this.contentDOM)&2;else if(this.dom.firstChild){if(n==0)for(let o=e;;o=o.parentNode){if(o==this.dom){s=!1;break}if(o.previousSibling)break}if(s==null&&n==e.childNodes.length)for(let o=e;;o=o.parentNode){if(o==this.dom){s=!0;break}if(o.nextSibling)break}}return s??r>0?this.posAtEnd:this.posAtStart}nearestDesc(e,n=!1){for(let r=!0,s=e;s;s=s.parentNode){let o=this.getDesc(s),i;if(o&&(!n||o.node))if(r&&(i=o.nodeDOM)&&!(i.nodeType==1?i.contains(e.nodeType==1?e:e.parentNode):i==e))r=!1;else return o}}getDesc(e){let n=e.pmViewDesc;for(let r=n;r;r=r.parent)if(r==this)return n}posFromDOM(e,n,r){for(let s=e;s;s=s.parentNode){let o=this.getDesc(s);if(o)return o.localPosFromDOM(e,n,r)}return-1}descAt(e){for(let n=0,r=0;n<this.children.length;n++){let s=this.children[n],o=r+s.size;if(r==e&&o!=r){for(;!s.border&&s.children.length;)for(let i=0;i<s.children.length;i++){let a=s.children[i];if(a.size){s=a;break}}return s}if(e<o)return s.descAt(e-r-s.border);r=o}}domFromPos(e,n){if(!this.contentDOM)return{node:this.dom,offset:0,atom:e+1};let r=0,s=0;for(let o=0;r<this.children.length;r++){let i=this.children[r],a=o+i.size;if(a>e||i instanceof tre){s=e-o;break}o=a}if(s)return this.children[r].domFromPos(s-this.children[r].border,n);for(let o;r&&!(o=this.children[r-1]).size&&o instanceof ere&&o.side>=0;r--);if(n<=0){let o,i=!0;for(;o=r?this.children[r-1]:null,!(!o||o.dom.parentNode==this.contentDOM);r--,i=!1);return o&&n&&i&&!o.border&&!o.domAtom?o.domFromPos(o.size,n):{node:this.contentDOM,offset:o?Zs(o.dom)+1:0}}else{let o,i=!0;for(;o=r<this.children.length?this.children[r]:null,!(!o||o.dom.parentNode==this.contentDOM);r++,i=!1);return o&&i&&!o.border&&!o.domAtom?o.domFromPos(0,n):{node:this.contentDOM,offset:o?Zs(o.dom):this.contentDOM.childNodes.length}}}parseRange(e,n,r=0){if(this.children.length==0)return{node:this.contentDOM,from:e,to:n,fromOffset:0,toOffset:this.contentDOM.childNodes.length};let s=-1,o=-1;for(let i=r,a=0;;a++){let l=this.children[a],c=i+l.size;if(s==-1&&e<=c){let u=i+l.border;if(e>=u&&n<=c-l.border&&l.node&&l.contentDOM&&this.contentDOM.contains(l.contentDOM))return l.parseRange(e,n,u);e=i;for(let f=a;f>0;f--){let h=this.children[f-1];if(h.size&&h.dom.parentNode==this.contentDOM&&!h.emptyChildAt(1)){s=Zs(h.dom)+1;break}e-=h.size}s==-1&&(s=0)}if(s>-1&&(c>n||a==this.children.length-1)){n=c;for(let u=a+1;u<this.children.length;u++){let f=this.children[u];if(f.size&&f.dom.parentNode==this.contentDOM&&!f.emptyChildAt(-1)){o=Zs(f.dom);break}n+=f.size}o==-1&&(o=this.contentDOM.childNodes.length);break}i=c}return{node:this.contentDOM,from:e,to:n,fromOffset:s,toOffset:o}}emptyChildAt(e){if(this.border||!this.contentDOM||!this.children.length)return!1;let n=this.children[e<0?0:this.children.length-1];return n.size==0||n.emptyChildAt(e)}domAfterPos(e){let{node:n,offset:r}=this.domFromPos(e,0);if(n.nodeType!=1||r==n.childNodes.length)throw new RangeError("No node after pos "+e);return n.childNodes[r]}setSelection(e,n,r,s=!1){let o=Math.min(e,n),i=Math.max(e,n);for(let m=0,y=0;m<this.children.length;m++){let v=this.children[m],b=y+v.size;if(o>y&&i<b)return v.setSelection(e-y-v.border,n-y-v.border,r,s);y=b}let a=this.domFromPos(e,e?-1:1),l=n==e?a:this.domFromPos(n,n?-1:1),c=r.root.getSelection(),u=r.domSelectionRange(),f=!1;if((Zi||ho)&&e==n){let{node:m,offset:y}=a;if(m.nodeType==3){if(f=!!(y&&m.nodeValue[y-1]==`
`),f&&y==m.nodeValue.length)for(let v=m,b;v;v=v.parentNode){if(b=v.nextSibling){b.nodeName=="BR"&&(a=l={node:b.parentNode,offset:Zs(b)+1});break}let w=v.pmViewDesc;if(w&&w.node&&w.node.isBlock)break}}else{let v=m.childNodes[y-1];f=v&&(v.nodeName=="BR"||v.contentEditable=="false")}}if(Zi&&u.focusNode&&u.focusNode!=l.node&&u.focusNode.nodeType==1){let m=u.focusNode.childNodes[u.focusOffset];m&&m.contentEditable=="false"&&(s=!0)}if(!(s||f&&ho)&&qf(a.node,a.offset,u.anchorNode,u.anchorOffset)&&qf(l.node,l.offset,u.focusNode,u.focusOffset))return;let h=!1;if((c.extend||e==n)&&!(f&&Zi)){c.collapse(a.node,a.offset);try{e!=n&&c.extend(l.node,l.offset),h=!0}catch{}}if(!h){if(e>n){let y=a;a=l,l=y}let m=document.createRange();m.setEnd(l.node,l.offset),m.setStart(a.node,a.offset),c.removeAllRanges(),c.addRange(m)}}ignoreMutation(e){return!this.contentDOM&&e.type!="selection"}get contentLost(){return this.contentDOM&&this.contentDOM!=this.dom&&!this.dom.contains(this.contentDOM)}markDirty(e,n){for(let r=0,s=0;s<this.children.length;s++){let o=this.children[s],i=r+o.size;if(r==i?e<=i&&n>=r:e<i&&n>r){let a=r+o.border,l=i-o.border;if(e>=a&&n<=l){this.dirty=e==r||n==i?vf:CH,e==a&&n==l&&(o.contentLost||o.dom.parentNode!=this.contentDOM)?o.dirty=_l:o.markDirty(e-a,n-a);return}else o.dirty=o.dom==o.contentDOM&&o.dom.parentNode==this.contentDOM&&!o.children.length?vf:_l}r=i}this.dirty=vf}markParentsDirty(){let e=1;for(let n=this.parent;n;n=n.parent,e++){let r=e==1?vf:CH;n.dirty<r&&(n.dirty=r)}}get domAtom(){return!1}get ignoreForCoords(){return!1}get ignoreForSelection(){return!1}isText(e){return!1}}class ere extends oy{constructor(e,n,r,s){let o,i=n.type.toDOM;if(typeof i=="function"&&(i=i(r,()=>{if(!o)return s;if(o.parent)return o.parent.posBeforeChild(o)})),!n.type.spec.raw){if(i.nodeType!=1){let a=document.createElement("span");a.appendChild(i),i=a}i.contentEditable="false",i.classList.add("ProseMirror-widget")}super(e,[],i,null),this.widget=n,this.widget=n,o=this}matchesWidget(e){return this.dirty==Qi&&e.type.eq(this.widget.type)}parseRule(){return{ignore:!0}}stopEvent(e){let n=this.widget.spec.stopEvent;return n?n(e):!1}ignoreMutation(e){return e.type!="selection"||this.widget.spec.ignoreSelection}destroy(){this.widget.type.destroy(this.dom),super.destroy()}get domAtom(){return!0}get ignoreForSelection(){return!!this.widget.type.spec.relaxedSide}get side(){return this.widget.type.side}}class ZLe extends oy{constructor(e,n,r,s){super(e,[],n,null),this.textDOM=r,this.text=s}get size(){return this.text.length}localPosFromDOM(e,n){return e!=this.textDOM?this.posAtStart+(n?this.size:0):this.posAtStart+n}domFromPos(e){return{node:this.textDOM,offset:e}}ignoreMutation(e){return e.type==="characterData"&&e.target.nodeValue==e.oldValue}}class Wf extends oy{constructor(e,n,r,s,o){super(e,[],r,s),this.mark=n,this.spec=o}static create(e,n,r,s){let o=s.nodeViews[n.type.name],i=o&&o(n,s,r);return(!i||!i.dom)&&(i=dp.renderSpec(document,n.type.spec.toDOM(n,r),null,n.attrs)),new Wf(e,n,i.dom,i.contentDOM||i.dom,i)}parseRule(){return this.dirty&_l||this.mark.type.spec.reparseInView?null:{mark:this.mark.type.name,attrs:this.mark.attrs,contentElement:this.contentDOM}}matchesMark(e){return this.dirty!=_l&&this.mark.eq(e)}markDirty(e,n){if(super.markDirty(e,n),this.dirty!=Qi){let r=this.parent;for(;!r.node;)r=r.parent;r.dirty<this.dirty&&(r.dirty=this.dirty),this.dirty=Qi}}slice(e,n,r){let s=Wf.create(this.parent,this.mark,!0,r),o=this.children,i=this.size;n<i&&(o=WT(o,n,i,r)),e>0&&(o=WT(o,0,e,r));for(let a=0;a<o.length;a++)o[a].parent=s;return s.children=o,s}ignoreMutation(e){return this.spec.ignoreMutation?this.spec.ignoreMutation(e):super.ignoreMutation(e)}destroy(){this.spec.destroy&&this.spec.destroy(),super.destroy()}}class td extends oy{constructor(e,n,r,s,o,i,a,l,c){super(e,[],o,i),this.node=n,this.outerDeco=r,this.innerDeco=s,this.nodeDOM=a}static create(e,n,r,s,o,i){let a=o.nodeViews[n.type.name],l,c=a&&a(n,o,()=>{if(!l)return i;if(l.parent)return l.parent.posBeforeChild(l)},r,s),u=c&&c.dom,f=c&&c.contentDOM;if(n.isText){if(!u)u=document.createTextNode(n.text);else if(u.nodeType!=3)throw new RangeError("Text must be rendered as a DOM text node")}else u||({dom:u,contentDOM:f}=dp.renderSpec(document,n.type.spec.toDOM(n),null,n.attrs));!f&&!n.isText&&u.nodeName!="BR"&&(u.hasAttribute("contenteditable")||(u.contentEditable="false"),n.type.spec.draggable&&(u.draggable=!0));let h=u;return u=sre(u,r,n),c?l=new QLe(e,n,r,s,u,f||null,h,c,o,i+1):n.isText?new BS(e,n,r,s,u,h,o):new td(e,n,r,s,u,f||null,h,o,i+1)}parseRule(){if(this.node.type.spec.reparseInView)return null;let e={node:this.node.type.name,attrs:this.node.attrs};if(this.node.type.whitespace=="pre"&&(e.preserveWhitespace="full"),!this.contentDOM)e.getContent=()=>this.node.content;else if(!this.contentLost)e.contentElement=this.contentDOM;else{for(let n=this.children.length-1;n>=0;n--){let r=this.children[n];if(this.dom.contains(r.dom.parentNode)){e.contentElement=r.dom.parentNode;break}}e.contentElement||(e.getContent=()=>ct.empty)}return e}matchesNode(e,n,r){return this.dirty==Qi&&e.eq(this.node)&&P3(n,this.outerDeco)&&r.eq(this.innerDeco)}get size(){return this.node.nodeSize}get border(){return this.node.isLeaf?0:1}updateChildren(e,n){let r=this.node.inlineContent,s=n,o=e.composing?this.localCompositionInfo(e,n):null,i=o&&o.pos>-1?o:null,a=o&&o.pos<0,l=new e$e(this,i&&i.node,e);r$e(this.node,this.innerDeco,(c,u,f)=>{c.spec.marks?l.syncToMarks(c.spec.marks,r,e,u):c.type.side>=0&&!f&&l.syncToMarks(u==this.node.childCount?vr.none:this.node.child(u).marks,r,e,u),l.placeWidget(c,e,s)},(c,u,f,h)=>{l.syncToMarks(c.marks,r,e,h);let m;l.findNodeMatch(c,u,f,h)||a&&e.state.selection.from>s&&e.state.selection.to<s+c.nodeSize&&(m=l.findIndexWithChild(o.node))>-1&&l.updateNodeAt(c,u,f,m,e)||l.updateNextNode(c,u,f,e,h,s)||l.addNode(c,u,f,e,s),s+=c.nodeSize}),l.syncToMarks([],r,e,0),this.node.isTextblock&&l.addTextblockHacks(),l.destroyRest(),(l.changed||this.dirty==vf)&&(i&&this.protectLocalComposition(e,i),nre(this.contentDOM,this.children,e),mm&&s$e(this.dom))}localCompositionInfo(e,n){let{from:r,to:s}=e.state.selection;if(!(e.state.selection instanceof ln)||r<n||s>n+this.node.content.size)return null;let o=e.input.compositionNode;if(!o||!this.dom.contains(o.parentNode))return null;if(this.node.inlineContent){let i=o.nodeValue,a=o$e(this.node.content,i,r-n,s-n);return a<0?null:{node:o,pos:a,text:i}}else return{node:o,pos:-1,text:""}}protectLocalComposition(e,{node:n,pos:r,text:s}){if(this.getDesc(n))return;let o=n;for(;o.parentNode!=this.contentDOM;o=o.parentNode){for(;o.previousSibling;)o.parentNode.removeChild(o.previousSibling);for(;o.nextSibling;)o.parentNode.removeChild(o.nextSibling);o.pmViewDesc&&(o.pmViewDesc=void 0)}let i=new ZLe(this,o,n,s);e.input.compositionNodes.push(i),this.children=WT(this.children,r,r+s.length,e,i)}update(e,n,r,s){return this.dirty==_l||!e.sameMarkup(this.node)?!1:(this.updateInner(e,n,r,s),!0)}updateInner(e,n,r,s){this.updateOuterDeco(n),this.node=e,this.innerDeco=r,this.contentDOM&&this.updateChildren(s,this.posAtStart),this.dirty=Qi}updateOuterDeco(e){if(P3(e,this.outerDeco))return;let n=this.nodeDOM.nodeType!=1,r=this.dom;this.dom=rre(this.dom,this.nodeDOM,qT(this.outerDeco,this.node,n),qT(e,this.node,n)),this.dom!=r&&(r.pmViewDesc=void 0,this.dom.pmViewDesc=this),this.outerDeco=e}selectNode(){this.nodeDOM.nodeType==1&&(this.nodeDOM.classList.add("ProseMirror-selectednode"),(this.contentDOM||!this.node.type.spec.draggable)&&(this.nodeDOM.draggable=!0))}deselectNode(){this.nodeDOM.nodeType==1&&(this.nodeDOM.classList.remove("ProseMirror-selectednode"),(this.contentDOM||!this.node.type.spec.draggable)&&this.nodeDOM.removeAttribute("draggable"))}get domAtom(){return this.node.isAtom}}function kH(t,e,n,r,s){sre(r,e,t);let o=new td(void 0,t,e,n,r,r,r,s,0);return o.contentDOM&&o.updateChildren(s,0),o}class BS extends td{constructor(e,n,r,s,o,i,a){super(e,n,r,s,o,null,i,a,0)}parseRule(){let e=this.nodeDOM.parentNode;for(;e&&e!=this.dom&&!e.pmIsDeco;)e=e.parentNode;return{skip:e||!0}}update(e,n,r,s){return this.dirty==_l||this.dirty!=Qi&&!this.inParent()||!e.sameMarkup(this.node)?!1:(this.updateOuterDeco(n),(this.dirty!=Qi||e.text!=this.node.text)&&e.text!=this.nodeDOM.nodeValue&&(this.nodeDOM.nodeValue=e.text,s.trackWrites==this.nodeDOM&&(s.trackWrites=null)),this.node=e,this.dirty=Qi,!0)}inParent(){let e=this.parent.contentDOM;for(let n=this.nodeDOM;n;n=n.parentNode)if(n==e)return!0;return!1}domFromPos(e){return{node:this.nodeDOM,offset:e}}localPosFromDOM(e,n,r){return e==this.nodeDOM?this.posAtStart+Math.min(n,this.node.text.length):super.localPosFromDOM(e,n,r)}ignoreMutation(e){return e.type!="characterData"&&e.type!="selection"}slice(e,n,r){let s=this.node.cut(e,n),o=document.createTextNode(s.text);return new BS(this.parent,s,this.outerDeco,this.innerDeco,o,o,r)}markDirty(e,n){super.markDirty(e,n),this.dom!=this.nodeDOM&&(e==0||n==this.nodeDOM.nodeValue.length)&&(this.dirty=_l)}get domAtom(){return!1}isText(e){return this.node.text==e}}class tre extends oy{parseRule(){return{ignore:!0}}matchesHack(e){return this.dirty==Qi&&this.dom.nodeName==e}get domAtom(){return!0}get ignoreForCoords(){return this.dom.nodeName=="IMG"}}class QLe extends td{constructor(e,n,r,s,o,i,a,l,c,u){super(e,n,r,s,o,i,a,c,u),this.spec=l}update(e,n,r,s){if(this.dirty==_l)return!1;if(this.spec.update&&(this.node.type==e.type||this.spec.multiType)){let o=this.spec.update(e,n,r);return o&&this.updateInner(e,n,r,s),o}else return!this.contentDOM&&!e.isLeaf?!1:super.update(e,n,r,s)}selectNode(){this.spec.selectNode?this.spec.selectNode():super.selectNode()}deselectNode(){this.spec.deselectNode?this.spec.deselectNode():super.deselectNode()}setSelection(e,n,r,s){this.spec.setSelection?this.spec.setSelection(e,n,r.root):super.setSelection(e,n,r,s)}destroy(){this.spec.destroy&&this.spec.destroy(),super.destroy()}stopEvent(e){return this.spec.stopEvent?this.spec.stopEvent(e):!1}ignoreMutation(e){return this.spec.ignoreMutation?this.spec.ignoreMutation(e):super.ignoreMutation(e)}}function nre(t,e,n){let r=t.firstChild,s=!1;for(let o=0;o<e.length;o++){let i=e[o],a=i.dom;if(a.parentNode==t){for(;a!=r;)r=EH(r),s=!0;r=r.nextSibling}else s=!0,t.insertBefore(a,r);if(i instanceof Wf){let l=r?r.previousSibling:t.lastChild;nre(i.contentDOM,i.children,n),r=l?l.nextSibling:t.firstChild}}for(;r;)r=EH(r),s=!0;s&&n.trackWrites==t&&(n.trackWrites=null)}const eg=function(t){t&&(this.nodeName=t)};eg.prototype=Object.create(null);const bf=[new eg];function qT(t,e,n){if(t.length==0)return bf;let r=n?bf[0]:new eg,s=[r];for(let o=0;o<t.length;o++){let i=t[o].type.attrs;if(i){i.nodeName&&s.push(r=new eg(i.nodeName));for(let a in i){let l=i[a];l!=null&&(n&&s.length==1&&s.push(r=new eg(e.isInline?"span":"div")),a=="class"?r.class=(r.class?r.class+" ":"")+l:a=="style"?r.style=(r.style?r.style+";":"")+l:a!="nodeName"&&(r[a]=l))}}}return s}function rre(t,e,n,r){if(n==bf&&r==bf)return e;let s=e;for(let o=0;o<r.length;o++){let i=r[o],a=n[o];if(o){let l;a&&a.nodeName==i.nodeName&&s!=t&&(l=s.parentNode)&&l.nodeName.toLowerCase()==i.nodeName||(l=document.createElement(i.nodeName),l.pmIsDeco=!0,l.appendChild(s),a=bf[0]),s=l}JLe(s,a||bf[0],i)}return s}function JLe(t,e,n){for(let r in e)r!="class"&&r!="style"&&r!="nodeName"&&!(r in n)&&t.removeAttribute(r);for(let r in n)r!="class"&&r!="style"&&r!="nodeName"&&n[r]!=e[r]&&t.setAttribute(r,n[r]);if(e.class!=n.class){let r=e.class?e.class.split(" ").filter(Boolean):[],s=n.class?n.class.split(" ").filter(Boolean):[];for(let o=0;o<r.length;o++)s.indexOf(r[o])==-1&&t.classList.remove(r[o]);for(let o=0;o<s.length;o++)r.indexOf(s[o])==-1&&t.classList.add(s[o]);t.classList.length==0&&t.removeAttribute("class")}if(e.style!=n.style){if(e.style){let r=/\s*([\w\-\xa1-\uffff]+)\s*:(?:"(?:\\.|[^"])*"|'(?:\\.|[^'])*'|\(.*?\)|[^;])*/g,s;for(;s=r.exec(e.style);)t.style.removeProperty(s[1])}n.style&&(t.style.cssText+=n.style)}}function sre(t,e,n){return rre(t,t,bf,qT(e,n,t.nodeType!=1))}function P3(t,e){if(t.length!=e.length)return!1;for(let n=0;n<t.length;n++)if(!t[n].type.eq(e[n].type))return!1;return!0}function EH(t){let e=t.nextSibling;return t.parentNode.removeChild(t),e}class e$e{constructor(e,n,r){this.lock=n,this.view=r,this.index=0,this.stack=[],this.changed=!1,this.top=e,this.preMatch=t$e(e.node.content,e)}destroyBetween(e,n){if(e!=n){for(let r=e;r<n;r++)this.top.children[r].destroy();this.top.children.splice(e,n-e),this.changed=!0}}destroyRest(){this.destroyBetween(this.index,this.top.children.length)}syncToMarks(e,n,r,s){let o=0,i=this.stack.length>>1,a=Math.min(i,e.length);for(;o<a&&(o==i-1?this.top:this.stack[o+1<<1]).matchesMark(e[o])&&e[o].type.spec.spanning!==!1;)o++;for(;o<i;)this.destroyRest(),this.top.dirty=Qi,this.index=this.stack.pop(),this.top=this.stack.pop(),i--;for(;i<e.length;){this.stack.push(this.top,this.index+1);let l=-1,c=this.top.children.length;s<this.preMatch.index&&(c=Math.min(this.index+3,c));for(let u=this.index;u<c;u++){let f=this.top.children[u];if(f.matchesMark(e[i])&&!this.isLocked(f.dom)){l=u;break}}if(l>-1)l>this.index&&(this.changed=!0,this.destroyBetween(this.index,l)),this.top=this.top.children[this.index];else{let u=Wf.create(this.top,e[i],n,r);this.top.children.splice(this.index,0,u),this.top=u,this.changed=!0}this.index=0,i++}}findNodeMatch(e,n,r,s){let o=-1,i;if(s>=this.preMatch.index&&(i=this.preMatch.matches[s-this.preMatch.index]).parent==this.top&&i.matchesNode(e,n,r))o=this.top.children.indexOf(i,this.index);else for(let a=this.index,l=Math.min(this.top.children.length,a+5);a<l;a++){let c=this.top.children[a];if(c.matchesNode(e,n,r)&&!this.preMatch.matched.has(c)){o=a;break}}return o<0?!1:(this.destroyBetween(this.index,o),this.index++,!0)}updateNodeAt(e,n,r,s,o){let i=this.top.children[s];return i.dirty==_l&&i.dom==i.contentDOM&&(i.dirty=vf),i.update(e,n,r,o)?(this.destroyBetween(this.index,s),this.index++,!0):!1}findIndexWithChild(e){for(;;){let n=e.parentNode;if(!n)return-1;if(n==this.top.contentDOM){let r=e.pmViewDesc;if(r){for(let s=this.index;s<this.top.children.length;s++)if(this.top.children[s]==r)return s}return-1}e=n}}updateNextNode(e,n,r,s,o,i){for(let a=this.index;a<this.top.children.length;a++){let l=this.top.children[a];if(l instanceof td){let c=this.preMatch.matched.get(l);if(c!=null&&c!=o)return!1;let u=l.dom,f,h=this.isLocked(u)&&!(e.isText&&l.node&&l.node.isText&&l.nodeDOM.nodeValue==e.text&&l.dirty!=_l&&P3(n,l.outerDeco));if(!h&&l.update(e,n,r,s))return this.destroyBetween(this.index,a),l.dom!=u&&(this.changed=!0),this.index++,!0;if(!h&&(f=this.recreateWrapper(l,e,n,r,s,i)))return this.destroyBetween(this.index,a),this.top.children[this.index]=f,f.contentDOM&&(f.dirty=vf,f.updateChildren(s,i+1),f.dirty=Qi),this.changed=!0,this.index++,!0;break}}return!1}recreateWrapper(e,n,r,s,o,i){if(e.dirty||n.isAtom||!e.children.length||!e.node.content.eq(n.content)||!P3(r,e.outerDeco)||!s.eq(e.innerDeco))return null;let a=td.create(this.top,n,r,s,o,i);if(a.contentDOM){a.children=e.children,e.children=[];for(let l of a.children)l.parent=a}return e.destroy(),a}addNode(e,n,r,s,o){let i=td.create(this.top,e,n,r,s,o);i.contentDOM&&i.updateChildren(s,o+1),this.top.children.splice(this.index++,0,i),this.changed=!0}placeWidget(e,n,r){let s=this.index<this.top.children.length?this.top.children[this.index]:null;if(s&&s.matchesWidget(e)&&(e==s.widget||!s.widget.type.toDOM.parentNode))this.index++;else{let o=new ere(this.top,e,n,r);this.top.children.splice(this.index++,0,o),this.changed=!0}}addTextblockHacks(){let e=this.top.children[this.index-1],n=this.top;for(;e instanceof Wf;)n=e,e=n.children[n.children.length-1];(!e||!(e instanceof BS)||/\n$/.test(e.node.text)||this.view.requiresGeckoHackNode&&/\s$/.test(e.node.text))&&((ho||to)&&e&&e.dom.contentEditable=="false"&&this.addHackNode("IMG",n),this.addHackNode("BR",this.top))}addHackNode(e,n){if(n==this.top&&this.index<n.children.length&&n.children[this.index].matchesHack(e))this.index++;else{let r=document.createElement(e);e=="IMG"&&(r.className="ProseMirror-separator",r.alt=""),e=="BR"&&(r.className="ProseMirror-trailingBreak");let s=new tre(this.top,[],r,null);n!=this.top?n.children.push(s):n.children.splice(this.index++,0,s),this.changed=!0}}isLocked(e){return this.lock&&(e==this.lock||e.nodeType==1&&e.contains(this.lock.parentNode))}}function t$e(t,e){let n=e,r=n.children.length,s=t.childCount,o=new Map,i=[];e:for(;s>0;){let a;for(;;)if(r){let c=n.children[r-1];if(c instanceof Wf)n=c,r=c.children.length;else{a=c,r--;break}}else{if(n==e)break e;r=n.parent.children.indexOf(n),n=n.parent}let l=a.node;if(l){if(l!=t.child(s-1))break;--s,o.set(a,s),i.push(a)}}return{index:s,matched:o,matches:i.reverse()}}function n$e(t,e){return t.type.side-e.type.side}function r$e(t,e,n,r){let s=e.locals(t),o=0;if(s.length==0){for(let c=0;c<t.childCount;c++){let u=t.child(c);r(u,s,e.forChild(o,u),c),o+=u.nodeSize}return}let i=0,a=[],l=null;for(let c=0;;){let u,f;for(;i<s.length&&s[i].to==o;){let b=s[i++];b.widget&&(u?(f||(f=[u])).push(b):u=b)}if(u)if(f){f.sort(n$e);for(let b=0;b<f.length;b++)n(f[b],c,!!l)}else n(u,c,!!l);let h,m;if(l)m=-1,h=l,l=null;else if(c<t.childCount)m=c,h=t.child(c++);else break;for(let b=0;b<a.length;b++)a[b].to<=o&&a.splice(b--,1);for(;i<s.length&&s[i].from<=o&&s[i].to>o;)a.push(s[i++]);let y=o+h.nodeSize;if(h.isText){let b=y;i<s.length&&s[i].from<b&&(b=s[i].from);for(let w=0;w<a.length;w++)a[w].to<b&&(b=a[w].to);b<y&&(l=h.cut(b-o),h=h.cut(0,b-o),y=b,m=-1)}else for(;i<s.length&&s[i].to<y;)i++;let v=h.isInline&&!h.isLeaf?a.filter(b=>!b.inline):a.slice();r(h,v,e.forChild(o,h),m),o=y}}function s$e(t){if(t.nodeName=="UL"||t.nodeName=="OL"){let e=t.style.cssText;t.style.cssText=e+"; list-style: square !important",window.getComputedStyle(t).listStyle,t.style.cssText=e}}function o$e(t,e,n,r){for(let s=0,o=0;s<t.childCount&&o<=r;){let i=t.child(s++),a=o;if(o+=i.nodeSize,!i.isText)continue;let l=i.text;for(;s<t.childCount;){let c=t.child(s++);if(o+=c.nodeSize,!c.isText)break;l+=c.text}if(o>=n){if(o>=r&&l.slice(r-e.length-a,r-a)==e)return r-e.length;let c=a<r?l.lastIndexOf(e,r-a-1):-1;if(c>=0&&c+e.length+a>=n)return a+c;if(n==r&&l.length>=r+e.length-a&&l.slice(r-a,r-a+e.length)==e)return r}}return-1}function WT(t,e,n,r,s){let o=[];for(let i=0,a=0;i<t.length;i++){let l=t[i],c=a,u=a+=l.size;c>=n||u<=e?o.push(l):(c<e&&o.push(l.slice(0,e-c,r)),s&&(o.push(s),s=void 0),u>n&&o.push(l.slice(n-c,l.size,r)))}return o}function eD(t,e=null){let n=t.domSelectionRange(),r=t.state.doc;if(!n.focusNode)return null;let s=t.docView.nearestDesc(n.focusNode),o=s&&s.size==0,i=t.docView.posFromDOM(n.focusNode,n.focusOffset,1);if(i<0)return null;let a=r.resolve(i),l,c;if(PS(n)){for(l=i;s&&!s.node;)s=s.parent;let f=s.node;if(s&&f.isAtom&&Jt.isSelectable(f)&&s.parent&&!(f.isInline&&DLe(n.focusNode,n.focusOffset,s.dom))){let h=s.posBefore;c=new Jt(i==h?a:r.resolve(h))}}else{if(n instanceof t.dom.ownerDocument.defaultView.Selection&&n.rangeCount>1){let f=i,h=i;for(let m=0;m<n.rangeCount;m++){let y=n.getRangeAt(m);f=Math.min(f,t.docView.posFromDOM(y.startContainer,y.startOffset,1)),h=Math.max(h,t.docView.posFromDOM(y.endContainer,y.endOffset,-1))}if(f<0)return null;[l,i]=h==t.state.selection.anchor?[h,f]:[f,h],a=r.resolve(i)}else l=t.docView.posFromDOM(n.anchorNode,n.anchorOffset,1);if(l<0)return null}let u=r.resolve(l);if(!c){let f=e=="pointer"||t.state.selection.head<a.pos&&!o?1:-1;c=tD(t,u,a,f)}return c}function ore(t){return t.editable?t.hasFocus():are(t)&&document.activeElement&&document.activeElement.contains(t.dom)}function Sc(t,e=!1){let n=t.state.selection;if(ire(t,n),!!ore(t)){if(!e&&t.input.mouseDown&&t.input.mouseDown.allowDefault&&to){let r=t.domSelectionRange(),s=t.domObserver.currentSelection;if(r.anchorNode&&s.anchorNode&&qf(r.anchorNode,r.anchorOffset,s.anchorNode,s.anchorOffset)){t.input.mouseDown.delayedSelectionSync=!0,t.domObserver.setCurSelection();return}}if(t.domObserver.disconnectSelection(),t.cursorWrapper)a$e(t);else{let{anchor:r,head:s}=n,o,i;TH&&!(n instanceof ln)&&(n.$from.parent.inlineContent||(o=MH(t,n.from)),!n.empty&&!n.$from.parent.inlineContent&&(i=MH(t,n.to))),t.docView.setSelection(r,s,t,e),TH&&(o&&jH(o),i&&jH(i)),n.visible?t.dom.classList.remove("ProseMirror-hideselection"):(t.dom.classList.add("ProseMirror-hideselection"),"onselectionchange"in document&&i$e(t))}t.domObserver.setCurSelection(),t.domObserver.connectSelection()}}const TH=ho||to&&Wne<63;function MH(t,e){let{node:n,offset:r}=t.docView.domFromPos(e,0),s=r<n.childNodes.length?n.childNodes[r]:null,o=r?n.childNodes[r-1]:null;if(ho&&s&&s.contentEditable=="false")return a9(s);if((!s||s.contentEditable=="false")&&(!o||o.contentEditable=="false")){if(s)return a9(s);if(o)return a9(o)}}function a9(t){return t.contentEditable="true",ho&&t.draggable&&(t.draggable=!1,t.wasDraggable=!0),t}function jH(t){t.contentEditable="false",t.wasDraggable&&(t.draggable=!0,t.wasDraggable=null)}function i$e(t){let e=t.dom.ownerDocument;e.removeEventListener("selectionchange",t.input.hideSelectionGuard);let n=t.domSelectionRange(),r=n.anchorNode,s=n.anchorOffset;e.addEventListener("selectionchange",t.input.hideSelectionGuard=()=>{(n.anchorNode!=r||n.anchorOffset!=s)&&(e.removeEventListener("selectionchange",t.input.hideSelectionGuard),setTimeout(()=>{(!ore(t)||t.state.selection.visible)&&t.dom.classList.remove("ProseMirror-hideselection")},20))})}function a$e(t){let e=t.domSelection();if(!e)return;let n=t.cursorWrapper.dom,r=n.nodeName=="IMG";r?e.collapse(n.parentNode,Zs(n)+1):e.collapse(n,0),!r&&!t.state.selection.visible&&ti&&ed<=11&&(n.disabled=!0,n.disabled=!1)}function ire(t,e){if(e instanceof Jt){let n=t.docView.descAt(e.from);n!=t.lastSelectedViewDesc&&(AH(t),n&&n.selectNode(),t.lastSelectedViewDesc=n)}else AH(t)}function AH(t){t.lastSelectedViewDesc&&(t.lastSelectedViewDesc.parent&&t.lastSelectedViewDesc.deselectNode(),t.lastSelectedViewDesc=void 0)}function tD(t,e,n,r){return t.someProp("createSelectionBetween",s=>s(t,e,n))||ln.between(e,n,r)}function _H(t){return t.editable&&!t.hasFocus()?!1:are(t)}function are(t){let e=t.domSelectionRange();if(!e.anchorNode)return!1;try{return t.dom.contains(e.anchorNode.nodeType==3?e.anchorNode.parentNode:e.anchorNode)&&(t.editable||t.dom.contains(e.focusNode.nodeType==3?e.focusNode.parentNode:e.focusNode))}catch{return!1}}function l$e(t){let e=t.docView.domFromPos(t.state.selection.anchor,0),n=t.domSelectionRange();return qf(e.node,e.offset,n.anchorNode,n.anchorOffset)}function YT(t,e){let{$anchor:n,$head:r}=t.selection,s=e>0?n.max(r):n.min(r),o=s.parent.inlineContent?s.depth?t.doc.resolve(e>0?s.after():s.before()):null:s;return o&&hn.findFrom(o,e)}function Du(t,e){return t.dispatch(t.state.tr.setSelection(e).scrollIntoView()),!0}function RH(t,e,n){let r=t.state.selection;if(r instanceof ln)if(n.indexOf("s")>-1){let{$head:s}=r,o=s.textOffset?null:e<0?s.nodeBefore:s.nodeAfter;if(!o||o.isText||!o.isLeaf)return!1;let i=t.state.doc.resolve(s.pos+o.nodeSize*(e<0?-1:1));return Du(t,new ln(r.$anchor,i))}else if(r.empty){if(t.endOfTextblock(e>0?"forward":"backward")){let s=YT(t.state,e);return s&&s instanceof Jt?Du(t,s):!1}else if(!(Vi&&n.indexOf("m")>-1)){let s=r.$head,o=s.textOffset?null:e<0?s.nodeBefore:s.nodeAfter,i;if(!o||o.isText)return!1;let a=e<0?s.pos-o.nodeSize:s.pos;return o.isAtom||(i=t.docView.descAt(a))&&!i.contentDOM?Jt.isSelectable(o)?Du(t,new Jt(e<0?t.state.doc.resolve(s.pos-o.nodeSize):s)):sy?Du(t,new ln(t.state.doc.resolve(e<0?a:a+o.nodeSize))):!1:!1}}else return!1;else{if(r instanceof Jt&&r.node.isInline)return Du(t,new ln(e>0?r.$to:r.$from));{let s=YT(t.state,e);return s?Du(t,s):!1}}}function B3(t){return t.nodeType==3?t.nodeValue.length:t.childNodes.length}function tg(t,e){let n=t.pmViewDesc;return n&&n.size==0&&(e<0||t.nextSibling||t.nodeName!="BR")}function ch(t,e){return e<0?c$e(t):u$e(t)}function c$e(t){let e=t.domSelectionRange(),n=e.focusNode,r=e.focusOffset;if(!n)return;let s,o,i=!1;for(Zi&&n.nodeType==1&&r<B3(n)&&tg(n.childNodes[r],-1)&&(i=!0);;)if(r>0){if(n.nodeType!=1)break;{let a=n.childNodes[r-1];if(tg(a,-1))s=n,o=--r;else if(a.nodeType==3)n=a,r=n.nodeValue.length;else break}}else{if(lre(n))break;{let a=n.previousSibling;for(;a&&tg(a,-1);)s=n.parentNode,o=Zs(a),a=a.previousSibling;if(a)n=a,r=B3(n);else{if(n=n.parentNode,n==t.dom)break;r=0}}}i?GT(t,n,r):s&&GT(t,s,o)}function u$e(t){let e=t.domSelectionRange(),n=e.focusNode,r=e.focusOffset;if(!n)return;let s=B3(n),o,i;for(;;)if(r<s){if(n.nodeType!=1)break;let a=n.childNodes[r];if(tg(a,1))o=n,i=++r;else break}else{if(lre(n))break;{let a=n.nextSibling;for(;a&&tg(a,1);)o=a.parentNode,i=Zs(a)+1,a=a.nextSibling;if(a)n=a,r=0,s=B3(n);else{if(n=n.parentNode,n==t.dom)break;r=s=0}}}o&&GT(t,o,i)}function lre(t){let e=t.pmViewDesc;return e&&e.node&&e.node.isBlock}function d$e(t,e){for(;t&&e==t.childNodes.length&&!ry(t);)e=Zs(t)+1,t=t.parentNode;for(;t&&e<t.childNodes.length;){let n=t.childNodes[e];if(n.nodeType==3)return n;if(n.nodeType==1&&n.contentEditable=="false")break;t=n,e=0}}function f$e(t,e){for(;t&&!e&&!ry(t);)e=Zs(t),t=t.parentNode;for(;t&&e;){let n=t.childNodes[e-1];if(n.nodeType==3)return n;if(n.nodeType==1&&n.contentEditable=="false")break;t=n,e=t.childNodes.length}}function GT(t,e,n){if(e.nodeType!=3){let o,i;(i=d$e(e,n))?(e=i,n=0):(o=f$e(e,n))&&(e=o,n=o.nodeValue.length)}let r=t.domSelection();if(!r)return;if(PS(r)){let o=document.createRange();o.setEnd(e,n),o.setStart(e,n),r.removeAllRanges(),r.addRange(o)}else r.extend&&r.extend(e,n);t.domObserver.setCurSelection();let{state:s}=t;setTimeout(()=>{t.state==s&&Sc(t)},50)}function DH(t,e){let n=t.state.doc.resolve(e);if(!(to||Yne)&&n.parent.inlineContent){let s=t.coordsAtPos(e);if(e>n.start()){let o=t.coordsAtPos(e-1),i=(o.top+o.bottom)/2;if(i>s.top&&i<s.bottom&&Math.abs(o.left-s.left)>1)return o.left<s.left?"ltr":"rtl"}if(e<n.end()){let o=t.coordsAtPos(e+1),i=(o.top+o.bottom)/2;if(i>s.top&&i<s.bottom&&Math.abs(o.left-s.left)>1)return o.left>s.left?"ltr":"rtl"}}return getComputedStyle(t.dom).direction=="rtl"?"rtl":"ltr"}function IH(t,e,n){let r=t.state.selection;if(r instanceof ln&&!r.empty||n.indexOf("s")>-1||Vi&&n.indexOf("m")>-1)return!1;let{$from:s,$to:o}=r;if(!s.parent.inlineContent||t.endOfTextblock(e<0?"up":"down")){let i=YT(t.state,e);if(i&&i instanceof Jt)return Du(t,i)}if(!s.parent.inlineContent){let i=e<0?s:o,a=r instanceof wi?hn.near(i,e):hn.findFrom(i,e);return a?Du(t,a):!1}return!1}function OH(t,e){if(!(t.state.selection instanceof ln))return!0;let{$head:n,$anchor:r,empty:s}=t.state.selection;if(!n.sameParent(r))return!0;if(!s)return!1;if(t.endOfTextblock(e>0?"forward":"backward"))return!0;let o=!n.textOffset&&(e<0?n.nodeBefore:n.nodeAfter);if(o&&!o.isText){let i=t.state.tr;return e<0?i.delete(n.pos-o.nodeSize,n.pos):i.delete(n.pos,n.pos+o.nodeSize),t.dispatch(i),!0}return!1}function NH(t,e,n){t.domObserver.stop(),e.contentEditable=n,t.domObserver.start()}function p$e(t){if(!ho||t.state.selection.$head.parentOffset>0)return!1;let{focusNode:e,focusOffset:n}=t.domSelectionRange();if(e&&e.nodeType==1&&n==0&&e.firstChild&&e.firstChild.contentEditable=="false"){let r=e.firstChild;NH(t,r,"true"),setTimeout(()=>NH(t,r,"false"),20)}return!1}function h$e(t){let e="";return t.ctrlKey&&(e+="c"),t.metaKey&&(e+="m"),t.altKey&&(e+="a"),t.shiftKey&&(e+="s"),e}function m$e(t,e){let n=e.keyCode,r=h$e(e);if(n==8||Vi&&n==72&&r=="c")return OH(t,-1)||ch(t,-1);if(n==46&&!e.shiftKey||Vi&&n==68&&r=="c")return OH(t,1)||ch(t,1);if(n==13||n==27)return!0;if(n==37||Vi&&n==66&&r=="c"){let s=n==37?DH(t,t.state.selection.from)=="ltr"?-1:1:-1;return RH(t,s,r)||ch(t,s)}else if(n==39||Vi&&n==70&&r=="c"){let s=n==39?DH(t,t.state.selection.from)=="ltr"?1:-1:1;return RH(t,s,r)||ch(t,s)}else{if(n==38||Vi&&n==80&&r=="c")return IH(t,-1,r)||ch(t,-1);if(n==40||Vi&&n==78&&r=="c")return p$e(t)||IH(t,1,r)||ch(t,1);if(r==(Vi?"m":"c")&&(n==66||n==73||n==89||n==90))return!0}return!1}function nD(t,e){t.someProp("transformCopied",m=>{e=m(e,t)});let n=[],{content:r,openStart:s,openEnd:o}=e;for(;s>1&&o>1&&r.childCount==1&&r.firstChild.childCount==1;){s--,o--;let m=r.firstChild;n.push(m.type.name,m.attrs!=m.type.defaultAttrs?m.attrs:null),r=m.content}let i=t.someProp("clipboardSerializer")||dp.fromSchema(t.state.schema),a=hre(),l=a.createElement("div");l.appendChild(i.serializeFragment(r,{document:a}));let c=l.firstChild,u,f=0;for(;c&&c.nodeType==1&&(u=pre[c.nodeName.toLowerCase()]);){for(let m=u.length-1;m>=0;m--){let y=a.createElement(u[m]);for(;l.firstChild;)y.appendChild(l.firstChild);l.appendChild(y),f++}c=l.firstChild}c&&c.nodeType==1&&c.setAttribute("data-pm-slice",`${s} ${o}${f?` -${f}`:""} ${JSON.stringify(n)}`);let h=t.someProp("clipboardTextSerializer",m=>m(e,t))||e.content.textBetween(0,e.content.size,`

`);return{dom:l,text:h,slice:e}}function cre(t,e,n,r,s){let o=s.parent.type.spec.code,i,a;if(!n&&!e)return null;let l=!!e&&(r||o||!n);if(l){if(t.someProp("transformPastedText",h=>{e=h(e,o||r,t)}),o)return a=new _t(ct.from(t.state.schema.text(e.replace(/\r\n?/g,`
`))),0,0),t.someProp("transformPasted",h=>{a=h(a,t,!0)}),a;let f=t.someProp("clipboardTextParser",h=>h(e,s,r,t));if(f)a=f;else{let h=s.marks(),{schema:m}=t.state,y=dp.fromSchema(m);i=document.createElement("div"),e.split(/(?:\r\n?|\n)+/).forEach(v=>{let b=i.appendChild(document.createElement("p"));v&&b.appendChild(y.serializeNode(m.text(v,h)))})}}else t.someProp("transformPastedHTML",f=>{n=f(n,t)}),i=b$e(n),sy&&x$e(i);let c=i&&i.querySelector("[data-pm-slice]"),u=c&&/^(\d+) (\d+)(?: -(\d+))? (.*)/.exec(c.getAttribute("data-pm-slice")||"");if(u&&u[3])for(let f=+u[3];f>0;f--){let h=i.firstChild;for(;h&&h.nodeType!=1;)h=h.nextSibling;if(!h)break;i=h}if(a||(a=(t.someProp("clipboardParser")||t.someProp("domParser")||Q0.fromSchema(t.state.schema)).parseSlice(i,{preserveWhitespace:!!(l||u),context:s,ruleFromNode(h){return h.nodeName=="BR"&&!h.nextSibling&&h.parentNode&&!g$e.test(h.parentNode.nodeName)?{ignore:!0}:null}})),u)a=w$e(LH(a,+u[1],+u[2]),u[4]);else if(a=_t.maxOpen(y$e(a.content,s),!0),a.openStart||a.openEnd){let f=0,h=0;for(let m=a.content.firstChild;f<a.openStart&&!m.type.spec.isolating;f++,m=m.firstChild);for(let m=a.content.lastChild;h<a.openEnd&&!m.type.spec.isolating;h++,m=m.lastChild);a=LH(a,f,h)}return t.someProp("transformPasted",f=>{a=f(a,t,l)}),a}const g$e=/^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var)$/i;function y$e(t,e){if(t.childCount<2)return t;for(let n=e.depth;n>=0;n--){let s=e.node(n).contentMatchAt(e.index(n)),o,i=[];if(t.forEach(a=>{if(!i)return;let l=s.findWrapping(a.type),c;if(!l)return i=null;if(c=i.length&&o.length&&dre(l,o,a,i[i.length-1],0))i[i.length-1]=c;else{i.length&&(i[i.length-1]=fre(i[i.length-1],o.length));let u=ure(a,l);i.push(u),s=s.matchType(u.type),o=l}}),i)return ct.from(i)}return t}function ure(t,e,n=0){for(let r=e.length-1;r>=n;r--)t=e[r].create(null,ct.from(t));return t}function dre(t,e,n,r,s){if(s<t.length&&s<e.length&&t[s]==e[s]){let o=dre(t,e,n,r.lastChild,s+1);if(o)return r.copy(r.content.replaceChild(r.childCount-1,o));if(r.contentMatchAt(r.childCount).matchType(s==t.length-1?n.type:t[s+1]))return r.copy(r.content.append(ct.from(ure(n,t,s+1))))}}function fre(t,e){if(e==0)return t;let n=t.content.replaceChild(t.childCount-1,fre(t.lastChild,e-1)),r=t.contentMatchAt(t.childCount).fillBefore(ct.empty,!0);return t.copy(n.append(r))}function KT(t,e,n,r,s,o){let i=e<0?t.firstChild:t.lastChild,a=i.content;return t.childCount>1&&(o=0),s<r-1&&(a=KT(a,e,n,r,s+1,o)),s>=n&&(a=e<0?i.contentMatchAt(0).fillBefore(a,o<=s).append(a):a.append(i.contentMatchAt(i.childCount).fillBefore(ct.empty,!0))),t.replaceChild(e<0?0:t.childCount-1,i.copy(a))}function LH(t,e,n){return e<t.openStart&&(t=new _t(KT(t.content,-1,e,t.openStart,0,t.openEnd),e,t.openEnd)),n<t.openEnd&&(t=new _t(KT(t.content,1,n,t.openEnd,0,0),t.openStart,n)),t}const pre={thead:["table"],tbody:["table"],tfoot:["table"],caption:["table"],colgroup:["table"],col:["table","colgroup"],tr:["table","tbody"],td:["table","tbody","tr"],th:["table","tbody","tr"]};let $H=null;function hre(){return $H||($H=document.implementation.createHTMLDocument("title"))}let l9=null;function v$e(t){let e=window.trustedTypes;return e?(l9||(l9=e.defaultPolicy||e.createPolicy("ProseMirrorClipboard",{createHTML:n=>n})),l9.createHTML(t)):t}function b$e(t){let e=/^(\s*<meta [^>]*>)*/.exec(t);e&&(t=t.slice(e[0].length));let n=hre().createElement("div"),r=/<([a-z][^>\s]+)/i.exec(t),s;if((s=r&&pre[r[1].toLowerCase()])&&(t=s.map(o=>"<"+o+">").join("")+t+s.map(o=>"</"+o+">").reverse().join("")),n.innerHTML=v$e(t),s)for(let o=0;o<s.length;o++)n=n.querySelector(s[o])||n;return n}function x$e(t){let e=t.querySelectorAll(to?"span:not([class]):not([style])":"span.Apple-converted-space");for(let n=0;n<e.length;n++){let r=e[n];r.childNodes.length==1&&r.textContent==" "&&r.parentNode&&r.parentNode.replaceChild(t.ownerDocument.createTextNode(" "),r)}}function w$e(t,e){if(!t.size)return t;let n=t.content.firstChild.type.schema,r;try{r=JSON.parse(e)}catch{return t}let{content:s,openStart:o,openEnd:i}=t;for(let a=r.length-2;a>=0;a-=2){let l=n.nodes[r[a]];if(!l||l.hasRequiredAttrs())break;s=ct.from(l.create(r[a+1],s)),o++,i++}return new _t(s,o,i)}const No={},Lo={},S$e={touchstart:!0,touchmove:!0};class C$e{constructor(){this.shiftKey=!1,this.mouseDown=null,this.lastKeyCode=null,this.lastKeyCodeTime=0,this.lastClick={time:0,x:0,y:0,type:"",button:0},this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastIOSEnter=0,this.lastIOSEnterFallbackTimeout=-1,this.lastFocus=0,this.lastTouch=0,this.lastChromeDelete=0,this.composing=!1,this.compositionNode=null,this.composingTimeout=-1,this.compositionNodes=[],this.compositionEndedAt=-2e8,this.compositionID=1,this.badSafariComposition=!1,this.compositionPendingChanges=0,this.domChangeCount=0,this.eventHandlers=Object.create(null),this.hideSelectionGuard=null}}function k$e(t){for(let e in No){let n=No[e];t.dom.addEventListener(e,t.input.eventHandlers[e]=r=>{T$e(t,r)&&!rD(t,r)&&(t.editable||!(r.type in Lo))&&n(t,r)},S$e[e]?{passive:!0}:void 0)}ho&&t.dom.addEventListener("input",()=>null),XT(t)}function Gu(t,e){t.input.lastSelectionOrigin=e,t.input.lastSelectionTime=Date.now()}function E$e(t){t.domObserver.stop();for(let e in t.input.eventHandlers)t.dom.removeEventListener(e,t.input.eventHandlers[e]);clearTimeout(t.input.composingTimeout),clearTimeout(t.input.lastIOSEnterFallbackTimeout)}function XT(t){t.someProp("handleDOMEvents",e=>{for(let n in e)t.input.eventHandlers[n]||t.dom.addEventListener(n,t.input.eventHandlers[n]=r=>rD(t,r))})}function rD(t,e){return t.someProp("handleDOMEvents",n=>{let r=n[e.type];return r?r(t,e)||e.defaultPrevented:!1})}function T$e(t,e){if(!e.bubbles)return!0;if(e.defaultPrevented)return!1;for(let n=e.target;n!=t.dom;n=n.parentNode)if(!n||n.nodeType==11||n.pmViewDesc&&n.pmViewDesc.stopEvent(e))return!1;return!0}function M$e(t,e){!rD(t,e)&&No[e.type]&&(t.editable||!(e.type in Lo))&&No[e.type](t,e)}Lo.keydown=(t,e)=>{let n=e;if(t.input.shiftKey=n.keyCode==16||n.shiftKey,!gre(t,n)&&(t.input.lastKeyCode=n.keyCode,t.input.lastKeyCodeTime=Date.now(),!(pc&&to&&n.keyCode==13)))if(n.keyCode!=229&&t.domObserver.forceFlush(),mm&&n.keyCode==13&&!n.ctrlKey&&!n.altKey&&!n.metaKey){let r=Date.now();t.input.lastIOSEnter=r,t.input.lastIOSEnterFallbackTimeout=setTimeout(()=>{t.input.lastIOSEnter==r&&(t.someProp("handleKeyDown",s=>s(t,df(13,"Enter"))),t.input.lastIOSEnter=0)},200)}else t.someProp("handleKeyDown",r=>r(t,n))||m$e(t,n)?n.preventDefault():Gu(t,"key")};Lo.keyup=(t,e)=>{e.keyCode==16&&(t.input.shiftKey=!1)};Lo.keypress=(t,e)=>{let n=e;if(gre(t,n)||!n.charCode||n.ctrlKey&&!n.altKey||Vi&&n.metaKey)return;if(t.someProp("handleKeyPress",s=>s(t,n))){n.preventDefault();return}let r=t.state.selection;if(!(r instanceof ln)||!r.$from.sameParent(r.$to)){let s=String.fromCharCode(n.charCode),o=()=>t.state.tr.insertText(s).scrollIntoView();!/[\r\n]/.test(s)&&!t.someProp("handleTextInput",i=>i(t,r.$from.pos,r.$to.pos,s,o))&&t.dispatch(o()),n.preventDefault()}};function HS(t){return{left:t.clientX,top:t.clientY}}function j$e(t,e){let n=e.x-t.clientX,r=e.y-t.clientY;return n*n+r*r<100}function sD(t,e,n,r,s){if(r==-1)return!1;let o=t.state.doc.resolve(r);for(let i=o.depth+1;i>0;i--)if(t.someProp(e,a=>i>o.depth?a(t,n,o.nodeAfter,o.before(i),s,!0):a(t,n,o.node(i),o.before(i),s,!1)))return!0;return!1}function Ph(t,e,n){if(t.focused||t.focus(),t.state.selection.eq(e))return;let r=t.state.tr.setSelection(e);r.setMeta("pointer",!0),t.dispatch(r)}function A$e(t,e){if(e==-1)return!1;let n=t.state.doc.resolve(e),r=n.nodeAfter;return r&&r.isAtom&&Jt.isSelectable(r)?(Ph(t,new Jt(n)),!0):!1}function _$e(t,e){if(e==-1)return!1;let n=t.state.selection,r,s;n instanceof Jt&&(r=n.node);let o=t.state.doc.resolve(e);for(let i=o.depth+1;i>0;i--){let a=i>o.depth?o.nodeAfter:o.node(i);if(Jt.isSelectable(a)){r&&n.$from.depth>0&&i>=n.$from.depth&&o.before(n.$from.depth+1)==n.$from.pos?s=o.before(n.$from.depth):s=o.before(i);break}}return s!=null?(Ph(t,Jt.create(t.state.doc,s)),!0):!1}function R$e(t,e,n,r,s){return sD(t,"handleClickOn",e,n,r)||t.someProp("handleClick",o=>o(t,e,r))||(s?_$e(t,n):A$e(t,n))}function D$e(t,e,n,r){return sD(t,"handleDoubleClickOn",e,n,r)||t.someProp("handleDoubleClick",s=>s(t,e,r))}function I$e(t,e,n,r){return sD(t,"handleTripleClickOn",e,n,r)||t.someProp("handleTripleClick",s=>s(t,e,r))||O$e(t,n,r)}function O$e(t,e,n){if(n.button!=0)return!1;let r=t.state.doc;if(e==-1)return r.inlineContent?(Ph(t,ln.create(r,0,r.content.size)),!0):!1;let s=r.resolve(e);for(let o=s.depth+1;o>0;o--){let i=o>s.depth?s.nodeAfter:s.node(o),a=s.before(o);if(i.inlineContent)Ph(t,ln.create(r,a+1,a+1+i.content.size));else if(Jt.isSelectable(i))Ph(t,Jt.create(r,a));else continue;return!0}}function oD(t){return H3(t)}const mre=Vi?"metaKey":"ctrlKey";No.mousedown=(t,e)=>{let n=e;t.input.shiftKey=n.shiftKey;let r=oD(t),s=Date.now(),o="singleClick";s-t.input.lastClick.time<500&&j$e(n,t.input.lastClick)&&!n[mre]&&t.input.lastClick.button==n.button&&(t.input.lastClick.type=="singleClick"?o="doubleClick":t.input.lastClick.type=="doubleClick"&&(o="tripleClick")),t.input.lastClick={time:s,x:n.clientX,y:n.clientY,type:o,button:n.button};let i=t.posAtCoords(HS(n));i&&(o=="singleClick"?(t.input.mouseDown&&t.input.mouseDown.done(),t.input.mouseDown=new N$e(t,i,n,!!r)):(o=="doubleClick"?D$e:I$e)(t,i.pos,i.inside,n)?n.preventDefault():Gu(t,"pointer"))};class N$e{constructor(e,n,r,s){this.view=e,this.pos=n,this.event=r,this.flushed=s,this.delayedSelectionSync=!1,this.mightDrag=null,this.startDoc=e.state.doc,this.selectNode=!!r[mre],this.allowDefault=r.shiftKey;let o,i;if(n.inside>-1)o=e.state.doc.nodeAt(n.inside),i=n.inside;else{let u=e.state.doc.resolve(n.pos);o=u.parent,i=u.depth?u.before():0}const a=s?null:r.target,l=a?e.docView.nearestDesc(a,!0):null;this.target=l&&l.nodeDOM.nodeType==1?l.nodeDOM:null;let{selection:c}=e.state;(r.button==0&&o.type.spec.draggable&&o.type.spec.selectable!==!1||c instanceof Jt&&c.from<=i&&c.to>i)&&(this.mightDrag={node:o,pos:i,addAttr:!!(this.target&&!this.target.draggable),setUneditable:!!(this.target&&Zi&&!this.target.hasAttribute("contentEditable"))}),this.target&&this.mightDrag&&(this.mightDrag.addAttr||this.mightDrag.setUneditable)&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&(this.target.draggable=!0),this.mightDrag.setUneditable&&setTimeout(()=>{this.view.input.mouseDown==this&&this.target.setAttribute("contentEditable","false")},20),this.view.domObserver.start()),e.root.addEventListener("mouseup",this.up=this.up.bind(this)),e.root.addEventListener("mousemove",this.move=this.move.bind(this)),Gu(e,"pointer")}done(){this.view.root.removeEventListener("mouseup",this.up),this.view.root.removeEventListener("mousemove",this.move),this.mightDrag&&this.target&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&this.target.removeAttribute("draggable"),this.mightDrag.setUneditable&&this.target.removeAttribute("contentEditable"),this.view.domObserver.start()),this.delayedSelectionSync&&setTimeout(()=>Sc(this.view)),this.view.input.mouseDown=null}up(e){if(this.done(),!this.view.dom.contains(e.target))return;let n=this.pos;this.view.state.doc!=this.startDoc&&(n=this.view.posAtCoords(HS(e))),this.updateAllowDefault(e),this.allowDefault||!n?Gu(this.view,"pointer"):R$e(this.view,n.pos,n.inside,e,this.selectNode)?e.preventDefault():e.button==0&&(this.flushed||ho&&this.mightDrag&&!this.mightDrag.node.isAtom||to&&!this.view.state.selection.visible&&Math.min(Math.abs(n.pos-this.view.state.selection.from),Math.abs(n.pos-this.view.state.selection.to))<=2)?(Ph(this.view,hn.near(this.view.state.doc.resolve(n.pos))),e.preventDefault()):Gu(this.view,"pointer")}move(e){this.updateAllowDefault(e),Gu(this.view,"pointer"),e.buttons==0&&this.done()}updateAllowDefault(e){!this.allowDefault&&(Math.abs(this.event.x-e.clientX)>4||Math.abs(this.event.y-e.clientY)>4)&&(this.allowDefault=!0)}}No.touchstart=t=>{t.input.lastTouch=Date.now(),oD(t),Gu(t,"pointer")};No.touchmove=t=>{t.input.lastTouch=Date.now(),Gu(t,"pointer")};No.contextmenu=t=>oD(t);function gre(t,e){return t.composing?!0:ho&&Math.abs(e.timeStamp-t.input.compositionEndedAt)<500?(t.input.compositionEndedAt=-2e8,!0):!1}const L$e=pc?5e3:-1;Lo.compositionstart=Lo.compositionupdate=t=>{if(!t.composing){t.domObserver.flush();let{state:e}=t,n=e.selection.$to;if(e.selection instanceof ln&&(e.storedMarks||!n.textOffset&&n.parentOffset&&n.nodeBefore.marks.some(r=>r.type.spec.inclusive===!1)||to&&Yne&&$$e(t)))t.markCursor=t.state.storedMarks||n.marks(),H3(t,!0),t.markCursor=null;else if(H3(t,!e.selection.empty),Zi&&e.selection.empty&&n.parentOffset&&!n.textOffset&&n.nodeBefore.marks.length){let r=t.domSelectionRange();for(let s=r.focusNode,o=r.focusOffset;s&&s.nodeType==1&&o!=0;){let i=o<0?s.lastChild:s.childNodes[o-1];if(!i)break;if(i.nodeType==3){let a=t.domSelection();a&&a.collapse(i,i.nodeValue.length);break}else s=i,o=-1}}t.input.composing=!0}yre(t,L$e)};function $$e(t){let{focusNode:e,focusOffset:n}=t.domSelectionRange();if(!e||e.nodeType!=1||n>=e.childNodes.length)return!1;let r=e.childNodes[n];return r.nodeType==1&&r.contentEditable=="false"}Lo.compositionend=(t,e)=>{t.composing&&(t.input.composing=!1,t.input.compositionEndedAt=e.timeStamp,t.input.compositionPendingChanges=t.domObserver.pendingRecords().length?t.input.compositionID:0,t.input.compositionNode=null,t.input.badSafariComposition?t.domObserver.forceFlush():t.input.compositionPendingChanges&&Promise.resolve().then(()=>t.domObserver.flush()),t.input.compositionID++,yre(t,20))};function yre(t,e){clearTimeout(t.input.composingTimeout),e>-1&&(t.input.composingTimeout=setTimeout(()=>H3(t),e))}function vre(t){for(t.composing&&(t.input.composing=!1,t.input.compositionEndedAt=z$e());t.input.compositionNodes.length>0;)t.input.compositionNodes.pop().markParentsDirty()}function F$e(t){let e=t.domSelectionRange();if(!e.focusNode)return null;let n=_Le(e.focusNode,e.focusOffset),r=RLe(e.focusNode,e.focusOffset);if(n&&r&&n!=r){let s=r.pmViewDesc,o=t.domObserver.lastChangedTextNode;if(n==o||r==o)return o;if(!s||!s.isText(r.nodeValue))return r;if(t.input.compositionNode==r){let i=n.pmViewDesc;if(!(!i||!i.isText(n.nodeValue)))return r}}return n||r}function z$e(){let t=document.createEvent("Event");return t.initEvent("event",!0,!0),t.timeStamp}function H3(t,e=!1){if(!(pc&&t.domObserver.flushingSoon>=0)){if(t.domObserver.forceFlush(),vre(t),e||t.docView&&t.docView.dirty){let n=eD(t),r=t.state.selection;return n&&!n.eq(r)?t.dispatch(t.state.tr.setSelection(n)):(t.markCursor||e)&&!r.$from.node(r.$from.sharedDepth(r.to)).inlineContent?t.dispatch(t.state.tr.deleteSelection()):t.updateState(t.state),!0}return!1}}function P$e(t,e){if(!t.dom.parentNode)return;let n=t.dom.parentNode.appendChild(document.createElement("div"));n.appendChild(e),n.style.cssText="position: fixed; left: -10000px; top: 10px";let r=getSelection(),s=document.createRange();s.selectNodeContents(e),t.dom.blur(),r.removeAllRanges(),r.addRange(s),setTimeout(()=>{n.parentNode&&n.parentNode.removeChild(n),t.focus()},50)}const Vg=ti&&ed<15||mm&&NLe<604;No.copy=Lo.cut=(t,e)=>{let n=e,r=t.state.selection,s=n.type=="cut";if(r.empty)return;let o=Vg?null:n.clipboardData,i=r.content(),{dom:a,text:l}=nD(t,i);o?(n.preventDefault(),o.clearData(),o.setData("text/html",a.innerHTML),o.setData("text/plain",l)):P$e(t,a),s&&t.dispatch(t.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent","cut"))};function B$e(t){return t.openStart==0&&t.openEnd==0&&t.content.childCount==1?t.content.firstChild:null}function H$e(t,e){if(!t.dom.parentNode)return;let n=t.input.shiftKey||t.state.selection.$from.parent.type.spec.code,r=t.dom.parentNode.appendChild(document.createElement(n?"textarea":"div"));n||(r.contentEditable="true"),r.style.cssText="position: fixed; left: -10000px; top: 10px",r.focus();let s=t.input.shiftKey&&t.input.lastKeyCode!=45;setTimeout(()=>{t.focus(),r.parentNode&&r.parentNode.removeChild(r),n?qg(t,r.value,null,s,e):qg(t,r.textContent,r.innerHTML,s,e)},50)}function qg(t,e,n,r,s){let o=cre(t,e,n,r,t.state.selection.$from);if(t.someProp("handlePaste",l=>l(t,s,o||_t.empty)))return!0;if(!o)return!1;let i=B$e(o),a=i?t.state.tr.replaceSelectionWith(i,r):t.state.tr.replaceSelection(o);return t.dispatch(a.scrollIntoView().setMeta("paste",!0).setMeta("uiEvent","paste")),!0}function bre(t){let e=t.getData("text/plain")||t.getData("Text");if(e)return e;let n=t.getData("text/uri-list");return n?n.replace(/\r?\n/g," "):""}Lo.paste=(t,e)=>{let n=e;if(t.composing&&!pc)return;let r=Vg?null:n.clipboardData,s=t.input.shiftKey&&t.input.lastKeyCode!=45;r&&qg(t,bre(r),r.getData("text/html"),s,n)?n.preventDefault():H$e(t,n)};class xre{constructor(e,n,r){this.slice=e,this.move=n,this.node=r}}const U$e=Vi?"altKey":"ctrlKey";function wre(t,e){let n=t.someProp("dragCopies",r=>!r(e));return n??!e[U$e]}No.dragstart=(t,e)=>{let n=e,r=t.input.mouseDown;if(r&&r.done(),!n.dataTransfer)return;let s=t.state.selection,o=s.empty?null:t.posAtCoords(HS(n)),i;if(!(o&&o.pos>=s.from&&o.pos<=(s instanceof Jt?s.to-1:s.to))){if(r&&r.mightDrag)i=Jt.create(t.state.doc,r.mightDrag.pos);else if(n.target&&n.target.nodeType==1){let f=t.docView.nearestDesc(n.target,!0);f&&f.node.type.spec.draggable&&f!=t.docView&&(i=Jt.create(t.state.doc,f.posBefore))}}let a=(i||t.state.selection).content(),{dom:l,text:c,slice:u}=nD(t,a);(!n.dataTransfer.files.length||!to||Wne>120)&&n.dataTransfer.clearData(),n.dataTransfer.setData(Vg?"Text":"text/html",l.innerHTML),n.dataTransfer.effectAllowed="copyMove",Vg||n.dataTransfer.setData("text/plain",c),t.dragging=new xre(u,wre(t,n),i)};No.dragend=t=>{let e=t.dragging;window.setTimeout(()=>{t.dragging==e&&(t.dragging=null)},50)};Lo.dragover=Lo.dragenter=(t,e)=>e.preventDefault();Lo.drop=(t,e)=>{try{V$e(t,e,t.dragging)}finally{t.dragging=null}};function V$e(t,e,n){if(!e.dataTransfer)return;let r=t.posAtCoords(HS(e));if(!r)return;let s=t.state.doc.resolve(r.pos),o=n&&n.slice;o?t.someProp("transformPasted",m=>{o=m(o,t,!1)}):o=cre(t,bre(e.dataTransfer),Vg?null:e.dataTransfer.getData("text/html"),!1,s);let i=!!(n&&wre(t,e));if(t.someProp("handleDrop",m=>m(t,e,o||_t.empty,i))){e.preventDefault();return}if(!o)return;e.preventDefault();let a=o?Ene(t.state.doc,s.pos,o):s.pos;a==null&&(a=s.pos);let l=t.state.tr;if(i){let{node:m}=n;m?m.replace(l):l.deleteSelection()}let c=l.mapping.map(a),u=o.openStart==0&&o.openEnd==0&&o.content.childCount==1,f=l.doc;if(u?l.replaceRangeWith(c,c,o.content.firstChild):l.replaceRange(c,c,o),l.doc.eq(f))return;let h=l.doc.resolve(c);if(u&&Jt.isSelectable(o.content.firstChild)&&h.nodeAfter&&h.nodeAfter.sameMarkup(o.content.firstChild))l.setSelection(new Jt(h));else{let m=l.mapping.map(a);l.mapping.maps[l.mapping.maps.length-1].forEach((y,v,b,w)=>m=w),l.setSelection(tD(t,h,l.doc.resolve(m)))}t.focus(),t.dispatch(l.setMeta("uiEvent","drop"))}No.focus=t=>{t.input.lastFocus=Date.now(),t.focused||(t.domObserver.stop(),t.dom.classList.add("ProseMirror-focused"),t.domObserver.start(),t.focused=!0,setTimeout(()=>{t.docView&&t.hasFocus()&&!t.domObserver.currentSelection.eq(t.domSelectionRange())&&Sc(t)},20))};No.blur=(t,e)=>{let n=e;t.focused&&(t.domObserver.stop(),t.dom.classList.remove("ProseMirror-focused"),t.domObserver.start(),n.relatedTarget&&t.dom.contains(n.relatedTarget)&&t.domObserver.currentSelection.clear(),t.focused=!1)};No.beforeinput=(t,e)=>{if(to&&pc&&e.inputType=="deleteContentBackward"){t.domObserver.flushSoon();let{domChangeCount:r}=t.input;setTimeout(()=>{if(t.input.domChangeCount!=r||(t.dom.blur(),t.focus(),t.someProp("handleKeyDown",o=>o(t,df(8,"Backspace")))))return;let{$cursor:s}=t.state.selection;s&&s.pos>0&&t.dispatch(t.state.tr.delete(s.pos-1,s.pos).scrollIntoView())},50)}};for(let t in Lo)No[t]=Lo[t];function Wg(t,e){if(t==e)return!0;for(let n in t)if(t[n]!==e[n])return!1;for(let n in e)if(!(n in t))return!1;return!0}class U3{constructor(e,n){this.toDOM=e,this.spec=n||jf,this.side=this.spec.side||0}map(e,n,r,s){let{pos:o,deleted:i}=e.mapResult(n.from+s,this.side<0?-1:1);return i?null:new Ls(o-r,o-r,this)}valid(){return!0}eq(e){return this==e||e instanceof U3&&(this.spec.key&&this.spec.key==e.spec.key||this.toDOM==e.toDOM&&Wg(this.spec,e.spec))}destroy(e){this.spec.destroy&&this.spec.destroy(e)}}class nd{constructor(e,n){this.attrs=e,this.spec=n||jf}map(e,n,r,s){let o=e.map(n.from+s,this.spec.inclusiveStart?-1:1)-r,i=e.map(n.to+s,this.spec.inclusiveEnd?1:-1)-r;return o>=i?null:new Ls(o,i,this)}valid(e,n){return n.from<n.to}eq(e){return this==e||e instanceof nd&&Wg(this.attrs,e.attrs)&&Wg(this.spec,e.spec)}static is(e){return e.type instanceof nd}destroy(){}}class iD{constructor(e,n){this.attrs=e,this.spec=n||jf}map(e,n,r,s){let o=e.mapResult(n.from+s,1);if(o.deleted)return null;let i=e.mapResult(n.to+s,-1);return i.deleted||i.pos<=o.pos?null:new Ls(o.pos-r,i.pos-r,this)}valid(e,n){let{index:r,offset:s}=e.content.findIndex(n.from),o;return s==n.from&&!(o=e.child(r)).isText&&s+o.nodeSize==n.to}eq(e){return this==e||e instanceof iD&&Wg(this.attrs,e.attrs)&&Wg(this.spec,e.spec)}destroy(){}}class Ls{constructor(e,n,r){this.from=e,this.to=n,this.type=r}copy(e,n){return new Ls(e,n,this.type)}eq(e,n=0){return this.type.eq(e.type)&&this.from+n==e.from&&this.to+n==e.to}map(e,n,r){return this.type.map(e,this,n,r)}static widget(e,n,r){return new Ls(e,e,new U3(n,r))}static inline(e,n,r,s){return new Ls(e,n,new nd(r,s))}static node(e,n,r,s){return new Ls(e,n,new iD(r,s))}get spec(){return this.type.spec}get inline(){return this.type instanceof nd}get widget(){return this.type instanceof U3}}const bh=[],jf={};class kr{constructor(e,n){this.local=e.length?e:bh,this.children=n.length?n:bh}static create(e,n){return n.length?V3(n,e,0,jf):io}find(e,n,r){let s=[];return this.findInner(e??0,n??1e9,s,0,r),s}findInner(e,n,r,s,o){for(let i=0;i<this.local.length;i++){let a=this.local[i];a.from<=n&&a.to>=e&&(!o||o(a.spec))&&r.push(a.copy(a.from+s,a.to+s))}for(let i=0;i<this.children.length;i+=3)if(this.children[i]<n&&this.children[i+1]>e){let a=this.children[i]+1;this.children[i+2].findInner(e-a,n-a,r,s+a,o)}}map(e,n,r){return this==io||e.maps.length==0?this:this.mapInner(e,n,0,0,r||jf)}mapInner(e,n,r,s,o){let i;for(let a=0;a<this.local.length;a++){let l=this.local[a].map(e,r,s);l&&l.type.valid(n,l)?(i||(i=[])).push(l):o.onRemove&&o.onRemove(this.local[a].spec)}return this.children.length?q$e(this.children,i||[],e,n,r,s,o):i?new kr(i.sort(Af),bh):io}add(e,n){return n.length?this==io?kr.create(e,n):this.addInner(e,n,0):this}addInner(e,n,r){let s,o=0;e.forEach((a,l)=>{let c=l+r,u;if(u=Cre(n,a,c)){for(s||(s=this.children.slice());o<s.length&&s[o]<l;)o+=3;s[o]==l?s[o+2]=s[o+2].addInner(a,u,c+1):s.splice(o,0,l,l+a.nodeSize,V3(u,a,c+1,jf)),o+=3}});let i=Sre(o?kre(n):n,-r);for(let a=0;a<i.length;a++)i[a].type.valid(e,i[a])||i.splice(a--,1);return new kr(i.length?this.local.concat(i).sort(Af):this.local,s||this.children)}remove(e){return e.length==0||this==io?this:this.removeInner(e,0)}removeInner(e,n){let r=this.children,s=this.local;for(let o=0;o<r.length;o+=3){let i,a=r[o]+n,l=r[o+1]+n;for(let u=0,f;u<e.length;u++)(f=e[u])&&f.from>a&&f.to<l&&(e[u]=null,(i||(i=[])).push(f));if(!i)continue;r==this.children&&(r=this.children.slice());let c=r[o+2].removeInner(i,a+1);c!=io?r[o+2]=c:(r.splice(o,3),o-=3)}if(s.length){for(let o=0,i;o<e.length;o++)if(i=e[o])for(let a=0;a<s.length;a++)s[a].eq(i,n)&&(s==this.local&&(s=this.local.slice()),s.splice(a--,1))}return r==this.children&&s==this.local?this:s.length||r.length?new kr(s,r):io}forChild(e,n){if(this==io)return this;if(n.isLeaf)return kr.empty;let r,s;for(let a=0;a<this.children.length;a+=3)if(this.children[a]>=e){this.children[a]==e&&(r=this.children[a+2]);break}let o=e+1,i=o+n.content.size;for(let a=0;a<this.local.length;a++){let l=this.local[a];if(l.from<i&&l.to>o&&l.type instanceof nd){let c=Math.max(o,l.from)-o,u=Math.min(i,l.to)-o;c<u&&(s||(s=[])).push(l.copy(c,u))}}if(s){let a=new kr(s.sort(Af),bh);return r?new zu([a,r]):a}return r||io}eq(e){if(this==e)return!0;if(!(e instanceof kr)||this.local.length!=e.local.length||this.children.length!=e.children.length)return!1;for(let n=0;n<this.local.length;n++)if(!this.local[n].eq(e.local[n]))return!1;for(let n=0;n<this.children.length;n+=3)if(this.children[n]!=e.children[n]||this.children[n+1]!=e.children[n+1]||!this.children[n+2].eq(e.children[n+2]))return!1;return!0}locals(e){return aD(this.localsInner(e))}localsInner(e){if(this==io)return bh;if(e.inlineContent||!this.local.some(nd.is))return this.local;let n=[];for(let r=0;r<this.local.length;r++)this.local[r].type instanceof nd||n.push(this.local[r]);return n}forEachSet(e){e(this)}}kr.empty=new kr([],[]);kr.removeOverlap=aD;const io=kr.empty;class zu{constructor(e){this.members=e}map(e,n){const r=this.members.map(s=>s.map(e,n,jf));return zu.from(r)}forChild(e,n){if(n.isLeaf)return kr.empty;let r=[];for(let s=0;s<this.members.length;s++){let o=this.members[s].forChild(e,n);o!=io&&(o instanceof zu?r=r.concat(o.members):r.push(o))}return zu.from(r)}eq(e){if(!(e instanceof zu)||e.members.length!=this.members.length)return!1;for(let n=0;n<this.members.length;n++)if(!this.members[n].eq(e.members[n]))return!1;return!0}locals(e){let n,r=!0;for(let s=0;s<this.members.length;s++){let o=this.members[s].localsInner(e);if(o.length)if(!n)n=o;else{r&&(n=n.slice(),r=!1);for(let i=0;i<o.length;i++)n.push(o[i])}}return n?aD(r?n:n.sort(Af)):bh}static from(e){switch(e.length){case 0:return io;case 1:return e[0];default:return new zu(e.every(n=>n instanceof kr)?e:e.reduce((n,r)=>n.concat(r instanceof kr?r:r.members),[]))}}forEachSet(e){for(let n=0;n<this.members.length;n++)this.members[n].forEachSet(e)}}function q$e(t,e,n,r,s,o,i){let a=t.slice();for(let c=0,u=o;c<n.maps.length;c++){let f=0;n.maps[c].forEach((h,m,y,v)=>{let b=v-y-(m-h);for(let w=0;w<a.length;w+=3){let C=a[w+1];if(C<0||h>C+u-f)continue;let k=a[w]+u-f;m>=k?a[w+1]=h<=k?-2:-1:h>=u&&b&&(a[w]+=b,a[w+1]+=b)}f+=b}),u=n.maps[c].map(u,-1)}let l=!1;for(let c=0;c<a.length;c+=3)if(a[c+1]<0){if(a[c+1]==-2){l=!0,a[c+1]=-1;continue}let u=n.map(t[c]+o),f=u-s;if(f<0||f>=r.content.size){l=!0;continue}let h=n.map(t[c+1]+o,-1),m=h-s,{index:y,offset:v}=r.content.findIndex(f),b=r.maybeChild(y);if(b&&v==f&&v+b.nodeSize==m){let w=a[c+2].mapInner(n,b,u+1,t[c]+o+1,i);w!=io?(a[c]=f,a[c+1]=m,a[c+2]=w):(a[c+1]=-2,l=!0)}else l=!0}if(l){let c=W$e(a,t,e,n,s,o,i),u=V3(c,r,0,i);e=u.local;for(let f=0;f<a.length;f+=3)a[f+1]<0&&(a.splice(f,3),f-=3);for(let f=0,h=0;f<u.children.length;f+=3){let m=u.children[f];for(;h<a.length&&a[h]<m;)h+=3;a.splice(h,0,u.children[f],u.children[f+1],u.children[f+2])}}return new kr(e.sort(Af),a)}function Sre(t,e){if(!e||!t.length)return t;let n=[];for(let r=0;r<t.length;r++){let s=t[r];n.push(new Ls(s.from+e,s.to+e,s.type))}return n}function W$e(t,e,n,r,s,o,i){function a(l,c){for(let u=0;u<l.local.length;u++){let f=l.local[u].map(r,s,c);f?n.push(f):i.onRemove&&i.onRemove(l.local[u].spec)}for(let u=0;u<l.children.length;u+=3)a(l.children[u+2],l.children[u]+c+1)}for(let l=0;l<t.length;l+=3)t[l+1]==-1&&a(t[l+2],e[l]+o+1);return n}function Cre(t,e,n){if(e.isLeaf)return null;let r=n+e.nodeSize,s=null;for(let o=0,i;o<t.length;o++)(i=t[o])&&i.from>n&&i.to<r&&((s||(s=[])).push(i),t[o]=null);return s}function kre(t){let e=[];for(let n=0;n<t.length;n++)t[n]!=null&&e.push(t[n]);return e}function V3(t,e,n,r){let s=[],o=!1;e.forEach((a,l)=>{let c=Cre(t,a,l+n);if(c){o=!0;let u=V3(c,a,n+l+1,r);u!=io&&s.push(l,l+a.nodeSize,u)}});let i=Sre(o?kre(t):t,-n).sort(Af);for(let a=0;a<i.length;a++)i[a].type.valid(e,i[a])||(r.onRemove&&r.onRemove(i[a].spec),i.splice(a--,1));return i.length||s.length?new kr(i,s):io}function Af(t,e){return t.from-e.from||t.to-e.to}function aD(t){let e=t;for(let n=0;n<e.length-1;n++){let r=e[n];if(r.from!=r.to)for(let s=n+1;s<e.length;s++){let o=e[s];if(o.from==r.from){o.to!=r.to&&(e==t&&(e=t.slice()),e[s]=o.copy(o.from,r.to),FH(e,s+1,o.copy(r.to,o.to)));continue}else{o.from<r.to&&(e==t&&(e=t.slice()),e[n]=r.copy(r.from,o.from),FH(e,s,r.copy(o.from,r.to)));break}}}return e}function FH(t,e,n){for(;e<t.length&&Af(n,t[e])>0;)e++;t.splice(e,0,n)}function c9(t){let e=[];return t.someProp("decorations",n=>{let r=n(t.state);r&&r!=io&&e.push(r)}),t.cursorWrapper&&e.push(kr.create(t.state.doc,[t.cursorWrapper.deco])),zu.from(e)}const Y$e={childList:!0,characterData:!0,characterDataOldValue:!0,attributes:!0,attributeOldValue:!0,subtree:!0},G$e=ti&&ed<=11;class K$e{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}set(e){this.anchorNode=e.anchorNode,this.anchorOffset=e.anchorOffset,this.focusNode=e.focusNode,this.focusOffset=e.focusOffset}clear(){this.anchorNode=this.focusNode=null}eq(e){return e.anchorNode==this.anchorNode&&e.anchorOffset==this.anchorOffset&&e.focusNode==this.focusNode&&e.focusOffset==this.focusOffset}}class X$e{constructor(e,n){this.view=e,this.handleDOMChange=n,this.queue=[],this.flushingSoon=-1,this.observer=null,this.currentSelection=new K$e,this.onCharData=null,this.suppressingSelectionUpdates=!1,this.lastChangedTextNode=null,this.observer=window.MutationObserver&&new window.MutationObserver(r=>{for(let s=0;s<r.length;s++)this.queue.push(r[s]);ti&&ed<=11&&r.some(s=>s.type=="childList"&&s.removedNodes.length||s.type=="characterData"&&s.oldValue.length>s.target.nodeValue.length)?this.flushSoon():ho&&e.composing&&r.some(s=>s.type=="childList"&&s.target.nodeName=="TR")?(e.input.badSafariComposition=!0,this.flushSoon()):this.flush()}),G$e&&(this.onCharData=r=>{this.queue.push({target:r.target,type:"characterData",oldValue:r.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this)}flushSoon(){this.flushingSoon<0&&(this.flushingSoon=window.setTimeout(()=>{this.flushingSoon=-1,this.flush()},20))}forceFlush(){this.flushingSoon>-1&&(window.clearTimeout(this.flushingSoon),this.flushingSoon=-1,this.flush())}start(){this.observer&&(this.observer.takeRecords(),this.observer.observe(this.view.dom,Y$e)),this.onCharData&&this.view.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.connectSelection()}stop(){if(this.observer){let e=this.observer.takeRecords();if(e.length){for(let n=0;n<e.length;n++)this.queue.push(e[n]);window.setTimeout(()=>this.flush(),20)}this.observer.disconnect()}this.onCharData&&this.view.dom.removeEventListener("DOMCharacterDataModified",this.onCharData),this.disconnectSelection()}connectSelection(){this.view.dom.ownerDocument.addEventListener("selectionchange",this.onSelectionChange)}disconnectSelection(){this.view.dom.ownerDocument.removeEventListener("selectionchange",this.onSelectionChange)}suppressSelectionUpdates(){this.suppressingSelectionUpdates=!0,setTimeout(()=>this.suppressingSelectionUpdates=!1,50)}onSelectionChange(){if(_H(this.view)){if(this.suppressingSelectionUpdates)return Sc(this.view);if(ti&&ed<=11&&!this.view.state.selection.empty){let e=this.view.domSelectionRange();if(e.focusNode&&qf(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset))return this.flushSoon()}this.flush()}}setCurSelection(){this.currentSelection.set(this.view.domSelectionRange())}ignoreSelectionChange(e){if(!e.focusNode)return!0;let n=new Set,r;for(let o=e.focusNode;o;o=hm(o))n.add(o);for(let o=e.anchorNode;o;o=hm(o))if(n.has(o)){r=o;break}let s=r&&this.view.docView.nearestDesc(r);if(s&&s.ignoreMutation({type:"selection",target:r.nodeType==3?r.parentNode:r}))return this.setCurSelection(),!0}pendingRecords(){if(this.observer)for(let e of this.observer.takeRecords())this.queue.push(e);return this.queue}flush(){let{view:e}=this;if(!e.docView||this.flushingSoon>-1)return;let n=this.pendingRecords();n.length&&(this.queue=[]);let r=e.domSelectionRange(),s=!this.suppressingSelectionUpdates&&!this.currentSelection.eq(r)&&_H(e)&&!this.ignoreSelectionChange(r),o=-1,i=-1,a=!1,l=[];if(e.editable)for(let u=0;u<n.length;u++){let f=this.registerMutation(n[u],l);f&&(o=o<0?f.from:Math.min(f.from,o),i=i<0?f.to:Math.max(f.to,i),f.typeOver&&(a=!0))}if(l.some(u=>u.nodeName=="BR")&&(e.input.lastKeyCode==8||e.input.lastKeyCode==46)){for(let u of l)if(u.nodeName=="BR"&&u.parentNode){let f=u.nextSibling;f&&f.nodeType==1&&f.contentEditable=="false"&&u.parentNode.removeChild(u)}}else if(Zi&&l.length){let u=l.filter(f=>f.nodeName=="BR");if(u.length==2){let[f,h]=u;f.parentNode&&f.parentNode.parentNode==h.parentNode?h.remove():f.remove()}else{let{focusNode:f}=this.currentSelection;for(let h of u){let m=h.parentNode;m&&m.nodeName=="LI"&&(!f||J$e(e,f)!=m)&&h.remove()}}}let c=null;o<0&&s&&e.input.lastFocus>Date.now()-200&&Math.max(e.input.lastTouch,e.input.lastClick.time)<Date.now()-300&&PS(r)&&(c=eD(e))&&c.eq(hn.near(e.state.doc.resolve(0),1))?(e.input.lastFocus=0,Sc(e),this.currentSelection.set(r),e.scrollToSelection()):(o>-1||s)&&(o>-1&&(e.docView.markDirty(o,i),Z$e(e)),e.input.badSafariComposition&&(e.input.badSafariComposition=!1,eFe(e,l)),this.handleDOMChange(o,i,a,l),e.docView&&e.docView.dirty?e.updateState(e.state):this.currentSelection.eq(r)||Sc(e),this.currentSelection.set(r))}registerMutation(e,n){if(n.indexOf(e.target)>-1)return null;let r=this.view.docView.nearestDesc(e.target);if(e.type=="attributes"&&(r==this.view.docView||e.attributeName=="contenteditable"||e.attributeName=="style"&&!e.oldValue&&!e.target.getAttribute("style"))||!r||r.ignoreMutation(e))return null;if(e.type=="childList"){for(let u=0;u<e.addedNodes.length;u++){let f=e.addedNodes[u];n.push(f),f.nodeType==3&&(this.lastChangedTextNode=f)}if(r.contentDOM&&r.contentDOM!=r.dom&&!r.contentDOM.contains(e.target))return{from:r.posBefore,to:r.posAfter};let s=e.previousSibling,o=e.nextSibling;if(ti&&ed<=11&&e.addedNodes.length)for(let u=0;u<e.addedNodes.length;u++){let{previousSibling:f,nextSibling:h}=e.addedNodes[u];(!f||Array.prototype.indexOf.call(e.addedNodes,f)<0)&&(s=f),(!h||Array.prototype.indexOf.call(e.addedNodes,h)<0)&&(o=h)}let i=s&&s.parentNode==e.target?Zs(s)+1:0,a=r.localPosFromDOM(e.target,i,-1),l=o&&o.parentNode==e.target?Zs(o):e.target.childNodes.length,c=r.localPosFromDOM(e.target,l,1);return{from:a,to:c}}else return e.type=="attributes"?{from:r.posAtStart-r.border,to:r.posAtEnd+r.border}:(this.lastChangedTextNode=e.target,{from:r.posAtStart,to:r.posAtEnd,typeOver:e.target.nodeValue==e.oldValue})}}let zH=new WeakMap,PH=!1;function Z$e(t){if(!zH.has(t)&&(zH.set(t,null),["normal","nowrap","pre-line"].indexOf(getComputedStyle(t.dom).whiteSpace)!==-1)){if(t.requiresGeckoHackNode=Zi,PH)return;console.warn("ProseMirror expects the CSS white-space property to be set, preferably to 'pre-wrap'. It is recommended to load style/prosemirror.css from the prosemirror-view package."),PH=!0}}function BH(t,e){let n=e.startContainer,r=e.startOffset,s=e.endContainer,o=e.endOffset,i=t.domAtPos(t.state.selection.anchor);return qf(i.node,i.offset,s,o)&&([n,r,s,o]=[s,o,n,r]),{anchorNode:n,anchorOffset:r,focusNode:s,focusOffset:o}}function Q$e(t,e){if(e.getComposedRanges){let s=e.getComposedRanges(t.root)[0];if(s)return BH(t,s)}let n;function r(s){s.preventDefault(),s.stopImmediatePropagation(),n=s.getTargetRanges()[0]}return t.dom.addEventListener("beforeinput",r,!0),document.execCommand("indent"),t.dom.removeEventListener("beforeinput",r,!0),n?BH(t,n):null}function J$e(t,e){for(let n=e.parentNode;n&&n!=t.dom;n=n.parentNode){let r=t.docView.nearestDesc(n,!0);if(r&&r.node.isBlock)return n}return null}function eFe(t,e){var n;let{focusNode:r,focusOffset:s}=t.domSelectionRange();for(let o of e)if(((n=o.parentNode)===null||n===void 0?void 0:n.nodeName)=="TR"){let i=o.nextSibling;for(;i&&i.nodeName!="TD"&&i.nodeName!="TH";)i=i.nextSibling;if(i){let a=i;for(;;){let l=a.firstChild;if(!l||l.nodeType!=1||l.contentEditable=="false"||/^(BR|IMG)$/.test(l.nodeName))break;a=l}a.insertBefore(o,a.firstChild),r==o&&t.domSelection().collapse(o,s)}else o.parentNode.removeChild(o)}}function tFe(t,e,n){let{node:r,fromOffset:s,toOffset:o,from:i,to:a}=t.docView.parseRange(e,n),l=t.domSelectionRange(),c,u=l.anchorNode;if(u&&t.dom.contains(u.nodeType==1?u:u.parentNode)&&(c=[{node:u,offset:l.anchorOffset}],PS(l)||c.push({node:l.focusNode,offset:l.focusOffset})),to&&t.input.lastKeyCode===8)for(let b=o;b>s;b--){let w=r.childNodes[b-1],C=w.pmViewDesc;if(w.nodeName=="BR"&&!C){o=b;break}if(!C||C.size)break}let f=t.state.doc,h=t.someProp("domParser")||Q0.fromSchema(t.state.schema),m=f.resolve(i),y=null,v=h.parse(r,{topNode:m.parent,topMatch:m.parent.contentMatchAt(m.index()),topOpen:!0,from:s,to:o,preserveWhitespace:m.parent.type.whitespace=="pre"?"full":!0,findPositions:c,ruleFromNode:nFe,context:m});if(c&&c[0].pos!=null){let b=c[0].pos,w=c[1]&&c[1].pos;w==null&&(w=b),y={anchor:b+i,head:w+i}}return{doc:v,sel:y,from:i,to:a}}function nFe(t){let e=t.pmViewDesc;if(e)return e.parseRule();if(t.nodeName=="BR"&&t.parentNode){if(ho&&/^(ul|ol)$/i.test(t.parentNode.nodeName)){let n=document.createElement("div");return n.appendChild(document.createElement("li")),{skip:n}}else if(t.parentNode.lastChild==t||ho&&/^(tr|table)$/i.test(t.parentNode.nodeName))return{ignore:!0}}else if(t.nodeName=="IMG"&&t.getAttribute("mark-placeholder"))return{ignore:!0};return null}const rFe=/^(a|abbr|acronym|b|bd[io]|big|br|button|cite|code|data(list)?|del|dfn|em|i|img|ins|kbd|label|map|mark|meter|output|q|ruby|s|samp|small|span|strong|su[bp]|time|u|tt|var)$/i;function sFe(t,e,n,r,s){let o=t.input.compositionPendingChanges||(t.composing?t.input.compositionID:0);if(t.input.compositionPendingChanges=0,e<0){let M=t.input.lastSelectionTime>Date.now()-50?t.input.lastSelectionOrigin:null,_=eD(t,M);if(_&&!t.state.selection.eq(_)){if(to&&pc&&t.input.lastKeyCode===13&&Date.now()-100<t.input.lastKeyCodeTime&&t.someProp("handleKeyDown",R=>R(t,df(13,"Enter"))))return;let D=t.state.tr.setSelection(_);M=="pointer"?D.setMeta("pointer",!0):M=="key"&&D.scrollIntoView(),o&&D.setMeta("composition",o),t.dispatch(D)}return}let i=t.state.doc.resolve(e),a=i.sharedDepth(n);e=i.before(a+1),n=t.state.doc.resolve(n).after(a+1);let l=t.state.selection,c=tFe(t,e,n),u=t.state.doc,f=u.slice(c.from,c.to),h,m;t.input.lastKeyCode===8&&Date.now()-100<t.input.lastKeyCodeTime?(h=t.state.selection.to,m="end"):(h=t.state.selection.from,m="start"),t.input.lastKeyCode=null;let y=aFe(f.content,c.doc.content,c.from,h,m);if(y&&t.input.domChangeCount++,(mm&&t.input.lastIOSEnter>Date.now()-225||pc)&&s.some(M=>M.nodeType==1&&!rFe.test(M.nodeName))&&(!y||y.endA>=y.endB)&&t.someProp("handleKeyDown",M=>M(t,df(13,"Enter")))){t.input.lastIOSEnter=0;return}if(!y)if(r&&l instanceof ln&&!l.empty&&l.$head.sameParent(l.$anchor)&&!t.composing&&!(c.sel&&c.sel.anchor!=c.sel.head))y={start:l.from,endA:l.to,endB:l.to};else{if(c.sel){let M=HH(t,t.state.doc,c.sel);if(M&&!M.eq(t.state.selection)){let _=t.state.tr.setSelection(M);o&&_.setMeta("composition",o),t.dispatch(_)}}return}t.state.selection.from<t.state.selection.to&&y.start==y.endB&&t.state.selection instanceof ln&&(y.start>t.state.selection.from&&y.start<=t.state.selection.from+2&&t.state.selection.from>=c.from?y.start=t.state.selection.from:y.endA<t.state.selection.to&&y.endA>=t.state.selection.to-2&&t.state.selection.to<=c.to&&(y.endB+=t.state.selection.to-y.endA,y.endA=t.state.selection.to)),ti&&ed<=11&&y.endB==y.start+1&&y.endA==y.start&&y.start>c.from&&c.doc.textBetween(y.start-c.from-1,y.start-c.from+1)=="  "&&(y.start--,y.endA--,y.endB--);let v=c.doc.resolveNoCache(y.start-c.from),b=c.doc.resolveNoCache(y.endB-c.from),w=u.resolve(y.start),C=v.sameParent(b)&&v.parent.inlineContent&&w.end()>=y.endA;if((mm&&t.input.lastIOSEnter>Date.now()-225&&(!C||s.some(M=>M.nodeName=="DIV"||M.nodeName=="P"))||!C&&v.pos<c.doc.content.size&&(!v.sameParent(b)||!v.parent.inlineContent)&&v.pos<b.pos&&!/\S/.test(c.doc.textBetween(v.pos,b.pos,"","")))&&t.someProp("handleKeyDown",M=>M(t,df(13,"Enter")))){t.input.lastIOSEnter=0;return}if(t.state.selection.anchor>y.start&&iFe(u,y.start,y.endA,v,b)&&t.someProp("handleKeyDown",M=>M(t,df(8,"Backspace")))){pc&&to&&t.domObserver.suppressSelectionUpdates();return}to&&y.endB==y.start&&(t.input.lastChromeDelete=Date.now()),pc&&!C&&v.start()!=b.start()&&b.parentOffset==0&&v.depth==b.depth&&c.sel&&c.sel.anchor==c.sel.head&&c.sel.head==y.endA&&(y.endB-=2,b=c.doc.resolveNoCache(y.endB-c.from),setTimeout(()=>{t.someProp("handleKeyDown",function(M){return M(t,df(13,"Enter"))})},20));let k=y.start,E=y.endA,j=M=>{let _=M||t.state.tr.replace(k,E,c.doc.slice(y.start-c.from,y.endB-c.from));if(c.sel){let D=HH(t,_.doc,c.sel);D&&!(to&&t.composing&&D.empty&&(y.start!=y.endB||t.input.lastChromeDelete<Date.now()-100)&&(D.head==k||D.head==_.mapping.map(E)-1)||ti&&D.empty&&D.head==k)&&_.setSelection(D)}return o&&_.setMeta("composition",o),_.scrollIntoView()},A;if(C)if(v.pos==b.pos){ti&&ed<=11&&v.parentOffset==0&&(t.domObserver.suppressSelectionUpdates(),setTimeout(()=>Sc(t),20));let M=j(t.state.tr.delete(k,E)),_=u.resolve(y.start).marksAcross(u.resolve(y.endA));_&&M.ensureMarks(_),t.dispatch(M)}else if(y.endA==y.endB&&(A=oFe(v.parent.content.cut(v.parentOffset,b.parentOffset),w.parent.content.cut(w.parentOffset,y.endA-w.start())))){let M=j(t.state.tr);A.type=="add"?M.addMark(k,E,A.mark):M.removeMark(k,E,A.mark),t.dispatch(M)}else if(v.parent.child(v.index()).isText&&v.index()==b.index()-(b.textOffset?0:1)){let M=v.parent.textBetween(v.parentOffset,b.parentOffset),_=()=>j(t.state.tr.insertText(M,k,E));t.someProp("handleTextInput",D=>D(t,k,E,M,_))||t.dispatch(_())}else t.dispatch(j());else t.dispatch(j())}function HH(t,e,n){return Math.max(n.anchor,n.head)>e.content.size?null:tD(t,e.resolve(n.anchor),e.resolve(n.head))}function oFe(t,e){let n=t.firstChild.marks,r=e.firstChild.marks,s=n,o=r,i,a,l;for(let u=0;u<r.length;u++)s=r[u].removeFromSet(s);for(let u=0;u<n.length;u++)o=n[u].removeFromSet(o);if(s.length==1&&o.length==0)a=s[0],i="add",l=u=>u.mark(a.addToSet(u.marks));else if(s.length==0&&o.length==1)a=o[0],i="remove",l=u=>u.mark(a.removeFromSet(u.marks));else return null;let c=[];for(let u=0;u<e.childCount;u++)c.push(l(e.child(u)));if(ct.from(c).eq(t))return{mark:a,type:i}}function iFe(t,e,n,r,s){if(n-e<=s.pos-r.pos||u9(r,!0,!1)<s.pos)return!1;let o=t.resolve(e);if(!r.parent.isTextblock){let a=o.nodeAfter;return a!=null&&n==e+a.nodeSize}if(o.parentOffset<o.parent.content.size||!o.parent.isTextblock)return!1;let i=t.resolve(u9(o,!0,!0));return!i.parent.isTextblock||i.pos>n||u9(i,!0,!1)<n?!1:r.parent.content.cut(r.parentOffset).eq(i.parent.content)}function u9(t,e,n){let r=t.depth,s=e?t.end():t.pos;for(;r>0&&(e||t.indexAfter(r)==t.node(r).childCount);)r--,s++,e=!1;if(n){let o=t.node(r).maybeChild(t.indexAfter(r));for(;o&&!o.isLeaf;)o=o.firstChild,s++}return s}function aFe(t,e,n,r,s){let o=t.findDiffStart(e,n);if(o==null)return null;let{a:i,b:a}=t.findDiffEnd(e,n+t.size,n+e.size);if(s=="end"){let l=Math.max(0,o-Math.min(i,a));r-=i+l-o}if(i<o&&t.size<e.size){let l=r<=o&&r>=i?o-r:0;o-=l,o&&o<e.size&&UH(e.textBetween(o-1,o+1))&&(o+=l?1:-1),a=o+(a-i),i=o}else if(a<o){let l=r<=o&&r>=a?o-r:0;o-=l,o&&o<t.size&&UH(t.textBetween(o-1,o+1))&&(o+=l?1:-1),i=o+(i-a),a=o}return{start:o,endA:i,endB:a}}function UH(t){if(t.length!=2)return!1;let e=t.charCodeAt(0),n=t.charCodeAt(1);return e>=56320&&e<=57343&&n>=55296&&n<=56319}class Ere{constructor(e,n){this._root=null,this.focused=!1,this.trackWrites=null,this.mounted=!1,this.markCursor=null,this.cursorWrapper=null,this.lastSelectedViewDesc=void 0,this.input=new C$e,this.prevDirectPlugins=[],this.pluginViews=[],this.requiresGeckoHackNode=!1,this.dragging=null,this._props=n,this.state=n.state,this.directPlugins=n.plugins||[],this.directPlugins.forEach(GH),this.dispatch=this.dispatch.bind(this),this.dom=e&&e.mount||document.createElement("div"),e&&(e.appendChild?e.appendChild(this.dom):typeof e=="function"?e(this.dom):e.mount&&(this.mounted=!0)),this.editable=WH(this),qH(this),this.nodeViews=YH(this),this.docView=kH(this.state.doc,VH(this),c9(this),this.dom,this),this.domObserver=new X$e(this,(r,s,o,i)=>sFe(this,r,s,o,i)),this.domObserver.start(),k$e(this),this.updatePluginViews()}get composing(){return this.input.composing}get props(){if(this._props.state!=this.state){let e=this._props;this._props={};for(let n in e)this._props[n]=e[n];this._props.state=this.state}return this._props}update(e){e.handleDOMEvents!=this._props.handleDOMEvents&&XT(this);let n=this._props;this._props=e,e.plugins&&(e.plugins.forEach(GH),this.directPlugins=e.plugins),this.updateStateInner(e.state,n)}setProps(e){let n={};for(let r in this._props)n[r]=this._props[r];n.state=this.state;for(let r in e)n[r]=e[r];this.update(n)}updateState(e){this.updateStateInner(e,this._props)}updateStateInner(e,n){var r;let s=this.state,o=!1,i=!1;e.storedMarks&&this.composing&&(vre(this),i=!0),this.state=e;let a=s.plugins!=e.plugins||this._props.plugins!=n.plugins;if(a||this._props.plugins!=n.plugins||this._props.nodeViews!=n.nodeViews){let m=YH(this);cFe(m,this.nodeViews)&&(this.nodeViews=m,o=!0)}(a||n.handleDOMEvents!=this._props.handleDOMEvents)&&XT(this),this.editable=WH(this),qH(this);let l=c9(this),c=VH(this),u=s.plugins!=e.plugins&&!s.doc.eq(e.doc)?"reset":e.scrollToSelection>s.scrollToSelection?"to selection":"preserve",f=o||!this.docView.matchesNode(e.doc,c,l);(f||!e.selection.eq(s.selection))&&(i=!0);let h=u=="preserve"&&i&&this.dom.style.overflowAnchor==null&&FLe(this);if(i){this.domObserver.stop();let m=f&&(ti||to)&&!this.composing&&!s.selection.empty&&!e.selection.empty&&lFe(s.selection,e.selection);if(f){let y=to?this.trackWrites=this.domSelectionRange().focusNode:null;this.composing&&(this.input.compositionNode=F$e(this)),(o||!this.docView.update(e.doc,c,l,this))&&(this.docView.updateOuterDeco(c),this.docView.destroy(),this.docView=kH(e.doc,c,l,this.dom,this)),y&&(!this.trackWrites||!this.dom.contains(this.trackWrites))&&(m=!0)}m||!(this.input.mouseDown&&this.domObserver.currentSelection.eq(this.domSelectionRange())&&l$e(this))?Sc(this,m):(ire(this,e.selection),this.domObserver.setCurSelection()),this.domObserver.start()}this.updatePluginViews(s),!((r=this.dragging)===null||r===void 0)&&r.node&&!s.doc.eq(e.doc)&&this.updateDraggedNode(this.dragging,s),u=="reset"?this.dom.scrollTop=0:u=="to selection"?this.scrollToSelection():h&&zLe(h)}scrollToSelection(){let e=this.domSelectionRange().focusNode;if(!(!e||!this.dom.contains(e.nodeType==1?e:e.parentNode))){if(!this.someProp("handleScrollToSelection",n=>n(this)))if(this.state.selection instanceof Jt){let n=this.docView.domAfterPos(this.state.selection.from);n.nodeType==1&&vH(this,n.getBoundingClientRect(),e)}else vH(this,this.coordsAtPos(this.state.selection.head,1),e)}}destroyPluginViews(){let e;for(;e=this.pluginViews.pop();)e.destroy&&e.destroy()}updatePluginViews(e){if(!e||e.plugins!=this.state.plugins||this.directPlugins!=this.prevDirectPlugins){this.prevDirectPlugins=this.directPlugins,this.destroyPluginViews();for(let n=0;n<this.directPlugins.length;n++){let r=this.directPlugins[n];r.spec.view&&this.pluginViews.push(r.spec.view(this))}for(let n=0;n<this.state.plugins.length;n++){let r=this.state.plugins[n];r.spec.view&&this.pluginViews.push(r.spec.view(this))}}else for(let n=0;n<this.pluginViews.length;n++){let r=this.pluginViews[n];r.update&&r.update(this,e)}}updateDraggedNode(e,n){let r=e.node,s=-1;if(this.state.doc.nodeAt(r.from)==r.node)s=r.from;else{let o=r.from+(this.state.doc.content.size-n.doc.content.size);(o>0&&this.state.doc.nodeAt(o))==r.node&&(s=o)}this.dragging=new xre(e.slice,e.move,s<0?void 0:Jt.create(this.state.doc,s))}someProp(e,n){let r=this._props&&this._props[e],s;if(r!=null&&(s=n?n(r):r))return s;for(let i=0;i<this.directPlugins.length;i++){let a=this.directPlugins[i].props[e];if(a!=null&&(s=n?n(a):a))return s}let o=this.state.plugins;if(o)for(let i=0;i<o.length;i++){let a=o[i].props[e];if(a!=null&&(s=n?n(a):a))return s}}hasFocus(){if(ti){let e=this.root.activeElement;if(e==this.dom)return!0;if(!e||!this.dom.contains(e))return!1;for(;e&&this.dom!=e&&this.dom.contains(e);){if(e.contentEditable=="false")return!1;e=e.parentElement}return!0}return this.root.activeElement==this.dom}focus(){this.domObserver.stop(),this.editable&&PLe(this.dom),Sc(this),this.domObserver.start()}get root(){let e=this._root;if(e==null){for(let n=this.dom.parentNode;n;n=n.parentNode)if(n.nodeType==9||n.nodeType==11&&n.host)return n.getSelection||(Object.getPrototypeOf(n).getSelection=()=>n.ownerDocument.getSelection()),this._root=n}return e||document}updateRoot(){this._root=null}posAtCoords(e){return qLe(this,e)}coordsAtPos(e,n=1){return Qne(this,e,n)}domAtPos(e,n=0){return this.docView.domFromPos(e,n)}nodeDOM(e){let n=this.docView.descAt(e);return n?n.nodeDOM:null}posAtDOM(e,n,r=-1){let s=this.docView.posFromDOM(e,n,r);if(s==null)throw new RangeError("DOM position not inside the editor");return s}endOfTextblock(e,n){return XLe(this,n||this.state,e)}pasteHTML(e,n){return qg(this,"",e,!1,n||new ClipboardEvent("paste"))}pasteText(e,n){return qg(this,e,null,!0,n||new ClipboardEvent("paste"))}serializeForClipboard(e){return nD(this,e)}destroy(){this.docView&&(E$e(this),this.destroyPluginViews(),this.mounted?(this.docView.update(this.state.doc,[],c9(this),this),this.dom.textContent=""):this.dom.parentNode&&this.dom.parentNode.removeChild(this.dom),this.docView.destroy(),this.docView=null,jLe())}get isDestroyed(){return this.docView==null}dispatchEvent(e){return M$e(this,e)}domSelectionRange(){let e=this.domSelection();return e?ho&&this.root.nodeType===11&&ILe(this.dom.ownerDocument)==this.dom&&Q$e(this,e)||e:{focusNode:null,focusOffset:0,anchorNode:null,anchorOffset:0}}domSelection(){return this.root.getSelection()}}Ere.prototype.dispatch=function(t){let e=this._props.dispatchTransaction;e?e.call(this,t):this.updateState(this.state.apply(t))};function VH(t){let e=Object.create(null);return e.class="ProseMirror",e.contenteditable=String(t.editable),t.someProp("attributes",n=>{if(typeof n=="function"&&(n=n(t.state)),n)for(let r in n)r=="class"?e.class+=" "+n[r]:r=="style"?e.style=(e.style?e.style+";":"")+n[r]:!e[r]&&r!="contenteditable"&&r!="nodeName"&&(e[r]=String(n[r]))}),e.translate||(e.translate="no"),[Ls.node(0,t.state.doc.content.size,e)]}function qH(t){if(t.markCursor){let e=document.createElement("img");e.className="ProseMirror-separator",e.setAttribute("mark-placeholder","true"),e.setAttribute("alt",""),t.cursorWrapper={dom:e,deco:Ls.widget(t.state.selection.from,e,{raw:!0,marks:t.markCursor})}}else t.cursorWrapper=null}function WH(t){return!t.someProp("editable",e=>e(t.state)===!1)}function lFe(t,e){let n=Math.min(t.$anchor.sharedDepth(t.head),e.$anchor.sharedDepth(e.head));return t.$anchor.start(n)!=e.$anchor.start(n)}function YH(t){let e=Object.create(null);function n(r){for(let s in r)Object.prototype.hasOwnProperty.call(e,s)||(e[s]=r[s])}return t.someProp("nodeViews",n),t.someProp("markViews",n),e}function cFe(t,e){let n=0,r=0;for(let s in t){if(t[s]!=e[s])return!0;n++}for(let s in e)r++;return n!=r}function GH(t){if(t.spec.state||t.spec.filterTransaction||t.spec.appendTransaction)throw new RangeError("Plugins passed directly to the view must not have a state component")}var fd={8:"Backspace",9:"Tab",10:"Enter",12:"NumLock",13:"Enter",16:"Shift",17:"Control",18:"Alt",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",44:"PrintScreen",45:"Insert",46:"Delete",59:";",61:"=",91:"Meta",92:"Meta",106:"*",107:"+",108:",",109:"-",110:".",111:"/",144:"NumLock",145:"ScrollLock",160:"Shift",161:"Shift",162:"Control",163:"Control",164:"Alt",165:"Alt",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},q3={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},uFe=typeof navigator<"u"&&/Mac/.test(navigator.platform),dFe=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);for(var Qs=0;Qs<10;Qs++)fd[48+Qs]=fd[96+Qs]=String(Qs);for(var Qs=1;Qs<=24;Qs++)fd[Qs+111]="F"+Qs;for(var Qs=65;Qs<=90;Qs++)fd[Qs]=String.fromCharCode(Qs+32),q3[Qs]=String.fromCharCode(Qs);for(var d9 in fd)q3.hasOwnProperty(d9)||(q3[d9]=fd[d9]);function fFe(t){var e=uFe&&t.metaKey&&t.shiftKey&&!t.ctrlKey&&!t.altKey||dFe&&t.shiftKey&&t.key&&t.key.length==1||t.key=="Unidentified",n=!e&&t.key||(t.shiftKey?q3:fd)[t.keyCode]||t.key||"Unidentified";return n=="Esc"&&(n="Escape"),n=="Del"&&(n="Delete"),n=="Left"&&(n="ArrowLeft"),n=="Up"&&(n="ArrowUp"),n=="Right"&&(n="ArrowRight"),n=="Down"&&(n="ArrowDown"),n}const pFe=typeof navigator<"u"&&/Mac|iP(hone|[oa]d)/.test(navigator.platform),hFe=typeof navigator<"u"&&/Win/.test(navigator.platform);function mFe(t){let e=t.split(/-(?!$)/),n=e[e.length-1];n=="Space"&&(n=" ");let r,s,o,i;for(let a=0;a<e.length-1;a++){let l=e[a];if(/^(cmd|meta|m)$/i.test(l))i=!0;else if(/^a(lt)?$/i.test(l))r=!0;else if(/^(c|ctrl|control)$/i.test(l))s=!0;else if(/^s(hift)?$/i.test(l))o=!0;else if(/^mod$/i.test(l))pFe?i=!0:s=!0;else throw new Error("Unrecognized modifier name: "+l)}return r&&(n="Alt-"+n),s&&(n="Ctrl-"+n),i&&(n="Meta-"+n),o&&(n="Shift-"+n),n}function gFe(t){let e=Object.create(null);for(let n in t)e[mFe(n)]=t[n];return e}function f9(t,e,n=!0){return e.altKey&&(t="Alt-"+t),e.ctrlKey&&(t="Ctrl-"+t),e.metaKey&&(t="Meta-"+t),n&&e.shiftKey&&(t="Shift-"+t),t}function yFe(t){return new Sr({props:{handleKeyDown:lD(t)}})}function lD(t){let e=gFe(t);return function(n,r){let s=fFe(r),o,i=e[f9(s,r)];if(i&&i(n.state,n.dispatch,n))return!0;if(s.length==1&&s!=" "){if(r.shiftKey){let a=e[f9(s,r,!1)];if(a&&a(n.state,n.dispatch,n))return!0}if((r.altKey||r.metaKey||r.ctrlKey)&&!(hFe&&r.ctrlKey&&r.altKey)&&(o=fd[r.keyCode])&&o!=s){let a=e[f9(o,r)];if(a&&a(n.state,n.dispatch,n))return!0}}return!1}}var vFe=Object.defineProperty,cD=(t,e)=>{for(var n in e)vFe(t,n,{get:e[n],enumerable:!0})};function US(t){const{state:e,transaction:n}=t;let{selection:r}=n,{doc:s}=n,{storedMarks:o}=n;return{...e,apply:e.apply.bind(e),applyTransaction:e.applyTransaction.bind(e),plugins:e.plugins,schema:e.schema,reconfigure:e.reconfigure.bind(e),toJSON:e.toJSON.bind(e),get storedMarks(){return o},get selection(){return r},get doc(){return s},get tr(){return r=n.selection,s=n.doc,o=n.storedMarks,n}}}var VS=class{constructor(t){this.editor=t.editor,this.rawCommands=this.editor.extensionManager.commands,this.customState=t.state}get hasCustomState(){return!!this.customState}get state(){return this.customState||this.editor.state}get commands(){const{rawCommands:t,editor:e,state:n}=this,{view:r}=e,{tr:s}=n,o=this.buildProps(s);return Object.fromEntries(Object.entries(t).map(([i,a])=>[i,(...c)=>{const u=a(...c)(o);return!s.getMeta("preventDispatch")&&!this.hasCustomState&&r.dispatch(s),u}]))}get chain(){return()=>this.createChain()}get can(){return()=>this.createCan()}createChain(t,e=!0){const{rawCommands:n,editor:r,state:s}=this,{view:o}=r,i=[],a=!!t,l=t||s.tr,c=()=>(!a&&e&&!l.getMeta("preventDispatch")&&!this.hasCustomState&&o.dispatch(l),i.every(f=>f===!0)),u={...Object.fromEntries(Object.entries(n).map(([f,h])=>[f,(...y)=>{const v=this.buildProps(l,e),b=h(...y)(v);return i.push(b),u}])),run:c};return u}createCan(t){const{rawCommands:e,state:n}=this,r=!1,s=t||n.tr,o=this.buildProps(s,r);return{...Object.fromEntries(Object.entries(e).map(([a,l])=>[a,(...c)=>l(...c)({...o,dispatch:void 0})])),chain:()=>this.createChain(s,r)}}buildProps(t,e=!0){const{rawCommands:n,editor:r,state:s}=this,{view:o}=r,i={tr:t,editor:r,view:o,state:US({state:s,transaction:t}),dispatch:e?()=>{}:void 0,chain:()=>this.createChain(t,e),can:()=>this.createCan(t),get commands(){return Object.fromEntries(Object.entries(n).map(([a,l])=>[a,(...c)=>l(...c)(i)]))}};return i}},Tre={};cD(Tre,{blur:()=>bFe,clearContent:()=>xFe,clearNodes:()=>wFe,command:()=>SFe,createParagraphNear:()=>CFe,cut:()=>kFe,deleteCurrentNode:()=>EFe,deleteNode:()=>TFe,deleteRange:()=>MFe,deleteSelection:()=>jFe,enter:()=>AFe,exitCode:()=>_Fe,extendMarkRange:()=>RFe,first:()=>DFe,focus:()=>OFe,forEach:()=>NFe,insertContent:()=>LFe,insertContentAt:()=>zFe,joinBackward:()=>HFe,joinDown:()=>BFe,joinForward:()=>UFe,joinItemBackward:()=>VFe,joinItemForward:()=>qFe,joinTextblockBackward:()=>WFe,joinTextblockForward:()=>YFe,joinUp:()=>PFe,keyboardShortcut:()=>KFe,lift:()=>XFe,liftEmptyBlock:()=>ZFe,liftListItem:()=>QFe,newlineInCode:()=>JFe,resetAttributes:()=>eze,scrollIntoView:()=>tze,selectAll:()=>nze,selectNodeBackward:()=>rze,selectNodeForward:()=>sze,selectParentNode:()=>oze,selectTextblockEnd:()=>ize,selectTextblockStart:()=>aze,setContent:()=>lze,setMark:()=>Tze,setMeta:()=>Mze,setNode:()=>jze,setNodeSelection:()=>Aze,setTextDirection:()=>_ze,setTextSelection:()=>Rze,sinkListItem:()=>Dze,splitBlock:()=>Ize,splitListItem:()=>Oze,toggleList:()=>Nze,toggleMark:()=>Lze,toggleNode:()=>$ze,toggleWrap:()=>Fze,undoInputRule:()=>zze,unsetAllMarks:()=>Pze,unsetMark:()=>Bze,unsetTextDirection:()=>Hze,updateAttributes:()=>Uze,wrapIn:()=>Vze,wrapInList:()=>qze});var bFe=()=>({editor:t,view:e})=>(requestAnimationFrame(()=>{var n;t.isDestroyed||(e.dom.blur(),(n=window==null?void 0:window.getSelection())==null||n.removeAllRanges())}),!0),xFe=(t=!0)=>({commands:e})=>e.setContent("",{emitUpdate:t}),wFe=()=>({state:t,tr:e,dispatch:n})=>{const{selection:r}=e,{ranges:s}=r;return n&&s.forEach(({$from:o,$to:i})=>{t.doc.nodesBetween(o.pos,i.pos,(a,l)=>{if(a.type.isText)return;const{doc:c,mapping:u}=e,f=c.resolve(u.map(l)),h=c.resolve(u.map(l+a.nodeSize)),m=f.blockRange(h);if(!m)return;const y=Qm(m);if(a.type.isTextblock){const{defaultType:v}=f.parent.contentMatchAt(f.index());e.setNodeMarkup(m.start,v)}(y||y===0)&&e.lift(m,y)})}),!0},SFe=t=>e=>t(e),CFe=()=>({state:t,dispatch:e})=>Bne(t,e),kFe=(t,e)=>({editor:n,tr:r})=>{const{state:s}=n,o=s.doc.slice(t.from,t.to);r.deleteRange(t.from,t.to);const i=r.mapping.map(e);return r.insert(i,o.content),r.setSelection(new ln(r.doc.resolve(Math.max(i-1,0)))),!0},EFe=()=>({tr:t,dispatch:e})=>{const{selection:n}=t,r=n.$anchor.node();if(r.content.size>0)return!1;const s=t.selection.$anchor;for(let o=s.depth;o>0;o-=1)if(s.node(o).type===r.type){if(e){const a=s.before(o),l=s.after(o);t.delete(a,l).scrollIntoView()}return!0}return!1};function Cs(t,e){if(typeof t=="string"){if(!e.nodes[t])throw Error(`There is no node type named '${t}'. Maybe you forgot to add the extension?`);return e.nodes[t]}return t}var TFe=t=>({tr:e,state:n,dispatch:r})=>{const s=Cs(t,n.schema),o=e.selection.$anchor;for(let i=o.depth;i>0;i-=1)if(o.node(i).type===s){if(r){const l=o.before(i),c=o.after(i);e.delete(l,c).scrollIntoView()}return!0}return!1},MFe=t=>({tr:e,dispatch:n})=>{const{from:r,to:s}=t;return n&&e.delete(r,s),!0},jFe=()=>({state:t,dispatch:e})=>GR(t,e),AFe=()=>({commands:t})=>t.keyboardShortcut("Enter"),_Fe=()=>({state:t,dispatch:e})=>pLe(t,e);function uD(t){return Object.prototype.toString.call(t)==="[object RegExp]"}function W3(t,e,n={strict:!0}){const r=Object.keys(e);return r.length?r.every(s=>n.strict?e[s]===t[s]:uD(e[s])?e[s].test(t[s]):e[s]===t[s]):!0}function Mre(t,e,n={}){return t.find(r=>r.type===e&&W3(Object.fromEntries(Object.keys(n).map(s=>[s,r.attrs[s]])),n))}function KH(t,e,n={}){return!!Mre(t,e,n)}function dD(t,e,n){var r;if(!t||!e)return;let s=t.parent.childAfter(t.parentOffset);if((!s.node||!s.node.marks.some(u=>u.type===e))&&(s=t.parent.childBefore(t.parentOffset)),!s.node||!s.node.marks.some(u=>u.type===e)||(n=n||((r=s.node.marks[0])==null?void 0:r.attrs),!Mre([...s.node.marks],e,n)))return;let i=s.index,a=t.start()+s.offset,l=i+1,c=a+s.node.nodeSize;for(;i>0&&KH([...t.parent.child(i-1).marks],e,n);)i-=1,a-=t.parent.child(i).nodeSize;for(;l<t.parent.childCount&&KH([...t.parent.child(l).marks],e,n);)c+=t.parent.child(l).nodeSize,l+=1;return{from:a,to:c}}function Yc(t,e){if(typeof t=="string"){if(!e.marks[t])throw Error(`There is no mark type named '${t}'. Maybe you forgot to add the extension?`);return e.marks[t]}return t}var RFe=(t,e={})=>({tr:n,state:r,dispatch:s})=>{const o=Yc(t,r.schema),{doc:i,selection:a}=n,{$from:l,from:c,to:u}=a;if(s){const f=dD(l,o,e);if(f&&f.from<=c&&f.to>=u){const h=ln.create(i,f.from,f.to);n.setSelection(h)}}return!0},DFe=t=>e=>{const n=typeof t=="function"?t(e):t;for(let r=0;r<n.length;r+=1)if(n[r](e))return!0;return!1};function fD(t){return t instanceof ln}function hc(t=0,e=0,n=0){return Math.min(Math.max(t,e),n)}function jre(t,e=null){if(!e)return null;const n=hn.atStart(t),r=hn.atEnd(t);if(e==="start"||e===!0)return n;if(e==="end")return r;const s=n.from,o=r.to;return e==="all"?ln.create(t,hc(0,s,o),hc(t.content.size,s,o)):ln.create(t,hc(e,s,o),hc(e,s,o))}function ZT(){return navigator.platform==="Android"||/android/i.test(navigator.userAgent)}function Yg(){return["iPad Simulator","iPhone Simulator","iPod Simulator","iPad","iPhone","iPod"].includes(navigator.platform)||navigator.userAgent.includes("Mac")&&"ontouchend"in document}function IFe(){return typeof navigator<"u"?/^((?!chrome|android).)*safari/i.test(navigator.userAgent):!1}var OFe=(t=null,e={})=>({editor:n,view:r,tr:s,dispatch:o})=>{e={scrollIntoView:!0,...e};const i=()=>{(Yg()||ZT())&&r.dom.focus(),IFe()&&!Yg()&&!ZT()&&r.dom.focus({preventScroll:!0}),requestAnimationFrame(()=>{n.isDestroyed||(r.focus(),e!=null&&e.scrollIntoView&&n.commands.scrollIntoView())})};try{if(r.hasFocus()&&t===null||t===!1)return!0}catch{return!1}if(o&&t===null&&!fD(n.state.selection))return i(),!0;const a=jre(s.doc,t)||n.state.selection,l=n.state.selection.eq(a);return o&&(l||s.setSelection(a),l&&s.storedMarks&&s.setStoredMarks(s.storedMarks),i()),!0},NFe=(t,e)=>n=>t.every((r,s)=>e(r,{...n,index:s})),LFe=(t,e)=>({tr:n,commands:r})=>r.insertContentAt({from:n.selection.from,to:n.selection.to},t,e),Are=t=>{const e=t.childNodes;for(let n=e.length-1;n>=0;n-=1){const r=e[n];r.nodeType===3&&r.nodeValue&&/^(\n\s\s|\n)$/.test(r.nodeValue)?t.removeChild(r):r.nodeType===1&&Are(r)}return t};function cb(t){if(typeof window>"u")throw new Error("[tiptap error]: there is no window object available, so this function cannot be used");const e=`<body>${t}</body>`,n=new window.DOMParser().parseFromString(e,"text/html").body;return Are(n)}function Gg(t,e,n){if(t instanceof Ju||t instanceof ct)return t;n={slice:!0,parseOptions:{},...n};const r=typeof t=="object"&&t!==null,s=typeof t=="string";if(r)try{if(Array.isArray(t)&&t.length>0)return ct.fromArray(t.map(a=>e.nodeFromJSON(a)));const i=e.nodeFromJSON(t);return n.errorOnInvalidContent&&i.check(),i}catch(o){if(n.errorOnInvalidContent)throw new Error("[tiptap error]: Invalid JSON content",{cause:o});return console.warn("[tiptap warn]: Invalid content.","Passed value:",t,"Error:",o),Gg("",e,n)}if(s){if(n.errorOnInvalidContent){let i=!1,a="";const l=new hne({topNode:e.spec.topNode,marks:e.spec.marks,nodes:e.spec.nodes.append({__tiptap__private__unknown__catch__all__node:{content:"inline*",group:"block",parseDOM:[{tag:"*",getAttrs:c=>(i=!0,a=typeof c=="string"?c:c.outerHTML,null)}]}})});if(n.slice?Q0.fromSchema(l).parseSlice(cb(t),n.parseOptions):Q0.fromSchema(l).parse(cb(t),n.parseOptions),n.errorOnInvalidContent&&i)throw new Error("[tiptap error]: Invalid HTML content",{cause:new Error(`Invalid element found: ${a}`)})}const o=Q0.fromSchema(e);return n.slice?o.parseSlice(cb(t),n.parseOptions).content:o.parse(cb(t),n.parseOptions)}return Gg("",e,n)}function $Fe(t,e,n){const r=t.steps.length-1;if(r<e)return;const s=t.steps[r];if(!(s instanceof Os||s instanceof $s))return;const o=t.mapping.maps[r];let i=0;o.forEach((a,l,c,u)=>{i===0&&(i=u)}),t.setSelection(hn.near(t.doc.resolve(i),n))}var FFe=t=>!("type"in t),zFe=(t,e,n)=>({tr:r,dispatch:s,editor:o})=>{var i;if(s){n={parseOptions:o.options.parseOptions,updateSelection:!0,applyInputRules:!1,applyPasteRules:!1,...n};let a;const l=b=>{o.emit("contentError",{editor:o,error:b,disableCollaboration:()=>{"collaboration"in o.storage&&typeof o.storage.collaboration=="object"&&o.storage.collaboration&&(o.storage.collaboration.isDisabled=!0)}})},c={preserveWhitespace:"full",...n.parseOptions};if(!n.errorOnInvalidContent&&!o.options.enableContentCheck&&o.options.emitContentError)try{Gg(e,o.schema,{parseOptions:c,errorOnInvalidContent:!0})}catch(b){l(b)}try{a=Gg(e,o.schema,{parseOptions:c,errorOnInvalidContent:(i=n.errorOnInvalidContent)!=null?i:o.options.enableContentCheck})}catch(b){return l(b),!1}let{from:u,to:f}=typeof t=="number"?{from:t,to:t}:{from:t.from,to:t.to},h=!0,m=!0;if((FFe(a)?a:[a]).forEach(b=>{b.check(),h=h?b.isText&&b.marks.length===0:!1,m=m?b.isBlock:!1}),u===f&&m){const{parent:b}=r.doc.resolve(u);b.isTextblock&&!b.type.spec.code&&!b.childCount&&(u-=1,f+=1)}let v;if(h){if(Array.isArray(e))v=e.map(b=>b.text||"").join("");else if(e instanceof ct){let b="";e.forEach(w=>{w.text&&(b+=w.text)}),v=b}else typeof e=="object"&&e&&e.text?v=e.text:v=e;r.insertText(v,u,f)}else{v=a;const b=r.doc.resolve(u),w=b.node(),C=b.parentOffset===0,k=w.isText||w.isTextblock,E=w.content.size>0;C&&k&&E&&(u=Math.max(0,u-1)),r.replaceWith(u,f,v)}n.updateSelection&&$Fe(r,r.steps.length-1,-1),n.applyInputRules&&r.setMeta("applyInputRules",{from:u,text:v}),n.applyPasteRules&&r.setMeta("applyPasteRules",{from:u,text:v})}return!0},PFe=()=>({state:t,dispatch:e})=>uLe(t,e),BFe=()=>({state:t,dispatch:e})=>dLe(t,e),HFe=()=>({state:t,dispatch:e})=>One(t,e),UFe=()=>({state:t,dispatch:e})=>Fne(t,e),VFe=()=>({state:t,dispatch:e,tr:n})=>{try{const r=$S(t.doc,t.selection.$from.pos,-1);return r==null?!1:(n.join(r,2),e&&e(n),!0)}catch{return!1}},qFe=()=>({state:t,dispatch:e,tr:n})=>{try{const r=$S(t.doc,t.selection.$from.pos,1);return r==null?!1:(n.join(r,2),e&&e(n),!0)}catch{return!1}},WFe=()=>({state:t,dispatch:e})=>lLe(t,e),YFe=()=>({state:t,dispatch:e})=>cLe(t,e);function _re(){return typeof navigator<"u"?/Mac/.test(navigator.platform):!1}function GFe(t){const e=t.split(/-(?!$)/);let n=e[e.length-1];n==="Space"&&(n=" ");let r,s,o,i;for(let a=0;a<e.length-1;a+=1){const l=e[a];if(/^(cmd|meta|m)$/i.test(l))i=!0;else if(/^a(lt)?$/i.test(l))r=!0;else if(/^(c|ctrl|control)$/i.test(l))s=!0;else if(/^s(hift)?$/i.test(l))o=!0;else if(/^mod$/i.test(l))Yg()||_re()?i=!0:s=!0;else throw new Error(`Unrecognized modifier name: ${l}`)}return r&&(n=`Alt-${n}`),s&&(n=`Ctrl-${n}`),i&&(n=`Meta-${n}`),o&&(n=`Shift-${n}`),n}var KFe=t=>({editor:e,view:n,tr:r,dispatch:s})=>{const o=GFe(t).split(/-(?!$)/),i=o.find(c=>!["Alt","Ctrl","Meta","Shift"].includes(c)),a=new KeyboardEvent("keydown",{key:i==="Space"?" ":i,altKey:o.includes("Alt"),ctrlKey:o.includes("Ctrl"),metaKey:o.includes("Meta"),shiftKey:o.includes("Shift"),bubbles:!0,cancelable:!0}),l=e.captureTransaction(()=>{n.someProp("handleKeyDown",c=>c(n,a))});return l==null||l.steps.forEach(c=>{const u=c.map(r.mapping);u&&s&&r.maybeStep(u)}),!0};function pd(t,e,n={}){const{from:r,to:s,empty:o}=t.selection,i=e?Cs(e,t.schema):null,a=[];t.doc.nodesBetween(r,s,(f,h)=>{if(f.isText)return;const m=Math.max(r,h),y=Math.min(s,h+f.nodeSize);a.push({node:f,from:m,to:y})});const l=s-r,c=a.filter(f=>i?i.name===f.node.type.name:!0).filter(f=>W3(f.node.attrs,n,{strict:!1}));return o?!!c.length:c.reduce((f,h)=>f+h.to-h.from,0)>=l}var XFe=(t,e={})=>({state:n,dispatch:r})=>{const s=Cs(t,n.schema);return pd(n,s,e)?fLe(n,r):!1},ZFe=()=>({state:t,dispatch:e})=>Hne(t,e),QFe=t=>({state:e,dispatch:n})=>{const r=Cs(t,e.schema);return kLe(r)(e,n)},JFe=()=>({state:t,dispatch:e})=>Pne(t,e);function qS(t,e){return e.nodes[t]?"node":e.marks[t]?"mark":null}function XH(t,e){const n=typeof e=="string"?[e]:e;return Object.keys(t).reduce((r,s)=>(n.includes(s)||(r[s]=t[s]),r),{})}var eze=(t,e)=>({tr:n,state:r,dispatch:s})=>{let o=null,i=null;const a=qS(typeof t=="string"?t:t.name,r.schema);if(!a)return!1;a==="node"&&(o=Cs(t,r.schema)),a==="mark"&&(i=Yc(t,r.schema));let l=!1;return n.selection.ranges.forEach(c=>{r.doc.nodesBetween(c.$from.pos,c.$to.pos,(u,f)=>{o&&o===u.type&&(l=!0,s&&n.setNodeMarkup(f,void 0,XH(u.attrs,e))),i&&u.marks.length&&u.marks.forEach(h=>{i===h.type&&(l=!0,s&&n.addMark(f,f+u.nodeSize,i.create(XH(h.attrs,e))))})})}),l},tze=()=>({tr:t,dispatch:e})=>(e&&t.scrollIntoView(),!0),nze=()=>({tr:t,dispatch:e})=>{if(e){const n=new wi(t.doc);t.setSelection(n)}return!0},rze=()=>({state:t,dispatch:e})=>Lne(t,e),sze=()=>({state:t,dispatch:e})=>zne(t,e),oze=()=>({state:t,dispatch:e})=>gLe(t,e),ize=()=>({state:t,dispatch:e})=>bLe(t,e),aze=()=>({state:t,dispatch:e})=>vLe(t,e);function QT(t,e,n={},r={}){return Gg(t,e,{slice:!1,parseOptions:n,errorOnInvalidContent:r.errorOnInvalidContent})}var lze=(t,{errorOnInvalidContent:e,emitUpdate:n=!0,parseOptions:r={}}={})=>({editor:s,tr:o,dispatch:i,commands:a})=>{const{doc:l}=o;if(r.preserveWhitespace!=="full"){const c=QT(t,s.schema,r,{errorOnInvalidContent:e??s.options.enableContentCheck});return i&&o.replaceWith(0,l.content.size,c).setMeta("preventUpdate",!n),!0}return i&&o.setMeta("preventUpdate",!n),a.insertContentAt({from:0,to:l.content.size},t,{parseOptions:r,errorOnInvalidContent:e??s.options.enableContentCheck})};function Rre(t,e){const n=Yc(e,t.schema),{from:r,to:s,empty:o}=t.selection,i=[];o?(t.storedMarks&&i.push(...t.storedMarks),i.push(...t.selection.$head.marks())):t.doc.nodesBetween(r,s,l=>{i.push(...l.marks)});const a=i.find(l=>l.type.name===n.name);return a?{...a.attrs}:{}}function Dre(t,e){const n=new WR(t);return e.forEach(r=>{r.steps.forEach(s=>{n.step(s)})}),n}function cze(t){for(let e=0;e<t.edgeCount;e+=1){const{type:n}=t.edge(e);if(n.isTextblock&&!n.hasRequiredAttrs())return n}return null}function uze(t,e,n){const r=[];return t.nodesBetween(e.from,e.to,(s,o)=>{n(s)&&r.push({node:s,pos:o})}),r}function Ire(t,e){for(let n=t.depth;n>0;n-=1){const r=t.node(n);if(e(r))return{pos:n>0?t.before(n):0,start:t.start(n),depth:n,node:r}}}function WS(t){return e=>Ire(e.$from,t)}function tn(t,e,n){return t.config[e]===void 0&&t.parent?tn(t.parent,e,n):typeof t.config[e]=="function"?t.config[e].bind({...n,parent:t.parent?tn(t.parent,e,n):null}):t.config[e]}function pD(t){return t.map(e=>{const n={name:e.name,options:e.options,storage:e.storage},r=tn(e,"addExtensions",n);return r?[e,...pD(r())]:e}).flat(10)}function hD(t,e){const n=dp.fromSchema(e).serializeFragment(t),s=document.implementation.createHTMLDocument().createElement("div");return s.appendChild(n),s.innerHTML}function Ore(t){return typeof t=="function"}function er(t,e=void 0,...n){return Ore(t)?e?t.bind(e)(...n):t(...n):t}function dze(t={}){return Object.keys(t).length===0&&t.constructor===Object}function gm(t){const e=t.filter(s=>s.type==="extension"),n=t.filter(s=>s.type==="node"),r=t.filter(s=>s.type==="mark");return{baseExtensions:e,nodeExtensions:n,markExtensions:r}}function Nre(t){const e=[],{nodeExtensions:n,markExtensions:r}=gm(t),s=[...n,...r],o={default:null,validate:void 0,rendered:!0,renderHTML:null,parseHTML:null,keepOnSplit:!0,isRequired:!1};return t.forEach(i=>{const a={name:i.name,options:i.options,storage:i.storage,extensions:s},l=tn(i,"addGlobalAttributes",a);if(!l)return;l().forEach(u=>{u.types.forEach(f=>{Object.entries(u.attributes).forEach(([h,m])=>{e.push({type:f,name:h,attribute:{...o,...m}})})})})}),s.forEach(i=>{const a={name:i.name,options:i.options,storage:i.storage},l=tn(i,"addAttributes",a);if(!l)return;const c=l();Object.entries(c).forEach(([u,f])=>{const h={...o,...f};typeof(h==null?void 0:h.default)=="function"&&(h.default=h.default()),h!=null&&h.isRequired&&(h==null?void 0:h.default)===void 0&&delete h.default,e.push({type:i.name,name:u,attribute:h})})}),e}function rr(...t){return t.filter(e=>!!e).reduce((e,n)=>{const r={...e};return Object.entries(n).forEach(([s,o])=>{if(!r[s]){r[s]=o;return}if(s==="class"){const a=o?String(o).split(" "):[],l=r[s]?r[s].split(" "):[],c=a.filter(u=>!l.includes(u));r[s]=[...l,...c].join(" ")}else if(s==="style"){const a=o?o.split(";").map(u=>u.trim()).filter(Boolean):[],l=r[s]?r[s].split(";").map(u=>u.trim()).filter(Boolean):[],c=new Map;l.forEach(u=>{const[f,h]=u.split(":").map(m=>m.trim());c.set(f,h)}),a.forEach(u=>{const[f,h]=u.split(":").map(m=>m.trim());c.set(f,h)}),r[s]=Array.from(c.entries()).map(([u,f])=>`${u}: ${f}`).join("; ")}else r[s]=o}),r},{})}function ym(t,e){return e.filter(n=>n.type===t.type.name).filter(n=>n.attribute.rendered).map(n=>n.attribute.renderHTML?n.attribute.renderHTML(t.attrs)||{}:{[n.name]:t.attrs[n.name]}).reduce((n,r)=>rr(n,r),{})}function fze(t){return typeof t!="string"?t:t.match(/^[+-]?(?:\d*\.)?\d+$/)?Number(t):t==="true"?!0:t==="false"?!1:t}function ZH(t,e){return"style"in t?t:{...t,getAttrs:n=>{const r=t.getAttrs?t.getAttrs(n):t.attrs;if(r===!1)return!1;const s=e.reduce((o,i)=>{const a=i.attribute.parseHTML?i.attribute.parseHTML(n):fze(n.getAttribute(i.name));return a==null?o:{...o,[i.name]:a}},{});return{...r,...s}}}}function QH(t){return Object.fromEntries(Object.entries(t).filter(([e,n])=>e==="attrs"&&dze(n)?!1:n!=null))}function JH(t){var e,n;const r={};return!((e=t==null?void 0:t.attribute)!=null&&e.isRequired)&&"default"in((t==null?void 0:t.attribute)||{})&&(r.default=t.attribute.default),((n=t==null?void 0:t.attribute)==null?void 0:n.validate)!==void 0&&(r.validate=t.attribute.validate),[t.name,r]}function pze(t,e){var n;const r=Nre(t),{nodeExtensions:s,markExtensions:o}=gm(t),i=(n=s.find(c=>tn(c,"topNode")))==null?void 0:n.name,a=Object.fromEntries(s.map(c=>{const u=r.filter(w=>w.type===c.name),f={name:c.name,options:c.options,storage:c.storage,editor:e},h=t.reduce((w,C)=>{const k=tn(C,"extendNodeSchema",f);return{...w,...k?k(c):{}}},{}),m=QH({...h,content:er(tn(c,"content",f)),marks:er(tn(c,"marks",f)),group:er(tn(c,"group",f)),inline:er(tn(c,"inline",f)),atom:er(tn(c,"atom",f)),selectable:er(tn(c,"selectable",f)),draggable:er(tn(c,"draggable",f)),code:er(tn(c,"code",f)),whitespace:er(tn(c,"whitespace",f)),linebreakReplacement:er(tn(c,"linebreakReplacement",f)),defining:er(tn(c,"defining",f)),isolating:er(tn(c,"isolating",f)),attrs:Object.fromEntries(u.map(JH))}),y=er(tn(c,"parseHTML",f));y&&(m.parseDOM=y.map(w=>ZH(w,u)));const v=tn(c,"renderHTML",f);v&&(m.toDOM=w=>v({node:w,HTMLAttributes:ym(w,u)}));const b=tn(c,"renderText",f);return b&&(m.toText=b),[c.name,m]})),l=Object.fromEntries(o.map(c=>{const u=r.filter(b=>b.type===c.name),f={name:c.name,options:c.options,storage:c.storage,editor:e},h=t.reduce((b,w)=>{const C=tn(w,"extendMarkSchema",f);return{...b,...C?C(c):{}}},{}),m=QH({...h,inclusive:er(tn(c,"inclusive",f)),excludes:er(tn(c,"excludes",f)),group:er(tn(c,"group",f)),spanning:er(tn(c,"spanning",f)),code:er(tn(c,"code",f)),attrs:Object.fromEntries(u.map(JH))}),y=er(tn(c,"parseHTML",f));y&&(m.parseDOM=y.map(b=>ZH(b,u)));const v=tn(c,"renderHTML",f);return v&&(m.toDOM=b=>v({mark:b,HTMLAttributes:ym(b,u)})),[c.name,m]}));return new hne({topNode:i,nodes:a,marks:l})}function hze(t){const e=t.filter((n,r)=>t.indexOf(n)!==r);return Array.from(new Set(e))}function Y3(t){return t.sort((n,r)=>{const s=tn(n,"priority")||100,o=tn(r,"priority")||100;return s>o?-1:s<o?1:0})}function Lre(t){const e=Y3(pD(t)),n=hze(e.map(r=>r.name));return n.length&&console.warn(`[tiptap warn]: Duplicate extension names found: [${n.map(r=>`'${r}'`).join(", ")}]. This can lead to issues.`),e}function $re(t,e,n){const{from:r,to:s}=e,{blockSeparator:o=`

`,textSerializers:i={}}=n||{};let a="";return t.nodesBetween(r,s,(l,c,u,f)=>{var h;l.isBlock&&c>r&&(a+=o);const m=i==null?void 0:i[l.type.name];if(m)return u&&(a+=m({node:l,pos:c,parent:u,index:f,range:e})),!1;l.isText&&(a+=(h=l==null?void 0:l.text)==null?void 0:h.slice(Math.max(r,c)-c,s-c))}),a}function Fre(t,e){const n={from:0,to:t.content.size};return $re(t,n,e)}function mD(t){return Object.fromEntries(Object.entries(t.nodes).filter(([,e])=>e.spec.toText).map(([e,n])=>[e,n.spec.toText]))}function mze(t,e){const n=Cs(e,t.schema),{from:r,to:s}=t.selection,o=[];t.doc.nodesBetween(r,s,a=>{o.push(a)});const i=o.reverse().find(a=>a.type.name===n.name);return i?{...i.attrs}:{}}function zre(t,e){const n=qS(typeof e=="string"?e:e.name,t.schema);return n==="node"?mze(t,e):n==="mark"?Rre(t,e):{}}function gze(t,e=JSON.stringify){const n={};return t.filter(r=>{const s=e(r);return Object.prototype.hasOwnProperty.call(n,s)?!1:n[s]=!0})}function yze(t){const e=gze(t);return e.length===1?e:e.filter((n,r)=>!e.filter((o,i)=>i!==r).some(o=>n.oldRange.from>=o.oldRange.from&&n.oldRange.to<=o.oldRange.to&&n.newRange.from>=o.newRange.from&&n.newRange.to<=o.newRange.to))}function Pre(t){const{mapping:e,steps:n}=t,r=[];return e.maps.forEach((s,o)=>{const i=[];if(s.ranges.length)s.forEach((a,l)=>{i.push({from:a,to:l})});else{const{from:a,to:l}=n[o];if(a===void 0||l===void 0)return;i.push({from:a,to:l})}i.forEach(({from:a,to:l})=>{const c=e.slice(o).map(a,-1),u=e.slice(o).map(l),f=e.invert().map(c,-1),h=e.invert().map(u);r.push({oldRange:{from:f,to:h},newRange:{from:c,to:u}})})}),yze(r)}function gD(t,e,n){const r=[];return t===e?n.resolve(t).marks().forEach(s=>{const o=n.resolve(t),i=dD(o,s.type);i&&r.push({mark:s,...i})}):n.nodesBetween(t,e,(s,o)=>{!s||(s==null?void 0:s.nodeSize)===void 0||r.push(...s.marks.map(i=>({from:o,to:o+s.nodeSize,mark:i})))}),r}var vze=(t,e,n,r=20)=>{const s=t.doc.resolve(n);let o=r,i=null;for(;o>0&&i===null;){const a=s.node(o);(a==null?void 0:a.type.name)===e?i=a:o-=1}return[i,o]};function ub(t,e){return e.nodes[t]||e.marks[t]||null}function jx(t,e,n){return Object.fromEntries(Object.entries(n).filter(([r])=>{const s=t.find(o=>o.type===e&&o.name===r);return s?s.attribute.keepOnSplit:!1}))}var bze=(t,e=500)=>{let n="";const r=t.parentOffset;return t.parent.nodesBetween(Math.max(0,r-e),r,(s,o,i,a)=>{var l,c;const u=((c=(l=s.type.spec).toText)==null?void 0:c.call(l,{node:s,pos:o,parent:i,index:a}))||s.textContent||"%leaf%";n+=s.isAtom&&!s.isText?u:u.slice(0,Math.max(0,r-o))}),n};function JT(t,e,n={}){const{empty:r,ranges:s}=t.selection,o=e?Yc(e,t.schema):null;if(r)return!!(t.storedMarks||t.selection.$from.marks()).filter(f=>o?o.name===f.type.name:!0).find(f=>W3(f.attrs,n,{strict:!1}));let i=0;const a=[];if(s.forEach(({$from:f,$to:h})=>{const m=f.pos,y=h.pos;t.doc.nodesBetween(m,y,(v,b)=>{if(!v.isText&&!v.marks.length)return;const w=Math.max(m,b),C=Math.min(y,b+v.nodeSize),k=C-w;i+=k,a.push(...v.marks.map(E=>({mark:E,from:w,to:C})))})}),i===0)return!1;const l=a.filter(f=>o?o.name===f.mark.type.name:!0).filter(f=>W3(f.mark.attrs,n,{strict:!1})).reduce((f,h)=>f+h.to-h.from,0),c=a.filter(f=>o?f.mark.type!==o&&f.mark.type.excludes(o):!0).reduce((f,h)=>f+h.to-h.from,0);return(l>0?l+c:l)>=i}function xze(t,e,n={}){if(!e)return pd(t,null,n)||JT(t,null,n);const r=qS(e,t.schema);return r==="node"?pd(t,e,n):r==="mark"?JT(t,e,n):!1}var wze=(t,e)=>{const{$from:n,$to:r,$anchor:s}=t.selection;if(e){const o=WS(a=>a.type.name===e)(t.selection);if(!o)return!1;const i=t.doc.resolve(o.pos+1);return s.pos+1===i.end()}return!(r.parentOffset<r.parent.nodeSize-2||n.pos!==r.pos)},Sze=t=>{const{$from:e,$to:n}=t.selection;return!(e.parentOffset>0||e.pos!==n.pos)};function eU(t,e){return Array.isArray(e)?e.some(n=>(typeof n=="string"?n:n.name)===t.name):e}function tU(t,e){const{nodeExtensions:n}=gm(e),r=n.find(i=>i.name===t);if(!r)return!1;const s={name:r.name,options:r.options,storage:r.storage},o=er(tn(r,"group",s));return typeof o!="string"?!1:o.split(" ").includes("list")}function YS(t,{checkChildren:e=!0,ignoreWhitespace:n=!1}={}){var r;if(n){if(t.type.name==="hardBreak")return!0;if(t.isText)return/^\s*$/m.test((r=t.text)!=null?r:"")}if(t.isText)return!t.text;if(t.isAtom||t.isLeaf)return!1;if(t.content.childCount===0)return!0;if(e){let s=!0;return t.content.forEach(o=>{s!==!1&&(YS(o,{ignoreWhitespace:n,checkChildren:e})||(s=!1))}),s}return!1}function Bre(t){return t instanceof Jt}var Hre=class Ure{constructor(e){this.position=e}static fromJSON(e){return new Ure(e.position)}toJSON(){return{position:this.position}}};function Cze(t,e){const n=e.mapping.mapResult(t.position);return{position:new Hre(n.pos),mapResult:n}}function kze(t){return new Hre(t)}function Vre(t,e,n){const s=t.state.doc.content.size,o=hc(e,0,s),i=hc(n,0,s),a=t.coordsAtPos(o),l=t.coordsAtPos(i,-1),c=Math.min(a.top,l.top),u=Math.max(a.bottom,l.bottom),f=Math.min(a.left,l.left),h=Math.max(a.right,l.right),m=h-f,y=u-c,w={top:c,bottom:u,left:f,right:h,width:m,height:y,x:f,y:c};return{...w,toJSON:()=>w}}function Eze(t,e,n){var r;const{selection:s}=e;let o=null;if(fD(s)&&(o=s.$cursor),o){const a=(r=t.storedMarks)!=null?r:o.marks();return o.parent.type.allowsMarkType(n)&&(!!n.isInSet(a)||!a.some(c=>c.type.excludes(n)))}const{ranges:i}=s;return i.some(({$from:a,$to:l})=>{let c=a.depth===0?t.doc.inlineContent&&t.doc.type.allowsMarkType(n):!1;return t.doc.nodesBetween(a.pos,l.pos,(u,f,h)=>{if(c)return!1;if(u.isInline){const m=!h||h.type.allowsMarkType(n),y=!!n.isInSet(u.marks)||!u.marks.some(v=>v.type.excludes(n));c=m&&y}return!c}),c})}var Tze=(t,e={})=>({tr:n,state:r,dispatch:s})=>{const{selection:o}=n,{empty:i,ranges:a}=o,l=Yc(t,r.schema);if(s)if(i){const c=Rre(r,l);n.addStoredMark(l.create({...c,...e}))}else a.forEach(c=>{const u=c.$from.pos,f=c.$to.pos;r.doc.nodesBetween(u,f,(h,m)=>{const y=Math.max(m,u),v=Math.min(m+h.nodeSize,f);h.marks.find(w=>w.type===l)?h.marks.forEach(w=>{l===w.type&&n.addMark(y,v,l.create({...w.attrs,...e}))}):n.addMark(y,v,l.create(e))})});return Eze(r,n,l)},Mze=(t,e)=>({tr:n})=>(n.setMeta(t,e),!0),jze=(t,e={})=>({state:n,dispatch:r,chain:s})=>{const o=Cs(t,n.schema);let i;return n.selection.$anchor.sameParent(n.selection.$head)&&(i=n.selection.$anchor.parent.attrs),o.isTextblock?s().command(({commands:a})=>mH(o,{...i,...e})(n)?!0:a.clearNodes()).command(({state:a})=>mH(o,{...i,...e})(a,r)).run():(console.warn('[tiptap warn]: Currently "setNode()" only supports text block nodes.'),!1)},Aze=t=>({tr:e,dispatch:n})=>{if(n){const{doc:r}=e,s=hc(t,0,r.content.size),o=Jt.create(r,s);e.setSelection(o)}return!0},_ze=(t,e)=>({tr:n,state:r,dispatch:s})=>{const{selection:o}=r;let i,a;return typeof e=="number"?(i=e,a=e):e&&"from"in e&&"to"in e?(i=e.from,a=e.to):(i=o.from,a=o.to),s&&n.doc.nodesBetween(i,a,(l,c)=>{l.isText||n.setNodeMarkup(c,void 0,{...l.attrs,dir:t})}),!0},Rze=t=>({tr:e,dispatch:n})=>{if(n){const{doc:r}=e,{from:s,to:o}=typeof t=="number"?{from:t,to:t}:t,i=ln.atStart(r).from,a=ln.atEnd(r).to,l=hc(s,i,a),c=hc(o,i,a),u=ln.create(r,l,c);e.setSelection(u)}return!0},Dze=t=>({state:e,dispatch:n})=>{const r=Cs(t,e.schema);return MLe(r)(e,n)};function nU(t,e){const n=t.storedMarks||t.selection.$to.parentOffset&&t.selection.$from.marks();if(n){const r=n.filter(s=>e==null?void 0:e.includes(s.type.name));t.tr.ensureMarks(r)}}var Ize=({keepMarks:t=!0}={})=>({tr:e,state:n,dispatch:r,editor:s})=>{const{selection:o,doc:i}=e,{$from:a,$to:l}=o,c=s.extensionManager.attributes,u=jx(c,a.node().type.name,a.node().attrs);if(o instanceof Jt&&o.node.isBlock)return!a.parentOffset||!wc(i,a.pos)?!1:(r&&(t&&nU(n,s.extensionManager.splittableMarks),e.split(a.pos).scrollIntoView()),!0);if(!a.parent.isBlock)return!1;const f=l.parentOffset===l.parent.content.size,h=a.depth===0?void 0:cze(a.node(-1).contentMatchAt(a.indexAfter(-1)));let m=f&&h?[{type:h,attrs:u}]:void 0,y=wc(e.doc,e.mapping.map(a.pos),1,m);if(!m&&!y&&wc(e.doc,e.mapping.map(a.pos),1,h?[{type:h}]:void 0)&&(y=!0,m=h?[{type:h,attrs:u}]:void 0),r){if(y&&(o instanceof ln&&e.deleteSelection(),e.split(e.mapping.map(a.pos),1,m),h&&!f&&!a.parentOffset&&a.parent.type!==h)){const v=e.mapping.map(a.before()),b=e.doc.resolve(v);a.node(-1).canReplaceWith(b.index(),b.index()+1,h)&&e.setNodeMarkup(e.mapping.map(a.before()),h)}t&&nU(n,s.extensionManager.splittableMarks),e.scrollIntoView()}return y},Oze=(t,e={})=>({tr:n,state:r,dispatch:s,editor:o})=>{var i;const a=Cs(t,r.schema),{$from:l,$to:c}=r.selection,u=r.selection.node;if(u&&u.isBlock||l.depth<2||!l.sameParent(c))return!1;const f=l.node(-1);if(f.type!==a)return!1;const h=o.extensionManager.attributes;if(l.parent.content.size===0&&l.node(-1).childCount===l.indexAfter(-1)){if(l.depth===2||l.node(-3).type!==a||l.index(-2)!==l.node(-2).childCount-1)return!1;if(s){let w=ct.empty;const C=l.index(-1)?1:l.index(-2)?2:3;for(let _=l.depth-C;_>=l.depth-3;_-=1)w=ct.from(l.node(_).copy(w));const k=l.indexAfter(-1)<l.node(-2).childCount?1:l.indexAfter(-2)<l.node(-3).childCount?2:3,E={...jx(h,l.node().type.name,l.node().attrs),...e},j=((i=a.contentMatch.defaultType)==null?void 0:i.createAndFill(E))||void 0;w=w.append(ct.from(a.createAndFill(null,j)||void 0));const A=l.before(l.depth-(C-1));n.replace(A,l.after(-k),new _t(w,4-C,0));let M=-1;n.doc.nodesBetween(A,n.doc.content.size,(_,D)=>{if(M>-1)return!1;_.isTextblock&&_.content.size===0&&(M=D+1)}),M>-1&&n.setSelection(ln.near(n.doc.resolve(M))),n.scrollIntoView()}return!0}const m=c.pos===l.end()?f.contentMatchAt(0).defaultType:null,y={...jx(h,f.type.name,f.attrs),...e},v={...jx(h,l.node().type.name,l.node().attrs),...e};n.delete(l.pos,c.pos);const b=m?[{type:a,attrs:y},{type:m,attrs:v}]:[{type:a,attrs:y}];if(!wc(n.doc,l.pos,2))return!1;if(s){const{selection:w,storedMarks:C}=r,{splittableMarks:k}=o.extensionManager,E=C||w.$to.parentOffset&&w.$from.marks();if(n.split(l.pos,2,b).scrollIntoView(),!E||!s)return!0;const j=E.filter(A=>k.includes(A.type.name));n.ensureMarks(j)}return!0},p9=(t,e)=>{const n=WS(i=>i.type===e)(t.selection);if(!n)return!0;const r=t.doc.resolve(Math.max(0,n.pos-1)).before(n.depth);if(r===void 0)return!0;const s=t.doc.nodeAt(r);return n.node.type===(s==null?void 0:s.type)&&Dd(t.doc,n.pos)&&t.join(n.pos),!0},h9=(t,e)=>{const n=WS(i=>i.type===e)(t.selection);if(!n)return!0;const r=t.doc.resolve(n.start).after(n.depth);if(r===void 0)return!0;const s=t.doc.nodeAt(r);return n.node.type===(s==null?void 0:s.type)&&Dd(t.doc,r)&&t.join(r),!0},Nze=(t,e,n,r={})=>({editor:s,tr:o,state:i,dispatch:a,chain:l,commands:c,can:u})=>{const{extensions:f,splittableMarks:h}=s.extensionManager,m=Cs(t,i.schema),y=Cs(e,i.schema),{selection:v,storedMarks:b}=i,{$from:w,$to:C}=v,k=w.blockRange(C),E=b||v.$to.parentOffset&&v.$from.marks();if(!k)return!1;const j=WS(A=>tU(A.type.name,f))(v);if(k.depth>=1&&j&&k.depth-j.depth<=1){if(j.node.type===m)return c.liftListItem(y);if(tU(j.node.type.name,f)&&m.validContent(j.node.content)&&a)return l().command(()=>(o.setNodeMarkup(j.pos,m),!0)).command(()=>p9(o,m)).command(()=>h9(o,m)).run()}return!n||!E||!a?l().command(()=>u().wrapInList(m,r)?!0:c.clearNodes()).wrapInList(m,r).command(()=>p9(o,m)).command(()=>h9(o,m)).run():l().command(()=>{const A=u().wrapInList(m,r),M=E.filter(_=>h.includes(_.type.name));return o.ensureMarks(M),A?!0:c.clearNodes()}).wrapInList(m,r).command(()=>p9(o,m)).command(()=>h9(o,m)).run()},Lze=(t,e={},n={})=>({state:r,commands:s})=>{const{extendEmptyMarkRange:o=!1}=n,i=Yc(t,r.schema);return JT(r,i,e)?s.unsetMark(i,{extendEmptyMarkRange:o}):s.setMark(i,e)},$ze=(t,e,n={})=>({state:r,commands:s})=>{const o=Cs(t,r.schema),i=Cs(e,r.schema),a=pd(r,o,n);let l;return r.selection.$anchor.sameParent(r.selection.$head)&&(l=r.selection.$anchor.parent.attrs),a?s.setNode(i,l):s.setNode(o,{...l,...n})},Fze=(t,e={})=>({state:n,commands:r})=>{const s=Cs(t,n.schema);return pd(n,s,e)?r.lift(s):r.wrapIn(s,e)},zze=()=>({state:t,dispatch:e})=>{const n=t.plugins;for(let r=0;r<n.length;r+=1){const s=n[r];let o;if(s.spec.isInputRules&&(o=s.getState(t))){if(e){const i=t.tr,a=o.transform;for(let l=a.steps.length-1;l>=0;l-=1)i.step(a.steps[l].invert(a.docs[l]));if(o.text){const l=i.doc.resolve(o.from).marks();i.replaceWith(o.from,o.to,t.schema.text(o.text,l))}else i.delete(o.from,o.to)}return!0}}return!1},Pze=()=>({tr:t,dispatch:e})=>{const{selection:n}=t,{empty:r,ranges:s}=n;return r||e&&s.forEach(o=>{t.removeMark(o.$from.pos,o.$to.pos)}),!0},Bze=(t,e={})=>({tr:n,state:r,dispatch:s})=>{var o;const{extendEmptyMarkRange:i=!1}=e,{selection:a}=n,l=Yc(t,r.schema),{$from:c,empty:u,ranges:f}=a;if(!s)return!0;if(u&&i){let{from:h,to:m}=a;const y=(o=c.marks().find(b=>b.type===l))==null?void 0:o.attrs,v=dD(c,l,y);v&&(h=v.from,m=v.to),n.removeMark(h,m,l)}else f.forEach(h=>{n.removeMark(h.$from.pos,h.$to.pos,l)});return n.removeStoredMark(l),!0},Hze=t=>({tr:e,state:n,dispatch:r})=>{const{selection:s}=n;let o,i;return typeof t=="number"?(o=t,i=t):t&&"from"in t&&"to"in t?(o=t.from,i=t.to):(o=s.from,i=s.to),r&&e.doc.nodesBetween(o,i,(a,l)=>{if(a.isText)return;const c={...a.attrs};delete c.dir,e.setNodeMarkup(l,void 0,c)}),!0},Uze=(t,e={})=>({tr:n,state:r,dispatch:s})=>{let o=null,i=null;const a=qS(typeof t=="string"?t:t.name,r.schema);if(!a)return!1;a==="node"&&(o=Cs(t,r.schema)),a==="mark"&&(i=Yc(t,r.schema));let l=!1;return n.selection.ranges.forEach(c=>{const u=c.$from.pos,f=c.$to.pos;let h,m,y,v;n.selection.empty?r.doc.nodesBetween(u,f,(b,w)=>{o&&o===b.type&&(l=!0,y=Math.max(w,u),v=Math.min(w+b.nodeSize,f),h=w,m=b)}):r.doc.nodesBetween(u,f,(b,w)=>{w<u&&o&&o===b.type&&(l=!0,y=Math.max(w,u),v=Math.min(w+b.nodeSize,f),h=w,m=b),w>=u&&w<=f&&(o&&o===b.type&&(l=!0,s&&n.setNodeMarkup(w,void 0,{...b.attrs,...e})),i&&b.marks.length&&b.marks.forEach(C=>{if(i===C.type&&(l=!0,s)){const k=Math.max(w,u),E=Math.min(w+b.nodeSize,f);n.addMark(k,E,i.create({...C.attrs,...e}))}}))}),m&&(h!==void 0&&s&&n.setNodeMarkup(h,void 0,{...m.attrs,...e}),i&&m.marks.length&&m.marks.forEach(b=>{i===b.type&&s&&n.addMark(y,v,i.create({...b.attrs,...e}))}))}),l},Vze=(t,e={})=>({state:n,dispatch:r})=>{const s=Cs(t,n.schema);return xLe(s,e)(n,r)},qze=(t,e={})=>({state:n,dispatch:r})=>{const s=Cs(t,n.schema);return wLe(s,e)(n,r)},Wze=class{constructor(){this.callbacks={}}on(t,e){return this.callbacks[t]||(this.callbacks[t]=[]),this.callbacks[t].push(e),this}emit(t,...e){const n=this.callbacks[t];return n&&n.forEach(r=>r.apply(this,e)),this}off(t,e){const n=this.callbacks[t];return n&&(e?this.callbacks[t]=n.filter(r=>r!==e):delete this.callbacks[t]),this}once(t,e){const n=(...r)=>{this.off(t,n),e.apply(this,r)};return this.on(t,n)}removeAllListeners(){this.callbacks={}}},GS=class{constructor(t){var e;this.find=t.find,this.handler=t.handler,this.undoable=(e=t.undoable)!=null?e:!0}},Yze=(t,e)=>{if(uD(e))return e.exec(t);const n=e(t);if(!n)return null;const r=[n.text];return r.index=n.index,r.input=t,r.data=n.data,n.replaceWith&&(n.text.includes(n.replaceWith)||console.warn('[tiptap warn]: "inputRuleMatch.replaceWith" must be part of "inputRuleMatch.text".'),r.push(n.replaceWith)),r};function db(t){var e;const{editor:n,from:r,to:s,text:o,rules:i,plugin:a}=t,{view:l}=n;if(l.composing)return!1;const c=l.state.doc.resolve(r);if(c.parent.type.spec.code||(e=c.nodeBefore||c.nodeAfter)!=null&&e.marks.find(h=>h.type.spec.code))return!1;let u=!1;const f=bze(c)+o;return i.forEach(h=>{if(u)return;const m=Yze(f,h.find);if(!m)return;const y=l.state.tr,v=US({state:l.state,transaction:y}),b={from:r-(m[0].length-o.length),to:s},{commands:w,chain:C,can:k}=new VS({editor:n,state:v});h.handler({state:v,range:b,match:m,commands:w,chain:C,can:k})===null||!y.steps.length||(h.undoable&&y.setMeta(a,{transform:y,from:r,to:s,text:o}),l.dispatch(y),u=!0)}),u}function Gze(t){const{editor:e,rules:n}=t,r=new Sr({state:{init(){return null},apply(s,o,i){const a=s.getMeta(r);if(a)return a;const l=s.getMeta("applyInputRules");return!!l&&setTimeout(()=>{let{text:u}=l;typeof u=="string"?u=u:u=hD(ct.from(u),i.schema);const{from:f}=l,h=f+u.length;db({editor:e,from:f,to:h,text:u,rules:n,plugin:r})}),s.selectionSet||s.docChanged?null:o}},props:{handleTextInput(s,o,i,a){return db({editor:e,from:o,to:i,text:a,rules:n,plugin:r})},handleDOMEvents:{compositionend:s=>(setTimeout(()=>{const{$cursor:o}=s.state.selection;o&&db({editor:e,from:o.pos,to:o.pos,text:"",rules:n,plugin:r})}),!1)},handleKeyDown(s,o){if(o.key!=="Enter")return!1;const{$cursor:i}=s.state.selection;return i?db({editor:e,from:i.pos,to:i.pos,text:`
`,rules:n,plugin:r}):!1}},isInputRules:!0});return r}function Kze(t){return Object.prototype.toString.call(t).slice(8,-1)}function fb(t){return Kze(t)!=="Object"?!1:t.constructor===Object&&Object.getPrototypeOf(t)===Object.prototype}function qre(t,e){const n={...t};return fb(t)&&fb(e)&&Object.keys(e).forEach(r=>{fb(e[r])&&fb(t[r])?n[r]=qre(t[r],e[r]):n[r]=e[r]}),n}var yD=class{constructor(t={}){this.type="extendable",this.parent=null,this.child=null,this.name="",this.config={name:this.name},this.config={...this.config,...t},this.name=this.config.name}get options(){return{...er(tn(this,"addOptions",{name:this.name}))||{}}}get storage(){return{...er(tn(this,"addStorage",{name:this.name,options:this.options}))||{}}}configure(t={}){const e=this.extend({...this.config,addOptions:()=>qre(this.options,t)});return e.name=this.name,e.parent=this.parent,e}extend(t={}){const e=new this.constructor({...this.config,...t});return e.parent=this,this.child=e,e.name="name"in t?t.name:e.parent.name,e}},Wa=class Wre extends yD{constructor(){super(...arguments),this.type="mark"}static create(e={}){const n=typeof e=="function"?e():e;return new Wre(n)}static handleExit({editor:e,mark:n}){const{tr:r}=e.state,s=e.state.selection.$from;if(s.pos===s.end()){const i=s.marks();if(!!!i.find(c=>(c==null?void 0:c.type.name)===n.name))return!1;const l=i.find(c=>(c==null?void 0:c.type.name)===n.name);return l&&r.removeStoredMark(l),r.insertText(" ",s.pos),e.view.dispatch(r),!0}return!1}configure(e){return super.configure(e)}extend(e){const n=typeof e=="function"?e():e;return super.extend(n)}};function Xze(t){return typeof t=="number"}var Zze=class{constructor(t){this.find=t.find,this.handler=t.handler}},Qze=(t,e,n)=>{if(uD(e))return[...t.matchAll(e)];const r=e(t,n);return r?r.map(s=>{const o=[s.text];return o.index=s.index,o.input=t,o.data=s.data,s.replaceWith&&(s.text.includes(s.replaceWith)||console.warn('[tiptap warn]: "pasteRuleMatch.replaceWith" must be part of "pasteRuleMatch.text".'),o.push(s.replaceWith)),o}):[]};function Jze(t){const{editor:e,state:n,from:r,to:s,rule:o,pasteEvent:i,dropEvent:a}=t,{commands:l,chain:c,can:u}=new VS({editor:e,state:n}),f=[];return n.doc.nodesBetween(r,s,(m,y)=>{var v,b,w,C,k;if((b=(v=m.type)==null?void 0:v.spec)!=null&&b.code||!(m.isText||m.isTextblock||m.isInline))return;const E=(k=(C=(w=m.content)==null?void 0:w.size)!=null?C:m.nodeSize)!=null?k:0,j=Math.max(r,y),A=Math.min(s,y+E);if(j>=A)return;const M=m.isText?m.text||"":m.textBetween(j-y,A-y,void 0,"￼");Qze(M,o.find,i).forEach(D=>{if(D.index===void 0)return;const R=j+D.index+1,N=R+D[0].length,z={from:n.tr.mapping.map(R),to:n.tr.mapping.map(N)},B=o.handler({state:n,range:z,match:D,commands:l,chain:c,can:u,pasteEvent:i,dropEvent:a});f.push(B)})}),f.every(m=>m!==null)}var pb=null,ePe=t=>{var e;const n=new ClipboardEvent("paste",{clipboardData:new DataTransfer});return(e=n.clipboardData)==null||e.setData("text/html",t),n};function tPe(t){const{editor:e,rules:n}=t;let r=null,s=!1,o=!1,i=typeof ClipboardEvent<"u"?new ClipboardEvent("paste"):null,a;try{a=typeof DragEvent<"u"?new DragEvent("drop"):null}catch{a=null}const l=({state:u,from:f,to:h,rule:m,pasteEvt:y})=>{const v=u.tr,b=US({state:u,transaction:v});if(!(!Jze({editor:e,state:b,from:Math.max(f-1,0),to:h.b-1,rule:m,pasteEvent:y,dropEvent:a})||!v.steps.length)){try{a=typeof DragEvent<"u"?new DragEvent("drop"):null}catch{a=null}return i=typeof ClipboardEvent<"u"?new ClipboardEvent("paste"):null,v}};return n.map(u=>new Sr({view(f){const h=y=>{var v;r=(v=f.dom.parentElement)!=null&&v.contains(y.target)?f.dom.parentElement:null,r&&(pb=e)},m=()=>{pb&&(pb=null)};return window.addEventListener("dragstart",h),window.addEventListener("dragend",m),{destroy(){window.removeEventListener("dragstart",h),window.removeEventListener("dragend",m)}}},props:{handleDOMEvents:{drop:(f,h)=>{if(o=r===f.dom.parentElement,a=h,!o){const m=pb;m!=null&&m.isEditable&&setTimeout(()=>{const y=m.state.selection;y&&m.commands.deleteRange({from:y.from,to:y.to})},10)}return!1},paste:(f,h)=>{var m;const y=(m=h.clipboardData)==null?void 0:m.getData("text/html");return i=h,s=!!(y!=null&&y.includes("data-pm-slice")),!1}}},appendTransaction:(f,h,m)=>{const y=f[0],v=y.getMeta("uiEvent")==="paste"&&!s,b=y.getMeta("uiEvent")==="drop"&&!o,w=y.getMeta("applyPasteRules"),C=!!w;if(!v&&!b&&!C)return;if(C){let{text:j}=w;typeof j=="string"?j=j:j=hD(ct.from(j),m.schema);const{from:A}=w,M=A+j.length,_=ePe(j);return l({rule:u,state:m,from:A,to:{b:M},pasteEvt:_})}const k=h.doc.content.findDiffStart(m.doc.content),E=h.doc.content.findDiffEnd(m.doc.content);if(!(!Xze(k)||!E||k===E.b))return l({rule:u,state:m,from:k,to:E,pasteEvt:i})}}))}var KS=class{constructor(t,e){this.splittableMarks=[],this.editor=e,this.baseExtensions=t,this.extensions=Lre(t),this.schema=pze(this.extensions,e),this.setupExtensions()}get commands(){return this.extensions.reduce((t,e)=>{const n={name:e.name,options:e.options,storage:this.editor.extensionStorage[e.name],editor:this.editor,type:ub(e.name,this.schema)},r=tn(e,"addCommands",n);return r?{...t,...r()}:t},{})}get plugins(){const{editor:t}=this;return Y3([...this.extensions].reverse()).flatMap(r=>{const s={name:r.name,options:r.options,storage:this.editor.extensionStorage[r.name],editor:t,type:ub(r.name,this.schema)},o=[],i=tn(r,"addKeyboardShortcuts",s);let a={};if(r.type==="mark"&&tn(r,"exitable",s)&&(a.ArrowRight=()=>Wa.handleExit({editor:t,mark:r})),i){const h=Object.fromEntries(Object.entries(i()).map(([m,y])=>[m,()=>y({editor:t})]));a={...a,...h}}const l=yFe(a);o.push(l);const c=tn(r,"addInputRules",s);if(eU(r,t.options.enableInputRules)&&c){const h=c();if(h&&h.length){const m=Gze({editor:t,rules:h}),y=Array.isArray(m)?m:[m];o.push(...y)}}const u=tn(r,"addPasteRules",s);if(eU(r,t.options.enablePasteRules)&&u){const h=u();if(h&&h.length){const m=tPe({editor:t,rules:h});o.push(...m)}}const f=tn(r,"addProseMirrorPlugins",s);if(f){const h=f();o.push(...h)}return o})}get attributes(){return Nre(this.extensions)}get nodeViews(){const{editor:t}=this,{nodeExtensions:e}=gm(this.extensions);return Object.fromEntries(e.filter(n=>!!tn(n,"addNodeView")).map(n=>{const r=this.attributes.filter(l=>l.type===n.name),s={name:n.name,options:n.options,storage:this.editor.extensionStorage[n.name],editor:t,type:Cs(n.name,this.schema)},o=tn(n,"addNodeView",s);if(!o)return[];const i=o();if(!i)return[];const a=(l,c,u,f,h)=>{const m=ym(l,r);return i({node:l,view:c,getPos:u,decorations:f,innerDecorations:h,editor:t,extension:n,HTMLAttributes:m})};return[n.name,a]}))}dispatchTransaction(t){const{editor:e}=this;return Y3([...this.extensions].reverse()).reduceRight((r,s)=>{const o={name:s.name,options:s.options,storage:this.editor.extensionStorage[s.name],editor:e,type:ub(s.name,this.schema)},i=tn(s,"dispatchTransaction",o);return i?a=>{i.call(o,{transaction:a,next:r})}:r},t)}get markViews(){const{editor:t}=this,{markExtensions:e}=gm(this.extensions);return Object.fromEntries(e.filter(n=>!!tn(n,"addMarkView")).map(n=>{const r=this.attributes.filter(a=>a.type===n.name),s={name:n.name,options:n.options,storage:this.editor.extensionStorage[n.name],editor:t,type:Yc(n.name,this.schema)},o=tn(n,"addMarkView",s);if(!o)return[];const i=(a,l,c)=>{const u=ym(a,r);return o()({mark:a,view:l,inline:c,editor:t,extension:n,HTMLAttributes:u,updateAttributes:f=>{gPe(a,t,f)}})};return[n.name,i]}))}setupExtensions(){const t=this.extensions;this.editor.extensionStorage=Object.fromEntries(t.map(e=>[e.name,e.storage])),t.forEach(e=>{var n;const r={name:e.name,options:e.options,storage:this.editor.extensionStorage[e.name],editor:this.editor,type:ub(e.name,this.schema)};e.type==="mark"&&((n=er(tn(e,"keepOnSplit",r)))==null||n)&&this.splittableMarks.push(e.name);const s=tn(e,"onBeforeCreate",r),o=tn(e,"onCreate",r),i=tn(e,"onUpdate",r),a=tn(e,"onSelectionUpdate",r),l=tn(e,"onTransaction",r),c=tn(e,"onFocus",r),u=tn(e,"onBlur",r),f=tn(e,"onDestroy",r);s&&this.editor.on("beforeCreate",s),o&&this.editor.on("create",o),i&&this.editor.on("update",i),a&&this.editor.on("selectionUpdate",a),l&&this.editor.on("transaction",l),c&&this.editor.on("focus",c),u&&this.editor.on("blur",u),f&&this.editor.on("destroy",f)})}};KS.resolve=Lre;KS.sort=Y3;KS.flatten=pD;var nPe={};cD(nPe,{ClipboardTextSerializer:()=>Gre,Commands:()=>Kre,Delete:()=>Xre,Drop:()=>Zre,Editable:()=>Qre,FocusEvents:()=>ese,Keymap:()=>tse,Paste:()=>nse,Tabindex:()=>rse,TextDirection:()=>sse,focusEventsPluginKey:()=>Jre});var Yn=class Yre extends yD{constructor(){super(...arguments),this.type="extension"}static create(e={}){const n=typeof e=="function"?e():e;return new Yre(n)}configure(e){return super.configure(e)}extend(e){const n=typeof e=="function"?e():e;return super.extend(n)}},Gre=Yn.create({name:"clipboardTextSerializer",addOptions(){return{blockSeparator:void 0}},addProseMirrorPlugins(){return[new Sr({key:new Pr("clipboardTextSerializer"),props:{clipboardTextSerializer:()=>{const{editor:t}=this,{state:e,schema:n}=t,{doc:r,selection:s}=e,{ranges:o}=s,i=Math.min(...o.map(u=>u.$from.pos)),a=Math.max(...o.map(u=>u.$to.pos)),l=mD(n);return $re(r,{from:i,to:a},{...this.options.blockSeparator!==void 0?{blockSeparator:this.options.blockSeparator}:{},textSerializers:l})}}})]}}),Kre=Yn.create({name:"commands",addCommands(){return{...Tre}}}),Xre=Yn.create({name:"delete",onUpdate({transaction:t,appendedTransactions:e}){var n,r,s;const o=()=>{var i,a,l,c;if((c=(l=(a=(i=this.editor.options.coreExtensionOptions)==null?void 0:i.delete)==null?void 0:a.filterTransaction)==null?void 0:l.call(a,t))!=null?c:t.getMeta("y-sync$"))return;const u=Dre(t.before,[t,...e]);Pre(u).forEach(m=>{u.mapping.mapResult(m.oldRange.from).deletedAfter&&u.mapping.mapResult(m.oldRange.to).deletedBefore&&u.before.nodesBetween(m.oldRange.from,m.oldRange.to,(y,v)=>{const b=v+y.nodeSize-2,w=m.oldRange.from<=v&&b<=m.oldRange.to;this.editor.emit("delete",{type:"node",node:y,from:v,to:b,newFrom:u.mapping.map(v),newTo:u.mapping.map(b),deletedRange:m.oldRange,newRange:m.newRange,partial:!w,editor:this.editor,transaction:t,combinedTransform:u})})});const h=u.mapping;u.steps.forEach((m,y)=>{var v,b;if(m instanceof ka){const w=h.slice(y).map(m.from,-1),C=h.slice(y).map(m.to),k=h.invert().map(w,-1),E=h.invert().map(C),j=(v=u.doc.nodeAt(w-1))==null?void 0:v.marks.some(M=>M.eq(m.mark)),A=(b=u.doc.nodeAt(C))==null?void 0:b.marks.some(M=>M.eq(m.mark));this.editor.emit("delete",{type:"mark",mark:m.mark,from:m.from,to:m.to,deletedRange:{from:k,to:E},newRange:{from:w,to:C},partial:!!(A||j),editor:this.editor,transaction:t,combinedTransform:u})}})};(s=(r=(n=this.editor.options.coreExtensionOptions)==null?void 0:n.delete)==null?void 0:r.async)==null||s?setTimeout(o,0):o()}}),Zre=Yn.create({name:"drop",addProseMirrorPlugins(){return[new Sr({key:new Pr("tiptapDrop"),props:{handleDrop:(t,e,n,r)=>{this.editor.emit("drop",{editor:this.editor,event:e,slice:n,moved:r})}}})]}}),Qre=Yn.create({name:"editable",addProseMirrorPlugins(){return[new Sr({key:new Pr("editable"),props:{editable:()=>this.editor.options.editable}})]}}),Jre=new Pr("focusEvents"),ese=Yn.create({name:"focusEvents",addProseMirrorPlugins(){const{editor:t}=this;return[new Sr({key:Jre,props:{handleDOMEvents:{focus:(e,n)=>{t.isFocused=!0;const r=t.state.tr.setMeta("focus",{event:n}).setMeta("addToHistory",!1);return e.dispatch(r),!1},blur:(e,n)=>{t.isFocused=!1;const r=t.state.tr.setMeta("blur",{event:n}).setMeta("addToHistory",!1);return e.dispatch(r),!1}}}})]}}),tse=Yn.create({name:"keymap",addKeyboardShortcuts(){const t=()=>this.editor.commands.first(({commands:i})=>[()=>i.undoInputRule(),()=>i.command(({tr:a})=>{const{selection:l,doc:c}=a,{empty:u,$anchor:f}=l,{pos:h,parent:m}=f,y=f.parent.isTextblock&&h>0?a.doc.resolve(h-1):f,v=y.parent.type.spec.isolating,b=f.pos-f.parentOffset,w=v&&y.parent.childCount===1?b===f.pos:hn.atStart(c).from===h;return!u||!m.type.isTextblock||m.textContent.length||!w||w&&f.parent.type.name==="paragraph"?!1:i.clearNodes()}),()=>i.deleteSelection(),()=>i.joinBackward(),()=>i.selectNodeBackward()]),e=()=>this.editor.commands.first(({commands:i})=>[()=>i.deleteSelection(),()=>i.deleteCurrentNode(),()=>i.joinForward(),()=>i.selectNodeForward()]),r={Enter:()=>this.editor.commands.first(({commands:i})=>[()=>i.newlineInCode(),()=>i.createParagraphNear(),()=>i.liftEmptyBlock(),()=>i.splitBlock()]),"Mod-Enter":()=>this.editor.commands.exitCode(),Backspace:t,"Mod-Backspace":t,"Shift-Backspace":t,Delete:e,"Mod-Delete":e,"Mod-a":()=>this.editor.commands.selectAll()},s={...r},o={...r,"Ctrl-h":t,"Alt-Backspace":t,"Ctrl-d":e,"Ctrl-Alt-Backspace":e,"Alt-Delete":e,"Alt-d":e,"Ctrl-a":()=>this.editor.commands.selectTextblockStart(),"Ctrl-e":()=>this.editor.commands.selectTextblockEnd()};return Yg()||_re()?o:s},addProseMirrorPlugins(){return[new Sr({key:new Pr("clearDocument"),appendTransaction:(t,e,n)=>{if(t.some(v=>v.getMeta("composition")))return;const r=t.some(v=>v.docChanged)&&!e.doc.eq(n.doc),s=t.some(v=>v.getMeta("preventClearDocument"));if(!r||s)return;const{empty:o,from:i,to:a}=e.selection,l=hn.atStart(e.doc).from,c=hn.atEnd(e.doc).to;if(o||!(i===l&&a===c)||!YS(n.doc))return;const h=n.tr,m=US({state:n,transaction:h}),{commands:y}=new VS({editor:this.editor,state:m});if(y.clearNodes(),!!h.steps.length)return h}})]}}),nse=Yn.create({name:"paste",addProseMirrorPlugins(){return[new Sr({key:new Pr("tiptapPaste"),props:{handlePaste:(t,e,n)=>{this.editor.emit("paste",{editor:this.editor,event:e,slice:n})}}})]}}),rse=Yn.create({name:"tabindex",addProseMirrorPlugins(){return[new Sr({key:new Pr("tabindex"),props:{attributes:()=>this.editor.isEditable?{tabindex:"0"}:{}}})]}}),sse=Yn.create({name:"textDirection",addOptions(){return{direction:void 0}},addGlobalAttributes(){if(!this.options.direction)return[];const{nodeExtensions:t}=gm(this.extensions);return[{types:t.filter(e=>e.name!=="text").map(e=>e.name),attributes:{dir:{default:this.options.direction,parseHTML:e=>{const n=e.getAttribute("dir");return n&&(n==="ltr"||n==="rtl"||n==="auto")?n:this.options.direction},renderHTML:e=>e.dir?{dir:e.dir}:{}}}}]},addProseMirrorPlugins(){return[new Sr({key:new Pr("textDirection"),props:{attributes:()=>{const t=this.options.direction;return t?{dir:t}:{}}}})]}}),rPe=class O0{constructor(e,n,r=!1,s=null){this.currentNode=null,this.actualDepth=null,this.isBlock=r,this.resolvedPos=e,this.editor=n,this.currentNode=s}get name(){return this.node.type.name}get node(){return this.currentNode||this.resolvedPos.node()}get element(){return this.editor.view.domAtPos(this.pos).node}get depth(){var e;return(e=this.actualDepth)!=null?e:this.resolvedPos.depth}get pos(){return this.resolvedPos.pos}get content(){return this.node.content}set content(e){let n=this.from,r=this.to;if(this.isBlock){if(this.content.size===0){console.error(`You can’t set content on a block node. Tried to set content on ${this.name} at ${this.pos}`);return}n=this.from+1,r=this.to-1}this.editor.commands.insertContentAt({from:n,to:r},e)}get attributes(){return this.node.attrs}get textContent(){return this.node.textContent}get size(){return this.node.nodeSize}get from(){return this.isBlock?this.pos:this.resolvedPos.start(this.resolvedPos.depth)}get range(){return{from:this.from,to:this.to}}get to(){return this.isBlock?this.pos+this.size:this.resolvedPos.end(this.resolvedPos.depth)+(this.node.isText?0:1)}get parent(){if(this.depth===0)return null;const e=this.resolvedPos.start(this.resolvedPos.depth-1),n=this.resolvedPos.doc.resolve(e);return new O0(n,this.editor)}get before(){let e=this.resolvedPos.doc.resolve(this.from-(this.isBlock?1:2));return e.depth!==this.depth&&(e=this.resolvedPos.doc.resolve(this.from-3)),new O0(e,this.editor)}get after(){let e=this.resolvedPos.doc.resolve(this.to+(this.isBlock?2:1));return e.depth!==this.depth&&(e=this.resolvedPos.doc.resolve(this.to+3)),new O0(e,this.editor)}get children(){const e=[];return this.node.content.forEach((n,r)=>{const s=n.isBlock&&!n.isTextblock,o=n.isAtom&&!n.isText,i=n.isInline,a=this.pos+r+(o?0:1);if(a<0||a>this.resolvedPos.doc.nodeSize-2)return;const l=this.resolvedPos.doc.resolve(a);if(!s&&!i&&l.depth<=this.depth)return;const c=new O0(l,this.editor,s,s||i?n:null);s&&(c.actualDepth=this.depth+1),e.push(c)}),e}get firstChild(){return this.children[0]||null}get lastChild(){const e=this.children;return e[e.length-1]||null}closest(e,n={}){let r=null,s=this.parent;for(;s&&!r;){if(s.node.type.name===e)if(Object.keys(n).length>0){const o=s.node.attrs,i=Object.keys(n);for(let a=0;a<i.length;a+=1){const l=i[a];if(o[l]!==n[l])break}}else r=s;s=s.parent}return r}querySelector(e,n={}){return this.querySelectorAll(e,n,!0)[0]||null}querySelectorAll(e,n={},r=!1){let s=[];if(!this.children||this.children.length===0)return s;const o=Object.keys(n);return this.children.forEach(i=>{r&&s.length>0||(i.node.type.name===e&&o.every(l=>n[l]===i.node.attrs[l])&&s.push(i),!(r&&s.length>0)&&(s=s.concat(i.querySelectorAll(e,n,r))))}),s}setAttribute(e){const{tr:n}=this.editor.state;n.setNodeMarkup(this.from,void 0,{...this.node.attrs,...e}),this.editor.view.dispatch(n)}},sPe=`.ProseMirror {
  position: relative;
}

.ProseMirror {
  word-wrap: break-word;
  white-space: pre-wrap;
  white-space: break-spaces;
  -webkit-font-variant-ligatures: none;
  font-variant-ligatures: none;
  font-feature-settings: "liga" 0; /* the above doesn't seem to work in Edge */
}

.ProseMirror [contenteditable="false"] {
  white-space: normal;
}

.ProseMirror [contenteditable="false"] [contenteditable="true"] {
  white-space: pre-wrap;
}

.ProseMirror pre {
  white-space: pre-wrap;
}

img.ProseMirror-separator {
  display: inline !important;
  border: none !important;
  margin: 0 !important;
  width: 0 !important;
  height: 0 !important;
}

.ProseMirror-gapcursor {
  display: none;
  pointer-events: none;
  position: absolute;
  margin: 0;
}

.ProseMirror-gapcursor:after {
  content: "";
  display: block;
  position: absolute;
  top: -2px;
  width: 20px;
  border-top: 1px solid black;
  animation: ProseMirror-cursor-blink 1.1s steps(2, start) infinite;
}

@keyframes ProseMirror-cursor-blink {
  to {
    visibility: hidden;
  }
}

.ProseMirror-hideselection *::selection {
  background: transparent;
}

.ProseMirror-hideselection *::-moz-selection {
  background: transparent;
}

.ProseMirror-hideselection * {
  caret-color: transparent;
}

.ProseMirror-focused .ProseMirror-gapcursor {
  display: block;
}`;function oPe(t,e,n){const r=document.querySelector("style[data-tiptap-style]");if(r!==null)return r;const s=document.createElement("style");return e&&s.setAttribute("nonce",e),s.setAttribute("data-tiptap-style",""),s.innerHTML=t,document.getElementsByTagName("head")[0].appendChild(s),s}var iPe=class extends Wze{constructor(t={}){super(),this.css=null,this.className="tiptap",this.editorView=null,this.isFocused=!1,this.isInitialized=!1,this.extensionStorage={},this.instanceId=Math.random().toString(36).slice(2,9),this.options={element:typeof document<"u"?document.createElement("div"):null,content:"",injectCSS:!0,injectNonce:void 0,extensions:[],autofocus:!1,editable:!0,textDirection:void 0,editorProps:{},parseOptions:{},coreExtensionOptions:{},enableInputRules:!0,enablePasteRules:!0,enableCoreExtensions:!0,enableContentCheck:!1,emitContentError:!1,onBeforeCreate:()=>null,onCreate:()=>null,onMount:()=>null,onUnmount:()=>null,onUpdate:()=>null,onSelectionUpdate:()=>null,onTransaction:()=>null,onFocus:()=>null,onBlur:()=>null,onDestroy:()=>null,onContentError:({error:r})=>{throw r},onPaste:()=>null,onDrop:()=>null,onDelete:()=>null,enableExtensionDispatchTransaction:!0},this.isCapturingTransaction=!1,this.capturedTransaction=null,this.utils={getUpdatedPosition:Cze,createMappablePosition:kze},this.setOptions(t),this.createExtensionManager(),this.createCommandManager(),this.createSchema(),this.on("beforeCreate",this.options.onBeforeCreate),this.emit("beforeCreate",{editor:this}),this.on("mount",this.options.onMount),this.on("unmount",this.options.onUnmount),this.on("contentError",this.options.onContentError),this.on("create",this.options.onCreate),this.on("update",this.options.onUpdate),this.on("selectionUpdate",this.options.onSelectionUpdate),this.on("transaction",this.options.onTransaction),this.on("focus",this.options.onFocus),this.on("blur",this.options.onBlur),this.on("destroy",this.options.onDestroy),this.on("drop",({event:r,slice:s,moved:o})=>this.options.onDrop(r,s,o)),this.on("paste",({event:r,slice:s})=>this.options.onPaste(r,s)),this.on("delete",this.options.onDelete);const e=this.createDoc(),n=jre(e,this.options.autofocus);this.editorState=Th.create({doc:e,schema:this.schema,selection:n||void 0}),this.options.element&&this.mount(this.options.element)}mount(t){if(typeof document>"u")throw new Error("[tiptap error]: The editor cannot be mounted because there is no 'document' defined in this environment.");this.createView(t),this.emit("mount",{editor:this}),this.css&&!document.head.contains(this.css)&&document.head.appendChild(this.css),window.setTimeout(()=>{this.isDestroyed||(this.options.autofocus!==!1&&this.options.autofocus!==null&&this.commands.focus(this.options.autofocus),this.emit("create",{editor:this}),this.isInitialized=!0)},0)}unmount(){if(this.editorView){const t=this.editorView.dom;t!=null&&t.editor&&delete t.editor,this.editorView.destroy()}if(this.editorView=null,this.isInitialized=!1,this.css&&!document.querySelectorAll(`.${this.className}`).length)try{typeof this.css.remove=="function"?this.css.remove():this.css.parentNode&&this.css.parentNode.removeChild(this.css)}catch(t){console.warn("Failed to remove CSS element:",t)}this.css=null,this.emit("unmount",{editor:this})}get storage(){return this.extensionStorage}get commands(){return this.commandManager.commands}chain(){return this.commandManager.chain()}can(){return this.commandManager.can()}injectCSS(){this.options.injectCSS&&typeof document<"u"&&(this.css=oPe(sPe,this.options.injectNonce))}setOptions(t={}){this.options={...this.options,...t},!(!this.editorView||!this.state||this.isDestroyed)&&(this.options.editorProps&&this.view.setProps(this.options.editorProps),this.view.updateState(this.state))}setEditable(t,e=!0){this.setOptions({editable:t}),e&&this.emit("update",{editor:this,transaction:this.state.tr,appendedTransactions:[]})}get isEditable(){return this.options.editable&&this.view&&this.view.editable}get view(){return this.editorView?this.editorView:new Proxy({state:this.editorState,updateState:t=>{this.editorState=t},dispatch:t=>{this.dispatchTransaction(t)},composing:!1,dragging:null,editable:!0,isDestroyed:!1},{get:(t,e)=>{if(this.editorView)return this.editorView[e];if(e==="state")return this.editorState;if(e in t)return Reflect.get(t,e);throw new Error(`[tiptap error]: The editor view is not available. Cannot access view['${e}']. The editor may not be mounted yet.`)}})}get state(){return this.editorView&&(this.editorState=this.view.state),this.editorState}registerPlugin(t,e){const n=Ore(e)?e(t,[...this.state.plugins]):[...this.state.plugins,t],r=this.state.reconfigure({plugins:n});return this.view.updateState(r),r}unregisterPlugin(t){if(this.isDestroyed)return;const e=this.state.plugins;let n=e;if([].concat(t).forEach(s=>{const o=typeof s=="string"?`${s}$`:s.key;n=n.filter(i=>!i.key.startsWith(o))}),e.length===n.length)return;const r=this.state.reconfigure({plugins:n});return this.view.updateState(r),r}createExtensionManager(){var t,e;const r=[...this.options.enableCoreExtensions?[Qre,Gre.configure({blockSeparator:(e=(t=this.options.coreExtensionOptions)==null?void 0:t.clipboardTextSerializer)==null?void 0:e.blockSeparator}),Kre,ese,tse,rse,Zre,nse,Xre,sse.configure({direction:this.options.textDirection})].filter(s=>typeof this.options.enableCoreExtensions=="object"?this.options.enableCoreExtensions[s.name]!==!1:!0):[],...this.options.extensions].filter(s=>["extension","node","mark"].includes(s==null?void 0:s.type));this.extensionManager=new KS(r,this)}createCommandManager(){this.commandManager=new VS({editor:this})}createSchema(){this.schema=this.extensionManager.schema}createDoc(){let t;try{t=QT(this.options.content,this.schema,this.options.parseOptions,{errorOnInvalidContent:this.options.enableContentCheck})}catch(e){if(!(e instanceof Error)||!["[tiptap error]: Invalid JSON content","[tiptap error]: Invalid HTML content"].includes(e.message))throw e;this.emit("contentError",{editor:this,error:e,disableCollaboration:()=>{"collaboration"in this.storage&&typeof this.storage.collaboration=="object"&&this.storage.collaboration&&(this.storage.collaboration.isDisabled=!0),this.options.extensions=this.options.extensions.filter(n=>n.name!=="collaboration"),this.createExtensionManager()}}),t=QT(this.options.content,this.schema,this.options.parseOptions,{errorOnInvalidContent:!1})}return t}createView(t){const{editorProps:e,enableExtensionDispatchTransaction:n}=this.options,r=e.dispatchTransaction||this.dispatchTransaction.bind(this),s=n?this.extensionManager.dispatchTransaction(r):r;this.editorView=new Ere(t,{...e,attributes:{role:"textbox",...e==null?void 0:e.attributes},dispatchTransaction:s,state:this.editorState,markViews:this.extensionManager.markViews,nodeViews:this.extensionManager.nodeViews});const o=this.state.reconfigure({plugins:this.extensionManager.plugins});this.view.updateState(o),this.prependClass(),this.injectCSS();const i=this.view.dom;i.editor=this}createNodeViews(){this.view.isDestroyed||this.view.setProps({markViews:this.extensionManager.markViews,nodeViews:this.extensionManager.nodeViews})}prependClass(){this.view.dom.className=`${this.className} ${this.view.dom.className}`}captureTransaction(t){this.isCapturingTransaction=!0,t(),this.isCapturingTransaction=!1;const e=this.capturedTransaction;return this.capturedTransaction=null,e}dispatchTransaction(t){if(this.view.isDestroyed)return;if(this.isCapturingTransaction){if(!this.capturedTransaction){this.capturedTransaction=t;return}t.steps.forEach(c=>{var u;return(u=this.capturedTransaction)==null?void 0:u.step(c)});return}const{state:e,transactions:n}=this.state.applyTransaction(t),r=!this.state.selection.eq(e.selection),s=n.includes(t),o=this.state;if(this.emit("beforeTransaction",{editor:this,transaction:t,nextState:e}),!s)return;this.view.updateState(e),this.emit("transaction",{editor:this,transaction:t,appendedTransactions:n.slice(1)}),r&&this.emit("selectionUpdate",{editor:this,transaction:t});const i=n.findLast(c=>c.getMeta("focus")||c.getMeta("blur")),a=i==null?void 0:i.getMeta("focus"),l=i==null?void 0:i.getMeta("blur");a&&this.emit("focus",{editor:this,event:a.event,transaction:i}),l&&this.emit("blur",{editor:this,event:l.event,transaction:i}),!(t.getMeta("preventUpdate")||!n.some(c=>c.docChanged)||o.doc.eq(e.doc))&&this.emit("update",{editor:this,transaction:t,appendedTransactions:n.slice(1)})}getAttributes(t){return zre(this.state,t)}isActive(t,e){const n=typeof t=="string"?t:null,r=typeof t=="string"?e:t;return xze(this.state,n,r)}getJSON(){return this.state.doc.toJSON()}getHTML(){return hD(this.state.doc.content,this.schema)}getText(t){const{blockSeparator:e=`

`,textSerializers:n={}}=t||{};return Fre(this.state.doc,{blockSeparator:e,textSerializers:{...mD(this.schema),...n}})}get isEmpty(){return YS(this.state.doc)}destroy(){this.emit("destroy"),this.unmount(),this.removeAllListeners()}get isDestroyed(){var t,e;return(e=(t=this.editorView)==null?void 0:t.isDestroyed)!=null?e:!0}$node(t,e){var n;return((n=this.$doc)==null?void 0:n.querySelector(t,e))||null}$nodes(t,e){var n;return((n=this.$doc)==null?void 0:n.querySelectorAll(t,e))||null}$pos(t){const e=this.state.doc.resolve(t);return new rPe(e,this)}get $doc(){return this.$pos(0)}};function Yf(t){return new GS({find:t.find,handler:({state:e,range:n,match:r})=>{const s=er(t.getAttributes,void 0,r);if(s===!1||s===null)return null;const{tr:o}=e,i=r[r.length-1],a=r[0];if(i){const l=a.search(/\S/),c=n.from+a.indexOf(i),u=c+i.length;if(gD(n.from,n.to,e.doc).filter(m=>m.mark.type.excluded.find(v=>v===t.type&&v!==m.mark.type)).filter(m=>m.to>c).length)return null;u<n.to&&o.delete(u,n.to),c>n.from&&o.delete(n.from+l,c);const h=n.from+l+i.length;o.addMark(n.from+l,h,t.type.create(s||{})),o.removeStoredMark(t.type)}},undoable:t.undoable})}function ose(t){return new GS({find:t.find,handler:({state:e,range:n,match:r})=>{const s=er(t.getAttributes,void 0,r)||{},{tr:o}=e,i=n.from;let a=n.to;const l=t.type.create(s);if(r[1]){const c=r[0].lastIndexOf(r[1]);let u=i+c;u>a?u=a:a=u+r[1].length;const f=r[0][r[0].length-1];o.insertText(f,i+r[0].length-1),o.replaceWith(u,a,l)}else if(r[0]){const c=t.type.isInline?i:i-1;o.insert(c,t.type.create(s)).delete(o.mapping.map(i),o.mapping.map(a))}o.scrollIntoView()},undoable:t.undoable})}function eM(t){return new GS({find:t.find,handler:({state:e,range:n,match:r})=>{const s=e.doc.resolve(n.from),o=er(t.getAttributes,void 0,r)||{};if(!s.node(-1).canReplaceWith(s.index(-1),s.indexAfter(-1),t.type))return null;e.tr.delete(n.from,n.to).setBlockType(n.from,n.from,t.type,o)},undoable:t.undoable})}function vm(t){return new GS({find:t.find,handler:({state:e,range:n,match:r,chain:s})=>{const o=er(t.getAttributes,void 0,r)||{},i=e.tr.delete(n.from,n.to),l=i.doc.resolve(n.from).blockRange(),c=l&&qR(l,t.type,o);if(!c)return null;if(i.wrap(l,c),t.keepMarks&&t.editor){const{selection:f,storedMarks:h}=e,{splittableMarks:m}=t.editor.extensionManager,y=h||f.$to.parentOffset&&f.$from.marks();if(y){const v=y.filter(b=>m.includes(b.type.name));i.ensureMarks(v)}}if(t.keepAttributes){const f=t.type.name==="bulletList"||t.type.name==="orderedList"?"listItem":"taskList";s().updateAttributes(f,o).run()}const u=i.doc.resolve(n.from-1).nodeBefore;u&&u.type===t.type&&Dd(i.doc,n.from-1)&&(!t.joinPredicate||t.joinPredicate(r,u))&&i.join(n.from-1)},undoable:t.undoable})}var aPe=t=>"touches"in t,lPe=class{constructor(t){this.directions=["bottom-left","bottom-right","top-left","top-right"],this.minSize={height:8,width:8},this.preserveAspectRatio=!1,this.classNames={container:"",wrapper:"",handle:"",resizing:""},this.initialWidth=0,this.initialHeight=0,this.aspectRatio=1,this.isResizing=!1,this.activeHandle=null,this.startX=0,this.startY=0,this.startWidth=0,this.startHeight=0,this.isShiftKeyPressed=!1,this.lastEditableState=void 0,this.handleMap=new Map,this.handleMouseMove=a=>{if(!this.isResizing||!this.activeHandle)return;const l=a.clientX-this.startX,c=a.clientY-this.startY;this.handleResize(l,c)},this.handleTouchMove=a=>{if(!this.isResizing||!this.activeHandle)return;const l=a.touches[0];if(!l)return;const c=l.clientX-this.startX,u=l.clientY-this.startY;this.handleResize(c,u)},this.handleMouseUp=()=>{if(!this.isResizing)return;const a=this.element.offsetWidth,l=this.element.offsetHeight;this.onCommit(a,l),this.isResizing=!1,this.activeHandle=null,this.container.dataset.resizeState="false",this.classNames.resizing&&this.container.classList.remove(this.classNames.resizing),document.removeEventListener("mousemove",this.handleMouseMove),document.removeEventListener("mouseup",this.handleMouseUp),document.removeEventListener("keydown",this.handleKeyDown),document.removeEventListener("keyup",this.handleKeyUp)},this.handleKeyDown=a=>{a.key==="Shift"&&(this.isShiftKeyPressed=!0)},this.handleKeyUp=a=>{a.key==="Shift"&&(this.isShiftKeyPressed=!1)};var e,n,r,s,o,i;this.node=t.node,this.editor=t.editor,this.element=t.element,this.contentElement=t.contentElement,this.getPos=t.getPos,this.onResize=t.onResize,this.onCommit=t.onCommit,this.onUpdate=t.onUpdate,(e=t.options)!=null&&e.min&&(this.minSize={...this.minSize,...t.options.min}),(n=t.options)!=null&&n.max&&(this.maxSize=t.options.max),(r=t==null?void 0:t.options)!=null&&r.directions&&(this.directions=t.options.directions),(s=t.options)!=null&&s.preserveAspectRatio&&(this.preserveAspectRatio=t.options.preserveAspectRatio),(o=t.options)!=null&&o.className&&(this.classNames={container:t.options.className.container||"",wrapper:t.options.className.wrapper||"",handle:t.options.className.handle||"",resizing:t.options.className.resizing||""}),(i=t.options)!=null&&i.createCustomHandle&&(this.createCustomHandle=t.options.createCustomHandle),this.wrapper=this.createWrapper(),this.container=this.createContainer(),this.applyInitialSize(),this.attachHandles(),this.editor.on("update",this.handleEditorUpdate.bind(this))}get dom(){return this.container}get contentDOM(){var t;return(t=this.contentElement)!=null?t:null}handleEditorUpdate(){const t=this.editor.isEditable;t!==this.lastEditableState&&(this.lastEditableState=t,t?t&&this.handleMap.size===0&&this.attachHandles():this.removeHandles())}update(t,e,n){return t.type!==this.node.type?!1:(this.node=t,this.onUpdate?this.onUpdate(t,e,n):!0)}destroy(){this.isResizing&&(this.container.dataset.resizeState="false",this.classNames.resizing&&this.container.classList.remove(this.classNames.resizing),document.removeEventListener("mousemove",this.handleMouseMove),document.removeEventListener("mouseup",this.handleMouseUp),document.removeEventListener("keydown",this.handleKeyDown),document.removeEventListener("keyup",this.handleKeyUp),this.isResizing=!1,this.activeHandle=null),this.editor.off("update",this.handleEditorUpdate.bind(this)),this.container.remove()}createContainer(){const t=document.createElement("div");return t.dataset.resizeContainer="",t.dataset.node=this.node.type.name,t.style.display="flex",this.classNames.container&&(t.className=this.classNames.container),t.appendChild(this.wrapper),t}createWrapper(){const t=document.createElement("div");return t.style.position="relative",t.style.display="block",t.dataset.resizeWrapper="",this.classNames.wrapper&&(t.className=this.classNames.wrapper),t.appendChild(this.element),t}createHandle(t){const e=document.createElement("div");return e.dataset.resizeHandle=t,e.style.position="absolute",this.classNames.handle&&(e.className=this.classNames.handle),e}positionHandle(t,e){const n=e.includes("top"),r=e.includes("bottom"),s=e.includes("left"),o=e.includes("right");n&&(t.style.top="0"),r&&(t.style.bottom="0"),s&&(t.style.left="0"),o&&(t.style.right="0"),(e==="top"||e==="bottom")&&(t.style.left="0",t.style.right="0"),(e==="left"||e==="right")&&(t.style.top="0",t.style.bottom="0")}attachHandles(){this.directions.forEach(t=>{let e;this.createCustomHandle?e=this.createCustomHandle(t):e=this.createHandle(t),e instanceof HTMLElement||(console.warn(`[ResizableNodeView] createCustomHandle("${t}") did not return an HTMLElement. Falling back to default handle.`),e=this.createHandle(t)),this.createCustomHandle||this.positionHandle(e,t),e.addEventListener("mousedown",n=>this.handleResizeStart(n,t)),e.addEventListener("touchstart",n=>this.handleResizeStart(n,t)),this.handleMap.set(t,e),this.wrapper.appendChild(e)})}removeHandles(){this.handleMap.forEach(t=>t.remove()),this.handleMap.clear()}applyInitialSize(){const t=this.node.attrs.width,e=this.node.attrs.height;t?(this.element.style.width=`${t}px`,this.initialWidth=t):this.initialWidth=this.element.offsetWidth,e?(this.element.style.height=`${e}px`,this.initialHeight=e):this.initialHeight=this.element.offsetHeight,this.initialWidth>0&&this.initialHeight>0&&(this.aspectRatio=this.initialWidth/this.initialHeight)}handleResizeStart(t,e){t.preventDefault(),t.stopPropagation(),this.isResizing=!0,this.activeHandle=e,aPe(t)?(this.startX=t.touches[0].clientX,this.startY=t.touches[0].clientY):(this.startX=t.clientX,this.startY=t.clientY),this.startWidth=this.element.offsetWidth,this.startHeight=this.element.offsetHeight,this.startWidth>0&&this.startHeight>0&&(this.aspectRatio=this.startWidth/this.startHeight),this.getPos(),this.container.dataset.resizeState="true",this.classNames.resizing&&this.container.classList.add(this.classNames.resizing),document.addEventListener("mousemove",this.handleMouseMove),document.addEventListener("touchmove",this.handleTouchMove),document.addEventListener("mouseup",this.handleMouseUp),document.addEventListener("keydown",this.handleKeyDown),document.addEventListener("keyup",this.handleKeyUp)}handleResize(t,e){if(!this.activeHandle)return;const n=this.preserveAspectRatio||this.isShiftKeyPressed,{width:r,height:s}=this.calculateNewDimensions(this.activeHandle,t,e),o=this.applyConstraints(r,s,n);this.element.style.width=`${o.width}px`,this.element.style.height=`${o.height}px`,this.onResize&&this.onResize(o.width,o.height)}calculateNewDimensions(t,e,n){let r=this.startWidth,s=this.startHeight;const o=t.includes("right"),i=t.includes("left"),a=t.includes("bottom"),l=t.includes("top");return o?r=this.startWidth+e:i&&(r=this.startWidth-e),a?s=this.startHeight+n:l&&(s=this.startHeight-n),(t==="right"||t==="left")&&(r=this.startWidth+(o?e:-e)),(t==="top"||t==="bottom")&&(s=this.startHeight+(a?n:-n)),this.preserveAspectRatio||this.isShiftKeyPressed?this.applyAspectRatio(r,s,t):{width:r,height:s}}applyConstraints(t,e,n){var r,s,o,i;if(!n){let c=Math.max(this.minSize.width,t),u=Math.max(this.minSize.height,e);return(r=this.maxSize)!=null&&r.width&&(c=Math.min(this.maxSize.width,c)),(s=this.maxSize)!=null&&s.height&&(u=Math.min(this.maxSize.height,u)),{width:c,height:u}}let a=t,l=e;return a<this.minSize.width&&(a=this.minSize.width,l=a/this.aspectRatio),l<this.minSize.height&&(l=this.minSize.height,a=l*this.aspectRatio),(o=this.maxSize)!=null&&o.width&&a>this.maxSize.width&&(a=this.maxSize.width,l=a/this.aspectRatio),(i=this.maxSize)!=null&&i.height&&l>this.maxSize.height&&(l=this.maxSize.height,a=l*this.aspectRatio),{width:a,height:l}}applyAspectRatio(t,e,n){const r=n==="left"||n==="right",s=n==="top"||n==="bottom";return r?{width:t,height:t/this.aspectRatio}:s?{width:e*this.aspectRatio,height:e}:{width:t,height:t/this.aspectRatio}}};function cPe(t,e){const{selection:n}=t,{$from:r}=n;if(n instanceof Jt){const o=r.index();return r.parent.canReplaceWith(o,o+1,e)}let s=r.depth;for(;s>=0;){const o=r.index(s);if(r.node(s).contentMatchAt(o).matchType(e))return!0;s-=1}return!1}var uPe={};cD(uPe,{createAtomBlockMarkdownSpec:()=>dPe,createBlockMarkdownSpec:()=>fPe,createInlineMarkdownSpec:()=>mPe,parseAttributes:()=>vD,parseIndentedBlocks:()=>tM,renderNestedMarkdownContent:()=>xD,serializeAttributes:()=>bD});function vD(t){if(!(t!=null&&t.trim()))return{};const e={},n=[],r=t.replace(/["']([^"']*)["']/g,c=>(n.push(c),`__QUOTED_${n.length-1}__`)),s=r.match(/(?:^|\s)\.([a-zA-Z][\w-]*)/g);if(s){const c=s.map(u=>u.trim().slice(1));e.class=c.join(" ")}const o=r.match(/(?:^|\s)#([a-zA-Z][\w-]*)/);o&&(e.id=o[1]);const i=/([a-zA-Z][\w-]*)\s*=\s*(__QUOTED_\d+__)/g;Array.from(r.matchAll(i)).forEach(([,c,u])=>{var f;const h=parseInt(((f=u.match(/__QUOTED_(\d+)__/))==null?void 0:f[1])||"0",10),m=n[h];m&&(e[c]=m.slice(1,-1))});const l=r.replace(/(?:^|\s)\.([a-zA-Z][\w-]*)/g,"").replace(/(?:^|\s)#([a-zA-Z][\w-]*)/g,"").replace(/([a-zA-Z][\w-]*)\s*=\s*__QUOTED_\d+__/g,"").trim();return l&&l.split(/\s+/).filter(Boolean).forEach(u=>{u.match(/^[a-zA-Z][\w-]*$/)&&(e[u]=!0)}),e}function bD(t){if(!t||Object.keys(t).length===0)return"";const e=[];return t.class&&String(t.class).split(/\s+/).filter(Boolean).forEach(r=>e.push(`.${r}`)),t.id&&e.push(`#${t.id}`),Object.entries(t).forEach(([n,r])=>{n==="class"||n==="id"||(r===!0?e.push(n):r!==!1&&r!=null&&e.push(`${n}="${String(r)}"`))}),e.join(" ")}function dPe(t){const{nodeName:e,name:n,parseAttributes:r=vD,serializeAttributes:s=bD,defaultAttributes:o={},requiredAttributes:i=[],allowedAttributes:a}=t,l=n||e,c=u=>{if(!a)return u;const f={};return a.forEach(h=>{h in u&&(f[h]=u[h])}),f};return{parseMarkdown:(u,f)=>{const h={...o,...u.attributes};return f.createNode(e,h,[])},markdownTokenizer:{name:e,level:"block",start(u){var f;const h=new RegExp(`^:::${l}(?:\\s|$)`,"m"),m=(f=u.match(h))==null?void 0:f.index;return m!==void 0?m:-1},tokenize(u,f,h){const m=new RegExp(`^:::${l}(?:\\s+\\{([^}]*)\\})?\\s*:::(?:\\n|$)`),y=u.match(m);if(!y)return;const v=y[1]||"",b=r(v);if(!i.find(C=>!(C in b)))return{type:e,raw:y[0],attributes:b}}},renderMarkdown:u=>{const f=c(u.attrs||{}),h=s(f),m=h?` {${h}}`:"";return`:::${l}${m} :::`}}}function fPe(t){const{nodeName:e,name:n,getContent:r,parseAttributes:s=vD,serializeAttributes:o=bD,defaultAttributes:i={},content:a="block",allowedAttributes:l}=t,c=n||e,u=f=>{if(!l)return f;const h={};return l.forEach(m=>{m in f&&(h[m]=f[m])}),h};return{parseMarkdown:(f,h)=>{let m;if(r){const v=r(f);m=typeof v=="string"?[{type:"text",text:v}]:v}else a==="block"?m=h.parseChildren(f.tokens||[]):m=h.parseInline(f.tokens||[]);const y={...i,...f.attributes};return h.createNode(e,y,m)},markdownTokenizer:{name:e,level:"block",start(f){var h;const m=new RegExp(`^:::${c}`,"m"),y=(h=f.match(m))==null?void 0:h.index;return y!==void 0?y:-1},tokenize(f,h,m){var y;const v=new RegExp(`^:::${c}(?:\\s+\\{([^}]*)\\})?\\s*\\n`),b=f.match(v);if(!b)return;const[w,C=""]=b,k=s(C);let E=1;const j=w.length;let A="";const M=/^:::([\w-]*)(\s.*)?/gm,_=f.slice(j);for(M.lastIndex=0;;){const D=M.exec(_);if(D===null)break;const R=D.index,N=D[1];if(!((y=D[2])!=null&&y.endsWith(":::"))){if(N)E+=1;else if(E-=1,E===0){const z=_.slice(0,R);A=z.trim();const B=f.slice(0,j+R+D[0].length);let L=[];if(A)if(a==="block")for(L=m.blockTokens(z),L.forEach(P=>{P.text&&(!P.tokens||P.tokens.length===0)&&(P.tokens=m.inlineTokens(P.text))});L.length>0;){const P=L[L.length-1];if(P.type==="paragraph"&&(!P.text||P.text.trim()===""))L.pop();else break}else L=m.inlineTokens(A);return{type:e,raw:B,attributes:k,content:A,tokens:L}}}}}},renderMarkdown:(f,h)=>{const m=u(f.attrs||{}),y=o(m),v=y?` {${y}}`:"",b=h.renderChildren(f.content||[],`

`);return`:::${c}${v}

${b}

:::`}}}function pPe(t){if(!t.trim())return{};const e={},n=/(\w+)=(?:"([^"]*)"|'([^']*)')/g;let r=n.exec(t);for(;r!==null;){const[,s,o,i]=r;e[s]=o||i,r=n.exec(t)}return e}function hPe(t){return Object.entries(t).filter(([,e])=>e!=null).map(([e,n])=>`${e}="${n}"`).join(" ")}function mPe(t){const{nodeName:e,name:n,getContent:r,parseAttributes:s=pPe,serializeAttributes:o=hPe,defaultAttributes:i={},selfClosing:a=!1,allowedAttributes:l}=t,c=n||e,u=h=>{if(!l)return h;const m={};return l.forEach(y=>{const v=typeof y=="string"?y:y.name,b=typeof y=="string"?void 0:y.skipIfDefault;if(v in h){const w=h[v];if(b!==void 0&&w===b)return;m[v]=w}}),m},f=c.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return{parseMarkdown:(h,m)=>{const y={...i,...h.attributes};if(a)return m.createNode(e,y);const v=r?r(h):h.content||"";return v?m.createNode(e,y,[m.createTextNode(v)]):m.createNode(e,y,[])},markdownTokenizer:{name:e,level:"inline",start(h){const m=a?new RegExp(`\\[${f}\\s*[^\\]]*\\]`):new RegExp(`\\[${f}\\s*[^\\]]*\\][\\s\\S]*?\\[\\/${f}\\]`),y=h.match(m),v=y==null?void 0:y.index;return v!==void 0?v:-1},tokenize(h,m,y){const v=a?new RegExp(`^\\[${f}\\s*([^\\]]*)\\]`):new RegExp(`^\\[${f}\\s*([^\\]]*)\\]([\\s\\S]*?)\\[\\/${f}\\]`),b=h.match(v);if(!b)return;let w="",C="";if(a){const[,E]=b;C=E}else{const[,E,j]=b;C=E,w=j||""}const k=s(C.trim());return{type:e,raw:b[0],content:w.trim(),attributes:k}}},renderMarkdown:h=>{let m="";r?m=r(h):h.content&&h.content.length>0&&(m=h.content.filter(w=>w.type==="text").map(w=>w.text).join(""));const y=u(h.attrs||{}),v=o(y),b=v?` ${v}`:"";return a?`[${c}${b}]`:`[${c}${b}]${m}[/${c}]`}}}function tM(t,e,n){var r,s,o,i;const a=t.split(`
`),l=[];let c="",u=0;const f=e.baseIndentSize||2;for(;u<a.length;){const h=a[u],m=h.match(e.itemPattern);if(!m){if(l.length>0)break;if(h.trim()===""){u+=1,c=`${c}${h}
`;continue}else return}const y=e.extractItemData(m),{indentLevel:v,mainContent:b}=y;c=`${c}${h}
`;const w=[b];for(u+=1;u<a.length;){const j=a[u];if(j.trim()===""){const M=a.slice(u+1).findIndex(R=>R.trim()!=="");if(M===-1)break;if((((s=(r=a[u+1+M].match(/^(\s*)/))==null?void 0:r[1])==null?void 0:s.length)||0)>v){w.push(j),c=`${c}${j}
`,u+=1;continue}else break}if((((i=(o=j.match(/^(\s*)/))==null?void 0:o[1])==null?void 0:i.length)||0)>v)w.push(j),c=`${c}${j}
`,u+=1;else break}let C;const k=w.slice(1);if(k.length>0){const j=k.map(A=>A.slice(v+f)).join(`
`);j.trim()&&(e.customNestedParser?C=e.customNestedParser(j):C=n.blockTokens(j))}const E=e.createToken(y,C);l.push(E)}if(l.length!==0)return{items:l,raw:c}}function xD(t,e,n,r){if(!t||!Array.isArray(t.content))return"";const s=typeof n=="function"?n(r):n,[o,...i]=t.content,a=e.renderChildren([o]),l=[`${s}${a}`];return i&&i.length>0&&i.forEach(c=>{const u=e.renderChildren([c]);if(u){const f=u.split(`
`).map(h=>h?e.indent(h):"").join(`
`);l.push(f)}}),l.join(`
`)}function gPe(t,e,n={}){const{state:r}=e,{doc:s,tr:o}=r,i=t;s.descendants((a,l)=>{const c=o.mapping.map(l),u=o.mapping.map(l)+a.nodeSize;let f=null;if(a.marks.forEach(m=>{if(m!==i)return!1;f=m}),!f)return;let h=!1;if(Object.keys(n).forEach(m=>{n[m]!==f.attrs[m]&&(h=!0)}),h){const m=t.type.create({...t.attrs,...n});o.removeMark(c,u,t.type),o.addMark(c,u,m)}}),o.docChanged&&e.view.dispatch(o)}var Es=class ise extends yD{constructor(){super(...arguments),this.type="node"}static create(e={}){const n=typeof e=="function"?e():e;return new ise(n)}configure(e){return super.configure(e)}extend(e){const n=typeof e=="function"?e():e;return super.extend(n)}},yPe=class{constructor(t,e,n){this.isDragging=!1,this.component=t,this.editor=e.editor,this.options={stopEvent:null,ignoreMutation:null,...n},this.extension=e.extension,this.node=e.node,this.decorations=e.decorations,this.innerDecorations=e.innerDecorations,this.view=e.view,this.HTMLAttributes=e.HTMLAttributes,this.getPos=e.getPos,this.mount()}mount(){}get dom(){return this.editor.view.dom}get contentDOM(){return null}onDragStart(t){var e,n,r,s,o,i,a;const{view:l}=this.editor,c=t.target,u=c.nodeType===3?(e=c.parentElement)==null?void 0:e.closest("[data-drag-handle]"):c.closest("[data-drag-handle]");if(!this.dom||(n=this.contentDOM)!=null&&n.contains(c)||!u)return;let f=0,h=0;if(this.dom!==u){const C=this.dom.getBoundingClientRect(),k=u.getBoundingClientRect(),E=(s=t.offsetX)!=null?s:(r=t.nativeEvent)==null?void 0:r.offsetX,j=(i=t.offsetY)!=null?i:(o=t.nativeEvent)==null?void 0:o.offsetY;f=k.x-C.x+E,h=k.y-C.y+j}const m=this.dom.cloneNode(!0);try{const C=this.dom.getBoundingClientRect();m.style.width=`${Math.round(C.width)}px`,m.style.height=`${Math.round(C.height)}px`,m.style.boxSizing="border-box",m.style.pointerEvents="none"}catch{}let y=null;try{y=document.createElement("div"),y.style.position="absolute",y.style.top="-9999px",y.style.left="-9999px",y.style.pointerEvents="none",y.appendChild(m),document.body.appendChild(y),(a=t.dataTransfer)==null||a.setDragImage(m,f,h)}finally{y&&setTimeout(()=>{try{y==null||y.remove()}catch{}},0)}const v=this.getPos();if(typeof v!="number")return;const b=Jt.create(l.state.doc,v),w=l.state.tr.setSelection(b);l.dispatch(w)}stopEvent(t){var e;if(!this.dom)return!1;if(typeof this.options.stopEvent=="function")return this.options.stopEvent({event:t});const n=t.target;if(!(this.dom.contains(n)&&!((e=this.contentDOM)!=null&&e.contains(n))))return!1;const s=t.type.startsWith("drag"),o=t.type==="drop";if((["INPUT","BUTTON","SELECT","TEXTAREA"].includes(n.tagName)||n.isContentEditable)&&!o&&!s)return!0;const{isEditable:a}=this.editor,{isDragging:l}=this,c=!!this.node.type.spec.draggable,u=Jt.isSelectable(this.node),f=t.type==="copy",h=t.type==="paste",m=t.type==="cut",y=t.type==="mousedown";if(!c&&u&&s&&t.target===this.dom&&t.preventDefault(),c&&s&&!l&&t.target===this.dom)return t.preventDefault(),!1;if(c&&a&&!l&&y){const v=n.closest("[data-drag-handle]");v&&(this.dom===v||this.dom.contains(v))&&(this.isDragging=!0,document.addEventListener("dragend",()=>{this.isDragging=!1},{once:!0}),document.addEventListener("drop",()=>{this.isDragging=!1},{once:!0}),document.addEventListener("mouseup",()=>{this.isDragging=!1},{once:!0}))}return!(l||o||f||h||m||y&&u)}ignoreMutation(t){return!this.dom||!this.contentDOM?!0:typeof this.options.ignoreMutation=="function"?this.options.ignoreMutation({mutation:t}):this.node.isLeaf||this.node.isAtom?!0:t.type==="selection"||this.dom.contains(t.target)&&t.type==="childList"&&(Yg()||ZT())&&this.editor.isFocused&&[...Array.from(t.addedNodes),...Array.from(t.removedNodes)].every(n=>n.isContentEditable)?!1:this.contentDOM===t.target&&t.type==="attributes"?!0:!this.contentDOM.contains(t.target)}updateAttributes(t){this.editor.commands.command(({tr:e})=>{const n=this.getPos();return typeof n!="number"?!1:(e.setNodeMarkup(n,void 0,{...this.node.attrs,...t}),!0)})}deleteNode(){const t=this.getPos();if(typeof t!="number")return;const e=t+this.node.nodeSize;this.editor.commands.deleteRange({from:t,to:e})}};function hd(t){return new Zze({find:t.find,handler:({state:e,range:n,match:r,pasteEvent:s})=>{const o=er(t.getAttributes,void 0,r,s);if(o===!1||o===null)return null;const{tr:i}=e,a=r[r.length-1],l=r[0];let c=n.to;if(a){const u=l.search(/\S/),f=n.from+l.indexOf(a),h=f+a.length;if(gD(n.from,n.to,e.doc).filter(y=>y.mark.type.excluded.find(b=>b===t.type&&b!==y.mark.type)).filter(y=>y.to>f).length)return null;h<n.to&&i.delete(h,n.to),f>n.from&&i.delete(n.from+u,f),c=n.from+u+a.length,i.addMark(n.from+u,c,t.type.create(o||{})),i.removeStoredMark(t.type)}}})}const vPe=" ögensberater2ung14sicherung10t2g1i0ajes4deo3g1king4llas4n1p1rgin4sa1ion4va1o3laanderen9n1odka3lvo3te1ing3o2yage5u2wales2mart4ter4ng0gou5tch0es6eather0channel12bcam3er2site5d0ding5ibo2r3f1hoswho6ien2ki2lliamhill9n0dows4e1ners6me2olterskluwer11odside6rk0s2ld3w2s1tc1f3xbox3erox4ihuan4n2xx2yz3yachts4hoo3maxun5ndex5e1odobashi7ga2kohama6u0tube6t1un3za0ppos4ra3ero3ip2m1one3uerich6w2",bPe="ελ1υ2бг1ел3дети4ею2католик6ом3мкд2он1сква6онлайн5рг3рус2ф2сайт3рб3укр3қаз3հայ3ישראל5קום3ابوظبي5رامكو5لاردن4بحرين5جزائر5سعودية6عليان5مغرب5مارات5یران5بارت2زار4يتك3ھارت5تونس4سودان3رية5شبكة4عراق2ب2مان4فلسطين6قطر3كاثوليك6وم3مصر2ليسيا5وريتانيا7قع4همراه5پاکستان7ڀارت4कॉम3नेट3भारत0म्3ोत5संगठन5বাংলা5ভারত2ৰত4ਭਾਰਤ4ભારત4ଭାରତ4இந்தியா6லங்கை6சிங்கப்பூர்11భారత్5ಭಾರತ4ഭാരതം5ලංකා4คอม3ไทย3ລາວ3გე2みんな3アマゾン4クラウド4グーグル4コム2ストア3セール3ファッション6ポイント4世界2中信1国1國1文网3亚马逊3企业2佛山2信息2健康2八卦2公司1益2台湾1灣2商城1店1标2嘉里0大酒店5在线2大拿2天主教3娱乐2家電2广东2微博2慈善2我爱你3手机2招聘2政务1府2新加坡2闻2时尚2書籍2机构2淡马锡3游戏2澳門2点看2移动2组织机构4网址1店1站1络2联通2谷歌2购物2通販2集团2電訊盈科4飞利浦3食品2餐厅2香格里拉3港2닷넷1컴2삼성2한국2",nM="numeric",rM="ascii",sM="alpha",ng="asciinumeric",N0="alphanumeric",oM="domain",ase="emoji",xPe="scheme",wPe="slashscheme",m9="whitespace";function SPe(t,e){return t in e||(e[t]=[]),e[t]}function xf(t,e,n){e[nM]&&(e[ng]=!0,e[N0]=!0),e[rM]&&(e[ng]=!0,e[sM]=!0),e[ng]&&(e[N0]=!0),e[sM]&&(e[N0]=!0),e[N0]&&(e[oM]=!0),e[ase]&&(e[oM]=!0);for(const r in e){const s=SPe(r,n);s.indexOf(t)<0&&s.push(t)}}function CPe(t,e){const n={};for(const r in e)e[r].indexOf(t)>=0&&(n[r]=!0);return n}function Go(t=null){this.j={},this.jr=[],this.jd=null,this.t=t}Go.groups={};Go.prototype={accepts(){return!!this.t},go(t){const e=this,n=e.j[t];if(n)return n;for(let r=0;r<e.jr.length;r++){const s=e.jr[r][0],o=e.jr[r][1];if(o&&s.test(t))return o}return e.jd},has(t,e=!1){return e?t in this.j:!!this.go(t)},ta(t,e,n,r){for(let s=0;s<t.length;s++)this.tt(t[s],e,n,r)},tr(t,e,n,r){r=r||Go.groups;let s;return e&&e.j?s=e:(s=new Go(e),n&&r&&xf(e,n,r)),this.jr.push([t,s]),s},ts(t,e,n,r){let s=this;const o=t.length;if(!o)return s;for(let i=0;i<o-1;i++)s=s.tt(t[i]);return s.tt(t[o-1],e,n,r)},tt(t,e,n,r){r=r||Go.groups;const s=this;if(e&&e.j)return s.j[t]=e,e;const o=e;let i,a=s.go(t);if(a?(i=new Go,Object.assign(i.j,a.j),i.jr.push.apply(i.jr,a.jr),i.jd=a.jd,i.t=a.t):i=new Go,o){if(r)if(i.t&&typeof i.t=="string"){const l=Object.assign(CPe(i.t,r),n);xf(o,l,r)}else n&&xf(o,n,r);i.t=o}return s.j[t]=i,i}};const Tn=(t,e,n,r,s)=>t.ta(e,n,r,s),Gr=(t,e,n,r,s)=>t.tr(e,n,r,s),rU=(t,e,n,r,s)=>t.ts(e,n,r,s),wt=(t,e,n,r,s)=>t.tt(e,n,r,s),ac="WORD",iM="UWORD",lse="ASCIINUMERICAL",cse="ALPHANUMERICAL",Kg="LOCALHOST",aM="TLD",lM="UTLD",Ax="SCHEME",xh="SLASH_SCHEME",wD="NUM",cM="WS",SD="NL",rg="OPENBRACE",sg="CLOSEBRACE",G3="OPENBRACKET",K3="CLOSEBRACKET",X3="OPENPAREN",Z3="CLOSEPAREN",Q3="OPENANGLEBRACKET",J3="CLOSEANGLEBRACKET",ew="FULLWIDTHLEFTPAREN",tw="FULLWIDTHRIGHTPAREN",nw="LEFTCORNERBRACKET",rw="RIGHTCORNERBRACKET",sw="LEFTWHITECORNERBRACKET",ow="RIGHTWHITECORNERBRACKET",iw="FULLWIDTHLESSTHAN",aw="FULLWIDTHGREATERTHAN",lw="AMPERSAND",cw="APOSTROPHE",uw="ASTERISK",Iu="AT",dw="BACKSLASH",fw="BACKTICK",pw="CARET",Pu="COLON",CD="COMMA",hw="DOLLAR",nl="DOT",mw="EQUALS",kD="EXCLAMATION",Pi="HYPHEN",og="PERCENT",gw="PIPE",yw="PLUS",vw="POUND",ig="QUERY",ED="QUOTE",use="FULLWIDTHMIDDLEDOT",TD="SEMI",rl="SLASH",ag="TILDE",bw="UNDERSCORE",dse="EMOJI",xw="SYM";var fse=Object.freeze({__proto__:null,ALPHANUMERICAL:cse,AMPERSAND:lw,APOSTROPHE:cw,ASCIINUMERICAL:lse,ASTERISK:uw,AT:Iu,BACKSLASH:dw,BACKTICK:fw,CARET:pw,CLOSEANGLEBRACKET:J3,CLOSEBRACE:sg,CLOSEBRACKET:K3,CLOSEPAREN:Z3,COLON:Pu,COMMA:CD,DOLLAR:hw,DOT:nl,EMOJI:dse,EQUALS:mw,EXCLAMATION:kD,FULLWIDTHGREATERTHAN:aw,FULLWIDTHLEFTPAREN:ew,FULLWIDTHLESSTHAN:iw,FULLWIDTHMIDDLEDOT:use,FULLWIDTHRIGHTPAREN:tw,HYPHEN:Pi,LEFTCORNERBRACKET:nw,LEFTWHITECORNERBRACKET:sw,LOCALHOST:Kg,NL:SD,NUM:wD,OPENANGLEBRACKET:Q3,OPENBRACE:rg,OPENBRACKET:G3,OPENPAREN:X3,PERCENT:og,PIPE:gw,PLUS:yw,POUND:vw,QUERY:ig,QUOTE:ED,RIGHTCORNERBRACKET:rw,RIGHTWHITECORNERBRACKET:ow,SCHEME:Ax,SEMI:TD,SLASH:rl,SLASH_SCHEME:xh,SYM:xw,TILDE:ag,TLD:aM,UNDERSCORE:bw,UTLD:lM,UWORD:iM,WORD:ac,WS:cM});const sc=/[a-z]/,v0=new RegExp("\\p{L}","u"),g9=new RegExp("\\p{Emoji}","u"),oc=/\d/,y9=/\s/,sU="\r",v9=`
`,kPe="️",EPe="‍",b9="￼";let hb=null,mb=null;function TPe(t=[]){const e={};Go.groups=e;const n=new Go;hb==null&&(hb=oU(vPe)),mb==null&&(mb=oU(bPe)),wt(n,"'",cw),wt(n,"{",rg),wt(n,"}",sg),wt(n,"[",G3),wt(n,"]",K3),wt(n,"(",X3),wt(n,")",Z3),wt(n,"<",Q3),wt(n,">",J3),wt(n,"（",ew),wt(n,"）",tw),wt(n,"「",nw),wt(n,"」",rw),wt(n,"『",sw),wt(n,"』",ow),wt(n,"＜",iw),wt(n,"＞",aw),wt(n,"&",lw),wt(n,"*",uw),wt(n,"@",Iu),wt(n,"`",fw),wt(n,"^",pw),wt(n,":",Pu),wt(n,",",CD),wt(n,"$",hw),wt(n,".",nl),wt(n,"=",mw),wt(n,"!",kD),wt(n,"-",Pi),wt(n,"%",og),wt(n,"|",gw),wt(n,"+",yw),wt(n,"#",vw),wt(n,"?",ig),wt(n,'"',ED),wt(n,"/",rl),wt(n,";",TD),wt(n,"~",ag),wt(n,"_",bw),wt(n,"\\",dw),wt(n,"・",use);const r=Gr(n,oc,wD,{[nM]:!0});Gr(r,oc,r);const s=Gr(r,sc,lse,{[ng]:!0}),o=Gr(r,v0,cse,{[N0]:!0}),i=Gr(n,sc,ac,{[rM]:!0});Gr(i,oc,s),Gr(i,sc,i),Gr(s,oc,s),Gr(s,sc,s);const a=Gr(n,v0,iM,{[sM]:!0});Gr(a,sc),Gr(a,oc,o),Gr(a,v0,a),Gr(o,oc,o),Gr(o,sc),Gr(o,v0,o);const l=wt(n,v9,SD,{[m9]:!0}),c=wt(n,sU,cM,{[m9]:!0}),u=Gr(n,y9,cM,{[m9]:!0});wt(n,b9,u),wt(c,v9,l),wt(c,b9,u),Gr(c,y9,u),wt(u,sU),wt(u,v9),Gr(u,y9,u),wt(u,b9,u);const f=Gr(n,g9,dse,{[ase]:!0});wt(f,"#"),Gr(f,g9,f),wt(f,kPe,f);const h=wt(f,EPe);wt(h,"#"),Gr(h,g9,f);const m=[[sc,i],[oc,s]],y=[[sc,null],[v0,a],[oc,o]];for(let v=0;v<hb.length;v++)ku(n,hb[v],aM,ac,m);for(let v=0;v<mb.length;v++)ku(n,mb[v],lM,iM,y);xf(aM,{tld:!0,ascii:!0},e),xf(lM,{utld:!0,alpha:!0},e),ku(n,"file",Ax,ac,m),ku(n,"mailto",Ax,ac,m),ku(n,"http",xh,ac,m),ku(n,"https",xh,ac,m),ku(n,"ftp",xh,ac,m),ku(n,"ftps",xh,ac,m),xf(Ax,{scheme:!0,ascii:!0},e),xf(xh,{slashscheme:!0,ascii:!0},e),t=t.sort((v,b)=>v[0]>b[0]?1:-1);for(let v=0;v<t.length;v++){const b=t[v][0],C=t[v][1]?{[xPe]:!0}:{[wPe]:!0};b.indexOf("-")>=0?C[oM]=!0:sc.test(b)?oc.test(b)?C[ng]=!0:C[rM]=!0:C[nM]=!0,rU(n,b,b,C)}return rU(n,"localhost",Kg,{ascii:!0}),n.jd=new Go(xw),{start:n,tokens:Object.assign({groups:e},fse)}}function pse(t,e){const n=MPe(e.replace(/[A-Z]/g,a=>a.toLowerCase())),r=n.length,s=[];let o=0,i=0;for(;i<r;){let a=t,l=null,c=0,u=null,f=-1,h=-1;for(;i<r&&(l=a.go(n[i]));)a=l,a.accepts()?(f=0,h=0,u=a):f>=0&&(f+=n[i].length,h++),c+=n[i].length,o+=n[i].length,i++;o-=f,i-=h,c-=f,s.push({t:u.t,v:e.slice(o-c,o),s:o-c,e:o})}return s}function MPe(t){const e=[],n=t.length;let r=0;for(;r<n;){let s=t.charCodeAt(r),o,i=s<55296||s>56319||r+1===n||(o=t.charCodeAt(r+1))<56320||o>57343?t[r]:t.slice(r,r+2);e.push(i),r+=i.length}return e}function ku(t,e,n,r,s){let o;const i=e.length;for(let a=0;a<i-1;a++){const l=e[a];t.j[l]?o=t.j[l]:(o=new Go(r),o.jr=s.slice(),t.j[l]=o),t=o}return o=new Go(n),o.jr=s.slice(),t.j[e[i-1]]=o,o}function oU(t){const e=[],n=[];let r=0,s="0123456789";for(;r<t.length;){let o=0;for(;s.indexOf(t[r+o])>=0;)o++;if(o>0){e.push(n.join(""));for(let i=parseInt(t.substring(r,r+o),10);i>0;i--)n.pop();r+=o}else n.push(t[r]),r++}return e}const Xg={defaultProtocol:"http",events:null,format:iU,formatHref:iU,nl2br:!1,tagName:"a",target:null,rel:null,validate:!0,truncate:1/0,className:null,attributes:null,ignoreTags:[],render:null};function MD(t,e=null){let n=Object.assign({},Xg);t&&(n=Object.assign(n,t instanceof MD?t.o:t));const r=n.ignoreTags,s=[];for(let o=0;o<r.length;o++)s.push(r[o].toUpperCase());this.o=n,e&&(this.defaultRender=e),this.ignoreTags=s}MD.prototype={o:Xg,ignoreTags:[],defaultRender(t){return t},check(t){return this.get("validate",t.toString(),t)},get(t,e,n){const r=e!=null;let s=this.o[t];return s&&(typeof s=="object"?(s=n.t in s?s[n.t]:Xg[t],typeof s=="function"&&r&&(s=s(e,n))):typeof s=="function"&&r&&(s=s(e,n.t,n)),s)},getObj(t,e,n){let r=this.o[t];return typeof r=="function"&&e!=null&&(r=r(e,n.t,n)),r},render(t){const e=t.render(this);return(this.get("render",null,t)||this.defaultRender)(e,t.t,t)}};function iU(t){return t}function hse(t,e){this.t="token",this.v=t,this.tk=e}hse.prototype={isLink:!1,toString(){return this.v},toHref(t){return this.toString()},toFormattedString(t){const e=this.toString(),n=t.get("truncate",e,this),r=t.get("format",e,this);return n&&r.length>n?r.substring(0,n)+"…":r},toFormattedHref(t){return t.get("formatHref",this.toHref(t.get("defaultProtocol")),this)},startIndex(){return this.tk[0].s},endIndex(){return this.tk[this.tk.length-1].e},toObject(t=Xg.defaultProtocol){return{type:this.t,value:this.toString(),isLink:this.isLink,href:this.toHref(t),start:this.startIndex(),end:this.endIndex()}},toFormattedObject(t){return{type:this.t,value:this.toFormattedString(t),isLink:this.isLink,href:this.toFormattedHref(t),start:this.startIndex(),end:this.endIndex()}},validate(t){return t.get("validate",this.toString(),this)},render(t){const e=this,n=this.toHref(t.get("defaultProtocol")),r=t.get("formatHref",n,this),s=t.get("tagName",n,e),o=this.toFormattedString(t),i={},a=t.get("className",n,e),l=t.get("target",n,e),c=t.get("rel",n,e),u=t.getObj("attributes",n,e),f=t.getObj("events",n,e);return i.href=r,a&&(i.class=a),l&&(i.target=l),c&&(i.rel=c),u&&Object.assign(i,u),{tagName:s,attributes:i,content:o,eventListeners:f}}};function XS(t,e){class n extends hse{constructor(s,o){super(s,o),this.t=t}}for(const r in e)n.prototype[r]=e[r];return n.t=t,n}const aU=XS("email",{isLink:!0,toHref(){return"mailto:"+this.toString()}}),lU=XS("text"),jPe=XS("nl"),gb=XS("url",{isLink:!0,toHref(t=Xg.defaultProtocol){return this.hasProtocol()?this.v:`${t}://${this.v}`},hasProtocol(){const t=this.tk;return t.length>=2&&t[0].t!==Kg&&t[1].t===Pu}}),Fi=t=>new Go(t);function APe({groups:t}){const e=t.domain.concat([lw,uw,Iu,dw,fw,pw,hw,mw,Pi,wD,og,gw,yw,vw,rl,xw,ag,bw]),n=[cw,Pu,CD,nl,kD,og,ig,ED,TD,Q3,J3,rg,sg,K3,G3,X3,Z3,ew,tw,nw,rw,sw,ow,iw,aw],r=[lw,cw,uw,dw,fw,pw,hw,mw,Pi,rg,sg,og,gw,yw,vw,ig,rl,xw,ag,bw],s=Fi(),o=wt(s,ag);Tn(o,r,o),Tn(o,t.domain,o);const i=Fi(),a=Fi(),l=Fi();Tn(s,t.domain,i),Tn(s,t.scheme,a),Tn(s,t.slashscheme,l),Tn(i,r,o),Tn(i,t.domain,i);const c=wt(i,Iu);wt(o,Iu,c),wt(a,Iu,c),wt(l,Iu,c);const u=wt(o,nl);Tn(u,r,o),Tn(u,t.domain,o);const f=Fi();Tn(c,t.domain,f),Tn(f,t.domain,f);const h=wt(f,nl);Tn(h,t.domain,f);const m=Fi(aU);Tn(h,t.tld,m),Tn(h,t.utld,m),wt(c,Kg,m);const y=wt(f,Pi);wt(y,Pi,y),Tn(y,t.domain,f),Tn(m,t.domain,f),wt(m,nl,h),wt(m,Pi,y);const v=wt(m,Pu);Tn(v,t.numeric,aU);const b=wt(i,Pi),w=wt(i,nl);wt(b,Pi,b),Tn(b,t.domain,i),Tn(w,r,o),Tn(w,t.domain,i);const C=Fi(gb);Tn(w,t.tld,C),Tn(w,t.utld,C),Tn(C,t.domain,i),Tn(C,r,o),wt(C,nl,w),wt(C,Pi,b),wt(C,Iu,c);const k=wt(C,Pu),E=Fi(gb);Tn(k,t.numeric,E);const j=Fi(gb),A=Fi();Tn(j,e,j),Tn(j,n,A),Tn(A,e,j),Tn(A,n,A),wt(C,rl,j),wt(E,rl,j);const M=wt(a,Pu),_=wt(l,Pu),D=wt(_,rl),R=wt(D,rl);Tn(a,t.domain,i),wt(a,nl,w),wt(a,Pi,b),Tn(l,t.domain,i),wt(l,nl,w),wt(l,Pi,b),Tn(M,t.domain,j),wt(M,rl,j),wt(M,ig,j),Tn(R,t.domain,j),Tn(R,e,j),wt(R,rl,j);const N=[[rg,sg],[G3,K3],[X3,Z3],[Q3,J3],[ew,tw],[nw,rw],[sw,ow],[iw,aw]];for(let z=0;z<N.length;z++){const[B,L]=N[z],P=wt(j,B);wt(A,B,P),wt(P,L,j);const I=Fi(gb);Tn(P,e,I);const H=Fi();Tn(P,n),Tn(I,e,I),Tn(I,n,H),Tn(H,e,I),Tn(H,n,H),wt(I,L,j),wt(H,L,j)}return wt(s,Kg,C),wt(s,SD,jPe),{start:s,tokens:fse}}function _Pe(t,e,n){let r=n.length,s=0,o=[],i=[];for(;s<r;){let a=t,l=null,c=null,u=0,f=null,h=-1;for(;s<r&&!(l=a.go(n[s].t));)i.push(n[s++]);for(;s<r&&(c=l||a.go(n[s].t));)l=null,a=c,a.accepts()?(h=0,f=a):h>=0&&h++,s++,u++;if(h<0)s-=u,s<r&&(i.push(n[s]),s++);else{i.length>0&&(o.push(x9(lU,e,i)),i=[]),s-=h,u-=h;const m=f.t,y=n.slice(s-u,s);o.push(x9(m,e,y))}}return i.length>0&&o.push(x9(lU,e,i)),o}function x9(t,e,n){const r=n[0].s,s=n[n.length-1].e,o=e.slice(r,s);return new t(o,n)}const RPe=typeof console<"u"&&console&&console.warn||(()=>{}),DPe="until manual call of linkify.init(). Register all schemes and plugins before invoking linkify the first time.",Rr={scanner:null,parser:null,tokenQueue:[],pluginQueue:[],customSchemes:[],initialized:!1};function IPe(){return Go.groups={},Rr.scanner=null,Rr.parser=null,Rr.tokenQueue=[],Rr.pluginQueue=[],Rr.customSchemes=[],Rr.initialized=!1,Rr}function cU(t,e=!1){if(Rr.initialized&&RPe(`linkifyjs: already initialized - will not register custom scheme "${t}" ${DPe}`),!/^[0-9a-z]+(-[0-9a-z]+)*$/.test(t))throw new Error(`linkifyjs: incorrect scheme format.
1. Must only contain digits, lowercase ASCII letters or "-"
2. Cannot start or end with "-"
3. "-" cannot repeat`);Rr.customSchemes.push([t,e])}function OPe(){Rr.scanner=TPe(Rr.customSchemes);for(let t=0;t<Rr.tokenQueue.length;t++)Rr.tokenQueue[t][1]({scanner:Rr.scanner});Rr.parser=APe(Rr.scanner.tokens);for(let t=0;t<Rr.pluginQueue.length;t++)Rr.pluginQueue[t][1]({scanner:Rr.scanner,parser:Rr.parser});return Rr.initialized=!0,Rr}function jD(t){return Rr.initialized||OPe(),_Pe(Rr.parser.start,t,pse(Rr.scanner.start,t))}jD.scan=pse;function mse(t,e=null,n=null){if(e&&typeof e=="object"){if(n)throw Error(`linkifyjs: Invalid link type ${e}; must be a string`);n=e,e=null}const r=new MD(n),s=jD(t),o=[];for(let i=0;i<s.length;i++){const a=s[i];a.isLink&&(!e||a.t===e)&&r.check(a)&&o.push(a.toFormattedObject(r))}return o}var AD="[\0-   ᠎ -\u2029 　]",NPe=new RegExp(AD),LPe=new RegExp(`${AD}$`),$Pe=new RegExp(AD,"g");function FPe(t){return t.length===1?t[0].isLink:t.length===3&&t[1].isLink?["()","[]"].includes(t[0].value+t[2].value):!1}function zPe(t){return new Sr({key:new Pr("autolink"),appendTransaction:(e,n,r)=>{const s=e.some(c=>c.docChanged)&&!n.doc.eq(r.doc),o=e.some(c=>c.getMeta("preventAutolink"));if(!s||o)return;const{tr:i}=r,a=Dre(n.doc,[...e]);if(Pre(a).forEach(({newRange:c})=>{const u=uze(r.doc,c,m=>m.isTextblock);let f,h;if(u.length>1)f=u[0],h=r.doc.textBetween(f.pos,f.pos+f.node.nodeSize,void 0," ");else if(u.length){const m=r.doc.textBetween(c.from,c.to," "," ");if(!LPe.test(m))return;f=u[0],h=r.doc.textBetween(f.pos,c.to,void 0," ")}if(f&&h){const m=h.split(NPe).filter(Boolean);if(m.length<=0)return!1;const y=m[m.length-1],v=f.pos+h.lastIndexOf(y);if(!y)return!1;const b=jD(y).map(w=>w.toObject(t.defaultProtocol));if(!FPe(b))return!1;b.filter(w=>w.isLink).map(w=>({...w,from:v+w.start+1,to:v+w.end+1})).filter(w=>r.schema.marks.code?!r.doc.rangeHasMark(w.from,w.to,r.schema.marks.code):!0).filter(w=>t.validate(w.value)).filter(w=>t.shouldAutoLink(w.value)).forEach(w=>{gD(w.from,w.to,r.doc).some(C=>C.mark.type===t.type)||i.addMark(w.from,w.to,t.type.create({href:w.href}))})}}),!!i.steps.length)return i}})}function PPe(t){return new Sr({key:new Pr("handleClickLink"),props:{handleClick:(e,n,r)=>{var s,o;if(r.button!==0||!e.editable)return!1;let i=null;if(r.target instanceof HTMLAnchorElement)i=r.target;else{const l=r.target;if(!l)return!1;const c=t.editor.view.dom;i=l.closest("a"),i&&!c.contains(i)&&(i=null)}if(!i)return!1;let a=!1;if(t.enableClickSelection&&(a=t.editor.commands.extendMarkRange(t.type.name)),t.openOnClick){const l=zre(e.state,t.type.name),c=(s=i.href)!=null?s:l.href,u=(o=i.target)!=null?o:l.target;c&&(window.open(c,u),a=!0)}return a}}})}function BPe(t){return new Sr({key:new Pr("handlePasteLink"),props:{handlePaste:(e,n,r)=>{const{shouldAutoLink:s}=t,{state:o}=e,{selection:i}=o,{empty:a}=i;if(a)return!1;let l="";r.content.forEach(u=>{l+=u.textContent});const c=mse(l,{defaultProtocol:t.defaultProtocol}).find(u=>u.isLink&&u.value===l);return!l||!c||s!==void 0&&!s(c.value)?!1:t.editor.commands.setMark(t.type,{href:c.href})}}})}function rf(t,e){const n=["http","https","ftp","ftps","mailto","tel","callto","sms","cid","xmpp"];return e&&e.forEach(r=>{const s=typeof r=="string"?r:r.scheme;s&&n.push(s)}),!t||t.replace($Pe,"").match(new RegExp(`^(?:(?:${n.join("|")}):|[^a-z]|[a-z0-9+.-]+(?:[^a-z+.-:]|$))`,"i"))}var gse=Wa.create({name:"link",priority:1e3,keepOnSplit:!1,exitable:!0,onCreate(){this.options.validate&&!this.options.shouldAutoLink&&(this.options.shouldAutoLink=this.options.validate,console.warn("The `validate` option is deprecated. Rename to the `shouldAutoLink` option instead.")),this.options.protocols.forEach(t=>{if(typeof t=="string"){cU(t);return}cU(t.scheme,t.optionalSlashes)})},onDestroy(){IPe()},inclusive(){return this.options.autolink},addOptions(){return{openOnClick:!0,enableClickSelection:!1,linkOnPaste:!0,autolink:!0,protocols:[],defaultProtocol:"http",HTMLAttributes:{target:"_blank",rel:"noopener noreferrer nofollow",class:null},isAllowedUri:(t,e)=>!!rf(t,e.protocols),validate:t=>!!t,shouldAutoLink:t=>{const e=/^[a-z][a-z0-9+.-]*:\/\//i.test(t),n=/^[a-z][a-z0-9+.-]*:/i.test(t);if(e||n&&!t.includes("@"))return!0;const s=(t.includes("@")?t.split("@").pop():t).split(/[/?#:]/)[0];return!(/^\d{1,3}(\.\d{1,3}){3}$/.test(s)||!/\./.test(s))}}},addAttributes(){return{href:{default:null,parseHTML(t){return t.getAttribute("href")}},target:{default:this.options.HTMLAttributes.target},rel:{default:this.options.HTMLAttributes.rel},class:{default:this.options.HTMLAttributes.class},title:{default:null}}},parseHTML(){return[{tag:"a[href]",getAttrs:t=>{const e=t.getAttribute("href");return!e||!this.options.isAllowedUri(e,{defaultValidate:n=>!!rf(n,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?!1:null}}]},renderHTML({HTMLAttributes:t}){return this.options.isAllowedUri(t.href,{defaultValidate:e=>!!rf(e,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?["a",rr(this.options.HTMLAttributes,t),0]:["a",rr(this.options.HTMLAttributes,{...t,href:""}),0]},markdownTokenName:"link",parseMarkdown:(t,e)=>e.applyMark("link",e.parseInline(t.tokens||[]),{href:t.href,title:t.title||null}),renderMarkdown:(t,e)=>{var n,r,s,o;const i=(r=(n=t.attrs)==null?void 0:n.href)!=null?r:"",a=(o=(s=t.attrs)==null?void 0:s.title)!=null?o:"",l=e.renderChildren(t);return a?`[${l}](${i} "${a}")`:`[${l}](${i})`},addCommands(){return{setLink:t=>({chain:e})=>{const{href:n}=t;return this.options.isAllowedUri(n,{defaultValidate:r=>!!rf(r,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?e().setMark(this.name,t).setMeta("preventAutolink",!0).run():!1},toggleLink:t=>({chain:e})=>{const{href:n}=t||{};return n&&!this.options.isAllowedUri(n,{defaultValidate:r=>!!rf(r,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?!1:e().toggleMark(this.name,t,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run()},unsetLink:()=>({chain:t})=>t().unsetMark(this.name,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run()}},addPasteRules(){return[hd({find:t=>{const e=[];if(t){const{protocols:n,defaultProtocol:r}=this.options,s=mse(t).filter(o=>o.isLink&&this.options.isAllowedUri(o.value,{defaultValidate:i=>!!rf(i,n),protocols:n,defaultProtocol:r}));s.length&&s.forEach(o=>{this.options.shouldAutoLink(o.value)&&e.push({text:o.value,data:{href:o.href},index:o.start})})}return e},type:this.type,getAttributes:t=>{var e;return{href:(e=t.data)==null?void 0:e.href}}})]},addProseMirrorPlugins(){const t=[],{protocols:e,defaultProtocol:n}=this.options;return this.options.autolink&&t.push(zPe({type:this.type,defaultProtocol:this.options.defaultProtocol,validate:r=>this.options.isAllowedUri(r,{defaultValidate:s=>!!rf(s,e),protocols:e,defaultProtocol:n}),shouldAutoLink:this.options.shouldAutoLink})),t.push(PPe({type:this.type,editor:this.editor,openOnClick:this.options.openOnClick==="whenNotEditable"?!0:this.options.openOnClick,enableClickSelection:this.options.enableClickSelection})),this.options.linkOnPaste&&t.push(BPe({editor:this.editor,defaultProtocol:this.options.defaultProtocol,type:this.type,shouldAutoLink:this.options.shouldAutoLink})),t}}),yse=gse;const HPe=yse.extend({addKeyboardShortcuts:()=>({"Mod-k":()=>(window.dispatchEvent(new Event("edit-link")),!0)})}).configure({openOnClick:!1});var fp={root:"m_dd3f7539",Typography:"m_f2016866",content:"m_c2204cc2",linkEditorDropdown:"m_8a991b4f",control:"m_c2207da6",controlIcon:"m_9cdfeb3f",controlsGroup:"m_2ab47ef2",linkEditor:"m_b67b711e",linkEditorInput:"m_296cf94c",linkEditorExternalControl:"m_cfef614",linkEditorSave:"m_3b28e7bb",toolbar:"m_4574a3c4",taskList:"m_8b44009a"};const UPe={linkControlLabel:"Link",colorPickerControlLabel:"Text color",highlightControlLabel:"Highlight text",colorControlLabel:t=>`Set text color ${t}`,boldControlLabel:"Bold",italicControlLabel:"Italic",underlineControlLabel:"Underline",strikeControlLabel:"Strikethrough",clearFormattingControlLabel:"Clear formatting",unlinkControlLabel:"Remove link",bulletListControlLabel:"Bullet list",orderedListControlLabel:"Ordered list",sourceCodeControlLabel:"Switch between text/source code",h1ControlLabel:"Heading 1",h2ControlLabel:"Heading 2",h3ControlLabel:"Heading 3",h4ControlLabel:"Heading 4",h5ControlLabel:"Heading 5",h6ControlLabel:"Heading 6",blockquoteControlLabel:"Blockquote",alignLeftControlLabel:"Align text: left",alignCenterControlLabel:"Align text: center",alignRightControlLabel:"Align text: right",alignJustifyControlLabel:"Align text: justify",codeControlLabel:"Code",codeBlockControlLabel:"Code block",subscriptControlLabel:"Subscript",superscriptControlLabel:"Superscript",unsetColorControlLabel:"Unset color",hrControlLabel:"Horizontal line",undoControlLabel:"Undo",redoControlLabel:"Redo",tasksControlLabel:"Task list",tasksSinkLabel:"Decrease task level",tasksLiftLabel:"Increase task level",linkEditorInputLabel:"Enter URL",linkEditorInputPlaceholder:"https://example.com/",linkEditorExternalLink:"Open link in a new tab",linkEditorInternalLink:"Open link in the same tab",linkEditorSave:"Save",colorPickerCancel:"Cancel",colorPickerClear:"Clear color",colorPickerColorPicker:"Color picker",colorPickerPalette:"Color palette",colorPickerSave:"Save",colorPickerColorLabel:t=>`Set text color ${t}`},[VPe,Nl]=zs("RichTextEditor component was not found in tree");var w9={exports:{}},S9={};/**
 * @license React
 * use-sync-external-store-shim.production.js
 *
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var uU;function qPe(){if(uU)return S9;uU=1;var t=Zf();function e(f,h){return f===h&&(f!==0||1/f===1/h)||f!==f&&h!==h}var n=typeof Object.is=="function"?Object.is:e,r=t.useState,s=t.useEffect,o=t.useLayoutEffect,i=t.useDebugValue;function a(f,h){var m=h(),y=r({inst:{value:m,getSnapshot:h}}),v=y[0].inst,b=y[1];return o(function(){v.value=m,v.getSnapshot=h,l(v)&&b({inst:v})},[f,m,h]),s(function(){return l(v)&&b({inst:v}),f(function(){l(v)&&b({inst:v})})},[f]),i(m),m}function l(f){var h=f.getSnapshot;f=f.value;try{var m=h();return!n(f,m)}catch{return!0}}function c(f,h){return h()}var u=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?c:a;return S9.useSyncExternalStore=t.useSyncExternalStore!==void 0?t.useSyncExternalStore:u,S9}var dU;function vse(){return dU||(dU=1,w9.exports=qPe()),w9.exports}var bse=vse();const{getOwnPropertyNames:WPe,getOwnPropertySymbols:YPe}=Object,{hasOwnProperty:GPe}=Object.prototype;function C9(t,e){return function(r,s,o){return t(r,s,o)&&e(r,s,o)}}function yb(t){return function(n,r,s){if(!n||!r||typeof n!="object"||typeof r!="object")return t(n,r,s);const{cache:o}=s,i=o.get(n),a=o.get(r);if(i&&a)return i===r&&a===n;o.set(n,r),o.set(r,n);const l=t(n,r,s);return o.delete(n),o.delete(r),l}}function KPe(t){return t!=null?t[Symbol.toStringTag]:void 0}function fU(t){return WPe(t).concat(YPe(t))}const XPe=Object.hasOwn||((t,e)=>GPe.call(t,e));function pp(t,e){return t===e||!t&&!e&&t!==t&&e!==e}const ZPe="__v",QPe="__o",JPe="_owner",{getOwnPropertyDescriptor:pU,keys:hU}=Object;function eBe(t,e){return t.byteLength===e.byteLength&&ww(new Uint8Array(t),new Uint8Array(e))}function tBe(t,e,n){let r=t.length;if(e.length!==r)return!1;for(;r-- >0;)if(!n.equals(t[r],e[r],r,r,t,e,n))return!1;return!0}function nBe(t,e){return t.byteLength===e.byteLength&&ww(new Uint8Array(t.buffer,t.byteOffset,t.byteLength),new Uint8Array(e.buffer,e.byteOffset,e.byteLength))}function rBe(t,e){return pp(t.getTime(),e.getTime())}function sBe(t,e){return t.name===e.name&&t.message===e.message&&t.cause===e.cause&&t.stack===e.stack}function oBe(t,e){return t===e}function mU(t,e,n){const r=t.size;if(r!==e.size)return!1;if(!r)return!0;const s=new Array(r),o=t.entries();let i,a,l=0;for(;(i=o.next())&&!i.done;){const c=e.entries();let u=!1,f=0;for(;(a=c.next())&&!a.done;){if(s[f]){f++;continue}const h=i.value,m=a.value;if(n.equals(h[0],m[0],l,f,t,e,n)&&n.equals(h[1],m[1],h[0],m[0],t,e,n)){u=s[f]=!0;break}f++}if(!u)return!1;l++}return!0}const iBe=pp;function aBe(t,e,n){const r=hU(t);let s=r.length;if(hU(e).length!==s)return!1;for(;s-- >0;)if(!xse(t,e,n,r[s]))return!1;return!0}function b0(t,e,n){const r=fU(t);let s=r.length;if(fU(e).length!==s)return!1;let o,i,a;for(;s-- >0;)if(o=r[s],!xse(t,e,n,o)||(i=pU(t,o),a=pU(e,o),(i||a)&&(!i||!a||i.configurable!==a.configurable||i.enumerable!==a.enumerable||i.writable!==a.writable)))return!1;return!0}function lBe(t,e){return pp(t.valueOf(),e.valueOf())}function cBe(t,e){return t.source===e.source&&t.flags===e.flags}function gU(t,e,n){const r=t.size;if(r!==e.size)return!1;if(!r)return!0;const s=new Array(r),o=t.values();let i,a;for(;(i=o.next())&&!i.done;){const l=e.values();let c=!1,u=0;for(;(a=l.next())&&!a.done;){if(!s[u]&&n.equals(i.value,a.value,i.value,a.value,t,e,n)){c=s[u]=!0;break}u++}if(!c)return!1}return!0}function ww(t,e){let n=t.byteLength;if(e.byteLength!==n||t.byteOffset!==e.byteOffset)return!1;for(;n-- >0;)if(t[n]!==e[n])return!1;return!0}function uBe(t,e){return t.hostname===e.hostname&&t.pathname===e.pathname&&t.protocol===e.protocol&&t.port===e.port&&t.hash===e.hash&&t.username===e.username&&t.password===e.password}function xse(t,e,n,r){return(r===JPe||r===QPe||r===ZPe)&&(t.$$typeof||e.$$typeof)?!0:XPe(e,r)&&n.equals(t[r],e[r],r,r,t,e,n)}const dBe="[object ArrayBuffer]",fBe="[object Arguments]",pBe="[object Boolean]",hBe="[object DataView]",mBe="[object Date]",gBe="[object Error]",yBe="[object Map]",vBe="[object Number]",bBe="[object Object]",xBe="[object RegExp]",wBe="[object Set]",SBe="[object String]",CBe={"[object Int8Array]":!0,"[object Uint8Array]":!0,"[object Uint8ClampedArray]":!0,"[object Int16Array]":!0,"[object Uint16Array]":!0,"[object Int32Array]":!0,"[object Uint32Array]":!0,"[object Float16Array]":!0,"[object Float32Array]":!0,"[object Float64Array]":!0,"[object BigInt64Array]":!0,"[object BigUint64Array]":!0},kBe="[object URL]",EBe=Object.prototype.toString;function TBe({areArrayBuffersEqual:t,areArraysEqual:e,areDataViewsEqual:n,areDatesEqual:r,areErrorsEqual:s,areFunctionsEqual:o,areMapsEqual:i,areNumbersEqual:a,areObjectsEqual:l,arePrimitiveWrappersEqual:c,areRegExpsEqual:u,areSetsEqual:f,areTypedArraysEqual:h,areUrlsEqual:m,unknownTagComparators:y}){return function(b,w,C){if(b===w)return!0;if(b==null||w==null)return!1;const k=typeof b;if(k!==typeof w)return!1;if(k!=="object")return k==="number"?a(b,w,C):k==="function"?o(b,w,C):!1;const E=b.constructor;if(E!==w.constructor)return!1;if(E===Object)return l(b,w,C);if(Array.isArray(b))return e(b,w,C);if(E===Date)return r(b,w,C);if(E===RegExp)return u(b,w,C);if(E===Map)return i(b,w,C);if(E===Set)return f(b,w,C);const j=EBe.call(b);if(j===mBe)return r(b,w,C);if(j===xBe)return u(b,w,C);if(j===yBe)return i(b,w,C);if(j===wBe)return f(b,w,C);if(j===bBe)return typeof b.then!="function"&&typeof w.then!="function"&&l(b,w,C);if(j===kBe)return m(b,w,C);if(j===gBe)return s(b,w,C);if(j===fBe)return l(b,w,C);if(CBe[j])return h(b,w,C);if(j===dBe)return t(b,w,C);if(j===hBe)return n(b,w,C);if(j===pBe||j===vBe||j===SBe)return c(b,w,C);if(y){let A=y[j];if(!A){const M=KPe(b);M&&(A=y[M])}if(A)return A(b,w,C)}return!1}}function MBe({circular:t,createCustomConfig:e,strict:n}){let r={areArrayBuffersEqual:eBe,areArraysEqual:n?b0:tBe,areDataViewsEqual:nBe,areDatesEqual:rBe,areErrorsEqual:sBe,areFunctionsEqual:oBe,areMapsEqual:n?C9(mU,b0):mU,areNumbersEqual:iBe,areObjectsEqual:n?b0:aBe,arePrimitiveWrappersEqual:lBe,areRegExpsEqual:cBe,areSetsEqual:n?C9(gU,b0):gU,areTypedArraysEqual:n?C9(ww,b0):ww,areUrlsEqual:uBe,unknownTagComparators:void 0};if(e&&(r=Object.assign({},r,e(r))),t){const s=yb(r.areArraysEqual),o=yb(r.areMapsEqual),i=yb(r.areObjectsEqual),a=yb(r.areSetsEqual);r=Object.assign({},r,{areArraysEqual:s,areMapsEqual:o,areObjectsEqual:i,areSetsEqual:a})}return r}function jBe(t){return function(e,n,r,s,o,i,a){return t(e,n,a)}}function ABe({circular:t,comparator:e,createState:n,equals:r,strict:s}){if(n)return function(a,l){const{cache:c=t?new WeakMap:void 0,meta:u}=n();return e(a,l,{cache:c,equals:r,meta:u,strict:s})};if(t)return function(a,l){return e(a,l,{cache:new WeakMap,equals:r,meta:void 0,strict:s})};const o={cache:void 0,equals:r,meta:void 0,strict:s};return function(a,l){return e(a,l,o)}}const wse=Od();Od({strict:!0});Od({circular:!0});Od({circular:!0,strict:!0});Od({createInternalComparator:()=>pp});Od({strict:!0,createInternalComparator:()=>pp});Od({circular:!0,createInternalComparator:()=>pp});Od({circular:!0,createInternalComparator:()=>pp,strict:!0});function Od(t={}){const{circular:e=!1,createInternalComparator:n,createState:r,strict:s=!1}=t,o=MBe(t),i=TBe(o),a=n?n(i):jBe(i);return ABe({circular:e,comparator:i,createState:r,equals:a,strict:s})}var k9={exports:{}},E9={};/**
 * @license React
 * use-sync-external-store-shim/with-selector.production.js
 *
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var yU;function _Be(){if(yU)return E9;yU=1;var t=Zf(),e=vse();function n(c,u){return c===u&&(c!==0||1/c===1/u)||c!==c&&u!==u}var r=typeof Object.is=="function"?Object.is:n,s=e.useSyncExternalStore,o=t.useRef,i=t.useEffect,a=t.useMemo,l=t.useDebugValue;return E9.useSyncExternalStoreWithSelector=function(c,u,f,h,m){var y=o(null);if(y.current===null){var v={hasValue:!1,value:null};y.current=v}else v=y.current;y=a(function(){function w(A){if(!C){if(C=!0,k=A,A=h(A),m!==void 0&&v.hasValue){var M=v.value;if(m(M,A))return E=M}return E=A}if(M=E,r(k,A))return M;var _=h(A);return m!==void 0&&m(M,_)?(k=A,M):(k=A,E=_)}var C=!1,k,E,j=f===void 0?null:f;return[function(){return w(u())},j===null?void 0:function(){return w(j())}]},[u,f,h,m]);var b=s(c,y[0],y[1]);return i(function(){v.hasValue=!0,v.value=b},[b]),l(b),b},E9}var vU;function RBe(){return vU||(vU=1,k9.exports=_Be()),k9.exports}var DBe=RBe(),IBe=(...t)=>e=>{t.forEach(n=>{typeof n=="function"?n(e):n&&(n.current=e)})},OBe=({contentComponent:t})=>{const e=bse.useSyncExternalStore(t.subscribe,t.getSnapshot,t.getServerSnapshot);return d.jsx(d.Fragment,{children:Object.values(e)})};function NBe(){const t=new Set;let e={};return{subscribe(n){return t.add(n),()=>{t.delete(n)}},getSnapshot(){return e},getServerSnapshot(){return e},setRenderer(n,r){e={...e,[n]:Ch.createPortal(r.reactElement,r.element,n)},t.forEach(s=>s())},removeRenderer(n){const r={...e};delete r[n],e=r,t.forEach(s=>s())}}}var LBe=class extends It.Component{constructor(t){var e;super(t),this.editorContentRef=It.createRef(),this.initialized=!1,this.state={hasContentComponentInitialized:!!((e=t.editor)!=null&&e.contentComponent)}}componentDidMount(){this.init()}componentDidUpdate(){this.init()}init(){var t;const e=this.props.editor;if(e&&!e.isDestroyed&&((t=e.view.dom)!=null&&t.parentNode)){if(e.contentComponent)return;const n=this.editorContentRef.current;n.append(...e.view.dom.parentNode.childNodes),e.setOptions({element:n}),e.contentComponent=NBe(),this.state.hasContentComponentInitialized||(this.unsubscribeToContentComponent=e.contentComponent.subscribe(()=>{this.setState(r=>r.hasContentComponentInitialized?r:{hasContentComponentInitialized:!0}),this.unsubscribeToContentComponent&&this.unsubscribeToContentComponent()})),e.createNodeViews(),this.initialized=!0}}componentWillUnmount(){var t;const e=this.props.editor;if(e){this.initialized=!1,e.isDestroyed||e.view.setProps({nodeViews:{}}),this.unsubscribeToContentComponent&&this.unsubscribeToContentComponent(),e.contentComponent=null;try{if(!((t=e.view.dom)!=null&&t.parentNode))return;const n=document.createElement("div");n.append(...e.view.dom.parentNode.childNodes),e.setOptions({element:n})}catch{}}}render(){const{editor:t,innerRef:e,...n}=this.props;return d.jsxs(d.Fragment,{children:[d.jsx("div",{ref:IBe(e,this.editorContentRef),...n}),(t==null?void 0:t.contentComponent)&&d.jsx(OBe,{contentComponent:t.contentComponent})]})}},$Be=S.forwardRef((t,e)=>{const n=It.useMemo(()=>Math.floor(Math.random()*4294967295).toString(),[t.editor]);return It.createElement(LBe,{key:n,innerRef:e,...t})}),uM=It.memo($Be),FBe=typeof window<"u"?S.useLayoutEffect:S.useEffect,zBe=class{constructor(t){this.transactionNumber=0,this.lastTransactionNumber=0,this.subscribers=new Set,this.editor=t,this.lastSnapshot={editor:t,transactionNumber:0},this.getSnapshot=this.getSnapshot.bind(this),this.getServerSnapshot=this.getServerSnapshot.bind(this),this.watch=this.watch.bind(this),this.subscribe=this.subscribe.bind(this)}getSnapshot(){return this.transactionNumber===this.lastTransactionNumber?this.lastSnapshot:(this.lastTransactionNumber=this.transactionNumber,this.lastSnapshot={editor:this.editor,transactionNumber:this.transactionNumber},this.lastSnapshot)}getServerSnapshot(){return{editor:null,transactionNumber:0}}subscribe(t){return this.subscribers.add(t),()=>{this.subscribers.delete(t)}}watch(t){if(this.editor=t,this.editor){const e=()=>{this.transactionNumber+=1,this.subscribers.forEach(r=>r())},n=this.editor;return n.on("transaction",e),()=>{n.off("transaction",e)}}}};function fa(t){var e;const[n]=S.useState(()=>new zBe(t.editor)),r=DBe.useSyncExternalStoreWithSelector(n.subscribe,n.getSnapshot,n.getServerSnapshot,t.selector,(e=t.equalityFn)!=null?e:wse);return FBe(()=>n.watch(t.editor),[t.editor,n]),S.useDebugValue(r),r}var PBe=!1,dM=typeof window>"u",BBe=dM||!!(typeof window<"u"&&window.next),HBe=class Sse{constructor(e){this.editor=null,this.subscriptions=new Set,this.isComponentMounted=!1,this.previousDeps=null,this.instanceId="",this.options=e,this.subscriptions=new Set,this.setEditor(this.getInitialEditor()),this.scheduleDestroy(),this.getEditor=this.getEditor.bind(this),this.getServerSnapshot=this.getServerSnapshot.bind(this),this.subscribe=this.subscribe.bind(this),this.refreshEditorInstance=this.refreshEditorInstance.bind(this),this.scheduleDestroy=this.scheduleDestroy.bind(this),this.onRender=this.onRender.bind(this),this.createEditor=this.createEditor.bind(this)}setEditor(e){this.editor=e,this.instanceId=Math.random().toString(36).slice(2,9),this.subscriptions.forEach(n=>n())}getInitialEditor(){return this.options.current.immediatelyRender===void 0?dM||BBe?null:this.createEditor():(this.options.current.immediatelyRender,this.options.current.immediatelyRender?this.createEditor():null)}createEditor(){const e={...this.options.current,onBeforeCreate:(...r)=>{var s,o;return(o=(s=this.options.current).onBeforeCreate)==null?void 0:o.call(s,...r)},onBlur:(...r)=>{var s,o;return(o=(s=this.options.current).onBlur)==null?void 0:o.call(s,...r)},onCreate:(...r)=>{var s,o;return(o=(s=this.options.current).onCreate)==null?void 0:o.call(s,...r)},onDestroy:(...r)=>{var s,o;return(o=(s=this.options.current).onDestroy)==null?void 0:o.call(s,...r)},onFocus:(...r)=>{var s,o;return(o=(s=this.options.current).onFocus)==null?void 0:o.call(s,...r)},onSelectionUpdate:(...r)=>{var s,o;return(o=(s=this.options.current).onSelectionUpdate)==null?void 0:o.call(s,...r)},onTransaction:(...r)=>{var s,o;return(o=(s=this.options.current).onTransaction)==null?void 0:o.call(s,...r)},onUpdate:(...r)=>{var s,o;return(o=(s=this.options.current).onUpdate)==null?void 0:o.call(s,...r)},onContentError:(...r)=>{var s,o;return(o=(s=this.options.current).onContentError)==null?void 0:o.call(s,...r)},onDrop:(...r)=>{var s,o;return(o=(s=this.options.current).onDrop)==null?void 0:o.call(s,...r)},onPaste:(...r)=>{var s,o;return(o=(s=this.options.current).onPaste)==null?void 0:o.call(s,...r)},onDelete:(...r)=>{var s,o;return(o=(s=this.options.current).onDelete)==null?void 0:o.call(s,...r)}};return new iPe(e)}getEditor(){return this.editor}getServerSnapshot(){return null}subscribe(e){return this.subscriptions.add(e),()=>{this.subscriptions.delete(e)}}static compareOptions(e,n){return Object.keys(e).every(r=>["onCreate","onBeforeCreate","onDestroy","onUpdate","onTransaction","onFocus","onBlur","onSelectionUpdate","onContentError","onDrop","onPaste"].includes(r)?!0:r==="extensions"&&e.extensions&&n.extensions?e.extensions.length!==n.extensions.length?!1:e.extensions.every((s,o)=>{var i;return s===((i=n.extensions)==null?void 0:i[o])}):e[r]===n[r])}onRender(e){return()=>(this.isComponentMounted=!0,clearTimeout(this.scheduledDestructionTimeout),this.editor&&!this.editor.isDestroyed&&e.length===0?Sse.compareOptions(this.options.current,this.editor.options)||this.editor.setOptions({...this.options.current,editable:this.editor.isEditable}):this.refreshEditorInstance(e),()=>{this.isComponentMounted=!1,this.scheduleDestroy()})}refreshEditorInstance(e){if(this.editor&&!this.editor.isDestroyed){if(this.previousDeps===null){this.previousDeps=e;return}if(this.previousDeps.length===e.length&&this.previousDeps.every((r,s)=>r===e[s]))return}this.editor&&!this.editor.isDestroyed&&this.editor.destroy(),this.setEditor(this.createEditor()),this.previousDeps=e}scheduleDestroy(){const e=this.instanceId,n=this.editor;this.scheduledDestructionTimeout=setTimeout(()=>{if(this.isComponentMounted&&this.instanceId===e){n&&n.setOptions(this.options.current);return}n&&!n.isDestroyed&&(n.destroy(),this.instanceId===e&&this.setEditor(null))},1)}};function fM(t={},e=[]){const n=S.useRef(t);n.current=t;const[r]=S.useState(()=>new HBe(n)),s=bse.useSyncExternalStore(r.subscribe,r.getEditor,r.getServerSnapshot);return S.useDebugValue(s),S.useEffect(r.onRender(e)),fa({editor:s,selector:({transactionNumber:o})=>t.shouldRerenderOnTransaction===!1||t.shouldRerenderOnTransaction===void 0?null:t.immediatelyRender&&o===0?0:o+1}),s}var _D=S.createContext({editor:null});_D.Consumer;var Cse=()=>S.useContext(_D),kse=S.createContext({onDragStart:()=>{},nodeViewContentChildren:void 0,nodeViewContentRef:()=>{}}),UBe=()=>S.useContext(kse),VBe=It.forwardRef((t,e)=>{const{onDragStart:n}=UBe(),r=t.as||"div";return d.jsx(r,{...t,ref:e,"data-node-view-wrapper":"",onDragStart:n,style:{whiteSpace:"normal",...t.style}})});function bU(t){return!!(typeof t=="function"&&t.prototype&&t.prototype.isReactComponent)}function xU(t){return!!(typeof t=="object"&&t.$$typeof&&(t.$$typeof.toString()==="Symbol(react.forward_ref)"||t.$$typeof.description==="react.forward_ref"))}function qBe(t){return!!(typeof t=="object"&&t.$$typeof&&(t.$$typeof.toString()==="Symbol(react.memo)"||t.$$typeof.description==="react.memo"))}function WBe(t){if(bU(t)||xU(t))return!0;if(qBe(t)){const e=t.type;if(e)return bU(e)||xU(e)}return!1}function YBe(){try{if(S.version)return parseInt(S.version.split(".")[0],10)>=19}catch{}return!1}var GBe=class{constructor(t,{editor:e,props:n={},as:r="div",className:s=""}){this.ref=null,this.destroyed=!1,this.id=Math.floor(Math.random()*4294967295).toString(),this.component=t,this.editor=e,this.props=n,this.element=document.createElement(r),this.element.classList.add("react-renderer"),s&&this.element.classList.add(...s.split(" ")),this.editor.isInitialized?Xo.flushSync(()=>{this.render()}):queueMicrotask(()=>{this.destroyed||this.render()})}render(){var t;if(this.destroyed)return;const e=this.component,n=this.props,r=this.editor,s=YBe(),o=WBe(e),i={...n};i.ref&&!(s||o)&&delete i.ref,!i.ref&&(s||o)&&(i.ref=a=>{this.ref=a}),this.reactElement=d.jsx(e,{...i}),(t=r==null?void 0:r.contentComponent)==null||t.setRenderer(this.id,this)}updateProps(t={}){this.destroyed||(this.props={...this.props,...t},this.render())}destroy(){var t;this.destroyed=!0;const e=this.editor;(t=e==null?void 0:e.contentComponent)==null||t.removeRenderer(this.id);try{this.element&&this.element.parentNode&&this.element.parentNode.removeChild(this.element)}catch{}}updateAttributes(t){Object.keys(t).forEach(e=>{this.element.setAttribute(e,t[e])})}};It.createContext({markViewContentRef:()=>{}});var KBe=class extends yPe{constructor(t,e,n){if(super(t,e,n),this.selectionRafId=null,this.cachedExtensionWithSyncedStorage=null,!this.node.isLeaf){this.options.contentDOMElementTag?this.contentDOMElement=document.createElement(this.options.contentDOMElementTag):this.contentDOMElement=document.createElement(this.node.isInline?"span":"div"),this.contentDOMElement.dataset.nodeViewContentReact="",this.contentDOMElement.dataset.nodeViewWrapper="",this.contentDOMElement.style.whiteSpace="inherit";const r=this.dom.querySelector("[data-node-view-content]");if(!r)return;r.appendChild(this.contentDOMElement)}}get extensionWithSyncedStorage(){if(!this.cachedExtensionWithSyncedStorage){const t=this.editor,e=this.extension;this.cachedExtensionWithSyncedStorage=new Proxy(e,{get(n,r,s){var o;return r==="storage"?(o=t.storage[e.name])!=null?o:{}:Reflect.get(n,r,s)}})}return this.cachedExtensionWithSyncedStorage}mount(){const t={editor:this.editor,node:this.node,decorations:this.decorations,innerDecorations:this.innerDecorations,view:this.view,selected:!1,extension:this.extensionWithSyncedStorage,HTMLAttributes:this.HTMLAttributes,getPos:()=>this.getPos(),updateAttributes:(l={})=>this.updateAttributes(l),deleteNode:()=>this.deleteNode(),ref:S.createRef()};if(!this.component.displayName){const l=c=>c.charAt(0).toUpperCase()+c.substring(1);this.component.displayName=l(this.extension.name)}const r={onDragStart:this.onDragStart.bind(this),nodeViewContentRef:l=>{l&&this.contentDOMElement&&l.firstChild!==this.contentDOMElement&&(l.hasAttribute("data-node-view-wrapper")&&l.removeAttribute("data-node-view-wrapper"),l.appendChild(this.contentDOMElement))}},s=this.component,o=S.memo(l=>d.jsx(kse.Provider,{value:r,children:S.createElement(s,l)}));o.displayName="ReactNodeView";let i=this.node.isInline?"span":"div";this.options.as&&(i=this.options.as);const{className:a=""}=this.options;this.handleSelectionUpdate=this.handleSelectionUpdate.bind(this),this.renderer=new GBe(o,{editor:this.editor,props:t,as:i,className:`node-${this.node.type.name} ${a}`.trim()}),this.editor.on("selectionUpdate",this.handleSelectionUpdate),this.updateElementAttributes()}get dom(){var t;if(this.renderer.element.firstElementChild&&!((t=this.renderer.element.firstElementChild)!=null&&t.hasAttribute("data-node-view-wrapper")))throw Error("Please use the NodeViewWrapper component for your node view.");return this.renderer.element}get contentDOM(){return this.node.isLeaf?null:this.contentDOMElement}handleSelectionUpdate(){this.selectionRafId&&(cancelAnimationFrame(this.selectionRafId),this.selectionRafId=null),this.selectionRafId=requestAnimationFrame(()=>{this.selectionRafId=null;const{from:t,to:e}=this.editor.state.selection,n=this.getPos();if(typeof n=="number")if(t<=n&&e>=n+this.node.nodeSize){if(this.renderer.props.selected)return;this.selectNode()}else{if(!this.renderer.props.selected)return;this.deselectNode()}})}update(t,e,n){const r=s=>{this.renderer.updateProps(s),typeof this.options.attrs=="function"&&this.updateElementAttributes()};if(t.type!==this.node.type)return!1;if(typeof this.options.update=="function"){const s=this.node,o=this.decorations,i=this.innerDecorations;return this.node=t,this.decorations=e,this.innerDecorations=n,this.options.update({oldNode:s,oldDecorations:o,newNode:t,newDecorations:e,oldInnerDecorations:i,innerDecorations:n,updateProps:()=>r({node:t,decorations:e,innerDecorations:n,extension:this.extensionWithSyncedStorage})})}return t===this.node&&this.decorations===e&&this.innerDecorations===n||(this.node=t,this.decorations=e,this.innerDecorations=n,r({node:t,decorations:e,innerDecorations:n,extension:this.extensionWithSyncedStorage})),!0}selectNode(){this.renderer.updateProps({selected:!0}),this.renderer.element.classList.add("ProseMirror-selectednode")}deselectNode(){this.renderer.updateProps({selected:!1}),this.renderer.element.classList.remove("ProseMirror-selectednode")}destroy(){this.renderer.destroy(),this.editor.off("selectionUpdate",this.handleSelectionUpdate),this.contentDOMElement=null,this.selectionRafId&&(cancelAnimationFrame(this.selectionRafId),this.selectionRafId=null)}updateElementAttributes(){if(this.options.attrs){let t={};if(typeof this.options.attrs=="function"){const e=this.editor.extensionManager.attributes,n=ym(this.node,e);t=this.options.attrs({node:this.node,HTMLAttributes:n})}else t=this.options.attrs;this.renderer.updateAttributes(t)}}};function XBe(t,e){return n=>n.editor.contentComponent?new KBe(t,n,e):{}}var RD=S.createContext({get editor(){throw new Error("useTiptap must be used within a <Tiptap> provider")}});RD.displayName="TiptapContext";var ZBe=()=>S.useContext(RD);function Ese({editor:t,instance:e,children:n}){const r=t??e;if(!r)throw new Error("Tiptap: An editor instance is required. Pass a non-null `editor` prop.");const s=S.useMemo(()=>({editor:r}),[r]),o=S.useMemo(()=>({editor:r}),[r]);return d.jsx(_D.Provider,{value:o,children:d.jsx(RD.Provider,{value:s,children:n})})}Ese.displayName="Tiptap";function Tse({...t}){const{editor:e}=ZBe();return d.jsx(uM,{editor:e,...t})}Tse.displayName="Tiptap.Content";Object.assign(Ese,{Content:Tse});const DD=Be((t,e)=>{const n=we("RichTextEditorContent",null,t),{classNames:r,className:s,style:o,styles:i,vars:a,...l}=n,c=Nl();return c.withTypographyStyles?d.jsx(f_,{...c.getStyles("Typography",{className:s,style:o,styles:i,classNames:r}),unstyled:c.unstyled,ref:e,children:d.jsx(ie,{component:uM,editor:c.editor,...c.getStyles("content",{classNames:r,styles:i}),...l})}):d.jsx(ie,{component:uM,editor:c.editor,...c.getStyles("content",{classNames:r,styles:i,className:s,style:o}),...l})});DD.classes=fp;DD.displayName="@mantine/tiptap/RichTextEditorContent";function $n(t){return d.jsx("svg",{...t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",strokeWidth:"1.5",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round"})}function QBe(t){return d.jsxs($n,{...t,children:[d.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),d.jsx("path",{d:"M7 5h6a3.5 3.5 0 0 1 0 7h-6z"}),d.jsx("path",{d:"M13 12h1a3.5 3.5 0 0 1 0 7h-7v-7"})]})}function JBe(t){return d.jsxs($n,{...t,children:[d.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),d.jsx("path",{d:"M11 5l6 0"}),d.jsx("path",{d:"M7 19l6 0"}),d.jsx("path",{d:"M14 5l-4 14"})]})}function eHe(t){return d.jsxs($n,{...t,children:[d.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),d.jsx("path",{d:"M7 5v5a5 5 0 0 0 10 0v-5"}),d.jsx("path",{d:"M5 19h14"})]})}function tHe(t){return d.jsxs($n,{...t,children:[d.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),d.jsx("path",{d:"M5 12l14 0"}),d.jsx("path",{d:"M16 6.5a4 2 0 0 0 -4 -1.5h-1a3.5 3.5 0 0 0 0 7h2a3.5 3.5 0 0 1 0 7h-1.5a4 2 0 0 1 -4 -1.5"})]})}function nHe(t){return d.jsxs($n,{...t,children:[d.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),d.jsx("path",{d:"M17 15l4 4m0 -4l-4 4"}),d.jsx("path",{d:"M7 6v-1h11v1"}),d.jsx("path",{d:"M7 19l4 0"}),d.jsx("path",{d:"M13 5l-4 14"})]})}function rHe(t){return d.jsxs($n,{...t,children:[d.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),d.jsx("path",{d:"M19 18v-8l-2 2"}),d.jsx("path",{d:"M4 6v12"}),d.jsx("path",{d:"M12 6v12"}),d.jsx("path",{d:"M11 18h2"}),d.jsx("path",{d:"M3 18h2"}),d.jsx("path",{d:"M4 12h8"}),d.jsx("path",{d:"M3 6h2"}),d.jsx("path",{d:"M11 6h2"})]})}function sHe(t){return d.jsxs($n,{...t,children:[d.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),d.jsx("path",{d:"M17 12a2 2 0 1 1 4 0c0 .591 -.417 1.318 -.816 1.858l-3.184 4.143l4 0"}),d.jsx("path",{d:"M4 6v12"}),d.jsx("path",{d:"M12 6v12"}),d.jsx("path",{d:"M11 18h2"}),d.jsx("path",{d:"M3 18h2"}),d.jsx("path",{d:"M4 12h8"}),d.jsx("path",{d:"M3 6h2"}),d.jsx("path",{d:"M11 6h2"})]})}function oHe(t){return d.jsxs($n,{...t,children:[d.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),d.jsx("path",{d:"M19 14a2 2 0 1 0 -2 -2"}),d.jsx("path",{d:"M17 16a2 2 0 1 0 2 -2"}),d.jsx("path",{d:"M4 6v12"}),d.jsx("path",{d:"M12 6v12"}),d.jsx("path",{d:"M11 18h2"}),d.jsx("path",{d:"M3 18h2"}),d.jsx("path",{d:"M4 12h8"}),d.jsx("path",{d:"M3 6h2"}),d.jsx("path",{d:"M11 6h2"})]})}function iHe(t){return d.jsxs($n,{...t,children:[d.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),d.jsx("path",{d:"M20 18v-8l-4 6h5"}),d.jsx("path",{d:"M4 6v12"}),d.jsx("path",{d:"M12 6v12"}),d.jsx("path",{d:"M11 18h2"}),d.jsx("path",{d:"M3 18h2"}),d.jsx("path",{d:"M4 12h8"}),d.jsx("path",{d:"M3 6h2"}),d.jsx("path",{d:"M11 6h2"})]})}function aHe(t){return d.jsxs($n,{...t,children:[d.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),d.jsx("path",{d:"M17 18h2a2 2 0 1 0 0 -4h-2v-4h4"}),d.jsx("path",{d:"M4 6v12"}),d.jsx("path",{d:"M12 6v12"}),d.jsx("path",{d:"M11 18h2"}),d.jsx("path",{d:"M3 18h2"}),d.jsx("path",{d:"M4 12h8"}),d.jsx("path",{d:"M3 6h2"}),d.jsx("path",{d:"M11 6h2"})]})}function lHe(t){return d.jsxs($n,{...t,children:[d.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),d.jsx("path",{d:"M19 14a2 2 0 1 0 0 4a2 2 0 0 0 0 -4z"}),d.jsx("path",{d:"M21 12a2 2 0 1 0 -4 0v4"}),d.jsx("path",{d:"M4 6v12"}),d.jsx("path",{d:"M12 6v12"}),d.jsx("path",{d:"M11 18h2"}),d.jsx("path",{d:"M3 18h2"}),d.jsx("path",{d:"M4 12h8"}),d.jsx("path",{d:"M3 6h2"}),d.jsx("path",{d:"M11 6h2"})]})}function cHe(t){return d.jsxs($n,{...t,children:[d.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),d.jsx("path",{d:"M9 6l11 0"}),d.jsx("path",{d:"M9 12l11 0"}),d.jsx("path",{d:"M9 18l11 0"}),d.jsx("path",{d:"M5 6l0 .01"}),d.jsx("path",{d:"M5 12l0 .01"}),d.jsx("path",{d:"M5 18l0 .01"})]})}function uHe(t){return d.jsxs($n,{...t,children:[d.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),d.jsx("path",{d:"M11 6h9"}),d.jsx("path",{d:"M11 12h9"}),d.jsx("path",{d:"M12 18h8"}),d.jsx("path",{d:"M4 16a2 2 0 1 1 4 0c0 .591 -.5 1 -1 1.5l-3 2.5h4"}),d.jsx("path",{d:"M6 10v-6l-2 2"})]})}function dHe(t){return d.jsxs($n,{...t,children:[d.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),d.jsx("path",{d:"M17 22v-2"}),d.jsx("path",{d:"M9 15l6 -6"}),d.jsx("path",{d:"M11 6l.463 -.536a5 5 0 0 1 7.071 7.072l-.534 .464"}),d.jsx("path",{d:"M13 18l-.397 .534a5.068 5.068 0 0 1 -7.127 0a4.972 4.972 0 0 1 0 -7.071l.524 -.463"}),d.jsx("path",{d:"M20 17h2"}),d.jsx("path",{d:"M2 7h2"}),d.jsx("path",{d:"M7 2v2"})]})}function fHe(t){return d.jsxs($n,{...t,children:[d.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),d.jsx("path",{d:"M6 15h15"}),d.jsx("path",{d:"M21 19h-15"}),d.jsx("path",{d:"M15 11h6"}),d.jsx("path",{d:"M21 7h-6"}),d.jsx("path",{d:"M9 9h1a1 1 0 1 1 -1 1v-2.5a2 2 0 0 1 2 -2"}),d.jsx("path",{d:"M3 9h1a1 1 0 1 1 -1 1v-2.5a2 2 0 0 1 2 -2"})]})}function pHe(t){return d.jsxs($n,{...t,children:[d.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),d.jsx("path",{d:"M4 6l16 0"}),d.jsx("path",{d:"M4 12l10 0"}),d.jsx("path",{d:"M4 18l14 0"})]})}function hHe(t){return d.jsxs($n,{...t,children:[d.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),d.jsx("path",{d:"M4 6l16 0"}),d.jsx("path",{d:"M10 12l10 0"}),d.jsx("path",{d:"M6 18l14 0"})]})}function mHe(t){return d.jsxs($n,{...t,children:[d.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),d.jsx("path",{d:"M4 6l16 0"}),d.jsx("path",{d:"M8 12l8 0"}),d.jsx("path",{d:"M6 18l12 0"})]})}function gHe(t){return d.jsxs($n,{...t,children:[d.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),d.jsx("path",{d:"M4 6l16 0"}),d.jsx("path",{d:"M4 12l16 0"}),d.jsx("path",{d:"M4 18l12 0"})]})}function yHe(t){return d.jsxs($n,{...t,children:[d.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),d.jsx("path",{d:"M5 7l8 10m-8 0l8 -10"}),d.jsx("path",{d:"M21 20h-4l3.5 -4a1.73 1.73 0 0 0 -3.5 -2"})]})}function vHe(t){return d.jsxs($n,{...t,children:[d.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),d.jsx("path",{d:"M5 7l8 10m-8 0l8 -10"}),d.jsx("path",{d:"M21 11h-4l3.5 -4a1.73 1.73 0 0 0 -3.5 -2"})]})}function Mse(t){return d.jsxs($n,{...t,children:[d.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),d.jsx("path",{d:"M7 8l-4 4l4 4"}),d.jsx("path",{d:"M17 8l4 4l-4 4"}),d.jsx("path",{d:"M14 4l-4 16"})]})}function bHe(t){return d.jsxs($n,{...t,children:[d.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),d.jsx("path",{d:"M3 19h4l10.5 -10.5a2.828 2.828 0 1 0 -4 -4l-10.5 10.5v4"}),d.jsx("path",{d:"M12.5 5.5l4 4"}),d.jsx("path",{d:"M4.5 13.5l4 4"}),d.jsx("path",{d:"M21 15v4h-8l4 -4z"})]})}function xHe(t){return d.jsxs($n,{...t,children:[d.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),d.jsx("path",{d:"M5 12h2"}),d.jsx("path",{d:"M17 12h2"}),d.jsx("path",{d:"M11 12h2"})]})}function jse(t){return d.jsxs($n,{...t,children:[d.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),d.jsx("path",{d:"M20.042 16.045a9 9 0 0 0 -12.087 -12.087m-2.318 1.677a9 9 0 1 0 12.725 12.73"}),d.jsx("path",{d:"M3 3l18 18"})]})}function wHe(t){return d.jsxs($n,{...t,children:[d.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),d.jsx("path",{d:"M11 7l6 6"}),d.jsx("path",{d:"M4 16l11.7 -11.7a1 1 0 0 1 1.4 0l2.6 2.6a1 1 0 0 1 0 1.4l-11.7 11.7h-4v-4z"})]})}function SHe(t){return d.jsxs($n,{...t,children:[d.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),d.jsx("path",{d:"M18 6l-12 12"}),d.jsx("path",{d:"M6 6l12 12"})]})}function CHe(t){return d.jsxs($n,{...t,children:[d.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),d.jsx("path",{d:"M12 21a9 9 0 0 1 0 -18c4.97 0 9 3.582 9 8c0 1.06 -.474 2.078 -1.318 2.828c-.844 .75 -1.989 1.172 -3.182 1.172h-2.5a2 2 0 0 0 -1 3.75a1.3 1.3 0 0 1 -1 2.25"}),d.jsx("path",{d:"M8.5 10.5m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"}),d.jsx("path",{d:"M12.5 7.5m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"}),d.jsx("path",{d:"M16.5 10.5m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"})]})}function kHe(t){return d.jsxs($n,{...t,children:[d.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),d.jsx("path",{d:"M5 12l5 5l10 -10"})]})}function EHe(t){return d.jsxs($n,{...t,children:[d.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),d.jsx("path",{d:"M9 15l6 -6"}),d.jsx("path",{d:"M11 6l.463 -.536a5 5 0 0 1 7.071 7.072l-.534 .464"}),d.jsx("path",{d:"M13 18l-.397 .534a5.068 5.068 0 0 1 -7.127 0a4.972 4.972 0 0 1 0 -7.071l.524 -.463"})]})}function THe(t){return d.jsxs($n,{...t,children:[d.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),d.jsx("path",{d:"M12 6h-6a2 2 0 0 0 -2 2v10a2 2 0 0 0 2 2h10a2 2 0 0 0 2 -2v-6"}),d.jsx("path",{d:"M11 13l9 -9"}),d.jsx("path",{d:"M15 4h5v5"})]})}function MHe(t){return d.jsxs($n,{...t,children:[d.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),d.jsx("path",{d:"M9 14l-4 -4l4 -4"}),d.jsx("path",{d:"M5 10h11a4 4 0 1 1 0 8h-1"})]})}function jHe(t){return d.jsxs($n,{...t,children:[d.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),d.jsx("path",{d:"M15 14l4 -4l-4 -4"}),d.jsx("path",{d:"M19 10h-11a4 4 0 1 0 0 8h1"})]})}function AHe(t){return d.jsxs($n,{...t,children:[d.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),d.jsx("path",{d:"M3.5 5.5l1.5 1.5l2.5 -2.5"}),d.jsx("path",{d:"M3.5 11.5l1.5 1.5l2.5 -2.5"}),d.jsx("path",{d:"M3.5 17.5l1.5 1.5l2.5 -2.5"}),d.jsx("path",{d:"M11 6l9 0"}),d.jsx("path",{d:"M11 12l9 0"}),d.jsx("path",{d:"M11 18l9 0"})]})}function _He(t){return d.jsxs($n,{...t,children:[d.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),d.jsx("path",{d:"M20 6l-11 0"}),d.jsx("path",{d:"M20 12l-7 0"}),d.jsx("path",{d:"M20 18l-11 0"}),d.jsx("path",{d:"M4 8l4 4l-4 4"})]})}function RHe(t){return d.jsxs($n,{...t,children:[d.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),d.jsx("path",{d:"M20 6l-7 0"}),d.jsx("path",{d:"M20 12l-9 0"}),d.jsx("path",{d:"M20 18l-7 0"}),d.jsx("path",{d:"M8 8l-4 4l4 4"})]})}function DHe(t){return d.jsxs($n,{...t,children:[d.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),d.jsx("path",{d:`M19 3v16a1 1 0 0 1-1 1H6a1 1 0 0 1-1-1V7.914
           a1 1 0 0 1 .293-.707l3.914-3.914A1 1 0 0 1 9.914 3H18
           a1 1 0 0 1 1 1Z`}),d.jsx("path",{d:"M10 11l-2 2 2 2"}),d.jsx("path",{d:"M14 11l2 2-2 2"})]})}const IHe={interactive:!0},hp=Be((t,e)=>{const n=we("RichTextEditorControl",IHe,t),{classNames:r,className:s,style:o,styles:i,vars:a,interactive:l,active:c,onMouseDown:u,disabled:f,...h}=n,m=Nl();return d.jsx(En,{...h,...m.getStyles("control",{className:s,style:o,classNames:r,styles:i}),disabled:f,"data-rich-text-editor-control":!0,tabIndex:l?0:-1,"data-interactive":l||void 0,"data-disabled":f||void 0,"data-active":c||void 0,"aria-pressed":c&&l||void 0,"aria-hidden":!l||void 0,ref:e,unstyled:m.unstyled,variant:m.variant||"default",onMouseDown:y=>{y.preventDefault(),u==null||u(y)}})});hp.classes=fp;hp.displayName="@mantine/tiptap/RichTextEditorControl";const ID=S.forwardRef(({className:t,icon:e,...n},r)=>{const s=Nl();return d.jsx(hp,{ref:r,...n,children:d.jsx(e,{...s.getStyles("controlIcon")})})});ID.displayName="@mantine/tiptap/RichTextEditorControlBase";function Qn({label:t,isActive:e,operation:n,icon:r,isDisabled:s}){const o=S.forwardRef((i,a)=>{const{editor:l,labels:c}=Nl(),u=c[t];return d.jsx(ID,{"aria-label":u,title:u,active:e!=null&&e.name?l==null?void 0:l.isActive(e.name,e.attributes):!1,ref:a,icon:i.icon||r,disabled:(s==null?void 0:s(l))||!1,...i,onClick:()=>l==null?void 0:l.chain().focus()[n.name](n.attributes).run()})});return o.displayName=`@mantine/tiptap/${t}`,o}const OHe=Qn({label:"boldControlLabel",icon:t=>d.jsx(QBe,{...t}),isActive:{name:"bold"},operation:{name:"toggleBold"}}),NHe=Qn({label:"italicControlLabel",icon:t=>d.jsx(JBe,{...t}),isActive:{name:"italic"},operation:{name:"toggleItalic"}}),LHe=Qn({label:"underlineControlLabel",icon:t=>d.jsx(eHe,{...t}),isActive:{name:"underline"},operation:{name:"toggleUnderline"}}),$He=Qn({label:"strikeControlLabel",icon:t=>d.jsx(tHe,{...t}),isActive:{name:"strike"},operation:{name:"toggleStrike"}}),FHe=Qn({label:"clearFormattingControlLabel",icon:t=>d.jsx(nHe,{...t}),operation:{name:"unsetAllMarks"}}),zHe=Qn({label:"unlinkControlLabel",icon:t=>d.jsx(dHe,{...t}),operation:{name:"unsetLink"}}),PHe=Qn({label:"bulletListControlLabel",icon:t=>d.jsx(cHe,{...t}),isActive:{name:"bulletList"},operation:{name:"toggleBulletList"}}),BHe=Qn({label:"orderedListControlLabel",icon:t=>d.jsx(uHe,{...t}),isActive:{name:"orderedList"},operation:{name:"toggleOrderedList"}}),HHe=Qn({label:"h1ControlLabel",icon:t=>d.jsx(rHe,{...t}),isActive:{name:"heading",attributes:{level:1}},operation:{name:"toggleHeading",attributes:{level:1}}}),UHe=Qn({label:"h2ControlLabel",icon:t=>d.jsx(sHe,{...t}),isActive:{name:"heading",attributes:{level:2}},operation:{name:"toggleHeading",attributes:{level:2}}}),VHe=Qn({label:"h3ControlLabel",icon:t=>d.jsx(oHe,{...t}),isActive:{name:"heading",attributes:{level:3}},operation:{name:"toggleHeading",attributes:{level:3}}}),qHe=Qn({label:"h4ControlLabel",icon:t=>d.jsx(iHe,{...t}),isActive:{name:"heading",attributes:{level:4}},operation:{name:"toggleHeading",attributes:{level:4}}}),WHe=Qn({label:"h5ControlLabel",icon:t=>d.jsx(aHe,{...t}),isActive:{name:"heading",attributes:{level:5}},operation:{name:"toggleHeading",attributes:{level:5}}}),YHe=Qn({label:"h6ControlLabel",icon:t=>d.jsx(lHe,{...t}),isActive:{name:"heading",attributes:{level:6}},operation:{name:"toggleHeading",attributes:{level:6}}}),GHe=Qn({label:"blockquoteControlLabel",icon:t=>d.jsx(fHe,{...t}),isActive:{name:"blockquote"},operation:{name:"toggleBlockquote"}}),KHe=Qn({label:"alignLeftControlLabel",icon:t=>d.jsx(pHe,{...t}),operation:{name:"setTextAlign",attributes:"left"}}),XHe=Qn({label:"alignRightControlLabel",icon:t=>d.jsx(hHe,{...t}),operation:{name:"setTextAlign",attributes:"right"}}),ZHe=Qn({label:"alignCenterControlLabel",icon:t=>d.jsx(mHe,{...t}),operation:{name:"setTextAlign",attributes:"center"}}),QHe=Qn({label:"alignJustifyControlLabel",icon:t=>d.jsx(gHe,{...t}),operation:{name:"setTextAlign",attributes:"justify"}}),JHe=Qn({label:"subscriptControlLabel",icon:t=>d.jsx(yHe,{...t}),isActive:{name:"subscript"},operation:{name:"toggleSubscript"}}),eUe=Qn({label:"superscriptControlLabel",icon:t=>d.jsx(vHe,{...t}),isActive:{name:"superscript"},operation:{name:"toggleSuperscript"}}),tUe=Qn({label:"codeControlLabel",icon:t=>d.jsx(Mse,{...t}),isActive:{name:"code"},operation:{name:"toggleCode"}}),nUe=Qn({label:"codeBlockControlLabel",icon:t=>d.jsx(Mse,{...t}),isActive:{name:"codeBlock"},operation:{name:"toggleCodeBlock"}}),rUe=Qn({label:"highlightControlLabel",icon:t=>d.jsx(bHe,{...t}),isActive:{name:"highlight"},operation:{name:"toggleHighlight"}}),sUe=Qn({label:"hrControlLabel",icon:t=>d.jsx(xHe,{...t}),operation:{name:"setHorizontalRule"}}),oUe=Qn({label:"unsetColorControlLabel",icon:t=>d.jsx(jse,{...t}),operation:{name:"unsetColor"}}),iUe=Qn({label:"undoControlLabel",icon:t=>d.jsx(MHe,{...t}),isDisabled:t=>!(t!=null&&t.can().undo()),operation:{name:"undo"}}),aUe=Qn({label:"redoControlLabel",icon:t=>d.jsx(jHe,{...t}),isDisabled:t=>!(t!=null&&t.can().redo()),operation:{name:"redo"}}),lUe=Qn({label:"tasksControlLabel",icon:t=>d.jsx(AHe,{...t}),isActive:{name:"taskList"},operation:{name:"toggleTaskList"}}),cUe=Qn({label:"tasksSinkLabel",icon:t=>d.jsx(_He,{...t}),operation:{name:"sinkListItem",attributes:"taskItem"},isDisabled:t=>!(t!=null&&t.can().sinkListItem("taskItem"))}),uUe=Qn({label:"tasksLiftLabel",icon:t=>d.jsx(RHe,{...t}),operation:{name:"liftListItem",attributes:"taskItem"},isDisabled:t=>!(t!=null&&t.can().liftListItem("taskItem"))}),dUe=t=>d.jsx(EHe,{...t}),OD=Be((t,e)=>{var z;const n=we("RichTextEditorLinkControl",null,t),{classNames:r,className:s,style:o,styles:i,vars:a,icon:l,popoverProps:c,disableTooltips:u,initialExternal:f,...h}=n,m=Nl(),y={classNames:r,styles:i},[v,b]=$pe(""),[w,C]=S.useState(f),[k,{open:E,close:j}]=Rs(!1),A=()=>{var L;E();const B=(L=m.editor)==null?void 0:L.getAttributes("link");b((B==null?void 0:B.href)||""),C(B!=null&&B.href?(B==null?void 0:B.target)==="_blank":f)},M=()=>{j(),b(""),C(f)},_=()=>{var B,L;M(),v===""?(B=m.editor)==null||B.chain().focus().extendMarkRange("link").unsetLink().run():(L=m.editor)==null||L.chain().focus().extendMarkRange("link").setLink({href:v,target:w?"_blank":null}).run()},D=B=>{B.key==="Enter"&&(B.preventDefault(),_())};Tc("edit-link",A,!1);const{resolvedClassNames:R,resolvedStyles:N}=Ti({classNames:r,styles:i,props:n});return d.jsxs(Dt,{trapFocus:!0,shadow:"md",withinPortal:!0,opened:k,onChange:B=>!B&&M(),offset:-44,zIndex:1e4,...c,children:[d.jsx(Dt.Target,{children:d.jsx(ID,{icon:l||dUe,...h,"aria-label":m.labels.linkControlLabel,title:m.labels.linkControlLabel,onClick:A,active:(z=m.editor)==null?void 0:z.isActive("link"),ref:e,classNames:R,styles:N,className:s,style:o,variant:m.variant})}),d.jsx(Dt.Dropdown,{...m.getStyles("linkEditorDropdown",y),children:d.jsxs("div",{...m.getStyles("linkEditor",y),children:[d.jsx(es,{placeholder:m.labels.linkEditorInputPlaceholder,"aria-label":m.labels.linkEditorInputLabel,type:"url",value:v,onChange:b,classNames:{input:m.getStyles("linkEditorInput",y).className},onKeyDown:D,rightSection:d.jsx(on,{label:w?m.labels.linkEditorExternalLink:m.labels.linkEditorInternalLink,events:{hover:!0,focus:!0,touch:!0},withinPortal:!0,withArrow:!0,disabled:u,zIndex:1e4,children:d.jsx(En,{onClick:()=>C(B=>!B),"data-active":w||void 0,...m.getStyles("linkEditorExternalControl",y),children:d.jsx(THe,{style:{width:Me(14),height:Me(14)}})})})}),d.jsx(yt,{variant:"default",onClick:_,...m.getStyles("linkEditorSave",y),children:m.labels.linkEditorSave})]})})]})});OD.classes=fp;OD.displayName="@mantine/tiptap/RichTextEditorLinkControl";const Ase=S.forwardRef((t,e)=>{const{popoverProps:n,colors:r,colorPickerProps:s,...o}=we("RichTextEditorColorPickerControl",null,t),{editor:i,labels:a,getStyles:l,variant:c}=Nl(),[u,{toggle:f,close:h}]=Rs(!1),[m,y]=S.useState("palette"),v=(i==null?void 0:i.getAttributes("textStyle").color)||"var(--mantine-color-text)",b=(k,E=!0)=>{(i==null?void 0:i.chain()).focus().setColor(k).run(),E&&h()},w=()=>{(i==null?void 0:i.chain()).focus().unsetColor().run(),h()},C=r.map((k,E)=>d.jsx(id,{component:"button",color:k,onClick:()=>b(k),size:26,radius:"xs",style:{cursor:"pointer"},title:a.colorPickerColorLabel(k),"aria-label":a.colorPickerColorLabel(k)},E));return d.jsxs(Dt,{opened:u,withinPortal:!0,trapFocus:!0,onChange:k=>!k&&h(),...n,children:[d.jsx(Dt.Target,{children:d.jsx(hp,{...o,variant:c,"aria-label":a.colorPickerControlLabel,title:a.colorPickerControlLabel,ref:e,onClick:f,children:d.jsx(id,{color:v,size:14})})}),d.jsxs(Dt.Dropdown,{...l("linkEditorDropdown"),children:[m==="palette"&&d.jsx(r_,{cols:7,spacing:2,children:C}),m==="colorPicker"&&d.jsx(RA,{defaultValue:v,onChange:k=>b(k,!1),...s}),d.jsx(on.Group,{closeDelay:200,children:d.jsxs(ve,{justify:"flex-end",gap:"xs",mt:"sm",children:[m==="palette"&&d.jsx(Ve,{variant:"default",onClick:h,title:a.colorPickerCancel,"aria-label":a.colorPickerCancel,children:d.jsx(SHe,{style:{width:Me(16),height:Me(16)}})}),d.jsx(Ve,{variant:"default",onClick:w,title:a.colorPickerClear,"aria-label":a.colorPickerClear,children:d.jsx(jse,{style:{width:Me(16),height:Me(16)}})}),m==="palette"?d.jsx(Ve,{variant:"default",onClick:()=>y("colorPicker"),title:a.colorPickerColorPicker,"aria-label":a.colorPickerColorPicker,children:d.jsx(wHe,{style:{width:Me(16),height:Me(16)}})}):d.jsx(Ve,{variant:"default",onClick:()=>y("palette"),"aria-label":a.colorPickerPalette,title:a.colorPickerPalette,children:d.jsx(CHe,{style:{width:Me(16),height:Me(16)}})}),m==="colorPicker"&&d.jsx(Ve,{variant:"default",onClick:h,title:a.colorPickerSave,"aria-label":a.colorPickerSave,children:d.jsx(kHe,{style:{width:Me(16),height:Me(16)}})})]})})]})]})});Ase.displayName="@mantine/tiptap/ColorPickerControl";const _se=S.forwardRef((t,e)=>{const{color:n,...r}=we("RichTextEditorColorControl",null,t),{editor:s,labels:o,variant:i}=Nl(),a=(s==null?void 0:s.getAttributes("textStyle").color)||null,l=o.colorControlLabel(n);return d.jsx(hp,{...r,variant:i,active:a===n,"aria-label":l,title:l,onClick:()=>(s==null?void 0:s.chain()).focus().setColor(n).run(),ref:e,children:d.jsx(id,{color:n,size:14})})});_se.displayName="@mantine/tiptap/RichTextEditorColorControl";const fUe={},Rse=S.forwardRef((t,e)=>{const{...n}=we("RichTextEditorSourceCodeControl",fUe,t),{editor:r,labels:s,variant:o,onSourceCodeTextSwitch:i}=Nl(),[a,l]=S.useState(!1),c=()=>{a?r==null||r.commands.setContent(r.getText(),{emitUpdate:!0}):r==null||r.commands.setContent(`<textarea>${r.getHTML()}</textarea>`);const u=!a;l(u),i==null||i(u)};return d.jsx(hp,{...n,variant:o,active:a,"aria-label":s.sourceCodeControlLabel,title:s.sourceCodeControlLabel,onClick:()=>c(),ref:e,children:d.jsx(DHe,{style:{width:Me(16),height:Me(16)}})})});Rse.displayName="@mantine/tiptap/RichTextEditorSourceCodeControl";const ND=Be((t,e)=>{const n=we("RichTextEditorControlsGroup",null,t),{classNames:r,className:s,style:o,styles:i,vars:a,variant:l,...c}=n,u=Nl();return d.jsx(ie,{ref:e,variant:l||u.variant,...u.getStyles("controlsGroup",{className:s,style:o,styles:i,classNames:r}),...c})});ND.classes=fp;ND.displayName="@mantine/tiptap/RichTextEditorControlsGroup";const LD=Be((t,e)=>{const n=we("RichTextEditorToolbar",null,t),{classNames:r,className:s,style:o,styles:i,vars:a,sticky:l,stickyOffset:c,mod:u,variant:f,...h}=n,m=Nl();return d.jsx(ie,{ref:e,mod:[{sticky:l},u],variant:f||m.variant,...m.getStyles("toolbar",{className:s,style:o,styles:i,classNames:r}),...h,__vars:{"--rte-sticky-offset":Me(c)}})});LD.classes=fp;LD.displayName="@mantine/tiptap/RichTextEditorToolbar";const pUe={withCodeHighlightStyles:!0,withTypographyStyles:!0,variant:"default"},ft=Be((t,e)=>{const n=we("RichTextEditor",pUe,t),{classNames:r,className:s,style:o,styles:i,unstyled:a,vars:l,editor:c,withCodeHighlightStyles:u,withTypographyStyles:f,onSourceCodeTextSwitch:h,labels:m,children:y,variant:v,attributes:b,...w}=n,C=Et({name:"RichTextEditor",classes:fp,props:n,className:s,style:o,classNames:r,styles:i,unstyled:a,attributes:b,vars:l}),k=S.useMemo(()=>({...UPe,...m}),[m]);return d.jsx(VPe,{value:{editor:c,getStyles:C,labels:k,withCodeHighlightStyles:u,withTypographyStyles:f,onSourceCodeTextSwitch:h,unstyled:a,variant:v},children:d.jsx(ie,{...C("root"),...w,ref:e,children:y})})});ft.classes=fp;ft.displayName="@mantine/tiptap/RichTextEditor";ft.Content=DD;ft.Control=hp;ft.Toolbar=LD;ft.ControlsGroup=ND;ft.Bold=OHe;ft.Italic=NHe;ft.Strikethrough=$He;ft.Underline=LHe;ft.ClearFormatting=FHe;ft.H1=HHe;ft.H2=UHe;ft.H3=VHe;ft.H4=qHe;ft.H5=WHe;ft.H6=YHe;ft.BulletList=PHe;ft.OrderedList=BHe;ft.Link=OD;ft.Unlink=zHe;ft.Blockquote=GHe;ft.AlignLeft=KHe;ft.AlignRight=XHe;ft.AlignCenter=ZHe;ft.AlignJustify=QHe;ft.Superscript=eUe;ft.Subscript=JHe;ft.Code=tUe;ft.CodeBlock=nUe;ft.ColorPicker=Ase;ft.Color=_se;ft.Highlight=rUe;ft.Hr=sUe;ft.UnsetColor=oUe;ft.Undo=iUe;ft.Redo=aUe;ft.TaskList=lUe;ft.TaskListSink=cUe;ft.TaskListLift=uUe;ft.SourceCode=Rse;var hUe=/(?:^|\s)(==(?!\s+==)((?:[^=]+))==(?!\s+==))$/,mUe=/(?:^|\s)(==(?!\s+==)((?:[^=]+))==(?!\s+==))/g,gUe=Wa.create({name:"highlight",addOptions(){return{multicolor:!1,HTMLAttributes:{}}},addAttributes(){return this.options.multicolor?{color:{default:null,parseHTML:t=>t.getAttribute("data-color")||t.style.backgroundColor,renderHTML:t=>t.color?{"data-color":t.color,style:`background-color: ${t.color}; color: inherit`}:{}}}:{}},parseHTML(){return[{tag:"mark"}]},renderHTML({HTMLAttributes:t}){return["mark",rr(this.options.HTMLAttributes,t),0]},renderMarkdown:(t,e)=>`==${e.renderChildren(t)}==`,parseMarkdown:(t,e)=>e.applyMark("highlight",e.parseInline(t.tokens||[])),markdownTokenizer:{name:"highlight",level:"inline",start:t=>t.indexOf("=="),tokenize(t,e,n){const s=/^(==)([^=]+)(==)/.exec(t);if(s){const o=s[2].trim(),i=n.inlineTokens(o);return{type:"highlight",raw:s[0],text:o,tokens:i}}}},addCommands(){return{setHighlight:t=>({commands:e})=>e.setMark(this.name,t),toggleHighlight:t=>({commands:e})=>e.toggleMark(this.name,t),unsetHighlight:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-h":()=>this.editor.commands.toggleHighlight()}},addInputRules(){return[Yf({find:hUe,type:this.type})]},addPasteRules(){return[hd({find:mUe,type:this.type})]}}),pM=gUe;function yUe(t={}){return new Sr({view(e){return new vUe(e,t)}})}class vUe{constructor(e,n){var r;this.editorView=e,this.cursorPos=null,this.element=null,this.timeout=-1,this.width=(r=n.width)!==null&&r!==void 0?r:1,this.color=n.color===!1?void 0:n.color||"black",this.class=n.class,this.handlers=["dragover","dragend","drop","dragleave"].map(s=>{let o=i=>{this[s](i)};return e.dom.addEventListener(s,o),{name:s,handler:o}})}destroy(){this.handlers.forEach(({name:e,handler:n})=>this.editorView.dom.removeEventListener(e,n))}update(e,n){this.cursorPos!=null&&n.doc!=e.state.doc&&(this.cursorPos>e.state.doc.content.size?this.setCursor(null):this.updateOverlay())}setCursor(e){e!=this.cursorPos&&(this.cursorPos=e,e==null?(this.element.parentNode.removeChild(this.element),this.element=null):this.updateOverlay())}updateOverlay(){let e=this.editorView.state.doc.resolve(this.cursorPos),n=!e.parent.inlineContent,r,s=this.editorView.dom,o=s.getBoundingClientRect(),i=o.width/s.offsetWidth,a=o.height/s.offsetHeight;if(n){let f=e.nodeBefore,h=e.nodeAfter;if(f||h){let m=this.editorView.nodeDOM(this.cursorPos-(f?f.nodeSize:0));if(m){let y=m.getBoundingClientRect(),v=f?y.bottom:y.top;f&&h&&(v=(v+this.editorView.nodeDOM(this.cursorPos).getBoundingClientRect().top)/2);let b=this.width/2*a;r={left:y.left,right:y.right,top:v-b,bottom:v+b}}}}if(!r){let f=this.editorView.coordsAtPos(this.cursorPos),h=this.width/2*i;r={left:f.left-h,right:f.left+h,top:f.top,bottom:f.bottom}}let l=this.editorView.dom.offsetParent;this.element||(this.element=l.appendChild(document.createElement("div")),this.class&&(this.element.className=this.class),this.element.style.cssText="position: absolute; z-index: 50; pointer-events: none;",this.color&&(this.element.style.backgroundColor=this.color)),this.element.classList.toggle("prosemirror-dropcursor-block",n),this.element.classList.toggle("prosemirror-dropcursor-inline",!n);let c,u;if(!l||l==document.body&&getComputedStyle(l).position=="static")c=-pageXOffset,u=-pageYOffset;else{let f=l.getBoundingClientRect(),h=f.width/l.offsetWidth,m=f.height/l.offsetHeight;c=f.left-l.scrollLeft*h,u=f.top-l.scrollTop*m}this.element.style.left=(r.left-c)/i+"px",this.element.style.top=(r.top-u)/a+"px",this.element.style.width=(r.right-r.left)/i+"px",this.element.style.height=(r.bottom-r.top)/a+"px"}scheduleRemoval(e){clearTimeout(this.timeout),this.timeout=setTimeout(()=>this.setCursor(null),e)}dragover(e){if(!this.editorView.editable)return;let n=this.editorView.posAtCoords({left:e.clientX,top:e.clientY}),r=n&&n.inside>=0&&this.editorView.state.doc.nodeAt(n.inside),s=r&&r.type.spec.disableDropCursor,o=typeof s=="function"?s(this.editorView,n,e):s;if(n&&!o){let i=n.pos;if(this.editorView.dragging&&this.editorView.dragging.slice){let a=Ene(this.editorView.state.doc,i,this.editorView.dragging.slice);a!=null&&(i=a)}this.setCursor(i),this.scheduleRemoval(5e3)}}dragend(){this.scheduleRemoval(20)}drop(){this.scheduleRemoval(20)}dragleave(e){this.editorView.dom.contains(e.relatedTarget)||this.setCursor(null)}}class Kr extends hn{constructor(e){super(e,e)}map(e,n){let r=e.resolve(n.map(this.head));return Kr.valid(r)?new Kr(r):hn.near(r)}content(){return _t.empty}eq(e){return e instanceof Kr&&e.head==this.head}toJSON(){return{type:"gapcursor",pos:this.head}}static fromJSON(e,n){if(typeof n.pos!="number")throw new RangeError("Invalid input for GapCursor.fromJSON");return new Kr(e.resolve(n.pos))}getBookmark(){return new $D(this.anchor)}static valid(e){let n=e.parent;if(n.isTextblock||!bUe(e)||!xUe(e))return!1;let r=n.type.spec.allowGapCursor;if(r!=null)return r;let s=n.contentMatchAt(e.index()).defaultType;return s&&s.isTextblock}static findGapCursorFrom(e,n,r=!1){e:for(;;){if(!r&&Kr.valid(e))return e;let s=e.pos,o=null;for(let i=e.depth;;i--){let a=e.node(i);if(n>0?e.indexAfter(i)<a.childCount:e.index(i)>0){o=a.child(n>0?e.indexAfter(i):e.index(i)-1);break}else if(i==0)return null;s+=n;let l=e.doc.resolve(s);if(Kr.valid(l))return l}for(;;){let i=n>0?o.firstChild:o.lastChild;if(!i){if(o.isAtom&&!o.isText&&!Jt.isSelectable(o)){e=e.doc.resolve(s+o.nodeSize*n),r=!1;continue e}break}o=i,s+=n;let a=e.doc.resolve(s);if(Kr.valid(a))return a}return null}}}Kr.prototype.visible=!1;Kr.findFrom=Kr.findGapCursorFrom;hn.jsonID("gapcursor",Kr);class $D{constructor(e){this.pos=e}map(e){return new $D(e.map(this.pos))}resolve(e){let n=e.resolve(this.pos);return Kr.valid(n)?new Kr(n):hn.near(n)}}function Dse(t){return t.isAtom||t.spec.isolating||t.spec.createGapCursor}function bUe(t){for(let e=t.depth;e>=0;e--){let n=t.index(e),r=t.node(e);if(n==0){if(r.type.spec.isolating)return!0;continue}for(let s=r.child(n-1);;s=s.lastChild){if(s.childCount==0&&!s.inlineContent||Dse(s.type))return!0;if(s.inlineContent)return!1}}return!0}function xUe(t){for(let e=t.depth;e>=0;e--){let n=t.indexAfter(e),r=t.node(e);if(n==r.childCount){if(r.type.spec.isolating)return!0;continue}for(let s=r.child(n);;s=s.firstChild){if(s.childCount==0&&!s.inlineContent||Dse(s.type))return!0;if(s.inlineContent)return!1}}return!0}function wUe(){return new Sr({props:{decorations:EUe,createSelectionBetween(t,e,n){return e.pos==n.pos&&Kr.valid(n)?new Kr(n):null},handleClick:CUe,handleKeyDown:SUe,handleDOMEvents:{beforeinput:kUe}}})}const SUe=lD({ArrowLeft:vb("horiz",-1),ArrowRight:vb("horiz",1),ArrowUp:vb("vert",-1),ArrowDown:vb("vert",1)});function vb(t,e){const n=t=="vert"?e>0?"down":"up":e>0?"right":"left";return function(r,s,o){let i=r.selection,a=e>0?i.$to:i.$from,l=i.empty;if(i instanceof ln){if(!o.endOfTextblock(n)||a.depth==0)return!1;l=!1,a=r.doc.resolve(e>0?a.after():a.before())}let c=Kr.findGapCursorFrom(a,e,l);return c?(s&&s(r.tr.setSelection(new Kr(c))),!0):!1}}function CUe(t,e,n){if(!t||!t.editable)return!1;let r=t.state.doc.resolve(e);if(!Kr.valid(r))return!1;let s=t.posAtCoords({left:n.clientX,top:n.clientY});return s&&s.inside>-1&&Jt.isSelectable(t.state.doc.nodeAt(s.inside))?!1:(t.dispatch(t.state.tr.setSelection(new Kr(r))),!0)}function kUe(t,e){if(e.inputType!="insertCompositionText"||!(t.state.selection instanceof Kr))return!1;let{$from:n}=t.state.selection,r=n.parent.contentMatchAt(n.index()).findWrapping(t.state.schema.nodes.text);if(!r)return!1;let s=ct.empty;for(let i=r.length-1;i>=0;i--)s=ct.from(r[i].createAndFill(null,s));let o=t.state.tr.replace(n.pos,n.pos,new _t(s,0,0));return o.setSelection(ln.near(o.doc.resolve(n.pos+1))),t.dispatch(o),!1}function EUe(t){if(!(t.selection instanceof Kr))return null;let e=document.createElement("div");return e.className="ProseMirror-gapcursor",kr.create(t.doc,[Ls.widget(t.selection.head,e,{key:"gapcursor"})])}var Sw=200,Fs=function(){};Fs.prototype.append=function(e){return e.length?(e=Fs.from(e),!this.length&&e||e.length<Sw&&this.leafAppend(e)||this.length<Sw&&e.leafPrepend(this)||this.appendInner(e)):this};Fs.prototype.prepend=function(e){return e.length?Fs.from(e).append(this):this};Fs.prototype.appendInner=function(e){return new TUe(this,e)};Fs.prototype.slice=function(e,n){return e===void 0&&(e=0),n===void 0&&(n=this.length),e>=n?Fs.empty:this.sliceInner(Math.max(0,e),Math.min(this.length,n))};Fs.prototype.get=function(e){if(!(e<0||e>=this.length))return this.getInner(e)};Fs.prototype.forEach=function(e,n,r){n===void 0&&(n=0),r===void 0&&(r=this.length),n<=r?this.forEachInner(e,n,r,0):this.forEachInvertedInner(e,n,r,0)};Fs.prototype.map=function(e,n,r){n===void 0&&(n=0),r===void 0&&(r=this.length);var s=[];return this.forEach(function(o,i){return s.push(e(o,i))},n,r),s};Fs.from=function(e){return e instanceof Fs?e:e&&e.length?new Ise(e):Fs.empty};var Ise=(function(t){function e(r){t.call(this),this.values=r}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var n={length:{configurable:!0},depth:{configurable:!0}};return e.prototype.flatten=function(){return this.values},e.prototype.sliceInner=function(s,o){return s==0&&o==this.length?this:new e(this.values.slice(s,o))},e.prototype.getInner=function(s){return this.values[s]},e.prototype.forEachInner=function(s,o,i,a){for(var l=o;l<i;l++)if(s(this.values[l],a+l)===!1)return!1},e.prototype.forEachInvertedInner=function(s,o,i,a){for(var l=o-1;l>=i;l--)if(s(this.values[l],a+l)===!1)return!1},e.prototype.leafAppend=function(s){if(this.length+s.length<=Sw)return new e(this.values.concat(s.flatten()))},e.prototype.leafPrepend=function(s){if(this.length+s.length<=Sw)return new e(s.flatten().concat(this.values))},n.length.get=function(){return this.values.length},n.depth.get=function(){return 0},Object.defineProperties(e.prototype,n),e})(Fs);Fs.empty=new Ise([]);var TUe=(function(t){function e(n,r){t.call(this),this.left=n,this.right=r,this.length=n.length+r.length,this.depth=Math.max(n.depth,r.depth)+1}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.flatten=function(){return this.left.flatten().concat(this.right.flatten())},e.prototype.getInner=function(r){return r<this.left.length?this.left.get(r):this.right.get(r-this.left.length)},e.prototype.forEachInner=function(r,s,o,i){var a=this.left.length;if(s<a&&this.left.forEachInner(r,s,Math.min(o,a),i)===!1||o>a&&this.right.forEachInner(r,Math.max(s-a,0),Math.min(this.length,o)-a,i+a)===!1)return!1},e.prototype.forEachInvertedInner=function(r,s,o,i){var a=this.left.length;if(s>a&&this.right.forEachInvertedInner(r,s-a,Math.max(o,a)-a,i+a)===!1||o<a&&this.left.forEachInvertedInner(r,Math.min(s,a),o,i)===!1)return!1},e.prototype.sliceInner=function(r,s){if(r==0&&s==this.length)return this;var o=this.left.length;return s<=o?this.left.slice(r,s):r>=o?this.right.slice(r-o,s-o):this.left.slice(r,o).append(this.right.slice(0,s-o))},e.prototype.leafAppend=function(r){var s=this.right.leafAppend(r);if(s)return new e(this.left,s)},e.prototype.leafPrepend=function(r){var s=this.left.leafPrepend(r);if(s)return new e(s,this.right)},e.prototype.appendInner=function(r){return this.left.depth>=Math.max(this.right.depth,r.depth)+1?new e(this.left,new e(this.right,r)):new e(this,r)},e})(Fs);const MUe=500;class ba{constructor(e,n){this.items=e,this.eventCount=n}popEvent(e,n){if(this.eventCount==0)return null;let r=this.items.length;for(;;r--)if(this.items.get(r-1).selection){--r;break}let s,o;n&&(s=this.remapping(r,this.items.length),o=s.maps.length);let i=e.tr,a,l,c=[],u=[];return this.items.forEach((f,h)=>{if(!f.step){s||(s=this.remapping(r,h+1),o=s.maps.length),o--,u.push(f);return}if(s){u.push(new sl(f.map));let m=f.step.map(s.slice(o)),y;m&&i.maybeStep(m).doc&&(y=i.mapping.maps[i.mapping.maps.length-1],c.push(new sl(y,void 0,void 0,c.length+u.length))),o--,y&&s.appendMap(y,o)}else i.maybeStep(f.step);if(f.selection)return a=s?f.selection.map(s.slice(o)):f.selection,l=new ba(this.items.slice(0,r).append(u.reverse().concat(c)),this.eventCount-1),!1},this.items.length,0),{remaining:l,transform:i,selection:a}}addTransform(e,n,r,s){let o=[],i=this.eventCount,a=this.items,l=!s&&a.length?a.get(a.length-1):null;for(let u=0;u<e.steps.length;u++){let f=e.steps[u].invert(e.docs[u]),h=new sl(e.mapping.maps[u],f,n),m;(m=l&&l.merge(h))&&(h=m,u?o.pop():a=a.slice(0,a.length-1)),o.push(h),n&&(i++,n=void 0),s||(l=h)}let c=i-r.depth;return c>AUe&&(a=jUe(a,c),i-=c),new ba(a.append(o),i)}remapping(e,n){let r=new Hg;return this.items.forEach((s,o)=>{let i=s.mirrorOffset!=null&&o-s.mirrorOffset>=e?r.maps.length-s.mirrorOffset:void 0;r.appendMap(s.map,i)},e,n),r}addMaps(e){return this.eventCount==0?this:new ba(this.items.append(e.map(n=>new sl(n))),this.eventCount)}rebased(e,n){if(!this.eventCount)return this;let r=[],s=Math.max(0,this.items.length-n),o=e.mapping,i=e.steps.length,a=this.eventCount;this.items.forEach(h=>{h.selection&&a--},s);let l=n;this.items.forEach(h=>{let m=o.getMirror(--l);if(m==null)return;i=Math.min(i,m);let y=o.maps[m];if(h.step){let v=e.steps[m].invert(e.docs[m]),b=h.selection&&h.selection.map(o.slice(l+1,m));b&&a++,r.push(new sl(y,v,b))}else r.push(new sl(y))},s);let c=[];for(let h=n;h<i;h++)c.push(new sl(o.maps[h]));let u=this.items.slice(0,s).append(c).append(r),f=new ba(u,a);return f.emptyItemCount()>MUe&&(f=f.compress(this.items.length-r.length)),f}emptyItemCount(){let e=0;return this.items.forEach(n=>{n.step||e++}),e}compress(e=this.items.length){let n=this.remapping(0,e),r=n.maps.length,s=[],o=0;return this.items.forEach((i,a)=>{if(a>=e)s.push(i),i.selection&&o++;else if(i.step){let l=i.step.map(n.slice(r)),c=l&&l.getMap();if(r--,c&&n.appendMap(c,r),l){let u=i.selection&&i.selection.map(n.slice(r));u&&o++;let f=new sl(c.invert(),l,u),h,m=s.length-1;(h=s.length&&s[m].merge(f))?s[m]=h:s.push(f)}}else i.map&&r--},this.items.length,0),new ba(Fs.from(s.reverse()),o)}}ba.empty=new ba(Fs.empty,0);function jUe(t,e){let n;return t.forEach((r,s)=>{if(r.selection&&e--==0)return n=s,!1}),t.slice(n)}class sl{constructor(e,n,r,s){this.map=e,this.step=n,this.selection=r,this.mirrorOffset=s}merge(e){if(this.step&&e.step&&!e.selection){let n=e.step.merge(this.step);if(n)return new sl(n.getMap().invert(),n,this.selection)}}}class Ou{constructor(e,n,r,s,o){this.done=e,this.undone=n,this.prevRanges=r,this.prevTime=s,this.prevComposition=o}}const AUe=20;function _Ue(t,e,n,r){let s=n.getMeta(_f),o;if(s)return s.historyState;n.getMeta(IUe)&&(t=new Ou(t.done,t.undone,null,0,-1));let i=n.getMeta("appendedTransaction");if(n.steps.length==0)return t;if(i&&i.getMeta(_f))return i.getMeta(_f).redo?new Ou(t.done.addTransform(n,void 0,r,_x(e)),t.undone,wU(n.mapping.maps),t.prevTime,t.prevComposition):new Ou(t.done,t.undone.addTransform(n,void 0,r,_x(e)),null,t.prevTime,t.prevComposition);if(n.getMeta("addToHistory")!==!1&&!(i&&i.getMeta("addToHistory")===!1)){let a=n.getMeta("composition"),l=t.prevTime==0||!i&&t.prevComposition!=a&&(t.prevTime<(n.time||0)-r.newGroupDelay||!RUe(n,t.prevRanges)),c=i?T9(t.prevRanges,n.mapping):wU(n.mapping.maps);return new Ou(t.done.addTransform(n,l?e.selection.getBookmark():void 0,r,_x(e)),ba.empty,c,n.time,a??t.prevComposition)}else return(o=n.getMeta("rebased"))?new Ou(t.done.rebased(n,o),t.undone.rebased(n,o),T9(t.prevRanges,n.mapping),t.prevTime,t.prevComposition):new Ou(t.done.addMaps(n.mapping.maps),t.undone.addMaps(n.mapping.maps),T9(t.prevRanges,n.mapping),t.prevTime,t.prevComposition)}function RUe(t,e){if(!e)return!1;if(!t.docChanged)return!0;let n=!1;return t.mapping.maps[0].forEach((r,s)=>{for(let o=0;o<e.length;o+=2)r<=e[o+1]&&s>=e[o]&&(n=!0)}),n}function wU(t){let e=[];for(let n=t.length-1;n>=0&&e.length==0;n--)t[n].forEach((r,s,o,i)=>e.push(o,i));return e}function T9(t,e){if(!t)return null;let n=[];for(let r=0;r<t.length;r+=2){let s=e.map(t[r],1),o=e.map(t[r+1],-1);s<=o&&n.push(s,o)}return n}function DUe(t,e,n){let r=_x(e),s=_f.get(e).spec.config,o=(n?t.undone:t.done).popEvent(e,r);if(!o)return null;let i=o.selection.resolve(o.transform.doc),a=(n?t.done:t.undone).addTransform(o.transform,e.selection.getBookmark(),s,r),l=new Ou(n?a:o.remaining,n?o.remaining:a,null,0,-1);return o.transform.setSelection(i).setMeta(_f,{redo:n,historyState:l})}let M9=!1,SU=null;function _x(t){let e=t.plugins;if(SU!=e){M9=!1,SU=e;for(let n=0;n<e.length;n++)if(e[n].spec.historyPreserveItems){M9=!0;break}}return M9}const _f=new Pr("history"),IUe=new Pr("closeHistory");function OUe(t={}){return t={depth:t.depth||100,newGroupDelay:t.newGroupDelay||500},new Sr({key:_f,state:{init(){return new Ou(ba.empty,ba.empty,null,0,-1)},apply(e,n,r){return _Ue(n,r,e,t)}},config:t,props:{handleDOMEvents:{beforeinput(e,n){let r=n.inputType,s=r=="historyUndo"?Nse:r=="historyRedo"?Lse:null;return!s||!e.editable?!1:(n.preventDefault(),s(e.state,e.dispatch))}}}})}function Ose(t,e){return(n,r)=>{let s=_f.getState(n);if(!s||(t?s.undone:s.done).eventCount==0)return!1;if(r){let o=DUe(s,n,t);o&&r(e?o.scrollIntoView():o)}return!0}}const Nse=Ose(!1,!0),Lse=Ose(!0,!0);Yn.create({name:"characterCount",addOptions(){return{limit:null,mode:"textSize",textCounter:t=>t.length,wordCounter:t=>t.split(" ").filter(e=>e!=="").length}},addStorage(){return{characters:()=>0,words:()=>0}},onBeforeCreate(){this.storage.characters=t=>{const e=(t==null?void 0:t.node)||this.editor.state.doc;if(((t==null?void 0:t.mode)||this.options.mode)==="textSize"){const r=e.textBetween(0,e.content.size,void 0," ");return this.options.textCounter(r)}return e.nodeSize},this.storage.words=t=>{const e=(t==null?void 0:t.node)||this.editor.state.doc,n=e.textBetween(0,e.content.size," "," ");return this.options.wordCounter(n)}},addProseMirrorPlugins(){let t=!1;return[new Sr({key:new Pr("characterCount"),appendTransaction:(e,n,r)=>{if(t)return;const s=this.options.limit;if(s==null||s===0){t=!0;return}const o=this.storage.characters({node:r.doc});if(o>s){const i=o-s,a=0,l=i;console.warn(`[CharacterCount] Initial content exceeded limit of ${s} characters. Content was automatically trimmed.`);const c=r.tr.deleteRange(a,l);return t=!0,c}t=!0},filterTransaction:(e,n)=>{const r=this.options.limit;if(!e.docChanged||r===0||r===null||r===void 0)return!0;const s=this.storage.characters({node:n.doc}),o=this.storage.characters({node:e.doc});if(o<=r||s>r&&o>r&&o<=s)return!0;if(s>r&&o>r&&o>s||!e.getMeta("paste"))return!1;const a=e.selection.$head.pos,l=o-r,c=a-l,u=a;return e.deleteRange(c,u),!(this.storage.characters({node:e.doc})>r)}})]}});var NUe=Yn.create({name:"dropCursor",addOptions(){return{color:"currentColor",width:1,class:void 0}},addProseMirrorPlugins(){return[yUe(this.options)]}});Yn.create({name:"focus",addOptions(){return{className:"has-focus",mode:"all"}},addProseMirrorPlugins(){return[new Sr({key:new Pr("focus"),props:{decorations:({doc:t,selection:e})=>{const{isEditable:n,isFocused:r}=this.editor,{anchor:s}=e,o=[];if(!n||!r)return kr.create(t,[]);let i=0;this.options.mode==="deepest"&&t.descendants((l,c)=>{if(l.isText)return;if(!(s>=c&&s<=c+l.nodeSize-1))return!1;i+=1});let a=0;return t.descendants((l,c)=>{if(l.isText||!(s>=c&&s<=c+l.nodeSize-1))return!1;if(a+=1,this.options.mode==="deepest"&&i-a>0||this.options.mode==="shallowest"&&a>1)return this.options.mode==="deepest";o.push(Ls.node(c,c+l.nodeSize,{class:this.options.className}))}),kr.create(t,o)}}})]}});var LUe=Yn.create({name:"gapCursor",addProseMirrorPlugins(){return[wUe()]},extendNodeSchema(t){var e;const n={name:t.name,options:t.options,storage:t.storage};return{allowGapCursor:(e=er(tn(t,"allowGapCursor",n)))!=null?e:null}}}),CU="placeholder";function $Ue(t){return t.replace(/\s+/g,"-").replace(/[^a-zA-Z0-9-]/g,"").replace(/^[0-9-]+/,"").replace(/^-+/,"").toLowerCase()}var FUe=Yn.create({name:"placeholder",addOptions(){return{emptyEditorClass:"is-editor-empty",emptyNodeClass:"is-empty",dataAttribute:CU,placeholder:"Write something …",showOnlyWhenEditable:!0,showOnlyCurrent:!0,includeChildren:!1}},addProseMirrorPlugins(){const t=this.options.dataAttribute?`data-${$Ue(this.options.dataAttribute)}`:`data-${CU}`;return[new Sr({key:new Pr("placeholder"),props:{decorations:({doc:e,selection:n})=>{const r=this.editor.isEditable||!this.options.showOnlyWhenEditable,{anchor:s}=n,o=[];if(!r)return null;const i=this.editor.isEmpty;return e.descendants((a,l)=>{const c=s>=l&&s<=l+a.nodeSize,u=!a.isLeaf&&YS(a);if((c||!this.options.showOnlyCurrent)&&u){const f=[this.options.emptyNodeClass];i&&f.push(this.options.emptyEditorClass);const h=Ls.node(l,l+a.nodeSize,{class:f.join(" "),[t]:typeof this.options.placeholder=="function"?this.options.placeholder({editor:this.editor,node:a,pos:l,hasAnchor:c}):this.options.placeholder});o.push(h)}return this.options.includeChildren}),kr.create(e,o)}}})]}});Yn.create({name:"selection",addOptions(){return{className:"selection"}},addProseMirrorPlugins(){const{editor:t,options:e}=this;return[new Sr({key:new Pr("selection"),props:{decorations(n){return n.selection.empty||t.isFocused||!t.isEditable||Bre(n.selection)||t.view.dragging?null:kr.create(n.doc,[Ls.inline(n.selection.from,n.selection.to,{class:e.className})])}}})]}});function kU({types:t,node:e}){return e&&Array.isArray(t)&&t.includes(e.type)||(e==null?void 0:e.type)===t}var zUe=Yn.create({name:"trailingNode",addOptions(){return{node:void 0,notAfter:[]}},addProseMirrorPlugins(){var t;const e=new Pr(this.name),n=this.options.node||((t=this.editor.schema.topNodeType.contentMatch.defaultType)==null?void 0:t.name)||"paragraph",r=Object.entries(this.editor.schema.nodes).map(([,s])=>s).filter(s=>(this.options.notAfter||[]).concat(n).includes(s.name));return[new Sr({key:e,appendTransaction:(s,o,i)=>{const{doc:a,tr:l,schema:c}=i,u=e.getState(i),f=a.content.size,h=c.nodes[n];if(u)return l.insert(f,h.create())},state:{init:(s,o)=>{const i=o.tr.doc.lastChild;return!kU({node:i,types:r})},apply:(s,o)=>{if(!s.docChanged||s.getMeta("__uniqueIDTransaction"))return o;const i=s.doc.lastChild;return!kU({node:i,types:r})}}})]}}),PUe=Yn.create({name:"undoRedo",addOptions(){return{depth:100,newGroupDelay:500}},addCommands(){return{undo:()=>({state:t,dispatch:e})=>Nse(t,e),redo:()=>({state:t,dispatch:e})=>Lse(t,e)}},addProseMirrorPlugins(){return[OUe(this.options)]},addKeyboardShortcuts(){return{"Mod-z":()=>this.editor.commands.undo(),"Shift-Mod-z":()=>this.editor.commands.redo(),"Mod-y":()=>this.editor.commands.redo(),"Mod-я":()=>this.editor.commands.undo(),"Shift-Mod-я":()=>this.editor.commands.redo()}}}),BUe=FUe,HUe=Wa.create({name:"subscript",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"sub"},{style:"vertical-align",getAttrs(t){return t!=="sub"?!1:null}}]},renderHTML({HTMLAttributes:t}){return["sub",rr(this.options.HTMLAttributes,t),0]},addCommands(){return{setSubscript:()=>({commands:t})=>t.setMark(this.name),toggleSubscript:()=>({commands:t})=>t.toggleMark(this.name),unsetSubscript:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-,":()=>this.editor.commands.toggleSubscript()}}}),$se=HUe,UUe=Wa.create({name:"superscript",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"sup"},{style:"vertical-align",getAttrs(t){return t!=="super"?!1:null}}]},renderHTML({HTMLAttributes:t}){return["sup",rr(this.options.HTMLAttributes,t),0]},addCommands(){return{setSuperscript:()=>({commands:t})=>t.setMark(this.name),toggleSuperscript:()=>({commands:t})=>t.toggleMark(this.name),unsetSuperscript:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-.":()=>this.editor.commands.toggleSuperscript()}}}),Fse=UUe,VUe=Yn.create({name:"textAlign",addOptions(){return{types:[],alignments:["left","center","right","justify"],defaultAlignment:null}},addGlobalAttributes(){return[{types:this.options.types,attributes:{textAlign:{default:this.options.defaultAlignment,parseHTML:t=>{const e=t.style.textAlign;return this.options.alignments.includes(e)?e:this.options.defaultAlignment},renderHTML:t=>t.textAlign?{style:`text-align: ${t.textAlign}`}:{}}}}]},addCommands(){return{setTextAlign:t=>({commands:e})=>this.options.alignments.includes(t)?this.options.types.map(n=>e.updateAttributes(n,{textAlign:t})).some(n=>n):!1,unsetTextAlign:()=>({commands:t})=>this.options.types.map(e=>t.resetAttributes(e,"textAlign")).some(e=>e),toggleTextAlign:t=>({editor:e,commands:n})=>this.options.alignments.includes(t)?e.isActive({textAlign:t})?n.unsetTextAlign():n.setTextAlign(t):!1}},addKeyboardShortcuts(){return{"Mod-Shift-l":()=>this.editor.commands.setTextAlign("left"),"Mod-Shift-e":()=>this.editor.commands.setTextAlign("center"),"Mod-Shift-r":()=>this.editor.commands.setTextAlign("right"),"Mod-Shift-j":()=>this.editor.commands.setTextAlign("justify")}}}),hM=VUe,zse=Wa.create({name:"underline",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"u"},{style:"text-decoration",consuming:!1,getAttrs:t=>t.includes("underline")?{}:!1}]},renderHTML({HTMLAttributes:t}){return["u",rr(this.options.HTMLAttributes,t),0]},parseMarkdown(t,e){return e.applyMark(this.name||"underline",e.parseInline(t.tokens||[]))},renderMarkdown(t,e){return`++${e.renderChildren(t)}++`},markdownTokenizer:{name:"underline",level:"inline",start(t){return t.indexOf("++")},tokenize(t,e,n){const s=/^(\+\+)([\s\S]+?)(\+\+)/.exec(t);if(!s)return;const o=s[2].trim();return{type:"underline",raw:s[0],text:o,tokens:n.inlineTokens(o)}}},addCommands(){return{setUnderline:()=>({commands:t})=>t.setMark(this.name),toggleUnderline:()=>({commands:t})=>t.toggleMark(this.name),unsetUnderline:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-u":()=>this.editor.commands.toggleUnderline(),"Mod-U":()=>this.editor.commands.toggleUnderline()}}}),Pse=zse,Cw=(t,e)=>{if(t==="slot")return 0;if(t instanceof Function)return t(e);const{children:n,...r}=e??{};if(t==="svg")throw new Error("SVG elements are not supported in the JSX syntax, use the array syntax instead");return[t,r,n]},qUe=/^\s*>\s$/,WUe=Es.create({name:"blockquote",addOptions(){return{HTMLAttributes:{}}},content:"block+",group:"block",defining:!0,parseHTML(){return[{tag:"blockquote"}]},renderHTML({HTMLAttributes:t}){return Cw("blockquote",{...rr(this.options.HTMLAttributes,t),children:Cw("slot",{})})},parseMarkdown:(t,e)=>e.createNode("blockquote",void 0,e.parseChildren(t.tokens||[])),renderMarkdown:(t,e)=>{if(!t.content)return"";const n=">",r=[];return t.content.forEach(s=>{const a=e.renderChildren([s]).split(`
`).map(l=>l.trim()===""?n:`${n} ${l}`);r.push(a.join(`
`))}),r.join(`
${n}
`)},addCommands(){return{setBlockquote:()=>({commands:t})=>t.wrapIn(this.name),toggleBlockquote:()=>({commands:t})=>t.toggleWrap(this.name),unsetBlockquote:()=>({commands:t})=>t.lift(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-b":()=>this.editor.commands.toggleBlockquote()}},addInputRules(){return[vm({find:qUe,type:this.type})]}}),YUe=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))$/,GUe=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))/g,KUe=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))$/,XUe=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))/g,ZUe=Wa.create({name:"bold",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"strong"},{tag:"b",getAttrs:t=>t.style.fontWeight!=="normal"&&null},{style:"font-weight=400",clearMark:t=>t.type.name===this.name},{style:"font-weight",getAttrs:t=>/^(bold(er)?|[5-9]\d{2,})$/.test(t)&&null}]},renderHTML({HTMLAttributes:t}){return Cw("strong",{...rr(this.options.HTMLAttributes,t),children:Cw("slot",{})})},markdownTokenName:"strong",parseMarkdown:(t,e)=>e.applyMark("bold",e.parseInline(t.tokens||[])),renderMarkdown:(t,e)=>`**${e.renderChildren(t)}**`,addCommands(){return{setBold:()=>({commands:t})=>t.setMark(this.name),toggleBold:()=>({commands:t})=>t.toggleMark(this.name),unsetBold:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-b":()=>this.editor.commands.toggleBold(),"Mod-B":()=>this.editor.commands.toggleBold()}},addInputRules(){return[Yf({find:YUe,type:this.type}),Yf({find:KUe,type:this.type})]},addPasteRules(){return[hd({find:GUe,type:this.type}),hd({find:XUe,type:this.type})]}}),QUe=/(^|[^`])`([^`]+)`(?!`)$/,JUe=/(^|[^`])`([^`]+)`(?!`)/g,eVe=Wa.create({name:"code",addOptions(){return{HTMLAttributes:{}}},excludes:"_",code:!0,exitable:!0,parseHTML(){return[{tag:"code"}]},renderHTML({HTMLAttributes:t}){return["code",rr(this.options.HTMLAttributes,t),0]},markdownTokenName:"codespan",parseMarkdown:(t,e)=>e.applyMark("code",[{type:"text",text:t.text||""}]),renderMarkdown:(t,e)=>t.content?`\`${e.renderChildren(t.content)}\``:"",addCommands(){return{setCode:()=>({commands:t})=>t.setMark(this.name),toggleCode:()=>({commands:t})=>t.toggleMark(this.name),unsetCode:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-e":()=>this.editor.commands.toggleCode()}},addInputRules(){return[Yf({find:QUe,type:this.type})]},addPasteRules(){return[hd({find:JUe,type:this.type})]}}),j9=4,tVe=/^```([a-z]+)?[\s\n]$/,nVe=/^~~~([a-z]+)?[\s\n]$/,rVe=Es.create({name:"codeBlock",addOptions(){return{languageClassPrefix:"language-",exitOnTripleEnter:!0,exitOnArrowDown:!0,defaultLanguage:null,enableTabIndentation:!1,tabSize:j9,HTMLAttributes:{}}},content:"text*",marks:"",group:"block",code:!0,defining:!0,addAttributes(){return{language:{default:this.options.defaultLanguage,parseHTML:t=>{var e;const{languageClassPrefix:n}=this.options;if(!n)return null;const o=[...((e=t.firstElementChild)==null?void 0:e.classList)||[]].filter(i=>i.startsWith(n)).map(i=>i.replace(n,""))[0];return o||null},rendered:!1}}},parseHTML(){return[{tag:"pre",preserveWhitespace:"full"}]},renderHTML({node:t,HTMLAttributes:e}){return["pre",rr(this.options.HTMLAttributes,e),["code",{class:t.attrs.language?this.options.languageClassPrefix+t.attrs.language:null},0]]},markdownTokenName:"code",parseMarkdown:(t,e)=>{var n;return((n=t.raw)==null?void 0:n.startsWith("```"))===!1&&t.codeBlockStyle!=="indented"?[]:e.createNode("codeBlock",{language:t.lang||null},t.text?[e.createTextNode(t.text)]:[])},renderMarkdown:(t,e)=>{var n;let r="";const s=((n=t.attrs)==null?void 0:n.language)||"";return t.content?r=[`\`\`\`${s}`,e.renderChildren(t.content),"```"].join(`
`):r=`\`\`\`${s}

\`\`\``,r},addCommands(){return{setCodeBlock:t=>({commands:e})=>e.setNode(this.name,t),toggleCodeBlock:t=>({commands:e})=>e.toggleNode(this.name,"paragraph",t)}},addKeyboardShortcuts(){return{"Mod-Alt-c":()=>this.editor.commands.toggleCodeBlock(),Backspace:()=>{const{empty:t,$anchor:e}=this.editor.state.selection,n=e.pos===1;return!t||e.parent.type.name!==this.name?!1:n||!e.parent.textContent.length?this.editor.commands.clearNodes():!1},Tab:({editor:t})=>{var e;if(!this.options.enableTabIndentation)return!1;const n=(e=this.options.tabSize)!=null?e:j9,{state:r}=t,{selection:s}=r,{$from:o,empty:i}=s;if(o.parent.type!==this.type)return!1;const a=" ".repeat(n);return i?t.commands.insertContent(a):t.commands.command(({tr:l})=>{const{from:c,to:u}=s,m=r.doc.textBetween(c,u,`
`,`
`).split(`
`).map(y=>a+y).join(`
`);return l.replaceWith(c,u,r.schema.text(m)),!0})},"Shift-Tab":({editor:t})=>{var e;if(!this.options.enableTabIndentation)return!1;const n=(e=this.options.tabSize)!=null?e:j9,{state:r}=t,{selection:s}=r,{$from:o,empty:i}=s;return o.parent.type!==this.type?!1:i?t.commands.command(({tr:a})=>{var l;const{pos:c}=o,u=o.start(),f=o.end(),m=r.doc.textBetween(u,f,`
`,`
`).split(`
`);let y=0,v=0;const b=c-u;for(let A=0;A<m.length;A+=1){if(v+m[A].length>=b){y=A;break}v+=m[A].length+1}const C=((l=m[y].match(/^ */))==null?void 0:l[0])||"",k=Math.min(C.length,n);if(k===0)return!0;let E=u;for(let A=0;A<y;A+=1)E+=m[A].length+1;return a.delete(E,E+k),c-E<=k&&a.setSelection(ln.create(a.doc,E)),!0}):t.commands.command(({tr:a})=>{const{from:l,to:c}=s,h=r.doc.textBetween(l,c,`
`,`
`).split(`
`).map(m=>{var y;const v=((y=m.match(/^ */))==null?void 0:y[0])||"",b=Math.min(v.length,n);return m.slice(b)}).join(`
`);return a.replaceWith(l,c,r.schema.text(h)),!0})},Enter:({editor:t})=>{if(!this.options.exitOnTripleEnter)return!1;const{state:e}=t,{selection:n}=e,{$from:r,empty:s}=n;if(!s||r.parent.type!==this.type)return!1;const o=r.parentOffset===r.parent.nodeSize-2,i=r.parent.textContent.endsWith(`

`);return!o||!i?!1:t.chain().command(({tr:a})=>(a.delete(r.pos-2,r.pos),!0)).exitCode().run()},ArrowDown:({editor:t})=>{if(!this.options.exitOnArrowDown)return!1;const{state:e}=t,{selection:n,doc:r}=e,{$from:s,empty:o}=n;if(!o||s.parent.type!==this.type||!(s.parentOffset===s.parent.nodeSize-2))return!1;const a=s.after();return a===void 0?!1:r.nodeAt(a)?t.commands.command(({tr:c})=>(c.setSelection(hn.near(r.resolve(a))),!0)):t.commands.exitCode()}}},addInputRules(){return[eM({find:tVe,type:this.type,getAttributes:t=>({language:t[1]})}),eM({find:nVe,type:this.type,getAttributes:t=>({language:t[1]})})]},addProseMirrorPlugins(){return[new Sr({key:new Pr("codeBlockVSCodeHandler"),props:{handlePaste:(t,e)=>{if(!e.clipboardData||this.editor.isActive(this.type.name))return!1;const n=e.clipboardData.getData("text/plain"),r=e.clipboardData.getData("vscode-editor-data"),s=r?JSON.parse(r):void 0,o=s==null?void 0:s.mode;if(!n||!o)return!1;const{tr:i,schema:a}=t.state,l=a.text(n.replace(/\r\n?/g,`
`));return i.replaceSelectionWith(this.type.create({language:o},l)),i.selection.$from.parent.type!==this.type&&i.setSelection(ln.near(i.doc.resolve(Math.max(0,i.selection.from-2)))),i.setMeta("paste",!0),t.dispatch(i),!0}}})]}}),sVe=Es.create({name:"doc",topNode:!0,content:"block+",renderMarkdown:(t,e)=>t.content?e.renderChildren(t.content,`

`):""}),oVe=Es.create({name:"hardBreak",markdownTokenName:"br",addOptions(){return{keepMarks:!0,HTMLAttributes:{}}},inline:!0,group:"inline",selectable:!1,linebreakReplacement:!0,parseHTML(){return[{tag:"br"}]},renderHTML({HTMLAttributes:t}){return["br",rr(this.options.HTMLAttributes,t)]},renderText(){return`
`},renderMarkdown:()=>`  
`,parseMarkdown:()=>({type:"hardBreak"}),addCommands(){return{setHardBreak:()=>({commands:t,chain:e,state:n,editor:r})=>t.first([()=>t.exitCode(),()=>t.command(()=>{const{selection:s,storedMarks:o}=n;if(s.$from.parent.type.spec.isolating)return!1;const{keepMarks:i}=this.options,{splittableMarks:a}=r.extensionManager,l=o||s.$to.parentOffset&&s.$from.marks();return e().insertContent({type:this.name}).command(({tr:c,dispatch:u})=>{if(u&&l&&i){const f=l.filter(h=>a.includes(h.type.name));c.ensureMarks(f)}return!0}).run()})])}},addKeyboardShortcuts(){return{"Mod-Enter":()=>this.editor.commands.setHardBreak(),"Shift-Enter":()=>this.editor.commands.setHardBreak()}}}),iVe=Es.create({name:"heading",addOptions(){return{levels:[1,2,3,4,5,6],HTMLAttributes:{}}},content:"inline*",group:"block",defining:!0,addAttributes(){return{level:{default:1,rendered:!1}}},parseHTML(){return this.options.levels.map(t=>({tag:`h${t}`,attrs:{level:t}}))},renderHTML({node:t,HTMLAttributes:e}){return[`h${this.options.levels.includes(t.attrs.level)?t.attrs.level:this.options.levels[0]}`,rr(this.options.HTMLAttributes,e),0]},parseMarkdown:(t,e)=>e.createNode("heading",{level:t.depth||1},e.parseInline(t.tokens||[])),renderMarkdown:(t,e)=>{var n;const r=(n=t.attrs)!=null&&n.level?parseInt(t.attrs.level,10):1,s="#".repeat(r);return t.content?`${s} ${e.renderChildren(t.content)}`:""},addCommands(){return{setHeading:t=>({commands:e})=>this.options.levels.includes(t.level)?e.setNode(this.name,t):!1,toggleHeading:t=>({commands:e})=>this.options.levels.includes(t.level)?e.toggleNode(this.name,"paragraph",t):!1}},addKeyboardShortcuts(){return this.options.levels.reduce((t,e)=>({...t,[`Mod-Alt-${e}`]:()=>this.editor.commands.toggleHeading({level:e})}),{})},addInputRules(){return this.options.levels.map(t=>eM({find:new RegExp(`^(#{${Math.min(...this.options.levels)},${t}})\\s$`),type:this.type,getAttributes:{level:t}}))}}),aVe=Es.create({name:"horizontalRule",addOptions(){return{HTMLAttributes:{},nextNodeType:"paragraph"}},group:"block",parseHTML(){return[{tag:"hr"}]},renderHTML({HTMLAttributes:t}){return["hr",rr(this.options.HTMLAttributes,t)]},markdownTokenName:"hr",parseMarkdown:(t,e)=>e.createNode("horizontalRule"),renderMarkdown:()=>"---",addCommands(){return{setHorizontalRule:()=>({chain:t,state:e})=>{if(!cPe(e,e.schema.nodes[this.name]))return!1;const{selection:n}=e,{$to:r}=n,s=t();return Bre(n)?s.insertContentAt(r.pos,{type:this.name}):s.insertContent({type:this.name}),s.command(({state:o,tr:i,dispatch:a})=>{if(a){const{$to:l}=i.selection,c=l.end();if(l.nodeAfter)l.nodeAfter.isTextblock?i.setSelection(ln.create(i.doc,l.pos+1)):l.nodeAfter.isBlock?i.setSelection(Jt.create(i.doc,l.pos)):i.setSelection(ln.create(i.doc,l.pos));else{const u=o.schema.nodes[this.options.nextNodeType]||l.parent.type.contentMatch.defaultType,f=u==null?void 0:u.create();f&&(i.insert(c,f),i.setSelection(ln.create(i.doc,c+1)))}i.scrollIntoView()}return!0}).run()}}},addInputRules(){return[ose({find:/^(?:---|—-|___\s|\*\*\*\s)$/,type:this.type})]}}),lVe=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))$/,cVe=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))/g,uVe=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))$/,dVe=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))/g,fVe=Wa.create({name:"italic",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"em"},{tag:"i",getAttrs:t=>t.style.fontStyle!=="normal"&&null},{style:"font-style=normal",clearMark:t=>t.type.name===this.name},{style:"font-style=italic"}]},renderHTML({HTMLAttributes:t}){return["em",rr(this.options.HTMLAttributes,t),0]},addCommands(){return{setItalic:()=>({commands:t})=>t.setMark(this.name),toggleItalic:()=>({commands:t})=>t.toggleMark(this.name),unsetItalic:()=>({commands:t})=>t.unsetMark(this.name)}},markdownTokenName:"em",parseMarkdown:(t,e)=>e.applyMark("italic",e.parseInline(t.tokens||[])),renderMarkdown:(t,e)=>`*${e.renderChildren(t)}*`,addKeyboardShortcuts(){return{"Mod-i":()=>this.editor.commands.toggleItalic(),"Mod-I":()=>this.editor.commands.toggleItalic()}},addInputRules(){return[Yf({find:lVe,type:this.type}),Yf({find:uVe,type:this.type})]},addPasteRules(){return[hd({find:cVe,type:this.type}),hd({find:dVe,type:this.type})]}}),pVe=Object.defineProperty,hVe=(t,e)=>{for(var n in e)pVe(t,n,{get:e[n],enumerable:!0})},mVe="listItem",EU="textStyle",TU=/^\s*([-+*])\s$/,Bse=Es.create({name:"bulletList",addOptions(){return{itemTypeName:"listItem",HTMLAttributes:{},keepMarks:!1,keepAttributes:!1}},group:"block list",content(){return`${this.options.itemTypeName}+`},parseHTML(){return[{tag:"ul"}]},renderHTML({HTMLAttributes:t}){return["ul",rr(this.options.HTMLAttributes,t),0]},markdownTokenName:"list",parseMarkdown:(t,e)=>t.type!=="list"||t.ordered?[]:{type:"bulletList",content:t.items?e.parseChildren(t.items):[]},renderMarkdown:(t,e)=>t.content?e.renderChildren(t.content,`
`):"",markdownOptions:{indentsContent:!0},addCommands(){return{toggleBulletList:()=>({commands:t,chain:e})=>this.options.keepAttributes?e().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(mVe,this.editor.getAttributes(EU)).run():t.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-8":()=>this.editor.commands.toggleBulletList()}},addInputRules(){let t=vm({find:TU,type:this.type});return(this.options.keepMarks||this.options.keepAttributes)&&(t=vm({find:TU,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:()=>this.editor.getAttributes(EU),editor:this.editor})),[t]}}),Hse=Es.create({name:"listItem",addOptions(){return{HTMLAttributes:{},bulletListTypeName:"bulletList",orderedListTypeName:"orderedList"}},content:"paragraph block*",defining:!0,parseHTML(){return[{tag:"li"}]},renderHTML({HTMLAttributes:t}){return["li",rr(this.options.HTMLAttributes,t),0]},markdownTokenName:"list_item",parseMarkdown:(t,e)=>{if(t.type!=="list_item")return[];let n=[];if(t.tokens&&t.tokens.length>0)if(t.tokens.some(s=>s.type==="paragraph"))n=e.parseChildren(t.tokens);else{const s=t.tokens[0];if(s&&s.type==="text"&&s.tokens&&s.tokens.length>0){if(n=[{type:"paragraph",content:e.parseInline(s.tokens)}],t.tokens.length>1){const i=t.tokens.slice(1),a=e.parseChildren(i);n.push(...a)}}else n=e.parseChildren(t.tokens)}return n.length===0&&(n=[{type:"paragraph",content:[]}]),{type:"listItem",content:n}},renderMarkdown:(t,e,n)=>xD(t,e,r=>{var s,o;return r.parentType==="bulletList"?"- ":r.parentType==="orderedList"?`${(((o=(s=r.meta)==null?void 0:s.parentAttrs)==null?void 0:o.start)||1)+r.index}. `:"- "},n),addKeyboardShortcuts(){return{Enter:()=>this.editor.commands.splitListItem(this.name),Tab:()=>this.editor.commands.sinkListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)}}}),gVe={};hVe(gVe,{findListItemPos:()=>iy,getNextListDepth:()=>FD,handleBackspace:()=>mM,handleDelete:()=>gM,hasListBefore:()=>Use,hasListItemAfter:()=>yVe,hasListItemBefore:()=>Vse,listItemHasSubList:()=>qse,nextListIsDeeper:()=>Wse,nextListIsHigher:()=>Yse});var iy=(t,e)=>{const{$from:n}=e.selection,r=Cs(t,e.schema);let s=null,o=n.depth,i=n.pos,a=null;for(;o>0&&a===null;)s=n.node(o),s.type===r?a=o:(o-=1,i-=1);return a===null?null:{$pos:e.doc.resolve(i),depth:a}},FD=(t,e)=>{const n=iy(t,e);if(!n)return!1;const[,r]=vze(e,t,n.$pos.pos+4);return r},Use=(t,e,n)=>{const{$anchor:r}=t.selection,s=Math.max(0,r.pos-2),o=t.doc.resolve(s).node();return!(!o||!n.includes(o.type.name))},Vse=(t,e)=>{var n;const{$anchor:r}=e.selection,s=e.doc.resolve(r.pos-2);return!(s.index()===0||((n=s.nodeBefore)==null?void 0:n.type.name)!==t)},qse=(t,e,n)=>{if(!n)return!1;const r=Cs(t,e.schema);let s=!1;return n.descendants(o=>{o.type===r&&(s=!0)}),s},mM=(t,e,n)=>{if(t.commands.undoInputRule())return!0;if(t.state.selection.from!==t.state.selection.to)return!1;if(!pd(t.state,e)&&Use(t.state,e,n)){const{$anchor:a}=t.state.selection,l=t.state.doc.resolve(a.before()-1),c=[];l.node().descendants((h,m)=>{h.type.name===e&&c.push({node:h,pos:m})});const u=c.at(-1);if(!u)return!1;const f=t.state.doc.resolve(l.start()+u.pos+1);return t.chain().cut({from:a.start()-1,to:a.end()+1},f.end()).joinForward().run()}if(!pd(t.state,e)||!Sze(t.state))return!1;const r=iy(e,t.state);if(!r)return!1;const o=t.state.doc.resolve(r.$pos.pos-2).node(r.depth),i=qse(e,t.state,o);return Vse(e,t.state)&&!i?t.commands.joinItemBackward():t.chain().liftListItem(e).run()},Wse=(t,e)=>{const n=FD(t,e),r=iy(t,e);return!r||!n?!1:n>r.depth},Yse=(t,e)=>{const n=FD(t,e),r=iy(t,e);return!r||!n?!1:n<r.depth},gM=(t,e)=>{if(!pd(t.state,e)||!wze(t.state,e))return!1;const{selection:n}=t.state,{$from:r,$to:s}=n;return!n.empty&&r.sameParent(s)?!1:Wse(e,t.state)?t.chain().focus(t.state.selection.from+4).lift(e).joinBackward().run():Yse(e,t.state)?t.chain().joinForward().joinBackward().run():t.commands.joinItemForward()},yVe=(t,e)=>{var n;const{$anchor:r}=e.selection,s=e.doc.resolve(r.pos-r.parentOffset-2);return!(s.index()===s.parent.childCount-1||((n=s.nodeAfter)==null?void 0:n.type.name)!==t)},Gse=Yn.create({name:"listKeymap",addOptions(){return{listTypes:[{itemName:"listItem",wrapperNames:["bulletList","orderedList"]},{itemName:"taskItem",wrapperNames:["taskList"]}]}},addKeyboardShortcuts(){return{Delete:({editor:t})=>{let e=!1;return this.options.listTypes.forEach(({itemName:n})=>{t.state.schema.nodes[n]!==void 0&&gM(t,n)&&(e=!0)}),e},"Mod-Delete":({editor:t})=>{let e=!1;return this.options.listTypes.forEach(({itemName:n})=>{t.state.schema.nodes[n]!==void 0&&gM(t,n)&&(e=!0)}),e},Backspace:({editor:t})=>{let e=!1;return this.options.listTypes.forEach(({itemName:n,wrapperNames:r})=>{t.state.schema.nodes[n]!==void 0&&mM(t,n,r)&&(e=!0)}),e},"Mod-Backspace":({editor:t})=>{let e=!1;return this.options.listTypes.forEach(({itemName:n,wrapperNames:r})=>{t.state.schema.nodes[n]!==void 0&&mM(t,n,r)&&(e=!0)}),e}}}}),MU=/^(\s*)(\d+)\.\s+(.*)$/,vVe=/^\s/;function bVe(t){const e=[];let n=0,r=0;for(;n<t.length;){const s=t[n],o=s.match(MU);if(!o)break;const[,i,a,l]=o,c=i.length;let u=l,f=n+1;const h=[s];for(;f<t.length;){const m=t[f];if(m.match(MU))break;if(m.trim()==="")h.push(m),u+=`
`,f+=1;else if(m.match(vVe))h.push(m),u+=`
${m.slice(c+2)}`,f+=1;else break}e.push({indent:c,number:parseInt(a,10),content:u.trim(),raw:h.join(`
`)}),r=f,n=f}return[e,r]}function Kse(t,e,n){var r;const s=[];let o=0;for(;o<t.length;){const i=t[o];if(i.indent===e){const a=i.content.split(`
`),l=((r=a[0])==null?void 0:r.trim())||"",c=[];l&&c.push({type:"paragraph",raw:l,tokens:n.inlineTokens(l)});const u=a.slice(1).join(`
`).trim();if(u){const m=n.blockTokens(u);c.push(...m)}let f=o+1;const h=[];for(;f<t.length&&t[f].indent>e;)h.push(t[f]),f+=1;if(h.length>0){const m=Math.min(...h.map(v=>v.indent)),y=Kse(h,m,n);c.push({type:"list",ordered:!0,start:h[0].number,items:y,raw:h.map(v=>v.raw).join(`
`)})}s.push({type:"list_item",raw:i.raw,tokens:c}),o=f}else o+=1}return s}function xVe(t,e){return t.map(n=>{if(n.type!=="list_item")return e.parseChildren([n])[0];const r=[];return n.tokens&&n.tokens.length>0&&n.tokens.forEach(s=>{if(s.type==="paragraph"||s.type==="list"||s.type==="blockquote"||s.type==="code")r.push(...e.parseChildren([s]));else if(s.type==="text"&&s.tokens){const o=e.parseChildren([s]);r.push({type:"paragraph",content:o})}else{const o=e.parseChildren([s]);o.length>0&&r.push(...o)}}),{type:"listItem",content:r}})}var wVe="listItem",jU="textStyle",AU=/^(\d+)\.\s$/,Xse=Es.create({name:"orderedList",addOptions(){return{itemTypeName:"listItem",HTMLAttributes:{},keepMarks:!1,keepAttributes:!1}},group:"block list",content(){return`${this.options.itemTypeName}+`},addAttributes(){return{start:{default:1,parseHTML:t=>t.hasAttribute("start")?parseInt(t.getAttribute("start")||"",10):1},type:{default:null,parseHTML:t=>t.getAttribute("type")}}},parseHTML(){return[{tag:"ol"}]},renderHTML({HTMLAttributes:t}){const{start:e,...n}=t;return e===1?["ol",rr(this.options.HTMLAttributes,n),0]:["ol",rr(this.options.HTMLAttributes,t),0]},markdownTokenName:"list",parseMarkdown:(t,e)=>{if(t.type!=="list"||!t.ordered)return[];const n=t.start||1,r=t.items?xVe(t.items,e):[];return n!==1?{type:"orderedList",attrs:{start:n},content:r}:{type:"orderedList",content:r}},renderMarkdown:(t,e)=>t.content?e.renderChildren(t.content,`
`):"",markdownTokenizer:{name:"orderedList",level:"block",start:t=>{const e=t.match(/^(\s*)(\d+)\.\s+/),n=e==null?void 0:e.index;return n!==void 0?n:-1},tokenize:(t,e,n)=>{var r;const s=t.split(`
`),[o,i]=bVe(s);if(o.length===0)return;const a=Kse(o,0,n);return a.length===0?void 0:{type:"list",ordered:!0,start:((r=o[0])==null?void 0:r.number)||1,items:a,raw:s.slice(0,i).join(`
`)}}},markdownOptions:{indentsContent:!0},addCommands(){return{toggleOrderedList:()=>({commands:t,chain:e})=>this.options.keepAttributes?e().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(wVe,this.editor.getAttributes(jU)).run():t.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-7":()=>this.editor.commands.toggleOrderedList()}},addInputRules(){let t=vm({find:AU,type:this.type,getAttributes:e=>({start:+e[1]}),joinPredicate:(e,n)=>n.childCount+n.attrs.start===+e[1]});return(this.options.keepMarks||this.options.keepAttributes)&&(t=vm({find:AU,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:e=>({start:+e[1],...this.editor.getAttributes(jU)}),joinPredicate:(e,n)=>n.childCount+n.attrs.start===+e[1],editor:this.editor})),[t]}}),SVe=/^\s*(\[([( |x])?\])\s$/,CVe=Es.create({name:"taskItem",addOptions(){return{nested:!1,HTMLAttributes:{},taskListTypeName:"taskList",a11y:void 0}},content(){return this.options.nested?"paragraph block*":"paragraph+"},defining:!0,addAttributes(){return{checked:{default:!1,keepOnSplit:!1,parseHTML:t=>{const e=t.getAttribute("data-checked");return e===""||e==="true"},renderHTML:t=>({"data-checked":t.checked})}}},parseHTML(){return[{tag:`li[data-type="${this.name}"]`,priority:51}]},renderHTML({node:t,HTMLAttributes:e}){return["li",rr(this.options.HTMLAttributes,e,{"data-type":this.name}),["label",["input",{type:"checkbox",checked:t.attrs.checked?"checked":null}],["span"]],["div",0]]},parseMarkdown:(t,e)=>{const n=[];if(t.tokens&&t.tokens.length>0?n.push(e.createNode("paragraph",{},e.parseInline(t.tokens))):t.text?n.push(e.createNode("paragraph",{},[e.createNode("text",{text:t.text})])):n.push(e.createNode("paragraph",{},[])),t.nestedTokens&&t.nestedTokens.length>0){const r=e.parseChildren(t.nestedTokens);n.push(...r)}return e.createNode("taskItem",{checked:t.checked||!1},n)},renderMarkdown:(t,e)=>{var n;const s=`- [${(n=t.attrs)!=null&&n.checked?"x":" "}] `;return xD(t,e,s)},addKeyboardShortcuts(){const t={Enter:()=>this.editor.commands.splitListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)};return this.options.nested?{...t,Tab:()=>this.editor.commands.sinkListItem(this.name)}:t},addNodeView(){return({node:t,HTMLAttributes:e,getPos:n,editor:r})=>{const s=document.createElement("li"),o=document.createElement("label"),i=document.createElement("span"),a=document.createElement("input"),l=document.createElement("div"),c=f=>{var h,m;a.ariaLabel=((m=(h=this.options.a11y)==null?void 0:h.checkboxLabel)==null?void 0:m.call(h,f,a.checked))||`Task item checkbox for ${f.textContent||"empty task item"}`};c(t),o.contentEditable="false",a.type="checkbox",a.addEventListener("mousedown",f=>f.preventDefault()),a.addEventListener("change",f=>{if(!r.isEditable&&!this.options.onReadOnlyChecked){a.checked=!a.checked;return}const{checked:h}=f.target;r.isEditable&&typeof n=="function"&&r.chain().focus(void 0,{scrollIntoView:!1}).command(({tr:m})=>{const y=n();if(typeof y!="number")return!1;const v=m.doc.nodeAt(y);return m.setNodeMarkup(y,void 0,{...v==null?void 0:v.attrs,checked:h}),!0}).run(),!r.isEditable&&this.options.onReadOnlyChecked&&(this.options.onReadOnlyChecked(t,h)||(a.checked=!a.checked))}),Object.entries(this.options.HTMLAttributes).forEach(([f,h])=>{s.setAttribute(f,h)}),s.dataset.checked=t.attrs.checked,a.checked=t.attrs.checked,o.append(a,i),s.append(o,l),Object.entries(e).forEach(([f,h])=>{s.setAttribute(f,h)});let u=new Set(Object.keys(e));return{dom:s,contentDOM:l,update:f=>{if(f.type!==this.type)return!1;s.dataset.checked=f.attrs.checked,a.checked=f.attrs.checked,c(f);const h=r.extensionManager.attributes,m=ym(f,h),y=new Set(Object.keys(m)),v=this.options.HTMLAttributes;return u.forEach(b=>{y.has(b)||(b in v?s.setAttribute(b,v[b]):s.removeAttribute(b))}),Object.entries(m).forEach(([b,w])=>{w==null?b in v?s.setAttribute(b,v[b]):s.removeAttribute(b):s.setAttribute(b,w)}),u=y,!0}}}},addInputRules(){return[vm({find:SVe,type:this.type,getAttributes:t=>({checked:t[t.length-1]==="x"})})]}}),kVe=Es.create({name:"taskList",addOptions(){return{itemTypeName:"taskItem",HTMLAttributes:{}}},group:"block list",content(){return`${this.options.itemTypeName}+`},parseHTML(){return[{tag:`ul[data-type="${this.name}"]`,priority:51}]},renderHTML({HTMLAttributes:t}){return["ul",rr(this.options.HTMLAttributes,t,{"data-type":this.name}),0]},parseMarkdown:(t,e)=>e.createNode("taskList",{},e.parseChildren(t.items||[])),renderMarkdown:(t,e)=>t.content?e.renderChildren(t.content,`
`):"",markdownTokenizer:{name:"taskList",level:"block",start(t){var e;const n=(e=t.match(/^\s*[-+*]\s+\[([ xX])\]\s+/))==null?void 0:e.index;return n!==void 0?n:-1},tokenize(t,e,n){const r=o=>{const i=tM(o,{itemPattern:/^(\s*)([-+*])\s+\[([ xX])\]\s+(.*)$/,extractItemData:a=>({indentLevel:a[1].length,mainContent:a[4],checked:a[3].toLowerCase()==="x"}),createToken:(a,l)=>({type:"taskItem",raw:"",mainContent:a.mainContent,indentLevel:a.indentLevel,checked:a.checked,text:a.mainContent,tokens:n.inlineTokens(a.mainContent),nestedTokens:l}),customNestedParser:r},n);return i?[{type:"taskList",raw:i.raw,items:i.items}]:n.blockTokens(o)},s=tM(t,{itemPattern:/^(\s*)([-+*])\s+\[([ xX])\]\s+(.*)$/,extractItemData:o=>({indentLevel:o[1].length,mainContent:o[4],checked:o[3].toLowerCase()==="x"}),createToken:(o,i)=>({type:"taskItem",raw:"",mainContent:o.mainContent,indentLevel:o.indentLevel,checked:o.checked,text:o.mainContent,tokens:n.inlineTokens(o.mainContent),nestedTokens:i}),customNestedParser:r},n);if(s)return{type:"taskList",raw:s.raw,items:s.items}}},markdownOptions:{indentsContent:!0},addCommands(){return{toggleTaskList:()=>({commands:t})=>t.toggleList(this.name,this.options.itemTypeName)}},addKeyboardShortcuts(){return{"Mod-Shift-9":()=>this.editor.commands.toggleTaskList()}}});Yn.create({name:"listKit",addExtensions(){const t=[];return this.options.bulletList!==!1&&t.push(Bse.configure(this.options.bulletList)),this.options.listItem!==!1&&t.push(Hse.configure(this.options.listItem)),this.options.listKeymap!==!1&&t.push(Gse.configure(this.options.listKeymap)),this.options.orderedList!==!1&&t.push(Xse.configure(this.options.orderedList)),this.options.taskItem!==!1&&t.push(CVe.configure(this.options.taskItem)),this.options.taskList!==!1&&t.push(kVe.configure(this.options.taskList)),t}});var _U="&nbsp;",EVe=" ",Zse=Es.create({name:"paragraph",priority:1e3,addOptions(){return{HTMLAttributes:{}}},group:"block",content:"inline*",parseHTML(){return[{tag:"p"}]},renderHTML({HTMLAttributes:t}){return["p",rr(this.options.HTMLAttributes,t),0]},parseMarkdown:(t,e)=>{const n=t.tokens||[];if(n.length===1&&n[0].type==="image")return e.parseChildren([n[0]]);const r=e.parseInline(n);return r.length===1&&r[0].type==="text"&&(r[0].text===_U||r[0].text===EVe)?e.createNode("paragraph",void 0,[]):e.createNode("paragraph",void 0,r)},renderMarkdown:(t,e)=>{if(!t)return"";const n=Array.isArray(t.content)?t.content:[];return n.length===0?_U:e.renderChildren(n)},addCommands(){return{setParagraph:()=>({commands:t})=>t.setNode(this.name)}},addKeyboardShortcuts(){return{"Mod-Alt-0":()=>this.editor.commands.setParagraph()}}}),TVe=Zse,MVe=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))$/,jVe=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))/g,AVe=Wa.create({name:"strike",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"s"},{tag:"del"},{tag:"strike"},{style:"text-decoration",consuming:!1,getAttrs:t=>t.includes("line-through")?{}:!1}]},renderHTML({HTMLAttributes:t}){return["s",rr(this.options.HTMLAttributes,t),0]},markdownTokenName:"del",parseMarkdown:(t,e)=>e.applyMark("strike",e.parseInline(t.tokens||[])),renderMarkdown:(t,e)=>`~~${e.renderChildren(t)}~~`,addCommands(){return{setStrike:()=>({commands:t})=>t.setMark(this.name),toggleStrike:()=>({commands:t})=>t.toggleMark(this.name),unsetStrike:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-s":()=>this.editor.commands.toggleStrike()}},addInputRules(){return[Yf({find:MVe,type:this.type})]},addPasteRules(){return[hd({find:jVe,type:this.type})]}}),_Ve=Es.create({name:"text",group:"inline",parseMarkdown:t=>({type:"text",text:t.text||""}),renderMarkdown:t=>t.text||""}),RVe=Yn.create({name:"starterKit",addExtensions(){var t,e,n,r;const s=[];return this.options.bold!==!1&&s.push(ZUe.configure(this.options.bold)),this.options.blockquote!==!1&&s.push(WUe.configure(this.options.blockquote)),this.options.bulletList!==!1&&s.push(Bse.configure(this.options.bulletList)),this.options.code!==!1&&s.push(eVe.configure(this.options.code)),this.options.codeBlock!==!1&&s.push(rVe.configure(this.options.codeBlock)),this.options.document!==!1&&s.push(sVe.configure(this.options.document)),this.options.dropcursor!==!1&&s.push(NUe.configure(this.options.dropcursor)),this.options.gapcursor!==!1&&s.push(LUe.configure(this.options.gapcursor)),this.options.hardBreak!==!1&&s.push(oVe.configure(this.options.hardBreak)),this.options.heading!==!1&&s.push(iVe.configure(this.options.heading)),this.options.undoRedo!==!1&&s.push(PUe.configure(this.options.undoRedo)),this.options.horizontalRule!==!1&&s.push(aVe.configure(this.options.horizontalRule)),this.options.italic!==!1&&s.push(fVe.configure(this.options.italic)),this.options.listItem!==!1&&s.push(Hse.configure(this.options.listItem)),this.options.listKeymap!==!1&&s.push(Gse.configure((t=this.options)==null?void 0:t.listKeymap)),this.options.link!==!1&&s.push(gse.configure((e=this.options)==null?void 0:e.link)),this.options.orderedList!==!1&&s.push(Xse.configure(this.options.orderedList)),this.options.paragraph!==!1&&s.push(Zse.configure(this.options.paragraph)),this.options.strike!==!1&&s.push(AVe.configure(this.options.strike)),this.options.text!==!1&&s.push(_Ve.configure(this.options.text)),this.options.underline!==!1&&s.push(zse.configure((n=this.options)==null?void 0:n.underline)),this.options.trailingNode!==!1&&s.push(zUe.configure((r=this.options)==null?void 0:r.trailingNode)),s}}),yM=RVe;const Qse=t=>({textColorControlLabel:t("editor.textColorControlLabel"),undoControlLabel:t("editor.undoControlLabel"),redoControlLabel:t("editor.redoControlLabel"),fontControlLabel:t("editor.fontControlLabel"),boldControlLabel:t("editor.boldControlLabel"),hrControlLabel:t("editor.hrControlLabel"),italicControlLabel:t("editor.italicControlLabel"),underlineControlLabel:t("editor.underlineControlLabel"),strikeControlLabel:t("editor.strikeControlLabel"),clearFormattingControlLabel:t("editor.clearFormattingControlLabel"),linkControlLabel:t("editor.linkControlLabel"),linkEditorInputPlaceholder:t("editor.linkEditorInputPlaceholder"),linkEditorExternalLink:t("editor.linkEditorExternalLink"),linkEditorInternalLink:t("editor.linkEditorInternalLink"),linkEditorSave:t("editor.linkEditorSave"),unlinkControlLabel:t("editor.unlinkControlLabel"),bulletListControlLabel:t("editor.bulletListControlLabel"),orderedListControlLabel:t("editor.orderedListControlLabel"),h1ControlLabel:t("editor.h1ControlLabel"),h2ControlLabel:t("editor.h2ControlLabel"),h3ControlLabel:t("editor.h3ControlLabel"),h4ControlLabel:t("editor.h4ControlLabel"),blockquoteControlLabel:t("editor.blockquoteControlLabel"),alignLeftControlLabel:t("editor.alignLeftControlLabel"),alignCenterControlLabel:t("editor.alignCenterControlLabel"),alignRightControlLabel:t("editor.alignRightControlLabel"),alignJustifyControlLabel:t("editor.alignJustifyControlLabel"),codeControlLabel:t("editor.codeControlLabel"),subscriptControlLabel:t("editor.subscriptControlLabel"),superscriptControlLabel:t("editor.superscriptControlLabel"),highlightControlLabel:t("editor.highlightControlLabel")}),zD=({content:t="",placeholder:e,onUpdate:n})=>{const r=xt(1024),[s,o]=S.useState(!r),{t:i}=Le(),a=Qse(i),l=fM({extensions:[yM.configure({link:!1,underline:!1}),Pse,HPe.configure({autolink:!0,linkOnPaste:!0,openOnClick:!0,HTMLAttributes:{target:"_blank",rel:"noopener noreferrer"}}).extend({addInputRules(){return[]},addPasteRules(){return[]},addCommands(){return{unsetLink:()=>({commands:f})=>f.unsetMark("link"),setLink:f=>({commands:h,chain:m,state:y})=>{const{selection:v}=y,b=((f==null?void 0:f.href)??"").trim();if(!b)return!0;const C=/^(https?:)?\/\//i.test(b)?b:`https://${b}`,k=(f==null?void 0:f.target)??"_blank",E="noopener noreferrer";return v.empty?m().focus().insertContent({type:"text",text:b,marks:[{type:"link",attrs:{href:C,target:k,rel:E}}]}).run():m().focus().extendMarkRange("link").setMark("link",{...f,href:C,target:k,rel:E}).run()}}}}),Fse,$se,pM,hM.configure({types:["heading","paragraph"]}),BUe.configure({placeholder:e})],content:t,onUpdate:({editor:f})=>n(f)}),c=()=>{o(!s)};S.useEffect(()=>{o(!r)},[r]);function u(f){const[,h]=S.useState(0);S.useEffect(()=>{if(!f)return;const m=()=>h(y=>y+1);return f.on("transaction",m),f.on("selectionUpdate",m),()=>{f.off("transaction",m),f.off("selectionUpdate",m)}},[f])}return u(l??null),l?d.jsxs(ft,{editor:l,labels:a,children:[d.jsxs(ft.Toolbar,{sx:{paddingRight:"50px"},sticky:!0,stickyOffset:60,children:[d.jsxs(ft.ControlsGroup,{children:[d.jsx(ft.Bold,{}),d.jsx(ft.Italic,{}),d.jsx(ft.Underline,{}),d.jsx(ft.Strikethrough,{}),d.jsx(ft.ClearFormatting,{}),d.jsx(ft.Highlight,{}),d.jsx(ft.Code,{})]}),r&&d.jsx(on,{position:"bottom",label:s?"Свернуть панель":"Раскрыть панель",children:d.jsx(Ve,{size:"lg",sx:{position:"absolute",right:"16px",top:"7px",zIndex:11},onClick:c,children:d.jsx(Nm,{stroke:1.5,style:{transform:s?"rotateZ(180deg)":"rotateZ(0deg)",transition:"200ms"}})})}),s&&d.jsxs(d.Fragment,{children:[d.jsxs(ft.ControlsGroup,{children:[d.jsx(ft.H1,{}),d.jsx(ft.H2,{}),d.jsx(ft.H3,{}),d.jsx(ft.H4,{})]}),d.jsxs(ft.ControlsGroup,{children:[d.jsx(ft.Blockquote,{}),d.jsx(ft.Hr,{}),d.jsx(ft.BulletList,{}),d.jsx(ft.OrderedList,{}),d.jsx(ft.Subscript,{}),d.jsx(ft.Superscript,{})]}),d.jsxs(ft.ControlsGroup,{children:[d.jsx(ft.Link,{}),d.jsx(ft.Unlink,{})]}),d.jsxs(ft.ControlsGroup,{children:[d.jsx(ft.AlignLeft,{}),d.jsx(ft.AlignCenter,{}),d.jsx(ft.AlignJustify,{}),d.jsx(ft.AlignRight,{})]})]})]}),d.jsx(ft.Content,{sx:{"& .ProseMirror":{minHeight:"150px"},"& .ProseMirror a":{cursor:"pointer"}}})]}):null},kw=t=>{const e=me.c(18);let n,r,s,o,i,a;e[0]!==t?({styles:s,width:a,sx:o,onChange:n,value:i,...r}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o,e[5]=i,e[6]=a):(n=e[1],r=e[2],s=e[3],o=e[4],i=e[5],a=e[6]);const l=xt(1024);let c;e[7]!==n||e[8]!==i?(c=h=>{i===h||h===null&&i!==null||n==null||n(h)},e[7]=n,e[8]=i,e[9]=c):c=e[9];const u=c;let f;return e[10]!==u||e[11]!==l||e[12]!==r||e[13]!==s||e[14]!==o||e[15]!==i||e[16]!==a?(f=l?d.jsx(cNe,{...r,value:i,onChange:u}):d.jsx(Ia,{w:a,sx:o,styles:s,...r,value:i,onChange:u}),e[10]=u,e[11]=l,e[12]=r,e[13]=s,e[14]=o,e[15]=i,e[16]=a,e[17]=f):f=e[17],f},DVe=({isChainsView:t,state:e,messageId:n,opened:r,setOpened:s,attachments:o,handleAddToCalendar:i})=>{var z,B;const{t:a}=Le(),l=zt(),[c,u]=S.useState(!0),[f,h]=S.useState(""),m=3,y=re(qa),v=re(L=>L.email.emailEvent),b=Mr();function w(L,P){const I=new Date(L),H=new Date(P),$=a("calendarIntegration.days",{returnObjects:!0}),V=a("calendarIntegration.months",{returnObjects:!0}),q=$[I.getDay()],U=I.getDate(),W=V[I.getMonth()],Y=I.getMonth()+1,G=I.getFullYear(),K=U<10?`0${U}`:U,Q=Y<10?`0${Y}`:Y,Z={hour:"2-digit",minute:"2-digit"},J=I.toLocaleTimeString("ru-RU",Z),ne=H.toLocaleTimeString("ru-RU",Z);return{formattedDate:`${q}, ${U} ${W} ${G}, ${J} - ${ne}`,dayName:q,day:U,formattedDay:K,month:W,monthInt:Y,formattedMonthInt:Q,year:G,startTime:J,endTime:ne}}function C(L=[],P=""){const I=K=>K.Email||K.Name||"",H=K=>I(K)===P,V=L.filter(K=>K.Email||K.Name).filter(K=>!H(K)),q=K=>K.map((Q,Z)=>d.jsxs("span",{children:[I(Q),Z<K.length-1?", ":""]},I(Q)||Z)),U=P?[{Email:P},...V]:V,W=q(U),Y=P?d.jsx("span",{children:P},"organizer"):null,G=q(V);return{inlineAll:W,inlineOrganizer:Y,inlineParticipants:G,participantsOnly:V}}const{inlineAll:k,inlineOrganizer:E,inlineParticipants:j}=C(v==null?void 0:v.Participants,((z=v==null?void 0:v.Organizer)==null?void 0:z.Email)||((B=v==null?void 0:v.Organizer)==null?void 0:B.Name)||""),{formattedDate:A,year:M,formattedMonthInt:_,formattedDay:D}=w((v==null?void 0:v.StartDate)||"",(v==null?void 0:v.EndDate)||""),R=()=>{const L=I=>{if(I!==f)try{l(I==="accept"?bTe({messageId:n}):I==="decline"?xTe({messageId:n}):wTe({messageId:n})),h(I),b.success(a("calendarIntegration.successResponse"))}catch{b.error(a("warningBoundaryText.heading"))}},P=()=>{var H;const I=(H=y==null?void 0:y.ModuleUrls.find($=>$.Name==="Calendar"))==null?void 0:H.Url;window.open(`${I}/day/${M}/${_}/${D}/${v==null?void 0:v.Id}`)};return d.jsx(UOe,{formattedDate:A,emailEvent:v,inlineEmails:k,popOverEmails:j,inlineOrganizer:E,opened:r,setOpened:s,COUNT:m,handleClickToCalendar:P,handleAnswerEvent:L,invitation:f})},N=()=>e===1?d.jsx(R,{}):e===2?d.jsx($Oe,{}):e===6?d.jsx(qOe,{}):null;return S.useEffect(()=>{(async()=>{u(!0);const P=await l(mx({messageId:n}));if(mx.rejected.match(P))P.payload==="Event not found (404)"?b.error(a("calendarIntegration.eventCanceled")):b.error(a("calendarIntegration.eventError"));else if(mx.fulfilled.match(P)){const I=P.payload;if(I){let H="";switch(I.AttendingType){case 1:H="accept";break;case 2:H="decline";break;case 4:H="tentative";break;default:H=""}h(H)}}u(!1)})()},[l,n]),c?d.jsx(VOe,{}):!v&&e===1?null:d.jsxs(ve,{className:`${eo.calendarResponse} ${eo.fadeIn}`,w:"100%",children:[(v==null?void 0:v.Name)&&d.jsx(ue,{w:"100%",size:"lg",fw:500,children:d.jsx(YOe,{content:v==null?void 0:v.Name})}),d.jsx(N,{})]})},Jse=t=>{const e=me.c(14),{text:n,buttonLabel:r,onButtonClick:s,disabled:o}=t,i=xt(600);let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a={containerType:"inline-size",margin:"0 16px",padding:"7px 16px",backgroundColor:"#E7F5FF"},e[0]=a):a=e[0];let l;e[1]===Symbol.for("react.memo_cache_sentinel")?(l={"@container (width < 400px)":{flexDirection:"column"}},e[1]=l):l=e[1];let c;e[2]===Symbol.for("react.memo_cache_sentinel")?(c=d.jsx(xe,{children:d.jsx(xc,{color:"#339AF0",size:16,stroke:1.5})}),e[2]=c):c=e[2];let u;e[3]!==n?(u=d.jsxs(xe,{align:"center",gap:12,children:[c,d.jsx(ue,{c:"#339AF0",children:n})]}),e[3]=n,e[4]=u):u=e[4];let f;e[5]===Symbol.for("react.memo_cache_sentinel")?(f={"@container (width < 400px)":{margin:"auto"}},e[5]=f):f=e[5];let h;e[6]!==r||e[7]!==o||e[8]!==i||e[9]!==s?(h=d.jsx(xe,{sx:f,ml:"auto",children:d.jsx(yt,{variant:"outline",size:"xs",fz:12,onClick:s,fullWidth:i,disabled:o,children:r})}),e[6]=r,e[7]=o,e[8]=i,e[9]=s,e[10]=h):h=e[10];let m;return e[11]!==u||e[12]!==h?(m=d.jsx(xe,{align:"center",sx:a,children:d.jsxs(xe,{flex:1,gap:12,sx:l,children:[u,h]})}),e[11]=u,e[12]=h,e[13]=m):m=e[13],m},IVe=t=>{const e=me.c(15),{messageId:n,sendTime:r}=t,{t:s}=Le(),o=Mr(),i=zt(),a=re(Bm),l=re(mr),c=ey(r,!0,a);let u;e[0]!==i||e[1]!==n||e[2]!==l||e[3]!==o||e[4]!==s?(u=()=>{qm({title:s("modals.titles.cancelSend"),children:d.jsx(ue,{children:s("modals.text.cancelSendText")}),labels:{confirm:`${s("modals.controls.cancelSend")}`,cancel:`${s("modals.controls.close")}`},centered:!0,onConfirm:async()=>{await i(tS({id:n})).unwrap(),i(ur({...l})),i(xl({id:n})),o.success(s("notifications.messages.sendingCanceled"))}})},e[0]=i,e[1]=n,e[2]=l,e[3]=o,e[4]=s,e[5]=u):u=e[5];const f=u;let h;e[6]!==c||e[7]!==s?(h=s("delayedSend.messageScheduled",{date:c}),e[6]=c,e[7]=s,e[8]=h):h=e[8];let m;e[9]!==s?(m=s("delayedSend.cancelSend"),e[9]=s,e[10]=m):m=e[10];let y;return e[11]!==f||e[12]!==h||e[13]!==m?(y=d.jsx(Jse,{text:h,buttonLabel:m,onButtonClick:f}),e[11]=f,e[12]=h,e[13]=m,e[14]=y):y=e[14],y},PD={flexShrink:0,maxWidth:120,padding:"0 6px"},bb=(t,e)=>({root:{backgroundColor:"transparent","&:hover":{backgroundColor:t||e?"#345DA612":"#E6EDF5"},"&:active":{backgroundColor:t||e?"#345DA61A":"#E0E8F1"},"&:disabled":{backgroundColor:"transparent",opacity:.5}}}),lf=()=>({root:{backgroundColor:"transparent","&:hover":{backgroundColor:"#f1f3f5"},span:{alignItems:"flex-start",justifyContent:"flex-start",gap:"10px",padding:"5px 10px"}}}),OVe="_draggable_tfkjm_1",NVe="_customScrollbar_tfkjm_12",LVe="_messageCardWrapper_tfkjm_34",$Ve="_unread_tfkjm_48",FVe="_emptyListFadeIn_tfkjm_67",Gf={draggable:OVe,customScrollbar:NVe,messageCardWrapper:LVe,unread:$Ve,emptyListFadeIn:FVe},eoe=S.memo(t=>{const e=me.c(26),{item:n,onDelete:r,labelRef:s,isTruncated:o}=t;let i;e[0]!==n||e[1]!==r?(i=k=>{k.stopPropagation(),r&&r(n)},e[0]=n,e[1]=r,e[2]=i):i=e[2];const a=i;let l;e[3]!==n.Color?(l=k=>({backgroundColor:Rhe(n.Color,.4),color:T0(n.Color,.6),borderRadius:k.radius.xl,fontWeight:500,lineHeight:"12px"}),e[3]=n.Color,e[4]=l):l=e[4];let c;e[5]===Symbol.for("react.memo_cache_sentinel")?(c={alignItems:"center",flexWrap:"nowrap"},e[5]=c):c=e[5];let u;e[6]===Symbol.for("react.memo_cache_sentinel")?(u={maxWidth:"350px",whiteSpace:"normal",wordBreak:"break-all"},e[6]=u):u=e[6];let f;e[7]!==n.Name?(f=d.jsx("div",{style:u,children:n.Name}),e[7]=n.Name,e[8]=f):f=e[8];const h=!o;let m;e[9]===Symbol.for("react.memo_cache_sentinel")?(m={display:"block",maxWidth:"150px",lineHeight:"20px",textTransform:"uppercase"},e[9]=m):m=e[9];let y;e[10]!==n.Name||e[11]!==s?(y=d.jsx(ue,{ref:s,truncate:"end",lineClamp:1,fz:10,fw:500,sx:m,children:n.Name}),e[10]=n.Name,e[11]=s,e[12]=y):y=e[12];let v;e[13]!==f||e[14]!==h||e[15]!==y?(v=d.jsx(on,{withArrow:!0,label:f,position:"bottom",disabled:h,children:y}),e[13]=f,e[14]=h,e[15]=y,e[16]=v):v=e[16];let b;e[17]!==a||e[18]!==r?(b=r&&d.jsx(Ve,{size:16,onClick:a,sx:{"&:hover":{backgroundColor:"transparent"}},children:d.jsx(po,{stroke:1.5,size:16})}),e[17]=a,e[18]=r,e[19]=b):b=e[19];let w;e[20]!==b||e[21]!==v?(w=d.jsxs(ve,{gap:3,sx:c,children:[v,b]}),e[20]=b,e[21]=v,e[22]=w):w=e[22];let C;return e[23]!==w||e[24]!==l?(C=d.jsx(ie,{onMouseDown:zVe,onDoubleClick:PVe,px:7,sx:l,children:w}),e[23]=w,e[24]=l,e[25]=C):C=e[25],C});function zVe(t){return t.stopPropagation()}function PVe(t){return t.stopPropagation()}const BVe="/assets/chains-5Px4JYOU.png",toe=t=>{const e=me.c(11),{children:n}=t,r=xt(1024);let s;e[0]===Symbol.for("react.memo_cache_sentinel")?(s={height:"100%",width:"100%",justifyContent:"center"},e[0]=s):s=e[0];const o=r?"auto":325,i=r?270:300;let a;e[1]===Symbol.for("react.memo_cache_sentinel")?(a={height:"100%"},e[1]=a):a=e[1];const l=r?"center":"flex-start";let c,u;e[2]===Symbol.for("react.memo_cache_sentinel")?(c={display:"flex",justifyContent:"center",alignItems:"center",width:"100%",flexDirection:"column"},u=d.jsx(Sd,{w:202,h:180,src:BVe,alt:"Chains"}),e[2]=c,e[3]=u):(c=e[2],u=e[3]);let f;e[4]!==n?(f=d.jsxs(ie,{sx:c,children:[u,n]}),e[4]=n,e[5]=f):f=e[5];let h;return e[6]!==o||e[7]!==i||e[8]!==l||e[9]!==f?(h=d.jsx(bt,{gap:0,sx:s,children:d.jsx(xe,{mih:o,h:i,direction:"column",style:a,gap:"xs",justify:l,align:"center",children:f})}),e[6]=o,e[7]=i,e[8]=l,e[9]=f,e[10]=h):h=e[10],h},HVe=({messageId:t,folderId:e,snoozeUntilUtc:n})=>{var A;const{t:r}=Le(),s=Mr(),o=zt(),i=Er(),a=wn(),l=re(Bm),c=ts(),u=re(zr),f=re(mr),h=xt(1024),[m,y]=S.useState(!1),v=u.find(M=>M.Id===e),b=a.pathname.includes("/message/"),w=(A=a.state)==null?void 0:A.prevLocation,C=!!(w&&(w.startsWith("/search")||w.startsWith("/tags/"))),k=ey(n??null,!0,l),E=async()=>{if(!m){y(!0);try{await o(tee({messageId:t})).unwrap(),o(ur({...f})),s.success(r("snooze.returnSuccess"));const M=(c==null?void 0:c.UserEmailId)??(v==null?void 0:v.UserEmailId);if(M&&o(Ag({userEmailId:M})),b&&C){o(xl({id:t})),y(!1);return}o(jo()),o(Ns(null));const _=(c==null?void 0:c.path)??(v==null?void 0:v.path)??"/snoozed";(h||b)&&i(_)}catch{s.error(r("snooze.returnError")),y(!1)}}},j=k?r("snooze.banner",{date:k}):r("snooze.bannerNoDate");return d.jsx(Jse,{text:j,buttonLabel:r("snooze.returnToInbox"),onButtonClick:E,disabled:m})},noe=t=>{const e=me.c(3),n=re(U2);let r;return e[0]!==n||e[1]!==t.Labels?(r=t.Labels?t.Labels.reduce((s,o)=>{const i=n.find(a=>a.Id===o);return i&&s.push(i),s},[]):[],e[0]=n,e[1]=t.Labels,e[2]=r):r=e[2],r},UVe=t=>{const e=me.c(19),n=zt(),r=xt(1024),s=re(nR),[o,i]=S.useState(null);let a;e[0]!==n||e[1]!==r||e[2]!==t.ExternalId||e[3]!==t.FolderId||e[4]!==t.Id||e[5]!==s?(a=f=>{i(f),n(om({folderId:t.FolderId,ids:[t.Id],labelIds:[f.Id],enabled:!1})),!r&&s===(f==null?void 0:f.Id)&&n(C3([t.ExternalId]))},e[0]=n,e[1]=r,e[2]=t.ExternalId,e[3]=t.FolderId,e[4]=t.Id,e[5]=s,e[6]=a):a=e[6];const l=a;let c;e[7]!==(o==null?void 0:o.Id)||e[8]!==n||e[9]!==r||e[10]!==t.ExternalId||e[11]!==s?(c=()=>()=>{r&&s===(o==null?void 0:o.Id)&&n(C3([t.ExternalId]))},e[7]=o==null?void 0:o.Id,e[8]=n,e[9]=r,e[10]=t.ExternalId,e[11]=s,e[12]=c):c=e[12];let u;return e[13]!==o||e[14]!==n||e[15]!==r||e[16]!==t.ExternalId||e[17]!==s?(u=[n,r,t.ExternalId,s,o],e[13]=o,e[14]=n,e[15]=r,e[16]=t.ExternalId,e[17]=s,e[18]=u):u=e[18],S.useEffect(c,u),l};function roe(t){const e=me.c(25),n=re(G_),r=zt(),s=S.useContext(Mi),o=t.HtmlBody||t.Body;let i;e[0]!==t.Attachments?(i=t.Attachments??[],e[0]=t.Attachments,e[1]=i):i=e[1];let a;e[2]!==t.Labels?(a=t.Labels??[],e[2]=t.Labels,e[3]=a):a=e[3];let l;e[4]!==t.Bcc||e[5]!==t.Cc||e[6]!==t.ExternalId||e[7]!==t.Id||e[8]!==t.Important||e[9]!==t.Subject||e[10]!==t.To||e[11]!==t.Uid||e[12]!==o||e[13]!==i||e[14]!==a?(l={type:"draft",Id:t.Id,To:t.To,Bcc:t.Bcc,Cc:t.Cc,Subject:t.Subject,ExternalId:t.ExternalId,Uid:t.Uid,HtmlBody:o,Attachments:i,Important:t.Important,Labels:a},e[4]=t.Bcc,e[5]=t.Cc,e[6]=t.ExternalId,e[7]=t.Id,e[8]=t.Important,e[9]=t.Subject,e[10]=t.To,e[11]=t.Uid,e[12]=o,e[13]=i,e[14]=a,e[15]=l):l=e[15];const c=Fa(l);let u;e[16]!==n||e[17]!==r||e[18]!==t.Id||e[19]!==c||e[20]!==s?(u=m=>{m.stopPropagation(),n&&n.Id===t.Id&&r(oS());const y=s==null?void 0:s.windows.find(v=>v.props.type==="draft"&&v.props.Id===t.Id);y?s==null||s.focusWindow(y.id):c()},e[16]=n,e[17]=r,e[18]=t.Id,e[19]=c,e[20]=s,e[21]=u):u=e[21];const f=u;let h;return e[22]!==f||e[23]!==c?(h={onEditClick:f,openDraftModal:c},e[22]=f,e[23]=c,e[24]=h):h=e[24],h}function soe({messageId:t,folderId:e,important:n,shouldUpdateMessages:r,stopPropagation:s=!0,withLoading:o=!1}){const i=zt(),[a,l]=S.useState(!1);return{toggleImportant:S.useCallback(async u=>{s&&u&&u.stopPropagation();try{o&&l(!0);const f=!n;i(Vu({Id:t,Important:f})),i(rS({Id:t,Important:f})),i(ITe({Id:t,Important:f})),await i(KJ({ids:[t],isFavorite:f,folderId:e,...r!==void 0?{shouldUpdateMessages:r}:{}})).unwrap()}finally{o&&l(!1)}},[i,t,e,n,r,s,o]),isLoading:a}}const BD=(t,e,n)=>(!!t.length||!!(e!=null&&e.length))&&!n,VVe={border:"none",background:"none",padding:"0",cursor:"pointer"},RU={width:"95%",coloor:"#E6E9EC"},qVe=t=>S.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 36 36",...t},S.createElement("path",{fill:"#EF9645",d:"M4.861 9.147c.94-.657 2.357-.531 3.201.166l-.968-1.407c-.779-1.111-.5-2.313.612-3.093 1.112-.777 4.263 1.312 4.263 1.312-.786-1.122-.639-2.544.483-3.331 1.122-.784 2.67-.513 3.456.611l10.42 14.72L25 31l-11.083-4.042L4.25 12.625c-.793-1.129-.519-2.686.611-3.478z"}),S.createElement("path",{fill:"#FFDC5D",d:"M2.695 17.336s-1.132-1.65.519-2.781c1.649-1.131 2.78.518 2.78.518l5.251 7.658c.181-.302.379-.6.6-.894L4.557 11.21s-1.131-1.649.519-2.78c1.649-1.131 2.78.518 2.78.518l6.855 9.997c.255-.208.516-.417.785-.622L7.549 6.732s-1.131-1.649.519-2.78c1.649-1.131 2.78.518 2.78.518l7.947 11.589c.292-.179.581-.334.871-.498L12.238 4.729s-1.131-1.649.518-2.78c1.649-1.131 2.78.518 2.78.518l7.854 11.454 1.194 1.742c-4.948 3.394-5.419 9.779-2.592 13.902.565.825 1.39.26 1.39.26-3.393-4.949-2.357-10.51 2.592-13.903L24.515 8.62s-.545-1.924 1.378-2.47c1.924-.545 2.47 1.379 2.47 1.379l1.685 5.004c.668 1.984 1.379 3.961 2.32 5.831 2.657 5.28 1.07 11.842-3.94 15.279-5.465 3.747-12.936 2.354-16.684-3.11L2.695 17.336z"}),S.createElement("g",{fill:"#5DADEC"},S.createElement("path",{d:"M12 32.042C8 32.042 3.958 28 3.958 24c0-.553-.405-1-.958-1s-1.042.447-1.042 1C1.958 30 6 34.042 12 34.042c.553 0 1-.489 1-1.042s-.447-.958-1-.958z"}),S.createElement("path",{d:"M7 34c-3 0-5-2-5-5 0-.553-.447-1-1-1s-1 .447-1 1c0 4 3 7 7 7 .553 0 1-.447 1-1s-.447-1-1-1zM24 2c-.552 0-1 .448-1 1s.448 1 1 1c4 0 8 3.589 8 8 0 .552.448 1 1 1s1-.448 1-1c0-5.514-4-10-10-10z"}),S.createElement("path",{d:"M29 .042c-.552 0-1 .406-1 .958s.448 1.042 1 1.042c3 0 4.958 2.225 4.958 4.958 0 .552.489 1 1.042 1s.958-.448.958-1C35.958 3.163 33 .042 29 .042z"}))),WVe=t=>S.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 36 36",...t},S.createElement("path",{fill:"#EF9645",d:"M23.216 20.937l-1.721-6.86-3.947-8.816c-.502-1.297.143-2.756 1.44-3.257 1.296-.506 2.756.143 3.258 1.44l6.203 15.769-5.233 1.724z"}),S.createElement("path",{fill:"#FFDC5D",d:"M31.565 18.449c-.488-2.581-1.988-6.523-1.988-6.523L23.79 1.437C23.164.195 21.648-.303 20.407.322c-1.242.626-1.742 2.141-1.115 3.383l5.33 9.547c.013.022 1.413 5.491 1.413 5.491-1.078-.995-2.607-2.359-4.015-3.618-3.098-2.772-4.936-3.811-4.936-3.811-.71-.443-1.179-.506-2.132-.059L9.08 13.823c-.157.078-.29.188-.395.329l-2.313 3.086c-.893 1.067-.752 2.655.315 3.547 1.066.893 2.653.75 3.548-.314.048-.058 1.78-2.56 1.936-2.64 1.037-.533 2.965-1.447 3.808-1.42.897.029 6.281 5.957 6.281 5.957.206.259.23.618.06.902l-2.915 5.228c-.079.131-.193.236-.33.303l-2.674 1.5c-.154.075-.328.099-.496.067l-5.27-2.272c-.262-.113-.48-.32-.592-.583-.787-1.85-.898-3.619-.899-3.639-.065-1.39-1.244-2.463-2.634-2.398-1.387.056-2.463 1.243-2.398 2.633.013.263.351 5.64 4.727 9.292 2.528 2.108 5.654 2.924 9.649 2.387 4.612-.619 7.469-1.233 11.506-9.558 1.117-2.305 1.903-6.024 1.571-7.781z"})),YVe=t=>S.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 36 36",...t},S.createElement("path",{fill:"#FFDB5E",d:"M34.956 17.916c0-.503-.12-.975-.321-1.404-1.341-4.326-7.619-4.01-16.549-4.221-1.493-.035-.639-1.798-.115-5.668.341-2.517-1.282-6.382-4.01-6.382-4.498 0-.171 3.548-4.148 12.322-2.125 4.688-6.875 2.062-6.875 6.771v10.719c0 1.833.18 3.595 2.758 3.885C8.195 34.219 7.633 36 11.238 36h18.044c1.838 0 3.333-1.496 3.333-3.334 0-.762-.267-1.456-.698-2.018 1.02-.571 1.72-1.649 1.72-2.899 0-.76-.266-1.454-.696-2.015 1.023-.57 1.725-1.649 1.725-2.901 0-.909-.368-1.733-.961-2.336.757-.611 1.251-1.535 1.251-2.581z"}),S.createElement("path",{fill:"#EE9547",d:"M23.02 21.249h8.604c1.17 0 2.268-.626 2.866-1.633.246-.415.109-.952-.307-1.199-.415-.247-.952-.108-1.199.307-.283.479-.806.775-1.361.775h-8.81c-.873 0-1.583-.71-1.583-1.583s.71-1.583 1.583-1.583H28.7c.483 0 .875-.392.875-.875s-.392-.875-.875-.875h-5.888c-1.838 0-3.333 1.495-3.333 3.333 0 1.025.475 1.932 1.205 2.544-.615.605-.998 1.445-.998 2.373 0 1.028.478 1.938 1.212 2.549-.611.604-.99 1.441-.99 2.367 0 1.12.559 2.108 1.409 2.713-.524.589-.852 1.356-.852 2.204 0 1.838 1.495 3.333 3.333 3.333h5.484c1.17 0 2.269-.625 2.867-1.632.247-.415.11-.952-.305-1.199-.416-.245-.953-.11-1.199.305-.285.479-.808.776-1.363.776h-5.484c-.873 0-1.583-.71-1.583-1.583s.71-1.583 1.583-1.583h6.506c1.17 0 2.27-.626 2.867-1.633.247-.416.11-.953-.305-1.199-.419-.251-.954-.11-1.199.305-.289.487-.799.777-1.363.777h-7.063c-.873 0-1.583-.711-1.583-1.584s.71-1.583 1.583-1.583h8.091c1.17 0 2.269-.625 2.867-1.632.247-.415.11-.952-.305-1.199-.417-.246-.953-.11-1.199.305-.289.486-.799.776-1.363.776H23.02c-.873 0-1.583-.71-1.583-1.583s.709-1.584 1.583-1.584z"})),GVe=t=>S.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 36 36",...t},S.createElement("path",{fill:"#FFDB5E",d:"M34.956 18.084c0 .503-.12.975-.321 1.404-1.341 4.326-7.619 4.01-16.549 4.221-1.493.035-.639 1.798-.115 5.668.341 2.517-1.282 6.382-4.01 6.382-4.498 0-.171-3.548-4.148-12.322-2.125-4.688-6.875-2.062-6.875-6.771V5.948c0-1.833.18-3.595 2.758-3.885C8.195 1.781 7.633 0 11.238 0h18.044c1.838 0 3.333 1.496 3.333 3.334 0 .762-.267 1.456-.698 2.018 1.02.571 1.72 1.649 1.72 2.899 0 .76-.266 1.454-.696 2.015 1.023.57 1.725 1.649 1.725 2.901 0 .909-.368 1.733-.961 2.336.757.611 1.251 1.535 1.251 2.581z"}),S.createElement("path",{fill:"#EE9547",d:"M23.02 14.751h8.604c1.17 0 2.268.626 2.866 1.633.246.415.109.952-.307 1.199-.415.247-.952.108-1.199-.307-.283-.479-.806-.775-1.361-.775h-8.81c-.873 0-1.583.71-1.583 1.583s.71 1.583 1.583 1.583H28.7c.483 0 .875.392.875.875s-.392.875-.875.875h-5.888c-1.838 0-3.333-1.495-3.333-3.333 0-1.025.475-1.932 1.205-2.544-.615-.605-.998-1.445-.998-2.373 0-1.028.478-1.938 1.212-2.549-.611-.604-.99-1.441-.99-2.367 0-1.12.559-2.108 1.409-2.713-.524-.589-.852-1.356-.852-2.204 0-1.838 1.495-3.333 3.333-3.333h5.484c1.17 0 2.269.625 2.867 1.632.247.415.11.952-.305 1.199-.416.245-.953.11-1.199-.305-.285-.479-.808-.776-1.363-.776h-5.484c-.873 0-1.583.71-1.583 1.583s.71 1.583 1.583 1.583h6.506c1.17 0 2.27.626 2.867 1.633.247.416.11.953-.305 1.199-.419.251-.954.11-1.199-.305-.289-.487-.799-.777-1.363-.777h-7.063c-.873 0-1.583.711-1.583 1.584s.71 1.583 1.583 1.583h8.091c1.17 0 2.269.625 2.867 1.632.247.415.11.952-.305 1.199-.417.246-.953.11-1.199-.305-.289-.486-.799-.776-1.363-.776H23.02c-.873 0-1.583.71-1.583 1.583s.709 1.584 1.583 1.584z"})),KVe=t=>S.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 36 36",...t},S.createElement("path",{fill:"#FFCC4D",d:"M36 18c0 9.941-8.059 18-18 18-9.94 0-18-8.059-18-18C0 8.06 8.06 0 18 0c9.941 0 18 8.06 18 18"}),S.createElement("path",{fill:"#66471B",d:"M15.457 15.815c-.06-.135-1.499-3.297-4.457-3.297-2.957 0-4.397 3.162-4.457 3.297-.092.207-.032.449.144.591.177.143.427.147.61.014.013-.009 1.262-.902 3.703-.902 2.426 0 3.674.881 3.702.901.088.066.193.099.298.099.11 0 .221-.037.311-.109.179-.142.238-.386.146-.594z"}),S.createElement("path",{fill:"#F5F8FA",d:"M31 13.5c0 3.59-2.91 6.5-6.5 6.5S18 17.09 18 13.5 20.91 7 24.5 7 31 9.91 31 13.5z"}),S.createElement("circle",{fill:"#292F33",cx:24.5,cy:13.5,r:2.5}),S.createElement("path",{fill:"#66471B",d:"M7 21.262c0 3.964 4.596 9 11 9s11-5 11-9c0 0-10.333 2.756-22 0z"}),S.createElement("path",{fill:"#E8596E",d:"M18.545 23.604l-1.091-.005c-3.216-.074-5.454-.596-5.454-.596v6.961c0 3 2 6 6 6s6-3 6-6v-6.92c-1.922.394-3.787.542-5.455.56z"}),S.createElement("path",{fill:"#DD2F45",d:"M18 31.843c.301 0 .545-.244.545-.545v-7.694l-1.091-.005v7.699c.001.301.245.545.546.545z"})),XVe=t=>S.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 36 36",...t},S.createElement("path",{fill:"#50A5E6",d:"M30 22c-3 0-6.688 7.094-7 10-.421 3.915 2 4 2 4h11V26s-3.438-4-6-4z"}),S.createElement("ellipse",{transform:"rotate(-60 27.574 28.49)",fill:"#1C6399",cx:27.574,cy:28.489,rx:5.848,ry:1.638}),S.createElement("path",{fill:"#F9CA55",d:"M20.086 0c1.181 0 2.138.957 2.138 2.138 0 .789.668 10.824.668 10.824L17.948 18V2.138C17.948.957 18.905 0 20.086 0z"}),S.createElement("path",{fill:"#FFDC5D",d:"M18.875 4.323c0-1.099.852-1.989 1.903-1.989 1.051 0 1.903.891 1.903 1.989 0 0 .535 5.942 1.192 9.37.878 1.866 1.369 4.682 1.261 6.248.054.398 5.625 5.006 5.625 5.006-.281 1.813-2.259 6.155-4.759 8.159l-3.521-2.924c-2.885-.404-4.458-3.331-4.458-4.264 0-2.984.854-21.595.854-21.595z"}),S.createElement("path",{fill:"#50A5E6",d:"M6 22c3 0 6.688 7.094 7 10 .421 3.915-2 4-2 4H0V26s3.438-4 6-4z"}),S.createElement("ellipse",{transform:"rotate(-30 8.424 28.489)",fill:"#1C6399",cx:8.426,cy:28.489,rx:1.638,ry:5.848}),S.createElement("path",{fill:"#F9CA55",d:"M16.061.011c-1.266-.127-2.333.864-2.333 2.103 0 .78-.184 10.319-.184 10.319L17.895 18l.062-15.765c0-1.106-.795-2.114-1.896-2.224z"}),S.createElement("path",{fill:"#FFDC5D",d:"M17.125 4.323c0-1.099-.852-1.989-1.903-1.989-1.051 0-1.903.891-1.903 1.989 0 0-.535 5.942-1.192 9.37-.878 1.866-1.369 4.682-1.261 6.248-.054.398-5.625 5.006-5.625 5.006C5.522 26.76 7.5 31.102 10 33.106l3.521-2.924c2.885-.404 4.458-3.331 4.458-4.264 0-2.984-.854-21.595-.854-21.595z"}),S.createElement("path",{fill:"#F9CA55",d:"M17.958 25.823c-.414 0-.75-.336-.75-.75V2.792c0-.414.336-.75.75-.75s.75.336.75.75v22.282c.001.413-.335.749-.75.749z"})),ZVe=t=>S.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 36 36",...t},S.createElement("path",{fill:"#DD2E44",d:"M11.626 7.488c-.112.112-.197.247-.268.395l-.008-.008L.134 33.141l.011.011c-.208.403.14 1.223.853 1.937.713.713 1.533 1.061 1.936.853l.01.01L28.21 24.735l-.008-.009c.147-.07.282-.155.395-.269 1.562-1.562-.971-6.627-5.656-11.313-4.687-4.686-9.752-7.218-11.315-5.656z"}),S.createElement("path",{fill:"#EA596E",d:"M13 12L.416 32.506l-.282.635.011.011c-.208.403.14 1.223.853 1.937.232.232.473.408.709.557L17 17l-4-5z"}),S.createElement("path",{fill:"#A0041E",d:"M23.012 13.066c4.67 4.672 7.263 9.652 5.789 11.124-1.473 1.474-6.453-1.118-11.126-5.788-4.671-4.672-7.263-9.654-5.79-11.127 1.474-1.473 6.454 1.119 11.127 5.791z"}),S.createElement("path",{fill:"#AA8DD8",d:"M18.59 13.609c-.199.161-.459.245-.734.215-.868-.094-1.598-.396-2.109-.873-.541-.505-.808-1.183-.735-1.862.128-1.192 1.324-2.286 3.363-2.066.793.085 1.147-.17 1.159-.292.014-.121-.277-.446-1.07-.532-.868-.094-1.598-.396-2.11-.873-.541-.505-.809-1.183-.735-1.862.13-1.192 1.325-2.286 3.362-2.065.578.062.883-.057 1.012-.134.103-.063.144-.123.148-.158.012-.121-.275-.446-1.07-.532-.549-.06-.947-.552-.886-1.102.059-.549.55-.946 1.101-.886 2.037.219 2.973 1.542 2.844 2.735-.13 1.194-1.325 2.286-3.364 2.067-.578-.063-.88.057-1.01.134-.103.062-.145.123-.149.157-.013.122.276.446 1.071.532 2.037.22 2.973 1.542 2.844 2.735-.129 1.192-1.324 2.286-3.362 2.065-.578-.062-.882.058-1.012.134-.104.064-.144.124-.148.158-.013.121.276.446 1.07.532.548.06.947.553.886 1.102-.028.274-.167.511-.366.671z"}),S.createElement("path",{fill:"#77B255",d:"M30.661 22.857c1.973-.557 3.334.323 3.658 1.478.324 1.154-.378 2.615-2.35 3.17-.77.216-1.001.584-.97.701.034.118.425.312 1.193.095 1.972-.555 3.333.325 3.657 1.479.326 1.155-.378 2.614-2.351 3.17-.769.216-1.001.585-.967.702.033.117.423.311 1.192.095.53-.149 1.084.16 1.233.691.148.532-.161 1.084-.693 1.234-1.971.555-3.333-.323-3.659-1.479-.324-1.154.379-2.613 2.353-3.169.77-.217 1.001-.584.967-.702-.032-.117-.422-.312-1.19-.096-1.974.556-3.334-.322-3.659-1.479-.325-1.154.378-2.613 2.351-3.17.768-.215.999-.585.967-.701-.034-.118-.423-.312-1.192-.096-.532.15-1.083-.16-1.233-.691-.149-.53.161-1.082.693-1.232z"}),S.createElement("path",{fill:"#AA8DD8",d:"M23.001 20.16c-.294 0-.584-.129-.782-.375-.345-.432-.274-1.061.156-1.406.218-.175 5.418-4.259 12.767-3.208.547.078.927.584.849 1.131-.078.546-.58.93-1.132.848-6.493-.922-11.187 2.754-11.233 2.791-.186.148-.406.219-.625.219z"}),S.createElement("path",{fill:"#77B255",d:"M5.754 16c-.095 0-.192-.014-.288-.042-.529-.159-.829-.716-.67-1.245 1.133-3.773 2.16-9.794.898-11.364-.141-.178-.354-.353-.842-.316-.938.072-.849 2.051-.848 2.071.042.551-.372 1.031-.922 1.072-.559.034-1.031-.372-1.072-.923-.103-1.379.326-4.035 2.692-4.214 1.056-.08 1.933.287 2.552 1.057 2.371 2.951-.036 11.506-.542 13.192-.13.433-.528.712-.958.712z"}),S.createElement("circle",{fill:"#5C913B",cx:25.5,cy:9.5,r:1.5}),S.createElement("circle",{fill:"#9266CC",cx:2,cy:18,r:2}),S.createElement("circle",{fill:"#5C913B",cx:32.5,cy:19.5,r:1.5}),S.createElement("circle",{fill:"#5C913B",cx:23.5,cy:31.5,r:1.5}),S.createElement("circle",{fill:"#FFCC4D",cx:28,cy:4,r:2}),S.createElement("circle",{fill:"#FFCC4D",cx:32.5,cy:8.5,r:1.5}),S.createElement("circle",{fill:"#FFCC4D",cx:29.5,cy:12.5,r:1.5}),S.createElement("circle",{fill:"#FFCC4D",cx:7.5,cy:23.5,r:1.5})),QVe=t=>S.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 36 36",...t},S.createElement("path",{fill:"#F4900C",d:"M35 19c0-2.062-.367-4.039-1.04-5.868-.46 5.389-3.333 8.157-6.335 6.868-2.812-1.208-.917-5.917-.777-8.164.236-3.809-.012-8.169-6.931-11.794 2.875 5.5.333 8.917-2.333 9.125-2.958.231-5.667-2.542-4.667-7.042-3.238 2.386-3.332 6.402-2.333 9 1.042 2.708-.042 4.958-2.583 5.208-2.84.28-4.418-3.041-2.963-8.333C2.52 10.965 1 14.805 1 19c0 9.389 7.611 17 17 17s17-7.611 17-17z"}),S.createElement("path",{fill:"#FFCC4D",d:"M28.394 23.999c.148 3.084-2.561 4.293-4.019 3.709-2.106-.843-1.541-2.291-2.083-5.291s-2.625-5.083-5.708-6c2.25 6.333-1.247 8.667-3.08 9.084-1.872.426-3.753-.001-3.968-4.007C7.352 23.668 6 26.676 6 30c0 .368.023.73.055 1.09C9.125 34.124 13.342 36 18 36s8.875-1.876 11.945-4.91c.032-.36.055-.722.055-1.09 0-2.187-.584-4.236-1.606-6.001z"})),JVe=t=>S.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 36 36",...t},S.createElement("circle",{fill:"#FFCC4D",cx:18,cy:18,r:18}),S.createElement("path",{fill:"#664500",d:"M18 21c-3.623 0-6.027-.422-9-1-.679-.131-2 0-2 2 0 4 4.595 9 11 9 6.404 0 11-5 11-9 0-2-1.321-2.132-2-2-2.973.578-5.377 1-9 1z"}),S.createElement("path",{fill:"#FFF",d:"M9 22s3 1 9 1 9-1 9-1-2 4-9 4-9-4-9-4z"}),S.createElement("ellipse",{fill:"#664500",cx:12,cy:13.5,rx:2.5,ry:3.5}),S.createElement("ellipse",{fill:"#664500",cx:24,cy:13.5,rx:2.5,ry:3.5})),eqe=t=>S.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 36 36",...t},S.createElement("path",{fill:"#FFCC4D",d:"M36 18c0 9.941-8.059 18-18 18-9.94 0-18-8.059-18-18C0 8.06 8.06 0 18 0c9.941 0 18 8.06 18 18"}),S.createElement("path",{fill:"#664500",d:"M28.457 17.797c-.06-.135-1.499-3.297-4.457-3.297-2.957 0-4.397 3.162-4.457 3.297-.092.207-.032.449.145.591.175.142.426.147.61.014.012-.009 1.262-.902 3.702-.902 2.426 0 3.674.881 3.702.901.088.066.194.099.298.099.11 0 .221-.037.312-.109.177-.142.238-.386.145-.594zm-12 0c-.06-.135-1.499-3.297-4.457-3.297-2.957 0-4.397 3.162-4.457 3.297-.092.207-.032.449.144.591.176.142.427.147.61.014.013-.009 1.262-.902 3.703-.902 2.426 0 3.674.881 3.702.901.088.066.194.099.298.099.11 0 .221-.037.312-.109.178-.142.237-.386.145-.594zM31 16c-.396 0-.772-.238-.929-.629-1.778-4.445-6.223-5.381-6.268-5.391-.541-.108-.893-.635-.784-1.177.108-.542.635-.891 1.177-.784.226.045 5.556 1.168 7.732 6.608.205.513-.045 1.095-.558 1.3-.12.05-.246.073-.37.073zM5 16c-.124 0-.249-.023-.371-.072-.513-.205-.762-.787-.557-1.3 2.176-5.44 7.506-6.563 7.732-6.608.543-.106 1.068.243 1.177.784.108.54-.242 1.066-.781 1.176-.185.038-4.506.98-6.271 5.391-.157.391-.533.629-.929.629zm13 6c-3.623 0-6.027-.422-9-1-.679-.131-2 0-2 2 0 4 4.595 9 11 9 6.404 0 11-5 11-9 0-2-1.321-2.132-2-2-2.973.578-5.377 1-9 1z"}),S.createElement("path",{fill:"#FFF",d:"M9 23s3 1 9 1 9-1 9-1-2 4-9 4-9-4-9-4z"}),S.createElement("path",{fill:"#5DADEC",d:"M10.847 28.229c-.68 2.677-3.4 4.295-6.077 3.615-2.676-.679-4.295-3.399-3.616-6.076.679-2.677 6.337-8.708 7.307-8.462.97.247 3.065 8.247 2.386 10.923zm14.286 0c.68 2.677 3.4 4.295 6.077 3.615 2.677-.679 4.296-3.399 3.616-6.076-.68-2.677-6.338-8.708-7.308-8.462-.968.247-3.064 8.247-2.385 10.923z"})),tqe=t=>S.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 36 36",...t},S.createElement("path",{fill:"#FFCC4D",d:"M36 18c0 9.941-8.059 18-18 18-9.94 0-18-8.059-18-18C0 8.06 8.06 0 18 0c9.941 0 18 8.06 18 18"}),S.createElement("path",{fill:"#664500",d:"M28.457 17.797c-.06-.135-1.499-3.297-4.457-3.297-2.957 0-4.397 3.162-4.457 3.297-.092.207-.032.449.145.591.175.142.426.147.61.014.012-.009 1.262-.902 3.702-.902 2.426 0 3.674.881 3.702.901.088.066.194.099.298.099.11 0 .221-.037.312-.109.177-.142.238-.386.145-.594zm-12 0c-.06-.135-1.499-3.297-4.457-3.297-2.957 0-4.397 3.162-4.457 3.297-.092.207-.032.449.144.591.176.142.427.147.61.014.013-.009 1.262-.902 3.703-.902 2.426 0 3.674.881 3.702.901.088.066.194.099.298.099.11 0 .221-.037.312-.109.178-.142.237-.386.145-.594zM18 22c-3.623 0-6.027-.422-9-1-.679-.131-2 0-2 2 0 4 4.595 9 11 9 6.404 0 11-5 11-9 0-2-1.321-2.132-2-2-2.973.578-5.377 1-9 1z"}),S.createElement("path",{fill:"#FFF",d:"M9 23s3 1 9 1 9-1 9-1-2 4-9 4-9-4-9-4z"})),nqe=t=>S.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 36 36",...t},S.createElement("path",{fill:"#FFCC4D",d:"M36 18c0 9.941-8.059 18-18 18-9.94 0-18-8.059-18-18C0 8.06 8.06 0 18 0c9.941 0 18 8.06 18 18"}),S.createElement("ellipse",{fill:"#664500",cx:11.5,cy:17,rx:2.5,ry:3.5}),S.createElement("ellipse",{fill:"#664500",cx:24.5,cy:17,rx:2.5,ry:3.5}),S.createElement("path",{fill:"#664500",d:"M5.999 13.5c-.208 0-.419-.065-.599-.2-.442-.331-.531-.958-.2-1.4 3.262-4.35 7.616-4.4 7.8-4.4.552 0 1 .448 1 1 0 .551-.445.998-.996 1-.155.002-3.568.086-6.204 3.6-.196.262-.497.4-.801.4zm24.002 0c-.305 0-.604-.138-.801-.4-2.641-3.521-6.061-3.599-6.206-3.6-.55-.006-.994-.456-.991-1.005.003-.551.447-.995.997-.995.184 0 4.537.05 7.8 4.4.332.442.242 1.069-.2 1.4-.18.135-.39.2-.599.2zm-6.516 14.879C23.474 28.335 22.34 24 18 24s-5.474 4.335-5.485 4.379c-.053.213.044.431.232.544.188.112.433.086.596-.06C13.352 28.855 14.356 28 18 28c3.59 0 4.617.83 4.656.863.095.09.219.137.344.137.084 0 .169-.021.246-.064.196-.112.294-.339.239-.557z"}),S.createElement("path",{fill:"#5DADEC",d:"M16 31c0 2.762-2.238 5-5 5s-5-2.238-5-5 4-10 5-10 5 7.238 5 10z"})),rqe=t=>S.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 36 36",...t},S.createElement("path",{fill:"#FFCC4D",d:"M36 18c0 9.941-8.059 18-18 18-9.94 0-18-8.059-18-18C0 8.06 8.06 0 18 0c9.941 0 18 8.06 18 18"}),S.createElement("path",{fill:"#BDDDF4",d:"M18 11c8.749 0 16.033 4.509 17.656 10.484.222-1.128.344-2.292.344-3.484 0-9.94-8.059-18-18-18C8.06 0 0 8.06 0 18c0 1.192.123 2.356.344 3.484C1.967 15.509 9.252 11 18 11z"}),S.createElement("ellipse",{fill:"#664500",cx:11.5,cy:16.5,rx:2.5,ry:3.5}),S.createElement("ellipse",{fill:"#664500",cx:24.5,cy:16.5,rx:2.5,ry:3.5}),S.createElement("path",{fill:"#664500",d:"M5.999 12c-.208 0-.419-.065-.599-.2-.442-.331-.531-.958-.2-1.4C8.462 6.05 12.816 6 13 6c.552 0 1 .448 1 1 0 .551-.445.998-.996 1-.155.002-3.568.086-6.204 3.6-.196.262-.497.4-.801.4zm24.002 0c-.305 0-.604-.138-.801-.4-2.64-3.521-6.061-3.598-6.206-3.6-.55-.006-.994-.456-.991-1.005C22.006 6.444 22.45 6 23 6c.184 0 4.537.05 7.8 4.4.332.442.242 1.069-.2 1.4-.18.135-.39.2-.599.2zm-6.516 15.879C23.474 27.835 22.34 23.5 18 23.5s-5.474 4.335-5.485 4.379c-.053.213.043.431.231.544.187.112.433.086.596-.06.011-.008 1.015-.863 4.658-.863 3.589 0 4.617.83 4.656.863.095.09.219.137.344.137.084 0 .169-.021.246-.064.196-.112.294-.339.239-.557z"})),sqe=t=>S.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 36 36",...t},S.createElement("circle",{fill:"#FFCC4D",cx:18,cy:18,r:18}),S.createElement("path",{fill:"#664500",d:"M25.485 27.379C25.44 27.2 24.317 23 18 23c-6.318 0-7.44 4.2-7.485 4.379-.055.217.043.442.237.554.195.111.439.078.6-.077C11.371 27.837 13.306 26 18 26s6.63 1.837 6.648 1.855c.096.095.224.145.352.145.084 0 .169-.021.246-.064.196-.112.294-.339.239-.557z"}),S.createElement("ellipse",{fill:"#664500",cx:12,cy:13.5,rx:2.5,ry:3.5}),S.createElement("ellipse",{fill:"#664500",cx:24,cy:13.5,rx:2.5,ry:3.5})),oqe=t=>S.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 36 36",...t},S.createElement("circle",{fill:"#FFCC4D",cx:18,cy:18,r:18}),S.createElement("path",{fill:"#664500",d:"M10.515 23.621C10.56 23.8 11.683 28 18 28c6.318 0 7.44-4.2 7.485-4.379.055-.217-.043-.442-.237-.554-.195-.111-.439-.078-.6.077C24.629 23.163 22.694 25 18 25s-6.63-1.837-6.648-1.855C11.256 23.05 11.128 23 11 23c-.084 0-.169.021-.246.064-.196.112-.294.339-.239.557z"}),S.createElement("ellipse",{fill:"#664500",cx:12,cy:13.5,rx:2.5,ry:3.5}),S.createElement("ellipse",{fill:"#664500",cx:24,cy:13.5,rx:2.5,ry:3.5})),iqe=t=>S.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 36 36",...t},S.createElement("path",{fill:"#DD2E44",d:"M35.885 11.833c0-5.45-4.418-9.868-9.867-9.868-3.308 0-6.227 1.633-8.018 4.129-1.791-2.496-4.71-4.129-8.017-4.129-5.45 0-9.868 4.417-9.868 9.868 0 .772.098 1.52.266 2.241C1.751 22.587 11.216 31.568 18 34.034c6.783-2.466 16.249-11.447 17.617-19.959.17-.721.268-1.469.268-2.242z"})),aqe={fire:QVe,party:ZVe,pray:XVe,ok:WVe,thumbsUp:YVe,thumbsDown:GVe,wave:qVe,smile:oqe,sad:sqe,grin:JVe,laugh:eqe,crazy:KVe,smileBig:tqe,scared:rqe,cry:nqe,heart:iqe};function DU(t){const e=me.c(5),{name:n,size:r,className:s}=t,o=r===void 0?18:r,i=aqe[n];let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a={display:"inline-block",verticalAlign:"-0.15em"},e[0]=a):a=e[0];let l;return e[1]!==i||e[2]!==s||e[3]!==o?(l=d.jsx(i,{width:o,height:o,className:s,style:a}),e[1]=i,e[2]=s,e[3]=o,e[4]=l):l=e[4],l}const IU=["fire","heart","party","pray","ok","thumbsUp","thumbsDown","wave","smile","sad","grin","smileBig","laugh","crazy","scared","cry"];function lqe({onSelect:t}){const[e,n]=S.useState(!1),[r,s]=S.useState(null),[o,i]=S.useState([]),a=cs(),l=S.useRef(null),c=S.useRef(null),u=re(pMe),f=h=>{t(h),n(!1),s(h)};return S.useEffect(()=>()=>{a(dMe())},[a]),S.useEffect(()=>{u&&i(u)},[u]),S.useEffect(()=>{const h=m=>{l.current&&!l.current.contains(m.target)&&c.current&&!c.current.contains(m.target)&&n(!1)};return document.addEventListener("mousedown",h),()=>{document.removeEventListener("mousedown",h)}},[]),d.jsxs("div",{style:{position:"relative",display:"flex",alignItems:"center",justifyContent:"flex-end",width:"100%"},children:[d.jsxs(ve,{gap:2,style:{display:"flex",width:"100%",marginBottom:"10px",alignItems:"center",justifyContent:"flex-start"},children:[o.map(h=>{const m=IU[h.Type];return d.jsxs(Ve,{onClick:()=>f(h.Type),style:{backgroundColor:r===h.Type?" #A5D8FF":"#E8F5FF",borderRadius:"20px",border:"none",margin:2,padding:"10px 25px",cursor:"pointer",outline:"none"},size:"lg",children:[d.jsx("span",{style:{padding:2,display:"inline-flex",alignItems:"center"},children:d.jsx(DU,{name:m,size:16})}),d.jsx("span",{style:{padding:2,fontWeight:"bold"},children:h.Count})]},h.Id+h.Type)}),d.jsx(Ve,{ref:l,onClick:()=>{n(!e)},style:{...RU,backgroundColor:"transparent",fontSize:"24px",cursor:"pointer",borderRadius:"20px",height:"33px",minWidth:"35px",maxWidth:"35px",padding:"0",border:"1px solid #E6E9EC"},variant:"transparent",color:"gray",children:d.jsx(D_,{style:{...RU},stroke:1})})]}),e&&d.jsx(xd,{ref:c,shadow:"xs",style:{position:"absolute",bottom:50,left:10,zIndex:10,width:"auto",backgroundColor:"white",borderRadius:"10px",padding:"10px",boxShadow:"0px 0px 5px rgba(0, 0, 0, 0.2)"},children:d.jsx(ve,{align:"center",gap:3,style:{overflowY:"hidden",display:"flex",justifyContent:"center"},children:IU.map((h,m)=>d.jsx(yt,{size:"compact-md",onMouseDown:y=>{y.preventDefault()},onClick:()=>{f(m)},style:{...VVe,fontSize:"24px"},children:d.jsx(DU,{name:h,size:24})},h))})})]})}const ay=(t,e)=>{const n={};return t.forEach((r,s)=>{const o=r;o&&(n[e[s].Id]=o.offsetWidth<o.scrollWidth)}),n},md="/assets/404-UrtAkgnB.png";class Nd extends S.Component{constructor(n){super(n);kv(this,"handleRefresh",()=>{window.location.href="/"});this.state={hasError:!1}}static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(n,r){console.error("❌🚨Error caught by error boundary🚨❌:",n,`
ℹ️ ERROR INFO----> ℹ️`,r)}render(){return this.state.hasError?d.jsx(jl,{children:d.jsx(Oc,{heading:vn.t("warningBoundaryText.heading"),description:vn.t("warningBoundaryText.description4"),handleButtonClick:this.handleRefresh,buttonText:vn.t("warningBoundaryText.button"),img:md})}):this.props.children}}var Rx=(t=>(t[t.Unknown=0]="Unknown",t[t.File=1]="File",t[t.Document=2]="Document",t[t.Directory=3]="Directory",t[t.Customer=4]="Customer",t[t.User=5]="User",t[t.Favorite=6]="Favorite",t[t.Event=7]="Event",t[t.Call=8]="Call",t[t.Visitor=9]="Visitor",t[t.Reception=10]="Reception",t[t.Birthday=11]="Birthday",t[t.Meeting=12]="Meeting",t[t.Calendar=14]="Calendar",t[t.Contact=15]="Contact",t[t.Application=16]="Application",t[t.UserGroup=17]="UserGroup",t[t.ClientApplication=18]="ClientApplication",t[t.OfflineDocument=30]="OfflineDocument",t[t.EmailFolder=31]="EmailFolder",t[t.EmailMessage=32]="EmailMessage",t[t.EmailAttachment=33]="EmailAttachment",t[t.Role=34]="Role",t[t.EventParticipant=35]="EventParticipant",t[t.AddressBook=36]="AddressBook",t))(Rx||{});const Zg=t=>{const e=me.c(7),{clearCheckedList:n,checkedMessagesIds:r,message:s,loading:o}=t,i=()=>{let l=!1;return s||(l=!0),l&&r&&r.length>=1};if(o){let l;return e[0]===Symbol.for("react.memo_cache_sentinel")?(l=d.jsx(xe,{justify:"center",h:"100%",pt:100,sx:{flexGrow:1}}),e[0]=l):l=e[0],l}if(i()&&n&&r){const l=r==null?void 0:r.length;let c;return e[1]!==n||e[2]!==l?(c=d.jsx(cqe,{listLength:l,clearCheckedList:n}),e[1]=n,e[2]=l,e[3]=c):c=e[3],c}if(!s){let l;return e[4]===Symbol.for("react.memo_cache_sentinel")?(l=d.jsx(uqe,{}),e[4]=l):l=e[4],l}let a;return e[5]!==s?(a=d.jsx(Nd,{children:d.jsx(dqe,{message:s})}),e[5]=s,e[6]=a):a=e[6],a},cqe=t=>{const e=me.c(16),{t:n}=Le();let r;e[0]!==t.listLength||e[1]!==n?(r=t.listLength>1?`${n("messages.chainsSelected")}: ${t.listLength}`:`${n("messages.chainSelected")}: ${t.listLength}`,e[0]=t.listLength,e[1]=n,e[2]=r):r=e[2];let s;e[3]!==r?(s=d.jsx(ue,{size:"18px",ta:"center",fw:500,mt:20,children:r}),e[3]=r,e[4]=s):s=e[4];let o;e[5]===Symbol.for("react.memo_cache_sentinel")?(o={fontWeight:500},e[5]=o):o=e[5];let i;e[6]!==t?(i=()=>t.clearCheckedList(),e[6]=t,e[7]=i):i=e[7];let a;e[8]!==n?(a=n("cancelSelection"),e[8]=n,e[9]=a):a=e[9];let l;e[10]!==i||e[11]!==a?(l=d.jsx(yt,{variant:"outline",size:"md",sx:o,w:260,mt:20,radius:"md",onClick:i,children:a}),e[10]=i,e[11]=a,e[12]=l):l=e[12];let c;return e[13]!==s||e[14]!==l?(c=d.jsxs(toe,{children:[s,l]}),e[13]=s,e[14]=l,e[15]=c):c=e[15],c},uqe=()=>{const t=me.c(5),{t:e}=Le(),r=xt(1024)?"md":"18px";let s;t[0]!==e?(s=e("messages.chainsNotSelected"),t[0]=e,t[1]=s):s=t[1];let o;return t[2]!==s||t[3]!==r?(o=d.jsx(toe,{children:d.jsx(ue,{size:r,ta:"center",w:"70%",fw:500,mt:20,children:s})}),t[2]=s,t[3]=r,t[4]=o):o=t[4],o},dqe=({message:t})=>{var Ye,ge,Fe,Se,qe,ot;const[e,n]=S.useState(!1),[r,s]=S.useState(!1),[o,i]=S.useState(null),[a,l]=S.useState({}),c=sr(),u=zt(),{t:f}=Le(),h=re(zr),m=re(oee),y=re(sp),v=c.emailId?+c.emailId:(Ye=h==null?void 0:h.find($e=>$e.Id===(t==null?void 0:t.FolderId)))==null?void 0:Ye.UserEmailId,b=v?(m==null?void 0:m[Number(v)])===t.FolderId:m?Object.values(m).includes(t.FolderId):!1,w=ts(),C=xt(1024),k=xt(475),E=re(qa),j=re(Bm),A=re(eR),{selected:M,prepareData:_}=Kte(t.From.Address),R=typeof(M==null?void 0:M.Name)=="string"&&!M.Name.includes("@")?M.Name:t.From.Name||t.From.Address,N=I2(w,y,t.FolderId),z=()=>n($e=>!$e),B=h.find($e=>$e.Id===t.FolderId),L=(B==null?void 0:B.label)||"",P=ey(t.Date,!0,j),I=Mr(),{highlightStrings:H}=br($e=>$e.search),{read:$}=Ol((ge=h==null?void 0:h.find($e=>$e.Id===(t==null?void 0:t.FolderId)))==null?void 0:ge.UserEmailId),V=S.useRef([]),q=S.useCallback($e=>pt=>{V.current[$e]=pt},[]),U=BD(H),W=UVe(t),Y=$R({address:t.From.Address,folderId:t.FolderId,name:t.From.Name||t.From.Address,fromMessageHeader:!0}),G=t.Subject.trim()||`(${f("noTheme")})`,K=!!((Fe=t.Children)!=null&&Fe.length),Q=zR(t),Z=OS(t),J=IS(t),{onEditClick:ne}=roe(t),se=S.useRef(null),ce=S.useRef(null);qte((Se=se.current)==null?void 0:Se.shadowRoot);const fe=Object.values(H_),le=()=>{Gte(ce.current)},be=async $e=>{IR({attachmentId:$e.Id})},je=S.useCallback(async $e=>{await u(cMe({Id:t.Id,entityType:Rx.EmailMessage,type:$e})),u(bT({Id:t.Id,entityType:Rx.EmailMessage}))},[u,t.Id]),pe=async $e=>{const pt=await DJ({folderId:Ce.current,messageId:t.Id,fileName:$e.FileName});I.success(`${f("notifications.messages.savingFile",{data:pt.data.Description})}`)},_e=async $e=>{if(!t)return;const pt=await AJ({folderId:Ce.current,Id:t.Id,FileName:$e.FileName}),gt=document.createElement("a");gt.download=$e.FileName,gt.href=URL.createObjectURL(pt.data),gt.click(),URL.revokeObjectURL(gt.href)},Ce=S.useRef(t.FolderId),{toggleImportant:Te}=soe({messageId:t.Id,folderId:t.FolderId,important:t.Important,shouldUpdateMessages:!1,stopPropagation:!1}),Ae=async $e=>{var gt;const pt=(gt=E==null?void 0:E.ModuleUrls.find(Pt=>Pt.Name==="Calendar"))==null?void 0:gt.Url;window.open(`${pt}/event/new_event?folderId=${t.FolderId}&externalId=${t.ExternalId}&FileName=${$e}`)},Ze=noe(t),He=S.useMemo(()=>d.jsx(ve,{justify:"space-between",children:d.jsxs(ve,{gap:4,sx:{flexGrow:1},children:[U&&d.jsx(on,{position:"bottom-start",label:d.jsx("div",{children:L}),pos:"fixed",zIndex:1,children:d.jsx(Bc,{variant:"light",color:"gray",sx:PD,children:d.jsx(ue,{truncate:"end",lineClamp:1,fz:10,fw:500,sx:{display:"block",lineHeight:"20px",textTransform:"uppercase"},children:L})})}),Ze.length&&Ze.map(($e,pt)=>d.jsx(eoe,{item:$e,onDelete:W,isTruncated:a[$e.Id],labelRef:q(pt)},$e.Id))]})}),[W,a,Ze,L]);S.useEffect(()=>{if(!Ze||Ze.length===0)return;const $e=ay(V.current,Ze);l($e)},[Ze]),S.useEffect(()=>{var Yt;if(t&&u(bT({Id:t.Id,entityType:Rx.EmailMessage})),!se.current)return;const $e=((Yt=se.current)==null?void 0:Yt.shadowRoot)??se.current.attachShadow({mode:"open"});let pt=t.HtmlBody?t.HtmlBody:t.Body?t.Body.replace(/\r\n|\n|\r/g,"<br />"):"";pt=Yte(pt,H),pt=`
      <div style="padding: 0 16px;">
        ${pt}
      </div>
    `,pt=pt.replaceAll("9aa0a6","3c4043").replaceAll("bdc1c6","3c4043").replaceAll("e8eaed","3c4043").replaceAll("<p>",'<p style="margin: 0; padding: 0; word-wrap: break-word;">').replaceAll("</p>","<br></p>").replaceAll("<img ",'<img style="object-fit: contain; max-width: 100%; height: auto; border: none" ');const gt=document.createElement("div");gt.innerHTML=Lte.sanitize(pt,{ADD_ATTR:["target","rel"],ALLOW_DATA_ATTR:!0});const Pt=document.createElement("textarea"),at=document.createTreeWalker(gt,NodeFilter.SHOW_TEXT);let nt;for(;nt=at.nextNode();)Pt.innerHTML=nt.nodeValue??"",nt.nodeValue=Pt.value;$e.replaceChildren(...gt.childNodes);const We=(Vt,Nt)=>{Vt.forEach(Ht=>{Object.assign(Ht.style,Nt)})};$e.querySelectorAll("span[data-attachment-link]").forEach(Vt=>{Vt.onmouseover=null,Vt.onmouseout=null});const St=$e.querySelectorAll(".gmail_drive_chip img");We(St,Wi.googleImage);const Ot=$e.querySelectorAll("img[data-loader]");We(Ot,Wi.loaderImg);const Tt=$e.querySelectorAll("span[data-size]");We(Tt,Wi.size);const kt=$e.querySelectorAll("span[data-file-type]");We(kt,Wi.icons);const jt=$e.querySelectorAll("span a");We(jt,Wi.link);const vt=$e.querySelectorAll('img[alt="close"]');We(vt,Wi.closeButton)},[t,u,H]),S.useEffect(()=>{Ce.current=t.FolderId},[t.Subject,t.HtmlBody,t.Body]);const lt=()=>{n(!1),s(!1),i(null)};return S.useEffect(()=>{const $e=ce.current;return $e&&$e.addEventListener("scroll",lt),()=>{$e&&$e.removeEventListener("scroll",lt)}},[]),S.useEffect(()=>{_()},[t.From.Address]),S.useEffect(()=>{v!=null&&u(PTe(v))},[v,u]),d.jsxs(bt,{ref:ce,className:C?"":Gf.customScrollbar,sx:{overflowY:"auto",padding:window.innerWidth<1024?"0":"20px 0px 0px",display:"flex",gap:K?"0":"20px",flexDirection:"column",width:"100%",height:"100%"},children:[d.jsx(bt,{gap:0,sx:{padding:0},children:d.jsxs(bt,{sx:{flexGrow:1},children:[d.jsxs(ve,{wrap:"nowrap",align:"flex-start",justify:"space-between",sx:{marginTop:C?"20px":0,padding:"0 16px 10px"},children:[d.jsxs(xe,{gap:"xs",align:"center",wrap:"wrap",children:[d.jsx(Mo,{fz:18,highlight:H,sx:{wordBreak:"break-word"},children:G}),He]}),d.jsx(ve,{sx:{flexWrap:"nowrap"},children:b&&d.jsx(yt,{size:"sm",variant:"light",className:"noprint",leftSection:d.jsx(Y4,{stroke:1.5,size:18}),onClick:ne,styles:{label:{fontSize:"12px"}},children:f("edit")})})]}),t.EventInviteStatus>0&&d.jsx(DVe,{isChainsView:K,opened:r,setOpened:s,state:t.EventInviteStatus,messageId:t.Id,attachments:t.Attachments,handleAddToCalendar:Ae}),!K&&d.jsxs(xe,{align:"flex-start",sx:{flexGrow:1,padding:"0 16px"},children:[d.jsx(Oo,{itemEmail:t.From.Address,itemTitle:t.From.Name,children:d.jsx("span",{style:{display:"flex",marginRight:"13px"},children:d.jsx(cp,{label:R,size:48,item:M})})}),d.jsxs(bt,{gap:4,miw:100,sx:{flexGrow:1,marginTop:"2px"},children:[d.jsxs(ve,{wrap:"nowrap",gap:"sm",justify:"space-between",mr:C?0:"-7px",children:[d.jsx(Oo,{itemEmail:t.From.Address,itemTitle:t.From.Name,children:d.jsxs(ie,{sx:{display:"grid",gridTemplateColumns:"auto auto",alignItems:"center"},children:[d.jsx(Mo,{fw:700,fz:14,lineClamp:1,highlight:H,component:"div",sx:{display:"block",whiteSpace:"nowrap"},children:Y}),C&&d.jsx("span",{style:{marginLeft:"10px",fontSize:"11px",color:"#909296",flexShrink:0,alignSelf:"flex-end",fontWeight:"400",lineHeight:"2"},children:P})]})}),!$&&d.jsxs(ve,{gap:"xs",sx:{alignSelf:"flex-end",alignItems:"center",flexShrink:0},children:[!N&&d.jsx(on,{label:t.Important?f("markAsUnImportant"):f("markAsImportant"),children:d.jsx(Ve,{size:20,onClick:Te,children:d.jsx(ie,{component:Ku,stroke:1.5,size:20,sx:$e=>({width:"20px",height:"20px",stroke:t.Important?$e.colors.red[6]:"",fill:t.Important?$e.colors.red[6]:""})})})}),!N&&d.jsxs(d.Fragment,{children:[!b&&d.jsx(on,{label:f("reply"),children:d.jsx(Ve,{size:20,onClick:()=>Q(),children:d.jsx(g3,{stroke:1.5,size:20})})}),d.jsx(Pte,{message:t,handlePrint:le,isDraftFolder:b,opened:e,toggleMenuOpened:z})]})]})]}),d.jsxs(ve,{wrap:"nowrap",gap:"30px",justify:"space-between",mt:-4,children:[d.jsx(ie,{w:0,sx:{flexGrow:1},children:d.jsx(Vte,{message:t})}),!C&&d.jsx(ue,{fz:12,sx:{alignSelf:"flex-start",color:"#909296",flexShrink:0},children:P})]})]})]})]})}),t.SendTime&&d.jsx(IVe,{messageId:t.Id,sendTime:t.SendTime}),((w==null?void 0:w.Type)===Je.SNOOZED||(B==null?void 0:B.Type)===Je.SNOOZED)&&d.jsx(HVe,{messageId:t.Id,folderId:t.FolderId,snoozeUntilUtc:((qe=A[t.Id])==null?void 0:qe.SnoozeUntilUtc)??null}),!!((ot=t.Attachments)!=null&&ot.length)&&d.jsx(ve,{gap:"xs",className:"noprint",sx:{padding:"0 16px"},children:!K&&t.Attachments.map(($e,pt)=>d.jsxs(ve,{onClick:()=>{if($e.FileName.indexOf("ics")===-1&&fe.find(gt=>gt.mimeType===$e.MimeType))return be($e)},wrap:"nowrap",h:40,w:"100%",maw:300,pl:6,pr:6,gap:0,align:"center",sx:gt=>({cursor:"pointer",justifyContent:"space-between",flexWrap:"nowrap",span:{marginRight:0},backgroundColor:"#9EAEC31C",borderRadius:gt.radius.sm,transition:"0.3s","@media (min-width: 1025px)":{"&:hover":{backgroundColor:"#9eaec336"}}}),children:[d.jsx(on,{label:$e.FileName,children:d.jsxs(xe,{justify:"space-between",align:"center",sx:{width:"calc(100% - 75px)",flex:"1 1 100%",marginRight:5},children:[d.jsxs(xe,{justify:"flex-start",align:"center",w:"100%",gap:5,sx:{overflow:"hidden"},children:[Qu($e.MimeType),d.jsx(ue,{truncate:"end",c:"#343A40",mt:1,fz:14,size:"xs",children:$e.FileName})]}),d.jsx(ue,{fz:12,ml:10,c:"dimmed",sx:{whiteSpace:"nowrap"},children:Xm($e.Size)})]})}),d.jsx(Fte,{attachment:$e,handleAttachmentOpen:be,handleAttachmentDownload:_e,handleAttachmentToDisk:pe,handleAttachmentToCalendar:Ae,supportedList:fe})]},pt))}),d.jsx(ve,{sx:{flex:1,alignItems:"flex-start",alignContent:"flex-start",padding:"0px"},children:K?d.jsx(ie,{w:"100%",children:d.jsx(yOe,{folderId:t.FolderId,message:t,openedChainMenuIndex:o,setOpenedChainMenuIndex:i})}):d.jsx(ie,{ref:se,w:"100%",sx:{padding:"0 0 20px 0",overflow:"auto"}})}),!b&&!N&&!$&&d.jsx(ve,{className:"noprint",sx:{gap:"10px",padding:C?"0 15px 15px":"0 16px 20px"},children:d.jsxs(xe,{justify:"space-between",w:"100%",direction:"column-reverse",children:[d.jsxs(ve,{sx:{display:"flex",justifyContent:"flex-start"},children:[d.jsx(yt,{variant:"outline",leftSection:d.jsx(ie,{component:g3,stroke:1.5,size:20}),onClick:()=>Q(),h:k?45:35,px:15,py:5,styles:{inner:{svg:{marginRight:k?"0":"10px"},span:{marginRight:"0px",fontWeight:700},flexDirection:k?"column":"inherit"},label:{fontSize:"12px"}},children:f("reply")}),d.jsx(yt,{variant:"outline",onClick:()=>Z(),leftSection:d.jsx(ie,{component:V4,stroke:1.5,size:20,sx:{marginRight:"0px !important",span:{marginRight:"10px !important",fontSize:"12px"}}}),h:k?45:35,px:15,py:5,styles:{inner:{svg:{marginRight:k?"0":"10px"},span:{marginRight:"0px",fontWeight:700},flexDirection:k?"column":"inherit"},label:{fontSize:"12px"}},children:f("replyToAll")}),d.jsx(yt,{variant:"outline",onClick:()=>J(),leftSection:d.jsx(ie,{component:q4,stroke:1.5,size:20}),h:k?45:35,px:15,py:5,styles:{inner:{svg:{marginRight:k?"0":"10px"},span:{marginRight:"0px",fontWeight:700},flexDirection:k?"column":"inherit"},label:{fontSize:"12px"}},children:f("forward")})]}),d.jsx(lqe,{onSelect:je})]})}),d.jsx(ie,{display:"none",children:d.jsx(xe,{direction:"column",sx:$e=>({borderTop:`1px solid ${$e.colors.gray[3]}`}),children:fqe.map(($e,pt)=>d.jsxs(xe,{py:"sm",gap:"sm",sx:gt=>({borderBottom:`1px solid ${gt.colors.gray[3]}`}),children:[d.jsx(Pc,{color:"blue",radius:"xl",size:40,children:"S"}),d.jsxs(xe,{direction:"column",children:[d.jsxs(xe,{align:"center",gap:"sm",children:[d.jsx(ue,{fw:700,children:$e.from}),d.jsx(ue,{c:"dimmed",fz:13,children:$e.date})]}),d.jsx(ue,{c:"dimmed",fz:"sm",children:$e.short})]}),d.jsxs(xe,{ml:"auto",children:[d.jsx(Ve,{children:d.jsx(D2,{stroke:1.5,size:20})}),d.jsx(Ve,{children:d.jsx(ie,{component:Ku,stroke:1.5,sx:gt=>({width:"17px",height:"17px",stroke:t.Important?gt.colors.red[6]:"",fill:t.Important?gt.colors.red[6]:""})})})]})]},pt))})})]})},fqe=[],pqe={width:450,height:400},hqe={width:800,height:600},mqe={width:2170},gqe=[{direction:"top",style:{top:0,left:"10px",right:"10px",height:"10px",cursor:"ns-resize",zIndex:101}},{direction:"bottom",style:{bottom:0,left:"10px",right:"10px",height:"10px",cursor:"ns-resize",zIndex:101}},{direction:"left",style:{top:"10px",bottom:"10px",left:0,width:"10px",cursor:"ew-resize",zIndex:101}},{direction:"right",style:{top:"10px",bottom:"10px",right:0,width:"10px",cursor:"ew-resize",zIndex:101}},{direction:"top-left",style:{top:0,left:0,width:"10px",height:"10px",cursor:"nwse-resize",zIndex:111}},{direction:"top-right",style:{top:0,right:0,width:"10px",height:"10px",cursor:"nesw-resize",zIndex:111}},{direction:"bottom-left",style:{bottom:0,left:0,width:"10px",height:"10px",cursor:"nesw-resize",zIndex:111}},{direction:"bottom-right",style:{bottom:0,right:0,width:"10px",height:"10px",cursor:"nwse-resize",zIndex:111}}],yqe=({size:t,setCoords:e})=>{const n=()=>{requestAnimationFrame(()=>{const r=window.innerWidth-t.width,s=window.innerHeight-t.height;e(o=>{const i=Math.min(r,Math.max(0,o.x)),a=Math.min(s,Math.max(0,o.y));return{x:i,y:a}})})};return S.useEffect(()=>(window.addEventListener("resize",n),()=>{window.removeEventListener("resize",n)}),[t.width,t.height]),{handleBrowserResize:n}},vqe=t=>{const e=me.c(10),{windows:n,id:r,updateWindow:s,setCoords:o,setPrevCoords:i,size:a,minSize:l,activeModalWindow:c,dragEmptyHeaderHeight:u}=t;let f;e[0]!==(c==null?void 0:c.isMinimize)||e[1]!==u||e[2]!==r||e[3]!==l||e[4]!==o||e[5]!==i||e[6]!==a||e[7]!==s||e[8]!==n?(f={onDragStart(h){h.active.id===r&&(n.forEach(m=>s(m.id,{isActive:!1,hasMoved:!1})),s(r,{hasMoved:!0,isActive:!0}))},onDragEnd(h){h.active.id===r&&(s(r,{hasMoved:!1,isActive:!0}),o(m=>{const y=m.x+h.delta.x,v=m.y+h.delta.y,b=Math.max(0,Math.min(y,window.innerWidth-(c!=null&&c.isMinimize?l.width:a.width))),w=Math.max(0,Math.min(v,window.innerHeight-(c!=null&&c.isMinimize?u:a.height))),C={x:b,y:w};return i(C),C}))}},e[0]=c==null?void 0:c.isMinimize,e[1]=u,e[2]=r,e[3]=l,e[4]=o,e[5]=i,e[6]=a,e[7]=s,e[8]=n,e[9]=f):f=e[9],Mee(f)},bqe=({size:t,setSize:e,coords:n,setCoords:r,minSize:s})=>({handleResizePressure:i=>a=>{a.stopPropagation(),a.preventDefault();const l=a.pageX,c=a.pageY,u=t.width,f=t.height,h=n.x,m=n.y,y=b=>{b.preventDefault();let w=u,C=f,k=h,E=m;const j=b.pageX-l,A=b.pageY-c;if(i.includes("right")){const M=window.innerWidth-h;w=Math.min(M,Math.max(s.width,u+j))}if(i.includes("left")){const M=u+h,_=u-j,D=Math.min(M,_);w=Math.max(s.width,D);const R=w-u;k=h-R,k=Math.max(0,k)}if(i.includes("bottom")){const M=window.innerHeight-m;C=Math.min(M,Math.max(s.height,f+A))}if(i.includes("top")){const M=f+m,_=f-A,D=Math.min(M,_);C=Math.max(s.height,D);const R=C-f;E=m-R,E=Math.max(0,E)}e({width:w,height:C}),r({x:k,y:E})},v=()=>{document.removeEventListener("mousemove",y),document.removeEventListener("mouseup",v)};document.addEventListener("mousemove",y),document.addEventListener("mouseup",v)}}),xqe=(t,e,n,r)=>n==="bottom-right"?{x:Math.max(0,window.innerWidth-t-20-r),y:Math.max(0,window.innerHeight-e-20-r)}:{x:Math.max(0,window.innerWidth/2-t/2),y:Math.max(0,window.innerHeight/2-e/2)},ooe=t=>{const{index:e=0,id:n,minSize:r=pqe,initialSize:s=hqe,position:o="",children:i,header:a,footer:l,showHeader:c,showFooter:u,showResizeHandle:f,withBorder:h,dragEmptyHeaderHeight:m=0,dragEmptyHeader:y,sendModalWindowId:v}=t,b=S.useContext(Mi),{windows:w=[],updateWindow:C=()=>{}}=b||{},k=w.find(J=>J.id===v),[E,j]=S.useState(s),{attributes:A,listeners:M,setNodeRef:_,transform:D}=mS({id:n}),R=S.useRef(null),N=S.useRef(null),[z,B]=S.useState(null),L=20*e,[P,I]=S.useState(xqe(s.width,s.height,o,L)),H=n==="message-card",$={transform:Ic.Translate.toString(D),left:P.x,top:P.y,maxWidth:`calc(100% - ${P.x}px - 15px)`,...E},{handleResizePressure:V}=bqe({size:E,setSize:j,coords:P,setCoords:I,minSize:r});yqe({setCoords:I,size:E}),vqe({id:n,updateWindow:C,setCoords:I,setPrevCoords:B,size:E,minSize:r,activeModalWindow:k,dragEmptyHeaderHeight:m,windows:w});const q=()=>{const J=()=>{R.current&&n===(k==null?void 0:k.id)&&(R.current.style.width=`${mqe.width}px`,R.current.style.height="100%")},ne=()=>{if(R.current){const ce=z?z.x:window.innerWidth-r.width-20-L,fe=z?z.y:window.innerHeight-m-20-L;I({x:ce,y:fe}),R.current.style.width=`${r.width}px`,R.current.style.height=`${m}px`}},se=()=>{if(R.current){k!=null&&k.isMinimize&&B(P);const ce=Math.min(P.x,window.innerWidth-E.width-20),fe=Math.min(P.y,window.innerHeight-E.height-20),le=P.y+E.height>window.innerHeight?window.innerHeight-E.height-20:fe;I({x:ce,y:Math.max(0,le)}),j(E),R.current.style.width=`${E.width}px`,R.current.style.height=`${E.height}px`}};k!=null&&k.isFullScreen&&n===(k==null?void 0:k.id)?J():k!=null&&k.isMinimize&&n===(k==null?void 0:k.id)?ne():se()},U=()=>{w.forEach(J=>C(J.id,{isActive:!1,hasMoved:!1})),C(n,{isActive:!0,hasMoved:!0})},W=({direction:J,style:ne})=>d.jsx("div",{onMouseDown:V(J),style:{position:"absolute",...ne}}),Y=()=>n===(k==null?void 0:k.id)&&(k!=null&&k.isFullScreen)?"static":"absolute",G=()=>k!=null&&k.isActive||k!=null&&k.hasMoved||H?103:k!=null&&k.isMinimize?101:102;S.useEffect(()=>{q()},[n,f,k==null?void 0:k.isFullScreen,k==null?void 0:k.isMinimize]);const K=c?40:0,Q=u?40:0,Z=`calc(100% - ${K+Q}px)`;return S.useEffect(()=>{const J=R.current;if(!J)return;const ne=se=>{var je;if(!(se.key==="ArrowUp"||se.key==="ArrowDown"))return;const fe=document.activeElement,le=fe&&J.contains(fe),be=fe instanceof HTMLInputElement||fe instanceof HTMLTextAreaElement||((je=fe==null?void 0:fe.getAttribute)==null?void 0:je.call(fe,"contenteditable"))==="true";le&&!be&&(se.stopPropagation(),se.preventDefault())};return window.addEventListener("keydown",ne,!0),()=>{window.removeEventListener("keydown",ne,!0)}},[]),S.useEffect(()=>{const J=setTimeout(()=>{var fe,le;if(!H)return;const ne=document.activeElement,se=R.current;ne&&se&&!se.contains(ne)&&"blur"in ne&&((fe=ne.blur)==null||fe.call(ne)),(le=N.current)==null||le.focus()},0);return()=>clearTimeout(J)},[a]),b?d.jsx(xd,{id:n||"draggable-window",withBorder:h,shadow:"0px 15px 30px 0px rgba(16, 24, 40, 0.18)",radius:"md",ref:J=>{_(J),R.current=J},maw:"auto",miw:r.width,mih:r.height,style:$,sx:{position:Y(),zIndex:G(),overflow:n===(k==null?void 0:k.id)?"hidden":"",transform:"translate(0, 0)"},onClick:J=>{J.stopPropagation(),U()},children:d.jsxs("div",{ref:N,tabIndex:-1,style:{outline:"none",height:"inherit"},children:[!c&&y&&d.jsx("div",{...M,...A,style:{position:"absolute",top:0,width:"100%",height:m,zIndex:10}}),c&&d.jsx("div",{...M,...A,style:{height:K},children:a}),d.jsx("div",{style:{height:Z,position:"relative"},children:i}),u&&d.jsx("div",{style:{height:Q},children:l}),!(k!=null&&k.isFullScreen)&&f&&d.jsx(d.Fragment,{children:gqe.map(({direction:J,style:ne})=>d.jsx(W,{direction:J,style:ne},J))})]})}):null},HD="message-card",wqe=()=>{const t=me.c(11),e=zt(),n=re(G_);let r;t[0]!==e?(r=()=>{e(oS()),e(rR(!1))},t[0]=e,t[1]=r):r=t[1];const s=r;if(!n)return null;let o;t[2]===Symbol.for("react.memo_cache_sentinel")?(o={width:"100%"},t[2]=o):o=t[2];let i;t[3]===Symbol.for("react.memo_cache_sentinel")?(i=d.jsx(po,{stroke:1.5,size:"30px"}),t[3]=i):i=t[3];let a;t[4]!==s?(a=d.jsx(ve,{align:"center",bg:"#A2B0C333",style:o,pl:"md",pr:"xs",sx:Sqe,children:d.jsx(Ve,{size:"20px",onClick:s,children:i})}),t[4]=s,t[5]=a):a=t[5];const l=a;let c;t[6]!==n?(c=d.jsx(Nd,{children:d.jsx(Zg,{message:n,loading:!1})}),t[6]=n,t[7]=c):c=t[7];let u;return t[8]!==l||t[9]!==c?(u=d.jsx(ooe,{id:HD,header:l,showHeader:!0,showFooter:!1,showResizeHandle:!0,withBorder:!1,children:c}),t[8]=l,t[9]=c,t[10]=u):u=t[10],u};function Sqe(t){return{height:40,justifyContent:"flex-end",borderTopLeftRadius:"8px",borderTopRightRadius:"8px"}}const vM=40;function Cqe(t){if(!/^[0-9a-zA-Z-]+$/.test(t))throw new Error(`[@mantine/use-form] Form name "${t}" is invalid, it should contain only letters, numbers and dashes`)}const kqe=typeof window<"u"?S.useLayoutEffect:S.useEffect;function Ws(t,e){kqe(()=>{if(t)return window.addEventListener(t,e),()=>window.removeEventListener(t,e)},[t])}function Eqe(t,e){t&&Cqe(t),Ws(`mantine-form:${t}:set-field-value`,n=>e.setFieldValue(n.detail.path,n.detail.value)),Ws(`mantine-form:${t}:set-values`,n=>e.setValues(n.detail)),Ws(`mantine-form:${t}:set-initial-values`,n=>e.setInitialValues(n.detail)),Ws(`mantine-form:${t}:set-errors`,n=>e.setErrors(n.detail)),Ws(`mantine-form:${t}:set-field-error`,n=>e.setFieldError(n.detail.path,n.detail.error)),Ws(`mantine-form:${t}:clear-field-error`,n=>e.clearFieldError(n.detail)),Ws(`mantine-form:${t}:clear-errors`,e.clearErrors),Ws(`mantine-form:${t}:reset`,e.reset),Ws(`mantine-form:${t}:validate`,e.validate),Ws(`mantine-form:${t}:validate-field`,n=>e.validateField(n.detail)),Ws(`mantine-form:${t}:reorder-list-item`,n=>e.reorderListItem(n.detail.path,n.detail.payload)),Ws(`mantine-form:${t}:remove-list-item`,n=>e.removeListItem(n.detail.path,n.detail.index)),Ws(`mantine-form:${t}:insert-list-item`,n=>e.insertListItem(n.detail.path,n.detail.item,n.detail.index)),Ws(`mantine-form:${t}:set-dirty`,n=>e.setDirty(n.detail)),Ws(`mantine-form:${t}:set-touched`,n=>e.setTouched(n.detail)),Ws(`mantine-form:${t}:reset-dirty`,n=>e.resetDirty(n.detail)),Ws(`mantine-form:${t}:reset-touched`,e.resetTouched)}function Tqe(t){return e=>{if(!e)t(e);else if(typeof e=="function")t(e);else if(typeof e=="object"&&"nativeEvent"in e){const{currentTarget:n}=e;n instanceof HTMLInputElement?n.type==="checkbox"?t(n.checked):t(n.value):(n instanceof HTMLTextAreaElement||n instanceof HTMLSelectElement)&&t(n.value)}else t(e)}}function bM(t){return t===null||typeof t!="object"?{}:Object.keys(t).reduce((e,n)=>{const r=t[n];return r!=null&&r!==!1&&(e[n]=r),e},{})}function Mqe(t){const[e,n]=S.useState(bM(t)),r=S.useRef(e),s=S.useCallback(l=>{n(c=>{const u=bM(typeof l=="function"?l(c):l);return r.current=u,u})},[]),o=S.useCallback(()=>s({}),[]),i=S.useCallback(l=>{r.current[l]!==void 0&&s(c=>{const u={...c};return delete u[l],u})},[e]),a=S.useCallback((l,c)=>{c==null||c===!1?i(l):r.current[l]!==c&&s(u=>({...u,[l]:c}))},[e]);return{errorsState:e,setErrors:s,clearErrors:o,setFieldError:a,clearFieldError:i}}function xM(t,e){if(e===null||typeof e!="object")return{};const n={...e};return Object.keys(e).forEach(r=>{r.includes(`${String(t)}.`)&&delete n[r]}),n}function OU(t,e){const n=t.substring(e.length+1).split(".")[0];return parseInt(n,10)}function NU(t,e,n,r){if(e===void 0)return n;const s=`${String(t)}`;let o=n;r===-1&&(o=xM(`${s}.${e}`,o));const i={...o},a=new Set;return Object.entries(o).filter(([l])=>{if(!l.startsWith(`${s}.`))return!1;const c=OU(l,s);return Number.isNaN(c)?!1:c>=e}).forEach(([l,c])=>{const u=OU(l,s),f=l.replace(`${s}.${u}`,`${s}.${u+r}`);i[f]=c,a.add(f),a.has(l)||delete i[l]}),i}function jqe(t,{from:e,to:n},r){const s=`${t}.${e}`,o=`${t}.${n}`,i={...r},a=new Set;return Object.keys(r).forEach(l=>{if(a.has(l))return;let c,u;if(l.startsWith(s)?(c=l,u=l.replace(s,o)):l.startsWith(o)&&(c=l.replace(o,s),u=l),c&&u){const f=i[c],h=i[u];h===void 0?delete i[c]:i[c]=h,f===void 0?delete i[u]:i[u]=f,a.add(c),a.add(u)}}),i}function LU(t,e,n){typeof n.value=="object"&&(n.value=Mh(n.value)),!n.enumerable||n.get||n.set||!n.configurable||!n.writable||e==="__proto__"?Object.defineProperty(t,e,n):t[e]=n.value}function Mh(t){if(typeof t!="object")return t;var e=0,n,r,s,o=Object.prototype.toString.call(t);if(o==="[object Object]"?s=Object.create(t.__proto__||null):o==="[object Array]"?s=Array(t.length):o==="[object Set]"?(s=new Set,t.forEach(function(i){s.add(Mh(i))})):o==="[object Map]"?(s=new Map,t.forEach(function(i,a){s.set(Mh(a),Mh(i))})):o==="[object Date]"?s=new Date(+t):o==="[object RegExp]"?s=new RegExp(t.source,t.flags):o==="[object DataView]"?s=new t.constructor(Mh(t.buffer)):o==="[object ArrayBuffer]"?s=t.slice(0):o.slice(-6)==="Array]"&&(s=new t.constructor(t)),s){for(r=Object.getOwnPropertySymbols(t);e<r.length;e++)LU(s,r[e],Object.getOwnPropertyDescriptor(t,r[e]));for(e=0,r=Object.getOwnPropertyNames(t);e<r.length;e++)Object.hasOwnProperty.call(s,n=r[e])&&s[n]===t[n]||LU(s,n,Object.getOwnPropertyDescriptor(t,n))}return s||t}function ioe(t){return typeof t!="string"?[]:t.split(".")}function vs(t,e){const n=ioe(t);if(n.length===0||typeof e!="object"||e===null)return;let r=e[n[0]];for(let s=1;s<n.length&&r!=null;s+=1)r=r[n[s]];return r}function ly(t,e,n){const r=ioe(t);if(r.length===0)return n;const s=Mh(n);if(r.length===1)return s[r[0]]=e,s;let o=s[r[0]];for(let i=1;i<r.length-1;i+=1){if(o===void 0)return s;o=o[r[i]]}return o[r[r.length-1]]=e,s}function Aqe(t,{from:e,to:n},r){const s=vs(t,r);if(!Array.isArray(s))return r;const o=[...s],i=s[e];return o.splice(e,1),o.splice(n,0,i),ly(t,o,r)}function _qe(t,e,n,r){const s=vs(t,r);if(!Array.isArray(s))return r;const o=[...s];return o.splice(typeof n=="number"?n:o.length,0,e),ly(t,o,r)}function Rqe(t,e,n){const r=vs(t,n);return Array.isArray(r)?ly(t,r.filter((s,o)=>o!==e),n):n}function Dqe(t,e,n,r){const s=vs(t,r);if(!Array.isArray(s)||s.length<=n)return r;const o=[...s];return o[n]=e,ly(t,o,r)}function Iqe({$values:t,$errors:e,$status:n}){const r=S.useCallback((a,l)=>{n.clearFieldDirty(a),e.setErrors(c=>jqe(a,l,c)),t.setValues({values:Aqe(a,l,t.refValues.current),updateState:!0})},[]),s=S.useCallback((a,l)=>{n.clearFieldDirty(a),e.setErrors(c=>NU(a,l,c,-1)),t.setValues({values:Rqe(a,l,t.refValues.current),updateState:!0})},[]),o=S.useCallback((a,l,c)=>{n.clearFieldDirty(a),e.setErrors(u=>NU(a,c,u,1)),t.setValues({values:_qe(a,l,c,t.refValues.current),updateState:!0})},[]),i=S.useCallback((a,l,c)=>{n.clearFieldDirty(a),t.setValues({values:Dqe(a,c,l,t.refValues.current),updateState:!0})},[]);return{reorderListItem:r,removeListItem:s,insertListItem:o,replaceListItem:i}}var A9,$U;function Oqe(){return $U||($U=1,A9=function t(e,n){if(e===n)return!0;if(e&&n&&typeof e=="object"&&typeof n=="object"){if(e.constructor!==n.constructor)return!1;var r,s,o;if(Array.isArray(e)){if(r=e.length,r!=n.length)return!1;for(s=r;s--!==0;)if(!t(e[s],n[s]))return!1;return!0}if(e.constructor===RegExp)return e.source===n.source&&e.flags===n.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===n.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===n.toString();if(o=Object.keys(e),r=o.length,r!==Object.keys(n).length)return!1;for(s=r;s--!==0;)if(!Object.prototype.hasOwnProperty.call(n,o[s]))return!1;for(s=r;s--!==0;){var i=o[s];if(!t(e[i],n[i]))return!1}return!0}return e!==e&&n!==n}),A9}var Nqe=Oqe();const xb=ks(Nqe);function x0(t,e){const n=Object.keys(t);if(typeof e=="string"){const r=n.filter(s=>s.startsWith(`${e}.`));return t[e]||r.some(s=>t[s])||!1}return n.some(r=>t[r])}function Lqe({initialDirty:t,initialTouched:e,mode:n,$values:r}){const[s,o]=S.useState(e),[i,a]=S.useState(t),l=S.useRef(e),c=S.useRef(t),u=S.useCallback(A=>{const M=typeof A=="function"?A(l.current):A;l.current=M,n==="controlled"&&o(M)},[]),f=S.useCallback((A,M=!1)=>{const _=typeof A=="function"?A(c.current):A;c.current=_,(n==="controlled"||M)&&a(_)},[]),h=S.useCallback(()=>u({}),[]),m=S.useCallback(A=>{const M=A?{...r.refValues.current,...A}:r.refValues.current;r.setValuesSnapshot(M),f({})},[]),y=S.useCallback((A,M)=>{u(_=>x0(_,A)===M?_:{..._,[A]:M})},[]),v=S.useCallback((A,M,_)=>{f(D=>x0(D,A)===M?D:{...D,[A]:M},_)},[]),b=S.useCallback((A,M)=>{const _=x0(c.current,A),D=!xb(vs(A,r.getValuesSnapshot()),M),R=xM(A,c.current);R[A]=D,f(R,_!==D)},[]),w=S.useCallback(A=>x0(l.current,A),[]),C=S.useCallback(A=>f(M=>{if(typeof A!="string")return M;const _=xM(A,M);return delete _[A],xb(_,M)?M:_}),[]),k=S.useCallback(A=>{if(A){const _=vs(A,c.current);if(typeof _=="boolean")return _;const D=vs(A,r.refValues.current),R=vs(A,r.valuesSnapshot.current);return!xb(D,R)}return Object.keys(c.current).length>0?x0(c.current):!xb(r.refValues.current,r.valuesSnapshot.current)},[]),E=S.useCallback(()=>c.current,[]),j=S.useCallback(()=>l.current,[]);return{touchedState:s,dirtyState:i,touchedRef:l,dirtyRef:c,setTouched:u,setDirty:f,resetDirty:m,resetTouched:h,isTouched:w,setFieldTouched:y,setFieldDirty:v,setTouchedState:o,setDirtyState:a,clearFieldDirty:C,isDirty:k,getDirty:E,getTouched:j,setCalculatedFieldDirty:b}}function $qe({initialValues:t,onValuesChange:e,mode:n}){const r=S.useRef(!1),[s,o]=S.useState(t||{}),i=S.useRef(s),a=S.useRef(s),l=S.useCallback(({values:b,subscribers:w,updateState:C=!0,mergeWithPreviousValues:k=!0})=>{const E=i.current,j=b instanceof Function?b(i.current):b,A=k?{...E,...j}:j;i.current=A,C&&(o(A),n==="uncontrolled"&&(i.current=A)),e==null||e(A,E),w==null||w.filter(Boolean).forEach(M=>M({updatedValues:A,previousValues:E}))},[e]),c=S.useCallback(b=>{var k;const w=vs(b.path,i.current),C=b.value instanceof Function?b.value(w):b.value;if(w!==C){const E=i.current,j=ly(b.path,C,i.current);l({values:j,updateState:b.updateState}),(k=b.subscribers)==null||k.filter(Boolean).forEach(A=>A({path:b.path,updatedValues:j,previousValues:E}))}},[l]),u=S.useCallback(b=>{a.current=b},[]),f=S.useCallback((b,w)=>{r.current||(r.current=!0,l({values:b,updateState:n==="controlled"}),u(b),w())},[l]),h=S.useCallback(()=>{l({values:a.current,updateState:!0,mergeWithPreviousValues:!1})},[l]),m=S.useCallback(()=>i.current,[]),y=S.useCallback(()=>a.current,[]),v=S.useCallback((b,w)=>{const C=vs(b,a.current);typeof C>"u"||c({path:b,value:C,updateState:n==="controlled",subscribers:w})},[c,n]);return{initialized:r,stateValues:s,refValues:i,valuesSnapshot:a,setValues:l,setFieldValue:c,resetValues:h,setValuesSnapshot:u,initialize:f,getValues:m,getValuesSnapshot:y,resetField:v}}function Fqe({$status:t,cascadeUpdates:e}){const n=S.useRef({}),r=S.useCallback((o,i)=>{S.useEffect(()=>(n.current[o]=n.current[o]||[],n.current[o].push(i),()=>{n.current[o]=n.current[o].filter(a=>a!==i)}),[i])},[]),s=S.useCallback(o=>{var a;const i=((a=n.current[o])==null?void 0:a.map(l=>c=>l({previousValue:vs(o,c.previousValues),value:vs(o,c.updatedValues),touched:t.isTouched(o),dirty:t.isDirty(o)})))??[];if(e)for(const l in n.current)(l.startsWith(`${o}.`)||o.startsWith(`${l}.`))&&i.push(...n.current[l].map(c=>u=>c({previousValue:vs(l,u.previousValues),value:vs(l,u.updatedValues),touched:t.isTouched(l),dirty:t.isDirty(l)})));return i},[]);return{subscribers:n,watch:r,getFieldSubscribers:s}}function FU(t,e){return t?`${t}-${e.toString()}`:e.toString()}const wb=Symbol("root-rule");function zU(t){const e=bM(t);return{hasErrors:Object.keys(e).length>0,errors:e}}function wM(t,e,n="",r={}){return typeof t!="object"||t===null?r:Object.keys(t).reduce((s,o)=>{const i=t[o],a=`${n===""?"":`${n}.`}${o}`,l=vs(a,e);let c=!1;return typeof i=="function"&&(s[a]=i(l,e,a)),typeof i=="object"&&Array.isArray(l)&&(c=!0,l.forEach((u,f)=>wM(i,e,`${a}.${f}`,s)),wb in i&&(s[a]=i[wb](l,e,a))),typeof i=="object"&&typeof l=="object"&&l!==null&&(c||wM(i,e,a,s),wb in i&&(s[a]=i[wb](l,e,a))),s},r)}function SM(t,e){return zU(typeof t=="function"?t(e):wM(t,e))}function Sb(t,e,n){if(typeof t!="string")return{hasError:!1,error:null};const r=SM(e,n),s=Object.keys(r.errors).find(o=>t.split(".").every((i,a)=>i===o.split(".")[a]));return{hasError:!!s,error:s?r.errors[s]:null}}const zqe="__MANTINE_FORM_INDEX__";function PU(t,e){return e?typeof e=="boolean"?e:Array.isArray(e)?e.includes(t.replace(/[.][0-9]+/g,`.${zqe}`)):!1:!1}function Ll({name:t,mode:e="controlled",initialValues:n,initialErrors:r={},initialDirty:s={},initialTouched:o={},clearInputErrorOnChange:i=!0,validateInputOnChange:a=!1,validateInputOnBlur:l=!1,onValuesChange:c,transformValues:u=(b=>b),enhanceGetInputProps:f,validate:h,onSubmitPreventDefault:m="always",touchTrigger:y="change",cascadeUpdates:v=!1}={}){const b=Mqe(r),w=$qe({initialValues:n,onValuesChange:c,mode:e}),C=Lqe({initialDirty:s,initialTouched:o,$values:w,mode:e}),k=Iqe({$values:w,$errors:b,$status:C}),E=Fqe({$status:C,cascadeUpdates:v}),[j,A]=S.useState(0),[M,_]=S.useState({}),[D,R]=S.useState(!1),N=S.useCallback(()=>{w.resetValues(),b.clearErrors(),C.resetDirty(),C.resetTouched(),e==="uncontrolled"&&A(Z=>Z+1)},[]),z=S.useCallback(Z=>{i&&b.clearErrors(),e==="uncontrolled"&&A(J=>J+1),Object.keys(E.subscribers.current).forEach(J=>{const ne=vs(J,w.refValues.current),se=vs(J,Z);ne!==se&&E.getFieldSubscribers(J).forEach(ce=>ce({previousValues:Z,updatedValues:w.refValues.current}))})},[i]),B=S.useCallback(Z=>{const J=w.refValues.current;w.initialize(Z,()=>e==="uncontrolled"&&A(ne=>ne+1)),z(J)},[z]),L=S.useCallback((Z,J,ne)=>{const se=PU(Z,a),ce=J instanceof Function?J(vs(Z,w.refValues.current)):J;C.setCalculatedFieldDirty(Z,ce),y==="change"&&C.setFieldTouched(Z,!0),!se&&i&&b.clearFieldError(Z),w.setFieldValue({path:Z,value:J,updateState:e==="controlled",subscribers:[...E.getFieldSubscribers(Z),se?fe=>{const le=Sb(Z,h,fe.updatedValues);le.hasError?b.setFieldError(Z,le.error):b.clearFieldError(Z)}:null,(ne==null?void 0:ne.forceUpdate)!==!1&&e!=="controlled"?()=>_(fe=>({...fe,[Z]:(fe[Z]||0)+1})):null]})},[c,h]),P=S.useCallback(Z=>{const J=w.refValues.current;w.setValues({values:Z,updateState:e==="controlled"}),z(J)},[c,z]),I=S.useCallback(()=>{const Z=SM(h,w.refValues.current);return b.setErrors(Z.errors),Z},[h]),H=S.useCallback(Z=>{const J=Sb(Z,h,w.refValues.current);return J.hasError?b.setFieldError(Z,J.error):b.clearFieldError(Z),J},[h]),$=(Z,{type:J="input",withError:ne=!0,withFocus:se=!0,...ce}={})=>{const le={onChange:Tqe(be=>L(Z,be,{forceUpdate:!1})),"data-path":FU(t,Z)};return ne&&(le.error=b.errorsState[Z]),J==="checkbox"?le[e==="controlled"?"checked":"defaultChecked"]=vs(Z,w.refValues.current):le[e==="controlled"?"value":"defaultValue"]=vs(Z,w.refValues.current),se&&(le.onFocus=()=>C.setFieldTouched(Z,!0),le.onBlur=()=>{if(PU(Z,l)){const be=Sb(Z,h,w.refValues.current);be.hasError?b.setFieldError(Z,be.error):b.clearFieldError(Z)}}),Object.assign(le,f==null?void 0:f({inputProps:le,field:Z,options:{type:J,withError:ne,withFocus:se,...ce},form:Q}))},V=(Z,J)=>ne=>{m==="always"&&(ne==null||ne.preventDefault());const se=I();if(se.hasErrors)m==="validation-failed"&&(ne==null||ne.preventDefault()),J==null||J(se.errors,w.refValues.current,ne);else{const ce=Z==null?void 0:Z(u(w.refValues.current),ne);ce instanceof Promise&&(R(!0),ce.finally(()=>R(!1)))}},q=Z=>u(Z||w.refValues.current),U=S.useCallback(Z=>{Z.preventDefault(),N()},[]),W=S.useCallback(Z=>Z?!Sb(Z,h,w.refValues.current).hasError:!SM(h,w.refValues.current).hasErrors,[h]),Y=Z=>`${j}-${String(Z)}-${M[String(Z)]||0}`,G=S.useCallback(Z=>document.querySelector(`[data-path="${FU(t,Z)}"]`),[]),K=S.useCallback(Z=>{w.resetField(Z,[e!=="controlled"?()=>_(J=>({...J,[Z]:(J[Z]||0)+1})):null])},[w.resetField,e,_]),Q={watch:E.watch,initialized:w.initialized.current,values:e==="uncontrolled"?w.refValues.current:w.stateValues,getValues:w.getValues,getInitialValues:w.getValuesSnapshot,setInitialValues:w.setValuesSnapshot,resetField:K,initialize:B,setValues:P,setFieldValue:L,submitting:D,setSubmitting:R,errors:b.errorsState,setErrors:b.setErrors,setFieldError:b.setFieldError,clearFieldError:b.clearFieldError,clearErrors:b.clearErrors,resetDirty:C.resetDirty,setTouched:C.setTouched,setDirty:C.setDirty,isTouched:C.isTouched,resetTouched:C.resetTouched,isDirty:C.isDirty,getTouched:C.getTouched,getDirty:C.getDirty,reorderListItem:k.reorderListItem,insertListItem:k.insertListItem,removeListItem:k.removeListItem,replaceListItem:k.replaceListItem,reset:N,validate:I,validateField:H,getInputProps:$,onSubmit:V,onReset:U,isValid:W,getTransformedValues:q,key:Y,getInputNode:G};return Eqe(t,Q),Q}function mp(t){const e=t;return n=>{try{return e.validateSync(n,{abortEarly:!1}),{}}catch(r){const s=r,o={};return s.inner.forEach(i=>{o[i.path.replaceAll("[",".").replaceAll("]","")]=i.message}),o}}}var Pqe=20,aoe=(t,e=0)=>{const n=[];return!t.children.length||e>Pqe||Array.from(t.children).forEach(r=>{r.tagName==="SPAN"?n.push(r):r.children.length&&n.push(...aoe(r,e+1))}),n},Bqe=t=>{if(!t.children.length)return;const e=aoe(t);e&&e.forEach(n=>{var r,s;const o=n.getAttribute("style"),i=(s=(r=n.parentElement)==null?void 0:r.closest("span"))==null?void 0:s.getAttribute("style");n.setAttribute("style",`${i};${o}`)})},loe=Wa.create({name:"textStyle",priority:101,addOptions(){return{HTMLAttributes:{},mergeNestedSpanStyles:!0}},parseHTML(){return[{tag:"span",consuming:!1,getAttrs:t=>t.hasAttribute("style")?(this.options.mergeNestedSpanStyles&&Bqe(t),{}):!1}]},renderHTML({HTMLAttributes:t}){return["span",rr(this.options.HTMLAttributes,t),0]},addCommands(){return{toggleTextStyle:t=>({commands:e})=>e.toggleMark(this.name,t),removeEmptyTextStyle:()=>({tr:t})=>{const{selection:e}=t;return t.doc.nodesBetween(e.from,e.to,(n,r)=>{if(n.isTextblock)return!0;n.marks.filter(s=>s.type===this.type).some(s=>Object.values(s.attrs).some(o=>!!o))||t.removeMark(r,r+n.nodeSize,this.type)}),!0}}}}),coe=Yn.create({name:"backgroundColor",addOptions(){return{types:["textStyle"]}},addGlobalAttributes(){return[{types:this.options.types,attributes:{backgroundColor:{default:null,parseHTML:t=>{var e;const n=t.getAttribute("style");if(n){const r=n.split(";").map(s=>s.trim()).filter(Boolean);for(let s=r.length-1;s>=0;s-=1){const o=r[s].split(":");if(o.length>=2){const i=o[0].trim().toLowerCase(),a=o.slice(1).join(":").trim();if(i==="background-color")return a.replace(/['"]+/g,"")}}}return(e=t.style.backgroundColor)==null?void 0:e.replace(/['"]+/g,"")},renderHTML:t=>t.backgroundColor?{style:`background-color: ${t.backgroundColor}`}:{}}}}]},addCommands(){return{setBackgroundColor:t=>({chain:e})=>e().setMark("textStyle",{backgroundColor:t}).run(),unsetBackgroundColor:()=>({chain:t})=>t().setMark("textStyle",{backgroundColor:null}).removeEmptyTextStyle().run()}}}),uoe=Yn.create({name:"color",addOptions(){return{types:["textStyle"]}},addGlobalAttributes(){return[{types:this.options.types,attributes:{color:{default:null,parseHTML:t=>{var e;const n=t.getAttribute("style");if(n){const r=n.split(";").map(s=>s.trim()).filter(Boolean);for(let s=r.length-1;s>=0;s-=1){const o=r[s].split(":");if(o.length>=2){const i=o[0].trim().toLowerCase(),a=o.slice(1).join(":").trim();if(i==="color")return a.replace(/['"]+/g,"")}}}return(e=t.style.color)==null?void 0:e.replace(/['"]+/g,"")},renderHTML:t=>t.color?{style:`color: ${t.color}`}:{}}}}]},addCommands(){return{setColor:t=>({chain:e})=>e().setMark("textStyle",{color:t}).run(),unsetColor:()=>({chain:t})=>t().setMark("textStyle",{color:null}).removeEmptyTextStyle().run()}}}),doe=Yn.create({name:"fontFamily",addOptions(){return{types:["textStyle"]}},addGlobalAttributes(){return[{types:this.options.types,attributes:{fontFamily:{default:null,parseHTML:t=>t.style.fontFamily,renderHTML:t=>t.fontFamily?{style:`font-family: ${t.fontFamily}`}:{}}}}]},addCommands(){return{setFontFamily:t=>({chain:e})=>e().setMark("textStyle",{fontFamily:t}).run(),unsetFontFamily:()=>({chain:t})=>t().setMark("textStyle",{fontFamily:null}).removeEmptyTextStyle().run()}}}),Hqe=Yn.create({name:"fontSize",addOptions(){return{types:["textStyle"]}},addGlobalAttributes(){return[{types:this.options.types,attributes:{fontSize:{default:null,parseHTML:t=>t.style.fontSize,renderHTML:t=>t.fontSize?{style:`font-size: ${t.fontSize}`}:{}}}}]},addCommands(){return{setFontSize:t=>({chain:e})=>e().setMark("textStyle",{fontSize:t}).run(),unsetFontSize:()=>({chain:t})=>t().setMark("textStyle",{fontSize:null}).removeEmptyTextStyle().run()}}}),Uqe=Yn.create({name:"lineHeight",addOptions(){return{types:["textStyle"]}},addGlobalAttributes(){return[{types:this.options.types,attributes:{lineHeight:{default:null,parseHTML:t=>t.style.lineHeight,renderHTML:t=>t.lineHeight?{style:`line-height: ${t.lineHeight}`}:{}}}}]},addCommands(){return{setLineHeight:t=>({chain:e})=>e().setMark("textStyle",{lineHeight:t}).run(),unsetLineHeight:()=>({chain:t})=>t().setMark("textStyle",{lineHeight:null}).removeEmptyTextStyle().run()}}});Yn.create({name:"textStyleKit",addExtensions(){const t=[];return this.options.backgroundColor!==!1&&t.push(coe.configure(this.options.backgroundColor)),this.options.color!==!1&&t.push(uoe.configure(this.options.color)),this.options.fontFamily!==!1&&t.push(doe.configure(this.options.fontFamily)),this.options.fontSize!==!1&&t.push(Hqe.configure(this.options.fontSize)),this.options.lineHeight!==!1&&t.push(Uqe.configure(this.options.lineHeight)),this.options.textStyle!==!1&&t.push(loe.configure(this.options.textStyle)),t}});var Vqe=doe,qqe=/(?:^|\s)(!\[(.+|:?)]\((\S+)(?:(?:\s+)["'](\S+)["'])?\))$/,Wqe=Es.create({name:"image",addOptions(){return{inline:!1,allowBase64:!1,HTMLAttributes:{},resize:!1}},inline(){return this.options.inline},group(){return this.options.inline?"inline":"block"},draggable:!0,addAttributes(){return{src:{default:null},alt:{default:null},title:{default:null},width:{default:null},height:{default:null}}},parseHTML(){return[{tag:this.options.allowBase64?"img[src]":'img[src]:not([src^="data:"])'}]},renderHTML({HTMLAttributes:t}){return["img",rr(this.options.HTMLAttributes,t)]},parseMarkdown:(t,e)=>e.createNode("image",{src:t.href,title:t.title,alt:t.text}),renderMarkdown:t=>{var e,n,r,s,o,i;const a=(n=(e=t.attrs)==null?void 0:e.src)!=null?n:"",l=(s=(r=t.attrs)==null?void 0:r.alt)!=null?s:"",c=(i=(o=t.attrs)==null?void 0:o.title)!=null?i:"";return c?`![${l}](${a} "${c}")`:`![${l}](${a})`},addNodeView(){if(!this.options.resize||!this.options.resize.enabled||typeof document>"u")return null;const{directions:t,minWidth:e,minHeight:n,alwaysPreserveAspectRatio:r}=this.options.resize;return({node:s,getPos:o,HTMLAttributes:i,editor:a})=>{const l=document.createElement("img");Object.entries(i).forEach(([f,h])=>{if(h!=null)switch(f){case"width":case"height":break;default:l.setAttribute(f,h);break}}),l.src=i.src;const c=new lPe({element:l,editor:a,node:s,getPos:o,onResize:(f,h)=>{l.style.width=`${f}px`,l.style.height=`${h}px`},onCommit:(f,h)=>{const m=o();m!==void 0&&this.editor.chain().setNodeSelection(m).updateAttributes(this.name,{width:f,height:h}).run()},onUpdate:(f,h,m)=>f.type===s.type,options:{directions:t,min:{width:e,height:n},preserveAspectRatio:r===!0}}),u=c.dom;return u.style.visibility="hidden",u.style.pointerEvents="none",l.onload=()=>{u.style.visibility="",u.style.pointerEvents=""},c}},addCommands(){return{setImage:t=>({commands:e})=>e.insertContent({type:this.name,attrs:t})}},addInputRules(){return[ose({find:qqe,type:this.type,getAttributes:t=>{const[,,e,n,r]=t;return{src:n,alt:e,title:r}}})]}}),Yqe=Wqe;let CM,kM;if(typeof WeakMap<"u"){let t=new WeakMap;CM=e=>t.get(e),kM=(e,n)=>(t.set(e,n),n)}else{const t=[];let n=0;CM=r=>{for(let s=0;s<t.length;s+=2)if(t[s]==r)return t[s+1]},kM=(r,s)=>(n==10&&(n=0),t[n++]=r,t[n++]=s)}var Zr=class{constructor(t,e,n,r){this.width=t,this.height=e,this.map=n,this.problems=r}findCell(t){for(let e=0;e<this.map.length;e++){const n=this.map[e];if(n!=t)continue;const r=e%this.width,s=e/this.width|0;let o=r+1,i=s+1;for(let a=1;o<this.width&&this.map[e+a]==n;a++)o++;for(let a=1;i<this.height&&this.map[e+this.width*a]==n;a++)i++;return{left:r,top:s,right:o,bottom:i}}throw new RangeError(`No cell with offset ${t} found`)}colCount(t){for(let e=0;e<this.map.length;e++)if(this.map[e]==t)return e%this.width;throw new RangeError(`No cell with offset ${t} found`)}nextCell(t,e,n){const{left:r,right:s,top:o,bottom:i}=this.findCell(t);return e=="horiz"?(n<0?r==0:s==this.width)?null:this.map[o*this.width+(n<0?r-1:s)]:(n<0?o==0:i==this.height)?null:this.map[r+this.width*(n<0?o-1:i)]}rectBetween(t,e){const{left:n,right:r,top:s,bottom:o}=this.findCell(t),{left:i,right:a,top:l,bottom:c}=this.findCell(e);return{left:Math.min(n,i),top:Math.min(s,l),right:Math.max(r,a),bottom:Math.max(o,c)}}cellsInRect(t){const e=[],n={};for(let r=t.top;r<t.bottom;r++)for(let s=t.left;s<t.right;s++){const o=r*this.width+s,i=this.map[o];n[i]||(n[i]=!0,!(s==t.left&&s&&this.map[o-1]==i||r==t.top&&r&&this.map[o-this.width]==i)&&e.push(i))}return e}positionAt(t,e,n){for(let r=0,s=0;;r++){const o=s+n.child(r).nodeSize;if(r==t){let i=e+t*this.width;const a=(t+1)*this.width;for(;i<a&&this.map[i]<s;)i++;return i==a?o-1:this.map[i]}s=o}}static get(t){return CM(t)||kM(t,Gqe(t))}};function Gqe(t){if(t.type.spec.tableRole!="table")throw new RangeError("Not a table node: "+t.type.name);const e=Kqe(t),n=t.childCount,r=[];let s=0,o=null;const i=[];for(let c=0,u=e*n;c<u;c++)r[c]=0;for(let c=0,u=0;c<n;c++){const f=t.child(c);u++;for(let y=0;;y++){for(;s<r.length&&r[s]!=0;)s++;if(y==f.childCount)break;const v=f.child(y),{colspan:b,rowspan:w,colwidth:C}=v.attrs;for(let k=0;k<w;k++){if(k+c>=n){(o||(o=[])).push({type:"overlong_rowspan",pos:u,n:w-k});break}const E=s+k*e;for(let j=0;j<b;j++){r[E+j]==0?r[E+j]=u:(o||(o=[])).push({type:"collision",row:c,pos:u,n:b-j});const A=C&&C[j];if(A){const M=(E+j)%e*2,_=i[M];_==null||_!=A&&i[M+1]==1?(i[M]=A,i[M+1]=1):_==A&&i[M+1]++}}}s+=b,u+=v.nodeSize}const h=(c+1)*e;let m=0;for(;s<h;)r[s++]==0&&m++;m&&(o||(o=[])).push({type:"missing",row:c,n:m}),u++}(e===0||n===0)&&(o||(o=[])).push({type:"zero_sized"});const a=new Zr(e,n,r,o);let l=!1;for(let c=0;!l&&c<i.length;c+=2)i[c]!=null&&i[c+1]<n&&(l=!0);return l&&Xqe(a,i,t),a}function Kqe(t){let e=-1,n=!1;for(let r=0;r<t.childCount;r++){const s=t.child(r);let o=0;if(n)for(let i=0;i<r;i++){const a=t.child(i);for(let l=0;l<a.childCount;l++){const c=a.child(l);i+c.attrs.rowspan>r&&(o+=c.attrs.colspan)}}for(let i=0;i<s.childCount;i++){const a=s.child(i);o+=a.attrs.colspan,a.attrs.rowspan>1&&(n=!0)}e==-1?e=o:e!=o&&(e=Math.max(e,o))}return e}function Xqe(t,e,n){t.problems||(t.problems=[]);const r={};for(let s=0;s<t.map.length;s++){const o=t.map[s];if(r[o])continue;r[o]=!0;const i=n.nodeAt(o);if(!i)throw new RangeError(`No cell with offset ${o} found`);let a=null;const l=i.attrs;for(let c=0;c<l.colspan;c++){const u=e[(s+c)%t.width*2];u!=null&&(!l.colwidth||l.colwidth[c]!=u)&&((a||(a=Zqe(l)))[c]=u)}a&&t.problems.unshift({type:"colwidth mismatch",pos:o,colwidth:a})}}function Zqe(t){if(t.colwidth)return t.colwidth.slice();const e=[];for(let n=0;n<t.colspan;n++)e.push(0);return e}function mo(t){let e=t.cached.tableNodeTypes;if(!e){e=t.cached.tableNodeTypes={};for(const n in t.nodes){const r=t.nodes[n],s=r.spec.tableRole;s&&(e[s]=r)}}return e}const Bu=new Pr("selectingCells");function Kf(t){for(let e=t.depth-1;e>0;e--)if(t.node(e).type.spec.tableRole=="row")return t.node(0).resolve(t.before(e+1));return null}function Qqe(t){for(let e=t.depth;e>0;e--){const n=t.node(e).type.spec.tableRole;if(n==="cell"||n==="header_cell")return t.node(e)}return null}function Ya(t){const e=t.selection.$head;for(let n=e.depth;n>0;n--)if(e.node(n).type.spec.tableRole=="row")return!0;return!1}function ZS(t){const e=t.selection;if("$anchorCell"in e&&e.$anchorCell)return e.$anchorCell.pos>e.$headCell.pos?e.$anchorCell:e.$headCell;if("node"in e&&e.node&&e.node.type.spec.tableRole=="cell")return e.$anchor;const n=Kf(e.$head)||Jqe(e.$head);if(n)return n;throw new RangeError(`No cell found around position ${e.head}`)}function Jqe(t){for(let e=t.nodeAfter,n=t.pos;e;e=e.firstChild,n++){const r=e.type.spec.tableRole;if(r=="cell"||r=="header_cell")return t.doc.resolve(n)}for(let e=t.nodeBefore,n=t.pos;e;e=e.lastChild,n--){const r=e.type.spec.tableRole;if(r=="cell"||r=="header_cell")return t.doc.resolve(n-e.nodeSize)}}function EM(t){return t.parent.type.spec.tableRole=="row"&&!!t.nodeAfter}function eWe(t){return t.node(0).resolve(t.pos+t.nodeAfter.nodeSize)}function UD(t,e){return t.depth==e.depth&&t.pos>=e.start(-1)&&t.pos<=e.end(-1)}function foe(t,e,n){const r=t.node(-1),s=Zr.get(r),o=t.start(-1),i=s.nextCell(t.pos-o,e,n);return i==null?null:t.node(0).resolve(o+i)}function Xf(t,e,n=1){const r={...t,colspan:t.colspan-n};return r.colwidth&&(r.colwidth=r.colwidth.slice(),r.colwidth.splice(e,n),r.colwidth.some(s=>s>0)||(r.colwidth=null)),r}function poe(t,e,n=1){const r={...t,colspan:t.colspan+n};if(r.colwidth){r.colwidth=r.colwidth.slice();for(let s=0;s<n;s++)r.colwidth.splice(e,0,0)}return r}function tWe(t,e,n){const r=mo(e.type.schema).header_cell;for(let s=0;s<t.height;s++)if(e.nodeAt(t.map[n+s*t.width]).type!=r)return!1;return!0}var wr=class lc extends hn{constructor(e,n=e){const r=e.node(-1),s=Zr.get(r),o=e.start(-1),i=s.rectBetween(e.pos-o,n.pos-o),a=e.node(0),l=s.cellsInRect(i).filter(u=>u!=n.pos-o);l.unshift(n.pos-o);const c=l.map(u=>{const f=r.nodeAt(u);if(!f)throw new RangeError(`No cell with offset ${u} found`);const h=o+u+1;return new _ne(a.resolve(h),a.resolve(h+f.content.size))});super(c[0].$from,c[0].$to,c),this.$anchorCell=e,this.$headCell=n}map(e,n){const r=e.resolve(n.map(this.$anchorCell.pos)),s=e.resolve(n.map(this.$headCell.pos));if(EM(r)&&EM(s)&&UD(r,s)){const o=this.$anchorCell.node(-1)!=r.node(-1);return o&&this.isRowSelection()?lc.rowSelection(r,s):o&&this.isColSelection()?lc.colSelection(r,s):new lc(r,s)}return ln.between(r,s)}content(){const e=this.$anchorCell.node(-1),n=Zr.get(e),r=this.$anchorCell.start(-1),s=n.rectBetween(this.$anchorCell.pos-r,this.$headCell.pos-r),o={},i=[];for(let l=s.top;l<s.bottom;l++){const c=[];for(let u=l*n.width+s.left,f=s.left;f<s.right;f++,u++){const h=n.map[u];if(o[h])continue;o[h]=!0;const m=n.findCell(h);let y=e.nodeAt(h);if(!y)throw new RangeError(`No cell with offset ${h} found`);const v=s.left-m.left,b=m.right-s.right;if(v>0||b>0){let w=y.attrs;if(v>0&&(w=Xf(w,0,v)),b>0&&(w=Xf(w,w.colspan-b,b)),m.left<s.left){if(y=y.type.createAndFill(w),!y)throw new RangeError(`Could not create cell with attrs ${JSON.stringify(w)}`)}else y=y.type.create(w,y.content)}if(m.top<s.top||m.bottom>s.bottom){const w={...y.attrs,rowspan:Math.min(m.bottom,s.bottom)-Math.max(m.top,s.top)};m.top<s.top?y=y.type.createAndFill(w):y=y.type.create(w,y.content)}c.push(y)}i.push(e.child(l).copy(ct.from(c)))}const a=this.isColSelection()&&this.isRowSelection()?e:i;return new _t(ct.from(a),1,1)}replace(e,n=_t.empty){const r=e.steps.length,s=this.ranges;for(let i=0;i<s.length;i++){const{$from:a,$to:l}=s[i],c=e.mapping.slice(r);e.replace(c.map(a.pos),c.map(l.pos),i?_t.empty:n)}const o=hn.findFrom(e.doc.resolve(e.mapping.slice(r).map(this.to)),-1);o&&e.setSelection(o)}replaceWith(e,n){this.replace(e,new _t(ct.from(n),0,0))}forEachCell(e){const n=this.$anchorCell.node(-1),r=Zr.get(n),s=this.$anchorCell.start(-1),o=r.cellsInRect(r.rectBetween(this.$anchorCell.pos-s,this.$headCell.pos-s));for(let i=0;i<o.length;i++)e(n.nodeAt(o[i]),s+o[i])}isColSelection(){const e=this.$anchorCell.index(-1),n=this.$headCell.index(-1);if(Math.min(e,n)>0)return!1;const r=e+this.$anchorCell.nodeAfter.attrs.rowspan,s=n+this.$headCell.nodeAfter.attrs.rowspan;return Math.max(r,s)==this.$headCell.node(-1).childCount}static colSelection(e,n=e){const r=e.node(-1),s=Zr.get(r),o=e.start(-1),i=s.findCell(e.pos-o),a=s.findCell(n.pos-o),l=e.node(0);return i.top<=a.top?(i.top>0&&(e=l.resolve(o+s.map[i.left])),a.bottom<s.height&&(n=l.resolve(o+s.map[s.width*(s.height-1)+a.right-1]))):(a.top>0&&(n=l.resolve(o+s.map[a.left])),i.bottom<s.height&&(e=l.resolve(o+s.map[s.width*(s.height-1)+i.right-1]))),new lc(e,n)}isRowSelection(){const e=this.$anchorCell.node(-1),n=Zr.get(e),r=this.$anchorCell.start(-1),s=n.colCount(this.$anchorCell.pos-r),o=n.colCount(this.$headCell.pos-r);if(Math.min(s,o)>0)return!1;const i=s+this.$anchorCell.nodeAfter.attrs.colspan,a=o+this.$headCell.nodeAfter.attrs.colspan;return Math.max(i,a)==n.width}eq(e){return e instanceof lc&&e.$anchorCell.pos==this.$anchorCell.pos&&e.$headCell.pos==this.$headCell.pos}static rowSelection(e,n=e){const r=e.node(-1),s=Zr.get(r),o=e.start(-1),i=s.findCell(e.pos-o),a=s.findCell(n.pos-o),l=e.node(0);return i.left<=a.left?(i.left>0&&(e=l.resolve(o+s.map[i.top*s.width])),a.right<s.width&&(n=l.resolve(o+s.map[s.width*(a.top+1)-1]))):(a.left>0&&(n=l.resolve(o+s.map[a.top*s.width])),i.right<s.width&&(e=l.resolve(o+s.map[s.width*(i.top+1)-1]))),new lc(e,n)}toJSON(){return{type:"cell",anchor:this.$anchorCell.pos,head:this.$headCell.pos}}static fromJSON(e,n){return new lc(e.resolve(n.anchor),e.resolve(n.head))}static create(e,n,r=n){return new lc(e.resolve(n),e.resolve(r))}getBookmark(){return new nWe(this.$anchorCell.pos,this.$headCell.pos)}};wr.prototype.visible=!1;hn.jsonID("cell",wr);var nWe=class hoe{constructor(e,n){this.anchor=e,this.head=n}map(e){return new hoe(e.map(this.anchor),e.map(this.head))}resolve(e){const n=e.resolve(this.anchor),r=e.resolve(this.head);return n.parent.type.spec.tableRole=="row"&&r.parent.type.spec.tableRole=="row"&&n.index()<n.parent.childCount&&r.index()<r.parent.childCount&&UD(n,r)?new wr(n,r):hn.near(r,1)}};function rWe(t){if(!(t.selection instanceof wr))return null;const e=[];return t.selection.forEachCell((n,r)=>{e.push(Ls.node(r,r+n.nodeSize,{class:"selectedCell"}))}),kr.create(t.doc,e)}function sWe({$from:t,$to:e}){if(t.pos==e.pos||t.pos<e.pos-6)return!1;let n=t.pos,r=e.pos,s=t.depth;for(;s>=0&&!(t.after(s+1)<t.end(s));s--,n++);for(let o=e.depth;o>=0&&!(e.before(o+1)>e.start(o));o--,r--);return n==r&&/row|table/.test(t.node(s).type.spec.tableRole)}function oWe({$from:t,$to:e}){let n,r;for(let s=t.depth;s>0;s--){const o=t.node(s);if(o.type.spec.tableRole==="cell"||o.type.spec.tableRole==="header_cell"){n=o;break}}for(let s=e.depth;s>0;s--){const o=e.node(s);if(o.type.spec.tableRole==="cell"||o.type.spec.tableRole==="header_cell"){r=o;break}}return n!==r&&e.parentOffset===0}function iWe(t,e,n){const r=(e||t).selection,s=(e||t).doc;let o,i;if(r instanceof Jt&&(i=r.node.type.spec.tableRole)){if(i=="cell"||i=="header_cell")o=wr.create(s,r.from);else if(i=="row"){const a=s.resolve(r.from+1);o=wr.rowSelection(a,a)}else if(!n){const a=Zr.get(r.node),l=r.from+1,c=l+a.map[a.width*a.height-1];o=wr.create(s,l+1,c)}}else r instanceof ln&&sWe(r)?o=ln.create(s,r.from):r instanceof ln&&oWe(r)&&(o=ln.create(s,r.$from.start(),r.$from.end()));return o&&(e||(e=t.tr)).setSelection(o),e}const aWe=new Pr("fix-tables");function moe(t,e,n,r){const s=t.childCount,o=e.childCount;e:for(let i=0,a=0;i<o;i++){const l=e.child(i);for(let c=a,u=Math.min(s,i+3);c<u;c++)if(t.child(c)==l){a=c+1,n+=l.nodeSize;continue e}r(l,n),a<s&&t.child(a).sameMarkup(l)?moe(t.child(a),l,n+1,r):l.nodesBetween(0,l.content.size,r,n+1),n+=l.nodeSize}}function goe(t,e){let n;const r=(s,o)=>{s.type.spec.tableRole=="table"&&(n=lWe(t,s,o,n))};return e?e.doc!=t.doc&&moe(e.doc,t.doc,0,r):t.doc.descendants(r),n}function lWe(t,e,n,r){const s=Zr.get(e);if(!s.problems)return r;r||(r=t.tr);const o=[];for(let l=0;l<s.height;l++)o.push(0);for(let l=0;l<s.problems.length;l++){const c=s.problems[l];if(c.type=="collision"){const u=e.nodeAt(c.pos);if(!u)continue;const f=u.attrs;for(let h=0;h<f.rowspan;h++)o[c.row+h]+=c.n;r.setNodeMarkup(r.mapping.map(n+1+c.pos),null,Xf(f,f.colspan-c.n,c.n))}else if(c.type=="missing")o[c.row]+=c.n;else if(c.type=="overlong_rowspan"){const u=e.nodeAt(c.pos);if(!u)continue;r.setNodeMarkup(r.mapping.map(n+1+c.pos),null,{...u.attrs,rowspan:u.attrs.rowspan-c.n})}else if(c.type=="colwidth mismatch"){const u=e.nodeAt(c.pos);if(!u)continue;r.setNodeMarkup(r.mapping.map(n+1+c.pos),null,{...u.attrs,colwidth:c.colwidth})}else if(c.type=="zero_sized"){const u=r.mapping.map(n);r.delete(u,u+e.nodeSize)}}let i,a;for(let l=0;l<o.length;l++)o[l]&&(i==null&&(i=l),a=l);for(let l=0,c=n+1;l<s.height;l++){const u=e.child(l),f=c+u.nodeSize,h=o[l];if(h>0){let m="cell";u.firstChild&&(m=u.firstChild.type.spec.tableRole);const y=[];for(let b=0;b<h;b++){const w=mo(t.schema)[m].createAndFill();w&&y.push(w)}const v=(l==0||i==l-1)&&a==l?c+1:f-1;r.insert(r.mapping.map(v),y)}c=f}return r.setMeta(aWe,{fixTables:!0})}function $l(t){const e=t.selection,n=ZS(t),r=n.node(-1),s=n.start(-1),o=Zr.get(r);return{...e instanceof wr?o.rectBetween(e.$anchorCell.pos-s,e.$headCell.pos-s):o.findCell(n.pos-s),tableStart:s,map:o,table:r}}function yoe(t,{map:e,tableStart:n,table:r},s){let o=s>0?-1:0;tWe(e,r,s+o)&&(o=s==0||s==e.width?null:0);for(let i=0;i<e.height;i++){const a=i*e.width+s;if(s>0&&s<e.width&&e.map[a-1]==e.map[a]){const l=e.map[a],c=r.nodeAt(l);t.setNodeMarkup(t.mapping.map(n+l),null,poe(c.attrs,s-e.colCount(l))),i+=c.attrs.rowspan-1}else{const l=o==null?mo(r.type.schema).cell:r.nodeAt(e.map[a+o]).type,c=e.positionAt(i,s,r);t.insert(t.mapping.map(n+c),l.createAndFill())}}return t}function cWe(t,e){if(!Ya(t))return!1;if(e){const n=$l(t);e(yoe(t.tr,n,n.left))}return!0}function uWe(t,e){if(!Ya(t))return!1;if(e){const n=$l(t);e(yoe(t.tr,n,n.right))}return!0}function dWe(t,{map:e,table:n,tableStart:r},s){const o=t.mapping.maps.length;for(let i=0;i<e.height;){const a=i*e.width+s,l=e.map[a],c=n.nodeAt(l),u=c.attrs;if(s>0&&e.map[a-1]==l||s<e.width-1&&e.map[a+1]==l)t.setNodeMarkup(t.mapping.slice(o).map(r+l),null,Xf(u,s-e.colCount(l)));else{const f=t.mapping.slice(o).map(r+l);t.delete(f,f+c.nodeSize)}i+=u.rowspan}}function fWe(t,e){if(!Ya(t))return!1;if(e){const n=$l(t),r=t.tr;if(n.left==0&&n.right==n.map.width)return!1;for(let s=n.right-1;dWe(r,n,s),s!=n.left;s--){const o=n.tableStart?r.doc.nodeAt(n.tableStart-1):r.doc;if(!o)throw new RangeError("No table found");n.table=o,n.map=Zr.get(o)}e(r)}return!0}function pWe(t,e,n){var r;const s=mo(e.type.schema).header_cell;for(let o=0;o<t.width;o++)if(((r=e.nodeAt(t.map[o+n*t.width]))===null||r===void 0?void 0:r.type)!=s)return!1;return!0}function voe(t,{map:e,tableStart:n,table:r},s){let o=n;for(let c=0;c<s;c++)o+=r.child(c).nodeSize;const i=[];let a=s>0?-1:0;pWe(e,r,s+a)&&(a=s==0||s==e.height?null:0);for(let c=0,u=e.width*s;c<e.width;c++,u++)if(s>0&&s<e.height&&e.map[u]==e.map[u-e.width]){const f=e.map[u],h=r.nodeAt(f).attrs;t.setNodeMarkup(n+f,null,{...h,rowspan:h.rowspan+1}),c+=h.colspan-1}else{var l;const f=a==null?mo(r.type.schema).cell:(l=r.nodeAt(e.map[u+a*e.width]))===null||l===void 0?void 0:l.type,h=f==null?void 0:f.createAndFill();h&&i.push(h)}return t.insert(o,mo(r.type.schema).row.create(null,i)),t}function hWe(t,e){if(!Ya(t))return!1;if(e){const n=$l(t);e(voe(t.tr,n,n.top))}return!0}function mWe(t,e){if(!Ya(t))return!1;if(e){const n=$l(t);e(voe(t.tr,n,n.bottom))}return!0}function gWe(t,{map:e,table:n,tableStart:r},s){let o=0;for(let c=0;c<s;c++)o+=n.child(c).nodeSize;const i=o+n.child(s).nodeSize,a=t.mapping.maps.length;t.delete(o+r,i+r);const l=new Set;for(let c=0,u=s*e.width;c<e.width;c++,u++){const f=e.map[u];if(!l.has(f)){if(l.add(f),s>0&&f==e.map[u-e.width]){const h=n.nodeAt(f).attrs;t.setNodeMarkup(t.mapping.slice(a).map(f+r),null,{...h,rowspan:h.rowspan-1}),c+=h.colspan-1}else if(s<e.height&&f==e.map[u+e.width]){const h=n.nodeAt(f),m=h.attrs,y=h.type.create({...m,rowspan:h.attrs.rowspan-1},h.content),v=e.positionAt(s+1,c,n);t.insert(t.mapping.slice(a).map(r+v),y),c+=m.colspan-1}}}}function yWe(t,e){if(!Ya(t))return!1;if(e){const n=$l(t),r=t.tr;if(n.top==0&&n.bottom==n.map.height)return!1;for(let s=n.bottom-1;gWe(r,n,s),s!=n.top;s--){const o=n.tableStart?r.doc.nodeAt(n.tableStart-1):r.doc;if(!o)throw new RangeError("No table found");n.table=o,n.map=Zr.get(n.table)}e(r)}return!0}function BU(t){const e=t.content;return e.childCount==1&&e.child(0).isTextblock&&e.child(0).childCount==0}function vWe({width:t,height:e,map:n},r){let s=r.top*t+r.left,o=s,i=(r.bottom-1)*t+r.left,a=s+(r.right-r.left-1);for(let l=r.top;l<r.bottom;l++){if(r.left>0&&n[o]==n[o-1]||r.right<t&&n[a]==n[a+1])return!0;o+=t,a+=t}for(let l=r.left;l<r.right;l++){if(r.top>0&&n[s]==n[s-t]||r.bottom<e&&n[i]==n[i+t])return!0;s++,i++}return!1}function HU(t,e){const n=t.selection;if(!(n instanceof wr)||n.$anchorCell.pos==n.$headCell.pos)return!1;const r=$l(t),{map:s}=r;if(vWe(s,r))return!1;if(e){const o=t.tr,i={};let a=ct.empty,l,c;for(let u=r.top;u<r.bottom;u++)for(let f=r.left;f<r.right;f++){const h=s.map[u*s.width+f],m=r.table.nodeAt(h);if(!(i[h]||!m))if(i[h]=!0,l==null)l=h,c=m;else{BU(m)||(a=a.append(m.content));const y=o.mapping.map(h+r.tableStart);o.delete(y,y+m.nodeSize)}}if(l==null||c==null)return!0;if(o.setNodeMarkup(l+r.tableStart,null,{...poe(c.attrs,c.attrs.colspan,r.right-r.left-c.attrs.colspan),rowspan:r.bottom-r.top}),a.size>0){const u=l+1+c.content.size,f=BU(c)?l+1:u;o.replaceWith(f+r.tableStart,u+r.tableStart,a)}o.setSelection(new wr(o.doc.resolve(l+r.tableStart))),e(o)}return!0}function UU(t,e){const n=mo(t.schema);return bWe(({node:r})=>n[r.type.spec.tableRole])(t,e)}function bWe(t){return(e,n)=>{const r=e.selection;let s,o;if(r instanceof wr){if(r.$anchorCell.pos!=r.$headCell.pos)return!1;s=r.$anchorCell.nodeAfter,o=r.$anchorCell.pos}else{var i;if(s=Qqe(r.$from),!s)return!1;o=(i=Kf(r.$from))===null||i===void 0?void 0:i.pos}if(s==null||o==null||s.attrs.colspan==1&&s.attrs.rowspan==1)return!1;if(n){let a=s.attrs;const l=[],c=a.colwidth;a.rowspan>1&&(a={...a,rowspan:1}),a.colspan>1&&(a={...a,colspan:1});const u=$l(e),f=e.tr;for(let m=0;m<u.right-u.left;m++)l.push(c?{...a,colwidth:c&&c[m]?[c[m]]:null}:a);let h;for(let m=u.top;m<u.bottom;m++){let y=u.map.positionAt(m,u.left,u.table);m==u.top&&(y+=s.nodeSize);for(let v=u.left,b=0;v<u.right;v++,b++)v==u.left&&m==u.top||f.insert(h=f.mapping.map(y+u.tableStart,1),t({node:s,row:m,col:v}).createAndFill(l[b]))}f.setNodeMarkup(o,t({node:s,row:u.top,col:u.left}),l[0]),r instanceof wr&&f.setSelection(new wr(f.doc.resolve(r.$anchorCell.pos),h?f.doc.resolve(h):void 0)),n(f)}return!0}}function xWe(t,e){return function(n,r){if(!Ya(n))return!1;const s=ZS(n);if(s.nodeAfter.attrs[t]===e)return!1;if(r){const o=n.tr;n.selection instanceof wr?n.selection.forEachCell((i,a)=>{i.attrs[t]!==e&&o.setNodeMarkup(a,null,{...i.attrs,[t]:e})}):o.setNodeMarkup(s.pos,null,{...s.nodeAfter.attrs,[t]:e}),r(o)}return!0}}function wWe(t){return function(e,n){if(!Ya(e))return!1;if(n){const r=mo(e.schema),s=$l(e),o=e.tr,i=s.map.cellsInRect(t=="column"?{left:s.left,top:0,right:s.right,bottom:s.map.height}:t=="row"?{left:0,top:s.top,right:s.map.width,bottom:s.bottom}:s),a=i.map(l=>s.table.nodeAt(l));for(let l=0;l<i.length;l++)a[l].type==r.header_cell&&o.setNodeMarkup(s.tableStart+i[l],r.cell,a[l].attrs);if(o.steps.length===0)for(let l=0;l<i.length;l++)o.setNodeMarkup(s.tableStart+i[l],r.header_cell,a[l].attrs);n(o)}return!0}}function VU(t,e,n){const r=e.map.cellsInRect({left:0,top:0,right:t=="row"?e.map.width:1,bottom:t=="column"?e.map.height:1});for(let s=0;s<r.length;s++){const o=e.table.nodeAt(r[s]);if(o&&o.type!==n.header_cell)return!1}return!0}function Qg(t,e){return e=e||{useDeprecatedLogic:!1},e.useDeprecatedLogic?wWe(t):function(n,r){if(!Ya(n))return!1;if(r){const s=mo(n.schema),o=$l(n),i=n.tr,a=VU("row",o,s),l=VU("column",o,s),c=(t==="column"?a:t==="row"&&l)?1:0,u=t=="column"?{left:0,top:c,right:1,bottom:o.map.height}:t=="row"?{left:c,top:0,right:o.map.width,bottom:1}:o,f=t=="column"?l?s.cell:s.header_cell:t=="row"?a?s.cell:s.header_cell:s.cell;o.map.cellsInRect(u).forEach(h=>{const m=h+o.tableStart,y=i.doc.nodeAt(m);y&&i.setNodeMarkup(m,f,y.attrs)}),r(i)}return!0}}Qg("row",{useDeprecatedLogic:!0});Qg("column",{useDeprecatedLogic:!0});const SWe=Qg("cell",{useDeprecatedLogic:!0});function CWe(t,e){if(e<0){const n=t.nodeBefore;if(n)return t.pos-n.nodeSize;for(let r=t.index(-1)-1,s=t.before();r>=0;r--){const o=t.node(-1).child(r),i=o.lastChild;if(i)return s-1-i.nodeSize;s-=o.nodeSize}}else{if(t.index()<t.parent.childCount-1)return t.pos+t.nodeAfter.nodeSize;const n=t.node(-1);for(let r=t.indexAfter(-1),s=t.after();r<n.childCount;r++){const o=n.child(r);if(o.childCount)return s+1;s+=o.nodeSize}}return null}function qU(t){return function(e,n){if(!Ya(e))return!1;const r=CWe(ZS(e),t);if(r==null)return!1;if(n){const s=e.doc.resolve(r);n(e.tr.setSelection(ln.between(s,eWe(s))).scrollIntoView())}return!0}}function kWe(t,e){const n=t.selection.$anchor;for(let r=n.depth;r>0;r--)if(n.node(r).type.spec.tableRole=="table")return e&&e(t.tr.delete(n.before(r),n.after(r)).scrollIntoView()),!0;return!1}function Cb(t,e){const n=t.selection;if(!(n instanceof wr))return!1;if(e){const r=t.tr,s=mo(t.schema).cell.createAndFill().content;n.forEachCell((o,i)=>{o.content.eq(s)||r.replace(r.mapping.map(i+1),r.mapping.map(i+o.nodeSize-1),new _t(s,0,0))}),r.docChanged&&e(r)}return!0}function EWe(t){if(t.size===0)return null;let{content:e,openStart:n,openEnd:r}=t;for(;e.childCount==1&&(n>0&&r>0||e.child(0).type.spec.tableRole=="table");)n--,r--,e=e.child(0).content;const s=e.child(0),o=s.type.spec.tableRole,i=s.type.schema,a=[];if(o=="row")for(let l=0;l<e.childCount;l++){let c=e.child(l).content;const u=l?0:Math.max(0,n-1),f=l<e.childCount-1?0:Math.max(0,r-1);(u||f)&&(c=TM(mo(i).row,new _t(c,u,f)).content),a.push(c)}else if(o=="cell"||o=="header_cell")a.push(n||r?TM(mo(i).row,new _t(e,n,r)).content:e);else return null;return TWe(i,a)}function TWe(t,e){const n=[];for(let s=0;s<e.length;s++){const o=e[s];for(let i=o.childCount-1;i>=0;i--){const{rowspan:a,colspan:l}=o.child(i).attrs;for(let c=s;c<s+a;c++)n[c]=(n[c]||0)+l}}let r=0;for(let s=0;s<n.length;s++)r=Math.max(r,n[s]);for(let s=0;s<n.length;s++)if(s>=e.length&&e.push(ct.empty),n[s]<r){const o=mo(t).cell.createAndFill(),i=[];for(let a=n[s];a<r;a++)i.push(o);e[s]=e[s].append(ct.from(i))}return{height:e.length,width:r,rows:e}}function TM(t,e){const n=t.createAndFill();return new WR(n).replace(0,n.content.size,e).doc}function MWe({width:t,height:e,rows:n},r,s){if(t!=r){const o=[],i=[];for(let a=0;a<n.length;a++){const l=n[a],c=[];for(let u=o[a]||0,f=0;u<r;f++){let h=l.child(f%l.childCount);u+h.attrs.colspan>r&&(h=h.type.createChecked(Xf(h.attrs,h.attrs.colspan,u+h.attrs.colspan-r),h.content)),c.push(h),u+=h.attrs.colspan;for(let m=1;m<h.attrs.rowspan;m++)o[a+m]=(o[a+m]||0)+h.attrs.colspan}i.push(ct.from(c))}n=i,t=r}if(e!=s){const o=[];for(let i=0,a=0;i<s;i++,a++){const l=[],c=n[a%e];for(let u=0;u<c.childCount;u++){let f=c.child(u);i+f.attrs.rowspan>s&&(f=f.type.create({...f.attrs,rowspan:Math.max(1,s-f.attrs.rowspan)},f.content)),l.push(f)}o.push(ct.from(l))}n=o,e=s}return{width:t,height:e,rows:n}}function jWe(t,e,n,r,s,o,i){const a=t.doc.type.schema,l=mo(a);let c,u;if(s>e.width)for(let f=0,h=0;f<e.height;f++){const m=n.child(f);h+=m.nodeSize;const y=[];let v;m.lastChild==null||m.lastChild.type==l.cell?v=c||(c=l.cell.createAndFill()):v=u||(u=l.header_cell.createAndFill());for(let b=e.width;b<s;b++)y.push(v);t.insert(t.mapping.slice(i).map(h-1+r),y)}if(o>e.height){const f=[];for(let y=0,v=(e.height-1)*e.width;y<Math.max(e.width,s);y++){const b=y>=e.width?!1:n.nodeAt(e.map[v+y]).type==l.header_cell;f.push(b?u||(u=l.header_cell.createAndFill()):c||(c=l.cell.createAndFill()))}const h=l.row.create(null,ct.from(f)),m=[];for(let y=e.height;y<o;y++)m.push(h);t.insert(t.mapping.slice(i).map(r+n.nodeSize-2),m)}return!!(c||u)}function WU(t,e,n,r,s,o,i,a){if(i==0||i==e.height)return!1;let l=!1;for(let c=s;c<o;c++){const u=i*e.width+c,f=e.map[u];if(e.map[u-e.width]==f){l=!0;const h=n.nodeAt(f),{top:m,left:y}=e.findCell(f);t.setNodeMarkup(t.mapping.slice(a).map(f+r),null,{...h.attrs,rowspan:i-m}),t.insert(t.mapping.slice(a).map(e.positionAt(i,y,n)),h.type.createAndFill({...h.attrs,rowspan:m+h.attrs.rowspan-i})),c+=h.attrs.colspan-1}}return l}function YU(t,e,n,r,s,o,i,a){if(i==0||i==e.width)return!1;let l=!1;for(let c=s;c<o;c++){const u=c*e.width+i,f=e.map[u];if(e.map[u-1]==f){l=!0;const h=n.nodeAt(f),m=e.colCount(f),y=t.mapping.slice(a).map(f+r);t.setNodeMarkup(y,null,Xf(h.attrs,i-m,h.attrs.colspan-(i-m))),t.insert(y+h.nodeSize,h.type.createAndFill(Xf(h.attrs,0,i-m))),c+=h.attrs.rowspan-1}}return l}function GU(t,e,n,r,s){let o=n?t.doc.nodeAt(n-1):t.doc;if(!o)throw new Error("No table found");let i=Zr.get(o);const{top:a,left:l}=r,c=l+s.width,u=a+s.height,f=t.tr;let h=0;function m(){if(o=n?f.doc.nodeAt(n-1):f.doc,!o)throw new Error("No table found");i=Zr.get(o),h=f.mapping.maps.length}jWe(f,i,o,n,c,u,h)&&m(),WU(f,i,o,n,l,c,a,h)&&m(),WU(f,i,o,n,l,c,u,h)&&m(),YU(f,i,o,n,a,u,l,h)&&m(),YU(f,i,o,n,a,u,c,h)&&m();for(let y=a;y<u;y++){const v=i.positionAt(y,l,o),b=i.positionAt(y,c,o);f.replace(f.mapping.slice(h).map(v+n),f.mapping.slice(h).map(b+n),new _t(s.rows[y-a],0,0))}m(),f.setSelection(new wr(f.doc.resolve(n+i.positionAt(a,l,o)),f.doc.resolve(n+i.positionAt(u-1,c-1,o)))),e(f)}const AWe=lD({ArrowLeft:kb("horiz",-1),ArrowRight:kb("horiz",1),ArrowUp:kb("vert",-1),ArrowDown:kb("vert",1),"Shift-ArrowLeft":Eb("horiz",-1),"Shift-ArrowRight":Eb("horiz",1),"Shift-ArrowUp":Eb("vert",-1),"Shift-ArrowDown":Eb("vert",1),Backspace:Cb,"Mod-Backspace":Cb,Delete:Cb,"Mod-Delete":Cb});function Dx(t,e,n){return n.eq(t.selection)?!1:(e&&e(t.tr.setSelection(n).scrollIntoView()),!0)}function kb(t,e){return(n,r,s)=>{if(!s)return!1;const o=n.selection;if(o instanceof wr)return Dx(n,r,hn.near(o.$headCell,e));if(t!="horiz"&&!o.empty)return!1;const i=boe(s,t,e);if(i==null)return!1;if(t=="horiz")return Dx(n,r,hn.near(n.doc.resolve(o.head+e),e));{const a=n.doc.resolve(i),l=foe(a,t,e);let c;return l?c=hn.near(l,1):e<0?c=hn.near(n.doc.resolve(a.before(-1)),-1):c=hn.near(n.doc.resolve(a.after(-1)),1),Dx(n,r,c)}}}function Eb(t,e){return(n,r,s)=>{if(!s)return!1;const o=n.selection;let i;if(o instanceof wr)i=o;else{const l=boe(s,t,e);if(l==null)return!1;i=new wr(n.doc.resolve(l))}const a=foe(i.$headCell,t,e);return a?Dx(n,r,new wr(i.$anchorCell,a)):!1}}function _We(t,e){const n=t.state.doc,r=Kf(n.resolve(e));return r?(t.dispatch(t.state.tr.setSelection(new wr(r))),!0):!1}function RWe(t,e,n){if(!Ya(t.state))return!1;let r=EWe(n);const s=t.state.selection;if(s instanceof wr){r||(r={width:1,height:1,rows:[ct.from(TM(mo(t.state.schema).cell,n))]});const o=s.$anchorCell.node(-1),i=s.$anchorCell.start(-1),a=Zr.get(o).rectBetween(s.$anchorCell.pos-i,s.$headCell.pos-i);return r=MWe(r,a.right-a.left,a.bottom-a.top),GU(t.state,t.dispatch,i,a,r),!0}else if(r){const o=ZS(t.state),i=o.start(-1);return GU(t.state,t.dispatch,i,Zr.get(o.node(-1)).findCell(o.pos-i),r),!0}else return!1}function DWe(t,e){var n;if(e.button!=0||e.ctrlKey||e.metaKey)return;const r=KU(t,e.target);let s;if(e.shiftKey&&t.state.selection instanceof wr)o(t.state.selection.$anchorCell,e),e.preventDefault();else if(e.shiftKey&&r&&(s=Kf(t.state.selection.$anchor))!=null&&((n=_9(t,e))===null||n===void 0?void 0:n.pos)!=s.pos)o(s,e),e.preventDefault();else if(!r)return;function o(l,c){let u=_9(t,c);const f=Bu.getState(t.state)==null;if(!u||!UD(l,u))if(f)u=l;else return;const h=new wr(l,u);if(f||!t.state.selection.eq(h)){const m=t.state.tr.setSelection(h);f&&m.setMeta(Bu,l.pos),t.dispatch(m)}}function i(){t.root.removeEventListener("mouseup",i),t.root.removeEventListener("dragstart",i),t.root.removeEventListener("mousemove",a),Bu.getState(t.state)!=null&&t.dispatch(t.state.tr.setMeta(Bu,-1))}function a(l){const c=l,u=Bu.getState(t.state);let f;if(u!=null)f=t.state.doc.resolve(u);else if(KU(t,c.target)!=r&&(f=_9(t,e),!f))return i();f&&o(f,c)}t.root.addEventListener("mouseup",i),t.root.addEventListener("dragstart",i),t.root.addEventListener("mousemove",a)}function boe(t,e,n){if(!(t.state.selection instanceof ln))return null;const{$head:r}=t.state.selection;for(let s=r.depth-1;s>=0;s--){const o=r.node(s);if((n<0?r.index(s):r.indexAfter(s))!=(n<0?0:o.childCount))return null;if(o.type.spec.tableRole=="cell"||o.type.spec.tableRole=="header_cell"){const i=r.before(s),a=e=="vert"?n>0?"down":"up":n>0?"right":"left";return t.endOfTextblock(a)?i:null}}return null}function KU(t,e){for(;e&&e!=t.dom;e=e.parentNode)if(e.nodeName=="TD"||e.nodeName=="TH")return e;return null}function _9(t,e){const n=t.posAtCoords({left:e.clientX,top:e.clientY});if(!n)return null;let{inside:r,pos:s}=n;return r>=0&&Kf(t.state.doc.resolve(r))||Kf(t.state.doc.resolve(s))}var IWe=class{constructor(e,n){this.node=e,this.defaultCellMinWidth=n,this.dom=document.createElement("div"),this.dom.className="tableWrapper",this.table=this.dom.appendChild(document.createElement("table")),this.table.style.setProperty("--default-cell-min-width",`${n}px`),this.colgroup=this.table.appendChild(document.createElement("colgroup")),MM(e,this.colgroup,this.table,n),this.contentDOM=this.table.appendChild(document.createElement("tbody"))}update(e){return e.type!=this.node.type?!1:(this.node=e,MM(e,this.colgroup,this.table,this.defaultCellMinWidth),!0)}ignoreMutation(e){return e.type=="attributes"&&(e.target==this.table||this.colgroup.contains(e.target))}};function MM(t,e,n,r,s,o){let i=0,a=!0,l=e.firstChild;const c=t.firstChild;if(c){for(let f=0,h=0;f<c.childCount;f++){const{colspan:m,colwidth:y}=c.child(f).attrs;for(let v=0;v<m;v++,h++){const b=s==h?o:y&&y[v],w=b?b+"px":"";if(i+=b||r,b||(a=!1),l)l.style.width!=w&&(l.style.width=w),l=l.nextSibling;else{const C=document.createElement("col");C.style.width=w,e.appendChild(C)}}}for(;l;){var u;const f=l.nextSibling;(u=l.parentNode)===null||u===void 0||u.removeChild(l),l=f}a?(n.style.width=i+"px",n.style.minWidth=""):(n.style.width="",n.style.minWidth=i+"px")}}const gi=new Pr("tableColumnResizing");function OWe({handleWidth:t=5,cellMinWidth:e=25,defaultCellMinWidth:n=100,View:r=IWe,lastColumnResizable:s=!0}={}){const o=new Sr({key:gi,state:{init(i,a){var l;const c=(l=o.spec)===null||l===void 0||(l=l.props)===null||l===void 0?void 0:l.nodeViews,u=mo(a.schema).table.name;return r&&c&&(c[u]=(f,h)=>new r(f,n,h)),new NWe(-1,!1)},apply(i,a){return a.apply(i)}},props:{attributes:i=>{const a=gi.getState(i);return a&&a.activeHandle>-1?{class:"resize-cursor"}:{}},handleDOMEvents:{mousemove:(i,a)=>{LWe(i,a,t,s)},mouseleave:i=>{$We(i)},mousedown:(i,a)=>{FWe(i,a,e,n)}},decorations:i=>{const a=gi.getState(i);if(a&&a.activeHandle>-1)return UWe(i,a.activeHandle)},nodeViews:{}}});return o}var NWe=class Ix{constructor(e,n){this.activeHandle=e,this.dragging=n}apply(e){const n=this,r=e.getMeta(gi);if(r&&r.setHandle!=null)return new Ix(r.setHandle,!1);if(r&&r.setDragging!==void 0)return new Ix(n.activeHandle,r.setDragging);if(n.activeHandle>-1&&e.docChanged){let s=e.mapping.map(n.activeHandle,-1);return EM(e.doc.resolve(s))||(s=-1),new Ix(s,n.dragging)}return n}};function LWe(t,e,n,r){if(!t.editable)return;const s=gi.getState(t.state);if(s&&!s.dragging){const o=PWe(e.target);let i=-1;if(o){const{left:a,right:l}=o.getBoundingClientRect();e.clientX-a<=n?i=XU(t,e,"left",n):l-e.clientX<=n&&(i=XU(t,e,"right",n))}if(i!=s.activeHandle){if(!r&&i!==-1){const a=t.state.doc.resolve(i),l=a.node(-1),c=Zr.get(l),u=a.start(-1);if(c.colCount(a.pos-u)+a.nodeAfter.attrs.colspan-1==c.width-1)return}xoe(t,i)}}}function $We(t){if(!t.editable)return;const e=gi.getState(t.state);e&&e.activeHandle>-1&&!e.dragging&&xoe(t,-1)}function FWe(t,e,n,r){var s;if(!t.editable)return!1;const o=(s=t.dom.ownerDocument.defaultView)!==null&&s!==void 0?s:window,i=gi.getState(t.state);if(!i||i.activeHandle==-1||i.dragging)return!1;const a=t.state.doc.nodeAt(i.activeHandle),l=zWe(t,i.activeHandle,a.attrs);t.dispatch(t.state.tr.setMeta(gi,{setDragging:{startX:e.clientX,startWidth:l}}));function c(f){o.removeEventListener("mouseup",c),o.removeEventListener("mousemove",u);const h=gi.getState(t.state);h!=null&&h.dragging&&(BWe(t,h.activeHandle,ZU(h.dragging,f,n)),t.dispatch(t.state.tr.setMeta(gi,{setDragging:null})))}function u(f){if(!f.which)return c(f);const h=gi.getState(t.state);if(h&&h.dragging){const m=ZU(h.dragging,f,n);QU(t,h.activeHandle,m,r)}}return QU(t,i.activeHandle,l,r),o.addEventListener("mouseup",c),o.addEventListener("mousemove",u),e.preventDefault(),!0}function zWe(t,e,{colspan:n,colwidth:r}){const s=r&&r[r.length-1];if(s)return s;const o=t.domAtPos(e);let i=o.node.childNodes[o.offset].offsetWidth,a=n;if(r)for(let l=0;l<n;l++)r[l]&&(i-=r[l],a--);return i/a}function PWe(t){for(;t&&t.nodeName!="TD"&&t.nodeName!="TH";)t=t.classList&&t.classList.contains("ProseMirror")?null:t.parentNode;return t}function XU(t,e,n,r){const s=n=="right"?-r:r,o=t.posAtCoords({left:e.clientX+s,top:e.clientY});if(!o)return-1;const{pos:i}=o,a=Kf(t.state.doc.resolve(i));if(!a)return-1;if(n=="right")return a.pos;const l=Zr.get(a.node(-1)),c=a.start(-1),u=l.map.indexOf(a.pos-c);return u%l.width==0?-1:c+l.map[u-1]}function ZU(t,e,n){const r=e.clientX-t.startX;return Math.max(n,t.startWidth+r)}function xoe(t,e){t.dispatch(t.state.tr.setMeta(gi,{setHandle:e}))}function BWe(t,e,n){const r=t.state.doc.resolve(e),s=r.node(-1),o=Zr.get(s),i=r.start(-1),a=o.colCount(r.pos-i)+r.nodeAfter.attrs.colspan-1,l=t.state.tr;for(let c=0;c<o.height;c++){const u=c*o.width+a;if(c&&o.map[u]==o.map[u-o.width])continue;const f=o.map[u],h=s.nodeAt(f).attrs,m=h.colspan==1?0:a-o.colCount(f);if(h.colwidth&&h.colwidth[m]==n)continue;const y=h.colwidth?h.colwidth.slice():HWe(h.colspan);y[m]=n,l.setNodeMarkup(i+f,null,{...h,colwidth:y})}l.docChanged&&t.dispatch(l)}function QU(t,e,n,r){const s=t.state.doc.resolve(e),o=s.node(-1),i=s.start(-1),a=Zr.get(o).colCount(s.pos-i)+s.nodeAfter.attrs.colspan-1;let l=t.domAtPos(s.start(-1)).node;for(;l&&l.nodeName!="TABLE";)l=l.parentNode;l&&MM(o,l.firstChild,l,r,a,n)}function HWe(t){return Array(t).fill(0)}function UWe(t,e){const n=[],r=t.doc.resolve(e),s=r.node(-1);if(!s)return kr.empty;const o=Zr.get(s),i=r.start(-1),a=o.colCount(r.pos-i)+r.nodeAfter.attrs.colspan-1;for(let c=0;c<o.height;c++){const u=a+c*o.width;if((a==o.width-1||o.map[u]!=o.map[u+1])&&(c==0||o.map[u]!=o.map[u-o.width])){var l;const f=o.map[u],h=i+f+s.nodeAt(f).nodeSize-1,m=document.createElement("div");m.className="column-resize-handle",!((l=gi.getState(t))===null||l===void 0)&&l.dragging&&n.push(Ls.node(i+f,i+f+s.nodeAt(f).nodeSize,{class:"column-resize-dragging"})),n.push(Ls.widget(h,m))}}return kr.create(t.doc,n)}function VWe({allowTableNodeSelection:t=!1}={}){return new Sr({key:Bu,state:{init(){return null},apply(e,n){const r=e.getMeta(Bu);if(r!=null)return r==-1?null:r;if(n==null||!e.docChanged)return n;const{deleted:s,pos:o}=e.mapping.mapResult(n);return s?null:o}},props:{decorations:rWe,handleDOMEvents:{mousedown:DWe},createSelectionBetween(e){return Bu.getState(e.state)!=null?e.state.selection:null},handleTripleClick:_We,handleKeyDown:AWe,handlePaste:RWe},appendTransaction(e,n,r){return iWe(r,goe(r,n),t)}})}var woe=Es.create({name:"tableCell",addOptions(){return{HTMLAttributes:{}}},content:"block+",addAttributes(){return{colspan:{default:1},rowspan:{default:1},colwidth:{default:null,parseHTML:t=>{var e,n;const r=t.getAttribute("colwidth"),s=r?r.split(",").map(o=>parseInt(o,10)):null;if(!s){const o=(e=t.closest("table"))==null?void 0:e.querySelectorAll("colgroup > col"),i=Array.from(((n=t.parentElement)==null?void 0:n.children)||[]).indexOf(t);if(i&&i>-1&&o&&o[i]){const a=o[i].getAttribute("width");return a?[parseInt(a,10)]:null}}return s}}}},tableRole:"cell",isolating:!0,parseHTML(){return[{tag:"td"}]},renderHTML({HTMLAttributes:t}){return["td",rr(this.options.HTMLAttributes,t),0]}}),Soe=Es.create({name:"tableHeader",addOptions(){return{HTMLAttributes:{}}},content:"block+",addAttributes(){return{colspan:{default:1},rowspan:{default:1},colwidth:{default:null,parseHTML:t=>{const e=t.getAttribute("colwidth");return e?e.split(",").map(r=>parseInt(r,10)):null}}}},tableRole:"header_cell",isolating:!0,parseHTML(){return[{tag:"th"}]},renderHTML({HTMLAttributes:t}){return["th",rr(this.options.HTMLAttributes,t),0]}}),Coe=Es.create({name:"tableRow",addOptions(){return{HTMLAttributes:{}}},content:"(tableCell | tableHeader)*",tableRole:"row",parseHTML(){return[{tag:"tr"}]},renderHTML({HTMLAttributes:t}){return["tr",rr(this.options.HTMLAttributes,t),0]}});function jM(t,e){return e?["width",`${Math.max(e,t)}px`]:["min-width",`${t}px`]}function JU(t,e,n,r,s,o){var i;let a=0,l=!0,c=e.firstChild;const u=t.firstChild;if(u!==null)for(let h=0,m=0;h<u.childCount;h+=1){const{colspan:y,colwidth:v}=u.child(h).attrs;for(let b=0;b<y;b+=1,m+=1){const w=s===m?o:v&&v[b],C=w?`${w}px`:"";if(a+=w||r,w||(l=!1),c){if(c.style.width!==C){const[k,E]=jM(r,w);c.style.setProperty(k,E)}c=c.nextSibling}else{const k=document.createElement("col"),[E,j]=jM(r,w);k.style.setProperty(E,j),e.appendChild(k)}}}for(;c;){const h=c.nextSibling;(i=c.parentNode)==null||i.removeChild(c),c=h}const f=t.attrs.style&&typeof t.attrs.style=="string"&&/\bwidth\s*:/i.test(t.attrs.style);l&&!f?(n.style.width=`${a}px`,n.style.minWidth=""):(n.style.width="",n.style.minWidth=`${a}px`)}var qWe=class{constructor(t,e){this.node=t,this.cellMinWidth=e,this.dom=document.createElement("div"),this.dom.className="tableWrapper",this.table=this.dom.appendChild(document.createElement("table")),t.attrs.style&&(this.table.style.cssText=t.attrs.style),this.colgroup=this.table.appendChild(document.createElement("colgroup")),JU(t,this.colgroup,this.table,e),this.contentDOM=this.table.appendChild(document.createElement("tbody"))}update(t){return t.type!==this.node.type?!1:(this.node=t,JU(t,this.colgroup,this.table,this.cellMinWidth),!0)}ignoreMutation(t){const e=t.target,n=this.dom.contains(e),r=this.contentDOM.contains(e);return!!(n&&!r&&(t.type==="attributes"||t.type==="childList"||t.type==="characterData"))}};function WWe(t,e,n,r){let s=0,o=!0;const i=[],a=t.firstChild;if(!a)return{};for(let f=0,h=0;f<a.childCount;f+=1){const{colspan:m,colwidth:y}=a.child(f).attrs;for(let v=0;v<m;v+=1,h+=1){const b=n===h?r:y&&y[v];s+=b||e,b||(o=!1);const[w,C]=jM(e,b);i.push(["col",{style:`${w}: ${C}`}])}}const l=o?`${s}px`:"",c=o?"":`${s}px`;return{colgroup:["colgroup",{},...i],tableWidth:l,tableMinWidth:c}}function eV(t,e){return t.createAndFill()}function YWe(t){if(t.cached.tableNodeTypes)return t.cached.tableNodeTypes;const e={};return Object.keys(t.nodes).forEach(n=>{const r=t.nodes[n];r.spec.tableRole&&(e[r.spec.tableRole]=r)}),t.cached.tableNodeTypes=e,e}function GWe(t,e,n,r,s){const o=YWe(t),i=[],a=[];for(let c=0;c<n;c+=1){const u=eV(o.cell);if(u&&a.push(u),r){const f=eV(o.header_cell);f&&i.push(f)}}const l=[];for(let c=0;c<e;c+=1)l.push(o.row.createChecked(null,r&&c===0?i:a));return o.table.createChecked(null,l)}function KWe(t){return t instanceof wr}var Tb=({editor:t})=>{const{selection:e}=t.state;if(!KWe(e))return!1;let n=0;const r=Ire(e.ranges[0].$from,o=>o.type.name==="table");return r==null||r.node.descendants(o=>{if(o.type.name==="table")return!1;["tableCell","tableHeader"].includes(o.type.name)&&(n+=1)}),n===e.ranges.length?(t.commands.deleteTable(),!0):!1},XWe="";function ZWe(t){return(t||"").replace(/\s+/g," ").trim()}function QWe(t,e,n={}){var r;const s=(r=n.cellLineSeparator)!=null?r:XWe;if(!t||!t.content||t.content.length===0)return"";const o=[];t.content.forEach(y=>{const v=[];y.content&&y.content.forEach(b=>{let w="";b.content&&Array.isArray(b.content)&&b.content.length>1?w=b.content.map(j=>e.renderChildren(j)).join(s):w=b.content?e.renderChildren(b.content):"";const C=ZWe(w),k=b.type==="tableHeader";v.push({text:C,isHeader:k})}),o.push(v)});const i=o.reduce((y,v)=>Math.max(y,v.length),0);if(i===0)return"";const a=new Array(i).fill(0);o.forEach(y=>{var v;for(let b=0;b<i;b+=1){const C=(((v=y[b])==null?void 0:v.text)||"").length;C>a[b]&&(a[b]=C),a[b]<3&&(a[b]=3)}});const l=(y,v)=>y+" ".repeat(Math.max(0,v-y.length)),c=o[0],u=c.some(y=>y.isHeader);let f=`
`;const h=new Array(i).fill(0).map((y,v)=>u&&c[v]&&c[v].text||"");return f+=`| ${h.map((y,v)=>l(y,a[v])).join(" | ")} |
`,f+=`| ${a.map(y=>"-".repeat(Math.max(3,y))).join(" | ")} |
`,(u?o.slice(1):o).forEach(y=>{f+=`| ${new Array(i).fill(0).map((v,b)=>l(y[b]&&y[b].text||"",a[b])).join(" | ")} |
`}),f}var JWe=QWe,koe=Es.create({name:"table",addOptions(){return{HTMLAttributes:{},resizable:!1,renderWrapper:!1,handleWidth:5,cellMinWidth:25,View:qWe,lastColumnResizable:!0,allowTableNodeSelection:!1}},content:"tableRow+",tableRole:"table",isolating:!0,group:"block",parseHTML(){return[{tag:"table"}]},renderHTML({node:t,HTMLAttributes:e}){const{colgroup:n,tableWidth:r,tableMinWidth:s}=WWe(t,this.options.cellMinWidth),o=e.style;function i(){return o||(r?`width: ${r}`:`min-width: ${s}`)}const a=["table",rr(this.options.HTMLAttributes,e,{style:i()}),n,["tbody",0]];return this.options.renderWrapper?["div",{class:"tableWrapper"},a]:a},parseMarkdown:(t,e)=>{const n=[];if(t.header){const r=[];t.header.forEach(s=>{r.push(e.createNode("tableHeader",{},[{type:"paragraph",content:e.parseInline(s.tokens)}]))}),n.push(e.createNode("tableRow",{},r))}return t.rows&&t.rows.forEach(r=>{const s=[];r.forEach(o=>{s.push(e.createNode("tableCell",{},[{type:"paragraph",content:e.parseInline(o.tokens)}]))}),n.push(e.createNode("tableRow",{},s))}),e.createNode("table",void 0,n)},renderMarkdown:(t,e)=>JWe(t,e),addCommands(){return{insertTable:({rows:t=3,cols:e=3,withHeaderRow:n=!0}={})=>({tr:r,dispatch:s,editor:o})=>{const i=GWe(o.schema,t,e,n);if(s){const a=r.selection.from+1;r.replaceSelectionWith(i).scrollIntoView().setSelection(ln.near(r.doc.resolve(a)))}return!0},addColumnBefore:()=>({state:t,dispatch:e})=>cWe(t,e),addColumnAfter:()=>({state:t,dispatch:e})=>uWe(t,e),deleteColumn:()=>({state:t,dispatch:e})=>fWe(t,e),addRowBefore:()=>({state:t,dispatch:e})=>hWe(t,e),addRowAfter:()=>({state:t,dispatch:e})=>mWe(t,e),deleteRow:()=>({state:t,dispatch:e})=>yWe(t,e),deleteTable:()=>({state:t,dispatch:e})=>kWe(t,e),mergeCells:()=>({state:t,dispatch:e})=>HU(t,e),splitCell:()=>({state:t,dispatch:e})=>UU(t,e),toggleHeaderColumn:()=>({state:t,dispatch:e})=>Qg("column")(t,e),toggleHeaderRow:()=>({state:t,dispatch:e})=>Qg("row")(t,e),toggleHeaderCell:()=>({state:t,dispatch:e})=>SWe(t,e),mergeOrSplit:()=>({state:t,dispatch:e})=>HU(t,e)?!0:UU(t,e),setCellAttribute:(t,e)=>({state:n,dispatch:r})=>xWe(t,e)(n,r),goToNextCell:()=>({state:t,dispatch:e})=>qU(1)(t,e),goToPreviousCell:()=>({state:t,dispatch:e})=>qU(-1)(t,e),fixTables:()=>({state:t,dispatch:e})=>(e&&goe(t),!0),setCellSelection:t=>({tr:e,dispatch:n})=>{if(n){const r=wr.create(e.doc,t.anchorCell,t.headCell);e.setSelection(r)}return!0}}},addKeyboardShortcuts(){return{Tab:()=>this.editor.commands.goToNextCell()?!0:this.editor.can().addRowAfter()?this.editor.chain().addRowAfter().goToNextCell().run():!1,"Shift-Tab":()=>this.editor.commands.goToPreviousCell(),Backspace:Tb,"Mod-Backspace":Tb,Delete:Tb,"Mod-Delete":Tb}},addProseMirrorPlugins(){return[...this.options.resizable&&this.editor.isEditable?[OWe({handleWidth:this.options.handleWidth,cellMinWidth:this.options.cellMinWidth,defaultCellMinWidth:this.options.cellMinWidth,View:this.options.View,lastColumnResizable:this.options.lastColumnResizable})]:[],VWe({allowTableNodeSelection:this.options.allowTableNodeSelection})]},extendNodeSchema(t){const e={name:t.name,options:t.options,storage:t.storage};return{tableRole:er(tn(t,"tableRole",e))}}});Yn.create({name:"tableKit",addExtensions(){const t=[];return this.options.table!==!1&&t.push(koe.configure(this.options.table)),this.options.tableCell!==!1&&t.push(woe.configure(this.options.tableCell)),this.options.tableHeader!==!1&&t.push(Soe.configure(this.options.tableHeader)),this.options.tableRow!==!1&&t.push(Coe.configure(this.options.tableRow)),t}});var AM;try{AM=Map}catch{}var _M;try{_M=Set}catch{}function Eoe(t,e,n){if(!t||typeof t!="object"||typeof t=="function")return t;if(t.nodeType&&"cloneNode"in t)return t.cloneNode(!0);if(t instanceof Date)return new Date(t.getTime());if(t instanceof RegExp)return new RegExp(t);if(Array.isArray(t))return t.map(RM);if(AM&&t instanceof AM)return new Map(Array.from(t.entries()));if(_M&&t instanceof _M)return new Set(Array.from(t.values()));if(t instanceof Object){e.push(t);var r=Object.create(t);n.push(r);for(var s in t){var o=e.findIndex(function(i){return i===t[s]});r[s]=o>-1?n[o]:Eoe(t[s],e,n)}return r}return t}function RM(t){return Eoe(t,[],[])}const eYe=Object.prototype.toString,tYe=Error.prototype.toString,nYe=RegExp.prototype.toString,rYe=typeof Symbol<"u"?Symbol.prototype.toString:()=>"",sYe=/^Symbol\((.*)\)(.*)$/;function oYe(t){return t!=+t?"NaN":t===0&&1/t<0?"-0":""+t}function tV(t,e=!1){if(t==null||t===!0||t===!1)return""+t;const n=typeof t;if(n==="number")return oYe(t);if(n==="string")return e?`"${t}"`:t;if(n==="function")return"[Function "+(t.name||"anonymous")+"]";if(n==="symbol")return rYe.call(t).replace(sYe,"Symbol($1)");const r=eYe.call(t).slice(8,-1);return r==="Date"?isNaN(t.getTime())?""+t:t.toISOString(t):r==="Error"||t instanceof Error?"["+tYe.call(t)+"]":r==="RegExp"?nYe.call(t):null}function bm(t,e){let n=tV(t,e);return n!==null?n:JSON.stringify(t,function(r,s){let o=tV(this[r],e);return o!==null?o:s},2)}let cf={default:"${path} is invalid",required:"${path} is a required field",oneOf:"${path} must be one of the following values: ${values}",notOneOf:"${path} must not be one of the following values: ${values}",notType:({path:t,type:e,value:n,originalValue:r})=>{let s=r!=null&&r!==n,o=`${t} must be a \`${e}\` type, but the final value was: \`${bm(n,!0)}\``+(s?` (cast from the value \`${bm(r,!0)}\`).`:".");return n===null&&(o+='\n If "null" is intended as an empty value be sure to mark the schema as `.nullable()`'),o},defined:"${path} must be defined"},pa={length:"${path} must be exactly ${length} characters",min:"${path} must be at least ${min} characters",max:"${path} must be at most ${max} characters",matches:'${path} must match the following: "${regex}"',email:"${path} must be a valid email",url:"${path} must be a valid URL",uuid:"${path} must be a valid UUID",trim:"${path} must be a trimmed string",lowercase:"${path} must be a lowercase string",uppercase:"${path} must be a upper case string"},Au={min:"${path} must be greater than or equal to ${min}",max:"${path} must be less than or equal to ${max}",lessThan:"${path} must be less than ${less}",moreThan:"${path} must be greater than ${more}",positive:"${path} must be a positive number",negative:"${path} must be a negative number",integer:"${path} must be an integer"},DM={min:"${path} field must be later than ${min}",max:"${path} field must be at earlier than ${max}"},IM={isValue:"${path} field must be ${value}"},OM={noUnknown:"${path} field has unspecified keys: ${unknown}"},Ox={min:"${path} field must have at least ${min} items",max:"${path} field must have less than or equal to ${max} items",length:"${path} must have ${length} items"};Object.assign(Object.create(null),{mixed:cf,string:pa,number:Au,date:DM,object:OM,array:Ox,boolean:IM});var R9,nV;function iYe(){if(nV)return R9;nV=1;var t=Object.prototype,e=t.hasOwnProperty;function n(r,s){return r!=null&&e.call(r,s)}return R9=n,R9}var D9,rV;function Ld(){if(rV)return D9;rV=1;var t=Array.isArray;return D9=t,D9}var I9,sV;function Toe(){if(sV)return I9;sV=1;var t=typeof Ev=="object"&&Ev&&Ev.Object===Object&&Ev;return I9=t,I9}var O9,oV;function Gc(){if(oV)return O9;oV=1;var t=Toe(),e=typeof self=="object"&&self&&self.Object===Object&&self,n=t||e||Function("return this")();return O9=n,O9}var N9,iV;function QS(){if(iV)return N9;iV=1;var t=Gc(),e=t.Symbol;return N9=e,N9}var L9,aV;function aYe(){if(aV)return L9;aV=1;var t=QS(),e=Object.prototype,n=e.hasOwnProperty,r=e.toString,s=t?t.toStringTag:void 0;function o(i){var a=n.call(i,s),l=i[s];try{i[s]=void 0;var c=!0}catch{}var u=r.call(i);return c&&(a?i[s]=l:delete i[s]),u}return L9=o,L9}var $9,lV;function lYe(){if(lV)return $9;lV=1;var t=Object.prototype,e=t.toString;function n(r){return e.call(r)}return $9=n,$9}var F9,cV;function cy(){if(cV)return F9;cV=1;var t=QS(),e=aYe(),n=lYe(),r="[object Null]",s="[object Undefined]",o=t?t.toStringTag:void 0;function i(a){return a==null?a===void 0?s:r:o&&o in Object(a)?e(a):n(a)}return F9=i,F9}var z9,uV;function uy(){if(uV)return z9;uV=1;function t(e){return e!=null&&typeof e=="object"}return z9=t,z9}var P9,dV;function VD(){if(dV)return P9;dV=1;var t=cy(),e=uy(),n="[object Symbol]";function r(s){return typeof s=="symbol"||e(s)&&t(s)==n}return P9=r,P9}var B9,fV;function qD(){if(fV)return B9;fV=1;var t=Ld(),e=VD(),n=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,r=/^\w*$/;function s(o,i){if(t(o))return!1;var a=typeof o;return a=="number"||a=="symbol"||a=="boolean"||o==null||e(o)?!0:r.test(o)||!n.test(o)||i!=null&&o in Object(i)}return B9=s,B9}var H9,pV;function WD(){if(pV)return H9;pV=1;function t(e){var n=typeof e;return e!=null&&(n=="object"||n=="function")}return H9=t,H9}var U9,hV;function Moe(){if(hV)return U9;hV=1;var t=cy(),e=WD(),n="[object AsyncFunction]",r="[object Function]",s="[object GeneratorFunction]",o="[object Proxy]";function i(a){if(!e(a))return!1;var l=t(a);return l==r||l==s||l==n||l==o}return U9=i,U9}var V9,mV;function cYe(){if(mV)return V9;mV=1;var t=Gc(),e=t["__core-js_shared__"];return V9=e,V9}var q9,gV;function uYe(){if(gV)return q9;gV=1;var t=cYe(),e=(function(){var r=/[^.]+$/.exec(t&&t.keys&&t.keys.IE_PROTO||"");return r?"Symbol(src)_1."+r:""})();function n(r){return!!e&&e in r}return q9=n,q9}var W9,yV;function joe(){if(yV)return W9;yV=1;var t=Function.prototype,e=t.toString;function n(r){if(r!=null){try{return e.call(r)}catch{}try{return r+""}catch{}}return""}return W9=n,W9}var Y9,vV;function dYe(){if(vV)return Y9;vV=1;var t=Moe(),e=uYe(),n=WD(),r=joe(),s=/[\\^$.*+?()[\]{}|]/g,o=/^\[object .+?Constructor\]$/,i=Function.prototype,a=Object.prototype,l=i.toString,c=a.hasOwnProperty,u=RegExp("^"+l.call(c).replace(s,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function f(h){if(!n(h)||e(h))return!1;var m=t(h)?u:o;return m.test(r(h))}return Y9=f,Y9}var G9,bV;function fYe(){if(bV)return G9;bV=1;function t(e,n){return e==null?void 0:e[n]}return G9=t,G9}var K9,xV;function gp(){if(xV)return K9;xV=1;var t=dYe(),e=fYe();function n(r,s){var o=e(r,s);return t(o)?o:void 0}return K9=n,K9}var X9,wV;function JS(){if(wV)return X9;wV=1;var t=gp(),e=t(Object,"create");return X9=e,X9}var Z9,SV;function pYe(){if(SV)return Z9;SV=1;var t=JS();function e(){this.__data__=t?t(null):{},this.size=0}return Z9=e,Z9}var Q9,CV;function hYe(){if(CV)return Q9;CV=1;function t(e){var n=this.has(e)&&delete this.__data__[e];return this.size-=n?1:0,n}return Q9=t,Q9}var J9,kV;function mYe(){if(kV)return J9;kV=1;var t=JS(),e="__lodash_hash_undefined__",n=Object.prototype,r=n.hasOwnProperty;function s(o){var i=this.__data__;if(t){var a=i[o];return a===e?void 0:a}return r.call(i,o)?i[o]:void 0}return J9=s,J9}var e8,EV;function gYe(){if(EV)return e8;EV=1;var t=JS(),e=Object.prototype,n=e.hasOwnProperty;function r(s){var o=this.__data__;return t?o[s]!==void 0:n.call(o,s)}return e8=r,e8}var t8,TV;function yYe(){if(TV)return t8;TV=1;var t=JS(),e="__lodash_hash_undefined__";function n(r,s){var o=this.__data__;return this.size+=this.has(r)?0:1,o[r]=t&&s===void 0?e:s,this}return t8=n,t8}var n8,MV;function vYe(){if(MV)return n8;MV=1;var t=pYe(),e=hYe(),n=mYe(),r=gYe(),s=yYe();function o(i){var a=-1,l=i==null?0:i.length;for(this.clear();++a<l;){var c=i[a];this.set(c[0],c[1])}}return o.prototype.clear=t,o.prototype.delete=e,o.prototype.get=n,o.prototype.has=r,o.prototype.set=s,n8=o,n8}var r8,jV;function bYe(){if(jV)return r8;jV=1;function t(){this.__data__=[],this.size=0}return r8=t,r8}var s8,AV;function Aoe(){if(AV)return s8;AV=1;function t(e,n){return e===n||e!==e&&n!==n}return s8=t,s8}var o8,_V;function eC(){if(_V)return o8;_V=1;var t=Aoe();function e(n,r){for(var s=n.length;s--;)if(t(n[s][0],r))return s;return-1}return o8=e,o8}var i8,RV;function xYe(){if(RV)return i8;RV=1;var t=eC(),e=Array.prototype,n=e.splice;function r(s){var o=this.__data__,i=t(o,s);if(i<0)return!1;var a=o.length-1;return i==a?o.pop():n.call(o,i,1),--this.size,!0}return i8=r,i8}var a8,DV;function wYe(){if(DV)return a8;DV=1;var t=eC();function e(n){var r=this.__data__,s=t(r,n);return s<0?void 0:r[s][1]}return a8=e,a8}var l8,IV;function SYe(){if(IV)return l8;IV=1;var t=eC();function e(n){return t(this.__data__,n)>-1}return l8=e,l8}var c8,OV;function CYe(){if(OV)return c8;OV=1;var t=eC();function e(n,r){var s=this.__data__,o=t(s,n);return o<0?(++this.size,s.push([n,r])):s[o][1]=r,this}return c8=e,c8}var u8,NV;function tC(){if(NV)return u8;NV=1;var t=bYe(),e=xYe(),n=wYe(),r=SYe(),s=CYe();function o(i){var a=-1,l=i==null?0:i.length;for(this.clear();++a<l;){var c=i[a];this.set(c[0],c[1])}}return o.prototype.clear=t,o.prototype.delete=e,o.prototype.get=n,o.prototype.has=r,o.prototype.set=s,u8=o,u8}var d8,LV;function YD(){if(LV)return d8;LV=1;var t=gp(),e=Gc(),n=t(e,"Map");return d8=n,d8}var f8,$V;function kYe(){if($V)return f8;$V=1;var t=vYe(),e=tC(),n=YD();function r(){this.size=0,this.__data__={hash:new t,map:new(n||e),string:new t}}return f8=r,f8}var p8,FV;function EYe(){if(FV)return p8;FV=1;function t(e){var n=typeof e;return n=="string"||n=="number"||n=="symbol"||n=="boolean"?e!=="__proto__":e===null}return p8=t,p8}var h8,zV;function nC(){if(zV)return h8;zV=1;var t=EYe();function e(n,r){var s=n.__data__;return t(r)?s[typeof r=="string"?"string":"hash"]:s.map}return h8=e,h8}var m8,PV;function TYe(){if(PV)return m8;PV=1;var t=nC();function e(n){var r=t(this,n).delete(n);return this.size-=r?1:0,r}return m8=e,m8}var g8,BV;function MYe(){if(BV)return g8;BV=1;var t=nC();function e(n){return t(this,n).get(n)}return g8=e,g8}var y8,HV;function jYe(){if(HV)return y8;HV=1;var t=nC();function e(n){return t(this,n).has(n)}return y8=e,y8}var v8,UV;function AYe(){if(UV)return v8;UV=1;var t=nC();function e(n,r){var s=t(this,n),o=s.size;return s.set(n,r),this.size+=s.size==o?0:1,this}return v8=e,v8}var b8,VV;function GD(){if(VV)return b8;VV=1;var t=kYe(),e=TYe(),n=MYe(),r=jYe(),s=AYe();function o(i){var a=-1,l=i==null?0:i.length;for(this.clear();++a<l;){var c=i[a];this.set(c[0],c[1])}}return o.prototype.clear=t,o.prototype.delete=e,o.prototype.get=n,o.prototype.has=r,o.prototype.set=s,b8=o,b8}var x8,qV;function _Ye(){if(qV)return x8;qV=1;var t=GD(),e="Expected a function";function n(r,s){if(typeof r!="function"||s!=null&&typeof s!="function")throw new TypeError(e);var o=function(){var i=arguments,a=s?s.apply(this,i):i[0],l=o.cache;if(l.has(a))return l.get(a);var c=r.apply(this,i);return o.cache=l.set(a,c)||l,c};return o.cache=new(n.Cache||t),o}return n.Cache=t,x8=n,x8}var w8,WV;function RYe(){if(WV)return w8;WV=1;var t=_Ye(),e=500;function n(r){var s=t(r,function(i){return o.size===e&&o.clear(),i}),o=s.cache;return s}return w8=n,w8}var S8,YV;function DYe(){if(YV)return S8;YV=1;var t=RYe(),e=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,n=/\\(\\)?/g,r=t(function(s){var o=[];return s.charCodeAt(0)===46&&o.push(""),s.replace(e,function(i,a,l,c){o.push(l?c.replace(n,"$1"):a||i)}),o});return S8=r,S8}var C8,GV;function IYe(){if(GV)return C8;GV=1;function t(e,n){for(var r=-1,s=e==null?0:e.length,o=Array(s);++r<s;)o[r]=n(e[r],r,e);return o}return C8=t,C8}var k8,KV;function OYe(){if(KV)return k8;KV=1;var t=QS(),e=IYe(),n=Ld(),r=VD(),s=t?t.prototype:void 0,o=s?s.toString:void 0;function i(a){if(typeof a=="string")return a;if(n(a))return e(a,i)+"";if(r(a))return o?o.call(a):"";var l=a+"";return l=="0"&&1/a==-1/0?"-0":l}return k8=i,k8}var E8,XV;function dy(){if(XV)return E8;XV=1;var t=OYe();function e(n){return n==null?"":t(n)}return E8=e,E8}var T8,ZV;function _oe(){if(ZV)return T8;ZV=1;var t=Ld(),e=qD(),n=DYe(),r=dy();function s(o,i){return t(o)?o:e(o,i)?[o]:n(r(o))}return T8=s,T8}var M8,QV;function NYe(){if(QV)return M8;QV=1;var t=cy(),e=uy(),n="[object Arguments]";function r(s){return e(s)&&t(s)==n}return M8=r,M8}var j8,JV;function Roe(){if(JV)return j8;JV=1;var t=NYe(),e=uy(),n=Object.prototype,r=n.hasOwnProperty,s=n.propertyIsEnumerable,o=t((function(){return arguments})())?t:function(i){return e(i)&&r.call(i,"callee")&&!s.call(i,"callee")};return j8=o,j8}var A8,eq;function Doe(){if(eq)return A8;eq=1;var t=9007199254740991,e=/^(?:0|[1-9]\d*)$/;function n(r,s){var o=typeof r;return s=s??t,!!s&&(o=="number"||o!="symbol"&&e.test(r))&&r>-1&&r%1==0&&r<s}return A8=n,A8}var _8,tq;function KD(){if(tq)return _8;tq=1;var t=9007199254740991;function e(n){return typeof n=="number"&&n>-1&&n%1==0&&n<=t}return _8=e,_8}var R8,nq;function rC(){if(nq)return R8;nq=1;var t=VD();function e(n){if(typeof n=="string"||t(n))return n;var r=n+"";return r=="0"&&1/n==-1/0?"-0":r}return R8=e,R8}var D8,rq;function Ioe(){if(rq)return D8;rq=1;var t=_oe(),e=Roe(),n=Ld(),r=Doe(),s=KD(),o=rC();function i(a,l,c){l=t(l,a);for(var u=-1,f=l.length,h=!1;++u<f;){var m=o(l[u]);if(!(h=a!=null&&c(a,m)))break;a=a[m]}return h||++u!=f?h:(f=a==null?0:a.length,!!f&&s(f)&&r(m,f)&&(n(a)||e(a)))}return D8=i,D8}var I8,sq;function LYe(){if(sq)return I8;sq=1;var t=iYe(),e=Ioe();function n(r,s){return r!=null&&e(r,s,t)}return I8=n,I8}var $Ye=LYe();const Ew=ks($Ye),XD=t=>t&&t.__isYupSchema__;class FYe{constructor(e,n){if(this.fn=void 0,this.refs=e,this.refs=e,typeof n=="function"){this.fn=n;return}if(!Ew(n,"is"))throw new TypeError("`is:` is required for `when()` conditions");if(!n.then&&!n.otherwise)throw new TypeError("either `then:` or `otherwise:` is required for `when()` conditions");let{is:r,then:s,otherwise:o}=n,i=typeof r=="function"?r:(...a)=>a.every(l=>l===r);this.fn=function(...a){let l=a.pop(),c=a.pop(),u=i(...a)?s:o;if(u)return typeof u=="function"?u(c):c.concat(u.resolve(l))}}resolve(e,n){let r=this.refs.map(o=>o.getValue(n==null?void 0:n.value,n==null?void 0:n.parent,n==null?void 0:n.context)),s=this.fn.apply(e,r.concat(e,n));if(s===void 0||s===e)return e;if(!XD(s))throw new TypeError("conditions must return a schema object");return s.resolve(n)}}function Ooe(t){return t==null?[]:[].concat(t)}function NM(){return NM=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},NM.apply(this,arguments)}let zYe=/\$\{\s*(\w+)\s*\}/g;class Zo extends Error{static formatError(e,n){const r=n.label||n.path||"this";return r!==n.path&&(n=NM({},n,{path:r})),typeof e=="string"?e.replace(zYe,(s,o)=>bm(n[o])):typeof e=="function"?e(n):e}static isError(e){return e&&e.name==="ValidationError"}constructor(e,n,r,s){super(),this.value=void 0,this.path=void 0,this.type=void 0,this.errors=void 0,this.params=void 0,this.inner=void 0,this.name="ValidationError",this.value=n,this.path=r,this.type=s,this.errors=[],this.inner=[],Ooe(e).forEach(o=>{Zo.isError(o)?(this.errors.push(...o.errors),this.inner=this.inner.concat(o.inner.length?o.inner:o)):this.errors.push(o)}),this.message=this.errors.length>1?`${this.errors.length} errors occurred`:this.errors[0],Error.captureStackTrace&&Error.captureStackTrace(this,Zo)}}const PYe=t=>{let e=!1;return(...n)=>{e||(e=!0,t(...n))}};function Tw(t,e){let{endEarly:n,tests:r,args:s,value:o,errors:i,sort:a,path:l}=t,c=PYe(e),u=r.length;const f=[];if(i=i||[],!u)return i.length?c(new Zo(i,o,l)):c(null,o);for(let h=0;h<r.length;h++){const m=r[h];m(s,function(v){if(v){if(!Zo.isError(v))return c(v,o);if(n)return v.value=o,c(v,o);f.push(v)}if(--u<=0){if(f.length&&(a&&f.sort(a),i.length&&f.push(...i),i=f),i.length){c(new Zo(i,o,l),o);return}c(null,o)}})}}var O8,oq;function BYe(){if(oq)return O8;oq=1;var t=gp(),e=(function(){try{var n=t(Object,"defineProperty");return n({},"",{}),n}catch{}})();return O8=e,O8}var N8,iq;function Noe(){if(iq)return N8;iq=1;var t=BYe();function e(n,r,s){r=="__proto__"&&t?t(n,r,{configurable:!0,enumerable:!0,value:s,writable:!0}):n[r]=s}return N8=e,N8}var L8,aq;function HYe(){if(aq)return L8;aq=1;function t(e){return function(n,r,s){for(var o=-1,i=Object(n),a=s(n),l=a.length;l--;){var c=a[e?l:++o];if(r(i[c],c,i)===!1)break}return n}}return L8=t,L8}var $8,lq;function UYe(){if(lq)return $8;lq=1;var t=HYe(),e=t();return $8=e,$8}var F8,cq;function VYe(){if(cq)return F8;cq=1;function t(e,n){for(var r=-1,s=Array(e);++r<e;)s[r]=n(r);return s}return F8=t,F8}var L0={exports:{}},z8,uq;function qYe(){if(uq)return z8;uq=1;function t(){return!1}return z8=t,z8}L0.exports;var dq;function Loe(){return dq||(dq=1,(function(t,e){var n=Gc(),r=qYe(),s=e&&!e.nodeType&&e,o=s&&!0&&t&&!t.nodeType&&t,i=o&&o.exports===s,a=i?n.Buffer:void 0,l=a?a.isBuffer:void 0,c=l||r;t.exports=c})(L0,L0.exports)),L0.exports}var P8,fq;function WYe(){if(fq)return P8;fq=1;var t=cy(),e=KD(),n=uy(),r="[object Arguments]",s="[object Array]",o="[object Boolean]",i="[object Date]",a="[object Error]",l="[object Function]",c="[object Map]",u="[object Number]",f="[object Object]",h="[object RegExp]",m="[object Set]",y="[object String]",v="[object WeakMap]",b="[object ArrayBuffer]",w="[object DataView]",C="[object Float32Array]",k="[object Float64Array]",E="[object Int8Array]",j="[object Int16Array]",A="[object Int32Array]",M="[object Uint8Array]",_="[object Uint8ClampedArray]",D="[object Uint16Array]",R="[object Uint32Array]",N={};N[C]=N[k]=N[E]=N[j]=N[A]=N[M]=N[_]=N[D]=N[R]=!0,N[r]=N[s]=N[b]=N[o]=N[w]=N[i]=N[a]=N[l]=N[c]=N[u]=N[f]=N[h]=N[m]=N[y]=N[v]=!1;function z(B){return n(B)&&e(B.length)&&!!N[t(B)]}return P8=z,P8}var B8,pq;function YYe(){if(pq)return B8;pq=1;function t(e){return function(n){return e(n)}}return B8=t,B8}var $0={exports:{}};$0.exports;var hq;function GYe(){return hq||(hq=1,(function(t,e){var n=Toe(),r=e&&!e.nodeType&&e,s=r&&!0&&t&&!t.nodeType&&t,o=s&&s.exports===r,i=o&&n.process,a=(function(){try{var l=s&&s.require&&s.require("util").types;return l||i&&i.binding&&i.binding("util")}catch{}})();t.exports=a})($0,$0.exports)),$0.exports}var H8,mq;function $oe(){if(mq)return H8;mq=1;var t=WYe(),e=YYe(),n=GYe(),r=n&&n.isTypedArray,s=r?e(r):t;return H8=s,H8}var U8,gq;function KYe(){if(gq)return U8;gq=1;var t=VYe(),e=Roe(),n=Ld(),r=Loe(),s=Doe(),o=$oe(),i=Object.prototype,a=i.hasOwnProperty;function l(c,u){var f=n(c),h=!f&&e(c),m=!f&&!h&&r(c),y=!f&&!h&&!m&&o(c),v=f||h||m||y,b=v?t(c.length,String):[],w=b.length;for(var C in c)(u||a.call(c,C))&&!(v&&(C=="length"||m&&(C=="offset"||C=="parent")||y&&(C=="buffer"||C=="byteLength"||C=="byteOffset")||s(C,w)))&&b.push(C);return b}return U8=l,U8}var V8,yq;function XYe(){if(yq)return V8;yq=1;var t=Object.prototype;function e(n){var r=n&&n.constructor,s=typeof r=="function"&&r.prototype||t;return n===s}return V8=e,V8}var q8,vq;function ZYe(){if(vq)return q8;vq=1;function t(e,n){return function(r){return e(n(r))}}return q8=t,q8}var W8,bq;function QYe(){if(bq)return W8;bq=1;var t=ZYe(),e=t(Object.keys,Object);return W8=e,W8}var Y8,xq;function JYe(){if(xq)return Y8;xq=1;var t=XYe(),e=QYe(),n=Object.prototype,r=n.hasOwnProperty;function s(o){if(!t(o))return e(o);var i=[];for(var a in Object(o))r.call(o,a)&&a!="constructor"&&i.push(a);return i}return Y8=s,Y8}var G8,wq;function eGe(){if(wq)return G8;wq=1;var t=Moe(),e=KD();function n(r){return r!=null&&e(r.length)&&!t(r)}return G8=n,G8}var K8,Sq;function ZD(){if(Sq)return K8;Sq=1;var t=KYe(),e=JYe(),n=eGe();function r(s){return n(s)?t(s):e(s)}return K8=r,K8}var X8,Cq;function Foe(){if(Cq)return X8;Cq=1;var t=UYe(),e=ZD();function n(r,s){return r&&t(r,s,e)}return X8=n,X8}var Z8,kq;function tGe(){if(kq)return Z8;kq=1;var t=tC();function e(){this.__data__=new t,this.size=0}return Z8=e,Z8}var Q8,Eq;function nGe(){if(Eq)return Q8;Eq=1;function t(e){var n=this.__data__,r=n.delete(e);return this.size=n.size,r}return Q8=t,Q8}var J8,Tq;function rGe(){if(Tq)return J8;Tq=1;function t(e){return this.__data__.get(e)}return J8=t,J8}var e7,Mq;function sGe(){if(Mq)return e7;Mq=1;function t(e){return this.__data__.has(e)}return e7=t,e7}var t7,jq;function oGe(){if(jq)return t7;jq=1;var t=tC(),e=YD(),n=GD(),r=200;function s(o,i){var a=this.__data__;if(a instanceof t){var l=a.__data__;if(!e||l.length<r-1)return l.push([o,i]),this.size=++a.size,this;a=this.__data__=new n(l)}return a.set(o,i),this.size=a.size,this}return t7=s,t7}var n7,Aq;function zoe(){if(Aq)return n7;Aq=1;var t=tC(),e=tGe(),n=nGe(),r=rGe(),s=sGe(),o=oGe();function i(a){var l=this.__data__=new t(a);this.size=l.size}return i.prototype.clear=e,i.prototype.delete=n,i.prototype.get=r,i.prototype.has=s,i.prototype.set=o,n7=i,n7}var r7,_q;function iGe(){if(_q)return r7;_q=1;var t="__lodash_hash_undefined__";function e(n){return this.__data__.set(n,t),this}return r7=e,r7}var s7,Rq;function aGe(){if(Rq)return s7;Rq=1;function t(e){return this.__data__.has(e)}return s7=t,s7}var o7,Dq;function lGe(){if(Dq)return o7;Dq=1;var t=GD(),e=iGe(),n=aGe();function r(s){var o=-1,i=s==null?0:s.length;for(this.__data__=new t;++o<i;)this.add(s[o])}return r.prototype.add=r.prototype.push=e,r.prototype.has=n,o7=r,o7}var i7,Iq;function cGe(){if(Iq)return i7;Iq=1;function t(e,n){for(var r=-1,s=e==null?0:e.length;++r<s;)if(n(e[r],r,e))return!0;return!1}return i7=t,i7}var a7,Oq;function uGe(){if(Oq)return a7;Oq=1;function t(e,n){return e.has(n)}return a7=t,a7}var l7,Nq;function Poe(){if(Nq)return l7;Nq=1;var t=lGe(),e=cGe(),n=uGe(),r=1,s=2;function o(i,a,l,c,u,f){var h=l&r,m=i.length,y=a.length;if(m!=y&&!(h&&y>m))return!1;var v=f.get(i),b=f.get(a);if(v&&b)return v==a&&b==i;var w=-1,C=!0,k=l&s?new t:void 0;for(f.set(i,a),f.set(a,i);++w<m;){var E=i[w],j=a[w];if(c)var A=h?c(j,E,w,a,i,f):c(E,j,w,i,a,f);if(A!==void 0){if(A)continue;C=!1;break}if(k){if(!e(a,function(M,_){if(!n(k,_)&&(E===M||u(E,M,l,c,f)))return k.push(_)})){C=!1;break}}else if(!(E===j||u(E,j,l,c,f))){C=!1;break}}return f.delete(i),f.delete(a),C}return l7=o,l7}var c7,Lq;function dGe(){if(Lq)return c7;Lq=1;var t=Gc(),e=t.Uint8Array;return c7=e,c7}var u7,$q;function fGe(){if($q)return u7;$q=1;function t(e){var n=-1,r=Array(e.size);return e.forEach(function(s,o){r[++n]=[o,s]}),r}return u7=t,u7}var d7,Fq;function pGe(){if(Fq)return d7;Fq=1;function t(e){var n=-1,r=Array(e.size);return e.forEach(function(s){r[++n]=s}),r}return d7=t,d7}var f7,zq;function hGe(){if(zq)return f7;zq=1;var t=QS(),e=dGe(),n=Aoe(),r=Poe(),s=fGe(),o=pGe(),i=1,a=2,l="[object Boolean]",c="[object Date]",u="[object Error]",f="[object Map]",h="[object Number]",m="[object RegExp]",y="[object Set]",v="[object String]",b="[object Symbol]",w="[object ArrayBuffer]",C="[object DataView]",k=t?t.prototype:void 0,E=k?k.valueOf:void 0;function j(A,M,_,D,R,N,z){switch(_){case C:if(A.byteLength!=M.byteLength||A.byteOffset!=M.byteOffset)return!1;A=A.buffer,M=M.buffer;case w:return!(A.byteLength!=M.byteLength||!N(new e(A),new e(M)));case l:case c:case h:return n(+A,+M);case u:return A.name==M.name&&A.message==M.message;case m:case v:return A==M+"";case f:var B=s;case y:var L=D&i;if(B||(B=o),A.size!=M.size&&!L)return!1;var P=z.get(A);if(P)return P==M;D|=a,z.set(A,M);var I=r(B(A),B(M),D,R,N,z);return z.delete(A),I;case b:if(E)return E.call(A)==E.call(M)}return!1}return f7=j,f7}var p7,Pq;function mGe(){if(Pq)return p7;Pq=1;function t(e,n){for(var r=-1,s=n.length,o=e.length;++r<s;)e[o+r]=n[r];return e}return p7=t,p7}var h7,Bq;function gGe(){if(Bq)return h7;Bq=1;var t=mGe(),e=Ld();function n(r,s,o){var i=s(r);return e(r)?i:t(i,o(r))}return h7=n,h7}var m7,Hq;function yGe(){if(Hq)return m7;Hq=1;function t(e,n){for(var r=-1,s=e==null?0:e.length,o=0,i=[];++r<s;){var a=e[r];n(a,r,e)&&(i[o++]=a)}return i}return m7=t,m7}var g7,Uq;function vGe(){if(Uq)return g7;Uq=1;function t(){return[]}return g7=t,g7}var y7,Vq;function bGe(){if(Vq)return y7;Vq=1;var t=yGe(),e=vGe(),n=Object.prototype,r=n.propertyIsEnumerable,s=Object.getOwnPropertySymbols,o=s?function(i){return i==null?[]:(i=Object(i),t(s(i),function(a){return r.call(i,a)}))}:e;return y7=o,y7}var v7,qq;function xGe(){if(qq)return v7;qq=1;var t=gGe(),e=bGe(),n=ZD();function r(s){return t(s,n,e)}return v7=r,v7}var b7,Wq;function wGe(){if(Wq)return b7;Wq=1;var t=xGe(),e=1,n=Object.prototype,r=n.hasOwnProperty;function s(o,i,a,l,c,u){var f=a&e,h=t(o),m=h.length,y=t(i),v=y.length;if(m!=v&&!f)return!1;for(var b=m;b--;){var w=h[b];if(!(f?w in i:r.call(i,w)))return!1}var C=u.get(o),k=u.get(i);if(C&&k)return C==i&&k==o;var E=!0;u.set(o,i),u.set(i,o);for(var j=f;++b<m;){w=h[b];var A=o[w],M=i[w];if(l)var _=f?l(M,A,w,i,o,u):l(A,M,w,o,i,u);if(!(_===void 0?A===M||c(A,M,a,l,u):_)){E=!1;break}j||(j=w=="constructor")}if(E&&!j){var D=o.constructor,R=i.constructor;D!=R&&"constructor"in o&&"constructor"in i&&!(typeof D=="function"&&D instanceof D&&typeof R=="function"&&R instanceof R)&&(E=!1)}return u.delete(o),u.delete(i),E}return b7=s,b7}var x7,Yq;function SGe(){if(Yq)return x7;Yq=1;var t=gp(),e=Gc(),n=t(e,"DataView");return x7=n,x7}var w7,Gq;function CGe(){if(Gq)return w7;Gq=1;var t=gp(),e=Gc(),n=t(e,"Promise");return w7=n,w7}var S7,Kq;function kGe(){if(Kq)return S7;Kq=1;var t=gp(),e=Gc(),n=t(e,"Set");return S7=n,S7}var C7,Xq;function EGe(){if(Xq)return C7;Xq=1;var t=gp(),e=Gc(),n=t(e,"WeakMap");return C7=n,C7}var k7,Zq;function TGe(){if(Zq)return k7;Zq=1;var t=SGe(),e=YD(),n=CGe(),r=kGe(),s=EGe(),o=cy(),i=joe(),a="[object Map]",l="[object Object]",c="[object Promise]",u="[object Set]",f="[object WeakMap]",h="[object DataView]",m=i(t),y=i(e),v=i(n),b=i(r),w=i(s),C=o;return(t&&C(new t(new ArrayBuffer(1)))!=h||e&&C(new e)!=a||n&&C(n.resolve())!=c||r&&C(new r)!=u||s&&C(new s)!=f)&&(C=function(k){var E=o(k),j=E==l?k.constructor:void 0,A=j?i(j):"";if(A)switch(A){case m:return h;case y:return a;case v:return c;case b:return u;case w:return f}return E}),k7=C,k7}var E7,Qq;function MGe(){if(Qq)return E7;Qq=1;var t=zoe(),e=Poe(),n=hGe(),r=wGe(),s=TGe(),o=Ld(),i=Loe(),a=$oe(),l=1,c="[object Arguments]",u="[object Array]",f="[object Object]",h=Object.prototype,m=h.hasOwnProperty;function y(v,b,w,C,k,E){var j=o(v),A=o(b),M=j?u:s(v),_=A?u:s(b);M=M==c?f:M,_=_==c?f:_;var D=M==f,R=_==f,N=M==_;if(N&&i(v)){if(!i(b))return!1;j=!0,D=!1}if(N&&!D)return E||(E=new t),j||a(v)?e(v,b,w,C,k,E):n(v,b,M,w,C,k,E);if(!(w&l)){var z=D&&m.call(v,"__wrapped__"),B=R&&m.call(b,"__wrapped__");if(z||B){var L=z?v.value():v,P=B?b.value():b;return E||(E=new t),k(L,P,w,C,E)}}return N?(E||(E=new t),r(v,b,w,C,k,E)):!1}return E7=y,E7}var T7,Jq;function Boe(){if(Jq)return T7;Jq=1;var t=MGe(),e=uy();function n(r,s,o,i,a){return r===s?!0:r==null||s==null||!e(r)&&!e(s)?r!==r&&s!==s:t(r,s,o,i,n,a)}return T7=n,T7}var M7,eW;function jGe(){if(eW)return M7;eW=1;var t=zoe(),e=Boe(),n=1,r=2;function s(o,i,a,l){var c=a.length,u=c,f=!l;if(o==null)return!u;for(o=Object(o);c--;){var h=a[c];if(f&&h[2]?h[1]!==o[h[0]]:!(h[0]in o))return!1}for(;++c<u;){h=a[c];var m=h[0],y=o[m],v=h[1];if(f&&h[2]){if(y===void 0&&!(m in o))return!1}else{var b=new t;if(l)var w=l(y,v,m,o,i,b);if(!(w===void 0?e(v,y,n|r,l,b):w))return!1}}return!0}return M7=s,M7}var j7,tW;function Hoe(){if(tW)return j7;tW=1;var t=WD();function e(n){return n===n&&!t(n)}return j7=e,j7}var A7,nW;function AGe(){if(nW)return A7;nW=1;var t=Hoe(),e=ZD();function n(r){for(var s=e(r),o=s.length;o--;){var i=s[o],a=r[i];s[o]=[i,a,t(a)]}return s}return A7=n,A7}var _7,rW;function Uoe(){if(rW)return _7;rW=1;function t(e,n){return function(r){return r==null?!1:r[e]===n&&(n!==void 0||e in Object(r))}}return _7=t,_7}var R7,sW;function _Ge(){if(sW)return R7;sW=1;var t=jGe(),e=AGe(),n=Uoe();function r(s){var o=e(s);return o.length==1&&o[0][2]?n(o[0][0],o[0][1]):function(i){return i===s||t(i,s,o)}}return R7=r,R7}var D7,oW;function Voe(){if(oW)return D7;oW=1;var t=_oe(),e=rC();function n(r,s){s=t(s,r);for(var o=0,i=s.length;r!=null&&o<i;)r=r[e(s[o++])];return o&&o==i?r:void 0}return D7=n,D7}var I7,iW;function RGe(){if(iW)return I7;iW=1;var t=Voe();function e(n,r,s){var o=n==null?void 0:t(n,r);return o===void 0?s:o}return I7=e,I7}var O7,aW;function DGe(){if(aW)return O7;aW=1;function t(e,n){return e!=null&&n in Object(e)}return O7=t,O7}var N7,lW;function IGe(){if(lW)return N7;lW=1;var t=DGe(),e=Ioe();function n(r,s){return r!=null&&e(r,s,t)}return N7=n,N7}var L7,cW;function OGe(){if(cW)return L7;cW=1;var t=Boe(),e=RGe(),n=IGe(),r=qD(),s=Hoe(),o=Uoe(),i=rC(),a=1,l=2;function c(u,f){return r(u)&&s(f)?o(i(u),f):function(h){var m=e(h,u);return m===void 0&&m===f?n(h,u):t(f,m,a|l)}}return L7=c,L7}var $7,uW;function NGe(){if(uW)return $7;uW=1;function t(e){return e}return $7=t,$7}var F7,dW;function LGe(){if(dW)return F7;dW=1;function t(e){return function(n){return n==null?void 0:n[e]}}return F7=t,F7}var z7,fW;function $Ge(){if(fW)return z7;fW=1;var t=Voe();function e(n){return function(r){return t(r,n)}}return z7=e,z7}var P7,pW;function FGe(){if(pW)return P7;pW=1;var t=LGe(),e=$Ge(),n=qD(),r=rC();function s(o){return n(o)?t(r(o)):e(o)}return P7=s,P7}var B7,hW;function qoe(){if(hW)return B7;hW=1;var t=_Ge(),e=OGe(),n=NGe(),r=Ld(),s=FGe();function o(i){return typeof i=="function"?i:i==null?n:typeof i=="object"?r(i)?e(i[0],i[1]):t(i):s(i)}return B7=o,B7}var H7,mW;function zGe(){if(mW)return H7;mW=1;var t=Noe(),e=Foe(),n=qoe();function r(s,o){var i={};return o=n(o,3),e(s,function(a,l,c){t(i,l,o(a,l,c))}),i}return H7=r,H7}var PGe=zGe();const Woe=ks(PGe);var U7,gW;function BGe(){if(gW)return U7;gW=1;function t(w){this._maxSize=w,this.clear()}t.prototype.clear=function(){this._size=0,this._values=Object.create(null)},t.prototype.get=function(w){return this._values[w]},t.prototype.set=function(w,C){return this._size>=this._maxSize&&this.clear(),w in this._values||this._size++,this._values[w]=C};var e=/[^.^\]^[]+|(?=\[\]|\.\.)/g,n=/^\d+$/,r=/^\d/,s=/[~`!#$%\^&*+=\-\[\]\\';,/{}|\\":<>\?]/g,o=/^\s*(['"]?)(.*?)(\1)\s*$/,i=512,a=new t(i),l=new t(i),c=new t(i);U7={Cache:t,split:f,normalizePath:u,setter:function(w){var C=u(w);return l.get(w)||l.set(w,function(E,j){for(var A=0,M=C.length,_=E;A<M-1;){var D=C[A];if(D==="__proto__"||D==="constructor"||D==="prototype")return E;_=_[C[A++]]}_[C[A]]=j})},getter:function(w,C){var k=u(w);return c.get(w)||c.set(w,function(j){for(var A=0,M=k.length;A<M;)if(j!=null||!C)j=j[k[A++]];else return;return j})},join:function(w){return w.reduce(function(C,k){return C+(m(k)||n.test(k)?"["+k+"]":(C?".":"")+k)},"")},forEach:function(w,C,k){h(Array.isArray(w)?w:f(w),C,k)}};function u(w){return a.get(w)||a.set(w,f(w).map(function(C){return C.replace(o,"$2")}))}function f(w){return w.match(e)||[""]}function h(w,C,k){var E=w.length,j,A,M,_;for(A=0;A<E;A++)j=w[A],j&&(b(j)&&(j='"'+j+'"'),_=m(j),M=!_&&/^\d+$/.test(j),C.call(k,j,_,M,A,w))}function m(w){return typeof w=="string"&&w&&["'",'"'].indexOf(w.charAt(0))!==-1}function y(w){return w.match(r)&&!w.match(n)}function v(w){return s.test(w)}function b(w){return!m(w)&&(y(w)||v(w))}return U7}var sC=BGe();const Mb={context:"$",value:"."};class rd{constructor(e,n={}){if(this.key=void 0,this.isContext=void 0,this.isValue=void 0,this.isSibling=void 0,this.path=void 0,this.getter=void 0,this.map=void 0,typeof e!="string")throw new TypeError("ref must be a string, got: "+e);if(this.key=e.trim(),e==="")throw new TypeError("ref must be a non-empty string");this.isContext=this.key[0]===Mb.context,this.isValue=this.key[0]===Mb.value,this.isSibling=!this.isContext&&!this.isValue;let r=this.isContext?Mb.context:this.isValue?Mb.value:"";this.path=this.key.slice(r.length),this.getter=this.path&&sC.getter(this.path,!0),this.map=n.map}getValue(e,n,r){let s=this.isContext?r:this.isValue?e:n;return this.getter&&(s=this.getter(s||{})),this.map&&(s=this.map(s)),s}cast(e,n){return this.getValue(e,n==null?void 0:n.parent,n==null?void 0:n.context)}resolve(){return this}describe(){return{type:"ref",key:this.key}}toString(){return`Ref(${this.key})`}static isRef(e){return e&&e.__isYupRef}}rd.prototype.__isYupRef=!0;function Mw(){return Mw=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Mw.apply(this,arguments)}function HGe(t,e){if(t==null)return{};var n={},r=Object.keys(t),s,o;for(o=0;o<r.length;o++)s=r[o],!(e.indexOf(s)>=0)&&(n[s]=t[s]);return n}function jb(t){function e(n,r){let{value:s,path:o="",label:i,options:a,originalValue:l,sync:c}=n,u=HGe(n,["value","path","label","options","originalValue","sync"]);const{name:f,test:h,params:m,message:y}=t;let{parent:v,context:b}=a;function w(A){return rd.isRef(A)?A.getValue(s,v,b):A}function C(A={}){const M=Woe(Mw({value:s,originalValue:l,label:i,path:A.path||o},m,A.params),w),_=new Zo(Zo.formatError(A.message||y,M),s,M.path,A.type||f);return _.params=M,_}let k=Mw({path:o,parent:v,type:f,createError:C,resolve:w,options:a,originalValue:l},u);if(!c){try{Promise.resolve(h.call(k,s,k)).then(A=>{Zo.isError(A)?r(A):A?r(null,A):r(C())}).catch(r)}catch(A){r(A)}return}let E;try{var j;if(E=h.call(k,s,k),typeof((j=E)==null?void 0:j.then)=="function")throw new Error(`Validation test of type: "${k.type}" returned a Promise during a synchronous validate. This test will finish after the validate call has returned`)}catch(A){r(A);return}Zo.isError(E)?r(E):E?r(null,E):r(C())}return e.OPTIONS=t,e}let UGe=t=>t.substr(0,t.length-1).substr(1);function VGe(t,e,n,r=n){let s,o,i;return e?(sC.forEach(e,(a,l,c)=>{let u=l?UGe(a):a;if(t=t.resolve({context:r,parent:s,value:n}),t.innerType){let f=c?parseInt(u,10):0;if(n&&f>=n.length)throw new Error(`Yup.reach cannot resolve an array item at index: ${a}, in the path: ${e}. because there is no value at that index. `);s=n,n=n&&n[f],t=t.innerType}if(!c){if(!t.fields||!t.fields[u])throw new Error(`The schema does not contain the path: ${e}. (failed at: ${i} which is a type: "${t._type}")`);s=n,n=n&&n[u],t=t.fields[u]}o=u,i=l?"["+a+"]":"."+a}),{schema:t,parent:s,parentPath:o}):{parent:s,parentPath:e,schema:t}}class jw{constructor(){this.list=void 0,this.refs=void 0,this.list=new Set,this.refs=new Map}get size(){return this.list.size+this.refs.size}describe(){const e=[];for(const n of this.list)e.push(n);for(const[,n]of this.refs)e.push(n.describe());return e}toArray(){return Array.from(this.list).concat(Array.from(this.refs.values()))}resolveAll(e){return this.toArray().reduce((n,r)=>n.concat(rd.isRef(r)?e(r):r),[])}add(e){rd.isRef(e)?this.refs.set(e.key,e):this.list.add(e)}delete(e){rd.isRef(e)?this.refs.delete(e.key):this.list.delete(e)}clone(){const e=new jw;return e.list=new Set(this.list),e.refs=new Map(this.refs),e}merge(e,n){const r=this.clone();return e.list.forEach(s=>r.add(s)),e.refs.forEach(s=>r.add(s)),n.list.forEach(s=>r.delete(s)),n.refs.forEach(s=>r.delete(s)),r}}function Bi(){return Bi=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Bi.apply(this,arguments)}class no{constructor(e){this.deps=[],this.tests=void 0,this.transforms=void 0,this.conditions=[],this._mutate=void 0,this._typeError=void 0,this._whitelist=new jw,this._blacklist=new jw,this.exclusiveTests=Object.create(null),this.spec=void 0,this.tests=[],this.transforms=[],this.withMutation(()=>{this.typeError(cf.notType)}),this.type=(e==null?void 0:e.type)||"mixed",this.spec=Bi({strip:!1,strict:!1,abortEarly:!0,recursive:!0,nullable:!1,presence:"optional"},e==null?void 0:e.spec)}get _type(){return this.type}_typeCheck(e){return!0}clone(e){if(this._mutate)return e&&Object.assign(this.spec,e),this;const n=Object.create(Object.getPrototypeOf(this));return n.type=this.type,n._typeError=this._typeError,n._whitelistError=this._whitelistError,n._blacklistError=this._blacklistError,n._whitelist=this._whitelist.clone(),n._blacklist=this._blacklist.clone(),n.exclusiveTests=Bi({},this.exclusiveTests),n.deps=[...this.deps],n.conditions=[...this.conditions],n.tests=[...this.tests],n.transforms=[...this.transforms],n.spec=RM(Bi({},this.spec,e)),n}label(e){let n=this.clone();return n.spec.label=e,n}meta(...e){if(e.length===0)return this.spec.meta;let n=this.clone();return n.spec.meta=Object.assign(n.spec.meta||{},e[0]),n}withMutation(e){let n=this._mutate;this._mutate=!0;let r=e(this);return this._mutate=n,r}concat(e){if(!e||e===this)return this;if(e.type!==this.type&&this.type!=="mixed")throw new TypeError(`You cannot \`concat()\` schema's of different types: ${this.type} and ${e.type}`);let n=this,r=e.clone();const s=Bi({},n.spec,r.spec);return r.spec=s,r._typeError||(r._typeError=n._typeError),r._whitelistError||(r._whitelistError=n._whitelistError),r._blacklistError||(r._blacklistError=n._blacklistError),r._whitelist=n._whitelist.merge(e._whitelist,e._blacklist),r._blacklist=n._blacklist.merge(e._blacklist,e._whitelist),r.tests=n.tests,r.exclusiveTests=n.exclusiveTests,r.withMutation(o=>{e.tests.forEach(i=>{o.test(i.OPTIONS)})}),r.transforms=[...n.transforms,...r.transforms],r}isType(e){return this.spec.nullable&&e===null?!0:this._typeCheck(e)}resolve(e){let n=this;if(n.conditions.length){let r=n.conditions;n=n.clone(),n.conditions=[],n=r.reduce((s,o)=>o.resolve(s,e),n),n=n.resolve(e)}return n}cast(e,n={}){let r=this.resolve(Bi({value:e},n)),s=r._cast(e,n);if(e!==void 0&&n.assert!==!1&&r.isType(s)!==!0){let o=bm(e),i=bm(s);throw new TypeError(`The value of ${n.path||"field"} could not be cast to a value that satisfies the schema type: "${r._type}". 

attempted value: ${o} 
`+(i!==o?`result of cast: ${i}`:""))}return s}_cast(e,n){let r=e===void 0?e:this.transforms.reduce((s,o)=>o.call(this,s,e,this),e);return r===void 0&&(r=this.getDefault()),r}_validate(e,n={},r){let{sync:s,path:o,from:i=[],originalValue:a=e,strict:l=this.spec.strict,abortEarly:c=this.spec.abortEarly}=n,u=e;l||(u=this._cast(u,Bi({assert:!1},n)));let f={value:u,path:o,options:n,originalValue:a,schema:this,label:this.spec.label,sync:s,from:i},h=[];this._typeError&&h.push(this._typeError);let m=[];this._whitelistError&&m.push(this._whitelistError),this._blacklistError&&m.push(this._blacklistError),Tw({args:f,value:u,path:o,tests:h,endEarly:c},y=>{if(y)return void r(y,u);Tw({tests:this.tests.concat(m),args:f,path:o,sync:s,value:u,endEarly:c},r)})}validate(e,n,r){let s=this.resolve(Bi({},n,{value:e}));return typeof r=="function"?s._validate(e,n,r):new Promise((o,i)=>s._validate(e,n,(a,l)=>{a?i(a):o(l)}))}validateSync(e,n){let r=this.resolve(Bi({},n,{value:e})),s;return r._validate(e,Bi({},n,{sync:!0}),(o,i)=>{if(o)throw o;s=i}),s}isValid(e,n){return this.validate(e,n).then(()=>!0,r=>{if(Zo.isError(r))return!1;throw r})}isValidSync(e,n){try{return this.validateSync(e,n),!0}catch(r){if(Zo.isError(r))return!1;throw r}}_getDefault(){let e=this.spec.default;return e==null?e:typeof e=="function"?e.call(this):RM(e)}getDefault(e){return this.resolve(e||{})._getDefault()}default(e){return arguments.length===0?this._getDefault():this.clone({default:e})}strict(e=!0){let n=this.clone();return n.spec.strict=e,n}_isPresent(e){return e!=null}defined(e=cf.defined){return this.test({message:e,name:"defined",exclusive:!0,test(n){return n!==void 0}})}required(e=cf.required){return this.clone({presence:"required"}).withMutation(n=>n.test({message:e,name:"required",exclusive:!0,test(r){return this.schema._isPresent(r)}}))}notRequired(){let e=this.clone({presence:"optional"});return e.tests=e.tests.filter(n=>n.OPTIONS.name!=="required"),e}nullable(e=!0){return this.clone({nullable:e!==!1})}transform(e){let n=this.clone();return n.transforms.push(e),n}test(...e){let n;if(e.length===1?typeof e[0]=="function"?n={test:e[0]}:n=e[0]:e.length===2?n={name:e[0],test:e[1]}:n={name:e[0],message:e[1],test:e[2]},n.message===void 0&&(n.message=cf.default),typeof n.test!="function")throw new TypeError("`test` is a required parameters");let r=this.clone(),s=jb(n),o=n.exclusive||n.name&&r.exclusiveTests[n.name]===!0;if(n.exclusive&&!n.name)throw new TypeError("Exclusive tests must provide a unique `name` identifying the test");return n.name&&(r.exclusiveTests[n.name]=!!n.exclusive),r.tests=r.tests.filter(i=>!(i.OPTIONS.name===n.name&&(o||i.OPTIONS.test===s.OPTIONS.test))),r.tests.push(s),r}when(e,n){!Array.isArray(e)&&typeof e!="string"&&(n=e,e=".");let r=this.clone(),s=Ooe(e).map(o=>new rd(o));return s.forEach(o=>{o.isSibling&&r.deps.push(o.key)}),r.conditions.push(new FYe(s,n)),r}typeError(e){let n=this.clone();return n._typeError=jb({message:e,name:"typeError",test(r){return r!==void 0&&!this.schema.isType(r)?this.createError({params:{type:this.schema._type}}):!0}}),n}oneOf(e,n=cf.oneOf){let r=this.clone();return e.forEach(s=>{r._whitelist.add(s),r._blacklist.delete(s)}),r._whitelistError=jb({message:n,name:"oneOf",test(s){if(s===void 0)return!0;let o=this.schema._whitelist,i=o.resolveAll(this.resolve);return i.includes(s)?!0:this.createError({params:{values:o.toArray().join(", "),resolved:i}})}}),r}notOneOf(e,n=cf.notOneOf){let r=this.clone();return e.forEach(s=>{r._blacklist.add(s),r._whitelist.delete(s)}),r._blacklistError=jb({message:n,name:"notOneOf",test(s){let o=this.schema._blacklist,i=o.resolveAll(this.resolve);return i.includes(s)?this.createError({params:{values:o.toArray().join(", "),resolved:i}}):!0}}),r}strip(e=!0){let n=this.clone();return n.spec.strip=e,n}describe(){const e=this.clone(),{label:n,meta:r}=e.spec;return{meta:r,label:n,type:e.type,oneOf:e._whitelist.describe(),notOneOf:e._blacklist.describe(),tests:e.tests.map(o=>({name:o.OPTIONS.name,params:o.OPTIONS.params})).filter((o,i,a)=>a.findIndex(l=>l.name===o.name)===i)}}}no.prototype.__isYupSchema__=!0;for(const t of["validate","validateSync"])no.prototype[`${t}At`]=function(e,n,r={}){const{parent:s,parentPath:o,schema:i}=VGe(this,e,n,r.context);return i[t](s&&s[o],Bi({},r,{parent:s,path:e}))};for(const t of["equals","is"])no.prototype[t]=no.prototype.oneOf;for(const t of["not","nope"])no.prototype[t]=no.prototype.notOneOf;no.prototype.optional=no.prototype.notRequired;const Yoe=no;function xm(){return new Yoe}xm.prototype=Yoe.prototype;const Hr=t=>t==null;function Ji(){return new Goe}class Goe extends no{constructor(){super({type:"boolean"}),this.withMutation(()=>{this.transform(function(e){if(!this.isType(e)){if(/^(true|1)$/i.test(String(e)))return!0;if(/^(false|0)$/i.test(String(e)))return!1}return e})})}_typeCheck(e){return e instanceof Boolean&&(e=e.valueOf()),typeof e=="boolean"}isTrue(e=IM.isValue){return this.test({message:e,name:"is-value",exclusive:!0,params:{value:"true"},test(n){return Hr(n)||n===!0}})}isFalse(e=IM.isValue){return this.test({message:e,name:"is-value",exclusive:!0,params:{value:"false"},test(n){return Hr(n)||n===!1}})}}Ji.prototype=Goe.prototype;let qGe=/^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))$/i,WGe=/^((https?|ftp):)?\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i,YGe=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i,GGe=t=>Hr(t)||t===t.trim(),KGe={}.toString();function Cc(){return new Koe}class Koe extends no{constructor(){super({type:"string"}),this.withMutation(()=>{this.transform(function(e){if(this.isType(e)||Array.isArray(e))return e;const n=e!=null&&e.toString?e.toString():e;return n===KGe?e:n})})}_typeCheck(e){return e instanceof String&&(e=e.valueOf()),typeof e=="string"}_isPresent(e){return super._isPresent(e)&&!!e.length}length(e,n=pa.length){return this.test({message:n,name:"length",exclusive:!0,params:{length:e},test(r){return Hr(r)||r.length===this.resolve(e)}})}min(e,n=pa.min){return this.test({message:n,name:"min",exclusive:!0,params:{min:e},test(r){return Hr(r)||r.length>=this.resolve(e)}})}max(e,n=pa.max){return this.test({name:"max",exclusive:!0,message:n,params:{max:e},test(r){return Hr(r)||r.length<=this.resolve(e)}})}matches(e,n){let r=!1,s,o;return n&&(typeof n=="object"?{excludeEmptyString:r=!1,message:s,name:o}=n:s=n),this.test({name:o||"matches",message:s||pa.matches,params:{regex:e},test:i=>Hr(i)||i===""&&r||i.search(e)!==-1})}email(e=pa.email){return this.matches(qGe,{name:"email",message:e,excludeEmptyString:!0})}url(e=pa.url){return this.matches(WGe,{name:"url",message:e,excludeEmptyString:!0})}uuid(e=pa.uuid){return this.matches(YGe,{name:"uuid",message:e,excludeEmptyString:!1})}ensure(){return this.default("").transform(e=>e===null?"":e)}trim(e=pa.trim){return this.transform(n=>n!=null?n.trim():n).test({message:e,name:"trim",test:GGe})}lowercase(e=pa.lowercase){return this.transform(n=>Hr(n)?n:n.toLowerCase()).test({message:e,name:"string_case",exclusive:!0,test:n=>Hr(n)||n===n.toLowerCase()})}uppercase(e=pa.uppercase){return this.transform(n=>Hr(n)?n:n.toUpperCase()).test({message:e,name:"string_case",exclusive:!0,test:n=>Hr(n)||n===n.toUpperCase()})}}Cc.prototype=Koe.prototype;let XGe=t=>t!=+t;function Sl(){return new Xoe}class Xoe extends no{constructor(){super({type:"number"}),this.withMutation(()=>{this.transform(function(e){let n=e;if(typeof n=="string"){if(n=n.replace(/\s/g,""),n==="")return NaN;n=+n}return this.isType(n)?n:parseFloat(n)})})}_typeCheck(e){return e instanceof Number&&(e=e.valueOf()),typeof e=="number"&&!XGe(e)}min(e,n=Au.min){return this.test({message:n,name:"min",exclusive:!0,params:{min:e},test(r){return Hr(r)||r>=this.resolve(e)}})}max(e,n=Au.max){return this.test({message:n,name:"max",exclusive:!0,params:{max:e},test(r){return Hr(r)||r<=this.resolve(e)}})}lessThan(e,n=Au.lessThan){return this.test({message:n,name:"max",exclusive:!0,params:{less:e},test(r){return Hr(r)||r<this.resolve(e)}})}moreThan(e,n=Au.moreThan){return this.test({message:n,name:"min",exclusive:!0,params:{more:e},test(r){return Hr(r)||r>this.resolve(e)}})}positive(e=Au.positive){return this.moreThan(0,e)}negative(e=Au.negative){return this.lessThan(0,e)}integer(e=Au.integer){return this.test({name:"integer",message:e,test:n=>Hr(n)||Number.isInteger(n)})}truncate(){return this.transform(e=>Hr(e)?e:e|0)}round(e){var n;let r=["ceil","floor","round","trunc"];if(e=((n=e)==null?void 0:n.toLowerCase())||"round",e==="trunc")return this.truncate();if(r.indexOf(e.toLowerCase())===-1)throw new TypeError("Only valid options for round() are: "+r.join(", "));return this.transform(s=>Hr(s)?s:Math[e](s))}}Sl.prototype=Xoe.prototype;var ZGe=/^(\d{4}|[+\-]\d{6})(?:-?(\d{2})(?:-?(\d{2}))?)?(?:[ T]?(\d{2}):?(\d{2})(?::?(\d{2})(?:[,\.](\d{1,}))?)?(?:(Z)|([+\-])(\d{2})(?::?(\d{2}))?)?)?$/;function QGe(t){var e=[1,4,5,6,7,10,11],n=0,r,s;if(s=ZGe.exec(t)){for(var o=0,i;i=e[o];++o)s[i]=+s[i]||0;s[2]=(+s[2]||1)-1,s[3]=+s[3]||1,s[7]=s[7]?String(s[7]).substr(0,3):0,(s[8]===void 0||s[8]==="")&&(s[9]===void 0||s[9]==="")?r=+new Date(s[1],s[2],s[3],s[4],s[5],s[6],s[7]):(s[8]!=="Z"&&s[9]!==void 0&&(n=s[10]*60+s[11],s[9]==="+"&&(n=0-n)),r=Date.UTC(s[1],s[2],s[3],s[4],s[5]+n,s[6],s[7]))}else r=Date.parse?Date.parse(t):NaN;return r}let QD=new Date(""),JGe=t=>Object.prototype.toString.call(t)==="[object Date]";function Aw(){return new JD}class JD extends no{constructor(){super({type:"date"}),this.withMutation(()=>{this.transform(function(e){return this.isType(e)?e:(e=QGe(e),isNaN(e)?QD:new Date(e))})})}_typeCheck(e){return JGe(e)&&!isNaN(e.getTime())}prepareParam(e,n){let r;if(rd.isRef(e))r=e;else{let s=this.cast(e);if(!this._typeCheck(s))throw new TypeError(`\`${n}\` must be a Date or a value that can be \`cast()\` to a Date`);r=s}return r}min(e,n=DM.min){let r=this.prepareParam(e,"min");return this.test({message:n,name:"min",exclusive:!0,params:{min:e},test(s){return Hr(s)||s>=this.resolve(r)}})}max(e,n=DM.max){let r=this.prepareParam(e,"max");return this.test({message:n,name:"max",exclusive:!0,params:{max:e},test(s){return Hr(s)||s<=this.resolve(r)}})}}JD.INVALID_DATE=QD;Aw.prototype=JD.prototype;Aw.INVALID_DATE=QD;var V7,yW;function eKe(){if(yW)return V7;yW=1;function t(e,n,r,s){var o=-1,i=e==null?0:e.length;for(s&&i&&(r=e[++o]);++o<i;)r=n(r,e[o],o,e);return r}return V7=t,V7}var q7,vW;function tKe(){if(vW)return q7;vW=1;function t(e){return function(n){return e==null?void 0:e[n]}}return q7=t,q7}var W7,bW;function nKe(){if(bW)return W7;bW=1;var t=tKe(),e={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",Ĳ:"IJ",ĳ:"ij",Œ:"Oe",œ:"oe",ŉ:"'n",ſ:"s"},n=t(e);return W7=n,W7}var Y7,xW;function rKe(){if(xW)return Y7;xW=1;var t=nKe(),e=dy(),n=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,r="\\u0300-\\u036f",s="\\ufe20-\\ufe2f",o="\\u20d0-\\u20ff",i=r+s+o,a="["+i+"]",l=RegExp(a,"g");function c(u){return u=e(u),u&&u.replace(n,t).replace(l,"")}return Y7=c,Y7}var G7,wW;function sKe(){if(wW)return G7;wW=1;var t=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;function e(n){return n.match(t)||[]}return G7=e,G7}var K7,SW;function oKe(){if(SW)return K7;SW=1;var t=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;function e(n){return t.test(n)}return K7=e,K7}var X7,CW;function iKe(){if(CW)return X7;CW=1;var t="\\ud800-\\udfff",e="\\u0300-\\u036f",n="\\ufe20-\\ufe2f",r="\\u20d0-\\u20ff",s=e+n+r,o="\\u2700-\\u27bf",i="a-z\\xdf-\\xf6\\xf8-\\xff",a="\\xac\\xb1\\xd7\\xf7",l="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",c="\\u2000-\\u206f",u=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",f="A-Z\\xc0-\\xd6\\xd8-\\xde",h="\\ufe0e\\ufe0f",m=a+l+c+u,y="['’]",v="["+m+"]",b="["+s+"]",w="\\d+",C="["+o+"]",k="["+i+"]",E="[^"+t+m+w+o+i+f+"]",j="\\ud83c[\\udffb-\\udfff]",A="(?:"+b+"|"+j+")",M="[^"+t+"]",_="(?:\\ud83c[\\udde6-\\uddff]){2}",D="[\\ud800-\\udbff][\\udc00-\\udfff]",R="["+f+"]",N="\\u200d",z="(?:"+k+"|"+E+")",B="(?:"+R+"|"+E+")",L="(?:"+y+"(?:d|ll|m|re|s|t|ve))?",P="(?:"+y+"(?:D|LL|M|RE|S|T|VE))?",I=A+"?",H="["+h+"]?",$="(?:"+N+"(?:"+[M,_,D].join("|")+")"+H+I+")*",V="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",q="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",U=H+I+$,W="(?:"+[C,_,D].join("|")+")"+U,Y=RegExp([R+"?"+k+"+"+L+"(?="+[v,R,"$"].join("|")+")",B+"+"+P+"(?="+[v,R+z,"$"].join("|")+")",R+"?"+z+"+"+L,R+"+"+P,q,V,w,W].join("|"),"g");function G(K){return K.match(Y)||[]}return X7=G,X7}var Z7,kW;function aKe(){if(kW)return Z7;kW=1;var t=sKe(),e=oKe(),n=dy(),r=iKe();function s(o,i,a){return o=n(o),i=a?void 0:i,i===void 0?e(o)?r(o):t(o):o.match(i)||[]}return Z7=s,Z7}var Q7,EW;function Zoe(){if(EW)return Q7;EW=1;var t=eKe(),e=rKe(),n=aKe(),r="['’]",s=RegExp(r,"g");function o(i){return function(a){return t(n(e(a).replace(s,"")),i,"")}}return Q7=o,Q7}var J7,TW;function lKe(){if(TW)return J7;TW=1;var t=Zoe(),e=t(function(n,r,s){return n+(s?"_":"")+r.toLowerCase()});return J7=e,J7}var cKe=lKe();const MW=ks(cKe);var eE,jW;function uKe(){if(jW)return eE;jW=1;function t(e,n,r){var s=-1,o=e.length;n<0&&(n=-n>o?0:o+n),r=r>o?o:r,r<0&&(r+=o),o=n>r?0:r-n>>>0,n>>>=0;for(var i=Array(o);++s<o;)i[s]=e[s+n];return i}return eE=t,eE}var tE,AW;function dKe(){if(AW)return tE;AW=1;var t=uKe();function e(n,r,s){var o=n.length;return s=s===void 0?o:s,!r&&s>=o?n:t(n,r,s)}return tE=e,tE}var nE,_W;function Qoe(){if(_W)return nE;_W=1;var t="\\ud800-\\udfff",e="\\u0300-\\u036f",n="\\ufe20-\\ufe2f",r="\\u20d0-\\u20ff",s=e+n+r,o="\\ufe0e\\ufe0f",i="\\u200d",a=RegExp("["+i+t+s+o+"]");function l(c){return a.test(c)}return nE=l,nE}var rE,RW;function fKe(){if(RW)return rE;RW=1;function t(e){return e.split("")}return rE=t,rE}var sE,DW;function pKe(){if(DW)return sE;DW=1;var t="\\ud800-\\udfff",e="\\u0300-\\u036f",n="\\ufe20-\\ufe2f",r="\\u20d0-\\u20ff",s=e+n+r,o="\\ufe0e\\ufe0f",i="["+t+"]",a="["+s+"]",l="\\ud83c[\\udffb-\\udfff]",c="(?:"+a+"|"+l+")",u="[^"+t+"]",f="(?:\\ud83c[\\udde6-\\uddff]){2}",h="[\\ud800-\\udbff][\\udc00-\\udfff]",m="\\u200d",y=c+"?",v="["+o+"]?",b="(?:"+m+"(?:"+[u,f,h].join("|")+")"+v+y+")*",w=v+y+b,C="(?:"+[u+a+"?",a,f,h,i].join("|")+")",k=RegExp(l+"(?="+l+")|"+C+w,"g");function E(j){return j.match(k)||[]}return sE=E,sE}var oE,IW;function hKe(){if(IW)return oE;IW=1;var t=fKe(),e=Qoe(),n=pKe();function r(s){return e(s)?n(s):t(s)}return oE=r,oE}var iE,OW;function mKe(){if(OW)return iE;OW=1;var t=dKe(),e=Qoe(),n=hKe(),r=dy();function s(o){return function(i){i=r(i);var a=e(i)?n(i):void 0,l=a?a[0]:i.charAt(0),c=a?t(a,1).join(""):i.slice(1);return l[o]()+c}}return iE=s,iE}var aE,NW;function gKe(){if(NW)return aE;NW=1;var t=mKe(),e=t("toUpperCase");return aE=e,aE}var lE,LW;function yKe(){if(LW)return lE;LW=1;var t=dy(),e=gKe();function n(r){return e(t(r).toLowerCase())}return lE=n,lE}var cE,$W;function vKe(){if($W)return cE;$W=1;var t=yKe(),e=Zoe(),n=e(function(r,s,o){return s=s.toLowerCase(),r+(o?t(s):s)});return cE=n,cE}var bKe=vKe();const xKe=ks(bKe);var uE,FW;function wKe(){if(FW)return uE;FW=1;var t=Noe(),e=Foe(),n=qoe();function r(s,o){var i={};return o=n(o,3),e(s,function(a,l,c){t(i,o(a,l,c),a)}),i}return uE=r,uE}var SKe=wKe();const CKe=ks(SKe);var Ab={exports:{}},zW;function kKe(){if(zW)return Ab.exports;zW=1,Ab.exports=function(s){return t(e(s),s)},Ab.exports.array=t;function t(s,o){var i=s.length,a=new Array(i),l={},c=i,u=n(o),f=r(s);for(o.forEach(function(m){if(!f.has(m[0])||!f.has(m[1]))throw new Error("Unknown node. There is an unknown node in the supplied edges.")});c--;)l[c]||h(s[c],c,new Set);return a;function h(m,y,v){if(v.has(m)){var b;try{b=", node was:"+JSON.stringify(m)}catch{b=""}throw new Error("Cyclic dependency"+b)}if(!f.has(m))throw new Error("Found unknown node. Make sure to provided all involved nodes. Unknown node: "+JSON.stringify(m));if(!l[y]){l[y]=!0;var w=u.get(m)||new Set;if(w=Array.from(w),y=w.length){v.add(m);do{var C=w[--y];h(C,f.get(C),v)}while(y);v.delete(m)}a[--i]=m}}}function e(s){for(var o=new Set,i=0,a=s.length;i<a;i++){var l=s[i];o.add(l[0]),o.add(l[1])}return Array.from(o)}function n(s){for(var o=new Map,i=0,a=s.length;i<a;i++){var l=s[i];o.has(l[0])||o.set(l[0],new Set),o.has(l[1])||o.set(l[1],new Set),o.get(l[0]).add(l[1])}return o}function r(s){for(var o=new Map,i=0,a=s.length;i<a;i++)o.set(s[i],i);return o}return Ab.exports}var EKe=kKe();const TKe=ks(EKe);function MKe(t,e=[]){let n=[],r=new Set,s=new Set(e.map(([i,a])=>`${i}-${a}`));function o(i,a){let l=sC.split(i)[0];r.add(l),s.has(`${a}-${l}`)||n.push([a,l])}for(const i in t)if(Ew(t,i)){let a=t[i];r.add(i),rd.isRef(a)&&a.isSibling?o(a.path,i):XD(a)&&"deps"in a&&a.deps.forEach(l=>o(l,i))}return TKe.array(Array.from(r),n).reverse()}function PW(t,e){let n=1/0;return t.some((r,s)=>{var o;if(((o=e.path)==null?void 0:o.indexOf(r))!==-1)return n=s,!0}),n}function Joe(t){return(e,n)=>PW(t,e)-PW(t,n)}function jh(){return jh=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},jh.apply(this,arguments)}let BW=t=>Object.prototype.toString.call(t)==="[object Object]";function jKe(t,e){let n=Object.keys(t.fields);return Object.keys(e).filter(r=>n.indexOf(r)===-1)}const AKe=Joe([]);class eie extends no{constructor(e){super({type:"object"}),this.fields=Object.create(null),this._sortErrors=AKe,this._nodes=[],this._excludedEdges=[],this.withMutation(()=>{this.transform(function(r){if(typeof r=="string")try{r=JSON.parse(r)}catch{r=null}return this.isType(r)?r:null}),e&&this.shape(e)})}_typeCheck(e){return BW(e)||typeof e=="function"}_cast(e,n={}){var r;let s=super._cast(e,n);if(s===void 0)return this.getDefault();if(!this._typeCheck(s))return s;let o=this.fields,i=(r=n.stripUnknown)!=null?r:this.spec.noUnknown,a=this._nodes.concat(Object.keys(s).filter(f=>this._nodes.indexOf(f)===-1)),l={},c=jh({},n,{parent:l,__validating:n.__validating||!1}),u=!1;for(const f of a){let h=o[f],m=Ew(s,f);if(h){let y,v=s[f];c.path=(n.path?`${n.path}.`:"")+f,h=h.resolve({value:v,context:n.context,parent:l});let b="spec"in h?h.spec:void 0,w=b==null?void 0:b.strict;if(b!=null&&b.strip){u=u||f in s;continue}y=!n.__validating||!w?h.cast(s[f],c):s[f],y!==void 0&&(l[f]=y)}else m&&!i&&(l[f]=s[f]);l[f]!==s[f]&&(u=!0)}return u?l:s}_validate(e,n={},r){let s=[],{sync:o,from:i=[],originalValue:a=e,abortEarly:l=this.spec.abortEarly,recursive:c=this.spec.recursive}=n;i=[{schema:this,value:a},...i],n.__validating=!0,n.originalValue=a,n.from=i,super._validate(e,n,(u,f)=>{if(u){if(!Zo.isError(u)||l)return void r(u,f);s.push(u)}if(!c||!BW(f)){r(s[0]||null,f);return}a=a||f;let h=this._nodes.map(m=>(y,v)=>{let b=m.indexOf(".")===-1?(n.path?`${n.path}.`:"")+m:`${n.path||""}["${m}"]`,w=this.fields[m];if(w&&"validate"in w){w.validate(f[m],jh({},n,{path:b,from:i,strict:!0,parent:f,originalValue:a[m]}),v);return}v(null)});Tw({tests:h,value:f,errors:s,endEarly:l,sort:this._sortErrors,path:n.path},r)})}clone(e){const n=super.clone(e);return n.fields=jh({},this.fields),n._nodes=this._nodes,n._excludedEdges=this._excludedEdges,n._sortErrors=this._sortErrors,n}concat(e){let n=super.concat(e),r=n.fields;for(let[s,o]of Object.entries(this.fields)){const i=r[s];i===void 0?r[s]=o:i instanceof no&&o instanceof no&&(r[s]=o.concat(i))}return n.withMutation(()=>n.shape(r,this._excludedEdges))}getDefaultFromShape(){let e={};return this._nodes.forEach(n=>{const r=this.fields[n];e[n]="default"in r?r.getDefault():void 0}),e}_getDefault(){if("default"in this.spec)return super._getDefault();if(this._nodes.length)return this.getDefaultFromShape()}shape(e,n=[]){let r=this.clone(),s=Object.assign(r.fields,e);return r.fields=s,r._sortErrors=Joe(Object.keys(s)),n.length&&(Array.isArray(n[0])||(n=[n]),r._excludedEdges=[...r._excludedEdges,...n]),r._nodes=MKe(s,r._excludedEdges),r}pick(e){const n={};for(const r of e)this.fields[r]&&(n[r]=this.fields[r]);return this.clone().withMutation(r=>(r.fields={},r.shape(n)))}omit(e){const n=this.clone(),r=n.fields;n.fields={};for(const s of e)delete r[s];return n.withMutation(()=>n.shape(r))}from(e,n,r){let s=sC.getter(e,!0);return this.transform(o=>{if(o==null)return o;let i=o;return Ew(o,e)&&(i=jh({},o),r||delete i[e],i[n]=s(o)),i})}noUnknown(e=!0,n=OM.noUnknown){typeof e=="string"&&(n=e,e=!0);let r=this.test({name:"noUnknown",exclusive:!0,message:n,test(s){if(s==null)return!0;const o=jKe(this.schema,s);return!e||o.length===0||this.createError({params:{unknown:o.join(", ")}})}});return r.spec.noUnknown=e,r}unknown(e=!0,n=OM.noUnknown){return this.noUnknown(!e,n)}transformKeys(e){return this.transform(n=>n&&CKe(n,(r,s)=>e(s)))}camelCase(){return this.transformKeys(xKe)}snakeCase(){return this.transformKeys(MW)}constantCase(){return this.transformKeys(e=>MW(e).toUpperCase())}describe(){let e=super.describe();return e.fields=Woe(this.fields,n=>n.describe()),e}}function go(t){return new eie(t)}go.prototype=eie.prototype;function _w(){return _w=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},_w.apply(this,arguments)}function sd(t){return new tie(t)}class tie extends no{constructor(e){super({type:"array"}),this.innerType=void 0,this.innerType=e,this.withMutation(()=>{this.transform(function(n){if(typeof n=="string")try{n=JSON.parse(n)}catch{n=null}return this.isType(n)?n:null})})}_typeCheck(e){return Array.isArray(e)}get _subType(){return this.innerType}_cast(e,n){const r=super._cast(e,n);if(!this._typeCheck(r)||!this.innerType)return r;let s=!1;const o=r.map((i,a)=>{const l=this.innerType.cast(i,_w({},n,{path:`${n.path||""}[${a}]`}));return l!==i&&(s=!0),l});return s?o:r}_validate(e,n={},r){var s,o;let i=[];n.sync;let a=n.path,l=this.innerType,c=(s=n.abortEarly)!=null?s:this.spec.abortEarly,u=(o=n.recursive)!=null?o:this.spec.recursive,f=n.originalValue!=null?n.originalValue:e;super._validate(e,n,(h,m)=>{if(h){if(!Zo.isError(h)||c)return void r(h,m);i.push(h)}if(!u||!l||!this._typeCheck(m)){r(i[0]||null,m);return}f=f||m;let y=new Array(m.length);for(let v=0;v<m.length;v++){let b=m[v],w=`${n.path||""}[${v}]`,C=_w({},n,{path:w,strict:!0,parent:m,index:v,originalValue:f[v]});y[v]=(k,E)=>l.validate(b,C,E)}Tw({path:a,value:m,errors:i,endEarly:c,tests:y},r)})}clone(e){const n=super.clone(e);return n.innerType=this.innerType,n}concat(e){let n=super.concat(e);return n.innerType=this.innerType,e.innerType&&(n.innerType=n.innerType?n.innerType.concat(e.innerType):e.innerType),n}of(e){let n=this.clone();if(!XD(e))throw new TypeError("`array.of()` sub-schema must be a valid yup schema not: "+bm(e));return n.innerType=e,n}length(e,n=Ox.length){return this.test({message:n,name:"length",exclusive:!0,params:{length:e},test(r){return Hr(r)||r.length===this.resolve(e)}})}min(e,n){return n=n||Ox.min,this.test({message:n,name:"min",exclusive:!0,params:{min:e},test(r){return Hr(r)||r.length>=this.resolve(e)}})}max(e,n){return n=n||Ox.max,this.test({message:n,name:"max",exclusive:!0,params:{max:e},test(r){return Hr(r)||r.length<=this.resolve(e)}})}ensure(){return this.default(()=>[]).transform((e,n)=>this._typeCheck(e)?e:n==null?[]:[].concat(n))}compact(e){let n=e?(r,s,o)=>!e(r,s,o):r=>!!r;return this.transform(r=>r!=null?r.filter(n):r)}describe(){let e=super.describe();return this.innerType&&(e.innerType=this.innerType.describe()),e}nullable(e=!0){return super.nullable(e)}defined(){return super.defined()}required(e){return super.required(e)}}sd.prototype=tie.prototype;const _Ke=["image/jpeg","image/png","image/jpg","image/svg","image/svg+xml","image/webp","image/avif","image/heic","image/heif","image/tiff","image/tif","image/x-icon"],RKe=[{mimes:["application/vnd.openxmlformats-officedocument.wordprocessingml.document","application/msword","application/rtf","application/vnd.oasis.opendocument.text","text/plain"],color:"#fff",label:d.jsx(m6e,{size:50})},{mimes:["application/pdf"],color:"#fff",label:d.jsx(y6e,{size:50})},{mimes:["application/vnd.openxmlformats-officedocument.presentationml.presentation","application/vnd.ms-powerpoint","application/vnd.oasis.opendocument.presentation"],color:"#fff",label:d.jsx(oke,{size:50})},{mimes:["application/vnd.openxmlformats-officedocument.spreadsheetml.sheet","application/vnd.oasis.opendocument.spreadsheet","application/vnd.ms-excel"],color:"#fff",label:d.jsx(f6e,{size:50})},{mimes:["application/x-draw"],color:"#fff",label:d.jsx(qke,{size:50})},{mimes:["video/mp4","video/webm","video/quicktime","mov","MPEG-4"],label:d.jsx(Yke,{size:50})},{mimes:["audio/mpeg"],label:d.jsx(K6e,{size:50})},{mimes:["application/json","application/x-ndjson","text/csv","text/markdown","application/xml","text/xml","application/yaml","text/yaml"],label:d.jsx(u6e,{size:50})},{mimes:["application/zip","application/vnd.rar","application/x-7z-compressed","application/x-tar","application/gzip","application/x-bzip2","application/x-xz"],label:d.jsx(Cf,{size:60})}];function DKe(t){if(_Ke.includes(t))return{type:"image"};const e=RKe.find(n=>n.mimes.includes(t));return e?{type:"label",color:e.color,label:e.label}:{type:"unknown"}}const IKe="_attachmentFile_1gj5n_1",OKe="_attachmentContent_1gj5n_11",NKe="_attachmentContent__type_1gj5n_19",LKe="_attachmentContent__dots_loader_1gj5n_26",$Ke="_attachmentContent__info_1gj5n_31",FKe="_hoverOverlay_1gj5n_46",zKe="_attachmentBackgroundImage_1gj5n_68",PKe="_behindAttachmentContent_1gj5n_73",BKe="_behindAttachmentContent__buttons_1gj5n_84",HKe="_behindAttachmentContent__info_1gj5n_90",UKe="_behindAttachmentContent__truncateText_1gj5n_99",VKe="_behindAttachmentContent__size_1gj5n_110",qKe="_attachmentBackgroundColor_1gj5n_114",WKe="_uploadWrapper_1gj5n_125",YKe="_deleteFilesBtn_1gj5n_131",GKe="_rotateChevron_1gj5n_139",KKe="_rotateChevron__opened_1gj5n_144",Br={attachmentFile:IKe,attachmentContent:OKe,attachmentContent__type:NKe,attachmentContent__dots_loader:LKe,attachmentContent__info:$Ke,hoverOverlay:FKe,attachmentBackgroundImage:zKe,behindAttachmentContent:PKe,behindAttachmentContent__buttons:BKe,behindAttachmentContent__info:HKe,behindAttachmentContent__truncateText:UKe,behindAttachmentContent__size:VKe,attachmentBackgroundColor:qKe,uploadWrapper:WKe,deleteFilesBtn:YKe,rotateChevron:GKe,rotateChevron__opened:KKe},HW=({moduleSettings:t,isDraftRunning:e,isUploading:n,removeFile:r,file:s,setIsVisible:o})=>{const i=Object.values(H_),a=xt(1024),l=S.useMemo(()=>i.find(u=>u.mimeType===s.MimeType),[s.MimeType,i]),c=()=>{!e&&!n&&IR({attachmentId:s.linkId||s.Id})};return d.jsxs(d.Fragment,{children:[t&&d.jsx(Ve,{variant:"filled",component:"a",target:"_blank",sx:{"&[data-disabled], &[disabled]":{backgroundColor:"inherit",border:"none",opacity:.5},"@media (min-width: 1025px)":{"&:hover svg":{stroke:"#000"}}},disabled:e||n,onClick:c,children:l?d.jsx(l6e,{size:20,color:a?"#848E98":"#fff"}):d.jsx(r6e,{size:20,color:a?"#848E98":"#fff"})}),d.jsx(Ve,{variant:"filled",sx:{"&[data-disabled], &[disabled]":{backgroundColor:"transparent",border:"none",opacity:.5},"@media (min-width: 1025px)":{"&:hover svg":{stroke:"#000"}}},disabled:e||n,onClick:()=>{o(!0),setTimeout(()=>{o(!1),r(s)},200)},children:d.jsx(po,{stroke:1.5,size:20,color:a?"#848E98":"#fff"})})]})},LM=t=>{var R;const e=me.c(23),{file:n,removeFile:r,moduleSettings:s,isDraftRunning:o,isUploading:i,attachmentLinks:a}=t,[l,c]=S.useState(!1),[u,f]=S.useState(!1),h=xt(1024);let m;e[0]===Symbol.for("react.memo_cache_sentinel")?(m={minWidth:"285px"},e[0]=m):m=e[0];const y=l?0:1,v=l?"translateX(-200%)":"translateX(0%)";let b;e[1]!==y||e[2]!==v?(b={minWidth:"275px","media (minWidth: 1024px)":m,opacity:y,transform:v,transition:"all 0.2s ease-in",background:"#F8F9FA",borderRadius:"7px",display:"flex",justifyContent:"space-between"},e[1]=y,e[2]=v,e[3]=b):b=e[3];const w=b;let C;e[4]!==n.Size?(C=Xm(n.Size),e[4]=n.Size,e[5]=C):C=e[5];const k=C;let E;e[6]!==a?(E=Object.entries(a??{}).map(XKe),e[6]=a,e[7]=E):E=e[7];const j=E;let A;e[8]!==n.MimeType?(A=DKe(n.MimeType),e[8]=n.MimeType,e[9]=A):A=e[9];const M=A,_=((R=j.find(N=>(N==null?void 0:N.id)===(n==null?void 0:n.FileId)))==null?void 0:R.url)??null;let D;return e[10]!==j.length||e[11]!==w||e[12]!==k||e[13]!==n||e[14]!==o||e[15]!==u||e[16]!==h||e[17]!==i||e[18]!==s||e[19]!==M||e[20]!==_||e[21]!==r?(D=d.jsx(d.Fragment,{children:h?d.jsxs(ve,{gap:4,display:"flex",px:10,py:2,style:w,children:[d.jsxs(ve,{children:[Qu(n.MimeType),d.jsx(ue,{truncate:!0,maw:100,mr:"xs",color:"#343A40",children:n.FileName})]}),d.jsxs(ve,{display:"flex",children:[d.jsxs(ue,{ta:"right",c:"dimmed",miw:50,children:[(n.Size/1024).toFixed(0)," kb"]})," ",d.jsx(ve,{gap:4,justify:"right",children:d.jsx(HW,{file:n,moduleSettings:s,isDraftRunning:o,setIsVisible:c,isUploading:i,removeFile:r},n.Id)})]})]},n.Id):d.jsx(ve,{gap:4,display:"flex",children:d.jsxs(xe,{className:Br.attachmentFile,direction:"column",children:[d.jsxs(ie,{className:Br.attachmentContent,children:[d.jsx(xe,{justify:"center",align:"center",className:Br.attachmentContent__type,children:M.type==="image"&&j.length>0?u?d.jsx(ie,{style:{backgroundColor:M.color},className:Br.attachmentBackgroundColor,children:d.jsx(KQ,{size:60})}):d.jsx(Sd,{className:Br.attachmentBackgroundImage,src:_,sx:{height:_?"100%":""},onError:()=>f(!0)}):M.type==="label"?d.jsx(ie,{style:{backgroundColor:M.color},className:Br.attachmentBackgroundColor,children:M.label}):d.jsx(ie,{style:{backgroundColor:M.color},className:Br.attachmentBackgroundColor,children:d.jsx(R2,{size:60})})}),d.jsxs(ve,{className:Br.attachmentContent__info,gap:3,children:[Qu(n.MimeType),d.jsx(ue,{truncate:!0,color:"#343A40",children:n.FileName})]})]}),d.jsx(ie,{className:Br.hoverOverlay,children:d.jsxs(ve,{gap:4,justify:"right",className:Br.behindAttachmentContent,children:[d.jsx(ie,{className:Br.behindAttachmentContent__buttons,children:d.jsx(HW,{file:n,moduleSettings:s,setIsVisible:c,isDraftRunning:o,isUploading:i,removeFile:r},n.Id)}),d.jsxs(ie,{className:Br.behindAttachmentContent__info,children:[Qu(n.MimeType),d.jsxs(ie,{children:[d.jsx(ue,{className:Br.behindAttachmentContent__truncateText,truncate:!0,children:n.FileName}),d.jsx(ue,{className:Br.behindAttachmentContent__size,children:k})," "]})]})]})})]})},n.Id)}),e[10]=j.length,e[11]=w,e[12]=k,e[13]=n,e[14]=o,e[15]=u,e[16]=h,e[17]=i,e[18]=s,e[19]=M,e[20]=_,e[21]=r,e[22]=D):D=e[22],D};function XKe(t){const[e,n]=t;return{id:Number(e),url:n}}const ZKe=t=>{const e=me.c(16),{progress:n,file:r}=t,[s,o]=S.useState(!1);let i,a;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=()=>{o(!0)},a=[],e[0]=i,e[1]=a):(i=e[0],a=e[1]),S.useEffect(i,a);const l=n[r.name]||0,c=xt(1024),u=c?"275px":"auto",f=s?1:0,h=s?"translateX(0%)":"translateX(-200%)",m=c?"5px 15px":"";let y;e[2]!==u||e[3]!==f||e[4]!==h||e[5]!==m?(y={minWidth:u,opacity:f,transform:h,transition:"all 0.2s ease-in-out",background:"#F8F9FA",borderRadius:"7px",display:"flex",justifyContent:"space-between",padding:m},e[2]=u,e[3]=f,e[4]=h,e[5]=m,e[6]=y):y=e[6];const v=y;let b;e[7]===Symbol.for("react.memo_cache_sentinel")?(b={flexDirection:"row"},e[7]=b):b=e[7];let w;e[8]!==r.name||e[9]!==r.type||e[10]!==c||e[11]!==l?(w=c?d.jsxs(d.Fragment,{children:[d.jsxs(ve,{children:[Qu(r.type),d.jsx(ue,{ta:"left",truncate:!0,maw:c?60:80,mr:"xs",color:"#343A40",children:r.name})]}),d.jsx(yc.Root,{size:"xl",radius:"xs",w:"120px",children:d.jsx(yc.Section,{value:l,children:d.jsx(yc.Label,{children:`${l}%`})})})]}):d.jsx(xe,{className:Br.attachmentFile,direction:"row",children:d.jsxs(ie,{className:Br.attachmentContent,children:[d.jsx(xe,{justify:"center",align:"center",className:Br.attachmentContent__type,children:d.jsx(Bs,{color:"blue",size:"md",type:"dots",className:Br.attachmentContent__dots_loader})}),d.jsxs(ve,{className:Br.attachmentContent__info,gap:3,children:[Qu(r.type),d.jsx(ue,{truncate:!0,maw:110,color:"#343A40",children:r.name})]})]})}),e[8]=r.name,e[9]=r.type,e[10]=c,e[11]=l,e[12]=w):w=e[12];let C;return e[13]!==v||e[14]!==w?(C=d.jsx(ve,{gap:4,display:"flex",style:v,sx:b,children:w}),e[13]=v,e[14]=w,e[15]=C):C=e[15],C},QKe=t=>{const e=me.c(24),{additionalFiles:n,isDraftRunning:r,isUploading:s,removeFile:o,moduleSettings:i}=t,{t:a}=Le();let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l={justifyContent:"space-between",cursor:"pointer",color:"gray"},e[0]=l):l=e[0];const c=l;let u;e[1]===Symbol.for("react.memo_cache_sentinel")?(u={dropdown:{marginLeft:16}},e[1]=u):u=e[1];const f=u;let h;e[2]!==n.length||e[3]!==a?(h=a("file",{count:n.length}),e[2]=n.length,e[3]=a,e[4]=h):h=e[4];let m;e[5]!==h?(m=d.jsx(Dt.Target,{children:d.jsx(Bc,{color:"#f8f9fa",size:"lg",sx:c,children:h})}),e[5]=h,e[6]=m):m=e[6];let y;e[7]===Symbol.for("react.memo_cache_sentinel")?(y={borderRadius:"12px",overflowY:"auto",maxHeight:"300px"},e[7]=y):y=e[7];let v;if(e[8]!==n||e[9]!==r||e[10]!==s||e[11]!==i||e[12]!==o){let C;e[14]!==r||e[15]!==s||e[16]!==i||e[17]!==o?(C=k=>d.jsx(LM,{file:k,isDraftRunning:r,isUploading:s,removeFile:o,moduleSettings:i},k.FileId),e[14]=r,e[15]=s,e[16]=i,e[17]=o,e[18]=C):C=e[18],v=n.map(C),e[8]=n,e[9]=r,e[10]=s,e[11]=i,e[12]=o,e[13]=v}else v=e[13];let b;e[19]!==v?(b=d.jsx(Dt.Dropdown,{style:y,children:d.jsx(bt,{gap:8,align:"flex-start",children:v})}),e[19]=v,e[20]=b):b=e[20];let w;return e[21]!==m||e[22]!==b?(w=d.jsxs(Dt,{width:"auto",shadow:"md",radius:"md",position:"top",styles:f,children:[m,b]}),e[21]=m,e[22]=b,e[23]=w):w=e[23],w},_b=3,JKe=t=>{const e=me.c(48),{id:n,files:r,removeFile:s,isDraftRunning:o,isUploading:i,progress:a,attachments:l,removeAllFilesClickHandler:c,attachmentLinks:u}=t,f=re(qa),h=zt(),m=xt(1024),[y,v]=Rs(!1),{toggle:b}=v,{t:w}=Le();let C;e[0]!==r?(C=r.length>=_b?r.slice(3):[],e[0]=r,e[1]=C):C=e[1];const k=C;let E;e[2]!==r||e[3]!==m?(E=r.length>=_b&&m?r.slice(0,3):r,e[2]=r,e[3]=m,e[4]=E):E=e[4];const j=E;let A,M;e[5]!==r?(A=r.reduce(eXe,0),M=Xm(A),e[5]=r,e[6]=A,e[7]=M):(A=e[6],M=e[7]);const _=M,D=i||j.length>0?"10px 16px":"";let R;e[8]===Symbol.for("react.memo_cache_sentinel")?(R={justifyContent:"space-between",cursor:"pointer",color:"gray",span:{display:"flex",alignItems:"center"}},e[8]=R):R=e[8];const N=R;let z=!1;const B=se=>!z&&r.length+se>=_b?(z=!0,!0):!1;let L;e[9]!==l||e[10]!==r.length?(L=()=>r.length+l.length>3?`+ ${r.length+l.length-3}`:`+ ${l.length}`,e[9]=l,e[10]=r.length,e[11]=L):L=e[11];const P=L;let I;e[12]===Symbol.for("react.memo_cache_sentinel")?(I={marginLeft:"6px"},e[12]=I):I=e[12];const H=I;let $,V;e[13]!==A||e[14]!==h||e[15]!==n?($=()=>{h(LCe({id:n,calculateSize:A}))},V=[A,h,n],e[13]=A,e[14]=h,e[15]=n,e[16]=$,e[17]=V):($=e[16],V=e[17]),S.useEffect($,V);const q=bt,U="flex-start",W=8,Y="100%";let G;e[18]!==D?(G={padding:D},e[18]=D,e[19]=G):G=e[19];let K;e[20]!==u||e[21]!==_||e[22]!==o||e[23]!==m||e[24]!==i||e[25]!==f||e[26]!==y||e[27]!==c||e[28]!==s||e[29]!==j||e[30]!==w||e[31]!==b?(K=m?d.jsx(d.Fragment,{children:j.map(se=>d.jsx(LM,{file:se,isDraftRunning:o,isUploading:i,removeFile:s,moduleSettings:!!f,attachmentLinks:u},se.FileId))}):d.jsx(d.Fragment,{children:j.length>0&&d.jsxs(d.Fragment,{children:[d.jsxs(xe,{justify:"space-between",align:"center",w:"100%",children:[d.jsxs(yt,{variant:"transparent",onClick:b,fz:13,p:0,color:"#848E98",leftSection:d.jsx(Nm,{stroke:1.5,size:"17px",className:`${Br.rotateChevron} ${y?Br.rotateChevron__opened:""}`}),onMouseDown:tXe,sx:{span:{span:{marginRight:"3px"}}},children:[w("attachments"),": ",j.length," ",w("pieces"),", ",_]}),d.jsx(yt,{className:Br.deleteFilesBtn,onClick:c,onMouseDown:nXe,variant:"subtle",size:"13px",ml:"15px",p:0,children:w("hideAttach")})]}),d.jsx(tp,{in:y,children:d.jsx(xe,{gap:"8px",wrap:"wrap",children:j.map(se=>d.jsx(LM,{file:se,isDraftRunning:o,isUploading:i,removeFile:s,moduleSettings:!!f,attachmentLinks:u},se.FileId))})})]})}),e[20]=u,e[21]=_,e[22]=o,e[23]=m,e[24]=i,e[25]=f,e[26]=y,e[27]=c,e[28]=s,e[29]=j,e[30]=w,e[31]=b,e[32]=K):K=e[32];const Q=i&&d.jsx(ie,{className:Br.uploadWrapper,children:Array.isArray(l)&&l.map((se,ce)=>!m||j.length+ce<_b?d.jsx(ZKe,{file:se,progress:a},`${se.size+ce}`):m&&B(ce)?d.jsxs(Bc,{color:"#f8f9fa",size:"lg",sx:N,children:[P(),d.jsx(Bs,{sx:H,color:"blue",size:"md",type:"dots"})]},"files"):null)});let Z;e[33]!==k||e[34]!==o||e[35]!==m||e[36]!==i||e[37]!==f||e[38]!==s?(Z=k.length>0&&m&&!i&&d.jsx(QKe,{additionalFiles:k,isDraftRunning:o,isUploading:i,removeFile:s,moduleSettings:!!f}),e[33]=k,e[34]=o,e[35]=m,e[36]=i,e[37]=f,e[38]=s,e[39]=Z):Z=e[39];let J;e[40]!==K||e[41]!==Q||e[42]!==Z?(J=d.jsxs(d.Fragment,{children:[K,Q,Z]}),e[40]=K,e[41]=Q,e[42]=Z,e[43]=J):J=e[43];let ne;return e[44]!==q||e[45]!==G||e[46]!==J?(ne=d.jsx(q,{align:U,gap:W,w:Y,sx:G,children:J}),e[44]=q,e[45]=G,e[46]=J,e[47]=ne):ne=e[47],ne};function eXe(t,e){return t+e.Size}function tXe(t){return t.stopPropagation()}function nXe(t){return t.stopPropagation()}const rXe=t=>{const e=me.c(78),{handleCloseSendModal:n,form:r,shouldSaveDraftOnClose:s,sendModalWindowId:o,modalTitleState:i}=t,{t:a}=Le(),l=S.useContext(Mi);let c;e[0]!==l?(c=l||{},e[0]=l,e[1]=c):c=e[1];const{closeSendWindow:u,expandWindow:f,minimizeFullScreenWindow:h,minimizeWindow:m,expandFullScreenWindow:y,updateWindow:v,windows:b}=c;let w;e[2]!==u?(w=u===void 0?sXe:u,e[2]=u,e[3]=w):w=e[3];const C=w;let k;e[4]!==f?(k=f===void 0?oXe:f,e[4]=f,e[5]=k):k=e[5];const E=k;let j;e[6]!==h?(j=h===void 0?iXe:h,e[6]=h,e[7]=j):j=e[7];const A=j;let M;e[8]!==m?(M=m===void 0?aXe:m,e[8]=m,e[9]=M):M=e[9];const _=M;let D;e[10]!==y?(D=y===void 0?lXe:y,e[10]=y,e[11]=D):D=e[11];const R=D;let N;e[12]!==v?(N=v===void 0?cXe:v,e[12]=v,e[13]=N):N=e[13];const z=N;let B;e[14]!==b?(B=b===void 0?[]:b,e[14]=b,e[15]=B):B=e[15];const L=B;let P;if(e[16]!==o||e[17]!==L){let ge;e[19]!==o?(ge=Fe=>Fe.id===o,e[19]=o,e[20]=ge):ge=e[20],P=L.find(ge),e[16]=o,e[17]=L,e[18]=P}else P=e[18];const I=P,H=(I==null?void 0:I.isMinimize)&&"#fff",$=(I==null?void 0:I.isMinimize)&&"#95A1B4";let V;e[21]!==I||e[22]!==E||e[23]!==z?(V=()=>{document.documentElement.style.overflow="hidden",I&&E(I.id),I!=null&&I.prevIsFullScreen&&I&&z(I.id,{isFullScreen:!0})},e[21]=I,e[22]=E,e[23]=z,e[24]=V):V=e[24];const q=V;let U;e[25]!==I||e[26]!==A?(U=()=>{document.documentElement.style.overflow="hidden",I&&A(I.id)},e[25]=I,e[26]=A,e[27]=U):U=e[27];const W=U;let Y;e[28]!==I||e[29]!==C||e[30]!==n||e[31]!==s||e[32]!==z?(Y=()=>{I&&C(I.id),I&&z(I.id,{isFullScreen:!1,isMinimize:!1,prevIsFullScreen:!1}),s&&n()},e[28]=I,e[29]=C,e[30]=n,e[31]=s,e[32]=z,e[33]=Y):Y=e[33];const G=Y;let K;e[34]!==(I==null?void 0:I.isFullScreen)||e[35]!==(I==null?void 0:I.isMinimize)?(K=()=>{(!(I!=null&&I.isMinimize)||!(I!=null&&I.isFullScreen))&&setTimeout(uXe,100)},e[34]=I==null?void 0:I.isFullScreen,e[35]=I==null?void 0:I.isMinimize,e[36]=K):K=e[36];const Q=I==null?void 0:I.isMinimize,Z=I==null?void 0:I.isFullScreen;let J;if(e[37]!==Q||e[38]!==Z?(J=[Q,Z],e[37]=Q,e[38]=Z,e[39]=J):J=e[39],S.useEffect(K,J),!l)return null;const ne=I!=null&&I.isMinimize?"8px":0,se=I!=null&&I.isMinimize?"8px":0;let ce;e[40]!==ne||e[41]!==se?(ce={paddingLeft:"10px",borderTopLeftRadius:"8px",borderTopRightRadius:"8px",borderBottomLeftRadius:ne,borderBottomRightRadius:se},e[40]=ne,e[41]=se,e[42]=ce):ce=e[42];const fe=$||"#A2B0C333";let le;e[43]!==r.values.Subject||e[44]!==H||e[45]!==i.icon||e[46]!==i.text||e[47]!==a?(le=r.values.Subject?d.jsxs(ve,{gap:10,sx:{display:"grid",gridTemplateColumns:"1fr auto"},children:[d.jsx(ue,{size:"md",fw:500,truncate:"end",color:H||"#343A40",children:r.values.Subject}),d.jsxs(xe,{gap:10,align:"center",justify:"flex-start",children:[i.icon,d.jsx(ue,{fz:12,color:"#A9B4C6",ml:-5,children:i.text})]})]}):d.jsxs(xe,{gap:10,align:"center",justify:"center",children:[d.jsx(ue,{size:"md",fw:500,color:H||"#343A40",children:a("newMessage")}),i.icon,d.jsx(ue,{fz:12,color:"#A9B4C6",ml:-5,children:i.text})]}),e[43]=r.values.Subject,e[44]=H,e[45]=i.icon,e[46]=i.text,e[47]=a,e[48]=le):le=e[48];let be;e[49]===Symbol.for("react.memo_cache_sentinel")?(be={zIndex:10,flex:"0 0 100px"},e[49]=be):be=e[49];let je;e[50]!==I||e[51]!==q||e[52]!==H||e[53]!==_?(je=I!=null&&I.isMinimize?d.jsx(Ve,{variant:"transparent",component:"div",size:"20px",onClick:q,styles:{root:{"&:hover":{backgroundColor:I!=null&&I.isMinimize?"#7a889e":"#f8f9fa"}}},children:d.jsx(kke,{stroke:1.5,size:"30px",color:H||"#878f96"})}):d.jsx(Ve,{component:"div",size:"20px",onClick:()=>I&&_(I.id),children:d.jsx(W4,{stroke:1.5,size:"30px",color:H||"#878f96"})}),e[50]=I,e[51]=q,e[52]=H,e[53]=_,e[54]=je):je=e[54];let pe;e[55]!==I||e[56]!==R||e[57]!==W?(pe=!(I!=null&&I.isMinimize)&&d.jsx(d.Fragment,{children:I!=null&&I.isFullScreen?d.jsx(Ve,{component:"div",size:"20px",onClick:W,children:d.jsx(n5e,{stroke:1.5,size:"30px"})}):d.jsx(Ve,{component:"div",size:"20px",onClick:()=>I&&R(I.id),children:d.jsx(s5e,{stroke:1.5,size:"30px"})})}),e[55]=I,e[56]=R,e[57]=W,e[58]=pe):pe=e[58];const _e=I!=null&&I.isMinimize?"#7a889e":"#f8f9fa";let Ce;e[59]!==_e?(Ce={root:{"&:hover":{backgroundColor:_e}}},e[59]=_e,e[60]=Ce):Ce=e[60];const Te=H||"#878f96";let Ae;e[61]!==Te?(Ae=d.jsx(po,{stroke:1.5,size:"30px",color:Te}),e[61]=Te,e[62]=Ae):Ae=e[62];let Ze;e[63]!==G||e[64]!==Ce||e[65]!==Ae?(Ze=d.jsx(Ve,{variant:"transparent",component:"div",size:"20px",onClick:G,styles:Ce,children:Ae}),e[63]=G,e[64]=Ce,e[65]=Ae,e[66]=Ze):Ze=e[66];let He;e[67]!==je||e[68]!==pe||e[69]!==Ze?(He=d.jsxs(ve,{sx:be,justify:"flex-end",children:[je,pe,Ze]}),e[67]=je,e[68]=pe,e[69]=Ze,e[70]=He):He=e[70];let lt;e[71]!==le||e[72]!==He?(lt=d.jsxs(xe,{h:vM,wrap:"nowrap",gap:7,align:"center",justify:"space-between",w:"100%",children:[le,He]}),e[71]=le,e[72]=He,e[73]=lt):lt=e[73];let Ye;return e[74]!==ce||e[75]!==fe||e[76]!==lt?(Ye=d.jsx(xe,{sx:ce,bg:fe,gap:"xs",h:"auto",align:"center",top:0,pos:"static",w:"100%",justify:"space-between",pl:16,pr:16,onMouseDown:dXe,children:lt}),e[74]=ce,e[75]=fe,e[76]=lt,e[77]=Ye):Ye=e[77],Ye};function sXe(){}function oXe(){}function iXe(){}function aXe(){}function lXe(){}function cXe(){}function uXe(){document.documentElement.style.overflow=""}function dXe(t){return t.stopPropagation()}var Nx={exports:{}},fXe=Nx.exports,UW;function pXe(){return UW||(UW=1,(function(t,e){(function(n,r){t.exports=r()})(fXe,(function(){return function(n,r){r.prototype.isSameOrAfter=function(s,o){return this.isSame(s,o)||this.isAfter(s,o)}}}))})(Nx)),Nx.exports}var hXe=pXe();const mXe=ks(hXe);var Lx={exports:{}},gXe=Lx.exports,VW;function yXe(){return VW||(VW=1,(function(t,e){(function(n,r){t.exports=r()})(gXe,(function(){return function(n,r){r.prototype.isSameOrBefore=function(s,o){return this.isSame(s,o)||this.isBefore(s,o)}}}))})(Lx)),Lx.exports}var vXe=yXe();const bXe=ks(vXe);var $x={exports:{}},xXe=$x.exports,qW;function wXe(){return qW||(qW=1,(function(t,e){(function(n,r){t.exports=r()})(xXe,(function(){var n={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};return function(r,s,o){var i=s.prototype,a=i.format;o.en.formats=n,i.format=function(l){l===void 0&&(l="YYYY-MM-DDTHH:mm:ssZ");var c=this.$locale().formats,u=(function(f,h){return f.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(m,y,v){var b=v&&v.toUpperCase();return y||h[v]||n[v]||h[b].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(w,C,k){return C||k.slice(1)}))}))})(l,c===void 0?{}:c);return a.call(this,u)}}}))})($x)),$x.exports}var SXe=wXe();const CXe=ks(SXe),kXe="data:image/svg+xml,%3csvg%20width='22'%20height='22'%20viewBox='0%200%2022%2022'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M13.75%2012.8333L11%2011V6.41667M2.75%2011C2.75%2012.0834%202.96339%2013.1562%203.37799%2014.1571C3.7926%2015.1581%204.40029%2016.0675%205.16637%2016.8336C5.93245%2017.5997%206.84193%2018.2074%207.84286%2018.622C8.8438%2019.0366%209.91659%2019.25%2011%2019.25C12.0834%2019.25%2013.1562%2019.0366%2014.1571%2018.622C15.1581%2018.2074%2016.0675%2017.5997%2016.8336%2016.8336C17.5997%2016.0675%2018.2074%2015.1581%2018.622%2014.1571C19.0366%2013.1562%2019.25%2012.0834%2019.25%2011C19.25%209.91659%2019.0366%208.8438%2018.622%207.84286C18.2074%206.84193%2017.5997%205.93245%2016.8336%205.16637C16.0675%204.40029%2015.1581%203.7926%2014.1571%203.37799C13.1562%202.96339%2012.0834%202.75%2011%202.75C9.91659%202.75%208.8438%202.96339%207.84286%203.37799C6.84193%203.7926%205.93245%204.40029%205.16637%205.16637C4.40029%205.93245%203.7926%206.84193%203.37799%207.84286C2.96339%208.8438%202.75%209.91659%202.75%2011Z'%20stroke='white'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e",Fl=()=>{const t=me.c(50),e=zt(),n=re(qc).Items,r=re(iee),s=re(eR),o=re(kMe);let i,a;if(t[0]!==n||t[1]!==r||t[2]!==s){if(i=[...n],i.length>0&&i.every(W=>r.includes(W.FolderId))){let W;t[5]!==s?(W=(Y,G)=>{var ne,se;const K=((ne=s[Y.Id])==null?void 0:ne.SnoozeUntilUtc)??null,Q=((se=s[G.Id])==null?void 0:se.SnoozeUntilUtc)??null,Z=K?Ke(K).valueOf():Number.MAX_SAFE_INTEGER,J=Q?Ke(Q).valueOf():Number.MAX_SAFE_INTEGER;return Z-J},t[5]=s,t[6]=W):W=t[6],i.sort(W)}a=i.filter(EXe),t[0]=n,t[1]=r,t[2]=s,t[3]=i,t[4]=a}else i=t[3],a=t[4];const l=a;let c;t[7]!==i?(c=i.filter(TXe),t[7]=i,t[8]=c):c=t[8];const u=c;let f;t[9]!==l||t[10]!==u?(f=[...l,...u],t[9]=l,t[10]=u,t[11]=f):f=t[11];const h=f;let m;t[12]!==h||t[13]!==l||t[14]!==u?(m={messagesWithoutSendTime:l,messagesWithSendTime:u,combinedMessages:h},t[12]=h,t[13]=l,t[14]=u,t[15]=m):m=t[15];const{messagesWithoutSendTime:y,messagesWithSendTime:v,combinedMessages:b}=m;let w,C;t[16]!==b||t[17]!==e?(w=()=>{e(vMe(b))},C=[b,e],t[16]=b,t[17]=e,t[18]=w,t[19]=C):(w=t[18],C=t[19]),S.useEffect(w,C);let k;t[20]!==b?(k=U=>b.findIndex(W=>W.Id===U),t[20]=b,t[21]=k):k=t[21];const E=k;let j;t[22]!==e||t[23]!==E?(j=(U,W)=>{const Y=E(U.Id);if(Y!==-1)return e(bMe({shouldCheck:W,currentIndex:Y})),U},t[22]=e,t[23]=E,t[24]=j):j=t[24];const A=j;let M;t[25]!==e||t[26]!==E?(M=U=>{const W=E(U.Id);e(xMe({message:U,index:W}))},t[25]=e,t[26]=E,t[27]=M):M=t[27];const _=M;let D;t[28]!==e?(D=()=>{e(wMe())},t[28]=e,t[29]=D):D=t[29];const R=D;let N;t[30]!==e?(N=()=>{e(mee())},t[30]=e,t[31]=N):N=t[31];const z=N;let B;t[32]!==e?(B=(U,W)=>{e(yMe(U,W))},t[32]=e,t[33]=B):B=t[33];const L=B,P=o;let I;t[34]!==o?(I=o.map(MXe),t[34]=o,t[35]=I):I=t[35];const H=I;let $,V;t[36]!==b.length||t[37]!==e?($=()=>{b.length>0&&e(SMe(b.length))},V=[b.length,e],t[36]=b.length,t[37]=e,t[38]=$,t[39]=V):($=t[38],V=t[39]),S.useEffect($,V);let q;return t[40]!==z||t[41]!==v||t[42]!==y||t[43]!==P||t[44]!==H||t[45]!==A||t[46]!==R||t[47]!==_||t[48]!==L?(q={selectSomeMessages:A,updateSelectedMessages:L,toggleMessageSelection:_,toggleAllMessages:R,clearSelection:z,checkedMessages:P,checkedMessagesIds:H,messagesWithoutSendTime:y,messagesWithSendTime:v},t[40]=z,t[41]=v,t[42]=y,t[43]=P,t[44]=H,t[45]=A,t[46]=R,t[47]=_,t[48]=L,t[49]=q):q=t[49],q};function EXe(t){return!t.SendTime}function TXe(t){return!!t.SendTime}function MXe(t){return t.Id}const oC=()=>{var u,f;const t=me.c(9),e=Er(),n=wn(),r=zt(),s=re($o),o=re(mr),i=re(zr),a=re(B2);let l;return t[0]!==i||t[1]!==r||t[2]!==n.pathname||t[3]!==((u=n.state)==null?void 0:u.prevLocation)||t[4]!==o||t[5]!==a||t[6]!==e||t[7]!==s?(l=()=>{var y;const h=(y=n.state)==null?void 0:y.prevLocation;if(h){e(h);return}const m=o.SearchContext.Labels;if(m!=null&&m.length){e(`/tags/${m[0]}`);return}if(n.pathname.startsWith("/search")){e("/search");return}if(a&&!n.pathname.includes("/message/")){r(E3());return}if(n.pathname.includes("/message/")&&s){const v=i.find(w=>w.Id===s.FolderId),b=(v==null?void 0:v.path)??"/inbox";e(b==="/outbox"?"/inbox":b);return}e("/inbox")},t[0]=i,t[1]=r,t[2]=n.pathname,t[3]=(f=n.state)==null?void 0:f.prevLocation,t[4]=o,t[5]=a,t[6]=e,t[7]=s,t[8]=l):l=t[8],l};function yp(){const t=me.c(5),e=zt(),n=re(qc),r=re(mr),{pathname:s}=wn();let o;return t[0]!==e||t[1]!==n.Count||t[2]!==r||t[3]!==s?(o=async(i,a)=>{var b,w;const l=j0.size||v3,c=n.Count-i,u=Math.floor(r.offset/l)+1,f=Math.max(Math.ceil(c/l),1),h=a??Math.min(u,f),m=(h-1)*l,y={...r,offset:m};(y.folderId==="-1"||(w=(b=y==null?void 0:y.SearchContext)==null?void 0:b.Labels)!=null&&w.length)&&delete y.folderId,e(nS(y)),e(Dc(h)),!s.includes("/message")&&!s.includes("/settings")&&await e(ur(y)).unwrap()},t[0]=e,t[1]=n.Count,t[2]=r,t[3]=s,t[4]=o):o=t[4],o}const Jm=(t,e,n)=>{const r=me.c(5),s=n,o=S.useRef(null);let i,a;r[0]!==s||r[1]!==e||r[2]!==t?(i=()=>{const l=c=>{t.current&&!t.current.contains(c.target)&&(o.current=setTimeout(()=>{e()},0))};return document.addEventListener(s,l),document.addEventListener("click",l),()=>{o.current!==null&&clearTimeout(o.current),document.removeEventListener(s,l)}},a=[t,e,s],r[0]=s,r[1]=e,r[2]=t,r[3]=i,r[4]=a):(i=r[3],a=r[4]),S.useEffect(i,a)};Ke.extend(LJ);Ke.extend(NJ);Ke.extend(CXe);Ke.extend(mXe);Ke.extend(bXe);const F0=(t,e="ru")=>{const n=Ke(t).locale(e),r=n.format("dd"),s=r.charAt(0).toUpperCase()+r.slice(1),o=n.format("D MMMM"),i=n.format("HH:mm");return`${s}, ${o}, ${i}`},nie=(t,e="ru")=>Ke(t).locale(e).format("D MMMM YYYY")+(e==="ru"?" г.":""),jXe=(t,e="ru")=>{const n=Ke().locale(e),r=Ke(t).locale(e),s=n.day(),o=s===0?0:7-s,i=n.add(o,"day").endOf("day");return r.isSameOrBefore(i)?F0(t,e):nie(t,e)+", "+r.format("HH:mm")},dE=(t,e=0)=>{const n=new Date;return new Date(n.getFullYear(),n.getMonth(),n.getDate()+1,t,e)},AXe=(t,e=0)=>{const n=new Date;return new Date(n.getFullYear(),n.getMonth(),n.getDate(),t,e)},_Xe=(t,e=0)=>{const n=new Date,r=n.getDay(),s=r===0?1:8-r;return new Date(n.getFullYear(),n.getMonth(),n.getDate()+s,t,e)},WW=(t,e="ru")=>{const n=Ke(t).locale(e),r=n.format("dd"),s=r.charAt(0).toUpperCase()+r.slice(1),o=n.format("D MMM"),i=n.format("H:mm");return`${s}, ${o}, ${i}`},RXe=t=>{const e=me.c(7),{validateEmail:n,open:r}=t,{t:s}=Le(),o=xt(1024);let i;e[0]!==r||e[1]!==n?(i=()=>{n()&&r()},e[0]=r,e[1]=n,e[2]=i):i=e[2];const a=i;let l;return e[3]!==o||e[4]!==a||e[5]!==s?(l=o?d.jsx(et.Item,{color:"#343A40",px:10,py:5,fz:14,leftSection:d.jsx(xc,{size:18,color:"#868e96"}),onClick:c=>{c.stopPropagation(),a()},children:s("modals.titles.scheduleMessage")}):d.jsx(on,{label:s("modals.titles.scheduleMessage"),children:d.jsx(Ve,{styles:{root:{backgroundColor:"blue.2",borderRadius:18}},variant:"filled",sx:{root:{backgroundColor:"blue"}},size:36,onClick:a,children:d.jsx("img",{src:kXe,height:22,width:22,alt:"Delayed send"})})}),e[3]=o,e[4]=a,e[5]=s,e[6]=l):l=e[6],l},DXe=({opened:t,onClose:e,sendModalWindowId:n,mode:r="scheduleSend",messageIds:s=[]})=>{const{t:o}=Le(),i=zt(),a=Mr(),l=wn(),c=S.useContext(Mi),{windows:u=[],closeSendWindow:f=()=>{}}=c||{},h=Er(),m=xt(1024),y=oC(),v=u.find(Te=>Te.id===n),b=ts(),{emailId:w}=sr(),C=vn.language,[k,E]=S.useState(!1),j=S.useRef(null),A=S.useCallback(()=>E(!1),[E]);Jm(j,A,"mouseup");const M=re(mr),_=re(zm),D=re(Md),R=re(B2),{checkedMessagesIds:N,clearSelection:z}=Fl(),B=yp(),[L,P]=S.useState(),[I,H]=S.useState(null),[$,V]=S.useState(),[q,U]=S.useState("00:00"),W=new Date;W.setDate(W.getDate()+1);const Y=dE(8),G=dE(13),K=r==="snooze",Q=AXe(15),Z=K&&Ke().hour()<15,J=dE(8),ne=_Xe(8),se=Te=>{if(Te==="morning"&&(V(Y),U(Ke(Y).format("HH:mm"))),Te==="afternoon"&&(V(G),U(Ke(G).format("HH:mm"))),Te==="laterToday"&&(V(Q),U("15:00")),Te==="snoozeTomorrow"&&(V(J),U(Ke(J).format("HH:mm"))),Te==="nextWeek"&&(V(ne),U(Ke(ne).format("HH:mm"))),Te==="custom"){const Ae=new Date;V(new Date(Ae.getFullYear(),Ae.getMonth(),Ae.getDate(),8,0)),U("08:00")}Te==="previous"&&L&&(V(L),U(Ke(L).format("HH:mm"))),H(Te)},ce=async()=>{const Te=Ke($).hour(Number(q.split(":")[0])).minute(Number(q.split(":")[1])).second(0).millisecond(0),Ae=Ke().second(0).millisecond(0);if(Te.isSameOrBefore(Ae)){a.error(o("delayedSend.pastTimeError"));return}if(r==="snooze"){if(!s.length)return;const He=Math.ceil(Te.diff(Ke(),"millisecond")/1e3)+1;try{await i(TTe({messageIds:s,snoozeDelaySeconds:He})).unwrap(),localStorage.setItem("snoozeDate"+D.Id,Te.toISOString()),await B(s.length),a.success(o("snooze.success",{date:F0(Te.toDate(),C)})),e(),(l.pathname.includes("/message/")||R)&&y(),_&&s.includes(_)&&(i(jo()),i(Ns(null))),s.some(lt=>N.includes(lt))&&z()}catch{a.error(o("snooze.error"))}return}if(localStorage.setItem("scheduledSendDate"+D.Id,Te.toISOString()),_&&i(ETe({messageId:_,scheduledDate:Te.toDate()})),a.success(o("notifications.messages.messageWillBeSend",{data:F0(Te.toDate(),C)})),!l.pathname.includes("/send"))v&&f(v.id);else{const He=window.location.search.includes("to=");h(He?`${w?`/${w}/`:""}inbox`:-1)}const Ze=b==null?void 0:b.Id;i(ur({...M,folderId:Ze})),e()},fe=r==="snooze"?"snoozeDate"+D.Id:"scheduledSendDate"+D.Id;S.useLayoutEffect(()=>{if(!t)return;if(K){Z?(V(Q),U("15:00"),H("laterToday")):(V(J),U(Ke(J).format("HH:mm")),H("snoozeTomorrow"));return}const Te=localStorage.getItem(fe);if(Te){const Ae=Ke(Te);Ae.isAfter(Ke())?(P(Ae.toDate()),V(Ae.toDate()),U(Ae.format("HH:mm")),H("previous")):(V(Y),U(Ke(Y).format("HH:mm")),H("morning"))}else V(Y),U(Ke(Y).format("HH:mm")),H("morning")},[t,r,fe]);const le=Te=>{if(Te){V(Te),U(Ke(Te).format("HH:mm"));return}V(void 0),U("00:00")},be=Te=>{const Ae=Ke(Te);if(!Ae.isValid())return{};const Ze=Ae.toDate();return{selected:Ke(Ze).isSame($,"date"),onClick:()=>{V(Ze)}}},je=o(r==="snooze"?"snooze.title":"modals.titles.scheduleMessage"),pe=o(r==="snooze"?"snooze.title":"delayedSend.scheduleSend"),_e=o(r==="snooze"?"snooze.submit":"delayedSend.schedule"),Ce=o(r==="snooze"?"snooze.submit":"modals.controls.schedule");return d.jsxs(nr.Root,{opened:t,size:530,onClose:e,styles:{body:{padding:24},header:{paddingTop:24,paddingBottom:0}},centered:!0,transitionProps:{duration:0},...m&&{fullScreen:!0},children:[d.jsx(nr.Overlay,{}),d.jsxs(nr.Content,{style:{borderRadius:m?0:16},children:[m?d.jsx(nr.Header,{pt:16,px:8,children:d.jsx(bt,{w:"100%",children:d.jsxs(ve,{w:"100%",justify:"space-between",children:[d.jsx(yt,{variant:"transparent",sx:{padding:"0",width:"36px",outline:"none",span:{justifyContent:"center"}},size:"lg",styles:{inner:{justifyContent:"flex-start",outline:"none"}},onClick:e,children:d.jsx(Ve,{component:"div",size:"lg",children:d.jsx(yo,{stroke:1,size:"36px"})})}),d.jsx(yt,{variant:"subtle",fz:"16px",onClick:ce,children:_e})]})})}):d.jsx(nr.Header,{children:d.jsx(nr.Title,{style:{color:"#343A40"},children:je})}),d.jsxs(nr.Body,{children:[d.jsxs(bt,{children:[m&&d.jsx(ue,{fz:24,fw:600,children:pe}),d.jsx(xe,{flex:1,w:"100%",children:d.jsx(Wo.Group,{value:I,onChange:se,sx:{root:{width:"100%"}},w:"100%",children:d.jsx(bt,{children:K?d.jsxs(d.Fragment,{children:[Z&&d.jsxs(ve,{flex:1,children:[d.jsx(xe,{w:m?"100%":"50%",children:d.jsx(Wo,{value:"laterToday",label:d.jsx(ue,{fz:14,lh:"20px",c:"#31394A",children:o("snooze.laterToday")})})}),d.jsx(xe,{w:m?"100%":"45%",pl:m?34:0,children:d.jsx(ue,{fz:14,lh:"20px",c:"dimmed",children:"15:00"})})]}),d.jsxs(ve,{flex:1,children:[d.jsx(xe,{w:m?"100%":"50%",children:d.jsx(Wo,{value:"snoozeTomorrow",label:d.jsx(ue,{fz:14,lh:"20px",c:"#31394A",children:o("snooze.tomorrow")})})}),d.jsx(xe,{w:m?"100%":"45%",pl:m?34:0,children:d.jsx(ue,{fz:14,lh:"20px",c:"dimmed",children:WW(J,C)})})]}),d.jsxs(ve,{flex:1,children:[d.jsx(xe,{w:m?"100%":"50%",children:d.jsx(Wo,{value:"nextWeek",label:d.jsx(ue,{fz:14,lh:"20px",c:"#31394A",children:o("snooze.nextWeek")})})}),d.jsx(xe,{w:m?"100%":"45%",pl:m?34:0,children:d.jsx(ue,{fz:14,lh:"20px",c:"dimmed",children:WW(ne,C)})})]}),d.jsx(Wo,{value:"custom",label:d.jsx(ue,{fz:14,lh:"20px",c:"#31394A",children:o("modals.controls.setDate")})})]}):d.jsxs(d.Fragment,{children:[L&&d.jsxs(ve,{flex:1,children:[d.jsx(xe,{w:m?"100%":"50%",children:d.jsx(Wo,{value:"previous",label:d.jsx(ue,{fz:14,lh:"20px",c:"#31394A",children:o("modals.controls.previousChoice")})})}),d.jsx(xe,{w:m?"100%":"45%",pl:m?34:0,children:d.jsx(ve,{children:d.jsx(ue,{fz:14,lh:"20px",c:"dimmed",truncate:!0,children:jXe(L,C)})})})]}),d.jsxs(ve,{flex:1,children:[d.jsx(xe,{w:m?"100%":"50%",children:d.jsx(Wo,{value:"morning",label:d.jsx(ue,{fz:14,lh:"20px",c:"#31394A",children:o("modals.controls.tomorrowMorning")})})}),d.jsx(xe,{w:m?"100%":"45%",pl:m?34:0,children:d.jsx(ue,{fz:14,lh:"20px",c:"dimmed",children:F0(Y,C)})})]}),d.jsxs(ve,{flex:1,children:[d.jsx(xe,{w:m?"100%":"50%",children:d.jsx(Wo,{value:"afternoon",label:d.jsx(ue,{fz:14,lh:"20px",c:"#31394A",children:o("modals.controls.tomorrowAfternoon")})})}),d.jsx(xe,{w:m?"100%":"45%",pl:m?34:0,children:d.jsx(ue,{fz:14,lh:"20px",c:"dimmed",children:F0(G,C)})})]}),d.jsx(Wo,{value:"custom",label:d.jsx(ue,{fz:14,lh:"20px",c:"#31394A",children:o("modals.controls.setDate")})})]})})})}),I==="custom"&&(m?d.jsx(d.Fragment,{children:d.jsx(Xte,{title:o("delayedSend.dateTime"),minDate:new Date,placeholder:o("settings.notSpecified"),startValue:$,onStartDateChange:le,hideEndDate:!0,hideToday:!0,customInputStyles:{input:{border:"none",backgroundColor:"#F5F6F8"}}})}):d.jsxs(xe,{mt:"md",align:"flex-start",children:[d.jsx(xe,{flex:1,children:d.jsx(G2,{defaultDate:$,minDate:new Date,getDayProps:be})}),d.jsxs(bt,{w:"100%",gap:4,pt:38,pl:20,children:[d.jsx(Hn,{readOnly:!0,value:nie($,C),styles:{input:{backgroundColor:"#F5F6F8",border:"none"}}}),d.jsx(Ia,{ref:j,maxDropdownHeight:140,data:w3(),value:q,onChange:Te=>{U(Te||"00:00")},styles:{input:{backgroundColor:"#F5F6F8",border:"none"}},dropdownOpened:k,onClick:()=>E(Te=>!Te)})]})]}))]}),!m&&d.jsxs(ve,{justify:"flex-end",mt:"md",children:[d.jsx(yt,{fz:14,variant:"outline",onClick:e,style:{border:"none"},children:o("modals.controls.cancel")}),d.jsx(yt,{fz:14,onClick:ce,children:Ce})]})]})]})]})},wm=Object.assign({},{Button:RXe,Modal:DXe}),IXe="data:image/svg+xml,%3csvg%20width='22'%20height='22'%20viewBox='0%200%2022%2022'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M20.7772%208.90032C21.3273%2011.4618%2020.8501%2014.1369%2019.4484%2016.3503L14.126%2012.9796C14.6446%2012.1607%2014.8212%2011.1709%2014.6176%2010.2231L20.7772%208.90032Z'%20fill='%23848E9C'/%3e%3cpath%20d='M16.9593%202.96956C17.5737%203.42548%2018.1337%203.95039%2018.6284%204.53401L13.8226%208.60758C13.6395%208.39164%2013.4323%208.19742%2013.205%208.02873L16.9593%202.96956Z'%20fill='%23848E9C'/%3e%3cpath%20d='M7.37938%2020.3215C5.91281%2019.7518%204.60134%2018.8442%203.55157%2017.6723C2.50181%2016.5004%201.74336%2015.0973%201.33789%2013.5772L7.42508%2011.9535C7.5751%2012.516%207.85573%2013.0351%208.24414%2013.4687C8.63256%2013.9023%209.1178%2014.2382%209.66043%2014.4489L7.37938%2020.3215Z'%20fill='%23848E9C'/%3e%3cpath%20d='M4.22771%203.64236C6.07511%201.94191%208.49459%200.998657%2011.0054%201L11.0021%207.29999C10.0731%207.2995%209.17785%207.6485%208.49431%208.27767L4.22771%203.64236Z'%20fill='%23848E9C'/%3e%3cpath%20d='M17.9394%2018.2004C16.0753%2019.9969%2013.587%2021.0005%2010.9981%2021L10.9994%2014.7C11.9573%2014.7002%2012.8779%2014.3289%2013.5677%2013.6641L17.9394%2018.2004Z'%20fill='%23848E9C'/%3e%3cpath%20d='M1.34084%208.4118C1.68329%207.13376%202.27596%205.93639%203.08451%204.88906L8.07133%208.73894C7.77216%209.12646%207.55288%209.56949%207.42617%2010.0424L1.34084%208.4118Z'%20fill='%23848E9C'/%3e%3cpath%20d='M11%201.59961C16.1915%201.59961%2020.4004%205.80853%2020.4004%2011C20.4004%2016.1915%2016.1915%2020.4004%2011%2020.4004C5.80853%2020.4004%201.59962%2016.1915%201.59961%2011C1.59961%205.80853%205.80852%201.59961%2011%201.59961ZM11%207.29199C8.95194%207.29199%207.29199%208.95194%207.29199%2011C7.292%2013.048%208.95195%2014.708%2011%2014.708C13.048%2014.708%2014.708%2013.048%2014.708%2011C14.708%208.95195%2013.048%207.29201%2011%207.29199Z'%20stroke='%23848E9C'%20stroke-width='1.2'/%3e%3c/svg%3e";var YW={exports:{}},w0={};/**
 * @license React
 * react-jsx-runtime.production.js
 *
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var GW;function OXe(){if(GW)return w0;GW=1;var t=Symbol.for("react.transitional.element"),e=Symbol.for("react.fragment");function n(r,s,o){var i=null;if(o!==void 0&&(i=""+o),s.key!==void 0&&(i=""+s.key),"key"in s){o={};for(var a in s)a!=="key"&&(o[a]=s[a])}else o=s;return s=o.ref,{$$typeof:t,type:r,key:i,ref:s!==void 0?s:null,props:o}}return w0.Fragment=e,w0.jsx=n,w0.jsxs=n,w0}var KW;function NXe(){return KW||(KW=1,YW.exports=OXe()),YW.exports}var Bt=NXe();/**
 * @license @tabler/icons-react v3.24.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */var LXe={outline:{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},filled:{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"currentColor",stroke:"none"}};/**
 * @license @tabler/icons-react v3.24.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const fy=(t,e,n,r)=>{const s=S.forwardRef(({color:o="currentColor",size:i=24,stroke:a=2,title:l,className:c,children:u,...f},h)=>S.createElement("svg",{ref:h,...LXe[t],width:i,height:i,className:["tabler-icon",`tabler-icon-${e}`,c].join(" "),strokeWidth:a,stroke:o,...f},[l&&S.createElement("title",{key:"svg-title"},l),...r.map(([m,y])=>S.createElement(m,y)),...Array.isArray(u)?u:[u]]));return s.displayName=`${n}`,s};/**
 * @license @tabler/icons-react v3.24.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */var $Xe=fy("outline","arrow-up","IconArrowUp",[["path",{d:"M12 5l0 14",key:"svg-0"}],["path",{d:"M18 11l-6 -6",key:"svg-1"}],["path",{d:"M6 11l6 -6",key:"svg-2"}]]);/**
 * @license @tabler/icons-react v3.24.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */var FXe=fy("outline","chevron-right","IconChevronRight",[["path",{d:"M9 6l6 6l-6 6",key:"svg-0"}]]);/**
 * @license @tabler/icons-react v3.24.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */var zXe=fy("outline","folder","IconFolder",[["path",{d:"M5 4h4l3 3h7a2 2 0 0 1 2 2v8a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2v-11a2 2 0 0 1 2 -2",key:"svg-0"}]]);/**
 * @license @tabler/icons-react v3.24.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */var PXe=fy("outline","search","IconSearch",[["path",{d:"M10 10m-7 0a7 7 0 1 0 14 0a7 7 0 1 0 -14 0",key:"svg-0"}],["path",{d:"M21 21l-6 -6",key:"svg-1"}]]);/**
 * @license @tabler/icons-react v3.24.0 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */var $M=fy("outline","x","IconX",[["path",{d:"M18 6l-12 12",key:"svg-0"}],["path",{d:"M6 6l12 12",key:"svg-1"}]]);const BXe=t=>S.createElement("svg",{width:32,height:32,viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",...t},S.createElement("path",{d:"M23.3257 16.0001C23.3257 20.0461 20.0458 23.326 15.9999 23.326C11.954 23.326 8.67407 20.0461 8.67407 16.0001C8.67407 11.9542 11.954 8.67432 15.9999 8.67432C20.0458 8.67432 23.3257 11.9542 23.3257 16.0001ZM10.9132 16.0001C10.9132 18.8094 13.1906 21.0868 15.9999 21.0868C18.8092 21.0868 21.0866 18.8094 21.0866 16.0001C21.0866 13.1908 18.8092 10.9134 15.9999 10.9134C13.1906 10.9134 10.9132 13.1908 10.9132 16.0001Z",fill:"white"}),S.createElement("path",{d:"M31.6433 12.6405C32.2562 15.4944 32.0767 18.4615 31.1243 21.2207C30.1719 23.9799 28.4828 26.4259 26.24 28.294L20.0443 20.8556C20.9301 20.1178 21.5972 19.1517 21.9734 18.0619C22.3496 16.9722 22.4205 15.8003 22.1784 14.6732L31.6433 12.6405Z",fill:"#DA77F2"}),S.createElement("path",{d:"M27.3137 4.68629C29.5378 6.91035 31.057 9.74059 31.6815 12.8233L22.1935 14.7453C21.9468 13.5278 21.3468 12.41 20.4684 11.5316L27.3137 4.68629Z",fill:"#FFA94D"}),S.createElement("path",{d:"M15.7109 0.00261191C17.9572 -0.0379809 20.1868 0.394937 22.2547 1.27318C24.3225 2.15143 26.1823 3.45532 27.7128 5.09996L20.626 11.695C20.0215 11.0454 19.287 10.5305 18.4703 10.1836C17.6536 9.83672 16.773 9.66573 15.8858 9.68177L15.7109 0.00261191Z",fill:"#FCC419"}),S.createElement("path",{d:"M25.5347 3.1513C26.5177 3.88076 27.4138 4.72063 28.2053 5.65441L20.8205 11.914C20.5079 11.5452 20.154 11.2135 19.7658 10.9254L25.5347 3.1513Z",fill:"#3BC9DB"}),S.createElement("path",{d:"M11.1781 31.2561C8.44451 30.3921 5.99326 28.8095 4.08072 26.6738C2.16817 24.5381 0.864593 21.9278 0.306308 19.1158L9.80171 17.2306C10.0222 18.3412 10.5371 19.3722 11.2924 20.2157C12.0478 21.0592 13.0159 21.6842 14.0956 22.0255L11.1781 31.2561Z",fill:"#51CF66"}),S.createElement("path",{d:"M2.08871 8.09582C3.48409 5.63996 5.50473 3.59727 7.94529 2.17532C10.3859 0.753373 13.1593 0.00284454 15.9839 8.06746e-06L15.9937 9.68074C14.8781 9.68186 13.7827 9.97828 12.8188 10.5399C11.8548 11.1015 11.0568 11.9083 10.5057 12.8782L2.08871 8.09582Z",fill:"#FFD43B"}),S.createElement("path",{d:"M27.3137 27.3137C25.828 28.7994 24.0641 29.978 22.1229 30.7821C20.1817 31.5861 18.1011 32 16 32L16 22.3193C16.8299 22.3193 17.6516 22.1558 18.4183 21.8382C19.185 21.5207 19.8816 21.0552 20.4684 20.4684L27.3137 27.3137Z",fill:"#339AF0"}),S.createElement("path",{d:"M29.5177 24.5599C28.8314 25.6437 28.0172 26.6411 27.0926 27.5305L20.3811 20.554C20.7462 20.2028 21.0678 19.8088 21.3389 19.3808L29.5177 24.5599Z",fill:"#BE4BDB"}),S.createElement("path",{d:"M0.542532 20.1312C-0.0620174 17.8692 -0.162742 15.502 0.247467 13.1968C0.657676 10.8916 1.56882 8.70457 2.9166 6.78997L10.8327 12.3625C10.3003 13.1186 9.94049 13.9824 9.77847 14.8929C9.61646 15.8033 9.65624 16.7382 9.89501 17.6316L0.542532 20.1312Z",fill:"#FF922B"}),S.createElement("path",{d:"M0.545187 11.8589C1.23402 9.28815 2.55324 6.92984 4.38338 4.99754L11.412 11.6545C10.6891 12.4177 10.1681 13.3491 9.89606 14.3645L0.545187 11.8589Z",fill:"#FFA94D"}),S.createElement("path",{d:"M16 32C14.002 32 12.0217 31.6258 10.1615 30.8967L13.6941 21.8835C14.4288 22.1715 15.2109 22.3193 16 22.3193L16 32Z",fill:"#22B8CF"})),HXe=t=>S.createElement("svg",{width:102,height:32,viewBox:"0 0 102 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",...t},S.createElement("path",{d:"M52.3132 21.9581L56.3132 12.1449C56.3539 12.1041 56.3132 12.0294 56.2385 12.0294H52.6663C52.6392 12.0294 52.6143 12.0158 52.5916 11.9887L51.3624 10.0124C51.3217 9.97167 51.3624 9.89697 51.4371 9.89697H58.7376C58.7784 9.89697 58.8123 9.93772 58.8123 9.97847V11.5201L54.7376 22.0803C54.7376 22.1211 54.6969 22.1211 54.6629 22.1211H52.4354C52.32 22.0803 52.2792 22.0396 52.32 21.9649L52.3132 21.9581Z",fill:"#333333"}),S.createElement("path",{d:"M58.1399 17.924L58.7986 16.0497C58.7986 16.0089 58.8326 16.0089 58.8665 16.0089H62.1263C62.1602 16.0089 62.1942 16.0497 62.1942 16.0904V17.9648C62.1942 18.0055 62.1602 18.0463 62.1263 18.0463H58.167C58.1331 18.0055 58.0991 17.9648 58.1331 17.924H58.1399Z",fill:"#333333"}),S.createElement("path",{d:"M45.7629 9.90073C46.8712 9.90073 47.7847 10.0344 48.5031 10.3017C49.2272 10.5691 49.7647 10.9729 50.1156 11.5131C50.4665 12.0534 50.6419 12.7357 50.6419 13.56C50.6419 14.117 50.5361 14.6043 50.3244 15.022C50.1128 15.4398 49.8343 15.7934 49.489 16.0831C49.1437 16.3727 48.7705 16.6094 48.3695 16.7932L51.9619 22.115H49.088L46.1722 17.4281H44.7938V22.115H42.2039V9.90073H45.7629ZM45.5791 12.0228H44.7938V15.3228H45.6292C46.4869 15.3228 47.0996 15.1808 47.4672 14.8967C47.8404 14.6071 48.0269 14.1838 48.0269 13.6268C48.0269 13.0476 47.8264 12.6354 47.4254 12.3904C47.03 12.1453 46.4145 12.0228 45.5791 12.0228Z",fill:"#333333"}),S.createElement("path",{d:"M73.938 15.8909C73.938 17.2666 73.6734 18.4167 73.1443 19.3413C72.6207 20.2603 71.8605 20.9537 70.8635 21.4216C69.8665 21.8839 68.6663 22.115 67.2627 22.115H63.804V9.90073H67.6387C68.9197 9.90073 70.0308 10.1291 70.9721 10.5858C71.9134 11.0369 72.643 11.7081 73.161 12.5992C73.679 13.4848 73.938 14.582 73.938 15.8909ZM71.2478 15.9577C71.2478 15.0554 71.1141 14.3147 70.8468 13.7354C70.585 13.1506 70.1951 12.719 69.6772 12.4405C69.1648 12.162 68.5298 12.0228 67.7723 12.0228H66.3938V19.9762H67.505C68.7693 19.9762 69.7078 19.6393 70.3205 18.9653C70.9387 18.2914 71.2478 17.2889 71.2478 15.9577Z",fill:"#333333"}),S.createElement("path",{d:"M76.1272 22.115V9.90073H78.7171V22.115H76.1272Z",fill:"#333333"}),S.createElement("path",{d:"M88.6592 18.7231C88.6592 19.4471 88.4838 20.0765 88.1329 20.6112C87.782 21.1459 87.2696 21.558 86.5957 21.8476C85.9273 22.1373 85.1141 22.2821 84.1562 22.2821C83.7329 22.2821 83.3179 22.2542 82.9113 22.1985C82.5103 22.1428 82.1232 22.0621 81.7501 21.9563C81.3825 21.8449 81.0316 21.7084 80.6974 21.5469V19.1408C81.2767 19.397 81.8782 19.6281 82.502 19.8342C83.1258 20.0403 83.744 20.1433 84.3567 20.1433C84.78 20.1433 85.1197 20.0876 85.3759 19.9762C85.6377 19.8649 85.8271 19.7117 85.944 19.5167C86.061 19.3218 86.1195 19.099 86.1195 18.8484C86.1195 18.5421 86.0164 18.2803 85.8104 18.0631C85.6043 17.8458 85.3202 17.6426 84.9582 17.4532C84.6017 17.2638 84.1979 17.0605 83.7468 16.8433C83.4627 16.7096 83.1536 16.5481 82.8194 16.3587C82.4853 16.1638 82.1678 15.9271 81.867 15.6486C81.5663 15.3701 81.3184 15.0332 81.1235 14.6377C80.9341 14.2367 80.8394 13.7577 80.8394 13.2007C80.8394 12.4711 81.0065 11.8473 81.3407 11.3293C81.6749 10.8114 82.1511 10.4159 82.7693 10.143C83.3931 9.86452 84.1283 9.72528 84.9749 9.72528C85.6098 9.72528 86.2142 9.80047 86.7878 9.95085C87.3671 10.0957 87.9714 10.3073 88.6008 10.5858L87.7653 12.5992C87.2028 12.3709 86.6987 12.1954 86.2531 12.0729C85.8076 11.9448 85.3536 11.8807 84.8914 11.8807C84.5683 11.8807 84.2926 11.9337 84.0643 12.0395C83.8359 12.1397 83.6633 12.2845 83.5463 12.4739C83.4293 12.6577 83.3708 12.8721 83.3708 13.1172C83.3708 13.4068 83.4544 13.6519 83.6215 13.8524C83.7941 14.0473 84.0503 14.2367 84.3901 14.4205C84.7354 14.6043 85.1643 14.8187 85.6767 15.0638C86.3005 15.359 86.8324 15.6681 87.2724 15.9911C87.718 16.3086 88.0605 16.6846 88.3 17.119C88.5395 17.5479 88.6592 18.0826 88.6592 18.7231Z",fill:"#333333"}),S.createElement("path",{d:"M100.356 22.115H97.4151L94.2153 16.9686L93.1209 17.7539V22.115H90.531V9.90073H93.1209V15.4899C93.2935 15.2504 93.4634 15.0109 93.6305 14.7714C93.7976 14.5319 93.9675 14.2924 94.1401 14.0529L97.4485 9.90073H100.322L96.0617 15.3061L100.356 22.115Z",fill:"#333333"}),S.createElement("path",{d:"M24.3257 16.0001C24.3257 20.046 21.0458 23.3259 16.9999 23.3259C12.954 23.3259 9.67407 20.046 9.67407 16.0001C9.67407 11.9542 12.954 8.67427 16.9999 8.67427C21.0458 8.67427 24.3257 11.9542 24.3257 16.0001ZM11.9132 16.0001C11.9132 18.8094 14.1906 21.0868 16.9999 21.0868C19.8092 21.0868 22.0866 18.8094 22.0866 16.0001C22.0866 13.1908 19.8092 10.9134 16.9999 10.9134C14.1906 10.9134 11.9132 13.1908 11.9132 16.0001Z",fill:"white"}),S.createElement("path",{d:"M32.6434 12.6405C33.2562 15.4944 33.0767 18.4615 32.1243 21.2207C31.1719 23.9799 29.4828 26.4259 27.24 28.294L21.0443 20.8556C21.9302 20.1178 22.5973 19.1517 22.9734 18.0619C23.3496 16.9722 23.4205 15.8003 23.1784 14.6732L32.6434 12.6405Z",fill:"#DA77F2"}),S.createElement("path",{d:"M28.3137 4.68629C30.5378 6.91035 32.057 9.74059 32.6815 12.8233L23.1935 14.7453C22.9468 13.5278 22.3468 12.41 21.4684 11.5316L28.3137 4.68629Z",fill:"#FFA94D"}),S.createElement("path",{d:"M16.7109 0.00261191C18.9572 -0.0379809 21.1868 0.394937 23.2547 1.27318C25.3225 2.15143 27.1823 3.45532 28.7128 5.09996L21.626 11.695C21.0215 11.0454 20.287 10.5305 19.4703 10.1836C18.6536 9.83672 17.773 9.66573 16.8858 9.68177L16.7109 0.00261191Z",fill:"#FCC419"}),S.createElement("path",{d:"M26.5347 3.1513C27.5177 3.88076 28.4138 4.72063 29.2053 5.65441L21.8205 11.914C21.5079 11.5452 21.154 11.2135 20.7658 10.9254L26.5347 3.1513Z",fill:"#3BC9DB"}),S.createElement("path",{d:"M12.1781 31.2561C9.44452 30.3921 6.99327 28.8095 5.08072 26.6738C3.16817 24.5381 1.86459 21.9278 1.30631 19.1158L10.8017 17.2306C11.0222 18.3412 11.5371 19.3722 12.2924 20.2157C13.0478 21.0592 14.0159 21.6842 15.0956 22.0255L12.1781 31.2561Z",fill:"#51CF66"}),S.createElement("path",{d:"M3.08872 8.09582C4.48409 5.63997 6.50473 3.59727 8.9453 2.17532C11.3859 0.753373 14.1594 0.00284454 16.9839 8.06746e-06L16.9937 9.68074C15.8781 9.68186 14.7827 9.97828 13.8188 10.5399C12.8549 11.1015 12.0568 11.9083 11.5057 12.8782L3.08872 8.09582Z",fill:"#FFD43B"}),S.createElement("path",{d:"M28.3137 27.3137C26.828 28.7994 25.0642 29.978 23.123 30.7821C21.1817 31.5861 19.1012 32 17 32V22.3193C17.8299 22.3193 18.6516 22.1558 19.4183 21.8382C20.185 21.5207 20.8816 21.0552 21.4684 20.4684L28.3137 27.3137Z",fill:"#339AF0"}),S.createElement("path",{d:"M30.5177 24.5599C29.8314 25.6437 29.0172 26.6411 28.0927 27.5305L21.3811 20.554C21.7462 20.2028 22.0678 19.8088 22.3389 19.3808L30.5177 24.5599Z",fill:"#BE4BDB"}),S.createElement("path",{d:"M1.54253 20.1312C0.937983 17.8692 0.837258 15.502 1.24747 13.1968C1.65768 10.8916 2.56882 8.70457 3.9166 6.78997L11.8327 12.3625C11.3004 13.1186 10.9405 13.9824 10.7785 14.8929C10.6165 15.8033 10.6562 16.7382 10.895 17.6316L1.54253 20.1312Z",fill:"#FF922B"}),S.createElement("path",{d:"M1.54519 11.8589C2.23402 9.28815 3.55324 6.92984 5.38338 4.99754L12.412 11.6545C11.6892 12.4177 11.1681 13.3491 10.8961 14.3645L1.54519 11.8589Z",fill:"#FFA94D"}),S.createElement("path",{d:"M17 32C15.002 32 13.0217 31.6258 11.1615 30.8967L14.6941 21.8835C15.4288 22.1715 16.2109 22.3193 17 22.3193V32Z",fill:"#22B8CF"})),UXe=t=>S.createElement("svg",{width:110,height:32,viewBox:"0 0 110 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",...t},S.createElement("g",{clipPath:"url(#clip0_939_11669)"},S.createElement("path",{d:"M23.6591 16.0001C23.6591 20.0461 20.3792 23.326 16.3333 23.326C12.2873 23.326 9.00745 20.0461 9.00745 16.0001C9.00745 11.9542 12.2873 8.67432 16.3333 8.67432C20.3792 8.67432 23.6591 11.9542 23.6591 16.0001ZM11.2466 16.0001C11.2466 18.8094 13.524 21.0868 16.3333 21.0868C19.1426 21.0868 21.42 18.8094 21.42 16.0001C21.42 13.1908 19.1426 10.9134 16.3333 10.9134C13.524 10.9134 11.2466 13.1908 11.2466 16.0001Z",fill:"white"}),S.createElement("path",{d:"M31.9767 12.6405C32.5896 15.4944 32.4101 18.4615 31.4577 21.2207C30.5053 23.9799 28.8162 26.4259 26.5734 28.294L20.3777 20.8556C21.2635 20.1178 21.9306 19.1517 22.3068 18.0619C22.683 16.9722 22.7539 15.8003 22.5118 14.6732L31.9767 12.6405Z",fill:"#DA77F2"}),S.createElement("path",{d:"M27.6471 4.68629C29.8712 6.91035 31.3904 9.74059 32.0149 12.8233L22.5269 14.7453C22.2802 13.5278 21.6802 12.41 20.8018 11.5316L27.6471 4.68629Z",fill:"#FFA94D"}),S.createElement("path",{d:"M16.0443 0.00261191C18.2906 -0.0379809 20.5202 0.394937 22.5881 1.27318C24.6559 2.15143 26.5157 3.45532 28.0462 5.09996L20.9594 11.695C20.3549 11.0454 19.6204 10.5305 18.8037 10.1836C17.987 9.83672 17.1064 9.66573 16.2192 9.68177L16.0443 0.00261191Z",fill:"#FCC419"}),S.createElement("path",{d:"M25.8681 3.1513C26.8511 3.88076 27.7472 4.72063 28.5387 5.65441L21.1539 11.914C20.8413 11.5452 20.4874 11.2135 20.0992 10.9254L25.8681 3.1513Z",fill:"#3BC9DB"}),S.createElement("path",{d:"M11.5115 31.2561C8.77789 30.3921 6.32664 28.8095 4.41409 26.6738C2.50155 24.5381 1.19797 21.9278 0.639682 19.1158L10.1351 17.2306C10.3556 18.3412 10.8704 19.3722 11.6258 20.2157C12.3812 21.0592 13.3493 21.6842 14.429 22.0255L11.5115 31.2561Z",fill:"#51CF66"}),S.createElement("path",{d:"M2.42209 8.09582C3.81747 5.63996 5.83811 3.59727 8.27867 2.17532C10.7192 0.753373 13.4927 0.00284454 16.3173 8.06746e-06L16.327 9.68074C15.2115 9.68186 14.1161 9.97828 13.1521 10.5399C12.1882 11.1015 11.3902 11.9083 10.8391 12.8782L2.42209 8.09582Z",fill:"#FFD43B"}),S.createElement("path",{d:"M27.6471 27.3137C26.1614 28.7994 24.3975 29.978 22.4563 30.7821C20.5151 31.5861 18.4345 32 16.3334 32L16.3334 22.3193C17.1632 22.3193 17.985 22.1558 18.7517 21.8382C19.5184 21.5207 20.215 21.0552 20.8018 20.4684L27.6471 27.3137Z",fill:"#339AF0"}),S.createElement("path",{d:"M29.8511 24.5599C29.1648 25.6437 28.3506 26.6411 27.426 27.5305L20.7145 20.554C21.0796 20.2028 21.4012 19.8088 21.6723 19.3808L29.8511 24.5599Z",fill:"#BE4BDB"}),S.createElement("path",{d:"M0.875906 20.1312C0.271357 17.8692 0.170632 15.502 0.580841 13.1968C0.991051 10.8916 1.9022 8.70457 3.24997 6.78997L11.166 12.3625C10.6337 13.1186 10.2739 13.9824 10.1119 14.8929C9.94984 15.8033 9.98962 16.7382 10.2284 17.6316L0.875906 20.1312Z",fill:"#FF922B"}),S.createElement("path",{d:"M0.878561 11.8589C1.56739 9.28815 2.88661 6.92984 4.71676 4.99754L11.7454 11.6545C11.0225 12.4177 10.5015 13.3491 10.2294 14.3645L0.878561 11.8589Z",fill:"#FFA94D"}),S.createElement("path",{d:"M16.3334 32C14.3354 32 12.3551 31.6258 10.4949 30.8967L14.0274 21.8835C14.7621 22.1715 15.5443 22.3193 16.3334 22.3193L16.3334 32Z",fill:"#22B8CF"}),S.createElement("path",{d:"M51.1469 21.9415L55.1469 12.1282C55.1877 12.0875 55.1469 12.0128 55.0722 12.0128H51.5001C51.4729 12.0128 51.448 11.9992 51.4254 11.9721L50.1962 9.99582C50.1554 9.95507 50.1962 9.88037 50.2709 9.88037H57.5714C57.6121 9.88037 57.6461 9.92112 57.6461 9.96186V11.5035L53.5714 22.0637C53.5714 22.1045 53.5306 22.1045 53.4967 22.1045H51.2692C51.1537 22.0637 51.113 22.023 51.1537 21.9483L51.1469 21.9415Z",fill:"#333333"}),S.createElement("path",{d:"M56.9734 17.9075L57.6321 16.0332C57.6321 15.9924 57.6661 15.9924 57.7 15.9924H60.9598C60.9937 15.9924 61.0277 16.0332 61.0277 16.0739V17.9483C61.0277 17.989 60.9937 18.0298 60.9598 18.0298H57.0005C56.9666 17.989 56.9326 17.9483 56.9666 17.9075H56.9734Z",fill:"#333333"}),S.createElement("path",{d:"M50.1687 13.6358C50.1687 14.9397 49.7544 15.9313 48.8784 16.6443C48.0023 17.3167 46.7935 17.6698 45.2111 17.6698H44.0431V22.0976H41.3334V9.87354H45.4149C46.9565 9.87354 48.1246 10.1927 48.9531 10.8243C49.7476 11.4559 50.1619 12.4066 50.1619 13.6358H50.1687ZM44.0498 15.5713H44.9259C45.7612 15.5713 46.386 15.4151 46.8003 15.0959C47.2145 14.7768 47.4251 14.3421 47.4251 13.7513C47.4251 13.1605 47.2553 12.7258 46.9225 12.4066C46.5897 12.1282 46.0465 11.972 45.2994 11.972H44.0498V15.5713Z",fill:"#333333"}),S.createElement("path",{d:"M72.2269 9.87329V19.9378H73.8568V24.2977H71.3576V22.0906H63.6972V24.2977H61.198V19.9378H62.142C62.4612 19.2994 62.7668 18.6339 63.0588 17.9208C63.3576 17.2145 63.6292 16.4539 63.8873 15.639C64.1454 14.8241 64.3763 13.9412 64.58 12.9904C64.7837 12.0397 64.9603 11.0006 65.0961 9.87329H72.2201H72.2269ZM69.6462 12.0329H67.1607C67.0792 12.6237 66.9637 13.2553 66.8211 13.9208C66.6785 14.5932 66.5019 15.2723 66.305 15.965C66.108 16.6577 65.8839 17.3436 65.6462 18.0159C65.4017 18.6882 65.1437 19.3334 64.872 19.9378H69.6462V12.0261V12.0329Z",fill:"#333333"}),S.createElement("path",{d:"M75.4119 9.87329H77.7413V15.7748C77.7413 16.0668 77.7413 16.386 77.7277 16.7392C77.7209 17.0923 77.7074 17.4319 77.6938 17.7714C77.6802 18.111 77.6666 18.403 77.653 18.6543C77.6394 18.9055 77.6327 19.0753 77.6191 19.1568H77.6666L83.3101 9.87329H86.4136V22.0974H84.1046V16.2298C84.1046 15.9174 84.1046 15.5779 84.125 15.2112C84.1454 14.8444 84.1522 14.4845 84.1726 14.1381C84.1929 13.7918 84.2065 13.493 84.2269 13.2417C84.2405 12.9904 84.2541 12.8207 84.2608 12.7324H84.1929L78.5223 22.0974H75.4052V9.87329H75.4119Z",fill:"#333333"}),S.createElement("path",{d:"M94.2031 11.8564C93.7074 11.8564 93.266 11.9515 92.8857 12.1416C92.5053 12.3318 92.1862 12.6102 91.9213 12.977C91.6565 13.3437 91.4663 13.7783 91.3305 14.2877C91.1947 14.8038 91.1335 15.3742 91.1335 16.0194C91.1335 16.8819 91.2422 17.6221 91.4527 18.2333C91.67 18.8445 92.0028 19.3063 92.451 19.6323C92.8992 19.9515 93.4833 20.1145 94.1964 20.1145C94.6921 20.1145 95.1879 20.0602 95.6904 19.9447C96.1862 19.836 96.7295 19.6731 97.3135 19.4693V21.6425C96.7702 21.8666 96.2405 22.0228 95.7176 22.1247C95.1947 22.2197 94.6038 22.2673 93.9519 22.2673C92.6887 22.2673 91.6564 22.0092 90.8483 21.4863C90.0401 20.9634 89.4357 20.2367 89.0486 19.2927C88.6548 18.3556 88.4646 17.2554 88.4646 16.0058C88.4646 15.0822 88.5868 14.2333 88.8381 13.4659C89.0894 12.6985 89.4561 12.033 89.9383 11.4693C90.4205 10.9056 91.0249 10.471 91.7379 10.1654C92.451 9.85981 93.2728 9.70361 94.1964 9.70361C94.8008 9.70361 95.412 9.77832 96.0232 9.93451C96.6344 10.0907 97.2184 10.3012 97.7753 10.5661L96.94 12.6714C96.485 12.454 96.0232 12.2639 95.5614 12.1009C95.0996 11.9379 94.6446 11.8564 94.1964 11.8564H94.2031Z",fill:"#333333"}),S.createElement("path",{d:"M109.429 22.0974H106.488L102.06 15.9039V22.0974H99.4662V9.87329H102.06V15.7952L106.441 9.87329H109.198L104.743 15.7409L109.436 22.0974H109.429Z",fill:"#333333"})),S.createElement("defs",null,S.createElement("clipPath",{id:"clip0_939_11669"},S.createElement("rect",{width:109.436,height:32,fill:"white"})))),XW={en:{MyDocuments:"My documents",Search:"Search",Find:"Find",SearchResults:"Search results",ColumnName:"Name",ColumnChanged:"Changed",ColumnSize:"Size",MaxSizeLimitPartOne:"Total size of files sent exceeds the current limit (25 MB).",MaxSizeLimitPartTwo:"Files can be sent as links to R7-Disk.",FilesSelected:"Selected files",AttachFile:"Attach file",AttachFiles:"Attach files",AddLink:"Add link",AddLinks:"Add links",docs:"My documents",sharedToMe:"Shared to me",sharedAccess:"Shared access",favorites:"Favorites",common:"Common",recycleBin:"Recycle bin",globalRecycleBin:"Global recycle bin",recent:"Recent",link:"Link",fileDepot:"File depot",rooms:"Rooms",room:"Room"},ru:{MyDocuments:"Мои документы",Search:"Поиск",Find:"Найти",SearchResults:"Результаты поиска",ColumnName:"Название",ColumnChanged:"Изменен",ColumnSize:"Размер",MaxSizeLimitPartOne:"Общий объем отправляемых файлов превышает действующее ограничение (25 МБ).",MaxSizeLimitPartTwo:"Файлы можно отправить в виде ссылок на Р7-Диск.",FilesSelected:"Выбрано файлов",AttachFile:"Прикрепить файл",AttachFiles:"Прикрепить файлы",AddLink:"Добавить ссылку",AddLinks:"Добавить ссылки",docs:"Мои документы",sharedToMe:"Доступно для меня",sharedAccess:"Общий доступ",favorites:"Избранное",common:"Общее",recycleBin:"Корзина",globalRecycleBin:"Глобальная корзина",recent:"НЕдавнее",link:"Ссылка",fileDepot:"Хранилище файлов",rooms:"Комнаты",room:"Комната"}},ko=(t,e)=>{if(!t)return XW.ru[e]||"";const n=XW[`${t}`]||"";if(!n||typeof n!="object"||Array.isArray(n))return"";const r=n[e];return typeof r!="string"?"":r};function VXe({onSearch:t,onClose:e,locale:n}){const[r,s]=S.useState(""),o=Vh("(max-width: 640px)");return Bt.jsxs(ve,{gap:10,h:o?48:64,pt:o?"xs":"",px:"lg",styles:{root:{flexShrink:0}},children:[Bt.jsx(ve,{mr:"xs",children:o?Bt.jsx(BXe,{}):n==="ru"?Bt.jsx(UXe,{}):Bt.jsx(HXe,{})}),Bt.jsx(es,{variant:"filled",size:"md",fz:16,maw:480,styles:{root:{flexGrow:1}},placeholder:`${ko(n,"Search")}`,value:r,leftSection:Bt.jsx(PXe,{stroke:1.2}),rightSectionProps:{style:{width:110}},rightSection:!!r&&Bt.jsxs(ve,{gap:"xs",children:[Bt.jsx(Ve,{variant:"transparent",color:"gray",onClick:()=>{s(""),t("")},children:Bt.jsx($M,{stroke:1.2,size:22})}),Bt.jsx(yt,{variant:"default",size:"xs",bd:"none",fz:12,onClick:()=>t(r.trim()),children:`${ko(n,"Find")}`})]}),onChange:i=>s(i.currentTarget.value),onKeyDown:i=>i.key==="Enter"&&t(r.trim())}),Bt.jsx(Ve,{variant:"subtle",color:"gray",ml:"auto",size:"lg",onClick:e,children:Bt.jsx($M,{size:25,stroke:1.2})})]})}const rie=(t,e=2,n)=>{if(!+t)return n==="en"?"0 B":"0 Б";const r=1024,s=e<0?0:e,o=["Б","КБ","МБ","ГБ","ТБ","ПБ","ЭБ","ЗБ","ЙБ"],i=["B","KB","MB","GB","TB","PB","AB","ZB"],a=Math.floor(Math.log(t)/Math.log(r));return`${parseFloat((t/Math.pow(r,a)).toFixed(s))} ${n==="en"?i[a]:o[a]}`},qXe={pdf:{fileType:"pdf",documentType:"word",mimeType:"application/pdf",iconType:"pdf"},word:{fileType:"docx",documentType:"word",mimeType:"application/vnd.openxmlformats-officedocument.wordprocessingml.document",iconType:"doc"},word_old:{fileType:"doc",documentType:"word",mimeType:"application/msword",iconType:"doc"},rtf:{fileType:"rtf",documentType:"word",mimeType:"application/rtf",iconType:"doc"},odt:{fileType:"odt",documentType:"word",mimeType:"application/vnd.oasis.opendocument.text",iconType:"doc"},excel:{fileType:"xlsx",documentType:"cell",mimeType:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",iconType:"excel"},ods:{fileType:"ods",documentType:"cell",mimeType:"application/vnd.oasis.opendocument.spreadsheet",iconType:"excel"},excel_old:{fileType:"xls",documentType:"cell",mimeType:"application/vnd.ms-excel",iconType:"excel"},csv:{fileType:"csv",documentType:"cell",mimeType:"text/csv",iconType:"excel"},powerPoint:{fileType:"pptx",documentType:"slide",mimeType:"application/vnd.openxmlformats-officedocument.presentationml.presentation",iconType:"ppt"},powerPoint_old:{fileType:"ppt",documentType:"slide",mimeType:"application/vnd.ms-powerpoint",iconType:"ppt"},odp:{fileType:"odp",documentType:"slide",mimeType:"application/vnd.oasis.opendocument.presentation",iconType:"ppt"},draw:{fileType:"draw",mimeType:"application/x-draw",iconType:"draw"},text:{fileType:"txt",documentType:"text",mimeType:"text/plain",iconType:"doc"},imgGif:{mimeType:"image/gif",fileType:"png",iconType:"image"},imgPng:{mimeType:"image/png",fileType:"png",iconType:"image"},imgJpeg:{mimeType:"image/jpeg",fileType:"jpeg",iconType:"image"},imgJpg:{mimeType:"image/jpg",fileType:"jpg",iconType:"image"},imgSvg:{mimeType:"image/svg",iconType:"image"},imgSvg2:{mimeType:"image/svg+xml",iconType:"image"},webp:{mimeType:"image/webp",iconType:"image"},gif:{mimeType:"image/gif",iconType:"image"},videoMp4:{mimeType:"video/mp4",fileType:"mp4",iconType:"video"},webm:{mimeType:"video/webm",fileType:"webm",iconType:"video"},audio:{mimeType:"audio/mpeg",fileType:"audio",iconType:"audio"},zip:{mimeType:"application/zip",iconType:"zip"},archiveZip:{mimeType:"application/x-zip-compressed",iconType:"zip"},archiveRar:{mimeType:"application/x-rar-compressed",iconType:"zip"},archive7z:{mimeType:"application/x-compressed",iconType:"zip"}},WXe=t=>S.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...t},S.createElement("rect",{x:2,y:1,width:20,height:22,rx:3,fill:"#F03E3E"}),S.createElement("path",{d:"M7.40272 9.3772C8.0638 9.3772 8.54619 9.51969 8.84987 9.80468C9.15354 10.0873 9.30538 10.4774 9.30538 10.975C9.30538 11.1993 9.27151 11.4142 9.20377 11.6197C9.13602 11.823 9.02506 12.004 8.87089 12.1629C8.71905 12.3217 8.51582 12.4479 8.2612 12.5413C8.00657 12.6324 7.69238 12.678 7.31862 12.678H6.85259V14.5H5.76636V9.3772H7.40272ZM7.34666 10.2672H6.85259V11.7879H7.21C7.41323 11.7879 7.5896 11.7611 7.7391 11.7073C7.88861 11.6536 8.00424 11.5695 8.086 11.4551C8.16776 11.3406 8.20864 11.1934 8.20864 11.0136C8.20864 10.7613 8.13856 10.5744 7.9984 10.4529C7.85824 10.3291 7.64099 10.2672 7.34666 10.2672Z",fill:"white"}),S.createElement("path",{d:"M14.5228 11.8896C14.5228 12.4665 14.4119 12.9489 14.1899 13.3367C13.9704 13.7221 13.6515 14.013 13.2334 14.2092C12.8152 14.4031 12.3118 14.5 11.7231 14.5H10.2725V9.3772H11.8808C12.4181 9.3772 12.8841 9.47297 13.2789 9.66452C13.6737 9.85374 13.9797 10.1352 14.1969 10.509C14.4142 10.8804 14.5228 11.3406 14.5228 11.8896ZM13.3945 11.9176C13.3945 11.5392 13.3385 11.2285 13.2263 10.9855C13.1166 10.7402 12.953 10.5592 12.7358 10.4424C12.5209 10.3256 12.2546 10.2672 11.9369 10.2672H11.3587V13.603H11.8247C12.355 13.603 12.7486 13.4617 13.0056 13.179C13.2649 12.8964 13.3945 12.4759 13.3945 11.9176Z",fill:"white"}),S.createElement("path",{d:"M16.6532 14.5H15.5845V9.3772H18.5209V10.2672H16.6532V11.5882H18.3912V12.4747H16.6532V14.5Z",fill:"white"})),YXe=t=>S.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...t},S.createElement("rect",{x:2,y:1,width:20,height:22,rx:3,fill:"#228BE6"}),S.createElement("path",{d:"M6 7.9999C6 7.66853 6.26863 7.3999 6.6 7.3999H17.4C17.7314 7.3999 18 7.66853 18 7.9999C18 8.33127 17.7314 8.5999 17.4 8.5999H6.6C6.26863 8.5999 6 8.33127 6 7.9999Z",fill:"white"}),S.createElement("path",{d:"M6 11.9999C6 11.6685 6.26863 11.3999 6.6 11.3999H17.4C17.7314 11.3999 18 11.6685 18 11.9999C18 12.3313 17.7314 12.5999 17.4 12.5999H6.6C6.26863 12.5999 6 12.3313 6 11.9999Z",fill:"white"}),S.createElement("path",{d:"M6.6 15.3999C6.26863 15.3999 6 15.6685 6 15.9999C6 16.3313 6.26863 16.5999 6.6 16.5999H14.4C14.7314 16.5999 15 16.3313 15 15.9999C15 15.6685 14.7314 15.3999 14.4 15.3999H6.6Z",fill:"white"})),GXe=t=>S.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...t},S.createElement("rect",{x:2,y:1,width:20,height:22,rx:3,fill:"#37B24D"}),S.createElement("path",{d:"M4 8.6C4 8.26863 4.26863 8 4.6 8H19.4C19.7314 8 20 8.26863 20 8.6C20 8.93137 19.7314 9.2 19.4 9.2H4.6C4.26863 9.2 4 8.93137 4 8.6Z",fill:"white"}),S.createElement("path",{d:"M8.6 20C8.26863 20 8 19.7314 8 19.4L8 4.6C8 4.26863 8.26863 4 8.6 4C8.93137 4 9.2 4.26863 9.2 4.6L9.2 19.4C9.2 19.7314 8.93137 20 8.6 20Z",fill:"white"})),KXe=t=>S.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...t},S.createElement("rect",{x:2,y:1,width:20,height:22,rx:3,fill:"#F76707"}),S.createElement("path",{d:"M19 12C19 10.8953 18.7386 9.80634 18.237 8.82207C17.7355 7.8378 17.0082 6.98619 16.1145 6.33688L12 12H19Z",fill:"white"}),S.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12 17.8C15.2033 17.8 17.8 15.2033 17.8 12C17.8 8.79675 15.2033 6.2 12 6.2C8.79675 6.2 6.2 8.79675 6.2 12C6.2 15.2033 8.79675 17.8 12 17.8ZM12 19C15.866 19 19 15.866 19 12C19 8.13401 15.866 5 12 5C8.13401 5 5 8.13401 5 12C5 15.866 8.13401 19 12 19Z",fill:"white"})),XXe=t=>S.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...t},S.createElement("rect",{x:2,y:1,width:20,height:22,rx:3,fill:"#E64980"}),S.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.79932 9.37741V5.83398H18.1565V14.1911H14.6127C14.6127 16.8496 12.4576 19.0048 9.79904 19.0048C7.14051 19.0048 4.98535 16.8496 4.98535 14.1911C4.98535 11.5326 7.14079 9.37741 9.79932 9.37741C9.79941 9.37741 9.79922 9.37741 9.79932 9.37741ZM10.9993 7.03398H16.9565V12.9911H14.462C14.0272 11.2969 12.6935 9.96308 10.9993 9.52826V7.03398ZM13.4127 14.1911C13.4127 16.1869 11.7948 17.8048 9.79904 17.8048C7.80325 17.8048 6.18535 16.1869 6.18535 14.1911C6.18535 12.1953 7.80325 10.5774 9.79904 10.5774C9.79913 10.5774 9.79894 10.5774 9.79904 10.5774L9.79932 14.1911H13.4127ZM13.2087 12.9911H10.9993V10.7815C12.0297 11.1442 12.8461 11.9607 13.2087 12.9911Z",fill:"white"})),ZXe=t=>S.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...t},S.createElement("rect",{x:2,y:1,width:20,height:22,rx:3,fill:"#4DABF7"}),S.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M14.6215 10.4561C14.9164 10.1761 15.3807 10.1821 15.6683 10.4697L19.6683 14.4697C19.9612 14.7626 19.9612 15.2374 19.6683 15.5303C19.3754 15.8232 18.9005 15.8232 18.6076 15.5303L15.1244 12.0471L11.4422 15.5439C11.152 15.8194 10.6967 15.8186 10.4075 15.5421L9.00646 14.2027L5.6785 17.5304C5.38559 17.8232 4.91072 17.8232 4.61784 17.5303C4.32496 17.2374 4.32498 16.7625 4.61789 16.4696L8.46439 12.6235C8.75265 12.3353 9.21834 12.33 9.51298 12.6117L10.9275 13.9641L14.6215 10.4561Z",fill:"white"}),S.createElement("path",{d:"M10.0001 8.5C10.0001 9.32843 9.32853 10 8.50011 10C7.67168 10 7.00011 9.32843 7.00011 8.5C7.00011 7.67157 7.67168 7 8.50011 7C9.32853 7 10.0001 7.67157 10.0001 8.5Z",fill:"white"})),QXe=t=>S.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...t},S.createElement("rect",{x:2,y:1,width:20,height:22,rx:3,fill:"#F59F00"}),S.createElement("path",{d:"M8.7627 7.75794V16.2419C8.76267 16.3363 8.78782 16.4289 8.83554 16.5103C8.88327 16.5917 8.95184 16.6588 9.0342 16.7049C9.11655 16.7509 9.20969 16.7742 9.30402 16.7722C9.39834 16.7702 9.49044 16.7431 9.57079 16.6937L16.464 12.4517C16.5412 12.4043 16.605 12.3378 16.6492 12.2587C16.6934 12.1796 16.7167 12.0905 16.7167 11.9999C16.7167 11.9093 16.6934 11.8202 16.6492 11.7411C16.605 11.662 16.5412 11.5956 16.464 11.5482L9.57079 7.30617C9.49044 7.25673 9.39834 7.22963 9.30402 7.22765C9.20969 7.22568 9.11655 7.24892 9.0342 7.29496C8.95184 7.341 8.88327 7.40817 8.83554 7.48956C8.78782 7.57094 8.76267 7.66359 8.7627 7.75794Z",fill:"white"})),JXe=t=>S.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...t},S.createElement("rect",{x:2,y:1,width:20,height:22,rx:3,fill:"#CC5DE8"}),S.createElement("path",{d:"M15.0909 9V13.566C14.8235 13.4066 14.513 13.3153 14.1818 13.3153C13.1777 13.3153 12.3636 14.1543 12.3636 15.1892C12.3636 16.2241 13.1777 17.0631 14.1818 17.0631C15.186 17.0631 16 16.2241 16 15.1892V6.75018C16 6.23185 15.5018 5.86997 15.0281 6.0443L9.20994 8.18588C8.92049 8.29242 8.72727 8.57499 8.72727 8.89176V14.5029C8.45984 14.3435 8.14935 14.2522 7.81818 14.2522C6.81403 14.2522 6 15.0912 6 16.1261C6 17.161 6.81403 18 7.81818 18C8.82234 18 9.63636 17.161 9.63636 16.1261V11.0077L15.0909 9Z",fill:"white"})),eZe=t=>S.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...t},S.createElement("path",{d:"M11.997 15.2043L5.45974 2.12734L18.5342 2.12734L11.997 15.2043Z",fill:"#FF6B6B"}),S.createElement("path",{d:"M5 1C3.34315 1 2 2.34315 2 4V19.9973C2 21.6542 3.34315 22.9973 5 22.9973H19C20.6569 22.9973 22 21.6542 22 19.9973V4C22 2.34315 20.6569 1 19 1H16.5C16.5 1 12.8297 3.94874 12.4264 11.0247C12.1447 11.3173 11.8849 11.3025 11.5755 11.0247C11.0046 3.91723 7 1 7 1H5Z",fill:"#81A3C5"}),S.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M6.1903 1L5.84118 1.34685C5.60611 1.58041 5.60487 1.9603 5.83842 2.19538C6.07197 2.43045 6.45187 2.43169 6.68694 2.19814L7.3283 1.56095C7.51223 1.7618 7.69814 1.97398 7.88384 2.19734L7.16905 2.74102C6.90531 2.94163 6.85413 3.31807 7.05474 3.58181C7.25535 3.84556 7.63178 3.89674 7.89553 3.69613L8.61805 3.14657C8.78504 3.37931 8.94941 3.62133 9.10947 3.8725L8.33964 4.29024C8.04839 4.44828 7.9404 4.81251 8.09845 5.10376C8.25649 5.39502 8.62072 5.503 8.91197 5.34496L9.71417 4.90965C9.83152 5.131 9.94463 5.35817 10.0526 5.59107L9.23216 5.91252C8.92362 6.03341 8.7715 6.38152 8.89239 6.69005C9.01327 6.99859 9.36138 7.15071 9.66992 7.02983L10.5093 6.70096C10.5966 6.94319 10.6778 7.19071 10.7521 7.44345L9.8859 7.65785C9.56423 7.73746 9.36801 8.06277 9.44763 8.38443C9.52725 8.70609 9.85255 8.90231 10.1742 8.8227L11.0363 8.60933C11.0575 8.71888 11.0774 8.82929 11.0959 8.94055C11.0327 9.0717 10.9973 9.21877 10.9973 9.3741V9.52462H10.2969C9.96553 9.52462 9.6969 9.79325 9.6969 10.1246C9.6969 10.456 9.96553 10.7246 10.2969 10.7246H10.9973V11.3318C9.83214 11.7436 8.99733 12.8549 8.99733 14.1611V17.1611C8.99733 17.7134 9.44505 18.1611 9.99733 18.1611H13.9973C14.5496 18.1611 14.9973 17.7134 14.9973 17.1611V14.1611C14.9973 12.8549 14.1625 11.7436 12.9973 11.3318V9.69337H13.6975C14.0288 9.69337 14.2975 9.42474 14.2975 9.09337C14.2975 8.762 14.0288 8.49337 13.6975 8.49337H12.9605C13.0027 8.23162 13.0531 7.97476 13.111 7.72285L13.9806 7.95352C14.3009 8.03847 14.6294 7.84769 14.7144 7.52739C14.7993 7.2071 14.6086 6.87858 14.2883 6.79362L13.4373 6.56791C13.5347 6.27813 13.6415 5.99597 13.7561 5.72156L14.5555 6.09989C14.855 6.24165 15.2127 6.11375 15.3545 5.81423C15.4962 5.51471 15.3683 5.15698 15.0688 5.01523L14.2684 4.63644C14.4131 4.36228 14.5647 4.09742 14.7213 3.84201L15.4632 4.33575C15.7391 4.51934 16.1115 4.44454 16.2951 4.16868C16.4787 3.89282 16.4039 3.52035 16.128 3.33676L15.3892 2.84503C15.5695 2.59738 15.7528 2.36102 15.9366 2.13615L16.6091 2.73915C16.8558 2.96036 17.2352 2.93969 17.4564 2.69297C17.6776 2.44625 17.6569 2.06691 17.4102 1.8457L16.7288 1.23476C16.8046 1.15443 16.8799 1.07617 16.9545 1H15.8574C15.8262 1.03476 15.7949 1.06984 15.7635 1.10526C14.9004 2.08038 13.9989 3.31537 13.2957 4.79138C13.2886 4.80402 13.2819 4.81701 13.2756 4.83035C13.2691 4.84389 13.2633 4.85756 13.258 4.87132C12.7642 5.92477 12.3724 7.0994 12.1671 8.38846C12.1119 8.37902 12.0552 8.3741 11.9973 8.3741C11.9329 8.3741 11.8699 8.3802 11.8088 8.39184C11.1802 5.23533 9.50654 2.77154 7.97906 1.08733C7.95245 1.058 7.92588 1.02889 7.89935 1H6.1903ZM11.9973 13.1955C11.5923 13.1955 11.2434 12.9546 11.0863 12.6083C10.5543 12.9211 10.1973 13.4994 10.1973 14.1611V16.9611H13.7973V14.1611C13.7973 13.4994 13.4403 12.9211 12.9084 12.6083C12.7512 12.9546 12.4024 13.1955 11.9973 13.1955Z",fill:"white"})),tZe=t=>S.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...t},S.createElement("path",{d:"M2 4C2 2.34315 3.34315 1 5 1H14.7574C15.553 1 16.3161 1.31607 16.8787 1.87868L19 4L21.1213 6.12132C21.6839 6.68393 22 7.44699 22 8.24264V20C22 21.6569 20.6569 23 19 23H5C3.34315 23 2 21.6569 2 20V4Z",fill:"#BACCDF"}),S.createElement("path",{d:"M14.8999 1.00342V6.50003C14.8999 7.38368 15.6162 8.10003 16.4999 8.10003L21.9965 8.10003C21.9765 7.67959 21.8684 7.27119 21.6827 6.90003L16.4999 6.90003C16.279 6.90003 16.0999 6.72094 16.0999 6.50003L16.0999 1.31724C15.7287 1.1315 15.3203 1.02342 14.8999 1.00342Z",fill:"white"})),nZe=t=>S.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...t},S.createElement("path",{d:"M9 3C9.2198 2.99998 9.43348 3.07238 9.608 3.206L9.708 3.293L12.414 6H19C19.7652 5.99996 20.5015 6.29233 21.0583 6.81728C21.615 7.34224 21.9501 8.06011 21.995 8.824L22 9V17C22 17.7652 21.7077 18.5015 21.1827 19.0583C20.6578 19.615 19.9399 19.9501 19.176 19.995L19 20H5C4.23479 20 3.49849 19.7077 2.94174 19.1827C2.38499 18.6578 2.04989 17.9399 2.005 17.176L2 17V6C1.99996 5.23479 2.29233 4.49849 2.81728 3.94174C3.34224 3.38499 4.06011 3.04989 4.824 3.005L5 3H9Z",fill:"#6C8196"})),rZe={pdf:WXe,doc:YXe,excel:GXe,ppt:KXe,draw:XXe,image:ZXe,video:QXe,audio:JXe,zip:eZe},sZe=({mimeType:t})=>{var e;const n=((e=Object.values(qXe).find(s=>s.mimeType===t))==null?void 0:e.iconType)??"";if(!t)return Bt.jsx(nZe,{width:20});const r=rZe[n];return r?Bt.jsx(r,{width:20}):Bt.jsx(tZe,{width:20})},oZe="_row_ddbp6_1",iZe="_highlight_ddbp6_15",aZe="_rowCheckbox_ddbp6_23",lZe="_rowName_ddbp6_49",cZe="_table_ddbp6_59",uh={row:oZe,highlight:iZe,rowCheckbox:aZe,rowName:lZe,table:cZe};function uZe({rows:t,selectedRowIds:e,onOpenDir:n,onSelect:r,locale:s}){const o=!!t.length&&t.length===e.length,i=!o&&!!e.length,a=u=>e.includes(u),l=()=>r(e.length?[]:t.map(u=>u.Id)),c=u=>r(e.includes(u)?e.filter(f=>f!==u):e.concat(u));return Bt.jsx(Lr.ScrollContainer,{minWidth:0,h:"100%",children:Bt.jsxs(Lr,{stickyHeader:!0,verticalSpacing:"xs",horizontalSpacing:"lg",styles:{tr:{height:40}},className:uh.table,children:[Bt.jsx(Lr.Thead,{children:Bt.jsxs(Lr.Tr,{children:[Bt.jsx(Lr.Th,{c:"gray.6",fw:500,fz:10,tt:"uppercase",children:Bt.jsxs(ve,{gap:"xs",children:[Bt.jsx(Or,{size:"xs",checked:o,indeterminate:i,onChange:()=>l()})," ",`${ko(s,"ColumnName")}`]})}),Bt.jsx(Lr.Th,{c:"gray.6",fw:500,fz:10,tt:"uppercase",children:`${ko(s,"ColumnChanged")}`}),Bt.jsx(Lr.Th,{c:"gray.6",fw:500,fz:10,tt:"uppercase",children:`${ko(s,"ColumnSize")}`})]})}),Bt.jsx(Lr.Tbody,{children:t.map(u=>Bt.jsxs(Lr.Tr,{className:uh.row+(a(u.Id)?` ${uh.highlight}`:""),onMouseDown:"MimeType"in u?()=>c(u.Id):void 0,children:[Bt.jsx(Lr.Td,{fz:13,children:Bt.jsxs(ve,{gap:"xs",styles:{root:{flexFlow:"noWrap"}},children:[Bt.jsx(ie,{h:16,w:16,children:"MimeType"in u&&Bt.jsx(Or,{readOnly:!0,size:"xs",checked:a(u.Id),className:uh.rowCheckbox})}),Bt.jsxs(ve,{gap:10,styles:{root:{flexGrow:1,flexWrap:"nowrap"}},children:[Bt.jsx(sZe,{mimeType:"MimeType"in u?u.MimeType:""}),"MimeType"in u?Bt.jsx(ue,{fz:13,truncate:!0,c:"gray.8",title:u.Name,className:uh.rowName,children:u.Name}):Bt.jsx(Kh,{truncate:!0,c:"gray.8",title:u.Name,fz:13,fw:500,className:uh.rowName,onMouseDown:f=>f.stopPropagation(),onClick:()=>n(u.Id),children:u.Name})]})]})}),Bt.jsx(Lr.Td,{fz:12,c:"dimmed",children:Bt.jsx("span",{title:new Date(u.Timestamp).toLocaleString("ru-Ru"),children:new Date(u.Timestamp).toLocaleString("ru-Ru")})}),Bt.jsx(Lr.Td,{fz:12,c:"dimmed",children:"Size"in u?isNaN(+u.Size)?null:rie(+u.Size,2,s||"ru"):"-"})]},u.Id))})]})})}const ZW=3,Eu=[{name:"docs",type:16},{name:"sharedToMe",type:256},{name:"sharedAccess",type:8},{name:"favorites",type:512},{name:"common",type:4},{name:"recycleBin",type:134217728},{name:"globalRecycleBin",type:369098752},{name:"recent",type:2048},{name:"link",type:-1},{name:"fileDepot",type:8192},{name:"rooms",type:4096},{name:"room"}];function dZe({directory:t,isSearch:e,onBack:n,onItemClick:r,locale:s}){const o=S.useMemo(()=>{if(e)return[{id:0,title:`${ko(s,"SearchResults")}`,type:0}];if(!t)return[];let i=t.Parent;const a=[{title:t.Name,id:t.Id,type:t.Type}];for(;i;)a.unshift({title:i.Name,id:i.Id,type:i.Type||0}),i=i.Parent;if(a.length>ZW){const l=a.splice(1,a.length-ZW);a.splice(1,0,{id:0,title:"...",type:0,children:l})}return a},[t,e]);return Bt.jsxs(ve,{h:48,py:8,px:"lg",styles:{root:{flexShrink:0}},children:[o.length>1&&Bt.jsx(Ve,{variant:"subtle",color:"dimmed",size:"sm",ml:-2,onClick:n,children:Bt.jsx($Xe,{stroke:1.2,size:16})}),Bt.jsx(kA,{separatorMargin:6,separator:Bt.jsx(FXe,{stroke:1.2,size:17}),children:o.map((i,a)=>{var l;return i.children?Bt.jsxs(et,{children:[Bt.jsx(et.Target,{children:Bt.jsx(Kh,{c:"dimmed",fz:14,children:"..."})}),Bt.jsx(et.Dropdown,{children:i.children.map(c=>{var u;return Bt.jsx(et.Item,{c:"dark",fz:14,leftSection:Bt.jsx(zXe,{stroke:1.2,size:18}),children:Eu!=null&&Eu.some(f=>f.type===c.type)?ko(s,((u=Eu==null?void 0:Eu.find(f=>f.type===c.type))==null?void 0:u.name)||""):c.title},c.id)})})]},a):Bt.jsx(Kh,{truncate:!0,underline:i.id!==0?"hover":"never",c:a===o.length-1?"dark":"dimmed",fz:14,fw:a===o.length-1?500:400,maw:200,onClick:i.id===0?void 0:()=>r(i.id),children:Eu!=null&&Eu.some(c=>c.type===i.type)?ko(s,((l=Eu==null?void 0:Eu.find(c=>c.type===i.type))==null?void 0:l.name)||""):i.title},a)})})]})}var sie=(t=>(t[t.Docs=16]="Docs",t))(sie||{}),eI=(t=>(t[t.Id=0]="Id",t[t.Name=1]="Name",t[t.Type=2]="Type",t[t.Size=3]="Size",t[t.Author=4]="Author",t[t.Date=5]="Date",t[t.UpdateDate=6]="UpdateDate",t))(eI||{}),tI=(t=>(t[t.Asc=0]="Asc",t[t.Desc=1]="Desc",t))(tI||{});const iC=Ct.create({baseURL:"/api"}),QW=t=>iC.get("v1/DocumentDirectory/Get",{params:t}),fZe=t=>iC.get("v1/DocumentDirectory/Search",{params:{...t,field:"All"}});function pZe({enabledLinks:t,count:e,size:n,isLimitExceeded:r,onClose:s,onAttachFiles:o,onCreateLink:i,locale:a}){const l=Vh("(max-width: 768px)"),c=Vh("(max-width: 640px)");return Bt.jsxs(Bt.Fragment,{children:[r&&Bt.jsx(ve,{h:61,bg:"yellow.4",px:"md",children:Bt.jsx(ue,{fz:13,c:"dark.7",lh:1.4,children:`${ko(a,"MaxSizeLimitPartOne")} ${t?ko(a,"MaxSizeLimitPartTwo"):""}`})}),Bt.jsxs(xe,{direction:c?"column":"row",align:"center",justify:c?"center":"space-between",gap:6,bg:"blue",c:"#fff",px:"md",h:76,w:"100%",children:[Bt.jsxs(ve,{gap:"xs",children:[Bt.jsx(Ve,{onClick:s,children:Bt.jsx($M,{size:21,color:"#fff"})}),Bt.jsx(ue,{fz:l?13:15,children:`${ko(a,"FilesSelected")}: ${e} (${n})`})]}),Bt.jsxs(ve,{gap:"xs",children:[Bt.jsx(yt,{size:l?"xs":"",disabled:r,variant:"outline",color:"#fff",onClick:o,styles:r?{root:{backgroundColor:"transparent",color:"#fff",border:"1px solid #fff",opacity:.4}}:{},children:e===1?ko(a,"AttachFile"):ko(a,"AttachFiles")}),t&&Bt.jsx(yt,{size:l?"xs":"",variant:"default",onClick:i,children:e===1?ko(a,"AddLink"):ko(a,"AddLinks")})]})]})]})}const hZe=26214400,mZe=t=>{const e=Object.fromEntries(Object.entries({...t,expirationDate:t.expirationDate?t.expirationDate.toJSON():void 0}).filter(n=>n[1]!==void 0));return iC.get("v1/Link/Generate",{params:e})};var oie=(t=>(t[t.LockCopy=-16384]="LockCopy",t[t.LockPrint=-8192]="LockPrint",t[t.Deny=-4096]="Deny",t[t.OnlyUpload=-1024]="OnlyUpload",t[t.FreeBusy=-64]="FreeBusy",t[t.Read=0]="Read",t[t.Comment=1]="Comment",t[t.Review=2]="Review",t[t.Write=4]="Write",t[t.Delete=8]="Delete",t[t.FullInternal=256]="FullInternal",t[t.Full=512]="Full",t[t.Lock=4096]="Lock",t))(oie||{}),iie=(t=>(t[t.SingleCall=0]="SingleCall",t[t.FiveMinutes=1]="FiveMinutes",t[t.OneHour=2]="OneHour",t[t.Day=3]="Day",t[t.Week=4]="Week",t[t.Month=5]="Month",t[t.Year=6]="Year",t[t.Unlimited=10]="Unlimited",t[t.Internal=11]="Internal",t))(iie||{});const JW={id:"",sortField:eI.Id,sortOrder:tI.Desc};function gZe({opened:t,enabledLinks:e=!1,maxSizeAttachments:n=hZe,onClose:r,onAttachFiles:s,offsetSize:o=0,onCreateLink:i,locale:a="en"}){const[l,c]=S.useState(JW),[u,f]=S.useState(null),[h,m]=S.useState(null),[y,v]=S.useState(!1),[b,w]=S.useState([]),[C,k]=S.useState([]),[E,j]=S.useState(!1),A=Vh("(max-width: 640px)"),M=S.useMemo(()=>h?[...h.Directory.Items,...h.Document.Items]:[...(u==null?void 0:u.Children)??[],...(u==null?void 0:u.Documents)??[]],[u,h]),_=S.useMemo(()=>{let P=M.filter($=>b.includes($.Id));const I=P.map($=>$.Id),H=C.filter($=>!I.includes($.Id));return H.length&&(P=[...H,...P]),P},[M,b,C]),D=S.useMemo(()=>_.reduce((P,I)=>P+I.Size,0),[_]),R=o+D>n,N=S.useCallback(async P=>{j(!0);try{const{data:I}=await QW(P);f(I[0]),m(null)}finally{j(!1)}},[]),z=async P=>{if(!P)await N(l),v(!1);else{v(!0),j(!0);try{const{data:I}=await fZe({text:P});m(I),f(null)}finally{j(!1)}}},B=async()=>{var P,I;j(!0);const H=_;try{const $=(await Promise.all(H.map(V=>iC.get(`/v1/Documents/Download?id=${V.Id}&download=false`,{responseType:"blob"})))).map((V,q)=>new File([V.data],H[q].Name,{type:V.headers["content-type"]??H[q].MimeType}));w([]),k([]),s($),r()}catch($){R8e($)&&console.error(((I=(P=$.response)==null?void 0:P.data)==null?void 0:I.ErrorMessage)??"Неизвестная ошибка")}finally{j(!1)}},L=async()=>{j(!0);try{const P=await Promise.all(_.map(I=>mZe({id:I.Id,accessType:oie.Read,lifeTime:iie.Unlimited,type:"Document"})));i(P.map((I,H)=>({link:I.data,item:_[H]}))),r()}finally{j(!1)}};return S.useEffect(()=>{if(t)return(async()=>{const P={id:(await QW()).data.find(I=>I.Type===sie.Docs).Id,sortField:eI.Id,sortOrder:tI.Desc};c(P),N(P)})(),()=>{c(JW),f(null),m(null),w([]),k([])}},[t,N]),Bt.jsx(l2,{theme:{fontFamily:"Roboto, sans-serif"},children:Bt.jsx(nr,{centered:!0,withCloseButton:!1,closeOnEscape:!1,opened:t,size:950,radius:"lg",padding:0,onClose:r,children:Bt.jsxs(ie,{h:590,pos:"relative",children:[Bt.jsx(y2,{visible:E}),Bt.jsx(VXe,{onSearch:z,onClose:r,locale:a}),Bt.jsx(dZe,{directory:u,isSearch:y,onBack:()=>N({...l,id:u.ParentId}),onItemClick:P=>N({...l,id:P}),locale:a}),Bt.jsx(ie,{style:{height:`calc(100% - 48px - 64px - ${b.length?76:0}px  + ${A?16:0}px - ${R?61:0}px)`},children:Bt.jsx(uZe,{rows:M,selectedRowIds:b,onOpenDir:P=>N({...l,id:P}),onSelect:P=>{w(P);const I=M==null?void 0:M.map($=>$.Id),H=C.filter($=>!I.includes($.Id));k(H!=null&&H.length?[...H,...M.filter($=>P.includes($.Id))]:M.filter($=>P.includes($.Id)))},locale:a})}),!!b.length&&Bt.jsx(pZe,{enabledLinks:e,count:b.length,size:rie(D,2,a),isLimitExceeded:R,onClose:()=>{w([]),k([])},onAttachFiles:B,onCreateLink:L,locale:a})]})})})}const yZe=({onAttachFiles:t,onCreateLink:e,id:n})=>{const r=cs(),s=br(sR(n)),o=br($Ce(n)),a=br(Pm).ExternalLinkSettings,l=vn.language,c=()=>{r(xT({id:n,opened:!0}))},u=()=>{r(xT({id:n,opened:!1}))},f=h=>h==="en"||h==="ru"?h:void 0;return S.useEffect(()=>(Rw[n]=c,()=>{delete Rw[n]}),[n]),d.jsx(gZe,{enabledLinks:!(a!=null&&a.IsDisabled),opened:s,onClose:()=>u(),onAttachFiles:h=>{t&&t(h)},locale:f(l),offsetSize:o,onCreateLink:h=>{e&&e(h)}},l)},Rw={},vZe=t=>{Rw[t]?Rw[t]():console.warn("ShareDisk not available for id:",t)},aie=t=>{const e=me.c(13),{disabled:n,sendModalWindowId:r}=t,{t:s}=Le();let o;e[0]!==s?(o=s("modals.controls.attachDisk"),e[0]=s,e[1]=o):o=e[1];let i;e[2]!==r?(i=()=>vZe(r),e[2]=r,e[3]=i):i=e[3];let a;e[4]===Symbol.for("react.memo_cache_sentinel")?(a=d.jsx("img",{src:IXe,alt:"icon",width:20,height:20}),e[4]=a):a=e[4];let l;e[5]!==i?(l=d.jsx(Ve,{onClick:i,component:"div",size:"lg",children:a}),e[5]=i,e[6]=l):l=e[6];let c;e[7]!==n||e[8]!==l?(c=d.jsx(En,{disabled:n,children:l}),e[7]=n,e[8]=l,e[9]=c):c=e[9];let u;return e[10]!==o||e[11]!==c?(u=d.jsx(on,{label:o,children:c}),e[10]=o,e[11]=c,e[12]=u):u=e[12],u};function lie(t){const e=me.c(9),{disabled:n,onFilesChange:r}=t,[s,o]=S.useState(0),{t:i}=Le();let a;e[0]!==r?(a=f=>{r(f),o(bZe)},e[0]=r,e[1]=a):a=e[1];const l=a;let c;e[2]!==i?(c=f=>d.jsx(on,{label:i("modals.controls.attach"),children:d.jsx(Ve,{...f,component:"div",size:"lg",children:d.jsx(D2,{color:"#848E98",stroke:1,size:"20px"})})}),e[2]=i,e[3]=c):c=e[3];let u;return e[4]!==n||e[5]!==s||e[6]!==l||e[7]!==c?(u=d.jsx(GX,{disabled:n,multiple:!0,onChange:l,children:c},s),e[4]=n,e[5]=s,e[6]=l,e[7]=c,e[8]=u):u=e[8],u}function bZe(t){return t+1}const cie=t=>{const e=me.c(28),{variant:n,disabled:r,form:s,allInvalidEmails:o,hasAttachLink:i,sendModalWindowId:a,handleSubmit:l}=t,{t:c}=Le(),u=Mr(),f=zt();let h;e[0]!==s.values.HtmlBody?(h=()=>{const L=s.values.HtmlBody;if(!L)return;const I=new DOMParser().parseFromString(L,"text/html");return!!Array.from(I.querySelectorAll('[data-attachment-link="true"]')).filter(xZe).length},e[0]=s.values.HtmlBody,e[1]=h):h=e[1];const y=i&&h();let v;e[2]!==o||e[3]!==f||e[4]!==s.values||e[5]!==l||e[6]!==u||e[7]!==a||e[8]!==y||e[9]!==c?(v=()=>{if([...s.values.To,...s.values.Cc,...s.values.Bcc].length===0){u.error(c("notifications.messages.setAddress"),{title:c("notifications.messages.notSentLetter"),color:"orange"});return}if(o.length>0){u.error(c("notifications.messages.errorAddress",{emails:o.join(", ")}));return}y?f(M3({id:a,opened:!0})):l(s.values)},e[2]=o,e[3]=f,e[4]=s.values,e[5]=l,e[6]=u,e[7]=a,e[8]=y,e[9]=c,e[10]=v):v=e[10];const b=v;let w;e[11]===Symbol.for("react.memo_cache_sentinel")?(w={fontWeight:700,borderRadius:"20px",alignSelf:"flex-end"},e[11]=w):w=e[11];const C=w;let k;e[12]===Symbol.for("react.memo_cache_sentinel")?(k={...C,fz:14,mr:"15px",span:{span:{marginRight:"5px"}}},e[12]=k):k=e[12];const E=k,j=C,A=n==="desktop"?14:12,M=n==="desktop"?"4px":"",_=n==="desktop"?0:6,D=n==="desktop"?18:20;let R;e[13]!==D?(R=d.jsx(I_,{size:D}),e[13]=D,e[14]=R):R=e[14];let N;e[15]!==n?(N=L=>({...n==="desktop"?E:j,"&:disabled, &[data-disabled]":{cursor:"pointer",backgroundColor:L.colors.blue[6],color:L.white}}),e[15]=n,e[16]=N):N=e[16];let z;e[17]!==c?(z=c("send"),e[17]=c,e[18]=z):z=e[18];let B;return e[19]!==r||e[20]!==b||e[21]!==N||e[22]!==z||e[23]!==A||e[24]!==M||e[25]!==_||e[26]!==R?(B=d.jsx(yt,{fz:A,mr:M,ml:_,leftSection:R,type:"button",onClick:b,disabled:r,sx:N,children:z}),e[19]=r,e[20]=b,e[21]=N,e[22]=z,e[23]=A,e[24]=M,e[25]=_,e[26]=R,e[27]=B):B=e[27],B};function xZe(t){const e=t.getAttribute("data-access");return!e||e==="false"}const wZe=t=>{const e=me.c(51),{handleAttachmentsUpload:n,isSending:r,isUploading:s,handleCloseSendModal:o,isDraftRunning:i,form:a,shouldSaveDraftOnClose:l,allInvalidEmails:c,handleSubmit:u,modalTitleState:f,hasAttachLink:h,sendModalWindowId:m,validateEmail:y}=t,v=Er(),{t:b}=Le(),{emailId:w}=sr();let C;e[0]===Symbol.for("react.memo_cache_sentinel")?(C=window.location.search.includes("to="),e[0]=C):C=e[0];const k=C,E=r||s||i,[j,A]=Rs(!1),{open:M,close:_}=A;let D;e[1]===Symbol.for("react.memo_cache_sentinel")?(D={boxShadow:" rgba(0, 0, 0, 0.1) 0px 0px 10px",zIndex:999,paddingLeft:"10px"},e[1]=D):D=e[1];let R;e[2]===Symbol.for("react.memo_cache_sentinel")?(R={padding:"0",width:"30px",outline:"none",span:{justifyContent:"center"},svg:{marginLeft:"-3px"}},e[2]=R):R=e[2];let N;e[3]===Symbol.for("react.memo_cache_sentinel")?(N={inner:{justifyContent:"flex-start",outline:"none"}},e[3]=N):N=e[3];let z;e[4]!==w||e[5]!==o||e[6]!==v||e[7]!==l?(z=()=>(l&&o(),v(k?`${w?`/${w}/`:""}inbox`:-1)),e[4]=w,e[5]=o,e[6]=v,e[7]=l,e[8]=z):z=e[8];let B;e[9]===Symbol.for("react.memo_cache_sentinel")?(B=d.jsx(Ve,{component:"div",size:"lg",children:d.jsx(yo,{stroke:1,size:"40px"})}),e[9]=B):B=e[9];let L;e[10]!==z?(L=d.jsx(yt,{variant:"transparent",sx:R,size:"lg",styles:N,onClick:z,children:B}),e[10]=z,e[11]=L):L=e[11];let P;e[12]!==f.text||e[13]!==b?(P=f.text||b("newMessage"),e[12]=f.text,e[13]=b,e[14]=P):P=e[14];let I;e[15]!==P?(I=d.jsx(ue,{fz:13,fw:500,color:"#343A40",children:P}),e[15]=P,e[16]=I):I=e[16];let H;e[17]!==L||e[18]!==I?(H=d.jsxs(ve,{wrap:"nowrap",gap:0,children:[L,I]}),e[17]=L,e[18]=I,e[19]=H):H=e[19];let $;e[20]===Symbol.for("react.memo_cache_sentinel")?($={top:"10px",right:"16px",zIndex:1e3,gap:"0"},e[20]=$):$=e[20];const V=!!E;let q;e[21]!==n||e[22]!==V?(q=d.jsx(lie,{disabled:V,onFilesChange:n}),e[21]=n,e[22]=V,e[23]=q):q=e[23];const U=!!E;let W;e[24]!==m||e[25]!==U?(W=d.jsx(aie,{disabled:U,sendModalWindowId:m}),e[24]=m,e[25]=U,e[26]=W):W=e[26];const Y=!!E;let G;e[27]!==c||e[28]!==a||e[29]!==u||e[30]!==h||e[31]!==m||e[32]!==Y?(G=d.jsx(cie,{variant:"mobile",disabled:Y,form:a,allInvalidEmails:c,hasAttachLink:h,sendModalWindowId:m,handleSubmit:u}),e[27]=c,e[28]=a,e[29]=u,e[30]=h,e[31]=m,e[32]=Y,e[33]=G):G=e[33];let K;e[34]===Symbol.for("react.memo_cache_sentinel")?(K=d.jsx(et.Target,{children:d.jsx(Ve,{size:"lg",ml:5,children:d.jsx(e6e,{stroke:1.5,width:24,height:24})})}),e[34]=K):K=e[34];let Q;e[35]!==M||e[36]!==y?(Q=d.jsxs(et,{position:"bottom-start",children:[K,d.jsx(et.Dropdown,{children:d.jsx(wm.Button,{validateEmail:y,open:M})})]}),e[35]=M,e[36]=y,e[37]=Q):Q=e[37];let Z;e[38]!==_||e[39]!==j||e[40]!==m?(Z=j&&d.jsx(wm.Modal,{opened:j,onClose:_,sendModalWindowId:m}),e[38]=_,e[39]=j,e[40]=m,e[41]=Z):Z=e[41];let J;e[42]!==q||e[43]!==W||e[44]!==G||e[45]!==Q||e[46]!==Z?(J=d.jsxs(ve,{wrap:"nowrap",sx:$,children:[q,W,G,Q,Z]}),e[42]=q,e[43]=W,e[44]=G,e[45]=Q,e[46]=Z,e[47]=J):J=e[47];let ne;return e[48]!==H||e[49]!==J?(ne=d.jsxs(xe,{sx:D,bg:"white",gap:0,h:56,align:"center",top:0,pos:"fixed",w:"100%",justify:"space-between",pl:10,pr:16,children:[H,J]}),e[48]=H,e[49]=J,e[50]=ne):ne=e[50],ne},SZe=t=>{const e=me.c(24),{handleAttachmentsUpload:n,isSending:r,isUploading:s,handleCloseSendModal:o,isDraftRunning:i,form:a,shouldSaveDraftOnClose:l,allInvalidEmails:c,handleSubmit:u,sendModalWindowId:f,modalTitleState:h,hasAttachLink:m,validateEmail:y}=t,v=xt(1024);let b;e[0]!==c||e[1]!==a||e[2]!==n||e[3]!==o||e[4]!==u||e[5]!==m||e[6]!==i||e[7]!==r||e[8]!==s||e[9]!==h||e[10]!==f||e[11]!==l||e[12]!==y?(b={handleAttachmentsUpload:n,handleCloseSendModal:o,sendModalWindowId:f,isSending:r,isUploading:s,isDraftRunning:i,modalTitleState:h,form:a,shouldSaveDraftOnClose:l,allInvalidEmails:c,handleSubmit:u,hasAttachLink:m,validateEmail:y},e[0]=c,e[1]=a,e[2]=n,e[3]=o,e[4]=u,e[5]=m,e[6]=i,e[7]=r,e[8]=s,e[9]=h,e[10]=f,e[11]=l,e[12]=y,e[13]=b):b=e[13];const w=b;let C;e[14]!==a||e[15]!==o||e[16]!==h||e[17]!==f||e[18]!==l?(C={handleCloseSendModal:o,form:a,shouldSaveDraftOnClose:l,sendModalWindowId:f,modalTitleState:h},e[14]=a,e[15]=o,e[16]=h,e[17]=f,e[18]=l,e[19]=C):C=e[19];const k=C;let E;return e[20]!==k||e[21]!==v||e[22]!==w?(E=d.jsx(d.Fragment,{children:v?d.jsx(wZe,{...w}):d.jsx(rXe,{...k})}),e[20]=k,e[21]=v,e[22]=w,e[23]=E):E=e[23],E},CZe=(t,e)=>Ct.post("v1/Documents/Upload",t,e),kZe=t=>Ct.get("v1/DocumentDirectory/Get",{params:t});function EZe(){const t=me.c(1),e=S.useRef(null);let n;return t[0]===Symbol.for("react.memo_cache_sentinel")?(n={ensureDirectoryId:async()=>{var i;if(e.current)return e.current;const o=((i=(await kZe()).data.find(TZe))==null?void 0:i.Id)??null;return e.current=o,o}},t[0]=n):n=t[0],n}function TZe(t){return t.Type===16}const hi={},xa=(t,e)=>typeof t=="string"?`${t}:${e??0}`:`${t.name}:${t.lastModified??0}`;function MZe(t,e){const n=xa(t,e),r=t,s=hi[n]??hi[r];return s?(s.abort(),hi[n]===s&&delete hi[n],hi[r]===s&&delete hi[r],!0):!1}function uie(){Object.values(hi).forEach(t=>t.abort()),Object.keys(hi).forEach(t=>delete hi[t])}const jZe=t=>{const e=me.c(15),{id:n,setUploadProgress:r,setFiles:s,setIsSecondStep:o,setClientError:i,setServerError:a,setQuotaError:l}=t,{t:c}=Le(),u=zt();let f;e[0]!==u||e[1]!==n||e[2]!==i||e[3]!==s||e[4]!==o||e[5]!==l||e[6]!==a||e[7]!==r?(f=()=>{uie(),r({}),s([]),o(!1),i(!1),a(!1),l(!1),u(dd({id:n,opened:!1}))},e[0]=u,e[1]=n,e[2]=i,e[3]=s,e[4]=o,e[5]=l,e[6]=a,e[7]=r,e[8]=f):f=e[8];const h=f;let m;e[9]===Symbol.for("react.memo_cache_sentinel")?(m={root:{"&:hover":{transition:"all 0.2s ease",backgroundColor:"#339AF0",color:"#fff"}},label:{fontSize:"14px",fontWeight:500}},e[9]=m):m=e[9];let y;e[10]!==c?(y=c("modals.controls.cancel"),e[10]=c,e[11]=y):y=e[11];let v;return e[12]!==h||e[13]!==y?(v=d.jsx(ve,{justify:"flex-end",children:d.jsx(yt,{styles:m,variant:"subtle",onClick:h,children:y})}),e[12]=h,e[13]=y,e[14]=v):v=e[14],v},AZe=t=>{const e=me.c(15),{id:n,setUploadProgress:r,setFiles:s,setIsSecondStep:o,setClientError:i,setServerError:a,setQuotaError:l}=t,{t:c}=Le(),u=zt();let f;e[0]!==u||e[1]!==n||e[2]!==i||e[3]!==s||e[4]!==o||e[5]!==l||e[6]!==a||e[7]!==r?(f=()=>{r({}),s([]),o(!1),i(!1),a(!1),l(!1),u(dd({id:n,opened:!1}))},e[0]=u,e[1]=n,e[2]=i,e[3]=s,e[4]=o,e[5]=l,e[6]=a,e[7]=r,e[8]=f):f=e[8];const h=f;let m;e[9]===Symbol.for("react.memo_cache_sentinel")?(m={root:{"&:hover":{transition:"all 0.2s ease",backgroundColor:"#339AF0",color:"#fff"}},label:{fontSize:"14px",fontWeight:500}},e[9]=m):m=e[9];let y;e[10]!==c?(y=c("modals.controls.close"),e[10]=c,e[11]=y):y=e[11];let v;return e[12]!==h||e[13]!==y?(v=d.jsx(ve,{justify:"flex-end",children:d.jsx(yt,{styles:m,variant:"subtle",onClick:h,children:y})}),e[12]=h,e[13]=y,e[14]=v):v=e[14],v},_Ze=t=>{const e=me.c(11),{setIsSecondStep:n,id:r,onUploadAll:s,isDisabledExternalLink:o}=t,{t:i}=Le(),a=zt();let l;e[0]!==a||e[1]!==r?(l=()=>{a(dd({id:r,opened:!1}))},e[0]=a,e[1]=r,e[2]=l):l=e[2];const c=l;let u;e[3]!==s||e[4]!==n?(u=()=>{n(!0),s()},e[3]=s,e[4]=n,e[5]=u):u=e[5];const f=u;let h;return e[6]!==c||e[7]!==f||e[8]!==o||e[9]!==i?(h=d.jsx(d.Fragment,{children:o?d.jsxs(ve,{justify:"flex-end",children:[d.jsx(yt,{styles:{root:{"&:hover":{transition:"all 0.2s ease",backgroundColor:"#339AF0",color:"#fff"}},label:{fontSize:"14px",fontWeight:500}},variant:"subtle",onClick:c,children:i("modals.controls.cancel")}),d.jsx(yt,{styles:{root:{"&:hover":{transition:"all 0.2s ease",backgroundColor:"#339AF0",color:"#fff"}},label:{fontSize:"14px",fontWeight:500}},variant:"subtle",onClick:f,children:i("modals.controls.continue")})]}):d.jsx(ve,{justify:"flex-end",children:d.jsx(yt,{styles:{root:{"&:hover":{transition:"all 0.2s ease",backgroundColor:"#339AF0",color:"#fff"}},label:{fontSize:"14px",fontWeight:500}},variant:"subtle",onClick:c,children:i("modals.controls.ok")})})}),e[6]=c,e[7]=f,e[8]=o,e[9]=i,e[10]=h):h=e[10],h};function nI(){const t=me.c(2);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e=new Map,t[0]=e):e=t[0];const n=S.useRef(e);let r;return t[1]===Symbol.for("react.memo_cache_sentinel")?(r=s=>{const o=n.current;let i=o.get(s);return i||(i=S.createRef(),o.set(s,i)),i},t[1]=r):r=t[1],r}const RZe="_largeFilesTitle_12qwo_1",DZe="_largeFilesDesc_12qwo_9",IZe="_largeFilesLoadingStatus_12qwo_17",OZe="_largeFilesFinishedUpload_12qwo_25",NZe="_largeFilesCount_12qwo_33",LZe="_largeFilesItemWrap_12qwo_40",$Ze="_largeFilesItemName_12qwo_44",FZe="_largeFilesItemSize_12qwo_53",zZe="_largeFilesItemCheckIcon_12qwo_61",PZe="_largeFilesItemErrorIcon_12qwo_73",BZe="_largeFilesItemErrorIconItem_12qwo_85",HZe="_iconItem_12qwo_100",UZe="_iconDefault_12qwo_109",VZe="_iconHovered_12qwo_113",qZe="_fadeEnter_12qwo_128",WZe="_fadeEnterActive_12qwo_132",YZe="_fadeExit_12qwo_137",GZe="_fadeExitActive_12qwo_141",KZe="_rowExit_12qwo_147",XZe="_rowExitActive_12qwo_151",Bn={largeFilesTitle:RZe,largeFilesDesc:DZe,largeFilesLoadingStatus:IZe,largeFilesFinishedUpload:OZe,largeFilesCount:NZe,largeFilesItemWrap:LZe,largeFilesItemName:$Ze,largeFilesItemSize:FZe,largeFilesItemCheckIcon:zZe,largeFilesItemErrorIcon:PZe,largeFilesItemErrorIconItem:BZe,iconItem:HZe,iconDefault:UZe,iconHovered:VZe,fadeEnter:qZe,fadeEnterActive:WZe,fadeExit:YZe,fadeExitActive:GZe,rowExit:KZe,rowExitActive:XZe},ZZe=t=>{const e=me.c(31),{files:n,uploadProgress:r,setIsSecondStep:s,setUploadProgress:o,setFiles:i,id:a,onUploadFile:l,setClientError:c,setServerError:u,setQuotaError:f}=t,h=zt(),{t:m}=Le(),y=nI();let v;e[0]!==l||e[1]!==c||e[2]!==f||e[3]!==u||e[4]!==o?(v=(A,M)=>{const _=xa({name:A,lastModified:M});o(D=>({...D,[_]:0})),l(A,M),c(!1),u(!1),f(!1)},e[0]=l,e[1]=c,e[2]=f,e[3]=u,e[4]=o,e[5]=v):v=e[5];const b=v;let w;e[6]!==h||e[7]!==a||e[8]!==c||e[9]!==i||e[10]!==s||e[11]!==f||e[12]!==u||e[13]!==o?(w=(A,M)=>{if(MZe(A,M)){const D=xa({name:A,lastModified:M});o(R=>({...R,[D]:-1})),i(R=>{const N=R.filter(z=>xa(z)!==D);return N.length||(xa({name:A,lastModified:M}),o(z=>({...z},{})),i([]),s(!1),c(!1),u(!1),f(!1),h(dd({id:a,opened:!1}))),N})}},e[6]=h,e[7]=a,e[8]=c,e[9]=i,e[10]=s,e[11]=f,e[12]=u,e[13]=o,e[14]=w):w=e[14];const C=w;let k;e[15]===Symbol.for("react.memo_cache_sentinel")?(k={viewport:{padding:"0!important"}},e[15]=k):k=e[15];let E;if(e[16]!==n||e[17]!==y||e[18]!==C||e[19]!==b||e[20]!==m||e[21]!==r){let A;e[23]!==y||e[24]!==C||e[25]!==b||e[26]!==m||e[27]!==r?(A=M=>{const _=xa(M.name,M.lastModified),D=y(_),R=r[_]??r[M.name]??0,N=R===-1;return d.jsx(Z2,{nodeRef:D,timeout:160,classNames:{exit:Bn.rowExit,exitActive:Bn.rowExitActive},children:d.jsx("div",{ref:D,children:d.jsxs(xe,{align:"center",justify:"space-between",wrap:"nowrap",gap:5,mb:10,h:28,children:[d.jsxs(ve,{gap:5,wrap:"nowrap",children:[d.jsx(xe,{children:Qu(M.type)}),d.jsx("div",{className:Bn.largeFilesItemWrap,children:d.jsx(ue,{truncate:"end",lineClamp:2,className:Bn.largeFilesItemName,children:M.name})})]}),d.jsxs(ve,{wrap:"nowrap",gap:5,children:[d.jsx(ue,{className:Bn.largeFilesItemSize,children:Xm(M.size)}),N?d.jsxs(d.Fragment,{children:[d.jsx(ue,{className:Bn.largeFilesItemSize,children:m("uploadError")}),d.jsx(on,{label:m("reloadFile"),children:d.jsxs(Ve,{size:23,variant:"subtle",className:Bn.largeFilesItemErrorIconItem,onClick:()=>b(M.name,M.lastModified),children:[d.jsx("span",{className:`${Bn.iconItem} ${Bn.iconDefault}`,children:d.jsx(bc,{size:15,stroke:1.5,color:"#fff"})}),d.jsx("span",{className:`${Bn.iconItem} ${Bn.iconHovered}`,children:d.jsx(mf,{size:15,stroke:1.5,color:"#868E96"})})]})})]}):R===100?d.jsx("div",{className:Bn.largeFilesItemCheckIcon,children:d.jsx(Ko,{size:15,stroke:1.5,color:"#fff"})}):d.jsx(on,{label:m("deleteFile"),children:d.jsx(n_,{size:28,thickness:2,sections:[{value:R,color:"#4DABF7"}],transitionDuration:250,label:d.jsx(po,{size:15,color:"#868E96",onClick:z=>{z.stopPropagation(),C(M.name,M.lastModified)}}),styles:{label:{display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer",pointerEvents:"auto"}}})})]})]})})},_)},e[23]=y,e[24]=C,e[25]=b,e[26]=m,e[27]=r,e[28]=A):A=e[28],E=n.map(A),e[16]=n,e[17]=y,e[18]=C,e[19]=b,e[20]=m,e[21]=r,e[22]=E}else E=e[22];let j;return e[29]!==E?(j=d.jsx(ie,{w:"100%",mah:180,children:d.jsx(Jr.Autosize,{offsetScrollbars:!0,scrollbars:"y",mah:180,scrollbarSize:6,p:0,styles:k,children:d.jsx(ol,{component:null,children:E})})}),e[29]=E,e[30]=j):j=e[30],j},QZe=t=>{const e=me.c(40),{files:n,uploadProgress:r,progressValue:s,remainingCount:o,failedCount:i,allFailed:a,clientError:l,serverError:c,quotaError:u,onUploadAll:f,setClientError:h,setQuotaError:m,setServerError:y,setUploadProgress:v}=t,{t:b}=Le(),w=nI();let C;e[0]!==n||e[1]!==f||e[2]!==h||e[3]!==m||e[4]!==y||e[5]!==v||e[6]!==r?(C=()=>{const W=n.filter(Y=>(r[xa(Y.name,Y.lastModified)]??0)===-1);W.length&&(h(!1),y(!1),m(!1),v(Y=>{const G={...Y};return W.forEach(K=>{G[xa(K.name,K.lastModified)]=0}),G}),f(W))},e[0]=n,e[1]=f,e[2]=h,e[3]=m,e[4]=y,e[5]=v,e[6]=r,e[7]=C):C=e[7];const k=C,E=i>0,j=s===100&&!c&&!l&&!u&&!E,A=E&&c?"failed":E&&!a?"partial":E&&a?"allFailed":j?"done":"progress",M=String(A);let _;e[8]!==w||e[9]!==M?(_=w(M),e[8]=w,e[9]=M,e[10]=_):_=e[10];const D=_;let R;e[11]===Symbol.for("react.memo_cache_sentinel")?(R={position:"relative",minHeight:49},e[11]=R):R=e[11];const N=D;let z,B;e[12]===Symbol.for("react.memo_cache_sentinel")?(z={enter:200,exit:150},B={enter:Bn.fadeEnter,enterActive:Bn.fadeEnterActive,exit:Bn.fadeExit,exitActive:Bn.fadeExitActive},e[12]=z,e[13]=B):(z=e[12],B=e[13]);let L;e[14]===Symbol.for("react.memo_cache_sentinel")?(L={position:"absolute",inset:0},e[14]=L):L=e[14];let P;e[15]!==a||e[16]!==i||e[17]!==E||e[18]!==j||e[19]!==k||e[20]!==s||e[21]!==u||e[22]!==o||e[23]!==c||e[24]!==b?(P=E&&c?d.jsxs(xe,{mb:15,gap:10,align:"center",justify:"space-between",h:34,children:[d.jsxs(xe,{align:"center",gap:10,children:[d.jsx("div",{className:Bn.largeFilesItemErrorIcon,children:d.jsx(bc,{size:15,stroke:1.5,color:"#fff"})}),d.jsxs("div",{children:[d.jsx(ue,{className:Bn.largeFilesFinishedUpload,children:b("uploadInterruptedNetwork")}),d.jsxs(ue,{className:Bn.largeFilesCount,children:[b("uploadError"),": ",i," ",i>1?b("files"):b("file")]})]})]}),d.jsx(on,{label:b("reloadFiles"),children:d.jsx(Ve,{variant:"subtle",onClick:k,children:d.jsx(mf,{size:20,stroke:1.5,color:"#868E96"})})})]}):E&&!a&&u?d.jsxs(xe,{mb:15,gap:10,align:"center",justify:"space-between",h:34,children:[d.jsxs(xe,{align:"center",gap:10,children:[d.jsx("div",{className:Bn.largeFilesItemCheckIcon,children:d.jsx(Ko,{size:15,stroke:1.5,color:"#fff"})}),d.jsxs("div",{children:[d.jsx(ue,{className:Bn.largeFilesFinishedUpload,children:b("uploadPartiallyCompleted")}),d.jsxs(ue,{className:Bn.largeFilesCount,children:[b("uploadError"),": ",i," ",i>1?b("files"):b("file")]})]})]}),d.jsx(on,{label:b("reloadFiles"),children:d.jsx(Ve,{variant:"subtle",onClick:k,children:d.jsx(mf,{size:20,stroke:1.5,color:"#868E96"})})})]}):E&&a&&!u?d.jsxs(xe,{mb:15,gap:10,align:"center",justify:"space-between",h:34,children:[d.jsxs(xe,{align:"center",gap:10,children:[d.jsx("div",{className:Bn.largeFilesItemErrorIcon,children:d.jsx(bc,{size:15,stroke:1.5,color:"#fff"})}),d.jsxs("div",{children:[d.jsx(ue,{className:Bn.largeFilesFinishedUpload,children:b("uploadInterrupted")}),d.jsxs(ue,{className:Bn.largeFilesCount,children:[b("uploadError"),": ",i," ",i>1?b("files"):b("file")]})]})]}),d.jsx(on,{label:b("reloadFiles"),children:d.jsx(Ve,{variant:"subtle",onClick:k,children:d.jsx(mf,{size:20,stroke:1.5,color:"#868E96"})})})]}):E&&a&&u?d.jsxs(xe,{mb:15,gap:10,align:"center",justify:"space-between",h:34,children:[d.jsxs(xe,{align:"center",gap:10,children:[d.jsx("div",{className:Bn.largeFilesItemErrorIcon,children:d.jsx(bc,{size:15,stroke:1.5,color:"#fff"})}),d.jsxs("div",{children:[d.jsx(ue,{className:Bn.largeFilesFinishedUpload,children:b("uploadInterruptedQuota")}),d.jsxs(ue,{className:Bn.largeFilesCount,children:[b("uploadError"),": ",i," ",i>1?b("files"):b("file")]})]})]}),d.jsx(on,{label:b("reloadFiles"),children:d.jsx(Ve,{variant:"subtle",onClick:k,children:d.jsx(mf,{size:20,stroke:1.5,color:"#868E96"})})})]}):j?d.jsxs(xe,{mb:15,align:"center",gap:10,h:34,children:[d.jsx("div",{className:Bn.largeFilesItemCheckIcon,children:d.jsx(Ko,{size:15,stroke:1.5,color:"#fff"})}),d.jsx(ue,{className:Bn.largeFilesFinishedUpload,children:b("uploadCompleted")})]}):d.jsxs(xe,{mb:15,gap:0,align:"flex-start",direction:"column",h:34,children:[d.jsxs(ue,{className:Bn.largeFilesLoadingStatus,children:[b("loadingFiles")," ",s,"%"]}),d.jsxs(ue,{className:Bn.largeFilesCount,children:[o>1?b("remaining"):b("remained")," ",o," ",o>1?b("files"):b("file")]})]}),e[15]=a,e[16]=i,e[17]=E,e[18]=j,e[19]=k,e[20]=s,e[21]=u,e[22]=o,e[23]=c,e[24]=b,e[25]=P):P=e[25];let I;e[26]!==D||e[27]!==P?(I=d.jsx("div",{style:L,ref:D,children:P}),e[26]=D,e[27]=P,e[28]=I):I=e[28];let H;e[29]!==A||e[30]!==I||e[31]!==N?(H=d.jsx("div",{style:R,children:d.jsx(CR,{mode:"out-in",children:d.jsx(Z2,{nodeRef:N,timeout:z,classNames:B,unmountOnExit:!0,children:I},A)})}),e[29]=A,e[30]=I,e[31]=N,e[32]=H):H=e[32];const $=c?"#FF6B6B":"#4DABF7";let V;e[33]===Symbol.for("react.memo_cache_sentinel")?(V={root:{transition:"color 200ms, background-color 200ms"}},e[33]=V):V=e[33];let q;e[34]!==s||e[35]!==$?(q=d.jsx(yc,{color:$,value:s,size:"sm",radius:"2px",transitionDuration:200,styles:V}),e[34]=s,e[35]=$,e[36]=q):q=e[36];let U;return e[37]!==H||e[38]!==q?(U=d.jsxs(ie,{w:"100%",children:[H,q]}),e[37]=H,e[38]=q,e[39]=U):U=e[39],U},JZe=1024,rI=1024*JZe,eQe=20*rI,tQe=2*rI,nQe=16*rI,rQe=24;function sQe(t){const e=Math.ceil(t/rQe);return Math.min(nQe,Math.max(tQe,e))}function oQe(t,e){const n=t.map(c=>xa(c.name,c.lastModified)),r=t.map((c,u)=>{const f=n[u];return e[f]??e[c.name]??0}),s=r.filter(c=>c>=0),o=s.length?Math.round(s.reduce((c,u)=>c+u,0)/s.length):0,i=s.filter(c=>c<100).length,a=r.filter(c=>c===-1).length,l=r.length>0&&a===r.length;return{progressValue:o,remainingCount:i,failedCount:a,allFailed:l}}const iQe=t=>typeof t=="object"&&t!==null&&(t.code==="ERR_CANCELED"||t.name==="AbortError"),die=t=>{var s;if(iQe(t))return"CANCEL";if(Ct.isAxiosError(t)){const o=(s=t.response)==null?void 0:s.status;if(typeof o=="number"){if(o>=500)return"SERVER_5XX";if(o>=400)return"CLIENT_4XX"}const i=t.code,a=(t.message||"").toLowerCase();return i==="ECONNABORTED"||i==="ERR_NETWORK"||i==="ERR_INTERNET_DISCONNECTED"||a.includes("timeout")||a.includes("network error")?"NETWORK":a.includes("check customer quota")?"CLIENT_QUOTA":"OTHER"}const e=t,n=(e==null?void 0:e.name)||"",r=((e==null?void 0:e.message)||"").toLowerCase();return n==="TypeError"&&r.includes("failed to fetch")||n==="NetworkError"?"NETWORK":r.includes("check customer quota")?"CLIENT_QUOTA":"OTHER"},aQe=t=>{const e=me.c(73),{id:n,files:r,setFiles:s,uploadProgress:o,onUploadAll:i,onUploadFile:a,setUploadProgress:l,clientError:c,serverError:u,quotaError:f,setClientError:h,setServerError:m,setQuotaError:y}=t,v=zt(),{t:b}=Le(),C=br(Pm).ExternalLinkSettings,k=C==null?void 0:C.IsDisabled;let E;e[0]!==r||e[1]!==o?(E=oQe(r,o),e[0]=r,e[1]=o,e[2]=E):E=e[2];const{progressValue:j,remainingCount:A,failedCount:M,allFailed:_}=E,D=M>0;let R;e[3]!==n?(R=oR(n),e[3]=n,e[4]=R):R=e[4];const N=re(R),[z,B]=S.useState(!1);let L;e[5]!==v||e[6]!==n||e[7]!==h||e[8]!==s||e[9]!==y||e[10]!==m||e[11]!==l?(L=()=>{l({}),s([]),B(!1),uie(),h(!1),m(!1),y(!1),v(dd({id:n,opened:!1}))},e[5]=v,e[6]=n,e[7]=h,e[8]=s,e[9]=y,e[10]=m,e[11]=l,e[12]=L):L=e[12];const P=L;let I;e[13]===Symbol.for("react.memo_cache_sentinel")?(I={inner:{left:0},body:{padding:"24px"}},e[13]=I):I=e[13];let H;e[14]!==b?(H=b("modals.titles.largeFilesTitle"),e[14]=b,e[15]=H):H=e[15];let $;e[16]!==H?($=d.jsx(Ca,{className:Bn.largeFilesTitle,children:H}),e[16]=H,e[17]=$):$=e[17];let V;e[18]!==k||e[19]!==b?(V=k?d.jsx(ue,{className:Bn.largeFilesDesc,children:b("modals.text.largeFilesLinkDisabledText")}):d.jsx(ue,{className:Bn.largeFilesDesc,children:b("modals.text.largeFilesText")}),e[18]=k,e[19]=b,e[20]=V):V=e[20];let q;e[21]!==_||e[22]!==c||e[23]!==M||e[24]!==r||e[25]!==i||e[26]!==j||e[27]!==f||e[28]!==A||e[29]!==u||e[30]!==h||e[31]!==y||e[32]!==m||e[33]!==l||e[34]!==o?(q=d.jsx(QZe,{files:r,uploadProgress:o,progressValue:j,setUploadProgress:l,remainingCount:A,failedCount:M,allFailed:_,clientError:c,serverError:u,quotaError:f,onUploadAll:i,setClientError:h,setQuotaError:y,setServerError:m}),e[21]=_,e[22]=c,e[23]=M,e[24]=r,e[25]=i,e[26]=j,e[27]=f,e[28]=A,e[29]=u,e[30]=h,e[31]=y,e[32]=m,e[33]=l,e[34]=o,e[35]=q):q=e[35];let U;e[36]!==r||e[37]!==n||e[38]!==a||e[39]!==h||e[40]!==s||e[41]!==y||e[42]!==m||e[43]!==l||e[44]!==o?(U=d.jsx(ZZe,{uploadProgress:o,files:r,setUploadProgress:l,setFiles:s,setIsSecondStep:B,id:n,onUploadFile:a,setClientError:h,setServerError:m,setQuotaError:y}),e[36]=r,e[37]=n,e[38]=a,e[39]=h,e[40]=s,e[41]=y,e[42]=m,e[43]=l,e[44]=o,e[45]=U):U=e[45];let W;e[46]!==q||e[47]!==U?(W=d.jsxs(ve,{mb:16,children:[q,U]}),e[46]=q,e[47]=U,e[48]=W):W=e[48];let Y;e[49]!==z||e[50]!==W?(Y=d.jsx(tp,{in:z,children:W}),e[49]=z,e[50]=W,e[51]=Y):Y=e[51];let G;e[52]!==c||e[53]!==D||e[54]!==n||e[55]!==k||e[56]!==z||e[57]!==i||e[58]!==j||e[59]!==u||e[60]!==h||e[61]!==s||e[62]!==y||e[63]!==m||e[64]!==l?(G=z?j===100||c||u||D?d.jsx(AZe,{id:n,setUploadProgress:l,setFiles:s,setIsSecondStep:B,setClientError:h,setServerError:m,setQuotaError:y}):d.jsx(jZe,{id:n,setUploadProgress:l,setFiles:s,setIsSecondStep:B,setClientError:h,setServerError:m,setQuotaError:y}):d.jsx(_Ze,{setIsSecondStep:B,id:n,onUploadAll:i,isDisabledExternalLink:!k}),e[52]=c,e[53]=D,e[54]=n,e[55]=k,e[56]=z,e[57]=i,e[58]=j,e[59]=u,e[60]=h,e[61]=s,e[62]=y,e[63]=m,e[64]=l,e[65]=G):G=e[65];let K;return e[66]!==P||e[67]!==N||e[68]!==Y||e[69]!==G||e[70]!==$||e[71]!==V?(K=d.jsxs(nr,{opened:N,onClose:P,closeOnEscape:!1,centered:!0,withCloseButton:!1,size:"500px",radius:"16px",styles:I,children:[$,V,Y,G]}),e[66]=P,e[67]=N,e[68]=Y,e[69]=G,e[70]=$,e[71]=V,e[72]=K):K=e[72],K};async function lQe(t){const e=await U_({id:t.Id,type:"Document",lifeTime:10,accessType:t.AccessType});return(e==null?void 0:e.data)??e}async function cQe(t,e,n,r,s,o){n(i=>({...i,[t]:99}));for(const i of e)try{const a=await lQe(i);n(l=>({...l,[t]:100})),o({item:i,link:a})}catch(a){const l=die(a);if(l==="CANCEL")return;l==="CLIENT_4XX"&&r(!0),(l==="NETWORK"||l==="SERVER_5XX")&&s(!0),n(c=>({...c,[t]:-1}))}}const uQe=async(t,e,n,r)=>{var c,u;if(!(t.size>eQe)){const f=new FormData;return f.append("file",t),(r==null?void 0:r.directoryId)!=null&&f.append("DirectoryId",String(r.directoryId)),CZe(f,{signal:r==null?void 0:r.signal,onUploadProgress:h=>{!h.total||!n||n(Math.floor(h.loaded*100/h.total))}}).catch(h=>{var m,y;throw new Error((y=(m=h==null?void 0:h.response)==null?void 0:m.data)==null?void 0:y.ErrorMessage)})}if((r==null?void 0:r.directoryId)==null)throw new Error("directoryId is required for upload");const o=((u=(c=globalThis.crypto)==null?void 0:c.randomUUID)==null?void 0:u.call(c))??`${Date.now()}-${Math.random().toString(36).slice(2)}`,i=sQe(t.size);let a=0,l=null;for(;a<t.size;){const f=Math.min(a+i,t.size),h=t.slice(a,f),m=new FormData;if(m.set("data",h),l=await fetch(`${window.location.origin}/api/v1/Documents/UploadPartial`,{method:"POST",body:m,signal:r==null?void 0:r.signal,headers:{Name:encodeURIComponent(t.name),MimeType:t.type||"application/octet-stream",FileSize:String(t.size),FileSession:o,DirectoryId:String(r.directoryId)}}),!l.ok)throw new Error(await l.text());if(a=f,n){const y=Math.floor(a*100/t.size);n(y)}}return l?l.json():null};async function eY(t,e,n,r,s,o,i,a){t.forEach(l=>{const c=xa(l.name,l.lastModified);if(hi[c])return;const u=new AbortController;hi[c]=u,uQe(l,i,f=>{const h=Math.min(Math.floor(f),98);n(m=>({...m,[c]:h}))},{directoryId:a.directoryId,signal:u.signal}).then(async f=>{const h=(f==null?void 0:f.data)??f,m=Array.isArray(h)?h:[h];await cQe(c,m,n,r,s,y=>e([y]))}).catch(f=>{const h=die(f);h!=="CANCEL"&&(h==="CLIENT_4XX"&&r(!0),h==="CLIENT_QUOTA"&&o(!0),(h==="NETWORK"||h==="SERVER_5XX")&&s(!0),n(m=>({...m,[c]:-1})))}).finally(()=>{delete hi[c]})})}function dQe(t){const{diskFiles:e,ensureDirectoryId:n,handleCreateLinks:r,setUploadProgress:s,setHasClientError:o,setHasServerError:i,setHasQuotaError:a,allowPartialUpload:l}=t;return{handleStartDiskUploadPerFile:async(f,h)=>{const m=xa(f,h);if(hi[m])return;const y=e.find(b=>b.name===f&&b.lastModified===h);if(!y)return;s(b=>({...b,[m]:0}));const v=await n();if(!v){console.error("DirectoryId not found"),s(b=>({...b,[m]:-1}));return}eY([y],r,s,o,i,a,l,{directoryId:v})},handleStartDiskUpload:async f=>{o(!1),i(!1);try{const h=await n();if(!h){console.error("DirectoryId not found");return}const m=f&&f.length?f:e;eY(m,r,s,o,i,a,l,{directoryId:h})}catch{o(!0),console.error("Start disk upload error")}}}}const fQe="_accessFileTitle_jq6pz_1",pQe="_accessFileDescription_jq6pz_8",hQe="_accessFileSelect_jq6pz_14",mQe="_accessFileHint_jq6pz_26",gQe="_accessFileButton_jq6pz_33",yQe="_accessFileCancelButton_jq6pz_38",Qa={accessFileTitle:fQe,accessFileDescription:pQe,accessFileSelect:hQe,accessFileHint:mQe,accessFileButton:gQe,accessFileCancelButton:yQe},vQe=t=>{const e=me.c(79),{onConfirm:n,attachLinkList:r,id:s,form:o,editor:i}=t,{t:a}=Le();let l;e[0]!==a?(l=a("fileAccess.read"),e[0]=a,e[1]=l):l=e[1];let c;e[2]!==l?(c={name:l,type:"0"},e[2]=l,e[3]=c):c=e[3];let u;e[4]!==a?(u=a("fileAccess.comment"),e[4]=a,e[5]=u):u=e[5];let f;e[6]!==u?(f={name:u,type:"1"},e[6]=u,e[7]=f):f=e[7];let h;e[8]!==a?(h=a("fileAccess.edit"),e[8]=a,e[9]=h):h=e[9];let m;e[10]!==h?(m={name:h,type:"4"},e[10]=h,e[11]=m):m=e[11];let y;e[12]!==c||e[13]!==f||e[14]!==m?(y=[c,f,m],e[12]=c,e[13]=f,e[14]=m,e[15]=y):y=e[15];const v=y,b=zt();let w;e[16]!==s?(w=bee(s),e[16]=s,e[17]=w):w=e[17];const C=re(w),[k,E]=S.useState("0"),j=S.useRef(o.values.HtmlBody);let A;e[18]!==k||e[19]!==i||e[20]!==o?(A=async()=>{if(!i)return;i==null||i.chain().command(le=>{const{state:be,dispatch:je}=le,{tr:pe,doc:_e}=be;return _e.descendants((Ce,Te)=>{Ce.type.name==="attachmentBlock"&&pe.setNodeMarkup(Te,void 0,{...Ce.attrs,access:k})}),je&&pe.steps.length&&je(pe),pe.steps.length>0}).run();const fe=i.getHTML();o.setFieldValue("HtmlBody",fe),j.current=fe},e[18]=k,e[19]=i,e[20]=o,e[21]=A):A=e[21];const M=A;let _;if(e[22]!==k||e[23]!==r||e[24]!==o.values||e[25]!==n||e[26]!==M){const fe=async()=>{try{const le=await Promise.all(r.map(bQe)),je=r.map((pe,_e)=>{const Ce=le[_e];return{...pe,Id:Ce}}).map(pe=>K8e({Id:pe.Id,Password:"",LifeTime:0,ExpirationDate:"",AccessType:Number(k)}));await M(),await Promise.all(je),n({...o.values,HtmlBody:j.current})}catch(le){console.error(le)}};_=()=>{fe()},e[22]=k,e[23]=r,e[24]=o.values,e[25]=n,e[26]=M,e[27]=_}else _=e[27];const D=_;let R;e[28]!==b||e[29]!==s?(R=()=>{b(M3({id:s,opened:!1}))},e[28]=b,e[29]=s,e[30]=R):R=e[30];const N=R;let z;e[31]===Symbol.for("react.memo_cache_sentinel")?(z={inner:{left:0},body:{padding:"24px"}},e[31]=z):z=e[31];let B;e[32]!==a?(B=a("modals.titles.accessFileTitle"),e[32]=a,e[33]=B):B=e[33];let L;e[34]!==B?(L=d.jsx(Ca,{className:Qa.accessFileTitle,order:2,children:B}),e[34]=B,e[35]=L):L=e[35];let P;e[36]!==a?(P=a("modals.text.accessFileText"),e[36]=a,e[37]=P):P=e[37];let I;e[38]!==P?(I=d.jsx(ue,{className:Qa.accessFileDescription,children:P}),e[38]=P,e[39]=I):I=e[39];let H;e[40]===Symbol.for("react.memo_cache_sentinel")?(H={option:{fontSize:"12px"}},e[40]=H):H=e[40];let $;e[41]!==a?($=a("modals.text.accessFileSelectText"),e[41]=a,e[42]=$):$=e[42];let V;e[43]!==v?(V=v.map(xQe),e[43]=v,e[44]=V):V=e[44];let q;e[45]===Symbol.for("react.memo_cache_sentinel")?(q=fe=>{fe&&E(fe)},e[45]=q):q=e[45];let U;e[46]!==k||e[47]!==$||e[48]!==V?(U=d.jsx(Ia,{styles:H,className:Qa.accessFileSelect,placeholder:$,data:V,value:k,onChange:q}),e[46]=k,e[47]=$,e[48]=V,e[49]=U):U=e[49];let W;e[50]!==a?(W=a("modals.text.accessFileHint"),e[50]=a,e[51]=W):W=e[51];let Y;e[52]!==W?(Y=d.jsx(ue,{className:Qa.accessFileHint,children:W}),e[52]=W,e[53]=Y):Y=e[53];let G;e[54]!==I||e[55]!==U||e[56]!==Y?(G=d.jsxs(ve,{gap:0,children:[I,U,Y]}),e[54]=I,e[55]=U,e[56]=Y,e[57]=G):G=e[57];let K;e[58]!==a?(K=a("cancelSendBtn"),e[58]=a,e[59]=K):K=e[59];let Q;e[60]!==N||e[61]!==K?(Q=d.jsx(yt,{onClick:N,className:`${Qa.accessFileButton} ${Qa.accessFileCancelButton}`,variant:"subtle",children:K}),e[60]=N,e[61]=K,e[62]=Q):Q=e[62];let Z;e[63]!==a?(Z=a("send"),e[63]=a,e[64]=Z):Z=e[64];let J;e[65]!==D||e[66]!==Z?(J=d.jsx(yt,{type:"submit",onClick:D,className:`${Qa.accessFileButton} ${Qa.accessFileSendButton}`,children:Z}),e[65]=D,e[66]=Z,e[67]=J):J=e[67];let ne;e[68]!==Q||e[69]!==J?(ne=d.jsxs(ve,{className:Qa.accessFileActions,justify:"flex-end",children:[Q,J]}),e[68]=Q,e[69]=J,e[70]=ne):ne=e[70];let se;e[71]!==L||e[72]!==G||e[73]!==ne?(se=d.jsxs(ie,{className:Qa.accessFile,children:[L,G,ne]}),e[71]=L,e[72]=G,e[73]=ne,e[74]=se):se=e[74];let ce;return e[75]!==C||e[76]!==N||e[77]!==se?(ce=d.jsx(nr,{centered:!0,opened:C,onClose:N,withCloseButton:!1,closeOnClickOutside:!0,size:"440px",radius:"16px",styles:z,children:se}),e[75]=C,e[76]=N,e[77]=se,e[78]=ce):ce=e[78],ce};async function bQe(t){var n,r;const e=await X8e({uid:t.Uid});return(r=(n=e==null?void 0:e.data)==null?void 0:n.Link)==null?void 0:r.Id}function xQe(t){return{value:t.type,label:t.name}}const wQe=new Map([["1km","application/vnd.1000minds.decision-model+xml"],["3dml","text/vnd.in3d.3dml"],["3ds","image/x-3ds"],["3g2","video/3gpp2"],["3gp","video/3gp"],["3gpp","video/3gpp"],["3mf","model/3mf"],["7z","application/x-7z-compressed"],["7zip","application/x-7z-compressed"],["123","application/vnd.lotus-1-2-3"],["aab","application/x-authorware-bin"],["aac","audio/x-acc"],["aam","application/x-authorware-map"],["aas","application/x-authorware-seg"],["abw","application/x-abiword"],["ac","application/vnd.nokia.n-gage.ac+xml"],["ac3","audio/ac3"],["acc","application/vnd.americandynamics.acc"],["ace","application/x-ace-compressed"],["acu","application/vnd.acucobol"],["acutc","application/vnd.acucorp"],["adp","audio/adpcm"],["aep","application/vnd.audiograph"],["afm","application/x-font-type1"],["afp","application/vnd.ibm.modcap"],["ahead","application/vnd.ahead.space"],["ai","application/pdf"],["aif","audio/x-aiff"],["aifc","audio/x-aiff"],["aiff","audio/x-aiff"],["air","application/vnd.adobe.air-application-installer-package+zip"],["ait","application/vnd.dvb.ait"],["ami","application/vnd.amiga.ami"],["amr","audio/amr"],["apk","application/vnd.android.package-archive"],["apng","image/apng"],["appcache","text/cache-manifest"],["application","application/x-ms-application"],["apr","application/vnd.lotus-approach"],["arc","application/x-freearc"],["arj","application/x-arj"],["asc","application/pgp-signature"],["asf","video/x-ms-asf"],["asm","text/x-asm"],["aso","application/vnd.accpac.simply.aso"],["asx","video/x-ms-asf"],["atc","application/vnd.acucorp"],["atom","application/atom+xml"],["atomcat","application/atomcat+xml"],["atomdeleted","application/atomdeleted+xml"],["atomsvc","application/atomsvc+xml"],["atx","application/vnd.antix.game-component"],["au","audio/x-au"],["avi","video/x-msvideo"],["avif","image/avif"],["aw","application/applixware"],["azf","application/vnd.airzip.filesecure.azf"],["azs","application/vnd.airzip.filesecure.azs"],["azv","image/vnd.airzip.accelerator.azv"],["azw","application/vnd.amazon.ebook"],["b16","image/vnd.pco.b16"],["bat","application/x-msdownload"],["bcpio","application/x-bcpio"],["bdf","application/x-font-bdf"],["bdm","application/vnd.syncml.dm+wbxml"],["bdoc","application/x-bdoc"],["bed","application/vnd.realvnc.bed"],["bh2","application/vnd.fujitsu.oasysprs"],["bin","application/octet-stream"],["blb","application/x-blorb"],["blorb","application/x-blorb"],["bmi","application/vnd.bmi"],["bmml","application/vnd.balsamiq.bmml+xml"],["bmp","image/bmp"],["book","application/vnd.framemaker"],["box","application/vnd.previewsystems.box"],["boz","application/x-bzip2"],["bpk","application/octet-stream"],["bpmn","application/octet-stream"],["bsp","model/vnd.valve.source.compiled-map"],["btif","image/prs.btif"],["buffer","application/octet-stream"],["bz","application/x-bzip"],["bz2","application/x-bzip2"],["c","text/x-c"],["c4d","application/vnd.clonk.c4group"],["c4f","application/vnd.clonk.c4group"],["c4g","application/vnd.clonk.c4group"],["c4p","application/vnd.clonk.c4group"],["c4u","application/vnd.clonk.c4group"],["c11amc","application/vnd.cluetrust.cartomobile-config"],["c11amz","application/vnd.cluetrust.cartomobile-config-pkg"],["cab","application/vnd.ms-cab-compressed"],["caf","audio/x-caf"],["cap","application/vnd.tcpdump.pcap"],["car","application/vnd.curl.car"],["cat","application/vnd.ms-pki.seccat"],["cb7","application/x-cbr"],["cba","application/x-cbr"],["cbr","application/x-cbr"],["cbt","application/x-cbr"],["cbz","application/x-cbr"],["cc","text/x-c"],["cco","application/x-cocoa"],["cct","application/x-director"],["ccxml","application/ccxml+xml"],["cdbcmsg","application/vnd.contact.cmsg"],["cda","application/x-cdf"],["cdf","application/x-netcdf"],["cdfx","application/cdfx+xml"],["cdkey","application/vnd.mediastation.cdkey"],["cdmia","application/cdmi-capability"],["cdmic","application/cdmi-container"],["cdmid","application/cdmi-domain"],["cdmio","application/cdmi-object"],["cdmiq","application/cdmi-queue"],["cdr","application/cdr"],["cdx","chemical/x-cdx"],["cdxml","application/vnd.chemdraw+xml"],["cdy","application/vnd.cinderella"],["cer","application/pkix-cert"],["cfs","application/x-cfs-compressed"],["cgm","image/cgm"],["chat","application/x-chat"],["chm","application/vnd.ms-htmlhelp"],["chrt","application/vnd.kde.kchart"],["cif","chemical/x-cif"],["cii","application/vnd.anser-web-certificate-issue-initiation"],["cil","application/vnd.ms-artgalry"],["cjs","application/node"],["cla","application/vnd.claymore"],["class","application/octet-stream"],["clkk","application/vnd.crick.clicker.keyboard"],["clkp","application/vnd.crick.clicker.palette"],["clkt","application/vnd.crick.clicker.template"],["clkw","application/vnd.crick.clicker.wordbank"],["clkx","application/vnd.crick.clicker"],["clp","application/x-msclip"],["cmc","application/vnd.cosmocaller"],["cmdf","chemical/x-cmdf"],["cml","chemical/x-cml"],["cmp","application/vnd.yellowriver-custom-menu"],["cmx","image/x-cmx"],["cod","application/vnd.rim.cod"],["coffee","text/coffeescript"],["com","application/x-msdownload"],["conf","text/plain"],["cpio","application/x-cpio"],["cpp","text/x-c"],["cpt","application/mac-compactpro"],["crd","application/x-mscardfile"],["crl","application/pkix-crl"],["crt","application/x-x509-ca-cert"],["crx","application/x-chrome-extension"],["cryptonote","application/vnd.rig.cryptonote"],["csh","application/x-csh"],["csl","application/vnd.citationstyles.style+xml"],["csml","chemical/x-csml"],["csp","application/vnd.commonspace"],["csr","application/octet-stream"],["css","text/css"],["cst","application/x-director"],["csv","text/csv"],["cu","application/cu-seeme"],["curl","text/vnd.curl"],["cww","application/prs.cww"],["cxt","application/x-director"],["cxx","text/x-c"],["dae","model/vnd.collada+xml"],["daf","application/vnd.mobius.daf"],["dart","application/vnd.dart"],["dataless","application/vnd.fdsn.seed"],["davmount","application/davmount+xml"],["dbf","application/vnd.dbf"],["dbk","application/docbook+xml"],["dcr","application/x-director"],["dcurl","text/vnd.curl.dcurl"],["dd2","application/vnd.oma.dd2+xml"],["ddd","application/vnd.fujixerox.ddd"],["ddf","application/vnd.syncml.dmddf+xml"],["dds","image/vnd.ms-dds"],["deb","application/x-debian-package"],["def","text/plain"],["deploy","application/octet-stream"],["der","application/x-x509-ca-cert"],["dfac","application/vnd.dreamfactory"],["dgc","application/x-dgc-compressed"],["dic","text/x-c"],["dir","application/x-director"],["dis","application/vnd.mobius.dis"],["disposition-notification","message/disposition-notification"],["dist","application/octet-stream"],["distz","application/octet-stream"],["djv","image/vnd.djvu"],["djvu","image/vnd.djvu"],["dll","application/octet-stream"],["dmg","application/x-apple-diskimage"],["dmn","application/octet-stream"],["dmp","application/vnd.tcpdump.pcap"],["dms","application/octet-stream"],["dna","application/vnd.dna"],["doc","application/msword"],["docm","application/vnd.ms-word.template.macroEnabled.12"],["docx","application/vnd.openxmlformats-officedocument.wordprocessingml.document"],["dot","application/msword"],["dotm","application/vnd.ms-word.template.macroEnabled.12"],["dotx","application/vnd.openxmlformats-officedocument.wordprocessingml.template"],["dp","application/vnd.osgi.dp"],["dpg","application/vnd.dpgraph"],["dra","audio/vnd.dra"],["drle","image/dicom-rle"],["dsc","text/prs.lines.tag"],["dssc","application/dssc+der"],["dtb","application/x-dtbook+xml"],["dtd","application/xml-dtd"],["dts","audio/vnd.dts"],["dtshd","audio/vnd.dts.hd"],["dump","application/octet-stream"],["dvb","video/vnd.dvb.file"],["dvi","application/x-dvi"],["dwd","application/atsc-dwd+xml"],["dwf","model/vnd.dwf"],["dwg","image/vnd.dwg"],["dxf","image/vnd.dxf"],["dxp","application/vnd.spotfire.dxp"],["dxr","application/x-director"],["ear","application/java-archive"],["ecelp4800","audio/vnd.nuera.ecelp4800"],["ecelp7470","audio/vnd.nuera.ecelp7470"],["ecelp9600","audio/vnd.nuera.ecelp9600"],["ecma","application/ecmascript"],["edm","application/vnd.novadigm.edm"],["edx","application/vnd.novadigm.edx"],["efif","application/vnd.picsel"],["ei6","application/vnd.pg.osasli"],["elc","application/octet-stream"],["emf","image/emf"],["eml","message/rfc822"],["emma","application/emma+xml"],["emotionml","application/emotionml+xml"],["emz","application/x-msmetafile"],["eol","audio/vnd.digital-winds"],["eot","application/vnd.ms-fontobject"],["eps","application/postscript"],["epub","application/epub+zip"],["es","application/ecmascript"],["es3","application/vnd.eszigno3+xml"],["esa","application/vnd.osgi.subsystem"],["esf","application/vnd.epson.esf"],["et3","application/vnd.eszigno3+xml"],["etx","text/x-setext"],["eva","application/x-eva"],["evy","application/x-envoy"],["exe","application/octet-stream"],["exi","application/exi"],["exp","application/express"],["exr","image/aces"],["ext","application/vnd.novadigm.ext"],["ez","application/andrew-inset"],["ez2","application/vnd.ezpix-album"],["ez3","application/vnd.ezpix-package"],["f","text/x-fortran"],["f4v","video/mp4"],["f77","text/x-fortran"],["f90","text/x-fortran"],["fbs","image/vnd.fastbidsheet"],["fcdt","application/vnd.adobe.formscentral.fcdt"],["fcs","application/vnd.isac.fcs"],["fdf","application/vnd.fdf"],["fdt","application/fdt+xml"],["fe_launch","application/vnd.denovo.fcselayout-link"],["fg5","application/vnd.fujitsu.oasysgp"],["fgd","application/x-director"],["fh","image/x-freehand"],["fh4","image/x-freehand"],["fh5","image/x-freehand"],["fh7","image/x-freehand"],["fhc","image/x-freehand"],["fig","application/x-xfig"],["fits","image/fits"],["flac","audio/x-flac"],["fli","video/x-fli"],["flo","application/vnd.micrografx.flo"],["flv","video/x-flv"],["flw","application/vnd.kde.kivio"],["flx","text/vnd.fmi.flexstor"],["fly","text/vnd.fly"],["fm","application/vnd.framemaker"],["fnc","application/vnd.frogans.fnc"],["fo","application/vnd.software602.filler.form+xml"],["for","text/x-fortran"],["fpx","image/vnd.fpx"],["frame","application/vnd.framemaker"],["fsc","application/vnd.fsc.weblaunch"],["fst","image/vnd.fst"],["ftc","application/vnd.fluxtime.clip"],["fti","application/vnd.anser-web-funds-transfer-initiation"],["fvt","video/vnd.fvt"],["fxp","application/vnd.adobe.fxp"],["fxpl","application/vnd.adobe.fxp"],["fzs","application/vnd.fuzzysheet"],["g2w","application/vnd.geoplan"],["g3","image/g3fax"],["g3w","application/vnd.geospace"],["gac","application/vnd.groove-account"],["gam","application/x-tads"],["gbr","application/rpki-ghostbusters"],["gca","application/x-gca-compressed"],["gdl","model/vnd.gdl"],["gdoc","application/vnd.google-apps.document"],["geo","application/vnd.dynageo"],["geojson","application/geo+json"],["gex","application/vnd.geometry-explorer"],["ggb","application/vnd.geogebra.file"],["ggt","application/vnd.geogebra.tool"],["ghf","application/vnd.groove-help"],["gif","image/gif"],["gim","application/vnd.groove-identity-message"],["glb","model/gltf-binary"],["gltf","model/gltf+json"],["gml","application/gml+xml"],["gmx","application/vnd.gmx"],["gnumeric","application/x-gnumeric"],["gpg","application/gpg-keys"],["gph","application/vnd.flographit"],["gpx","application/gpx+xml"],["gqf","application/vnd.grafeq"],["gqs","application/vnd.grafeq"],["gram","application/srgs"],["gramps","application/x-gramps-xml"],["gre","application/vnd.geometry-explorer"],["grv","application/vnd.groove-injector"],["grxml","application/srgs+xml"],["gsf","application/x-font-ghostscript"],["gsheet","application/vnd.google-apps.spreadsheet"],["gslides","application/vnd.google-apps.presentation"],["gtar","application/x-gtar"],["gtm","application/vnd.groove-tool-message"],["gtw","model/vnd.gtw"],["gv","text/vnd.graphviz"],["gxf","application/gxf"],["gxt","application/vnd.geonext"],["gz","application/gzip"],["gzip","application/gzip"],["h","text/x-c"],["h261","video/h261"],["h263","video/h263"],["h264","video/h264"],["hal","application/vnd.hal+xml"],["hbci","application/vnd.hbci"],["hbs","text/x-handlebars-template"],["hdd","application/x-virtualbox-hdd"],["hdf","application/x-hdf"],["heic","image/heic"],["heics","image/heic-sequence"],["heif","image/heif"],["heifs","image/heif-sequence"],["hej2","image/hej2k"],["held","application/atsc-held+xml"],["hh","text/x-c"],["hjson","application/hjson"],["hlp","application/winhlp"],["hpgl","application/vnd.hp-hpgl"],["hpid","application/vnd.hp-hpid"],["hps","application/vnd.hp-hps"],["hqx","application/mac-binhex40"],["hsj2","image/hsj2"],["htc","text/x-component"],["htke","application/vnd.kenameaapp"],["htm","text/html"],["html","text/html"],["hvd","application/vnd.yamaha.hv-dic"],["hvp","application/vnd.yamaha.hv-voice"],["hvs","application/vnd.yamaha.hv-script"],["i2g","application/vnd.intergeo"],["icc","application/vnd.iccprofile"],["ice","x-conference/x-cooltalk"],["icm","application/vnd.iccprofile"],["ico","image/x-icon"],["ics","text/calendar"],["ief","image/ief"],["ifb","text/calendar"],["ifm","application/vnd.shana.informed.formdata"],["iges","model/iges"],["igl","application/vnd.igloader"],["igm","application/vnd.insors.igm"],["igs","model/iges"],["igx","application/vnd.micrografx.igx"],["iif","application/vnd.shana.informed.interchange"],["img","application/octet-stream"],["imp","application/vnd.accpac.simply.imp"],["ims","application/vnd.ms-ims"],["in","text/plain"],["ini","text/plain"],["ink","application/inkml+xml"],["inkml","application/inkml+xml"],["install","application/x-install-instructions"],["iota","application/vnd.astraea-software.iota"],["ipfix","application/ipfix"],["ipk","application/vnd.shana.informed.package"],["irm","application/vnd.ibm.rights-management"],["irp","application/vnd.irepository.package+xml"],["iso","application/x-iso9660-image"],["itp","application/vnd.shana.informed.formtemplate"],["its","application/its+xml"],["ivp","application/vnd.immervision-ivp"],["ivu","application/vnd.immervision-ivu"],["jad","text/vnd.sun.j2me.app-descriptor"],["jade","text/jade"],["jam","application/vnd.jam"],["jar","application/java-archive"],["jardiff","application/x-java-archive-diff"],["java","text/x-java-source"],["jhc","image/jphc"],["jisp","application/vnd.jisp"],["jls","image/jls"],["jlt","application/vnd.hp-jlyt"],["jng","image/x-jng"],["jnlp","application/x-java-jnlp-file"],["joda","application/vnd.joost.joda-archive"],["jp2","image/jp2"],["jpe","image/jpeg"],["jpeg","image/jpeg"],["jpf","image/jpx"],["jpg","image/jpeg"],["jpg2","image/jp2"],["jpgm","video/jpm"],["jpgv","video/jpeg"],["jph","image/jph"],["jpm","video/jpm"],["jpx","image/jpx"],["js","application/javascript"],["json","application/json"],["json5","application/json5"],["jsonld","application/ld+json"],["jsonl","application/jsonl"],["jsonml","application/jsonml+json"],["jsx","text/jsx"],["jxr","image/jxr"],["jxra","image/jxra"],["jxrs","image/jxrs"],["jxs","image/jxs"],["jxsc","image/jxsc"],["jxsi","image/jxsi"],["jxss","image/jxss"],["kar","audio/midi"],["karbon","application/vnd.kde.karbon"],["kdb","application/octet-stream"],["kdbx","application/x-keepass2"],["key","application/x-iwork-keynote-sffkey"],["kfo","application/vnd.kde.kformula"],["kia","application/vnd.kidspiration"],["kml","application/vnd.google-earth.kml+xml"],["kmz","application/vnd.google-earth.kmz"],["kne","application/vnd.kinar"],["knp","application/vnd.kinar"],["kon","application/vnd.kde.kontour"],["kpr","application/vnd.kde.kpresenter"],["kpt","application/vnd.kde.kpresenter"],["kpxx","application/vnd.ds-keypoint"],["ksp","application/vnd.kde.kspread"],["ktr","application/vnd.kahootz"],["ktx","image/ktx"],["ktx2","image/ktx2"],["ktz","application/vnd.kahootz"],["kwd","application/vnd.kde.kword"],["kwt","application/vnd.kde.kword"],["lasxml","application/vnd.las.las+xml"],["latex","application/x-latex"],["lbd","application/vnd.llamagraphics.life-balance.desktop"],["lbe","application/vnd.llamagraphics.life-balance.exchange+xml"],["les","application/vnd.hhe.lesson-player"],["less","text/less"],["lgr","application/lgr+xml"],["lha","application/octet-stream"],["link66","application/vnd.route66.link66+xml"],["list","text/plain"],["list3820","application/vnd.ibm.modcap"],["listafp","application/vnd.ibm.modcap"],["litcoffee","text/coffeescript"],["lnk","application/x-ms-shortcut"],["log","text/plain"],["lostxml","application/lost+xml"],["lrf","application/octet-stream"],["lrm","application/vnd.ms-lrm"],["ltf","application/vnd.frogans.ltf"],["lua","text/x-lua"],["luac","application/x-lua-bytecode"],["lvp","audio/vnd.lucent.voice"],["lwp","application/vnd.lotus-wordpro"],["lzh","application/octet-stream"],["m1v","video/mpeg"],["m2a","audio/mpeg"],["m2v","video/mpeg"],["m3a","audio/mpeg"],["m3u","text/plain"],["m3u8","application/vnd.apple.mpegurl"],["m4a","audio/x-m4a"],["m4p","application/mp4"],["m4s","video/iso.segment"],["m4u","application/vnd.mpegurl"],["m4v","video/x-m4v"],["m13","application/x-msmediaview"],["m14","application/x-msmediaview"],["m21","application/mp21"],["ma","application/mathematica"],["mads","application/mads+xml"],["maei","application/mmt-aei+xml"],["mag","application/vnd.ecowin.chart"],["maker","application/vnd.framemaker"],["man","text/troff"],["manifest","text/cache-manifest"],["map","application/json"],["mar","application/octet-stream"],["markdown","text/markdown"],["mathml","application/mathml+xml"],["mb","application/mathematica"],["mbk","application/vnd.mobius.mbk"],["mbox","application/mbox"],["mc1","application/vnd.medcalcdata"],["mcd","application/vnd.mcd"],["mcurl","text/vnd.curl.mcurl"],["md","text/markdown"],["mdb","application/x-msaccess"],["mdi","image/vnd.ms-modi"],["mdx","text/mdx"],["me","text/troff"],["mesh","model/mesh"],["meta4","application/metalink4+xml"],["metalink","application/metalink+xml"],["mets","application/mets+xml"],["mfm","application/vnd.mfmp"],["mft","application/rpki-manifest"],["mgp","application/vnd.osgeo.mapguide.package"],["mgz","application/vnd.proteus.magazine"],["mid","audio/midi"],["midi","audio/midi"],["mie","application/x-mie"],["mif","application/vnd.mif"],["mime","message/rfc822"],["mj2","video/mj2"],["mjp2","video/mj2"],["mjs","application/javascript"],["mk3d","video/x-matroska"],["mka","audio/x-matroska"],["mkd","text/x-markdown"],["mks","video/x-matroska"],["mkv","video/x-matroska"],["mlp","application/vnd.dolby.mlp"],["mmd","application/vnd.chipnuts.karaoke-mmd"],["mmf","application/vnd.smaf"],["mml","text/mathml"],["mmr","image/vnd.fujixerox.edmics-mmr"],["mng","video/x-mng"],["mny","application/x-msmoney"],["mobi","application/x-mobipocket-ebook"],["mods","application/mods+xml"],["mov","video/quicktime"],["movie","video/x-sgi-movie"],["mp2","audio/mpeg"],["mp2a","audio/mpeg"],["mp3","audio/mpeg"],["mp4","video/mp4"],["mp4a","audio/mp4"],["mp4s","application/mp4"],["mp4v","video/mp4"],["mp21","application/mp21"],["mpc","application/vnd.mophun.certificate"],["mpd","application/dash+xml"],["mpe","video/mpeg"],["mpeg","video/mpeg"],["mpg","video/mpeg"],["mpg4","video/mp4"],["mpga","audio/mpeg"],["mpkg","application/vnd.apple.installer+xml"],["mpm","application/vnd.blueice.multipass"],["mpn","application/vnd.mophun.application"],["mpp","application/vnd.ms-project"],["mpt","application/vnd.ms-project"],["mpy","application/vnd.ibm.minipay"],["mqy","application/vnd.mobius.mqy"],["mrc","application/marc"],["mrcx","application/marcxml+xml"],["ms","text/troff"],["mscml","application/mediaservercontrol+xml"],["mseed","application/vnd.fdsn.mseed"],["mseq","application/vnd.mseq"],["msf","application/vnd.epson.msf"],["msg","application/vnd.ms-outlook"],["msh","model/mesh"],["msi","application/x-msdownload"],["msl","application/vnd.mobius.msl"],["msm","application/octet-stream"],["msp","application/octet-stream"],["msty","application/vnd.muvee.style"],["mtl","model/mtl"],["mts","model/vnd.mts"],["mus","application/vnd.musician"],["musd","application/mmt-usd+xml"],["musicxml","application/vnd.recordare.musicxml+xml"],["mvb","application/x-msmediaview"],["mvt","application/vnd.mapbox-vector-tile"],["mwf","application/vnd.mfer"],["mxf","application/mxf"],["mxl","application/vnd.recordare.musicxml"],["mxmf","audio/mobile-xmf"],["mxml","application/xv+xml"],["mxs","application/vnd.triscape.mxs"],["mxu","video/vnd.mpegurl"],["n-gage","application/vnd.nokia.n-gage.symbian.install"],["n3","text/n3"],["nb","application/mathematica"],["nbp","application/vnd.wolfram.player"],["nc","application/x-netcdf"],["ncx","application/x-dtbncx+xml"],["nfo","text/x-nfo"],["ngdat","application/vnd.nokia.n-gage.data"],["nitf","application/vnd.nitf"],["nlu","application/vnd.neurolanguage.nlu"],["nml","application/vnd.enliven"],["nnd","application/vnd.noblenet-directory"],["nns","application/vnd.noblenet-sealer"],["nnw","application/vnd.noblenet-web"],["npx","image/vnd.net-fpx"],["nq","application/n-quads"],["nsc","application/x-conference"],["nsf","application/vnd.lotus-notes"],["nt","application/n-triples"],["ntf","application/vnd.nitf"],["numbers","application/x-iwork-numbers-sffnumbers"],["nzb","application/x-nzb"],["oa2","application/vnd.fujitsu.oasys2"],["oa3","application/vnd.fujitsu.oasys3"],["oas","application/vnd.fujitsu.oasys"],["obd","application/x-msbinder"],["obgx","application/vnd.openblox.game+xml"],["obj","model/obj"],["oda","application/oda"],["odb","application/vnd.oasis.opendocument.database"],["odc","application/vnd.oasis.opendocument.chart"],["odf","application/vnd.oasis.opendocument.formula"],["odft","application/vnd.oasis.opendocument.formula-template"],["odg","application/vnd.oasis.opendocument.graphics"],["odi","application/vnd.oasis.opendocument.image"],["odm","application/vnd.oasis.opendocument.text-master"],["odp","application/vnd.oasis.opendocument.presentation"],["ods","application/vnd.oasis.opendocument.spreadsheet"],["odt","application/vnd.oasis.opendocument.text"],["oga","audio/ogg"],["ogex","model/vnd.opengex"],["ogg","audio/ogg"],["ogv","video/ogg"],["ogx","application/ogg"],["omdoc","application/omdoc+xml"],["onepkg","application/onenote"],["onetmp","application/onenote"],["onetoc","application/onenote"],["onetoc2","application/onenote"],["opf","application/oebps-package+xml"],["opml","text/x-opml"],["oprc","application/vnd.palm"],["opus","audio/ogg"],["org","text/x-org"],["osf","application/vnd.yamaha.openscoreformat"],["osfpvg","application/vnd.yamaha.openscoreformat.osfpvg+xml"],["osm","application/vnd.openstreetmap.data+xml"],["otc","application/vnd.oasis.opendocument.chart-template"],["otf","font/otf"],["otg","application/vnd.oasis.opendocument.graphics-template"],["oth","application/vnd.oasis.opendocument.text-web"],["oti","application/vnd.oasis.opendocument.image-template"],["otp","application/vnd.oasis.opendocument.presentation-template"],["ots","application/vnd.oasis.opendocument.spreadsheet-template"],["ott","application/vnd.oasis.opendocument.text-template"],["ova","application/x-virtualbox-ova"],["ovf","application/x-virtualbox-ovf"],["owl","application/rdf+xml"],["oxps","application/oxps"],["oxt","application/vnd.openofficeorg.extension"],["p","text/x-pascal"],["p7a","application/x-pkcs7-signature"],["p7b","application/x-pkcs7-certificates"],["p7c","application/pkcs7-mime"],["p7m","application/pkcs7-mime"],["p7r","application/x-pkcs7-certreqresp"],["p7s","application/pkcs7-signature"],["p8","application/pkcs8"],["p10","application/x-pkcs10"],["p12","application/x-pkcs12"],["pac","application/x-ns-proxy-autoconfig"],["pages","application/x-iwork-pages-sffpages"],["pas","text/x-pascal"],["paw","application/vnd.pawaafile"],["pbd","application/vnd.powerbuilder6"],["pbm","image/x-portable-bitmap"],["pcap","application/vnd.tcpdump.pcap"],["pcf","application/x-font-pcf"],["pcl","application/vnd.hp-pcl"],["pclxl","application/vnd.hp-pclxl"],["pct","image/x-pict"],["pcurl","application/vnd.curl.pcurl"],["pcx","image/x-pcx"],["pdb","application/x-pilot"],["pde","text/x-processing"],["pdf","application/pdf"],["pem","application/x-x509-user-cert"],["pfa","application/x-font-type1"],["pfb","application/x-font-type1"],["pfm","application/x-font-type1"],["pfr","application/font-tdpfr"],["pfx","application/x-pkcs12"],["pgm","image/x-portable-graymap"],["pgn","application/x-chess-pgn"],["pgp","application/pgp"],["php","application/x-httpd-php"],["php3","application/x-httpd-php"],["php4","application/x-httpd-php"],["phps","application/x-httpd-php-source"],["phtml","application/x-httpd-php"],["pic","image/x-pict"],["pkg","application/octet-stream"],["pki","application/pkixcmp"],["pkipath","application/pkix-pkipath"],["pkpass","application/vnd.apple.pkpass"],["pl","application/x-perl"],["plb","application/vnd.3gpp.pic-bw-large"],["plc","application/vnd.mobius.plc"],["plf","application/vnd.pocketlearn"],["pls","application/pls+xml"],["pm","application/x-perl"],["pml","application/vnd.ctc-posml"],["png","image/png"],["pnm","image/x-portable-anymap"],["portpkg","application/vnd.macports.portpkg"],["pot","application/vnd.ms-powerpoint"],["potm","application/vnd.ms-powerpoint.presentation.macroEnabled.12"],["potx","application/vnd.openxmlformats-officedocument.presentationml.template"],["ppa","application/vnd.ms-powerpoint"],["ppam","application/vnd.ms-powerpoint.addin.macroEnabled.12"],["ppd","application/vnd.cups-ppd"],["ppm","image/x-portable-pixmap"],["pps","application/vnd.ms-powerpoint"],["ppsm","application/vnd.ms-powerpoint.slideshow.macroEnabled.12"],["ppsx","application/vnd.openxmlformats-officedocument.presentationml.slideshow"],["ppt","application/powerpoint"],["pptm","application/vnd.ms-powerpoint.presentation.macroEnabled.12"],["pptx","application/vnd.openxmlformats-officedocument.presentationml.presentation"],["pqa","application/vnd.palm"],["prc","application/x-pilot"],["pre","application/vnd.lotus-freelance"],["prf","application/pics-rules"],["provx","application/provenance+xml"],["ps","application/postscript"],["psb","application/vnd.3gpp.pic-bw-small"],["psd","application/x-photoshop"],["psf","application/x-font-linux-psf"],["pskcxml","application/pskc+xml"],["pti","image/prs.pti"],["ptid","application/vnd.pvi.ptid1"],["pub","application/x-mspublisher"],["pvb","application/vnd.3gpp.pic-bw-var"],["pwn","application/vnd.3m.post-it-notes"],["pya","audio/vnd.ms-playready.media.pya"],["pyv","video/vnd.ms-playready.media.pyv"],["qam","application/vnd.epson.quickanime"],["qbo","application/vnd.intu.qbo"],["qfx","application/vnd.intu.qfx"],["qps","application/vnd.publishare-delta-tree"],["qt","video/quicktime"],["qwd","application/vnd.quark.quarkxpress"],["qwt","application/vnd.quark.quarkxpress"],["qxb","application/vnd.quark.quarkxpress"],["qxd","application/vnd.quark.quarkxpress"],["qxl","application/vnd.quark.quarkxpress"],["qxt","application/vnd.quark.quarkxpress"],["ra","audio/x-realaudio"],["ram","audio/x-pn-realaudio"],["raml","application/raml+yaml"],["rapd","application/route-apd+xml"],["rar","application/x-rar"],["ras","image/x-cmu-raster"],["rcprofile","application/vnd.ipunplugged.rcprofile"],["rdf","application/rdf+xml"],["rdz","application/vnd.data-vision.rdz"],["relo","application/p2p-overlay+xml"],["rep","application/vnd.businessobjects"],["res","application/x-dtbresource+xml"],["rgb","image/x-rgb"],["rif","application/reginfo+xml"],["rip","audio/vnd.rip"],["ris","application/x-research-info-systems"],["rl","application/resource-lists+xml"],["rlc","image/vnd.fujixerox.edmics-rlc"],["rld","application/resource-lists-diff+xml"],["rm","audio/x-pn-realaudio"],["rmi","audio/midi"],["rmp","audio/x-pn-realaudio-plugin"],["rms","application/vnd.jcp.javame.midlet-rms"],["rmvb","application/vnd.rn-realmedia-vbr"],["rnc","application/relax-ng-compact-syntax"],["rng","application/xml"],["roa","application/rpki-roa"],["roff","text/troff"],["rp9","application/vnd.cloanto.rp9"],["rpm","audio/x-pn-realaudio-plugin"],["rpss","application/vnd.nokia.radio-presets"],["rpst","application/vnd.nokia.radio-preset"],["rq","application/sparql-query"],["rs","application/rls-services+xml"],["rsa","application/x-pkcs7"],["rsat","application/atsc-rsat+xml"],["rsd","application/rsd+xml"],["rsheet","application/urc-ressheet+xml"],["rss","application/rss+xml"],["rtf","text/rtf"],["rtx","text/richtext"],["run","application/x-makeself"],["rusd","application/route-usd+xml"],["rv","video/vnd.rn-realvideo"],["s","text/x-asm"],["s3m","audio/s3m"],["saf","application/vnd.yamaha.smaf-audio"],["sass","text/x-sass"],["sbml","application/sbml+xml"],["sc","application/vnd.ibm.secure-container"],["scd","application/x-msschedule"],["scm","application/vnd.lotus-screencam"],["scq","application/scvp-cv-request"],["scs","application/scvp-cv-response"],["scss","text/x-scss"],["scurl","text/vnd.curl.scurl"],["sda","application/vnd.stardivision.draw"],["sdc","application/vnd.stardivision.calc"],["sdd","application/vnd.stardivision.impress"],["sdkd","application/vnd.solent.sdkm+xml"],["sdkm","application/vnd.solent.sdkm+xml"],["sdp","application/sdp"],["sdw","application/vnd.stardivision.writer"],["sea","application/octet-stream"],["see","application/vnd.seemail"],["seed","application/vnd.fdsn.seed"],["sema","application/vnd.sema"],["semd","application/vnd.semd"],["semf","application/vnd.semf"],["senmlx","application/senml+xml"],["sensmlx","application/sensml+xml"],["ser","application/java-serialized-object"],["setpay","application/set-payment-initiation"],["setreg","application/set-registration-initiation"],["sfd-hdstx","application/vnd.hydrostatix.sof-data"],["sfs","application/vnd.spotfire.sfs"],["sfv","text/x-sfv"],["sgi","image/sgi"],["sgl","application/vnd.stardivision.writer-global"],["sgm","text/sgml"],["sgml","text/sgml"],["sh","application/x-sh"],["shar","application/x-shar"],["shex","text/shex"],["shf","application/shf+xml"],["shtml","text/html"],["sid","image/x-mrsid-image"],["sieve","application/sieve"],["sig","application/pgp-signature"],["sil","audio/silk"],["silo","model/mesh"],["sis","application/vnd.symbian.install"],["sisx","application/vnd.symbian.install"],["sit","application/x-stuffit"],["sitx","application/x-stuffitx"],["siv","application/sieve"],["skd","application/vnd.koan"],["skm","application/vnd.koan"],["skp","application/vnd.koan"],["skt","application/vnd.koan"],["sldm","application/vnd.ms-powerpoint.slide.macroenabled.12"],["sldx","application/vnd.openxmlformats-officedocument.presentationml.slide"],["slim","text/slim"],["slm","text/slim"],["sls","application/route-s-tsid+xml"],["slt","application/vnd.epson.salt"],["sm","application/vnd.stepmania.stepchart"],["smf","application/vnd.stardivision.math"],["smi","application/smil"],["smil","application/smil"],["smv","video/x-smv"],["smzip","application/vnd.stepmania.package"],["snd","audio/basic"],["snf","application/x-font-snf"],["so","application/octet-stream"],["spc","application/x-pkcs7-certificates"],["spdx","text/spdx"],["spf","application/vnd.yamaha.smaf-phrase"],["spl","application/x-futuresplash"],["spot","text/vnd.in3d.spot"],["spp","application/scvp-vp-response"],["spq","application/scvp-vp-request"],["spx","audio/ogg"],["sql","application/x-sql"],["src","application/x-wais-source"],["srt","application/x-subrip"],["sru","application/sru+xml"],["srx","application/sparql-results+xml"],["ssdl","application/ssdl+xml"],["sse","application/vnd.kodak-descriptor"],["ssf","application/vnd.epson.ssf"],["ssml","application/ssml+xml"],["sst","application/octet-stream"],["st","application/vnd.sailingtracker.track"],["stc","application/vnd.sun.xml.calc.template"],["std","application/vnd.sun.xml.draw.template"],["stf","application/vnd.wt.stf"],["sti","application/vnd.sun.xml.impress.template"],["stk","application/hyperstudio"],["stl","model/stl"],["stpx","model/step+xml"],["stpxz","model/step-xml+zip"],["stpz","model/step+zip"],["str","application/vnd.pg.format"],["stw","application/vnd.sun.xml.writer.template"],["styl","text/stylus"],["stylus","text/stylus"],["sub","text/vnd.dvb.subtitle"],["sus","application/vnd.sus-calendar"],["susp","application/vnd.sus-calendar"],["sv4cpio","application/x-sv4cpio"],["sv4crc","application/x-sv4crc"],["svc","application/vnd.dvb.service"],["svd","application/vnd.svd"],["svg","image/svg+xml"],["svgz","image/svg+xml"],["swa","application/x-director"],["swf","application/x-shockwave-flash"],["swi","application/vnd.aristanetworks.swi"],["swidtag","application/swid+xml"],["sxc","application/vnd.sun.xml.calc"],["sxd","application/vnd.sun.xml.draw"],["sxg","application/vnd.sun.xml.writer.global"],["sxi","application/vnd.sun.xml.impress"],["sxm","application/vnd.sun.xml.math"],["sxw","application/vnd.sun.xml.writer"],["t","text/troff"],["t3","application/x-t3vm-image"],["t38","image/t38"],["taglet","application/vnd.mynfc"],["tao","application/vnd.tao.intent-module-archive"],["tap","image/vnd.tencent.tap"],["tar","application/x-tar"],["tcap","application/vnd.3gpp2.tcap"],["tcl","application/x-tcl"],["td","application/urc-targetdesc+xml"],["teacher","application/vnd.smart.teacher"],["tei","application/tei+xml"],["teicorpus","application/tei+xml"],["tex","application/x-tex"],["texi","application/x-texinfo"],["texinfo","application/x-texinfo"],["text","text/plain"],["tfi","application/thraud+xml"],["tfm","application/x-tex-tfm"],["tfx","image/tiff-fx"],["tga","image/x-tga"],["tgz","application/x-tar"],["thmx","application/vnd.ms-officetheme"],["tif","image/tiff"],["tiff","image/tiff"],["tk","application/x-tcl"],["tmo","application/vnd.tmobile-livetv"],["toml","application/toml"],["torrent","application/x-bittorrent"],["tpl","application/vnd.groove-tool-template"],["tpt","application/vnd.trid.tpt"],["tr","text/troff"],["tra","application/vnd.trueapp"],["trig","application/trig"],["trm","application/x-msterminal"],["ts","video/mp2t"],["tsd","application/timestamped-data"],["tsv","text/tab-separated-values"],["ttc","font/collection"],["ttf","font/ttf"],["ttl","text/turtle"],["ttml","application/ttml+xml"],["twd","application/vnd.simtech-mindmapper"],["twds","application/vnd.simtech-mindmapper"],["txd","application/vnd.genomatix.tuxedo"],["txf","application/vnd.mobius.txf"],["txt","text/plain"],["u8dsn","message/global-delivery-status"],["u8hdr","message/global-headers"],["u8mdn","message/global-disposition-notification"],["u8msg","message/global"],["u32","application/x-authorware-bin"],["ubj","application/ubjson"],["udeb","application/x-debian-package"],["ufd","application/vnd.ufdl"],["ufdl","application/vnd.ufdl"],["ulx","application/x-glulx"],["umj","application/vnd.umajin"],["unityweb","application/vnd.unity"],["uoml","application/vnd.uoml+xml"],["uri","text/uri-list"],["uris","text/uri-list"],["urls","text/uri-list"],["usdz","model/vnd.usdz+zip"],["ustar","application/x-ustar"],["utz","application/vnd.uiq.theme"],["uu","text/x-uuencode"],["uva","audio/vnd.dece.audio"],["uvd","application/vnd.dece.data"],["uvf","application/vnd.dece.data"],["uvg","image/vnd.dece.graphic"],["uvh","video/vnd.dece.hd"],["uvi","image/vnd.dece.graphic"],["uvm","video/vnd.dece.mobile"],["uvp","video/vnd.dece.pd"],["uvs","video/vnd.dece.sd"],["uvt","application/vnd.dece.ttml+xml"],["uvu","video/vnd.uvvu.mp4"],["uvv","video/vnd.dece.video"],["uvva","audio/vnd.dece.audio"],["uvvd","application/vnd.dece.data"],["uvvf","application/vnd.dece.data"],["uvvg","image/vnd.dece.graphic"],["uvvh","video/vnd.dece.hd"],["uvvi","image/vnd.dece.graphic"],["uvvm","video/vnd.dece.mobile"],["uvvp","video/vnd.dece.pd"],["uvvs","video/vnd.dece.sd"],["uvvt","application/vnd.dece.ttml+xml"],["uvvu","video/vnd.uvvu.mp4"],["uvvv","video/vnd.dece.video"],["uvvx","application/vnd.dece.unspecified"],["uvvz","application/vnd.dece.zip"],["uvx","application/vnd.dece.unspecified"],["uvz","application/vnd.dece.zip"],["vbox","application/x-virtualbox-vbox"],["vbox-extpack","application/x-virtualbox-vbox-extpack"],["vcard","text/vcard"],["vcd","application/x-cdlink"],["vcf","text/x-vcard"],["vcg","application/vnd.groove-vcard"],["vcs","text/x-vcalendar"],["vcx","application/vnd.vcx"],["vdi","application/x-virtualbox-vdi"],["vds","model/vnd.sap.vds"],["vhd","application/x-virtualbox-vhd"],["vis","application/vnd.visionary"],["viv","video/vnd.vivo"],["vlc","application/videolan"],["vmdk","application/x-virtualbox-vmdk"],["vob","video/x-ms-vob"],["vor","application/vnd.stardivision.writer"],["vox","application/x-authorware-bin"],["vrml","model/vrml"],["vsd","application/vnd.visio"],["vsf","application/vnd.vsf"],["vss","application/vnd.visio"],["vst","application/vnd.visio"],["vsw","application/vnd.visio"],["vtf","image/vnd.valve.source.texture"],["vtt","text/vtt"],["vtu","model/vnd.vtu"],["vxml","application/voicexml+xml"],["w3d","application/x-director"],["wad","application/x-doom"],["wadl","application/vnd.sun.wadl+xml"],["war","application/java-archive"],["wasm","application/wasm"],["wav","audio/x-wav"],["wax","audio/x-ms-wax"],["wbmp","image/vnd.wap.wbmp"],["wbs","application/vnd.criticaltools.wbs+xml"],["wbxml","application/wbxml"],["wcm","application/vnd.ms-works"],["wdb","application/vnd.ms-works"],["wdp","image/vnd.ms-photo"],["weba","audio/webm"],["webapp","application/x-web-app-manifest+json"],["webm","video/webm"],["webmanifest","application/manifest+json"],["webp","image/webp"],["wg","application/vnd.pmi.widget"],["wgt","application/widget"],["wks","application/vnd.ms-works"],["wm","video/x-ms-wm"],["wma","audio/x-ms-wma"],["wmd","application/x-ms-wmd"],["wmf","image/wmf"],["wml","text/vnd.wap.wml"],["wmlc","application/wmlc"],["wmls","text/vnd.wap.wmlscript"],["wmlsc","application/vnd.wap.wmlscriptc"],["wmv","video/x-ms-wmv"],["wmx","video/x-ms-wmx"],["wmz","application/x-msmetafile"],["woff","font/woff"],["woff2","font/woff2"],["word","application/msword"],["wpd","application/vnd.wordperfect"],["wpl","application/vnd.ms-wpl"],["wps","application/vnd.ms-works"],["wqd","application/vnd.wqd"],["wri","application/x-mswrite"],["wrl","model/vrml"],["wsc","message/vnd.wfa.wsc"],["wsdl","application/wsdl+xml"],["wspolicy","application/wspolicy+xml"],["wtb","application/vnd.webturbo"],["wvx","video/x-ms-wvx"],["x3d","model/x3d+xml"],["x3db","model/x3d+fastinfoset"],["x3dbz","model/x3d+binary"],["x3dv","model/x3d-vrml"],["x3dvz","model/x3d+vrml"],["x3dz","model/x3d+xml"],["x32","application/x-authorware-bin"],["x_b","model/vnd.parasolid.transmit.binary"],["x_t","model/vnd.parasolid.transmit.text"],["xaml","application/xaml+xml"],["xap","application/x-silverlight-app"],["xar","application/vnd.xara"],["xav","application/xcap-att+xml"],["xbap","application/x-ms-xbap"],["xbd","application/vnd.fujixerox.docuworks.binder"],["xbm","image/x-xbitmap"],["xca","application/xcap-caps+xml"],["xcs","application/calendar+xml"],["xdf","application/xcap-diff+xml"],["xdm","application/vnd.syncml.dm+xml"],["xdp","application/vnd.adobe.xdp+xml"],["xdssc","application/dssc+xml"],["xdw","application/vnd.fujixerox.docuworks"],["xel","application/xcap-el+xml"],["xenc","application/xenc+xml"],["xer","application/patch-ops-error+xml"],["xfdf","application/vnd.adobe.xfdf"],["xfdl","application/vnd.xfdl"],["xht","application/xhtml+xml"],["xhtml","application/xhtml+xml"],["xhvml","application/xv+xml"],["xif","image/vnd.xiff"],["xl","application/excel"],["xla","application/vnd.ms-excel"],["xlam","application/vnd.ms-excel.addin.macroEnabled.12"],["xlc","application/vnd.ms-excel"],["xlf","application/xliff+xml"],["xlm","application/vnd.ms-excel"],["xls","application/vnd.ms-excel"],["xlsb","application/vnd.ms-excel.sheet.binary.macroEnabled.12"],["xlsm","application/vnd.ms-excel.sheet.macroEnabled.12"],["xlsx","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],["xlt","application/vnd.ms-excel"],["xltm","application/vnd.ms-excel.template.macroEnabled.12"],["xltx","application/vnd.openxmlformats-officedocument.spreadsheetml.template"],["xlw","application/vnd.ms-excel"],["xm","audio/xm"],["xml","application/xml"],["xns","application/xcap-ns+xml"],["xo","application/vnd.olpc-sugar"],["xop","application/xop+xml"],["xpi","application/x-xpinstall"],["xpl","application/xproc+xml"],["xpm","image/x-xpixmap"],["xpr","application/vnd.is-xpr"],["xps","application/vnd.ms-xpsdocument"],["xpw","application/vnd.intercon.formnet"],["xpx","application/vnd.intercon.formnet"],["xsd","application/xml"],["xsl","application/xml"],["xslt","application/xslt+xml"],["xsm","application/vnd.syncml+xml"],["xspf","application/xspf+xml"],["xul","application/vnd.mozilla.xul+xml"],["xvm","application/xv+xml"],["xvml","application/xv+xml"],["xwd","image/x-xwindowdump"],["xyz","chemical/x-xyz"],["xz","application/x-xz"],["yaml","text/yaml"],["yang","application/yang"],["yin","application/yin+xml"],["yml","text/yaml"],["ymp","text/x-suse-ymp"],["z","application/x-compress"],["z1","application/x-zmachine"],["z2","application/x-zmachine"],["z3","application/x-zmachine"],["z4","application/x-zmachine"],["z5","application/x-zmachine"],["z6","application/x-zmachine"],["z7","application/x-zmachine"],["z8","application/x-zmachine"],["zaz","application/vnd.zzazz.deck+xml"],["zip","application/zip"],["zir","application/vnd.zul"],["zirz","application/vnd.zul"],["zmm","application/vnd.handheld-entertainment+xml"],["zsh","text/x-scriptzsh"]]);function Sm(t,e,n){const r=SQe(t),{webkitRelativePath:s}=t,o=typeof e=="string"?e:typeof s=="string"&&s.length>0?s:`./${t.name}`;return typeof r.path!="string"&&tY(r,"path",o),tY(r,"relativePath",o),r}function SQe(t){const{name:e}=t;if(e&&e.lastIndexOf(".")!==-1&&!t.type){const r=e.split(".").pop().toLowerCase(),s=wQe.get(r);s&&Object.defineProperty(t,"type",{value:s,writable:!1,configurable:!1,enumerable:!0})}return t}function tY(t,e,n){Object.defineProperty(t,e,{value:n,writable:!1,configurable:!1,enumerable:!0})}const CQe=[".DS_Store","Thumbs.db"];function kQe(t){return Jf(this,void 0,void 0,function*(){return Dw(t)&&EQe(t.dataTransfer)?AQe(t.dataTransfer,t.type):TQe(t)?MQe(t):Array.isArray(t)&&t.every(e=>"getFile"in e&&typeof e.getFile=="function")?jQe(t):[]})}function EQe(t){return Dw(t)}function TQe(t){return Dw(t)&&Dw(t.target)}function Dw(t){return typeof t=="object"&&t!==null}function MQe(t){return FM(t.target.files).map(e=>Sm(e))}function jQe(t){return Jf(this,void 0,void 0,function*(){return(yield Promise.all(t.map(n=>n.getFile()))).map(n=>Sm(n))})}function AQe(t,e){return Jf(this,void 0,void 0,function*(){if(t.items){const n=FM(t.items).filter(s=>s.kind==="file");if(e!=="drop")return n;const r=yield Promise.all(n.map(_Qe));return nY(fie(r))}return nY(FM(t.files).map(n=>Sm(n)))})}function nY(t){return t.filter(e=>CQe.indexOf(e.name)===-1)}function FM(t){if(t===null)return[];const e=[];for(let n=0;n<t.length;n++){const r=t[n];e.push(r)}return e}function _Qe(t){if(typeof t.webkitGetAsEntry!="function")return rY(t);const e=t.webkitGetAsEntry();return e&&e.isDirectory?pie(e):rY(t,e)}function fie(t){return t.reduce((e,n)=>[...e,...Array.isArray(n)?fie(n):[n]],[])}function rY(t,e){return Jf(this,void 0,void 0,function*(){var n;if(globalThis.isSecureContext&&typeof t.getAsFileSystemHandle=="function"){const o=yield t.getAsFileSystemHandle();if(o===null)throw new Error(`${t} is not a File`);if(o!==void 0){const i=yield o.getFile();return i.handle=o,Sm(i)}}const r=t.getAsFile();if(!r)throw new Error(`${t} is not a File`);return Sm(r,(n=e==null?void 0:e.fullPath)!==null&&n!==void 0?n:void 0)})}function RQe(t){return Jf(this,void 0,void 0,function*(){return t.isDirectory?pie(t):DQe(t)})}function pie(t){const e=t.createReader();return new Promise((n,r)=>{const s=[];function o(){e.readEntries(i=>Jf(this,void 0,void 0,function*(){if(i.length){const a=Promise.all(i.map(RQe));s.push(a),o()}else try{const a=yield Promise.all(s);n(a)}catch(a){r(a)}}),i=>{r(i)})}o()})}function DQe(t){return Jf(this,void 0,void 0,function*(){return new Promise((e,n)=>{t.file(r=>{const s=Sm(r,t.fullPath);e(s)},r=>{n(r)})})})}var Rb={},sY;function IQe(){return sY||(sY=1,Rb.__esModule=!0,Rb.default=function(t,e){if(t&&e){var n=Array.isArray(e)?e:e.split(",");if(n.length===0)return!0;var r=t.name||"",s=(t.type||"").toLowerCase(),o=s.replace(/\/.*$/,"");return n.some(function(i){var a=i.trim().toLowerCase();return a.charAt(0)==="."?r.toLowerCase().endsWith(a):a.endsWith("/*")?o===a.replace(/\/.*$/,""):s===a})}return!0}),Rb}var OQe=IQe();const fE=ks(OQe);function oY(t){return $Qe(t)||LQe(t)||mie(t)||NQe()}function NQe(){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 LQe(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function $Qe(t){if(Array.isArray(t))return zM(t)}function iY(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(t,s).enumerable})),n.push.apply(n,r)}return n}function aY(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?iY(Object(n),!0).forEach(function(r){hie(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):iY(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function hie(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Jg(t,e){return PQe(t)||zQe(t,e)||mie(t,e)||FQe()}function FQe(){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 mie(t,e){if(t){if(typeof t=="string")return zM(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return zM(t,e)}}function zM(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function zQe(t,e){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var r=[],s=!0,o=!1,i,a;try{for(n=n.call(t);!(s=(i=n.next()).done)&&(r.push(i.value),!(e&&r.length===e));s=!0);}catch(l){o=!0,a=l}finally{try{!s&&n.return!=null&&n.return()}finally{if(o)throw a}}return r}}function PQe(t){if(Array.isArray(t))return t}var BQe=typeof fE=="function"?fE:fE.default,HQe="file-invalid-type",UQe="file-too-large",VQe="file-too-small",qQe="too-many-files",WQe=function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",n=e.split(","),r=n.length>1?"one of ".concat(n.join(", ")):n[0];return{code:HQe,message:"File type must be ".concat(r)}},lY=function(e){return{code:UQe,message:"File is larger than ".concat(e," ").concat(e===1?"byte":"bytes")}},cY=function(e){return{code:VQe,message:"File is smaller than ".concat(e," ").concat(e===1?"byte":"bytes")}},YQe={code:qQe,message:"Too many files"};function GQe(t){return t.type===""&&typeof t.getAsFile=="function"}function gie(t,e){var n=t.type==="application/x-moz-file"||BQe(t,e)||GQe(t);return[n,n?null:WQe(e)]}function yie(t,e,n){if(ff(t.size))if(ff(e)&&ff(n)){if(t.size>n)return[!1,lY(n)];if(t.size<e)return[!1,cY(e)]}else{if(ff(e)&&t.size<e)return[!1,cY(e)];if(ff(n)&&t.size>n)return[!1,lY(n)]}return[!0,null]}function ff(t){return t!=null}function KQe(t){var e=t.files,n=t.accept,r=t.minSize,s=t.maxSize,o=t.multiple,i=t.maxFiles,a=t.validator;return!o&&e.length>1||o&&i>=1&&e.length>i?!1:e.every(function(l){var c=gie(l,n),u=Jg(c,1),f=u[0],h=yie(l,r,s),m=Jg(h,1),y=m[0],v=a?a(l):null;return f&&y&&!v})}function Iw(t){return typeof t.isPropagationStopped=="function"?t.isPropagationStopped():typeof t.cancelBubble<"u"?t.cancelBubble:!1}function S0(t){return t.dataTransfer?Array.prototype.some.call(t.dataTransfer.types,function(e){return e==="Files"||e==="application/x-moz-file"}):!!t.target&&!!t.target.files}function uY(t){t.preventDefault()}function XQe(t){return t.indexOf("MSIE")!==-1||t.indexOf("Trident/")!==-1}function ZQe(t){return t.indexOf("Edge/")!==-1}function QQe(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return XQe(t)||ZQe(t)}function Ja(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return function(r){for(var s=arguments.length,o=new Array(s>1?s-1:0),i=1;i<s;i++)o[i-1]=arguments[i];return e.some(function(a){return!Iw(r)&&a&&a.apply(void 0,[r].concat(o)),Iw(r)})}}function JQe(){return"showOpenFilePicker"in window}function eJe(t){if(ff(t)){var e=Object.entries(t).filter(function(n){var r=Jg(n,2),s=r[0],o=r[1],i=!0;return vie(s)||(console.warn('Skipped "'.concat(s,'" 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.')),i=!1),(!Array.isArray(o)||!o.every(bie))&&(console.warn('Skipped "'.concat(s,'" because an invalid file extension was provided.')),i=!1),i}).reduce(function(n,r){var s=Jg(r,2),o=s[0],i=s[1];return aY(aY({},n),{},hie({},o,i))},{});return[{description:"Files",accept:e}]}return t}function tJe(t){if(ff(t))return Object.entries(t).reduce(function(e,n){var r=Jg(n,2),s=r[0],o=r[1];return[].concat(oY(e),[s],oY(o))},[]).filter(function(e){return vie(e)||bie(e)}).join(",")}function nJe(t){return t instanceof DOMException&&(t.name==="AbortError"||t.code===t.ABORT_ERR)}function rJe(t){return t instanceof DOMException&&(t.name==="SecurityError"||t.code===t.SECURITY_ERR)}function vie(t){return t==="audio/*"||t==="video/*"||t==="image/*"||t==="text/*"||t==="application/*"||/\w+\/[-+.\w]+/g.test(t)}function bie(t){return/^.*\.[\w]+$/.test(t)}var sJe=["children"],oJe=["open"],iJe=["refKey","role","onKeyDown","onFocus","onBlur","onClick","onDragEnter","onDragOver","onDragLeave","onDrop"],aJe=["refKey","onChange","onClick"];function dY(t){return uJe(t)||cJe(t)||xie(t)||lJe()}function lJe(){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 cJe(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function uJe(t){if(Array.isArray(t))return PM(t)}function pE(t,e){return pJe(t)||fJe(t,e)||xie(t,e)||dJe()}function dJe(){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 xie(t,e){if(t){if(typeof t=="string")return PM(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return PM(t,e)}}function PM(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function fJe(t,e){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var r=[],s=!0,o=!1,i,a;try{for(n=n.call(t);!(s=(i=n.next()).done)&&(r.push(i.value),!(e&&r.length===e));s=!0);}catch(l){o=!0,a=l}finally{try{!s&&n.return!=null&&n.return()}finally{if(o)throw a}}return r}}function pJe(t){if(Array.isArray(t))return t}function fY(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(t,s).enumerable})),n.push.apply(n,r)}return n}function _r(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?fY(Object(n),!0).forEach(function(r){BM(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):fY(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function BM(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Ow(t,e){if(t==null)return{};var n=hJe(t,e),r,s;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(s=0;s<o.length;s++)r=o[s],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function hJe(t,e){if(t==null)return{};var n={},r=Object.keys(t),s,o;for(o=0;o<r.length;o++)s=r[o],!(e.indexOf(s)>=0)&&(n[s]=t[s]);return n}var sI=S.forwardRef(function(t,e){var n=t.children,r=Ow(t,sJe),s=Sie(r),o=s.open,i=Ow(s,oJe);return S.useImperativeHandle(e,function(){return{open:o}},[o]),It.createElement(S.Fragment,null,n(_r(_r({},i),{},{open:o})))});sI.displayName="Dropzone";var wie={disabled:!1,getFilesFromEvent:kQe,maxSize:1/0,minSize:0,multiple:!0,maxFiles:0,preventDropOnDocument:!0,noClick:!1,noKeyboard:!1,noDrag:!1,noDragEventsBubbling:!1,validator:null,useFsAccessApi:!1,autoFocus:!1};sI.defaultProps=wie;sI.propTypes={children:yr.func,accept:yr.objectOf(yr.arrayOf(yr.string)),multiple:yr.bool,preventDropOnDocument:yr.bool,noClick:yr.bool,noKeyboard:yr.bool,noDrag:yr.bool,noDragEventsBubbling:yr.bool,minSize:yr.number,maxSize:yr.number,maxFiles:yr.number,disabled:yr.bool,getFilesFromEvent:yr.func,onFileDialogCancel:yr.func,onFileDialogOpen:yr.func,useFsAccessApi:yr.bool,autoFocus:yr.bool,onDragEnter:yr.func,onDragLeave:yr.func,onDragOver:yr.func,onDrop:yr.func,onDropAccepted:yr.func,onDropRejected:yr.func,onError:yr.func,validator:yr.func};var HM={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,isDragGlobal:!1,acceptedFiles:[],fileRejections:[]};function Sie(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},e=_r(_r({},wie),t),n=e.accept,r=e.disabled,s=e.getFilesFromEvent,o=e.maxSize,i=e.minSize,a=e.multiple,l=e.maxFiles,c=e.onDragEnter,u=e.onDragLeave,f=e.onDragOver,h=e.onDrop,m=e.onDropAccepted,y=e.onDropRejected,v=e.onFileDialogCancel,b=e.onFileDialogOpen,w=e.useFsAccessApi,C=e.autoFocus,k=e.preventDropOnDocument,E=e.noClick,j=e.noKeyboard,A=e.noDrag,M=e.noDragEventsBubbling,_=e.onError,D=e.validator,R=S.useMemo(function(){return tJe(n)},[n]),N=S.useMemo(function(){return eJe(n)},[n]),z=S.useMemo(function(){return typeof b=="function"?b:pY},[b]),B=S.useMemo(function(){return typeof v=="function"?v:pY},[v]),L=S.useRef(null),P=S.useRef(null),I=S.useReducer(mJe,HM),H=pE(I,2),$=H[0],V=H[1],q=$.isFocused,U=$.isFileDialogActive,W=S.useRef(typeof window<"u"&&window.isSecureContext&&w&&JQe()),Y=function(){!W.current&&U&&setTimeout(function(){if(P.current){var Fe=P.current.files;Fe.length||(V({type:"closeDialog"}),B())}},300)};S.useEffect(function(){return window.addEventListener("focus",Y,!1),function(){window.removeEventListener("focus",Y,!1)}},[P,U,B,W]);var G=S.useRef([]),K=S.useRef([]),Q=function(Fe){L.current&&L.current.contains(Fe.target)||(Fe.preventDefault(),G.current=[])};S.useEffect(function(){return k&&(document.addEventListener("dragover",uY,!1),document.addEventListener("drop",Q,!1)),function(){k&&(document.removeEventListener("dragover",uY),document.removeEventListener("drop",Q))}},[L,k]),S.useEffect(function(){var ge=function($e){K.current=[].concat(dY(K.current),[$e.target]),S0($e)&&V({isDragGlobal:!0,type:"setDragGlobal"})},Fe=function($e){K.current=K.current.filter(function(pt){return pt!==$e.target&&pt!==null}),!(K.current.length>0)&&V({isDragGlobal:!1,type:"setDragGlobal"})},Se=function(){K.current=[],V({isDragGlobal:!1,type:"setDragGlobal"})},qe=function(){K.current=[],V({isDragGlobal:!1,type:"setDragGlobal"})};return document.addEventListener("dragenter",ge,!1),document.addEventListener("dragleave",Fe,!1),document.addEventListener("dragend",Se,!1),document.addEventListener("drop",qe,!1),function(){document.removeEventListener("dragenter",ge),document.removeEventListener("dragleave",Fe),document.removeEventListener("dragend",Se),document.removeEventListener("drop",qe)}},[L]),S.useEffect(function(){return!r&&C&&L.current&&L.current.focus(),function(){}},[L,C,r]);var Z=S.useCallback(function(ge){_?_(ge):console.error(ge)},[_]),J=S.useCallback(function(ge){ge.preventDefault(),ge.persist(),Ze(ge),G.current=[].concat(dY(G.current),[ge.target]),S0(ge)&&Promise.resolve(s(ge)).then(function(Fe){if(!(Iw(ge)&&!M)){var Se=Fe.length,qe=Se>0&&KQe({files:Fe,accept:R,minSize:i,maxSize:o,multiple:a,maxFiles:l,validator:D}),ot=Se>0&&!qe;V({isDragAccept:qe,isDragReject:ot,isDragActive:!0,type:"setDraggedFiles"}),c&&c(ge)}}).catch(function(Fe){return Z(Fe)})},[s,c,Z,M,R,i,o,a,l,D]),ne=S.useCallback(function(ge){ge.preventDefault(),ge.persist(),Ze(ge);var Fe=S0(ge);if(Fe&&ge.dataTransfer)try{ge.dataTransfer.dropEffect="copy"}catch{}return Fe&&f&&f(ge),!1},[f,M]),se=S.useCallback(function(ge){ge.preventDefault(),ge.persist(),Ze(ge);var Fe=G.current.filter(function(qe){return L.current&&L.current.contains(qe)}),Se=Fe.indexOf(ge.target);Se!==-1&&Fe.splice(Se,1),G.current=Fe,!(Fe.length>0)&&(V({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),S0(ge)&&u&&u(ge))},[L,u,M]),ce=S.useCallback(function(ge,Fe){var Se=[],qe=[];ge.forEach(function(ot){var $e=gie(ot,R),pt=pE($e,2),gt=pt[0],Pt=pt[1],at=yie(ot,i,o),nt=pE(at,2),We=nt[0],At=nt[1],St=D?D(ot):null;if(gt&&We&&!St)Se.push(ot);else{var Ot=[Pt,At];St&&(Ot=Ot.concat(St)),qe.push({file:ot,errors:Ot.filter(function(Tt){return Tt})})}}),(!a&&Se.length>1||a&&l>=1&&Se.length>l)&&(Se.forEach(function(ot){qe.push({file:ot,errors:[YQe]})}),Se.splice(0)),V({acceptedFiles:Se,fileRejections:qe,type:"setFiles"}),h&&h(Se,qe,Fe),qe.length>0&&y&&y(qe,Fe),Se.length>0&&m&&m(Se,Fe)},[V,a,R,i,o,l,h,m,y,D]),fe=S.useCallback(function(ge){ge.preventDefault(),ge.persist(),Ze(ge),G.current=[],S0(ge)&&Promise.resolve(s(ge)).then(function(Fe){Iw(ge)&&!M||ce(Fe,ge)}).catch(function(Fe){return Z(Fe)}),V({type:"reset"})},[s,ce,Z,M]),le=S.useCallback(function(){if(W.current){V({type:"openDialog"}),z();var ge={multiple:a,types:N};window.showOpenFilePicker(ge).then(function(Fe){return s(Fe)}).then(function(Fe){ce(Fe,null),V({type:"closeDialog"})}).catch(function(Fe){nJe(Fe)?(B(Fe),V({type:"closeDialog"})):rJe(Fe)?(W.current=!1,P.current?(P.current.value=null,P.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(Fe)});return}P.current&&(V({type:"openDialog"}),z(),P.current.value=null,P.current.click())},[V,z,B,w,ce,Z,N,a]),be=S.useCallback(function(ge){!L.current||!L.current.isEqualNode(ge.target)||(ge.key===" "||ge.key==="Enter"||ge.keyCode===32||ge.keyCode===13)&&(ge.preventDefault(),le())},[L,le]),je=S.useCallback(function(){V({type:"focus"})},[]),pe=S.useCallback(function(){V({type:"blur"})},[]),_e=S.useCallback(function(){E||(QQe()?setTimeout(le,0):le())},[E,le]),Ce=function(Fe){return r?null:Fe},Te=function(Fe){return j?null:Ce(Fe)},Ae=function(Fe){return A?null:Ce(Fe)},Ze=function(Fe){M&&Fe.stopPropagation()},He=S.useMemo(function(){return function(){var ge=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},Fe=ge.refKey,Se=Fe===void 0?"ref":Fe,qe=ge.role,ot=ge.onKeyDown,$e=ge.onFocus,pt=ge.onBlur,gt=ge.onClick,Pt=ge.onDragEnter,at=ge.onDragOver,nt=ge.onDragLeave,We=ge.onDrop,At=Ow(ge,iJe);return _r(_r(BM({onKeyDown:Te(Ja(ot,be)),onFocus:Te(Ja($e,je)),onBlur:Te(Ja(pt,pe)),onClick:Ce(Ja(gt,_e)),onDragEnter:Ae(Ja(Pt,J)),onDragOver:Ae(Ja(at,ne)),onDragLeave:Ae(Ja(nt,se)),onDrop:Ae(Ja(We,fe)),role:typeof qe=="string"&&qe!==""?qe:"presentation"},Se,L),!r&&!j?{tabIndex:0}:{}),At)}},[L,be,je,pe,_e,J,ne,se,fe,j,A,r]),lt=S.useCallback(function(ge){ge.stopPropagation()},[]),Ye=S.useMemo(function(){return function(){var ge=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},Fe=ge.refKey,Se=Fe===void 0?"ref":Fe,qe=ge.onChange,ot=ge.onClick,$e=Ow(ge,aJe),pt=BM({accept:R,multiple:a,type:"file",style:{border:0,clip:"rect(0, 0, 0, 0)",clipPath:"inset(50%)",height:"1px",margin:"0 -1px -1px 0",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap"},onChange:Ce(Ja(qe,fe)),onClick:Ce(Ja(ot,lt)),tabIndex:-1},Se,P);return _r(_r({},pt),$e)}},[P,n,a,fe,r]);return _r(_r({},$),{},{isFocused:q&&!r,getRootProps:He,getInputProps:Ye,rootRef:L,inputRef:P,open:Ce(le)})}function mJe(t,e){switch(e.type){case"focus":return _r(_r({},t),{},{isFocused:!0});case"blur":return _r(_r({},t),{},{isFocused:!1});case"openDialog":return _r(_r({},HM),{},{isFileDialogActive:!0});case"closeDialog":return _r(_r({},t),{},{isFileDialogActive:!1});case"setDraggedFiles":return _r(_r({},t),{},{isDragActive:e.isDragActive,isDragAccept:e.isDragAccept,isDragReject:e.isDragReject});case"setFiles":return _r(_r({},t),{},{acceptedFiles:e.acceptedFiles,fileRejections:e.fileRejections,isDragReject:!1});case"setDragGlobal":return _r(_r({},t),{},{isDragGlobal:e.isDragGlobal});case"reset":return _r({},HM);default:return t}}function pY(){}const[gJe,yJe]=zs("Dropzone component was not found in tree");var e2={root:"m_d46a4834",inner:"m_b85f7144",fullScreen:"m_96f6e9ad",dropzone:"m_7946116d"};function oI(t){const e=n=>{const{children:r,...s}=we(`Dropzone${N$(t)}`,{},n),o=yJe(),i=i2(r)?r:d.jsx("span",{children:r});return o[t]?S.cloneElement(i,s):null};return e.displayName=`@mantine/dropzone/${N$(t)}`,e}const vJe=oI("accept"),bJe=oI("reject"),xJe=oI("idle"),wJe={multiple:!0,maxSize:1/0,activateOnClick:!0,activateOnDrag:!0,dragEventsBubbling:!0,activateOnKeyboard:!0,useFsAccessApi:!0,variant:"light",rejectColor:"red"},SJe=(t,{radius:e,variant:n,acceptColor:r,rejectColor:s})=>{const o=t.variantColorResolver({color:r||t.primaryColor,theme:t,variant:n}),i=t.variantColorResolver({color:s||"red",theme:t,variant:n});return{root:{"--dropzone-radius":Wn(e),"--dropzone-accept-color":o.color,"--dropzone-accept-bg":o.background,"--dropzone-reject-color":i.color,"--dropzone-reject-bg":i.background}}},$d=Be((t,e)=>{const n=we("Dropzone",wJe,t),{classNames:r,className:s,style:o,styles:i,unstyled:a,vars:l,radius:c,disabled:u,loading:f,multiple:h,maxSize:m,accept:y,children:v,onDropAny:b,onDrop:w,onReject:C,openRef:k,name:E,maxFiles:j,autoFocus:A,activateOnClick:M,activateOnDrag:_,dragEventsBubbling:D,activateOnKeyboard:R,onDragEnter:N,onDragLeave:z,onDragOver:B,onFileDialogCancel:L,onFileDialogOpen:P,preventDropOnDocument:I,useFsAccessApi:H,getFilesFromEvent:$,validator:V,rejectColor:q,acceptColor:U,enablePointerEvents:W,loaderProps:Y,inputProps:G,mod:K,attributes:Q,...Z}=n,J=Et({name:"Dropzone",classes:e2,props:n,className:s,style:o,classNames:r,styles:i,unstyled:a,attributes:Q,vars:l,varsResolver:SJe}),{getRootProps:ne,getInputProps:se,isDragAccept:ce,isDragReject:fe,isDragActive:le,open:be}=Sie({onDrop:b,onDropAccepted:w,onDropRejected:C,disabled:u||f,accept:Array.isArray(y)?y.reduce((Ce,Te)=>({...Ce,[Te]:[]}),{}):y,multiple:h,maxSize:m,maxFiles:j,autoFocus:A,noClick:!M,noDrag:!_,noDragEventsBubbling:!D,noKeyboard:!R,onDragEnter:N,onDragLeave:z,onDragOver:B,onFileDialogCancel:L,onFileDialogOpen:P,preventDropOnDocument:I,useFsAccessApi:H,validator:V,...$?{getFilesFromEvent:$}:null});pg(k,be);const je=le&&ce,pe=le&&fe,_e=!je&&!pe;return d.jsx(gJe,{value:{accept:je,reject:pe,idle:_e},children:d.jsxs(ie,{...ne(),...J("root",{focusable:!0}),...Z,mod:[{accept:je,reject:pe,idle:_e,disabled:u,loading:f,"activate-on-click":M},K],children:[d.jsx(y2,{visible:f,overlayProps:{radius:c},unstyled:a,loaderProps:Y}),d.jsx("input",{...se(G),name:E}),d.jsx("div",{...J("inner"),ref:e,"data-enable-pointer-events":W||void 0,children:v})]})})});$d.classes=e2;$d.displayName="@mantine/dropzone/Dropzone";$d.Accept=vJe;$d.Idle=xJe;$d.Reject=bJe;const CJe={maxSize:1/0,activateOnDrag:!0,dragEventsBubbling:!0,activateOnKeyboard:!0,active:!0,zIndex:Ps("max"),withinPortal:!0},iI=Be((t,e)=>{const n=we("DropzoneFullScreen",CJe,t),{classNames:r,className:s,style:o,styles:i,unstyled:a,vars:l,active:c,onDrop:u,onReject:f,zIndex:h,withinPortal:m,portalProps:y,attributes:v,...b}=n,w=Et({name:"DropzoneFullScreen",classes:e2,props:n,className:s,style:o,classNames:r,styles:i,unstyled:a,attributes:v,rootSelector:"fullScreen"}),{resolvedClassNames:C,resolvedStyles:k}=Ti({classNames:r,styles:i,props:n}),[E,j]=S.useState(0),[A,{open:M,close:_}]=Rs(!1),D=N=>{var z;(z=N.dataTransfer)!=null&&z.types.includes("Files")&&(j(B=>B+1),M())},R=()=>{j(N=>N-1)};return S.useEffect(()=>{E===0&&_()},[E]),S.useEffect(()=>{if(c)return document.addEventListener("dragenter",D,!1),document.addEventListener("dragleave",R,!1),()=>{document.removeEventListener("dragenter",D,!1),document.removeEventListener("dragleave",R,!1)}},[c]),d.jsx(jc,{...y,withinPortal:m,children:d.jsx(ie,{ref:e,...w("fullScreen",{style:{opacity:A?1:0,pointerEvents:A?"all":"none",zIndex:h}}),children:d.jsx($d,{activateOnClick:!1,...b,classNames:C,styles:k,unstyled:a,className:e2.dropzone,onDrop:N=>{u==null||u(N),_(),j(0)},onReject:N=>{f==null||f(N),_(),j(0)}})})})});iI.classes=e2;iI.displayName="@mantine/dropzone/DropzoneFullScreen";$d.FullScreen=iI;const kJe=$d,EJe="/assets/drop-file-DBaKofeK.svg",TJe=t=>{const e=me.c(20),{onDrop:n,paddingTop:r}=t,s=r===void 0?0:r,{t:o}=Le(),[i,a]=S.useState(!1),[l,c]=S.useState(!1),u=S.useRef(0);let f;e[0]!==n?(f=_=>{n(_),a(!1)},e[0]=n,e[1]=f):f=e[1];const h=f;let m;e[2]!==l?(m=_=>{var D;_.preventDefault(),(D=_==null?void 0:_.dataTransfer)!=null&&D.types.includes("Files")&&_.dataTransfer&&(l?_.dataTransfer.dropEffect="copy":_.dataTransfer.dropEffect="none")},e[2]=l,e[3]=m):m=e[3];const y=m;let v,b;e[4]!==y?(v=()=>{const _=N=>{var z;N.preventDefault(),(z=N==null?void 0:N.dataTransfer)!=null&&z.types.includes("Files")&&(u.current=u.current+1,a(!0),N.dataTransfer&&(N.dataTransfer.dropEffect="none"))},D=N=>{var z;N.preventDefault(),(z=N==null?void 0:N.dataTransfer)!=null&&z.types.includes("Files")&&(u.current=u.current-1,u.current===0&&a(!1))},R=()=>{u.current=0,a(!1)};return window.addEventListener("dragenter",_),window.addEventListener("dragleave",D),window.addEventListener("dragover",y),document.addEventListener("drop",R),()=>{window.removeEventListener("dragenter",_),window.removeEventListener("dragleave",D),window.removeEventListener("dragover",y),document.removeEventListener("drop",R)}},b=[y],e[4]=y,e[5]=v,e[6]=b):(v=e[5],b=e[6]),S.useEffect(v,b);const w=s+75,C=i?"auto":"none";let k;e[7]!==w||e[8]!==C?(k={...MJe,top:w,pointerEvents:C},e[7]=w,e[8]=C,e[9]=k):k=e[9];let E,j;e[10]===Symbol.for("react.memo_cache_sentinel")?(j=()=>c(!0),E=()=>c(!1),e[10]=E,e[11]=j):(E=e[10],j=e[11]);let A;e[12]!==i||e[13]!==l||e[14]!==o?(A=i&&d.jsx(xe,{styles:{root:{...jJe,backgroundColor:`rgba(231, 245, 255, ${l?.92:.62})`}},children:d.jsxs(bt,{justify:"center",align:"center",children:[d.jsx("img",{src:EJe,alt:o("drop file")}),d.jsx(ue,{fz:20,lh:"22px",mt:16,c:"#339AF0",children:o("modals.text.dropZoneMessage")})]})}),e[12]=i,e[13]=l,e[14]=o,e[15]=A):A=e[15];let M;return e[16]!==h||e[17]!==A||e[18]!==k?(M=d.jsx(d.Fragment,{children:d.jsx(kJe,{onDrop:h,style:k,preventDropOnDocument:!0,onDragEnter:j,onDragLeave:E,children:A})}),e[16]=h,e[17]=A,e[18]=k,e[19]=M):M=e[19],M},Cie={position:"absolute",top:0,left:0,right:0,bottom:0},MJe={...Cie,zIndex:15,border:"none",backgroundColor:"transparent"},jJe={...Cie,color:"#000",display:"flex",alignItems:"center",justifyContent:"center",zIndex:10,border:"4px solid #A5D8FF",borderBottomRightRadius:"8px",borderBottomLeftRadius:"8px"},AJe="_root_4pck3_1",_Je="_pill_4pck3_10",RJe="_pill_active_4pck3_22",DJe="_pill_last_4pck3_32",IJe="_selectableTextMobile_4pck3_36",OJe="_selectableText_4pck3_36",NJe="_collapsedItem_4pck3_74",LJe="_collapsedCounter_4pck3_84",$Je="_dragItemText_4pck3_95",kc={root:AJe,pill:_Je,pill_active:RJe,pill_last:DJe,selectableTextMobile:IJe,selectableText:OJe,collapsedItem:NJe,collapsedCounter:LJe,dragItemText:$Je};function kie(t,e,n){const r=t.slice();return r.splice(n<0?r.length+n:n,0,r.splice(e,1)[0]),r}function FJe(t,e){return t.reduce((n,r,s)=>{const o=e.get(r);return o&&(n[s]=o),n},Array(t.length))}function Db(t){return t!==null&&t>=0}function zJe(t,e){if(t===e)return!0;if(t.length!==e.length)return!1;for(let n=0;n<t.length;n++)if(t[n]!==e[n])return!1;return!0}function PJe(t){return typeof t=="boolean"?{draggable:t,droppable:t}:t}const Eie=t=>{let{rects:e,activeIndex:n,overIndex:r,index:s}=t;const o=kie(e,r,n),i=e[s],a=o[s];return!a||!i?null:{x:a.left-i.left,y:a.top-i.top,scaleX:a.width/i.width,scaleY:a.height/i.height}},Ib={scaleX:1,scaleY:1},BJe=t=>{var e;let{activeIndex:n,activeNodeRect:r,index:s,rects:o,overIndex:i}=t;const a=(e=o[n])!=null?e:r;if(!a)return null;if(s===n){const c=o[i];return c?{x:0,y:n<i?c.top+c.height-(a.top+a.height):c.top-a.top,...Ib}:null}const l=HJe(o,s,n);return s>n&&s<=i?{x:0,y:-a.height-l,...Ib}:s<n&&s>=i?{x:0,y:a.height+l,...Ib}:{x:0,y:0,...Ib}};function HJe(t,e,n){const r=t[e],s=t[e-1],o=t[e+1];return r?n<e?s?r.top-(s.top+s.height):o?o.top-(r.top+r.height):0:o?o.top-(r.top+r.height):s?r.top-(s.top+s.height):0:0}const Tie="Sortable",Mie=It.createContext({activeIndex:-1,containerId:Tie,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:Eie,disabled:{draggable:!1,droppable:!1}});function UJe(t){let{children:e,id:n,items:r,strategy:s=Eie,disabled:o=!1}=t;const{active:i,dragOverlay:a,droppableRects:l,over:c,measureDroppableContainers:u}=Wee(),f=W2(Tie,n),h=a.rect!==null,m=S.useMemo(()=>r.map(A=>typeof A=="object"&&"id"in A?A.id:A),[r]),y=i!=null,v=i?m.indexOf(i.id):-1,b=c?m.indexOf(c.id):-1,w=S.useRef(m),C=!zJe(m,w.current),k=b!==-1&&v===-1||C,E=PJe(o);La(()=>{C&&y&&u(m)},[C,m,y,u]),S.useEffect(()=>{w.current=m},[m]);const j=S.useMemo(()=>({activeIndex:v,containerId:f,disabled:E,disableTransforms:k,items:m,overIndex:b,useDragOverlay:h,sortedRects:FJe(m,l),strategy:s}),[v,f,E.draggable,E.droppable,k,m,b,l,h,s]);return It.createElement(Mie.Provider,{value:j},e)}const VJe=t=>{let{id:e,items:n,activeIndex:r,overIndex:s}=t;return kie(n,r,s).indexOf(e)},qJe=t=>{let{containerId:e,isSorting:n,wasDragging:r,index:s,items:o,newIndex:i,previousItems:a,previousContainerId:l,transition:c}=t;return!c||!r||a!==o&&s===i?!1:n?!0:i!==s&&e===l},WJe={duration:200,easing:"ease"},jie="transform",YJe=Ic.Transition.toString({property:jie,duration:0,easing:"linear"}),GJe={roleDescription:"sortable"};function KJe(t){let{disabled:e,index:n,node:r,rect:s}=t;const[o,i]=S.useState(null),a=S.useRef(n);return La(()=>{if(!e&&n!==a.current&&r.current){const l=s.current;if(l){const c=Vm(r.current,{ignoreTransform:!0}),u={x:l.left-c.left,y:l.top-c.top,scaleX:l.width/c.width,scaleY:l.height/c.height};(u.x||u.y)&&i(u)}}n!==a.current&&(a.current=n)},[e,n,r,s]),S.useEffect(()=>{o&&i(null)},[o]),o}function XJe(t){let{animateLayoutChanges:e=qJe,attributes:n,disabled:r,data:s,getNewIndex:o=VJe,id:i,strategy:a,resizeObserverConfig:l,transition:c=WJe}=t;const{items:u,containerId:f,activeIndex:h,disabled:m,disableTransforms:y,sortedRects:v,overIndex:b,useDragOverlay:w,strategy:C}=S.useContext(Mie),k=ZJe(r,m),E=u.indexOf(i),j=S.useMemo(()=>({sortable:{containerId:f,index:E,items:u},...s}),[f,s,E,u]),A=S.useMemo(()=>u.slice(u.indexOf(i)),[u,i]),{rect:M,node:_,isOver:D,setNodeRef:R}=mR({id:i,data:j,disabled:k.droppable,resizeObserverConfig:{updateMeasurementsFor:A,...l}}),{active:N,activatorEvent:z,activeNodeRect:B,attributes:L,setNodeRef:P,listeners:I,isDragging:H,over:$,setActivatorNodeRef:V,transform:q}=mS({id:i,data:j,attributes:{...GJe,...n},disabled:k.draggable}),U=LMe(R,P),W=!!N,Y=W&&!y&&Db(h)&&Db(b),G=!w&&H,K=G&&Y?q:null,Z=Y?K??(a??C)({rects:v,activeNodeRect:B,activeIndex:h,overIndex:b,index:E}):null,J=Db(h)&&Db(b)?o({id:i,items:u,activeIndex:h,overIndex:b}):E,ne=N==null?void 0:N.id,se=S.useRef({activeId:ne,items:u,newIndex:J,containerId:f}),ce=u!==se.current.items,fe=e({active:N,containerId:f,isDragging:H,isSorting:W,id:i,index:E,items:u,newIndex:se.current.newIndex,previousItems:se.current.items,previousContainerId:se.current.containerId,transition:c,wasDragging:se.current.activeId!=null}),le=KJe({disabled:!fe,index:E,node:_,rect:M});return S.useEffect(()=>{W&&se.current.newIndex!==J&&(se.current.newIndex=J),f!==se.current.containerId&&(se.current.containerId=f),u!==se.current.items&&(se.current.items=u)},[W,J,f,u]),S.useEffect(()=>{if(ne===se.current.activeId)return;if(ne&&!se.current.activeId){se.current.activeId=ne;return}const je=setTimeout(()=>{se.current.activeId=ne},50);return()=>clearTimeout(je)},[ne]),{active:N,activeIndex:h,attributes:L,data:j,rect:M,index:E,newIndex:J,items:u,isOver:D,isSorting:W,isDragging:H,listeners:I,node:_,overIndex:b,over:$,setNodeRef:U,setActivatorNodeRef:V,setDroppableNodeRef:R,setDraggableNodeRef:P,transform:le??Z,transition:be()};function be(){if(le||ce&&se.current.newIndex===E)return YJe;if(!(G&&!dS(z)||!c)&&(W||fe))return Ic.Transition.toString({...c,property:jie})}}function ZJe(t,e){var n,r;return typeof t=="boolean"?{draggable:t,droppable:!1}:{draggable:(n=t==null?void 0:t.draggable)!=null?n:e.draggable,droppable:(r=t==null?void 0:t.droppable)!=null?r:e.droppable}}Zn.Down,Zn.Right,Zn.Up,Zn.Left;const QJe=({text:t})=>{const e=re(op),n=S.useMemo(()=>{if(!t)return"";const{name:o,email:i}=cr(t),a=e[t.toLowerCase()];return a&&a.name?a.name:o||i},[t,e.length]),r=S.useRef(null),s=xt(1024);return d.jsx("span",{className:s?kc.selectableTextMobile:kc.selectableText,ref:r,children:n})},JJe=t=>{const e=me.c(61),{item:n,handleValueRemove:r,isActive:s,refElement:o,onKeyDown:i,onClick:a,isLastSelected:l,pillIsDragging:c,sourceField:u,isMultiSelected:f,selectedEmails:h,contextMenuOpened:m,contactCardRef:y}=t,v=`${n}-${u}`;let b;e[0]!==n||e[1]!==u?(b={id:n,sourceField:u},e[0]=n,e[1]=u,e[2]=b):b=e[2];let w;e[3]!==v||e[4]!==b?(w={id:v,data:b},e[3]=v,e[4]=b,e[5]=w):w=e[5];const{attributes:C,listeners:k,setNodeRef:E,transform:j,transition:A,isDragging:M}=XJe(w),_=`${n}-${u}`;let D;e[6]!==f||e[7]!==n||e[8]!==h?(D=f&&h&&h.length>1?h:[n],e[6]=f,e[7]=n,e[8]=h,e[9]=D):D=e[9];let R;e[10]!==f||e[11]!==n||e[12]!==u||e[13]!==D?(R={id:n,sourceField:u,type:"email-pill",multiSelected:f,multiSelectedEmails:D},e[10]=f,e[11]=n,e[12]=u,e[13]=D,e[14]=R):R=e[14];let N;e[15]!==_||e[16]!==R?(N={id:_,data:R},e[15]=_,e[16]=R,e[17]=N):N=e[17];const{attributes:z,listeners:B,setNodeRef:L,isDragging:P}=mS(N),I=xt(1024);let H;e[18]!==n?(H=cr(n),e[18]=n,e[19]=H):H=e[19];const{name:$,email:V}=H;let q;e[20]!==L||e[21]!==E?(q=Te=>{E(Te),L(Te)},e[20]=L,e[21]=E,e[22]=q):q=e[22];const U=q,W=m[V]===!0,Y=M||P||c?.5:void 0;let G;e[23]!==j?(G=Ic.Translate.toString(j),e[23]=j,e[24]=G):G=e[24];let K;e[25]!==Y||e[26]!==G||e[27]!==A?(K={position:"relative",display:"block",flex:0,opacity:Y,transform:G,transition:A},e[25]=Y,e[26]=G,e[27]=A,e[28]=K):K=e[28];const Q=I?24:26,Z=P||M||W,J=`${kc.pill} ${s?kc.pill_active:""} ${l?kc.pill_last:""}`,ne=I?24:26;let se;e[29]===Symbol.for("react.memo_cache_sentinel")?(se={height:"inherit!important"},e[29]=se):se=e[29];const ce=I?22:24;let fe;e[30]!==V||e[31]!==ce?(fe=d.jsx(cp,{label:V,size:ce}),e[30]=V,e[31]=ce,e[32]=fe):fe=e[32];const le=$||V;let be;e[33]!==le?(be=d.jsx(QJe,{text:le}),e[33]=le,e[34]=be):be=e[34];let je;e[35]!==fe||e[36]!==be?(je=d.jsxs(xe,{justify:"center",wrap:"nowrap",sx:se,children:[fe,be]}),e[35]=fe,e[36]=be,e[37]=je):je=e[37];let pe;e[38]!==r||e[39]!==n||e[40]!==a||e[41]!==i||e[42]!==o||e[43]!==J||e[44]!==ne||e[45]!==je?(pe=d.jsx(El,{className:J,ref:o,h:ne,withRemoveButton:!0,onRemove:r,onClick:a,onKeyDown:i,tabIndex:0,children:je},n),e[38]=r,e[39]=n,e[40]=a,e[41]=i,e[42]=o,e[43]=J,e[44]=ne,e[45]=je,e[46]=pe):pe=e[46];let _e;e[47]!==y||e[48]!==V||e[49]!==Z||e[50]!==pe?(_e=d.jsx(Oo,{ref:y,itemEmail:V,floatingStrategy:"fixed",disabled:Z,withinPortal:!0,children:pe}),e[47]=y,e[48]=V,e[49]=Z,e[50]=pe,e[51]=_e):_e=e[51];let Ce;return e[52]!==z||e[53]!==B||e[54]!==U||e[55]!==C||e[56]!==k||e[57]!==K||e[58]!==Q||e[59]!==_e?(Ce=d.jsx(xe,{ref:U,style:K,h:Q,...C,...k,...z,...B,children:_e}),e[52]=z,e[53]=B,e[54]=U,e[55]=C,e[56]=k,e[57]=K,e[58]=Q,e[59]=_e,e[60]=Ce):Ce=e[60],Ce},hY=()=>{const t=me.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=d.jsx(ie,{sx:{height:"20px !important",backgroundColor:"#228be6",width:"1px",flex:"none !important",animation:"blink 1.5s infinite","@keyframes blink":{"0%, 50%":{opacity:1},"51%, 100%":{opacity:0}}}}),t[0]=e):e=t[0],e},eet=({item:t,searchValue:e,handleCreate:n,setHasError:r,index:s,children:o,handleContextPill:i,menuOpened:a,setIsEditing:l,setSearchValue:c,toggleMenu:u,handleValueRemove:f,values:h,selectedIndexes:m,hashMapAddressBook:y,setContextMenuRef:v})=>{const b=xt(1024),{email:w}=cr(t),{t:C}=Le(),k=cs(),E=z=>{if(!b){z.preventDefault(),i(m),u(t,!0),k(tm(!0));for(const B in a)B!==t&&a[B]&&u(B,!1)}},j=()=>{k(tm(!1)),u(t,!1)},A=()=>{const z=RT(h,m,y);qu(z)},M=()=>{const z=FB(h,s);qu(z)},_=()=>{A(),f(m)},D=()=>{const z=FB(h,s);e&&n(e),qu(z),f([s]),c(z),r(!1),l(!0)},N=navigator.platform.toUpperCase().indexOf("MAC")>=0?"⌘":"Ctrl";return S.useEffect(()=>{const z=B=>{const{key:L,ctrlKey:P,metaKey:I,altKey:H,shiftKey:$,code:V}=B;if(a[t])switch(L){case"ArrowRight":case"ArrowLeft":j();break;case"Backspace":case"Delete":j();break;case"Enter":B.preventDefault();break;default:(P||I)&&V==="KeyC"?(B.preventDefault(),A(),j()):H&&V==="KeyC"?(B.preventDefault(),M(),j()):(P||I)&&V==="KeyX"?(B.preventDefault(),_(),j()):$&&V==="KeyF"&&(B.preventDefault(),D(),j());break}};return document.addEventListener("keydown",z),()=>{document.removeEventListener("keydown",z)}},[a,t]),d.jsxs(et,{menuItemTabIndex:0,shadow:"md",width:b?280:350,opened:a[t],onClose:j,trapFocus:!0,withinPortal:b??!1,returnFocus:!0,loop:!0,position:"bottom-start",transitionProps:{duration:0,timingFunction:"linear"},styles:{itemSection:{flex:"0!important"}},children:[d.jsx(et.Target,{children:d.jsx("div",{style:{flex:0},onContextMenu:E,children:o})}),d.jsxs(et.Dropdown,{ref:v,children:[d.jsx(et.Item,{onClick:A,color:"#343A40",p:7,fz:14,leftSection:d.jsx(m3,{size:18}),rightSection:d.jsxs(ue,{size:"xs",c:"dimmed",children:[N,"+С"]}),children:C("contextMenu.copy")}),d.jsx(et.Item,{onClick:M,color:"#343A40",p:7,fz:14,leftSection:d.jsx(m3,{size:18}),rightSection:d.jsx(ue,{size:"xs",c:"dimmed",children:"Alt+C"}),children:d.jsxs(xe,{wrap:"wrap",columnGap:"5px",children:[C("contextMenu.copy")," ",d.jsxs(ue,{maw:b?190:260,lineClamp:1,truncate:"end",sx:{display:"block"},children:['"',w,'"']})]})}),d.jsx(et.Item,{onClick:_,color:"#343A40",p:7,fz:14,leftSection:d.jsx(G5e,{size:18}),rightSection:d.jsxs(ue,{size:"xs",c:"dimmed",children:[N,"+X"]}),children:C("contextMenu.delete")}),d.jsx(et.Item,{onClick:D,color:"#343A40",p:7,fz:14,leftSection:d.jsx(kf,{size:18}),rightSection:d.jsx(ue,{size:"xs",c:"dimmed",children:"Shift+F"}),children:C("contextMenu.edit")})]})]})},tet=({menuOpened:t,setHasError:e,searchValue:n,handleCreate:r,setMenuOpened:s,values:o,setSearchValue:i,setIsEditing:a,handleValueRemove:l,selectedIndexes:c,onFocusIndexChange:u,lastSelectedIndex:f,onLastSelectedIndexChange:h,lastSelectedShiftIndex:m,onLastSelectedShiftIndex:y,setContextMenuRef:v,addressField:b,cursorPosition:w,setMultiSelectedEmails:C})=>{const k=S.useRef([]),[E]=S.useState([]),[j,A]=S.useState(o),[M,_]=S.useState([]),D=re(op),R=xt(1024),N=cs(),z=c[c.length-1],B=S.useRef(new Map),L=Y=>(B.current.has(Y)||B.current.set(Y,It.createRef()),B.current.get(Y));S.useEffect(()=>{var Y,G;if(c.length!==0)if(k.current[z])(Y=k.current[z])==null||Y.focus();else{const K=c.find(Q=>!!k.current[Q]);if(K===void 0)return;(G=k.current[K])==null||G.focus()}},[c,z,k.current[z],o]);const P=(Y,G)=>{s(K=>({...K,[Y]:G}))},I=(Y,G,K)=>{var Z;s(J=>({...J,[Y]:K}));const{email:Q}=cr(Y);G===Q&&((Z=L(Y).current)==null||Z.forceClose())},H=(Y,G)=>{if(c.includes(Y)){if(G==="right")return c.filter(K=>K!==Y-1);if(G==="left")return c.filter(K=>K!==Y+1)}else return[...c,Y]},$=(Y,G)=>{const{key:K,ctrlKey:Q,metaKey:Z,altKey:J,shiftKey:ne,code:se}=Y;switch(Y.preventDefault(),K){case"Enter":P(j[G],!0);break;case"ArrowRight":PB(G,"right",o,u,h),BB(G,"right",Y.shiftKey,o,c,u,h,H);break;case"ArrowLeft":PB(G,"left",o,u,h),BB(G,"left",Y.shiftKey,o,c,u,h,H);break;case"ArrowUp":u([0]),h(0);break;case"ArrowDown":u([o.length-1]),h(o.length-1);break;case"Backspace":case"Delete":l(c);break;default:if((Q||Z)&&se==="KeyC"){const ce=RT(o,c,D);qu(ce)}else if(J&&se==="KeyC"){const ce=zB(o,c);qu(ce)}else if((Q||Z)&&se==="KeyX"){const ce=RT(o,c,D);qu(ce),l(c)}else if(ne&&se==="KeyF"){const ce=zB(o,c);n&&r(n),qu(ce),l([G]),i(ce),e(!1),a(!0);return}break}},V=(Y,G)=>{Y.stopPropagation(),N(tm(!1)),R?P(j[G],!0):P(j[G],!1);const K=j[G];if(Y.ctrlKey||Y.metaKey)_(Q=>Q.includes(K)?Q.filter(Z=>Z!==K):[...Q,K]);else if(Y.shiftKey&&M.length>0){const Q=M[M.length-1],Z=j.indexOf(Q),J=Math.min(Z,G),ne=Math.max(Z,G),se=j.slice(J,ne+1);_(ce=>[...new Set([...ce,...se])])}else _([K]);VDe(G,Y.shiftKey,Y.ctrlKey||Y.metaKey,c,m,u,h,y)},q=w&&w.field===b&&w.visible,U=q&&w.index===-1;S.useEffect(()=>{A(o)},[o]),S.useEffect(()=>{C&&C(M)},[M,C]);const W=S.useMemo(()=>c.map(Y=>j[Y]).filter(Boolean),[c,j]);return d.jsx(d.Fragment,{children:d.jsxs(UJe,{items:j,strategy:BJe,children:[j.map((Y,G)=>d.jsxs(It.Fragment,{children:[q&&w.index===G&&d.jsx(hY,{}),d.jsx(eet,{setContextMenuRef:v,setIsEditing:a,searchValue:n,handleCreate:r,menuOpened:t,handleValueRemove:l,setHasError:e,values:o,setSearchValue:i,selectedIndexes:c,hashMapAddressBook:D,item:Y,index:G,toggleMenu:(K,Q)=>I(Y,K,Q),handleContextPill:()=>qDe(G,c,u,h,y),children:d.jsx(JJe,{contactCardRef:L(Y),contextMenuOpened:t,isActive:c.includes(G),isLastSelected:f===G,handleValueRemove:()=>l([G]),item:Y,refElement:K=>k.current[G]=K,onKeyDown:K=>{$(K,G)},onClick:K=>V(K,G),pillIsDragging:E.includes(Y),sourceField:b,isMultiSelected:W.includes(Y),multiSelectionCount:W.length,selectedEmails:W},Y)},Y)]},Y)),U&&d.jsx(hY,{})]})})},hE=t=>{const e=me.c(13),{text:n,query:r}=t;if(!r){let l;return e[0]!==n?(l=d.jsx(d.Fragment,{children:n}),e[0]=n,e[1]=l):l=e[1],l}let s,o,i;if(e[2]!==r||e[3]!==n){const l=new RegExp(`(${r})`,"ig"),c=n.split(l);s=ue,o=!0;let u;e[7]!==r?(u=(f,h)=>f.toLowerCase()===r.toLowerCase()?d.jsx(ue,{component:"span",span:!0,fw:550,c:"black",children:f},h):d.jsx(ue,{component:"span",span:!0,children:f},h),e[7]=r,e[8]=u):u=e[8],i=c.map(u),e[2]=r,e[3]=n,e[4]=s,e[5]=o,e[6]=i}else s=e[4],o=e[5],i=e[6];let a;return e[9]!==s||e[10]!==o||e[11]!==i?(a=d.jsx(s,{span:o,children:i}),e[9]=s,e[10]=o,e[11]=i,e[12]=a):a=e[12],a},Aie=S.forwardRef((t,e)=>{var w;const n=me.c(28);let r,s,o;if(n[0]!==t){const{name:C,label:k,value:E,image:j,searchValue:A,...M}=t;r=k,o=A,s=M,n[0]=t,n[1]=r,n[2]=s,n[3]=o}else r=n[1],s=n[2],o=n[3];const a=re(op)[r.toLowerCase()];let l;n[4]!==(a==null?void 0:a.name)?(l=(w=a==null?void 0:a.name)==null?void 0:w.trim(),n[4]=a==null?void 0:a.name,n[5]=l):l=n[5];const c=l;let u;n[6]!==r?(u=d.jsx(cp,{size:36,label:r}),n[6]=r,n[7]=u):u=n[7];let f;n[8]===Symbol.for("react.memo_cache_sentinel")?(f={wordBreak:"break-word"},n[8]=f):f=n[8];let h;n[9]!==a||n[10]!==c||n[11]!==r||n[12]!==o?(h=d.jsx(ue,{fz:14,children:c?d.jsx(hE,{text:a.name,query:o}):d.jsx(hE,{text:r,query:o})}),n[9]=a,n[10]=c,n[11]=r,n[12]=o,n[13]=h):h=n[13];let m;n[14]!==c||n[15]!==r||n[16]!==o?(m=c&&d.jsx(ue,{fz:12,c:"dimmed",children:d.jsx(hE,{text:r,query:o})}),n[14]=c,n[15]=r,n[16]=o,n[17]=m):m=n[17];let y;n[18]!==h||n[19]!==m?(y=d.jsxs("div",{style:f,children:[h,m]}),n[18]=h,n[19]=m,n[20]=y):y=n[20];let v;n[21]!==u||n[22]!==y?(v=d.jsxs(ve,{wrap:"nowrap",children:[u,y]}),n[21]=u,n[22]=y,n[23]=v):v=n[23];let b;return n[24]!==s||n[25]!==e||n[26]!==v?(b=d.jsx("div",{ref:e,...s,children:v}),n[24]=s,n[25]=e,n[26]=v,n[27]=b):b=n[27],b}),_ie=({searchValue:t,selected:e=[],debounceMs:n=400,includeSelectedInList:r=!0,locale:s="ru",buildHashMap:o=!0})=>{const i=zt(),[a,l]=S.useState(!1),[c,u]=S.useState(""),[f,h]=S.useState([]),[m,y]=S.useState({}),v=S.useRef(0);S.useEffect(()=>{const w=setTimeout(()=>u(t),n);return()=>clearTimeout(w)},[t,n]);const b=r&&e&&e.length?e.join("|"):"";return S.useEffect(()=>{const w=c.trim();v.current+=1;const C=v.current;if(!w){l(!1),h([]),y({});return}l(!0),i(ZJ({like:w})).unwrap().then(k=>{if(C!==v.current)return;const E=(k==null?void 0:k.Items)??[],j={},A={},M=[...new Set(E.slice().sort((D,R)=>{var N,z,B,L;return((((N=D.Contact)==null?void 0:N.Surname)||((z=D.Contact)==null?void 0:z.Email))??"").localeCompare((((B=R.Contact)==null?void 0:B.Surname)||((L=R.Contact)==null?void 0:L.Email))??"",s,{sensitivity:"accent"})}).map(D=>{var z,B,L,P,I,H,$,V;const R=(((z=D.Contact)==null?void 0:z.Email)||"").trim();if(!R)return"";const N=`${((B=D.Contact)==null?void 0:B.Surname)||""} ${((L=D.Contact)==null?void 0:L.FirstName)||""} ${((P=D.Contact)==null?void 0:P.MiddleName)||""}`.replace(/\s+/g," ").trim();return j[R]={name:N,id:(I=D.Contact)==null?void 0:I.Id,hasAvatar:(H=D.Contact)==null?void 0:H.HasAvatar},A[R.toLowerCase()]={name:N.toLowerCase(),id:($=D.Contact)==null?void 0:$.Id,hasAvatar:(V=D.Contact)==null?void 0:V.HasAvatar},R}))].filter(Boolean),_=r?Array.from(new Set([...M,...e])):M;y(A),h(_),o&&i(jTe(j))}).finally(()=>{C===v.current&&l(!1)})},[c,b,r,s,o,i]),{suggestions:f,nameEmailMap:m,loading:a,debouncedSearchValue:c}},net=t=>{const e=me.c(31),{searchValue:n,value:r}=t,{t:s}=Le(),o=re(op);let i;e[0]!==n||e[1]!==r?(i={searchValue:n,selected:r,debounceMs:400,includeSelectedInList:!1,buildHashMap:!0},e[0]=n,e[1]=r,e[2]=i):i=e[2];const{suggestions:a,nameEmailMap:l,loading:c}=_ie(i);let u;if(e[3]!==n||e[4]!==a){const C=cr(n).email;u=a.map(ret).includes(C),e[3]=n,e[4]=a,e[5]=u}else u=e[5];const f=u;let h;if(e[6]!==l||e[7]!==n||e[8]!==a||e[9]!==r){const C=n.trim().toLowerCase();let k;e[11]!==r?(k=new Set(r.map(set)),e[11]=r,e[12]=k):k=e[12];const E=k;h=a.filter(j=>{var D;const A=cr(j).email.toLowerCase(),M=(D=l[A])==null?void 0:D.name,_=!E.has(A);return(A.includes(C)||(M==null?void 0:M.includes(C)))&&_}).sort((j,A)=>{var B,L,P,I;const M=cr(j).email.toLowerCase(),_=cr(A).email.toLowerCase(),D=((L=(B=l[M])==null?void 0:B.name)==null?void 0:L.toLowerCase())??"",R=((I=(P=l[_])==null?void 0:P.name)==null?void 0:I.toLowerCase())??"",N=Math.min(M.indexOf(C)>=0?M.indexOf(C):1/0,D.indexOf(C)>=0?D.indexOf(C):1/0),z=Math.min(_.indexOf(C)>=0?_.indexOf(C):1/0,R.indexOf(C)>=0?R.indexOf(C):1/0);return N!==z?N-z:(D||M).localeCompare(R||_,"ru",{sensitivity:"accent"})}),e[6]=l,e[7]=n,e[8]=a,e[9]=r,e[10]=h}else h=e[10];const m=h;let y;e[13]!==m||e[14]!==o||e[15]!==c||e[16]!==n||e[17]!==r?(y=!c&&m.map((C,k)=>{var E;return d.jsx(Ft.Option,{value:C,active:r.includes(C),children:d.jsx(Oo,{itemEmail:C,itemTitle:(E=o[C.toLowerCase()])==null?void 0:E.name,floatingStrategy:"fixed",withinPortal:!0,openDelay:1500,children:d.jsx(ie,{sx:{width:"100%"},children:d.jsx(Aie,{label:C,searchValue:n})})})},k)}),e[13]=m,e[14]=o,e[15]=c,e[16]=n,e[17]=r,e[18]=y):y=e[18];let v;e[19]!==f||e[20]!==n?(v=!f&&n.trim().length>0&&d.jsx(Ft.Option,{value:"$create",children:d.jsxs(ve,{align:"center",gap:3,children:[d.jsx(ie,{component:JQ,stroke:1.2,size:15,sx:oet,style:{svg:{width:"20px"}}}),d.jsx(ue,{fz:12,children:n})]})}),e[19]=f,e[20]=n,e[21]=v):v=e[21];let b;e[22]!==f||e[23]!==m||e[24]!==n||e[25]!==s?(b=f&&n.trim().length>0&&m.length===0&&d.jsx(Ft.Empty,{children:s("options.duplicate")}),e[22]=f,e[23]=m,e[24]=n,e[25]=s,e[26]=b):b=e[26];let w;return e[27]!==y||e[28]!==v||e[29]!==b?(w=d.jsxs(Ft.Options,{children:[y,v,b]}),e[27]=y,e[28]=v,e[29]=b,e[30]=w):w=e[30],w};function ret(t){return cr(t).email}function set(t){return cr(t).email.toLowerCase()}function oet(t){return{color:t.colors.blue[6]}}const Rie=()=>({dropdown:{maxHeight:"230px",overflow:"auto",width:"calc(100% - 20px)!important",left:"auto!important"},option:{"&[data-combobox-selected]":{backgroundColor:"#f1f3f5",color:"#000"},"&[data-combobox-active]":{backgroundColor:"#dee2e6"},transition:"background-color 150ms ease"}}),iet={width:"100%",flexGrow:1,margin:"inherit"},aet={border:"none",overflow:"auto",fontSize:"12px"},mE=({sendModalWindowId:t,initialValue:e=[],onUpdate:n,setInvalidEmails:r,addressBookRef:s,emailsFromQuery:o,inputRefGeneral:i,setContextMenuRef:a,addressField:l,activeDragId:c,pillOrder:u,cursorPosition:f,multiSelectedEmails:h,setMultiSelectedEmails:m})=>{const y=zt(),v=zc({onDropdownClose:()=>v.resetSelectedOption(),onDropdownOpen:()=>v.updateSelectedOptionIndex("active")}),[b,w]=S.useState(e),[C,k]=S.useState(!1),[E,j]=S.useState(!1),[A,M]=S.useState(""),_=wn(),D=Rie,[R,N]=S.useState([]),[z,B]=S.useState({}),[L,P]=S.useState(null),[I,H]=S.useState(null),$=xt(1024),V=S.useRef(null),q=S.useContext(Mi),{windows:U=[]}=q||{},W=U.find(pe=>pe.id===t);Jm(V,()=>{N([]),P(null),H(null),y(tm(!1)),requestAnimationFrame(()=>{B({})})},"mouseup");const Y=pe=>{w(_e=>{const Ce=_e.filter((Te,Ae)=>!pe.includes(Ae));return R.length&&!R.some(Te=>Te<Ce.length)&&(N([Ce.length-1]),P(Ce.length-1)),Ce})},G=pe=>{w(pe)},K=pe=>{const{validEmails:_e,invalidEmails:Ce}=Gk(pe);if(_e.length>0){M("");const Te=X0(b,_e),Ae=[...new Set([...b,...Te])];w(Ae),n(Ae),v.closeDropdown()}return Ce.length>0?(k(!0),M(Ce.join(" ")),r(Ce)):r([]),j(!1),_e.length>0?_e[0]:null},Q=pe=>{const{key:_e,target:Ce}=pe,Te=Ce.value.trim(),Ae=A.length===0,Ze=b.length>0;if($||pe.stopPropagation(),_e==="Backspace"&&Ae){pe.preventDefault(),Y([b.length-1]);return}if(_e==="Enter"){pe.preventDefault(),Te&&K(Te);return}if(!$&&Ze&&!A){if(_e==="ArrowRight"){pe.preventDefault(),N([0]),P(0);return}else if(_e==="ArrowLeft"){pe.preventDefault(),v.closeDropdown(),N([b.length-1]),P(b.length-1);return}}},Z=pe=>{var _e;pe.length===0?((_e=i.current)==null||_e.focus(),N([])):N(pe)},J=pe=>{const{invalidEmails:_e}=Gk(pe);k(!1),pe&&_e.length>0&&(k(!0),r(_e))},ne=pe=>{k(!1);const{validEmails:_e,invalidEmails:Ce}=Gk(pe),Te=X0(b,_e);if(Te.length>0){const Ze=[...b,...Te].filter((He,lt,Ye)=>{const ge=cr(He).email.toLowerCase();return Ye.findIndex(Fe=>cr(Fe).email.toLowerCase()===ge)===lt});w(Ze),n(Ze)}Ce.length>0?(k(!0),r([...Ce]),M([...new Set([...Ce])].join(" "))):(r([]),M(""))},se=pe=>{M(""),k(!1),K(pe==="$create"?A:pe)},ce=pe=>{C&&k(!1),M(pe),N([]),pe===""&&(r([]),v.closeDropdown())},fe=()=>new URLSearchParams(_.search).get("to"),le=S.useRef(void 0),be={values:b,setContextMenuRef:a||(()=>{}),setHasError:k,menuOpened:z,setMenuOpened:B,setSearchValue:M,setIsEditing:j,searchValue:A,handleValueRemove:Y,handleValueSorting:G,handleCreate:K,selectedIndexes:R,onFocusIndexChange:Z,lastSelectedIndex:L,onLastSelectedIndexChange:P,lastSelectedShiftIndex:I,onLastSelectedShiftIndex:H,addressField:l,activeDragId:c,pillOrder:u,cursorPosition:f,multiSelectedEmails:h,setMultiSelectedEmails:m};S.useEffect(()=>{const pe=fe();o&&pe&&setTimeout(()=>{ne(pe)},10)},[_.search]),S.useEffect(()=>{setTimeout(()=>{var pe;(pe=i.current)==null||pe.focus()},100)},[W==null?void 0:W.isFullScreen,W==null?void 0:W.isMinimize,W==null?void 0:W.isOpen]),S.useEffect(()=>{var pe;A.trim().length&&((pe=i.current)==null||pe.focus(),N([]),P(null),v.openDropdown())},[A]),S.useEffect(()=>{const pe=e.filter(zg);w(pe)},[e]),S.useEffect(()=>{le.current=n},[n]),S.useEffect(()=>{var pe;(pe=le.current)==null||pe.call(le,b)},[b]),S.useEffect(()=>{h&&h.length===0&&(N([]),P(null))},[h]);const{setNodeRef:je}=mR({id:`droppable-${l}`,data:{id:`droppable-${l}`}});return q?d.jsx(d.Fragment,{children:d.jsx(ve,{ref:pe=>{s&&(s.current=pe),je(pe)},onBlur:()=>J(A),align:"center",className:kc.root,children:d.jsxs(Ft,{store:v,onOptionSubmit:se,withinPortal:!1,styles:D,children:[d.jsx(Ft.DropdownTarget,{ref:V,children:d.jsx(Qh,{error:C,sx:{"& .mantine-Input-wrapper":{margin:0},"& .mantine-InputWrapper-error":{display:"none"},"& .mantine-PillsInputField-field":{height:"23px"}},styles:{root:{...iet},input:{...aet,maxHeight:$?"100px":"",color:C?"#fa5252":"inherit",padding:$?"6px 40px 6px 0":"5px 0",width:"100%",div:{height:"auto",flex:1,maxHeight:$?"100px":"",flexWrap:b.length>1?"wrap":"nowrap"}}},children:d.jsxs(El.Group,{style:{flexWrap:"wrap",gap:5},children:[d.jsx(tet,{...be}),d.jsx(Ft.EventsTarget,{children:d.jsx(Qh.Field,{sx:{minWidth:"auto",width:"100%"},ref:i,onClick:()=>{N([]),P(null),y(tm(!1)),B({}),A&&v.openDropdown()},onBlur:pe=>{var _e,Ce;(_e=pe.relatedTarget)!=null&&_e.id.includes("contact-card")||((Ce=pe.relatedTarget)==null?void 0:Ce.closest(".mantine-HoverCard-dropdown"))!==null||v.closeDropdown(),!E&&A.trim()&&K(A)},value:A,onPaste:pe=>{const _e=pe.clipboardData.getData("text");ne(_e),pe.preventDefault()},onChange:pe=>{ce(pe.currentTarget.value),v.updateSelectedOptionIndex()},onKeyDown:pe=>Q(pe)})})]})})}),d.jsx(Ft.Dropdown,{children:d.jsx(net,{searchValue:A,value:b})})]})})}):null},Die=(t,e)=>e==="item"?zg(t)?{}:{textDecoration:"underline",textDecorationStyle:"dotted",textDecorationColor:"#e67c73"}:e==="border"?{border:t.some(s=>!zg(s))?"1px solid #e67c73":"1px solid transparent"}:{},cet=({container:t,duration:e=300,cb:n})=>{const r=t.scrollTop,s=performance.now(),o=a=>1-Math.pow(1-a,3),i=a=>{const l=a-s,c=Math.min(l/e,1);t.scrollTop=r*(1-o(c)),c<1?requestAnimationFrame(i):n==null||n()};requestAnimationFrame(i)},uet=t=>{const e=me.c(25),{value:n,isInvalid:r,index:s,isLast:o}=t,{name:i,email:a}=cr(n),l=xt(1024),u=re(op)[a.toLowerCase()],f=u&&u.name?u.name:i||a;if(r){let E;e[0]!==n?(E=Die(n,"item"),e[0]=n,e[1]=E):E=e[1];let j;e[2]!==E?(j={marginRight:"10px",wordBreak:"break-all",...E},e[2]=E,e[3]=j):j=e[3];const A=!o&&" ";let M;return e[4]!==s||e[5]!==j||e[6]!==A||e[7]!==n?(M=d.jsxs("span",{style:j,children:[n,A]},s),e[4]=s,e[5]=j,e[6]=A,e[7]=n,e[8]=M):M=e[8],M}let h;e[9]===Symbol.for("react.memo_cache_sentinel")?(h={padding:0,height:"24px",background:"#eceff3"},e[9]=h):h=e[9];const m=l?22:24;let y;e[10]!==a||e[11]!==m?(y=d.jsx(cp,{label:a,size:m}),e[10]=a,e[11]=m,e[12]=y):y=e[12];const v=!o&&" ";let b;e[13]!==f||e[14]!==v?(b=d.jsxs("span",{className:kc.collapsedItem,children:[f,v]}),e[13]=f,e[14]=v,e[15]=b):b=e[15];let w;e[16]!==y||e[17]!==b?(w=d.jsxs(xe,{children:[y,b]}),e[16]=y,e[17]=b,e[18]=w):w=e[18];let C;e[19]!==a||e[20]!==w?(C=d.jsx(Oo,{itemEmail:a,floatingStrategy:"fixed",withinPortal:!1,children:w}),e[19]=a,e[20]=w,e[21]=C):C=e[21];let k;return e[22]!==s||e[23]!==C?(k=d.jsx(El,{sx:h,children:C},s),e[22]=s,e[23]=C,e[24]=k):k=e[24],k},det=({valuesList:t,invalidEmailsTo:e,invalidEmailsCc:n,invalidEmailsBcc:r})=>{const[s,o]=S.useState(""),{t:i}=Le(),a=t.filter(c=>c.trim()!==""),l=a.length;return S.useEffect(()=>{const c=l>3?`${i("more")} ${l-3}`:"";o(c)},[l]),d.jsxs(d.Fragment,{children:[a.slice(0,3).map((c,u)=>{const f=e.includes(c)||n.includes(c)||r.includes(c);return d.jsx(uet,{value:c,isInvalid:f,index:u,isLast:u===2},u)}),s&&l>0&&d.jsx(El,{className:kc.collapsedCounter,sx:{...Die(a,"border")},children:d.jsxs("span",{children:[s,"..."]})})]})},gE=t=>{const e=me.c(18),{showCc:n,showBcc:r,form:s,setShowCc:o,setShowBcc:i}=t,{t:a}=Le();let l;e[0]!==s||e[1]!==o?(l=()=>{o(fet),s.setFieldValue("Cc",[])},e[0]=s,e[1]=o,e[2]=l):l=e[2];const c=l;let u;e[3]!==s||e[4]!==i?(u=()=>{i(pet),s.setFieldValue("Bcc",[])},e[3]=s,e[4]=i,e[5]=u):u=e[5];const f=u;let h;e[6]===Symbol.for("react.memo_cache_sentinel")?(h={justifyContent:"flex-end"},e[6]=h):h=e[6];let m;e[7]!==n||e[8]!==a||e[9]!==c?(m=!n&&d.jsx(yt,{px:0,variant:"subtle",fz:13,mr:5,w:"auto",onClick:c,sx:{height:"auto","&:hover":{backgroundColor:"transparent",textDecoration:"underline",textDecorationColor:"#339AF0"},span:{color:"#339AF0",padding:"2px"}},children:a("cc")}),e[7]=n,e[8]=a,e[9]=c,e[10]=m):m=e[10];let y;e[11]!==r||e[12]!==a||e[13]!==f?(y=!r&&d.jsx(yt,{px:0,fz:13,variant:"subtle",w:"auto",onClick:f,sx:{height:"auto","&:hover":{backgroundColor:"transparent",textDecoration:"underline",textDecorationColor:"#339AF0"},span:{color:"#339AF0",padding:"2px"}},children:a("bccForm")}),e[11]=r,e[12]=a,e[13]=f,e[14]=y):y=e[14];let v;return e[15]!==m||e[16]!==y?(v=d.jsxs(xe,{p:"0 0 0 16px",mb:0,sx:h,children:[m,y]}),e[15]=m,e[16]=y,e[17]=v):v=e[17],v};function fet(t){return!t}function pet(t){return!t}const het=t=>{const{isChevronVisible:e,setIsChevronVisible:n,showToField:r,setChevronToRef:s,form:o,setShowCc:i,setShowBcc:a,setShowToField:l}=t,[c,u]=S.useState(!1),f=xt(1024),h=()=>{i(v=>!v),a(v=>!v),u(!c),l(!0)},m={transform:c?"rotate(180deg)":"rotate(0deg)",transition:"transform 0.2s ease"},y=()=>f&&r&&e;return S.useEffect(()=>{const v=o.values.Cc.length>0||o.values.Bcc.length>0;n(!v)},[o.values.Cc,o.values.Bcc]),y()?d.jsx(Ve,{ref:s,onClick:h,component:"div",size:"lg",sx:{position:"absolute",right:"17px",zIndex:1},children:d.jsx(Nm,{style:m,stroke:1.5})}):null},met="_customOverlay_sbftp_1",get="_customOverlay__inner_sbftp_14",yet="_stickyFields_sbftp_25",vet="_fromField_sbftp_31",bet="_fromField__box_sbftp_36",xet="_fromField__label_sbftp_42",wet="_fromField__address_sbftp_48",Cet="_fromField__address__multi_sbftp_56",ket="_fromField__addressText_sbftp_61",Eet="_customScrollbar_sbftp_68",Tet="_collapsedGroup_sbftp_90",Met="_collapsedBox_sbftp_96",jet="_collapsedWrapper_sbftp_104",co={customOverlay:met,customOverlay__inner:get,stickyFields:yet,fromField:vet,fromField__box:bet,fromField__label:xet,fromField__address:wet,fromField__address__multi:Cet,fromField__addressText:ket,customScrollbar:Eet,collapsedGroup:Tet,collapsedBox:Met,collapsedWrapper:jet},Aet=t=>{const e=me.c(53),{addressFromTo:n,onUpdate:r,inputRefGeneral:s,ruLang:o}=t,i=xt(1024),{t:a}=Le(),[l,c]=S.useState(!1);let u;e[0]===Symbol.for("react.memo_cache_sentinel")?(u={onDropdownOpen:()=>c(!0),onDropdownClose:()=>c(!1)},e[0]=u):u=e[0];const f=zc(u),h=re(Dn);let m;e[1]!==h?(m=h.filter(_et).map(Ret),e[1]=h,e[2]=m):m=e[2];const y=m;if(y.length===1)return null;const v=o?"30px":"13px";let b;e[3]!==v?(b={gap:v},e[3]=v,e[4]=b):b=e[4];let w;e[5]!==a?(w=a("from"),e[5]=a,e[6]=w):w=e[6];let C;e[7]!==w?(C=d.jsxs(wh,{className:co.fromField__label,children:[w,": "]}),e[7]=w,e[8]=C):C=e[8];let k;e[9]!==f||e[10]!==r?(k=U=>{r(U),f.closeDropdown(),c(!1)},e[9]=f,e[10]=r,e[11]=k):k=e[11];const E=y.length===1,j=`${co.fromField__address} ${y.length>1?co.fromField__address__multi:""}`;let A;e[12]!==f?(A=()=>{c(!0),f.toggleDropdown()},e[12]=f,e[13]=A):A=e[13];const M=i?22:24;let _;e[14]!==n||e[15]!==M?(_=d.jsx(cp,{label:n,size:M}),e[14]=n,e[15]=M,e[16]=_):_=e[16];const D=i?190:300;let R;e[17]!==n||e[18]!==D?(R=d.jsx(ue,{className:co.fromField__addressText,maw:D,truncate:"end",lineClamp:4,children:n}),e[17]=n,e[18]=D,e[19]=R):R=e[19];let N;e[20]!==i||e[21]!==y.length?(N=y.length>1&&d.jsx(xe,{ml:4,mt:i?3:5,children:d.jsx(Nm,{size:14,color:"#343a40"})}),e[20]=i,e[21]=y.length,e[22]=N):N=e[22];let z;e[23]!==_||e[24]!==R||e[25]!==N?(z=d.jsxs(xe,{children:[_,R,N]}),e[23]=_,e[24]=R,e[25]=N,e[26]=z):z=e[26];let B;e[27]!==n||e[28]!==l||e[29]!==z?(B=d.jsx(Oo,{itemEmail:n,disabled:l,children:z}),e[27]=n,e[28]=l,e[29]=z,e[30]=B):B=e[30];let L;e[31]!==A||e[32]!==B||e[33]!==j?(L=d.jsx(Ft.Target,{children:d.jsx(xe,{className:j,onClick:A,children:B})}),e[31]=A,e[32]=B,e[33]=j,e[34]=L):L=e[34];let P;e[35]===Symbol.for("react.memo_cache_sentinel")?(P={width:"max-content !important"},e[35]=P):P=e[35];let I;e[36]!==y?(I=y.length===0?d.jsx(Ft.Empty,{children:"Nothing found"}):y,e[36]=y,e[37]=I):I=e[37];let H;e[38]!==I?(H=d.jsx(Ft.Dropdown,{sx:P,children:d.jsx(Ft.Options,{children:I})}),e[38]=I,e[39]=H):H=e[39];let $;e[40]!==f||e[41]!==L||e[42]!==H||e[43]!==k||e[44]!==E?($=d.jsxs(Ft,{onOptionSubmit:k,store:f,withinPortal:!1,position:"bottom-start",disabled:E,children:[L,H]}),e[40]=f,e[41]=L,e[42]=H,e[43]=k,e[44]=E,e[45]=$):$=e[45];let V;e[46]!==$||e[47]!==b||e[48]!==C?(V=d.jsxs(ie,{className:co.fromField__box,sx:b,children:[C,$]}),e[46]=$,e[47]=b,e[48]=C,e[49]=V):V=e[49];let q;return e[50]!==s||e[51]!==V?(q=d.jsx(ve,{className:co.fromField,ref:s,children:V}),e[50]=s,e[51]=V,e[52]=q):q=e[52],q};function _et(t){return t.AccessType!==bi.Read}function Ret(t){return d.jsx(Ft.Option,{value:t.Email,children:t.Email},t.Id)}const Det=t=>{const e=me.c(34),{to:n,cc:r,bcc:s,setFieldValue:o}=t,[i,a]=S.useState(null),[l,c]=S.useState(null),[u,f]=S.useState(null);let h;e[0]!==s||e[1]!==r||e[2]!==n?(h={To:n,Cc:r,Bcc:s},e[0]=s,e[1]=r,e[2]=n,e[3]=h):h=e[3];const[m,y]=S.useState(h);let v;e[4]===Symbol.for("react.memo_cache_sentinel")?(v=[],e[4]=v):v=e[4];const[b,w]=S.useState(v),C=Iet;let k;e[5]===Symbol.for("react.memo_cache_sentinel")?(k=L=>{var P,I,H;((P=L.active.data.current)==null?void 0:P.type)==="email-pill"&&(a(L.active.data.current.id.toString()),(I=L.active.data.current)!=null&&I.multiSelected&&((H=L.active.data.current)!=null&&H.multiSelectedEmails)?w(L.active.data.current.multiSelectedEmails):w([L.active.data.current.id.toString()])),f(null),c(null)},e[5]=k):k=e[5];const E=k;let j;e[6]!==s||e[7]!==r||e[8]!==u||e[9]!==b||e[10]!==o||e[11]!==n?(j=(L,P,I)=>{let H=n,$=r,V=s;const q=b.length>0?b:[L];if(P==="To"?(H=H.filter(U=>!q.includes(U)),o("To",H)):P==="Cc"?($=$.filter(U=>!q.includes(U)),o("Cc",$)):P==="Bcc"&&(V=V.filter(U=>!q.includes(U)),o("Bcc",V)),I==="To"){const U=X0(H,q);if(U.length>0)if(u&&u.field==="To"&&u.index>=0){const W=[...H];W.splice(u.index,0,...U),o("To",W)}else{const W=[...H,...U];o("To",W)}}else if(I==="Cc"){const U=X0($,q);if(U.length>0)if(u&&u.field==="Cc"&&u.index>=0){const W=[...$];W.splice(u.index,0,...U),o("Cc",W)}else{const W=[...$,...U];o("Cc",W)}}else if(I==="Bcc"){const U=X0(V,q);if(U.length>0)if(u&&u.field==="Bcc"&&u.index>=0){const W=[...V];W.splice(u.index,0,...U),o("Bcc",W)}else{const W=[...V,...U];o("Bcc",W)}}f(null),c(null)},e[6]=s,e[7]=r,e[8]=u,e[9]=b,e[10]=o,e[11]=n,e[12]=j):j=e[12];const A=j;let M;e[13]!==b||e[14]!==m||e[15]!==o?(M=(L,P,I)=>{const H=m[I],$=b.length>0?b:[L];if($.length>1){const V=$.filter(W=>H.includes(W)),q=H.filter(W=>!V.includes(W));let U=q.indexOf(P);U===-1&&(U=q.length),q.splice(U,0,...V),y(W=>({...W,[I]:q})),o(I,q)}else{if(H.indexOf(L)===-1)return;const q=H.filter(W=>W!==L);let U=q.indexOf(P);U===-1&&(U=q.length),q.splice(U,0,L),y(W=>({...W,[I]:q})),o(I,q)}},e[13]=b,e[14]=m,e[15]=o,e[16]=M):M=e[16];const _=M;let D;e[17]!==s||e[18]!==r||e[19]!==m||e[20]!==o||e[21]!==n?(D=L=>{var H,$,V,q;const{over:P,active:I}=L;if(P&&I.id!==P.id){const U=(H=I.data.current)==null?void 0:H.id.toString(),W=($=P.data.current)==null?void 0:$.id.toString(),Y=(V=I.data.current)==null?void 0:V.sourceField;let G;if(W.startsWith("droppable-")?G=W.replace("droppable-",""):G=(q=P.data.current)==null?void 0:q.sourceField,Y&&G&&Y===G){const K=m[Y],Q=K.indexOf(U),Z=K.indexOf(W);Q!==-1&&Z!==-1&&[...K],Q+1!==Z&&c({field:G,index:Z,visible:!0})}else if(Y&&G&&Y!==G)if(W.startsWith("droppable-"))f({field:G,index:-1}),c({field:G,index:-1,visible:!0});else{const K=G,Z=m[K].indexOf(W);Z!==-1&&(f({field:K,index:Z}),c({field:K,index:Z,visible:!0}))}else c(null)}else c(null);(m.To.length!==n.length||m.Cc.length!==r.length||m.Bcc.length!==s.length)&&(o("To",m.To),o("Cc",m.Cc),o("Bcc",m.Bcc))},e[17]=s,e[18]=r,e[19]=m,e[20]=o,e[21]=n,e[22]=D):D=e[22];const R=D;let N;e[23]!==A||e[24]!==_?(N=L=>{var H,$,V,q;const{over:P,active:I}=L;if(a(null),P!==null&&P.id!==I.id){const U=(H=I.data.current)==null?void 0:H.id.toString(),W=(($=P==null?void 0:P.data.current)==null?void 0:$.id.toString())||"",Y=(V=I.data.current)==null?void 0:V.sourceField;let G;W.startsWith("droppable-")?G=W.replace("droppable-",""):G=((q=P==null?void 0:P.data.current)==null?void 0:q.sourceField)||"",W.startsWith("droppable-")?A(U,Y,G):Y&&G===Y?_(U,W,Y):Y&&G!==Y&&A(U,Y,G)}f(null),c(null),w([])},e[23]=A,e[24]=_,e[25]=N):N=e[25];const z=N;let B;return e[26]!==i||e[27]!==l||e[28]!==z||e[29]!==R||e[30]!==u||e[31]!==b||e[32]!==m?(B={activeDragId:i,setActiveDragId:a,cursorPosition:l,setCursorPosition:c,pillOrder:m,setPillOrder:y,insertPosition:u,setInsertPosition:f,multiSelectedEmails:b,setMultiSelectedEmails:w,customCollisionDetection:C,handleDragStart:E,handleDragOver:R,handleDragEnd:z},e[26]=i,e[27]=l,e[28]=z,e[29]=R,e[30]=u,e[31]=b,e[32]=m,e[33]=B):B=e[33],B};function Iet(t){const e=lR(t);if(e.length>0)return e;const{pointerCoordinates:n,droppableRects:r,droppableContainers:s}=t;if(!n)return[];let o=null,i=50;for(const a of s){const l=r.get(a.id);if(!l)continue;const c=l.left+l.width/2,u=l.top+l.height/2,f=Math.sqrt(Math.pow(n.x-c,2)+Math.pow(n.y-u,2));f<i&&(i=f,o={id:a.id,data:{droppableContainer:a,value:1}})}return o?[o]:[]}const Oet=t=>{var Pt;const{sendModalWindowId:e,setIsSticky:n,initialTo:r,initialCopy:s,initialSecretCp:o,addressBookRef:i,form:a,fromContacts:l,setShouldResetCopy:c,setShouldResetSecretCp:u,invalidEmailsTo:f,setInvalidEmailsTo:h,invalidEmailsCc:m,setInvalidEmailsCc:y,invalidEmailsBcc:v,setInvalidEmailsBcc:b,addressFromTo:w}=t,{t:C}=Le(),k=xt(1024),E=wn(),j=cs(),[A,M]=S.useState(!1),[_,D]=S.useState(!1),[R,N]=S.useState([]),[z,B]=S.useState(()=>r.length===0&&s.length===0&&o.length===0),[L,P]=S.useState(!0),[I,H]=S.useState(null),[$,V]=S.useState(null),[q,U]=S.useState(null),W=S.useRef(null),Y=S.useRef(null),G=S.useRef(null),[K,Q]=S.useState(null),[Z,J]=S.useState(null),ne=E.state,se=(ne==null?void 0:ne.fromContacts)??l,ce=vn.language==="ru",fe=re(op),{activeDragId:le,setActiveDragId:be,pillOrder:je,setPillOrder:pe,cursorPosition:_e,multiSelectedEmails:Ce,setMultiSelectedEmails:Te,customCollisionDetection:Ae,handleDragStart:Ze,handleDragOver:He,handleDragEnd:lt}=Det({to:a.values.To,cc:a.values.Cc,bcc:a.values.Bcc,setFieldValue:(at,nt)=>a.setFieldValue(at,nt)});Em(()=>{J(null),P(!1),j(tm(!1)),setTimeout(()=>{B(!1),n(!0)},100)},null,[I,$,Z,K,q].filter(Boolean));const Ye=()=>{const{To:at,Cc:nt,Bcc:We}=a.values,At=[...at,...nt,...We,...f,...m,...v];N(At)},ge=z?"none":"block",Fe=z?"block":"none",Se=at=>{B(!0);const nt=document.getElementById(`modal-body-${e}`||"modal-body");nt?cet({container:nt,duration:400,cb:()=>n(!1)}):n(!1),setTimeout(()=>{var St;(St=W.current)==null||St.focus()},100),k||(M(s.length>0||a.values.Cc.length>0||m.length>0),D(o.length>0||a.values.Bcc.length>0||v.length>0));const We=[s,a.values.Cc,o,a.values.Bcc,m,v].every(St=>St.length===0);P(k&&We)},qe={isChevronVisible:L,setIsChevronVisible:P,showToField:z,setChevronToRef:J,form:a,setShowCc:M,setShowBcc:D,setShowToField:B},ot={showCc:A,showBcc:_,form:a,setShowBcc:D,setShowCc:M},$e={sendModalWindowId:e,setContextMenuRef:Q,addressBookRef:i,activeDragId:le,setActiveDragId:be,pillOrder:je,multiSelectedEmails:Ce,setMultiSelectedEmails:Te};S.useEffect(()=>{Ye()},[a.values.To,a.values.Cc,a.values.Bcc,f,m,v]),S.useEffect(()=>{a.values.Cc.length===0&&s.length>0&&c(!0),k&&(s.length>0||o.length>0)&&M(!0)},[a.values.Cc,s]),S.useEffect(()=>{a.values.Bcc.length===0&&o.length>0&&u(!0),k&&(o.length>0||s.length>0)&&D(!0)},[a.values.Bcc,o]),S.useEffect(()=>{pe({To:a.values.To,Cc:a.values.Cc,Bcc:a.values.Bcc})},[a.values.To,a.values.Cc,a.values.Bcc]),S.useEffect(()=>{!k&&A&&setTimeout(()=>{var at;(at=Y.current)==null||at.focus()},0)},[A]),S.useEffect(()=>{!k&&_&&setTimeout(()=>{var at;(at=G.current)==null||at.focus()},0)},[_]);const pt=S.useMemo(()=>{if(!le)return"";const at=fe[(le==null?void 0:le.toLowerCase())??""];let nt=at&&at.name?at.name:le;return Ce.length>1&&(nt+=" +"+(Ce.length-1)),nt},[le,fe,Ce.length]),gt=jee(Rg(fS,{activationConstraint:{distance:3}}),Rg(fR,{activationConstraint:{distance:3}}));return d.jsxs(d.Fragment,{children:[d.jsx(het,{...qe}),d.jsxs(ve,{gap:6,onClick:Se,ref:H,className:co.collapsedGroup,sx:{display:ge},children:[d.jsxs(ie,{className:co.collapsedBox,children:[R.length===0&&d.jsxs(wh,{p:"0 16px 0 0",sx:{alignSelf:"center",fontSize:"13px"},children:[C("to"),":"]}),d.jsx(xe,{gap:5,ml:R.length?0:4,className:co.collapsedWrapper,children:d.jsx(det,{valuesList:R,invalidEmailsTo:f,invalidEmailsCc:m,invalidEmailsBcc:v})})]}),d.jsx(Da,{color:"#A2B0C333"})]}),d.jsxs(ie,{ref:V,sx:{display:Fe,margin:"0 16px"},children:[d.jsx(Aet,{inputRefGeneral:U,addressFromTo:((Pt=a.values.From)==null?void 0:Pt.Address)||w,onUpdate:at=>a.getInputProps("From.Address").onChange(at),ruLang:ce}),d.jsx("div",{style:{borderBottom:"1px solid #A2B0C333"},children:d.jsxs(hR,{collisionDetection:Ae,onDragStart:Ze,onDragOver:He,onDragEnd:lt,sensors:gt,children:[d.jsx(ve,{gap:6,sx:{justifyContent:"space-between",flexWrap:"nowrap"},children:d.jsxs(ie,{sx:{display:"flex",flex:1,flexWrap:"wrap",flexDirection:!k&&a.values.To.length?"column":"row"},children:[d.jsxs(xe,{gap:ce?15:30,p:"0",sx:{flex:1},children:[d.jsxs(wh,{mt:8,mr:0,sx:{alignSelf:"start",fontSize:"13px"},children:[C("to"),":"," "]}),d.jsx(mE,{...$e,setInvalidEmails:h,inputRefGeneral:W,initialValue:r,emailsFromQuery:se,onUpdate:at=>a.setFieldValue("To",at),addressField:"To",activeDragId:le,pillOrder:je,cursorPosition:_e})]}),!k&&!A&&!_&&d.jsx(gE,{...ot})]})}),A&&d.jsx(d.Fragment,{children:d.jsx(ve,{gap:6,sx:{flexWrap:"nowrap"},children:d.jsxs(ie,{sx:{flexGrow:1,display:"flex",flexWrap:"wrap",flexDirection:!k&&a.values.Cc.length?"column":"row"},children:[d.jsxs(xe,{gap:ce?10:30,p:"0",sx:{flex:1},children:[d.jsxs(wh,{mt:7,mr:0,sx:{alignSelf:"start",fontSize:"13px"},children:[C("cc"),":"," "]}),d.jsx(mE,{...$e,setInvalidEmails:y,inputRefGeneral:Y,initialValue:s,emailsFromQuery:se,onUpdate:at=>a.setFieldValue("Cc",at),addressField:"Cc",activeDragId:le,pillOrder:je,cursorPosition:_e})]}),!k&&d.jsx(gE,{...ot})]})})}),_&&d.jsx(d.Fragment,{children:d.jsx(ve,{gap:15,children:d.jsxs(ie,{sx:{flexGrow:1,display:"flex",flexWrap:"wrap",flexDirection:!k&&a.values.Bcc.length?"column":"row"},children:[d.jsxs(xe,{gap:ce?15:23,p:"0",sx:{flex:1},children:[d.jsxs(wh,{mt:8,mr:0,sx:{lineHeight:"16px",alignSelf:"start",fontSize:"13px"},children:[C("bcc"),":"]}),d.jsx(mE,{...$e,setInvalidEmails:b,inputRefGeneral:G,initialValue:o,emailsFromQuery:se,onUpdate:at=>a.setFieldValue("Bcc",at),addressField:"Bcc",activeDragId:le,pillOrder:je,cursorPosition:_e})]}),!k&&d.jsx(gE,{...ot})]})})}),Xo.createPortal(d.jsx(Yee,{adjustScale:!1,dropAnimation:null,modifiers:[iAe],style:{width:"auto",flex:0,display:"flex"},children:le?d.jsx(El,{pl:1,withRemoveButton:!0,w:"fit-content",h:k?22:24,className:co.dragItem,children:d.jsxs(xe,{wrap:"nowrap",gap:"4px",maw:"auto",sx:{height:"inherit!important"},children:[d.jsx(cp,{label:le,size:k?22:24}),d.jsx("span",{className:kc.dragItemText,children:pt})]})}):null}),document.body)]})})]}),d.jsxs(ve,{className:"test",gap:15,sx:{padding:"0",flexWrap:"nowrap",margin:"0 16px",borderBottom:"1px solid #A2B0C333"},children:[d.jsxs(wh,{sx:{fontSize:"13px"},children:[C("subject"),": "]}),d.jsx(es,{variant:"unstyled",...a.getInputProps("Subject"),onKeyDown:at=>at.stopPropagation(),styles:{root:{width:"100%"},input:{fontSize:k?"12px":"14px",color:"#343a40"}}})]})]})},Net=({disabled:t,messageIdRef:e,isDirty:n,activeModalWindow:r})=>{const s=zt(),o=Mr(),i=wn(),{t:a}=Le(),l=Er(),{id:c}=sr(),u=ts(),f=re(qc),h=re(mr),m=re($o),y=re(Dn),v=re(zr),b=i.pathname.includes("/message"),w=i.pathname,C=w==null?void 0:w.match(/\/message\/(\d+)/),k=C?C[1]:null,E=Number(k)===e.current,j=S.useContext(Mi),{closeSendWindow:A=()=>{}}=j||{},M=async()=>{var D;try{await s(jg({folderId:0,Ids:[e.current]})).unwrap();const R=!!((D=f==null?void 0:f.Items)!=null&&D.some(z=>z.Id===e.current)),N=[s(Vc()).unwrap()];!b&&R&&N.push(s(ur({...h,folderId:u==null?void 0:u.Id})).unwrap()),await Promise.all(N),(m==null?void 0:m.Id)===e.current&&s(jo()),o.success(a("modals.titles.deleteDraft"))}catch{o.error(a("modals.titles.deleteDraftError"))}},_=()=>{if(!n&&!e.current)r&&A(r.id);else if(r&&A(r.id),M(),c&&E){const D=y.find(N=>N.UserId===(m==null?void 0:m.OwnerId)),R=v.find(N=>N.Id===e.current);l((R==null?void 0:R.path)||`/${D==null?void 0:D.Id}/trash`)}};return j?d.jsx(on,{label:a("modals.controls.deleteDraft"),children:d.jsx(En,{disabled:t,children:d.jsx(Ve,{size:"lg",onClick:_,component:"div",children:d.jsx(Eo,{color:"#848E98",stroke:1.5,size:"20px"})})})}):null},Iie=(t,e)=>{const n={onUploadProgress:e?r=>{const s=r.total||r.loaded,o=Math.round(r.loaded*100/s);e(o)}:void 0};return Ct.post("v1/Files/Upload",t,n)},Let="data:image/svg+xml;utf8,"+encodeURIComponent(`
<svg width="60" height="16" viewBox="0 0 60 16" xmlns="http://www.w3.org/2000/svg">
  <circle cx="8" cy="8" r="4" fill="#C4C7CE">
    <animate
      attributeName="cy"
      values="8;4;8"
      keyTimes="0;0.5;1"
      dur="0.9s"
      repeatCount="indefinite"
      calcMode="spline"
      keySplines="0.4 0 0.6 1;0.4 0 0.6 1"
    />
    <animate
      attributeName="opacity"
      values="0.4;1;0.4"
      dur="0.9s"
      repeatCount="indefinite"
    />
  </circle>

  <circle cx="30" cy="8" r="4" fill="#C4C7CE">
    <animate
      attributeName="cy"
      values="8;4;8"
      keyTimes="0;0.5;1"
      dur="0.9s"
      begin="0.15s"
      repeatCount="indefinite"
      calcMode="spline"
      keySplines="0.4 0 0.6 1;0.4 0 0.6 1"
    />
    <animate
      attributeName="opacity"
      values="0.4;1;0.4"
      dur="0.9s"
      begin="0.15s"
      repeatCount="indefinite"
    />
  </circle>

  <circle cx="52" cy="8" r="4" fill="#C4C7CE">
    <animate
      attributeName="cy"
      values="8;4;8"
      keyTimes="0;0.5;1"
      dur="0.9s"
      begin="0.3s"
      repeatCount="indefinite"
      calcMode="spline"
      keySplines="0.4 0 0.6 1;0.4 0 0.6 1"
    />
    <animate
      attributeName="opacity"
      values="0.4;1;0.4"
      dur="0.9s"
      begin="0.3s"
      repeatCount="indefinite"
    />
  </circle>
</svg>
`),Oie=async(t,e)=>{if(!e){vn.t("notifications.messages.editorAvailable");return}const n=Array.from(t),r=Date.now();if(n.some(s=>!s.type.match("image/*"))){vn.t("invalidType");return}n.forEach((s,o)=>{e==null||e.chain().focus().insertContentAt(e.state.selection.anchor,{type:"loadingImage",attrs:{src:Let,alt:vn.t("image"),loading:!0,placeholderId:`ph-${r}-${o}`,width:"100%",height:"300px",border:"1px dashed #dadbdf",background:"#edeff35e",objectFit:"none",dataLoader:"Loader"}}).run()});try{const s=n.map(l=>{const c=new FormData;return c.append("file",l),Iie(c)}),i=(await Promise.all(s)).map(l=>U_({id:l.data.Id,type:"file",lifeTime:10,accessType:0}));(await Promise.all(i)).forEach((l,c)=>{var m;if(!((m=l==null?void 0:l.data)!=null&&m.Url)){vn.t("editor.linkError");return}const u=`ph-${r}-${c}`,f=l.data.Url,h=new Image;h.src=f,h.onload=()=>{const y=h.naturalWidth,v=h.naturalHeight,{doc:b}=e.state,w=e.state.tr;let C=!1;b.descendants((k,E)=>k.attrs.placeholderId===u&&k.type.name==="loadingImage"&&k.attrs.loading?(w.setNodeMarkup(E,void 0,{...k.attrs,src:f,loading:!1,width:`${y}px`,height:`${v}px`,style:"",border:"none",dataLoader:null}),C=!0,!1):!0),C&&e.view.dispatch(w)}})}catch(s){vn.t("editor.uploadError"),console.error(s)}},Nie=t=>{const e=me.c(20),{editor:n,disabled:r}=t,{t:s}=Le(),o=xt(1024),i=S.useRef(null);let a;e[0]!==n?(a=()=>{i.current||(i.current=document.createElement("input"),i.current.type="file",i.current.accept="image/*",i.current.style.display="none",i.current.addEventListener("change",()=>{var k,E;(E=(k=i.current)==null?void 0:k.files)!=null&&E.length&&Oie(i.current.files,n),i.current&&(i.current.value="")}),document.body.appendChild(i.current)),i.current.value="",i.current.click()},e[0]=n,e[1]=a):a=e[1];const l=a;let c,u;e[2]===Symbol.for("react.memo_cache_sentinel")?(c=()=>()=>{i.current&&(document.body.removeChild(i.current),i.current=null)},u=[],e[2]=c,e[3]=u):(c=e[2],u=e[3]),S.useEffect(c,u);let f;e[4]!==s?(f=s("modals.controls.photo"),e[4]=s,e[5]=f):f=e[5];const h=o?"#848e98":"",m=o?"30px":"lg";let y;e[6]!==s?(y=s("insertImage"),e[6]=s,e[7]=y):y=e[7];let v;e[8]===Symbol.for("react.memo_cache_sentinel")?(v=d.jsx(KQ,{color:"#848E98",stroke:1,size:23}),e[8]=v):v=e[8];let b;e[9]!==l||e[10]!==h||e[11]!==m||e[12]!==y?(b=d.jsx(Ve,{color:h,variant:"subtle",component:"div",size:m,onClick:l,title:y,children:v}),e[9]=l,e[10]=h,e[11]=m,e[12]=y,e[13]=b):b=e[13];let w;e[14]!==r||e[15]!==b?(w=d.jsx(En,{display:"flex",disabled:r,children:b}),e[14]=r,e[15]=b,e[16]=w):w=e[16];let C;return e[17]!==w||e[18]!==f?(C=d.jsx(on,{label:f,children:w}),e[17]=w,e[18]=f,e[19]=C):C=e[19],C},$et=t=>{const e=me.c(64),{handleAttachmentsUpload:n,isSending:r,isUploading:s,isDraftRunning:o,editor:i,form:a,handleSubmit:l,allInvalidEmails:c,toggleToolbar:u,isDirty:f,messageIdRef:h,sendModalWindowId:m,hasAttachLink:y,validateEmail:v}=t,{t:b}=Le(),w=S.useContext(Mi);let C;e[0]!==w?(C=w||{},e[0]=w,e[1]=C):C=e[1];const{windows:k}=C;let E;e[2]!==k?(E=k===void 0?[]:k,e[2]=k,e[3]=E):E=e[3];const j=E;let A;if(e[4]!==m||e[5]!==j){let pe;e[7]!==m?(pe=_e=>_e.id===m,e[7]=m,e[8]=pe):pe=e[8],A=j.find(pe),e[4]=m,e[5]=j,e[6]=A}else A=e[6];const M=A,_=r||s||o,[D,R]=Rs(!1),{open:N,close:z}=R;if(!w)return null;const B=M!=null&&M.isMinimize?"none":"";let L;e[9]!==B?(L={zIndex:9,padding:"12px 16px",borderBottomLeftRadius:"8px",borderBottomRightRadius:"8px",display:B},e[9]=B,e[10]=L):L=e[10];let P;e[11]===Symbol.for("react.memo_cache_sentinel")?(P={top:"10px",right:"16px",zIndex:1e3,gap:"1px"},e[11]=P):P=e[11];const I=!!_;let H;e[12]!==M||e[13]!==c||e[14]!==a||e[15]!==l||e[16]!==y||e[17]!==m||e[18]!==I?(H=d.jsx(cie,{variant:"desktop",disabled:I,form:a,allInvalidEmails:c,hasAttachLink:y,sendModalWindowId:m,activeModalWindow:M,handleSubmit:l}),e[12]=M,e[13]=c,e[14]=a,e[15]=l,e[16]=y,e[17]=m,e[18]=I,e[19]=H):H=e[19];let $;e[20]!==N||e[21]!==v?($=d.jsx(wm.Button,{validateEmail:v,open:N}),e[20]=N,e[21]=v,e[22]=$):$=e[22];let V;e[23]!==z||e[24]!==D||e[25]!==m?(V=D&&d.jsx(wm.Modal,{opened:D,onClose:z,sendModalWindowId:m}),e[23]=z,e[24]=D,e[25]=m,e[26]=V):V=e[26];let q;e[27]!==$||e[28]!==V||e[29]!==H?(q=d.jsxs(xe,{mr:16,children:[H,$,V]}),e[27]=$,e[28]=V,e[29]=H,e[30]=q):q=e[30];let U;e[31]!==b?(U=b("modals.controls.toolbar"),e[31]=b,e[32]=U):U=e[32];let W;e[33]===Symbol.for("react.memo_cache_sentinel")?(W={height:"34px"},e[33]=W):W=e[33];let Y;e[34]===Symbol.for("react.memo_cache_sentinel")?(Y=d.jsx(Oke,{color:"#848E98",stroke:1,size:"25px"}),e[34]=Y):Y=e[34];let G;e[35]!==u?(G=d.jsx(En,{sx:W,children:d.jsx(Ve,{size:"lg",onClick:u,component:"div",children:Y})}),e[35]=u,e[36]=G):G=e[36];let K;e[37]!==U||e[38]!==G?(K=d.jsx(on,{label:U,children:G}),e[37]=U,e[38]=G,e[39]=K):K=e[39];const Q=!!_;let Z;e[40]!==n||e[41]!==Q?(Z=d.jsx(lie,{disabled:Q,onFilesChange:n}),e[40]=n,e[41]=Q,e[42]=Z):Z=e[42];const J=!!_;let ne;e[43]!==m||e[44]!==J?(ne=d.jsx(aie,{disabled:J,sendModalWindowId:m}),e[43]=m,e[44]=J,e[45]=ne):ne=e[45];const se=!!_;let ce;e[46]!==i||e[47]!==se?(ce=d.jsx(Nie,{editor:i,disabled:se}),e[46]=i,e[47]=se,e[48]=ce):ce=e[48];let fe;e[49]!==q||e[50]!==K||e[51]!==Z||e[52]!==ne||e[53]!==ce?(fe=d.jsxs(ve,{wrap:"nowrap",sx:P,children:[q,K,Z,ne,ce]}),e[49]=q,e[50]=K,e[51]=Z,e[52]=ne,e[53]=ce,e[54]=fe):fe=e[54];const le=!!_;let be;e[55]!==M||e[56]!==f||e[57]!==h||e[58]!==le?(be=d.jsx(Net,{disabled:le,messageIdRef:h,isDirty:f,activeModalWindow:M}),e[55]=M,e[56]=f,e[57]=h,e[58]=le,e[59]=be):be=e[59];let je;return e[60]!==fe||e[61]!==be||e[62]!==L?(je=d.jsxs(xe,{sx:L,bg:"white",gap:"xs",h:60,align:"center",top:0,pos:"static",w:"100%",justify:"space-between",onMouseDown:Fet,children:[fe,be]}),e[60]=fe,e[61]=be,e[62]=L,e[63]=je):je=e[63],je};function Fet(t){t.stopPropagation()}function zet(t,e,n,r){const s=me.c(16);let o;s[0]!==e?(o=document.getElementById(e||"draggable-window")||document,s[0]=e,s[1]=o):o=s[1];const i=o;let a,l;s[2]!==t||s[3]!==i?(a=()=>{if(!t)return;const m=w=>{t.commands.command(C=>{const{tr:k,state:E}=C,{doc:j}=E;let A=null;return j.descendants((M,_)=>M.attrs.uid===w?(A=_,!1):!0),A!==null?(k.delete(A,A+1),!0):!1})},y=()=>{i.querySelectorAll('img[alt="close"]').forEach(w=>{const C=w;C.setAttribute("data-remove-attachment","true"),C.onclick||(C.onclick=()=>{const k=C.parentElement;if(!k)return;const E=k.getAttribute("data-attachment-uid");E&&m(E)})})};y();const v=new MutationObserver(()=>{y()}),b=i.querySelector(".mantine-RichTextEditor-content");return b&&v.observe(b,{childList:!0,subtree:!0}),()=>v.disconnect()},l=[t,i],s[2]=t,s[3]=i,s[4]=a,s[5]=l):(a=s[4],l=s[5]),S.useEffect(a,l);let c,u;s[6]!==t||s[7]!==i?(c=()=>{if(!t)return;const m=new MutationObserver(()=>{t.commands.focus(),i.querySelectorAll("span[data-attachment-link]").forEach(Bet)}),y=i.querySelector(".mantine-RichTextEditor-content");return y&&m.observe(y,{childList:!0,subtree:!0}),()=>m.disconnect()},u=[t,i],s[6]=t,s[7]=i,s[8]=c,s[9]=u):(c=s[8],u=s[9]),S.useEffect(c,u);let f,h;s[10]!==t||s[11]!==i||s[12]!==n||s[13]!==r?(f=()=>{if(!t)return;const m=()=>{const b=Array.from(i.querySelectorAll(".mantine-RichTextEditor-content [data-attachment-uid]")).map(Pet).filter(Boolean);n(b),r(b.length>0)};m();const y=new MutationObserver(()=>{m()}),v=i.querySelector(".mantine-RichTextEditor-content");return v&&y.observe(v,{childList:!0,subtree:!0}),()=>y.disconnect()},h=[t,i,n,r],s[10]=t,s[11]=i,s[12]=n,s[13]=r,s[14]=f,s[15]=h):(f=s[14],h=s[15]),S.useEffect(f,h)}function Pet(t){const e=t.getAttribute("data-attachment-uid");return e?{Uid:e}:null}function Bet(t){t.hasAttribute("data-attachment-uid")||t.setAttribute("data-attachment-uid","auto-fix-uid")}const Het="_root_gmrsl_1",Uet="_body_gmrsl_7",Vet="_title_gmrsl_12",qet="_closeButton_gmrsl_17",Wet="_progressContainer_gmrsl_24",Yet="_progressBar_gmrsl_35",Get="_shrink_gmrsl_1",yE={root:Het,body:Uet,title:Vet,closeButton:qet,progressContainer:Wet,progressBar:Yet,shrink:Get},mY=1e4,Ket=50;let dh=null;const Xet=({currentFolderId:t,onCancelSuccess:e,onMessageSent:n})=>{const r=wn(),s=zt(),{t:o}=Le(),i=Er(),a=re(mr),l=re(Va),c=S.useRef(void 0),u=r.pathname.includes("/message"),f=b=>{if(!window.location.pathname.includes("outbox"))return;const w=l.find(k=>k.Type===Je.OUTBOX);if(!w){i("/inbox");return}nJ(b,w.Id,Je.OUTBOX)<=0&&i("/inbox")},h=S.useCallback(async(b=0)=>{setTimeout(async()=>{var C;if(!u){const E=((C=l.find(j=>j.path===window.location.pathname))==null?void 0:C.Id)||t;await s(ur({...a,folderId:E}))}const w=await s(Vc()).unwrap();f(w),s(ja())},b)},[s,t,a,u]),m=S.useCallback(async b=>{c.current&&(clearTimeout(c.current),c.current=void 0),await s(tS({id:b.Id})),await h(Ket),e==null||e(b),dh=null},[s,h,e]),y=S.useCallback(({message:b})=>{const w=b.Id.toString();dh&&Zu(dh),dh=w,lm({id:w,classNames:yE,title:d.jsxs(bt,{gap:10,children:[d.jsxs(xe,{justify:"space-between",align:"center",fw:400,c:"#343A40",children:[o("messageSending"),"...",d.jsx(yt,{variant:"light",p:"5px 7px",h:"auto",fw:400,fz:12,lh:"16px",onClick:()=>{m(b),Zu(w)},children:o("cancelSendBtn")})]}),d.jsx("div",{className:yE.progressContainer,children:d.jsx("div",{className:yE.progressBar,style:{animationDuration:`${mY}ms`,animationFillMode:"forwards"}})})]}),message:null,autoClose:!1})},[o,m]);return{initiateCancellableMessage:S.useCallback(b=>{y({message:b}),c.current&&clearTimeout(c.current),c.current=setTimeout(()=>{dh===b.Id.toString()&&(dh=null),Zu(b.Id.toString()),n==null||n(b)},mY)},[n,y])}};function Zet(){const t=me.c(3),e=re(FQ),n=zt();let r;return t[0]!==e||t[1]!==n?(r={generatePreviewLinks:async function(i){const a=i.filter(l=>!e[l.FileId]);if(a.length)try{const l=a.map(Jet),c=await Promise.all(l),u=Object.fromEntries(c.map(Qet));n(NCe(u))}catch(l){console.error(l)}}},t[0]=e,t[1]=n,t[2]=r):r=t[2],r}function Qet(t){const{id:e,url:n}=t;return[e,n]}function Jet(t){return U_({id:t.FileId,type:"file",lifeTime:10,accessType:0}).then(e=>({id:t.FileId,url:e.data.Url}))}async function ett(t,e,n){const r=t.map(({file:i})=>{const a=new FormData;return a.append("file",i),Iie(a,l=>{n[i.name]=l,e(c=>({...c,[i.name]:l}))})});return(await Promise.allSettled(r)).filter(i=>i.status==="fulfilled").map(i=>i.value).map(i=>({FileId:i.data.Id,FileName:i.data.Name,Size:i.data.Size,MimeType:i.data.MimeType}))}function ttt(t,e,n){let r=e.reduce((i,a)=>i+a.Size,0);const s=[],o=[];for(const i of t)r+i.size<=n?(s.push(i),r+=i.size):o.push(i);return{filtered:s,big:o}}async function ntt(t,e,n,r,s,o,i,a,l,c){var b;r(!0);const u={};let f=[];const h=25*1024*1024,{filtered:m,big:y}=ttt(t,n.values.Attachments,h);if(!m.length&&!y.length){r(!1);return}y.length&&(o(y),l(dd({id:c,opened:!0})));const v=m.map(w=>{const C=new File([w],w.name,{type:w.type});return f.push(C),{file:C,originalName:w.name}});s(f);try{const w=await ett(v,i,u);if(w.length){const C=(n.values.Attachments??[]).concat(w);n.setFieldValue("Attachments",C),e(C)}}catch(w){Ct.isAxiosError(w)&&((b=w.response)==null?void 0:b.status)===413&&(o(m),l(dd({id:c,opened:!0})))}finally{r(!1)}}function rtt(t,e,n){const r=me.c(4);let s;return r[0]!==e||r[1]!==t||r[2]!==n?(s=o=>{const i=o.map(stt);n(a=>[...a,...i]),i.forEach(a=>{t==null||t.chain().focus().insertContentAt(t.state.selection.anchor,{type:"attachmentBlock",attrs:{id:a.Id,fileType:a.MimeType,fileSize:a.Size,link:e,title:a.Name,uid:a.Uid}}).run()})},r[0]=e,r[1]=t,r[2]=n,r[3]=s):s=r[3],s}function stt(t){const{item:e,link:n}=t;return{Id:e.Id,Name:e.Name,FileId:e.FileId,Size:e.Size,MimeType:e.MimeType,Url:n.Url,Link:n.Link,Uid:n.Uid,AccessType:e.AccessType}}const ott="data:image/svg+xml,%3csvg%20width='14'%20height='14'%20viewBox='0%200%2014%2014'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M13%201L1%2013M1%201L13%2013'%20stroke='%23868E96'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e",itt=t=>{switch(t){case"pdf":case"application/pdf":return["span",{"data-file-type":t,style:"font-size: 7px; display: block; text-align: center; line-height: 3; align-items: center; justify-content: center; min-width: 22px; height: 22px; background-color: #f13e3e; color: white; font-weight: bold; font-family: Arial, sans-serif; border-radius: 4px; text-transform: uppercase;"},"PDF"];case"vnd.openxmlformats-officedocument.wordprocessingml.document":case"application/vnd.openxmlformats-officedocument.wordprocessingml.document":case"text/plain":case"msword":case"rtf":case"docx":case"vnd.oasis.opendocument.text":case"plain":case"txt":return["span",{"data-file-type":t,style:`
              display: block; text-align: center; line-height: 3; min-width: 22px; height: 22px; background-color: #228be6; color: white; font-size: 7px; font-weight: bold; font-family: Arial, sans-serif; border-radius: 4px; text-transform: uppercase;text-align: center;position: relative; 
              background-image:
              linear-gradient(#ffffff 0 0),
              linear-gradient(#ffffff 0 0),
              linear-gradient(#ffffff 0 0);
              background-size:14px 1px;
              background-position: center 5px,center 10px,center 15px;
              background-repeat:no-repeat;`}];case"vnd.openxmlformats-officedocument.spreadsheetml.sheet":case"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":case"vnd.oasis.opendocument.spreadsheet":case"vnd.ms-excel":case"csv":return["span",{"data-file-type":t,style:`
              display: block; text-align: center; line-height: 3; min-width: 22px; height: 22px; background-color: #37b24d; color: white; font-size: 7px; font-weight: bold; font-family: Arial, sans-serif; border-radius: 4px; text-transform: uppercase;text-align: center;position: relative; 
              background-image: linear-gradient(#fff 0 0),linear-gradient(#fff 0 0);
              background-size: 1px 17px, 17px 1px;
              background-position: calc(50% + -5px) calc(50% + 0px), calc(50% + -1px) calc(50% + -4px);
              background-repeat:no-repeat;`}];case"vnd.openxmlformats-officedocument.presentationml.presentation":case"application/vnd.openxmlformats-officedocument.presentationml.presentation":case"vnd.ms-powerpoint":case"vnd.oasis.opendocument.presentation":return["span",{"data-file-type":t,style:`
              display: block; text-align: center; line-height: 3; min-width: 22px; height: 22px; background-color: #f76706; color: white; font-size: 7px; font-weight: bold; font-family: Arial, sans-serif; border-radius: 4px; text-transform: uppercase;text-align: center;position: relative;
              background-image: conic-gradient(#ffffff 0 60deg , transparent 60deg 360deg),
              radial-gradient(circle at center, transparent 0 7px, #ffffff 6px 9px, transparent 8px);
              background-size:12px 14px,100% 100%;
              background-position:center;
              background-repeat:no-repeat; 
           `}];case"x-draw":case"application/x-draw":return["span",{"data-file-type":t,style:`
              display: block; text-align: center; line-height: 3; min-width: 22px; height: 22px; background-color: #e64980; color: white; font-size: 7px; font-weight: bold; font-family: Arial, sans-serif; border-radius: 4px; text-transform: uppercase;text-align: center;position: relative; 
              background-image: radial-gradient(circle at 9px 14px,transparent 0 5px,#ffffff 4px 6px,transparent 6px 100%),
              linear-gradient(#ffffff 0 0),          
              linear-gradient(#ffffff 0 0),           
              linear-gradient(#ffffff 0 0),           
              linear-gradient(#ffffff 0 0);       
              background-size:100% 100%,9px 1px,9px 1px,1px 9px,1px 9px; 
              background-position: center,10px 5px,10px 13px,10px 5px,18px 5px;         
              background-repeat:no-repeat;
          `}];case"image/gif":case"image/svg+xml":case"image/png":case"image/jpeg":case"image/jpg":case"jpeg":case"png":case"jpg":case"svg":case"svg + xml":case"webp":return["span",{"data-file-type":t,style:`
              display: block; text-align: center; line-height: 3; min-width: 22px; height: 22px; background-color: #4dacf7; color: white; font-size: 7px; font-weight: bold; font-family: Arial, sans-serif; border-radius: 4px; text-transform: uppercase;text-align: center;position: relative;
              background-image: radial-gradient(circle at 6px 6px, #ffffff 0 2px, transparent 2px 100%), linear-gradient(135deg, transparent 60%, #ffffff 60%), linear-gradient(225deg, transparent 60%, #ffffff 60%);
              background-size: 100% 100%, 50% 68%, 52% 68%; background-position: center, bottom left, bottom right; background-repeat:no-repeat;
          `},""];case"video/mp4":case"MPEG-4":case"webm":case"video/quicktime":case"mov":return["span",{"data-file-type":t,style:`display: block;min-width: 22px;height: 22px;background-color: #F59F00;border-radius: 4px;position: relative;line-height: 3;text-align: center;font-size: 7px;font-weight: bold;font-family: Arial, sans-serif;color: white;text-transform: uppercase;
          background-image: conic-gradient(
          from 224deg at 43% 50%,
          #ffffff 0deg 90deg,
          transparent 90deg 360deg);
          background-size: 70% 120%;
          background-position: 125% 60%;
          background-repeat: no-repeat; `}];case"audio/mpeg":return["span",{"data-file-type":t,style:`
              display: block; text-align: center; line-height: 3; min-width: 22px; height: 22px; background-color:rgb(196, 77, 247); color: white; font-size: 7px; font-weight: bold; font-family: Arial, sans-serif; border-radius: 4px; text-transform: uppercase;text-align: center;position: relative; `},"AUD"];default:return["span",{"data-file-type":t,style:`display: block;min-width: 22px;height: 22px;background-color: #baccdf;border-radius: 4px;position: relative;font-size: 0;            
           background-image:
           linear-gradient(135deg, transparent 0 49%, #ffffff 49% 51%, transparent 51% 100%),
           linear-gradient(#ffffff 0 0),
           linear-gradient(#ffffff 0 0),
           linear-gradient(#ffffff 0 0);
           background-size:10px 1px,10px 1px,10px 1px;
           background-position:6px 7px,6px 11px,6px 15px;background-repeat: no-repeat;`}]}},att=Es.create({name:"attachmentBlock",group:"block",inline:!1,atom:!0,selectable:!0,marks:"",addAttributes(){return{class:{default:null,parseHTML:t=>t.getAttribute("class"),renderHTML:t=>t.class?{class:t.class}:{}},fileType:{default:""},fileSize:{default:0,parseHTML:t=>{const e=t.getAttribute("data-attachment-size");return e?parseInt(e,10):0},renderHTML:t=>({"data-attachment-size":t.fileSize})},access:{default:"false",parseHTML:t=>t.getAttribute("data-access")??"false",renderHTML:t=>({"data-access":String(t.access)})},link:{default:""},title:{default:""},uid:{default:""},id:{default:""}}},parseHTML(){return[{tag:"span[data-attachment-link]",priority:1e3,getAttrs:t=>{var n,r,s;const e=t;return{id:e.getAttribute("data-attachment-id")||"",uid:e.getAttribute("data-attachment-uid")||"",link:((n=e.querySelector("a"))==null?void 0:n.getAttribute("href"))||"",title:((r=e.querySelector("a"))==null?void 0:r.textContent)||"",fileType:((s=e.querySelector("span[data-type]"))==null?void 0:s.textContent)||"",fileSize:parseInt(e.getAttribute("data-attachment-size")||"0",10),access:e.getAttribute("data-access")??"false"}}}]},renderHTML({node:t}){const{fileType:e,fileSize:n,title:r,link:s,uid:o,id:i,access:a}=t.attrs;return["span",{"data-attachment-link":"true","data-attachment-uid":o,"data-attachment-id":i,"data-attachment-size":n,"data-access":String(a),draggable:"true",contenteditable:"false",style:"display: flex; align-items: center; background: #f4f6f8; padding: 7px 5px; border-radius: 5px; cursor: pointer; max-width: 400px; overflow: hidden; margin-bottom: 5px; line-height: 1.7",onmouseover:"const icon = this.querySelector('[data-remove-attachment]');if (icon) icon.style.display = 'flex';",onmouseout:"const icon = this.querySelector('[data-remove-attachment]'); if (icon) icon.style.display = 'none';"},itt(e),["a",{href:gTe(s,o),target:"_blank",rel:"noopener noreferrer",style:"color: #343A40; font-size: 12px; margin-left: 10px; cursor: pointer; width: 100%; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; text-decoration: none",onmouseover:"this.style.textDecoration='underline';",onmouseout:"this.style.textDecoration='none';"},r],["span",{"data-type":e,style:"display: none"},e],["span",{"data-size":!0,style:"display: block; text-align: right; width: 100px; color: #848E9C; font-size: 12px; line-height: 1.8; white-space: nowrap; margin-left: 5px; margin-right: 4px;"},Xm(n)],["img",{id:"remove-icon-"+o,src:ott,alt:"close","data-remove-attachment":!0,style:"display: none; color: #848e9c; cursor: pointer; width: 10px; height: 10px; justify-content: center; align-items: center; margin: 0 10px;"}]]}});function Lie(t){const{test:e,style:n,getUrlFromParseEl:r,getUrlFromAttrs:s}=t;return{default:null,parseHTML:o=>{const i=r(o)||"";return e(i)?o.getAttribute("style"):null},renderHTML:o=>{const i=s(o)||"";return e(i)?{style:n}:{}}}}const ltt=/drive\.google\.com/i,ctt="display: inline-block;border: 1px solid #ddd;width:386px;padding:10px;background:#f5f5f5;margin:6px 0;color:#202124;text-decoration:none;",utt=Lie({test:t=>ltt.test(t),style:ctt,getUrlFromParseEl:t=>t.getAttribute("href")||"",getUrlFromAttrs:t=>String((t==null?void 0:t.href)??"")}),dtt="width:20px;height:20px;display:inline-block;vertical-align:middle;margin-bottom:0;margin-right:10px;",ftt=Lie({test:t=>/drive\.google\.com|googleusercontent\.com/i.test(t),style:dtt,getUrlFromParseEl:t=>t.getAttribute("src")||"",getUrlFromAttrs:t=>String((t==null?void 0:t.src)??"")}),ptt=Yn.create({name:"fontSize",addOptions(){return{types:["textStyle"]}},addGlobalAttributes(){return[{types:this.options.types,attributes:{fontSize:{default:null,parseHTML:t=>t.style.fontSize||null,renderHTML:t=>t.fontSize?{style:`font-size: ${t.fontSize}`}:{}}}}]},addCommands(){return{setFontSize:t=>({chain:e})=>e().setMark("textStyle",{fontSize:t}).run()}}}),htt=t=>{const e=me.c(34),{setResizing:n,MIN_WIDTH:r,MIN_HEIGHT:s,containerRef:o,setIsOriginalSize:i,setIsOptimalSize:a,setIsMinSize:l,updateAttributes:c}=t;let u;e[0]!==s||e[1]!==r||e[2]!==o||e[3]!==l||e[4]!==a||e[5]!==i||e[6]!==n||e[7]!==c?(u=(D,R)=>{var $,V,q;D.preventDefault(),n(!0);const N=D.clientX,z=(($=o.current)==null?void 0:$.offsetWidth)||100,B=((V=o.current)==null?void 0:V.offsetHeight)||100,L=(q=o.current)==null?void 0:q.children[0],P=L&&L.naturalWidth&&L.naturalHeight?L.naturalWidth/L.naturalHeight:z/B,I=U=>{i(!1),a(!1),l(!1);const W=U.clientX-N,Y=Number((W/P).toFixed(1)),K={"bottom-right":()=>({width:`${Math.max(r,z+W)}px`,height:`${Math.max(s,B+Y)}px`}),"top-right":()=>({width:`${Math.max(r,z+W)}px`,height:`${Math.max(s,B-Y)}px`}),"bottom-left":()=>({width:`${Math.max(r,z-W)}px`,height:`${Math.max(s,B+Y)}px`}),"top-left":()=>({width:`${Math.max(r,z-W)}px`,height:`${Math.max(s,B-Y)}px`})}[R];K&&c(K())},H=()=>{n(!1),document.removeEventListener("mousemove",I),document.removeEventListener("mouseup",H)};document.addEventListener("mousemove",I),document.addEventListener("mouseup",H)},e[0]=s,e[1]=r,e[2]=o,e[3]=l,e[4]=a,e[5]=i,e[6]=n,e[7]=c,e[8]=u):u=e[8];const f=u;let h;e[9]!==f?(h=D=>f(D,"top-right"),e[9]=f,e[10]=h):h=e[10];let m;e[11]===Symbol.for("react.memo_cache_sentinel")?(m={position:"absolute",top:-3,right:-3,width:10,height:10,background:"#238be6",borderRadius:"50%",cursor:"nesw-resize"},e[11]=m):m=e[11];let y;e[12]!==h?(y=d.jsx("div",{onMouseDown:h,"data-direction":"top-right",style:m}),e[12]=h,e[13]=y):y=e[13];let v;e[14]!==f?(v=D=>f(D,"bottom-right"),e[14]=f,e[15]=v):v=e[15];let b;e[16]===Symbol.for("react.memo_cache_sentinel")?(b={position:"absolute",bottom:3,right:-3,width:10,height:10,background:"#238be6",borderRadius:"50%",cursor:"nwse-resize"},e[16]=b):b=e[16];let w;e[17]!==v?(w=d.jsx("div",{onMouseDown:v,"data-direction":"bottom-right",style:b}),e[17]=v,e[18]=w):w=e[18];let C;e[19]!==f?(C=D=>f(D,"bottom-left"),e[19]=f,e[20]=C):C=e[20];let k;e[21]===Symbol.for("react.memo_cache_sentinel")?(k={position:"absolute",bottom:3,left:-3,width:10,height:10,background:"#238be6",borderRadius:"50%",cursor:"nesw-resize"},e[21]=k):k=e[21];let E;e[22]!==C?(E=d.jsx("div",{onMouseDown:C,"data-direction":"bottom-left",style:k}),e[22]=C,e[23]=E):E=e[23];let j;e[24]!==f?(j=D=>f(D,"top-left"),e[24]=f,e[25]=j):j=e[25];let A;e[26]===Symbol.for("react.memo_cache_sentinel")?(A={position:"absolute",top:-3,left:-3,width:10,height:10,background:"#238be6",borderRadius:"50%",cursor:"nwse-resize"},e[26]=A):A=e[26];let M;e[27]!==j?(M=d.jsx("div",{onMouseDown:j,"data-direction":"top-left",style:A}),e[27]=j,e[28]=M):M=e[28];let _;return e[29]!==E||e[30]!==M||e[31]!==y||e[32]!==w?(_=d.jsxs(ve,{children:[y,w,E,M]}),e[29]=E,e[30]=M,e[31]=y,e[32]=w,e[33]=_):_=e[33],_},mtt=t=>{const e=me.c(79),{isMinSize:n,setIsMinSize:r,isOptimalSize:s,setIsOptimalSize:o,isOriginalSize:i,setIsOriginalSize:a,isDeleteImg:l,setIsDeleteImg:c,updateAttributes:u,OPTIMAL_WIDTH:f,MIN_WIDTH:h,src:m,getPos:y,view:v}=t,{t:b}=Le(),[w,C]=S.useState(1);let k,E;e[0]!==m?(k=()=>{const Ce=new Image;Ce.src=m,Ce.onload=()=>{C(Ce.naturalWidth/Ce.naturalHeight)}},E=[m],e[0]=m,e[1]=k,e[2]=E):(k=e[1],E=e[2]),S.useEffect(k,E);let j;e[3]!==h||e[4]!==w||e[5]!==r||e[6]!==o||e[7]!==a||e[8]!==u?(j=()=>{u({width:`${h}px`,height:`${Number((h/w).toFixed(1))}px`}),r(!0),o(!1),a(!1)},e[3]=h,e[4]=w,e[5]=r,e[6]=o,e[7]=a,e[8]=u,e[9]=j):j=e[9];const A=j;let M;e[10]!==f||e[11]!==w||e[12]!==r||e[13]!==o||e[14]!==a||e[15]!==u?(M=()=>{u({width:`${f}px`,height:`${Number((f/w).toFixed(1))}px`}),o(!0),r(!1),a(!1)},e[10]=f,e[11]=w,e[12]=r,e[13]=o,e[14]=a,e[15]=u,e[16]=M):M=e[16];const _=M;let D;e[17]!==r||e[18]!==o||e[19]!==a||e[20]!==m||e[21]!==u?(D=()=>{const Ce=new Image;Ce.src=m,Ce.onload=()=>{u({width:`${Ce.naturalWidth}px`,height:`${Ce.naturalHeight}px`})},a(!0),o(!1),r(!1)},e[17]=r,e[18]=o,e[19]=a,e[20]=m,e[21]=u,e[22]=D):D=e[22];const R=D;let N;e[23]!==y||e[24]!==c||e[25]!==r||e[26]!==o||e[27]!==a||e[28]!==v?(N=()=>{const Ce=y();if(typeof Ce=="number"){const Te=v.state.tr.delete(Ce,Ce+1);v.dispatch(Te)}c(!0),a(!1),o(!1),r(!1)},e[23]=y,e[24]=c,e[25]=r,e[26]=o,e[27]=a,e[28]=v,e[29]=N):N=e[29];const z=N;let B;e[30]!==b?(B=b("resizableButtons.smallSize"),e[30]=b,e[31]=B):B=e[31];const L=n?"1px solid gray":"1px solid transparent";let P;e[32]!==L?(P={boxShadow:"0 2px 8px rgba(0, 0, 0, 0.25)",borderRadius:4,border:L},e[32]=L,e[33]=P):P=e[33];let I;e[34]===Symbol.for("react.memo_cache_sentinel")?(I=d.jsx(Zke,{size:15}),e[34]=I):I=e[34];let H;e[35]!==A||e[36]!==P?(H=d.jsx(Ve,{ml:"auto",mr:"xs",bg:"#fff",size:25,style:P,onClick:A,children:I}),e[35]=A,e[36]=P,e[37]=H):H=e[37];let $;e[38]!==H||e[39]!==B?($=d.jsx(on,{position:"top",label:B,children:H}),e[38]=H,e[39]=B,e[40]=$):$=e[40];let V;e[41]!==b?(V=b("resizableButtons.optimalSize"),e[41]=b,e[42]=V):V=e[42];const q=s?"1px solid gray":"1px solid transparent";let U;e[43]!==q?(U={boxShadow:"0 2px 8px rgba(0, 0, 0, 0.25)",borderRadius:4,border:q},e[43]=q,e[44]=U):U=e[44];let W;e[45]===Symbol.for("react.memo_cache_sentinel")?(W=d.jsx(i5e,{size:15}),e[45]=W):W=e[45];let Y;e[46]!==_||e[47]!==U?(Y=d.jsx(Ve,{ml:"auto",mr:"xs",bg:"#fff",size:25,style:U,onClick:_,children:W}),e[46]=_,e[47]=U,e[48]=Y):Y=e[48];let G;e[49]!==V||e[50]!==Y?(G=d.jsx(on,{position:"top",label:V,children:Y}),e[49]=V,e[50]=Y,e[51]=G):G=e[51];let K;e[52]!==b?(K=b("resizableButtons.originalSize"),e[52]=b,e[53]=K):K=e[53];const Q=i?"1px solid gray":"1px solid transparent";let Z;e[54]!==Q?(Z={boxShadow:"0 2px 8px rgba(0, 0, 0, 0.25)",borderRadius:4,border:Q},e[54]=Q,e[55]=Z):Z=e[55];let J;e[56]===Symbol.for("react.memo_cache_sentinel")?(J=d.jsx(cke,{size:15}),e[56]=J):J=e[56];let ne;e[57]!==R||e[58]!==Z?(ne=d.jsx(Ve,{ml:"auto",mr:"xs",bg:"#fff",size:25,style:Z,onClick:R,children:J}),e[57]=R,e[58]=Z,e[59]=ne):ne=e[59];let se;e[60]!==K||e[61]!==ne?(se=d.jsx(on,{position:"top",label:K,children:ne}),e[60]=K,e[61]=ne,e[62]=se):se=e[62];let ce;e[63]!==b?(ce=b("delete"),e[63]=b,e[64]=ce):ce=e[64];const fe=l?"1px solid gray":"1px solid transparent";let le;e[65]!==fe?(le={color:"red",boxShadow:"0 2px 8px rgba(0, 0, 0, 0.25)",borderRadius:4,border:fe},e[65]=fe,e[66]=le):le=e[66];let be;e[67]===Symbol.for("react.memo_cache_sentinel")?(be=d.jsx(Eo,{size:15}),e[67]=be):be=e[67];let je;e[68]!==z||e[69]!==le?(je=d.jsx(Ve,{ml:"auto",mr:"xs",bg:"#fff",size:25,style:le,onClick:z,children:be}),e[68]=z,e[69]=le,e[70]=je):je=e[70];let pe;e[71]!==ce||e[72]!==je?(pe=d.jsx(on,{position:"top",label:ce,children:je}),e[71]=ce,e[72]=je,e[73]=pe):pe=e[73];let _e;return e[74]!==$||e[75]!==G||e[76]!==se||e[77]!==pe?(_e=d.jsxs("div",{children:[$,G,se,pe]}),e[74]=$,e[75]=G,e[76]=se,e[77]=pe,e[78]=_e):_e=e[78],_e},gY=185,gtt=50,ytt=430;function vtt(t){const e=me.c(38),{node:n,updateAttributes:r,getPos:s,view:o}=t,{src:i,loading:a,width:l,height:c,background:u,border:f,objectFit:h}=n.attrs,m=S.useRef(null),[y,v]=S.useState(!1),[b,w]=S.useState(!1),[C,k]=S.useState(!1),[E,j]=S.useState(!1),[A,M]=S.useState(!1),[_,D]=S.useState(!1),R=xt(1024),N=a?f:b?"2px solid #238be6":"2px solid transparent";let z;e[0]!==s||e[1]!==_||e[2]!==C||e[3]!==E||e[4]!==A||e[5]!==i||e[6]!==r||e[7]!==o?(z={isMinSize:C,setIsMinSize:k,isOptimalSize:E,setIsOptimalSize:j,isOriginalSize:A,isDeleteImg:_,setIsDeleteImg:D,setIsOriginalSize:M,updateAttributes:r,OPTIMAL_WIDTH:ytt,MIN_WIDTH:gY,src:i,getPos:s,view:o},e[0]=s,e[1]=_,e[2]=C,e[3]=E,e[4]=A,e[5]=i,e[6]=r,e[7]=o,e[8]=z):z=e[8];const B=z;let L;e[9]!==r?(L={setResizing:v,containerRef:m,setIsOriginalSize:M,setIsOptimalSize:j,setIsMinSize:k,MIN_WIDTH:gY,MIN_HEIGHT:gtt,updateAttributes:r},e[9]=r,e[10]=L):L=e[10];const P=L;let I;e[11]===Symbol.for("react.memo_cache_sentinel")?(I=le=>{le.stopPropagation(),window.dispatchEvent(new CustomEvent("image-blur-all")),w(!0)},e[11]=I):I=e[11];const H=I;let $,V;e[12]===Symbol.for("react.memo_cache_sentinel")?($=()=>{const le=()=>w(!1);return window.addEventListener("image-blur-all",le),()=>window.removeEventListener("image-blur-all",le)},V=[],e[12]=$,e[13]=V):($=e[12],V=e[13]),S.useEffect($,V);let q;e[14]===Symbol.for("react.memo_cache_sentinel")?(q=[],e[14]=q):q=e[14],S.useEffect(btt,q);const U=R?"":20;let W;e[15]!==U||e[16]!==l?(W={position:"relative",display:"inline-block",width:l,height:"auto",border:"none",maxWidth:"100%",marginBottom:U,cursor:"pointer",zIndex:1},e[15]=U,e[16]=l,e[17]=W):W=e[17];const Y=a?"100%":l,G=a?c:"auto",K=a?h:"cover",Q=a?u:"none",Z=a&&y?.5:1,J=R?"":N;let ne;e[18]!==K||e[19]!==Q||e[20]!==Z||e[21]!==J||e[22]!==Y||e[23]!==G?(ne={width:Y,height:G,objectFit:K,background:Q,opacity:Z,pointerEvents:"none",marginBottom:0,border:J},e[18]=K,e[19]=Q,e[20]=Z,e[21]=J,e[22]=Y,e[23]=G,e[24]=ne):ne=e[24];let se;e[25]!==i||e[26]!==ne?(se=d.jsx("img",{src:i,alt:"img",style:ne}),e[25]=i,e[26]=ne,e[27]=se):se=e[27];let ce;e[28]!==P||e[29]!==B||e[30]!==R||e[31]!==a||e[32]!==b?(ce=!a&&b&&d.jsxs(d.Fragment,{children:[!R&&d.jsx(htt,{...P}),d.jsx("div",{style:{position:"relative"},children:d.jsxs(et,{transitionProps:{transition:"rotate-right",duration:150},shadow:"md",width:200,position:"right",withinPortal:!1,children:[d.jsx(et.Target,{children:d.jsx(Ve,{ml:"auto",mr:"xs",bg:"#fff",size:25,style:{position:"absolute",bottom:15,left:8,boxShadow:"0 2px 8px rgba(0, 0, 0, 0.25)",borderRadius:4},children:d.jsx(Rc,{size:15})})}),d.jsx(et.Dropdown,{style:{backgroundColor:"transparent",boxShadow:"none",border:"none",zIndex:1},children:d.jsx(mtt,{...B})})]})})]}),e[28]=P,e[29]=B,e[30]=R,e[31]=a,e[32]=b,e[33]=ce):ce=e[33];let fe;return e[34]!==se||e[35]!==ce||e[36]!==W?(fe=d.jsx(VBe,{as:"span",children:d.jsxs("div",{className:"image-wrapper",ref:m,onClick:H,style:W,children:[se,ce]})}),e[34]=se,e[35]=ce,e[36]=W,e[37]=fe):fe=e[37],fe}function btt(){const t=xtt;return document.addEventListener("click",t,!0),()=>{document.removeEventListener("click",t,!0)}}function xtt(t){t.target.closest(".image-wrapper")||window.dispatchEvent(new CustomEvent("image-blur-all"))}const wtt=Es.create({name:"loadingImage",group:"inline",inline:!0,selectable:!0,atom:!0,addAttributes(){return{src:{default:null},alt:{default:"Loading..."},loading:{default:!0},placeholderId:{default:null},style:{default:""},width:{default:"auto"},height:{default:"auto"},background:{default:"transparent"},border:{default:"none"},objectFit:{default:"cover"},dataLoader:{default:null}}},parseHTML(){return[{tag:"img[data-loading]"}]},renderHTML({HTMLAttributes:t}){return["img",rr(t,{"data-loading":"",...t.dataLoader?{"data-loader":t.dataLoader}:{}})]},addNodeView(){return XBe(vtt)}}),aI=t=>Object.entries(t).map(([e,n])=>`${e}:${n}`).join(";"),Stt={"border-collapse":"collapse",width:"100%",margin:"8px 0","table-layout":"fixed"},$ie={border:"1px solid #ddd",padding:"8px","vertical-align":"top","min-width":"0","overflow-wrap":"anywhere","word-break":"break-word"},Ctt={...$ie,background:"#f5f5f5","font-weight":"600","text-align":"left"},ktt={style:aI(Stt)},Ett={style:aI(Ctt)},Ttt={style:aI($ie)};function Mtt(t,e){const n=Math.min(t.top,e.top),r=Math.max(t.bottom,e.bottom),s=Math.min(t.left,e.left),i=Math.max(t.right,e.right)-s,a=r-n,l=s,c=n;return new DOMRect(l,c,i,a)}var jtt=class{constructor({editor:t,element:e,view:n,updateDelay:r=250,resizeDelay:s=60,shouldShow:o,appendTo:i,getReferencedVirtualElement:a,options:l}){this.preventHide=!1,this.isVisible=!1,this.scrollTarget=window,this.floatingUIOptions={strategy:"absolute",placement:"top",offset:8,flip:{},shift:{},arrow:!1,size:!1,autoPlacement:!1,hide:!1,inline:!1,onShow:void 0,onHide:void 0,onUpdate:void 0,onDestroy:void 0},this.shouldShow=({view:u,state:f,from:h,to:m})=>{const{doc:y,selection:v}=f,{empty:b}=v,w=!y.textBetween(h,m).length&&fD(f.selection),C=this.element.contains(document.activeElement);return!(!(u.hasFocus()||C)||b||w||!this.editor.isEditable)},this.mousedownHandler=()=>{this.preventHide=!0},this.dragstartHandler=()=>{this.hide()},this.resizeHandler=()=>{this.resizeDebounceTimer&&clearTimeout(this.resizeDebounceTimer),this.resizeDebounceTimer=window.setTimeout(()=>{this.updatePosition()},this.resizeDelay)},this.focusHandler=()=>{setTimeout(()=>this.update(this.editor.view))},this.blurHandler=({event:u})=>{var f;if(this.editor.isDestroyed){this.destroy();return}if(this.preventHide){this.preventHide=!1;return}u!=null&&u.relatedTarget&&((f=this.element.parentNode)!=null&&f.contains(u.relatedTarget))||(u==null?void 0:u.relatedTarget)!==this.editor.view.dom&&this.hide()},this.handleDebouncedUpdate=(u,f)=>{const h=!(f!=null&&f.selection.eq(u.state.selection)),m=!(f!=null&&f.doc.eq(u.state.doc));!h&&!m||(this.updateDebounceTimer&&clearTimeout(this.updateDebounceTimer),this.updateDebounceTimer=window.setTimeout(()=>{this.updateHandler(u,h,m,f)},this.updateDelay))},this.updateHandler=(u,f,h,m)=>{const{composing:y}=u;if(y||!f&&!h)return;if(!this.getShouldShow(m)){this.hide();return}this.updatePosition(),this.show()},this.transactionHandler=({transaction:u})=>{const f=u.getMeta("bubbleMenu");f==="updatePosition"?this.updatePosition():f&&typeof f=="object"&&f.type==="updateOptions"&&this.updateOptions(f.options)};var c;this.editor=t,this.element=e,this.view=n,this.updateDelay=r,this.resizeDelay=s,this.appendTo=i,this.scrollTarget=(c=l==null?void 0:l.scrollTarget)!=null?c:window,this.getReferencedVirtualElement=a,this.floatingUIOptions={...this.floatingUIOptions,...l},this.element.tabIndex=0,o&&(this.shouldShow=o),this.element.addEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.view.dom.addEventListener("dragstart",this.dragstartHandler),this.editor.on("focus",this.focusHandler),this.editor.on("blur",this.blurHandler),this.editor.on("transaction",this.transactionHandler),window.addEventListener("resize",this.resizeHandler),this.scrollTarget.addEventListener("scroll",this.resizeHandler),this.update(n,n.state),this.getShouldShow()&&(this.show(),this.updatePosition())}get middlewares(){const t=[];return this.floatingUIOptions.flip&&t.push(Ej(typeof this.floatingUIOptions.flip!="boolean"?this.floatingUIOptions.flip:void 0)),this.floatingUIOptions.shift&&t.push(kj(typeof this.floatingUIOptions.shift!="boolean"?this.floatingUIOptions.shift:void 0)),this.floatingUIOptions.offset&&t.push(Cj(typeof this.floatingUIOptions.offset!="boolean"?this.floatingUIOptions.offset:void 0)),this.floatingUIOptions.arrow&&t.push(Vx(this.floatingUIOptions.arrow)),this.floatingUIOptions.size&&t.push(Tj(typeof this.floatingUIOptions.size!="boolean"?this.floatingUIOptions.size:void 0)),this.floatingUIOptions.autoPlacement&&t.push(bK(typeof this.floatingUIOptions.autoPlacement!="boolean"?this.floatingUIOptions.autoPlacement:void 0)),this.floatingUIOptions.hide&&t.push(Mj(typeof this.floatingUIOptions.hide!="boolean"?this.floatingUIOptions.hide:void 0)),this.floatingUIOptions.inline&&t.push(jj(typeof this.floatingUIOptions.inline!="boolean"?this.floatingUIOptions.inline:void 0)),t}get virtualElement(){var t,e,n;const{selection:r}=this.editor.state,s=(t=this.getReferencedVirtualElement)==null?void 0:t.call(this);if(s)return s;if(!((n=(e=this.view)==null?void 0:e.dom)!=null&&n.parentNode))return;const o=Vre(this.view,r.from,r.to);let i={getBoundingClientRect:()=>o,getClientRects:()=>[o]};if(r instanceof Jt){let a=this.view.nodeDOM(r.from);const l=a.dataset.nodeViewWrapper?a:a.querySelector("[data-node-view-wrapper]");l&&(a=l),a&&(i={getBoundingClientRect:()=>a.getBoundingClientRect(),getClientRects:()=>[a.getBoundingClientRect()]})}if(r instanceof wr){const{$anchorCell:a,$headCell:l}=r,c=a?a.pos:l.pos,u=l?l.pos:a.pos,f=this.view.nodeDOM(c),h=this.view.nodeDOM(u);if(!f||!h)return;const m=f===h?f.getBoundingClientRect():Mtt(f.getBoundingClientRect(),h.getBoundingClientRect());i={getBoundingClientRect:()=>m,getClientRects:()=>[m]}}return i}updatePosition(){const t=this.virtualElement;t&&Aj(t,this.element,{placement:this.floatingUIOptions.placement,strategy:this.floatingUIOptions.strategy,middleware:this.middlewares}).then(({x:e,y:n,strategy:r,middlewareData:s})=>{var o,i;if((o=s.hide)!=null&&o.referenceHidden||(i=s.hide)!=null&&i.escaped){this.element.style.visibility="hidden";return}this.element.style.visibility="visible",this.element.style.width="max-content",this.element.style.position=r,this.element.style.left=`${e}px`,this.element.style.top=`${n}px`,this.isVisible&&this.floatingUIOptions.onUpdate&&this.floatingUIOptions.onUpdate()})}update(t,e){const{state:n}=t,r=n.selection.from!==n.selection.to;if(this.updateDelay>0&&r){this.handleDebouncedUpdate(t,e);return}const s=!(e!=null&&e.selection.eq(t.state.selection)),o=!(e!=null&&e.doc.eq(t.state.doc));this.updateHandler(t,s,o,e)}getShouldShow(t){var e;const{state:n}=this.view,{selection:r}=n,{ranges:s}=r,o=Math.min(...s.map(l=>l.$from.pos)),i=Math.max(...s.map(l=>l.$to.pos));return((e=this.shouldShow)==null?void 0:e.call(this,{editor:this.editor,element:this.element,view:this.view,state:n,oldState:t,from:o,to:i}))||!1}show(){var t;if(this.isVisible)return;this.element.style.visibility="visible",this.element.style.opacity="1";const e=typeof this.appendTo=="function"?this.appendTo():this.appendTo;(t=e??this.view.dom.parentElement)==null||t.appendChild(this.element),this.floatingUIOptions.onShow&&this.floatingUIOptions.onShow(),this.isVisible=!0}hide(){this.isVisible&&(this.element.style.visibility="hidden",this.element.style.opacity="0",this.element.remove(),this.floatingUIOptions.onHide&&this.floatingUIOptions.onHide(),this.isVisible=!1)}updateOptions(t){var e;if(t.updateDelay!==void 0&&(this.updateDelay=t.updateDelay),t.resizeDelay!==void 0&&(this.resizeDelay=t.resizeDelay),t.appendTo!==void 0&&(this.appendTo=t.appendTo),t.getReferencedVirtualElement!==void 0&&(this.getReferencedVirtualElement=t.getReferencedVirtualElement),t.shouldShow!==void 0&&t.shouldShow&&(this.shouldShow=t.shouldShow),t.options!==void 0){const n=(e=t.options.scrollTarget)!=null?e:window;n!==this.scrollTarget&&(this.scrollTarget.removeEventListener("scroll",this.resizeHandler),this.scrollTarget=n,this.scrollTarget.addEventListener("scroll",this.resizeHandler)),this.floatingUIOptions={...this.floatingUIOptions,...t.options}}}destroy(){this.hide(),this.element.removeEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.view.dom.removeEventListener("dragstart",this.dragstartHandler),window.removeEventListener("resize",this.resizeHandler),this.scrollTarget.removeEventListener("scroll",this.resizeHandler),this.editor.off("focus",this.focusHandler),this.editor.off("blur",this.blurHandler),this.editor.off("transaction",this.transactionHandler),this.floatingUIOptions.onDestroy&&this.floatingUIOptions.onDestroy()}},Fie=t=>new Sr({key:typeof t.pluginKey=="string"?new Pr(t.pluginKey):t.pluginKey,view:e=>new jtt({view:e,...t})});Yn.create({name:"bubbleMenu",addOptions(){return{element:null,pluginKey:"bubbleMenu",updateDelay:void 0,appendTo:void 0,shouldShow:null}},addProseMirrorPlugins(){return this.options.element?[Fie({pluginKey:this.options.pluginKey,editor:this.editor,element:this.options.element,updateDelay:this.options.updateDelay,options:this.options.options,appendTo:this.options.appendTo,getReferencedVirtualElement:this.options.getReferencedVirtualElement,shouldShow:this.options.shouldShow})]:[]}});var Att=class{constructor({editor:t,element:e,view:n,updateDelay:r=250,resizeDelay:s=60,options:o,appendTo:i,shouldShow:a}){this.preventHide=!1,this.isVisible=!1,this.scrollTarget=window,this.shouldShow=({view:c,state:u})=>{const{selection:f}=u,{$anchor:h,empty:m}=f,y=h.depth===1,v=h.parent.isTextblock&&!h.parent.type.spec.code&&!h.parent.textContent&&h.parent.childCount===0&&!this.getTextContent(h.parent);return!(!c.hasFocus()||!m||!y||!v||!this.editor.isEditable)},this.floatingUIOptions={strategy:"absolute",placement:"right",offset:8,flip:{},shift:{},arrow:!1,size:!1,autoPlacement:!1,hide:!1,inline:!1},this.updateHandler=(c,u,f,h)=>{const{composing:m}=c;if(m||!u&&!f)return;if(!this.getShouldShow(h)){this.hide();return}this.updatePosition(),this.show()},this.mousedownHandler=()=>{this.preventHide=!0},this.focusHandler=()=>{setTimeout(()=>this.update(this.editor.view))},this.blurHandler=({event:c})=>{var u;if(this.preventHide){this.preventHide=!1;return}c!=null&&c.relatedTarget&&((u=this.element.parentNode)!=null&&u.contains(c.relatedTarget))||(c==null?void 0:c.relatedTarget)!==this.editor.view.dom&&this.hide()},this.transactionHandler=({transaction:c})=>{const u=c.getMeta("floatingMenu");u==="updatePosition"?this.updatePosition():u&&typeof u=="object"&&u.type==="updateOptions"&&this.updateOptions(u.options)},this.resizeHandler=()=>{this.resizeDebounceTimer&&clearTimeout(this.resizeDebounceTimer),this.resizeDebounceTimer=window.setTimeout(()=>{this.updatePosition()},this.resizeDelay)};var l;this.editor=t,this.element=e,this.view=n,this.updateDelay=r,this.resizeDelay=s,this.appendTo=i,this.scrollTarget=(l=o==null?void 0:o.scrollTarget)!=null?l:window,this.floatingUIOptions={...this.floatingUIOptions,...o},this.element.tabIndex=0,a&&(this.shouldShow=a),this.element.addEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.editor.on("focus",this.focusHandler),this.editor.on("blur",this.blurHandler),this.editor.on("transaction",this.transactionHandler),window.addEventListener("resize",this.resizeHandler),this.scrollTarget.addEventListener("scroll",this.resizeHandler),this.update(n,n.state),this.getShouldShow()&&(this.show(),this.updatePosition())}getTextContent(t){return Fre(t,{textSerializers:mD(this.editor.schema)})}get middlewares(){const t=[];return this.floatingUIOptions.flip&&t.push(Ej(typeof this.floatingUIOptions.flip!="boolean"?this.floatingUIOptions.flip:void 0)),this.floatingUIOptions.shift&&t.push(kj(typeof this.floatingUIOptions.shift!="boolean"?this.floatingUIOptions.shift:void 0)),this.floatingUIOptions.offset&&t.push(Cj(typeof this.floatingUIOptions.offset!="boolean"?this.floatingUIOptions.offset:void 0)),this.floatingUIOptions.arrow&&t.push(Vx(this.floatingUIOptions.arrow)),this.floatingUIOptions.size&&t.push(Tj(typeof this.floatingUIOptions.size!="boolean"?this.floatingUIOptions.size:void 0)),this.floatingUIOptions.autoPlacement&&t.push(bK(typeof this.floatingUIOptions.autoPlacement!="boolean"?this.floatingUIOptions.autoPlacement:void 0)),this.floatingUIOptions.hide&&t.push(Mj(typeof this.floatingUIOptions.hide!="boolean"?this.floatingUIOptions.hide:void 0)),this.floatingUIOptions.inline&&t.push(jj(typeof this.floatingUIOptions.inline!="boolean"?this.floatingUIOptions.inline:void 0)),t}getShouldShow(t){var e;const{state:n}=this.view,{selection:r}=n,{ranges:s}=r,o=Math.min(...s.map(l=>l.$from.pos)),i=Math.max(...s.map(l=>l.$to.pos));return(e=this.shouldShow)==null?void 0:e.call(this,{editor:this.editor,view:this.view,state:n,oldState:t,from:o,to:i})}updateOptions(t){var e;if(t.updateDelay!==void 0&&(this.updateDelay=t.updateDelay),t.resizeDelay!==void 0&&(this.resizeDelay=t.resizeDelay),t.appendTo!==void 0&&(this.appendTo=t.appendTo),t.shouldShow!==void 0&&t.shouldShow&&(this.shouldShow=t.shouldShow),t.options!==void 0){const n=(e=t.options.scrollTarget)!=null?e:window;n!==this.scrollTarget&&(this.scrollTarget.removeEventListener("scroll",this.resizeHandler),this.scrollTarget=n,this.scrollTarget.addEventListener("scroll",this.resizeHandler)),this.floatingUIOptions={...this.floatingUIOptions,...t.options}}}updatePosition(){const{selection:t}=this.editor.state,e=Vre(this.view,t.from,t.to);Aj({getBoundingClientRect:()=>e,getClientRects:()=>[e]},this.element,{placement:this.floatingUIOptions.placement,strategy:this.floatingUIOptions.strategy,middleware:this.middlewares}).then(({x:r,y:s,strategy:o,middlewareData:i})=>{var a,l;if((a=i.hide)!=null&&a.referenceHidden||(l=i.hide)!=null&&l.escaped){this.element.style.visibility="hidden";return}this.element.style.visibility="visible",this.element.style.width="max-content",this.element.style.position=o,this.element.style.left=`${r}px`,this.element.style.top=`${s}px`,this.isVisible&&this.floatingUIOptions.onUpdate&&this.floatingUIOptions.onUpdate()})}update(t,e){const n=!(e!=null&&e.selection.eq(t.state.selection)),r=!(e!=null&&e.doc.eq(t.state.doc));this.updateHandler(t,n,r,e)}show(){var t;if(this.isVisible)return;this.element.style.visibility="visible",this.element.style.opacity="1";const e=typeof this.appendTo=="function"?this.appendTo():this.appendTo;(t=e??this.view.dom.parentElement)==null||t.appendChild(this.element),this.floatingUIOptions.onShow&&this.floatingUIOptions.onShow(),this.isVisible=!0}hide(){this.isVisible&&(this.element.style.visibility="hidden",this.element.style.opacity="0",this.element.remove(),this.floatingUIOptions.onHide&&this.floatingUIOptions.onHide(),this.isVisible=!1)}destroy(){this.hide(),this.element.removeEventListener("mousedown",this.mousedownHandler,{capture:!0}),window.removeEventListener("resize",this.resizeHandler),this.scrollTarget.removeEventListener("scroll",this.resizeHandler),this.editor.off("focus",this.focusHandler),this.editor.off("blur",this.blurHandler),this.editor.off("transaction",this.transactionHandler),this.floatingUIOptions.onDestroy&&this.floatingUIOptions.onDestroy()}},zie=t=>new Sr({key:typeof t.pluginKey=="string"?new Pr(t.pluginKey):t.pluginKey,view:e=>new Att({view:e,...t})});Yn.create({name:"floatingMenu",addOptions(){return{element:null,options:{},pluginKey:"floatingMenu",updateDelay:void 0,resizeDelay:void 0,appendTo:void 0,shouldShow:null}},addCommands(){return{updateFloatingMenuPosition:()=>({tr:t,dispatch:e})=>(e&&t.setMeta("floatingMenu","updatePosition"),!0)}},addProseMirrorPlugins(){return this.options.element?[zie({pluginKey:this.options.pluginKey,editor:this.editor,element:this.options.element,updateDelay:this.options.updateDelay,resizeDelay:this.options.resizeDelay,options:this.options.options,appendTo:this.options.appendTo,shouldShow:this.options.shouldShow})]:[]}});var _tt=It.forwardRef(({pluginKey:t="bubbleMenu",editor:e,updateDelay:n,resizeDelay:r,appendTo:s,shouldShow:o=null,getReferencedVirtualElement:i,options:a,children:l,...c},u)=>{const f=S.useRef(document.createElement("div"));typeof u=="function"?u(f.current):u&&(u.current=f.current);const{editor:h}=Cse(),m=e||h,y={updateDelay:n,resizeDelay:r,appendTo:s,pluginKey:t,shouldShow:o,getReferencedVirtualElement:i,options:a},v=S.useRef(y);v.current=y;const[b,w]=S.useState(!1),C=S.useRef(!0);return S.useEffect(()=>{if(m!=null&&m.isDestroyed)return;if(!m){console.warn("BubbleMenu component is not rendered inside of an editor component or does not have editor prop.");return}const k=f.current;k.style.visibility="hidden",k.style.position="absolute";const E=Fie({...v.current,editor:m,element:k});m.registerPlugin(E);const j=v.current.pluginKey;return C.current=!0,w(!0),()=>{w(!1),m.unregisterPlugin(j),window.requestAnimationFrame(()=>{k.parentNode&&k.parentNode.removeChild(k)})}},[m]),S.useEffect(()=>{if(!(!b||!m||m.isDestroyed)){if(C.current){C.current=!1;return}m.view.dispatch(m.state.tr.setMeta("bubbleMenu",{type:"updateOptions",options:v.current}))}},[b,m,n,r,o,a,s,i]),Xo.createPortal(d.jsx("div",{...c,children:l}),f.current)});It.forwardRef(({pluginKey:t="floatingMenu",editor:e,updateDelay:n,resizeDelay:r,appendTo:s,shouldShow:o=null,options:i,children:a,...l},c)=>{const u=S.useRef(document.createElement("div"));typeof c=="function"?c(u.current):c&&(c.current=u.current);const{editor:f}=Cse(),h=e||f,m={updateDelay:n,resizeDelay:r,appendTo:s,pluginKey:t,shouldShow:o,options:i},y=S.useRef(m);y.current=m;const[v,b]=S.useState(!1),w=S.useRef(!0);return S.useEffect(()=>{if(h!=null&&h.isDestroyed)return;if(!h){console.warn("FloatingMenu component is not rendered inside of an editor component or does not have editor prop.");return}const C=u.current;C.style.visibility="hidden",C.style.position="absolute";const k=zie({...y.current,editor:h,element:C});h.registerPlugin(k);const E=y.current.pluginKey;return w.current=!0,b(!0),()=>{b(!1),h.unregisterPlugin(E),window.requestAnimationFrame(()=>{C.parentNode&&C.parentNode.removeChild(C)})}},[h]),S.useEffect(()=>{if(!(!v||!h||h.isDestroyed)){if(w.current){w.current=!1;return}h.view.dispatch(h.state.tr.setMeta("floatingMenu",{type:"updateOptions",options:y.current}))}},[v,h,n,r,o,i,s]),Xo.createPortal(d.jsx("div",{...l,children:a}),u.current)});const Rtt=t=>{const e=me.c(5),n=S.useContext(Mi);if(!n)throw new Error("Ошибка провайдера");const{windows:r}=n;let s;if(e[0]!==t||e[1]!==r){let o;e[3]!==t?(o=i=>i.id===t,e[3]=t,e[4]=o):o=e[4],s=r.find(o),e[0]=t,e[1]=r,e[2]=s}else s=e[2];return s},yY=t=>{const e=me.c(9),{editor:n}=t,{t:r}=Le();let s;e[0]!==n?(s=()=>{n&&n.chain().focus().clearNodes().unsetAllMarks().setParagraph().unsetTextAlign().unsetFontFamily().unsetColor().run()},e[0]=n,e[1]=s):s=e[1];const o=s;let i;e[2]!==r?(i=r("clearFormatting"),e[2]=r,e[3]=i):i=e[3];let a,l;e[4]===Symbol.for("react.memo_cache_sentinel")?(a={"&:hover":{backgroundColor:"#f1f3f5"}},l=d.jsx(R5e,{size:20,stroke:1.5}),e[4]=a,e[5]=l):(a=e[4],l=e[5]);let c;return e[6]!==o||e[7]!==i?(c=d.jsx(Ve,{onClick:o,title:i,variant:"subtle",size:25,w:32,h:32,sx:a,children:l}),e[6]=o,e[7]=i,e[8]=c):c=e[8],c},Dtt=t=>{const e=me.c(31),{editor:n,window:r}=t,[s,o]=S.useState(""),[i,a]=S.useState(""),[l,c]=S.useState(null),u=xt(1024),f=u?"bottom":"top",{t:h}=Le(),m=[{textColor:{title:h("toolbar.colors.titles.textColor"),colors:[{color:"#ffffff",label:h("toolbar.colors.actionColors.white"),name:"white"},{color:"#343A40",label:h("toolbar.colors.actionColors.black"),name:"black"},{color:"#868e96",label:h("toolbar.colors.actionColors.gray"),name:"gray"},{color:"#fa5252",label:h("toolbar.colors.actionColors.red"),name:"red"},{color:"#e64980",label:h("toolbar.colors.actionColors.pink"),name:"pink"},{color:"#be4bdb",label:h("toolbar.colors.actionColors.purple"),name:"purple"},{color:"#7950f2",label:h("toolbar.colors.actionColors.violet"),name:"violet"},{color:"#4c6ef5",label:h("toolbar.colors.actionColors.blue"),name:"blue"},{color:"#228be6",label:h("toolbar.colors.actionColors.skyBlue"),name:"skyBlue"},{color:"#15aabf",label:h("toolbar.colors.actionColors.cyan"),name:"cyan"},{color:"#12b886",label:h("toolbar.colors.actionColors.mint"),name:"mint"},{color:"#40c057",label:h("toolbar.colors.actionColors.green"),name:"green"},{color:"#82c91e",label:h("toolbar.colors.actionColors.lime"),name:"lime"},{color:"#fab005",label:h("toolbar.colors.actionColors.yellow"),name:"yellow"},{color:"#fd7e14",label:h("toolbar.colors.actionColors.orange"),name:"orange"}]},backgroundColor:{title:h("toolbar.colors.titles.backgroundColor"),bg:[{background:"#ffffff",label:h("toolbar.colors.actionColors.white"),name:"white"},{background:"#4d4d4e",label:h("toolbar.colors.actionColors.black"),name:"black"},{background:"#ced4da",label:h("toolbar.colors.actionColors.gray"),name:"gray"},{background:"#ffc9c9",label:h("toolbar.colors.actionColors.red"),name:"red"},{background:"#ffb8d2",label:h("toolbar.colors.actionColors.pink"),name:"pink"},{background:"#e5b8ff",label:h("toolbar.colors.actionColors.purple"),name:"purple"},{background:"#c5b3ff",label:h("toolbar.colors.actionColors.violet"),name:"violet"},{background:"#a5b8ff",label:h("toolbar.colors.actionColors.blue"),name:"blue"},{background:"#99d0ff",label:h("toolbar.colors.actionColors.skyBlue"),name:"skyBlue"},{background:"#8ce2eb",label:h("toolbar.colors.actionColors.cyan"),name:"cyan"},{background:"#87e4c6",label:h("toolbar.colors.actionColors.mint"),name:"mint"},{background:"#9be090",label:h("toolbar.colors.actionColors.green"),name:"green"},{background:"#c0e676",label:h("toolbar.colors.actionColors.lime"),name:"lime"},{background:"#ffe066",label:h("toolbar.colors.actionColors.yellow"),name:"yellow"},{background:"#ffc078",label:h("toolbar.colors.actionColors.orange"),name:"orange"}]}}],y=(W,Y)=>{c(W),!(!n||!Y)&&(W==="text"?(o(Y),n.chain().focus().setColor(Y).run()):W==="background"?(a(Y),n.chain().focus().setBackgroundColor(Y).run()):(o(""),a("")))};let v;e[0]!==n?(v=()=>{const W=()=>{const Y=(n==null?void 0:n.getAttributes("textStyle").color)||"",G=(n==null?void 0:n.getAttributes("textStyle").backgroundColor)||"";o(Y),a(G)};return n==null||n.on("selectionUpdate",W),n==null||n.on("transaction",W),W(),()=>{n==null||n.off("selectionUpdate",W),n==null||n.off("transaction",W)}},e[0]=n,e[1]=v):v=e[1];let b;e[2]!==l||e[3]!==n?(b=[n,l],e[2]=l,e[3]=n,e[4]=b):b=e[4],S.useEffect(v,b);const w=Dt,C=295,k="md",E=u||!(r!=null&&r.isFullScreen),j=199;let A;e[5]!==h?(A=h("selectColor"),e[5]=h,e[6]=A):A=e[6];let M;e[7]===Symbol.for("react.memo_cache_sentinel")?(M={"&:hover":{backgroundColor:"#f1f3f5!important"}},e[7]=M):M=e[7];const _=s?`1px solid ${s}`:"1px solid #000";let D;e[8]!==i||e[9]!==_?(D={display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:i,width:18,height:18,borderRadius:"50%",border:_},e[8]=i,e[9]=_,e[10]=D):D=e[10];const R=s||"#000";let N;e[11]!==R?(N=d.jsx(Jz,{size:10,color:R}),e[11]=R,e[12]=N):N=e[12];let z;e[13]!==D||e[14]!==N?(z=d.jsx("span",{style:D,children:N}),e[13]=D,e[14]=N,e[15]=z):z=e[15];let B;e[16]!==z||e[17]!==A?(B=d.jsx(Dt.Target,{children:d.jsx(yt,{title:A,sx:M,bg:"transparent",w:32,h:32,p:0,type:"button",children:z})}),e[16]=z,e[17]=A,e[18]=B):B=e[18];const L=Dt,P=10,I=xe,H=10,$=m.map(W=>{const{textColor:Y,backgroundColor:G}=W;return d.jsxs(It.Fragment,{children:[d.jsxs(ve,{gap:0,children:[d.jsx(Ca,{c:"#818da1",fw:400,fz:12,mb:10,m:0,children:Y.title}),d.jsx(ie,{sx:{display:"flex",justifyContent:"left",flexWrap:"wrap",gap:8},children:Y.colors.slice(1).map(K=>d.jsx(on,{label:K.label,disabled:u,children:d.jsx(yt,{bg:"transparent",w:26,h:26,p:0,type:"button",onClick:()=>y("text",K.color),sx:{"&:hover":{transform:u?"":"translateY(-1px)",boxShadow:"0 0 0 2px rgba(0,0,0,0.06) inset, 0 1px 4px rgba(0,0,0,0.12)",filter:"brightness(1.05)"}},style:{minWidth:0,borderRadius:5,transition:"0.13s",border:s===K.color?`2px solid ${K.name==="white"?"#000":K.color}`:`1px solid ${K.name==="white"?"#000":K.color}`},children:d.jsx(Jz,{size:13,color:K.color})},K.color)},K.color))})]}),d.jsxs(ve,{gap:0,children:[d.jsx(Ca,{c:"#818da1",fw:400,fz:12,mb:10,m:0,children:G.title}),d.jsx(ie,{sx:{display:"flex",justifyContent:"left",flexWrap:"wrap",gap:8},children:G.bg.map(K=>d.jsx(on,{label:K.label,disabled:u,children:d.jsx(yt,{w:26,h:26,p:0,type:"button",onClick:()=>y("background",K.background),sx:{"&:hover":{transform:u?"":"translateY(-1px)",boxShadow:"0 0 0 2px rgba(0,0,0,0.06) inset, 0 1px 4px rgba(0,0,0,0.12)",filter:"brightness(1.05)"}},style:{minWidth:0,borderRadius:5,transition:"0.13s",border:K.name==="white"?"1px solid #343A40":"1px solid transparent",backgroundColor:K.background},children:i===K.background&&d.jsx(Ko,{size:13,color:K.name==="white"?"#343A40":"#fff"})},K.background)},K.background))})]})]},"palette")});let V;e[19]!==I||e[20]!==$?(V=d.jsx(I,{gap:H,children:$}),e[19]=I,e[20]=$,e[21]=V):V=e[21];let q;e[22]!==L.Dropdown||e[23]!==V?(q=d.jsx(L.Dropdown,{p:P,children:V}),e[22]=L.Dropdown,e[23]=V,e[24]=q):q=e[24];let U;return e[25]!==w||e[26]!==f||e[27]!==B||e[28]!==q||e[29]!==E?(U=d.jsxs(w,{width:C,position:f,shadow:k,withinPortal:E,zIndex:j,children:[B,q]}),e[25]=w,e[26]=f,e[27]=B,e[28]=q,e[29]=E,e[30]=U):U=e[30],U},Itt=t=>{const e=me.c(143),{editor:n,window:r}=t,{t:s}=Le(),o=xt(768);let i;e[0]!==n?(i={editor:n,selector:Ott},e[0]=n,e[1]=i):i=e[1];const a=fa(i);let l;e[2]!==n?(l={editor:n,selector:Ntt},e[2]=n,e[3]=l):l=e[3];const c=fa(l);let u;e[4]!==n?(u={editor:n,selector:Ltt},e[4]=n,e[5]=u):u=e[5];const f=fa(u);let h;e[6]!==n?(h={editor:n,selector:$tt},e[6]=n,e[7]=h):h=e[7];const m=fa(h);let y;e[8]!==n?(y={editor:n,selector:Ftt},e[8]=n,e[9]=y):y=e[9];const v=fa(y);let b;e[10]!==n?(b={editor:n,selector:ztt},e[10]=n,e[11]=b):b=e[11];const w=fa(b);let C;e[12]!==n?(C={editor:n,selector:Ptt},e[12]=n,e[13]=C):C=e[13];const k=fa(C);let E;e[14]!==n?(E={editor:n,selector:Btt},e[14]=n,e[15]=E):E=e[15];const j=fa(E);let A;e[16]!==n?(A={editor:n,selector:Htt},e[16]=n,e[17]=A):A=e[17];const M=fa(A);let _;e[18]!==n?(_={editor:n,selector:Utt},e[18]=n,e[19]=_):_=e[19];const D=fa(_);if(!n||n.isDestroyed)return null;const R=o||!(r!=null&&r.isFullScreen);let N;e[20]!==s?(N=s("createTable"),e[20]=s,e[21]=N):N=e[21];let z;e[22]===Symbol.for("react.memo_cache_sentinel")?(z=d.jsx(_ke,{size:20,stroke:1.5}),e[22]=z):z=e[22];let B;e[23]!==N?(B=d.jsx(et.Target,{children:d.jsx(Ve,{title:N,variant:"subtle",size:25,w:32,h:32,children:z})}),e[23]=N,e[24]=B):B=e[24];let L;e[25]===Symbol.for("react.memo_cache_sentinel")?(L=d.jsx(jke,{size:16,color:"#848e98"}),e[25]=L):L=e[25];let P;e[26]!==n?(P=()=>n.chain().focus().insertTable({rows:3,cols:3,withHeaderRow:!0}).run(),e[26]=n,e[27]=P):P=e[27];let I;e[28]!==s?(I=s("toolbar.table.insertTable"),e[28]=s,e[29]=I):I=e[29];let H;e[30]!==P||e[31]!==I?(H=d.jsx(et.Item,{leftSection:L,onClick:P,children:I}),e[30]=P,e[31]=I,e[32]=H):H=e[32];let $;e[33]===Symbol.for("react.memo_cache_sentinel")?($=d.jsx(et.Divider,{}),e[33]=$):$=e[33];let V;e[34]===Symbol.for("react.memo_cache_sentinel")?(V=d.jsx(L5e,{size:16,color:"#848e98"}),e[34]=V):V=e[34];const q=!a;let U;e[35]!==n?(U=()=>n.chain().focus().addColumnBefore().run(),e[35]=n,e[36]=U):U=e[36];let W;e[37]!==s?(W=s("toolbar.table.addColumnLeft"),e[37]=s,e[38]=W):W=e[38];let Y;e[39]!==q||e[40]!==U||e[41]!==W?(Y=d.jsx(et.Item,{leftSection:V,disabled:q,onClick:U,children:W}),e[39]=q,e[40]=U,e[41]=W,e[42]=Y):Y=e[42];let G;e[43]===Symbol.for("react.memo_cache_sentinel")?(G=d.jsx(F5e,{size:16,color:"#848e98"}),e[43]=G):G=e[43];const K=!c;let Q;e[44]!==n?(Q=()=>n.chain().focus().addColumnAfter().run(),e[44]=n,e[45]=Q):Q=e[45];let Z;e[46]!==s?(Z=s("toolbar.table.addColumnRight"),e[46]=s,e[47]=Z):Z=e[47];let J;e[48]!==K||e[49]!==Q||e[50]!==Z?(J=d.jsx(et.Item,{leftSection:G,disabled:K,onClick:Q,children:Z}),e[48]=K,e[49]=Q,e[50]=Z,e[51]=J):J=e[51];let ne;e[52]===Symbol.for("react.memo_cache_sentinel")?(ne=d.jsx(P5e,{size:16,color:"#848e98"}),e[52]=ne):ne=e[52];const se=!f;let ce;e[53]!==n?(ce=()=>n.chain().focus().deleteColumn().run(),e[53]=n,e[54]=ce):ce=e[54];let fe;e[55]!==s?(fe=s("toolbar.table.deleteColumn"),e[55]=s,e[56]=fe):fe=e[56];let le;e[57]!==se||e[58]!==ce||e[59]!==fe?(le=d.jsx(et.Item,{leftSection:ne,disabled:se,onClick:ce,children:fe}),e[57]=se,e[58]=ce,e[59]=fe,e[60]=le):le=e[60];let be;e[61]===Symbol.for("react.memo_cache_sentinel")?(be=d.jsx(et.Divider,{}),e[61]=be):be=e[61];let je;e[62]===Symbol.for("react.memo_cache_sentinel")?(je=d.jsx(pke,{size:16,color:"#848e98"}),e[62]=je):je=e[62];const pe=!m;let _e;e[63]!==n?(_e=()=>n.chain().focus().addRowBefore().run(),e[63]=n,e[64]=_e):_e=e[64];let Ce;e[65]!==s?(Ce=s("toolbar.table.addRowAbove"),e[65]=s,e[66]=Ce):Ce=e[66];let Te;e[67]!==pe||e[68]!==_e||e[69]!==Ce?(Te=d.jsx(et.Item,{leftSection:je,disabled:pe,onClick:_e,children:Ce}),e[67]=pe,e[68]=_e,e[69]=Ce,e[70]=Te):Te=e[70];let Ae;e[71]===Symbol.for("react.memo_cache_sentinel")?(Ae=d.jsx(dke,{size:16,color:"#848e98"}),e[71]=Ae):Ae=e[71];const Ze=!v;let He;e[72]!==n?(He=()=>n.chain().focus().addRowAfter().run(),e[72]=n,e[73]=He):He=e[73];let lt;e[74]!==s?(lt=s("toolbar.table.addRowBelow"),e[74]=s,e[75]=lt):lt=e[75];let Ye;e[76]!==Ze||e[77]!==He||e[78]!==lt?(Ye=d.jsx(et.Item,{leftSection:Ae,disabled:Ze,onClick:He,children:lt}),e[76]=Ze,e[77]=He,e[78]=lt,e[79]=Ye):Ye=e[79];let ge;e[80]===Symbol.for("react.memo_cache_sentinel")?(ge=d.jsx(mke,{size:16,color:"#848e98"}),e[80]=ge):ge=e[80];const Fe=!w;let Se;e[81]!==n?(Se=()=>n.chain().focus().deleteRow().run(),e[81]=n,e[82]=Se):Se=e[82];let qe;e[83]!==s?(qe=s("toolbar.table.deleteRow"),e[83]=s,e[84]=qe):qe=e[84];let ot;e[85]!==Fe||e[86]!==Se||e[87]!==qe?(ot=d.jsx(et.Item,{leftSection:ge,disabled:Fe,onClick:Se,children:qe}),e[85]=Fe,e[86]=Se,e[87]=qe,e[88]=ot):ot=e[88];let $e;e[89]===Symbol.for("react.memo_cache_sentinel")?($e=d.jsx(et.Divider,{}),e[89]=$e):$e=e[89];let pt;e[90]===Symbol.for("react.memo_cache_sentinel")?(pt=d.jsx(N6e,{size:16,color:"#848e98"}),e[90]=pt):pt=e[90];const gt=!k;let Pt;e[91]!==n?(Pt=()=>n.chain().focus().toggleHeaderRow().run(),e[91]=n,e[92]=Pt):Pt=e[92];let at;e[93]!==s?(at=s("toolbar.table.toggleHeaderRow"),e[93]=s,e[94]=at):at=e[94];let nt;e[95]!==gt||e[96]!==Pt||e[97]!==at?(nt=d.jsx(et.Item,{leftSection:pt,disabled:gt,onClick:Pt,children:at}),e[95]=gt,e[96]=Pt,e[97]=at,e[98]=nt):nt=e[98];let We;e[99]===Symbol.for("react.memo_cache_sentinel")?(We=d.jsx(H5e,{size:16,color:"#848e98"}),e[99]=We):We=e[99];const At=!j;let St;e[100]!==n?(St=()=>n.chain().focus().toggleHeaderColumn().run(),e[100]=n,e[101]=St):St=e[101];let Ot;e[102]!==s?(Ot=s("toolbar.table.toggleHeaderColumn"),e[102]=s,e[103]=Ot):Ot=e[103];let Tt;e[104]!==At||e[105]!==St||e[106]!==Ot?(Tt=d.jsx(et.Item,{leftSection:We,disabled:At,onClick:St,children:Ot}),e[104]=At,e[105]=St,e[106]=Ot,e[107]=Tt):Tt=e[107];let kt;e[108]===Symbol.for("react.memo_cache_sentinel")?(kt=d.jsx(F6e,{size:16,color:"#848e98"}),e[108]=kt):kt=e[108];const jt=!M;let vt;e[109]!==n?(vt=()=>n.chain().focus().toggleHeaderCell().run(),e[109]=n,e[110]=vt):vt=e[110];let Yt;e[111]!==s?(Yt=s("toolbar.table.toggleHeaderCell"),e[111]=s,e[112]=Yt):Yt=e[112];let Vt;e[113]!==jt||e[114]!==vt||e[115]!==Yt?(Vt=d.jsx(et.Item,{leftSection:kt,disabled:jt,onClick:vt,children:Yt}),e[113]=jt,e[114]=vt,e[115]=Yt,e[116]=Vt):Vt=e[116];let Nt;e[117]===Symbol.for("react.memo_cache_sentinel")?(Nt=d.jsx(et.Divider,{}),e[117]=Nt):Nt=e[117];let Ht;e[118]===Symbol.for("react.memo_cache_sentinel")?(Ht=d.jsx(Tke,{size:16}),e[118]=Ht):Ht=e[118];const cn=!D;let qt;e[119]!==n?(qt=()=>n.chain().focus().deleteTable().run(),e[119]=n,e[120]=qt):qt=e[120];let Kt;e[121]!==s?(Kt=s("toolbar.table.deleteTable"),e[121]=s,e[122]=Kt):Kt=e[122];let yn;e[123]!==cn||e[124]!==qt||e[125]!==Kt?(yn=d.jsx(et.Item,{leftSection:Ht,color:"red",disabled:cn,onClick:qt,children:Kt}),e[123]=cn,e[124]=qt,e[125]=Kt,e[126]=yn):yn=e[126];let ee;e[127]!==H||e[128]!==Y||e[129]!==J||e[130]!==le||e[131]!==Te||e[132]!==Ye||e[133]!==ot||e[134]!==nt||e[135]!==Tt||e[136]!==Vt||e[137]!==yn?(ee=d.jsx(et.Dropdown,{children:d.jsxs(Jr,{h:200,scrollbarSize:6,children:[H,$,Y,J,le,be,Te,Ye,ot,$e,nt,Tt,Vt,Nt,yn]})}),e[127]=H,e[128]=Y,e[129]=J,e[130]=le,e[131]=Te,e[132]=Ye,e[133]=ot,e[134]=nt,e[135]=Tt,e[136]=Vt,e[137]=yn,e[138]=ee):ee=e[138];let ae;return e[139]!==R||e[140]!==B||e[141]!==ee?(ae=d.jsxs(et,{zIndex:199,withinPortal:R,position:"bottom-start",children:[B,ee]}),e[139]=R,e[140]=B,e[141]=ee,e[142]=ae):ae=e[142],ae};function Ott(t){const{editor:e}=t;return(e==null?void 0:e.can().addColumnBefore())??!1}function Ntt(t){const{editor:e}=t;return(e==null?void 0:e.can().addColumnAfter())??!1}function Ltt(t){const{editor:e}=t;return(e==null?void 0:e.can().deleteColumn())??!1}function $tt(t){const{editor:e}=t;return(e==null?void 0:e.can().addRowBefore())??!1}function Ftt(t){const{editor:e}=t;return(e==null?void 0:e.can().addRowAfter())??!1}function ztt(t){const{editor:e}=t;return(e==null?void 0:e.can().deleteRow())??!1}function Ptt(t){const{editor:e}=t;return(e==null?void 0:e.can().toggleHeaderRow())??!1}function Btt(t){const{editor:e}=t;return(e==null?void 0:e.can().toggleHeaderColumn())??!1}function Htt(t){const{editor:e}=t;return(e==null?void 0:e.can().toggleHeaderCell())??!1}function Utt(t){const{editor:e}=t;return(e==null?void 0:e.can().deleteTable())??!1}const Vtt=[{key:"faces",label:"toolbar.emoji.faces.label",icon:D_,emojis:[{char:"😀",name:"Grinning Face",keywords:["smile","happy","positive"]},{char:"😁",name:"Beaming Face",keywords:["smile","joy"]},{char:"😂",name:"Face with Tears of Joy",keywords:["laugh","funny","lol"]},{char:"🤣",name:"Rolling on Floor Laughing",keywords:["rofl","funny"]},{char:"😃",name:"Grinning Face with Big Eyes",keywords:["smile","cheerful"]},{char:"😄",name:"Grinning Face with Smiling Eyes",keywords:["happy"]},{char:"😅",name:"Grinning Face with Sweat",keywords:["relief","nervous"]},{char:"🥲",name:"Smiling Face with Tear",keywords:["bittersweet","proud"]},{char:"😊",name:"Smiling Face with Smiling Eyes",keywords:["warm","friendly"]},{char:"🙂",name:"Slightly Smiling Face",keywords:["fine","okay"]},{char:"😉",name:"Winking Face",keywords:["wink","flirt"]},{char:"😌",name:"Relieved Face",keywords:["calm","relax"]},{char:"😍",name:"Smiling Face with Heart-Eyes",keywords:["love","like"]},{char:"🤩",name:"Star-Struck",keywords:["wow","amazed"]},{char:"😘",name:"Face Blowing a Kiss",keywords:["kiss","love"]},{char:"😗",name:"Kissing Face",keywords:["kiss"]},{char:"😙",name:"Kissing Face with Smiling Eyes",keywords:["kiss"]},{char:"😜",name:"Winking Face with Tongue",keywords:["playful","prank"]},{char:"😝",name:"Squinting Face with Tongue",keywords:["silly"]},{char:"😎",name:"Smiling Face with Sunglasses",keywords:["cool","chill"]},{char:"🤔",name:"Thinking Face",keywords:["hmm","question"]},{char:"🤨",name:"Face with Raised Eyebrow",keywords:["doubt","skeptical"]},{char:"😏",name:"Smirking Face",keywords:["smirk"]},{char:"🥹",name:"Face Holding Back Tears",keywords:["sweet","cute"]},{char:"😭",name:"Loudly Crying Face",keywords:["sad","cry"]},{char:"😡",name:"Pouting Face",keywords:["angry","mad"]},{char:"😤",name:"Face with Steam From Nose",keywords:["frustrated"]},{char:"😱",name:"Face Screaming in Fear",keywords:["shock","horror"]},{char:"😴",name:"Sleeping Face",keywords:["sleep","tired"]},{char:"🤯",name:"Exploding Head",keywords:["mind blown","shock"]},{char:"🤗",name:"Hugging Face",keywords:["hug","care"]},{char:"🥳",name:"Partying Face",keywords:["party","fun"]}]},{key:"gestures",label:"toolbar.emoji.gestures.label",icon:j6e,emojis:[{char:"👍",name:"Thumbs Up",keywords:["like","approve","yes"]},{char:"👎",name:"Thumbs Down",keywords:["dislike","no"]},{char:"👏",name:"Clapping Hands",keywords:["applause","bravo"]},{char:"🙌",name:"Raising Hands",keywords:["celebrate","praise"]},{char:"🙏",name:"Folded Hands",keywords:["pray","thanks"]},{char:"🤝",name:"Handshake",keywords:["deal","agreement"]},{char:"👋",name:"Waving Hand",keywords:["hi","hello","bye"]},{char:"👌",name:"OK Hand",keywords:["ok","perfect"]},{char:"✌️",name:"Victory Hand",keywords:["peace","victory"]},{char:"🤘",name:"Sign of the Horns",keywords:["rock","metal"]},{char:"🤞",name:"Crossed Fingers",keywords:["luck","hope"]},{char:"🤟",name:"Love-You Gesture",keywords:["iloveyou","sign"]},{char:"🫶",name:"Heart Hands",keywords:["love","care"]},{char:"☝️",name:"Index Pointing Up",keywords:["note","attention"]},{char:"👈",name:"Backhand Index Pointing Left",keywords:["point","left"]},{char:"👉",name:"Backhand Index Pointing Right",keywords:["point","right"]}]},{key:"objects",label:"toolbar.emoji.objects.label",icon:d5e,emojis:[{char:"💡",name:"Light Bulb",keywords:["idea","innovation"]},{char:"🔥",name:"Fire",keywords:["hot","trending"]},{char:"✨",name:"Sparkles",keywords:["fresh","new"]},{char:"⭐",name:"Star",keywords:["favorite","rating"]},{char:"🌟",name:"Glowing Star",keywords:["highlight"]},{char:"💥",name:"Collision",keywords:["boom","impact"]},{char:"💯",name:"Hundred Points",keywords:["perfect","score"]},{char:"⚡",name:"High Voltage",keywords:["energy","power"]},{char:"🎯",name:"Bullseye",keywords:["goal","focus","objective"]},{char:"🔑",name:"Key",keywords:["access","important"]},{char:"📌",name:"Pushpin",keywords:["pin","important"]},{char:"📎",name:"Paperclip",keywords:["attach"]},{char:"🧠",name:"Brain",keywords:["thinking","smart"]},{char:"🧩",name:"Puzzle Piece",keywords:["puzzle","integration"]},{char:"🛠️",name:"Hammer and Wrench",keywords:["tools","fix"]},{char:"🧪",name:"Test Tube",keywords:["experiment","lab"]}]},{key:"celebration",label:"toolbar.emoji.celebration.label",icon:$ke,emojis:[{char:"🎉",name:"Party Popper",keywords:["celebration","yay"]},{char:"🎊",name:"Confetti Ball",keywords:["celebrate"]},{char:"🎁",name:"Gift",keywords:["present","surprise"]},{char:"🎈",name:"Balloon",keywords:["birthday","fun"]},{char:"🎂",name:"Birthday Cake",keywords:["birthday"]},{char:"🍾",name:"Bottle with Popping Cork",keywords:["champagne","celebrate"]},{char:"🥂",name:"Clinking Glasses",keywords:["cheers","toast"]},{char:"🏆",name:"Trophy",keywords:["achievement","win"]},{char:"🥇",name:"1st Place Medal",keywords:["winner"]},{char:"🎖️",name:"Military Medal",keywords:["award"]},{char:"🏅",name:"Sports Medal",keywords:["medal"]},{char:"🎵",name:"Musical Note",keywords:["music"]},{char:"🎤",name:"Microphone",keywords:["sing","talk"]},{char:"🎬",name:"Clapper Board",keywords:["video","film"]},{char:"🎮",name:"Video Game",keywords:["game"]}]},{key:"food",label:"toolbar.emoji.food.label",icon:QCe,emojis:[{char:"☕",name:"Hot Beverage",keywords:["coffee","tea"]},{char:"🧋",name:"Bubble Tea",keywords:["tea","drink"]},{char:"🥤",name:"Cup with Straw",keywords:["soda","drink"]},{char:"🍕",name:"Pizza",keywords:["food","italian"]},{char:"🍔",name:"Hamburger",keywords:["burger","fast food"]},{char:"🌭",name:"Hot Dog",keywords:["fast food"]},{char:"🍟",name:"French Fries",keywords:["fries"]},{char:"🌯",name:"Burrito",keywords:["wrap","mexican"]},{char:"🍣",name:"Sushi",keywords:["japanese","fish"]},{char:"🥗",name:"Green Salad",keywords:["healthy"]},{char:"🍩",name:"Doughnut",keywords:["dessert","sweet"]},{char:"🍪",name:"Cookie",keywords:["sweet","biscuit"]},{char:"🍰",name:"Shortcake",keywords:["cake","dessert"]},{char:"🍺",name:"Beer Mug",keywords:["drink","party"]},{char:"🍷",name:"Wine Glass",keywords:["wine","relax"]},{char:"🍸",name:"Cocktail Glass",keywords:["cocktail"]},{char:"🍎",name:"Red Apple",keywords:["fruit","apple"]},{char:"🍓",name:"Strawberry",keywords:["fruit","berry"]}]},{key:"symbols",label:"toolbar.emoji.symbols.label",icon:_6e,emojis:[{char:"❤️",name:"Red Heart",keywords:["love","heart"]},{char:"🧡",name:"Orange Heart",keywords:["love","warm"]},{char:"💛",name:"Yellow Heart",keywords:["friendship","warmth"]},{char:"💚",name:"Green Heart",keywords:["growth","nature"]},{char:"💙",name:"Blue Heart",keywords:["trust","peace"]},{char:"💜",name:"Purple Heart",keywords:["care","compassion"]},{char:"🖤",name:"Black Heart",keywords:["dark","goth"]},{char:"🤍",name:"White Heart",keywords:["pure","clean"]},{char:"🤎",name:"Brown Heart",keywords:["warm","earth"]},{char:"✅",name:"Check Mark Button",keywords:["ok","done"]},{char:"❌",name:"Cross Mark",keywords:["no","cancel"]},{char:"❗",name:"Exclamation Mark",keywords:["alert","important"]},{char:"❓",name:"Question Mark",keywords:["question","help"]},{char:"➕",name:"Plus",keywords:["add","plus"]},{char:"➖",name:"Minus",keywords:["remove","minus"]},{char:"💬",name:"Speech Balloon",keywords:["message","chat"]},{char:"📢",name:"Loudspeaker",keywords:["announce"]},{char:"📌",name:"Pushpin",keywords:["pin","important"]}]}],qtt=t=>{const e=me.c(20),{editor:n,window:r}=t,s=xt(1024),{t:o}=Le(),i=s?"bottom":"top",[a,l]=S.useState(""),c=S.useRef(null);let u;e[0]===Symbol.for("react.memo_cache_sentinel")?(u={},e[0]=u):u=e[0];const f=S.useRef(u);let h;e[1]!==o?(h=L=>({...L,label:o(L.label)}),e[1]=o,e[2]=h):h=e[2];const m=Vtt.map(h),y=L=>{const P=c.current,I=f.current[L];!P||!I||(l(L),P.scrollTo({top:I.offsetTop-8,behavior:"smooth"}))};let v;e[3]!==n?(v=L=>{n==null||n.chain().focus().insertContent(L).run()},e[3]=n,e[4]=v):v=e[4];const b=v;let w;e[5]!==o?(w=o("selectEmoji"),e[5]=o,e[6]=w):w=e[6];let C,k;e[7]===Symbol.for("react.memo_cache_sentinel")?(C={"&:hover":{backgroundColor:"#f1f3f5"}},k=d.jsx(D_,{size:20,stroke:1.5}),e[7]=C,e[8]=k):(C=e[7],k=e[8]);let E;e[9]!==w?(E=d.jsx(Dt.Target,{children:d.jsx(Ve,{title:w,variant:"subtle",size:25,w:32,h:32,sx:C,children:k})}),e[9]=w,e[10]=E):E=e[10];const j=Jr,A=250,M=6,_=ie,D=10;let R;e[11]===Symbol.for("react.memo_cache_sentinel")?(R={display:"flex",justifyContent:"left",flexWrap:"wrap",gap:8},e[11]=R):R=e[11];const N=m.map((L,P)=>d.jsxs(ie,{mb:P<m.length-1?"7px":0,ref:I=>{f.current[L.key]=I},children:[d.jsx(Ca,{fz:12,fw:400,mb:7,c:"#818da1",children:L.label}),d.jsx(ve,{gap:6,wrap:"wrap",children:L.emojis.map((I,H)=>d.jsx(Ve,{variant:"subtle",size:25,radius:"xl",styles:{root:{position:"relative",overflow:"visible"}},sx:{backgroundColor:"transparent","&:hover":{backgroundColor:"transparent"},"&::after":{content:'""',position:"absolute",left:"50%",top:"50%",width:35,height:35,transform:"translate(-50%, -50%)",borderRadius:"50%",backgroundColor:"#f1f3f5",boxShadow:"inset 0 0 0 1px #e9ecef",opacity:0,transition:"all 120ms ease",pointerEvents:"none",zIndex:0},"&:hover::after":{opacity:1}},onClick:()=>b(I.char),children:d.jsx("span",{style:{fontSize:22,lineHeight:1,position:"relative",zIndex:1},children:I.char})},`${L.key}-${I.char}-${H}`))}),P<m.length-1&&d.jsx(Da,{mb:0,mt:7,opacity:.3})]},L.key));let z;e[12]!==_||e[13]!==R||e[14]!==N?(z=d.jsx(_,{p:D,sx:R,children:N}),e[12]=_,e[13]=R,e[14]=N,e[15]=z):z=e[15];let B;return e[16]!==j||e[17]!==c||e[18]!==z?(B=d.jsx(j,{h:A,viewportRef:c,scrollbarSize:M,children:z}),e[16]=j,e[17]=c,e[18]=z,e[19]=B):B=e[19],d.jsxs(Dt,{width:280,position:i,shadow:"md",withinPortal:s||!(r!=null&&r.isFullScreen),zIndex:199,children:[E,d.jsxs(Dt.Dropdown,{p:0,children:[d.jsx(ve,{gap:0,justify:"left",p:10,children:m.map(L=>{const P=L.icon,I=a===L.key;return d.jsx(Ve,{size:34,variant:"subtle",onClick:()=>y(L.key),title:L.label,sx:{color:I?"#1c7ed6":"#818da1","&::after":{content:'""',position:"absolute",left:"50%",top:"50%",width:44,height:44,transform:"translate(-50%, -50%)",borderRadius:"50%",backgroundColor:I?"#edf4ff":"transparent",opacity:I?1:0,transition:"all 0.15s ease",zIndex:0},"&:hover::after":{opacity:1,backgroundColor:"#f1f3f5"}},children:d.jsx(P,{size:20,stroke:1.5,style:{position:"relative",zIndex:1}})},L.key)})}),B]})]})},Ob=[{value:"sans-serif",label:"Sans serif"},{value:"serif",label:"serif"},{value:"monospace",label:"Monospace"},{value:"Arial, sans-serif",label:"Arial"},{value:'"Comic Sans MS", sans-serif',label:"Comic Sans MS"},{value:'"EB Garamond", serif',label:"Garamond"},{value:"Georgia, serif",label:"Georgia"},{value:'"Tahoma", sans-serif',label:"Tahoma"},{value:'"Trebuchet MS", sans-serif',label:"Trebuchet MS"},{value:"Verdana, sans-serif",label:"Verdana"},{value:'"Times New Roman", serif',label:"Times New Roman"},{value:'"Courier New", monospace',label:"Courier New"},{value:"Impact, sans-serif",label:"Impact"},{value:'"Lucida Console", monospace',label:"Lucida Console"},{value:'"Palatino Linotype", serif',label:"Palatino Linotype"},{value:'"Segoe UI", sans-serif',label:"Segoe UI"},{value:'"Calibri", sans-serif',label:"Calibri"},{value:'"Cambria", serif',label:"Cambria"}],Wtt=t=>{const e=me.c(37),{editor:n,window:r}=t,[s,o]=S.useState(null),{t:i}=Le(),a=xt(1024);let l;e[0]!==s?(l=Ob.find(P=>P.value===s)??Ob[0],e[0]=s,e[1]=l):l=e[1];const c=l,u=zc({onDropdownClose:()=>u.resetSelectedOption(),onDropdownOpen:P=>{P==="keyboard"?u.selectActiveOption():u.updateSelectedOptionIndex("active")}}),f=P=>{o(P),u.closeDropdown(),n&&P&&n.chain().focus().setFontFamily(P).run()};let h;e[2]!==i?(h=P=>P?P.label:i("selectFont"),e[2]=i,e[3]=h):h=e[3];const m=h;let y,v;e[4]!==n?(y=()=>{const P=()=>{const I=(n==null?void 0:n.getAttributes("textStyle").fontFamily)||null;o(I)};return n==null||n.on("selectionUpdate",P),n==null||n.on("transaction",P),P(),()=>{n==null||n.off("selectionUpdate",P),n==null||n.off("transaction",P)}},v=[n],e[4]=n,e[5]=y,e[6]=v):(y=e[5],v=e[6]),S.useEffect(y,v);const b=Ob.map(P=>d.jsx(Ft.Option,{value:P.value,onMouseDown:()=>f(P.value),children:d.jsxs(ve,{gap:"xs",children:[P.value===s&&d.jsx(Ko,{size:12}),d.jsx("span",{style:{fontFamily:P.value},children:m(P)})]})},P.value)),w=a||!(r!=null&&r.isFullScreen);let C;e[7]!==u?(C=P=>{o(P),u.closeDropdown()},e[7]=u,e[8]=C):C=e[8];let k;e[9]!==i?(k=i("selectFont"),e[9]=i,e[10]=k):k=e[10];let E,j;e[11]===Symbol.for("react.memo_cache_sentinel")?(E=d.jsx(Ft.Chevron,{size:"xs"}),j={style:{width:14,right:"-2px"}},e[11]=E,e[12]=j):(E=e[11],j=e[12]);let A;e[13]!==u?(A=()=>u.toggleDropdown(),e[13]=u,e[14]=A):A=e[14];let M;e[15]===Symbol.for("react.memo_cache_sentinel")?(M={".mantine-InputBase-input":{border:"none",fontSize:"14px",padding:"0 15px 0 5px"}},e[15]=M):M=e[15];const _=c.value??"";let D;e[16]!==_?(D={fontFamily:_},e[16]=_,e[17]=D):D=e[17];let R;e[18]!==m||e[19]!==i||e[20]!==s?(R=s?m(Ob.find(P=>P.value===s)):i("selectFont"),e[18]=m,e[19]=i,e[20]=s,e[21]=R):R=e[21];let N;e[22]!==D||e[23]!==R?(N=d.jsx(ue,{maw:70,style:D,truncate:"end",lineClamp:3,children:R}),e[22]=D,e[23]=R,e[24]=N):N=e[24];let z;e[25]!==A||e[26]!==N||e[27]!==k?(z=d.jsx(Ft.Target,{children:d.jsx(Pa,{title:k,component:"button",type:"button",pointer:!0,rightSection:E,rightSectionProps:j,rightSectionPointerEvents:"none",onClick:A,sx:M,children:N})}),e[25]=A,e[26]=N,e[27]=k,e[28]=z):z=e[28];let B;e[29]!==b?(B=d.jsx(Ft.Dropdown,{children:d.jsx(Ft.Options,{children:d.jsx(Jr,{h:200,scrollbarSize:6,children:b})})}),e[29]=b,e[30]=B):B=e[30];let L;return e[31]!==u||e[32]!==z||e[33]!==B||e[34]!==w||e[35]!==C?(L=d.jsxs(Ft,{store:u,withinPortal:w,onOptionSubmit:C,width:170,zIndex:199,children:[z,B]}),e[31]=u,e[32]=z,e[33]=B,e[34]=w,e[35]=C,e[36]=L):L=e[36],L},Ytt=t=>{const e=me.c(22),{editor:n,window:r}=t,[s,o]=S.useState(null),{t:i}=Le(),a=xt(1024),l=[{value:"8"},{value:"9"},{value:"10"},{value:"11"},{value:"12"},{value:"14"},{value:"18"},{value:"24"},{value:"30"},{value:"36"},{value:"48"},{value:"60"},{value:"72"},{value:"96"}],c=zc({onDropdownClose:()=>c.resetSelectedOption(),onDropdownOpen:_=>{_==="keyboard"?c.selectActiveOption():c.updateSelectedOptionIndex("active")}}),u=_=>{o(_),c.closeDropdown(),n&&_&&n.chain().focus().setFontSize(_+"pt").run()},f=l.map(_=>d.jsx(Ft.Option,{value:_.value,onMouseDown:()=>u(_.value),style:{backgroundColor:_.value===s?"#e5e5e5":""},children:d.jsx(ve,{gap:"xs",children:d.jsx("span",{children:_.value})})},_.value)),h=a||!(r!=null&&r.isFullScreen);let m;e[0]!==c?(m=_=>{o(_),c.closeDropdown()},e[0]=c,e[1]=m):m=e[1];let y;e[2]===Symbol.for("react.memo_cache_sentinel")?(y={options:{span:{textAlign:"center",display:"block",width:"100%"}}},e[2]=y):y=e[2];let v;e[3]!==i?(v=i("selectSize"),e[3]=i,e[4]=v):v=e[4];let b,w;e[5]===Symbol.for("react.memo_cache_sentinel")?(b=d.jsx(Ft.Chevron,{size:"xs"}),w={style:{width:14,right:"-3px"}},e[5]=b,e[6]=w):(b=e[5],w=e[6]);let C;e[7]!==c?(C=()=>c.toggleDropdown(),e[7]=c,e[8]=C):C=e[8];let k;e[9]===Symbol.for("react.memo_cache_sentinel")?(k={".mantine-InputBase-input":{border:"none!important",fontSize:"14px",padding:"0 15px 0 5px"}},e[9]=k):k=e[9];const E=s||14;let j;e[10]!==v||e[11]!==C||e[12]!==E?(j=d.jsx(Ft.Target,{children:d.jsx(Pa,{title:v,component:"button",type:"button",pointer:!0,rightSection:b,rightSectionProps:w,rightSectionPointerEvents:"none",onClick:C,sx:k,children:E})}),e[10]=v,e[11]=C,e[12]=E,e[13]=j):j=e[13];let A;e[14]!==f?(A=d.jsx(Ft.Dropdown,{children:d.jsx(Ft.Options,{w:45,children:d.jsx(Jr,{h:200,scrollbarSize:6,children:f})})}),e[14]=f,e[15]=A):A=e[15];let M;return e[16]!==c||e[17]!==h||e[18]!==j||e[19]!==A||e[20]!==m?(M=d.jsxs(Ft,{store:c,withinPortal:h,onOptionSubmit:m,width:"auto",styles:y,zIndex:199,children:[j,A]}),e[16]=c,e[17]=h,e[18]=j,e[19]=A,e[20]=m,e[21]=M):M=e[21],M},Gtt="_toolbar_1vik2_1",Ktt="_toolbarResponsive_1vik2_8",Xtt="_toolbarDesktop_1vik2_13",Ztt="_rteMenuDropdown_1vik2_34",Qtt="_rteMenuDropdownRow_1vik2_38",Jtt="_rteMenuDropdownTitle_1vik2_69",ent="_rteMenuDropdownContainer_1vik2_76",tnt="_bubbleMenu_1vik2_92",Ks={toolbar:Gtt,toolbarResponsive:Ktt,toolbarDesktop:Xtt,rteMenuDropdown:Ztt,rteMenuDropdownRow:Qtt,rteMenuDropdownTitle:Jtt,rteMenuDropdownContainer:ent,bubbleMenu:tnt},aC=t=>{const e=me.c(5),{children:n,className:r}=t;let s;e[0]!==n?(s=d.jsx(xe,{align:"center",children:n}),e[0]=n,e[1]=s):s=e[1];let o;return e[2]!==r||e[3]!==s?(o=d.jsx(En,{component:"div",className:r,role:"menuitem",onMouseDown:nnt,onClick:rnt,children:s}),e[2]=r,e[3]=s,e[4]=o):o=e[4],o},vY=t=>{const e=me.c(116),{editor:n,isResponsive:r,isActionsDisabled:s,sendModalWindowId:o}=t,{t:i}=Le(),a=Rtt(o);let l,c,u,f,h,m,y,v,b,w,C,k,E,j,A,M,_,D,R,N,z,B,L,P,I,H,$,V,q,U,W,Y;if(e[0]!==n||e[1]!==s||e[2]!==r||e[3]!==i||e[4]!==a){const J=[{heading:{title:i("toolbar.menu.headingTitle"),items:[{level:1,label:i("toolbar.menu.items.h1"),Icon:d.jsx(ft.H1,{})},{level:2,label:i("toolbar.menu.items.h2"),Icon:d.jsx(ft.H2,{})},{level:3,label:i("toolbar.menu.items.h3"),Icon:d.jsx(ft.H3,{})},{level:4,label:i("toolbar.menu.items.h4"),Icon:d.jsx(ft.H4,{})}]},alignment:{title:i("toolbar.menu.alignmentTitle"),items:[{level:1,label:i("toolbar.menu.items.left"),Icon:d.jsx(ft.AlignLeft,{})},{level:2,label:i("toolbar.menu.items.center"),Icon:d.jsx(ft.AlignCenter,{})},{level:3,label:i("toolbar.menu.items.justify"),Icon:d.jsx(ft.AlignJustify,{})},{level:4,label:i("toolbar.menu.items.right"),Icon:d.jsx(ft.AlignRight,{})}]},list:{title:i("toolbar.menu.listTitle"),items:[{level:1,label:i("toolbar.menu.items.markList"),Icon:d.jsx(ft.BulletList,{})},{level:2,label:i("toolbar.menu.items.numbList"),Icon:d.jsx(ft.OrderedList,{})}]},defaults:{title:i("toolbar.menu.defaultsTitle"),items:[{level:1,label:i("toolbar.menu.items.strikethrough"),Icon:d.jsx(ft.Strikethrough,{})},{level:2,label:i("toolbar.menu.items.underline"),Icon:d.jsx(ft.Underline,{})},{level:3,label:i("toolbar.menu.items.italic"),Icon:d.jsx(ft.Italic,{})},{level:4,label:i("toolbar.menu.items.highlight"),Icon:d.jsx(ft.Highlight,{})},{level:5,label:i("toolbar.menu.items.code"),Icon:d.jsx(ft.Code,{})}]}}];f=ft.Toolbar;const ne=r?Ks.toolbarResponsive:Ks.toolbarDesktop;e[37]!==ne?(Y=Fr(Ks.toolbar,ne),e[37]=ne,e[38]=Y):Y=e[38],m=!0,y=60,e[39]!==n||e[40]!==r?(v=!r&&n?d.jsx(_tt,{pluginKey:"bubble-menu",editor:n,shouldShow:snt,options:{offset:10,placement:"bottom"},children:d.jsx("div",{className:Ks.bubbleMenu,children:d.jsxs(ft.ControlsGroup,{sx:{gap:"5px",backgroundColor:"#fff",borderRadius:6,padding:6,boxShadow:"0px 1px 10px rgba(16, 24, 40, 0.2)",zIndex:999,".mantine-RichTextEditor-control":{color:"#848e98"}},children:[d.jsx(ft.Bold,{}),d.jsx(ft.Italic,{}),d.jsx(ft.Underline,{}),d.jsx(yY,{editor:n}),d.jsx(ft.Link,{popoverProps:{withinPortal:!1}}),d.jsx(ft.Unlink,{})]})})}):null,e[39]=n,e[40]=r,e[41]=v):v=e[41],e[42]===Symbol.for("react.memo_cache_sentinel")?(b=d.jsxs(ft.ControlsGroup,{sx:{gap:"5px"},children:[d.jsx(ft.Undo,{}),d.jsx(ft.Redo,{})]}),w=d.jsx("span",{style:{color:"#8e959c"},children:"|"}),e[42]=b,e[43]=w):(b=e[42],w=e[43]),e[44]!==n||e[45]!==a?(C=d.jsx(Wtt,{editor:n,window:a}),e[44]=n,e[45]=a,e[46]=C):C=e[46],e[47]===Symbol.for("react.memo_cache_sentinel")?(k=d.jsx("span",{style:{color:"#8e959c"},children:"|"}),e[47]=k):k=e[47],e[48]!==n||e[49]!==a?(E=d.jsx(Ytt,{editor:n,window:a}),e[48]=n,e[49]=a,e[50]=E):E=e[50],e[51]===Symbol.for("react.memo_cache_sentinel")?(j=d.jsx("span",{style:{color:"#8e959c"},children:"|"}),A=d.jsx(ft.Bold,{}),e[51]=j,e[52]=A):(j=e[51],A=e[52]),e[53]===Symbol.for("react.memo_cache_sentinel")?(_=d.jsx(ft.Link,{popoverProps:{withinPortal:!1}}),D=d.jsx(ft.Unlink,{}),e[53]=_,e[54]=D):(_=e[53],D=e[54]),e[55]!==n?(R=d.jsx(yY,{editor:n}),e[55]=n,e[56]=R):R=e[56],e[57]!==n||e[58]!==a?(N=d.jsx(Dtt,{editor:n,window:a}),z=d.jsx(qtt,{editor:n,window:a}),e[57]=n,e[58]=a,e[59]=N,e[60]=z):(N=e[59],z=e[60]),e[61]!==n||e[62]!==s||e[63]!==r?(B=r&&d.jsx(d.Fragment,{children:d.jsx(Nie,{editor:n,disabled:!!s})}),e[61]=n,e[62]=s,e[63]=r,e[64]=B):B=e[64];let se;e[65]===Symbol.for("react.memo_cache_sentinel")?(se={gap:"5px"},e[65]=se):se=e[65],e[66]!==n||e[67]!==a?(L=d.jsx(ft.ControlsGroup,{sx:se,children:d.jsx(Itt,{editor:n,window:a})}),e[66]=n,e[67]=a,e[68]=L):L=e[68],P=" ",e[69]===Symbol.for("react.memo_cache_sentinel")?(I=d.jsx("span",{style:{color:"#8e959c"},children:"|"}),e[69]=I):I=e[69],u=ft.ControlsGroup,e[70]===Symbol.for("react.memo_cache_sentinel")?(W={gap:"5px"},e[70]=W):W=e[70],c=et,H=199,$="md",V="265px",q=r||!(a!=null&&a.isFullScreen);let ce;e[71]!==i?(ce=i("advancedFormattingFeatures"),e[71]=i,e[72]=ce):ce=e[72];let fe,le;e[73]===Symbol.for("react.memo_cache_sentinel")?(fe={"&:hover":{backgroundColor:"#f1f3f5"}},le=d.jsx(Nm,{size:20,stroke:1.5}),e[73]=fe,e[74]=le):(fe=e[73],le=e[74]),e[75]!==ce?(U=d.jsx(et.Target,{children:d.jsx(Ve,{title:ce,variant:"subtle",size:25,w:32,h:32,sx:fe,children:le})}),e[75]=ce,e[76]=U):U=e[76],l=et.Dropdown,h=Ks.rteMenuDropdown,M=J.map(cnt),e[0]=n,e[1]=s,e[2]=r,e[3]=i,e[4]=a,e[5]=l,e[6]=c,e[7]=u,e[8]=f,e[9]=h,e[10]=m,e[11]=y,e[12]=v,e[13]=b,e[14]=w,e[15]=C,e[16]=k,e[17]=E,e[18]=j,e[19]=A,e[20]=M,e[21]=_,e[22]=D,e[23]=R,e[24]=N,e[25]=z,e[26]=B,e[27]=L,e[28]=P,e[29]=I,e[30]=H,e[31]=$,e[32]=V,e[33]=q,e[34]=U,e[35]=W,e[36]=Y}else l=e[5],c=e[6],u=e[7],f=e[8],h=e[9],m=e[10],y=e[11],v=e[12],b=e[13],w=e[14],C=e[15],k=e[16],E=e[17],j=e[18],A=e[19],M=e[20],_=e[21],D=e[22],R=e[23],N=e[24],z=e[25],B=e[26],L=e[27],P=e[28],I=e[29],H=e[30],$=e[31],V=e[32],q=e[33],U=e[34],W=e[35],Y=e[36];let G;e[77]!==l||e[78]!==h||e[79]!==M?(G=d.jsx(l,{className:h,children:M}),e[77]=l,e[78]=h,e[79]=M,e[80]=G):G=e[80];let K;e[81]!==c||e[82]!==G||e[83]!==H||e[84]!==$||e[85]!==V||e[86]!==q||e[87]!==U?(K=d.jsxs(c,{zIndex:H,shadow:$,width:V,withinPortal:q,children:[U,G]}),e[81]=c,e[82]=G,e[83]=H,e[84]=$,e[85]=V,e[86]=q,e[87]=U,e[88]=K):K=e[88];let Q;e[89]!==u||e[90]!==K||e[91]!==W?(Q=d.jsx(u,{sx:W,children:K}),e[89]=u,e[90]=K,e[91]=W,e[92]=Q):Q=e[92];let Z;return e[93]!==f||e[94]!==m||e[95]!==y||e[96]!==v||e[97]!==b||e[98]!==w||e[99]!==C||e[100]!==k||e[101]!==E||e[102]!==j||e[103]!==A||e[104]!==_||e[105]!==D||e[106]!==R||e[107]!==N||e[108]!==z||e[109]!==B||e[110]!==L||e[111]!==P||e[112]!==I||e[113]!==Q||e[114]!==Y?(Z=d.jsxs(f,{className:Y,sticky:m,stickyOffset:y,children:[v,b,w,C,k,E,j,A,_,D,R,N,z,B,L,P,I,Q]}),e[93]=f,e[94]=m,e[95]=y,e[96]=v,e[97]=b,e[98]=w,e[99]=C,e[100]=k,e[101]=E,e[102]=j,e[103]=A,e[104]=_,e[105]=D,e[106]=R,e[107]=N,e[108]=z,e[109]=B,e[110]=L,e[111]=P,e[112]=I,e[113]=Q,e[114]=Y,e[115]=Z):Z=e[115],Z};function nnt(t){return t.preventDefault()}function rnt(t){var r;t.preventDefault();const e=t.currentTarget;(r=document.querySelector('[contenteditable="true"]'))==null||r.focus();const n=e.querySelector("[data-rich-text-editor-control]");n&&(n.dispatchEvent(new MouseEvent("mousedown",{bubbles:!0,cancelable:!0})),n.click(),n.dispatchEvent(new MouseEvent("mouseup",{bubbles:!0,cancelable:!0})))}function snt(t){const{editor:e,state:n,from:r,to:s}=t;return!e||e.isDestroyed||!e.isFocused||n.selection.empty?!1:n.doc.textBetween(r,s).trim().length>0}function ont(t,e){return d.jsxs(aC,{className:Ks.rteMenuDropdownRow,children:[t.Icon,d.jsx(ue,{children:t.label})]},`h-${e}`)}function int(t,e){return d.jsxs(aC,{className:Ks.rteMenuDropdownRow,children:[t.Icon,d.jsx(ue,{children:t.label})]},`a-${e}`)}function ant(t,e){return d.jsxs(aC,{className:Ks.rteMenuDropdownRow,children:[t.Icon,d.jsx(ue,{children:t.label})]},`l-${e}`)}function lnt(t,e){return d.jsxs(aC,{className:Ks.rteMenuDropdownRow,children:[t.Icon,d.jsx(ue,{children:t.label})]},`d-${e}`)}function cnt(t,e){const{heading:n,alignment:r,list:s,defaults:o}=t;return d.jsxs(Jr,{h:250,scrollbarSize:6,children:[d.jsxs(ie,{className:Ks.rteMenuDropdownContainer,"data-rte-group":"heading",children:[d.jsx(Ca,{order:6,className:Ks.rteMenuDropdownTitle,children:n.title}),n.items.map(ont)]}),d.jsxs(ie,{className:Ks.rteMenuDropdownContainer,"data-rte-group":"alignment",children:[d.jsx(Ca,{order:6,className:Ks.rteMenuDropdownTitle,children:r.title}),r.items.map(int)]}),d.jsxs(ie,{className:Ks.rteMenuDropdownContainer,"data-rte-group":"list",children:[d.jsx(Ca,{order:6,className:Ks.rteMenuDropdownTitle,children:s.title}),s.items.map(ant)]}),d.jsxs(ie,{className:Ks.rteMenuDropdownContainer,"data-rte-group":"defaults",children:[d.jsx(Ca,{order:6,className:Ks.rteMenuDropdownTitle,children:o.title}),o.items.map(lnt)]})]},`sec-${e}`)}const unt=t=>{const e=me.c(35),{editor:n,showToolbar:r,isActionsDisabled:s,sendModalWindowId:o}=t,{t:i}=Le();let a;e[0]!==i?(a=Qse(i),e[0]=i,e[1]=a):a=e[1];const l=a,c=xt(1024);let u;e[2]!==n?(u=L=>{const P=document.querySelector(".ProseMirror"),I=document.querySelector(".mantine-RichTextEditor-linkEditorInput");I&&I.contains(L.target)||n&&P&&!P.classList.contains("ProseMirror-focused")&&n.chain().focus().run()},e[2]=n,e[3]=u):u=e[3];const f=u;let h;e[4]!==n?(h=L=>{const P=L.clipboardData.files;if(P&&P.length){L.preventDefault(),Oie(P,n);return}},e[4]=n,e[5]=h):h=e[5];const m=h;let y;e[6]!==n?(y=[n],e[6]=n,e[7]=y):y=e[7],S.useEffect(pnt,y);let v;e[8]===Symbol.for("react.memo_cache_sentinel")?(v={border:"none",display:"flex",flex:1},e[8]=v):v=e[8];const b=n,w=c?"100%":"",C=c?"hidden":"",k=!c&&r?"100px":0;let E;e[9]!==w||e[10]!==C||e[11]!==k?(E={height:w,display:"flex",flexDirection:"column",overflow:C,gap:0,marginBottom:k},e[9]=w,e[10]=C,e[11]=k,e[12]=E):E=e[12];let j;e[13]===Symbol.for("react.memo_cache_sentinel")?(j={flexShrink:0,top:0},e[13]=j):j=e[13];const A=c?"auto":"hidden",M=c?"100%":"";let _;e[14]!==A||e[15]!==M?(_={flexGrow:1,overflowY:A,height:M},e[14]=A,e[15]=M,e[16]=_):_=e[16];let D;e[17]===Symbol.for("react.memo_cache_sentinel")?(D={color:"#343A40",border:"none",height:"100%","& .ProseMirror":{height:"100%"},"& p":{marginBottom:"0"}},e[17]=D):D=e[17];let R;e[18]!==E||e[19]!==_?(R={root:E,toolbar:j,Typography:_,content:D},e[18]=E,e[19]=_,e[20]=R):R=e[20];let N;e[21]!==n||e[22]!==s||e[23]!==c||e[24]!==o||e[25]!==r?(N=c?d.jsxs(ie,{sx:{position:"relative",margin:"0 16px 0 16px",zIndex:"2"},children:[d.jsx(Jr,{type:"never",scrollHideDelay:0,styles:{viewport:{overflowX:"auto",overflowY:"hidden",WebkitOverflowScrolling:"touch",overscrollBehaviorInline:"contain"}},children:d.jsx(ie,{sx:{display:"flex",gap:8,flexWrap:"nowrap",alignItems:"center","&::-webkit-scrollbar":{display:"none"},"& *":{whiteSpace:"nowrap"}},children:d.jsx(vY,{editor:n,isResponsive:c,isActionsDisabled:s})})}),d.jsx(Da,{color:"#A2B0C333"})]}):d.jsx(d.Fragment,{children:d.jsx(ie,{sx:{position:"fixed",bottom:"50px",margin:"16px",boxShadow:"0px 1px 10px rgba(16, 24, 40, 0.2)",borderRadius:"8px",zIndex:"2",display:r?"block":"none"},children:d.jsx(vY,{editor:n,isResponsive:c,isActionsDisabled:s,sendModalWindowId:o})})}),e[21]=n,e[22]=s,e[23]=c,e[24]=o,e[25]=r,e[26]=N):N=e[26];let z;e[27]===Symbol.for("react.memo_cache_sentinel")?(z=d.jsx(ft.Content,{sx:{"& .ProseMirror":{},"& .ProseMirror a":{cursor:"pointer"}}}),e[27]=z):z=e[27];let B;return e[28]!==f||e[29]!==m||e[30]!==l||e[31]!==R||e[32]!==N||e[33]!==b?(B=d.jsxs(ft,{sx:v,variant:"subtle",onPaste:m,onClick:f,onKeyDown:hnt,editor:b,labels:l,styles:R,children:[N,z]}),e[28]=f,e[29]=m,e[30]=l,e[31]=R,e[32]=N,e[33]=b,e[34]=B):B=e[34],B};function dnt(t){const e=n=>{var s;n.preventDefault(),n.stopImmediatePropagation(),n.stopPropagation();const r=(s=t.getAttribute("href"))==null?void 0:s.substring(7);if(r){const o=`/inbox?to=${r}`;window.open(o,"_blank")}};t.removeEventListener("mousedown",e),t.addEventListener("mousedown",e)}function fnt(){document.querySelectorAll('a[href^="mailto:"]').forEach(dnt)}function pnt(){fnt()}function hnt(t){return t.stopPropagation()}const Pie=({clickOutsideRef:t,sendModalWindowId:e,closeCallbackRef:n,setEnablePreventClosing:r,...s})=>{var r1,bp,zl,s1,o1,Pl,my,i1,a1;const o=wn().pathname.includes("send"),i=wn(),{emailId:a}=sr(),{state:l}=i;let c=S.useMemo(()=>s||l,[s,l]),u=n||{current:null};const f=re(qa),h=br(Pm),m=(r1=f==null?void 0:f.ModuleUrls.find(Ue=>Ue.Name==="Disk"))==null?void 0:r1.Url,y=(h==null?void 0:h.Partial)===!0;JSON.stringify(s)!=="{}"&&(c=s),l&&l.fromSendModal&&(c=l);const v=zt(),b=re(G_),w=ts(),{ensureDirectoryId:C}=EZe(),k=re(qc),E=re(Dn),j=re($o),A=re(mr),M=re(tMe),_=S.useContext(Mi),D=re(FQ),R=re(zr),N=re(sR(e)),z=re(bee(e)),B=re(oR(e)),L=xt(1024),P=Fa({type:"new"}),[I,H]=S.useState(!1),[$,V]=S.useState(!1),[q,U]=S.useState(!1),[W,Y]=S.useState([]),[G,K]=S.useState(!1),Q=M[Number(a)||((bp=E[0])==null?void 0:bp.Id)]||{Value:"",IsAddToNew:!1,IsAddToReply:!1},[Z,J]=S.useState(`${JSON.parse((Q==null?void 0:Q.Value)||'""')}`),[ne,se]=S.useState([]),[ce,fe]=S.useState([]),[le,be]=S.useState([]),[je,pe]=S.useState([]),[_e,Ce]=S.useState(!1),[Te,Ae]=S.useState(!1),[Ze,He]=S.useState(!1),[lt,Ye]=S.useState(""),[ge,Fe]=S.useState(c.Uid??0),[Se,qe]=S.useState(!1),[ot,$e]=S.useState(!1),[pt,gt]=S.useState({}),[Pt,at]=S.useState([]),[nt,We]=S.useState(!1),[At,St]=S.useState({icon:null,text:""}),Ot=S.useRef(null),Tt=S.useRef(c.Id??0),kt=S.useRef(null),jt=S.useRef(null),vt=S.useRef(null),[Yt,Vt]=S.useState(!1),[Nt,Ht]=S.useState(!1),{windows:cn=[],closeSendWindow:qt=()=>{}}=_||{},{generatePreviewLinks:Kt}=Zet(),yn=i.pathname.includes("/message"),ee=cn.find(Ue=>Ue.id===e),ae=S.useMemo(()=>{var Qt,bn,Un,or;const Ue=((Qt=E[0])==null?void 0:Qt.Email)||"";if(yn&&j){const qr=(bn=R.find(ro=>ro.Id===(j==null?void 0:j.FolderId)))==null?void 0:bn.UserEmailId;if(qr)return((Un=E.find(ro=>ro.Id===qr))==null?void 0:Un.Email)||Ue}else return((or=E.find(qr=>qr.Id===Number(a)))==null?void 0:or.Email)||Ue;return Ue},[a,E,R,yn,j]),de=S.useMemo(()=>I||$||Se,[I,$,Se]),Ee=Er(),{t:De}=Le(),Qe=Mr(),{initiateCancellableMessage:mt}=Xet({currentFolderId:(w==null?void 0:w.Id)||c.folderId,onCancelSuccess:Ue=>{Zu(`sent-${Ue.Id}`),jn(oe.values.Attachments),P({folderId:(w==null?void 0:w.Id)||c.folderId,type:"draft",Id:Ue.Id,To:Ue.To,Bcc:Ue.Bcc,Cc:Ue.Cc,Subject:Ue.Subject,ExternalId:Ue.ExternalId,Uid:Ue.Uid,HtmlBody:Ue.HtmlBody||Ue.Body,Attachments:Ue.Attachments??[],Important:Ue.Important,Labels:Ue.Labels??[]})},onMessageSent:Ue=>{Qe.success(`${De("notifications.messages.messageWasSent")}`,{id:`sent-${Ue.Id}`})}}),rt=S.useCallback(()=>[...ne,...ce,...le],[ne,ce,le]),st=Ue=>c.type==="new"&&(Ue!=null&&Ue.IsAddToNew)?!0:(c.type==="reply"||c.type==="replyToAll"||c.type==="forward")&&(Ue==null?void 0:Ue.IsAddToReply),Mt=()=>{let Ue="";return Q!=null&&Q.Value&&st(Q)&&(Ue=`${JSON.parse(Q.Value)}`),Ue},Ut=()=>{if(!(ee!=null&&ee.isFullScreen||ee!=null&&ee.isMinimize))return L?"85%":"75%"},Lt=(Ue,Qt)=>{var qr,ro;const bn=E.find(bo=>{var xo;return bo.Email===((xo=Ue.From)==null?void 0:xo.Address)}),Un=Number(a)===(bn==null?void 0:bn.Id)&&i.pathname.includes("drafts"),or=((qr=oe.getInitialValues().From)==null?void 0:qr.Address)!==((ro=Ue.From)==null?void 0:ro.Address);return Un&&(or||!Qt)},Xt=()=>{K(!G)},mn=Ue=>{if(!rn||!Ue)return Ue;try{return rn.commands.setContent(Ue,{emitUpdate:!1}),rn.getHTML()}catch{return Ue}},ht=()=>{const Ue=Mt(),Qt=(w==null?void 0:w.Name)==="drafts",bn=c.HtmlBody??"";if(Qt&&bn)return bn;if(!bn&&!Ue)return"";if(bn&&!Ue)return bn;if(!bn&&Ue){const ro=`
        <p><br /></p>
        ${Ue}
      `,xo=new DOMParser().parseFromString(ro,"text/html");return xo.querySelectorAll("p[data-attachment-link]").forEach(Xc=>{var xp;((xp=Xc.textContent)==null?void 0:xp.trim())===""&&Xc.remove()}),xo.body.innerHTML.trim()}const Un=`
    ${bn}
    <p><br /></p>
    ${Ue}
  `,qr=new DOMParser().parseFromString(Un,"text/html");return qr.querySelectorAll("p[data-attachment-link]").forEach(ro=>{var bo;((bo=ro.textContent)==null?void 0:bo.trim())===""&&ro.remove()}),qr.body.innerHTML.trim()},oe=Ll({validate:mp(mnt),initialValues:{...E.length>1?{From:{Address:((zl=c.From)==null?void 0:zl.Address)||ae}}:{From:{Address:E[0].Email}},Subject:c.Subject??"",Body:c.Body??"",HtmlBody:ht(),To:c.To??[],Cc:c.Cc??[],Bcc:c.Bcc??[],Attachments:c.Attachments??[],...c.Id?{Id:c.Id}:{},...c.ReplyToId?{ReplyToId:c.ReplyToId}:{}}}),Ne=S.useMemo(()=>Yt?[]:oe.values.Cc??[],[oe==null?void 0:oe.values.Cc.join(),Yt]),ut=S.useMemo(()=>oe.values.To??[],[oe.values.To.join()]),un=S.useMemo(()=>Nt?[]:oe.values.Bcc??[],[oe.values.Bcc.join(),Nt]),Mn=Ue=>{var Qt;return{HtmlBody:Ue.HtmlBody??"",Subject:Ue.Subject??"",To:Array.isArray(Ue.To)?Ue.To:[],Cc:Array.isArray(Ue.Cc)?Ue.Cc:[],Bcc:Array.isArray(Ue.Bcc)?Ue.Bcc:[],From:((Qt=Ue.From)==null?void 0:Qt.Address)??""}},nn=Ue=>JSON.stringify(Mn(Ue)),Ge=S.useRef(nn(oe.getInitialValues())),Rt=!wse(oe.getInitialValues(),oe.values),Zt=Rt?lt!==nn(oe.values):!1,$t=fM({editable:!0,shouldRerenderOnTransaction:!0,extensions:[yM.configure({link:!1,underline:!1}),koe.configure({resizable:!1,HTMLAttributes:ktt}),Coe,Soe.configure({HTMLAttributes:Ett}),woe.configure({HTMLAttributes:Ttt}),TVe.configure({HTMLAttributes:{style:"margin:0"}}),Pse,wtt,att,loe,coe,uoe,ptt,Vqe.configure({types:["textStyle"]}),yse.configure({linkOnPaste:!1,autolink:!1,openOnClick:!0,HTMLAttributes:{target:"_blank",rel:"noopener noreferrer"}}).extend({addAttributes(){var Ue;return{...(Ue=this.parent)==null?void 0:Ue.call(this),style:utt}},addInputRules(){return[]},addPasteRules(){return[]},addCommands(){return{unsetLink:()=>({commands:Ue})=>Ue.unsetMark("link"),setLink:Ue=>({commands:Qt,chain:bn,state:Un})=>{const{selection:or}=Un,qr=((Ue==null?void 0:Ue.href)??"").trim();if(!qr)return!0;const bo=/^(https?:)?\/\//i.test(qr)?qr:`https://${qr}`,xo=(Ue==null?void 0:Ue.target)??"_blank",Xc="noopener noreferrer";return or.empty?bn().focus().insertContent({type:"text",text:qr,marks:[{type:"link",attrs:{href:bo,target:xo,rel:Xc}}]}).run():bn().focus().extendMarkRange("link").setMark("link",{...Ue,href:bo,target:xo,rel:Xc}).run()}}}}),Fse,$se,pM,hM.configure({types:["heading","paragraph"]}),Yqe.configure({inline:!0}).extend({addAttributes(){var Ue;return{...(Ue=this.parent)==null?void 0:Ue.call(this),style:ftt}}})],editorProps:{handleDOMEvents:{click:(Ue,Qt)=>{var Un;return((Un=Qt.target)==null?void 0:Un.closest("a"))?(Qt.preventDefault(),!0):!1}}},content:oe.values.HtmlBody,onUpdate:({editor:Ue})=>{const Qt=Ue.getHTML();oe.setValues({HtmlBody:Qt,Body:Ue.getText()})},onCreate:()=>ADe(e,$t),onDestroy:()=>{RDe(e)}},[]),en=Ue=>!oe.values.To.length&&!oe.values.Cc.length&&!oe.values.Bcc.length?(Qe.custom(`${De("notifications.messages.setAddress")}`,{title:De(Ue?"notifications.messages.notSentLetter":"notifications.status.error"),color:"orange"}),!1):!0,rn=fM({editable:!1,extensions:[yM,pM,hM.configure({types:["heading","paragraph"]})],content:""}),In=async Ue=>{var Qt;if(Se){H("pending");return}if(H(!0),rt.length>0){H(!1),Qe.error(De("notifications.messages.errorAddress",{emails:rt().join(", ")}));return}if(!Ue.To.length&&!Ue.Cc.length&&!Ue.Bcc.length){H(!1),Qe.custom(`${De("notifications.messages.setAddress")}`,{title:`${De("notifications.messages.notSentLetter")}`,color:"orange"});return}try{const bn=(w==null?void 0:w.Id)||c.folderId,Un=window.location.search.includes("to=");Ue.Important=c.Important,Ue.Labels=(Qt=k.Items.find(qr=>qr.Id===Tt.current))==null?void 0:Qt.Labels,Ue.Id=Tt.current;const or=await v(gT(Ue)).unwrap();u.current=null,i.pathname.includes("/send")?Ee(Un?`${a?`/${a}/`:""}inbox`:-1):ee&&qt(ee.id),yn||v(ur({...A,folderId:bn})),v(Vc()),mt(or),b&&v(oS()),H(!0),v(M3({id:e,opened:!1}))}catch{H(!1),v(M3({id:e,opened:!1})),Qe.error(De("notifications.messages.messageWasNotSent"),{icon:d.jsx(po,{stroke:1.5,size:16})})}},dn=Ue=>Ue.map(Qt=>({Id:Qt.Id,FileId:Qt.FileId,FileName:Qt.FileName,Size:Qt.Size,MimeType:Qt.MimeType})),jn=async Ue=>{if(Se&&!I){$e(!0);return}$e(!1),qe(!0),St({icon:d.jsx(Bs,{color:"gray",size:"12px"}),text:De("draftIsRunning")});let Qt;const bn=k.Items.find(or=>or.Id===Tt.current);try{Qt=await v(PP({...oe.values,Attachments:dn(Ue||c.Attachments),Id:Tt.current,addHeader:!0,Important:c.Important,Uid:ge,Labels:bn==null?void 0:bn.Labels})).unwrap(),v(Ns(Qt.Id)),St({icon:d.jsx(Ko,{color:"gray",size:"12px"}),text:De(L?"draftIsRunning":"draftSavedDesktop")})}catch{qe(!1),Qe.error(De("notifications.messages.draftSavingFailed")),St({icon:d.jsx(XCe,{color:"gray",size:"12px"}),text:De("draftNotSaved")})}qe(!1),Tt.current=Qt.Id,Fe(Qt.Uid),oe.setFieldValue("Attachments",dn(Qt.Attachments));const Un={...oe.values,Attachments:dn(Qt.Attachments),Labels:bn==null?void 0:bn.Labels,Important:c.Important,HasAttachments:Qt.HasAttachments,HasThreadAttachments:Qt.HasThreadAttachments};Lt(Un,bn)&&await v(ur({...A,folderId:(w==null?void 0:w.Id)||c.folderId})),(j==null?void 0:j.Id)===Tt.current&&v(rS({Id:Tt.current,...Un})),v(Vu({Id:Tt.current,...Un})),b&&v(DTe({Id:Tt.current,...Un})),Ge.current=nn(oe.values),setTimeout(()=>{St({icon:null,text:L?De("newMessage"):""})},1e3)},ds=rtt($t,m,Y),{handleStartDiskUploadPerFile:Cr,handleStartDiskUpload:On}=dQe({diskFiles:je,ensureDirectoryId:C,handleCreateLinks:ds,setUploadProgress:gt,setHasClientError:Ce,setHasServerError:Ae,setHasQuotaError:He,allowPartialUpload:y}),ji=S.useCallback(Ue=>{ntt(Ue,jn,oe,V,at,pe,gt,Qe,v,e)},[oe,jn,V,Qe,at,gt,v,e]),Kc=S.useCallback(async()=>{var bn;if(Se&&!ot)return;qe==null||qe(!0);const Ue=(bn=k.Items.find(Un=>Un.Id===Tt.current))==null?void 0:bn.Labels;r==null||r(!0);const Qt=await v(PP({...oe.values,Id:Tt.current,addHeader:!0,Uid:ge,Important:c.Important,Labels:Ue})).unwrap();r==null||r(!1),v(Ns(Qt.Id)),qe==null||qe(!1),Tt.current=Qt.Id,(w||j!=null&&j.FolderId)&&!L&&(await v(ur({folderId:(w==null?void 0:w.Id)||(j==null?void 0:j.FolderId)})),v(xl({id:Qt.Id})))},[Se,ot,qe,k.Items,Tt,r,v,oe.values,ge,c.Important,w,j,L]);zet($t,e,Y,U);const zd=()=>{oe.setFieldValue("Attachments",[]),jn([]),Qe.success(`${De("modals.controls.deleteAllFiles")}`)},hy=Ue=>{oe.setFieldValue("Attachments",oe.values.Attachments.filter(Qt=>Qt!==Ue)),jn(oe.values.Attachments.filter(Qt=>Qt!==Ue))};S.useEffect(()=>{$t&&c.HtmlBody&&$t.getHTML()!==c.HtmlBody&&$t.commands.setContent(c.HtmlBody,{emitUpdate:!1})},[$t,c.HtmlBody]),S.useEffect(()=>{E.length||Ee("/")}),S.useEffect(()=>{Kt(oe.values.Attachments)},[oe.values.Attachments]),S.useEffect(()=>{Rt?u.current=Kc:u.current=null},[oe.values,Tt.current,ge,w,Se,k,ot]),S.useEffect(()=>{var Ue;(Ue=$t==null?void 0:$t.commands)==null||Ue.focus("start")},[$t]),S.useLayoutEffect(()=>{document.querySelectorAll(".mantine-RichTextEditor-toolbar button").forEach(Ue=>{Ue.setAttribute("tabindex","-1")})},[]),S.useEffect(()=>{lt.trim()&&!I&&jn(oe.values.Attachments)},[lt]),S.useEffect(()=>{!Se&&ot&&jn(oe.values.Attachments)},[Se,ot]),S.useEffect(()=>{const Ue=Qt=>{if(ot||Se)return Qt.preventDefault(),Qt.returnValue=De("messages.draftWillNotSave"),De("messages.draftWillNotSave")};return window.addEventListener("beforeunload",Ue),()=>{window.removeEventListener("beforeunload",Ue)}},[ot,Se,De]),S.useEffect(()=>{const Ue=nn(oe.values);if(!(Rt||Ue!==Ge.current))return;const bn=setTimeout(()=>{Ye(Ue)},800);return()=>clearTimeout(bn)},[oe.values,Rt]),S.useEffect(()=>{!Se&&I==="pending"&&In(oe.values)},[lt,I]);const vp=Ue=>{if(!Ue||!Ue.Value){const Qt=Z?oe.values.HtmlBody.lastIndexOf(Z):-1;if(Qt!==-1&&Z){const bn=oe.values.HtmlBody.slice(0,Qt)+oe.values.HtmlBody.slice(Qt+Z.length);oe.setValues({HtmlBody:bn}),$t==null||$t.commands.setContent(bn,{emitUpdate:!1})}J("");return}try{let Qt=`${JSON.parse(Ue.Value)}`;st(Ue)||(Qt="");const bn=mn(Qt),Un=Z?oe.values.HtmlBody.lastIndexOf(Z):-1;let or=oe.values.HtmlBody;Un===-1?or+=bn:or=or.slice(0,Un)+bn+or.slice(Un+(Z==null?void 0:Z.length)),oe.setValues({HtmlBody:or}),$t==null||$t.commands.setContent(or,{emitUpdate:!1}),J(bn)}catch(Qt){console.error("Error parsing signature:",Qt),J("")}};S.useEffect(()=>{var Qt;if(c.type==="draft")return;const Ue=E.find(bn=>{var Un;return bn.Email===((Un=oe.values.From)==null?void 0:Un.Address)});Ue&&((Qt=M[Ue==null?void 0:Ue.Id])==null?void 0:Qt.Value)!==Z&&vp(M[Ue.Id])},[(s1=oe.values.From)==null?void 0:s1.Address]);const fC={initialTo:ut,initialCopy:Ne,initialSecretCp:un,invalidEmailsTo:ne,setInvalidEmailsTo:se,invalidEmailsCc:ce,setInvalidEmailsCc:fe,invalidEmailsBcc:le,setInvalidEmailsBcc:be,setShouldResetCopy:Vt,setShouldResetSecretCp:Ht,addressBookRef:Ot,addressFromTo:ae,form:oe,setIsSticky:We,sendModalWindowId:e},zo={handleAttachmentsUpload:ji,handleCloseSendModal:Kc,isSending:I,isUploading:$,isDraftRunning:Se,form:oe,shouldSaveDraftOnClose:Zt,handleSubmit:In,allInvalidEmails:rt(),sendModalWindowId:e,modalTitleState:At,hasAttachLink:q,validateEmail:en},n1={editor:$t,isDirty:Rt,form:oe,handleSubmit:In,allInvalidEmails:rt(),handleAttachmentsUpload:ji,handleCreateLinks:ds,handleCloseSendModal:Kc,isSending:I,isUploading:$,isDraftRunning:Se,messageIdRef:Tt,toggleToolbar:Xt,sendModalWindowId:e,hasAttachLink:q,validateEmail:en};return _?d.jsx("div",{ref:ee!=null&&ee.isFullScreen&&!z&&!B&&!N?t:null,style:{height:L?"100dvh":"100vh",display:L||s.isFullPage?"":"inline",position:"relative",zIndex:L?"100":""},children:d.jsxs(ie,{component:"form",sx:{display:"flex",flexDirection:"column"},ref:jt,onKeyDown:Ue=>Ue.code==="Enter"&&Ue.preventDefault(),h:L?`calc(100% - ${((o1=kt.current)==null?void 0:o1.clientHeight)||0}px)`:"100%",children:[d.jsx(SZe,{...zo}),d.jsxs(bt,{id:e?`modal-body-${e}`:"modal-body",gap:0,mt:L?57:0,className:L?"":co.customScrollbar,sx:{flexGrow:1,overflowY:"auto",display:!(ee!=null&&ee.isFullScreen)&&(ee!=null&&ee.isMinimize)?"none":"inherit",scrollPaddingTop:L?"unset":(Pl=vt.current)==null?void 0:Pl.clientHeight},h:o?`calc(92dvh - ${((my=kt.current)==null?void 0:my.clientHeight)||0}px)}`:`calc(83dvh - ${((i1=kt.current)==null?void 0:i1.clientHeight)||0}px)}`,style:{minHeight:Ut()},children:[d.jsx("div",{ref:vt,className:!L&&nt?co.stickyFields:"",style:{backgroundColor:"#fff"},children:d.jsx(Oet,{...fC,fromContacts:s.fromContacts??!1})}),d.jsx(ve,{ref:kt,sx:{position:ee!=null&&ee.isMinimize||!L?"static":"absolute",alignContent:"flex-end",bottom:0,width:"100%",borderBottomLeftRadius:"8px",borderBottomRightRadius:"8px",overflow:L?"hidden":"",backgroundColor:"#fff",display:!(ee!=null&&ee.isFullScreen)&&(ee!=null&&ee.isMinimize)?"none":"inherit"},children:d.jsx(JKe,{id:e,isUploading:$,files:oe.values.Attachments,removeFile:hy,isDraftRunning:Se,progress:pt,attachments:Pt,removeAllFilesClickHandler:zd,attachmentLinks:D})}),d.jsx(unt,{editor:$t,showToolbar:G,isActionsDisabled:de,sendModalWindowId:e}),!L&&d.jsx(TJe,{onDrop:ji,paddingTop:((a1=vt.current)==null?void 0:a1.clientHeight)||0})]}),!L&&d.jsx($et,{...n1}),d.jsx(yZe,{onAttachFiles:ji,onCreateLink:ds,id:e}),d.jsx(vQe,{id:e,onConfirm:Ue=>In(Ue),attachLinkList:W,form:oe,editor:$t}),d.jsx(aQe,{uploadProgress:pt,clientError:_e,serverError:Te,quotaError:Ze,setClientError:Ce,setServerError:Ae,setQuotaError:He,onUploadAll:On,onUploadFile:Cr,id:e,files:je,setFiles:pe,setUploadProgress:gt})]})}):null},mnt=go().shape({}),wh=t=>{const e=me.c(4);let n;e[0]!==t?({...n}=t,e[0]=t,e[1]=n):n=e[1];let r;return e[2]!==n?(r=d.jsx(ue,{...n,c:"dimmed"}),e[2]=n,e[3]=r):r=e[3],r},gnt=It.memo(t=>{const e=me.c(6),{children:n,sendModalWindow:r}=t,s=r.isFullScreen?co.customOverlay:"",o=r.isFullScreen?co.customOverlay__inner:"";let i;e[0]!==n||e[1]!==o?(i=d.jsx("div",{className:o,children:n}),e[0]=n,e[1]=o,e[2]=i):i=e[2];let a;return e[3]!==s||e[4]!==i?(a=d.jsx("div",{className:s,children:i}),e[3]=s,e[4]=i,e[5]=a):a=e[5],a}),ynt=({sendModalWindow:t,index:e})=>{const n=S.useRef(null),r=re(sR(t.id)),s=re(oR(t.id)),{t:o}=Le(),i=cs(),[a,l]=S.useState(!1),c=S.useContext(Mi),{updateWindow:u=()=>{},minimizeWindow:f=()=>{}}=c||{},h=t.isFullScreen?"center":"bottom-right",m=()=>{f(t.id),u(t.id,{isFullScreen:!1,prevIsFullScreen:!0})},y=Em(m),v={width:t.isMinimize?330:630,height:t.isMinimize?vM:600},b={width:t.isMinimize?330:450,height:t.isMinimize||t.isFullScreen?0:400},w={index:e,id:t.id,sendModalWindowId:t.id,showHeader:!1,showFooter:!1,withBorder:!1,showResizeHandle:!t.isMinimize,initialSize:v,minSize:b,dragEmptyHeaderHeight:vM,dragEmptyHeader:!t.isFullScreen,position:h},C={...t.props,sendModalWindowId:t.id,closeCallbackRef:n,clickOutsideRef:y,setEnablePreventClosing:l};return S.useEffect(()=>{const k=E=>{if(a)return E.preventDefault(),E.returnValue=o("messages.draftWillNotSave"),o("messages.draftWillNotSave")};return window.addEventListener("beforeunload",k),()=>{window.removeEventListener("beforeunload",k)}},[a,o]),S.useEffect(()=>{const k=E=>{if(E.key==="Escape"){if(r||s){r&&i(xT({id:t.id,opened:!1})),s&&i(dd({id:t.id,opened:!1})),E.preventDefault(),E.stopPropagation();return}t.isOpen&&t.isFullScreen&&(m(),E.preventDefault(),E.stopPropagation())}};return document.addEventListener("keydown",k),()=>document.removeEventListener("keydown",k)},[t.id,t.isOpen,t.isFullScreen,r,s]),c?d.jsx(Fj,{children:t.isOpen&&t.props&&d.jsx(gnt,{sendModalWindow:t,children:d.jsx(ooe,{...w,children:d.jsx(Nd,{children:d.jsx(Pie,{...C})})},t.id)})}):null},vnt="full-screen-window",bnt=()=>{const t=me.c(8),e=S.useContext(Mi);let n;t[0]!==e?(n=e||{},t[0]=e,t[1]=n):n=t[1];const{windows:r}=n;let s;t[2]!==r?(s=r===void 0?[]:r,t[2]=r,t[3]=s):s=t[3];const o=s;let i;t[4]!==o?(i=o.map(xnt),t[4]=o,t[5]=i):i=t[5];let a;return t[6]!==i?(a=d.jsx(d.Fragment,{children:i}),t[6]=i,t[7]=a):a=t[7],a};function xnt(t,e){return d.jsx(ynt,{sendModalWindow:t,index:e},t.id)}const wnt=t=>{const e=me.c(14),{t:n}=Le(),r=t.showLoading?1:0,s=t.showLoading?" scale(1)":" scale(0)";let o;e[0]!==r||e[1]!==s?(o={opacity:r,transform:s,transition:"all 0.4s ease-in-out"},e[0]=r,e[1]=s,e[2]=o):o=e[2];const i=o;let a,l;e[3]===Symbol.for("react.memo_cache_sentinel")?(a={display:"flex",justifyContent:"center"},l={position:"absolute",zIndex:999},e[3]=a,e[4]=l):(a=e[3],l=e[4]);let c;e[5]===Symbol.for("react.memo_cache_sentinel")?(c={display:"flex",justifyContent:"center",marginTop:"20px",border:"0.5px solid #EDEDEF"},e[5]=c):c=e[5];let u;e[6]===Symbol.for("react.memo_cache_sentinel")?(u=d.jsx(Bs,{size:"md",type:"dots"}),e[6]=u):u=e[6];let f;e[7]!==n?(f=n("loading"),e[7]=n,e[8]=f):f=e[8];let h;e[9]!==f?(h=d.jsxs(xe,{align:"center",children:[u,d.jsx(ue,{ml:10,children:f})]}),e[9]=f,e[10]=h):h=e[10];let m;return e[11]!==i||e[12]!==h?(m=d.jsx(ve,{sx:a,style:l,w:"100%",children:d.jsx(xd,{style:i,radius:"xl",shadow:"xl",top:0,py:2,px:15,pos:"fixed",sx:c,children:h})}),e[11]=i,e[12]=h,e[13]=m):m=e[13],m};window.appVersion=B_e;window.appFeature=ZRe;Ct.defaults.baseURL=D8e;let UM;Ct.interceptors.response.use(t=>t,t=>{var s;const{config:e}=t;return["v1/email/Create","v1/email/RenameFolder","v1/EmailLabels"].some(o=>e.url.includes(o))||(t.response.status===401&&!t.config.url.includes("Login")&&(alert(vn.t("notifications.messages.authToken")),window.location.href="/login"),((s=t.response)==null?void 0:s.status)>=500&&UM&&UM(!0)),Promise.reject(t)});window.open=(function(t){return function(e,n,r){return t.call(window,e,n,r)}})(window.open);const Snt=()=>{const{t}=Le(),e=Rg(fS,{activationConstraint:{distance:10}}),n=Rg(fR,{activationConstraint:{delay:250,tolerance:5}}),r=re(Pm),s=re(ip)==="pending",o=re(fee)==="pending",i=re(BTe)==="pending",a=re(HTe)==="pending",l=re(aee)==="pending",c=xt(1024),u=s||o||i||a||l,f=vn.language==="ru",h=jee(e,n),[m,y]=S.useState(!1),[v,b]=S.useState(!1);return UM=b,S.useEffect(()=>{document.title=t("headTitle")},[t,f]),S.useEffect(()=>{var w;vn.changeLanguage(((w=r.Culture)==null?void 0:w.toLowerCase())||"ru").then()},[r.Culture]),S.useEffect(()=>{let w;return u?w=setTimeout(()=>{y(!0)},200):(w!==void 0&&clearTimeout(w),y(!1)),()=>{w!==void 0&&clearTimeout(w)}},[u]),v?d.jsx(jl,{children:d.jsx(Oc,{heading:t("warningBoundaryText.heading"),description:t("warningBoundaryText.description"),handleButtonClick:()=>window.location.href="/",buttonText:t("warningBoundaryText.button"),img:GRe})}):d.jsx(Nd,{children:d.jsxs(YRe,{children:[d.jsx(Wc,{autoClose:3e3}),d.jsx(l_e,{children:d.jsx(DDe,{defaultProps:{type:"new"},children:d.jsx(pAe,{settings:{locale:vn.language},children:d.jsxs(hR,{sensors:h,autoScroll:!1,modifiers:[oAe],children:[d.jsx(spt,{}),d.jsx(wnt,{showLoading:m}),!c&&d.jsx(bnt,{}),!c&&d.jsx(wqe,{})]})})})})]})})},Cnt=()=>{var u;const t=me.c(16),{t:e}=Le(),n=re(Dn),r=re(Dl),s=re(qa),o=re(Md);let i;t[0]!==(o==null?void 0:o.Id)||t[1]!==(s==null?void 0:s.ModuleUrls)?(i=()=>{var m;const h=((m=s==null?void 0:s.ModuleUrls.find(knt))==null?void 0:m.Url)+"/profile/"+(o==null?void 0:o.Id)+"/mail-account";window.location.href=h},t[0]=o==null?void 0:o.Id,t[1]=s==null?void 0:s.ModuleUrls,t[2]=i):i=t[2];const a=i;if(!r.length){let f;t[3]!==e?(f=e("warningBoundaryText.heading2"),t[3]=e,t[4]=f):f=t[4];let h;t[5]!==e?(h=e("warningBoundaryText.description2"),t[5]=e,t[6]=h):h=t[6];let m;t[7]!==e?(m=e("warningBoundaryText.button2"),t[7]=e,t[8]=m):m=t[8];let y;return t[9]!==a||t[10]!==f||t[11]!==h||t[12]!==m?(y=d.jsx(jl,{hasHeader:!0,children:d.jsx(Oc,{heading:f,description:h,handleButtonClick:a,buttonText:m,img:md})}),t[9]=a,t[10]=f,t[11]=h,t[12]=m,t[13]=y):y=t[13],y}const l=`/${(u=n[0])==null?void 0:u.Id}/inbox`;let c;return t[14]!==l?(c=d.jsx(o2,{replace:!0,to:l}),t[14]=l,t[15]=c):c=t[15],c};function knt(t){return t.Name==="Admin"}const Ent=()=>{var s;const t=me.c(2),n=`/${(s=re(Dn)[0])==null?void 0:s.Id}/send`;let r;return t[0]!==n?(r=d.jsx(o2,{replace:!0,to:n}),t[0]=n,t[1]=r):r=t[1],r},Tnt=()=>{var o;const t=me.c(3),e=re(Dn),n=wn(),r=`/${(o=e[0])==null?void 0:o.Id}/settings/filters`;let s;return t[0]!==n.state||t[1]!==r?(s=d.jsx(o2,{replace:!0,to:r,state:n.state}),t[0]=n.state,t[1]=r,t[2]=s):s=t[2],s},Mnt="_removeButton_s5ggc_1",jnt="_removableRow_s5ggc_5",Rf={removeButton:Mnt,removableRow:jnt},Ant="data:image/svg+xml,%3csvg%20width='14'%20height='16'%20viewBox='0%200%2014%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M12.8334%200.333344C13.5434%200.333344%2013.9142%201.15501%2013.4859%201.68584L13.4225%201.75584L10.2625%204.91668L13.4225%208.07751C13.925%208.57918%2013.6059%209.42251%2012.9284%209.49501L12.8334%209.50001H2.00004V14.5C2.00001%2014.7041%201.92508%2014.9011%201.78944%2015.0537C1.65381%2015.2062%201.46692%2015.3036%201.26421%2015.3275L1.16671%2015.3333C0.962596%2015.3333%200.765593%2015.2584%200.613064%2015.1227C0.460535%2014.9871%200.363088%2014.8002%200.339207%2014.5975L0.333374%2014.5V1.16668C0.333401%200.962566%200.408337%200.765563%200.54397%200.613034C0.679603%200.460504%200.866498%200.363058%201.06921%200.339177L1.16671%200.333344H12.8334Z'%20fill='%23FA5252'/%3e%3c/svg%3e",lI={Organization:8,Personal:0,Favorite:4},Bie=()=>{var c,u,f;const t=me.c(10),e=re(YTe);let n;t[0]!==e?(n=(c=e.find(_nt))==null?void 0:c.Id,t[0]=e,t[1]=n):n=t[1];const r=String(n);let s;t[2]!==e?(s=(u=e.find(Rnt))==null?void 0:u.Id,t[2]=e,t[3]=s):s=t[3];const o=String(s);let i;t[4]!==e?(i=(f=e.find(Dnt))==null?void 0:f.Id,t[4]=e,t[5]=i):i=t[5];const a=String(i);let l;return t[6]!==r||t[7]!==o||t[8]!==a?(l={organization:r,personal:o,favorite:a},t[6]=r,t[7]=o,t[8]=a,t[9]=l):l=t[9],l};function _nt(t){return t.Type===lI.Organization}function Rnt(t){return t.Type===lI.Personal}function Dnt(t){return t.Type===lI.Favorite}const Int=()=>{const t=me.c(31),{t:e}=Le();let n;t[0]!==e?(n=e("settings.fromField"),t[0]=e,t[1]=n):n=t[1];let r;t[2]!==n?(r={value:`${As.From}`,label:n},t[2]=n,t[3]=r):r=t[3];let s;t[4]!==e?(s=e("settings.toField"),t[4]=e,t[5]=s):s=t[5];let o;t[6]!==s?(o={value:`${As.To}`,label:s},t[6]=s,t[7]=o):o=t[7];let i;t[8]!==e?(i=e("settings.subjectField"),t[8]=e,t[9]=i):i=t[9];let a;t[10]!==i?(a={value:`${As.Subject}`,label:i},t[10]=i,t[11]=a):a=t[11];let l;t[12]!==e?(l=e("settings.bodyField"),t[12]=e,t[13]=l):l=t[13];let c;t[14]!==l?(c={value:`${As.Body}`,label:l},t[14]=l,t[15]=c):c=t[15];let u;t[16]!==e?(u=e("settings.ccField"),t[16]=e,t[17]=u):u=t[17];let f;t[18]!==u?(f={value:`${As.Cc}`,label:u},t[18]=u,t[19]=f):f=t[19];let h;t[20]!==e?(h=e("settings.bccField"),t[20]=e,t[21]=h):h=t[21];let m;t[22]!==h?(m={value:`${As.Bcc}`,label:h},t[22]=h,t[23]=m):m=t[23];let y;return t[24]!==r||t[25]!==m||t[26]!==o||t[27]!==a||t[28]!==c||t[29]!==f?(y=[r,o,a,c,f,m],t[24]=r,t[25]=m,t[26]=o,t[27]=a,t[28]=c,t[29]=f,t[30]=y):y=t[30],y},Ont=()=>{const t=me.c(2),{t:e}=Le();let n;return t[0]!==e?(n=r=>[{value:`${xs.Equal}`,label:e("settings.contains")},{value:`${xs.NotEqual}`,label:e("settings.notContain")},...r?[{value:`${xs.ContainAddressBook}`,label:e("settings.containsAddressBook")},{value:`${xs.NotContainAddressBook}`,label:e("settings.notContainsAddressBook")}]:[]],t[0]=e,t[1]=n):n=t[1],n},Nnt=t=>{const e=me.c(15),{t:n}=Le();let r;if(e[0]!==t||e[1]!==n){if(r=[],!t.includes(hr.Move)){let s;e[3]!==n?(s=n("settings.moveToFolder"),e[3]=n,e[4]=s):s=e[4];let o;e[5]!==s?(o={value:`${hr.Move}`,label:s},e[5]=s,e[6]=o):o=e[6],r.push(o)}if(!t.includes(hr.SentCopy)){let s;e[7]!==n?(s=n("settings.sendCopy"),e[7]=n,e[8]=s):s=e[8];let o;e[9]!==s?(o={value:`${hr.SentCopy}`,label:s},e[9]=s,e[10]=o):o=e[10],r.push(o)}if(!t.includes(hr.AutoReply)){let s;e[11]!==n?(s=n("settings.autoReply"),e[11]=n,e[12]=s):s=e[12];let o;e[13]!==s?(o={value:`${hr.AutoReply}`,label:s},e[13]=s,e[14]=o):o=e[14],r.push(o)}e[0]=t,e[1]=n,e[2]=r}else r=e[2];return r},Lnt=()=>{const t=me.c(11),{t:e}=Le();let n;t[0]!==e?(n=e("settings.allConditions"),t[0]=e,t[1]=n):n=t[1];let r;t[2]!==n?(r={label:n,value:"false"},t[2]=n,t[3]=r):r=t[3];let s;t[4]!==e?(s=e("settings.oneCondition"),t[4]=e,t[5]=s):s=t[5];let o;t[6]!==s?(o={label:s,value:"true"},t[6]=s,t[7]=o):o=t[7];let i;return t[8]!==r||t[9]!==o?(i=[r,o],t[8]=r,t[9]=o,t[10]=i):i=t[10],i},$nt=()=>{const t=me.c(19),{t:e}=Le();let n;t[0]!==e?(n=e("settings.fromField"),t[0]=e,t[1]=n):n=t[1];let r;t[2]!==e?(r=e("settings.toField"),t[2]=e,t[3]=r):r=t[3];let s;t[4]!==e?(s=e("settings.subjectField"),t[4]=e,t[5]=s):s=t[5];let o;t[6]!==e?(o=e("settings.bodyField"),t[6]=e,t[7]=o):o=t[7];let i;t[8]!==e?(i=e("settings.ccField"),t[8]=e,t[9]=i):i=t[9];let a;t[10]!==e?(a=e("settings.bccField"),t[10]=e,t[11]=a):a=t[11];let l;return t[12]!==n||t[13]!==r||t[14]!==s||t[15]!==o||t[16]!==i||t[17]!==a?(l={[As.From]:n,[As.To]:r,[As.Subject]:s,[As.Body]:o,[As.Cc]:i,[As.Bcc]:a},t[12]=n,t[13]=r,t[14]=s,t[15]=o,t[16]=i,t[17]=a,t[18]=l):l=t[18],l},Fnt=()=>{const t=me.c(13),{t:e}=Le();let n;t[0]!==e?(n=e("settings.contains"),t[0]=e,t[1]=n):n=t[1];let r;t[2]!==e?(r=e("settings.notContain"),t[2]=e,t[3]=r):r=t[3];let s;t[4]!==e?(s=e("settings.containsAddressBook"),t[4]=e,t[5]=s):s=t[5];let o;t[6]!==e?(o=e("settings.notContainsAddressBook"),t[6]=e,t[7]=o):o=t[7];let i;return t[8]!==n||t[9]!==r||t[10]!==s||t[11]!==o?(i={[xs.Equal]:n,[xs.NotEqual]:r,[xs.ContainAddressBook]:s,[xs.NotContainAddressBook]:o},t[8]=n,t[9]=r,t[10]=s,t[11]=o,t[12]=i):i=t[12],i},znt=()=>{const t=me.c(2),{t:e}=Le();let n;return t[0]!==e?(n=go().shape({Value:Cc().when("Type",{is:Qnt,then:Cc().min(1,e("settings.validation.enterDescription")).max(100,e("settings.validation.max100Symbols")),otherwise:Cc().nullable()}),ArrayValues:sd().when("Type",{is:Jnt,then:sd().min(1,e("settings.validation.selectAddressBook")).required(e("settings.validation.selectAddressBook")),otherwise:sd().nullable()}),Type:Sl().required(e("settings.validation.selectConditions")),Field:Sl().required(e("settings.validation.selectParams"))}),t[0]=e,t[1]=n):n=t[1],n},Pnt=()=>{const t=me.c(3),{t:e}=Le(),n=cI();let r;return t[0]!==n||t[1]!==e?(r=go().shape({Type:Sl().required(e("settings.validation.selectAction")),MoveToFolderId:Sl().nullable().when("Type",{is:0,then:Sl().typeError(e("settings.validation.selectFolder")).required(e("settings.validation.selectFolder"))}),MarkAsRead:Ji(),MarkAsFavorite:Ji(),IsStopCheckOtherFilters:Ji(),SendCopyToEmails:sd().of(n).min(1,e("settings.validation.wrongEmail")),AutoReply:xm().notRequired()}),t[0]=n,t[1]=e,t[2]=r):r=t[2],r},Bnt=()=>{const t=me.c(2),{t:e}=Le();let n;return t[0]!==e?(n=go().shape({Type:Sl().required(e("settings.validation.selectAction")),MoveToFolderId:Sl().nullable().when("Type",{is:0,then:Sl().typeError(e("settings.validation.selectFolder")).required(e("settings.validation.selectFolder"))}),MarkAsRead:Ji(),MarkAsFavorite:Ji(),IsStopCheckOtherFilters:Ji(),SendCopyToEmails:xm().notRequired(),AutoReply:xm().notRequired()}),t[0]=e,t[1]=n):n=t[1],n},Hnt=()=>{const t=me.c(3),{t:e}=Le(),n=cI();let r;return t[0]!==n||t[1]!==e?(r=go().shape({Type:Sl().required(e("settings.validation.selectAction")),MarkAsRead:Ji(),MarkAsFavorite:Ji(),IsStopCheckOtherFilters:Ji(),SendCopyToEmails:sd().of(n).min(1,e("settings.validation.wrongEmail")),AutoReply:xm().notRequired()}),t[0]=n,t[1]=e,t[2]=r):r=t[2],r},Unt=t=>{const e=me.c(1),n=Pnt(),r=Bnt(),s=Hnt();if(t.includes(hr.Move)&&t.includes(hr.SentCopy))return n;if(t.includes(hr.Move))return r;if(t.includes(hr.SentCopy))return s;let o;return e[0]===Symbol.for("react.memo_cache_sentinel")?(o=go().notRequired(),e[0]=o):o=e[0],o},Vnt=t=>{const e=me.c(4),{t:n}=Le(),r=znt(),s=Unt(t);let o;return e[0]!==s||e[1]!==r||e[2]!==n?(o=go().shape({Name:Cc().nullable().max(100,n("settings.validation.maxLength")),FolderId:xm().notRequired(),IsAny:Ji(),Conditions:sd().of(r).min(1),Action:s,IsDisabled:Ji()}),e[0]=s,e[1]=r,e[2]=n,e[3]=o):o=e[3],o},qnt=()=>{const{t}=Le();return go().shape({StartDate:Aw().nullable(),TillDate:Aw().nullable().when("StartDate",{is:e=>e!=null&&e instanceof Date,then:e=>e.required(t("settings.validation.tillDateRequired")).test("is-greater",t("settings.validation.compareDate"),function(n){const{StartDate:r}=this.parent;return!r||!n?!0:n>r}),otherwise:e=>e.test("is-greater",t("settings.validation.compareDate"),function(n){const{StartDate:r}=this.parent;return!r||!n?!0:n>r})})})},Hie=()=>{const t=me.c(19),{t:e}=Le(),n=Bie(),r=n.organization;let s;t[0]!==e?(s=e("settings.organisation"),t[0]=e,t[1]=s):s=t[1];let o;t[2]!==n.organization||t[3]!==s?(o={value:r,label:s},t[2]=n.organization,t[3]=s,t[4]=o):o=t[4];const i=n.personal;let a;t[5]!==e?(a=e("settings.personal"),t[5]=e,t[6]=a):a=t[6];let l;t[7]!==n.personal||t[8]!==a?(l={value:i,label:a},t[7]=n.personal,t[8]=a,t[9]=l):l=t[9];const c=n.favorite;let u;t[10]!==e?(u=e("settings.favorite"),t[10]=e,t[11]=u):u=t[11];let f;t[12]!==n.favorite||t[13]!==u?(f={value:c,label:u},t[12]=n.favorite,t[13]=u,t[14]=f):f=t[14];let h;return t[15]!==o||t[16]!==l||t[17]!==f?(h=[o,l,f],t[15]=o,t[16]=l,t[17]=f,t[18]=h):h=t[18],h},Wnt=()=>{const t=me.c(2),e=qnt();let n;return t[0]!==e?(n=go().shape({AutoReply:e.nullable()}),t[0]=e,t[1]=n):n=t[1],n},Ynt=()=>{const t=me.c(2),e=Wnt();let n;return t[0]!==e?(n=go().shape({Action:e.required()}),t[0]=e,t[1]=n):n=t[1],n},Gnt=/^(?:[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*|<([a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*)>|"([a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*)")$/,cI=()=>{const t=me.c(2),{t:e}=Le();let n;return t[0]!==e?(n=Cc().matches(Gnt,e("settings.validation.wrongEmail")),t[0]=e,t[1]=n):n=t[1],n},Knt=()=>{const t=me.c(2),e=cI();let n;return t[0]!==e?(n=go().shape({Action:go().shape({SendCopyToEmails:sd().of(e)})}),t[0]=e,t[1]=n):n=t[1],n},Xnt={Name:"",FolderId:0,IsAny:!0,IsDisabled:!0,IsAllTrue:!0,Conditions:[],Action:{Type:2,AutoReply:{StartDate:null,TillDate:null,Text:"",Subject:"",IsAddressNotExists:!1},SendCopyToEmails:[],MoveToFolderId:null,MarkAsRead:!1,MarkAsFavorite:!1,IsStopCheckOtherFilters:!1}},VM={Name:"",FolderId:0,IsAny:!0,IsDisabled:!1,Conditions:[{Type:xs.Equal,Field:As.Subject,Value:"",ArrayValues:[]}],Action:{Type:16,MoveToFolderId:null,MarkAsRead:!1,MarkAsFavorite:!1,IsStopCheckOtherFilters:!1,Remove:!1,SendCopyToEmails:[],AutoReply:{StartDate:null,TillDate:null,Text:"",Subject:"",IsAddressNotExists:!1}}},Znt={Name:"",FolderId:0,IsAny:!0,IsDisabled:!0,IsAllTrue:!0,Conditions:[],Action:{Type:3,SendCopyToEmails:[""],MoveToFolderId:null,MarkAsRead:!1,MarkAsFavorite:!1,IsStopCheckOtherFilters:!1,AutoReply:null,Remove:!1}};function Qnt(t){return t===xs.Equal||t===xs.NotEqual}function Jnt(t){return t===xs.ContainAddressBook||t===xs.NotContainAddressBook}const ert=t=>{var N,z,B,L,P;const e=me.c(50),{form:n,actionType:r,index:s,onChangeAction:o,onRemoveAction:i,selectedActions:a}=t,{t:l}=Le(),{emailId:c}=sr(),u=xt(1024);let f;e[0]!==r||e[1]!==a?(f=a.filter(I=>I!==r)??[],e[0]=r,e[1]=a,e[2]=f):f=e[2];const h=Nnt(f),m=re(Va);let y;if(e[3]!==c||e[4]!==m){const I=(V,q)=>{if(V.Type===Je.SENT||V.Type===Je.OUTBOX||V.Type===Je.SNOOZED||V.Type===Je.ERRORS)return[];if(V.UserEmailId!==Number(c))return[];const W=[],Y=q?`${q}/${V.Name}`:V.label,G=Y==null?void 0:Y.split("/"),K=G&&`${G[0]}/.../${G[G.length-1]}`;return W.push({label:G&&(G==null?void 0:G.length)>3?K:Y,value:String(V.Id),type:V.Type}),V!=null&&V.Children&&(V==null||V.Children.forEach(Q=>W.push(...I(Q,q?`${q}/${V.Name}`:V.label??"")))),W},H=m.reduce((V,q)=>(V.push(...I(q,"")),V),[]);y=V_(H,[2,512]),e[3]=c,e[4]=m,e[5]=y}else y=e[5];const b=y;let w;e[6]!==l?(w=l("settings.action"),e[6]=l,e[7]=w):w=e[7];let C;e[8]!==n?(C=n.getInputProps("Action.Type"),e[8]=n,e[9]=C):C=e[9];let k;e[10]!==r?(k=(r==null?void 0:r.toString())??null,e[10]=r,e[11]=k):k=e[11];let E;e[12]!==s||e[13]!==o?(E=I=>I&&o(+I,s),e[12]=s,e[13]=o,e[14]=E):E=e[14];let j;e[15]!==h||e[16]!==w||e[17]!==C||e[18]!==k||e[19]!==E?(j=d.jsx(kw,{data:h,placeholder:w,...C,value:k,onChange:E,width:240,styles:ws}),e[15]=h,e[16]=w,e[17]=C,e[18]=k,e[19]=E,e[20]=j):j=e[20];let A;e[21]!==r||e[22]!==b||e[23]!==n||e[24]!==u||e[25]!==l?(A=r===hr.Move&&d.jsx(kw,{data:b.slice(1),title:l("settings.folder"),placeholder:l("settings.actionDescription"),...n.getInputProps("Action.MoveToFolderId"),value:((N=n.values.Action.MoveToFolderId)==null?void 0:N.toString())??null,onChange:I=>n.setFieldValue("Action.MoveToFolderId",I?+I:null),styles:ws,sx:{flexGrow:1},width:u?"100%":"auto"}),e[21]=r,e[22]=b,e[23]=n,e[24]=u,e[25]=l,e[26]=A):A=e[26];let M;e[27]!==r||e[28]!==n||e[29]!==u||e[30]!==l?(M=r===hr.SentCopy&&d.jsx(es,{sx:{flexGrow:1},placeholder:l("settings.resendAddress"),styles:u?bY:xY,...n.getInputProps("Action.SendCopyToEmails.0"),error:((z=n.errors)==null?void 0:z["Action.SendCopyToEmails.0"])??((B=n.errors)==null?void 0:B["Action.SendCopyToEmails"])}),e[27]=r,e[28]=n,e[29]=u,e[30]=l,e[31]=M):M=e[31];let _;e[32]!==r||e[33]!==n||e[34]!==s||e[35]!==u||e[36]!==i||e[37]!==l?(_=r===hr.AutoReply&&d.jsxs(d.Fragment,{children:[d.jsx(es,{sx:{flexGrow:1},placeholder:l("settings.responderTheme"),styles:u?bY:xY,...n.getInputProps("Action.AutoReply.Subject")}),!u&&d.jsx(ie,{w:34,className:Rf.removeButton,children:d.jsx(Ve,{size:"lg",h:36,onClick:()=>i(s),children:d.jsx(po,{color:"#848E9C",size:18,stroke:1})})}),d.jsx(bt,{w:u?"100%":"auto",children:d.jsx(zD,{placeholder:l("settings.responderText"),content:(L=n.values.Action.AutoReply)!=null&&L.Text?(P=n.values.Action.AutoReply)==null?void 0:P.Text:"",onUpdate:I=>n.setFieldValue("Action.AutoReply.Text",I.getHTML())})})]}),e[32]=r,e[33]=n,e[34]=s,e[35]=u,e[36]=i,e[37]=l,e[38]=_):_=e[38];let D;e[39]!==r||e[40]!==s||e[41]!==u||e[42]!==i?(D=u?d.jsx(ve,{sx:IT,children:d.jsx(ie,{children:d.jsx(Ve,{size:"lg",h:36,onClick:()=>i(s),children:d.jsx(W4,{color:"#339AF0",size:22,stroke:1})})})}):d.jsx(ie,{w:34,className:Rf.removeButton,children:r!==hr.AutoReply&&d.jsx(Ve,{size:"lg",h:36,onClick:()=>i(s),children:d.jsx(po,{color:"#848E9C",size:18,stroke:1})})}),e[39]=r,e[40]=s,e[41]=u,e[42]=i,e[43]=D):D=e[43];let R;return e[44]!==_||e[45]!==D||e[46]!==j||e[47]!==A||e[48]!==M?(R=d.jsxs(ve,{className:Rf.removableRow,gap:4,flex:1,maw:"100%",sx:Zte,align:"flex-start",children:[j,A,M,_,D]}),e[44]=_,e[45]=D,e[46]=j,e[47]=A,e[48]=M,e[49]=R):R=e[49],R},bY={...ws,input:{...ws.input}},xY={...ws,input:{...ws.input,backgroundColor:"#F5F6F8"}},e1=t=>{const e=me.c(8),{children:n}=t,r=xt(1024),[s,o]=S.useState(!1);let i,a;e[0]!==r||e[1]!==s?(i=()=>{const f=()=>{window.scrollY>0&&!s?o(!0):window.scrollY===0&&o(!1)};return r&&window.addEventListener("scroll",f),()=>{r&&window.removeEventListener("scroll",f)}},a=[r,s],e[0]=r,e[1]=s,e[2]=i,e[3]=a):(i=e[2],a=e[3]),S.useEffect(i,a);const l=s?XOe:HR,c=r?"fixed":"relative";let u;return e[4]!==n||e[5]!==l||e[6]!==c?(u=d.jsx(xe,{sx:l,pos:c,justify:"space-between",align:"center",children:n}),e[4]=n,e[5]=l,e[6]=c,e[7]=u):u=e[7],u},trt=t=>{const e=me.c(5),{showDrawer:n,isMobile:r,onClose:s,children:o}=t;let i;return e[0]!==o||e[1]!==r||e[2]!==s||e[3]!==n?(i=r?d.jsx(d.Fragment,{children:o}):d.jsx(Xr,{opened:n,position:"right",size:"calc(100% - 280px)",zIndex:199,onClose:s,withCloseButton:!1,children:o}),e[0]=o,e[1]=r,e[2]=s,e[3]=n,e[4]=i):i=e[4],i},nrt=[As.From,As.To,As.Cc],rrt=[xs.ContainAddressBook,xs.NotContainAddressBook],wY=(t,e)=>{if(e){const n=structuredClone(t);return n&&!n.Action.SendCopyToEmails&&(n.Action.SendCopyToEmails=[]),n&&!n.Action.AutoReply&&(n.Action.AutoReply=VM.Action.AutoReply),n}return VM},SY=()=>{var q,U,W,Y,G,K;const{t}=Le(),e=Er(),n=sr(),r=Mr(),{classes:s}=ny(),o=zt(),i=re(Dn),a=n.emailId?+n.emailId:i[0].Id,l=br(Q=>jd(Q,a)),c=(q=l.Struct.Filters)==null?void 0:q[Number(n.id)],[u,f]=S.useState(!1),[h,m]=S.useState(!1),[y,v]=S.useState([]),[b,w]=S.useState(!1),C=xt(1024),k=Int(),E=Lnt(),j=Vnt(y),A=Ont(),M=Hie(),_=Ll({initialValues:wY(c,n==null?void 0:n.id),validateInputOnChange:!0,validate:mp(j)}),D=_.isDirty(),R=_.getInputProps("Name");R.value=R.value||"";const N=()=>{const Q=wY(c,n==null?void 0:n.id);_.setValues(Q),_.resetDirty(Q),f(!1),V()},z=async()=>{var Q;if(!_.values.Action.MarkAsFavorite&&!_.values.Action.MarkAsRead&&!_.values.Action.Remove&&!y.some(Z=>Z!==null)){f(!0);return}if(f(!1),_.isValid()){w(!0);const Z=(Q=l.Struct.Filters)!=null&&Q.length?[...l.Struct.Filters]:[],J=_.values;y.includes(hr.SentCopy)||(J.Action.SendCopyToEmails=void 0),y.includes(hr.AutoReply)||(J.Action.AutoReply=null),n!=null&&n.id?Z[Number(n==null?void 0:n.id)]=J:Z.push(J),await o(Ml({Struct:{...l.Struct,Filters:Z},UserEmailId:a})).unwrap().then(()=>{r.success(t("settings.notification.filterSaved")),e(`/${n.emailId}/settings/filters`),w(!1)}).catch(ne=>{r.error(ne.message??t("settings.notification.error")),w(!1)})}else _.validate()},B=()=>{var Q;try{n!=null&&n.id&&(o(Ml({Struct:{...l.Struct,Filters:(Q=l.Struct)==null?void 0:Q.Filters.filter((Z,J)=>J!==Number(n.id))},UserEmailId:a})),r.success(t("settings.notification.filterDeleted")),e("/settings/filters"))}catch{r.error(t("settings.notification.error"))}},L=()=>{_.setFieldValue(`Conditions.${_.values.Conditions.length}`,{Type:xs.Equal,Field:As==null?void 0:As.Subject,Value:""})},P=Q=>{const Z=[..._.values.Conditions];Z.splice(Q,1),_.setFieldValue("Conditions",[...Z])},I=()=>{D?qm({title:t("modals.titles.unsavedChanges"),children:d.jsx(ue,{children:t("modals.text.unsavedChangesText")}),labels:{confirm:`${t("modals.controls.stayOnPage")}`,cancel:`${t("modals.controls.dropChanges")}`},centered:!0,cancelProps:{color:"red",variant:"subtle",radius:"md",styles:{label:{fontSize:"12px"}}},confirmProps:{variant:"subtle",radius:"md",styles:{label:{fontSize:"12px"}}},onCancel:()=>{m(!1),setTimeout(()=>e(`/${n.emailId}/settings/filters`),100)}}):(m(!1),setTimeout(()=>e(`/${n.emailId}/settings/filters`),100))},H=(Q,Z)=>{v(J=>{const ne=[...J];return ne[Z]=Q,ne})},$=Q=>{y[Q]===hr.SentCopy&&_.setFieldValue("Action.SendCopyToEmails",[]),y[Q]===hr.Move&&_.setFieldValue("Action.MoveToFolderId",null),y[Q]===hr.AutoReply&&_.setFieldValue("Action.AutoReply",VM.Action.AutoReply),v(Z=>Z.filter((J,ne)=>ne!==Q))};S.useEffect(()=>m(!0),[]);const V=()=>{var Q,Z;if(c){const J=[];c.Action.MoveToFolderId&&J.push(hr.Move),(Q=c.Action.SendCopyToEmails)!=null&&Q.length&&c.Action.SendCopyToEmails[0]&&J.push(hr.SentCopy),(Z=c.Action.AutoReply)!=null&&Z.Text&&J.push(hr.AutoReply),v(J)}};return S.useEffect(()=>{V()},[c]),n!=null&&n.id&&!c?d.jsx(o2,{to:`/${n.emailId}/settings/filters`}):d.jsx(trt,{isMobile:C||!1,showDrawer:h,onClose:I,children:d.jsxs(bt,{gap:0,children:[d.jsx(e1,{children:C?d.jsxs(d.Fragment,{children:[d.jsx(xe,{w:120,children:d.jsx(Ve,{size:"lg",onClick:I,children:d.jsx(yo,{color:"#339AF0",size:36,stroke:1.5})})}),d.jsx(ue,{fz:16,sx:si,children:t("settings.titles.filter")}),d.jsx(xe,{w:120,justify:"flex-end",children:d.jsx(yt,{fz:16,variant:"subtle",styles:up,disabled:!D||b,onClick:z,children:t("save")})})]}):d.jsxs(d.Fragment,{children:[d.jsxs(xe,{gap:16,children:[d.jsx(Ve,{size:"lg",variant:"subtle",radius:"md",onClick:I,children:d.jsx(po,{size:22,stroke:1.5})}),d.jsx(ue,{fz:24,sx:si,children:t(c?"settings.titles.editFilter":"settings.titles.newFilter")})]}),d.jsxs(xe,{gap:8,children:[d.jsx(yt,{fz:14,variant:"subtle",styles:Zm,onClick:N,disabled:!D||b,children:t("cancelChanges")}),d.jsx(yt,{fz:14,onClick:z,disabled:!D||b,children:t("save")}),c&&d.jsxs(et,{position:"bottom-end",radius:"md",children:[d.jsx(et.Target,{children:d.jsx(Ve,{size:"lg",variant:"subtle",radius:"md",sx:Qte,children:d.jsx(Rc,{size:22})})}),d.jsx(et.Dropdown,{children:d.jsx(et.Item,{color:"red",onClick:B,leftSection:d.jsx(Eo,{color:"red",size:18}),fz:14,px:10,py:5,children:t("delete")})})]})]})]})}),d.jsx(bt,{p:C?16:52,pt:C?76:0,pb:C?76:16,children:d.jsxs(bt,{w:C?"auto":754,maw:"100%",gap:0,children:[d.jsxs(xe,{direction:C?"column":"row",gap:C?24:8,justify:"space-between",sx:{alignItems:"center",marginBottom:40},children:[d.jsxs(bt,{gap:0,style:{width:C?"100%":500,maxWidth:"100%"},children:[d.jsx(es,{variant:"unstyled",placeholder:t("settings.filterName"),sx:{flex:1},styles:QOe,...R}),d.jsx(Da,{})]}),d.jsx(ie,{className:s.mobileSwitchBox,children:d.jsx(Xi,{styles:Fu,label:_.values.IsDisabled?t("settings.filterDisabled"):t("settings.filterEnabled"),labelPosition:C?"left":"right",..._.getInputProps("IsDisabled"),checked:!_.values.IsDisabled,onChange:Q=>{_.setFieldValue("IsDisabled",!Q.target.checked)}})})]}),d.jsxs(bt,{gap:32,children:[d.jsxs(bt,{gap:16,children:[d.jsx(ue,{sx:DT,children:t("settings.condition")}),d.jsx(bt,{sx:JOe,children:d.jsx(_4,{data:E,styles:{label:{fontSize:14}},..._.getInputProps("IsAny"),onChange:Q=>{_.setFieldValue("IsAny",Q==="true")},value:`${_.values.IsAny}`})}),d.jsxs(bt,{gap:4,children:[(W=(U=_.values)==null?void 0:U.Conditions)==null?void 0:W.map((Q,Z)=>{var J,ne,se,ce,fe;return d.jsxs(ve,{gap:4,sx:Zte,className:Rf.removableRow,children:[d.jsxs(ve,{gap:C?8:4,w:C?"100%":715,align:"flex-start",children:[d.jsx(kw,{data:k.slice(0,-1),placeholder:t("settings.parameter"),..._.getInputProps(`Conditions.${Z}.Field`),value:((J=Q.Field)==null?void 0:J.toString())??null,onChange:le=>_.setFieldValue(`Conditions.${Z}.Field`,le?+le:0),width:150,styles:ws}),d.jsx(kw,{data:A(nrt.includes(_.values.Conditions[Z].Field??-1)),placeholder:t("settings.conditionName"),..._.getInputProps(`Conditions.${Z}.Type`),value:((ne=Q.Type)==null?void 0:ne.toString())??null,onChange:le=>_.setFieldValue(`Conditions.${Z}.Type`,le?+le:0),w:C?"100%":"auto",sx:{flex:1},styles:ws}),rrt.includes(_.values.Conditions[Z].Type??-1)?d.jsx(YA,{w:C?"100%":"auto",flex:1,data:M,placeholder:(se=Q==null?void 0:Q.ArrayValues)!=null&&se.length?"":t("settings.addressBook"),styles:ws,..._.getInputProps(`Conditions.${Z}.ArrayValues`),value:Q.ArrayValues??[],onChange:le=>_.setFieldValue(`Conditions.${Z}.ArrayValues`,le)}):d.jsx(es,{flex:1,styles:ws,placeholder:t("settings.addDescription"),..._.getInputProps(`Conditions.${Z}.Value`)})]}),C?d.jsx(ve,{sx:IT,children:d.jsx(ie,{children:((ce=_.values.Conditions)==null?void 0:ce.length)>1&&d.jsx(Ve,{size:"lg",h:36,onClick:()=>P(Z),children:d.jsx(W4,{color:"#339AF0",size:22,stroke:1})})})}):d.jsx(ve,{sx:IT,children:d.jsx(ie,{className:Rf.removeButton,children:((fe=_.values.Conditions)==null?void 0:fe.length)>1&&d.jsx(Ve,{size:"lg",h:36,onClick:()=>P(Z),children:d.jsx(po,{color:"#848E9C",size:18,stroke:1})})})})]},`${Z}${Q.Type}${Q.Field}`)}),d.jsx(ie,{mt:12,children:d.jsx(yt,{size:"sm",variant:"subtle",styles:{label:{fontWeight:"500",fontSize:"12px"}},leftSection:d.jsx(nm,{color:"#339AF0",size:16,stroke:1.5}),onClick:L,children:t("settings.addCondition")})})]})]}),d.jsxs(bt,{children:[d.jsx(ue,{sx:DT,children:t("settings.then")}),d.jsxs(bt,{gap:16,children:[d.jsx(Or,{label:d.jsxs(xe,{align:"center",gap:8,children:[t("settings.setFlag"),d.jsx("img",{src:Ant,alt:"",height:13,width:13})]}),sx:Zk,checked:(Y=_.values.Action)==null?void 0:Y.MarkAsFavorite,..._.getInputProps("Action.MarkAsFavorite")}),d.jsx(Or,{w:240,label:t("settings.maskAsRead"),sx:Zk,checked:(G=_.values.Action)==null?void 0:G.MarkAsRead,..._.getInputProps("Action.MarkAsRead")}),d.jsx(Or,{w:240,label:t("settings.moveToTrash"),sx:Zk,checked:(K=_.values.Action)==null?void 0:K.Remove,..._.getInputProps("Action.Remove")})]}),d.jsx(bt,{gap:4,children:y.map((Q,Z)=>d.jsx(ert,{index:Z,form:_,actionType:Q,onChangeAction:H,onRemoveAction:$,selectedActions:y},`${Q}-${Z}`))}),u&&d.jsx(ue,{c:"#FA5252",fz:10,children:t("settings.notification.actionTextError")}),y.length<3&&d.jsx(ie,{children:d.jsx(yt,{size:"sm",variant:"subtle",styles:{label:{fontWeight:"500",fontSize:"12px"}},leftSection:d.jsx(nm,{color:"#339AF0",size:16,stroke:1.5}),onClick:()=>v(Q=>[...Q,null]),children:t("settings.addAction")})})]})]})]})}),C&&(n==null?void 0:n.id)&&d.jsx(bt,{pos:"fixed",sx:eNe,children:d.jsx(yt,{color:"red",fz:16,variant:"subtle",onClick:B,children:t("delete")})})]})})},Fd=S.createContext({isDrawerOpen:!1,setDrawerOpen:()=>{}}),srt=t=>{const e=me.c(5),{children:n}=t,[r,s]=S.useState(!0);let o;e[0]!==r?(o={isDrawerOpen:r,setDrawerOpen:s},e[0]=r,e[1]=o):o=e[1];let i;return e[2]!==n||e[3]!==o?(i=d.jsx(Fd.Provider,{value:o,children:n}),e[2]=n,e[3]=o,e[4]=i):i=e[4],i},ort="/assets/filter-0jj9Lrav.png",irt=t=>{const e=me.c(14),{header:n,message:r,messageWidth:s,buttonText:o,onButtonClick:i}=t;let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a=d.jsx(xe,{w:202,h:180,children:d.jsx(Sd,{src:ort,w:202,h:180,style:{objectFit:"contain"}})}),e[0]=a):a=e[0];let l;e[1]!==n?(l=d.jsx(xe,{justify:"center",mt:25,children:d.jsx(ue,{sx:art,children:n})}),e[1]=n,e[2]=l):l=e[2];const c=s??400;let u;e[3]!==r||e[4]!==c?(u=d.jsx(xe,{justify:"center",children:d.jsx(ue,{maw:c,sx:lrt,ta:"center",children:r})}),e[3]=r,e[4]=c,e[5]=u):u=e[5];let f;e[6]===Symbol.for("react.memo_cache_sentinel")?(f={span:{fontWeight:500}},e[6]=f):f=e[6];let h;e[7]!==o||e[8]!==i?(h=d.jsx(xe,{justify:"center",children:d.jsx(yt,{size:"md",onClick:i,sx:f,children:o})}),e[7]=o,e[8]=i,e[9]=h):h=e[9];let m;return e[10]!==l||e[11]!==u||e[12]!==h?(m=d.jsxs(bt,{gap:0,px:26,m:"auto",align:"center",children:[a,l,u,h]}),e[10]=l,e[11]=u,e[12]=h,e[13]=m):m=e[13],m},art={fontSize:18,lineHeight:"32px",fontWeight:500,"@media (min-width: 1025px)":{lineHeight:"40px"}},lrt=t=>({color:t.colors.gray[6],lineHeight:"18px",margin:"0 0 30px","@media (min-width: 1025px)":{fontSize:t.fontSizes.md,lineHeight:"22px"}}),crt=(t,e)=>{let n=[];function r(s,o=0){const i={...s,level:o};n.push(i),s.Children&&s.Children.length>0&&s.Children.forEach(a=>r(a,o+1))}return t.forEach(s=>r(s)),n.reduce((s,o)=>{const i=O_.find(a=>a.Type===o.Type);return{...s,[o.Id]:i?e(i.label):o.Name}},{})},urt=[hr.SentCopy,hr.AutoReply],CY=()=>{var D;const{t}=Le(),e=zt(),n=Er(),r=sr(),s=Mr(),o=re(H2),i=re(Va),a=re(UTe),l=re(Dn),{classes:c}=ny(),{setDrawerOpen:u}=S.useContext(Fd),f=xt(1024),h=$nt(),m=Fnt(),y=Hie(),v=r.emailId?+r.emailId:l[0].Id,b=br(R=>jd(R,v)),w=S.useMemo(()=>{var R,N;return(N=(R=b.Struct)==null?void 0:R.Filters)==null?void 0:N.map((z,B)=>({...z,originalIndex:B})).filter(z=>{var B,L;return typeof((B=z==null?void 0:z.Action)==null?void 0:B.Type)=="number"&&!urt.includes((L=z.Action)==null?void 0:L.Type)})},[b]),C=S.useMemo(()=>crt(i,t),[i,t]),k=S.useCallback(R=>{var N;e(Ml({Struct:{...b.Struct,Filters:(N=b.Struct)==null?void 0:N.Filters.filter((z,B)=>B!==R)},UserEmailId:v}))},[e,v,b]),E=S.useCallback((R,N)=>{const z=[...b.Struct.Filters];z[R]={...z[R],IsDisabled:N},e(Ml({Struct:{...b.Struct,Filters:z},UserEmailId:v}))},[e,v,b]),j=S.useCallback(async R=>{var z,B;((B=(z=b.Struct)==null?void 0:z.Filters)==null?void 0:B[R])&&a&&await e(gx({...b.Struct.Filters[R],FolderId:a})).unwrap().then(()=>s.success(t("settings.notification.filterApplied"))).catch(L=>s.error((L==null?void 0:L.message)??t("settings.notification.error")))},[e,a,(D=b.Struct)==null?void 0:D.Filters]),A=S.useCallback((R,N,z)=>{var B;return R===xs.ContainAddressBook||R===xs.NotContainAddressBook?(B=z==null?void 0:z.map(L=>{var P;return(P=y.find(I=>I.value===L))==null?void 0:P.label}))==null?void 0:B.join(", "):N},[y]),M=S.useMemo(()=>d.jsx(d.Fragment,{children:w==null?void 0:w.map(R=>{var L,P,I,H,$,V,q,U,W,Y,G,K,Q,Z;const N=(L=R==null?void 0:R.Action)==null?void 0:L.MoveToFolderId,z=N!=null&&!C[N],B=`${R.originalIndex}${R.Name}${(P=R==null?void 0:R.Conditions)==null?void 0:P.length}${R.IsDisabled}`;return d.jsx(on,{withArrow:!0,label:t("settings.invalidFilter"),position:"top",disabled:!z,children:d.jsxs("tr",{style:{cursor:"pointer",backgroundColor:z?"#FFE3E3":void 0},onClick:()=>n(`edit/${R.originalIndex}`),children:[d.jsx("td",{style:{verticalAlign:"top",wordWrap:"break-word",padding:"16px 0",borderTop:"1px solid rgb(222, 226, 230)"},children:d.jsx(bt,{className:c.firstColumn,children:d.jsx(ue,{style:{fontSize:14,textDecoration:"none",color:"#339AF0",maxWidth:250},children:R.Name?R.Name:t("settings.titles.filter")})})}),d.jsx("td",{style:{verticalAlign:"top",maxWidth:"20vw",wordWrap:"break-word",padding:"16px 0",borderTop:"1px solid rgb(222, 226, 230)"},children:d.jsx(bt,{className:c.row,children:(I=R==null?void 0:R.Conditions)==null?void 0:I.map((J,ne)=>d.jsxs(ue,{sx:nf,children:[ne!==0?R.IsAny?`${t("settings.or")} `:`${t("settings.and")} `:"",d.jsx(Bc,{component:"span",sx:nNe,children:typeof(J==null?void 0:J.Field)=="number"&&h[J.Field]}),` ${typeof(J==null?void 0:J.Type)=="number"&&m[J.Type]}
               "${A(J.Type,J.Value,J.ArrayValues)}"`]},`${ne}${J.Type}${J.Field}`))})}),d.jsx("td",{style:{verticalAlign:"top",maxWidth:"20vw",padding:"16px 0",borderTop:"1px solid rgb(222, 226, 230)"},children:d.jsxs(bt,{className:c.row,children:[((H=R==null?void 0:R.Action)==null?void 0:H.MarkAsFavorite)&&d.jsx(ue,{sx:nf,children:t("settings.maskAsFavorite")}),(($=R==null?void 0:R.Action)==null?void 0:$.MarkAsRead)&&d.jsx(ue,{sx:nf,children:t("settings.maskAsRead")}),((V=R==null?void 0:R.Action)==null?void 0:V.Remove)&&d.jsx(ue,{sx:nf,children:t("settings.moveToTrash")}),((U=(q=R==null?void 0:R.Action)==null?void 0:q.AutoReply)==null?void 0:U.Text)&&d.jsx(ue,{sx:nf,children:t("settings.autoReply")}),((W=R==null?void 0:R.Action)==null?void 0:W.MoveToFolderId)&&d.jsx(ue,{sx:nf,children:`${t("settings.moveToFolder")} "${C[(Y=R==null?void 0:R.Action)==null?void 0:Y.MoveToFolderId]??t("settings.folderRemoved")}"`}),((K=(G=R==null?void 0:R.Action)==null?void 0:G.SendCopyToEmails)==null?void 0:K.length)&&d.jsxs(ue,{sx:nf,children:[t("settings.sendCopy"),` ${(Z=(Q=R==null?void 0:R.Action)==null?void 0:Q.SendCopyToEmails)==null?void 0:Z[0]}`]})]})}),d.jsx("td",{style:{verticalAlign:"top",padding:"16px 0",borderTop:"1px solid rgb(222, 226, 230)"},children:d.jsx(xe,{sx:GB.outside,children:d.jsxs(xe,{sx:GB.inner,onClick:J=>J.stopPropagation(),children:[d.jsx(on,{position:"top",label:R!=null&&R.IsDisabled?t("settings.enableFilter"):t("settings.disableFilter"),children:d.jsx(ie,{pr:8,children:d.jsx(Xi,{defaultChecked:!(R!=null&&R.IsDisabled),onChange:J=>E(R.originalIndex,!J.target.checked)})})}),d.jsxs(et,{position:"bottom-end",radius:"md",children:[d.jsx(et.Target,{children:d.jsx("span",{style:lNe,onClick:J=>{J.preventDefault(),J.stopPropagation()},children:d.jsx(Ve,{size:"lg",variant:"subtle",radius:"md",sx:Qte,children:d.jsx(Rc,{size:22})})})}),d.jsxs(et.Dropdown,{children:[d.jsx(et.Item,{onClick:()=>n(`edit/${R.originalIndex}`),leftSection:d.jsx(HQ,{size:18}),fz:14,px:10,py:5,children:t("editSettings")}),d.jsx(et.Item,{onClick:()=>E(R.originalIndex,!(R!=null&&R.IsDisabled)),leftSection:d.jsx(rke,{size:18}),fz:14,px:10,py:5,children:R!=null&&R.IsDisabled?t("enable"):t("disable")}),d.jsx(et.Item,{onClick:()=>j(R.originalIndex),leftSection:d.jsx(eke,{size:18}),fz:14,px:10,py:5,children:t("settings.runNow")}),d.jsx(et.Divider,{}),d.jsx(et.Item,{color:"red",onClick:()=>k(R.originalIndex),leftSection:d.jsx(Eo,{color:"red",size:18}),fz:14,px:10,py:5,children:t("delete")})]})]})]})})})]},B)},B)})}),[w,c.firstColumn,c.row,t,C,n,h,m,A,E,j,k]),_=S.useMemo(()=>d.jsx(bt,{gap:8,children:w==null?void 0:w.map(R=>{var B,L;const N=(B=R==null?void 0:R.Action)==null?void 0:B.MoveToFolderId,z=N!=null&&!C[N];return d.jsx(ya,{label:R.Name?R.Name:t("settings.titles.filter"),styles:rNe,style:{backgroundColor:z?"#FFE3E3":void 0},onClick:()=>n(`edit/${R.originalIndex}`),rightSection:d.jsxs(d.Fragment,{children:[(R==null?void 0:R.IsDisabled)&&d.jsx(yt,{component:"div",fz:16,variant:"subtle",sx:sNe,onClick:P=>{P.stopPropagation(),E(R.originalIndex,!(R!=null&&R.IsDisabled))},children:t("settings.enableFilterShort")}),d.jsx(Yi,{size:24,stroke:1.5,color:"#868E96"})]})},`${R.originalIndex}${R.Name}${(L=R==null?void 0:R.Conditions)==null?void 0:L.length}${R.IsDisabled}`)})}),[w,E,n,t,C]);return o!=="fulfilled"?d.jsx(ty,{}):d.jsxs(bt,{gap:0,flex:1,children:[d.jsx(xe,{sx:HR,justify:"space-between",align:"center",children:f?d.jsxs(d.Fragment,{children:[d.jsx(Ve,{size:"lg",onClick:()=>u(!0),children:d.jsx(yo,{color:"#339AF0",size:36,stroke:1.5})}),!!(w!=null&&w.length)&&d.jsx(yt,{fz:16,variant:"subtle",styles:up,onClick:()=>n("add"),children:t("add")})]}):!!(w!=null&&w.length)&&d.jsxs(d.Fragment,{children:[d.jsx(ue,{fz:24,sx:si,children:t("settings.titles.filters")}),d.jsx(yt,{fz:14,onClick:()=>n("add"),children:t("add")})]})}),w!=null&&w.length?f?d.jsxs(bt,{px:16,children:[d.jsx(ue,{fz:24,sx:si,children:t("settings.titles.filters")}),_]}):d.jsxs(Lr,{verticalSpacing:"md",horizontalSpacing:0,sx:{tr:{transition:"background 200ms"},"tbody tr:hover":{backgroundColor:"#F8F9FA"}},children:[d.jsx("thead",{children:d.jsxs("tr",{children:[d.jsx("th",{style:{padding:"16px 0"},children:d.jsx(ue,{tt:"uppercase",style:tNe,children:t("settings.name")})}),d.jsx("th",{style:{padding:"16px 0"},children:d.jsx(ue,{tt:"uppercase",style:YB,children:t("settings.conditionName")})}),d.jsx("th",{style:{padding:"16px 0"},children:d.jsx(ue,{tt:"uppercase",style:YB,children:t("settings.action")})}),d.jsx("th",{})]})}),d.jsx("tbody",{children:M})]}):d.jsx(irt,{header:t("settings.titles.filters"),message:t("settings.emptyMessage"),messageWidth:350,buttonText:t("settings.addFilter"),onButtonClick:()=>n("add")})]})},drt=()=>{const t=sr(),{t:e}=Le(),n=zt(),{setDrawerOpen:r}=S.useContext(Fd),s=xt(1024),o=Mr(),i=yp(),[a,l]=S.useState(!1),[c,u]=S.useState(!0),[f,h]=S.useState(!0),m=re(Dn),y=t.emailId?+t.emailId:m[0].Id,v=br(j=>jd(j,y)),b=re(H2);S.useEffect(()=>{(v==null?void 0:v.Struct.ShowThreads)!==void 0&&(u(v.Struct.ShowThreads),h(v.Struct.ShowThreads))},[v]);const w=c!==f,C=()=>a||!w,k=()=>{u(f)},E=async()=>{l(!0);try{await n(Ml({Struct:{...v.Struct,ShowThreads:c},UserEmailId:y})).unwrap(),h(c),await i(0,1)}catch{o.error(e("settings.notification.error"))}finally{l(!1)}};return b!=="fulfilled"?d.jsx(ty,{}):d.jsxs(bt,{gap:0,flex:1,children:[d.jsx(e1,{children:s?d.jsxs(d.Fragment,{children:[d.jsx(xe,{w:"30%",children:d.jsx(Ve,{size:"lg",onClick:()=>r(!0),children:d.jsx(yo,{color:"#339AF0",size:36,stroke:1.5})})}),d.jsx(ue,{fz:16,sx:si,children:e("settings.titles.generalSettings")}),d.jsx(xe,{w:"30%",justify:"flex-end",children:d.jsx(yt,{fz:16,variant:"subtle",styles:up,onClick:E,disabled:C(),children:e("save")})})]}):d.jsxs(d.Fragment,{children:[d.jsx(ue,{fz:24,sx:si,children:e("settings.titles.generalSettings")}),d.jsxs(xe,{gap:8,children:[d.jsx(yt,{fz:14,variant:"subtle",styles:Zm,onClick:k,disabled:C(),children:e("cancelChanges")}),d.jsx(yt,{fz:14,onClick:E,disabled:C(),children:e("save")})]})]})}),d.jsxs(bt,{p:s?16:52,pt:s?76:0,gap:30,children:[d.jsx(ue,{sx:DT,children:e("settings.interfaceSettings")}),d.jsx(Or,{label:e("settings.threadView"),checked:c,onChange:j=>u(j.currentTarget.checked),styles:j=>({label:{fontSize:s?j.fontSizes.lg:j.fontSizes.md,cursor:"pointer"}})})]})]})},frt="data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M11%208L8%2011M8%2011L11%2014M8%2011H16M18%204C18.7956%204%2019.5587%204.31607%2020.1213%204.87868C20.6839%205.44129%2021%206.20435%2021%207V15C21%2015.7956%2020.6839%2016.5587%2020.1213%2017.1213C19.5587%2017.6839%2018.7956%2018%2018%2018H13L8%2021V18H6C5.20435%2018%204.44129%2017.6839%203.87868%2017.1213C3.31607%2016.5587%203%2015.7956%203%2015V7C3%206.20435%203.31607%205.44129%203.87868%204.87868C4.44129%204.31607%205.20435%204%206%204H18Z'%20stroke='%23343A40'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e",prt="data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M6%2018V12C6%2011.2044%206.31607%2010.4413%206.87868%209.87868C7.44129%209.31607%208.20435%209%209%209H19M19%209L15%205M19%209L15%2013'%20stroke='%23343A40'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e",hrt="data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M6%2011.625H18M3%206H21M9%2017.25H15'%20stroke='%23343A40'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e",uI=t=>{const e=me.c(3),[n,r]=S.useState(!1);let s,o;return e[0]!==t?(s=()=>{let i;const a=()=>{r(!0),clearTimeout(i),i=window.setTimeout(()=>r(!1),1e3)},l=t.current;return l&&l.addEventListener("scroll",a),()=>{l&&l.removeEventListener("scroll",a)}},o=[t],e[0]=t,e[1]=s,e[2]=o):(s=e[1],o=e[2]),S.useEffect(s,o),n},mrt=t=>{const e=me.c(19),{account:n,children:r,isOpen:s,onToggle:o}=t;let i;e[0]!==n.Id||e[1]!==o?(i=()=>o(n.Id),e[0]=n.Id,e[1]=o,e[2]=i):i=e[2];let a;e[3]===Symbol.for("react.memo_cache_sentinel")?(a={root:{paddingLeft:"2px"},collapse:{width:"100%"},label:{fontWeight:"600",fontSize:14,color:"#31394A"},section:{marginRight:"4px"}},e[3]=a):a=e[3];let l;e[4]===Symbol.for("react.memo_cache_sentinel")?(l=d.jsx(d.Fragment,{}),e[4]=l):l=e[4];const c=s?"rotateZ(90deg)":"rotateZ(0deg)";let u;e[5]!==c?(u={transform:c,transition:"200ms"},e[5]=c,e[6]=u):u=e[6];let f;e[7]!==n.Id||e[8]!==o?(f=y=>{y.stopPropagation(),o(n.Id)},e[7]=n.Id,e[8]=o,e[9]=f):f=e[9];let h;e[10]!==u||e[11]!==f?(h=d.jsx(Yi,{size:16,stroke:1.5,color:"#868E96",className:"mantine-rotate-rtl",style:u,onClick:f}),e[10]=u,e[11]=f,e[12]=h):h=e[12];let m;return e[13]!==n.Email||e[14]!==r||e[15]!==s||e[16]!==i||e[17]!==h?(m=d.jsx(ya,{opened:s,onClick:i,label:n.Email,childrenOffset:0,styles:a,disableRightSectionRotation:!0,rightSection:l,leftSection:h,children:r}),e[13]=n.Email,e[14]=r,e[15]=s,e[16]=i,e[17]=h,e[18]=m):m=e[18],m},kY="emailsSettingsState",grt=()=>{var A;const{t}=Le(),e=Er(),n=zt(),r=wn(),s=xt(1024),{isDrawerOpen:o,setDrawerOpen:i}=S.useContext(Fd),a=re(zm),l=re(Z_),c=re(Dn),u=S.useRef(null),f=uI(u),[h,m]=S.useState(()=>{var _;const M=localStorage.getItem(kY);return M?JSON.parse(M):{[(_=c==null?void 0:c[0])==null?void 0:_.Id]:!0}}),y=S.useCallback(()=>{i(!1)},[i]),v=()=>{var D;const M=(D=r.state)==null?void 0:D.prevLocation;if(a&&l&&!s&&n(xl({id:a})),M)return e(M);e("/")},b=S.useCallback(M=>{e(M,{state:r.state}),s&&i(!1)},[i,e,s,r]),w=M=>{m(_=>({..._,[M]:!_[M]}))},C=S.useCallback(M=>d.jsxs(bt,{gap:2,children:[d.jsx(ya,{label:t("settings.titles.filters"),styles:s?g0:m0,onClick:()=>b(`/${M.Id}/settings/filters`),leftSection:d.jsx("img",{alt:"",src:hrt,height:24,width:24}),rightSection:s?d.jsx(Yi,{size:24,stroke:1.5,color:"#868E96"}):void 0,active:s?!1:r.pathname==="/settings"||r.pathname.includes(`/${M.Id}/settings/filters`)}),d.jsx(ya,{label:t("settings.titles.responder"),styles:s?g0:m0,onClick:()=>b(`/${M.Id}/settings/responder`),leftSection:d.jsx("img",{alt:"",src:frt,height:24,width:24}),rightSection:s?d.jsx(Yi,{size:24,stroke:1.5,color:"#868E96"}):void 0,active:s?!1:r.pathname.includes(`/${M.Id}/settings/responder`)}),d.jsx(ya,{label:t("settings.titles.resend"),styles:s?g0:m0,onClick:()=>b(`/${M.Id}/settings/resend`),leftSection:d.jsx("img",{alt:"",src:prt,height:24,width:24}),rightSection:s?d.jsx(Yi,{size:24,stroke:1.5,color:"#868E96"}):void 0,active:s?!1:r.pathname.includes(`/${M.Id}/settings/resend`)}),d.jsx(ya,{label:t("settings.titles.sign"),styles:s?g0:m0,onClick:()=>b(`/${M.Id}/settings/sign`),leftSection:d.jsx(xke,{size:24,stroke:1.5,color:"#343A40"}),rightSection:s?d.jsx(Yi,{size:24,stroke:1.5,color:"#868E96"}):void 0,active:s?!1:r.pathname.includes(`/${M.Id}/settings/sign`)})]}),[b,s,r.pathname,t]),k=((A=c==null?void 0:c.filter(M=>M.AccessType!==bi.Read))==null?void 0:A.length)<=1,E=S.useMemo(()=>{const M=s?g0:m0;return d.jsx(ya,{label:t("settings.titles.generalSettings"),styles:_=>({...M(_),root:{...M(_).root,marginBottom:k?"2px":void 0}}),onClick:()=>b("/settings/general"),leftSection:d.jsx(ZQ,{size:24,stroke:1.5,color:"#343A40"}),rightSection:s?d.jsx(Yi,{size:24,stroke:1.5,color:"#868E96"}):void 0,active:s?!1:r.pathname.includes("/settings/general")})},[b,s,r.pathname,t,k]),j=S.useMemo(()=>{var M;return((M=c==null?void 0:c.filter(_=>_.AccessType!==bi.Read))==null?void 0:M.length)>1?d.jsx(d.Fragment,{children:c.map((_,D)=>_.AccessType!==bi.Read?d.jsx(mrt,{account:_,manyAccounts:c.length>1,isOpen:h[_.Id]??D===0,onToggle:w,children:C(_)},_.Id):null)}):C(c[0])},[c,h,C]);return S.useEffect(()=>{localStorage.setItem(kY,JSON.stringify(h))},[h]),s?d.jsx(Xr,{styles:{inner:{zIndex:200},body:{padding:"0!important"}},size:"100%",opened:o,onClose:y,withCloseButton:!1,transitionProps:{duration:0},children:d.jsx($r,{withBorder:!1,sx:{top:"0",height:"100%"},children:d.jsx(Jr,{offsetScrollbars:!0,scrollbarSize:6,styles:{viewport:{paddingRight:0}},sx:{"& > * > *":{display:"block !important"}},children:d.jsxs($r.Section,{children:[d.jsx(xe,{h:52,pt:16,pl:6,align:"center",children:d.jsx(Ve,{size:"lg",sx:aNe,onClick:v,children:d.jsx(yo,{color:"#339AF0",size:36,stroke:1.5})})}),d.jsxs(bt,{gap:0,px:16,children:[d.jsx(ue,{fz:24,sx:KB,children:t("settings.titles.settings")}),E,j]})]})})})}):d.jsxs($r.Navbar,{w:{base:280},sx:oNe,withBorder:!1,children:[d.jsx(ie,{w:280,children:d.jsx(bt,{gap:4,children:d.jsxs(xe,{pl:24,gap:16,align:"center",children:[d.jsx(m2,{sx:iNe,children:d.jsx(Ve,{onClick:v,children:d.jsx(UQ,{color:"grey",size:22,stroke:1})})}),d.jsx(ue,{fz:24,sx:KB,children:t("settings.titles.settings")})]})})}),d.jsx(Jr,{offsetScrollbars:!0,viewportRef:u,scrollbarSize:6,p:"12px 12px 0",styles:{viewport:{paddingRight:0},scrollbar:{display:f?"block":"none"}},sx:{"& > * > *":{display:"block !important"}},children:d.jsx($r.Section,{children:d.jsxs(ie,{children:[E,j]})})})]})},yrt=()=>{var E,j,A,M,_,D,R,N;const{t}=Le(),e=zt(),n=sr(),{setDrawerOpen:r}=S.useContext(Fd),s=xt(1024),[o,i]=S.useState(!1),a=Mr(),l=Knt(),{classes:c}=ny(),u=re(Dn),f=n.emailId?+n.emailId:u[0].Id,h=br(z=>jd(z,f)),m=re(H2),y=S.useMemo(()=>{var z,B;return(B=(z=h.Struct)==null?void 0:z.Filters)==null?void 0:B.find(L=>{var P;return((P=L.Action)==null?void 0:P.Type)===hr.SentCopy})},[(E=h.Struct)==null?void 0:E.Filters]),v=()=>y?structuredClone(y):Znt,b=Ll({initialValues:v(),validateInputOnBlur:!0,validate:mp(l)}),w=b.isDirty(),C=()=>{b.setValues(v()),b.resetDirty(v())},k=async()=>{var z,B,L;if(b.isValid()){b.validate();let P=(B=(z=h.Struct)==null?void 0:z.Filters)==null?void 0:B.findIndex(H=>H.Action.Type===hr.SentCopy);const I=h.Struct.Filters?[...h.Struct.Filters]:[];if(P>=0?I[P]=b.values:I.push(b.values),!b.values.IsDisabled&&((L=b.values.Action.SendCopyToEmails)==null?void 0:L[0])===""){a.error(t("settings.notification.address"));return}i(!0),await e(Ml({Struct:{...h.Struct,Filters:I},UserEmailId:f})).unwrap().then(()=>{a.success(t("settings.notification.resendSaved")),b.resetDirty(b.values),i(!1)}).catch(H=>a.error(H??t("settings.notification.error")))}else b.validate()};return S.useLayoutEffect(()=>{C()},[(j=h.Struct)==null?void 0:j.Filters,f]),m!=="fulfilled"?d.jsx(ty,{}):d.jsxs(bt,{gap:0,flex:1,children:[d.jsx(e1,{children:s?d.jsxs(d.Fragment,{children:[d.jsx(xe,{w:"30%",children:d.jsx(Ve,{size:"lg",onClick:()=>r(!0),children:d.jsx(yo,{color:"#339AF0",size:36,stroke:1.5})})}),d.jsx(ue,{fz:16,sx:si,children:t("settings.titles.resend")}),d.jsx(xe,{w:"30%",justify:"flex-end",children:d.jsx(yt,{fz:16,variant:"subtle",styles:up,onClick:k,disabled:!w||o,children:t("save")})})]}):d.jsxs(d.Fragment,{children:[d.jsx(ue,{fz:24,sx:si,children:t("settings.titles.resend")}),d.jsxs(xe,{gap:8,children:[d.jsx(yt,{fz:14,variant:"subtle",styles:Zm,onClick:C,disabled:!w||o,children:t("cancelChanges")}),d.jsx(yt,{fz:14,onClick:k,disabled:!w||o,children:t("save")})]})]})}),d.jsx(bt,{p:s?16:52,pt:s?76:0,children:d.jsxs(bt,{w:s?"100%":500,maw:"100%",gap:s?24:32,children:[d.jsxs(ie,{className:c.mobileSwitchBox,children:[d.jsx(Xi,{styles:Fu,label:b.values.IsDisabled?t("settings.disabledResend"):t("settings.enableResend"),labelPosition:s?"left":"right",...b.getInputProps("IsDisabled"),checked:!b.values.IsDisabled,onChange:z=>b.setFieldValue("IsDisabled",!z.target.checked)}),s&&d.jsxs(d.Fragment,{children:[d.jsx(Xi,{styles:Fu,label:t("settings.checkRead"),labelPosition:"left",...b.getInputProps("Action.MarkAsRead"),checked:(A=b.values.Action)==null?void 0:A.MarkAsRead}),d.jsx(Xi,{styles:Fu,label:t("settings.removeResendMessages"),labelPosition:"left",...b.getInputProps("Action.Remove"),checked:(M=b.values.Action)==null?void 0:M.Remove})]})]}),d.jsxs(bt,{children:[d.jsx(ue,{fz:s?12:14,sx:z=>({color:z.colors.gray[6]}),children:t("settings.resendDescription")}),d.jsx(es,{sx:{flexGrow:1},placeholder:t("settings.resendAddress"),styles:vrt,...b.getInputProps("Action.SendCopyToEmails.0"),error:((_=b.errors)==null?void 0:_["Action.SendCopyToEmails.0"])??((D=b.errors)==null?void 0:D["Action.SendCopyToEmails"])})]}),!s&&d.jsxs(bt,{gap:8,children:[d.jsx(Or,{styles:Fu,label:t("settings.checkRead"),checked:(R=b.values.Action)==null?void 0:R.MarkAsRead,...b.getInputProps("Action.MarkAsRead")}),d.jsx(Or,{styles:Fu,label:t("settings.removeResendMessages"),checked:(N=b.values.Action)==null?void 0:N.Remove,...b.getInputProps("Action.Remove")})]})]})})]})},vrt={...ws,input:{...ws.input,backgroundColor:"#F5F6F8"},error:{fontSize:"10px"}},brt=()=>{var V,q,U,W,Y,G,K,Q,Z,J,ne,se,ce,fe,le,be,je,pe,_e,Ce,Te,Ae,Ze,He,lt,Ye,ge,Fe,Se,qe,ot,$e,pt,gt,Pt,at,nt,We,At,St,Ot,Tt,kt,jt,vt,Yt,Vt,Nt,Ht,cn,qt,Kt,yn;const{t}=Le(),e=zt(),{setDrawerOpen:n}=S.useContext(Fd),r=sr(),s=xt(1024),o=vn.language==="ru"?"ru":"en",i=Mr(),a=Ynt(),{classes:l}=ny(),c=re(Bm),u=re(H2),f=Bie(),h=re(Dn),m=r.emailId?+r.emailId:h[0].Id,y=br(ee=>jd(ee,m)),v=S.useMemo(()=>{var ae,de,Ee,De;const ee=structuredClone((de=(ae=y.Struct)==null?void 0:ae.Filters)==null?void 0:de.find(Qe=>Qe.Action.Type===hr.AutoReply));if(ee){if((Ee=ee.Action.AutoReply)!=null&&Ee.StartDate){const Qe=Ms(ee.Action.AutoReply.StartDate);Qe&&(ee.Action.AutoReply.StartDate=new Date(Qe.getTime()+A0(Qe,c)))}if((De=ee.Action.AutoReply)!=null&&De.TillDate){const Qe=Ms(ee.Action.AutoReply.TillDate);Qe&&(ee.Action.AutoReply.TillDate=new Date(Qe.getTime()+A0(Qe,c)))}}return ee},[c,y]),b=()=>v??Xnt,w=Ll({initialValues:b(),validate:mp(a)}),[C,k]=S.useState(!1),[E,j]=S.useState(!!((q=(V=v==null?void 0:v.Action)==null?void 0:V.AutoReply)!=null&&q.StartDate)),[A,M]=S.useState(1),_=w.isDirty();function D(ee){return ee.replace(/<[^>]*>?|['"]/gm,"")}const R=()=>{var ee,ae;return D(((ee=w.values.Action.AutoReply)==null?void 0:ee.Text)||"")===""&&!((ae=w.values.Action.AutoReply)!=null&&ae.Subject)?!0:C||!_},N=ee=>{if(j(ee.currentTarget.checked),!ee.currentTarget.checked)w.setFieldValue("Action.AutoReply.StartDate",null),w.setFieldValue("Action.AutoReply.TillDate",null);else{const ae=new Date;ae.setHours(0,0,0,0),w.setFieldValue("Action.AutoReply.StartDate",ae)}},z=(ee,ae)=>{var de,Ee,De;ee.currentTarget.checked?w.setFieldValue("Conditions.0",{ArrayValues:[...((De=w.values.Conditions[0])==null?void 0:De.ArrayValues)??[],ae],Type:xs.ContainAddressBook,Field:0}):w.setFieldValue("Conditions.0",{ArrayValues:(Ee=(de=w.values.Conditions[0])==null?void 0:de.ArrayValues)==null?void 0:Ee.filter(Qe=>Qe!==ae),Type:xs.ContainAddressBook,Field:0})},B=(ee,ae,de)=>{var mt,rt;const[Ee,De]=(ae??"00:00").split(":");let Qe;if(de)Qe=new Date(de);else if(ee==="Action.AutoReply.StartDate"&&((mt=w.values.Action.AutoReply)!=null&&mt.StartDate)){const st=Ms(w.values.Action.AutoReply.StartDate);Qe=st?new Date(st):new Date(Math.max(new Date().getTime(),new Date().getTime()))}else if(ee==="Action.AutoReply.TillDate"&&((rt=w.values.Action.AutoReply)!=null&&rt.TillDate)){const st=Ms(w.values.Action.AutoReply.TillDate);Qe=st?new Date(st):new Date(Math.max(new Date().getTime(),new Date().getTime()))}else Qe=new Date;Qe.setHours(Number(Ee)),Qe.setMinutes(Number(De)),Qe.setSeconds(0),Qe.setMilliseconds(0),w.setFieldValue(ee,Qe)},L=ee=>{var Ee,De;const ae=Ms(ee);if(!ae){w.setFieldValue("Action.AutoReply.StartDate",null);return}const de=Ms((De=(Ee=w.values.Action)==null?void 0:Ee.AutoReply)==null?void 0:De.StartDate);de?(ae.setHours(de.getHours()),ae.setMinutes(de.getMinutes()),ae.setSeconds(0),ae.setMilliseconds(0)):ae.setHours(0,0,0,0),w.setFieldValue("Action.AutoReply.StartDate",ae)},P=ee=>{var Ee,De;const ae=Ms(ee);if(!ae){w.setFieldValue("Action.AutoReply.TillDate",null);return}const de=Ms((De=(Ee=w.values.Action)==null?void 0:Ee.AutoReply)==null?void 0:De.TillDate);de?(ae.setHours(de.getHours()),ae.setMinutes(de.getMinutes()),ae.setSeconds(0),ae.setMilliseconds(0)):ae.setHours(0,0,0,0),w.setFieldValue("Action.AutoReply.TillDate",ae)},I=ee=>{var de,Ee,De,Qe,mt,rt;let ae=Ms((De=(Ee=(de=w==null?void 0:w.values)==null?void 0:de.Action)==null?void 0:Ee.AutoReply)==null?void 0:De.TillDate);if(!ae&&ee){const st=Ms((rt=(mt=(Qe=w==null?void 0:w.values)==null?void 0:Qe.Action)==null?void 0:mt.AutoReply)==null?void 0:rt.StartDate);ae=st&&st>new Date?new Date(st):new Date}ae&&ee&&B("Action.AutoReply.TillDate",ee,ae)},H=()=>{var ee,ae;w.setValues(b()),w.resetDirty(b()),j(!!((ae=(ee=v==null?void 0:v.Action)==null?void 0:ee.AutoReply)!=null&&ae.StartDate)),M(A+1)},$=async()=>{var ee,ae,de,Ee,De,Qe,mt;if(w.isValid())if((ae=(ee=w.values.Action)==null?void 0:ee.AutoReply)!=null&&ae.Text){let rt=(Ee=(de=y.Struct)==null?void 0:de.Filters)==null?void 0:Ee.findIndex(Xt=>Xt.Action.Type===hr.AutoReply);const st=structuredClone(w.values);if(!((De=st.Action)!=null&&De.AutoReply))return;const Mt=Ms((Qe=st.Action)==null?void 0:Qe.AutoReply.StartDate),Ut=Ms((mt=st.Action)==null?void 0:mt.AutoReply.TillDate),Lt=y.Struct.Filters?[...y.Struct.Filters]:[];Mt&&Mt.setTime(Mt.getTime()-A0(Mt,c)),Ut&&Ut.setTime(Ut.getTime()-A0(Ut,c)),rt>=0?Lt[rt]=st:Lt.push(st),k(!0),await e(Ml({Struct:{...y.Struct,Filters:Lt},UserEmailId:m})).unwrap().then(()=>{i.success(t("settings.notification.responderSaved")),w.resetDirty(),k(!1)}).catch(Xt=>i.error(Xt??t("settings.notification.error")))}else i.error(t("settings.notification.needText"));else w.validate()};return S.useLayoutEffect(()=>{H()},[(U=y.Struct)==null?void 0:U.Filters,m]),u!=="fulfilled"?d.jsx(ty,{}):d.jsxs(bt,{gap:0,flex:1,children:[d.jsx(e1,{children:s?d.jsxs(d.Fragment,{children:[d.jsx(xe,{w:"30%",children:d.jsx(Ve,{size:"lg",onClick:()=>n(!0),children:d.jsx(yo,{color:"#339AF0",size:36,stroke:1.5})})}),d.jsx(ue,{fz:16,sx:si,children:t("settings.titles.responder")}),d.jsx(xe,{w:"30%",justify:"flex-end",children:d.jsx(yt,{fz:16,variant:"subtle",styles:up,onClick:$,disabled:R(),children:t("save")})})]}):d.jsxs(d.Fragment,{children:[d.jsx(ue,{fz:24,sx:si,children:t("settings.titles.responder")}),d.jsxs(xe,{gap:8,children:[d.jsx(yt,{fz:14,variant:"subtle",styles:Zm,onClick:H,disabled:R(),children:t("cancelChanges")}),d.jsx(yt,{fz:14,onClick:$,disabled:R(),children:t("save")})]})]})}),d.jsx(bt,{p:s?16:52,pt:s?76:0,children:d.jsxs(bt,{w:s?"auto":754,maw:"100%",gap:s?24:32,children:[d.jsxs(bt,{gap:16,children:[d.jsx(ie,{className:l.mobileSwitchBox,children:d.jsx(Xi,{styles:Fu,label:w.values.IsDisabled?t("settings.disabledResponder"):t("settings.enableResponder"),labelPosition:s?"left":"right",...w.getInputProps("IsDisabled"),checked:!w.values.IsDisabled,onChange:ee=>w.setFieldValue("IsDisabled",!ee.target.checked)})}),d.jsx(ue,{fz:s?12:14,px:s?20:0,w:500,maw:"100%",c:"#868E96",children:t("settings.responderDescription")})]}),d.jsx(bt,{gap:16,children:d.jsxs(ie,{className:l.mobileSwitchBox,style:{flexDirection:"column",gap:16},children:[s?d.jsx(Xi,{styles:Fu,label:t("settings.enabledInPeriod"),labelPosition:"left",checked:E,onChange:N}):d.jsx(Or,{styles:Nb,label:t("settings.enabledInPeriod"),checked:E,onChange:N}),E&&d.jsxs(bt,{gap:4,children:[d.jsxs(xe,{gap:10,align:"center",direction:s?"column":"row",children:[s?d.jsx(Xte,{minDate:new Date,placeholder:t("settings.notSpecified"),startValue:(G=(Y=(W=w==null?void 0:w.values)==null?void 0:W.Action)==null?void 0:Y.AutoReply)!=null&&G.StartDate?Ms((Z=(Q=(K=w==null?void 0:w.values)==null?void 0:K.Action)==null?void 0:Q.AutoReply)==null?void 0:Z.StartDate):null,endValue:(se=(ne=(J=w==null?void 0:w.values)==null?void 0:J.Action)==null?void 0:ne.AutoReply)!=null&&se.TillDate?Ms((le=(fe=(ce=w==null?void 0:w.values)==null?void 0:ce.Action)==null?void 0:fe.AutoReply)==null?void 0:le.TillDate):null,onStartDateChange:L,onEndDateChange:P}):d.jsxs(d.Fragment,{children:[d.jsx(Ig,{locale:o,valueFormat:"DD.MM.YYYY",placeholder:t("settings.notSpecified"),styles:EY,minDate:new Date,value:(pe=(je=(be=w==null?void 0:w.values)==null?void 0:be.Action)==null?void 0:je.AutoReply)!=null&&pe.StartDate?Ms((Te=(Ce=(_e=w==null?void 0:w.values)==null?void 0:_e.Action)==null?void 0:Ce.AutoReply)==null?void 0:Te.StartDate):null,onChange:L}),d.jsx(Ia,{data:w3(),styles:TY,allowDeselect:!1,value:(He=(Ze=(Ae=w==null?void 0:w.values)==null?void 0:Ae.Action)==null?void 0:Ze.AutoReply)!=null&&He.StartDate?_u(Ms((ge=(Ye=(lt=w==null?void 0:w.values)==null?void 0:lt.Action)==null?void 0:Ye.AutoReply)==null?void 0:ge.StartDate)):"00:00",onChange:ee=>{var ae,de,Ee;ee&&B("Action.AutoReply.StartDate",ee,Ms((Ee=(de=(ae=w==null?void 0:w.values)==null?void 0:ae.Action)==null?void 0:de.AutoReply)==null?void 0:Ee.StartDate))}})]}),!s&&d.jsx(W4,{color:"grey",size:16,stroke:1}),s?d.jsx(ie,{w:"100%",children:d.jsx(ue,{sx:{color:"#fa5252",fontSize:10,lineHeight:1.2},children:w.errors["Action.AutoReply.TillDate"]})}):d.jsxs(d.Fragment,{children:[d.jsx(Ig,{locale:o,clearable:!0,valueFormat:"DD.MM.YYYY",placeholder:t("settings.notSpecified"),w:s?"100%":240,styles:EY,minDate:(qe=(Se=(Fe=w==null?void 0:w.values)==null?void 0:Fe.Action)==null?void 0:Se.AutoReply)!=null&&qe.StartDate?new Date((pt=($e=(ot=w==null?void 0:w.values)==null?void 0:ot.Action)==null?void 0:$e.AutoReply)==null?void 0:pt.StartDate):new Date,error:"",value:(at=(Pt=(gt=w==null?void 0:w.values)==null?void 0:gt.Action)==null?void 0:Pt.AutoReply)!=null&&at.TillDate?Ms((At=(We=(nt=w==null?void 0:w.values)==null?void 0:nt.Action)==null?void 0:We.AutoReply)==null?void 0:At.TillDate):null,onChange:P}),d.jsx(Ia,{data:w3(),styles:TY,allowDeselect:!1,value:(Tt=(Ot=(St=w==null?void 0:w.values)==null?void 0:St.Action)==null?void 0:Ot.AutoReply)!=null&&Tt.TillDate?_u(Ms((vt=(jt=(kt=w==null?void 0:w.values)==null?void 0:kt.Action)==null?void 0:jt.AutoReply)==null?void 0:vt.TillDate)):null,onChange:I})]})]}),!s&&d.jsx(ue,{sx:{color:"#fa5252",fontSize:10,lineHeight:1.2},children:w.errors["Action.AutoReply.TillDate"]})]})]})}),d.jsxs(bt,{children:[d.jsx(es,{sx:{flexGrow:1},placeholder:t("settings.responderTheme"),styles:xrt,...w.getInputProps("Action.AutoReply.Subject")}),d.jsx(zD,{placeholder:t("settings.responderText"),content:(Yt=w.values.Action.AutoReply)!=null&&Yt.Text?(Vt=w.values.Action.AutoReply)==null?void 0:Vt.Text:"",onUpdate:ee=>w.setFieldValue("Action.AutoReply.Text",ee.getHTML())},A)]}),d.jsxs(bt,{children:[d.jsx(ue,{fz:18,style:{fontWeight:"500"},children:t("settings.replaysTo")}),f.organization&&d.jsx(Or,{styles:Nb,label:t("settings.organisation"),checked:(Ht=(Nt=w.values.Conditions[0])==null?void 0:Nt.ArrayValues)==null?void 0:Ht.includes(f.organization),onChange:ee=>z(ee,f.organization)}),f.personal&&d.jsx(Or,{styles:Nb,label:t("settings.personal"),checked:(qt=(cn=w.values.Conditions[0])==null?void 0:cn.ArrayValues)==null?void 0:qt.includes(f.personal),onChange:ee=>z(ee,f.personal)}),f.favorite&&d.jsx(Or,{styles:Nb,label:t("settings.favorite"),checked:(yn=(Kt=w.values.Conditions[0])==null?void 0:Kt.ArrayValues)==null?void 0:yn.includes(f.favorite),onChange:ee=>z(ee,f.favorite)})]})]})})]})},Nb={label:{fontSize:14}},xrt={...ws,input:{...ws.input,backgroundColor:"#F5F6F8"}},EY={...ws,root:{width:"100%","@media (min-width: 1025px)":{width:150}},input:{fontSize:"12px"},option:{fontSize:"12px"},calendarHeaderLevel:{fontSize:"12px"},weekday:{fontSize:"12px"}},TY={...ws,root:{width:90},input:{fontSize:"12px"}},lC=t=>{const e=t.target;if(e){let n=e;for(;n;)n.hasAttribute("aria-hidden")&&n.removeAttribute("aria-hidden"),n=n.parentElement}},wrt=t=>{const e=me.c(15),{children:n}=t,r=xt(1024);let s;e[0]===Symbol.for("react.memo_cache_sentinel")?(s=[],e[0]=s):s=e[0],S.useEffect(Crt,s);let o;e[1]===Symbol.for("react.memo_cache_sentinel")?(o={width:280,breakpoint:"sm"},e[1]=o):o=e[1];const i=r?"100%":"",a=r?"auto":"100vh",l=r?"auto":"initial";let c;e[2]!==i||e[3]!==a||e[4]!==l?(c={main:{width:i,minHeight:a,height:l}},e[2]=i,e[3]=a,e[4]=l,e[5]=c):c=e[5];let u;e[6]===Symbol.for("react.memo_cache_sentinel")?(u={overflow:"hidden"},e[6]=u):u=e[6];let f;e[7]===Symbol.for("react.memo_cache_sentinel")?(f=d.jsx($r.Navbar,{sx:{height:"auto"},children:d.jsx(grt,{})}),e[7]=f):f=e[7];const h=r?"":"flex",m=r?0:"";let y;e[8]!==n||e[9]!==m||e[10]!==h?(y=d.jsx($r.Main,{display:h,pl:m,children:n}),e[8]=n,e[9]=m,e[10]=h,e[11]=y):y=e[11];let v;return e[12]!==y||e[13]!==c?(v=d.jsx(d.Fragment,{children:d.jsx(srt,{children:d.jsxs($r,{withBorder:!1,navbar:o,styles:c,sx:u,children:[f,y]})})}),e[12]=y,e[13]=c,e[14]=v):v=e[14],v};function Srt(){document.removeEventListener("focusin",lC)}function Crt(){return document.addEventListener("focusin",lC),Srt}const Uie=t=>{const e=me.c(16),{avatarSrc:n,initials:r,name:s,email:o}=t,a=`${OR(s||"")}`;let l;e[0]!==a?(l={border:"2px solid white",span:{background:a,color:"white",border:0}},e[0]=a,e[1]=l):l=e[1];let c;e[2]!==n||e[3]!==r||e[4]!==l?(c=d.jsx(ie,{mr:8,children:d.jsx(Pc,{sx:l,src:n,radius:"xl",color:"blue",size:36,children:r})}),e[2]=n,e[3]=r,e[4]=l,e[5]=c):c=e[5];let u;e[6]!==s?(u=d.jsx(ue,{truncate:!0,fz:14,children:s}),e[6]=s,e[7]=u):u=e[7];let f;e[8]!==o?(f=d.jsx(ue,{truncate:!0,fz:12,c:"dimmed",children:o}),e[8]=o,e[9]=f):f=e[9];let h;e[10]!==u||e[11]!==f?(h=d.jsxs(bt,{maw:247,mr:8,gap:0,children:[u,f]}),e[10]=u,e[11]=f,e[12]=h):h=e[12];let m;return e[13]!==c||e[14]!==h?(m=d.jsxs(d.Fragment,{children:[c,h]}),e[13]=c,e[14]=h,e[15]=m):m=e[15],m},MY=t=>{const e=me.c(23),{id:n,avatarSrc:r,initials:s,name:o,email:i,isOwner:a,rights:l,onDelete:c,changeSharingRights:u,isNew:f}=t,h=f===void 0?!1:f,{t:m}=Le(),v=xt(1024)?"100%":538;let b;e[0]!==r||e[1]!==i||e[2]!==s||e[3]!==o?(b=d.jsx(Uie,{avatarSrc:r,initials:s,name:o,email:i}),e[0]=r,e[1]=i,e[2]=s,e[3]=o,e[4]=b):b=e[4];let w;e[5]!==u||e[6]!==n||e[7]!==a||e[8]!==l||e[9]!==m?(w=d.jsx(ie,{ml:"auto",children:a?d.jsx(xe,{w:188,children:d.jsx(ue,{children:m("settings.owner")})}):d.jsx(Ia,{w:200,data:[{label:m("settings.readRights"),value:bi.Read.toString()},{label:m("settings.editRights"),value:bi.Edit.toString()},{label:m("settings.fullRights"),value:bi.Full.toString()}],styles:ZOe,value:l==null?void 0:l.toString(),onChange:j=>j&&u(n,+j)})}),e[5]=u,e[6]=n,e[7]=a,e[8]=l,e[9]=m,e[10]=w):w=e[10];let C;e[11]!==n||e[12]!==h||e[13]!==a||e[14]!==c?(C=!a&&d.jsx(Ve,{size:30,onClick:()=>c(n,h),children:d.jsx(po,{size:18})}),e[11]=n,e[12]=h,e[13]=a,e[14]=c,e[15]=C):C=e[15];let k;e[16]!==C?(k=d.jsx(xe,{className:Rf.removeButton,ml:8,w:30,children:C}),e[16]=C,e[17]=k):k=e[17];let E;return e[18]!==v||e[19]!==b||e[20]!==w||e[21]!==k?(E=d.jsxs(xe,{w:v,align:"center",pos:"relative",className:Rf.removableRow,children:[b,w,k]}),e[18]=v,e[19]=b,e[20]=w,e[21]=k,e[22]=E):E=e[22],E},krt=()=>{var $;const{t}=Le(),e=zt(),{setDrawerOpen:n}=S.useContext(Fd),r=xt(1024),[s,o]=S.useState(!1),[i,a]=S.useState(""),[l,c]=S.useState(),[u,f]=ppe("",200),[h,m]=S.useState([]),y=zc(),v=Mr(),b=sr(),w=Er(),C=re(Dn),k=re(ZTe),E=re(QTe),j=re(Md),A=re(eMe),M=re(JTe),_=b!=null&&b.emailId?+(b==null?void 0:b.emailId):C[0].Id,D=`${l!=null&&l.Surname?l.Surname[0]:"-"}${l!=null&&l.FirstName?l.FirstName[0]:"-"}`,R=S.useMemo(()=>{const V=h.map(q=>q.id);return A==null?void 0:A.filter(q=>!V.includes(q.Id))},[A,h]),N=()=>{L(),o(!1)},z=V=>{var U,W;const q=A.find(Y=>Y.Id.toString()===V);if(a(""),q){const Y={id:q.Id,avatarSrc:q==null?void 0:q.Avatar,initials:`${((U=q.Surname)==null?void 0:U[0])??""}${((W=q.FirstName)==null?void 0:W[0])??""}`,name:q.Name,email:q.Email,userAccessRights:bi.Read,isNew:!0};m(G=>[...G,Y]),o(!0)}y.closeDropdown()},B=async()=>{const V=h.map(q=>{var U;return e(STe({Ids:[(U=C==null?void 0:C[0])==null?void 0:U.Id],UserIds:[q.id],RoleIds:[],Type:q.userAccessRights,EntityType:Mg.UserEmail})).unwrap()});o(!1),Promise.all(V).then(()=>{var q;v.success(t("settings.notification.sharingSaved")),(q=C==null?void 0:C[0])!=null&&q.Id&&e(S3(_))})},L=()=>{if(E.length){const V=E.map(q=>{var U,W;return{id:q.Id,avatarSrc:q==null?void 0:q.Avatar,initials:`${q.Surname[0]}${q.FirstName[0]}`,name:q.Name,email:q.Email,userAccessRights:((W=(U=k==null?void 0:k.UserAccessRights)==null?void 0:U.find(Y=>Y.PrincipalId===q.Id))==null?void 0:W.Type)??bi.Read,isNew:!1}});m(V)}else m([])};S.useEffect(()=>{var V;(V=C==null?void 0:C[0])!=null&&V.Id&&e(S3(_))},[e,_,C]),S.useEffect(()=>{var q,U;const V=[];if((q=k==null?void 0:k.UserAccessRights)!=null&&q.length&&V.push(...k.UserAccessRights.map(W=>W.PrincipalId)),_!==C[0].Id){const W=(U=C.find(Y=>Y.Id===_))==null?void 0:U.UserId;W&&V.push(W)}V.length&&e(yT(V))},[e,C,k]),S.useEffect(()=>{u&&e(JJ({Query:u}))},[e,u]),S.useEffect(()=>{L()},[k==null?void 0:k.UserAccessRights,E]),S.useEffect(()=>{if(_===C[0].Id)c(j);else{const V=E.find(q=>{var U;return q.Id===((U=C.find(W=>W.Id===_))==null?void 0:U.UserId)});V&&c({Surname:V.Surname,FirstName:V.FirstName,Avatar:V.Avatar,Id:V.Id,Email:V.Email})}},[j,_,C,h,E]);const P=(V,q)=>{var U;if(!q){const W={entityType:Mg.UserEmail,entityId:(U=C[0])==null?void 0:U.Id,userId:V};e(CTe(W))}m(W=>W.filter(Y=>Y.id!==V))},I=(V,q)=>{const U=h.find(W=>W.id===V);U&&(U.userAccessRights=q,m(W=>[...W]),o(!0))},H=R==null?void 0:R.map(V=>{var q,U;return d.jsx(Ft.Option,{value:V.Id.toString(),children:d.jsx(xe,{children:d.jsx(Uie,{avatarSrc:V.Avatar,initials:`${((q=V.Surname)==null?void 0:q[0])??""}${((U=V.FirstName)==null?void 0:U[0])??""}`,name:V.Name,email:V.Email})})},V.Id)});return(($=C.find(V=>V.Id===_))==null?void 0:$.AccessType)!==bi.Full?d.jsx(jl,{hasHeader:!0,children:d.jsx(Oc,{heading:t("warningBoundaryText.heading"),description:t("warningBoundaryText.description3"),handleButtonClick:()=>w(`/${C[0].Id}/inbox`),buttonText:t("warningBoundaryText.button3"),img:md,propDescWidth:400})}):d.jsxs(bt,{gap:0,flex:1,children:[d.jsx(e1,{children:r?d.jsxs(d.Fragment,{children:[d.jsx(xe,{w:"30%",children:d.jsx(Ve,{size:"lg",onClick:()=>n(!0),children:d.jsx(yo,{color:"#339AF0",size:36,stroke:1.5})})}),d.jsx(ue,{fz:16,sx:si,children:t("settings.titles.share")}),d.jsx(xe,{w:"30%",justify:"flex-end",children:d.jsx(yt,{fz:16,variant:"subtle",styles:up,onClick:B,disabled:!s,children:t("save")})})]}):d.jsxs(d.Fragment,{children:[d.jsx(ue,{fz:24,sx:si,children:t("settings.titles.share")}),d.jsxs(xe,{gap:8,children:[d.jsx(yt,{fz:14,variant:"subtle",styles:Zm,onClick:N,disabled:!s,children:t("cancelChanges")}),d.jsx(yt,{fz:14,onClick:B,disabled:!s,children:t("save")})]})]})}),d.jsx(bt,{p:r?16:52,pt:r?76:0,children:d.jsx(bt,{w:r?"100%":500,maw:"100%",gap:r?24:32,children:d.jsxs(bt,{children:[d.jsx(ue,{fz:r?12:14,sx:V=>({color:V.colors.gray[6]}),children:t("settings.sharingDesc")}),d.jsxs(Ft,{styles:{dropdown:{maxHeight:"300px",overflow:"auto"}},onOptionSubmit:z,store:y,children:[d.jsx(Ft.Target,{children:d.jsx(es,{sx:{flexGrow:1,marginBottom:8},placeholder:t("settings.addUser"),styles:Ert,value:i,onChange:V=>{a(V.target.value),f(V.currentTarget.value),y.openDropdown(),y.updateSelectedOptionIndex()},onClick:()=>y.openDropdown(),onFocus:()=>y.openDropdown(),onBlur:()=>y.closeDropdown()})}),d.jsx(Ft.Dropdown,{children:d.jsx(Ft.Options,{children:H.length===0?d.jsx(Ft.Empty,{children:t("settings.notFound")}):H})})]}),M==="fulfilled"?d.jsxs(d.Fragment,{children:[d.jsx(MY,{name:`${(l==null?void 0:l.Surname)??"-"} ${(l==null?void 0:l.FirstName)??"-"}`,initials:D,avatarSrc:l!=null&&l.Avatar?`/api/v2/profile/getAvatar?id=${l==null?void 0:l.Id}`:void 0,email:l==null?void 0:l.Email,isOwner:!0}),h.filter(V=>V.id!==(l==null?void 0:l.Id)).map(V=>d.jsx(MY,{id:V.id,name:V.name,initials:V.initials,avatarSrc:V.avatarSrc,email:V.email,rights:V.userAccessRights,onDelete:P,changeSharingRights:I,isNew:V.isNew,isOwner:!1},V.id))]}):d.jsx(xe,{justify:"center",pt:16,children:d.jsx(Bs,{size:"sm"})})]})})})]})},Ert={...ws,input:{...ws.input,backgroundColor:"#F5F6F8"}},Trt=()=>{var j;const{t}=Le(),e=zt(),{setDrawerOpen:n}=S.useContext(Fd),r=sr(),s=xt(1024),[o,i]=S.useState(1),[a,l]=S.useState(!1),c=re(Dn),u=re(H2),f=Mr(),{classes:h}=ny(),m=r.emailId?+r.emailId:c[0].Id,y=br(A=>jd(A,m)),v=Ll({initialValues:{...y.Struct.Sign}}),b=v.isDirty();function w(A){return A.replace(/<[^>]*>?|['"]/gm,"")}const C=()=>w(v.values.Value||"")===""&&v.values.Value===y.Struct.Sign.Value?!0:a||!b,k=()=>{v.setValues({...y.Struct.Sign}),v.resetDirty(y.Struct.Sign),i(o+1)},E=async()=>{l(!0),await e(Ml({Struct:{...y.Struct,Sign:v.values},UserEmailId:m})).unwrap().then(A=>{var M;f.success(t("settings.notification.signSaved")),v.resetDirty((M=A==null?void 0:A.Struct)==null?void 0:M.Sign),l(!1)}).catch(A=>f.error(A??t("settings.notification.error")))};return S.useLayoutEffect(()=>{k()},[y.Struct.Sign,m]),u!=="fulfilled"?d.jsx(ty,{}):d.jsxs(bt,{gap:0,flex:1,children:[d.jsx(e1,{children:s?d.jsxs(d.Fragment,{children:[d.jsx(xe,{w:"30%",children:d.jsx(Ve,{size:"lg",onClick:()=>n(!0),children:d.jsx(yo,{color:"#339AF0",size:36,stroke:1.5})})}),d.jsx(ue,{fz:16,sx:si,children:t("settings.titles.sign")}),d.jsx(xe,{w:"30%",justify:"flex-end",children:d.jsx(yt,{fz:16,variant:"subtle",styles:up,onClick:E,disabled:C(),children:t("save")})})]}):d.jsxs(d.Fragment,{children:[d.jsx(ue,{fz:24,sx:si,children:t("settings.titles.sign")}),d.jsxs(xe,{gap:8,children:[d.jsx(yt,{fz:14,variant:"subtle",styles:Zm,onClick:k,disabled:C(),children:t("cancelChanges")}),d.jsx(yt,{fz:14,onClick:E,disabled:C(),children:t("save")})]})]})}),d.jsxs(bt,{p:s?16:52,pt:s?76:0,gap:0,children:[d.jsx(xe,{sx:{alignItems:"center",gap:32,marginBottom:40},children:d.jsxs(xe,{className:h.mobileSwitchBox,children:[d.jsx(Xi,{label:t("settings.forNewMessages"),labelPosition:s?"left":"right",styles:A=>({label:{fontSize:s?A.fontSizes.lg:A.fontSizes.md},labelWrapper:{width:"100%"}}),checked:v.values.IsAddToNew,onChange:A=>v.setFieldValue("IsAddToNew",A.target.checked)}),d.jsx(Xi,{label:t("settings.forAnswer"),labelPosition:s?"left":"right",styles:A=>({label:{fontSize:s?A.fontSizes.lg:A.fontSizes.md},labelWrapper:{width:"100%"}}),checked:v.values.IsAddToReply,onChange:A=>v.setFieldValue("IsAddToReply",A.target.checked)})]})}),d.jsx(bt,{w:s?"auto":750,maw:"100%",children:d.jsx(zD,{placeholder:t("settings.signText"),content:(j=v.values)!=null&&j.Value?JSON.parse(v.values.Value):"",onUpdate:A=>v.setFieldValue("Value",JSON.stringify(A.getHTML()))},o)})]})]})},Mrt="_row_target_1j8no_1",jrt="_row_target_clear_1j8no_9",Art="_row_target_check_1j8no_25",gs={row_target:Mrt,row_target_clear:jrt,row_target_check:Art},cC=(t,e)=>{const n=me.c(5),r=re(Fm),s=re(zr),o=e||r,i=re($o);let a;return n[0]!==s||n[1]!==t||n[2]!==i||n[3]!==o?(a=[],t.forEach(l=>{const c=o[l]??i;if(c){const u=s.find(m=>m.Id===c.FolderId),f=u==null?void 0:u.UserEmailId,h=a.find(m=>m.FolderId===c.FolderId&&m.UserEmailId===f);h?h.Ids.push(l):a.push({FolderId:c.FolderId,Ids:[l],UserEmailId:f})}}),n[0]=s,n[1]=t,n[2]=i,n[3]=o,n[4]=a):a=n[4],a},Lb=(t,e)=>{const n=new Map;return t.forEach(r=>{r.Type===e&&r.UserEmailId&&n.set(r.UserEmailId,r)}),n},_rt=()=>{const t=me.c(18),e=re(zr);let n;t[0]!==e?(n=Lb(e,Je.TRASH),t[0]=e,t[1]=n):n=t[1];let r;t[2]!==e?(r=Lb(e,Je.ARCHIVE),t[2]=e,t[3]=r):r=t[3];let s;t[4]!==e?(s=Lb(e,Je.SPAM),t[4]=e,t[5]=s):s=t[5];let o;t[6]!==e?(o=Lb(e,Je.INBOX),t[6]=e,t[7]=o):o=t[7];let i;t[8]!==n||t[9]!==r||t[10]!==s||t[11]!==o?(i={trash:n,archive:r,spam:s,inbox:o},t[8]=n,t[9]=r,t[10]=s,t[11]=o,t[12]=i):i=t[12];const a=i;let l;t[13]!==a?(l=(f,h)=>h?a[f===Je.TRASH?"trash":f===Je.ARCHIVE?"archive":f===Je.SPAM?"spam":"inbox"].get(h):void 0,t[13]=a,t[14]=l):l=t[14];const c=l;let u;return t[15]!==a||t[16]!==c?(u={foldersMaps:a,getFolderByUserEmail:c},t[15]=a,t[16]=c,t[17]=u):u=t[17],u},Rrt=(t,e)=>({moveToSpam:{title:t("modals.titles.moveToSpam"),description:t("modals.text.moveMultipleMessagesToFolder",{folder:t("readOnlyLabels.junk")}),confirmLabel:t("modals.controls.move")},restoreFromSpam:{title:t("modals.titles.restoreFromSpam"),description:t("modals.text.restoreFromSpamMessage"),confirmLabel:t("modals.controls.restore")},moveToTrash:{title:t("modals.titles.move"),description:t("modals.text.moveMultipleMessagesToTrash"),confirmLabel:t("modals.controls.delete"),isDestructive:!0},deleteForever:{title:t("modals.titles.deleteTitle"),description:t("modals.text.deleteSelectedMessagesFromTrash"),confirmLabel:t("modals.controls.delete"),isDestructive:!0}})[e],Bh=(t,{action:e,overrides:n})=>{const{title:r,description:s,confirmLabel:o,isDestructive:i}=Rrt(t,e);qm({title:r,children:d.jsx(ue,{children:s}),labels:{confirm:o,cancel:`${t("modals.controls.cancel")}`},centered:!0,...n,confirmProps:{color:i?"#fa5252":void 0,styles:{label:{fontSize:"12px"}},...n==null?void 0:n.confirmProps},cancelProps:{styles:{label:{fontSize:"12px"}},...n==null?void 0:n.cancelProps}})},Drt="_iconLabel_18ozx_1",Irt={iconLabel:Drt},Ort=t=>({width:"100%",margin:`1 ${-t.spacing.xs}`,padding:"0 20px 0 22px",color:t.colors.blue[5],fontSize:"14px",outline:"none","& > *":{justifyContent:"flex-start"},"&:hover":{backgroundColor:"transparent",color:t.colors.blue[5]},"&[data-disabled]":{backgroundColor:"transparent"}}),Ec="emailId-",Vie=t=>{const e=zt(),[n,r]=S.useState(!1),s=sr(),o=S.useRef(s.id),i=re(U2),a=re(aS),l=re(mr),c=Math.abs((a-1)*l.size),u=re(J_),f=re(Dn),h=re(Ed),m=S.useRef(h);S.useEffect(()=>{o.current=s.id},[s.id]),S.useEffect(()=>{m.current=h},[h]);const y=async(v,b=0,w,C)=>{var _,D;e(ree()),r(!0);const k=C??m.current;let E;k&&k!=="-1"?E=[parseInt(k.replace(Ec,""),10)]:(!k||k==="-1")&&(E=f.map(R=>R.Id)),e(im({folderId:"-1",offset:b,sortOrder:w?u.sortOrder:1,SearchContext:{Query:"",Body:"",Subject:"",From:"",To:"",StartDate:"",EndDate:"",HasAttachments:!1,Labels:[v.Id],...w?u:{}},UserEmailIds:E}));let j,A;e(tR({label:v.Id})),e(ud(!0));const M=await e(ur({SearchContext:{Query:"",Body:"",Subject:"",From:"",To:"",StartDate:"",EndDate:"",HasAttachments:!1,Labels:[v.Id],...w?u:{}},UserEmailIds:E}));j=((D=(_=M==null?void 0:M.payload)==null?void 0:_.Items)==null?void 0:D.length)||0,A=v.Name,N_(A,j)};return S.useEffect(()=>{if(t)return;const v=setTimeout(()=>{if(o.current&&!n){const b=o.current||-1,w=i==null?void 0:i.find(C=>C.Id===+b);w&&y(w,c,!0).then()}},50);return()=>clearTimeout(v)},[i,t]),y},qie=()=>{const t=me.c(2),{t:e}=Le();let n;if(t[0]!==e){const r=()=>e("modals.titles.newFolder");n=s=>{X2({title:r(),centered:!0,children:d.jsx(Nrt,{...s})})},t[0]=e,t[1]=n}else n=t[1];return n},Nrt=({parentId:t,userEmailId:e})=>{const n=zt(),{t:r}=Le(),s=Mr(),[o,i]=S.useState(!1),[a,l]=S.useState(0),c=S.useRef(null),u=r("validations.tip"),f=/^[a-zа-яё0-9\s_+=$()-]*$/gi,h=go().shape({name:Cc().matches(f,u).max(100,`${r("validations.nameLength")}`)}),m=Ll({validate:mp(h),initialValues:{name:""}}),y=async v=>{i(!0);try{const b=await n(ux({name:v.name.trim(),...t?{parentId:t}:{},...e?{userEmailId:e}:{}}));y_(b),s.success(r("notifications.messages.createFolder",{newName:v.name})),n(ja()),Ao()}catch(b){i(!1),b&&(b.message.includes("already exists")?s.error(r("notifications.messages.existedFolder",{folder:v.name})):s.error(r("notifications.messages.unknownError")))}};return S.useEffect(()=>{c.current&&setTimeout(()=>{var v;(v=c==null?void 0:c.current)==null||v.scrollIntoView({behavior:"smooth",block:"end"})},300)},[a]),d.jsx(d.Fragment,{children:d.jsx("form",{onSubmit:m.onSubmit(y),children:d.jsxs(bt,{gap:"xs",children:[d.jsx(es,{name:"Name","data-autofocus":!0,label:r("folderName"),...m.getInputProps("name"),onFocus:()=>l(a+1),styles:{label:{fontSize:"12px"},input:{fontSize:"12px"}}}),d.jsxs(ve,{ref:c,justify:"right",children:[d.jsx(yt,{variant:"default",styles:{label:{fontSize:"12px"}},onClick:()=>Ao(),children:r("modals.controls.cancel")}),d.jsx(yt,{styles:{label:{fontSize:"12px"}},disabled:o||!m.values.name.trim(),type:"submit",children:r("modals.controls.create")})]})]})})})},Wie=(t,e)=>{if(!t)return"";for(const n of t){if(n.Id===e)return n.path;if(n.Children&&n.Children.length>0){const r=Wie(n.Children,e);if(r)return r}}return""},Lrt=()=>{const t=me.c(2),{t:e}=Le();let n;return t[0]!==e?(n=r=>{X2({title:e("modals.titles.editingFolder"),centered:!0,children:d.jsx($rt,{folder:r})})},t[0]=e,t[1]=n):n=t[1],n},$rt=({folder:t})=>{const{t:e}=Le(),[n,r]=S.useState(!1),s=Mr(),o=ts(),i=Er(),a=zt(),l=e("validations.tip"),c=/^[a-zа-яё0-9\s_+=$()-]*$/gi,u=go().shape({name:Cc().matches(c,l).max(100,`${e("validations.nameLength")}`)}),f=Ll({validate:mp(u),initialValues:{name:t?t.label||t.Name:""}}),h=async m=>{var w;const y=t.label,v=t.Name,b=m.name.trim();if(r(!0),[y,v].includes(b)){Ao();return}try{const C=await a(dx({id:t==null?void 0:t.Id,name:m.name})),k=y_(C),E=rJ(k,e)||[];a(nee(E)),s.success(e("notifications.messages.editFolder",{oldName:t.label||t.Name,newName:m.name})),o!=null&&o.Id&&i(Wie(E,o.Id)),Ao()}catch(C){r(!1),Ct.isAxiosError(C)&&((w=C.response)!=null&&w.data.ErrorMessage)?s.error(e("notifications.messages.globalError")||e("notifications.messages.unknownError")):s.error(e("notifications.messages.unknownError"))}};return d.jsx("form",{onSubmit:f.onSubmit(h),children:d.jsxs(bt,{gap:"xs",children:[d.jsx(es,{styles:{label:{fontSize:"12px"},input:{fontSize:"12px"}},"data-autofocus":!0,label:e("folderName"),...f.getInputProps("name")}),d.jsxs(ve,{justify:"right",children:[d.jsx(yt,{styles:{label:{fontSize:"12px"}},variant:"default",onClick:()=>Ao(),children:e("modals.controls.cancel")}),d.jsx(yt,{styles:{label:{fontSize:"12px"}},disabled:n||!f.values.name,type:"submit",children:e("modals.controls.save")})]})]})})},Frt=["#4DABF7","#D0D5DD","#69DB7C","#FFD43B","#FF8787","#BDB4FE","#FAA7E0"],Yie=t=>{const e=me.c(5),{t:n}=Le(),r=zt(),{isOpened:s}=re(Td);let o;return e[0]!==r||e[1]!==s||e[2]!==n||e[3]!==t?(o=i=>{const a=i?"modals.titles.editLabel":"modals.titles.createLabel";s&&r(Dr()),X2({title:n(a),centered:!0,size:420,children:d.jsx(Gie,{item:i}),onClose:t})},e[0]=r,e[1]=s,e[2]=n,e[3]=t,e[4]=o):o=e[4],o},Gie=({item:t,onCancel:e,onSubmit:n})=>{const r=zt(),s=re(U2),{t:o}=Le(),i=Mr(),a=o("validations.tip"),l=/^[a-zа-яё0-9\s_+=$()-]*$/gi,c=go().shape({Name:Cc().required().matches(l,a).max(100,`${o("validations.nameLength")}`)}),u=Ll({validate:mp(c),initialValues:t?{...t}:{Color:"#84CAFF",Name:""}}),[f,h]=S.useState(!1),m=v=>u.setValues({Color:v}),y=async v=>{var w;const b=!t&&s.some(C=>C.Name===v.Name);if(h(!0),t&&t.Name===v.Name&&t.Color===v.Color){Ao();return}if(b){i.error(o("notifications.messages.existedLabel",{label:v.Name})),Ao();return}try{await r(yx([v])),r(Xu());let C="labelCreated";t&&(C=t.Name===v.Name?"labelColorEdited":"labelEdited");const k=t?t.Name:v.Name,E=v.Name,j=o(`notifications.messages.${C}`,{label:k,newName:E});i.success(j),Ao(),n==null||n()}catch(C){Ct.isAxiosError(C)&&((w=C.response)!=null&&w.data.ErrorMessage)?i.error(o("notifications.messages.globalError")||o("notifications.messages.unknownError")):i.error(o("notifications.messages.unknownError"))}finally{h(!1)}};return d.jsx("form",{onSubmit:u.onSubmit(y),children:d.jsxs(bt,{children:[d.jsx(ve,{gap:0,justify:"space-between",py:3,children:Frt.map(v=>d.jsx(id,{color:v,radius:4,size:36,onClick:()=>m(v),sx:{cursor:"pointer",boxShadow:v!==u.values.Color?"":"0 0 0 3px rgba(0, 0, 0, .2)"}},v))}),d.jsx(es,{name:"Name","data-autofocus":!0,label:o("modals.titles.labelName"),labelProps:{fz:14},...u.getInputProps("Name"),styles:{label:{fontSize:"12px"},input:{fontSize:"12px"}}}),d.jsxs(ve,{justify:"right",children:[d.jsx(yt,{styles:{label:{fontSize:"12px"}},variant:"default",onClick:()=>{Ao(),e==null||e()},children:o("modals.controls.cancel")}),d.jsx(yt,{styles:{label:{fontSize:"12px"}},disabled:f||!u.values.Name.trim(),type:"submit",children:o("modals.controls.save")})]})]})})},zrt=t=>{const e=me.c(8);switch(t.type){case 0:return null;case 1:{let n;return e[0]===Symbol.for("react.memo_cache_sentinel")?(n=d.jsx(YQ,{color:"#343A40",stroke:1.5,size:18}),e[0]=n):n=e[0],n}case 4:{let n;return e[1]===Symbol.for("react.memo_cache_sentinel")?(n=d.jsx(I_,{color:"#343A40",stroke:1.5,size:18}),e[1]=n):n=e[1],n}case 8:{let n;return e[2]===Symbol.for("react.memo_cache_sentinel")?(n=d.jsx(WQ,{color:"#343A40",stroke:1.5,size:18}),e[2]=n):n=e[2],n}case 16:{let n;return e[3]===Symbol.for("react.memo_cache_sentinel")?(n=d.jsx(bc,{color:"#343A40",stroke:1.5,size:18}),e[3]=n):n=e[3],n}case 128:{let n;return e[4]===Symbol.for("react.memo_cache_sentinel")?(n=d.jsx(Eo,{color:"#343A40",stroke:1.5,size:18}),e[4]=n):n=e[4],n}case 512:{let n;return e[5]===Symbol.for("react.memo_cache_sentinel")?(n=d.jsx(Cf,{color:"#343A40",stroke:1.5,size:18}),e[5]=n):n=e[5],n}case 2048:{let n;return e[6]===Symbol.for("react.memo_cache_sentinel")?(n=d.jsx(QQ,{color:"#343A40",stroke:1.5,size:18}),e[6]=n):n=e[6],n}case 1024:{let n;return e[7]===Symbol.for("react.memo_cache_sentinel")?(n=d.jsx(R2,{color:"#343A40",stroke:1.5,size:18}),e[7]=n):n=e[7],n}}return null},Prt="_list_14q8h_2",Brt="_item_14q8h_17",Hrt="_selected_14q8h_34",vE={list:Prt,item:Brt,selected:Hrt},Urt=t=>{const e=me.c(12),{folders:n,selectedFolderId:r,setSelectedFolderId:s}=t;let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o={},e[0]=o):o=e[0];const[i,a]=S.useState(o);let l;e[1]===Symbol.for("react.memo_cache_sentinel")?(l=[],e[1]=l):l=e[1];const c=S.useRef(l);let u,f;e[2]!==n?(u=()=>{const y=ay(c.current,n.map(Vrt));a(y)},f=[n],e[2]=n,e[3]=u,e[4]=f):(u=e[3],f=e[4]),S.useEffect(u,f);let h;e[5]!==n||e[6]!==i||e[7]!==r||e[8]!==s?(h=n.map((y,v)=>d.jsx(Qr.Item,{className:`${vE.item} ${y.folderId===r?vE.selected:""}`,styles:{itemLabel:{maxWidth:"100%"},itemWrapper:{maxWidth:"100%"}},onClick:()=>s(y.folderId),children:d.jsxs(ve,{sx:{flexWrap:"nowrap"},gap:"0",children:[d.jsx(Ve,{component:"div",size:"lg",children:d.jsx(zrt,{type:y.type})}),d.jsx(on,{withinPortal:!0,label:y.path,disabled:!i[y.folderId],children:d.jsx(ue,{ref:b=>{c.current[v]=b},sx:{wordBreak:"break-all",whiteSpace:"nowrap",lineHeight:2},truncate:!0,children:y.path})})]})},y.folderId)),e[5]=n,e[6]=i,e[7]=r,e[8]=s,e[9]=h):h=e[9];let m;return e[10]!==h?(m=d.jsx(Qr,{className:vE.list,children:h}),e[10]=h,e[11]=m):m=e[11],m};function Vrt(t){return{Id:t.folderId}}const Kie={INBOX:Je.INBOX,SENT:Je.SENT,DRAFTS:Je.DRAFTS,SPAM:Je.SPAM,TRASH:Je.TRASH,OUTBOX:Je.OUTBOX,SNOOZED:Je.SNOOZED,ARCHIVE:Je.ARCHIVE,TEMPLATES:Je.TEMPLATES,ERRORS:Je.ERRORS,SHARING:Je.SHARING},bE=t=>t?!Object.values(Kie).includes(t):!0,qrt={[Je.INBOX]:{allowed:[Je.TRASH,Je.SPAM,Je.ARCHIVE,Je.TEMPLATES],allowCustomFolders:!0},[Je.SENT]:{allowed:[Je.TRASH,Je.ARCHIVE,Je.TEMPLATES],allowCustomFolders:!0},[Je.DRAFTS]:{allowed:[Je.TRASH,Je.ARCHIVE,Je.TEMPLATES],allowCustomFolders:!0},[Je.SPAM]:{allowed:[Je.INBOX,Je.TRASH,Je.ARCHIVE,Je.TEMPLATES],allowCustomFolders:!0},[Je.TRASH]:{allowed:[Je.INBOX,Je.SPAM,Je.SENT,Je.DRAFTS,Je.ARCHIVE,Je.TEMPLATES],allowCustomFolders:!0},[Je.ARCHIVE]:{allowed:[Je.INBOX,Je.SPAM,Je.SENT,Je.DRAFTS,Je.TRASH,Je.TEMPLATES],allowCustomFolders:!0},[Je.OUTBOX]:{allowed:[],allowCustomFolders:!1},[Je.SNOOZED]:{allowed:[],allowCustomFolders:!1},[Je.TEMPLATES]:{allowed:Object.values(Kie).filter(t=>t!==Je.OUTBOX),allowCustomFolders:!0},[Je.SHARING]:{allowed:[],allowCustomFolders:!1},[Je.ERRORS]:{allowed:[],allowCustomFolders:!1}},Xie=(t,e)=>{if(!e)return!1;const{Type:n}=e;if(n===Je.OUTBOX||n===Je.SNOOZED||n===Je.SHARING||n===Je.ERRORS)return!1;if(!t)return!0;const{Id:r,Type:s}=t;if(r===e.Id||s===Je.OUTBOX||s===Je.SNOOZED||s===Je.ERRORS)return!1;if(bE(s))return n!==Je.OUTBOX;const o=s!==void 0?qrt[s]:null;return o?!!(n!==void 0&&o.allowed.includes(n)||bE(n)&&o.allowCustomFolders):bE(n)},Wrt=t=>!(t===Je.OUTBOX||t===Je.SNOOZED||t===Je.ERRORS),Zie=(t,e)=>{const n=e.toLowerCase();return t.Name.toLowerCase().includes(n)||t.label&&t.label.toLowerCase().includes(n)?!0:t.Children?t.Children.some(r=>Zie(r,e)):!1},uC="-1",Yrt=t=>!t||t===uC?null:parseInt(t.replace(Ec,""),10),py=t=>t.startsWith("/search")?"search":t.includes("/tags/")?"labels":"folder",Qie=t=>{const{pageContext:e,connectedAccountsCount:n,accountSelectionMode:r}=t;return e==="labels"?{canMove:!1}:e==="search"&&n>=2&&r===uC?{canMove:!1}:{canMove:!0}},Jie=(t,e,n,r)=>Qie({pageContext:py(t),connectedAccountsCount:e,accountSelectionMode:n}).canMove,Grt=(t,e,n,r)=>Qie({pageContext:py(t),connectedAccountsCount:e,accountSelectionMode:n}).canMove,Krt=(t,e,n,r,s,o)=>{if(t!=="search"||e<2)return null;if(n!==uC)return Yrt(n);if(r.length===1){const i=r[0],a=s[i];if(a){const l=o.find(c=>c.Id===a.FolderId);if(l)return l.UserEmailId}}return null},Xrt=({ids:t,onMoved:e,selectedMessages:n,emailId:r,mobileMessageOpened:s})=>{const{t:o}=Le(),i=wn(),a=oC(),[l,c]=S.useState(!1),[u,f]=S.useState(""),[h,m]=S.useState(null),y=Mr(),v=zt(),b=cC(t,n),w=xt(768),C=ts(),k=yp(),E=re(Dn),j=re(Va),A=re(zr),M=re(Fm),_=re(zm),D=re(GTe),R=re($o),N=re(Ed),z="",B=S.useRef(null),L=A.find(q=>q.Id===h),P=()=>{if(!L)return;const q=L.Type===Je.SPAM,U=t.some(K=>{var Q;return((Q=A.find(Z=>{var J;return Z.Id===((J=M[K])==null?void 0:J.FolderId)}))==null?void 0:Q.Type)===Je.SPAM}),W=L.Type===Je.INBOX&&((C==null?void 0:C.Type)===Je.SPAM||(D==null?void 0:D.Type)===Je.SPAM||U),Y=L.Type===Je.TRASH;let G=null;if(q?G="moveToSpam":W?G="restoreFromSpam":Y&&(G="moveToTrash"),G){Bh(o,{action:G,overrides:{onConfirm:()=>I()}});return}I()},I=async()=>{if(!h||!L)return;let q=0;const U=b.map(({FolderId:Y,Ids:G})=>(q=G.length,v(Aa({fromId:Y,Ids:G,toId:L.Id})).unwrap()));c(!0),await Promise.all(U),await k(q);const W=t.filter(Y=>{var G;return!((G=M[Y])!=null&&G.WasRead)}).length;v(fc(W)),v(sS({count:W,folderId:L.Id})),y.success(`${o("notifications.messages.movedTo")} ${L.label||L.Name}`),_&&t.includes(_)&&(v(jo()),v(Ns(null)),(i.pathname.includes("/message/")||s)&&R&&a()),e(),Ao()},H=S.useMemo(()=>{const q=i.pathname.startsWith("/search"),U=i.pathname.includes("/tags/");return(q||U)&&!s?null:(i.pathname.includes("/message/")||s)&&R?A.find(Y=>Y.Id===R.FolderId):C},[i.pathname,s,R,A,C]),$=S.useMemo(()=>{const q=py(i.pathname);if(q==="labels")return[];const U=Krt(q,E.length,N,t,n??M,A);if(q==="search"&&E.length>=2&&t.length>1&&N===uC)return[];const W=(Z,J,ne)=>{const se=J?`${J}/${Z.Name}`:Z.label,ce=se==null?void 0:se.split("/"),fe=ce&&`${ce[0]}/.../${ce[ce.length-1]}`;ne.push({folderId:Z.Id,type:Z.Type,path:ce&&(ce==null?void 0:ce.length)>3?fe:se})},Y=(Z,J)=>{const ne=[];return Xie(H,Z)&&Zie(Z,u)&&W(Z,J,ne),Z!=null&&Z.Children&&(Z==null||Z.Children.forEach(ce=>ne.push(...Y(ce,J?`${J}/${Z.Name}`:Z.label??"")))),ne},G=j.filter(Z=>U!==null?Z.UserEmailId===U:E.length>=2?Z.UserEmailId===((C==null?void 0:C.UserEmailId)??r):!0).reduce((Z,J)=>(Z.push(...Y(J,z)),Z),[]),Q=V_(G,[2,512]);return B.current===null&&(B.current=Q),Q},[N,C,u,j,r,E.length,H,i.pathname,t,n,M,A]),V=l&&B.current?B.current:$;return d.jsxs(bt,{gap:"xs",sx:{justifyContent:w?"space-between":"flex-start",height:w?"100%":""},className:w?"":co.customScrollbar,children:[d.jsx(es,{size:"md",rightSection:d.jsx(G4,{size:16}),onChange:q=>f(q.target.value)}),($==null?void 0:$.length)>0?d.jsx(Urt,{selectedFolderId:h,setSelectedFolderId:m,folders:V}):d.jsx(xe,{justify:"center",pt:8,pb:16,children:o("messages.noFolderFound")}),d.jsxs(ve,{justify:"center",children:[d.jsx(yt,{styles:{label:{fontSize:"12px"}},variant:"default",onClick:()=>Ao(),children:o("modals.controls.cancel")}),d.jsx(yt,{styles:{label:{fontSize:"12px"}},disabled:!h||l,onClick:P,children:o("modals.controls.move")})]})]})},Zrt=()=>{const t=me.c(19),e=xt(768),{t:n}=Le();let r;t[0]===Symbol.for("react.memo_cache_sentinel")?(r={gap:"5px"},t[0]=r):r=t[0];const s=e?"20px":"13px",o=e?"auto":"15px";let i;t[1]===Symbol.for("react.memo_cache_sentinel")?(i={justifyContent:"center"},t[1]=i):i=t[1];let a;t[2]!==s||t[3]!==o?(a={padding:"0",marginRight:"5px",width:s,height:o,span:i},t[2]=s,t[3]=o,t[4]=a):a=t[4];const l=e?"lg":"0";let c;t[5]===Symbol.for("react.memo_cache_sentinel")?(c={inner:{justifyContent:"flex-start"}},t[5]=c):c=t[5];let u;t[6]!==e?(u=d.jsx(Ve,{component:"div",size:"lg",children:e?d.jsx(yo,{stroke:1,size:"40px"}):d.jsx(po,{stroke:1.5,size:20})}),t[6]=e,t[7]=u):u=t[7];let f;t[8]!==a||t[9]!==l||t[10]!==u?(f=d.jsx(yt,{variant:"transparent",sx:a,size:l,styles:c,onClick:Qrt,children:u}),t[8]=a,t[9]=l,t[10]=u,t[11]=f):f=t[11];let h;t[12]!==n?(h=n("modals.titles.moving"),t[12]=n,t[13]=h):h=t[13];let m;t[14]!==h?(m=d.jsx(ue,{size:"md",fw:500,children:h}),t[14]=h,t[15]=m):m=t[15];let y;return t[16]!==m||t[17]!==f?(y=d.jsxs(xe,{align:"center",sx:r,children:[f,m]}),t[16]=m,t[17]=f,t[18]=y):y=t[18],y};function Qrt(){return Ao()}const Jrt=t=>{const e=me.c(7),{ids:n,onMoved:r,selectedMessages:s,emailId:o,mobileMessageOpened:i}=t,a=xt(768);let l;return e[0]!==o||e[1]!==n||e[2]!==a||e[3]!==i||e[4]!==r||e[5]!==s?(l=()=>X2({size:"580px",title:d.jsx(Zrt,{}),withCloseButton:!1,centered:!1,fullScreen:a,children:d.jsx(Xrt,{ids:n,onMoved:r,selectedMessages:s,emailId:o,mobileMessageOpened:i}),styles:{header:{padding:"16px 16px 16px 16px","@media (max-width: 768px)":{height:"56px",boxShadow:"0px 0px 10px rgba(0, 0, 0, 0.1)",button:{marginLeft:"0!important"},"&. mantine-CloseButton-root":{marginLeft:"0!important"}}},content:{"@media (max-width: 768px)":{height:"100%","&":{overflowY:"auto",height:"100%"}}},body:{"@media (max-width: 768px)":{paddingTop:"20px!important",height:"calc(100% - 60px)","&. mantine-Modal-inner":{padding:"0"}}}}}),e[0]=o,e[1]=n,e[2]=a,e[3]=i,e[4]=r,e[5]=s,e[6]=l):l=e[6],l},t1=S.createContext({isDrawerOpen:!1,setDrawerOpen:()=>{}}),est=t=>{const e=me.c(5),{children:n}=t,[r,s]=S.useState(!1);let o;e[0]!==r?(o={isDrawerOpen:r,setDrawerOpen:s},e[0]=r,e[1]=o):o=e[1];let i;return e[2]!==n||e[3]!==o?(i=d.jsx(t1.Provider,{value:o,children:n}),e[2]=n,e[3]=o,e[4]=i):i=e[4],i},tst=({blockClosing:t,...e})=>{const n=re(Dl),s=Yie(()=>{setTimeout(()=>{t==null||t(!1)},0)}),o=()=>{t==null||t(!0),s()};return d.jsxs(m2,{sx:i=>({"@media (min-width: 1025px)":{borderRadius:"8px","&:hover":{backgroundColor:i.colors.gray[1]}}}),children:[d.jsx(vi.Control,{...e}),d.jsx(Ve,{pr:5,onClick:i=>{i.stopPropagation(),o()},size:"lg",variant:"subtle",color:"gray",disabled:!n.length,sx:{width:"47px!important",height:"38px",borderRadius:"8px",outline:"none",padding:"0!important","@media (min-width: 1025px)":{"&:hover":{backgroundColor:""}},"&[data-disabled]":{backgroundColor:"transparent",border:"none"}},children:d.jsx(nm,{size:"1rem"})})]})},qM=({isFilters:t,onItemClick:e,isToolbar:n,blockClosing:r,stackProps:s})=>{var q,U;const o=zt(),{t:i}=Le(),a=Mr(),l=re(U2),c=(U=(q=re(mr))==null?void 0:q.SearchContext)==null?void 0:U.Labels,u=re(Dn),{isOpened:f}=re(Td),h=wn(),{isDrawerOpen:m,setDrawerOpen:y}=S.useContext(t1),v=S.useRef([]),[b,w]=S.useState({}),C=S.useRef(null),[k,E]=S.useState({isOpen:!1,activeMenuId:null}),j=xt(1024),A=sr(),M=Er(),_=re(Va),D=()=>{setTimeout(()=>{r==null||r(!1)},0)},R=Yie(D),N=Vie(m||!!n),{clearSelection:z}=Fl(),B=S.useCallback(async()=>{try{const W=_.find(Y=>Y.Name.toLowerCase()==="inbox");await o(ur({folderId:W==null?void 0:W.Id,SearchContext:{Labels:[]}})),o(ud(!1))}catch{a.error(i("notifications.messages.unknownError"))}},[o,_,a,i]),L=async W=>{var Y;try{await o(vx(W.Id)),a.success(i("notifications.messages.deleteLabel",{label:W==null?void 0:W.Name})),A.name&&M(h.pathname,{replace:!0}),Number(A.id)===(W==null?void 0:W.Id)||window.location.pathname===`/tags/${W.Id}`?(M(`/${(Y=u[0])==null?void 0:Y.Id}/inbox`,{replace:!0}),await B()):await o(Xu())}catch{a.error(i("notifications.messages.unknownError"))}},P=W=>{f&&o(Dr()),qm({title:`${i("modals.titles.deleteLabel")}`,children:d.jsx(ue,{children:i("modals.text.removeAllLabelFromMessages")}),labels:{confirm:`${i("modals.controls.delete")}`,cancel:`${i("modals.controls.cancel")}`},centered:!0,confirmProps:{color:"red",styles:{label:{fontSize:"12px"}}},cancelProps:{styles:{label:{fontSize:"12px"}}},onConfirm:()=>L(W),onClose:D})},I=W=>{E(Y=>Y.activeMenuId===W&&Y.isOpen?(D(),{...Y,isOpen:!1,activeMenuId:null}):{...Y,isOpen:!0,activeMenuId:W})},H=S.useCallback(()=>{setTimeout(()=>{y(!1)},500)},[y]),$=async W=>{o(Dc(1)),o(Ns(null)),o(jo()),z(),await N(W,0,!1,"-1"),M(`/tags/${W.Id}`),H()};S.useEffect(()=>{const W=ay(v.current,l);w(W)},[l]),Jm(C,()=>E({isOpen:!1,activeMenuId:null}),"mouseup");const V=W=>({opacity:W?0:1,marginRight:"5px",marginLeft:"4px",width:"16px",height:"16px",minWidth:"0",borderRadius:"2px",transform:"rotate(-90deg)",color:"#868E96","&[data-rotate]":{transform:"rotate(0deg)",marginRight:"5px",marginLeft:"4px"},"@media (min-width: 1025px)":{"&:hover":{backgroundColor:"#f8f9fa"}}});return d.jsx(bt,{...s,children:d.jsx($r.Section,{grow:!0,mt:"sm",children:d.jsx(vi,{transitionDuration:80,maw:j?320:280,defaultValue:"item-1",value:n?"item-1":void 0,chevronPosition:"left",mx:"auto",styles:{content:{paddingRight:0,paddingLeft:0},control:{svg:{marginRight:0}},root:{margin:j?"0!important":"0"},chevron:V(n)},children:d.jsxs(vi.Item,{sx:{borderBottom:"0px"},c:"dimmed",value:"item-1",children:[d.jsx(tst,{blockClosing:r,sx:{padding:0,span:{padding:"10px 0",transition:"0.2s"},"&:active":{backgroundColor:"transparent"},"@media (min-width: 1025px)":{borderRadius:"8px","&:hover":{backgroundColor:"transparent"}}},children:d.jsx(ue,{c:"dimmed",fw:400,fz:12,children:i("upperCaseLabels")})}),d.jsxs(vi.Panel,{children:[l.map((W,Y)=>d.jsx(on,{withinPortal:!0,label:d.jsx("div",{style:{maxWidth:"350px",whiteSpace:"normal",wordBreak:"break-all"},children:W.Name}),position:"right",withArrow:!0,arrowPosition:"center",disabled:!b[W.Id],children:d.jsxs(ve,{py:0,pl:"23px",pr:0,px:"0",mb:2,onClick:()=>e?(r&&r(!1),e(W)):$(W),sx:G=>({flexWrap:"nowrap",cursor:"pointer",gap:"15px",backgroundColor:t&&(c!=null&&c.includes(W.Id))&&(!j||h.pathname.includes("/tags/"))?G.colors.blue[0]:"",borderRadius:G.radius.md,"@media (min-width: 1025px)":{backgroundColor:k.isOpen&&k.activeMenuId===W.Id?t&&(c!=null&&c.includes(W.Id))?G.colors.blue[0]:G.colors.gray[1]:"","&:hover":{backgroundColor:t&&(c!=null&&c.includes(W.Id))?G.colors.blue[0]:G.colors.gray[1],"& .menuBox":{opacity:1}}}}),children:[d.jsx(ve,{justify:"center",sx:{width:""},children:d.jsx(eJ,{color:W.Color,fill:W.Color,stroke:"white",strokeWidth:1,className:Irt.iconLabel})}),d.jsxs(xe,{w:"100%",justify:"space-between",sx:{overflow:"hidden"},children:[d.jsx(ue,{ref:G=>{v.current[Y]=G},truncate:"end",lineClamp:1,sx:{flexGrow:1,color:"#343A40",padding:"7px 12px 7px 0",display:"block",position:"relative"},children:W.Name}),j?null:d.jsx(ie,{className:k.isOpen&&k.activeMenuId===W.Id?"menuBox-open":"",children:d.jsx(ve,{ref:C,className:"menuBox",sx:{opacity:k.isOpen&&k.activeMenuId===W.Id?1:0},children:d.jsxs(et,{offset:-1,position:"bottom-end",radius:"md",children:[d.jsx(et.Target,{children:d.jsx(Ve,{size:"lg",variant:"subtle",onClick:G=>{G.stopPropagation(),I(W.Id),r==null||r(!0)},sx:{width:"36px!important",height:"36px",borderRadius:"8px",padding:"0!important","@media (min-width: 1025px)":{"&:hover":{backgroundColor:t&&(c!=null&&c.includes(W.Id))?"#f3faff":""}}},children:d.jsx(Rc,{size:20})})}),d.jsxs(et.Dropdown,{children:[d.jsx(et.Item,{color:"#343A40",px:10,py:5,fz:14,leftSection:d.jsx(Y4,{size:18}),onClick:G=>{G.stopPropagation(),R(W)},children:i("edit")}),d.jsx(et.Item,{fz:14,px:10,py:5,color:"red",leftSection:d.jsx(Eo,{size:18}),onClick:G=>(G.stopPropagation(),P(W)),children:i("delete")})]})]})})})]})]})},W.Id)),d.jsx(on,{display:l.length?"none":"",withinPortal:!0,label:i("addLabel"),position:"right",withArrow:!0,arrowPosition:"center",opened:!1,children:d.jsx(yt,{display:l.length?"none":"",variant:"subtle",color:"gray",leftSection:d.jsx(nm,{stroke:1.5,size:18}),onClick:()=>R(),disabled:!_.length,sx:Ort,styles:{section:{marginRight:"14px"}},children:i("addLabel")})})]})]})})})})},nst="_list_1j1ds_2",rst="_iconLabel_1j1ds_28",sst="_checkbox_1j1ds_32",ost="_short_1j1ds_41",$b={list:nst,iconLabel:rst,checkbox:sst,short:ost},ist=t=>{const e=me.c(17),{allLabels:n,labelStates:r,setLabelStates:s}=t;let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o={},e[0]=o):o=e[0];const[i,a]=S.useState(o);let l;e[1]===Symbol.for("react.memo_cache_sentinel")?(l=[],e[1]=l):l=e[1];const c=S.useRef(l);let u,f;e[2]!==n?(u=()=>{const k=ay(c.current,n);a(k)},f=[n],e[2]=n,e[3]=u,e[4]=f):(u=e[3],f=e[4]),S.useEffect(u,f);let h;e[5]!==r?(h=k=>r.find(j=>j.labelId===k)||{labelId:k,state:"unchecked",originalState:"unchecked"},e[5]=r,e[6]=h):h=e[6];const m=h,y=ast;let v;e[7]!==m||e[8]!==s?(v=k=>{const E=m(k);let j;E.state==="unchecked"&&E.originalState==="indeterminate"?j="indeterminate":E.state==="checked"&&E.originalState==="indeterminate"?j="unchecked":j=y(E),s(A=>A.map(M=>M.labelId===k?{...M,state:j}:M))},e[7]=m,e[8]=s,e[9]=v):v=e[9];const b=v;let w;e[10]!==n||e[11]!==m||e[12]!==b||e[13]!==i?(w=n.map((k,E)=>{const j=m(k.Id),A=j.state==="checked",M=j.state==="indeterminate";return d.jsx(on,{withinPortal:!0,label:d.jsx("div",{style:{maxWidth:"350px",whiteSpace:"normal",wordBreak:"break-all"},children:k.Name}),position:"right",withArrow:!0,arrowPosition:"center",disabled:!i[k.Id],children:d.jsxs(ve,{py:0,px:12,mb:2,mr:5,onClick:()=>b(k.Id),sx:lst,children:[d.jsx(ve,{justify:"center",sx:{width:""},children:d.jsx(eJ,{color:k.Color,fill:k.Color,className:$b.iconLabel})}),d.jsx(xe,{w:"100%",justify:"space-between",sx:{overflow:"hidden"},children:d.jsx(ue,{ref:_=>{c.current[E]=_},truncate:"end",lineClamp:1,sx:{flexGrow:1,color:"#343A40",padding:"7px 12px 7px 0",display:"block",position:"relative"},children:k.Name})}),d.jsx(Or,{checked:A,indeterminate:M,size:"xs",className:`${$b.checkbox} ${$b.short}`,styles:{input:{cursor:"pointer"}},onMouseDown:cst,onClick:ust,onDoubleClick:dst,onKeyDown:fst,onPointerDown:pst,onChange:()=>b(k.Id)})]})},k.Id)}),e[10]=n,e[11]=m,e[12]=b,e[13]=i,e[14]=w):w=e[14];let C;return e[15]!==w?(C=d.jsx(Qr,{className:$b.list,children:w}),e[15]=w,e[16]=C):C=e[16],C};function ast(t){const{state:e}=t;switch(e){case"unchecked":return"checked";case"checked":return"unchecked";case"indeterminate":return"checked";default:return"unchecked"}}function lst(t){return{flexWrap:"nowrap",cursor:"pointer",gap:"15px",borderRadius:t.radius.md}}function cst(t){t.stopPropagation()}function ust(t){t.stopPropagation()}function dst(t){return t.stopPropagation()}function fst(t){return t.stopPropagation()}function pst(t){return t.stopPropagation()}const hst=({ids:t,onConfirm:e,onCancel:n,selectedMessages:r,isSingleMessageToolbar:s})=>{const{t:o}=Le(),i=zt(),a=xt(768),l=re($o),c=re(U2),u=re(Fm),[f,h]=S.useState(!1),m=S.useMemo(()=>r&&Array.isArray(r)&&r.length?r.reduce((j,A)=>(j[A.Id]=A,j),{}):u,[r,u]),y=cC(t,m),v=S.useMemo(()=>s&&l||l&&Object.keys(r||{}).length===0?[l]:Object.values(r||{}),[s,l,r]),[b,w]=S.useState([]);S.useEffect(()=>{const j=c.map(A=>{const M=v.filter(D=>{var R;return(R=D.Labels)==null?void 0:R.includes(A.Id)});let _="unchecked";return M.length===v.length?_="checked":M.length>0&&(_="indeterminate"),{labelId:A.Id,state:_,originalState:_}});w(j)},[c,v]);const C=j=>j==="add"||j==="remove",k=S.useMemo(()=>b.filter(j=>j.state!==j.originalState),[b]),E=async()=>{h(!0);try{if(k.length===0){Ao();return}const j=k.map(A=>{const M=A.state==="checked"?"add":"remove";return{labelId:A.labelId,action:M}});if(y.length>0){const A={add:[],remove:[]};j.forEach(({labelId:_,action:D})=>{C(D)&&A[D].push(_)});const M=y.map(({FolderId:_,Ids:D})=>{const R=[];return A.add.length>0&&R.push(i(om({folderId:_,ids:D,labelIds:A.add,enabled:!0})).unwrap()),A.remove.length>0&&R.push(i(om({folderId:_,ids:D,labelIds:A.remove,enabled:!1})).unwrap()),Promise.all(R)});await Promise.all(M)}Ao(),e==null||e()}catch(j){console.error("Error applying labels:",j)}finally{h(!1)}};return d.jsxs(bt,{gap:"xs",sx:{justifyContent:a?"space-between":"flex-start",height:a?"100%":""},className:a?"":co.customScrollbar,children:[c.length?d.jsx(ist,{allLabels:c,selectedMessages:v,labelStates:b,setLabelStates:w}):d.jsx(xe,{justify:"center",pt:8,pb:16,children:o("messages.noLabelsFound")}),d.jsxs(ve,{justify:"center",children:[d.jsx(yt,{styles:{label:{fontSize:"12px"}},variant:"default",onClick:()=>n==null?void 0:n(),children:o("modals.controls.cancel")}),d.jsx(yt,{styles:{label:{fontSize:"12px"}},disabled:k.length<=0||f,onClick:E,children:o("modals.controls.save")})]})]})},mst=t=>{const e=me.c(37),{onBackClick:n}=t,r=xt(768),{t:s}=Le(),[o,i]=S.useState(!1);let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a={gap:"10px"},e[0]=a):a=e[0];const l=r?"20px":"13px",c=r?"auto":"15px";let u;e[1]===Symbol.for("react.memo_cache_sentinel")?(u={justifyContent:"center"},e[1]=u):u=e[1];let f;e[2]!==l||e[3]!==c?(f={padding:"0",marginRight:"5px",width:l,height:c,span:u},e[2]=l,e[3]=c,e[4]=f):f=e[4];const h=r?"lg":"0";let m;e[5]===Symbol.for("react.memo_cache_sentinel")?(m={inner:{justifyContent:"flex-start"}},e[5]=m):m=e[5];let y;e[6]!==n?(y=()=>n(),e[6]=n,e[7]=y):y=e[7];const v=r?10:0;let b;e[8]!==r?(b=r?d.jsx(yo,{stroke:1,size:"30px"}):d.jsx(po,{stroke:1.5,size:20}),e[8]=r,e[9]=b):b=e[9];let w;e[10]!==b||e[11]!==v?(w=d.jsx(Ve,{component:"div",size:"lg",mr:v,children:b}),e[10]=b,e[11]=v,e[12]=w):w=e[12];let C;e[13]!==w||e[14]!==f||e[15]!==h||e[16]!==y?(C=d.jsx(yt,{variant:"transparent",sx:f,size:h,styles:m,onClick:y,children:w}),e[13]=w,e[14]=f,e[15]=h,e[16]=y,e[17]=C):C=e[17];let k;e[18]!==s?(k=s("labels"),e[18]=s,e[19]=k):k=e[19];let E;e[20]!==k?(E=d.jsx(ue,{size:"md",fw:500,children:k}),e[20]=k,e[21]=E):E=e[21];let j;e[22]===Symbol.for("react.memo_cache_sentinel")?(j={padding:"0",marginLeft:"auto !important",width:"20px",height:"auto",span:{justifyContent:"center"}},e[22]=j):j=e[22];let A,M;e[23]===Symbol.for("react.memo_cache_sentinel")?(A={inner:{justifyContent:"flex-start"}},M=()=>i(!0),e[23]=A,e[24]=M):(A=e[23],M=e[24]);let _;e[25]===Symbol.for("react.memo_cache_sentinel")?(_=d.jsx(yt,{variant:"transparent",sx:j,size:"lg",styles:A,onClick:M,children:d.jsx(Ve,{component:"div",size:"lg",children:d.jsx(nm,{stroke:1.5,size:20})})}),e[25]=_):_=e[25];let D;e[26]!==s?(D=s("modals.titles.createLabel"),e[26]=s,e[27]=D):D=e[27];let R;e[28]===Symbol.for("react.memo_cache_sentinel")?(R=()=>i(!1),e[28]=R):R=e[28];let N;e[29]===Symbol.for("react.memo_cache_sentinel")?(N=d.jsx(Gie,{onCancel:()=>i(!1),onSubmit:()=>i(!1)}),e[29]=N):N=e[29];let z;e[30]!==o||e[31]!==D?(z=d.jsx(nr,{title:D,opened:o,size:420,onClose:R,children:N}),e[30]=o,e[31]=D,e[32]=z):z=e[32];let B;return e[33]!==C||e[34]!==E||e[35]!==z?(B=d.jsxs(xe,{align:"center",sx:a,children:[C,E,_,z]}),e[33]=C,e[34]=E,e[35]=z,e[36]=B):B=e[36],B},gst=t=>{const e=me.c(18),{opened:n,onClose:r,ids:s,onConfirm:o,selectedMessages:i,isSingleMessageToolbar:a}=t,l=xt(768);let c;e[0]!==r?(c=d.jsx(mst,{onBackClick:r}),e[0]=r,e[1]=c):c=e[1];let u;e[2]!==s||e[3]!==a||e[4]!==r||e[5]!==o||e[6]!==i?(u=d.jsx(hst,{isSingleMessageToolbar:a,ids:s,onConfirm:o,onCancel:r,selectedMessages:i}),e[2]=s,e[3]=a,e[4]=r,e[5]=o,e[6]=i,e[7]=u):u=e[7];let f;e[8]===Symbol.for("react.memo_cache_sentinel")?(f={width:"100%"},e[8]=f):f=e[8];let h;e[9]===Symbol.for("react.memo_cache_sentinel")?(h={padding:"16px","@media (max-width: 768px)":{height:"56px",boxShadow:"0px 0px 10px rgba(0, 0, 0, 0.1)"}},e[9]=h):h=e[9];let m;e[10]===Symbol.for("react.memo_cache_sentinel")?(m={"@media (max-width: 768px)":{height:"100%","&":{overflowY:"auto",height:"100%"}}},e[10]=m):m=e[10];let y;e[11]===Symbol.for("react.memo_cache_sentinel")?(y={title:f,header:h,content:m,body:{padding:"0 0 16px 0","@media (max-width: 768px)":{paddingTop:"20px!important",height:"calc(100% - 60px)","&. mantine-Modal-inner":{padding:"0"}}}},e[11]=y):y=e[11];let v;return e[12]!==l||e[13]!==r||e[14]!==n||e[15]!==c||e[16]!==u?(v=d.jsx(nr,{opened:n,onClose:r,size:"580px",title:c,withCloseButton:!1,centered:!1,fullScreen:l,children:u,styles:y}),e[12]=l,e[13]=r,e[14]=n,e[15]=c,e[16]=u,e[17]=v):v=e[17],v},yst=80,dC=({position:t,checkedMessagesIds:e,checkedMessages:n,updateSelectedMessages:r,onCheckedListClear:s,mode:o,folderId:i,elementsLength:a=0,resetWatcher:l,isFullToolbar:c,isSingleMessageToolbar:u,isInJunkFolder:f,isInInboxFolder:h,message:m})=>{var un,Mn,nn;const y=zt(),v=oC(),b=re(B2),w=sr(),{pathname:C}=wn(),k=re(Fm),E=re($o),j=re(mr),A=re(zr),M=re(zm),_=re(Dn),{isOpened:D}=re(Td),R=re(Ed),N=w.emailId?+w.emailId:(un=A==null?void 0:A.find(Ge=>Ge.Id===(E==null?void 0:E.FolderId)))==null?void 0:un.UserEmailId,z=re(sp),B=re(VTe),{t:L}=Le(),P=Mr(),I=ts(),H=xt(1024),$=xt(575),{foldersMaps:V,getFolderByUserEmail:q}=_rt(),U=yp(),[W,Y]=S.useState(!1),[G,K]=S.useState(!1),[Q,Z]=S.useState(!1),[J,ne]=S.useState(!1),[se,ce]=S.useState(!1),[fe,le]=S.useState(!1),[be,je]=S.useState(""),[pe,_e]=S.useState(!1),[Ce,Te]=S.useState(null),Ae=S.memo(({children:Ge,onClick:Rt,className:Zt})=>d.jsx(En,{onClick:Rt,className:Zt,children:d.jsx(ie,{children:Ge})})),Ze=Ge=>{Te(Ge.touches[0].clientY)},He=Ge=>{if(Ce==null)return;Ge.touches[0].clientY-Ce>yst&&(le(!1),Te(null))},lt=()=>Te(null),Ye=S.useMemo(()=>n&&Array.isArray(n)&&n.length?n.reduce((Ge,Rt)=>(Ge[Rt.Id]=Rt,Ge),{}):m&&k[m.Id]==null?{...k,[m.Id]:m}:k,[n,k,m]),ge=S.useMemo(()=>M&&!e.length?[M]:e,[M,e]),Fe=Jrt({ids:ge,selectedMessages:Ye,onMoved:()=>{s(),l()},emailId:N,mobileMessageOpened:b}),Se=cC(ge,Ye),qe=S.useMemo(()=>u||!e.length?!(E!=null&&E.WasRead):e.some(Ge=>{var Rt;return!((Rt=Ye[Ge])!=null&&Rt.WasRead)}),[u,Ye,e,E==null?void 0:E.WasRead]),ot=S.useMemo(()=>u||!e.length?!(E!=null&&E.Important):e.some(Ge=>{var Rt;return!((Rt=Ye[Ge])!=null&&Rt.Important)}),[u,Ye,e,E==null?void 0:E.Important]),$e=(Mn=A.find(Ge=>Ge.Id===(m==null?void 0:m.FolderId)))==null?void 0:Mn.Type,pt=(nn=A.find(Ge=>Ge.Id===i))==null?void 0:nn.Type,gt=h||(I==null?void 0:I.Type)===Je.INBOX||$e===Je.INBOX,Pt=(I==null?void 0:I.Type)===Je.SNOOZED||$e===Je.SNOOZED||pt===Je.SNOOZED,at=()=>We||Pt?!1:Grt(C,_.length,R,ge.length),nt=!!f||(I==null?void 0:I.Type)!=null&&I.Type===Je.SPAM||i!=null&&B!=null&&B.includes(i),We=I2(I,z,i||(m==null?void 0:m.FolderId)),At=(I==null?void 0:I.Type)===Je.ARCHIVE,St=S.useMemo(()=>A.find(Ge=>Ge.Type===128&&Ge.UserEmailId===Number(N)),[A,N]),Ot=(I==null?void 0:I.Type)===Je.TRASH||nt||i!=null&&(St==null?void 0:St.Id)!=null&&i===St.Id,Tt=S.useMemo(()=>ge.length?ge.some(Ge=>{const Rt=Ye[Ge];if(!Rt)return!1;const Zt=A.find($t=>$t.Id===Rt.FolderId);return(Zt==null?void 0:Zt.Type)!==Je.ARCHIVE}):!1,[ge,Ye,A]),{hasJunkMessages:kt,canToggleSpam:jt}=S.useMemo(()=>{const Ge={hasJunkMessages:!1,canToggleSpam:!1};if(!ge.length)return Ge;for(const Rt of ge){const Zt=Ye[Rt];if(!Zt)continue;const $t=A.find(rn=>rn.Id===Zt.FolderId),en=$t==null?void 0:$t.Type;en===Je.SPAM?(Ge.hasJunkMessages=!0,Ge.canToggleSpam=!0):en===Je.INBOX&&(Ge.canToggleSpam=!0)}return Ge},[ge,Ye,A]),vt=async()=>{Z(!0);let Ge=0,Rt=0;try{Se.forEach(({Ids:en,UserEmailId:rn})=>{q(Je.TRASH,rn)&&en.forEach(dn=>y(Vu({Id:dn,deleted:!0})))});const Zt=Se.map(({FolderId:en,Ids:rn,UserEmailId:In})=>{const dn=q(Je.TRASH,In);if(!dn)return Promise.resolve();const jn=A.find(Cr=>Cr.Id===en);return(jn==null?void 0:jn.Type)===16||(jn==null?void 0:jn.Type)===128?(Ge+=rn.length,y(jg({folderId:en,Ids:rn})).unwrap()):(Rt+=rn.length,We&&rn.forEach(Cr=>{y(tS({id:Cr})),Zu(String(Cr))}),y(Aa({fromId:en,Ids:rn,toId:dn.Id})).unwrap())});await Promise.all(Zt);const $t=e.filter(en=>{var rn;return!((rn=Ye[en])!=null&&rn.WasRead)}).length;y(fc($t)),l()}catch{Z(!1),P.error(L("notifications.messages.unknownError"))}finally{await U(Ge||Rt),Z(!1);const Zt=await y(Vc()).unwrap(),$t=We&&!Zt.find(en=>en.Id===(I==null?void 0:I.Id));(u||b||$t)&&v(),y(jo()),y(Ns(null)),y(ja()),Ge&&P.success(L("notifications.messages.messageDeleted",{count:Ge})),Rt&&P.success(L("notifications.messages.sentToTrash",{count:Rt})),s()}},Yt=()=>{const Ge=new Set(Array.from(V.trash.values()).map(en=>en.Id));D&&y(Dr());const Rt=e.some(en=>{const rn=Ye[en];return rn&&Ge.has(rn.FolderId)}),Zt=E&&Ge.has(E.FolderId),$t=(I==null?void 0:I.Type)===Je.TRASH||nt||Rt||u&&Zt;Bh(L,{action:$t?"deleteForever":"moveToTrash",overrides:{confirmProps:{disabled:Q},onConfirm:()=>{vt(),H&&le(!1)}}})},Vt=async()=>{Y(!0),D&&y(Dr());const Ge=nt||kt,Rt=Ge?Je.SPAM:Je.INBOX,Zt=Ge?Je.INBOX:Je.SPAM;try{const $t=Se.map(({FolderId:rn,Ids:In,UserEmailId:dn})=>{const jn=q(Rt,dn),ds=q(Zt,dn);return!jn||!ds||rn!==jn.Id?Promise.resolve():(In.forEach(Cr=>y(Vu({Id:Cr,FolderId:ds.Id}))),y(Aa({fromId:rn,Ids:In,toId:ds.Id})).unwrap())});await Promise.all($t),P.success(`${L(Ge?"notifications.messages.sentToInbox":"notifications.messages.sentToSpam")}`),(u||b)&&v(),y(jo()),y(Ns(null)),s(),await U(e.length);const en=e.filter(rn=>{var In;return!((In=Ye[rn])!=null&&In.WasRead)}).length;y(fc(en)),en&&l()}finally{Y(!1)}},Nt=async()=>{const Ge=e.filter(Zt=>{var $t;return!(($t=Ye[Zt])!=null&&$t.WasRead)}).length;for(const{Ids:Zt}of Se)for(const $t of Zt)y(Vu({Id:$t,WasRead:qe}));const Rt=Se.map(({FolderId:Zt,Ids:$t})=>y(P2({folderId:Zt,Ids:$t,WasRead:qe})).unwrap());r==null||r("WasRead",qe),y(qe?fc(Ge):sS({count:e.length})),l(),D&&y(Dr()),await Promise.all([K(!0),...Rt]).finally(()=>K(!1))},Ht=async()=>{D&&y(Dr());try{const Ge=Se.map(({FolderId:Zt,Ids:$t,UserEmailId:en})=>{const rn=q(Je.ARCHIVE,en);return rn?y(Aa({fromId:Zt,Ids:$t,toId:rn.Id})).unwrap():Promise.resolve()});await Promise.all(Ge),await U(e.length),s();const Rt=e.filter(Zt=>{var $t;return!(($t=Ye[Zt])!=null&&$t.WasRead)}).length;y(fc(Rt)),P.success(`${L("notifications.messages.sentToArchive")}`),(u||b)&&v(),M&&ge.includes(M)&&(y(jo()),y(Ns(null))),l()}catch{P.error(L("notifications.messages.unknownError"))}},cn=async()=>{var $t,en;if(!(Se!=null&&Se.length))return;D&&y(Dr());for(const{Ids:rn}of Se)for(const In of rn)y(Vu({Id:In,Important:ot})),y(rS({Id:In,Important:ot}));r==null||r("Important",ot);const Ge=Se.map(({FolderId:rn,Ids:In})=>y(KJ({ids:In,isFavorite:ot,folderId:rn})).unwrap()),Rt=10;for(let rn=0;rn<Ge.length;rn+=Rt)await Promise.allSettled(Ge.slice(rn,rn+Rt));const Zt={...j};(Zt.folderId==="-1"||(en=($t=Zt==null?void 0:Zt.SearchContext)==null?void 0:$t.Labels)!=null&&en.length)&&delete Zt.folderId,await y(ur({...Zt})).unwrap(),M&&ge.includes(M)&&(y(Ns(null)),H&&y(jo()))},qt=async Ge=>{le(!1),je(""),D&&y(Dr());let Rt=[];(fe&&H||!H&&J)&&ne(!1),u&&E||E&&!e.length?Rt=[E]:Rt=e.map(rn=>Ye[rn]);const $t=Rt.some(rn=>{var In;return!((In=rn.Labels)!=null&&In.find(dn=>dn===Ge.Id))}),en=Se.map(({FolderId:rn,Ids:In})=>y(om({folderId:rn,ids:In,labelIds:[Ge.Id],enabled:$t})).unwrap());await Promise.all(en),r==null||r("Labels",rn=>{const In=rn??[];return $t?[...new Set([...In,Ge.Id])]:In.filter(dn=>dn!==Ge.Id)})},Kt=Ge=>{Ge.stopPropagation(),H?(ce(!0),!$&&le(!1)):ne(Rt=>!Rt)},yn=Ge=>{pe||ne(Ge)},ee=Ge=>{J||le(Ge)},ae=()=>le(Ge=>!Ge),de=()=>{Nt(),H&&le(!1)};let Ee;const De=py(C)==="labels",Qe=!At&&Tt&&!We&&!De;We?Ee=[{content:d.jsx(Eo,{stroke:1.5}),contextContent:d.jsx(Eo,{width:20,height:20,stroke:1.5,color:"#fa5252"}),drawerContent:d.jsx(Ae,{onClick:Yt,className:gs.row_target_clear,children:d.jsxs(ve,{gap:11,children:[d.jsx(Eo,{stroke:1.5,size:20,color:"#D66F6F"}),d.jsx("span",{children:L("delete")})]})}),label:`${L(Ot?"delete":"settings.moveToTrash")}`,isDeleteAction:!0,onClick:Yt}]:Ee=[{content:d.jsx(Eo,{stroke:1.5}),contextContent:d.jsx(Eo,{width:20,height:20,stroke:1.5,color:"#fa5252"}),drawerContent:d.jsx(Ae,{onClick:Yt,className:gs.row_target_clear,children:d.jsxs(ve,{gap:11,children:[d.jsx(Eo,{stroke:1.5,size:20,color:"#fa5252"}),d.jsx("span",{children:L("delete")})]})}),label:`${L(Ot?"delete":"settings.moveToTrash")}`,isDeleteAction:!0,onClick:Yt},{content:()=>d.jsxs(Dt,{zIndex:200,withArrow:!0,radius:8,clickOutsideEvents:["mousedown","touchstart"],opened:J,onChange:yn,styles:{dropdown:{border:"none",padding:"5px 0",boxShadow:"0 12px 24px rgba(16, 24, 40, 0.12), 0 2px 8px rgba(16, 24, 40, 0.06)"}},children:[d.jsx(Dt.Target,{children:H&&(c||u)?d.jsxs(xe,{w:"100%",onClick:Kt,children:[d.jsx(ie,{component:Zv,stroke:1.5,mr:10,sx:{transform:"rotate(135deg)"}}),d.jsx(ue,{children:L("labels")})]}):d.jsx(Ve,{component:"div",size:"lg",onClick:Kt,children:d.jsx(ie,{component:Zv,stroke:1.5,sx:{transform:"rotate(135deg)"}})})}),d.jsx(Dt.Dropdown,{miw:200,sx:{maxHeight:"300px",overflow:"hidden"},onClick:Ge=>{Ge.stopPropagation()},children:d.jsx(qM,{stackProps:{className:H?"":Gf.customScrollbar,px:10,py:5,sx:{maxHeight:"300px",overflow:"auto"}},onItemClick:qt,blockClosing:_e,isToolbar:!0})})]}),contextContent:()=>d.jsxs(Ta,{openDelay:100,closeDelay:160,position:"right-start",offset:{mainAxis:25,crossAxis:-150},withinPortal:!0,zIndex:200,shadow:"xl",radius:8,children:[d.jsx(Ta.Target,{children:d.jsxs("div",{style:{padding:0,width:"100%",display:"flex",justifyContent:"space-between",alignItems:"center",gap:10},children:[d.jsxs("span",{style:{padding:0,display:"flex",gap:10},children:[d.jsx(Zv,{width:20,height:20,stroke:1.5,color:"#31394a"}),d.jsx(ue,{children:L("labels")})]}),d.jsx(Yi,{width:15,height:15,stroke:1.5,color:"#31394a"})]})}),d.jsx(Ta.Dropdown,{"data-menu-immune":"true",style:{maxHeight:300,overflow:"hidden",boxShadow:"0 12px 24px rgba(16,24,40,.12), 0 2px 8px rgba(16,24,40,.06)",padding:"0",border:"none"},children:d.jsx(qM,{stackProps:{className:H?"":Gf.customScrollbar,sx:{maxHeight:"300px",overflow:"auto",padding:"0 10px"}},onItemClick:qt,blockClosing:_e,isToolbar:!0})})]}),drawerContent:()=>d.jsx(Ae,{onClick:()=>ce(!0),className:gs.row_target,children:d.jsxs(ve,{gap:11,children:[d.jsx(ie,{component:Zv,stroke:1.5,w:20,h:20,sx:{transform:"rotate(135deg)"}}),d.jsx("span",{children:L("labels")})]})}),label:H&&(c||u)||o==="context"?"":`${L("labels")}`,onClick:Kt},{content:qe?d.jsx(nx,{stroke:1.5}):d.jsx(kf,{stroke:1.5}),contextContent:qe?d.jsx(nx,{width:20,height:20,stroke:1.5,color:"#31394a"}):d.jsx(kf,{width:20,height:20,stroke:1.5,color:"#31394a"}),drawerContent:()=>d.jsx(Ae,{onClick:de,className:gs.row_target,children:d.jsxs(ve,{gap:11,children:[qe?d.jsx(nx,{size:20,stroke:1.5}):d.jsx(kf,{size:20,stroke:1.5}),d.jsx("span",{children:L(qe?"markAsRead":"markAsUnread")})]})}),label:`${L(qe?"markAsRead":"markAsUnread")}`,onClick:de,disabled:G}],at()&&Ee.push({content:d.jsx(tx,{stroke:1.5}),contextContent:d.jsx(tx,{width:20,height:20,stroke:1.5,color:"#31394a"}),drawerContent:d.jsx(Ae,{onClick:Fe,className:gs.row_target,children:d.jsxs(ve,{gap:11,children:[d.jsx(tx,{size:20,stroke:1.5}),d.jsx("span",{children:L("move")})]})}),label:`${L("move")}`,onClick:()=>{D&&y(Dr()),Fe()}}),gt&&Ee.push({content:d.jsx(xc,{stroke:1.5}),contextContent:d.jsx(xc,{size:20,width:20,height:20,stroke:1.5,color:"#31394a"}),drawerContent:d.jsx(Ae,{onClick:()=>{y(UP({messageIds:ge})),H&&le(!1)},className:gs.row_target,children:d.jsxs(ve,{gap:11,children:[d.jsx(xc,{size:20,stroke:1.5}),d.jsx("span",{children:L("snooze.action")})]})}),label:L("snooze.action"),onClick:()=>{D&&y(Dr()),y(UP({messageIds:ge}))}}),!b&&!We&&Ee.push({content:H?d.jsx(Ku,{size:20,stroke:1.5}):null,contextContent:d.jsx(Ku,{size:20,width:20,height:20,stroke:1.5,color:"#31394a",style:{stroke:ot?"":"var(--mantine-color-red-6)",fill:ot?"":"var(--mantine-color-red-6)"}}),drawerContent:d.jsx(Ae,{onClick:()=>{cn(),le(!1)},className:gs.row_target,children:d.jsxs(ve,{gap:11,children:[d.jsx(Ku,{size:20,stroke:1.5}),d.jsx("span",{children:L(ot?"markAsImportant":"markAsUnImportant")})]})}),label:L(ot?"markAsImportant":"markAsUnImportant"),onClick:()=>cn()});const mt=gt||nt||jt,rt=nt||kt;mt&&Ee.push({content:rt?d.jsx(gk,{stroke:1.5}):d.jsx(bc,{stroke:1.5}),contextContent:rt?d.jsx(gk,{size:20,width:20,height:20,stroke:1.5}):d.jsx(bc,{size:20,width:20,height:20,stroke:1.5}),drawerContent:()=>d.jsx(Ae,{onClick:()=>Bh(L,{action:rt?"restoreFromSpam":"moveToSpam",overrides:{confirmProps:{disabled:W},onConfirm:()=>Vt()}}),className:gs.row_target,children:d.jsxs(ve,{gap:11,children:[rt?d.jsx(gk,{stroke:1.5,size:20}):d.jsx(bc,{stroke:1.5,size:20}),d.jsx("span",{children:rt?`${L("notSpam")}`:`${L("markAsSpam")}`})]})}),label:rt?`${L("notSpam")}`:`${L("markAsSpam")}`,onClick:()=>Bh(L,{action:rt?"restoreFromSpam":"moveToSpam",overrides:{confirmProps:{disabled:W},onConfirm:()=>Vt()}}),disabled:W}),Qe&&Ee.push({content:H?d.jsx(Cf,{stroke:1.5}):null,contextContent:d.jsx(Cf,{size:20,width:20,height:20,stroke:1.5,color:"#31394a"}),drawerContent:d.jsx(Ae,{onClick:()=>{Ht(),le(!1)},className:gs.row_target,children:d.jsxs(ve,{gap:11,children:[d.jsx(Cf,{size:20,stroke:1.5}),d.jsx("span",{children:L("moveToArchive")})]})}),label:`${L("moveToArchive")}`,onClick:()=>Ht()});const st=H?a:Ee.length,Mt=Ee.slice(0,st),Ut=Ee.slice(st),Lt=Ut.filter(Ge=>!Ge.isDeleteAction),Xt=Ut.find(Ge=>Ge.isDeleteAction),mn=Mt.filter(Ge=>!Ge.isDeleteAction),ht=Mt.find(Ge=>Ge.isDeleteAction),oe=Ge=>typeof Ge=="function"?Ge():Ge,Ne=()=>d.jsxs(ie,{mb:10,children:[Lt.map((Ge,Rt)=>d.jsx(It.Fragment,{children:oe(Ge.drawerContent)},Rt)),Xt&&d.jsxs(d.Fragment,{children:[d.jsx(Da,{my:"md",color:"#DEE2E6"}),oe(Xt.drawerContent)]})]}),ut=()=>d.jsxs(d.Fragment,{children:[mn.map((Ge,Rt)=>d.jsx(It.Fragment,{children:d.jsxs(Ve,{w:"100%",size:"100%",variant:"subtle",radius:8,className:"icon-hit-area",sx:{zIndex:1},component:"div",color:"#31394a",styles:lf,onClick:Ge.disabled?()=>{}:Ge.onClick,disabled:Ge.disabled,children:[oe(Ge.contextContent),d.jsx(ue,{children:Ge.label})]})},`context-${Rt}`)),ht&&d.jsxs(d.Fragment,{children:[!We&&d.jsx(Da,{my:"5px",ml:"-6px",mr:"-6px",color:"#e9ebee"}),d.jsxs(Ve,{w:"100%",size:"100%",variant:"subtle",radius:8,className:"icon-hit-area",sx:{zIndex:1},component:"div",color:"#fa5252",styles:{root:{backgroundColor:"transparent","&:hover":{backgroundColor:"#fa52521f"},span:{alignItems:"flex-start",justifyContent:"flex-start",gap:"10px",padding:"5px 10px"}}},onClick:ht.disabled?()=>{}:ht.onClick,disabled:ht.disabled,children:[oe(ht.contextContent),d.jsx(ue,{children:ht.label})]})]})]});return d.jsxs(ve,{gap:8,display:E||e.length?"":"none",sx:{width:o==="context"?"100%":"auto"},children:[o!=="context"&&Mt.map((Ge,Rt)=>Ge.content===null?null:d.jsx(on,{position:"bottom",label:Ge.label,opened:be===Ge.label,onMouseEnter:Zt=>{const $t=Zt.target;!H&&$t.closest(".icon-hit-area")&&je(Ge.label)},onMouseLeave:()=>!H&&je(!1),styles:{tooltip:{pointerEvents:"none"}},children:d.jsx(Ve,{className:"icon-hit-area",sx:{zIndex:1},component:"div",size:"lg",onClick:Ge.disabled?()=>{}:Ge.onClick,disabled:Ge.disabled,children:oe(Ge.content)})},Rt)),o==="context"&&!!Mt.length&&d.jsx(xe,{direction:"column",w:"100%",children:ut()}),d.jsxs(d.Fragment,{children:[$&&Ut.length?d.jsx(Ve,{component:"div",size:"lg",onClick:ae,children:d.jsx(Rc,{stroke:1.5})}):null,H&&!$&&Ut.length?d.jsxs(et,{opened:fe&&!se,position:t?"bottom-end":"bottom",zIndex:200,onChange:ee,children:[d.jsx(et.Target,{children:d.jsx(Ve,{component:"div",size:"lg",onClick:ae,children:d.jsx(Rc,{stroke:1.5})})}),d.jsx(et.Dropdown,{children:d.jsx(ie,{children:Ut.map((Ge,Rt)=>{const Zt=$t=>{$t.stopPropagation(),Ge.onClick&&Ge.onClick($t)};return d.jsx(et.Item,{color:"#343A40",px:10,py:5,fz:14,w:"100%",leftSection:oe(Ge.content),onClick:Zt,styles:{itemSection:{display:"flex",alignItems:"center",svg:{width:"18px",height:"18px"}}},children:Ge.label},Rt)})})})]}):null,$?d.jsx(Xr,{zIndex:H&&st?200:199,opened:fe,onClose:ae,position:"bottom",withCloseButton:!1,size:"auto",transitionProps:{duration:200,timingFunction:"ease-out",transition:"slide-up"},overlayProps:{backgroundOpacity:.5,blur:4},styles:{content:{borderTopLeftRadius:16,borderTopRightRadius:16,borderBottomLeftRadius:0,borderBottomRightRadius:0,padding:"0",height:"auto",maxHeight:"60dvh",overflow:"hidden",display:"flex",flexDirection:"column"},body:{padding:"45px 0 0",overflow:"auto"}},children:d.jsxs(d.Fragment,{children:[d.jsx("div",{onTouchStart:Ze,onTouchMove:He,onTouchEnd:lt,style:{width:"100%",height:"40px",display:"flex",alignItems:"center",justifyContent:"center",position:"absolute",top:0,zIndex:1,backgroundColor:"#fff"},children:d.jsx("span",{style:{width:"52px",height:"4px",borderRadius:"4px",backgroundColor:"#dee2e6"}})}),Ne()]})}):null,d.jsx(gst,{opened:se,onClose:()=>ce(!1),ids:ge,selectedMessages:n,onConfirm:()=>{ce(!1),s(),l()},isSingleMessageToolbar:u})]})]})},eae=t=>{const e=me.c(20),{singleMessage:n,onClose:r,checkedMessagesIds:s,singleMessageLoading:o,clearSelection:i,resetCounterWatcher:a,modalOpened:l,read:c,children:u}=t,f=!!n&&!o,h=s.length>0;let m;e[0]===Symbol.for("react.memo_cache_sentinel")?(m={boxShadow:"0px 0px 10px rgba(0, 0, 0, 0.1)",height:"56px"},e[0]=m):m=e[0];let y;e[1]===Symbol.for("react.memo_cache_sentinel")?(y={header:m,content:{height:"100%","&":{overflowY:"auto",height:"100%"}},body:{padding:"0",height:"calc(100% - 54px)"}},e[1]=y):y=e[1];let v;e[2]!==s||e[3]!==i||e[4]!==h||e[5]!==r||e[6]!==c||e[7]!==f||e[8]!==a||e[9]!==n?(v=!c&&(f||h)&&d.jsxs(nr.Header,{children:[d.jsx(nr.Title,{children:d.jsx(xe,{gap:"xs",align:"center",sx:{justifyContent:"space-between"},children:d.jsx(yt,{variant:"transparent",sx:{padding:"0",width:"20px",gap:"0",outline:"none","&:focus":{outline:"none!important"},span:{justifyContent:"center",paddingRight:"3px"}},size:"lg",styles:{inner:{justifyContent:"flex-start"}},onClick:r,children:d.jsx(Ve,{component:"div",size:"lg",children:d.jsx(yo,{stroke:1,size:"40px"})})})})}),d.jsx(dC,{elementsLength:3,position:!0,checkedMessagesIds:s,onCheckedListClear:i,resetWatcher:a,isFullToolbar:!1,message:n,folderId:n==null?void 0:n.FolderId})]}),e[2]=s,e[3]=i,e[4]=h,e[5]=r,e[6]=c,e[7]=f,e[8]=a,e[9]=n,e[10]=v):v=e[10];let b;e[11]!==u?(b=d.jsx(nr.Body,{children:u}),e[11]=u,e[12]=b):b=e[12];let w;e[13]!==v||e[14]!==b?(w=d.jsxs(nr.Content,{children:[v,b]}),e[13]=v,e[14]=b,e[15]=w):w=e[15];let C;return e[16]!==l||e[17]!==r||e[18]!==w?(C=d.jsx(nr,{fullScreen:!0,withCloseButton:!1,opened:l,onClose:r,styles:y,children:w}),e[16]=l,e[17]=r,e[18]=w,e[19]=C):C=e[19],C},vst=It.memo(()=>{const t=zt(),e=Er(),{t:n}=Le(),r=re(mr),s=re(qc),o=re($o),i=re(sp),a=re(Y_),[l,c]=S.useState(),[u,f]=S.useState(!1),h=u||a,m=S.useMemo(()=>i.includes(Number(o==null?void 0:o.FolderId))||i.includes(Number(r.folderId)),[i,o==null?void 0:o.FolderId,r.folderId]),y=S.useMemo(()=>{if(!m)return s.Items;const C=s.Items.filter(E=>!E.SendTime),k=s.Items.filter(E=>!!E.SendTime);return[...C,...k]},[m,s]),v=S.useCallback(async C=>{try{c(C);let k;const E=Math.floor(C/r.size)+1;if(C>=r.size+r.offset){f(!0);const j=await t(ur({...r,offset:Math.abs((r.offset/r.size+1)*r.size)})).unwrap();if(t(Dc(E)),m){const A=j.Items.filter(D=>!D.SendTime),M=j.Items.filter(D=>!!D.SendTime);k=[...A,...M][0].Id}else k=j.Items[0].Id}else if(C<r.offset){f(!0);const j=await t(ur({...r,offset:Math.abs((r.offset/r.size-1)*r.size)})).unwrap();if(t(Dc(E)),m){const A=j.Items.filter(D=>!D.SendTime),M=j.Items.filter(D=>!!D.SendTime),_=[...A,...M];k=_[_.length-1].Id}else k=j.Items[j.Items.length-1].Id}else k=y[C-r.offset].Id;e(`/message/${k}`)}catch(k){console.error(k)}finally{setTimeout(()=>{f(!1)},50)}},[r,s,m,y,u]),b=YG({total:s.Count,page:r.offset+(y.findIndex(C=>C.Id===(o==null?void 0:o.Id))||0)}),w=S.useMemo(()=>{const k=y.findIndex(A=>A.Id===(o==null?void 0:o.Id))<y.length-1,j=r.offset+r.size<s.Count;return!(k||j)||s.Count===0},[y,o==null?void 0:o.Id,r,s.Count]);return S.useEffect(()=>{if(l===void 0&&o){const C=y.findIndex(k=>k.Id===(o==null?void 0:o.Id));C>-1&&c(r.offset+C)}},[y,r.offset,l,o]),S.useEffect(()=>{if(l&&o){const C=y.findIndex(k=>k.Id===(o==null?void 0:o.Id));C>-1?c(r.offset+C):c(void 0)}},[o==null?void 0:o.FolderId]),d.jsxs(ve,{gap:"sm",children:[s.Count&&l!==void 0&&d.jsxs(ve,{gap:6,children:[d.jsx(ue,{c:"gray",children:l+1}),d.jsx(ue,{c:"gray",children:n("paginationFrom")}),d.jsx(ue,{c:"gray",children:s.Count})]}),d.jsx(Ve,{disabled:!l||s.Count===0||h,size:"sm",onClick:()=>{v(b.active-1)},children:d.jsx(yo,{})}),d.jsx(Ve,{disabled:w||l===void 0||h,size:"sm",onClick:()=>{v(b.active+1)},children:d.jsx(Yi,{})})]})}),WM=t=>{const e=me.c(12),n=zt(),r=wn(),s=re(iS);let o;e[0]!==n?(o=()=>n(yTe()),e[0]=n,e[1]=o):o=e[1];const a=UG(o,3e4);let l;e[2]!==n||e[3]!==t||e[4]!==a||e[5]!==s||e[6]!==r?(l=()=>{if(s||["/","/inbox"].includes(r.pathname)){a.stop();return}if(t)return n(Vc()),a.start(),a.stop},e[2]=n,e[3]=t,e[4]=a,e[5]=s,e[6]=r,e[7]=l):l=e[7];let c;return e[8]!==n||e[9]!==t||e[10]!==s?(c=[t,s,n],e[8]=n,e[9]=t,e[10]=s,e[11]=c):c=e[11],S.useEffect(l,c),a},bst=({desktopOpened:t})=>{var z,B,L,P;const{id:e}=sr(),n=zt(),r=Er(),s=re($o),o=re(Y_),i=re(mr),a=re(aee),l=re(qc),c=re(zr),u=re(B2),f=(z=c==null?void 0:c.find(I=>I.Id===(s==null?void 0:s.FolderId)))==null?void 0:z.UserEmailId,h=re(See),m=re(Cee),{read:y}=Ol(f),v=xt(1024),{t:b}=Le(),[w,C]=S.useState(!l.Items.length),[k,E]=S.useState(),j=S.useRef(null),A=S.useRef(null),M=S.useMemo(()=>s??j.current,[s]),_=c.find(I=>I.Id===(M==null?void 0:M.FolderId)),D=WM((_==null?void 0:_.Id)??null);WM((_==null?void 0:_.Id)??null),S.useEffect(()=>{n(Xu())},[n]),S.useEffect(()=>{if(v)return n(see()),()=>{n(E3())}},[v,n]),S.useEffect(()=>{(_==null?void 0:_.Type)===Je.SNOOZED&&_.UserEmailId&&n(Ag({userEmailId:_.UserEmailId}))},[_,n]),S.useEffect(()=>{s&&(j.current=s)},[s]),S.useEffect(()=>{if(e){const I=+e;A.current!==I&&(A.current=I,n(xl({id:I})),n(Ns(I)))}},[n,e]),S.useEffect(()=>{s&&!s.WasRead&&k!==s.Id&&(n(nS({...i,folderId:s.FolderId})),y||(n(fc(1)),n(P2({folderId:s.FolderId,Ids:[s.Id],WasRead:!0})))),s&&E(s.Id)},[n,k,i,s,y]);const R=()=>{D.stop(),D.start()},N=oC();return S.useEffect(()=>{!o&&["fulfilled","rejected"].includes(a)&&C(!1)},[w,o,a,v]),w||w===void 0?d.jsx(PR,{}):(!e||!M)&&!o?d.jsx(jl,{hasHeader:!0,children:d.jsx(Oc,{heading:b("warningBoundaryText.heading"),description:b("warningBoundaryText.description3"),handleButtonClick:()=>r("/inbox"),buttonText:b("warningBoundaryText.button3"),img:md,propDescWidth:400})}):d.jsxs(d.Fragment,{children:[h&&d.jsx(wm.Modal,{opened:h,onClose:()=>n(wee()),mode:"snooze",messageIds:m}),d.jsx("div",{style:{height:`calc(${v?"100dvh":"100vh"} - ${v?"100px":"64px"} )`},children:v?d.jsx(eae,{modalOpened:u,singleMessage:M,singleMessageLoading:o,checkedMessagesIds:e?[+e]:[],clearSelection:()=>!1,onClose:()=>r((_==null?void 0:_.path)??"/inbox"),read:y,resetCounterWatcher:R,children:d.jsx(Zg,{checkedMessagesIds:[],message:M,loading:o})}):d.jsxs(d.Fragment,{children:[d.jsxs(xe,{justify:"space-between",sx:{paddingRight:"16px",paddingLeft:"6px",height:48},children:[d.jsxs(xe,{gap:8,children:[d.jsx(on,{position:"bottom",label:b("back"),children:d.jsx(Ve,{component:"div",size:"lg",onClick:N,sx:{alignSelf:"center"},children:d.jsx(UQ,{stroke:1})})}),!y&&s&&d.jsx(dC,{position:!0,checkedMessagesIds:e?[+e]:[],onCheckedListClear:()=>!1,resetWatcher:R,isInOutboxFolder:((B=c.find(I=>I.Id===(s==null?void 0:s.FolderId)))==null?void 0:B.Type)===2,isInJunkFolder:((L=c.find(I=>I.Id===(s==null?void 0:s.FolderId)))==null?void 0:L.Type)===16,isInInboxFolder:((P=c.find(I=>I.Id===(s==null?void 0:s.FolderId)))==null?void 0:P.Type)===1,isSingleMessageToolbar:!0,isFullToolbar:!1,message:s})]}),d.jsx(vst,{})]}),d.jsx(ve,{wrap:"nowrap",gap:0,h:"calc(100% - 42px)",pos:"relative",sx:{paddingLeft:v||t?"0px":"4px"},children:d.jsx(ie,{h:"100%",miw:300,sx:{flexGrow:1},children:d.jsx(Zg,{checkedMessagesIds:[],message:M,loading:o})})})]})})]})},xst=()=>{const t=me.c(2),e=re(Q_);let n;return t[0]!==e?(n=d.jsx(Nd,{children:d.jsx(bst,{desktopOpened:e})}),t[0]=e,t[1]=n):n=t[1],n},wst="/assets/mail-logo-_irlVV_F.svg";const Sst=()=>Ct.get("v2/auth/logout"),Cst="/assets/login-bg-Ca2G3Xs7.jpg",kst=()=>{var l,c;const[t,e]=S.useState(""),n=re(qa),r=re(Pm),s=(c=(l=n==null?void 0:n.ModuleUrls)==null?void 0:l.find(u=>u.Name==="Admin"))==null?void 0:c.Url;r.UserId<=0&&!window.location.search.includes("login=true")&&(window.location.href=s+"/login?returnUrl="+escape(window.location.href));const o=Ll({initialValues:{DeviceId:"",Login:"",Password:"",CustomerCode:void 0}}),i=()=>{switch(r.AuthType){case"esia":return"Войти через ЕСИА";case"gasu":return"Войти через ГАСУ";case"saml2":return"Войти через ССО";default:return null}},a=async u=>{var f;try{window.location.href="/"}catch(h){if(Ct.isAxiosError(h))switch((f=h.response)==null?void 0:f.status){case 401:o.values.CustomerCode?e("Неверное имя пользователя, пароль или код подразделения"):e("Неверное имя пользователя или пароль");break;case 403:e("Учетная запись заблокирована");break;case 429:e("Исчерпан лимит попыток");break;default:e("Неизвестная ошибка. Попробуйте повторить позже")}}};return d.jsx(Est,{children:d.jsx(bt,{align:"center",justify:"center",h:"100vh",children:d.jsx(xd,{w:500,p:"xl",style:{maxWidth:"calc(100% - 10px)"},children:d.jsx("form",{onSubmit:o.onSubmit(a),children:d.jsxs(bt,{gap:"xl",children:[d.jsx(ve,{align:"center",gap:0,children:d.jsx("img",{src:wst,alt:"R7-ОФИС ПОЧТА"})}),d.jsxs(bt,{gap:"lg",children:[d.jsxs(bt,{gap:"xs",children:[d.jsx(ue,{fz:20,fw:500,children:"Войти"}),d.jsxs(bt,{gap:"xs",children:[d.jsx(es,{size:"md",placeholder:"Логин",...o.getInputProps("Login")}),d.jsx(KA,{size:"md",placeholder:"Пароль",...o.getInputProps("Password")}),d.jsxs(ve,{justify:"space-between",children:[o.values.CustomerCode===void 0&&d.jsx(yt,{variant:"subtle",px:"xs",style:{alignSelf:"flex-start"},onClick:()=>o.setValues({CustomerCode:""}),children:"Дополнительно"}),o.values.CustomerCode!==void 0&&d.jsx(es,{size:"md",placeholder:"Код подразделения",...o.getInputProps("CustomerCode")}),d.jsx(yt,{component:"a",href:`${s}/password-reset`,variant:"subtle",children:"Забыли пароль?"})]})]}),!!t&&d.jsxs(ve,{gap:"xs",c:"red",children:[d.jsx(o6e,{stroke:1.5,size:20}),d.jsx(ue,{children:t})]})]}),d.jsxs(ve,{children:[d.jsx(yt,{type:"submit",children:"Войти"}),d.jsx(yt,{variant:"outline",onClick:()=>window.location.href="/api/v1/OAuth20/Code?type=mail",style:{fontWeight:500},children:i()})]})]})]})})})})})},Est=dm.div`
  background: url(${Cst}) no-repeat center / cover;
`,tae=(t,e)=>{const n=e?r=>e(r):r=>r;return t.length>1?[{value:"-1",label:n("allMails")},...t.map(r=>({value:Ec+r.Id.toString(),label:n("onlyMail")+` ${r==null?void 0:r.Email}`}))]:[{value:"-1",label:n("allMails")}]},nae=()=>{const t=me.c(30),{t:e}=Le(),n=zt(),{pathname:r}=wn(),s=xt(575),{clearSelection:o}=Fl(),[i,a]=S.useState(!1),l=re(Dn),c=re(mr),u=re(Ed),f=re(ip)==="pending";let h;t[0]!==r?(h=r.startsWith("/search"),t[0]=r,t[1]=h):h=t[1];const m=h;let y;t[2]!==r?(y=r.startsWith("/tags"),t[2]=r,t[3]=y):y=t[3];const v=y,b=l.length>1;let w;t[4]!==c?(w=(c==null?void 0:c.folderId)&&c.folderId!=="-1"&&!c.folderId.toString().includes(Ec),t[4]=c,t[5]=w):w=t[5];const k=!b||!m&&!v||w,E=tae(l,e),j=S.useRef(null),[A,M]=S.useState(!1);let _;t[6]!==A?(_=()=>{A&&M(!1)},t[6]=A,t[7]=_):_=t[7],Jm(j,_,"mouseup");const D=E.map(Tst);let R,N;t[8]!==n||t[9]!==k?(R=()=>{n(DCe(!k))},N=[k,n],t[8]=n,t[9]=k,t[10]=R,t[11]=N):(R=t[10],N=t[11]),S.useEffect(R,N);let z;t[12]===Symbol.for("react.memo_cache_sentinel")?(z=()=>{a(Mst)},t[12]=z):z=t[12];const B=z;let L;t[13]!==n||t[14]!==l||t[15]!==c?(L=()=>{if(!(c!=null&&c.UserEmailIds)||c.UserEmailIds.length===0){n(Kv("-1"));return}const G=l.map(jst),K=c.UserEmailIds.length===l.length&&c.UserEmailIds.every(Q=>G.includes(Q));n(Kv(K?"-1":Ec+c.UserEmailIds[0].toString()))},t[13]=n,t[14]=l,t[15]=c,t[16]=L):L=t[16];const P=c==null?void 0:c.UserEmailIds;let I;t[17]!==n||t[18]!==l||t[19]!==P?(I=[P,l,n],t[17]=n,t[18]=l,t[19]=P,t[20]=I):I=t[20],S.useEffect(L,I);let H;t[21]!==o||t[22]!==n||t[23]!==l||t[24]!==c?(H=async G=>{if(!G)return;n(Kv(G));const K=G==="-1"?l.map(Ast):[parseInt(G.replace(Ec,""),10)],Q={...c,UserEmailIds:K,offset:0};o(),n(Dc(1)),await n(ur(Q)).unwrap()},t[21]=o,t[22]=n,t[23]=l,t[24]=c,t[25]=H):H=t[25];const $=H;if(k)return null;let V;t[26]!==$?(V=G=>{$(G),B()},t[26]=$,t[27]=V):V=t[27];const q=V,U=_st,W=s?d.jsx(Km,{opened:i,onClose:B,trigger:d.jsx(Ve,{component:"div",size:"md",onClick:B,children:d.jsx(rm,{size:18,strokeWidth:1.5})}),children:d.jsx(xe,{gap:10,direction:"column",pb:20,pt:7,children:D.map(G=>{const K=G.value===u,Q=G.value==="-1",Z=U(G);return d.jsx(En,{onClick:()=>q(G.value),style:{width:"100%",padding:"6px 20px",outline:"none"},children:d.jsxs(ve,{justify:"space-between",wrap:"nowrap",children:[d.jsxs(xe,{w:"100%",gap:10,align:"center",children:[Q?d.jsx(rm,{size:20,stroke:1.5,color:"#626262"}):d.jsx(VQ,{size:20,stroke:1.5,color:"#626262"}),d.jsx(ue,{size:"14px",style:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",maxWidth:"85%",color:"#31394a"},children:Z})]}),K&&d.jsx(Ko,{size:16,stroke:1.5,color:"#626262"})]})},G.value)})})}):d.jsx(Ia,{ref:j,value:u,onChange:$,data:D,disabled:f,comboboxProps:{dropdownPadding:5},renderOption:Rst,size:"xs",w:s?"100%":200,dropdownOpened:A,onDropdownOpen:()=>M(!0),onDropdownClose:()=>M(!1),styles:{input:{fontSize:"14px",borderRadius:"15px",borderColor:"#D3DBE7",paddingRight:"34px",textOverflow:"ellipsis",color:"#31394A"},option:{fontSize:"14px",width:"100%",display:"flex",boxSizing:"border-box",overflow:"hidden",padding:"6px 5px",color:"#31394A",lineHeight:1.3},dropdown:{border:"none",boxShadow:"rgba(16, 24, 40, 0.12) 0px 12px 24px, rgba(16, 24, 40, 0.06) 0px 2px 8px",overflow:"hidden"}},allowDeselect:!1});let Y;return t[28]!==W?(Y=d.jsx(d.Fragment,{children:W}),t[28]=W,t[29]=Y):Y=t[29],Y};function Tst(t){return{value:t.value,label:t.value==="-1"?t.label:t.label.replace(/^Только:\s*/,"")}}function Mst(t){return!t}function jst(t){return t.Id}function Ast(t){return t.Id}function _st(t){return t.value==="-1"?t.label:t.label.replace(/^Только\s*/,"")}function Rst(t){const{option:e,checked:n}=t,r=e.label.replace(/^Только\s*/,""),s=e.value==="-1",o=d.jsxs(xe,{align:"center",gap:8,style:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",maxWidth:180,fontWeight:n?500:400},children:[d.jsx(Ve,{size:17,children:s?d.jsx(rm,{size:17,stroke:n?2.5:1.5,color:"#626262"}):d.jsx(VQ,{size:17,stroke:n?2.5:1.5,color:"#626262"})}),d.jsx("div",{style:{overflow:"hidden",textOverflow:"ellipsis"},children:r})]});return s?o:d.jsx(on,{label:r,position:"right",withArrow:!0,children:o})}const Dst=({disable:t})=>{const e=zt(),[n,r]=S.useState(!1),s=re(mr),o=re(qc),i=re(iS),a=re(qTe),l=ts(),c=xt(1024),u=re(aS),{t:f}=Le(),h=S.useCallback(async C=>{if(!n)try{r(!0),await e(ur({...s,offset:Math.abs((C-1)*s.size)})).unwrap(),e(Dc(C))}catch(k){console.error(k)}finally{r(!1)}},[n,s,e]),m=YG({total:o.Count,initialPage:u||1,page:u}),y=s.offset,v=y+s.size,b=y===0,w=v>=o.Count;return S.useEffect(()=>{l&&e(_Te())},[l,i,a]),d.jsxs(ve,{gap:"sm",children:[d.jsxs(ve,{gap:6,children:[d.jsx(ue,{c:"gray",children:o.Count===0?0:y+1}),d.jsx(ue,{c:"gray",children:"-"}),d.jsx(ue,{c:"gray",children:v>o.Count?o.Count:v}),!c&&d.jsxs(d.Fragment,{children:[d.jsx(ue,{c:"gray",children:f("paginationFrom")}),d.jsx(ue,{c:"gray",children:o.Count})]})]}),d.jsx(Ve,{disabled:b||n||t,size:"sm",onClick:()=>{m.previous(),h(m.active-1)},children:d.jsx(yo,{})}),d.jsx(Ve,{disabled:w||n||t,size:"sm",onClick:()=>{m.next(),h(m.active+1)},children:d.jsx(Yi,{})})]})},Ist="data:image/svg+xml,%3csvg%20width='18'%20height='18'%20viewBox='0%200%2018%2018'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M2.25%203H15.75M2.25%206H15.75M2.25%2012H15.75M2.25%2015H15.75M2.25%209H15.75'%20stroke='%23848E9C'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e",Ost="data:image/svg+xml,%3csvg%20width='18'%20height='18'%20viewBox='0%200%2018%2018'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M2.25%203H9M2.25%206H9M2.25%2012H9M2.25%2015H9M2.25%209H9M11.25%203.75261C11.25%203.55301%2011.329%203.36158%2011.4697%203.22043C11.6103%203.07929%2011.8011%203%2012%203H15C15.1989%203%2015.3897%203.07929%2015.5303%203.22043C15.671%203.36158%2015.75%203.55301%2015.75%203.75261V14.2474C15.75%2014.447%2015.671%2014.6384%2015.5303%2014.7796C15.3897%2014.9207%2015.1989%2015%2015%2015H12C11.8011%2015%2011.6103%2014.9207%2011.4697%2014.7796C11.329%2014.6384%2011.25%2014.447%2011.25%2014.2474V3.75261Z'%20stroke='%23343A40'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e",jY=t=>{const e=me.c(128),{fastFilter:n,filterInstalled:r,onItemClick:s,handleFilterClick:o,handleFilterReset:i,handleToggleOrder:a}=t,{t:l}=Le(),c=xt(1024);let u;e[0]!==s?(u=ot=>{const{children:$e,onClick:pt,className:gt}=ot;return d.jsx(En,{onClick:()=>{pt(),s==null||s()},className:gt,children:d.jsx(ve,{children:$e})})},e[0]=s,e[1]=u):u=e[1];const f=u;let h;e[2]!==n.WasRead||e[3]!==o?(h=()=>o("WasRead",!(n!=null&&n.WasRead)),e[2]=n.WasRead,e[3]=o,e[4]=h):h=e[4];const m=c?gs.row_target_check:"";let y;e[5]!==n.WasRead||e[6]!==c?(y=(n==null?void 0:n.WasRead)===!1?d.jsx(Ko,{size:c?16:14,stroke:1.5,color:"#626262"}):null,e[5]=n.WasRead,e[6]=c,e[7]=y):y=e[7];let v;e[8]!==m||e[9]!==y?(v=d.jsx(xe,{w:18,justify:"center",className:m,children:y}),e[8]=m,e[9]=y,e[10]=v):v=e[10];let b;e[11]===Symbol.for("react.memo_cache_sentinel")?(b={root:{display:"flex",alignItems:"center"}},e[11]=b):b=e[11];let w;e[12]===Symbol.for("react.memo_cache_sentinel")?(w=d.jsx(g2,{size:10,zIndex:1,offset:4,position:"bottom-end",color:"#74C0FC",styles:b,withBorder:!0,children:d.jsx(kf,{size:24,color:"#31394a",stroke:1.2})}),e[12]=w):w=e[12];let C;e[13]!==v?(C=d.jsxs(xe,{align:"center",justify:"center",children:[v,w]}),e[13]=v,e[14]=C):C=e[14];let k;e[15]!==l?(k=l("messageFilter.unread"),e[15]=l,e[16]=k):k=e[16];let E;e[17]!==k?(E=d.jsx("span",{children:k}),e[17]=k,e[18]=E):E=e[18];let j;e[19]!==E||e[20]!==C?(j=d.jsxs(ve,{gap:11,children:[C,E]}),e[19]=E,e[20]=C,e[21]=j):j=e[21];let A;e[22]!==f||e[23]!==j||e[24]!==h?(A=d.jsx(f,{onClick:h,className:gs.row_target,children:j}),e[22]=f,e[23]=j,e[24]=h,e[25]=A):A=e[25];let M;e[26]!==n.IsImportant||e[27]!==o?(M=()=>o("IsImportant",!(n!=null&&n.IsImportant)),e[26]=n.IsImportant,e[27]=o,e[28]=M):M=e[28];const _=c?gs.row_target_check:"";let D;e[29]!==n.IsImportant||e[30]!==c?(D=n!=null&&n.IsImportant?d.jsx(Ko,{size:c?16:14,stroke:1.5,color:"#626262"}):null,e[29]=n.IsImportant,e[30]=c,e[31]=D):D=e[31];let R;e[32]!==_||e[33]!==D?(R=d.jsx(xe,{w:18,justify:"center",className:_,children:D}),e[32]=_,e[33]=D,e[34]=R):R=e[34];let N;e[35]===Symbol.for("react.memo_cache_sentinel")?(N=d.jsx(Ku,{height:24,width:24,color:"#FA5252",fill:"#FA5252"}),e[35]=N):N=e[35];let z;e[36]!==R?(z=d.jsxs(xe,{align:"center",justify:"center",children:[R,N]}),e[36]=R,e[37]=z):z=e[37];let B;e[38]!==l?(B=l("messageFilter.important"),e[38]=l,e[39]=B):B=e[39];let L;e[40]!==B?(L=d.jsx("span",{children:B}),e[40]=B,e[41]=L):L=e[41];let P;e[42]!==z||e[43]!==L?(P=d.jsxs(ve,{gap:11,children:[z,L]}),e[42]=z,e[43]=L,e[44]=P):P=e[44];let I;e[45]!==f||e[46]!==M||e[47]!==P?(I=d.jsx(f,{onClick:M,className:gs.row_target,children:P}),e[45]=f,e[46]=M,e[47]=P,e[48]=I):I=e[48];let H;e[49]!==n.HasAttachments||e[50]!==o?(H=()=>o("HasAttachments",!(n!=null&&n.HasAttachments)),e[49]=n.HasAttachments,e[50]=o,e[51]=H):H=e[51];const $=c?gs.row_target_check:"";let V;e[52]!==n.HasAttachments||e[53]!==c?(V=n!=null&&n.HasAttachments?d.jsx(Ko,{size:c?16:14,stroke:1.5,color:"#626262"}):null,e[52]=n.HasAttachments,e[53]=c,e[54]=V):V=e[54];let q;e[55]!==$||e[56]!==V?(q=d.jsx(xe,{w:18,justify:"center",className:$,children:V}),e[55]=$,e[56]=V,e[57]=q):q=e[57];let U;e[58]===Symbol.for("react.memo_cache_sentinel")?(U=d.jsx(D2,{height:20,width:20,color:"#31394a",stroke:1.2}),e[58]=U):U=e[58];let W;e[59]!==q?(W=d.jsxs(xe,{align:"center",justify:"center",children:[q,U]}),e[59]=q,e[60]=W):W=e[60];let Y;e[61]!==l?(Y=l("messageFilter.withAttachments"),e[61]=l,e[62]=Y):Y=e[62];let G;e[63]!==Y?(G=d.jsx("span",{children:Y}),e[63]=Y,e[64]=G):G=e[64];let K;e[65]!==W||e[66]!==G?(K=d.jsxs(ve,{gap:15,children:[W,G]}),e[65]=W,e[66]=G,e[67]=K):K=e[67];let Q;e[68]!==f||e[69]!==H||e[70]!==K?(Q=d.jsx(f,{onClick:H,className:gs.row_target,children:K}),e[68]=f,e[69]=H,e[70]=K,e[71]=Q):Q=e[71];let Z;e[72]!==f||e[73]!==r||e[74]!==i||e[75]!==c||e[76]!==l?(Z=r&&d.jsx(f,{onClick:i,className:gs.row_target_clear,children:d.jsxs(ve,{gap:17,children:[d.jsxs(xe,{align:"center",justify:"center",children:[!c&&d.jsx(xe,{w:18}),d.jsx(b6e,{size:18,stroke:1.5,color:"#fa5252"})]})," ",d.jsx("span",{children:l("messageFilter.clearFilters")})]})}),e[72]=f,e[73]=r,e[74]=i,e[75]=c,e[76]=l,e[77]=Z):Z=e[77];let J;e[78]===Symbol.for("react.memo_cache_sentinel")?(J=d.jsx(Da,{my:"md",color:"#DEE2E6"}),e[78]=J):J=e[78];let ne;e[79]!==a?(ne=()=>{a(1)},e[79]=a,e[80]=ne):ne=e[80];const se=c?0:4,ce=c?gs.row_target_check:"";let fe;e[81]!==n.sortOrder||e[82]!==c?(fe=n.sortOrder?d.jsx(Ko,{size:c?16:14,stroke:1.5,color:"#626262"}):null,e[81]=n.sortOrder,e[82]=c,e[83]=fe):fe=e[83];let le;e[84]!==ce||e[85]!==fe?(le=d.jsx(xe,{align:"center",justify:"center",children:d.jsx(xe,{w:18,justify:"center",className:ce,children:fe})}),e[84]=ce,e[85]=fe,e[86]=le):le=e[86];let be;e[87]!==l?(be=l("messageFilter.newestFirst"),e[87]=l,e[88]=be):be=e[88];let je;e[89]!==be?(je=d.jsx("span",{children:be}),e[89]=be,e[90]=je):je=e[90];let pe;e[91]!==se||e[92]!==le||e[93]!==je?(pe=d.jsxs(ve,{gap:se,children:[le,je]}),e[91]=se,e[92]=le,e[93]=je,e[94]=pe):pe=e[94];let _e;e[95]!==f||e[96]!==ne||e[97]!==pe?(_e=d.jsx(f,{onClick:ne,className:gs.row_target,children:pe}),e[95]=f,e[96]=ne,e[97]=pe,e[98]=_e):_e=e[98];let Ce;e[99]!==a?(Ce=()=>{a(0)},e[99]=a,e[100]=Ce):Ce=e[100];const Te=c?0:4,Ae=c?gs.row_target_check:"";let Ze;e[101]!==n.sortOrder||e[102]!==c?(Ze=n.sortOrder?null:d.jsx(Ko,{size:c?16:14,stroke:1.5,color:"#31394a"}),e[101]=n.sortOrder,e[102]=c,e[103]=Ze):Ze=e[103];let He;e[104]!==Ze?(He=d.jsx(xe,{w:18,justify:"center",children:Ze}),e[104]=Ze,e[105]=He):He=e[105];let lt;e[106]!==Ae||e[107]!==He?(lt=d.jsx(xe,{align:"center",justify:"center",className:Ae,children:He}),e[106]=Ae,e[107]=He,e[108]=lt):lt=e[108];let Ye;e[109]!==l?(Ye=l("messageFilter.olderFirst"),e[109]=l,e[110]=Ye):Ye=e[110];let ge;e[111]!==Ye?(ge=d.jsx("span",{children:Ye}),e[111]=Ye,e[112]=ge):ge=e[112];let Fe;e[113]!==Te||e[114]!==lt||e[115]!==ge?(Fe=d.jsxs(ve,{gap:Te,children:[lt,ge]}),e[113]=Te,e[114]=lt,e[115]=ge,e[116]=Fe):Fe=e[116];let Se;e[117]!==f||e[118]!==Ce||e[119]!==Fe?(Se=d.jsx(f,{onClick:Ce,className:gs.row_target,children:Fe}),e[117]=f,e[118]=Ce,e[119]=Fe,e[120]=Se):Se=e[120];let qe;return e[121]!==A||e[122]!==I||e[123]!==Q||e[124]!==Z||e[125]!==_e||e[126]!==Se?(qe=d.jsxs(ie,{mb:10,pt:10,children:[A,I,Q,Z,J,_e,Se]}),e[121]=A,e[122]=I,e[123]=Q,e[124]=Z,e[125]=_e,e[126]=Se,e[127]=qe):qe=e[127],qe},AY=t=>{const e=me.c(4),{filterInstalled:n}=t,r=!n;let s;e[0]===Symbol.for("react.memo_cache_sentinel")?(s={root:{display:"flex",alignItems:"center"}},e[0]=s):s=e[0];let o;e[1]===Symbol.for("react.memo_cache_sentinel")?(o=d.jsx(w6e,{size:18,stroke:1.5,color:"#868E96"}),e[1]=o):o=e[1];let i;return e[2]!==r?(i=d.jsx(g2,{h:24,size:8,offset:6,position:"bottom-end",color:"#74C0FC",disabled:r,styles:s,withBorder:!0,children:o}),e[2]=r,e[3]=i):i=e[3],i},Nst=({loading:t,setLoading:e})=>{const n=zt(),r=ts(),s=xt(575),o=re(mr),i=re(J_),[a,l]=S.useState(!1),[c,u]=S.useState(!1),f=S.useRef(!1),h=(i==null?void 0:i.IsImportant)||(i==null?void 0:i.HasAttachments)||(i==null?void 0:i.WasRead)===!1,m=S.useCallback(()=>{u(w=>!w)},[]),y=w=>{n(Jv({sortOrder:w})),l(!0)},v=(w,C)=>{n(Jv({[w]:C})),l(!0)},b=()=>{n(Jv({WasRead:!0,HasAttachments:!1,IsImportant:!1})),l(!0)};return S.useEffect(()=>{if(!o)return;if(f.current){f.current=!1;return}const{IsImportant:w,WasRead:C,HasAttachments:k}=o.SearchContext,E=o.sortOrder;(i==null?void 0:i.IsImportant)===w&&(i==null?void 0:i.WasRead)===C&&(i==null?void 0:i.HasAttachments)===k&&(i==null?void 0:i.sortOrder)===E||n(Jv({IsImportant:w,WasRead:C===void 0?!0:C,HasAttachments:k,sortOrder:E}))},[o]),S.useEffect(()=>{if(!a)return;const{sortOrder:w,...C}=i,k={...C};k!=null&&k.HasAttachments||(k.HasAttachments=void 0),k!=null&&k.IsImportant||(k.IsImportant=void 0),k!=null&&k.WasRead&&(k.WasRead=void 0),e(!0),n(ud(!0));const E={...o,SearchContext:{...o.SearchContext,...k},offset:0,folderId:(r==null?void 0:r.Id)||o.folderId,sortOrder:i.sortOrder};E.folderId==="-1"&&delete E.folderId,f.current=!0,n(ur(E)).unwrap().finally(()=>e(!1)),n(Dc(1)),l(!1)},[a,i==null?void 0:i.HasAttachments,i==null?void 0:i.IsImportant,i==null?void 0:i.WasRead,i==null?void 0:i.sortOrder]),s?d.jsx(Km,{opened:c,onClose:m,trigger:d.jsx(Ve,{component:"div",size:"md",onClick:m,children:d.jsx(AY,{filterInstalled:h})}),children:d.jsx(jY,{fastFilter:i,filterInstalled:h,onItemClick:()=>u(!1),handleFilterClick:v,handleFilterReset:b,handleToggleOrder:y})}):d.jsx(d.Fragment,{children:d.jsxs(et,{disabled:t,opened:c,onChange:u,position:"bottom-start",width:220,styles:{dropdown:{border:"none",boxShadow:"0 12px 32px rgba(0,0,0,.16)",borderRadius:8,padding:"20px 0 20px 0",transform:"translateX(-10px)"}},children:[d.jsx(et.Target,{children:d.jsx(Ve,{component:"div",size:"md",onClick:m,children:d.jsx(AY,{filterInstalled:h})})}),d.jsx(et.Dropdown,{children:d.jsx(jY,{fastFilter:i,filterInstalled:h,onItemClick:()=>u(!1),handleFilterClick:v,handleFilterReset:b,handleToggleOrder:y})})]})})},Lst=({checkedMessages:t,checkedMessagesIds:e,updateSelectedMessages:n,onCheck:r,onCheckedListClear:s,resetWatcher:o,desktopOpened:i})=>{var W,Y;const a=zt(),{emailId:l}=sr(),{t:c}=Le(),u=Mr(),f=ts(),h=xt(1024),{read:m}=Ol(),y=re(Va),v=re(qc),b=re(ip),w=re(Z_),C=re(zr),k=re($o),E=xt(500),[j,A]=S.useState(!1),[M,_]=S.useState(!1),[D,R]=S.useState(!1),N=S.useMemo(()=>y.find(G=>G.Type===128&&G.UserEmailId===Number(l)),[y,l]),z=j&&v.Items.length&&(f==null?void 0:f.Id)&&(f==null?void 0:f.Id)===(N==null?void 0:N.Id)&&!(E&&e.length),B=v.Items.map(G=>G.Id),L=new Set(e),P=B.filter(G=>L.has(G)).length,I=B.length>0&&P===B.length,H=P>0,$=()=>{qm({title:c("modals.titles.deleteTitle"),children:d.jsx(ue,{children:c("modals.text.deleteAllMessagesFromTrash")}),labels:{confirm:`${c("modals.controls.delete")}`,cancel:`${c("modals.controls.cancel")}`},centered:!0,cancelProps:{styles:{label:{fontSize:"12px"}}},confirmProps:{color:"#fa5252",disabled:M,styles:{label:{fontSize:"12px"}}},onConfirm:()=>V()})},V=async()=>{if(N)try{_(!0),await a(px({folderId:N.Id})).unwrap(),u.success(c("notifications.messages.allMessagesDeleted")),a(jo())}catch{u.error(c("notifications.status.error"))}finally{_(!1)}},q=()=>{a($Te(!w)),a(Ns(null))};S.useEffect(()=>{!j&&b==="fulfilled"&&(f==null?void 0:f.Id)===(N==null?void 0:N.Id)&&A(!0)},[f==null?void 0:f.Id,b,j,N==null?void 0:N.Id]),S.useEffect(()=>{(f==null?void 0:f.Id)!==(N==null?void 0:N.Id)&&A(!1)},[f==null?void 0:f.Id,N==null?void 0:N.Id]);const U=()=>h?40:48;return d.jsx(ve,{pl:h||i?"16px":"36px",px:"16px",h:U(),sx:()=>({backgroundColor:"#fff",position:h?"fixed":"relative",width:"100%",zIndex:10,gap:"unset"}),children:d.jsxs(ve,{w:"100%",align:"center",h:h?40:48,children:[m?d.jsx(ve,{}):d.jsxs(d.Fragment,{children:[d.jsx(Or,{size:"xs",checked:I,indeterminate:H&&!I,styles:{input:{cursor:"pointer"}},onChange:r}),d.jsxs(ve,{gap:6,children:[(k||e.length)&&d.jsx(dC,{checkedMessagesIds:e,checkedMessages:t,updateSelectedMessages:n,onCheckedListClear:s,resetWatcher:o,isFullToolbar:!0,isInJunkFolder:((W=C.find(G=>G.Id===(k==null?void 0:k.FolderId)))==null?void 0:W.Type)===16,isInInboxFolder:((Y=C.find(G=>G.Id===(k==null?void 0:k.FolderId)))==null?void 0:Y.Type)===1,message:k,folderId:k==null?void 0:k.FolderId}),z&&d.jsx(yt,{variant:"subtle",styles:{root:{height:34,...E?{paddingRight:0,paddingLeft:0}:{}},label:{fontWeight:500,fontSize:14}},onClick:$,children:c(E?"cleanTrashShort":"cleanTrash")})]})]}),v.Items.length>0&&d.jsx(ve,{ml:"auto",children:d.jsx(Dst,{disable:D})}),d.jsxs(xe,{align:"center",ml:v.Items.length>0?0:"auto",children:[h&&d.jsx(nae,{}),d.jsx(Nst,{loading:D,setLoading:R}),!h&&d.jsx(xe,{children:d.jsx(_4,{size:"xs",defaultValue:w.toString(),onChange:q,styles:{label:{height:"24px"},root:{marginLeft:"16px"}},data:[{value:"true",label:d.jsx(on,{position:"bottom",label:c("separate"),children:d.jsx("img",{alt:"",src:Ost,height:18,width:18})})},{value:"false",label:d.jsx(on,{position:"bottom",label:c("doNotSeparate"),children:d.jsx("img",{alt:"",src:Ist,height:18,width:18})})}]})})]})]})})},$st="_customScrollbar_7gekh_1",Fst={customScrollbar:$st},zst=t=>{const e=me.c(32),{message:n,showTooltip:r,showLabel:s,width:o,height:i,color:a,size:l,radius:c,closeContextMenu:u,styles:f}=t,h=r===void 0?!1:r,m=s===void 0?!1:s,{t:y}=Le(),[v,b]=Rs(!1),{close:w,open:C}=b,k=cs(),{onEditClick:E}=roe(n),j=!h;let A;e[0]===Symbol.for("react.memo_cache_sentinel")?(A={dropdown:{backgroundColor:"var(--mantine-color-dark-7)",padding:"5px 10px",boxShadow:"none",border:"none"}},e[0]=A):A=e[0];let M;e[1]!==u||e[2]!==k||e[3]!==E?(M=P=>{u&&u(),E(P),k(Dr())},e[1]=u,e[2]=k,e[3]=E,e[4]=M):M=e[4];let _;e[5]!==a||e[6]!==i||e[7]!==o?(_=d.jsx(Y4,{width:o,height:i,stroke:1.5,color:a}),e[5]=a,e[6]=i,e[7]=o,e[8]=_):_=e[8];let D;e[9]!==a||e[10]!==m||e[11]!==y?(D=m&&d.jsx(ue,{c:a,children:y("edit")}),e[9]=a,e[10]=m,e[11]=y,e[12]=D):D=e[12];let R;e[13]!==w||e[14]!==C||e[15]!==c||e[16]!==l||e[17]!==f||e[18]!==M||e[19]!==_||e[20]!==D?(R=d.jsx(Dt.Target,{children:d.jsxs(Ve,{variant:"subtle",size:l,radius:c,onMouseDown:Pst,onDoubleClick:Bst,onMouseEnter:C,onMouseLeave:w,onClick:M,styles:f,children:[_,D]})}),e[13]=w,e[14]=C,e[15]=c,e[16]=l,e[17]=f,e[18]=M,e[19]=_,e[20]=D,e[21]=R):R=e[21];let N;e[22]===Symbol.for("react.memo_cache_sentinel")?(N={pointerEvents:"none"},e[22]=N):N=e[22];let z;e[23]!==y?(z=y("edit"),e[23]=y,e[24]=z):z=e[24];let B;e[25]!==z?(B=d.jsx(Dt.Dropdown,{style:N,children:d.jsx(ue,{c:"#fff",fz:12,children:z})}),e[25]=z,e[26]=B):B=e[26];let L;return e[27]!==v||e[28]!==B||e[29]!==j||e[30]!==R?(L=d.jsxs(Dt,{disabled:j,position:"top",width:"auto",shadow:"md",opened:v,offset:4,styles:A,children:[R,B]}),e[27]=v,e[28]=B,e[29]=j,e[30]=R,e[31]=L):L=e[31],L};function Pst(t){return t.stopPropagation()}function Bst(t){return t.stopPropagation()}const Hst=t=>{const e=me.c(32),{message:n,showTooltip:r,showLabel:s,width:o,height:i,color:a,size:l,radius:c,closeContextMenu:u,styles:f}=t,h=r===void 0?!1:r,m=s===void 0?!1:s,{t:y}=Le(),[v,b]=Rs(!1),{close:w,open:C}=b,k=cs(),E=IS(n),j=!h;let A;e[0]===Symbol.for("react.memo_cache_sentinel")?(A={dropdown:{backgroundColor:"var(--mantine-color-dark-7)",padding:"5px 10px",boxShadow:"none",border:"none"}},e[0]=A):A=e[0];let M;e[1]!==u||e[2]!==k||e[3]!==E?(M=()=>{u&&u(),E(),k(Dr())},e[1]=u,e[2]=k,e[3]=E,e[4]=M):M=e[4];let _;e[5]!==a||e[6]!==i||e[7]!==o?(_=d.jsx(q4,{width:o,height:i,stroke:1.5,color:a}),e[5]=a,e[6]=i,e[7]=o,e[8]=_):_=e[8];let D;e[9]!==a||e[10]!==m||e[11]!==y?(D=m&&d.jsx(ue,{c:a,children:y("forward")}),e[9]=a,e[10]=m,e[11]=y,e[12]=D):D=e[12];let R;e[13]!==w||e[14]!==C||e[15]!==c||e[16]!==l||e[17]!==f||e[18]!==M||e[19]!==_||e[20]!==D?(R=d.jsx(Dt.Target,{children:d.jsxs(Ve,{variant:"subtle",size:l,radius:c,onMouseDown:Ust,onDoubleClick:Vst,onMouseEnter:C,onMouseLeave:w,onClick:M,styles:f,children:[_,D]})}),e[13]=w,e[14]=C,e[15]=c,e[16]=l,e[17]=f,e[18]=M,e[19]=_,e[20]=D,e[21]=R):R=e[21];let N;e[22]===Symbol.for("react.memo_cache_sentinel")?(N={pointerEvents:"none"},e[22]=N):N=e[22];let z;e[23]!==y?(z=y("forward"),e[23]=y,e[24]=z):z=e[24];let B;e[25]!==z?(B=d.jsx(Dt.Dropdown,{style:N,children:d.jsx(ue,{c:"#fff",fz:12,children:z})}),e[25]=z,e[26]=B):B=e[26];let L;return e[27]!==v||e[28]!==B||e[29]!==j||e[30]!==R?(L=d.jsxs(Dt,{disabled:j,position:"top",width:"auto",shadow:"md",opened:v,offset:4,styles:A,children:[R,B]}),e[27]=v,e[28]=B,e[29]=j,e[30]=R,e[31]=L):L=e[31],L};function Ust(t){return t.stopPropagation()}function Vst(t){return t.stopPropagation()}function qst(t){const e=me.c(5),{externalId:n,folderId:r}=t,s=zt(),o=xt(1024);let i;return e[0]!==s||e[1]!==n||e[2]!==r||e[3]!==o?(i=async()=>{if(o)return;await s(W_({folderId:r,externalId:n}));const l=document.getElementById("message-card");l&&l.click()},e[0]=s,e[1]=n,e[2]=r,e[3]=o,e[4]=i):i=e[4],i}const Wst=t=>{const e=me.c(47);let n,r,s,o,i,a,l,c,u,f,h;if(e[0]!==t){const{folderId:H,messageId:$,externalId:V,isSelected:q,showTooltip:U,showLabel:W,width:Y,height:G,color:K,size:Q,radius:Z,closeContextMenu:J,...ne}=t;o=H,s=V,u=U,f=W,h=Y,i=G,r=K,c=Q,l=Z,n=J,a=ne,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o,e[5]=i,e[6]=a,e[7]=l,e[8]=c,e[9]=u,e[10]=f,e[11]=h}else n=e[1],r=e[2],s=e[3],o=e[4],i=e[5],a=e[6],l=e[7],c=e[8],u=e[9],f=e[10],h=e[11];const m=u===void 0?!1:u,y=f===void 0?!1:f,{t:v}=Le(),[b,w]=Rs(!1),{close:C,open:k}=w,E=cs();let j;e[12]!==s||e[13]!==o?(j={externalId:s,folderId:o},e[12]=s,e[13]=o,e[14]=j):j=e[14];const A=qst(j),M=!m;let _;e[15]===Symbol.for("react.memo_cache_sentinel")?(_={dropdown:{backgroundColor:"var(--mantine-color-dark-7)",padding:"5px 10px",boxShadow:"none",border:"none"}},e[15]=_):_=e[15];let D;e[16]!==n||e[17]!==E||e[18]!==A?(D=()=>{n&&n(),A(),E(Dr()),E(rR(!0))},e[16]=n,e[17]=E,e[18]=A,e[19]=D):D=e[19];let R;e[20]!==r||e[21]!==i||e[22]!==h?(R=d.jsx(qQ,{width:h,height:i,stroke:1.5,color:r}),e[20]=r,e[21]=i,e[22]=h,e[23]=R):R=e[23];let N;e[24]!==r||e[25]!==y||e[26]!==v?(N=y&&d.jsx(ue,{c:r,children:v("newMessageWindow")}),e[24]=r,e[25]=y,e[26]=v,e[27]=N):N=e[27];let z;e[28]!==C||e[29]!==k||e[30]!==a||e[31]!==l||e[32]!==c||e[33]!==D||e[34]!==R||e[35]!==N?(z=d.jsx(Dt.Target,{children:d.jsxs(Ve,{...a,size:c,variant:"subtle",radius:l,onMouseDown:Yst,onDoubleClick:Gst,onMouseEnter:k,onMouseLeave:C,onClick:D,styles:a.styles,children:[R,N]})}),e[28]=C,e[29]=k,e[30]=a,e[31]=l,e[32]=c,e[33]=D,e[34]=R,e[35]=N,e[36]=z):z=e[36];let B;e[37]===Symbol.for("react.memo_cache_sentinel")?(B={pointerEvents:"none"},e[37]=B):B=e[37];let L;e[38]!==v?(L=v("newMessageWindow"),e[38]=v,e[39]=L):L=e[39];let P;e[40]!==L?(P=d.jsx(Dt.Dropdown,{style:B,children:d.jsx(ue,{c:"#fff",fz:12,children:L})}),e[40]=L,e[41]=P):P=e[41];let I;return e[42]!==b||e[43]!==z||e[44]!==P||e[45]!==M?(I=d.jsxs(Dt,{disabled:M,position:"top",width:"auto",shadow:"md",opened:b,offset:4,styles:_,children:[z,P]}),e[42]=b,e[43]=z,e[44]=P,e[45]=M,e[46]=I):I=e[46],I};function Yst(t){return t.stopPropagation()}function Gst(t){return t.stopPropagation()}const Kst=t=>{const e=me.c(32),{message:n,showTooltip:r,showLabel:s,width:o,height:i,color:a,size:l,radius:c,closeContextMenu:u,styles:f}=t,h=r===void 0?!1:r,m=s===void 0?!1:s,{t:y}=Le(),[v,b]=Rs(!1),{close:w,open:C}=b,k=cs(),E=OS(n),j=!h;let A;e[0]===Symbol.for("react.memo_cache_sentinel")?(A={dropdown:{backgroundColor:"var(--mantine-color-dark-7)",padding:"5px 10px",boxShadow:"none",border:"none"}},e[0]=A):A=e[0];let M;e[1]!==u||e[2]!==k||e[3]!==E?(M=()=>{u&&u(),E(),k(Dr())},e[1]=u,e[2]=k,e[3]=E,e[4]=M):M=e[4];let _;e[5]!==a||e[6]!==i||e[7]!==o?(_=d.jsx(V4,{width:o,height:i,stroke:1.5,color:a}),e[5]=a,e[6]=i,e[7]=o,e[8]=_):_=e[8];let D;e[9]!==a||e[10]!==m||e[11]!==y?(D=m&&d.jsx(ue,{c:a,children:y("replyToAll")}),e[9]=a,e[10]=m,e[11]=y,e[12]=D):D=e[12];let R;e[13]!==w||e[14]!==C||e[15]!==c||e[16]!==l||e[17]!==f||e[18]!==M||e[19]!==_||e[20]!==D?(R=d.jsx(Dt.Target,{children:d.jsxs(Ve,{variant:"subtle",size:l,radius:c,onMouseDown:Xst,onDoubleClick:Zst,onMouseEnter:C,onMouseLeave:w,onClick:M,styles:f,children:[_,D]})}),e[13]=w,e[14]=C,e[15]=c,e[16]=l,e[17]=f,e[18]=M,e[19]=_,e[20]=D,e[21]=R):R=e[21];let N;e[22]===Symbol.for("react.memo_cache_sentinel")?(N={pointerEvents:"none"},e[22]=N):N=e[22];let z;e[23]!==y?(z=y("replyToAll"),e[23]=y,e[24]=z):z=e[24];let B;e[25]!==z?(B=d.jsx(Dt.Dropdown,{style:N,children:d.jsx(ue,{c:"#fff",fz:12,children:z})}),e[25]=z,e[26]=B):B=e[26];let L;return e[27]!==v||e[28]!==B||e[29]!==j||e[30]!==R?(L=d.jsxs(Dt,{disabled:j,position:"top",width:"auto",shadow:"md",opened:v,offset:4,styles:A,children:[R,B]}),e[27]=v,e[28]=B,e[29]=j,e[30]=R,e[31]=L):L=e[31],L};function Xst(t){return t.stopPropagation()}function Zst(t){return t.stopPropagation()}const Qst=t=>{const e=me.c(32),{message:n,showTooltip:r,showLabel:s,width:o,height:i,color:a,size:l,radius:c,closeContextMenu:u,styles:f}=t,h=r===void 0?!1:r,m=s===void 0?!1:s,{t:y}=Le(),[v,b]=Rs(!1),{close:w,open:C}=b,k=cs(),E=zR(n),j=!h;let A;e[0]===Symbol.for("react.memo_cache_sentinel")?(A={dropdown:{backgroundColor:"var(--mantine-color-dark-7)",padding:"5px 10px",boxShadow:"none",border:"none"}},e[0]=A):A=e[0];let M;e[1]!==u||e[2]!==k||e[3]!==E?(M=()=>{u&&u(),k(Dr()),E()},e[1]=u,e[2]=k,e[3]=E,e[4]=M):M=e[4];let _;e[5]!==a||e[6]!==i||e[7]!==o?(_=d.jsx(g3,{width:o,height:i,stroke:1.5,color:a}),e[5]=a,e[6]=i,e[7]=o,e[8]=_):_=e[8];let D;e[9]!==a||e[10]!==m||e[11]!==y?(D=m&&d.jsx(ue,{c:a,children:y("reply")}),e[9]=a,e[10]=m,e[11]=y,e[12]=D):D=e[12];let R;e[13]!==w||e[14]!==C||e[15]!==c||e[16]!==l||e[17]!==f||e[18]!==M||e[19]!==_||e[20]!==D?(R=d.jsx(Dt.Target,{children:d.jsxs(Ve,{variant:"subtle",size:l,radius:c,onMouseDown:Jst,onDoubleClick:eot,onMouseEnter:C,onMouseLeave:w,onClick:M,styles:f,children:[_,D]})}),e[13]=w,e[14]=C,e[15]=c,e[16]=l,e[17]=f,e[18]=M,e[19]=_,e[20]=D,e[21]=R):R=e[21];let N;e[22]===Symbol.for("react.memo_cache_sentinel")?(N={pointerEvents:"none"},e[22]=N):N=e[22];let z;e[23]!==y?(z=y("reply"),e[23]=y,e[24]=z):z=e[24];let B;e[25]!==z?(B=d.jsx(Dt.Dropdown,{style:N,children:d.jsx(ue,{c:"#fff",fz:12,children:z})}),e[25]=z,e[26]=B):B=e[26];let L;return e[27]!==v||e[28]!==B||e[29]!==j||e[30]!==R?(L=d.jsxs(Dt,{disabled:j,position:"top",width:"auto",shadow:"md",opened:v,offset:4,styles:A,children:[R,B]}),e[27]=v,e[28]=B,e[29]=j,e[30]=R,e[31]=L):L=e[31],L};function Jst(t){return t.stopPropagation()}function eot(t){return t.stopPropagation()}function tot(t){const e=me.c(9),{item:n}=t,r=Er(),s=zt(),o=re(mr),{formValues:i}=br(not);let a;e[0]!==s||e[1]!==i||e[2]!==n.Address||e[3]!==n.Name||e[4]!==o.SearchContext||e[5]!==r?(a=async u=>{const f={...i,folderId:"-1",SearchContext:{...o.SearchContext,From:n.Name||n.Address||u}};s(lS(f)),await s(ur(f)),r("/search")},e[0]=s,e[1]=i,e[2]=n.Address,e[3]=n.Name,e[4]=o.SearchContext,e[5]=r,e[6]=a):a=e[6];const l=a;let c;return e[7]!==l?(c={handleSearchUser:l},e[7]=l,e[8]=c):c=e[8],c}function not(t){return t.search}const rot=t=>{const e=me.c(49);let n,r,s,o,i,a,l,c,u,f;e[0]!==t?({message:l,showTooltip:c,showLabel:u,width:f,height:s,color:r,size:a,radius:i,closeContextMenu:n,...o}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o,e[5]=i,e[6]=a,e[7]=l,e[8]=c,e[9]=u,e[10]=f):(n=e[1],r=e[2],s=e[3],o=e[4],i=e[5],a=e[6],l=e[7],c=e[8],u=e[9],f=e[10]);const{From:h}=l,m=c===void 0?!1:c,y=u===void 0?!1:u,{t:v}=Le(),[b,w]=Rs(!1),{close:C,open:k}=w,E=cs(),j=h.Name??"",A=h.Address??"";let M;e[11]!==j||e[12]!==A?(M={item:{Name:j,Address:A}},e[11]=j,e[12]=A,e[13]=M):M=e[13];const{handleSearchUser:_}=tot(M),D=!m;let R;e[14]===Symbol.for("react.memo_cache_sentinel")?(R={dropdown:{backgroundColor:"var(--mantine-color-dark-7)",padding:"5px 10px",boxShadow:"none",border:"none"}},e[14]=R):R=e[14];let N;e[15]!==n||e[16]!==E||e[17]!==_?(N=()=>{n&&n(),_(),E(Dr())},e[15]=n,e[16]=E,e[17]=_,e[18]=N):N=e[18];let z;e[19]!==r||e[20]!==s||e[21]!==f?(z=d.jsx(Hke,{width:f,height:s,stroke:1.5,color:r}),e[19]=r,e[20]=s,e[21]=f,e[22]=z):z=e[22];let B;e[23]!==r||e[24]!==y||e[25]!==v?(B=y&&d.jsx(ue,{c:r,sx:{textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap"},children:v("searchUser")}),e[23]=r,e[24]=y,e[25]=v,e[26]=B):B=e[26];let L;e[27]!==C||e[28]!==k||e[29]!==o||e[30]!==i||e[31]!==a||e[32]!==N||e[33]!==z||e[34]!==B?(L=d.jsx(Dt.Target,{children:d.jsxs(Ve,{...o,size:a,variant:"subtle",radius:i,onMouseDown:sot,onDoubleClick:oot,onMouseEnter:k,onMouseLeave:C,onClick:N,styles:o.styles,children:[z,B]})}),e[27]=C,e[28]=k,e[29]=o,e[30]=i,e[31]=a,e[32]=N,e[33]=z,e[34]=B,e[35]=L):L=e[35];let P;e[36]===Symbol.for("react.memo_cache_sentinel")?(P={pointerEvents:"none"},e[36]=P):P=e[36];let I;e[37]!==v?(I=v("searchUser"),e[37]=v,e[38]=I):I=e[38];const H=h.Name||h.Address;let $;e[39]!==H?($=d.jsx("strong",{children:H}),e[39]=H,e[40]=$):$=e[40];let V;e[41]!==I||e[42]!==$?(V=d.jsx(Dt.Dropdown,{style:P,children:d.jsxs(ue,{c:"#fff",fz:12,children:[I," ",$]})}),e[41]=I,e[42]=$,e[43]=V):V=e[43];let q;return e[44]!==b||e[45]!==L||e[46]!==V||e[47]!==D?(q=d.jsxs(Dt,{disabled:D,position:"top",width:"auto",shadow:"md",opened:b,offset:4,styles:R,children:[L,V]}),e[44]=b,e[45]=L,e[46]=V,e[47]=D,e[48]=q):q=e[48],q};function sot(t){return t.stopPropagation()}function oot(t){return t.stopPropagation()}const iot=t=>{var P;const e=me.c(56),{opened:n,target:r,position:s,close:o,maxHeight:i}=t,a=cs(),{isOpened:l,ownerId:c}=re(Td),{clearSelection:u,checkedMessages:f,updateSelectedMessages:h}=Fl(),m=S.useRef(null),y=S.useRef(!1);let v,b;if(e[0]!==n?(v=()=>{if(!n)return;const I=H=>{var V;const $=H.target;$&&((V=m.current)!=null&&V.contains($)||$.closest('.mantine-Popover-dropdown, .mantine-Menu-dropdown, .mantine-HoverCard-dropdown, [data-menu-immune="true"]')&&(y.current=!0,setTimeout(()=>y.current=!1,0)))};return document.addEventListener("pointerdown",I,!0),()=>document.removeEventListener("pointerdown",I,!0)},b=[n],e[0]=n,e[1]=v,e[2]=b):(v=e[1],b=e[2]),S.useEffect(v,b),!l||c!==((P=r==null?void 0:r.message)==null?void 0:P.Id))return null;let w;e[3]!==o||e[4]!==a?(w=()=>{y.current||(o(),a(Dr()))},e[3]=o,e[4]=a,e[5]=w):w=e[5];let C;e[6]===Symbol.for("react.memo_cache_sentinel")?(C={dropdown:{border:"none",padding:0,overflow:"hidden"},item:{padding:"8px 10px"}},e[6]=C):C=e[6];let k;e[7]!==s.x||e[8]!==s.y?(k=d.jsx(et.Target,{children:d.jsx("div",{style:{position:"fixed",top:s.y,left:s.x,width:0,height:0,pointerEvents:"none",zIndex:200}})}),e[7]=s.x,e[8]=s.y,e[9]=k):k=e[9];let E;e[10]!==i?(E={maxHeight:i,overflowY:"auto",overflowX:"hidden",padding:"5px 0"},e[10]=i,e[11]=E):E=e[11];let j;e[12]!==o||e[13]!==r.isBulkAction||e[14]!==r.isDraftFolder||e[15]!==r.isOutbox||e[16]!==r.message?(j=!r.isOutbox&&!r.isBulkAction&&d.jsx(ve,{gap:0,p:"0 5px 5px 5px",children:r.isDraftFolder?d.jsx(zst,{message:r.message,showTooltip:!1,showLabel:!0,styles:lf,width:20,height:20,color:"#31394a",size:"100%",radius:8,closeContextMenu:o}):d.jsxs(d.Fragment,{children:[d.jsx(Qst,{message:r.message,showTooltip:!1,showLabel:!0,styles:lf,width:20,height:20,color:"#31394a",size:"100%",radius:8,closeContextMenu:o}),d.jsx(Kst,{message:r.message,showTooltip:!1,showLabel:!0,styles:lf,width:20,height:20,color:"#31394a",size:"100%",radius:8,closeContextMenu:o}),d.jsx(Hst,{message:r.message,showTooltip:!1,showLabel:!0,styles:lf,width:20,height:20,color:"#31394a",size:"100%",radius:8,closeContextMenu:o})]})}),e[12]=o,e[13]=r.isBulkAction,e[14]=r.isDraftFolder,e[15]=r.isOutbox,e[16]=r.message,e[17]=j):j=e[17];let A;e[18]!==r.isBulkAction||e[19]!==r.isOutbox?(A=!r.isOutbox&&!r.isBulkAction&&d.jsx(et.Divider,{}),e[18]=r.isBulkAction,e[19]=r.isOutbox,e[20]=A):A=e[20];const M=`${r!=null&&r.isOutbox?"0px 5px 0 5px":"5px 5px 0 5px"}`;let _;e[21]!==o||e[22]!==r.isBulkAction||e[23]!==r.isDraftFolder||e[24]!==r.isOutbox||e[25]!==r.message?(_=!r.isOutbox&&!r.isDraftFolder&&!r.isBulkAction&&d.jsx(rot,{message:r.message,showTooltip:!0,showLabel:!0,styles:lf,width:20,height:20,color:"#31394a",size:"100%",radius:8,closeContextMenu:o}),e[21]=o,e[22]=r.isBulkAction,e[23]=r.isDraftFolder,e[24]=r.isOutbox,e[25]=r.message,e[26]=_):_=e[26];let D;e[27]!==o||e[28]!==r.isBulkAction||e[29]!==r.isSelected||e[30]!==r.message.ExternalId||e[31]!==r.message.FolderId||e[32]!==r.message.Id?(D=!r.isBulkAction&&d.jsx(Wst,{folderId:r.message.FolderId,messageId:r.message.Id,externalId:r.message.ExternalId,isSelected:r.isSelected,showTooltip:!1,showLabel:!0,styles:lf,width:20,height:20,color:"#31394a",size:"100%",radius:8,closeContextMenu:o}),e[27]=o,e[28]=r.isBulkAction,e[29]=r.isSelected,e[30]=r.message.ExternalId,e[31]=r.message.FolderId,e[32]=r.message.Id,e[33]=D):D=e[33];const R=r==null?void 0:r.message.FolderId;let N;e[34]!==f||e[35]!==u||e[36]!==R||e[37]!==r.nextCheckedIds||e[38]!==r.resetWatcher||e[39]!==h?(N=d.jsx(dC,{checkedMessagesIds:r.nextCheckedIds,checkedMessages:f,updateSelectedMessages:h,isFullToolbar:!0,onCheckedListClear:u,resetWatcher:r.resetWatcher,mode:"context",folderId:R}),e[34]=f,e[35]=u,e[36]=R,e[37]=r.nextCheckedIds,e[38]=r.resetWatcher,e[39]=h,e[40]=N):N=e[40];let z;e[41]!==_||e[42]!==D||e[43]!==N||e[44]!==M?(z=d.jsxs(ve,{gap:0,p:M,children:[_,D,N]}),e[41]=_,e[42]=D,e[43]=N,e[44]=M,e[45]=z):z=e[45];let B;e[46]!==z||e[47]!==E||e[48]!==j||e[49]!==A?(B=d.jsx(et.Dropdown,{p:0,children:d.jsxs("div",{className:Fst.customScrollbar,style:E,children:[j,A,z]})}),e[46]=z,e[47]=E,e[48]=j,e[49]=A,e[50]=B):B=e[50];let L;return e[51]!==n||e[52]!==B||e[53]!==w||e[54]!==k?(L=d.jsxs(et,{openDelay:100,radius:8,opened:n,onClose:w,withinPortal:!0,width:260,zIndex:110,styles:C,children:[k,B]}),e[51]=n,e[52]=B,e[53]=w,e[54]=k,e[55]=L):L=e[55],L};function aot(){const t=me.c(11),[e,n]=S.useState(!1);let r;t[0]===Symbol.for("react.memo_cache_sentinel")?(r={x:0,y:0},t[0]=r):r=t[0];const[s,o]=S.useState(r),[i,a]=S.useState(null),[l,c]=S.useState(450);let u;t[1]===Symbol.for("react.memo_cache_sentinel")?(u=()=>n(!1),t[1]=u):u=t[1];const f=u;let h,m;t[2]!==e?(h=()=>{if(!e)return;const w=()=>{n(!1)};return window.addEventListener("resize",w),()=>window.removeEventListener("resize",w)},m=[e],t[2]=e,t[3]=h,t[4]=m):(h=t[3],m=t[4]),S.useEffect(h,m);let y;t[5]===Symbol.for("react.memo_cache_sentinel")?(y=(w,C)=>{w.preventDefault(),w.stopPropagation();const k=window.innerHeight,E=w.clientY,j=k-E-40,A=E-40,M=Math.max(j,A),_=Math.min(450,Math.max(0,M));o({x:w.clientX,y:E}),a(C),n(!0),c(_)},t[5]=y):y=t[5];const v=y;let b;return t[6]!==e||t[7]!==l||t[8]!==s||t[9]!==i?(b={isOpenLocal:e,open:v,position:s,target:i,close:f,setPosition:o,maxHeight:l},t[6]=e,t[7]=l,t[8]=s,t[9]=i,t[10]=b):b=t[10],b}const rae="data:image/svg+xml,%3csvg%20width='14'%20height='14'%20viewBox='0%200%2014%2014'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M3.5%202.91667V8.75C3.5%2010.0387%204.7536%2011.0833%206.3%2011.0833H10.5M5.6%208.16667H10.5M5.6%205.25001H10.5'%20stroke='%23A9B4C6'%20stroke-width='1.2'%20stroke-linecap='round'/%3e%3c/svg%3e";function lot({folderId:t,messageId:e,withLoading:n=!1,stopPropagation:r=!0}){var w;const[s,o]=S.useState(!1),i=sr(),{t:a}=Le(),l=zt(),c=Mr(),{clearSelection:u,checkedMessagesIds:f}=Fl(),h=yp(),m=re($o),y=re(zr),v=i.emailId?+i.emailId:(w=y==null?void 0:y.find(C=>C.Id===t))==null?void 0:w.UserEmailId;return{handleMoveToArchive:S.useCallback(async C=>{C&&r&&C.stopPropagation();try{n&&o(!0);const k=y.find(E=>E.Type===Je.ARCHIVE&&E.UserEmailId===Number(v));if(!k)return null;await l(Aa({fromId:t,Ids:[e],toId:k.Id})).unwrap(),(m==null?void 0:m.Id)===e&&(l(jo()),l(Ns(null))),await h(1),c.success(`${a("notifications.messages.movedTo")} ${k.label||k.Name}`),f.includes(e)&&u()}finally{n&&o(!1)}},[h,f,u,l,t,e,c,m==null?void 0:m.Id,r,a,n,y,v]),isLoading:s}}const cot=t=>{const e=me.c(46);let n,r,s,o,i,a,l,c,u,f;if(e[0]!==t){const{folderId:H,messageId:$,isSelected:V,showTooltip:q,showLabel:U,width:W,height:Y,color:G,size:K,radius:Q,...Z}=t;r=H,o=$,c=q,u=U,f=W,s=Y,n=G,l=K,a=Q,i=Z,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o,e[5]=i,e[6]=a,e[7]=l,e[8]=c,e[9]=u,e[10]=f}else n=e[1],r=e[2],s=e[3],o=e[4],i=e[5],a=e[6],l=e[7],c=e[8],u=e[9],f=e[10];const h=c===void 0?!1:c,m=u===void 0?!1:u,{t:y}=Le(),[v,b]=Rs(!1),{close:w,open:C}=b,k=cs();let E;e[11]!==r||e[12]!==o?(E={folderId:r,messageId:o,withLoading:!0,stopPropagation:!0},e[11]=r,e[12]=o,e[13]=E):E=e[13];const{handleMoveToArchive:j,isLoading:A}=lot(E),M=!h;let _;e[14]===Symbol.for("react.memo_cache_sentinel")?(_={dropdown:{backgroundColor:"var(--mantine-color-dark-7)",padding:"5px 10px",boxShadow:"none",border:"none"}},e[14]=_):_=e[14];let D;e[15]!==k||e[16]!==j?(D=H=>{k(Dr()),j(H)},e[15]=k,e[16]=j,e[17]=D):D=e[17];let R;e[18]!==n||e[19]!==s||e[20]!==f?(R=d.jsx(Cf,{width:f,height:s,stroke:1.5,color:n}),e[18]=n,e[19]=s,e[20]=f,e[21]=R):R=e[21];let N;e[22]!==n||e[23]!==m||e[24]!==y?(N=m&&d.jsx(ue,{c:n,children:y("moveToArchive")}),e[22]=n,e[23]=m,e[24]=y,e[25]=N):N=e[25];let z;e[26]!==w||e[27]!==A||e[28]!==C||e[29]!==i||e[30]!==a||e[31]!==l||e[32]!==D||e[33]!==R||e[34]!==N?(z=d.jsx(Dt.Target,{children:d.jsxs(Ve,{...i,variant:"subtle",size:l,radius:a,onMouseDown:uot,onDoubleClick:dot,onMouseEnter:C,onMouseLeave:w,onClick:D,styles:i.styles,disabled:A,children:[R,N]})}),e[26]=w,e[27]=A,e[28]=C,e[29]=i,e[30]=a,e[31]=l,e[32]=D,e[33]=R,e[34]=N,e[35]=z):z=e[35];let B;e[36]===Symbol.for("react.memo_cache_sentinel")?(B={pointerEvents:"none"},e[36]=B):B=e[36];let L;e[37]!==y?(L=y("moveToArchive"),e[37]=y,e[38]=L):L=e[38];let P;e[39]!==L?(P=d.jsx(Dt.Dropdown,{style:B,children:d.jsx(ue,{c:"#fff",fz:12,children:L})}),e[39]=L,e[40]=P):P=e[40];let I;return e[41]!==v||e[42]!==z||e[43]!==P||e[44]!==M?(I=d.jsxs(Dt,{disabled:M,position:"top",width:"auto",shadow:"md",opened:v,offset:4,styles:_,children:[z,P]}),e[41]=v,e[42]=z,e[43]=P,e[44]=M,e[45]=I):I=e[45],I};function uot(t){return t.stopPropagation()}function dot(t){return t.stopPropagation()}function fot({folderId:t,messageId:e,withLoading:n=!1,stopPropagation:r=!0}){var M;const[s,o]=S.useState(!1),i=re(zr),a=ts(),l=re(sp),c=re($o),{clearSelection:u,checkedMessagesIds:f}=Fl(),h=yp(),m=zt(),y=sr(),v=Mr(),{t:b}=Le(),w=y.emailId?+y.emailId:(M=i==null?void 0:i.find(_=>_.Id===t))==null?void 0:M.UserEmailId,C=S.useMemo(()=>i.find(_=>_.Type===128&&_.UserEmailId===Number(w)),[i,w]),k=Lm(a==null?void 0:a.Type)||l.includes(t),E=(a==null?void 0:a.Type)===Je.SPAM,j=(a==null?void 0:a.Type)===Je.TRASH||E||t===(C==null?void 0:C.Id);return{handleDelete:S.useCallback(async _=>{_&&r&&_.stopPropagation();try{if(n&&o(!0),!C)return;m(Vu({Id:e,deleted:!0})),k&&(await m(tS({id:e})),Zu(String(e))),j?await m(jg({folderId:t,Ids:[e]})):await m(Aa({fromId:t,Ids:[e],toId:C.Id}))}catch{n&&o(!1),v.error(b("notifications.messages.unknownError"))}finally{await h(1),n&&o(!1),(c==null?void 0:c.Id)===e&&(m(jo()),m(Ns(null))),m(ja()),j?v.success(b("notifications.messages.messageDeleted",{count:1})):v.success(b("notifications.messages.sentToTrash",{count:1})),f.includes(e)&&u()}},[h,f,u,m,t,j,k,e,v,c==null?void 0:c.Id,r,b,C,n]),isLoading:s}}const pot=t=>{var Z;const e=me.c(59);let n,r,s,o,i,a,l,c,u,f;if(e[0]!==t){const{folderId:J,messageId:ne,isSelected:se,showTooltip:ce,showLabel:fe,width:le,height:be,color:je,size:pe,radius:_e,...Ce}=t;r=J,o=ne,c=ce,u=fe,f=le,s=be,n=je,l=pe,a=_e,i=Ce,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o,e[5]=i,e[6]=a,e[7]=l,e[8]=c,e[9]=u,e[10]=f}else n=e[1],r=e[2],s=e[3],o=e[4],i=e[5],a=e[6],l=e[7],c=e[8],u=e[9],f=e[10];const h=c===void 0?!1:c,m=u===void 0?!1:u,{t:y}=Le(),v=sr(),b=ts(),[w,C]=Rs(!1),{close:k,open:E}=C,j=cs(),A=re(zr);let M;e[11]!==A||e[12]!==r||e[13]!==v.emailId?(M=v.emailId?+v.emailId:(Z=A==null?void 0:A.find(J=>J.Id===r))==null?void 0:Z.UserEmailId,e[11]=A,e[12]=r,e[13]=v.emailId,e[14]=M):M=e[14];const _=M;let D;if(e[15]!==A||e[16]!==_){let J;e[18]!==_?(J=ne=>ne.Type===128&&ne.UserEmailId===Number(_),e[18]=_,e[19]=J):J=e[19],D=A.find(J),e[15]=A,e[16]=_,e[17]=D}else D=e[17];const R=D,N=(b==null?void 0:b.Type)===Je.SPAM,z=(b==null?void 0:b.Type)===Je.TRASH||N||r===(R==null?void 0:R.Id);let B;e[20]!==r||e[21]!==o?(B={folderId:r,messageId:o,withLoading:!1,stopPropagation:!0},e[20]=r,e[21]=o,e[22]=B):B=e[22];const{handleDelete:L,isLoading:P}=fot(B);let I;e[23]!==j||e[24]!==L||e[25]!==z||e[26]!==P||e[27]!==y?(I=J=>{J.stopPropagation(),j(Dr()),Bh(y,{action:z?"deleteForever":"moveToTrash",overrides:{confirmProps:{disabled:P},onConfirm:()=>L(J)}})},e[23]=j,e[24]=L,e[25]=z,e[26]=P,e[27]=y,e[28]=I):I=e[28];const H=I,$=!h;let V;e[29]===Symbol.for("react.memo_cache_sentinel")?(V={dropdown:{backgroundColor:"var(--mantine-color-dark-7)",padding:"5px 10px",boxShadow:"none",border:"none"}},e[29]=V):V=e[29];let q;e[30]!==n||e[31]!==s||e[32]!==f?(q=d.jsx(Eo,{width:f,height:s,stroke:1.5,color:n}),e[30]=n,e[31]=s,e[32]=f,e[33]=q):q=e[33];let U;e[34]!==n||e[35]!==z||e[36]!==m||e[37]!==y?(U=m&&d.jsx(ue,{c:n,children:y(z?"delete":"settings.moveToTrash")}),e[34]=n,e[35]=z,e[36]=m,e[37]=y,e[38]=U):U=e[38];let W;e[39]!==k||e[40]!==E||e[41]!==H||e[42]!==i||e[43]!==a||e[44]!==l||e[45]!==q||e[46]!==U?(W=d.jsx(Dt.Target,{children:d.jsxs(Ve,{...i,variant:"subtle",size:l,radius:a,onMouseDown:hot,onDoubleClick:mot,onMouseEnter:E,onMouseLeave:k,onClick:H,styles:i.styles,children:[q,U]})}),e[39]=k,e[40]=E,e[41]=H,e[42]=i,e[43]=a,e[44]=l,e[45]=q,e[46]=U,e[47]=W):W=e[47];let Y;e[48]===Symbol.for("react.memo_cache_sentinel")?(Y={pointerEvents:"none"},e[48]=Y):Y=e[48];let G;e[49]!==z||e[50]!==y?(G=y(z?"delete":"settings.moveToTrash"),e[49]=z,e[50]=y,e[51]=G):G=e[51];let K;e[52]!==G?(K=d.jsx(Dt.Dropdown,{style:Y,children:d.jsx(ue,{c:"#fff",fz:12,children:G})}),e[52]=G,e[53]=K):K=e[53];let Q;return e[54]!==w||e[55]!==W||e[56]!==K||e[57]!==$?(Q=d.jsxs(Dt,{disabled:$,position:"top",width:"auto",shadow:"md",opened:w,offset:4,styles:V,children:[W,K]}),e[54]=w,e[55]=W,e[56]=K,e[57]=$,e[58]=Q):Q=e[58],Q};function hot(t){return t.stopPropagation()}function mot(t){return t.stopPropagation()}const got=t=>{const e=me.c(54);let n,r,s,o,i,a,l,c,u,f,h,m;e[0]!==t?({folderId:r,messageId:i,isSelected:u,important:o,showTooltip:f,showLabel:h,width:m,height:s,color:n,size:c,radius:l,...a}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o,e[5]=i,e[6]=a,e[7]=l,e[8]=c,e[9]=u,e[10]=f,e[11]=h,e[12]=m):(n=e[1],r=e[2],s=e[3],o=e[4],i=e[5],a=e[6],l=e[7],c=e[8],u=e[9],f=e[10],h=e[11],m=e[12]);const y=f===void 0?!1:f,v=h===void 0?!1:h,{t:b}=Le(),[w,C]=Rs(!1),{close:k,open:E}=C,j=cs();let A;e[13]!==r||e[14]!==o||e[15]!==i?(A={messageId:i,folderId:r,important:o},e[13]=r,e[14]=o,e[15]=i,e[16]=A):A=e[16];const{toggleImportant:M}=soe(A),_=!y;let D;e[17]===Symbol.for("react.memo_cache_sentinel")?(D={dropdown:{backgroundColor:"var(--mantine-color-dark-7)",padding:"5px 10px",boxShadow:"none",border:"none"}},e[17]=D):D=e[17];let R;e[18]!==j||e[19]!==M?(R=U=>{j(Dr()),M(U)},e[18]=j,e[19]=M,e[20]=R):R=e[20];const N=o?"var(--mantine-color-red-6)":"",z=o?"var(--mantine-color-red-6)":"";let B;e[21]!==z||e[22]!==N?(B={stroke:N,fill:z},e[21]=z,e[22]=N,e[23]=B):B=e[23];let L;e[24]!==n||e[25]!==s||e[26]!==B||e[27]!==m?(L=d.jsx(Ku,{width:m,height:s,stroke:1.5,color:n,style:B}),e[24]=n,e[25]=s,e[26]=B,e[27]=m,e[28]=L):L=e[28];let P;e[29]!==n||e[30]!==o||e[31]!==v||e[32]!==b?(P=v&&d.jsx(ue,{c:n,children:b(o?"markAsUnImportant":"markAsImportant")}),e[29]=n,e[30]=o,e[31]=v,e[32]=b,e[33]=P):P=e[33];let I;e[34]!==k||e[35]!==E||e[36]!==a||e[37]!==l||e[38]!==c||e[39]!==L||e[40]!==P||e[41]!==R?(I=d.jsx(Dt.Target,{children:d.jsxs(Ve,{...a,size:c,variant:"subtle",radius:l,onMouseDown:yot,onDoubleClick:vot,onMouseEnter:E,onMouseLeave:k,onClick:R,styles:a.styles,children:[L,P]})}),e[34]=k,e[35]=E,e[36]=a,e[37]=l,e[38]=c,e[39]=L,e[40]=P,e[41]=R,e[42]=I):I=e[42];let H;e[43]===Symbol.for("react.memo_cache_sentinel")?(H={pointerEvents:"none"},e[43]=H):H=e[43];let $;e[44]!==o||e[45]!==b?($=b(o?"markAsUnImportant":"markAsImportant"),e[44]=o,e[45]=b,e[46]=$):$=e[46];let V;e[47]!==$?(V=d.jsx(Dt.Dropdown,{style:H,children:d.jsx(ue,{c:"#fff",fz:12,children:$})}),e[47]=$,e[48]=V):V=e[48];let q;return e[49]!==w||e[50]!==I||e[51]!==V||e[52]!==_?(q=d.jsxs(Dt,{disabled:_,position:"top",width:"auto",shadow:"md",opened:w,offset:4,styles:D,children:[I,V]}),e[49]=w,e[50]=I,e[51]=V,e[52]=_,e[53]=q):q=e[53],q};function yot(t){return t.stopPropagation()}function vot(t){return t.stopPropagation()}function bot({folderId:t,messageId:e,newWasRead:n,stopPropagation:r=!0,withLoading:s=!1}){const o=zt(),[i,a]=S.useState(!1);return{handleToggleRead:S.useCallback(async c=>{r&&c&&c.stopPropagation();try{s&&a(!0),o(Vu({Id:e,WasRead:n})),await o(P2({folderId:t,Ids:[e],WasRead:n})),o(n?fc(1):sS({count:1,folderId:t}))}finally{s&&a(!1)}},[o,t,e,n,r,s]),isLoading:i}}const xot=t=>{const e=me.c(50);let n,r,s,o,i,a,l,c,u,f,h;if(e[0]!==t){const{folderId:$,messageId:V,isSelected:q,wasRead:U,showTooltip:W,showLabel:Y,width:G,height:K,color:Q,size:Z,radius:J,...ne}=t;r=$,o=V,f=U,c=W,u=Y,h=G,s=K,n=Q,l=Z,a=J,i=ne,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o,e[5]=i,e[6]=a,e[7]=l,e[8]=c,e[9]=u,e[10]=f,e[11]=h}else n=e[1],r=e[2],s=e[3],o=e[4],i=e[5],a=e[6],l=e[7],c=e[8],u=e[9],f=e[10],h=e[11];const m=c===void 0?!1:c,y=u===void 0?!1:u,{t:v}=Le(),[b,w]=Rs(!1),{close:C,open:k}=w,E=cs(),j=!f;let A;e[12]!==r||e[13]!==o||e[14]!==j?(A={folderId:r,messageId:o,newWasRead:j},e[12]=r,e[13]=o,e[14]=j,e[15]=A):A=e[15];const{handleToggleRead:M}=bot(A),_=!m;let D;e[16]===Symbol.for("react.memo_cache_sentinel")?(D={dropdown:{backgroundColor:"var(--mantine-color-dark-7)",padding:"5px 10px",boxShadow:"none",border:"none"}},e[16]=D):D=e[16];let R;e[17]!==E||e[18]!==M?(R=$=>{E(Dr()),M($)},e[17]=E,e[18]=M,e[19]=R):R=e[19];let N;e[20]!==n||e[21]!==s||e[22]!==f||e[23]!==h?(N=f?d.jsx(kf,{width:h,height:s,stroke:1.5,color:n}):d.jsx(nx,{width:h,height:s,stroke:1.5,color:n}),e[20]=n,e[21]=s,e[22]=f,e[23]=h,e[24]=N):N=e[24];let z;e[25]!==n||e[26]!==y||e[27]!==v||e[28]!==f?(z=y&&d.jsxs(ue,{c:n,children:[" ",v(f?"markAsUnread":"markAsRead")]}),e[25]=n,e[26]=y,e[27]=v,e[28]=f,e[29]=z):z=e[29];let B;e[30]!==C||e[31]!==k||e[32]!==i||e[33]!==a||e[34]!==l||e[35]!==z||e[36]!==R||e[37]!==N?(B=d.jsx(Dt.Target,{children:d.jsxs(Ve,{...i,variant:"subtle",size:l,radius:a,onMouseDown:wot,onDoubleClick:Sot,onMouseEnter:k,onMouseLeave:C,onClick:R,styles:i.styles,children:[N,z]})}),e[30]=C,e[31]=k,e[32]=i,e[33]=a,e[34]=l,e[35]=z,e[36]=R,e[37]=N,e[38]=B):B=e[38];let L;e[39]===Symbol.for("react.memo_cache_sentinel")?(L={pointerEvents:"none"},e[39]=L):L=e[39];let P;e[40]!==v||e[41]!==f?(P=v(f?"markAsUnread":"markAsRead"),e[40]=v,e[41]=f,e[42]=P):P=e[42];let I;e[43]!==P?(I=d.jsx(Dt.Dropdown,{style:L,children:d.jsx(ue,{c:"#fff",fz:12,children:P})}),e[43]=P,e[44]=I):I=e[44];let H;return e[45]!==b||e[46]!==B||e[47]!==I||e[48]!==_?(H=d.jsxs(Dt,{disabled:_,position:"top",width:"auto",shadow:"md",opened:b,offset:4,styles:D,children:[B,I]}),e[45]=b,e[46]=B,e[47]=I,e[48]=_,e[49]=H):H=e[49],H};function wot(t){return t.stopPropagation()}function Sot(t){return t.stopPropagation()}const Cot="_checkbox_w6pta_1",kot="_short_w6pta_9",Eot="_long_w6pta_13",Tot="_card_w6pta_17",Mot="_cardTitle_w6pta_23",jot="_cardTitleBlock_w6pta_30",Aot="_titleTooltip_w6pta_42",_ot="_title_w6pta_42",Rot="_draft_w6pta_61",Dot="_infoIconsBlock_w6pta_65",Iot="_hoverIconsContainer_w6pta_71",Oot="_cardBody_w6pta_80",Not="_longCardBody_w6pta_87",Lot="_shortCardBody_w6pta_94",$ot="_subject_w6pta_102",Fot="_date_w6pta_113",zot="_dateWithSendTime_w6pta_122",Pot="_body_w6pta_126",Bot="_dateBlock_w6pta_138",Hot="_dateBlockIcon_w6pta_146",tr={checkbox:Cot,short:kot,long:Eot,card:Tot,cardTitle:Mot,cardTitleBlock:jot,titleTooltip:Aot,title:_ot,draft:Rot,infoIconsBlock:Dot,hoverIconsContainer:Iot,cardBody:Oot,longCardBody:Not,shortCardBody:Lot,subject:$ot,date:Fot,dateWithSendTime:zot,body:Pot,dateBlock:Bot,dateBlockIcon:Hot},sae=S.memo(t=>{const e=me.c(63),{id:n,folderId:r,important:s,isSelected:o,isHovered:i,wasRead:a,isOutbox:l}=t,c=wn(),u=re(zr);let f;if(e[0]!==r||e[1]!==u){let B;e[3]!==r?(B=L=>L.Id===r,e[3]=r,e[4]=B):B=e[4],f=u.find(B),e[0]=r,e[1]=u,e[2]=f}else f=e[2];const h=f,m=(h==null?void 0:h.Type)===Je.ARCHIVE,{isOpened:y}=re(Td);let v;e[5]!==c.pathname?(v=py(c.pathname),e[5]=c.pathname,e[6]=v):v=e[6];const b=v==="labels";let w;e[7]!==y||e[8]!==o?(w=bb(o,y),e[7]=y,e[8]=o,e[9]=w):w=e[9];let C;e[10]!==r||e[11]!==n||e[12]!==o||e[13]!==w?(C=d.jsx(pot,{messageId:n,isSelected:o,folderId:r,styles:w,width:16,height:16,color:"#818DA1",size:30,radius:"100px",showTooltip:!0,showLabel:!1},"delete"),e[10]=r,e[11]=n,e[12]=o,e[13]=w,e[14]=C):C=e[14];let k;if(e[15]!==r||e[16]!==n||e[17]!==s||e[18]!==m||e[19]!==b||e[20]!==y||e[21]!==l||e[22]!==o||e[23]!==C||e[24]!==a){if(k=[C],!m&&!l&&!b){let B;e[26]!==y||e[27]!==o?(B=bb(o,y),e[26]=y,e[27]=o,e[28]=B):B=e[28];let L;e[29]!==r||e[30]!==n||e[31]!==o||e[32]!==B?(L=d.jsx(cot,{folderId:r,messageId:n,isSelected:o,styles:B,width:16,height:16,color:"#818DA1",size:30,radius:"100px",showTooltip:!0,showLabel:!1},"archive"),e[29]=r,e[30]=n,e[31]=o,e[32]=B,e[33]=L):L=e[33],k.push(L)}if(!l){let B;e[34]!==y||e[35]!==o?(B=bb(o,y),e[34]=y,e[35]=o,e[36]=B):B=e[36];let L;e[37]!==r||e[38]!==n||e[39]!==o||e[40]!==B||e[41]!==a?(L=d.jsx(xot,{folderId:r,messageId:n,isSelected:o,wasRead:a,styles:B,width:16,height:16,color:"#818DA1",size:30,radius:"100px",showTooltip:!0,showLabel:!1},"read"),e[37]=r,e[38]=n,e[39]=o,e[40]=B,e[41]=a,e[42]=L):L=e[42],k.push(L)}if(!l){let B;e[43]!==y||e[44]!==o?(B=bb(o,y),e[43]=y,e[44]=o,e[45]=B):B=e[45];let L;e[46]!==r||e[47]!==n||e[48]!==s||e[49]!==o||e[50]!==B?(L=d.jsx(got,{folderId:r,messageId:n,isSelected:o,important:s,styles:B,width:16,height:16,color:"#818DA1",size:30,radius:"100px",showTooltip:!0,showLabel:!1},"important"),e[46]=r,e[47]=n,e[48]=s,e[49]=o,e[50]=B,e[51]=L):L=e[51],k.push(L)}e[15]=r,e[16]=n,e[17]=s,e[18]=m,e[19]=b,e[20]=y,e[21]=l,e[22]=o,e[23]=C,e[24]=a,e[25]=k}else k=e[25];const E=k,j=E.length*30,A=i?j:0,M=i?"auto":"none";let _;e[52]!==M?(_={flexShrink:0,pointerEvents:M},e[52]=M,e[53]=_):_=e[53];const D=i?1:0;let R;e[54]!==D?(R={opacity:D},e[54]=D,e[55]=R):R=e[55];let N;e[56]!==E||e[57]!==R?(N=d.jsx(ie,{className:tr.hoverIconsContainer,style:R,children:E}),e[56]=E,e[57]=R,e[58]=N):N=e[58];let z;return e[59]!==N||e[60]!==A||e[61]!==_?(z=d.jsx(ve,{className:tr.infoIconsBlock,gap:0,w:A,pos:"relative",style:_,children:N}),e[59]=N,e[60]=A,e[61]=_,e[62]=z):z=e[62],z}),Uot="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%23A9B4C6'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'%20class='icon%20icon-tabler%20icons-tabler-outline%20icon-tabler-calendar-due'%3e%3cpath%20stroke='none'%20d='M0%200h24v24H0z'%20fill='none'/%3e%3cpath%20d='M4%205m0%202a2%202%200%200%201%202%20-2h12a2%202%200%200%201%202%202v12a2%202%200%200%201%20-2%202h-12a2%202%200%200%201%20-2%20-2z'%20/%3e%3cpath%20d='M16%203v4'%20/%3e%3cpath%20d='M8%203v4'%20/%3e%3cpath%20d='M4%2011h16'%20/%3e%3c/svg%3e",_Y=t=>{const{t:e}=Le();switch(t){case 0:return`${e("calendarIntegration.tooltipEventsMessage.null")}`;case 1:return`${e("calendarIntegration.tooltipEventsMessage.new")}`;case 2:return`${e("calendarIntegration.tooltipEventsMessage.canceled")}`;case 3:return`${e("calendarIntegration.tooltipEventsMessage.accepted")}`;case 4:return`${e("calendarIntegration.tooltipEventsMessage.denied")}`;case 5:return`${e("calendarIntegration.tooltipEventsMessage.pending")}`;case 6:return`${e("calendarIntegration.tooltipEventsMessage.outdated")}`}},Vot=t=>{const e=me.c(22);let n,r,s;e[0]!==t?({status:r,iconSize:s,...n}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s):(n=e[1],r=e[2],s=e[3]);const o=s===void 0?16:s;let i;e[4]===Symbol.for("react.memo_cache_sentinel")?(i={0:null,1:y5e,2:p5e,3:m5e,4:w5e,5:b5e,6:"img"},e[4]=i):i=e[4];const l=i[r];if(r===0)return null;if(r===6){let m;e[5]!==r?(m=_Y(r),e[5]=r,e[6]=m):m=e[6];let y;e[7]!==n||e[8]!==o?(y=d.jsx(ie,{component:"img",src:Uot,width:o,height:o,alt:"Outdated",...n}),e[7]=n,e[8]=o,e[9]=y):y=e[9];let v;return e[10]!==m||e[11]!==y?(v=d.jsx(on,{label:m,position:"top-start",children:y}),e[10]=m,e[11]=y,e[12]=v):v=e[12],v}let c;e[13]!==r?(c=_Y(r),e[13]=r,e[14]=c):c=e[14];const u=l;let f;e[15]!==n||e[16]!==o||e[17]!==u?(f=d.jsx(ie,{component:u,strokeWidth:1.5,width:o,height:o,color:"#A9B4C6",...n}),e[15]=n,e[16]=o,e[17]=u,e[18]=f):f=e[18];let h;return e[19]!==c||e[20]!==f?(h=d.jsx(on,{label:c,position:"top-start",children:f}),e[19]=c,e[20]=f,e[21]=h):h=e[21],h},oae=t=>{const e=me.c(13),{important:n,hasAttachments:r,inviteStatus:s,isHovered:o}=t,i=o?"none":"flex";let a;e[0]!==i?(a={flexShrink:0,display:i},e[0]=i,e[1]=a):a=e[1];let l;e[2]!==s?(l=s?d.jsx(xe,{align:"center",justify:"center",w:30,h:30,children:d.jsx(Vot,{status:s})}):null,e[2]=s,e[3]=l):l=e[3];let c;e[4]!==r?(c=r?d.jsx(xe,{align:"center",justify:"center",w:30,h:30,children:d.jsx(D2,{strokeWidth:1.5,string:1.5,height:16,width:16,color:"#A9B4C6"})}):null,e[4]=r,e[5]=c):c=e[5];let u;e[6]!==n?(u=n?d.jsx(xe,{align:"center",justify:"center",w:30,h:30,children:d.jsx(Ku,{width:16,height:16,stroke:1.5,color:"#818DA1",style:{stroke:n?"var(--mantine-color-red-6)":"",fill:n?"var(--mantine-color-red-6)":""}})}):null,e[6]=n,e[7]=u):u=e[7];let f;return e[8]!==a||e[9]!==l||e[10]!==c||e[11]!==u?(f=d.jsxs(ve,{className:tr.infoIconsBlock,gap:0,w:"unset",h:16,pos:"relative",style:a,children:[l,c,u]}),e[8]=a,e[9]=l,e[10]=c,e[11]=u,e[12]=f):f=e[12],f},qot=S.memo(t=>{var ae;const e=me.c(134),{title:n,id:r,folderId:s,contactEmail:o,recipients:i,messageFolderLabel:a,messageSubject:l,formattedDate:c,body:u,wasRead:f,isChecked:h,isDraftFolder:m,hasChildren:y,hasAttachments:v,important:b,labels:w,onCheck:C,onRangeSelect:k,inviteStatus:E,isHovered:j,isSelected:A,messagesWithSendTime:M,contactCardRef:_,contactCardDisabled:D,isSnoozedMessage:R}=t,{t:N}=Le(),z=cs(),B=wn(),{pathname:L}=B,{read:P}=Ol(),I=ts(),{isOpened:H}=re(Td);let $;e[0]!==L?($=L.includes("search"),e[0]=L,e[1]=$):$=e[1];const V=$,q=S.useRef(!1),{highlightStrings:U}=br(Wot),W=re(mr),Y=re(sp),G=re(Dn);let K;e[2]!==G[0].Id?(K=de=>jd(de,G[0].Id),e[2]=G[0].Id,e[3]=K):K=e[3];const Q=br(K);let Z;e[4]!==o?(Z=o?cr(o):{email:""},e[4]=o,e[5]=Z):Z=e[5];const{email:J}=Z,ne=NS(s);let se;e[6]!==I||e[7]!==s||e[8]!==Y?(se=I2(I,Y,s),e[6]=I,e[7]=s,e[8]=Y,e[9]=se):se=e[9];const ce=se,fe=M||R;let le;e[10]!==U||e[11]!==m||e[12]!==W.SearchContext.Labels?(le=BD(U,W.SearchContext.Labels,m),e[10]=U,e[11]=m,e[12]=W.SearchContext.Labels,e[13]=le):le=e[13];const be=le;let je,pe,_e,Ce,Te,Ae,Ze,He,lt,Ye,ge,Fe,Se;if(e[14]!==D||e[15]!==_||e[16]!==z||e[17]!==J||e[18]!==U||e[19]!==h||e[20]!==m||e[21]!==H||e[22]!==C||e[23]!==k||e[24]!==i||e[25]!==ne||e[26]!==N||e[27]!==n||e[28]!==f){const de=i.slice(0,2);Ce=i.length-de.length;let Ee;e[42]===Symbol.for("react.memo_cache_sentinel")?(Ee={input:{cursor:"pointer"}},e[42]=Ee):Ee=e[42];let De;e[43]!==k?(De=mt=>{mt.stopPropagation(),mt.shiftKey&&(mt.preventDefault(),q.current=!0,k())},e[43]=k,e[44]=De):De=e[44];let Qe;e[45]!==z||e[46]!==H||e[47]!==C?(Qe=()=>{if(q.current){q.current=!1;return}C(),H&&z(Dr())},e[45]=z,e[46]=H,e[47]=C,e[48]=Qe):Qe=e[48],e[49]!==h||e[50]!==De||e[51]!==Qe?(lt=d.jsx(Or,{checked:h,size:"xs",className:`${tr.checkbox} ${tr.long}`,styles:Ee,onMouseDown:De,onClick:Yot,onDoubleClick:Got,onKeyDown:Kot,onPointerDown:Xot,onChange:Qe}),e[49]=h,e[50]=De,e[51]=Qe,e[52]=lt):lt=e[52],_e=ie,Ze=tr.card,e[53]===Symbol.for("react.memo_cache_sentinel")?(He={display:"flex",alignItems:"center"},e[53]=He):He=e[53],pe=ve,Ae=tr.cardTitleBlock,je=xe,Ye=2,ge="fit-content",Fe="inherit",Se="center",Te=m?d.jsx(ue,{c:"red",children:N("draft")}):d.jsx("div",{style:{display:"flex",alignItems:"center",gap:"5px",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:ne?d.jsxs(d.Fragment,{children:[d.jsx("span",{style:{color:"#31394A",fontSize:"14px"},children:"Кому: "}),de.map((mt,rt)=>d.jsxs("span",{style:{display:"inline-flex",alignItems:"center",overflow:de.length===1?"hidden":"",textOverflow:de.length===1?"ellipsis":""},children:[d.jsx(Oo,{ref:_,itemEmail:mt.email,itemTitle:mt.email,overflow:"hidden",disabled:D,children:d.jsx(Mo,{fw:f?400:700,lh:"18px",c:"#31394A",className:tr.title,highlight:U,truncate:!0,children:mt.label})}),rt<de.length-1?", ":""]},rt))]}):d.jsx(Oo,{ref:_,itemEmail:J,itemTitle:ne?"":n,overflow:"hidden",disabled:D,children:d.jsx(Mo,{fw:f?400:700,lh:"18px",c:"#31394A",className:tr.title,highlight:U,truncate:!0,children:n})})}),e[14]=D,e[15]=_,e[16]=z,e[17]=J,e[18]=U,e[19]=h,e[20]=m,e[21]=H,e[22]=C,e[23]=k,e[24]=i,e[25]=ne,e[26]=N,e[27]=n,e[28]=f,e[29]=je,e[30]=pe,e[31]=_e,e[32]=Ce,e[33]=Te,e[34]=Ae,e[35]=Ze,e[36]=He,e[37]=lt,e[38]=Ye,e[39]=ge,e[40]=Fe,e[41]=Se}else je=e[29],pe=e[30],_e=e[31],Ce=e[32],Te=e[33],Ae=e[34],Ze=e[35],He=e[36],lt=e[37],Ye=e[38],ge=e[39],Fe=e[40],Se=e[41];let qe;e[54]!==Ce||e[55]!==ne?(qe=ne&&Ce>0&&d.jsx("span",{style:{flex:"0 0 auto",fontSize:14,color:"#31394A"},children:"…"}),e[54]=Ce,e[55]=ne,e[56]=qe):qe=e[56];let ot;e[57]!==y||e[58]!==Q?(ot=y&&((ae=Q.Struct)==null?void 0:ae.ShowThreads)&&d.jsx("img",{src:rae,height:14,width:14,alt:"In conversation"}),e[57]=y,e[58]=Q,e[59]=ot):ot=e[59];let $e;e[60]!==je||e[61]!==Te||e[62]!==qe||e[63]!==ot||e[64]!==Ye||e[65]!==ge||e[66]!==Fe||e[67]!==Se?($e=d.jsxs(je,{gap:Ye,w:ge,maw:Fe,align:Se,children:[Te,qe,ot]}),e[60]=je,e[61]=Te,e[62]=qe,e[63]=ot,e[64]=Ye,e[65]=ge,e[66]=Fe,e[67]=Se,e[68]=$e):$e=e[68];let pt;e[69]!==pe||e[70]!==Ae||e[71]!==$e?(pt=d.jsx(pe,{className:Ae,children:$e}),e[69]=pe,e[70]=Ae,e[71]=$e,e[72]=pt):pt=e[72];let gt;e[73]!==V||e[74]!==a||e[75]!==be?(gt=V&&be&&d.jsx(on,{position:"bottom-start",label:d.jsx("div",{className:tr.titleTooltip,children:a}),pos:"fixed",zIndex:1,children:d.jsx(Bc,{variant:"light",color:"gray",sx:PD,children:d.jsx(ue,{truncate:"end",lineClamp:1,fz:10,fw:500,sx:{display:"block",lineHeight:"20px",textTransform:"uppercase"},children:a})})}),e[73]=V,e[74]=a,e[75]=be,e[76]=gt):gt=e[76];const Pt=f?400:600,at=f?"#424950":"#343A40",nt=f?400:600;let We;e[77]!==l||e[78]!==N?(We=l||`(${N("noTheme")})`,e[77]=l,e[78]=N,e[79]=We):We=e[79];let At;e[80]!==U||e[81]!==at||e[82]!==nt||e[83]!==We?(At=d.jsx(Mo,{c:at,fw:nt,display:"inline",lh:"18px",fz:"14px",truncate:!0,highlight:U,children:We}),e[80]=U,e[81]=at,e[82]=nt,e[83]=We,e[84]=At):At=e[84];const St=u?` — ${u}`:"";let Ot;e[85]!==U||e[86]!==St?(Ot=d.jsx(Mo,{className:`${tr.body} ${tr.long}`,c:"#848E9C",lineClamp:1,highlight:U,children:St}),e[85]=U,e[86]=St,e[87]=Ot):Ot=e[87];let Tt;e[88]!==Pt||e[89]!==At||e[90]!==Ot?(Tt=d.jsxs(ue,{className:`${tr.subject} ${tr.long}`,fw:Pt,c:"dimmed",component:"div",truncate:!0,children:[At,Ot]}),e[88]=Pt,e[89]=At,e[90]=Ot,e[91]=Tt):Tt=e[91];let kt;e[92]!==w||e[93]!==gt||e[94]!==Tt?(kt=d.jsxs(ve,{className:tr.longCardBody,children:[gt,w,Tt]}),e[92]=w,e[93]=gt,e[94]=Tt,e[95]=kt):kt=e[95];let jt;e[96]!==s||e[97]!==r||e[98]!==b||e[99]!==j||e[100]!==ce||e[101]!==A||e[102]!==P||e[103]!==f?(jt=d.jsx(sae,{isHovered:j,isOutbox:ce,important:b,isSelected:A,read:P,id:r,folderId:s,wasRead:f}),e[96]=s,e[97]=r,e[98]=b,e[99]=j,e[100]=ce,e[101]=A,e[102]=P,e[103]=f,e[104]=jt):jt=e[104];let vt;e[105]!==v||e[106]!==b||e[107]!==E||e[108]!==j?(vt=d.jsx(oae,{isHovered:j,important:b,inviteStatus:E,hasAttachments:v}),e[105]=v,e[106]=b,e[107]=E,e[108]=j,e[109]=vt):vt=e[109];const Yt=`${tr.dateBlock} ${fe?tr.dateBlockIcon:""}`;let Vt;e[110]!==fe?(Vt=fe&&d.jsx(xc,{color:"#339AF0",size:16,stroke:1.5}),e[110]=fe,e[111]=Vt):Vt=e[111];const Nt=`${tr.date} ${fe?tr.dateWithSendTime:""}`,Ht=c.length>9?"10px":"12px";let cn;e[112]!==c||e[113]!==Nt||e[114]!==Ht?(cn=d.jsx(ue,{className:Nt,fw:400,c:"#818DA1",size:Ht,children:c}),e[112]=c,e[113]=Nt,e[114]=Ht,e[115]=cn):cn=e[115];let qt;e[116]!==Yt||e[117]!==Vt||e[118]!==cn?(qt=d.jsxs(ve,{className:Yt,children:[Vt,cn]}),e[116]=Yt,e[117]=Vt,e[118]=cn,e[119]=qt):qt=e[119];let Kt;e[120]!==jt||e[121]!==vt||e[122]!==qt?(Kt=d.jsxs(xe,{ml:20,children:[jt,vt,qt]}),e[120]=jt,e[121]=vt,e[122]=qt,e[123]=Kt):Kt=e[123];let yn;e[124]!==_e||e[125]!==Ze||e[126]!==He||e[127]!==pt||e[128]!==kt||e[129]!==Kt?(yn=d.jsxs(_e,{className:Ze,sx:He,children:[pt,kt,Kt]}),e[124]=_e,e[125]=Ze,e[126]=He,e[127]=pt,e[128]=kt,e[129]=Kt,e[130]=yn):yn=e[130];let ee;return e[131]!==lt||e[132]!==yn?(ee=d.jsxs(d.Fragment,{children:[lt,yn]}),e[131]=lt,e[132]=yn,e[133]=ee):ee=e[133],ee});function Wot(t){return t.search}function Yot(t){t.stopPropagation()}function Got(t){return t.stopPropagation()}function Kot(t){return t.stopPropagation()}function Xot(t){return t.stopPropagation()}const Zot=S.memo(t=>{var Yt;const e=me.c(102),{title:n,id:r,folderId:s,contactEmail:o,recipients:i,messageFolderLabel:a,messageSubject:l,formattedDate:c,body:u,wasRead:f,isChecked:h,isDraftFolder:m,hasChildren:y,hasAttachments:v,important:b,labels:w,onCheck:C,onRangeSelect:k,inviteStatus:E,isHovered:j,isSelected:A,messagesWithSendTime:M,contactCardRef:_,contactCardDisabled:D,isSnoozedMessage:R}=t,{t:N}=Le(),z=cs(),B=wn(),{read:L}=Ol(),P=ts(),{isOpened:I}=re(Td),{pathname:H}=B;let $;e[0]!==H?($=H.includes("search"),e[0]=H,e[1]=$):$=e[1];const V=$,q=S.useRef(!1),{highlightStrings:U}=br(Qot),W=re(mr),Y=re(sp),G=NS(s);let K;e[2]!==P||e[3]!==s||e[4]!==Y?(K=I2(P,Y,s),e[2]=P,e[3]=s,e[4]=Y,e[5]=K):K=e[5];const Q=K,Z=re(Dn);let J;e[6]!==Z[0].Id?(J=Vt=>jd(Vt,Z[0].Id),e[6]=Z[0].Id,e[7]=J):J=e[7];const ne=br(J),se=M||R;let ce;e[8]!==o?(ce=o?cr(o):{email:""},e[8]=o,e[9]=ce):ce=e[9];const{email:fe}=ce;let le;e[10]!==U||e[11]!==m||e[12]!==W.SearchContext.Labels?(le=BD(U,W.SearchContext.Labels,m),e[10]=U,e[11]=m,e[12]=W.SearchContext.Labels,e[13]=le):le=e[13];const be=le;let je;e[14]!==i?(je=i.slice(0,3),e[14]=i,e[15]=je):je=e[15];const pe=je,_e=i.length-pe.length;let Ce;e[16]===Symbol.for("react.memo_cache_sentinel")?(Ce={input:{cursor:"pointer"}},e[16]=Ce):Ce=e[16];let Te;e[17]!==k?(Te=Vt=>{Vt.stopPropagation(),Vt.shiftKey&&(Vt.preventDefault(),q.current=!0,k())},e[17]=k,e[18]=Te):Te=e[18];let Ae;e[19]!==z||e[20]!==I||e[21]!==C?(Ae=()=>{if(q.current){q.current=!1;return}C(),I&&z(Dr())},e[19]=z,e[20]=I,e[21]=C,e[22]=Ae):Ae=e[22];let Ze;e[23]!==h||e[24]!==Te||e[25]!==Ae?(Ze=d.jsx(Or,{checked:h,size:"xs",className:`${tr.checkbox} ${tr.short}`,styles:Ce,onMouseDown:Te,onClick:Jot,onDoubleClick:eit,onKeyDown:tit,onPointerDown:nit,onChange:Ae}),e[23]=h,e[24]=Te,e[25]=Ae,e[26]=Ze):Ze=e[26];let He;e[27]!==D||e[28]!==_||e[29]!==fe||e[30]!==U||e[31]!==m||e[32]!==i||e[33]!==G||e[34]!==N||e[35]!==n||e[36]!==pe.length||e[37]!==f?(He=m?d.jsx(ue,{className:tr.draft,c:"red",children:N("draft")}):d.jsx("div",{style:{display:"flex",alignItems:"center",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",gap:"5px"},children:G?d.jsxs(d.Fragment,{children:[d.jsx("span",{style:{color:"#31394A",fontSize:"14px"},children:"Кому: "}),i.map((Vt,Nt)=>d.jsxs("span",{style:{display:"inline-flex",alignItems:"center",overflow:pe.length===1?"hidden":"",textOverflow:pe.length===1?"ellipsis":""},children:[d.jsx(Oo,{ref:_,itemEmail:Vt.email,itemTitle:Vt.email,overflow:"hidden",disabled:D,children:d.jsx(Mo,{fw:f?400:700,lh:"18px",c:"#31394A",className:tr.title,highlight:U,truncate:!0,children:Vt.label})}),Nt<pe.length-1?", ":""]},Nt))]}):d.jsx(Oo,{ref:_,itemEmail:fe,itemTitle:G?"":n,overflow:"hidden",disabled:D,children:d.jsx(Mo,{fw:f?400:600,sx:{display:"block",whiteSpace:"nowrap"},highlight:U,lh:"18px",c:"#31394A",truncate:!0,children:n})})}),e[27]=D,e[28]=_,e[29]=fe,e[30]=U,e[31]=m,e[32]=i,e[33]=G,e[34]=N,e[35]=n,e[36]=pe.length,e[37]=f,e[38]=He):He=e[38];let lt;e[39]!==_e||e[40]!==G?(lt=G&&_e>0&&d.jsx("span",{style:{flex:"0 0 auto",fontSize:14,color:"#31394A"},children:"…"}),e[39]=_e,e[40]=G,e[41]=lt):lt=e[41];let Ye;e[42]!==y||e[43]!==ne?(Ye=y&&((Yt=ne.Struct)==null?void 0:Yt.ShowThreads)&&d.jsx("img",{src:rae,height:14,width:14,alt:"In conversation"}),e[42]=y,e[43]=ne,e[44]=Ye):Ye=e[44];let ge;e[45]!==s||e[46]!==r||e[47]!==b||e[48]!==j||e[49]!==Q||e[50]!==A||e[51]!==L||e[52]!==f?(ge=d.jsx(sae,{isHovered:j,isOutbox:Q,important:b,isSelected:A,read:L,id:r,folderId:s,wasRead:f}),e[45]=s,e[46]=r,e[47]=b,e[48]=j,e[49]=Q,e[50]=A,e[51]=L,e[52]=f,e[53]=ge):ge=e[53];let Fe;e[54]!==v||e[55]!==b||e[56]!==E||e[57]!==j?(Fe=d.jsx(oae,{isHovered:j,important:b,inviteStatus:E,hasAttachments:v}),e[54]=v,e[55]=b,e[56]=E,e[57]=j,e[58]=Fe):Fe=e[58];let Se;e[59]!==He||e[60]!==lt||e[61]!==Ye||e[62]!==ge||e[63]!==Fe?(Se=d.jsxs(ve,{className:tr.cardTitle,children:[He,lt,Ye,ge,Fe]}),e[59]=He,e[60]=lt,e[61]=Ye,e[62]=ge,e[63]=Fe,e[64]=Se):Se=e[64];let qe;e[65]===Symbol.for("react.memo_cache_sentinel")?(qe={display:"block",whiteSpace:"nowrap"},e[65]=qe):qe=e[65];const ot=f?400:600;let $e;e[66]!==l||e[67]!==N?($e=l||`(${N("noTheme")})`,e[66]=l,e[67]=N,e[68]=$e):$e=e[68];let pt;e[69]!==U||e[70]!==ot||e[71]!==$e?(pt=d.jsx(Mo,{sx:qe,fw:ot,lh:"18px",c:"#31394A",fz:"14px",truncate:!0,highlight:U,children:$e}),e[69]=U,e[70]=ot,e[71]=$e,e[72]=pt):pt=e[72];let gt;e[73]!==se?(gt=se&&d.jsx(xc,{color:"#339AF0",size:16,stroke:1.5}),e[73]=se,e[74]=gt):gt=e[74];const Pt=`${tr.date} ${se?tr.dateWithSendTime:""}`,at=se?5:0;let nt;e[75]!==c||e[76]!==Pt||e[77]!==at?(nt=d.jsx(ue,{className:Pt,ml:at,children:c}),e[75]=c,e[76]=Pt,e[77]=at,e[78]=nt):nt=e[78];let We;e[79]!==gt||e[80]!==nt?(We=d.jsxs(xe,{children:[gt,nt]}),e[79]=gt,e[80]=nt,e[81]=We):We=e[81];let At;e[82]!==pt||e[83]!==We?(At=d.jsxs(ve,{className:tr.cardBody,children:[pt,We]}),e[82]=pt,e[83]=We,e[84]=At):At=e[84];let St;e[85]===Symbol.for("react.memo_cache_sentinel")?(St={display:"block",whiteSpace:"nowrap"},e[85]=St):St=e[85];const Ot=u||"";let Tt;e[86]!==U||e[87]!==Ot?(Tt=d.jsx(xe,{justify:"space-between",h:"18px",align:"center",children:d.jsx(Mo,{sx:St,fz:"14px",c:"dimmed",lineClamp:1,lh:"18px",fw:400,highlight:U,children:Ot})}),e[86]=U,e[87]=Ot,e[88]=Tt):Tt=e[88];let kt;e[89]!==V||e[90]!==w||e[91]!==a||e[92]!==be?(kt=V&&be||w?d.jsxs(ve,{className:tr.shortCardBody,children:[V&&be&&d.jsx(on,{position:"bottom-start",label:d.jsx("div",{className:tr.titleTooltip,children:a}),pos:"fixed",zIndex:1,children:d.jsx(Bc,{variant:"light",color:"gray",sx:PD,children:d.jsx(ue,{truncate:"end",lineClamp:1,fz:10,fw:500,sx:{display:"block",lineHeight:"20px",textTransform:"uppercase"},children:a})})}),w&&d.jsx(ie,{children:w})]}):null,e[89]=V,e[90]=w,e[91]=a,e[92]=be,e[93]=kt):kt=e[93];let jt;e[94]!==Se||e[95]!==At||e[96]!==Tt||e[97]!==kt?(jt=d.jsxs(ie,{pb:"12px",pt:"10px",className:tr.card,children:[Se,At,Tt,kt]}),e[94]=Se,e[95]=At,e[96]=Tt,e[97]=kt,e[98]=jt):jt=e[98];let vt;return e[99]!==Ze||e[100]!==jt?(vt=d.jsxs(d.Fragment,{children:[Ze,jt]}),e[99]=Ze,e[100]=jt,e[101]=vt):vt=e[101],vt});function Qot(t){return t.search}function Jot(t){t.stopPropagation()}function eit(t){return t.stopPropagation()}function tit(t){return t.stopPropagation()}function nit(t){return t.stopPropagation()}const rit=S.memo(t=>{const e=me.c(7);let n,r;e[0]!==t?({currentWidth:r,...n}=t,e[0]=t,e[1]=n,e[2]=r):(n=e[1],r=e[2]);const s=r===void 0?0:r,o=xt(1024);let i;return e[3]!==s||e[4]!==o||e[5]!==n?(i=s<600||o?d.jsx(Zot,{...n}):d.jsx(qot,{...n}),e[3]=s,e[4]=o,e[5]=n,e[6]=i):i=e[6],i}),iae=S.createContext({isResizing:!1,startResize:()=>{},stopResize:()=>{}}),sit=t=>{const e=me.c(7),{children:n}=t,[r,s]=S.useState(!1);let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=()=>s(!0),e[0]=o):o=e[0];const i=o;let a;e[1]===Symbol.for("react.memo_cache_sentinel")?(a=()=>s(!1),e[1]=a):a=e[1];const l=a;let c;e[2]!==r?(c={isResizing:r,startResize:i,stopResize:l},e[2]=r,e[3]=c):c=e[3];let u;return e[4]!==n||e[5]!==c?(u=d.jsx(iae.Provider,{value:c,children:n}),e[4]=n,e[5]=c,e[6]=u):u=e[6],u},aae=()=>S.useContext(iae),RY=S.memo(({message:t,isSelected:e,isChecked:n,checkedMessagesIds:r,clearSelection:s,onMessageClick:o,onMessageDoubleClick:i,onRangeSelect:a,onCheck:l,resetWatcher:c,currentWidth:u=0,messagesWithSendTime:f})=>{var He,lt,Ye;const h=wn(),m=cs(),{t:y}=Le(),{emailId:v}=sr(),b=re(X_),w=re(K_),C=re(oee),k=re(Dn),E=re(Ed),j=v?(C==null?void 0:C[Number(v)])===t.FolderId:C?Object.values(C).includes(t.FolderId):!1,A=re(KTe),M=re(Bm),_=re(zr),D=((He=_.find(ge=>ge.Id===t.FolderId))==null?void 0:He.label)||"",R=ts(),N=re(sp),z=I2(R,N,t.FolderId),{isOpened:B}=re(Td),L=re(iee),P=re(eR),I=L.includes(t.FolderId),H=I?(lt=P[t.Id])==null?void 0:lt.SnoozeUntilUtc:null,$=NS(t.FolderId),V=ey(H||t.Date,!1,M),q=[...t.To??[],...t.Cc??[],...t.Bcc??[]].filter(Boolean).map(ge=>{const Fe=cr(ge).email||ge,Se=Fe.toLowerCase();return{email:Fe,label:t.From.Address&&Se===t.From.Address?y("toMe"):Fe}}),U=$R({address:$?(q==null?void 0:q.join(","))||"":t.From.Address,folderId:t.FolderId,name:t.From.Name||t.From.Address}),W=S.useRef([]),Y=S.useCallback(ge=>Fe=>{W.current[ge]=Fe},[]),[G,K]=S.useState({}),[Q,Z]=S.useState(!1),J=S.useRef(null),{isResizing:ne}=aae(),se=xt(1024),ce=u<600||se,fe=A&&b===t.Id||A&&w.includes(t.Id),le=noe(t),be=aot(),je=()=>!Jie(h.pathname,k.length,E,w.length);S.useEffect(()=>{if(!le||le.length===0)return;const ge=ay(W.current,le);K(ge)},[le]),S.useEffect(()=>{const ge=()=>be.close();return window.addEventListener("contextmenu",ge,{capture:!0}),()=>window.removeEventListener("contextmenu",ge,{capture:!0})},[be,be.close]);const{attributes:pe,listeners:_e,setNodeRef:Ce}=mS({id:t.Id,disabled:se||je(),data:{userEmailId:(Ye=_.find(ge=>ge.Id===t.FolderId))==null?void 0:Ye.UserEmailId}}),Te=S.useMemo(()=>le.length?d.jsx(ve,{gap:4,sx:{flexWrap:u<600?"wrap":"nowrap"},children:le.map((ge,Fe)=>d.jsx(eoe,{item:ge,isTruncated:G[ge.Id],labelRef:Y(Fe)},ge.Id))}):null,[G,le,u]),Ae=S.useCallback(ge=>{var ot;if(se)return;if(!ge.target.closest('[data-message-card-content="true"]')){ge.preventDefault(),ge.stopPropagation();return}const qe=n?r:[t.Id];n||(s(),l(t)),(ot=J.current)==null||ot.forceClose(),be.open(ge,{message:{...t},isSelected:e,isDraftFolder:j,nextCheckedIds:qe,isOutbox:z,resetWatcher:c,isBulkAction:qe.length>1}),m(PCe(t.Id))},[m,s,be,l,se,n,r,t,e,j,z,c]),Ze=S.useMemo(()=>({title:U,id:t.Id,folderId:t.FolderId,contactEmail:t.From.Address,recipients:q,inviteStatus:t.EventInviteStatus,messageSubject:t.Subject,messageFolderLabel:D,formattedDate:V,body:Wte(t),wasRead:t.WasRead,isChecked:n,isDraftFolder:j,hasChildren:t.HasChildren,hasAttachments:t.HasAttachments||t.HasThreadAttachments,important:t.Important,onCheck:()=>l(t),onRangeSelect:()=>a(t,!n),labels:Te,isHovered:Q,isSelected:e,messagesWithSendTime:f,contactCardRef:J,contactCardDisabled:B,isSnoozedMessage:I}),[U,t,q,D,V,n,j,Te,Q,e,f,B,I,l,a]);return d.jsxs(ie,{children:[d.jsx(s_,{visible:fe,styles:{root:{borderRadius:0,":before":{backgroundColor:"rgba(255,255,255,0)"}}},children:d.jsx(xe,{ref:Ce,onContextMenu:Ae,onClick:()=>o(t),onDoubleClick:()=>{m(rR(!0)),i(t)},onMouseEnter:()=>{!se&&!ne&&Z(!0)},onMouseLeave:()=>{!se&&!ne&&Z(!1)},className:`${Gf.messageCardWrapper} ${t.WasRead?"":Gf.unread}`,sx:ge=>({position:"relative",cursor:se?"default":"pointer",backgroundColor:e||n||be.isOpenLocal?ge.colors.blue[0]:"#FFF",paddingLeft:ce?"4px":"6px",paddingRight:ce?"12px":"8px","@media (min-width: 1025px)":{"&:hover":{backgroundColor:e||be.isOpenLocal?ge.colors.blue[0]:ne?"":"#F3F6FA"}}}),"data-message-card-content":"true",...pe,..._e,children:d.jsx(rit,{currentWidth:u,...Ze})})}),d.jsx(iot,{opened:be.isOpenLocal,target:be.target,position:be.position,close:be.close,maxHeight:be.maxHeight})]})}),oit=t=>{var l;const e=me.c(100);let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n={type:"new"},e[0]=n):n=e[0];const r=Fa(n),s=(l=re(mr))==null?void 0:l.SearchContext,o=wn(),{t:i}=Le(),a=(s==null?void 0:s.IsImportant)||(s==null?void 0:s.HasAttachments)||(s==null?void 0:s.WasRead)===!1;if(o.pathname.includes("search")||a){let c;e[1]!==i?(c=i("messages.noMessagesFound"),e[1]=i,e[2]=c):c=e[2];const u=`${c}`;let f;e[3]!==i?(f=i("messages.noMessagesDesc"),e[3]=i,e[4]=f):f=e[4];const h=`${f}`;let m;return e[5]!==u||e[6]!==h?(m={heading:u,description:h,handleButtonClick:iit,buttonText:"",name:"search",y:180,x:202},e[5]=u,e[6]=h,e[7]=m):m=e[7],m}if(o.pathname.includes("tags")){let c;e[8]!==i?(c=i("messages.noLettersWithLabels"),e[8]=i,e[9]=c):c=e[9];const u=`${c}`;let f;e[10]!==i?(f=i("messages.noLettersWithLabelsDesc"),e[10]=i,e[11]=f):f=e[11];const h=`${f}`;let m;return e[12]!==u||e[13]!==h?(m={heading:u,description:h,handleButtonClick:ait,buttonText:"",name:"label",y:180,x:202},e[12]=u,e[13]=h,e[14]=m):m=e[14],m}switch(t.Name){case"inbox":{let c;e[15]!==i?(c=i("messages.noIncomingMessages"),e[15]=i,e[16]=c):c=e[16];const u=`${c}`;let f;e[17]!==i?(f=i("messages.noIncomingMessagesDesc"),e[17]=i,e[18]=f):f=e[18];const h=`${f}`;let m;return e[19]!==t.Name||e[20]!==u||e[21]!==h?(m={heading:u,description:h,handleButtonClick:lit,buttonText:"",name:t.Name,y:180,x:202},e[19]=t.Name,e[20]=u,e[21]=h,e[22]=m):m=e[22],m}case"sent":{let c;e[23]!==i?(c=i("messages.noSentLetters"),e[23]=i,e[24]=c):c=e[24];const u=`${c}`;let f;e[25]!==i?(f=i("messages.noSentLettersDesc"),e[25]=i,e[26]=f):f=e[26];const h=`${f}`;let m;e[27]!==r?(m=()=>r(),e[27]=r,e[28]=m):m=e[28];let y;return e[29]!==t.Name||e[30]!==u||e[31]!==h||e[32]!==m?(y={heading:u,description:h,handleButtonClick:m,buttonText:"",name:t.Name,y:180,x:202},e[29]=t.Name,e[30]=u,e[31]=h,e[32]=m,e[33]=y):y=e[33],y}case"drafts":{let c;e[34]!==i?(c=i("messages.noDraftsCreated"),e[34]=i,e[35]=c):c=e[35];const u=`${c}`;let f;e[36]!==i?(f=i("messages.noDraftsCreatedDesc"),e[36]=i,e[37]=f):f=e[37];const h=`${f}`;let m;e[38]!==r?(m=()=>r(),e[38]=r,e[39]=m):m=e[39];let y;return e[40]!==t.Name||e[41]!==u||e[42]!==h||e[43]!==m?(y={heading:u,description:h,handleButtonClick:m,buttonText:"",name:t.Name,y:180,x:202},e[40]=t.Name,e[41]=u,e[42]=h,e[43]=m,e[44]=y):y=e[44],y}case"junk":{let c;e[45]!==i?(c=i("messages.noSpam"),e[45]=i,e[46]=c):c=e[46];const u=`${c}`;let f;e[47]!==i?(f=i("messages.noSpamDesc"),e[47]=i,e[48]=f):f=e[48];const h=`${f}`;let m;return e[49]!==t.Name||e[50]!==u||e[51]!==h?(m={heading:u,description:h,handleButtonClick:cit,buttonText:"",name:t.Name,y:180,x:202},e[49]=t.Name,e[50]=u,e[51]=h,e[52]=m):m=e[52],m}case"trash":{let c;e[53]!==i?(c=i("messages.emptyTrash"),e[53]=i,e[54]=c):c=e[54];const u=`${c}`;let f;e[55]!==i?(f=i("messages.emptyTrashDesc"),e[55]=i,e[56]=f):f=e[56];const h=`${f}`;let m;return e[57]!==t.Name||e[58]!==u||e[59]!==h?(m={heading:u,description:h,handleButtonClick:uit,buttonText:"",name:t.Name,y:180,x:202},e[57]=t.Name,e[58]=u,e[59]=h,e[60]=m):m=e[60],m}case"outbox":{let c;e[61]!==i?(c=i("messages.noOutboxLetters"),e[61]=i,e[62]=c):c=e[62];const u=`${c}`;let f;e[63]!==i?(f=i("messages.noOutboxLettersDesc"),e[63]=i,e[64]=f):f=e[64];const h=`${f}`;let m;return e[65]!==t.Name||e[66]!==u||e[67]!==h?(m={heading:u,description:h,handleButtonClick:dit,buttonText:"",name:t.Name,y:180,x:202},e[65]=t.Name,e[66]=u,e[67]=h,e[68]=m):m=e[68],m}case"archive":{let c;e[69]!==i?(c=i("messages.noArchivedLetters"),e[69]=i,e[70]=c):c=e[70];const u=`${c}`;let f;e[71]!==i?(f=i("messages.noArchivedLettersDesc"),e[71]=i,e[72]=f):f=e[72];const h=`${f}`;let m;return e[73]!==t.Name||e[74]!==u||e[75]!==h?(m={heading:u,description:h,handleButtonClick:fit,buttonText:"",name:t.Name,y:180,x:202},e[73]=t.Name,e[74]=u,e[75]=h,e[76]=m):m=e[76],m}case"Templates":{let c;e[77]!==i?(c=i("messages.noTemplatesLetters"),e[77]=i,e[78]=c):c=e[78];const u=`${c}`;let f;e[79]!==i?(f=i("messages.noTemplatesLettersDesc"),e[79]=i,e[80]=f):f=e[80];const h=`${f}`;let m;return e[81]!==t.Name||e[82]!==u||e[83]!==h?(m={heading:u,description:h,handleButtonClick:pit,buttonText:"",name:t.Name,y:180,x:202},e[81]=t.Name,e[82]=u,e[83]=h,e[84]=m):m=e[84],m}case"errors":{let c;e[85]!==i?(c=i("messages.noErrorsLetters"),e[85]=i,e[86]=c):c=e[86];const u=`${c}`;let f;e[87]!==i?(f=i("messages.noErrorsLettersDesc"),e[87]=i,e[88]=f):f=e[88];const h=`${f}`;let m;return e[89]!==t.Name||e[90]!==u||e[91]!==h?(m={heading:u,description:h,handleButtonClick:hit,buttonText:"",name:t.Name,y:180,x:202},e[89]=t.Name,e[90]=u,e[91]=h,e[92]=m):m=e[92],m}default:{let c;e[93]!==i?(c=i("messages.emptyFolder"),e[93]=i,e[94]=c):c=e[94];const u=`${c}`;let f;e[95]!==i?(f=i("messages.emptyFolderDesc"),e[95]=i,e[96]=f):f=e[96];const h=`${f}`;let m;return e[97]!==u||e[98]!==h?(m={heading:u,description:h,handleButtonClick:mit,buttonText:"",name:"folder",y:180,x:202},e[97]=u,e[98]=h,e[99]=m):m=e[99],m}}};function iit(){}function ait(){}function lit(){}function cit(){}function uit(){}function dit(){}function fit(){}function pit(){}function hit(){}function mit(){}const git="/assets/errors-CpZ5xqdD.png",yit="/assets/errors-CpZ5xqdD.png",vit="/assets/drafts-CsdfSxfW.png",bit="/assets/errors-CpZ5xqdD.png",xit="/assets/errors-CpZ5xqdD.png",wit="/assets/sent-DShU-NHY.png",Sit="/assets/junk-BU79Ytvb.png",Cit="/assets/label-BGfv4jOw.png",kit="/assets/errors-CpZ5xqdD.png",Eit="/assets/search-CfBtWwez.png",Tit="/assets/sent-DShU-NHY.png",Mit="/assets/trash-8q9IsU4a.png",jit=t=>{const e=me.c(29),{heading:n,description:r,handleButtonClick:s,buttonText:o,name:i,x:a,y:l}=t,c=xt(1024),u=c?"md":"18px",f=c?"sm":"md",h=c?0:20,m=c?0:5;let y;if(e[0]!==i){const N=Object.assign({"../../assets/empty-list/Templates.png":git,"../../assets/empty-list/archive.png":yit,"../../assets/empty-list/drafts.png":vit,"../../assets/empty-list/errors.png":bit,"../../assets/empty-list/folder.png":xit,"../../assets/empty-list/inbox.png":wit,"../../assets/empty-list/junk.png":Sit,"../../assets/empty-list/label.png":Cit,"../../assets/empty-list/outbox.png":kit,"../../assets/empty-list/search.png":Eit,"../../assets/empty-list/sent.png":Tit,"../../assets/empty-list/trash.png":Mit});y=function(L){const P=`../../assets/empty-list/${L}.png`;return N[P]??N["../../assets/empty-list/default.png"]}(i),e[0]=i,e[1]=y}else y=e[1];const v=y,b=c?"auto":325,w=c?270:300;let C;e[2]===Symbol.for("react.memo_cache_sentinel")?(C={height:"100%"},e[2]=C):C=e[2];const k=c?"center":"flex-start";let E;e[3]===Symbol.for("react.memo_cache_sentinel")?(E={display:"flex",justifyContent:"center",alignItems:"center",width:"100%",flexDirection:"column"},e[3]=E):E=e[3];let j;e[4]!==v||e[5]!==a||e[6]!==l?(j=d.jsx("img",{src:v,alt:"",width:a,height:l}),e[4]=v,e[5]=a,e[6]=l,e[7]=j):j=e[7];let A;e[8]!==n||e[9]!==u||e[10]!==h?(A=d.jsx(ue,{size:u,ta:"center",w:"100%",fw:500,mt:h,children:n}),e[8]=n,e[9]=u,e[10]=h,e[11]=A):A=e[11];let M;e[12]!==r||e[13]!==m||e[14]!==f?(M=d.jsx(ue,{maw:350,p:"0 10px",color:"dimmed",size:f,ta:"center",mt:m,children:r}),e[12]=r,e[13]=m,e[14]=f,e[15]=M):M=e[15];let _;e[16]!==o||e[17]!==s?(_=o&&d.jsx(yt,{mt:20,size:"md",sx:{span:{fontWeight:500}},onClick:s,children:o}),e[16]=o,e[17]=s,e[18]=_):_=e[18];let D;e[19]!==j||e[20]!==A||e[21]!==M||e[22]!==_?(D=d.jsxs(ie,{sx:E,children:[j,A,M,_]}),e[19]=j,e[20]=A,e[21]=M,e[22]=_,e[23]=D):D=e[23];let R;return e[24]!==b||e[25]!==D||e[26]!==w||e[27]!==k?(R=d.jsx(xe,{mih:b,m:"0 auto",h:w,direction:"column",style:C,gap:"xs",justify:k,align:"center",children:D}),e[24]=b,e[25]=D,e[26]=w,e[27]=k,e[28]=R):R=e[28],R},Ait="_pullIndicator_1lv8o_1",_it="_content_1lv8o_15",Rit="_container_1lv8o_19",C0={pullIndicator:Ait,content:_it,container:Rit},xE=0,DY=0,Dit=0,Iit=({children:t,onRefresh:e,viewportRef:n,maxPullHeight:r=50,refreshThreshold:s=50,loadingIndicator:o=d.jsx(Bs,{size:"sm"}),resetDelay:i=200})=>{const a=xt(1024),l=S.useRef(!1),c=S.useRef(xE),u=S.useRef(void 0),f=S.useRef({currentX:0,currentY:0}),h=S.useRef(!1),m=k=>{const E=y(k);c.current=E,u.current&&cancelAnimationFrame(u.current),u.current=requestAnimationFrame(()=>{const j=document.querySelector(`.${C0.pullIndicator}`),A=document.querySelector(`.${C0.content}`);j&&(j.style.height=`${E}px`,j.style.opacity=E>Dit?"1":"0"),A&&(A.style.transform=`translateY(${E}px)`)})},y=S.useCallback(k=>k>r?r+Math.log(k-r+1):k,[r]),v=S.useCallback(()=>{var k;return((k=n.current)==null?void 0:k.scrollTop)===0||!1},[n]);S.useEffect(()=>{const k=E=>{v()&&h.current&&E.preventDefault()};return a&&document.addEventListener("touchmove",k,{passive:!1}),()=>{a&&document.removeEventListener("touchmove",k)}},[v,a]);const b=k=>{a&&(h.current=!1,v()&&(f.current={currentX:k.touches[0].clientX,currentY:k.touches[0].clientY}))},w=k=>{if(!a||!v())return;const E=Math.abs(k.touches[0].clientX-f.current.currentX),j=k.touches[0].clientY-f.current.currentY;if(E>Math.abs(j)){h.current=!1;return}const A=Math.max(DY,j);h.current=A>DY,m(y(A))},C=async()=>{if(!a)return;if(h.current=!1,c.current>=s&&!l.current){l.current=!0;try{await e()}finally{setTimeout(()=>{l.current=!1,m(xE)},i)}}else m(xE)};return d.jsxs("div",{className:C0.container,onTouchStart:b,onTouchMove:w,onTouchEnd:C,children:[d.jsx("div",{className:C0.pullIndicator,children:o}),d.jsx("div",{className:C0.content,children:t})]})},Oit=({activatorEvent:t,draggingNodeRect:e,transform:n})=>{if(e&&t){const r=am(t);if(!r)return n;const s=r.x-e.left,o=r.y-e.top;return{...n,x:n.x+s-10,y:n.y+o-e.height/2}}return n},Nit={duration:200,easing:"ease"},Lit=S.memo(t=>{const e=me.c(76),{folder:n,messages:r,messagesWithSendTime:s,singleMessage:o,checkedMessagesIds:i,clearSelection:a,onMessageClick:l,onMessageDoubleClick:c,onRangeSelect:u,onCheck:f,resetWatcher:h,currentWidth:m}=t,[y,v]=S.useState(0),{t:b}=Le(),w=re(ip)==="fulfilled",C=re(fee)==="fulfilled",k=re(WTe),E=k===null||(n==null?void 0:n.Id)===k,j=S.useRef(null),A=S.useRef(null),M=uI(j),_=zt(),D=oit(n),R=re(mr),N=xt(1024),z=re(K_),B=re(X_),L=re(cee),P=n==null?void 0:n.Type;let I;e[0]!==P?(I=Lm(P),e[0]=P,e[1]=I):I=e[1];const H=I,$=n==null?void 0:n.Type;let V;e[2]!==$?(V=tJ($),e[2]=$,e[3]=V):V=e[3];const q=V;let U;e[4]!==B||e[5]!==(o==null?void 0:o.Id)?(U=We=>B?B===We:(o==null?void 0:o.Id)===We,e[4]=B,e[5]=o==null?void 0:o.Id,e[6]=U):U=e[6];const W=U;let Y;e[7]!==i||e[8]!==B||e[9]!==z?(Y=We=>B?z.includes(We)&&z.includes(B):i.includes(We),e[7]=i,e[8]=B,e[9]=z,e[10]=Y):Y=e[10];const G=Y;let K;e[11]!==_||e[12]!==L||e[13]!==N||e[14]!==y?(K=We=>{const{y:At}=We;_(Dr()),N&&(At<y?L&&_(vT(!1)):!L&&_(vT(!0)),v(At))},e[11]=_,e[12]=L,e[13]=N,e[14]=y,e[15]=K):K=e[15];const Q=K;let Z;e[16]===Symbol.for("react.memo_cache_sentinel")?(Z=()=>{A.current&&A.current.scrollIntoView({block:"start"})},e[16]=Z):Z=e[16];let J;e[17]!==R.offset?(J=[R.offset],e[17]=R.offset,e[18]=J):J=e[18],S.useEffect(Z,J);let ne,se;e[19]!==B?(ne=()=>{const We=j.current;if(!We)return;let At;if(B){const St=()=>{We.scrollLeft!==0&&(We.scrollLeft=0),At=requestAnimationFrame(St)};At=requestAnimationFrame(St)}else We.scrollLeft!==0&&(We.scrollLeft=0);return()=>{At&&cancelAnimationFrame(At)}},se=[B],e[19]=B,e[20]=ne,e[21]=se):(ne=e[20],se=e[21]),S.useEffect(ne,se);let ce;e[22]!==N?(ce=()=>N?40:0,e[22]=N,e[23]=ce):ce=e[23];const fe=ce;let le;e[24]!==_||e[25]!==R?(le=async()=>{await _(ur({...R}))},e[24]=_,e[25]=R,e[26]=le):le=e[26];const be=le;let je;e[27]!==r?(je=r??[],e[27]=r,e[28]=je):je=e[28];const pe=je;let _e;e[29]!==s?(_e=s??[],e[29]=s,e[30]=_e):_e=e[30];const Ce=_e,Ze=!pe.length&&!Ce.length&&C&&(w||E&&k!==null),He=r.length+s.length,lt=fe(),Ye=M?"block":"none";let ge;e[31]!==Ye?(ge={scrollbar:{display:Ye}},e[31]=Ye,e[32]=ge):ge=e[32];const Fe=Ze?"center":"";let Se;e[33]!==Fe?(Se={height:"100%",justifyContent:Fe},e[33]=Fe,e[34]=Se):Se=e[34];let qe;e[35]!==i||e[36]!==a||e[37]!==m||e[38]!==D||e[39]!==G||e[40]!==W||e[41]!==H||e[42]!==s||e[43]!==f||e[44]!==l||e[45]!==c||e[46]!==u||e[47]!==h||e[48]!==Ze||e[49]!==b||e[50]!==pe||e[51]!==Ce?(qe=Ze?d.jsx(ie,{className:Gf.emptyListFadeIn,children:d.jsx(jit,{heading:D.heading,description:D.description,handleButtonClick:D.handleButtonClick,buttonText:D.buttonText,name:D.name,x:D.x,y:D.y})},D.name):d.jsxs(d.Fragment,{children:[pe.map((We,At)=>d.jsx(RY,{message:We,isSelected:W(We.Id),isChecked:G(We.Id),checkedMessagesIds:i,clearSelection:a,onMessageClick:l,onMessageDoubleClick:c,onRangeSelect:u,onCheck:f,currentWidth:m,resetWatcher:h},`${We.Id}-${At}`)),H&&d.jsx(d.Fragment,{children:Ce.length>0&&d.jsxs(d.Fragment,{children:[pe.length>0&&d.jsx(xe,{sx:{marginTop:"24px",marginBottom:"10px",padding:"0 16px"},children:d.jsx(ue,{fz:18,children:b("delayedSend.scheduledList")})}),d.jsx(xe,{align:"center",sx:{margin:"0",padding:"7px 16px",backgroundColor:"#E7F5FF"},children:d.jsx(xe,{flex:1,children:d.jsxs(xe,{align:"center",gap:12,children:[d.jsx(xe,{children:d.jsx(xc,{color:"#339AF0",size:16,stroke:1.5})}),d.jsx(ue,{c:"#339AF0",children:b("delayedSend.messageSending")})]})})}),Ce.map((We,At)=>d.jsx(RY,{message:We,isSelected:W(We.Id),isChecked:G(We.Id),checkedMessagesIds:i,clearSelection:a,onMessageClick:l,onMessageDoubleClick:c,onRangeSelect:u,onCheck:f,currentWidth:m,resetWatcher:h,messagesWithSendTime:s},`${We.Id}-${At}`))]})})]}),e[35]=i,e[36]=a,e[37]=m,e[38]=D,e[39]=G,e[40]=W,e[41]=H,e[42]=s,e[43]=f,e[44]=l,e[45]=c,e[46]=u,e[47]=h,e[48]=Ze,e[49]=b,e[50]=pe,e[51]=Ce,e[52]=qe):qe=e[52];let ot;e[53]!==be||e[54]!==qe?(ot=d.jsx(Iit,{onRefresh:be,viewportRef:j,children:qe}),e[53]=be,e[54]=qe,e[55]=ot):ot=e[55];const $e=B?Nit:null;let pt;e[56]===Symbol.for("react.memo_cache_sentinel")?(pt=[Oit],e[56]=pt):pt=e[56];let gt;e[57]!==B||e[58]!==H||e[59]!==q||e[60]!==z||e[61]!==b?(gt=HD!==B&&!H&&!q?d.jsxs(xe,{className:Gf.draggable,children:[d.jsx(tx,{stroke:1.5,style:{marginRight:"8px",marginLeft:"16px"}}),b("moveMessage",{count:B&&z.includes(B)?z.length:1})]}):null,e[57]=B,e[58]=H,e[59]=q,e[60]=z,e[61]=b,e[62]=gt):gt=e[62];let Pt;e[63]!==$e||e[64]!==gt?(Pt=d.jsx(Yee,{adjustScale:!1,dropAnimation:$e,modifiers:pt,children:gt}),e[63]=$e,e[64]=gt,e[65]=Pt):Pt=e[65];let at;e[66]!==Se||e[67]!==ot||e[68]!==Pt?(at=d.jsxs(bt,{ref:A,gap:0,sx:Se,children:[ot,Pt]}),e[66]=Se,e[67]=ot,e[68]=Pt,e[69]=at):at=e[69];let nt;return e[70]!==Q||e[71]!==He||e[72]!==lt||e[73]!==ge||e[74]!==at?(nt=d.jsx(Jr,{scrollbars:"y",viewportRef:j,scrollbarSize:6,mt:lt,styles:ge,sx:$it,onScrollPositionChange:Q,children:at},He),e[70]=Q,e[71]=He,e[72]=lt,e[73]=ge,e[74]=at,e[75]=nt):nt=e[75],nt});function $it(){return{height:"100%","& > * > *":{display:"block !important",height:"100%"}}}const Fit=t=>{const e=me.c(7),{onDragEnd:n}=t,{startResize:r,stopResize:s}=aae(),o=S.useRef(null),i=S.useRef(null),a=S.useRef(null),[l,c]=S.useState(0);let u,f;e[0]!==n||e[1]!==r||e[2]!==s?(u=()=>{var v;if(c(((v=a==null?void 0:a.current)==null?void 0:v.offsetWidth)||0),!i.current)return;const m=i.current,y=b=>{if(!o.current)return;r();let w,C;const k=j=>{var M;j.preventDefault();const A=j.clientX-w;o.current&&(o.current.style.width=C-A+"px",c(((M=a==null?void 0:a.current)==null?void 0:M.offsetWidth)||0))},E=()=>{document.removeEventListener("mousemove",k),document.removeEventListener("mouseup",E),n(o.current.offsetWidth),s()};w=b.clientX,C=o.current.offsetWidth,document.addEventListener("mousemove",k),document.addEventListener("mouseup",E)};return m.addEventListener("mousedown",y),()=>{m.removeEventListener("mousedown",y)}},f=[n,r,s],e[0]=n,e[1]=r,e[2]=s,e[3]=u,e[4]=f):(u=e[3],f=e[4]),S.useLayoutEffect(u,f);let h;return e[5]!==l?(h={containerRef:o,handleRef:i,messagesRef:a,width:l},e[5]=l,e[6]=h):h=e[6],h},zit=({desktopOpened:t})=>{const e=wn(),{pathname:n}=e,r=zt(),s=n.includes("tags"),o=n.includes("search"),i=re(Dl),a=re(Va),l=re(qc),c=re(Fm),u=re(ip),f=re(zm),h=re($o),m=re(Y_),y=re(qa),v=re(Md),b=re(mr),w=re(Z_),C=re(zr),k=re(Dn),E=re(See),j=re(Cee),A=Er(),M=ts(),_=(a==null?void 0:a.find(Ae=>Ae.Name.toLowerCase()==="inbox"))??null,D=S.useMemo(()=>s||o?_:M,[s,o,_,M]),{read:R}=Ol(),{t:N}=Le(),z=xt(1024),B=xt(1160);Vie(!1);const[L,P]=S.useState(!i.length),I=re(B2),H=re(Ae=>Ae.contactContextMenu.isContactContextMenuOpen),{selectSomeMessages:$,updateSelectedMessages:V,toggleMessageSelection:q,toggleAllMessages:U,clearSelection:W,checkedMessages:Y,checkedMessagesIds:G,messagesWithoutSendTime:K,messagesWithSendTime:Q}=Fl(),Z=WM((D==null?void 0:D.Id)??null),[J,ne]=jpe({key:"single-message-size",defaultValue:"63%"}),{containerRef:se,handleRef:ce,messagesRef:fe,width:le}=Fit({onDragEnd:Ae=>ne(`${Ae}`)}),be=()=>{Z.stop(),Z.start()},je=S.useCallback(()=>{G.length===0?r(k3([])):r(k3(G.filter(Ae=>!!c[Ae])))},[G,r,c]);S.useEffect(()=>je(),[G,f,je,l.Items]);const pe=()=>{var He;const Ze=((He=y==null?void 0:y.ModuleUrls.find(lt=>lt.Name==="Admin"))==null?void 0:He.Url)+"/profile/"+(v==null?void 0:v.Id)+"/mail-account";window.location.href=Ze},_e=S.useCallback(Ae=>{if(r(Ns(Ae.Id)),r(rS({Id:Ae.Id})),r(see()),!w&&!z){r(FTe(o)),A(`/message/${Ae.Id}`,{state:{prevLocation:e.pathname}});return}if(r(xl({id:Ae.Id})),!Ae.WasRead){if(r(nS({...b,folderId:Ae.FolderId})),R)return;r(fc(1)),r(P2({folderId:Ae.FolderId,Ids:[Ae.Id],WasRead:!0}))}},[r,w,z,e]),Ce=S.useCallback(async Ae=>{if(z)return;await r(W_({folderId:Ae.FolderId,externalId:Ae.ExternalId}));const Ze=document.getElementById("message-card");Ze&&Ze.click()},[r]);S.useEffect(()=>{r(Xu())},[r]),S.useEffect(()=>{const Ae=Ze=>{if(!H&&["ArrowUp","ArrowDown"].includes(Ze.key)&&h){const He=[...K,...Q],lt=He.findIndex(ge=>ge.Id===h.Id),Ye=He[lt+(Ze.key==="ArrowUp"?-1:1)];if(!Ye)return;r(Ns(Ye.Id)),r(xl({id:Ye.Id}))}};return document.addEventListener("keydown",Ae),()=>document.removeEventListener("keydown",Ae)},[r,h,K,Q,H]),S.useEffect(()=>{(u==="fulfilled"&&L||!i.length)&&P(!1)},[u,L,i]),S.useEffect(()=>{(D==null?void 0:D.Type)===Je.SNOOZED&&D.UserEmailId&&r(Ag({userEmailId:D.UserEmailId}))},[D,r]),S.useEffect(()=>{if(!o&&!s)return;const Ae=new Map(C.map(He=>[He.Id,He]));Array.from(new Set(l.Items.map(He=>Ae.get(He.FolderId)).filter(He=>(He==null?void 0:He.Type)===Je.SNOOZED).map(He=>He==null?void 0:He.UserEmailId).filter(He=>typeof He=="number"))).forEach(He=>{r(Ag({userEmailId:He}))})},[o,s,C,l.Items,r]),S.useEffect(()=>{z&&!h&&!m&&I&&r(E3())},[z,h,m,I,r]),S.useEffect(()=>{k.length===0&&A("/")},[k,A]);const Te=()=>z?"calc(100% - 40px)":"calc(100% - 48px)";return L?d.jsx(PR,{}):D?d.jsxs(d.Fragment,{children:[E&&d.jsx(wm.Modal,{opened:E,onClose:()=>r(wee()),mode:"snooze",messageIds:j}),d.jsxs("div",{style:{height:`calc(${z?"100dvh":"100vh"} - ${z?"48px":"64px"} )`},children:[d.jsx(Lst,{checkedMessages:Y,checkedMessagesIds:G,updateSelectedMessages:V,onCheck:U,onCheckedListClear:W,desktopOpened:t,resetWatcher:be}),d.jsxs(ve,{wrap:"nowrap",gap:0,h:Te(),pos:"relative",pl:z||t?"0px":"20px",children:[d.jsx(ie,{ref:fe,h:"100%",miw:300,sx:{flexGrow:1},children:d.jsx(Lit,{folder:D,messages:K,messagesWithSendTime:Q,singleMessage:h,checkedMessagesIds:G,clearSelection:W,onMessageClick:_e,onMessageDoubleClick:Ce,onRangeSelect:$,onCheck:q,currentWidth:le,resetWatcher:be})}),z?d.jsx(eae,{modalOpened:I,singleMessage:h,singleMessageLoading:m,checkedMessagesIds:G,clearSelection:W,onClose:()=>r(E3()),resetCounterWatcher:be,read:R,children:d.jsx(Zg,{clearCheckedList:W,checkedMessagesIds:G,message:h,loading:m})}):w&&d.jsxs(xe,{ref:se,h:"100%",w:J.includes("%")?J:`${+J}px`,miw:B?"auto":560,maw:"calc(100% - 300px)",sx:{flexShrink:0},children:[d.jsx(ie,{id:"split-divider",ref:ce,h:"100%",w:"auto",px:0,pos:"relative",sx:{cursor:"col-resize","&:hover > div":{width:3}},children:d.jsx(ie,{h:"100%",w:1,left:0,sx:Ae=>({backgroundColor:Ae.colors.gray[3],position:"relative",transition:"width 0.2s"})})}),d.jsx(Zg,{clearCheckedList:W,checkedMessagesIds:G,message:h,loading:m})]})]})]})]}):i.length?d.jsx(jl,{hasHeader:!0,children:d.jsx(Oc,{heading:N("warningBoundaryText.heading"),description:N("warningBoundaryText.description3"),handleButtonClick:()=>{var Ae;return A(`/${(Ae=k==null?void 0:k[0])==null?void 0:Ae.Id}/inbox`)},buttonText:N("warningBoundaryText.button3"),img:md,propDescWidth:400})}):d.jsx(jl,{hasHeader:!0,children:d.jsx(Oc,{heading:N("warningBoundaryText.heading2"),description:N("warningBoundaryText.description2"),handleButtonClick:pe,buttonText:N("warningBoundaryText.button2"),img:md})})},Pit=()=>{const t=zt(),{pathname:e}=wn(),{formValues:n}=br(s=>s.search),r=re(J_);S.useEffect(()=>{var l,c,u;if(!e.startsWith("/search"))return;const{IsImportant:o,HasAttachments:i,WasRead:a}=r;(((l=n.SearchContext)==null?void 0:l.IsImportant)!==o||((c=n.SearchContext)==null?void 0:c.HasAttachments)!==i||((u=n.SearchContext)==null?void 0:u.WasRead)!==a)&&t(lS({...n,SearchContext:{...n.SearchContext,IsImportant:o,HasAttachments:i,WasRead:a}}))},[r.IsImportant,r.HasAttachments,r.WasRead,e])},Bit=({searchData:t,messagesSearchRequest:e,paginationPage:n,emailItems:r,offsetOverride:s=null})=>{var u,f,h,m,y,v,b,w,C,k;const o=structuredClone(t??{});let i="";(u=o.SearchContext)!=null&&u.EndDate&&(i=Ke(o.SearchContext.EndDate).endOf("day").toISOString());const a=Math.abs(s!==null?s:(n-1)*(e.size??0)),l={...o,offset:a,SearchContext:{...o.SearchContext,EndDate:i,From:(h=(f=o.SearchContext)==null?void 0:f.From)==null?void 0:h.trim(),Query:(y=(m=o.SearchContext)==null?void 0:m.Query)==null?void 0:y.trim(),Subject:(b=(v=o.SearchContext)==null?void 0:v.Subject)==null?void 0:b.trim(),To:(C=(w=o.SearchContext)==null?void 0:w.To)==null?void 0:C.trim(),Labels:[]}};return l.folderId&&l.folderId!=="-1"&&!l.folderId.toString().includes(Ec)?(l.folderId=+l.folderId,delete l.UserEmailIds):((k=l.folderId)!=null&&k.toString().includes(Ec)?l.UserEmailIds=[Number(l.folderId.toString().replace(Ec,""))]:l.UserEmailIds=r.map(E=>E.Id),delete l.folderId),l},lae=()=>{const t=me.c(6),e=re(mr),n=re(aS),r=re(Dn);let s;t[0]!==r||t[1]!==e||t[2]!==n?(s=(a,l)=>Bit({searchData:a,messagesSearchRequest:e,paginationPage:(l==null?void 0:l.page)??n,emailItems:r,offsetOverride:(l==null?void 0:l.offsetOverride)??null}),t[0]=r,t[1]=e,t[2]=n,t[3]=s):s=t[3];const o=s;let i;return t[4]!==o?(i={preparePayload:o},t[4]=o,t[5]=i):i=t[5],i},Hit=()=>{const t=zt(),{pathname:e,state:n}=wn(),r=sr(),{formValues:s}=br(c=>c.search),{preparePayload:o}=lae(),i=re(Ed),a=S.useRef(!1),l=async c=>{var h,m,y,v;const u=o(c);t(ud(!0)),await t(ur(u));const f=[((h=c.SearchContext)==null?void 0:h.Query)||"",((m=c.SearchContext)==null?void 0:m.Subject)||"",((y=c.SearchContext)==null?void 0:y.From)||"",((v=c.SearchContext)==null?void 0:v.To)||""];t(yee(f))};return S.useEffect(()=>{const c=e.startsWith("/search");if(n!=null&&n.fromFormSubmit){window.history.replaceState({},document.title);return}if(!c){a.current=!1,t(LQ());return}if(a.current)return;a.current=!0;let u;s&&Object.keys(s).length?(u={...s,folderId:i},r.value&&(u.SearchContext={...u.SearchContext,Query:r.value})):r.value?u={SearchContext:{Query:r.value}}:u={},l(u)},[e,r.value,n]),{executeSearch:l,preparePayload:o}},Uit=t=>{const e=me.c(2),{children:n}=t;Hit(),Pit();let r;return e[0]!==n?(r=d.jsx(d.Fragment,{children:n}),e[0]=n,e[1]=r):r=e[1],r},fh=()=>{const t=me.c(7),e=re(Q_),{pathname:n}=wn();let r;t[0]!==n?(r=n.startsWith("/search"),t[0]=n,t[1]=r):r=t[1];const s=r;let o;t[2]!==e?(o=d.jsx(Nd,{children:d.jsx(zit,{desktopOpened:e})}),t[2]=e,t[3]=o):o=t[3];const i=o;let a;return t[4]!==i||t[5]!==s?(a=s?d.jsx(Uit,{children:i}):i,t[4]=i,t[5]=s,t[6]=a):a=t[6],a},IY=()=>{const t=me.c(37),{t:e}=Le(),n=Er(),r=zt(),s=re(Md),o=re(Dl),i=re(qa),a=re(Dn),{read:l}=Ol();let c;t[0]!==(s==null?void 0:s.Id)||t[1]!==(i==null?void 0:i.ModuleUrls)?(c=()=>{var w;const b=(w=i==null?void 0:i.ModuleUrls.find(Vit))==null?void 0:w.Url;window.location.href=b+"/profile/"+(s==null?void 0:s.Id)+"/mail-account"},t[0]=s==null?void 0:s.Id,t[1]=i==null?void 0:i.ModuleUrls,t[2]=c):c=t[2];const u=c;let f,h;t[3]!==r?(f=()=>{r(QJ())},h=[r],t[3]=r,t[4]=f,t[5]=h):(f=t[4],h=t[5]),S.useEffect(f,h);let m,y;if(t[6]!==r||t[7]!==a?(m=()=>{a.length&&a.map((b,w)=>w!==0&&r(eee(b.Id)))},y=[r,a],t[6]=r,t[7]=a,t[8]=m,t[9]=y):(m=t[8],y=t[9]),S.useEffect(m,y),!o.length){let b;t[10]!==e?(b=e("warningBoundaryText.heading2"),t[10]=e,t[11]=b):b=t[11];let w;t[12]!==e?(w=e("warningBoundaryText.description2"),t[12]=e,t[13]=w):w=t[13];let C;t[14]!==e?(C=e("warningBoundaryText.button2"),t[14]=e,t[15]=C):C=t[15];let k;return t[16]!==u||t[17]!==b||t[18]!==w||t[19]!==C?(k=d.jsx(jl,{children:d.jsx(Oc,{heading:b,description:w,handleButtonClick:u,buttonText:C,img:md})}),t[16]=u,t[17]=b,t[18]=w,t[19]=C,t[20]=k):k=t[20],k}if(l){let b;t[21]!==e?(b=e("warningBoundaryText.heading"),t[21]=e,t[22]=b):b=t[22];let w;t[23]!==e?(w=e("warningBoundaryText.description3"),t[23]=e,t[24]=w):w=t[24];let C;t[25]!==a[0].Id||t[26]!==n?(C=()=>n(`/${a[0].Id}/inbox`),t[25]=a[0].Id,t[26]=n,t[27]=C):C=t[27];let k;t[28]!==e?(k=e("warningBoundaryText.button3"),t[28]=e,t[29]=k):k=t[29];let E;return t[30]!==b||t[31]!==w||t[32]!==C||t[33]!==k?(E=d.jsx(jl,{hasHeader:!0,children:d.jsx(Oc,{heading:b,description:w,handleButtonClick:C,buttonText:k,img:md,propDescWidth:400})}),t[30]=b,t[31]=w,t[32]=C,t[33]=k,t[34]=E):E=t[34],E}let v;return t[35]!==s?(v=s?d.jsx(wrt,{children:d.jsx(sj,{})}):null,t[35]=s,t[36]=v):v=t[36],v};function Vit(t){return t.Name==="Admin"}const qit=()=>{var a,l;const t=me.c(9),e=Er(),n=wn(),r=re(Dn);let s;t[0]!==((a=r[0])==null?void 0:a.Id)||t[1]!==n.search||t[2]!==e?(s=()=>{var u;const c=(u=r[0])==null?void 0:u.Id;if(c){const f=n.search||"";e(`/${c}/inbox${f}`,{replace:!0})}},t[0]=(l=r[0])==null?void 0:l.Id,t[1]=n.search,t[2]=e,t[3]=s):s=t[3];let o;t[4]!==r||t[5]!==n.search||t[6]!==e?(o=[r,e,n.search],t[4]=r,t[5]=n.search,t[6]=e,t[7]=o):o=t[7],S.useEffect(s,o);let i;return t[8]===Symbol.for("react.memo_cache_sentinel")?(i=d.jsx(jl,{hasHeader:!0,children:d.jsx("div",{style:{padding:16}})}),t[8]=i):i=t[8],i},Wit=t=>{const e=me.c(3),{children:n}=t;if(!xt(1024)){let i;return e[0]===Symbol.for("react.memo_cache_sentinel")?(i=d.jsx(o2,{to:"/",replace:!0}),e[0]=i):i=e[0],i}const s=n??null;let o;return e[1]!==s?(o=d.jsx(d.Fragment,{children:s}),e[1]=s,e[2]=o):o=e[2],o},Yit=({droppableRects:t,droppableContainers:e,pointerCoordinates:n})=>{if(!n)return[];for(const r of e){const{id:s}=r,o=t.get(s);if(o){if(n.y<o.top||n.y>o.bottom||n.x<o.left||n.x>o.right)continue;return[{id:s,data:{droppableContainer:r,value:1}}]}}return[]},Git=t=>{if(!t.pointerCoordinates)return lR(t);const{x:e,y:n}=t.pointerCoordinates,{width:r,height:s}=t.collisionRect,o={...t};return Yit(o)},Kit=t=>{const e=me.c(45),{children:n}=t,{t:r}=Le(),s=Mr(),o=wn(),i=zt(),a=ts(),l=re(K_),c=re(Fm),u=re(zr),f=re(X_),h=re(zm),m=re(Dn),y=yp(),v=re(Ed),b=cC(l);let w;e[0]!==m.length||e[1]!==o.pathname||e[2]!==v?(w=H=>Jie(o.pathname,m.length,v),e[0]=m.length,e[1]=o.pathname,e[2]=v,e[3]=w):w=e[3];const C=w;let k;e[4]===Symbol.for("react.memo_cache_sentinel")?(k={activationConstraint:{distance:3}},e[4]=k):k=e[4];const E=Rg(fS,k);let j,A;e[5]!==i||e[6]!==f?(j=()=>{const H=$=>{$.key==="Escape"&&f!==null&&i(ih(null))};return document.addEventListener("keydown",H),()=>{document.removeEventListener("keydown",H)}},A=[f,i],e[5]=i,e[6]=f,e[7]=j,e[8]=A):(j=e[7],A=e[8]),S.useEffect(j,A);let M;e[9]!==u||e[10]!==a?(M=H=>Git(H).filter(V=>{const q=V.id,U=u.find(W=>W.Id===q);return Xie(a,U)}),e[9]=u,e[10]=a,e[11]=M):M=e[11];const _=M;let D;e[12]!==u||e[13]!==b||e[14]!==i||e[15]!==f||e[16]!==c||e[17]!==s||e[18]!==y||e[19]!==l||e[20]!==h||e[21]!==r?(D=async H=>{if(!f)return;let $;const V=u.find(G=>G.Id===H);if(l.includes(f))$=b.map(G=>{const{FolderId:K,Ids:Q}=G,Z=u.find(J=>J.Id===K);return(V==null?void 0:V.UserEmailId)!==(Z==null?void 0:Z.UserEmailId)?null:i(Aa({fromId:K,Ids:Q,toId:H})).unwrap()});else{i(k3([f]));const G=u.find(K=>K.Id===c[f].FolderId);if((V==null?void 0:V.UserEmailId)!==(G==null?void 0:G.UserEmailId))return;$=[i(Aa({fromId:c[f].FolderId,Ids:[f],toId:H})).unwrap()]}i(ih(null)),i(HP(!0));const q=$.filter(Xit);if(!q.length)return;await Promise.all(q);const U=l.includes(f)?l:[f];await y(U.length),i(HP(!1)),i(k3([])),i(mee());const W=U.filter(G=>{var K;return!((K=c[G])!=null&&K.WasRead)}).length;i(fc(W)),i(sS({count:W,folderId:H}));const Y=u.find(G=>G.Id===H);s.success(`${r("notifications.messages.movedTo")} ${(Y==null?void 0:Y.label)||(Y==null?void 0:Y.Name)}`),h&&U.includes(h)&&(i(jo()),i(Ns(null)))},e[12]=u,e[13]=b,e[14]=i,e[15]=f,e[16]=c,e[17]=s,e[18]=y,e[19]=l,e[20]=h,e[21]=r,e[22]=D):D=e[22];const R=D;let N;e[23]!==u||e[24]!==i||e[25]!==C||e[26]!==c||e[27]!==l?(N=H=>{var W;const $=H.active.id,V=(W=c[$])==null?void 0:W.FolderId,q=u.find(Y=>Y.Id===V);if(!Wrt(q==null?void 0:q.Type))return;const U=l.includes($)?l.length:1;C(U)&&i(ih(H.active.id))},e[23]=u,e[24]=i,e[25]=C,e[26]=c,e[27]=l,e[28]=N):N=e[28];const z=N;let B;e[29]!==u||e[30]!==(a==null?void 0:a.Id)||e[31]!==(a==null?void 0:a.Type)||e[32]!==i||e[33]!==c||e[34]!==R||e[35]!==r?(B=H=>{var Q,Z,J;const{over:$,active:V}=H,q=$==null?void 0:$.id,U=u.find(ne=>ne.Id===q);if([V.id===HD&&!!vnt,(a==null?void 0:a.Id)===($==null?void 0:$.id),(U==null?void 0:U.UserEmailId)!==((Z=(Q=V==null?void 0:V.data)==null?void 0:Q.current)==null?void 0:Z.userEmailId)].some(Boolean)){i(ih(null));return}if(!$){setTimeout(()=>i(ih(null)),200);return}const Y=(J=c[V.id])==null?void 0:J.FolderId,G=u.find(ne=>ne.Id===Y);let K=null;if((U==null?void 0:U.Type)===Je.SPAM?K="moveToSpam":(U==null?void 0:U.Type)===Je.INBOX&&((a==null?void 0:a.Type)===Je.SPAM||(G==null?void 0:G.Type)===Je.SPAM)?K="restoreFromSpam":(U==null?void 0:U.Type)===Je.TRASH&&(K="moveToTrash"),K){Bh(r,{action:K,overrides:{onConfirm:()=>R(q),onCancel:()=>i(ih(null))}});return}R(q)},e[29]=u,e[30]=a==null?void 0:a.Id,e[31]=a==null?void 0:a.Type,e[32]=i,e[33]=c,e[34]=R,e[35]=r,e[36]=B):B=e[36];const L=B;let P;e[37]!==E?(P=[E],e[37]=E,e[38]=P):P=e[38];let I;return e[39]!==n||e[40]!==_||e[41]!==L||e[42]!==z||e[43]!==P?(I=d.jsx(hR,{onDragStart:z,onDragEnd:L,collisionDetection:_,sensors:P,children:n}),e[39]=n,e[40]=_,e[41]=L,e[42]=z,e[43]=P,e[44]=I):I=e[44],I};function Xit(t){return t}const Zit="_verticalBox_1sn3h_1",Qit={verticalBox:Zit},Jit=(t,e,n)=>{const r=me.c(9),s=400,o=300,i=S.useRef(null);let a;r[0]!==s||r[1]!==t?(a=()=>{i.current&&clearTimeout(i.current),i.current=setTimeout(()=>{t(!0)},s)},r[0]=s,r[1]=t,r[2]=a):a=r[2];const l=a;let c;r[3]!==o||r[4]!==t?(c=()=>{i.current&&clearTimeout(i.current),i.current=setTimeout(()=>{t(!1)},o)},r[3]=o,r[4]=t,r[5]=c):c=r[5];const u=c;let f;return r[6]!==l||r[7]!==u?(f={handleMouseEnter:l,handleMouseLeave:u},r[6]=l,r[7]=u,r[8]=f):f=r[8],f},eat="Create Message",tat="Mail - R7-Office",nat="no theme",rat="Draft",sat="Links",oat="R7-Mail",iat="New message",aat="Compose",lat="Add a folder",cat="Add label",uat="Edit",dat="Edit",fat="Configure",pat="Send",hat="Send now",mat="Send Message",gat="Create Event",yat="Organization",vat="Personal",bat="Find all emails",xat="Sending a message",wat="Cancel",Sat="Draft saved",Cat="Changes saved",kat="Saved",Eat="Changes not saved",Tat="Cancel selection",Mat="Saving...",jat="Update",Aat="Labels",_at="LABELS",Rat="Mark as read",Dat="Mark as unread",Iat="Archive",Oat="Mark as important",Nat="Remove mark",Lat="Reply",$at="Printing",Fat="Reply to all",zat="Open in new window",Pat="Forward",Bat="Find an email by sender",Hat="View",Uat="Download",Vat="From",qat="Subject",Wat="To",Yat="Cc",Gat="Bcc",Kat="Bcc",Xat="Back",Zat="Clear attachments",Qat="Add copies",Jat="Download to Disk",elt="Add To Calendar",tlt="Move",nlt="Not spam",rlt="Mark as spam",slt="Cancel",olt="Save",ilt="Add",alt="Enable",llt="Disable",clt="Cancel changes",ult="Folder name",dlt="+ {{count}} File",flt="+ {{count}} Files",plt="Expand panel",hlt="Loading...",mlt="Loading",glt="Remaining",ylt="Remained",vlt="file",blt="files",xlt="Upload completed",wlt="Upload partially completed",Slt="Upload error",Clt="Failed to upload the file(s), please try again",klt="Upload interrupted, please check your connection",Elt="Storage is full. Please contact your administrator.",Tlt="Error, upload interrupted",Mlt="Reload files",jlt="Reload file",Alt="Delete file",_lt="Invalid file type",Rlt="Insert image",Dlt="Add a contact",Ilt="Clean trash",Olt="Clean",Nlt="Copy all emails",Llt="Copy all addresses with a button or via a keyboard shortcut.",$lt="Select a part",Flt="No results found",zlt="Separate",Plt="Do not separate",Blt="More",Hlt="from",Ult="me",Vlt="All mail",qlt="All mail addresses",Wlt="Only",Ylt="Attachments",Glt="pcs",Klt="Mb",Xlt="Kb",Zlt="Search result",Qlt={menu:{headingTitle:"Headings",alignmentTitle:"Alignment",listTitle:"Lists",defaultsTitle:"Basic",items:{h1:"Heading 1",h2:"Heading 2",h3:"Heading 3",h4:"Heading 4",left:"Align Left",center:"Align Center",justify:"Justify",right:"Align Right",markList:"Bullet List",numbList:"Numbered List",strikethrough:"Strikethrough",underline:"Underline",italic:"Italic",highlight:"Highlight",code:"Code"}},colors:{titles:{textColor:"Text color",backgroundColor:"Background color"},actionColors:{white:"White",black:"Black",gray:"Gray",red:"Red",pink:"Pink",purple:"Purple",violet:"Violet",blue:"Blue",skyBlue:"Sky Blue",cyan:"Cyan",mint:"Mint",green:"Green",lime:"Lime",yellow:"Yellow",orange:"Orange"}},emoji:{faces:{label:"Faces",items:[{name:"Grinning Face",keywords:["smile","happy","positive"]},{name:"Beaming Face",keywords:["smile","joy"]},{name:"Face with Tears of Joy",keywords:["laugh","funny","lol"]},{name:"Rolling on Floor Laughing",keywords:["rofl","funny"]},{name:"Grinning Face with Big Eyes",keywords:["smile","cheerful"]},{name:"Grinning Face with Smiling Eyes",keywords:["happy"]},{name:"Grinning Face with Sweat",keywords:["relief","nervous"]},{name:"Smiling Face with Tear",keywords:["bittersweet","proud"]},{name:"Smiling Face with Smiling Eyes",keywords:["warm","friendly"]},{name:"Slightly Smiling Face",keywords:["fine","okay"]},{name:"Winking Face",keywords:["wink","flirt"]},{name:"Relieved Face",keywords:["calm","relax"]},{name:"Smiling Face with Heart-Eyes",keywords:["love","like"]},{name:"Star-Struck",keywords:["wow","amazed"]},{name:"Face Blowing a Kiss",keywords:["kiss","love"]},{name:"Kissing Face",keywords:["kiss"]},{name:"Kissing Face with Smiling Eyes",keywords:["kiss"]},{name:"Winking Face with Tongue",keywords:["playful","prank"]},{name:"Squinting Face with Tongue",keywords:["silly"]},{name:"Smiling Face with Sunglasses",keywords:["cool","chill"]},{name:"Thinking Face",keywords:["hmm","question"]},{name:"Face with Raised Eyebrow",keywords:["doubt","skeptical"]},{name:"Smirking Face",keywords:["smirk"]},{name:"Face Holding Back Tears",keywords:["sweet","cute"]},{name:"Loudly Crying Face",keywords:["sad","cry"]},{name:"Pouting Face",keywords:["angry","mad"]},{name:"Face with Steam From Nose",keywords:["frustrated"]},{name:"Face Screaming in Fear",keywords:["shock","horror"]},{name:"Sleeping Face",keywords:["sleep","tired"]},{name:"Exploding Head",keywords:["mind blown","shock"]},{name:"Hugging Face",keywords:["hug","care"]}]},gestures:{label:"Gestures",items:[{name:"Thumbs Up",keywords:["like","approve","yes"]},{name:"Thumbs Down",keywords:["dislike","no"]},{name:"Clapping Hands",keywords:["applause","bravo"]},{name:"Raising Hands",keywords:["celebrate","praise"]},{name:"Folded Hands",keywords:["pray","thanks"]},{name:"Handshake",keywords:["deal","agreement"]},{name:"Waving Hand",keywords:["hi","hello","bye"]},{name:"OK Hand",keywords:["ok","perfect"]},{name:"Victory Hand",keywords:["peace","victory"]},{name:"Sign of the Horns",keywords:["rock","metal"]},{name:"Crossed Fingers",keywords:["luck","hope"]},{name:"Love-You Gesture",keywords:["iloveyou","sign"]},{name:"Heart Hands",keywords:["love","care"]},{name:"Index Pointing Up",keywords:["note","attention"]},{name:"Backhand Index Pointing Left",keywords:["point","left"]},{name:"Backhand Index Pointing Right",keywords:["point","right"]}]},objects:{label:"Objects",items:[{name:"Light Bulb",keywords:["idea","innovation"]},{name:"Fire",keywords:["hot","trending"]},{name:"Sparkles",keywords:["fresh","new"]},{name:"Star",keywords:["favorite","rating"]},{name:"Glowing Star",keywords:["highlight"]},{name:"Collision",keywords:["boom","impact"]},{name:"Hundred Points",keywords:["perfect","score"]},{name:"High Voltage",keywords:["energy","power"]},{name:"Bullseye",keywords:["goal","focus","objective"]},{name:"Key",keywords:["access","important"]},{name:"Pushpin",keywords:["pin","important"]},{name:"Paperclip",keywords:["attach"]},{name:"Brain",keywords:["thinking","smart"]},{name:"Puzzle Piece",keywords:["puzzle","integration"]},{name:"Hammer and Wrench",keywords:["tools","fix"]},{name:"Test Tube",keywords:["experiment","lab"]}]},celebration:{label:"Celebrations",items:[{name:"Party Popper",keywords:["celebration","yay"]},{name:"Partying Face",keywords:["party","fun"]},{name:"Confetti Ball",keywords:["celebrate"]},{name:"Gift",keywords:["present","surprise"]},{name:"Balloon",keywords:["birthday","fun"]},{name:"Birthday Cake",keywords:["birthday"]},{name:"Bottle with Popping Cork",keywords:["champagne","celebrate"]},{name:"Clinking Glasses",keywords:["cheers","toast"]},{name:"Trophy",keywords:["achievement","win"]},{name:"1st Place Medal",keywords:["winner"]},{name:"Military Medal",keywords:["award"]},{name:"Sports Medal",keywords:["medal"]},{name:"Musical Note",keywords:["music"]},{name:"Microphone",keywords:["sing","talk"]},{name:"Clapper Board",keywords:["video","film"]},{name:"Video Game",keywords:["game"]}]},food:{label:"Food",items:[{name:"Hot Beverage",keywords:["coffee","tea"]},{name:"Bubble Tea",keywords:["tea","drink"]},{name:"Cup with Straw",keywords:["soda","drink"]},{name:"Pizza",keywords:["food","italian"]},{name:"Hamburger",keywords:["burger","fast food"]},{name:"Hot Dog",keywords:["fast food"]},{name:"French Fries",keywords:["fries"]},{name:"Burrito",keywords:["wrap","mexican"]},{name:"Sushi",keywords:["japanese","fish"]},{name:"Green Salad",keywords:["healthy"]},{name:"Doughnut",keywords:["dessert","sweet"]},{name:"Cookie",keywords:["sweet","biscuit"]},{name:"Shortcake",keywords:["cake","dessert"]},{name:"Beer Mug",keywords:["drink","party"]},{name:"Wine Glass",keywords:["wine","relax"]},{name:"Cocktail Glass",keywords:["cocktail"]},{name:"Red Apple",keywords:["fruit","apple"]},{name:"Strawberry",keywords:["fruit","berry"]}]},symbols:{label:"Symbols",items:[{name:"Red Heart",keywords:["love","heart"]},{name:"Orange Heart",keywords:["love","warm"]},{name:"Yellow Heart",keywords:["friendship","warmth"]},{name:"Green Heart",keywords:["growth","nature"]},{name:"Blue Heart",keywords:["trust","peace"]},{name:"Purple Heart",keywords:["care","compassion"]},{name:"Black Heart",keywords:["dark","goth"]},{name:"White Heart",keywords:["pure","clean"]},{name:"Brown Heart",keywords:["warm","earth"]},{name:"Check Mark Button",keywords:["ok","done"]},{name:"Cross Mark",keywords:["no","cancel"]},{name:"Exclamation Mark",keywords:["alert","important"]},{name:"Question Mark",keywords:["question","help"]},{name:"Plus",keywords:["add","plus"]},{name:"Minus",keywords:["remove","minus"]},{name:"Speech Balloon",keywords:["message","chat"]},{name:"Loudspeaker",keywords:["announce"]},{name:"Pushpin",keywords:["pin","important"]}]}},table:{insertTable:"Insert Table",deleteTable:"Delete Table",addRowAbove:"Add Row Above",addRowBelow:"Add Row Below",deleteRow:"Delete Row",addColumnLeft:"Add Column Left",addColumnRight:"Add Column Right",deleteColumn:"Delete Column",mergeCells:"Merge Cells",toggleHeaderRow:"Toggle Header Row",toggleHeaderColumn:"Toggle Header Column",toggleHeaderCell:"Toggle Header Cell",fixTable:"Fix Table"}},Jlt={smallSize:"Small size",optimalSize:"Optimal size",originalSize:"Original size"},ect={read:"Read",comment:"Comment",edit:"Edit"},tct="Clear Formatting",nct="Select font",rct="Select size",sct="Select color",oct="Select emoji",ict="Create table",act="Advanced formatting features",lct="Size",cct={dashboard:"Dashboard",profile:"Profile",subscribe:"Subscribe",download:"Download",report:"Report a problem",logOut:"Log Out"},uct={duplicate:"This email has already been added"},dct={chainsNotSelected:"Chains not selected",chainSelected:"Chain selected",chainsSelected:"Chains selected",noMessagesFound:"We couldn't find any such emails.",noMessagesDesc:"Try adjusting your search parameters and running the search again.",noLettersWithLabels:"Labeled emails",noLettersWithLabelsDesc:"Add one or more labels to selected emails—it's another way to quickly find what you need.",noIncomingMessages:"Inbox emails",noIncomingMessagesDesc:"This is where emails sent to your address are automatically received.",noSentLetters:"Sent emails",noSentLettersDesc:"All the emails you send can be found here.",noDraftsCreated:"Drafts",noDraftsCreatedDesc:"Drafts are saved automatically when you start writing or editing an email. You can return to your draft at any time.",noSpam:"Hooray, no spam!",noSpamDesc:"Emails suspected of being spam end up here. If you believe an email was mistakenly placed here, you can restore it.",noFolderFound:"Folders not found",noLabelsFound:"Labels not found",emptyTrash:"The trash is empty, everything has been cleared out.",emptyTrashDesc:"All deleted emails first go to the trash. Here, you can either permanently delete them or restore them.",noOutboxLetters:"Outgoing emails",noOutboxLettersDesc:"This folder contains emails that are currently being sent.",noArchivedLetters:"Archived emails",noArchivedLettersDesc:"Here you’ll find emails that you’ve moved to the archive for long-term storage.",noTemplatesLetters:"Email Templates",noTemplatesLettersDesc:"Here you can store email templates that you can use to quickly create and resend messages.",noErrorsLetters:"Sending Errors",noErrorsLettersDesc:"Messages that could not be sent due to errors are stored here. These messages are saved by the system for viewing.",emptyFolder:"Folder for emails",emptyFolderDesc:"Create new folders to organize in your usual way.",draftWillNotSave:"Draft will not be saved"},fct={status:{error:"Error",success:"Success"},messages:{movedTo:"Moved to folder",sentToInbox:"Sent to inbox",sentToSpam:"Sent to spam",sentToArchive:"Sent to archive",messageDeleted_one:"{{count}} message deleted",messageDeleted_other:"{{count}} messages deleted",allMessagesDeleted:"All messages deleted",errorAddress:'Address: "{{emails}}" not recognized. Please check the correctness of all entered addresses.',setAddress:"Please specify the recipient's address",notSentLetter:"The letter was not sent",messageWasSent:"Message was sent",messageWasNotSent:"Message was not sent",draftSavingFailed:"Draft saving failed! Please try again later",fileSize:"Attachment size limit exceeded (25 MB)",editFolder:'Folder "{{oldName}}" successfully edited to "{{newName}}"',createFolder:'Folder "{{newName}}" successfully created',deleteFolder:'Folder "{{label}}" successfully deleted',deleteLabel:'The label "{{label}}" has been successfully deleted.',labelEdited:'The label "{{label}}" has been successfully edited to "{{newName}}".',labelColorEdited:'The label color "{{label}}" has been successfully updated.',labelCreated:'The label "{{label}}" has been successfully created.',notFoundFolder:'Folder "{{label}}" not found',deleteFolderError:"An error occurred while deleting the folder",existedFolder:'A folder named "{{folder}}", already exists.',existedLabel:'A label named "{{label}}", already exists.',sentToTrash:"Sent to trash",savingFile:'The file has been saved in the "My Documents" folder as "{{data}}"',editImage:"Only images can be uploaded to the editor",editorAvailable:"Editor is not available",unknownError:"Unknown error",globalError:"Error while executing the task",authToken:"Authorization token is missing. Please log in again.",errorEmail:"The specified string is not an email address.",existedEmail:"This email has already been added.",messageWillBeSend:"The message will be sent on {{data}}",sendingCanceled:"Message sending has been canceled. The message has been moved to drafts"}},pct={titles:{deleteTitle:"Delete",move:"Move",moveToSpam:"Move to spam folder?",restoreFromSpam:"Recover emails?",moving:"Moving",newFolder:"New Folder",editingFolder:"Editing a folder",deleteFolder:"Delete the folder",searchUsers:"Search users",userNotFound:"User not found",labelName:"Label name",editLabel:"Edit label",createLabel:"Create label",unsavedChanges:"Unsaved Changes",deleteLabel:"Delete label?",deleteDraft:"Draft deleted",deleteDraftError:"Error in deleting draft",accessFileTitle:"File access",largeFilesTitle:"Sending large files",scheduleMessage:"Schedule send",cancelSend:"Cancel send?"},text:{deleteSelectedMessagesFromTrash:"Delete selected messages?",deleteAllMessagesFromTrash:"Delete all messages?",deleteSelectedMessagesToTrash:"All emails will be moved to trash",deleteFolderText:"All emails will be moved to trash",unsavedChangesText:"Do you really want to leave the page? Unsaved changes will be lost.",dropZoneMessage:"Drop files here",moveMultipleMessagesToTrash:"The selected messages will be moved to the trash",moveMultipleMessagesToFolder:"Selected messages will be moved to {{folder}}",moveSingleMessageToFolder:"The selected message will be moved to {{folder}}",restoreFromSpamMessage:"Do you want to restore the selected emails from the spam folder?",removeAllLabelFromMessages:"Unlabel emails and delete it?",accessFileText:"Allow access to everyone with the link. You can change access settings after sending in the file settings on P7-Disk.",accessFileHint:"Users will be able to view files as long as access is allowed.",accessFileSelectText:"File access",largeFilesText:"When the total size of the attached files exceeds 25 MB, they can be uploaded to the R7 Disk and added to the email as links.",largeFilesLinkDisabledText:"The file size for sending in an email is limited to 25 MB. Please use another way to share the file or contact your administrator.",cancelSendText:"Are you sure you want to cancel sending? The message will be saved to drafts."},controls:{delete:"Delete",create:"Create",cancel:"Cancel",cancelSend:"Cancel",save:"Save",move:"Move",restore:"Restore",dropChanges:"Close without changes",stayOnPage:"Stay on the page",toolbar:"Invoke toolbar",attach:"Attach files",photo:"Add photo",deleteDraft:"Delete draft",deleteAllFiles:"All attachments have been successfully removed",attachDisk:"Insert files on disk",continue:"Continue",close:"Close",ok:"Ok",schedule:"Schedule",previousChoice:"Previous choice",tomorrowMorning:"Tomorrow morning",tomorrowAfternoon:"Tomorrow afternoon",setDate:"Set date and time",selectTime:"Select time",selectTimezone:"Select timezone",datePlaceholder:"DD:MM:YYYY"}},hct={titles:{settings:"Settings",generalSettings:"General Settings",signature:"Signature",filter:"Filter",filters:"Filters",editFilter:"Filter settings",newFilter:"New filter",responder:"Autoresponder",resend:"Resend",sign:"Sign",share:"Sharing"},interfaceSettings:"Interface Settings",threadView:"View as threads",apply:"Apply",today:"Today",addToNew:"Add to new",addToReply:"Add to reply",condition:"If condition is met",allConditions:"All conditions",oneCondition:"At least one condition",addCondition:"Add condition",addAction:"Add action",deleteCondition:"Delete condition",then:"Then",deleteFilter:"Delete filter",addFilter:"Add filter",maskAsRead:"Mark as read",maskAsFavorite:"Mask as favorite",fromField:"«From» field",toField:"«To» field",subjectField:"«Subject» field",bodyField:"«Body» field",ccField:"«Cc» field",bccField:"«Bcc» field",contains:"Contains",notContain:"Does not contain",containsAddressBook:"Contains contacts from the address book",notContainsAddressBook:"Does not contain contacts from the address book",moveToFolder:"Move to folder",moveToTrash:"Move to trash",deletePermanently:"Delete permanently",sendCopy:"Send a copy",autoReply:"Auto-reply",filterName:"Filter name",filterEnabled:"Filter enabled",filterDisabled:"Filter disabled",parameter:"Parameter",conditionName:"Condition",addDescription:"Add a description",addressBook:"Select address books",action:"Action",actionDescription:"Action Description",folder:"Folder",setFlag:"Mark as important",or:"or",and:"and",enableFilter:"Enable filter",enableFilterShort:"On",disableFilter:"Disable filter",runNow:"Run now",name:"Name",emptyMessage:"Customize your rules for sorting and processing emails using flexible built-in filters",enableResend:"Enable forwarding",disabledResend:"Forwarding is off",checkRead:"Mark forwarded emails as read",removeResendMessages:"Remove forwarded messages",resendDescription:"Forward all incoming emails except spam to:",resendAddress:"Forwarding address",enableResponder:"Enable responder",disabledResponder:"Autoresponder is off",responderDescription:"Automatically sends a reply to incoming emails. If a user sends you multiple emails, an automatic reply will be sent no more than once every four days.",enabledInPeriod:"Apply during a limited period",notSpecified:"Not Specified",responderTheme:"Message subject (optional)",responderText:"Auto-reply text",replaysTo:"Reply only to selected contacts",organisation:"Organization contacts",personal:"Personal contacts",favorite:"Favorite contacts",forNewMessages:"For new messages",forAnswer:"For replies and forwarding",signText:"Signature text",addUser:"Add company user",owner:"Owner",notFound:"Users not found",readRights:"Read",editRights:"Edit",fullRights:"Full access",sharingEnabled:"Shared access enabled",sharingDisabled:"Shared access disabled",sharingDesc:"Selected users will get access to this mail account with respect to the specified access level.",invalidFilter:"Filter not applied: folder deleted or unavailable. Select another folder.",folderRemoved:"Folder removed",notification:{sharingSaved:"Shared access successfully added",address:"Enter forwarding address",filterDeleted:"Filter deleted successfully",error:"Unknown error",filterSaved:"Filter saved successfully",filterApplied:"Filter applied successfully",resendSaved:"Forward saved successfully",responderSaved:"Responder saved successfully",needText:"Enter auto-reply text",signSaved:"Signature saved successfully",actionTextError:"Add at least one action"},validation:{enterDescription:"Enter a description for the condition",max100Symbols:"Maximum 100 symbols",selectConditions:"Select a filter condition",selectParams:"Select a filter parameter",maxLength:"The length of the filter name exceeds the maximum allowed value (100 characters)",selectAction:"Select an action",selectFolder:"Select a folder",compareDate:"The end date of the period must be greater than the start date",tillDateRequired:"End date of the period is required",wrongEmail:"Wrong email format",needEmail:"Enter forwarding address",emptyField:"Field cannot be empty",selectAddressBook:"Select an address book"}},mct={resetFilters:"Reset filters",search:"Search",find:"Find",from:"From",unread:"Unread",important:"Important",to:"To",subject:"Subject",containsWords:"Contains words",date:"Date",size:"Size",whereToSearch:"Where to search",hasAttachments:"Has attachments",enterValue:"Search",greater:"Greater",lesser:"Lesser",kb:"Kb",mb:"Mb"},gct={unread:"Unread",important:"Important",withAttachments:"With attachments",clearFilters:"Clear filters",newestFirst:"Newest first",olderFirst:"Oldest first"},yct={tip:"You can only enter letters, numbers, spaces and the symbols _-+=()$",nameLength:"The name must not exceed 100 characters.",nameLength2:"The signature length must not exceed 512 characters.",wrongDate:"Invalid date"},vct={textColorControlLabel:"Text color",undoControlLabel:"Undo",redoControlLabel:"Redo",fontControlLabel:"Font",boldControlLabel:"Bold",hrControlLabel:"Divider",italicControlLabel:"Italic",underlineControlLabel:"Underlined",strikeControlLabel:"Strikethrough",clearFormattingControlLabel:"Clear formatting",linkControlLabel:"Link",linkEditorInputPlaceholder:"Enter a link",linkEditorExternalLink:"Open link in a new window",linkEditorInternalLink:"Open link in the same window",linkEditorSave:"Save",unlinkControlLabel:"Remove link",bulletListControlLabel:"Bulleted list",orderedListControlLabel:"Numbered list",h1ControlLabel:"Heading H1",h2ControlLabel:"Heading H2",h3ControlLabel:"Heading H3",h4ControlLabel:"Heading H4",blockquoteControlLabel:"Quote",alignLeftControlLabel:"Align left",alignCenterControlLabel:"Center",alignRightControlLabel:"Align right",alignJustifyControlLabel:"Justify",codeControlLabel:"Code",subscriptControlLabel:"Subscript",superscriptControlLabel:"Superscript",highlightControlLabel:"Highlight",linkError:"Link error",uploadError:"Uploading error"},bct={inbox:"Inbox",sent:"Sent",drafts:"Drafts",junk:"Junk",trash:"Trash",outbox:"Outbox",archive:"Archive",snoozed:"Snoozed",templates:"Templates",errors:"Errors",shared:"Shared"},xct={heading:"Something went wrong",heading2:"No configured account ",heading3:"This page does not exist",description:"Try reloading the page or visit later",description2:"To use the R7-Mail module, set up an account in your profile",description3:"The page you are trying to access does not exist. You may have mistyped the address, or the page has been moved to a different URL.",description4:"We are already working on this. Please try again later.",button:"Reload the page",button2:"Set up account",button3:"Go to Inbox"},wct={organizer:"organizer",eventTheme:"Event theme",eventOutdated:"This event has been modified in the meantime.",eventDenied:"This event does not exist anymore.",successResponse:"Your response has been sent to the sender",days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],addCalendar:"Add to calendar",openCalendar:"Open in calendar",approveInvitation:"Approve invitation",eventCanceled:"Event canceled",eventError:"Error",yes:"Yes",no:"No",possible:"Possible",tooltipEventsMessage:{null:"Unknown",new:"New",canceled:"Canceled",accepted:"Accepted",denied:"Denied",pending:"Pending",outdated:"Outdated"}},Sct={copy:"Copy",copyAll:"Copy all",delete:"Delete",edit:"Edit"},Cct={schedule:"Schedule",scheduleSend:"Schedule send",messageScheduled:"Message scheduled for {{date}}",cancelSend:"Cancel send",scheduledList:"Scheduled",messageSending:"Scheduled messages will be sent at the appointed time.",dateTime:"Date and time",pastTimeError:"Selected time is less than current time. Please select a time in the future."},kct={action:"Snooze",title:"Snooze receipt",submit:"Snooze",success:"Receipt snoozed until {{date}}",error:"Failed to snooze message",banner:"Receipt snoozed until {{date}}",bannerNoDate:"Receipt snoozed",returnToInbox:"Return to Inbox",returnSuccess:"Message returned to Inbox",returnError:"Failed to return message to Inbox",laterToday:"Later today",tomorrow:"Tomorrow",nextWeek:"Next week"},Ect={createMessage:eat,logoTitle:tat,noTheme:nat,draft:rat,links:sat,headTitle:oat,newMessage:iat,mobileCreateMessage:aat,addAFolder:lat,addLabel:cat,edit:uat,editFolder:dat,editSettings:fat,send:pat,sendNow:hat,sendMessage:mat,createEvent:gat,inContacts:yat,myPersonal:vat,findAllMessages:bat,messageSending:xat,cancelSendBtn:wat,draftSaved:Sat,draftSavedDesktop:Cat,draftSavedMobile:kat,draftNotSaved:Eat,cancelSelection:Tat,draftIsRunning:Mat,delete:"Delete",update:jat,labels:Aat,upperCaseLabels:_at,markAsRead:Rat,markAsUnread:Dat,moveToArchive:Iat,markAsImportant:Oat,markAsUnImportant:Nat,reply:Lat,printing:$at,replyToAll:Fat,newMessageWindow:zat,forward:Pat,searchUser:Bat,view:Hat,download:Uat,from:Vat,subject:qat,to:Wat,cc:Yat,bcc:Gat,bccForm:Kat,back:Xat,hideAttach:Zat,addCopies:Qat,downloadToDisk:Jat,addToCalendar:elt,move:tlt,notSpam:nlt,markAsSpam:rlt,cancel:slt,save:olt,add:ilt,enable:alt,disable:llt,cancelChanges:clt,folderName:ult,file_one:dlt,file_other:flt,expandPanel:plt,loading:hlt,loadingFiles:mlt,remaining:glt,remained:ylt,file:vlt,files:blt,uploadCompleted:xlt,uploadPartiallyCompleted:wlt,uploadError:Slt,uploadInterrupted:Clt,uploadInterruptedNetwork:klt,uploadInterruptedQuota:Elt,filesUploadInterrupted:Tlt,reloadFiles:Mlt,reloadFile:jlt,deleteFile:Alt,invalidType:_lt,insertImage:Rlt,addAContact:Dlt,cleanTrash:Ilt,cleanTrashShort:Olt,copyAllEmails:Nlt,copyDesc:Llt,copySelect:$lt,noResultsFound:Flt,separate:zlt,doNotSeparate:Plt,more:Blt,paginationFrom:Hlt,toMe:Ult,allMail:Vlt,allMails:qlt,onlyMail:Wlt,attachments:Ylt,pieces:Glt,mb:Klt,kb:Xlt,search_result:Zlt,toolbar:Qlt,resizableButtons:Jlt,fileAccess:ect,clearFormatting:tct,selectFont:nct,selectSize:rct,selectColor:sct,selectEmoji:oct,createTable:ict,advancedFormattingFeatures:act,size:lct,userMenu:cct,options:uct,messages:dct,notifications:fct,modals:pct,settings:hct,inputFilters:mct,messageFilter:gct,validations:yct,editor:vct,readOnlyLabels:bct,warningBoundaryText:xct,calendarIntegration:wct,contextMenu:Sct,delayedSend:Cct,snooze:kct},Tct="Создать сообщение",Mct="Почта - Р7-Офис",jct="без темы",Act="Черновик",_ct="Cсылки",Rct="Р7-Почта",Dct="Новое письмо",Ict="Написать",Oct="Добавить папку",Nct="Добавить ярлык",Lct="Редактировать",$ct="Редактировать",Fct="Настроить",zct="Отправить",Pct="Отправить сейчас",Bct="Отправить сообщение",Hct="Создать событие",Uct="Организация",Vct="Личные",qct="Найти все письма",Wct="Отправляем сообщение",Yct="Отмена",Gct="Черновик сохранен",Kct="Изменения сохранены",Xct="Сохранено",Zct="Изменения не сохранены",Qct="Сохранение...",Jct="Отменить выбор",eut="Обновить",tut="Ярлыки",nut="ЯРЛЫКИ",rut="Отметить как прочитанное",sut="Отметить как непрочитанное",out="В архив",iut="Отметить как важное",aut="Снять отметку",lut="Ответить",cut="Печать",uut="Ответить всем",dut="Открыть в новом окне",fut="Переслать",put="Найти письмо по отправителю",hut="Открыть",mut="Загрузить",gut="От",yut="Тема",vut="Кому",but="Копия",xut="Скрытая",wut="Скрытая копия",Sut="Назад",Cut="Убрать вложения",kut="Добавить на Диск",Eut="Добавить копии",Tut="Добавить в Календарь",Mut="Переместить",jut="Не спам",Aut="Отмена",_ut="Сохранить",Rut="Добавить",Dut="Включить",Iut="Выключить",Out="Отменить изменения",Nut="Отметить как спам",Lut="Название папки",$ut="+ {{count}} Файл",Fut="+ {{count}} Файла",zut="+ {{count}} Файлов",Put="Раскрыть панель",But="Загрузка...",Hut="Загрузка",Uut="Осталось",Vut="Остался",qut="файл",Wut="файла",Yut="Загрузка завершена",Gut="Загрузка завершена частично",Kut="Ошибка загрузки",Xut="Не удалось загрузить файл(ы), попробуйте ещё раз",Zut="Загрузка прервана, проверьте соединение",Qut="Диск заполнен. Обратитесь к администратору.",Jut="Ошибка, загрузка прервана",edt="Перезагрузить файлы",tdt="Перезагрузить файл",ndt="Удалить файл",rdt="Неверный тип файла",sdt="Вставить картинку",odt="Добавить контакт",idt="Очистить корзину",adt="Очистить",ldt="Скопировать все адреса",cdt="Копирование всех адресов кнопкой либо сочетанием клавиш.",udt="Выделить часть",ddt="Результаты не найдены",fdt="Разделять",pdt="Не разделять",hdt="Еще",mdt="из",gdt="мне",ydt="Вся почта",vdt="Все почтовые адреса",bdt="Только",xdt="Вложения",wdt="шт",Sdt="Мб",Cdt="Кб",kdt="Переместить {{count}} цепочку писем",Edt="Переместить {{count}} цепочки писем",Tdt="Переместить {{count}} цепочки писем",Mdt="Переместить {{count}} цепочек писем",jdt="Переместить {{count}} цепочек писем",Adt="Результат поиска",_dt={menu:{headingTitle:"Заголовки",alignmentTitle:"Выравнивание",listTitle:"Списки",defaultsTitle:"Базовые",items:{h1:"Заголовок 1",h2:"Заголовок 2",h3:"Заголовок 3",h4:"Заголовок 4",left:"По левому краю",center:"По центру",justify:"По краям",right:"По правому краю",markList:"Маркированный список",numbList:"Нумерованный список",strikethrough:"Перечеркнутый",underline:"Подчеркнутый",italic:"Курсив",highlight:"Выделить",code:"Код"}},colors:{titles:{textColor:"Цвет текста",backgroundColor:"Цвет фона"},actionColors:{white:"Белый",black:"Чёрный",gray:"Серый",red:"Красный",pink:"Розовый",purple:"Пурпурный",violet:"Фиолетовый",blue:"Синий",skyBlue:"Голубой",cyan:"Бирюзовый",mint:"Мятный",green:"Зелёный",lime:"Лаймовый",yellow:"Жёлтый",orange:"Оранжевый"}},emoji:{faces:{label:"Эмоции",items:[{name:"Улыбающееся лицо",keywords:["улыбка","радость","позитив"]},{name:"Широкая улыбка",keywords:["улыбка","радость"]},{name:"Лицо со слезами радости",keywords:["смех","смешно","лол"]},{name:"Катаюсь по полу от смеха",keywords:["ржака","смешно"]},{name:"Улыбка с большими глазами",keywords:["улыбка","весёлый"]},{name:"Улыбка со счастливыми глазами",keywords:["радость"]},{name:"Улыбка со вспотевшим лицом",keywords:["облегчение","нервно"]},{name:"Улыбка со слезой",keywords:["слегка грустно","гордость"]},{name:"Тёплая улыбка",keywords:["дружелюбие","тепло"]},{name:"Лёгкая улыбка",keywords:["нормально","окей"]},{name:"Подмигивание",keywords:["подмигнуть","флирт"]},{name:"Облегчённое лицо",keywords:["спокойно","расслабленно"]},{name:"Влюблённое лицо",keywords:["любовь","нравится"]},{name:"Восторг",keywords:["вау","впечатлён"]},{name:"Воздушный поцелуй",keywords:["поцелуй","любовь"]},{name:"Лицо с поцелуем",keywords:["поцелуй"]},{name:"Поцелуй с улыбкой",keywords:["поцелуй"]},{name:"Подмигивание с языком",keywords:["шутка","игриво"]},{name:"Высунутый язык",keywords:["глупость"]},{name:"Крутое лицо в очках",keywords:["круто","расслабленно"]},{name:"Думающее лицо",keywords:["хмм","вопрос"]},{name:"Лицо с приподнятой бровью",keywords:["сомнение","скепсис"]},{name:"Хитрая ухмылка",keywords:["ухмылка"]},{name:"Сдерживаю слёзы",keywords:["милота","трогательно"]},{name:"Громкий плач",keywords:["грусть","слёзы"]},{name:"Злое лицо",keywords:["злость","ярость"]},{name:"Раздражение",keywords:["фрустрация"]},{name:"Крик ужаса",keywords:["шок","страх"]},{name:"Спящее лицо",keywords:["сон","усталость"]},{name:"Разрыв мозга",keywords:["офигеть","шок"]},{name:"Обнимающее лицо",keywords:["объятие","забота"]}]},gestures:{label:"Жесты и реакции",items:[{name:"Палец вверх",keywords:["лайк","одобрение","да"]},{name:"Палец вниз",keywords:["дизлайк","нет"]},{name:"Аплодисменты",keywords:["аплодисменты","браво"]},{name:"Поднятые руки",keywords:["праздник","хвала"]},{name:"Сложенные руки",keywords:["молитва","спасибо"]},{name:"Рукопожатие",keywords:["сделка","согласие"]},{name:"Машущая рука",keywords:["привет","пока"]},{name:"Жест ОК",keywords:["ок","идеально"]},{name:"Жест мира",keywords:["мир","победа"]},{name:"Рогатый жест",keywords:["рок","метал"]},{name:"Скрещённые пальцы",keywords:["удача","надежда"]},{name:"Жест «люблю тебя»",keywords:["любовь","знак"]},{name:"Сердечные руки",keywords:["любовь","забота"]},{name:"Указующий вверх",keywords:["внимание","заметка"]},{name:"Указующий влево",keywords:["указать","влево"]},{name:"Указующий вправо",keywords:["указать","вправо"]}]},objects:{label:"Объекты и идеи",items:[{name:"Лампочка",keywords:["идея","инновация"]},{name:"Огонь",keywords:["жарко","тренд"]},{name:"Блеск",keywords:["новое","свежее"]},{name:"Звезда",keywords:["любимое","рейтинг"]},{name:"Светящаяся звезда",keywords:["выделение"]},{name:"Взрыв",keywords:["бум","эффект"]},{name:"Сто баллов",keywords:["идеально","оценка"]},{name:"Молния",keywords:["энергия","сила"]},{name:"Точная цель",keywords:["цель","фокус","задача"]},{name:"Ключ",keywords:["доступ","важно"]},{name:"Канцелярская кнопка",keywords:["закрепить","важно"]},{name:"Скрепка",keywords:["прикрепить"]},{name:"Мозг",keywords:["думать","умный"]},{name:"Пазл",keywords:["пазл","интеграция"]},{name:"Молоток и гаечный ключ",keywords:["инструменты","починка"]},{name:"Пробирка",keywords:["эксперимент","лаборатория"]}]},celebration:{label:"Праздники и успех",items:[{name:"Хлопушка",keywords:["праздник","ура"]},{name:"Праздничное лицо",keywords:["вечеринка","весело"]},{name:"Конфетти",keywords:["праздник"]},{name:"Подарок",keywords:["презент","сюрприз"]},{name:"Шарик",keywords:["день рождения","веселье"]},{name:"Торт ко дню рождения",keywords:["день рождения"]},{name:"Бутылка шампанского",keywords:["шампанское","праздник"]},{name:"Бокалы",keywords:["чокнуться","тост"]},{name:"Трофей",keywords:["достижение","победа"]},{name:"Золотая медаль",keywords:["победитель"]},{name:"Военная медаль",keywords:["награда"]},{name:"Спортивная медаль",keywords:["медаль"]},{name:"Музыкальная нота",keywords:["музыка"]},{name:"Микрофон",keywords:["пение","говорить"]},{name:"Хлопушка фильма",keywords:["видео","фильм"]},{name:"Видеоигра",keywords:["игра"]}]},food:{label:"Еда и напитки",items:[{name:"Горячий напиток",keywords:["кофе","чай"]},{name:"Баббл-ти",keywords:["чай","напиток"]},{name:"Стакан с трубочкой",keywords:["сода","напиток"]},{name:"Пицца",keywords:["еда","итальянская"]},{name:"Гамбургер",keywords:["бургер","фастфуд"]},{name:"Хот-дог",keywords:["фастфуд"]},{name:"Картофель фри",keywords:["фри"]},{name:"Буррито",keywords:["ролл","мексиканская"]},{name:"Суши",keywords:["японская","рыба"]},{name:"Зелёный салат",keywords:["здоровая еда"]},{name:"Пончик",keywords:["десерт","сладкое"]},{name:"Печенье",keywords:["сладкое","бисквит"]},{name:"Пирожное",keywords:["торт","десерт"]},{name:"Кружка пива",keywords:["напиток","вечеринка"]},{name:"Бокал вина",keywords:["вино","расслабиться"]},{name:"Коктейль",keywords:["коктейль"]},{name:"Красное яблоко",keywords:["фрукт","яблоко"]},{name:"Клубника",keywords:["фрукт","ягода"]}]},symbols:{label:"Символы",items:[{name:"Красное сердце",keywords:["любовь","сердце"]},{name:"Оранжевое сердце",keywords:["любовь","тепло"]},{name:"Жёлтое сердце",keywords:["дружба","теплота"]},{name:"Зелёное сердце",keywords:["рост","природа"]},{name:"Синее сердце",keywords:["доверие","спокойствие"]},{name:"Фиолетовое сердце",keywords:["забота","сострадание"]},{name:"Чёрное сердце",keywords:["тёмное","готика"]},{name:"Белое сердце",keywords:["чистота","нежность"]},{name:"Коричневое сердце",keywords:["тепло","земля"]},{name:"Галочка",keywords:["ок","готово"]},{name:"Крестик",keywords:["нет","отмена"]},{name:"Восклицательный знак",keywords:["внимание","важно"]},{name:"Вопросительный знак",keywords:["вопрос","помощь"]},{name:"Плюс",keywords:["добавить","плюс"]},{name:"Минус",keywords:["убрать","минус"]},{name:"Сообщение",keywords:["сообщение","чат"]},{name:"Громкоговоритель",keywords:["объявление"]},{name:"Канцелярская кнопка",keywords:["закрепить","важно"]}]}},table:{insertTable:"Вставить таблицу",deleteTable:"Удалить таблицу",addRowAbove:"Добавить строку выше",addRowBelow:"Добавить строку ниже",deleteRow:"Удалить строку",addColumnLeft:"Добавить столбец слева",addColumnRight:"Добавить столбец справа",deleteColumn:"Удалить столбец",mergeCells:"Объединить ячейки",toggleHeaderRow:"Сделать строку заголовком",toggleHeaderColumn:"Сделать столбец заголовком",toggleHeaderCell:"Сделать ячейку заголовком",fixTable:"Исправить таблицу"}},Rdt={smallSize:"Маленький",optimalSize:"Оптимальный",originalSize:"Исходный"},Ddt={read:"Чтение",comment:"Комментирование",edit:"Запись"},Idt="Выбрать шрифт",Odt="Выбрать размер",Ndt="Выбрать цвет",Ldt="Выбрать эмоджи",$dt="Создать таблицу",Fdt="Расширенные функции форматирования",zdt="Размер",Pdt="Очистить форматирование",Bdt={dashboard:"Главная",profile:"Профиль",subscribe:"Подписка",download:"Скачать",report:"Сообщить об ошибке",logOut:"Выйти"},Hdt={duplicate:"Данный Email уже добавлен"},Udt={chainsNotSelected:"Цепочки не выбраны",chainSelected:"Выбрана цепочка",chainsSelected:"Выбрано цепочек",noMessagesFound:"Таких писем мы не нашли",noMessagesDesc:"Попробуйте изменить параметры запроса и повторить поиск.",noLettersWithLabels:"Письма с ярлыком",noLettersWithLabelsDesc:"Добавляйте один или несколько ярлыков к выбранным письмам — это еще один способ быстро находить нужное.",noIncomingMessages:"Входящие письма",noIncomingMessagesDesc:"Сюда по умолчанию попадают письма, пришедшие на ваш адрес электронной почты.",noSentLetters:"Отправленные письма",noSentLettersDesc:"Все письма, которые вы отправите, можно будет найти здесь.",noDraftsCreated:"Черновики",noDraftsCreatedDesc:"Черновики сохраняются автоматически, если вы начали писать или редактировать письмо. Вернуться к черновику можно в любой момент.",noSpam:"Ура, спама нет!",noSpamDesc:"Сюда попадают письма с подозрением на спам. Если вы считаете, что письмо оказалось здесь по ошибке, его можно восстановить.",noFolderFound:"Папки не найдены",noLabelsFound:"Ярлыки не найдены",emptyTrash:"Корзина пуста, мусор выброшен",emptyTrashDesc:"Все удаленные письма сначала попадают в корзину. Здесь их можно удалить окончательно или восстановить.",noOutboxLetters:"Исходящие письма",noOutboxLettersDesc:"Здесь отображаются письма, которые находятся в процессе отправки.",noArchivedLetters:"Архивированные письма",noArchivedLettersDesc:"Здесь сохраняются письма, которые вы переместили в архив для долгого хранения.",noTemplatesLetters:"Шаблоны писем",noTemplatesLettersDesc:"Здесь хранятся шаблоны писем, которые вы можете использовать для быстрого создания и повторного отправления сообщений.",noErrorsLetters:"Ошибки отправки",noErrorsLettersDesc:"Здесь хранятся письма, которые не удалось отправить из-за ошибок. Эти сообщения сохраняются системой для просмотра.",emptyFolder:"Папка для писем",emptyFolderDesc:"Создавайте новые папки, чтобы навести привычный порядок. ",draftWillNotSave:"Черновик не будет сохранен"},Vdt={status:{error:"Ошибка",success:"Успешно"},messages:{movedTo:"Перемещено в папку",sentToInbox:"Отправлено во входящие",sentToSpam:"Отправлено в спам",sentToArchive:"Отправлено в архив",messageDeleted_one:"{{count}} сообщение удалено",messageDeleted_two:"{{count}} сообщения удалено",messageDeleted_few:"{{count}} сообщения удалено",messageDeleted_many:"{{count}} сообщений удалено",messageDeleted_other:"{{count}} сообщений удалено",allMessagesDeleted:"Все сообщения удалены",errorAddress:'Адрес: "{{emails}}" не распознан. Проверьте правильность ввода всех адресов.',setAddress:"Пожалуйста, укажите адрес получателя",notSentLetter:"Письмо не отправлено",messageWasSent:"Сообщение было отправлено",messageWasNotSent:"Сообщение не было отправлено",draftSavingFailed:"Не получилось сохранить черновик! Попробуйте позже",fileSize:"Превышен допустимый размер вложений (25 МБ)",editFolder:'Папка "{{oldName}}" успешно отредактирована в "{{newName}}"',createFolder:'Папка "{{newName}}" успешно создана',deleteFolder:'Папка "{{label}}" успешно удалена',deleteLabel:'Ярлык "{{label}}" успешно удален.',labelEdited:'Ярлык "{{label}}" успешно отредактирован в "{{newName}}".',labelColorEdited:'Цвет ярлыка "{{label}}" успешно обновлен.',labelCreated:'Ярлык "{{label}}" успешно создан.',notFoundFolder:'Папка "{{label}}" не найдена',deleteFolderError:"Произошла ошибка при удалении папки",existedFolder:'Папка с названием "{{folder}}", уже существует',existedLabel:'Ярлык с названием "{{label}}", уже существует',sentToTrash:"Отправлено в корзину",sentToTrash_one:"{{count}} сообщение отправлено в корзину",sentToTrash_two:"{{count}} сообщения отправлено в корзину",sentToTrash_few:"{{count}} сообщения отправлено в корзину",sentToTrash_many:"{{count}} сообщений отправлено в корзину",sentToTrash_other:"{{count}} сообщений отправлено в корзину",savingFile:'Файл сохранен в папке "Мои документы" как "{{data}}"',editImage:"В редактор можно загружать только изображения",editorAvailable:"Редактор не обнаружен",unknownError:"Неизвестная ошибка",globalError:"Ошибка при выполнении задания",authToken:"Отсутствует токен авторизации. Необходимо выполнить вход в систему заново.",errorEmail:"Указанная строка не является почтовым адресом.",existedEmail:"Данный email уже добавлен.",messageWillBeSend:"Сообщение будет отправлено в {{data}}",sendingCanceled:"Отправка сообщения отменена. Сообщение перемещено в черновики"}},qdt={titles:{deleteTitle:"Удаление",move:"Переместить",moveToSpam:"Отметить как спам?",restoreFromSpam:"Восстановить письма?",moving:"Перемещение",newFolder:"Новая папка",editingFolder:"Редактирование папки",deleteFolder:"Удалить папку",searchUsers:"Поиск пользователей",userNotFound:"Пользователь не найден",labelName:"Название ярлыка",editLabel:"Редактирование ярлыка",createLabel:"Создание ярлыка",unsavedChanges:"Несохраненные изменения",deleteLabel:"Удалить ярлык?",deleteDraft:"Черновик удален",deleteDraftError:"Ошибка в удаление черновика",accessFileTitle:"Доступ к файлам",largeFilesTitle:"Отправка больших файлов",scheduleMessage:"Запланировать отправку",cancelSend:"Отменить отправку?"},text:{deleteSelectedMessagesFromTrash:"Удалить выбранные сообщения?",deleteAllMessagesFromTrash:"Удалить все сообщения?",deleteSelectedMessagesToTrash:"Все письма будут перемещены в корзину",deleteFolderText:"Все письма будут перемещены в корзину",unsavedChangesText:"Вы действительно хотите покинуть страницу? Несохраненные  изменения будут утеряны.",dropZoneMessage:"Прикрепить файлы",removeAllLabelFromMessages:"Снять ярлык с писем и удалить его?",moveMultipleMessagesToTrash:"Выбранные письма будут перемещены в корзину",moveMultipleMessagesToFolder:"Выбранные письма будут перемещены в {{folder}}",moveSingleMessageToFolder:"Выбранное письмо будет перемещено в {{folder}}",restoreFromSpamMessage:"Вы хотите восстановить выбранные письма из папки «спам»?",accessFileText:"Разрешить доступ всем, у кого есть ссылка. Изменить настройки доступа после отправки можно в настройках файлов на Р7-Диске.",accessFileHint:"Пользователи смогут просматривать файлы до тех пор, пока будет открыт доступ.",accessFileSelectText:"Доступ к файлам",largeFilesText:"Когда объем прикрепляемых файлов превышает 25 МБ, они могут быть загружены на Р7-Диск и добавлены в виде ссылок в письмо.",largeFilesLinkDisabledText:"Размер файла для отправки в письме ограничен 25 МБ. Используйте другой способ поделиться файлом или обратитесь к администратору.",cancelSendText:"Вы действительно хотите отменить отправку? Сообщение будет отправлено в черновики."},controls:{delete:"Удалить",create:"Создать",cancel:"Отмена",cancelSend:"Отменить",save:"Сохранить",move:"Переместить",restore:"Восстановить",dropChanges:"Выйти без сохранения",stayOnPage:"Остаться на странице",toolbar:"Вызов панели",attach:"Прикрепить файлы",photo:"Добавить фото",deleteDraft:"Удалить черновик",deleteAllFiles:"Все вложения успешно удалены",attachDisk:"Вставить файлы на диске",continue:"Продолжить",close:"Закрыть",ok:"Понятно",schedule:"Запланировать",previousChoice:"Предыдущий выбор",tomorrowMorning:" Завтра утром",tomorrowAfternoon:"Завтра днем",setDate:"Настроить дату и время",selectTime:"Выберите время",selectTimezone:"Выберите часовой пояс",datePlaceholder:"ДД:ММ:ГГГГ"}},Wdt={titles:{settings:"Настройки",generalSettings:"Общие настройки",signature:"Подпись",filter:"Фильтр",filters:"Фильтры",editFilter:"Настройка фильтра",newFilter:"Новый фильтр",responder:"Автоответчик",resend:"Пересылка",sign:"Подпись",share:"Совместный доступ"},interfaceSettings:"Настройки интерфейса",threadView:"Просмотр в виде цепочек",apply:"Применить",today:"Сегодня",addToNew:"Добавить для новых",addToReply:"Добавить для ответа и пересылки",condition:"Если выполнены",allConditions:"Все условия",oneCondition:"Хотя бы одно",addCondition:"Добавить условие",addAction:"Добавить действие",deleteCondition:"Удалить условие",then:"Тогда",deleteFilter:"Удалить фильтр",addFilter:"Добавить фильтр",maskAsRead:"Отметить как прочитанное",moveToTrash:"Переместить в корзину",maskAsFavorite:"Пометить избранным",fromField:"Поле «От»",toField:"Поле «Кому»",subjectField:"Поле «Тема»",bodyField:"Поле «Тело»",ccField:"Поле «Копия»",bccField:"Поле «Скрытая копия»",contains:"Содержит",notContain:"Не содержит",containsAddressBook:"Содержит контакты из книги",notContainsAddressBook:"Не содержит контакты из книги",moveToFolder:"Поместить в папку",deletePermanently:"Удалить навсегда",sendCopy:"Переслать по адресу",autoReply:"Отправить автоответ",filterName:"Название фильтра",filterEnabled:"Фильтр включен",filterDisabled:"Фильтр выключен",parameter:"Параметр",conditionName:"Условие",addDescription:"Добавьте описание",addressBook:"Выберите адресные книги",action:"Действие",actionDescription:"Описание действия",folder:"Папка",setFlag:"Отметить как важное",or:"или",and:"и",enableFilter:"Включить фильтр",enableFilterShort:"Вкл",disableFilter:"Выключить фильтр",runNow:"Запустить сейчас",name:"Название",emptyMessage:"Настраивайте свои правила сортировки и обработки писем с помощью гибких встроенных фильтров",enableResend:"Пересылка включена",disabledResend:"Пересылка выключена",checkRead:"Отметить пересланные письма как прочитанные",removeResendMessages:"Переместить пересланные письма в корзину",resendDescription:"Все письма кроме спама будут пересланы на указанный адрес.",resendAddress:"Адрес для пересылки",enableResponder:"Автоответчик включен",disabledResponder:"Автоответчик выключен",responderDescription:"Автоматически отправляет ответ на входящие письма. Если пользователь отправляет вам несколько писем, автоматический ответ будет отправляться не чаще одного раза в четыре дня.",enabledInPeriod:"Применять в ограниченный период",notSpecified:"Не задано",responderTheme:"Тема сообщения (не обязательно)",responderText:"Текст автоответа",replaysTo:"Отвечать только выбранным контактам",organisation:"Контакты организации",personal:"Личные контакты",favorite:"Избранные контакты",forNewMessages:"Для новых сообщений",forAnswer:"Для ответов и пересылок",signText:"Текст подписи",sharingEnabled:"Совместный доступ включен",sharingDisabled:"Совместный доступ выключен",sharingDesc:"Выбранные пользователи получат доступ к этому почтовому аккаунту с учетом ограничений по уровню доступа.",addUser:"Добавить пользователя компании",owner:"Владелец",notFound:"Пользователей не найдено",readRights:"Чтение",editRights:"Редактирование",fullRights:"Полный доступ",invalidFilter:"Фильтр не применяется: папка удалена или недоступна. Выберите другую папку.",folderRemoved:"Папка удалена",notification:{address:"Введите адрес для пересылки",filterDeleted:"Фильтр успешно удален",error:"Неизвестная ошибка",filterSaved:"Фильтр успешно сохранен",filterApplied:"Фильтр применен успешно",resendSaved:"Пересылка успешно сохранена",responderSaved:"Автоответчик успешно сохранен",needText:"Введите текст автоответа",signSaved:"Подпись успешно сохранена",actionTextError:"Добавьте хотя бы одно действие",sharingSaved:"Совместный доступ успешно добавлен"},validation:{enterDescription:"Введите описание условия",max100Symbols:"Максимум 100 символов",selectConditions:"Выберите условие фильтра",selectParams:"Выберите параметр фильтра",maxLength:"Длина названия фильтра превышает максимально допустимое значение (100 символов)",selectAction:"Выберите действие",selectFolder:"Выберите папку",compareDate:"Дата окончания периода должна быть больше даты начала",tillDateRequired:"Необходимо указать дату окончания периода",wrongEmail:"Неправильный формат email",needEmail:"Введите адрес для пересылки",selectAddressBook:"Выберите адресную книгу",emptyField:"Поле не может быть пустым"}},Ydt={resetFilters:"Сбросить фильтры",search:"Поиск",find:"Найти",from:"От кого",to:"Кому",subject:"Тема",containsWords:"Содержит слова",date:"Дата",size:"Размер",whereToSearch:"Где искать",hasAttachments:"Есть вложения",unread:"Непрочитанные",important:"Важные",enterValue:"Поиск",greater:"Больше",lesser:"Меньше",kb:"Кб",mb:"Мб"},Gdt={unread:"Непрочитанные",important:"Важные",withAttachments:"С вложением",clearFilters:"Очистить фильтры",newestFirst:"Сначала новые",olderFirst:"Сначала старые"},Kdt={tip:"Вводить можно только буквы, цифры, пробелы и символы _-+=()$",nameLength:"Название не должно превышать 100 символов.",nameLength2:"Длина подписи не должна превышать 512 символов.",wrongDate:"Неверная дата"},Xdt={textColorControlLabel:"Цвет текста",undoControlLabel:"Отменить",redoControlLabel:"Повторить",fontControlLabel:"Шрифт",boldControlLabel:"Жирный",hrControlLabel:"Разделитель",italicControlLabel:"Курсив",underlineControlLabel:"Подчеркнутый",strikeControlLabel:"Перечеркнутый",clearFormattingControlLabel:"Очистить форматирование",linkControlLabel:"Ссылка",linkEditorInputPlaceholder:"Укажите ссылку",linkEditorExternalLink:"Открыть ссылку в новом окне",linkEditorInternalLink:"Открыть ссылку в том же окне",linkEditorSave:"Сохранить",unlinkControlLabel:"Удалить ссылку",bulletListControlLabel:"Маркированный список",orderedListControlLabel:"Нумерованный список",h1ControlLabel:"Заголовок H1",h2ControlLabel:"Заголовок H2",h3ControlLabel:"Заголовок H3",h4ControlLabel:"Заголовок H4",blockquoteControlLabel:"Цитата",alignLeftControlLabel:"По левому краю",alignCenterControlLabel:"По центру",alignRightControlLabel:"По правому краю",alignJustifyControlLabel:"По краям",codeControlLabel:"Код",subscriptControlLabel:"Нижний индекс",superscriptControlLabel:"Верхний индекс",highlightControlLabel:"Выделить",linkError:"Ошибка в ссылке",uploadError:"Ошибка в загрузке"},Zdt={inbox:"Входящие",sent:"Отправленные",drafts:"Черновики",junk:"Спам",trash:"Корзина",outbox:"Исходящие",archive:"Архивы",snoozed:"Отложенные",templates:"Шаблоны",errors:"Ошибки",shared:"Общие"},Qdt={heading:"Что-то пошло не так",heading2:"Нет настроенной учетной записи ",heading3:"Такой страницы не существует",description:"Попробуйте перезагрузить страницу или зайдите позже",description2:"Для использования модуля Р7-Почта настройте учетную запись в вашем профайле",description3:"Страница, которую вы пытаетесь открыть не существует. Возможно, вы ошиблись в адресе или страница была перемещена на другой URL",description4:"Мы уже работаем над этим. Попробуйте позже.",button:"Перезагрузить страницу",button2:"Настроить учетную запись",button3:"Перейти во входящие"},Jdt={organizer:"организатор",eventTheme:"Заявленная тема события ",eventOutdated:"Срок приглашения истек. Событие было изменено.",eventDenied:"Событие было отменено.",successResponse:"Ваш ответ был выслан отправителю",days:["Воскресенье","Понедельник","Вторник","Среда","Четверг","Пятница","Суббота"],months:["Января","Февраля","Марта","Апреля","Мая","Июня","Июля","Августа","Сентября","Октября","Ноября","Декабря"],addCalendar:"Добавить в календарь",openCalendar:"Открыть в календаре",approveInvitation:"Подтвердить участие",eventError:"Ошибка",eventCanceled:"Событие отменено",yes:"Да",no:"Не смогу",possible:"Возможно",tooltipEventsMessage:{null:"Нет события",new:"Новое",canceled:"Отменено организатором",accepted:"Принято",denied:"Отклонено",pending:"Под вопросом",outdated:"Устарело"}},eft={copy:"Копировать",copyAll:"Копировать все",delete:"Вырезать",edit:"Изменить адрес"},tft={schedule:"Запланировать",scheduleSend:"Запланировать отправку",messageScheduled:"Отправка сообщения запланирована на {{date}}",cancelSend:"Отменить отправку",scheduledList:"Запланированные",messageSending:"Запланированные сообщения будут отправлены в назначенное время.",dateTime:"Дата и время",pastTimeError:"Выбрано время меньше текущего. Пожалуйста, выберите время в будущем."},nft={action:"Отложить",title:"Отложить получение",submit:"Отложить",success:"Получение отложено на {{date}}",error:"Не удалось отложить письмо",banner:"Получение отложено на {{date}}",bannerNoDate:"Получение отложено",returnToInbox:"Вернуть во Входящие",returnSuccess:"Письмо возвращено во Входящие",returnError:"Не удалось вернуть письмо во Входящие",laterToday:"Позже сегодня",tomorrow:"Завтра",nextWeek:"Следующая неделя"},rft={createMessage:Tct,logoTitle:Mct,noTheme:jct,draft:Act,links:_ct,headTitle:Rct,newMessage:Dct,mobileCreateMessage:Ict,addAFolder:Oct,addLabel:Nct,edit:Lct,editFolder:$ct,editSettings:Fct,send:zct,sendNow:Pct,sendMessage:Bct,createEvent:Hct,inContacts:Uct,myPersonal:Vct,findAllMessages:qct,messageSending:Wct,cancelSendBtn:Yct,draftSaved:Gct,draftSavedDesktop:Kct,draftSavedMobile:Xct,draftNotSaved:Zct,draftIsRunning:Qct,cancelSelection:Jct,delete:"Удалить",update:eut,labels:tut,upperCaseLabels:nut,markAsRead:rut,markAsUnread:sut,moveToArchive:out,markAsImportant:iut,markAsUnImportant:aut,reply:lut,printing:cut,replyToAll:uut,newMessageWindow:dut,forward:fut,searchUser:put,view:hut,download:mut,from:gut,subject:yut,to:vut,cc:but,bcc:xut,bccForm:wut,back:Sut,hideAttach:Cut,downloadToDisk:kut,addCopies:Eut,addToCalendar:Tut,move:Mut,notSpam:jut,cancel:Aut,save:_ut,add:Rut,enable:Dut,disable:Iut,cancelChanges:Out,markAsSpam:Nut,folderName:Lut,file_one:$ut,file_few:Fut,file_many:zut,expandPanel:Put,loading:But,loadingFiles:Hut,remaining:Uut,remained:Vut,file:qut,files:Wut,uploadCompleted:Yut,uploadPartiallyCompleted:Gut,uploadError:Kut,uploadInterrupted:Xut,uploadInterruptedNetwork:Zut,uploadInterruptedQuota:Qut,filesUploadInterrupted:Jut,reloadFiles:edt,reloadFile:tdt,deleteFile:ndt,invalidType:rdt,insertImage:sdt,addAContact:odt,cleanTrash:idt,cleanTrashShort:adt,copyAllEmails:ldt,copyDesc:cdt,copySelect:udt,noResultsFound:ddt,separate:fdt,doNotSeparate:pdt,more:hdt,paginationFrom:mdt,toMe:gdt,allMail:ydt,allMails:vdt,onlyMail:bdt,attachments:xdt,pieces:wdt,mb:Sdt,kb:Cdt,moveMessage_one:kdt,moveMessage_few:Edt,moveMessage_two:Tdt,moveMessage_many:Mdt,moveMessage_other:jdt,search_result:Adt,toolbar:_dt,resizableButtons:Rdt,fileAccess:Ddt,selectFont:Idt,selectSize:Odt,selectColor:Ndt,selectEmoji:Ldt,createTable:$dt,advancedFormattingFeatures:Fdt,size:zdt,clearFormatting:Pdt,userMenu:Bdt,options:Hdt,messages:Udt,notifications:Vdt,modals:qdt,settings:Wdt,inputFilters:Ydt,messageFilter:Gdt,validations:Kdt,editor:Xdt,readOnlyLabels:Zdt,warningBoundaryText:Qdt,calendarIntegration:Jdt,contextMenu:eft,delayedSend:tft,snooze:nft},sft={en:{translation:Ect},ru:{translation:rft}};vn.use(fxe).use(_Ce).init({resources:sft,lng:"ru",fallbackLng:"ru",interpolation:{escapeValue:!1}});const OY="notification-scope",NY=t=>{const e=me.c(3),{children:n}=t;let r;if(e[0]===Symbol.for("react.memo_cache_sentinel")){const i={fontSizes:{md:"14px",lg:"16px",xl:"20px"},components:{Text:{defaultProps:{size:"lg"},styles:oft},ActionIcon:{defaultProps:{color:"gray",variant:"subtle",styles:ift}}}};r=fj(a2,i),e[0]=r}else r=e[0];const s=r;let o;return e[1]!==n?(o=d.jsx("div",{className:OY,children:d.jsx(l2,{theme:s,cssVariablesSelector:`.${OY}`,children:n})}),e[1]=n,e[2]=o):o=e[2],o};function oft(){return{root:{fontSize:"md"}}}function ift(){return{root:{marginTop:"3px"}}}const cae=t=>{const e=me.c(4),{onClick:n}=t;let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r={"&[data-disabled]":{backgroundColor:"transparent",border:"none"}},e[0]=r):r=e[0];let s;e[1]===Symbol.for("react.memo_cache_sentinel")?(s=d.jsx(T6e,{size:22,stroke:1.5}),e[1]=s):s=e[1];let o;return e[2]!==n?(o=d.jsx(Ve,{onClick:n,sx:r,size:34,children:s}),e[2]=n,e[3]=o):o=e[3],o},uae=t=>{const[e,n]=S.useState(null);return S.useEffect(()=>{if(!t||t.startsWith("data:")||t.startsWith("blob:")){n(t||null);return}if(!t.includes("/api/")){n(t);return}let r=null,s=!1;return(async()=>{try{let i=t.includes("://")?new URL(t).pathname+new URL(t).search:t;const a=await fetch(i,{credentials:"include"});if(!a.ok){n(null);return}const l=await a.blob();if(s)return;const u=(await l.slice(0,500).text()).trim().startsWith("<svg");if(!(l.type.startsWith("image/")||u||l.type==="application/octet-stream")){n(null);return}let h=l;if(u&&l.type!=="image/svg+xml"){const m=await l.text();h=new Blob([m],{type:"image/svg+xml"})}r=URL.createObjectURL(h),n(r)}catch{n(null)}})(),()=>{s=!0,r&&URL.revokeObjectURL(r)}},[t]),e},aft=t=>{const e=me.c(11),{item:n}=t,r=uae(n.Icon),s=n.Url==="";let o;e[0]!==s?(o=c=>{s&&(c.preventDefault(),c.stopPropagation())},e[0]=s,e[1]=o):o=e[1];let i;e[2]===Symbol.for("react.memo_cache_sentinel")?(i={width:24,height:24},e[2]=i):i=e[2];let a;e[3]!==r?(a=d.jsx(ie,{sx:i,children:r?d.jsx("img",{width:24,height:24,src:r,alt:"",style:{objectFit:"contain",borderRadius:4}}):d.jsx(ie,{sx:{width:24,height:24,borderRadius:4,display:"flex",backgroundColor:"#F5F6F7",alignItems:"center",justifyContent:"center",overflow:"hidden"}})}),e[3]=r,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==n.Title||e[7]!==n.Url||e[8]!==o||e[9]!==a?(l=d.jsx(et.Item,{component:"a",href:n.Url,target:"_blank",fz:14,disabled:s,onClick:o,leftSection:a,children:n.Title},n.Url),e[5]=s,e[6]=n.Title,e[7]=n.Url,e[8]=o,e[9]=a,e[10]=l):l=e[10],l},lft=t=>{const e=me.c(15),{modules:n,radius:r,links:s,hasLinks:o}=t,{t:i}=Le();let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a={transition:"pop-top-right",duration:170,timingFunction:"ease"},e[0]=a):a=e[0];let l;e[1]===Symbol.for("react.memo_cache_sentinel")?(l=d.jsx(et.Target,{children:d.jsx("div",{children:d.jsx(cae,{})})}),e[1]=l):l=e[1];let c;e[2]===Symbol.for("react.memo_cache_sentinel")?(c={boxShadow:"rgba(16, 24, 40, 0.12) 0px 12px 24px, rgba(16, 24, 40, 0.06) 0px 2px 8px",border:"none"},e[2]=c):c=e[2];let u;if(e[3]!==n||e[4]!==r){let m;e[6]!==r?(m=(y,v)=>d.jsx(et.Item,{component:"a",p:8,color:"#343A40",href:y.Url,target:"_blank",fz:14,leftSection:d.jsx(ie,{sx:{width:24,height:24},children:y.Icon?d.jsx(ie,{component:"img",src:y.Icon,width:24,height:24,style:{display:"block"}}):d.jsx(ie,{size:16,sx:{width:24,height:24,borderRadius:r(y.Name),display:"flex",backgroundColor:"#F5F6F7",alignItems:"center",justifyContent:"center",overflow:"hidden"}})}),children:y.Title},y.Url),e[6]=r,e[7]=m):m=e[7],u=n.map(m),e[3]=n,e[4]=r,e[5]=u}else u=e[5];let f;e[8]!==o||e[9]!==s||e[10]!==i?(f=o&&d.jsxs(et.Sub,{openDelay:120,closeDelay:150,position:"right-start",offset:10,children:[d.jsx(et.Sub.Target,{children:d.jsx(et.Sub.Item,{leftSection:d.jsx(I6e,{size:24,stroke:1.5,color:"#343A40"}),color:"#343A40",p:8,styles:{itemLabel:{display:"flex",alignItems:"center",gap:10}},children:i("links")})}),d.jsx(et.Sub.Dropdown,{style:{maxHeight:200,overflowY:"auto"},sx:{boxShadow:"rgba(16, 24, 40, 0.12) 0px 12px 24px, rgba(16, 24, 40, 0.06) 0px 2px 8px",border:"none"},children:s.map(cft)})]}),e[8]=o,e[9]=s,e[10]=i,e[11]=f):f=e[11];let h;return e[12]!==u||e[13]!==f?(h=d.jsxs(et,{radius:"md",position:"bottom-end",transitionProps:a,children:[l,d.jsxs(et.Dropdown,{miw:150,sx:c,children:[u,f]})]}),e[12]=u,e[13]=f,e[14]=h):h=e[14],h};function cft(t){return d.jsx(aft,{item:t})}const uft=t=>{const e=me.c(17),{item:n}=t,r=uae(n.Icon),s=n.Url==="";let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o={itemLabel:{width:"100%",outline:"none"}},e[0]=o):o=e[0];const i=s?"none":"auto",a=s?.5:1,l=s?"default":"pointer";let c;e[1]!==i||e[2]!==a||e[3]!==l?(c={pointerEvents:i,opacity:a,cursor:l},e[1]=i,e[2]=a,e[3]=l,e[4]=c):c=e[4];let u;e[5]===Symbol.for("react.memo_cache_sentinel")?(u={width:24,height:24},e[5]=u):u=e[5];let f;e[6]!==r?(f=d.jsx(ie,{sx:u,children:r?d.jsx(ie,{component:"img",src:r,width:24,height:24,style:{display:"block",borderRadius:4}}):d.jsx(ie,{size:16,sx:{width:24,height:24,borderRadius:4,display:"flex",backgroundColor:"#F5F6F7",alignItems:"center",justifyContent:"center",overflow:"hidden"}})}),e[6]=r,e[7]=f):f=e[7];let h;e[8]===Symbol.for("react.memo_cache_sentinel")?(h={outline:"none"},e[8]=h):h=e[8];let m;e[9]!==n.Title||e[10]!==n.Url?(m=d.jsx(En,{display:"block",component:"a",href:n.Url,target:"_blank",w:"100%",style:h,children:n.Title}),e[9]=n.Title,e[10]=n.Url,e[11]=m):m=e[11];let y;return e[12]!==n.Url||e[13]!==c||e[14]!==f||e[15]!==m?(y=d.jsx(Qr.Item,{p:8,color:"#343A40",fz:14,w:"100%",styles:o,sx:c,icon:f,children:m},n.Url),e[12]=n.Url,e[13]=c,e[14]=f,e[15]=m,e[16]=y):y=e[16],y},dft=t=>{const e=me.c(17),{modules:n,radius:r,links:s,hasLinks:o}=t,[i,a]=S.useState(!1);let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=()=>a(fft),e[0]=l):l=e[0];const c=l;let u;e[1]===Symbol.for("react.memo_cache_sentinel")?(u=d.jsx(cae,{onClick:c}),e[1]=u):u=e[1];let f;e[2]===Symbol.for("react.memo_cache_sentinel")?(f={itemWrapper:{width:"100%"}},e[2]=f):f=e[2];let h;if(e[3]!==n||e[4]!==r){let b;e[6]!==r?(b=w=>d.jsx(Qr.Item,{p:8,color:"#343A40",fz:14,w:"100%",styles:{itemLabel:{width:"100%",outline:"none"}},icon:d.jsx(ie,{sx:{width:24,height:24},children:w.Icon?d.jsx(ie,{component:"img",src:w.Icon,width:24,height:24,style:{display:"block"}}):d.jsx(ie,{size:16,sx:{width:24,height:24,borderRadius:r(w.Name),display:"flex",backgroundColor:"#F5F6F7",alignItems:"center",justifyContent:"center",overflow:"hidden"}})}),children:d.jsx(En,{display:"block",component:"a",href:w.Url,target:"_blank",w:"100%",style:{outline:"none"},children:w.Title})},w.Url),e[6]=r,e[7]=b):b=e[7],h=n.map(b),e[3]=n,e[4]=r,e[5]=h}else h=e[5];let m;e[8]!==o||e[9]!==s?(m=o&&d.jsx(d.Fragment,{children:s.map(pft)}),e[8]=o,e[9]=s,e[10]=m):m=e[10];let y;e[11]!==h||e[12]!==m?(y=d.jsxs(Qr,{p:"15px 15px",styles:f,children:[h,m]}),e[11]=h,e[12]=m,e[13]=y):y=e[13];let v;return e[14]!==i||e[15]!==y?(v=d.jsx(Km,{opened:i,onClose:c,trigger:u,children:y}),e[14]=i,e[15]=y,e[16]=v):v=e[16],v};function fft(t){return!t}function pft(t){return d.jsx(uft,{item:t})}const Nw={MODULE:0,INTEGRATION:1,LINKS:2},LY=()=>{const t=me.c(17),e=re(qa),n=xt(575);let r;e:{if(!e){let y;t[0]===Symbol.for("react.memo_cache_sentinel")?(y=[],t[0]=y):y=t[0],r=y;break e}let m;t[1]!==e.ModuleUrls?(m=e.ModuleUrls.filter(hft),t[1]=e.ModuleUrls,t[2]=m):m=t[2],r=m}const s=r;let o;t[3]!==s?(o=s.filter(mft),t[3]=s,t[4]=o):o=t[4];const i=o;let a;t[5]!==s?(a=s.some(gft),t[5]=s,t[6]=a):a=t[6];const l=a;let c;t[7]!==s?(c=s.filter(yft),t[7]=s,t[8]=c):c=t[8];const u=c,f=vft;if(n){let m;return t[9]!==i||t[10]!==l||t[11]!==u?(m=d.jsx(dft,{modules:i,links:u,hasLinks:l,radius:f}),t[9]=i,t[10]=l,t[11]=u,t[12]=m):m=t[12],m}if(!s.length)return null;let h;return t[13]!==i||t[14]!==l||t[15]!==u?(h=d.jsx(lft,{modules:i,links:u,hasLinks:l,radius:f}),t[13]=i,t[14]=l,t[15]=u,t[16]=h):h=t[16],h};function hft(t){return t.ShowItem}function mft(t){return t.TailType===Nw.MODULE||t.TailType===Nw.INTEGRATION}function gft(t){return t.TailType===Nw.LINKS}function yft(t){return t.TailType===Nw.LINKS}function vft(t){return t==="Disk"?"50%":"4"}const $Y=S.forwardRef((t,e)=>{const n=me.c(61);let r,s,o,i,a,l,c;n[0]!==t?({value:c,onChange:o,onFiltersButtonClick:i,onReset:a,form:r,handleSubmit:s,...l}=t,n[0]=t,n[1]=r,n[2]=s,n[3]=o,n[4]=i,n[5]=a,n[6]=l,n[7]=c):(r=n[1],s=n[2],o=n[3],i=n[4],a=n[5],l=n[6],c=n[7]);const{t:u}=Le(),f=xt(1024),h=xt(475);let m;n[8]!==r||n[9]!==s||n[10]!==c?(m=()=>{s({...r,SearchContext:{...r.SearchContext,Query:c}})},n[8]=r,n[9]=s,n[10]=c,n[11]=m):m=n[11];const y=m,v=f?"xs":"md",b=f?0:7,w=f?"7px":"0";let C;n[12]!==w?(C={pointerEvents:"auto",marginLeft:w,flexShrink:0},n[12]=w,n[13]=C):C=n[13];let k;n[14]===Symbol.for("react.memo_cache_sentinel")?(k=d.jsx(G4,{stroke:1.5,color:"#A9B4C6"}),n[14]=k):k=n[14];let E;n[15]!==y||n[16]!==b||n[17]!==C?(E=d.jsx(Ve,{mr:b,onClick:y,style:C,children:k}),n[15]=y,n[16]=b,n[17]=C,n[18]=E):E=n[18];let j;n[19]!==u?(j=u("inputFilters.enterValue"),n[19]=u,n[20]=j):j=n[20];let A;n[21]!==o?(A=W=>{o(W.currentTarget.value)},n[21]=o,n[22]=A):A=n[22];let M;n[23]!==o||n[24]!==a||n[25]!==c?(M=c&&d.jsx(Ve,{onClick:()=>{o(""),a()},style:{flexShrink:0},children:d.jsx(po,{stroke:1.5,color:"#A9B4C6"})}),n[23]=o,n[24]=a,n[25]=c,n[26]=M):M=n[26];let _;n[27]!==i?(_=W=>{W.stopPropagation(),i()},n[27]=i,n[28]=_):_=n[28];let D;n[29]===Symbol.for("react.memo_cache_sentinel")?(D=d.jsx(HQ,{stroke:1.5,size:22,color:"#A9B4C6"}),n[29]=D):D=n[29];let R;n[30]!==_?(R=d.jsx(Ve,{onMouseDown:bft,onTouchStart:xft,onClick:_,children:D}),n[30]=_,n[31]=R):R=n[31];let N;n[32]!==y||n[33]!==f||n[34]!==h||n[35]!==u||n[36]!==c?(N=c&&!h&&d.jsx(yt,{onClick:y,radius:4,mr:10,ml:5,variant:"default",color:"#343A40",sx:{height:f?25:30,border:"none",span:{fontSize:12,fontWeight:500},"&:hover":{backgroundColor:"#fff"}},children:u("inputFilters.find")}),n[32]=y,n[33]=f,n[34]=h,n[35]=u,n[36]=c,n[37]=N):N=n[37];let z;n[38]!==M||n[39]!==R||n[40]!==N?(z=d.jsxs(ve,{gap:5,wrap:"nowrap",mr:0,children:[M,R,N]}),n[38]=M,n[39]=R,n[40]=N,n[41]=z):z=n[41];const B=c&&!h?160:60,L=f?"13px":"inherit";let P;n[42]===Symbol.for("react.memo_cache_sentinel")?(P={color:"#A9B4C6",opacity:1},n[42]=P):P=n[42];let I;n[43]!==B||n[44]!==L?(I={input:{paddingLeft:"50px!important",paddingRight:B,fontSize:L,minHeight:"35px",background:"#eef3f9",borderRadius:8,"&::placeholder":P}},n[43]=B,n[44]=L,n[45]=I):I=n[45];let H,$;n[46]===Symbol.for("react.memo_cache_sentinel")?(H={justifyContent:"flex-end"},$={marginLeft:8},n[46]=H,n[47]=$):(H=n[46],$=n[47]);const V=c?0:9;let q;n[48]!==V?(q={"& .mantine-Input-section":H,'& .mantine-Input-section[data-position="left"]':$,'& .mantine-Input-section[data-position="right"]':{marginRight:V}},n[48]=V,n[49]=q):q=n[49];let U;return n[50]!==l||n[51]!==e||n[52]!==z||n[53]!==I||n[54]!==v||n[55]!==q||n[56]!==E||n[57]!==j||n[58]!==A||n[59]!==c?(U=d.jsx(es,{ref:e,value:c,variant:"filled",size:v,leftSection:E,placeholder:j,onChange:A,maxLength:100,rightSection:z,styles:I,sx:q,...l}),n[50]=l,n[51]=e,n[52]=z,n[53]=I,n[54]=v,n[55]=q,n[56]=E,n[57]=j,n[58]=A,n[59]=c,n[60]=U):U=n[60],U});function bft(t){t.preventDefault(),t.stopPropagation()}function xft(t){t.stopPropagation()}const wft=(t,e="",n)=>{const r={},s=(a,l,c)=>a.reduce((u,f)=>{if(f.Type===2)return u;const h=l?`${l}/${f.Name}`:f.label,m=h==null?void 0:h.split("/"),y=(m==null?void 0:m.length)>3?`${m[0]}/.../${m[m.length-1]}`:h,v={value:`${f.Id}`,label:y,type:f.Type};return r[c]||(r[c]=[]),r[c].push(v),f.Children&&f.Children.length&&s(f.Children,h,c),u},[]);t.forEach(a=>{s([a],e,a.UserEmailId)});const o=[2,512],i=Object.entries(r).reduce((a,[l,c])=>(a[l]=V_(c,o),a),{});return n.map(a=>({group:a.Email,items:i[a.Id]||[]}))},FY=t=>{const e=me.c(65),{value:n,onChange:r,maxLength:s,sx:o,styles:i}=t,a=s===void 0?100:s,{t:l}=Le(),c=zc({onDropdownClose:()=>c.resetSelectedOption(),onDropdownOpen:()=>c.updateSelectedOptionIndex("active")});let u;e[0]===Symbol.for("react.memo_cache_sentinel")?(u=[],e[0]=u):u=e[0];let f;e[1]!==n?(f={searchValue:n,selected:u,debounceMs:400,includeSelectedInList:!1,buildHashMap:!1},e[1]=n,e[2]=f):f=e[2];const{suggestions:h,nameEmailMap:m,loading:y}=_ie(f),v=n||"";let b;if(e[3]!==m||e[4]!==h||e[5]!==v){const Y=v.trim().toLowerCase();b=h.filter(G=>{var Z;const K=cr(G).email.toLowerCase(),Q=(Z=m[K])==null?void 0:Z.name;return K.includes(Y)||(Q==null?void 0:Q.includes(Y))}).sort((G,K)=>{var fe,le,be,je;const Q=cr(G).email.toLowerCase(),Z=cr(K).email.toLowerCase(),J=((le=(fe=m[Q])==null?void 0:fe.name)==null?void 0:le.toLowerCase())??"",ne=((je=(be=m[Z])==null?void 0:be.name)==null?void 0:je.toLowerCase())??"",se=Math.min(Q.indexOf(Y)>=0?Q.indexOf(Y):1/0,J.indexOf(Y)>=0?J.indexOf(Y):1/0),ce=Math.min(Z.indexOf(Y)>=0?Z.indexOf(Y):1/0,ne.indexOf(Y)>=0?ne.indexOf(Y):1/0);return se!==ce?se-ce:(J||Q).localeCompare(ne||Z,"ru",{sensitivity:"accent"})}),e[3]=m,e[4]=h,e[5]=v,e[6]=b}else b=e[6];const w=b;let C;if(e[7]!==h||e[8]!==n){const Y=cr(n).email;C=h.map(Sft).includes(Y),e[7]=h,e[8]=n,e[9]=C}else C=e[9];const k=C;let E;e[10]!==c||e[11]!==r||e[12]!==n?(E=Y=>{const G=Y==="$create"?n.trim():Y;G&&r(G),c.closeDropdown()},e[10]=c,e[11]=r,e[12]=n,e[13]=E):E=e[13];const j=E,A=n||"";let M;e[14]!==c||e[15]!==r?(M=Y=>{const G=Y.currentTarget.value;r(G),G.trim().length?(c.openDropdown(),c.updateSelectedOptionIndex("active")):c.closeDropdown()},e[14]=c,e[15]=r,e[16]=M):M=e[16];let _;e[17]!==c||e[18]!==n?(_=()=>{n!=null&&n.trim().length&&c.openDropdown()},e[17]=c,e[18]=n,e[19]=_):_=e[19];let D;e[20]!==c?(D=Y=>{var G,K,Q,Z,J,ne,se;(J=(Z=(Q=(K=(G=Y.relatedTarget)==null?void 0:G.parentElement)==null?void 0:K.parentElement)==null?void 0:Q.id)==null?void 0:Z.includes)!=null&&J.call(Z,"contact-card")||(ne=Y.relatedTarget)!=null&&ne.className.includes("mantine-HoverCard-dropdown")||((se=Y.relatedTarget)==null?void 0:se.closest(".mantine-HoverCard-dropdown"))!==null||c.closeDropdown()},e[20]=c,e[21]=D):D=e[21];let R;e[22]!==c.dropdownOpened||e[23]!==j?(R=Y=>{Y.key==="Enter"&&!c.dropdownOpened&&j("$create")},e[22]=c.dropdownOpened,e[23]=j,e[24]=R):R=e[24];let N;e[25]!==a||e[26]!==i||e[27]!==o||e[28]!==_||e[29]!==D||e[30]!==R||e[31]!==A||e[32]!==M?(N=d.jsx(Ft.DropdownTarget,{children:d.jsx(es,{value:A,maxLength:a,sx:o,styles:i,onChange:M,onFocus:_,onBlur:D,onKeyDown:R})}),e[25]=a,e[26]=i,e[27]=o,e[28]=_,e[29]=D,e[30]=R,e[31]=A,e[32]=M,e[33]=N):N=e[33];const z=y?"hidden":"auto";let B;e[34]!==z?(B={overflow:z},e[34]=z,e[35]=B):B=e[35];let L,P;e[36]===Symbol.for("react.memo_cache_sentinel")?(L={radius:8,blur:4},P={size:"sm",type:"dots"},e[36]=L,e[37]=P):(L=e[36],P=e[37]);let I;e[38]!==y?(I=d.jsx(y2,{visible:y,zIndex:2,overlayProps:L,loaderProps:P}),e[38]=y,e[39]=I):I=e[39];let H;e[40]!==w||e[41]!==y||e[42]!==n?(H=!y&&w.map((Y,G)=>d.jsx(Ft.Option,{value:Y,children:d.jsx(Oo,{itemEmail:Y,floatingStrategy:"fixed",withinPortal:!0,openDelay:1500,children:d.jsx(ie,{sx:{width:"100%"},children:d.jsx(Aie,{label:Y,searchValue:n})})})},G)),e[40]=w,e[41]=y,e[42]=n,e[43]=H):H=e[43];let $;e[44]!==k||e[45]!==n?($=!k&&n.trim().length>0&&d.jsx(Ft.Option,{value:"$create",children:d.jsxs(ve,{align:"center",gap:3,children:[d.jsx(ie,{component:JQ,stroke:1.2,size:15,sx:kft,style:{svg:{width:"20px"}}}),d.jsx(ue,{fz:12,children:n})]})}),e[44]=k,e[45]=n,e[46]=$):$=e[46];let V;e[47]!==k||e[48]!==w||e[49]!==l||e[50]!==n?(V=k&&n.trim().length>0&&w.length===0&&d.jsx(Ft.Empty,{children:l("options.duplicate")}),e[47]=k,e[48]=w,e[49]=l,e[50]=n,e[51]=V):V=e[51];let q;e[52]!==H||e[53]!==$||e[54]!==V?(q=d.jsxs(Ft.Options,{children:[H,$,V]}),e[52]=H,e[53]=$,e[54]=V,e[55]=q):q=e[55];let U;e[56]!==B||e[57]!==I||e[58]!==q?(U=d.jsxs(Ft.Dropdown,{style:B,children:[I,q]}),e[56]=B,e[57]=I,e[58]=q,e[59]=U):U=e[59];let W;return e[60]!==c||e[61]!==j||e[62]!==N||e[63]!==U?(W=d.jsxs(Ft,{store:c,withinPortal:!1,onOptionSubmit:j,styles:Cft,children:[N,U]}),e[60]=c,e[61]=j,e[62]=N,e[63]=U,e[64]=W):W=e[64],W};function Sft(t){return cr(t).email}function Cft(){const t=Rie();return{...t,dropdown:{...t.dropdown,width:"unset",left:"unset"}}}function kft(t){return{color:t.colors.blue[6]}}const Eft="_searchItemsGroup_sn7bj_2",ph={searchItemsGroup:Eft},zY=t=>{var Qe,mt,rt,st,Mt,Ut,Lt,Xt,mn;const e=me.c(167),{form:n,currentLocale:r,selectFolderRef:s,isOpenedFolderSelect:o,setisOpenedFolderSelect:i,options:a,handleReset:l,handleSubmit:c}=t,{t:u}=Le();let f;e[0]===Symbol.for("react.memo_cache_sentinel")?(f={height:"auto"},e[0]=f):f=e[0];let h;e[1]!==u?(h=u("inputFilters.from"),e[1]=u,e[2]=h):h=e[2];let m;e[3]!==h?(m=d.jsx(ue,{c:"dimmed",w:120,children:h}),e[3]=h,e[4]=m):m=e[4];const y=((Qe=n.values.SearchContext)==null?void 0:Qe.From)||"";let v;e[5]!==n?(v=ht=>n.setFieldValue("SearchContext.From",ht),e[5]=n,e[6]=v):v=e[6];let b,w;e[7]===Symbol.for("react.memo_cache_sentinel")?(b={flexGrow:1},w={input:{fontSize:"12px"}},e[7]=b,e[8]=w):(b=e[7],w=e[8]);let C;e[9]!==y||e[10]!==v?(C=d.jsx(FY,{value:y,onChange:v,sx:b,styles:w}),e[9]=y,e[10]=v,e[11]=C):C=e[11];let k;e[12]!==m||e[13]!==C?(k=d.jsxs(ve,{className:ph.searchItemsGroup,children:[m,C]}),e[12]=m,e[13]=C,e[14]=k):k=e[14];let E;e[15]!==u?(E=u("inputFilters.to"),e[15]=u,e[16]=E):E=e[16];let j;e[17]!==E?(j=d.jsx(ue,{c:"dimmed",w:120,children:E}),e[17]=E,e[18]=j):j=e[18];const A=((mt=n.values.SearchContext)==null?void 0:mt.To)||"";let M;e[19]!==n?(M=ht=>n.setFieldValue("SearchContext.To",ht),e[19]=n,e[20]=M):M=e[20];let _,D;e[21]===Symbol.for("react.memo_cache_sentinel")?(_={flexGrow:1},D={input:{fontSize:"12px"}},e[21]=_,e[22]=D):(_=e[21],D=e[22]);let R;e[23]!==A||e[24]!==M?(R=d.jsx(FY,{value:A,onChange:M,sx:_,styles:D}),e[23]=A,e[24]=M,e[25]=R):R=e[25];let N;e[26]!==j||e[27]!==R?(N=d.jsxs(ve,{className:ph.searchItemsGroup,children:[j,R]}),e[26]=j,e[27]=R,e[28]=N):N=e[28];let z;e[29]!==u?(z=u("inputFilters.subject"),e[29]=u,e[30]=z):z=e[30];let B;e[31]!==z?(B=d.jsx(ue,{c:"dimmed",w:120,children:z}),e[31]=z,e[32]=B):B=e[32];let L;e[33]===Symbol.for("react.memo_cache_sentinel")?(L={input:{fontSize:"12px"}},e[33]=L):L=e[33];let P;e[34]===Symbol.for("react.memo_cache_sentinel")?(P={flexGrow:1},e[34]=P):P=e[34];let I;e[35]!==n?(I=n.getInputProps("SearchContext.Subject"),e[35]=n,e[36]=I):I=e[36];const H=((rt=n.values.SearchContext)==null?void 0:rt.Subject)||"";let $;e[37]!==I||e[38]!==H?($=d.jsx(es,{styles:L,maxLength:100,sx:P,...I,value:H}),e[37]=I,e[38]=H,e[39]=$):$=e[39];let V;e[40]!==B||e[41]!==$?(V=d.jsxs(ve,{className:ph.searchItemsGroup,children:[B,$]}),e[40]=B,e[41]=$,e[42]=V):V=e[42];let q;e[43]!==u?(q=u("inputFilters.containsWords"),e[43]=u,e[44]=q):q=e[44];let U;e[45]!==q?(U=d.jsx(ue,{c:"dimmed",w:120,children:q}),e[45]=q,e[46]=U):U=e[46];let W;e[47]===Symbol.for("react.memo_cache_sentinel")?(W={input:{fontSize:"12px"}},e[47]=W):W=e[47];let Y;e[48]===Symbol.for("react.memo_cache_sentinel")?(Y={flexGrow:1},e[48]=Y):Y=e[48];let G;e[49]!==n?(G=n.getInputProps("SearchContext.Query"),e[49]=n,e[50]=G):G=e[50];const K=((st=n.values.SearchContext)==null?void 0:st.Query)||"";let Q;e[51]!==G||e[52]!==K?(Q=d.jsx(es,{styles:W,maxLength:100,sx:Y,...G,value:K}),e[51]=G,e[52]=K,e[53]=Q):Q=e[53];let Z;e[54]!==U||e[55]!==Q?(Z=d.jsxs(ve,{className:ph.searchItemsGroup,children:[U,Q]}),e[54]=U,e[55]=Q,e[56]=Z):Z=e[56];let J;e[57]!==u?(J=u("inputFilters.date"),e[57]=u,e[58]=J):J=e[58];let ne;e[59]!==J?(ne=d.jsx(ue,{c:"dimmed",w:120,children:J}),e[59]=J,e[60]=ne):ne=e[60];let se;e[61]===Symbol.for("react.memo_cache_sentinel")?(se={calendarHeaderLevel:{fontSize:"12px"},weekday:{fontSize:"12px"}},e[61]=se):se=e[61];let ce;e[62]===Symbol.for("react.memo_cache_sentinel")?(ce={clickOutsideEvents:["mouseup","touchend"]},e[62]=ce):ce=e[62];let fe;e[63]===Symbol.for("react.memo_cache_sentinel")?(fe=d.jsx(Ve,{size:20,children:d.jsx(C5e,{stroke:1.5,size:20})}),e[63]=fe):fe=e[63];let le;e[64]!==n.values.SearchContext?(le=(Mt=n.values.SearchContext)!=null&&Mt.StartDate?new Date(n.values.SearchContext.StartDate):null,e[64]=n.values.SearchContext,e[65]=le):le=e[65];let be;e[66]!==n.values.SearchContext?(be=(Ut=n.values.SearchContext)!=null&&Ut.EndDate?new Date(n.values.SearchContext.EndDate):null,e[66]=n.values.SearchContext,e[67]=be):be=e[67];let je;e[68]!==le||e[69]!==be?(je=[le,be],e[68]=le,e[69]=be,e[70]=je):je=e[70];let pe;e[71]!==n?(pe=ht=>{const[oe,Ne]=ht??[],ut=Tft;n.setFieldValue("SearchContext.StartDate",ut(oe)),n.setFieldValue("SearchContext.EndDate",ut(Ne))},e[71]=n,e[72]=pe):pe=e[72];let _e;e[73]===Symbol.for("react.memo_cache_sentinel")?(_e={flexGrow:1},e[73]=_e):_e=e[73];let Ce;e[74]!==r||e[75]!==je||e[76]!==pe?(Ce=d.jsx(Ig,{styles:se,locale:r,type:"range",popoverProps:ce,clearable:!0,leftSection:fe,leftSectionPointerEvents:"none",allowSingleDateInRange:!0,value:je,onChange:pe,sx:_e}),e[74]=r,e[75]=je,e[76]=pe,e[77]=Ce):Ce=e[77];let Te;e[78]!==ne||e[79]!==Ce?(Te=d.jsxs(ve,{className:ph.searchItemsGroup,children:[ne,Ce]}),e[78]=ne,e[79]=Ce,e[80]=Te):Te=e[80];let Ae;e[81]!==u?(Ae=u("inputFilters.whereToSearch"),e[81]=u,e[82]=Ae):Ae=e[82];let Ze;e[83]!==Ae?(Ze=d.jsx(ue,{c:"dimmed",w:120,children:Ae}),e[83]=Ae,e[84]=Ze):Ze=e[84];let He;e[85]!==i?(He=()=>i(Mft),e[85]=i,e[86]=He):He=e[86];let lt;e[87]===Symbol.for("react.memo_cache_sentinel")?(lt={flexGrow:1},e[87]=lt):lt=e[87];let Ye;e[88]!==n?(Ye=n.getInputProps("folderId"),e[88]=n,e[89]=Ye):Ye=e[89];const ge=n.values.folderId?`${n.values.folderId}`:"-1";let Fe;e[90]!==n?(Fe=ht=>{n.setFieldValue("folderId",ht||0)},e[90]=n,e[91]=Fe):Fe=e[91];let Se;e[92]===Symbol.for("react.memo_cache_sentinel")?(Se={input:{fontSize:"12px"},option:{fontSize:"12px"}},e[92]=Se):Se=e[92];let qe;e[93]!==o||e[94]!==a||e[95]!==s||e[96]!==He||e[97]!==Ye||e[98]!==ge||e[99]!==Fe?(qe=d.jsx(Ia,{ref:s,dropdownOpened:o,onClick:He,data:a,sx:lt,...Ye,value:ge,onChange:Fe,styles:Se}),e[93]=o,e[94]=a,e[95]=s,e[96]=He,e[97]=Ye,e[98]=ge,e[99]=Fe,e[100]=qe):qe=e[100];let ot;e[101]!==Ze||e[102]!==qe?(ot=d.jsxs(ve,{className:ph.searchItemsGroup,children:[Ze,qe]}),e[101]=Ze,e[102]=qe,e[103]=ot):ot=e[103];let $e;e[104]!==n?($e=n.getInputProps("SearchContext.WasRead",{type:"checkbox"}),e[104]=n,e[105]=$e):$e=e[105];const pt=!(((Lt=n.values.SearchContext)==null?void 0:Lt.WasRead)??!0);let gt;e[106]!==u?(gt=u("inputFilters.unread"),e[106]=u,e[107]=gt):gt=e[107];let Pt;e[108]===Symbol.for("react.memo_cache_sentinel")?(Pt={label:{color:"#868E96",fontSize:"14px"}},e[108]=Pt):Pt=e[108];let at;e[109]!==n?(at=ht=>n.setFieldValue("SearchContext.WasRead",!ht.currentTarget.checked),e[109]=n,e[110]=at):at=e[110];let nt;e[111]!==$e||e[112]!==pt||e[113]!==gt||e[114]!==at?(nt=d.jsx(ve,{wrap:"nowrap",children:d.jsx(Or,{...$e,checked:pt,label:gt,styles:Pt,onChange:at})}),e[111]=$e,e[112]=pt,e[113]=gt,e[114]=at,e[115]=nt):nt=e[115];let We;e[116]!==n?(We=n.getInputProps("SearchContext.HasAttachments",{type:"checkbox"}),e[116]=n,e[117]=We):We=e[117];const At=((Xt=n.values.SearchContext)==null?void 0:Xt.HasAttachments)||!1;let St;e[118]!==u?(St=u("inputFilters.hasAttachments"),e[118]=u,e[119]=St):St=e[119];let Ot;e[120]===Symbol.for("react.memo_cache_sentinel")?(Ot={label:{color:"#868E96",fontSize:"14px"}},e[120]=Ot):Ot=e[120];let Tt;e[121]!==We||e[122]!==At||e[123]!==St?(Tt=d.jsx(ve,{children:d.jsx(Or,{...We,checked:At,label:St,styles:Ot})}),e[121]=We,e[122]=At,e[123]=St,e[124]=Tt):Tt=e[124];let kt;e[125]!==nt||e[126]!==Tt?(kt=d.jsxs(bt,{children:[nt,Tt]}),e[125]=nt,e[126]=Tt,e[127]=kt):kt=e[127];let jt;e[128]!==n?(jt=n.getInputProps("SearchContext.IsImportant",{type:"checkbox"}),e[128]=n,e[129]=jt):jt=e[129];const vt=((mn=n.values.SearchContext)==null?void 0:mn.IsImportant)||!1;let Yt;e[130]!==u?(Yt=u("inputFilters.important"),e[130]=u,e[131]=Yt):Yt=e[131];let Vt;e[132]===Symbol.for("react.memo_cache_sentinel")?(Vt={label:{color:"#868E96",fontSize:"14px"}},e[132]=Vt):Vt=e[132];let Nt;e[133]!==jt||e[134]!==vt||e[135]!==Yt?(Nt=d.jsx(ve,{ml:48,children:d.jsx(Or,{...jt,checked:vt,label:Yt,styles:Vt})}),e[133]=jt,e[134]=vt,e[135]=Yt,e[136]=Nt):Nt=e[136];let Ht;e[137]!==kt||e[138]!==Nt?(Ht=d.jsxs(xe,{align:"flex-start",children:[kt,Nt]}),e[137]=kt,e[138]=Nt,e[139]=Ht):Ht=e[139];let cn;e[140]===Symbol.for("react.memo_cache_sentinel")?(cn={label:{fontSize:"14px",fontWeight:500}},e[140]=cn):cn=e[140];let qt;e[141]!==u?(qt=u("inputFilters.resetFilters"),e[141]=u,e[142]=qt):qt=e[142];let Kt;e[143]!==l||e[144]!==qt?(Kt=d.jsx(yt,{styles:cn,variant:"subtle",onClick:l,children:qt}),e[143]=l,e[144]=qt,e[145]=Kt):Kt=e[145];let yn;e[146]===Symbol.for("react.memo_cache_sentinel")?(yn={label:{fontSize:"14px",fontWeight:500}},e[146]=yn):yn=e[146];let ee;e[147]!==n||e[148]!==c?(ee=ht=>{ht.stopPropagation(),n.onSubmit(c)()},e[147]=n,e[148]=c,e[149]=ee):ee=e[149];let ae;e[150]!==u?(ae=u("inputFilters.search"),e[150]=u,e[151]=ae):ae=e[151];let de;e[152]!==ee||e[153]!==ae?(de=d.jsx(yt,{styles:yn,type:"submit",onClick:ee,children:ae}),e[152]=ee,e[153]=ae,e[154]=de):de=e[154];let Ee;e[155]!==Kt||e[156]!==de?(Ee=d.jsxs(ve,{justify:"right",children:[Kt,de]}),e[155]=Kt,e[156]=de,e[157]=Ee):Ee=e[157];let De;return e[158]!==N||e[159]!==V||e[160]!==Z||e[161]!==Te||e[162]!==ot||e[163]!==Ht||e[164]!==Ee||e[165]!==k?(De=d.jsxs(bt,{sx:f,children:[k,N,V,Z,Te,ot,Ht,Ee]}),e[158]=N,e[159]=V,e[160]=Z,e[161]=Te,e[162]=ot,e[163]=Ht,e[164]=Ee,e[165]=k,e[166]=De):De=e[166],De};function Tft(t){if(t instanceof Date)return t.toISOString();if(typeof t=="string"){const e=new Date(t);return Number.isNaN(e.getTime())?"":e.toISOString()}return""}function Mft(t){return!t}const jft="emailId-",PY=It.forwardRef(({showInput:t=!0},e)=>{var I,H;const n=zt(),{t:r}=Le(),s=re(Va),o=sr(),i=Er(),{pathname:a}=wn(),l=re(ip)==="pending",c=re(Dn),u=xt(1024),h=xt(1500)?"55%":"34%",m=re(mr),{formValues:y}=br($=>$.search),v=re(Ed),b=S.useRef(null),[w,C]=S.useState(!1),[k,E]=S.useState(!1),j=wft(s,"",c),{clearSelection:A}=Fl(),{preparePayload:M}=lae(),D=[{group:"",items:tae(c,r)},...j],R=vn.language==="ru"?"ru":"en",N=Ll({initialValues:j0});Jm(b,()=>C(!1),"mouseup");const z=()=>{N.reset(),N.isDirty()&&n(im(j0)),N.setValues(structuredClone(j0)),N.resetDirty(structuredClone(j0))},B=async $=>{var W,Y,G,K,Q,Z,J;if(l)return;const V=structuredClone($);n(Dc(1)),n(lS($));const q=M(V,{offsetOverride:0,page:1}),U=[((W=V.SearchContext)==null?void 0:W.Query)||"",((Y=V.SearchContext)==null?void 0:Y.Subject)||"",((G=V.SearchContext)==null?void 0:G.From)||"",((K=V.SearchContext)==null?void 0:K.To)||""];n(tR({label:-1})),n(im(V)),n(ud(!0)),n(ATe()),await n(ur(q)),n(yee(U)),n(TMe(q)),(Z=(Q=q.SearchContext)==null?void 0:Q.Query)!=null&&Z.trim()?i(`/search/${(J=q.SearchContext)==null?void 0:J.Query}`,{state:{fromFormSubmit:!0}}):i("/search",{state:{fromFormSubmit:!0}}),A(),E(!1)};S.useEffect(()=>{if(!m)return;const $=JSON.parse(JSON.stringify(m));delete $.UserEmailIds,N.setValues($)},[y]),S.useEffect(()=>{N.setFieldValue("folderId",v)},[v]),S.useEffect(()=>{const $=a.startsWith("/search"),V=a.startsWith("/message");!$&&!V&&(z(),n(MMe())),n(ud($)),$&&o.value&&y.SearchContext&&N.setFieldValue("SearchContext.Query",o.value)},[a]);const L={form:N,currentLocale:R,selectFolderRef:b,isOpenedFolderSelect:w,setisOpenedFolderSelect:C,options:D,emailIdConst:jft,handleReset:z,handleSubmit:B},P=()=>d.jsx(Ve,{component:"div",size:"lg",onClick:()=>E(!1),children:d.jsx(yo,{stroke:1,size:"40px"})});return t?d.jsx(ie,{component:"form",w:u?"100%":h,sx:{flex:u?"1":""},ref:k?null:e,onSubmit:N.onSubmit($=>B({...$,sortOrder:1,SearchContext:{...$.SearchContext,IsImportant:void 0,WasRead:void 0,HasAttachments:void 0}})),children:u?d.jsxs(d.Fragment,{children:[d.jsx($Y,{value:((I=N.values.SearchContext)==null?void 0:I.Query)||"",onFiltersButtonClick:()=>E($=>!$),onReset:z,...N.getInputProps("SearchContext.Query"),form:N.values,handleSubmit:B,disabled:!s.length}),d.jsx(nr,{opened:k,onClose:()=>E(!1),withCloseButton:!1,closeOnClickOutside:!1,fullScreen:!0,radius:0,title:d.jsx(P,{}),transitionProps:{transition:"fade",duration:200},styles:{header:{padding:"7px",boxShadow:"0px 0px 10px rgba(0, 0, 0, 0.1)"},body:{paddingTop:20,paddingBottom:"calc(20px + env(safe-area-inset-bottom))",overflowY:"auto",WebkitOverflowScrolling:"touch"}},children:d.jsx(zY,{...L})})]}):d.jsxs(Dt,{opened:k,position:"bottom-start",width:"target",shadow:"xl",offset:10,onChange:E,children:[d.jsx(Dt.Target,{children:d.jsx($Y,{value:((H=N.values.SearchContext)==null?void 0:H.Query)||"",onFiltersButtonClick:()=>{n(Dr()),E($=>!$)},onReset:z,...N.getInputProps("SearchContext.Query"),form:N.values,handleSubmit:B,disabled:!s.length})}),d.jsx(Dt.Dropdown,{onMouseDown:$=>$.stopPropagation(),onTouchStart:$=>$.stopPropagation(),onKeyDown:$=>{$.key==="Enter"&&($.stopPropagation(),N.onSubmit(B)())},sx:{minWidth:"auto",left:"auto",boxShadow:"rgba(16, 24, 40, 0.12) 0px 12px 24px, rgba(16, 24, 40, 0.06) 0px 2px 8px",border:"none"},children:d.jsx(zY,{...L})})]})}):null}),BY=t=>{const e=me.c(8),{disabled:n}=t,r=n===void 0?!1:n,s=Er(),o=wn();let i;e[0]!==o.pathname||e[1]!==s?(i=()=>{s("/settings/general",{state:{prevLocation:o.pathname}})},e[0]=o.pathname,e[1]=s,e[2]=i):i=e[2];let a;e[3]===Symbol.for("react.memo_cache_sentinel")?(a={"&[data-disabled]":{backgroundColor:"transparent",border:"none"}},e[3]=a):a=e[3];let l;e[4]===Symbol.for("react.memo_cache_sentinel")?(l=d.jsx(ZQ,{stroke:1.5,size:22}),e[4]=l):l=e[4];let c;return e[5]!==r||e[6]!==i?(c=d.jsx(Ve,{onClick:i,sx:a,disabled:r,size:34,children:l}),e[5]=r,e[6]=i,e[7]=c):c=e[7],c},dae=t=>{const e=me.c(44),{adminUrl:n,hasAdminAccess:r,hasPaymentsAccess:s,isSaas:o,handleLogout:i}=t,{t:a}=Le();let l;e[0]!==a?(l=a("userMenu.dashboard"),e[0]=a,e[1]=l):l=e[1];let c;e[2]===Symbol.for("react.memo_cache_sentinel")?(c=d.jsx(Ske,{stroke:1.5,size:20}),e[2]=c):c=e[2];const u=`${n}/dashboard`;let f;e[3]!==l||e[4]!==u?(f={type:"link",label:l,icon:c,href:u,external:!0},e[3]=l,e[4]=u,e[5]=f):f=e[5];let h;e[6]!==a?(h=a("userMenu.profile"),e[6]=a,e[7]=h):h=e[7];let m;e[8]===Symbol.for("react.memo_cache_sentinel")?(m=d.jsx(zke,{stroke:1.5,size:20}),e[8]=m):m=e[8];const y=`${n}/profile`;let v;e[9]!==r||e[10]!==h||e[11]!==y?(v={type:"link",label:h,icon:m,href:y,external:!0,visible:r},e[9]=r,e[10]=h,e[11]=y,e[12]=v):v=e[12];let b;e[13]!==a?(b=a("userMenu.subscribe"),e[13]=a,e[14]=b):b=e[14];let w;e[15]===Symbol.for("react.memo_cache_sentinel")?(w=d.jsx(E5e,{stroke:1.5,size:20}),e[15]=w):w=e[15];let C;e[16]!==s||e[17]!==b?(C={type:"link",label:b,icon:w,href:"https://payments.r7-space.ru",external:!0,visible:s},e[16]=s,e[17]=b,e[18]=C):C=e[18];let k;e[19]!==a?(k=a("userMenu.download"),e[19]=a,e[20]=k):k=e[20];let E;e[21]===Symbol.for("react.memo_cache_sentinel")?(E=d.jsx(X5e,{stroke:1.5,size:20}),e[21]=E):E=e[21];let j;e[22]!==o||e[23]!==k?(j={type:"link",label:k,icon:E,href:"https://preview.r7-space.ru",external:!0,visible:o},e[22]=o,e[23]=k,e[24]=j):j=e[24];let A;e[25]!==a?(A=a("userMenu.report"),e[25]=a,e[26]=A):A=e[26];let M;e[27]===Symbol.for("react.memo_cache_sentinel")?(M=d.jsx(c5e,{stroke:1.5,size:20}),e[27]=M):M=e[27];let _;e[28]!==o||e[29]!==A?(_={type:"link",label:A,icon:M,href:"https://r7-space.ru/feedback",external:!0,visible:o},e[28]=o,e[29]=A,e[30]=_):_=e[30];let D;e[31]!==a?(D=a("userMenu.logOut"),e[31]=a,e[32]=D):D=e[32];let R;e[33]===Symbol.for("react.memo_cache_sentinel")?(R=d.jsx(B6e,{stroke:1.5,size:20}),e[33]=R):R=e[33];let N;e[34]!==i||e[35]!==D?(N={type:"action",label:D,icon:R,onClick:i},e[34]=i,e[35]=D,e[36]=N):N=e[36];let z;return e[37]!==C||e[38]!==j||e[39]!==_||e[40]!==N||e[41]!==f||e[42]!==v?(z=[f,v,C,j,_,N].filter(Aft),e[37]=C,e[38]=j,e[39]=_,e[40]=N,e[41]=f,e[42]=v,e[43]=z):z=e[43],z};function Aft(t){return t.visible!==!1}const Lw=t=>{const e=me.c(12),{onClick:n,currentUser:r,size:s,variant:o}=t,i=OR(r.Id!=null?String(r.Id):""),a=`${r.Surname?r.Surname[0]:"-"}${r.FirstName?r.FirstName[0]:"-"}`,l=r.Avatar?`/api/v2/profile/getAvatar?id=${r.Id}`:null,c=`${i} `;let u;e[0]!==c?(u={span:{background:c,color:"white",border:0}},e[0]=c,e[1]=u):u=e[1];const f=o==="trigger"?"pointer":"default";let h;e[2]!==f?(h={root:{cursor:f}},e[2]=f,e[3]=h):h=e[3];const m=r.Surname+" "+r.FirstName;let y;return e[4]!==n||e[5]!==s||e[6]!==l||e[7]!==u||e[8]!==h||e[9]!==m||e[10]!==a?(y=d.jsx(Pc,{onClick:n,src:l,sx:u,styles:h,size:s,radius:"xl",color:"blue",alt:m,children:a}),e[4]=n,e[5]=s,e[6]=l,e[7]=u,e[8]=h,e[9]=m,e[10]=a,e[11]=y):y=e[11],y},_ft=t=>{const e=me.c(32),{currentUser:n,adminUrl:r,hasAdminAccess:s,hasPaymentsAccess:o,isSaas:i,handleLogout:a}=t;let l;e[0]!==r||e[1]!==a||e[2]!==s||e[3]!==o||e[4]!==i?(l={adminUrl:r,hasAdminAccess:s,hasPaymentsAccess:o,isSaas:i,handleLogout:a},e[0]=r,e[1]=a,e[2]=s,e[3]=o,e[4]=i,e[5]=l):l=e[5];const c=dae(l);let u;e[6]===Symbol.for("react.memo_cache_sentinel")?(u={transition:"pop-top-right",duration:170,timingFunction:"ease"},e[6]=u):u=e[6];let f;e[7]!==n?(f=d.jsx(et.Target,{children:d.jsx("div",{children:d.jsx(Lw,{currentUser:n,size:36,variant:"trigger"})})}),e[7]=n,e[8]=f):f=e[8];let h;e[9]===Symbol.for("react.memo_cache_sentinel")?(h={boxShadow:"rgba(16, 24, 40, 0.12) 0px 12px 24px, rgba(16, 24, 40, 0.06) 0px 2px 8px",border:"none"},e[9]=h):h=e[9];let m;e[10]!==n?(m=d.jsx(Lw,{currentUser:n,size:50}),e[10]=n,e[11]=m):m=e[11];const y=n.Surname??"-",v=n.FirstName??"-";let b;e[12]!==y||e[13]!==v?(b=d.jsxs(ue,{fz:18,children:[y," ",v]}),e[12]=y,e[13]=v,e[14]=b):b=e[14];let w;e[15]!==n.Email?(w=d.jsx(ue,{fz:14,c:"dimmed",children:n.Email}),e[15]=n.Email,e[16]=w):w=e[16];let C;e[17]!==b||e[18]!==w?(C=d.jsxs(bt,{gap:0,children:[b,w]}),e[17]=b,e[18]=w,e[19]=C):C=e[19];let k;e[20]!==C||e[21]!==m?(k=d.jsxs(ve,{px:"md",pt:6,children:[m,C]}),e[20]=C,e[21]=m,e[22]=k):k=e[22];let E;e[23]===Symbol.for("react.memo_cache_sentinel")?(E=d.jsx(Da,{mt:"xs",mb:6}),e[23]=E):E=e[23];let j;e[24]!==c?(j=c.map(Rft),e[24]=c,e[25]=j):j=e[25];let A;e[26]!==k||e[27]!==j?(A=d.jsxs(et.Dropdown,{miw:300,sx:h,children:[k,E,j]}),e[26]=k,e[27]=j,e[28]=A):A=e[28];let M;return e[29]!==A||e[30]!==f?(M=d.jsxs(et,{position:"bottom-end",radius:"md",transitionProps:u,children:[f,A]}),e[29]=A,e[30]=f,e[31]=M):M=e[31],M};function Rft(t,e){const n={p:8,px:"md",py:"xs",fz:14,leftSection:t.icon,color:"#343A40"};return t.type==="action"?S.createElement(et.Item,{...n,key:t.label+e,onClick:t.onClick},t.label):S.createElement(et.Item,{...n,key:t.label+e,component:"a",href:t.href,target:t.external?"_blank":void 0,rel:t.external?"noopener noreferrer":void 0},t.label)}const Dft=t=>{const e=me.c(33),{currentUser:n,adminUrl:r,hasAdminAccess:s,hasPaymentsAccess:o,isSaas:i,handleLogout:a}=t,[l,c]=S.useState(!1);let u;e[0]===Symbol.for("react.memo_cache_sentinel")?(u=()=>c(Ift),e[0]=u):u=e[0];const f=u;let h;e[1]!==r||e[2]!==a||e[3]!==s||e[4]!==o||e[5]!==i?(h={adminUrl:r,hasAdminAccess:s,hasPaymentsAccess:o,isSaas:i,handleLogout:a},e[1]=r,e[2]=a,e[3]=s,e[4]=o,e[5]=i,e[6]=h):h=e[6];const m=dae(h);let y;e[7]!==n?(y=d.jsx(Lw,{onClick:f,currentUser:n,size:36}),e[7]=n,e[8]=y):y=e[8];let v;e[9]!==n?(v=d.jsx(Lw,{currentUser:n,size:50}),e[9]=n,e[10]=v):v=e[10];const b=n.Surname??"-",w=n.FirstName??"-";let C;e[11]!==b||e[12]!==w?(C=d.jsxs(ue,{fz:18,ta:"center",children:[b," ",w]}),e[11]=b,e[12]=w,e[13]=C):C=e[13];let k;e[14]!==n.Email?(k=d.jsx(ue,{fz:14,c:"dimmed",ta:"center",children:n.Email}),e[14]=n.Email,e[15]=k):k=e[15];let E;e[16]!==C||e[17]!==k?(E=d.jsxs(bt,{gap:0,children:[C,k]}),e[16]=C,e[17]=k,e[18]=E):E=e[18];let j;e[19]!==v||e[20]!==E?(j=d.jsxs(xe,{px:"md",pt:10,direction:"column",align:"center",gap:10,children:[v,E]}),e[19]=v,e[20]=E,e[21]=j):j=e[21];let A;e[22]===Symbol.for("react.memo_cache_sentinel")?(A=d.jsx(Da,{mt:"xs",mb:6}),e[22]=A):A=e[22];let M;e[23]===Symbol.for("react.memo_cache_sentinel")?(M={itemWrapper:{width:"100%"}},e[23]=M):M=e[23];let _;e[24]!==m?(_=m.map(Oft),e[24]=m,e[25]=_):_=e[25];let D;e[26]!==_?(D=d.jsx(Qr,{spacing:"xs",size:"sm",center:!0,p:"10px 0",styles:M,children:_}),e[26]=_,e[27]=D):D=e[27];let R;return e[28]!==l||e[29]!==j||e[30]!==D||e[31]!==y?(R=d.jsxs(Km,{opened:l,maxHeight:"80dvh",onClose:f,trigger:y,children:[j,A,D]}),e[28]=l,e[29]=j,e[30]=D,e[31]=y,e[32]=R):R=e[32],R};function Ift(t){return!t}function Oft(t,e){return d.jsx(Qr.Item,{p:8,icon:t.icon,px:"md",py:"3px",fz:14,w:"100%",styles:{itemLabel:{width:"100%"}},children:t.type==="action"?d.jsx(En,{onClick:t.onClick,w:"100%",children:d.jsx(ve,{children:d.jsx(ue,{fz:14,c:"#343A40",children:t.label})})}):d.jsx(En,{component:"a",href:t.href,target:t.external?"_blank":void 0,rel:t.external?"noopener noreferrer":void 0,w:"100%",children:d.jsx(ve,{children:d.jsx(ue,{fz:14,c:"#343A40",children:t.label})})})},t.label+e)}const HY=()=>{var v;const t=me.c(22),e=re(Md),n=re(qa),r=re(Pm),s=xt(575);let o;t[0]!==(n==null?void 0:n.ModulesAccess)?(o=n==null?void 0:n.ModulesAccess.includes("Admin"),t[0]=n==null?void 0:n.ModulesAccess,t[1]=o):o=t[1];const i=o;let a;t[2]!==(n==null?void 0:n.ModulesAccess)?(a=n==null?void 0:n.ModulesAccess.includes("Payments"),t[2]=n==null?void 0:n.ModulesAccess,t[3]=a):a=t[3];const l=a;let c;t[4]!==(n==null?void 0:n.ModuleUrls)?(c=(v=n==null?void 0:n.ModuleUrls.find(Nft))==null?void 0:v.Url,t[4]=n==null?void 0:n.ModuleUrls,t[5]=c):c=t[5];const u=c,f=r.AppType==="saas";let h;t[6]!==u?(h=async()=>{await Sst(),window.location.href=u+"/login?returnUrl="+escape(window.location.origin)},t[6]=u,t[7]=h):h=t[7];const m=h;if(s){let b;return t[8]!==u||t[9]!==e||t[10]!==m||t[11]!==i||t[12]!==l||t[13]!==f?(b=d.jsx(Dft,{currentUser:e,handleLogout:m,adminUrl:u,hasAdminAccess:i,hasPaymentsAccess:l,isSaas:f}),t[8]=u,t[9]=e,t[10]=m,t[11]=i,t[12]=l,t[13]=f,t[14]=b):b=t[14],b}let y;return t[15]!==u||t[16]!==e||t[17]!==m||t[18]!==i||t[19]!==l||t[20]!==f?(y=d.jsx(_ft,{currentUser:e,handleLogout:m,adminUrl:u,hasAdminAccess:i,hasPaymentsAccess:l,isSaas:f}),t[15]=u,t[16]=e,t[17]=m,t[18]=i,t[19]=l,t[20]=f,t[21]=y):y=t[21],y};function Nft(t){return t.Name==="Admin"}const Lft=t=>{const e=me.c(29),{desktopOpened:n,toggleDesktop:r}=t,{setDrawerOpen:s}=S.useContext(t1),[o,i]=S.useState(!1),{t:a}=Le(),l=wn(),c=xt(1024),u=S.useRef(null),f=re(Dl),h=ts(),m=re(zr),y=re($o),v=(h==null?void 0:h.Name)==="inbox"?"inbox":"";let b;e[0]!==l||e[1]!==y?(b=y&&l.pathname.includes("/message/"),e[0]=l,e[1]=y,e[2]=b):b=e[2];const w=b;let C;e[3]!==a?(C=H=>({inbox:`${a("readOnlyLabels.inbox")}`,sent:`${a("readOnlyLabels.sent")}`,trash:`${a("readOnlyLabels.trash")}`,drafts:`${a("readOnlyLabels.drafts")}`,junk:`${a("readOnlyLabels.junk")}`,outbox:`${a("readOnlyLabels.outbox")}`,archive:`${a("readOnlyLabels.archive")}`,snoozed:`${a("readOnlyLabels.snoozed")}`,Templates:`${a("readOnlyLabels.templates")}`,errors:`${a("readOnlyLabels.errors")}`,shared:`${a("readOnlyLabels.shared")}`})[H]||H,e[3]=a,e[4]=C):C=e[4];const k=C;let E;e[5]!==m||e[6]!==h||e[7]!==w||e[8]!==(y==null?void 0:y.FolderId)?(E=w?m.find(H=>H.Id===(y==null?void 0:y.FolderId)):h,e[5]=m,e[6]=h,e[7]=w,e[8]=y==null?void 0:y.FolderId,e[9]=E):E=e[9];const j=E,A=(j==null?void 0:j.Name)||v;let M;e[10]!==k||e[11]!==A?(M=k(A),e[10]=k,e[11]=A,e[12]=M):M=e[12];const _=M;let D,R;e[13]===Symbol.for("react.memo_cache_sentinel")?(D=()=>i(!1),R=["mousedown","touchstart"],e[13]=D,e[14]=R):(D=e[13],R=e[14]);const N=Em(D,R),z=n?"14px":"36px";let B;e[15]===Symbol.for("react.memo_cache_sentinel")?(B={justifyContent:"space-between"},e[15]=B):B=e[15];let L;e[16]===Symbol.for("react.memo_cache_sentinel")?(L={height:"100%",gap:"15px",flexWrap:"nowrap"},e[16]=L):L=e[16];let P;e[17]!==n||e[18]!==f.length||e[19]!==c||e[20]!==N||e[21]!==s||e[22]!==o||e[23]!==r||e[24]!==_?(P=d.jsx(ve,{sx:L,children:c?d.jsxs(d.Fragment,{children:[d.jsxs(ve,{gap:"10px",sx:{maxWidth:"calc(100% - 200px)",flexWrap:"nowrap",width:o?"20px":"auto"},children:[d.jsx(Ve,{size:"lg",onClick:()=>s(!0),sx:{marginLeft:"-7px"},children:d.jsx(q6e,{stroke:1.5})}),!o&&d.jsx(ie,{w:"100%",children:d.jsx(ue,{truncate:!0,lineClamp:3,size:"md",sx:{fontWeight:500,whiteSpace:"nowrap",marginRight:"20px",display:"block"},children:_})})]}),d.jsxs(d.Fragment,{children:[d.jsx(na,{mounted:o,keepMounted:!0,transition:"fade",duration:350,timingFunction:"cubic-bezier(.2,.8,.2,1)",children:H=>d.jsx(ie,{style:H,sx:{flex:1,minWidth:0},children:d.jsx(PY,{showInput:o,ref:N})})}),d.jsx(na,{mounted:!o,keepMounted:!0,transition:"fade",duration:350,timingFunction:"cubic-bezier(.2,.8,.2,1)",children:H=>d.jsxs(ve,{gap:"2",style:H,sx:{position:"absolute",right:0,top:"50%",transform:"translate(-35%, -50%)",flexWrap:"nowrap",pointerEvents:o?"none":"auto"},"aria-hidden":o,children:[d.jsx(Ve,{size:"lg",mt:2,ref:u,onClick:()=>{i(!0),requestAnimationFrame(()=>{var $,V;return(V=($=N.current)==null?void 0:$.focus)==null?void 0:V.call($)})},children:d.jsx(G4,{stroke:1.5,size:22})}),d.jsx(NY,{children:d.jsx(Qz,{})}),d.jsx(BY,{disabled:!f.length}),d.jsx(ie,{mr:"xs",children:d.jsx(LY,{})})]})}),d.jsx(ve,{gap:"xs",sx:{marginLeft:"auto"},children:d.jsx(HY,{})})]})]}):d.jsxs(d.Fragment,{children:[!n&&d.jsxs(ve,{gap:0,children:[d.jsx(Ve,{size:"lg",ml:"-7px",mr:"2px",onClick:r,children:d.jsx(GQ,{stroke:1.5,size:20})}),d.jsx(on,{withArrow:!0,label:_,position:"bottom",children:d.jsx(ue,{truncate:!0,lineClamp:3,size:"md",sx:{fontWeight:500,whiteSpace:"nowrap",display:"block",maxWidth:"150px"},children:_})})]}),d.jsx(PY,{}),d.jsx(nae,{}),d.jsxs(ve,{gap:"2",sx:{marginLeft:"auto",flexShrink:0},children:[d.jsx(NY,{children:d.jsx(Qz,{})}),d.jsx(BY,{disabled:!f.length}),d.jsx(ie,{mr:"xs",children:d.jsx(LY,{})}),d.jsx(HY,{})]})]})}),e[17]=n,e[18]=f.length,e[19]=c,e[20]=N,e[21]=s,e[22]=o,e[23]=r,e[24]=_,e[25]=P):P=e[25];let I;return e[26]!==P||e[27]!==z?(I=d.jsx($r.Header,{pl:z,px:"16px",withBorder:!1,sx:B,children:P}),e[26]=P,e[27]=z,e[28]=I):I=e[28],I},UY=dm(TG)`
  cursor: pointer;
  padding: 16px 20px;
  display: block;
  width: calc(280px - 2 * var(--mantine-spacing-md));
  height: 64px;
  outline: none;
`,YM="data:image/svg+xml,%3csvg%20width='24'%20height='25'%20viewBox='0%200%2024%2025'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M18.4887%206.01121C17.3835%204.90598%2015.5916%204.90602%2014.4863%206.01125L13.5087%206.98883L17.5087%2010.9887L18.4864%2010.0113C19.5915%208.90606%2019.594%207.11642%2018.4887%206.01121Z'%20fill='white'/%3e%3cpath%20d='M3.96626%2016.5308L12.4827%208.01443L16.4827%2012.0144L7.96626%2020.5308L3.96627%2020.5308L3.96626%2016.5308Z'%20fill='white'/%3e%3c/svg%3e",$ft="/assets/logo-CWK8dInB.svg",VY="data:image/svg+xml,%3csvg%20width='105'%20height='33'%20viewBox='0%200%20105%2033'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20clip-path='url(%23clip0_3224_3869)'%3e%3cpath%20d='M51.6466%2022.4581L55.6466%2012.6449C55.6873%2012.6041%2055.6466%2012.5294%2055.5719%2012.5294H51.9997C51.9725%2012.5294%2051.9476%2012.5158%2051.925%2012.4887L50.6958%2010.5124C50.6551%2010.4717%2050.6958%2010.397%2050.7705%2010.397H58.071C58.1118%2010.397%2058.1457%2010.4377%2058.1457%2010.4785V12.0201L54.071%2022.5803C54.071%2022.6211%2054.0303%2022.6211%2053.9963%2022.6211H51.7688C51.6534%2022.5803%2051.6126%2022.5396%2051.6534%2022.4649L51.6466%2022.4581Z'%20fill='%23333333'/%3e%3cpath%20d='M57.4732%2018.4239L58.132%2016.5495C58.132%2016.5088%2058.1659%2016.5088%2058.1999%2016.5088H61.4597C61.4936%2016.5088%2061.5276%2016.5495%2061.5276%2016.5903V18.4646C61.5276%2018.5054%2061.4936%2018.5461%2061.4597%2018.5461H57.5004C57.4665%2018.5054%2057.4325%2018.4646%2057.4665%2018.4239H57.4732Z'%20fill='%23333333'/%3e%3cpath%20d='M45.0962%2010.4006C46.2046%2010.4006%2047.118%2010.5343%2047.8365%2010.8017C48.5606%2011.069%2049.098%2011.4728%2049.4489%2012.0131C49.7998%2012.5533%2049.9753%2013.2356%2049.9753%2014.0599C49.9753%2014.6169%2049.8694%2015.1042%2049.6578%2015.5219C49.4462%2015.9397%2049.1677%2016.2933%2048.8223%2016.583C48.477%2016.8726%2048.1039%2017.1093%2047.7028%2017.2931L51.2953%2022.6149H48.4213L45.5056%2017.928H44.1271V22.6149H41.5372V10.4006H45.0962ZM44.9124%2012.5227H44.1271V15.8227H44.9626C45.8203%2015.8227%2046.433%2015.6807%2046.8006%2015.3966C47.1737%2015.107%2047.3603%2014.6837%2047.3603%2014.1267C47.3603%2013.5475%2047.1598%2013.1353%2046.7588%2012.8903C46.3633%2012.6452%2045.7479%2012.5227%2044.9124%2012.5227Z'%20fill='%23333333'/%3e%3cpath%20d='M68.3088%2022.615L65.368%2013.0324H65.2928C65.3039%2013.2607%2065.3206%2013.6061%2065.3429%2014.0683C65.3708%2014.525%2065.3958%2015.0124%2065.4181%2015.5304C65.4404%2016.0483%2065.4515%2016.5162%2065.4515%2016.9339V22.615H63.1373V10.4007H66.6629L69.5536%2019.741H69.6037L72.6698%2010.4007H76.1954V22.615H73.781V16.8337C73.781%2016.4494%2073.7865%2016.0066%2073.7977%2015.5053C73.8144%2015.004%2073.8339%2014.5278%2073.8561%2014.0767C73.8784%2013.62%2073.8951%2013.2774%2073.9063%2013.0491H73.8311L70.6814%2022.615H68.3088Z'%20fill='%23333333'/%3e%3cpath%20d='M86.4133%2022.615L85.5277%2019.7076H81.0748L80.1892%2022.615H77.3988L81.7097%2010.3506H84.8761L89.2037%2022.615H86.4133ZM84.9095%2017.5354L84.0239%2014.6949C83.9682%2014.5056%2083.893%2014.2633%2083.7983%2013.9681C83.7092%2013.6673%2083.6173%2013.3638%2083.5226%2013.0574C83.4335%2012.7455%2083.3611%2012.4754%2083.3054%2012.2471C83.2497%2012.4754%2083.1717%2012.7595%2083.0715%2013.0992C82.9768%2013.4334%2082.8849%2013.7509%2082.7958%2014.0516C82.7067%2014.3524%2082.6426%2014.5668%2082.6036%2014.6949L81.7264%2017.5354H84.9095Z'%20fill='%23333333'/%3e%3cpath%20d='M90.4071%2022.615V10.4007H92.997V22.615H90.4071Z'%20fill='%23333333'/%3e%3cpath%20d='M95.7292%2022.615V10.4007H98.3191V20.4762H103.273V22.615H95.7292Z'%20fill='%23333333'/%3e%3cpath%20d='M27.846%200.5H4.15396C1.85979%200.5%200%202.35979%200%204.65396V28.346C0%2030.6402%201.85979%2032.5%204.15396%2032.5H27.846C30.1402%2032.5%2032%2030.6402%2032%2028.346V4.65396C32%202.35979%2030.1402%200.5%2027.846%200.5Z'%20fill='%23339AF0'/%3e%3cpath%20d='M26.9524%208.77774C26.9404%208.7234%2026.9283%208.66906%2026.9162%208.61472H26.8981C26.5962%207.9566%2025.9321%207.4917%2025.1532%207.4917H6.85281C5.7962%207.4917%204.93884%208.34906%204.93884%209.40566V23.6064C4.93884%2024.663%205.7962%2025.5204%206.85281%2025.5204H25.1532C26.2098%2025.5204%2027.0671%2024.663%2027.0671%2023.6064V9.39962C27.0671%209.18227%2027.0249%208.97094%2026.9524%208.77774ZM6.85281%208.87434H25.1532C25.3524%208.87434%2025.5275%208.9951%2025.612%209.15811C25.6845%209.52642%2025.5939%209.91887%2025.3524%2010.1966L16.8453%2016.8442C16.3804%2017.1279%2015.692%2017.2426%2015.197%2016.8683L6.6596%2010.1966C6.41205%209.91283%206.32148%209.51434%206.39997%209.14C6.49054%208.98302%206.65356%208.87434%206.84677%208.87434H6.85281ZM25.1532%2024.1317H6.85281C6.56299%2024.1317%206.32752%2023.8962%206.32752%2023.6064V11.6879L14.3577%2017.9732C14.8166%2018.3234%2015.3841%2018.4925%2015.9637%2018.4925C16.5434%2018.4925%2017.1049%2018.3294%2017.6181%2018.0034L25.6785%2011.706V23.6064C25.6785%2023.8962%2025.443%2024.1317%2025.1532%2024.1317Z'%20fill='white'/%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='clip0_3224_3869'%3e%3crect%20width='104.6'%20height='32'%20fill='white'%20transform='translate(0%200.5)'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e";let GM=!1;const Fft=()=>{GM=!0},zft=()=>{const t=GM;return GM=!1,t},Pft=()=>{const t=document.querySelector("head > link[type='image/x-icon']");t&&(t.href="/favorite.ico")},Bft=t=>!t.includes("/search")&&!t.includes("/tags"),Hft=t=>{const e=zt(),n=wn(),r=re(iS),s=re(mr),o=re(aS),i=S.useCallback(()=>{if(e(Vc()),t&&!r){const c=Math.abs((o-1)*s.size);e(ur({...s,folderId:t,offset:c}))}},[e,t,r,o]),a=UG(i,I8e),l=S.useRef(i);return S.useEffect(()=>{l.current=i},[i]),S.useEffect(()=>{!t||!Bft(n.pathname)||zft()||l.current()},[t]),S.useEffect(()=>{if(r||!["/","/inbox","/tags"].includes(n.pathname)){a.stop();return}a.start();const c=()=>{document.visibilityState==="visible"?(i(),Pft(),a.start()):a.stop()};return document.addEventListener("visibilitychange",c),()=>{a.stop(),document.removeEventListener("visibilitychange",c)}},[n,i,r]),a},Uft="_folder_6rkob_1",Vft="_unreadCounter_6rkob_20",fae={folder:Uft,unreadCounter:Vft},qft=S.memo(t=>{const{t:e}=Le(),n=zt(),{openAddFolderModal:r,openFolderDeleteModal:s,openEditFolderModal:o,counters:i,folder:a,match:l,menuOpened:c,setMenuOpened:u,isHover:f}=t,h=L_(i,a.Id,a.Type)||"",m=Lm(a==null?void 0:a.Type),y={borderRadius:"100%",backgroundColor:"#868d9633",fontSize:"10px",alignItems:"center"},v=S.useRef(null),[b]=Ope(),{read:w}=Ol(a.UserEmailId);S.useEffect(()=>{l&&n(LTe(a))},[l]);const C=S.useCallback(()=>u(!1),[u]);return Jm(v,C,"mouseup"),S.useEffect(()=>{c&&u(!1)},[b]),S.useEffect(()=>{f||u(!1)},[f,u]),d.jsxs(ie,{className:`${c?"menuBox-open":""}`,children:[d.jsx(ve,{ref:v,className:"menuBox",sx:{position:"relative",display:c?"block":"none"},children:!w&&d.jsxs(et,{opened:c,offset:-2,position:"bottom-end",radius:"md",withinPortal:!1,children:[d.jsx(et.Target,{children:d.jsx("span",{style:{cursor:"pointer",display:"flex",alignItems:"center"},onClick:k=>{k.preventDefault(),k.stopPropagation(),u(!c)},children:d.jsx(Ve,{size:"lg",variant:"subtle",radius:"md",sx:{width:"40px",height:"36px","@media (min-width: 1025px)":{"&:hover":{backgroundColor:l?"#f3faff":c?"#f8f9fa":""}}},children:d.jsx(Rc,{style:{width:"20px",height:"20px"}})})})}),d.jsxs(et.Dropdown,{children:[a.role!=="read"&&d.jsx(et.Item,{color:"#343A40",px:10,py:5,fz:14,leftSection:d.jsx(Y4,{size:18}),onClick:k=>{k.preventDefault(),k.stopPropagation(),u(!1),o(a)},children:e("edit")}),d.jsx(et.Item,{color:"#343A40",px:10,py:5,fz:14,leftSection:d.jsx(R2,{size:18}),onClick:k=>{k.stopPropagation(),u(!1),r({parentId:a.Id})},children:e("addAFolder")}),a.role!=="read"&&d.jsxs(d.Fragment,{children:[d.jsx(et.Divider,{}),d.jsx(et.Item,{color:"#fa5252",px:10,py:5,fz:14,leftSection:d.jsx(Eo,{size:18}),onClick:k=>{k.stopPropagation(),u(!1),s(a)},children:e("delete")})]})]})]})}),h?d.jsx(ue,{className:`${fae.unreadCounter} counters`,w:16,sx:{...m?y:{}},c:"dimmed",children:h}):d.jsx(ie,{mr:16})]})}),Wft=S.memo(t=>{var _;const e=me.c(26),{match:n,hasChildren:r,opened:s,onOpened:o,folderId:i,folderStatus:a,folderType:l}=t,c=zt(),[u,f]=S.useState(a===1);let h,m;e[0]!==a?(h=()=>{f(a===1)},m=[a],e[0]=a,e[1]=h,e[2]=m):(h=e[1],m=e[2]),S.useEffect(h,m);let y;e[3]!==c||e[4]!==i||e[5]!==u||e[6]!==o||e[7]!==s?(y=async()=>{const D=u?0:1;f(!u),o(!s),await c(vTe({folderId:i,status:D}))},e[3]=c,e[4]=i,e[5]=u,e[6]=o,e[7]=s,e[8]=y):y=e[8];const v=y,b=n?"#f3faff":"#f8f9fa";let w;e[9]!==b?(w={width:"22px",alignItems:"center",justifyContent:"center","&:hover svg":{backgroundColor:b}},e[9]=b,e[10]=w):w=e[10];let C;e[11]!==v||e[12]!==r||e[13]!==s?(C=r?d.jsx(Yi,{size:16,stroke:1.5,color:"#868E96",className:"mantine-rotate-rtl",style:{transform:s?"rotateZ(90deg)":"rotateZ(0deg)",transition:"200ms"},onClick:D=>{D.stopPropagation(),v()}}):null,e[11]=v,e[12]=r,e[13]=s,e[14]=C):C=e[14];let k;e[15]!==w||e[16]!==C?(k=d.jsx(xe,{sx:w,children:C}),e[15]=w,e[16]=C,e[17]=k):k=e[17];let E;e[18]===Symbol.for("react.memo_cache_sentinel")?(E={flexShrink:1,height:"24px",color:"#343A40"},e[18]=E):E=e[18];let j;e[19]!==l?(j=((_=O_.find(D=>D.Type===l))==null?void 0:_.icon)||d.jsx(R2,{stroke:1.5,size:22}),e[19]=l,e[20]=j):j=e[20];let A;e[21]!==j?(A=d.jsx(ie,{sx:E,children:j}),e[21]=j,e[22]=A):A=e[22];let M;return e[23]!==A||e[24]!==k?(M=d.jsxs(d.Fragment,{children:[k,A]}),e[23]=A,e[24]=k,e[25]=M):M=e[25],M}),Yft=S.memo(t=>{const e=me.c(13),{folderName:n,isTruncated:r,onClose:s}=t;let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o={maxWidth:"350px",whiteSpace:"normal",wordBreak:"break-all"},e[0]=o):o=e[0];let i;e[1]!==n?(i=d.jsx("div",{style:o,children:n}),e[1]=n,e[2]=i):i=e[2];const a=!r;let l;e[3]!==s?(l=()=>s(),e[3]=s,e[4]=l):l=e[4];let c;e[5]===Symbol.for("react.memo_cache_sentinel")?(c={flexGrow:1,fontWeight:400,width:"140px"},e[5]=c):c=e[5];let u;e[6]!==n||e[7]!==l?(u=d.jsx(ie,{className:fae.folder,children:d.jsx(ue,{onClick:l,size:"16",truncate:!0,sx:c,children:n})}),e[6]=n,e[7]=l,e[8]=u):u=e[8];let f;return e[9]!==i||e[10]!==a||e[11]!==u?(f=d.jsx(on,{withinPortal:!0,label:i,position:"right",withArrow:!0,arrowPosition:"center",offset:55,disabled:a,children:u}),e[9]=i,e[10]=a,e[11]=u,e[12]=f):f=e[12],f}),Gft=(t,e,n,r,s,o,i)=>({borderRadius:t.radius.md,marginBottom:"2px",transition:"0.02s",backgroundColor:n?`${t.colors.blue[0]} !important`:"initial","&.active":{backgroundColor:n?`${t.colors.blue[0]} !important`:t.colors.blue[0]},"&.wrapperActive":{backgroundColor:n?`${t.colors.blue[0]} !important`:t.colors.blue[0]},"@media (max-width: 1024px)":{"&.mantine-NavLink-root":{"&:active":{backgroundColor:"transparent"}}},"@media (min-width: 1025px)":{backgroundColor:e?t.colors.gray[1]:"","&.wrapperActive":{"&:hover":{backgroundColor:t.colors.blue[0]}},"&:hover":{backgroundColor:!n&&r?"transparent":t.colors.gray[1],...!s&&!o&&!i&&{"& .menuBox":{display:"block"}},".mantine-Menu-dropdown":{display:e?"block":"none"}},...!s&&!o&&!i&&{"&:hover:not(.menuBox-open) .counters":{opacity:0,position:"absolute",left:0}},"& .menuBox-open .counters":{opacity:0,position:"absolute",left:0}},".menuBox-margin":{paddingRight:"16px"}}),pae=S.memo(t=>{var be,je,pe,_e;const{folder:e,nestedFolder:n,onFolderClick:r,folderLevel:s,setFolderLevel:o,isHover:i}=t,[a,l]=S.useState(e.Status===1),[c,u]=S.useState(!1),{emailId:f}=sr(),h=zt(),m=re(lee),y=re($o),v=(je=(be=re(mr))==null?void 0:be.SearchContext)==null?void 0:je.Labels,b=re(Dn),w=qie(),C=Lrt(),{setDrawerOpen:k}=S.useContext(t1),{t:E}=Le(),j=Mr(),A=Er(),M=wn(),_=nI(),D=S.useMemo(()=>{var Ce;return Number.isFinite(Number(f))?f:`${(Ce=b[0])==null?void 0:Ce.Id}`},[f,b]),R=Hh(e.path,M.pathname)||Hh(`/${encodeURIComponent(e.Name)}`,M.pathname),N=(y==null?void 0:y.FolderId)===e.Id&&M.pathname.includes("/message/")&&!(v!=null&&v.length)&&!M.pathname.includes("/search/"),z=R||N,B=10,L=8,H=120-5*s,$=e.label||e.Name,V=Lm(e==null?void 0:e.Type),q=tJ(e==null?void 0:e.Type),U=e9e(e==null?void 0:e.Type),Y=$.length*L>H,[G,K]=S.useState(!1),Q=Ce=>o_e.openConfirmModal({title:`${E("modals.titles.deleteFolder")}`,centered:!0,children:d.jsx(ue,{size:"sm",children:E("modals.text.deleteFolderText")}),labels:{confirm:`${E("modals.controls.delete")}`,cancel:`${E("modals.controls.cancel")}`},confirmProps:{color:"red",disabled:G,styles:{label:{fontSize:"12px"}}},cancelProps:{styles:{label:{fontSize:"12px"}}},onConfirm:()=>J(Ce.Id,Ce.Name||Ce.label)}),Z=S.useCallback(()=>{setTimeout(()=>{k(!1)},700)},[k]),J=async(Ce,Te)=>{var Ae;K(!0);try{await h(fx({folderId:Ce})).unwrap(),M.pathname.includes(`${e.path}`)&&(h(jo()),A(`/${D}/inbox`)),h(ja()),j.success(E("notifications.messages.deleteFolder",{label:Te}))}catch(Ze){K(!1),Ct.isAxiosError(Ze)&&((Ae=Ze.response)!=null&&Ae.data)?Ze.response.data.Code===54012?j.error(E("notifications.messages.notFoundFolder",{label:Te})):j.error(E("notifications.messages.globalError")||E("notifications.messages.deleteFolderError")):j.error(E("notifications.messages.unknownError"))}},ne=z?"wrapperActive":"",{setNodeRef:se,isOver:ce,active:fe}=mR({id:e.Id}),le=S.useCallback(Ce=>{var Te,Ae;return Gft(Ce,c,ce&&((Ae=(Te=fe==null?void 0:fe.data)==null?void 0:Te.current)==null?void 0:Ae.userEmailId)===e.UserEmailId,!!(fe!=null&&fe.id),V,q,U)},[c,ce,fe==null?void 0:fe.data,fe==null?void 0:fe.id,e.UserEmailId,V,q,U]);return d.jsx(ya,{ref:se,w:"100%",sx:le,defaultValue:e.Status?`item-${e.Status}`:"",p:0,className:ne,styles:{root:{borderRadius:"8px",paddingLeft:n?`${B+s*17}px!important`:"auto"},collapse:{width:"100%"},children:{paddingLeft:0}},onClick:async()=>{r(e.Id),h(Dc(1)),z||(await h(q_(e.Id)),Fft()),N_($,L_(m,e.Id,e.Type)),A(e.path||`/${encodeURIComponent(e.Name)}`)},opened:a,label:d.jsx(Yft,{folderName:$,isTruncated:Y,onClose:Z}),leftSection:d.jsx(Wft,{folderId:e.Id,folderStatus:e.Status,folderType:e.Type,opened:a,onOpened:l,match:!!z,hasChildren:!!((pe=e.Children)!=null&&pe.length)}),rightSection:d.jsx(qft,{openAddFolderModal:w,openFolderDeleteModal:Q,folder:e,openEditFolderModal:C,counters:m,match:!!z,isHover:i,menuOpened:c,setMenuOpened:u}),disableRightSectionRotation:!0,children:d.jsx(ol,{component:null,children:a&&((_e=e.Children)==null?void 0:_e.map(Ce=>{const Te=_(String(Ce.Id));return d.jsx(Z2,{timeout:300,nodeRef:Te,unmountOnExit:!0,children:d.jsx("div",{ref:Te,children:d.jsx(pae,{folder:Ce,onFolderClick:r,nestedFolder:!0,setFolderLevel:o,folderLevel:s+1,isHover:i})})},Ce.Id)}))})},e.path)}),Kft=S.memo(t=>{const e=me.c(61),{account:n,isHover:r,manyAccounts:s,isOpen:o,onToggle:i}=t,{t:a}=Le(),[l,c]=S.useState(0),u=re(Va),f=re(nR),h=zt(),m=ts(),y=qie(),{setDrawerOpen:v}=S.useContext(t1),{read:b}=Ol(n.Id),{clearSelection:w}=Fl();let C;if(e[0]!==n.Id||e[1]!==u){let J;e[3]!==n.Id?(J=ne=>ne.UserEmailId===n.Id,e[3]=n.Id,e[4]=J):J=e[4],C=u.filter(J),e[0]=n.Id,e[1]=u,e[2]=C}else C=e[2];const k=C;let E;e[5]!==v?(E=()=>{v(!1)},e[5]=v,e[6]=E):E=e[6];const j=E;let A;e[7]!==w||e[8]!==h||e[9]!==(m==null?void 0:m.Id)||e[10]!==j||e[11]!==f?(A=J=>{h(Ns(null)),h(jo()),(m==null?void 0:m.Id)!==J&&h(ree()),h(ud(!1)),h(LQ()),h(im({SearchContext:{Query:"",Body:"",Subject:"",From:"",To:"",StartDate:"",EndDate:"",HasAttachments:!1,Labels:[]},sortOrder:1,offset:0})),h(oS()),f>-1&&h(tR({label:-1})),j(),w()},e[7]=w,e[8]=h,e[9]=m==null?void 0:m.Id,e[10]=j,e[11]=f,e[12]=A):A=e[12];const M=A;let _;if(e[13]!==l||e[14]!==r||e[15]!==M||e[16]!==k){let J;e[18]!==l||e[19]!==r||e[20]!==M?(J=ne=>d.jsx(S.Fragment,{children:d.jsx(pae,{folder:ne,onFolderClick:M,setFolderLevel:c,folderLevel:l,isHover:r})},ne.Id),e[18]=l,e[19]=r,e[20]=M,e[21]=J):J=e[21],_=k.map(J),e[13]=l,e[14]=r,e[15]=M,e[16]=k,e[17]=_}else _=e[17];const D=_;let R;e[22]!==a?(R=a("addAFolder"),e[22]=a,e[23]=R):R=e[23];let N;e[24]===Symbol.for("react.memo_cache_sentinel")?(N=d.jsx(nm,{stroke:1.5,size:18}),e[24]=N):N=e[24];let z;e[25]!==n.Id||e[26]!==y?(z=()=>{y({userEmailId:n.Id})},e[25]=n.Id,e[26]=y,e[27]=z):z=e[27];const B=!u.length;let L;e[28]===Symbol.for("react.memo_cache_sentinel")?(L={section:{marginRight:"14px"}},e[28]=L):L=e[28];let P;e[29]!==a?(P=a("addAFolder"),e[29]=a,e[30]=P):P=e[30];let I;e[31]!==P||e[32]!==z||e[33]!==B?(I=d.jsx(yt,{variant:"subtle",color:"gray",leftSection:N,onClick:z,disabled:B,sx:Xft,styles:L,children:P}),e[31]=P,e[32]=z,e[33]=B,e[34]=I):I=e[34];let H;e[35]!==I||e[36]!==R?(H=d.jsx(on,{withinPortal:!0,label:R,position:"right",withArrow:!0,arrowPosition:"center",opened:!1,children:I}),e[35]=I,e[36]=R,e[37]=H):H=e[37];const $=H;if(!s){let J;return e[38]!==$||e[39]!==D?(J=d.jsxs(d.Fragment,{children:[D,$]}),e[38]=$,e[39]=D,e[40]=J):J=e[40],J}let V;e[41]!==n.Id||e[42]!==i?(V=()=>i(n.Id),e[41]=n.Id,e[42]=i,e[43]=V):V=e[43];let q;e[44]===Symbol.for("react.memo_cache_sentinel")?(q={root:{paddingLeft:"2px",borderRadius:"8px"},collapse:{width:"100%"},label:{fontWeight:"600",fontSize:14},section:{marginRight:"4px"}},e[44]=q):q=e[44];let U;e[45]===Symbol.for("react.memo_cache_sentinel")?(U=d.jsx(d.Fragment,{}),e[45]=U):U=e[45];const W=o?"rotateZ(90deg)":"rotateZ(0deg)";let Y;e[46]!==W?(Y={transform:W,transition:"200ms"},e[46]=W,e[47]=Y):Y=e[47];let G;e[48]!==n.Id||e[49]!==i?(G=J=>{J.stopPropagation(),i(n.Id)},e[48]=n.Id,e[49]=i,e[50]=G):G=e[50];let K;e[51]!==Y||e[52]!==G?(K=d.jsx(Yi,{size:16,stroke:1.5,color:"#868E96",className:"mantine-rotate-rtl",style:Y,onClick:G}),e[51]=Y,e[52]=G,e[53]=K):K=e[53];const Q=!b&&$;let Z;return e[54]!==n.Email||e[55]!==o||e[56]!==D||e[57]!==V||e[58]!==K||e[59]!==Q?(Z=d.jsxs(ya,{opened:o,onClick:V,label:n.Email,childrenOffset:0,styles:q,disableRightSectionRotation:!0,rightSection:U,leftSection:K,children:[D,Q]}),e[54]=n.Email,e[55]=o,e[56]=D,e[57]=V,e[58]=K,e[59]=Q,e[60]=Z):Z=e[60],Z});function Xft(t){return{width:"100%",margin:`1 ${-t.spacing.xs}`,padding:"0 20px 0 22px",color:t.colors.blue[5],fontSize:"14px",outline:"none","& > *":{justifyContent:"flex-start"},"&:hover":{backgroundColor:"transparent",color:t.colors.blue[5]},"&[data-disabled]":{backgroundColor:"transparent"}}}const qY="emailsState",WY=S.memo(({isHover:t})=>{const e=re(Dn),[n,r]=S.useState(()=>{var a;const i=localStorage.getItem(qY);return i?JSON.parse(i):{[(a=e==null?void 0:e[0])==null?void 0:a.Id]:!0}}),s=i=>{r(a=>({...a,[i]:!a[i]}))};S.useEffect(()=>{localStorage.setItem(qY,JSON.stringify(n))},[n]);const o=S.useMemo(()=>e.map((i,a)=>d.jsx(Kft,{account:i,isOpen:n[i.Id]??a===0,isHover:t,manyAccounts:e.length>1,onToggle:s},i.Id)),[e,t,n]);return d.jsxs(bt,{align:"center",gap:0,children:[o,d.jsx(ie,{w:"100%",sx:()=>({padding:"0",borderTop:"solid 1px #DEE2E6",marginTop:12}),children:d.jsx(qM,{isFilters:!0})})]})}),Zft=S.memo(({toggleDesktop:t,isHover:e,setIsHover:n})=>{const r=zt(),s=window.location.search,o=S.useRef(null),i=uI(o),{clearSelection:a}=Fl(),l=re(Dn),c=ts(),u=xt(1024),f=Hft((c==null?void 0:c.Id)??null),h=re(Dl),m=re(mr),[y,v]=S.useState(!1),b=vn.language==="ru",w=s.includes("to=")&&l.length,C=`${l[0].Id}/inbox`,k=Fa({type:"new",fromContacts:!0}),E=Fa({type:"new",folderId:c==null?void 0:c.Id}),{t:j}=Le(),{isDrawerOpen:A,setDrawerOpen:M}=S.useContext(t1),_=280,D=L=>{switch(L){case"ru":return $ft;case"en":return VY;default:return VY}},R=S.useCallback(()=>{M(!1)},[M]),N=()=>{u&&M(!1),C!==(c==null?void 0:c.path)&&a(),r(im({SearchContext:{Query:"",Body:"",Subject:"",From:"",To:"",StartDate:"",EndDate:"",HasAttachments:!1,Labels:[]},sortOrder:1,offset:0}))};S.useEffect(()=>{w&&k()},[s]);const z=h.length?{}:{filter:"brightness(0.7)"},B=async()=>{v(!0);try{await Promise.all([r(ur({...m})).unwrap(),r(Vc()).unwrap(),r(ja()).unwrap(),r(Xu()).unwrap()]).then(()=>v(!1)),f.stop(),f.start()}catch{v(!1)}};return d.jsx(d.Fragment,{children:u?d.jsx(Xr,{styles:{inner:{zIndex:200}},size:"xs",opened:A,onClose:R,withCloseButton:!1,overlayProps:{backgroundOpacity:.5,blur:2},transitionProps:{duration:185,timingFunction:"linear"},children:d.jsx($r.Navbar,{withBorder:!1,sx:{top:"0",height:"100%"},children:d.jsx(Jr,{viewportRef:o,offsetScrollbars:!0,scrollbarSize:6,px:"12px",py:"0",styles:{viewport:{paddingRight:0}},sx:{"& > * > *":{display:"block !important"}},children:d.jsxs($r.Section,{children:[d.jsx(ie,{component:UY,onClick:N,sx:{paddingLeft:"17px!important"},to:C,children:d.jsx("img",{src:D(vn.language),alt:j("mailTitle"),height:b?30:31})}),d.jsxs(xe,{align:"center",justify:"center",mb:16,gap:10,children:[d.jsxs(yt,{sx:{display:"flex",borderRadius:8,width:"100%",fontSize:"16px",paddingLeft:"0","& div":{justifyContent:"left"},"& span":{fontWeight:600,paddingLeft:"10px",gap:"11px"}},size:"md",onClick:()=>{E(),R()},mx:"auto",disabled:!h.length,children:[d.jsx("img",{src:YM,alt:"Написать письмо",height:24,width:24,style:z}),j("mobileCreateMessage")]}),d.jsx(on,{position:"bottom",label:j("update"),children:d.jsx(Ve,{c:"#339AF0",component:"div",disabled:y,size:"42",radius:8,onClick:B,children:d.jsx(mf,{stroke:1.5})})})]}),d.jsx(WY,{isHover:e})]})})})}):d.jsxs($r.Navbar,{w:{base:_},withBorder:!1,onMouseLeave:()=>n(!1),sx:{boxShadow:e?"3px 0px 15px rgba(0, 0, 0, 0.1)":"",transform:e?"translateX(0)":""},children:[d.jsxs(ie,{px:12,children:[d.jsxs(xe,{justify:"center",align:"center",children:[d.jsx(ie,{component:UY,to:C,onClick:N,children:d.jsx("img",{src:D(vn.language),alt:j("mailTitle"),height:b?30:31})}),!e&&d.jsx(Ve,{size:"lg",onClick:()=>{t(),n(!1)},children:d.jsx(GQ,{stroke:1.5,size:20})})]}),d.jsxs(xe,{justify:"center",align:"center",gap:8,children:[d.jsxs(yt,{sx:{display:"flex",borderRadius:8,width:"100%",fontSize:"16px",paddingLeft:"24",paddingRight:"0","& span":{fontWeight:600,gap:"11px"}},size:"md",onClick:()=>E(),mx:"auto",disabled:!h.length,children:[d.jsx("img",{src:YM,alt:"Написать письмо",height:24,width:24,style:z}),j("mobileCreateMessage")]}),d.jsx(on,{position:"bottom",label:j("update"),children:d.jsx(Ve,{c:"#339AF0",component:"div",disabled:y,size:"42",radius:8,onClick:B,children:d.jsx(mf,{stroke:1.5})})})]})]}),d.jsx(Jr,{offsetScrollbars:!0,viewportRef:o,scrollbarSize:6,p:"12px 12px 0",styles:{viewport:{paddingRight:0},scrollbar:{display:i?"block":"none"}},sx:{"& > * > *":{display:"block !important"}},children:d.jsx($r.Section,{children:d.jsx(WY,{isHover:e})})})]})})}),Qft=()=>{const t=me.c(36),e=re(cee),n=ts(),{t:r}=Le(),s=zt(),o=n==null?void 0:n.Id;let i;t[0]!==o?(i={type:"new",folderId:o},t[0]=o,t[1]=i):i=t[1];const a=Fa(i),l=re(Dl);let c;t[2]===Symbol.for("react.memo_cache_sentinel")?(c=/^((?!chrome|android|crios|fxios|edg|opera|opr).)*safari/i.test(navigator.userAgent)&&/Mac|iPhone|iPad/i.test(navigator.platform),t[2]=c):c=t[2];const u=c;let f;t[3]!==e||t[4]!==l.length?(f=l.length?{...YY,marginRight:e?0:"7px",marginLeft:e?"1px":0}:{...YY,marginRight:e?0:"7px",marginLeft:e?"5px":0,filter:"brightness(0.7)"},t[3]=e,t[4]=l.length,t[5]=f):f=t[5];const h=f;let m;t[6]!==s||t[7]!==a?(m=()=>{a(),s(vT(!1))},t[6]=s,t[7]=a,t[8]=m):m=t[8];const y=m;let v;t[9]===Symbol.for("react.memo_cache_sentinel")?(v={insetInline:"initial",right:0,backgroundColor:"transparent"},t[9]=v):v=t[9];let b;t[10]===Symbol.for("react.memo_cache_sentinel")?(b={display:"flex",justifyContent:"end",alignItems:"center"},t[10]=b):b=t[10];const w=e?"42px":"140px",C=e?"0 7px":"0 22px";let k;t[11]!==w||t[12]!==C?(k={fontWeight:700,borderRadius:"20px",alignSelf:"end",width:w,transition:"width 0.3s ease",padding:C,boxShadow:"0px 4px 12px rgba(0, 0, 0, 0.25)"},t[11]=w,t[12]=C,t[13]=k):k=t[13];const E=!l.length;let j;t[14]!==r?(j=r("mobileCreateMessage"),t[14]=r,t[15]=j):j=t[15];let A;t[16]!==h||t[17]!==j?(A=d.jsx("img",{src:YM,alt:j,className:"arrow-icon",style:h}),t[16]=h,t[17]=j,t[18]=A):A=t[18];const M=e?0:1,_=`opacity 0.2s ease ${e?"0s":"0.2s"}`;let D;t[19]!==e?(D=u&&{transition:"opacity 0.2s ease 0s",visibility:e?"hidden":"visible",willChange:"opacity, visibility",transform:"translateZ(0)"},t[19]=e,t[20]=D):D=t[20];let R;t[21]!==_||t[22]!==D?(R={transition:_,...D},t[21]=_,t[22]=D,t[23]=R):R=t[23];let N;t[24]!==r?(N=r("mobileCreateMessage"),t[24]=r,t[25]=N):N=t[25];let z;t[26]!==M||t[27]!==R||t[28]!==N?(z=d.jsx(ue,{opacity:M,sx:R,children:N}),t[26]=M,t[27]=R,t[28]=N,t[29]=z):z=t[29];let B;return t[30]!==y||t[31]!==E||t[32]!==A||t[33]!==z||t[34]!==k?(B=d.jsx($r.Footer,{withBorder:!1,p:"0 20px 0 0",sx:v,children:d.jsx(ve,{children:d.jsx(ie,{sx:b,w:"100%",children:d.jsxs(yt,{sx:k,size:"md",onClick:y,disabled:E,children:[A,z]})})})}),t[30]=y,t[31]=E,t[32]=A,t[33]=z,t[34]=k,t[35]=B):B=t[35],B},YY={width:"24px",height:"24px",flexShrink:0},Jft=t=>{const e=me.c(46),{children:n,desktopOpened:r,toggleDesktop:s}=t,o=xt(1024),[i,a]=S.useState(!1),{handleMouseEnter:l,handleMouseLeave:c}=Jit(a);let u;e[0]===Symbol.for("react.memo_cache_sentinel")?(u=[],e[0]=u):u=e[0],S.useEffect(tpt,u);const f=o?"default":"alt",h=o?MJ:hT;let m;e[1]!==h?(m={height:h},e[1]=h,e[2]=m):m=e[2];const y=o?"100%":L8e,v=o?!1:!r;let b;e[3]!==v?(b={desktop:v},e[3]=v,e[4]=b):b=e[4];let w;e[5]!==y||e[6]!==b?(w={width:y,breakpoint:"sm",collapsed:b},e[5]=y,e[6]=b,e[7]=w):w=e[7];const C=o?N8e:0;let k;e[8]!==C?(k={height:C},e[8]=C,e[9]=k):k=e[9];const E=o?"100%":"",j=o?"auto":"100vh",A=o?"auto":"initial";let M;e[10]!==E||e[11]!==j||e[12]!==A?(M={main:{width:E,minHeight:j,height:A}},e[10]=E,e[11]=j,e[12]=A,e[13]=M):M=e[13];const _=o?"auto":"hidden";let D;e[14]!==_?(D={overflow:_},e[14]=_,e[15]=D):D=e[15];let R;e[16]!==r||e[17]!==s?(R=d.jsx(Lft,{desktopOpened:r,toggleDesktop:s}),e[16]=r,e[17]=s,e[18]=R):R=e[18];let N;e[19]!==l||e[20]!==c||e[21]!==i||e[22]!==o?(N=!o&&!i&&d.jsx(ie,{onMouseEnter:l,onMouseLeave:c,className:Qit.verticalBox,mt:hT+48}),e[19]=l,e[20]=c,e[21]=i,e[22]=o,e[23]=N):N=e[23];let z;e[24]!==i||e[25]!==s?(z=d.jsx(Zft,{toggleDesktop:s,isHover:i,setIsHover:a}),e[24]=i,e[25]=s,e[26]=z):z=e[26];let B;e[27]!==N||e[28]!==z?(B=d.jsxs(Nd,{children:[N,z]}),e[27]=N,e[28]=z,e[29]=B):B=e[29];let L;e[30]!==o?(L=o?d.jsx(Qft,{}):d.jsx(d.Fragment,{}),e[30]=o,e[31]=L):L=e[31];const P=o?0:"";let I;e[32]!==n||e[33]!==P?(I=d.jsx($r.Main,{pb:0,pl:P,children:n}),e[32]=n,e[33]=P,e[34]=I):I=e[34];let H;return e[35]!==k||e[36]!==M||e[37]!==D||e[38]!==R||e[39]!==f||e[40]!==B||e[41]!==L||e[42]!==I||e[43]!==m||e[44]!==w?(H=d.jsx(d.Fragment,{children:d.jsx(est,{children:d.jsxs($r,{transitionDuration:220,transitionTimingFunction:"ease",layout:f,withBorder:!1,padding:0,header:m,navbar:w,footer:k,styles:M,sx:D,children:[R,B,L,I]})})}),e[35]=k,e[36]=M,e[37]=D,e[38]=R,e[39]=f,e[40]=B,e[41]=L,e[42]=I,e[43]=m,e[44]=w,e[45]=H):H=e[45],H};function ept(){document.removeEventListener("focusin",lC)}function tpt(){return document.addEventListener("focusin",lC),ept}const npt=()=>{const t=me.c(8),e=zt(),n=re(Md),r=re(Q_),s=xt(1024);let o;t[0]!==r||t[1]!==e?(o=()=>{e(zTe(!r))},t[0]=r,t[1]=e,t[2]=o):o=t[2];const i=o;let a;return t[3]!==n||t[4]!==r||t[5]!==s||t[6]!==i?(a=n?d.jsx(sit,{children:d.jsx(Kit,{children:d.jsx(Jft,{desktopOpened:r,toggleDesktop:i,children:d.jsx(ie,{sx:{height:s?"-webkit-fill-available":""},children:d.jsx(sj,{})})})})}):null,t[3]=n,t[4]=r,t[5]=s,t[6]=i,t[7]=a):a=t[7],a},rpt=[{path:"/",element:d.jsx(Nd,{children:d.jsx(Snt,{})}),children:[{path:"/login",element:d.jsx(kst,{})},{index:!0,element:d.jsx(Cnt,{})},{path:"/send",element:d.jsx(Ent,{})},{path:"/:emailId/send",element:d.jsx(Wit,{children:d.jsx(Pie,{isFullPage:!0,type:"new",closeCallbackRef:{current:null}})})},{element:d.jsx(npt,{}),children:[{path:"/inbox",element:d.jsx(qit,{})},{path:"/search",element:d.jsx(fh,{})},{path:"/search/:value",element:d.jsx(fh,{})},{path:"/tags",element:d.jsx(fh,{})},{path:"/tags/:id",element:d.jsx(fh,{})},{path:"/message/:id",element:d.jsx(xst,{})},{path:"/:emailId/:name/*",element:d.jsx(fh,{})},{path:"/:emailId/*",element:d.jsx(fh,{})}]},{path:"/settings",element:d.jsx(IY,{}),children:[{path:"/settings/general",element:d.jsx(drt,{})}]},{path:"/:emailId/settings",element:d.jsx(IY,{}),children:[{index:!0,element:d.jsx(Tnt,{})},{path:"/:emailId/settings",element:d.jsx(CY,{})},{path:"/:emailId/settings/filters",element:d.jsx(CY,{})},{path:"/:emailId/settings/filters/add",element:d.jsx(SY,{})},{path:"/:emailId/settings/filters/edit/:id",element:d.jsx(SY,{})},{path:"/:emailId/settings/responder",element:d.jsx(brt,{})},{path:"/:emailId/settings/resend",element:d.jsx(yrt,{})},{path:"/:emailId/settings/sign",element:d.jsx(Trt,{})},{path:"/:emailId/settings/share",element:d.jsx(krt,{})}]}]}],spt=()=>{const t=me.c(6),e=zt(),n=re(L7e),[r,s]=S.useState(!1);let o,i;t[0]!==n||t[1]!==e?(o=()=>{if(n==="rejected"){s(!0);return}if(n==="fulfilled"&&window.location.pathname==="/login"){window.location.href="/";return}if(n!=="initial")return;(async()=>{var m,y,v;const c=await e(XJ()).unwrap(),u=(m=c==null?void 0:c.ModuleSettings)==null?void 0:m.ModuleUrls,f=(y=u==null?void 0:u.find(opt))==null?void 0:y.Url;if(!f)return;const h=[GJ,cx,hx,ja];if(c.UserId>0){if(!((v=u==null?void 0:u.find(ipt))==null?void 0:v.HasAccess)){window.location.href=f+"/dashboard?from=Mail";return}const w=h.map(C=>e(C()).unwrap());await Promise.all(w).catch(apt)}else window.location.pathname!=="/login"&&f&&(window.location.href=f+"/login?returnUrl="+escape(window.location.href));s(!0)})()},i=[e,n],t[0]=n,t[1]=e,t[2]=o,t[3]=i):(o=t[2],i=t[3]),S.useEffect(o,i);let a;return t[4]!==r?(a=r?d.jsx(sj,{}):d.jsx(PR,{}),t[4]=r,t[5]=a):a=t[5],a};function opt(t){return t.Name==="Admin"}function ipt(t){return t.Name==="Mail"}function apt(t){console.error(t)}const lpt={},cpt=ife(rpt,lpt);jce.createRoot(document.getElementById("root")).render(d.jsx(Uce,{store:IMe,children:d.jsx(l2,{children:d.jsx(yfe,{router:cpt})})}));
