From a5b34bca336cb96ce8e25823bb6a5735c283b803 Mon Sep 17 00:00:00 2001 From: Bubble <49866759+BubbleDK@users.noreply.github.com> Date: Sat, 24 Aug 2024 13:39:39 +0200 Subject: [PATCH] chore: removed import of dayjs locale --- fxmanifest.lua | 2 +- .../{index-28d9c9ba.js => index-c6b52f35.js} | 170 +++++++++--------- web/build/index.html | 2 +- web/src/layers/mdt/MDT.tsx | 1 - 4 files changed, 87 insertions(+), 88 deletions(-) rename web/build/assets/{index-28d9c9ba.js => index-c6b52f35.js} (91%) diff --git a/fxmanifest.lua b/fxmanifest.lua index c9a03b8..1e0a059 100644 --- a/fxmanifest.lua +++ b/fxmanifest.lua @@ -6,7 +6,7 @@ game 'gta5' --[[ Resource Information ]]-- name 'bub-mdt' -version '0.0.0' +version '0.0.2' license 'GPL-3.0-or-later' author 'Bubble' diff --git a/web/build/assets/index-28d9c9ba.js b/web/build/assets/index-c6b52f35.js similarity index 91% rename from web/build/assets/index-28d9c9ba.js rename to web/build/assets/index-c6b52f35.js index a487ba8..cac58d6 100644 --- a/web/build/assets/index-28d9c9ba.js +++ b/web/build/assets/index-c6b52f35.js @@ -84,7 +84,7 @@ function IH(e,t){for(var n=0;n")&&(c=c.replace("",e.displayName)),c}while(1<=s&&0<=a);break}}}finally{o_=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?pd(e):""}function vY(e){switch(e.tag){case 5:return pd(e.type);case 16:return pd("Lazy");case 13:return pd("Suspense");case 19:return pd("SuspenseList");case 0:case 2:case 15:return e=i_(e.type,!1),e;case 11:return e=i_(e.type.render,!1),e;case 1:return e=i_(e.type,!0),e;default:return""}}function tb(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case _c:return"Fragment";case yc:return"Portal";case Xw:return"Profiler";case vS:return"StrictMode";case Qw:return"Suspense";case eb:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case iL:return(e.displayName||"Context")+".Consumer";case oL:return(e._context.displayName||"Context")+".Provider";case yS:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case _S:return t=e.displayName||null,t!==null?t:tb(e.type)||"Memo";case Vs:t=e._payload,e=e._init;try{return tb(e(t))}catch{}}return null}function yY(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return tb(t);case 8:return t===vS?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function xa(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function aL(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function _Y(e){var t=aL(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var o=n.get,i=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(s){r=""+s,i.call(this,s)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(s){r=""+s},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Pp(e){e._valueTracker||(e._valueTracker=_Y(e))}function lL(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=aL(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function ym(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function nb(e,t){var n=t.checked;return Ut({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Nk(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=xa(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function cL(e,t){t=t.checked,t!=null&&gS(e,"checked",t,!1)}function rb(e,t){cL(e,t);var n=xa(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?ob(e,t.type,n):t.hasOwnProperty("defaultValue")&&ob(e,t.type,xa(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Tk(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function ob(e,t,n){(t!=="number"||ym(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var hd=Array.isArray;function Ac(e,t,n,r){if(e=e.options,t){t={};for(var o=0;o"+t.valueOf().toString()+"",t=Op.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Jd(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Cd={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},wY=["Webkit","ms","Moz","O"];Object.keys(Cd).forEach(function(e){wY.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Cd[t]=Cd[e]})});function pL(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Cd.hasOwnProperty(e)&&Cd[e]?(""+t).trim():t+"px"}function hL(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,o=pL(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,o):e[n]=o}}var bY=Ut({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function ab(e,t){if(t){if(bY[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(ce(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(ce(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(ce(61))}if(t.style!=null&&typeof t.style!="object")throw Error(ce(62))}}function lb(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var cb=null;function wS(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var ub=null,Bc=null,Fc=null;function Lk(e){if(e=Rf(e)){if(typeof ub!="function")throw Error(ce(280));var t=e.stateNode;t&&(t=h0(t),ub(e.stateNode,e.type,t))}}function mL(e){Bc?Fc?Fc.push(e):Fc=[e]:Bc=e}function gL(){if(Bc){var e=Bc,t=Fc;if(Fc=Bc=null,Lk(e),t)for(e=0;e>>=0,e===0?32:31-(TY(e)/IY|0)|0}var Cp=64,kp=4194304;function md(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function xm(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,o=e.suspendedLanes,i=e.pingedLanes,s=n&268435455;if(s!==0){var a=s&~o;a!==0?r=md(a):(i&=s,i!==0&&(r=md(i)))}else s=n&~o,s!==0?r=md(s):i!==0&&(r=md(i));if(r===0)return 0;if(t!==0&&t!==r&&!(t&o)&&(o=r&-r,i=t&-t,o>=i||o===16&&(i&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function Lf(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Jo(t),e[t]=n}function RY(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0=Ed),Wk=String.fromCharCode(32),Uk=!1;function DL(e,t){switch(e){case"keyup":return dK.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function RL(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var wc=!1;function pK(e,t){switch(e){case"compositionend":return RL(t);case"keypress":return t.which!==32?null:(Uk=!0,Wk);case"textInput":return e=t.data,e===Wk&&Uk?null:e;default:return null}}function hK(e,t){if(wc)return e==="compositionend"||!ES&&DL(e,t)?(e=jL(),Ih=OS=qs=null,wc=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=Kk(n)}}function FL(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?FL(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function VL(){for(var e=window,t=ym();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=ym(e.document)}return t}function $S(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function SK(e){var t=VL(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&FL(n.ownerDocument.documentElement,n)){if(r!==null&&$S(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var o=n.textContent.length,i=Math.min(r.start,o);r=r.end===void 0?i:Math.min(r.end,o),!e.extend&&i>r&&(o=r,r=i,i=o),o=qk(n,i);var s=qk(n,r);o&&s&&(e.rangeCount!==1||e.anchorNode!==o.node||e.anchorOffset!==o.offset||e.focusNode!==s.node||e.focusOffset!==s.offset)&&(t=t.createRange(),t.setStart(o.node,o.offset),e.removeAllRanges(),i>r?(e.addRange(t),e.extend(s.node,s.offset)):(t.setEnd(s.node,s.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,bc=null,gb=null,Md=null,vb=!1;function Jk(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;vb||bc==null||bc!==ym(r)||(r=bc,"selectionStart"in r&&$S(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Md&&rf(Md,r)||(Md=r,r=Om(gb,"onSelect"),0Pc||(e.current=Sb[Pc],Sb[Pc]=null,Pc--)}function kt(e,t){Pc++,Sb[Pc]=e.current,e.current=t}var Sa={},rr=Na(Sa),Br=Na(!1),Ol=Sa;function Qc(e,t){var n=e.type.contextTypes;if(!n)return Sa;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var o={},i;for(i in n)o[i]=t[i];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function Fr(e){return e=e.childContextTypes,e!=null}function km(){Dt(Br),Dt(rr)}function o2(e,t,n){if(rr.current!==Sa)throw Error(ce(168));kt(rr,t),kt(Br,n)}function JL(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var o in r)if(!(o in t))throw Error(ce(108,yY(e)||"Unknown",o));return Ut({},n,r)}function Em(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Sa,Ol=rr.current,kt(rr,e),kt(Br,Br.current),!0}function i2(e,t,n){var r=e.stateNode;if(!r)throw Error(ce(169));n?(e=JL(e,t,Ol),r.__reactInternalMemoizedMergedChildContext=e,Dt(Br),Dt(rr),kt(rr,e)):Dt(Br),kt(Br,n)}var ts=null,m0=!1,__=!1;function XL(e){ts===null?ts=[e]:ts.push(e)}function LK(e){m0=!0,XL(e)}function Ta(){if(!__&&ts!==null){__=!0;var e=0,t=yt;try{var n=ts;for(yt=1;e>=s,o-=s,ss=1<<32-Jo(t)+o|n<R?(B=I,I=null):B=I.sibling;var z=g(x,I,O[R],E);if(z===null){I===null&&(I=B);break}e&&I&&z.alternate===null&&t(x,I),S=i(z,S,R),N===null?$=z:N.sibling=z,N=z,I=B}if(R===O.length)return n(x,I),zt&&Ja(x,R),$;if(I===null){for(;RR?(B=I,I=null):B=I.sibling;var G=g(x,I,z.value,E);if(G===null){I===null&&(I=B);break}e&&I&&G.alternate===null&&t(x,I),S=i(G,S,R),N===null?$=G:N.sibling=G,N=G,I=B}if(z.done)return n(x,I),zt&&Ja(x,R),$;if(I===null){for(;!z.done;R++,z=O.next())z=p(x,z.value,E),z!==null&&(S=i(z,S,R),N===null?$=z:N.sibling=z,N=z);return zt&&Ja(x,R),$}for(I=r(x,I);!z.done;R++,z=O.next())z=v(I,x,R,z.value,E),z!==null&&(e&&z.alternate!==null&&I.delete(z.key===null?R:z.key),S=i(z,S,R),N===null?$=z:N.sibling=z,N=z);return e&&I.forEach(function(X){return t(x,X)}),zt&&Ja(x,R),$}function P(x,S,O,E){if(typeof O=="object"&&O!==null&&O.type===_c&&O.key===null&&(O=O.props.children),typeof O=="object"&&O!==null){switch(O.$$typeof){case Sp:e:{for(var $=O.key,N=S;N!==null;){if(N.key===$){if($=O.type,$===_c){if(N.tag===7){n(x,N.sibling),S=o(N,O.props.children),S.return=x,x=S;break e}}else if(N.elementType===$||typeof $=="object"&&$!==null&&$.$$typeof===Vs&&f2($)===N.type){n(x,N.sibling),S=o(N,O.props),S.ref=nd(x,N,O),S.return=x,x=S;break e}n(x,N);break}else t(x,N);N=N.sibling}O.type===_c?(S=yl(O.props.children,x.mode,E,O.key),S.return=x,x=S):(E=Fh(O.type,O.key,O.props,null,x.mode,E),E.ref=nd(x,S,O),E.return=x,x=E)}return s(x);case yc:e:{for(N=O.key;S!==null;){if(S.key===N)if(S.tag===4&&S.stateNode.containerInfo===O.containerInfo&&S.stateNode.implementation===O.implementation){n(x,S.sibling),S=o(S,O.children||[]),S.return=x,x=S;break e}else{n(x,S);break}else t(x,S);S=S.sibling}S=k_(O,x.mode,E),S.return=x,x=S}return s(x);case Vs:return N=O._init,P(x,S,N(O._payload),E)}if(hd(O))return y(x,S,O,E);if(Ju(O))return w(x,S,O,E);jp(x,O)}return typeof O=="string"&&O!==""||typeof O=="number"?(O=""+O,S!==null&&S.tag===6?(n(x,S.sibling),S=o(S,O),S.return=x,x=S):(n(x,S),S=C_(O,x.mode,E),S.return=x,x=S),s(x)):n(x,S)}return P}var tu=sD(!0),aD=sD(!1),zf={},Ii=Na(zf),lf=Na(zf),cf=Na(zf);function ul(e){if(e===zf)throw Error(ce(174));return e}function zS(e,t){switch(kt(cf,t),kt(lf,e),kt(Ii,zf),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:sb(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=sb(t,e)}Dt(Ii),kt(Ii,t)}function nu(){Dt(Ii),Dt(lf),Dt(cf)}function lD(e){ul(cf.current);var t=ul(Ii.current),n=sb(t,e.type);t!==n&&(kt(lf,e),kt(Ii,n))}function AS(e){lf.current===e&&(Dt(Ii),Dt(lf))}var Ht=Na(0);function jm(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var w_=[];function BS(){for(var e=0;en?n:4,e(!0);var r=b_.transition;b_.transition={};try{e(!1),t()}finally{yt=n,b_.transition=r}}function PD(){return Ao().memoizedState}function AK(e,t,n){var r=fa(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},OD(e))CD(t,n);else if(n=nD(e,t,n,r),n!==null){var o=vr();Xo(n,e,r,o),kD(n,t,r)}}function BK(e,t,n){var r=fa(e),o={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(OD(e))CD(t,o);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var s=t.lastRenderedState,a=i(s,n);if(o.hasEagerState=!0,o.eagerState=a,ei(a,s)){var c=t.interleaved;c===null?(o.next=o,DS(t)):(o.next=c.next,c.next=o),t.interleaved=o;return}}catch{}finally{}n=nD(e,t,o,r),n!==null&&(o=vr(),Xo(n,e,r,o),kD(n,t,r))}}function OD(e){var t=e.alternate;return e===Wt||t!==null&&t===Wt}function CD(e,t){Nd=Lm=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function kD(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,xS(e,n)}}var Dm={readContext:zo,useCallback:Kn,useContext:Kn,useEffect:Kn,useImperativeHandle:Kn,useInsertionEffect:Kn,useLayoutEffect:Kn,useMemo:Kn,useReducer:Kn,useRef:Kn,useState:Kn,useDebugValue:Kn,useDeferredValue:Kn,useTransition:Kn,useMutableSource:Kn,useSyncExternalStore:Kn,useId:Kn,unstable_isNewReconciler:!1},FK={readContext:zo,useCallback:function(e,t){return gi().memoizedState=[e,t===void 0?null:t],e},useContext:zo,useEffect:h2,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Rh(4194308,4,_D.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Rh(4194308,4,e,t)},useInsertionEffect:function(e,t){return Rh(4,2,e,t)},useMemo:function(e,t){var n=gi();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=gi();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=AK.bind(null,Wt,e),[r.memoizedState,e]},useRef:function(e){var t=gi();return e={current:e},t.memoizedState=e},useState:p2,useDebugValue:US,useDeferredValue:function(e){return gi().memoizedState=e},useTransition:function(){var e=p2(!1),t=e[0];return e=zK.bind(null,e[1]),gi().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=Wt,o=gi();if(zt){if(n===void 0)throw Error(ce(407));n=n()}else{if(n=t(),Cn===null)throw Error(ce(349));kl&30||dD(r,t,n)}o.memoizedState=n;var i={value:n,getSnapshot:t};return o.queue=i,h2(pD.bind(null,r,i,e),[e]),r.flags|=2048,ff(9,fD.bind(null,r,i,n,t),void 0,null),n},useId:function(){var e=gi(),t=Cn.identifierPrefix;if(zt){var n=as,r=ss;n=(r&~(1<<32-Jo(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=uf++,0<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=s.createElement(n,{is:r.is}):(e=s.createElement(n),n==="select"&&(s=e,r.multiple?s.multiple=!0:r.size&&(s.size=r.size))):e=s.createElementNS(e,n),e[Oi]=t,e[af]=r,DD(e,t,!1,!1),t.stateNode=e;e:{switch(s=lb(n,r),n){case"dialog":Tt("cancel",e),Tt("close",e),o=r;break;case"iframe":case"object":case"embed":Tt("load",e),o=r;break;case"video":case"audio":for(o=0;oou&&(t.flags|=128,r=!0,rd(i,!1),t.lanes=4194304)}else{if(!r)if(e=jm(s),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),rd(i,!0),i.tail===null&&i.tailMode==="hidden"&&!s.alternate&&!zt)return qn(t),null}else 2*Qt()-i.renderingStartTime>ou&&n!==1073741824&&(t.flags|=128,r=!0,rd(i,!1),t.lanes=4194304);i.isBackwards?(s.sibling=t.child,t.child=s):(n=i.last,n!==null?n.sibling=s:t.child=s,i.last=s)}return i.tail!==null?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=Qt(),t.sibling=null,n=Ht.current,kt(Ht,r?n&1|2:n&1),t):(qn(t),null);case 22:case 23:return JS(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?oo&1073741824&&(qn(t),t.subtreeFlags&6&&(t.flags|=8192)):qn(t),null;case 24:return null;case 25:return null}throw Error(ce(156,t.tag))}function KK(e,t){switch(NS(t),t.tag){case 1:return Fr(t.type)&&km(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return nu(),Dt(Br),Dt(rr),BS(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return AS(t),null;case 13:if(Dt(Ht),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(ce(340));eu()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Dt(Ht),null;case 4:return nu(),null;case 10:return LS(t.type._context),null;case 22:case 23:return JS(),null;case 24:return null;default:return null}}var Dp=!1,er=!1,qK=typeof WeakSet=="function"?WeakSet:Set,xe=null;function Ec(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){Yt(e,t,r)}else n.current=null}function Lb(e,t,n){try{n()}catch(r){Yt(e,t,r)}}var S2=!1;function JK(e,t){if(yb=Sm,e=VL(),$S(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var o=r.anchorOffset,i=r.focusNode;r=r.focusOffset;try{n.nodeType,i.nodeType}catch{n=null;break e}var s=0,a=-1,c=-1,u=0,f=0,p=e,g=null;t:for(;;){for(var v;p!==n||o!==0&&p.nodeType!==3||(a=s+o),p!==i||r!==0&&p.nodeType!==3||(c=s+r),p.nodeType===3&&(s+=p.nodeValue.length),(v=p.firstChild)!==null;)g=p,p=v;for(;;){if(p===e)break t;if(g===n&&++u===o&&(a=s),g===i&&++f===r&&(c=s),(v=p.nextSibling)!==null)break;p=g,g=p.parentNode}p=v}n=a===-1||c===-1?null:{start:a,end:c}}else n=null}n=n||{start:0,end:0}}else n=null;for(_b={focusedElem:e,selectionRange:n},Sm=!1,xe=t;xe!==null;)if(t=xe,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,xe=e;else for(;xe!==null;){t=xe;try{var y=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(y!==null){var w=y.memoizedProps,P=y.memoizedState,x=t.stateNode,S=x.getSnapshotBeforeUpdate(t.elementType===t.type?w:Zo(t.type,w),P);x.__reactInternalSnapshotBeforeUpdate=S}break;case 3:var O=t.stateNode.containerInfo;O.nodeType===1?O.textContent="":O.nodeType===9&&O.documentElement&&O.removeChild(O.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(ce(163))}}catch(E){Yt(t,t.return,E)}if(e=t.sibling,e!==null){e.return=t.return,xe=e;break}xe=t.return}return y=S2,S2=!1,y}function Td(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var o=r=r.next;do{if((o.tag&e)===e){var i=o.destroy;o.destroy=void 0,i!==void 0&&Lb(t,n,i)}o=o.next}while(o!==r)}}function y0(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function Db(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function AD(e){var t=e.alternate;t!==null&&(e.alternate=null,AD(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Oi],delete t[af],delete t[xb],delete t[IK],delete t[jK])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function BD(e){return e.tag===5||e.tag===3||e.tag===4}function P2(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||BD(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Rb(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Cm));else if(r!==4&&(e=e.child,e!==null))for(Rb(e,t,n),e=e.sibling;e!==null;)Rb(e,t,n),e=e.sibling}function zb(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(zb(e,t,n),e=e.sibling;e!==null;)zb(e,t,n),e=e.sibling}var jn=null,Go=!1;function Ns(e,t,n){for(n=n.child;n!==null;)FD(e,t,n),n=n.sibling}function FD(e,t,n){if(Ti&&typeof Ti.onCommitFiberUnmount=="function")try{Ti.onCommitFiberUnmount(u0,n)}catch{}switch(n.tag){case 5:er||Ec(n,t);case 6:var r=jn,o=Go;jn=null,Ns(e,t,n),jn=r,Go=o,jn!==null&&(Go?(e=jn,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):jn.removeChild(n.stateNode));break;case 18:jn!==null&&(Go?(e=jn,n=n.stateNode,e.nodeType===8?y_(e.parentNode,n):e.nodeType===1&&y_(e,n),tf(e)):y_(jn,n.stateNode));break;case 4:r=jn,o=Go,jn=n.stateNode.containerInfo,Go=!0,Ns(e,t,n),jn=r,Go=o;break;case 0:case 11:case 14:case 15:if(!er&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){o=r=r.next;do{var i=o,s=i.destroy;i=i.tag,s!==void 0&&(i&2||i&4)&&Lb(n,t,s),o=o.next}while(o!==r)}Ns(e,t,n);break;case 1:if(!er&&(Ec(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){Yt(n,t,a)}Ns(e,t,n);break;case 21:Ns(e,t,n);break;case 22:n.mode&1?(er=(r=er)||n.memoizedState!==null,Ns(e,t,n),er=r):Ns(e,t,n);break;default:Ns(e,t,n)}}function O2(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new qK),t.forEach(function(r){var o=sq.bind(null,e,r);n.has(r)||(n.add(r),r.then(o,o))})}}function Wo(e,t){var n=t.deletions;if(n!==null)for(var r=0;ro&&(o=s),r&=~i}if(r=o,r=Qt()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*QK(r/1960))-r,10e?16:e,Js===null)var r=!1;else{if(e=Js,Js=null,Am=0,ot&6)throw Error(ce(331));var o=ot;for(ot|=4,xe=e.current;xe!==null;){var i=xe,s=i.child;if(xe.flags&16){var a=i.deletions;if(a!==null){for(var c=0;cQt()-KS?vl(e,0):YS|=n),Vr(e,t)}function KD(e,t){t===0&&(e.mode&1?(t=kp,kp<<=1,!(kp&130023424)&&(kp=4194304)):t=1);var n=vr();e=hs(e,t),e!==null&&(Lf(e,t,n),Vr(e,n))}function iq(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),KD(e,n)}function sq(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,o=e.memoizedState;o!==null&&(n=o.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(ce(314))}r!==null&&r.delete(t),KD(e,n)}var qD;qD=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Br.current)zr=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return zr=!1,GK(e,t,n);zr=!!(e.flags&131072)}else zr=!1,zt&&t.flags&1048576&&QL(t,Mm,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;zh(e,t),e=t.pendingProps;var o=Qc(t,rr.current);Hc(t,n),o=VS(null,t,r,e,o,n);var i=HS();return t.flags|=1,typeof o=="object"&&o!==null&&typeof o.render=="function"&&o.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Fr(r)?(i=!0,Em(t)):i=!1,t.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,RS(t),o.updater=g0,t.stateNode=o,o._reactInternals=t,Eb(t,r,e,n),t=Nb(null,t,r,!0,i,n)):(t.tag=0,zt&&i&&MS(t),pr(null,t,o,n),t=t.child),t;case 16:r=t.elementType;e:{switch(zh(e,t),e=t.pendingProps,o=r._init,r=o(r._payload),t.type=r,o=t.tag=lq(r),e=Zo(r,e),o){case 0:t=Mb(null,t,r,e,n);break e;case 1:t=w2(null,t,r,e,n);break e;case 11:t=y2(null,t,r,e,n);break e;case 14:t=_2(null,t,r,Zo(r.type,e),n);break e}throw Error(ce(306,r,""))}return t;case 0:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Zo(r,o),Mb(e,t,r,o,n);case 1:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Zo(r,o),w2(e,t,r,o,n);case 3:e:{if(ID(t),e===null)throw Error(ce(387));r=t.pendingProps,i=t.memoizedState,o=i.element,rD(e,t),Im(t,r,null,n);var s=t.memoizedState;if(r=s.element,i.isDehydrated)if(i={element:r,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){o=ru(Error(ce(423)),t),t=b2(e,t,r,n,o);break e}else if(r!==o){o=ru(Error(ce(424)),t),t=b2(e,t,r,n,o);break e}else for(uo=ca(t.stateNode.containerInfo.firstChild),po=t,zt=!0,Yo=null,n=aD(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(eu(),r===o){t=ms(e,t,n);break e}pr(e,t,r,n)}t=t.child}return t;case 5:return lD(t),e===null&&Ob(t),r=t.type,o=t.pendingProps,i=e!==null?e.memoizedProps:null,s=o.children,wb(r,o)?s=null:i!==null&&wb(r,i)&&(t.flags|=32),TD(e,t),pr(e,t,s,n),t.child;case 6:return e===null&&Ob(t),null;case 13:return jD(e,t,n);case 4:return zS(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=tu(t,null,r,n):pr(e,t,r,n),t.child;case 11:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Zo(r,o),y2(e,t,r,o,n);case 7:return pr(e,t,t.pendingProps,n),t.child;case 8:return pr(e,t,t.pendingProps.children,n),t.child;case 12:return pr(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,o=t.pendingProps,i=t.memoizedProps,s=o.value,kt(Nm,r._currentValue),r._currentValue=s,i!==null)if(ei(i.value,s)){if(i.children===o.children&&!Br.current){t=ms(e,t,n);break e}}else for(i=t.child,i!==null&&(i.return=t);i!==null;){var a=i.dependencies;if(a!==null){s=i.child;for(var c=a.firstContext;c!==null;){if(c.context===r){if(i.tag===1){c=cs(-1,n&-n),c.tag=2;var u=i.updateQueue;if(u!==null){u=u.shared;var f=u.pending;f===null?c.next=c:(c.next=f.next,f.next=c),u.pending=c}}i.lanes|=n,c=i.alternate,c!==null&&(c.lanes|=n),Cb(i.return,n,t),a.lanes|=n;break}c=c.next}}else if(i.tag===10)s=i.type===t.type?null:i.child;else if(i.tag===18){if(s=i.return,s===null)throw Error(ce(341));s.lanes|=n,a=s.alternate,a!==null&&(a.lanes|=n),Cb(s,n,t),s=i.sibling}else s=i.child;if(s!==null)s.return=i;else for(s=i;s!==null;){if(s===t){s=null;break}if(i=s.sibling,i!==null){i.return=s.return,s=i;break}s=s.return}i=s}pr(e,t,o.children,n),t=t.child}return t;case 9:return o=t.type,r=t.pendingProps.children,Hc(t,n),o=zo(o),r=r(o),t.flags|=1,pr(e,t,r,n),t.child;case 14:return r=t.type,o=Zo(r,t.pendingProps),o=Zo(r.type,o),_2(e,t,r,o,n);case 15:return MD(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Zo(r,o),zh(e,t),t.tag=1,Fr(r)?(e=!0,Em(t)):e=!1,Hc(t,n),iD(t,r,o),Eb(t,r,o,n),Nb(null,t,r,!0,e,n);case 19:return LD(e,t,n);case 22:return ND(e,t,n)}throw Error(ce(156,t.tag))};function JD(e,t){return SL(e,t)}function aq(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function To(e,t,n,r){return new aq(e,t,n,r)}function QS(e){return e=e.prototype,!(!e||!e.isReactComponent)}function lq(e){if(typeof e=="function")return QS(e)?1:0;if(e!=null){if(e=e.$$typeof,e===yS)return 11;if(e===_S)return 14}return 2}function pa(e,t){var n=e.alternate;return n===null?(n=To(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Fh(e,t,n,r,o,i){var s=2;if(r=e,typeof e=="function")QS(e)&&(s=1);else if(typeof e=="string")s=5;else e:switch(e){case _c:return yl(n.children,o,i,t);case vS:s=8,o|=8;break;case Xw:return e=To(12,n,t,o|2),e.elementType=Xw,e.lanes=i,e;case Qw:return e=To(13,n,t,o),e.elementType=Qw,e.lanes=i,e;case eb:return e=To(19,n,t,o),e.elementType=eb,e.lanes=i,e;case sL:return w0(n,o,i,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case oL:s=10;break e;case iL:s=9;break e;case yS:s=11;break e;case _S:s=14;break e;case Vs:s=16,r=null;break e}throw Error(ce(130,e==null?e:typeof e,""))}return t=To(s,n,t,o),t.elementType=e,t.type=r,t.lanes=i,t}function yl(e,t,n,r){return e=To(7,e,r,t),e.lanes=n,e}function w0(e,t,n,r){return e=To(22,e,r,t),e.elementType=sL,e.lanes=n,e.stateNode={isHidden:!1},e}function C_(e,t,n){return e=To(6,e,null,t),e.lanes=n,e}function k_(e,t,n){return t=To(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function cq(e,t,n,r,o){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=a_(0),this.expirationTimes=a_(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=a_(0),this.identifierPrefix=r,this.onRecoverableError=o,this.mutableSourceEagerHydrationData=null}function eP(e,t,n,r,o,i,s,a,c){return e=new cq(e,t,n,a,c),t===1?(t=1,i===!0&&(t|=8)):t=0,i=To(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},RS(i),e}function uq(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(tR)}catch(e){console.error(e)}}tR(),Q3.exports=_o;var xs=Q3.exports;const mq=Ea(xs);var gq=Object.defineProperty,Vm=Object.getOwnPropertySymbols,nR=Object.prototype.hasOwnProperty,rR=Object.prototype.propertyIsEnumerable,I2=(e,t,n)=>t in e?gq(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,j2=(e,t)=>{for(var n in t||(t={}))nR.call(t,n)&&I2(e,n,t[n]);if(Vm)for(var n of Vm(t))rR.call(t,n)&&I2(e,n,t[n]);return e},vq=(e,t)=>{var n={};for(var r in e)nR.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Vm)for(var r of Vm(e))t.indexOf(r)<0&&rR.call(e,r)&&(n[r]=e[r]);return n};function yq(e){const t=e,{style:n}=t,r=vq(t,["style"]);return k.createElement("svg",j2({viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:j2({width:M(16),height:M(16)},n)},r),k.createElement("path",{d:"M3.13523 6.15803C3.3241 5.95657 3.64052 5.94637 3.84197 6.13523L7.5 9.56464L11.158 6.13523C11.3595 5.94637 11.6759 5.95657 11.8648 6.15803C12.0536 6.35949 12.0434 6.67591 11.842 6.86477L7.84197 10.6148C7.64964 10.7951 7.35036 10.7951 7.15803 10.6148L3.15803 6.86477C2.95657 6.67591 2.94637 6.35949 3.13523 6.15803Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"}))}var _q=Object.defineProperty,wq=Object.defineProperties,bq=Object.getOwnPropertyDescriptors,L2=Object.getOwnPropertySymbols,xq=Object.prototype.hasOwnProperty,Sq=Object.prototype.propertyIsEnumerable,D2=(e,t,n)=>t in e?_q(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Hb=(e,t)=>{for(var n in t||(t={}))xq.call(t,n)&&D2(e,n,t[n]);if(L2)for(var n of L2(t))Sq.call(t,n)&&D2(e,n,t[n]);return e},R2=(e,t)=>wq(e,bq(t));const Pq=["subtle","filled","outline","light","default","transparent","gradient"],Ap={xs:M(18),sm:M(22),md:M(28),lg:M(34),xl:M(44)};function Oq({variant:e,theme:t,color:n,gradient:r}){const o=t.fn.variant({color:n,variant:e,gradient:r});return e==="gradient"?{border:0,backgroundImage:o.background,color:o.color,"&:hover":t.fn.hover({backgroundSize:"200%"})}:Pq.includes(e)?Hb({border:`${M(1)} solid ${o.border}`,backgroundColor:o.background,color:o.color},t.fn.hover({backgroundColor:o.hover})):null}var Cq=ue((e,{radius:t,color:n,gradient:r},{variant:o,size:i})=>({root:R2(Hb({position:"relative",borderRadius:e.fn.radius(t),padding:0,lineHeight:1,display:"flex",alignItems:"center",justifyContent:"center",height:re({size:i,sizes:Ap}),minHeight:re({size:i,sizes:Ap}),width:re({size:i,sizes:Ap}),minWidth:re({size:i,sizes:Ap})},Oq({variant:o,theme:e,color:n,gradient:r})),{"&:active":e.activeStyles,"& [data-action-icon-loader]":{maxWidth:"70%"},"&:disabled, &[data-disabled]":{color:e.colors.gray[e.colorScheme==="dark"?6:4],cursor:"not-allowed",backgroundColor:o==="transparent"?void 0:e.fn.themeColor("gray",e.colorScheme==="dark"?8:1),borderColor:o==="transparent"?void 0:e.fn.themeColor("gray",e.colorScheme==="dark"?8:1),backgroundImage:"none",pointerEvents:"none","&:active":{transform:"none"}},"&[data-loading]":{pointerEvents:"none","&::before":R2(Hb({content:'""'},e.fn.cover(M(-1))),{backgroundColor:e.colorScheme==="dark"?e.fn.rgba(e.colors.dark[7],.5):"rgba(255, 255, 255, .5)",borderRadius:e.fn.radius(t),cursor:"not-allowed"})}})}));const kq=Cq;var Eq=Object.defineProperty,Hm=Object.getOwnPropertySymbols,oR=Object.prototype.hasOwnProperty,iR=Object.prototype.propertyIsEnumerable,z2=(e,t,n)=>t in e?Eq(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,A2=(e,t)=>{for(var n in t||(t={}))oR.call(t,n)&&z2(e,n,t[n]);if(Hm)for(var n of Hm(t))iR.call(t,n)&&z2(e,n,t[n]);return e},B2=(e,t)=>{var n={};for(var r in e)oR.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Hm)for(var r of Hm(e))t.indexOf(r)<0&&iR.call(e,r)&&(n[r]=e[r]);return n};function $q(e){var t=e,{size:n,color:r}=t,o=B2(t,["size","color"]);const i=o,{style:s}=i,a=B2(i,["style"]);return k.createElement("svg",A2({viewBox:"0 0 135 140",xmlns:"http://www.w3.org/2000/svg",fill:r,style:A2({width:n},s)},a),k.createElement("rect",{y:"10",width:"15",height:"120",rx:"6"},k.createElement("animate",{attributeName:"height",begin:"0.5s",dur:"1s",values:"120;110;100;90;80;70;60;50;40;140;120",calcMode:"linear",repeatCount:"indefinite"}),k.createElement("animate",{attributeName:"y",begin:"0.5s",dur:"1s",values:"10;15;20;25;30;35;40;45;50;0;10",calcMode:"linear",repeatCount:"indefinite"})),k.createElement("rect",{x:"30",y:"10",width:"15",height:"120",rx:"6"},k.createElement("animate",{attributeName:"height",begin:"0.25s",dur:"1s",values:"120;110;100;90;80;70;60;50;40;140;120",calcMode:"linear",repeatCount:"indefinite"}),k.createElement("animate",{attributeName:"y",begin:"0.25s",dur:"1s",values:"10;15;20;25;30;35;40;45;50;0;10",calcMode:"linear",repeatCount:"indefinite"})),k.createElement("rect",{x:"60",width:"15",height:"140",rx:"6"},k.createElement("animate",{attributeName:"height",begin:"0s",dur:"1s",values:"120;110;100;90;80;70;60;50;40;140;120",calcMode:"linear",repeatCount:"indefinite"}),k.createElement("animate",{attributeName:"y",begin:"0s",dur:"1s",values:"10;15;20;25;30;35;40;45;50;0;10",calcMode:"linear",repeatCount:"indefinite"})),k.createElement("rect",{x:"90",y:"10",width:"15",height:"120",rx:"6"},k.createElement("animate",{attributeName:"height",begin:"0.25s",dur:"1s",values:"120;110;100;90;80;70;60;50;40;140;120",calcMode:"linear",repeatCount:"indefinite"}),k.createElement("animate",{attributeName:"y",begin:"0.25s",dur:"1s",values:"10;15;20;25;30;35;40;45;50;0;10",calcMode:"linear",repeatCount:"indefinite"})),k.createElement("rect",{x:"120",y:"10",width:"15",height:"120",rx:"6"},k.createElement("animate",{attributeName:"height",begin:"0.5s",dur:"1s",values:"120;110;100;90;80;70;60;50;40;140;120",calcMode:"linear",repeatCount:"indefinite"}),k.createElement("animate",{attributeName:"y",begin:"0.5s",dur:"1s",values:"10;15;20;25;30;35;40;45;50;0;10",calcMode:"linear",repeatCount:"indefinite"})))}var Mq=Object.defineProperty,Wm=Object.getOwnPropertySymbols,sR=Object.prototype.hasOwnProperty,aR=Object.prototype.propertyIsEnumerable,F2=(e,t,n)=>t in e?Mq(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,V2=(e,t)=>{for(var n in t||(t={}))sR.call(t,n)&&F2(e,n,t[n]);if(Wm)for(var n of Wm(t))aR.call(t,n)&&F2(e,n,t[n]);return e},H2=(e,t)=>{var n={};for(var r in e)sR.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Wm)for(var r of Wm(e))t.indexOf(r)<0&&aR.call(e,r)&&(n[r]=e[r]);return n};function Nq(e){var t=e,{size:n,color:r}=t,o=H2(t,["size","color"]);const i=o,{style:s}=i,a=H2(i,["style"]);return k.createElement("svg",V2({viewBox:"0 0 38 38",xmlns:"http://www.w3.org/2000/svg",stroke:r,style:V2({width:n,height:n},s)},a),k.createElement("g",{fill:"none",fillRule:"evenodd"},k.createElement("g",{transform:"translate(2.5 2.5)",strokeWidth:"5"},k.createElement("circle",{strokeOpacity:".5",cx:"16",cy:"16",r:"16"}),k.createElement("path",{d:"M32 16c0-9.94-8.06-16-16-16"},k.createElement("animateTransform",{attributeName:"transform",type:"rotate",from:"0 16 16",to:"360 16 16",dur:"1s",repeatCount:"indefinite"})))))}var Tq=Object.defineProperty,Um=Object.getOwnPropertySymbols,lR=Object.prototype.hasOwnProperty,cR=Object.prototype.propertyIsEnumerable,W2=(e,t,n)=>t in e?Tq(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,U2=(e,t)=>{for(var n in t||(t={}))lR.call(t,n)&&W2(e,n,t[n]);if(Um)for(var n of Um(t))cR.call(t,n)&&W2(e,n,t[n]);return e},Z2=(e,t)=>{var n={};for(var r in e)lR.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Um)for(var r of Um(e))t.indexOf(r)<0&&cR.call(e,r)&&(n[r]=e[r]);return n};function Iq(e){var t=e,{size:n,color:r}=t,o=Z2(t,["size","color"]);const i=o,{style:s}=i,a=Z2(i,["style"]);return k.createElement("svg",U2({viewBox:"0 0 120 30",xmlns:"http://www.w3.org/2000/svg",fill:r,style:U2({width:n},s)},a),k.createElement("circle",{cx:"15",cy:"15",r:"15"},k.createElement("animate",{attributeName:"r",from:"15",to:"15",begin:"0s",dur:"0.8s",values:"15;9;15",calcMode:"linear",repeatCount:"indefinite"}),k.createElement("animate",{attributeName:"fill-opacity",from:"1",to:"1",begin:"0s",dur:"0.8s",values:"1;.5;1",calcMode:"linear",repeatCount:"indefinite"})),k.createElement("circle",{cx:"60",cy:"15",r:"9",fillOpacity:"0.3"},k.createElement("animate",{attributeName:"r",from:"9",to:"9",begin:"0s",dur:"0.8s",values:"9;15;9",calcMode:"linear",repeatCount:"indefinite"}),k.createElement("animate",{attributeName:"fill-opacity",from:"0.5",to:"0.5",begin:"0s",dur:"0.8s",values:".5;1;.5",calcMode:"linear",repeatCount:"indefinite"})),k.createElement("circle",{cx:"105",cy:"15",r:"15"},k.createElement("animate",{attributeName:"r",from:"15",to:"15",begin:"0s",dur:"0.8s",values:"15;9;15",calcMode:"linear",repeatCount:"indefinite"}),k.createElement("animate",{attributeName:"fill-opacity",from:"1",to:"1",begin:"0s",dur:"0.8s",values:"1;.5;1",calcMode:"linear",repeatCount:"indefinite"})))}var jq=Object.defineProperty,Zm=Object.getOwnPropertySymbols,uR=Object.prototype.hasOwnProperty,dR=Object.prototype.propertyIsEnumerable,G2=(e,t,n)=>t in e?jq(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Lq=(e,t)=>{for(var n in t||(t={}))uR.call(t,n)&&G2(e,n,t[n]);if(Zm)for(var n of Zm(t))dR.call(t,n)&&G2(e,n,t[n]);return e},Dq=(e,t)=>{var n={};for(var r in e)uR.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Zm)for(var r of Zm(e))t.indexOf(r)<0&&dR.call(e,r)&&(n[r]=e[r]);return n};const E_={bars:$q,oval:Nq,dots:Iq},Rq={xs:M(18),sm:M(22),md:M(36),lg:M(44),xl:M(58)},zq={size:"md"};function en(e){const t=ae("Loader",zq,e),{size:n,color:r,variant:o}=t,i=Dq(t,["size","color","variant"]),s=ir(),a=o in E_?o:s.loader;return k.createElement(Pe,Lq({role:"presentation",component:E_[a]||E_.bars,size:re({size:n,sizes:Rq}),color:s.fn.variant({variant:"filled",primaryFallback:!1,color:r||s.primaryColor}).background},i))}en.displayName="@mantine/core/Loader";var Aq=Object.defineProperty,Gm=Object.getOwnPropertySymbols,fR=Object.prototype.hasOwnProperty,pR=Object.prototype.propertyIsEnumerable,Y2=(e,t,n)=>t in e?Aq(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,K2=(e,t)=>{for(var n in t||(t={}))fR.call(t,n)&&Y2(e,n,t[n]);if(Gm)for(var n of Gm(t))pR.call(t,n)&&Y2(e,n,t[n]);return e},Bq=(e,t)=>{var n={};for(var r in e)fR.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Gm)for(var r of Gm(e))t.indexOf(r)<0&&pR.call(e,r)&&(n[r]=e[r]);return n};const Fq={color:"gray",size:"md",variant:"subtle"},hR=_.forwardRef((e,t)=>{const n=ae("ActionIcon",Fq,e),{className:r,color:o,children:i,radius:s,size:a,variant:c,gradient:u,disabled:f,loaderProps:p,loading:g,unstyled:v,__staticSelector:y}=n,w=Bq(n,["className","color","children","radius","size","variant","gradient","disabled","loaderProps","loading","unstyled","__staticSelector"]),{classes:P,cx:x,theme:S}=kq({radius:s,color:o,gradient:u},{name:["ActionIcon",y],unstyled:v,size:a,variant:c}),O=k.createElement(en,K2({color:S.fn.variant({color:o,variant:c}).color,size:"100%","data-action-icon-loader":!0},p));return k.createElement(ls,K2({className:x(P.root,r),ref:t,disabled:f,"data-disabled":f||void 0,"data-loading":g||void 0,unstyled:v},w),g?O:i)});hR.displayName="@mantine/core/ActionIcon";const Qe=hR;var Vq=Object.defineProperty,Hq=Object.defineProperties,Wq=Object.getOwnPropertyDescriptors,Ym=Object.getOwnPropertySymbols,mR=Object.prototype.hasOwnProperty,gR=Object.prototype.propertyIsEnumerable,q2=(e,t,n)=>t in e?Vq(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Uq=(e,t)=>{for(var n in t||(t={}))mR.call(t,n)&&q2(e,n,t[n]);if(Ym)for(var n of Ym(t))gR.call(t,n)&&q2(e,n,t[n]);return e},Zq=(e,t)=>Hq(e,Wq(t)),Gq=(e,t)=>{var n={};for(var r in e)mR.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Ym)for(var r of Ym(e))t.indexOf(r)<0&&gR.call(e,r)&&(n[r]=e[r]);return n};function vR(e){const t=ae("Portal",{},e),{children:n,target:r,className:o,innerRef:i}=t,s=Gq(t,["children","target","className","innerRef"]),a=ir(),[c,u]=_.useState(!1),f=_.useRef();return dS(()=>(u(!0),f.current=r?typeof r=="string"?document.querySelector(r):r:document.createElement("div"),r||document.body.appendChild(f.current),()=>{!r&&document.body.removeChild(f.current)}),[r]),c?xs.createPortal(k.createElement("div",Zq(Uq({className:o,dir:a.dir},s),{ref:i}),n),f.current):null}vR.displayName="@mantine/core/Portal";var Yq=Object.defineProperty,Km=Object.getOwnPropertySymbols,yR=Object.prototype.hasOwnProperty,_R=Object.prototype.propertyIsEnumerable,J2=(e,t,n)=>t in e?Yq(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Kq=(e,t)=>{for(var n in t||(t={}))yR.call(t,n)&&J2(e,n,t[n]);if(Km)for(var n of Km(t))_R.call(t,n)&&J2(e,n,t[n]);return e},qq=(e,t)=>{var n={};for(var r in e)yR.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Km)for(var r of Km(e))t.indexOf(r)<0&&_R.call(e,r)&&(n[r]=e[r]);return n};function Af(e){var t=e,{withinPortal:n=!0,children:r}=t,o=qq(t,["withinPortal","children"]);return n?k.createElement(vR,Kq({},o),r):k.createElement(k.Fragment,null,r)}Af.displayName="@mantine/core/OptionalPortal";var Jq=Object.defineProperty,qm=Object.getOwnPropertySymbols,wR=Object.prototype.hasOwnProperty,bR=Object.prototype.propertyIsEnumerable,X2=(e,t,n)=>t in e?Jq(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Q2=(e,t)=>{for(var n in t||(t={}))wR.call(t,n)&&X2(e,n,t[n]);if(qm)for(var n of qm(t))bR.call(t,n)&&X2(e,n,t[n]);return e},Xq=(e,t)=>{var n={};for(var r in e)wR.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&qm)for(var r of qm(e))t.indexOf(r)<0&&bR.call(e,r)&&(n[r]=e[r]);return n};function xR(e){const t=e,{width:n,height:r,style:o}=t,i=Xq(t,["width","height","style"]);return k.createElement("svg",Q2({viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:Q2({width:n,height:r},o)},i),k.createElement("path",{d:"M11.7816 4.03157C12.0062 3.80702 12.0062 3.44295 11.7816 3.2184C11.5571 2.99385 11.193 2.99385 10.9685 3.2184L7.50005 6.68682L4.03164 3.2184C3.80708 2.99385 3.44301 2.99385 3.21846 3.2184C2.99391 3.44295 2.99391 3.80702 3.21846 4.03157L6.68688 7.49999L3.21846 10.9684C2.99391 11.193 2.99391 11.557 3.21846 11.7816C3.44301 12.0061 3.80708 12.0061 4.03164 11.7816L7.50005 8.31316L10.9685 11.7816C11.193 12.0061 11.5571 12.0061 11.7816 11.7816C12.0062 11.557 12.0062 11.193 11.7816 10.9684L8.31322 7.49999L11.7816 4.03157Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"}))}xR.displayName="@mantine/core/CloseIcon";var Qq=Object.defineProperty,Jm=Object.getOwnPropertySymbols,SR=Object.prototype.hasOwnProperty,PR=Object.prototype.propertyIsEnumerable,eE=(e,t,n)=>t in e?Qq(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,eJ=(e,t)=>{for(var n in t||(t={}))SR.call(t,n)&&eE(e,n,t[n]);if(Jm)for(var n of Jm(t))PR.call(t,n)&&eE(e,n,t[n]);return e},tJ=(e,t)=>{var n={};for(var r in e)SR.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Jm)for(var r of Jm(e))t.indexOf(r)<0&&PR.call(e,r)&&(n[r]=e[r]);return n};const nJ={xs:M(12),sm:M(16),md:M(20),lg:M(28),xl:M(34)},rJ={size:"sm"},OR=_.forwardRef((e,t)=>{const n=ae("CloseButton",rJ,e),{iconSize:r,size:o,children:i}=n,s=tJ(n,["iconSize","size","children"]),a=M(r||nJ[o]);return k.createElement(Qe,eJ({ref:t,__staticSelector:"CloseButton",size:o},s),i||k.createElement(xR,{width:a,height:a}))});OR.displayName="@mantine/core/CloseButton";const O0=OR;var oJ=Object.defineProperty,iJ=Object.defineProperties,sJ=Object.getOwnPropertyDescriptors,tE=Object.getOwnPropertySymbols,aJ=Object.prototype.hasOwnProperty,lJ=Object.prototype.propertyIsEnumerable,nE=(e,t,n)=>t in e?oJ(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Bp=(e,t)=>{for(var n in t||(t={}))aJ.call(t,n)&&nE(e,n,t[n]);if(tE)for(var n of tE(t))lJ.call(t,n)&&nE(e,n,t[n]);return e},cJ=(e,t)=>iJ(e,sJ(t));function uJ({underline:e,strikethrough:t}){const n=[];return e&&n.push("underline"),t&&n.push("line-through"),n.length>0?n.join(" "):"none"}function dJ({theme:e,color:t}){return t==="dimmed"?e.fn.dimmed():typeof t=="string"&&(t in e.colors||t.split(".")[0]in e.colors)?e.fn.variant({variant:"filled",color:t}).background:t||"inherit"}function fJ(e){return typeof e=="number"?{overflow:"hidden",textOverflow:"ellipsis",display:"-webkit-box",WebkitLineClamp:e,WebkitBoxOrient:"vertical"}:null}function pJ({theme:e,truncate:t}){return t==="start"?{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",direction:e.dir==="ltr"?"rtl":"ltr",textAlign:e.dir==="ltr"?"right":"left"}:t?{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}:null}var hJ=ue((e,{color:t,lineClamp:n,truncate:r,inline:o,inherit:i,underline:s,gradient:a,weight:c,transform:u,align:f,strikethrough:p,italic:g},{size:v})=>{const y=e.fn.variant({variant:"gradient",gradient:a});return{root:cJ(Bp(Bp(Bp(Bp({},e.fn.fontStyles()),e.fn.focusStyles()),fJ(n)),pJ({theme:e,truncate:r})),{color:dJ({color:t,theme:e}),fontFamily:i?"inherit":e.fontFamily,fontSize:i||v===void 0?"inherit":re({size:v,sizes:e.fontSizes}),lineHeight:i?"inherit":o?1:e.lineHeight,textDecoration:uJ({underline:s,strikethrough:p}),WebkitTapHighlightColor:"transparent",fontWeight:i?"inherit":c,textTransform:u,textAlign:f,fontStyle:g?"italic":void 0}),gradient:{backgroundImage:y.background,WebkitBackgroundClip:"text",WebkitTextFillColor:"transparent"}}});const mJ=hJ;var gJ=Object.defineProperty,Xm=Object.getOwnPropertySymbols,CR=Object.prototype.hasOwnProperty,kR=Object.prototype.propertyIsEnumerable,rE=(e,t,n)=>t in e?gJ(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,vJ=(e,t)=>{for(var n in t||(t={}))CR.call(t,n)&&rE(e,n,t[n]);if(Xm)for(var n of Xm(t))kR.call(t,n)&&rE(e,n,t[n]);return e},yJ=(e,t)=>{var n={};for(var r in e)CR.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Xm)for(var r of Xm(e))t.indexOf(r)<0&&kR.call(e,r)&&(n[r]=e[r]);return n};const _J={variant:"text"},ER=_.forwardRef((e,t)=>{const n=ae("Text",_J,e),{className:r,size:o,weight:i,transform:s,color:a,align:c,variant:u,lineClamp:f,truncate:p,gradient:g,inline:v,inherit:y,underline:w,strikethrough:P,italic:x,classNames:S,styles:O,unstyled:E,span:$,__staticSelector:N}=n,I=yJ(n,["className","size","weight","transform","color","align","variant","lineClamp","truncate","gradient","inline","inherit","underline","strikethrough","italic","classNames","styles","unstyled","span","__staticSelector"]),{classes:R,cx:B}=mJ({color:a,lineClamp:f,truncate:p,inline:v,inherit:y,underline:w,strikethrough:P,italic:x,weight:i,transform:s,align:c,gradient:g},{unstyled:E,name:N||"Text",variant:u,size:o});return k.createElement(Pe,vJ({ref:t,className:B(R.root,{[R.gradient]:u==="gradient"},r),component:$?"span":"div"},I))});ER.displayName="@mantine/core/Text";const W=ER,$R=_.createContext({zIndex:1e3,fixed:!1,layout:"default"});$R.Provider;function wJ(){return _.useContext($R)}function MR(e,t){if(!e)return[];const n=Object.keys(e).filter(r=>r!=="base").map(r=>[re({size:r,sizes:t.breakpoints,units:"em"}),e[r]]);return n.sort((r,o)=>Ro(r[0])-Ro(o[0])),n}var bJ=Object.defineProperty,xJ=Object.defineProperties,SJ=Object.getOwnPropertyDescriptors,oE=Object.getOwnPropertySymbols,PJ=Object.prototype.hasOwnProperty,OJ=Object.prototype.propertyIsEnumerable,iE=(e,t,n)=>t in e?bJ(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Fp=(e,t)=>{for(var n in t||(t={}))PJ.call(t,n)&&iE(e,n,t[n]);if(oE)for(var n of oE(t))OJ.call(t,n)&&iE(e,n,t[n]);return e},sE=(e,t)=>xJ(e,SJ(t)),CJ=ue((e,{height:t,width:n,fixed:r,position:o,hiddenBreakpoint:i,zIndex:s,section:a,withBorder:c,layout:u})=>{const f=typeof n=="object"&&n!==null?MR(n,e).reduce((g,[v,y])=>(g[`@media (min-width: ${ba(v)})`]={width:M(y),minWidth:M(y)},g),{}):null,p=c?{[a==="navbar"?"borderRight":"borderLeft"]:`${M(1)} solid ${e.colorScheme==="dark"?e.colors.dark[5]:e.colors.gray[2]}`}:{};return{root:sE(Fp(Fp(sE(Fp(Fp({},e.fn.fontStyles()),o),{top:u==="alt"?0:o?.top||"var(--mantine-header-height)",bottom:0,zIndex:s,height:t?M(t):u==="alt"?"auto":"calc(100vh - var(--mantine-header-height, 0rem) - var(--mantine-footer-height, 0rem))",width:n?.base?M(n?.base):"100%",position:r?"fixed":"static",boxSizing:"border-box",display:"flex",flexDirection:"column",backgroundColor:e.colorScheme==="dark"?e.colors.dark[7]:e.white}),p),f),{"&[data-hidden]":{[`@media (max-width: ${ba(Ro(re({size:i,sizes:e.breakpoints}))-1)})`]:{display:"none"}}})}});const kJ=CJ;var EJ=Object.defineProperty,Qm=Object.getOwnPropertySymbols,NR=Object.prototype.hasOwnProperty,TR=Object.prototype.propertyIsEnumerable,aE=(e,t,n)=>t in e?EJ(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,lE=(e,t)=>{for(var n in t||(t={}))NR.call(t,n)&&aE(e,n,t[n]);if(Qm)for(var n of Qm(t))TR.call(t,n)&&aE(e,n,t[n]);return e},$J=(e,t)=>{var n={};for(var r in e)NR.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Qm)for(var r of Qm(e))t.indexOf(r)<0&&TR.call(e,r)&&(n[r]=e[r]);return n};const IR=_.forwardRef((e,t)=>{var n=e,{width:r,height:o,fixed:i=!1,position:s,zIndex:a,hiddenBreakpoint:c="md",hidden:u=!1,withBorder:f=!0,className:p,classNames:g,styles:v,children:y,section:w,__staticSelector:P,unstyled:x,variant:S}=n,O=$J(n,["width","height","fixed","position","zIndex","hiddenBreakpoint","hidden","withBorder","className","classNames","styles","children","section","__staticSelector","unstyled","variant"]);const E=wJ(),{classes:$,cx:N,theme:I}=kJ({width:r,height:o,fixed:E.fixed||i,position:s,hiddenBreakpoint:c,zIndex:a||E.zIndex||ii("app"),section:w,withBorder:f,layout:E.layout},{classNames:g,styles:v,name:P,unstyled:x,variant:S}),R=MR(r,I).reduce((B,[z,G])=>(B[`@media (min-width: ${ba(z)})`]={[`--mantine-${w}-width`]:M(G)},B),{});return k.createElement(Pe,lE({component:w==="navbar"?"nav":"aside",ref:t,"data-hidden":u||void 0,className:N($.root,p)},O),y,k.createElement(aG,{styles:()=>({":root":lE({[`--mantine-${w}-width`]:r?.base?M(r.base):"0rem"},R)})}))});IR.displayName="@mantine/core/HorizontalSection";var MJ=Object.defineProperty,eg=Object.getOwnPropertySymbols,jR=Object.prototype.hasOwnProperty,LR=Object.prototype.propertyIsEnumerable,cE=(e,t,n)=>t in e?MJ(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,NJ=(e,t)=>{for(var n in t||(t={}))jR.call(t,n)&&cE(e,n,t[n]);if(eg)for(var n of eg(t))LR.call(t,n)&&cE(e,n,t[n]);return e},TJ=(e,t)=>{var n={};for(var r in e)jR.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&eg)for(var r of eg(e))t.indexOf(r)<0&&LR.call(e,r)&&(n[r]=e[r]);return n};const DR=_.forwardRef((e,t)=>{var n=e,{children:r,grow:o=!1,sx:i}=n,s=TJ(n,["children","grow","sx"]);return k.createElement(Pe,NJ({ref:t,sx:[{flex:o?1:0,boxSizing:"border-box"},...eS(i)]},s),r)});DR.displayName="@mantine/core/Section";const IJ=DR;var jJ=Object.defineProperty,uE=Object.getOwnPropertySymbols,LJ=Object.prototype.hasOwnProperty,DJ=Object.prototype.propertyIsEnumerable,dE=(e,t,n)=>t in e?jJ(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,RJ=(e,t)=>{for(var n in t||(t={}))LJ.call(t,n)&&dE(e,n,t[n]);if(uE)for(var n of uE(t))DJ.call(t,n)&&dE(e,n,t[n]);return e};const zJ={fixed:!1,position:{top:0,left:0},hiddenBreakpoint:"md",hidden:!1},tg=_.forwardRef((e,t)=>{const n=ae("Navbar",zJ,e);return k.createElement(IR,RJ({section:"navbar",__staticSelector:"Navbar",ref:t},n))});tg.Section=IJ;tg.displayName="@mantine/core/Navbar";const Vp={xs:M(1),sm:M(2),md:M(3),lg:M(4),xl:M(5)};function Hp(e,t){const n=e.fn.variant({variant:"outline",color:t}).border;return typeof t=="string"&&(t in e.colors||t.split(".")[0]in e.colors)?n:t===void 0?e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[4]:t}var AJ=ue((e,{color:t},{size:n,variant:r})=>({root:{},withLabel:{borderTop:"0 !important"},left:{"&::before":{display:"none"}},right:{"&::after":{display:"none"}},label:{display:"flex",alignItems:"center","&::before":{content:'""',flex:1,height:M(1),borderTop:`${re({size:n,sizes:Vp})} ${r} ${Hp(e,t)}`,marginRight:e.spacing.xs},"&::after":{content:'""',flex:1,borderTop:`${re({size:n,sizes:Vp})} ${r} ${Hp(e,t)}`,marginLeft:e.spacing.xs}},labelDefaultStyles:{color:t==="dark"?e.colors.dark[1]:e.fn.themeColor(t,e.colorScheme==="dark"?5:e.fn.primaryShade(),!1)},horizontal:{border:0,borderTopWidth:M(re({size:n,sizes:Vp})),borderTopColor:Hp(e,t),borderTopStyle:r,margin:0},vertical:{border:0,alignSelf:"stretch",height:"auto",borderLeftWidth:M(re({size:n,sizes:Vp})),borderLeftColor:Hp(e,t),borderLeftStyle:r}}));const BJ=AJ;var FJ=Object.defineProperty,VJ=Object.defineProperties,HJ=Object.getOwnPropertyDescriptors,ng=Object.getOwnPropertySymbols,RR=Object.prototype.hasOwnProperty,zR=Object.prototype.propertyIsEnumerable,fE=(e,t,n)=>t in e?FJ(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,pE=(e,t)=>{for(var n in t||(t={}))RR.call(t,n)&&fE(e,n,t[n]);if(ng)for(var n of ng(t))zR.call(t,n)&&fE(e,n,t[n]);return e},WJ=(e,t)=>VJ(e,HJ(t)),UJ=(e,t)=>{var n={};for(var r in e)RR.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&ng)for(var r of ng(e))t.indexOf(r)<0&&zR.call(e,r)&&(n[r]=e[r]);return n};const ZJ={orientation:"horizontal",size:"xs",labelPosition:"left",variant:"solid"},Ye=_.forwardRef((e,t)=>{const n=ae("Divider",ZJ,e),{className:r,color:o,orientation:i,size:s,label:a,labelPosition:c,labelProps:u,variant:f,styles:p,classNames:g,unstyled:v}=n,y=UJ(n,["className","color","orientation","size","label","labelPosition","labelProps","variant","styles","classNames","unstyled"]),{classes:w,cx:P}=BJ({color:o},{classNames:g,styles:p,unstyled:v,name:"Divider",variant:f,size:s}),x=i==="vertical",S=i==="horizontal",O=!!a&&S,E=!u?.color;return k.createElement(Pe,pE({ref:t,className:P(w.root,{[w.vertical]:x,[w.horizontal]:S,[w.withLabel]:O},r),role:"separator"},y),O&&k.createElement(W,WJ(pE({},u),{size:u?.size||"xs",mt:M(2),className:P(w.label,w[c],{[w.labelDefaultStyles]:E})}),a))});Ye.displayName="@mantine/core/Divider";var GJ=Object.defineProperty,YJ=Object.defineProperties,KJ=Object.getOwnPropertyDescriptors,hE=Object.getOwnPropertySymbols,qJ=Object.prototype.hasOwnProperty,JJ=Object.prototype.propertyIsEnumerable,mE=(e,t,n)=>t in e?GJ(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,gE=(e,t)=>{for(var n in t||(t={}))qJ.call(t,n)&&mE(e,n,t[n]);if(hE)for(var n of hE(t))JJ.call(t,n)&&mE(e,n,t[n]);return e},XJ=(e,t)=>YJ(e,KJ(t)),QJ=ue((e,t,{size:n})=>({item:XJ(gE({},e.fn.fontStyles()),{boxSizing:"border-box",wordBreak:"break-all",textAlign:"left",width:"100%",padding:`calc(${re({size:n,sizes:e.spacing})} / 1.5) ${re({size:n,sizes:e.spacing})}`,cursor:"pointer",fontSize:re({size:n,sizes:e.fontSizes}),color:e.colorScheme==="dark"?e.colors.dark[0]:e.black,borderRadius:e.fn.radius(),"&[data-hovered]":{backgroundColor:e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[1]},"&[data-selected]":gE({backgroundColor:e.fn.variant({variant:"filled"}).background,color:e.fn.variant({variant:"filled"}).color},e.fn.hover({backgroundColor:e.fn.variant({variant:"filled"}).hover})),"&[data-disabled]":{cursor:"default",color:e.colors.dark[2]}}),nothingFound:{boxSizing:"border-box",color:e.colors.gray[6],paddingTop:`calc(${re({size:n,sizes:e.spacing})} / 2)`,paddingBottom:`calc(${re({size:n,sizes:e.spacing})} / 2)`,textAlign:"center"},separator:{boxSizing:"border-box",textAlign:"left",width:"100%",padding:`calc(${re({size:n,sizes:e.spacing})} / 1.5) ${re({size:n,sizes:e.spacing})}`},separatorLabel:{color:e.colorScheme==="dark"?e.colors.dark[3]:e.colors.gray[5]}}));const eX=QJ;var tX=Object.defineProperty,vE=Object.getOwnPropertySymbols,nX=Object.prototype.hasOwnProperty,rX=Object.prototype.propertyIsEnumerable,yE=(e,t,n)=>t in e?tX(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,oX=(e,t)=>{for(var n in t||(t={}))nX.call(t,n)&&yE(e,n,t[n]);if(vE)for(var n of vE(t))rX.call(t,n)&&yE(e,n,t[n]);return e};function oP({data:e,hovered:t,classNames:n,styles:r,isItemSelected:o,uuid:i,__staticSelector:s,onItemHover:a,onItemSelect:c,itemsRefs:u,itemComponent:f,size:p,nothingFound:g,creatable:v,createLabel:y,unstyled:w,variant:P}){const{classes:x}=eX(null,{classNames:n,styles:r,unstyled:w,name:s,variant:P,size:p}),S=[],O=[];let E=null;const $=(I,R)=>{const B=typeof o=="function"?o(I.value):!1;return k.createElement(f,oX({key:I.value,className:x.item,"data-disabled":I.disabled||void 0,"data-hovered":!I.disabled&&t===R||void 0,"data-selected":!I.disabled&&B||void 0,selected:B,onMouseEnter:()=>a(R),id:`${i}-${R}`,role:"option",tabIndex:-1,"aria-selected":t===R,ref:z=>{u&&u.current&&(u.current[I.value]=z)},onMouseDown:I.disabled?null:z=>{z.preventDefault(),c(I)},disabled:I.disabled,variant:P},I))};let N=null;if(e.forEach((I,R)=>{I.creatable?E=R:I.group?(N!==I.group&&(N=I.group,O.push(k.createElement("div",{className:x.separator,key:`__mantine-divider-${R}`},k.createElement(Ye,{classNames:{label:x.separatorLabel},label:I.group})))),O.push($(I,R))):S.push($(I,R))}),v){const I=e[E];S.push(k.createElement("div",{key:zc(),className:x.item,"data-hovered":t===E||void 0,onMouseEnter:()=>a(E),onMouseDown:R=>{R.preventDefault(),c(I)},tabIndex:-1,ref:R=>{u&&u.current&&(u.current[I.value]=R)}},y))}return O.length>0&&S.length>0&&S.unshift(k.createElement("div",{className:x.separator,key:"empty-group-separator"},k.createElement(Ye,null))),O.length>0||S.length>0?k.createElement(k.Fragment,null,O,S):k.createElement(W,{size:p,unstyled:w,className:x.nothingFound},g)}oP.displayName="@mantine/core/SelectItems";var iX=Object.defineProperty,rg=Object.getOwnPropertySymbols,AR=Object.prototype.hasOwnProperty,BR=Object.prototype.propertyIsEnumerable,_E=(e,t,n)=>t in e?iX(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,sX=(e,t)=>{for(var n in t||(t={}))AR.call(t,n)&&_E(e,n,t[n]);if(rg)for(var n of rg(t))BR.call(t,n)&&_E(e,n,t[n]);return e},aX=(e,t)=>{var n={};for(var r in e)AR.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&rg)for(var r of rg(e))t.indexOf(r)<0&&BR.call(e,r)&&(n[r]=e[r]);return n};const iP=_.forwardRef((e,t)=>{var n=e,{label:r,value:o}=n,i=aX(n,["label","value"]);return k.createElement("div",sX({ref:t},i),r||o)});iP.displayName="@mantine/core/DefaultItem";function lX(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function FR(...e){return t=>e.forEach(n=>lX(n,t))}function Al(...e){return _.useCallback(FR(...e),e)}const VR=_.forwardRef((e,t)=>{const{children:n,...r}=e,o=_.Children.toArray(n),i=o.find(uX);if(i){const s=i.props.children,a=o.map(c=>c===i?_.Children.count(s)>1?_.Children.only(null):_.isValidElement(s)?s.props.children:null:c);return _.createElement(Wb,Lt({},r,{ref:t}),_.isValidElement(s)?_.cloneElement(s,void 0,a):null)}return _.createElement(Wb,Lt({},r,{ref:t}),n)});VR.displayName="Slot";const Wb=_.forwardRef((e,t)=>{const{children:n,...r}=e;return _.isValidElement(n)?_.cloneElement(n,{...dX(r,n.props),ref:FR(t,n.ref)}):_.Children.count(n)>1?_.Children.only(null):null});Wb.displayName="SlotClone";const cX=({children:e})=>_.createElement(_.Fragment,null,e);function uX(e){return _.isValidElement(e)&&e.type===cX}function dX(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...a)=>{i(...a),o(...a)}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}const fX=["a","button","div","h2","h3","img","label","li","nav","ol","p","span","svg","ul"],Bf=fX.reduce((e,t)=>{const n=_.forwardRef((r,o)=>{const{asChild:i,...s}=r,a=i?VR:t;return _.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),_.createElement(a,Lt({},s,{ref:o}))});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{}),Ub=globalThis?.document?_.useLayoutEffect:()=>{};function pX(e,t){return _.useReducer((n,r)=>{const o=t[n][r];return o??n},e)}const Ff=e=>{const{present:t,children:n}=e,r=hX(t),o=typeof n=="function"?n({present:r.isPresent}):_.Children.only(n),i=Al(r.ref,o.ref);return typeof n=="function"||r.isPresent?_.cloneElement(o,{ref:i}):null};Ff.displayName="Presence";function hX(e){const[t,n]=_.useState(),r=_.useRef({}),o=_.useRef(e),i=_.useRef("none"),s=e?"mounted":"unmounted",[a,c]=pX(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return _.useEffect(()=>{const u=Wp(r.current);i.current=a==="mounted"?u:"none"},[a]),Ub(()=>{const u=r.current,f=o.current;if(f!==e){const g=i.current,v=Wp(u);e?c("MOUNT"):v==="none"||u?.display==="none"?c("UNMOUNT"):c(f&&g!==v?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,c]),Ub(()=>{if(t){const u=p=>{const v=Wp(r.current).includes(p.animationName);p.target===t&&v&&xs.flushSync(()=>c("ANIMATION_END"))},f=p=>{p.target===t&&(i.current=Wp(r.current))};return t.addEventListener("animationstart",f),t.addEventListener("animationcancel",u),t.addEventListener("animationend",u),()=>{t.removeEventListener("animationstart",f),t.removeEventListener("animationcancel",u),t.removeEventListener("animationend",u)}}else c("ANIMATION_END")},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:_.useCallback(u=>{u&&(r.current=getComputedStyle(u)),n(u)},[])}}function Wp(e){return e?.animationName||"none"}function mX(e,t=[]){let n=[];function r(i,s){const a=_.createContext(s),c=n.length;n=[...n,s];function u(p){const{scope:g,children:v,...y}=p,w=g?.[e][c]||a,P=_.useMemo(()=>y,Object.values(y));return _.createElement(w.Provider,{value:P},v)}function f(p,g){const v=g?.[e][c]||a,y=_.useContext(v);if(y)return y;if(s!==void 0)return s;throw new Error(`\`${p}\` must be used within \`${i}\``)}return u.displayName=i+"Provider",[u,f]}const o=()=>{const i=n.map(s=>_.createContext(s));return function(a){const c=a?.[e]||i;return _.useMemo(()=>({[`__scope${e}`]:{...a,[e]:c}}),[a,c])}};return o.scopeName=e,[r,gX(o,...t)]}function gX(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(i){const s=r.reduce((a,{useScope:c,scopeName:u})=>{const p=c(i)[`__scope${u}`];return{...a,...p}},{});return _.useMemo(()=>({[`__scope${t.scopeName}`]:s}),[s])}};return n.scopeName=t.scopeName,n}function el(e){const t=_.useRef(e);return _.useEffect(()=>{t.current=e}),_.useMemo(()=>(...n)=>{var r;return(r=t.current)===null||r===void 0?void 0:r.call(t,...n)},[])}const vX=_.createContext(void 0);function yX(e){const t=_.useContext(vX);return e||t||"ltr"}function _X(e,[t,n]){return Math.min(n,Math.max(t,e))}function _l(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e?.(o),n===!1||!o.defaultPrevented)return t?.(o)}}function wX(e,t){return _.useReducer((n,r)=>{const o=t[n][r];return o??n},e)}const HR="ScrollArea",[WR,$Ie]=mX(HR),[bX,Fo]=WR(HR),xX=_.forwardRef((e,t)=>{const{__scopeScrollArea:n,type:r="hover",dir:o,scrollHideDelay:i=600,...s}=e,[a,c]=_.useState(null),[u,f]=_.useState(null),[p,g]=_.useState(null),[v,y]=_.useState(null),[w,P]=_.useState(null),[x,S]=_.useState(0),[O,E]=_.useState(0),[$,N]=_.useState(!1),[I,R]=_.useState(!1),B=Al(t,G=>c(G)),z=yX(o);return _.createElement(bX,{scope:n,type:r,dir:z,scrollHideDelay:i,scrollArea:a,viewport:u,onViewportChange:f,content:p,onContentChange:g,scrollbarX:v,onScrollbarXChange:y,scrollbarXEnabled:$,onScrollbarXEnabledChange:N,scrollbarY:w,onScrollbarYChange:P,scrollbarYEnabled:I,onScrollbarYEnabledChange:R,onCornerWidthChange:S,onCornerHeightChange:E},_.createElement(Bf.div,Lt({dir:z},s,{ref:B,style:{position:"relative","--radix-scroll-area-corner-width":x+"px","--radix-scroll-area-corner-height":O+"px",...e.style}})))}),SX="ScrollAreaViewport",PX=_.forwardRef((e,t)=>{const{__scopeScrollArea:n,children:r,...o}=e,i=Fo(SX,n),s=_.useRef(null),a=Al(t,s,i.onViewportChange);return _.createElement(_.Fragment,null,_.createElement("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"}}),_.createElement(Bf.div,Lt({"data-radix-scroll-area-viewport":""},o,{ref:a,style:{overflowX:i.scrollbarXEnabled?"scroll":"hidden",overflowY:i.scrollbarYEnabled?"scroll":"hidden",...e.style}}),_.createElement("div",{ref:i.onContentChange,style:{minWidth:"100%",display:"table"}},r)))}),Ss="ScrollAreaScrollbar",OX=_.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=Fo(Ss,e.__scopeScrollArea),{onScrollbarXEnabledChange:i,onScrollbarYEnabledChange:s}=o,a=e.orientation==="horizontal";return _.useEffect(()=>(a?i(!0):s(!0),()=>{a?i(!1):s(!1)}),[a,i,s]),o.type==="hover"?_.createElement(CX,Lt({},r,{ref:t,forceMount:n})):o.type==="scroll"?_.createElement(kX,Lt({},r,{ref:t,forceMount:n})):o.type==="auto"?_.createElement(UR,Lt({},r,{ref:t,forceMount:n})):o.type==="always"?_.createElement(sP,Lt({},r,{ref:t})):null}),CX=_.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=Fo(Ss,e.__scopeScrollArea),[i,s]=_.useState(!1);return _.useEffect(()=>{const a=o.scrollArea;let c=0;if(a){const u=()=>{window.clearTimeout(c),s(!0)},f=()=>{c=window.setTimeout(()=>s(!1),o.scrollHideDelay)};return a.addEventListener("pointerenter",u),a.addEventListener("pointerleave",f),()=>{window.clearTimeout(c),a.removeEventListener("pointerenter",u),a.removeEventListener("pointerleave",f)}}},[o.scrollArea,o.scrollHideDelay]),_.createElement(Ff,{present:n||i},_.createElement(UR,Lt({"data-state":i?"visible":"hidden"},r,{ref:t})))}),kX=_.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=Fo(Ss,e.__scopeScrollArea),i=e.orientation==="horizontal",s=k0(()=>c("SCROLL_END"),100),[a,c]=wX("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return _.useEffect(()=>{if(a==="idle"){const u=window.setTimeout(()=>c("HIDE"),o.scrollHideDelay);return()=>window.clearTimeout(u)}},[a,o.scrollHideDelay,c]),_.useEffect(()=>{const u=o.viewport,f=i?"scrollLeft":"scrollTop";if(u){let p=u[f];const g=()=>{const v=u[f];p!==v&&(c("SCROLL"),s()),p=v};return u.addEventListener("scroll",g),()=>u.removeEventListener("scroll",g)}},[o.viewport,i,c,s]),_.createElement(Ff,{present:n||a!=="hidden"},_.createElement(sP,Lt({"data-state":a==="hidden"?"hidden":"visible"},r,{ref:t,onPointerEnter:_l(e.onPointerEnter,()=>c("POINTER_ENTER")),onPointerLeave:_l(e.onPointerLeave,()=>c("POINTER_LEAVE"))})))}),UR=_.forwardRef((e,t)=>{const n=Fo(Ss,e.__scopeScrollArea),{forceMount:r,...o}=e,[i,s]=_.useState(!1),a=e.orientation==="horizontal",c=k0(()=>{if(n.viewport){const u=n.viewport.offsetWidth{const{orientation:n="vertical",...r}=e,o=Fo(Ss,e.__scopeScrollArea),i=_.useRef(null),s=_.useRef(0),[a,c]=_.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),u=KR(a.viewport,a.content),f={...r,sizes:a,onSizesChange:c,hasThumb:u>0&&u<1,onThumbChange:g=>i.current=g,onThumbPointerUp:()=>s.current=0,onThumbPointerDown:g=>s.current=g};function p(g,v){return LX(g,s.current,a,v)}return n==="horizontal"?_.createElement(EX,Lt({},f,{ref:t,onThumbPositionChange:()=>{if(o.viewport&&i.current){const g=o.viewport.scrollLeft,v=wE(g,a,o.dir);i.current.style.transform=`translate3d(${v}px, 0, 0)`}},onWheelScroll:g=>{o.viewport&&(o.viewport.scrollLeft=g)},onDragScroll:g=>{o.viewport&&(o.viewport.scrollLeft=p(g,o.dir))}})):n==="vertical"?_.createElement($X,Lt({},f,{ref:t,onThumbPositionChange:()=>{if(o.viewport&&i.current){const g=o.viewport.scrollTop,v=wE(g,a);i.current.style.transform=`translate3d(0, ${v}px, 0)`}},onWheelScroll:g=>{o.viewport&&(o.viewport.scrollTop=g)},onDragScroll:g=>{o.viewport&&(o.viewport.scrollTop=p(g))}})):null}),EX=_.forwardRef((e,t)=>{const{sizes:n,onSizesChange:r,...o}=e,i=Fo(Ss,e.__scopeScrollArea),[s,a]=_.useState(),c=_.useRef(null),u=Al(t,c,i.onScrollbarXChange);return _.useEffect(()=>{c.current&&a(getComputedStyle(c.current))},[c]),_.createElement(GR,Lt({"data-orientation":"horizontal"},o,{ref:u,sizes:n,style:{bottom:0,left:i.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:i.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":C0(n)+"px",...e.style},onThumbPointerDown:f=>e.onThumbPointerDown(f.x),onDragScroll:f=>e.onDragScroll(f.x),onWheelScroll:(f,p)=>{if(i.viewport){const g=i.viewport.scrollLeft+f.deltaX;e.onWheelScroll(g),JR(g,p)&&f.preventDefault()}},onResize:()=>{c.current&&i.viewport&&s&&r({content:i.viewport.scrollWidth,viewport:i.viewport.offsetWidth,scrollbar:{size:c.current.clientWidth,paddingStart:og(s.paddingLeft),paddingEnd:og(s.paddingRight)}})}}))}),$X=_.forwardRef((e,t)=>{const{sizes:n,onSizesChange:r,...o}=e,i=Fo(Ss,e.__scopeScrollArea),[s,a]=_.useState(),c=_.useRef(null),u=Al(t,c,i.onScrollbarYChange);return _.useEffect(()=>{c.current&&a(getComputedStyle(c.current))},[c]),_.createElement(GR,Lt({"data-orientation":"vertical"},o,{ref:u,sizes:n,style:{top:0,right:i.dir==="ltr"?0:void 0,left:i.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":C0(n)+"px",...e.style},onThumbPointerDown:f=>e.onThumbPointerDown(f.y),onDragScroll:f=>e.onDragScroll(f.y),onWheelScroll:(f,p)=>{if(i.viewport){const g=i.viewport.scrollTop+f.deltaY;e.onWheelScroll(g),JR(g,p)&&f.preventDefault()}},onResize:()=>{c.current&&i.viewport&&s&&r({content:i.viewport.scrollHeight,viewport:i.viewport.offsetHeight,scrollbar:{size:c.current.clientHeight,paddingStart:og(s.paddingTop),paddingEnd:og(s.paddingBottom)}})}}))}),[MX,ZR]=WR(Ss),GR=_.forwardRef((e,t)=>{const{__scopeScrollArea:n,sizes:r,hasThumb:o,onThumbChange:i,onThumbPointerUp:s,onThumbPointerDown:a,onThumbPositionChange:c,onDragScroll:u,onWheelScroll:f,onResize:p,...g}=e,v=Fo(Ss,n),[y,w]=_.useState(null),P=Al(t,B=>w(B)),x=_.useRef(null),S=_.useRef(""),O=v.viewport,E=r.content-r.viewport,$=el(f),N=el(c),I=k0(p,10);function R(B){if(x.current){const z=B.clientX-x.current.left,G=B.clientY-x.current.top;u({x:z,y:G})}}return _.useEffect(()=>{const B=z=>{const G=z.target;y?.contains(G)&&$(z,E)};return document.addEventListener("wheel",B,{passive:!1}),()=>document.removeEventListener("wheel",B,{passive:!1})},[O,y,E,$]),_.useEffect(N,[r,N]),iu(y,I),iu(v.content,I),_.createElement(MX,{scope:n,scrollbar:y,hasThumb:o,onThumbChange:el(i),onThumbPointerUp:el(s),onThumbPositionChange:N,onThumbPointerDown:el(a)},_.createElement(Bf.div,Lt({},g,{ref:P,style:{position:"absolute",...g.style},onPointerDown:_l(e.onPointerDown,B=>{B.button===0&&(B.target.setPointerCapture(B.pointerId),x.current=y.getBoundingClientRect(),S.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",R(B))}),onPointerMove:_l(e.onPointerMove,R),onPointerUp:_l(e.onPointerUp,B=>{const z=B.target;z.hasPointerCapture(B.pointerId)&&z.releasePointerCapture(B.pointerId),document.body.style.webkitUserSelect=S.current,x.current=null})})))}),Zb="ScrollAreaThumb",NX=_.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=ZR(Zb,e.__scopeScrollArea);return _.createElement(Ff,{present:n||o.hasThumb},_.createElement(TX,Lt({ref:t},r)))}),TX=_.forwardRef((e,t)=>{const{__scopeScrollArea:n,style:r,...o}=e,i=Fo(Zb,n),s=ZR(Zb,n),{onThumbPositionChange:a}=s,c=Al(t,p=>s.onThumbChange(p)),u=_.useRef(),f=k0(()=>{u.current&&(u.current(),u.current=void 0)},100);return _.useEffect(()=>{const p=i.viewport;if(p){const g=()=>{if(f(),!u.current){const v=DX(p,a);u.current=v,a()}};return a(),p.addEventListener("scroll",g),()=>p.removeEventListener("scroll",g)}},[i.viewport,f,a]),_.createElement(Bf.div,Lt({"data-state":s.hasThumb?"visible":"hidden"},o,{ref:c,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...r},onPointerDownCapture:_l(e.onPointerDownCapture,p=>{const v=p.target.getBoundingClientRect(),y=p.clientX-v.left,w=p.clientY-v.top;s.onThumbPointerDown({x:y,y:w})}),onPointerUp:_l(e.onPointerUp,s.onThumbPointerUp)}))}),YR="ScrollAreaCorner",IX=_.forwardRef((e,t)=>{const n=Fo(YR,e.__scopeScrollArea),r=!!(n.scrollbarX&&n.scrollbarY);return n.type!=="scroll"&&r?_.createElement(jX,Lt({},e,{ref:t})):null}),jX=_.forwardRef((e,t)=>{const{__scopeScrollArea:n,...r}=e,o=Fo(YR,n),[i,s]=_.useState(0),[a,c]=_.useState(0),u=!!(i&&a);return iu(o.scrollbarX,()=>{var f;const p=((f=o.scrollbarX)===null||f===void 0?void 0:f.offsetHeight)||0;o.onCornerHeightChange(p),c(p)}),iu(o.scrollbarY,()=>{var f;const p=((f=o.scrollbarY)===null||f===void 0?void 0:f.offsetWidth)||0;o.onCornerWidthChange(p),s(p)}),u?_.createElement(Bf.div,Lt({},r,{ref:t,style:{width:i,height:a,position:"absolute",right:o.dir==="ltr"?0:void 0,left:o.dir==="rtl"?0:void 0,bottom:0,...e.style}})):null});function og(e){return e?parseInt(e,10):0}function KR(e,t){const n=e/t;return isNaN(n)?0:n}function C0(e){const t=KR(e.viewport,e.content),n=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,r=(e.scrollbar.size-n)*t;return Math.max(r,18)}function LX(e,t,n,r="ltr"){const o=C0(n),i=o/2,s=t||i,a=o-s,c=n.scrollbar.paddingStart+s,u=n.scrollbar.size-n.scrollbar.paddingEnd-a,f=n.content-n.viewport,p=r==="ltr"?[0,f]:[f*-1,0];return qR([c,u],p)(e)}function wE(e,t,n="ltr"){const r=C0(t),o=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,i=t.scrollbar.size-o,s=t.content-t.viewport,a=i-r,c=n==="ltr"?[0,s]:[s*-1,0],u=_X(e,c);return qR([0,s],[0,a])(u)}function qR(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(n-e[0])}}function JR(e,t){return e>0&&e{})=>{let n={left:e.scrollLeft,top:e.scrollTop},r=0;return function o(){const i={left:e.scrollLeft,top:e.scrollTop},s=n.left!==i.left,a=n.top!==i.top;(s||a)&&t(),n=i,r=window.requestAnimationFrame(o)}(),()=>window.cancelAnimationFrame(r)};function k0(e,t){const n=el(e),r=_.useRef(0);return _.useEffect(()=>()=>window.clearTimeout(r.current),[]),_.useCallback(()=>{window.clearTimeout(r.current),r.current=window.setTimeout(n,t)},[n,t])}function iu(e,t){const n=el(t);Ub(()=>{let r=0;if(e){const o=new ResizeObserver(()=>{cancelAnimationFrame(r),r=window.requestAnimationFrame(n)});return o.observe(e),()=>{window.cancelAnimationFrame(r),o.unobserve(e)}}},[e,n])}const RX=xX,zX=PX,bE=OX,xE=NX,AX=IX;var BX=ue((e,{scrollbarSize:t,offsetScrollbars:n,scrollbarHovered:r,hidden:o})=>({root:{overflow:"hidden"},viewport:{width:"100%",height:"100%",paddingRight:n?M(t):void 0,paddingBottom:n?M(t):void 0},scrollbar:{display:o?"none":"flex",userSelect:"none",touchAction:"none",boxSizing:"border-box",padding:`calc(${M(t)} / 5)`,transition:"background-color 150ms ease, opacity 150ms ease","&:hover":{backgroundColor:e.colorScheme==="dark"?e.colors.dark[8]:e.colors.gray[0],[`& .${Ar("thumb")}`]:{backgroundColor:e.colorScheme==="dark"?e.fn.rgba(e.white,.5):e.fn.rgba(e.black,.5)}},'&[data-orientation="vertical"]':{width:M(t)},'&[data-orientation="horizontal"]':{flexDirection:"column",height:M(t)},'&[data-state="hidden"]':{display:"none",opacity:0}},thumb:{ref:Ar("thumb"),flex:1,backgroundColor:e.colorScheme==="dark"?e.fn.rgba(e.white,.4):e.fn.rgba(e.black,.4),borderRadius:M(t),position:"relative",transition:"background-color 150ms ease",display:o?"none":void 0,overflow:"hidden","&::before":{content:'""',position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",width:"100%",height:"100%",minWidth:M(44),minHeight:M(44)}},corner:{backgroundColor:e.colorScheme==="dark"?e.colors.dark[6]:e.colors.gray[0],transition:"opacity 150ms ease",opacity:r?1:0,display:o?"none":void 0}}));const FX=BX;var VX=Object.defineProperty,HX=Object.defineProperties,WX=Object.getOwnPropertyDescriptors,ig=Object.getOwnPropertySymbols,XR=Object.prototype.hasOwnProperty,QR=Object.prototype.propertyIsEnumerable,SE=(e,t,n)=>t in e?VX(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Gb=(e,t)=>{for(var n in t||(t={}))XR.call(t,n)&&SE(e,n,t[n]);if(ig)for(var n of ig(t))QR.call(t,n)&&SE(e,n,t[n]);return e},ez=(e,t)=>HX(e,WX(t)),tz=(e,t)=>{var n={};for(var r in e)XR.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&ig)for(var r of ig(e))t.indexOf(r)<0&&QR.call(e,r)&&(n[r]=e[r]);return n};const nz={scrollbarSize:12,scrollHideDelay:1e3,type:"hover",offsetScrollbars:!1},E0=_.forwardRef((e,t)=>{const n=ae("ScrollArea",nz,e),{children:r,className:o,classNames:i,styles:s,scrollbarSize:a,scrollHideDelay:c,type:u,dir:f,offsetScrollbars:p,viewportRef:g,onScrollPositionChange:v,unstyled:y,variant:w,viewportProps:P}=n,x=tz(n,["children","className","classNames","styles","scrollbarSize","scrollHideDelay","type","dir","offsetScrollbars","viewportRef","onScrollPositionChange","unstyled","variant","viewportProps"]),[S,O]=_.useState(!1),E=ir(),{classes:$,cx:N}=FX({scrollbarSize:a,offsetScrollbars:p,scrollbarHovered:S,hidden:u==="never"},{name:"ScrollArea",classNames:i,styles:s,unstyled:y,variant:w});return k.createElement(RX,{type:u==="never"?"always":u,scrollHideDelay:c,dir:f||E.dir,ref:t,asChild:!0},k.createElement(Pe,Gb({className:N($.root,o)},x),k.createElement(zX,ez(Gb({},P),{className:$.viewport,ref:g,onScroll:typeof v=="function"?({currentTarget:I})=>v({x:I.scrollLeft,y:I.scrollTop}):void 0}),r),k.createElement(bE,{orientation:"horizontal",className:$.scrollbar,forceMount:!0,onMouseEnter:()=>O(!0),onMouseLeave:()=>O(!1)},k.createElement(xE,{className:$.thumb})),k.createElement(bE,{orientation:"vertical",className:$.scrollbar,forceMount:!0,onMouseEnter:()=>O(!0),onMouseLeave:()=>O(!1)},k.createElement(xE,{className:$.thumb})),k.createElement(AX,{className:$.corner})))}),rz=_.forwardRef((e,t)=>{const n=ae("ScrollAreaAutosize",nz,e),{children:r,classNames:o,styles:i,scrollbarSize:s,scrollHideDelay:a,type:c,dir:u,offsetScrollbars:f,viewportRef:p,onScrollPositionChange:g,unstyled:v,sx:y,variant:w,viewportProps:P}=n,x=tz(n,["children","classNames","styles","scrollbarSize","scrollHideDelay","type","dir","offsetScrollbars","viewportRef","onScrollPositionChange","unstyled","sx","variant","viewportProps"]);return k.createElement(Pe,ez(Gb({},x),{ref:t,sx:[{display:"flex"},...eS(y)]}),k.createElement(Pe,{sx:{display:"flex",flexDirection:"column",flex:1}},k.createElement(E0,{classNames:o,styles:i,scrollHideDelay:a,scrollbarSize:s,type:c,dir:u,offsetScrollbars:f,viewportRef:p,onScrollPositionChange:g,unstyled:v,variant:w,viewportProps:P},r)))});rz.displayName="@mantine/core/ScrollAreaAutosize";E0.displayName="@mantine/core/ScrollArea";E0.Autosize=rz;const St=E0;var UX=Object.defineProperty,ZX=Object.defineProperties,GX=Object.getOwnPropertyDescriptors,sg=Object.getOwnPropertySymbols,oz=Object.prototype.hasOwnProperty,iz=Object.prototype.propertyIsEnumerable,PE=(e,t,n)=>t in e?UX(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,OE=(e,t)=>{for(var n in t||(t={}))oz.call(t,n)&&PE(e,n,t[n]);if(sg)for(var n of sg(t))iz.call(t,n)&&PE(e,n,t[n]);return e},YX=(e,t)=>ZX(e,GX(t)),KX=(e,t)=>{var n={};for(var r in e)oz.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&sg)for(var r of sg(e))t.indexOf(r)<0&&iz.call(e,r)&&(n[r]=e[r]);return n};const $0=_.forwardRef((e,t)=>{var n=e,{style:r}=n,o=KX(n,["style"]);return k.createElement(St,YX(OE({},o),{style:OE({width:"100%"},r),viewportProps:{tabIndex:-1},viewportRef:t}),o.children)});$0.displayName="@mantine/core/SelectScrollArea";var qX=ue(()=>({dropdown:{},itemsWrapper:{padding:M(4),display:"flex",width:"100%",boxSizing:"border-box"}}));const JX=qX,ti=Math.min,tr=Math.max,ag=Math.round,Up=Math.floor,Pa=e=>({x:e,y:e}),XX={left:"right",right:"left",bottom:"top",top:"bottom"},QX={start:"end",end:"start"};function Yb(e,t,n){return tr(e,ti(t,n))}function gs(e,t){return typeof e=="function"?e(t):e}function ni(e){return e.split("-")[0]}function Ou(e){return e.split("-")[1]}function aP(e){return e==="x"?"y":"x"}function lP(e){return e==="y"?"height":"width"}function Bl(e){return["top","bottom"].includes(ni(e))?"y":"x"}function cP(e){return aP(Bl(e))}function eQ(e,t,n){n===void 0&&(n=!1);const r=Ou(e),o=cP(e),i=lP(o);let s=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(s=lg(s)),[s,lg(s)]}function tQ(e){const t=lg(e);return[Kb(e),t,Kb(t)]}function Kb(e){return e.replace(/start|end/g,t=>QX[t])}function nQ(e,t,n){const r=["left","right"],o=["right","left"],i=["top","bottom"],s=["bottom","top"];switch(e){case"top":case"bottom":return n?t?o:r:t?r:o;case"left":case"right":return t?i:s;default:return[]}}function rQ(e,t,n,r){const o=Ou(e);let i=nQ(ni(e),n==="start",r);return o&&(i=i.map(s=>s+"-"+o),t&&(i=i.concat(i.map(Kb)))),i}function lg(e){return e.replace(/left|right|bottom|top/g,t=>XX[t])}function oQ(e){return{top:0,right:0,bottom:0,left:0,...e}}function uP(e){return typeof e!="number"?oQ(e):{top:e,right:e,bottom:e,left:e}}function su(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}function CE(e,t,n){let{reference:r,floating:o}=e;const i=Bl(t),s=cP(t),a=lP(s),c=ni(t),u=i==="y",f=r.x+r.width/2-o.width/2,p=r.y+r.height/2-o.height/2,g=r[a]/2-o[a]/2;let v;switch(c){case"top":v={x:f,y:r.y-o.height};break;case"bottom":v={x:f,y:r.y+r.height};break;case"right":v={x:r.x+r.width,y:p};break;case"left":v={x:r.x-o.width,y:p};break;default:v={x:r.x,y:r.y}}switch(Ou(t)){case"start":v[s]-=g*(n&&u?-1:1);break;case"end":v[s]+=g*(n&&u?-1:1);break}return v}const iQ=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:s}=n,a=i.filter(Boolean),c=await(s.isRTL==null?void 0:s.isRTL(t));let u=await s.getElementRects({reference:e,floating:t,strategy:o}),{x:f,y:p}=CE(u,r,c),g=r,v={},y=0;for(let w=0;w({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:i,platform:s,elements:a,middlewareData:c}=t,{element:u,padding:f=0}=gs(e,t)||{};if(u==null)return{};const p=uP(f),g={x:n,y:r},v=cP(o),y=lP(v),w=await s.getDimensions(u),P=v==="y",x=P?"top":"left",S=P?"bottom":"right",O=P?"clientHeight":"clientWidth",E=i.reference[y]+i.reference[v]-g[v]-i.floating[y],$=g[v]-i.reference[v],N=await(s.getOffsetParent==null?void 0:s.getOffsetParent(u));let I=N?N[O]:0;(!I||!await(s.isElement==null?void 0:s.isElement(N)))&&(I=a.floating[O]||i.floating[y]);const R=E/2-$/2,B=I/2-w[y]/2-1,z=ti(p[x],B),G=ti(p[S],B),X=z,Q=I-w[y]-G,V=I/2-w[y]/2+R,H=Yb(X,V,Q),Z=!c.arrow&&Ou(o)!=null&&V!=H&&i.reference[y]/2-(VX<=0)){var B,z;const X=(((B=i.flip)==null?void 0:B.index)||0)+1,Q=$[X];if(Q)return{data:{index:X,overflows:R},reset:{placement:Q}};let V=(z=R.filter(H=>H.overflows[0]<=0).sort((H,Z)=>H.overflows[1]-Z.overflows[1])[0])==null?void 0:z.placement;if(!V)switch(v){case"bestFit":{var G;const H=(G=R.map(Z=>[Z.placement,Z.overflows.filter(Y=>Y>0).reduce((Y,j)=>Y+j,0)]).sort((Z,Y)=>Z[1]-Y[1])[0])==null?void 0:G[0];H&&(V=H);break}case"initialPlacement":V=a;break}if(o!==V)return{reset:{placement:V}}}return{}}}};function az(e){const t=ti(...e.map(i=>i.left)),n=ti(...e.map(i=>i.top)),r=tr(...e.map(i=>i.right)),o=tr(...e.map(i=>i.bottom));return{x:t,y:n,width:r-t,height:o-n}}function sQ(e){const t=e.slice().sort((o,i)=>o.y-i.y),n=[];let r=null;for(let o=0;or.height/2?n.push([i]):n[n.length-1].push(i),r=i}return n.map(o=>su(az(o)))}const lz=function(e){return e===void 0&&(e={}),{name:"inline",options:e,async fn(t){const{placement:n,elements:r,rects:o,platform:i,strategy:s}=t,{padding:a=2,x:c,y:u}=gs(e,t),f=Array.from(await(i.getClientRects==null?void 0:i.getClientRects(r.reference))||[]),p=sQ(f),g=su(az(f)),v=uP(a);function y(){if(p.length===2&&p[0].left>p[1].right&&c!=null&&u!=null)return p.find(P=>c>P.left-v.left&&cP.top-v.top&&u=2){if(Bl(n)==="y"){const z=p[0],G=p[p.length-1],X=ni(n)==="top",Q=z.top,V=G.bottom,H=X?z.left:G.left,Z=X?z.right:G.right,Y=Z-H,j=V-Q;return{top:Q,bottom:V,left:H,right:Z,width:Y,height:j,x:H,y:Q}}const P=ni(n)==="left",x=tr(...p.map(z=>z.right)),S=ti(...p.map(z=>z.left)),O=p.filter(z=>P?z.left===S:z.right===x),E=O[0].top,$=O[O.length-1].bottom,N=S,I=x,R=I-N,B=$-E;return{top:E,bottom:$,left:N,right:I,width:R,height:B,x:N,y:E}}return g}const w=await i.getElementRects({reference:{getBoundingClientRect:y},floating:r.floating,strategy:s});return o.reference.x!==w.reference.x||o.reference.y!==w.reference.y||o.reference.width!==w.reference.width||o.reference.height!==w.reference.height?{reset:{rects:w}}:{}}}};async function aQ(e,t){const{placement:n,platform:r,elements:o}=e,i=await(r.isRTL==null?void 0:r.isRTL(o.floating)),s=ni(n),a=Ou(n),c=Bl(n)==="y",u=["left","top"].includes(s)?-1:1,f=i&&c?-1:1,p=gs(t,e);let{mainAxis:g,crossAxis:v,alignmentAxis:y}=typeof p=="number"?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...p};return a&&typeof y=="number"&&(v=a==="end"?y*-1:y),c?{x:v*f,y:g*u}:{x:g*u,y:v*f}}const cz=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){const{x:n,y:r}=t,o=await aQ(t,e);return{x:n+o.x,y:r+o.y,data:o}}}},fP=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:i=!0,crossAxis:s=!1,limiter:a={fn:P=>{let{x,y:S}=P;return{x,y:S}}},...c}=gs(e,t),u={x:n,y:r},f=await dP(t,c),p=Bl(ni(o)),g=aP(p);let v=u[g],y=u[p];if(i){const P=g==="y"?"top":"left",x=g==="y"?"bottom":"right",S=v+f[P],O=v-f[x];v=Yb(S,v,O)}if(s){const P=p==="y"?"top":"left",x=p==="y"?"bottom":"right",S=y+f[P],O=y-f[x];y=Yb(S,y,O)}const w=a.fn({...t,[g]:v,[p]:y});return{...w,data:{x:w.x-n,y:w.y-r}}}}},lQ=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:i,middlewareData:s}=t,{offset:a=0,mainAxis:c=!0,crossAxis:u=!0}=gs(e,t),f={x:n,y:r},p=Bl(o),g=aP(p);let v=f[g],y=f[p];const w=gs(a,t),P=typeof w=="number"?{mainAxis:w,crossAxis:0}:{mainAxis:0,crossAxis:0,...w};if(c){const O=g==="y"?"height":"width",E=i.reference[g]-i.floating[O]+P.mainAxis,$=i.reference[g]+i.reference[O]-P.mainAxis;v$&&(v=$)}if(u){var x,S;const O=g==="y"?"width":"height",E=["top","left"].includes(ni(o)),$=i.reference[p]-i.floating[O]+(E&&((x=s.offset)==null?void 0:x[p])||0)+(E?0:P.crossAxis),N=i.reference[p]+i.reference[O]+(E?0:((S=s.offset)==null?void 0:S[p])||0)-(E?P.crossAxis:0);y<$?y=$:y>N&&(y=N)}return{[g]:v,[p]:y}}}},cQ=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){const{placement:n,rects:r,platform:o,elements:i}=t,{apply:s=()=>{},...a}=gs(e,t),c=await dP(t,a),u=ni(n),f=Ou(n),p=Bl(n)==="y",{width:g,height:v}=r.floating;let y,w;u==="top"||u==="bottom"?(y=u,w=f===(await(o.isRTL==null?void 0:o.isRTL(i.floating))?"start":"end")?"left":"right"):(w=u,y=f==="end"?"top":"bottom");const P=v-c[y],x=g-c[w],S=!t.middlewareData.shift;let O=P,E=x;if(p){const N=g-c.left-c.right;E=f||S?ti(x,N):N}else{const N=v-c.top-c.bottom;O=f||S?ti(P,N):N}if(S&&!f){const N=tr(c.left,0),I=tr(c.right,0),R=tr(c.top,0),B=tr(c.bottom,0);p?E=g-2*(N!==0||I!==0?N+I:tr(c.left,c.right)):O=v-2*(R!==0||B!==0?R+B:tr(c.top,c.bottom))}await s({...t,availableWidth:E,availableHeight:O});const $=await o.getDimensions(i.floating);return g!==$.width||v!==$.height?{reset:{rects:!0}}:{}}}};function Oa(e){return uz(e)?(e.nodeName||"").toLowerCase():"#document"}function ho(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Ps(e){var t;return(t=(uz(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function uz(e){return e instanceof Node||e instanceof ho(e).Node}function vs(e){return e instanceof Element||e instanceof ho(e).Element}function ji(e){return e instanceof HTMLElement||e instanceof ho(e).HTMLElement}function EE(e){return typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof ho(e).ShadowRoot}function Vf(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Bo(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function uQ(e){return["table","td","th"].includes(Oa(e))}function pP(e){const t=hP(),n=Bo(e);return n.transform!=="none"||n.perspective!=="none"||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function dQ(e){let t=au(e);for(;ji(t)&&!M0(t);){if(pP(t))return t;t=au(t)}return null}function hP(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function M0(e){return["html","body","#document"].includes(Oa(e))}function Bo(e){return ho(e).getComputedStyle(e)}function N0(e){return vs(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function au(e){if(Oa(e)==="html")return e;const t=e.assignedSlot||e.parentNode||EE(e)&&e.host||Ps(e);return EE(t)?t.host:t}function dz(e){const t=au(e);return M0(t)?e.ownerDocument?e.ownerDocument.body:e.body:ji(t)&&Vf(t)?t:dz(t)}function us(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=dz(e),i=o===((r=e.ownerDocument)==null?void 0:r.body),s=ho(o);return i?t.concat(s,s.visualViewport||[],Vf(o)?o:[],s.frameElement&&n?us(s.frameElement):[]):t.concat(o,us(o,[],n))}function fz(e){const t=Bo(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=ji(e),i=o?e.offsetWidth:n,s=o?e.offsetHeight:r,a=ag(n)!==i||ag(r)!==s;return a&&(n=i,r=s),{width:n,height:r,$:a}}function mP(e){return vs(e)?e:e.contextElement}function Uc(e){const t=mP(e);if(!ji(t))return Pa(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=fz(t);let s=(i?ag(n.width):n.width)/r,a=(i?ag(n.height):n.height)/o;return(!s||!Number.isFinite(s))&&(s=1),(!a||!Number.isFinite(a))&&(a=1),{x:s,y:a}}const fQ=Pa(0);function pz(e){const t=ho(e);return!hP()||!t.visualViewport?fQ:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function pQ(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==ho(e)?!1:t}function Ml(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),i=mP(e);let s=Pa(1);t&&(r?vs(r)&&(s=Uc(r)):s=Uc(e));const a=pQ(i,n,r)?pz(i):Pa(0);let c=(o.left+a.x)/s.x,u=(o.top+a.y)/s.y,f=o.width/s.x,p=o.height/s.y;if(i){const g=ho(i),v=r&&vs(r)?ho(r):r;let y=g.frameElement;for(;y&&r&&v!==g;){const w=Uc(y),P=y.getBoundingClientRect(),x=Bo(y),S=P.left+(y.clientLeft+parseFloat(x.paddingLeft))*w.x,O=P.top+(y.clientTop+parseFloat(x.paddingTop))*w.y;c*=w.x,u*=w.y,f*=w.x,p*=w.y,c+=S,u+=O,y=ho(y).frameElement}}return su({width:f,height:p,x:c,y:u})}function hQ(e){let{rect:t,offsetParent:n,strategy:r}=e;const o=ji(n),i=Ps(n);if(n===i)return t;let s={scrollLeft:0,scrollTop:0},a=Pa(1);const c=Pa(0);if((o||!o&&r!=="fixed")&&((Oa(n)!=="body"||Vf(i))&&(s=N0(n)),ji(n))){const u=Ml(n);a=Uc(n),c.x=u.x+n.clientLeft,c.y=u.y+n.clientTop}return{width:t.width*a.x,height:t.height*a.y,x:t.x*a.x-s.scrollLeft*a.x+c.x,y:t.y*a.y-s.scrollTop*a.y+c.y}}function mQ(e){return Array.from(e.getClientRects())}function hz(e){return Ml(Ps(e)).left+N0(e).scrollLeft}function gQ(e){const t=Ps(e),n=N0(e),r=e.ownerDocument.body,o=tr(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=tr(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let s=-n.scrollLeft+hz(e);const a=-n.scrollTop;return Bo(r).direction==="rtl"&&(s+=tr(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:s,y:a}}function vQ(e,t){const n=ho(e),r=Ps(e),o=n.visualViewport;let i=r.clientWidth,s=r.clientHeight,a=0,c=0;if(o){i=o.width,s=o.height;const u=hP();(!u||u&&t==="fixed")&&(a=o.offsetLeft,c=o.offsetTop)}return{width:i,height:s,x:a,y:c}}function yQ(e,t){const n=Ml(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=ji(e)?Uc(e):Pa(1),s=e.clientWidth*i.x,a=e.clientHeight*i.y,c=o*i.x,u=r*i.y;return{width:s,height:a,x:c,y:u}}function $E(e,t,n){let r;if(t==="viewport")r=vQ(e,n);else if(t==="document")r=gQ(Ps(e));else if(vs(t))r=yQ(t,n);else{const o=pz(e);r={...t,x:t.x-o.x,y:t.y-o.y}}return su(r)}function mz(e,t){const n=au(e);return n===t||!vs(n)||M0(n)?!1:Bo(n).position==="fixed"||mz(n,t)}function _Q(e,t){const n=t.get(e);if(n)return n;let r=us(e,[],!1).filter(a=>vs(a)&&Oa(a)!=="body"),o=null;const i=Bo(e).position==="fixed";let s=i?au(e):e;for(;vs(s)&&!M0(s);){const a=Bo(s),c=pP(s);!c&&a.position==="fixed"&&(o=null),(i?!c&&!o:!c&&a.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||Vf(s)&&!c&&mz(e,s))?r=r.filter(f=>f!==s):o=a,s=au(s)}return t.set(e,r),r}function wQ(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const s=[...n==="clippingAncestors"?_Q(t,this._c):[].concat(n),r],a=s[0],c=s.reduce((u,f)=>{const p=$E(t,f,o);return u.top=tr(p.top,u.top),u.right=ti(p.right,u.right),u.bottom=ti(p.bottom,u.bottom),u.left=tr(p.left,u.left),u},$E(t,a,o));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function bQ(e){return fz(e)}function xQ(e,t,n){const r=ji(t),o=Ps(t),i=n==="fixed",s=Ml(e,!0,i,t);let a={scrollLeft:0,scrollTop:0};const c=Pa(0);if(r||!r&&!i)if((Oa(t)!=="body"||Vf(o))&&(a=N0(t)),r){const u=Ml(t,!0,i,t);c.x=u.x+t.clientLeft,c.y=u.y+t.clientTop}else o&&(c.x=hz(o));return{x:s.left+a.scrollLeft-c.x,y:s.top+a.scrollTop-c.y,width:s.width,height:s.height}}function ME(e,t){return!ji(e)||Bo(e).position==="fixed"?null:t?t(e):e.offsetParent}function gz(e,t){const n=ho(e);if(!ji(e))return n;let r=ME(e,t);for(;r&&uQ(r)&&Bo(r).position==="static";)r=ME(r,t);return r&&(Oa(r)==="html"||Oa(r)==="body"&&Bo(r).position==="static"&&!pP(r))?n:r||dQ(e)||n}const SQ=async function(e){let{reference:t,floating:n,strategy:r}=e;const o=this.getOffsetParent||gz,i=this.getDimensions;return{reference:xQ(t,await o(n),r),floating:{x:0,y:0,...await i(n)}}};function PQ(e){return Bo(e).direction==="rtl"}const OQ={convertOffsetParentRelativeRectToViewportRelativeRect:hQ,getDocumentElement:Ps,getClippingRect:wQ,getOffsetParent:gz,getElementRects:SQ,getClientRects:mQ,getDimensions:bQ,getScale:Uc,isElement:vs,isRTL:PQ};function CQ(e,t){let n=null,r;const o=Ps(e);function i(){clearTimeout(r),n&&n.disconnect(),n=null}function s(a,c){a===void 0&&(a=!1),c===void 0&&(c=1),i();const{left:u,top:f,width:p,height:g}=e.getBoundingClientRect();if(a||t(),!p||!g)return;const v=Up(f),y=Up(o.clientWidth-(u+p)),w=Up(o.clientHeight-(f+g)),P=Up(u),S={rootMargin:-v+"px "+-y+"px "+-w+"px "+-P+"px",threshold:tr(0,ti(1,c))||1};let O=!0;function E($){const N=$[0].intersectionRatio;if(N!==c){if(!O)return s();N?s(!1,N):r=setTimeout(()=>{s(!1,1e-7)},100)}O=!1}try{n=new IntersectionObserver(E,{...S,root:o.ownerDocument})}catch{n=new IntersectionObserver(E,S)}n.observe(e)}return s(!0),i}function kQ(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:c=!1}=r,u=mP(e),f=o||i?[...u?us(u):[],...us(t)]:[];f.forEach(x=>{o&&x.addEventListener("scroll",n,{passive:!0}),i&&x.addEventListener("resize",n)});const p=u&&a?CQ(u,n):null;let g=-1,v=null;s&&(v=new ResizeObserver(x=>{let[S]=x;S&&S.target===u&&v&&(v.unobserve(t),cancelAnimationFrame(g),g=requestAnimationFrame(()=>{v&&v.observe(t)})),n()}),u&&!c&&v.observe(u),v.observe(t));let y,w=c?Ml(e):null;c&&P();function P(){const x=Ml(e);w&&(x.x!==w.x||x.y!==w.y||x.width!==w.width||x.height!==w.height)&&n(),w=x,y=requestAnimationFrame(P)}return n(),()=>{f.forEach(x=>{o&&x.removeEventListener("scroll",n),i&&x.removeEventListener("resize",n)}),p&&p(),v&&v.disconnect(),v=null,c&&cancelAnimationFrame(y)}}const EQ=(e,t,n)=>{const r=new Map,o={platform:OQ,...n},i={...o.platform,_c:r};return iQ(e,t,{...o,platform:i})},vz=e=>{const{element:t,padding:n}=e;function r(o){return Object.prototype.hasOwnProperty.call(o,"current")}return{name:"arrow",options:e,fn(o){return r(t)?t.current!=null?kE({element:t.current,padding:n}).fn(o):{}:t?kE({element:t,padding:n}).fn(o):{}}}};var Vh=typeof document<"u"?_.useLayoutEffect:_.useEffect;function cg(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!=t.length)return!1;for(r=n;r--!==0;)if(!cg(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!Object.prototype.hasOwnProperty.call(t,o[r]))return!1;for(r=n;r--!==0;){const i=o[r];if(!(i==="_owner"&&e.$$typeof)&&!cg(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function NE(e){const t=_.useRef(e);return Vh(()=>{t.current=e}),t}function $Q(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,whileElementsMounted:i,open:s}=e,[a,c]=_.useState({x:null,y:null,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[u,f]=_.useState(r);cg(u,r)||f(r);const p=_.useRef(null),g=_.useRef(null),v=_.useRef(a),y=NE(i),w=NE(o),[P,x]=_.useState(null),[S,O]=_.useState(null),E=_.useCallback(z=>{p.current!==z&&(p.current=z,x(z))},[]),$=_.useCallback(z=>{g.current!==z&&(g.current=z,O(z))},[]),N=_.useCallback(()=>{if(!p.current||!g.current)return;const z={placement:t,strategy:n,middleware:u};w.current&&(z.platform=w.current),EQ(p.current,g.current,z).then(G=>{const X={...G,isPositioned:!0};I.current&&!cg(v.current,X)&&(v.current=X,xs.flushSync(()=>{c(X)}))})},[u,t,n,w]);Vh(()=>{s===!1&&v.current.isPositioned&&(v.current.isPositioned=!1,c(z=>({...z,isPositioned:!1})))},[s]);const I=_.useRef(!1);Vh(()=>(I.current=!0,()=>{I.current=!1}),[]),Vh(()=>{if(P&&S){if(y.current)return y.current(P,S,N);N()}},[P,S,N,y]);const R=_.useMemo(()=>({reference:p,floating:g,setReference:E,setFloating:$}),[E,$]),B=_.useMemo(()=>({reference:P,floating:S}),[P,S]);return _.useMemo(()=>({...a,update:N,refs:R,elements:B,reference:E,floating:$}),[a,N,R,B,E,$])}var lu=typeof document<"u"?_.useLayoutEffect:_.useEffect;let $_=!1,MQ=0;const TE=()=>"floating-ui-"+MQ++;function NQ(){const[e,t]=_.useState(()=>$_?TE():void 0);return lu(()=>{e==null&&t(TE())},[]),_.useEffect(()=>{$_||($_=!0)},[]),e}const TQ=Zd["useId".toString()],IE=TQ||NQ;function IQ(){const e=new Map;return{emit(t,n){var r;(r=e.get(t))==null||r.forEach(o=>o(n))},on(t,n){e.set(t,[...e.get(t)||[],n])},off(t,n){e.set(t,(e.get(t)||[]).filter(r=>r!==n))}}}const jQ=_.createContext(null),LQ=_.createContext(null),yz=()=>{var e;return((e=_.useContext(jQ))==null?void 0:e.id)||null},gP=()=>_.useContext(LQ);function Xs(e){return e?.ownerDocument||document}function DQ(){const e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform}function RQ(){const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(t=>{let{brand:n,version:r}=t;return n+"/"+r}).join(" "):navigator.userAgent}function vP(e){return Xs(e).defaultView||window}function Ei(e){return e?e instanceof vP(e).Element:!1}function _z(e){return e?e instanceof vP(e).HTMLElement:!1}function zQ(e){if(typeof ShadowRoot>"u")return!1;const t=vP(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function AQ(e){if(e.mozInputSource===0&&e.isTrusted)return!0;const t=/Android/i;return(t.test(DQ())||t.test(RQ()))&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function BQ(e){return e.width===0&&e.height===0||e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType!=="mouse"||e.width<1&&e.height<1&&e.pressure===0&&e.detail===0}function wz(e,t){const n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}function jE(e){const t=_.useRef(e);return lu(()=>{t.current=e}),t}const LE="data-floating-ui-safe-polygon";function Hh(e,t,n){return n&&!wz(n)?0:typeof e=="number"?e:e?.[t]}const FQ=function(e,t){let{enabled:n=!0,delay:r=0,handleClose:o=null,mouseOnly:i=!1,restMs:s=0,move:a=!0}=t===void 0?{}:t;const{open:c,onOpenChange:u,dataRef:f,events:p,elements:{domReference:g,floating:v},refs:y}=e,w=gP(),P=yz(),x=jE(o),S=jE(r),O=_.useRef(),E=_.useRef(),$=_.useRef(),N=_.useRef(),I=_.useRef(!0),R=_.useRef(!1),B=_.useRef(()=>{}),z=_.useCallback(()=>{var V;const H=(V=f.current.openEvent)==null?void 0:V.type;return H?.includes("mouse")&&H!=="mousedown"},[f]);_.useEffect(()=>{if(!n)return;function V(){clearTimeout(E.current),clearTimeout(N.current),I.current=!0}return p.on("dismiss",V),()=>{p.off("dismiss",V)}},[n,p]),_.useEffect(()=>{if(!n||!x.current||!c)return;function V(){z()&&u(!1)}const H=Xs(v).documentElement;return H.addEventListener("mouseleave",V),()=>{H.removeEventListener("mouseleave",V)}},[v,c,u,n,x,f,z]);const G=_.useCallback(function(V){V===void 0&&(V=!0);const H=Hh(S.current,"close",O.current);H&&!$.current?(clearTimeout(E.current),E.current=setTimeout(()=>u(!1),H)):V&&(clearTimeout(E.current),u(!1))},[S,u]),X=_.useCallback(()=>{B.current(),$.current=void 0},[]),Q=_.useCallback(()=>{if(R.current){const V=Xs(y.floating.current).body;V.style.pointerEvents="",V.removeAttribute(LE),R.current=!1}},[y]);return _.useEffect(()=>{if(!n)return;function V(){return f.current.openEvent?["click","mousedown"].includes(f.current.openEvent.type):!1}function H(j){if(clearTimeout(E.current),I.current=!1,i&&!wz(O.current)||s>0&&Hh(S.current,"open")===0)return;f.current.openEvent=j;const U=Hh(S.current,"open",O.current);U?E.current=setTimeout(()=>{u(!0)},U):u(!0)}function Z(j){if(V())return;B.current();const U=Xs(v);if(clearTimeout(N.current),x.current){c||clearTimeout(E.current),$.current=x.current({...e,tree:w,x:j.clientX,y:j.clientY,onClose(){Q(),X(),G()}});const F=$.current;U.addEventListener("mousemove",F),B.current=()=>{U.removeEventListener("mousemove",F)};return}G()}function Y(j){V()||x.current==null||x.current({...e,tree:w,x:j.clientX,y:j.clientY,onClose(){Q(),X(),G()}})(j)}if(Ei(g)){const j=g;return c&&j.addEventListener("mouseleave",Y),v?.addEventListener("mouseleave",Y),a&&j.addEventListener("mousemove",H,{once:!0}),j.addEventListener("mouseenter",H),j.addEventListener("mouseleave",Z),()=>{c&&j.removeEventListener("mouseleave",Y),v?.removeEventListener("mouseleave",Y),a&&j.removeEventListener("mousemove",H),j.removeEventListener("mouseenter",H),j.removeEventListener("mouseleave",Z)}}},[g,v,n,e,i,s,a,G,X,Q,u,c,w,S,x,f]),lu(()=>{var V;if(n&&c&&(V=x.current)!=null&&V.__options.blockPointerEvents&&z()){const Y=Xs(v).body;if(Y.setAttribute(LE,""),Y.style.pointerEvents="none",R.current=!0,Ei(g)&&v){var H,Z;const j=g,U=w==null||(H=w.nodesRef.current.find(F=>F.id===P))==null||(Z=H.context)==null?void 0:Z.elements.floating;return U&&(U.style.pointerEvents=""),j.style.pointerEvents="auto",v.style.pointerEvents="auto",()=>{j.style.pointerEvents="",v.style.pointerEvents=""}}}},[n,c,P,v,g,w,x,f,z]),lu(()=>{c||(O.current=void 0,X(),Q())},[c,X,Q]),_.useEffect(()=>()=>{X(),clearTimeout(E.current),clearTimeout(N.current),Q()},[n,X,Q]),_.useMemo(()=>{if(!n)return{};function V(H){O.current=H.pointerType}return{reference:{onPointerDown:V,onPointerEnter:V,onMouseMove(){c||s===0||(clearTimeout(N.current),N.current=setTimeout(()=>{I.current||u(!0)},s))}},floating:{onMouseEnter(){clearTimeout(E.current)},onMouseLeave(){p.emit("dismiss",{type:"mouseLeave",data:{returnFocus:!1}}),G(!1)}}}},[p,n,s,c,u,G])},bz=_.createContext({delay:0,initialDelay:0,timeoutMs:0,currentId:null,setCurrentId:()=>{},setState:()=>{},isInstantPhase:!1}),xz=()=>_.useContext(bz),VQ=e=>{let{children:t,delay:n,timeoutMs:r=0}=e;const[o,i]=_.useReducer((c,u)=>({...c,...u}),{delay:n,timeoutMs:r,initialDelay:n,currentId:null,isInstantPhase:!1}),s=_.useRef(null),a=_.useCallback(c=>{i({currentId:c})},[]);return lu(()=>{o.currentId?s.current===null?s.current=o.currentId:i({isInstantPhase:!0}):(i({isInstantPhase:!1}),s.current=null)},[o.currentId]),_.createElement(bz.Provider,{value:_.useMemo(()=>({...o,setState:i,setCurrentId:a}),[o,i,a])},t)},HQ=(e,t)=>{let{open:n,onOpenChange:r}=e,{id:o}=t;const{currentId:i,setCurrentId:s,initialDelay:a,setState:c,timeoutMs:u}=xz();_.useEffect(()=>{i&&(c({delay:{open:1,close:Hh(a,"close")}}),i!==o&&r(!1))},[o,r,c,i,a]),_.useEffect(()=>{function f(){r(!1),c({delay:a,currentId:null})}if(!n&&i===o)if(u){const p=window.setTimeout(f,u);return()=>{clearTimeout(p)}}else f()},[n,c,i,o,r,a,u]),_.useEffect(()=>{n&&s(o)},[n,s,o])};function WQ(e){let t=e.activeElement;for(;((n=t)==null||(r=n.shadowRoot)==null?void 0:r.activeElement)!=null;){var n,r;t=t.shadowRoot.activeElement}return t}function DE(e,t){if(!e||!t)return!1;const n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&zQ(n)){let r=t;do{if(r&&e===r)return!0;r=r.parentNode||r.host}while(r)}return!1}function M_(e,t){let n=e.filter(o=>{var i;return o.parentId===t&&((i=o.context)==null?void 0:i.open)})||[],r=n;for(;r.length;)r=e.filter(o=>{var i;return(i=r)==null?void 0:i.some(s=>{var a;return o.parentId===s.id&&((a=o.context)==null?void 0:a.open)})})||[],n=n.concat(r);return n}function UQ(e){return"composedPath"in e?e.composedPath()[0]:e.target}const ZQ=Zd["useInsertionEffect".toString()],GQ=ZQ||(e=>e());function Sz(e){const t=_.useRef(()=>{});return GQ(()=>{t.current=e}),_.useCallback(function(){for(var n=arguments.length,r=new Array(n),o=0;o!1),$=typeof g=="function"?E:g,N=_.useRef(!1),{escapeKeyBubbles:I,outsidePressBubbles:R}=qQ(x);return _.useEffect(()=>{if(!n||!f)return;u.current.__escapeKeyBubbles=I,u.current.__outsidePressBubbles=R;function B(V){if(V.key==="Escape"){const H=S?M_(S.nodesRef.current,i):[];if(H.length>0){let Z=!0;if(H.forEach(Y=>{var j;if((j=Y.context)!=null&&j.open&&!Y.context.dataRef.current.__escapeKeyBubbles){Z=!1;return}}),!Z)return}o.emit("dismiss",{type:"escapeKey",data:{returnFocus:{preventScroll:!1}}}),r(!1)}}function z(V){const H=N.current;if(N.current=!1,H||typeof $=="function"&&!$(V))return;const Z=UQ(V);if(_z(Z)&&c){const U=c.ownerDocument.defaultView||window,F=Z.scrollWidth>Z.clientWidth,K=Z.scrollHeight>Z.clientHeight;let ee=K&&V.offsetX>Z.clientWidth;if(K&&U.getComputedStyle(Z).direction==="rtl"&&(ee=V.offsetX<=Z.offsetWidth-Z.clientWidth),ee||F&&V.offsetY>Z.clientHeight)return}const Y=S&&M_(S.nodesRef.current,i).some(U=>{var F;return Wh(V,(F=U.context)==null?void 0:F.elements.floating)});if(Wh(V,c)||Wh(V,a)||Y)return;const j=S?M_(S.nodesRef.current,i):[];if(j.length>0){let U=!0;if(j.forEach(F=>{var K;if((K=F.context)!=null&&K.open&&!F.context.dataRef.current.__outsidePressBubbles){U=!1;return}}),!U)return}o.emit("dismiss",{type:"outsidePress",data:{returnFocus:O?{preventScroll:!0}:AQ(V)||BQ(V)}}),r(!1)}function G(){r(!1)}const X=Xs(c);p&&X.addEventListener("keydown",B),$&&X.addEventListener(v,z);let Q=[];return P&&(Ei(a)&&(Q=us(a)),Ei(c)&&(Q=Q.concat(us(c))),!Ei(s)&&s&&s.contextElement&&(Q=Q.concat(us(s.contextElement)))),Q=Q.filter(V=>{var H;return V!==((H=X.defaultView)==null?void 0:H.visualViewport)}),Q.forEach(V=>{V.addEventListener("scroll",G,{passive:!0})}),()=>{p&&X.removeEventListener("keydown",B),$&&X.removeEventListener(v,z),Q.forEach(V=>{V.removeEventListener("scroll",G)})}},[u,c,a,s,p,$,v,o,S,i,n,r,P,f,I,R,O]),_.useEffect(()=>{N.current=!1},[$,v]),_.useMemo(()=>f?{reference:{[YQ[w]]:()=>{y&&(o.emit("dismiss",{type:"referencePress",data:{returnFocus:!1}}),r(!1))}},floating:{[KQ[v]]:()=>{N.current=!0}}}:{},[f,o,y,v,w,r])},XQ=function(e,t){let{open:n,onOpenChange:r,dataRef:o,events:i,refs:s,elements:{floating:a,domReference:c}}=e,{enabled:u=!0,keyboardOnly:f=!0}=t===void 0?{}:t;const p=_.useRef(""),g=_.useRef(!1),v=_.useRef();return _.useEffect(()=>{if(!u)return;const w=Xs(a).defaultView||window;function P(){!n&&_z(c)&&c===WQ(Xs(c))&&(g.current=!0)}return w.addEventListener("blur",P),()=>{w.removeEventListener("blur",P)}},[a,c,n,u]),_.useEffect(()=>{if(!u)return;function y(w){(w.type==="referencePress"||w.type==="escapeKey")&&(g.current=!0)}return i.on("dismiss",y),()=>{i.off("dismiss",y)}},[i,u]),_.useEffect(()=>()=>{clearTimeout(v.current)},[]),_.useMemo(()=>u?{reference:{onPointerDown(y){let{pointerType:w}=y;p.current=w,g.current=!!(w&&f)},onMouseLeave(){g.current=!1},onFocus(y){var w;g.current||y.type==="focus"&&((w=o.current.openEvent)==null?void 0:w.type)==="mousedown"&&o.current.openEvent&&Wh(o.current.openEvent,c)||(o.current.openEvent=y.nativeEvent,r(!0))},onBlur(y){g.current=!1;const w=y.relatedTarget,P=Ei(w)&&w.hasAttribute("data-floating-ui-focus-guard")&&w.getAttribute("data-type")==="outside";v.current=setTimeout(()=>{DE(s.floating.current,w)||DE(c,w)||P||r(!1)})}}}:{},[u,f,c,s,o,r])},QQ=function(e,t){let{open:n}=e,{enabled:r=!0,role:o="dialog"}=t===void 0?{}:t;const i=IE(),s=IE();return _.useMemo(()=>{const a={id:i,role:o};return r?o==="tooltip"?{reference:{"aria-describedby":n?i:void 0},floating:a}:{reference:{"aria-expanded":n?"true":"false","aria-haspopup":o==="alertdialog"?"dialog":o,"aria-controls":n?i:void 0,...o==="listbox"&&{role:"combobox"},...o==="menu"&&{id:s}},floating:{...a,...o==="menu"&&{"aria-labelledby":s}}}:{}},[r,o,n,i,s])};function yP(e){e===void 0&&(e={});const{open:t=!1,onOpenChange:n,nodeId:r}=e,o=$Q(e),i=gP(),s=_.useRef(null),a=_.useRef({}),c=_.useState(()=>IQ())[0],[u,f]=_.useState(null),p=_.useCallback(x=>{const S=Ei(x)?{getBoundingClientRect:()=>x.getBoundingClientRect(),contextElement:x}:x;o.refs.setReference(S)},[o.refs]),g=_.useCallback(x=>{(Ei(x)||x===null)&&(s.current=x,f(x)),(Ei(o.refs.reference.current)||o.refs.reference.current===null||x!==null&&!Ei(x))&&o.refs.setReference(x)},[o.refs]),v=_.useMemo(()=>({...o.refs,setReference:g,setPositionReference:p,domReference:s}),[o.refs,g,p]),y=_.useMemo(()=>({...o.elements,domReference:u}),[o.elements,u]),w=Sz(n),P=_.useMemo(()=>({...o,refs:v,elements:y,dataRef:a,nodeId:r,events:c,open:t,onOpenChange:w}),[o,r,c,t,w,v,y]);return lu(()=>{const x=i?.nodesRef.current.find(S=>S.id===r);x&&(x.context=P)}),_.useMemo(()=>({...o,context:P,refs:v,reference:g,positionReference:p}),[o,v,P,g,p])}function N_(e,t,n){const r=new Map;return{...n==="floating"&&{tabIndex:-1},...e,...t.map(o=>o?o[n]:null).concat(e).reduce((o,i)=>(i&&Object.entries(i).forEach(s=>{let[a,c]=s;if(a.indexOf("on")===0){if(r.has(a)||r.set(a,[]),typeof c=="function"){var u;(u=r.get(a))==null||u.push(c),o[a]=function(){for(var f,p=arguments.length,g=new Array(p),v=0;vy(...g))}}}else o[a]=c}),o),{})}}const eee=function(e){e===void 0&&(e=[]);const t=e,n=_.useCallback(i=>N_(i,e,"reference"),t),r=_.useCallback(i=>N_(i,e,"floating"),t),o=_.useCallback(i=>N_(i,e,"item"),e.map(i=>i?.item));return _.useMemo(()=>({getReferenceProps:n,getFloatingProps:r,getItemProps:o}),[n,r,o])};function Pz({opened:e,floating:t,position:n,positionDependencies:r}){const[o,i]=_.useState(0);_.useEffect(()=>{if(t.refs.reference.current&&t.refs.floating.current)return kQ(t.refs.reference.current,t.refs.floating.current,t.update)},[t.refs.reference.current,t.refs.floating.current,e,o,n]),Fn(()=>{t.update()},r),Fn(()=>{i(s=>s+1)},[e])}function tee(e){const t=[cz(e.offset)];return e.middlewares.shift&&t.push(fP({limiter:lQ()})),e.middlewares.flip&&t.push(sz()),e.middlewares.inline&&t.push(lz()),t.push(vz({element:e.arrowRef,padding:e.arrowOffset})),t}function nee(e){const[t,n]=go({value:e.opened,defaultValue:e.defaultOpened,finalValue:!1,onChange:e.onChange}),r=()=>{var s;(s=e.onClose)==null||s.call(e),n(!1)},o=()=>{var s,a;t?((s=e.onClose)==null||s.call(e),n(!1)):((a=e.onOpen)==null||a.call(e),n(!0))},i=yP({placement:e.position,middleware:[...tee(e),...e.width==="target"?[cQ({apply({rects:s}){var a,c;Object.assign((c=(a=i.refs.floating.current)==null?void 0:a.style)!=null?c:{},{width:`${s.reference.width}px`})}})]:[]]});return Pz({opened:e.opened,position:e.position,positionDependencies:e.positionDependencies,floating:i}),Fn(()=>{var s;(s=e.onPositionChange)==null||s.call(e,i.placement)},[i.placement]),Fn(()=>{var s,a;e.opened?(a=e.onOpen)==null||a.call(e):(s=e.onClose)==null||s.call(e)},[e.opened]),{floating:i,controlled:typeof e.opened=="boolean",opened:t,onClose:r,onToggle:o}}const Oz={context:"Popover component was not found in the tree",children:"Popover.Target component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported"},[ree,Cz]=bu(Oz.context);var oee=Object.defineProperty,iee=Object.defineProperties,see=Object.getOwnPropertyDescriptors,ug=Object.getOwnPropertySymbols,kz=Object.prototype.hasOwnProperty,Ez=Object.prototype.propertyIsEnumerable,RE=(e,t,n)=>t in e?oee(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Zp=(e,t)=>{for(var n in t||(t={}))kz.call(t,n)&&RE(e,n,t[n]);if(ug)for(var n of ug(t))Ez.call(t,n)&&RE(e,n,t[n]);return e},aee=(e,t)=>iee(e,see(t)),lee=(e,t)=>{var n={};for(var r in e)kz.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&ug)for(var r of ug(e))t.indexOf(r)<0&&Ez.call(e,r)&&(n[r]=e[r]);return n};const cee={refProp:"ref",popupType:"dialog",shouldOverrideDefaultTargetId:!0},$z=_.forwardRef((e,t)=>{const n=ae("PopoverTarget",cee,e),{children:r,refProp:o,popupType:i,shouldOverrideDefaultTargetId:s}=n,a=lee(n,["children","refProp","popupType","shouldOverrideDefaultTargetId"]);if(!Nf(r))throw new Error(Oz.children);const c=a,u=Cz(),f=ws(u.reference,r.ref,t),p=u.withRoles?{"aria-haspopup":i,"aria-expanded":u.opened,"aria-controls":u.getDropdownId(),id:s?u.getTargetId():r.props.id}:{};return _.cloneElement(r,Zp(aee(Zp(Zp(Zp({},c),p),u.targetProps),{className:tS(u.targetProps.className,c.className,r.props.className),[o]:f}),u.controlled?null:{onClick:u.onToggle}))});$z.displayName="@mantine/core/PopoverTarget";var uee=ue((e,{radius:t,shadow:n})=>({dropdown:{position:"absolute",backgroundColor:e.white,background:e.colorScheme==="dark"?e.colors.dark[6]:e.white,border:`${M(1)} solid ${e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[2]}`,padding:`${e.spacing.sm} ${e.spacing.md}`,boxShadow:e.shadows[n]||n||"none",borderRadius:e.fn.radius(t),"&:focus":{outline:0}},arrow:{backgroundColor:"inherit",border:`${M(1)} solid ${e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[2]}`,zIndex:1}}));const dee=uee;var fee=Object.defineProperty,zE=Object.getOwnPropertySymbols,pee=Object.prototype.hasOwnProperty,hee=Object.prototype.propertyIsEnumerable,AE=(e,t,n)=>t in e?fee(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,ic=(e,t)=>{for(var n in t||(t={}))pee.call(t,n)&&AE(e,n,t[n]);if(zE)for(var n of zE(t))hee.call(t,n)&&AE(e,n,t[n]);return e};const BE={entering:"in",entered:"in",exiting:"out",exited:"out","pre-exiting":"out","pre-entering":"out"};function mee({transition:e,state:t,duration:n,timingFunction:r}){const o={transitionDuration:`${n}ms`,transitionTimingFunction:r};return typeof e=="string"?e in xp?ic(ic(ic({transitionProperty:xp[e].transitionProperty},o),xp[e].common),xp[e][BE[t]]):null:ic(ic(ic({transitionProperty:e.transitionProperty},o),e.common),e[BE[t]])}function gee({duration:e,exitDuration:t,timingFunction:n,mounted:r,onEnter:o,onExit:i,onEntered:s,onExited:a}){const c=ir(),u=fS(),f=c.respectReducedMotion?u:!1,[p,g]=_.useState(f?0:e),[v,y]=_.useState(r?"entered":"exited"),w=_.useRef(-1),P=x=>{const S=x?o:i,O=x?s:a;y(x?"pre-entering":"pre-exiting"),window.clearTimeout(w.current);const E=f?0:x?e:t;if(g(E),E===0)typeof S=="function"&&S(),typeof O=="function"&&O(),y(x?"entered":"exited");else{const $=window.setTimeout(()=>{typeof S=="function"&&S(),y(x?"entering":"exiting")},10);w.current=window.setTimeout(()=>{window.clearTimeout($),typeof O=="function"&&O(),y(x?"entered":"exited")},E)}};return Fn(()=>{P(r)},[r]),_.useEffect(()=>()=>window.clearTimeout(w.current),[]),{transitionDuration:p,transitionStatus:v,transitionTimingFunction:n||c.transitionTimingFunction}}function Os({keepMounted:e,transition:t,duration:n=250,exitDuration:r=n,mounted:o,children:i,timingFunction:s,onExit:a,onEntered:c,onEnter:u,onExited:f}){const{transitionDuration:p,transitionStatus:g,transitionTimingFunction:v}=gee({mounted:o,exitDuration:r,duration:n,timingFunction:s,onExit:a,onEntered:c,onEnter:u,onExited:f});return p===0?o?k.createElement(k.Fragment,null,i({})):e?i({display:"none"}):null:g==="exited"?e?i({display:"none"}):null:k.createElement(k.Fragment,null,i(mee({transition:t,duration:p,state:g,timingFunction:v})))}Os.displayName="@mantine/core/Transition";function _P({children:e,active:t=!0,refProp:n="ref"}){const r=SG(t),o=ws(r,e?.ref);return Nf(e)?_.cloneElement(e,{[n]:o}):e}_P.displayName="@mantine/core/FocusTrap";var vee=Object.defineProperty,yee=Object.defineProperties,_ee=Object.getOwnPropertyDescriptors,FE=Object.getOwnPropertySymbols,wee=Object.prototype.hasOwnProperty,bee=Object.prototype.propertyIsEnumerable,VE=(e,t,n)=>t in e?vee(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Ts=(e,t)=>{for(var n in t||(t={}))wee.call(t,n)&&VE(e,n,t[n]);if(FE)for(var n of FE(t))bee.call(t,n)&&VE(e,n,t[n]);return e},Gp=(e,t)=>yee(e,_ee(t));function HE(e,t,n,r){return e==="center"||r==="center"?{top:t}:e==="end"?{bottom:n}:e==="start"?{top:n}:{}}function WE(e,t,n,r,o){return e==="center"||r==="center"?{left:t}:e==="end"?{[o==="ltr"?"right":"left"]:n}:e==="start"?{[o==="ltr"?"left":"right"]:n}:{}}const xee={bottom:"borderTopLeftRadius",left:"borderTopRightRadius",right:"borderBottomLeftRadius",top:"borderBottomRightRadius"};function See({position:e,arrowSize:t,arrowOffset:n,arrowRadius:r,arrowPosition:o,arrowX:i,arrowY:s,dir:a}){const[c,u="center"]=e.split("-"),f={width:M(t),height:M(t),transform:"rotate(45deg)",position:"absolute",[xee[c]]:M(r)},p=M(-t/2);return c==="left"?Gp(Ts(Ts({},f),HE(u,s,n,o)),{right:p,borderLeftColor:"transparent",borderBottomColor:"transparent"}):c==="right"?Gp(Ts(Ts({},f),HE(u,s,n,o)),{left:p,borderRightColor:"transparent",borderTopColor:"transparent"}):c==="top"?Gp(Ts(Ts({},f),WE(u,i,n,o,a)),{bottom:p,borderTopColor:"transparent",borderLeftColor:"transparent"}):c==="bottom"?Gp(Ts(Ts({},f),WE(u,i,n,o,a)),{top:p,borderBottomColor:"transparent",borderRightColor:"transparent"}):{}}var Pee=Object.defineProperty,Oee=Object.defineProperties,Cee=Object.getOwnPropertyDescriptors,dg=Object.getOwnPropertySymbols,Mz=Object.prototype.hasOwnProperty,Nz=Object.prototype.propertyIsEnumerable,UE=(e,t,n)=>t in e?Pee(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,kee=(e,t)=>{for(var n in t||(t={}))Mz.call(t,n)&&UE(e,n,t[n]);if(dg)for(var n of dg(t))Nz.call(t,n)&&UE(e,n,t[n]);return e},Eee=(e,t)=>Oee(e,Cee(t)),$ee=(e,t)=>{var n={};for(var r in e)Mz.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&dg)for(var r of dg(e))t.indexOf(r)<0&&Nz.call(e,r)&&(n[r]=e[r]);return n};const wP=_.forwardRef((e,t)=>{var n=e,{position:r,arrowSize:o,arrowOffset:i,arrowRadius:s,arrowPosition:a,visible:c,arrowX:u,arrowY:f}=n,p=$ee(n,["position","arrowSize","arrowOffset","arrowRadius","arrowPosition","visible","arrowX","arrowY"]);const g=ir();return c?k.createElement("div",Eee(kee({},p),{ref:t,style:See({position:r,arrowSize:o,arrowOffset:i,arrowRadius:s,arrowPosition:a,dir:g.dir,arrowX:u,arrowY:f})})):null});wP.displayName="@mantine/core/FloatingArrow";var Mee=Object.defineProperty,Nee=Object.defineProperties,Tee=Object.getOwnPropertyDescriptors,fg=Object.getOwnPropertySymbols,Tz=Object.prototype.hasOwnProperty,Iz=Object.prototype.propertyIsEnumerable,ZE=(e,t,n)=>t in e?Mee(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,sc=(e,t)=>{for(var n in t||(t={}))Tz.call(t,n)&&ZE(e,n,t[n]);if(fg)for(var n of fg(t))Iz.call(t,n)&&ZE(e,n,t[n]);return e},Yp=(e,t)=>Nee(e,Tee(t)),Iee=(e,t)=>{var n={};for(var r in e)Tz.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&fg)for(var r of fg(e))t.indexOf(r)<0&&Iz.call(e,r)&&(n[r]=e[r]);return n};const jee={};function jz(e){var t;const n=ae("PopoverDropdown",jee,e),{style:r,className:o,children:i,onKeyDownCapture:s}=n,a=Iee(n,["style","className","children","onKeyDownCapture"]),c=Cz(),{classes:u,cx:f}=dee({radius:c.radius,shadow:c.shadow},{name:c.__staticSelector,classNames:c.classNames,styles:c.styles,unstyled:c.unstyled,variant:c.variant}),p=A3({opened:c.opened,shouldReturnFocus:c.returnFocus}),g=c.withRoles?{"aria-labelledby":c.getTargetId(),id:c.getDropdownId(),role:"dialog"}:{};return c.disabled?null:k.createElement(Af,Yp(sc({},c.portalProps),{withinPortal:c.withinPortal}),k.createElement(Os,Yp(sc({mounted:c.opened},c.transitionProps),{transition:c.transitionProps.transition||"fade",duration:(t=c.transitionProps.duration)!=null?t:150,keepMounted:c.keepMounted,exitDuration:typeof c.transitionProps.exitDuration=="number"?c.transitionProps.exitDuration:c.transitionProps.duration}),v=>{var y,w;return k.createElement(_P,{active:c.trapFocus},k.createElement(Pe,sc(Yp(sc({},g),{tabIndex:-1,ref:c.floating,style:Yp(sc(sc({},r),v),{zIndex:c.zIndex,top:(y=c.y)!=null?y:0,left:(w=c.x)!=null?w:0,width:c.width==="target"?void 0:M(c.width)}),className:f(u.dropdown,o),onKeyDownCapture:HW(c.onClose,{active:c.closeOnEscape,onTrigger:p,onKeyDown:s}),"data-position":c.placement}),a),i,k.createElement(wP,{ref:c.arrowRef,arrowX:c.arrowX,arrowY:c.arrowY,visible:c.withArrow,position:c.placement,arrowSize:c.arrowSize,arrowRadius:c.arrowRadius,arrowOffset:c.arrowOffset,arrowPosition:c.arrowPosition,className:u.arrow})))}))}jz.displayName="@mantine/core/PopoverDropdown";function Lz(e,t){if(e==="rtl"&&(t.includes("right")||t.includes("left"))){const[n,r]=t.split("-"),o=n==="right"?"left":"right";return r===void 0?o:`${o}-${r}`}return t}var GE=Object.getOwnPropertySymbols,Lee=Object.prototype.hasOwnProperty,Dee=Object.prototype.propertyIsEnumerable,Ree=(e,t)=>{var n={};for(var r in e)Lee.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&GE)for(var r of GE(e))t.indexOf(r)<0&&Dee.call(e,r)&&(n[r]=e[r]);return n};const zee={position:"bottom",offset:8,positionDependencies:[],transitionProps:{transition:"fade",duration:150},middlewares:{flip:!0,shift:!0,inline:!1},arrowSize:7,arrowOffset:5,arrowRadius:0,arrowPosition:"side",closeOnClickOutside:!0,withinPortal:!1,closeOnEscape:!0,trapFocus:!1,withRoles:!0,returnFocus:!1,clickOutsideEvents:["mousedown","touchstart"],zIndex:ii("popover"),__staticSelector:"Popover",width:"max-content"};function kn(e){var t,n,r,o,i,s;const a=_.useRef(null),c=ae("Popover",zee,e),{children:u,position:f,offset:p,onPositionChange:g,positionDependencies:v,opened:y,transitionProps:w,width:P,middlewares:x,withArrow:S,arrowSize:O,arrowOffset:E,arrowRadius:$,arrowPosition:N,unstyled:I,classNames:R,styles:B,closeOnClickOutside:z,withinPortal:G,portalProps:X,closeOnEscape:Q,clickOutsideEvents:V,trapFocus:H,onClose:Z,onOpen:Y,onChange:j,zIndex:U,radius:F,shadow:K,id:ee,defaultOpened:fe,__staticSelector:ie,withRoles:J,disabled:ne,returnFocus:le,variant:_e,keepMounted:Ne}=c,we=Ree(c,["children","position","offset","onPositionChange","positionDependencies","opened","transitionProps","width","middlewares","withArrow","arrowSize","arrowOffset","arrowRadius","arrowPosition","unstyled","classNames","styles","closeOnClickOutside","withinPortal","portalProps","closeOnEscape","clickOutsideEvents","trapFocus","onClose","onOpen","onChange","zIndex","radius","shadow","id","defaultOpened","__staticSelector","withRoles","disabled","returnFocus","variant","keepMounted"]),[He,Te]=_.useState(null),[je,it]=_.useState(null),bt=$a(ee),_n=ir(),pt=nee({middlewares:x,width:P,position:Lz(_n.dir,f),offset:typeof p=="number"?p+(S?O/2:0):p,arrowRef:a,arrowOffset:E,onPositionChange:g,positionDependencies:v,opened:y,defaultOpened:fe,onChange:j,onOpen:Y,onClose:Z});pG(()=>pt.opened&&z&&pt.onClose(),V,[He,je]);const Tn=_.useCallback(lt=>{Te(lt),pt.floating.reference(lt)},[pt.floating.reference]),kr=_.useCallback(lt=>{it(lt),pt.floating.floating(lt)},[pt.floating.floating]);return k.createElement(ree,{value:{returnFocus:le,disabled:ne,controlled:pt.controlled,reference:Tn,floating:kr,x:pt.floating.x,y:pt.floating.y,arrowX:(r=(n=(t=pt.floating)==null?void 0:t.middlewareData)==null?void 0:n.arrow)==null?void 0:r.x,arrowY:(s=(i=(o=pt.floating)==null?void 0:o.middlewareData)==null?void 0:i.arrow)==null?void 0:s.y,opened:pt.opened,arrowRef:a,transitionProps:w,width:P,withArrow:S,arrowSize:O,arrowOffset:E,arrowRadius:$,arrowPosition:N,placement:pt.floating.placement,trapFocus:H,withinPortal:G,portalProps:X,zIndex:U,radius:F,shadow:K,closeOnEscape:Q,onClose:pt.onClose,onToggle:pt.onToggle,getTargetId:()=>`${bt}-target`,getDropdownId:()=>`${bt}-dropdown`,withRoles:J,targetProps:we,__staticSelector:ie,classNames:R,styles:B,unstyled:I,variant:_e,keepMounted:Ne}},u)}kn.Target=$z;kn.Dropdown=jz;kn.displayName="@mantine/core/Popover";var Aee=Object.defineProperty,pg=Object.getOwnPropertySymbols,Dz=Object.prototype.hasOwnProperty,Rz=Object.prototype.propertyIsEnumerable,YE=(e,t,n)=>t in e?Aee(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Bee=(e,t)=>{for(var n in t||(t={}))Dz.call(t,n)&&YE(e,n,t[n]);if(pg)for(var n of pg(t))Rz.call(t,n)&&YE(e,n,t[n]);return e},Fee=(e,t)=>{var n={};for(var r in e)Dz.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&pg)for(var r of pg(e))t.indexOf(r)<0&&Rz.call(e,r)&&(n[r]=e[r]);return n};function Vee(e){var t=e,{children:n,component:r="div",maxHeight:o=220,direction:i="column",id:s,innerRef:a,__staticSelector:c,styles:u,classNames:f,unstyled:p}=t,g=Fee(t,["children","component","maxHeight","direction","id","innerRef","__staticSelector","styles","classNames","unstyled"]);const{classes:v}=JX(null,{name:c,styles:u,classNames:f,unstyled:p});return k.createElement(kn.Dropdown,Bee({p:0,onMouseDown:y=>y.preventDefault()},g),k.createElement("div",{style:{maxHeight:M(o),display:"flex"}},k.createElement(Pe,{component:r||"div",id:`${s}-items`,"aria-labelledby":`${s}-label`,role:"listbox",onMouseDown:y=>y.preventDefault(),style:{flex:1,overflowY:r!==$0?"auto":void 0},"data-combobox-popover":!0,tabIndex:-1,ref:a},k.createElement("div",{className:v.itemsWrapper,style:{flexDirection:i}},n))))}function ha({opened:e,transitionProps:t={transition:"fade",duration:0},shadow:n,withinPortal:r,portalProps:o,children:i,__staticSelector:s,onDirectionChange:a,switchDirectionOnFlip:c,zIndex:u,dropdownPosition:f,positionDependencies:p=[],classNames:g,styles:v,unstyled:y,readOnly:w,variant:P}){return k.createElement(kn,{unstyled:y,classNames:g,styles:v,width:"target",withRoles:!1,opened:e,middlewares:{flip:f==="flip",shift:!1},position:f==="flip"?"bottom":f,positionDependencies:p,zIndex:u,__staticSelector:s,withinPortal:r,portalProps:o,transitionProps:t,shadow:n,disabled:w,onPositionChange:x=>c&&a?.(x==="top"?"column-reverse":"column"),variant:P},i)}ha.Target=kn.Target;ha.Dropdown=Vee;var Hee=Object.defineProperty,Wee=Object.defineProperties,Uee=Object.getOwnPropertyDescriptors,hg=Object.getOwnPropertySymbols,zz=Object.prototype.hasOwnProperty,Az=Object.prototype.propertyIsEnumerable,KE=(e,t,n)=>t in e?Hee(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Kp=(e,t)=>{for(var n in t||(t={}))zz.call(t,n)&&KE(e,n,t[n]);if(hg)for(var n of hg(t))Az.call(t,n)&&KE(e,n,t[n]);return e},Zee=(e,t)=>Wee(e,Uee(t)),Gee=(e,t)=>{var n={};for(var r in e)zz.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&hg)for(var r of hg(e))t.indexOf(r)<0&&Az.call(e,r)&&(n[r]=e[r]);return n};function bP(e,t,n){const r=ae(e,t,n),{label:o,description:i,error:s,required:a,classNames:c,styles:u,className:f,unstyled:p,__staticSelector:g,sx:v,errorProps:y,labelProps:w,descriptionProps:P,wrapperProps:x,id:S,size:O,style:E,inputContainer:$,inputWrapperOrder:N,withAsterisk:I,variant:R}=r,B=Gee(r,["label","description","error","required","classNames","styles","className","unstyled","__staticSelector","sx","errorProps","labelProps","descriptionProps","wrapperProps","id","size","style","inputContainer","inputWrapperOrder","withAsterisk","variant"]),z=$a(S),{systemStyles:G,rest:X}=Dl(B),Q=Kp({label:o,description:i,error:s,required:a,classNames:c,className:f,__staticSelector:g,sx:v,errorProps:y,labelProps:w,descriptionProps:P,unstyled:p,styles:u,id:z,size:O,style:E,inputContainer:$,inputWrapperOrder:N,withAsterisk:I,variant:R},x);return Zee(Kp({},X),{classNames:c,styles:u,unstyled:p,wrapperProps:Kp(Kp({},Q),G),inputProps:{required:a,classNames:c,styles:u,unstyled:p,id:z,size:O,__staticSelector:g,error:s,variant:R}})}var Yee=ue((e,t,{size:n})=>({label:{display:"inline-block",fontSize:re({size:n,sizes:e.fontSizes}),fontWeight:500,color:e.colorScheme==="dark"?e.colors.dark[0]:e.colors.gray[9],wordBreak:"break-word",cursor:"default",WebkitTapHighlightColor:"transparent"},required:{color:e.fn.variant({variant:"filled",color:"red"}).background}}));const Kee=Yee;var qee=Object.defineProperty,mg=Object.getOwnPropertySymbols,Bz=Object.prototype.hasOwnProperty,Fz=Object.prototype.propertyIsEnumerable,qE=(e,t,n)=>t in e?qee(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Jee=(e,t)=>{for(var n in t||(t={}))Bz.call(t,n)&&qE(e,n,t[n]);if(mg)for(var n of mg(t))Fz.call(t,n)&&qE(e,n,t[n]);return e},Xee=(e,t)=>{var n={};for(var r in e)Bz.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&mg)for(var r of mg(e))t.indexOf(r)<0&&Fz.call(e,r)&&(n[r]=e[r]);return n};const Qee={labelElement:"label",size:"sm"},xP=_.forwardRef((e,t)=>{const n=ae("InputLabel",Qee,e),{labelElement:r,children:o,required:i,size:s,classNames:a,styles:c,unstyled:u,className:f,htmlFor:p,__staticSelector:g,variant:v,onMouseDown:y}=n,w=Xee(n,["labelElement","children","required","size","classNames","styles","unstyled","className","htmlFor","__staticSelector","variant","onMouseDown"]),{classes:P,cx:x}=Kee(null,{name:["InputWrapper",g],classNames:a,styles:c,unstyled:u,variant:v,size:s});return k.createElement(Pe,Jee({component:r,ref:t,className:x(P.label,f),htmlFor:r==="label"?p:void 0,onMouseDown:S=>{y?.(S),!S.defaultPrevented&&S.detail>1&&S.preventDefault()}},w),o,i&&k.createElement("span",{className:P.required,"aria-hidden":!0}," *"))});xP.displayName="@mantine/core/InputLabel";var ete=ue((e,t,{size:n})=>({error:{wordBreak:"break-word",color:e.fn.variant({variant:"filled",color:"red"}).background,fontSize:`calc(${re({size:n,sizes:e.fontSizes})} - ${M(2)})`,lineHeight:1.2,display:"block"}}));const tte=ete;var nte=Object.defineProperty,gg=Object.getOwnPropertySymbols,Vz=Object.prototype.hasOwnProperty,Hz=Object.prototype.propertyIsEnumerable,JE=(e,t,n)=>t in e?nte(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,rte=(e,t)=>{for(var n in t||(t={}))Vz.call(t,n)&&JE(e,n,t[n]);if(gg)for(var n of gg(t))Hz.call(t,n)&&JE(e,n,t[n]);return e},ote=(e,t)=>{var n={};for(var r in e)Vz.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&gg)for(var r of gg(e))t.indexOf(r)<0&&Hz.call(e,r)&&(n[r]=e[r]);return n};const ite={size:"sm"},SP=_.forwardRef((e,t)=>{const n=ae("InputError",ite,e),{children:r,className:o,classNames:i,styles:s,unstyled:a,size:c,__staticSelector:u,variant:f}=n,p=ote(n,["children","className","classNames","styles","unstyled","size","__staticSelector","variant"]),{classes:g,cx:v}=tte(null,{name:["InputWrapper",u],classNames:i,styles:s,unstyled:a,variant:f,size:c});return k.createElement(W,rte({className:v(g.error,o),ref:t},p),r)});SP.displayName="@mantine/core/InputError";var ste=ue((e,t,{size:n})=>({description:{wordBreak:"break-word",color:e.colorScheme==="dark"?e.colors.dark[2]:e.colors.gray[6],fontSize:`calc(${re({size:n,sizes:e.fontSizes})} - ${M(2)})`,lineHeight:1.2,display:"block"}}));const ate=ste;var lte=Object.defineProperty,vg=Object.getOwnPropertySymbols,Wz=Object.prototype.hasOwnProperty,Uz=Object.prototype.propertyIsEnumerable,XE=(e,t,n)=>t in e?lte(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,cte=(e,t)=>{for(var n in t||(t={}))Wz.call(t,n)&&XE(e,n,t[n]);if(vg)for(var n of vg(t))Uz.call(t,n)&&XE(e,n,t[n]);return e},ute=(e,t)=>{var n={};for(var r in e)Wz.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&vg)for(var r of vg(e))t.indexOf(r)<0&&Uz.call(e,r)&&(n[r]=e[r]);return n};const dte={size:"sm"},PP=_.forwardRef((e,t)=>{const n=ae("InputDescription",dte,e),{children:r,className:o,classNames:i,styles:s,unstyled:a,size:c,__staticSelector:u,variant:f}=n,p=ute(n,["children","className","classNames","styles","unstyled","size","__staticSelector","variant"]),{classes:g,cx:v}=ate(null,{name:["InputWrapper",u],classNames:i,styles:s,unstyled:a,variant:f,size:c});return k.createElement(W,cte({color:"dimmed",className:v(g.description,o),ref:t,unstyled:a},p),r)});PP.displayName="@mantine/core/InputDescription";const Zz=_.createContext({offsetBottom:!1,offsetTop:!1,describedBy:void 0}),fte=Zz.Provider,pte=()=>_.useContext(Zz);function hte(e,{hasDescription:t,hasError:n}){const r=e.findIndex(c=>c==="input"),o=e[r-1],i=e[r+1];return{offsetBottom:t&&i==="description"||n&&i==="error",offsetTop:t&&o==="description"||n&&o==="error"}}var mte=Object.defineProperty,gte=Object.defineProperties,vte=Object.getOwnPropertyDescriptors,QE=Object.getOwnPropertySymbols,yte=Object.prototype.hasOwnProperty,_te=Object.prototype.propertyIsEnumerable,e$=(e,t,n)=>t in e?mte(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,wte=(e,t)=>{for(var n in t||(t={}))yte.call(t,n)&&e$(e,n,t[n]);if(QE)for(var n of QE(t))_te.call(t,n)&&e$(e,n,t[n]);return e},bte=(e,t)=>gte(e,vte(t)),xte=ue(e=>({root:bte(wte({},e.fn.fontStyles()),{lineHeight:e.lineHeight})}));const Ste=xte;var Pte=Object.defineProperty,Ote=Object.defineProperties,Cte=Object.getOwnPropertyDescriptors,yg=Object.getOwnPropertySymbols,Gz=Object.prototype.hasOwnProperty,Yz=Object.prototype.propertyIsEnumerable,t$=(e,t,n)=>t in e?Pte(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Is=(e,t)=>{for(var n in t||(t={}))Gz.call(t,n)&&t$(e,n,t[n]);if(yg)for(var n of yg(t))Yz.call(t,n)&&t$(e,n,t[n]);return e},n$=(e,t)=>Ote(e,Cte(t)),kte=(e,t)=>{var n={};for(var r in e)Gz.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&yg)for(var r of yg(e))t.indexOf(r)<0&&Yz.call(e,r)&&(n[r]=e[r]);return n};const Ete={labelElement:"label",size:"sm",inputContainer:e=>e,inputWrapperOrder:["label","description","input","error"]},Kz=_.forwardRef((e,t)=>{const n=ae("InputWrapper",Ete,e),{className:r,label:o,children:i,required:s,id:a,error:c,description:u,labelElement:f,labelProps:p,descriptionProps:g,errorProps:v,classNames:y,styles:w,size:P,inputContainer:x,__staticSelector:S,unstyled:O,inputWrapperOrder:E,withAsterisk:$,variant:N}=n,I=kte(n,["className","label","children","required","id","error","description","labelElement","labelProps","descriptionProps","errorProps","classNames","styles","size","inputContainer","__staticSelector","unstyled","inputWrapperOrder","withAsterisk","variant"]),{classes:R,cx:B}=Ste(null,{classNames:y,styles:w,name:["InputWrapper",S],unstyled:O,variant:N,size:P}),z={classNames:y,styles:w,unstyled:O,size:P,variant:N,__staticSelector:S},G=typeof $=="boolean"?$:s,X=a?`${a}-error`:v?.id,Q=a?`${a}-description`:g?.id,H=`${!!c&&typeof c!="boolean"?X:""} ${u?Q:""}`,Z=H.trim().length>0?H.trim():void 0,Y=o&&k.createElement(xP,Is(Is({key:"label",labelElement:f,id:a?`${a}-label`:void 0,htmlFor:a,required:G},z),p),o),j=u&&k.createElement(PP,n$(Is(Is({key:"description"},g),z),{size:g?.size||z.size,id:g?.id||Q}),u),U=k.createElement(_.Fragment,{key:"input"},x(i)),F=typeof c!="boolean"&&c&&k.createElement(SP,n$(Is(Is({},v),z),{size:v?.size||z.size,key:"error",id:v?.id||X}),c),K=E.map(ee=>{switch(ee){case"label":return Y;case"input":return U;case"description":return j;case"error":return F;default:return null}});return k.createElement(fte,{value:Is({describedBy:Z},hte(E,{hasDescription:!!j,hasError:!!F}))},k.createElement(Pe,Is({className:B(R.root,r),ref:t},I),K))});Kz.displayName="@mantine/core/InputWrapper";var $te=Object.defineProperty,_g=Object.getOwnPropertySymbols,qz=Object.prototype.hasOwnProperty,Jz=Object.prototype.propertyIsEnumerable,r$=(e,t,n)=>t in e?$te(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Mte=(e,t)=>{for(var n in t||(t={}))qz.call(t,n)&&r$(e,n,t[n]);if(_g)for(var n of _g(t))Jz.call(t,n)&&r$(e,n,t[n]);return e},Nte=(e,t)=>{var n={};for(var r in e)qz.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&_g)for(var r of _g(e))t.indexOf(r)<0&&Jz.call(e,r)&&(n[r]=e[r]);return n};const Tte={},Xz=_.forwardRef((e,t)=>{const n=ae("InputPlaceholder",Tte,e),{sx:r}=n,o=Nte(n,["sx"]);return k.createElement(Pe,Mte({component:"span",sx:[i=>i.fn.placeholderStyles(),...eS(r)],ref:t},o))});Xz.displayName="@mantine/core/InputPlaceholder";var Ite=Object.defineProperty,jte=Object.defineProperties,Lte=Object.getOwnPropertyDescriptors,o$=Object.getOwnPropertySymbols,Dte=Object.prototype.hasOwnProperty,Rte=Object.prototype.propertyIsEnumerable,i$=(e,t,n)=>t in e?Ite(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,qp=(e,t)=>{for(var n in t||(t={}))Dte.call(t,n)&&i$(e,n,t[n]);if(o$)for(var n of o$(t))Rte.call(t,n)&&i$(e,n,t[n]);return e},T_=(e,t)=>jte(e,Lte(t));const Dn={xs:M(30),sm:M(36),md:M(42),lg:M(50),xl:M(60)},zte=["default","filled","unstyled"];function Ate({theme:e,variant:t}){return zte.includes(t)?t==="default"?{border:`${M(1)} solid ${e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[4]}`,backgroundColor:e.colorScheme==="dark"?e.colors.dark[6]:e.white,transition:"border-color 100ms ease","&:focus, &:focus-within":e.focusRingStyles.inputStyles(e)}:t==="filled"?{border:`${M(1)} solid transparent`,backgroundColor:e.colorScheme==="dark"?e.colors.dark[5]:e.colors.gray[1],"&:focus, &:focus-within":e.focusRingStyles.inputStyles(e)}:{borderWidth:0,color:e.colorScheme==="dark"?e.colors.dark[0]:e.black,backgroundColor:"transparent",minHeight:M(28),outline:0,"&:focus, &:focus-within":{outline:"none",borderColor:"transparent"},"&:disabled":{backgroundColor:"transparent","&:focus, &:focus-within":{outline:"none",borderColor:"transparent"}}}:null}var Bte=ue((e,{multiline:t,radius:n,invalid:r,rightSectionWidth:o,withRightSection:i,iconWidth:s,offsetBottom:a,offsetTop:c,pointer:u},{variant:f,size:p})=>{const g=e.fn.variant({variant:"filled",color:"red"}).background,v=f==="default"||f==="filled"?{minHeight:re({size:p,sizes:Dn}),paddingLeft:`calc(${re({size:p,sizes:Dn})} / 3)`,paddingRight:i?o||re({size:p,sizes:Dn}):`calc(${re({size:p,sizes:Dn})} / 3)`,borderRadius:e.fn.radius(n)}:f==="unstyled"&&i?{paddingRight:o||re({size:p,sizes:Dn})}:null;return{wrapper:{position:"relative",marginTop:c?`calc(${e.spacing.xs} / 2)`:void 0,marginBottom:a?`calc(${e.spacing.xs} / 2)`:void 0,"&:has(input:disabled)":{"& .mantine-Input-rightSection":{display:"none"}}},input:T_(qp(qp(T_(qp({},e.fn.fontStyles()),{height:t?f==="unstyled"?void 0:"auto":re({size:p,sizes:Dn}),WebkitTapHighlightColor:"transparent",lineHeight:t?e.lineHeight:`calc(${re({size:p,sizes:Dn})} - ${M(2)})`,appearance:"none",resize:"none",boxSizing:"border-box",fontSize:re({size:p,sizes:e.fontSizes}),width:"100%",color:e.colorScheme==="dark"?e.colors.dark[0]:e.black,display:"block",textAlign:"left",cursor:u?"pointer":void 0}),Ate({theme:e,variant:f})),v),{"&:disabled, &[data-disabled]":{backgroundColor:e.colorScheme==="dark"?e.colors.dark[6]:e.colors.gray[1],color:e.colors.dark[2],opacity:.6,cursor:"not-allowed",pointerEvents:"none","&::placeholder":{color:e.colors.dark[2]}},"&[data-invalid]":{color:g,borderColor:g,"&::placeholder":{opacity:1,color:g}},"&[data-with-icon]":{paddingLeft:typeof s=="number"?M(s):re({size:p,sizes:Dn})},"&::placeholder":T_(qp({},e.fn.placeholderStyles()),{opacity:1}),"&::-webkit-inner-spin-button, &::-webkit-outer-spin-button, &::-webkit-search-decoration, &::-webkit-search-cancel-button, &::-webkit-search-results-button, &::-webkit-search-results-decoration":{appearance:"none"},"&[type=number]":{MozAppearance:"textfield"}}),icon:{pointerEvents:"none",position:"absolute",zIndex:1,left:0,top:0,bottom:0,display:"flex",alignItems:"center",justifyContent:"center",width:s?M(s):re({size:p,sizes:Dn}),color:r?e.colors.red[e.colorScheme==="dark"?6:7]:e.colorScheme==="dark"?e.colors.dark[2]:e.colors.gray[5]},rightSection:{position:"absolute",top:0,bottom:0,right:0,display:"flex",alignItems:"center",justifyContent:"center",width:o||re({size:p,sizes:Dn})}}});const Fte=Bte;var Vte=Object.defineProperty,Hte=Object.defineProperties,Wte=Object.getOwnPropertyDescriptors,wg=Object.getOwnPropertySymbols,Qz=Object.prototype.hasOwnProperty,eA=Object.prototype.propertyIsEnumerable,s$=(e,t,n)=>t in e?Vte(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Jp=(e,t)=>{for(var n in t||(t={}))Qz.call(t,n)&&s$(e,n,t[n]);if(wg)for(var n of wg(t))eA.call(t,n)&&s$(e,n,t[n]);return e},a$=(e,t)=>Hte(e,Wte(t)),Ute=(e,t)=>{var n={};for(var r in e)Qz.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&wg)for(var r of wg(e))t.indexOf(r)<0&&eA.call(e,r)&&(n[r]=e[r]);return n};const Zte={size:"sm",variant:"default"},Fl=_.forwardRef((e,t)=>{const n=ae("Input",Zte,e),{className:r,error:o,required:i,disabled:s,variant:a,icon:c,style:u,rightSectionWidth:f,iconWidth:p,rightSection:g,rightSectionProps:v,radius:y,size:w,wrapperProps:P,classNames:x,styles:S,__staticSelector:O,multiline:E,sx:$,unstyled:N,pointer:I}=n,R=Ute(n,["className","error","required","disabled","variant","icon","style","rightSectionWidth","iconWidth","rightSection","rightSectionProps","radius","size","wrapperProps","classNames","styles","__staticSelector","multiline","sx","unstyled","pointer"]),{offsetBottom:B,offsetTop:z,describedBy:G}=pte(),{classes:X,cx:Q}=Fte({radius:y,multiline:E,invalid:!!o,rightSectionWidth:f?M(f):void 0,iconWidth:p,withRightSection:!!g,offsetBottom:B,offsetTop:z,pointer:I},{classNames:x,styles:S,name:["Input",O],unstyled:N,variant:a,size:w}),{systemStyles:V,rest:H}=Dl(R);return k.createElement(Pe,Jp(Jp({className:Q(X.wrapper,r),sx:$,style:u},V),P),c&&k.createElement("div",{className:X.icon},c),k.createElement(Pe,a$(Jp({component:"input"},H),{ref:t,required:i,"aria-invalid":!!o,"aria-describedby":G,disabled:s,"data-disabled":s||void 0,"data-with-icon":!!c||void 0,"data-invalid":!!o||void 0,className:X.input})),g&&k.createElement("div",a$(Jp({},v),{className:X.rightSection}),g))});Fl.displayName="@mantine/core/Input";Fl.Wrapper=Kz;Fl.Label=xP;Fl.Description=PP;Fl.Error=SP;Fl.Placeholder=Xz;const et=Fl;var Gte=Object.defineProperty,bg=Object.getOwnPropertySymbols,tA=Object.prototype.hasOwnProperty,nA=Object.prototype.propertyIsEnumerable,l$=(e,t,n)=>t in e?Gte(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Yte=(e,t)=>{for(var n in t||(t={}))tA.call(t,n)&&l$(e,n,t[n]);if(bg)for(var n of bg(t))nA.call(t,n)&&l$(e,n,t[n]);return e},Kte=(e,t)=>{var n={};for(var r in e)tA.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&bg)for(var r of bg(e))t.indexOf(r)<0&&nA.call(e,r)&&(n[r]=e[r]);return n};function qte(e){const t=e,{style:n}=t,r=Kte(t,["style"]);return k.createElement("svg",Yte({viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:n},r),k.createElement("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"}))}var Jte=Object.defineProperty,Xte=Object.defineProperties,Qte=Object.getOwnPropertyDescriptors,c$=Object.getOwnPropertySymbols,ene=Object.prototype.hasOwnProperty,tne=Object.prototype.propertyIsEnumerable,u$=(e,t,n)=>t in e?Jte(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,nne=(e,t)=>{for(var n in t||(t={}))ene.call(t,n)&&u$(e,n,t[n]);if(c$)for(var n of c$(t))tne.call(t,n)&&u$(e,n,t[n]);return e},rne=(e,t)=>Xte(e,Qte(t));const rA=_.createContext(null);function one({spacing:e,children:t}){return k.createElement(rA.Provider,{value:{spacing:e}},t)}function ine(){const e=_.useContext(rA);return e?rne(nne({},e),{withinGroup:!0}):{spacing:null,withinGroup:!1}}var sne=ue((e,{spacing:t})=>({root:{display:"flex",paddingLeft:re({size:t,sizes:e.spacing})}}));const ane=sne;var lne=Object.defineProperty,xg=Object.getOwnPropertySymbols,oA=Object.prototype.hasOwnProperty,iA=Object.prototype.propertyIsEnumerable,d$=(e,t,n)=>t in e?lne(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,cne=(e,t)=>{for(var n in t||(t={}))oA.call(t,n)&&d$(e,n,t[n]);if(xg)for(var n of xg(t))iA.call(t,n)&&d$(e,n,t[n]);return e},une=(e,t)=>{var n={};for(var r in e)oA.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&xg)for(var r of xg(e))t.indexOf(r)<0&&iA.call(e,r)&&(n[r]=e[r]);return n};const dne={},sA=_.forwardRef((e,t)=>{const n=ae("AvatarGroup",dne,e),{children:r,spacing:o="sm",unstyled:i,className:s,variant:a}=n,c=une(n,["children","spacing","unstyled","className","variant"]),{classes:u,cx:f}=ane({spacing:o},{name:"AvatarGroup",unstyled:i,variant:a});return k.createElement(one,{spacing:o},k.createElement(Pe,cne({ref:t,className:f(u.root,s)},c),r))});sA.displayName="@mantine/core/AvatarGroup";var fne=Object.defineProperty,pne=Object.defineProperties,hne=Object.getOwnPropertyDescriptors,f$=Object.getOwnPropertySymbols,mne=Object.prototype.hasOwnProperty,gne=Object.prototype.propertyIsEnumerable,p$=(e,t,n)=>t in e?fne(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,id=(e,t)=>{for(var n in t||(t={}))mne.call(t,n)&&p$(e,n,t[n]);if(f$)for(var n of f$(t))gne.call(t,n)&&p$(e,n,t[n]);return e},h$=(e,t)=>pne(e,hne(t));const vne=["filled","light","gradient","outline"],Xp={xs:M(16),sm:M(26),md:M(38),lg:M(56),xl:M(84)};function yne({withinGroup:e,spacing:t,theme:n}){return e?{marginLeft:`calc(${re({size:t,sizes:n.spacing})} * -1)`,backgroundColor:`${n.colorScheme==="dark"?n.colors.dark[7]:n.white}`,border:`${M(2)} solid ${n.colorScheme==="dark"?n.colors.dark[7]:n.white}`}:null}function _ne({theme:e,variant:t,color:n,gradient:r}){const o=e.fn.variant({variant:t,color:n,gradient:r});return vne.includes(t)?{placeholder:{color:o.color,backgroundColor:o.background,backgroundImage:t==="gradient"?o.background:void 0,border:`${M(t==="gradient"?0:1)} solid ${o.border}`},placeholderIcon:{color:o.color}}:{}}var wne=ue((e,{radius:t,withinGroup:n,spacing:r,color:o,gradient:i},{variant:s,size:a})=>{const c=_ne({theme:e,color:o,gradient:i,variant:s});return{root:id(h$(id({},e.fn.focusStyles()),{WebkitTapHighlightColor:"transparent",boxSizing:"border-box",position:"relative",display:"block",userSelect:"none",overflow:"hidden",borderRadius:e.fn.radius(t),textDecoration:"none",border:0,backgroundColor:"transparent",padding:0,width:re({size:a,sizes:Xp}),minWidth:re({size:a,sizes:Xp}),height:re({size:a,sizes:Xp})}),yne({withinGroup:n,spacing:r,theme:e})),image:{objectFit:"cover",width:"100%",height:"100%",display:"block"},placeholder:id(h$(id({},e.fn.fontStyles()),{fontWeight:700,display:"flex",alignItems:"center",justifyContent:"center",width:"100%",height:"100%",userSelect:"none",borderRadius:e.fn.radius(t),fontSize:`calc(${re({size:a,sizes:Xp})} / 2.5)`}),c.placeholder),placeholderIcon:id({width:"70%",height:"70%"},c.placeholderIcon)}});const bne=wne;var xne=Object.defineProperty,Sne=Object.defineProperties,Pne=Object.getOwnPropertyDescriptors,Sg=Object.getOwnPropertySymbols,aA=Object.prototype.hasOwnProperty,lA=Object.prototype.propertyIsEnumerable,m$=(e,t,n)=>t in e?xne(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,g$=(e,t)=>{for(var n in t||(t={}))aA.call(t,n)&&m$(e,n,t[n]);if(Sg)for(var n of Sg(t))lA.call(t,n)&&m$(e,n,t[n]);return e},One=(e,t)=>Sne(e,Pne(t)),Cne=(e,t)=>{var n={};for(var r in e)aA.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Sg)for(var r of Sg(e))t.indexOf(r)<0&&lA.call(e,r)&&(n[r]=e[r]);return n};const kne={size:"md",color:"gray",variant:"light"},OP=_.forwardRef((e,t)=>{const n=ae("Avatar",kne,e),{className:r,size:o,src:i,alt:s,radius:a,children:c,color:u,variant:f,gradient:p,classNames:g,styles:v,imageProps:y,unstyled:w}=n,P=Cne(n,["className","size","src","alt","radius","children","color","variant","gradient","classNames","styles","imageProps","unstyled"]),x=ine(),[S,O]=_.useState(!i),{classes:E,cx:$}=bne({color:u,radius:a,withinGroup:x.withinGroup,spacing:x.spacing,gradient:p},{classNames:g,styles:v,unstyled:w,name:"Avatar",variant:f,size:o});return _.useEffect(()=>{O(!i)},[i]),k.createElement(Pe,g$({component:"div",className:$(E.root,r),ref:t},P),S?k.createElement("div",{className:E.placeholder,title:s},c||k.createElement(qte,{className:E.placeholderIcon})):k.createElement("img",One(g$({},y),{className:E.image,src:i,alt:s,onError:()=>O(!0)})))});OP.displayName="@mantine/core/Avatar";OP.Group=sA;const CP=OP;var Ene=Object.defineProperty,$ne=Object.defineProperties,Mne=Object.getOwnPropertyDescriptors,v$=Object.getOwnPropertySymbols,Nne=Object.prototype.hasOwnProperty,Tne=Object.prototype.propertyIsEnumerable,y$=(e,t,n)=>t in e?Ene(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,I_=(e,t)=>{for(var n in t||(t={}))Nne.call(t,n)&&y$(e,n,t[n]);if(v$)for(var n of v$(t))Tne.call(t,n)&&y$(e,n,t[n]);return e},Ine=(e,t)=>$ne(e,Mne(t));const jne=["light","filled","outline","dot","gradient"],j_={xs:{fontSize:M(9),height:M(16)},sm:{fontSize:M(10),height:M(18)},md:{fontSize:M(11),height:M(20)},lg:{fontSize:M(13),height:M(26)},xl:{fontSize:M(16),height:M(32)}},Lne={xs:M(4),sm:M(4),md:M(6),lg:M(8),xl:M(10)};function Dne({theme:e,variant:t,color:n,size:r,gradient:o}){if(!jne.includes(t))return null;if(t==="dot"){const s=re({size:r,sizes:Lne});return{backgroundColor:"transparent",color:e.colorScheme==="dark"?e.colors.dark[0]:e.colors.gray[7],border:`${M(1)} solid ${e.colorScheme==="dark"?e.colors.dark[3]:e.colors.gray[3]}`,paddingLeft:`calc(${re({size:r,sizes:e.spacing})} / 1.5 - ${s} / 2)`,"&::before":{content:'""',display:"block",width:s,height:s,borderRadius:s,backgroundColor:e.fn.themeColor(n,e.colorScheme==="dark"?4:e.fn.primaryShade("light"),!0),marginRight:s}}}const i=e.fn.variant({color:n,variant:t,gradient:o});return{background:i.background,color:i.color,border:`${M(t==="gradient"?0:1)} solid ${i.border}`}}var Rne=ue((e,{color:t,radius:n,gradient:r,fullWidth:o},{variant:i,size:s})=>{const{fontSize:a,height:c}=s in j_?j_[s]:j_.md;return{leftSection:{marginRight:`calc(${e.spacing.xs} / 2)`},rightSection:{marginLeft:`calc(${e.spacing.xs} / 2)`},inner:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},root:I_(Ine(I_(I_({},e.fn.focusStyles()),e.fn.fontStyles()),{fontSize:a,height:c,WebkitTapHighlightColor:"transparent",lineHeight:`calc(${c} - ${M(2)})`,textDecoration:"none",padding:`0 calc(${re({size:s,sizes:e.spacing})} / 1.5)`,boxSizing:"border-box",display:o?"flex":"inline-flex",alignItems:"center",justifyContent:"center",width:o?"100%":"auto",textTransform:"uppercase",borderRadius:e.fn.radius(n),fontWeight:700,letterSpacing:M(.25),cursor:"inherit",textOverflow:"ellipsis",overflow:"hidden"}),Dne({theme:e,variant:i,color:t,size:s,gradient:r}))}});const zne=Rne;var Ane=Object.defineProperty,Pg=Object.getOwnPropertySymbols,cA=Object.prototype.hasOwnProperty,uA=Object.prototype.propertyIsEnumerable,_$=(e,t,n)=>t in e?Ane(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Bne=(e,t)=>{for(var n in t||(t={}))cA.call(t,n)&&_$(e,n,t[n]);if(Pg)for(var n of Pg(t))uA.call(t,n)&&_$(e,n,t[n]);return e},Fne=(e,t)=>{var n={};for(var r in e)cA.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Pg)for(var r of Pg(e))t.indexOf(r)<0&&uA.call(e,r)&&(n[r]=e[r]);return n};const Vne={variant:"light",size:"md",radius:"xl"},dA=_.forwardRef((e,t)=>{const n=ae("Badge",Vne,e),{className:r,color:o,variant:i,fullWidth:s,children:a,size:c,leftSection:u,rightSection:f,radius:p,gradient:g,classNames:v,styles:y,unstyled:w}=n,P=Fne(n,["className","color","variant","fullWidth","children","size","leftSection","rightSection","radius","gradient","classNames","styles","unstyled"]),{classes:x,cx:S}=zne({fullWidth:s,color:o,radius:p,gradient:g},{classNames:v,styles:y,name:"Badge",unstyled:w,variant:i,size:c});return k.createElement(Pe,Bne({className:S(x.root,r),ref:t},P),u&&k.createElement("span",{className:x.leftSection},u),k.createElement("span",{className:x.inner},a),f&&k.createElement("span",{className:x.rightSection},f))});dA.displayName="@mantine/core/Badge";const mt=dA;var Hne=ue((e,{orientation:t,buttonBorderWidth:n})=>({root:{display:"flex",flexDirection:t==="vertical"?"column":"row","& [data-button]":{"&:first-of-type:not(:last-of-type)":{borderBottomRightRadius:0,[t==="vertical"?"borderBottomLeftRadius":"borderTopRightRadius"]:0,[t==="vertical"?"borderBottomWidth":"borderRightWidth"]:`calc(${M(n)} / 2)`},"&:last-of-type:not(:first-of-type)":{borderTopLeftRadius:0,[t==="vertical"?"borderTopRightRadius":"borderBottomLeftRadius"]:0,[t==="vertical"?"borderTopWidth":"borderLeftWidth"]:`calc(${M(n)} / 2)`},"&:not(:first-of-type):not(:last-of-type)":{borderRadius:0,[t==="vertical"?"borderTopWidth":"borderLeftWidth"]:`calc(${M(n)} / 2)`,[t==="vertical"?"borderBottomWidth":"borderRightWidth"]:`calc(${M(n)} / 2)`},"& + [data-button]":{[t==="vertical"?"marginTop":"marginLeft"]:`calc(${n} * -1)`,"@media (min-resolution: 192dpi)":{[t==="vertical"?"marginTop":"marginLeft"]:0}}}}}));const Wne=Hne;var Une=Object.defineProperty,Og=Object.getOwnPropertySymbols,fA=Object.prototype.hasOwnProperty,pA=Object.prototype.propertyIsEnumerable,w$=(e,t,n)=>t in e?Une(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Zne=(e,t)=>{for(var n in t||(t={}))fA.call(t,n)&&w$(e,n,t[n]);if(Og)for(var n of Og(t))pA.call(t,n)&&w$(e,n,t[n]);return e},Gne=(e,t)=>{var n={};for(var r in e)fA.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Og)for(var r of Og(e))t.indexOf(r)<0&&pA.call(e,r)&&(n[r]=e[r]);return n};const Yne={orientation:"horizontal",buttonBorderWidth:1},hA=_.forwardRef((e,t)=>{const n=ae("ButtonGroup",Yne,e),{className:r,orientation:o,buttonBorderWidth:i,unstyled:s}=n,a=Gne(n,["className","orientation","buttonBorderWidth","unstyled"]),{classes:c,cx:u}=Wne({orientation:o,buttonBorderWidth:i},{name:"ButtonGroup",unstyled:s});return k.createElement(Pe,Zne({className:u(c.root,r),ref:t},a))});hA.displayName="@mantine/core/ButtonGroup";var Kne=Object.defineProperty,qne=Object.defineProperties,Jne=Object.getOwnPropertyDescriptors,b$=Object.getOwnPropertySymbols,Xne=Object.prototype.hasOwnProperty,Qne=Object.prototype.propertyIsEnumerable,x$=(e,t,n)=>t in e?Kne(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,ns=(e,t)=>{for(var n in t||(t={}))Xne.call(t,n)&&x$(e,n,t[n]);if(b$)for(var n of b$(t))Qne.call(t,n)&&x$(e,n,t[n]);return e},Uh=(e,t)=>qne(e,Jne(t));const ere=["filled","outline","light","white","default","subtle","gradient"],qb={xs:{height:Dn.xs,paddingLeft:M(14),paddingRight:M(14)},sm:{height:Dn.sm,paddingLeft:M(18),paddingRight:M(18)},md:{height:Dn.md,paddingLeft:M(22),paddingRight:M(22)},lg:{height:Dn.lg,paddingLeft:M(26),paddingRight:M(26)},xl:{height:Dn.xl,paddingLeft:M(32),paddingRight:M(32)},"compact-xs":{height:M(22),paddingLeft:M(7),paddingRight:M(7)},"compact-sm":{height:M(26),paddingLeft:M(8),paddingRight:M(8)},"compact-md":{height:M(30),paddingLeft:M(10),paddingRight:M(10)},"compact-lg":{height:M(34),paddingLeft:M(12),paddingRight:M(12)},"compact-xl":{height:M(40),paddingLeft:M(14),paddingRight:M(14)}};function tre({compact:e,size:t,withLeftIcon:n,withRightIcon:r}){if(e)return qb[`compact-${t}`];const o=qb[t];return o?Uh(ns({},o),{paddingLeft:n?`calc(${o.paddingLeft} / 1.5)`:o.paddingLeft,paddingRight:r?`calc(${o.paddingRight} / 1.5)`:o.paddingRight}):{}}const nre=e=>({display:e?"block":"inline-block",width:e?"100%":"auto"});function rre({variant:e,theme:t,color:n,gradient:r}){if(!ere.includes(e))return null;const o=t.fn.variant({color:n,variant:e,gradient:r});return e==="gradient"?ns({border:0,backgroundImage:o.background,color:o.color},t.fn.hover({backgroundSize:"200%"})):ns({border:`${M(1)} solid ${o.border}`,backgroundColor:o.background,color:o.color},t.fn.hover({backgroundColor:o.hover}))}var ore=ue((e,{radius:t,fullWidth:n,compact:r,withLeftIcon:o,withRightIcon:i,color:s,gradient:a},{variant:c,size:u})=>({root:Uh(ns(Uh(ns(ns(ns(ns({},tre({compact:r,size:u,withLeftIcon:o,withRightIcon:i})),e.fn.fontStyles()),e.fn.focusStyles()),nre(n)),{borderRadius:e.fn.radius(t),fontWeight:600,position:"relative",lineHeight:1,fontSize:re({size:u,sizes:e.fontSizes}),userSelect:"none",cursor:"pointer"}),rre({variant:c,theme:e,color:s,gradient:a})),{"&:active":e.activeStyles,"&:disabled, &[data-disabled]":{borderColor:"transparent",backgroundColor:e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[2],color:e.colorScheme==="dark"?e.colors.dark[6]:e.colors.gray[5],cursor:"not-allowed",backgroundImage:"none",pointerEvents:"none","&:active":{transform:"none"}},"&[data-loading]":{pointerEvents:"none","&::before":Uh(ns({content:'""'},e.fn.cover(M(-1))),{backgroundColor:e.colorScheme==="dark"?e.fn.rgba(e.colors.dark[7],.5):"rgba(255, 255, 255, .5)",borderRadius:e.fn.radius(t),cursor:"not-allowed"})}}),icon:{display:"flex",alignItems:"center"},leftIcon:{marginRight:e.spacing.xs},rightIcon:{marginLeft:e.spacing.xs},centerLoader:{position:"absolute",left:"50%",transform:"translateX(-50%)",opacity:.5},inner:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%",overflow:"visible"},label:{whiteSpace:"nowrap",height:"100%",overflow:"hidden",display:"flex",alignItems:"center"}}));const ire=ore;var sre=Object.defineProperty,Cg=Object.getOwnPropertySymbols,mA=Object.prototype.hasOwnProperty,gA=Object.prototype.propertyIsEnumerable,S$=(e,t,n)=>t in e?sre(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,P$=(e,t)=>{for(var n in t||(t={}))mA.call(t,n)&&S$(e,n,t[n]);if(Cg)for(var n of Cg(t))gA.call(t,n)&&S$(e,n,t[n]);return e},are=(e,t)=>{var n={};for(var r in e)mA.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Cg)for(var r of Cg(e))t.indexOf(r)<0&&gA.call(e,r)&&(n[r]=e[r]);return n};const lre={size:"sm",type:"button",variant:"filled",loaderPosition:"left"},kP=_.forwardRef((e,t)=>{const n=ae("Button",lre,e),{className:r,size:o,color:i,type:s,disabled:a,children:c,leftIcon:u,rightIcon:f,fullWidth:p,variant:g,radius:v,uppercase:y,compact:w,loading:P,loaderPosition:x,loaderProps:S,gradient:O,classNames:E,styles:$,unstyled:N}=n,I=are(n,["className","size","color","type","disabled","children","leftIcon","rightIcon","fullWidth","variant","radius","uppercase","compact","loading","loaderPosition","loaderProps","gradient","classNames","styles","unstyled"]),{classes:R,cx:B,theme:z}=ire({radius:v,color:i,fullWidth:p,compact:w,gradient:O,withLeftIcon:!!u,withRightIcon:!!f},{name:"Button",unstyled:N,classNames:E,styles:$,variant:g,size:o}),G=z.fn.variant({color:i,variant:g}),X=k.createElement(en,P$({color:G.color,size:`calc(${re({size:o,sizes:qb}).height} / 2)`},S));return k.createElement(ls,P$({className:B(R.root,r),type:s,disabled:a,"data-button":!0,"data-disabled":a||void 0,"data-loading":P||void 0,ref:t,unstyled:N},I),k.createElement("div",{className:R.inner},(u||P&&x==="left")&&k.createElement("span",{className:B(R.icon,R.leftIcon)},P&&x==="left"?X:u),P&&x==="center"&&k.createElement("span",{className:R.centerLoader},X),k.createElement("span",{className:R.label,style:{textTransform:y?"uppercase":void 0}},c),(f||P&&x==="right")&&k.createElement("span",{className:B(R.icon,R.rightIcon)},P&&x==="right"?X:f)))});kP.displayName="@mantine/core/Button";kP.Group=hA;const st=kP;var cre=ue((e,{radius:t,shadow:n})=>({root:{outline:0,WebkitTapHighlightColor:"transparent",display:"block",textDecoration:"none",color:e.colorScheme==="dark"?e.colors.dark[0]:e.black,backgroundColor:e.colorScheme==="dark"?e.colors.dark[7]:e.white,boxSizing:"border-box",borderRadius:e.fn.radius(t),boxShadow:e.shadows[n]||n||"none","&[data-with-border]":{border:`${M(1)} solid ${e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[3]}`}}}));const ure=cre;var dre=Object.defineProperty,kg=Object.getOwnPropertySymbols,vA=Object.prototype.hasOwnProperty,yA=Object.prototype.propertyIsEnumerable,O$=(e,t,n)=>t in e?dre(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,fre=(e,t)=>{for(var n in t||(t={}))vA.call(t,n)&&O$(e,n,t[n]);if(kg)for(var n of kg(t))yA.call(t,n)&&O$(e,n,t[n]);return e},pre=(e,t)=>{var n={};for(var r in e)vA.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&kg)for(var r of kg(e))t.indexOf(r)<0&&yA.call(e,r)&&(n[r]=e[r]);return n};const hre={},_A=_.forwardRef((e,t)=>{const n=ae("Paper",hre,e),{className:r,children:o,radius:i,withBorder:s,shadow:a,unstyled:c,variant:u}=n,f=pre(n,["className","children","radius","withBorder","shadow","unstyled","variant"]),{classes:p,cx:g}=ure({radius:i,shadow:a},{name:"Paper",unstyled:c,variant:u});return k.createElement(Pe,fre({className:g(p.root,r),"data-with-border":s||void 0,ref:t},f),o)});_A.displayName="@mantine/core/Paper";const mre=_A;var gre=ue((e,{inline:t})=>({root:{display:t?"inline-flex":"flex",alignItems:"center",justifyContent:"center"}}));const vre=gre;var yre=Object.defineProperty,Eg=Object.getOwnPropertySymbols,wA=Object.prototype.hasOwnProperty,bA=Object.prototype.propertyIsEnumerable,C$=(e,t,n)=>t in e?yre(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,_re=(e,t)=>{for(var n in t||(t={}))wA.call(t,n)&&C$(e,n,t[n]);if(Eg)for(var n of Eg(t))bA.call(t,n)&&C$(e,n,t[n]);return e},wre=(e,t)=>{var n={};for(var r in e)wA.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Eg)for(var r of Eg(e))t.indexOf(r)<0&&bA.call(e,r)&&(n[r]=e[r]);return n};const xA=_.forwardRef((e,t)=>{const n=ae("Center",{},e),{inline:r,className:o,unstyled:i,variant:s}=n,a=wre(n,["inline","className","unstyled","variant"]),{classes:c,cx:u}=vre({inline:r},{name:"Center",unstyled:i,variant:s});return k.createElement(Pe,_re({ref:t,className:u(c.root,o)},a))});xA.displayName="@mantine/core/Center";const Pr=xA,SA=_.createContext(null),bre=SA.Provider,xre=()=>_.useContext(SA);var Sre=Object.defineProperty,$g=Object.getOwnPropertySymbols,PA=Object.prototype.hasOwnProperty,OA=Object.prototype.propertyIsEnumerable,k$=(e,t,n)=>t in e?Sre(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,E$=(e,t)=>{for(var n in t||(t={}))PA.call(t,n)&&k$(e,n,t[n]);if($g)for(var n of $g(t))OA.call(t,n)&&k$(e,n,t[n]);return e},Pre=(e,t)=>{var n={};for(var r in e)PA.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&$g)for(var r of $g(e))t.indexOf(r)<0&&OA.call(e,r)&&(n[r]=e[r]);return n};const Ore={size:"sm"},CA=_.forwardRef((e,t)=>{const n=ae("CheckboxGroup",Ore,e),{children:r,value:o,defaultValue:i,onChange:s,size:a,wrapperProps:c}=n,u=Pre(n,["children","value","defaultValue","onChange","size","wrapperProps"]),[f,p]=go({value:o,defaultValue:i,finalValue:[],onChange:s}),g=v=>{const y=v.currentTarget.value;p(f.includes(y)?f.filter(w=>w!==y):[...f,y])};return k.createElement(bre,{value:{value:f,onChange:g,size:a}},k.createElement(et.Wrapper,E$(E$({labelElement:"div",size:a,__staticSelector:"CheckboxGroup",ref:t},c),u),r))});CA.displayName="@mantine/core/CheckboxGroup";var Cre=Object.defineProperty,Mg=Object.getOwnPropertySymbols,kA=Object.prototype.hasOwnProperty,EA=Object.prototype.propertyIsEnumerable,$$=(e,t,n)=>t in e?Cre(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Ng=(e,t)=>{for(var n in t||(t={}))kA.call(t,n)&&$$(e,n,t[n]);if(Mg)for(var n of Mg(t))EA.call(t,n)&&$$(e,n,t[n]);return e},$A=(e,t)=>{var n={};for(var r in e)kA.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Mg)for(var r of Mg(e))t.indexOf(r)<0&&EA.call(e,r)&&(n[r]=e[r]);return n};function kre(e){const t=e,{width:n,height:r,style:o}=t,i=$A(t,["width","height","style"]);return k.createElement("svg",Ng({viewBox:"0 0 10 7",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:Ng({width:n,height:r},o)},i),k.createElement("path",{d:"M4 4.586L1.707 2.293A1 1 0 1 0 .293 3.707l3 3a.997.997 0 0 0 1.414 0l5-5A1 1 0 1 0 8.293.293L4 4.586z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"}))}function Ere(e){var t=e,{indeterminate:n}=t,r=$A(t,["indeterminate"]);return n?k.createElement("svg",Ng({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 32 6"},r),k.createElement("rect",{width:"32",height:"6",fill:"currentColor",rx:"3"})):k.createElement(kre,Ng({},r))}var $re=Object.defineProperty,Mre=Object.defineProperties,Nre=Object.getOwnPropertyDescriptors,M$=Object.getOwnPropertySymbols,Tre=Object.prototype.hasOwnProperty,Ire=Object.prototype.propertyIsEnumerable,N$=(e,t,n)=>t in e?$re(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,T$=(e,t)=>{for(var n in t||(t={}))Tre.call(t,n)&&N$(e,n,t[n]);if(M$)for(var n of M$(t))Ire.call(t,n)&&N$(e,n,t[n]);return e},I$=(e,t)=>Mre(e,Nre(t));const jre={xs:M(16),sm:M(20),md:M(24),lg:M(30),xl:M(36)};var Lre=ue((e,{radius:t,color:n,transitionDuration:r,labelPosition:o,error:i,indeterminate:s},{size:a})=>{const c=re({size:a,sizes:jre}),u=e.fn.variant({variant:"filled",color:n});return{icon:I$(T$({},e.fn.cover()),{ref:Ar("icon"),color:s?"inherit":e.white,transform:s?"none":`translateY(${M(5)}) scale(0.5)`,opacity:s?1:0,transitionProperty:"opacity, transform",transitionTimingFunction:"ease",transitionDuration:`${r}ms`,pointerEvents:"none",width:"60%",position:"absolute",zIndex:1,margin:"auto","@media (prefers-reduced-motion)":{transitionDuration:e.respectReducedMotion?"0ms":void 0}}),inner:{position:"relative",width:c,height:c,order:o==="left"?2:1},input:I$(T$({},e.fn.focusStyles()),{appearance:"none",backgroundColor:e.colorScheme==="dark"?e.colors.dark[6]:e.white,border:`${M(1)} solid ${i?e.fn.variant({variant:"filled",color:"red"}).background:e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[4]}`,width:c,height:c,borderRadius:e.fn.radius(t),padding:0,display:"block",margin:0,transition:`border-color ${r}ms ease, background-color ${r}ms ease`,cursor:e.cursorType,"&:checked":{backgroundColor:u.background,borderColor:u.background,[`& + .${Ar("icon")}`]:{opacity:1,color:e.white,transform:"translateY(0) scale(1)"}},"&:disabled":{backgroundColor:e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[2],borderColor:e.colorScheme==="dark"?e.colors.dark[6]:e.colors.gray[3],cursor:"not-allowed",pointerEvents:"none",[`& + .${Ar("icon")}`]:{color:e.colorScheme==="dark"?e.colors.dark[6]:e.colors.gray[5]}}})}});const Dre=Lre;var Rre=Object.defineProperty,zre=Object.defineProperties,Are=Object.getOwnPropertyDescriptors,j$=Object.getOwnPropertySymbols,Bre=Object.prototype.hasOwnProperty,Fre=Object.prototype.propertyIsEnumerable,L$=(e,t,n)=>t in e?Rre(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Vre=(e,t)=>{for(var n in t||(t={}))Bre.call(t,n)&&L$(e,n,t[n]);if(j$)for(var n of j$(t))Fre.call(t,n)&&L$(e,n,t[n]);return e},Hre=(e,t)=>zre(e,Are(t));const L_={xs:M(16),sm:M(20),md:M(24),lg:M(30),xl:M(36)};var Wre=ue((e,{labelPosition:t},{size:n})=>({root:{},body:{display:"flex","&:has(input:disabled) label":{color:e.colorScheme==="dark"?e.colors.dark[3]:e.colors.gray[5]}},labelWrapper:Hre(Vre({},e.fn.fontStyles()),{display:"inline-flex",flexDirection:"column",WebkitTapHighlightColor:"transparent",fontSize:n in L_?re({size:n,sizes:e.fontSizes}):void 0,lineHeight:n in L_?re({size:n,sizes:L_}):void 0,color:e.colorScheme==="dark"?e.colors.dark[0]:e.black,cursor:e.cursorType,order:t==="left"?1:2}),description:{marginTop:`calc(${e.spacing.xs} / 2)`,[t==="left"?"paddingRight":"paddingLeft"]:e.spacing.sm},error:{marginTop:`calc(${e.spacing.xs} / 2)`,[t==="left"?"paddingRight":"paddingLeft"]:e.spacing.sm},label:{cursor:e.cursorType,[t==="left"?"paddingRight":"paddingLeft"]:e.spacing.sm,"&:disabled, &[data-disabled]":{color:e.colorScheme==="dark"?e.colors.dark[3]:e.colors.gray[5]}}}));const Ure=Wre;var Zre=Object.defineProperty,Tg=Object.getOwnPropertySymbols,MA=Object.prototype.hasOwnProperty,NA=Object.prototype.propertyIsEnumerable,D$=(e,t,n)=>t in e?Zre(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Gre=(e,t)=>{for(var n in t||(t={}))MA.call(t,n)&&D$(e,n,t[n]);if(Tg)for(var n of Tg(t))NA.call(t,n)&&D$(e,n,t[n]);return e},Yre=(e,t)=>{var n={};for(var r in e)MA.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Tg)for(var r of Tg(e))t.indexOf(r)<0&&NA.call(e,r)&&(n[r]=e[r]);return n};const EP=_.forwardRef((e,t)=>{var n=e,{__staticSelector:r,className:o,classNames:i,styles:s,unstyled:a,children:c,label:u,description:f,id:p,disabled:g,error:v,size:y,labelPosition:w,variant:P}=n,x=Yre(n,["__staticSelector","className","classNames","styles","unstyled","children","label","description","id","disabled","error","size","labelPosition","variant"]);const{classes:S,cx:O}=Ure({labelPosition:w},{name:r,styles:s,classNames:i,unstyled:a,variant:P,size:y});return k.createElement(Pe,Gre({className:O(S.root,o),ref:t},x),k.createElement("div",{className:O(S.body)},c,k.createElement("div",{className:S.labelWrapper},u!=null&&k.createElement("label",{className:S.label,"data-disabled":g||void 0,htmlFor:p},u),f&&k.createElement(et.Description,{className:S.description},f),v&&v!=="boolean"&&k.createElement(et.Error,{className:S.error},v))))});EP.displayName="@mantine/core/InlineInput";var Kre=Object.defineProperty,Ig=Object.getOwnPropertySymbols,TA=Object.prototype.hasOwnProperty,IA=Object.prototype.propertyIsEnumerable,R$=(e,t,n)=>t in e?Kre(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Qp=(e,t)=>{for(var n in t||(t={}))TA.call(t,n)&&R$(e,n,t[n]);if(Ig)for(var n of Ig(t))IA.call(t,n)&&R$(e,n,t[n]);return e},qre=(e,t)=>{var n={};for(var r in e)TA.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Ig)for(var r of Ig(e))t.indexOf(r)<0&&IA.call(e,r)&&(n[r]=e[r]);return n};const Jre={size:"sm",transitionDuration:100,icon:Ere,labelPosition:"right"},mr=_.forwardRef((e,t)=>{const n=ae("Checkbox",Jre,e),{className:r,style:o,sx:i,checked:s,disabled:a,color:c,label:u,indeterminate:f,id:p,size:g,radius:v,wrapperProps:y,children:w,classNames:P,styles:x,transitionDuration:S,icon:O,unstyled:E,labelPosition:$,description:N,error:I,variant:R}=n,B=qre(n,["className","style","sx","checked","disabled","color","label","indeterminate","id","size","radius","wrapperProps","children","classNames","styles","transitionDuration","icon","unstyled","labelPosition","description","error","variant"]),z=xre(),G=$a(p),{systemStyles:X,rest:Q}=Dl(B),{classes:V}=Dre({radius:v,color:c,transitionDuration:S,labelPosition:$,error:!!I,indeterminate:f},{name:"Checkbox",classNames:P,styles:x,unstyled:E,variant:R,size:z?.size||g}),H=z?{checked:z.value.includes(Q.value),onChange:z.onChange}:{};return k.createElement(EP,Qp(Qp({className:r,sx:i,style:o,id:G,size:z?.size||g,labelPosition:$,label:u,description:N,error:I,disabled:a,__staticSelector:"Checkbox",classNames:P,styles:x,unstyled:E,"data-checked":H.checked||void 0,variant:R},X),y),k.createElement("div",{className:V.inner},k.createElement("input",Qp(Qp({id:G,ref:t,type:"checkbox",className:V.input,checked:s,disabled:a},Q),H)),k.createElement(O,{indeterminate:f,className:V.icon})))});mr.displayName="@mantine/core/Checkbox";mr.Group=CA;var Xre=Object.defineProperty,Qre=Object.defineProperties,eoe=Object.getOwnPropertyDescriptors,z$=Object.getOwnPropertySymbols,toe=Object.prototype.hasOwnProperty,noe=Object.prototype.propertyIsEnumerable,A$=(e,t,n)=>t in e?Xre(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,B$=(e,t)=>{for(var n in t||(t={}))toe.call(t,n)&&A$(e,n,t[n]);if(z$)for(var n of z$(t))noe.call(t,n)&&A$(e,n,t[n]);return e},F$=(e,t)=>Qre(e,eoe(t)),roe=ue((e,{radius:t},{size:n})=>{const r=e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[3];return{root:F$(B$({},e.fn.focusStyles()),{width:M(n),height:M(n),WebkitTapHighlightColor:"transparent",border:0,borderRadius:e.fn.radius(t),appearance:"none",WebkitAppearance:"none",padding:0,position:"relative",overflow:"hidden"}),overlay:F$(B$({},e.fn.cover()),{position:"absolute",borderRadius:e.fn.radius(t)}),children:{display:"inline-flex",justifyContent:"center",alignItems:"center"},shadowOverlay:{boxShadow:`rgba(0, 0, 0, .1) 0 0 0 ${M(1)} inset, rgb(0, 0, 0, .15) 0 0 ${M(4)} inset`,zIndex:1},alphaOverlay:{backgroundImage:`linear-gradient(45deg, ${r} 25%, transparent 25%), linear-gradient(-45deg, ${r} 25%, transparent 25%), linear-gradient(45deg, transparent 75%, ${r} 75%), linear-gradient(-45deg, ${e.colorScheme==="dark"?e.colors.dark[7]:e.white} 75%, ${r} 75%)`,backgroundSize:`${M(8)} ${M(8)}`,backgroundPosition:`0 0, 0 ${M(4)}, ${M(4)} -${M(4)}, -${M(4)} 0`}}});const ooe=roe;var ioe=Object.defineProperty,jg=Object.getOwnPropertySymbols,jA=Object.prototype.hasOwnProperty,LA=Object.prototype.propertyIsEnumerable,V$=(e,t,n)=>t in e?ioe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,soe=(e,t)=>{for(var n in t||(t={}))jA.call(t,n)&&V$(e,n,t[n]);if(jg)for(var n of jg(t))LA.call(t,n)&&V$(e,n,t[n]);return e},aoe=(e,t)=>{var n={};for(var r in e)jA.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&jg)for(var r of jg(e))t.indexOf(r)<0&&LA.call(e,r)&&(n[r]=e[r]);return n};const loe={size:M(25),radius:M(25),withShadow:!0},DA=_.forwardRef((e,t)=>{const n=ae("ColorSwatch",loe,e),{color:r,size:o,radius:i,className:s,children:a,classNames:c,styles:u,unstyled:f,withShadow:p,variant:g}=n,v=aoe(n,["color","size","radius","className","children","classNames","styles","unstyled","withShadow","variant"]),{classes:y,cx:w}=ooe({radius:i},{classNames:c,styles:u,unstyled:f,name:"ColorSwatch",size:o,variant:g});return k.createElement(Pe,soe({className:w(y.root,s),ref:t},v),k.createElement("div",{className:w(y.alphaOverlay,y.overlay)}),p&&k.createElement("div",{className:w(y.shadowOverlay,y.overlay)}),k.createElement("div",{className:y.overlay,style:{backgroundColor:r}}),k.createElement("div",{className:w(y.children,y.overlay)},a))});DA.displayName="@mantine/core/ColorSwatch";const hf=DA,Ci={xs:M(8),sm:M(12),md:M(16),lg:M(20),xl:M(22)};var coe=ue((e,t,{size:n})=>{const r=re({size:n,sizes:Ci});return{thumb:{overflow:"hidden",boxSizing:"border-box",position:"absolute",boxShadow:`0 0 ${M(1)} rgba(0, 0, 0, .6)`,border:`${M(2)} solid ${e.white}`,backgroundColor:"transparent",width:r,height:r,borderRadius:r}}});const uoe=coe;var doe=Object.defineProperty,H$=Object.getOwnPropertySymbols,foe=Object.prototype.hasOwnProperty,poe=Object.prototype.propertyIsEnumerable,W$=(e,t,n)=>t in e?doe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,hoe=(e,t)=>{for(var n in t||(t={}))foe.call(t,n)&&W$(e,n,t[n]);if(H$)for(var n of H$(t))poe.call(t,n)&&W$(e,n,t[n]);return e};function $P({position:e,className:t,styles:n,classNames:r,style:o,size:i,__staticSelector:s,unstyled:a,variant:c}){const{classes:u,cx:f}=uoe(null,{classNames:r,styles:n,name:s,unstyled:a,size:i,variant:c});return k.createElement("div",{className:f(u.thumb,t),style:hoe({left:`calc(${e.x*100}% - ${Ci[i]} / 2)`,top:`calc(${e.y*100}% - ${Ci[i]} / 2)`},o)})}$P.displayName="@mantine/core/Thumb";var moe=Object.defineProperty,U$=Object.getOwnPropertySymbols,goe=Object.prototype.hasOwnProperty,voe=Object.prototype.propertyIsEnumerable,Z$=(e,t,n)=>t in e?moe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,G$=(e,t)=>{for(var n in t||(t={}))goe.call(t,n)&&Z$(e,n,t[n]);if(U$)for(var n of U$(t))voe.call(t,n)&&Z$(e,n,t[n]);return e},yoe=ue((e,t,{size:n})=>({sliderThumb:{ref:Ar("sliderThumb")},slider:{position:"relative",height:`calc(${re({size:n,sizes:Ci})} + ${M(2)})`,boxSizing:"border-box",marginLeft:`calc(${re({size:n,sizes:Ci})} / 2)`,marginRight:`calc(${re({size:n,sizes:Ci})} / 2)`,outline:0,[`&:focus .${Ar("sliderThumb")}`]:G$({},e.focusRing==="always"||e.focusRing==="auto"?e.focusRingStyles.styles(e):e.focusRingStyles.resetStyles(e)),[`&:focus:not(:focus-visible) .${Ar("sliderThumb")}`]:G$({},e.focusRing==="auto"||e.focusRing==="never"?e.focusRingStyles.resetStyles(e):null)},sliderOverlay:{position:"absolute",boxSizing:"border-box",top:0,bottom:0,left:`calc(${re({size:n,sizes:Ci})} * -1 / 2 - ${M(1)})`,right:`calc(${re({size:n,sizes:Ci})} * -1 / 2 - ${M(1)})`,borderRadius:1e3}}));const _oe=yoe;var woe=Object.defineProperty,boe=Object.defineProperties,xoe=Object.getOwnPropertyDescriptors,Lg=Object.getOwnPropertySymbols,RA=Object.prototype.hasOwnProperty,zA=Object.prototype.propertyIsEnumerable,Y$=(e,t,n)=>t in e?woe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Soe=(e,t)=>{for(var n in t||(t={}))RA.call(t,n)&&Y$(e,n,t[n]);if(Lg)for(var n of Lg(t))zA.call(t,n)&&Y$(e,n,t[n]);return e},Poe=(e,t)=>boe(e,xoe(t)),Ooe=(e,t)=>{var n={};for(var r in e)RA.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Lg)for(var r of Lg(e))t.indexOf(r)<0&&zA.call(e,r)&&(n[r]=e[r]);return n};const MP=_.forwardRef((e,t)=>{var n=e,{value:r,onChange:o,onChangeEnd:i,maxValue:s,round:a,size:c="md",thumbColor:u="transparent",__staticSelector:f="ColorSlider",focusable:p=!0,overlays:g,classNames:v,styles:y,className:w,unstyled:P,variant:x}=n,S=Ooe(n,["value","onChange","onChangeEnd","maxValue","round","size","thumbColor","__staticSelector","focusable","overlays","classNames","styles","className","unstyled","variant"]);const{classes:O,cx:E}=_oe(null,{classNames:v,styles:y,name:f,unstyled:P,variant:x,size:c}),[$,N]=_.useState({y:0,x:r/s}),I=_.useRef($),R=Q=>a?Math.round(Q*s):Q*s,{ref:B}=U3(({x:Q,y:V})=>{I.current={x:Q,y:V},o(R(Q))},{onScrubEnd:()=>{const{x:Q}=I.current;i(R(Q))}});Fn(()=>{N({y:0,x:r/s})},[r]);const z=(Q,V)=>{Q.preventDefault();const H=W3(V);o(R(H.x)),i(R(H.x))},G=Q=>{switch(Q.key){case"ArrowRight":{z(Q,{x:$.x+.05,y:$.y});break}case"ArrowLeft":{z(Q,{x:$.x-.05,y:$.y});break}}},X=g.map((Q,V)=>k.createElement("div",{className:O.sliderOverlay,style:Q,key:V}));return k.createElement(Pe,Poe(Soe({},S),{ref:ws(B,t),className:E(O.slider,w),role:"slider","aria-valuenow":r,"aria-valuemax":s,"aria-valuemin":0,tabIndex:p?0:-1,onKeyDown:G}),X,k.createElement($P,{__staticSelector:f,classNames:v,styles:y,position:$,style:{top:M(1),backgroundColor:u},className:O.sliderThumb,size:c}))});MP.displayName="@mantine/core/ColorSlider";var Coe=Object.defineProperty,koe=Object.defineProperties,Eoe=Object.getOwnPropertyDescriptors,Dg=Object.getOwnPropertySymbols,AA=Object.prototype.hasOwnProperty,BA=Object.prototype.propertyIsEnumerable,K$=(e,t,n)=>t in e?Coe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,$oe=(e,t)=>{for(var n in t||(t={}))AA.call(t,n)&&K$(e,n,t[n]);if(Dg)for(var n of Dg(t))BA.call(t,n)&&K$(e,n,t[n]);return e},Moe=(e,t)=>koe(e,Eoe(t)),Noe=(e,t)=>{var n={};for(var r in e)AA.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Dg)for(var r of Dg(e))t.indexOf(r)<0&&BA.call(e,r)&&(n[r]=e[r]);return n};const Toe={},FA=_.forwardRef((e,t)=>{const n=ae("HueSlider",Toe,e),{value:r,onChange:o,onChangeEnd:i,__staticSelector:s}=n,a=Noe(n,["value","onChange","onChangeEnd","__staticSelector"]);return k.createElement(MP,Moe($oe({},a),{ref:t,value:r,onChange:o,onChangeEnd:i,maxValue:360,thumbColor:`hsl(${r}, 100%, 50%)`,round:!0,__staticSelector:s||"HueSlider",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 ${M(1)} inset, rgb(0, 0, 0, .15) 0 0 ${M(4)} inset`}]}))});FA.displayName="@mantine/core/HueSlider";var Ioe=Object.defineProperty,joe=Object.defineProperties,Loe=Object.getOwnPropertyDescriptors,q$=Object.getOwnPropertySymbols,Doe=Object.prototype.hasOwnProperty,Roe=Object.prototype.propertyIsEnumerable,J$=(e,t,n)=>t in e?Ioe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,X$=(e,t)=>{for(var n in t||(t={}))Doe.call(t,n)&&J$(e,n,t[n]);if(q$)for(var n of q$(t))Roe.call(t,n)&&J$(e,n,t[n]);return e},Q$=(e,t)=>joe(e,Loe(t));function Io(e,t=0,n=10**t){return Math.round(n*e)/n}function zoe({h:e,s:t,l:n,a:r}){const o=t*((n<50?n:100-n)/100);return{h:e,s:o>0?2*o/(n+o)*100:0,v:n+o,a:r}}const Aoe={grad:360/400,turn:360,rad:360/(Math.PI*2)};function Boe(e,t="deg"){return Number(e)*(Aoe[t]||1)}const Foe=/hsla?\(?\s*(-?\d*\.?\d+)(deg|rad|grad|turn)?[,\s]+(-?\d*\.?\d+)%?[,\s]+(-?\d*\.?\d+)%?,?\s*[/\s]*(-?\d*\.?\d+)?(%)?\s*\)?/i;function eM(e){const t=Foe.exec(e);return t?zoe({h:Boe(t[1],t[2]),s:Number(t[3]),l:Number(t[4]),a:t[5]===void 0?1:Number(t[5])/(t[6]?100:1)}):{h:0,s:0,v:0,a:1}}function Jb({r:e,g:t,b:n,a:r}){const o=Math.max(e,t,n),i=o-Math.min(e,t,n),s=i?o===e?(t-n)/i:o===t?2+(n-e)/i:4+(e-t)/i:0;return{h:Io(60*(s<0?s+6:s),3),s:Io(o?i/o*100:0,3),v:Io(o/255*100,3),a:r}}function Xb(e){const t=e[0]==="#"?e.slice(1):e;return t.length===3?Jb({r:parseInt(t[0]+t[0],16),g:parseInt(t[1]+t[1],16),b:parseInt(t[2]+t[2],16),a:1}):Jb({r:parseInt(t.slice(0,2),16),g:parseInt(t.slice(2,4),16),b:parseInt(t.slice(4,6),16),a:1})}function Voe(e){const t=e[0]==="#"?e.slice(1):e,n=s=>Io(parseInt(s,16)/255,3);if(t.length===4){const s=t.slice(0,3),a=n(t[3]+t[3]);return Q$(X$({},Xb(s)),{a})}const r=t.slice(0,6),o=n(t.slice(6,8));return Q$(X$({},Xb(r)),{a:o})}const Hoe=/rgba?\(?\s*(-?\d*\.?\d+)(%)?[,\s]+(-?\d*\.?\d+)(%)?[,\s]+(-?\d*\.?\d+)(%)?,?\s*[/\s]*(-?\d*\.?\d+)?(%)?\s*\)?/i;function tM(e){const t=Hoe.exec(e);return t?Jb({r:Number(t[1])/(t[2]?100/255:1),g:Number(t[3])/(t[4]?100/255:1),b:Number(t[5])/(t[6]?100/255:1),a:t[7]===void 0?1:Number(t[7])/(t[8]?100:1)}):{h:0,s:0,v:0,a:1}}const VA={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},Woe={hex:Xb,hexa:Voe,rgb:tM,rgba:tM,hsl:eM,hsla:eM};function Uoe(e){for(const[,t]of Object.entries(VA))if(t.test(e))return!0;return!1}function eh(e){if(typeof e!="string")return{h:0,s:0,v:0,a:1};if(e==="transparent")return{h:0,s:0,v:0,a:0};const t=e.trim();for(const[n,r]of Object.entries(VA))if(r.test(t))return Woe[n](t);return{h:0,s:0,v:0,a:1}}var Zoe=Object.defineProperty,Goe=Object.defineProperties,Yoe=Object.getOwnPropertyDescriptors,Rg=Object.getOwnPropertySymbols,HA=Object.prototype.hasOwnProperty,WA=Object.prototype.propertyIsEnumerable,nM=(e,t,n)=>t in e?Zoe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Koe=(e,t)=>{for(var n in t||(t={}))HA.call(t,n)&&nM(e,n,t[n]);if(Rg)for(var n of Rg(t))WA.call(t,n)&&nM(e,n,t[n]);return e},qoe=(e,t)=>Goe(e,Yoe(t)),Joe=(e,t)=>{var n={};for(var r in e)HA.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Rg)for(var r of Rg(e))t.indexOf(r)<0&&WA.call(e,r)&&(n[r]=e[r]);return n};const Xoe={},UA=_.forwardRef((e,t)=>{const n=ae("AlphaSlider",Xoe,e),{value:r,onChange:o,onChangeEnd:i,color:s,__staticSelector:a}=n,c=Joe(n,["value","onChange","onChangeEnd","color","__staticSelector"]),u=ir(),f=u.colorScheme==="dark"?u.colors.dark[4]:u.colors.gray[3];return k.createElement(MP,qoe(Koe({},c),{ref:t,value:r,onChange:p=>o(Io(p,2)),onChangeEnd:p=>i(Io(p,2)),maxValue:1,round:!1,__staticSelector:a||"AlphaSlider",overlays:[{backgroundImage:`linear-gradient(45deg, ${f} 25%, transparent 25%), linear-gradient(-45deg, ${f} 25%, transparent 25%), linear-gradient(45deg, transparent 75%, ${f} 75%), linear-gradient(-45deg, ${u.colorScheme==="dark"?u.colors.dark[7]:u.white} 75%, ${f} 75%)`,backgroundSize:`${M(8)} ${M(8)}`,backgroundPosition:`0 0, 0 ${M(4)}, ${M(4)} -${M(4)}, -${M(4)} 0`},{backgroundImage:`linear-gradient(90deg, transparent, ${s})`},{boxShadow:`rgba(0, 0, 0, .1) 0 0 0 ${M(1)} inset, rgb(0, 0, 0, .15) 0 0 ${M(4)} inset`}]}))});UA.displayName="@mantine/core/AlphaSlider";var Qoe=Object.defineProperty,rM=Object.getOwnPropertySymbols,eie=Object.prototype.hasOwnProperty,tie=Object.prototype.propertyIsEnumerable,oM=(e,t,n)=>t in e?Qoe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,D_=(e,t)=>{for(var n in t||(t={}))eie.call(t,n)&&oM(e,n,t[n]);if(rM)for(var n of rM(t))tie.call(t,n)&&oM(e,n,t[n]);return e};const nie={xs:M(100),sm:M(110),md:M(120),lg:M(140),xl:M(160)};var rie=ue((e,t,{size:n})=>({saturationThumb:{ref:Ar("saturationThumb")},saturation:{boxSizing:"border-box",position:"relative",height:re({size:n,sizes:nie}),borderRadius:e.radius.sm,margin:`calc(${re({size:n,sizes:Ci})} / 2)`,WebkitTapHighlightColor:"transparent",[`&:focus .${Ar("saturationThumb")}`]:D_({},e.focusRing==="always"||e.focusRing==="auto"?e.focusRingStyles.styles(e):e.focusRingStyles.resetStyles(e)),[`&:focus:not(:focus-visible) .${Ar("saturationThumb")}`]:D_({},e.focusRing==="auto"||e.focusRing==="never"?e.focusRingStyles.resetStyles(e):null)},saturationOverlay:D_({boxSizing:"border-box",borderRadius:e.radius.sm},e.fn.cover(`calc(${re({size:n,sizes:Ci})} * -1 / 2 - ${M(1)})`))}));const oie=rie;function ZA({h:e,s:t,v:n,a:r}){const o=e/360*6,i=t/100,s=n/100,a=Math.floor(o),c=s*(1-i),u=s*(1-(o-a)*i),f=s*(1-(1-o+a)*i),p=a%6;return{r:Io([s,u,c,c,f,s][p]*255),g:Io([f,s,s,u,c,c][p]*255),b:Io([c,c,f,s,s,u][p]*255),a:Io(r,2)}}function iM(e,t){const{r:n,g:r,b:o,a:i}=ZA(e);return t?`rgba(${n}, ${r}, ${o}, ${Io(i,2)})`:`rgb(${n}, ${r}, ${o})`}function sM({h:e,s:t,v:n,a:r},o){const i=(200-t)*n/100,s={h:Math.round(e),s:Math.round(i>0&&i<200?t*n/100/(i<=100?i:200-i)*100:0),l:Math.round(i/2)};return o?`hsla(${s.h}, ${s.s}%, ${s.l}%, ${Io(r,2)})`:`hsl(${s.h}, ${s.s}%, ${s.l}%)`}function Zh(e){const t=e.toString(16);return t.length<2?`0${t}`:t}function GA(e){const{r:t,g:n,b:r}=ZA(e);return`#${Zh(t)}${Zh(n)}${Zh(r)}`}function iie(e){const t=Math.round(e.a*255);return`${GA(e)}${Zh(t)}`}const R_={hex:GA,hexa:e=>iie(e),rgb:e=>iM(e,!1),rgba:e=>iM(e,!0),hsl:e=>sM(e,!1),hsla:e=>sM(e,!0)};function zs(e,t){return t?e in R_?R_[e](t):R_.hex(t):"#000000"}function YA({value:e,onChange:t,onChangeEnd:n,focusable:r=!0,__staticSelector:o="saturation",size:i,color:s,saturationLabel:a,classNames:c,styles:u,unstyled:f,variant:p}){const{classes:g}=oie(null,{classNames:c,styles:u,name:o,unstyled:f,variant:p,size:i}),[v,y]=_.useState({x:e.s/100,y:1-e.v/100}),w=_.useRef(v),{ref:P}=U3(({x:O,y:E})=>{w.current={x:O,y:E},t({s:Math.round(O*100),v:Math.round((1-E)*100)})},{onScrubEnd:()=>{const{x:O,y:E}=w.current;n({s:Math.round(O*100),v:Math.round((1-E)*100)})}});_.useEffect(()=>{y({x:e.s/100,y:1-e.v/100})},[e.s,e.v]);const x=(O,E)=>{O.preventDefault();const $=W3(E);t({s:Math.round($.x*100),v:Math.round((1-$.y)*100)}),n({s:Math.round($.x*100),v:Math.round((1-$.y)*100)})},S=O=>{switch(O.key){case"ArrowUp":{x(O,{y:v.y-.05,x:v.x});break}case"ArrowDown":{x(O,{y:v.y+.05,x:v.x});break}case"ArrowRight":{x(O,{x:v.x+.05,y:v.y});break}case"ArrowLeft":{x(O,{x:v.x-.05,y:v.y});break}}};return k.createElement("div",{className:g.saturation,ref:P,role:"slider","aria-label":a,"aria-valuenow":v.x,"aria-valuetext":zs("rgba",e),tabIndex:r?0:-1,onKeyDown:S},k.createElement("div",{className:g.saturationOverlay,style:{backgroundColor:`hsl(${e.h}, 100%, 50%)`}}),k.createElement("div",{className:g.saturationOverlay,style:{backgroundImage:"linear-gradient(90deg, #fff, transparent)"}}),k.createElement("div",{className:g.saturationOverlay,style:{backgroundImage:"linear-gradient(0deg, #000, transparent)"}}),k.createElement($P,{__staticSelector:o,classNames:c,styles:u,position:v,className:g.saturationThumb,style:{backgroundColor:s},size:i}))}YA.displayName="@mantine/core/Saturation";var sie=ue((e,{swatchesPerRow:t})=>({swatch:{width:`calc(${100/t}% - ${M(4)})`,height:0,paddingBottom:`calc(${100/t}% - ${M(4)})`,margin:M(2),boxSizing:"content-box"},swatches:{boxSizing:"border-box",marginLeft:M(-2),marginRight:M(-2),display:"flex",flexWrap:"wrap"}}));const aie=sie;var lie=Object.defineProperty,zg=Object.getOwnPropertySymbols,KA=Object.prototype.hasOwnProperty,qA=Object.prototype.propertyIsEnumerable,aM=(e,t,n)=>t in e?lie(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,cie=(e,t)=>{for(var n in t||(t={}))KA.call(t,n)&&aM(e,n,t[n]);if(zg)for(var n of zg(t))qA.call(t,n)&&aM(e,n,t[n]);return e},uie=(e,t)=>{var n={};for(var r in e)KA.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&zg)for(var r of zg(e))t.indexOf(r)<0&&qA.call(e,r)&&(n[r]=e[r]);return n};function JA(e){var t=e,{data:n,swatchesPerRow:r=10,focusable:o=!0,classNames:i,styles:s,__staticSelector:a="color-picker",unstyled:c,setValue:u,onChangeEnd:f,variant:p,size:g}=t,v=uie(t,["data","swatchesPerRow","focusable","classNames","styles","__staticSelector","unstyled","setValue","onChangeEnd","variant","size"]);const{classes:y}=aie({swatchesPerRow:r},{classNames:i,styles:s,name:a,unstyled:c,variant:p,size:g}),w=n.map((P,x)=>k.createElement(hf,{className:y.swatch,component:"button",type:"button",color:P,key:x,radius:"sm",onClick:()=>{u(P),f?.(P)},style:{cursor:"pointer"},"aria-label":P,tabIndex:o?0:-1}));return k.createElement("div",cie({className:y.swatches},v),w)}JA.displayName="@mantine/core/Swatches";const die={xs:M(180),sm:M(200),md:M(240),lg:M(280),xl:M(320)};var fie=ue((e,{fullWidth:t},{size:n})=>({preview:{},wrapper:{boxSizing:"border-box",width:t?"100%":re({size:n,sizes:die}),padding:M(1)},body:{display:"flex",boxSizing:"border-box",paddingTop:`calc(${re({size:n,sizes:e.spacing})} / 2)`},sliders:{flex:1,boxSizing:"border-box","&:not(:only-child)":{marginRight:e.spacing.xs}},slider:{boxSizing:"border-box","& + &":{marginTop:M(5)}},swatch:{cursor:"pointer"}}));const pie=fie;var hie=Object.defineProperty,mie=Object.defineProperties,gie=Object.getOwnPropertyDescriptors,Ag=Object.getOwnPropertySymbols,XA=Object.prototype.hasOwnProperty,QA=Object.prototype.propertyIsEnumerable,lM=(e,t,n)=>t in e?hie(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,ac=(e,t)=>{for(var n in t||(t={}))XA.call(t,n)&&lM(e,n,t[n]);if(Ag)for(var n of Ag(t))QA.call(t,n)&&lM(e,n,t[n]);return e},z_=(e,t)=>mie(e,gie(t)),vie=(e,t)=>{var n={};for(var r in e)XA.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Ag)for(var r of Ag(e))t.indexOf(r)<0&&QA.call(e,r)&&(n[r]=e[r]);return n};const yie={xs:26,sm:34,md:42,lg:50,xl:54},_ie={swatchesPerRow:10,size:"sm",withPicker:!0,focusable:!0,__staticSelector:"ColorPicker"},e4=_.forwardRef((e,t)=>{const n=ae("ColorPicker",_ie,e),{value:r,defaultValue:o,onChange:i,onChangeEnd:s,format:a,swatches:c,swatchesPerRow:u,size:f,withPicker:p,fullWidth:g,focusable:v,__staticSelector:y,saturationLabel:w,hueLabel:P,alphaLabel:x,className:S,styles:O,classNames:E,unstyled:$,onColorSwatchClick:N,variant:I}=n,R=vie(n,["value","defaultValue","onChange","onChangeEnd","format","swatches","swatchesPerRow","size","withPicker","fullWidth","focusable","__staticSelector","saturationLabel","hueLabel","alphaLabel","className","styles","classNames","unstyled","onColorSwatchClick","variant"]),{classes:B,cx:z}=pie({fullWidth:g},{classNames:E,styles:O,name:y,unstyled:$,variant:I,size:f}),G=_.useRef(a),X=_.useRef(null),Q=_.useRef(!0),V=a==="hexa"||a==="rgba"||a==="hsla",[H,Z,Y]=go({value:r,defaultValue:o,finalValue:"#FFFFFF",onChange:i}),[j,U]=_.useState(eh(H)),F=K=>{Q.current=!1,U(ee=>{const fe=ac(ac({},ee),K);return X.current=zs(G.current,fe),fe}),Z(X.current),setTimeout(()=>{Q.current=!0},0)};return Fn(()=>{Uoe(r)&&Q.current&&(U(eh(r)),Q.current=!0)},[r]),Fn(()=>{G.current=a,Z(zs(a,j))},[a]),k.createElement(Pe,ac({className:z(B.wrapper,S),ref:t},R),p&&k.createElement(k.Fragment,null,k.createElement(YA,{value:j,onChange:F,onChangeEnd:({s:K,v:ee})=>s?.(zs(G.current,z_(ac({},j),{s:K,v:ee}))),color:H,styles:O,classNames:E,size:f,focusable:v,saturationLabel:w,__staticSelector:y}),k.createElement("div",{className:B.body},k.createElement("div",{className:B.sliders},k.createElement(FA,{value:j.h,onChange:K=>F({h:K}),onChangeEnd:K=>s?.(zs(G.current,z_(ac({},j),{h:K}))),size:f,styles:O,classNames:E,focusable:v,"aria-label":P,__staticSelector:y}),V&&k.createElement(UA,{value:j.a,onChange:K=>F({a:K}),onChangeEnd:K=>{s?.(zs(G.current,z_(ac({},j),{a:K})))},size:f,color:zs("hex",j),style:{marginTop:M(6)},styles:O,classNames:E,focusable:v,"aria-label":x,__staticSelector:y})),V&&k.createElement(hf,{color:H,radius:"sm",size:re({size:f,sizes:yie}),className:B.preview}))),Array.isArray(c)&&k.createElement(JA,{data:c,style:{marginTop:M(5)},swatchesPerRow:u,focusable:v,classNames:E,styles:O,__staticSelector:y,setValue:Z,onChangeEnd:K=>{const ee=zs(a,eh(K));N?.(ee),s?.(ee),Y||U(eh(K))}}))});e4.displayName="@mantine/core/ColorPicker";const[wie,bie]=bu("Drawer component was not found in tree"),cM={xs:M(320),sm:M(380),md:M(440),lg:M(620),xl:M(780)};var xie=ue((e,{position:t},{size:n})=>({header:{zIndex:1e3},content:{flex:t==="right"||t==="left"?`0 0 ${re({size:n,sizes:cM})}`:"0 0 100%",maxWidth:"100%",maxHeight:"100%",height:t==="right"||t==="left"?"100%":re({size:n,sizes:cM}),borderRadius:0,overflowY:"auto"},inner:{display:"flex",justifyContent:t==="right"?"flex-end":"flex-start",alignItems:t==="bottom"?"flex-end":"flex-start"}}));const Sie=xie,[Pie,Cu]=bu("ModalBase component was not found in tree");var Oie=ue(()=>({close:{marginLeft:"auto",marginRight:0}}));const Cie=Oie;var kie=Object.defineProperty,Bg=Object.getOwnPropertySymbols,t4=Object.prototype.hasOwnProperty,n4=Object.prototype.propertyIsEnumerable,uM=(e,t,n)=>t in e?kie(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Eie=(e,t)=>{for(var n in t||(t={}))t4.call(t,n)&&uM(e,n,t[n]);if(Bg)for(var n of Bg(t))n4.call(t,n)&&uM(e,n,t[n]);return e},$ie=(e,t)=>{var n={};for(var r in e)t4.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Bg)for(var r of Bg(e))t.indexOf(r)<0&&n4.call(e,r)&&(n[r]=e[r]);return n};const Mie={size:"sm"},Nie=_.forwardRef((e,t)=>{const n=Cu(),r=ae(`${n.__staticSelector}CloseButton`,Mie,e),{className:o}=r,i=$ie(r,["className"]),{classes:s,cx:a}=Cie(null,n.stylesApi);return k.createElement(O0,Eie({className:a(s.close,o),ref:t,onClick:n.onClose},i))});var Tie=ue(()=>({overlay:{}}));const Iie=Tie;var jie=Object.defineProperty,Lie=Object.defineProperties,Die=Object.getOwnPropertyDescriptors,dM=Object.getOwnPropertySymbols,Rie=Object.prototype.hasOwnProperty,zie=Object.prototype.propertyIsEnumerable,fM=(e,t,n)=>t in e?jie(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Aie=(e,t)=>{for(var n in t||(t={}))Rie.call(t,n)&&fM(e,n,t[n]);if(dM)for(var n of dM(t))zie.call(t,n)&&fM(e,n,t[n]);return e},Bie=(e,t)=>Lie(e,Die(t)),Fie=ue((e,{color:t,opacity:n,blur:r,radius:o,gradient:i,fixed:s,zIndex:a})=>({root:Bie(Aie({},e.fn.cover(0)),{position:s?"fixed":"absolute",backgroundColor:i?void 0:e.fn.rgba(t,n),backgroundImage:i,backdropFilter:r?`blur(${M(r)})`:void 0,borderRadius:e.fn.radius(o),zIndex:a,"&[data-center]":{display:"flex",alignItems:"center",justifyContent:"center"}})}));const Vie=Fie;var Hie=Object.defineProperty,Fg=Object.getOwnPropertySymbols,r4=Object.prototype.hasOwnProperty,o4=Object.prototype.propertyIsEnumerable,pM=(e,t,n)=>t in e?Hie(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Wie=(e,t)=>{for(var n in t||(t={}))r4.call(t,n)&&pM(e,n,t[n]);if(Fg)for(var n of Fg(t))o4.call(t,n)&&pM(e,n,t[n]);return e},Uie=(e,t)=>{var n={};for(var r in e)r4.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Fg)for(var r of Fg(e))t.indexOf(r)<0&&o4.call(e,r)&&(n[r]=e[r]);return n};const Zie={opacity:.6,color:"#000",zIndex:ii("modal"),radius:0},i4=_.forwardRef((e,t)=>{const n=ae("Overlay",Zie,e),{variant:r,opacity:o,color:i,blur:s,gradient:a,zIndex:c,radius:u,children:f,className:p,classNames:g,styles:v,unstyled:y,center:w,fixed:P}=n,x=Uie(n,["variant","opacity","color","blur","gradient","zIndex","radius","children","className","classNames","styles","unstyled","center","fixed"]),{classes:S,cx:O}=Vie({color:i,opacity:o,blur:s,radius:u,gradient:a,fixed:P,zIndex:c},{name:"Overlay",classNames:g,styles:v,unstyled:y,variant:r});return k.createElement(Pe,Wie({ref:t,className:O(S.root,p),"data-center":w||void 0},x),f)});i4.displayName="@mantine/core/Overlay";const s4=i4;var Gie=Object.defineProperty,Yie=Object.defineProperties,Kie=Object.getOwnPropertyDescriptors,Vg=Object.getOwnPropertySymbols,a4=Object.prototype.hasOwnProperty,l4=Object.prototype.propertyIsEnumerable,hM=(e,t,n)=>t in e?Gie(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,sd=(e,t)=>{for(var n in t||(t={}))a4.call(t,n)&&hM(e,n,t[n]);if(Vg)for(var n of Vg(t))l4.call(t,n)&&hM(e,n,t[n]);return e},qie=(e,t)=>Yie(e,Kie(t)),Jie=(e,t)=>{var n={};for(var r in e)a4.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Vg)for(var r of Vg(e))t.indexOf(r)<0&&l4.call(e,r)&&(n[r]=e[r]);return n};const Xie={},Qie=_.forwardRef((e,t)=>{const n=Cu(),r=ae(`${n.__staticSelector}Overlay`,Xie,e),{onClick:o,transitionProps:i,style:s,className:a}=r,c=Jie(r,["onClick","transitionProps","style","className"]),{classes:u,cx:f}=Iie(null,n.stylesApi),p=g=>{o?.(g),n.closeOnClickOutside&&n.onClose()};return k.createElement(Os,qie(sd(sd({mounted:n.opened},n.transitionProps),i),{transition:"fade"}),g=>k.createElement(s4,sd({ref:t,onClick:p,fixed:!0,style:sd(sd({},s),g),className:f(u.overlay,a),zIndex:n.zIndex},c)))});var ese=ue((e,{zIndex:t})=>({inner:{position:"fixed",width:"100%",top:0,bottom:0,maxHeight:"100%",zIndex:t,pointerEvents:"none"},content:{pointerEvents:"all"}}));const tse=ese;var nse=Object.defineProperty,Hg=Object.getOwnPropertySymbols,c4=Object.prototype.hasOwnProperty,u4=Object.prototype.propertyIsEnumerable,mM=(e,t,n)=>t in e?nse(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,ad=(e,t)=>{for(var n in t||(t={}))c4.call(t,n)&&mM(e,n,t[n]);if(Hg)for(var n of Hg(t))u4.call(t,n)&&mM(e,n,t[n]);return e},rse=(e,t)=>{var n={};for(var r in e)c4.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Hg)for(var r of Hg(e))t.indexOf(r)<0&&u4.call(e,r)&&(n[r]=e[r]);return n};const ose={},ise=_.forwardRef((e,t)=>{const n=Cu(),r=ae(`${n.__staticSelector}Content`,ose,e),{className:o,transitionProps:i,style:s,onKeyDown:a}=r,c=rse(r,["className","transitionProps","style","onKeyDown"]),{classes:u,cx:f}=tse({zIndex:n.zIndex},n.stylesApi),p=g=>{var v;((v=g.target)==null?void 0:v.getAttribute("data-mantine-stop-propagation"))!=="true"&&g.key==="Escape"&&n.closeOnEscape&&n.onClose(),a?.(g)};return k.createElement(Os,ad(ad({mounted:n.opened,transition:"pop"},n.transitionProps),i),g=>k.createElement("div",{className:f(u.inner)},k.createElement(_P,{active:n.opened&&n.trapFocus},k.createElement(mre,ad({component:"section",role:"dialog",tabIndex:-1,"aria-modal":!0,"aria-describedby":n.bodyMounted?n.getBodyId():void 0,"aria-labelledby":n.titleMounted?n.getTitleId():void 0,onKeyDown:p,ref:t,className:f(u.content,o),style:ad(ad({},s),g),shadow:n.shadow},c),c.children))))});var sse=ue((e,{padding:t})=>{const n=re({size:t,sizes:e.spacing});return{header:{display:"flex",justifyContent:"space-between",alignItems:"center",padding:n,paddingRight:`calc(${n} - ${M(5)})`,position:"sticky",top:0,backgroundColor:e.colorScheme==="dark"?e.colors.dark[7]:e.white,zIndex:1e3}}});const ase=sse;var lse=Object.defineProperty,Wg=Object.getOwnPropertySymbols,d4=Object.prototype.hasOwnProperty,f4=Object.prototype.propertyIsEnumerable,gM=(e,t,n)=>t in e?lse(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,cse=(e,t)=>{for(var n in t||(t={}))d4.call(t,n)&&gM(e,n,t[n]);if(Wg)for(var n of Wg(t))f4.call(t,n)&&gM(e,n,t[n]);return e},use=(e,t)=>{var n={};for(var r in e)d4.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Wg)for(var r of Wg(e))t.indexOf(r)<0&&f4.call(e,r)&&(n[r]=e[r]);return n};const dse={},fse=_.forwardRef((e,t)=>{const n=Cu(),r=ae(`${n.__staticSelector}Header`,dse,e),{className:o}=r,i=use(r,["className"]),{classes:s,cx:a}=ase({padding:n.padding},n.stylesApi);return k.createElement(Pe,cse({ref:t,className:a(s.header,o)},i))});var pse=ue(e=>({title:{lineHeight:1,padding:0,margin:0,fontWeight:400,fontSize:e.fontSizes.md}}));const hse=pse;var mse=Object.defineProperty,Ug=Object.getOwnPropertySymbols,p4=Object.prototype.hasOwnProperty,h4=Object.prototype.propertyIsEnumerable,vM=(e,t,n)=>t in e?mse(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,gse=(e,t)=>{for(var n in t||(t={}))p4.call(t,n)&&vM(e,n,t[n]);if(Ug)for(var n of Ug(t))h4.call(t,n)&&vM(e,n,t[n]);return e},vse=(e,t)=>{var n={};for(var r in e)p4.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Ug)for(var r of Ug(e))t.indexOf(r)<0&&h4.call(e,r)&&(n[r]=e[r]);return n};const yse={},_se=_.forwardRef((e,t)=>{const n=Cu(),r=ae(`${n.__staticSelector}Title`,yse,e),{className:o}=r,i=vse(r,["className"]),{classes:s,cx:a}=hse(null,n.stylesApi);return _.useEffect(()=>(n.setTitleMounted(!0),()=>n.setTitleMounted(!1)),[]),k.createElement(Pe,gse({component:"h2",id:n.getTitleId(),className:a(s.title,o),ref:t},i))});var wse=ue((e,{padding:t})=>({body:{padding:re({size:t,sizes:e.spacing}),"&:not(:only-child)":{paddingTop:0}}}));const bse=wse;var xse=Object.defineProperty,Zg=Object.getOwnPropertySymbols,m4=Object.prototype.hasOwnProperty,g4=Object.prototype.propertyIsEnumerable,yM=(e,t,n)=>t in e?xse(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Sse=(e,t)=>{for(var n in t||(t={}))m4.call(t,n)&&yM(e,n,t[n]);if(Zg)for(var n of Zg(t))g4.call(t,n)&&yM(e,n,t[n]);return e},Pse=(e,t)=>{var n={};for(var r in e)m4.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Zg)for(var r of Zg(e))t.indexOf(r)<0&&g4.call(e,r)&&(n[r]=e[r]);return n};const Ose={},Cse=_.forwardRef((e,t)=>{const n=Cu(),r=ae(`${n.__staticSelector}Body`,Ose,e),{className:o}=r,i=Pse(r,["className"]),{classes:s,cx:a}=bse({padding:n.padding},n.stylesApi);return _.useEffect(()=>(n.setBodyMounted(!0),()=>n.setBodyMounted(!1)),[]),k.createElement(Pe,Sse({id:n.getBodyId(),className:a(s.body,o),ref:t},i))});function kse({children:e}){return k.createElement(k.Fragment,null,e)}function Ese({opened:e,transitionDuration:t}){const[n,r]=_.useState(e),o=_.useRef(),s=fS()?0:t;return _.useEffect(()=>(e?(r(!0),window.clearTimeout(o.current)):s===0?r(!1):o.current=window.setTimeout(()=>r(!1),s),()=>window.clearTimeout(o.current)),[e,s]),n}var $se=ue(()=>({root:{}}));const Mse=$se;var Nse=Object.defineProperty,Tse=Object.defineProperties,Ise=Object.getOwnPropertyDescriptors,Gg=Object.getOwnPropertySymbols,v4=Object.prototype.hasOwnProperty,y4=Object.prototype.propertyIsEnumerable,_M=(e,t,n)=>t in e?Nse(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,A_=(e,t)=>{for(var n in t||(t={}))v4.call(t,n)&&_M(e,n,t[n]);if(Gg)for(var n of Gg(t))y4.call(t,n)&&_M(e,n,t[n]);return e},wM=(e,t)=>Tse(e,Ise(t)),jse=(e,t)=>{var n={};for(var r in e)v4.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Gg)for(var r of Gg(e))t.indexOf(r)<0&&y4.call(e,r)&&(n[r]=e[r]);return n};const Hf={closeOnClickOutside:!0,withinPortal:!0,lockScroll:!0,trapFocus:!0,returnFocus:!0,closeOnEscape:!0,keepMounted:!1,zIndex:ii("modal"),padding:"md",size:"md",shadow:"xl"};function tt(e){const t=ae("ModalBase",Hf,e),{opened:n,onClose:r,children:o,closeOnClickOutside:i,__staticSelector:s,transitionProps:a,withinPortal:c,portalProps:u,keepMounted:f,target:p,zIndex:g,lockScroll:v,trapFocus:y,closeOnEscape:w,returnFocus:P,padding:x,shadow:S,id:O,size:E,variant:$,classNames:N,unstyled:I,styles:R,className:B}=t,z=jse(t,["opened","onClose","children","closeOnClickOutside","__staticSelector","transitionProps","withinPortal","portalProps","keepMounted","target","zIndex","lockScroll","trapFocus","closeOnEscape","returnFocus","padding","shadow","id","size","variant","classNames","unstyled","styles","className"]),{classes:G,cx:X}=Mse(null,{name:s,classNames:N,styles:R,unstyled:I,variant:$,size:E}),Q=$a(O),[V,H]=_.useState(!1),[Z,Y]=_.useState(!1),j=typeof a?.duration=="number"?a?.duration:200,U=Ese({opened:n,transitionDuration:j});return mm("keydown",F=>{!y&&F.key==="Escape"&&w&&r()}),A3({opened:n,shouldReturnFocus:y&&P}),k.createElement(Af,wM(A_({},u),{withinPortal:c,target:p}),k.createElement(Pie,{value:{__staticSelector:s,opened:n,onClose:r,closeOnClickOutside:i,transitionProps:wM(A_({},a),{duration:j,keepMounted:f}),zIndex:g,padding:x,id:Q,getTitleId:()=>`${Q}-title`,getBodyId:()=>`${Q}-body`,titleMounted:V,bodyMounted:Z,setTitleMounted:H,setBodyMounted:Y,trapFocus:y,closeOnEscape:w,shadow:S,stylesApi:{name:s,size:E,variant:$,classNames:N,styles:R,unstyled:I}}},k.createElement(DW,{enabled:U&&v},k.createElement(Pe,A_({className:X(G.root,B)},z),o))))}tt.CloseButton=Nie;tt.Overlay=Qie;tt.Content=ise;tt.Header=fse;tt.Title=_se;tt.Body=Cse;tt.NativeScrollArea=kse;var Lse=Object.defineProperty,Dse=Object.defineProperties,Rse=Object.getOwnPropertyDescriptors,Yg=Object.getOwnPropertySymbols,_4=Object.prototype.hasOwnProperty,w4=Object.prototype.propertyIsEnumerable,bM=(e,t,n)=>t in e?Lse(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Gh=(e,t)=>{for(var n in t||(t={}))_4.call(t,n)&&bM(e,n,t[n]);if(Yg)for(var n of Yg(t))w4.call(t,n)&&bM(e,n,t[n]);return e},b4=(e,t)=>Dse(e,Rse(t)),zse=(e,t)=>{var n={};for(var r in e)_4.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Yg)for(var r of Yg(e))t.indexOf(r)<0&&w4.call(e,r)&&(n[r]=e[r]);return n};const Ase={top:"slide-down",bottom:"slide-up",left:"slide-right",right:"slide-left"},Bse={top:"slide-down",bottom:"slide-up",right:"slide-right",left:"slide-left"},Fse=b4(Gh({},Hf),{position:"left"});function x4(e){const t=ae("DrawerRoot",Fse,e),{classNames:n,variant:r,size:o,scrollAreaComponent:i,position:s,transitionProps:a}=t,c=zse(t,["classNames","variant","size","scrollAreaComponent","position","transitionProps"]),{classes:u,cx:f,theme:p}=Sie({position:s},{name:"Drawer",variant:r,size:o}),g=(p.dir==="rtl"?Bse:Ase)[s];return k.createElement(wie,{value:{scrollAreaComponent:i}},k.createElement(tt,Gh({__staticSelector:"Drawer",size:o,variant:r,transitionProps:Gh({transition:g,duration:200},a),classNames:b4(Gh({},n),{content:f(u.content,n?.content),inner:f(u.inner,n?.inner)})},c)))}var Vse=Object.defineProperty,Kg=Object.getOwnPropertySymbols,S4=Object.prototype.hasOwnProperty,P4=Object.prototype.propertyIsEnumerable,xM=(e,t,n)=>t in e?Vse(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Hse=(e,t)=>{for(var n in t||(t={}))S4.call(t,n)&&xM(e,n,t[n]);if(Kg)for(var n of Kg(t))P4.call(t,n)&&xM(e,n,t[n]);return e},Wse=(e,t)=>{var n={};for(var r in e)S4.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Kg)for(var r of Kg(e))t.indexOf(r)<0&&P4.call(e,r)&&(n[r]=e[r]);return n};const Use={shadow:"xl"},O4=_.forwardRef((e,t)=>{const n=ae("ModalContent",Use,e),{children:r,scrollAreaComponent:o}=n,i=Wse(n,["children","scrollAreaComponent"]),s=bie(),a=o||s.scrollAreaComponent||tt.NativeScrollArea;return k.createElement(tt.Content,Hse({ref:t,radius:0},i),k.createElement(a,{style:{height:"100vh"}},r))});var Zse=Object.defineProperty,Gse=Object.defineProperties,Yse=Object.getOwnPropertyDescriptors,qg=Object.getOwnPropertySymbols,C4=Object.prototype.hasOwnProperty,k4=Object.prototype.propertyIsEnumerable,SM=(e,t,n)=>t in e?Zse(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Yh=(e,t)=>{for(var n in t||(t={}))C4.call(t,n)&&SM(e,n,t[n]);if(qg)for(var n of qg(t))k4.call(t,n)&&SM(e,n,t[n]);return e},Kse=(e,t)=>Gse(e,Yse(t)),qse=(e,t)=>{var n={};for(var r in e)C4.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&qg)for(var r of qg(e))t.indexOf(r)<0&&k4.call(e,r)&&(n[r]=e[r]);return n};const Jse=Kse(Yh({},Hf),{withOverlay:!0,withCloseButton:!0});function Cs(e){const t=ae("Drawer",Jse,e),{title:n,withOverlay:r,overlayProps:o,withCloseButton:i,closeButtonProps:s,children:a}=t,c=qse(t,["title","withOverlay","overlayProps","withCloseButton","closeButtonProps","children"]),u=!!n||i;return k.createElement(x4,Yh({},c),r&&k.createElement(tt.Overlay,Yh({},o)),k.createElement(O4,null,u&&k.createElement(tt.Header,null,n&&k.createElement(tt.Title,null,n),i&&k.createElement(tt.CloseButton,Yh({},s))),k.createElement(tt.Body,null,a)))}Cs.Root=x4;Cs.CloseButton=tt.CloseButton;Cs.Overlay=tt.Overlay;Cs.Content=O4;Cs.Header=tt.Header;Cs.Title=tt.Title;Cs.Body=tt.Body;Cs.NativeScrollArea=tt.NativeScrollArea;function Xse(e){return _.Children.toArray(e).filter(Boolean)}const Qse={left:"flex-start",center:"center",right:"flex-end",apart:"space-between"};var eae=ue((e,{spacing:t,position:n,noWrap:r,grow:o,align:i,count:s})=>({root:{boxSizing:"border-box",display:"flex",flexDirection:"row",alignItems:i||"center",flexWrap:r?"nowrap":"wrap",justifyContent:Qse[n],gap:re({size:t,sizes:e.spacing}),"& > *":{boxSizing:"border-box",maxWidth:o?`calc(${100/s}% - (${M(re({size:t,sizes:e.spacing}))} - ${re({size:t,sizes:e.spacing})} / ${s}))`:void 0,flexGrow:o?1:0}}}));const tae=eae;var nae=Object.defineProperty,Jg=Object.getOwnPropertySymbols,E4=Object.prototype.hasOwnProperty,$4=Object.prototype.propertyIsEnumerable,PM=(e,t,n)=>t in e?nae(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,rae=(e,t)=>{for(var n in t||(t={}))E4.call(t,n)&&PM(e,n,t[n]);if(Jg)for(var n of Jg(t))$4.call(t,n)&&PM(e,n,t[n]);return e},oae=(e,t)=>{var n={};for(var r in e)E4.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Jg)for(var r of Jg(e))t.indexOf(r)<0&&$4.call(e,r)&&(n[r]=e[r]);return n};const iae={position:"left",spacing:"md"},nt=_.forwardRef((e,t)=>{const n=ae("Group",iae,e),{className:r,position:o,align:i,children:s,noWrap:a,grow:c,spacing:u,unstyled:f,variant:p}=n,g=oae(n,["className","position","align","children","noWrap","grow","spacing","unstyled","variant"]),v=Xse(s),{classes:y,cx:w}=tae({align:i,grow:c,noWrap:a,spacing:u,position:o,count:v.length},{unstyled:f,name:"Group",variant:p});return k.createElement(Pe,rae({className:w(y.root,r),ref:t},g),v)});nt.displayName="@mantine/core/Group";function sae({open:e,close:t,openDelay:n,closeDelay:r}){const o=_.useRef(-1),i=_.useRef(-1),s=()=>{window.clearTimeout(o.current),window.clearTimeout(i.current)},a=()=>{s(),n===0?e():o.current=window.setTimeout(e,n)},c=()=>{s(),r===0?t():i.current=window.setTimeout(t,r)};return _.useEffect(()=>s,[]),{openDropdown:a,closeDropdown:c}}var aae=Object.defineProperty,Xg=Object.getOwnPropertySymbols,M4=Object.prototype.hasOwnProperty,N4=Object.prototype.propertyIsEnumerable,OM=(e,t,n)=>t in e?aae(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,CM=(e,t)=>{for(var n in t||(t={}))M4.call(t,n)&&OM(e,n,t[n]);if(Xg)for(var n of Xg(t))N4.call(t,n)&&OM(e,n,t[n]);return e},lae=(e,t)=>{var n={};for(var r in e)M4.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Xg)for(var r of Xg(e))t.indexOf(r)<0&&N4.call(e,r)&&(n[r]=e[r]);return n};function cae(e){const t=e,{width:n,height:r,style:o}=t,i=lae(t,["width","height","style"]);return k.createElement("svg",CM({viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:CM({width:n,height:r},o)},i),k.createElement("path",{d:"M2.5 1H12.5C13.3284 1 14 1.67157 14 2.5V12.5C14 13.3284 13.3284 14 12.5 14H2.5C1.67157 14 1 13.3284 1 12.5V2.5C1 1.67157 1.67157 1 2.5 1ZM2.5 2C2.22386 2 2 2.22386 2 2.5V8.3636L3.6818 6.6818C3.76809 6.59551 3.88572 6.54797 4.00774 6.55007C4.12975 6.55216 4.24568 6.60372 4.32895 6.69293L7.87355 10.4901L10.6818 7.6818C10.8575 7.50607 11.1425 7.50607 11.3182 7.6818L13 9.3636V2.5C13 2.22386 12.7761 2 12.5 2H2.5ZM2 12.5V9.6364L3.98887 7.64753L7.5311 11.4421L8.94113 13H2.5C2.22386 13 2 12.7761 2 12.5ZM12.5 13H10.155L8.48336 11.153L11 8.6364L13 10.6364V12.5C13 12.7761 12.7761 13 12.5 13ZM6.64922 5.5C6.64922 5.03013 7.03013 4.64922 7.5 4.64922C7.96987 4.64922 8.35078 5.03013 8.35078 5.5C8.35078 5.96987 7.96987 6.35078 7.5 6.35078C7.03013 6.35078 6.64922 5.96987 6.64922 5.5ZM7.5 3.74922C6.53307 3.74922 5.74922 4.53307 5.74922 5.5C5.74922 6.46693 6.53307 7.25078 7.5 7.25078C8.46693 7.25078 9.25078 6.46693 9.25078 5.5C9.25078 4.53307 8.46693 3.74922 7.5 3.74922Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"}))}var uae=Object.defineProperty,dae=Object.defineProperties,fae=Object.getOwnPropertyDescriptors,kM=Object.getOwnPropertySymbols,pae=Object.prototype.hasOwnProperty,hae=Object.prototype.propertyIsEnumerable,EM=(e,t,n)=>t in e?uae(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,$M=(e,t)=>{for(var n in t||(t={}))pae.call(t,n)&&EM(e,n,t[n]);if(kM)for(var n of kM(t))hae.call(t,n)&&EM(e,n,t[n]);return e},MM=(e,t)=>dae(e,fae(t)),mae=ue((e,{radius:t})=>({root:{},imageWrapper:{position:"relative"},figure:{margin:0},image:MM($M({},e.fn.fontStyles()),{display:"block",width:"100%",height:"100%",border:0,borderRadius:e.fn.radius(t)}),caption:{color:e.colorScheme==="dark"?e.colors.dark[2]:e.colors.gray[7],marginTop:e.spacing.xs},placeholder:MM($M({},e.fn.cover()),{display:"flex",alignItems:"center",justifyContent:"center",color:e.colorScheme==="dark"?e.colors.dark[2]:e.colors.gray[6],backgroundColor:e.colorScheme==="dark"?e.colors.dark[8]:e.colors.gray[0],borderRadius:e.fn.radius(t)})}));const gae=mae;var vae=Object.defineProperty,yae=Object.defineProperties,_ae=Object.getOwnPropertyDescriptors,Qg=Object.getOwnPropertySymbols,T4=Object.prototype.hasOwnProperty,I4=Object.prototype.propertyIsEnumerable,NM=(e,t,n)=>t in e?vae(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,ld=(e,t)=>{for(var n in t||(t={}))T4.call(t,n)&&NM(e,n,t[n]);if(Qg)for(var n of Qg(t))I4.call(t,n)&&NM(e,n,t[n]);return e},wae=(e,t)=>yae(e,_ae(t)),bae=(e,t)=>{var n={};for(var r in e)T4.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Qg)for(var r of Qg(e))t.indexOf(r)<0&&I4.call(e,r)&&(n[r]=e[r]);return n};const xae={fit:"cover",width:"100%",height:"auto",radius:0},ri=_.forwardRef((e,t)=>{const n=ae("Image",xae,e),{className:r,alt:o,src:i,fit:s,width:a,height:c,radius:u,imageProps:f,withPlaceholder:p,placeholder:g,imageRef:v,classNames:y,styles:w,caption:P,unstyled:x,style:S,variant:O}=n,E=bae(n,["className","alt","src","fit","width","height","radius","imageProps","withPlaceholder","placeholder","imageRef","classNames","styles","caption","unstyled","style","variant"]),{classes:$,cx:N}=gae({radius:u},{classNames:y,styles:w,unstyled:x,name:"Image",variant:O}),[I,R]=_.useState(!i),B=p&&I;return Fn(()=>{R(!i)},[i]),k.createElement(Pe,ld({className:N($.root,r),style:ld({width:M(a)},S),ref:t},E),k.createElement("figure",{className:$.figure},k.createElement("div",{className:$.imageWrapper},k.createElement("img",wae(ld({src:i,alt:o,ref:v},f),{className:N($.image,f?.className),onError:z=>{R(!0),typeof f?.onError=="function"&&f.onError(z)},style:ld(ld({objectFit:s,width:M(a),height:M(c)},B&&{overflow:"hidden"}),f?.style)})),B&&k.createElement("div",{className:$.placeholder,title:o},g||k.createElement("div",null,k.createElement(cae,{width:M(40),height:M(40)})))),!!P&&k.createElement(W,{component:"figcaption",size:"sm",align:"center",className:$.caption},P)))});ri.displayName="@mantine/core/Image";var Sae=Object.defineProperty,Pae=Object.defineProperties,Oae=Object.getOwnPropertyDescriptors,TM=Object.getOwnPropertySymbols,Cae=Object.prototype.hasOwnProperty,kae=Object.prototype.propertyIsEnumerable,IM=(e,t,n)=>t in e?Sae(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,jM=(e,t)=>{for(var n in t||(t={}))Cae.call(t,n)&&IM(e,n,t[n]);if(TM)for(var n of TM(t))kae.call(t,n)&&IM(e,n,t[n]);return e},LM=(e,t)=>Pae(e,Oae(t));const Eae=e=>SZ({from:{boxShadow:`0 0 ${M(.5)} 0 ${e}`,opacity:.6},to:{boxShadow:`0 0 ${M(.5)} ${M(4.4)} ${e}`,opacity:0}});function DM(e,t=0){const n={},[r,o]=e.split("-");let i="",s="";return r==="top"&&(n.top=t,s="-50%"),r==="middle"&&(n.top="50%",s="-50%"),r==="bottom"&&(n.bottom=t,s="50%"),o==="start"&&(n.left=t,i="-50%"),o==="center"&&(n.left="50%",i="-50%"),o==="end"&&(n.right=t,i="50%"),n.transform=`translate(${i}, ${s})`,n}var $ae=ue((e,{radius:t,color:n,position:r,offset:o,inline:i,withBorder:s,withLabel:a,zIndex:c},{size:u})=>{const{background:f}=e.fn.variant({variant:"filled",primaryFallback:!1,color:n||e.primaryColor}),p=M(u);return{root:{position:"relative",display:i?"inline-block":"block"},indicator:LM(jM({},DM(r,o)),{zIndex:c,position:"absolute",[a?"minWidth":"width"]:p,height:p,display:"flex",justifyContent:"center",alignItems:"center",fontSize:e.fontSizes.xs,paddingLeft:a?`calc(${e.spacing.xs} / 2)`:0,paddingRight:a?`calc(${e.spacing.xs} / 2)`:0,borderRadius:e.fn.radius(t),backgroundColor:e.fn.variant({variant:"filled",primaryFallback:!1,color:n||e.primaryColor}).background,border:s?`${M(2)} solid ${e.colorScheme==="dark"?e.colors.dark[7]:e.white}`:void 0,color:e.white,whiteSpace:"nowrap"}),processing:{animation:`${Eae(f)} 1000ms linear infinite`},common:LM(jM({},DM(r,o)),{position:"absolute",[a?"minWidth":"width"]:p,height:p,borderRadius:e.fn.radius(t)})}});const Mae=$ae;var Nae=Object.defineProperty,ev=Object.getOwnPropertySymbols,j4=Object.prototype.hasOwnProperty,L4=Object.prototype.propertyIsEnumerable,RM=(e,t,n)=>t in e?Nae(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Tae=(e,t)=>{for(var n in t||(t={}))j4.call(t,n)&&RM(e,n,t[n]);if(ev)for(var n of ev(t))L4.call(t,n)&&RM(e,n,t[n]);return e},Iae=(e,t)=>{var n={};for(var r in e)j4.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&ev)for(var r of ev(e))t.indexOf(r)<0&&L4.call(e,r)&&(n[r]=e[r]);return n};const jae={position:"top-end",offset:0,inline:!1,withBorder:!1,disabled:!1,processing:!1,size:10,radius:1e3,zIndex:ii("app")},D4=_.forwardRef((e,t)=>{const n=ae("Indicator",jae,e),{children:r,position:o,offset:i,size:s,radius:a,inline:c,withBorder:u,className:f,color:p,styles:g,label:v,classNames:y,disabled:w,zIndex:P,unstyled:x,processing:S,variant:O}=n,E=Iae(n,["children","position","offset","size","radius","inline","withBorder","className","color","styles","label","classNames","disabled","zIndex","unstyled","processing","variant"]),{classes:$,cx:N}=Mae({position:o,offset:i,radius:a,inline:c,color:p,withBorder:u,zIndex:P,withLabel:!!v},{name:"Indicator",classNames:y,styles:g,unstyled:x,variant:O,size:s});return k.createElement(Pe,Tae({ref:t,className:N($.root,f)},E),!w&&k.createElement(k.Fragment,null,k.createElement("div",{className:N($.indicator,$.common)},v),S&&k.createElement("div",{className:N($.processing,$.common)})),r)});D4.displayName="@mantine/core/Indicator";function Lae(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,i;for(i=0;i=0)&&(n[o]=e[o]);return n}var Dae=_.useLayoutEffect,Rae=function(t){var n=_.useRef(t);return Dae(function(){n.current=t}),n},zM=function(t,n){if(typeof t=="function"){t(n);return}t.current=n},zae=function(t,n){var r=_.useRef();return _.useCallback(function(o){t.current=o,r.current&&zM(r.current,null),r.current=n,n&&zM(n,o)},[n])},AM={"min-height":"0","max-height":"none",height:"0",visibility:"hidden",overflow:"hidden",position:"absolute","z-index":"-1000",top:"0",right:"0"},BM=function(t){Object.keys(AM).forEach(function(n){t.style.setProperty(n,AM[n],"important")})},eo=null,Aae=function(t,n){var r=t.scrollHeight;return n.sizingStyle.boxSizing==="border-box"?r+n.borderSize:r-n.paddingSize};function Bae(e,t,n,r){n===void 0&&(n=1),r===void 0&&(r=1/0),eo||(eo=document.createElement("textarea"),eo.setAttribute("tabindex","-1"),eo.setAttribute("aria-hidden","true"),BM(eo)),eo.parentNode===null&&document.body.appendChild(eo);var o=e.paddingSize,i=e.borderSize,s=e.sizingStyle,a=s.boxSizing;Object.keys(s).forEach(function(g){var v=g;eo.style[v]=s[v]}),BM(eo),eo.value=t;var c=Aae(eo,e);eo.value="x";var u=eo.scrollHeight-o,f=u*n;a==="border-box"&&(f=f+o+i),c=Math.max(f,c);var p=u*r;return a==="border-box"&&(p=p+o+i),c=Math.min(p,c),[c,u]}var FM=function(){},Fae=function(t,n){return t.reduce(function(r,o){return r[o]=n[o],r},{})},Vae=["borderBottomWidth","borderLeftWidth","borderRightWidth","borderTopWidth","boxSizing","fontFamily","fontSize","fontStyle","fontWeight","letterSpacing","lineHeight","paddingBottom","paddingLeft","paddingRight","paddingTop","tabSize","textIndent","textRendering","textTransform","width","wordBreak"],Hae=!!document.documentElement.currentStyle,Wae=function(t){var n=window.getComputedStyle(t);if(n===null)return null;var r=Fae(Vae,n),o=r.boxSizing;if(o==="")return null;Hae&&o==="border-box"&&(r.width=parseFloat(r.width)+parseFloat(r.borderRightWidth)+parseFloat(r.borderLeftWidth)+parseFloat(r.paddingRight)+parseFloat(r.paddingLeft)+"px");var i=parseFloat(r.paddingBottom)+parseFloat(r.paddingTop),s=parseFloat(r.borderBottomWidth)+parseFloat(r.borderTopWidth);return{sizingStyle:r,paddingSize:i,borderSize:s}},Uae=function(t){var n=Rae(t);_.useLayoutEffect(function(){var r=function(i){n.current(i)};return window.addEventListener("resize",r),function(){window.removeEventListener("resize",r)}},[])},Zae=function(t,n){var r=t.cacheMeasurements,o=t.maxRows,i=t.minRows,s=t.onChange,a=s===void 0?FM:s,c=t.onHeightChange,u=c===void 0?FM:c,f=Lae(t,["cacheMeasurements","maxRows","minRows","onChange","onHeightChange"]),p=f.value!==void 0,g=_.useRef(null),v=zae(g,n),y=_.useRef(0),w=_.useRef(),P=function(){var O=g.current,E=r&&w.current?w.current:Wae(O);if(E){w.current=E;var $=Bae(E,O.value||O.placeholder||"x",i,o),N=$[0],I=$[1];y.current!==N&&(y.current=N,O.style.setProperty("height",N+"px","important"),u(N,{rowHeight:I}))}},x=function(O){p||P(),a(O)};return _.useLayoutEffect(P),Uae(P),_.createElement("textarea",Lt({},f,{onChange:x,ref:v}))},Gae=_.forwardRef(Zae);const Yae=Gae;var Kae=ue(e=>({input:{paddingTop:e.spacing.xs,paddingBottom:e.spacing.xs}}));const qae=Kae;var Jae=Object.defineProperty,Xae=Object.defineProperties,Qae=Object.getOwnPropertyDescriptors,tv=Object.getOwnPropertySymbols,R4=Object.prototype.hasOwnProperty,z4=Object.prototype.propertyIsEnumerable,VM=(e,t,n)=>t in e?Jae(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,lc=(e,t)=>{for(var n in t||(t={}))R4.call(t,n)&&VM(e,n,t[n]);if(tv)for(var n of tv(t))z4.call(t,n)&&VM(e,n,t[n]);return e},B_=(e,t)=>Xae(e,Qae(t)),ele=(e,t)=>{var n={};for(var r in e)R4.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&tv)for(var r of tv(e))t.indexOf(r)<0&&z4.call(e,r)&&(n[r]=e[r]);return n};const tle={autosize:!1,size:"sm",__staticSelector:"Textarea"},A4=_.forwardRef((e,t)=>{const n=ae("Textarea",tle,e),{autosize:r,maxRows:o,minRows:i,label:s,error:a,description:c,id:u,className:f,required:p,style:g,wrapperProps:v,classNames:y,styles:w,size:P,__staticSelector:x,sx:S,errorProps:O,descriptionProps:E,labelProps:$,inputWrapperOrder:N,inputContainer:I,unstyled:R,withAsterisk:B,variant:z}=n,G=ele(n,["autosize","maxRows","minRows","label","error","description","id","className","required","style","wrapperProps","classNames","styles","size","__staticSelector","sx","errorProps","descriptionProps","labelProps","inputWrapperOrder","inputContainer","unstyled","withAsterisk","variant"]),X=$a(u),{classes:Q,cx:V}=qae(),{systemStyles:H,rest:Z}=Dl(G),Y=lc({required:p,ref:t,error:a,id:X,classNames:B_(lc({},y),{input:V(Q.input,y?.input)}),styles:w,__staticSelector:x,size:P,multiline:!0,unstyled:R,variant:z},Z);return k.createElement(et.Wrapper,lc(lc({label:s,error:a,id:X,description:c,required:p,style:g,className:f,classNames:y,styles:w,size:P,__staticSelector:x,sx:S,errorProps:O,labelProps:$,descriptionProps:E,inputContainer:I,inputWrapperOrder:N,unstyled:R,withAsterisk:B,variant:z},H),v),r?k.createElement(et,B_(lc({},Y),{component:Yae,maxRows:o,minRows:i})):k.createElement(et,B_(lc({},Y),{component:"textarea",rows:i})))});A4.displayName="@mantine/core/Textarea";var nle=Object.defineProperty,rle=Object.defineProperties,ole=Object.getOwnPropertyDescriptors,HM=Object.getOwnPropertySymbols,ile=Object.prototype.hasOwnProperty,sle=Object.prototype.propertyIsEnumerable,WM=(e,t,n)=>t in e?nle(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,ale=(e,t)=>{for(var n in t||(t={}))ile.call(t,n)&&WM(e,n,t[n]);if(HM)for(var n of HM(t))sle.call(t,n)&&WM(e,n,t[n]);return e},lle=(e,t)=>rle(e,ole(t)),cle=ue(e=>({root:lle(ale({},e.fn.cover()),{display:"flex",alignItems:"center",justifyContent:"center",overflow:"hidden"})}));const ule=cle;var dle=Object.defineProperty,fle=Object.defineProperties,ple=Object.getOwnPropertyDescriptors,nv=Object.getOwnPropertySymbols,B4=Object.prototype.hasOwnProperty,F4=Object.prototype.propertyIsEnumerable,UM=(e,t,n)=>t in e?dle(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,th=(e,t)=>{for(var n in t||(t={}))B4.call(t,n)&&UM(e,n,t[n]);if(nv)for(var n of nv(t))F4.call(t,n)&&UM(e,n,t[n]);return e},hle=(e,t)=>fle(e,ple(t)),mle=(e,t)=>{var n={};for(var r in e)B4.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&nv)for(var r of nv(e))t.indexOf(r)<0&&F4.call(e,r)&&(n[r]=e[r]);return n};const gle={overlayOpacity:.75,transitionDuration:0,radius:0,zIndex:ii("overlay")},Wf=_.forwardRef((e,t)=>{const n=ae("LoadingOverlay",gle,e),{className:r,visible:o,loaderProps:i,overlayOpacity:s,overlayColor:a,transitionDuration:c,exitTransitionDuration:u,zIndex:f,style:p,loader:g,radius:v,overlayBlur:y,unstyled:w,variant:P,keepMounted:x}=n,S=mle(n,["className","visible","loaderProps","overlayOpacity","overlayColor","transitionDuration","exitTransitionDuration","zIndex","style","loader","radius","overlayBlur","unstyled","variant","keepMounted"]),{classes:O,cx:E,theme:$}=ule(null,{name:"LoadingOverlay",unstyled:w,variant:P}),N=`calc(${f} + 1)`;return k.createElement(Os,{keepMounted:x,duration:c,exitDuration:u,mounted:o,transition:"fade"},I=>k.createElement(Pe,th({className:E(O.root,r),style:hle(th(th({},I),p),{zIndex:f}),ref:t},S),g?k.createElement("div",{style:{zIndex:N}},g):k.createElement(en,th({style:{zIndex:N}},i)),k.createElement(s4,{opacity:s,zIndex:f,radius:v,blur:y,unstyled:w,color:a||($.colorScheme==="dark"?$.colors.dark[5]:$.white)})))});Wf.displayName="@mantine/core/LoadingOverlay";const V4={context:"Menu component was not found in the tree",children:"Menu.Target component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported"},[vle,Uf]=bu(V4.context);var yle=ue(e=>({divider:{marginTop:M(4),marginBottom:M(4),borderTop:`${M(1)} solid ${e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[2]}`}}));const _le=yle;var wle=Object.defineProperty,rv=Object.getOwnPropertySymbols,H4=Object.prototype.hasOwnProperty,W4=Object.prototype.propertyIsEnumerable,ZM=(e,t,n)=>t in e?wle(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,ble=(e,t)=>{for(var n in t||(t={}))H4.call(t,n)&&ZM(e,n,t[n]);if(rv)for(var n of rv(t))W4.call(t,n)&&ZM(e,n,t[n]);return e},xle=(e,t)=>{var n={};for(var r in e)H4.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&rv)for(var r of rv(e))t.indexOf(r)<0&&W4.call(e,r)&&(n[r]=e[r]);return n};const Sle={},U4=_.forwardRef((e,t)=>{const n=ae("MenuDivider",Sle,e),{children:r,className:o}=n,i=xle(n,["children","className"]),{classNames:s,styles:a,unstyled:c,variant:u}=Uf(),{classes:f,cx:p}=_le(null,{name:"Menu",classNames:s,styles:a,unstyled:c,variant:u});return k.createElement(Pe,ble({className:p(f.divider,o),ref:t},i))});U4.displayName="@mantine/core/MenuDivider";var Ple=Object.defineProperty,ov=Object.getOwnPropertySymbols,Z4=Object.prototype.hasOwnProperty,G4=Object.prototype.propertyIsEnumerable,GM=(e,t,n)=>t in e?Ple(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Ole=(e,t)=>{for(var n in t||(t={}))Z4.call(t,n)&&GM(e,n,t[n]);if(ov)for(var n of ov(t))G4.call(t,n)&&GM(e,n,t[n]);return e},Cle=(e,t)=>{var n={};for(var r in e)Z4.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&ov)for(var r of ov(e))t.indexOf(r)<0&&G4.call(e,r)&&(n[r]=e[r]);return n};const kle={};function Y4(e){const t=ae("MenuDropdown",kle,e),{children:n,onMouseEnter:r,onMouseLeave:o}=t,i=Cle(t,["children","onMouseEnter","onMouseLeave"]),s=_.useRef(),a=Uf(),c=p=>{var g;(p.key==="ArrowUp"||p.key==="ArrowDown")&&(p.preventDefault(),(g=s.current.querySelectorAll("[data-menu-item]:not(:disabled)")[0])==null||g.focus())},u=is(r,()=>a.trigger==="hover"&&a.openDropdown()),f=is(o,()=>a.trigger==="hover"&&a.closeDropdown());return k.createElement(kn.Dropdown,Ole({onMouseEnter:u,onMouseLeave:f,role:"menu","aria-orientation":"vertical"},i),k.createElement("div",{tabIndex:-1,"data-menu-dropdown":!0,"data-autofocus":!0,onKeyDown:c,ref:s,style:{outline:0}},n))}Y4.displayName="@mantine/core/MenuDropdown";var Ele=Object.defineProperty,$le=Object.defineProperties,Mle=Object.getOwnPropertyDescriptors,YM=Object.getOwnPropertySymbols,Nle=Object.prototype.hasOwnProperty,Tle=Object.prototype.propertyIsEnumerable,KM=(e,t,n)=>t in e?Ele(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Ile=(e,t)=>{for(var n in t||(t={}))Nle.call(t,n)&&KM(e,n,t[n]);if(YM)for(var n of YM(t))Tle.call(t,n)&&KM(e,n,t[n]);return e},jle=(e,t)=>$le(e,Mle(t)),Lle=ue((e,{color:t,radius:n})=>({item:jle(Ile({},e.fn.fontStyles()),{WebkitTapHighlightColor:"transparent",fontSize:e.fontSizes.sm,border:0,backgroundColor:"transparent",outline:0,width:"100%",textAlign:"left",textDecoration:"none",boxSizing:"border-box",padding:`${e.spacing.xs} ${e.spacing.sm}`,cursor:"pointer",borderRadius:e.fn.radius(n),color:t?e.fn.variant({variant:"filled",primaryFallback:!1,color:t}).background:e.colorScheme==="dark"?e.colors.dark[0]:e.black,display:"flex",alignItems:"center","&:disabled":{color:e.colorScheme==="dark"?e.colors.dark[3]:e.colors.gray[5],pointerEvents:"none",userSelect:"none"},"&[data-hovered]":{backgroundColor:t?e.fn.variant({variant:"light",color:t}).background:e.colorScheme==="dark"?e.fn.rgba(e.colors.dark[3],.35):e.colors.gray[1]}}),itemLabel:{flex:1},itemIcon:{display:"flex",justifyContent:"center",alignItems:"center",marginRight:e.spacing.xs},itemRightSection:{}}));const Dle=Lle;var Rle=Object.defineProperty,zle=Object.defineProperties,Ale=Object.getOwnPropertyDescriptors,iv=Object.getOwnPropertySymbols,K4=Object.prototype.hasOwnProperty,q4=Object.prototype.propertyIsEnumerable,qM=(e,t,n)=>t in e?Rle(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Ble=(e,t)=>{for(var n in t||(t={}))K4.call(t,n)&&qM(e,n,t[n]);if(iv)for(var n of iv(t))q4.call(t,n)&&qM(e,n,t[n]);return e},Fle=(e,t)=>zle(e,Ale(t)),Vle=(e,t)=>{var n={};for(var r in e)K4.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&iv)for(var r of iv(e))t.indexOf(r)<0&&q4.call(e,r)&&(n[r]=e[r]);return n};const Hle={},J4=_.forwardRef((e,t)=>{const n=ae("MenuItem",Hle,e),{children:r,className:o,color:i,closeMenuOnClick:s,icon:a,rightSection:c}=n,u=Vle(n,["children","className","color","closeMenuOnClick","icon","rightSection"]),f=Uf(),{classes:p,cx:g,theme:v}=Dle({radius:f.radius,color:i},{name:"Menu",classNames:f.classNames,styles:f.styles,unstyled:f.unstyled,variant:f.variant}),y=_.useRef(),w=f.getItemIndex(y.current),P=u,x=is(P.onMouseLeave,()=>f.setHovered(-1)),S=is(P.onMouseEnter,()=>f.setHovered(f.getItemIndex(y.current))),O=is(P.onClick,()=>{typeof s=="boolean"?s&&f.closeDropdownImmediately():f.closeOnItemClick&&f.closeDropdownImmediately()}),E=is(P.onFocus,()=>f.setHovered(f.getItemIndex(y.current)));return k.createElement(Pe,Fle(Ble({component:"button",type:"button"},u),{tabIndex:-1,onFocus:E,className:g(p.item,o),ref:ws(y,t),role:"menuitem","data-menu-item":!0,"data-hovered":f.hovered===w?!0:void 0,onMouseEnter:S,onMouseLeave:x,onClick:O,onKeyDown:BW({siblingSelector:"[data-menu-item]",parentSelector:"[data-menu-dropdown]",activateOnFocus:!1,loop:f.loop,dir:v.dir,orientation:"vertical",onKeyDown:P.onKeydown})}),a&&k.createElement("div",{className:p.itemIcon},a),r&&k.createElement("div",{className:p.itemLabel},r),c&&k.createElement("div",{className:p.itemRightSection},c))});J4.displayName="@mantine/core/MenuItem";const Wle=J4;var Ule=ue(e=>({label:{color:e.colorScheme==="dark"?e.colors.dark[2]:e.colors.gray[6],fontWeight:500,fontSize:e.fontSizes.xs,padding:`calc(${e.spacing.xs} / 2) ${e.spacing.sm}`,cursor:"default"}}));const Zle=Ule;var Gle=Object.defineProperty,sv=Object.getOwnPropertySymbols,X4=Object.prototype.hasOwnProperty,Q4=Object.prototype.propertyIsEnumerable,JM=(e,t,n)=>t in e?Gle(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Yle=(e,t)=>{for(var n in t||(t={}))X4.call(t,n)&&JM(e,n,t[n]);if(sv)for(var n of sv(t))Q4.call(t,n)&&JM(e,n,t[n]);return e},Kle=(e,t)=>{var n={};for(var r in e)X4.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&sv)for(var r of sv(e))t.indexOf(r)<0&&Q4.call(e,r)&&(n[r]=e[r]);return n};const qle={},e6=_.forwardRef((e,t)=>{const n=ae("MenuLabel",qle,e),{children:r,className:o}=n,i=Kle(n,["children","className"]),{classNames:s,styles:a,unstyled:c,variant:u}=Uf(),{classes:f,cx:p}=Zle(null,{name:"Menu",classNames:s,styles:a,unstyled:c,variant:u});return k.createElement(W,Yle({className:p(f.label,o),ref:t},i),r)});e6.displayName="@mantine/core/MenuLabel";var Jle=Object.defineProperty,av=Object.getOwnPropertySymbols,t6=Object.prototype.hasOwnProperty,n6=Object.prototype.propertyIsEnumerable,XM=(e,t,n)=>t in e?Jle(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Xle=(e,t)=>{for(var n in t||(t={}))t6.call(t,n)&&XM(e,n,t[n]);if(av)for(var n of av(t))n6.call(t,n)&&XM(e,n,t[n]);return e},Qle=(e,t)=>{var n={};for(var r in e)t6.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&av)for(var r of av(e))t.indexOf(r)<0&&n6.call(e,r)&&(n[r]=e[r]);return n};const ece={refProp:"ref"},r6=_.forwardRef((e,t)=>{const n=ae("MenuTarget",ece,e),{children:r,refProp:o}=n,i=Qle(n,["children","refProp"]);if(!Nf(r))throw new Error(V4.children);const s=Uf(),a=is(r.props.onClick,()=>s.trigger==="click"&&s.toggleDropdown()),c=is(r.props.onMouseEnter,()=>s.trigger==="hover"&&s.openDropdown()),u=is(r.props.onMouseLeave,()=>s.trigger==="hover"&&s.closeDropdown());return k.createElement(kn.Target,Xle({refProp:o,popupType:"menu",ref:t},i),_.cloneElement(r,{onClick:a,onMouseEnter:c,onMouseLeave:u,"data-expanded":s.opened?!0:void 0}))});r6.displayName="@mantine/core/MenuTarget";var tce=ue({dropdown:{padding:M(4)}});const nce=tce;var rce=Object.defineProperty,oce=Object.defineProperties,ice=Object.getOwnPropertyDescriptors,lv=Object.getOwnPropertySymbols,o6=Object.prototype.hasOwnProperty,i6=Object.prototype.propertyIsEnumerable,QM=(e,t,n)=>t in e?rce(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,eN=(e,t)=>{for(var n in t||(t={}))o6.call(t,n)&&QM(e,n,t[n]);if(lv)for(var n of lv(t))i6.call(t,n)&&QM(e,n,t[n]);return e},tN=(e,t)=>oce(e,ice(t)),sce=(e,t)=>{var n={};for(var r in e)o6.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&lv)for(var r of lv(e))t.indexOf(r)<0&&i6.call(e,r)&&(n[r]=e[r]);return n};const ace={closeOnItemClick:!0,loop:!0,trigger:"click",openDelay:0,closeDelay:100};function It(e){const t=ae("Menu",ace,e),{children:n,onOpen:r,onClose:o,opened:i,defaultOpened:s,onChange:a,closeOnItemClick:c,loop:u,closeOnEscape:f,trigger:p,openDelay:g,closeDelay:v,classNames:y,styles:w,unstyled:P,radius:x,variant:S}=t,O=sce(t,["children","onOpen","onClose","opened","defaultOpened","onChange","closeOnItemClick","loop","closeOnEscape","trigger","openDelay","closeDelay","classNames","styles","unstyled","radius","variant"]),{classes:E,cx:$}=nce(),[N,{setHovered:I,resetHovered:R}]=UW(),[B,z]=go({value:i,defaultValue:s,finalValue:!1,onChange:a}),G=()=>{z(!1),B&&o?.()},X=()=>{z(!0),!B&&r?.()},Q=()=>B?G():X(),{openDropdown:V,closeDropdown:H}=sae({open:X,close:G,closeDelay:v,openDelay:g}),Z=Y=>FW("[data-menu-item]","[data-menu-dropdown]",Y);return Fn(()=>{R()},[B]),k.createElement(vle,{value:{opened:B,toggleDropdown:Q,getItemIndex:Z,hovered:N,setHovered:I,closeOnItemClick:c,closeDropdown:p==="click"?G:H,openDropdown:p==="click"?X:V,closeDropdownImmediately:G,loop:u,trigger:p,radius:x,classNames:y,styles:w,unstyled:P,variant:S}},k.createElement(kn,tN(eN({},O),{radius:x,opened:B,onChange:Q,defaultOpened:s,trapFocus:p==="click",closeOnEscape:f&&p==="click",__staticSelector:"Menu",classNames:tN(eN({},y),{dropdown:$(E.dropdown,y?.dropdown)}),styles:w,unstyled:P,variant:S}),n))}It.displayName="@mantine/core/Menu";It.Item=Wle;It.Label=e6;It.Dropdown=Y4;It.Target=r6;It.Divider=U4;const[lce,cce]=bu("Modal component was not found in tree"),uce={xs:M(320),sm:M(380),md:M(440),lg:M(620),xl:M(780)};var dce=ue((e,{yOffset:t,xOffset:n,centered:r,fullScreen:o},{size:i})=>({content:{flex:o?"0 0 100%":`0 0 ${re({size:i,sizes:uce})}`,maxWidth:"100%",maxHeight:o?void 0:`calc(100dvh - (${M(t)} * 2))`,height:o?"100vh":void 0,borderRadius:o?0:void 0,overflowY:"auto"},inner:{paddingTop:o?0:t,paddingBottom:o?0:t,paddingLeft:o?0:n,paddingRight:o?0:n,display:"flex",justifyContent:"center",alignItems:r?"center":"flex-start"}}));const fce=dce;var pce=Object.defineProperty,hce=Object.defineProperties,mce=Object.getOwnPropertyDescriptors,cv=Object.getOwnPropertySymbols,s6=Object.prototype.hasOwnProperty,a6=Object.prototype.propertyIsEnumerable,nN=(e,t,n)=>t in e?pce(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Qb=(e,t)=>{for(var n in t||(t={}))s6.call(t,n)&&nN(e,n,t[n]);if(cv)for(var n of cv(t))a6.call(t,n)&&nN(e,n,t[n]);return e},l6=(e,t)=>hce(e,mce(t)),gce=(e,t)=>{var n={};for(var r in e)s6.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&cv)for(var r of cv(e))t.indexOf(r)<0&&a6.call(e,r)&&(n[r]=e[r]);return n};const vce=l6(Qb({},Hf),{yOffset:"5dvh",xOffset:"5vw"});function c6(e){const t=ae("ModalRoot",vce,e),{classNames:n,variant:r,size:o,yOffset:i,xOffset:s,scrollAreaComponent:a,radius:c,centered:u,fullScreen:f}=t,p=gce(t,["classNames","variant","size","yOffset","xOffset","scrollAreaComponent","radius","centered","fullScreen"]),{classes:g,cx:v}=fce({yOffset:i,xOffset:s,centered:u,fullScreen:f},{name:"Modal",variant:r,size:o});return k.createElement(lce,{value:{yOffset:i,scrollAreaComponent:a,radius:c}},k.createElement(tt,Qb({__staticSelector:"Modal",size:o,variant:r,classNames:l6(Qb({},n),{content:v(g.content,n?.content),inner:v(g.inner,n?.inner)})},p)))}var yce=Object.defineProperty,uv=Object.getOwnPropertySymbols,u6=Object.prototype.hasOwnProperty,d6=Object.prototype.propertyIsEnumerable,rN=(e,t,n)=>t in e?yce(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,_ce=(e,t)=>{for(var n in t||(t={}))u6.call(t,n)&&rN(e,n,t[n]);if(uv)for(var n of uv(t))d6.call(t,n)&&rN(e,n,t[n]);return e},wce=(e,t)=>{var n={};for(var r in e)u6.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&uv)for(var r of uv(e))t.indexOf(r)<0&&d6.call(e,r)&&(n[r]=e[r]);return n};const bce={shadow:"xl"},f6=_.forwardRef((e,t)=>{const n=ae("ModalContent",bce,e),{children:r,scrollAreaComponent:o}=n,i=wce(n,["children","scrollAreaComponent"]),s=cce(),a=o||s.scrollAreaComponent||tt.NativeScrollArea;return k.createElement(tt.Content,_ce({ref:t,radius:s.radius},i),k.createElement(a,{style:{maxHeight:`calc(100dvh - (${M(s.yOffset)} * 2))`}},r))});var xce=Object.defineProperty,Sce=Object.defineProperties,Pce=Object.getOwnPropertyDescriptors,dv=Object.getOwnPropertySymbols,p6=Object.prototype.hasOwnProperty,h6=Object.prototype.propertyIsEnumerable,oN=(e,t,n)=>t in e?xce(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Kh=(e,t)=>{for(var n in t||(t={}))p6.call(t,n)&&oN(e,n,t[n]);if(dv)for(var n of dv(t))h6.call(t,n)&&oN(e,n,t[n]);return e},Oce=(e,t)=>Sce(e,Pce(t)),Cce=(e,t)=>{var n={};for(var r in e)p6.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&dv)for(var r of dv(e))t.indexOf(r)<0&&h6.call(e,r)&&(n[r]=e[r]);return n};const kce=Oce(Kh({},Hf),{transitionProps:{duration:200,transition:"pop"},withOverlay:!0,withCloseButton:!0});function zi(e){const t=ae("Modal",kce,e),{title:n,withOverlay:r,overlayProps:o,withCloseButton:i,closeButtonProps:s,children:a}=t,c=Cce(t,["title","withOverlay","overlayProps","withCloseButton","closeButtonProps","children"]),u=!!n||i;return k.createElement(c6,Kh({},c),r&&k.createElement(tt.Overlay,Kh({},o)),k.createElement(f6,null,u&&k.createElement(tt.Header,null,n&&k.createElement(tt.Title,null,n),i&&k.createElement(tt.CloseButton,Kh({},s))),k.createElement(tt.Body,null,a)))}zi.Root=c6;zi.CloseButton=tt.CloseButton;zi.Overlay=tt.Overlay;zi.Content=f6;zi.Header=tt.Header;zi.Title=tt.Title;zi.Body=tt.Body;zi.NativeScrollArea=tt.NativeScrollArea;const m6={xs:M(16),sm:M(22),md:M(26),lg:M(30),xl:M(36)},Ece={xs:M(10),sm:M(12),md:M(14),lg:M(16),xl:M(18)};var $ce=ue((e,{disabled:t,radius:n,readOnly:r},{size:o,variant:i})=>({defaultValue:{display:"flex",alignItems:"center",backgroundColor:t?e.colorScheme==="dark"?e.colors.dark[5]:e.colors.gray[3]:e.colorScheme==="dark"?e.colors.dark[7]:i==="filled"?e.white:e.colors.gray[1],color:t?e.colorScheme==="dark"?e.colors.dark[1]:e.colors.gray[7]:e.colorScheme==="dark"?e.colors.dark[0]:e.colors.gray[7],height:re({size:o,sizes:m6}),paddingLeft:`calc(${re({size:o,sizes:e.spacing})} / 1.5)`,paddingRight:t||r?re({size:o,sizes:e.spacing}):0,fontWeight:500,fontSize:re({size:o,sizes:Ece}),borderRadius:re({size:n,sizes:e.radius}),cursor:t?"not-allowed":"default",userSelect:"none",maxWidth:`calc(100% - ${M(10)})`},defaultValueRemove:{color:e.colorScheme==="dark"?e.colors.dark[0]:e.colors.gray[7],marginLeft:`calc(${re({size:o,sizes:e.spacing})} / 6)`},defaultValueLabel:{display:"block",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}}));const Mce=$ce;var Nce=Object.defineProperty,fv=Object.getOwnPropertySymbols,g6=Object.prototype.hasOwnProperty,v6=Object.prototype.propertyIsEnumerable,iN=(e,t,n)=>t in e?Nce(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Tce=(e,t)=>{for(var n in t||(t={}))g6.call(t,n)&&iN(e,n,t[n]);if(fv)for(var n of fv(t))v6.call(t,n)&&iN(e,n,t[n]);return e},Ice=(e,t)=>{var n={};for(var r in e)g6.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&fv)for(var r of fv(e))t.indexOf(r)<0&&v6.call(e,r)&&(n[r]=e[r]);return n};const jce={xs:16,sm:22,md:24,lg:26,xl:30};function y6(e){var t=e,{label:n,classNames:r,styles:o,className:i,onRemove:s,disabled:a,readOnly:c,size:u,radius:f="sm",variant:p,unstyled:g}=t,v=Ice(t,["label","classNames","styles","className","onRemove","disabled","readOnly","size","radius","variant","unstyled"]);const{classes:y,cx:w}=Mce({disabled:a,readOnly:c,radius:f},{name:"MultiSelect",classNames:r,styles:o,unstyled:g,size:u,variant:p});return k.createElement("div",Tce({className:w(y.defaultValue,i)},v),k.createElement("span",{className:y.defaultValueLabel},n),!a&&!c&&k.createElement(O0,{"aria-hidden":!0,onMouseDown:s,size:jce[u],radius:2,color:"blue",variant:"transparent",iconSize:"70%",className:y.defaultValueRemove,tabIndex:-1,unstyled:g}))}y6.displayName="@mantine/core/MultiSelect/DefaultValue";function Lce({data:e,searchable:t,limit:n,searchValue:r,filter:o,value:i,disableSelectedItemFiltering:s}){if(!t&&i.length===0)return e;if(!t){const c=[];for(let u=0;uf===e[u].value&&!e[u].disabled))&&c.push(e[u]);return c}const a=[];for(let c=0;cu===e[c].value&&!e[c].disabled),e[c])&&a.push(e[c]),!(a.length>=n));c+=1);return a}var Dce=Object.defineProperty,pv=Object.getOwnPropertySymbols,_6=Object.prototype.hasOwnProperty,w6=Object.prototype.propertyIsEnumerable,sN=(e,t,n)=>t in e?Dce(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,aN=(e,t)=>{for(var n in t||(t={}))_6.call(t,n)&&sN(e,n,t[n]);if(pv)for(var n of pv(t))w6.call(t,n)&&sN(e,n,t[n]);return e},Rce=(e,t)=>{var n={};for(var r in e)_6.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&pv)for(var r of pv(e))t.indexOf(r)<0&&w6.call(e,r)&&(n[r]=e[r]);return n};const zce={xs:M(14),sm:M(18),md:M(20),lg:M(24),xl:M(28)};function Ace(e){var t=e,{size:n,error:r,style:o}=t,i=Rce(t,["size","error","style"]);const s=ir(),a=re({size:n,sizes:zce});return k.createElement("svg",aN({viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:aN({color:r?s.colors.red[6]:s.colors.gray[6],width:a,height:a},o),"data-chevron":!0},i),k.createElement("path",{d:"M4.93179 5.43179C4.75605 5.60753 4.75605 5.89245 4.93179 6.06819C5.10753 6.24392 5.39245 6.24392 5.56819 6.06819L7.49999 4.13638L9.43179 6.06819C9.60753 6.24392 9.89245 6.24392 10.0682 6.06819C10.2439 5.89245 10.2439 5.60753 10.0682 5.43179L7.81819 3.18179C7.73379 3.0974 7.61933 3.04999 7.49999 3.04999C7.38064 3.04999 7.26618 3.0974 7.18179 3.18179L4.93179 5.43179ZM10.0682 9.56819C10.2439 9.39245 10.2439 9.10753 10.0682 8.93179C9.89245 8.75606 9.60753 8.75606 9.43179 8.93179L7.49999 10.8636L5.56819 8.93179C5.39245 8.75606 5.10753 8.75606 4.93179 8.93179C4.75605 9.10753 4.75605 9.39245 4.93179 9.56819L7.18179 11.8182C7.35753 11.9939 7.64245 11.9939 7.81819 11.8182L10.0682 9.56819Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"}))}var Bce=Object.defineProperty,Fce=Object.defineProperties,Vce=Object.getOwnPropertyDescriptors,lN=Object.getOwnPropertySymbols,Hce=Object.prototype.hasOwnProperty,Wce=Object.prototype.propertyIsEnumerable,cN=(e,t,n)=>t in e?Bce(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Uce=(e,t)=>{for(var n in t||(t={}))Hce.call(t,n)&&cN(e,n,t[n]);if(lN)for(var n of lN(t))Wce.call(t,n)&&cN(e,n,t[n]);return e},Zce=(e,t)=>Fce(e,Vce(t));function b6({shouldClear:e,clearButtonProps:t,onClear:n,size:r,error:o}){return e?k.createElement(O0,Zce(Uce({},t),{variant:"transparent",onClick:n,size:r,onMouseDown:i=>i.preventDefault()})):k.createElement(Ace,{error:o,size:r})}b6.displayName="@mantine/core/SelectRightSection";var Gce=Object.defineProperty,Yce=Object.defineProperties,Kce=Object.getOwnPropertyDescriptors,hv=Object.getOwnPropertySymbols,x6=Object.prototype.hasOwnProperty,S6=Object.prototype.propertyIsEnumerable,uN=(e,t,n)=>t in e?Gce(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,F_=(e,t)=>{for(var n in t||(t={}))x6.call(t,n)&&uN(e,n,t[n]);if(hv)for(var n of hv(t))S6.call(t,n)&&uN(e,n,t[n]);return e},dN=(e,t)=>Yce(e,Kce(t)),qce=(e,t)=>{var n={};for(var r in e)x6.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&hv)for(var r of hv(e))t.indexOf(r)<0&&S6.call(e,r)&&(n[r]=e[r]);return n};function P6(e){var t=e,{styles:n,rightSection:r,rightSectionWidth:o,theme:i}=t,s=qce(t,["styles","rightSection","rightSectionWidth","theme"]);if(r)return{rightSection:r,rightSectionWidth:o,styles:n};const a=typeof n=="function"?n(i):n;return{rightSection:!s.readOnly&&!(s.disabled&&s.shouldClear)&&k.createElement(b6,F_({},s)),styles:dN(F_({},a),{rightSection:dN(F_({},a?.rightSection),{pointerEvents:s.shouldClear?void 0:"none"})})}}var Jce=Object.defineProperty,Xce=Object.defineProperties,Qce=Object.getOwnPropertyDescriptors,fN=Object.getOwnPropertySymbols,eue=Object.prototype.hasOwnProperty,tue=Object.prototype.propertyIsEnumerable,pN=(e,t,n)=>t in e?Jce(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,nue=(e,t)=>{for(var n in t||(t={}))eue.call(t,n)&&pN(e,n,t[n]);if(fN)for(var n of fN(t))tue.call(t,n)&&pN(e,n,t[n]);return e},rue=(e,t)=>Xce(e,Qce(t)),oue=ue((e,{invalid:t},{size:n})=>({wrapper:{position:"relative","&:has(input:disabled)":{cursor:"not-allowed",pointerEvents:"none","& .mantine-MultiSelect-input":{backgroundColor:e.colorScheme==="dark"?e.colors.dark[6]:e.colors.gray[1],color:e.colors.dark[2],opacity:.6,"&::placeholder":{color:e.colors.dark[2]}},"& .mantine-MultiSelect-defaultValue":{backgroundColor:e.colorScheme==="dark"?e.colors.dark[5]:e.colors.gray[3],color:e.colorScheme==="dark"?e.colors.dark[1]:e.colors.gray[7]}}},values:{minHeight:`calc(${re({size:n,sizes:Dn})} - ${M(2)})`,display:"flex",alignItems:"center",flexWrap:"wrap",marginLeft:`calc(-${e.spacing.xs} / 2)`,boxSizing:"border-box","&[data-clearable]":{marginRight:re({size:n,sizes:Dn})}},value:{margin:`calc(${e.spacing.xs} / 2 - ${M(2)}) calc(${e.spacing.xs} / 2)`},searchInput:rue(nue({},e.fn.fontStyles()),{flex:1,minWidth:M(60),backgroundColor:"transparent",border:0,outline:0,fontSize:re({size:n,sizes:e.fontSizes}),padding:0,marginLeft:`calc(${e.spacing.xs} / 2)`,appearance:"none",color:"inherit",maxHeight:re({size:n,sizes:m6}),"&::placeholder":{opacity:1,color:t?e.colors.red[e.fn.primaryShade()]:e.colorScheme==="dark"?e.colors.dark[3]:e.colors.gray[5]},"&:disabled":{cursor:"not-allowed",pointerEvents:"none"}}),searchInputEmpty:{width:"100%"},searchInputInputHidden:{flex:0,width:0,minWidth:0,margin:0,overflow:"hidden"},searchInputPointer:{cursor:"pointer","&:disabled":{cursor:"not-allowed",pointerEvents:"none"}},input:{cursor:"pointer","&:disabled":{cursor:"not-allowed",pointerEvents:"none"}}}));const iue=oue;var sue=Object.defineProperty,aue=Object.defineProperties,lue=Object.getOwnPropertyDescriptors,mv=Object.getOwnPropertySymbols,O6=Object.prototype.hasOwnProperty,C6=Object.prototype.propertyIsEnumerable,hN=(e,t,n)=>t in e?sue(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,cc=(e,t)=>{for(var n in t||(t={}))O6.call(t,n)&&hN(e,n,t[n]);if(mv)for(var n of mv(t))C6.call(t,n)&&hN(e,n,t[n]);return e},mN=(e,t)=>aue(e,lue(t)),cue=(e,t)=>{var n={};for(var r in e)O6.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&mv)for(var r of mv(e))t.indexOf(r)<0&&C6.call(e,r)&&(n[r]=e[r]);return n};function uue(e,t,n){return t?!1:n.label.toLowerCase().trim().includes(e.toLowerCase().trim())}function due(e,t){return!!e&&!t.some(n=>n.value.toLowerCase()===e.toLowerCase())}function gN(e,t){if(!Array.isArray(e))return;if(t.length===0)return[];const n=t.map(r=>typeof r=="object"?r.value:r);return e.filter(r=>n.includes(r))}const fue={size:"sm",valueComponent:y6,itemComponent:iP,transitionProps:{transition:"fade",duration:0},maxDropdownHeight:220,shadow:"sm",searchable:!1,filter:uue,limit:1/0,clearSearchOnChange:!0,clearable:!1,clearSearchOnBlur:!1,disabled:!1,initiallyOpened:!1,creatable:!1,shouldCreate:due,switchDirectionOnFlip:!1,zIndex:ii("popover"),selectOnBlur:!1,positionDependencies:[],dropdownPosition:"flip"},NP=_.forwardRef((e,t)=>{const n=ae("MultiSelect",fue,e),{className:r,style:o,required:i,label:s,description:a,size:c,error:u,classNames:f,styles:p,wrapperProps:g,value:v,defaultValue:y,data:w,onChange:P,valueComponent:x,itemComponent:S,id:O,transitionProps:E,maxDropdownHeight:$,shadow:N,nothingFound:I,onFocus:R,onBlur:B,searchable:z,placeholder:G,filter:X,limit:Q,clearSearchOnChange:V,clearable:H,clearSearchOnBlur:Z,variant:Y,onSearchChange:j,searchValue:U,disabled:F,initiallyOpened:K,radius:ee,icon:fe,rightSection:ie,rightSectionWidth:J,creatable:ne,getCreateLabel:le,shouldCreate:_e,onCreate:Ne,sx:we,dropdownComponent:He,onDropdownClose:Te,onDropdownOpen:je,maxSelectedValues:it,withinPortal:bt,portalProps:_n,switchDirectionOnFlip:pt,zIndex:Tn,selectOnBlur:kr,name:lt,dropdownPosition:Zn,errorProps:Jt,labelProps:ht,descriptionProps:xo,form:Yr,positionDependencies:ar,onKeyDown:Kr,unstyled:Bt,inputContainer:qr,inputWrapperOrder:fn,readOnly:wn,withAsterisk:Er,clearButtonProps:gt,hoverOnSearchChange:be,disableSelectedItemFiltering:De}=n,Jr=cue(n,["className","style","required","label","description","size","error","classNames","styles","wrapperProps","value","defaultValue","data","onChange","valueComponent","itemComponent","id","transitionProps","maxDropdownHeight","shadow","nothingFound","onFocus","onBlur","searchable","placeholder","filter","limit","clearSearchOnChange","clearable","clearSearchOnBlur","variant","onSearchChange","searchValue","disabled","initiallyOpened","radius","icon","rightSection","rightSectionWidth","creatable","getCreateLabel","shouldCreate","onCreate","sx","dropdownComponent","onDropdownClose","onDropdownOpen","maxSelectedValues","withinPortal","portalProps","switchDirectionOnFlip","zIndex","selectOnBlur","name","dropdownPosition","errorProps","labelProps","descriptionProps","form","positionDependencies","onKeyDown","unstyled","inputContainer","inputWrapperOrder","readOnly","withAsterisk","clearButtonProps","hoverOnSearchChange","disableSelectedItemFiltering"]),{classes:Rt,cx:Zt,theme:$r}=iue({invalid:!!u},{name:"MultiSelect",classNames:f,styles:p,unstyled:Bt,size:c,variant:Y}),{systemStyles:xt,rest:tn}=Dl(Jr),Gn=_.useRef(),Aa=_.useRef({}),Yn=$a(O),[bn,Ft]=_.useState(K),[Gt,Xr]=_.useState(-1),[So,lr]=_.useState("column"),[cr,Hi]=go({value:U,defaultValue:"",finalValue:void 0,onChange:j}),[Es,ur]=_.useState(!1),{scrollIntoView:Oe,targetRef:Ba,scrollableRef:Yl}=Z3({duration:0,offset:5,cancelable:!1,isList:!0}),Fa=ne&&typeof le=="function";let Se=null;const ct=w.map(Ie=>typeof Ie=="string"?{label:Ie,value:Ie}:Ie),nn=p3({data:ct}),[ze,Wi]=go({value:gN(v,w),defaultValue:gN(y,w),finalValue:[],onChange:P}),Qr=_.useRef(!!it&&it{if(!wn){const vt=ze.filter(xn=>xn!==Ie);Wi(vt),it&&vt.length{Hi(Ie.currentTarget.value),!F&&!Qr.current&&z&&Ft(!0)},b1=Ie=>{typeof R=="function"&&R(Ie),!F&&!Qr.current&&z&&Ft(!0)},rn=Lce({data:nn,searchable:z,searchValue:cr,limit:Q,filter:X,value:ze,disableSelectedItemFiltering:De});Fa&&_e(cr,nn)&&(Se=le(cr),rn.push({label:cr,value:cr,creatable:!0}));const Ui=Math.min(Gt,rn.length-1),Va=(Ie,vt,xn)=>{let Fe=Ie;for(;xn(Fe);)if(Fe=vt(Fe),!rn[Fe].disabled)return Fe;return Ie};Fn(()=>{Xr(be&&cr?0:-1)},[cr,be]),Fn(()=>{!F&&ze.length>w.length&&Ft(!1),it&&ze.length=it&&(Qr.current=!0,Ft(!1))},[ze]);const Kl=Ie=>{if(!wn)if(V&&Hi(""),ze.includes(Ie.value))tp(Ie.value);else{if(Ie.creatable&&typeof Ne=="function"){const vt=Ne(Ie.value);typeof vt<"u"&&vt!==null&&Wi(typeof vt=="string"?[...ze,vt]:[...ze,vt.value])}else Wi([...ze,Ie.value]);ze.length===it-1&&(Qr.current=!0,Ft(!1)),rn.length===1&&Ft(!1)}},x1=Ie=>{typeof B=="function"&&B(Ie),kr&&rn[Ui]&&bn&&Kl(rn[Ui]),Z&&Hi(""),Ft(!1)},S1=Ie=>{if(Es||(Kr?.(Ie),wn)||Ie.key!=="Backspace"&&it&&Qr.current)return;const vt=So==="column",xn=()=>{Xr(ut=>{var Mr;const Po=Va(ut,Nr=>Nr+1,Nr=>Nr{Xr(ut=>{var Mr;const Po=Va(ut,Nr=>Nr-1,Nr=>Nr>0);return bn&&(Ba.current=Aa.current[(Mr=rn[Po])==null?void 0:Mr.value],Oe({alignment:vt?"start":"end"})),Po})};switch(Ie.key){case"ArrowUp":{Ie.preventDefault(),Ft(!0),vt?Fe():xn();break}case"ArrowDown":{Ie.preventDefault(),Ft(!0),vt?xn():Fe();break}case"Enter":{Ie.preventDefault(),rn[Ui]&&bn?Kl(rn[Ui]):Ft(!0);break}case" ":{z||(Ie.preventDefault(),rn[Ui]&&bn?Kl(rn[Ui]):Ft(!0));break}case"Backspace":{ze.length>0&&cr.length===0&&(Wi(ze.slice(0,-1)),Ft(!0),it&&(Qr.current=!1));break}case"Home":{if(!z){Ie.preventDefault(),bn||Ft(!0);const ut=rn.findIndex(Mr=>!Mr.disabled);Xr(ut),Oe({alignment:vt?"end":"start"})}break}case"End":{if(!z){Ie.preventDefault(),bn||Ft(!0);const ut=rn.map(Mr=>!!Mr.disabled).lastIndexOf(!1);Xr(ut),Oe({alignment:vt?"end":"start"})}break}case"Escape":Ft(!1)}},P1=ze.map(Ie=>{let vt=nn.find(xn=>xn.value===Ie&&!xn.disabled);return!vt&&Fa&&(vt={value:Ie,label:Ie}),vt}).filter(Ie=>!!Ie).map((Ie,vt)=>k.createElement(x,mN(cc({},Ie),{variant:Y,disabled:F,className:Rt.value,readOnly:wn,onRemove:xn=>{xn.preventDefault(),xn.stopPropagation(),tp(Ie.value)},key:Ie.value,size:c,styles:p,classNames:f,radius:ee,index:vt}))),O1=Ie=>ze.includes(Ie),Lu=()=>{var Ie;Hi(""),Wi([]),(Ie=Gn.current)==null||Ie.focus(),it&&(Qr.current=!1)},si=!wn&&(rn.length>0?bn:bn&&!!I);return Fn(()=>{const Ie=si?je:Te;typeof Ie=="function"&&Ie()},[si]),k.createElement(et.Wrapper,cc(cc({required:i,id:Yn,label:s,error:u,description:a,size:c,className:r,style:o,classNames:f,styles:p,__staticSelector:"MultiSelect",sx:we,errorProps:Jt,descriptionProps:xo,labelProps:ht,inputContainer:qr,inputWrapperOrder:fn,unstyled:Bt,withAsterisk:Er,variant:Y},xt),g),k.createElement(ha,{opened:si,transitionProps:E,shadow:"sm",withinPortal:bt,portalProps:_n,__staticSelector:"MultiSelect",onDirectionChange:lr,switchDirectionOnFlip:pt,zIndex:Tn,dropdownPosition:Zn,positionDependencies:[...ar,cr],classNames:f,styles:p,unstyled:Bt,variant:Y},k.createElement(ha.Target,null,k.createElement("div",{className:Rt.wrapper,role:"combobox","aria-haspopup":"listbox","aria-owns":bn&&si?`${Yn}-items`:null,"aria-controls":Yn,"aria-expanded":bn,onMouseLeave:()=>Xr(-1),tabIndex:-1},k.createElement("input",{type:"hidden",name:lt,value:ze.join(","),form:Yr,disabled:F}),k.createElement(et,cc({__staticSelector:"MultiSelect",style:{overflow:"hidden"},component:"div",multiline:!0,size:c,variant:Y,disabled:F,error:u,required:i,radius:ee,icon:fe,unstyled:Bt,onMouseDown:Ie=>{var vt;Ie.preventDefault(),!F&&!Qr.current&&Ft(!bn),(vt=Gn.current)==null||vt.focus()},classNames:mN(cc({},f),{input:Zt({[Rt.input]:!z},f?.input)})},P6({theme:$r,rightSection:ie,rightSectionWidth:J,styles:p,size:c,shouldClear:H&&ze.length>0,onClear:Lu,error:u,disabled:F,clearButtonProps:gt,readOnly:wn})),k.createElement("div",{className:Rt.values,"data-clearable":H||void 0},P1,k.createElement("input",cc({ref:ws(t,Gn),type:"search",id:Yn,className:Zt(Rt.searchInput,{[Rt.searchInputPointer]:!z,[Rt.searchInputInputHidden]:!bn&&ze.length>0||!z&&ze.length>0,[Rt.searchInputEmpty]:ze.length===0}),onKeyDown:S1,value:cr,onChange:w1,onFocus:b1,onBlur:x1,readOnly:!z||Qr.current||wn,placeholder:ze.length===0?G:void 0,disabled:F,"data-mantine-stop-propagation":bn,autoComplete:"off",onCompositionStart:()=>ur(!0),onCompositionEnd:()=>ur(!1)},tn)))))),k.createElement(ha.Dropdown,{component:He||$0,maxHeight:$,direction:So,id:Yn,innerRef:Yl,__staticSelector:"MultiSelect",classNames:f,styles:p},k.createElement(oP,{data:rn,hovered:Ui,classNames:f,styles:p,uuid:Yn,__staticSelector:"MultiSelect",onItemHover:Xr,onItemSelect:Kl,itemsRefs:Aa,itemComponent:S,size:c,nothingFound:I,isItemSelected:O1,creatable:ne&&!!Se,createLabel:Se,unstyled:Bt,variant:Y}))))});NP.displayName="@mantine/core/MultiSelect";const pue=(e,t,n)=>Number.isInteger(e)&&e>=0&&t===0?"numeric":!Number.isInteger(e)&&e>=0&&t!==0?"decimal":Number.isInteger(e)&&e<0&&t===0||!Number.isInteger(e)&&e<0&&t!==0?n==="ios"?"text":"decimal":"numeric";function vN({direction:e,size:t}){return k.createElement("svg",{style:{width:M(t),height:M(t),transform:e==="up"?"rotate(180deg)":void 0},viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},k.createElement("path",{d:"M3.13523 6.15803C3.3241 5.95657 3.64052 5.94637 3.84197 6.13523L7.5 9.56464L11.158 6.13523C11.3595 5.94637 11.6759 5.95657 11.8648 6.15803C12.0536 6.35949 12.0434 6.67591 11.842 6.86477L7.84197 10.6148C7.64964 10.7951 7.35036 10.7951 7.15803 10.6148L3.15803 6.86477C2.95657 6.67591 2.94637 6.35949 3.13523 6.15803Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"}))}const k6={xs:M(20),sm:M(24),md:M(30),lg:M(34),xl:M(36)};var hue=ue((e,{radius:t},{size:n})=>({rightSection:{display:"flex",flexDirection:"column",height:`calc(100% - ${M(2)})`,margin:M(1),overflow:"hidden",borderTopRightRadius:e.fn.radius(t),borderBottomRightRadius:e.fn.radius(t)},control:{margin:0,position:"relative",flex:"0 0 50%",display:"flex",alignItems:"center",justifyContent:"center",boxSizing:"border-box",width:re({size:n,sizes:k6}),padding:0,WebkitTapHighlightColor:"transparent",borderBottom:`${M(1)} solid ${e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[4]}`,borderLeft:`${M(1)} solid ${e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[4]}`,borderTop:0,borderRight:0,backgroundColor:"transparent",marginRight:M(1),color:e.colorScheme==="dark"?e.colors.dark[0]:e.black,"&:not(:disabled):hover":{backgroundColor:e.colorScheme==="dark"?e.colors.dark[5]:e.colors.gray[0]},"&:disabled":{color:e.colorScheme==="dark"?e.colors.dark[3]:e.colors.gray[4]}},controlUp:{},controlDown:{borderBottom:0}}));const mue=hue;var gue=Object.defineProperty,vue=Object.defineProperties,yue=Object.getOwnPropertyDescriptors,gv=Object.getOwnPropertySymbols,E6=Object.prototype.hasOwnProperty,$6=Object.prototype.propertyIsEnumerable,yN=(e,t,n)=>t in e?gue(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,V_=(e,t)=>{for(var n in t||(t={}))E6.call(t,n)&&yN(e,n,t[n]);if(gv)for(var n of gv(t))$6.call(t,n)&&yN(e,n,t[n]);return e},_ue=(e,t)=>vue(e,yue(t)),wue=(e,t)=>{var n={};for(var r in e)E6.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&gv)for(var r of gv(e))t.indexOf(r)<0&&$6.call(e,r)&&(n[r]=e[r]);return n};const bue={type:"text",size:"sm",__staticSelector:"TextInput"},yn=_.forwardRef((e,t)=>{const n=bP("TextInput",bue,e),{inputProps:r,wrapperProps:o}=n,i=wue(n,["inputProps","wrapperProps"]);return k.createElement(et.Wrapper,V_({},o),k.createElement(et,_ue(V_(V_({},r),i),{ref:t})))});yn.displayName="@mantine/core/TextInput";var xue=Object.defineProperty,Sue=Object.defineProperties,Pue=Object.getOwnPropertyDescriptors,vv=Object.getOwnPropertySymbols,M6=Object.prototype.hasOwnProperty,N6=Object.prototype.propertyIsEnumerable,_N=(e,t,n)=>t in e?xue(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Oue=(e,t)=>{for(var n in t||(t={}))M6.call(t,n)&&_N(e,n,t[n]);if(vv)for(var n of vv(t))N6.call(t,n)&&_N(e,n,t[n]);return e},Cue=(e,t)=>Sue(e,Pue(t)),kue=(e,t)=>{var n={};for(var r in e)M6.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&vv)for(var r of vv(e))t.indexOf(r)<0&&N6.call(e,r)&&(n[r]=e[r]);return n};const Eue=e=>e||"",$ue=e=>{if(e==="-")return e;let t=e;t[0]==="."&&(t=`0${e}`);const n=parseFloat(t);return Number.isNaN(n)?"":e},wN={xs:M(10),sm:M(14),md:M(16),lg:M(18),xl:M(20)},Mue={step:1,hideControls:!1,size:"sm",precision:0,noClampOnBlur:!1,removeTrailingZeros:!1,decimalSeparator:".",formatter:Eue,parser:$ue,type:"text"},ma=_.forwardRef((e,t)=>{const n=ae("NumberInput",Mue,e),{readOnly:r,disabled:o,value:i,onChange:s,decimalSeparator:a,thousandsSeparator:c,min:u,max:f,startValue:p,step:g,stepHoldInterval:v,stepHoldDelay:y,onFocus:w,onBlur:P,onKeyDown:x,onKeyUp:S,hideControls:O,radius:E,variant:$,precision:N,removeTrailingZeros:I,defaultValue:R,noClampOnBlur:B,handlersRef:z,classNames:G,styles:X,size:Q,rightSection:V,rightSectionWidth:H,formatter:Z,parser:Y,inputMode:j,unstyled:U,type:F}=n,K=kue(n,["readOnly","disabled","value","onChange","decimalSeparator","thousandsSeparator","min","max","startValue","step","stepHoldInterval","stepHoldDelay","onFocus","onBlur","onKeyDown","onKeyUp","hideControls","radius","variant","precision","removeTrailingZeros","defaultValue","noClampOnBlur","handlersRef","classNames","styles","size","rightSection","rightSectionWidth","formatter","parser","inputMode","unstyled","type"]),{classes:ee,cx:fe}=mue({radius:E},{classNames:G,styles:X,unstyled:U,name:"NumberInput",variant:$,size:Q}),ie=be=>{if(be==="")return"";let De=be.toFixed(N);return I&&N>0&&(De=De.replace(new RegExp(`[0]{0,${N}}$`),""),De.endsWith(".")&&(De=De.slice(0,-1))),De},J=be=>{let De=be;return a&&(De=De.replace(".",a)),Z(De)},ne=be=>{let De=be;return a&&(De=De.replaceAll(c,"").replace(a,".")),Y(De)},le=be=>J(ie(be)),[_e,Ne]=_.useState(typeof i=="number"?i:typeof R=="number"?R:""),[we,He]=_.useState(()=>le(_e)),Te=_.useRef(),[je,it]=_.useState(!1),bt=(be,De)=>{if(!je||De){const Jr=le(be);Jr!==we&&He(Jr)}be!==_e&&Ne(be)},_n=typeof u=="number"?u:-1/0,pt=typeof f=="number"?f:1/0,Tn=_.useRef();Tn.current=()=>{var be;let De;_e===""?De=(be=p??u)!=null?be:0:De=parseFloat(ie(ia(_e+g,_n,pt))),bt(De,!0),s?.(De)};const kr=_.useRef();kr.current=()=>{var be;let De;_e===""?De=(be=p??u)!=null?be:0:De=parseFloat(ie(ia(_e-g,_n,pt))),bt(De,!0),s?.(De)},H3(z,{increment:Tn.current,decrement:kr.current}),_.useEffect(()=>{je||bt(i===void 0?_e:i,!0)},[i,je]);const lt=y!==void 0&&v!==void 0,Zn=_.useRef(null),Jt=_.useRef(0),ht=()=>{Zn.current&&window.clearTimeout(Zn.current),Zn.current=null,Jt.current=0},xo=be=>{be?Tn.current():kr.current(),Jt.current+=1},Yr=be=>{if(xo(be),lt){const De=typeof v=="number"?v:v(Jt.current);Zn.current=window.setTimeout(()=>Yr(be),De)}},ar=(be,De)=>{be.preventDefault(),Te.current.focus(),xo(De),lt&&(Zn.current=window.setTimeout(()=>Yr(De),y))};_.useEffect(()=>(ht(),ht),[]);const Kr=k.createElement("div",{className:ee.rightSection},k.createElement("button",{type:"button",tabIndex:-1,"aria-hidden":!0,disabled:_e>=f,className:fe(ee.control,ee.controlUp),onPointerDown:be=>{ar(be,!0)},onPointerUp:ht,onPointerLeave:ht},k.createElement(vN,{size:re({size:Q,sizes:wN}),direction:"up"})),k.createElement("button",{type:"button",tabIndex:-1,"aria-hidden":!0,disabled:_e<=u,className:fe(ee.control,ee.controlDown),onPointerDown:be=>{ar(be,!1)},onPointerUp:ht,onPointerLeave:ht},k.createElement(vN,{size:re({size:Q,sizes:wN}),direction:"down"}))),Bt=be=>{let De=be;(De[0]===`${a}`||De[0]===".")&&(De=`0${De}`);const Jr=parseFloat(ie(parseFloat(ne(De)))),Rt=B?Jr:ia(Jr,_n,pt),Zt=Number.isNaN(Rt)?"":Rt,$r=_e!==Zt;He(be),bt(Zt),$r&&s?.(Zt)},qr=be=>{be.nativeEvent.isComposing||Bt(be.target.value)},fn=be=>{it(!0),w?.(be)},wn=be=>{it(!1),P?.(be)},Er=be=>{if(typeof x=="function"&&x(be),be.repeat&<&&(be.key==="ArrowUp"||be.key==="ArrowDown")){be.preventDefault();return}r||(be.key==="ArrowUp"?ar(be,!0):be.key==="ArrowDown"&&ar(be,!1))},gt=be=>{typeof S=="function"&&S(be),(be.key==="ArrowUp"||be.key==="ArrowDown")&&ht()};return k.createElement(yn,Cue(Oue({},K),{type:F,variant:$,value:we,disabled:o,readOnly:r,ref:ws(Te,t),onChange:qr,onFocus:fn,onBlur:wn,onKeyDown:Er,onKeyUp:gt,rightSection:V||(o||r||O||$==="unstyled"?null:Kr),rightSectionWidth:H??`calc(${re({size:Q,sizes:k6})} + ${M(1)})`,radius:E,max:f,min:u,step:g,size:Q,styles:X,classNames:G,inputMode:j||pue(g,N,NG()),__staticSelector:"NumberInput",unstyled:U}))});ma.displayName="@mantine/core/NumberInput";const T6=_.createContext(!1),Nue=T6.Provider,Tue=()=>_.useContext(T6);function I6({children:e,openDelay:t=0,closeDelay:n=0}){return k.createElement(Nue,{value:!0},k.createElement(VQ,{delay:{open:t,close:n}},e))}I6.displayName="@mantine/core/TooltipGroup";var Iue=Object.defineProperty,jue=Object.defineProperties,Lue=Object.getOwnPropertyDescriptors,bN=Object.getOwnPropertySymbols,Due=Object.prototype.hasOwnProperty,Rue=Object.prototype.propertyIsEnumerable,xN=(e,t,n)=>t in e?Iue(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,SN=(e,t)=>{for(var n in t||(t={}))Due.call(t,n)&&xN(e,n,t[n]);if(bN)for(var n of bN(t))Rue.call(t,n)&&xN(e,n,t[n]);return e},zue=(e,t)=>jue(e,Lue(t));function Aue(e,t){if(!t)return{backgroundColor:e.colorScheme==="dark"?e.colors.gray[2]:e.colors.gray[9],color:e.colorScheme==="dark"?e.black:e.white};const n=e.fn.variant({variant:"filled",color:t,primaryFallback:!1});return{backgroundColor:n.background,color:n.color}}var Bue=ue((e,{color:t,radius:n,width:r,multiline:o})=>({tooltip:zue(SN(SN({},e.fn.fontStyles()),Aue(e,t)),{lineHeight:e.lineHeight,fontSize:e.fontSizes.sm,borderRadius:e.fn.radius(n),padding:`calc(${e.spacing.xs} / 2) ${e.spacing.xs}`,position:"absolute",whiteSpace:o?"unset":"nowrap",pointerEvents:"none",width:r}),arrow:{backgroundColor:"inherit",border:0,zIndex:1}}));const j6=Bue,L6={children:"Tooltip component children should be an element or a component that accepts ref, fragments, strings, numbers and other primitive values are not supported"};function Fue({offset:e,position:t}){const[n,r]=_.useState(!1),o=_.useRef(),{x:i,y:s,reference:a,floating:c,refs:u,update:f,placement:p}=yP({placement:t,middleware:[fP({crossAxis:!0,padding:5,rootBoundary:"document"})]}),g=p.includes("right")?e:t.includes("left")?e*-1:0,v=p.includes("bottom")?e:t.includes("top")?e*-1:0,y=_.useCallback(({clientX:w,clientY:P})=>{a({getBoundingClientRect(){return{width:0,height:0,x:w,y:P,left:w+g,top:P+v,right:w,bottom:P}}})},[a]);return _.useEffect(()=>{if(u.floating.current){const w=o.current;w.addEventListener("mousemove",y);const P=us(u.floating.current);return P.forEach(x=>{x.addEventListener("scroll",f)}),()=>{w.removeEventListener("mousemove",y),P.forEach(x=>{x.removeEventListener("scroll",f)})}}},[a,u.floating.current,f,y,n]),{handleMouseMove:y,x:i,y:s,opened:n,setOpened:r,boundaryRef:o,floating:c}}var Vue=Object.defineProperty,Hue=Object.defineProperties,Wue=Object.getOwnPropertyDescriptors,yv=Object.getOwnPropertySymbols,D6=Object.prototype.hasOwnProperty,R6=Object.prototype.propertyIsEnumerable,PN=(e,t,n)=>t in e?Vue(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,nh=(e,t)=>{for(var n in t||(t={}))D6.call(t,n)&&PN(e,n,t[n]);if(yv)for(var n of yv(t))R6.call(t,n)&&PN(e,n,t[n]);return e},rh=(e,t)=>Hue(e,Wue(t)),Uue=(e,t)=>{var n={};for(var r in e)D6.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&yv)for(var r of yv(e))t.indexOf(r)<0&&R6.call(e,r)&&(n[r]=e[r]);return n};const Zue={refProp:"ref",withinPortal:!0,offset:10,position:"right",zIndex:ii("popover")};function z6(e){var t;const n=ae("TooltipFloating",Zue,e),{children:r,refProp:o,withinPortal:i,portalProps:s,style:a,className:c,classNames:u,styles:f,unstyled:p,radius:g,color:v,label:y,offset:w,position:P,multiline:x,width:S,zIndex:O,disabled:E,variant:$}=n,N=Uue(n,["children","refProp","withinPortal","portalProps","style","className","classNames","styles","unstyled","radius","color","label","offset","position","multiline","width","zIndex","disabled","variant"]),{handleMouseMove:I,x:R,y:B,opened:z,boundaryRef:G,floating:X,setOpened:Q}=Fue({offset:w,position:P}),{classes:V,cx:H}=j6({radius:g,color:v,multiline:x,width:S},{name:"TooltipFloating",classNames:u,styles:f,unstyled:p,variant:$});if(!Nf(r))throw new Error(L6.children);const Z=ws(G,r.ref),Y=U=>{var F,K;(K=(F=r.props).onMouseEnter)==null||K.call(F,U),I(U),Q(!0)},j=U=>{var F,K;(K=(F=r.props).onMouseLeave)==null||K.call(F,U),Q(!1)};return k.createElement(k.Fragment,null,k.createElement(Af,rh(nh({},s),{withinPortal:i}),k.createElement(Pe,rh(nh({},N),{ref:X,className:H(V.tooltip,c),style:rh(nh({},a),{zIndex:O,display:!E&&z?"block":"none",top:B??"",left:(t=Math.round(R))!=null?t:""})}),y)),_.cloneElement(r,rh(nh({},r.props),{[o]:Z,onMouseEnter:Y,onMouseLeave:j})))}z6.displayName="@mantine/core/TooltipFloating";function Gue(e){const[t,n]=_.useState(!1),o=typeof e.opened=="boolean"?e.opened:t,i=Tue(),s=$a(),{delay:a,currentId:c,setCurrentId:u}=xz(),f=_.useCallback(R=>{n(R),R&&u(s)},[u,s]),{x:p,y:g,reference:v,floating:y,context:w,refs:P,update:x,placement:S,middlewareData:{arrow:{x:O,y:E}={}}}=yP({placement:e.position,open:o,onOpenChange:f,middleware:[cz(e.offset),fP({padding:8}),sz(),vz({element:e.arrowRef,padding:e.arrowOffset}),...e.inline?[lz()]:[]]}),{getReferenceProps:$,getFloatingProps:N}=eee([FQ(w,{enabled:e.events.hover,delay:i?a:{open:e.openDelay,close:e.closeDelay},mouseOnly:!e.events.touch}),XQ(w,{enabled:e.events.focus,keyboardOnly:!0}),QQ(w,{role:"tooltip"}),JQ(w,{enabled:typeof e.opened===void 0}),HQ(w,{id:s})]);return Pz({opened:o,position:e.position,positionDependencies:e.positionDependencies,floating:{refs:P,update:x}}),Fn(()=>{var R;(R=e.onPositionChange)==null||R.call(e,S)},[S]),{x:p,y:g,arrowX:O,arrowY:E,reference:v,floating:y,getFloatingProps:N,getReferenceProps:$,isGroupPhase:o&&c&&c!==s,opened:o,placement:S}}var Yue=Object.defineProperty,Kue=Object.defineProperties,que=Object.getOwnPropertyDescriptors,_v=Object.getOwnPropertySymbols,A6=Object.prototype.hasOwnProperty,B6=Object.prototype.propertyIsEnumerable,ON=(e,t,n)=>t in e?Yue(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Ya=(e,t)=>{for(var n in t||(t={}))A6.call(t,n)&&ON(e,n,t[n]);if(_v)for(var n of _v(t))B6.call(t,n)&&ON(e,n,t[n]);return e},H_=(e,t)=>Kue(e,que(t)),Jue=(e,t)=>{var n={};for(var r in e)A6.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&_v)for(var r of _v(e))t.indexOf(r)<0&&B6.call(e,r)&&(n[r]=e[r]);return n};const Xue={position:"top",refProp:"ref",withinPortal:!1,inline:!1,arrowSize:4,arrowOffset:5,arrowRadius:0,arrowPosition:"side",offset:5,transitionProps:{duration:100,transition:"fade"},width:"auto",events:{hover:!0,focus:!1,touch:!1},zIndex:ii("popover"),positionDependencies:[]},T0=_.forwardRef((e,t)=>{var n;const r=_.useRef(null),o=ae("Tooltip",Xue,e),{children:i,position:s,refProp:a,label:c,openDelay:u,closeDelay:f,onPositionChange:p,opened:g,withinPortal:v,portalProps:y,radius:w,color:P,classNames:x,styles:S,unstyled:O,style:E,className:$,withArrow:N,arrowSize:I,arrowOffset:R,arrowRadius:B,arrowPosition:z,offset:G,transitionProps:X,multiline:Q,width:V,events:H,zIndex:Z,disabled:Y,positionDependencies:j,onClick:U,onMouseEnter:F,onMouseLeave:K,inline:ee,variant:fe,keepMounted:ie}=o,J=Jue(o,["children","position","refProp","label","openDelay","closeDelay","onPositionChange","opened","withinPortal","portalProps","radius","color","classNames","styles","unstyled","style","className","withArrow","arrowSize","arrowOffset","arrowRadius","arrowPosition","offset","transitionProps","multiline","width","events","zIndex","disabled","positionDependencies","onClick","onMouseEnter","onMouseLeave","inline","variant","keepMounted"]),{classes:ne,cx:le,theme:_e}=j6({radius:w,color:P,width:V,multiline:Q},{name:"Tooltip",classNames:x,styles:S,unstyled:O,variant:fe}),Ne=Gue({position:Lz(_e.dir,s),closeDelay:f,openDelay:u,onPositionChange:p,opened:g,events:H,arrowRef:r,arrowOffset:R,offset:G+(N?I/2:0),positionDependencies:[...j,i],inline:ee});if(!Nf(i))throw new Error(L6.children);const we=ws(Ne.reference,i.ref,t);return k.createElement(k.Fragment,null,k.createElement(Af,H_(Ya({},y),{withinPortal:v}),k.createElement(Os,H_(Ya({keepMounted:ie,mounted:!Y&&Ne.opened},X),{transition:X.transition||"fade",duration:Ne.isGroupPhase?10:(n=X.duration)!=null?n:100}),He=>{var Te,je;return k.createElement(Pe,Ya(Ya({},J),Ne.getFloatingProps({ref:Ne.floating,className:ne.tooltip,style:H_(Ya(Ya({},E),He),{zIndex:Z,top:(Te=Ne.y)!=null?Te:0,left:(je=Ne.x)!=null?je:0})})),c,k.createElement(wP,{ref:r,arrowX:Ne.arrowX,arrowY:Ne.arrowY,visible:N,position:Ne.placement,arrowSize:I,arrowOffset:R,arrowRadius:B,arrowPosition:z,className:ne.arrow}))})),_.cloneElement(i,Ne.getReferenceProps(Ya({onClick:U,onMouseEnter:F,onMouseLeave:K,onMouseMove:e.onMouseMove,onPointerDown:e.onPointerDown,onPointerEnter:e.onPointerEnter,[a]:we,className:le($,i.props.className)},i.props))))});T0.Group=I6;T0.Floating=z6;T0.displayName="@mantine/core/Tooltip";const At=T0;function Que({data:e,searchable:t,limit:n,searchValue:r,filter:o,value:i,filterDataOnExactSearchMatch:s}){if(!t)return e;const a=i!=null&&e.find(u=>u.value===i)||null;if(a&&!s&&a?.label===r){if(n){if(n>=e.length)return e;const u=e.indexOf(a),f=u+n,p=f-e.length;return p>0?e.slice(u-p):e.slice(u,f)}return e}const c=[];for(let u=0;u=n));u+=1);return c}var ede=ue(()=>({input:{"&:not(:disabled)":{cursor:"pointer","&::selection":{backgroundColor:"transparent"}}}}));const tde=ede;var nde=Object.defineProperty,rde=Object.defineProperties,ode=Object.getOwnPropertyDescriptors,wv=Object.getOwnPropertySymbols,F6=Object.prototype.hasOwnProperty,V6=Object.prototype.propertyIsEnumerable,CN=(e,t,n)=>t in e?nde(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,cd=(e,t)=>{for(var n in t||(t={}))F6.call(t,n)&&CN(e,n,t[n]);if(wv)for(var n of wv(t))V6.call(t,n)&&CN(e,n,t[n]);return e},W_=(e,t)=>rde(e,ode(t)),ide=(e,t)=>{var n={};for(var r in e)F6.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&wv)for(var r of wv(e))t.indexOf(r)<0&&V6.call(e,r)&&(n[r]=e[r]);return n};function sde(e,t){return t.label.toLowerCase().trim().includes(e.toLowerCase().trim())}function ade(e,t){return!!e&&!t.some(n=>n.label.toLowerCase()===e.toLowerCase())}const lde={required:!1,size:"sm",shadow:"sm",itemComponent:iP,transitionProps:{transition:"fade",duration:0},initiallyOpened:!1,filter:sde,maxDropdownHeight:220,searchable:!1,clearable:!1,limit:1/0,disabled:!1,creatable:!1,shouldCreate:ade,selectOnBlur:!1,switchDirectionOnFlip:!1,filterDataOnExactSearchMatch:!1,zIndex:ii("popover"),positionDependencies:[],dropdownPosition:"flip"},Nl=_.forwardRef((e,t)=>{const n=bP("Select",lde,e),{inputProps:r,wrapperProps:o,shadow:i,data:s,value:a,defaultValue:c,onChange:u,itemComponent:f,onKeyDown:p,onBlur:g,onFocus:v,transitionProps:y,initiallyOpened:w,unstyled:P,classNames:x,styles:S,filter:O,maxDropdownHeight:E,searchable:$,clearable:N,nothingFound:I,limit:R,disabled:B,onSearchChange:z,searchValue:G,rightSection:X,rightSectionWidth:Q,creatable:V,getCreateLabel:H,shouldCreate:Z,selectOnBlur:Y,onCreate:j,dropdownComponent:U,onDropdownClose:F,onDropdownOpen:K,withinPortal:ee,portalProps:fe,switchDirectionOnFlip:ie,zIndex:J,name:ne,dropdownPosition:le,allowDeselect:_e,placeholder:Ne,filterDataOnExactSearchMatch:we,form:He,positionDependencies:Te,readOnly:je,clearButtonProps:it,hoverOnSearchChange:bt}=n,_n=ide(n,["inputProps","wrapperProps","shadow","data","value","defaultValue","onChange","itemComponent","onKeyDown","onBlur","onFocus","transitionProps","initiallyOpened","unstyled","classNames","styles","filter","maxDropdownHeight","searchable","clearable","nothingFound","limit","disabled","onSearchChange","searchValue","rightSection","rightSectionWidth","creatable","getCreateLabel","shouldCreate","selectOnBlur","onCreate","dropdownComponent","onDropdownClose","onDropdownOpen","withinPortal","portalProps","switchDirectionOnFlip","zIndex","name","dropdownPosition","allowDeselect","placeholder","filterDataOnExactSearchMatch","form","positionDependencies","readOnly","clearButtonProps","hoverOnSearchChange"]),{classes:pt,cx:Tn,theme:kr}=tde(),[lt,Zn]=_.useState(w),[Jt,ht]=_.useState(-1),xo=_.useRef(),Yr=_.useRef({}),[ar,Kr]=_.useState("column"),Bt=ar==="column",{scrollIntoView:qr,targetRef:fn,scrollableRef:wn}=Z3({duration:0,offset:5,cancelable:!1,isList:!0}),Er=_e===void 0?N:_e,gt=Se=>{if(lt!==Se){Zn(Se);const ct=Se?K:F;typeof ct=="function"&&ct()}},be=V&&typeof H=="function";let De=null;const Jr=s.map(Se=>typeof Se=="string"?{label:Se,value:Se}:Se),Rt=p3({data:Jr}),[Zt,$r,xt]=go({value:a,defaultValue:c,finalValue:null,onChange:u}),tn=Rt.find(Se=>Se.value===Zt),[Gn,Aa]=go({value:G,defaultValue:tn?.label||"",finalValue:void 0,onChange:z}),Yn=Se=>{Aa(Se),$&&typeof z=="function"&&z(Se)},bn=()=>{var Se;je||($r(null),xt||Yn(""),(Se=xo.current)==null||Se.focus())};_.useEffect(()=>{const Se=Rt.find(ct=>ct.value===Zt);Se?Yn(Se.label):(!be||!Zt)&&Yn("")},[Zt]),_.useEffect(()=>{tn&&(!$||!lt)&&Yn(tn.label)},[tn?.label]);const Ft=Se=>{if(!je)if(Er&&tn?.value===Se.value)$r(null),gt(!1);else{if(Se.creatable&&typeof j=="function"){const ct=j(Se.value);typeof ct<"u"&&ct!==null&&$r(typeof ct=="string"?ct:ct.value)}else $r(Se.value);xt||Yn(Se.label),ht(-1),gt(!1),xo.current.focus()}},Gt=Que({data:Rt,searchable:$,limit:R,searchValue:Gn,filter:O,filterDataOnExactSearchMatch:we,value:Zt});be&&Z(Gn,Gt)&&(De=H(Gn),Gt.push({label:Gn,value:Gn,creatable:!0}));const Xr=(Se,ct,nn)=>{let ze=Se;for(;nn(ze);)if(ze=ct(ze),!Gt[ze].disabled)return ze;return Se};Fn(()=>{ht(bt&&Gn?0:-1)},[Gn,bt]);const So=Zt?Gt.findIndex(Se=>Se.value===Zt):0,lr=!je&&(Gt.length>0?lt:lt&&!!I),cr=()=>{ht(Se=>{var ct;const nn=Xr(Se,ze=>ze-1,ze=>ze>0);return fn.current=Yr.current[(ct=Gt[nn])==null?void 0:ct.value],lr&&qr({alignment:Bt?"start":"end"}),nn})},Hi=()=>{ht(Se=>{var ct;const nn=Xr(Se,ze=>ze+1,ze=>zewindow.setTimeout(()=>{var Se;fn.current=Yr.current[(Se=Gt[So])==null?void 0:Se.value],qr({alignment:Bt?"end":"start"})},50);Fn(()=>{lr&&Es()},[lr]);const ur=Se=>{switch(typeof p=="function"&&p(Se),Se.key){case"ArrowUp":{Se.preventDefault(),lt?Bt?cr():Hi():(ht(So),gt(!0),Es());break}case"ArrowDown":{Se.preventDefault(),lt?Bt?Hi():cr():(ht(So),gt(!0),Es());break}case"Home":{if(!$){Se.preventDefault(),lt||gt(!0);const ct=Gt.findIndex(nn=>!nn.disabled);ht(ct),lr&&qr({alignment:Bt?"end":"start"})}break}case"End":{if(!$){Se.preventDefault(),lt||gt(!0);const ct=Gt.map(nn=>!!nn.disabled).lastIndexOf(!1);ht(ct),lr&&qr({alignment:Bt?"end":"start"})}break}case"Escape":{Se.preventDefault(),gt(!1),ht(-1);break}case" ":{$||(Se.preventDefault(),Gt[Jt]&<?Ft(Gt[Jt]):(gt(!0),ht(So),Es()));break}case"Enter":$||Se.preventDefault(),Gt[Jt]&<&&(Se.preventDefault(),Ft(Gt[Jt]))}},Oe=Se=>{typeof g=="function"&&g(Se);const ct=Rt.find(nn=>nn.value===Zt);Y&&Gt[Jt]&<&&Ft(Gt[Jt]),Yn(ct?.label||""),gt(!1)},Ba=Se=>{typeof v=="function"&&v(Se),$&>(!0)},Yl=Se=>{je||(Yn(Se.currentTarget.value),N&&Se.currentTarget.value===""&&$r(null),ht(-1),gt(!0))},Fa=()=>{je||(gt(!lt),Zt&&!lt&&ht(So))};return k.createElement(et.Wrapper,W_(cd({},o),{__staticSelector:"Select"}),k.createElement(ha,{opened:lr,transitionProps:y,shadow:i,withinPortal:ee,portalProps:fe,__staticSelector:"Select",onDirectionChange:Kr,switchDirectionOnFlip:ie,zIndex:J,dropdownPosition:le,positionDependencies:[...Te,Gn],classNames:x,styles:S,unstyled:P,variant:r.variant},k.createElement(ha.Target,null,k.createElement("div",{role:"combobox","aria-haspopup":"listbox","aria-owns":lr?`${r.id}-items`:null,"aria-controls":r.id,"aria-expanded":lr,onMouseLeave:()=>ht(-1),tabIndex:-1},k.createElement("input",{type:"hidden",name:ne,value:Zt||"",form:He,disabled:B}),k.createElement(et,cd(W_(cd(cd({autoComplete:"off",type:"search"},r),_n),{ref:ws(t,xo),onKeyDown:ur,__staticSelector:"Select",value:Gn,placeholder:Ne,onChange:Yl,"aria-autocomplete":"list","aria-controls":lr?`${r.id}-items`:null,"aria-activedescendant":Jt>=0?`${r.id}-${Jt}`:null,onMouseDown:Fa,onBlur:Oe,onFocus:Ba,readOnly:!$||je,disabled:B,"data-mantine-stop-propagation":lr,name:null,classNames:W_(cd({},x),{input:Tn({[pt.input]:!$},x?.input)})}),P6({theme:kr,rightSection:X,rightSectionWidth:Q,styles:S,size:r.size,shouldClear:N&&!!tn,onClear:bn,error:o.error,clearButtonProps:it,disabled:B,readOnly:je}))))),k.createElement(ha.Dropdown,{component:U||$0,maxHeight:E,direction:ar,id:r.id,innerRef:wn,__staticSelector:"Select",classNames:x,styles:S},k.createElement(oP,{data:Gt,hovered:Jt,classNames:x,styles:S,isItemSelected:Se=>Se===Zt,uuid:r.id,__staticSelector:"Select",onItemHover:ht,onItemSelect:Ft,itemsRefs:Yr,itemComponent:f,size:r.size,nothingFound:I,creatable:be&&!!De,createLabel:De,"aria-label":o.label,unstyled:P,variant:r.variant}))))});Nl.displayName="@mantine/core/Select";function cde(e,t){if(t.length===0)return t;const n="maxWidth"in t[0]?"maxWidth":"minWidth",r=[...t].sort((o,i)=>Ro(re({size:i[n],sizes:e.breakpoints}))-Ro(re({size:o[n],sizes:e.breakpoints})));return n==="minWidth"?r.reverse():r}var ude=Object.defineProperty,kN=Object.getOwnPropertySymbols,dde=Object.prototype.hasOwnProperty,fde=Object.prototype.propertyIsEnumerable,EN=(e,t,n)=>t in e?ude(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,pde=(e,t)=>{for(var n in t||(t={}))dde.call(t,n)&&EN(e,n,t[n]);if(kN)for(var n of kN(t))fde.call(t,n)&&EN(e,n,t[n]);return e},hde=ue((e,{spacing:t,breakpoints:n,cols:r,verticalSpacing:o})=>{const i=o!=null,s=cde(e,n).reduce((a,c)=>{var u,f;const p="maxWidth"in c?"max-width":"min-width",g=re({size:p==="max-width"?c.maxWidth:c.minWidth,sizes:e.breakpoints,units:"em"}),v=Ro(g)-(p==="max-width"?1:0);return a[`@media (${p}: ${ba(v)})`]={gridTemplateColumns:`repeat(${c.cols}, minmax(0, 1fr))`,gap:`${re({size:(u=c.verticalSpacing)!=null?u:i?o:t,sizes:e.spacing})} ${re({size:(f=c.spacing)!=null?f:t,sizes:e.spacing})}`},a},{});return{root:pde({boxSizing:"border-box",display:"grid",gridTemplateColumns:`repeat(${r}, minmax(0, 1fr))`,gap:`${re({size:i?o:t,sizes:e.spacing})} ${re({size:t,sizes:e.spacing})}`},s)}});const mde=hde;var gde=Object.defineProperty,bv=Object.getOwnPropertySymbols,H6=Object.prototype.hasOwnProperty,W6=Object.prototype.propertyIsEnumerable,$N=(e,t,n)=>t in e?gde(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,vde=(e,t)=>{for(var n in t||(t={}))H6.call(t,n)&&$N(e,n,t[n]);if(bv)for(var n of bv(t))W6.call(t,n)&&$N(e,n,t[n]);return e},yde=(e,t)=>{var n={};for(var r in e)H6.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&bv)for(var r of bv(e))t.indexOf(r)<0&&W6.call(e,r)&&(n[r]=e[r]);return n};const _de={breakpoints:[],cols:1,spacing:"md"},TP=_.forwardRef((e,t)=>{const n=ae("SimpleGrid",_de,e),{className:r,breakpoints:o,cols:i,spacing:s,verticalSpacing:a,children:c,unstyled:u,variant:f}=n,p=yde(n,["className","breakpoints","cols","spacing","verticalSpacing","children","unstyled","variant"]),{classes:g,cx:v}=mde({breakpoints:o,cols:i,spacing:s,verticalSpacing:a},{name:"SimpleGrid",unstyled:u,variant:f});return k.createElement(Pe,vde({className:v(g.root,r),ref:t},p),c)});TP.displayName="@mantine/core/SimpleGrid";var wde=ue((e,{spacing:t,align:n,justify:r})=>({root:{display:"flex",flexDirection:"column",alignItems:n,justifyContent:r,gap:re({size:t,sizes:e.spacing})}}));const bde=wde;var xde=Object.defineProperty,xv=Object.getOwnPropertySymbols,U6=Object.prototype.hasOwnProperty,Z6=Object.prototype.propertyIsEnumerable,MN=(e,t,n)=>t in e?xde(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Sde=(e,t)=>{for(var n in t||(t={}))U6.call(t,n)&&MN(e,n,t[n]);if(xv)for(var n of xv(t))Z6.call(t,n)&&MN(e,n,t[n]);return e},Pde=(e,t)=>{var n={};for(var r in e)U6.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&xv)for(var r of xv(e))t.indexOf(r)<0&&Z6.call(e,r)&&(n[r]=e[r]);return n};const Ode={spacing:"md",align:"stretch",justify:"flex-start"},Je=_.forwardRef((e,t)=>{const n=ae("Stack",Ode,e),{spacing:r,className:o,align:i,justify:s,unstyled:a,variant:c}=n,u=Pde(n,["spacing","className","align","justify","unstyled","variant"]),{classes:f,cx:p}=bde({spacing:r,align:i,justify:s},{name:"Stack",unstyled:a,variant:c});return k.createElement(Pe,Sde({className:p(f.root,o),ref:t},u))});Je.displayName="@mantine/core/Stack";const G6=_.createContext(null),Cde=G6.Provider,kde=()=>_.useContext(G6);var Ede=Object.defineProperty,Sv=Object.getOwnPropertySymbols,Y6=Object.prototype.hasOwnProperty,K6=Object.prototype.propertyIsEnumerable,NN=(e,t,n)=>t in e?Ede(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,TN=(e,t)=>{for(var n in t||(t={}))Y6.call(t,n)&&NN(e,n,t[n]);if(Sv)for(var n of Sv(t))K6.call(t,n)&&NN(e,n,t[n]);return e},$de=(e,t)=>{var n={};for(var r in e)Y6.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Sv)for(var r of Sv(e))t.indexOf(r)<0&&K6.call(e,r)&&(n[r]=e[r]);return n};const Mde={size:"sm"},q6=_.forwardRef((e,t)=>{const n=ae("SwitchGroup",Mde,e),{children:r,value:o,defaultValue:i,onChange:s,size:a,wrapperProps:c}=n,u=$de(n,["children","value","defaultValue","onChange","size","wrapperProps"]),[f,p]=go({value:o,defaultValue:i,finalValue:[],onChange:s}),g=v=>{const y=v.currentTarget.value;p(f.includes(y)?f.filter(w=>w!==y):[...f,y])};return k.createElement(Cde,{value:{value:f,onChange:g,size:a}},k.createElement(et.Wrapper,TN(TN({labelElement:"div",size:a,__staticSelector:"SwitchGroup",ref:t},c),u),r))});q6.displayName="@mantine/core/SwitchGroup";var Nde=Object.defineProperty,Tde=Object.defineProperties,Ide=Object.getOwnPropertyDescriptors,IN=Object.getOwnPropertySymbols,jde=Object.prototype.hasOwnProperty,Lde=Object.prototype.propertyIsEnumerable,jN=(e,t,n)=>t in e?Nde(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Dde=(e,t)=>{for(var n in t||(t={}))jde.call(t,n)&&jN(e,n,t[n]);if(IN)for(var n of IN(t))Lde.call(t,n)&&jN(e,n,t[n]);return e},Rde=(e,t)=>Tde(e,Ide(t));const zde={xs:M(16),sm:M(20),md:M(24),lg:M(30),xl:M(36)},Ade={xs:M(32),sm:M(38),md:M(46),lg:M(56),xl:M(72)},Bde={xs:M(12),sm:M(14),md:M(18),lg:M(22),xl:M(28)},Fde={xs:M(5),sm:M(6),md:M(7),lg:M(9),xl:M(11)},Vde={xs:M(4),sm:M(5),md:M(6),lg:M(8),xl:M(10)};var Hde=ue((e,{radius:t,color:n,labelPosition:r,error:o},{size:i})=>{const s=re({size:i,sizes:Bde}),a=re({size:t,sizes:e.radius}),c=e.fn.variant({variant:"filled",color:n}),u=re({size:i,sizes:Ade}),f=M(i==="xs"?1:2),p=e.fn.variant({variant:"filled",color:"red"}).background;return{root:{position:"relative"},input:{height:0,width:0,overflow:"hidden",whiteSpace:"nowrap",padding:0,WebkitClipPath:"inset(50%)",clipPath:"inset(50%)",position:"absolute"},track:Rde(Dde({},e.fn.focusStyles("input:focus + &")),{cursor:e.cursorType,overflow:"hidden",WebkitTapHighlightColor:"transparent",position:"relative",borderRadius:a,backgroundColor:e.colorScheme==="dark"?e.colors.dark[6]:e.colors.gray[2],border:`${M(1)} solid ${o?p:e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[3]}`,height:re({size:i,sizes:zde}),minWidth:u,margin:0,transitionProperty:"background-color, border-color",transitionTimingFunction:e.transitionTimingFunction,transitionDuration:"150ms",boxSizing:"border-box",appearance:"none",display:"flex",alignItems:"center",fontSize:re({size:i,sizes:Fde}),fontWeight:600,order:r==="left"?2:1,userSelect:"none",zIndex:0,lineHeight:0,color:e.colorScheme==="dark"?e.colors.dark[1]:e.colors.gray[6],transition:`color 150ms ${e.transitionTimingFunction}`,"input:checked + &":{backgroundColor:c.background,borderColor:c.background,color:e.white,transition:`color 150ms ${e.transitionTimingFunction}`},"input:disabled + &":{backgroundColor:e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[2],borderColor:e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[2],cursor:"not-allowed",pointerEvents:"none"}}),thumb:{position:"absolute",zIndex:1,borderRadius:a,boxSizing:"border-box",display:"flex",backgroundColor:e.white,height:s,width:s,border:`${M(1)} solid ${e.colorScheme==="dark"?e.white:e.colors.gray[3]}`,left:f,transition:`left 150ms ${e.transitionTimingFunction}`,"& > *":{margin:"auto"},"@media (prefers-reduced-motion)":{transitionDuration:e.respectReducedMotion?"0ms":""},"input:checked + * > &":{left:`calc(100% - ${s} - ${f})`,borderColor:e.white},"input:disabled + * > &":{borderColor:e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[2],backgroundColor:e.colorScheme==="dark"?e.colors.dark[3]:e.colors.gray[0]}},trackLabel:{height:"100%",display:"grid",placeContent:"center",minWidth:`calc(${u} - ${s})`,paddingInline:re({size:i,sizes:Vde}),marginLeft:`calc(${s} + ${f})`,transition:`margin 150ms ${e.transitionTimingFunction}`,"input:checked + * > &":{marginLeft:0,marginRight:`calc(${s} + ${f})`}}}});const Wde=Hde;var Ude=Object.defineProperty,Zde=Object.defineProperties,Gde=Object.getOwnPropertyDescriptors,Pv=Object.getOwnPropertySymbols,J6=Object.prototype.hasOwnProperty,X6=Object.prototype.propertyIsEnumerable,LN=(e,t,n)=>t in e?Ude(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,U_=(e,t)=>{for(var n in t||(t={}))J6.call(t,n)&&LN(e,n,t[n]);if(Pv)for(var n of Pv(t))X6.call(t,n)&&LN(e,n,t[n]);return e},Yde=(e,t)=>Zde(e,Gde(t)),Kde=(e,t)=>{var n={};for(var r in e)J6.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Pv)for(var r of Pv(e))t.indexOf(r)<0&&X6.call(e,r)&&(n[r]=e[r]);return n};const qde={offLabel:"",onLabel:"",size:"sm",radius:"xl",error:!1},Ld=_.forwardRef((e,t)=>{var n;const r=ae("Switch",qde,e),{className:o,color:i,label:s,offLabel:a,onLabel:c,id:u,style:f,size:p,radius:g,wrapperProps:v,children:y,unstyled:w,styles:P,classNames:x,thumbIcon:S,sx:O,checked:E,defaultChecked:$,onChange:N,labelPosition:I,description:R,error:B,disabled:z,variant:G}=r,X=Kde(r,["className","color","label","offLabel","onLabel","id","style","size","radius","wrapperProps","children","unstyled","styles","classNames","thumbIcon","sx","checked","defaultChecked","onChange","labelPosition","description","error","disabled","variant"]),Q=kde(),V=Q?.size||p,{classes:H,cx:Z}=Wde({color:i,radius:g,labelPosition:I,error:!!B},{name:"Switch",classNames:x,styles:P,unstyled:w,size:V,variant:G}),{systemStyles:Y,rest:j}=Dl(X),U=$a(u),F=Q?{checked:Q.value.includes(j.value),onChange:Q.onChange}:{},[K,ee]=go({value:(n=F.checked)!=null?n:E,defaultValue:$,finalValue:!1});return k.createElement(EP,U_(U_({className:Z(o,H.root),sx:O,style:f,id:U,size:Q?.size||p,labelPosition:I,label:s,description:R,error:B,disabled:z,__staticSelector:"Switch",classNames:x,styles:P,unstyled:w,"data-checked":F.checked||void 0,variant:G},Y),v),k.createElement("input",Yde(U_({},j),{disabled:z,checked:K,onChange:fe=>{Q?F.onChange(fe):N?.(fe),ee(fe.currentTarget.checked)},id:U,ref:t,type:"checkbox",className:H.input})),k.createElement("label",{htmlFor:U,className:H.track},k.createElement("div",{className:H.thumb},S),k.createElement("div",{className:H.trackLabel},K?c:a)))});Ld.displayName="@mantine/core/Switch";Ld.Group=q6;var Jde=Object.defineProperty,Xde=Object.defineProperties,Qde=Object.getOwnPropertyDescriptors,DN=Object.getOwnPropertySymbols,efe=Object.prototype.hasOwnProperty,tfe=Object.prototype.propertyIsEnumerable,RN=(e,t,n)=>t in e?Jde(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,nfe=(e,t)=>{for(var n in t||(t={}))efe.call(t,n)&&RN(e,n,t[n]);if(DN)for(var n of DN(t))tfe.call(t,n)&&RN(e,n,t[n]);return e},rfe=(e,t)=>Xde(e,Qde(t)),ofe=ue((e,{captionSide:t,horizontalSpacing:n,verticalSpacing:r,fontSize:o,withBorder:i,withColumnBorders:s})=>{const a=`${M(1)} solid ${e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[3]}`;return{root:rfe(nfe({},e.fn.fontStyles()),{width:"100%",borderCollapse:"collapse",captionSide:t,color:e.colorScheme==="dark"?e.colors.dark[0]:e.black,lineHeight:e.lineHeight,border:i?a:void 0,"& > caption":{marginTop:t==="top"?0:e.spacing.xs,marginBottom:t==="bottom"?0:e.spacing.xs,fontSize:e.fontSizes.sm,color:e.colorScheme==="dark"?e.colors.dark[2]:e.colors.gray[6]},"& > thead > tr > th, & > tfoot > tr > th, & > tbody > tr > th":{textAlign:"left",fontWeight:"bold",color:e.colorScheme==="dark"?e.colors.dark[0]:e.colors.gray[7],fontSize:re({size:o,sizes:e.fontSizes}),padding:`${re({size:r,sizes:e.spacing})} ${re({size:n,sizes:e.spacing})}`},"& > thead > tr > th":{borderBottom:a},"& > tfoot > tr > th, & > tbody > tr > th":{borderTop:a},"& > tbody > tr > td":{padding:`${re({size:r,sizes:e.spacing})} ${re({size:n,sizes:e.spacing})}`,borderTop:a,fontSize:re({size:o,sizes:e.fontSizes})},"& > tbody > tr:first-of-type > td, & > tbody > tr:first-of-type > th":{borderTop:"none"},"& > thead > tr > th, & > tbody > tr > td":{borderRight:s?a:"none","&:last-of-type":{borderRight:"none",borderLeft:s?a:"none"}},"& > tbody > tr > th":{borderRight:s?a:"none"},"&[data-striped] > tbody > tr:nth-of-type(odd)":{backgroundColor:e.colorScheme==="dark"?e.colors.dark[6]:e.colors.gray[0]},"&[data-hover] > tbody > tr":e.fn.hover({backgroundColor:e.colorScheme==="dark"?e.colors.dark[5]:e.colors.gray[1]})})}});const ife=ofe;var sfe=Object.defineProperty,afe=Object.defineProperties,lfe=Object.getOwnPropertyDescriptors,Ov=Object.getOwnPropertySymbols,Q6=Object.prototype.hasOwnProperty,e8=Object.prototype.propertyIsEnumerable,zN=(e,t,n)=>t in e?sfe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,cfe=(e,t)=>{for(var n in t||(t={}))Q6.call(t,n)&&zN(e,n,t[n]);if(Ov)for(var n of Ov(t))e8.call(t,n)&&zN(e,n,t[n]);return e},ufe=(e,t)=>afe(e,lfe(t)),dfe=(e,t)=>{var n={};for(var r in e)Q6.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Ov)for(var r of Ov(e))t.indexOf(r)<0&&e8.call(e,r)&&(n[r]=e[r]);return n};const ffe={striped:!1,highlightOnHover:!1,captionSide:"top",horizontalSpacing:"xs",fontSize:"sm",verticalSpacing:7,withBorder:!1,withColumnBorders:!1},Zc=_.forwardRef((e,t)=>{const n=ae("Table",ffe,e),{className:r,children:o,striped:i,highlightOnHover:s,captionSide:a,horizontalSpacing:c,verticalSpacing:u,fontSize:f,unstyled:p,withBorder:g,withColumnBorders:v,variant:y}=n,w=dfe(n,["className","children","striped","highlightOnHover","captionSide","horizontalSpacing","verticalSpacing","fontSize","unstyled","withBorder","withColumnBorders","variant"]),{classes:P,cx:x}=ife({captionSide:a,verticalSpacing:u,horizontalSpacing:c,fontSize:f,withBorder:g,withColumnBorders:v},{unstyled:p,name:"Table",variant:y});return k.createElement(Pe,ufe(cfe({},w),{component:"table",ref:t,className:x(P.root,r),"data-striped":i||void 0,"data-hover":s||void 0}),o)});Zc.displayName="@mantine/core/Table";var pfe=Object.defineProperty,hfe=Object.defineProperties,mfe=Object.getOwnPropertyDescriptors,AN=Object.getOwnPropertySymbols,gfe=Object.prototype.hasOwnProperty,vfe=Object.prototype.propertyIsEnumerable,BN=(e,t,n)=>t in e?pfe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,FN=(e,t)=>{for(var n in t||(t={}))gfe.call(t,n)&&BN(e,n,t[n]);if(AN)for(var n of AN(t))vfe.call(t,n)&&BN(e,n,t[n]);return e},yfe=(e,t)=>hfe(e,mfe(t));const _fe={xs:M(16),sm:M(20),md:M(26),lg:M(32),xl:M(40)},wfe=["filled","light","gradient","outline","default"];function bfe({theme:e,variant:t,color:n,gradient:r}){if(!wfe.includes(t))return null;const o=e.fn.variant({variant:t,color:n||e.primaryColor,gradient:r,primaryFallback:!1});return{backgroundColor:o.background,color:o.color,backgroundImage:t==="gradient"?o.background:void 0,border:`${M(t==="gradient"?0:1)} solid ${o.border}`}}var xfe=ue((e,{color:t,radius:n,gradient:r},{variant:o,size:i})=>{const s=re({size:i,sizes:_fe});return{root:FN(yfe(FN({},e.fn.fontStyles()),{display:"inline-flex",alignItems:"center",justifyContent:"center",boxSizing:"border-box",width:s,height:s,minWidth:s,minHeight:s,borderRadius:e.fn.radius(n)}),bfe({theme:e,variant:o,gradient:r,color:t}))}});const Sfe=xfe;var Pfe=Object.defineProperty,Cv=Object.getOwnPropertySymbols,t8=Object.prototype.hasOwnProperty,n8=Object.prototype.propertyIsEnumerable,VN=(e,t,n)=>t in e?Pfe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Ofe=(e,t)=>{for(var n in t||(t={}))t8.call(t,n)&&VN(e,n,t[n]);if(Cv)for(var n of Cv(t))n8.call(t,n)&&VN(e,n,t[n]);return e},Cfe=(e,t)=>{var n={};for(var r in e)t8.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Cv)for(var r of Cv(e))t.indexOf(r)<0&&n8.call(e,r)&&(n[r]=e[r]);return n};const kfe={size:"md",variant:"filled"},ex=_.forwardRef((e,t)=>{const n=ae("ThemeIcon",kfe,e),{className:r,size:o,radius:i,variant:s,color:a,children:c,gradient:u,unstyled:f}=n,p=Cfe(n,["className","size","radius","variant","color","children","gradient","unstyled"]),{classes:g,cx:v}=Sfe({variant:s,radius:i,color:a,gradient:u},{name:"ThemeIcon",unstyled:f,variant:s,size:o});return k.createElement(Pe,Ofe({className:v(g.root,r),ref:t},p),c)});ex.displayName="@mantine/core/ThemeIcon";var Efe=Object.defineProperty,$fe=Object.defineProperties,Mfe=Object.getOwnPropertyDescriptors,HN=Object.getOwnPropertySymbols,Nfe=Object.prototype.hasOwnProperty,Tfe=Object.prototype.propertyIsEnumerable,WN=(e,t,n)=>t in e?Efe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Ife=(e,t)=>{for(var n in t||(t={}))Nfe.call(t,n)&&WN(e,n,t[n]);if(HN)for(var n of HN(t))Tfe.call(t,n)&&WN(e,n,t[n]);return e},jfe=(e,t)=>$fe(e,Mfe(t));function Lfe(e,t,n){return typeof e<"u"?e in n.headings.sizes?n.headings.sizes[e].fontSize:M(e):n.headings.sizes[t].fontSize}function Dfe(e,t,n){return typeof e<"u"&&e in n.headings.sizes?n.headings.sizes[e].lineHeight:n.headings.sizes[t].lineHeight}var Rfe=ue((e,{element:t,weight:n,inline:r},{size:o})=>({root:jfe(Ife({},e.fn.fontStyles()),{fontFamily:e.headings.fontFamily,fontWeight:n||e.headings.sizes[t].fontWeight||e.headings.fontWeight,fontSize:Lfe(o,t,e),lineHeight:r?1:Dfe(o,t,e),margin:0})}));const zfe=Rfe;var Afe=Object.defineProperty,kv=Object.getOwnPropertySymbols,r8=Object.prototype.hasOwnProperty,o8=Object.prototype.propertyIsEnumerable,UN=(e,t,n)=>t in e?Afe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Bfe=(e,t)=>{for(var n in t||(t={}))r8.call(t,n)&&UN(e,n,t[n]);if(kv)for(var n of kv(t))o8.call(t,n)&&UN(e,n,t[n]);return e},Ffe=(e,t)=>{var n={};for(var r in e)r8.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&kv)for(var r of kv(e))t.indexOf(r)<0&&o8.call(e,r)&&(n[r]=e[r]);return n};const Vfe={order:1},i8=_.forwardRef((e,t)=>{const n=ae("Title",Vfe,e),{className:r,order:o,children:i,unstyled:s,size:a,weight:c,inline:u,variant:f}=n,p=Ffe(n,["className","order","children","unstyled","size","weight","inline","variant"]),{classes:g,cx:v}=zfe({element:`h${o}`,weight:c,inline:u},{name:"Title",unstyled:s,variant:f,size:a});return[1,2,3,4,5,6].includes(o)?k.createElement(W,Bfe({variant:f,component:`h${o}`,ref:t,className:v(g.root,r)},p),i):null});i8.displayName="@mantine/core/Title";var Hfe=Object.defineProperty,Wfe=Object.defineProperties,Ufe=Object.getOwnPropertyDescriptors,ZN=Object.getOwnPropertySymbols,Zfe=Object.prototype.hasOwnProperty,Gfe=Object.prototype.propertyIsEnumerable,GN=(e,t,n)=>t in e?Hfe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,oh=(e,t)=>{for(var n in t||(t={}))Zfe.call(t,n)&&GN(e,n,t[n]);if(ZN)for(var n of ZN(t))Gfe.call(t,n)&&GN(e,n,t[n]);return e},ih=(e,t)=>Wfe(e,Ufe(t)),Yfe=ue(e=>{const t=WW(e.headings.sizes).reduce((n,r)=>{const o=e.headings.sizes[r];return n[`& ${r}`]=ih(oh({fontFamily:e.headings.fontFamily,fontWeight:o.fontWeight||e.headings.fontWeight,marginTop:typeof o.lineHeight=="number"?`calc(${e.spacing.xl} * ${o.lineHeight})`:e.spacing.xl,marginBottom:e.spacing.sm},o),{[e.fn.smallerThan("sm")]:{fontSize:`calc(${M(o.fontSize)} / 1.3)`}}),n},{});return{root:ih(oh(ih(oh({},e.fn.fontStyles()),{color:e.colorScheme==="dark"?e.colors.dark[0]:e.black,lineHeight:e.lineHeight,fontSize:e.fontSizes.md,[e.fn.smallerThan("sm")]:{fontSize:e.fontSizes.sm}}),t),{"& img":{maxWidth:"100%",marginBottom:e.spacing.xs},"& p":{marginTop:0,marginBottom:e.spacing.lg},"& mark":{backgroundColor:e.fn.themeColor("yellow",e.colorScheme==="dark"?5:2),color:e.colorScheme==="dark"?e.colors.dark[9]:"inherit"},"& hr":{marginTop:e.spacing.md,marginBottom:e.spacing.sm,borderBottom:0,borderLeft:0,borderRight:0,borderTop:`${M(1)} dashed ${e.colors.gray[e.colorScheme==="dark"?4:6]}`},"& a":ih(oh({},e.fn.focusStyles()),{color:e.colors[e.primaryColor][e.colorScheme==="dark"?4:6],textDecoration:"none","&:hover":{textDecoration:"underline"}}),"& pre":{padding:e.spacing.xs,lineHeight:e.lineHeight,margin:0,marginTop:e.spacing.md,marginBottom:e.spacing.md,overflowX:"auto",fontFamily:e.fontFamilyMonospace,fontSize:e.fontSizes.sm,borderRadius:e.radius.sm,backgroundColor:e.colorScheme==="dark"?e.colors.dark[8]:e.colors.gray[0],"& code":{backgroundColor:"transparent",padding:0,borderRadius:0,color:"inherit",border:0}},"& code":{lineHeight:e.lineHeight,padding:`${M(1)} ${M(5)}`,borderRadius:e.radius.sm,color:e.colorScheme==="dark"?e.colors.dark[0]:e.black,backgroundColor:e.colorScheme==="dark"?e.colors.dark[9]:e.colors.gray[0],fontFamily:e.fontFamilyMonospace,fontSize:e.fontSizes.xs,border:`${M(1)} solid ${e.colorScheme==="dark"?e.colors.dark[9]:e.colors.gray[3]}`},"& ul, & ol":{marginBottom:e.spacing.md,paddingLeft:38,"& li":{marginTop:e.spacing.xs}},"& table":{width:"100%",borderCollapse:"collapse",captionSide:"bottom",marginBottom:e.spacing.md,"& caption":{marginTop:e.spacing.xs,fontSize:e.fontSizes.sm,color:e.colorScheme==="dark"?e.colors.dark[2]:e.colors.gray[6]},"& th":{textAlign:"left",fontWeight:"bold",color:e.colorScheme==="dark"?e.colors.dark[0]:e.colors.gray[7],fontSize:14,padding:`${M(7)} ${M(10)}`},"& thead th":{borderBottom:`${M(1)} solid ${e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[3]}`},"& tfoot th":{borderTop:`${M(1)} solid ${e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[3]}`},"& td":{padding:`${M(7)} ${M(10)}`,borderBottom:`${M(1)} solid ${e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[3]}`,fontSize:14},"& tr:last-of-type td":{borderBottom:"none"}},"& blockquote":{fontSize:e.fontSizes.lg,lineHeight:e.lineHeight,margin:`${e.spacing.md} 0`,borderTopRightRadius:e.radius.sm,borderBottomRightRadius:e.radius.sm,padding:`${e.spacing.md} ${e.spacing.lg}`,color:e.colorScheme==="dark"?e.colors.dark[0]:e.black,borderLeft:`${M(6)} solid ${e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[3]}`,"& cite":{display:"block",fontSize:e.fontSizes.sm,marginTop:e.spacing.xs,color:e.colorScheme==="dark"?e.colors.dark[2]:e.colors.gray[6],overflow:"hidden",textOverflow:"ellipsis"}}})}});const Kfe=Yfe;var qfe=Object.defineProperty,Ev=Object.getOwnPropertySymbols,s8=Object.prototype.hasOwnProperty,a8=Object.prototype.propertyIsEnumerable,YN=(e,t,n)=>t in e?qfe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Jfe=(e,t)=>{for(var n in t||(t={}))s8.call(t,n)&&YN(e,n,t[n]);if(Ev)for(var n of Ev(t))a8.call(t,n)&&YN(e,n,t[n]);return e},Xfe=(e,t)=>{var n={};for(var r in e)s8.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Ev)for(var r of Ev(e))t.indexOf(r)<0&&a8.call(e,r)&&(n[r]=e[r]);return n};const l8=_.forwardRef((e,t)=>{const n=ae("TypographyStylesProvider",{},e),{className:r,unstyled:o,variant:i}=n,s=Xfe(n,["className","unstyled","variant"]),{classes:a,cx:c}=Kfe(null,{name:"TypographyStylesProvider",unstyled:o,variant:i});return k.createElement(Pe,Jfe({className:c(a.root,r),ref:t},s))});l8.displayName="@mantine/core/TypographyStylesProvider";var tx={},KN=xs;tx.createRoot=KN.createRoot,tx.hydrateRoot=KN.hydrateRoot;const Qfe=(e,t)=>{const n=e[t];return n?typeof n=="function"?n():Promise.resolve(n):new Promise((r,o)=>{(typeof queueMicrotask=="function"?queueMicrotask:setTimeout)(o.bind(null,new Error("Unknown variable dynamic import: "+t)))})};/** +`+i.stack}return{value:e,source:t,stack:o,digest:null}}function P_(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function $b(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var WK=typeof WeakMap=="function"?WeakMap:Map;function ED(e,t,n){n=cs(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){zm||(zm=!0,Ab=r),$b(e,t)},n}function $D(e,t,n){n=cs(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var o=t.value;n.payload=function(){return r(o)},n.callback=function(){$b(e,t)}}var i=e.stateNode;return i!==null&&typeof i.componentDidCatch=="function"&&(n.callback=function(){$b(e,t),typeof r!="function"&&(da===null?da=new Set([this]):da.add(this));var s=t.stack;this.componentDidCatch(t.value,{componentStack:s!==null?s:""})}),n}function m2(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new WK;var o=new Set;r.set(t,o)}else o=r.get(t),o===void 0&&(o=new Set,r.set(t,o));o.has(n)||(o.add(n),e=oq.bind(null,e,t,n),t.then(e,e))}function g2(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function v2(e,t,n,r,o){return e.mode&1?(e.flags|=65536,e.lanes=o,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=cs(-1,1),t.tag=2,ua(n,t,1))),n.lanes|=1),e)}var UK=bs.ReactCurrentOwner,zr=!1;function pr(e,t,n,r){t.child=e===null?aD(t,null,n,r):tu(t,e.child,n,r)}function y2(e,t,n,r,o){n=n.render;var i=t.ref;return Hc(t,o),r=VS(e,t,n,r,i,o),n=HS(),e!==null&&!zr?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,ms(e,t,o)):(zt&&n&&MS(t),t.flags|=1,pr(e,t,r,o),t.child)}function _2(e,t,n,r,o){if(e===null){var i=n.type;return typeof i=="function"&&!QS(i)&&i.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=i,MD(e,t,i,r,o)):(e=Fh(n.type,null,r,t,t.mode,o),e.ref=t.ref,e.return=t,t.child=e)}if(i=e.child,!(e.lanes&o)){var s=i.memoizedProps;if(n=n.compare,n=n!==null?n:rf,n(s,r)&&e.ref===t.ref)return ms(e,t,o)}return t.flags|=1,e=pa(i,r),e.ref=t.ref,e.return=t,t.child=e}function MD(e,t,n,r,o){if(e!==null){var i=e.memoizedProps;if(rf(i,r)&&e.ref===t.ref)if(zr=!1,t.pendingProps=r=i,(e.lanes&o)!==0)e.flags&131072&&(zr=!0);else return t.lanes=e.lanes,ms(e,t,o)}return Mb(e,t,n,r,o)}function ND(e,t,n){var r=t.pendingProps,o=r.children,i=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},kt($c,oo),oo|=n;else{if(!(n&1073741824))return e=i!==null?i.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,kt($c,oo),oo|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=i!==null?i.baseLanes:n,kt($c,oo),oo|=r}else i!==null?(r=i.baseLanes|n,t.memoizedState=null):r=n,kt($c,oo),oo|=r;return pr(e,t,o,n),t.child}function TD(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Mb(e,t,n,r,o){var i=Fr(n)?Ol:rr.current;return i=Qc(t,i),Hc(t,o),n=VS(e,t,n,r,i,o),r=HS(),e!==null&&!zr?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,ms(e,t,o)):(zt&&r&&MS(t),t.flags|=1,pr(e,t,n,o),t.child)}function w2(e,t,n,r,o){if(Fr(n)){var i=!0;Em(t)}else i=!1;if(Hc(t,o),t.stateNode===null)zh(e,t),iD(t,n,r),Eb(t,n,r,o),r=!0;else if(e===null){var s=t.stateNode,a=t.memoizedProps;s.props=a;var c=s.context,u=n.contextType;typeof u=="object"&&u!==null?u=zo(u):(u=Fr(n)?Ol:rr.current,u=Qc(t,u));var f=n.getDerivedStateFromProps,p=typeof f=="function"||typeof s.getSnapshotBeforeUpdate=="function";p||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(a!==r||c!==u)&&d2(t,s,r,u),Hs=!1;var g=t.memoizedState;s.state=g,Im(t,r,s,o),c=t.memoizedState,a!==r||g!==c||Br.current||Hs?(typeof f=="function"&&(kb(t,n,f,r),c=t.memoizedState),(a=Hs||u2(t,n,a,r,g,c,u))?(p||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount()),typeof s.componentDidMount=="function"&&(t.flags|=4194308)):(typeof s.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=c),s.props=r,s.state=c,s.context=u,r=a):(typeof s.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{s=t.stateNode,rD(e,t),a=t.memoizedProps,u=t.type===t.elementType?a:Zo(t.type,a),s.props=u,p=t.pendingProps,g=s.context,c=n.contextType,typeof c=="object"&&c!==null?c=zo(c):(c=Fr(n)?Ol:rr.current,c=Qc(t,c));var v=n.getDerivedStateFromProps;(f=typeof v=="function"||typeof s.getSnapshotBeforeUpdate=="function")||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(a!==p||g!==c)&&d2(t,s,r,c),Hs=!1,g=t.memoizedState,s.state=g,Im(t,r,s,o);var y=t.memoizedState;a!==p||g!==y||Br.current||Hs?(typeof v=="function"&&(kb(t,n,v,r),y=t.memoizedState),(u=Hs||u2(t,n,u,r,g,y,c)||!1)?(f||typeof s.UNSAFE_componentWillUpdate!="function"&&typeof s.componentWillUpdate!="function"||(typeof s.componentWillUpdate=="function"&&s.componentWillUpdate(r,y,c),typeof s.UNSAFE_componentWillUpdate=="function"&&s.UNSAFE_componentWillUpdate(r,y,c)),typeof s.componentDidUpdate=="function"&&(t.flags|=4),typeof s.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof s.componentDidUpdate!="function"||a===e.memoizedProps&&g===e.memoizedState||(t.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&g===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=y),s.props=r,s.state=y,s.context=c,r=u):(typeof s.componentDidUpdate!="function"||a===e.memoizedProps&&g===e.memoizedState||(t.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&g===e.memoizedState||(t.flags|=1024),r=!1)}return Nb(e,t,n,r,i,o)}function Nb(e,t,n,r,o,i){TD(e,t);var s=(t.flags&128)!==0;if(!r&&!s)return o&&i2(t,n,!1),ms(e,t,i);r=t.stateNode,UK.current=t;var a=s&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&s?(t.child=tu(t,e.child,null,i),t.child=tu(t,null,a,i)):pr(e,t,a,i),t.memoizedState=r.state,o&&i2(t,n,!0),t.child}function ID(e){var t=e.stateNode;t.pendingContext?o2(e,t.pendingContext,t.pendingContext!==t.context):t.context&&o2(e,t.context,!1),zS(e,t.containerInfo)}function b2(e,t,n,r,o){return eu(),TS(o),t.flags|=256,pr(e,t,n,r),t.child}var Tb={dehydrated:null,treeContext:null,retryLane:0};function Ib(e){return{baseLanes:e,cachePool:null,transitions:null}}function jD(e,t,n){var r=t.pendingProps,o=Ht.current,i=!1,s=(t.flags&128)!==0,a;if((a=s)||(a=e!==null&&e.memoizedState===null?!1:(o&2)!==0),a?(i=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(o|=1),kt(Ht,o&1),e===null)return Ob(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(s=r.children,e=r.fallback,i?(r=t.mode,i=t.child,s={mode:"hidden",children:s},!(r&1)&&i!==null?(i.childLanes=0,i.pendingProps=s):i=w0(s,r,0,null),e=yl(e,r,n,null),i.return=t,e.return=t,i.sibling=e,t.child=i,t.child.memoizedState=Ib(n),t.memoizedState=Tb,e):ZS(t,s));if(o=e.memoizedState,o!==null&&(a=o.dehydrated,a!==null))return ZK(e,t,s,r,a,o,n);if(i){i=r.fallback,s=t.mode,o=e.child,a=o.sibling;var c={mode:"hidden",children:r.children};return!(s&1)&&t.child!==o?(r=t.child,r.childLanes=0,r.pendingProps=c,t.deletions=null):(r=pa(o,c),r.subtreeFlags=o.subtreeFlags&14680064),a!==null?i=pa(a,i):(i=yl(i,s,n,null),i.flags|=2),i.return=t,r.return=t,r.sibling=i,t.child=r,r=i,i=t.child,s=e.child.memoizedState,s=s===null?Ib(n):{baseLanes:s.baseLanes|n,cachePool:null,transitions:s.transitions},i.memoizedState=s,i.childLanes=e.childLanes&~n,t.memoizedState=Tb,r}return i=e.child,e=i.sibling,r=pa(i,{mode:"visible",children:r.children}),!(t.mode&1)&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function ZS(e,t){return t=w0({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function Lp(e,t,n,r){return r!==null&&TS(r),tu(t,e.child,null,n),e=ZS(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function ZK(e,t,n,r,o,i,s){if(n)return t.flags&256?(t.flags&=-257,r=P_(Error(ce(422))),Lp(e,t,s,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(i=r.fallback,o=t.mode,r=w0({mode:"visible",children:r.children},o,0,null),i=yl(i,o,s,null),i.flags|=2,r.return=t,i.return=t,r.sibling=i,t.child=r,t.mode&1&&tu(t,e.child,null,s),t.child.memoizedState=Ib(s),t.memoizedState=Tb,i);if(!(t.mode&1))return Lp(e,t,s,null);if(o.data==="$!"){if(r=o.nextSibling&&o.nextSibling.dataset,r)var a=r.dgst;return r=a,i=Error(ce(419)),r=P_(i,r,void 0),Lp(e,t,s,r)}if(a=(s&e.childLanes)!==0,zr||a){if(r=Cn,r!==null){switch(s&-s){case 4:o=2;break;case 16:o=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:o=32;break;case 536870912:o=268435456;break;default:o=0}o=o&(r.suspendedLanes|s)?0:o,o!==0&&o!==i.retryLane&&(i.retryLane=o,hs(e,o),Xo(r,e,o,-1))}return XS(),r=P_(Error(ce(421))),Lp(e,t,s,r)}return o.data==="$?"?(t.flags|=128,t.child=e.child,t=iq.bind(null,e),o._reactRetry=t,null):(e=i.treeContext,uo=ca(o.nextSibling),po=t,zt=!0,Yo=null,e!==null&&(Mo[No++]=ss,Mo[No++]=as,Mo[No++]=Cl,ss=e.id,as=e.overflow,Cl=t),t=ZS(t,r.children),t.flags|=4096,t)}function x2(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Cb(e.return,t,n)}function O_(e,t,n,r,o){var i=e.memoizedState;i===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:o}:(i.isBackwards=t,i.rendering=null,i.renderingStartTime=0,i.last=r,i.tail=n,i.tailMode=o)}function LD(e,t,n){var r=t.pendingProps,o=r.revealOrder,i=r.tail;if(pr(e,t,r.children,n),r=Ht.current,r&2)r=r&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&x2(e,n,t);else if(e.tag===19)x2(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(kt(Ht,r),!(t.mode&1))t.memoizedState=null;else switch(o){case"forwards":for(n=t.child,o=null;n!==null;)e=n.alternate,e!==null&&jm(e)===null&&(o=n),n=n.sibling;n=o,n===null?(o=t.child,t.child=null):(o=n.sibling,n.sibling=null),O_(t,!1,o,n,i);break;case"backwards":for(n=null,o=t.child,t.child=null;o!==null;){if(e=o.alternate,e!==null&&jm(e)===null){t.child=o;break}e=o.sibling,o.sibling=n,n=o,o=e}O_(t,!0,n,null,i);break;case"together":O_(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function zh(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function ms(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),El|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(ce(153));if(t.child!==null){for(e=t.child,n=pa(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=pa(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function GK(e,t,n){switch(t.tag){case 3:ID(t),eu();break;case 5:lD(t);break;case 1:Fr(t.type)&&Em(t);break;case 4:zS(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,o=t.memoizedProps.value;kt(Nm,r._currentValue),r._currentValue=o;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(kt(Ht,Ht.current&1),t.flags|=128,null):n&t.child.childLanes?jD(e,t,n):(kt(Ht,Ht.current&1),e=ms(e,t,n),e!==null?e.sibling:null);kt(Ht,Ht.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return LD(e,t,n);t.flags|=128}if(o=t.memoizedState,o!==null&&(o.rendering=null,o.tail=null,o.lastEffect=null),kt(Ht,Ht.current),r)break;return null;case 22:case 23:return t.lanes=0,ND(e,t,n)}return ms(e,t,n)}var DD,jb,RD,zD;DD=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};jb=function(){};RD=function(e,t,n,r){var o=e.memoizedProps;if(o!==r){e=t.stateNode,ul(Ii.current);var i=null;switch(n){case"input":o=nb(e,o),r=nb(e,r),i=[];break;case"select":o=Ut({},o,{value:void 0}),r=Ut({},r,{value:void 0}),i=[];break;case"textarea":o=ib(e,o),r=ib(e,r),i=[];break;default:typeof o.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=Cm)}ab(n,r);var s;n=null;for(u in o)if(!r.hasOwnProperty(u)&&o.hasOwnProperty(u)&&o[u]!=null)if(u==="style"){var a=o[u];for(s in a)a.hasOwnProperty(s)&&(n||(n={}),n[s]="")}else u!=="dangerouslySetInnerHTML"&&u!=="children"&&u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&u!=="autoFocus"&&(qd.hasOwnProperty(u)?i||(i=[]):(i=i||[]).push(u,null));for(u in r){var c=r[u];if(a=o?.[u],r.hasOwnProperty(u)&&c!==a&&(c!=null||a!=null))if(u==="style")if(a){for(s in a)!a.hasOwnProperty(s)||c&&c.hasOwnProperty(s)||(n||(n={}),n[s]="");for(s in c)c.hasOwnProperty(s)&&a[s]!==c[s]&&(n||(n={}),n[s]=c[s])}else n||(i||(i=[]),i.push(u,n)),n=c;else u==="dangerouslySetInnerHTML"?(c=c?c.__html:void 0,a=a?a.__html:void 0,c!=null&&a!==c&&(i=i||[]).push(u,c)):u==="children"?typeof c!="string"&&typeof c!="number"||(i=i||[]).push(u,""+c):u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&(qd.hasOwnProperty(u)?(c!=null&&u==="onScroll"&&Tt("scroll",e),i||a===c||(i=[])):(i=i||[]).push(u,c))}n&&(i=i||[]).push("style",n);var u=i;(t.updateQueue=u)&&(t.flags|=4)}};zD=function(e,t,n,r){n!==r&&(t.flags|=4)};function rd(e,t){if(!zt)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function qn(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var o=e.child;o!==null;)n|=o.lanes|o.childLanes,r|=o.subtreeFlags&14680064,r|=o.flags&14680064,o.return=e,o=o.sibling;else for(o=e.child;o!==null;)n|=o.lanes|o.childLanes,r|=o.subtreeFlags,r|=o.flags,o.return=e,o=o.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function YK(e,t,n){var r=t.pendingProps;switch(NS(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return qn(t),null;case 1:return Fr(t.type)&&km(),qn(t),null;case 3:return r=t.stateNode,nu(),Dt(Br),Dt(rr),BS(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(Ip(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Yo!==null&&(Vb(Yo),Yo=null))),jb(e,t),qn(t),null;case 5:AS(t);var o=ul(cf.current);if(n=t.type,e!==null&&t.stateNode!=null)RD(e,t,n,r,o),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(ce(166));return qn(t),null}if(e=ul(Ii.current),Ip(t)){r=t.stateNode,n=t.type;var i=t.memoizedProps;switch(r[Oi]=t,r[af]=i,e=(t.mode&1)!==0,n){case"dialog":Tt("cancel",r),Tt("close",r);break;case"iframe":case"object":case"embed":Tt("load",r);break;case"video":case"audio":for(o=0;o<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=s.createElement(n,{is:r.is}):(e=s.createElement(n),n==="select"&&(s=e,r.multiple?s.multiple=!0:r.size&&(s.size=r.size))):e=s.createElementNS(e,n),e[Oi]=t,e[af]=r,DD(e,t,!1,!1),t.stateNode=e;e:{switch(s=lb(n,r),n){case"dialog":Tt("cancel",e),Tt("close",e),o=r;break;case"iframe":case"object":case"embed":Tt("load",e),o=r;break;case"video":case"audio":for(o=0;oou&&(t.flags|=128,r=!0,rd(i,!1),t.lanes=4194304)}else{if(!r)if(e=jm(s),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),rd(i,!0),i.tail===null&&i.tailMode==="hidden"&&!s.alternate&&!zt)return qn(t),null}else 2*Qt()-i.renderingStartTime>ou&&n!==1073741824&&(t.flags|=128,r=!0,rd(i,!1),t.lanes=4194304);i.isBackwards?(s.sibling=t.child,t.child=s):(n=i.last,n!==null?n.sibling=s:t.child=s,i.last=s)}return i.tail!==null?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=Qt(),t.sibling=null,n=Ht.current,kt(Ht,r?n&1|2:n&1),t):(qn(t),null);case 22:case 23:return JS(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?oo&1073741824&&(qn(t),t.subtreeFlags&6&&(t.flags|=8192)):qn(t),null;case 24:return null;case 25:return null}throw Error(ce(156,t.tag))}function KK(e,t){switch(NS(t),t.tag){case 1:return Fr(t.type)&&km(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return nu(),Dt(Br),Dt(rr),BS(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return AS(t),null;case 13:if(Dt(Ht),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(ce(340));eu()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Dt(Ht),null;case 4:return nu(),null;case 10:return LS(t.type._context),null;case 22:case 23:return JS(),null;case 24:return null;default:return null}}var Dp=!1,er=!1,qK=typeof WeakSet=="function"?WeakSet:Set,xe=null;function Ec(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){Yt(e,t,r)}else n.current=null}function Lb(e,t,n){try{n()}catch(r){Yt(e,t,r)}}var S2=!1;function JK(e,t){if(yb=Sm,e=VL(),$S(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var o=r.anchorOffset,i=r.focusNode;r=r.focusOffset;try{n.nodeType,i.nodeType}catch{n=null;break e}var s=0,a=-1,c=-1,u=0,f=0,p=e,g=null;t:for(;;){for(var v;p!==n||o!==0&&p.nodeType!==3||(a=s+o),p!==i||r!==0&&p.nodeType!==3||(c=s+r),p.nodeType===3&&(s+=p.nodeValue.length),(v=p.firstChild)!==null;)g=p,p=v;for(;;){if(p===e)break t;if(g===n&&++u===o&&(a=s),g===i&&++f===r&&(c=s),(v=p.nextSibling)!==null)break;p=g,g=p.parentNode}p=v}n=a===-1||c===-1?null:{start:a,end:c}}else n=null}n=n||{start:0,end:0}}else n=null;for(_b={focusedElem:e,selectionRange:n},Sm=!1,xe=t;xe!==null;)if(t=xe,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,xe=e;else for(;xe!==null;){t=xe;try{var y=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(y!==null){var w=y.memoizedProps,P=y.memoizedState,x=t.stateNode,S=x.getSnapshotBeforeUpdate(t.elementType===t.type?w:Zo(t.type,w),P);x.__reactInternalSnapshotBeforeUpdate=S}break;case 3:var O=t.stateNode.containerInfo;O.nodeType===1?O.textContent="":O.nodeType===9&&O.documentElement&&O.removeChild(O.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(ce(163))}}catch(E){Yt(t,t.return,E)}if(e=t.sibling,e!==null){e.return=t.return,xe=e;break}xe=t.return}return y=S2,S2=!1,y}function Td(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var o=r=r.next;do{if((o.tag&e)===e){var i=o.destroy;o.destroy=void 0,i!==void 0&&Lb(t,n,i)}o=o.next}while(o!==r)}}function y0(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function Db(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function AD(e){var t=e.alternate;t!==null&&(e.alternate=null,AD(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Oi],delete t[af],delete t[xb],delete t[IK],delete t[jK])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function BD(e){return e.tag===5||e.tag===3||e.tag===4}function P2(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||BD(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Rb(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Cm));else if(r!==4&&(e=e.child,e!==null))for(Rb(e,t,n),e=e.sibling;e!==null;)Rb(e,t,n),e=e.sibling}function zb(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(zb(e,t,n),e=e.sibling;e!==null;)zb(e,t,n),e=e.sibling}var jn=null,Go=!1;function Ns(e,t,n){for(n=n.child;n!==null;)FD(e,t,n),n=n.sibling}function FD(e,t,n){if(Ti&&typeof Ti.onCommitFiberUnmount=="function")try{Ti.onCommitFiberUnmount(u0,n)}catch{}switch(n.tag){case 5:er||Ec(n,t);case 6:var r=jn,o=Go;jn=null,Ns(e,t,n),jn=r,Go=o,jn!==null&&(Go?(e=jn,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):jn.removeChild(n.stateNode));break;case 18:jn!==null&&(Go?(e=jn,n=n.stateNode,e.nodeType===8?y_(e.parentNode,n):e.nodeType===1&&y_(e,n),tf(e)):y_(jn,n.stateNode));break;case 4:r=jn,o=Go,jn=n.stateNode.containerInfo,Go=!0,Ns(e,t,n),jn=r,Go=o;break;case 0:case 11:case 14:case 15:if(!er&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){o=r=r.next;do{var i=o,s=i.destroy;i=i.tag,s!==void 0&&(i&2||i&4)&&Lb(n,t,s),o=o.next}while(o!==r)}Ns(e,t,n);break;case 1:if(!er&&(Ec(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){Yt(n,t,a)}Ns(e,t,n);break;case 21:Ns(e,t,n);break;case 22:n.mode&1?(er=(r=er)||n.memoizedState!==null,Ns(e,t,n),er=r):Ns(e,t,n);break;default:Ns(e,t,n)}}function O2(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new qK),t.forEach(function(r){var o=sq.bind(null,e,r);n.has(r)||(n.add(r),r.then(o,o))})}}function Wo(e,t){var n=t.deletions;if(n!==null)for(var r=0;ro&&(o=s),r&=~i}if(r=o,r=Qt()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*QK(r/1960))-r,10e?16:e,Js===null)var r=!1;else{if(e=Js,Js=null,Am=0,ot&6)throw Error(ce(331));var o=ot;for(ot|=4,xe=e.current;xe!==null;){var i=xe,s=i.child;if(xe.flags&16){var a=i.deletions;if(a!==null){for(var c=0;cQt()-KS?vl(e,0):YS|=n),Vr(e,t)}function KD(e,t){t===0&&(e.mode&1?(t=kp,kp<<=1,!(kp&130023424)&&(kp=4194304)):t=1);var n=vr();e=hs(e,t),e!==null&&(Lf(e,t,n),Vr(e,n))}function iq(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),KD(e,n)}function sq(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,o=e.memoizedState;o!==null&&(n=o.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(ce(314))}r!==null&&r.delete(t),KD(e,n)}var qD;qD=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Br.current)zr=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return zr=!1,GK(e,t,n);zr=!!(e.flags&131072)}else zr=!1,zt&&t.flags&1048576&&QL(t,Mm,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;zh(e,t),e=t.pendingProps;var o=Qc(t,rr.current);Hc(t,n),o=VS(null,t,r,e,o,n);var i=HS();return t.flags|=1,typeof o=="object"&&o!==null&&typeof o.render=="function"&&o.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Fr(r)?(i=!0,Em(t)):i=!1,t.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,RS(t),o.updater=g0,t.stateNode=o,o._reactInternals=t,Eb(t,r,e,n),t=Nb(null,t,r,!0,i,n)):(t.tag=0,zt&&i&&MS(t),pr(null,t,o,n),t=t.child),t;case 16:r=t.elementType;e:{switch(zh(e,t),e=t.pendingProps,o=r._init,r=o(r._payload),t.type=r,o=t.tag=lq(r),e=Zo(r,e),o){case 0:t=Mb(null,t,r,e,n);break e;case 1:t=w2(null,t,r,e,n);break e;case 11:t=y2(null,t,r,e,n);break e;case 14:t=_2(null,t,r,Zo(r.type,e),n);break e}throw Error(ce(306,r,""))}return t;case 0:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Zo(r,o),Mb(e,t,r,o,n);case 1:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Zo(r,o),w2(e,t,r,o,n);case 3:e:{if(ID(t),e===null)throw Error(ce(387));r=t.pendingProps,i=t.memoizedState,o=i.element,rD(e,t),Im(t,r,null,n);var s=t.memoizedState;if(r=s.element,i.isDehydrated)if(i={element:r,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){o=ru(Error(ce(423)),t),t=b2(e,t,r,n,o);break e}else if(r!==o){o=ru(Error(ce(424)),t),t=b2(e,t,r,n,o);break e}else for(uo=ca(t.stateNode.containerInfo.firstChild),po=t,zt=!0,Yo=null,n=aD(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(eu(),r===o){t=ms(e,t,n);break e}pr(e,t,r,n)}t=t.child}return t;case 5:return lD(t),e===null&&Ob(t),r=t.type,o=t.pendingProps,i=e!==null?e.memoizedProps:null,s=o.children,wb(r,o)?s=null:i!==null&&wb(r,i)&&(t.flags|=32),TD(e,t),pr(e,t,s,n),t.child;case 6:return e===null&&Ob(t),null;case 13:return jD(e,t,n);case 4:return zS(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=tu(t,null,r,n):pr(e,t,r,n),t.child;case 11:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Zo(r,o),y2(e,t,r,o,n);case 7:return pr(e,t,t.pendingProps,n),t.child;case 8:return pr(e,t,t.pendingProps.children,n),t.child;case 12:return pr(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,o=t.pendingProps,i=t.memoizedProps,s=o.value,kt(Nm,r._currentValue),r._currentValue=s,i!==null)if(ei(i.value,s)){if(i.children===o.children&&!Br.current){t=ms(e,t,n);break e}}else for(i=t.child,i!==null&&(i.return=t);i!==null;){var a=i.dependencies;if(a!==null){s=i.child;for(var c=a.firstContext;c!==null;){if(c.context===r){if(i.tag===1){c=cs(-1,n&-n),c.tag=2;var u=i.updateQueue;if(u!==null){u=u.shared;var f=u.pending;f===null?c.next=c:(c.next=f.next,f.next=c),u.pending=c}}i.lanes|=n,c=i.alternate,c!==null&&(c.lanes|=n),Cb(i.return,n,t),a.lanes|=n;break}c=c.next}}else if(i.tag===10)s=i.type===t.type?null:i.child;else if(i.tag===18){if(s=i.return,s===null)throw Error(ce(341));s.lanes|=n,a=s.alternate,a!==null&&(a.lanes|=n),Cb(s,n,t),s=i.sibling}else s=i.child;if(s!==null)s.return=i;else for(s=i;s!==null;){if(s===t){s=null;break}if(i=s.sibling,i!==null){i.return=s.return,s=i;break}s=s.return}i=s}pr(e,t,o.children,n),t=t.child}return t;case 9:return o=t.type,r=t.pendingProps.children,Hc(t,n),o=zo(o),r=r(o),t.flags|=1,pr(e,t,r,n),t.child;case 14:return r=t.type,o=Zo(r,t.pendingProps),o=Zo(r.type,o),_2(e,t,r,o,n);case 15:return MD(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Zo(r,o),zh(e,t),t.tag=1,Fr(r)?(e=!0,Em(t)):e=!1,Hc(t,n),iD(t,r,o),Eb(t,r,o,n),Nb(null,t,r,!0,e,n);case 19:return LD(e,t,n);case 22:return ND(e,t,n)}throw Error(ce(156,t.tag))};function JD(e,t){return SL(e,t)}function aq(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function To(e,t,n,r){return new aq(e,t,n,r)}function QS(e){return e=e.prototype,!(!e||!e.isReactComponent)}function lq(e){if(typeof e=="function")return QS(e)?1:0;if(e!=null){if(e=e.$$typeof,e===yS)return 11;if(e===_S)return 14}return 2}function pa(e,t){var n=e.alternate;return n===null?(n=To(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Fh(e,t,n,r,o,i){var s=2;if(r=e,typeof e=="function")QS(e)&&(s=1);else if(typeof e=="string")s=5;else e:switch(e){case _c:return yl(n.children,o,i,t);case vS:s=8,o|=8;break;case Xw:return e=To(12,n,t,o|2),e.elementType=Xw,e.lanes=i,e;case Qw:return e=To(13,n,t,o),e.elementType=Qw,e.lanes=i,e;case eb:return e=To(19,n,t,o),e.elementType=eb,e.lanes=i,e;case sL:return w0(n,o,i,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case oL:s=10;break e;case iL:s=9;break e;case yS:s=11;break e;case _S:s=14;break e;case Vs:s=16,r=null;break e}throw Error(ce(130,e==null?e:typeof e,""))}return t=To(s,n,t,o),t.elementType=e,t.type=r,t.lanes=i,t}function yl(e,t,n,r){return e=To(7,e,r,t),e.lanes=n,e}function w0(e,t,n,r){return e=To(22,e,r,t),e.elementType=sL,e.lanes=n,e.stateNode={isHidden:!1},e}function C_(e,t,n){return e=To(6,e,null,t),e.lanes=n,e}function k_(e,t,n){return t=To(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function cq(e,t,n,r,o){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=a_(0),this.expirationTimes=a_(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=a_(0),this.identifierPrefix=r,this.onRecoverableError=o,this.mutableSourceEagerHydrationData=null}function eP(e,t,n,r,o,i,s,a,c){return e=new cq(e,t,n,a,c),t===1?(t=1,i===!0&&(t|=8)):t=0,i=To(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},RS(i),e}function uq(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(tR)}catch(e){console.error(e)}}tR(),Q3.exports=_o;var xs=Q3.exports;const mq=Ea(xs);var gq=Object.defineProperty,Vm=Object.getOwnPropertySymbols,nR=Object.prototype.hasOwnProperty,rR=Object.prototype.propertyIsEnumerable,I2=(e,t,n)=>t in e?gq(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,j2=(e,t)=>{for(var n in t||(t={}))nR.call(t,n)&&I2(e,n,t[n]);if(Vm)for(var n of Vm(t))rR.call(t,n)&&I2(e,n,t[n]);return e},vq=(e,t)=>{var n={};for(var r in e)nR.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Vm)for(var r of Vm(e))t.indexOf(r)<0&&rR.call(e,r)&&(n[r]=e[r]);return n};function yq(e){const t=e,{style:n}=t,r=vq(t,["style"]);return k.createElement("svg",j2({viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:j2({width:M(16),height:M(16)},n)},r),k.createElement("path",{d:"M3.13523 6.15803C3.3241 5.95657 3.64052 5.94637 3.84197 6.13523L7.5 9.56464L11.158 6.13523C11.3595 5.94637 11.6759 5.95657 11.8648 6.15803C12.0536 6.35949 12.0434 6.67591 11.842 6.86477L7.84197 10.6148C7.64964 10.7951 7.35036 10.7951 7.15803 10.6148L3.15803 6.86477C2.95657 6.67591 2.94637 6.35949 3.13523 6.15803Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"}))}var _q=Object.defineProperty,wq=Object.defineProperties,bq=Object.getOwnPropertyDescriptors,L2=Object.getOwnPropertySymbols,xq=Object.prototype.hasOwnProperty,Sq=Object.prototype.propertyIsEnumerable,D2=(e,t,n)=>t in e?_q(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Hb=(e,t)=>{for(var n in t||(t={}))xq.call(t,n)&&D2(e,n,t[n]);if(L2)for(var n of L2(t))Sq.call(t,n)&&D2(e,n,t[n]);return e},R2=(e,t)=>wq(e,bq(t));const Pq=["subtle","filled","outline","light","default","transparent","gradient"],Ap={xs:M(18),sm:M(22),md:M(28),lg:M(34),xl:M(44)};function Oq({variant:e,theme:t,color:n,gradient:r}){const o=t.fn.variant({color:n,variant:e,gradient:r});return e==="gradient"?{border:0,backgroundImage:o.background,color:o.color,"&:hover":t.fn.hover({backgroundSize:"200%"})}:Pq.includes(e)?Hb({border:`${M(1)} solid ${o.border}`,backgroundColor:o.background,color:o.color},t.fn.hover({backgroundColor:o.hover})):null}var Cq=ue((e,{radius:t,color:n,gradient:r},{variant:o,size:i})=>({root:R2(Hb({position:"relative",borderRadius:e.fn.radius(t),padding:0,lineHeight:1,display:"flex",alignItems:"center",justifyContent:"center",height:re({size:i,sizes:Ap}),minHeight:re({size:i,sizes:Ap}),width:re({size:i,sizes:Ap}),minWidth:re({size:i,sizes:Ap})},Oq({variant:o,theme:e,color:n,gradient:r})),{"&:active":e.activeStyles,"& [data-action-icon-loader]":{maxWidth:"70%"},"&:disabled, &[data-disabled]":{color:e.colors.gray[e.colorScheme==="dark"?6:4],cursor:"not-allowed",backgroundColor:o==="transparent"?void 0:e.fn.themeColor("gray",e.colorScheme==="dark"?8:1),borderColor:o==="transparent"?void 0:e.fn.themeColor("gray",e.colorScheme==="dark"?8:1),backgroundImage:"none",pointerEvents:"none","&:active":{transform:"none"}},"&[data-loading]":{pointerEvents:"none","&::before":R2(Hb({content:'""'},e.fn.cover(M(-1))),{backgroundColor:e.colorScheme==="dark"?e.fn.rgba(e.colors.dark[7],.5):"rgba(255, 255, 255, .5)",borderRadius:e.fn.radius(t),cursor:"not-allowed"})}})}));const kq=Cq;var Eq=Object.defineProperty,Hm=Object.getOwnPropertySymbols,oR=Object.prototype.hasOwnProperty,iR=Object.prototype.propertyIsEnumerable,z2=(e,t,n)=>t in e?Eq(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,A2=(e,t)=>{for(var n in t||(t={}))oR.call(t,n)&&z2(e,n,t[n]);if(Hm)for(var n of Hm(t))iR.call(t,n)&&z2(e,n,t[n]);return e},B2=(e,t)=>{var n={};for(var r in e)oR.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Hm)for(var r of Hm(e))t.indexOf(r)<0&&iR.call(e,r)&&(n[r]=e[r]);return n};function $q(e){var t=e,{size:n,color:r}=t,o=B2(t,["size","color"]);const i=o,{style:s}=i,a=B2(i,["style"]);return k.createElement("svg",A2({viewBox:"0 0 135 140",xmlns:"http://www.w3.org/2000/svg",fill:r,style:A2({width:n},s)},a),k.createElement("rect",{y:"10",width:"15",height:"120",rx:"6"},k.createElement("animate",{attributeName:"height",begin:"0.5s",dur:"1s",values:"120;110;100;90;80;70;60;50;40;140;120",calcMode:"linear",repeatCount:"indefinite"}),k.createElement("animate",{attributeName:"y",begin:"0.5s",dur:"1s",values:"10;15;20;25;30;35;40;45;50;0;10",calcMode:"linear",repeatCount:"indefinite"})),k.createElement("rect",{x:"30",y:"10",width:"15",height:"120",rx:"6"},k.createElement("animate",{attributeName:"height",begin:"0.25s",dur:"1s",values:"120;110;100;90;80;70;60;50;40;140;120",calcMode:"linear",repeatCount:"indefinite"}),k.createElement("animate",{attributeName:"y",begin:"0.25s",dur:"1s",values:"10;15;20;25;30;35;40;45;50;0;10",calcMode:"linear",repeatCount:"indefinite"})),k.createElement("rect",{x:"60",width:"15",height:"140",rx:"6"},k.createElement("animate",{attributeName:"height",begin:"0s",dur:"1s",values:"120;110;100;90;80;70;60;50;40;140;120",calcMode:"linear",repeatCount:"indefinite"}),k.createElement("animate",{attributeName:"y",begin:"0s",dur:"1s",values:"10;15;20;25;30;35;40;45;50;0;10",calcMode:"linear",repeatCount:"indefinite"})),k.createElement("rect",{x:"90",y:"10",width:"15",height:"120",rx:"6"},k.createElement("animate",{attributeName:"height",begin:"0.25s",dur:"1s",values:"120;110;100;90;80;70;60;50;40;140;120",calcMode:"linear",repeatCount:"indefinite"}),k.createElement("animate",{attributeName:"y",begin:"0.25s",dur:"1s",values:"10;15;20;25;30;35;40;45;50;0;10",calcMode:"linear",repeatCount:"indefinite"})),k.createElement("rect",{x:"120",y:"10",width:"15",height:"120",rx:"6"},k.createElement("animate",{attributeName:"height",begin:"0.5s",dur:"1s",values:"120;110;100;90;80;70;60;50;40;140;120",calcMode:"linear",repeatCount:"indefinite"}),k.createElement("animate",{attributeName:"y",begin:"0.5s",dur:"1s",values:"10;15;20;25;30;35;40;45;50;0;10",calcMode:"linear",repeatCount:"indefinite"})))}var Mq=Object.defineProperty,Wm=Object.getOwnPropertySymbols,sR=Object.prototype.hasOwnProperty,aR=Object.prototype.propertyIsEnumerable,F2=(e,t,n)=>t in e?Mq(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,V2=(e,t)=>{for(var n in t||(t={}))sR.call(t,n)&&F2(e,n,t[n]);if(Wm)for(var n of Wm(t))aR.call(t,n)&&F2(e,n,t[n]);return e},H2=(e,t)=>{var n={};for(var r in e)sR.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Wm)for(var r of Wm(e))t.indexOf(r)<0&&aR.call(e,r)&&(n[r]=e[r]);return n};function Nq(e){var t=e,{size:n,color:r}=t,o=H2(t,["size","color"]);const i=o,{style:s}=i,a=H2(i,["style"]);return k.createElement("svg",V2({viewBox:"0 0 38 38",xmlns:"http://www.w3.org/2000/svg",stroke:r,style:V2({width:n,height:n},s)},a),k.createElement("g",{fill:"none",fillRule:"evenodd"},k.createElement("g",{transform:"translate(2.5 2.5)",strokeWidth:"5"},k.createElement("circle",{strokeOpacity:".5",cx:"16",cy:"16",r:"16"}),k.createElement("path",{d:"M32 16c0-9.94-8.06-16-16-16"},k.createElement("animateTransform",{attributeName:"transform",type:"rotate",from:"0 16 16",to:"360 16 16",dur:"1s",repeatCount:"indefinite"})))))}var Tq=Object.defineProperty,Um=Object.getOwnPropertySymbols,lR=Object.prototype.hasOwnProperty,cR=Object.prototype.propertyIsEnumerable,W2=(e,t,n)=>t in e?Tq(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,U2=(e,t)=>{for(var n in t||(t={}))lR.call(t,n)&&W2(e,n,t[n]);if(Um)for(var n of Um(t))cR.call(t,n)&&W2(e,n,t[n]);return e},Z2=(e,t)=>{var n={};for(var r in e)lR.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Um)for(var r of Um(e))t.indexOf(r)<0&&cR.call(e,r)&&(n[r]=e[r]);return n};function Iq(e){var t=e,{size:n,color:r}=t,o=Z2(t,["size","color"]);const i=o,{style:s}=i,a=Z2(i,["style"]);return k.createElement("svg",U2({viewBox:"0 0 120 30",xmlns:"http://www.w3.org/2000/svg",fill:r,style:U2({width:n},s)},a),k.createElement("circle",{cx:"15",cy:"15",r:"15"},k.createElement("animate",{attributeName:"r",from:"15",to:"15",begin:"0s",dur:"0.8s",values:"15;9;15",calcMode:"linear",repeatCount:"indefinite"}),k.createElement("animate",{attributeName:"fill-opacity",from:"1",to:"1",begin:"0s",dur:"0.8s",values:"1;.5;1",calcMode:"linear",repeatCount:"indefinite"})),k.createElement("circle",{cx:"60",cy:"15",r:"9",fillOpacity:"0.3"},k.createElement("animate",{attributeName:"r",from:"9",to:"9",begin:"0s",dur:"0.8s",values:"9;15;9",calcMode:"linear",repeatCount:"indefinite"}),k.createElement("animate",{attributeName:"fill-opacity",from:"0.5",to:"0.5",begin:"0s",dur:"0.8s",values:".5;1;.5",calcMode:"linear",repeatCount:"indefinite"})),k.createElement("circle",{cx:"105",cy:"15",r:"15"},k.createElement("animate",{attributeName:"r",from:"15",to:"15",begin:"0s",dur:"0.8s",values:"15;9;15",calcMode:"linear",repeatCount:"indefinite"}),k.createElement("animate",{attributeName:"fill-opacity",from:"1",to:"1",begin:"0s",dur:"0.8s",values:"1;.5;1",calcMode:"linear",repeatCount:"indefinite"})))}var jq=Object.defineProperty,Zm=Object.getOwnPropertySymbols,uR=Object.prototype.hasOwnProperty,dR=Object.prototype.propertyIsEnumerable,G2=(e,t,n)=>t in e?jq(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Lq=(e,t)=>{for(var n in t||(t={}))uR.call(t,n)&&G2(e,n,t[n]);if(Zm)for(var n of Zm(t))dR.call(t,n)&&G2(e,n,t[n]);return e},Dq=(e,t)=>{var n={};for(var r in e)uR.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Zm)for(var r of Zm(e))t.indexOf(r)<0&&dR.call(e,r)&&(n[r]=e[r]);return n};const E_={bars:$q,oval:Nq,dots:Iq},Rq={xs:M(18),sm:M(22),md:M(36),lg:M(44),xl:M(58)},zq={size:"md"};function en(e){const t=ae("Loader",zq,e),{size:n,color:r,variant:o}=t,i=Dq(t,["size","color","variant"]),s=ir(),a=o in E_?o:s.loader;return k.createElement(Pe,Lq({role:"presentation",component:E_[a]||E_.bars,size:re({size:n,sizes:Rq}),color:s.fn.variant({variant:"filled",primaryFallback:!1,color:r||s.primaryColor}).background},i))}en.displayName="@mantine/core/Loader";var Aq=Object.defineProperty,Gm=Object.getOwnPropertySymbols,fR=Object.prototype.hasOwnProperty,pR=Object.prototype.propertyIsEnumerable,Y2=(e,t,n)=>t in e?Aq(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,K2=(e,t)=>{for(var n in t||(t={}))fR.call(t,n)&&Y2(e,n,t[n]);if(Gm)for(var n of Gm(t))pR.call(t,n)&&Y2(e,n,t[n]);return e},Bq=(e,t)=>{var n={};for(var r in e)fR.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Gm)for(var r of Gm(e))t.indexOf(r)<0&&pR.call(e,r)&&(n[r]=e[r]);return n};const Fq={color:"gray",size:"md",variant:"subtle"},hR=_.forwardRef((e,t)=>{const n=ae("ActionIcon",Fq,e),{className:r,color:o,children:i,radius:s,size:a,variant:c,gradient:u,disabled:f,loaderProps:p,loading:g,unstyled:v,__staticSelector:y}=n,w=Bq(n,["className","color","children","radius","size","variant","gradient","disabled","loaderProps","loading","unstyled","__staticSelector"]),{classes:P,cx:x,theme:S}=kq({radius:s,color:o,gradient:u},{name:["ActionIcon",y],unstyled:v,size:a,variant:c}),O=k.createElement(en,K2({color:S.fn.variant({color:o,variant:c}).color,size:"100%","data-action-icon-loader":!0},p));return k.createElement(ls,K2({className:x(P.root,r),ref:t,disabled:f,"data-disabled":f||void 0,"data-loading":g||void 0,unstyled:v},w),g?O:i)});hR.displayName="@mantine/core/ActionIcon";const Qe=hR;var Vq=Object.defineProperty,Hq=Object.defineProperties,Wq=Object.getOwnPropertyDescriptors,Ym=Object.getOwnPropertySymbols,mR=Object.prototype.hasOwnProperty,gR=Object.prototype.propertyIsEnumerable,q2=(e,t,n)=>t in e?Vq(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Uq=(e,t)=>{for(var n in t||(t={}))mR.call(t,n)&&q2(e,n,t[n]);if(Ym)for(var n of Ym(t))gR.call(t,n)&&q2(e,n,t[n]);return e},Zq=(e,t)=>Hq(e,Wq(t)),Gq=(e,t)=>{var n={};for(var r in e)mR.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Ym)for(var r of Ym(e))t.indexOf(r)<0&&gR.call(e,r)&&(n[r]=e[r]);return n};function vR(e){const t=ae("Portal",{},e),{children:n,target:r,className:o,innerRef:i}=t,s=Gq(t,["children","target","className","innerRef"]),a=ir(),[c,u]=_.useState(!1),f=_.useRef();return dS(()=>(u(!0),f.current=r?typeof r=="string"?document.querySelector(r):r:document.createElement("div"),r||document.body.appendChild(f.current),()=>{!r&&document.body.removeChild(f.current)}),[r]),c?xs.createPortal(k.createElement("div",Zq(Uq({className:o,dir:a.dir},s),{ref:i}),n),f.current):null}vR.displayName="@mantine/core/Portal";var Yq=Object.defineProperty,Km=Object.getOwnPropertySymbols,yR=Object.prototype.hasOwnProperty,_R=Object.prototype.propertyIsEnumerable,J2=(e,t,n)=>t in e?Yq(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Kq=(e,t)=>{for(var n in t||(t={}))yR.call(t,n)&&J2(e,n,t[n]);if(Km)for(var n of Km(t))_R.call(t,n)&&J2(e,n,t[n]);return e},qq=(e,t)=>{var n={};for(var r in e)yR.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Km)for(var r of Km(e))t.indexOf(r)<0&&_R.call(e,r)&&(n[r]=e[r]);return n};function Af(e){var t=e,{withinPortal:n=!0,children:r}=t,o=qq(t,["withinPortal","children"]);return n?k.createElement(vR,Kq({},o),r):k.createElement(k.Fragment,null,r)}Af.displayName="@mantine/core/OptionalPortal";var Jq=Object.defineProperty,qm=Object.getOwnPropertySymbols,wR=Object.prototype.hasOwnProperty,bR=Object.prototype.propertyIsEnumerable,X2=(e,t,n)=>t in e?Jq(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Q2=(e,t)=>{for(var n in t||(t={}))wR.call(t,n)&&X2(e,n,t[n]);if(qm)for(var n of qm(t))bR.call(t,n)&&X2(e,n,t[n]);return e},Xq=(e,t)=>{var n={};for(var r in e)wR.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&qm)for(var r of qm(e))t.indexOf(r)<0&&bR.call(e,r)&&(n[r]=e[r]);return n};function xR(e){const t=e,{width:n,height:r,style:o}=t,i=Xq(t,["width","height","style"]);return k.createElement("svg",Q2({viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:Q2({width:n,height:r},o)},i),k.createElement("path",{d:"M11.7816 4.03157C12.0062 3.80702 12.0062 3.44295 11.7816 3.2184C11.5571 2.99385 11.193 2.99385 10.9685 3.2184L7.50005 6.68682L4.03164 3.2184C3.80708 2.99385 3.44301 2.99385 3.21846 3.2184C2.99391 3.44295 2.99391 3.80702 3.21846 4.03157L6.68688 7.49999L3.21846 10.9684C2.99391 11.193 2.99391 11.557 3.21846 11.7816C3.44301 12.0061 3.80708 12.0061 4.03164 11.7816L7.50005 8.31316L10.9685 11.7816C11.193 12.0061 11.5571 12.0061 11.7816 11.7816C12.0062 11.557 12.0062 11.193 11.7816 10.9684L8.31322 7.49999L11.7816 4.03157Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"}))}xR.displayName="@mantine/core/CloseIcon";var Qq=Object.defineProperty,Jm=Object.getOwnPropertySymbols,SR=Object.prototype.hasOwnProperty,PR=Object.prototype.propertyIsEnumerable,eE=(e,t,n)=>t in e?Qq(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,eJ=(e,t)=>{for(var n in t||(t={}))SR.call(t,n)&&eE(e,n,t[n]);if(Jm)for(var n of Jm(t))PR.call(t,n)&&eE(e,n,t[n]);return e},tJ=(e,t)=>{var n={};for(var r in e)SR.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Jm)for(var r of Jm(e))t.indexOf(r)<0&&PR.call(e,r)&&(n[r]=e[r]);return n};const nJ={xs:M(12),sm:M(16),md:M(20),lg:M(28),xl:M(34)},rJ={size:"sm"},OR=_.forwardRef((e,t)=>{const n=ae("CloseButton",rJ,e),{iconSize:r,size:o,children:i}=n,s=tJ(n,["iconSize","size","children"]),a=M(r||nJ[o]);return k.createElement(Qe,eJ({ref:t,__staticSelector:"CloseButton",size:o},s),i||k.createElement(xR,{width:a,height:a}))});OR.displayName="@mantine/core/CloseButton";const O0=OR;var oJ=Object.defineProperty,iJ=Object.defineProperties,sJ=Object.getOwnPropertyDescriptors,tE=Object.getOwnPropertySymbols,aJ=Object.prototype.hasOwnProperty,lJ=Object.prototype.propertyIsEnumerable,nE=(e,t,n)=>t in e?oJ(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Bp=(e,t)=>{for(var n in t||(t={}))aJ.call(t,n)&&nE(e,n,t[n]);if(tE)for(var n of tE(t))lJ.call(t,n)&&nE(e,n,t[n]);return e},cJ=(e,t)=>iJ(e,sJ(t));function uJ({underline:e,strikethrough:t}){const n=[];return e&&n.push("underline"),t&&n.push("line-through"),n.length>0?n.join(" "):"none"}function dJ({theme:e,color:t}){return t==="dimmed"?e.fn.dimmed():typeof t=="string"&&(t in e.colors||t.split(".")[0]in e.colors)?e.fn.variant({variant:"filled",color:t}).background:t||"inherit"}function fJ(e){return typeof e=="number"?{overflow:"hidden",textOverflow:"ellipsis",display:"-webkit-box",WebkitLineClamp:e,WebkitBoxOrient:"vertical"}:null}function pJ({theme:e,truncate:t}){return t==="start"?{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",direction:e.dir==="ltr"?"rtl":"ltr",textAlign:e.dir==="ltr"?"right":"left"}:t?{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}:null}var hJ=ue((e,{color:t,lineClamp:n,truncate:r,inline:o,inherit:i,underline:s,gradient:a,weight:c,transform:u,align:f,strikethrough:p,italic:g},{size:v})=>{const y=e.fn.variant({variant:"gradient",gradient:a});return{root:cJ(Bp(Bp(Bp(Bp({},e.fn.fontStyles()),e.fn.focusStyles()),fJ(n)),pJ({theme:e,truncate:r})),{color:dJ({color:t,theme:e}),fontFamily:i?"inherit":e.fontFamily,fontSize:i||v===void 0?"inherit":re({size:v,sizes:e.fontSizes}),lineHeight:i?"inherit":o?1:e.lineHeight,textDecoration:uJ({underline:s,strikethrough:p}),WebkitTapHighlightColor:"transparent",fontWeight:i?"inherit":c,textTransform:u,textAlign:f,fontStyle:g?"italic":void 0}),gradient:{backgroundImage:y.background,WebkitBackgroundClip:"text",WebkitTextFillColor:"transparent"}}});const mJ=hJ;var gJ=Object.defineProperty,Xm=Object.getOwnPropertySymbols,CR=Object.prototype.hasOwnProperty,kR=Object.prototype.propertyIsEnumerable,rE=(e,t,n)=>t in e?gJ(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,vJ=(e,t)=>{for(var n in t||(t={}))CR.call(t,n)&&rE(e,n,t[n]);if(Xm)for(var n of Xm(t))kR.call(t,n)&&rE(e,n,t[n]);return e},yJ=(e,t)=>{var n={};for(var r in e)CR.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Xm)for(var r of Xm(e))t.indexOf(r)<0&&kR.call(e,r)&&(n[r]=e[r]);return n};const _J={variant:"text"},ER=_.forwardRef((e,t)=>{const n=ae("Text",_J,e),{className:r,size:o,weight:i,transform:s,color:a,align:c,variant:u,lineClamp:f,truncate:p,gradient:g,inline:v,inherit:y,underline:w,strikethrough:P,italic:x,classNames:S,styles:O,unstyled:E,span:$,__staticSelector:N}=n,I=yJ(n,["className","size","weight","transform","color","align","variant","lineClamp","truncate","gradient","inline","inherit","underline","strikethrough","italic","classNames","styles","unstyled","span","__staticSelector"]),{classes:R,cx:B}=mJ({color:a,lineClamp:f,truncate:p,inline:v,inherit:y,underline:w,strikethrough:P,italic:x,weight:i,transform:s,align:c,gradient:g},{unstyled:E,name:N||"Text",variant:u,size:o});return k.createElement(Pe,vJ({ref:t,className:B(R.root,{[R.gradient]:u==="gradient"},r),component:$?"span":"div"},I))});ER.displayName="@mantine/core/Text";const W=ER,$R=_.createContext({zIndex:1e3,fixed:!1,layout:"default"});$R.Provider;function wJ(){return _.useContext($R)}function MR(e,t){if(!e)return[];const n=Object.keys(e).filter(r=>r!=="base").map(r=>[re({size:r,sizes:t.breakpoints,units:"em"}),e[r]]);return n.sort((r,o)=>Ro(r[0])-Ro(o[0])),n}var bJ=Object.defineProperty,xJ=Object.defineProperties,SJ=Object.getOwnPropertyDescriptors,oE=Object.getOwnPropertySymbols,PJ=Object.prototype.hasOwnProperty,OJ=Object.prototype.propertyIsEnumerable,iE=(e,t,n)=>t in e?bJ(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Fp=(e,t)=>{for(var n in t||(t={}))PJ.call(t,n)&&iE(e,n,t[n]);if(oE)for(var n of oE(t))OJ.call(t,n)&&iE(e,n,t[n]);return e},sE=(e,t)=>xJ(e,SJ(t)),CJ=ue((e,{height:t,width:n,fixed:r,position:o,hiddenBreakpoint:i,zIndex:s,section:a,withBorder:c,layout:u})=>{const f=typeof n=="object"&&n!==null?MR(n,e).reduce((g,[v,y])=>(g[`@media (min-width: ${ba(v)})`]={width:M(y),minWidth:M(y)},g),{}):null,p=c?{[a==="navbar"?"borderRight":"borderLeft"]:`${M(1)} solid ${e.colorScheme==="dark"?e.colors.dark[5]:e.colors.gray[2]}`}:{};return{root:sE(Fp(Fp(sE(Fp(Fp({},e.fn.fontStyles()),o),{top:u==="alt"?0:o?.top||"var(--mantine-header-height)",bottom:0,zIndex:s,height:t?M(t):u==="alt"?"auto":"calc(100vh - var(--mantine-header-height, 0rem) - var(--mantine-footer-height, 0rem))",width:n?.base?M(n?.base):"100%",position:r?"fixed":"static",boxSizing:"border-box",display:"flex",flexDirection:"column",backgroundColor:e.colorScheme==="dark"?e.colors.dark[7]:e.white}),p),f),{"&[data-hidden]":{[`@media (max-width: ${ba(Ro(re({size:i,sizes:e.breakpoints}))-1)})`]:{display:"none"}}})}});const kJ=CJ;var EJ=Object.defineProperty,Qm=Object.getOwnPropertySymbols,NR=Object.prototype.hasOwnProperty,TR=Object.prototype.propertyIsEnumerable,aE=(e,t,n)=>t in e?EJ(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,lE=(e,t)=>{for(var n in t||(t={}))NR.call(t,n)&&aE(e,n,t[n]);if(Qm)for(var n of Qm(t))TR.call(t,n)&&aE(e,n,t[n]);return e},$J=(e,t)=>{var n={};for(var r in e)NR.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Qm)for(var r of Qm(e))t.indexOf(r)<0&&TR.call(e,r)&&(n[r]=e[r]);return n};const IR=_.forwardRef((e,t)=>{var n=e,{width:r,height:o,fixed:i=!1,position:s,zIndex:a,hiddenBreakpoint:c="md",hidden:u=!1,withBorder:f=!0,className:p,classNames:g,styles:v,children:y,section:w,__staticSelector:P,unstyled:x,variant:S}=n,O=$J(n,["width","height","fixed","position","zIndex","hiddenBreakpoint","hidden","withBorder","className","classNames","styles","children","section","__staticSelector","unstyled","variant"]);const E=wJ(),{classes:$,cx:N,theme:I}=kJ({width:r,height:o,fixed:E.fixed||i,position:s,hiddenBreakpoint:c,zIndex:a||E.zIndex||ii("app"),section:w,withBorder:f,layout:E.layout},{classNames:g,styles:v,name:P,unstyled:x,variant:S}),R=MR(r,I).reduce((B,[z,G])=>(B[`@media (min-width: ${ba(z)})`]={[`--mantine-${w}-width`]:M(G)},B),{});return k.createElement(Pe,lE({component:w==="navbar"?"nav":"aside",ref:t,"data-hidden":u||void 0,className:N($.root,p)},O),y,k.createElement(aG,{styles:()=>({":root":lE({[`--mantine-${w}-width`]:r?.base?M(r.base):"0rem"},R)})}))});IR.displayName="@mantine/core/HorizontalSection";var MJ=Object.defineProperty,eg=Object.getOwnPropertySymbols,jR=Object.prototype.hasOwnProperty,LR=Object.prototype.propertyIsEnumerable,cE=(e,t,n)=>t in e?MJ(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,NJ=(e,t)=>{for(var n in t||(t={}))jR.call(t,n)&&cE(e,n,t[n]);if(eg)for(var n of eg(t))LR.call(t,n)&&cE(e,n,t[n]);return e},TJ=(e,t)=>{var n={};for(var r in e)jR.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&eg)for(var r of eg(e))t.indexOf(r)<0&&LR.call(e,r)&&(n[r]=e[r]);return n};const DR=_.forwardRef((e,t)=>{var n=e,{children:r,grow:o=!1,sx:i}=n,s=TJ(n,["children","grow","sx"]);return k.createElement(Pe,NJ({ref:t,sx:[{flex:o?1:0,boxSizing:"border-box"},...eS(i)]},s),r)});DR.displayName="@mantine/core/Section";const IJ=DR;var jJ=Object.defineProperty,uE=Object.getOwnPropertySymbols,LJ=Object.prototype.hasOwnProperty,DJ=Object.prototype.propertyIsEnumerable,dE=(e,t,n)=>t in e?jJ(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,RJ=(e,t)=>{for(var n in t||(t={}))LJ.call(t,n)&&dE(e,n,t[n]);if(uE)for(var n of uE(t))DJ.call(t,n)&&dE(e,n,t[n]);return e};const zJ={fixed:!1,position:{top:0,left:0},hiddenBreakpoint:"md",hidden:!1},tg=_.forwardRef((e,t)=>{const n=ae("Navbar",zJ,e);return k.createElement(IR,RJ({section:"navbar",__staticSelector:"Navbar",ref:t},n))});tg.Section=IJ;tg.displayName="@mantine/core/Navbar";const Vp={xs:M(1),sm:M(2),md:M(3),lg:M(4),xl:M(5)};function Hp(e,t){const n=e.fn.variant({variant:"outline",color:t}).border;return typeof t=="string"&&(t in e.colors||t.split(".")[0]in e.colors)?n:t===void 0?e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[4]:t}var AJ=ue((e,{color:t},{size:n,variant:r})=>({root:{},withLabel:{borderTop:"0 !important"},left:{"&::before":{display:"none"}},right:{"&::after":{display:"none"}},label:{display:"flex",alignItems:"center","&::before":{content:'""',flex:1,height:M(1),borderTop:`${re({size:n,sizes:Vp})} ${r} ${Hp(e,t)}`,marginRight:e.spacing.xs},"&::after":{content:'""',flex:1,borderTop:`${re({size:n,sizes:Vp})} ${r} ${Hp(e,t)}`,marginLeft:e.spacing.xs}},labelDefaultStyles:{color:t==="dark"?e.colors.dark[1]:e.fn.themeColor(t,e.colorScheme==="dark"?5:e.fn.primaryShade(),!1)},horizontal:{border:0,borderTopWidth:M(re({size:n,sizes:Vp})),borderTopColor:Hp(e,t),borderTopStyle:r,margin:0},vertical:{border:0,alignSelf:"stretch",height:"auto",borderLeftWidth:M(re({size:n,sizes:Vp})),borderLeftColor:Hp(e,t),borderLeftStyle:r}}));const BJ=AJ;var FJ=Object.defineProperty,VJ=Object.defineProperties,HJ=Object.getOwnPropertyDescriptors,ng=Object.getOwnPropertySymbols,RR=Object.prototype.hasOwnProperty,zR=Object.prototype.propertyIsEnumerable,fE=(e,t,n)=>t in e?FJ(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,pE=(e,t)=>{for(var n in t||(t={}))RR.call(t,n)&&fE(e,n,t[n]);if(ng)for(var n of ng(t))zR.call(t,n)&&fE(e,n,t[n]);return e},WJ=(e,t)=>VJ(e,HJ(t)),UJ=(e,t)=>{var n={};for(var r in e)RR.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&ng)for(var r of ng(e))t.indexOf(r)<0&&zR.call(e,r)&&(n[r]=e[r]);return n};const ZJ={orientation:"horizontal",size:"xs",labelPosition:"left",variant:"solid"},Ye=_.forwardRef((e,t)=>{const n=ae("Divider",ZJ,e),{className:r,color:o,orientation:i,size:s,label:a,labelPosition:c,labelProps:u,variant:f,styles:p,classNames:g,unstyled:v}=n,y=UJ(n,["className","color","orientation","size","label","labelPosition","labelProps","variant","styles","classNames","unstyled"]),{classes:w,cx:P}=BJ({color:o},{classNames:g,styles:p,unstyled:v,name:"Divider",variant:f,size:s}),x=i==="vertical",S=i==="horizontal",O=!!a&&S,E=!u?.color;return k.createElement(Pe,pE({ref:t,className:P(w.root,{[w.vertical]:x,[w.horizontal]:S,[w.withLabel]:O},r),role:"separator"},y),O&&k.createElement(W,WJ(pE({},u),{size:u?.size||"xs",mt:M(2),className:P(w.label,w[c],{[w.labelDefaultStyles]:E})}),a))});Ye.displayName="@mantine/core/Divider";var GJ=Object.defineProperty,YJ=Object.defineProperties,KJ=Object.getOwnPropertyDescriptors,hE=Object.getOwnPropertySymbols,qJ=Object.prototype.hasOwnProperty,JJ=Object.prototype.propertyIsEnumerable,mE=(e,t,n)=>t in e?GJ(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,gE=(e,t)=>{for(var n in t||(t={}))qJ.call(t,n)&&mE(e,n,t[n]);if(hE)for(var n of hE(t))JJ.call(t,n)&&mE(e,n,t[n]);return e},XJ=(e,t)=>YJ(e,KJ(t)),QJ=ue((e,t,{size:n})=>({item:XJ(gE({},e.fn.fontStyles()),{boxSizing:"border-box",wordBreak:"break-all",textAlign:"left",width:"100%",padding:`calc(${re({size:n,sizes:e.spacing})} / 1.5) ${re({size:n,sizes:e.spacing})}`,cursor:"pointer",fontSize:re({size:n,sizes:e.fontSizes}),color:e.colorScheme==="dark"?e.colors.dark[0]:e.black,borderRadius:e.fn.radius(),"&[data-hovered]":{backgroundColor:e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[1]},"&[data-selected]":gE({backgroundColor:e.fn.variant({variant:"filled"}).background,color:e.fn.variant({variant:"filled"}).color},e.fn.hover({backgroundColor:e.fn.variant({variant:"filled"}).hover})),"&[data-disabled]":{cursor:"default",color:e.colors.dark[2]}}),nothingFound:{boxSizing:"border-box",color:e.colors.gray[6],paddingTop:`calc(${re({size:n,sizes:e.spacing})} / 2)`,paddingBottom:`calc(${re({size:n,sizes:e.spacing})} / 2)`,textAlign:"center"},separator:{boxSizing:"border-box",textAlign:"left",width:"100%",padding:`calc(${re({size:n,sizes:e.spacing})} / 1.5) ${re({size:n,sizes:e.spacing})}`},separatorLabel:{color:e.colorScheme==="dark"?e.colors.dark[3]:e.colors.gray[5]}}));const eX=QJ;var tX=Object.defineProperty,vE=Object.getOwnPropertySymbols,nX=Object.prototype.hasOwnProperty,rX=Object.prototype.propertyIsEnumerable,yE=(e,t,n)=>t in e?tX(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,oX=(e,t)=>{for(var n in t||(t={}))nX.call(t,n)&&yE(e,n,t[n]);if(vE)for(var n of vE(t))rX.call(t,n)&&yE(e,n,t[n]);return e};function oP({data:e,hovered:t,classNames:n,styles:r,isItemSelected:o,uuid:i,__staticSelector:s,onItemHover:a,onItemSelect:c,itemsRefs:u,itemComponent:f,size:p,nothingFound:g,creatable:v,createLabel:y,unstyled:w,variant:P}){const{classes:x}=eX(null,{classNames:n,styles:r,unstyled:w,name:s,variant:P,size:p}),S=[],O=[];let E=null;const $=(I,R)=>{const B=typeof o=="function"?o(I.value):!1;return k.createElement(f,oX({key:I.value,className:x.item,"data-disabled":I.disabled||void 0,"data-hovered":!I.disabled&&t===R||void 0,"data-selected":!I.disabled&&B||void 0,selected:B,onMouseEnter:()=>a(R),id:`${i}-${R}`,role:"option",tabIndex:-1,"aria-selected":t===R,ref:z=>{u&&u.current&&(u.current[I.value]=z)},onMouseDown:I.disabled?null:z=>{z.preventDefault(),c(I)},disabled:I.disabled,variant:P},I))};let N=null;if(e.forEach((I,R)=>{I.creatable?E=R:I.group?(N!==I.group&&(N=I.group,O.push(k.createElement("div",{className:x.separator,key:`__mantine-divider-${R}`},k.createElement(Ye,{classNames:{label:x.separatorLabel},label:I.group})))),O.push($(I,R))):S.push($(I,R))}),v){const I=e[E];S.push(k.createElement("div",{key:zc(),className:x.item,"data-hovered":t===E||void 0,onMouseEnter:()=>a(E),onMouseDown:R=>{R.preventDefault(),c(I)},tabIndex:-1,ref:R=>{u&&u.current&&(u.current[I.value]=R)}},y))}return O.length>0&&S.length>0&&S.unshift(k.createElement("div",{className:x.separator,key:"empty-group-separator"},k.createElement(Ye,null))),O.length>0||S.length>0?k.createElement(k.Fragment,null,O,S):k.createElement(W,{size:p,unstyled:w,className:x.nothingFound},g)}oP.displayName="@mantine/core/SelectItems";var iX=Object.defineProperty,rg=Object.getOwnPropertySymbols,AR=Object.prototype.hasOwnProperty,BR=Object.prototype.propertyIsEnumerable,_E=(e,t,n)=>t in e?iX(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,sX=(e,t)=>{for(var n in t||(t={}))AR.call(t,n)&&_E(e,n,t[n]);if(rg)for(var n of rg(t))BR.call(t,n)&&_E(e,n,t[n]);return e},aX=(e,t)=>{var n={};for(var r in e)AR.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&rg)for(var r of rg(e))t.indexOf(r)<0&&BR.call(e,r)&&(n[r]=e[r]);return n};const iP=_.forwardRef((e,t)=>{var n=e,{label:r,value:o}=n,i=aX(n,["label","value"]);return k.createElement("div",sX({ref:t},i),r||o)});iP.displayName="@mantine/core/DefaultItem";function lX(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function FR(...e){return t=>e.forEach(n=>lX(n,t))}function Al(...e){return _.useCallback(FR(...e),e)}const VR=_.forwardRef((e,t)=>{const{children:n,...r}=e,o=_.Children.toArray(n),i=o.find(uX);if(i){const s=i.props.children,a=o.map(c=>c===i?_.Children.count(s)>1?_.Children.only(null):_.isValidElement(s)?s.props.children:null:c);return _.createElement(Wb,Lt({},r,{ref:t}),_.isValidElement(s)?_.cloneElement(s,void 0,a):null)}return _.createElement(Wb,Lt({},r,{ref:t}),n)});VR.displayName="Slot";const Wb=_.forwardRef((e,t)=>{const{children:n,...r}=e;return _.isValidElement(n)?_.cloneElement(n,{...dX(r,n.props),ref:FR(t,n.ref)}):_.Children.count(n)>1?_.Children.only(null):null});Wb.displayName="SlotClone";const cX=({children:e})=>_.createElement(_.Fragment,null,e);function uX(e){return _.isValidElement(e)&&e.type===cX}function dX(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...a)=>{i(...a),o(...a)}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}const fX=["a","button","div","h2","h3","img","label","li","nav","ol","p","span","svg","ul"],Bf=fX.reduce((e,t)=>{const n=_.forwardRef((r,o)=>{const{asChild:i,...s}=r,a=i?VR:t;return _.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),_.createElement(a,Lt({},s,{ref:o}))});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{}),Ub=globalThis?.document?_.useLayoutEffect:()=>{};function pX(e,t){return _.useReducer((n,r)=>{const o=t[n][r];return o??n},e)}const Ff=e=>{const{present:t,children:n}=e,r=hX(t),o=typeof n=="function"?n({present:r.isPresent}):_.Children.only(n),i=Al(r.ref,o.ref);return typeof n=="function"||r.isPresent?_.cloneElement(o,{ref:i}):null};Ff.displayName="Presence";function hX(e){const[t,n]=_.useState(),r=_.useRef({}),o=_.useRef(e),i=_.useRef("none"),s=e?"mounted":"unmounted",[a,c]=pX(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return _.useEffect(()=>{const u=Wp(r.current);i.current=a==="mounted"?u:"none"},[a]),Ub(()=>{const u=r.current,f=o.current;if(f!==e){const g=i.current,v=Wp(u);e?c("MOUNT"):v==="none"||u?.display==="none"?c("UNMOUNT"):c(f&&g!==v?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,c]),Ub(()=>{if(t){const u=p=>{const v=Wp(r.current).includes(p.animationName);p.target===t&&v&&xs.flushSync(()=>c("ANIMATION_END"))},f=p=>{p.target===t&&(i.current=Wp(r.current))};return t.addEventListener("animationstart",f),t.addEventListener("animationcancel",u),t.addEventListener("animationend",u),()=>{t.removeEventListener("animationstart",f),t.removeEventListener("animationcancel",u),t.removeEventListener("animationend",u)}}else c("ANIMATION_END")},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:_.useCallback(u=>{u&&(r.current=getComputedStyle(u)),n(u)},[])}}function Wp(e){return e?.animationName||"none"}function mX(e,t=[]){let n=[];function r(i,s){const a=_.createContext(s),c=n.length;n=[...n,s];function u(p){const{scope:g,children:v,...y}=p,w=g?.[e][c]||a,P=_.useMemo(()=>y,Object.values(y));return _.createElement(w.Provider,{value:P},v)}function f(p,g){const v=g?.[e][c]||a,y=_.useContext(v);if(y)return y;if(s!==void 0)return s;throw new Error(`\`${p}\` must be used within \`${i}\``)}return u.displayName=i+"Provider",[u,f]}const o=()=>{const i=n.map(s=>_.createContext(s));return function(a){const c=a?.[e]||i;return _.useMemo(()=>({[`__scope${e}`]:{...a,[e]:c}}),[a,c])}};return o.scopeName=e,[r,gX(o,...t)]}function gX(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(i){const s=r.reduce((a,{useScope:c,scopeName:u})=>{const p=c(i)[`__scope${u}`];return{...a,...p}},{});return _.useMemo(()=>({[`__scope${t.scopeName}`]:s}),[s])}};return n.scopeName=t.scopeName,n}function el(e){const t=_.useRef(e);return _.useEffect(()=>{t.current=e}),_.useMemo(()=>(...n)=>{var r;return(r=t.current)===null||r===void 0?void 0:r.call(t,...n)},[])}const vX=_.createContext(void 0);function yX(e){const t=_.useContext(vX);return e||t||"ltr"}function _X(e,[t,n]){return Math.min(n,Math.max(t,e))}function _l(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e?.(o),n===!1||!o.defaultPrevented)return t?.(o)}}function wX(e,t){return _.useReducer((n,r)=>{const o=t[n][r];return o??n},e)}const HR="ScrollArea",[WR,EIe]=mX(HR),[bX,Fo]=WR(HR),xX=_.forwardRef((e,t)=>{const{__scopeScrollArea:n,type:r="hover",dir:o,scrollHideDelay:i=600,...s}=e,[a,c]=_.useState(null),[u,f]=_.useState(null),[p,g]=_.useState(null),[v,y]=_.useState(null),[w,P]=_.useState(null),[x,S]=_.useState(0),[O,E]=_.useState(0),[$,N]=_.useState(!1),[I,R]=_.useState(!1),B=Al(t,G=>c(G)),z=yX(o);return _.createElement(bX,{scope:n,type:r,dir:z,scrollHideDelay:i,scrollArea:a,viewport:u,onViewportChange:f,content:p,onContentChange:g,scrollbarX:v,onScrollbarXChange:y,scrollbarXEnabled:$,onScrollbarXEnabledChange:N,scrollbarY:w,onScrollbarYChange:P,scrollbarYEnabled:I,onScrollbarYEnabledChange:R,onCornerWidthChange:S,onCornerHeightChange:E},_.createElement(Bf.div,Lt({dir:z},s,{ref:B,style:{position:"relative","--radix-scroll-area-corner-width":x+"px","--radix-scroll-area-corner-height":O+"px",...e.style}})))}),SX="ScrollAreaViewport",PX=_.forwardRef((e,t)=>{const{__scopeScrollArea:n,children:r,...o}=e,i=Fo(SX,n),s=_.useRef(null),a=Al(t,s,i.onViewportChange);return _.createElement(_.Fragment,null,_.createElement("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"}}),_.createElement(Bf.div,Lt({"data-radix-scroll-area-viewport":""},o,{ref:a,style:{overflowX:i.scrollbarXEnabled?"scroll":"hidden",overflowY:i.scrollbarYEnabled?"scroll":"hidden",...e.style}}),_.createElement("div",{ref:i.onContentChange,style:{minWidth:"100%",display:"table"}},r)))}),Ss="ScrollAreaScrollbar",OX=_.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=Fo(Ss,e.__scopeScrollArea),{onScrollbarXEnabledChange:i,onScrollbarYEnabledChange:s}=o,a=e.orientation==="horizontal";return _.useEffect(()=>(a?i(!0):s(!0),()=>{a?i(!1):s(!1)}),[a,i,s]),o.type==="hover"?_.createElement(CX,Lt({},r,{ref:t,forceMount:n})):o.type==="scroll"?_.createElement(kX,Lt({},r,{ref:t,forceMount:n})):o.type==="auto"?_.createElement(UR,Lt({},r,{ref:t,forceMount:n})):o.type==="always"?_.createElement(sP,Lt({},r,{ref:t})):null}),CX=_.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=Fo(Ss,e.__scopeScrollArea),[i,s]=_.useState(!1);return _.useEffect(()=>{const a=o.scrollArea;let c=0;if(a){const u=()=>{window.clearTimeout(c),s(!0)},f=()=>{c=window.setTimeout(()=>s(!1),o.scrollHideDelay)};return a.addEventListener("pointerenter",u),a.addEventListener("pointerleave",f),()=>{window.clearTimeout(c),a.removeEventListener("pointerenter",u),a.removeEventListener("pointerleave",f)}}},[o.scrollArea,o.scrollHideDelay]),_.createElement(Ff,{present:n||i},_.createElement(UR,Lt({"data-state":i?"visible":"hidden"},r,{ref:t})))}),kX=_.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=Fo(Ss,e.__scopeScrollArea),i=e.orientation==="horizontal",s=k0(()=>c("SCROLL_END"),100),[a,c]=wX("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return _.useEffect(()=>{if(a==="idle"){const u=window.setTimeout(()=>c("HIDE"),o.scrollHideDelay);return()=>window.clearTimeout(u)}},[a,o.scrollHideDelay,c]),_.useEffect(()=>{const u=o.viewport,f=i?"scrollLeft":"scrollTop";if(u){let p=u[f];const g=()=>{const v=u[f];p!==v&&(c("SCROLL"),s()),p=v};return u.addEventListener("scroll",g),()=>u.removeEventListener("scroll",g)}},[o.viewport,i,c,s]),_.createElement(Ff,{present:n||a!=="hidden"},_.createElement(sP,Lt({"data-state":a==="hidden"?"hidden":"visible"},r,{ref:t,onPointerEnter:_l(e.onPointerEnter,()=>c("POINTER_ENTER")),onPointerLeave:_l(e.onPointerLeave,()=>c("POINTER_LEAVE"))})))}),UR=_.forwardRef((e,t)=>{const n=Fo(Ss,e.__scopeScrollArea),{forceMount:r,...o}=e,[i,s]=_.useState(!1),a=e.orientation==="horizontal",c=k0(()=>{if(n.viewport){const u=n.viewport.offsetWidth{const{orientation:n="vertical",...r}=e,o=Fo(Ss,e.__scopeScrollArea),i=_.useRef(null),s=_.useRef(0),[a,c]=_.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),u=KR(a.viewport,a.content),f={...r,sizes:a,onSizesChange:c,hasThumb:u>0&&u<1,onThumbChange:g=>i.current=g,onThumbPointerUp:()=>s.current=0,onThumbPointerDown:g=>s.current=g};function p(g,v){return LX(g,s.current,a,v)}return n==="horizontal"?_.createElement(EX,Lt({},f,{ref:t,onThumbPositionChange:()=>{if(o.viewport&&i.current){const g=o.viewport.scrollLeft,v=wE(g,a,o.dir);i.current.style.transform=`translate3d(${v}px, 0, 0)`}},onWheelScroll:g=>{o.viewport&&(o.viewport.scrollLeft=g)},onDragScroll:g=>{o.viewport&&(o.viewport.scrollLeft=p(g,o.dir))}})):n==="vertical"?_.createElement($X,Lt({},f,{ref:t,onThumbPositionChange:()=>{if(o.viewport&&i.current){const g=o.viewport.scrollTop,v=wE(g,a);i.current.style.transform=`translate3d(0, ${v}px, 0)`}},onWheelScroll:g=>{o.viewport&&(o.viewport.scrollTop=g)},onDragScroll:g=>{o.viewport&&(o.viewport.scrollTop=p(g))}})):null}),EX=_.forwardRef((e,t)=>{const{sizes:n,onSizesChange:r,...o}=e,i=Fo(Ss,e.__scopeScrollArea),[s,a]=_.useState(),c=_.useRef(null),u=Al(t,c,i.onScrollbarXChange);return _.useEffect(()=>{c.current&&a(getComputedStyle(c.current))},[c]),_.createElement(GR,Lt({"data-orientation":"horizontal"},o,{ref:u,sizes:n,style:{bottom:0,left:i.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:i.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":C0(n)+"px",...e.style},onThumbPointerDown:f=>e.onThumbPointerDown(f.x),onDragScroll:f=>e.onDragScroll(f.x),onWheelScroll:(f,p)=>{if(i.viewport){const g=i.viewport.scrollLeft+f.deltaX;e.onWheelScroll(g),JR(g,p)&&f.preventDefault()}},onResize:()=>{c.current&&i.viewport&&s&&r({content:i.viewport.scrollWidth,viewport:i.viewport.offsetWidth,scrollbar:{size:c.current.clientWidth,paddingStart:og(s.paddingLeft),paddingEnd:og(s.paddingRight)}})}}))}),$X=_.forwardRef((e,t)=>{const{sizes:n,onSizesChange:r,...o}=e,i=Fo(Ss,e.__scopeScrollArea),[s,a]=_.useState(),c=_.useRef(null),u=Al(t,c,i.onScrollbarYChange);return _.useEffect(()=>{c.current&&a(getComputedStyle(c.current))},[c]),_.createElement(GR,Lt({"data-orientation":"vertical"},o,{ref:u,sizes:n,style:{top:0,right:i.dir==="ltr"?0:void 0,left:i.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":C0(n)+"px",...e.style},onThumbPointerDown:f=>e.onThumbPointerDown(f.y),onDragScroll:f=>e.onDragScroll(f.y),onWheelScroll:(f,p)=>{if(i.viewport){const g=i.viewport.scrollTop+f.deltaY;e.onWheelScroll(g),JR(g,p)&&f.preventDefault()}},onResize:()=>{c.current&&i.viewport&&s&&r({content:i.viewport.scrollHeight,viewport:i.viewport.offsetHeight,scrollbar:{size:c.current.clientHeight,paddingStart:og(s.paddingTop),paddingEnd:og(s.paddingBottom)}})}}))}),[MX,ZR]=WR(Ss),GR=_.forwardRef((e,t)=>{const{__scopeScrollArea:n,sizes:r,hasThumb:o,onThumbChange:i,onThumbPointerUp:s,onThumbPointerDown:a,onThumbPositionChange:c,onDragScroll:u,onWheelScroll:f,onResize:p,...g}=e,v=Fo(Ss,n),[y,w]=_.useState(null),P=Al(t,B=>w(B)),x=_.useRef(null),S=_.useRef(""),O=v.viewport,E=r.content-r.viewport,$=el(f),N=el(c),I=k0(p,10);function R(B){if(x.current){const z=B.clientX-x.current.left,G=B.clientY-x.current.top;u({x:z,y:G})}}return _.useEffect(()=>{const B=z=>{const G=z.target;y?.contains(G)&&$(z,E)};return document.addEventListener("wheel",B,{passive:!1}),()=>document.removeEventListener("wheel",B,{passive:!1})},[O,y,E,$]),_.useEffect(N,[r,N]),iu(y,I),iu(v.content,I),_.createElement(MX,{scope:n,scrollbar:y,hasThumb:o,onThumbChange:el(i),onThumbPointerUp:el(s),onThumbPositionChange:N,onThumbPointerDown:el(a)},_.createElement(Bf.div,Lt({},g,{ref:P,style:{position:"absolute",...g.style},onPointerDown:_l(e.onPointerDown,B=>{B.button===0&&(B.target.setPointerCapture(B.pointerId),x.current=y.getBoundingClientRect(),S.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",R(B))}),onPointerMove:_l(e.onPointerMove,R),onPointerUp:_l(e.onPointerUp,B=>{const z=B.target;z.hasPointerCapture(B.pointerId)&&z.releasePointerCapture(B.pointerId),document.body.style.webkitUserSelect=S.current,x.current=null})})))}),Zb="ScrollAreaThumb",NX=_.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=ZR(Zb,e.__scopeScrollArea);return _.createElement(Ff,{present:n||o.hasThumb},_.createElement(TX,Lt({ref:t},r)))}),TX=_.forwardRef((e,t)=>{const{__scopeScrollArea:n,style:r,...o}=e,i=Fo(Zb,n),s=ZR(Zb,n),{onThumbPositionChange:a}=s,c=Al(t,p=>s.onThumbChange(p)),u=_.useRef(),f=k0(()=>{u.current&&(u.current(),u.current=void 0)},100);return _.useEffect(()=>{const p=i.viewport;if(p){const g=()=>{if(f(),!u.current){const v=DX(p,a);u.current=v,a()}};return a(),p.addEventListener("scroll",g),()=>p.removeEventListener("scroll",g)}},[i.viewport,f,a]),_.createElement(Bf.div,Lt({"data-state":s.hasThumb?"visible":"hidden"},o,{ref:c,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...r},onPointerDownCapture:_l(e.onPointerDownCapture,p=>{const v=p.target.getBoundingClientRect(),y=p.clientX-v.left,w=p.clientY-v.top;s.onThumbPointerDown({x:y,y:w})}),onPointerUp:_l(e.onPointerUp,s.onThumbPointerUp)}))}),YR="ScrollAreaCorner",IX=_.forwardRef((e,t)=>{const n=Fo(YR,e.__scopeScrollArea),r=!!(n.scrollbarX&&n.scrollbarY);return n.type!=="scroll"&&r?_.createElement(jX,Lt({},e,{ref:t})):null}),jX=_.forwardRef((e,t)=>{const{__scopeScrollArea:n,...r}=e,o=Fo(YR,n),[i,s]=_.useState(0),[a,c]=_.useState(0),u=!!(i&&a);return iu(o.scrollbarX,()=>{var f;const p=((f=o.scrollbarX)===null||f===void 0?void 0:f.offsetHeight)||0;o.onCornerHeightChange(p),c(p)}),iu(o.scrollbarY,()=>{var f;const p=((f=o.scrollbarY)===null||f===void 0?void 0:f.offsetWidth)||0;o.onCornerWidthChange(p),s(p)}),u?_.createElement(Bf.div,Lt({},r,{ref:t,style:{width:i,height:a,position:"absolute",right:o.dir==="ltr"?0:void 0,left:o.dir==="rtl"?0:void 0,bottom:0,...e.style}})):null});function og(e){return e?parseInt(e,10):0}function KR(e,t){const n=e/t;return isNaN(n)?0:n}function C0(e){const t=KR(e.viewport,e.content),n=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,r=(e.scrollbar.size-n)*t;return Math.max(r,18)}function LX(e,t,n,r="ltr"){const o=C0(n),i=o/2,s=t||i,a=o-s,c=n.scrollbar.paddingStart+s,u=n.scrollbar.size-n.scrollbar.paddingEnd-a,f=n.content-n.viewport,p=r==="ltr"?[0,f]:[f*-1,0];return qR([c,u],p)(e)}function wE(e,t,n="ltr"){const r=C0(t),o=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,i=t.scrollbar.size-o,s=t.content-t.viewport,a=i-r,c=n==="ltr"?[0,s]:[s*-1,0],u=_X(e,c);return qR([0,s],[0,a])(u)}function qR(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(n-e[0])}}function JR(e,t){return e>0&&e{})=>{let n={left:e.scrollLeft,top:e.scrollTop},r=0;return function o(){const i={left:e.scrollLeft,top:e.scrollTop},s=n.left!==i.left,a=n.top!==i.top;(s||a)&&t(),n=i,r=window.requestAnimationFrame(o)}(),()=>window.cancelAnimationFrame(r)};function k0(e,t){const n=el(e),r=_.useRef(0);return _.useEffect(()=>()=>window.clearTimeout(r.current),[]),_.useCallback(()=>{window.clearTimeout(r.current),r.current=window.setTimeout(n,t)},[n,t])}function iu(e,t){const n=el(t);Ub(()=>{let r=0;if(e){const o=new ResizeObserver(()=>{cancelAnimationFrame(r),r=window.requestAnimationFrame(n)});return o.observe(e),()=>{window.cancelAnimationFrame(r),o.unobserve(e)}}},[e,n])}const RX=xX,zX=PX,bE=OX,xE=NX,AX=IX;var BX=ue((e,{scrollbarSize:t,offsetScrollbars:n,scrollbarHovered:r,hidden:o})=>({root:{overflow:"hidden"},viewport:{width:"100%",height:"100%",paddingRight:n?M(t):void 0,paddingBottom:n?M(t):void 0},scrollbar:{display:o?"none":"flex",userSelect:"none",touchAction:"none",boxSizing:"border-box",padding:`calc(${M(t)} / 5)`,transition:"background-color 150ms ease, opacity 150ms ease","&:hover":{backgroundColor:e.colorScheme==="dark"?e.colors.dark[8]:e.colors.gray[0],[`& .${Ar("thumb")}`]:{backgroundColor:e.colorScheme==="dark"?e.fn.rgba(e.white,.5):e.fn.rgba(e.black,.5)}},'&[data-orientation="vertical"]':{width:M(t)},'&[data-orientation="horizontal"]':{flexDirection:"column",height:M(t)},'&[data-state="hidden"]':{display:"none",opacity:0}},thumb:{ref:Ar("thumb"),flex:1,backgroundColor:e.colorScheme==="dark"?e.fn.rgba(e.white,.4):e.fn.rgba(e.black,.4),borderRadius:M(t),position:"relative",transition:"background-color 150ms ease",display:o?"none":void 0,overflow:"hidden","&::before":{content:'""',position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",width:"100%",height:"100%",minWidth:M(44),minHeight:M(44)}},corner:{backgroundColor:e.colorScheme==="dark"?e.colors.dark[6]:e.colors.gray[0],transition:"opacity 150ms ease",opacity:r?1:0,display:o?"none":void 0}}));const FX=BX;var VX=Object.defineProperty,HX=Object.defineProperties,WX=Object.getOwnPropertyDescriptors,ig=Object.getOwnPropertySymbols,XR=Object.prototype.hasOwnProperty,QR=Object.prototype.propertyIsEnumerable,SE=(e,t,n)=>t in e?VX(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Gb=(e,t)=>{for(var n in t||(t={}))XR.call(t,n)&&SE(e,n,t[n]);if(ig)for(var n of ig(t))QR.call(t,n)&&SE(e,n,t[n]);return e},ez=(e,t)=>HX(e,WX(t)),tz=(e,t)=>{var n={};for(var r in e)XR.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&ig)for(var r of ig(e))t.indexOf(r)<0&&QR.call(e,r)&&(n[r]=e[r]);return n};const nz={scrollbarSize:12,scrollHideDelay:1e3,type:"hover",offsetScrollbars:!1},E0=_.forwardRef((e,t)=>{const n=ae("ScrollArea",nz,e),{children:r,className:o,classNames:i,styles:s,scrollbarSize:a,scrollHideDelay:c,type:u,dir:f,offsetScrollbars:p,viewportRef:g,onScrollPositionChange:v,unstyled:y,variant:w,viewportProps:P}=n,x=tz(n,["children","className","classNames","styles","scrollbarSize","scrollHideDelay","type","dir","offsetScrollbars","viewportRef","onScrollPositionChange","unstyled","variant","viewportProps"]),[S,O]=_.useState(!1),E=ir(),{classes:$,cx:N}=FX({scrollbarSize:a,offsetScrollbars:p,scrollbarHovered:S,hidden:u==="never"},{name:"ScrollArea",classNames:i,styles:s,unstyled:y,variant:w});return k.createElement(RX,{type:u==="never"?"always":u,scrollHideDelay:c,dir:f||E.dir,ref:t,asChild:!0},k.createElement(Pe,Gb({className:N($.root,o)},x),k.createElement(zX,ez(Gb({},P),{className:$.viewport,ref:g,onScroll:typeof v=="function"?({currentTarget:I})=>v({x:I.scrollLeft,y:I.scrollTop}):void 0}),r),k.createElement(bE,{orientation:"horizontal",className:$.scrollbar,forceMount:!0,onMouseEnter:()=>O(!0),onMouseLeave:()=>O(!1)},k.createElement(xE,{className:$.thumb})),k.createElement(bE,{orientation:"vertical",className:$.scrollbar,forceMount:!0,onMouseEnter:()=>O(!0),onMouseLeave:()=>O(!1)},k.createElement(xE,{className:$.thumb})),k.createElement(AX,{className:$.corner})))}),rz=_.forwardRef((e,t)=>{const n=ae("ScrollAreaAutosize",nz,e),{children:r,classNames:o,styles:i,scrollbarSize:s,scrollHideDelay:a,type:c,dir:u,offsetScrollbars:f,viewportRef:p,onScrollPositionChange:g,unstyled:v,sx:y,variant:w,viewportProps:P}=n,x=tz(n,["children","classNames","styles","scrollbarSize","scrollHideDelay","type","dir","offsetScrollbars","viewportRef","onScrollPositionChange","unstyled","sx","variant","viewportProps"]);return k.createElement(Pe,ez(Gb({},x),{ref:t,sx:[{display:"flex"},...eS(y)]}),k.createElement(Pe,{sx:{display:"flex",flexDirection:"column",flex:1}},k.createElement(E0,{classNames:o,styles:i,scrollHideDelay:a,scrollbarSize:s,type:c,dir:u,offsetScrollbars:f,viewportRef:p,onScrollPositionChange:g,unstyled:v,variant:w,viewportProps:P},r)))});rz.displayName="@mantine/core/ScrollAreaAutosize";E0.displayName="@mantine/core/ScrollArea";E0.Autosize=rz;const St=E0;var UX=Object.defineProperty,ZX=Object.defineProperties,GX=Object.getOwnPropertyDescriptors,sg=Object.getOwnPropertySymbols,oz=Object.prototype.hasOwnProperty,iz=Object.prototype.propertyIsEnumerable,PE=(e,t,n)=>t in e?UX(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,OE=(e,t)=>{for(var n in t||(t={}))oz.call(t,n)&&PE(e,n,t[n]);if(sg)for(var n of sg(t))iz.call(t,n)&&PE(e,n,t[n]);return e},YX=(e,t)=>ZX(e,GX(t)),KX=(e,t)=>{var n={};for(var r in e)oz.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&sg)for(var r of sg(e))t.indexOf(r)<0&&iz.call(e,r)&&(n[r]=e[r]);return n};const $0=_.forwardRef((e,t)=>{var n=e,{style:r}=n,o=KX(n,["style"]);return k.createElement(St,YX(OE({},o),{style:OE({width:"100%"},r),viewportProps:{tabIndex:-1},viewportRef:t}),o.children)});$0.displayName="@mantine/core/SelectScrollArea";var qX=ue(()=>({dropdown:{},itemsWrapper:{padding:M(4),display:"flex",width:"100%",boxSizing:"border-box"}}));const JX=qX,ti=Math.min,tr=Math.max,ag=Math.round,Up=Math.floor,Pa=e=>({x:e,y:e}),XX={left:"right",right:"left",bottom:"top",top:"bottom"},QX={start:"end",end:"start"};function Yb(e,t,n){return tr(e,ti(t,n))}function gs(e,t){return typeof e=="function"?e(t):e}function ni(e){return e.split("-")[0]}function Ou(e){return e.split("-")[1]}function aP(e){return e==="x"?"y":"x"}function lP(e){return e==="y"?"height":"width"}function Bl(e){return["top","bottom"].includes(ni(e))?"y":"x"}function cP(e){return aP(Bl(e))}function eQ(e,t,n){n===void 0&&(n=!1);const r=Ou(e),o=cP(e),i=lP(o);let s=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(s=lg(s)),[s,lg(s)]}function tQ(e){const t=lg(e);return[Kb(e),t,Kb(t)]}function Kb(e){return e.replace(/start|end/g,t=>QX[t])}function nQ(e,t,n){const r=["left","right"],o=["right","left"],i=["top","bottom"],s=["bottom","top"];switch(e){case"top":case"bottom":return n?t?o:r:t?r:o;case"left":case"right":return t?i:s;default:return[]}}function rQ(e,t,n,r){const o=Ou(e);let i=nQ(ni(e),n==="start",r);return o&&(i=i.map(s=>s+"-"+o),t&&(i=i.concat(i.map(Kb)))),i}function lg(e){return e.replace(/left|right|bottom|top/g,t=>XX[t])}function oQ(e){return{top:0,right:0,bottom:0,left:0,...e}}function uP(e){return typeof e!="number"?oQ(e):{top:e,right:e,bottom:e,left:e}}function su(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}function CE(e,t,n){let{reference:r,floating:o}=e;const i=Bl(t),s=cP(t),a=lP(s),c=ni(t),u=i==="y",f=r.x+r.width/2-o.width/2,p=r.y+r.height/2-o.height/2,g=r[a]/2-o[a]/2;let v;switch(c){case"top":v={x:f,y:r.y-o.height};break;case"bottom":v={x:f,y:r.y+r.height};break;case"right":v={x:r.x+r.width,y:p};break;case"left":v={x:r.x-o.width,y:p};break;default:v={x:r.x,y:r.y}}switch(Ou(t)){case"start":v[s]-=g*(n&&u?-1:1);break;case"end":v[s]+=g*(n&&u?-1:1);break}return v}const iQ=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:s}=n,a=i.filter(Boolean),c=await(s.isRTL==null?void 0:s.isRTL(t));let u=await s.getElementRects({reference:e,floating:t,strategy:o}),{x:f,y:p}=CE(u,r,c),g=r,v={},y=0;for(let w=0;w({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:i,platform:s,elements:a,middlewareData:c}=t,{element:u,padding:f=0}=gs(e,t)||{};if(u==null)return{};const p=uP(f),g={x:n,y:r},v=cP(o),y=lP(v),w=await s.getDimensions(u),P=v==="y",x=P?"top":"left",S=P?"bottom":"right",O=P?"clientHeight":"clientWidth",E=i.reference[y]+i.reference[v]-g[v]-i.floating[y],$=g[v]-i.reference[v],N=await(s.getOffsetParent==null?void 0:s.getOffsetParent(u));let I=N?N[O]:0;(!I||!await(s.isElement==null?void 0:s.isElement(N)))&&(I=a.floating[O]||i.floating[y]);const R=E/2-$/2,B=I/2-w[y]/2-1,z=ti(p[x],B),G=ti(p[S],B),X=z,Q=I-w[y]-G,V=I/2-w[y]/2+R,H=Yb(X,V,Q),Z=!c.arrow&&Ou(o)!=null&&V!=H&&i.reference[y]/2-(VX<=0)){var B,z;const X=(((B=i.flip)==null?void 0:B.index)||0)+1,Q=$[X];if(Q)return{data:{index:X,overflows:R},reset:{placement:Q}};let V=(z=R.filter(H=>H.overflows[0]<=0).sort((H,Z)=>H.overflows[1]-Z.overflows[1])[0])==null?void 0:z.placement;if(!V)switch(v){case"bestFit":{var G;const H=(G=R.map(Z=>[Z.placement,Z.overflows.filter(Y=>Y>0).reduce((Y,j)=>Y+j,0)]).sort((Z,Y)=>Z[1]-Y[1])[0])==null?void 0:G[0];H&&(V=H);break}case"initialPlacement":V=a;break}if(o!==V)return{reset:{placement:V}}}return{}}}};function az(e){const t=ti(...e.map(i=>i.left)),n=ti(...e.map(i=>i.top)),r=tr(...e.map(i=>i.right)),o=tr(...e.map(i=>i.bottom));return{x:t,y:n,width:r-t,height:o-n}}function sQ(e){const t=e.slice().sort((o,i)=>o.y-i.y),n=[];let r=null;for(let o=0;or.height/2?n.push([i]):n[n.length-1].push(i),r=i}return n.map(o=>su(az(o)))}const lz=function(e){return e===void 0&&(e={}),{name:"inline",options:e,async fn(t){const{placement:n,elements:r,rects:o,platform:i,strategy:s}=t,{padding:a=2,x:c,y:u}=gs(e,t),f=Array.from(await(i.getClientRects==null?void 0:i.getClientRects(r.reference))||[]),p=sQ(f),g=su(az(f)),v=uP(a);function y(){if(p.length===2&&p[0].left>p[1].right&&c!=null&&u!=null)return p.find(P=>c>P.left-v.left&&cP.top-v.top&&u=2){if(Bl(n)==="y"){const z=p[0],G=p[p.length-1],X=ni(n)==="top",Q=z.top,V=G.bottom,H=X?z.left:G.left,Z=X?z.right:G.right,Y=Z-H,j=V-Q;return{top:Q,bottom:V,left:H,right:Z,width:Y,height:j,x:H,y:Q}}const P=ni(n)==="left",x=tr(...p.map(z=>z.right)),S=ti(...p.map(z=>z.left)),O=p.filter(z=>P?z.left===S:z.right===x),E=O[0].top,$=O[O.length-1].bottom,N=S,I=x,R=I-N,B=$-E;return{top:E,bottom:$,left:N,right:I,width:R,height:B,x:N,y:E}}return g}const w=await i.getElementRects({reference:{getBoundingClientRect:y},floating:r.floating,strategy:s});return o.reference.x!==w.reference.x||o.reference.y!==w.reference.y||o.reference.width!==w.reference.width||o.reference.height!==w.reference.height?{reset:{rects:w}}:{}}}};async function aQ(e,t){const{placement:n,platform:r,elements:o}=e,i=await(r.isRTL==null?void 0:r.isRTL(o.floating)),s=ni(n),a=Ou(n),c=Bl(n)==="y",u=["left","top"].includes(s)?-1:1,f=i&&c?-1:1,p=gs(t,e);let{mainAxis:g,crossAxis:v,alignmentAxis:y}=typeof p=="number"?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...p};return a&&typeof y=="number"&&(v=a==="end"?y*-1:y),c?{x:v*f,y:g*u}:{x:g*u,y:v*f}}const cz=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){const{x:n,y:r}=t,o=await aQ(t,e);return{x:n+o.x,y:r+o.y,data:o}}}},fP=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:i=!0,crossAxis:s=!1,limiter:a={fn:P=>{let{x,y:S}=P;return{x,y:S}}},...c}=gs(e,t),u={x:n,y:r},f=await dP(t,c),p=Bl(ni(o)),g=aP(p);let v=u[g],y=u[p];if(i){const P=g==="y"?"top":"left",x=g==="y"?"bottom":"right",S=v+f[P],O=v-f[x];v=Yb(S,v,O)}if(s){const P=p==="y"?"top":"left",x=p==="y"?"bottom":"right",S=y+f[P],O=y-f[x];y=Yb(S,y,O)}const w=a.fn({...t,[g]:v,[p]:y});return{...w,data:{x:w.x-n,y:w.y-r}}}}},lQ=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:i,middlewareData:s}=t,{offset:a=0,mainAxis:c=!0,crossAxis:u=!0}=gs(e,t),f={x:n,y:r},p=Bl(o),g=aP(p);let v=f[g],y=f[p];const w=gs(a,t),P=typeof w=="number"?{mainAxis:w,crossAxis:0}:{mainAxis:0,crossAxis:0,...w};if(c){const O=g==="y"?"height":"width",E=i.reference[g]-i.floating[O]+P.mainAxis,$=i.reference[g]+i.reference[O]-P.mainAxis;v$&&(v=$)}if(u){var x,S;const O=g==="y"?"width":"height",E=["top","left"].includes(ni(o)),$=i.reference[p]-i.floating[O]+(E&&((x=s.offset)==null?void 0:x[p])||0)+(E?0:P.crossAxis),N=i.reference[p]+i.reference[O]+(E?0:((S=s.offset)==null?void 0:S[p])||0)-(E?P.crossAxis:0);y<$?y=$:y>N&&(y=N)}return{[g]:v,[p]:y}}}},cQ=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){const{placement:n,rects:r,platform:o,elements:i}=t,{apply:s=()=>{},...a}=gs(e,t),c=await dP(t,a),u=ni(n),f=Ou(n),p=Bl(n)==="y",{width:g,height:v}=r.floating;let y,w;u==="top"||u==="bottom"?(y=u,w=f===(await(o.isRTL==null?void 0:o.isRTL(i.floating))?"start":"end")?"left":"right"):(w=u,y=f==="end"?"top":"bottom");const P=v-c[y],x=g-c[w],S=!t.middlewareData.shift;let O=P,E=x;if(p){const N=g-c.left-c.right;E=f||S?ti(x,N):N}else{const N=v-c.top-c.bottom;O=f||S?ti(P,N):N}if(S&&!f){const N=tr(c.left,0),I=tr(c.right,0),R=tr(c.top,0),B=tr(c.bottom,0);p?E=g-2*(N!==0||I!==0?N+I:tr(c.left,c.right)):O=v-2*(R!==0||B!==0?R+B:tr(c.top,c.bottom))}await s({...t,availableWidth:E,availableHeight:O});const $=await o.getDimensions(i.floating);return g!==$.width||v!==$.height?{reset:{rects:!0}}:{}}}};function Oa(e){return uz(e)?(e.nodeName||"").toLowerCase():"#document"}function ho(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Ps(e){var t;return(t=(uz(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function uz(e){return e instanceof Node||e instanceof ho(e).Node}function vs(e){return e instanceof Element||e instanceof ho(e).Element}function ji(e){return e instanceof HTMLElement||e instanceof ho(e).HTMLElement}function EE(e){return typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof ho(e).ShadowRoot}function Vf(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Bo(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function uQ(e){return["table","td","th"].includes(Oa(e))}function pP(e){const t=hP(),n=Bo(e);return n.transform!=="none"||n.perspective!=="none"||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function dQ(e){let t=au(e);for(;ji(t)&&!M0(t);){if(pP(t))return t;t=au(t)}return null}function hP(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function M0(e){return["html","body","#document"].includes(Oa(e))}function Bo(e){return ho(e).getComputedStyle(e)}function N0(e){return vs(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function au(e){if(Oa(e)==="html")return e;const t=e.assignedSlot||e.parentNode||EE(e)&&e.host||Ps(e);return EE(t)?t.host:t}function dz(e){const t=au(e);return M0(t)?e.ownerDocument?e.ownerDocument.body:e.body:ji(t)&&Vf(t)?t:dz(t)}function us(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=dz(e),i=o===((r=e.ownerDocument)==null?void 0:r.body),s=ho(o);return i?t.concat(s,s.visualViewport||[],Vf(o)?o:[],s.frameElement&&n?us(s.frameElement):[]):t.concat(o,us(o,[],n))}function fz(e){const t=Bo(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=ji(e),i=o?e.offsetWidth:n,s=o?e.offsetHeight:r,a=ag(n)!==i||ag(r)!==s;return a&&(n=i,r=s),{width:n,height:r,$:a}}function mP(e){return vs(e)?e:e.contextElement}function Uc(e){const t=mP(e);if(!ji(t))return Pa(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=fz(t);let s=(i?ag(n.width):n.width)/r,a=(i?ag(n.height):n.height)/o;return(!s||!Number.isFinite(s))&&(s=1),(!a||!Number.isFinite(a))&&(a=1),{x:s,y:a}}const fQ=Pa(0);function pz(e){const t=ho(e);return!hP()||!t.visualViewport?fQ:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function pQ(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==ho(e)?!1:t}function Ml(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),i=mP(e);let s=Pa(1);t&&(r?vs(r)&&(s=Uc(r)):s=Uc(e));const a=pQ(i,n,r)?pz(i):Pa(0);let c=(o.left+a.x)/s.x,u=(o.top+a.y)/s.y,f=o.width/s.x,p=o.height/s.y;if(i){const g=ho(i),v=r&&vs(r)?ho(r):r;let y=g.frameElement;for(;y&&r&&v!==g;){const w=Uc(y),P=y.getBoundingClientRect(),x=Bo(y),S=P.left+(y.clientLeft+parseFloat(x.paddingLeft))*w.x,O=P.top+(y.clientTop+parseFloat(x.paddingTop))*w.y;c*=w.x,u*=w.y,f*=w.x,p*=w.y,c+=S,u+=O,y=ho(y).frameElement}}return su({width:f,height:p,x:c,y:u})}function hQ(e){let{rect:t,offsetParent:n,strategy:r}=e;const o=ji(n),i=Ps(n);if(n===i)return t;let s={scrollLeft:0,scrollTop:0},a=Pa(1);const c=Pa(0);if((o||!o&&r!=="fixed")&&((Oa(n)!=="body"||Vf(i))&&(s=N0(n)),ji(n))){const u=Ml(n);a=Uc(n),c.x=u.x+n.clientLeft,c.y=u.y+n.clientTop}return{width:t.width*a.x,height:t.height*a.y,x:t.x*a.x-s.scrollLeft*a.x+c.x,y:t.y*a.y-s.scrollTop*a.y+c.y}}function mQ(e){return Array.from(e.getClientRects())}function hz(e){return Ml(Ps(e)).left+N0(e).scrollLeft}function gQ(e){const t=Ps(e),n=N0(e),r=e.ownerDocument.body,o=tr(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=tr(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let s=-n.scrollLeft+hz(e);const a=-n.scrollTop;return Bo(r).direction==="rtl"&&(s+=tr(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:s,y:a}}function vQ(e,t){const n=ho(e),r=Ps(e),o=n.visualViewport;let i=r.clientWidth,s=r.clientHeight,a=0,c=0;if(o){i=o.width,s=o.height;const u=hP();(!u||u&&t==="fixed")&&(a=o.offsetLeft,c=o.offsetTop)}return{width:i,height:s,x:a,y:c}}function yQ(e,t){const n=Ml(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=ji(e)?Uc(e):Pa(1),s=e.clientWidth*i.x,a=e.clientHeight*i.y,c=o*i.x,u=r*i.y;return{width:s,height:a,x:c,y:u}}function $E(e,t,n){let r;if(t==="viewport")r=vQ(e,n);else if(t==="document")r=gQ(Ps(e));else if(vs(t))r=yQ(t,n);else{const o=pz(e);r={...t,x:t.x-o.x,y:t.y-o.y}}return su(r)}function mz(e,t){const n=au(e);return n===t||!vs(n)||M0(n)?!1:Bo(n).position==="fixed"||mz(n,t)}function _Q(e,t){const n=t.get(e);if(n)return n;let r=us(e,[],!1).filter(a=>vs(a)&&Oa(a)!=="body"),o=null;const i=Bo(e).position==="fixed";let s=i?au(e):e;for(;vs(s)&&!M0(s);){const a=Bo(s),c=pP(s);!c&&a.position==="fixed"&&(o=null),(i?!c&&!o:!c&&a.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||Vf(s)&&!c&&mz(e,s))?r=r.filter(f=>f!==s):o=a,s=au(s)}return t.set(e,r),r}function wQ(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const s=[...n==="clippingAncestors"?_Q(t,this._c):[].concat(n),r],a=s[0],c=s.reduce((u,f)=>{const p=$E(t,f,o);return u.top=tr(p.top,u.top),u.right=ti(p.right,u.right),u.bottom=ti(p.bottom,u.bottom),u.left=tr(p.left,u.left),u},$E(t,a,o));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function bQ(e){return fz(e)}function xQ(e,t,n){const r=ji(t),o=Ps(t),i=n==="fixed",s=Ml(e,!0,i,t);let a={scrollLeft:0,scrollTop:0};const c=Pa(0);if(r||!r&&!i)if((Oa(t)!=="body"||Vf(o))&&(a=N0(t)),r){const u=Ml(t,!0,i,t);c.x=u.x+t.clientLeft,c.y=u.y+t.clientTop}else o&&(c.x=hz(o));return{x:s.left+a.scrollLeft-c.x,y:s.top+a.scrollTop-c.y,width:s.width,height:s.height}}function ME(e,t){return!ji(e)||Bo(e).position==="fixed"?null:t?t(e):e.offsetParent}function gz(e,t){const n=ho(e);if(!ji(e))return n;let r=ME(e,t);for(;r&&uQ(r)&&Bo(r).position==="static";)r=ME(r,t);return r&&(Oa(r)==="html"||Oa(r)==="body"&&Bo(r).position==="static"&&!pP(r))?n:r||dQ(e)||n}const SQ=async function(e){let{reference:t,floating:n,strategy:r}=e;const o=this.getOffsetParent||gz,i=this.getDimensions;return{reference:xQ(t,await o(n),r),floating:{x:0,y:0,...await i(n)}}};function PQ(e){return Bo(e).direction==="rtl"}const OQ={convertOffsetParentRelativeRectToViewportRelativeRect:hQ,getDocumentElement:Ps,getClippingRect:wQ,getOffsetParent:gz,getElementRects:SQ,getClientRects:mQ,getDimensions:bQ,getScale:Uc,isElement:vs,isRTL:PQ};function CQ(e,t){let n=null,r;const o=Ps(e);function i(){clearTimeout(r),n&&n.disconnect(),n=null}function s(a,c){a===void 0&&(a=!1),c===void 0&&(c=1),i();const{left:u,top:f,width:p,height:g}=e.getBoundingClientRect();if(a||t(),!p||!g)return;const v=Up(f),y=Up(o.clientWidth-(u+p)),w=Up(o.clientHeight-(f+g)),P=Up(u),S={rootMargin:-v+"px "+-y+"px "+-w+"px "+-P+"px",threshold:tr(0,ti(1,c))||1};let O=!0;function E($){const N=$[0].intersectionRatio;if(N!==c){if(!O)return s();N?s(!1,N):r=setTimeout(()=>{s(!1,1e-7)},100)}O=!1}try{n=new IntersectionObserver(E,{...S,root:o.ownerDocument})}catch{n=new IntersectionObserver(E,S)}n.observe(e)}return s(!0),i}function kQ(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:c=!1}=r,u=mP(e),f=o||i?[...u?us(u):[],...us(t)]:[];f.forEach(x=>{o&&x.addEventListener("scroll",n,{passive:!0}),i&&x.addEventListener("resize",n)});const p=u&&a?CQ(u,n):null;let g=-1,v=null;s&&(v=new ResizeObserver(x=>{let[S]=x;S&&S.target===u&&v&&(v.unobserve(t),cancelAnimationFrame(g),g=requestAnimationFrame(()=>{v&&v.observe(t)})),n()}),u&&!c&&v.observe(u),v.observe(t));let y,w=c?Ml(e):null;c&&P();function P(){const x=Ml(e);w&&(x.x!==w.x||x.y!==w.y||x.width!==w.width||x.height!==w.height)&&n(),w=x,y=requestAnimationFrame(P)}return n(),()=>{f.forEach(x=>{o&&x.removeEventListener("scroll",n),i&&x.removeEventListener("resize",n)}),p&&p(),v&&v.disconnect(),v=null,c&&cancelAnimationFrame(y)}}const EQ=(e,t,n)=>{const r=new Map,o={platform:OQ,...n},i={...o.platform,_c:r};return iQ(e,t,{...o,platform:i})},vz=e=>{const{element:t,padding:n}=e;function r(o){return Object.prototype.hasOwnProperty.call(o,"current")}return{name:"arrow",options:e,fn(o){return r(t)?t.current!=null?kE({element:t.current,padding:n}).fn(o):{}:t?kE({element:t,padding:n}).fn(o):{}}}};var Vh=typeof document<"u"?_.useLayoutEffect:_.useEffect;function cg(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!=t.length)return!1;for(r=n;r--!==0;)if(!cg(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!Object.prototype.hasOwnProperty.call(t,o[r]))return!1;for(r=n;r--!==0;){const i=o[r];if(!(i==="_owner"&&e.$$typeof)&&!cg(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function NE(e){const t=_.useRef(e);return Vh(()=>{t.current=e}),t}function $Q(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,whileElementsMounted:i,open:s}=e,[a,c]=_.useState({x:null,y:null,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[u,f]=_.useState(r);cg(u,r)||f(r);const p=_.useRef(null),g=_.useRef(null),v=_.useRef(a),y=NE(i),w=NE(o),[P,x]=_.useState(null),[S,O]=_.useState(null),E=_.useCallback(z=>{p.current!==z&&(p.current=z,x(z))},[]),$=_.useCallback(z=>{g.current!==z&&(g.current=z,O(z))},[]),N=_.useCallback(()=>{if(!p.current||!g.current)return;const z={placement:t,strategy:n,middleware:u};w.current&&(z.platform=w.current),EQ(p.current,g.current,z).then(G=>{const X={...G,isPositioned:!0};I.current&&!cg(v.current,X)&&(v.current=X,xs.flushSync(()=>{c(X)}))})},[u,t,n,w]);Vh(()=>{s===!1&&v.current.isPositioned&&(v.current.isPositioned=!1,c(z=>({...z,isPositioned:!1})))},[s]);const I=_.useRef(!1);Vh(()=>(I.current=!0,()=>{I.current=!1}),[]),Vh(()=>{if(P&&S){if(y.current)return y.current(P,S,N);N()}},[P,S,N,y]);const R=_.useMemo(()=>({reference:p,floating:g,setReference:E,setFloating:$}),[E,$]),B=_.useMemo(()=>({reference:P,floating:S}),[P,S]);return _.useMemo(()=>({...a,update:N,refs:R,elements:B,reference:E,floating:$}),[a,N,R,B,E,$])}var lu=typeof document<"u"?_.useLayoutEffect:_.useEffect;let $_=!1,MQ=0;const TE=()=>"floating-ui-"+MQ++;function NQ(){const[e,t]=_.useState(()=>$_?TE():void 0);return lu(()=>{e==null&&t(TE())},[]),_.useEffect(()=>{$_||($_=!0)},[]),e}const TQ=Zd["useId".toString()],IE=TQ||NQ;function IQ(){const e=new Map;return{emit(t,n){var r;(r=e.get(t))==null||r.forEach(o=>o(n))},on(t,n){e.set(t,[...e.get(t)||[],n])},off(t,n){e.set(t,(e.get(t)||[]).filter(r=>r!==n))}}}const jQ=_.createContext(null),LQ=_.createContext(null),yz=()=>{var e;return((e=_.useContext(jQ))==null?void 0:e.id)||null},gP=()=>_.useContext(LQ);function Xs(e){return e?.ownerDocument||document}function DQ(){const e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform}function RQ(){const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(t=>{let{brand:n,version:r}=t;return n+"/"+r}).join(" "):navigator.userAgent}function vP(e){return Xs(e).defaultView||window}function Ei(e){return e?e instanceof vP(e).Element:!1}function _z(e){return e?e instanceof vP(e).HTMLElement:!1}function zQ(e){if(typeof ShadowRoot>"u")return!1;const t=vP(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function AQ(e){if(e.mozInputSource===0&&e.isTrusted)return!0;const t=/Android/i;return(t.test(DQ())||t.test(RQ()))&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function BQ(e){return e.width===0&&e.height===0||e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType!=="mouse"||e.width<1&&e.height<1&&e.pressure===0&&e.detail===0}function wz(e,t){const n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}function jE(e){const t=_.useRef(e);return lu(()=>{t.current=e}),t}const LE="data-floating-ui-safe-polygon";function Hh(e,t,n){return n&&!wz(n)?0:typeof e=="number"?e:e?.[t]}const FQ=function(e,t){let{enabled:n=!0,delay:r=0,handleClose:o=null,mouseOnly:i=!1,restMs:s=0,move:a=!0}=t===void 0?{}:t;const{open:c,onOpenChange:u,dataRef:f,events:p,elements:{domReference:g,floating:v},refs:y}=e,w=gP(),P=yz(),x=jE(o),S=jE(r),O=_.useRef(),E=_.useRef(),$=_.useRef(),N=_.useRef(),I=_.useRef(!0),R=_.useRef(!1),B=_.useRef(()=>{}),z=_.useCallback(()=>{var V;const H=(V=f.current.openEvent)==null?void 0:V.type;return H?.includes("mouse")&&H!=="mousedown"},[f]);_.useEffect(()=>{if(!n)return;function V(){clearTimeout(E.current),clearTimeout(N.current),I.current=!0}return p.on("dismiss",V),()=>{p.off("dismiss",V)}},[n,p]),_.useEffect(()=>{if(!n||!x.current||!c)return;function V(){z()&&u(!1)}const H=Xs(v).documentElement;return H.addEventListener("mouseleave",V),()=>{H.removeEventListener("mouseleave",V)}},[v,c,u,n,x,f,z]);const G=_.useCallback(function(V){V===void 0&&(V=!0);const H=Hh(S.current,"close",O.current);H&&!$.current?(clearTimeout(E.current),E.current=setTimeout(()=>u(!1),H)):V&&(clearTimeout(E.current),u(!1))},[S,u]),X=_.useCallback(()=>{B.current(),$.current=void 0},[]),Q=_.useCallback(()=>{if(R.current){const V=Xs(y.floating.current).body;V.style.pointerEvents="",V.removeAttribute(LE),R.current=!1}},[y]);return _.useEffect(()=>{if(!n)return;function V(){return f.current.openEvent?["click","mousedown"].includes(f.current.openEvent.type):!1}function H(j){if(clearTimeout(E.current),I.current=!1,i&&!wz(O.current)||s>0&&Hh(S.current,"open")===0)return;f.current.openEvent=j;const U=Hh(S.current,"open",O.current);U?E.current=setTimeout(()=>{u(!0)},U):u(!0)}function Z(j){if(V())return;B.current();const U=Xs(v);if(clearTimeout(N.current),x.current){c||clearTimeout(E.current),$.current=x.current({...e,tree:w,x:j.clientX,y:j.clientY,onClose(){Q(),X(),G()}});const F=$.current;U.addEventListener("mousemove",F),B.current=()=>{U.removeEventListener("mousemove",F)};return}G()}function Y(j){V()||x.current==null||x.current({...e,tree:w,x:j.clientX,y:j.clientY,onClose(){Q(),X(),G()}})(j)}if(Ei(g)){const j=g;return c&&j.addEventListener("mouseleave",Y),v?.addEventListener("mouseleave",Y),a&&j.addEventListener("mousemove",H,{once:!0}),j.addEventListener("mouseenter",H),j.addEventListener("mouseleave",Z),()=>{c&&j.removeEventListener("mouseleave",Y),v?.removeEventListener("mouseleave",Y),a&&j.removeEventListener("mousemove",H),j.removeEventListener("mouseenter",H),j.removeEventListener("mouseleave",Z)}}},[g,v,n,e,i,s,a,G,X,Q,u,c,w,S,x,f]),lu(()=>{var V;if(n&&c&&(V=x.current)!=null&&V.__options.blockPointerEvents&&z()){const Y=Xs(v).body;if(Y.setAttribute(LE,""),Y.style.pointerEvents="none",R.current=!0,Ei(g)&&v){var H,Z;const j=g,U=w==null||(H=w.nodesRef.current.find(F=>F.id===P))==null||(Z=H.context)==null?void 0:Z.elements.floating;return U&&(U.style.pointerEvents=""),j.style.pointerEvents="auto",v.style.pointerEvents="auto",()=>{j.style.pointerEvents="",v.style.pointerEvents=""}}}},[n,c,P,v,g,w,x,f,z]),lu(()=>{c||(O.current=void 0,X(),Q())},[c,X,Q]),_.useEffect(()=>()=>{X(),clearTimeout(E.current),clearTimeout(N.current),Q()},[n,X,Q]),_.useMemo(()=>{if(!n)return{};function V(H){O.current=H.pointerType}return{reference:{onPointerDown:V,onPointerEnter:V,onMouseMove(){c||s===0||(clearTimeout(N.current),N.current=setTimeout(()=>{I.current||u(!0)},s))}},floating:{onMouseEnter(){clearTimeout(E.current)},onMouseLeave(){p.emit("dismiss",{type:"mouseLeave",data:{returnFocus:!1}}),G(!1)}}}},[p,n,s,c,u,G])},bz=_.createContext({delay:0,initialDelay:0,timeoutMs:0,currentId:null,setCurrentId:()=>{},setState:()=>{},isInstantPhase:!1}),xz=()=>_.useContext(bz),VQ=e=>{let{children:t,delay:n,timeoutMs:r=0}=e;const[o,i]=_.useReducer((c,u)=>({...c,...u}),{delay:n,timeoutMs:r,initialDelay:n,currentId:null,isInstantPhase:!1}),s=_.useRef(null),a=_.useCallback(c=>{i({currentId:c})},[]);return lu(()=>{o.currentId?s.current===null?s.current=o.currentId:i({isInstantPhase:!0}):(i({isInstantPhase:!1}),s.current=null)},[o.currentId]),_.createElement(bz.Provider,{value:_.useMemo(()=>({...o,setState:i,setCurrentId:a}),[o,i,a])},t)},HQ=(e,t)=>{let{open:n,onOpenChange:r}=e,{id:o}=t;const{currentId:i,setCurrentId:s,initialDelay:a,setState:c,timeoutMs:u}=xz();_.useEffect(()=>{i&&(c({delay:{open:1,close:Hh(a,"close")}}),i!==o&&r(!1))},[o,r,c,i,a]),_.useEffect(()=>{function f(){r(!1),c({delay:a,currentId:null})}if(!n&&i===o)if(u){const p=window.setTimeout(f,u);return()=>{clearTimeout(p)}}else f()},[n,c,i,o,r,a,u]),_.useEffect(()=>{n&&s(o)},[n,s,o])};function WQ(e){let t=e.activeElement;for(;((n=t)==null||(r=n.shadowRoot)==null?void 0:r.activeElement)!=null;){var n,r;t=t.shadowRoot.activeElement}return t}function DE(e,t){if(!e||!t)return!1;const n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&zQ(n)){let r=t;do{if(r&&e===r)return!0;r=r.parentNode||r.host}while(r)}return!1}function M_(e,t){let n=e.filter(o=>{var i;return o.parentId===t&&((i=o.context)==null?void 0:i.open)})||[],r=n;for(;r.length;)r=e.filter(o=>{var i;return(i=r)==null?void 0:i.some(s=>{var a;return o.parentId===s.id&&((a=o.context)==null?void 0:a.open)})})||[],n=n.concat(r);return n}function UQ(e){return"composedPath"in e?e.composedPath()[0]:e.target}const ZQ=Zd["useInsertionEffect".toString()],GQ=ZQ||(e=>e());function Sz(e){const t=_.useRef(()=>{});return GQ(()=>{t.current=e}),_.useCallback(function(){for(var n=arguments.length,r=new Array(n),o=0;o!1),$=typeof g=="function"?E:g,N=_.useRef(!1),{escapeKeyBubbles:I,outsidePressBubbles:R}=qQ(x);return _.useEffect(()=>{if(!n||!f)return;u.current.__escapeKeyBubbles=I,u.current.__outsidePressBubbles=R;function B(V){if(V.key==="Escape"){const H=S?M_(S.nodesRef.current,i):[];if(H.length>0){let Z=!0;if(H.forEach(Y=>{var j;if((j=Y.context)!=null&&j.open&&!Y.context.dataRef.current.__escapeKeyBubbles){Z=!1;return}}),!Z)return}o.emit("dismiss",{type:"escapeKey",data:{returnFocus:{preventScroll:!1}}}),r(!1)}}function z(V){const H=N.current;if(N.current=!1,H||typeof $=="function"&&!$(V))return;const Z=UQ(V);if(_z(Z)&&c){const U=c.ownerDocument.defaultView||window,F=Z.scrollWidth>Z.clientWidth,K=Z.scrollHeight>Z.clientHeight;let ee=K&&V.offsetX>Z.clientWidth;if(K&&U.getComputedStyle(Z).direction==="rtl"&&(ee=V.offsetX<=Z.offsetWidth-Z.clientWidth),ee||F&&V.offsetY>Z.clientHeight)return}const Y=S&&M_(S.nodesRef.current,i).some(U=>{var F;return Wh(V,(F=U.context)==null?void 0:F.elements.floating)});if(Wh(V,c)||Wh(V,a)||Y)return;const j=S?M_(S.nodesRef.current,i):[];if(j.length>0){let U=!0;if(j.forEach(F=>{var K;if((K=F.context)!=null&&K.open&&!F.context.dataRef.current.__outsidePressBubbles){U=!1;return}}),!U)return}o.emit("dismiss",{type:"outsidePress",data:{returnFocus:O?{preventScroll:!0}:AQ(V)||BQ(V)}}),r(!1)}function G(){r(!1)}const X=Xs(c);p&&X.addEventListener("keydown",B),$&&X.addEventListener(v,z);let Q=[];return P&&(Ei(a)&&(Q=us(a)),Ei(c)&&(Q=Q.concat(us(c))),!Ei(s)&&s&&s.contextElement&&(Q=Q.concat(us(s.contextElement)))),Q=Q.filter(V=>{var H;return V!==((H=X.defaultView)==null?void 0:H.visualViewport)}),Q.forEach(V=>{V.addEventListener("scroll",G,{passive:!0})}),()=>{p&&X.removeEventListener("keydown",B),$&&X.removeEventListener(v,z),Q.forEach(V=>{V.removeEventListener("scroll",G)})}},[u,c,a,s,p,$,v,o,S,i,n,r,P,f,I,R,O]),_.useEffect(()=>{N.current=!1},[$,v]),_.useMemo(()=>f?{reference:{[YQ[w]]:()=>{y&&(o.emit("dismiss",{type:"referencePress",data:{returnFocus:!1}}),r(!1))}},floating:{[KQ[v]]:()=>{N.current=!0}}}:{},[f,o,y,v,w,r])},XQ=function(e,t){let{open:n,onOpenChange:r,dataRef:o,events:i,refs:s,elements:{floating:a,domReference:c}}=e,{enabled:u=!0,keyboardOnly:f=!0}=t===void 0?{}:t;const p=_.useRef(""),g=_.useRef(!1),v=_.useRef();return _.useEffect(()=>{if(!u)return;const w=Xs(a).defaultView||window;function P(){!n&&_z(c)&&c===WQ(Xs(c))&&(g.current=!0)}return w.addEventListener("blur",P),()=>{w.removeEventListener("blur",P)}},[a,c,n,u]),_.useEffect(()=>{if(!u)return;function y(w){(w.type==="referencePress"||w.type==="escapeKey")&&(g.current=!0)}return i.on("dismiss",y),()=>{i.off("dismiss",y)}},[i,u]),_.useEffect(()=>()=>{clearTimeout(v.current)},[]),_.useMemo(()=>u?{reference:{onPointerDown(y){let{pointerType:w}=y;p.current=w,g.current=!!(w&&f)},onMouseLeave(){g.current=!1},onFocus(y){var w;g.current||y.type==="focus"&&((w=o.current.openEvent)==null?void 0:w.type)==="mousedown"&&o.current.openEvent&&Wh(o.current.openEvent,c)||(o.current.openEvent=y.nativeEvent,r(!0))},onBlur(y){g.current=!1;const w=y.relatedTarget,P=Ei(w)&&w.hasAttribute("data-floating-ui-focus-guard")&&w.getAttribute("data-type")==="outside";v.current=setTimeout(()=>{DE(s.floating.current,w)||DE(c,w)||P||r(!1)})}}}:{},[u,f,c,s,o,r])},QQ=function(e,t){let{open:n}=e,{enabled:r=!0,role:o="dialog"}=t===void 0?{}:t;const i=IE(),s=IE();return _.useMemo(()=>{const a={id:i,role:o};return r?o==="tooltip"?{reference:{"aria-describedby":n?i:void 0},floating:a}:{reference:{"aria-expanded":n?"true":"false","aria-haspopup":o==="alertdialog"?"dialog":o,"aria-controls":n?i:void 0,...o==="listbox"&&{role:"combobox"},...o==="menu"&&{id:s}},floating:{...a,...o==="menu"&&{"aria-labelledby":s}}}:{}},[r,o,n,i,s])};function yP(e){e===void 0&&(e={});const{open:t=!1,onOpenChange:n,nodeId:r}=e,o=$Q(e),i=gP(),s=_.useRef(null),a=_.useRef({}),c=_.useState(()=>IQ())[0],[u,f]=_.useState(null),p=_.useCallback(x=>{const S=Ei(x)?{getBoundingClientRect:()=>x.getBoundingClientRect(),contextElement:x}:x;o.refs.setReference(S)},[o.refs]),g=_.useCallback(x=>{(Ei(x)||x===null)&&(s.current=x,f(x)),(Ei(o.refs.reference.current)||o.refs.reference.current===null||x!==null&&!Ei(x))&&o.refs.setReference(x)},[o.refs]),v=_.useMemo(()=>({...o.refs,setReference:g,setPositionReference:p,domReference:s}),[o.refs,g,p]),y=_.useMemo(()=>({...o.elements,domReference:u}),[o.elements,u]),w=Sz(n),P=_.useMemo(()=>({...o,refs:v,elements:y,dataRef:a,nodeId:r,events:c,open:t,onOpenChange:w}),[o,r,c,t,w,v,y]);return lu(()=>{const x=i?.nodesRef.current.find(S=>S.id===r);x&&(x.context=P)}),_.useMemo(()=>({...o,context:P,refs:v,reference:g,positionReference:p}),[o,v,P,g,p])}function N_(e,t,n){const r=new Map;return{...n==="floating"&&{tabIndex:-1},...e,...t.map(o=>o?o[n]:null).concat(e).reduce((o,i)=>(i&&Object.entries(i).forEach(s=>{let[a,c]=s;if(a.indexOf("on")===0){if(r.has(a)||r.set(a,[]),typeof c=="function"){var u;(u=r.get(a))==null||u.push(c),o[a]=function(){for(var f,p=arguments.length,g=new Array(p),v=0;vy(...g))}}}else o[a]=c}),o),{})}}const eee=function(e){e===void 0&&(e=[]);const t=e,n=_.useCallback(i=>N_(i,e,"reference"),t),r=_.useCallback(i=>N_(i,e,"floating"),t),o=_.useCallback(i=>N_(i,e,"item"),e.map(i=>i?.item));return _.useMemo(()=>({getReferenceProps:n,getFloatingProps:r,getItemProps:o}),[n,r,o])};function Pz({opened:e,floating:t,position:n,positionDependencies:r}){const[o,i]=_.useState(0);_.useEffect(()=>{if(t.refs.reference.current&&t.refs.floating.current)return kQ(t.refs.reference.current,t.refs.floating.current,t.update)},[t.refs.reference.current,t.refs.floating.current,e,o,n]),Fn(()=>{t.update()},r),Fn(()=>{i(s=>s+1)},[e])}function tee(e){const t=[cz(e.offset)];return e.middlewares.shift&&t.push(fP({limiter:lQ()})),e.middlewares.flip&&t.push(sz()),e.middlewares.inline&&t.push(lz()),t.push(vz({element:e.arrowRef,padding:e.arrowOffset})),t}function nee(e){const[t,n]=go({value:e.opened,defaultValue:e.defaultOpened,finalValue:!1,onChange:e.onChange}),r=()=>{var s;(s=e.onClose)==null||s.call(e),n(!1)},o=()=>{var s,a;t?((s=e.onClose)==null||s.call(e),n(!1)):((a=e.onOpen)==null||a.call(e),n(!0))},i=yP({placement:e.position,middleware:[...tee(e),...e.width==="target"?[cQ({apply({rects:s}){var a,c;Object.assign((c=(a=i.refs.floating.current)==null?void 0:a.style)!=null?c:{},{width:`${s.reference.width}px`})}})]:[]]});return Pz({opened:e.opened,position:e.position,positionDependencies:e.positionDependencies,floating:i}),Fn(()=>{var s;(s=e.onPositionChange)==null||s.call(e,i.placement)},[i.placement]),Fn(()=>{var s,a;e.opened?(a=e.onOpen)==null||a.call(e):(s=e.onClose)==null||s.call(e)},[e.opened]),{floating:i,controlled:typeof e.opened=="boolean",opened:t,onClose:r,onToggle:o}}const Oz={context:"Popover component was not found in the tree",children:"Popover.Target component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported"},[ree,Cz]=bu(Oz.context);var oee=Object.defineProperty,iee=Object.defineProperties,see=Object.getOwnPropertyDescriptors,ug=Object.getOwnPropertySymbols,kz=Object.prototype.hasOwnProperty,Ez=Object.prototype.propertyIsEnumerable,RE=(e,t,n)=>t in e?oee(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Zp=(e,t)=>{for(var n in t||(t={}))kz.call(t,n)&&RE(e,n,t[n]);if(ug)for(var n of ug(t))Ez.call(t,n)&&RE(e,n,t[n]);return e},aee=(e,t)=>iee(e,see(t)),lee=(e,t)=>{var n={};for(var r in e)kz.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&ug)for(var r of ug(e))t.indexOf(r)<0&&Ez.call(e,r)&&(n[r]=e[r]);return n};const cee={refProp:"ref",popupType:"dialog",shouldOverrideDefaultTargetId:!0},$z=_.forwardRef((e,t)=>{const n=ae("PopoverTarget",cee,e),{children:r,refProp:o,popupType:i,shouldOverrideDefaultTargetId:s}=n,a=lee(n,["children","refProp","popupType","shouldOverrideDefaultTargetId"]);if(!Nf(r))throw new Error(Oz.children);const c=a,u=Cz(),f=ws(u.reference,r.ref,t),p=u.withRoles?{"aria-haspopup":i,"aria-expanded":u.opened,"aria-controls":u.getDropdownId(),id:s?u.getTargetId():r.props.id}:{};return _.cloneElement(r,Zp(aee(Zp(Zp(Zp({},c),p),u.targetProps),{className:tS(u.targetProps.className,c.className,r.props.className),[o]:f}),u.controlled?null:{onClick:u.onToggle}))});$z.displayName="@mantine/core/PopoverTarget";var uee=ue((e,{radius:t,shadow:n})=>({dropdown:{position:"absolute",backgroundColor:e.white,background:e.colorScheme==="dark"?e.colors.dark[6]:e.white,border:`${M(1)} solid ${e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[2]}`,padding:`${e.spacing.sm} ${e.spacing.md}`,boxShadow:e.shadows[n]||n||"none",borderRadius:e.fn.radius(t),"&:focus":{outline:0}},arrow:{backgroundColor:"inherit",border:`${M(1)} solid ${e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[2]}`,zIndex:1}}));const dee=uee;var fee=Object.defineProperty,zE=Object.getOwnPropertySymbols,pee=Object.prototype.hasOwnProperty,hee=Object.prototype.propertyIsEnumerable,AE=(e,t,n)=>t in e?fee(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,ic=(e,t)=>{for(var n in t||(t={}))pee.call(t,n)&&AE(e,n,t[n]);if(zE)for(var n of zE(t))hee.call(t,n)&&AE(e,n,t[n]);return e};const BE={entering:"in",entered:"in",exiting:"out",exited:"out","pre-exiting":"out","pre-entering":"out"};function mee({transition:e,state:t,duration:n,timingFunction:r}){const o={transitionDuration:`${n}ms`,transitionTimingFunction:r};return typeof e=="string"?e in xp?ic(ic(ic({transitionProperty:xp[e].transitionProperty},o),xp[e].common),xp[e][BE[t]]):null:ic(ic(ic({transitionProperty:e.transitionProperty},o),e.common),e[BE[t]])}function gee({duration:e,exitDuration:t,timingFunction:n,mounted:r,onEnter:o,onExit:i,onEntered:s,onExited:a}){const c=ir(),u=fS(),f=c.respectReducedMotion?u:!1,[p,g]=_.useState(f?0:e),[v,y]=_.useState(r?"entered":"exited"),w=_.useRef(-1),P=x=>{const S=x?o:i,O=x?s:a;y(x?"pre-entering":"pre-exiting"),window.clearTimeout(w.current);const E=f?0:x?e:t;if(g(E),E===0)typeof S=="function"&&S(),typeof O=="function"&&O(),y(x?"entered":"exited");else{const $=window.setTimeout(()=>{typeof S=="function"&&S(),y(x?"entering":"exiting")},10);w.current=window.setTimeout(()=>{window.clearTimeout($),typeof O=="function"&&O(),y(x?"entered":"exited")},E)}};return Fn(()=>{P(r)},[r]),_.useEffect(()=>()=>window.clearTimeout(w.current),[]),{transitionDuration:p,transitionStatus:v,transitionTimingFunction:n||c.transitionTimingFunction}}function Os({keepMounted:e,transition:t,duration:n=250,exitDuration:r=n,mounted:o,children:i,timingFunction:s,onExit:a,onEntered:c,onEnter:u,onExited:f}){const{transitionDuration:p,transitionStatus:g,transitionTimingFunction:v}=gee({mounted:o,exitDuration:r,duration:n,timingFunction:s,onExit:a,onEntered:c,onEnter:u,onExited:f});return p===0?o?k.createElement(k.Fragment,null,i({})):e?i({display:"none"}):null:g==="exited"?e?i({display:"none"}):null:k.createElement(k.Fragment,null,i(mee({transition:t,duration:p,state:g,timingFunction:v})))}Os.displayName="@mantine/core/Transition";function _P({children:e,active:t=!0,refProp:n="ref"}){const r=SG(t),o=ws(r,e?.ref);return Nf(e)?_.cloneElement(e,{[n]:o}):e}_P.displayName="@mantine/core/FocusTrap";var vee=Object.defineProperty,yee=Object.defineProperties,_ee=Object.getOwnPropertyDescriptors,FE=Object.getOwnPropertySymbols,wee=Object.prototype.hasOwnProperty,bee=Object.prototype.propertyIsEnumerable,VE=(e,t,n)=>t in e?vee(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Ts=(e,t)=>{for(var n in t||(t={}))wee.call(t,n)&&VE(e,n,t[n]);if(FE)for(var n of FE(t))bee.call(t,n)&&VE(e,n,t[n]);return e},Gp=(e,t)=>yee(e,_ee(t));function HE(e,t,n,r){return e==="center"||r==="center"?{top:t}:e==="end"?{bottom:n}:e==="start"?{top:n}:{}}function WE(e,t,n,r,o){return e==="center"||r==="center"?{left:t}:e==="end"?{[o==="ltr"?"right":"left"]:n}:e==="start"?{[o==="ltr"?"left":"right"]:n}:{}}const xee={bottom:"borderTopLeftRadius",left:"borderTopRightRadius",right:"borderBottomLeftRadius",top:"borderBottomRightRadius"};function See({position:e,arrowSize:t,arrowOffset:n,arrowRadius:r,arrowPosition:o,arrowX:i,arrowY:s,dir:a}){const[c,u="center"]=e.split("-"),f={width:M(t),height:M(t),transform:"rotate(45deg)",position:"absolute",[xee[c]]:M(r)},p=M(-t/2);return c==="left"?Gp(Ts(Ts({},f),HE(u,s,n,o)),{right:p,borderLeftColor:"transparent",borderBottomColor:"transparent"}):c==="right"?Gp(Ts(Ts({},f),HE(u,s,n,o)),{left:p,borderRightColor:"transparent",borderTopColor:"transparent"}):c==="top"?Gp(Ts(Ts({},f),WE(u,i,n,o,a)),{bottom:p,borderTopColor:"transparent",borderLeftColor:"transparent"}):c==="bottom"?Gp(Ts(Ts({},f),WE(u,i,n,o,a)),{top:p,borderBottomColor:"transparent",borderRightColor:"transparent"}):{}}var Pee=Object.defineProperty,Oee=Object.defineProperties,Cee=Object.getOwnPropertyDescriptors,dg=Object.getOwnPropertySymbols,Mz=Object.prototype.hasOwnProperty,Nz=Object.prototype.propertyIsEnumerable,UE=(e,t,n)=>t in e?Pee(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,kee=(e,t)=>{for(var n in t||(t={}))Mz.call(t,n)&&UE(e,n,t[n]);if(dg)for(var n of dg(t))Nz.call(t,n)&&UE(e,n,t[n]);return e},Eee=(e,t)=>Oee(e,Cee(t)),$ee=(e,t)=>{var n={};for(var r in e)Mz.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&dg)for(var r of dg(e))t.indexOf(r)<0&&Nz.call(e,r)&&(n[r]=e[r]);return n};const wP=_.forwardRef((e,t)=>{var n=e,{position:r,arrowSize:o,arrowOffset:i,arrowRadius:s,arrowPosition:a,visible:c,arrowX:u,arrowY:f}=n,p=$ee(n,["position","arrowSize","arrowOffset","arrowRadius","arrowPosition","visible","arrowX","arrowY"]);const g=ir();return c?k.createElement("div",Eee(kee({},p),{ref:t,style:See({position:r,arrowSize:o,arrowOffset:i,arrowRadius:s,arrowPosition:a,dir:g.dir,arrowX:u,arrowY:f})})):null});wP.displayName="@mantine/core/FloatingArrow";var Mee=Object.defineProperty,Nee=Object.defineProperties,Tee=Object.getOwnPropertyDescriptors,fg=Object.getOwnPropertySymbols,Tz=Object.prototype.hasOwnProperty,Iz=Object.prototype.propertyIsEnumerable,ZE=(e,t,n)=>t in e?Mee(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,sc=(e,t)=>{for(var n in t||(t={}))Tz.call(t,n)&&ZE(e,n,t[n]);if(fg)for(var n of fg(t))Iz.call(t,n)&&ZE(e,n,t[n]);return e},Yp=(e,t)=>Nee(e,Tee(t)),Iee=(e,t)=>{var n={};for(var r in e)Tz.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&fg)for(var r of fg(e))t.indexOf(r)<0&&Iz.call(e,r)&&(n[r]=e[r]);return n};const jee={};function jz(e){var t;const n=ae("PopoverDropdown",jee,e),{style:r,className:o,children:i,onKeyDownCapture:s}=n,a=Iee(n,["style","className","children","onKeyDownCapture"]),c=Cz(),{classes:u,cx:f}=dee({radius:c.radius,shadow:c.shadow},{name:c.__staticSelector,classNames:c.classNames,styles:c.styles,unstyled:c.unstyled,variant:c.variant}),p=A3({opened:c.opened,shouldReturnFocus:c.returnFocus}),g=c.withRoles?{"aria-labelledby":c.getTargetId(),id:c.getDropdownId(),role:"dialog"}:{};return c.disabled?null:k.createElement(Af,Yp(sc({},c.portalProps),{withinPortal:c.withinPortal}),k.createElement(Os,Yp(sc({mounted:c.opened},c.transitionProps),{transition:c.transitionProps.transition||"fade",duration:(t=c.transitionProps.duration)!=null?t:150,keepMounted:c.keepMounted,exitDuration:typeof c.transitionProps.exitDuration=="number"?c.transitionProps.exitDuration:c.transitionProps.duration}),v=>{var y,w;return k.createElement(_P,{active:c.trapFocus},k.createElement(Pe,sc(Yp(sc({},g),{tabIndex:-1,ref:c.floating,style:Yp(sc(sc({},r),v),{zIndex:c.zIndex,top:(y=c.y)!=null?y:0,left:(w=c.x)!=null?w:0,width:c.width==="target"?void 0:M(c.width)}),className:f(u.dropdown,o),onKeyDownCapture:HW(c.onClose,{active:c.closeOnEscape,onTrigger:p,onKeyDown:s}),"data-position":c.placement}),a),i,k.createElement(wP,{ref:c.arrowRef,arrowX:c.arrowX,arrowY:c.arrowY,visible:c.withArrow,position:c.placement,arrowSize:c.arrowSize,arrowRadius:c.arrowRadius,arrowOffset:c.arrowOffset,arrowPosition:c.arrowPosition,className:u.arrow})))}))}jz.displayName="@mantine/core/PopoverDropdown";function Lz(e,t){if(e==="rtl"&&(t.includes("right")||t.includes("left"))){const[n,r]=t.split("-"),o=n==="right"?"left":"right";return r===void 0?o:`${o}-${r}`}return t}var GE=Object.getOwnPropertySymbols,Lee=Object.prototype.hasOwnProperty,Dee=Object.prototype.propertyIsEnumerable,Ree=(e,t)=>{var n={};for(var r in e)Lee.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&GE)for(var r of GE(e))t.indexOf(r)<0&&Dee.call(e,r)&&(n[r]=e[r]);return n};const zee={position:"bottom",offset:8,positionDependencies:[],transitionProps:{transition:"fade",duration:150},middlewares:{flip:!0,shift:!0,inline:!1},arrowSize:7,arrowOffset:5,arrowRadius:0,arrowPosition:"side",closeOnClickOutside:!0,withinPortal:!1,closeOnEscape:!0,trapFocus:!1,withRoles:!0,returnFocus:!1,clickOutsideEvents:["mousedown","touchstart"],zIndex:ii("popover"),__staticSelector:"Popover",width:"max-content"};function kn(e){var t,n,r,o,i,s;const a=_.useRef(null),c=ae("Popover",zee,e),{children:u,position:f,offset:p,onPositionChange:g,positionDependencies:v,opened:y,transitionProps:w,width:P,middlewares:x,withArrow:S,arrowSize:O,arrowOffset:E,arrowRadius:$,arrowPosition:N,unstyled:I,classNames:R,styles:B,closeOnClickOutside:z,withinPortal:G,portalProps:X,closeOnEscape:Q,clickOutsideEvents:V,trapFocus:H,onClose:Z,onOpen:Y,onChange:j,zIndex:U,radius:F,shadow:K,id:ee,defaultOpened:fe,__staticSelector:ie,withRoles:J,disabled:ne,returnFocus:le,variant:_e,keepMounted:Ne}=c,we=Ree(c,["children","position","offset","onPositionChange","positionDependencies","opened","transitionProps","width","middlewares","withArrow","arrowSize","arrowOffset","arrowRadius","arrowPosition","unstyled","classNames","styles","closeOnClickOutside","withinPortal","portalProps","closeOnEscape","clickOutsideEvents","trapFocus","onClose","onOpen","onChange","zIndex","radius","shadow","id","defaultOpened","__staticSelector","withRoles","disabled","returnFocus","variant","keepMounted"]),[He,Te]=_.useState(null),[je,it]=_.useState(null),bt=$a(ee),_n=ir(),pt=nee({middlewares:x,width:P,position:Lz(_n.dir,f),offset:typeof p=="number"?p+(S?O/2:0):p,arrowRef:a,arrowOffset:E,onPositionChange:g,positionDependencies:v,opened:y,defaultOpened:fe,onChange:j,onOpen:Y,onClose:Z});pG(()=>pt.opened&&z&&pt.onClose(),V,[He,je]);const Tn=_.useCallback(lt=>{Te(lt),pt.floating.reference(lt)},[pt.floating.reference]),kr=_.useCallback(lt=>{it(lt),pt.floating.floating(lt)},[pt.floating.floating]);return k.createElement(ree,{value:{returnFocus:le,disabled:ne,controlled:pt.controlled,reference:Tn,floating:kr,x:pt.floating.x,y:pt.floating.y,arrowX:(r=(n=(t=pt.floating)==null?void 0:t.middlewareData)==null?void 0:n.arrow)==null?void 0:r.x,arrowY:(s=(i=(o=pt.floating)==null?void 0:o.middlewareData)==null?void 0:i.arrow)==null?void 0:s.y,opened:pt.opened,arrowRef:a,transitionProps:w,width:P,withArrow:S,arrowSize:O,arrowOffset:E,arrowRadius:$,arrowPosition:N,placement:pt.floating.placement,trapFocus:H,withinPortal:G,portalProps:X,zIndex:U,radius:F,shadow:K,closeOnEscape:Q,onClose:pt.onClose,onToggle:pt.onToggle,getTargetId:()=>`${bt}-target`,getDropdownId:()=>`${bt}-dropdown`,withRoles:J,targetProps:we,__staticSelector:ie,classNames:R,styles:B,unstyled:I,variant:_e,keepMounted:Ne}},u)}kn.Target=$z;kn.Dropdown=jz;kn.displayName="@mantine/core/Popover";var Aee=Object.defineProperty,pg=Object.getOwnPropertySymbols,Dz=Object.prototype.hasOwnProperty,Rz=Object.prototype.propertyIsEnumerable,YE=(e,t,n)=>t in e?Aee(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Bee=(e,t)=>{for(var n in t||(t={}))Dz.call(t,n)&&YE(e,n,t[n]);if(pg)for(var n of pg(t))Rz.call(t,n)&&YE(e,n,t[n]);return e},Fee=(e,t)=>{var n={};for(var r in e)Dz.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&pg)for(var r of pg(e))t.indexOf(r)<0&&Rz.call(e,r)&&(n[r]=e[r]);return n};function Vee(e){var t=e,{children:n,component:r="div",maxHeight:o=220,direction:i="column",id:s,innerRef:a,__staticSelector:c,styles:u,classNames:f,unstyled:p}=t,g=Fee(t,["children","component","maxHeight","direction","id","innerRef","__staticSelector","styles","classNames","unstyled"]);const{classes:v}=JX(null,{name:c,styles:u,classNames:f,unstyled:p});return k.createElement(kn.Dropdown,Bee({p:0,onMouseDown:y=>y.preventDefault()},g),k.createElement("div",{style:{maxHeight:M(o),display:"flex"}},k.createElement(Pe,{component:r||"div",id:`${s}-items`,"aria-labelledby":`${s}-label`,role:"listbox",onMouseDown:y=>y.preventDefault(),style:{flex:1,overflowY:r!==$0?"auto":void 0},"data-combobox-popover":!0,tabIndex:-1,ref:a},k.createElement("div",{className:v.itemsWrapper,style:{flexDirection:i}},n))))}function ha({opened:e,transitionProps:t={transition:"fade",duration:0},shadow:n,withinPortal:r,portalProps:o,children:i,__staticSelector:s,onDirectionChange:a,switchDirectionOnFlip:c,zIndex:u,dropdownPosition:f,positionDependencies:p=[],classNames:g,styles:v,unstyled:y,readOnly:w,variant:P}){return k.createElement(kn,{unstyled:y,classNames:g,styles:v,width:"target",withRoles:!1,opened:e,middlewares:{flip:f==="flip",shift:!1},position:f==="flip"?"bottom":f,positionDependencies:p,zIndex:u,__staticSelector:s,withinPortal:r,portalProps:o,transitionProps:t,shadow:n,disabled:w,onPositionChange:x=>c&&a?.(x==="top"?"column-reverse":"column"),variant:P},i)}ha.Target=kn.Target;ha.Dropdown=Vee;var Hee=Object.defineProperty,Wee=Object.defineProperties,Uee=Object.getOwnPropertyDescriptors,hg=Object.getOwnPropertySymbols,zz=Object.prototype.hasOwnProperty,Az=Object.prototype.propertyIsEnumerable,KE=(e,t,n)=>t in e?Hee(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Kp=(e,t)=>{for(var n in t||(t={}))zz.call(t,n)&&KE(e,n,t[n]);if(hg)for(var n of hg(t))Az.call(t,n)&&KE(e,n,t[n]);return e},Zee=(e,t)=>Wee(e,Uee(t)),Gee=(e,t)=>{var n={};for(var r in e)zz.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&hg)for(var r of hg(e))t.indexOf(r)<0&&Az.call(e,r)&&(n[r]=e[r]);return n};function bP(e,t,n){const r=ae(e,t,n),{label:o,description:i,error:s,required:a,classNames:c,styles:u,className:f,unstyled:p,__staticSelector:g,sx:v,errorProps:y,labelProps:w,descriptionProps:P,wrapperProps:x,id:S,size:O,style:E,inputContainer:$,inputWrapperOrder:N,withAsterisk:I,variant:R}=r,B=Gee(r,["label","description","error","required","classNames","styles","className","unstyled","__staticSelector","sx","errorProps","labelProps","descriptionProps","wrapperProps","id","size","style","inputContainer","inputWrapperOrder","withAsterisk","variant"]),z=$a(S),{systemStyles:G,rest:X}=Dl(B),Q=Kp({label:o,description:i,error:s,required:a,classNames:c,className:f,__staticSelector:g,sx:v,errorProps:y,labelProps:w,descriptionProps:P,unstyled:p,styles:u,id:z,size:O,style:E,inputContainer:$,inputWrapperOrder:N,withAsterisk:I,variant:R},x);return Zee(Kp({},X),{classNames:c,styles:u,unstyled:p,wrapperProps:Kp(Kp({},Q),G),inputProps:{required:a,classNames:c,styles:u,unstyled:p,id:z,size:O,__staticSelector:g,error:s,variant:R}})}var Yee=ue((e,t,{size:n})=>({label:{display:"inline-block",fontSize:re({size:n,sizes:e.fontSizes}),fontWeight:500,color:e.colorScheme==="dark"?e.colors.dark[0]:e.colors.gray[9],wordBreak:"break-word",cursor:"default",WebkitTapHighlightColor:"transparent"},required:{color:e.fn.variant({variant:"filled",color:"red"}).background}}));const Kee=Yee;var qee=Object.defineProperty,mg=Object.getOwnPropertySymbols,Bz=Object.prototype.hasOwnProperty,Fz=Object.prototype.propertyIsEnumerable,qE=(e,t,n)=>t in e?qee(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Jee=(e,t)=>{for(var n in t||(t={}))Bz.call(t,n)&&qE(e,n,t[n]);if(mg)for(var n of mg(t))Fz.call(t,n)&&qE(e,n,t[n]);return e},Xee=(e,t)=>{var n={};for(var r in e)Bz.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&mg)for(var r of mg(e))t.indexOf(r)<0&&Fz.call(e,r)&&(n[r]=e[r]);return n};const Qee={labelElement:"label",size:"sm"},xP=_.forwardRef((e,t)=>{const n=ae("InputLabel",Qee,e),{labelElement:r,children:o,required:i,size:s,classNames:a,styles:c,unstyled:u,className:f,htmlFor:p,__staticSelector:g,variant:v,onMouseDown:y}=n,w=Xee(n,["labelElement","children","required","size","classNames","styles","unstyled","className","htmlFor","__staticSelector","variant","onMouseDown"]),{classes:P,cx:x}=Kee(null,{name:["InputWrapper",g],classNames:a,styles:c,unstyled:u,variant:v,size:s});return k.createElement(Pe,Jee({component:r,ref:t,className:x(P.label,f),htmlFor:r==="label"?p:void 0,onMouseDown:S=>{y?.(S),!S.defaultPrevented&&S.detail>1&&S.preventDefault()}},w),o,i&&k.createElement("span",{className:P.required,"aria-hidden":!0}," *"))});xP.displayName="@mantine/core/InputLabel";var ete=ue((e,t,{size:n})=>({error:{wordBreak:"break-word",color:e.fn.variant({variant:"filled",color:"red"}).background,fontSize:`calc(${re({size:n,sizes:e.fontSizes})} - ${M(2)})`,lineHeight:1.2,display:"block"}}));const tte=ete;var nte=Object.defineProperty,gg=Object.getOwnPropertySymbols,Vz=Object.prototype.hasOwnProperty,Hz=Object.prototype.propertyIsEnumerable,JE=(e,t,n)=>t in e?nte(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,rte=(e,t)=>{for(var n in t||(t={}))Vz.call(t,n)&&JE(e,n,t[n]);if(gg)for(var n of gg(t))Hz.call(t,n)&&JE(e,n,t[n]);return e},ote=(e,t)=>{var n={};for(var r in e)Vz.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&gg)for(var r of gg(e))t.indexOf(r)<0&&Hz.call(e,r)&&(n[r]=e[r]);return n};const ite={size:"sm"},SP=_.forwardRef((e,t)=>{const n=ae("InputError",ite,e),{children:r,className:o,classNames:i,styles:s,unstyled:a,size:c,__staticSelector:u,variant:f}=n,p=ote(n,["children","className","classNames","styles","unstyled","size","__staticSelector","variant"]),{classes:g,cx:v}=tte(null,{name:["InputWrapper",u],classNames:i,styles:s,unstyled:a,variant:f,size:c});return k.createElement(W,rte({className:v(g.error,o),ref:t},p),r)});SP.displayName="@mantine/core/InputError";var ste=ue((e,t,{size:n})=>({description:{wordBreak:"break-word",color:e.colorScheme==="dark"?e.colors.dark[2]:e.colors.gray[6],fontSize:`calc(${re({size:n,sizes:e.fontSizes})} - ${M(2)})`,lineHeight:1.2,display:"block"}}));const ate=ste;var lte=Object.defineProperty,vg=Object.getOwnPropertySymbols,Wz=Object.prototype.hasOwnProperty,Uz=Object.prototype.propertyIsEnumerable,XE=(e,t,n)=>t in e?lte(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,cte=(e,t)=>{for(var n in t||(t={}))Wz.call(t,n)&&XE(e,n,t[n]);if(vg)for(var n of vg(t))Uz.call(t,n)&&XE(e,n,t[n]);return e},ute=(e,t)=>{var n={};for(var r in e)Wz.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&vg)for(var r of vg(e))t.indexOf(r)<0&&Uz.call(e,r)&&(n[r]=e[r]);return n};const dte={size:"sm"},PP=_.forwardRef((e,t)=>{const n=ae("InputDescription",dte,e),{children:r,className:o,classNames:i,styles:s,unstyled:a,size:c,__staticSelector:u,variant:f}=n,p=ute(n,["children","className","classNames","styles","unstyled","size","__staticSelector","variant"]),{classes:g,cx:v}=ate(null,{name:["InputWrapper",u],classNames:i,styles:s,unstyled:a,variant:f,size:c});return k.createElement(W,cte({color:"dimmed",className:v(g.description,o),ref:t,unstyled:a},p),r)});PP.displayName="@mantine/core/InputDescription";const Zz=_.createContext({offsetBottom:!1,offsetTop:!1,describedBy:void 0}),fte=Zz.Provider,pte=()=>_.useContext(Zz);function hte(e,{hasDescription:t,hasError:n}){const r=e.findIndex(c=>c==="input"),o=e[r-1],i=e[r+1];return{offsetBottom:t&&i==="description"||n&&i==="error",offsetTop:t&&o==="description"||n&&o==="error"}}var mte=Object.defineProperty,gte=Object.defineProperties,vte=Object.getOwnPropertyDescriptors,QE=Object.getOwnPropertySymbols,yte=Object.prototype.hasOwnProperty,_te=Object.prototype.propertyIsEnumerable,e$=(e,t,n)=>t in e?mte(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,wte=(e,t)=>{for(var n in t||(t={}))yte.call(t,n)&&e$(e,n,t[n]);if(QE)for(var n of QE(t))_te.call(t,n)&&e$(e,n,t[n]);return e},bte=(e,t)=>gte(e,vte(t)),xte=ue(e=>({root:bte(wte({},e.fn.fontStyles()),{lineHeight:e.lineHeight})}));const Ste=xte;var Pte=Object.defineProperty,Ote=Object.defineProperties,Cte=Object.getOwnPropertyDescriptors,yg=Object.getOwnPropertySymbols,Gz=Object.prototype.hasOwnProperty,Yz=Object.prototype.propertyIsEnumerable,t$=(e,t,n)=>t in e?Pte(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Is=(e,t)=>{for(var n in t||(t={}))Gz.call(t,n)&&t$(e,n,t[n]);if(yg)for(var n of yg(t))Yz.call(t,n)&&t$(e,n,t[n]);return e},n$=(e,t)=>Ote(e,Cte(t)),kte=(e,t)=>{var n={};for(var r in e)Gz.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&yg)for(var r of yg(e))t.indexOf(r)<0&&Yz.call(e,r)&&(n[r]=e[r]);return n};const Ete={labelElement:"label",size:"sm",inputContainer:e=>e,inputWrapperOrder:["label","description","input","error"]},Kz=_.forwardRef((e,t)=>{const n=ae("InputWrapper",Ete,e),{className:r,label:o,children:i,required:s,id:a,error:c,description:u,labelElement:f,labelProps:p,descriptionProps:g,errorProps:v,classNames:y,styles:w,size:P,inputContainer:x,__staticSelector:S,unstyled:O,inputWrapperOrder:E,withAsterisk:$,variant:N}=n,I=kte(n,["className","label","children","required","id","error","description","labelElement","labelProps","descriptionProps","errorProps","classNames","styles","size","inputContainer","__staticSelector","unstyled","inputWrapperOrder","withAsterisk","variant"]),{classes:R,cx:B}=Ste(null,{classNames:y,styles:w,name:["InputWrapper",S],unstyled:O,variant:N,size:P}),z={classNames:y,styles:w,unstyled:O,size:P,variant:N,__staticSelector:S},G=typeof $=="boolean"?$:s,X=a?`${a}-error`:v?.id,Q=a?`${a}-description`:g?.id,H=`${!!c&&typeof c!="boolean"?X:""} ${u?Q:""}`,Z=H.trim().length>0?H.trim():void 0,Y=o&&k.createElement(xP,Is(Is({key:"label",labelElement:f,id:a?`${a}-label`:void 0,htmlFor:a,required:G},z),p),o),j=u&&k.createElement(PP,n$(Is(Is({key:"description"},g),z),{size:g?.size||z.size,id:g?.id||Q}),u),U=k.createElement(_.Fragment,{key:"input"},x(i)),F=typeof c!="boolean"&&c&&k.createElement(SP,n$(Is(Is({},v),z),{size:v?.size||z.size,key:"error",id:v?.id||X}),c),K=E.map(ee=>{switch(ee){case"label":return Y;case"input":return U;case"description":return j;case"error":return F;default:return null}});return k.createElement(fte,{value:Is({describedBy:Z},hte(E,{hasDescription:!!j,hasError:!!F}))},k.createElement(Pe,Is({className:B(R.root,r),ref:t},I),K))});Kz.displayName="@mantine/core/InputWrapper";var $te=Object.defineProperty,_g=Object.getOwnPropertySymbols,qz=Object.prototype.hasOwnProperty,Jz=Object.prototype.propertyIsEnumerable,r$=(e,t,n)=>t in e?$te(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Mte=(e,t)=>{for(var n in t||(t={}))qz.call(t,n)&&r$(e,n,t[n]);if(_g)for(var n of _g(t))Jz.call(t,n)&&r$(e,n,t[n]);return e},Nte=(e,t)=>{var n={};for(var r in e)qz.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&_g)for(var r of _g(e))t.indexOf(r)<0&&Jz.call(e,r)&&(n[r]=e[r]);return n};const Tte={},Xz=_.forwardRef((e,t)=>{const n=ae("InputPlaceholder",Tte,e),{sx:r}=n,o=Nte(n,["sx"]);return k.createElement(Pe,Mte({component:"span",sx:[i=>i.fn.placeholderStyles(),...eS(r)],ref:t},o))});Xz.displayName="@mantine/core/InputPlaceholder";var Ite=Object.defineProperty,jte=Object.defineProperties,Lte=Object.getOwnPropertyDescriptors,o$=Object.getOwnPropertySymbols,Dte=Object.prototype.hasOwnProperty,Rte=Object.prototype.propertyIsEnumerable,i$=(e,t,n)=>t in e?Ite(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,qp=(e,t)=>{for(var n in t||(t={}))Dte.call(t,n)&&i$(e,n,t[n]);if(o$)for(var n of o$(t))Rte.call(t,n)&&i$(e,n,t[n]);return e},T_=(e,t)=>jte(e,Lte(t));const Dn={xs:M(30),sm:M(36),md:M(42),lg:M(50),xl:M(60)},zte=["default","filled","unstyled"];function Ate({theme:e,variant:t}){return zte.includes(t)?t==="default"?{border:`${M(1)} solid ${e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[4]}`,backgroundColor:e.colorScheme==="dark"?e.colors.dark[6]:e.white,transition:"border-color 100ms ease","&:focus, &:focus-within":e.focusRingStyles.inputStyles(e)}:t==="filled"?{border:`${M(1)} solid transparent`,backgroundColor:e.colorScheme==="dark"?e.colors.dark[5]:e.colors.gray[1],"&:focus, &:focus-within":e.focusRingStyles.inputStyles(e)}:{borderWidth:0,color:e.colorScheme==="dark"?e.colors.dark[0]:e.black,backgroundColor:"transparent",minHeight:M(28),outline:0,"&:focus, &:focus-within":{outline:"none",borderColor:"transparent"},"&:disabled":{backgroundColor:"transparent","&:focus, &:focus-within":{outline:"none",borderColor:"transparent"}}}:null}var Bte=ue((e,{multiline:t,radius:n,invalid:r,rightSectionWidth:o,withRightSection:i,iconWidth:s,offsetBottom:a,offsetTop:c,pointer:u},{variant:f,size:p})=>{const g=e.fn.variant({variant:"filled",color:"red"}).background,v=f==="default"||f==="filled"?{minHeight:re({size:p,sizes:Dn}),paddingLeft:`calc(${re({size:p,sizes:Dn})} / 3)`,paddingRight:i?o||re({size:p,sizes:Dn}):`calc(${re({size:p,sizes:Dn})} / 3)`,borderRadius:e.fn.radius(n)}:f==="unstyled"&&i?{paddingRight:o||re({size:p,sizes:Dn})}:null;return{wrapper:{position:"relative",marginTop:c?`calc(${e.spacing.xs} / 2)`:void 0,marginBottom:a?`calc(${e.spacing.xs} / 2)`:void 0,"&:has(input:disabled)":{"& .mantine-Input-rightSection":{display:"none"}}},input:T_(qp(qp(T_(qp({},e.fn.fontStyles()),{height:t?f==="unstyled"?void 0:"auto":re({size:p,sizes:Dn}),WebkitTapHighlightColor:"transparent",lineHeight:t?e.lineHeight:`calc(${re({size:p,sizes:Dn})} - ${M(2)})`,appearance:"none",resize:"none",boxSizing:"border-box",fontSize:re({size:p,sizes:e.fontSizes}),width:"100%",color:e.colorScheme==="dark"?e.colors.dark[0]:e.black,display:"block",textAlign:"left",cursor:u?"pointer":void 0}),Ate({theme:e,variant:f})),v),{"&:disabled, &[data-disabled]":{backgroundColor:e.colorScheme==="dark"?e.colors.dark[6]:e.colors.gray[1],color:e.colors.dark[2],opacity:.6,cursor:"not-allowed",pointerEvents:"none","&::placeholder":{color:e.colors.dark[2]}},"&[data-invalid]":{color:g,borderColor:g,"&::placeholder":{opacity:1,color:g}},"&[data-with-icon]":{paddingLeft:typeof s=="number"?M(s):re({size:p,sizes:Dn})},"&::placeholder":T_(qp({},e.fn.placeholderStyles()),{opacity:1}),"&::-webkit-inner-spin-button, &::-webkit-outer-spin-button, &::-webkit-search-decoration, &::-webkit-search-cancel-button, &::-webkit-search-results-button, &::-webkit-search-results-decoration":{appearance:"none"},"&[type=number]":{MozAppearance:"textfield"}}),icon:{pointerEvents:"none",position:"absolute",zIndex:1,left:0,top:0,bottom:0,display:"flex",alignItems:"center",justifyContent:"center",width:s?M(s):re({size:p,sizes:Dn}),color:r?e.colors.red[e.colorScheme==="dark"?6:7]:e.colorScheme==="dark"?e.colors.dark[2]:e.colors.gray[5]},rightSection:{position:"absolute",top:0,bottom:0,right:0,display:"flex",alignItems:"center",justifyContent:"center",width:o||re({size:p,sizes:Dn})}}});const Fte=Bte;var Vte=Object.defineProperty,Hte=Object.defineProperties,Wte=Object.getOwnPropertyDescriptors,wg=Object.getOwnPropertySymbols,Qz=Object.prototype.hasOwnProperty,eA=Object.prototype.propertyIsEnumerable,s$=(e,t,n)=>t in e?Vte(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Jp=(e,t)=>{for(var n in t||(t={}))Qz.call(t,n)&&s$(e,n,t[n]);if(wg)for(var n of wg(t))eA.call(t,n)&&s$(e,n,t[n]);return e},a$=(e,t)=>Hte(e,Wte(t)),Ute=(e,t)=>{var n={};for(var r in e)Qz.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&wg)for(var r of wg(e))t.indexOf(r)<0&&eA.call(e,r)&&(n[r]=e[r]);return n};const Zte={size:"sm",variant:"default"},Fl=_.forwardRef((e,t)=>{const n=ae("Input",Zte,e),{className:r,error:o,required:i,disabled:s,variant:a,icon:c,style:u,rightSectionWidth:f,iconWidth:p,rightSection:g,rightSectionProps:v,radius:y,size:w,wrapperProps:P,classNames:x,styles:S,__staticSelector:O,multiline:E,sx:$,unstyled:N,pointer:I}=n,R=Ute(n,["className","error","required","disabled","variant","icon","style","rightSectionWidth","iconWidth","rightSection","rightSectionProps","radius","size","wrapperProps","classNames","styles","__staticSelector","multiline","sx","unstyled","pointer"]),{offsetBottom:B,offsetTop:z,describedBy:G}=pte(),{classes:X,cx:Q}=Fte({radius:y,multiline:E,invalid:!!o,rightSectionWidth:f?M(f):void 0,iconWidth:p,withRightSection:!!g,offsetBottom:B,offsetTop:z,pointer:I},{classNames:x,styles:S,name:["Input",O],unstyled:N,variant:a,size:w}),{systemStyles:V,rest:H}=Dl(R);return k.createElement(Pe,Jp(Jp({className:Q(X.wrapper,r),sx:$,style:u},V),P),c&&k.createElement("div",{className:X.icon},c),k.createElement(Pe,a$(Jp({component:"input"},H),{ref:t,required:i,"aria-invalid":!!o,"aria-describedby":G,disabled:s,"data-disabled":s||void 0,"data-with-icon":!!c||void 0,"data-invalid":!!o||void 0,className:X.input})),g&&k.createElement("div",a$(Jp({},v),{className:X.rightSection}),g))});Fl.displayName="@mantine/core/Input";Fl.Wrapper=Kz;Fl.Label=xP;Fl.Description=PP;Fl.Error=SP;Fl.Placeholder=Xz;const et=Fl;var Gte=Object.defineProperty,bg=Object.getOwnPropertySymbols,tA=Object.prototype.hasOwnProperty,nA=Object.prototype.propertyIsEnumerable,l$=(e,t,n)=>t in e?Gte(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Yte=(e,t)=>{for(var n in t||(t={}))tA.call(t,n)&&l$(e,n,t[n]);if(bg)for(var n of bg(t))nA.call(t,n)&&l$(e,n,t[n]);return e},Kte=(e,t)=>{var n={};for(var r in e)tA.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&bg)for(var r of bg(e))t.indexOf(r)<0&&nA.call(e,r)&&(n[r]=e[r]);return n};function qte(e){const t=e,{style:n}=t,r=Kte(t,["style"]);return k.createElement("svg",Yte({viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:n},r),k.createElement("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"}))}var Jte=Object.defineProperty,Xte=Object.defineProperties,Qte=Object.getOwnPropertyDescriptors,c$=Object.getOwnPropertySymbols,ene=Object.prototype.hasOwnProperty,tne=Object.prototype.propertyIsEnumerable,u$=(e,t,n)=>t in e?Jte(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,nne=(e,t)=>{for(var n in t||(t={}))ene.call(t,n)&&u$(e,n,t[n]);if(c$)for(var n of c$(t))tne.call(t,n)&&u$(e,n,t[n]);return e},rne=(e,t)=>Xte(e,Qte(t));const rA=_.createContext(null);function one({spacing:e,children:t}){return k.createElement(rA.Provider,{value:{spacing:e}},t)}function ine(){const e=_.useContext(rA);return e?rne(nne({},e),{withinGroup:!0}):{spacing:null,withinGroup:!1}}var sne=ue((e,{spacing:t})=>({root:{display:"flex",paddingLeft:re({size:t,sizes:e.spacing})}}));const ane=sne;var lne=Object.defineProperty,xg=Object.getOwnPropertySymbols,oA=Object.prototype.hasOwnProperty,iA=Object.prototype.propertyIsEnumerable,d$=(e,t,n)=>t in e?lne(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,cne=(e,t)=>{for(var n in t||(t={}))oA.call(t,n)&&d$(e,n,t[n]);if(xg)for(var n of xg(t))iA.call(t,n)&&d$(e,n,t[n]);return e},une=(e,t)=>{var n={};for(var r in e)oA.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&xg)for(var r of xg(e))t.indexOf(r)<0&&iA.call(e,r)&&(n[r]=e[r]);return n};const dne={},sA=_.forwardRef((e,t)=>{const n=ae("AvatarGroup",dne,e),{children:r,spacing:o="sm",unstyled:i,className:s,variant:a}=n,c=une(n,["children","spacing","unstyled","className","variant"]),{classes:u,cx:f}=ane({spacing:o},{name:"AvatarGroup",unstyled:i,variant:a});return k.createElement(one,{spacing:o},k.createElement(Pe,cne({ref:t,className:f(u.root,s)},c),r))});sA.displayName="@mantine/core/AvatarGroup";var fne=Object.defineProperty,pne=Object.defineProperties,hne=Object.getOwnPropertyDescriptors,f$=Object.getOwnPropertySymbols,mne=Object.prototype.hasOwnProperty,gne=Object.prototype.propertyIsEnumerable,p$=(e,t,n)=>t in e?fne(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,id=(e,t)=>{for(var n in t||(t={}))mne.call(t,n)&&p$(e,n,t[n]);if(f$)for(var n of f$(t))gne.call(t,n)&&p$(e,n,t[n]);return e},h$=(e,t)=>pne(e,hne(t));const vne=["filled","light","gradient","outline"],Xp={xs:M(16),sm:M(26),md:M(38),lg:M(56),xl:M(84)};function yne({withinGroup:e,spacing:t,theme:n}){return e?{marginLeft:`calc(${re({size:t,sizes:n.spacing})} * -1)`,backgroundColor:`${n.colorScheme==="dark"?n.colors.dark[7]:n.white}`,border:`${M(2)} solid ${n.colorScheme==="dark"?n.colors.dark[7]:n.white}`}:null}function _ne({theme:e,variant:t,color:n,gradient:r}){const o=e.fn.variant({variant:t,color:n,gradient:r});return vne.includes(t)?{placeholder:{color:o.color,backgroundColor:o.background,backgroundImage:t==="gradient"?o.background:void 0,border:`${M(t==="gradient"?0:1)} solid ${o.border}`},placeholderIcon:{color:o.color}}:{}}var wne=ue((e,{radius:t,withinGroup:n,spacing:r,color:o,gradient:i},{variant:s,size:a})=>{const c=_ne({theme:e,color:o,gradient:i,variant:s});return{root:id(h$(id({},e.fn.focusStyles()),{WebkitTapHighlightColor:"transparent",boxSizing:"border-box",position:"relative",display:"block",userSelect:"none",overflow:"hidden",borderRadius:e.fn.radius(t),textDecoration:"none",border:0,backgroundColor:"transparent",padding:0,width:re({size:a,sizes:Xp}),minWidth:re({size:a,sizes:Xp}),height:re({size:a,sizes:Xp})}),yne({withinGroup:n,spacing:r,theme:e})),image:{objectFit:"cover",width:"100%",height:"100%",display:"block"},placeholder:id(h$(id({},e.fn.fontStyles()),{fontWeight:700,display:"flex",alignItems:"center",justifyContent:"center",width:"100%",height:"100%",userSelect:"none",borderRadius:e.fn.radius(t),fontSize:`calc(${re({size:a,sizes:Xp})} / 2.5)`}),c.placeholder),placeholderIcon:id({width:"70%",height:"70%"},c.placeholderIcon)}});const bne=wne;var xne=Object.defineProperty,Sne=Object.defineProperties,Pne=Object.getOwnPropertyDescriptors,Sg=Object.getOwnPropertySymbols,aA=Object.prototype.hasOwnProperty,lA=Object.prototype.propertyIsEnumerable,m$=(e,t,n)=>t in e?xne(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,g$=(e,t)=>{for(var n in t||(t={}))aA.call(t,n)&&m$(e,n,t[n]);if(Sg)for(var n of Sg(t))lA.call(t,n)&&m$(e,n,t[n]);return e},One=(e,t)=>Sne(e,Pne(t)),Cne=(e,t)=>{var n={};for(var r in e)aA.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Sg)for(var r of Sg(e))t.indexOf(r)<0&&lA.call(e,r)&&(n[r]=e[r]);return n};const kne={size:"md",color:"gray",variant:"light"},OP=_.forwardRef((e,t)=>{const n=ae("Avatar",kne,e),{className:r,size:o,src:i,alt:s,radius:a,children:c,color:u,variant:f,gradient:p,classNames:g,styles:v,imageProps:y,unstyled:w}=n,P=Cne(n,["className","size","src","alt","radius","children","color","variant","gradient","classNames","styles","imageProps","unstyled"]),x=ine(),[S,O]=_.useState(!i),{classes:E,cx:$}=bne({color:u,radius:a,withinGroup:x.withinGroup,spacing:x.spacing,gradient:p},{classNames:g,styles:v,unstyled:w,name:"Avatar",variant:f,size:o});return _.useEffect(()=>{O(!i)},[i]),k.createElement(Pe,g$({component:"div",className:$(E.root,r),ref:t},P),S?k.createElement("div",{className:E.placeholder,title:s},c||k.createElement(qte,{className:E.placeholderIcon})):k.createElement("img",One(g$({},y),{className:E.image,src:i,alt:s,onError:()=>O(!0)})))});OP.displayName="@mantine/core/Avatar";OP.Group=sA;const CP=OP;var Ene=Object.defineProperty,$ne=Object.defineProperties,Mne=Object.getOwnPropertyDescriptors,v$=Object.getOwnPropertySymbols,Nne=Object.prototype.hasOwnProperty,Tne=Object.prototype.propertyIsEnumerable,y$=(e,t,n)=>t in e?Ene(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,I_=(e,t)=>{for(var n in t||(t={}))Nne.call(t,n)&&y$(e,n,t[n]);if(v$)for(var n of v$(t))Tne.call(t,n)&&y$(e,n,t[n]);return e},Ine=(e,t)=>$ne(e,Mne(t));const jne=["light","filled","outline","dot","gradient"],j_={xs:{fontSize:M(9),height:M(16)},sm:{fontSize:M(10),height:M(18)},md:{fontSize:M(11),height:M(20)},lg:{fontSize:M(13),height:M(26)},xl:{fontSize:M(16),height:M(32)}},Lne={xs:M(4),sm:M(4),md:M(6),lg:M(8),xl:M(10)};function Dne({theme:e,variant:t,color:n,size:r,gradient:o}){if(!jne.includes(t))return null;if(t==="dot"){const s=re({size:r,sizes:Lne});return{backgroundColor:"transparent",color:e.colorScheme==="dark"?e.colors.dark[0]:e.colors.gray[7],border:`${M(1)} solid ${e.colorScheme==="dark"?e.colors.dark[3]:e.colors.gray[3]}`,paddingLeft:`calc(${re({size:r,sizes:e.spacing})} / 1.5 - ${s} / 2)`,"&::before":{content:'""',display:"block",width:s,height:s,borderRadius:s,backgroundColor:e.fn.themeColor(n,e.colorScheme==="dark"?4:e.fn.primaryShade("light"),!0),marginRight:s}}}const i=e.fn.variant({color:n,variant:t,gradient:o});return{background:i.background,color:i.color,border:`${M(t==="gradient"?0:1)} solid ${i.border}`}}var Rne=ue((e,{color:t,radius:n,gradient:r,fullWidth:o},{variant:i,size:s})=>{const{fontSize:a,height:c}=s in j_?j_[s]:j_.md;return{leftSection:{marginRight:`calc(${e.spacing.xs} / 2)`},rightSection:{marginLeft:`calc(${e.spacing.xs} / 2)`},inner:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},root:I_(Ine(I_(I_({},e.fn.focusStyles()),e.fn.fontStyles()),{fontSize:a,height:c,WebkitTapHighlightColor:"transparent",lineHeight:`calc(${c} - ${M(2)})`,textDecoration:"none",padding:`0 calc(${re({size:s,sizes:e.spacing})} / 1.5)`,boxSizing:"border-box",display:o?"flex":"inline-flex",alignItems:"center",justifyContent:"center",width:o?"100%":"auto",textTransform:"uppercase",borderRadius:e.fn.radius(n),fontWeight:700,letterSpacing:M(.25),cursor:"inherit",textOverflow:"ellipsis",overflow:"hidden"}),Dne({theme:e,variant:i,color:t,size:s,gradient:r}))}});const zne=Rne;var Ane=Object.defineProperty,Pg=Object.getOwnPropertySymbols,cA=Object.prototype.hasOwnProperty,uA=Object.prototype.propertyIsEnumerable,_$=(e,t,n)=>t in e?Ane(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Bne=(e,t)=>{for(var n in t||(t={}))cA.call(t,n)&&_$(e,n,t[n]);if(Pg)for(var n of Pg(t))uA.call(t,n)&&_$(e,n,t[n]);return e},Fne=(e,t)=>{var n={};for(var r in e)cA.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Pg)for(var r of Pg(e))t.indexOf(r)<0&&uA.call(e,r)&&(n[r]=e[r]);return n};const Vne={variant:"light",size:"md",radius:"xl"},dA=_.forwardRef((e,t)=>{const n=ae("Badge",Vne,e),{className:r,color:o,variant:i,fullWidth:s,children:a,size:c,leftSection:u,rightSection:f,radius:p,gradient:g,classNames:v,styles:y,unstyled:w}=n,P=Fne(n,["className","color","variant","fullWidth","children","size","leftSection","rightSection","radius","gradient","classNames","styles","unstyled"]),{classes:x,cx:S}=zne({fullWidth:s,color:o,radius:p,gradient:g},{classNames:v,styles:y,name:"Badge",unstyled:w,variant:i,size:c});return k.createElement(Pe,Bne({className:S(x.root,r),ref:t},P),u&&k.createElement("span",{className:x.leftSection},u),k.createElement("span",{className:x.inner},a),f&&k.createElement("span",{className:x.rightSection},f))});dA.displayName="@mantine/core/Badge";const mt=dA;var Hne=ue((e,{orientation:t,buttonBorderWidth:n})=>({root:{display:"flex",flexDirection:t==="vertical"?"column":"row","& [data-button]":{"&:first-of-type:not(:last-of-type)":{borderBottomRightRadius:0,[t==="vertical"?"borderBottomLeftRadius":"borderTopRightRadius"]:0,[t==="vertical"?"borderBottomWidth":"borderRightWidth"]:`calc(${M(n)} / 2)`},"&:last-of-type:not(:first-of-type)":{borderTopLeftRadius:0,[t==="vertical"?"borderTopRightRadius":"borderBottomLeftRadius"]:0,[t==="vertical"?"borderTopWidth":"borderLeftWidth"]:`calc(${M(n)} / 2)`},"&:not(:first-of-type):not(:last-of-type)":{borderRadius:0,[t==="vertical"?"borderTopWidth":"borderLeftWidth"]:`calc(${M(n)} / 2)`,[t==="vertical"?"borderBottomWidth":"borderRightWidth"]:`calc(${M(n)} / 2)`},"& + [data-button]":{[t==="vertical"?"marginTop":"marginLeft"]:`calc(${n} * -1)`,"@media (min-resolution: 192dpi)":{[t==="vertical"?"marginTop":"marginLeft"]:0}}}}}));const Wne=Hne;var Une=Object.defineProperty,Og=Object.getOwnPropertySymbols,fA=Object.prototype.hasOwnProperty,pA=Object.prototype.propertyIsEnumerable,w$=(e,t,n)=>t in e?Une(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Zne=(e,t)=>{for(var n in t||(t={}))fA.call(t,n)&&w$(e,n,t[n]);if(Og)for(var n of Og(t))pA.call(t,n)&&w$(e,n,t[n]);return e},Gne=(e,t)=>{var n={};for(var r in e)fA.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Og)for(var r of Og(e))t.indexOf(r)<0&&pA.call(e,r)&&(n[r]=e[r]);return n};const Yne={orientation:"horizontal",buttonBorderWidth:1},hA=_.forwardRef((e,t)=>{const n=ae("ButtonGroup",Yne,e),{className:r,orientation:o,buttonBorderWidth:i,unstyled:s}=n,a=Gne(n,["className","orientation","buttonBorderWidth","unstyled"]),{classes:c,cx:u}=Wne({orientation:o,buttonBorderWidth:i},{name:"ButtonGroup",unstyled:s});return k.createElement(Pe,Zne({className:u(c.root,r),ref:t},a))});hA.displayName="@mantine/core/ButtonGroup";var Kne=Object.defineProperty,qne=Object.defineProperties,Jne=Object.getOwnPropertyDescriptors,b$=Object.getOwnPropertySymbols,Xne=Object.prototype.hasOwnProperty,Qne=Object.prototype.propertyIsEnumerable,x$=(e,t,n)=>t in e?Kne(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,ns=(e,t)=>{for(var n in t||(t={}))Xne.call(t,n)&&x$(e,n,t[n]);if(b$)for(var n of b$(t))Qne.call(t,n)&&x$(e,n,t[n]);return e},Uh=(e,t)=>qne(e,Jne(t));const ere=["filled","outline","light","white","default","subtle","gradient"],qb={xs:{height:Dn.xs,paddingLeft:M(14),paddingRight:M(14)},sm:{height:Dn.sm,paddingLeft:M(18),paddingRight:M(18)},md:{height:Dn.md,paddingLeft:M(22),paddingRight:M(22)},lg:{height:Dn.lg,paddingLeft:M(26),paddingRight:M(26)},xl:{height:Dn.xl,paddingLeft:M(32),paddingRight:M(32)},"compact-xs":{height:M(22),paddingLeft:M(7),paddingRight:M(7)},"compact-sm":{height:M(26),paddingLeft:M(8),paddingRight:M(8)},"compact-md":{height:M(30),paddingLeft:M(10),paddingRight:M(10)},"compact-lg":{height:M(34),paddingLeft:M(12),paddingRight:M(12)},"compact-xl":{height:M(40),paddingLeft:M(14),paddingRight:M(14)}};function tre({compact:e,size:t,withLeftIcon:n,withRightIcon:r}){if(e)return qb[`compact-${t}`];const o=qb[t];return o?Uh(ns({},o),{paddingLeft:n?`calc(${o.paddingLeft} / 1.5)`:o.paddingLeft,paddingRight:r?`calc(${o.paddingRight} / 1.5)`:o.paddingRight}):{}}const nre=e=>({display:e?"block":"inline-block",width:e?"100%":"auto"});function rre({variant:e,theme:t,color:n,gradient:r}){if(!ere.includes(e))return null;const o=t.fn.variant({color:n,variant:e,gradient:r});return e==="gradient"?ns({border:0,backgroundImage:o.background,color:o.color},t.fn.hover({backgroundSize:"200%"})):ns({border:`${M(1)} solid ${o.border}`,backgroundColor:o.background,color:o.color},t.fn.hover({backgroundColor:o.hover}))}var ore=ue((e,{radius:t,fullWidth:n,compact:r,withLeftIcon:o,withRightIcon:i,color:s,gradient:a},{variant:c,size:u})=>({root:Uh(ns(Uh(ns(ns(ns(ns({},tre({compact:r,size:u,withLeftIcon:o,withRightIcon:i})),e.fn.fontStyles()),e.fn.focusStyles()),nre(n)),{borderRadius:e.fn.radius(t),fontWeight:600,position:"relative",lineHeight:1,fontSize:re({size:u,sizes:e.fontSizes}),userSelect:"none",cursor:"pointer"}),rre({variant:c,theme:e,color:s,gradient:a})),{"&:active":e.activeStyles,"&:disabled, &[data-disabled]":{borderColor:"transparent",backgroundColor:e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[2],color:e.colorScheme==="dark"?e.colors.dark[6]:e.colors.gray[5],cursor:"not-allowed",backgroundImage:"none",pointerEvents:"none","&:active":{transform:"none"}},"&[data-loading]":{pointerEvents:"none","&::before":Uh(ns({content:'""'},e.fn.cover(M(-1))),{backgroundColor:e.colorScheme==="dark"?e.fn.rgba(e.colors.dark[7],.5):"rgba(255, 255, 255, .5)",borderRadius:e.fn.radius(t),cursor:"not-allowed"})}}),icon:{display:"flex",alignItems:"center"},leftIcon:{marginRight:e.spacing.xs},rightIcon:{marginLeft:e.spacing.xs},centerLoader:{position:"absolute",left:"50%",transform:"translateX(-50%)",opacity:.5},inner:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%",overflow:"visible"},label:{whiteSpace:"nowrap",height:"100%",overflow:"hidden",display:"flex",alignItems:"center"}}));const ire=ore;var sre=Object.defineProperty,Cg=Object.getOwnPropertySymbols,mA=Object.prototype.hasOwnProperty,gA=Object.prototype.propertyIsEnumerable,S$=(e,t,n)=>t in e?sre(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,P$=(e,t)=>{for(var n in t||(t={}))mA.call(t,n)&&S$(e,n,t[n]);if(Cg)for(var n of Cg(t))gA.call(t,n)&&S$(e,n,t[n]);return e},are=(e,t)=>{var n={};for(var r in e)mA.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Cg)for(var r of Cg(e))t.indexOf(r)<0&&gA.call(e,r)&&(n[r]=e[r]);return n};const lre={size:"sm",type:"button",variant:"filled",loaderPosition:"left"},kP=_.forwardRef((e,t)=>{const n=ae("Button",lre,e),{className:r,size:o,color:i,type:s,disabled:a,children:c,leftIcon:u,rightIcon:f,fullWidth:p,variant:g,radius:v,uppercase:y,compact:w,loading:P,loaderPosition:x,loaderProps:S,gradient:O,classNames:E,styles:$,unstyled:N}=n,I=are(n,["className","size","color","type","disabled","children","leftIcon","rightIcon","fullWidth","variant","radius","uppercase","compact","loading","loaderPosition","loaderProps","gradient","classNames","styles","unstyled"]),{classes:R,cx:B,theme:z}=ire({radius:v,color:i,fullWidth:p,compact:w,gradient:O,withLeftIcon:!!u,withRightIcon:!!f},{name:"Button",unstyled:N,classNames:E,styles:$,variant:g,size:o}),G=z.fn.variant({color:i,variant:g}),X=k.createElement(en,P$({color:G.color,size:`calc(${re({size:o,sizes:qb}).height} / 2)`},S));return k.createElement(ls,P$({className:B(R.root,r),type:s,disabled:a,"data-button":!0,"data-disabled":a||void 0,"data-loading":P||void 0,ref:t,unstyled:N},I),k.createElement("div",{className:R.inner},(u||P&&x==="left")&&k.createElement("span",{className:B(R.icon,R.leftIcon)},P&&x==="left"?X:u),P&&x==="center"&&k.createElement("span",{className:R.centerLoader},X),k.createElement("span",{className:R.label,style:{textTransform:y?"uppercase":void 0}},c),(f||P&&x==="right")&&k.createElement("span",{className:B(R.icon,R.rightIcon)},P&&x==="right"?X:f)))});kP.displayName="@mantine/core/Button";kP.Group=hA;const st=kP;var cre=ue((e,{radius:t,shadow:n})=>({root:{outline:0,WebkitTapHighlightColor:"transparent",display:"block",textDecoration:"none",color:e.colorScheme==="dark"?e.colors.dark[0]:e.black,backgroundColor:e.colorScheme==="dark"?e.colors.dark[7]:e.white,boxSizing:"border-box",borderRadius:e.fn.radius(t),boxShadow:e.shadows[n]||n||"none","&[data-with-border]":{border:`${M(1)} solid ${e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[3]}`}}}));const ure=cre;var dre=Object.defineProperty,kg=Object.getOwnPropertySymbols,vA=Object.prototype.hasOwnProperty,yA=Object.prototype.propertyIsEnumerable,O$=(e,t,n)=>t in e?dre(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,fre=(e,t)=>{for(var n in t||(t={}))vA.call(t,n)&&O$(e,n,t[n]);if(kg)for(var n of kg(t))yA.call(t,n)&&O$(e,n,t[n]);return e},pre=(e,t)=>{var n={};for(var r in e)vA.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&kg)for(var r of kg(e))t.indexOf(r)<0&&yA.call(e,r)&&(n[r]=e[r]);return n};const hre={},_A=_.forwardRef((e,t)=>{const n=ae("Paper",hre,e),{className:r,children:o,radius:i,withBorder:s,shadow:a,unstyled:c,variant:u}=n,f=pre(n,["className","children","radius","withBorder","shadow","unstyled","variant"]),{classes:p,cx:g}=ure({radius:i,shadow:a},{name:"Paper",unstyled:c,variant:u});return k.createElement(Pe,fre({className:g(p.root,r),"data-with-border":s||void 0,ref:t},f),o)});_A.displayName="@mantine/core/Paper";const mre=_A;var gre=ue((e,{inline:t})=>({root:{display:t?"inline-flex":"flex",alignItems:"center",justifyContent:"center"}}));const vre=gre;var yre=Object.defineProperty,Eg=Object.getOwnPropertySymbols,wA=Object.prototype.hasOwnProperty,bA=Object.prototype.propertyIsEnumerable,C$=(e,t,n)=>t in e?yre(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,_re=(e,t)=>{for(var n in t||(t={}))wA.call(t,n)&&C$(e,n,t[n]);if(Eg)for(var n of Eg(t))bA.call(t,n)&&C$(e,n,t[n]);return e},wre=(e,t)=>{var n={};for(var r in e)wA.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Eg)for(var r of Eg(e))t.indexOf(r)<0&&bA.call(e,r)&&(n[r]=e[r]);return n};const xA=_.forwardRef((e,t)=>{const n=ae("Center",{},e),{inline:r,className:o,unstyled:i,variant:s}=n,a=wre(n,["inline","className","unstyled","variant"]),{classes:c,cx:u}=vre({inline:r},{name:"Center",unstyled:i,variant:s});return k.createElement(Pe,_re({ref:t,className:u(c.root,o)},a))});xA.displayName="@mantine/core/Center";const Pr=xA,SA=_.createContext(null),bre=SA.Provider,xre=()=>_.useContext(SA);var Sre=Object.defineProperty,$g=Object.getOwnPropertySymbols,PA=Object.prototype.hasOwnProperty,OA=Object.prototype.propertyIsEnumerable,k$=(e,t,n)=>t in e?Sre(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,E$=(e,t)=>{for(var n in t||(t={}))PA.call(t,n)&&k$(e,n,t[n]);if($g)for(var n of $g(t))OA.call(t,n)&&k$(e,n,t[n]);return e},Pre=(e,t)=>{var n={};for(var r in e)PA.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&$g)for(var r of $g(e))t.indexOf(r)<0&&OA.call(e,r)&&(n[r]=e[r]);return n};const Ore={size:"sm"},CA=_.forwardRef((e,t)=>{const n=ae("CheckboxGroup",Ore,e),{children:r,value:o,defaultValue:i,onChange:s,size:a,wrapperProps:c}=n,u=Pre(n,["children","value","defaultValue","onChange","size","wrapperProps"]),[f,p]=go({value:o,defaultValue:i,finalValue:[],onChange:s}),g=v=>{const y=v.currentTarget.value;p(f.includes(y)?f.filter(w=>w!==y):[...f,y])};return k.createElement(bre,{value:{value:f,onChange:g,size:a}},k.createElement(et.Wrapper,E$(E$({labelElement:"div",size:a,__staticSelector:"CheckboxGroup",ref:t},c),u),r))});CA.displayName="@mantine/core/CheckboxGroup";var Cre=Object.defineProperty,Mg=Object.getOwnPropertySymbols,kA=Object.prototype.hasOwnProperty,EA=Object.prototype.propertyIsEnumerable,$$=(e,t,n)=>t in e?Cre(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Ng=(e,t)=>{for(var n in t||(t={}))kA.call(t,n)&&$$(e,n,t[n]);if(Mg)for(var n of Mg(t))EA.call(t,n)&&$$(e,n,t[n]);return e},$A=(e,t)=>{var n={};for(var r in e)kA.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Mg)for(var r of Mg(e))t.indexOf(r)<0&&EA.call(e,r)&&(n[r]=e[r]);return n};function kre(e){const t=e,{width:n,height:r,style:o}=t,i=$A(t,["width","height","style"]);return k.createElement("svg",Ng({viewBox:"0 0 10 7",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:Ng({width:n,height:r},o)},i),k.createElement("path",{d:"M4 4.586L1.707 2.293A1 1 0 1 0 .293 3.707l3 3a.997.997 0 0 0 1.414 0l5-5A1 1 0 1 0 8.293.293L4 4.586z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"}))}function Ere(e){var t=e,{indeterminate:n}=t,r=$A(t,["indeterminate"]);return n?k.createElement("svg",Ng({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 32 6"},r),k.createElement("rect",{width:"32",height:"6",fill:"currentColor",rx:"3"})):k.createElement(kre,Ng({},r))}var $re=Object.defineProperty,Mre=Object.defineProperties,Nre=Object.getOwnPropertyDescriptors,M$=Object.getOwnPropertySymbols,Tre=Object.prototype.hasOwnProperty,Ire=Object.prototype.propertyIsEnumerable,N$=(e,t,n)=>t in e?$re(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,T$=(e,t)=>{for(var n in t||(t={}))Tre.call(t,n)&&N$(e,n,t[n]);if(M$)for(var n of M$(t))Ire.call(t,n)&&N$(e,n,t[n]);return e},I$=(e,t)=>Mre(e,Nre(t));const jre={xs:M(16),sm:M(20),md:M(24),lg:M(30),xl:M(36)};var Lre=ue((e,{radius:t,color:n,transitionDuration:r,labelPosition:o,error:i,indeterminate:s},{size:a})=>{const c=re({size:a,sizes:jre}),u=e.fn.variant({variant:"filled",color:n});return{icon:I$(T$({},e.fn.cover()),{ref:Ar("icon"),color:s?"inherit":e.white,transform:s?"none":`translateY(${M(5)}) scale(0.5)`,opacity:s?1:0,transitionProperty:"opacity, transform",transitionTimingFunction:"ease",transitionDuration:`${r}ms`,pointerEvents:"none",width:"60%",position:"absolute",zIndex:1,margin:"auto","@media (prefers-reduced-motion)":{transitionDuration:e.respectReducedMotion?"0ms":void 0}}),inner:{position:"relative",width:c,height:c,order:o==="left"?2:1},input:I$(T$({},e.fn.focusStyles()),{appearance:"none",backgroundColor:e.colorScheme==="dark"?e.colors.dark[6]:e.white,border:`${M(1)} solid ${i?e.fn.variant({variant:"filled",color:"red"}).background:e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[4]}`,width:c,height:c,borderRadius:e.fn.radius(t),padding:0,display:"block",margin:0,transition:`border-color ${r}ms ease, background-color ${r}ms ease`,cursor:e.cursorType,"&:checked":{backgroundColor:u.background,borderColor:u.background,[`& + .${Ar("icon")}`]:{opacity:1,color:e.white,transform:"translateY(0) scale(1)"}},"&:disabled":{backgroundColor:e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[2],borderColor:e.colorScheme==="dark"?e.colors.dark[6]:e.colors.gray[3],cursor:"not-allowed",pointerEvents:"none",[`& + .${Ar("icon")}`]:{color:e.colorScheme==="dark"?e.colors.dark[6]:e.colors.gray[5]}}})}});const Dre=Lre;var Rre=Object.defineProperty,zre=Object.defineProperties,Are=Object.getOwnPropertyDescriptors,j$=Object.getOwnPropertySymbols,Bre=Object.prototype.hasOwnProperty,Fre=Object.prototype.propertyIsEnumerable,L$=(e,t,n)=>t in e?Rre(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Vre=(e,t)=>{for(var n in t||(t={}))Bre.call(t,n)&&L$(e,n,t[n]);if(j$)for(var n of j$(t))Fre.call(t,n)&&L$(e,n,t[n]);return e},Hre=(e,t)=>zre(e,Are(t));const L_={xs:M(16),sm:M(20),md:M(24),lg:M(30),xl:M(36)};var Wre=ue((e,{labelPosition:t},{size:n})=>({root:{},body:{display:"flex","&:has(input:disabled) label":{color:e.colorScheme==="dark"?e.colors.dark[3]:e.colors.gray[5]}},labelWrapper:Hre(Vre({},e.fn.fontStyles()),{display:"inline-flex",flexDirection:"column",WebkitTapHighlightColor:"transparent",fontSize:n in L_?re({size:n,sizes:e.fontSizes}):void 0,lineHeight:n in L_?re({size:n,sizes:L_}):void 0,color:e.colorScheme==="dark"?e.colors.dark[0]:e.black,cursor:e.cursorType,order:t==="left"?1:2}),description:{marginTop:`calc(${e.spacing.xs} / 2)`,[t==="left"?"paddingRight":"paddingLeft"]:e.spacing.sm},error:{marginTop:`calc(${e.spacing.xs} / 2)`,[t==="left"?"paddingRight":"paddingLeft"]:e.spacing.sm},label:{cursor:e.cursorType,[t==="left"?"paddingRight":"paddingLeft"]:e.spacing.sm,"&:disabled, &[data-disabled]":{color:e.colorScheme==="dark"?e.colors.dark[3]:e.colors.gray[5]}}}));const Ure=Wre;var Zre=Object.defineProperty,Tg=Object.getOwnPropertySymbols,MA=Object.prototype.hasOwnProperty,NA=Object.prototype.propertyIsEnumerable,D$=(e,t,n)=>t in e?Zre(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Gre=(e,t)=>{for(var n in t||(t={}))MA.call(t,n)&&D$(e,n,t[n]);if(Tg)for(var n of Tg(t))NA.call(t,n)&&D$(e,n,t[n]);return e},Yre=(e,t)=>{var n={};for(var r in e)MA.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Tg)for(var r of Tg(e))t.indexOf(r)<0&&NA.call(e,r)&&(n[r]=e[r]);return n};const EP=_.forwardRef((e,t)=>{var n=e,{__staticSelector:r,className:o,classNames:i,styles:s,unstyled:a,children:c,label:u,description:f,id:p,disabled:g,error:v,size:y,labelPosition:w,variant:P}=n,x=Yre(n,["__staticSelector","className","classNames","styles","unstyled","children","label","description","id","disabled","error","size","labelPosition","variant"]);const{classes:S,cx:O}=Ure({labelPosition:w},{name:r,styles:s,classNames:i,unstyled:a,variant:P,size:y});return k.createElement(Pe,Gre({className:O(S.root,o),ref:t},x),k.createElement("div",{className:O(S.body)},c,k.createElement("div",{className:S.labelWrapper},u!=null&&k.createElement("label",{className:S.label,"data-disabled":g||void 0,htmlFor:p},u),f&&k.createElement(et.Description,{className:S.description},f),v&&v!=="boolean"&&k.createElement(et.Error,{className:S.error},v))))});EP.displayName="@mantine/core/InlineInput";var Kre=Object.defineProperty,Ig=Object.getOwnPropertySymbols,TA=Object.prototype.hasOwnProperty,IA=Object.prototype.propertyIsEnumerable,R$=(e,t,n)=>t in e?Kre(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Qp=(e,t)=>{for(var n in t||(t={}))TA.call(t,n)&&R$(e,n,t[n]);if(Ig)for(var n of Ig(t))IA.call(t,n)&&R$(e,n,t[n]);return e},qre=(e,t)=>{var n={};for(var r in e)TA.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Ig)for(var r of Ig(e))t.indexOf(r)<0&&IA.call(e,r)&&(n[r]=e[r]);return n};const Jre={size:"sm",transitionDuration:100,icon:Ere,labelPosition:"right"},mr=_.forwardRef((e,t)=>{const n=ae("Checkbox",Jre,e),{className:r,style:o,sx:i,checked:s,disabled:a,color:c,label:u,indeterminate:f,id:p,size:g,radius:v,wrapperProps:y,children:w,classNames:P,styles:x,transitionDuration:S,icon:O,unstyled:E,labelPosition:$,description:N,error:I,variant:R}=n,B=qre(n,["className","style","sx","checked","disabled","color","label","indeterminate","id","size","radius","wrapperProps","children","classNames","styles","transitionDuration","icon","unstyled","labelPosition","description","error","variant"]),z=xre(),G=$a(p),{systemStyles:X,rest:Q}=Dl(B),{classes:V}=Dre({radius:v,color:c,transitionDuration:S,labelPosition:$,error:!!I,indeterminate:f},{name:"Checkbox",classNames:P,styles:x,unstyled:E,variant:R,size:z?.size||g}),H=z?{checked:z.value.includes(Q.value),onChange:z.onChange}:{};return k.createElement(EP,Qp(Qp({className:r,sx:i,style:o,id:G,size:z?.size||g,labelPosition:$,label:u,description:N,error:I,disabled:a,__staticSelector:"Checkbox",classNames:P,styles:x,unstyled:E,"data-checked":H.checked||void 0,variant:R},X),y),k.createElement("div",{className:V.inner},k.createElement("input",Qp(Qp({id:G,ref:t,type:"checkbox",className:V.input,checked:s,disabled:a},Q),H)),k.createElement(O,{indeterminate:f,className:V.icon})))});mr.displayName="@mantine/core/Checkbox";mr.Group=CA;var Xre=Object.defineProperty,Qre=Object.defineProperties,eoe=Object.getOwnPropertyDescriptors,z$=Object.getOwnPropertySymbols,toe=Object.prototype.hasOwnProperty,noe=Object.prototype.propertyIsEnumerable,A$=(e,t,n)=>t in e?Xre(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,B$=(e,t)=>{for(var n in t||(t={}))toe.call(t,n)&&A$(e,n,t[n]);if(z$)for(var n of z$(t))noe.call(t,n)&&A$(e,n,t[n]);return e},F$=(e,t)=>Qre(e,eoe(t)),roe=ue((e,{radius:t},{size:n})=>{const r=e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[3];return{root:F$(B$({},e.fn.focusStyles()),{width:M(n),height:M(n),WebkitTapHighlightColor:"transparent",border:0,borderRadius:e.fn.radius(t),appearance:"none",WebkitAppearance:"none",padding:0,position:"relative",overflow:"hidden"}),overlay:F$(B$({},e.fn.cover()),{position:"absolute",borderRadius:e.fn.radius(t)}),children:{display:"inline-flex",justifyContent:"center",alignItems:"center"},shadowOverlay:{boxShadow:`rgba(0, 0, 0, .1) 0 0 0 ${M(1)} inset, rgb(0, 0, 0, .15) 0 0 ${M(4)} inset`,zIndex:1},alphaOverlay:{backgroundImage:`linear-gradient(45deg, ${r} 25%, transparent 25%), linear-gradient(-45deg, ${r} 25%, transparent 25%), linear-gradient(45deg, transparent 75%, ${r} 75%), linear-gradient(-45deg, ${e.colorScheme==="dark"?e.colors.dark[7]:e.white} 75%, ${r} 75%)`,backgroundSize:`${M(8)} ${M(8)}`,backgroundPosition:`0 0, 0 ${M(4)}, ${M(4)} -${M(4)}, -${M(4)} 0`}}});const ooe=roe;var ioe=Object.defineProperty,jg=Object.getOwnPropertySymbols,jA=Object.prototype.hasOwnProperty,LA=Object.prototype.propertyIsEnumerable,V$=(e,t,n)=>t in e?ioe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,soe=(e,t)=>{for(var n in t||(t={}))jA.call(t,n)&&V$(e,n,t[n]);if(jg)for(var n of jg(t))LA.call(t,n)&&V$(e,n,t[n]);return e},aoe=(e,t)=>{var n={};for(var r in e)jA.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&jg)for(var r of jg(e))t.indexOf(r)<0&&LA.call(e,r)&&(n[r]=e[r]);return n};const loe={size:M(25),radius:M(25),withShadow:!0},DA=_.forwardRef((e,t)=>{const n=ae("ColorSwatch",loe,e),{color:r,size:o,radius:i,className:s,children:a,classNames:c,styles:u,unstyled:f,withShadow:p,variant:g}=n,v=aoe(n,["color","size","radius","className","children","classNames","styles","unstyled","withShadow","variant"]),{classes:y,cx:w}=ooe({radius:i},{classNames:c,styles:u,unstyled:f,name:"ColorSwatch",size:o,variant:g});return k.createElement(Pe,soe({className:w(y.root,s),ref:t},v),k.createElement("div",{className:w(y.alphaOverlay,y.overlay)}),p&&k.createElement("div",{className:w(y.shadowOverlay,y.overlay)}),k.createElement("div",{className:y.overlay,style:{backgroundColor:r}}),k.createElement("div",{className:w(y.children,y.overlay)},a))});DA.displayName="@mantine/core/ColorSwatch";const hf=DA,Ci={xs:M(8),sm:M(12),md:M(16),lg:M(20),xl:M(22)};var coe=ue((e,t,{size:n})=>{const r=re({size:n,sizes:Ci});return{thumb:{overflow:"hidden",boxSizing:"border-box",position:"absolute",boxShadow:`0 0 ${M(1)} rgba(0, 0, 0, .6)`,border:`${M(2)} solid ${e.white}`,backgroundColor:"transparent",width:r,height:r,borderRadius:r}}});const uoe=coe;var doe=Object.defineProperty,H$=Object.getOwnPropertySymbols,foe=Object.prototype.hasOwnProperty,poe=Object.prototype.propertyIsEnumerable,W$=(e,t,n)=>t in e?doe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,hoe=(e,t)=>{for(var n in t||(t={}))foe.call(t,n)&&W$(e,n,t[n]);if(H$)for(var n of H$(t))poe.call(t,n)&&W$(e,n,t[n]);return e};function $P({position:e,className:t,styles:n,classNames:r,style:o,size:i,__staticSelector:s,unstyled:a,variant:c}){const{classes:u,cx:f}=uoe(null,{classNames:r,styles:n,name:s,unstyled:a,size:i,variant:c});return k.createElement("div",{className:f(u.thumb,t),style:hoe({left:`calc(${e.x*100}% - ${Ci[i]} / 2)`,top:`calc(${e.y*100}% - ${Ci[i]} / 2)`},o)})}$P.displayName="@mantine/core/Thumb";var moe=Object.defineProperty,U$=Object.getOwnPropertySymbols,goe=Object.prototype.hasOwnProperty,voe=Object.prototype.propertyIsEnumerable,Z$=(e,t,n)=>t in e?moe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,G$=(e,t)=>{for(var n in t||(t={}))goe.call(t,n)&&Z$(e,n,t[n]);if(U$)for(var n of U$(t))voe.call(t,n)&&Z$(e,n,t[n]);return e},yoe=ue((e,t,{size:n})=>({sliderThumb:{ref:Ar("sliderThumb")},slider:{position:"relative",height:`calc(${re({size:n,sizes:Ci})} + ${M(2)})`,boxSizing:"border-box",marginLeft:`calc(${re({size:n,sizes:Ci})} / 2)`,marginRight:`calc(${re({size:n,sizes:Ci})} / 2)`,outline:0,[`&:focus .${Ar("sliderThumb")}`]:G$({},e.focusRing==="always"||e.focusRing==="auto"?e.focusRingStyles.styles(e):e.focusRingStyles.resetStyles(e)),[`&:focus:not(:focus-visible) .${Ar("sliderThumb")}`]:G$({},e.focusRing==="auto"||e.focusRing==="never"?e.focusRingStyles.resetStyles(e):null)},sliderOverlay:{position:"absolute",boxSizing:"border-box",top:0,bottom:0,left:`calc(${re({size:n,sizes:Ci})} * -1 / 2 - ${M(1)})`,right:`calc(${re({size:n,sizes:Ci})} * -1 / 2 - ${M(1)})`,borderRadius:1e3}}));const _oe=yoe;var woe=Object.defineProperty,boe=Object.defineProperties,xoe=Object.getOwnPropertyDescriptors,Lg=Object.getOwnPropertySymbols,RA=Object.prototype.hasOwnProperty,zA=Object.prototype.propertyIsEnumerable,Y$=(e,t,n)=>t in e?woe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Soe=(e,t)=>{for(var n in t||(t={}))RA.call(t,n)&&Y$(e,n,t[n]);if(Lg)for(var n of Lg(t))zA.call(t,n)&&Y$(e,n,t[n]);return e},Poe=(e,t)=>boe(e,xoe(t)),Ooe=(e,t)=>{var n={};for(var r in e)RA.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Lg)for(var r of Lg(e))t.indexOf(r)<0&&zA.call(e,r)&&(n[r]=e[r]);return n};const MP=_.forwardRef((e,t)=>{var n=e,{value:r,onChange:o,onChangeEnd:i,maxValue:s,round:a,size:c="md",thumbColor:u="transparent",__staticSelector:f="ColorSlider",focusable:p=!0,overlays:g,classNames:v,styles:y,className:w,unstyled:P,variant:x}=n,S=Ooe(n,["value","onChange","onChangeEnd","maxValue","round","size","thumbColor","__staticSelector","focusable","overlays","classNames","styles","className","unstyled","variant"]);const{classes:O,cx:E}=_oe(null,{classNames:v,styles:y,name:f,unstyled:P,variant:x,size:c}),[$,N]=_.useState({y:0,x:r/s}),I=_.useRef($),R=Q=>a?Math.round(Q*s):Q*s,{ref:B}=U3(({x:Q,y:V})=>{I.current={x:Q,y:V},o(R(Q))},{onScrubEnd:()=>{const{x:Q}=I.current;i(R(Q))}});Fn(()=>{N({y:0,x:r/s})},[r]);const z=(Q,V)=>{Q.preventDefault();const H=W3(V);o(R(H.x)),i(R(H.x))},G=Q=>{switch(Q.key){case"ArrowRight":{z(Q,{x:$.x+.05,y:$.y});break}case"ArrowLeft":{z(Q,{x:$.x-.05,y:$.y});break}}},X=g.map((Q,V)=>k.createElement("div",{className:O.sliderOverlay,style:Q,key:V}));return k.createElement(Pe,Poe(Soe({},S),{ref:ws(B,t),className:E(O.slider,w),role:"slider","aria-valuenow":r,"aria-valuemax":s,"aria-valuemin":0,tabIndex:p?0:-1,onKeyDown:G}),X,k.createElement($P,{__staticSelector:f,classNames:v,styles:y,position:$,style:{top:M(1),backgroundColor:u},className:O.sliderThumb,size:c}))});MP.displayName="@mantine/core/ColorSlider";var Coe=Object.defineProperty,koe=Object.defineProperties,Eoe=Object.getOwnPropertyDescriptors,Dg=Object.getOwnPropertySymbols,AA=Object.prototype.hasOwnProperty,BA=Object.prototype.propertyIsEnumerable,K$=(e,t,n)=>t in e?Coe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,$oe=(e,t)=>{for(var n in t||(t={}))AA.call(t,n)&&K$(e,n,t[n]);if(Dg)for(var n of Dg(t))BA.call(t,n)&&K$(e,n,t[n]);return e},Moe=(e,t)=>koe(e,Eoe(t)),Noe=(e,t)=>{var n={};for(var r in e)AA.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Dg)for(var r of Dg(e))t.indexOf(r)<0&&BA.call(e,r)&&(n[r]=e[r]);return n};const Toe={},FA=_.forwardRef((e,t)=>{const n=ae("HueSlider",Toe,e),{value:r,onChange:o,onChangeEnd:i,__staticSelector:s}=n,a=Noe(n,["value","onChange","onChangeEnd","__staticSelector"]);return k.createElement(MP,Moe($oe({},a),{ref:t,value:r,onChange:o,onChangeEnd:i,maxValue:360,thumbColor:`hsl(${r}, 100%, 50%)`,round:!0,__staticSelector:s||"HueSlider",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 ${M(1)} inset, rgb(0, 0, 0, .15) 0 0 ${M(4)} inset`}]}))});FA.displayName="@mantine/core/HueSlider";var Ioe=Object.defineProperty,joe=Object.defineProperties,Loe=Object.getOwnPropertyDescriptors,q$=Object.getOwnPropertySymbols,Doe=Object.prototype.hasOwnProperty,Roe=Object.prototype.propertyIsEnumerable,J$=(e,t,n)=>t in e?Ioe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,X$=(e,t)=>{for(var n in t||(t={}))Doe.call(t,n)&&J$(e,n,t[n]);if(q$)for(var n of q$(t))Roe.call(t,n)&&J$(e,n,t[n]);return e},Q$=(e,t)=>joe(e,Loe(t));function Io(e,t=0,n=10**t){return Math.round(n*e)/n}function zoe({h:e,s:t,l:n,a:r}){const o=t*((n<50?n:100-n)/100);return{h:e,s:o>0?2*o/(n+o)*100:0,v:n+o,a:r}}const Aoe={grad:360/400,turn:360,rad:360/(Math.PI*2)};function Boe(e,t="deg"){return Number(e)*(Aoe[t]||1)}const Foe=/hsla?\(?\s*(-?\d*\.?\d+)(deg|rad|grad|turn)?[,\s]+(-?\d*\.?\d+)%?[,\s]+(-?\d*\.?\d+)%?,?\s*[/\s]*(-?\d*\.?\d+)?(%)?\s*\)?/i;function eM(e){const t=Foe.exec(e);return t?zoe({h:Boe(t[1],t[2]),s:Number(t[3]),l:Number(t[4]),a:t[5]===void 0?1:Number(t[5])/(t[6]?100:1)}):{h:0,s:0,v:0,a:1}}function Jb({r:e,g:t,b:n,a:r}){const o=Math.max(e,t,n),i=o-Math.min(e,t,n),s=i?o===e?(t-n)/i:o===t?2+(n-e)/i:4+(e-t)/i:0;return{h:Io(60*(s<0?s+6:s),3),s:Io(o?i/o*100:0,3),v:Io(o/255*100,3),a:r}}function Xb(e){const t=e[0]==="#"?e.slice(1):e;return t.length===3?Jb({r:parseInt(t[0]+t[0],16),g:parseInt(t[1]+t[1],16),b:parseInt(t[2]+t[2],16),a:1}):Jb({r:parseInt(t.slice(0,2),16),g:parseInt(t.slice(2,4),16),b:parseInt(t.slice(4,6),16),a:1})}function Voe(e){const t=e[0]==="#"?e.slice(1):e,n=s=>Io(parseInt(s,16)/255,3);if(t.length===4){const s=t.slice(0,3),a=n(t[3]+t[3]);return Q$(X$({},Xb(s)),{a})}const r=t.slice(0,6),o=n(t.slice(6,8));return Q$(X$({},Xb(r)),{a:o})}const Hoe=/rgba?\(?\s*(-?\d*\.?\d+)(%)?[,\s]+(-?\d*\.?\d+)(%)?[,\s]+(-?\d*\.?\d+)(%)?,?\s*[/\s]*(-?\d*\.?\d+)?(%)?\s*\)?/i;function tM(e){const t=Hoe.exec(e);return t?Jb({r:Number(t[1])/(t[2]?100/255:1),g:Number(t[3])/(t[4]?100/255:1),b:Number(t[5])/(t[6]?100/255:1),a:t[7]===void 0?1:Number(t[7])/(t[8]?100:1)}):{h:0,s:0,v:0,a:1}}const VA={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},Woe={hex:Xb,hexa:Voe,rgb:tM,rgba:tM,hsl:eM,hsla:eM};function Uoe(e){for(const[,t]of Object.entries(VA))if(t.test(e))return!0;return!1}function eh(e){if(typeof e!="string")return{h:0,s:0,v:0,a:1};if(e==="transparent")return{h:0,s:0,v:0,a:0};const t=e.trim();for(const[n,r]of Object.entries(VA))if(r.test(t))return Woe[n](t);return{h:0,s:0,v:0,a:1}}var Zoe=Object.defineProperty,Goe=Object.defineProperties,Yoe=Object.getOwnPropertyDescriptors,Rg=Object.getOwnPropertySymbols,HA=Object.prototype.hasOwnProperty,WA=Object.prototype.propertyIsEnumerable,nM=(e,t,n)=>t in e?Zoe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Koe=(e,t)=>{for(var n in t||(t={}))HA.call(t,n)&&nM(e,n,t[n]);if(Rg)for(var n of Rg(t))WA.call(t,n)&&nM(e,n,t[n]);return e},qoe=(e,t)=>Goe(e,Yoe(t)),Joe=(e,t)=>{var n={};for(var r in e)HA.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Rg)for(var r of Rg(e))t.indexOf(r)<0&&WA.call(e,r)&&(n[r]=e[r]);return n};const Xoe={},UA=_.forwardRef((e,t)=>{const n=ae("AlphaSlider",Xoe,e),{value:r,onChange:o,onChangeEnd:i,color:s,__staticSelector:a}=n,c=Joe(n,["value","onChange","onChangeEnd","color","__staticSelector"]),u=ir(),f=u.colorScheme==="dark"?u.colors.dark[4]:u.colors.gray[3];return k.createElement(MP,qoe(Koe({},c),{ref:t,value:r,onChange:p=>o(Io(p,2)),onChangeEnd:p=>i(Io(p,2)),maxValue:1,round:!1,__staticSelector:a||"AlphaSlider",overlays:[{backgroundImage:`linear-gradient(45deg, ${f} 25%, transparent 25%), linear-gradient(-45deg, ${f} 25%, transparent 25%), linear-gradient(45deg, transparent 75%, ${f} 75%), linear-gradient(-45deg, ${u.colorScheme==="dark"?u.colors.dark[7]:u.white} 75%, ${f} 75%)`,backgroundSize:`${M(8)} ${M(8)}`,backgroundPosition:`0 0, 0 ${M(4)}, ${M(4)} -${M(4)}, -${M(4)} 0`},{backgroundImage:`linear-gradient(90deg, transparent, ${s})`},{boxShadow:`rgba(0, 0, 0, .1) 0 0 0 ${M(1)} inset, rgb(0, 0, 0, .15) 0 0 ${M(4)} inset`}]}))});UA.displayName="@mantine/core/AlphaSlider";var Qoe=Object.defineProperty,rM=Object.getOwnPropertySymbols,eie=Object.prototype.hasOwnProperty,tie=Object.prototype.propertyIsEnumerable,oM=(e,t,n)=>t in e?Qoe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,D_=(e,t)=>{for(var n in t||(t={}))eie.call(t,n)&&oM(e,n,t[n]);if(rM)for(var n of rM(t))tie.call(t,n)&&oM(e,n,t[n]);return e};const nie={xs:M(100),sm:M(110),md:M(120),lg:M(140),xl:M(160)};var rie=ue((e,t,{size:n})=>({saturationThumb:{ref:Ar("saturationThumb")},saturation:{boxSizing:"border-box",position:"relative",height:re({size:n,sizes:nie}),borderRadius:e.radius.sm,margin:`calc(${re({size:n,sizes:Ci})} / 2)`,WebkitTapHighlightColor:"transparent",[`&:focus .${Ar("saturationThumb")}`]:D_({},e.focusRing==="always"||e.focusRing==="auto"?e.focusRingStyles.styles(e):e.focusRingStyles.resetStyles(e)),[`&:focus:not(:focus-visible) .${Ar("saturationThumb")}`]:D_({},e.focusRing==="auto"||e.focusRing==="never"?e.focusRingStyles.resetStyles(e):null)},saturationOverlay:D_({boxSizing:"border-box",borderRadius:e.radius.sm},e.fn.cover(`calc(${re({size:n,sizes:Ci})} * -1 / 2 - ${M(1)})`))}));const oie=rie;function ZA({h:e,s:t,v:n,a:r}){const o=e/360*6,i=t/100,s=n/100,a=Math.floor(o),c=s*(1-i),u=s*(1-(o-a)*i),f=s*(1-(1-o+a)*i),p=a%6;return{r:Io([s,u,c,c,f,s][p]*255),g:Io([f,s,s,u,c,c][p]*255),b:Io([c,c,f,s,s,u][p]*255),a:Io(r,2)}}function iM(e,t){const{r:n,g:r,b:o,a:i}=ZA(e);return t?`rgba(${n}, ${r}, ${o}, ${Io(i,2)})`:`rgb(${n}, ${r}, ${o})`}function sM({h:e,s:t,v:n,a:r},o){const i=(200-t)*n/100,s={h:Math.round(e),s:Math.round(i>0&&i<200?t*n/100/(i<=100?i:200-i)*100:0),l:Math.round(i/2)};return o?`hsla(${s.h}, ${s.s}%, ${s.l}%, ${Io(r,2)})`:`hsl(${s.h}, ${s.s}%, ${s.l}%)`}function Zh(e){const t=e.toString(16);return t.length<2?`0${t}`:t}function GA(e){const{r:t,g:n,b:r}=ZA(e);return`#${Zh(t)}${Zh(n)}${Zh(r)}`}function iie(e){const t=Math.round(e.a*255);return`${GA(e)}${Zh(t)}`}const R_={hex:GA,hexa:e=>iie(e),rgb:e=>iM(e,!1),rgba:e=>iM(e,!0),hsl:e=>sM(e,!1),hsla:e=>sM(e,!0)};function zs(e,t){return t?e in R_?R_[e](t):R_.hex(t):"#000000"}function YA({value:e,onChange:t,onChangeEnd:n,focusable:r=!0,__staticSelector:o="saturation",size:i,color:s,saturationLabel:a,classNames:c,styles:u,unstyled:f,variant:p}){const{classes:g}=oie(null,{classNames:c,styles:u,name:o,unstyled:f,variant:p,size:i}),[v,y]=_.useState({x:e.s/100,y:1-e.v/100}),w=_.useRef(v),{ref:P}=U3(({x:O,y:E})=>{w.current={x:O,y:E},t({s:Math.round(O*100),v:Math.round((1-E)*100)})},{onScrubEnd:()=>{const{x:O,y:E}=w.current;n({s:Math.round(O*100),v:Math.round((1-E)*100)})}});_.useEffect(()=>{y({x:e.s/100,y:1-e.v/100})},[e.s,e.v]);const x=(O,E)=>{O.preventDefault();const $=W3(E);t({s:Math.round($.x*100),v:Math.round((1-$.y)*100)}),n({s:Math.round($.x*100),v:Math.round((1-$.y)*100)})},S=O=>{switch(O.key){case"ArrowUp":{x(O,{y:v.y-.05,x:v.x});break}case"ArrowDown":{x(O,{y:v.y+.05,x:v.x});break}case"ArrowRight":{x(O,{x:v.x+.05,y:v.y});break}case"ArrowLeft":{x(O,{x:v.x-.05,y:v.y});break}}};return k.createElement("div",{className:g.saturation,ref:P,role:"slider","aria-label":a,"aria-valuenow":v.x,"aria-valuetext":zs("rgba",e),tabIndex:r?0:-1,onKeyDown:S},k.createElement("div",{className:g.saturationOverlay,style:{backgroundColor:`hsl(${e.h}, 100%, 50%)`}}),k.createElement("div",{className:g.saturationOverlay,style:{backgroundImage:"linear-gradient(90deg, #fff, transparent)"}}),k.createElement("div",{className:g.saturationOverlay,style:{backgroundImage:"linear-gradient(0deg, #000, transparent)"}}),k.createElement($P,{__staticSelector:o,classNames:c,styles:u,position:v,className:g.saturationThumb,style:{backgroundColor:s},size:i}))}YA.displayName="@mantine/core/Saturation";var sie=ue((e,{swatchesPerRow:t})=>({swatch:{width:`calc(${100/t}% - ${M(4)})`,height:0,paddingBottom:`calc(${100/t}% - ${M(4)})`,margin:M(2),boxSizing:"content-box"},swatches:{boxSizing:"border-box",marginLeft:M(-2),marginRight:M(-2),display:"flex",flexWrap:"wrap"}}));const aie=sie;var lie=Object.defineProperty,zg=Object.getOwnPropertySymbols,KA=Object.prototype.hasOwnProperty,qA=Object.prototype.propertyIsEnumerable,aM=(e,t,n)=>t in e?lie(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,cie=(e,t)=>{for(var n in t||(t={}))KA.call(t,n)&&aM(e,n,t[n]);if(zg)for(var n of zg(t))qA.call(t,n)&&aM(e,n,t[n]);return e},uie=(e,t)=>{var n={};for(var r in e)KA.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&zg)for(var r of zg(e))t.indexOf(r)<0&&qA.call(e,r)&&(n[r]=e[r]);return n};function JA(e){var t=e,{data:n,swatchesPerRow:r=10,focusable:o=!0,classNames:i,styles:s,__staticSelector:a="color-picker",unstyled:c,setValue:u,onChangeEnd:f,variant:p,size:g}=t,v=uie(t,["data","swatchesPerRow","focusable","classNames","styles","__staticSelector","unstyled","setValue","onChangeEnd","variant","size"]);const{classes:y}=aie({swatchesPerRow:r},{classNames:i,styles:s,name:a,unstyled:c,variant:p,size:g}),w=n.map((P,x)=>k.createElement(hf,{className:y.swatch,component:"button",type:"button",color:P,key:x,radius:"sm",onClick:()=>{u(P),f?.(P)},style:{cursor:"pointer"},"aria-label":P,tabIndex:o?0:-1}));return k.createElement("div",cie({className:y.swatches},v),w)}JA.displayName="@mantine/core/Swatches";const die={xs:M(180),sm:M(200),md:M(240),lg:M(280),xl:M(320)};var fie=ue((e,{fullWidth:t},{size:n})=>({preview:{},wrapper:{boxSizing:"border-box",width:t?"100%":re({size:n,sizes:die}),padding:M(1)},body:{display:"flex",boxSizing:"border-box",paddingTop:`calc(${re({size:n,sizes:e.spacing})} / 2)`},sliders:{flex:1,boxSizing:"border-box","&:not(:only-child)":{marginRight:e.spacing.xs}},slider:{boxSizing:"border-box","& + &":{marginTop:M(5)}},swatch:{cursor:"pointer"}}));const pie=fie;var hie=Object.defineProperty,mie=Object.defineProperties,gie=Object.getOwnPropertyDescriptors,Ag=Object.getOwnPropertySymbols,XA=Object.prototype.hasOwnProperty,QA=Object.prototype.propertyIsEnumerable,lM=(e,t,n)=>t in e?hie(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,ac=(e,t)=>{for(var n in t||(t={}))XA.call(t,n)&&lM(e,n,t[n]);if(Ag)for(var n of Ag(t))QA.call(t,n)&&lM(e,n,t[n]);return e},z_=(e,t)=>mie(e,gie(t)),vie=(e,t)=>{var n={};for(var r in e)XA.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Ag)for(var r of Ag(e))t.indexOf(r)<0&&QA.call(e,r)&&(n[r]=e[r]);return n};const yie={xs:26,sm:34,md:42,lg:50,xl:54},_ie={swatchesPerRow:10,size:"sm",withPicker:!0,focusable:!0,__staticSelector:"ColorPicker"},e4=_.forwardRef((e,t)=>{const n=ae("ColorPicker",_ie,e),{value:r,defaultValue:o,onChange:i,onChangeEnd:s,format:a,swatches:c,swatchesPerRow:u,size:f,withPicker:p,fullWidth:g,focusable:v,__staticSelector:y,saturationLabel:w,hueLabel:P,alphaLabel:x,className:S,styles:O,classNames:E,unstyled:$,onColorSwatchClick:N,variant:I}=n,R=vie(n,["value","defaultValue","onChange","onChangeEnd","format","swatches","swatchesPerRow","size","withPicker","fullWidth","focusable","__staticSelector","saturationLabel","hueLabel","alphaLabel","className","styles","classNames","unstyled","onColorSwatchClick","variant"]),{classes:B,cx:z}=pie({fullWidth:g},{classNames:E,styles:O,name:y,unstyled:$,variant:I,size:f}),G=_.useRef(a),X=_.useRef(null),Q=_.useRef(!0),V=a==="hexa"||a==="rgba"||a==="hsla",[H,Z,Y]=go({value:r,defaultValue:o,finalValue:"#FFFFFF",onChange:i}),[j,U]=_.useState(eh(H)),F=K=>{Q.current=!1,U(ee=>{const fe=ac(ac({},ee),K);return X.current=zs(G.current,fe),fe}),Z(X.current),setTimeout(()=>{Q.current=!0},0)};return Fn(()=>{Uoe(r)&&Q.current&&(U(eh(r)),Q.current=!0)},[r]),Fn(()=>{G.current=a,Z(zs(a,j))},[a]),k.createElement(Pe,ac({className:z(B.wrapper,S),ref:t},R),p&&k.createElement(k.Fragment,null,k.createElement(YA,{value:j,onChange:F,onChangeEnd:({s:K,v:ee})=>s?.(zs(G.current,z_(ac({},j),{s:K,v:ee}))),color:H,styles:O,classNames:E,size:f,focusable:v,saturationLabel:w,__staticSelector:y}),k.createElement("div",{className:B.body},k.createElement("div",{className:B.sliders},k.createElement(FA,{value:j.h,onChange:K=>F({h:K}),onChangeEnd:K=>s?.(zs(G.current,z_(ac({},j),{h:K}))),size:f,styles:O,classNames:E,focusable:v,"aria-label":P,__staticSelector:y}),V&&k.createElement(UA,{value:j.a,onChange:K=>F({a:K}),onChangeEnd:K=>{s?.(zs(G.current,z_(ac({},j),{a:K})))},size:f,color:zs("hex",j),style:{marginTop:M(6)},styles:O,classNames:E,focusable:v,"aria-label":x,__staticSelector:y})),V&&k.createElement(hf,{color:H,radius:"sm",size:re({size:f,sizes:yie}),className:B.preview}))),Array.isArray(c)&&k.createElement(JA,{data:c,style:{marginTop:M(5)},swatchesPerRow:u,focusable:v,classNames:E,styles:O,__staticSelector:y,setValue:Z,onChangeEnd:K=>{const ee=zs(a,eh(K));N?.(ee),s?.(ee),Y||U(eh(K))}}))});e4.displayName="@mantine/core/ColorPicker";const[wie,bie]=bu("Drawer component was not found in tree"),cM={xs:M(320),sm:M(380),md:M(440),lg:M(620),xl:M(780)};var xie=ue((e,{position:t},{size:n})=>({header:{zIndex:1e3},content:{flex:t==="right"||t==="left"?`0 0 ${re({size:n,sizes:cM})}`:"0 0 100%",maxWidth:"100%",maxHeight:"100%",height:t==="right"||t==="left"?"100%":re({size:n,sizes:cM}),borderRadius:0,overflowY:"auto"},inner:{display:"flex",justifyContent:t==="right"?"flex-end":"flex-start",alignItems:t==="bottom"?"flex-end":"flex-start"}}));const Sie=xie,[Pie,Cu]=bu("ModalBase component was not found in tree");var Oie=ue(()=>({close:{marginLeft:"auto",marginRight:0}}));const Cie=Oie;var kie=Object.defineProperty,Bg=Object.getOwnPropertySymbols,t4=Object.prototype.hasOwnProperty,n4=Object.prototype.propertyIsEnumerable,uM=(e,t,n)=>t in e?kie(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Eie=(e,t)=>{for(var n in t||(t={}))t4.call(t,n)&&uM(e,n,t[n]);if(Bg)for(var n of Bg(t))n4.call(t,n)&&uM(e,n,t[n]);return e},$ie=(e,t)=>{var n={};for(var r in e)t4.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Bg)for(var r of Bg(e))t.indexOf(r)<0&&n4.call(e,r)&&(n[r]=e[r]);return n};const Mie={size:"sm"},Nie=_.forwardRef((e,t)=>{const n=Cu(),r=ae(`${n.__staticSelector}CloseButton`,Mie,e),{className:o}=r,i=$ie(r,["className"]),{classes:s,cx:a}=Cie(null,n.stylesApi);return k.createElement(O0,Eie({className:a(s.close,o),ref:t,onClick:n.onClose},i))});var Tie=ue(()=>({overlay:{}}));const Iie=Tie;var jie=Object.defineProperty,Lie=Object.defineProperties,Die=Object.getOwnPropertyDescriptors,dM=Object.getOwnPropertySymbols,Rie=Object.prototype.hasOwnProperty,zie=Object.prototype.propertyIsEnumerable,fM=(e,t,n)=>t in e?jie(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Aie=(e,t)=>{for(var n in t||(t={}))Rie.call(t,n)&&fM(e,n,t[n]);if(dM)for(var n of dM(t))zie.call(t,n)&&fM(e,n,t[n]);return e},Bie=(e,t)=>Lie(e,Die(t)),Fie=ue((e,{color:t,opacity:n,blur:r,radius:o,gradient:i,fixed:s,zIndex:a})=>({root:Bie(Aie({},e.fn.cover(0)),{position:s?"fixed":"absolute",backgroundColor:i?void 0:e.fn.rgba(t,n),backgroundImage:i,backdropFilter:r?`blur(${M(r)})`:void 0,borderRadius:e.fn.radius(o),zIndex:a,"&[data-center]":{display:"flex",alignItems:"center",justifyContent:"center"}})}));const Vie=Fie;var Hie=Object.defineProperty,Fg=Object.getOwnPropertySymbols,r4=Object.prototype.hasOwnProperty,o4=Object.prototype.propertyIsEnumerable,pM=(e,t,n)=>t in e?Hie(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Wie=(e,t)=>{for(var n in t||(t={}))r4.call(t,n)&&pM(e,n,t[n]);if(Fg)for(var n of Fg(t))o4.call(t,n)&&pM(e,n,t[n]);return e},Uie=(e,t)=>{var n={};for(var r in e)r4.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Fg)for(var r of Fg(e))t.indexOf(r)<0&&o4.call(e,r)&&(n[r]=e[r]);return n};const Zie={opacity:.6,color:"#000",zIndex:ii("modal"),radius:0},i4=_.forwardRef((e,t)=>{const n=ae("Overlay",Zie,e),{variant:r,opacity:o,color:i,blur:s,gradient:a,zIndex:c,radius:u,children:f,className:p,classNames:g,styles:v,unstyled:y,center:w,fixed:P}=n,x=Uie(n,["variant","opacity","color","blur","gradient","zIndex","radius","children","className","classNames","styles","unstyled","center","fixed"]),{classes:S,cx:O}=Vie({color:i,opacity:o,blur:s,radius:u,gradient:a,fixed:P,zIndex:c},{name:"Overlay",classNames:g,styles:v,unstyled:y,variant:r});return k.createElement(Pe,Wie({ref:t,className:O(S.root,p),"data-center":w||void 0},x),f)});i4.displayName="@mantine/core/Overlay";const s4=i4;var Gie=Object.defineProperty,Yie=Object.defineProperties,Kie=Object.getOwnPropertyDescriptors,Vg=Object.getOwnPropertySymbols,a4=Object.prototype.hasOwnProperty,l4=Object.prototype.propertyIsEnumerable,hM=(e,t,n)=>t in e?Gie(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,sd=(e,t)=>{for(var n in t||(t={}))a4.call(t,n)&&hM(e,n,t[n]);if(Vg)for(var n of Vg(t))l4.call(t,n)&&hM(e,n,t[n]);return e},qie=(e,t)=>Yie(e,Kie(t)),Jie=(e,t)=>{var n={};for(var r in e)a4.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Vg)for(var r of Vg(e))t.indexOf(r)<0&&l4.call(e,r)&&(n[r]=e[r]);return n};const Xie={},Qie=_.forwardRef((e,t)=>{const n=Cu(),r=ae(`${n.__staticSelector}Overlay`,Xie,e),{onClick:o,transitionProps:i,style:s,className:a}=r,c=Jie(r,["onClick","transitionProps","style","className"]),{classes:u,cx:f}=Iie(null,n.stylesApi),p=g=>{o?.(g),n.closeOnClickOutside&&n.onClose()};return k.createElement(Os,qie(sd(sd({mounted:n.opened},n.transitionProps),i),{transition:"fade"}),g=>k.createElement(s4,sd({ref:t,onClick:p,fixed:!0,style:sd(sd({},s),g),className:f(u.overlay,a),zIndex:n.zIndex},c)))});var ese=ue((e,{zIndex:t})=>({inner:{position:"fixed",width:"100%",top:0,bottom:0,maxHeight:"100%",zIndex:t,pointerEvents:"none"},content:{pointerEvents:"all"}}));const tse=ese;var nse=Object.defineProperty,Hg=Object.getOwnPropertySymbols,c4=Object.prototype.hasOwnProperty,u4=Object.prototype.propertyIsEnumerable,mM=(e,t,n)=>t in e?nse(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,ad=(e,t)=>{for(var n in t||(t={}))c4.call(t,n)&&mM(e,n,t[n]);if(Hg)for(var n of Hg(t))u4.call(t,n)&&mM(e,n,t[n]);return e},rse=(e,t)=>{var n={};for(var r in e)c4.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Hg)for(var r of Hg(e))t.indexOf(r)<0&&u4.call(e,r)&&(n[r]=e[r]);return n};const ose={},ise=_.forwardRef((e,t)=>{const n=Cu(),r=ae(`${n.__staticSelector}Content`,ose,e),{className:o,transitionProps:i,style:s,onKeyDown:a}=r,c=rse(r,["className","transitionProps","style","onKeyDown"]),{classes:u,cx:f}=tse({zIndex:n.zIndex},n.stylesApi),p=g=>{var v;((v=g.target)==null?void 0:v.getAttribute("data-mantine-stop-propagation"))!=="true"&&g.key==="Escape"&&n.closeOnEscape&&n.onClose(),a?.(g)};return k.createElement(Os,ad(ad({mounted:n.opened,transition:"pop"},n.transitionProps),i),g=>k.createElement("div",{className:f(u.inner)},k.createElement(_P,{active:n.opened&&n.trapFocus},k.createElement(mre,ad({component:"section",role:"dialog",tabIndex:-1,"aria-modal":!0,"aria-describedby":n.bodyMounted?n.getBodyId():void 0,"aria-labelledby":n.titleMounted?n.getTitleId():void 0,onKeyDown:p,ref:t,className:f(u.content,o),style:ad(ad({},s),g),shadow:n.shadow},c),c.children))))});var sse=ue((e,{padding:t})=>{const n=re({size:t,sizes:e.spacing});return{header:{display:"flex",justifyContent:"space-between",alignItems:"center",padding:n,paddingRight:`calc(${n} - ${M(5)})`,position:"sticky",top:0,backgroundColor:e.colorScheme==="dark"?e.colors.dark[7]:e.white,zIndex:1e3}}});const ase=sse;var lse=Object.defineProperty,Wg=Object.getOwnPropertySymbols,d4=Object.prototype.hasOwnProperty,f4=Object.prototype.propertyIsEnumerable,gM=(e,t,n)=>t in e?lse(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,cse=(e,t)=>{for(var n in t||(t={}))d4.call(t,n)&&gM(e,n,t[n]);if(Wg)for(var n of Wg(t))f4.call(t,n)&&gM(e,n,t[n]);return e},use=(e,t)=>{var n={};for(var r in e)d4.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Wg)for(var r of Wg(e))t.indexOf(r)<0&&f4.call(e,r)&&(n[r]=e[r]);return n};const dse={},fse=_.forwardRef((e,t)=>{const n=Cu(),r=ae(`${n.__staticSelector}Header`,dse,e),{className:o}=r,i=use(r,["className"]),{classes:s,cx:a}=ase({padding:n.padding},n.stylesApi);return k.createElement(Pe,cse({ref:t,className:a(s.header,o)},i))});var pse=ue(e=>({title:{lineHeight:1,padding:0,margin:0,fontWeight:400,fontSize:e.fontSizes.md}}));const hse=pse;var mse=Object.defineProperty,Ug=Object.getOwnPropertySymbols,p4=Object.prototype.hasOwnProperty,h4=Object.prototype.propertyIsEnumerable,vM=(e,t,n)=>t in e?mse(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,gse=(e,t)=>{for(var n in t||(t={}))p4.call(t,n)&&vM(e,n,t[n]);if(Ug)for(var n of Ug(t))h4.call(t,n)&&vM(e,n,t[n]);return e},vse=(e,t)=>{var n={};for(var r in e)p4.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Ug)for(var r of Ug(e))t.indexOf(r)<0&&h4.call(e,r)&&(n[r]=e[r]);return n};const yse={},_se=_.forwardRef((e,t)=>{const n=Cu(),r=ae(`${n.__staticSelector}Title`,yse,e),{className:o}=r,i=vse(r,["className"]),{classes:s,cx:a}=hse(null,n.stylesApi);return _.useEffect(()=>(n.setTitleMounted(!0),()=>n.setTitleMounted(!1)),[]),k.createElement(Pe,gse({component:"h2",id:n.getTitleId(),className:a(s.title,o),ref:t},i))});var wse=ue((e,{padding:t})=>({body:{padding:re({size:t,sizes:e.spacing}),"&:not(:only-child)":{paddingTop:0}}}));const bse=wse;var xse=Object.defineProperty,Zg=Object.getOwnPropertySymbols,m4=Object.prototype.hasOwnProperty,g4=Object.prototype.propertyIsEnumerable,yM=(e,t,n)=>t in e?xse(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Sse=(e,t)=>{for(var n in t||(t={}))m4.call(t,n)&&yM(e,n,t[n]);if(Zg)for(var n of Zg(t))g4.call(t,n)&&yM(e,n,t[n]);return e},Pse=(e,t)=>{var n={};for(var r in e)m4.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Zg)for(var r of Zg(e))t.indexOf(r)<0&&g4.call(e,r)&&(n[r]=e[r]);return n};const Ose={},Cse=_.forwardRef((e,t)=>{const n=Cu(),r=ae(`${n.__staticSelector}Body`,Ose,e),{className:o}=r,i=Pse(r,["className"]),{classes:s,cx:a}=bse({padding:n.padding},n.stylesApi);return _.useEffect(()=>(n.setBodyMounted(!0),()=>n.setBodyMounted(!1)),[]),k.createElement(Pe,Sse({id:n.getBodyId(),className:a(s.body,o),ref:t},i))});function kse({children:e}){return k.createElement(k.Fragment,null,e)}function Ese({opened:e,transitionDuration:t}){const[n,r]=_.useState(e),o=_.useRef(),s=fS()?0:t;return _.useEffect(()=>(e?(r(!0),window.clearTimeout(o.current)):s===0?r(!1):o.current=window.setTimeout(()=>r(!1),s),()=>window.clearTimeout(o.current)),[e,s]),n}var $se=ue(()=>({root:{}}));const Mse=$se;var Nse=Object.defineProperty,Tse=Object.defineProperties,Ise=Object.getOwnPropertyDescriptors,Gg=Object.getOwnPropertySymbols,v4=Object.prototype.hasOwnProperty,y4=Object.prototype.propertyIsEnumerable,_M=(e,t,n)=>t in e?Nse(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,A_=(e,t)=>{for(var n in t||(t={}))v4.call(t,n)&&_M(e,n,t[n]);if(Gg)for(var n of Gg(t))y4.call(t,n)&&_M(e,n,t[n]);return e},wM=(e,t)=>Tse(e,Ise(t)),jse=(e,t)=>{var n={};for(var r in e)v4.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Gg)for(var r of Gg(e))t.indexOf(r)<0&&y4.call(e,r)&&(n[r]=e[r]);return n};const Hf={closeOnClickOutside:!0,withinPortal:!0,lockScroll:!0,trapFocus:!0,returnFocus:!0,closeOnEscape:!0,keepMounted:!1,zIndex:ii("modal"),padding:"md",size:"md",shadow:"xl"};function tt(e){const t=ae("ModalBase",Hf,e),{opened:n,onClose:r,children:o,closeOnClickOutside:i,__staticSelector:s,transitionProps:a,withinPortal:c,portalProps:u,keepMounted:f,target:p,zIndex:g,lockScroll:v,trapFocus:y,closeOnEscape:w,returnFocus:P,padding:x,shadow:S,id:O,size:E,variant:$,classNames:N,unstyled:I,styles:R,className:B}=t,z=jse(t,["opened","onClose","children","closeOnClickOutside","__staticSelector","transitionProps","withinPortal","portalProps","keepMounted","target","zIndex","lockScroll","trapFocus","closeOnEscape","returnFocus","padding","shadow","id","size","variant","classNames","unstyled","styles","className"]),{classes:G,cx:X}=Mse(null,{name:s,classNames:N,styles:R,unstyled:I,variant:$,size:E}),Q=$a(O),[V,H]=_.useState(!1),[Z,Y]=_.useState(!1),j=typeof a?.duration=="number"?a?.duration:200,U=Ese({opened:n,transitionDuration:j});return mm("keydown",F=>{!y&&F.key==="Escape"&&w&&r()}),A3({opened:n,shouldReturnFocus:y&&P}),k.createElement(Af,wM(A_({},u),{withinPortal:c,target:p}),k.createElement(Pie,{value:{__staticSelector:s,opened:n,onClose:r,closeOnClickOutside:i,transitionProps:wM(A_({},a),{duration:j,keepMounted:f}),zIndex:g,padding:x,id:Q,getTitleId:()=>`${Q}-title`,getBodyId:()=>`${Q}-body`,titleMounted:V,bodyMounted:Z,setTitleMounted:H,setBodyMounted:Y,trapFocus:y,closeOnEscape:w,shadow:S,stylesApi:{name:s,size:E,variant:$,classNames:N,styles:R,unstyled:I}}},k.createElement(DW,{enabled:U&&v},k.createElement(Pe,A_({className:X(G.root,B)},z),o))))}tt.CloseButton=Nie;tt.Overlay=Qie;tt.Content=ise;tt.Header=fse;tt.Title=_se;tt.Body=Cse;tt.NativeScrollArea=kse;var Lse=Object.defineProperty,Dse=Object.defineProperties,Rse=Object.getOwnPropertyDescriptors,Yg=Object.getOwnPropertySymbols,_4=Object.prototype.hasOwnProperty,w4=Object.prototype.propertyIsEnumerable,bM=(e,t,n)=>t in e?Lse(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Gh=(e,t)=>{for(var n in t||(t={}))_4.call(t,n)&&bM(e,n,t[n]);if(Yg)for(var n of Yg(t))w4.call(t,n)&&bM(e,n,t[n]);return e},b4=(e,t)=>Dse(e,Rse(t)),zse=(e,t)=>{var n={};for(var r in e)_4.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Yg)for(var r of Yg(e))t.indexOf(r)<0&&w4.call(e,r)&&(n[r]=e[r]);return n};const Ase={top:"slide-down",bottom:"slide-up",left:"slide-right",right:"slide-left"},Bse={top:"slide-down",bottom:"slide-up",right:"slide-right",left:"slide-left"},Fse=b4(Gh({},Hf),{position:"left"});function x4(e){const t=ae("DrawerRoot",Fse,e),{classNames:n,variant:r,size:o,scrollAreaComponent:i,position:s,transitionProps:a}=t,c=zse(t,["classNames","variant","size","scrollAreaComponent","position","transitionProps"]),{classes:u,cx:f,theme:p}=Sie({position:s},{name:"Drawer",variant:r,size:o}),g=(p.dir==="rtl"?Bse:Ase)[s];return k.createElement(wie,{value:{scrollAreaComponent:i}},k.createElement(tt,Gh({__staticSelector:"Drawer",size:o,variant:r,transitionProps:Gh({transition:g,duration:200},a),classNames:b4(Gh({},n),{content:f(u.content,n?.content),inner:f(u.inner,n?.inner)})},c)))}var Vse=Object.defineProperty,Kg=Object.getOwnPropertySymbols,S4=Object.prototype.hasOwnProperty,P4=Object.prototype.propertyIsEnumerable,xM=(e,t,n)=>t in e?Vse(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Hse=(e,t)=>{for(var n in t||(t={}))S4.call(t,n)&&xM(e,n,t[n]);if(Kg)for(var n of Kg(t))P4.call(t,n)&&xM(e,n,t[n]);return e},Wse=(e,t)=>{var n={};for(var r in e)S4.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Kg)for(var r of Kg(e))t.indexOf(r)<0&&P4.call(e,r)&&(n[r]=e[r]);return n};const Use={shadow:"xl"},O4=_.forwardRef((e,t)=>{const n=ae("ModalContent",Use,e),{children:r,scrollAreaComponent:o}=n,i=Wse(n,["children","scrollAreaComponent"]),s=bie(),a=o||s.scrollAreaComponent||tt.NativeScrollArea;return k.createElement(tt.Content,Hse({ref:t,radius:0},i),k.createElement(a,{style:{height:"100vh"}},r))});var Zse=Object.defineProperty,Gse=Object.defineProperties,Yse=Object.getOwnPropertyDescriptors,qg=Object.getOwnPropertySymbols,C4=Object.prototype.hasOwnProperty,k4=Object.prototype.propertyIsEnumerable,SM=(e,t,n)=>t in e?Zse(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Yh=(e,t)=>{for(var n in t||(t={}))C4.call(t,n)&&SM(e,n,t[n]);if(qg)for(var n of qg(t))k4.call(t,n)&&SM(e,n,t[n]);return e},Kse=(e,t)=>Gse(e,Yse(t)),qse=(e,t)=>{var n={};for(var r in e)C4.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&qg)for(var r of qg(e))t.indexOf(r)<0&&k4.call(e,r)&&(n[r]=e[r]);return n};const Jse=Kse(Yh({},Hf),{withOverlay:!0,withCloseButton:!0});function Cs(e){const t=ae("Drawer",Jse,e),{title:n,withOverlay:r,overlayProps:o,withCloseButton:i,closeButtonProps:s,children:a}=t,c=qse(t,["title","withOverlay","overlayProps","withCloseButton","closeButtonProps","children"]),u=!!n||i;return k.createElement(x4,Yh({},c),r&&k.createElement(tt.Overlay,Yh({},o)),k.createElement(O4,null,u&&k.createElement(tt.Header,null,n&&k.createElement(tt.Title,null,n),i&&k.createElement(tt.CloseButton,Yh({},s))),k.createElement(tt.Body,null,a)))}Cs.Root=x4;Cs.CloseButton=tt.CloseButton;Cs.Overlay=tt.Overlay;Cs.Content=O4;Cs.Header=tt.Header;Cs.Title=tt.Title;Cs.Body=tt.Body;Cs.NativeScrollArea=tt.NativeScrollArea;function Xse(e){return _.Children.toArray(e).filter(Boolean)}const Qse={left:"flex-start",center:"center",right:"flex-end",apart:"space-between"};var eae=ue((e,{spacing:t,position:n,noWrap:r,grow:o,align:i,count:s})=>({root:{boxSizing:"border-box",display:"flex",flexDirection:"row",alignItems:i||"center",flexWrap:r?"nowrap":"wrap",justifyContent:Qse[n],gap:re({size:t,sizes:e.spacing}),"& > *":{boxSizing:"border-box",maxWidth:o?`calc(${100/s}% - (${M(re({size:t,sizes:e.spacing}))} - ${re({size:t,sizes:e.spacing})} / ${s}))`:void 0,flexGrow:o?1:0}}}));const tae=eae;var nae=Object.defineProperty,Jg=Object.getOwnPropertySymbols,E4=Object.prototype.hasOwnProperty,$4=Object.prototype.propertyIsEnumerable,PM=(e,t,n)=>t in e?nae(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,rae=(e,t)=>{for(var n in t||(t={}))E4.call(t,n)&&PM(e,n,t[n]);if(Jg)for(var n of Jg(t))$4.call(t,n)&&PM(e,n,t[n]);return e},oae=(e,t)=>{var n={};for(var r in e)E4.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Jg)for(var r of Jg(e))t.indexOf(r)<0&&$4.call(e,r)&&(n[r]=e[r]);return n};const iae={position:"left",spacing:"md"},nt=_.forwardRef((e,t)=>{const n=ae("Group",iae,e),{className:r,position:o,align:i,children:s,noWrap:a,grow:c,spacing:u,unstyled:f,variant:p}=n,g=oae(n,["className","position","align","children","noWrap","grow","spacing","unstyled","variant"]),v=Xse(s),{classes:y,cx:w}=tae({align:i,grow:c,noWrap:a,spacing:u,position:o,count:v.length},{unstyled:f,name:"Group",variant:p});return k.createElement(Pe,rae({className:w(y.root,r),ref:t},g),v)});nt.displayName="@mantine/core/Group";function sae({open:e,close:t,openDelay:n,closeDelay:r}){const o=_.useRef(-1),i=_.useRef(-1),s=()=>{window.clearTimeout(o.current),window.clearTimeout(i.current)},a=()=>{s(),n===0?e():o.current=window.setTimeout(e,n)},c=()=>{s(),r===0?t():i.current=window.setTimeout(t,r)};return _.useEffect(()=>s,[]),{openDropdown:a,closeDropdown:c}}var aae=Object.defineProperty,Xg=Object.getOwnPropertySymbols,M4=Object.prototype.hasOwnProperty,N4=Object.prototype.propertyIsEnumerable,OM=(e,t,n)=>t in e?aae(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,CM=(e,t)=>{for(var n in t||(t={}))M4.call(t,n)&&OM(e,n,t[n]);if(Xg)for(var n of Xg(t))N4.call(t,n)&&OM(e,n,t[n]);return e},lae=(e,t)=>{var n={};for(var r in e)M4.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Xg)for(var r of Xg(e))t.indexOf(r)<0&&N4.call(e,r)&&(n[r]=e[r]);return n};function cae(e){const t=e,{width:n,height:r,style:o}=t,i=lae(t,["width","height","style"]);return k.createElement("svg",CM({viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:CM({width:n,height:r},o)},i),k.createElement("path",{d:"M2.5 1H12.5C13.3284 1 14 1.67157 14 2.5V12.5C14 13.3284 13.3284 14 12.5 14H2.5C1.67157 14 1 13.3284 1 12.5V2.5C1 1.67157 1.67157 1 2.5 1ZM2.5 2C2.22386 2 2 2.22386 2 2.5V8.3636L3.6818 6.6818C3.76809 6.59551 3.88572 6.54797 4.00774 6.55007C4.12975 6.55216 4.24568 6.60372 4.32895 6.69293L7.87355 10.4901L10.6818 7.6818C10.8575 7.50607 11.1425 7.50607 11.3182 7.6818L13 9.3636V2.5C13 2.22386 12.7761 2 12.5 2H2.5ZM2 12.5V9.6364L3.98887 7.64753L7.5311 11.4421L8.94113 13H2.5C2.22386 13 2 12.7761 2 12.5ZM12.5 13H10.155L8.48336 11.153L11 8.6364L13 10.6364V12.5C13 12.7761 12.7761 13 12.5 13ZM6.64922 5.5C6.64922 5.03013 7.03013 4.64922 7.5 4.64922C7.96987 4.64922 8.35078 5.03013 8.35078 5.5C8.35078 5.96987 7.96987 6.35078 7.5 6.35078C7.03013 6.35078 6.64922 5.96987 6.64922 5.5ZM7.5 3.74922C6.53307 3.74922 5.74922 4.53307 5.74922 5.5C5.74922 6.46693 6.53307 7.25078 7.5 7.25078C8.46693 7.25078 9.25078 6.46693 9.25078 5.5C9.25078 4.53307 8.46693 3.74922 7.5 3.74922Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"}))}var uae=Object.defineProperty,dae=Object.defineProperties,fae=Object.getOwnPropertyDescriptors,kM=Object.getOwnPropertySymbols,pae=Object.prototype.hasOwnProperty,hae=Object.prototype.propertyIsEnumerable,EM=(e,t,n)=>t in e?uae(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,$M=(e,t)=>{for(var n in t||(t={}))pae.call(t,n)&&EM(e,n,t[n]);if(kM)for(var n of kM(t))hae.call(t,n)&&EM(e,n,t[n]);return e},MM=(e,t)=>dae(e,fae(t)),mae=ue((e,{radius:t})=>({root:{},imageWrapper:{position:"relative"},figure:{margin:0},image:MM($M({},e.fn.fontStyles()),{display:"block",width:"100%",height:"100%",border:0,borderRadius:e.fn.radius(t)}),caption:{color:e.colorScheme==="dark"?e.colors.dark[2]:e.colors.gray[7],marginTop:e.spacing.xs},placeholder:MM($M({},e.fn.cover()),{display:"flex",alignItems:"center",justifyContent:"center",color:e.colorScheme==="dark"?e.colors.dark[2]:e.colors.gray[6],backgroundColor:e.colorScheme==="dark"?e.colors.dark[8]:e.colors.gray[0],borderRadius:e.fn.radius(t)})}));const gae=mae;var vae=Object.defineProperty,yae=Object.defineProperties,_ae=Object.getOwnPropertyDescriptors,Qg=Object.getOwnPropertySymbols,T4=Object.prototype.hasOwnProperty,I4=Object.prototype.propertyIsEnumerable,NM=(e,t,n)=>t in e?vae(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,ld=(e,t)=>{for(var n in t||(t={}))T4.call(t,n)&&NM(e,n,t[n]);if(Qg)for(var n of Qg(t))I4.call(t,n)&&NM(e,n,t[n]);return e},wae=(e,t)=>yae(e,_ae(t)),bae=(e,t)=>{var n={};for(var r in e)T4.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Qg)for(var r of Qg(e))t.indexOf(r)<0&&I4.call(e,r)&&(n[r]=e[r]);return n};const xae={fit:"cover",width:"100%",height:"auto",radius:0},ri=_.forwardRef((e,t)=>{const n=ae("Image",xae,e),{className:r,alt:o,src:i,fit:s,width:a,height:c,radius:u,imageProps:f,withPlaceholder:p,placeholder:g,imageRef:v,classNames:y,styles:w,caption:P,unstyled:x,style:S,variant:O}=n,E=bae(n,["className","alt","src","fit","width","height","radius","imageProps","withPlaceholder","placeholder","imageRef","classNames","styles","caption","unstyled","style","variant"]),{classes:$,cx:N}=gae({radius:u},{classNames:y,styles:w,unstyled:x,name:"Image",variant:O}),[I,R]=_.useState(!i),B=p&&I;return Fn(()=>{R(!i)},[i]),k.createElement(Pe,ld({className:N($.root,r),style:ld({width:M(a)},S),ref:t},E),k.createElement("figure",{className:$.figure},k.createElement("div",{className:$.imageWrapper},k.createElement("img",wae(ld({src:i,alt:o,ref:v},f),{className:N($.image,f?.className),onError:z=>{R(!0),typeof f?.onError=="function"&&f.onError(z)},style:ld(ld({objectFit:s,width:M(a),height:M(c)},B&&{overflow:"hidden"}),f?.style)})),B&&k.createElement("div",{className:$.placeholder,title:o},g||k.createElement("div",null,k.createElement(cae,{width:M(40),height:M(40)})))),!!P&&k.createElement(W,{component:"figcaption",size:"sm",align:"center",className:$.caption},P)))});ri.displayName="@mantine/core/Image";var Sae=Object.defineProperty,Pae=Object.defineProperties,Oae=Object.getOwnPropertyDescriptors,TM=Object.getOwnPropertySymbols,Cae=Object.prototype.hasOwnProperty,kae=Object.prototype.propertyIsEnumerable,IM=(e,t,n)=>t in e?Sae(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,jM=(e,t)=>{for(var n in t||(t={}))Cae.call(t,n)&&IM(e,n,t[n]);if(TM)for(var n of TM(t))kae.call(t,n)&&IM(e,n,t[n]);return e},LM=(e,t)=>Pae(e,Oae(t));const Eae=e=>SZ({from:{boxShadow:`0 0 ${M(.5)} 0 ${e}`,opacity:.6},to:{boxShadow:`0 0 ${M(.5)} ${M(4.4)} ${e}`,opacity:0}});function DM(e,t=0){const n={},[r,o]=e.split("-");let i="",s="";return r==="top"&&(n.top=t,s="-50%"),r==="middle"&&(n.top="50%",s="-50%"),r==="bottom"&&(n.bottom=t,s="50%"),o==="start"&&(n.left=t,i="-50%"),o==="center"&&(n.left="50%",i="-50%"),o==="end"&&(n.right=t,i="50%"),n.transform=`translate(${i}, ${s})`,n}var $ae=ue((e,{radius:t,color:n,position:r,offset:o,inline:i,withBorder:s,withLabel:a,zIndex:c},{size:u})=>{const{background:f}=e.fn.variant({variant:"filled",primaryFallback:!1,color:n||e.primaryColor}),p=M(u);return{root:{position:"relative",display:i?"inline-block":"block"},indicator:LM(jM({},DM(r,o)),{zIndex:c,position:"absolute",[a?"minWidth":"width"]:p,height:p,display:"flex",justifyContent:"center",alignItems:"center",fontSize:e.fontSizes.xs,paddingLeft:a?`calc(${e.spacing.xs} / 2)`:0,paddingRight:a?`calc(${e.spacing.xs} / 2)`:0,borderRadius:e.fn.radius(t),backgroundColor:e.fn.variant({variant:"filled",primaryFallback:!1,color:n||e.primaryColor}).background,border:s?`${M(2)} solid ${e.colorScheme==="dark"?e.colors.dark[7]:e.white}`:void 0,color:e.white,whiteSpace:"nowrap"}),processing:{animation:`${Eae(f)} 1000ms linear infinite`},common:LM(jM({},DM(r,o)),{position:"absolute",[a?"minWidth":"width"]:p,height:p,borderRadius:e.fn.radius(t)})}});const Mae=$ae;var Nae=Object.defineProperty,ev=Object.getOwnPropertySymbols,j4=Object.prototype.hasOwnProperty,L4=Object.prototype.propertyIsEnumerable,RM=(e,t,n)=>t in e?Nae(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Tae=(e,t)=>{for(var n in t||(t={}))j4.call(t,n)&&RM(e,n,t[n]);if(ev)for(var n of ev(t))L4.call(t,n)&&RM(e,n,t[n]);return e},Iae=(e,t)=>{var n={};for(var r in e)j4.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&ev)for(var r of ev(e))t.indexOf(r)<0&&L4.call(e,r)&&(n[r]=e[r]);return n};const jae={position:"top-end",offset:0,inline:!1,withBorder:!1,disabled:!1,processing:!1,size:10,radius:1e3,zIndex:ii("app")},D4=_.forwardRef((e,t)=>{const n=ae("Indicator",jae,e),{children:r,position:o,offset:i,size:s,radius:a,inline:c,withBorder:u,className:f,color:p,styles:g,label:v,classNames:y,disabled:w,zIndex:P,unstyled:x,processing:S,variant:O}=n,E=Iae(n,["children","position","offset","size","radius","inline","withBorder","className","color","styles","label","classNames","disabled","zIndex","unstyled","processing","variant"]),{classes:$,cx:N}=Mae({position:o,offset:i,radius:a,inline:c,color:p,withBorder:u,zIndex:P,withLabel:!!v},{name:"Indicator",classNames:y,styles:g,unstyled:x,variant:O,size:s});return k.createElement(Pe,Tae({ref:t,className:N($.root,f)},E),!w&&k.createElement(k.Fragment,null,k.createElement("div",{className:N($.indicator,$.common)},v),S&&k.createElement("div",{className:N($.processing,$.common)})),r)});D4.displayName="@mantine/core/Indicator";function Lae(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,i;for(i=0;i=0)&&(n[o]=e[o]);return n}var Dae=_.useLayoutEffect,Rae=function(t){var n=_.useRef(t);return Dae(function(){n.current=t}),n},zM=function(t,n){if(typeof t=="function"){t(n);return}t.current=n},zae=function(t,n){var r=_.useRef();return _.useCallback(function(o){t.current=o,r.current&&zM(r.current,null),r.current=n,n&&zM(n,o)},[n])},AM={"min-height":"0","max-height":"none",height:"0",visibility:"hidden",overflow:"hidden",position:"absolute","z-index":"-1000",top:"0",right:"0"},BM=function(t){Object.keys(AM).forEach(function(n){t.style.setProperty(n,AM[n],"important")})},eo=null,Aae=function(t,n){var r=t.scrollHeight;return n.sizingStyle.boxSizing==="border-box"?r+n.borderSize:r-n.paddingSize};function Bae(e,t,n,r){n===void 0&&(n=1),r===void 0&&(r=1/0),eo||(eo=document.createElement("textarea"),eo.setAttribute("tabindex","-1"),eo.setAttribute("aria-hidden","true"),BM(eo)),eo.parentNode===null&&document.body.appendChild(eo);var o=e.paddingSize,i=e.borderSize,s=e.sizingStyle,a=s.boxSizing;Object.keys(s).forEach(function(g){var v=g;eo.style[v]=s[v]}),BM(eo),eo.value=t;var c=Aae(eo,e);eo.value="x";var u=eo.scrollHeight-o,f=u*n;a==="border-box"&&(f=f+o+i),c=Math.max(f,c);var p=u*r;return a==="border-box"&&(p=p+o+i),c=Math.min(p,c),[c,u]}var FM=function(){},Fae=function(t,n){return t.reduce(function(r,o){return r[o]=n[o],r},{})},Vae=["borderBottomWidth","borderLeftWidth","borderRightWidth","borderTopWidth","boxSizing","fontFamily","fontSize","fontStyle","fontWeight","letterSpacing","lineHeight","paddingBottom","paddingLeft","paddingRight","paddingTop","tabSize","textIndent","textRendering","textTransform","width","wordBreak"],Hae=!!document.documentElement.currentStyle,Wae=function(t){var n=window.getComputedStyle(t);if(n===null)return null;var r=Fae(Vae,n),o=r.boxSizing;if(o==="")return null;Hae&&o==="border-box"&&(r.width=parseFloat(r.width)+parseFloat(r.borderRightWidth)+parseFloat(r.borderLeftWidth)+parseFloat(r.paddingRight)+parseFloat(r.paddingLeft)+"px");var i=parseFloat(r.paddingBottom)+parseFloat(r.paddingTop),s=parseFloat(r.borderBottomWidth)+parseFloat(r.borderTopWidth);return{sizingStyle:r,paddingSize:i,borderSize:s}},Uae=function(t){var n=Rae(t);_.useLayoutEffect(function(){var r=function(i){n.current(i)};return window.addEventListener("resize",r),function(){window.removeEventListener("resize",r)}},[])},Zae=function(t,n){var r=t.cacheMeasurements,o=t.maxRows,i=t.minRows,s=t.onChange,a=s===void 0?FM:s,c=t.onHeightChange,u=c===void 0?FM:c,f=Lae(t,["cacheMeasurements","maxRows","minRows","onChange","onHeightChange"]),p=f.value!==void 0,g=_.useRef(null),v=zae(g,n),y=_.useRef(0),w=_.useRef(),P=function(){var O=g.current,E=r&&w.current?w.current:Wae(O);if(E){w.current=E;var $=Bae(E,O.value||O.placeholder||"x",i,o),N=$[0],I=$[1];y.current!==N&&(y.current=N,O.style.setProperty("height",N+"px","important"),u(N,{rowHeight:I}))}},x=function(O){p||P(),a(O)};return _.useLayoutEffect(P),Uae(P),_.createElement("textarea",Lt({},f,{onChange:x,ref:v}))},Gae=_.forwardRef(Zae);const Yae=Gae;var Kae=ue(e=>({input:{paddingTop:e.spacing.xs,paddingBottom:e.spacing.xs}}));const qae=Kae;var Jae=Object.defineProperty,Xae=Object.defineProperties,Qae=Object.getOwnPropertyDescriptors,tv=Object.getOwnPropertySymbols,R4=Object.prototype.hasOwnProperty,z4=Object.prototype.propertyIsEnumerable,VM=(e,t,n)=>t in e?Jae(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,lc=(e,t)=>{for(var n in t||(t={}))R4.call(t,n)&&VM(e,n,t[n]);if(tv)for(var n of tv(t))z4.call(t,n)&&VM(e,n,t[n]);return e},B_=(e,t)=>Xae(e,Qae(t)),ele=(e,t)=>{var n={};for(var r in e)R4.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&tv)for(var r of tv(e))t.indexOf(r)<0&&z4.call(e,r)&&(n[r]=e[r]);return n};const tle={autosize:!1,size:"sm",__staticSelector:"Textarea"},A4=_.forwardRef((e,t)=>{const n=ae("Textarea",tle,e),{autosize:r,maxRows:o,minRows:i,label:s,error:a,description:c,id:u,className:f,required:p,style:g,wrapperProps:v,classNames:y,styles:w,size:P,__staticSelector:x,sx:S,errorProps:O,descriptionProps:E,labelProps:$,inputWrapperOrder:N,inputContainer:I,unstyled:R,withAsterisk:B,variant:z}=n,G=ele(n,["autosize","maxRows","minRows","label","error","description","id","className","required","style","wrapperProps","classNames","styles","size","__staticSelector","sx","errorProps","descriptionProps","labelProps","inputWrapperOrder","inputContainer","unstyled","withAsterisk","variant"]),X=$a(u),{classes:Q,cx:V}=qae(),{systemStyles:H,rest:Z}=Dl(G),Y=lc({required:p,ref:t,error:a,id:X,classNames:B_(lc({},y),{input:V(Q.input,y?.input)}),styles:w,__staticSelector:x,size:P,multiline:!0,unstyled:R,variant:z},Z);return k.createElement(et.Wrapper,lc(lc({label:s,error:a,id:X,description:c,required:p,style:g,className:f,classNames:y,styles:w,size:P,__staticSelector:x,sx:S,errorProps:O,labelProps:$,descriptionProps:E,inputContainer:I,inputWrapperOrder:N,unstyled:R,withAsterisk:B,variant:z},H),v),r?k.createElement(et,B_(lc({},Y),{component:Yae,maxRows:o,minRows:i})):k.createElement(et,B_(lc({},Y),{component:"textarea",rows:i})))});A4.displayName="@mantine/core/Textarea";var nle=Object.defineProperty,rle=Object.defineProperties,ole=Object.getOwnPropertyDescriptors,HM=Object.getOwnPropertySymbols,ile=Object.prototype.hasOwnProperty,sle=Object.prototype.propertyIsEnumerable,WM=(e,t,n)=>t in e?nle(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,ale=(e,t)=>{for(var n in t||(t={}))ile.call(t,n)&&WM(e,n,t[n]);if(HM)for(var n of HM(t))sle.call(t,n)&&WM(e,n,t[n]);return e},lle=(e,t)=>rle(e,ole(t)),cle=ue(e=>({root:lle(ale({},e.fn.cover()),{display:"flex",alignItems:"center",justifyContent:"center",overflow:"hidden"})}));const ule=cle;var dle=Object.defineProperty,fle=Object.defineProperties,ple=Object.getOwnPropertyDescriptors,nv=Object.getOwnPropertySymbols,B4=Object.prototype.hasOwnProperty,F4=Object.prototype.propertyIsEnumerable,UM=(e,t,n)=>t in e?dle(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,th=(e,t)=>{for(var n in t||(t={}))B4.call(t,n)&&UM(e,n,t[n]);if(nv)for(var n of nv(t))F4.call(t,n)&&UM(e,n,t[n]);return e},hle=(e,t)=>fle(e,ple(t)),mle=(e,t)=>{var n={};for(var r in e)B4.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&nv)for(var r of nv(e))t.indexOf(r)<0&&F4.call(e,r)&&(n[r]=e[r]);return n};const gle={overlayOpacity:.75,transitionDuration:0,radius:0,zIndex:ii("overlay")},Wf=_.forwardRef((e,t)=>{const n=ae("LoadingOverlay",gle,e),{className:r,visible:o,loaderProps:i,overlayOpacity:s,overlayColor:a,transitionDuration:c,exitTransitionDuration:u,zIndex:f,style:p,loader:g,radius:v,overlayBlur:y,unstyled:w,variant:P,keepMounted:x}=n,S=mle(n,["className","visible","loaderProps","overlayOpacity","overlayColor","transitionDuration","exitTransitionDuration","zIndex","style","loader","radius","overlayBlur","unstyled","variant","keepMounted"]),{classes:O,cx:E,theme:$}=ule(null,{name:"LoadingOverlay",unstyled:w,variant:P}),N=`calc(${f} + 1)`;return k.createElement(Os,{keepMounted:x,duration:c,exitDuration:u,mounted:o,transition:"fade"},I=>k.createElement(Pe,th({className:E(O.root,r),style:hle(th(th({},I),p),{zIndex:f}),ref:t},S),g?k.createElement("div",{style:{zIndex:N}},g):k.createElement(en,th({style:{zIndex:N}},i)),k.createElement(s4,{opacity:s,zIndex:f,radius:v,blur:y,unstyled:w,color:a||($.colorScheme==="dark"?$.colors.dark[5]:$.white)})))});Wf.displayName="@mantine/core/LoadingOverlay";const V4={context:"Menu component was not found in the tree",children:"Menu.Target component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported"},[vle,Uf]=bu(V4.context);var yle=ue(e=>({divider:{marginTop:M(4),marginBottom:M(4),borderTop:`${M(1)} solid ${e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[2]}`}}));const _le=yle;var wle=Object.defineProperty,rv=Object.getOwnPropertySymbols,H4=Object.prototype.hasOwnProperty,W4=Object.prototype.propertyIsEnumerable,ZM=(e,t,n)=>t in e?wle(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,ble=(e,t)=>{for(var n in t||(t={}))H4.call(t,n)&&ZM(e,n,t[n]);if(rv)for(var n of rv(t))W4.call(t,n)&&ZM(e,n,t[n]);return e},xle=(e,t)=>{var n={};for(var r in e)H4.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&rv)for(var r of rv(e))t.indexOf(r)<0&&W4.call(e,r)&&(n[r]=e[r]);return n};const Sle={},U4=_.forwardRef((e,t)=>{const n=ae("MenuDivider",Sle,e),{children:r,className:o}=n,i=xle(n,["children","className"]),{classNames:s,styles:a,unstyled:c,variant:u}=Uf(),{classes:f,cx:p}=_le(null,{name:"Menu",classNames:s,styles:a,unstyled:c,variant:u});return k.createElement(Pe,ble({className:p(f.divider,o),ref:t},i))});U4.displayName="@mantine/core/MenuDivider";var Ple=Object.defineProperty,ov=Object.getOwnPropertySymbols,Z4=Object.prototype.hasOwnProperty,G4=Object.prototype.propertyIsEnumerable,GM=(e,t,n)=>t in e?Ple(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Ole=(e,t)=>{for(var n in t||(t={}))Z4.call(t,n)&&GM(e,n,t[n]);if(ov)for(var n of ov(t))G4.call(t,n)&&GM(e,n,t[n]);return e},Cle=(e,t)=>{var n={};for(var r in e)Z4.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&ov)for(var r of ov(e))t.indexOf(r)<0&&G4.call(e,r)&&(n[r]=e[r]);return n};const kle={};function Y4(e){const t=ae("MenuDropdown",kle,e),{children:n,onMouseEnter:r,onMouseLeave:o}=t,i=Cle(t,["children","onMouseEnter","onMouseLeave"]),s=_.useRef(),a=Uf(),c=p=>{var g;(p.key==="ArrowUp"||p.key==="ArrowDown")&&(p.preventDefault(),(g=s.current.querySelectorAll("[data-menu-item]:not(:disabled)")[0])==null||g.focus())},u=is(r,()=>a.trigger==="hover"&&a.openDropdown()),f=is(o,()=>a.trigger==="hover"&&a.closeDropdown());return k.createElement(kn.Dropdown,Ole({onMouseEnter:u,onMouseLeave:f,role:"menu","aria-orientation":"vertical"},i),k.createElement("div",{tabIndex:-1,"data-menu-dropdown":!0,"data-autofocus":!0,onKeyDown:c,ref:s,style:{outline:0}},n))}Y4.displayName="@mantine/core/MenuDropdown";var Ele=Object.defineProperty,$le=Object.defineProperties,Mle=Object.getOwnPropertyDescriptors,YM=Object.getOwnPropertySymbols,Nle=Object.prototype.hasOwnProperty,Tle=Object.prototype.propertyIsEnumerable,KM=(e,t,n)=>t in e?Ele(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Ile=(e,t)=>{for(var n in t||(t={}))Nle.call(t,n)&&KM(e,n,t[n]);if(YM)for(var n of YM(t))Tle.call(t,n)&&KM(e,n,t[n]);return e},jle=(e,t)=>$le(e,Mle(t)),Lle=ue((e,{color:t,radius:n})=>({item:jle(Ile({},e.fn.fontStyles()),{WebkitTapHighlightColor:"transparent",fontSize:e.fontSizes.sm,border:0,backgroundColor:"transparent",outline:0,width:"100%",textAlign:"left",textDecoration:"none",boxSizing:"border-box",padding:`${e.spacing.xs} ${e.spacing.sm}`,cursor:"pointer",borderRadius:e.fn.radius(n),color:t?e.fn.variant({variant:"filled",primaryFallback:!1,color:t}).background:e.colorScheme==="dark"?e.colors.dark[0]:e.black,display:"flex",alignItems:"center","&:disabled":{color:e.colorScheme==="dark"?e.colors.dark[3]:e.colors.gray[5],pointerEvents:"none",userSelect:"none"},"&[data-hovered]":{backgroundColor:t?e.fn.variant({variant:"light",color:t}).background:e.colorScheme==="dark"?e.fn.rgba(e.colors.dark[3],.35):e.colors.gray[1]}}),itemLabel:{flex:1},itemIcon:{display:"flex",justifyContent:"center",alignItems:"center",marginRight:e.spacing.xs},itemRightSection:{}}));const Dle=Lle;var Rle=Object.defineProperty,zle=Object.defineProperties,Ale=Object.getOwnPropertyDescriptors,iv=Object.getOwnPropertySymbols,K4=Object.prototype.hasOwnProperty,q4=Object.prototype.propertyIsEnumerable,qM=(e,t,n)=>t in e?Rle(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Ble=(e,t)=>{for(var n in t||(t={}))K4.call(t,n)&&qM(e,n,t[n]);if(iv)for(var n of iv(t))q4.call(t,n)&&qM(e,n,t[n]);return e},Fle=(e,t)=>zle(e,Ale(t)),Vle=(e,t)=>{var n={};for(var r in e)K4.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&iv)for(var r of iv(e))t.indexOf(r)<0&&q4.call(e,r)&&(n[r]=e[r]);return n};const Hle={},J4=_.forwardRef((e,t)=>{const n=ae("MenuItem",Hle,e),{children:r,className:o,color:i,closeMenuOnClick:s,icon:a,rightSection:c}=n,u=Vle(n,["children","className","color","closeMenuOnClick","icon","rightSection"]),f=Uf(),{classes:p,cx:g,theme:v}=Dle({radius:f.radius,color:i},{name:"Menu",classNames:f.classNames,styles:f.styles,unstyled:f.unstyled,variant:f.variant}),y=_.useRef(),w=f.getItemIndex(y.current),P=u,x=is(P.onMouseLeave,()=>f.setHovered(-1)),S=is(P.onMouseEnter,()=>f.setHovered(f.getItemIndex(y.current))),O=is(P.onClick,()=>{typeof s=="boolean"?s&&f.closeDropdownImmediately():f.closeOnItemClick&&f.closeDropdownImmediately()}),E=is(P.onFocus,()=>f.setHovered(f.getItemIndex(y.current)));return k.createElement(Pe,Fle(Ble({component:"button",type:"button"},u),{tabIndex:-1,onFocus:E,className:g(p.item,o),ref:ws(y,t),role:"menuitem","data-menu-item":!0,"data-hovered":f.hovered===w?!0:void 0,onMouseEnter:S,onMouseLeave:x,onClick:O,onKeyDown:BW({siblingSelector:"[data-menu-item]",parentSelector:"[data-menu-dropdown]",activateOnFocus:!1,loop:f.loop,dir:v.dir,orientation:"vertical",onKeyDown:P.onKeydown})}),a&&k.createElement("div",{className:p.itemIcon},a),r&&k.createElement("div",{className:p.itemLabel},r),c&&k.createElement("div",{className:p.itemRightSection},c))});J4.displayName="@mantine/core/MenuItem";const Wle=J4;var Ule=ue(e=>({label:{color:e.colorScheme==="dark"?e.colors.dark[2]:e.colors.gray[6],fontWeight:500,fontSize:e.fontSizes.xs,padding:`calc(${e.spacing.xs} / 2) ${e.spacing.sm}`,cursor:"default"}}));const Zle=Ule;var Gle=Object.defineProperty,sv=Object.getOwnPropertySymbols,X4=Object.prototype.hasOwnProperty,Q4=Object.prototype.propertyIsEnumerable,JM=(e,t,n)=>t in e?Gle(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Yle=(e,t)=>{for(var n in t||(t={}))X4.call(t,n)&&JM(e,n,t[n]);if(sv)for(var n of sv(t))Q4.call(t,n)&&JM(e,n,t[n]);return e},Kle=(e,t)=>{var n={};for(var r in e)X4.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&sv)for(var r of sv(e))t.indexOf(r)<0&&Q4.call(e,r)&&(n[r]=e[r]);return n};const qle={},e6=_.forwardRef((e,t)=>{const n=ae("MenuLabel",qle,e),{children:r,className:o}=n,i=Kle(n,["children","className"]),{classNames:s,styles:a,unstyled:c,variant:u}=Uf(),{classes:f,cx:p}=Zle(null,{name:"Menu",classNames:s,styles:a,unstyled:c,variant:u});return k.createElement(W,Yle({className:p(f.label,o),ref:t},i),r)});e6.displayName="@mantine/core/MenuLabel";var Jle=Object.defineProperty,av=Object.getOwnPropertySymbols,t6=Object.prototype.hasOwnProperty,n6=Object.prototype.propertyIsEnumerable,XM=(e,t,n)=>t in e?Jle(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Xle=(e,t)=>{for(var n in t||(t={}))t6.call(t,n)&&XM(e,n,t[n]);if(av)for(var n of av(t))n6.call(t,n)&&XM(e,n,t[n]);return e},Qle=(e,t)=>{var n={};for(var r in e)t6.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&av)for(var r of av(e))t.indexOf(r)<0&&n6.call(e,r)&&(n[r]=e[r]);return n};const ece={refProp:"ref"},r6=_.forwardRef((e,t)=>{const n=ae("MenuTarget",ece,e),{children:r,refProp:o}=n,i=Qle(n,["children","refProp"]);if(!Nf(r))throw new Error(V4.children);const s=Uf(),a=is(r.props.onClick,()=>s.trigger==="click"&&s.toggleDropdown()),c=is(r.props.onMouseEnter,()=>s.trigger==="hover"&&s.openDropdown()),u=is(r.props.onMouseLeave,()=>s.trigger==="hover"&&s.closeDropdown());return k.createElement(kn.Target,Xle({refProp:o,popupType:"menu",ref:t},i),_.cloneElement(r,{onClick:a,onMouseEnter:c,onMouseLeave:u,"data-expanded":s.opened?!0:void 0}))});r6.displayName="@mantine/core/MenuTarget";var tce=ue({dropdown:{padding:M(4)}});const nce=tce;var rce=Object.defineProperty,oce=Object.defineProperties,ice=Object.getOwnPropertyDescriptors,lv=Object.getOwnPropertySymbols,o6=Object.prototype.hasOwnProperty,i6=Object.prototype.propertyIsEnumerable,QM=(e,t,n)=>t in e?rce(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,eN=(e,t)=>{for(var n in t||(t={}))o6.call(t,n)&&QM(e,n,t[n]);if(lv)for(var n of lv(t))i6.call(t,n)&&QM(e,n,t[n]);return e},tN=(e,t)=>oce(e,ice(t)),sce=(e,t)=>{var n={};for(var r in e)o6.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&lv)for(var r of lv(e))t.indexOf(r)<0&&i6.call(e,r)&&(n[r]=e[r]);return n};const ace={closeOnItemClick:!0,loop:!0,trigger:"click",openDelay:0,closeDelay:100};function It(e){const t=ae("Menu",ace,e),{children:n,onOpen:r,onClose:o,opened:i,defaultOpened:s,onChange:a,closeOnItemClick:c,loop:u,closeOnEscape:f,trigger:p,openDelay:g,closeDelay:v,classNames:y,styles:w,unstyled:P,radius:x,variant:S}=t,O=sce(t,["children","onOpen","onClose","opened","defaultOpened","onChange","closeOnItemClick","loop","closeOnEscape","trigger","openDelay","closeDelay","classNames","styles","unstyled","radius","variant"]),{classes:E,cx:$}=nce(),[N,{setHovered:I,resetHovered:R}]=UW(),[B,z]=go({value:i,defaultValue:s,finalValue:!1,onChange:a}),G=()=>{z(!1),B&&o?.()},X=()=>{z(!0),!B&&r?.()},Q=()=>B?G():X(),{openDropdown:V,closeDropdown:H}=sae({open:X,close:G,closeDelay:v,openDelay:g}),Z=Y=>FW("[data-menu-item]","[data-menu-dropdown]",Y);return Fn(()=>{R()},[B]),k.createElement(vle,{value:{opened:B,toggleDropdown:Q,getItemIndex:Z,hovered:N,setHovered:I,closeOnItemClick:c,closeDropdown:p==="click"?G:H,openDropdown:p==="click"?X:V,closeDropdownImmediately:G,loop:u,trigger:p,radius:x,classNames:y,styles:w,unstyled:P,variant:S}},k.createElement(kn,tN(eN({},O),{radius:x,opened:B,onChange:Q,defaultOpened:s,trapFocus:p==="click",closeOnEscape:f&&p==="click",__staticSelector:"Menu",classNames:tN(eN({},y),{dropdown:$(E.dropdown,y?.dropdown)}),styles:w,unstyled:P,variant:S}),n))}It.displayName="@mantine/core/Menu";It.Item=Wle;It.Label=e6;It.Dropdown=Y4;It.Target=r6;It.Divider=U4;const[lce,cce]=bu("Modal component was not found in tree"),uce={xs:M(320),sm:M(380),md:M(440),lg:M(620),xl:M(780)};var dce=ue((e,{yOffset:t,xOffset:n,centered:r,fullScreen:o},{size:i})=>({content:{flex:o?"0 0 100%":`0 0 ${re({size:i,sizes:uce})}`,maxWidth:"100%",maxHeight:o?void 0:`calc(100dvh - (${M(t)} * 2))`,height:o?"100vh":void 0,borderRadius:o?0:void 0,overflowY:"auto"},inner:{paddingTop:o?0:t,paddingBottom:o?0:t,paddingLeft:o?0:n,paddingRight:o?0:n,display:"flex",justifyContent:"center",alignItems:r?"center":"flex-start"}}));const fce=dce;var pce=Object.defineProperty,hce=Object.defineProperties,mce=Object.getOwnPropertyDescriptors,cv=Object.getOwnPropertySymbols,s6=Object.prototype.hasOwnProperty,a6=Object.prototype.propertyIsEnumerable,nN=(e,t,n)=>t in e?pce(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Qb=(e,t)=>{for(var n in t||(t={}))s6.call(t,n)&&nN(e,n,t[n]);if(cv)for(var n of cv(t))a6.call(t,n)&&nN(e,n,t[n]);return e},l6=(e,t)=>hce(e,mce(t)),gce=(e,t)=>{var n={};for(var r in e)s6.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&cv)for(var r of cv(e))t.indexOf(r)<0&&a6.call(e,r)&&(n[r]=e[r]);return n};const vce=l6(Qb({},Hf),{yOffset:"5dvh",xOffset:"5vw"});function c6(e){const t=ae("ModalRoot",vce,e),{classNames:n,variant:r,size:o,yOffset:i,xOffset:s,scrollAreaComponent:a,radius:c,centered:u,fullScreen:f}=t,p=gce(t,["classNames","variant","size","yOffset","xOffset","scrollAreaComponent","radius","centered","fullScreen"]),{classes:g,cx:v}=fce({yOffset:i,xOffset:s,centered:u,fullScreen:f},{name:"Modal",variant:r,size:o});return k.createElement(lce,{value:{yOffset:i,scrollAreaComponent:a,radius:c}},k.createElement(tt,Qb({__staticSelector:"Modal",size:o,variant:r,classNames:l6(Qb({},n),{content:v(g.content,n?.content),inner:v(g.inner,n?.inner)})},p)))}var yce=Object.defineProperty,uv=Object.getOwnPropertySymbols,u6=Object.prototype.hasOwnProperty,d6=Object.prototype.propertyIsEnumerable,rN=(e,t,n)=>t in e?yce(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,_ce=(e,t)=>{for(var n in t||(t={}))u6.call(t,n)&&rN(e,n,t[n]);if(uv)for(var n of uv(t))d6.call(t,n)&&rN(e,n,t[n]);return e},wce=(e,t)=>{var n={};for(var r in e)u6.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&uv)for(var r of uv(e))t.indexOf(r)<0&&d6.call(e,r)&&(n[r]=e[r]);return n};const bce={shadow:"xl"},f6=_.forwardRef((e,t)=>{const n=ae("ModalContent",bce,e),{children:r,scrollAreaComponent:o}=n,i=wce(n,["children","scrollAreaComponent"]),s=cce(),a=o||s.scrollAreaComponent||tt.NativeScrollArea;return k.createElement(tt.Content,_ce({ref:t,radius:s.radius},i),k.createElement(a,{style:{maxHeight:`calc(100dvh - (${M(s.yOffset)} * 2))`}},r))});var xce=Object.defineProperty,Sce=Object.defineProperties,Pce=Object.getOwnPropertyDescriptors,dv=Object.getOwnPropertySymbols,p6=Object.prototype.hasOwnProperty,h6=Object.prototype.propertyIsEnumerable,oN=(e,t,n)=>t in e?xce(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Kh=(e,t)=>{for(var n in t||(t={}))p6.call(t,n)&&oN(e,n,t[n]);if(dv)for(var n of dv(t))h6.call(t,n)&&oN(e,n,t[n]);return e},Oce=(e,t)=>Sce(e,Pce(t)),Cce=(e,t)=>{var n={};for(var r in e)p6.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&dv)for(var r of dv(e))t.indexOf(r)<0&&h6.call(e,r)&&(n[r]=e[r]);return n};const kce=Oce(Kh({},Hf),{transitionProps:{duration:200,transition:"pop"},withOverlay:!0,withCloseButton:!0});function zi(e){const t=ae("Modal",kce,e),{title:n,withOverlay:r,overlayProps:o,withCloseButton:i,closeButtonProps:s,children:a}=t,c=Cce(t,["title","withOverlay","overlayProps","withCloseButton","closeButtonProps","children"]),u=!!n||i;return k.createElement(c6,Kh({},c),r&&k.createElement(tt.Overlay,Kh({},o)),k.createElement(f6,null,u&&k.createElement(tt.Header,null,n&&k.createElement(tt.Title,null,n),i&&k.createElement(tt.CloseButton,Kh({},s))),k.createElement(tt.Body,null,a)))}zi.Root=c6;zi.CloseButton=tt.CloseButton;zi.Overlay=tt.Overlay;zi.Content=f6;zi.Header=tt.Header;zi.Title=tt.Title;zi.Body=tt.Body;zi.NativeScrollArea=tt.NativeScrollArea;const m6={xs:M(16),sm:M(22),md:M(26),lg:M(30),xl:M(36)},Ece={xs:M(10),sm:M(12),md:M(14),lg:M(16),xl:M(18)};var $ce=ue((e,{disabled:t,radius:n,readOnly:r},{size:o,variant:i})=>({defaultValue:{display:"flex",alignItems:"center",backgroundColor:t?e.colorScheme==="dark"?e.colors.dark[5]:e.colors.gray[3]:e.colorScheme==="dark"?e.colors.dark[7]:i==="filled"?e.white:e.colors.gray[1],color:t?e.colorScheme==="dark"?e.colors.dark[1]:e.colors.gray[7]:e.colorScheme==="dark"?e.colors.dark[0]:e.colors.gray[7],height:re({size:o,sizes:m6}),paddingLeft:`calc(${re({size:o,sizes:e.spacing})} / 1.5)`,paddingRight:t||r?re({size:o,sizes:e.spacing}):0,fontWeight:500,fontSize:re({size:o,sizes:Ece}),borderRadius:re({size:n,sizes:e.radius}),cursor:t?"not-allowed":"default",userSelect:"none",maxWidth:`calc(100% - ${M(10)})`},defaultValueRemove:{color:e.colorScheme==="dark"?e.colors.dark[0]:e.colors.gray[7],marginLeft:`calc(${re({size:o,sizes:e.spacing})} / 6)`},defaultValueLabel:{display:"block",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}}));const Mce=$ce;var Nce=Object.defineProperty,fv=Object.getOwnPropertySymbols,g6=Object.prototype.hasOwnProperty,v6=Object.prototype.propertyIsEnumerable,iN=(e,t,n)=>t in e?Nce(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Tce=(e,t)=>{for(var n in t||(t={}))g6.call(t,n)&&iN(e,n,t[n]);if(fv)for(var n of fv(t))v6.call(t,n)&&iN(e,n,t[n]);return e},Ice=(e,t)=>{var n={};for(var r in e)g6.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&fv)for(var r of fv(e))t.indexOf(r)<0&&v6.call(e,r)&&(n[r]=e[r]);return n};const jce={xs:16,sm:22,md:24,lg:26,xl:30};function y6(e){var t=e,{label:n,classNames:r,styles:o,className:i,onRemove:s,disabled:a,readOnly:c,size:u,radius:f="sm",variant:p,unstyled:g}=t,v=Ice(t,["label","classNames","styles","className","onRemove","disabled","readOnly","size","radius","variant","unstyled"]);const{classes:y,cx:w}=Mce({disabled:a,readOnly:c,radius:f},{name:"MultiSelect",classNames:r,styles:o,unstyled:g,size:u,variant:p});return k.createElement("div",Tce({className:w(y.defaultValue,i)},v),k.createElement("span",{className:y.defaultValueLabel},n),!a&&!c&&k.createElement(O0,{"aria-hidden":!0,onMouseDown:s,size:jce[u],radius:2,color:"blue",variant:"transparent",iconSize:"70%",className:y.defaultValueRemove,tabIndex:-1,unstyled:g}))}y6.displayName="@mantine/core/MultiSelect/DefaultValue";function Lce({data:e,searchable:t,limit:n,searchValue:r,filter:o,value:i,disableSelectedItemFiltering:s}){if(!t&&i.length===0)return e;if(!t){const c=[];for(let u=0;uf===e[u].value&&!e[u].disabled))&&c.push(e[u]);return c}const a=[];for(let c=0;cu===e[c].value&&!e[c].disabled),e[c])&&a.push(e[c]),!(a.length>=n));c+=1);return a}var Dce=Object.defineProperty,pv=Object.getOwnPropertySymbols,_6=Object.prototype.hasOwnProperty,w6=Object.prototype.propertyIsEnumerable,sN=(e,t,n)=>t in e?Dce(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,aN=(e,t)=>{for(var n in t||(t={}))_6.call(t,n)&&sN(e,n,t[n]);if(pv)for(var n of pv(t))w6.call(t,n)&&sN(e,n,t[n]);return e},Rce=(e,t)=>{var n={};for(var r in e)_6.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&pv)for(var r of pv(e))t.indexOf(r)<0&&w6.call(e,r)&&(n[r]=e[r]);return n};const zce={xs:M(14),sm:M(18),md:M(20),lg:M(24),xl:M(28)};function Ace(e){var t=e,{size:n,error:r,style:o}=t,i=Rce(t,["size","error","style"]);const s=ir(),a=re({size:n,sizes:zce});return k.createElement("svg",aN({viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:aN({color:r?s.colors.red[6]:s.colors.gray[6],width:a,height:a},o),"data-chevron":!0},i),k.createElement("path",{d:"M4.93179 5.43179C4.75605 5.60753 4.75605 5.89245 4.93179 6.06819C5.10753 6.24392 5.39245 6.24392 5.56819 6.06819L7.49999 4.13638L9.43179 6.06819C9.60753 6.24392 9.89245 6.24392 10.0682 6.06819C10.2439 5.89245 10.2439 5.60753 10.0682 5.43179L7.81819 3.18179C7.73379 3.0974 7.61933 3.04999 7.49999 3.04999C7.38064 3.04999 7.26618 3.0974 7.18179 3.18179L4.93179 5.43179ZM10.0682 9.56819C10.2439 9.39245 10.2439 9.10753 10.0682 8.93179C9.89245 8.75606 9.60753 8.75606 9.43179 8.93179L7.49999 10.8636L5.56819 8.93179C5.39245 8.75606 5.10753 8.75606 4.93179 8.93179C4.75605 9.10753 4.75605 9.39245 4.93179 9.56819L7.18179 11.8182C7.35753 11.9939 7.64245 11.9939 7.81819 11.8182L10.0682 9.56819Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"}))}var Bce=Object.defineProperty,Fce=Object.defineProperties,Vce=Object.getOwnPropertyDescriptors,lN=Object.getOwnPropertySymbols,Hce=Object.prototype.hasOwnProperty,Wce=Object.prototype.propertyIsEnumerable,cN=(e,t,n)=>t in e?Bce(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Uce=(e,t)=>{for(var n in t||(t={}))Hce.call(t,n)&&cN(e,n,t[n]);if(lN)for(var n of lN(t))Wce.call(t,n)&&cN(e,n,t[n]);return e},Zce=(e,t)=>Fce(e,Vce(t));function b6({shouldClear:e,clearButtonProps:t,onClear:n,size:r,error:o}){return e?k.createElement(O0,Zce(Uce({},t),{variant:"transparent",onClick:n,size:r,onMouseDown:i=>i.preventDefault()})):k.createElement(Ace,{error:o,size:r})}b6.displayName="@mantine/core/SelectRightSection";var Gce=Object.defineProperty,Yce=Object.defineProperties,Kce=Object.getOwnPropertyDescriptors,hv=Object.getOwnPropertySymbols,x6=Object.prototype.hasOwnProperty,S6=Object.prototype.propertyIsEnumerable,uN=(e,t,n)=>t in e?Gce(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,F_=(e,t)=>{for(var n in t||(t={}))x6.call(t,n)&&uN(e,n,t[n]);if(hv)for(var n of hv(t))S6.call(t,n)&&uN(e,n,t[n]);return e},dN=(e,t)=>Yce(e,Kce(t)),qce=(e,t)=>{var n={};for(var r in e)x6.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&hv)for(var r of hv(e))t.indexOf(r)<0&&S6.call(e,r)&&(n[r]=e[r]);return n};function P6(e){var t=e,{styles:n,rightSection:r,rightSectionWidth:o,theme:i}=t,s=qce(t,["styles","rightSection","rightSectionWidth","theme"]);if(r)return{rightSection:r,rightSectionWidth:o,styles:n};const a=typeof n=="function"?n(i):n;return{rightSection:!s.readOnly&&!(s.disabled&&s.shouldClear)&&k.createElement(b6,F_({},s)),styles:dN(F_({},a),{rightSection:dN(F_({},a?.rightSection),{pointerEvents:s.shouldClear?void 0:"none"})})}}var Jce=Object.defineProperty,Xce=Object.defineProperties,Qce=Object.getOwnPropertyDescriptors,fN=Object.getOwnPropertySymbols,eue=Object.prototype.hasOwnProperty,tue=Object.prototype.propertyIsEnumerable,pN=(e,t,n)=>t in e?Jce(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,nue=(e,t)=>{for(var n in t||(t={}))eue.call(t,n)&&pN(e,n,t[n]);if(fN)for(var n of fN(t))tue.call(t,n)&&pN(e,n,t[n]);return e},rue=(e,t)=>Xce(e,Qce(t)),oue=ue((e,{invalid:t},{size:n})=>({wrapper:{position:"relative","&:has(input:disabled)":{cursor:"not-allowed",pointerEvents:"none","& .mantine-MultiSelect-input":{backgroundColor:e.colorScheme==="dark"?e.colors.dark[6]:e.colors.gray[1],color:e.colors.dark[2],opacity:.6,"&::placeholder":{color:e.colors.dark[2]}},"& .mantine-MultiSelect-defaultValue":{backgroundColor:e.colorScheme==="dark"?e.colors.dark[5]:e.colors.gray[3],color:e.colorScheme==="dark"?e.colors.dark[1]:e.colors.gray[7]}}},values:{minHeight:`calc(${re({size:n,sizes:Dn})} - ${M(2)})`,display:"flex",alignItems:"center",flexWrap:"wrap",marginLeft:`calc(-${e.spacing.xs} / 2)`,boxSizing:"border-box","&[data-clearable]":{marginRight:re({size:n,sizes:Dn})}},value:{margin:`calc(${e.spacing.xs} / 2 - ${M(2)}) calc(${e.spacing.xs} / 2)`},searchInput:rue(nue({},e.fn.fontStyles()),{flex:1,minWidth:M(60),backgroundColor:"transparent",border:0,outline:0,fontSize:re({size:n,sizes:e.fontSizes}),padding:0,marginLeft:`calc(${e.spacing.xs} / 2)`,appearance:"none",color:"inherit",maxHeight:re({size:n,sizes:m6}),"&::placeholder":{opacity:1,color:t?e.colors.red[e.fn.primaryShade()]:e.colorScheme==="dark"?e.colors.dark[3]:e.colors.gray[5]},"&:disabled":{cursor:"not-allowed",pointerEvents:"none"}}),searchInputEmpty:{width:"100%"},searchInputInputHidden:{flex:0,width:0,minWidth:0,margin:0,overflow:"hidden"},searchInputPointer:{cursor:"pointer","&:disabled":{cursor:"not-allowed",pointerEvents:"none"}},input:{cursor:"pointer","&:disabled":{cursor:"not-allowed",pointerEvents:"none"}}}));const iue=oue;var sue=Object.defineProperty,aue=Object.defineProperties,lue=Object.getOwnPropertyDescriptors,mv=Object.getOwnPropertySymbols,O6=Object.prototype.hasOwnProperty,C6=Object.prototype.propertyIsEnumerable,hN=(e,t,n)=>t in e?sue(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,cc=(e,t)=>{for(var n in t||(t={}))O6.call(t,n)&&hN(e,n,t[n]);if(mv)for(var n of mv(t))C6.call(t,n)&&hN(e,n,t[n]);return e},mN=(e,t)=>aue(e,lue(t)),cue=(e,t)=>{var n={};for(var r in e)O6.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&mv)for(var r of mv(e))t.indexOf(r)<0&&C6.call(e,r)&&(n[r]=e[r]);return n};function uue(e,t,n){return t?!1:n.label.toLowerCase().trim().includes(e.toLowerCase().trim())}function due(e,t){return!!e&&!t.some(n=>n.value.toLowerCase()===e.toLowerCase())}function gN(e,t){if(!Array.isArray(e))return;if(t.length===0)return[];const n=t.map(r=>typeof r=="object"?r.value:r);return e.filter(r=>n.includes(r))}const fue={size:"sm",valueComponent:y6,itemComponent:iP,transitionProps:{transition:"fade",duration:0},maxDropdownHeight:220,shadow:"sm",searchable:!1,filter:uue,limit:1/0,clearSearchOnChange:!0,clearable:!1,clearSearchOnBlur:!1,disabled:!1,initiallyOpened:!1,creatable:!1,shouldCreate:due,switchDirectionOnFlip:!1,zIndex:ii("popover"),selectOnBlur:!1,positionDependencies:[],dropdownPosition:"flip"},NP=_.forwardRef((e,t)=>{const n=ae("MultiSelect",fue,e),{className:r,style:o,required:i,label:s,description:a,size:c,error:u,classNames:f,styles:p,wrapperProps:g,value:v,defaultValue:y,data:w,onChange:P,valueComponent:x,itemComponent:S,id:O,transitionProps:E,maxDropdownHeight:$,shadow:N,nothingFound:I,onFocus:R,onBlur:B,searchable:z,placeholder:G,filter:X,limit:Q,clearSearchOnChange:V,clearable:H,clearSearchOnBlur:Z,variant:Y,onSearchChange:j,searchValue:U,disabled:F,initiallyOpened:K,radius:ee,icon:fe,rightSection:ie,rightSectionWidth:J,creatable:ne,getCreateLabel:le,shouldCreate:_e,onCreate:Ne,sx:we,dropdownComponent:He,onDropdownClose:Te,onDropdownOpen:je,maxSelectedValues:it,withinPortal:bt,portalProps:_n,switchDirectionOnFlip:pt,zIndex:Tn,selectOnBlur:kr,name:lt,dropdownPosition:Zn,errorProps:Jt,labelProps:ht,descriptionProps:xo,form:Yr,positionDependencies:ar,onKeyDown:Kr,unstyled:Bt,inputContainer:qr,inputWrapperOrder:fn,readOnly:wn,withAsterisk:Er,clearButtonProps:gt,hoverOnSearchChange:be,disableSelectedItemFiltering:De}=n,Jr=cue(n,["className","style","required","label","description","size","error","classNames","styles","wrapperProps","value","defaultValue","data","onChange","valueComponent","itemComponent","id","transitionProps","maxDropdownHeight","shadow","nothingFound","onFocus","onBlur","searchable","placeholder","filter","limit","clearSearchOnChange","clearable","clearSearchOnBlur","variant","onSearchChange","searchValue","disabled","initiallyOpened","radius","icon","rightSection","rightSectionWidth","creatable","getCreateLabel","shouldCreate","onCreate","sx","dropdownComponent","onDropdownClose","onDropdownOpen","maxSelectedValues","withinPortal","portalProps","switchDirectionOnFlip","zIndex","selectOnBlur","name","dropdownPosition","errorProps","labelProps","descriptionProps","form","positionDependencies","onKeyDown","unstyled","inputContainer","inputWrapperOrder","readOnly","withAsterisk","clearButtonProps","hoverOnSearchChange","disableSelectedItemFiltering"]),{classes:Rt,cx:Zt,theme:$r}=iue({invalid:!!u},{name:"MultiSelect",classNames:f,styles:p,unstyled:Bt,size:c,variant:Y}),{systemStyles:xt,rest:tn}=Dl(Jr),Gn=_.useRef(),Aa=_.useRef({}),Yn=$a(O),[bn,Ft]=_.useState(K),[Gt,Xr]=_.useState(-1),[So,lr]=_.useState("column"),[cr,Hi]=go({value:U,defaultValue:"",finalValue:void 0,onChange:j}),[Es,ur]=_.useState(!1),{scrollIntoView:Oe,targetRef:Ba,scrollableRef:Yl}=Z3({duration:0,offset:5,cancelable:!1,isList:!0}),Fa=ne&&typeof le=="function";let Se=null;const ct=w.map(Ie=>typeof Ie=="string"?{label:Ie,value:Ie}:Ie),nn=p3({data:ct}),[ze,Wi]=go({value:gN(v,w),defaultValue:gN(y,w),finalValue:[],onChange:P}),Qr=_.useRef(!!it&&it{if(!wn){const vt=ze.filter(xn=>xn!==Ie);Wi(vt),it&&vt.length{Hi(Ie.currentTarget.value),!F&&!Qr.current&&z&&Ft(!0)},b1=Ie=>{typeof R=="function"&&R(Ie),!F&&!Qr.current&&z&&Ft(!0)},rn=Lce({data:nn,searchable:z,searchValue:cr,limit:Q,filter:X,value:ze,disableSelectedItemFiltering:De});Fa&&_e(cr,nn)&&(Se=le(cr),rn.push({label:cr,value:cr,creatable:!0}));const Ui=Math.min(Gt,rn.length-1),Va=(Ie,vt,xn)=>{let Fe=Ie;for(;xn(Fe);)if(Fe=vt(Fe),!rn[Fe].disabled)return Fe;return Ie};Fn(()=>{Xr(be&&cr?0:-1)},[cr,be]),Fn(()=>{!F&&ze.length>w.length&&Ft(!1),it&&ze.length=it&&(Qr.current=!0,Ft(!1))},[ze]);const Kl=Ie=>{if(!wn)if(V&&Hi(""),ze.includes(Ie.value))tp(Ie.value);else{if(Ie.creatable&&typeof Ne=="function"){const vt=Ne(Ie.value);typeof vt<"u"&&vt!==null&&Wi(typeof vt=="string"?[...ze,vt]:[...ze,vt.value])}else Wi([...ze,Ie.value]);ze.length===it-1&&(Qr.current=!0,Ft(!1)),rn.length===1&&Ft(!1)}},x1=Ie=>{typeof B=="function"&&B(Ie),kr&&rn[Ui]&&bn&&Kl(rn[Ui]),Z&&Hi(""),Ft(!1)},S1=Ie=>{if(Es||(Kr?.(Ie),wn)||Ie.key!=="Backspace"&&it&&Qr.current)return;const vt=So==="column",xn=()=>{Xr(ut=>{var Mr;const Po=Va(ut,Nr=>Nr+1,Nr=>Nr{Xr(ut=>{var Mr;const Po=Va(ut,Nr=>Nr-1,Nr=>Nr>0);return bn&&(Ba.current=Aa.current[(Mr=rn[Po])==null?void 0:Mr.value],Oe({alignment:vt?"start":"end"})),Po})};switch(Ie.key){case"ArrowUp":{Ie.preventDefault(),Ft(!0),vt?Fe():xn();break}case"ArrowDown":{Ie.preventDefault(),Ft(!0),vt?xn():Fe();break}case"Enter":{Ie.preventDefault(),rn[Ui]&&bn?Kl(rn[Ui]):Ft(!0);break}case" ":{z||(Ie.preventDefault(),rn[Ui]&&bn?Kl(rn[Ui]):Ft(!0));break}case"Backspace":{ze.length>0&&cr.length===0&&(Wi(ze.slice(0,-1)),Ft(!0),it&&(Qr.current=!1));break}case"Home":{if(!z){Ie.preventDefault(),bn||Ft(!0);const ut=rn.findIndex(Mr=>!Mr.disabled);Xr(ut),Oe({alignment:vt?"end":"start"})}break}case"End":{if(!z){Ie.preventDefault(),bn||Ft(!0);const ut=rn.map(Mr=>!!Mr.disabled).lastIndexOf(!1);Xr(ut),Oe({alignment:vt?"end":"start"})}break}case"Escape":Ft(!1)}},P1=ze.map(Ie=>{let vt=nn.find(xn=>xn.value===Ie&&!xn.disabled);return!vt&&Fa&&(vt={value:Ie,label:Ie}),vt}).filter(Ie=>!!Ie).map((Ie,vt)=>k.createElement(x,mN(cc({},Ie),{variant:Y,disabled:F,className:Rt.value,readOnly:wn,onRemove:xn=>{xn.preventDefault(),xn.stopPropagation(),tp(Ie.value)},key:Ie.value,size:c,styles:p,classNames:f,radius:ee,index:vt}))),O1=Ie=>ze.includes(Ie),Lu=()=>{var Ie;Hi(""),Wi([]),(Ie=Gn.current)==null||Ie.focus(),it&&(Qr.current=!1)},si=!wn&&(rn.length>0?bn:bn&&!!I);return Fn(()=>{const Ie=si?je:Te;typeof Ie=="function"&&Ie()},[si]),k.createElement(et.Wrapper,cc(cc({required:i,id:Yn,label:s,error:u,description:a,size:c,className:r,style:o,classNames:f,styles:p,__staticSelector:"MultiSelect",sx:we,errorProps:Jt,descriptionProps:xo,labelProps:ht,inputContainer:qr,inputWrapperOrder:fn,unstyled:Bt,withAsterisk:Er,variant:Y},xt),g),k.createElement(ha,{opened:si,transitionProps:E,shadow:"sm",withinPortal:bt,portalProps:_n,__staticSelector:"MultiSelect",onDirectionChange:lr,switchDirectionOnFlip:pt,zIndex:Tn,dropdownPosition:Zn,positionDependencies:[...ar,cr],classNames:f,styles:p,unstyled:Bt,variant:Y},k.createElement(ha.Target,null,k.createElement("div",{className:Rt.wrapper,role:"combobox","aria-haspopup":"listbox","aria-owns":bn&&si?`${Yn}-items`:null,"aria-controls":Yn,"aria-expanded":bn,onMouseLeave:()=>Xr(-1),tabIndex:-1},k.createElement("input",{type:"hidden",name:lt,value:ze.join(","),form:Yr,disabled:F}),k.createElement(et,cc({__staticSelector:"MultiSelect",style:{overflow:"hidden"},component:"div",multiline:!0,size:c,variant:Y,disabled:F,error:u,required:i,radius:ee,icon:fe,unstyled:Bt,onMouseDown:Ie=>{var vt;Ie.preventDefault(),!F&&!Qr.current&&Ft(!bn),(vt=Gn.current)==null||vt.focus()},classNames:mN(cc({},f),{input:Zt({[Rt.input]:!z},f?.input)})},P6({theme:$r,rightSection:ie,rightSectionWidth:J,styles:p,size:c,shouldClear:H&&ze.length>0,onClear:Lu,error:u,disabled:F,clearButtonProps:gt,readOnly:wn})),k.createElement("div",{className:Rt.values,"data-clearable":H||void 0},P1,k.createElement("input",cc({ref:ws(t,Gn),type:"search",id:Yn,className:Zt(Rt.searchInput,{[Rt.searchInputPointer]:!z,[Rt.searchInputInputHidden]:!bn&&ze.length>0||!z&&ze.length>0,[Rt.searchInputEmpty]:ze.length===0}),onKeyDown:S1,value:cr,onChange:w1,onFocus:b1,onBlur:x1,readOnly:!z||Qr.current||wn,placeholder:ze.length===0?G:void 0,disabled:F,"data-mantine-stop-propagation":bn,autoComplete:"off",onCompositionStart:()=>ur(!0),onCompositionEnd:()=>ur(!1)},tn)))))),k.createElement(ha.Dropdown,{component:He||$0,maxHeight:$,direction:So,id:Yn,innerRef:Yl,__staticSelector:"MultiSelect",classNames:f,styles:p},k.createElement(oP,{data:rn,hovered:Ui,classNames:f,styles:p,uuid:Yn,__staticSelector:"MultiSelect",onItemHover:Xr,onItemSelect:Kl,itemsRefs:Aa,itemComponent:S,size:c,nothingFound:I,isItemSelected:O1,creatable:ne&&!!Se,createLabel:Se,unstyled:Bt,variant:Y}))))});NP.displayName="@mantine/core/MultiSelect";const pue=(e,t,n)=>Number.isInteger(e)&&e>=0&&t===0?"numeric":!Number.isInteger(e)&&e>=0&&t!==0?"decimal":Number.isInteger(e)&&e<0&&t===0||!Number.isInteger(e)&&e<0&&t!==0?n==="ios"?"text":"decimal":"numeric";function vN({direction:e,size:t}){return k.createElement("svg",{style:{width:M(t),height:M(t),transform:e==="up"?"rotate(180deg)":void 0},viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},k.createElement("path",{d:"M3.13523 6.15803C3.3241 5.95657 3.64052 5.94637 3.84197 6.13523L7.5 9.56464L11.158 6.13523C11.3595 5.94637 11.6759 5.95657 11.8648 6.15803C12.0536 6.35949 12.0434 6.67591 11.842 6.86477L7.84197 10.6148C7.64964 10.7951 7.35036 10.7951 7.15803 10.6148L3.15803 6.86477C2.95657 6.67591 2.94637 6.35949 3.13523 6.15803Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"}))}const k6={xs:M(20),sm:M(24),md:M(30),lg:M(34),xl:M(36)};var hue=ue((e,{radius:t},{size:n})=>({rightSection:{display:"flex",flexDirection:"column",height:`calc(100% - ${M(2)})`,margin:M(1),overflow:"hidden",borderTopRightRadius:e.fn.radius(t),borderBottomRightRadius:e.fn.radius(t)},control:{margin:0,position:"relative",flex:"0 0 50%",display:"flex",alignItems:"center",justifyContent:"center",boxSizing:"border-box",width:re({size:n,sizes:k6}),padding:0,WebkitTapHighlightColor:"transparent",borderBottom:`${M(1)} solid ${e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[4]}`,borderLeft:`${M(1)} solid ${e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[4]}`,borderTop:0,borderRight:0,backgroundColor:"transparent",marginRight:M(1),color:e.colorScheme==="dark"?e.colors.dark[0]:e.black,"&:not(:disabled):hover":{backgroundColor:e.colorScheme==="dark"?e.colors.dark[5]:e.colors.gray[0]},"&:disabled":{color:e.colorScheme==="dark"?e.colors.dark[3]:e.colors.gray[4]}},controlUp:{},controlDown:{borderBottom:0}}));const mue=hue;var gue=Object.defineProperty,vue=Object.defineProperties,yue=Object.getOwnPropertyDescriptors,gv=Object.getOwnPropertySymbols,E6=Object.prototype.hasOwnProperty,$6=Object.prototype.propertyIsEnumerable,yN=(e,t,n)=>t in e?gue(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,V_=(e,t)=>{for(var n in t||(t={}))E6.call(t,n)&&yN(e,n,t[n]);if(gv)for(var n of gv(t))$6.call(t,n)&&yN(e,n,t[n]);return e},_ue=(e,t)=>vue(e,yue(t)),wue=(e,t)=>{var n={};for(var r in e)E6.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&gv)for(var r of gv(e))t.indexOf(r)<0&&$6.call(e,r)&&(n[r]=e[r]);return n};const bue={type:"text",size:"sm",__staticSelector:"TextInput"},yn=_.forwardRef((e,t)=>{const n=bP("TextInput",bue,e),{inputProps:r,wrapperProps:o}=n,i=wue(n,["inputProps","wrapperProps"]);return k.createElement(et.Wrapper,V_({},o),k.createElement(et,_ue(V_(V_({},r),i),{ref:t})))});yn.displayName="@mantine/core/TextInput";var xue=Object.defineProperty,Sue=Object.defineProperties,Pue=Object.getOwnPropertyDescriptors,vv=Object.getOwnPropertySymbols,M6=Object.prototype.hasOwnProperty,N6=Object.prototype.propertyIsEnumerable,_N=(e,t,n)=>t in e?xue(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Oue=(e,t)=>{for(var n in t||(t={}))M6.call(t,n)&&_N(e,n,t[n]);if(vv)for(var n of vv(t))N6.call(t,n)&&_N(e,n,t[n]);return e},Cue=(e,t)=>Sue(e,Pue(t)),kue=(e,t)=>{var n={};for(var r in e)M6.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&vv)for(var r of vv(e))t.indexOf(r)<0&&N6.call(e,r)&&(n[r]=e[r]);return n};const Eue=e=>e||"",$ue=e=>{if(e==="-")return e;let t=e;t[0]==="."&&(t=`0${e}`);const n=parseFloat(t);return Number.isNaN(n)?"":e},wN={xs:M(10),sm:M(14),md:M(16),lg:M(18),xl:M(20)},Mue={step:1,hideControls:!1,size:"sm",precision:0,noClampOnBlur:!1,removeTrailingZeros:!1,decimalSeparator:".",formatter:Eue,parser:$ue,type:"text"},ma=_.forwardRef((e,t)=>{const n=ae("NumberInput",Mue,e),{readOnly:r,disabled:o,value:i,onChange:s,decimalSeparator:a,thousandsSeparator:c,min:u,max:f,startValue:p,step:g,stepHoldInterval:v,stepHoldDelay:y,onFocus:w,onBlur:P,onKeyDown:x,onKeyUp:S,hideControls:O,radius:E,variant:$,precision:N,removeTrailingZeros:I,defaultValue:R,noClampOnBlur:B,handlersRef:z,classNames:G,styles:X,size:Q,rightSection:V,rightSectionWidth:H,formatter:Z,parser:Y,inputMode:j,unstyled:U,type:F}=n,K=kue(n,["readOnly","disabled","value","onChange","decimalSeparator","thousandsSeparator","min","max","startValue","step","stepHoldInterval","stepHoldDelay","onFocus","onBlur","onKeyDown","onKeyUp","hideControls","radius","variant","precision","removeTrailingZeros","defaultValue","noClampOnBlur","handlersRef","classNames","styles","size","rightSection","rightSectionWidth","formatter","parser","inputMode","unstyled","type"]),{classes:ee,cx:fe}=mue({radius:E},{classNames:G,styles:X,unstyled:U,name:"NumberInput",variant:$,size:Q}),ie=be=>{if(be==="")return"";let De=be.toFixed(N);return I&&N>0&&(De=De.replace(new RegExp(`[0]{0,${N}}$`),""),De.endsWith(".")&&(De=De.slice(0,-1))),De},J=be=>{let De=be;return a&&(De=De.replace(".",a)),Z(De)},ne=be=>{let De=be;return a&&(De=De.replaceAll(c,"").replace(a,".")),Y(De)},le=be=>J(ie(be)),[_e,Ne]=_.useState(typeof i=="number"?i:typeof R=="number"?R:""),[we,He]=_.useState(()=>le(_e)),Te=_.useRef(),[je,it]=_.useState(!1),bt=(be,De)=>{if(!je||De){const Jr=le(be);Jr!==we&&He(Jr)}be!==_e&&Ne(be)},_n=typeof u=="number"?u:-1/0,pt=typeof f=="number"?f:1/0,Tn=_.useRef();Tn.current=()=>{var be;let De;_e===""?De=(be=p??u)!=null?be:0:De=parseFloat(ie(ia(_e+g,_n,pt))),bt(De,!0),s?.(De)};const kr=_.useRef();kr.current=()=>{var be;let De;_e===""?De=(be=p??u)!=null?be:0:De=parseFloat(ie(ia(_e-g,_n,pt))),bt(De,!0),s?.(De)},H3(z,{increment:Tn.current,decrement:kr.current}),_.useEffect(()=>{je||bt(i===void 0?_e:i,!0)},[i,je]);const lt=y!==void 0&&v!==void 0,Zn=_.useRef(null),Jt=_.useRef(0),ht=()=>{Zn.current&&window.clearTimeout(Zn.current),Zn.current=null,Jt.current=0},xo=be=>{be?Tn.current():kr.current(),Jt.current+=1},Yr=be=>{if(xo(be),lt){const De=typeof v=="number"?v:v(Jt.current);Zn.current=window.setTimeout(()=>Yr(be),De)}},ar=(be,De)=>{be.preventDefault(),Te.current.focus(),xo(De),lt&&(Zn.current=window.setTimeout(()=>Yr(De),y))};_.useEffect(()=>(ht(),ht),[]);const Kr=k.createElement("div",{className:ee.rightSection},k.createElement("button",{type:"button",tabIndex:-1,"aria-hidden":!0,disabled:_e>=f,className:fe(ee.control,ee.controlUp),onPointerDown:be=>{ar(be,!0)},onPointerUp:ht,onPointerLeave:ht},k.createElement(vN,{size:re({size:Q,sizes:wN}),direction:"up"})),k.createElement("button",{type:"button",tabIndex:-1,"aria-hidden":!0,disabled:_e<=u,className:fe(ee.control,ee.controlDown),onPointerDown:be=>{ar(be,!1)},onPointerUp:ht,onPointerLeave:ht},k.createElement(vN,{size:re({size:Q,sizes:wN}),direction:"down"}))),Bt=be=>{let De=be;(De[0]===`${a}`||De[0]===".")&&(De=`0${De}`);const Jr=parseFloat(ie(parseFloat(ne(De)))),Rt=B?Jr:ia(Jr,_n,pt),Zt=Number.isNaN(Rt)?"":Rt,$r=_e!==Zt;He(be),bt(Zt),$r&&s?.(Zt)},qr=be=>{be.nativeEvent.isComposing||Bt(be.target.value)},fn=be=>{it(!0),w?.(be)},wn=be=>{it(!1),P?.(be)},Er=be=>{if(typeof x=="function"&&x(be),be.repeat&<&&(be.key==="ArrowUp"||be.key==="ArrowDown")){be.preventDefault();return}r||(be.key==="ArrowUp"?ar(be,!0):be.key==="ArrowDown"&&ar(be,!1))},gt=be=>{typeof S=="function"&&S(be),(be.key==="ArrowUp"||be.key==="ArrowDown")&&ht()};return k.createElement(yn,Cue(Oue({},K),{type:F,variant:$,value:we,disabled:o,readOnly:r,ref:ws(Te,t),onChange:qr,onFocus:fn,onBlur:wn,onKeyDown:Er,onKeyUp:gt,rightSection:V||(o||r||O||$==="unstyled"?null:Kr),rightSectionWidth:H??`calc(${re({size:Q,sizes:k6})} + ${M(1)})`,radius:E,max:f,min:u,step:g,size:Q,styles:X,classNames:G,inputMode:j||pue(g,N,NG()),__staticSelector:"NumberInput",unstyled:U}))});ma.displayName="@mantine/core/NumberInput";const T6=_.createContext(!1),Nue=T6.Provider,Tue=()=>_.useContext(T6);function I6({children:e,openDelay:t=0,closeDelay:n=0}){return k.createElement(Nue,{value:!0},k.createElement(VQ,{delay:{open:t,close:n}},e))}I6.displayName="@mantine/core/TooltipGroup";var Iue=Object.defineProperty,jue=Object.defineProperties,Lue=Object.getOwnPropertyDescriptors,bN=Object.getOwnPropertySymbols,Due=Object.prototype.hasOwnProperty,Rue=Object.prototype.propertyIsEnumerable,xN=(e,t,n)=>t in e?Iue(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,SN=(e,t)=>{for(var n in t||(t={}))Due.call(t,n)&&xN(e,n,t[n]);if(bN)for(var n of bN(t))Rue.call(t,n)&&xN(e,n,t[n]);return e},zue=(e,t)=>jue(e,Lue(t));function Aue(e,t){if(!t)return{backgroundColor:e.colorScheme==="dark"?e.colors.gray[2]:e.colors.gray[9],color:e.colorScheme==="dark"?e.black:e.white};const n=e.fn.variant({variant:"filled",color:t,primaryFallback:!1});return{backgroundColor:n.background,color:n.color}}var Bue=ue((e,{color:t,radius:n,width:r,multiline:o})=>({tooltip:zue(SN(SN({},e.fn.fontStyles()),Aue(e,t)),{lineHeight:e.lineHeight,fontSize:e.fontSizes.sm,borderRadius:e.fn.radius(n),padding:`calc(${e.spacing.xs} / 2) ${e.spacing.xs}`,position:"absolute",whiteSpace:o?"unset":"nowrap",pointerEvents:"none",width:r}),arrow:{backgroundColor:"inherit",border:0,zIndex:1}}));const j6=Bue,L6={children:"Tooltip component children should be an element or a component that accepts ref, fragments, strings, numbers and other primitive values are not supported"};function Fue({offset:e,position:t}){const[n,r]=_.useState(!1),o=_.useRef(),{x:i,y:s,reference:a,floating:c,refs:u,update:f,placement:p}=yP({placement:t,middleware:[fP({crossAxis:!0,padding:5,rootBoundary:"document"})]}),g=p.includes("right")?e:t.includes("left")?e*-1:0,v=p.includes("bottom")?e:t.includes("top")?e*-1:0,y=_.useCallback(({clientX:w,clientY:P})=>{a({getBoundingClientRect(){return{width:0,height:0,x:w,y:P,left:w+g,top:P+v,right:w,bottom:P}}})},[a]);return _.useEffect(()=>{if(u.floating.current){const w=o.current;w.addEventListener("mousemove",y);const P=us(u.floating.current);return P.forEach(x=>{x.addEventListener("scroll",f)}),()=>{w.removeEventListener("mousemove",y),P.forEach(x=>{x.removeEventListener("scroll",f)})}}},[a,u.floating.current,f,y,n]),{handleMouseMove:y,x:i,y:s,opened:n,setOpened:r,boundaryRef:o,floating:c}}var Vue=Object.defineProperty,Hue=Object.defineProperties,Wue=Object.getOwnPropertyDescriptors,yv=Object.getOwnPropertySymbols,D6=Object.prototype.hasOwnProperty,R6=Object.prototype.propertyIsEnumerable,PN=(e,t,n)=>t in e?Vue(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,nh=(e,t)=>{for(var n in t||(t={}))D6.call(t,n)&&PN(e,n,t[n]);if(yv)for(var n of yv(t))R6.call(t,n)&&PN(e,n,t[n]);return e},rh=(e,t)=>Hue(e,Wue(t)),Uue=(e,t)=>{var n={};for(var r in e)D6.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&yv)for(var r of yv(e))t.indexOf(r)<0&&R6.call(e,r)&&(n[r]=e[r]);return n};const Zue={refProp:"ref",withinPortal:!0,offset:10,position:"right",zIndex:ii("popover")};function z6(e){var t;const n=ae("TooltipFloating",Zue,e),{children:r,refProp:o,withinPortal:i,portalProps:s,style:a,className:c,classNames:u,styles:f,unstyled:p,radius:g,color:v,label:y,offset:w,position:P,multiline:x,width:S,zIndex:O,disabled:E,variant:$}=n,N=Uue(n,["children","refProp","withinPortal","portalProps","style","className","classNames","styles","unstyled","radius","color","label","offset","position","multiline","width","zIndex","disabled","variant"]),{handleMouseMove:I,x:R,y:B,opened:z,boundaryRef:G,floating:X,setOpened:Q}=Fue({offset:w,position:P}),{classes:V,cx:H}=j6({radius:g,color:v,multiline:x,width:S},{name:"TooltipFloating",classNames:u,styles:f,unstyled:p,variant:$});if(!Nf(r))throw new Error(L6.children);const Z=ws(G,r.ref),Y=U=>{var F,K;(K=(F=r.props).onMouseEnter)==null||K.call(F,U),I(U),Q(!0)},j=U=>{var F,K;(K=(F=r.props).onMouseLeave)==null||K.call(F,U),Q(!1)};return k.createElement(k.Fragment,null,k.createElement(Af,rh(nh({},s),{withinPortal:i}),k.createElement(Pe,rh(nh({},N),{ref:X,className:H(V.tooltip,c),style:rh(nh({},a),{zIndex:O,display:!E&&z?"block":"none",top:B??"",left:(t=Math.round(R))!=null?t:""})}),y)),_.cloneElement(r,rh(nh({},r.props),{[o]:Z,onMouseEnter:Y,onMouseLeave:j})))}z6.displayName="@mantine/core/TooltipFloating";function Gue(e){const[t,n]=_.useState(!1),o=typeof e.opened=="boolean"?e.opened:t,i=Tue(),s=$a(),{delay:a,currentId:c,setCurrentId:u}=xz(),f=_.useCallback(R=>{n(R),R&&u(s)},[u,s]),{x:p,y:g,reference:v,floating:y,context:w,refs:P,update:x,placement:S,middlewareData:{arrow:{x:O,y:E}={}}}=yP({placement:e.position,open:o,onOpenChange:f,middleware:[cz(e.offset),fP({padding:8}),sz(),vz({element:e.arrowRef,padding:e.arrowOffset}),...e.inline?[lz()]:[]]}),{getReferenceProps:$,getFloatingProps:N}=eee([FQ(w,{enabled:e.events.hover,delay:i?a:{open:e.openDelay,close:e.closeDelay},mouseOnly:!e.events.touch}),XQ(w,{enabled:e.events.focus,keyboardOnly:!0}),QQ(w,{role:"tooltip"}),JQ(w,{enabled:typeof e.opened===void 0}),HQ(w,{id:s})]);return Pz({opened:o,position:e.position,positionDependencies:e.positionDependencies,floating:{refs:P,update:x}}),Fn(()=>{var R;(R=e.onPositionChange)==null||R.call(e,S)},[S]),{x:p,y:g,arrowX:O,arrowY:E,reference:v,floating:y,getFloatingProps:N,getReferenceProps:$,isGroupPhase:o&&c&&c!==s,opened:o,placement:S}}var Yue=Object.defineProperty,Kue=Object.defineProperties,que=Object.getOwnPropertyDescriptors,_v=Object.getOwnPropertySymbols,A6=Object.prototype.hasOwnProperty,B6=Object.prototype.propertyIsEnumerable,ON=(e,t,n)=>t in e?Yue(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Ya=(e,t)=>{for(var n in t||(t={}))A6.call(t,n)&&ON(e,n,t[n]);if(_v)for(var n of _v(t))B6.call(t,n)&&ON(e,n,t[n]);return e},H_=(e,t)=>Kue(e,que(t)),Jue=(e,t)=>{var n={};for(var r in e)A6.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&_v)for(var r of _v(e))t.indexOf(r)<0&&B6.call(e,r)&&(n[r]=e[r]);return n};const Xue={position:"top",refProp:"ref",withinPortal:!1,inline:!1,arrowSize:4,arrowOffset:5,arrowRadius:0,arrowPosition:"side",offset:5,transitionProps:{duration:100,transition:"fade"},width:"auto",events:{hover:!0,focus:!1,touch:!1},zIndex:ii("popover"),positionDependencies:[]},T0=_.forwardRef((e,t)=>{var n;const r=_.useRef(null),o=ae("Tooltip",Xue,e),{children:i,position:s,refProp:a,label:c,openDelay:u,closeDelay:f,onPositionChange:p,opened:g,withinPortal:v,portalProps:y,radius:w,color:P,classNames:x,styles:S,unstyled:O,style:E,className:$,withArrow:N,arrowSize:I,arrowOffset:R,arrowRadius:B,arrowPosition:z,offset:G,transitionProps:X,multiline:Q,width:V,events:H,zIndex:Z,disabled:Y,positionDependencies:j,onClick:U,onMouseEnter:F,onMouseLeave:K,inline:ee,variant:fe,keepMounted:ie}=o,J=Jue(o,["children","position","refProp","label","openDelay","closeDelay","onPositionChange","opened","withinPortal","portalProps","radius","color","classNames","styles","unstyled","style","className","withArrow","arrowSize","arrowOffset","arrowRadius","arrowPosition","offset","transitionProps","multiline","width","events","zIndex","disabled","positionDependencies","onClick","onMouseEnter","onMouseLeave","inline","variant","keepMounted"]),{classes:ne,cx:le,theme:_e}=j6({radius:w,color:P,width:V,multiline:Q},{name:"Tooltip",classNames:x,styles:S,unstyled:O,variant:fe}),Ne=Gue({position:Lz(_e.dir,s),closeDelay:f,openDelay:u,onPositionChange:p,opened:g,events:H,arrowRef:r,arrowOffset:R,offset:G+(N?I/2:0),positionDependencies:[...j,i],inline:ee});if(!Nf(i))throw new Error(L6.children);const we=ws(Ne.reference,i.ref,t);return k.createElement(k.Fragment,null,k.createElement(Af,H_(Ya({},y),{withinPortal:v}),k.createElement(Os,H_(Ya({keepMounted:ie,mounted:!Y&&Ne.opened},X),{transition:X.transition||"fade",duration:Ne.isGroupPhase?10:(n=X.duration)!=null?n:100}),He=>{var Te,je;return k.createElement(Pe,Ya(Ya({},J),Ne.getFloatingProps({ref:Ne.floating,className:ne.tooltip,style:H_(Ya(Ya({},E),He),{zIndex:Z,top:(Te=Ne.y)!=null?Te:0,left:(je=Ne.x)!=null?je:0})})),c,k.createElement(wP,{ref:r,arrowX:Ne.arrowX,arrowY:Ne.arrowY,visible:N,position:Ne.placement,arrowSize:I,arrowOffset:R,arrowRadius:B,arrowPosition:z,className:ne.arrow}))})),_.cloneElement(i,Ne.getReferenceProps(Ya({onClick:U,onMouseEnter:F,onMouseLeave:K,onMouseMove:e.onMouseMove,onPointerDown:e.onPointerDown,onPointerEnter:e.onPointerEnter,[a]:we,className:le($,i.props.className)},i.props))))});T0.Group=I6;T0.Floating=z6;T0.displayName="@mantine/core/Tooltip";const At=T0;function Que({data:e,searchable:t,limit:n,searchValue:r,filter:o,value:i,filterDataOnExactSearchMatch:s}){if(!t)return e;const a=i!=null&&e.find(u=>u.value===i)||null;if(a&&!s&&a?.label===r){if(n){if(n>=e.length)return e;const u=e.indexOf(a),f=u+n,p=f-e.length;return p>0?e.slice(u-p):e.slice(u,f)}return e}const c=[];for(let u=0;u=n));u+=1);return c}var ede=ue(()=>({input:{"&:not(:disabled)":{cursor:"pointer","&::selection":{backgroundColor:"transparent"}}}}));const tde=ede;var nde=Object.defineProperty,rde=Object.defineProperties,ode=Object.getOwnPropertyDescriptors,wv=Object.getOwnPropertySymbols,F6=Object.prototype.hasOwnProperty,V6=Object.prototype.propertyIsEnumerable,CN=(e,t,n)=>t in e?nde(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,cd=(e,t)=>{for(var n in t||(t={}))F6.call(t,n)&&CN(e,n,t[n]);if(wv)for(var n of wv(t))V6.call(t,n)&&CN(e,n,t[n]);return e},W_=(e,t)=>rde(e,ode(t)),ide=(e,t)=>{var n={};for(var r in e)F6.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&wv)for(var r of wv(e))t.indexOf(r)<0&&V6.call(e,r)&&(n[r]=e[r]);return n};function sde(e,t){return t.label.toLowerCase().trim().includes(e.toLowerCase().trim())}function ade(e,t){return!!e&&!t.some(n=>n.label.toLowerCase()===e.toLowerCase())}const lde={required:!1,size:"sm",shadow:"sm",itemComponent:iP,transitionProps:{transition:"fade",duration:0},initiallyOpened:!1,filter:sde,maxDropdownHeight:220,searchable:!1,clearable:!1,limit:1/0,disabled:!1,creatable:!1,shouldCreate:ade,selectOnBlur:!1,switchDirectionOnFlip:!1,filterDataOnExactSearchMatch:!1,zIndex:ii("popover"),positionDependencies:[],dropdownPosition:"flip"},Nl=_.forwardRef((e,t)=>{const n=bP("Select",lde,e),{inputProps:r,wrapperProps:o,shadow:i,data:s,value:a,defaultValue:c,onChange:u,itemComponent:f,onKeyDown:p,onBlur:g,onFocus:v,transitionProps:y,initiallyOpened:w,unstyled:P,classNames:x,styles:S,filter:O,maxDropdownHeight:E,searchable:$,clearable:N,nothingFound:I,limit:R,disabled:B,onSearchChange:z,searchValue:G,rightSection:X,rightSectionWidth:Q,creatable:V,getCreateLabel:H,shouldCreate:Z,selectOnBlur:Y,onCreate:j,dropdownComponent:U,onDropdownClose:F,onDropdownOpen:K,withinPortal:ee,portalProps:fe,switchDirectionOnFlip:ie,zIndex:J,name:ne,dropdownPosition:le,allowDeselect:_e,placeholder:Ne,filterDataOnExactSearchMatch:we,form:He,positionDependencies:Te,readOnly:je,clearButtonProps:it,hoverOnSearchChange:bt}=n,_n=ide(n,["inputProps","wrapperProps","shadow","data","value","defaultValue","onChange","itemComponent","onKeyDown","onBlur","onFocus","transitionProps","initiallyOpened","unstyled","classNames","styles","filter","maxDropdownHeight","searchable","clearable","nothingFound","limit","disabled","onSearchChange","searchValue","rightSection","rightSectionWidth","creatable","getCreateLabel","shouldCreate","selectOnBlur","onCreate","dropdownComponent","onDropdownClose","onDropdownOpen","withinPortal","portalProps","switchDirectionOnFlip","zIndex","name","dropdownPosition","allowDeselect","placeholder","filterDataOnExactSearchMatch","form","positionDependencies","readOnly","clearButtonProps","hoverOnSearchChange"]),{classes:pt,cx:Tn,theme:kr}=tde(),[lt,Zn]=_.useState(w),[Jt,ht]=_.useState(-1),xo=_.useRef(),Yr=_.useRef({}),[ar,Kr]=_.useState("column"),Bt=ar==="column",{scrollIntoView:qr,targetRef:fn,scrollableRef:wn}=Z3({duration:0,offset:5,cancelable:!1,isList:!0}),Er=_e===void 0?N:_e,gt=Se=>{if(lt!==Se){Zn(Se);const ct=Se?K:F;typeof ct=="function"&&ct()}},be=V&&typeof H=="function";let De=null;const Jr=s.map(Se=>typeof Se=="string"?{label:Se,value:Se}:Se),Rt=p3({data:Jr}),[Zt,$r,xt]=go({value:a,defaultValue:c,finalValue:null,onChange:u}),tn=Rt.find(Se=>Se.value===Zt),[Gn,Aa]=go({value:G,defaultValue:tn?.label||"",finalValue:void 0,onChange:z}),Yn=Se=>{Aa(Se),$&&typeof z=="function"&&z(Se)},bn=()=>{var Se;je||($r(null),xt||Yn(""),(Se=xo.current)==null||Se.focus())};_.useEffect(()=>{const Se=Rt.find(ct=>ct.value===Zt);Se?Yn(Se.label):(!be||!Zt)&&Yn("")},[Zt]),_.useEffect(()=>{tn&&(!$||!lt)&&Yn(tn.label)},[tn?.label]);const Ft=Se=>{if(!je)if(Er&&tn?.value===Se.value)$r(null),gt(!1);else{if(Se.creatable&&typeof j=="function"){const ct=j(Se.value);typeof ct<"u"&&ct!==null&&$r(typeof ct=="string"?ct:ct.value)}else $r(Se.value);xt||Yn(Se.label),ht(-1),gt(!1),xo.current.focus()}},Gt=Que({data:Rt,searchable:$,limit:R,searchValue:Gn,filter:O,filterDataOnExactSearchMatch:we,value:Zt});be&&Z(Gn,Gt)&&(De=H(Gn),Gt.push({label:Gn,value:Gn,creatable:!0}));const Xr=(Se,ct,nn)=>{let ze=Se;for(;nn(ze);)if(ze=ct(ze),!Gt[ze].disabled)return ze;return Se};Fn(()=>{ht(bt&&Gn?0:-1)},[Gn,bt]);const So=Zt?Gt.findIndex(Se=>Se.value===Zt):0,lr=!je&&(Gt.length>0?lt:lt&&!!I),cr=()=>{ht(Se=>{var ct;const nn=Xr(Se,ze=>ze-1,ze=>ze>0);return fn.current=Yr.current[(ct=Gt[nn])==null?void 0:ct.value],lr&&qr({alignment:Bt?"start":"end"}),nn})},Hi=()=>{ht(Se=>{var ct;const nn=Xr(Se,ze=>ze+1,ze=>zewindow.setTimeout(()=>{var Se;fn.current=Yr.current[(Se=Gt[So])==null?void 0:Se.value],qr({alignment:Bt?"end":"start"})},50);Fn(()=>{lr&&Es()},[lr]);const ur=Se=>{switch(typeof p=="function"&&p(Se),Se.key){case"ArrowUp":{Se.preventDefault(),lt?Bt?cr():Hi():(ht(So),gt(!0),Es());break}case"ArrowDown":{Se.preventDefault(),lt?Bt?Hi():cr():(ht(So),gt(!0),Es());break}case"Home":{if(!$){Se.preventDefault(),lt||gt(!0);const ct=Gt.findIndex(nn=>!nn.disabled);ht(ct),lr&&qr({alignment:Bt?"end":"start"})}break}case"End":{if(!$){Se.preventDefault(),lt||gt(!0);const ct=Gt.map(nn=>!!nn.disabled).lastIndexOf(!1);ht(ct),lr&&qr({alignment:Bt?"end":"start"})}break}case"Escape":{Se.preventDefault(),gt(!1),ht(-1);break}case" ":{$||(Se.preventDefault(),Gt[Jt]&<?Ft(Gt[Jt]):(gt(!0),ht(So),Es()));break}case"Enter":$||Se.preventDefault(),Gt[Jt]&<&&(Se.preventDefault(),Ft(Gt[Jt]))}},Oe=Se=>{typeof g=="function"&&g(Se);const ct=Rt.find(nn=>nn.value===Zt);Y&&Gt[Jt]&<&&Ft(Gt[Jt]),Yn(ct?.label||""),gt(!1)},Ba=Se=>{typeof v=="function"&&v(Se),$&>(!0)},Yl=Se=>{je||(Yn(Se.currentTarget.value),N&&Se.currentTarget.value===""&&$r(null),ht(-1),gt(!0))},Fa=()=>{je||(gt(!lt),Zt&&!lt&&ht(So))};return k.createElement(et.Wrapper,W_(cd({},o),{__staticSelector:"Select"}),k.createElement(ha,{opened:lr,transitionProps:y,shadow:i,withinPortal:ee,portalProps:fe,__staticSelector:"Select",onDirectionChange:Kr,switchDirectionOnFlip:ie,zIndex:J,dropdownPosition:le,positionDependencies:[...Te,Gn],classNames:x,styles:S,unstyled:P,variant:r.variant},k.createElement(ha.Target,null,k.createElement("div",{role:"combobox","aria-haspopup":"listbox","aria-owns":lr?`${r.id}-items`:null,"aria-controls":r.id,"aria-expanded":lr,onMouseLeave:()=>ht(-1),tabIndex:-1},k.createElement("input",{type:"hidden",name:ne,value:Zt||"",form:He,disabled:B}),k.createElement(et,cd(W_(cd(cd({autoComplete:"off",type:"search"},r),_n),{ref:ws(t,xo),onKeyDown:ur,__staticSelector:"Select",value:Gn,placeholder:Ne,onChange:Yl,"aria-autocomplete":"list","aria-controls":lr?`${r.id}-items`:null,"aria-activedescendant":Jt>=0?`${r.id}-${Jt}`:null,onMouseDown:Fa,onBlur:Oe,onFocus:Ba,readOnly:!$||je,disabled:B,"data-mantine-stop-propagation":lr,name:null,classNames:W_(cd({},x),{input:Tn({[pt.input]:!$},x?.input)})}),P6({theme:kr,rightSection:X,rightSectionWidth:Q,styles:S,size:r.size,shouldClear:N&&!!tn,onClear:bn,error:o.error,clearButtonProps:it,disabled:B,readOnly:je}))))),k.createElement(ha.Dropdown,{component:U||$0,maxHeight:E,direction:ar,id:r.id,innerRef:wn,__staticSelector:"Select",classNames:x,styles:S},k.createElement(oP,{data:Gt,hovered:Jt,classNames:x,styles:S,isItemSelected:Se=>Se===Zt,uuid:r.id,__staticSelector:"Select",onItemHover:ht,onItemSelect:Ft,itemsRefs:Yr,itemComponent:f,size:r.size,nothingFound:I,creatable:be&&!!De,createLabel:De,"aria-label":o.label,unstyled:P,variant:r.variant}))))});Nl.displayName="@mantine/core/Select";function cde(e,t){if(t.length===0)return t;const n="maxWidth"in t[0]?"maxWidth":"minWidth",r=[...t].sort((o,i)=>Ro(re({size:i[n],sizes:e.breakpoints}))-Ro(re({size:o[n],sizes:e.breakpoints})));return n==="minWidth"?r.reverse():r}var ude=Object.defineProperty,kN=Object.getOwnPropertySymbols,dde=Object.prototype.hasOwnProperty,fde=Object.prototype.propertyIsEnumerable,EN=(e,t,n)=>t in e?ude(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,pde=(e,t)=>{for(var n in t||(t={}))dde.call(t,n)&&EN(e,n,t[n]);if(kN)for(var n of kN(t))fde.call(t,n)&&EN(e,n,t[n]);return e},hde=ue((e,{spacing:t,breakpoints:n,cols:r,verticalSpacing:o})=>{const i=o!=null,s=cde(e,n).reduce((a,c)=>{var u,f;const p="maxWidth"in c?"max-width":"min-width",g=re({size:p==="max-width"?c.maxWidth:c.minWidth,sizes:e.breakpoints,units:"em"}),v=Ro(g)-(p==="max-width"?1:0);return a[`@media (${p}: ${ba(v)})`]={gridTemplateColumns:`repeat(${c.cols}, minmax(0, 1fr))`,gap:`${re({size:(u=c.verticalSpacing)!=null?u:i?o:t,sizes:e.spacing})} ${re({size:(f=c.spacing)!=null?f:t,sizes:e.spacing})}`},a},{});return{root:pde({boxSizing:"border-box",display:"grid",gridTemplateColumns:`repeat(${r}, minmax(0, 1fr))`,gap:`${re({size:i?o:t,sizes:e.spacing})} ${re({size:t,sizes:e.spacing})}`},s)}});const mde=hde;var gde=Object.defineProperty,bv=Object.getOwnPropertySymbols,H6=Object.prototype.hasOwnProperty,W6=Object.prototype.propertyIsEnumerable,$N=(e,t,n)=>t in e?gde(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,vde=(e,t)=>{for(var n in t||(t={}))H6.call(t,n)&&$N(e,n,t[n]);if(bv)for(var n of bv(t))W6.call(t,n)&&$N(e,n,t[n]);return e},yde=(e,t)=>{var n={};for(var r in e)H6.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&bv)for(var r of bv(e))t.indexOf(r)<0&&W6.call(e,r)&&(n[r]=e[r]);return n};const _de={breakpoints:[],cols:1,spacing:"md"},TP=_.forwardRef((e,t)=>{const n=ae("SimpleGrid",_de,e),{className:r,breakpoints:o,cols:i,spacing:s,verticalSpacing:a,children:c,unstyled:u,variant:f}=n,p=yde(n,["className","breakpoints","cols","spacing","verticalSpacing","children","unstyled","variant"]),{classes:g,cx:v}=mde({breakpoints:o,cols:i,spacing:s,verticalSpacing:a},{name:"SimpleGrid",unstyled:u,variant:f});return k.createElement(Pe,vde({className:v(g.root,r),ref:t},p),c)});TP.displayName="@mantine/core/SimpleGrid";var wde=ue((e,{spacing:t,align:n,justify:r})=>({root:{display:"flex",flexDirection:"column",alignItems:n,justifyContent:r,gap:re({size:t,sizes:e.spacing})}}));const bde=wde;var xde=Object.defineProperty,xv=Object.getOwnPropertySymbols,U6=Object.prototype.hasOwnProperty,Z6=Object.prototype.propertyIsEnumerable,MN=(e,t,n)=>t in e?xde(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Sde=(e,t)=>{for(var n in t||(t={}))U6.call(t,n)&&MN(e,n,t[n]);if(xv)for(var n of xv(t))Z6.call(t,n)&&MN(e,n,t[n]);return e},Pde=(e,t)=>{var n={};for(var r in e)U6.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&xv)for(var r of xv(e))t.indexOf(r)<0&&Z6.call(e,r)&&(n[r]=e[r]);return n};const Ode={spacing:"md",align:"stretch",justify:"flex-start"},Je=_.forwardRef((e,t)=>{const n=ae("Stack",Ode,e),{spacing:r,className:o,align:i,justify:s,unstyled:a,variant:c}=n,u=Pde(n,["spacing","className","align","justify","unstyled","variant"]),{classes:f,cx:p}=bde({spacing:r,align:i,justify:s},{name:"Stack",unstyled:a,variant:c});return k.createElement(Pe,Sde({className:p(f.root,o),ref:t},u))});Je.displayName="@mantine/core/Stack";const G6=_.createContext(null),Cde=G6.Provider,kde=()=>_.useContext(G6);var Ede=Object.defineProperty,Sv=Object.getOwnPropertySymbols,Y6=Object.prototype.hasOwnProperty,K6=Object.prototype.propertyIsEnumerable,NN=(e,t,n)=>t in e?Ede(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,TN=(e,t)=>{for(var n in t||(t={}))Y6.call(t,n)&&NN(e,n,t[n]);if(Sv)for(var n of Sv(t))K6.call(t,n)&&NN(e,n,t[n]);return e},$de=(e,t)=>{var n={};for(var r in e)Y6.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Sv)for(var r of Sv(e))t.indexOf(r)<0&&K6.call(e,r)&&(n[r]=e[r]);return n};const Mde={size:"sm"},q6=_.forwardRef((e,t)=>{const n=ae("SwitchGroup",Mde,e),{children:r,value:o,defaultValue:i,onChange:s,size:a,wrapperProps:c}=n,u=$de(n,["children","value","defaultValue","onChange","size","wrapperProps"]),[f,p]=go({value:o,defaultValue:i,finalValue:[],onChange:s}),g=v=>{const y=v.currentTarget.value;p(f.includes(y)?f.filter(w=>w!==y):[...f,y])};return k.createElement(Cde,{value:{value:f,onChange:g,size:a}},k.createElement(et.Wrapper,TN(TN({labelElement:"div",size:a,__staticSelector:"SwitchGroup",ref:t},c),u),r))});q6.displayName="@mantine/core/SwitchGroup";var Nde=Object.defineProperty,Tde=Object.defineProperties,Ide=Object.getOwnPropertyDescriptors,IN=Object.getOwnPropertySymbols,jde=Object.prototype.hasOwnProperty,Lde=Object.prototype.propertyIsEnumerable,jN=(e,t,n)=>t in e?Nde(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Dde=(e,t)=>{for(var n in t||(t={}))jde.call(t,n)&&jN(e,n,t[n]);if(IN)for(var n of IN(t))Lde.call(t,n)&&jN(e,n,t[n]);return e},Rde=(e,t)=>Tde(e,Ide(t));const zde={xs:M(16),sm:M(20),md:M(24),lg:M(30),xl:M(36)},Ade={xs:M(32),sm:M(38),md:M(46),lg:M(56),xl:M(72)},Bde={xs:M(12),sm:M(14),md:M(18),lg:M(22),xl:M(28)},Fde={xs:M(5),sm:M(6),md:M(7),lg:M(9),xl:M(11)},Vde={xs:M(4),sm:M(5),md:M(6),lg:M(8),xl:M(10)};var Hde=ue((e,{radius:t,color:n,labelPosition:r,error:o},{size:i})=>{const s=re({size:i,sizes:Bde}),a=re({size:t,sizes:e.radius}),c=e.fn.variant({variant:"filled",color:n}),u=re({size:i,sizes:Ade}),f=M(i==="xs"?1:2),p=e.fn.variant({variant:"filled",color:"red"}).background;return{root:{position:"relative"},input:{height:0,width:0,overflow:"hidden",whiteSpace:"nowrap",padding:0,WebkitClipPath:"inset(50%)",clipPath:"inset(50%)",position:"absolute"},track:Rde(Dde({},e.fn.focusStyles("input:focus + &")),{cursor:e.cursorType,overflow:"hidden",WebkitTapHighlightColor:"transparent",position:"relative",borderRadius:a,backgroundColor:e.colorScheme==="dark"?e.colors.dark[6]:e.colors.gray[2],border:`${M(1)} solid ${o?p:e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[3]}`,height:re({size:i,sizes:zde}),minWidth:u,margin:0,transitionProperty:"background-color, border-color",transitionTimingFunction:e.transitionTimingFunction,transitionDuration:"150ms",boxSizing:"border-box",appearance:"none",display:"flex",alignItems:"center",fontSize:re({size:i,sizes:Fde}),fontWeight:600,order:r==="left"?2:1,userSelect:"none",zIndex:0,lineHeight:0,color:e.colorScheme==="dark"?e.colors.dark[1]:e.colors.gray[6],transition:`color 150ms ${e.transitionTimingFunction}`,"input:checked + &":{backgroundColor:c.background,borderColor:c.background,color:e.white,transition:`color 150ms ${e.transitionTimingFunction}`},"input:disabled + &":{backgroundColor:e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[2],borderColor:e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[2],cursor:"not-allowed",pointerEvents:"none"}}),thumb:{position:"absolute",zIndex:1,borderRadius:a,boxSizing:"border-box",display:"flex",backgroundColor:e.white,height:s,width:s,border:`${M(1)} solid ${e.colorScheme==="dark"?e.white:e.colors.gray[3]}`,left:f,transition:`left 150ms ${e.transitionTimingFunction}`,"& > *":{margin:"auto"},"@media (prefers-reduced-motion)":{transitionDuration:e.respectReducedMotion?"0ms":""},"input:checked + * > &":{left:`calc(100% - ${s} - ${f})`,borderColor:e.white},"input:disabled + * > &":{borderColor:e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[2],backgroundColor:e.colorScheme==="dark"?e.colors.dark[3]:e.colors.gray[0]}},trackLabel:{height:"100%",display:"grid",placeContent:"center",minWidth:`calc(${u} - ${s})`,paddingInline:re({size:i,sizes:Vde}),marginLeft:`calc(${s} + ${f})`,transition:`margin 150ms ${e.transitionTimingFunction}`,"input:checked + * > &":{marginLeft:0,marginRight:`calc(${s} + ${f})`}}}});const Wde=Hde;var Ude=Object.defineProperty,Zde=Object.defineProperties,Gde=Object.getOwnPropertyDescriptors,Pv=Object.getOwnPropertySymbols,J6=Object.prototype.hasOwnProperty,X6=Object.prototype.propertyIsEnumerable,LN=(e,t,n)=>t in e?Ude(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,U_=(e,t)=>{for(var n in t||(t={}))J6.call(t,n)&&LN(e,n,t[n]);if(Pv)for(var n of Pv(t))X6.call(t,n)&&LN(e,n,t[n]);return e},Yde=(e,t)=>Zde(e,Gde(t)),Kde=(e,t)=>{var n={};for(var r in e)J6.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Pv)for(var r of Pv(e))t.indexOf(r)<0&&X6.call(e,r)&&(n[r]=e[r]);return n};const qde={offLabel:"",onLabel:"",size:"sm",radius:"xl",error:!1},Ld=_.forwardRef((e,t)=>{var n;const r=ae("Switch",qde,e),{className:o,color:i,label:s,offLabel:a,onLabel:c,id:u,style:f,size:p,radius:g,wrapperProps:v,children:y,unstyled:w,styles:P,classNames:x,thumbIcon:S,sx:O,checked:E,defaultChecked:$,onChange:N,labelPosition:I,description:R,error:B,disabled:z,variant:G}=r,X=Kde(r,["className","color","label","offLabel","onLabel","id","style","size","radius","wrapperProps","children","unstyled","styles","classNames","thumbIcon","sx","checked","defaultChecked","onChange","labelPosition","description","error","disabled","variant"]),Q=kde(),V=Q?.size||p,{classes:H,cx:Z}=Wde({color:i,radius:g,labelPosition:I,error:!!B},{name:"Switch",classNames:x,styles:P,unstyled:w,size:V,variant:G}),{systemStyles:Y,rest:j}=Dl(X),U=$a(u),F=Q?{checked:Q.value.includes(j.value),onChange:Q.onChange}:{},[K,ee]=go({value:(n=F.checked)!=null?n:E,defaultValue:$,finalValue:!1});return k.createElement(EP,U_(U_({className:Z(o,H.root),sx:O,style:f,id:U,size:Q?.size||p,labelPosition:I,label:s,description:R,error:B,disabled:z,__staticSelector:"Switch",classNames:x,styles:P,unstyled:w,"data-checked":F.checked||void 0,variant:G},Y),v),k.createElement("input",Yde(U_({},j),{disabled:z,checked:K,onChange:fe=>{Q?F.onChange(fe):N?.(fe),ee(fe.currentTarget.checked)},id:U,ref:t,type:"checkbox",className:H.input})),k.createElement("label",{htmlFor:U,className:H.track},k.createElement("div",{className:H.thumb},S),k.createElement("div",{className:H.trackLabel},K?c:a)))});Ld.displayName="@mantine/core/Switch";Ld.Group=q6;var Jde=Object.defineProperty,Xde=Object.defineProperties,Qde=Object.getOwnPropertyDescriptors,DN=Object.getOwnPropertySymbols,efe=Object.prototype.hasOwnProperty,tfe=Object.prototype.propertyIsEnumerable,RN=(e,t,n)=>t in e?Jde(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,nfe=(e,t)=>{for(var n in t||(t={}))efe.call(t,n)&&RN(e,n,t[n]);if(DN)for(var n of DN(t))tfe.call(t,n)&&RN(e,n,t[n]);return e},rfe=(e,t)=>Xde(e,Qde(t)),ofe=ue((e,{captionSide:t,horizontalSpacing:n,verticalSpacing:r,fontSize:o,withBorder:i,withColumnBorders:s})=>{const a=`${M(1)} solid ${e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[3]}`;return{root:rfe(nfe({},e.fn.fontStyles()),{width:"100%",borderCollapse:"collapse",captionSide:t,color:e.colorScheme==="dark"?e.colors.dark[0]:e.black,lineHeight:e.lineHeight,border:i?a:void 0,"& > caption":{marginTop:t==="top"?0:e.spacing.xs,marginBottom:t==="bottom"?0:e.spacing.xs,fontSize:e.fontSizes.sm,color:e.colorScheme==="dark"?e.colors.dark[2]:e.colors.gray[6]},"& > thead > tr > th, & > tfoot > tr > th, & > tbody > tr > th":{textAlign:"left",fontWeight:"bold",color:e.colorScheme==="dark"?e.colors.dark[0]:e.colors.gray[7],fontSize:re({size:o,sizes:e.fontSizes}),padding:`${re({size:r,sizes:e.spacing})} ${re({size:n,sizes:e.spacing})}`},"& > thead > tr > th":{borderBottom:a},"& > tfoot > tr > th, & > tbody > tr > th":{borderTop:a},"& > tbody > tr > td":{padding:`${re({size:r,sizes:e.spacing})} ${re({size:n,sizes:e.spacing})}`,borderTop:a,fontSize:re({size:o,sizes:e.fontSizes})},"& > tbody > tr:first-of-type > td, & > tbody > tr:first-of-type > th":{borderTop:"none"},"& > thead > tr > th, & > tbody > tr > td":{borderRight:s?a:"none","&:last-of-type":{borderRight:"none",borderLeft:s?a:"none"}},"& > tbody > tr > th":{borderRight:s?a:"none"},"&[data-striped] > tbody > tr:nth-of-type(odd)":{backgroundColor:e.colorScheme==="dark"?e.colors.dark[6]:e.colors.gray[0]},"&[data-hover] > tbody > tr":e.fn.hover({backgroundColor:e.colorScheme==="dark"?e.colors.dark[5]:e.colors.gray[1]})})}});const ife=ofe;var sfe=Object.defineProperty,afe=Object.defineProperties,lfe=Object.getOwnPropertyDescriptors,Ov=Object.getOwnPropertySymbols,Q6=Object.prototype.hasOwnProperty,e8=Object.prototype.propertyIsEnumerable,zN=(e,t,n)=>t in e?sfe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,cfe=(e,t)=>{for(var n in t||(t={}))Q6.call(t,n)&&zN(e,n,t[n]);if(Ov)for(var n of Ov(t))e8.call(t,n)&&zN(e,n,t[n]);return e},ufe=(e,t)=>afe(e,lfe(t)),dfe=(e,t)=>{var n={};for(var r in e)Q6.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Ov)for(var r of Ov(e))t.indexOf(r)<0&&e8.call(e,r)&&(n[r]=e[r]);return n};const ffe={striped:!1,highlightOnHover:!1,captionSide:"top",horizontalSpacing:"xs",fontSize:"sm",verticalSpacing:7,withBorder:!1,withColumnBorders:!1},Zc=_.forwardRef((e,t)=>{const n=ae("Table",ffe,e),{className:r,children:o,striped:i,highlightOnHover:s,captionSide:a,horizontalSpacing:c,verticalSpacing:u,fontSize:f,unstyled:p,withBorder:g,withColumnBorders:v,variant:y}=n,w=dfe(n,["className","children","striped","highlightOnHover","captionSide","horizontalSpacing","verticalSpacing","fontSize","unstyled","withBorder","withColumnBorders","variant"]),{classes:P,cx:x}=ife({captionSide:a,verticalSpacing:u,horizontalSpacing:c,fontSize:f,withBorder:g,withColumnBorders:v},{unstyled:p,name:"Table",variant:y});return k.createElement(Pe,ufe(cfe({},w),{component:"table",ref:t,className:x(P.root,r),"data-striped":i||void 0,"data-hover":s||void 0}),o)});Zc.displayName="@mantine/core/Table";var pfe=Object.defineProperty,hfe=Object.defineProperties,mfe=Object.getOwnPropertyDescriptors,AN=Object.getOwnPropertySymbols,gfe=Object.prototype.hasOwnProperty,vfe=Object.prototype.propertyIsEnumerable,BN=(e,t,n)=>t in e?pfe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,FN=(e,t)=>{for(var n in t||(t={}))gfe.call(t,n)&&BN(e,n,t[n]);if(AN)for(var n of AN(t))vfe.call(t,n)&&BN(e,n,t[n]);return e},yfe=(e,t)=>hfe(e,mfe(t));const _fe={xs:M(16),sm:M(20),md:M(26),lg:M(32),xl:M(40)},wfe=["filled","light","gradient","outline","default"];function bfe({theme:e,variant:t,color:n,gradient:r}){if(!wfe.includes(t))return null;const o=e.fn.variant({variant:t,color:n||e.primaryColor,gradient:r,primaryFallback:!1});return{backgroundColor:o.background,color:o.color,backgroundImage:t==="gradient"?o.background:void 0,border:`${M(t==="gradient"?0:1)} solid ${o.border}`}}var xfe=ue((e,{color:t,radius:n,gradient:r},{variant:o,size:i})=>{const s=re({size:i,sizes:_fe});return{root:FN(yfe(FN({},e.fn.fontStyles()),{display:"inline-flex",alignItems:"center",justifyContent:"center",boxSizing:"border-box",width:s,height:s,minWidth:s,minHeight:s,borderRadius:e.fn.radius(n)}),bfe({theme:e,variant:o,gradient:r,color:t}))}});const Sfe=xfe;var Pfe=Object.defineProperty,Cv=Object.getOwnPropertySymbols,t8=Object.prototype.hasOwnProperty,n8=Object.prototype.propertyIsEnumerable,VN=(e,t,n)=>t in e?Pfe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Ofe=(e,t)=>{for(var n in t||(t={}))t8.call(t,n)&&VN(e,n,t[n]);if(Cv)for(var n of Cv(t))n8.call(t,n)&&VN(e,n,t[n]);return e},Cfe=(e,t)=>{var n={};for(var r in e)t8.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Cv)for(var r of Cv(e))t.indexOf(r)<0&&n8.call(e,r)&&(n[r]=e[r]);return n};const kfe={size:"md",variant:"filled"},ex=_.forwardRef((e,t)=>{const n=ae("ThemeIcon",kfe,e),{className:r,size:o,radius:i,variant:s,color:a,children:c,gradient:u,unstyled:f}=n,p=Cfe(n,["className","size","radius","variant","color","children","gradient","unstyled"]),{classes:g,cx:v}=Sfe({variant:s,radius:i,color:a,gradient:u},{name:"ThemeIcon",unstyled:f,variant:s,size:o});return k.createElement(Pe,Ofe({className:v(g.root,r),ref:t},p),c)});ex.displayName="@mantine/core/ThemeIcon";var Efe=Object.defineProperty,$fe=Object.defineProperties,Mfe=Object.getOwnPropertyDescriptors,HN=Object.getOwnPropertySymbols,Nfe=Object.prototype.hasOwnProperty,Tfe=Object.prototype.propertyIsEnumerable,WN=(e,t,n)=>t in e?Efe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Ife=(e,t)=>{for(var n in t||(t={}))Nfe.call(t,n)&&WN(e,n,t[n]);if(HN)for(var n of HN(t))Tfe.call(t,n)&&WN(e,n,t[n]);return e},jfe=(e,t)=>$fe(e,Mfe(t));function Lfe(e,t,n){return typeof e<"u"?e in n.headings.sizes?n.headings.sizes[e].fontSize:M(e):n.headings.sizes[t].fontSize}function Dfe(e,t,n){return typeof e<"u"&&e in n.headings.sizes?n.headings.sizes[e].lineHeight:n.headings.sizes[t].lineHeight}var Rfe=ue((e,{element:t,weight:n,inline:r},{size:o})=>({root:jfe(Ife({},e.fn.fontStyles()),{fontFamily:e.headings.fontFamily,fontWeight:n||e.headings.sizes[t].fontWeight||e.headings.fontWeight,fontSize:Lfe(o,t,e),lineHeight:r?1:Dfe(o,t,e),margin:0})}));const zfe=Rfe;var Afe=Object.defineProperty,kv=Object.getOwnPropertySymbols,r8=Object.prototype.hasOwnProperty,o8=Object.prototype.propertyIsEnumerable,UN=(e,t,n)=>t in e?Afe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Bfe=(e,t)=>{for(var n in t||(t={}))r8.call(t,n)&&UN(e,n,t[n]);if(kv)for(var n of kv(t))o8.call(t,n)&&UN(e,n,t[n]);return e},Ffe=(e,t)=>{var n={};for(var r in e)r8.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&kv)for(var r of kv(e))t.indexOf(r)<0&&o8.call(e,r)&&(n[r]=e[r]);return n};const Vfe={order:1},i8=_.forwardRef((e,t)=>{const n=ae("Title",Vfe,e),{className:r,order:o,children:i,unstyled:s,size:a,weight:c,inline:u,variant:f}=n,p=Ffe(n,["className","order","children","unstyled","size","weight","inline","variant"]),{classes:g,cx:v}=zfe({element:`h${o}`,weight:c,inline:u},{name:"Title",unstyled:s,variant:f,size:a});return[1,2,3,4,5,6].includes(o)?k.createElement(W,Bfe({variant:f,component:`h${o}`,ref:t,className:v(g.root,r)},p),i):null});i8.displayName="@mantine/core/Title";var Hfe=Object.defineProperty,Wfe=Object.defineProperties,Ufe=Object.getOwnPropertyDescriptors,ZN=Object.getOwnPropertySymbols,Zfe=Object.prototype.hasOwnProperty,Gfe=Object.prototype.propertyIsEnumerable,GN=(e,t,n)=>t in e?Hfe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,oh=(e,t)=>{for(var n in t||(t={}))Zfe.call(t,n)&&GN(e,n,t[n]);if(ZN)for(var n of ZN(t))Gfe.call(t,n)&&GN(e,n,t[n]);return e},ih=(e,t)=>Wfe(e,Ufe(t)),Yfe=ue(e=>{const t=WW(e.headings.sizes).reduce((n,r)=>{const o=e.headings.sizes[r];return n[`& ${r}`]=ih(oh({fontFamily:e.headings.fontFamily,fontWeight:o.fontWeight||e.headings.fontWeight,marginTop:typeof o.lineHeight=="number"?`calc(${e.spacing.xl} * ${o.lineHeight})`:e.spacing.xl,marginBottom:e.spacing.sm},o),{[e.fn.smallerThan("sm")]:{fontSize:`calc(${M(o.fontSize)} / 1.3)`}}),n},{});return{root:ih(oh(ih(oh({},e.fn.fontStyles()),{color:e.colorScheme==="dark"?e.colors.dark[0]:e.black,lineHeight:e.lineHeight,fontSize:e.fontSizes.md,[e.fn.smallerThan("sm")]:{fontSize:e.fontSizes.sm}}),t),{"& img":{maxWidth:"100%",marginBottom:e.spacing.xs},"& p":{marginTop:0,marginBottom:e.spacing.lg},"& mark":{backgroundColor:e.fn.themeColor("yellow",e.colorScheme==="dark"?5:2),color:e.colorScheme==="dark"?e.colors.dark[9]:"inherit"},"& hr":{marginTop:e.spacing.md,marginBottom:e.spacing.sm,borderBottom:0,borderLeft:0,borderRight:0,borderTop:`${M(1)} dashed ${e.colors.gray[e.colorScheme==="dark"?4:6]}`},"& a":ih(oh({},e.fn.focusStyles()),{color:e.colors[e.primaryColor][e.colorScheme==="dark"?4:6],textDecoration:"none","&:hover":{textDecoration:"underline"}}),"& pre":{padding:e.spacing.xs,lineHeight:e.lineHeight,margin:0,marginTop:e.spacing.md,marginBottom:e.spacing.md,overflowX:"auto",fontFamily:e.fontFamilyMonospace,fontSize:e.fontSizes.sm,borderRadius:e.radius.sm,backgroundColor:e.colorScheme==="dark"?e.colors.dark[8]:e.colors.gray[0],"& code":{backgroundColor:"transparent",padding:0,borderRadius:0,color:"inherit",border:0}},"& code":{lineHeight:e.lineHeight,padding:`${M(1)} ${M(5)}`,borderRadius:e.radius.sm,color:e.colorScheme==="dark"?e.colors.dark[0]:e.black,backgroundColor:e.colorScheme==="dark"?e.colors.dark[9]:e.colors.gray[0],fontFamily:e.fontFamilyMonospace,fontSize:e.fontSizes.xs,border:`${M(1)} solid ${e.colorScheme==="dark"?e.colors.dark[9]:e.colors.gray[3]}`},"& ul, & ol":{marginBottom:e.spacing.md,paddingLeft:38,"& li":{marginTop:e.spacing.xs}},"& table":{width:"100%",borderCollapse:"collapse",captionSide:"bottom",marginBottom:e.spacing.md,"& caption":{marginTop:e.spacing.xs,fontSize:e.fontSizes.sm,color:e.colorScheme==="dark"?e.colors.dark[2]:e.colors.gray[6]},"& th":{textAlign:"left",fontWeight:"bold",color:e.colorScheme==="dark"?e.colors.dark[0]:e.colors.gray[7],fontSize:14,padding:`${M(7)} ${M(10)}`},"& thead th":{borderBottom:`${M(1)} solid ${e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[3]}`},"& tfoot th":{borderTop:`${M(1)} solid ${e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[3]}`},"& td":{padding:`${M(7)} ${M(10)}`,borderBottom:`${M(1)} solid ${e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[3]}`,fontSize:14},"& tr:last-of-type td":{borderBottom:"none"}},"& blockquote":{fontSize:e.fontSizes.lg,lineHeight:e.lineHeight,margin:`${e.spacing.md} 0`,borderTopRightRadius:e.radius.sm,borderBottomRightRadius:e.radius.sm,padding:`${e.spacing.md} ${e.spacing.lg}`,color:e.colorScheme==="dark"?e.colors.dark[0]:e.black,borderLeft:`${M(6)} solid ${e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[3]}`,"& cite":{display:"block",fontSize:e.fontSizes.sm,marginTop:e.spacing.xs,color:e.colorScheme==="dark"?e.colors.dark[2]:e.colors.gray[6],overflow:"hidden",textOverflow:"ellipsis"}}})}});const Kfe=Yfe;var qfe=Object.defineProperty,Ev=Object.getOwnPropertySymbols,s8=Object.prototype.hasOwnProperty,a8=Object.prototype.propertyIsEnumerable,YN=(e,t,n)=>t in e?qfe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Jfe=(e,t)=>{for(var n in t||(t={}))s8.call(t,n)&&YN(e,n,t[n]);if(Ev)for(var n of Ev(t))a8.call(t,n)&&YN(e,n,t[n]);return e},Xfe=(e,t)=>{var n={};for(var r in e)s8.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Ev)for(var r of Ev(e))t.indexOf(r)<0&&a8.call(e,r)&&(n[r]=e[r]);return n};const l8=_.forwardRef((e,t)=>{const n=ae("TypographyStylesProvider",{},e),{className:r,unstyled:o,variant:i}=n,s=Xfe(n,["className","unstyled","variant"]),{classes:a,cx:c}=Kfe(null,{name:"TypographyStylesProvider",unstyled:o,variant:i});return k.createElement(Pe,Jfe({className:c(a.root,r),ref:t},s))});l8.displayName="@mantine/core/TypographyStylesProvider";var tx={},KN=xs;tx.createRoot=KN.createRoot,tx.hydrateRoot=KN.hydrateRoot;/** * @remix-run/router v1.9.0 * * Copyright (c) Remix Software Inc. @@ -93,7 +93,7 @@ Error generating stack: `+i.message+` * LICENSE.md file in the root directory of this source tree. * * @license MIT - */function mf(){return mf=Object.assign?Object.assign.bind():function(e){for(var t=1;t"u")throw new Error(t)}function I0(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function tpe(){return Math.random().toString(36).substr(2,8)}function JN(e,t){return{usr:e.state,key:e.key,idx:t}}function nx(e,t,n,r){return n===void 0&&(n=null),mf({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?Vl(t):t,{state:n,key:t&&t.key||r||tpe()})}function $v(e){let{pathname:t="/",search:n="",hash:r=""}=e;return n&&n!=="?"&&(t+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(t+=r.charAt(0)==="#"?r:"#"+r),t}function Vl(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function npe(e,t,n,r){r===void 0&&(r={});let{window:o=document.defaultView,v5Compat:i=!1}=r,s=o.history,a=Qs.Pop,c=null,u=f();u==null&&(u=0,s.replaceState(mf({},s.state,{idx:u}),""));function f(){return(s.state||{idx:null}).idx}function p(){a=Qs.Pop;let P=f(),x=P==null?null:P-u;u=P,c&&c({action:a,location:w.location,delta:x})}function g(P,x){a=Qs.Push;let S=nx(w.location,P,x);n&&n(S,P),u=f()+1;let O=JN(S,u),E=w.createHref(S);try{s.pushState(O,"",E)}catch($){if($ instanceof DOMException&&$.name==="DataCloneError")throw $;o.location.assign(E)}i&&c&&c({action:a,location:w.location,delta:1})}function v(P,x){a=Qs.Replace;let S=nx(w.location,P,x);n&&n(S,P),u=f();let O=JN(S,u),E=w.createHref(S);s.replaceState(O,"",E),i&&c&&c({action:a,location:w.location,delta:0})}function y(P){let x=o.location.origin!=="null"?o.location.origin:o.location.href,S=typeof P=="string"?P:$v(P);return un(x,"No window.location.(origin|href) available to create URL for href: "+S),new URL(S,x)}let w={get action(){return a},get location(){return e(o,s)},listen(P){if(c)throw new Error("A history only accepts one active listener");return o.addEventListener(qN,p),c=P,()=>{o.removeEventListener(qN,p),c=null}},createHref(P){return t(o,P)},createURL:y,encodeLocation(P){let x=y(P);return{pathname:x.pathname,search:x.search,hash:x.hash}},push:g,replace:v,go(P){return s.go(P)}};return w}var XN;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(XN||(XN={}));function rpe(e,t,n){n===void 0&&(n="/");let r=typeof t=="string"?Vl(t):t,o=IP(r.pathname||"/",n);if(o==null)return null;let i=c8(e);ope(i);let s=null;for(let a=0;s==null&&a{let c={relativePath:a===void 0?i.path||"":a,caseSensitive:i.caseSensitive===!0,childrenIndex:s,route:i};c.relativePath.startsWith("/")&&(un(c.relativePath.startsWith(r),'Absolute route path "'+c.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),c.relativePath=c.relativePath.slice(r.length));let u=ga([r,c.relativePath]),f=n.concat(c);i.children&&i.children.length>0&&(un(i.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+u+'".')),c8(i.children,t,f,u)),!(i.path==null&&!i.index)&&t.push({path:u,score:dpe(u,i.index),routesMeta:f})};return e.forEach((i,s)=>{var a;if(i.path===""||!((a=i.path)!=null&&a.includes("?")))o(i,s);else for(let c of u8(i.path))o(i,s,c)}),t}function u8(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,o=n.endsWith("?"),i=n.replace(/\?$/,"");if(r.length===0)return o?[i,""]:[i];let s=u8(r.join("/")),a=[];return a.push(...s.map(c=>c===""?i:[i,c].join("/"))),o&&a.push(...s),a.map(c=>e.startsWith("/")&&c===""?"/":c)}function ope(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:fpe(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const ipe=/^:\w+$/,spe=3,ape=2,lpe=1,cpe=10,upe=-2,QN=e=>e==="*";function dpe(e,t){let n=e.split("/"),r=n.length;return n.some(QN)&&(r+=upe),t&&(r+=ape),n.filter(o=>!QN(o)).reduce((o,i)=>o+(ipe.test(i)?spe:i===""?lpe:cpe),r)}function fpe(e,t){return e.length===t.length&&e.slice(0,-1).every((r,o)=>r===t[o])?e[e.length-1]-t[t.length-1]:0}function ppe(e,t){let{routesMeta:n}=e,r={},o="/",i=[];for(let s=0;s{if(f==="*"){let g=a[p]||"";s=i.slice(0,i.length-g.length).replace(/(.)\/+$/,"$1")}return u[f]=vpe(a[p]||"",f),u},{}),pathname:i,pathnameBase:s,pattern:e}}function mpe(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),I0(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let r=[],o="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^$?{}|()[\]]/g,"\\$&").replace(/\/:(\w+)/g,(s,a)=>(r.push(a),"/([^\\/]+)"));return e.endsWith("*")?(r.push("*"),o+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?o+="\\/*$":e!==""&&e!=="/"&&(o+="(?:(?=\\/|$))"),[new RegExp(o,t?void 0:"i"),r]}function gpe(e){try{return decodeURI(e)}catch(t){return I0(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function vpe(e,t){try{return decodeURIComponent(e)}catch(n){return I0(!1,'The value for the URL param "'+t+'" will not be decoded because'+(' the string "'+e+'" is a malformed URL segment. This is probably')+(" due to a bad percent encoding ("+n+").")),e}}function IP(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}function ype(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:o=""}=typeof e=="string"?Vl(e):e;return{pathname:n?n.startsWith("/")?n:_pe(n,t):t,search:bpe(r),hash:xpe(o)}}function _pe(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(o=>{o===".."?n.length>1&&n.pop():o!=="."&&n.push(o)}),n.length>1?n.join("/"):"/"}function Z_(e,t,n,r){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(r)+"]. Please separate it out to the ")+("`to."+n+"` field. Alternatively you may provide the full path as ")+'a string in and the router will parse it for you.'}function d8(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function f8(e,t,n,r){r===void 0&&(r=!1);let o;typeof e=="string"?o=Vl(e):(o=mf({},e),un(!o.pathname||!o.pathname.includes("?"),Z_("?","pathname","search",o)),un(!o.pathname||!o.pathname.includes("#"),Z_("#","pathname","hash",o)),un(!o.search||!o.search.includes("#"),Z_("#","search","hash",o)));let i=e===""||o.pathname==="",s=i?"/":o.pathname,a;if(r||s==null)a=n;else{let p=t.length-1;if(s.startsWith("..")){let g=s.split("/");for(;g[0]==="..";)g.shift(),p-=1;o.pathname=g.join("/")}a=p>=0?t[p]:"/"}let c=ype(o,a),u=s&&s!=="/"&&s.endsWith("/"),f=(i||s===".")&&n.endsWith("/");return!c.pathname.endsWith("/")&&(u||f)&&(c.pathname+="/"),c}const ga=e=>e.join("/").replace(/\/\/+/g,"/"),wpe=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),bpe=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,xpe=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function Spe(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const p8=["post","put","patch","delete"];new Set(p8);const Ppe=["get",...p8];new Set(Ppe);/** + */function mf(){return mf=Object.assign?Object.assign.bind():function(e){for(var t=1;t"u")throw new Error(t)}function I0(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function epe(){return Math.random().toString(36).substr(2,8)}function JN(e,t){return{usr:e.state,key:e.key,idx:t}}function nx(e,t,n,r){return n===void 0&&(n=null),mf({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?Vl(t):t,{state:n,key:t&&t.key||r||epe()})}function $v(e){let{pathname:t="/",search:n="",hash:r=""}=e;return n&&n!=="?"&&(t+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(t+=r.charAt(0)==="#"?r:"#"+r),t}function Vl(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function tpe(e,t,n,r){r===void 0&&(r={});let{window:o=document.defaultView,v5Compat:i=!1}=r,s=o.history,a=Qs.Pop,c=null,u=f();u==null&&(u=0,s.replaceState(mf({},s.state,{idx:u}),""));function f(){return(s.state||{idx:null}).idx}function p(){a=Qs.Pop;let P=f(),x=P==null?null:P-u;u=P,c&&c({action:a,location:w.location,delta:x})}function g(P,x){a=Qs.Push;let S=nx(w.location,P,x);n&&n(S,P),u=f()+1;let O=JN(S,u),E=w.createHref(S);try{s.pushState(O,"",E)}catch($){if($ instanceof DOMException&&$.name==="DataCloneError")throw $;o.location.assign(E)}i&&c&&c({action:a,location:w.location,delta:1})}function v(P,x){a=Qs.Replace;let S=nx(w.location,P,x);n&&n(S,P),u=f();let O=JN(S,u),E=w.createHref(S);s.replaceState(O,"",E),i&&c&&c({action:a,location:w.location,delta:0})}function y(P){let x=o.location.origin!=="null"?o.location.origin:o.location.href,S=typeof P=="string"?P:$v(P);return un(x,"No window.location.(origin|href) available to create URL for href: "+S),new URL(S,x)}let w={get action(){return a},get location(){return e(o,s)},listen(P){if(c)throw new Error("A history only accepts one active listener");return o.addEventListener(qN,p),c=P,()=>{o.removeEventListener(qN,p),c=null}},createHref(P){return t(o,P)},createURL:y,encodeLocation(P){let x=y(P);return{pathname:x.pathname,search:x.search,hash:x.hash}},push:g,replace:v,go(P){return s.go(P)}};return w}var XN;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(XN||(XN={}));function npe(e,t,n){n===void 0&&(n="/");let r=typeof t=="string"?Vl(t):t,o=IP(r.pathname||"/",n);if(o==null)return null;let i=c8(e);rpe(i);let s=null;for(let a=0;s==null&&a{let c={relativePath:a===void 0?i.path||"":a,caseSensitive:i.caseSensitive===!0,childrenIndex:s,route:i};c.relativePath.startsWith("/")&&(un(c.relativePath.startsWith(r),'Absolute route path "'+c.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),c.relativePath=c.relativePath.slice(r.length));let u=ga([r,c.relativePath]),f=n.concat(c);i.children&&i.children.length>0&&(un(i.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+u+'".')),c8(i.children,t,f,u)),!(i.path==null&&!i.index)&&t.push({path:u,score:upe(u,i.index),routesMeta:f})};return e.forEach((i,s)=>{var a;if(i.path===""||!((a=i.path)!=null&&a.includes("?")))o(i,s);else for(let c of u8(i.path))o(i,s,c)}),t}function u8(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,o=n.endsWith("?"),i=n.replace(/\?$/,"");if(r.length===0)return o?[i,""]:[i];let s=u8(r.join("/")),a=[];return a.push(...s.map(c=>c===""?i:[i,c].join("/"))),o&&a.push(...s),a.map(c=>e.startsWith("/")&&c===""?"/":c)}function rpe(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:dpe(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const ope=/^:\w+$/,ipe=3,spe=2,ape=1,lpe=10,cpe=-2,QN=e=>e==="*";function upe(e,t){let n=e.split("/"),r=n.length;return n.some(QN)&&(r+=cpe),t&&(r+=spe),n.filter(o=>!QN(o)).reduce((o,i)=>o+(ope.test(i)?ipe:i===""?ape:lpe),r)}function dpe(e,t){return e.length===t.length&&e.slice(0,-1).every((r,o)=>r===t[o])?e[e.length-1]-t[t.length-1]:0}function fpe(e,t){let{routesMeta:n}=e,r={},o="/",i=[];for(let s=0;s{if(f==="*"){let g=a[p]||"";s=i.slice(0,i.length-g.length).replace(/(.)\/+$/,"$1")}return u[f]=gpe(a[p]||"",f),u},{}),pathname:i,pathnameBase:s,pattern:e}}function hpe(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),I0(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let r=[],o="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^$?{}|()[\]]/g,"\\$&").replace(/\/:(\w+)/g,(s,a)=>(r.push(a),"/([^\\/]+)"));return e.endsWith("*")?(r.push("*"),o+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?o+="\\/*$":e!==""&&e!=="/"&&(o+="(?:(?=\\/|$))"),[new RegExp(o,t?void 0:"i"),r]}function mpe(e){try{return decodeURI(e)}catch(t){return I0(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function gpe(e,t){try{return decodeURIComponent(e)}catch(n){return I0(!1,'The value for the URL param "'+t+'" will not be decoded because'+(' the string "'+e+'" is a malformed URL segment. This is probably')+(" due to a bad percent encoding ("+n+").")),e}}function IP(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}function vpe(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:o=""}=typeof e=="string"?Vl(e):e;return{pathname:n?n.startsWith("/")?n:ype(n,t):t,search:wpe(r),hash:bpe(o)}}function ype(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(o=>{o===".."?n.length>1&&n.pop():o!=="."&&n.push(o)}),n.length>1?n.join("/"):"/"}function Z_(e,t,n,r){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(r)+"]. Please separate it out to the ")+("`to."+n+"` field. Alternatively you may provide the full path as ")+'a string in and the router will parse it for you.'}function d8(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function f8(e,t,n,r){r===void 0&&(r=!1);let o;typeof e=="string"?o=Vl(e):(o=mf({},e),un(!o.pathname||!o.pathname.includes("?"),Z_("?","pathname","search",o)),un(!o.pathname||!o.pathname.includes("#"),Z_("#","pathname","hash",o)),un(!o.search||!o.search.includes("#"),Z_("#","search","hash",o)));let i=e===""||o.pathname==="",s=i?"/":o.pathname,a;if(r||s==null)a=n;else{let p=t.length-1;if(s.startsWith("..")){let g=s.split("/");for(;g[0]==="..";)g.shift(),p-=1;o.pathname=g.join("/")}a=p>=0?t[p]:"/"}let c=vpe(o,a),u=s&&s!=="/"&&s.endsWith("/"),f=(i||s===".")&&n.endsWith("/");return!c.pathname.endsWith("/")&&(u||f)&&(c.pathname+="/"),c}const ga=e=>e.join("/").replace(/\/\/+/g,"/"),_pe=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),wpe=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,bpe=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function xpe(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const p8=["post","put","patch","delete"];new Set(p8);const Spe=["get",...p8];new Set(Spe);/** * React Router v6.16.0 * * Copyright (c) Remix Software Inc. @@ -102,7 +102,7 @@ Error generating stack: `+i.message+` * LICENSE.md file in the root directory of this source tree. * * @license MIT - */function Mv(){return Mv=Object.assign?Object.assign.bind():function(e){for(var t=1;tc.pathnameBase)),s=_.useRef(!1);return g8(()=>{s.current=!0}),_.useCallback(function(c,u){if(u===void 0&&(u={}),!s.current)return;if(typeof c=="number"){n.go(c);return}let f=f8(c,JSON.parse(i),o,u.relative==="path");e==null&&t!=="/"&&(f.pathname=f.pathname==="/"?t:ga([t,f.pathname])),(u.replace?n.replace:n.push)(f,u.state,u)},[t,n,i,o,e])}function LP(e,t){let{relative:n}=t===void 0?{}:t,{matches:r}=_.useContext(Wl),{pathname:o}=ku(),i=JSON.stringify(d8(r).map(s=>s.pathnameBase));return _.useMemo(()=>f8(e,JSON.parse(i),o,n==="path"),[e,i,o,n])}function kpe(e,t){return Epe(e,t)}function Epe(e,t,n){Zf()||un(!1);let{navigator:r}=_.useContext(Hl),{matches:o}=_.useContext(Wl),i=o[o.length-1],s=i?i.params:{};i&&i.pathname;let a=i?i.pathnameBase:"/";i&&i.route;let c=ku(),u;if(t){var f;let w=typeof t=="string"?Vl(t):t;a==="/"||(f=w.pathname)!=null&&f.startsWith(a)||un(!1),u=w}else u=c;let p=u.pathname||"/",g=a==="/"?p:p.slice(a.length)||"/",v=rpe(e,{pathname:g}),y=Ipe(v&&v.map(w=>Object.assign({},w,{params:Object.assign({},s,w.params),pathname:ga([a,r.encodeLocation?r.encodeLocation(w.pathname).pathname:w.pathname]),pathnameBase:w.pathnameBase==="/"?a:ga([a,r.encodeLocation?r.encodeLocation(w.pathnameBase).pathname:w.pathnameBase])})),o,n);return t&&y?_.createElement(j0.Provider,{value:{location:Mv({pathname:"/",search:"",hash:"",state:null,key:"default"},u),navigationType:Qs.Pop}},y):y}function $pe(){let e=Rpe(),t=Spe(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,o={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"},i=null;return _.createElement(_.Fragment,null,_.createElement("h2",null,"Unexpected Application Error!"),_.createElement("h3",{style:{fontStyle:"italic"}},t),n?_.createElement("pre",{style:o},n):null,i)}const Mpe=_.createElement($pe,null);class Npe extends _.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,n){return n.location!==t.location||n.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error||n.error,location:n.location,revalidation:t.revalidation||n.revalidation}}componentDidCatch(t,n){console.error("React Router caught the following error during render",t,n)}render(){return this.state.error?_.createElement(Wl.Provider,{value:this.props.routeContext},_.createElement(m8.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function Tpe(e){let{routeContext:t,match:n,children:r}=e,o=_.useContext(jP);return o&&o.static&&o.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(o.staticContext._deepestRenderedBoundaryId=n.route.id),_.createElement(Wl.Provider,{value:t},r)}function Ipe(e,t,n){var r;if(t===void 0&&(t=[]),n===void 0&&(n=null),e==null){var o;if((o=n)!=null&&o.errors)e=n.matches;else return null}let i=e,s=(r=n)==null?void 0:r.errors;if(s!=null){let a=i.findIndex(c=>c.route.id&&s?.[c.route.id]);a>=0||un(!1),i=i.slice(0,Math.min(i.length,a+1))}return i.reduceRight((a,c,u)=>{let f=c.route.id?s?.[c.route.id]:null,p=null;n&&(p=c.route.errorElement||Mpe);let g=t.concat(i.slice(0,u+1)),v=()=>{let y;return f?y=p:c.route.Component?y=_.createElement(c.route.Component,null):c.route.element?y=c.route.element:y=a,_.createElement(Tpe,{match:c,routeContext:{outlet:a,matches:g,isDataRoute:n!=null},children:y})};return n&&(c.route.ErrorBoundary||c.route.errorElement||u===0)?_.createElement(Npe,{location:n.location,revalidation:n.revalidation,component:p,error:f,children:v(),routeContext:{outlet:null,matches:g,isDataRoute:!0}}):v()},null)}var v8=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(v8||{}),Nv=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(Nv||{});function jpe(e){let t=_.useContext(jP);return t||un(!1),t}function Lpe(e){let t=_.useContext(h8);return t||un(!1),t}function Dpe(e){let t=_.useContext(Wl);return t||un(!1),t}function y8(e){let t=Dpe(),n=t.matches[t.matches.length-1];return n.route.id||un(!1),n.route.id}function Rpe(){var e;let t=_.useContext(m8),n=Lpe(Nv.UseRouteError),r=y8(Nv.UseRouteError);return t||((e=n.errors)==null?void 0:e[r])}function zpe(){let{router:e}=jpe(v8.UseNavigateStable),t=y8(Nv.UseNavigateStable),n=_.useRef(!1);return g8(()=>{n.current=!0}),_.useCallback(function(o,i){i===void 0&&(i={}),n.current&&(typeof o=="number"?e.navigate(o):e.navigate(o,Mv({fromRouteId:t},i)))},[e,t])}function fi(e){un(!1)}function Ape(e){let{basename:t="/",children:n=null,location:r,navigationType:o=Qs.Pop,navigator:i,static:s=!1}=e;Zf()&&un(!1);let a=t.replace(/^\/*/,"/"),c=_.useMemo(()=>({basename:a,navigator:i,static:s}),[a,i,s]);typeof r=="string"&&(r=Vl(r));let{pathname:u="/",search:f="",hash:p="",state:g=null,key:v="default"}=r,y=_.useMemo(()=>{let w=IP(u,a);return w==null?null:{location:{pathname:w,search:f,hash:p,state:g,key:v},navigationType:o}},[a,u,f,p,g,v,o]);return y==null?null:_.createElement(Hl.Provider,{value:c},_.createElement(j0.Provider,{children:n,value:y}))}function Bpe(e){let{children:t,location:n}=e;return kpe(rx(t),n)}new Promise(()=>{});function rx(e,t){t===void 0&&(t=[]);let n=[];return _.Children.forEach(e,(r,o)=>{if(!_.isValidElement(r))return;let i=[...t,o];if(r.type===_.Fragment){n.push.apply(n,rx(r.props.children,i));return}r.type!==fi&&un(!1),!r.props.index||!r.props.children||un(!1);let s={id:r.props.id||i.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,loader:r.props.loader,action:r.props.action,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(s.children=rx(r.props.children,i)),n.push(s)}),n}/** + */function Mv(){return Mv=Object.assign?Object.assign.bind():function(e){for(var t=1;tc.pathnameBase)),s=_.useRef(!1);return g8(()=>{s.current=!0}),_.useCallback(function(c,u){if(u===void 0&&(u={}),!s.current)return;if(typeof c=="number"){n.go(c);return}let f=f8(c,JSON.parse(i),o,u.relative==="path");e==null&&t!=="/"&&(f.pathname=f.pathname==="/"?t:ga([t,f.pathname])),(u.replace?n.replace:n.push)(f,u.state,u)},[t,n,i,o,e])}function LP(e,t){let{relative:n}=t===void 0?{}:t,{matches:r}=_.useContext(Wl),{pathname:o}=ku(),i=JSON.stringify(d8(r).map(s=>s.pathnameBase));return _.useMemo(()=>f8(e,JSON.parse(i),o,n==="path"),[e,i,o,n])}function Cpe(e,t){return kpe(e,t)}function kpe(e,t,n){Zf()||un(!1);let{navigator:r}=_.useContext(Hl),{matches:o}=_.useContext(Wl),i=o[o.length-1],s=i?i.params:{};i&&i.pathname;let a=i?i.pathnameBase:"/";i&&i.route;let c=ku(),u;if(t){var f;let w=typeof t=="string"?Vl(t):t;a==="/"||(f=w.pathname)!=null&&f.startsWith(a)||un(!1),u=w}else u=c;let p=u.pathname||"/",g=a==="/"?p:p.slice(a.length)||"/",v=npe(e,{pathname:g}),y=Tpe(v&&v.map(w=>Object.assign({},w,{params:Object.assign({},s,w.params),pathname:ga([a,r.encodeLocation?r.encodeLocation(w.pathname).pathname:w.pathname]),pathnameBase:w.pathnameBase==="/"?a:ga([a,r.encodeLocation?r.encodeLocation(w.pathnameBase).pathname:w.pathnameBase])})),o,n);return t&&y?_.createElement(j0.Provider,{value:{location:Mv({pathname:"/",search:"",hash:"",state:null,key:"default"},u),navigationType:Qs.Pop}},y):y}function Epe(){let e=Dpe(),t=xpe(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,o={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"},i=null;return _.createElement(_.Fragment,null,_.createElement("h2",null,"Unexpected Application Error!"),_.createElement("h3",{style:{fontStyle:"italic"}},t),n?_.createElement("pre",{style:o},n):null,i)}const $pe=_.createElement(Epe,null);class Mpe extends _.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,n){return n.location!==t.location||n.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error||n.error,location:n.location,revalidation:t.revalidation||n.revalidation}}componentDidCatch(t,n){console.error("React Router caught the following error during render",t,n)}render(){return this.state.error?_.createElement(Wl.Provider,{value:this.props.routeContext},_.createElement(m8.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function Npe(e){let{routeContext:t,match:n,children:r}=e,o=_.useContext(jP);return o&&o.static&&o.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(o.staticContext._deepestRenderedBoundaryId=n.route.id),_.createElement(Wl.Provider,{value:t},r)}function Tpe(e,t,n){var r;if(t===void 0&&(t=[]),n===void 0&&(n=null),e==null){var o;if((o=n)!=null&&o.errors)e=n.matches;else return null}let i=e,s=(r=n)==null?void 0:r.errors;if(s!=null){let a=i.findIndex(c=>c.route.id&&s?.[c.route.id]);a>=0||un(!1),i=i.slice(0,Math.min(i.length,a+1))}return i.reduceRight((a,c,u)=>{let f=c.route.id?s?.[c.route.id]:null,p=null;n&&(p=c.route.errorElement||$pe);let g=t.concat(i.slice(0,u+1)),v=()=>{let y;return f?y=p:c.route.Component?y=_.createElement(c.route.Component,null):c.route.element?y=c.route.element:y=a,_.createElement(Npe,{match:c,routeContext:{outlet:a,matches:g,isDataRoute:n!=null},children:y})};return n&&(c.route.ErrorBoundary||c.route.errorElement||u===0)?_.createElement(Mpe,{location:n.location,revalidation:n.revalidation,component:p,error:f,children:v(),routeContext:{outlet:null,matches:g,isDataRoute:!0}}):v()},null)}var v8=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(v8||{}),Nv=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(Nv||{});function Ipe(e){let t=_.useContext(jP);return t||un(!1),t}function jpe(e){let t=_.useContext(h8);return t||un(!1),t}function Lpe(e){let t=_.useContext(Wl);return t||un(!1),t}function y8(e){let t=Lpe(),n=t.matches[t.matches.length-1];return n.route.id||un(!1),n.route.id}function Dpe(){var e;let t=_.useContext(m8),n=jpe(Nv.UseRouteError),r=y8(Nv.UseRouteError);return t||((e=n.errors)==null?void 0:e[r])}function Rpe(){let{router:e}=Ipe(v8.UseNavigateStable),t=y8(Nv.UseNavigateStable),n=_.useRef(!1);return g8(()=>{n.current=!0}),_.useCallback(function(o,i){i===void 0&&(i={}),n.current&&(typeof o=="number"?e.navigate(o):e.navigate(o,Mv({fromRouteId:t},i)))},[e,t])}function fi(e){un(!1)}function zpe(e){let{basename:t="/",children:n=null,location:r,navigationType:o=Qs.Pop,navigator:i,static:s=!1}=e;Zf()&&un(!1);let a=t.replace(/^\/*/,"/"),c=_.useMemo(()=>({basename:a,navigator:i,static:s}),[a,i,s]);typeof r=="string"&&(r=Vl(r));let{pathname:u="/",search:f="",hash:p="",state:g=null,key:v="default"}=r,y=_.useMemo(()=>{let w=IP(u,a);return w==null?null:{location:{pathname:w,search:f,hash:p,state:g,key:v},navigationType:o}},[a,u,f,p,g,v,o]);return y==null?null:_.createElement(Hl.Provider,{value:c},_.createElement(j0.Provider,{children:n,value:y}))}function Ape(e){let{children:t,location:n}=e;return Cpe(rx(t),n)}new Promise(()=>{});function rx(e,t){t===void 0&&(t=[]);let n=[];return _.Children.forEach(e,(r,o)=>{if(!_.isValidElement(r))return;let i=[...t,o];if(r.type===_.Fragment){n.push.apply(n,rx(r.props.children,i));return}r.type!==fi&&un(!1),!r.props.index||!r.props.children||un(!1);let s={id:r.props.id||i.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,loader:r.props.loader,action:r.props.action,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(s.children=rx(r.props.children,i)),n.push(s)}),n}/** * React Router DOM v6.16.0 * * Copyright (c) Remix Software Inc. @@ -111,57 +111,57 @@ Error generating stack: `+i.message+` * LICENSE.md file in the root directory of this source tree. * * @license MIT - */function Tv(){return Tv=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&(n[o]=e[o]);return n}function Fpe(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function Vpe(e,t){return e.button===0&&(!t||t==="_self")&&!Fpe(e)}const Hpe=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset"],Wpe=["aria-current","caseSensitive","className","end","style","to","children"],Upe="startTransition",eT=Zd[Upe];function Zpe(e){let{basename:t,children:n,future:r,window:o}=e,i=_.useRef();i.current==null&&(i.current=epe({window:o,v5Compat:!0}));let s=i.current,[a,c]=_.useState({action:s.action,location:s.location}),{v7_startTransition:u}=r||{},f=_.useCallback(p=>{u&&eT?eT(()=>c(p)):c(p)},[c,u]);return _.useLayoutEffect(()=>s.listen(f),[s,f]),_.createElement(Ape,{basename:t,children:n,location:a.location,navigationType:a.action,navigator:s})}const Gpe=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",Ype=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Kpe=_.forwardRef(function(t,n){let{onClick:r,relative:o,reloadDocument:i,replace:s,state:a,target:c,to:u,preventScrollReset:f}=t,p=_8(t,Hpe),{basename:g}=_.useContext(Hl),v,y=!1;if(typeof u=="string"&&Ype.test(u)&&(v=u,Gpe))try{let S=new URL(window.location.href),O=u.startsWith("//")?new URL(S.protocol+u):new URL(u),E=IP(O.pathname,g);O.origin===S.origin&&E!=null?u=E+O.search+O.hash:y=!0}catch{}let w=Ope(u,{relative:o}),P=Jpe(u,{replace:s,state:a,target:c,preventScrollReset:f,relative:o});function x(S){r&&r(S),S.defaultPrevented||P(S)}return _.createElement("a",Tv({},p,{href:v||w,onClick:y||i?r:x,ref:n,target:c}))}),qpe=_.forwardRef(function(t,n){let{"aria-current":r="page",caseSensitive:o=!1,className:i="",end:s=!1,style:a,to:c,children:u}=t,f=_8(t,Wpe),p=LP(c,{relative:f.relative}),g=ku(),v=_.useContext(h8),{navigator:y}=_.useContext(Hl),w=y.encodeLocation?y.encodeLocation(p).pathname:p.pathname,P=g.pathname,x=v&&v.navigation&&v.navigation.location?v.navigation.location.pathname:null;o||(P=P.toLowerCase(),x=x?x.toLowerCase():null,w=w.toLowerCase());let S=P===w||!s&&P.startsWith(w)&&P.charAt(w.length)==="/",O=x!=null&&(x===w||!s&&x.startsWith(w)&&x.charAt(w.length)==="/"),E=S?r:void 0,$;typeof i=="function"?$=i({isActive:S,isPending:O}):$=[i,S?"active":null,O?"pending":null].filter(Boolean).join(" ");let N=typeof a=="function"?a({isActive:S,isPending:O}):a;return _.createElement(Kpe,Tv({},f,{"aria-current":E,className:$,ref:n,style:N,to:c}),typeof u=="function"?u({isActive:S,isPending:O}):u)});var tT;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher"})(tT||(tT={}));var nT;(function(e){e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(nT||(nT={}));function Jpe(e,t){let{target:n,replace:r,state:o,preventScrollReset:i,relative:s}=t===void 0?{}:t,a=Ul(),c=ku(),u=LP(e,{relative:s});return _.useCallback(f=>{if(Vpe(f,n)){f.preventDefault();let p=r!==void 0?r:$v(c)===$v(u);a(e,{replace:p,state:o,preventScrollReset:i,relative:s})}},[c,a,u,r,o,n,e,i,s])}/** + */function Tv(){return Tv=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&(n[o]=e[o]);return n}function Bpe(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function Fpe(e,t){return e.button===0&&(!t||t==="_self")&&!Bpe(e)}const Vpe=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset"],Hpe=["aria-current","caseSensitive","className","end","style","to","children"],Wpe="startTransition",eT=Zd[Wpe];function Upe(e){let{basename:t,children:n,future:r,window:o}=e,i=_.useRef();i.current==null&&(i.current=Qfe({window:o,v5Compat:!0}));let s=i.current,[a,c]=_.useState({action:s.action,location:s.location}),{v7_startTransition:u}=r||{},f=_.useCallback(p=>{u&&eT?eT(()=>c(p)):c(p)},[c,u]);return _.useLayoutEffect(()=>s.listen(f),[s,f]),_.createElement(zpe,{basename:t,children:n,location:a.location,navigationType:a.action,navigator:s})}const Zpe=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",Gpe=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Ype=_.forwardRef(function(t,n){let{onClick:r,relative:o,reloadDocument:i,replace:s,state:a,target:c,to:u,preventScrollReset:f}=t,p=_8(t,Vpe),{basename:g}=_.useContext(Hl),v,y=!1;if(typeof u=="string"&&Gpe.test(u)&&(v=u,Zpe))try{let S=new URL(window.location.href),O=u.startsWith("//")?new URL(S.protocol+u):new URL(u),E=IP(O.pathname,g);O.origin===S.origin&&E!=null?u=E+O.search+O.hash:y=!0}catch{}let w=Ppe(u,{relative:o}),P=qpe(u,{replace:s,state:a,target:c,preventScrollReset:f,relative:o});function x(S){r&&r(S),S.defaultPrevented||P(S)}return _.createElement("a",Tv({},p,{href:v||w,onClick:y||i?r:x,ref:n,target:c}))}),Kpe=_.forwardRef(function(t,n){let{"aria-current":r="page",caseSensitive:o=!1,className:i="",end:s=!1,style:a,to:c,children:u}=t,f=_8(t,Hpe),p=LP(c,{relative:f.relative}),g=ku(),v=_.useContext(h8),{navigator:y}=_.useContext(Hl),w=y.encodeLocation?y.encodeLocation(p).pathname:p.pathname,P=g.pathname,x=v&&v.navigation&&v.navigation.location?v.navigation.location.pathname:null;o||(P=P.toLowerCase(),x=x?x.toLowerCase():null,w=w.toLowerCase());let S=P===w||!s&&P.startsWith(w)&&P.charAt(w.length)==="/",O=x!=null&&(x===w||!s&&x.startsWith(w)&&x.charAt(w.length)==="/"),E=S?r:void 0,$;typeof i=="function"?$=i({isActive:S,isPending:O}):$=[i,S?"active":null,O?"pending":null].filter(Boolean).join(" ");let N=typeof a=="function"?a({isActive:S,isPending:O}):a;return _.createElement(Ype,Tv({},f,{"aria-current":E,className:$,ref:n,style:N,to:c}),typeof u=="function"?u({isActive:S,isPending:O}):u)});var tT;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher"})(tT||(tT={}));var nT;(function(e){e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(nT||(nT={}));function qpe(e,t){let{target:n,replace:r,state:o,preventScrollReset:i,relative:s}=t===void 0?{}:t,a=Ul(),c=ku(),u=LP(e,{relative:s});return _.useCallback(f=>{if(Fpe(f,n)){f.preventDefault();let p=r!==void 0?r:$v(c)===$v(u);a(e,{replace:p,state:o,preventScrollReset:i,relative:s})}},[c,a,u,r,o,n,e,i,s])}/** * @license @tabler/icons-react v3.12.0 - MIT * * This source code is licensed under the MIT license. * See the LICENSE file in the root directory of this source tree. - */var Xpe={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"}};/** + */var Jpe={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.12.0 - MIT * * This source code is licensed under the MIT license. * See the LICENSE file in the root directory of this source tree. - */const he=(e,t,n,r)=>{const o=_.forwardRef(({color:i="currentColor",size:s=24,stroke:a=2,title:c,className:u,children:f,...p},g)=>_.createElement("svg",{ref:g,...Xpe[e],width:s,height:s,className:["tabler-icon",`tabler-icon-${t}`,u].join(" "),...e==="filled"?{fill:i}:{strokeWidth:a,stroke:i},...p},[c&&_.createElement("title",{key:"svg-title"},c),...r.map(([v,y])=>_.createElement(v,y)),...Array.isArray(f)?f:[f]]));return o.displayName=`${n}`,o};/** + */const he=(e,t,n,r)=>{const o=_.forwardRef(({color:i="currentColor",size:s=24,stroke:a=2,title:c,className:u,children:f,...p},g)=>_.createElement("svg",{ref:g,...Jpe[e],width:s,height:s,className:["tabler-icon",`tabler-icon-${t}`,u].join(" "),...e==="filled"?{fill:i}:{strokeWidth:a,stroke:i},...p},[c&&_.createElement("title",{key:"svg-title"},c),...r.map(([v,y])=>_.createElement(v,y)),...Array.isArray(f)?f:[f]]));return o.displayName=`${n}`,o};/** * @license @tabler/icons-react v3.12.0 - MIT * * This source code is licensed under the MIT license. * See the LICENSE file in the root directory of this source tree. - */var Qpe=he("outline","align-center","IconAlignCenter",[["path",{d:"M4 6l16 0",key:"svg-0"}],["path",{d:"M8 12l8 0",key:"svg-1"}],["path",{d:"M6 18l12 0",key:"svg-2"}]]);/** + */var Xpe=he("outline","align-center","IconAlignCenter",[["path",{d:"M4 6l16 0",key:"svg-0"}],["path",{d:"M8 12l8 0",key:"svg-1"}],["path",{d:"M6 18l12 0",key:"svg-2"}]]);/** * @license @tabler/icons-react v3.12.0 - MIT * * This source code is licensed under the MIT license. * See the LICENSE file in the root directory of this source tree. - */var ehe=he("outline","align-justified","IconAlignJustified",[["path",{d:"M4 6l16 0",key:"svg-0"}],["path",{d:"M4 12l16 0",key:"svg-1"}],["path",{d:"M4 18l12 0",key:"svg-2"}]]);/** + */var Qpe=he("outline","align-justified","IconAlignJustified",[["path",{d:"M4 6l16 0",key:"svg-0"}],["path",{d:"M4 12l16 0",key:"svg-1"}],["path",{d:"M4 18l12 0",key:"svg-2"}]]);/** * @license @tabler/icons-react v3.12.0 - MIT * * This source code is licensed under the MIT license. * See the LICENSE file in the root directory of this source tree. - */var the=he("outline","align-left","IconAlignLeft",[["path",{d:"M4 6l16 0",key:"svg-0"}],["path",{d:"M4 12l10 0",key:"svg-1"}],["path",{d:"M4 18l14 0",key:"svg-2"}]]);/** + */var ehe=he("outline","align-left","IconAlignLeft",[["path",{d:"M4 6l16 0",key:"svg-0"}],["path",{d:"M4 12l10 0",key:"svg-1"}],["path",{d:"M4 18l14 0",key:"svg-2"}]]);/** * @license @tabler/icons-react v3.12.0 - MIT * * This source code is licensed under the MIT license. * See the LICENSE file in the root directory of this source tree. - */var nhe=he("outline","align-right","IconAlignRight",[["path",{d:"M4 6l16 0",key:"svg-0"}],["path",{d:"M10 12l10 0",key:"svg-1"}],["path",{d:"M6 18l14 0",key:"svg-2"}]]);/** + */var the=he("outline","align-right","IconAlignRight",[["path",{d:"M4 6l16 0",key:"svg-0"}],["path",{d:"M10 12l10 0",key:"svg-1"}],["path",{d:"M6 18l14 0",key:"svg-2"}]]);/** * @license @tabler/icons-react v3.12.0 - MIT * * This source code is licensed under the MIT license. * See the LICENSE file in the root directory of this source tree. - */var rhe=he("outline","arrow-back-up","IconArrowBackUp",[["path",{d:"M9 14l-4 -4l4 -4",key:"svg-0"}],["path",{d:"M5 10h11a4 4 0 1 1 0 8h-1",key:"svg-1"}]]);/** + */var nhe=he("outline","arrow-back-up","IconArrowBackUp",[["path",{d:"M9 14l-4 -4l4 -4",key:"svg-0"}],["path",{d:"M5 10h11a4 4 0 1 1 0 8h-1",key:"svg-1"}]]);/** * @license @tabler/icons-react v3.12.0 - MIT * * This source code is licensed under the MIT license. * See the LICENSE file in the root directory of this source tree. - */var ohe=he("outline","arrow-badge-up","IconArrowBadgeUp",[["path",{d:"M17 11v6l-5 -4l-5 4v-6l5 -4z",key:"svg-0"}]]);/** + */var rhe=he("outline","arrow-badge-up","IconArrowBadgeUp",[["path",{d:"M17 11v6l-5 -4l-5 4v-6l5 -4z",key:"svg-0"}]]);/** * @license @tabler/icons-react v3.12.0 - MIT * * This source code is licensed under the MIT license. * See the LICENSE file in the root directory of this source tree. - */var ihe=he("outline","arrow-left","IconArrowLeft",[["path",{d:"M5 12l14 0",key:"svg-0"}],["path",{d:"M5 12l6 6",key:"svg-1"}],["path",{d:"M5 12l6 -6",key:"svg-2"}]]);/** + */var ohe=he("outline","arrow-left","IconArrowLeft",[["path",{d:"M5 12l14 0",key:"svg-0"}],["path",{d:"M5 12l6 6",key:"svg-1"}],["path",{d:"M5 12l6 -6",key:"svg-2"}]]);/** * @license @tabler/icons-react v3.12.0 - MIT * * This source code is licensed under the MIT license. * See the LICENSE file in the root directory of this source tree. - */var she=he("outline","arrow-right","IconArrowRight",[["path",{d:"M5 12l14 0",key:"svg-0"}],["path",{d:"M13 18l6 -6",key:"svg-1"}],["path",{d:"M13 6l6 6",key:"svg-2"}]]);/** + */var ihe=he("outline","arrow-right","IconArrowRight",[["path",{d:"M5 12l14 0",key:"svg-0"}],["path",{d:"M13 18l6 -6",key:"svg-1"}],["path",{d:"M13 6l6 6",key:"svg-2"}]]);/** * @license @tabler/icons-react v3.12.0 - MIT * * This source code is licensed under the MIT license. @@ -176,17 +176,17 @@ Error generating stack: `+i.message+` * * This source code is licensed under the MIT license. * See the LICENSE file in the root directory of this source tree. - */var ahe=he("outline","blockquote","IconBlockquote",[["path",{d:"M6 15h15",key:"svg-0"}],["path",{d:"M21 19h-15",key:"svg-1"}],["path",{d:"M15 11h6",key:"svg-2"}],["path",{d:"M21 7h-6",key:"svg-3"}],["path",{d:"M9 9h1a1 1 0 1 1 -1 1v-2.5a2 2 0 0 1 2 -2",key:"svg-4"}],["path",{d:"M3 9h1a1 1 0 1 1 -1 1v-2.5a2 2 0 0 1 2 -2",key:"svg-5"}]]);/** + */var she=he("outline","blockquote","IconBlockquote",[["path",{d:"M6 15h15",key:"svg-0"}],["path",{d:"M21 19h-15",key:"svg-1"}],["path",{d:"M15 11h6",key:"svg-2"}],["path",{d:"M21 7h-6",key:"svg-3"}],["path",{d:"M9 9h1a1 1 0 1 1 -1 1v-2.5a2 2 0 0 1 2 -2",key:"svg-4"}],["path",{d:"M3 9h1a1 1 0 1 1 -1 1v-2.5a2 2 0 0 1 2 -2",key:"svg-5"}]]);/** * @license @tabler/icons-react v3.12.0 - MIT * * This source code is licensed under the MIT license. * See the LICENSE file in the root directory of this source tree. - */var lhe=he("outline","bold","IconBold",[["path",{d:"M7 5h6a3.5 3.5 0 0 1 0 7h-6z",key:"svg-0"}],["path",{d:"M13 12h1a3.5 3.5 0 0 1 0 7h-7v-7",key:"svg-1"}]]);/** + */var ahe=he("outline","bold","IconBold",[["path",{d:"M7 5h6a3.5 3.5 0 0 1 0 7h-6z",key:"svg-0"}],["path",{d:"M13 12h1a3.5 3.5 0 0 1 0 7h-7v-7",key:"svg-1"}]]);/** * @license @tabler/icons-react v3.12.0 - MIT * * This source code is licensed under the MIT license. * See the LICENSE file in the root directory of this source tree. - */var che=he("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"}]]);/** + */var lhe=he("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.12.0 - MIT * * This source code is licensed under the MIT license. @@ -206,7 +206,7 @@ Error generating stack: `+i.message+` * * This source code is licensed under the MIT license. * See the LICENSE file in the root directory of this source tree. - */var uhe=he("outline","check","IconCheck",[["path",{d:"M5 12l5 5l10 -10",key:"svg-0"}]]);/** + */var che=he("outline","check","IconCheck",[["path",{d:"M5 12l5 5l10 -10",key:"svg-0"}]]);/** * @license @tabler/icons-react v3.12.0 - MIT * * This source code is licensed under the MIT license. @@ -216,12 +216,12 @@ Error generating stack: `+i.message+` * * This source code is licensed under the MIT license. * See the LICENSE file in the root directory of this source tree. - */var dhe=he("outline","clear-formatting","IconClearFormatting",[["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"}]]);/** + */var uhe=he("outline","clear-formatting","IconClearFormatting",[["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"}]]);/** * @license @tabler/icons-react v3.12.0 - MIT * * This source code is licensed under the MIT license. * See the LICENSE file in the root directory of this source tree. - */var fhe=he("outline","clock-down","IconClockDown",[["path",{d:"M20.984 12.535a9 9 0 1 0 -8.431 8.448",key:"svg-0"}],["path",{d:"M12 7v5l3 3",key:"svg-1"}],["path",{d:"M19 16v6",key:"svg-2"}],["path",{d:"M22 19l-3 3l-3 -3",key:"svg-3"}]]);/** + */var dhe=he("outline","clock-down","IconClockDown",[["path",{d:"M20.984 12.535a9 9 0 1 0 -8.431 8.448",key:"svg-0"}],["path",{d:"M12 7v5l3 3",key:"svg-1"}],["path",{d:"M19 16v6",key:"svg-2"}],["path",{d:"M22 19l-3 3l-3 -3",key:"svg-3"}]]);/** * @license @tabler/icons-react v3.12.0 - MIT * * This source code is licensed under the MIT license. @@ -236,7 +236,7 @@ Error generating stack: `+i.message+` * * This source code is licensed under the MIT license. * See the LICENSE file in the root directory of this source tree. - */var phe=he("outline","color-picker","IconColorPicker",[["path",{d:"M11 7l6 6",key:"svg-0"}],["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",key:"svg-1"}]]);/** + */var fhe=he("outline","color-picker","IconColorPicker",[["path",{d:"M11 7l6 6",key:"svg-0"}],["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",key:"svg-1"}]]);/** * @license @tabler/icons-react v3.12.0 - MIT * * This source code is licensed under the MIT license. @@ -246,12 +246,12 @@ Error generating stack: `+i.message+` * * This source code is licensed under the MIT license. * See the LICENSE file in the root directory of this source tree. - */var hhe=he("outline","device-mobile","IconDeviceMobile",[["path",{d:"M6 5a2 2 0 0 1 2 -2h8a2 2 0 0 1 2 2v14a2 2 0 0 1 -2 2h-8a2 2 0 0 1 -2 -2v-14z",key:"svg-0"}],["path",{d:"M11 4h2",key:"svg-1"}],["path",{d:"M12 17v.01",key:"svg-2"}]]);/** + */var phe=he("outline","device-mobile","IconDeviceMobile",[["path",{d:"M6 5a2 2 0 0 1 2 -2h8a2 2 0 0 1 2 2v14a2 2 0 0 1 -2 2h-8a2 2 0 0 1 -2 -2v-14z",key:"svg-0"}],["path",{d:"M11 4h2",key:"svg-1"}],["path",{d:"M12 17v.01",key:"svg-2"}]]);/** * @license @tabler/icons-react v3.12.0 - MIT * * This source code is licensed under the MIT license. * See the LICENSE file in the root directory of this source tree. - */var mhe=he("outline","dots","IconDots",[["path",{d:"M5 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-0"}],["path",{d:"M12 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-1"}],["path",{d:"M19 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-2"}]]);/** + */var hhe=he("outline","dots","IconDots",[["path",{d:"M5 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-0"}],["path",{d:"M12 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-1"}],["path",{d:"M19 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-2"}]]);/** * @license @tabler/icons-react v3.12.0 - MIT * * This source code is licensed under the MIT license. @@ -261,12 +261,12 @@ Error generating stack: `+i.message+` * * This source code is licensed under the MIT license. * See the LICENSE file in the root directory of this source tree. - */var ghe=he("outline","external-link","IconExternalLink",[["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"}]]);/** + */var mhe=he("outline","external-link","IconExternalLink",[["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"}]]);/** * @license @tabler/icons-react v3.12.0 - MIT * * This source code is licensed under the MIT license. * See the LICENSE file in the root directory of this source tree. - */var vhe=he("outline","eye","IconEye",[["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"}]]);/** + */var ghe=he("outline","eye","IconEye",[["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"}]]);/** * @license @tabler/icons-react v3.12.0 - MIT * * This source code is licensed under the MIT license. @@ -286,42 +286,42 @@ Error generating stack: `+i.message+` * * This source code is licensed under the MIT license. * See the LICENSE file in the root directory of this source tree. - */var yhe=he("outline","fingerprint","IconFingerprint",[["path",{d:"M18.9 7a8 8 0 0 1 1.1 5v1a6 6 0 0 0 .8 3",key:"svg-0"}],["path",{d:"M8 11a4 4 0 0 1 8 0v1a10 10 0 0 0 2 6",key:"svg-1"}],["path",{d:"M12 11v2a14 14 0 0 0 2.5 8",key:"svg-2"}],["path",{d:"M8 15a18 18 0 0 0 1.8 6",key:"svg-3"}],["path",{d:"M4.9 19a22 22 0 0 1 -.9 -7v-1a8 8 0 0 1 12 -6.95",key:"svg-4"}]]);/** + */var vhe=he("outline","fingerprint","IconFingerprint",[["path",{d:"M18.9 7a8 8 0 0 1 1.1 5v1a6 6 0 0 0 .8 3",key:"svg-0"}],["path",{d:"M8 11a4 4 0 0 1 8 0v1a10 10 0 0 0 2 6",key:"svg-1"}],["path",{d:"M12 11v2a14 14 0 0 0 2.5 8",key:"svg-2"}],["path",{d:"M8 15a18 18 0 0 0 1.8 6",key:"svg-3"}],["path",{d:"M4.9 19a22 22 0 0 1 -.9 -7v-1a8 8 0 0 1 12 -6.95",key:"svg-4"}]]);/** * @license @tabler/icons-react v3.12.0 - MIT * * This source code is licensed under the MIT license. * See the LICENSE file in the root directory of this source tree. - */var _he=he("outline","gavel","IconGavel",[["path",{d:"M13 10l7.383 7.418c.823 .82 .823 2.148 0 2.967a2.11 2.11 0 0 1 -2.976 0l-7.407 -7.385",key:"svg-0"}],["path",{d:"M6 9l4 4",key:"svg-1"}],["path",{d:"M13 10l-4 -4",key:"svg-2"}],["path",{d:"M3 21h7",key:"svg-3"}],["path",{d:"M6.793 15.793l-3.586 -3.586a1 1 0 0 1 0 -1.414l2.293 -2.293l.5 .5l3 -3l-.5 -.5l2.293 -2.293a1 1 0 0 1 1.414 0l3.586 3.586a1 1 0 0 1 0 1.414l-2.293 2.293l-.5 -.5l-3 3l.5 .5l-2.293 2.293a1 1 0 0 1 -1.414 0z",key:"svg-4"}]]);/** + */var yhe=he("outline","gavel","IconGavel",[["path",{d:"M13 10l7.383 7.418c.823 .82 .823 2.148 0 2.967a2.11 2.11 0 0 1 -2.976 0l-7.407 -7.385",key:"svg-0"}],["path",{d:"M6 9l4 4",key:"svg-1"}],["path",{d:"M13 10l-4 -4",key:"svg-2"}],["path",{d:"M3 21h7",key:"svg-3"}],["path",{d:"M6.793 15.793l-3.586 -3.586a1 1 0 0 1 0 -1.414l2.293 -2.293l.5 .5l3 -3l-.5 -.5l2.293 -2.293a1 1 0 0 1 1.414 0l3.586 3.586a1 1 0 0 1 0 1.414l-2.293 2.293l-.5 -.5l-3 3l.5 .5l-2.293 2.293a1 1 0 0 1 -1.414 0z",key:"svg-4"}]]);/** * @license @tabler/icons-react v3.12.0 - MIT * * This source code is licensed under the MIT license. * See the LICENSE file in the root directory of this source tree. - */var whe=he("outline","h-1","IconH1",[["path",{d:"M19 18v-8l-2 2",key:"svg-0"}],["path",{d:"M4 6v12",key:"svg-1"}],["path",{d:"M12 6v12",key:"svg-2"}],["path",{d:"M11 18h2",key:"svg-3"}],["path",{d:"M3 18h2",key:"svg-4"}],["path",{d:"M4 12h8",key:"svg-5"}],["path",{d:"M3 6h2",key:"svg-6"}],["path",{d:"M11 6h2",key:"svg-7"}]]);/** + */var _he=he("outline","h-1","IconH1",[["path",{d:"M19 18v-8l-2 2",key:"svg-0"}],["path",{d:"M4 6v12",key:"svg-1"}],["path",{d:"M12 6v12",key:"svg-2"}],["path",{d:"M11 18h2",key:"svg-3"}],["path",{d:"M3 18h2",key:"svg-4"}],["path",{d:"M4 12h8",key:"svg-5"}],["path",{d:"M3 6h2",key:"svg-6"}],["path",{d:"M11 6h2",key:"svg-7"}]]);/** * @license @tabler/icons-react v3.12.0 - MIT * * This source code is licensed under the MIT license. * See the LICENSE file in the root directory of this source tree. - */var bhe=he("outline","h-2","IconH2",[["path",{d:"M17 12a2 2 0 1 1 4 0c0 .591 -.417 1.318 -.816 1.858l-3.184 4.143l4 0",key:"svg-0"}],["path",{d:"M4 6v12",key:"svg-1"}],["path",{d:"M12 6v12",key:"svg-2"}],["path",{d:"M11 18h2",key:"svg-3"}],["path",{d:"M3 18h2",key:"svg-4"}],["path",{d:"M4 12h8",key:"svg-5"}],["path",{d:"M3 6h2",key:"svg-6"}],["path",{d:"M11 6h2",key:"svg-7"}]]);/** + */var whe=he("outline","h-2","IconH2",[["path",{d:"M17 12a2 2 0 1 1 4 0c0 .591 -.417 1.318 -.816 1.858l-3.184 4.143l4 0",key:"svg-0"}],["path",{d:"M4 6v12",key:"svg-1"}],["path",{d:"M12 6v12",key:"svg-2"}],["path",{d:"M11 18h2",key:"svg-3"}],["path",{d:"M3 18h2",key:"svg-4"}],["path",{d:"M4 12h8",key:"svg-5"}],["path",{d:"M3 6h2",key:"svg-6"}],["path",{d:"M11 6h2",key:"svg-7"}]]);/** * @license @tabler/icons-react v3.12.0 - MIT * * This source code is licensed under the MIT license. * See the LICENSE file in the root directory of this source tree. - */var xhe=he("outline","h-3","IconH3",[["path",{d:"M19 14a2 2 0 1 0 -2 -2",key:"svg-0"}],["path",{d:"M17 16a2 2 0 1 0 2 -2",key:"svg-1"}],["path",{d:"M4 6v12",key:"svg-2"}],["path",{d:"M12 6v12",key:"svg-3"}],["path",{d:"M11 18h2",key:"svg-4"}],["path",{d:"M3 18h2",key:"svg-5"}],["path",{d:"M4 12h8",key:"svg-6"}],["path",{d:"M3 6h2",key:"svg-7"}],["path",{d:"M11 6h2",key:"svg-8"}]]);/** + */var bhe=he("outline","h-3","IconH3",[["path",{d:"M19 14a2 2 0 1 0 -2 -2",key:"svg-0"}],["path",{d:"M17 16a2 2 0 1 0 2 -2",key:"svg-1"}],["path",{d:"M4 6v12",key:"svg-2"}],["path",{d:"M12 6v12",key:"svg-3"}],["path",{d:"M11 18h2",key:"svg-4"}],["path",{d:"M3 18h2",key:"svg-5"}],["path",{d:"M4 12h8",key:"svg-6"}],["path",{d:"M3 6h2",key:"svg-7"}],["path",{d:"M11 6h2",key:"svg-8"}]]);/** * @license @tabler/icons-react v3.12.0 - MIT * * This source code is licensed under the MIT license. * See the LICENSE file in the root directory of this source tree. - */var She=he("outline","h-4","IconH4",[["path",{d:"M20 18v-8l-4 6h5",key:"svg-0"}],["path",{d:"M4 6v12",key:"svg-1"}],["path",{d:"M12 6v12",key:"svg-2"}],["path",{d:"M11 18h2",key:"svg-3"}],["path",{d:"M3 18h2",key:"svg-4"}],["path",{d:"M4 12h8",key:"svg-5"}],["path",{d:"M3 6h2",key:"svg-6"}],["path",{d:"M11 6h2",key:"svg-7"}]]);/** + */var xhe=he("outline","h-4","IconH4",[["path",{d:"M20 18v-8l-4 6h5",key:"svg-0"}],["path",{d:"M4 6v12",key:"svg-1"}],["path",{d:"M12 6v12",key:"svg-2"}],["path",{d:"M11 18h2",key:"svg-3"}],["path",{d:"M3 18h2",key:"svg-4"}],["path",{d:"M4 12h8",key:"svg-5"}],["path",{d:"M3 6h2",key:"svg-6"}],["path",{d:"M11 6h2",key:"svg-7"}]]);/** * @license @tabler/icons-react v3.12.0 - MIT * * This source code is licensed under the MIT license. * See the LICENSE file in the root directory of this source tree. - */var Phe=he("outline","h-5","IconH5",[["path",{d:"M17 18h2a2 2 0 1 0 0 -4h-2v-4h4",key:"svg-0"}],["path",{d:"M4 6v12",key:"svg-1"}],["path",{d:"M12 6v12",key:"svg-2"}],["path",{d:"M11 18h2",key:"svg-3"}],["path",{d:"M3 18h2",key:"svg-4"}],["path",{d:"M4 12h8",key:"svg-5"}],["path",{d:"M3 6h2",key:"svg-6"}],["path",{d:"M11 6h2",key:"svg-7"}]]);/** + */var She=he("outline","h-5","IconH5",[["path",{d:"M17 18h2a2 2 0 1 0 0 -4h-2v-4h4",key:"svg-0"}],["path",{d:"M4 6v12",key:"svg-1"}],["path",{d:"M12 6v12",key:"svg-2"}],["path",{d:"M11 18h2",key:"svg-3"}],["path",{d:"M3 18h2",key:"svg-4"}],["path",{d:"M4 12h8",key:"svg-5"}],["path",{d:"M3 6h2",key:"svg-6"}],["path",{d:"M11 6h2",key:"svg-7"}]]);/** * @license @tabler/icons-react v3.12.0 - MIT * * This source code is licensed under the MIT license. * See the LICENSE file in the root directory of this source tree. - */var Ohe=he("outline","h-6","IconH6",[["path",{d:"M19 14a2 2 0 1 0 0 4a2 2 0 0 0 0 -4z",key:"svg-0"}],["path",{d:"M21 12a2 2 0 1 0 -4 0v4",key:"svg-1"}],["path",{d:"M4 6v12",key:"svg-2"}],["path",{d:"M12 6v12",key:"svg-3"}],["path",{d:"M11 18h2",key:"svg-4"}],["path",{d:"M3 18h2",key:"svg-5"}],["path",{d:"M4 12h8",key:"svg-6"}],["path",{d:"M3 6h2",key:"svg-7"}],["path",{d:"M11 6h2",key:"svg-8"}]]);/** + */var Phe=he("outline","h-6","IconH6",[["path",{d:"M19 14a2 2 0 1 0 0 4a2 2 0 0 0 0 -4z",key:"svg-0"}],["path",{d:"M21 12a2 2 0 1 0 -4 0v4",key:"svg-1"}],["path",{d:"M4 6v12",key:"svg-2"}],["path",{d:"M12 6v12",key:"svg-3"}],["path",{d:"M11 18h2",key:"svg-4"}],["path",{d:"M3 18h2",key:"svg-5"}],["path",{d:"M4 12h8",key:"svg-6"}],["path",{d:"M3 6h2",key:"svg-7"}],["path",{d:"M11 6h2",key:"svg-8"}]]);/** * @license @tabler/icons-react v3.12.0 - MIT * * This source code is licensed under the MIT license. @@ -331,7 +331,7 @@ Error generating stack: `+i.message+` * * This source code is licensed under the MIT license. * See the LICENSE file in the root directory of this source tree. - */var Che=he("outline","highlight","IconHighlight",[["path",{d:"M3 19h4l10.5 -10.5a2.828 2.828 0 1 0 -4 -4l-10.5 10.5v4",key:"svg-0"}],["path",{d:"M12.5 5.5l4 4",key:"svg-1"}],["path",{d:"M4.5 13.5l4 4",key:"svg-2"}],["path",{d:"M21 15v4h-8l4 -4z",key:"svg-3"}]]);/** + */var Ohe=he("outline","highlight","IconHighlight",[["path",{d:"M3 19h4l10.5 -10.5a2.828 2.828 0 1 0 -4 -4l-10.5 10.5v4",key:"svg-0"}],["path",{d:"M12.5 5.5l4 4",key:"svg-1"}],["path",{d:"M4.5 13.5l4 4",key:"svg-2"}],["path",{d:"M21 15v4h-8l4 -4z",key:"svg-3"}]]);/** * @license @tabler/icons-react v3.12.0 - MIT * * This source code is licensed under the MIT license. @@ -346,22 +346,22 @@ Error generating stack: `+i.message+` * * This source code is licensed under the MIT license. * See the LICENSE file in the root directory of this source tree. - */var khe=he("outline","italic","IconItalic",[["path",{d:"M11 5l6 0",key:"svg-0"}],["path",{d:"M7 19l6 0",key:"svg-1"}],["path",{d:"M14 5l-4 14",key:"svg-2"}]]);/** + */var Che=he("outline","italic","IconItalic",[["path",{d:"M11 5l6 0",key:"svg-0"}],["path",{d:"M7 19l6 0",key:"svg-1"}],["path",{d:"M14 5l-4 14",key:"svg-2"}]]);/** * @license @tabler/icons-react v3.12.0 - MIT * * This source code is licensed under the MIT license. * See the LICENSE file in the root directory of this source tree. - */var Ehe=he("outline","layout-dashboard","IconLayoutDashboard",[["path",{d:"M5 4h4a1 1 0 0 1 1 1v6a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1v-6a1 1 0 0 1 1 -1",key:"svg-0"}],["path",{d:"M5 16h4a1 1 0 0 1 1 1v2a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1v-2a1 1 0 0 1 1 -1",key:"svg-1"}],["path",{d:"M15 12h4a1 1 0 0 1 1 1v6a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1v-6a1 1 0 0 1 1 -1",key:"svg-2"}],["path",{d:"M15 4h4a1 1 0 0 1 1 1v2a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1v-2a1 1 0 0 1 1 -1",key:"svg-3"}]]);/** + */var khe=he("outline","layout-dashboard","IconLayoutDashboard",[["path",{d:"M5 4h4a1 1 0 0 1 1 1v6a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1v-6a1 1 0 0 1 1 -1",key:"svg-0"}],["path",{d:"M5 16h4a1 1 0 0 1 1 1v2a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1v-2a1 1 0 0 1 1 -1",key:"svg-1"}],["path",{d:"M15 12h4a1 1 0 0 1 1 1v6a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1v-6a1 1 0 0 1 1 -1",key:"svg-2"}],["path",{d:"M15 4h4a1 1 0 0 1 1 1v2a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1v-2a1 1 0 0 1 1 -1",key:"svg-3"}]]);/** * @license @tabler/icons-react v3.12.0 - MIT * * This source code is licensed under the MIT license. * See the LICENSE file in the root directory of this source tree. - */var $he=he("outline","layout-list","IconLayoutList",[["path",{d:"M4 4m0 2a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v2a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2z",key:"svg-0"}],["path",{d:"M4 14m0 2a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v2a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2z",key:"svg-1"}]]);/** + */var Ehe=he("outline","layout-list","IconLayoutList",[["path",{d:"M4 4m0 2a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v2a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2z",key:"svg-0"}],["path",{d:"M4 14m0 2a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v2a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2z",key:"svg-1"}]]);/** * @license @tabler/icons-react v3.12.0 - MIT * * This source code is licensed under the MIT license. * See the LICENSE file in the root directory of this source tree. - */var Mhe=he("outline","line-dashed","IconLineDashed",[["path",{d:"M5 12h2",key:"svg-0"}],["path",{d:"M17 12h2",key:"svg-1"}],["path",{d:"M11 12h2",key:"svg-2"}]]);/** + */var $he=he("outline","line-dashed","IconLineDashed",[["path",{d:"M5 12h2",key:"svg-0"}],["path",{d:"M17 12h2",key:"svg-1"}],["path",{d:"M11 12h2",key:"svg-2"}]]);/** * @license @tabler/icons-react v3.12.0 - MIT * * This source code is licensed under the MIT license. @@ -371,27 +371,27 @@ Error generating stack: `+i.message+` * * This source code is licensed under the MIT license. * See the LICENSE file in the root directory of this source tree. - */var Nhe=he("outline","link","IconLink",[["path",{d:"M9 15l6 -6",key:"svg-0"}],["path",{d:"M11 6l.463 -.536a5 5 0 0 1 7.071 7.072l-.534 .464",key:"svg-1"}],["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",key:"svg-2"}]]);/** + */var Mhe=he("outline","link","IconLink",[["path",{d:"M9 15l6 -6",key:"svg-0"}],["path",{d:"M11 6l.463 -.536a5 5 0 0 1 7.071 7.072l-.534 .464",key:"svg-1"}],["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",key:"svg-2"}]]);/** * @license @tabler/icons-react v3.12.0 - MIT * * This source code is licensed under the MIT license. * See the LICENSE file in the root directory of this source tree. - */var The=he("outline","list-details","IconListDetails",[["path",{d:"M13 5h8",key:"svg-0"}],["path",{d:"M13 9h5",key:"svg-1"}],["path",{d:"M13 15h8",key:"svg-2"}],["path",{d:"M13 19h5",key:"svg-3"}],["path",{d:"M3 4m0 1a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v4a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1z",key:"svg-4"}],["path",{d:"M3 14m0 1a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v4a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1z",key:"svg-5"}]]);/** + */var Nhe=he("outline","list-details","IconListDetails",[["path",{d:"M13 5h8",key:"svg-0"}],["path",{d:"M13 9h5",key:"svg-1"}],["path",{d:"M13 15h8",key:"svg-2"}],["path",{d:"M13 19h5",key:"svg-3"}],["path",{d:"M3 4m0 1a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v4a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1z",key:"svg-4"}],["path",{d:"M3 14m0 1a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v4a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1z",key:"svg-5"}]]);/** * @license @tabler/icons-react v3.12.0 - MIT * * This source code is licensed under the MIT license. * See the LICENSE file in the root directory of this source tree. - */var Ihe=he("outline","list-numbers","IconListNumbers",[["path",{d:"M11 6h9",key:"svg-0"}],["path",{d:"M11 12h9",key:"svg-1"}],["path",{d:"M12 18h8",key:"svg-2"}],["path",{d:"M4 16a2 2 0 1 1 4 0c0 .591 -.5 1 -1 1.5l-3 2.5h4",key:"svg-3"}],["path",{d:"M6 10v-6l-2 2",key:"svg-4"}]]);/** + */var The=he("outline","list-numbers","IconListNumbers",[["path",{d:"M11 6h9",key:"svg-0"}],["path",{d:"M11 12h9",key:"svg-1"}],["path",{d:"M12 18h8",key:"svg-2"}],["path",{d:"M4 16a2 2 0 1 1 4 0c0 .591 -.5 1 -1 1.5l-3 2.5h4",key:"svg-3"}],["path",{d:"M6 10v-6l-2 2",key:"svg-4"}]]);/** * @license @tabler/icons-react v3.12.0 - MIT * * This source code is licensed under the MIT license. * See the LICENSE file in the root directory of this source tree. - */var jhe=he("outline","list","IconList",[["path",{d:"M9 6l11 0",key:"svg-0"}],["path",{d:"M9 12l11 0",key:"svg-1"}],["path",{d:"M9 18l11 0",key:"svg-2"}],["path",{d:"M5 6l0 .01",key:"svg-3"}],["path",{d:"M5 12l0 .01",key:"svg-4"}],["path",{d:"M5 18l0 .01",key:"svg-5"}]]);/** + */var Ihe=he("outline","list","IconList",[["path",{d:"M9 6l11 0",key:"svg-0"}],["path",{d:"M9 12l11 0",key:"svg-1"}],["path",{d:"M9 18l11 0",key:"svg-2"}],["path",{d:"M5 6l0 .01",key:"svg-3"}],["path",{d:"M5 12l0 .01",key:"svg-4"}],["path",{d:"M5 18l0 .01",key:"svg-5"}]]);/** * @license @tabler/icons-react v3.12.0 - MIT * * This source code is licensed under the MIT license. * See the LICENSE file in the root directory of this source tree. - */var Lhe=he("outline","logout","IconLogout",[["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"}]]);/** + */var jhe=he("outline","logout","IconLogout",[["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"}]]);/** * @license @tabler/icons-react v3.12.0 - MIT * * This source code is licensed under the MIT license. @@ -401,12 +401,12 @@ Error generating stack: `+i.message+` * * This source code is licensed under the MIT license. * See the LICENSE file in the root directory of this source tree. - */var Dhe=he("outline","map-pin","IconMapPin",[["path",{d:"M9 11a3 3 0 1 0 6 0a3 3 0 0 0 -6 0",key:"svg-0"}],["path",{d:"M17.657 16.657l-4.243 4.243a2 2 0 0 1 -2.827 0l-4.244 -4.243a8 8 0 1 1 11.314 0z",key:"svg-1"}]]);/** + */var Lhe=he("outline","map-pin","IconMapPin",[["path",{d:"M9 11a3 3 0 1 0 6 0a3 3 0 0 0 -6 0",key:"svg-0"}],["path",{d:"M17.657 16.657l-4.243 4.243a2 2 0 0 1 -2.827 0l-4.244 -4.243a8 8 0 1 1 11.314 0z",key:"svg-1"}]]);/** * @license @tabler/icons-react v3.12.0 - MIT * * This source code is licensed under the MIT license. * See the LICENSE file in the root directory of this source tree. - */var Rhe=he("outline","minus","IconMinus",[["path",{d:"M5 12l14 0",key:"svg-0"}]]);/** + */var Dhe=he("outline","minus","IconMinus",[["path",{d:"M5 12l14 0",key:"svg-0"}]]);/** * @license @tabler/icons-react v3.12.0 - MIT * * This source code is licensed under the MIT license. @@ -416,7 +416,7 @@ Error generating stack: `+i.message+` * * This source code is licensed under the MIT license. * See the LICENSE file in the root directory of this source tree. - */var zhe=he("outline","number-123","IconNumber123",[["path",{d:"M3 10l2 -2v8",key:"svg-0"}],["path",{d:"M9 8h3a1 1 0 0 1 1 1v2a1 1 0 0 1 -1 1h-2a1 1 0 0 0 -1 1v2a1 1 0 0 0 1 1h3",key:"svg-1"}],["path",{d:"M17 8h2.5a1.5 1.5 0 0 1 1.5 1.5v1a1.5 1.5 0 0 1 -1.5 1.5h-1.5h1.5a1.5 1.5 0 0 1 1.5 1.5v1a1.5 1.5 0 0 1 -1.5 1.5h-2.5",key:"svg-2"}]]);/** + */var Rhe=he("outline","number-123","IconNumber123",[["path",{d:"M3 10l2 -2v8",key:"svg-0"}],["path",{d:"M9 8h3a1 1 0 0 1 1 1v2a1 1 0 0 1 -1 1h-2a1 1 0 0 0 -1 1v2a1 1 0 0 0 1 1h3",key:"svg-1"}],["path",{d:"M17 8h2.5a1.5 1.5 0 0 1 1.5 1.5v1a1.5 1.5 0 0 1 -1.5 1.5h-1.5h1.5a1.5 1.5 0 0 1 1.5 1.5v1a1.5 1.5 0 0 1 -1.5 1.5h-2.5",key:"svg-2"}]]);/** * @license @tabler/icons-react v3.12.0 - MIT * * This source code is licensed under the MIT license. @@ -431,12 +431,12 @@ Error generating stack: `+i.message+` * * This source code is licensed under the MIT license. * See the LICENSE file in the root directory of this source tree. - */var Ahe=he("outline","phone-call","IconPhoneCall",[["path",{d:"M5 4h4l2 5l-2.5 1.5a11 11 0 0 0 5 5l1.5 -2.5l5 2v4a2 2 0 0 1 -2 2a16 16 0 0 1 -15 -15a2 2 0 0 1 2 -2",key:"svg-0"}],["path",{d:"M15 7a2 2 0 0 1 2 2",key:"svg-1"}],["path",{d:"M15 3a6 6 0 0 1 6 6",key:"svg-2"}]]);/** + */var zhe=he("outline","phone-call","IconPhoneCall",[["path",{d:"M5 4h4l2 5l-2.5 1.5a11 11 0 0 0 5 5l1.5 -2.5l5 2v4a2 2 0 0 1 -2 2a16 16 0 0 1 -15 -15a2 2 0 0 1 2 -2",key:"svg-0"}],["path",{d:"M15 7a2 2 0 0 1 2 2",key:"svg-1"}],["path",{d:"M15 3a6 6 0 0 1 6 6",key:"svg-2"}]]);/** * @license @tabler/icons-react v3.12.0 - MIT * * This source code is licensed under the MIT license. * See the LICENSE file in the root directory of this source tree. - */var Bhe=he("outline","phone-incoming","IconPhoneIncoming",[["path",{d:"M5 4h4l2 5l-2.5 1.5a11 11 0 0 0 5 5l1.5 -2.5l5 2v4a2 2 0 0 1 -2 2a16 16 0 0 1 -15 -15a2 2 0 0 1 2 -2",key:"svg-0"}],["path",{d:"M15 9l5 -5",key:"svg-1"}],["path",{d:"M15 5l0 4l4 0",key:"svg-2"}]]);/** + */var Ahe=he("outline","phone-incoming","IconPhoneIncoming",[["path",{d:"M5 4h4l2 5l-2.5 1.5a11 11 0 0 0 5 5l1.5 -2.5l5 2v4a2 2 0 0 1 -2 2a16 16 0 0 1 -15 -15a2 2 0 0 1 2 -2",key:"svg-0"}],["path",{d:"M15 9l5 -5",key:"svg-1"}],["path",{d:"M15 5l0 4l4 0",key:"svg-2"}]]);/** * @license @tabler/icons-react v3.12.0 - MIT * * This source code is licensed under the MIT license. @@ -456,12 +456,12 @@ Error generating stack: `+i.message+` * * This source code is licensed under the MIT license. * See the LICENSE file in the root directory of this source tree. - */var Fhe=he("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"}]]);/** + */var Bhe=he("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.12.0 - MIT * * This source code is licensed under the MIT license. * See the LICENSE file in the root directory of this source tree. - */var Vhe=he("outline","speakerphone","IconSpeakerphone",[["path",{d:"M18 8a3 3 0 0 1 0 6",key:"svg-0"}],["path",{d:"M10 8v11a1 1 0 0 1 -1 1h-1a1 1 0 0 1 -1 -1v-5",key:"svg-1"}],["path",{d:"M12 8h0l4.524 -3.77a.9 .9 0 0 1 1.476 .692v12.156a.9 .9 0 0 1 -1.476 .692l-4.524 -3.77h-8a1 1 0 0 1 -1 -1v-4a1 1 0 0 1 1 -1h8",key:"svg-2"}]]);/** + */var Fhe=he("outline","speakerphone","IconSpeakerphone",[["path",{d:"M18 8a3 3 0 0 1 0 6",key:"svg-0"}],["path",{d:"M10 8v11a1 1 0 0 1 -1 1h-1a1 1 0 0 1 -1 -1v-5",key:"svg-1"}],["path",{d:"M12 8h0l4.524 -3.77a.9 .9 0 0 1 1.476 .692v12.156a.9 .9 0 0 1 -1.476 .692l-4.524 -3.77h-8a1 1 0 0 1 -1 -1v-4a1 1 0 0 1 1 -1h8",key:"svg-2"}]]);/** * @license @tabler/icons-react v3.12.0 - MIT * * This source code is licensed under the MIT license. @@ -471,22 +471,22 @@ Error generating stack: `+i.message+` * * This source code is licensed under the MIT license. * See the LICENSE file in the root directory of this source tree. - */var Hhe=he("outline","strikethrough","IconStrikethrough",[["path",{d:"M5 12l14 0",key:"svg-0"}],["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",key:"svg-1"}]]);/** + */var Vhe=he("outline","strikethrough","IconStrikethrough",[["path",{d:"M5 12l14 0",key:"svg-0"}],["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",key:"svg-1"}]]);/** * @license @tabler/icons-react v3.12.0 - MIT * * This source code is licensed under the MIT license. * See the LICENSE file in the root directory of this source tree. - */var Whe=he("outline","subscript","IconSubscript",[["path",{d:"M5 7l8 10m-8 0l8 -10",key:"svg-0"}],["path",{d:"M21 20h-4l3.5 -4a1.73 1.73 0 0 0 -3.5 -2",key:"svg-1"}]]);/** + */var Hhe=he("outline","subscript","IconSubscript",[["path",{d:"M5 7l8 10m-8 0l8 -10",key:"svg-0"}],["path",{d:"M21 20h-4l3.5 -4a1.73 1.73 0 0 0 -3.5 -2",key:"svg-1"}]]);/** * @license @tabler/icons-react v3.12.0 - MIT * * This source code is licensed under the MIT license. * See the LICENSE file in the root directory of this source tree. - */var Uhe=he("outline","superscript","IconSuperscript",[["path",{d:"M5 7l8 10m-8 0l8 -10",key:"svg-0"}],["path",{d:"M21 11h-4l3.5 -4a1.73 1.73 0 0 0 -3.5 -2",key:"svg-1"}]]);/** + */var Whe=he("outline","superscript","IconSuperscript",[["path",{d:"M5 7l8 10m-8 0l8 -10",key:"svg-0"}],["path",{d:"M21 11h-4l3.5 -4a1.73 1.73 0 0 0 -3.5 -2",key:"svg-1"}]]);/** * @license @tabler/icons-react v3.12.0 - MIT * * This source code is licensed under the MIT license. * See the LICENSE file in the root directory of this source tree. - */var Zhe=he("outline","tools","IconTools",[["path",{d:"M3 21h4l13 -13a1.5 1.5 0 0 0 -4 -4l-13 13v4",key:"svg-0"}],["path",{d:"M14.5 5.5l4 4",key:"svg-1"}],["path",{d:"M12 8l-5 -5l-4 4l5 5",key:"svg-2"}],["path",{d:"M7 8l-1.5 1.5",key:"svg-3"}],["path",{d:"M16 12l5 5l-4 4l-5 -5",key:"svg-4"}],["path",{d:"M16 17l-1.5 1.5",key:"svg-5"}]]);/** + */var Uhe=he("outline","tools","IconTools",[["path",{d:"M3 21h4l13 -13a1.5 1.5 0 0 0 -4 -4l-13 13v4",key:"svg-0"}],["path",{d:"M14.5 5.5l4 4",key:"svg-1"}],["path",{d:"M12 8l-5 -5l-4 4l5 5",key:"svg-2"}],["path",{d:"M7 8l-1.5 1.5",key:"svg-3"}],["path",{d:"M16 12l5 5l-4 4l-5 -5",key:"svg-4"}],["path",{d:"M16 17l-1.5 1.5",key:"svg-5"}]]);/** * @license @tabler/icons-react v3.12.0 - MIT * * This source code is licensed under the MIT license. @@ -496,7 +496,7 @@ Error generating stack: `+i.message+` * * This source code is licensed under the MIT license. * See the LICENSE file in the root directory of this source tree. - */var Ghe=he("outline","underline","IconUnderline",[["path",{d:"M7 5v5a5 5 0 0 0 10 0v-5",key:"svg-0"}],["path",{d:"M5 19h14",key:"svg-1"}]]);/** + */var Zhe=he("outline","underline","IconUnderline",[["path",{d:"M7 5v5a5 5 0 0 0 10 0v-5",key:"svg-0"}],["path",{d:"M5 19h14",key:"svg-1"}]]);/** * @license @tabler/icons-react v3.12.0 - MIT * * This source code is licensed under the MIT license. @@ -506,7 +506,7 @@ Error generating stack: `+i.message+` * * This source code is licensed under the MIT license. * See the LICENSE file in the root directory of this source tree. - */var Yhe=he("outline","user-exclamation","IconUserExclamation",[["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 -4h4c.348 0 .686 .045 1.008 .128",key:"svg-1"}],["path",{d:"M19 16v3",key:"svg-2"}],["path",{d:"M19 22v.01",key:"svg-3"}]]);/** + */var Ghe=he("outline","user-exclamation","IconUserExclamation",[["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 -4h4c.348 0 .686 .045 1.008 .128",key:"svg-1"}],["path",{d:"M19 16v3",key:"svg-2"}],["path",{d:"M19 22v.01",key:"svg-3"}]]);/** * @license @tabler/icons-react v3.12.0 - MIT * * This source code is licensed under the MIT license. @@ -521,17 +521,17 @@ Error generating stack: `+i.message+` * * This source code is licensed under the MIT license. * See the LICENSE file in the root directory of this source tree. - */var Khe=he("outline","user-share","IconUserShare",[["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 -4h3",key:"svg-1"}],["path",{d:"M16 22l5 -5",key:"svg-2"}],["path",{d:"M21 21.5v-4.5h-4.5",key:"svg-3"}]]);/** + */var Yhe=he("outline","user-share","IconUserShare",[["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 -4h3",key:"svg-1"}],["path",{d:"M16 22l5 -5",key:"svg-2"}],["path",{d:"M21 21.5v-4.5h-4.5",key:"svg-3"}]]);/** * @license @tabler/icons-react v3.12.0 - MIT * * This source code is licensed under the MIT license. * See the LICENSE file in the root directory of this source tree. - */var qhe=he("outline","user-shield","IconUserShield",[["path",{d:"M6 21v-2a4 4 0 0 1 4 -4h2",key:"svg-0"}],["path",{d:"M22 16c0 4 -2.5 6 -3.5 6s-3.5 -2 -3.5 -6c1 0 2.5 -.5 3.5 -1.5c1 1 2.5 1.5 3.5 1.5z",key:"svg-1"}],["path",{d:"M8 7a4 4 0 1 0 8 0a4 4 0 0 0 -8 0",key:"svg-2"}]]);/** + */var Khe=he("outline","user-shield","IconUserShield",[["path",{d:"M6 21v-2a4 4 0 0 1 4 -4h2",key:"svg-0"}],["path",{d:"M22 16c0 4 -2.5 6 -3.5 6s-3.5 -2 -3.5 -6c1 0 2.5 -.5 3.5 -1.5c1 1 2.5 1.5 3.5 1.5z",key:"svg-1"}],["path",{d:"M8 7a4 4 0 1 0 8 0a4 4 0 0 0 -8 0",key:"svg-2"}]]);/** * @license @tabler/icons-react v3.12.0 - MIT * * This source code is licensed under the MIT license. * See the LICENSE file in the root directory of this source tree. - */var Jhe=he("outline","user-square-rounded","IconUserSquareRounded",[["path",{d:"M12 13a3 3 0 1 0 0 -6a3 3 0 0 0 0 6z",key:"svg-0"}],["path",{d:"M12 3c7.2 0 9 1.8 9 9s-1.8 9 -9 9s-9 -1.8 -9 -9s1.8 -9 9 -9z",key:"svg-1"}],["path",{d:"M6 20.05v-.05a4 4 0 0 1 4 -4h4a4 4 0 0 1 4 4v.05",key:"svg-2"}]]);/** + */var qhe=he("outline","user-square-rounded","IconUserSquareRounded",[["path",{d:"M12 13a3 3 0 1 0 0 -6a3 3 0 0 0 0 6z",key:"svg-0"}],["path",{d:"M12 3c7.2 0 9 1.8 9 9s-1.8 9 -9 9s-9 -1.8 -9 -9s1.8 -9 9 -9z",key:"svg-1"}],["path",{d:"M6 20.05v-.05a4 4 0 0 1 4 -4h4a4 4 0 0 1 4 4v.05",key:"svg-2"}]]);/** * @license @tabler/icons-react v3.12.0 - MIT * * This source code is licensed under the MIT license. @@ -556,12 +556,12 @@ Error generating stack: `+i.message+` * * This source code is licensed under the MIT license. * See the LICENSE file in the root directory of this source tree. - */var Xhe=he("outline","zoom-exclamation","IconZoomExclamation",[["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"}],["path",{d:"M10 13v.01",key:"svg-2"}],["path",{d:"M10 7v3",key:"svg-3"}]]);/** + */var Jhe=he("outline","zoom-exclamation","IconZoomExclamation",[["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"}],["path",{d:"M10 13v.01",key:"svg-2"}],["path",{d:"M10 7v3",key:"svg-3"}]]);/** * @license @tabler/icons-react v3.12.0 - MIT * * This source code is licensed under the MIT license. * See the LICENSE file in the root directory of this source tree. - */var Qhe=he("filled","badges-filled","IconBadgesFilled",[["path",{d:"M16.486 12.143l-4.486 2.69l-4.486 -2.69a1 1 0 0 0 -1.514 .857v4a1 1 0 0 0 .486 .857l5 3a1 1 0 0 0 1.028 0l5 -3a1 1 0 0 0 .486 -.857v-4a1 1 0 0 0 -1.514 -.857z",key:"svg-0"}],["path",{d:"M16.486 3.143l-4.486 2.69l-4.486 -2.69a1 1 0 0 0 -1.514 .857v4a1 1 0 0 0 .486 .857l5 3a1 1 0 0 0 1.028 0l5 -3a1 1 0 0 0 .486 -.857v-4a1 1 0 0 0 -1.514 -.857z",key:"svg-1"}]]);const eme=""+new URL("police-logo-f092c1b6.png",import.meta.url).href,rT=e=>{let t;const n=new Set,r=(c,u)=>{const f=typeof c=="function"?c(t):c;if(!Object.is(f,t)){const p=t;t=u??typeof f!="object"?f:Object.assign({},t,f),n.forEach(g=>g(t,p))}},o=()=>t,a={setState:r,getState:o,subscribe:c=>(n.add(c),()=>n.delete(c)),destroy:()=>{n.clear()}};return t=e(r,o,a),a},tme=e=>e?rT(e):rT;var T8={exports:{}},I8={},j8={exports:{}},L8={};/** + */var Xhe=he("filled","badges-filled","IconBadgesFilled",[["path",{d:"M16.486 12.143l-4.486 2.69l-4.486 -2.69a1 1 0 0 0 -1.514 .857v4a1 1 0 0 0 .486 .857l5 3a1 1 0 0 0 1.028 0l5 -3a1 1 0 0 0 .486 -.857v-4a1 1 0 0 0 -1.514 -.857z",key:"svg-0"}],["path",{d:"M16.486 3.143l-4.486 2.69l-4.486 -2.69a1 1 0 0 0 -1.514 .857v4a1 1 0 0 0 .486 .857l5 3a1 1 0 0 0 1.028 0l5 -3a1 1 0 0 0 .486 -.857v-4a1 1 0 0 0 -1.514 -.857z",key:"svg-1"}]]);const Qhe=""+new URL("police-logo-f092c1b6.png",import.meta.url).href,rT=e=>{let t;const n=new Set,r=(c,u)=>{const f=typeof c=="function"?c(t):c;if(!Object.is(f,t)){const p=t;t=u??typeof f!="object"?f:Object.assign({},t,f),n.forEach(g=>g(t,p))}},o=()=>t,a={setState:r,getState:o,subscribe:c=>(n.add(c),()=>n.delete(c)),destroy:()=>{n.clear()}};return t=e(r,o,a),a},eme=e=>e?rT(e):rT;var T8={exports:{}},I8={},j8={exports:{}},L8={};/** * @license React * use-sync-external-store-shim.production.min.js * @@ -569,7 +569,7 @@ Error generating stack: `+i.message+` * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var du=_;function nme(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var rme=typeof Object.is=="function"?Object.is:nme,ome=du.useState,ime=du.useEffect,sme=du.useLayoutEffect,ame=du.useDebugValue;function lme(e,t){var n=t(),r=ome({inst:{value:n,getSnapshot:t}}),o=r[0].inst,i=r[1];return sme(function(){o.value=n,o.getSnapshot=t,G_(o)&&i({inst:o})},[e,n,t]),ime(function(){return G_(o)&&i({inst:o}),e(function(){G_(o)&&i({inst:o})})},[e]),ame(n),n}function G_(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!rme(e,n)}catch{return!0}}function cme(e,t){return t()}var ume=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?cme:lme;L8.useSyncExternalStore=du.useSyncExternalStore!==void 0?du.useSyncExternalStore:ume;j8.exports=L8;var dme=j8.exports;/** + */var du=_;function tme(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var nme=typeof Object.is=="function"?Object.is:tme,rme=du.useState,ome=du.useEffect,ime=du.useLayoutEffect,sme=du.useDebugValue;function ame(e,t){var n=t(),r=rme({inst:{value:n,getSnapshot:t}}),o=r[0].inst,i=r[1];return ime(function(){o.value=n,o.getSnapshot=t,G_(o)&&i({inst:o})},[e,n,t]),ome(function(){return G_(o)&&i({inst:o}),e(function(){G_(o)&&i({inst:o})})},[e]),sme(n),n}function G_(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!nme(e,n)}catch{return!0}}function lme(e,t){return t()}var cme=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?lme:ame;L8.useSyncExternalStore=du.useSyncExternalStore!==void 0?du.useSyncExternalStore:cme;j8.exports=L8;var ume=j8.exports;/** * @license React * use-sync-external-store-shim/with-selector.production.min.js * @@ -577,18 +577,18 @@ Error generating stack: `+i.message+` * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var B0=_,fme=dme;function pme(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var hme=typeof Object.is=="function"?Object.is:pme,mme=fme.useSyncExternalStore,gme=B0.useRef,vme=B0.useEffect,yme=B0.useMemo,_me=B0.useDebugValue;I8.useSyncExternalStoreWithSelector=function(e,t,n,r,o){var i=gme(null);if(i.current===null){var s={hasValue:!1,value:null};i.current=s}else s=i.current;i=yme(function(){function c(v){if(!u){if(u=!0,f=v,v=r(v),o!==void 0&&s.hasValue){var y=s.value;if(o(y,v))return p=y}return p=v}if(y=p,hme(f,v))return y;var w=r(v);return o!==void 0&&o(y,w)?y:(f=v,p=w)}var u=!1,f,p,g=n===void 0?null:n;return[function(){return c(t())},g===null?void 0:function(){return c(g())}]},[t,n,r,o]);var a=mme(e,i[0],i[1]);return vme(function(){s.hasValue=!0,s.value=a},[a]),_me(a),a};T8.exports=I8;var wme=T8.exports;const bme=Ea(wme),{useSyncExternalStoreWithSelector:xme}=bme;function Sme(e,t=e.getState,n){const r=xme(e.subscribe,e.getState,e.getServerState||e.getState,t,n);return _.useDebugValue(r),r}const oT=e=>{const t=typeof e=="function"?tme(e):e,n=(r,o)=>Sme(t,r,o);return Object.assign(n,t),n},dn=e=>e?oT(e):oT,at=()=>!window.invokeNative,Pme=()=>{},D8=dn(e=>({showApp:!!at(),setVisibility:t=>e({showApp:t}),show:()=>e({showApp:!0}),hide:()=>e({showApp:!1}),toggle:()=>e(t=>({showApp:!t.showApp}))})),Ome={citizenid:"1993201",firstname:"Bubble",lastname:"Test",role:"Chief",image:"https://i.imgur.com/P4uYdfu.jpeg",callSign:103,unit:1},bo=dn(e=>({personalData:at()?Ome:{citizenid:"",firstname:"",lastname:"",role:"",image:"",callSign:0},setPersonalData:t=>e(n=>({personalData:typeof t=="function"?t(n.personalData):{...n.personalData,...t}}))}));async function me(e,t,n){if(at())return n?(await new Promise(a=>setTimeout(a,n.delay)),n.data):await new Promise(a=>a);const r={method:"post",headers:{"Content-Type":"application/json; charset=UTF-8"},body:JSON.stringify(t)},o=window.GetParentResourceName?window.GetParentResourceName():"nui-frame-app";return await(await fetch(`https://${o}/${e}`,r)).json()}const R8=[];for(let e=0;e<25;e++)R8[e]={firstname:"Firstname",lastname:`Lastname ${e+1}`,dob:Date.now(),citizenid:e.toString()};const UP={firstname:"John",lastname:"Doe",citizenid:"BUB193Z4A",dob:Date.now(),phoneNumber:"123456789",notes:"

",vehicles:["Sultan Custom (88ZOH526)","Sultan Custom (07NCV529)","Sultan Custom (07NCV545)","Sultan Custom (07NCV521)"],relatedReports:[{title:"Report title",id:1,author:"Some One",date:"13/03/2023"},{title:"Report title",id:2,author:"Some One",date:"13/03/2023"},{title:"Report title",id:3,author:"Some One",date:"13/03/2023"},{title:"Report title",id:4,author:"Some One",date:"13/03/2023"}],relatedIncidents:[{title:"Incident 1",author:"Someone nice",date:"13/03/2023",id:1}]},Cme=[{id:"vehicles",title:"Vehicles",icon:"car"}],Li=dn(e=>({profileCards:[],selectedProfile:null,isProfileWanted:!1,getPlayers:async()=>at()?{profiles:R8}:await me("getAllProfiles"),setSelectedProfile:t=>{at()&&e({selectedProfile:UP,profileCards:Cme}),e({selectedProfile:t})},setProfileCards:t=>e({profileCards:t}),setIsProfileWanted:t=>{e({isProfileWanted:t})}})),kme={"OFFENSES AGAINST PERSONS":[{label:"Speeding",description:"Lorem ipsum dolor sit amet, consectetur adipisicing elit. Aperiam, doloribus eveniet facere ipsam, ipsum minus modi molestiae nesciunt odio saepe sapiente sed sint voluptatibus voluptatum!",type:"infraction",time:0,fine:2500,points:4},{label:"Loitering",description:"Standing go brrr",type:"misdemeanor",time:90,fine:25e3,points:0},{label:"Something else 1",description:"Standing go brrr",type:"misdemeanor",time:90,fine:25e3,points:0},{label:"Something else 2",description:"Standing go brrr",type:"misdemeanor",time:90,fine:25e3,points:0},{label:"Something else 3",description:"Standing go brrr",type:"misdemeanor",time:90,fine:25e3,points:0}],"OFFENSES AGAINST PROPERTY":[{label:"Robbery of a financial institution",description:"Bank robbery go brrr",type:"felony",time:30,fine:3e3,points:0},{label:"Something else 2 in OFFENSES AGAINST",description:"Standing go brrr",type:"felony",time:90,fine:25e3,points:0},{label:"Something else 3 in OFFENSES AGAINST",description:"Standing go brrr",type:"felony",time:90,fine:25e3,points:0},{label:"Something else 4 in OFFENSES AGAINST",description:"Standing go brrr",type:"felony",time:90,fine:25e3,points:0}]},Yf=dn(e=>({charges:at()?kme:{},setCharges:t=>{e(n=>({charges:typeof t=="function"?t(n.charges):t}))}})),iT=[{firstname:"John",lastname:"Doe",callsign:"1A-01",citizenid:"ABCD1234",playerId:1,position:[0,0,0],unitId:1},{firstname:"Jenna",lastname:"Doe",callsign:"1A-02",citizenid:"ABCD1235",playerId:2,position:[0,0,0]}],ZP=dn(e=>({officers:at()?iT:[],activeOfficers:at()?iT:[],getOfficers:async()=>{try{const t=await me("getOfficers");return e({officers:t}),{officers:t}}catch(t){return console.error("Failed to fetch officers:",t),{officers:[]}}},getActiveOfficers:async()=>{try{const t=await me("getActiveOfficers"),n=Object.values(t);return e({activeOfficers:n}),{activeOfficers:n}}catch(t){return console.error("Failed to fetch active officers:",t),{activeOfficers:[]}}},setOfficers:t=>e({officers:t}),addOfficer:t=>e(n=>({officers:[...n.officers,t]})),removeOfficer:t=>e(n=>({officers:n.officers.filter(r=>r.citizenid!==t)}))})),Eme=ue(e=>({link:{...e.fn.focusStyles(),display:"flex",alignItems:"center",textDecoration:"none",fontSize:e.fontSizes.xs,color:e.colors.gray[2],padding:`${e.spacing.xs} ${e.spacing.xs}`,fontWeight:500,"&:hover":{borderRadius:e.radius.sm,background:"linear-gradient(90deg, rgba(51,124,255,0.5) 0%, rgba(187,187,187,0) 100%)",color:e.colorScheme==="dark"?e.white:e.black,[`& .${Ar("icon")}`]:{color:e.colorScheme==="dark"?e.white:e.black}}},linkIcon:{ref:Ar("icon"),color:e.colorScheme==="dark"?e.colors.dark[2]:e.colors.gray[6],marginRight:e.spacing.sm},linkActive:{"&, &:hover":{borderRadius:e.radius.sm,background:"linear-gradient(90deg, rgba(51,124,255,0.5) 0%, rgba(187,187,187,0) 100%)",[`& .${Ar("icon")}`]:{color:"white"}}},chevron:{transition:"transform 200ms ease"}})),$me=[{link:"",label:"Dashboard",icon:Ehe}],Mme=[{link:"profiles",label:"Profiles",icon:WP},{link:"incidents",label:"Incidents",icon:FP},{link:"reports",label:"Reports",icon:zP},{link:"vehicles",label:"Vehicles",icon:ks},{link:"dispatch",label:"Dispatch",icon:cu}],Nme=[{label:"Roster",link:"roster",icon:qhe},{label:"Charges",link:"charges",icon:_he}],Tme=()=>{const{classes:e,cx:t,theme:n}=Eme(),[r,o]=_.useState(""),{firstname:i,lastname:s,callSign:a,role:c}=bo(p=>p.personalData),u=ku(),f=p=>p.map(g=>h.jsxs(qpe,{to:`/${g.link}`,onClick:()=>o(g.link),className:t(e.link,{[e.linkActive]:r===g.link}),children:[h.jsx(g.icon,{className:e.linkIcon,stroke:1.5}),h.jsx("span",{children:g.label})]},g.link));return _.useEffect(()=>{o(u.pathname.split("/")[1])},[u]),h.jsxs(tg,{p:"xs",style:{backgroundColor:"#242527",borderTopLeftRadius:5,borderBottomLeftRadius:5,maxWidth:300,height:"100%"},children:[h.jsxs(tg.Section,{children:[h.jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"center"},children:h.jsx(ri,{radius:"md",width:150,height:150,fit:"contain",src:eme,alt:"LSPD Logo"})}),h.jsx(Ye,{my:"sm"}),h.jsxs(St,{h:632,scrollbarSize:2,children:[h.jsx(W,{size:"xs",weight:500,color:"dimmed",style:{margin:8},children:"Home"}),f($me),h.jsx(W,{size:"xs",weight:500,color:"dimmed",style:{margin:8},children:"Pages"}),f(Mme),h.jsx(W,{size:"xs",weight:500,color:"dimmed",style:{margin:8},children:"Staff"}),f(Nme)]})]}),h.jsx(Pe,{sx:{paddingTop:5,borderTop:`${M(1)} solid ${n.colorScheme==="dark"?n.colors.dark[4]:n.colors.gray[2]}`},children:h.jsx("div",{style:{display:"block",width:"100%",color:"#e9ecef",padding:"0.625rem"},children:h.jsx(nt,{children:h.jsxs(Pe,{sx:{flex:1},children:[h.jsxs(W,{size:"sm",weight:500,children:[i," ",s]}),h.jsxs(W,{color:"dimmed",size:"xs",children:[c," | ",a]})]})})})})]})};var z8={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(Kx,function(){var n=1e3,r=6e4,o=36e5,i="millisecond",s="second",a="minute",c="hour",u="day",f="week",p="month",g="quarter",v="year",y="date",w="Invalid Date",P=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,x=/\[([^\]]+)]|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,S={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(V){var H=["th","st","nd","rd"],Z=V%100;return"["+V+(H[(Z-20)%10]||H[Z]||H[0])+"]"}},O=function(V,H,Z){var Y=String(V);return!Y||Y.length>=H?V:""+Array(H+1-Y.length).join(Z)+V},E={s:O,z:function(V){var H=-V.utcOffset(),Z=Math.abs(H),Y=Math.floor(Z/60),j=Z%60;return(H<=0?"+":"-")+O(Y,2,"0")+":"+O(j,2,"0")},m:function V(H,Z){if(H.date()1)return V(F[0])}else{var K=H.name;N[K]=H,j=K}return!Y&&j&&($=j),j||!Y&&$},z=function(V,H){if(R(V))return V.clone();var Z=typeof H=="object"?H:{};return Z.date=V,Z.args=arguments,new X(Z)},G=E;G.l=B,G.i=R,G.w=function(V,H){return z(V,{locale:H.$L,utc:H.$u,x:H.$x,$offset:H.$offset})};var X=function(){function V(Z){this.$L=B(Z.locale,null,!0),this.parse(Z),this.$x=this.$x||Z.x||{},this[I]=!0}var H=V.prototype;return H.parse=function(Z){this.$d=function(Y){var j=Y.date,U=Y.utc;if(j===null)return new Date(NaN);if(G.u(j))return new Date;if(j instanceof Date)return new Date(j);if(typeof j=="string"&&!/Z$/i.test(j)){var F=j.match(P);if(F){var K=F[2]-1||0,ee=(F[7]||"0").substring(0,3);return U?new Date(Date.UTC(F[1],K,F[3]||1,F[4]||0,F[5]||0,F[6]||0,ee)):new Date(F[1],K,F[3]||1,F[4]||0,F[5]||0,F[6]||0,ee)}}return new Date(j)}(Z),this.init()},H.init=function(){var Z=this.$d;this.$y=Z.getFullYear(),this.$M=Z.getMonth(),this.$D=Z.getDate(),this.$W=Z.getDay(),this.$H=Z.getHours(),this.$m=Z.getMinutes(),this.$s=Z.getSeconds(),this.$ms=Z.getMilliseconds()},H.$utils=function(){return G},H.isValid=function(){return this.$d.toString()!==w},H.isSame=function(Z,Y){var j=z(Z);return this.startOf(Y)<=j&&j<=this.endOf(Y)},H.isAfter=function(Z,Y){return z(Z)0,N<=$.r||!$.r){N<=1&&E>0&&($=S[E-1]);var I=x[$.l];v&&(N=v(""+N)),w=typeof I=="string"?I.replace("%d",N):I(N,f,$.l,P);break}}if(f)return w;var R=P?x.future:x.past;return typeof R=="function"?R(w):R.replace("%s",w)},i.to=function(u,f){return a(u,f,this,!0)},i.from=function(u,f){return a(u,f,this)};var c=function(u){return u.$u?o.utc():o()};i.toNow=function(u){return this.to(c(this),u)},i.fromNow=function(u){return this.from(c(this),u)}}})})(A8);var jme=A8.exports;const B8=Ea(jme);const sT={title:"Debug Incident title",id:0,description:"

This is a incident description

",officersInvolved:[{firstname:"Callum",lastname:"Graham",callsign:188,citizenid:"132142",playerId:1,position:[0,0,0]},{firstname:"Jacob",lastname:"Gray",callsign:273,citizenid:"152312",playerId:1,position:[0,0,0]},{firstname:"Edward",lastname:"Atkinson",callsign:125,citizenid:"948213",playerId:1,position:[0,0,0]}],evidence:[],criminals:[{firstname:"Archie",lastname:"Moss",dob:Date.now(),issueWarrant:!1,processed:!1,pleadedGuilty:!1,citizenid:"0",charges:[],penalty:{time:0,fine:0,reduction:null,points:0}}]},Ur=dn(e=>({incident:sT,isIncidentActive:!1,setActiveIncident:t=>{at()&&e({incident:sT}),e({incident:t})},updateIncidentField:(t,n)=>{e(r=>({incident:{...r.incident,[t]:n}}))},setIncidentActive:t=>{e({isIncidentActive:t})},setDescription:t=>{e(n=>({incident:{...n.incident,description:t}}))},setCriminals:t=>{e(n=>({incident:{...n.incident,criminals:typeof t=="function"?t(n.incident.criminals):t}}))},setCriminal:(t,n)=>{e(r=>{const o=r.incident.criminals.map(i=>i.citizenid===t?typeof n=="function"?n(i):{...i,...n}:i);return{incident:{...r.incident,criminals:o}}})},setOfficersInvolved:t=>{e(n=>({incident:{...n.incident,officersInvolved:typeof t=="function"?t(n.incident.officersInvolved):t}}))},setEvidence:t=>{e(n=>({incident:{...n.incident,evidence:typeof t=="function"?t(n.incident.evidence):t}}))}})),Lme=[{type:"created",category:"profiles",firstname:"Bubble",lastname:"Test",date:"string",activityid:1,citizenid:"BUB193Z4A"},{type:"updated",category:"profiles",firstname:"Bubble",lastname:"Test",date:"string",activityid:1,citizenid:"BUB193Z4A"},{type:"deleted",category:"profiles",firstname:"Bubble",lastname:"Test",date:"string",activityid:1,citizenid:"BUB193Z4A"},{type:"created",category:"incidents",firstname:"Bubble",lastname:"Test",date:"string",activityid:1,citizenid:"BUB193Z4A"},{type:"created",category:"profiles",firstname:"Bubble",lastname:"Test",date:"string",activityid:1,citizenid:"BUB193Z4A"},{type:"created",category:"profiles",firstname:"Bubble",lastname:"Test",date:"string",activityid:1,citizenid:"BUB193Z4A"},{type:"created",category:"profiles",firstname:"Bubble",lastname:"Test",date:"string",activityid:1,citizenid:"BUB193Z4A"},{type:"created",category:"profiles",firstname:"Bubble",lastname:"Test",date:"string",activityid:1,citizenid:"BUB193Z4A"}],Dme=dn(e=>({recentActivity:at()?Lme:[],getRecentActivity:async()=>{try{const t=await me("getRecentActivity");return e({recentActivity:t}),{recentActivity:t}}catch(t){return console.error("Failed to fetch recent activities:",t),{recentActivity:[]}}},setRecentActivities:t=>e({recentActivity:t})})),Rme="Configuration",zme="Logout",Ame="Welcome back, %s %s",Bme="Active Officers",Fme="Callsign",Vme="Attached Unit",Hme="Active Warrants",Wme="Expires in",Ume="No warrants found",Zme="Recent Activity",Gme="Type",Yme="Category",Kme="Done by",qme="Time ago",Jme="Dispatch",Xme="Responding Units",Qme="No recent calls found",ege="Announcements",tge="Create announcement",nge="All Announcements",rge="No announcements found",oge="Create",ige="View all",sge="Profiles",age="Search...",lge="DOB",cge="Citizen ID",uge="No profiles found",dge="No profile selected",fge="Edit Citizen",pge="No %s registered",hge="Related reports",mge="No related reports",gge="Related incidents",vge="No related incidents",yge="Remove Charge",_ge="No incident selected",wge="Add Criminal",bge="Unlink",xge="Officers involved",Sge="Add officer",Pge="Remove officer",Oge="Are you sure you want to remove %s %s (%s) from involved officers?",Cge="Confirm",kge="Cancel",Ege="Evidence",$ge="Add evidence",Mge="Incidents",Nge="Create incident",Tge="Remove evidence",Ige="Are you sure you want to remove %s from evidence?",jge="month(s)",Lge="Remove criminal",Dge="Remove %s %s? Removing them will also remove the charges from their profile.",Rge="Go to profile",zge="Save criminal",Age="Edit charges",Bge="Issue warrant",Fge="Suspect hasn't been processed and charged",Vge="Warrant expiration date",Hge="Reduction",Wge="No reduction",Uge="Time",Zge="Fine",Gge="Pleaded guilty",Yge="Processed",Kge="Current Charges",qge="All Charges",Jge="point(s)",Xge="Add Charge",Qge="Incident title",eve="Incident title is required",tve="No officers found",nve="Image label is required",rve="Image URL is required",ove="Image label",ive="Image URL",sve="Take picture",ave="No report selected",lve="Citizens involved",cve="Add citizen",uve="Are you sure you want to remove %s %s from involved citizens",dve="Images",fve="Add image",pve="Reports",hve="Create report",mve="Report title",gve="Report title is required",vve="No citizens found",yve="Units",_ve="Manage members",wve="Leave Unit",bve="Create unit",xve="Unit officers",Sve="Set officers assigned to this unit",Pve="Unit vehicle type",Ove="Active Calls",Cve="Responding units (%s)",kve="Find on map",Eve="Set waypoint",$ve="Detach from call",Mve="Respond",Nve="Manage roster",Tve="Roster",Ive="members",jve="Members",Lve="Hire officer",Dve="Today",Rve="Yesterday",zve="Set callsign",Ave="Set rank",Bve="Set roles",Fve="Fire officer",Vve="Are you sure you want to fire %s %s?",Hve="Officer",Wve="APU",Uve="AIR",Zve="MC",Gve="K9",Yve="FTO",Kve="Last active",qve="Role",Jve="Rank",Xve="Callsign already in use",Qve="The citizen with this citizen id is already hired",eye="Citizen ID of the citizen you want to hire",tye="Callsign of the new officer you want to hire",nye="Create Charge",rye="Charge Label",oye="Charge Description",iye="Charge Category",sye="Charge Fine",aye="Charge Jailtime",lye="Charge Points",cye="Charge Type",uye="Delete charge",dye="Are you sure you want to delete %s",fye="Edit Charge",pye="Edit",hye="Delete Incident",mye="Are you sure you want to delete %s",gye="Change picture",vye="Image",yye="Image URL to use as the profile image",_ye="Vehicles",wye="No vehicle selected",bye="Vehicle Information",xye="Save vehicle",Sye="Known information",Pye="Wanted",Oye="MARK UNWANTED",Cye="MARK WANTED",kye="Select items",Eye="Create BOLO",$ye="Plate",Mye="Reason",Nye="BOLO expiration date",Tye="Delete BOLO",Iye="Are you sure you want to delete the BOLO for: %s",jye="Image URL to use as the vehicle image",Lye="BOLO",Dye="BOLOS",Rye="BOLO expires at:",zye="Expires at:",Aye="No bolos found",Bye="Go to vehicle",Fye="You are already responding or not a part of a unit",Vye="You responded to the recent call",Hye={configuration:Rme,logout:zme,welcome_back:Ame,active_officers:Bme,callsign:Fme,attached_unit:Vme,active_warrants:Hme,expires_in:Wme,no_warrants_found:Ume,recent_activity:Zme,type:Gme,category:Yme,done_by:Kme,time_ago:qme,dispatch:Jme,responding_units:Xme,no_recent_calls_found:Qme,announcements:ege,create_announcement:tge,all_announcements:nge,no_announcements_found:rge,create:oge,view_all:ige,profiles:sge,search:age,dob:lge,citizen_id:cge,no_profiles_found:uge,no_profile_selected:dge,edit_citizen:fge,no_cardid_registered:pge,related_reports:hge,no_related_reports:mge,related_incidents:gge,no_related_incidents:vge,remove_charge:yge,no_incident_selected:_ge,add_criminal:wge,unlink:bge,officers_involved:xge,add_officer:Sge,remove_officer:Pge,remove_officer_confirm:Oge,confirm:Cge,cancel:kge,evidence:Ege,add_evidence:$ge,incidents:Mge,create_incident:Nge,remove_evidence:Tge,remove_evidence_confirm:Ige,months:jge,remove_criminal:Lge,remove_criminal_confirm:Dge,go_to_profile:Rge,save_criminal:zge,edit_charges:Age,issue_warrant:Bge,issue_warrant_description:Fge,warrant_expiration_date:Vge,reduction:Hge,no_reduction:Wge,time:Uge,fine:Zge,pleaded_guilty:Gge,processed:Yge,current_charges:Kge,all_charges:qge,points:Jge,add_charge:Xge,incident_title:Qge,incident_title_required:eve,no_officers_found:tve,image_label_required:nve,image_url_required:rve,image_label:ove,image_url:ive,take_picture:sve,no_report_selected:ave,citizens_involved:lve,add_citizen:cve,remove_citizen_confirm:uve,images:dve,add_image:fve,reports:pve,create_report:hve,report_title:mve,report_title_required:gve,no_citizens_found:vve,units:yve,manage_members:_ve,leave_unit:wve,create_unit:bve,unit_officers:xve,unit_officers_description:Sve,unit_vehicle_type:Pve,active_calls:Ove,respond_units_amount:Cve,find_on_map:kve,set_waypoint:Eve,detach_from_call:$ve,respond:Mve,manage_roster:Nve,roster:Tve,members:Ive,members_capitalized:jve,hire_officer:Lve,today:Dve,yesterday:Rve,set_callsign:zve,set_rank:Ave,set_roles:Bve,fire_officer:Fve,fire_officer_description:Vve,officer:Hve,apu:Wve,air:Uve,mc:Zve,k9:Gve,fto:Yve,last_active:Kve,role:qve,rank:Jve,callsign_in_use:Xve,citizen_id_already_hired:Qve,citizen_id_you_want_to_hire:eye,callsign_you_want_to_hire:tye,create_charge:nye,charge_label:rye,charge_description:oye,charge_category:iye,charge_fine:sye,charge_jailtime:aye,charge_points:lye,charge_type:cye,delete_charge:uye,delete_charge_confirm:dye,edit_charge:fye,edit:pye,delete_incident:hye,delete_incident_confirm:mye,change_picture:gye,image:vye,avatar_description:yye,vehicles:_ye,no_vehicle_selected:wye,vehicle_information:bye,save_vehicle:xye,known_information:Sye,wanted:Pye,mark_unwanted:Oye,mark_wanted:Cye,select_items:kye,create_bolo:Eye,plate:$ye,reason:Mye,bolo_expiration_date:Nye,delete_bolo:Tye,delete_bolo_confirm:Iye,avatar_description_vehicle:jye,bolo:Lye,bolos:Dye,bolo_expires_at:Rye,expires_at:zye,no_bolos_found:Aye,goto_vehicle:Bye,already_responding_or_part_of_unit:Fye,responded_to_recent_call:Vye};var F8={},F0={},V8={},V0={};Object.defineProperty(V0,"__esModule",{value:!0});V0.boolean=void 0;const Wye=function(e){switch(Object.prototype.toString.call(e)){case"[object String]":return["true","t","yes","y","on","1"].includes(e.trim().toLowerCase());case"[object Number]":return e.valueOf()===1;case"[object Boolean]":return e.valueOf();default:return!1}};V0.boolean=Wye;var H0={};Object.defineProperty(H0,"__esModule",{value:!0});H0.isBooleanable=void 0;const Uye=function(e){switch(Object.prototype.toString.call(e)){case"[object String]":return["true","t","yes","y","on","1","false","f","no","n","off","0"].includes(e.trim().toLowerCase());case"[object Number]":return[0,1].includes(e.valueOf());case"[object Boolean]":return!0;default:return!1}};H0.isBooleanable=Uye;(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.isBooleanable=e.boolean=void 0;const t=V0;Object.defineProperty(e,"boolean",{enumerable:!0,get:function(){return t.boolean}});const n=H0;Object.defineProperty(e,"isBooleanable",{enumerable:!0,get:function(){return n.isBooleanable}})})(V8);var W0={};Object.defineProperty(W0,"__esModule",{value:!0});W0.tokenize=void 0;const Zye=/(?:%(?([+0-]|-\+))?(?\d+)?(?\d+\$)?(?\.\d+)?(?[%BCESb-iosux]))|(\\%)/g,Gye=e=>{let t;const n=[];let r=0,o=0,i=null;for(;(t=Zye.exec(e))!==null;){t.index>o&&(i={literal:e.slice(o,t.index),type:"literal"},n.push(i));const s=t[0];o=t.index+s.length,s==="\\%"||s==="%%"?i&&i.type==="literal"?i.literal+="%":(i={literal:"%",type:"literal"},n.push(i)):t.groups&&(i={conversion:t.groups.conversion,flag:t.groups.flag||null,placeholder:s,position:t.groups.position?Number.parseInt(t.groups.position,10)-1:r++,precision:t.groups.precision?Number.parseInt(t.groups.precision.slice(1),10):null,type:"placeholder",width:t.groups.width?Number.parseInt(t.groups.width,10):null},n.push(i))}return o<=e.length-1&&(i&&i.type==="literal"?i.literal+=e.slice(o):n.push({literal:e.slice(o),type:"literal"})),n};W0.tokenize=Gye;Object.defineProperty(F0,"__esModule",{value:!0});F0.createPrintf=void 0;const aT=V8,Yye=W0,Kye=(e,t)=>t.placeholder,qye=e=>{var t;const n=(i,s,a)=>a==="-"?i.padEnd(s," "):a==="-+"?((Number(i)>=0?"+":"")+i).padEnd(s," "):a==="+"?((Number(i)>=0?"+":"")+i).padStart(s," "):a==="0"?i.padStart(s,"0"):i.padStart(s," "),r=(t=e?.formatUnboundExpression)!==null&&t!==void 0?t:Kye,o={};return(i,...s)=>{let a=o[i];a||(a=o[i]=Yye.tokenize(i));let c="";for(const u of a)if(u.type==="literal")c+=u.literal;else{let f=s[u.position];if(f===void 0)c+=r(i,u,s);else if(u.conversion==="b")c+=aT.boolean(f)?"true":"false";else if(u.conversion==="B")c+=aT.boolean(f)?"TRUE":"FALSE";else if(u.conversion==="c")c+=f;else if(u.conversion==="C")c+=String(f).toUpperCase();else if(u.conversion==="i"||u.conversion==="d")f=String(Math.trunc(f)),u.width!==null&&(f=n(f,u.width,u.flag)),c+=f;else if(u.conversion==="e")c+=Number(f).toExponential();else if(u.conversion==="E")c+=Number(f).toExponential().toUpperCase();else if(u.conversion==="f")u.precision!==null&&(f=Number(f).toFixed(u.precision)),u.width!==null&&(f=n(String(f),u.width,u.flag)),c+=f;else if(u.conversion==="o")c+=(Number.parseInt(String(f),10)>>>0).toString(8);else if(u.conversion==="s")u.width!==null&&(f=n(String(f),u.width,u.flag)),c+=f;else if(u.conversion==="S")u.width!==null&&(f=n(String(f),u.width,u.flag)),c+=String(f).toUpperCase();else if(u.conversion==="u")c+=Number.parseInt(String(f),10)>>>0;else if(u.conversion==="x")f=(Number.parseInt(String(f),10)>>>0).toString(16),u.width!==null&&(f=n(String(f),u.width,u.flag)),c+=f;else throw new Error("Unknown format specifier.")}return c}};F0.createPrintf=qye;(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.printf=e.createPrintf=void 0;const t=F0;Object.defineProperty(e,"createPrintf",{enumerable:!0,get:function(){return t.createPrintf}}),e.printf=t.createPrintf()})(F8);const D={};String.prototype.format=function(...e){return F8.printf(this,...e)};function Jye(e){for(const t in D)D[t]=t;for(const[t,n]of Object.entries(e))D[t]=n}if(at())for(const[e,t]of Object.entries(Hye))D[e]=t;pe.extend(B8);const Xye=()=>{const e=Li(u=>u.setSelectedProfile),{setActiveIncident:t,setIncidentActive:n}=Ur(),{getRecentActivity:r,recentActivity:o}=Dme(),i=Ul(),s=u=>{const f=pe(u).fromNow();return a(f)},a=u=>u.charAt(0).toUpperCase()+u.slice(1);_.useEffect(()=>{r()},[]);const c=o.map((u,f)=>h.jsxs("tr",{children:[h.jsx("td",{children:h.jsx(mt,{color:u.type==="created"?"green":u.type==="updated"?"yellow":"red",radius:"sm",children:a(u.type)})}),h.jsx("td",{children:h.jsx(W,{children:a(u.category)})}),h.jsx("td",{children:h.jsxs(W,{children:[u.firstname," ",u.lastname]})}),h.jsx("td",{children:h.jsx(W,{children:s(u.date)})}),h.jsx("td",{children:u.type!=="deleted"&&h.jsx(nt,{spacing:0,position:"right",children:h.jsx(At,{label:"View",color:"gray",position:"bottom",withArrow:!0,children:h.jsx(Qe,{onClick:async()=>{if(u.category==="profiles"){const p=await me("getProfile",u.citizenid,{data:{...UP}});e(p)}else if(u.category==="incidents"){const p=await me("getIncident",u.activityid,{data:{id:1,officersInvolved:[],evidence:[],title:"Funny title",description:"

",criminals:[]}});t(p),n(!0)}i(`/${u.category}`)},children:h.jsx(vhe,{size:"1.1rem",stroke:1.5,color:"white"})})})})})]},f));return h.jsxs("div",{className:"recent-activity-content",children:[h.jsx(W,{style:{fontSize:18,color:"white"},weight:500,children:D.recent_activity}),h.jsx(St,{className:"recent-activity",children:h.jsxs(Zc,{verticalSpacing:"sm",children:[h.jsx("thead",{className:"table-header",children:h.jsxs("tr",{children:[h.jsx("th",{children:D.type}),h.jsx("th",{children:D.category}),h.jsx("th",{children:D.done_by}),h.jsx("th",{children:D.time_ago}),h.jsx("th",{})]})}),h.jsx("tbody",{children:c})]})})]})},GP=_.createContext(null);GP.displayName="@mantine/modals/ModalsContext";function Qye(){const e=_.useContext(GP);if(!e)throw new Error("[@mantine/modals] useModals hook was called outside of context, wrap your app with ModalsProvider component");return e}var e0e=Object.defineProperty,t0e=Object.defineProperties,n0e=Object.getOwnPropertyDescriptors,lT=Object.getOwnPropertySymbols,r0e=Object.prototype.hasOwnProperty,o0e=Object.prototype.propertyIsEnumerable,cT=(e,t,n)=>t in e?e0e(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Y_=(e,t)=>{for(var n in t||(t={}))r0e.call(t,n)&&cT(e,n,t[n]);if(lT)for(var n of lT(t))o0e.call(t,n)&&cT(e,n,t[n]);return e},uT=(e,t)=>t0e(e,n0e(t));function i0e({id:e,cancelProps:t,confirmProps:n,labels:r={cancel:"",confirm:""},closeOnConfirm:o=!0,closeOnCancel:i=!0,groupProps:s,onCancel:a,onConfirm:c,children:u}){const{cancel:f,confirm:p}=r,g=Qye(),v=w=>{typeof t?.onClick=="function"&&t?.onClick(w),typeof a=="function"&&a(),i&&g.closeModal(e)},y=w=>{typeof n?.onClick=="function"&&n?.onClick(w),typeof c=="function"&&c(),o&&g.closeModal(e)};return k.createElement(k.Fragment,null,u&&k.createElement(Pe,{mb:"md"},u),k.createElement(nt,Y_({position:"right"},s),k.createElement(st,uT(Y_({variant:"default"},t),{onClick:v}),t?.children||f),k.createElement(st,uT(Y_({},n),{onClick:y}),n?.children||p)))}function dT(e,t){var n,r,o,i;t&&e.type==="confirm"&&((r=(n=e.props).onCancel)==null||r.call(n)),(i=(o=e.props).onClose)==null||i.call(o)}function s0e(e,t){switch(t.type){case"OPEN":return{current:t.modal,modals:[...e.modals,t.modal]};case"CLOSE":{const n=e.modals.find(o=>o.id===t.modalId);if(!n)return e;dT(n,t.canceled);const r=e.modals.filter(o=>o.id!==t.modalId);return{current:r[r.length-1]||e.current,modals:r}}case"CLOSE_ALL":return e.modals.length?(e.modals.concat().reverse().forEach(n=>{dT(n,t.canceled)}),{current:e.current,modals:[]}):e;default:return e}}const[a0e,Kf]=YW("mantine-modals"),l0e=Kf("openModal"),c0e=Kf("closeModal"),u0e=Kf("closeAllModals"),d0e=Kf("openConfirmModal"),f0e=e=>Kf("openContextModal")(e),ke={open:l0e,close:c0e,closeAll:u0e,openConfirmModal:d0e,openContextModal:f0e};var p0e=Object.defineProperty,h0e=Object.defineProperties,m0e=Object.getOwnPropertyDescriptors,Iv=Object.getOwnPropertySymbols,H8=Object.prototype.hasOwnProperty,W8=Object.prototype.propertyIsEnumerable,fT=(e,t,n)=>t in e?p0e(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,qh=(e,t)=>{for(var n in t||(t={}))H8.call(t,n)&&fT(e,n,t[n]);if(Iv)for(var n of Iv(t))W8.call(t,n)&&fT(e,n,t[n]);return e},pT=(e,t)=>h0e(e,m0e(t)),Qa=(e,t)=>{var n={};for(var r in e)H8.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Iv)for(var r of Iv(e))t.indexOf(r)<0&&W8.call(e,r)&&(n[r]=e[r]);return n};function g0e(e){if(!e)return{confirmProps:{},modalProps:{}};const t=e,{id:n,children:r,onCancel:o,onConfirm:i,closeOnConfirm:s,closeOnCancel:a,cancelProps:c,confirmProps:u,groupProps:f,labels:p}=t,g=Qa(t,["id","children","onCancel","onConfirm","closeOnConfirm","closeOnCancel","cancelProps","confirmProps","groupProps","labels"]);return{confirmProps:{id:n,children:r,onCancel:o,onConfirm:i,closeOnConfirm:s,closeOnCancel:a,cancelProps:c,confirmProps:u,groupProps:f,labels:p},modalProps:qh({id:n},g)}}function v0e({children:e,modalProps:t,labels:n,modals:r}){const[o,i]=_.useReducer(s0e,{modals:[],current:null}),s=_.useRef(o);s.current=o;const a=_.useCallback(P=>{i({type:"CLOSE_ALL",canceled:P})},[s,i]),c=_.useCallback(P=>{var x=P,{modalId:S}=x,O=Qa(x,["modalId"]);const E=S||zc();return i({type:"OPEN",modal:{id:E,type:"content",props:O}}),E},[i]),u=_.useCallback(P=>{var x=P,{modalId:S}=x,O=Qa(x,["modalId"]);const E=S||zc();return i({type:"OPEN",modal:{id:E,type:"confirm",props:O}}),E},[i]),f=_.useCallback((P,x)=>{var S=x,{modalId:O}=S,E=Qa(S,["modalId"]);const $=O||zc();return i({type:"OPEN",modal:{id:$,type:"context",props:E,ctx:P}}),$},[i]),p=_.useCallback((P,x)=>{i({type:"CLOSE",modalId:P,canceled:x})},[s,i]);a0e({openModal:c,openConfirmModal:u,openContextModal:P=>{var x=P,{modal:S}=x,O=Qa(x,["modal"]);return f(S,O)},closeModal:p,closeContextModal:p,closeAllModals:a});const g={modals:o.modals,openModal:c,openConfirmModal:u,openContextModal:f,closeModal:p,closeContextModal:p,closeAll:a},v=()=>{const P=s.current.current;switch(P?.type){case"context":{const x=P.props,{innerProps:S}=x,O=Qa(x,["innerProps"]),E=r[P.ctx];return{modalProps:O,content:k.createElement(E,{innerProps:S,context:g,id:P.id})}}case"confirm":{const{modalProps:x,confirmProps:S}=g0e(P.props);return{modalProps:x,content:k.createElement(i0e,pT(qh({},S),{id:P.id,labels:P.props.labels||n}))}}case"content":{const x=P.props,{children:S}=x;return{modalProps:Qa(x,["children"]),content:k.createElement(k.Fragment,null,S)}}default:return{modalProps:{},content:null}}},{modalProps:y,content:w}=v();return k.createElement(GP.Provider,{value:g},k.createElement(zi,pT(qh(qh({zIndex:ii("modal")+1},t),y),{opened:o.modals.length>0,onClose:()=>p(o.current.id)}),w),e)}const[y0e,ja]=bu("RichTextEditor was not found in tree");function Ln(e){this.content=e}Ln.prototype={constructor:Ln,find:function(e){for(var t=0;t>1}};Ln.from=function(e){if(e instanceof Ln)return e;var t=[];if(e)for(var n in e)t.push(n,e[n]);return new Ln(t)};function U8(e,t,n){for(let r=0;;r++){if(r==e.childCount||r==t.childCount)return e.childCount==t.childCount?null:n;let o=e.child(r),i=t.child(r);if(o==i){n+=o.nodeSize;continue}if(!o.sameMarkup(i))return n;if(o.isText&&o.text!=i.text){for(let s=0;o.text[s]==i.text[s];s++)n++;return n}if(o.content.size||i.content.size){let s=U8(o.content,i.content,n+1);if(s!=null)return s}n+=o.nodeSize}}function Z8(e,t,n,r){for(let o=e.childCount,i=t.childCount;;){if(o==0||i==0)return o==i?null:{a:n,b:r};let s=e.child(--o),a=t.child(--i),c=s.nodeSize;if(s==a){n-=c,r-=c;continue}if(!s.sameMarkup(a))return{a:n,b:r};if(s.isText&&s.text!=a.text){let u=0,f=Math.min(s.text.length,a.text.length);for(;ut&&r(c,o+a,i||null,s)!==!1&&c.content.size){let f=a+1;c.nodesBetween(Math.max(0,t-f),Math.min(c.content.size,n-f),r,o+f)}a=u}}descendants(t){this.nodesBetween(0,this.size,t)}textBetween(t,n,r,o){let i="",s=!0;return this.nodesBetween(t,n,(a,c)=>{a.isText?(i+=a.text.slice(Math.max(t,c)-c,n-c),s=!r):a.isLeaf?(o?i+=typeof o=="function"?o(a):o:a.type.spec.leafText&&(i+=a.type.spec.leafText(a)),s=!r):!s&&a.isBlock&&(i+=r,s=!0)},0),i}append(t){if(!t.size)return this;if(!this.size)return t;let n=this.lastChild,r=t.firstChild,o=this.content.slice(),i=0;for(n.isText&&n.sameMarkup(r)&&(o[o.length-1]=n.withText(n.text+r.text),i=1);it)for(let i=0,s=0;st&&((sn)&&(a.isText?a=a.cut(Math.max(0,t-s),Math.min(a.text.length,n-s)):a=a.cut(Math.max(0,t-s-1),Math.min(a.content.size,n-s-1))),r.push(a),o+=a.nodeSize),s=c}return new se(r,o)}cutByIndex(t,n){return t==n?se.empty:t==0&&n==this.content.length?this:new se(this.content.slice(t,n))}replaceChild(t,n){let r=this.content[t];if(r==n)return this;let o=this.content.slice(),i=this.size+n.nodeSize-r.nodeSize;return o[t]=n,new se(o,i)}addToStart(t){return new se([t].concat(this.content),this.size+t.nodeSize)}addToEnd(t){return new se(this.content.concat(t),this.size+t.nodeSize)}eq(t){if(this.content.length!=t.content.length)return!1;for(let n=0;nthis.size||t<0)throw new RangeError(`Position ${t} outside of fragment (${this})`);for(let r=0,o=0;;r++){let i=this.child(r),s=o+i.nodeSize;if(s>=t)return s==t||n>0?sh(r+1,s):sh(r,o);o=s}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map(t=>t.toJSON()):null}static fromJSON(t,n){if(!n)return se.empty;if(!Array.isArray(n))throw new RangeError("Invalid input for Fragment.fromJSON");return new se(n.map(t.nodeFromJSON))}static fromArray(t){if(!t.length)return se.empty;let n,r=0;for(let o=0;othis.type.rank&&(n||(n=t.slice(0,o)),n.push(this),r=!0),n&&n.push(i)}}return n||(n=t.slice()),r||n.push(this),n}removeFromSet(t){for(let n=0;nr.type.rank-o.type.rank),n}};wt.none=[];class Lv extends Error{}class ye{constructor(t,n,r){this.content=t,this.openStart=n,this.openEnd=r}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(t,n){let r=Y8(this.content,t+this.openStart,n);return r&&new ye(r,this.openStart,this.openEnd)}removeBetween(t,n){return new ye(G8(this.content,t+this.openStart,n+this.openStart),this.openStart,this.openEnd)}eq(t){return this.content.eq(t.content)&&this.openStart==t.openStart&&this.openEnd==t.openEnd}toString(){return this.content+"("+this.openStart+","+this.openEnd+")"}toJSON(){if(!this.content.size)return null;let t={content:this.content.toJSON()};return this.openStart>0&&(t.openStart=this.openStart),this.openEnd>0&&(t.openEnd=this.openEnd),t}static fromJSON(t,n){if(!n)return ye.empty;let r=n.openStart||0,o=n.openEnd||0;if(typeof r!="number"||typeof o!="number")throw new RangeError("Invalid input for Slice.fromJSON");return new ye(se.fromJSON(t,n.content),r,o)}static maxOpen(t,n=!0){let r=0,o=0;for(let i=t.firstChild;i&&!i.isLeaf&&(n||!i.type.spec.isolating);i=i.firstChild)r++;for(let i=t.lastChild;i&&!i.isLeaf&&(n||!i.type.spec.isolating);i=i.lastChild)o++;return new ye(t,r,o)}}ye.empty=new ye(se.empty,0,0);function G8(e,t,n){let{index:r,offset:o}=e.findIndex(t),i=e.maybeChild(r),{index:s,offset:a}=e.findIndex(n);if(o==t||i.isText){if(a!=n&&!e.child(s).isText)throw new RangeError("Removing non-flat range");return e.cut(0,t).append(e.cut(n))}if(r!=s)throw new RangeError("Removing non-flat range");return e.replaceChild(r,i.copy(G8(i.content,t-o-1,n-o-1)))}function Y8(e,t,n,r){let{index:o,offset:i}=e.findIndex(t),s=e.maybeChild(o);if(i==t||s.isText)return r&&!r.canReplace(o,o,n)?null:e.cut(0,t).append(n).append(e.cut(t));let a=Y8(s.content,t-i-1,n);return a&&e.replaceChild(o,s.copy(a))}function _0e(e,t,n){if(n.openStart>e.depth)throw new Lv("Inserted content deeper than insertion position");if(e.depth-n.openStart!=t.depth-n.openEnd)throw new Lv("Inconsistent open depths");return K8(e,t,n,0)}function K8(e,t,n,r){let o=e.index(r),i=e.node(r);if(o==t.index(r)&&r=0&&e.isText&&e.sameMarkup(t[n])?t[n]=e.withText(t[n].text+e.text):t.push(e)}function Dd(e,t,n,r){let o=(t||e).node(n),i=0,s=t?t.index(n):o.childCount;e&&(i=e.index(n),e.depth>n?i++:e.textOffset&&(wl(e.nodeAfter,r),i++));for(let a=i;ao&&sx(e,t,o+1),s=r.depth>o&&sx(n,r,o+1),a=[];return Dd(null,e,o,a),i&&s&&t.index(o)==n.index(o)?(q8(i,s),wl(bl(i,J8(e,t,n,r,o+1)),a)):(i&&wl(bl(i,Dv(e,t,o+1)),a),Dd(t,n,o,a),s&&wl(bl(s,Dv(n,r,o+1)),a)),Dd(r,null,o,a),new se(a)}function Dv(e,t,n){let r=[];if(Dd(null,e,n,r),e.depth>n){let o=sx(e,t,n+1);wl(bl(o,Dv(e,t,n+1)),r)}return Dd(t,null,n,r),new se(r)}function w0e(e,t){let n=t.depth-e.openStart,o=t.node(n).copy(e.content);for(let i=n-1;i>=0;i--)o=t.node(i).copy(se.from(o));return{start:o.resolveNoCache(e.openStart+n),end:o.resolveNoCache(o.content.size-e.openEnd-n)}}class gf{constructor(t,n,r){this.pos=t,this.path=n,this.parentOffset=r,this.depth=n.length/3-1}resolveDepth(t){return t==null?this.depth:t<0?this.depth+t:t}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(t){return this.path[this.resolveDepth(t)*3]}index(t){return this.path[this.resolveDepth(t)*3+1]}indexAfter(t){return t=this.resolveDepth(t),this.index(t)+(t==this.depth&&!this.textOffset?0:1)}start(t){return t=this.resolveDepth(t),t==0?0:this.path[t*3-1]+1}end(t){return t=this.resolveDepth(t),this.start(t)+this.node(t).content.size}before(t){if(t=this.resolveDepth(t),!t)throw new RangeError("There is no position before the top-level node");return t==this.depth+1?this.pos:this.path[t*3-1]}after(t){if(t=this.resolveDepth(t),!t)throw new RangeError("There is no position after the top-level node");return t==this.depth+1?this.pos:this.path[t*3-1]+this.path[t*3].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let t=this.parent,n=this.index(this.depth);if(n==t.childCount)return null;let r=this.pos-this.path[this.path.length-1],o=t.child(n);return r?t.child(n).cut(r):o}get nodeBefore(){let t=this.index(this.depth),n=this.pos-this.path[this.path.length-1];return n?this.parent.child(t).cut(0,n):t==0?null:this.parent.child(t-1)}posAtIndex(t,n){n=this.resolveDepth(n);let r=this.path[n*3],o=n==0?0:this.path[n*3-1]+1;for(let i=0;i0;n--)if(this.start(n)<=t&&this.end(n)>=t)return n;return 0}blockRange(t=this,n){if(t.pos=0;r--)if(t.pos<=this.end(r)&&(!n||n(this.node(r))))return new Rv(this,t,r);return null}sameParent(t){return this.pos-this.parentOffset==t.pos-t.parentOffset}max(t){return t.pos>this.pos?t:this}min(t){return t.pos=0&&n<=t.content.size))throw new RangeError("Position "+n+" out of range");let r=[],o=0,i=n;for(let s=t;;){let{index:a,offset:c}=s.content.findIndex(i),u=i-c;if(r.push(s,a,o+c),!u||(s=s.child(a),s.isText))break;i=u-1,o+=c+1}return new gf(n,r,i)}static resolveCached(t,n){for(let o=0;ot&&this.nodesBetween(t,n,i=>(r.isInSet(i.marks)&&(o=!0),!o)),o}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 t=this.type.name;return this.content.size&&(t+="("+this.content.toStringInner()+")"),X8(this.marks,t)}contentMatchAt(t){let n=this.type.contentMatch.matchFragment(this.content,0,t);if(!n)throw new Error("Called contentMatchAt on a node with invalid content");return n}canReplace(t,n,r=se.empty,o=0,i=r.childCount){let s=this.contentMatchAt(t).matchFragment(r,o,i),a=s&&s.matchFragment(this.content,n);if(!a||!a.validEnd)return!1;for(let c=o;cn.type.name)}`);this.content.forEach(n=>n.check())}toJSON(){let t={type:this.type.name};for(let n in this.attrs){t.attrs=this.attrs;break}return this.content.size&&(t.content=this.content.toJSON()),this.marks.length&&(t.marks=this.marks.map(n=>n.toJSON())),t}static fromJSON(t,n){if(!n)throw new RangeError("Invalid input for Node.fromJSON");let r=null;if(n.marks){if(!Array.isArray(n.marks))throw new RangeError("Invalid mark data for Node.fromJSON");r=n.marks.map(t.markFromJSON)}if(n.type=="text"){if(typeof n.text!="string")throw new RangeError("Invalid text node in JSON");return t.text(n.text,r)}let o=se.fromJSON(t,n.content);return t.nodeType(n.type).create(n.attrs,o,r)}};xl.prototype.text=void 0;class zv extends xl{constructor(t,n,r,o){if(super(t,n,null,o),!r)throw new RangeError("Empty text nodes are not allowed");this.text=r}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):X8(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(t,n){return this.text.slice(t,n)}get nodeSize(){return this.text.length}mark(t){return t==this.marks?this:new zv(this.type,this.attrs,this.text,t)}withText(t){return t==this.text?this:new zv(this.type,this.attrs,t,this.marks)}cut(t=0,n=this.text.length){return t==0&&n==this.text.length?this:this.withText(this.text.slice(t,n))}eq(t){return this.sameMarkup(t)&&this.text==t.text}toJSON(){let t=super.toJSON();return t.text=this.text,t}}function X8(e,t){for(let n=e.length-1;n>=0;n--)t=e[n].type.name+"("+t+")";return t}class Tl{constructor(t){this.validEnd=t,this.next=[],this.wrapCache=[]}static parse(t,n){let r=new S0e(t,n);if(r.next==null)return Tl.empty;let o=Q8(r);r.next&&r.err("Unexpected trailing text");let i=M0e($0e(o));return N0e(i,r),i}matchType(t){for(let n=0;nu.createAndFill()));for(let u=0;u=this.next.length)throw new RangeError(`There's no ${t}th edge in this content match`);return this.next[t]}toString(){let t=[];function n(r){t.push(r);for(let o=0;o{let i=o+(r.validEnd?"*":" ")+" ";for(let s=0;s"+t.indexOf(r.next[s].next);return i}).join(` -`)}}Tl.empty=new Tl(!0);class S0e{constructor(t,n){this.string=t,this.nodeTypes=n,this.inline=null,this.pos=0,this.tokens=t.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(t){return this.next==t&&(this.pos++||!0)}err(t){throw new SyntaxError(t+" (in content expression '"+this.string+"')")}}function Q8(e){let t=[];do t.push(P0e(e));while(e.eat("|"));return t.length==1?t[0]:{type:"choice",exprs:t}}function P0e(e){let t=[];do t.push(O0e(e));while(e.next&&e.next!=")"&&e.next!="|");return t.length==1?t[0]:{type:"seq",exprs:t}}function O0e(e){let t=E0e(e);for(;;)if(e.eat("+"))t={type:"plus",expr:t};else if(e.eat("*"))t={type:"star",expr:t};else if(e.eat("?"))t={type:"opt",expr:t};else if(e.eat("{"))t=C0e(e,t);else break;return t}function hT(e){/\D/.test(e.next)&&e.err("Expected number, got '"+e.next+"'");let t=Number(e.next);return e.pos++,t}function C0e(e,t){let n=hT(e),r=n;return e.eat(",")&&(e.next!="}"?r=hT(e):r=-1),e.eat("}")||e.err("Unclosed braced range"),{type:"range",min:n,max:r,expr:t}}function k0e(e,t){let n=e.nodeTypes,r=n[t];if(r)return[r];let o=[];for(let i in n){let s=n[i];s.groups.indexOf(t)>-1&&o.push(s)}return o.length==0&&e.err("No node type or group '"+t+"' found"),o}function E0e(e){if(e.eat("(")){let t=Q8(e);return e.eat(")")||e.err("Missing closing paren"),t}else if(/\W/.test(e.next))e.err("Unexpected token '"+e.next+"'");else{let t=k0e(e,e.next).map(n=>(e.inline==null?e.inline=n.isInline:e.inline!=n.isInline&&e.err("Mixing inline and block content"),{type:"name",value:n}));return e.pos++,t.length==1?t[0]:{type:"choice",exprs:t}}}function $0e(e){let t=[[]];return o(i(e,0),n()),t;function n(){return t.push([])-1}function r(s,a,c){let u={term:c,to:a};return t[s].push(u),u}function o(s,a){s.forEach(c=>c.to=a)}function i(s,a){if(s.type=="choice")return s.exprs.reduce((c,u)=>c.concat(i(u,a)),[]);if(s.type=="seq")for(let c=0;;c++){let u=i(s.exprs[c],a);if(c==s.exprs.length-1)return u;o(u,a=n())}else if(s.type=="star"){let c=n();return r(a,c),o(i(s.expr,c),c),[r(c)]}else if(s.type=="plus"){let c=n();return o(i(s.expr,a),c),o(i(s.expr,c),c),[r(c)]}else{if(s.type=="opt")return[r(a)].concat(i(s.expr,a));if(s.type=="range"){let c=a;for(let u=0;u{e[s].forEach(({term:a,to:c})=>{if(!a)return;let u;for(let f=0;f{u||o.push([a,u=[]]),u.indexOf(f)==-1&&u.push(f)})})});let i=t[r.join(",")]=new Tl(r.indexOf(e.length-1)>-1);for(let s=0;s-1}allowsMarks(t){if(this.markSet==null)return!0;for(let n=0;nr[i]=new o7(i,n,s));let o=n.spec.topNode||"doc";if(!r[o])throw new RangeError("Schema is missing its top node type ('"+o+"')");if(!r.text)throw new RangeError("Every schema needs a 'text' type");for(let i in r.text.attrs)throw new RangeError("The text node type should not have attributes");return r}};class T0e{constructor(t){this.hasDefault=Object.prototype.hasOwnProperty.call(t,"default"),this.default=t.default}get isRequired(){return!this.hasDefault}}class U0{constructor(t,n,r,o){this.name=t,this.rank=n,this.schema=r,this.spec=o,this.attrs=r7(o.attrs),this.excluded=null;let i=t7(this.attrs);this.instance=i?new wt(this,i):null}create(t=null){return!t&&this.instance?this.instance:new wt(this,n7(this.attrs,t))}static compile(t,n){let r=Object.create(null),o=0;return t.forEach((i,s)=>r[i]=new U0(i,o++,n,s)),r}removeFromSet(t){for(var n=0;n-1}}class I0e{constructor(t){this.cached=Object.create(null);let n=this.spec={};for(let o in t)n[o]=t[o];n.nodes=Ln.from(t.nodes),n.marks=Ln.from(t.marks||{}),this.nodes=gT.compile(this.spec.nodes,this),this.marks=U0.compile(this.spec.marks,this);let r=Object.create(null);for(let o in this.nodes){if(o in this.marks)throw new RangeError(o+" can not be both a node and a mark");let i=this.nodes[o],s=i.spec.content||"",a=i.spec.marks;i.contentMatch=r[s]||(r[s]=Tl.parse(s,this.nodes)),i.inlineContent=i.contentMatch.inlineContent,i.markSet=a=="_"?null:a?vT(this,a.split(" ")):a==""||!i.inlineContent?[]:null}for(let o in this.marks){let i=this.marks[o],s=i.spec.excludes;i.excluded=s==null?[i]:s==""?[]:vT(this,s.split(" "))}this.nodeFromJSON=this.nodeFromJSON.bind(this),this.markFromJSON=this.markFromJSON.bind(this),this.topNodeType=this.nodes[this.spec.topNode||"doc"],this.cached.wrappings=Object.create(null)}node(t,n=null,r,o){if(typeof t=="string")t=this.nodeType(t);else if(t instanceof gT){if(t.schema!=this)throw new RangeError("Node type from different schema used ("+t.name+")")}else throw new RangeError("Invalid node type: "+t);return t.createChecked(n,r,o)}text(t,n){let r=this.nodes.text;return new zv(r,r.defaultAttrs,t,wt.setFrom(n))}mark(t,n){return typeof t=="string"&&(t=this.marks[t]),t.create(n)}nodeFromJSON(t){return xl.fromJSON(this,t)}markFromJSON(t){return wt.fromJSON(this,t)}nodeType(t){let n=this.nodes[t];if(!n)throw new RangeError("Unknown node type: "+t);return n}}function vT(e,t){let n=[];for(let r=0;r-1)&&n.push(s=c)}if(!s)throw new SyntaxError("Unknown mark type: '"+t[r]+"'")}return n}class fu{constructor(t,n){this.schema=t,this.rules=n,this.tags=[],this.styles=[],n.forEach(r=>{r.tag?this.tags.push(r):r.style&&this.styles.push(r)}),this.normalizeLists=!this.tags.some(r=>{if(!/^(ul|ol)\b/.test(r.tag)||!r.node)return!1;let o=t.nodes[r.node];return o.contentMatch.matchType(o)})}parse(t,n={}){let r=new _T(this,n,!1);return r.addAll(t,n.from,n.to),r.finish()}parseSlice(t,n={}){let r=new _T(this,n,!0);return r.addAll(t,n.from,n.to),ye.maxOpen(r.finish())}matchTag(t,n,r){for(let o=r?this.tags.indexOf(r)+1:0;ot.length&&(a.charCodeAt(t.length)!=61||a.slice(t.length+1)!=n))){if(s.getAttrs){let c=s.getAttrs(n);if(c===!1)continue;s.attrs=c||void 0}return s}}}static schemaRules(t){let n=[];function r(o){let i=o.priority==null?50:o.priority,s=0;for(;s{r(s=wT(s)),s.mark||s.ignore||s.clearMark||(s.mark=o)})}for(let o in t.nodes){let i=t.nodes[o].spec.parseDOM;i&&i.forEach(s=>{r(s=wT(s)),s.node||s.ignore||s.mark||(s.node=o)})}return n}static fromSchema(t){return t.cached.domParser||(t.cached.domParser=new fu(t,fu.schemaRules(t)))}}const i7={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},j0e={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},s7={ol:!0,ul:!0},Av=1,Bv=2,Rd=4;function yT(e,t,n){return t!=null?(t?Av:0)|(t==="full"?Bv:0):e&&e.whitespace=="pre"?Av|Bv:n&~Rd}class ah{constructor(t,n,r,o,i,s,a){this.type=t,this.attrs=n,this.marks=r,this.pendingMarks=o,this.solid=i,this.options=a,this.content=[],this.activeMarks=wt.none,this.stashMarks=[],this.match=s||(a&Rd?null:t.contentMatch)}findWrapping(t){if(!this.match){if(!this.type)return[];let n=this.type.contentMatch.fillBefore(se.from(t));if(n)this.match=this.type.contentMatch.matchFragment(n);else{let r=this.type.contentMatch,o;return(o=r.findWrapping(t.type))?(this.match=r,o):null}}return this.match.findWrapping(t.type)}finish(t){if(!(this.options&Av)){let r=this.content[this.content.length-1],o;if(r&&r.isText&&(o=/[ \t\r\n\u000c]+$/.exec(r.text))){let i=r;r.text.length==o[0].length?this.content.pop():this.content[this.content.length-1]=i.withText(i.text.slice(0,i.text.length-o[0].length))}}let n=se.from(this.content);return!t&&this.match&&(n=n.append(this.match.fillBefore(se.empty,!0))),this.type?this.type.create(this.attrs,n,this.marks):n}popFromStashMark(t){for(let n=this.stashMarks.length-1;n>=0;n--)if(t.eq(this.stashMarks[n]))return this.stashMarks.splice(n,1)[0]}applyPending(t){for(let n=0,r=this.pendingMarks;nthis.addAll(t)),s&&this.sync(a),this.needsBlock=c}else this.withStyleRules(t,()=>{this.addElementByRule(t,i,i.consuming===!1?o:void 0)})}leafFallback(t){t.nodeName=="BR"&&this.top.type&&this.top.type.inlineContent&&this.addTextNode(t.ownerDocument.createTextNode(` -`))}ignoreFallback(t){t.nodeName=="BR"&&(!this.top.type||!this.top.type.inlineContent)&&this.findPlace(this.parser.schema.text("-"))}readStyles(t){let n=wt.none,r=wt.none;for(let o=0;o{s.clearMark(a)&&(r=a.addToSet(r))}):n=this.parser.schema.marks[s.mark].create(s.attrs).addToSet(n),s.consuming===!1)i=s;else break}return[n,r]}addElementByRule(t,n,r){let o,i,s;n.node?(i=this.parser.schema.nodes[n.node],i.isLeaf?this.insertNode(i.create(n.attrs))||this.leafFallback(t):o=this.enter(i,n.attrs||null,n.preserveWhitespace)):(s=this.parser.schema.marks[n.mark].create(n.attrs),this.addPendingMark(s));let a=this.top;if(i&&i.isLeaf)this.findInside(t);else if(r)this.addElement(t,r);else if(n.getContent)this.findInside(t),n.getContent(t,this.parser.schema).forEach(c=>this.insertNode(c));else{let c=t;typeof n.contentElement=="string"?c=t.querySelector(n.contentElement):typeof n.contentElement=="function"?c=n.contentElement(t):n.contentElement&&(c=n.contentElement),this.findAround(t,c,!0),this.addAll(c)}o&&this.sync(a)&&this.open--,s&&this.removePendingMark(s,a)}addAll(t,n,r){let o=n||0;for(let i=n?t.childNodes[n]:t.firstChild,s=r==null?null:t.childNodes[r];i!=s;i=i.nextSibling,++o)this.findAtPoint(t,o),this.addDOM(i);this.findAtPoint(t,o)}findPlace(t){let n,r;for(let o=this.open;o>=0;o--){let i=this.nodes[o],s=i.findWrapping(t);if(s&&(!n||n.length>s.length)&&(n=s,r=i,!s.length)||i.solid)break}if(!n)return!1;this.sync(r);for(let o=0;othis.open){for(;n>this.open;n--)this.nodes[n-1].content.push(this.nodes[n].finish(t));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(t){for(let n=this.open;n>=0;n--)if(this.nodes[n]==t)return this.open=n,!0;return!1}get currentPos(){this.closeExtra();let t=0;for(let n=this.open;n>=0;n--){let r=this.nodes[n].content;for(let o=r.length-1;o>=0;o--)t+=r[o].nodeSize;n&&t++}return t}findAtPoint(t,n){if(this.find)for(let r=0;r-1)return t.split(/\s*\|\s*/).some(this.matchesContext,this);let n=t.split("/"),r=this.options.context,o=!this.isOpen&&(!r||r.parent.type==this.nodes[0].type),i=-(r?r.depth+1:0)+(o?0:1),s=(a,c)=>{for(;a>=0;a--){let u=n[a];if(u==""){if(a==n.length-1||a==0)continue;for(;c>=i;c--)if(s(a-1,c))return!0;return!1}else{let f=c>0||c==0&&o?this.nodes[c].type:r&&c>=i?r.node(c-i).type:null;if(!f||f.name!=u&&f.groups.indexOf(u)==-1)return!1;c--}}return!0};return s(n.length-1,this.open)}textblockFromContext(){let t=this.options.context;if(t)for(let n=t.depth;n>=0;n--){let r=t.node(n).contentMatchAt(t.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}}addPendingMark(t){let n=A0e(t,this.top.pendingMarks);n&&this.top.stashMarks.push(n),this.top.pendingMarks=t.addToSet(this.top.pendingMarks)}removePendingMark(t,n){for(let r=this.open;r>=0;r--){let o=this.nodes[r];if(o.pendingMarks.lastIndexOf(t)>-1)o.pendingMarks=t.removeFromSet(o.pendingMarks);else{o.activeMarks=t.removeFromSet(o.activeMarks);let s=o.popFromStashMark(t);s&&o.type&&o.type.allowsMarkType(s.type)&&(o.activeMarks=s.addToSet(o.activeMarks))}if(o==n)break}}}function L0e(e){for(let t=e.firstChild,n=null;t;t=t.nextSibling){let r=t.nodeType==1?t.nodeName.toLowerCase():null;r&&s7.hasOwnProperty(r)&&n?(n.appendChild(t),t=n):r=="li"?n=t:r&&(n=null)}}function D0e(e,t){return(e.matches||e.msMatchesSelector||e.webkitMatchesSelector||e.mozMatchesSelector).call(e,t)}function R0e(e){let t=/\s*([\w-]+)\s*:\s*([^;]+)/g,n,r=[];for(;n=t.exec(e);)r.push(n[1],n[2].trim());return r}function wT(e){let t={};for(let n in e)t[n]=e[n];return t}function z0e(e,t){let n=t.schema.nodes;for(let r in n){let o=n[r];if(!o.allowsMarkType(e))continue;let i=[],s=a=>{i.push(a);for(let c=0;c{if(i.length||s.marks.length){let a=0,c=0;for(;a=0;o--){let i=this.serializeMark(t.marks[o],t.isInline,n);i&&((i.contentDOM||i.dom).appendChild(r),r=i.dom)}return r}serializeMark(t,n,r={}){let o=this.marks[t.type.name];return o&&$i.renderSpec(X_(r),o(t,n))}static renderSpec(t,n,r=null){if(typeof n=="string")return{dom:t.createTextNode(n)};if(n.nodeType!=null)return{dom:n};if(n.dom&&n.dom.nodeType!=null)return n;let o=n[0],i=o.indexOf(" ");i>0&&(r=o.slice(0,i),o=o.slice(i+1));let s,a=r?t.createElementNS(r,o):t.createElement(o),c=n[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 p=f.indexOf(" ");p>0?a.setAttributeNS(f.slice(0,p),f.slice(p+1),c[f]):a.setAttribute(f,c[f])}}for(let f=u;fu)throw new RangeError("Content hole must be the only child of its parent node");return{dom:a,contentDOM:a}}else{let{dom:g,contentDOM:v}=$i.renderSpec(t,p,r);if(a.appendChild(g),v){if(s)throw new RangeError("Multiple content holes");s=v}}}return{dom:a,contentDOM:s}}static fromSchema(t){return t.cached.domSerializer||(t.cached.domSerializer=new $i(this.nodesFromSchema(t),this.marksFromSchema(t)))}static nodesFromSchema(t){let n=bT(t.nodes);return n.text||(n.text=r=>r.text),n}static marksFromSchema(t){return bT(t.marks)}}function bT(e){let t={};for(let n in e){let r=e[n].spec.toDOM;r&&(t[n]=r)}return t}function X_(e){return e.document||window.document}const a7=65535,l7=Math.pow(2,16);function B0e(e,t){return e+t*l7}function xT(e){return e&a7}function F0e(e){return(e-(e&a7))/l7}const c7=1,u7=2,Jh=4,d7=8;class lx{constructor(t,n,r){this.pos=t,this.delInfo=n,this.recover=r}get deleted(){return(this.delInfo&d7)>0}get deletedBefore(){return(this.delInfo&(c7|Jh))>0}get deletedAfter(){return(this.delInfo&(u7|Jh))>0}get deletedAcross(){return(this.delInfo&Jh)>0}}class co{constructor(t,n=!1){if(this.ranges=t,this.inverted=n,!t.length&&co.empty)return co.empty}recover(t){let n=0,r=xT(t);if(!this.inverted)for(let o=0;ot)break;let u=this.ranges[a+i],f=this.ranges[a+s],p=c+u;if(t<=p){let g=u?t==c?-1:t==p?1:n:n,v=c+o+(g<0?0:f);if(r)return v;let y=t==(n<0?c:p)?null:B0e(a/3,t-c),w=t==c?u7:t==p?c7:Jh;return(n<0?t!=c:t!=p)&&(w|=d7),new lx(v,w,y)}o+=f-u}return r?t+o:new lx(t+o,0,null)}touches(t,n){let r=0,o=xT(n),i=this.inverted?2:1,s=this.inverted?1:2;for(let a=0;at)break;let u=this.ranges[a+i],f=c+u;if(t<=f&&a==o*3)return!0;r+=this.ranges[a+s]-u}return!1}forEach(t){let n=this.inverted?2:1,r=this.inverted?1:2;for(let o=0,i=0;o=0;n--){let o=t.getMirror(n);this.appendMap(t.maps[n].invert(),o!=null&&o>n?r-o-1:void 0)}}invert(){let t=new Gc;return t.appendMappingInverted(this),t}map(t,n=1){if(this.mirror)return this._map(t,n,!0);for(let r=this.from;ri&&c!s.isAtom||!a.type.allowsMarkType(this.mark.type)?s:s.mark(this.mark.addToSet(s.marks)),o),n.openStart,n.openEnd);return cn.fromReplace(t,this.from,this.to,i)}invert(){return new Mi(this.from,this.to,this.mark)}map(t){let n=t.mapResult(this.from,1),r=t.mapResult(this.to,-1);return n.deleted&&r.deleted||n.pos>=r.pos?null:new ea(n.pos,r.pos,this.mark)}merge(t){return t instanceof ea&&t.mark.eq(this.mark)&&this.from<=t.to&&this.to>=t.from?new ea(Math.min(this.from,t.from),Math.max(this.to,t.to),this.mark):null}toJSON(){return{stepType:"addMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(t,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for AddMarkStep.fromJSON");return new ea(n.from,n.to,t.markFromJSON(n.mark))}}sr.jsonID("addMark",ea);class Mi extends sr{constructor(t,n,r){super(),this.from=t,this.to=n,this.mark=r}apply(t){let n=t.slice(this.from,this.to),r=new ye(YP(n.content,o=>o.mark(this.mark.removeFromSet(o.marks)),t),n.openStart,n.openEnd);return cn.fromReplace(t,this.from,this.to,r)}invert(){return new ea(this.from,this.to,this.mark)}map(t){let n=t.mapResult(this.from,1),r=t.mapResult(this.to,-1);return n.deleted&&r.deleted||n.pos>=r.pos?null:new Mi(n.pos,r.pos,this.mark)}merge(t){return t instanceof Mi&&t.mark.eq(this.mark)&&this.from<=t.to&&this.to>=t.from?new Mi(Math.min(this.from,t.from),Math.max(this.to,t.to),this.mark):null}toJSON(){return{stepType:"removeMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(t,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for RemoveMarkStep.fromJSON");return new Mi(n.from,n.to,t.markFromJSON(n.mark))}}sr.jsonID("removeMark",Mi);class ta extends sr{constructor(t,n){super(),this.pos=t,this.mark=n}apply(t){let n=t.nodeAt(this.pos);if(!n)return cn.fail("No node at mark step's position");let r=n.type.create(n.attrs,null,this.mark.addToSet(n.marks));return cn.fromReplace(t,this.pos,this.pos+1,new ye(se.from(r),0,n.isLeaf?0:1))}invert(t){let n=t.nodeAt(this.pos);if(n){let r=this.mark.addToSet(n.marks);if(r.length==n.marks.length){for(let o=0;or.pos?null:new En(n.pos,r.pos,o,i,this.slice,this.insert,this.structure)}toJSON(){let t={stepType:"replaceAround",from:this.from,to:this.to,gapFrom:this.gapFrom,gapTo:this.gapTo,insert:this.insert};return this.slice.size&&(t.slice=this.slice.toJSON()),this.structure&&(t.structure=!0),t}static fromJSON(t,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 En(n.from,n.to,n.gapFrom,n.gapTo,ye.fromJSON(t,n.slice),n.insert,!!n.structure)}}sr.jsonID("replaceAround",En);function cx(e,t,n){let r=e.resolve(t),o=n-t,i=r.depth;for(;o>0&&i>0&&r.indexAfter(i)==r.node(i).childCount;)i--,o--;if(o>0){let s=r.node(i).maybeChild(r.indexAfter(i));for(;o>0;){if(!s||s.isLeaf)return!0;s=s.firstChild,o--}}return!1}function V0e(e,t,n,r){let o=[],i=[],s,a;e.doc.nodesBetween(t,n,(c,u,f)=>{if(!c.isInline)return;let p=c.marks;if(!r.isInSet(p)&&f.type.allowsMarkType(r.type)){let g=Math.max(u,t),v=Math.min(u+c.nodeSize,n),y=r.addToSet(p);for(let w=0;we.step(c)),i.forEach(c=>e.step(c))}function H0e(e,t,n,r){let o=[],i=0;e.doc.nodesBetween(t,n,(s,a)=>{if(!s.isInline)return;i++;let c=null;if(r instanceof U0){let u=s.marks,f;for(;f=r.isInSet(u);)(c||(c=[])).push(f),u=f.removeFromSet(u)}else r?r.isInSet(s.marks)&&(c=[r]):c=s.marks;if(c&&c.length){let u=Math.min(a+s.nodeSize,n);for(let f=0;fe.step(new Mi(s.from,s.to,s.style)))}function W0e(e,t,n,r=n.contentMatch){let o=e.doc.nodeAt(t),i=[],s=t+1;for(let a=0;a=0;a--)e.step(i[a])}function U0e(e,t,n){return(t==0||e.canReplace(t,e.childCount))&&(n==e.childCount||e.canReplace(0,n))}function $u(e){let n=e.parent.content.cutByIndex(e.startIndex,e.endIndex);for(let r=e.depth;;--r){let o=e.$from.node(r),i=e.$from.index(r),s=e.$to.indexAfter(r);if(rn;y--)w||r.index(y)>0?(w=!0,f=se.from(r.node(y).copy(f)),p++):c--;let g=se.empty,v=0;for(let y=i,w=!1;y>n;y--)w||o.after(y+1)=0;s--){if(r.size){let a=n[s].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=se.from(n[s].type.create(n[s].attrs,r))}let o=t.start,i=t.end;e.step(new En(o,i,o,i,new ye(r,0,0),n.length,!0))}function q0e(e,t,n,r,o){if(!r.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock");let i=e.steps.length;e.doc.nodesBetween(t,n,(s,a)=>{if(s.isTextblock&&!s.hasMarkup(r,o)&&J0e(e.doc,e.mapping.slice(i).map(a),r)){e.clearIncompatible(e.mapping.slice(i).map(a,1),r);let c=e.mapping.slice(i),u=c.map(a,1),f=c.map(a+s.nodeSize,1);return e.step(new En(u,f,u+1,f-1,new ye(se.from(r.create(o,null,s.marks)),0,0),1,!0)),!1}})}function J0e(e,t,n){let r=e.resolve(t),o=r.index();return r.parent.canReplaceWith(o,o+1,n)}function X0e(e,t,n,r,o){let i=e.doc.nodeAt(t);if(!i)throw new RangeError("No node at given position");n||(n=i.type);let s=n.create(r,null,o||i.marks);if(i.isLeaf)return e.replaceWith(t,t+i.nodeSize,s);if(!n.validContent(i.content))throw new RangeError("Invalid content for node type "+n.name);e.step(new En(t,t+i.nodeSize,t+1,t+i.nodeSize-1,new ye(se.from(s),0,0),1,!0))}function Yc(e,t,n=1,r){let o=e.resolve(t),i=o.depth-n,s=r&&r[r.length-1]||o.parent;if(i<0||o.parent.type.spec.isolating||!o.parent.canReplace(o.index(),o.parent.childCount)||!s.type.validContent(o.parent.content.cutByIndex(o.index(),o.parent.childCount)))return!1;for(let u=o.depth-1,f=n-2;u>i;u--,f--){let p=o.node(u),g=o.index(u);if(p.type.spec.isolating)return!1;let v=p.content.cutByIndex(g,p.childCount),y=r&&r[f+1];y&&(v=v.replaceChild(0,y.type.create(y.attrs)));let w=r&&r[f]||p;if(!p.canReplace(g+1,p.childCount)||!w.type.validContent(v))return!1}let a=o.indexAfter(i),c=r&&r[0];return o.node(i).canReplaceWith(a,a,c?c.type:o.node(i+1).type)}function Q0e(e,t,n=1,r){let o=e.doc.resolve(t),i=se.empty,s=se.empty;for(let a=o.depth,c=o.depth-n,u=n-1;a>c;a--,u--){i=se.from(o.node(a).copy(i));let f=r&&r[u];s=se.from(f?f.type.create(f.attrs,s):o.node(a).copy(s))}e.step(new zn(t,t,new ye(i.append(s),n,n),!0))}function La(e,t){let n=e.resolve(t),r=n.index();return f7(n.nodeBefore,n.nodeAfter)&&n.parent.canReplace(r,r+1)}function f7(e,t){return!!(e&&t&&!e.isLeaf&&e.canAppend(t))}function Z0(e,t,n=-1){let r=e.resolve(t);for(let o=r.depth;;o--){let i,s,a=r.index(o);if(o==r.depth?(i=r.nodeBefore,s=r.nodeAfter):n>0?(i=r.node(o+1),a++,s=r.node(o).maybeChild(a)):(i=r.node(o).maybeChild(a-1),s=r.node(o+1)),i&&!i.isTextblock&&f7(i,s)&&r.node(o).canReplace(a,a+1))return t;if(o==0)break;t=n<0?r.before(o):r.after(o)}}function e1e(e,t,n){let r=new zn(t-n,t+n,ye.empty,!0);e.step(r)}function t1e(e,t,n){let r=e.resolve(t);if(r.parent.canReplaceWith(r.index(),r.index(),n))return t;if(r.parentOffset==0)for(let o=r.depth-1;o>=0;o--){let i=r.index(o);if(r.node(o).canReplaceWith(i,i,n))return r.before(o+1);if(i>0)return null}if(r.parentOffset==r.parent.content.size)for(let o=r.depth-1;o>=0;o--){let i=r.indexAfter(o);if(r.node(o).canReplaceWith(i,i,n))return r.after(o+1);if(i=0;s--){let a=s==r.depth?0:r.pos<=(r.start(s+1)+r.end(s+1))/2?-1:1,c=r.index(s)+(a>0?1:0),u=r.node(s),f=!1;if(i==1)f=u.canReplace(c,c,o);else{let p=u.contentMatchAt(c).findWrapping(o.firstChild.type);f=p&&u.canReplaceWith(c,c,p[0])}if(f)return a==0?r.pos:a<0?r.before(s+1):r.after(s+1)}return null}function qP(e,t,n=t,r=ye.empty){if(t==n&&!r.size)return null;let o=e.resolve(t),i=e.resolve(n);return h7(o,i,r)?new zn(t,n,r):new n1e(o,i,r).fit()}function h7(e,t,n){return!n.openStart&&!n.openEnd&&e.start()==t.start()&&e.parent.canReplace(e.index(),t.index(),n.content)}class n1e{constructor(t,n,r){this.$from=t,this.$to=n,this.unplaced=r,this.frontier=[],this.placed=se.empty;for(let o=0;o<=t.depth;o++){let i=t.node(o);this.frontier.push({type:i.type,match:i.contentMatchAt(t.indexAfter(o))})}for(let o=t.depth;o>0;o--)this.placed=se.from(t.node(o).copy(this.placed))}get depth(){return this.frontier.length-1}fit(){for(;this.unplaced.size;){let u=this.findFittable();u?this.placeNodes(u):this.openMore()||this.dropNode()}let t=this.mustMoveInline(),n=this.placed.size-this.depth-this.$from.depth,r=this.$from,o=this.close(t<0?this.$to:r.doc.resolve(t));if(!o)return null;let i=this.placed,s=r.depth,a=o.depth;for(;s&&a&&i.childCount==1;)i=i.firstChild.content,s--,a--;let c=new ye(i,s,a);return t>-1?new En(r.pos,t,this.$to.pos,this.$to.end(),c,n):c.size||r.pos!=this.$to.pos?new zn(r.pos,o.pos,c):null}findFittable(){let t=this.unplaced.openStart;for(let n=this.unplaced.content,r=0,o=this.unplaced.openEnd;r1&&(o=0),i.type.spec.isolating&&o<=r){t=r;break}n=i.content}for(let n=1;n<=2;n++)for(let r=n==1?t:this.unplaced.openStart;r>=0;r--){let o,i=null;r?(i=ew(this.unplaced.content,r-1).firstChild,o=i.content):o=this.unplaced.content;let s=o.firstChild;for(let a=this.depth;a>=0;a--){let{type:c,match:u}=this.frontier[a],f,p=null;if(n==1&&(s?u.matchType(s.type)||(p=u.fillBefore(se.from(s),!1)):i&&c.compatibleContent(i.type)))return{sliceDepth:r,frontierDepth:a,parent:i,inject:p};if(n==2&&s&&(f=u.findWrapping(s.type)))return{sliceDepth:r,frontierDepth:a,parent:i,wrap:f};if(i&&u.matchType(i.type))break}}}openMore(){let{content:t,openStart:n,openEnd:r}=this.unplaced,o=ew(t,n);return!o.childCount||o.firstChild.isLeaf?!1:(this.unplaced=new ye(t,n+1,Math.max(r,o.size+n>=t.size-r?n+1:0)),!0)}dropNode(){let{content:t,openStart:n,openEnd:r}=this.unplaced,o=ew(t,n);if(o.childCount<=1&&n>0){let i=t.size-n<=n+o.size;this.unplaced=new ye(vd(t,n-1,1),n-1,i?n-1:r)}else this.unplaced=new ye(vd(t,n,1),n,r)}placeNodes({sliceDepth:t,frontierDepth:n,parent:r,inject:o,wrap:i}){for(;this.depth>n;)this.closeFrontierNode();if(i)for(let w=0;w1||c==0||w.content.size)&&(p=P,f.push(m7(w.mark(g.allowedMarks(w.marks)),u==1?c:0,u==a.childCount?v:-1)))}let y=u==a.childCount;y||(v=-1),this.placed=yd(this.placed,n,se.from(f)),this.frontier[n].match=p,y&&v<0&&r&&r.type==this.frontier[this.depth].type&&this.frontier.length>1&&this.closeFrontierNode();for(let w=0,P=a;w1&&o==this.$to.end(--r);)++o;return o}findCloseLevel(t){e:for(let n=Math.min(this.depth,t.depth);n>=0;n--){let{match:r,type:o}=this.frontier[n],i=n=0;a--){let{match:c,type:u}=this.frontier[a],f=tw(t,a,u,c,!0);if(!f||f.childCount)continue e}return{depth:n,fit:s,move:i?t.doc.resolve(t.after(n+1)):t}}}}close(t){let n=this.findCloseLevel(t);if(!n)return null;for(;this.depth>n.depth;)this.closeFrontierNode();n.fit.childCount&&(this.placed=yd(this.placed,n.depth,n.fit)),t=n.move;for(let r=n.depth+1;r<=t.depth;r++){let o=t.node(r),i=o.type.contentMatch.fillBefore(o.content,!0,t.index(r));this.openFrontierNode(o.type,o.attrs,i)}return t}openFrontierNode(t,n=null,r){let o=this.frontier[this.depth];o.match=o.match.matchType(t),this.placed=yd(this.placed,this.depth,se.from(t.create(n,r))),this.frontier.push({type:t,match:t.contentMatch})}closeFrontierNode(){let n=this.frontier.pop().match.fillBefore(se.empty,!0);n.childCount&&(this.placed=yd(this.placed,this.frontier.length,n))}}function vd(e,t,n){return t==0?e.cutByIndex(n,e.childCount):e.replaceChild(0,e.firstChild.copy(vd(e.firstChild.content,t-1,n)))}function yd(e,t,n){return t==0?e.append(n):e.replaceChild(e.childCount-1,e.lastChild.copy(yd(e.lastChild.content,t-1,n)))}function ew(e,t){for(let n=0;n1&&(r=r.replaceChild(0,m7(r.firstChild,t-1,r.childCount==1?n-1:0))),t>0&&(r=e.type.contentMatch.fillBefore(r).append(r),n<=0&&(r=r.append(e.type.contentMatch.matchFragment(r).fillBefore(se.empty,!0)))),e.copy(r)}function tw(e,t,n,r,o){let i=e.node(t),s=o?e.indexAfter(t):e.index(t);if(s==i.childCount&&!n.compatibleContent(i.type))return null;let a=r.fillBefore(i.content,!0,s);return a&&!r1e(n,i.content,s)?a:null}function r1e(e,t,n){for(let r=n;r0;g--,v--){let y=o.node(g).type.spec;if(y.defining||y.definingAsContext||y.isolating)break;s.indexOf(g)>-1?a=g:o.before(g)==v&&s.splice(1,0,-g)}let c=s.indexOf(a),u=[],f=r.openStart;for(let g=r.content,v=0;;v++){let y=g.firstChild;if(u.push(y),v==r.openStart)break;g=y.content}for(let g=f-1;g>=0;g--){let v=u[g],y=o1e(v.type);if(y&&!v.sameMarkup(o.node(Math.abs(a)-1)))f=g;else if(y||!v.type.isTextblock)break}for(let g=r.openStart;g>=0;g--){let v=(g+f+1)%(r.openStart+1),y=u[v];if(y)for(let w=0;w=0&&(e.replace(t,n,r),!(e.steps.length>p));g--){let v=s[g];v<0||(t=o.before(v),n=i.after(v))}}function g7(e,t,n,r,o){if(tr){let i=o.contentMatchAt(0),s=i.fillBefore(e).append(e);e=s.append(i.matchFragment(s).fillBefore(se.empty,!0))}return e}function s1e(e,t,n,r){if(!r.isInline&&t==n&&e.doc.resolve(t).parent.content.size){let o=t1e(e.doc,t,r.type);o!=null&&(t=n=o)}e.replaceRange(t,n,new ye(se.from(r),0,0))}function a1e(e,t,n){let r=e.doc.resolve(t),o=e.doc.resolve(n),i=v7(r,o);for(let s=0;s0&&(c||r.node(a-1).canReplace(r.index(a-1),o.indexAfter(a-1))))return e.delete(r.before(a),o.after(a))}for(let s=1;s<=r.depth&&s<=o.depth;s++)if(t-r.start(s)==r.depth-s&&n>r.end(s)&&o.end(s)-n!=o.depth-s)return e.delete(r.before(s),n);e.delete(t,n)}function v7(e,t){let n=[],r=Math.min(e.depth,t.depth);for(let o=r;o>=0;o--){let i=e.start(o);if(it.pos+(t.depth-o)||e.node(o).type.spec.isolating||t.node(o).type.spec.isolating)break;(i==t.start(o)||o==e.depth&&o==t.depth&&e.parent.inlineContent&&t.parent.inlineContent&&o&&t.start(o-1)==i-1)&&n.push(o)}return n}class Kc extends sr{constructor(t,n,r){super(),this.pos=t,this.attr=n,this.value=r}apply(t){let n=t.nodeAt(this.pos);if(!n)return cn.fail("No node at attribute step's position");let r=Object.create(null);for(let i in n.attrs)r[i]=n.attrs[i];r[this.attr]=this.value;let o=n.type.create(r,null,n.marks);return cn.fromReplace(t,this.pos,this.pos+1,new ye(se.from(o),0,n.isLeaf?0:1))}getMap(){return co.empty}invert(t){return new Kc(this.pos,this.attr,t.nodeAt(this.pos).attrs[this.attr])}map(t){let n=t.mapResult(this.pos,1);return n.deletedAfter?null:new Kc(n.pos,this.attr,this.value)}toJSON(){return{stepType:"attr",pos:this.pos,attr:this.attr,value:this.value}}static fromJSON(t,n){if(typeof n.pos!="number"||typeof n.attr!="string")throw new RangeError("Invalid input for AttrStep.fromJSON");return new Kc(n.pos,n.attr,n.value)}}sr.jsonID("attr",Kc);class vf extends sr{constructor(t,n){super(),this.attr=t,this.value=n}apply(t){let n=Object.create(null);for(let o in t.attrs)n[o]=t.attrs[o];n[this.attr]=this.value;let r=t.type.create(n,t.content,t.marks);return cn.ok(r)}getMap(){return co.empty}invert(t){return new vf(this.attr,t.attrs[this.attr])}map(t){return this}toJSON(){return{stepType:"docAttr",attr:this.attr,value:this.value}}static fromJSON(t,n){if(typeof n.attr!="string")throw new RangeError("Invalid input for DocAttrStep.fromJSON");return new vf(n.attr,n.value)}}sr.jsonID("docAttr",vf);let hu=class extends Error{};hu=function e(t){let n=Error.call(this,t);return n.__proto__=e.prototype,n};hu.prototype=Object.create(Error.prototype);hu.prototype.constructor=hu;hu.prototype.name="TransformError";class y7{constructor(t){this.doc=t,this.steps=[],this.docs=[],this.mapping=new Gc}get before(){return this.docs.length?this.docs[0]:this.doc}step(t){let n=this.maybeStep(t);if(n.failed)throw new hu(n.failed);return this}maybeStep(t){let n=t.apply(this.doc);return n.failed||this.addStep(t,n.doc),n}get docChanged(){return this.steps.length>0}addStep(t,n){this.docs.push(this.doc),this.steps.push(t),this.mapping.appendMap(t.getMap()),this.doc=n}replace(t,n=t,r=ye.empty){let o=qP(this.doc,t,n,r);return o&&this.step(o),this}replaceWith(t,n,r){return this.replace(t,n,new ye(se.from(r),0,0))}delete(t,n){return this.replace(t,n,ye.empty)}insert(t,n){return this.replaceWith(t,t,n)}replaceRange(t,n,r){return i1e(this,t,n,r),this}replaceRangeWith(t,n,r){return s1e(this,t,n,r),this}deleteRange(t,n){return a1e(this,t,n),this}lift(t,n){return Z0e(this,t,n),this}join(t,n=1){return e1e(this,t,n),this}wrap(t,n){return K0e(this,t,n),this}setBlockType(t,n=t,r,o=null){return q0e(this,t,n,r,o),this}setNodeMarkup(t,n,r=null,o){return X0e(this,t,n,r,o),this}setNodeAttribute(t,n,r){return this.step(new Kc(t,n,r)),this}setDocAttribute(t,n){return this.step(new vf(t,n)),this}addNodeMark(t,n){return this.step(new ta(t,n)),this}removeNodeMark(t,n){if(!(n instanceof wt)){let r=this.doc.nodeAt(t);if(!r)throw new RangeError("No node at position "+t);if(n=n.isInSet(r.marks),!n)return this}return this.step(new pu(t,n)),this}split(t,n=1,r){return Q0e(this,t,n,r),this}addMark(t,n,r){return V0e(this,t,n,r),this}removeMark(t,n,r){return H0e(this,t,n,r),this}clearIncompatible(t,n,r){return W0e(this,t,n,r),this}}const nw=Object.create(null);class Ze{constructor(t,n,r){this.$anchor=t,this.$head=n,this.ranges=r||[new l1e(t.min(n),t.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 t=this.ranges;for(let n=0;n=0;i--){let s=n<0?hc(t.node(0),t.node(i),t.before(i+1),t.index(i),n,r):hc(t.node(0),t.node(i),t.after(i+1),t.index(i)+1,n,r);if(s)return s}return null}static near(t,n=1){return this.findFrom(t,n)||this.findFrom(t,-n)||new Qo(t.node(0))}static atStart(t){return hc(t,t,0,0,1)||new Qo(t)}static atEnd(t){return hc(t,t,t.content.size,t.childCount,-1)||new Qo(t)}static fromJSON(t,n){if(!n||!n.type)throw new RangeError("Invalid input for Selection.fromJSON");let r=nw[n.type];if(!r)throw new RangeError(`No selection type ${n.type} defined`);return r.fromJSON(t,n)}static jsonID(t,n){if(t in nw)throw new RangeError("Duplicate use of selection JSON ID "+t);return nw[t]=n,n.prototype.jsonID=t,n}getBookmark(){return Ve.between(this.$anchor,this.$head).getBookmark()}}Ze.prototype.visible=!0;class l1e{constructor(t,n){this.$from=t,this.$to=n}}let PT=!1;function OT(e){!PT&&!e.parent.inlineContent&&(PT=!0,console.warn("TextSelection endpoint not pointing into a node with inline content ("+e.parent.type.name+")"))}class Ve extends Ze{constructor(t,n=t){OT(t),OT(n),super(t,n)}get $cursor(){return this.$anchor.pos==this.$head.pos?this.$head:null}map(t,n){let r=t.resolve(n.map(this.head));if(!r.parent.inlineContent)return Ze.near(r);let o=t.resolve(n.map(this.anchor));return new Ve(o.parent.inlineContent?o:r,r)}replace(t,n=ye.empty){if(super.replace(t,n),n==ye.empty){let r=this.$from.marksAcross(this.$to);r&&t.ensureMarks(r)}}eq(t){return t instanceof Ve&&t.anchor==this.anchor&&t.head==this.head}getBookmark(){return new G0(this.anchor,this.head)}toJSON(){return{type:"text",anchor:this.anchor,head:this.head}}static fromJSON(t,n){if(typeof n.anchor!="number"||typeof n.head!="number")throw new RangeError("Invalid input for TextSelection.fromJSON");return new Ve(t.resolve(n.anchor),t.resolve(n.head))}static create(t,n,r=n){let o=t.resolve(n);return new this(o,r==n?o:t.resolve(r))}static between(t,n,r){let o=t.pos-n.pos;if((!r||o)&&(r=o>=0?1:-1),!n.parent.inlineContent){let i=Ze.findFrom(n,r,!0)||Ze.findFrom(n,-r,!0);if(i)n=i.$head;else return Ze.near(n,r)}return t.parent.inlineContent||(o==0?t=n:(t=(Ze.findFrom(t,-r,!0)||Ze.findFrom(t,r,!0)).$anchor,t.pos0?0:1);o>0?s=0;s+=o){let a=t.child(s);if(a.isAtom){if(!i&&Le.isSelectable(a))return Le.create(e,n-(o<0?a.nodeSize:0))}else{let c=hc(e,a,n+o,o<0?a.childCount:0,o,i);if(c)return c}n+=a.nodeSize*o}return null}function CT(e,t,n){let r=e.steps.length-1;if(r{s==null&&(s=f)}),e.setSelection(Ze.near(e.doc.resolve(s),n))}const kT=1,lh=2,ET=4;class u1e extends y7{constructor(t){super(t.doc),this.curSelectionFor=0,this.updated=0,this.meta=Object.create(null),this.time=Date.now(),this.curSelection=t.selection,this.storedMarks=t.storedMarks}get selection(){return this.curSelectionFor0}setStoredMarks(t){return this.storedMarks=t,this.updated|=lh,this}ensureMarks(t){return wt.sameSet(this.storedMarks||this.selection.$from.marks(),t)||this.setStoredMarks(t),this}addStoredMark(t){return this.ensureMarks(t.addToSet(this.storedMarks||this.selection.$head.marks()))}removeStoredMark(t){return this.ensureMarks(t.removeFromSet(this.storedMarks||this.selection.$head.marks()))}get storedMarksSet(){return(this.updated&lh)>0}addStep(t,n){super.addStep(t,n),this.updated=this.updated&~lh,this.storedMarks=null}setTime(t){return this.time=t,this}replaceSelection(t){return this.selection.replace(this,t),this}replaceSelectionWith(t,n=!0){let r=this.selection;return n&&(t=t.mark(this.storedMarks||(r.empty?r.$from.marks():r.$from.marksAcross(r.$to)||wt.none))),r.replaceWith(this,t),this}deleteSelection(){return this.selection.replace(this),this}insertText(t,n,r){let o=this.doc.type.schema;if(n==null)return t?this.replaceSelectionWith(o.text(t),!0):this.deleteSelection();{if(r==null&&(r=n),r=r??n,!t)return this.deleteRange(n,r);let i=this.storedMarks;if(!i){let s=this.doc.resolve(n);i=r==n?s.marks():s.marksAcross(this.doc.resolve(r))}return this.replaceRangeWith(n,r,o.text(t,i)),this.selection.empty||this.setSelection(Ze.near(this.selection.$to)),this}}setMeta(t,n){return this.meta[typeof t=="string"?t:t.key]=n,this}getMeta(t){return this.meta[typeof t=="string"?t:t.key]}get isGeneric(){for(let t in this.meta)return!1;return!0}scrollIntoView(){return this.updated|=ET,this}get scrolledIntoView(){return(this.updated&ET)>0}}function $T(e,t){return!t||!e?e:e.bind(t)}class _d{constructor(t,n,r){this.name=t,this.init=$T(n.init,r),this.apply=$T(n.apply,r)}}const d1e=[new _d("doc",{init(e){return e.doc||e.schema.topNodeType.createAndFill()},apply(e){return e.doc}}),new _d("selection",{init(e,t){return e.selection||Ze.atStart(t.doc)},apply(e){return e.selection}}),new _d("storedMarks",{init(e){return e.storedMarks||null},apply(e,t,n,r){return r.selection.$cursor?e.storedMarks:null}}),new _d("scrollToSelection",{init(){return 0},apply(e,t){return e.scrolledIntoView?t+1:t}})];class rw{constructor(t,n){this.schema=t,this.plugins=[],this.pluginsByKey=Object.create(null),this.fields=d1e.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 _d(r.key,r.spec.state,r))})}}class Mc{constructor(t){this.config=t}get schema(){return this.config.schema}get plugins(){return this.config.plugins}apply(t){return this.applyTransaction(t).state}filterTransaction(t,n=-1){for(let r=0;rr.toJSON())),t&&typeof t=="object")for(let r in t){if(r=="doc"||r=="selection")throw new RangeError("The JSON fields `doc` and `selection` are reserved");let o=t[r],i=o.spec.state;i&&i.toJSON&&(n[r]=i.toJSON.call(o,this[o.key]))}return n}static fromJSON(t,n,r){if(!n)throw new RangeError("Invalid input for EditorState.fromJSON");if(!t.schema)throw new RangeError("Required config field 'schema' missing");let o=new rw(t.schema,t.plugins),i=new Mc(o);return o.fields.forEach(s=>{if(s.name=="doc")i.doc=xl.fromJSON(t.schema,n.doc);else if(s.name=="selection")i.selection=Ze.fromJSON(i.doc,n.selection);else if(s.name=="storedMarks")n.storedMarks&&(i.storedMarks=n.storedMarks.map(t.schema.markFromJSON));else{if(r)for(let a in r){let c=r[a],u=c.spec.state;if(c.key==s.name&&u&&u.fromJSON&&Object.prototype.hasOwnProperty.call(n,a)){i[s.name]=u.fromJSON.call(c,t,n[a],i);return}}i[s.name]=s.init(t,i)}}),i}}function _7(e,t,n){for(let r in e){let o=e[r];o instanceof Function?o=o.bind(t):r=="handleDOMEvents"&&(o=_7(o,t,{})),n[r]=o}return n}class Zr{constructor(t){this.spec=t,this.props={},t.props&&_7(t.props,this,this.props),this.key=t.key?t.key.key:w7("plugin")}getState(t){return t[this.key]}}const ow=Object.create(null);function w7(e){return e in ow?e+"$"+ ++ow[e]:(ow[e]=0,e+"$")}class Ai{constructor(t="key"){this.key=w7(t)}get(t){return t.config.pluginsByKey[this.key]}getState(t){return t[this.key]}}const hr=function(e){for(var t=0;;t++)if(e=e.previousSibling,!e)return t},yf=function(e){let t=e.assignedSlot||e.parentNode;return t&&t.nodeType==11?t.host:t};let MT=null;const es=function(e,t,n){let r=MT||(MT=document.createRange());return r.setEnd(e,n??e.nodeValue.length),r.setStart(e,t||0),r},Il=function(e,t,n,r){return n&&(NT(e,t,n,r,-1)||NT(e,t,n,r,1))},f1e=/^(img|br|input|textarea|hr)$/i;function NT(e,t,n,r,o){for(;;){if(e==n&&t==r)return!0;if(t==(o<0?0:ki(e))){let i=e.parentNode;if(!i||i.nodeType!=1||XP(e)||f1e.test(e.nodeName)||e.contentEditable=="false")return!1;t=hr(e)+(o<0?0:1),e=i}else if(e.nodeType==1){if(e=e.childNodes[t+(o<0?-1:0)],e.contentEditable=="false")return!1;t=o<0?ki(e):0}else return!1}}function ki(e){return e.nodeType==3?e.nodeValue.length:e.childNodes.length}function p1e(e,t,n){for(let r=t==0,o=t==ki(e);r||o;){if(e==n)return!0;let i=hr(e);if(e=e.parentNode,!e)return!1;r=r&&i==0,o=o&&i==ki(e)}}function XP(e){let t;for(let n=e;n&&!(t=n.pmViewDesc);n=n.parentNode);return t&&t.node&&t.node.isBlock&&(t.dom==e||t.contentDOM==e)}const Y0=function(e){return e.focusNode&&Il(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset)};function tl(e,t){let n=document.createEvent("Event");return n.initEvent("keydown",!0,!0),n.keyCode=e,n.key=n.code=t,n}function h1e(e){let t=e.activeElement;for(;t&&t.shadowRoot;)t=t.shadowRoot.activeElement;return t}function m1e(e,t,n){if(e.caretPositionFromPoint)try{let r=e.caretPositionFromPoint(t,n);if(r)return{node:r.offsetNode,offset:r.offset}}catch{}if(e.caretRangeFromPoint){let r=e.caretRangeFromPoint(t,n);if(r)return{node:r.startContainer,offset:r.startOffset}}}const Di=typeof navigator<"u"?navigator:null,TT=typeof document<"u"?document:null,Da=Di&&Di.userAgent||"",ux=/Edge\/(\d+)/.exec(Da),b7=/MSIE \d/.exec(Da),dx=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(Da),Hr=!!(b7||dx||ux),va=b7?document.documentMode:dx?+dx[1]:ux?+ux[1]:0,oi=!Hr&&/gecko\/(\d+)/i.test(Da);oi&&+(/Firefox\/(\d+)/.exec(Da)||[0,0])[1];const fx=!Hr&&/Chrome\/(\d+)/.exec(Da),nr=!!fx,g1e=fx?+fx[1]:0,yr=!Hr&&!!Di&&/Apple Computer/.test(Di.vendor),mu=yr&&(/Mobile\/\w+/.test(Da)||!!Di&&Di.maxTouchPoints>2),$o=mu||(Di?/Mac/.test(Di.platform):!1),v1e=Di?/Win/.test(Di.platform):!1,Ko=/Android \d/.test(Da),qf=!!TT&&"webkitFontSmoothing"in TT.documentElement.style,y1e=qf?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0;function _1e(e){return{left:0,right:e.documentElement.clientWidth,top:0,bottom:e.documentElement.clientHeight}}function qi(e,t){return typeof e=="number"?e:e[t]}function w1e(e){let t=e.getBoundingClientRect(),n=t.width/e.offsetWidth||1,r=t.height/e.offsetHeight||1;return{left:t.left,right:t.left+e.clientWidth*n,top:t.top,bottom:t.top+e.clientHeight*r}}function IT(e,t,n){let r=e.someProp("scrollThreshold")||0,o=e.someProp("scrollMargin")||5,i=e.dom.ownerDocument;for(let s=n||e.dom;s;s=yf(s)){if(s.nodeType!=1)continue;let a=s,c=a==i.body,u=c?_1e(i):w1e(a),f=0,p=0;if(t.topu.bottom-qi(r,"bottom")&&(p=t.bottom-t.top>u.bottom-u.top?t.top+qi(o,"top")-u.top:t.bottom-u.bottom+qi(o,"bottom")),t.leftu.right-qi(r,"right")&&(f=t.right-u.right+qi(o,"right")),f||p)if(c)i.defaultView.scrollBy(f,p);else{let g=a.scrollLeft,v=a.scrollTop;p&&(a.scrollTop+=p),f&&(a.scrollLeft+=f);let y=a.scrollLeft-g,w=a.scrollTop-v;t={left:t.left-y,top:t.top-w,right:t.right-y,bottom:t.bottom-w}}if(c||/^(fixed|sticky)$/.test(getComputedStyle(s).position))break}}function b1e(e){let t=e.dom.getBoundingClientRect(),n=Math.max(0,t.top),r,o;for(let i=(t.left+t.right)/2,s=n+1;s=n-20){r=a,o=c.top;break}}return{refDOM:r,refTop:o,stack:x7(e.dom)}}function x7(e){let t=[],n=e.ownerDocument;for(let r=e;r&&(t.push({dom:r,top:r.scrollTop,left:r.scrollLeft}),e!=n);r=yf(r));return t}function x1e({refDOM:e,refTop:t,stack:n}){let r=e?e.getBoundingClientRect().top:0;S7(n,r==0?0:r-t)}function S7(e,t){for(let n=0;n=a){s=Math.max(y.bottom,s),a=Math.min(y.top,a);let w=y.left>t.left?y.left-t.left:y.right=(y.left+y.right)/2?1:0));continue}}else y.top>t.top&&!c&&y.left<=t.left&&y.right>=t.left&&(c=f,u={left:Math.max(y.left,Math.min(y.right,t.left)),top:y.top});!n&&(t.left>=y.right&&t.top>=y.top||t.left>=y.left&&t.top>=y.bottom)&&(i=p+1)}}return!n&&c&&(n=c,o=u,r=0),n&&n.nodeType==3?P1e(n,o):!n||r&&n.nodeType==1?{node:e,offset:i}:P7(n,o)}function P1e(e,t){let n=e.nodeValue.length,r=document.createRange();for(let o=0;o=(i.left+i.right)/2?1:0)}}return{node:e,offset:0}}function QP(e,t){return e.left>=t.left-1&&e.left<=t.right+1&&e.top>=t.top-1&&e.top<=t.bottom+1}function O1e(e,t){let n=e.parentNode;return n&&/^li$/i.test(n.nodeName)&&t.left(s.left+s.right)/2?1:-1}return e.docView.posFromDOM(r,o,i)}function k1e(e,t,n,r){let o=-1;for(let i=t,s=!1;i!=e.dom;){let a=e.docView.nearestDesc(i,!0);if(!a)return null;if(a.dom.nodeType==1&&(a.node.isBlock&&a.parent&&!s||!a.contentDOM)){let c=a.dom.getBoundingClientRect();if(a.node.isBlock&&a.parent&&!s&&(s=!0,c.left>r.left||c.top>r.top?o=a.posBefore:(c.right-1?o:e.docView.posFromDOM(t,n,-1)}function O7(e,t,n){let r=e.childNodes.length;if(r&&n.topt.top&&o++}let u;qf&&o&&r.nodeType==1&&(u=r.childNodes[o-1]).nodeType==1&&u.contentEditable=="false"&&u.getBoundingClientRect().top>=t.top&&o--,r==e.dom&&o==r.childNodes.length-1&&r.lastChild.nodeType==1&&t.top>r.lastChild.getBoundingClientRect().bottom?a=e.state.doc.content.size:(o==0||r.nodeType!=1||r.childNodes[o-1].nodeName!="BR")&&(a=k1e(e,r,o,t))}a==null&&(a=C1e(e,s,t));let c=e.docView.nearestDesc(s,!0);return{pos:a,inside:c?c.posAtStart-c.border:-1}}function jT(e){return e.top=0&&o==r.nodeValue.length?(c--,f=1):n<0?c--:u++,ud(As(es(r,c,u),f),f<0)}if(!e.state.doc.resolve(t-(i||0)).parent.inlineContent){if(i==null&&o&&(n<0||o==ki(r))){let c=r.childNodes[o-1];if(c.nodeType==1)return iw(c.getBoundingClientRect(),!1)}if(i==null&&o=0)}if(i==null&&o&&(n<0||o==ki(r))){let c=r.childNodes[o-1],u=c.nodeType==3?es(c,ki(c)-(s?0:1)):c.nodeType==1&&(c.nodeName!="BR"||!c.nextSibling)?c:null;if(u)return ud(As(u,1),!1)}if(i==null&&o=0)}function ud(e,t){if(e.width==0)return e;let n=t?e.left:e.right;return{top:e.top,bottom:e.bottom,left:n,right:n}}function iw(e,t){if(e.height==0)return e;let n=t?e.top:e.bottom;return{top:n,bottom:n,left:e.left,right:e.right}}function k7(e,t,n){let r=e.state,o=e.root.activeElement;r!=t&&e.updateState(t),o!=e.dom&&e.focus();try{return n()}finally{r!=t&&e.updateState(r),o!=e.dom&&o&&o.focus()}}function M1e(e,t,n){let r=t.selection,o=n=="up"?r.$from:r.$to;return k7(e,t,()=>{let{node:i}=e.docView.domFromPos(o.pos,n=="up"?-1:1);for(;;){let a=e.docView.nearestDesc(i,!0);if(!a)break;if(a.node.isBlock){i=a.contentDOM||a.dom;break}i=a.dom.parentNode}let s=C7(e,o.pos,1);for(let a=i.firstChild;a;a=a.nextSibling){let c;if(a.nodeType==1)c=a.getClientRects();else if(a.nodeType==3)c=es(a,0,a.nodeValue.length).getClientRects();else continue;for(let u=0;uf.top+1&&(n=="up"?s.top-f.top>(f.bottom-s.top)*2:f.bottom-s.bottom>(s.bottom-f.top)*2))return!1}}return!0})}const N1e=/[\u0590-\u08ac]/;function T1e(e,t,n){let{$head:r}=t.selection;if(!r.parent.isTextblock)return!1;let o=r.parentOffset,i=!o,s=o==r.parent.content.size,a=e.domSelection();return!N1e.test(r.parent.textContent)||!a.modify?n=="left"||n=="backward"?i:s:k7(e,t,()=>{let{focusNode:c,focusOffset:u,anchorNode:f,anchorOffset:p}=e.domSelectionRange(),g=a.caretBidiLevel;a.modify("move",n,"character");let v=r.depth?e.docView.domAfterPos(r.before()):e.dom,{focusNode:y,focusOffset:w}=e.domSelectionRange(),P=y&&!v.contains(y.nodeType==1?y:y.parentNode)||c==y&&u==w;try{a.collapse(f,p),c&&(c!=f||u!=p)&&a.extend&&a.extend(c,u)}catch{}return g!=null&&(a.caretBidiLevel=g),P})}let LT=null,DT=null,RT=!1;function I1e(e,t,n){return LT==t&&DT==n?RT:(LT=t,DT=n,RT=n=="up"||n=="down"?M1e(e,t,n):T1e(e,t,n))}const Do=0,zT=1,dl=2,Ri=3;class Jf{constructor(t,n,r,o){this.parent=t,this.children=n,this.dom=r,this.contentDOM=o,this.dirty=Do,r.pmViewDesc=this}matchesWidget(t){return!1}matchesMark(t){return!1}matchesNode(t,n,r){return!1}matchesHack(t){return!1}parseRule(){return null}stopEvent(t){return!1}get size(){let t=0;for(let n=0;nhr(this.contentDOM);else if(this.contentDOM&&this.contentDOM!=this.dom&&this.dom.contains(this.contentDOM))o=t.compareDocumentPosition(this.contentDOM)&2;else if(this.dom.firstChild){if(n==0)for(let i=t;;i=i.parentNode){if(i==this.dom){o=!1;break}if(i.previousSibling)break}if(o==null&&n==t.childNodes.length)for(let i=t;;i=i.parentNode){if(i==this.dom){o=!0;break}if(i.nextSibling)break}}return o??r>0?this.posAtEnd:this.posAtStart}nearestDesc(t,n=!1){for(let r=!0,o=t;o;o=o.parentNode){let i=this.getDesc(o),s;if(i&&(!n||i.node))if(r&&(s=i.nodeDOM)&&!(s.nodeType==1?s.contains(t.nodeType==1?t:t.parentNode):s==t))r=!1;else return i}}getDesc(t){let n=t.pmViewDesc;for(let r=n;r;r=r.parent)if(r==this)return n}posFromDOM(t,n,r){for(let o=t;o;o=o.parentNode){let i=this.getDesc(o);if(i)return i.localPosFromDOM(t,n,r)}return-1}descAt(t){for(let n=0,r=0;nt||s instanceof $7){o=t-i;break}i=a}if(o)return this.children[r].domFromPos(o-this.children[r].border,n);for(let i;r&&!(i=this.children[r-1]).size&&i instanceof E7&&i.side>=0;r--);if(n<=0){let i,s=!0;for(;i=r?this.children[r-1]:null,!(!i||i.dom.parentNode==this.contentDOM);r--,s=!1);return i&&n&&s&&!i.border&&!i.domAtom?i.domFromPos(i.size,n):{node:this.contentDOM,offset:i?hr(i.dom)+1:0}}else{let i,s=!0;for(;i=r=f&&n<=u-c.border&&c.node&&c.contentDOM&&this.contentDOM.contains(c.contentDOM))return c.parseRange(t,n,f);t=s;for(let p=a;p>0;p--){let g=this.children[p-1];if(g.size&&g.dom.parentNode==this.contentDOM&&!g.emptyChildAt(1)){o=hr(g.dom)+1;break}t-=g.size}o==-1&&(o=0)}if(o>-1&&(u>n||a==this.children.length-1)){n=u;for(let f=a+1;fv&&sn){let v=a;a=c,c=v}let g=document.createRange();g.setEnd(c.node,c.offset),g.setStart(a.node,a.offset),u.removeAllRanges(),u.addRange(g)}}ignoreMutation(t){return!this.contentDOM&&t.type!="selection"}get contentLost(){return this.contentDOM&&this.contentDOM!=this.dom&&!this.dom.contains(this.contentDOM)}markDirty(t,n){for(let r=0,o=0;o=r:tr){let a=r+i.border,c=s-i.border;if(t>=a&&n<=c){this.dirty=t==r||n==s?dl:zT,t==a&&n==c&&(i.contentLost||i.dom.parentNode!=this.contentDOM)?i.dirty=Ri:i.markDirty(t-a,n-a);return}else i.dirty=i.dom==i.contentDOM&&i.dom.parentNode==this.contentDOM&&!i.children.length?dl:Ri}r=s}this.dirty=dl}markParentsDirty(){let t=1;for(let n=this.parent;n;n=n.parent,t++){let r=t==1?dl:zT;n.dirty{if(!i)return o;if(i.parent)return i.parent.posBeforeChild(i)})),!n.type.spec.raw){if(s.nodeType!=1){let a=document.createElement("span");a.appendChild(s),s=a}s.contentEditable="false",s.classList.add("ProseMirror-widget")}super(t,[],s,null),this.widget=n,this.widget=n,i=this}matchesWidget(t){return this.dirty==Do&&t.type.eq(this.widget.type)}parseRule(){return{ignore:!0}}stopEvent(t){let n=this.widget.spec.stopEvent;return n?n(t):!1}ignoreMutation(t){return t.type!="selection"||this.widget.spec.ignoreSelection}destroy(){this.widget.type.destroy(this.dom),super.destroy()}get domAtom(){return!0}get side(){return this.widget.type.side}}class j1e extends Jf{constructor(t,n,r,o){super(t,[],n,null),this.textDOM=r,this.text=o}get size(){return this.text.length}localPosFromDOM(t,n){return t!=this.textDOM?this.posAtStart+(n?this.size:0):this.posAtStart+n}domFromPos(t){return{node:this.textDOM,offset:t}}ignoreMutation(t){return t.type==="characterData"&&t.target.nodeValue==t.oldValue}}class jl extends Jf{constructor(t,n,r,o){super(t,[],r,o),this.mark=n}static create(t,n,r,o){let i=o.nodeViews[n.type.name],s=i&&i(n,o,r);return(!s||!s.dom)&&(s=$i.renderSpec(document,n.type.spec.toDOM(n,r))),new jl(t,n,s.dom,s.contentDOM||s.dom)}parseRule(){return this.dirty&Ri||this.mark.type.spec.reparseInView?null:{mark:this.mark.type.name,attrs:this.mark.attrs,contentElement:this.contentDOM}}matchesMark(t){return this.dirty!=Ri&&this.mark.eq(t)}markDirty(t,n){if(super.markDirty(t,n),this.dirty!=Do){let r=this.parent;for(;!r.node;)r=r.parent;r.dirty0&&(i=mx(i,0,t,r));for(let a=0;a{if(!c)return s;if(c.parent)return c.parent.posBeforeChild(c)},r,o),f=u&&u.dom,p=u&&u.contentDOM;if(n.isText){if(!f)f=document.createTextNode(n.text);else if(f.nodeType!=3)throw new RangeError("Text must be rendered as a DOM text node")}else f||({dom:f,contentDOM:p}=$i.renderSpec(document,n.type.spec.toDOM(n)));!p&&!n.isText&&f.nodeName!="BR"&&(f.hasAttribute("contenteditable")||(f.contentEditable="false"),n.type.spec.draggable&&(f.draggable=!0));let g=f;return f=T7(f,r,n),u?c=new L1e(t,n,r,o,f,p||null,g,u,i,s+1):n.isText?new K0(t,n,r,o,f,g,i):new ya(t,n,r,o,f,p||null,g,i,s+1)}parseRule(){if(this.node.type.spec.reparseInView)return null;let t={node:this.node.type.name,attrs:this.node.attrs};if(this.node.type.whitespace=="pre"&&(t.preserveWhitespace="full"),!this.contentDOM)t.getContent=()=>this.node.content;else if(!this.contentLost)t.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)){t.contentElement=r.dom.parentNode;break}}t.contentElement||(t.getContent=()=>se.empty)}return t}matchesNode(t,n,r){return this.dirty==Do&&t.eq(this.node)&&hx(n,this.outerDeco)&&r.eq(this.innerDeco)}get size(){return this.node.nodeSize}get border(){return this.node.isLeaf?0:1}updateChildren(t,n){let r=this.node.inlineContent,o=n,i=t.composing?this.localCompositionInfo(t,n):null,s=i&&i.pos>-1?i:null,a=i&&i.pos<0,c=new R1e(this,s&&s.node,t);B1e(this.node,this.innerDeco,(u,f,p)=>{u.spec.marks?c.syncToMarks(u.spec.marks,r,t):u.type.side>=0&&!p&&c.syncToMarks(f==this.node.childCount?wt.none:this.node.child(f).marks,r,t),c.placeWidget(u,t,o)},(u,f,p,g)=>{c.syncToMarks(u.marks,r,t);let v;c.findNodeMatch(u,f,p,g)||a&&t.state.selection.from>o&&t.state.selection.to-1&&c.updateNodeAt(u,f,p,v,t)||c.updateNextNode(u,f,p,t,g,o)||c.addNode(u,f,p,t,o),o+=u.nodeSize}),c.syncToMarks([],r,t),this.node.isTextblock&&c.addTextblockHacks(),c.destroyRest(),(c.changed||this.dirty==dl)&&(s&&this.protectLocalComposition(t,s),M7(this.contentDOM,this.children,t),mu&&F1e(this.dom))}localCompositionInfo(t,n){let{from:r,to:o}=t.state.selection;if(!(t.state.selection instanceof Ve)||rn+this.node.content.size)return null;let i=t.domSelectionRange(),s=V1e(i.focusNode,i.focusOffset);if(!s||!this.dom.contains(s.parentNode))return null;if(this.node.inlineContent){let a=s.nodeValue,c=H1e(this.node.content,a,r-n,o-n);return c<0?null:{node:s,pos:c,text:a}}else return{node:s,pos:-1,text:""}}protectLocalComposition(t,{node:n,pos:r,text:o}){if(this.getDesc(n))return;let i=n;for(;i.parentNode!=this.contentDOM;i=i.parentNode){for(;i.previousSibling;)i.parentNode.removeChild(i.previousSibling);for(;i.nextSibling;)i.parentNode.removeChild(i.nextSibling);i.pmViewDesc&&(i.pmViewDesc=void 0)}let s=new j1e(this,i,n,o);t.input.compositionNodes.push(s),this.children=mx(this.children,r,r+o.length,t,s)}update(t,n,r,o){return this.dirty==Ri||!t.sameMarkup(this.node)?!1:(this.updateInner(t,n,r,o),!0)}updateInner(t,n,r,o){this.updateOuterDeco(n),this.node=t,this.innerDeco=r,this.contentDOM&&this.updateChildren(o,this.posAtStart),this.dirty=Do}updateOuterDeco(t){if(hx(t,this.outerDeco))return;let n=this.nodeDOM.nodeType!=1,r=this.dom;this.dom=N7(this.dom,this.nodeDOM,px(this.outerDeco,this.node,n),px(t,this.node,n)),this.dom!=r&&(r.pmViewDesc=void 0,this.dom.pmViewDesc=this),this.outerDeco=t}selectNode(){this.nodeDOM.nodeType==1&&this.nodeDOM.classList.add("ProseMirror-selectednode"),(this.contentDOM||!this.node.type.spec.draggable)&&(this.dom.draggable=!0)}deselectNode(){this.nodeDOM.nodeType==1&&this.nodeDOM.classList.remove("ProseMirror-selectednode"),(this.contentDOM||!this.node.type.spec.draggable)&&this.dom.removeAttribute("draggable")}get domAtom(){return this.node.isAtom}}function AT(e,t,n,r,o){T7(r,t,e);let i=new ya(void 0,e,t,n,r,r,r,o,0);return i.contentDOM&&i.updateChildren(o,0),i}class K0 extends ya{constructor(t,n,r,o,i,s,a){super(t,n,r,o,i,null,s,a,0)}parseRule(){let t=this.nodeDOM.parentNode;for(;t&&t!=this.dom&&!t.pmIsDeco;)t=t.parentNode;return{skip:t||!0}}update(t,n,r,o){return this.dirty==Ri||this.dirty!=Do&&!this.inParent()||!t.sameMarkup(this.node)?!1:(this.updateOuterDeco(n),(this.dirty!=Do||t.text!=this.node.text)&&t.text!=this.nodeDOM.nodeValue&&(this.nodeDOM.nodeValue=t.text,o.trackWrites==this.nodeDOM&&(o.trackWrites=null)),this.node=t,this.dirty=Do,!0)}inParent(){let t=this.parent.contentDOM;for(let n=this.nodeDOM;n;n=n.parentNode)if(n==t)return!0;return!1}domFromPos(t){return{node:this.nodeDOM,offset:t}}localPosFromDOM(t,n,r){return t==this.nodeDOM?this.posAtStart+Math.min(n,this.node.text.length):super.localPosFromDOM(t,n,r)}ignoreMutation(t){return t.type!="characterData"&&t.type!="selection"}slice(t,n,r){let o=this.node.cut(t,n),i=document.createTextNode(o.text);return new K0(this.parent,o,this.outerDeco,this.innerDeco,i,i,r)}markDirty(t,n){super.markDirty(t,n),this.dom!=this.nodeDOM&&(t==0||n==this.nodeDOM.nodeValue.length)&&(this.dirty=Ri)}get domAtom(){return!1}}class $7 extends Jf{parseRule(){return{ignore:!0}}matchesHack(t){return this.dirty==Do&&this.dom.nodeName==t}get domAtom(){return!0}get ignoreForCoords(){return this.dom.nodeName=="IMG"}}class L1e extends ya{constructor(t,n,r,o,i,s,a,c,u,f){super(t,n,r,o,i,s,a,u,f),this.spec=c}update(t,n,r,o){if(this.dirty==Ri)return!1;if(this.spec.update){let i=this.spec.update(t,n,r);return i&&this.updateInner(t,n,r,o),i}else return!this.contentDOM&&!t.isLeaf?!1:super.update(t,n,r,o)}selectNode(){this.spec.selectNode?this.spec.selectNode():super.selectNode()}deselectNode(){this.spec.deselectNode?this.spec.deselectNode():super.deselectNode()}setSelection(t,n,r,o){this.spec.setSelection?this.spec.setSelection(t,n,r):super.setSelection(t,n,r,o)}destroy(){this.spec.destroy&&this.spec.destroy(),super.destroy()}stopEvent(t){return this.spec.stopEvent?this.spec.stopEvent(t):!1}ignoreMutation(t){return this.spec.ignoreMutation?this.spec.ignoreMutation(t):super.ignoreMutation(t)}}function M7(e,t,n){let r=e.firstChild,o=!1;for(let i=0;i>1,s=Math.min(i,t.length);for(;o-1)a>this.index&&(this.changed=!0,this.destroyBetween(this.index,a)),this.top=this.top.children[this.index];else{let c=jl.create(this.top,t[i],n,r);this.top.children.splice(this.index,0,c),this.top=c,this.changed=!0}this.index=0,i++}}findNodeMatch(t,n,r,o){let i=-1,s;if(o>=this.preMatch.index&&(s=this.preMatch.matches[o-this.preMatch.index]).parent==this.top&&s.matchesNode(t,n,r))i=this.top.children.indexOf(s,this.index);else for(let a=this.index,c=Math.min(this.top.children.length,a+5);a0;){let a;for(;;)if(r){let u=n.children[r-1];if(u instanceof jl)n=u,r=u.children.length;else{a=u,r--;break}}else{if(n==t)break e;r=n.parent.children.indexOf(n),n=n.parent}let c=a.node;if(c){if(c!=e.child(o-1))break;--o,i.set(a,o),s.push(a)}}return{index:o,matched:i,matches:s.reverse()}}function A1e(e,t){return e.type.side-t.type.side}function B1e(e,t,n,r){let o=t.locals(e),i=0;if(o.length==0){for(let u=0;ui;)a.push(o[s++]);let y=i+g.nodeSize;if(g.isText){let P=y;s!P.inline):a.slice();r(g,w,t.forChild(i,g),v),i=y}}function F1e(e){if(e.nodeName=="UL"||e.nodeName=="OL"){let t=e.style.cssText;e.style.cssText=t+"; list-style: square !important",window.getComputedStyle(e).listStyle,e.style.cssText=t}}function V1e(e,t){for(;;){if(e.nodeType==3)return e;if(e.nodeType==1&&t>0){if(e.childNodes.length>t&&e.childNodes[t].nodeType==3)return e.childNodes[t];e=e.childNodes[t-1],t=ki(e)}else if(e.nodeType==1&&t=n){if(i>=r&&c.slice(r-t.length-a,r-a)==t)return r-t.length;let u=a=0&&u+t.length+a>=n)return a+u;if(n==r&&c.length>=r+t.length-a&&c.slice(r-a,r-a+t.length)==t)return r}}return-1}function mx(e,t,n,r,o){let i=[];for(let s=0,a=0;s=n||f<=t?i.push(c):(un&&i.push(c.slice(n-u,c.size,r)))}return i}function eO(e,t=null){let n=e.domSelectionRange(),r=e.state.doc;if(!n.focusNode)return null;let o=e.docView.nearestDesc(n.focusNode),i=o&&o.size==0,s=e.docView.posFromDOM(n.focusNode,n.focusOffset,1);if(s<0)return null;let a=r.resolve(s),c,u;if(Y0(n)){for(c=a;o&&!o.node;)o=o.parent;let f=o.node;if(o&&f.isAtom&&Le.isSelectable(f)&&o.parent&&!(f.isInline&&p1e(n.focusNode,n.focusOffset,o.dom))){let p=o.posBefore;u=new Le(s==p?a:r.resolve(p))}}else{let f=e.docView.posFromDOM(n.anchorNode,n.anchorOffset,1);if(f<0)return null;c=r.resolve(f)}if(!u){let f=t=="pointer"||e.state.selection.head{(n.anchorNode!=r||n.anchorOffset!=o)&&(t.removeEventListener("selectionchange",e.input.hideSelectionGuard),setTimeout(()=>{(!I7(e)||e.state.selection.visible)&&e.dom.classList.remove("ProseMirror-hideselection")},20))})}function U1e(e){let t=e.domSelection(),n=document.createRange(),r=e.cursorWrapper.dom,o=r.nodeName=="IMG";o?n.setEnd(r.parentNode,hr(r)+1):n.setEnd(r,0),n.collapse(!1),t.removeAllRanges(),t.addRange(n),!o&&!e.state.selection.visible&&Hr&&va<=11&&(r.disabled=!0,r.disabled=!1)}function j7(e,t){if(t instanceof Le){let n=e.docView.descAt(t.from);n!=e.lastSelectedViewDesc&&(WT(e),n&&n.selectNode(),e.lastSelectedViewDesc=n)}else WT(e)}function WT(e){e.lastSelectedViewDesc&&(e.lastSelectedViewDesc.parent&&e.lastSelectedViewDesc.deselectNode(),e.lastSelectedViewDesc=void 0)}function tO(e,t,n,r){return e.someProp("createSelectionBetween",o=>o(e,t,n))||Ve.between(t,n,r)}function UT(e){return e.editable&&!e.hasFocus()?!1:L7(e)}function L7(e){let t=e.domSelectionRange();if(!t.anchorNode)return!1;try{return e.dom.contains(t.anchorNode.nodeType==3?t.anchorNode.parentNode:t.anchorNode)&&(e.editable||e.dom.contains(t.focusNode.nodeType==3?t.focusNode.parentNode:t.focusNode))}catch{return!1}}function Z1e(e){let t=e.docView.domFromPos(e.state.selection.anchor,0),n=e.domSelectionRange();return Il(t.node,t.offset,n.anchorNode,n.anchorOffset)}function gx(e,t){let{$anchor:n,$head:r}=e.selection,o=t>0?n.max(r):n.min(r),i=o.parent.inlineContent?o.depth?e.doc.resolve(t>0?o.after():o.before()):null:o;return i&&Ze.findFrom(i,t)}function nl(e,t){return e.dispatch(e.state.tr.setSelection(t).scrollIntoView()),!0}function ZT(e,t,n){let r=e.state.selection;if(r instanceof Ve){if(!r.empty||n.indexOf("s")>-1)return!1;if(e.endOfTextblock(t>0?"forward":"backward")){let o=gx(e.state,t);return o&&o instanceof Le?nl(e,o):!1}else if(!($o&&n.indexOf("m")>-1)){let o=r.$head,i=o.textOffset?null:t<0?o.nodeBefore:o.nodeAfter,s;if(!i||i.isText)return!1;let a=t<0?o.pos-i.nodeSize:o.pos;return i.isAtom||(s=e.docView.descAt(a))&&!s.contentDOM?Le.isSelectable(i)?nl(e,new Le(t<0?e.state.doc.resolve(o.pos-i.nodeSize):o)):qf?nl(e,new Ve(e.state.doc.resolve(t<0?a:a+i.nodeSize))):!1:!1}}else{if(r instanceof Le&&r.node.isInline)return nl(e,new Ve(t>0?r.$to:r.$from));{let o=gx(e.state,t);return o?nl(e,o):!1}}}function Fv(e){return e.nodeType==3?e.nodeValue.length:e.childNodes.length}function Ad(e,t){if(e.contentEditable=="false")return!0;let n=e.pmViewDesc;return n&&n.size==0&&(t<0||e.nextSibling||e.nodeName!="BR")}function dc(e,t){return t<0?G1e(e):Y1e(e)}function G1e(e){let t=e.domSelectionRange(),n=t.focusNode,r=t.focusOffset;if(!n)return;let o,i,s=!1;for(oi&&n.nodeType==1&&r0){if(n.nodeType!=1)break;{let a=n.childNodes[r-1];if(Ad(a,-1))o=n,i=--r;else if(a.nodeType==3)n=a,r=n.nodeValue.length;else break}}else{if(D7(n))break;{let a=n.previousSibling;for(;a&&Ad(a,-1);)o=n.parentNode,i=hr(a),a=a.previousSibling;if(a)n=a,r=Fv(n);else{if(n=n.parentNode,n==e.dom)break;r=0}}}s?vx(e,n,r):o&&vx(e,o,i)}function Y1e(e){let t=e.domSelectionRange(),n=t.focusNode,r=t.focusOffset;if(!n)return;let o=Fv(n),i,s;for(;;)if(r{e.state==o&&ds(e)},50)}function GT(e,t){let n=e.state.doc.resolve(t);if(!(nr||v1e)&&n.parent.inlineContent){let o=e.coordsAtPos(t);if(t>n.start()){let i=e.coordsAtPos(t-1),s=(i.top+i.bottom)/2;if(s>o.top&&s1)return i.lefto.top&&s1)return i.left>o.left?"ltr":"rtl"}}return getComputedStyle(e.dom).direction=="rtl"?"rtl":"ltr"}function YT(e,t,n){let r=e.state.selection;if(r instanceof Ve&&!r.empty||n.indexOf("s")>-1||$o&&n.indexOf("m")>-1)return!1;let{$from:o,$to:i}=r;if(!o.parent.inlineContent||e.endOfTextblock(t<0?"up":"down")){let s=gx(e.state,t);if(s&&s instanceof Le)return nl(e,s)}if(!o.parent.inlineContent){let s=t<0?o:i,a=r instanceof Qo?Ze.near(s,t):Ze.findFrom(s,t);return a?nl(e,a):!1}return!1}function KT(e,t){if(!(e.state.selection instanceof Ve))return!0;let{$head:n,$anchor:r,empty:o}=e.state.selection;if(!n.sameParent(r))return!0;if(!o)return!1;if(e.endOfTextblock(t>0?"forward":"backward"))return!0;let i=!n.textOffset&&(t<0?n.nodeBefore:n.nodeAfter);if(i&&!i.isText){let s=e.state.tr;return t<0?s.delete(n.pos-i.nodeSize,n.pos):s.delete(n.pos,n.pos+i.nodeSize),e.dispatch(s),!0}return!1}function qT(e,t,n){e.domObserver.stop(),t.contentEditable=n,e.domObserver.start()}function J1e(e){if(!yr||e.state.selection.$head.parentOffset>0)return!1;let{focusNode:t,focusOffset:n}=e.domSelectionRange();if(t&&t.nodeType==1&&n==0&&t.firstChild&&t.firstChild.contentEditable=="false"){let r=t.firstChild;qT(e,r,"true"),setTimeout(()=>qT(e,r,"false"),20)}return!1}function X1e(e){let t="";return e.ctrlKey&&(t+="c"),e.metaKey&&(t+="m"),e.altKey&&(t+="a"),e.shiftKey&&(t+="s"),t}function Q1e(e,t){let n=t.keyCode,r=X1e(t);if(n==8||$o&&n==72&&r=="c")return KT(e,-1)||dc(e,-1);if(n==46&&!t.shiftKey||$o&&n==68&&r=="c")return KT(e,1)||dc(e,1);if(n==13||n==27)return!0;if(n==37||$o&&n==66&&r=="c"){let o=n==37?GT(e,e.state.selection.from)=="ltr"?-1:1:-1;return ZT(e,o,r)||dc(e,o)}else if(n==39||$o&&n==70&&r=="c"){let o=n==39?GT(e,e.state.selection.from)=="ltr"?1:-1:1;return ZT(e,o,r)||dc(e,o)}else{if(n==38||$o&&n==80&&r=="c")return YT(e,-1,r)||dc(e,-1);if(n==40||$o&&n==78&&r=="c")return J1e(e)||YT(e,1,r)||dc(e,1);if(r==($o?"m":"c")&&(n==66||n==73||n==89||n==90))return!0}return!1}function R7(e,t){e.someProp("transformCopied",v=>{t=v(t,e)});let n=[],{content:r,openStart:o,openEnd:i}=t;for(;o>1&&i>1&&r.childCount==1&&r.firstChild.childCount==1;){o--,i--;let v=r.firstChild;n.push(v.type.name,v.attrs!=v.type.defaultAttrs?v.attrs:null),r=v.content}let s=e.someProp("clipboardSerializer")||$i.fromSchema(e.state.schema),a=H7(),c=a.createElement("div");c.appendChild(s.serializeFragment(r,{document:a}));let u=c.firstChild,f,p=0;for(;u&&u.nodeType==1&&(f=V7[u.nodeName.toLowerCase()]);){for(let v=f.length-1;v>=0;v--){let y=a.createElement(f[v]);for(;c.firstChild;)y.appendChild(c.firstChild);c.appendChild(y),p++}u=c.firstChild}u&&u.nodeType==1&&u.setAttribute("data-pm-slice",`${o} ${i}${p?` -${p}`:""} ${JSON.stringify(n)}`);let g=e.someProp("clipboardTextSerializer",v=>v(t,e))||t.content.textBetween(0,t.content.size,` + */var B0=_,dme=ume;function fme(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var pme=typeof Object.is=="function"?Object.is:fme,hme=dme.useSyncExternalStore,mme=B0.useRef,gme=B0.useEffect,vme=B0.useMemo,yme=B0.useDebugValue;I8.useSyncExternalStoreWithSelector=function(e,t,n,r,o){var i=mme(null);if(i.current===null){var s={hasValue:!1,value:null};i.current=s}else s=i.current;i=vme(function(){function c(v){if(!u){if(u=!0,f=v,v=r(v),o!==void 0&&s.hasValue){var y=s.value;if(o(y,v))return p=y}return p=v}if(y=p,pme(f,v))return y;var w=r(v);return o!==void 0&&o(y,w)?y:(f=v,p=w)}var u=!1,f,p,g=n===void 0?null:n;return[function(){return c(t())},g===null?void 0:function(){return c(g())}]},[t,n,r,o]);var a=hme(e,i[0],i[1]);return gme(function(){s.hasValue=!0,s.value=a},[a]),yme(a),a};T8.exports=I8;var _me=T8.exports;const wme=Ea(_me),{useSyncExternalStoreWithSelector:bme}=wme;function xme(e,t=e.getState,n){const r=bme(e.subscribe,e.getState,e.getServerState||e.getState,t,n);return _.useDebugValue(r),r}const oT=e=>{const t=typeof e=="function"?eme(e):e,n=(r,o)=>xme(t,r,o);return Object.assign(n,t),n},dn=e=>e?oT(e):oT,at=()=>!window.invokeNative,Sme=()=>{},D8=dn(e=>({showApp:!!at(),setVisibility:t=>e({showApp:t}),show:()=>e({showApp:!0}),hide:()=>e({showApp:!1}),toggle:()=>e(t=>({showApp:!t.showApp}))})),Pme={citizenid:"1993201",firstname:"Bubble",lastname:"Test",role:"Chief",image:"https://i.imgur.com/P4uYdfu.jpeg",callSign:103,unit:1},bo=dn(e=>({personalData:at()?Pme:{citizenid:"",firstname:"",lastname:"",role:"",image:"",callSign:0},setPersonalData:t=>e(n=>({personalData:typeof t=="function"?t(n.personalData):{...n.personalData,...t}}))}));async function me(e,t,n){if(at())return n?(await new Promise(a=>setTimeout(a,n.delay)),n.data):await new Promise(a=>a);const r={method:"post",headers:{"Content-Type":"application/json; charset=UTF-8"},body:JSON.stringify(t)},o=window.GetParentResourceName?window.GetParentResourceName():"nui-frame-app";return await(await fetch(`https://${o}/${e}`,r)).json()}const R8=[];for(let e=0;e<25;e++)R8[e]={firstname:"Firstname",lastname:`Lastname ${e+1}`,dob:Date.now(),citizenid:e.toString()};const UP={firstname:"John",lastname:"Doe",citizenid:"BUB193Z4A",dob:Date.now(),phoneNumber:"123456789",notes:"

",vehicles:["Sultan Custom (88ZOH526)","Sultan Custom (07NCV529)","Sultan Custom (07NCV545)","Sultan Custom (07NCV521)"],relatedReports:[{title:"Report title",id:1,author:"Some One",date:"13/03/2023"},{title:"Report title",id:2,author:"Some One",date:"13/03/2023"},{title:"Report title",id:3,author:"Some One",date:"13/03/2023"},{title:"Report title",id:4,author:"Some One",date:"13/03/2023"}],relatedIncidents:[{title:"Incident 1",author:"Someone nice",date:"13/03/2023",id:1}]},Ome=[{id:"vehicles",title:"Vehicles",icon:"car"}],Li=dn(e=>({profileCards:[],selectedProfile:null,isProfileWanted:!1,getPlayers:async()=>at()?{profiles:R8}:await me("getAllProfiles"),setSelectedProfile:t=>{at()&&e({selectedProfile:UP,profileCards:Ome}),e({selectedProfile:t})},setProfileCards:t=>e({profileCards:t}),setIsProfileWanted:t=>{e({isProfileWanted:t})}})),Cme={"OFFENSES AGAINST PERSONS":[{label:"Speeding",description:"Lorem ipsum dolor sit amet, consectetur adipisicing elit. Aperiam, doloribus eveniet facere ipsam, ipsum minus modi molestiae nesciunt odio saepe sapiente sed sint voluptatibus voluptatum!",type:"infraction",time:0,fine:2500,points:4},{label:"Loitering",description:"Standing go brrr",type:"misdemeanor",time:90,fine:25e3,points:0},{label:"Something else 1",description:"Standing go brrr",type:"misdemeanor",time:90,fine:25e3,points:0},{label:"Something else 2",description:"Standing go brrr",type:"misdemeanor",time:90,fine:25e3,points:0},{label:"Something else 3",description:"Standing go brrr",type:"misdemeanor",time:90,fine:25e3,points:0}],"OFFENSES AGAINST PROPERTY":[{label:"Robbery of a financial institution",description:"Bank robbery go brrr",type:"felony",time:30,fine:3e3,points:0},{label:"Something else 2 in OFFENSES AGAINST",description:"Standing go brrr",type:"felony",time:90,fine:25e3,points:0},{label:"Something else 3 in OFFENSES AGAINST",description:"Standing go brrr",type:"felony",time:90,fine:25e3,points:0},{label:"Something else 4 in OFFENSES AGAINST",description:"Standing go brrr",type:"felony",time:90,fine:25e3,points:0}]},Yf=dn(e=>({charges:at()?Cme:{},setCharges:t=>{e(n=>({charges:typeof t=="function"?t(n.charges):t}))}})),iT=[{firstname:"John",lastname:"Doe",callsign:"1A-01",citizenid:"ABCD1234",playerId:1,position:[0,0,0],unitId:1},{firstname:"Jenna",lastname:"Doe",callsign:"1A-02",citizenid:"ABCD1235",playerId:2,position:[0,0,0]}],ZP=dn(e=>({officers:at()?iT:[],activeOfficers:at()?iT:[],getOfficers:async()=>{try{const t=await me("getOfficers");return e({officers:t}),{officers:t}}catch(t){return console.error("Failed to fetch officers:",t),{officers:[]}}},getActiveOfficers:async()=>{try{const t=await me("getActiveOfficers"),n=Object.values(t);return e({activeOfficers:n}),{activeOfficers:n}}catch(t){return console.error("Failed to fetch active officers:",t),{activeOfficers:[]}}},setOfficers:t=>e({officers:t}),addOfficer:t=>e(n=>({officers:[...n.officers,t]})),removeOfficer:t=>e(n=>({officers:n.officers.filter(r=>r.citizenid!==t)}))})),kme=ue(e=>({link:{...e.fn.focusStyles(),display:"flex",alignItems:"center",textDecoration:"none",fontSize:e.fontSizes.xs,color:e.colors.gray[2],padding:`${e.spacing.xs} ${e.spacing.xs}`,fontWeight:500,"&:hover":{borderRadius:e.radius.sm,background:"linear-gradient(90deg, rgba(51,124,255,0.5) 0%, rgba(187,187,187,0) 100%)",color:e.colorScheme==="dark"?e.white:e.black,[`& .${Ar("icon")}`]:{color:e.colorScheme==="dark"?e.white:e.black}}},linkIcon:{ref:Ar("icon"),color:e.colorScheme==="dark"?e.colors.dark[2]:e.colors.gray[6],marginRight:e.spacing.sm},linkActive:{"&, &:hover":{borderRadius:e.radius.sm,background:"linear-gradient(90deg, rgba(51,124,255,0.5) 0%, rgba(187,187,187,0) 100%)",[`& .${Ar("icon")}`]:{color:"white"}}},chevron:{transition:"transform 200ms ease"}})),Eme=[{link:"",label:"Dashboard",icon:khe}],$me=[{link:"profiles",label:"Profiles",icon:WP},{link:"incidents",label:"Incidents",icon:FP},{link:"reports",label:"Reports",icon:zP},{link:"vehicles",label:"Vehicles",icon:ks},{link:"dispatch",label:"Dispatch",icon:cu}],Mme=[{label:"Roster",link:"roster",icon:Khe},{label:"Charges",link:"charges",icon:yhe}],Nme=()=>{const{classes:e,cx:t,theme:n}=kme(),[r,o]=_.useState(""),{firstname:i,lastname:s,callSign:a,role:c}=bo(p=>p.personalData),u=ku(),f=p=>p.map(g=>h.jsxs(Kpe,{to:`/${g.link}`,onClick:()=>o(g.link),className:t(e.link,{[e.linkActive]:r===g.link}),children:[h.jsx(g.icon,{className:e.linkIcon,stroke:1.5}),h.jsx("span",{children:g.label})]},g.link));return _.useEffect(()=>{o(u.pathname.split("/")[1])},[u]),h.jsxs(tg,{p:"xs",style:{backgroundColor:"#242527",borderTopLeftRadius:5,borderBottomLeftRadius:5,maxWidth:300,height:"100%"},children:[h.jsxs(tg.Section,{children:[h.jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"center"},children:h.jsx(ri,{radius:"md",width:150,height:150,fit:"contain",src:Qhe,alt:"LSPD Logo"})}),h.jsx(Ye,{my:"sm"}),h.jsxs(St,{h:632,scrollbarSize:2,children:[h.jsx(W,{size:"xs",weight:500,color:"dimmed",style:{margin:8},children:"Home"}),f(Eme),h.jsx(W,{size:"xs",weight:500,color:"dimmed",style:{margin:8},children:"Pages"}),f($me),h.jsx(W,{size:"xs",weight:500,color:"dimmed",style:{margin:8},children:"Staff"}),f(Mme)]})]}),h.jsx(Pe,{sx:{paddingTop:5,borderTop:`${M(1)} solid ${n.colorScheme==="dark"?n.colors.dark[4]:n.colors.gray[2]}`},children:h.jsx("div",{style:{display:"block",width:"100%",color:"#e9ecef",padding:"0.625rem"},children:h.jsx(nt,{children:h.jsxs(Pe,{sx:{flex:1},children:[h.jsxs(W,{size:"sm",weight:500,children:[i," ",s]}),h.jsxs(W,{color:"dimmed",size:"xs",children:[c," | ",a]})]})})})})]})};var z8={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(Kx,function(){var n=1e3,r=6e4,o=36e5,i="millisecond",s="second",a="minute",c="hour",u="day",f="week",p="month",g="quarter",v="year",y="date",w="Invalid Date",P=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,x=/\[([^\]]+)]|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,S={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(V){var H=["th","st","nd","rd"],Z=V%100;return"["+V+(H[(Z-20)%10]||H[Z]||H[0])+"]"}},O=function(V,H,Z){var Y=String(V);return!Y||Y.length>=H?V:""+Array(H+1-Y.length).join(Z)+V},E={s:O,z:function(V){var H=-V.utcOffset(),Z=Math.abs(H),Y=Math.floor(Z/60),j=Z%60;return(H<=0?"+":"-")+O(Y,2,"0")+":"+O(j,2,"0")},m:function V(H,Z){if(H.date()1)return V(F[0])}else{var K=H.name;N[K]=H,j=K}return!Y&&j&&($=j),j||!Y&&$},z=function(V,H){if(R(V))return V.clone();var Z=typeof H=="object"?H:{};return Z.date=V,Z.args=arguments,new X(Z)},G=E;G.l=B,G.i=R,G.w=function(V,H){return z(V,{locale:H.$L,utc:H.$u,x:H.$x,$offset:H.$offset})};var X=function(){function V(Z){this.$L=B(Z.locale,null,!0),this.parse(Z),this.$x=this.$x||Z.x||{},this[I]=!0}var H=V.prototype;return H.parse=function(Z){this.$d=function(Y){var j=Y.date,U=Y.utc;if(j===null)return new Date(NaN);if(G.u(j))return new Date;if(j instanceof Date)return new Date(j);if(typeof j=="string"&&!/Z$/i.test(j)){var F=j.match(P);if(F){var K=F[2]-1||0,ee=(F[7]||"0").substring(0,3);return U?new Date(Date.UTC(F[1],K,F[3]||1,F[4]||0,F[5]||0,F[6]||0,ee)):new Date(F[1],K,F[3]||1,F[4]||0,F[5]||0,F[6]||0,ee)}}return new Date(j)}(Z),this.init()},H.init=function(){var Z=this.$d;this.$y=Z.getFullYear(),this.$M=Z.getMonth(),this.$D=Z.getDate(),this.$W=Z.getDay(),this.$H=Z.getHours(),this.$m=Z.getMinutes(),this.$s=Z.getSeconds(),this.$ms=Z.getMilliseconds()},H.$utils=function(){return G},H.isValid=function(){return this.$d.toString()!==w},H.isSame=function(Z,Y){var j=z(Z);return this.startOf(Y)<=j&&j<=this.endOf(Y)},H.isAfter=function(Z,Y){return z(Z)0,N<=$.r||!$.r){N<=1&&E>0&&($=S[E-1]);var I=x[$.l];v&&(N=v(""+N)),w=typeof I=="string"?I.replace("%d",N):I(N,f,$.l,P);break}}if(f)return w;var R=P?x.future:x.past;return typeof R=="function"?R(w):R.replace("%s",w)},i.to=function(u,f){return a(u,f,this,!0)},i.from=function(u,f){return a(u,f,this)};var c=function(u){return u.$u?o.utc():o()};i.toNow=function(u){return this.to(c(this),u)},i.fromNow=function(u){return this.from(c(this),u)}}})})(A8);var Ime=A8.exports;const B8=Ea(Ime);const sT={title:"Debug Incident title",id:0,description:"

This is a incident description

",officersInvolved:[{firstname:"Callum",lastname:"Graham",callsign:188,citizenid:"132142",playerId:1,position:[0,0,0]},{firstname:"Jacob",lastname:"Gray",callsign:273,citizenid:"152312",playerId:1,position:[0,0,0]},{firstname:"Edward",lastname:"Atkinson",callsign:125,citizenid:"948213",playerId:1,position:[0,0,0]}],evidence:[],criminals:[{firstname:"Archie",lastname:"Moss",dob:Date.now(),issueWarrant:!1,processed:!1,pleadedGuilty:!1,citizenid:"0",charges:[],penalty:{time:0,fine:0,reduction:null,points:0}}]},Ur=dn(e=>({incident:sT,isIncidentActive:!1,setActiveIncident:t=>{at()&&e({incident:sT}),e({incident:t})},updateIncidentField:(t,n)=>{e(r=>({incident:{...r.incident,[t]:n}}))},setIncidentActive:t=>{e({isIncidentActive:t})},setDescription:t=>{e(n=>({incident:{...n.incident,description:t}}))},setCriminals:t=>{e(n=>({incident:{...n.incident,criminals:typeof t=="function"?t(n.incident.criminals):t}}))},setCriminal:(t,n)=>{e(r=>{const o=r.incident.criminals.map(i=>i.citizenid===t?typeof n=="function"?n(i):{...i,...n}:i);return{incident:{...r.incident,criminals:o}}})},setOfficersInvolved:t=>{e(n=>({incident:{...n.incident,officersInvolved:typeof t=="function"?t(n.incident.officersInvolved):t}}))},setEvidence:t=>{e(n=>({incident:{...n.incident,evidence:typeof t=="function"?t(n.incident.evidence):t}}))}})),jme=[{type:"created",category:"profiles",firstname:"Bubble",lastname:"Test",date:"string",activityid:1,citizenid:"BUB193Z4A"},{type:"updated",category:"profiles",firstname:"Bubble",lastname:"Test",date:"string",activityid:1,citizenid:"BUB193Z4A"},{type:"deleted",category:"profiles",firstname:"Bubble",lastname:"Test",date:"string",activityid:1,citizenid:"BUB193Z4A"},{type:"created",category:"incidents",firstname:"Bubble",lastname:"Test",date:"string",activityid:1,citizenid:"BUB193Z4A"},{type:"created",category:"profiles",firstname:"Bubble",lastname:"Test",date:"string",activityid:1,citizenid:"BUB193Z4A"},{type:"created",category:"profiles",firstname:"Bubble",lastname:"Test",date:"string",activityid:1,citizenid:"BUB193Z4A"},{type:"created",category:"profiles",firstname:"Bubble",lastname:"Test",date:"string",activityid:1,citizenid:"BUB193Z4A"},{type:"created",category:"profiles",firstname:"Bubble",lastname:"Test",date:"string",activityid:1,citizenid:"BUB193Z4A"}],Lme=dn(e=>({recentActivity:at()?jme:[],getRecentActivity:async()=>{try{const t=await me("getRecentActivity");return e({recentActivity:t}),{recentActivity:t}}catch(t){return console.error("Failed to fetch recent activities:",t),{recentActivity:[]}}},setRecentActivities:t=>e({recentActivity:t})})),Dme="Configuration",Rme="Logout",zme="Welcome back, %s %s",Ame="Active Officers",Bme="Callsign",Fme="Attached Unit",Vme="Active Warrants",Hme="Expires in",Wme="No warrants found",Ume="Recent Activity",Zme="Type",Gme="Category",Yme="Done by",Kme="Time ago",qme="Dispatch",Jme="Responding Units",Xme="No recent calls found",Qme="Announcements",ege="Create announcement",tge="All Announcements",nge="No announcements found",rge="Create",oge="View all",ige="Profiles",sge="Search...",age="DOB",lge="Citizen ID",cge="No profiles found",uge="No profile selected",dge="Edit Citizen",fge="No %s registered",pge="Related reports",hge="No related reports",mge="Related incidents",gge="No related incidents",vge="Remove Charge",yge="No incident selected",_ge="Add Criminal",wge="Unlink",bge="Officers involved",xge="Add officer",Sge="Remove officer",Pge="Are you sure you want to remove %s %s (%s) from involved officers?",Oge="Confirm",Cge="Cancel",kge="Evidence",Ege="Add evidence",$ge="Incidents",Mge="Create incident",Nge="Remove evidence",Tge="Are you sure you want to remove %s from evidence?",Ige="month(s)",jge="Remove criminal",Lge="Remove %s %s? Removing them will also remove the charges from their profile.",Dge="Go to profile",Rge="Save criminal",zge="Edit charges",Age="Issue warrant",Bge="Suspect hasn't been processed and charged",Fge="Warrant expiration date",Vge="Reduction",Hge="No reduction",Wge="Time",Uge="Fine",Zge="Pleaded guilty",Gge="Processed",Yge="Current Charges",Kge="All Charges",qge="point(s)",Jge="Add Charge",Xge="Incident title",Qge="Incident title is required",eve="No officers found",tve="Image label is required",nve="Image URL is required",rve="Image label",ove="Image URL",ive="Take picture",sve="No report selected",ave="Citizens involved",lve="Add citizen",cve="Are you sure you want to remove %s %s from involved citizens",uve="Images",dve="Add image",fve="Reports",pve="Create report",hve="Report title",mve="Report title is required",gve="No citizens found",vve="Units",yve="Manage members",_ve="Leave Unit",wve="Create unit",bve="Unit officers",xve="Set officers assigned to this unit",Sve="Unit vehicle type",Pve="Active Calls",Ove="Responding units (%s)",Cve="Find on map",kve="Set waypoint",Eve="Detach from call",$ve="Respond",Mve="Manage roster",Nve="Roster",Tve="members",Ive="Members",jve="Hire officer",Lve="Today",Dve="Yesterday",Rve="Set callsign",zve="Set rank",Ave="Set roles",Bve="Fire officer",Fve="Are you sure you want to fire %s %s?",Vve="Officer",Hve="APU",Wve="AIR",Uve="MC",Zve="K9",Gve="FTO",Yve="Last active",Kve="Role",qve="Rank",Jve="Callsign already in use",Xve="The citizen with this citizen id is already hired",Qve="Citizen ID of the citizen you want to hire",eye="Callsign of the new officer you want to hire",tye="Create Charge",nye="Charge Label",rye="Charge Description",oye="Charge Category",iye="Charge Fine",sye="Charge Jailtime",aye="Charge Points",lye="Charge Type",cye="Delete charge",uye="Are you sure you want to delete %s",dye="Edit Charge",fye="Edit",pye="Delete Incident",hye="Are you sure you want to delete %s",mye="Change picture",gye="Image",vye="Image URL to use as the profile image",yye="Vehicles",_ye="No vehicle selected",wye="Vehicle Information",bye="Save vehicle",xye="Known information",Sye="Wanted",Pye="MARK UNWANTED",Oye="MARK WANTED",Cye="Select items",kye="Create BOLO",Eye="Plate",$ye="Reason",Mye="BOLO expiration date",Nye="Delete BOLO",Tye="Are you sure you want to delete the BOLO for: %s",Iye="Image URL to use as the vehicle image",jye="BOLO",Lye="BOLOS",Dye="BOLO expires at:",Rye="Expires at:",zye="No bolos found",Aye="Go to vehicle",Bye="You are already responding or not a part of a unit",Fye="You responded to the recent call",Vye={configuration:Dme,logout:Rme,welcome_back:zme,active_officers:Ame,callsign:Bme,attached_unit:Fme,active_warrants:Vme,expires_in:Hme,no_warrants_found:Wme,recent_activity:Ume,type:Zme,category:Gme,done_by:Yme,time_ago:Kme,dispatch:qme,responding_units:Jme,no_recent_calls_found:Xme,announcements:Qme,create_announcement:ege,all_announcements:tge,no_announcements_found:nge,create:rge,view_all:oge,profiles:ige,search:sge,dob:age,citizen_id:lge,no_profiles_found:cge,no_profile_selected:uge,edit_citizen:dge,no_cardid_registered:fge,related_reports:pge,no_related_reports:hge,related_incidents:mge,no_related_incidents:gge,remove_charge:vge,no_incident_selected:yge,add_criminal:_ge,unlink:wge,officers_involved:bge,add_officer:xge,remove_officer:Sge,remove_officer_confirm:Pge,confirm:Oge,cancel:Cge,evidence:kge,add_evidence:Ege,incidents:$ge,create_incident:Mge,remove_evidence:Nge,remove_evidence_confirm:Tge,months:Ige,remove_criminal:jge,remove_criminal_confirm:Lge,go_to_profile:Dge,save_criminal:Rge,edit_charges:zge,issue_warrant:Age,issue_warrant_description:Bge,warrant_expiration_date:Fge,reduction:Vge,no_reduction:Hge,time:Wge,fine:Uge,pleaded_guilty:Zge,processed:Gge,current_charges:Yge,all_charges:Kge,points:qge,add_charge:Jge,incident_title:Xge,incident_title_required:Qge,no_officers_found:eve,image_label_required:tve,image_url_required:nve,image_label:rve,image_url:ove,take_picture:ive,no_report_selected:sve,citizens_involved:ave,add_citizen:lve,remove_citizen_confirm:cve,images:uve,add_image:dve,reports:fve,create_report:pve,report_title:hve,report_title_required:mve,no_citizens_found:gve,units:vve,manage_members:yve,leave_unit:_ve,create_unit:wve,unit_officers:bve,unit_officers_description:xve,unit_vehicle_type:Sve,active_calls:Pve,respond_units_amount:Ove,find_on_map:Cve,set_waypoint:kve,detach_from_call:Eve,respond:$ve,manage_roster:Mve,roster:Nve,members:Tve,members_capitalized:Ive,hire_officer:jve,today:Lve,yesterday:Dve,set_callsign:Rve,set_rank:zve,set_roles:Ave,fire_officer:Bve,fire_officer_description:Fve,officer:Vve,apu:Hve,air:Wve,mc:Uve,k9:Zve,fto:Gve,last_active:Yve,role:Kve,rank:qve,callsign_in_use:Jve,citizen_id_already_hired:Xve,citizen_id_you_want_to_hire:Qve,callsign_you_want_to_hire:eye,create_charge:tye,charge_label:nye,charge_description:rye,charge_category:oye,charge_fine:iye,charge_jailtime:sye,charge_points:aye,charge_type:lye,delete_charge:cye,delete_charge_confirm:uye,edit_charge:dye,edit:fye,delete_incident:pye,delete_incident_confirm:hye,change_picture:mye,image:gye,avatar_description:vye,vehicles:yye,no_vehicle_selected:_ye,vehicle_information:wye,save_vehicle:bye,known_information:xye,wanted:Sye,mark_unwanted:Pye,mark_wanted:Oye,select_items:Cye,create_bolo:kye,plate:Eye,reason:$ye,bolo_expiration_date:Mye,delete_bolo:Nye,delete_bolo_confirm:Tye,avatar_description_vehicle:Iye,bolo:jye,bolos:Lye,bolo_expires_at:Dye,expires_at:Rye,no_bolos_found:zye,goto_vehicle:Aye,already_responding_or_part_of_unit:Bye,responded_to_recent_call:Fye};var F8={},F0={},V8={},V0={};Object.defineProperty(V0,"__esModule",{value:!0});V0.boolean=void 0;const Hye=function(e){switch(Object.prototype.toString.call(e)){case"[object String]":return["true","t","yes","y","on","1"].includes(e.trim().toLowerCase());case"[object Number]":return e.valueOf()===1;case"[object Boolean]":return e.valueOf();default:return!1}};V0.boolean=Hye;var H0={};Object.defineProperty(H0,"__esModule",{value:!0});H0.isBooleanable=void 0;const Wye=function(e){switch(Object.prototype.toString.call(e)){case"[object String]":return["true","t","yes","y","on","1","false","f","no","n","off","0"].includes(e.trim().toLowerCase());case"[object Number]":return[0,1].includes(e.valueOf());case"[object Boolean]":return!0;default:return!1}};H0.isBooleanable=Wye;(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.isBooleanable=e.boolean=void 0;const t=V0;Object.defineProperty(e,"boolean",{enumerable:!0,get:function(){return t.boolean}});const n=H0;Object.defineProperty(e,"isBooleanable",{enumerable:!0,get:function(){return n.isBooleanable}})})(V8);var W0={};Object.defineProperty(W0,"__esModule",{value:!0});W0.tokenize=void 0;const Uye=/(?:%(?([+0-]|-\+))?(?\d+)?(?\d+\$)?(?\.\d+)?(?[%BCESb-iosux]))|(\\%)/g,Zye=e=>{let t;const n=[];let r=0,o=0,i=null;for(;(t=Uye.exec(e))!==null;){t.index>o&&(i={literal:e.slice(o,t.index),type:"literal"},n.push(i));const s=t[0];o=t.index+s.length,s==="\\%"||s==="%%"?i&&i.type==="literal"?i.literal+="%":(i={literal:"%",type:"literal"},n.push(i)):t.groups&&(i={conversion:t.groups.conversion,flag:t.groups.flag||null,placeholder:s,position:t.groups.position?Number.parseInt(t.groups.position,10)-1:r++,precision:t.groups.precision?Number.parseInt(t.groups.precision.slice(1),10):null,type:"placeholder",width:t.groups.width?Number.parseInt(t.groups.width,10):null},n.push(i))}return o<=e.length-1&&(i&&i.type==="literal"?i.literal+=e.slice(o):n.push({literal:e.slice(o),type:"literal"})),n};W0.tokenize=Zye;Object.defineProperty(F0,"__esModule",{value:!0});F0.createPrintf=void 0;const aT=V8,Gye=W0,Yye=(e,t)=>t.placeholder,Kye=e=>{var t;const n=(i,s,a)=>a==="-"?i.padEnd(s," "):a==="-+"?((Number(i)>=0?"+":"")+i).padEnd(s," "):a==="+"?((Number(i)>=0?"+":"")+i).padStart(s," "):a==="0"?i.padStart(s,"0"):i.padStart(s," "),r=(t=e?.formatUnboundExpression)!==null&&t!==void 0?t:Yye,o={};return(i,...s)=>{let a=o[i];a||(a=o[i]=Gye.tokenize(i));let c="";for(const u of a)if(u.type==="literal")c+=u.literal;else{let f=s[u.position];if(f===void 0)c+=r(i,u,s);else if(u.conversion==="b")c+=aT.boolean(f)?"true":"false";else if(u.conversion==="B")c+=aT.boolean(f)?"TRUE":"FALSE";else if(u.conversion==="c")c+=f;else if(u.conversion==="C")c+=String(f).toUpperCase();else if(u.conversion==="i"||u.conversion==="d")f=String(Math.trunc(f)),u.width!==null&&(f=n(f,u.width,u.flag)),c+=f;else if(u.conversion==="e")c+=Number(f).toExponential();else if(u.conversion==="E")c+=Number(f).toExponential().toUpperCase();else if(u.conversion==="f")u.precision!==null&&(f=Number(f).toFixed(u.precision)),u.width!==null&&(f=n(String(f),u.width,u.flag)),c+=f;else if(u.conversion==="o")c+=(Number.parseInt(String(f),10)>>>0).toString(8);else if(u.conversion==="s")u.width!==null&&(f=n(String(f),u.width,u.flag)),c+=f;else if(u.conversion==="S")u.width!==null&&(f=n(String(f),u.width,u.flag)),c+=String(f).toUpperCase();else if(u.conversion==="u")c+=Number.parseInt(String(f),10)>>>0;else if(u.conversion==="x")f=(Number.parseInt(String(f),10)>>>0).toString(16),u.width!==null&&(f=n(String(f),u.width,u.flag)),c+=f;else throw new Error("Unknown format specifier.")}return c}};F0.createPrintf=Kye;(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.printf=e.createPrintf=void 0;const t=F0;Object.defineProperty(e,"createPrintf",{enumerable:!0,get:function(){return t.createPrintf}}),e.printf=t.createPrintf()})(F8);const D={};String.prototype.format=function(...e){return F8.printf(this,...e)};function qye(e){for(const t in D)D[t]=t;for(const[t,n]of Object.entries(e))D[t]=n}if(at())for(const[e,t]of Object.entries(Vye))D[e]=t;pe.extend(B8);const Jye=()=>{const e=Li(u=>u.setSelectedProfile),{setActiveIncident:t,setIncidentActive:n}=Ur(),{getRecentActivity:r,recentActivity:o}=Lme(),i=Ul(),s=u=>{const f=pe(u).fromNow();return a(f)},a=u=>u.charAt(0).toUpperCase()+u.slice(1);_.useEffect(()=>{r()},[]);const c=o.map((u,f)=>h.jsxs("tr",{children:[h.jsx("td",{children:h.jsx(mt,{color:u.type==="created"?"green":u.type==="updated"?"yellow":"red",radius:"sm",children:a(u.type)})}),h.jsx("td",{children:h.jsx(W,{children:a(u.category)})}),h.jsx("td",{children:h.jsxs(W,{children:[u.firstname," ",u.lastname]})}),h.jsx("td",{children:h.jsx(W,{children:s(u.date)})}),h.jsx("td",{children:u.type!=="deleted"&&h.jsx(nt,{spacing:0,position:"right",children:h.jsx(At,{label:"View",color:"gray",position:"bottom",withArrow:!0,children:h.jsx(Qe,{onClick:async()=>{if(u.category==="profiles"){const p=await me("getProfile",u.citizenid,{data:{...UP}});e(p)}else if(u.category==="incidents"){const p=await me("getIncident",u.activityid,{data:{id:1,officersInvolved:[],evidence:[],title:"Funny title",description:"

",criminals:[]}});t(p),n(!0)}i(`/${u.category}`)},children:h.jsx(ghe,{size:"1.1rem",stroke:1.5,color:"white"})})})})})]},f));return h.jsxs("div",{className:"recent-activity-content",children:[h.jsx(W,{style:{fontSize:18,color:"white"},weight:500,children:D.recent_activity}),h.jsx(St,{className:"recent-activity",children:h.jsxs(Zc,{verticalSpacing:"sm",children:[h.jsx("thead",{className:"table-header",children:h.jsxs("tr",{children:[h.jsx("th",{children:D.type}),h.jsx("th",{children:D.category}),h.jsx("th",{children:D.done_by}),h.jsx("th",{children:D.time_ago}),h.jsx("th",{})]})}),h.jsx("tbody",{children:c})]})})]})},GP=_.createContext(null);GP.displayName="@mantine/modals/ModalsContext";function Xye(){const e=_.useContext(GP);if(!e)throw new Error("[@mantine/modals] useModals hook was called outside of context, wrap your app with ModalsProvider component");return e}var Qye=Object.defineProperty,e0e=Object.defineProperties,t0e=Object.getOwnPropertyDescriptors,lT=Object.getOwnPropertySymbols,n0e=Object.prototype.hasOwnProperty,r0e=Object.prototype.propertyIsEnumerable,cT=(e,t,n)=>t in e?Qye(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Y_=(e,t)=>{for(var n in t||(t={}))n0e.call(t,n)&&cT(e,n,t[n]);if(lT)for(var n of lT(t))r0e.call(t,n)&&cT(e,n,t[n]);return e},uT=(e,t)=>e0e(e,t0e(t));function o0e({id:e,cancelProps:t,confirmProps:n,labels:r={cancel:"",confirm:""},closeOnConfirm:o=!0,closeOnCancel:i=!0,groupProps:s,onCancel:a,onConfirm:c,children:u}){const{cancel:f,confirm:p}=r,g=Xye(),v=w=>{typeof t?.onClick=="function"&&t?.onClick(w),typeof a=="function"&&a(),i&&g.closeModal(e)},y=w=>{typeof n?.onClick=="function"&&n?.onClick(w),typeof c=="function"&&c(),o&&g.closeModal(e)};return k.createElement(k.Fragment,null,u&&k.createElement(Pe,{mb:"md"},u),k.createElement(nt,Y_({position:"right"},s),k.createElement(st,uT(Y_({variant:"default"},t),{onClick:v}),t?.children||f),k.createElement(st,uT(Y_({},n),{onClick:y}),n?.children||p)))}function dT(e,t){var n,r,o,i;t&&e.type==="confirm"&&((r=(n=e.props).onCancel)==null||r.call(n)),(i=(o=e.props).onClose)==null||i.call(o)}function i0e(e,t){switch(t.type){case"OPEN":return{current:t.modal,modals:[...e.modals,t.modal]};case"CLOSE":{const n=e.modals.find(o=>o.id===t.modalId);if(!n)return e;dT(n,t.canceled);const r=e.modals.filter(o=>o.id!==t.modalId);return{current:r[r.length-1]||e.current,modals:r}}case"CLOSE_ALL":return e.modals.length?(e.modals.concat().reverse().forEach(n=>{dT(n,t.canceled)}),{current:e.current,modals:[]}):e;default:return e}}const[s0e,Kf]=YW("mantine-modals"),a0e=Kf("openModal"),l0e=Kf("closeModal"),c0e=Kf("closeAllModals"),u0e=Kf("openConfirmModal"),d0e=e=>Kf("openContextModal")(e),ke={open:a0e,close:l0e,closeAll:c0e,openConfirmModal:u0e,openContextModal:d0e};var f0e=Object.defineProperty,p0e=Object.defineProperties,h0e=Object.getOwnPropertyDescriptors,Iv=Object.getOwnPropertySymbols,H8=Object.prototype.hasOwnProperty,W8=Object.prototype.propertyIsEnumerable,fT=(e,t,n)=>t in e?f0e(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,qh=(e,t)=>{for(var n in t||(t={}))H8.call(t,n)&&fT(e,n,t[n]);if(Iv)for(var n of Iv(t))W8.call(t,n)&&fT(e,n,t[n]);return e},pT=(e,t)=>p0e(e,h0e(t)),Qa=(e,t)=>{var n={};for(var r in e)H8.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Iv)for(var r of Iv(e))t.indexOf(r)<0&&W8.call(e,r)&&(n[r]=e[r]);return n};function m0e(e){if(!e)return{confirmProps:{},modalProps:{}};const t=e,{id:n,children:r,onCancel:o,onConfirm:i,closeOnConfirm:s,closeOnCancel:a,cancelProps:c,confirmProps:u,groupProps:f,labels:p}=t,g=Qa(t,["id","children","onCancel","onConfirm","closeOnConfirm","closeOnCancel","cancelProps","confirmProps","groupProps","labels"]);return{confirmProps:{id:n,children:r,onCancel:o,onConfirm:i,closeOnConfirm:s,closeOnCancel:a,cancelProps:c,confirmProps:u,groupProps:f,labels:p},modalProps:qh({id:n},g)}}function g0e({children:e,modalProps:t,labels:n,modals:r}){const[o,i]=_.useReducer(i0e,{modals:[],current:null}),s=_.useRef(o);s.current=o;const a=_.useCallback(P=>{i({type:"CLOSE_ALL",canceled:P})},[s,i]),c=_.useCallback(P=>{var x=P,{modalId:S}=x,O=Qa(x,["modalId"]);const E=S||zc();return i({type:"OPEN",modal:{id:E,type:"content",props:O}}),E},[i]),u=_.useCallback(P=>{var x=P,{modalId:S}=x,O=Qa(x,["modalId"]);const E=S||zc();return i({type:"OPEN",modal:{id:E,type:"confirm",props:O}}),E},[i]),f=_.useCallback((P,x)=>{var S=x,{modalId:O}=S,E=Qa(S,["modalId"]);const $=O||zc();return i({type:"OPEN",modal:{id:$,type:"context",props:E,ctx:P}}),$},[i]),p=_.useCallback((P,x)=>{i({type:"CLOSE",modalId:P,canceled:x})},[s,i]);s0e({openModal:c,openConfirmModal:u,openContextModal:P=>{var x=P,{modal:S}=x,O=Qa(x,["modal"]);return f(S,O)},closeModal:p,closeContextModal:p,closeAllModals:a});const g={modals:o.modals,openModal:c,openConfirmModal:u,openContextModal:f,closeModal:p,closeContextModal:p,closeAll:a},v=()=>{const P=s.current.current;switch(P?.type){case"context":{const x=P.props,{innerProps:S}=x,O=Qa(x,["innerProps"]),E=r[P.ctx];return{modalProps:O,content:k.createElement(E,{innerProps:S,context:g,id:P.id})}}case"confirm":{const{modalProps:x,confirmProps:S}=m0e(P.props);return{modalProps:x,content:k.createElement(o0e,pT(qh({},S),{id:P.id,labels:P.props.labels||n}))}}case"content":{const x=P.props,{children:S}=x;return{modalProps:Qa(x,["children"]),content:k.createElement(k.Fragment,null,S)}}default:return{modalProps:{},content:null}}},{modalProps:y,content:w}=v();return k.createElement(GP.Provider,{value:g},k.createElement(zi,pT(qh(qh({zIndex:ii("modal")+1},t),y),{opened:o.modals.length>0,onClose:()=>p(o.current.id)}),w),e)}const[v0e,ja]=bu("RichTextEditor was not found in tree");function Ln(e){this.content=e}Ln.prototype={constructor:Ln,find:function(e){for(var t=0;t>1}};Ln.from=function(e){if(e instanceof Ln)return e;var t=[];if(e)for(var n in e)t.push(n,e[n]);return new Ln(t)};function U8(e,t,n){for(let r=0;;r++){if(r==e.childCount||r==t.childCount)return e.childCount==t.childCount?null:n;let o=e.child(r),i=t.child(r);if(o==i){n+=o.nodeSize;continue}if(!o.sameMarkup(i))return n;if(o.isText&&o.text!=i.text){for(let s=0;o.text[s]==i.text[s];s++)n++;return n}if(o.content.size||i.content.size){let s=U8(o.content,i.content,n+1);if(s!=null)return s}n+=o.nodeSize}}function Z8(e,t,n,r){for(let o=e.childCount,i=t.childCount;;){if(o==0||i==0)return o==i?null:{a:n,b:r};let s=e.child(--o),a=t.child(--i),c=s.nodeSize;if(s==a){n-=c,r-=c;continue}if(!s.sameMarkup(a))return{a:n,b:r};if(s.isText&&s.text!=a.text){let u=0,f=Math.min(s.text.length,a.text.length);for(;ut&&r(c,o+a,i||null,s)!==!1&&c.content.size){let f=a+1;c.nodesBetween(Math.max(0,t-f),Math.min(c.content.size,n-f),r,o+f)}a=u}}descendants(t){this.nodesBetween(0,this.size,t)}textBetween(t,n,r,o){let i="",s=!0;return this.nodesBetween(t,n,(a,c)=>{a.isText?(i+=a.text.slice(Math.max(t,c)-c,n-c),s=!r):a.isLeaf?(o?i+=typeof o=="function"?o(a):o:a.type.spec.leafText&&(i+=a.type.spec.leafText(a)),s=!r):!s&&a.isBlock&&(i+=r,s=!0)},0),i}append(t){if(!t.size)return this;if(!this.size)return t;let n=this.lastChild,r=t.firstChild,o=this.content.slice(),i=0;for(n.isText&&n.sameMarkup(r)&&(o[o.length-1]=n.withText(n.text+r.text),i=1);it)for(let i=0,s=0;st&&((sn)&&(a.isText?a=a.cut(Math.max(0,t-s),Math.min(a.text.length,n-s)):a=a.cut(Math.max(0,t-s-1),Math.min(a.content.size,n-s-1))),r.push(a),o+=a.nodeSize),s=c}return new se(r,o)}cutByIndex(t,n){return t==n?se.empty:t==0&&n==this.content.length?this:new se(this.content.slice(t,n))}replaceChild(t,n){let r=this.content[t];if(r==n)return this;let o=this.content.slice(),i=this.size+n.nodeSize-r.nodeSize;return o[t]=n,new se(o,i)}addToStart(t){return new se([t].concat(this.content),this.size+t.nodeSize)}addToEnd(t){return new se(this.content.concat(t),this.size+t.nodeSize)}eq(t){if(this.content.length!=t.content.length)return!1;for(let n=0;nthis.size||t<0)throw new RangeError(`Position ${t} outside of fragment (${this})`);for(let r=0,o=0;;r++){let i=this.child(r),s=o+i.nodeSize;if(s>=t)return s==t||n>0?sh(r+1,s):sh(r,o);o=s}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map(t=>t.toJSON()):null}static fromJSON(t,n){if(!n)return se.empty;if(!Array.isArray(n))throw new RangeError("Invalid input for Fragment.fromJSON");return new se(n.map(t.nodeFromJSON))}static fromArray(t){if(!t.length)return se.empty;let n,r=0;for(let o=0;othis.type.rank&&(n||(n=t.slice(0,o)),n.push(this),r=!0),n&&n.push(i)}}return n||(n=t.slice()),r||n.push(this),n}removeFromSet(t){for(let n=0;nr.type.rank-o.type.rank),n}};wt.none=[];class Lv extends Error{}class ye{constructor(t,n,r){this.content=t,this.openStart=n,this.openEnd=r}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(t,n){let r=Y8(this.content,t+this.openStart,n);return r&&new ye(r,this.openStart,this.openEnd)}removeBetween(t,n){return new ye(G8(this.content,t+this.openStart,n+this.openStart),this.openStart,this.openEnd)}eq(t){return this.content.eq(t.content)&&this.openStart==t.openStart&&this.openEnd==t.openEnd}toString(){return this.content+"("+this.openStart+","+this.openEnd+")"}toJSON(){if(!this.content.size)return null;let t={content:this.content.toJSON()};return this.openStart>0&&(t.openStart=this.openStart),this.openEnd>0&&(t.openEnd=this.openEnd),t}static fromJSON(t,n){if(!n)return ye.empty;let r=n.openStart||0,o=n.openEnd||0;if(typeof r!="number"||typeof o!="number")throw new RangeError("Invalid input for Slice.fromJSON");return new ye(se.fromJSON(t,n.content),r,o)}static maxOpen(t,n=!0){let r=0,o=0;for(let i=t.firstChild;i&&!i.isLeaf&&(n||!i.type.spec.isolating);i=i.firstChild)r++;for(let i=t.lastChild;i&&!i.isLeaf&&(n||!i.type.spec.isolating);i=i.lastChild)o++;return new ye(t,r,o)}}ye.empty=new ye(se.empty,0,0);function G8(e,t,n){let{index:r,offset:o}=e.findIndex(t),i=e.maybeChild(r),{index:s,offset:a}=e.findIndex(n);if(o==t||i.isText){if(a!=n&&!e.child(s).isText)throw new RangeError("Removing non-flat range");return e.cut(0,t).append(e.cut(n))}if(r!=s)throw new RangeError("Removing non-flat range");return e.replaceChild(r,i.copy(G8(i.content,t-o-1,n-o-1)))}function Y8(e,t,n,r){let{index:o,offset:i}=e.findIndex(t),s=e.maybeChild(o);if(i==t||s.isText)return r&&!r.canReplace(o,o,n)?null:e.cut(0,t).append(n).append(e.cut(t));let a=Y8(s.content,t-i-1,n);return a&&e.replaceChild(o,s.copy(a))}function y0e(e,t,n){if(n.openStart>e.depth)throw new Lv("Inserted content deeper than insertion position");if(e.depth-n.openStart!=t.depth-n.openEnd)throw new Lv("Inconsistent open depths");return K8(e,t,n,0)}function K8(e,t,n,r){let o=e.index(r),i=e.node(r);if(o==t.index(r)&&r=0&&e.isText&&e.sameMarkup(t[n])?t[n]=e.withText(t[n].text+e.text):t.push(e)}function Dd(e,t,n,r){let o=(t||e).node(n),i=0,s=t?t.index(n):o.childCount;e&&(i=e.index(n),e.depth>n?i++:e.textOffset&&(wl(e.nodeAfter,r),i++));for(let a=i;ao&&sx(e,t,o+1),s=r.depth>o&&sx(n,r,o+1),a=[];return Dd(null,e,o,a),i&&s&&t.index(o)==n.index(o)?(q8(i,s),wl(bl(i,J8(e,t,n,r,o+1)),a)):(i&&wl(bl(i,Dv(e,t,o+1)),a),Dd(t,n,o,a),s&&wl(bl(s,Dv(n,r,o+1)),a)),Dd(r,null,o,a),new se(a)}function Dv(e,t,n){let r=[];if(Dd(null,e,n,r),e.depth>n){let o=sx(e,t,n+1);wl(bl(o,Dv(e,t,n+1)),r)}return Dd(t,null,n,r),new se(r)}function _0e(e,t){let n=t.depth-e.openStart,o=t.node(n).copy(e.content);for(let i=n-1;i>=0;i--)o=t.node(i).copy(se.from(o));return{start:o.resolveNoCache(e.openStart+n),end:o.resolveNoCache(o.content.size-e.openEnd-n)}}class gf{constructor(t,n,r){this.pos=t,this.path=n,this.parentOffset=r,this.depth=n.length/3-1}resolveDepth(t){return t==null?this.depth:t<0?this.depth+t:t}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(t){return this.path[this.resolveDepth(t)*3]}index(t){return this.path[this.resolveDepth(t)*3+1]}indexAfter(t){return t=this.resolveDepth(t),this.index(t)+(t==this.depth&&!this.textOffset?0:1)}start(t){return t=this.resolveDepth(t),t==0?0:this.path[t*3-1]+1}end(t){return t=this.resolveDepth(t),this.start(t)+this.node(t).content.size}before(t){if(t=this.resolveDepth(t),!t)throw new RangeError("There is no position before the top-level node");return t==this.depth+1?this.pos:this.path[t*3-1]}after(t){if(t=this.resolveDepth(t),!t)throw new RangeError("There is no position after the top-level node");return t==this.depth+1?this.pos:this.path[t*3-1]+this.path[t*3].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let t=this.parent,n=this.index(this.depth);if(n==t.childCount)return null;let r=this.pos-this.path[this.path.length-1],o=t.child(n);return r?t.child(n).cut(r):o}get nodeBefore(){let t=this.index(this.depth),n=this.pos-this.path[this.path.length-1];return n?this.parent.child(t).cut(0,n):t==0?null:this.parent.child(t-1)}posAtIndex(t,n){n=this.resolveDepth(n);let r=this.path[n*3],o=n==0?0:this.path[n*3-1]+1;for(let i=0;i0;n--)if(this.start(n)<=t&&this.end(n)>=t)return n;return 0}blockRange(t=this,n){if(t.pos=0;r--)if(t.pos<=this.end(r)&&(!n||n(this.node(r))))return new Rv(this,t,r);return null}sameParent(t){return this.pos-this.parentOffset==t.pos-t.parentOffset}max(t){return t.pos>this.pos?t:this}min(t){return t.pos=0&&n<=t.content.size))throw new RangeError("Position "+n+" out of range");let r=[],o=0,i=n;for(let s=t;;){let{index:a,offset:c}=s.content.findIndex(i),u=i-c;if(r.push(s,a,o+c),!u||(s=s.child(a),s.isText))break;i=u-1,o+=c+1}return new gf(n,r,i)}static resolveCached(t,n){for(let o=0;ot&&this.nodesBetween(t,n,i=>(r.isInSet(i.marks)&&(o=!0),!o)),o}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 t=this.type.name;return this.content.size&&(t+="("+this.content.toStringInner()+")"),X8(this.marks,t)}contentMatchAt(t){let n=this.type.contentMatch.matchFragment(this.content,0,t);if(!n)throw new Error("Called contentMatchAt on a node with invalid content");return n}canReplace(t,n,r=se.empty,o=0,i=r.childCount){let s=this.contentMatchAt(t).matchFragment(r,o,i),a=s&&s.matchFragment(this.content,n);if(!a||!a.validEnd)return!1;for(let c=o;cn.type.name)}`);this.content.forEach(n=>n.check())}toJSON(){let t={type:this.type.name};for(let n in this.attrs){t.attrs=this.attrs;break}return this.content.size&&(t.content=this.content.toJSON()),this.marks.length&&(t.marks=this.marks.map(n=>n.toJSON())),t}static fromJSON(t,n){if(!n)throw new RangeError("Invalid input for Node.fromJSON");let r=null;if(n.marks){if(!Array.isArray(n.marks))throw new RangeError("Invalid mark data for Node.fromJSON");r=n.marks.map(t.markFromJSON)}if(n.type=="text"){if(typeof n.text!="string")throw new RangeError("Invalid text node in JSON");return t.text(n.text,r)}let o=se.fromJSON(t,n.content);return t.nodeType(n.type).create(n.attrs,o,r)}};xl.prototype.text=void 0;class zv extends xl{constructor(t,n,r,o){if(super(t,n,null,o),!r)throw new RangeError("Empty text nodes are not allowed");this.text=r}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):X8(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(t,n){return this.text.slice(t,n)}get nodeSize(){return this.text.length}mark(t){return t==this.marks?this:new zv(this.type,this.attrs,this.text,t)}withText(t){return t==this.text?this:new zv(this.type,this.attrs,t,this.marks)}cut(t=0,n=this.text.length){return t==0&&n==this.text.length?this:this.withText(this.text.slice(t,n))}eq(t){return this.sameMarkup(t)&&this.text==t.text}toJSON(){let t=super.toJSON();return t.text=this.text,t}}function X8(e,t){for(let n=e.length-1;n>=0;n--)t=e[n].type.name+"("+t+")";return t}class Tl{constructor(t){this.validEnd=t,this.next=[],this.wrapCache=[]}static parse(t,n){let r=new x0e(t,n);if(r.next==null)return Tl.empty;let o=Q8(r);r.next&&r.err("Unexpected trailing text");let i=$0e(E0e(o));return M0e(i,r),i}matchType(t){for(let n=0;nu.createAndFill()));for(let u=0;u=this.next.length)throw new RangeError(`There's no ${t}th edge in this content match`);return this.next[t]}toString(){let t=[];function n(r){t.push(r);for(let o=0;o{let i=o+(r.validEnd?"*":" ")+" ";for(let s=0;s"+t.indexOf(r.next[s].next);return i}).join(` +`)}}Tl.empty=new Tl(!0);class x0e{constructor(t,n){this.string=t,this.nodeTypes=n,this.inline=null,this.pos=0,this.tokens=t.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(t){return this.next==t&&(this.pos++||!0)}err(t){throw new SyntaxError(t+" (in content expression '"+this.string+"')")}}function Q8(e){let t=[];do t.push(S0e(e));while(e.eat("|"));return t.length==1?t[0]:{type:"choice",exprs:t}}function S0e(e){let t=[];do t.push(P0e(e));while(e.next&&e.next!=")"&&e.next!="|");return t.length==1?t[0]:{type:"seq",exprs:t}}function P0e(e){let t=k0e(e);for(;;)if(e.eat("+"))t={type:"plus",expr:t};else if(e.eat("*"))t={type:"star",expr:t};else if(e.eat("?"))t={type:"opt",expr:t};else if(e.eat("{"))t=O0e(e,t);else break;return t}function hT(e){/\D/.test(e.next)&&e.err("Expected number, got '"+e.next+"'");let t=Number(e.next);return e.pos++,t}function O0e(e,t){let n=hT(e),r=n;return e.eat(",")&&(e.next!="}"?r=hT(e):r=-1),e.eat("}")||e.err("Unclosed braced range"),{type:"range",min:n,max:r,expr:t}}function C0e(e,t){let n=e.nodeTypes,r=n[t];if(r)return[r];let o=[];for(let i in n){let s=n[i];s.groups.indexOf(t)>-1&&o.push(s)}return o.length==0&&e.err("No node type or group '"+t+"' found"),o}function k0e(e){if(e.eat("(")){let t=Q8(e);return e.eat(")")||e.err("Missing closing paren"),t}else if(/\W/.test(e.next))e.err("Unexpected token '"+e.next+"'");else{let t=C0e(e,e.next).map(n=>(e.inline==null?e.inline=n.isInline:e.inline!=n.isInline&&e.err("Mixing inline and block content"),{type:"name",value:n}));return e.pos++,t.length==1?t[0]:{type:"choice",exprs:t}}}function E0e(e){let t=[[]];return o(i(e,0),n()),t;function n(){return t.push([])-1}function r(s,a,c){let u={term:c,to:a};return t[s].push(u),u}function o(s,a){s.forEach(c=>c.to=a)}function i(s,a){if(s.type=="choice")return s.exprs.reduce((c,u)=>c.concat(i(u,a)),[]);if(s.type=="seq")for(let c=0;;c++){let u=i(s.exprs[c],a);if(c==s.exprs.length-1)return u;o(u,a=n())}else if(s.type=="star"){let c=n();return r(a,c),o(i(s.expr,c),c),[r(c)]}else if(s.type=="plus"){let c=n();return o(i(s.expr,a),c),o(i(s.expr,c),c),[r(c)]}else{if(s.type=="opt")return[r(a)].concat(i(s.expr,a));if(s.type=="range"){let c=a;for(let u=0;u{e[s].forEach(({term:a,to:c})=>{if(!a)return;let u;for(let f=0;f{u||o.push([a,u=[]]),u.indexOf(f)==-1&&u.push(f)})})});let i=t[r.join(",")]=new Tl(r.indexOf(e.length-1)>-1);for(let s=0;s-1}allowsMarks(t){if(this.markSet==null)return!0;for(let n=0;nr[i]=new o7(i,n,s));let o=n.spec.topNode||"doc";if(!r[o])throw new RangeError("Schema is missing its top node type ('"+o+"')");if(!r.text)throw new RangeError("Every schema needs a 'text' type");for(let i in r.text.attrs)throw new RangeError("The text node type should not have attributes");return r}};class N0e{constructor(t){this.hasDefault=Object.prototype.hasOwnProperty.call(t,"default"),this.default=t.default}get isRequired(){return!this.hasDefault}}class U0{constructor(t,n,r,o){this.name=t,this.rank=n,this.schema=r,this.spec=o,this.attrs=r7(o.attrs),this.excluded=null;let i=t7(this.attrs);this.instance=i?new wt(this,i):null}create(t=null){return!t&&this.instance?this.instance:new wt(this,n7(this.attrs,t))}static compile(t,n){let r=Object.create(null),o=0;return t.forEach((i,s)=>r[i]=new U0(i,o++,n,s)),r}removeFromSet(t){for(var n=0;n-1}}class T0e{constructor(t){this.cached=Object.create(null);let n=this.spec={};for(let o in t)n[o]=t[o];n.nodes=Ln.from(t.nodes),n.marks=Ln.from(t.marks||{}),this.nodes=gT.compile(this.spec.nodes,this),this.marks=U0.compile(this.spec.marks,this);let r=Object.create(null);for(let o in this.nodes){if(o in this.marks)throw new RangeError(o+" can not be both a node and a mark");let i=this.nodes[o],s=i.spec.content||"",a=i.spec.marks;i.contentMatch=r[s]||(r[s]=Tl.parse(s,this.nodes)),i.inlineContent=i.contentMatch.inlineContent,i.markSet=a=="_"?null:a?vT(this,a.split(" ")):a==""||!i.inlineContent?[]:null}for(let o in this.marks){let i=this.marks[o],s=i.spec.excludes;i.excluded=s==null?[i]:s==""?[]:vT(this,s.split(" "))}this.nodeFromJSON=this.nodeFromJSON.bind(this),this.markFromJSON=this.markFromJSON.bind(this),this.topNodeType=this.nodes[this.spec.topNode||"doc"],this.cached.wrappings=Object.create(null)}node(t,n=null,r,o){if(typeof t=="string")t=this.nodeType(t);else if(t instanceof gT){if(t.schema!=this)throw new RangeError("Node type from different schema used ("+t.name+")")}else throw new RangeError("Invalid node type: "+t);return t.createChecked(n,r,o)}text(t,n){let r=this.nodes.text;return new zv(r,r.defaultAttrs,t,wt.setFrom(n))}mark(t,n){return typeof t=="string"&&(t=this.marks[t]),t.create(n)}nodeFromJSON(t){return xl.fromJSON(this,t)}markFromJSON(t){return wt.fromJSON(this,t)}nodeType(t){let n=this.nodes[t];if(!n)throw new RangeError("Unknown node type: "+t);return n}}function vT(e,t){let n=[];for(let r=0;r-1)&&n.push(s=c)}if(!s)throw new SyntaxError("Unknown mark type: '"+t[r]+"'")}return n}class fu{constructor(t,n){this.schema=t,this.rules=n,this.tags=[],this.styles=[],n.forEach(r=>{r.tag?this.tags.push(r):r.style&&this.styles.push(r)}),this.normalizeLists=!this.tags.some(r=>{if(!/^(ul|ol)\b/.test(r.tag)||!r.node)return!1;let o=t.nodes[r.node];return o.contentMatch.matchType(o)})}parse(t,n={}){let r=new _T(this,n,!1);return r.addAll(t,n.from,n.to),r.finish()}parseSlice(t,n={}){let r=new _T(this,n,!0);return r.addAll(t,n.from,n.to),ye.maxOpen(r.finish())}matchTag(t,n,r){for(let o=r?this.tags.indexOf(r)+1:0;ot.length&&(a.charCodeAt(t.length)!=61||a.slice(t.length+1)!=n))){if(s.getAttrs){let c=s.getAttrs(n);if(c===!1)continue;s.attrs=c||void 0}return s}}}static schemaRules(t){let n=[];function r(o){let i=o.priority==null?50:o.priority,s=0;for(;s{r(s=wT(s)),s.mark||s.ignore||s.clearMark||(s.mark=o)})}for(let o in t.nodes){let i=t.nodes[o].spec.parseDOM;i&&i.forEach(s=>{r(s=wT(s)),s.node||s.ignore||s.mark||(s.node=o)})}return n}static fromSchema(t){return t.cached.domParser||(t.cached.domParser=new fu(t,fu.schemaRules(t)))}}const i7={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},I0e={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},s7={ol:!0,ul:!0},Av=1,Bv=2,Rd=4;function yT(e,t,n){return t!=null?(t?Av:0)|(t==="full"?Bv:0):e&&e.whitespace=="pre"?Av|Bv:n&~Rd}class ah{constructor(t,n,r,o,i,s,a){this.type=t,this.attrs=n,this.marks=r,this.pendingMarks=o,this.solid=i,this.options=a,this.content=[],this.activeMarks=wt.none,this.stashMarks=[],this.match=s||(a&Rd?null:t.contentMatch)}findWrapping(t){if(!this.match){if(!this.type)return[];let n=this.type.contentMatch.fillBefore(se.from(t));if(n)this.match=this.type.contentMatch.matchFragment(n);else{let r=this.type.contentMatch,o;return(o=r.findWrapping(t.type))?(this.match=r,o):null}}return this.match.findWrapping(t.type)}finish(t){if(!(this.options&Av)){let r=this.content[this.content.length-1],o;if(r&&r.isText&&(o=/[ \t\r\n\u000c]+$/.exec(r.text))){let i=r;r.text.length==o[0].length?this.content.pop():this.content[this.content.length-1]=i.withText(i.text.slice(0,i.text.length-o[0].length))}}let n=se.from(this.content);return!t&&this.match&&(n=n.append(this.match.fillBefore(se.empty,!0))),this.type?this.type.create(this.attrs,n,this.marks):n}popFromStashMark(t){for(let n=this.stashMarks.length-1;n>=0;n--)if(t.eq(this.stashMarks[n]))return this.stashMarks.splice(n,1)[0]}applyPending(t){for(let n=0,r=this.pendingMarks;nthis.addAll(t)),s&&this.sync(a),this.needsBlock=c}else this.withStyleRules(t,()=>{this.addElementByRule(t,i,i.consuming===!1?o:void 0)})}leafFallback(t){t.nodeName=="BR"&&this.top.type&&this.top.type.inlineContent&&this.addTextNode(t.ownerDocument.createTextNode(` +`))}ignoreFallback(t){t.nodeName=="BR"&&(!this.top.type||!this.top.type.inlineContent)&&this.findPlace(this.parser.schema.text("-"))}readStyles(t){let n=wt.none,r=wt.none;for(let o=0;o{s.clearMark(a)&&(r=a.addToSet(r))}):n=this.parser.schema.marks[s.mark].create(s.attrs).addToSet(n),s.consuming===!1)i=s;else break}return[n,r]}addElementByRule(t,n,r){let o,i,s;n.node?(i=this.parser.schema.nodes[n.node],i.isLeaf?this.insertNode(i.create(n.attrs))||this.leafFallback(t):o=this.enter(i,n.attrs||null,n.preserveWhitespace)):(s=this.parser.schema.marks[n.mark].create(n.attrs),this.addPendingMark(s));let a=this.top;if(i&&i.isLeaf)this.findInside(t);else if(r)this.addElement(t,r);else if(n.getContent)this.findInside(t),n.getContent(t,this.parser.schema).forEach(c=>this.insertNode(c));else{let c=t;typeof n.contentElement=="string"?c=t.querySelector(n.contentElement):typeof n.contentElement=="function"?c=n.contentElement(t):n.contentElement&&(c=n.contentElement),this.findAround(t,c,!0),this.addAll(c)}o&&this.sync(a)&&this.open--,s&&this.removePendingMark(s,a)}addAll(t,n,r){let o=n||0;for(let i=n?t.childNodes[n]:t.firstChild,s=r==null?null:t.childNodes[r];i!=s;i=i.nextSibling,++o)this.findAtPoint(t,o),this.addDOM(i);this.findAtPoint(t,o)}findPlace(t){let n,r;for(let o=this.open;o>=0;o--){let i=this.nodes[o],s=i.findWrapping(t);if(s&&(!n||n.length>s.length)&&(n=s,r=i,!s.length)||i.solid)break}if(!n)return!1;this.sync(r);for(let o=0;othis.open){for(;n>this.open;n--)this.nodes[n-1].content.push(this.nodes[n].finish(t));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(t){for(let n=this.open;n>=0;n--)if(this.nodes[n]==t)return this.open=n,!0;return!1}get currentPos(){this.closeExtra();let t=0;for(let n=this.open;n>=0;n--){let r=this.nodes[n].content;for(let o=r.length-1;o>=0;o--)t+=r[o].nodeSize;n&&t++}return t}findAtPoint(t,n){if(this.find)for(let r=0;r-1)return t.split(/\s*\|\s*/).some(this.matchesContext,this);let n=t.split("/"),r=this.options.context,o=!this.isOpen&&(!r||r.parent.type==this.nodes[0].type),i=-(r?r.depth+1:0)+(o?0:1),s=(a,c)=>{for(;a>=0;a--){let u=n[a];if(u==""){if(a==n.length-1||a==0)continue;for(;c>=i;c--)if(s(a-1,c))return!0;return!1}else{let f=c>0||c==0&&o?this.nodes[c].type:r&&c>=i?r.node(c-i).type:null;if(!f||f.name!=u&&f.groups.indexOf(u)==-1)return!1;c--}}return!0};return s(n.length-1,this.open)}textblockFromContext(){let t=this.options.context;if(t)for(let n=t.depth;n>=0;n--){let r=t.node(n).contentMatchAt(t.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}}addPendingMark(t){let n=z0e(t,this.top.pendingMarks);n&&this.top.stashMarks.push(n),this.top.pendingMarks=t.addToSet(this.top.pendingMarks)}removePendingMark(t,n){for(let r=this.open;r>=0;r--){let o=this.nodes[r];if(o.pendingMarks.lastIndexOf(t)>-1)o.pendingMarks=t.removeFromSet(o.pendingMarks);else{o.activeMarks=t.removeFromSet(o.activeMarks);let s=o.popFromStashMark(t);s&&o.type&&o.type.allowsMarkType(s.type)&&(o.activeMarks=s.addToSet(o.activeMarks))}if(o==n)break}}}function j0e(e){for(let t=e.firstChild,n=null;t;t=t.nextSibling){let r=t.nodeType==1?t.nodeName.toLowerCase():null;r&&s7.hasOwnProperty(r)&&n?(n.appendChild(t),t=n):r=="li"?n=t:r&&(n=null)}}function L0e(e,t){return(e.matches||e.msMatchesSelector||e.webkitMatchesSelector||e.mozMatchesSelector).call(e,t)}function D0e(e){let t=/\s*([\w-]+)\s*:\s*([^;]+)/g,n,r=[];for(;n=t.exec(e);)r.push(n[1],n[2].trim());return r}function wT(e){let t={};for(let n in e)t[n]=e[n];return t}function R0e(e,t){let n=t.schema.nodes;for(let r in n){let o=n[r];if(!o.allowsMarkType(e))continue;let i=[],s=a=>{i.push(a);for(let c=0;c{if(i.length||s.marks.length){let a=0,c=0;for(;a=0;o--){let i=this.serializeMark(t.marks[o],t.isInline,n);i&&((i.contentDOM||i.dom).appendChild(r),r=i.dom)}return r}serializeMark(t,n,r={}){let o=this.marks[t.type.name];return o&&$i.renderSpec(X_(r),o(t,n))}static renderSpec(t,n,r=null){if(typeof n=="string")return{dom:t.createTextNode(n)};if(n.nodeType!=null)return{dom:n};if(n.dom&&n.dom.nodeType!=null)return n;let o=n[0],i=o.indexOf(" ");i>0&&(r=o.slice(0,i),o=o.slice(i+1));let s,a=r?t.createElementNS(r,o):t.createElement(o),c=n[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 p=f.indexOf(" ");p>0?a.setAttributeNS(f.slice(0,p),f.slice(p+1),c[f]):a.setAttribute(f,c[f])}}for(let f=u;fu)throw new RangeError("Content hole must be the only child of its parent node");return{dom:a,contentDOM:a}}else{let{dom:g,contentDOM:v}=$i.renderSpec(t,p,r);if(a.appendChild(g),v){if(s)throw new RangeError("Multiple content holes");s=v}}}return{dom:a,contentDOM:s}}static fromSchema(t){return t.cached.domSerializer||(t.cached.domSerializer=new $i(this.nodesFromSchema(t),this.marksFromSchema(t)))}static nodesFromSchema(t){let n=bT(t.nodes);return n.text||(n.text=r=>r.text),n}static marksFromSchema(t){return bT(t.marks)}}function bT(e){let t={};for(let n in e){let r=e[n].spec.toDOM;r&&(t[n]=r)}return t}function X_(e){return e.document||window.document}const a7=65535,l7=Math.pow(2,16);function A0e(e,t){return e+t*l7}function xT(e){return e&a7}function B0e(e){return(e-(e&a7))/l7}const c7=1,u7=2,Jh=4,d7=8;class lx{constructor(t,n,r){this.pos=t,this.delInfo=n,this.recover=r}get deleted(){return(this.delInfo&d7)>0}get deletedBefore(){return(this.delInfo&(c7|Jh))>0}get deletedAfter(){return(this.delInfo&(u7|Jh))>0}get deletedAcross(){return(this.delInfo&Jh)>0}}class co{constructor(t,n=!1){if(this.ranges=t,this.inverted=n,!t.length&&co.empty)return co.empty}recover(t){let n=0,r=xT(t);if(!this.inverted)for(let o=0;ot)break;let u=this.ranges[a+i],f=this.ranges[a+s],p=c+u;if(t<=p){let g=u?t==c?-1:t==p?1:n:n,v=c+o+(g<0?0:f);if(r)return v;let y=t==(n<0?c:p)?null:A0e(a/3,t-c),w=t==c?u7:t==p?c7:Jh;return(n<0?t!=c:t!=p)&&(w|=d7),new lx(v,w,y)}o+=f-u}return r?t+o:new lx(t+o,0,null)}touches(t,n){let r=0,o=xT(n),i=this.inverted?2:1,s=this.inverted?1:2;for(let a=0;at)break;let u=this.ranges[a+i],f=c+u;if(t<=f&&a==o*3)return!0;r+=this.ranges[a+s]-u}return!1}forEach(t){let n=this.inverted?2:1,r=this.inverted?1:2;for(let o=0,i=0;o=0;n--){let o=t.getMirror(n);this.appendMap(t.maps[n].invert(),o!=null&&o>n?r-o-1:void 0)}}invert(){let t=new Gc;return t.appendMappingInverted(this),t}map(t,n=1){if(this.mirror)return this._map(t,n,!0);for(let r=this.from;ri&&c!s.isAtom||!a.type.allowsMarkType(this.mark.type)?s:s.mark(this.mark.addToSet(s.marks)),o),n.openStart,n.openEnd);return cn.fromReplace(t,this.from,this.to,i)}invert(){return new Mi(this.from,this.to,this.mark)}map(t){let n=t.mapResult(this.from,1),r=t.mapResult(this.to,-1);return n.deleted&&r.deleted||n.pos>=r.pos?null:new ea(n.pos,r.pos,this.mark)}merge(t){return t instanceof ea&&t.mark.eq(this.mark)&&this.from<=t.to&&this.to>=t.from?new ea(Math.min(this.from,t.from),Math.max(this.to,t.to),this.mark):null}toJSON(){return{stepType:"addMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(t,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for AddMarkStep.fromJSON");return new ea(n.from,n.to,t.markFromJSON(n.mark))}}sr.jsonID("addMark",ea);class Mi extends sr{constructor(t,n,r){super(),this.from=t,this.to=n,this.mark=r}apply(t){let n=t.slice(this.from,this.to),r=new ye(YP(n.content,o=>o.mark(this.mark.removeFromSet(o.marks)),t),n.openStart,n.openEnd);return cn.fromReplace(t,this.from,this.to,r)}invert(){return new ea(this.from,this.to,this.mark)}map(t){let n=t.mapResult(this.from,1),r=t.mapResult(this.to,-1);return n.deleted&&r.deleted||n.pos>=r.pos?null:new Mi(n.pos,r.pos,this.mark)}merge(t){return t instanceof Mi&&t.mark.eq(this.mark)&&this.from<=t.to&&this.to>=t.from?new Mi(Math.min(this.from,t.from),Math.max(this.to,t.to),this.mark):null}toJSON(){return{stepType:"removeMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(t,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for RemoveMarkStep.fromJSON");return new Mi(n.from,n.to,t.markFromJSON(n.mark))}}sr.jsonID("removeMark",Mi);class ta extends sr{constructor(t,n){super(),this.pos=t,this.mark=n}apply(t){let n=t.nodeAt(this.pos);if(!n)return cn.fail("No node at mark step's position");let r=n.type.create(n.attrs,null,this.mark.addToSet(n.marks));return cn.fromReplace(t,this.pos,this.pos+1,new ye(se.from(r),0,n.isLeaf?0:1))}invert(t){let n=t.nodeAt(this.pos);if(n){let r=this.mark.addToSet(n.marks);if(r.length==n.marks.length){for(let o=0;or.pos?null:new En(n.pos,r.pos,o,i,this.slice,this.insert,this.structure)}toJSON(){let t={stepType:"replaceAround",from:this.from,to:this.to,gapFrom:this.gapFrom,gapTo:this.gapTo,insert:this.insert};return this.slice.size&&(t.slice=this.slice.toJSON()),this.structure&&(t.structure=!0),t}static fromJSON(t,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 En(n.from,n.to,n.gapFrom,n.gapTo,ye.fromJSON(t,n.slice),n.insert,!!n.structure)}}sr.jsonID("replaceAround",En);function cx(e,t,n){let r=e.resolve(t),o=n-t,i=r.depth;for(;o>0&&i>0&&r.indexAfter(i)==r.node(i).childCount;)i--,o--;if(o>0){let s=r.node(i).maybeChild(r.indexAfter(i));for(;o>0;){if(!s||s.isLeaf)return!0;s=s.firstChild,o--}}return!1}function F0e(e,t,n,r){let o=[],i=[],s,a;e.doc.nodesBetween(t,n,(c,u,f)=>{if(!c.isInline)return;let p=c.marks;if(!r.isInSet(p)&&f.type.allowsMarkType(r.type)){let g=Math.max(u,t),v=Math.min(u+c.nodeSize,n),y=r.addToSet(p);for(let w=0;we.step(c)),i.forEach(c=>e.step(c))}function V0e(e,t,n,r){let o=[],i=0;e.doc.nodesBetween(t,n,(s,a)=>{if(!s.isInline)return;i++;let c=null;if(r instanceof U0){let u=s.marks,f;for(;f=r.isInSet(u);)(c||(c=[])).push(f),u=f.removeFromSet(u)}else r?r.isInSet(s.marks)&&(c=[r]):c=s.marks;if(c&&c.length){let u=Math.min(a+s.nodeSize,n);for(let f=0;fe.step(new Mi(s.from,s.to,s.style)))}function H0e(e,t,n,r=n.contentMatch){let o=e.doc.nodeAt(t),i=[],s=t+1;for(let a=0;a=0;a--)e.step(i[a])}function W0e(e,t,n){return(t==0||e.canReplace(t,e.childCount))&&(n==e.childCount||e.canReplace(0,n))}function $u(e){let n=e.parent.content.cutByIndex(e.startIndex,e.endIndex);for(let r=e.depth;;--r){let o=e.$from.node(r),i=e.$from.index(r),s=e.$to.indexAfter(r);if(rn;y--)w||r.index(y)>0?(w=!0,f=se.from(r.node(y).copy(f)),p++):c--;let g=se.empty,v=0;for(let y=i,w=!1;y>n;y--)w||o.after(y+1)=0;s--){if(r.size){let a=n[s].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=se.from(n[s].type.create(n[s].attrs,r))}let o=t.start,i=t.end;e.step(new En(o,i,o,i,new ye(r,0,0),n.length,!0))}function K0e(e,t,n,r,o){if(!r.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock");let i=e.steps.length;e.doc.nodesBetween(t,n,(s,a)=>{if(s.isTextblock&&!s.hasMarkup(r,o)&&q0e(e.doc,e.mapping.slice(i).map(a),r)){e.clearIncompatible(e.mapping.slice(i).map(a,1),r);let c=e.mapping.slice(i),u=c.map(a,1),f=c.map(a+s.nodeSize,1);return e.step(new En(u,f,u+1,f-1,new ye(se.from(r.create(o,null,s.marks)),0,0),1,!0)),!1}})}function q0e(e,t,n){let r=e.resolve(t),o=r.index();return r.parent.canReplaceWith(o,o+1,n)}function J0e(e,t,n,r,o){let i=e.doc.nodeAt(t);if(!i)throw new RangeError("No node at given position");n||(n=i.type);let s=n.create(r,null,o||i.marks);if(i.isLeaf)return e.replaceWith(t,t+i.nodeSize,s);if(!n.validContent(i.content))throw new RangeError("Invalid content for node type "+n.name);e.step(new En(t,t+i.nodeSize,t+1,t+i.nodeSize-1,new ye(se.from(s),0,0),1,!0))}function Yc(e,t,n=1,r){let o=e.resolve(t),i=o.depth-n,s=r&&r[r.length-1]||o.parent;if(i<0||o.parent.type.spec.isolating||!o.parent.canReplace(o.index(),o.parent.childCount)||!s.type.validContent(o.parent.content.cutByIndex(o.index(),o.parent.childCount)))return!1;for(let u=o.depth-1,f=n-2;u>i;u--,f--){let p=o.node(u),g=o.index(u);if(p.type.spec.isolating)return!1;let v=p.content.cutByIndex(g,p.childCount),y=r&&r[f+1];y&&(v=v.replaceChild(0,y.type.create(y.attrs)));let w=r&&r[f]||p;if(!p.canReplace(g+1,p.childCount)||!w.type.validContent(v))return!1}let a=o.indexAfter(i),c=r&&r[0];return o.node(i).canReplaceWith(a,a,c?c.type:o.node(i+1).type)}function X0e(e,t,n=1,r){let o=e.doc.resolve(t),i=se.empty,s=se.empty;for(let a=o.depth,c=o.depth-n,u=n-1;a>c;a--,u--){i=se.from(o.node(a).copy(i));let f=r&&r[u];s=se.from(f?f.type.create(f.attrs,s):o.node(a).copy(s))}e.step(new zn(t,t,new ye(i.append(s),n,n),!0))}function La(e,t){let n=e.resolve(t),r=n.index();return f7(n.nodeBefore,n.nodeAfter)&&n.parent.canReplace(r,r+1)}function f7(e,t){return!!(e&&t&&!e.isLeaf&&e.canAppend(t))}function Z0(e,t,n=-1){let r=e.resolve(t);for(let o=r.depth;;o--){let i,s,a=r.index(o);if(o==r.depth?(i=r.nodeBefore,s=r.nodeAfter):n>0?(i=r.node(o+1),a++,s=r.node(o).maybeChild(a)):(i=r.node(o).maybeChild(a-1),s=r.node(o+1)),i&&!i.isTextblock&&f7(i,s)&&r.node(o).canReplace(a,a+1))return t;if(o==0)break;t=n<0?r.before(o):r.after(o)}}function Q0e(e,t,n){let r=new zn(t-n,t+n,ye.empty,!0);e.step(r)}function e1e(e,t,n){let r=e.resolve(t);if(r.parent.canReplaceWith(r.index(),r.index(),n))return t;if(r.parentOffset==0)for(let o=r.depth-1;o>=0;o--){let i=r.index(o);if(r.node(o).canReplaceWith(i,i,n))return r.before(o+1);if(i>0)return null}if(r.parentOffset==r.parent.content.size)for(let o=r.depth-1;o>=0;o--){let i=r.indexAfter(o);if(r.node(o).canReplaceWith(i,i,n))return r.after(o+1);if(i=0;s--){let a=s==r.depth?0:r.pos<=(r.start(s+1)+r.end(s+1))/2?-1:1,c=r.index(s)+(a>0?1:0),u=r.node(s),f=!1;if(i==1)f=u.canReplace(c,c,o);else{let p=u.contentMatchAt(c).findWrapping(o.firstChild.type);f=p&&u.canReplaceWith(c,c,p[0])}if(f)return a==0?r.pos:a<0?r.before(s+1):r.after(s+1)}return null}function qP(e,t,n=t,r=ye.empty){if(t==n&&!r.size)return null;let o=e.resolve(t),i=e.resolve(n);return h7(o,i,r)?new zn(t,n,r):new t1e(o,i,r).fit()}function h7(e,t,n){return!n.openStart&&!n.openEnd&&e.start()==t.start()&&e.parent.canReplace(e.index(),t.index(),n.content)}class t1e{constructor(t,n,r){this.$from=t,this.$to=n,this.unplaced=r,this.frontier=[],this.placed=se.empty;for(let o=0;o<=t.depth;o++){let i=t.node(o);this.frontier.push({type:i.type,match:i.contentMatchAt(t.indexAfter(o))})}for(let o=t.depth;o>0;o--)this.placed=se.from(t.node(o).copy(this.placed))}get depth(){return this.frontier.length-1}fit(){for(;this.unplaced.size;){let u=this.findFittable();u?this.placeNodes(u):this.openMore()||this.dropNode()}let t=this.mustMoveInline(),n=this.placed.size-this.depth-this.$from.depth,r=this.$from,o=this.close(t<0?this.$to:r.doc.resolve(t));if(!o)return null;let i=this.placed,s=r.depth,a=o.depth;for(;s&&a&&i.childCount==1;)i=i.firstChild.content,s--,a--;let c=new ye(i,s,a);return t>-1?new En(r.pos,t,this.$to.pos,this.$to.end(),c,n):c.size||r.pos!=this.$to.pos?new zn(r.pos,o.pos,c):null}findFittable(){let t=this.unplaced.openStart;for(let n=this.unplaced.content,r=0,o=this.unplaced.openEnd;r1&&(o=0),i.type.spec.isolating&&o<=r){t=r;break}n=i.content}for(let n=1;n<=2;n++)for(let r=n==1?t:this.unplaced.openStart;r>=0;r--){let o,i=null;r?(i=ew(this.unplaced.content,r-1).firstChild,o=i.content):o=this.unplaced.content;let s=o.firstChild;for(let a=this.depth;a>=0;a--){let{type:c,match:u}=this.frontier[a],f,p=null;if(n==1&&(s?u.matchType(s.type)||(p=u.fillBefore(se.from(s),!1)):i&&c.compatibleContent(i.type)))return{sliceDepth:r,frontierDepth:a,parent:i,inject:p};if(n==2&&s&&(f=u.findWrapping(s.type)))return{sliceDepth:r,frontierDepth:a,parent:i,wrap:f};if(i&&u.matchType(i.type))break}}}openMore(){let{content:t,openStart:n,openEnd:r}=this.unplaced,o=ew(t,n);return!o.childCount||o.firstChild.isLeaf?!1:(this.unplaced=new ye(t,n+1,Math.max(r,o.size+n>=t.size-r?n+1:0)),!0)}dropNode(){let{content:t,openStart:n,openEnd:r}=this.unplaced,o=ew(t,n);if(o.childCount<=1&&n>0){let i=t.size-n<=n+o.size;this.unplaced=new ye(vd(t,n-1,1),n-1,i?n-1:r)}else this.unplaced=new ye(vd(t,n,1),n,r)}placeNodes({sliceDepth:t,frontierDepth:n,parent:r,inject:o,wrap:i}){for(;this.depth>n;)this.closeFrontierNode();if(i)for(let w=0;w1||c==0||w.content.size)&&(p=P,f.push(m7(w.mark(g.allowedMarks(w.marks)),u==1?c:0,u==a.childCount?v:-1)))}let y=u==a.childCount;y||(v=-1),this.placed=yd(this.placed,n,se.from(f)),this.frontier[n].match=p,y&&v<0&&r&&r.type==this.frontier[this.depth].type&&this.frontier.length>1&&this.closeFrontierNode();for(let w=0,P=a;w1&&o==this.$to.end(--r);)++o;return o}findCloseLevel(t){e:for(let n=Math.min(this.depth,t.depth);n>=0;n--){let{match:r,type:o}=this.frontier[n],i=n=0;a--){let{match:c,type:u}=this.frontier[a],f=tw(t,a,u,c,!0);if(!f||f.childCount)continue e}return{depth:n,fit:s,move:i?t.doc.resolve(t.after(n+1)):t}}}}close(t){let n=this.findCloseLevel(t);if(!n)return null;for(;this.depth>n.depth;)this.closeFrontierNode();n.fit.childCount&&(this.placed=yd(this.placed,n.depth,n.fit)),t=n.move;for(let r=n.depth+1;r<=t.depth;r++){let o=t.node(r),i=o.type.contentMatch.fillBefore(o.content,!0,t.index(r));this.openFrontierNode(o.type,o.attrs,i)}return t}openFrontierNode(t,n=null,r){let o=this.frontier[this.depth];o.match=o.match.matchType(t),this.placed=yd(this.placed,this.depth,se.from(t.create(n,r))),this.frontier.push({type:t,match:t.contentMatch})}closeFrontierNode(){let n=this.frontier.pop().match.fillBefore(se.empty,!0);n.childCount&&(this.placed=yd(this.placed,this.frontier.length,n))}}function vd(e,t,n){return t==0?e.cutByIndex(n,e.childCount):e.replaceChild(0,e.firstChild.copy(vd(e.firstChild.content,t-1,n)))}function yd(e,t,n){return t==0?e.append(n):e.replaceChild(e.childCount-1,e.lastChild.copy(yd(e.lastChild.content,t-1,n)))}function ew(e,t){for(let n=0;n1&&(r=r.replaceChild(0,m7(r.firstChild,t-1,r.childCount==1?n-1:0))),t>0&&(r=e.type.contentMatch.fillBefore(r).append(r),n<=0&&(r=r.append(e.type.contentMatch.matchFragment(r).fillBefore(se.empty,!0)))),e.copy(r)}function tw(e,t,n,r,o){let i=e.node(t),s=o?e.indexAfter(t):e.index(t);if(s==i.childCount&&!n.compatibleContent(i.type))return null;let a=r.fillBefore(i.content,!0,s);return a&&!n1e(n,i.content,s)?a:null}function n1e(e,t,n){for(let r=n;r0;g--,v--){let y=o.node(g).type.spec;if(y.defining||y.definingAsContext||y.isolating)break;s.indexOf(g)>-1?a=g:o.before(g)==v&&s.splice(1,0,-g)}let c=s.indexOf(a),u=[],f=r.openStart;for(let g=r.content,v=0;;v++){let y=g.firstChild;if(u.push(y),v==r.openStart)break;g=y.content}for(let g=f-1;g>=0;g--){let v=u[g],y=r1e(v.type);if(y&&!v.sameMarkup(o.node(Math.abs(a)-1)))f=g;else if(y||!v.type.isTextblock)break}for(let g=r.openStart;g>=0;g--){let v=(g+f+1)%(r.openStart+1),y=u[v];if(y)for(let w=0;w=0&&(e.replace(t,n,r),!(e.steps.length>p));g--){let v=s[g];v<0||(t=o.before(v),n=i.after(v))}}function g7(e,t,n,r,o){if(tr){let i=o.contentMatchAt(0),s=i.fillBefore(e).append(e);e=s.append(i.matchFragment(s).fillBefore(se.empty,!0))}return e}function i1e(e,t,n,r){if(!r.isInline&&t==n&&e.doc.resolve(t).parent.content.size){let o=e1e(e.doc,t,r.type);o!=null&&(t=n=o)}e.replaceRange(t,n,new ye(se.from(r),0,0))}function s1e(e,t,n){let r=e.doc.resolve(t),o=e.doc.resolve(n),i=v7(r,o);for(let s=0;s0&&(c||r.node(a-1).canReplace(r.index(a-1),o.indexAfter(a-1))))return e.delete(r.before(a),o.after(a))}for(let s=1;s<=r.depth&&s<=o.depth;s++)if(t-r.start(s)==r.depth-s&&n>r.end(s)&&o.end(s)-n!=o.depth-s)return e.delete(r.before(s),n);e.delete(t,n)}function v7(e,t){let n=[],r=Math.min(e.depth,t.depth);for(let o=r;o>=0;o--){let i=e.start(o);if(it.pos+(t.depth-o)||e.node(o).type.spec.isolating||t.node(o).type.spec.isolating)break;(i==t.start(o)||o==e.depth&&o==t.depth&&e.parent.inlineContent&&t.parent.inlineContent&&o&&t.start(o-1)==i-1)&&n.push(o)}return n}class Kc extends sr{constructor(t,n,r){super(),this.pos=t,this.attr=n,this.value=r}apply(t){let n=t.nodeAt(this.pos);if(!n)return cn.fail("No node at attribute step's position");let r=Object.create(null);for(let i in n.attrs)r[i]=n.attrs[i];r[this.attr]=this.value;let o=n.type.create(r,null,n.marks);return cn.fromReplace(t,this.pos,this.pos+1,new ye(se.from(o),0,n.isLeaf?0:1))}getMap(){return co.empty}invert(t){return new Kc(this.pos,this.attr,t.nodeAt(this.pos).attrs[this.attr])}map(t){let n=t.mapResult(this.pos,1);return n.deletedAfter?null:new Kc(n.pos,this.attr,this.value)}toJSON(){return{stepType:"attr",pos:this.pos,attr:this.attr,value:this.value}}static fromJSON(t,n){if(typeof n.pos!="number"||typeof n.attr!="string")throw new RangeError("Invalid input for AttrStep.fromJSON");return new Kc(n.pos,n.attr,n.value)}}sr.jsonID("attr",Kc);class vf extends sr{constructor(t,n){super(),this.attr=t,this.value=n}apply(t){let n=Object.create(null);for(let o in t.attrs)n[o]=t.attrs[o];n[this.attr]=this.value;let r=t.type.create(n,t.content,t.marks);return cn.ok(r)}getMap(){return co.empty}invert(t){return new vf(this.attr,t.attrs[this.attr])}map(t){return this}toJSON(){return{stepType:"docAttr",attr:this.attr,value:this.value}}static fromJSON(t,n){if(typeof n.attr!="string")throw new RangeError("Invalid input for DocAttrStep.fromJSON");return new vf(n.attr,n.value)}}sr.jsonID("docAttr",vf);let hu=class extends Error{};hu=function e(t){let n=Error.call(this,t);return n.__proto__=e.prototype,n};hu.prototype=Object.create(Error.prototype);hu.prototype.constructor=hu;hu.prototype.name="TransformError";class y7{constructor(t){this.doc=t,this.steps=[],this.docs=[],this.mapping=new Gc}get before(){return this.docs.length?this.docs[0]:this.doc}step(t){let n=this.maybeStep(t);if(n.failed)throw new hu(n.failed);return this}maybeStep(t){let n=t.apply(this.doc);return n.failed||this.addStep(t,n.doc),n}get docChanged(){return this.steps.length>0}addStep(t,n){this.docs.push(this.doc),this.steps.push(t),this.mapping.appendMap(t.getMap()),this.doc=n}replace(t,n=t,r=ye.empty){let o=qP(this.doc,t,n,r);return o&&this.step(o),this}replaceWith(t,n,r){return this.replace(t,n,new ye(se.from(r),0,0))}delete(t,n){return this.replace(t,n,ye.empty)}insert(t,n){return this.replaceWith(t,t,n)}replaceRange(t,n,r){return o1e(this,t,n,r),this}replaceRangeWith(t,n,r){return i1e(this,t,n,r),this}deleteRange(t,n){return s1e(this,t,n),this}lift(t,n){return U0e(this,t,n),this}join(t,n=1){return Q0e(this,t,n),this}wrap(t,n){return Y0e(this,t,n),this}setBlockType(t,n=t,r,o=null){return K0e(this,t,n,r,o),this}setNodeMarkup(t,n,r=null,o){return J0e(this,t,n,r,o),this}setNodeAttribute(t,n,r){return this.step(new Kc(t,n,r)),this}setDocAttribute(t,n){return this.step(new vf(t,n)),this}addNodeMark(t,n){return this.step(new ta(t,n)),this}removeNodeMark(t,n){if(!(n instanceof wt)){let r=this.doc.nodeAt(t);if(!r)throw new RangeError("No node at position "+t);if(n=n.isInSet(r.marks),!n)return this}return this.step(new pu(t,n)),this}split(t,n=1,r){return X0e(this,t,n,r),this}addMark(t,n,r){return F0e(this,t,n,r),this}removeMark(t,n,r){return V0e(this,t,n,r),this}clearIncompatible(t,n,r){return H0e(this,t,n,r),this}}const nw=Object.create(null);class Ze{constructor(t,n,r){this.$anchor=t,this.$head=n,this.ranges=r||[new a1e(t.min(n),t.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 t=this.ranges;for(let n=0;n=0;i--){let s=n<0?hc(t.node(0),t.node(i),t.before(i+1),t.index(i),n,r):hc(t.node(0),t.node(i),t.after(i+1),t.index(i)+1,n,r);if(s)return s}return null}static near(t,n=1){return this.findFrom(t,n)||this.findFrom(t,-n)||new Qo(t.node(0))}static atStart(t){return hc(t,t,0,0,1)||new Qo(t)}static atEnd(t){return hc(t,t,t.content.size,t.childCount,-1)||new Qo(t)}static fromJSON(t,n){if(!n||!n.type)throw new RangeError("Invalid input for Selection.fromJSON");let r=nw[n.type];if(!r)throw new RangeError(`No selection type ${n.type} defined`);return r.fromJSON(t,n)}static jsonID(t,n){if(t in nw)throw new RangeError("Duplicate use of selection JSON ID "+t);return nw[t]=n,n.prototype.jsonID=t,n}getBookmark(){return Ve.between(this.$anchor,this.$head).getBookmark()}}Ze.prototype.visible=!0;class a1e{constructor(t,n){this.$from=t,this.$to=n}}let PT=!1;function OT(e){!PT&&!e.parent.inlineContent&&(PT=!0,console.warn("TextSelection endpoint not pointing into a node with inline content ("+e.parent.type.name+")"))}class Ve extends Ze{constructor(t,n=t){OT(t),OT(n),super(t,n)}get $cursor(){return this.$anchor.pos==this.$head.pos?this.$head:null}map(t,n){let r=t.resolve(n.map(this.head));if(!r.parent.inlineContent)return Ze.near(r);let o=t.resolve(n.map(this.anchor));return new Ve(o.parent.inlineContent?o:r,r)}replace(t,n=ye.empty){if(super.replace(t,n),n==ye.empty){let r=this.$from.marksAcross(this.$to);r&&t.ensureMarks(r)}}eq(t){return t instanceof Ve&&t.anchor==this.anchor&&t.head==this.head}getBookmark(){return new G0(this.anchor,this.head)}toJSON(){return{type:"text",anchor:this.anchor,head:this.head}}static fromJSON(t,n){if(typeof n.anchor!="number"||typeof n.head!="number")throw new RangeError("Invalid input for TextSelection.fromJSON");return new Ve(t.resolve(n.anchor),t.resolve(n.head))}static create(t,n,r=n){let o=t.resolve(n);return new this(o,r==n?o:t.resolve(r))}static between(t,n,r){let o=t.pos-n.pos;if((!r||o)&&(r=o>=0?1:-1),!n.parent.inlineContent){let i=Ze.findFrom(n,r,!0)||Ze.findFrom(n,-r,!0);if(i)n=i.$head;else return Ze.near(n,r)}return t.parent.inlineContent||(o==0?t=n:(t=(Ze.findFrom(t,-r,!0)||Ze.findFrom(t,r,!0)).$anchor,t.pos0?0:1);o>0?s=0;s+=o){let a=t.child(s);if(a.isAtom){if(!i&&Le.isSelectable(a))return Le.create(e,n-(o<0?a.nodeSize:0))}else{let c=hc(e,a,n+o,o<0?a.childCount:0,o,i);if(c)return c}n+=a.nodeSize*o}return null}function CT(e,t,n){let r=e.steps.length-1;if(r{s==null&&(s=f)}),e.setSelection(Ze.near(e.doc.resolve(s),n))}const kT=1,lh=2,ET=4;class c1e extends y7{constructor(t){super(t.doc),this.curSelectionFor=0,this.updated=0,this.meta=Object.create(null),this.time=Date.now(),this.curSelection=t.selection,this.storedMarks=t.storedMarks}get selection(){return this.curSelectionFor0}setStoredMarks(t){return this.storedMarks=t,this.updated|=lh,this}ensureMarks(t){return wt.sameSet(this.storedMarks||this.selection.$from.marks(),t)||this.setStoredMarks(t),this}addStoredMark(t){return this.ensureMarks(t.addToSet(this.storedMarks||this.selection.$head.marks()))}removeStoredMark(t){return this.ensureMarks(t.removeFromSet(this.storedMarks||this.selection.$head.marks()))}get storedMarksSet(){return(this.updated&lh)>0}addStep(t,n){super.addStep(t,n),this.updated=this.updated&~lh,this.storedMarks=null}setTime(t){return this.time=t,this}replaceSelection(t){return this.selection.replace(this,t),this}replaceSelectionWith(t,n=!0){let r=this.selection;return n&&(t=t.mark(this.storedMarks||(r.empty?r.$from.marks():r.$from.marksAcross(r.$to)||wt.none))),r.replaceWith(this,t),this}deleteSelection(){return this.selection.replace(this),this}insertText(t,n,r){let o=this.doc.type.schema;if(n==null)return t?this.replaceSelectionWith(o.text(t),!0):this.deleteSelection();{if(r==null&&(r=n),r=r??n,!t)return this.deleteRange(n,r);let i=this.storedMarks;if(!i){let s=this.doc.resolve(n);i=r==n?s.marks():s.marksAcross(this.doc.resolve(r))}return this.replaceRangeWith(n,r,o.text(t,i)),this.selection.empty||this.setSelection(Ze.near(this.selection.$to)),this}}setMeta(t,n){return this.meta[typeof t=="string"?t:t.key]=n,this}getMeta(t){return this.meta[typeof t=="string"?t:t.key]}get isGeneric(){for(let t in this.meta)return!1;return!0}scrollIntoView(){return this.updated|=ET,this}get scrolledIntoView(){return(this.updated&ET)>0}}function $T(e,t){return!t||!e?e:e.bind(t)}class _d{constructor(t,n,r){this.name=t,this.init=$T(n.init,r),this.apply=$T(n.apply,r)}}const u1e=[new _d("doc",{init(e){return e.doc||e.schema.topNodeType.createAndFill()},apply(e){return e.doc}}),new _d("selection",{init(e,t){return e.selection||Ze.atStart(t.doc)},apply(e){return e.selection}}),new _d("storedMarks",{init(e){return e.storedMarks||null},apply(e,t,n,r){return r.selection.$cursor?e.storedMarks:null}}),new _d("scrollToSelection",{init(){return 0},apply(e,t){return e.scrolledIntoView?t+1:t}})];class rw{constructor(t,n){this.schema=t,this.plugins=[],this.pluginsByKey=Object.create(null),this.fields=u1e.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 _d(r.key,r.spec.state,r))})}}class Mc{constructor(t){this.config=t}get schema(){return this.config.schema}get plugins(){return this.config.plugins}apply(t){return this.applyTransaction(t).state}filterTransaction(t,n=-1){for(let r=0;rr.toJSON())),t&&typeof t=="object")for(let r in t){if(r=="doc"||r=="selection")throw new RangeError("The JSON fields `doc` and `selection` are reserved");let o=t[r],i=o.spec.state;i&&i.toJSON&&(n[r]=i.toJSON.call(o,this[o.key]))}return n}static fromJSON(t,n,r){if(!n)throw new RangeError("Invalid input for EditorState.fromJSON");if(!t.schema)throw new RangeError("Required config field 'schema' missing");let o=new rw(t.schema,t.plugins),i=new Mc(o);return o.fields.forEach(s=>{if(s.name=="doc")i.doc=xl.fromJSON(t.schema,n.doc);else if(s.name=="selection")i.selection=Ze.fromJSON(i.doc,n.selection);else if(s.name=="storedMarks")n.storedMarks&&(i.storedMarks=n.storedMarks.map(t.schema.markFromJSON));else{if(r)for(let a in r){let c=r[a],u=c.spec.state;if(c.key==s.name&&u&&u.fromJSON&&Object.prototype.hasOwnProperty.call(n,a)){i[s.name]=u.fromJSON.call(c,t,n[a],i);return}}i[s.name]=s.init(t,i)}}),i}}function _7(e,t,n){for(let r in e){let o=e[r];o instanceof Function?o=o.bind(t):r=="handleDOMEvents"&&(o=_7(o,t,{})),n[r]=o}return n}class Zr{constructor(t){this.spec=t,this.props={},t.props&&_7(t.props,this,this.props),this.key=t.key?t.key.key:w7("plugin")}getState(t){return t[this.key]}}const ow=Object.create(null);function w7(e){return e in ow?e+"$"+ ++ow[e]:(ow[e]=0,e+"$")}class Ai{constructor(t="key"){this.key=w7(t)}get(t){return t.config.pluginsByKey[this.key]}getState(t){return t[this.key]}}const hr=function(e){for(var t=0;;t++)if(e=e.previousSibling,!e)return t},yf=function(e){let t=e.assignedSlot||e.parentNode;return t&&t.nodeType==11?t.host:t};let MT=null;const es=function(e,t,n){let r=MT||(MT=document.createRange());return r.setEnd(e,n??e.nodeValue.length),r.setStart(e,t||0),r},Il=function(e,t,n,r){return n&&(NT(e,t,n,r,-1)||NT(e,t,n,r,1))},d1e=/^(img|br|input|textarea|hr)$/i;function NT(e,t,n,r,o){for(;;){if(e==n&&t==r)return!0;if(t==(o<0?0:ki(e))){let i=e.parentNode;if(!i||i.nodeType!=1||XP(e)||d1e.test(e.nodeName)||e.contentEditable=="false")return!1;t=hr(e)+(o<0?0:1),e=i}else if(e.nodeType==1){if(e=e.childNodes[t+(o<0?-1:0)],e.contentEditable=="false")return!1;t=o<0?ki(e):0}else return!1}}function ki(e){return e.nodeType==3?e.nodeValue.length:e.childNodes.length}function f1e(e,t,n){for(let r=t==0,o=t==ki(e);r||o;){if(e==n)return!0;let i=hr(e);if(e=e.parentNode,!e)return!1;r=r&&i==0,o=o&&i==ki(e)}}function XP(e){let t;for(let n=e;n&&!(t=n.pmViewDesc);n=n.parentNode);return t&&t.node&&t.node.isBlock&&(t.dom==e||t.contentDOM==e)}const Y0=function(e){return e.focusNode&&Il(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset)};function tl(e,t){let n=document.createEvent("Event");return n.initEvent("keydown",!0,!0),n.keyCode=e,n.key=n.code=t,n}function p1e(e){let t=e.activeElement;for(;t&&t.shadowRoot;)t=t.shadowRoot.activeElement;return t}function h1e(e,t,n){if(e.caretPositionFromPoint)try{let r=e.caretPositionFromPoint(t,n);if(r)return{node:r.offsetNode,offset:r.offset}}catch{}if(e.caretRangeFromPoint){let r=e.caretRangeFromPoint(t,n);if(r)return{node:r.startContainer,offset:r.startOffset}}}const Di=typeof navigator<"u"?navigator:null,TT=typeof document<"u"?document:null,Da=Di&&Di.userAgent||"",ux=/Edge\/(\d+)/.exec(Da),b7=/MSIE \d/.exec(Da),dx=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(Da),Hr=!!(b7||dx||ux),va=b7?document.documentMode:dx?+dx[1]:ux?+ux[1]:0,oi=!Hr&&/gecko\/(\d+)/i.test(Da);oi&&+(/Firefox\/(\d+)/.exec(Da)||[0,0])[1];const fx=!Hr&&/Chrome\/(\d+)/.exec(Da),nr=!!fx,m1e=fx?+fx[1]:0,yr=!Hr&&!!Di&&/Apple Computer/.test(Di.vendor),mu=yr&&(/Mobile\/\w+/.test(Da)||!!Di&&Di.maxTouchPoints>2),$o=mu||(Di?/Mac/.test(Di.platform):!1),g1e=Di?/Win/.test(Di.platform):!1,Ko=/Android \d/.test(Da),qf=!!TT&&"webkitFontSmoothing"in TT.documentElement.style,v1e=qf?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0;function y1e(e){return{left:0,right:e.documentElement.clientWidth,top:0,bottom:e.documentElement.clientHeight}}function qi(e,t){return typeof e=="number"?e:e[t]}function _1e(e){let t=e.getBoundingClientRect(),n=t.width/e.offsetWidth||1,r=t.height/e.offsetHeight||1;return{left:t.left,right:t.left+e.clientWidth*n,top:t.top,bottom:t.top+e.clientHeight*r}}function IT(e,t,n){let r=e.someProp("scrollThreshold")||0,o=e.someProp("scrollMargin")||5,i=e.dom.ownerDocument;for(let s=n||e.dom;s;s=yf(s)){if(s.nodeType!=1)continue;let a=s,c=a==i.body,u=c?y1e(i):_1e(a),f=0,p=0;if(t.topu.bottom-qi(r,"bottom")&&(p=t.bottom-t.top>u.bottom-u.top?t.top+qi(o,"top")-u.top:t.bottom-u.bottom+qi(o,"bottom")),t.leftu.right-qi(r,"right")&&(f=t.right-u.right+qi(o,"right")),f||p)if(c)i.defaultView.scrollBy(f,p);else{let g=a.scrollLeft,v=a.scrollTop;p&&(a.scrollTop+=p),f&&(a.scrollLeft+=f);let y=a.scrollLeft-g,w=a.scrollTop-v;t={left:t.left-y,top:t.top-w,right:t.right-y,bottom:t.bottom-w}}if(c||/^(fixed|sticky)$/.test(getComputedStyle(s).position))break}}function w1e(e){let t=e.dom.getBoundingClientRect(),n=Math.max(0,t.top),r,o;for(let i=(t.left+t.right)/2,s=n+1;s=n-20){r=a,o=c.top;break}}return{refDOM:r,refTop:o,stack:x7(e.dom)}}function x7(e){let t=[],n=e.ownerDocument;for(let r=e;r&&(t.push({dom:r,top:r.scrollTop,left:r.scrollLeft}),e!=n);r=yf(r));return t}function b1e({refDOM:e,refTop:t,stack:n}){let r=e?e.getBoundingClientRect().top:0;S7(n,r==0?0:r-t)}function S7(e,t){for(let n=0;n=a){s=Math.max(y.bottom,s),a=Math.min(y.top,a);let w=y.left>t.left?y.left-t.left:y.right=(y.left+y.right)/2?1:0));continue}}else y.top>t.top&&!c&&y.left<=t.left&&y.right>=t.left&&(c=f,u={left:Math.max(y.left,Math.min(y.right,t.left)),top:y.top});!n&&(t.left>=y.right&&t.top>=y.top||t.left>=y.left&&t.top>=y.bottom)&&(i=p+1)}}return!n&&c&&(n=c,o=u,r=0),n&&n.nodeType==3?S1e(n,o):!n||r&&n.nodeType==1?{node:e,offset:i}:P7(n,o)}function S1e(e,t){let n=e.nodeValue.length,r=document.createRange();for(let o=0;o=(i.left+i.right)/2?1:0)}}return{node:e,offset:0}}function QP(e,t){return e.left>=t.left-1&&e.left<=t.right+1&&e.top>=t.top-1&&e.top<=t.bottom+1}function P1e(e,t){let n=e.parentNode;return n&&/^li$/i.test(n.nodeName)&&t.left(s.left+s.right)/2?1:-1}return e.docView.posFromDOM(r,o,i)}function C1e(e,t,n,r){let o=-1;for(let i=t,s=!1;i!=e.dom;){let a=e.docView.nearestDesc(i,!0);if(!a)return null;if(a.dom.nodeType==1&&(a.node.isBlock&&a.parent&&!s||!a.contentDOM)){let c=a.dom.getBoundingClientRect();if(a.node.isBlock&&a.parent&&!s&&(s=!0,c.left>r.left||c.top>r.top?o=a.posBefore:(c.right-1?o:e.docView.posFromDOM(t,n,-1)}function O7(e,t,n){let r=e.childNodes.length;if(r&&n.topt.top&&o++}let u;qf&&o&&r.nodeType==1&&(u=r.childNodes[o-1]).nodeType==1&&u.contentEditable=="false"&&u.getBoundingClientRect().top>=t.top&&o--,r==e.dom&&o==r.childNodes.length-1&&r.lastChild.nodeType==1&&t.top>r.lastChild.getBoundingClientRect().bottom?a=e.state.doc.content.size:(o==0||r.nodeType!=1||r.childNodes[o-1].nodeName!="BR")&&(a=C1e(e,r,o,t))}a==null&&(a=O1e(e,s,t));let c=e.docView.nearestDesc(s,!0);return{pos:a,inside:c?c.posAtStart-c.border:-1}}function jT(e){return e.top=0&&o==r.nodeValue.length?(c--,f=1):n<0?c--:u++,ud(As(es(r,c,u),f),f<0)}if(!e.state.doc.resolve(t-(i||0)).parent.inlineContent){if(i==null&&o&&(n<0||o==ki(r))){let c=r.childNodes[o-1];if(c.nodeType==1)return iw(c.getBoundingClientRect(),!1)}if(i==null&&o=0)}if(i==null&&o&&(n<0||o==ki(r))){let c=r.childNodes[o-1],u=c.nodeType==3?es(c,ki(c)-(s?0:1)):c.nodeType==1&&(c.nodeName!="BR"||!c.nextSibling)?c:null;if(u)return ud(As(u,1),!1)}if(i==null&&o=0)}function ud(e,t){if(e.width==0)return e;let n=t?e.left:e.right;return{top:e.top,bottom:e.bottom,left:n,right:n}}function iw(e,t){if(e.height==0)return e;let n=t?e.top:e.bottom;return{top:n,bottom:n,left:e.left,right:e.right}}function k7(e,t,n){let r=e.state,o=e.root.activeElement;r!=t&&e.updateState(t),o!=e.dom&&e.focus();try{return n()}finally{r!=t&&e.updateState(r),o!=e.dom&&o&&o.focus()}}function $1e(e,t,n){let r=t.selection,o=n=="up"?r.$from:r.$to;return k7(e,t,()=>{let{node:i}=e.docView.domFromPos(o.pos,n=="up"?-1:1);for(;;){let a=e.docView.nearestDesc(i,!0);if(!a)break;if(a.node.isBlock){i=a.contentDOM||a.dom;break}i=a.dom.parentNode}let s=C7(e,o.pos,1);for(let a=i.firstChild;a;a=a.nextSibling){let c;if(a.nodeType==1)c=a.getClientRects();else if(a.nodeType==3)c=es(a,0,a.nodeValue.length).getClientRects();else continue;for(let u=0;uf.top+1&&(n=="up"?s.top-f.top>(f.bottom-s.top)*2:f.bottom-s.bottom>(s.bottom-f.top)*2))return!1}}return!0})}const M1e=/[\u0590-\u08ac]/;function N1e(e,t,n){let{$head:r}=t.selection;if(!r.parent.isTextblock)return!1;let o=r.parentOffset,i=!o,s=o==r.parent.content.size,a=e.domSelection();return!M1e.test(r.parent.textContent)||!a.modify?n=="left"||n=="backward"?i:s:k7(e,t,()=>{let{focusNode:c,focusOffset:u,anchorNode:f,anchorOffset:p}=e.domSelectionRange(),g=a.caretBidiLevel;a.modify("move",n,"character");let v=r.depth?e.docView.domAfterPos(r.before()):e.dom,{focusNode:y,focusOffset:w}=e.domSelectionRange(),P=y&&!v.contains(y.nodeType==1?y:y.parentNode)||c==y&&u==w;try{a.collapse(f,p),c&&(c!=f||u!=p)&&a.extend&&a.extend(c,u)}catch{}return g!=null&&(a.caretBidiLevel=g),P})}let LT=null,DT=null,RT=!1;function T1e(e,t,n){return LT==t&&DT==n?RT:(LT=t,DT=n,RT=n=="up"||n=="down"?$1e(e,t,n):N1e(e,t,n))}const Do=0,zT=1,dl=2,Ri=3;class Jf{constructor(t,n,r,o){this.parent=t,this.children=n,this.dom=r,this.contentDOM=o,this.dirty=Do,r.pmViewDesc=this}matchesWidget(t){return!1}matchesMark(t){return!1}matchesNode(t,n,r){return!1}matchesHack(t){return!1}parseRule(){return null}stopEvent(t){return!1}get size(){let t=0;for(let n=0;nhr(this.contentDOM);else if(this.contentDOM&&this.contentDOM!=this.dom&&this.dom.contains(this.contentDOM))o=t.compareDocumentPosition(this.contentDOM)&2;else if(this.dom.firstChild){if(n==0)for(let i=t;;i=i.parentNode){if(i==this.dom){o=!1;break}if(i.previousSibling)break}if(o==null&&n==t.childNodes.length)for(let i=t;;i=i.parentNode){if(i==this.dom){o=!0;break}if(i.nextSibling)break}}return o??r>0?this.posAtEnd:this.posAtStart}nearestDesc(t,n=!1){for(let r=!0,o=t;o;o=o.parentNode){let i=this.getDesc(o),s;if(i&&(!n||i.node))if(r&&(s=i.nodeDOM)&&!(s.nodeType==1?s.contains(t.nodeType==1?t:t.parentNode):s==t))r=!1;else return i}}getDesc(t){let n=t.pmViewDesc;for(let r=n;r;r=r.parent)if(r==this)return n}posFromDOM(t,n,r){for(let o=t;o;o=o.parentNode){let i=this.getDesc(o);if(i)return i.localPosFromDOM(t,n,r)}return-1}descAt(t){for(let n=0,r=0;nt||s instanceof $7){o=t-i;break}i=a}if(o)return this.children[r].domFromPos(o-this.children[r].border,n);for(let i;r&&!(i=this.children[r-1]).size&&i instanceof E7&&i.side>=0;r--);if(n<=0){let i,s=!0;for(;i=r?this.children[r-1]:null,!(!i||i.dom.parentNode==this.contentDOM);r--,s=!1);return i&&n&&s&&!i.border&&!i.domAtom?i.domFromPos(i.size,n):{node:this.contentDOM,offset:i?hr(i.dom)+1:0}}else{let i,s=!0;for(;i=r=f&&n<=u-c.border&&c.node&&c.contentDOM&&this.contentDOM.contains(c.contentDOM))return c.parseRange(t,n,f);t=s;for(let p=a;p>0;p--){let g=this.children[p-1];if(g.size&&g.dom.parentNode==this.contentDOM&&!g.emptyChildAt(1)){o=hr(g.dom)+1;break}t-=g.size}o==-1&&(o=0)}if(o>-1&&(u>n||a==this.children.length-1)){n=u;for(let f=a+1;fv&&sn){let v=a;a=c,c=v}let g=document.createRange();g.setEnd(c.node,c.offset),g.setStart(a.node,a.offset),u.removeAllRanges(),u.addRange(g)}}ignoreMutation(t){return!this.contentDOM&&t.type!="selection"}get contentLost(){return this.contentDOM&&this.contentDOM!=this.dom&&!this.dom.contains(this.contentDOM)}markDirty(t,n){for(let r=0,o=0;o=r:tr){let a=r+i.border,c=s-i.border;if(t>=a&&n<=c){this.dirty=t==r||n==s?dl:zT,t==a&&n==c&&(i.contentLost||i.dom.parentNode!=this.contentDOM)?i.dirty=Ri:i.markDirty(t-a,n-a);return}else i.dirty=i.dom==i.contentDOM&&i.dom.parentNode==this.contentDOM&&!i.children.length?dl:Ri}r=s}this.dirty=dl}markParentsDirty(){let t=1;for(let n=this.parent;n;n=n.parent,t++){let r=t==1?dl:zT;n.dirty{if(!i)return o;if(i.parent)return i.parent.posBeforeChild(i)})),!n.type.spec.raw){if(s.nodeType!=1){let a=document.createElement("span");a.appendChild(s),s=a}s.contentEditable="false",s.classList.add("ProseMirror-widget")}super(t,[],s,null),this.widget=n,this.widget=n,i=this}matchesWidget(t){return this.dirty==Do&&t.type.eq(this.widget.type)}parseRule(){return{ignore:!0}}stopEvent(t){let n=this.widget.spec.stopEvent;return n?n(t):!1}ignoreMutation(t){return t.type!="selection"||this.widget.spec.ignoreSelection}destroy(){this.widget.type.destroy(this.dom),super.destroy()}get domAtom(){return!0}get side(){return this.widget.type.side}}class I1e extends Jf{constructor(t,n,r,o){super(t,[],n,null),this.textDOM=r,this.text=o}get size(){return this.text.length}localPosFromDOM(t,n){return t!=this.textDOM?this.posAtStart+(n?this.size:0):this.posAtStart+n}domFromPos(t){return{node:this.textDOM,offset:t}}ignoreMutation(t){return t.type==="characterData"&&t.target.nodeValue==t.oldValue}}class jl extends Jf{constructor(t,n,r,o){super(t,[],r,o),this.mark=n}static create(t,n,r,o){let i=o.nodeViews[n.type.name],s=i&&i(n,o,r);return(!s||!s.dom)&&(s=$i.renderSpec(document,n.type.spec.toDOM(n,r))),new jl(t,n,s.dom,s.contentDOM||s.dom)}parseRule(){return this.dirty&Ri||this.mark.type.spec.reparseInView?null:{mark:this.mark.type.name,attrs:this.mark.attrs,contentElement:this.contentDOM}}matchesMark(t){return this.dirty!=Ri&&this.mark.eq(t)}markDirty(t,n){if(super.markDirty(t,n),this.dirty!=Do){let r=this.parent;for(;!r.node;)r=r.parent;r.dirty0&&(i=mx(i,0,t,r));for(let a=0;a{if(!c)return s;if(c.parent)return c.parent.posBeforeChild(c)},r,o),f=u&&u.dom,p=u&&u.contentDOM;if(n.isText){if(!f)f=document.createTextNode(n.text);else if(f.nodeType!=3)throw new RangeError("Text must be rendered as a DOM text node")}else f||({dom:f,contentDOM:p}=$i.renderSpec(document,n.type.spec.toDOM(n)));!p&&!n.isText&&f.nodeName!="BR"&&(f.hasAttribute("contenteditable")||(f.contentEditable="false"),n.type.spec.draggable&&(f.draggable=!0));let g=f;return f=T7(f,r,n),u?c=new j1e(t,n,r,o,f,p||null,g,u,i,s+1):n.isText?new K0(t,n,r,o,f,g,i):new ya(t,n,r,o,f,p||null,g,i,s+1)}parseRule(){if(this.node.type.spec.reparseInView)return null;let t={node:this.node.type.name,attrs:this.node.attrs};if(this.node.type.whitespace=="pre"&&(t.preserveWhitespace="full"),!this.contentDOM)t.getContent=()=>this.node.content;else if(!this.contentLost)t.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)){t.contentElement=r.dom.parentNode;break}}t.contentElement||(t.getContent=()=>se.empty)}return t}matchesNode(t,n,r){return this.dirty==Do&&t.eq(this.node)&&hx(n,this.outerDeco)&&r.eq(this.innerDeco)}get size(){return this.node.nodeSize}get border(){return this.node.isLeaf?0:1}updateChildren(t,n){let r=this.node.inlineContent,o=n,i=t.composing?this.localCompositionInfo(t,n):null,s=i&&i.pos>-1?i:null,a=i&&i.pos<0,c=new D1e(this,s&&s.node,t);A1e(this.node,this.innerDeco,(u,f,p)=>{u.spec.marks?c.syncToMarks(u.spec.marks,r,t):u.type.side>=0&&!p&&c.syncToMarks(f==this.node.childCount?wt.none:this.node.child(f).marks,r,t),c.placeWidget(u,t,o)},(u,f,p,g)=>{c.syncToMarks(u.marks,r,t);let v;c.findNodeMatch(u,f,p,g)||a&&t.state.selection.from>o&&t.state.selection.to-1&&c.updateNodeAt(u,f,p,v,t)||c.updateNextNode(u,f,p,t,g,o)||c.addNode(u,f,p,t,o),o+=u.nodeSize}),c.syncToMarks([],r,t),this.node.isTextblock&&c.addTextblockHacks(),c.destroyRest(),(c.changed||this.dirty==dl)&&(s&&this.protectLocalComposition(t,s),M7(this.contentDOM,this.children,t),mu&&B1e(this.dom))}localCompositionInfo(t,n){let{from:r,to:o}=t.state.selection;if(!(t.state.selection instanceof Ve)||rn+this.node.content.size)return null;let i=t.domSelectionRange(),s=F1e(i.focusNode,i.focusOffset);if(!s||!this.dom.contains(s.parentNode))return null;if(this.node.inlineContent){let a=s.nodeValue,c=V1e(this.node.content,a,r-n,o-n);return c<0?null:{node:s,pos:c,text:a}}else return{node:s,pos:-1,text:""}}protectLocalComposition(t,{node:n,pos:r,text:o}){if(this.getDesc(n))return;let i=n;for(;i.parentNode!=this.contentDOM;i=i.parentNode){for(;i.previousSibling;)i.parentNode.removeChild(i.previousSibling);for(;i.nextSibling;)i.parentNode.removeChild(i.nextSibling);i.pmViewDesc&&(i.pmViewDesc=void 0)}let s=new I1e(this,i,n,o);t.input.compositionNodes.push(s),this.children=mx(this.children,r,r+o.length,t,s)}update(t,n,r,o){return this.dirty==Ri||!t.sameMarkup(this.node)?!1:(this.updateInner(t,n,r,o),!0)}updateInner(t,n,r,o){this.updateOuterDeco(n),this.node=t,this.innerDeco=r,this.contentDOM&&this.updateChildren(o,this.posAtStart),this.dirty=Do}updateOuterDeco(t){if(hx(t,this.outerDeco))return;let n=this.nodeDOM.nodeType!=1,r=this.dom;this.dom=N7(this.dom,this.nodeDOM,px(this.outerDeco,this.node,n),px(t,this.node,n)),this.dom!=r&&(r.pmViewDesc=void 0,this.dom.pmViewDesc=this),this.outerDeco=t}selectNode(){this.nodeDOM.nodeType==1&&this.nodeDOM.classList.add("ProseMirror-selectednode"),(this.contentDOM||!this.node.type.spec.draggable)&&(this.dom.draggable=!0)}deselectNode(){this.nodeDOM.nodeType==1&&this.nodeDOM.classList.remove("ProseMirror-selectednode"),(this.contentDOM||!this.node.type.spec.draggable)&&this.dom.removeAttribute("draggable")}get domAtom(){return this.node.isAtom}}function AT(e,t,n,r,o){T7(r,t,e);let i=new ya(void 0,e,t,n,r,r,r,o,0);return i.contentDOM&&i.updateChildren(o,0),i}class K0 extends ya{constructor(t,n,r,o,i,s,a){super(t,n,r,o,i,null,s,a,0)}parseRule(){let t=this.nodeDOM.parentNode;for(;t&&t!=this.dom&&!t.pmIsDeco;)t=t.parentNode;return{skip:t||!0}}update(t,n,r,o){return this.dirty==Ri||this.dirty!=Do&&!this.inParent()||!t.sameMarkup(this.node)?!1:(this.updateOuterDeco(n),(this.dirty!=Do||t.text!=this.node.text)&&t.text!=this.nodeDOM.nodeValue&&(this.nodeDOM.nodeValue=t.text,o.trackWrites==this.nodeDOM&&(o.trackWrites=null)),this.node=t,this.dirty=Do,!0)}inParent(){let t=this.parent.contentDOM;for(let n=this.nodeDOM;n;n=n.parentNode)if(n==t)return!0;return!1}domFromPos(t){return{node:this.nodeDOM,offset:t}}localPosFromDOM(t,n,r){return t==this.nodeDOM?this.posAtStart+Math.min(n,this.node.text.length):super.localPosFromDOM(t,n,r)}ignoreMutation(t){return t.type!="characterData"&&t.type!="selection"}slice(t,n,r){let o=this.node.cut(t,n),i=document.createTextNode(o.text);return new K0(this.parent,o,this.outerDeco,this.innerDeco,i,i,r)}markDirty(t,n){super.markDirty(t,n),this.dom!=this.nodeDOM&&(t==0||n==this.nodeDOM.nodeValue.length)&&(this.dirty=Ri)}get domAtom(){return!1}}class $7 extends Jf{parseRule(){return{ignore:!0}}matchesHack(t){return this.dirty==Do&&this.dom.nodeName==t}get domAtom(){return!0}get ignoreForCoords(){return this.dom.nodeName=="IMG"}}class j1e extends ya{constructor(t,n,r,o,i,s,a,c,u,f){super(t,n,r,o,i,s,a,u,f),this.spec=c}update(t,n,r,o){if(this.dirty==Ri)return!1;if(this.spec.update){let i=this.spec.update(t,n,r);return i&&this.updateInner(t,n,r,o),i}else return!this.contentDOM&&!t.isLeaf?!1:super.update(t,n,r,o)}selectNode(){this.spec.selectNode?this.spec.selectNode():super.selectNode()}deselectNode(){this.spec.deselectNode?this.spec.deselectNode():super.deselectNode()}setSelection(t,n,r,o){this.spec.setSelection?this.spec.setSelection(t,n,r):super.setSelection(t,n,r,o)}destroy(){this.spec.destroy&&this.spec.destroy(),super.destroy()}stopEvent(t){return this.spec.stopEvent?this.spec.stopEvent(t):!1}ignoreMutation(t){return this.spec.ignoreMutation?this.spec.ignoreMutation(t):super.ignoreMutation(t)}}function M7(e,t,n){let r=e.firstChild,o=!1;for(let i=0;i>1,s=Math.min(i,t.length);for(;o-1)a>this.index&&(this.changed=!0,this.destroyBetween(this.index,a)),this.top=this.top.children[this.index];else{let c=jl.create(this.top,t[i],n,r);this.top.children.splice(this.index,0,c),this.top=c,this.changed=!0}this.index=0,i++}}findNodeMatch(t,n,r,o){let i=-1,s;if(o>=this.preMatch.index&&(s=this.preMatch.matches[o-this.preMatch.index]).parent==this.top&&s.matchesNode(t,n,r))i=this.top.children.indexOf(s,this.index);else for(let a=this.index,c=Math.min(this.top.children.length,a+5);a0;){let a;for(;;)if(r){let u=n.children[r-1];if(u instanceof jl)n=u,r=u.children.length;else{a=u,r--;break}}else{if(n==t)break e;r=n.parent.children.indexOf(n),n=n.parent}let c=a.node;if(c){if(c!=e.child(o-1))break;--o,i.set(a,o),s.push(a)}}return{index:o,matched:i,matches:s.reverse()}}function z1e(e,t){return e.type.side-t.type.side}function A1e(e,t,n,r){let o=t.locals(e),i=0;if(o.length==0){for(let u=0;ui;)a.push(o[s++]);let y=i+g.nodeSize;if(g.isText){let P=y;s!P.inline):a.slice();r(g,w,t.forChild(i,g),v),i=y}}function B1e(e){if(e.nodeName=="UL"||e.nodeName=="OL"){let t=e.style.cssText;e.style.cssText=t+"; list-style: square !important",window.getComputedStyle(e).listStyle,e.style.cssText=t}}function F1e(e,t){for(;;){if(e.nodeType==3)return e;if(e.nodeType==1&&t>0){if(e.childNodes.length>t&&e.childNodes[t].nodeType==3)return e.childNodes[t];e=e.childNodes[t-1],t=ki(e)}else if(e.nodeType==1&&t=n){if(i>=r&&c.slice(r-t.length-a,r-a)==t)return r-t.length;let u=a=0&&u+t.length+a>=n)return a+u;if(n==r&&c.length>=r+t.length-a&&c.slice(r-a,r-a+t.length)==t)return r}}return-1}function mx(e,t,n,r,o){let i=[];for(let s=0,a=0;s=n||f<=t?i.push(c):(un&&i.push(c.slice(n-u,c.size,r)))}return i}function eO(e,t=null){let n=e.domSelectionRange(),r=e.state.doc;if(!n.focusNode)return null;let o=e.docView.nearestDesc(n.focusNode),i=o&&o.size==0,s=e.docView.posFromDOM(n.focusNode,n.focusOffset,1);if(s<0)return null;let a=r.resolve(s),c,u;if(Y0(n)){for(c=a;o&&!o.node;)o=o.parent;let f=o.node;if(o&&f.isAtom&&Le.isSelectable(f)&&o.parent&&!(f.isInline&&f1e(n.focusNode,n.focusOffset,o.dom))){let p=o.posBefore;u=new Le(s==p?a:r.resolve(p))}}else{let f=e.docView.posFromDOM(n.anchorNode,n.anchorOffset,1);if(f<0)return null;c=r.resolve(f)}if(!u){let f=t=="pointer"||e.state.selection.head{(n.anchorNode!=r||n.anchorOffset!=o)&&(t.removeEventListener("selectionchange",e.input.hideSelectionGuard),setTimeout(()=>{(!I7(e)||e.state.selection.visible)&&e.dom.classList.remove("ProseMirror-hideselection")},20))})}function W1e(e){let t=e.domSelection(),n=document.createRange(),r=e.cursorWrapper.dom,o=r.nodeName=="IMG";o?n.setEnd(r.parentNode,hr(r)+1):n.setEnd(r,0),n.collapse(!1),t.removeAllRanges(),t.addRange(n),!o&&!e.state.selection.visible&&Hr&&va<=11&&(r.disabled=!0,r.disabled=!1)}function j7(e,t){if(t instanceof Le){let n=e.docView.descAt(t.from);n!=e.lastSelectedViewDesc&&(WT(e),n&&n.selectNode(),e.lastSelectedViewDesc=n)}else WT(e)}function WT(e){e.lastSelectedViewDesc&&(e.lastSelectedViewDesc.parent&&e.lastSelectedViewDesc.deselectNode(),e.lastSelectedViewDesc=void 0)}function tO(e,t,n,r){return e.someProp("createSelectionBetween",o=>o(e,t,n))||Ve.between(t,n,r)}function UT(e){return e.editable&&!e.hasFocus()?!1:L7(e)}function L7(e){let t=e.domSelectionRange();if(!t.anchorNode)return!1;try{return e.dom.contains(t.anchorNode.nodeType==3?t.anchorNode.parentNode:t.anchorNode)&&(e.editable||e.dom.contains(t.focusNode.nodeType==3?t.focusNode.parentNode:t.focusNode))}catch{return!1}}function U1e(e){let t=e.docView.domFromPos(e.state.selection.anchor,0),n=e.domSelectionRange();return Il(t.node,t.offset,n.anchorNode,n.anchorOffset)}function gx(e,t){let{$anchor:n,$head:r}=e.selection,o=t>0?n.max(r):n.min(r),i=o.parent.inlineContent?o.depth?e.doc.resolve(t>0?o.after():o.before()):null:o;return i&&Ze.findFrom(i,t)}function nl(e,t){return e.dispatch(e.state.tr.setSelection(t).scrollIntoView()),!0}function ZT(e,t,n){let r=e.state.selection;if(r instanceof Ve){if(!r.empty||n.indexOf("s")>-1)return!1;if(e.endOfTextblock(t>0?"forward":"backward")){let o=gx(e.state,t);return o&&o instanceof Le?nl(e,o):!1}else if(!($o&&n.indexOf("m")>-1)){let o=r.$head,i=o.textOffset?null:t<0?o.nodeBefore:o.nodeAfter,s;if(!i||i.isText)return!1;let a=t<0?o.pos-i.nodeSize:o.pos;return i.isAtom||(s=e.docView.descAt(a))&&!s.contentDOM?Le.isSelectable(i)?nl(e,new Le(t<0?e.state.doc.resolve(o.pos-i.nodeSize):o)):qf?nl(e,new Ve(e.state.doc.resolve(t<0?a:a+i.nodeSize))):!1:!1}}else{if(r instanceof Le&&r.node.isInline)return nl(e,new Ve(t>0?r.$to:r.$from));{let o=gx(e.state,t);return o?nl(e,o):!1}}}function Fv(e){return e.nodeType==3?e.nodeValue.length:e.childNodes.length}function Ad(e,t){if(e.contentEditable=="false")return!0;let n=e.pmViewDesc;return n&&n.size==0&&(t<0||e.nextSibling||e.nodeName!="BR")}function dc(e,t){return t<0?Z1e(e):G1e(e)}function Z1e(e){let t=e.domSelectionRange(),n=t.focusNode,r=t.focusOffset;if(!n)return;let o,i,s=!1;for(oi&&n.nodeType==1&&r0){if(n.nodeType!=1)break;{let a=n.childNodes[r-1];if(Ad(a,-1))o=n,i=--r;else if(a.nodeType==3)n=a,r=n.nodeValue.length;else break}}else{if(D7(n))break;{let a=n.previousSibling;for(;a&&Ad(a,-1);)o=n.parentNode,i=hr(a),a=a.previousSibling;if(a)n=a,r=Fv(n);else{if(n=n.parentNode,n==e.dom)break;r=0}}}s?vx(e,n,r):o&&vx(e,o,i)}function G1e(e){let t=e.domSelectionRange(),n=t.focusNode,r=t.focusOffset;if(!n)return;let o=Fv(n),i,s;for(;;)if(r{e.state==o&&ds(e)},50)}function GT(e,t){let n=e.state.doc.resolve(t);if(!(nr||g1e)&&n.parent.inlineContent){let o=e.coordsAtPos(t);if(t>n.start()){let i=e.coordsAtPos(t-1),s=(i.top+i.bottom)/2;if(s>o.top&&s1)return i.lefto.top&&s1)return i.left>o.left?"ltr":"rtl"}}return getComputedStyle(e.dom).direction=="rtl"?"rtl":"ltr"}function YT(e,t,n){let r=e.state.selection;if(r instanceof Ve&&!r.empty||n.indexOf("s")>-1||$o&&n.indexOf("m")>-1)return!1;let{$from:o,$to:i}=r;if(!o.parent.inlineContent||e.endOfTextblock(t<0?"up":"down")){let s=gx(e.state,t);if(s&&s instanceof Le)return nl(e,s)}if(!o.parent.inlineContent){let s=t<0?o:i,a=r instanceof Qo?Ze.near(s,t):Ze.findFrom(s,t);return a?nl(e,a):!1}return!1}function KT(e,t){if(!(e.state.selection instanceof Ve))return!0;let{$head:n,$anchor:r,empty:o}=e.state.selection;if(!n.sameParent(r))return!0;if(!o)return!1;if(e.endOfTextblock(t>0?"forward":"backward"))return!0;let i=!n.textOffset&&(t<0?n.nodeBefore:n.nodeAfter);if(i&&!i.isText){let s=e.state.tr;return t<0?s.delete(n.pos-i.nodeSize,n.pos):s.delete(n.pos,n.pos+i.nodeSize),e.dispatch(s),!0}return!1}function qT(e,t,n){e.domObserver.stop(),t.contentEditable=n,e.domObserver.start()}function q1e(e){if(!yr||e.state.selection.$head.parentOffset>0)return!1;let{focusNode:t,focusOffset:n}=e.domSelectionRange();if(t&&t.nodeType==1&&n==0&&t.firstChild&&t.firstChild.contentEditable=="false"){let r=t.firstChild;qT(e,r,"true"),setTimeout(()=>qT(e,r,"false"),20)}return!1}function J1e(e){let t="";return e.ctrlKey&&(t+="c"),e.metaKey&&(t+="m"),e.altKey&&(t+="a"),e.shiftKey&&(t+="s"),t}function X1e(e,t){let n=t.keyCode,r=J1e(t);if(n==8||$o&&n==72&&r=="c")return KT(e,-1)||dc(e,-1);if(n==46&&!t.shiftKey||$o&&n==68&&r=="c")return KT(e,1)||dc(e,1);if(n==13||n==27)return!0;if(n==37||$o&&n==66&&r=="c"){let o=n==37?GT(e,e.state.selection.from)=="ltr"?-1:1:-1;return ZT(e,o,r)||dc(e,o)}else if(n==39||$o&&n==70&&r=="c"){let o=n==39?GT(e,e.state.selection.from)=="ltr"?1:-1:1;return ZT(e,o,r)||dc(e,o)}else{if(n==38||$o&&n==80&&r=="c")return YT(e,-1,r)||dc(e,-1);if(n==40||$o&&n==78&&r=="c")return q1e(e)||YT(e,1,r)||dc(e,1);if(r==($o?"m":"c")&&(n==66||n==73||n==89||n==90))return!0}return!1}function R7(e,t){e.someProp("transformCopied",v=>{t=v(t,e)});let n=[],{content:r,openStart:o,openEnd:i}=t;for(;o>1&&i>1&&r.childCount==1&&r.firstChild.childCount==1;){o--,i--;let v=r.firstChild;n.push(v.type.name,v.attrs!=v.type.defaultAttrs?v.attrs:null),r=v.content}let s=e.someProp("clipboardSerializer")||$i.fromSchema(e.state.schema),a=H7(),c=a.createElement("div");c.appendChild(s.serializeFragment(r,{document:a}));let u=c.firstChild,f,p=0;for(;u&&u.nodeType==1&&(f=V7[u.nodeName.toLowerCase()]);){for(let v=f.length-1;v>=0;v--){let y=a.createElement(f[v]);for(;c.firstChild;)y.appendChild(c.firstChild);c.appendChild(y),p++}u=c.firstChild}u&&u.nodeType==1&&u.setAttribute("data-pm-slice",`${o} ${i}${p?` -${p}`:""} ${JSON.stringify(n)}`);let g=e.someProp("clipboardTextSerializer",v=>v(t,e))||t.content.textBetween(0,t.content.size,` `);return{dom:c,text:g}}function z7(e,t,n,r,o){let i=o.parent.type.spec.code,s,a;if(!n&&!t)return null;let c=t&&(r||i||!n);if(c){if(e.someProp("transformPastedText",g=>{t=g(t,i||r,e)}),i)return t?new ye(se.from(e.state.schema.text(t.replace(/\r\n?/g,` -`))),0,0):ye.empty;let p=e.someProp("clipboardTextParser",g=>g(t,o,r,e));if(p)a=p;else{let g=o.marks(),{schema:v}=e.state,y=$i.fromSchema(v);s=document.createElement("div"),t.split(/(?:\r\n?|\n)+/).forEach(w=>{let P=s.appendChild(document.createElement("p"));w&&P.appendChild(y.serializeNode(v.text(w,g)))})}}else e.someProp("transformPastedHTML",p=>{n=p(n,e)}),s=n_e(n),qf&&r_e(s);let u=s&&s.querySelector("[data-pm-slice]"),f=u&&/^(\d+) (\d+)(?: -(\d+))? (.*)/.exec(u.getAttribute("data-pm-slice")||"");if(f&&f[3])for(let p=+f[3];p>0;p--){let g=s.firstChild;for(;g&&g.nodeType!=1;)g=g.nextSibling;if(!g)break;s=g}if(a||(a=(e.someProp("clipboardParser")||e.someProp("domParser")||fu.fromSchema(e.state.schema)).parseSlice(s,{preserveWhitespace:!!(c||f),context:o,ruleFromNode(g){return g.nodeName=="BR"&&!g.nextSibling&&g.parentNode&&!e_e.test(g.parentNode.nodeName)?{ignore:!0}:null}})),f)a=o_e(JT(a,+f[1],+f[2]),f[4]);else if(a=ye.maxOpen(t_e(a.content,o),!0),a.openStart||a.openEnd){let p=0,g=0;for(let v=a.content.firstChild;p{a=p(a,e)}),a}const e_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 t_e(e,t){if(e.childCount<2)return e;for(let n=t.depth;n>=0;n--){let o=t.node(n).contentMatchAt(t.index(n)),i,s=[];if(e.forEach(a=>{if(!s)return;let c=o.findWrapping(a.type),u;if(!c)return s=null;if(u=s.length&&i.length&&B7(c,i,a,s[s.length-1],0))s[s.length-1]=u;else{s.length&&(s[s.length-1]=F7(s[s.length-1],i.length));let f=A7(a,c);s.push(f),o=o.matchType(f.type),i=c}}),s)return se.from(s)}return e}function A7(e,t,n=0){for(let r=t.length-1;r>=n;r--)e=t[r].create(null,se.from(e));return e}function B7(e,t,n,r,o){if(o1&&(i=0),o=n&&(a=t<0?s.contentMatchAt(0).fillBefore(a,i<=o).append(a):a.append(s.contentMatchAt(s.childCount).fillBefore(se.empty,!0))),e.replaceChild(t<0?0:e.childCount-1,s.copy(a))}function JT(e,t,n){return t]*>)*/.exec(e);t&&(e=e.slice(t[0].length));let n=H7().createElement("div"),r=/<([a-z][^>\s]+)/i.exec(e),o;if((o=r&&V7[r[1].toLowerCase()])&&(e=o.map(i=>"<"+i+">").join("")+e+o.map(i=>"").reverse().join("")),n.innerHTML=e,o)for(let i=0;i=0;a-=2){let c=n.nodes[r[a]];if(!c||c.hasRequiredAttrs())break;o=se.from(c.create(r[a+1],o)),i++,s++}return new ye(o,i,s)}const _r={},wr={},i_e={touchstart:!0,touchmove:!0};class s_e{constructor(){this.shiftKey=!1,this.mouseDown=null,this.lastKeyCode=null,this.lastKeyCodeTime=0,this.lastClick={time:0,x:0,y:0,type:""},this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastIOSEnter=0,this.lastIOSEnterFallbackTimeout=-1,this.lastFocus=0,this.lastTouch=0,this.lastAndroidDelete=0,this.composing=!1,this.composingTimeout=-1,this.compositionNodes=[],this.compositionEndedAt=-2e8,this.compositionID=1,this.compositionPendingChanges=0,this.domChangeCount=0,this.eventHandlers=Object.create(null),this.hideSelectionGuard=null}}function a_e(e){for(let t in _r){let n=_r[t];e.dom.addEventListener(t,e.input.eventHandlers[t]=r=>{c_e(e,r)&&!nO(e,r)&&(e.editable||!(r.type in wr))&&n(e,r)},i_e[t]?{passive:!0}:void 0)}yr&&e.dom.addEventListener("input",()=>null),_x(e)}function na(e,t){e.input.lastSelectionOrigin=t,e.input.lastSelectionTime=Date.now()}function l_e(e){e.domObserver.stop();for(let t in e.input.eventHandlers)e.dom.removeEventListener(t,e.input.eventHandlers[t]);clearTimeout(e.input.composingTimeout),clearTimeout(e.input.lastIOSEnterFallbackTimeout)}function _x(e){e.someProp("handleDOMEvents",t=>{for(let n in t)e.input.eventHandlers[n]||e.dom.addEventListener(n,e.input.eventHandlers[n]=r=>nO(e,r))})}function nO(e,t){return e.someProp("handleDOMEvents",n=>{let r=n[t.type];return r?r(e,t)||t.defaultPrevented:!1})}function c_e(e,t){if(!t.bubbles)return!0;if(t.defaultPrevented)return!1;for(let n=t.target;n!=e.dom;n=n.parentNode)if(!n||n.nodeType==11||n.pmViewDesc&&n.pmViewDesc.stopEvent(t))return!1;return!0}function u_e(e,t){!nO(e,t)&&_r[t.type]&&(e.editable||!(t.type in wr))&&_r[t.type](e,t)}wr.keydown=(e,t)=>{let n=t;if(e.input.shiftKey=n.keyCode==16||n.shiftKey,!U7(e,n)&&(e.input.lastKeyCode=n.keyCode,e.input.lastKeyCodeTime=Date.now(),!(Ko&&nr&&n.keyCode==13)))if(n.keyCode!=229&&e.domObserver.forceFlush(),mu&&n.keyCode==13&&!n.ctrlKey&&!n.altKey&&!n.metaKey){let r=Date.now();e.input.lastIOSEnter=r,e.input.lastIOSEnterFallbackTimeout=setTimeout(()=>{e.input.lastIOSEnter==r&&(e.someProp("handleKeyDown",o=>o(e,tl(13,"Enter"))),e.input.lastIOSEnter=0)},200)}else e.someProp("handleKeyDown",r=>r(e,n))||Q1e(e,n)?n.preventDefault():na(e,"key")};wr.keyup=(e,t)=>{t.keyCode==16&&(e.input.shiftKey=!1)};wr.keypress=(e,t)=>{let n=t;if(U7(e,n)||!n.charCode||n.ctrlKey&&!n.altKey||$o&&n.metaKey)return;if(e.someProp("handleKeyPress",o=>o(e,n))){n.preventDefault();return}let r=e.state.selection;if(!(r instanceof Ve)||!r.$from.sameParent(r.$to)){let o=String.fromCharCode(n.charCode);!/[\r\n]/.test(o)&&!e.someProp("handleTextInput",i=>i(e,r.$from.pos,r.$to.pos,o))&&e.dispatch(e.state.tr.insertText(o).scrollIntoView()),n.preventDefault()}};function q0(e){return{left:e.clientX,top:e.clientY}}function d_e(e,t){let n=t.x-e.clientX,r=t.y-e.clientY;return n*n+r*r<100}function rO(e,t,n,r,o){if(r==-1)return!1;let i=e.state.doc.resolve(r);for(let s=i.depth+1;s>0;s--)if(e.someProp(t,a=>s>i.depth?a(e,n,i.nodeAfter,i.before(s),o,!0):a(e,n,i.node(s),i.before(s),o,!1)))return!0;return!1}function qc(e,t,n){e.focused||e.focus();let r=e.state.tr.setSelection(t);n=="pointer"&&r.setMeta("pointer",!0),e.dispatch(r)}function f_e(e,t){if(t==-1)return!1;let n=e.state.doc.resolve(t),r=n.nodeAfter;return r&&r.isAtom&&Le.isSelectable(r)?(qc(e,new Le(n),"pointer"),!0):!1}function p_e(e,t){if(t==-1)return!1;let n=e.state.selection,r,o;n instanceof Le&&(r=n.node);let i=e.state.doc.resolve(t);for(let s=i.depth+1;s>0;s--){let a=s>i.depth?i.nodeAfter:i.node(s);if(Le.isSelectable(a)){r&&n.$from.depth>0&&s>=n.$from.depth&&i.before(n.$from.depth+1)==n.$from.pos?o=i.before(n.$from.depth):o=i.before(s);break}}return o!=null?(qc(e,Le.create(e.state.doc,o),"pointer"),!0):!1}function h_e(e,t,n,r,o){return rO(e,"handleClickOn",t,n,r)||e.someProp("handleClick",i=>i(e,t,r))||(o?p_e(e,n):f_e(e,n))}function m_e(e,t,n,r){return rO(e,"handleDoubleClickOn",t,n,r)||e.someProp("handleDoubleClick",o=>o(e,t,r))}function g_e(e,t,n,r){return rO(e,"handleTripleClickOn",t,n,r)||e.someProp("handleTripleClick",o=>o(e,t,r))||v_e(e,n,r)}function v_e(e,t,n){if(n.button!=0)return!1;let r=e.state.doc;if(t==-1)return r.inlineContent?(qc(e,Ve.create(r,0,r.content.size),"pointer"),!0):!1;let o=r.resolve(t);for(let i=o.depth+1;i>0;i--){let s=i>o.depth?o.nodeAfter:o.node(i),a=o.before(i);if(s.inlineContent)qc(e,Ve.create(r,a+1,a+1+s.content.size),"pointer");else if(Le.isSelectable(s))qc(e,Le.create(r,a),"pointer");else continue;return!0}}function oO(e){return Vv(e)}const W7=$o?"metaKey":"ctrlKey";_r.mousedown=(e,t)=>{let n=t;e.input.shiftKey=n.shiftKey;let r=oO(e),o=Date.now(),i="singleClick";o-e.input.lastClick.time<500&&d_e(n,e.input.lastClick)&&!n[W7]&&(e.input.lastClick.type=="singleClick"?i="doubleClick":e.input.lastClick.type=="doubleClick"&&(i="tripleClick")),e.input.lastClick={time:o,x:n.clientX,y:n.clientY,type:i};let s=e.posAtCoords(q0(n));s&&(i=="singleClick"?(e.input.mouseDown&&e.input.mouseDown.done(),e.input.mouseDown=new y_e(e,s,n,!!r)):(i=="doubleClick"?m_e:g_e)(e,s.pos,s.inside,n)?n.preventDefault():na(e,"pointer"))};class y_e{constructor(t,n,r,o){this.view=t,this.pos=n,this.event=r,this.flushed=o,this.delayedSelectionSync=!1,this.mightDrag=null,this.startDoc=t.state.doc,this.selectNode=!!r[W7],this.allowDefault=r.shiftKey;let i,s;if(n.inside>-1)i=t.state.doc.nodeAt(n.inside),s=n.inside;else{let f=t.state.doc.resolve(n.pos);i=f.parent,s=f.depth?f.before():0}const a=o?null:r.target,c=a?t.docView.nearestDesc(a,!0):null;this.target=c?c.dom:null;let{selection:u}=t.state;(r.button==0&&i.type.spec.draggable&&i.type.spec.selectable!==!1||u instanceof Le&&u.from<=s&&u.to>s)&&(this.mightDrag={node:i,pos:s,addAttr:!!(this.target&&!this.target.draggable),setUneditable:!!(this.target&&oi&&!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()),t.root.addEventListener("mouseup",this.up=this.up.bind(this)),t.root.addEventListener("mousemove",this.move=this.move.bind(this)),na(t,"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(()=>ds(this.view)),this.view.input.mouseDown=null}up(t){if(this.done(),!this.view.dom.contains(t.target))return;let n=this.pos;this.view.state.doc!=this.startDoc&&(n=this.view.posAtCoords(q0(t))),this.updateAllowDefault(t),this.allowDefault||!n?na(this.view,"pointer"):h_e(this.view,n.pos,n.inside,t,this.selectNode)?t.preventDefault():t.button==0&&(this.flushed||yr&&this.mightDrag&&!this.mightDrag.node.isAtom||nr&&!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)?(qc(this.view,Ze.near(this.view.state.doc.resolve(n.pos)),"pointer"),t.preventDefault()):na(this.view,"pointer")}move(t){this.updateAllowDefault(t),na(this.view,"pointer"),t.buttons==0&&this.done()}updateAllowDefault(t){!this.allowDefault&&(Math.abs(this.event.x-t.clientX)>4||Math.abs(this.event.y-t.clientY)>4)&&(this.allowDefault=!0)}}_r.touchstart=e=>{e.input.lastTouch=Date.now(),oO(e),na(e,"pointer")};_r.touchmove=e=>{e.input.lastTouch=Date.now(),na(e,"pointer")};_r.contextmenu=e=>oO(e);function U7(e,t){return e.composing?!0:yr&&Math.abs(t.timeStamp-e.input.compositionEndedAt)<500?(e.input.compositionEndedAt=-2e8,!0):!1}const __e=Ko?5e3:-1;wr.compositionstart=wr.compositionupdate=e=>{if(!e.composing){e.domObserver.flush();let{state:t}=e,n=t.selection.$from;if(t.selection.empty&&(t.storedMarks||!n.textOffset&&n.parentOffset&&n.nodeBefore.marks.some(r=>r.type.spec.inclusive===!1)))e.markCursor=e.state.storedMarks||n.marks(),Vv(e,!0),e.markCursor=null;else if(Vv(e),oi&&t.selection.empty&&n.parentOffset&&!n.textOffset&&n.nodeBefore.marks.length){let r=e.domSelectionRange();for(let o=r.focusNode,i=r.focusOffset;o&&o.nodeType==1&&i!=0;){let s=i<0?o.lastChild:o.childNodes[i-1];if(!s)break;if(s.nodeType==3){e.domSelection().collapse(s,s.nodeValue.length);break}else o=s,i=-1}}e.input.composing=!0}Z7(e,__e)};wr.compositionend=(e,t)=>{e.composing&&(e.input.composing=!1,e.input.compositionEndedAt=t.timeStamp,e.input.compositionPendingChanges=e.domObserver.pendingRecords().length?e.input.compositionID:0,e.input.compositionPendingChanges&&Promise.resolve().then(()=>e.domObserver.flush()),e.input.compositionID++,Z7(e,20))};function Z7(e,t){clearTimeout(e.input.composingTimeout),t>-1&&(e.input.composingTimeout=setTimeout(()=>Vv(e),t))}function G7(e){for(e.composing&&(e.input.composing=!1,e.input.compositionEndedAt=w_e());e.input.compositionNodes.length>0;)e.input.compositionNodes.pop().markParentsDirty()}function w_e(){let e=document.createEvent("Event");return e.initEvent("event",!0,!0),e.timeStamp}function Vv(e,t=!1){if(!(Ko&&e.domObserver.flushingSoon>=0)){if(e.domObserver.forceFlush(),G7(e),t||e.docView&&e.docView.dirty){let n=eO(e);return n&&!n.eq(e.state.selection)?e.dispatch(e.state.tr.setSelection(n)):e.updateState(e.state),!0}return!1}}function b_e(e,t){if(!e.dom.parentNode)return;let n=e.dom.parentNode.appendChild(document.createElement("div"));n.appendChild(t),n.style.cssText="position: fixed; left: -10000px; top: 10px";let r=getSelection(),o=document.createRange();o.selectNodeContents(t),e.dom.blur(),r.removeAllRanges(),r.addRange(o),setTimeout(()=>{n.parentNode&&n.parentNode.removeChild(n),e.focus()},50)}const gu=Hr&&va<15||mu&&y1e<604;_r.copy=wr.cut=(e,t)=>{let n=t,r=e.state.selection,o=n.type=="cut";if(r.empty)return;let i=gu?null:n.clipboardData,s=r.content(),{dom:a,text:c}=R7(e,s);i?(n.preventDefault(),i.clearData(),i.setData("text/html",a.innerHTML),i.setData("text/plain",c)):b_e(e,a),o&&e.dispatch(e.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent","cut"))};function x_e(e){return e.openStart==0&&e.openEnd==0&&e.content.childCount==1?e.content.firstChild:null}function S_e(e,t){if(!e.dom.parentNode)return;let n=e.input.shiftKey||e.state.selection.$from.parent.type.spec.code,r=e.dom.parentNode.appendChild(document.createElement(n?"textarea":"div"));n||(r.contentEditable="true"),r.style.cssText="position: fixed; left: -10000px; top: 10px",r.focus();let o=e.input.shiftKey&&e.input.lastKeyCode!=45;setTimeout(()=>{e.focus(),r.parentNode&&r.parentNode.removeChild(r),n?_f(e,r.value,null,o,t):_f(e,r.textContent,r.innerHTML,o,t)},50)}function _f(e,t,n,r,o){let i=z7(e,t,n,r,e.state.selection.$from);if(e.someProp("handlePaste",c=>c(e,o,i||ye.empty)))return!0;if(!i)return!1;let s=x_e(i),a=s?e.state.tr.replaceSelectionWith(s,r):e.state.tr.replaceSelection(i);return e.dispatch(a.scrollIntoView().setMeta("paste",!0).setMeta("uiEvent","paste")),!0}wr.paste=(e,t)=>{let n=t;if(e.composing&&!Ko)return;let r=gu?null:n.clipboardData,o=e.input.shiftKey&&e.input.lastKeyCode!=45;r&&_f(e,r.getData("text/plain"),r.getData("text/html"),o,n)?n.preventDefault():S_e(e,n)};class P_e{constructor(t,n){this.slice=t,this.move=n}}const Y7=$o?"altKey":"ctrlKey";_r.dragstart=(e,t)=>{let n=t,r=e.input.mouseDown;if(r&&r.done(),!n.dataTransfer)return;let o=e.state.selection,i=o.empty?null:e.posAtCoords(q0(n));if(!(i&&i.pos>=o.from&&i.pos<=(o instanceof Le?o.to-1:o.to))){if(r&&r.mightDrag)e.dispatch(e.state.tr.setSelection(Le.create(e.state.doc,r.mightDrag.pos)));else if(n.target&&n.target.nodeType==1){let u=e.docView.nearestDesc(n.target,!0);u&&u.node.type.spec.draggable&&u!=e.docView&&e.dispatch(e.state.tr.setSelection(Le.create(e.state.doc,u.posBefore)))}}let s=e.state.selection.content(),{dom:a,text:c}=R7(e,s);n.dataTransfer.clearData(),n.dataTransfer.setData(gu?"Text":"text/html",a.innerHTML),n.dataTransfer.effectAllowed="copyMove",gu||n.dataTransfer.setData("text/plain",c),e.dragging=new P_e(s,!n[Y7])};_r.dragend=e=>{let t=e.dragging;window.setTimeout(()=>{e.dragging==t&&(e.dragging=null)},50)};wr.dragover=wr.dragenter=(e,t)=>t.preventDefault();wr.drop=(e,t)=>{let n=t,r=e.dragging;if(e.dragging=null,!n.dataTransfer)return;let o=e.posAtCoords(q0(n));if(!o)return;let i=e.state.doc.resolve(o.pos),s=r&&r.slice;s?e.someProp("transformPasted",y=>{s=y(s,e)}):s=z7(e,n.dataTransfer.getData(gu?"Text":"text/plain"),gu?null:n.dataTransfer.getData("text/html"),!1,i);let a=!!(r&&!n[Y7]);if(e.someProp("handleDrop",y=>y(e,n,s||ye.empty,a))){n.preventDefault();return}if(!s)return;n.preventDefault();let c=s?p7(e.state.doc,i.pos,s):i.pos;c==null&&(c=i.pos);let u=e.state.tr;a&&u.deleteSelection();let f=u.mapping.map(c),p=s.openStart==0&&s.openEnd==0&&s.content.childCount==1,g=u.doc;if(p?u.replaceRangeWith(f,f,s.content.firstChild):u.replaceRange(f,f,s),u.doc.eq(g))return;let v=u.doc.resolve(f);if(p&&Le.isSelectable(s.content.firstChild)&&v.nodeAfter&&v.nodeAfter.sameMarkup(s.content.firstChild))u.setSelection(new Le(v));else{let y=u.mapping.map(c);u.mapping.maps[u.mapping.maps.length-1].forEach((w,P,x,S)=>y=S),u.setSelection(tO(e,v,u.doc.resolve(y)))}e.focus(),e.dispatch(u.setMeta("uiEvent","drop"))};_r.focus=e=>{e.input.lastFocus=Date.now(),e.focused||(e.domObserver.stop(),e.dom.classList.add("ProseMirror-focused"),e.domObserver.start(),e.focused=!0,setTimeout(()=>{e.docView&&e.hasFocus()&&!e.domObserver.currentSelection.eq(e.domSelectionRange())&&ds(e)},20))};_r.blur=(e,t)=>{let n=t;e.focused&&(e.domObserver.stop(),e.dom.classList.remove("ProseMirror-focused"),e.domObserver.start(),n.relatedTarget&&e.dom.contains(n.relatedTarget)&&e.domObserver.currentSelection.clear(),e.focused=!1)};_r.beforeinput=(e,t)=>{if(nr&&Ko&&t.inputType=="deleteContentBackward"){e.domObserver.flushSoon();let{domChangeCount:r}=e.input;setTimeout(()=>{if(e.input.domChangeCount!=r||(e.dom.blur(),e.focus(),e.someProp("handleKeyDown",i=>i(e,tl(8,"Backspace")))))return;let{$cursor:o}=e.state.selection;o&&o.pos>0&&e.dispatch(e.state.tr.delete(o.pos-1,o.pos).scrollIntoView())},50)}};for(let e in wr)_r[e]=wr[e];function wf(e,t){if(e==t)return!0;for(let n in e)if(e[n]!==t[n])return!1;for(let n in t)if(!(n in e))return!1;return!0}class Hv{constructor(t,n){this.toDOM=t,this.spec=n||Sl,this.side=this.spec.side||0}map(t,n,r,o){let{pos:i,deleted:s}=t.mapResult(n.from+o,this.side<0?-1:1);return s?null:new jo(i-r,i-r,this)}valid(){return!0}eq(t){return this==t||t instanceof Hv&&(this.spec.key&&this.spec.key==t.spec.key||this.toDOM==t.toDOM&&wf(this.spec,t.spec))}destroy(t){this.spec.destroy&&this.spec.destroy(t)}}class _a{constructor(t,n){this.attrs=t,this.spec=n||Sl}map(t,n,r,o){let i=t.map(n.from+o,this.spec.inclusiveStart?-1:1)-r,s=t.map(n.to+o,this.spec.inclusiveEnd?1:-1)-r;return i>=s?null:new jo(i,s,this)}valid(t,n){return n.from=t&&(!i||i(a.spec))&&r.push(a.copy(a.from+o,a.to+o))}for(let s=0;st){let a=this.children[s]+1;this.children[s+2].findInner(t-a,n-a,r,o+a,i)}}map(t,n,r){return this==Qn||t.maps.length==0?this:this.mapInner(t,n,0,0,r||Sl)}mapInner(t,n,r,o,i){let s;for(let a=0;a{let u=c+r,f;if(f=q7(n,a,u)){for(o||(o=this.children.slice());ia&&p.to=t){this.children[a]==t&&(r=this.children[a+2]);break}let i=t+1,s=i+n.content.size;for(let a=0;ai&&c.type instanceof _a){let u=Math.max(i,c.from)-i,f=Math.min(s,c.to)-i;uo.map(t,n,Sl));return Ys.from(r)}forChild(t,n){if(n.isLeaf)return gn.empty;let r=[];for(let o=0;on instanceof gn)?t:t.reduce((n,r)=>n.concat(r instanceof gn?r:r.members),[]))}}}function O_e(e,t,n,r,o,i,s){let a=e.slice();for(let u=0,f=i;u{let P=w-y-(v-g);for(let x=0;xS+f-p)continue;let O=a[x]+f-p;v>=O?a[x+1]=g<=O?-2:-1:y>=o&&P&&(a[x]+=P,a[x+1]+=P)}p+=P}),f=n.maps[u].map(f,-1)}let c=!1;for(let u=0;u=r.content.size){c=!0;continue}let g=n.map(e[u+1]+i,-1),v=g-o,{index:y,offset:w}=r.content.findIndex(p),P=r.maybeChild(y);if(P&&w==p&&w+P.nodeSize==v){let x=a[u+2].mapInner(n,P,f+1,e[u]+i+1,s);x!=Qn?(a[u]=p,a[u+1]=v,a[u+2]=x):(a[u+1]=-2,c=!0)}else c=!0}if(c){let u=C_e(a,e,t,n,o,i,s),f=Wv(u,r,0,s);t=f.local;for(let p=0;pn&&s.to{let u=q7(e,a,c+n);if(u){i=!0;let f=Wv(u,a,n+c+1,r);f!=Qn&&o.push(c,c+a.nodeSize,f)}});let s=K7(i?J7(e):e,-n).sort(Pl);for(let a=0;a0;)t++;e.splice(t,0,n)}function aw(e){let t=[];return e.someProp("decorations",n=>{let r=n(e.state);r&&r!=Qn&&t.push(r)}),e.cursorWrapper&&t.push(gn.create(e.state.doc,[e.cursorWrapper.deco])),Ys.from(t)}const k_e={childList:!0,characterData:!0,characterDataOldValue:!0,attributes:!0,attributeOldValue:!0,subtree:!0},E_e=Hr&&va<=11;class $_e{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}set(t){this.anchorNode=t.anchorNode,this.anchorOffset=t.anchorOffset,this.focusNode=t.focusNode,this.focusOffset=t.focusOffset}clear(){this.anchorNode=this.focusNode=null}eq(t){return t.anchorNode==this.anchorNode&&t.anchorOffset==this.anchorOffset&&t.focusNode==this.focusNode&&t.focusOffset==this.focusOffset}}class M_e{constructor(t,n){this.view=t,this.handleDOMChange=n,this.queue=[],this.flushingSoon=-1,this.observer=null,this.currentSelection=new $_e,this.onCharData=null,this.suppressingSelectionUpdates=!1,this.observer=window.MutationObserver&&new window.MutationObserver(r=>{for(let o=0;oo.type=="childList"&&o.removedNodes.length||o.type=="characterData"&&o.oldValue.length>o.target.nodeValue.length)?this.flushSoon():this.flush()}),E_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,k_e)),this.onCharData&&this.view.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.connectSelection()}stop(){if(this.observer){let t=this.observer.takeRecords();if(t.length){for(let n=0;nthis.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(UT(this.view)){if(this.suppressingSelectionUpdates)return ds(this.view);if(Hr&&va<=11&&!this.view.state.selection.empty){let t=this.view.domSelectionRange();if(t.focusNode&&Il(t.focusNode,t.focusOffset,t.anchorNode,t.anchorOffset))return this.flushSoon()}this.flush()}}setCurSelection(){this.currentSelection.set(this.view.domSelectionRange())}ignoreSelectionChange(t){if(!t.focusNode)return!0;let n=new Set,r;for(let i=t.focusNode;i;i=yf(i))n.add(i);for(let i=t.anchorNode;i;i=yf(i))if(n.has(i)){r=i;break}let o=r&&this.view.docView.nearestDesc(r);if(o&&o.ignoreMutation({type:"selection",target:r.nodeType==3?r.parentNode:r}))return this.setCurSelection(),!0}pendingRecords(){if(this.observer)for(let t of this.observer.takeRecords())this.queue.push(t);return this.queue}flush(){let{view:t}=this;if(!t.docView||this.flushingSoon>-1)return;let n=this.pendingRecords();n.length&&(this.queue=[]);let r=t.domSelectionRange(),o=!this.suppressingSelectionUpdates&&!this.currentSelection.eq(r)&&UT(t)&&!this.ignoreSelectionChange(r),i=-1,s=-1,a=!1,c=[];if(t.editable)for(let f=0;f1){let f=c.filter(p=>p.nodeName=="BR");if(f.length==2){let p=f[0],g=f[1];p.parentNode&&p.parentNode.parentNode==g.parentNode?g.remove():p.remove()}}let u=null;i<0&&o&&t.input.lastFocus>Date.now()-200&&Math.max(t.input.lastTouch,t.input.lastClick.time)-1||o)&&(i>-1&&(t.docView.markDirty(i,s),N_e(t)),this.handleDOMChange(i,s,a,c),t.docView&&t.docView.dirty?t.updateState(t.state):this.currentSelection.eq(r)||ds(t),this.currentSelection.set(r))}registerMutation(t,n){if(n.indexOf(t.target)>-1)return null;let r=this.view.docView.nearestDesc(t.target);if(t.type=="attributes"&&(r==this.view.docView||t.attributeName=="contenteditable"||t.attributeName=="style"&&!t.oldValue&&!t.target.getAttribute("style"))||!r||r.ignoreMutation(t))return null;if(t.type=="childList"){for(let f=0;fo;P--){let x=r.childNodes[P-1],S=x.pmViewDesc;if(x.nodeName=="BR"&&!S){i=P;break}if(!S||S.size)break}let p=e.state.doc,g=e.someProp("domParser")||fu.fromSchema(e.state.schema),v=p.resolve(s),y=null,w=g.parse(r,{topNode:v.parent,topMatch:v.parent.contentMatchAt(v.index()),topOpen:!0,from:o,to:i,preserveWhitespace:v.parent.type.whitespace=="pre"?"full":!0,findPositions:u,ruleFromNode:j_e,context:v});if(u&&u[0].pos!=null){let P=u[0].pos,x=u[1]&&u[1].pos;x==null&&(x=P),y={anchor:P+s,head:x+s}}return{doc:w,sel:y,from:s,to:a}}function j_e(e){let t=e.pmViewDesc;if(t)return t.parseRule();if(e.nodeName=="BR"&&e.parentNode){if(yr&&/^(ul|ol)$/i.test(e.parentNode.nodeName)){let n=document.createElement("div");return n.appendChild(document.createElement("li")),{skip:n}}else if(e.parentNode.lastChild==e||yr&&/^(tr|table)$/i.test(e.parentNode.nodeName))return{ignore:!0}}else if(e.nodeName=="IMG"&&e.getAttribute("mark-placeholder"))return{ignore:!0};return null}const L_e=/^(a|abbr|acronym|b|bd[io]|big|br|button|cite|code|data(list)?|del|dfn|em|i|ins|kbd|label|map|mark|meter|output|q|ruby|s|samp|small|span|strong|su[bp]|time|u|tt|var)$/i;function D_e(e,t,n,r,o){let i=e.input.compositionPendingChanges||(e.composing?e.input.compositionID:0);if(e.input.compositionPendingChanges=0,t<0){let B=e.input.lastSelectionTime>Date.now()-50?e.input.lastSelectionOrigin:null,z=eO(e,B);if(z&&!e.state.selection.eq(z)){if(nr&&Ko&&e.input.lastKeyCode===13&&Date.now()-100X(e,tl(13,"Enter"))))return;let G=e.state.tr.setSelection(z);B=="pointer"?G.setMeta("pointer",!0):B=="key"&&G.scrollIntoView(),i&&G.setMeta("composition",i),e.dispatch(G)}return}let s=e.state.doc.resolve(t),a=s.sharedDepth(n);t=s.before(a+1),n=e.state.doc.resolve(n).after(a+1);let c=e.state.selection,u=I_e(e,t,n),f=e.state.doc,p=f.slice(u.from,u.to),g,v;e.input.lastKeyCode===8&&Date.now()-100Date.now()-225||Ko)&&o.some(B=>B.nodeType==1&&!L_e.test(B.nodeName))&&(!y||y.endA>=y.endB)&&e.someProp("handleKeyDown",B=>B(e,tl(13,"Enter")))){e.input.lastIOSEnter=0;return}if(!y)if(r&&c instanceof Ve&&!c.empty&&c.$head.sameParent(c.$anchor)&&!e.composing&&!(u.sel&&u.sel.anchor!=u.sel.head))y={start:c.from,endA:c.to,endB:c.to};else{if(u.sel){let B=nI(e,e.state.doc,u.sel);if(B&&!B.eq(e.state.selection)){let z=e.state.tr.setSelection(B);i&&z.setMeta("composition",i),e.dispatch(z)}}return}if(nr&&e.cursorWrapper&&u.sel&&u.sel.anchor==e.cursorWrapper.deco.from&&u.sel.head==u.sel.anchor){let B=y.endB-y.start;u.sel={anchor:u.sel.anchor+B,head:u.sel.anchor+B}}e.input.domChangeCount++,e.state.selection.frome.state.selection.from&&y.start<=e.state.selection.from+2&&e.state.selection.from>=u.from?y.start=e.state.selection.from:y.endA=e.state.selection.to-2&&e.state.selection.to<=u.to&&(y.endB+=e.state.selection.to-y.endA,y.endA=e.state.selection.to)),Hr&&va<=11&&y.endB==y.start+1&&y.endA==y.start&&y.start>u.from&&u.doc.textBetween(y.start-u.from-1,y.start-u.from+1)=="  "&&(y.start--,y.endA--,y.endB--);let w=u.doc.resolveNoCache(y.start-u.from),P=u.doc.resolveNoCache(y.endB-u.from),x=f.resolve(y.start),S=w.sameParent(P)&&w.parent.inlineContent&&x.end()>=y.endA,O;if((mu&&e.input.lastIOSEnter>Date.now()-225&&(!S||o.some(B=>B.nodeName=="DIV"||B.nodeName=="P"))||!S&&w.posB(e,tl(13,"Enter")))){e.input.lastIOSEnter=0;return}if(e.state.selection.anchor>y.start&&z_e(f,y.start,y.endA,w,P)&&e.someProp("handleKeyDown",B=>B(e,tl(8,"Backspace")))){Ko&&nr&&e.domObserver.suppressSelectionUpdates();return}nr&&Ko&&y.endB==y.start&&(e.input.lastAndroidDelete=Date.now()),Ko&&!S&&w.start()!=P.start()&&P.parentOffset==0&&w.depth==P.depth&&u.sel&&u.sel.anchor==u.sel.head&&u.sel.head==y.endA&&(y.endB-=2,P=u.doc.resolveNoCache(y.endB-u.from),setTimeout(()=>{e.someProp("handleKeyDown",function(B){return B(e,tl(13,"Enter"))})},20));let E=y.start,$=y.endA,N,I,R;if(S){if(w.pos==P.pos)Hr&&va<=11&&w.parentOffset==0&&(e.domObserver.suppressSelectionUpdates(),setTimeout(()=>ds(e),20)),N=e.state.tr.delete(E,$),I=f.resolve(y.start).marksAcross(f.resolve(y.endA));else if(y.endA==y.endB&&(R=R_e(w.parent.content.cut(w.parentOffset,P.parentOffset),x.parent.content.cut(x.parentOffset,y.endA-x.start()))))N=e.state.tr,R.type=="add"?N.addMark(E,$,R.mark):N.removeMark(E,$,R.mark);else if(w.parent.child(w.index()).isText&&w.index()==P.index()-(P.textOffset?0:1)){let B=w.parent.textBetween(w.parentOffset,P.parentOffset);if(e.someProp("handleTextInput",z=>z(e,E,$,B)))return;N=e.state.tr.insertText(B,E,$)}}if(N||(N=e.state.tr.replace(E,$,u.doc.slice(y.start-u.from,y.endB-u.from))),u.sel){let B=nI(e,N.doc,u.sel);B&&!(nr&&Ko&&e.composing&&B.empty&&(y.start!=y.endB||e.input.lastAndroidDeletet.content.size?null:tO(e,t.resolve(n.anchor),t.resolve(n.head))}function R_e(e,t){let n=e.firstChild.marks,r=t.firstChild.marks,o=n,i=r,s,a,c;for(let f=0;ff.mark(a.addToSet(f.marks));else if(o.length==0&&i.length==1)a=i[0],s="remove",c=f=>f.mark(a.removeFromSet(f.marks));else return null;let u=[];for(let f=0;fn||lw(s,!0,!1)0&&(t||e.indexAfter(r)==e.node(r).childCount);)r--,o++,t=!1;if(n){let i=e.node(r).maybeChild(e.indexAfter(r));for(;i&&!i.isLeaf;)i=i.firstChild,o++}return o}function A_e(e,t,n,r,o){let i=e.findDiffStart(t,n);if(i==null)return null;let{a:s,b:a}=e.findDiffEnd(t,n+e.size,n+t.size);if(o=="end"){let c=Math.max(0,i-Math.min(s,a));r-=s+c-i}if(s=s?i-r:0;i-=c,a=i+(a-s),s=i}else if(a=a?i-r:0;i-=c,s=i+(s-a),a=i}return{start:i,endA:s,endB:a}}class B_e{constructor(t,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 s_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(aI),this.dispatch=this.dispatch.bind(this),this.dom=t&&t.mount||document.createElement("div"),t&&(t.appendChild?t.appendChild(this.dom):typeof t=="function"?t(this.dom):t.mount&&(this.mounted=!0)),this.editable=iI(this),oI(this),this.nodeViews=sI(this),this.docView=AT(this.state.doc,rI(this),aw(this),this.dom,this),this.domObserver=new M_e(this,(r,o,i,s)=>D_e(this,r,o,i,s)),this.domObserver.start(),a_e(this),this.updatePluginViews()}get composing(){return this.input.composing}get props(){if(this._props.state!=this.state){let t=this._props;this._props={};for(let n in t)this._props[n]=t[n];this._props.state=this.state}return this._props}update(t){t.handleDOMEvents!=this._props.handleDOMEvents&&_x(this);let n=this._props;this._props=t,t.plugins&&(t.plugins.forEach(aI),this.directPlugins=t.plugins),this.updateStateInner(t.state,n)}setProps(t){let n={};for(let r in this._props)n[r]=this._props[r];n.state=this.state;for(let r in t)n[r]=t[r];this.update(n)}updateState(t){this.updateStateInner(t,this._props)}updateStateInner(t,n){let r=this.state,o=!1,i=!1;t.storedMarks&&this.composing&&(G7(this),i=!0),this.state=t;let s=r.plugins!=t.plugins||this._props.plugins!=n.plugins;if(s||this._props.plugins!=n.plugins||this._props.nodeViews!=n.nodeViews){let g=sI(this);V_e(g,this.nodeViews)&&(this.nodeViews=g,o=!0)}(s||n.handleDOMEvents!=this._props.handleDOMEvents)&&_x(this),this.editable=iI(this),oI(this);let a=aw(this),c=rI(this),u=r.plugins!=t.plugins&&!r.doc.eq(t.doc)?"reset":t.scrollToSelection>r.scrollToSelection?"to selection":"preserve",f=o||!this.docView.matchesNode(t.doc,c,a);(f||!t.selection.eq(r.selection))&&(i=!0);let p=u=="preserve"&&i&&this.dom.style.overflowAnchor==null&&b1e(this);if(i){this.domObserver.stop();let g=f&&(Hr||nr)&&!this.composing&&!r.selection.empty&&!t.selection.empty&&F_e(r.selection,t.selection);if(f){let v=nr?this.trackWrites=this.domSelectionRange().focusNode:null;(o||!this.docView.update(t.doc,c,a,this))&&(this.docView.updateOuterDeco([]),this.docView.destroy(),this.docView=AT(t.doc,c,a,this.dom,this)),v&&!this.trackWrites&&(g=!0)}g||!(this.input.mouseDown&&this.domObserver.currentSelection.eq(this.domSelectionRange())&&Z1e(this))?ds(this,g):(j7(this,t.selection),this.domObserver.setCurSelection()),this.domObserver.start()}this.updatePluginViews(r),u=="reset"?this.dom.scrollTop=0:u=="to selection"?this.scrollToSelection():p&&x1e(p)}scrollToSelection(){let t=this.domSelectionRange().focusNode;if(!this.someProp("handleScrollToSelection",n=>n(this)))if(this.state.selection instanceof Le){let n=this.docView.domAfterPos(this.state.selection.from);n.nodeType==1&&IT(this,n.getBoundingClientRect(),t)}else IT(this,this.coordsAtPos(this.state.selection.head,1),t)}destroyPluginViews(){let t;for(;t=this.pluginViews.pop();)t.destroy&&t.destroy()}updatePluginViews(t){if(!t||t.plugins!=this.state.plugins||this.directPlugins!=this.prevDirectPlugins){this.prevDirectPlugins=this.directPlugins,this.destroyPluginViews();for(let n=0;nn.ownerDocument.getSelection()),this._root=n}return t||document}updateRoot(){this._root=null}posAtCoords(t){return E1e(this,t)}coordsAtPos(t,n=1){return C7(this,t,n)}domAtPos(t,n=0){return this.docView.domFromPos(t,n)}nodeDOM(t){let n=this.docView.descAt(t);return n?n.nodeDOM:null}posAtDOM(t,n,r=-1){let o=this.docView.posFromDOM(t,n,r);if(o==null)throw new RangeError("DOM position not inside the editor");return o}endOfTextblock(t,n){return I1e(this,n||this.state,t)}pasteHTML(t,n){return _f(this,"",t,!1,n||new ClipboardEvent("paste"))}pasteText(t,n){return _f(this,t,null,!0,n||new ClipboardEvent("paste"))}destroy(){this.docView&&(l_e(this),this.destroyPluginViews(),this.mounted?(this.docView.update(this.state.doc,[],aw(this),this),this.dom.textContent=""):this.dom.parentNode&&this.dom.parentNode.removeChild(this.dom),this.docView.destroy(),this.docView=null)}get isDestroyed(){return this.docView==null}dispatchEvent(t){return u_e(this,t)}dispatch(t){let n=this._props.dispatchTransaction;n?n.call(this,t):this.updateState(this.state.apply(t))}domSelectionRange(){return yr&&this.root.nodeType===11&&h1e(this.dom.ownerDocument)==this.dom?T_e(this):this.domSelection()}domSelection(){return this.root.getSelection()}}function rI(e){let t=Object.create(null);return t.class="ProseMirror",t.contenteditable=String(e.editable),e.someProp("attributes",n=>{if(typeof n=="function"&&(n=n(e.state)),n)for(let r in n)r=="class"?t.class+=" "+n[r]:r=="style"?t.style=(t.style?t.style+";":"")+n[r]:!t[r]&&r!="contenteditable"&&r!="nodeName"&&(t[r]=String(n[r]))}),t.translate||(t.translate="no"),[jo.node(0,e.state.doc.content.size,t)]}function oI(e){if(e.markCursor){let t=document.createElement("img");t.className="ProseMirror-separator",t.setAttribute("mark-placeholder","true"),t.setAttribute("alt",""),e.cursorWrapper={dom:t,deco:jo.widget(e.state.selection.head,t,{raw:!0,marks:e.markCursor})}}else e.cursorWrapper=null}function iI(e){return!e.someProp("editable",t=>t(e.state)===!1)}function F_e(e,t){let n=Math.min(e.$anchor.sharedDepth(e.head),t.$anchor.sharedDepth(t.head));return e.$anchor.start(n)!=t.$anchor.start(n)}function sI(e){let t=Object.create(null);function n(r){for(let o in r)Object.prototype.hasOwnProperty.call(t,o)||(t[o]=r[o])}return e.someProp("nodeViews",n),e.someProp("markViews",n),t}function V_e(e,t){let n=0,r=0;for(let o in e){if(e[o]!=t[o])return!0;n++}for(let o in t)r++;return n!=r}function aI(e){if(e.spec.state||e.spec.filterTransaction||e.spec.appendTransaction)throw new RangeError("Plugins passed directly to the view must not have a state component")}var Ca={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:"'"},Uv={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},H_e=typeof navigator<"u"&&/Mac/.test(navigator.platform),W_e=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);for(var An=0;An<10;An++)Ca[48+An]=Ca[96+An]=String(An);for(var An=1;An<=24;An++)Ca[An+111]="F"+An;for(var An=65;An<=90;An++)Ca[An]=String.fromCharCode(An+32),Uv[An]=String.fromCharCode(An);for(var cw in Ca)Uv.hasOwnProperty(cw)||(Uv[cw]=Ca[cw]);function U_e(e){var t=H_e&&e.metaKey&&e.shiftKey&&!e.ctrlKey&&!e.altKey||W_e&&e.shiftKey&&e.key&&e.key.length==1||e.key=="Unidentified",n=!t&&e.key||(e.shiftKey?Uv:Ca)[e.keyCode]||e.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 Z_e=typeof navigator<"u"?/Mac|iP(hone|[oa]d)/.test(navigator.platform):!1;function G_e(e){let t=e.split(/-(?!$)/),n=t[t.length-1];n=="Space"&&(n=" ");let r,o,i,s;for(let a=0;a127)&&(i=Ca[r.keyCode])&&i!=o){let a=t[uw(i,r)];if(a&&a(n.state,n.dispatch,n))return!0}}return!1}}const q_e=(e,t)=>e.selection.empty?!1:(t&&t(e.tr.deleteSelection().scrollIntoView()),!0);function J_e(e,t){let{$cursor:n}=e.selection;return!n||(t?!t.endOfTextblock("backward",e):n.parentOffset>0)?null:n}const X_e=(e,t,n)=>{let r=J_e(e,n);if(!r)return!1;let o=Q7(r);if(!o){let s=r.blockRange(),a=s&&$u(s);return a==null?!1:(t&&t(e.tr.lift(s,a).scrollIntoView()),!0)}let i=o.nodeBefore;if(!i.type.spec.isolating&&n9(e,o,t))return!0;if(r.parent.content.size==0&&(vu(i,"end")||Le.isSelectable(i))){let s=qP(e.doc,r.before(),r.after(),ye.empty);if(s&&s.slice.size{let{$head:r,empty:o}=e.selection,i=r;if(!o)return!1;if(r.parent.isTextblock){if(n?!n.endOfTextblock("backward",e):r.parentOffset>0)return!1;i=Q7(r)}let s=i&&i.nodeBefore;return!s||!Le.isSelectable(s)?!1:(t&&t(e.tr.setSelection(Le.create(e.doc,i.pos-s.nodeSize)).scrollIntoView()),!0)};function Q7(e){if(!e.parent.type.spec.isolating)for(let t=e.depth-1;t>=0;t--){if(e.index(t)>0)return e.doc.resolve(e.before(t+1));if(e.node(t).type.spec.isolating)break}return null}function ewe(e,t){let{$cursor:n}=e.selection;return!n||(t?!t.endOfTextblock("forward",e):n.parentOffset{let r=ewe(e,n);if(!r)return!1;let o=e9(r);if(!o)return!1;let i=o.nodeAfter;if(n9(e,o,t))return!0;if(r.parent.content.size==0&&(vu(i,"start")||Le.isSelectable(i))){let s=qP(e.doc,r.before(),r.after(),ye.empty);if(s&&s.slice.size{let{$head:r,empty:o}=e.selection,i=r;if(!o)return!1;if(r.parent.isTextblock){if(n?!n.endOfTextblock("forward",e):r.parentOffset=0;t--){let n=e.node(t);if(e.index(t)+1{let n=e.selection,r=n instanceof Le,o;if(r){if(n.node.isTextblock||!La(e.doc,n.from))return!1;o=n.from}else if(o=Z0(e.doc,n.from,-1),o==null)return!1;if(t){let i=e.tr.join(o);r&&i.setSelection(Le.create(i.doc,o-e.doc.resolve(o).nodeBefore.nodeSize)),t(i.scrollIntoView())}return!0},owe=(e,t)=>{let n=e.selection,r;if(n instanceof Le){if(n.node.isTextblock||!La(e.doc,n.to))return!1;r=n.to}else if(r=Z0(e.doc,n.to,1),r==null)return!1;return t&&t(e.tr.join(r).scrollIntoView()),!0},iwe=(e,t)=>{let{$from:n,$to:r}=e.selection,o=n.blockRange(r),i=o&&$u(o);return i==null?!1:(t&&t(e.tr.lift(o,i).scrollIntoView()),!0)},swe=(e,t)=>{let{$head:n,$anchor:r}=e.selection;return!n.parent.type.spec.code||!n.sameParent(r)?!1:(t&&t(e.tr.insertText(` -`).scrollIntoView()),!0)};function t9(e){for(let t=0;t{let{$head:n,$anchor:r}=e.selection;if(!n.parent.type.spec.code||!n.sameParent(r))return!1;let o=n.node(-1),i=n.indexAfter(-1),s=t9(o.contentMatchAt(i));if(!s||!o.canReplaceWith(i,i,s))return!1;if(t){let a=n.after(),c=e.tr.replaceWith(a,a,s.createAndFill());c.setSelection(Ze.near(c.doc.resolve(a),1)),t(c.scrollIntoView())}return!0},lwe=(e,t)=>{let n=e.selection,{$from:r,$to:o}=n;if(n instanceof Qo||r.parent.inlineContent||o.parent.inlineContent)return!1;let i=t9(o.parent.contentMatchAt(o.indexAfter()));if(!i||!i.isTextblock)return!1;if(t){let s=(!r.parentOffset&&o.index(){let{$cursor:n}=e.selection;if(!n||n.parent.content.size)return!1;if(n.depth>1&&n.after()!=n.end(-1)){let i=n.before();if(Yc(e.doc,i))return t&&t(e.tr.split(i).scrollIntoView()),!0}let r=n.blockRange(),o=r&&$u(r);return o==null?!1:(t&&t(e.tr.lift(r,o).scrollIntoView()),!0)},uwe=(e,t)=>{let{$from:n,to:r}=e.selection,o,i=n.sharedDepth(r);return i==0?!1:(o=n.before(i),t&&t(e.tr.setSelection(Le.create(e.doc,o))),!0)};function dwe(e,t,n){let r=t.nodeBefore,o=t.nodeAfter,i=t.index();return!r||!o||!r.type.compatibleContent(o.type)?!1:!r.content.size&&t.parent.canReplace(i-1,i)?(n&&n(e.tr.delete(t.pos-r.nodeSize,t.pos).scrollIntoView()),!0):!t.parent.canReplace(i,i+1)||!(o.isTextblock||La(e.doc,t.pos))?!1:(n&&n(e.tr.clearIncompatible(t.pos,r.type,r.contentMatchAt(r.childCount)).join(t.pos).scrollIntoView()),!0)}function n9(e,t,n){let r=t.nodeBefore,o=t.nodeAfter,i,s;if(r.type.spec.isolating||o.type.spec.isolating)return!1;if(dwe(e,t,n))return!0;let a=t.parent.canReplace(t.index(),t.index()+1);if(a&&(i=(s=r.contentMatchAt(r.childCount)).findWrapping(o.type))&&s.matchType(i[0]||o.type).validEnd){if(n){let p=t.pos+o.nodeSize,g=se.empty;for(let w=i.length-1;w>=0;w--)g=se.from(i[w].create(null,g));g=se.from(r.copy(g));let v=e.tr.step(new En(t.pos-1,p,t.pos,p,new ye(g,1,0),i.length,!0)),y=p+2*i.length;La(v.doc,y)&&v.join(y),n(v.scrollIntoView())}return!0}let c=Ze.findFrom(t,1),u=c&&c.$from.blockRange(c.$to),f=u&&$u(u);if(f!=null&&f>=t.depth)return n&&n(e.tr.lift(u,f).scrollIntoView()),!0;if(a&&vu(o,"start",!0)&&vu(r,"end")){let p=r,g=[];for(;g.push(p),!p.isTextblock;)p=p.lastChild;let v=o,y=1;for(;!v.isTextblock;v=v.firstChild)y++;if(p.canReplace(p.childCount,p.childCount,v.content)){if(n){let w=se.empty;for(let x=g.length-1;x>=0;x--)w=se.from(g[x].copy(w));let P=e.tr.step(new En(t.pos-g.length,t.pos+o.nodeSize,t.pos+y,t.pos+o.nodeSize-y,new ye(w,g.length,0),0,!0));n(P.scrollIntoView())}return!0}}return!1}function r9(e){return function(t,n){let r=t.selection,o=e<0?r.$from:r.$to,i=o.depth;for(;o.node(i).isInline;){if(!i)return!1;i--}return o.node(i).isTextblock?(n&&n(t.tr.setSelection(Ve.create(t.doc,e<0?o.start(i):o.end(i)))),!0):!1}}const fwe=r9(-1),pwe=r9(1);function hwe(e,t=null){return function(n,r){let{$from:o,$to:i}=n.selection,s=o.blockRange(i),a=s&&KP(s,e,t);return a?(r&&r(n.tr.wrap(s,a).scrollIntoView()),!0):!1}}function lI(e,t=null){return function(n,r){let o=!1;for(let i=0;i{if(o)return!1;if(!(!c.isTextblock||c.hasMarkup(e,t)))if(c.type==e)o=!0;else{let f=n.doc.resolve(u),p=f.index();o=f.parent.canReplaceWith(p,p+1,e)}})}if(!o)return!1;if(r){let i=n.tr;for(let s=0;s=2&&o.node(s.depth-1).type.compatibleContent(e)&&s.startIndex==0){if(o.index(s.depth-1)==0)return!1;let f=n.doc.resolve(s.start-2);c=new Rv(f,f,s.depth),s.endIndex=0;f--)i=se.from(n[f].type.create(n[f].attrs,i));e.step(new En(t.start-(r?2:0),t.end,t.start,t.end,new ye(i,0,0),n.length,!0));let s=0;for(let f=0;fs.childCount>0&&s.firstChild.type==e);return i?n?r.node(i.depth-1).type==e?ywe(t,n,e,i):_we(t,n,i):!0:!1}}function ywe(e,t,n,r){let o=e.tr,i=r.end,s=r.$to.end(r.depth);iw;y--)v-=o.child(y).nodeSize,r.delete(v-1,v+1);let i=r.doc.resolve(n.start),s=i.nodeAfter;if(r.mapping.map(n.end)!=n.start+i.nodeAfter.nodeSize)return!1;let a=n.startIndex==0,c=n.endIndex==o.childCount,u=i.node(-1),f=i.index(-1);if(!u.canReplace(f+(a?0:1),f+1,s.content.append(c?se.empty:se.from(o))))return!1;let p=i.pos,g=p+s.nodeSize;return r.step(new En(p-(a?1:0),g+(c?1:0),p+1,g-1,new ye((a?se.empty:se.from(o.copy(se.empty))).append(c?se.empty:se.from(o.copy(se.empty))),a?0:1,c?0:1),a?0:1)),t(r.scrollIntoView()),!0}function wwe(e){return function(t,n){let{$from:r,$to:o}=t.selection,i=r.blockRange(o,u=>u.childCount>0&&u.firstChild.type==e);if(!i)return!1;let s=i.startIndex;if(s==0)return!1;let a=i.parent,c=a.child(s-1);if(c.type!=e)return!1;if(n){let u=c.lastChild&&c.lastChild.type==a.type,f=se.from(u?e.create():null),p=new ye(se.from(e.create(null,se.from(a.type.create(null,f)))),u?3:1,0),g=i.start,v=i.end;n(t.tr.step(new En(g-(u?3:1),v,g,v,p,1,!0)).scrollIntoView())}return!0}}function J0(e){const{state:t,transaction:n}=e;let{selection:r}=n,{doc:o}=n,{storedMarks:i}=n;return{...t,apply:t.apply.bind(t),applyTransaction:t.applyTransaction.bind(t),filterTransaction:t.filterTransaction,plugins:t.plugins,schema:t.schema,reconfigure:t.reconfigure.bind(t),toJSON:t.toJSON.bind(t),get storedMarks(){return i},get selection(){return r},get doc(){return o},get tr(){return r=n.selection,o=n.doc,i=n.storedMarks,n}}}class X0{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:n,state:r}=this,{view:o}=n,{tr:i}=r,s=this.buildProps(i);return Object.fromEntries(Object.entries(t).map(([a,c])=>[a,(...f)=>{const p=c(...f)(s);return!i.getMeta("preventDispatch")&&!this.hasCustomState&&o.dispatch(i),p}]))}get chain(){return()=>this.createChain()}get can(){return()=>this.createCan()}createChain(t,n=!0){const{rawCommands:r,editor:o,state:i}=this,{view:s}=o,a=[],c=!!t,u=t||i.tr,f=()=>(!c&&n&&!u.getMeta("preventDispatch")&&!this.hasCustomState&&s.dispatch(u),a.every(g=>g===!0)),p={...Object.fromEntries(Object.entries(r).map(([g,v])=>[g,(...w)=>{const P=this.buildProps(u,n),x=v(...w)(P);return a.push(x),p}])),run:f};return p}createCan(t){const{rawCommands:n,state:r}=this,o=!1,i=t||r.tr,s=this.buildProps(i,o);return{...Object.fromEntries(Object.entries(n).map(([c,u])=>[c,(...f)=>u(...f)({...s,dispatch:void 0})])),chain:()=>this.createChain(i,o)}}buildProps(t,n=!0){const{rawCommands:r,editor:o,state:i}=this,{view:s}=o,a={tr:t,editor:o,view:s,state:J0({state:i,transaction:t}),dispatch:n?()=>{}:void 0,chain:()=>this.createChain(t,n),can:()=>this.createCan(t),get commands(){return Object.fromEntries(Object.entries(r).map(([c,u])=>[c,(...f)=>u(...f)(a)]))}};return a}}class bwe{constructor(){this.callbacks={}}on(t,n){return this.callbacks[t]||(this.callbacks[t]=[]),this.callbacks[t].push(n),this}emit(t,...n){const r=this.callbacks[t];return r&&r.forEach(o=>o.apply(this,n)),this}off(t,n){const r=this.callbacks[t];return r&&(n?this.callbacks[t]=r.filter(o=>o!==n):delete this.callbacks[t]),this}removeAllListeners(){this.callbacks={}}}function Ce(e,t,n){return e.config[t]===void 0&&e.parent?Ce(e.parent,t,n):typeof e.config[t]=="function"?e.config[t].bind({...n,parent:e.parent?Ce(e.parent,t,n):null}):e.config[t]}function Q0(e){const t=e.filter(o=>o.type==="extension"),n=e.filter(o=>o.type==="node"),r=e.filter(o=>o.type==="mark");return{baseExtensions:t,nodeExtensions:n,markExtensions:r}}function o9(e){const t=[],{nodeExtensions:n,markExtensions:r}=Q0(e),o=[...n,...r],i={default:null,rendered:!0,renderHTML:null,parseHTML:null,keepOnSplit:!0,isRequired:!1};return e.forEach(s=>{const a={name:s.name,options:s.options,storage:s.storage},c=Ce(s,"addGlobalAttributes",a);if(!c)return;c().forEach(f=>{f.types.forEach(p=>{Object.entries(f.attributes).forEach(([g,v])=>{t.push({type:p,name:g,attribute:{...i,...v}})})})})}),o.forEach(s=>{const a={name:s.name,options:s.options,storage:s.storage},c=Ce(s,"addAttributes",a);if(!c)return;const u=c();Object.entries(u).forEach(([f,p])=>{const g={...i,...p};typeof g?.default=="function"&&(g.default=g.default()),g?.isRequired&&g?.default===void 0&&delete g.default,t.push({type:s.name,name:f,attribute:g})})}),t}function Mn(e,t){if(typeof e=="string"){if(!t.nodes[e])throw Error(`There is no node type named '${e}'. Maybe you forgot to add the extension?`);return t.nodes[e]}return e}function Et(...e){return e.filter(t=>!!t).reduce((t,n)=>{const r={...t};return Object.entries(n).forEach(([o,i])=>{if(!r[o]){r[o]=i;return}if(o==="class"){const a=i?i.split(" "):[],c=r[o]?r[o].split(" "):[],u=a.filter(f=>!c.includes(f));r[o]=[...c,...u].join(" ")}else o==="style"?r[o]=[r[o],i].join("; "):r[o]=i}),r},{})}function wx(e,t){return t.filter(n=>n.attribute.rendered).map(n=>n.attribute.renderHTML?n.attribute.renderHTML(e.attrs)||{}:{[n.name]:e.attrs[n.name]}).reduce((n,r)=>Et(n,r),{})}function i9(e){return typeof e=="function"}function Ue(e,t=void 0,...n){return i9(e)?t?e.bind(t)(...n):e(...n):e}function xwe(e={}){return Object.keys(e).length===0&&e.constructor===Object}function Swe(e){return typeof e!="string"?e:e.match(/^[+-]?(?:\d*\.)?\d+$/)?Number(e):e==="true"?!0:e==="false"?!1:e}function cI(e,t){return e.style?e:{...e,getAttrs:n=>{const r=e.getAttrs?e.getAttrs(n):e.attrs;if(r===!1)return!1;const o=t.reduce((i,s)=>{const a=s.attribute.parseHTML?s.attribute.parseHTML(n):Swe(n.getAttribute(s.name));return a==null?i:{...i,[s.name]:a}},{});return{...r,...o}}}}function uI(e){return Object.fromEntries(Object.entries(e).filter(([t,n])=>t==="attrs"&&xwe(n)?!1:n!=null))}function Pwe(e,t){var n;const r=o9(e),{nodeExtensions:o,markExtensions:i}=Q0(e),s=(n=o.find(u=>Ce(u,"topNode")))===null||n===void 0?void 0:n.name,a=Object.fromEntries(o.map(u=>{const f=r.filter(x=>x.type===u.name),p={name:u.name,options:u.options,storage:u.storage,editor:t},g=e.reduce((x,S)=>{const O=Ce(S,"extendNodeSchema",p);return{...x,...O?O(u):{}}},{}),v=uI({...g,content:Ue(Ce(u,"content",p)),marks:Ue(Ce(u,"marks",p)),group:Ue(Ce(u,"group",p)),inline:Ue(Ce(u,"inline",p)),atom:Ue(Ce(u,"atom",p)),selectable:Ue(Ce(u,"selectable",p)),draggable:Ue(Ce(u,"draggable",p)),code:Ue(Ce(u,"code",p)),defining:Ue(Ce(u,"defining",p)),isolating:Ue(Ce(u,"isolating",p)),attrs:Object.fromEntries(f.map(x=>{var S;return[x.name,{default:(S=x?.attribute)===null||S===void 0?void 0:S.default}]}))}),y=Ue(Ce(u,"parseHTML",p));y&&(v.parseDOM=y.map(x=>cI(x,f)));const w=Ce(u,"renderHTML",p);w&&(v.toDOM=x=>w({node:x,HTMLAttributes:wx(x,f)}));const P=Ce(u,"renderText",p);return P&&(v.toText=P),[u.name,v]})),c=Object.fromEntries(i.map(u=>{const f=r.filter(P=>P.type===u.name),p={name:u.name,options:u.options,storage:u.storage,editor:t},g=e.reduce((P,x)=>{const S=Ce(x,"extendMarkSchema",p);return{...P,...S?S(u):{}}},{}),v=uI({...g,inclusive:Ue(Ce(u,"inclusive",p)),excludes:Ue(Ce(u,"excludes",p)),group:Ue(Ce(u,"group",p)),spanning:Ue(Ce(u,"spanning",p)),code:Ue(Ce(u,"code",p)),attrs:Object.fromEntries(f.map(P=>{var x;return[P.name,{default:(x=P?.attribute)===null||x===void 0?void 0:x.default}]}))}),y=Ue(Ce(u,"parseHTML",p));y&&(v.parseDOM=y.map(P=>cI(P,f)));const w=Ce(u,"renderHTML",p);return w&&(v.toDOM=P=>w({mark:P,HTMLAttributes:wx(P,f)})),[u.name,v]}));return new I0e({topNode:s,nodes:a,marks:c})}function dw(e,t){return t.nodes[e]||t.marks[e]||null}function dI(e,t){return Array.isArray(t)?t.some(n=>(typeof n=="string"?n:n.name)===e.name):t}const Owe=(e,t=500)=>{let n="";const r=e.parentOffset;return e.parent.nodesBetween(Math.max(0,r-t),r,(o,i,s,a)=>{var c,u;const f=((u=(c=o.type.spec).toText)===null||u===void 0?void 0:u.call(c,{node:o,pos:i,parent:s,index:a}))||o.textContent||"%leaf%";n+=f.slice(0,Math.max(0,r-i))}),n};function aO(e){return Object.prototype.toString.call(e)==="[object RegExp]"}class e1{constructor(t){this.find=t.find,this.handler=t.handler}}const Cwe=(e,t)=>{if(aO(t))return t.exec(e);const n=t(e);if(!n)return null;const r=[n.text];return r.index=n.index,r.input=e,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 fw(e){var t;const{editor:n,from:r,to:o,text:i,rules:s,plugin:a}=e,{view:c}=n;if(c.composing)return!1;const u=c.state.doc.resolve(r);if(u.parent.type.spec.code||!((t=u.nodeBefore||u.nodeAfter)===null||t===void 0)&&t.marks.find(g=>g.type.spec.code))return!1;let f=!1;const p=Owe(u)+i;return s.forEach(g=>{if(f)return;const v=Cwe(p,g.find);if(!v)return;const y=c.state.tr,w=J0({state:c.state,transaction:y}),P={from:r-(v[0].length-i.length),to:o},{commands:x,chain:S,can:O}=new X0({editor:n,state:w});g.handler({state:w,range:P,match:v,commands:x,chain:S,can:O})===null||!y.steps.length||(y.setMeta(a,{transform:y,from:r,to:o,text:i}),c.dispatch(y),f=!0)}),f}function kwe(e){const{editor:t,rules:n}=e,r=new Zr({state:{init(){return null},apply(o,i){const s=o.getMeta(r);return s||(o.selectionSet||o.docChanged?null:i)}},props:{handleTextInput(o,i,s,a){return fw({editor:t,from:i,to:s,text:a,rules:n,plugin:r})},handleDOMEvents:{compositionend:o=>(setTimeout(()=>{const{$cursor:i}=o.state.selection;i&&fw({editor:t,from:i.pos,to:i.pos,text:"",rules:n,plugin:r})}),!1)},handleKeyDown(o,i){if(i.key!=="Enter")return!1;const{$cursor:s}=o.state.selection;return s?fw({editor:t,from:s.pos,to:s.pos,text:` -`,rules:n,plugin:r}):!1}},isInputRules:!0});return r}function Ewe(e){return typeof e=="number"}class $we{constructor(t){this.find=t.find,this.handler=t.handler}}const Mwe=(e,t)=>{if(aO(t))return[...e.matchAll(t)];const n=t(e);return n?n.map(r=>{const o=[r.text];return o.index=r.index,o.input=e,o.data=r.data,r.replaceWith&&(r.text.includes(r.replaceWith)||console.warn('[tiptap warn]: "pasteRuleMatch.replaceWith" must be part of "pasteRuleMatch.text".'),o.push(r.replaceWith)),o}):[]};function Nwe(e){const{editor:t,state:n,from:r,to:o,rule:i,pasteEvent:s,dropEvent:a}=e,{commands:c,chain:u,can:f}=new X0({editor:t,state:n}),p=[];return n.doc.nodesBetween(r,o,(v,y)=>{if(!v.isTextblock||v.type.spec.code)return;const w=Math.max(r,y),P=Math.min(o,y+v.content.size),x=v.textBetween(w-y,P-y,void 0,"");Mwe(x,i.find).forEach(O=>{if(O.index===void 0)return;const E=w+O.index+1,$=E+O[0].length,N={from:n.tr.mapping.map(E),to:n.tr.mapping.map($)},I=i.handler({state:n,range:N,match:O,commands:c,chain:u,can:f,pasteEvent:s,dropEvent:a});p.push(I)})}),p.every(v=>v!==null)}function Twe(e){const{editor:t,rules:n}=e;let r=null,o=!1,i=!1,s=new ClipboardEvent("paste"),a=new DragEvent("drop");return n.map(u=>new Zr({view(f){const p=g=>{var v;r=!((v=f.dom.parentElement)===null||v===void 0)&&v.contains(g.target)?f.dom.parentElement:null};return window.addEventListener("dragstart",p),{destroy(){window.removeEventListener("dragstart",p)}}},props:{handleDOMEvents:{drop:(f,p)=>(i=r===f.dom.parentElement,a=p,!1),paste:(f,p)=>{var g;const v=(g=p.clipboardData)===null||g===void 0?void 0:g.getData("text/html");return s=p,o=!!v?.includes("data-pm-slice"),!1}}},appendTransaction:(f,p,g)=>{const v=f[0],y=v.getMeta("uiEvent")==="paste"&&!o,w=v.getMeta("uiEvent")==="drop"&&!i;if(!y&&!w)return;const P=p.doc.content.findDiffStart(g.doc.content),x=p.doc.content.findDiffEnd(g.doc.content);if(!Ewe(P)||!x||P===x.b)return;const S=g.tr,O=J0({state:g,transaction:S});if(!(!Nwe({editor:t,state:O,from:Math.max(P-1,0),to:x.b-1,rule:u,pasteEvent:s,dropEvent:a})||!S.steps.length))return a=new DragEvent("drop"),s=new ClipboardEvent("paste"),S}}))}function Iwe(e){const t=e.filter((n,r)=>e.indexOf(n)!==r);return[...new Set(t)]}class Nc{constructor(t,n){this.splittableMarks=[],this.editor=n,this.extensions=Nc.resolve(t),this.schema=Pwe(this.extensions,n),this.extensions.forEach(r=>{var o;this.editor.extensionStorage[r.name]=r.storage;const i={name:r.name,options:r.options,storage:r.storage,editor:this.editor,type:dw(r.name,this.schema)};r.type==="mark"&&(!((o=Ue(Ce(r,"keepOnSplit",i)))!==null&&o!==void 0)||o)&&this.splittableMarks.push(r.name);const s=Ce(r,"onBeforeCreate",i);s&&this.editor.on("beforeCreate",s);const a=Ce(r,"onCreate",i);a&&this.editor.on("create",a);const c=Ce(r,"onUpdate",i);c&&this.editor.on("update",c);const u=Ce(r,"onSelectionUpdate",i);u&&this.editor.on("selectionUpdate",u);const f=Ce(r,"onTransaction",i);f&&this.editor.on("transaction",f);const p=Ce(r,"onFocus",i);p&&this.editor.on("focus",p);const g=Ce(r,"onBlur",i);g&&this.editor.on("blur",g);const v=Ce(r,"onDestroy",i);v&&this.editor.on("destroy",v)})}static resolve(t){const n=Nc.sort(Nc.flatten(t)),r=Iwe(n.map(o=>o.name));return r.length&&console.warn(`[tiptap warn]: Duplicate extension names found: [${r.map(o=>`'${o}'`).join(", ")}]. This can lead to issues.`),n}static flatten(t){return t.map(n=>{const r={name:n.name,options:n.options,storage:n.storage},o=Ce(n,"addExtensions",r);return o?[n,...this.flatten(o())]:n}).flat(10)}static sort(t){return t.sort((r,o)=>{const i=Ce(r,"priority")||100,s=Ce(o,"priority")||100;return i>s?-1:i{const r={name:n.name,options:n.options,storage:n.storage,editor:this.editor,type:dw(n.name,this.schema)},o=Ce(n,"addCommands",r);return o?{...t,...o()}:t},{})}get plugins(){const{editor:t}=this,n=Nc.sort([...this.extensions].reverse()),r=[],o=[],i=n.map(s=>{const a={name:s.name,options:s.options,storage:s.storage,editor:t,type:dw(s.name,this.schema)},c=[],u=Ce(s,"addKeyboardShortcuts",a);let f={};if(s.type==="mark"&&s.config.exitable&&(f.ArrowRight=()=>or.handleExit({editor:t,mark:s})),u){const w=Object.fromEntries(Object.entries(u()).map(([P,x])=>[P,()=>x({editor:t})]));f={...f,...w}}const p=K_e(f);c.push(p);const g=Ce(s,"addInputRules",a);dI(s,t.options.enableInputRules)&&g&&r.push(...g());const v=Ce(s,"addPasteRules",a);dI(s,t.options.enablePasteRules)&&v&&o.push(...v());const y=Ce(s,"addProseMirrorPlugins",a);if(y){const w=y();c.push(...w)}return c}).flat();return[kwe({editor:t,rules:r}),...Twe({editor:t,rules:o}),...i]}get attributes(){return o9(this.extensions)}get nodeViews(){const{editor:t}=this,{nodeExtensions:n}=Q0(this.extensions);return Object.fromEntries(n.filter(r=>!!Ce(r,"addNodeView")).map(r=>{const o=this.attributes.filter(c=>c.type===r.name),i={name:r.name,options:r.options,storage:r.storage,editor:t,type:Mn(r.name,this.schema)},s=Ce(r,"addNodeView",i);if(!s)return[];const a=(c,u,f,p)=>{const g=wx(c,o);return s()({editor:t,node:c,getPos:f,decorations:p,HTMLAttributes:g,extension:r})};return[r.name,a]}))}}function jwe(e){return Object.prototype.toString.call(e).slice(8,-1)}function pw(e){return jwe(e)!=="Object"?!1:e.constructor===Object&&Object.getPrototypeOf(e)===Object.prototype}function t1(e,t){const n={...e};return pw(e)&&pw(t)&&Object.keys(t).forEach(r=>{pw(t[r])?r in e?n[r]=t1(e[r],t[r]):Object.assign(n,{[r]:t[r]}):Object.assign(n,{[r]:t[r]})}),n}class br{constructor(t={}){this.type="extension",this.name="extension",this.parent=null,this.child=null,this.config={name:this.name,defaultOptions:{}},this.config={...this.config,...t},this.name=this.config.name,t.defaultOptions&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`),this.options=this.config.defaultOptions,this.config.addOptions&&(this.options=Ue(Ce(this,"addOptions",{name:this.name}))),this.storage=Ue(Ce(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(t={}){return new br(t)}configure(t={}){const n=this.extend();return n.options=t1(this.options,t),n.storage=Ue(Ce(n,"addStorage",{name:n.name,options:n.options})),n}extend(t={}){const n=new br(t);return n.parent=this,this.child=n,n.name=t.name?t.name:n.parent.name,t.defaultOptions&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${n.name}".`),n.options=Ue(Ce(n,"addOptions",{name:n.name})),n.storage=Ue(Ce(n,"addStorage",{name:n.name,options:n.options})),n}}function s9(e,t,n){const{from:r,to:o}=t,{blockSeparator:i=` +`))),0,0):ye.empty;let p=e.someProp("clipboardTextParser",g=>g(t,o,r,e));if(p)a=p;else{let g=o.marks(),{schema:v}=e.state,y=$i.fromSchema(v);s=document.createElement("div"),t.split(/(?:\r\n?|\n)+/).forEach(w=>{let P=s.appendChild(document.createElement("p"));w&&P.appendChild(y.serializeNode(v.text(w,g)))})}}else e.someProp("transformPastedHTML",p=>{n=p(n,e)}),s=t_e(n),qf&&n_e(s);let u=s&&s.querySelector("[data-pm-slice]"),f=u&&/^(\d+) (\d+)(?: -(\d+))? (.*)/.exec(u.getAttribute("data-pm-slice")||"");if(f&&f[3])for(let p=+f[3];p>0;p--){let g=s.firstChild;for(;g&&g.nodeType!=1;)g=g.nextSibling;if(!g)break;s=g}if(a||(a=(e.someProp("clipboardParser")||e.someProp("domParser")||fu.fromSchema(e.state.schema)).parseSlice(s,{preserveWhitespace:!!(c||f),context:o,ruleFromNode(g){return g.nodeName=="BR"&&!g.nextSibling&&g.parentNode&&!Q1e.test(g.parentNode.nodeName)?{ignore:!0}:null}})),f)a=r_e(JT(a,+f[1],+f[2]),f[4]);else if(a=ye.maxOpen(e_e(a.content,o),!0),a.openStart||a.openEnd){let p=0,g=0;for(let v=a.content.firstChild;p{a=p(a,e)}),a}const Q1e=/^(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 e_e(e,t){if(e.childCount<2)return e;for(let n=t.depth;n>=0;n--){let o=t.node(n).contentMatchAt(t.index(n)),i,s=[];if(e.forEach(a=>{if(!s)return;let c=o.findWrapping(a.type),u;if(!c)return s=null;if(u=s.length&&i.length&&B7(c,i,a,s[s.length-1],0))s[s.length-1]=u;else{s.length&&(s[s.length-1]=F7(s[s.length-1],i.length));let f=A7(a,c);s.push(f),o=o.matchType(f.type),i=c}}),s)return se.from(s)}return e}function A7(e,t,n=0){for(let r=t.length-1;r>=n;r--)e=t[r].create(null,se.from(e));return e}function B7(e,t,n,r,o){if(o1&&(i=0),o=n&&(a=t<0?s.contentMatchAt(0).fillBefore(a,i<=o).append(a):a.append(s.contentMatchAt(s.childCount).fillBefore(se.empty,!0))),e.replaceChild(t<0?0:e.childCount-1,s.copy(a))}function JT(e,t,n){return t]*>)*/.exec(e);t&&(e=e.slice(t[0].length));let n=H7().createElement("div"),r=/<([a-z][^>\s]+)/i.exec(e),o;if((o=r&&V7[r[1].toLowerCase()])&&(e=o.map(i=>"<"+i+">").join("")+e+o.map(i=>"").reverse().join("")),n.innerHTML=e,o)for(let i=0;i=0;a-=2){let c=n.nodes[r[a]];if(!c||c.hasRequiredAttrs())break;o=se.from(c.create(r[a+1],o)),i++,s++}return new ye(o,i,s)}const _r={},wr={},o_e={touchstart:!0,touchmove:!0};class i_e{constructor(){this.shiftKey=!1,this.mouseDown=null,this.lastKeyCode=null,this.lastKeyCodeTime=0,this.lastClick={time:0,x:0,y:0,type:""},this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastIOSEnter=0,this.lastIOSEnterFallbackTimeout=-1,this.lastFocus=0,this.lastTouch=0,this.lastAndroidDelete=0,this.composing=!1,this.composingTimeout=-1,this.compositionNodes=[],this.compositionEndedAt=-2e8,this.compositionID=1,this.compositionPendingChanges=0,this.domChangeCount=0,this.eventHandlers=Object.create(null),this.hideSelectionGuard=null}}function s_e(e){for(let t in _r){let n=_r[t];e.dom.addEventListener(t,e.input.eventHandlers[t]=r=>{l_e(e,r)&&!nO(e,r)&&(e.editable||!(r.type in wr))&&n(e,r)},o_e[t]?{passive:!0}:void 0)}yr&&e.dom.addEventListener("input",()=>null),_x(e)}function na(e,t){e.input.lastSelectionOrigin=t,e.input.lastSelectionTime=Date.now()}function a_e(e){e.domObserver.stop();for(let t in e.input.eventHandlers)e.dom.removeEventListener(t,e.input.eventHandlers[t]);clearTimeout(e.input.composingTimeout),clearTimeout(e.input.lastIOSEnterFallbackTimeout)}function _x(e){e.someProp("handleDOMEvents",t=>{for(let n in t)e.input.eventHandlers[n]||e.dom.addEventListener(n,e.input.eventHandlers[n]=r=>nO(e,r))})}function nO(e,t){return e.someProp("handleDOMEvents",n=>{let r=n[t.type];return r?r(e,t)||t.defaultPrevented:!1})}function l_e(e,t){if(!t.bubbles)return!0;if(t.defaultPrevented)return!1;for(let n=t.target;n!=e.dom;n=n.parentNode)if(!n||n.nodeType==11||n.pmViewDesc&&n.pmViewDesc.stopEvent(t))return!1;return!0}function c_e(e,t){!nO(e,t)&&_r[t.type]&&(e.editable||!(t.type in wr))&&_r[t.type](e,t)}wr.keydown=(e,t)=>{let n=t;if(e.input.shiftKey=n.keyCode==16||n.shiftKey,!U7(e,n)&&(e.input.lastKeyCode=n.keyCode,e.input.lastKeyCodeTime=Date.now(),!(Ko&&nr&&n.keyCode==13)))if(n.keyCode!=229&&e.domObserver.forceFlush(),mu&&n.keyCode==13&&!n.ctrlKey&&!n.altKey&&!n.metaKey){let r=Date.now();e.input.lastIOSEnter=r,e.input.lastIOSEnterFallbackTimeout=setTimeout(()=>{e.input.lastIOSEnter==r&&(e.someProp("handleKeyDown",o=>o(e,tl(13,"Enter"))),e.input.lastIOSEnter=0)},200)}else e.someProp("handleKeyDown",r=>r(e,n))||X1e(e,n)?n.preventDefault():na(e,"key")};wr.keyup=(e,t)=>{t.keyCode==16&&(e.input.shiftKey=!1)};wr.keypress=(e,t)=>{let n=t;if(U7(e,n)||!n.charCode||n.ctrlKey&&!n.altKey||$o&&n.metaKey)return;if(e.someProp("handleKeyPress",o=>o(e,n))){n.preventDefault();return}let r=e.state.selection;if(!(r instanceof Ve)||!r.$from.sameParent(r.$to)){let o=String.fromCharCode(n.charCode);!/[\r\n]/.test(o)&&!e.someProp("handleTextInput",i=>i(e,r.$from.pos,r.$to.pos,o))&&e.dispatch(e.state.tr.insertText(o).scrollIntoView()),n.preventDefault()}};function q0(e){return{left:e.clientX,top:e.clientY}}function u_e(e,t){let n=t.x-e.clientX,r=t.y-e.clientY;return n*n+r*r<100}function rO(e,t,n,r,o){if(r==-1)return!1;let i=e.state.doc.resolve(r);for(let s=i.depth+1;s>0;s--)if(e.someProp(t,a=>s>i.depth?a(e,n,i.nodeAfter,i.before(s),o,!0):a(e,n,i.node(s),i.before(s),o,!1)))return!0;return!1}function qc(e,t,n){e.focused||e.focus();let r=e.state.tr.setSelection(t);n=="pointer"&&r.setMeta("pointer",!0),e.dispatch(r)}function d_e(e,t){if(t==-1)return!1;let n=e.state.doc.resolve(t),r=n.nodeAfter;return r&&r.isAtom&&Le.isSelectable(r)?(qc(e,new Le(n),"pointer"),!0):!1}function f_e(e,t){if(t==-1)return!1;let n=e.state.selection,r,o;n instanceof Le&&(r=n.node);let i=e.state.doc.resolve(t);for(let s=i.depth+1;s>0;s--){let a=s>i.depth?i.nodeAfter:i.node(s);if(Le.isSelectable(a)){r&&n.$from.depth>0&&s>=n.$from.depth&&i.before(n.$from.depth+1)==n.$from.pos?o=i.before(n.$from.depth):o=i.before(s);break}}return o!=null?(qc(e,Le.create(e.state.doc,o),"pointer"),!0):!1}function p_e(e,t,n,r,o){return rO(e,"handleClickOn",t,n,r)||e.someProp("handleClick",i=>i(e,t,r))||(o?f_e(e,n):d_e(e,n))}function h_e(e,t,n,r){return rO(e,"handleDoubleClickOn",t,n,r)||e.someProp("handleDoubleClick",o=>o(e,t,r))}function m_e(e,t,n,r){return rO(e,"handleTripleClickOn",t,n,r)||e.someProp("handleTripleClick",o=>o(e,t,r))||g_e(e,n,r)}function g_e(e,t,n){if(n.button!=0)return!1;let r=e.state.doc;if(t==-1)return r.inlineContent?(qc(e,Ve.create(r,0,r.content.size),"pointer"),!0):!1;let o=r.resolve(t);for(let i=o.depth+1;i>0;i--){let s=i>o.depth?o.nodeAfter:o.node(i),a=o.before(i);if(s.inlineContent)qc(e,Ve.create(r,a+1,a+1+s.content.size),"pointer");else if(Le.isSelectable(s))qc(e,Le.create(r,a),"pointer");else continue;return!0}}function oO(e){return Vv(e)}const W7=$o?"metaKey":"ctrlKey";_r.mousedown=(e,t)=>{let n=t;e.input.shiftKey=n.shiftKey;let r=oO(e),o=Date.now(),i="singleClick";o-e.input.lastClick.time<500&&u_e(n,e.input.lastClick)&&!n[W7]&&(e.input.lastClick.type=="singleClick"?i="doubleClick":e.input.lastClick.type=="doubleClick"&&(i="tripleClick")),e.input.lastClick={time:o,x:n.clientX,y:n.clientY,type:i};let s=e.posAtCoords(q0(n));s&&(i=="singleClick"?(e.input.mouseDown&&e.input.mouseDown.done(),e.input.mouseDown=new v_e(e,s,n,!!r)):(i=="doubleClick"?h_e:m_e)(e,s.pos,s.inside,n)?n.preventDefault():na(e,"pointer"))};class v_e{constructor(t,n,r,o){this.view=t,this.pos=n,this.event=r,this.flushed=o,this.delayedSelectionSync=!1,this.mightDrag=null,this.startDoc=t.state.doc,this.selectNode=!!r[W7],this.allowDefault=r.shiftKey;let i,s;if(n.inside>-1)i=t.state.doc.nodeAt(n.inside),s=n.inside;else{let f=t.state.doc.resolve(n.pos);i=f.parent,s=f.depth?f.before():0}const a=o?null:r.target,c=a?t.docView.nearestDesc(a,!0):null;this.target=c?c.dom:null;let{selection:u}=t.state;(r.button==0&&i.type.spec.draggable&&i.type.spec.selectable!==!1||u instanceof Le&&u.from<=s&&u.to>s)&&(this.mightDrag={node:i,pos:s,addAttr:!!(this.target&&!this.target.draggable),setUneditable:!!(this.target&&oi&&!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()),t.root.addEventListener("mouseup",this.up=this.up.bind(this)),t.root.addEventListener("mousemove",this.move=this.move.bind(this)),na(t,"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(()=>ds(this.view)),this.view.input.mouseDown=null}up(t){if(this.done(),!this.view.dom.contains(t.target))return;let n=this.pos;this.view.state.doc!=this.startDoc&&(n=this.view.posAtCoords(q0(t))),this.updateAllowDefault(t),this.allowDefault||!n?na(this.view,"pointer"):p_e(this.view,n.pos,n.inside,t,this.selectNode)?t.preventDefault():t.button==0&&(this.flushed||yr&&this.mightDrag&&!this.mightDrag.node.isAtom||nr&&!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)?(qc(this.view,Ze.near(this.view.state.doc.resolve(n.pos)),"pointer"),t.preventDefault()):na(this.view,"pointer")}move(t){this.updateAllowDefault(t),na(this.view,"pointer"),t.buttons==0&&this.done()}updateAllowDefault(t){!this.allowDefault&&(Math.abs(this.event.x-t.clientX)>4||Math.abs(this.event.y-t.clientY)>4)&&(this.allowDefault=!0)}}_r.touchstart=e=>{e.input.lastTouch=Date.now(),oO(e),na(e,"pointer")};_r.touchmove=e=>{e.input.lastTouch=Date.now(),na(e,"pointer")};_r.contextmenu=e=>oO(e);function U7(e,t){return e.composing?!0:yr&&Math.abs(t.timeStamp-e.input.compositionEndedAt)<500?(e.input.compositionEndedAt=-2e8,!0):!1}const y_e=Ko?5e3:-1;wr.compositionstart=wr.compositionupdate=e=>{if(!e.composing){e.domObserver.flush();let{state:t}=e,n=t.selection.$from;if(t.selection.empty&&(t.storedMarks||!n.textOffset&&n.parentOffset&&n.nodeBefore.marks.some(r=>r.type.spec.inclusive===!1)))e.markCursor=e.state.storedMarks||n.marks(),Vv(e,!0),e.markCursor=null;else if(Vv(e),oi&&t.selection.empty&&n.parentOffset&&!n.textOffset&&n.nodeBefore.marks.length){let r=e.domSelectionRange();for(let o=r.focusNode,i=r.focusOffset;o&&o.nodeType==1&&i!=0;){let s=i<0?o.lastChild:o.childNodes[i-1];if(!s)break;if(s.nodeType==3){e.domSelection().collapse(s,s.nodeValue.length);break}else o=s,i=-1}}e.input.composing=!0}Z7(e,y_e)};wr.compositionend=(e,t)=>{e.composing&&(e.input.composing=!1,e.input.compositionEndedAt=t.timeStamp,e.input.compositionPendingChanges=e.domObserver.pendingRecords().length?e.input.compositionID:0,e.input.compositionPendingChanges&&Promise.resolve().then(()=>e.domObserver.flush()),e.input.compositionID++,Z7(e,20))};function Z7(e,t){clearTimeout(e.input.composingTimeout),t>-1&&(e.input.composingTimeout=setTimeout(()=>Vv(e),t))}function G7(e){for(e.composing&&(e.input.composing=!1,e.input.compositionEndedAt=__e());e.input.compositionNodes.length>0;)e.input.compositionNodes.pop().markParentsDirty()}function __e(){let e=document.createEvent("Event");return e.initEvent("event",!0,!0),e.timeStamp}function Vv(e,t=!1){if(!(Ko&&e.domObserver.flushingSoon>=0)){if(e.domObserver.forceFlush(),G7(e),t||e.docView&&e.docView.dirty){let n=eO(e);return n&&!n.eq(e.state.selection)?e.dispatch(e.state.tr.setSelection(n)):e.updateState(e.state),!0}return!1}}function w_e(e,t){if(!e.dom.parentNode)return;let n=e.dom.parentNode.appendChild(document.createElement("div"));n.appendChild(t),n.style.cssText="position: fixed; left: -10000px; top: 10px";let r=getSelection(),o=document.createRange();o.selectNodeContents(t),e.dom.blur(),r.removeAllRanges(),r.addRange(o),setTimeout(()=>{n.parentNode&&n.parentNode.removeChild(n),e.focus()},50)}const gu=Hr&&va<15||mu&&v1e<604;_r.copy=wr.cut=(e,t)=>{let n=t,r=e.state.selection,o=n.type=="cut";if(r.empty)return;let i=gu?null:n.clipboardData,s=r.content(),{dom:a,text:c}=R7(e,s);i?(n.preventDefault(),i.clearData(),i.setData("text/html",a.innerHTML),i.setData("text/plain",c)):w_e(e,a),o&&e.dispatch(e.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent","cut"))};function b_e(e){return e.openStart==0&&e.openEnd==0&&e.content.childCount==1?e.content.firstChild:null}function x_e(e,t){if(!e.dom.parentNode)return;let n=e.input.shiftKey||e.state.selection.$from.parent.type.spec.code,r=e.dom.parentNode.appendChild(document.createElement(n?"textarea":"div"));n||(r.contentEditable="true"),r.style.cssText="position: fixed; left: -10000px; top: 10px",r.focus();let o=e.input.shiftKey&&e.input.lastKeyCode!=45;setTimeout(()=>{e.focus(),r.parentNode&&r.parentNode.removeChild(r),n?_f(e,r.value,null,o,t):_f(e,r.textContent,r.innerHTML,o,t)},50)}function _f(e,t,n,r,o){let i=z7(e,t,n,r,e.state.selection.$from);if(e.someProp("handlePaste",c=>c(e,o,i||ye.empty)))return!0;if(!i)return!1;let s=b_e(i),a=s?e.state.tr.replaceSelectionWith(s,r):e.state.tr.replaceSelection(i);return e.dispatch(a.scrollIntoView().setMeta("paste",!0).setMeta("uiEvent","paste")),!0}wr.paste=(e,t)=>{let n=t;if(e.composing&&!Ko)return;let r=gu?null:n.clipboardData,o=e.input.shiftKey&&e.input.lastKeyCode!=45;r&&_f(e,r.getData("text/plain"),r.getData("text/html"),o,n)?n.preventDefault():x_e(e,n)};class S_e{constructor(t,n){this.slice=t,this.move=n}}const Y7=$o?"altKey":"ctrlKey";_r.dragstart=(e,t)=>{let n=t,r=e.input.mouseDown;if(r&&r.done(),!n.dataTransfer)return;let o=e.state.selection,i=o.empty?null:e.posAtCoords(q0(n));if(!(i&&i.pos>=o.from&&i.pos<=(o instanceof Le?o.to-1:o.to))){if(r&&r.mightDrag)e.dispatch(e.state.tr.setSelection(Le.create(e.state.doc,r.mightDrag.pos)));else if(n.target&&n.target.nodeType==1){let u=e.docView.nearestDesc(n.target,!0);u&&u.node.type.spec.draggable&&u!=e.docView&&e.dispatch(e.state.tr.setSelection(Le.create(e.state.doc,u.posBefore)))}}let s=e.state.selection.content(),{dom:a,text:c}=R7(e,s);n.dataTransfer.clearData(),n.dataTransfer.setData(gu?"Text":"text/html",a.innerHTML),n.dataTransfer.effectAllowed="copyMove",gu||n.dataTransfer.setData("text/plain",c),e.dragging=new S_e(s,!n[Y7])};_r.dragend=e=>{let t=e.dragging;window.setTimeout(()=>{e.dragging==t&&(e.dragging=null)},50)};wr.dragover=wr.dragenter=(e,t)=>t.preventDefault();wr.drop=(e,t)=>{let n=t,r=e.dragging;if(e.dragging=null,!n.dataTransfer)return;let o=e.posAtCoords(q0(n));if(!o)return;let i=e.state.doc.resolve(o.pos),s=r&&r.slice;s?e.someProp("transformPasted",y=>{s=y(s,e)}):s=z7(e,n.dataTransfer.getData(gu?"Text":"text/plain"),gu?null:n.dataTransfer.getData("text/html"),!1,i);let a=!!(r&&!n[Y7]);if(e.someProp("handleDrop",y=>y(e,n,s||ye.empty,a))){n.preventDefault();return}if(!s)return;n.preventDefault();let c=s?p7(e.state.doc,i.pos,s):i.pos;c==null&&(c=i.pos);let u=e.state.tr;a&&u.deleteSelection();let f=u.mapping.map(c),p=s.openStart==0&&s.openEnd==0&&s.content.childCount==1,g=u.doc;if(p?u.replaceRangeWith(f,f,s.content.firstChild):u.replaceRange(f,f,s),u.doc.eq(g))return;let v=u.doc.resolve(f);if(p&&Le.isSelectable(s.content.firstChild)&&v.nodeAfter&&v.nodeAfter.sameMarkup(s.content.firstChild))u.setSelection(new Le(v));else{let y=u.mapping.map(c);u.mapping.maps[u.mapping.maps.length-1].forEach((w,P,x,S)=>y=S),u.setSelection(tO(e,v,u.doc.resolve(y)))}e.focus(),e.dispatch(u.setMeta("uiEvent","drop"))};_r.focus=e=>{e.input.lastFocus=Date.now(),e.focused||(e.domObserver.stop(),e.dom.classList.add("ProseMirror-focused"),e.domObserver.start(),e.focused=!0,setTimeout(()=>{e.docView&&e.hasFocus()&&!e.domObserver.currentSelection.eq(e.domSelectionRange())&&ds(e)},20))};_r.blur=(e,t)=>{let n=t;e.focused&&(e.domObserver.stop(),e.dom.classList.remove("ProseMirror-focused"),e.domObserver.start(),n.relatedTarget&&e.dom.contains(n.relatedTarget)&&e.domObserver.currentSelection.clear(),e.focused=!1)};_r.beforeinput=(e,t)=>{if(nr&&Ko&&t.inputType=="deleteContentBackward"){e.domObserver.flushSoon();let{domChangeCount:r}=e.input;setTimeout(()=>{if(e.input.domChangeCount!=r||(e.dom.blur(),e.focus(),e.someProp("handleKeyDown",i=>i(e,tl(8,"Backspace")))))return;let{$cursor:o}=e.state.selection;o&&o.pos>0&&e.dispatch(e.state.tr.delete(o.pos-1,o.pos).scrollIntoView())},50)}};for(let e in wr)_r[e]=wr[e];function wf(e,t){if(e==t)return!0;for(let n in e)if(e[n]!==t[n])return!1;for(let n in t)if(!(n in e))return!1;return!0}class Hv{constructor(t,n){this.toDOM=t,this.spec=n||Sl,this.side=this.spec.side||0}map(t,n,r,o){let{pos:i,deleted:s}=t.mapResult(n.from+o,this.side<0?-1:1);return s?null:new jo(i-r,i-r,this)}valid(){return!0}eq(t){return this==t||t instanceof Hv&&(this.spec.key&&this.spec.key==t.spec.key||this.toDOM==t.toDOM&&wf(this.spec,t.spec))}destroy(t){this.spec.destroy&&this.spec.destroy(t)}}class _a{constructor(t,n){this.attrs=t,this.spec=n||Sl}map(t,n,r,o){let i=t.map(n.from+o,this.spec.inclusiveStart?-1:1)-r,s=t.map(n.to+o,this.spec.inclusiveEnd?1:-1)-r;return i>=s?null:new jo(i,s,this)}valid(t,n){return n.from=t&&(!i||i(a.spec))&&r.push(a.copy(a.from+o,a.to+o))}for(let s=0;st){let a=this.children[s]+1;this.children[s+2].findInner(t-a,n-a,r,o+a,i)}}map(t,n,r){return this==Qn||t.maps.length==0?this:this.mapInner(t,n,0,0,r||Sl)}mapInner(t,n,r,o,i){let s;for(let a=0;a{let u=c+r,f;if(f=q7(n,a,u)){for(o||(o=this.children.slice());ia&&p.to=t){this.children[a]==t&&(r=this.children[a+2]);break}let i=t+1,s=i+n.content.size;for(let a=0;ai&&c.type instanceof _a){let u=Math.max(i,c.from)-i,f=Math.min(s,c.to)-i;uo.map(t,n,Sl));return Ys.from(r)}forChild(t,n){if(n.isLeaf)return gn.empty;let r=[];for(let o=0;on instanceof gn)?t:t.reduce((n,r)=>n.concat(r instanceof gn?r:r.members),[]))}}}function P_e(e,t,n,r,o,i,s){let a=e.slice();for(let u=0,f=i;u{let P=w-y-(v-g);for(let x=0;xS+f-p)continue;let O=a[x]+f-p;v>=O?a[x+1]=g<=O?-2:-1:y>=o&&P&&(a[x]+=P,a[x+1]+=P)}p+=P}),f=n.maps[u].map(f,-1)}let c=!1;for(let u=0;u=r.content.size){c=!0;continue}let g=n.map(e[u+1]+i,-1),v=g-o,{index:y,offset:w}=r.content.findIndex(p),P=r.maybeChild(y);if(P&&w==p&&w+P.nodeSize==v){let x=a[u+2].mapInner(n,P,f+1,e[u]+i+1,s);x!=Qn?(a[u]=p,a[u+1]=v,a[u+2]=x):(a[u+1]=-2,c=!0)}else c=!0}if(c){let u=O_e(a,e,t,n,o,i,s),f=Wv(u,r,0,s);t=f.local;for(let p=0;pn&&s.to{let u=q7(e,a,c+n);if(u){i=!0;let f=Wv(u,a,n+c+1,r);f!=Qn&&o.push(c,c+a.nodeSize,f)}});let s=K7(i?J7(e):e,-n).sort(Pl);for(let a=0;a0;)t++;e.splice(t,0,n)}function aw(e){let t=[];return e.someProp("decorations",n=>{let r=n(e.state);r&&r!=Qn&&t.push(r)}),e.cursorWrapper&&t.push(gn.create(e.state.doc,[e.cursorWrapper.deco])),Ys.from(t)}const C_e={childList:!0,characterData:!0,characterDataOldValue:!0,attributes:!0,attributeOldValue:!0,subtree:!0},k_e=Hr&&va<=11;class E_e{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}set(t){this.anchorNode=t.anchorNode,this.anchorOffset=t.anchorOffset,this.focusNode=t.focusNode,this.focusOffset=t.focusOffset}clear(){this.anchorNode=this.focusNode=null}eq(t){return t.anchorNode==this.anchorNode&&t.anchorOffset==this.anchorOffset&&t.focusNode==this.focusNode&&t.focusOffset==this.focusOffset}}class $_e{constructor(t,n){this.view=t,this.handleDOMChange=n,this.queue=[],this.flushingSoon=-1,this.observer=null,this.currentSelection=new E_e,this.onCharData=null,this.suppressingSelectionUpdates=!1,this.observer=window.MutationObserver&&new window.MutationObserver(r=>{for(let o=0;oo.type=="childList"&&o.removedNodes.length||o.type=="characterData"&&o.oldValue.length>o.target.nodeValue.length)?this.flushSoon():this.flush()}),k_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,C_e)),this.onCharData&&this.view.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.connectSelection()}stop(){if(this.observer){let t=this.observer.takeRecords();if(t.length){for(let n=0;nthis.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(UT(this.view)){if(this.suppressingSelectionUpdates)return ds(this.view);if(Hr&&va<=11&&!this.view.state.selection.empty){let t=this.view.domSelectionRange();if(t.focusNode&&Il(t.focusNode,t.focusOffset,t.anchorNode,t.anchorOffset))return this.flushSoon()}this.flush()}}setCurSelection(){this.currentSelection.set(this.view.domSelectionRange())}ignoreSelectionChange(t){if(!t.focusNode)return!0;let n=new Set,r;for(let i=t.focusNode;i;i=yf(i))n.add(i);for(let i=t.anchorNode;i;i=yf(i))if(n.has(i)){r=i;break}let o=r&&this.view.docView.nearestDesc(r);if(o&&o.ignoreMutation({type:"selection",target:r.nodeType==3?r.parentNode:r}))return this.setCurSelection(),!0}pendingRecords(){if(this.observer)for(let t of this.observer.takeRecords())this.queue.push(t);return this.queue}flush(){let{view:t}=this;if(!t.docView||this.flushingSoon>-1)return;let n=this.pendingRecords();n.length&&(this.queue=[]);let r=t.domSelectionRange(),o=!this.suppressingSelectionUpdates&&!this.currentSelection.eq(r)&&UT(t)&&!this.ignoreSelectionChange(r),i=-1,s=-1,a=!1,c=[];if(t.editable)for(let f=0;f1){let f=c.filter(p=>p.nodeName=="BR");if(f.length==2){let p=f[0],g=f[1];p.parentNode&&p.parentNode.parentNode==g.parentNode?g.remove():p.remove()}}let u=null;i<0&&o&&t.input.lastFocus>Date.now()-200&&Math.max(t.input.lastTouch,t.input.lastClick.time)-1||o)&&(i>-1&&(t.docView.markDirty(i,s),M_e(t)),this.handleDOMChange(i,s,a,c),t.docView&&t.docView.dirty?t.updateState(t.state):this.currentSelection.eq(r)||ds(t),this.currentSelection.set(r))}registerMutation(t,n){if(n.indexOf(t.target)>-1)return null;let r=this.view.docView.nearestDesc(t.target);if(t.type=="attributes"&&(r==this.view.docView||t.attributeName=="contenteditable"||t.attributeName=="style"&&!t.oldValue&&!t.target.getAttribute("style"))||!r||r.ignoreMutation(t))return null;if(t.type=="childList"){for(let f=0;fo;P--){let x=r.childNodes[P-1],S=x.pmViewDesc;if(x.nodeName=="BR"&&!S){i=P;break}if(!S||S.size)break}let p=e.state.doc,g=e.someProp("domParser")||fu.fromSchema(e.state.schema),v=p.resolve(s),y=null,w=g.parse(r,{topNode:v.parent,topMatch:v.parent.contentMatchAt(v.index()),topOpen:!0,from:o,to:i,preserveWhitespace:v.parent.type.whitespace=="pre"?"full":!0,findPositions:u,ruleFromNode:I_e,context:v});if(u&&u[0].pos!=null){let P=u[0].pos,x=u[1]&&u[1].pos;x==null&&(x=P),y={anchor:P+s,head:x+s}}return{doc:w,sel:y,from:s,to:a}}function I_e(e){let t=e.pmViewDesc;if(t)return t.parseRule();if(e.nodeName=="BR"&&e.parentNode){if(yr&&/^(ul|ol)$/i.test(e.parentNode.nodeName)){let n=document.createElement("div");return n.appendChild(document.createElement("li")),{skip:n}}else if(e.parentNode.lastChild==e||yr&&/^(tr|table)$/i.test(e.parentNode.nodeName))return{ignore:!0}}else if(e.nodeName=="IMG"&&e.getAttribute("mark-placeholder"))return{ignore:!0};return null}const j_e=/^(a|abbr|acronym|b|bd[io]|big|br|button|cite|code|data(list)?|del|dfn|em|i|ins|kbd|label|map|mark|meter|output|q|ruby|s|samp|small|span|strong|su[bp]|time|u|tt|var)$/i;function L_e(e,t,n,r,o){let i=e.input.compositionPendingChanges||(e.composing?e.input.compositionID:0);if(e.input.compositionPendingChanges=0,t<0){let B=e.input.lastSelectionTime>Date.now()-50?e.input.lastSelectionOrigin:null,z=eO(e,B);if(z&&!e.state.selection.eq(z)){if(nr&&Ko&&e.input.lastKeyCode===13&&Date.now()-100X(e,tl(13,"Enter"))))return;let G=e.state.tr.setSelection(z);B=="pointer"?G.setMeta("pointer",!0):B=="key"&&G.scrollIntoView(),i&&G.setMeta("composition",i),e.dispatch(G)}return}let s=e.state.doc.resolve(t),a=s.sharedDepth(n);t=s.before(a+1),n=e.state.doc.resolve(n).after(a+1);let c=e.state.selection,u=T_e(e,t,n),f=e.state.doc,p=f.slice(u.from,u.to),g,v;e.input.lastKeyCode===8&&Date.now()-100Date.now()-225||Ko)&&o.some(B=>B.nodeType==1&&!j_e.test(B.nodeName))&&(!y||y.endA>=y.endB)&&e.someProp("handleKeyDown",B=>B(e,tl(13,"Enter")))){e.input.lastIOSEnter=0;return}if(!y)if(r&&c instanceof Ve&&!c.empty&&c.$head.sameParent(c.$anchor)&&!e.composing&&!(u.sel&&u.sel.anchor!=u.sel.head))y={start:c.from,endA:c.to,endB:c.to};else{if(u.sel){let B=nI(e,e.state.doc,u.sel);if(B&&!B.eq(e.state.selection)){let z=e.state.tr.setSelection(B);i&&z.setMeta("composition",i),e.dispatch(z)}}return}if(nr&&e.cursorWrapper&&u.sel&&u.sel.anchor==e.cursorWrapper.deco.from&&u.sel.head==u.sel.anchor){let B=y.endB-y.start;u.sel={anchor:u.sel.anchor+B,head:u.sel.anchor+B}}e.input.domChangeCount++,e.state.selection.frome.state.selection.from&&y.start<=e.state.selection.from+2&&e.state.selection.from>=u.from?y.start=e.state.selection.from:y.endA=e.state.selection.to-2&&e.state.selection.to<=u.to&&(y.endB+=e.state.selection.to-y.endA,y.endA=e.state.selection.to)),Hr&&va<=11&&y.endB==y.start+1&&y.endA==y.start&&y.start>u.from&&u.doc.textBetween(y.start-u.from-1,y.start-u.from+1)=="  "&&(y.start--,y.endA--,y.endB--);let w=u.doc.resolveNoCache(y.start-u.from),P=u.doc.resolveNoCache(y.endB-u.from),x=f.resolve(y.start),S=w.sameParent(P)&&w.parent.inlineContent&&x.end()>=y.endA,O;if((mu&&e.input.lastIOSEnter>Date.now()-225&&(!S||o.some(B=>B.nodeName=="DIV"||B.nodeName=="P"))||!S&&w.posB(e,tl(13,"Enter")))){e.input.lastIOSEnter=0;return}if(e.state.selection.anchor>y.start&&R_e(f,y.start,y.endA,w,P)&&e.someProp("handleKeyDown",B=>B(e,tl(8,"Backspace")))){Ko&&nr&&e.domObserver.suppressSelectionUpdates();return}nr&&Ko&&y.endB==y.start&&(e.input.lastAndroidDelete=Date.now()),Ko&&!S&&w.start()!=P.start()&&P.parentOffset==0&&w.depth==P.depth&&u.sel&&u.sel.anchor==u.sel.head&&u.sel.head==y.endA&&(y.endB-=2,P=u.doc.resolveNoCache(y.endB-u.from),setTimeout(()=>{e.someProp("handleKeyDown",function(B){return B(e,tl(13,"Enter"))})},20));let E=y.start,$=y.endA,N,I,R;if(S){if(w.pos==P.pos)Hr&&va<=11&&w.parentOffset==0&&(e.domObserver.suppressSelectionUpdates(),setTimeout(()=>ds(e),20)),N=e.state.tr.delete(E,$),I=f.resolve(y.start).marksAcross(f.resolve(y.endA));else if(y.endA==y.endB&&(R=D_e(w.parent.content.cut(w.parentOffset,P.parentOffset),x.parent.content.cut(x.parentOffset,y.endA-x.start()))))N=e.state.tr,R.type=="add"?N.addMark(E,$,R.mark):N.removeMark(E,$,R.mark);else if(w.parent.child(w.index()).isText&&w.index()==P.index()-(P.textOffset?0:1)){let B=w.parent.textBetween(w.parentOffset,P.parentOffset);if(e.someProp("handleTextInput",z=>z(e,E,$,B)))return;N=e.state.tr.insertText(B,E,$)}}if(N||(N=e.state.tr.replace(E,$,u.doc.slice(y.start-u.from,y.endB-u.from))),u.sel){let B=nI(e,N.doc,u.sel);B&&!(nr&&Ko&&e.composing&&B.empty&&(y.start!=y.endB||e.input.lastAndroidDeletet.content.size?null:tO(e,t.resolve(n.anchor),t.resolve(n.head))}function D_e(e,t){let n=e.firstChild.marks,r=t.firstChild.marks,o=n,i=r,s,a,c;for(let f=0;ff.mark(a.addToSet(f.marks));else if(o.length==0&&i.length==1)a=i[0],s="remove",c=f=>f.mark(a.removeFromSet(f.marks));else return null;let u=[];for(let f=0;fn||lw(s,!0,!1)0&&(t||e.indexAfter(r)==e.node(r).childCount);)r--,o++,t=!1;if(n){let i=e.node(r).maybeChild(e.indexAfter(r));for(;i&&!i.isLeaf;)i=i.firstChild,o++}return o}function z_e(e,t,n,r,o){let i=e.findDiffStart(t,n);if(i==null)return null;let{a:s,b:a}=e.findDiffEnd(t,n+e.size,n+t.size);if(o=="end"){let c=Math.max(0,i-Math.min(s,a));r-=s+c-i}if(s=s?i-r:0;i-=c,a=i+(a-s),s=i}else if(a=a?i-r:0;i-=c,s=i+(s-a),a=i}return{start:i,endA:s,endB:a}}class A_e{constructor(t,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 i_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(aI),this.dispatch=this.dispatch.bind(this),this.dom=t&&t.mount||document.createElement("div"),t&&(t.appendChild?t.appendChild(this.dom):typeof t=="function"?t(this.dom):t.mount&&(this.mounted=!0)),this.editable=iI(this),oI(this),this.nodeViews=sI(this),this.docView=AT(this.state.doc,rI(this),aw(this),this.dom,this),this.domObserver=new $_e(this,(r,o,i,s)=>L_e(this,r,o,i,s)),this.domObserver.start(),s_e(this),this.updatePluginViews()}get composing(){return this.input.composing}get props(){if(this._props.state!=this.state){let t=this._props;this._props={};for(let n in t)this._props[n]=t[n];this._props.state=this.state}return this._props}update(t){t.handleDOMEvents!=this._props.handleDOMEvents&&_x(this);let n=this._props;this._props=t,t.plugins&&(t.plugins.forEach(aI),this.directPlugins=t.plugins),this.updateStateInner(t.state,n)}setProps(t){let n={};for(let r in this._props)n[r]=this._props[r];n.state=this.state;for(let r in t)n[r]=t[r];this.update(n)}updateState(t){this.updateStateInner(t,this._props)}updateStateInner(t,n){let r=this.state,o=!1,i=!1;t.storedMarks&&this.composing&&(G7(this),i=!0),this.state=t;let s=r.plugins!=t.plugins||this._props.plugins!=n.plugins;if(s||this._props.plugins!=n.plugins||this._props.nodeViews!=n.nodeViews){let g=sI(this);F_e(g,this.nodeViews)&&(this.nodeViews=g,o=!0)}(s||n.handleDOMEvents!=this._props.handleDOMEvents)&&_x(this),this.editable=iI(this),oI(this);let a=aw(this),c=rI(this),u=r.plugins!=t.plugins&&!r.doc.eq(t.doc)?"reset":t.scrollToSelection>r.scrollToSelection?"to selection":"preserve",f=o||!this.docView.matchesNode(t.doc,c,a);(f||!t.selection.eq(r.selection))&&(i=!0);let p=u=="preserve"&&i&&this.dom.style.overflowAnchor==null&&w1e(this);if(i){this.domObserver.stop();let g=f&&(Hr||nr)&&!this.composing&&!r.selection.empty&&!t.selection.empty&&B_e(r.selection,t.selection);if(f){let v=nr?this.trackWrites=this.domSelectionRange().focusNode:null;(o||!this.docView.update(t.doc,c,a,this))&&(this.docView.updateOuterDeco([]),this.docView.destroy(),this.docView=AT(t.doc,c,a,this.dom,this)),v&&!this.trackWrites&&(g=!0)}g||!(this.input.mouseDown&&this.domObserver.currentSelection.eq(this.domSelectionRange())&&U1e(this))?ds(this,g):(j7(this,t.selection),this.domObserver.setCurSelection()),this.domObserver.start()}this.updatePluginViews(r),u=="reset"?this.dom.scrollTop=0:u=="to selection"?this.scrollToSelection():p&&b1e(p)}scrollToSelection(){let t=this.domSelectionRange().focusNode;if(!this.someProp("handleScrollToSelection",n=>n(this)))if(this.state.selection instanceof Le){let n=this.docView.domAfterPos(this.state.selection.from);n.nodeType==1&&IT(this,n.getBoundingClientRect(),t)}else IT(this,this.coordsAtPos(this.state.selection.head,1),t)}destroyPluginViews(){let t;for(;t=this.pluginViews.pop();)t.destroy&&t.destroy()}updatePluginViews(t){if(!t||t.plugins!=this.state.plugins||this.directPlugins!=this.prevDirectPlugins){this.prevDirectPlugins=this.directPlugins,this.destroyPluginViews();for(let n=0;nn.ownerDocument.getSelection()),this._root=n}return t||document}updateRoot(){this._root=null}posAtCoords(t){return k1e(this,t)}coordsAtPos(t,n=1){return C7(this,t,n)}domAtPos(t,n=0){return this.docView.domFromPos(t,n)}nodeDOM(t){let n=this.docView.descAt(t);return n?n.nodeDOM:null}posAtDOM(t,n,r=-1){let o=this.docView.posFromDOM(t,n,r);if(o==null)throw new RangeError("DOM position not inside the editor");return o}endOfTextblock(t,n){return T1e(this,n||this.state,t)}pasteHTML(t,n){return _f(this,"",t,!1,n||new ClipboardEvent("paste"))}pasteText(t,n){return _f(this,t,null,!0,n||new ClipboardEvent("paste"))}destroy(){this.docView&&(a_e(this),this.destroyPluginViews(),this.mounted?(this.docView.update(this.state.doc,[],aw(this),this),this.dom.textContent=""):this.dom.parentNode&&this.dom.parentNode.removeChild(this.dom),this.docView.destroy(),this.docView=null)}get isDestroyed(){return this.docView==null}dispatchEvent(t){return c_e(this,t)}dispatch(t){let n=this._props.dispatchTransaction;n?n.call(this,t):this.updateState(this.state.apply(t))}domSelectionRange(){return yr&&this.root.nodeType===11&&p1e(this.dom.ownerDocument)==this.dom?N_e(this):this.domSelection()}domSelection(){return this.root.getSelection()}}function rI(e){let t=Object.create(null);return t.class="ProseMirror",t.contenteditable=String(e.editable),e.someProp("attributes",n=>{if(typeof n=="function"&&(n=n(e.state)),n)for(let r in n)r=="class"?t.class+=" "+n[r]:r=="style"?t.style=(t.style?t.style+";":"")+n[r]:!t[r]&&r!="contenteditable"&&r!="nodeName"&&(t[r]=String(n[r]))}),t.translate||(t.translate="no"),[jo.node(0,e.state.doc.content.size,t)]}function oI(e){if(e.markCursor){let t=document.createElement("img");t.className="ProseMirror-separator",t.setAttribute("mark-placeholder","true"),t.setAttribute("alt",""),e.cursorWrapper={dom:t,deco:jo.widget(e.state.selection.head,t,{raw:!0,marks:e.markCursor})}}else e.cursorWrapper=null}function iI(e){return!e.someProp("editable",t=>t(e.state)===!1)}function B_e(e,t){let n=Math.min(e.$anchor.sharedDepth(e.head),t.$anchor.sharedDepth(t.head));return e.$anchor.start(n)!=t.$anchor.start(n)}function sI(e){let t=Object.create(null);function n(r){for(let o in r)Object.prototype.hasOwnProperty.call(t,o)||(t[o]=r[o])}return e.someProp("nodeViews",n),e.someProp("markViews",n),t}function F_e(e,t){let n=0,r=0;for(let o in e){if(e[o]!=t[o])return!0;n++}for(let o in t)r++;return n!=r}function aI(e){if(e.spec.state||e.spec.filterTransaction||e.spec.appendTransaction)throw new RangeError("Plugins passed directly to the view must not have a state component")}var Ca={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:"'"},Uv={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},V_e=typeof navigator<"u"&&/Mac/.test(navigator.platform),H_e=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);for(var An=0;An<10;An++)Ca[48+An]=Ca[96+An]=String(An);for(var An=1;An<=24;An++)Ca[An+111]="F"+An;for(var An=65;An<=90;An++)Ca[An]=String.fromCharCode(An+32),Uv[An]=String.fromCharCode(An);for(var cw in Ca)Uv.hasOwnProperty(cw)||(Uv[cw]=Ca[cw]);function W_e(e){var t=V_e&&e.metaKey&&e.shiftKey&&!e.ctrlKey&&!e.altKey||H_e&&e.shiftKey&&e.key&&e.key.length==1||e.key=="Unidentified",n=!t&&e.key||(e.shiftKey?Uv:Ca)[e.keyCode]||e.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 U_e=typeof navigator<"u"?/Mac|iP(hone|[oa]d)/.test(navigator.platform):!1;function Z_e(e){let t=e.split(/-(?!$)/),n=t[t.length-1];n=="Space"&&(n=" ");let r,o,i,s;for(let a=0;a127)&&(i=Ca[r.keyCode])&&i!=o){let a=t[uw(i,r)];if(a&&a(n.state,n.dispatch,n))return!0}}return!1}}const K_e=(e,t)=>e.selection.empty?!1:(t&&t(e.tr.deleteSelection().scrollIntoView()),!0);function q_e(e,t){let{$cursor:n}=e.selection;return!n||(t?!t.endOfTextblock("backward",e):n.parentOffset>0)?null:n}const J_e=(e,t,n)=>{let r=q_e(e,n);if(!r)return!1;let o=Q7(r);if(!o){let s=r.blockRange(),a=s&&$u(s);return a==null?!1:(t&&t(e.tr.lift(s,a).scrollIntoView()),!0)}let i=o.nodeBefore;if(!i.type.spec.isolating&&n9(e,o,t))return!0;if(r.parent.content.size==0&&(vu(i,"end")||Le.isSelectable(i))){let s=qP(e.doc,r.before(),r.after(),ye.empty);if(s&&s.slice.size{let{$head:r,empty:o}=e.selection,i=r;if(!o)return!1;if(r.parent.isTextblock){if(n?!n.endOfTextblock("backward",e):r.parentOffset>0)return!1;i=Q7(r)}let s=i&&i.nodeBefore;return!s||!Le.isSelectable(s)?!1:(t&&t(e.tr.setSelection(Le.create(e.doc,i.pos-s.nodeSize)).scrollIntoView()),!0)};function Q7(e){if(!e.parent.type.spec.isolating)for(let t=e.depth-1;t>=0;t--){if(e.index(t)>0)return e.doc.resolve(e.before(t+1));if(e.node(t).type.spec.isolating)break}return null}function Q_e(e,t){let{$cursor:n}=e.selection;return!n||(t?!t.endOfTextblock("forward",e):n.parentOffset{let r=Q_e(e,n);if(!r)return!1;let o=e9(r);if(!o)return!1;let i=o.nodeAfter;if(n9(e,o,t))return!0;if(r.parent.content.size==0&&(vu(i,"start")||Le.isSelectable(i))){let s=qP(e.doc,r.before(),r.after(),ye.empty);if(s&&s.slice.size{let{$head:r,empty:o}=e.selection,i=r;if(!o)return!1;if(r.parent.isTextblock){if(n?!n.endOfTextblock("forward",e):r.parentOffset=0;t--){let n=e.node(t);if(e.index(t)+1{let n=e.selection,r=n instanceof Le,o;if(r){if(n.node.isTextblock||!La(e.doc,n.from))return!1;o=n.from}else if(o=Z0(e.doc,n.from,-1),o==null)return!1;if(t){let i=e.tr.join(o);r&&i.setSelection(Le.create(i.doc,o-e.doc.resolve(o).nodeBefore.nodeSize)),t(i.scrollIntoView())}return!0},rwe=(e,t)=>{let n=e.selection,r;if(n instanceof Le){if(n.node.isTextblock||!La(e.doc,n.to))return!1;r=n.to}else if(r=Z0(e.doc,n.to,1),r==null)return!1;return t&&t(e.tr.join(r).scrollIntoView()),!0},owe=(e,t)=>{let{$from:n,$to:r}=e.selection,o=n.blockRange(r),i=o&&$u(o);return i==null?!1:(t&&t(e.tr.lift(o,i).scrollIntoView()),!0)},iwe=(e,t)=>{let{$head:n,$anchor:r}=e.selection;return!n.parent.type.spec.code||!n.sameParent(r)?!1:(t&&t(e.tr.insertText(` +`).scrollIntoView()),!0)};function t9(e){for(let t=0;t{let{$head:n,$anchor:r}=e.selection;if(!n.parent.type.spec.code||!n.sameParent(r))return!1;let o=n.node(-1),i=n.indexAfter(-1),s=t9(o.contentMatchAt(i));if(!s||!o.canReplaceWith(i,i,s))return!1;if(t){let a=n.after(),c=e.tr.replaceWith(a,a,s.createAndFill());c.setSelection(Ze.near(c.doc.resolve(a),1)),t(c.scrollIntoView())}return!0},awe=(e,t)=>{let n=e.selection,{$from:r,$to:o}=n;if(n instanceof Qo||r.parent.inlineContent||o.parent.inlineContent)return!1;let i=t9(o.parent.contentMatchAt(o.indexAfter()));if(!i||!i.isTextblock)return!1;if(t){let s=(!r.parentOffset&&o.index(){let{$cursor:n}=e.selection;if(!n||n.parent.content.size)return!1;if(n.depth>1&&n.after()!=n.end(-1)){let i=n.before();if(Yc(e.doc,i))return t&&t(e.tr.split(i).scrollIntoView()),!0}let r=n.blockRange(),o=r&&$u(r);return o==null?!1:(t&&t(e.tr.lift(r,o).scrollIntoView()),!0)},cwe=(e,t)=>{let{$from:n,to:r}=e.selection,o,i=n.sharedDepth(r);return i==0?!1:(o=n.before(i),t&&t(e.tr.setSelection(Le.create(e.doc,o))),!0)};function uwe(e,t,n){let r=t.nodeBefore,o=t.nodeAfter,i=t.index();return!r||!o||!r.type.compatibleContent(o.type)?!1:!r.content.size&&t.parent.canReplace(i-1,i)?(n&&n(e.tr.delete(t.pos-r.nodeSize,t.pos).scrollIntoView()),!0):!t.parent.canReplace(i,i+1)||!(o.isTextblock||La(e.doc,t.pos))?!1:(n&&n(e.tr.clearIncompatible(t.pos,r.type,r.contentMatchAt(r.childCount)).join(t.pos).scrollIntoView()),!0)}function n9(e,t,n){let r=t.nodeBefore,o=t.nodeAfter,i,s;if(r.type.spec.isolating||o.type.spec.isolating)return!1;if(uwe(e,t,n))return!0;let a=t.parent.canReplace(t.index(),t.index()+1);if(a&&(i=(s=r.contentMatchAt(r.childCount)).findWrapping(o.type))&&s.matchType(i[0]||o.type).validEnd){if(n){let p=t.pos+o.nodeSize,g=se.empty;for(let w=i.length-1;w>=0;w--)g=se.from(i[w].create(null,g));g=se.from(r.copy(g));let v=e.tr.step(new En(t.pos-1,p,t.pos,p,new ye(g,1,0),i.length,!0)),y=p+2*i.length;La(v.doc,y)&&v.join(y),n(v.scrollIntoView())}return!0}let c=Ze.findFrom(t,1),u=c&&c.$from.blockRange(c.$to),f=u&&$u(u);if(f!=null&&f>=t.depth)return n&&n(e.tr.lift(u,f).scrollIntoView()),!0;if(a&&vu(o,"start",!0)&&vu(r,"end")){let p=r,g=[];for(;g.push(p),!p.isTextblock;)p=p.lastChild;let v=o,y=1;for(;!v.isTextblock;v=v.firstChild)y++;if(p.canReplace(p.childCount,p.childCount,v.content)){if(n){let w=se.empty;for(let x=g.length-1;x>=0;x--)w=se.from(g[x].copy(w));let P=e.tr.step(new En(t.pos-g.length,t.pos+o.nodeSize,t.pos+y,t.pos+o.nodeSize-y,new ye(w,g.length,0),0,!0));n(P.scrollIntoView())}return!0}}return!1}function r9(e){return function(t,n){let r=t.selection,o=e<0?r.$from:r.$to,i=o.depth;for(;o.node(i).isInline;){if(!i)return!1;i--}return o.node(i).isTextblock?(n&&n(t.tr.setSelection(Ve.create(t.doc,e<0?o.start(i):o.end(i)))),!0):!1}}const dwe=r9(-1),fwe=r9(1);function pwe(e,t=null){return function(n,r){let{$from:o,$to:i}=n.selection,s=o.blockRange(i),a=s&&KP(s,e,t);return a?(r&&r(n.tr.wrap(s,a).scrollIntoView()),!0):!1}}function lI(e,t=null){return function(n,r){let o=!1;for(let i=0;i{if(o)return!1;if(!(!c.isTextblock||c.hasMarkup(e,t)))if(c.type==e)o=!0;else{let f=n.doc.resolve(u),p=f.index();o=f.parent.canReplaceWith(p,p+1,e)}})}if(!o)return!1;if(r){let i=n.tr;for(let s=0;s=2&&o.node(s.depth-1).type.compatibleContent(e)&&s.startIndex==0){if(o.index(s.depth-1)==0)return!1;let f=n.doc.resolve(s.start-2);c=new Rv(f,f,s.depth),s.endIndex=0;f--)i=se.from(n[f].type.create(n[f].attrs,i));e.step(new En(t.start-(r?2:0),t.end,t.start,t.end,new ye(i,0,0),n.length,!0));let s=0;for(let f=0;fs.childCount>0&&s.firstChild.type==e);return i?n?r.node(i.depth-1).type==e?vwe(t,n,e,i):ywe(t,n,i):!0:!1}}function vwe(e,t,n,r){let o=e.tr,i=r.end,s=r.$to.end(r.depth);iw;y--)v-=o.child(y).nodeSize,r.delete(v-1,v+1);let i=r.doc.resolve(n.start),s=i.nodeAfter;if(r.mapping.map(n.end)!=n.start+i.nodeAfter.nodeSize)return!1;let a=n.startIndex==0,c=n.endIndex==o.childCount,u=i.node(-1),f=i.index(-1);if(!u.canReplace(f+(a?0:1),f+1,s.content.append(c?se.empty:se.from(o))))return!1;let p=i.pos,g=p+s.nodeSize;return r.step(new En(p-(a?1:0),g+(c?1:0),p+1,g-1,new ye((a?se.empty:se.from(o.copy(se.empty))).append(c?se.empty:se.from(o.copy(se.empty))),a?0:1,c?0:1),a?0:1)),t(r.scrollIntoView()),!0}function _we(e){return function(t,n){let{$from:r,$to:o}=t.selection,i=r.blockRange(o,u=>u.childCount>0&&u.firstChild.type==e);if(!i)return!1;let s=i.startIndex;if(s==0)return!1;let a=i.parent,c=a.child(s-1);if(c.type!=e)return!1;if(n){let u=c.lastChild&&c.lastChild.type==a.type,f=se.from(u?e.create():null),p=new ye(se.from(e.create(null,se.from(a.type.create(null,f)))),u?3:1,0),g=i.start,v=i.end;n(t.tr.step(new En(g-(u?3:1),v,g,v,p,1,!0)).scrollIntoView())}return!0}}function J0(e){const{state:t,transaction:n}=e;let{selection:r}=n,{doc:o}=n,{storedMarks:i}=n;return{...t,apply:t.apply.bind(t),applyTransaction:t.applyTransaction.bind(t),filterTransaction:t.filterTransaction,plugins:t.plugins,schema:t.schema,reconfigure:t.reconfigure.bind(t),toJSON:t.toJSON.bind(t),get storedMarks(){return i},get selection(){return r},get doc(){return o},get tr(){return r=n.selection,o=n.doc,i=n.storedMarks,n}}}class X0{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:n,state:r}=this,{view:o}=n,{tr:i}=r,s=this.buildProps(i);return Object.fromEntries(Object.entries(t).map(([a,c])=>[a,(...f)=>{const p=c(...f)(s);return!i.getMeta("preventDispatch")&&!this.hasCustomState&&o.dispatch(i),p}]))}get chain(){return()=>this.createChain()}get can(){return()=>this.createCan()}createChain(t,n=!0){const{rawCommands:r,editor:o,state:i}=this,{view:s}=o,a=[],c=!!t,u=t||i.tr,f=()=>(!c&&n&&!u.getMeta("preventDispatch")&&!this.hasCustomState&&s.dispatch(u),a.every(g=>g===!0)),p={...Object.fromEntries(Object.entries(r).map(([g,v])=>[g,(...w)=>{const P=this.buildProps(u,n),x=v(...w)(P);return a.push(x),p}])),run:f};return p}createCan(t){const{rawCommands:n,state:r}=this,o=!1,i=t||r.tr,s=this.buildProps(i,o);return{...Object.fromEntries(Object.entries(n).map(([c,u])=>[c,(...f)=>u(...f)({...s,dispatch:void 0})])),chain:()=>this.createChain(i,o)}}buildProps(t,n=!0){const{rawCommands:r,editor:o,state:i}=this,{view:s}=o,a={tr:t,editor:o,view:s,state:J0({state:i,transaction:t}),dispatch:n?()=>{}:void 0,chain:()=>this.createChain(t,n),can:()=>this.createCan(t),get commands(){return Object.fromEntries(Object.entries(r).map(([c,u])=>[c,(...f)=>u(...f)(a)]))}};return a}}class wwe{constructor(){this.callbacks={}}on(t,n){return this.callbacks[t]||(this.callbacks[t]=[]),this.callbacks[t].push(n),this}emit(t,...n){const r=this.callbacks[t];return r&&r.forEach(o=>o.apply(this,n)),this}off(t,n){const r=this.callbacks[t];return r&&(n?this.callbacks[t]=r.filter(o=>o!==n):delete this.callbacks[t]),this}removeAllListeners(){this.callbacks={}}}function Ce(e,t,n){return e.config[t]===void 0&&e.parent?Ce(e.parent,t,n):typeof e.config[t]=="function"?e.config[t].bind({...n,parent:e.parent?Ce(e.parent,t,n):null}):e.config[t]}function Q0(e){const t=e.filter(o=>o.type==="extension"),n=e.filter(o=>o.type==="node"),r=e.filter(o=>o.type==="mark");return{baseExtensions:t,nodeExtensions:n,markExtensions:r}}function o9(e){const t=[],{nodeExtensions:n,markExtensions:r}=Q0(e),o=[...n,...r],i={default:null,rendered:!0,renderHTML:null,parseHTML:null,keepOnSplit:!0,isRequired:!1};return e.forEach(s=>{const a={name:s.name,options:s.options,storage:s.storage},c=Ce(s,"addGlobalAttributes",a);if(!c)return;c().forEach(f=>{f.types.forEach(p=>{Object.entries(f.attributes).forEach(([g,v])=>{t.push({type:p,name:g,attribute:{...i,...v}})})})})}),o.forEach(s=>{const a={name:s.name,options:s.options,storage:s.storage},c=Ce(s,"addAttributes",a);if(!c)return;const u=c();Object.entries(u).forEach(([f,p])=>{const g={...i,...p};typeof g?.default=="function"&&(g.default=g.default()),g?.isRequired&&g?.default===void 0&&delete g.default,t.push({type:s.name,name:f,attribute:g})})}),t}function Mn(e,t){if(typeof e=="string"){if(!t.nodes[e])throw Error(`There is no node type named '${e}'. Maybe you forgot to add the extension?`);return t.nodes[e]}return e}function Et(...e){return e.filter(t=>!!t).reduce((t,n)=>{const r={...t};return Object.entries(n).forEach(([o,i])=>{if(!r[o]){r[o]=i;return}if(o==="class"){const a=i?i.split(" "):[],c=r[o]?r[o].split(" "):[],u=a.filter(f=>!c.includes(f));r[o]=[...c,...u].join(" ")}else o==="style"?r[o]=[r[o],i].join("; "):r[o]=i}),r},{})}function wx(e,t){return t.filter(n=>n.attribute.rendered).map(n=>n.attribute.renderHTML?n.attribute.renderHTML(e.attrs)||{}:{[n.name]:e.attrs[n.name]}).reduce((n,r)=>Et(n,r),{})}function i9(e){return typeof e=="function"}function Ue(e,t=void 0,...n){return i9(e)?t?e.bind(t)(...n):e(...n):e}function bwe(e={}){return Object.keys(e).length===0&&e.constructor===Object}function xwe(e){return typeof e!="string"?e:e.match(/^[+-]?(?:\d*\.)?\d+$/)?Number(e):e==="true"?!0:e==="false"?!1:e}function cI(e,t){return e.style?e:{...e,getAttrs:n=>{const r=e.getAttrs?e.getAttrs(n):e.attrs;if(r===!1)return!1;const o=t.reduce((i,s)=>{const a=s.attribute.parseHTML?s.attribute.parseHTML(n):xwe(n.getAttribute(s.name));return a==null?i:{...i,[s.name]:a}},{});return{...r,...o}}}}function uI(e){return Object.fromEntries(Object.entries(e).filter(([t,n])=>t==="attrs"&&bwe(n)?!1:n!=null))}function Swe(e,t){var n;const r=o9(e),{nodeExtensions:o,markExtensions:i}=Q0(e),s=(n=o.find(u=>Ce(u,"topNode")))===null||n===void 0?void 0:n.name,a=Object.fromEntries(o.map(u=>{const f=r.filter(x=>x.type===u.name),p={name:u.name,options:u.options,storage:u.storage,editor:t},g=e.reduce((x,S)=>{const O=Ce(S,"extendNodeSchema",p);return{...x,...O?O(u):{}}},{}),v=uI({...g,content:Ue(Ce(u,"content",p)),marks:Ue(Ce(u,"marks",p)),group:Ue(Ce(u,"group",p)),inline:Ue(Ce(u,"inline",p)),atom:Ue(Ce(u,"atom",p)),selectable:Ue(Ce(u,"selectable",p)),draggable:Ue(Ce(u,"draggable",p)),code:Ue(Ce(u,"code",p)),defining:Ue(Ce(u,"defining",p)),isolating:Ue(Ce(u,"isolating",p)),attrs:Object.fromEntries(f.map(x=>{var S;return[x.name,{default:(S=x?.attribute)===null||S===void 0?void 0:S.default}]}))}),y=Ue(Ce(u,"parseHTML",p));y&&(v.parseDOM=y.map(x=>cI(x,f)));const w=Ce(u,"renderHTML",p);w&&(v.toDOM=x=>w({node:x,HTMLAttributes:wx(x,f)}));const P=Ce(u,"renderText",p);return P&&(v.toText=P),[u.name,v]})),c=Object.fromEntries(i.map(u=>{const f=r.filter(P=>P.type===u.name),p={name:u.name,options:u.options,storage:u.storage,editor:t},g=e.reduce((P,x)=>{const S=Ce(x,"extendMarkSchema",p);return{...P,...S?S(u):{}}},{}),v=uI({...g,inclusive:Ue(Ce(u,"inclusive",p)),excludes:Ue(Ce(u,"excludes",p)),group:Ue(Ce(u,"group",p)),spanning:Ue(Ce(u,"spanning",p)),code:Ue(Ce(u,"code",p)),attrs:Object.fromEntries(f.map(P=>{var x;return[P.name,{default:(x=P?.attribute)===null||x===void 0?void 0:x.default}]}))}),y=Ue(Ce(u,"parseHTML",p));y&&(v.parseDOM=y.map(P=>cI(P,f)));const w=Ce(u,"renderHTML",p);return w&&(v.toDOM=P=>w({mark:P,HTMLAttributes:wx(P,f)})),[u.name,v]}));return new T0e({topNode:s,nodes:a,marks:c})}function dw(e,t){return t.nodes[e]||t.marks[e]||null}function dI(e,t){return Array.isArray(t)?t.some(n=>(typeof n=="string"?n:n.name)===e.name):t}const Pwe=(e,t=500)=>{let n="";const r=e.parentOffset;return e.parent.nodesBetween(Math.max(0,r-t),r,(o,i,s,a)=>{var c,u;const f=((u=(c=o.type.spec).toText)===null||u===void 0?void 0:u.call(c,{node:o,pos:i,parent:s,index:a}))||o.textContent||"%leaf%";n+=f.slice(0,Math.max(0,r-i))}),n};function aO(e){return Object.prototype.toString.call(e)==="[object RegExp]"}class e1{constructor(t){this.find=t.find,this.handler=t.handler}}const Owe=(e,t)=>{if(aO(t))return t.exec(e);const n=t(e);if(!n)return null;const r=[n.text];return r.index=n.index,r.input=e,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 fw(e){var t;const{editor:n,from:r,to:o,text:i,rules:s,plugin:a}=e,{view:c}=n;if(c.composing)return!1;const u=c.state.doc.resolve(r);if(u.parent.type.spec.code||!((t=u.nodeBefore||u.nodeAfter)===null||t===void 0)&&t.marks.find(g=>g.type.spec.code))return!1;let f=!1;const p=Pwe(u)+i;return s.forEach(g=>{if(f)return;const v=Owe(p,g.find);if(!v)return;const y=c.state.tr,w=J0({state:c.state,transaction:y}),P={from:r-(v[0].length-i.length),to:o},{commands:x,chain:S,can:O}=new X0({editor:n,state:w});g.handler({state:w,range:P,match:v,commands:x,chain:S,can:O})===null||!y.steps.length||(y.setMeta(a,{transform:y,from:r,to:o,text:i}),c.dispatch(y),f=!0)}),f}function Cwe(e){const{editor:t,rules:n}=e,r=new Zr({state:{init(){return null},apply(o,i){const s=o.getMeta(r);return s||(o.selectionSet||o.docChanged?null:i)}},props:{handleTextInput(o,i,s,a){return fw({editor:t,from:i,to:s,text:a,rules:n,plugin:r})},handleDOMEvents:{compositionend:o=>(setTimeout(()=>{const{$cursor:i}=o.state.selection;i&&fw({editor:t,from:i.pos,to:i.pos,text:"",rules:n,plugin:r})}),!1)},handleKeyDown(o,i){if(i.key!=="Enter")return!1;const{$cursor:s}=o.state.selection;return s?fw({editor:t,from:s.pos,to:s.pos,text:` +`,rules:n,plugin:r}):!1}},isInputRules:!0});return r}function kwe(e){return typeof e=="number"}class Ewe{constructor(t){this.find=t.find,this.handler=t.handler}}const $we=(e,t)=>{if(aO(t))return[...e.matchAll(t)];const n=t(e);return n?n.map(r=>{const o=[r.text];return o.index=r.index,o.input=e,o.data=r.data,r.replaceWith&&(r.text.includes(r.replaceWith)||console.warn('[tiptap warn]: "pasteRuleMatch.replaceWith" must be part of "pasteRuleMatch.text".'),o.push(r.replaceWith)),o}):[]};function Mwe(e){const{editor:t,state:n,from:r,to:o,rule:i,pasteEvent:s,dropEvent:a}=e,{commands:c,chain:u,can:f}=new X0({editor:t,state:n}),p=[];return n.doc.nodesBetween(r,o,(v,y)=>{if(!v.isTextblock||v.type.spec.code)return;const w=Math.max(r,y),P=Math.min(o,y+v.content.size),x=v.textBetween(w-y,P-y,void 0,"");$we(x,i.find).forEach(O=>{if(O.index===void 0)return;const E=w+O.index+1,$=E+O[0].length,N={from:n.tr.mapping.map(E),to:n.tr.mapping.map($)},I=i.handler({state:n,range:N,match:O,commands:c,chain:u,can:f,pasteEvent:s,dropEvent:a});p.push(I)})}),p.every(v=>v!==null)}function Nwe(e){const{editor:t,rules:n}=e;let r=null,o=!1,i=!1,s=new ClipboardEvent("paste"),a=new DragEvent("drop");return n.map(u=>new Zr({view(f){const p=g=>{var v;r=!((v=f.dom.parentElement)===null||v===void 0)&&v.contains(g.target)?f.dom.parentElement:null};return window.addEventListener("dragstart",p),{destroy(){window.removeEventListener("dragstart",p)}}},props:{handleDOMEvents:{drop:(f,p)=>(i=r===f.dom.parentElement,a=p,!1),paste:(f,p)=>{var g;const v=(g=p.clipboardData)===null||g===void 0?void 0:g.getData("text/html");return s=p,o=!!v?.includes("data-pm-slice"),!1}}},appendTransaction:(f,p,g)=>{const v=f[0],y=v.getMeta("uiEvent")==="paste"&&!o,w=v.getMeta("uiEvent")==="drop"&&!i;if(!y&&!w)return;const P=p.doc.content.findDiffStart(g.doc.content),x=p.doc.content.findDiffEnd(g.doc.content);if(!kwe(P)||!x||P===x.b)return;const S=g.tr,O=J0({state:g,transaction:S});if(!(!Mwe({editor:t,state:O,from:Math.max(P-1,0),to:x.b-1,rule:u,pasteEvent:s,dropEvent:a})||!S.steps.length))return a=new DragEvent("drop"),s=new ClipboardEvent("paste"),S}}))}function Twe(e){const t=e.filter((n,r)=>e.indexOf(n)!==r);return[...new Set(t)]}class Nc{constructor(t,n){this.splittableMarks=[],this.editor=n,this.extensions=Nc.resolve(t),this.schema=Swe(this.extensions,n),this.extensions.forEach(r=>{var o;this.editor.extensionStorage[r.name]=r.storage;const i={name:r.name,options:r.options,storage:r.storage,editor:this.editor,type:dw(r.name,this.schema)};r.type==="mark"&&(!((o=Ue(Ce(r,"keepOnSplit",i)))!==null&&o!==void 0)||o)&&this.splittableMarks.push(r.name);const s=Ce(r,"onBeforeCreate",i);s&&this.editor.on("beforeCreate",s);const a=Ce(r,"onCreate",i);a&&this.editor.on("create",a);const c=Ce(r,"onUpdate",i);c&&this.editor.on("update",c);const u=Ce(r,"onSelectionUpdate",i);u&&this.editor.on("selectionUpdate",u);const f=Ce(r,"onTransaction",i);f&&this.editor.on("transaction",f);const p=Ce(r,"onFocus",i);p&&this.editor.on("focus",p);const g=Ce(r,"onBlur",i);g&&this.editor.on("blur",g);const v=Ce(r,"onDestroy",i);v&&this.editor.on("destroy",v)})}static resolve(t){const n=Nc.sort(Nc.flatten(t)),r=Twe(n.map(o=>o.name));return r.length&&console.warn(`[tiptap warn]: Duplicate extension names found: [${r.map(o=>`'${o}'`).join(", ")}]. This can lead to issues.`),n}static flatten(t){return t.map(n=>{const r={name:n.name,options:n.options,storage:n.storage},o=Ce(n,"addExtensions",r);return o?[n,...this.flatten(o())]:n}).flat(10)}static sort(t){return t.sort((r,o)=>{const i=Ce(r,"priority")||100,s=Ce(o,"priority")||100;return i>s?-1:i{const r={name:n.name,options:n.options,storage:n.storage,editor:this.editor,type:dw(n.name,this.schema)},o=Ce(n,"addCommands",r);return o?{...t,...o()}:t},{})}get plugins(){const{editor:t}=this,n=Nc.sort([...this.extensions].reverse()),r=[],o=[],i=n.map(s=>{const a={name:s.name,options:s.options,storage:s.storage,editor:t,type:dw(s.name,this.schema)},c=[],u=Ce(s,"addKeyboardShortcuts",a);let f={};if(s.type==="mark"&&s.config.exitable&&(f.ArrowRight=()=>or.handleExit({editor:t,mark:s})),u){const w=Object.fromEntries(Object.entries(u()).map(([P,x])=>[P,()=>x({editor:t})]));f={...f,...w}}const p=Y_e(f);c.push(p);const g=Ce(s,"addInputRules",a);dI(s,t.options.enableInputRules)&&g&&r.push(...g());const v=Ce(s,"addPasteRules",a);dI(s,t.options.enablePasteRules)&&v&&o.push(...v());const y=Ce(s,"addProseMirrorPlugins",a);if(y){const w=y();c.push(...w)}return c}).flat();return[Cwe({editor:t,rules:r}),...Nwe({editor:t,rules:o}),...i]}get attributes(){return o9(this.extensions)}get nodeViews(){const{editor:t}=this,{nodeExtensions:n}=Q0(this.extensions);return Object.fromEntries(n.filter(r=>!!Ce(r,"addNodeView")).map(r=>{const o=this.attributes.filter(c=>c.type===r.name),i={name:r.name,options:r.options,storage:r.storage,editor:t,type:Mn(r.name,this.schema)},s=Ce(r,"addNodeView",i);if(!s)return[];const a=(c,u,f,p)=>{const g=wx(c,o);return s()({editor:t,node:c,getPos:f,decorations:p,HTMLAttributes:g,extension:r})};return[r.name,a]}))}}function Iwe(e){return Object.prototype.toString.call(e).slice(8,-1)}function pw(e){return Iwe(e)!=="Object"?!1:e.constructor===Object&&Object.getPrototypeOf(e)===Object.prototype}function t1(e,t){const n={...e};return pw(e)&&pw(t)&&Object.keys(t).forEach(r=>{pw(t[r])?r in e?n[r]=t1(e[r],t[r]):Object.assign(n,{[r]:t[r]}):Object.assign(n,{[r]:t[r]})}),n}class br{constructor(t={}){this.type="extension",this.name="extension",this.parent=null,this.child=null,this.config={name:this.name,defaultOptions:{}},this.config={...this.config,...t},this.name=this.config.name,t.defaultOptions&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`),this.options=this.config.defaultOptions,this.config.addOptions&&(this.options=Ue(Ce(this,"addOptions",{name:this.name}))),this.storage=Ue(Ce(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(t={}){return new br(t)}configure(t={}){const n=this.extend();return n.options=t1(this.options,t),n.storage=Ue(Ce(n,"addStorage",{name:n.name,options:n.options})),n}extend(t={}){const n=new br(t);return n.parent=this,this.child=n,n.name=t.name?t.name:n.parent.name,t.defaultOptions&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${n.name}".`),n.options=Ue(Ce(n,"addOptions",{name:n.name})),n.storage=Ue(Ce(n,"addStorage",{name:n.name,options:n.options})),n}}function s9(e,t,n){const{from:r,to:o}=t,{blockSeparator:i=` -`,textSerializers:s={}}=n||{};let a="",c=!0;return e.nodesBetween(r,o,(u,f,p,g)=>{var v;const y=s?.[u.type.name];y?(u.isBlock&&!c&&(a+=i,c=!0),p&&(a+=y({node:u,pos:f,parent:p,index:g,range:t}))):u.isText?(a+=(v=u?.text)===null||v===void 0?void 0:v.slice(Math.max(r,f)-f,o-f),c=!1):u.isBlock&&!c&&(a+=i,c=!0)}),a}function a9(e){return Object.fromEntries(Object.entries(e.nodes).filter(([,t])=>t.spec.toText).map(([t,n])=>[t,n.spec.toText]))}const Lwe=br.create({name:"clipboardTextSerializer",addProseMirrorPlugins(){return[new Zr({key:new Ai("clipboardTextSerializer"),props:{clipboardTextSerializer:()=>{const{editor:e}=this,{state:t,schema:n}=e,{doc:r,selection:o}=t,{ranges:i}=o,s=Math.min(...i.map(f=>f.$from.pos)),a=Math.max(...i.map(f=>f.$to.pos)),c=a9(n);return s9(r,{from:s,to:a},{textSerializers:c})}}})]}}),Dwe=()=>({editor:e,view:t})=>(requestAnimationFrame(()=>{var n;e.isDestroyed||(t.dom.blur(),(n=window?.getSelection())===null||n===void 0||n.removeAllRanges())}),!0),Rwe=(e=!1)=>({commands:t})=>t.setContent("",e),zwe=()=>({state:e,tr:t,dispatch:n})=>{const{selection:r}=t,{ranges:o}=r;return n&&o.forEach(({$from:i,$to:s})=>{e.doc.nodesBetween(i.pos,s.pos,(a,c)=>{if(a.type.isText)return;const{doc:u,mapping:f}=t,p=u.resolve(f.map(c)),g=u.resolve(f.map(c+a.nodeSize)),v=p.blockRange(g);if(!v)return;const y=$u(v);if(a.type.isTextblock){const{defaultType:w}=p.parent.contentMatchAt(p.index());t.setNodeMarkup(v.start,w)}(y||y===0)&&t.lift(v,y)})}),!0},Awe=e=>t=>e(t),Bwe=()=>({state:e,dispatch:t})=>lwe(e,t),Fwe=(e,t)=>({editor:n,tr:r})=>{const{state:o}=n,i=o.doc.slice(e.from,e.to);r.deleteRange(e.from,e.to);const s=r.mapping.map(t);return r.insert(s,i.content),r.setSelection(new Ve(r.doc.resolve(s-1))),!0},Vwe=()=>({tr:e,dispatch:t})=>{const{selection:n}=e,r=n.$anchor.node();if(r.content.size>0)return!1;const o=e.selection.$anchor;for(let i=o.depth;i>0;i-=1)if(o.node(i).type===r.type){if(t){const a=o.before(i),c=o.after(i);e.delete(a,c).scrollIntoView()}return!0}return!1},Hwe=e=>({tr:t,state:n,dispatch:r})=>{const o=Mn(e,n.schema),i=t.selection.$anchor;for(let s=i.depth;s>0;s-=1)if(i.node(s).type===o){if(r){const c=i.before(s),u=i.after(s);t.delete(c,u).scrollIntoView()}return!0}return!1},Wwe=e=>({tr:t,dispatch:n})=>{const{from:r,to:o}=e;return n&&t.delete(r,o),!0},Uwe=()=>({state:e,dispatch:t})=>q_e(e,t),Zwe=()=>({commands:e})=>e.keyboardShortcut("Enter"),Gwe=()=>({state:e,dispatch:t})=>awe(e,t);function Zv(e,t,n={strict:!0}){const r=Object.keys(t);return r.length?r.every(o=>n.strict?t[o]===e[o]:aO(t[o])?t[o].test(e[o]):t[o]===e[o]):!0}function bx(e,t,n={}){return e.find(r=>r.type===t&&Zv(r.attrs,n))}function Ywe(e,t,n={}){return!!bx(e,t,n)}function lO(e,t,n={}){if(!e||!t)return;let r=e.parent.childAfter(e.parentOffset);if(e.parentOffset===r.offset&&r.offset!==0&&(r=e.parent.childBefore(e.parentOffset)),!r.node)return;const o=bx([...r.node.marks],t,n);if(!o)return;let i=r.index,s=e.start()+r.offset,a=i+1,c=s+r.node.nodeSize;for(bx([...r.node.marks],t,n);i>0&&o.isInSet(e.parent.child(i-1).marks);)i-=1,s-=e.parent.child(i).nodeSize;for(;a({tr:n,state:r,dispatch:o})=>{const i=Ra(e,r.schema),{doc:s,selection:a}=n,{$from:c,from:u,to:f}=a;if(o){const p=lO(c,i,t);if(p&&p.from<=u&&p.to>=f){const g=Ve.create(s,p.from,p.to);n.setSelection(g)}}return!0},qwe=e=>t=>{const n=typeof e=="function"?e(t):e;for(let r=0;r({editor:n,view:r,tr:o,dispatch:i})=>{t={scrollIntoView:!0,...t};const s=()=>{cO()&&r.dom.focus(),requestAnimationFrame(()=>{n.isDestroyed||(r.focus(),t?.scrollIntoView&&n.commands.scrollIntoView())})};if(r.hasFocus()&&e===null||e===!1)return!0;if(i&&e===null&&!l9(n.state.selection))return s(),!0;const a=c9(o.doc,e)||n.state.selection,c=n.state.selection.eq(a);return i&&(c||o.setSelection(a),c&&o.storedMarks&&o.setStoredMarks(o.storedMarks),s()),!0},Xwe=(e,t)=>n=>e.every((r,o)=>t(r,{...n,index:o})),Qwe=(e,t)=>({tr:n,commands:r})=>r.insertContentAt({from:n.selection.from,to:n.selection.to},e,t);function fI(e){const t=`${e}`;return new window.DOMParser().parseFromString(t,"text/html").body}function Gv(e,t,n){if(n={slice:!0,parseOptions:{},...n},typeof e=="object"&&e!==null)try{return Array.isArray(e)&&e.length>0?se.fromArray(e.map(r=>t.nodeFromJSON(r))):t.nodeFromJSON(e)}catch(r){return console.warn("[tiptap warn]: Invalid content.","Passed value:",e,"Error:",r),Gv("",t,n)}if(typeof e=="string"){const r=fu.fromSchema(t);return n.slice?r.parseSlice(fI(e),n.parseOptions).content:r.parse(fI(e),n.parseOptions)}return Gv("",t,n)}function ebe(e,t,n){const r=e.steps.length-1;if(r{s===0&&(s=f)}),e.setSelection(Ze.near(e.doc.resolve(s),n))}const tbe=e=>e.toString().startsWith("<"),nbe=(e,t,n)=>({tr:r,dispatch:o,editor:i})=>{if(o){n={parseOptions:{},updateSelection:!0,...n};const s=Gv(t,i.schema,{parseOptions:{preserveWhitespace:"full",...n.parseOptions}});if(s.toString()==="<>")return!0;let{from:a,to:c}=typeof e=="number"?{from:e,to:e}:{from:e.from,to:e.to},u=!0,f=!0;if((tbe(s)?s:[s]).forEach(g=>{g.check(),u=u?g.isText&&g.marks.length===0:!1,f=f?g.isBlock:!1}),a===c&&f){const{parent:g}=r.doc.resolve(a);g.isTextblock&&!g.type.spec.code&&!g.childCount&&(a-=1,c+=1)}u?Array.isArray(t)?r.insertText(t.map(g=>g.text||"").join(""),a,c):typeof t=="object"&&t&&t.text?r.insertText(t.text,a,c):r.insertText(t,a,c):r.replaceWith(a,c,s),n.updateSelection&&ebe(r,r.steps.length-1,-1)}return!0},rbe=()=>({state:e,dispatch:t})=>rwe(e,t),obe=()=>({state:e,dispatch:t})=>owe(e,t),ibe=()=>({state:e,dispatch:t})=>X_e(e,t),sbe=()=>({state:e,dispatch:t})=>twe(e,t),abe=()=>({tr:e,state:t,dispatch:n})=>{try{const r=Z0(t.doc,t.selection.$from.pos,-1);return r==null?!1:(e.join(r,2),n&&n(e),!0)}catch{return!1}},lbe=()=>({state:e,dispatch:t,tr:n})=>{try{const r=Z0(e.doc,e.selection.$from.pos,1);return r==null?!1:(n.join(r,2),t&&t(n),!0)}catch{return!1}};function uO(){return typeof navigator<"u"?/Mac/.test(navigator.platform):!1}function cbe(e){const t=e.split(/-(?!$)/);let n=t[t.length-1];n==="Space"&&(n=" ");let r,o,i,s;for(let a=0;a({editor:t,view:n,tr:r,dispatch:o})=>{const i=cbe(e).split(/-(?!$)/),s=i.find(u=>!["Alt","Ctrl","Meta","Shift"].includes(u)),a=new KeyboardEvent("keydown",{key:s==="Space"?" ":s,altKey:i.includes("Alt"),ctrlKey:i.includes("Ctrl"),metaKey:i.includes("Meta"),shiftKey:i.includes("Shift"),bubbles:!0,cancelable:!0}),c=t.captureTransaction(()=>{n.someProp("handleKeyDown",u=>u(n,a))});return c?.steps.forEach(u=>{const f=u.map(r.mapping);f&&o&&r.maybeStep(f)}),!0};function bf(e,t,n={}){const{from:r,to:o,empty:i}=e.selection,s=t?Mn(t,e.schema):null,a=[];e.doc.nodesBetween(r,o,(p,g)=>{if(p.isText)return;const v=Math.max(r,g),y=Math.min(o,g+p.nodeSize);a.push({node:p,from:v,to:y})});const c=o-r,u=a.filter(p=>s?s.name===p.node.type.name:!0).filter(p=>Zv(p.node.attrs,n,{strict:!1}));return i?!!u.length:u.reduce((p,g)=>p+g.to-g.from,0)>=c}const dbe=(e,t={})=>({state:n,dispatch:r})=>{const o=Mn(e,n.schema);return bf(n,o,t)?iwe(n,r):!1},fbe=()=>({state:e,dispatch:t})=>cwe(e,t),pbe=e=>({state:t,dispatch:n})=>{const r=Mn(e,t.schema);return vwe(r)(t,n)},hbe=()=>({state:e,dispatch:t})=>swe(e,t);function n1(e,t){return t.nodes[e]?"node":t.marks[e]?"mark":null}function pI(e,t){const n=typeof t=="string"?[t]:t;return Object.keys(e).reduce((r,o)=>(n.includes(o)||(r[o]=e[o]),r),{})}const mbe=(e,t)=>({tr:n,state:r,dispatch:o})=>{let i=null,s=null;const a=n1(typeof e=="string"?e:e.name,r.schema);return a?(a==="node"&&(i=Mn(e,r.schema)),a==="mark"&&(s=Ra(e,r.schema)),o&&n.selection.ranges.forEach(c=>{r.doc.nodesBetween(c.$from.pos,c.$to.pos,(u,f)=>{i&&i===u.type&&n.setNodeMarkup(f,void 0,pI(u.attrs,t)),s&&u.marks.length&&u.marks.forEach(p=>{s===p.type&&n.addMark(f,f+u.nodeSize,s.create(pI(p.attrs,t)))})})}),!0):!1},gbe=()=>({tr:e,dispatch:t})=>(t&&e.scrollIntoView(),!0),vbe=()=>({tr:e,commands:t})=>t.setTextSelection({from:0,to:e.doc.content.size}),ybe=()=>({state:e,dispatch:t})=>Q_e(e,t),_be=()=>({state:e,dispatch:t})=>nwe(e,t),wbe=()=>({state:e,dispatch:t})=>uwe(e,t),bbe=()=>({state:e,dispatch:t})=>pwe(e,t),xbe=()=>({state:e,dispatch:t})=>fwe(e,t);function u9(e,t,n={}){return Gv(e,t,{slice:!1,parseOptions:n})}const Sbe=(e,t=!1,n={})=>({tr:r,editor:o,dispatch:i})=>{const{doc:s}=r,a=u9(e,o.schema,n);return i&&r.replaceWith(0,s.content.size,a).setMeta("preventUpdate",!t),!0};function Xf(e,t){const n=Ra(t,e.schema),{from:r,to:o,empty:i}=e.selection,s=[];i?(e.storedMarks&&s.push(...e.storedMarks),s.push(...e.selection.$head.marks())):e.doc.nodesBetween(r,o,c=>{s.push(...c.marks)});const a=s.find(c=>c.type.name===n.name);return a?{...a.attrs}:{}}function Pbe(e,t){const n=new y7(e);return t.forEach(r=>{r.steps.forEach(o=>{n.step(o)})}),n}function Obe(e){for(let t=0;t{n(o)&&r.push({node:o,pos:i})}),r}function kbe(e,t){for(let n=e.depth;n>0;n-=1){const r=e.node(n);if(t(r))return{pos:n>0?e.before(n):0,start:e.start(n),depth:n,node:r}}}function dO(e){return t=>kbe(t.$from,e)}function Ebe(e,t){const n=$i.fromSchema(t).serializeFragment(e),o=document.implementation.createHTMLDocument().createElement("div");return o.appendChild(n),o.innerHTML}function $be(e,t){const n={from:0,to:e.content.size};return s9(e,n,t)}function Mbe(e,t){const n=Mn(t,e.schema),{from:r,to:o}=e.selection,i=[];e.doc.nodesBetween(r,o,a=>{i.push(a)});const s=i.reverse().find(a=>a.type.name===n.name);return s?{...s.attrs}:{}}function d9(e,t){const n=n1(typeof t=="string"?t:t.name,e.schema);return n==="node"?Mbe(e,t):n==="mark"?Xf(e,t):{}}function Nbe(e,t=JSON.stringify){const n={};return e.filter(r=>{const o=t(r);return Object.prototype.hasOwnProperty.call(n,o)?!1:n[o]=!0})}function Tbe(e){const t=Nbe(e);return t.length===1?t:t.filter((n,r)=>!t.filter((i,s)=>s!==r).some(i=>n.oldRange.from>=i.oldRange.from&&n.oldRange.to<=i.oldRange.to&&n.newRange.from>=i.newRange.from&&n.newRange.to<=i.newRange.to))}function Ibe(e){const{mapping:t,steps:n}=e,r=[];return t.maps.forEach((o,i)=>{const s=[];if(o.ranges.length)o.forEach((a,c)=>{s.push({from:a,to:c})});else{const{from:a,to:c}=n[i];if(a===void 0||c===void 0)return;s.push({from:a,to:c})}s.forEach(({from:a,to:c})=>{const u=t.slice(i).map(a,-1),f=t.slice(i).map(c),p=t.invert().map(u,-1),g=t.invert().map(f);r.push({oldRange:{from:p,to:g},newRange:{from:u,to:f}})})}),Tbe(r)}function fO(e,t,n){const r=[];return e===t?n.resolve(e).marks().forEach(o=>{const i=n.resolve(e-1),s=lO(i,o.type);s&&r.push({mark:o,...s})}):n.nodesBetween(e,t,(o,i)=>{r.push(...o.marks.map(s=>({from:i,to:i+o.nodeSize,mark:s})))}),r}function Xh(e,t,n){return Object.fromEntries(Object.entries(n).filter(([r])=>{const o=e.find(i=>i.type===t&&i.name===r);return o?o.attribute.keepOnSplit:!1}))}function xx(e,t,n={}){const{empty:r,ranges:o}=e.selection,i=t?Ra(t,e.schema):null;if(r)return!!(e.storedMarks||e.selection.$from.marks()).filter(p=>i?i.name===p.type.name:!0).find(p=>Zv(p.attrs,n,{strict:!1}));let s=0;const a=[];if(o.forEach(({$from:p,$to:g})=>{const v=p.pos,y=g.pos;e.doc.nodesBetween(v,y,(w,P)=>{if(!w.isText&&!w.marks.length)return;const x=Math.max(v,P),S=Math.min(y,P+w.nodeSize),O=S-x;s+=O,a.push(...w.marks.map(E=>({mark:E,from:x,to:S})))})}),s===0)return!1;const c=a.filter(p=>i?i.name===p.mark.type.name:!0).filter(p=>Zv(p.mark.attrs,n,{strict:!1})).reduce((p,g)=>p+g.to-g.from,0),u=a.filter(p=>i?p.mark.type!==i&&p.mark.type.excludes(i):!0).reduce((p,g)=>p+g.to-g.from,0);return(c>0?c+u:c)>=s}function jbe(e,t,n={}){if(!t)return bf(e,null,n)||xx(e,null,n);const r=n1(t,e.schema);return r==="node"?bf(e,t,n):r==="mark"?xx(e,t,n):!1}function hI(e,t){const{nodeExtensions:n}=Q0(t),r=n.find(s=>s.name===e);if(!r)return!1;const o={name:r.name,options:r.options,storage:r.storage},i=Ue(Ce(r,"group",o));return typeof i!="string"?!1:i.split(" ").includes("list")}function Lbe(e){var t;const n=(t=e.type.createAndFill())===null||t===void 0?void 0:t.toJSON(),r=e.toJSON();return JSON.stringify(n)===JSON.stringify(r)}function Dbe(e,t,n){var r;const{selection:o}=t;let i=null;if(l9(o)&&(i=o.$cursor),i){const a=(r=e.storedMarks)!==null&&r!==void 0?r:i.marks();return!!n.isInSet(a)||!a.some(c=>c.type.excludes(n))}const{ranges:s}=o;return s.some(({$from:a,$to:c})=>{let u=a.depth===0?e.doc.inlineContent&&e.doc.type.allowsMarkType(n):!1;return e.doc.nodesBetween(a.pos,c.pos,(f,p,g)=>{if(u)return!1;if(f.isInline){const v=!g||g.type.allowsMarkType(n),y=!!n.isInSet(f.marks)||!f.marks.some(w=>w.type.excludes(n));u=v&&y}return!u}),u})}const Rbe=(e,t={})=>({tr:n,state:r,dispatch:o})=>{const{selection:i}=n,{empty:s,ranges:a}=i,c=Ra(e,r.schema);if(o)if(s){const u=Xf(r,c);n.addStoredMark(c.create({...u,...t}))}else a.forEach(u=>{const f=u.$from.pos,p=u.$to.pos;r.doc.nodesBetween(f,p,(g,v)=>{const y=Math.max(v,f),w=Math.min(v+g.nodeSize,p);g.marks.find(x=>x.type===c)?g.marks.forEach(x=>{c===x.type&&n.addMark(y,w,c.create({...x.attrs,...t}))}):n.addMark(y,w,c.create(t))})});return Dbe(r,n,c)},zbe=(e,t)=>({tr:n})=>(n.setMeta(e,t),!0),Abe=(e,t={})=>({state:n,dispatch:r,chain:o})=>{const i=Mn(e,n.schema);return i.isTextblock?o().command(({commands:s})=>lI(i,t)(n)?!0:s.clearNodes()).command(({state:s})=>lI(i,t)(s,r)).run():(console.warn('[tiptap warn]: Currently "setNode()" only supports text block nodes.'),!1)},Bbe=e=>({tr:t,dispatch:n})=>{if(n){const{doc:r}=t,o=pl(e,0,r.content.size),i=Le.create(r,o);t.setSelection(i)}return!0},Fbe=e=>({tr:t,dispatch:n})=>{if(n){const{doc:r}=t,{from:o,to:i}=typeof e=="number"?{from:e,to:e}:e,s=Ve.atStart(r).from,a=Ve.atEnd(r).to,c=pl(o,s,a),u=pl(i,s,a),f=Ve.create(r,c,u);t.setSelection(f)}return!0},Vbe=e=>({state:t,dispatch:n})=>{const r=Mn(e,t.schema);return wwe(r)(t,n)};function mI(e,t){const n=e.storedMarks||e.selection.$to.parentOffset&&e.selection.$from.marks();if(n){const r=n.filter(o=>t?.includes(o.type.name));e.tr.ensureMarks(r)}}const Hbe=({keepMarks:e=!0}={})=>({tr:t,state:n,dispatch:r,editor:o})=>{const{selection:i,doc:s}=t,{$from:a,$to:c}=i,u=o.extensionManager.attributes,f=Xh(u,a.node().type.name,a.node().attrs);if(i instanceof Le&&i.node.isBlock)return!a.parentOffset||!Yc(s,a.pos)?!1:(r&&(e&&mI(n,o.extensionManager.splittableMarks),t.split(a.pos).scrollIntoView()),!0);if(!a.parent.isBlock)return!1;if(r){const p=c.parentOffset===c.parent.content.size;i instanceof Ve&&t.deleteSelection();const g=a.depth===0?void 0:Obe(a.node(-1).contentMatchAt(a.indexAfter(-1)));let v=p&&g?[{type:g,attrs:f}]:void 0,y=Yc(t.doc,t.mapping.map(a.pos),1,v);if(!v&&!y&&Yc(t.doc,t.mapping.map(a.pos),1,g?[{type:g}]:void 0)&&(y=!0,v=g?[{type:g,attrs:f}]:void 0),y&&(t.split(t.mapping.map(a.pos),1,v),g&&!p&&!a.parentOffset&&a.parent.type!==g)){const w=t.mapping.map(a.before()),P=t.doc.resolve(w);a.node(-1).canReplaceWith(P.index(),P.index()+1,g)&&t.setNodeMarkup(t.mapping.map(a.before()),g)}e&&mI(n,o.extensionManager.splittableMarks),t.scrollIntoView()}return!0},Wbe=e=>({tr:t,state:n,dispatch:r,editor:o})=>{var i;const s=Mn(e,n.schema),{$from:a,$to:c}=n.selection,u=n.selection.node;if(u&&u.isBlock||a.depth<2||!a.sameParent(c))return!1;const f=a.node(-1);if(f.type!==s)return!1;const p=o.extensionManager.attributes;if(a.parent.content.size===0&&a.node(-1).childCount===a.indexAfter(-1)){if(a.depth===2||a.node(-3).type!==s||a.index(-2)!==a.node(-2).childCount-1)return!1;if(r){let P=se.empty;const x=a.index(-1)?1:a.index(-2)?2:3;for(let I=a.depth-x;I>=a.depth-3;I-=1)P=se.from(a.node(I).copy(P));const S=a.indexAfter(-1){if(N>-1)return!1;I.isTextblock&&I.content.size===0&&(N=R+1)}),N>-1&&t.setSelection(Ve.near(t.doc.resolve(N))),t.scrollIntoView()}return!0}const g=c.pos===a.end()?f.contentMatchAt(0).defaultType:null,v=Xh(p,f.type.name,f.attrs),y=Xh(p,a.node().type.name,a.node().attrs);t.delete(a.pos,c.pos);const w=g?[{type:s,attrs:v},{type:g,attrs:y}]:[{type:s,attrs:v}];if(!Yc(t.doc,a.pos,2))return!1;if(r){const{selection:P,storedMarks:x}=n,{splittableMarks:S}=o.extensionManager,O=x||P.$to.parentOffset&&P.$from.marks();if(t.split(a.pos,2,w).scrollIntoView(),!O||!r)return!0;const E=O.filter($=>S.includes($.type.name));t.ensureMarks(E)}return!0},hw=(e,t)=>{const n=dO(s=>s.type===t)(e.selection);if(!n)return!0;const r=e.doc.resolve(Math.max(0,n.pos-1)).before(n.depth);if(r===void 0)return!0;const o=e.doc.nodeAt(r);return n.node.type===o?.type&&La(e.doc,n.pos)&&e.join(n.pos),!0},mw=(e,t)=>{const n=dO(s=>s.type===t)(e.selection);if(!n)return!0;const r=e.doc.resolve(n.start).after(n.depth);if(r===void 0)return!0;const o=e.doc.nodeAt(r);return n.node.type===o?.type&&La(e.doc,r)&&e.join(r),!0},Ube=(e,t,n,r={})=>({editor:o,tr:i,state:s,dispatch:a,chain:c,commands:u,can:f})=>{const{extensions:p,splittableMarks:g}=o.extensionManager,v=Mn(e,s.schema),y=Mn(t,s.schema),{selection:w,storedMarks:P}=s,{$from:x,$to:S}=w,O=x.blockRange(S),E=P||w.$to.parentOffset&&w.$from.marks();if(!O)return!1;const $=dO(N=>hI(N.type.name,p))(w);if(O.depth>=1&&$&&O.depth-$.depth<=1){if($.node.type===v)return u.liftListItem(y);if(hI($.node.type.name,p)&&v.validContent($.node.content)&&a)return c().command(()=>(i.setNodeMarkup($.pos,v),!0)).command(()=>hw(i,v)).command(()=>mw(i,v)).run()}return!n||!E||!a?c().command(()=>f().wrapInList(v,r)?!0:u.clearNodes()).wrapInList(v,r).command(()=>hw(i,v)).command(()=>mw(i,v)).run():c().command(()=>{const N=f().wrapInList(v,r),I=E.filter(R=>g.includes(R.type.name));return i.ensureMarks(I),N?!0:u.clearNodes()}).wrapInList(v,r).command(()=>hw(i,v)).command(()=>mw(i,v)).run()},Zbe=(e,t={},n={})=>({state:r,commands:o})=>{const{extendEmptyMarkRange:i=!1}=n,s=Ra(e,r.schema);return xx(r,s,t)?o.unsetMark(s,{extendEmptyMarkRange:i}):o.setMark(s,t)},Gbe=(e,t,n={})=>({state:r,commands:o})=>{const i=Mn(e,r.schema),s=Mn(t,r.schema);return bf(r,i,n)?o.setNode(s):o.setNode(i,n)},Ybe=(e,t={})=>({state:n,commands:r})=>{const o=Mn(e,n.schema);return bf(n,o,t)?r.lift(o):r.wrapIn(o,t)},Kbe=()=>({state:e,dispatch:t})=>{const n=e.plugins;for(let r=0;r=0;c-=1)s.step(a.steps[c].invert(a.docs[c]));if(i.text){const c=s.doc.resolve(i.from).marks();s.replaceWith(i.from,i.to,e.schema.text(i.text,c))}else s.delete(i.from,i.to)}return!0}}return!1},qbe=()=>({tr:e,dispatch:t})=>{const{selection:n}=e,{empty:r,ranges:o}=n;return r||t&&o.forEach(i=>{e.removeMark(i.$from.pos,i.$to.pos)}),!0},Jbe=(e,t={})=>({tr:n,state:r,dispatch:o})=>{var i;const{extendEmptyMarkRange:s=!1}=t,{selection:a}=n,c=Ra(e,r.schema),{$from:u,empty:f,ranges:p}=a;if(!o)return!0;if(f&&s){let{from:g,to:v}=a;const y=(i=u.marks().find(P=>P.type===c))===null||i===void 0?void 0:i.attrs,w=lO(u,c,y);w&&(g=w.from,v=w.to),n.removeMark(g,v,c)}else p.forEach(g=>{n.removeMark(g.$from.pos,g.$to.pos,c)});return n.removeStoredMark(c),!0},Xbe=(e,t={})=>({tr:n,state:r,dispatch:o})=>{let i=null,s=null;const a=n1(typeof e=="string"?e:e.name,r.schema);return a?(a==="node"&&(i=Mn(e,r.schema)),a==="mark"&&(s=Ra(e,r.schema)),o&&n.selection.ranges.forEach(c=>{const u=c.$from.pos,f=c.$to.pos;r.doc.nodesBetween(u,f,(p,g)=>{i&&i===p.type&&n.setNodeMarkup(g,void 0,{...p.attrs,...t}),s&&p.marks.length&&p.marks.forEach(v=>{if(s===v.type){const y=Math.max(g,u),w=Math.min(g+p.nodeSize,f);n.addMark(y,w,s.create({...v.attrs,...t}))}})})}),!0):!1},Qbe=(e,t={})=>({state:n,dispatch:r})=>{const o=Mn(e,n.schema);return hwe(o,t)(n,r)},exe=(e,t={})=>({state:n,dispatch:r})=>{const o=Mn(e,n.schema);return mwe(o,t)(n,r)};var txe=Object.freeze({__proto__:null,blur:Dwe,clearContent:Rwe,clearNodes:zwe,command:Awe,createParagraphNear:Bwe,cut:Fwe,deleteCurrentNode:Vwe,deleteNode:Hwe,deleteRange:Wwe,deleteSelection:Uwe,enter:Zwe,exitCode:Gwe,extendMarkRange:Kwe,first:qwe,focus:Jwe,forEach:Xwe,insertContent:Qwe,insertContentAt:nbe,joinUp:rbe,joinDown:obe,joinBackward:ibe,joinForward:sbe,joinItemBackward:abe,joinItemForward:lbe,keyboardShortcut:ube,lift:dbe,liftEmptyBlock:fbe,liftListItem:pbe,newlineInCode:hbe,resetAttributes:mbe,scrollIntoView:gbe,selectAll:vbe,selectNodeBackward:ybe,selectNodeForward:_be,selectParentNode:wbe,selectTextblockEnd:bbe,selectTextblockStart:xbe,setContent:Sbe,setMark:Rbe,setMeta:zbe,setNode:Abe,setNodeSelection:Bbe,setTextSelection:Fbe,sinkListItem:Vbe,splitBlock:Hbe,splitListItem:Wbe,toggleList:Ube,toggleMark:Zbe,toggleNode:Gbe,toggleWrap:Ybe,undoInputRule:Kbe,unsetAllMarks:qbe,unsetMark:Jbe,updateAttributes:Xbe,wrapIn:Qbe,wrapInList:exe});const nxe=br.create({name:"commands",addCommands(){return{...txe}}}),rxe=br.create({name:"editable",addProseMirrorPlugins(){return[new Zr({key:new Ai("editable"),props:{editable:()=>this.editor.options.editable}})]}}),oxe=br.create({name:"focusEvents",addProseMirrorPlugins(){const{editor:e}=this;return[new Zr({key:new Ai("focusEvents"),props:{handleDOMEvents:{focus:(t,n)=>{e.isFocused=!0;const r=e.state.tr.setMeta("focus",{event:n}).setMeta("addToHistory",!1);return t.dispatch(r),!1},blur:(t,n)=>{e.isFocused=!1;const r=e.state.tr.setMeta("blur",{event:n}).setMeta("addToHistory",!1);return t.dispatch(r),!1}}}})]}}),ixe=br.create({name:"keymap",addKeyboardShortcuts(){const e=()=>this.editor.commands.first(({commands:s})=>[()=>s.undoInputRule(),()=>s.command(({tr:a})=>{const{selection:c,doc:u}=a,{empty:f,$anchor:p}=c,{pos:g,parent:v}=p,y=p.parent.isTextblock?a.doc.resolve(g-1):p,w=y.parent.type.spec.isolating,P=p.pos-p.parentOffset,x=w&&y.parent.childCount===1?P===p.pos:Ze.atStart(u).from===g;return!f||!x||!v.type.isTextblock||v.textContent.length?!1:s.clearNodes()}),()=>s.deleteSelection(),()=>s.joinBackward(),()=>s.selectNodeBackward()]),t=()=>this.editor.commands.first(({commands:s})=>[()=>s.deleteSelection(),()=>s.deleteCurrentNode(),()=>s.joinForward(),()=>s.selectNodeForward()]),r={Enter:()=>this.editor.commands.first(({commands:s})=>[()=>s.newlineInCode(),()=>s.createParagraphNear(),()=>s.liftEmptyBlock(),()=>s.splitBlock()]),"Mod-Enter":()=>this.editor.commands.exitCode(),Backspace:e,"Mod-Backspace":e,"Shift-Backspace":e,Delete:t,"Mod-Delete":t,"Mod-a":()=>this.editor.commands.selectAll()},o={...r},i={...r,"Ctrl-h":e,"Alt-Backspace":e,"Ctrl-d":t,"Ctrl-Alt-Backspace":t,"Alt-Delete":t,"Alt-d":t,"Ctrl-a":()=>this.editor.commands.selectTextblockStart(),"Ctrl-e":()=>this.editor.commands.selectTextblockEnd()};return cO()||uO()?i:o},addProseMirrorPlugins(){return[new Zr({key:new Ai("clearDocument"),appendTransaction:(e,t,n)=>{if(!(e.some(y=>y.docChanged)&&!t.doc.eq(n.doc)))return;const{empty:o,from:i,to:s}=t.selection,a=Ze.atStart(t.doc).from,c=Ze.atEnd(t.doc).to;if(o||!(i===a&&s===c)||!(n.doc.textBetween(0,n.doc.content.size," "," ").length===0))return;const p=n.tr,g=J0({state:n,transaction:p}),{commands:v}=new X0({editor:this.editor,state:g});if(v.clearNodes(),!!p.steps.length)return p}})]}}),sxe=br.create({name:"tabindex",addProseMirrorPlugins(){return[new Zr({key:new Ai("tabindex"),props:{attributes:this.editor.isEditable?{tabindex:"0"}:{}}})]}});var axe=Object.freeze({__proto__:null,ClipboardTextSerializer:Lwe,Commands:nxe,Editable:rxe,FocusEvents:oxe,Keymap:ixe,Tabindex:sxe});const lxe=`.ProseMirror { +`,textSerializers:s={}}=n||{};let a="",c=!0;return e.nodesBetween(r,o,(u,f,p,g)=>{var v;const y=s?.[u.type.name];y?(u.isBlock&&!c&&(a+=i,c=!0),p&&(a+=y({node:u,pos:f,parent:p,index:g,range:t}))):u.isText?(a+=(v=u?.text)===null||v===void 0?void 0:v.slice(Math.max(r,f)-f,o-f),c=!1):u.isBlock&&!c&&(a+=i,c=!0)}),a}function a9(e){return Object.fromEntries(Object.entries(e.nodes).filter(([,t])=>t.spec.toText).map(([t,n])=>[t,n.spec.toText]))}const jwe=br.create({name:"clipboardTextSerializer",addProseMirrorPlugins(){return[new Zr({key:new Ai("clipboardTextSerializer"),props:{clipboardTextSerializer:()=>{const{editor:e}=this,{state:t,schema:n}=e,{doc:r,selection:o}=t,{ranges:i}=o,s=Math.min(...i.map(f=>f.$from.pos)),a=Math.max(...i.map(f=>f.$to.pos)),c=a9(n);return s9(r,{from:s,to:a},{textSerializers:c})}}})]}}),Lwe=()=>({editor:e,view:t})=>(requestAnimationFrame(()=>{var n;e.isDestroyed||(t.dom.blur(),(n=window?.getSelection())===null||n===void 0||n.removeAllRanges())}),!0),Dwe=(e=!1)=>({commands:t})=>t.setContent("",e),Rwe=()=>({state:e,tr:t,dispatch:n})=>{const{selection:r}=t,{ranges:o}=r;return n&&o.forEach(({$from:i,$to:s})=>{e.doc.nodesBetween(i.pos,s.pos,(a,c)=>{if(a.type.isText)return;const{doc:u,mapping:f}=t,p=u.resolve(f.map(c)),g=u.resolve(f.map(c+a.nodeSize)),v=p.blockRange(g);if(!v)return;const y=$u(v);if(a.type.isTextblock){const{defaultType:w}=p.parent.contentMatchAt(p.index());t.setNodeMarkup(v.start,w)}(y||y===0)&&t.lift(v,y)})}),!0},zwe=e=>t=>e(t),Awe=()=>({state:e,dispatch:t})=>awe(e,t),Bwe=(e,t)=>({editor:n,tr:r})=>{const{state:o}=n,i=o.doc.slice(e.from,e.to);r.deleteRange(e.from,e.to);const s=r.mapping.map(t);return r.insert(s,i.content),r.setSelection(new Ve(r.doc.resolve(s-1))),!0},Fwe=()=>({tr:e,dispatch:t})=>{const{selection:n}=e,r=n.$anchor.node();if(r.content.size>0)return!1;const o=e.selection.$anchor;for(let i=o.depth;i>0;i-=1)if(o.node(i).type===r.type){if(t){const a=o.before(i),c=o.after(i);e.delete(a,c).scrollIntoView()}return!0}return!1},Vwe=e=>({tr:t,state:n,dispatch:r})=>{const o=Mn(e,n.schema),i=t.selection.$anchor;for(let s=i.depth;s>0;s-=1)if(i.node(s).type===o){if(r){const c=i.before(s),u=i.after(s);t.delete(c,u).scrollIntoView()}return!0}return!1},Hwe=e=>({tr:t,dispatch:n})=>{const{from:r,to:o}=e;return n&&t.delete(r,o),!0},Wwe=()=>({state:e,dispatch:t})=>K_e(e,t),Uwe=()=>({commands:e})=>e.keyboardShortcut("Enter"),Zwe=()=>({state:e,dispatch:t})=>swe(e,t);function Zv(e,t,n={strict:!0}){const r=Object.keys(t);return r.length?r.every(o=>n.strict?t[o]===e[o]:aO(t[o])?t[o].test(e[o]):t[o]===e[o]):!0}function bx(e,t,n={}){return e.find(r=>r.type===t&&Zv(r.attrs,n))}function Gwe(e,t,n={}){return!!bx(e,t,n)}function lO(e,t,n={}){if(!e||!t)return;let r=e.parent.childAfter(e.parentOffset);if(e.parentOffset===r.offset&&r.offset!==0&&(r=e.parent.childBefore(e.parentOffset)),!r.node)return;const o=bx([...r.node.marks],t,n);if(!o)return;let i=r.index,s=e.start()+r.offset,a=i+1,c=s+r.node.nodeSize;for(bx([...r.node.marks],t,n);i>0&&o.isInSet(e.parent.child(i-1).marks);)i-=1,s-=e.parent.child(i).nodeSize;for(;a({tr:n,state:r,dispatch:o})=>{const i=Ra(e,r.schema),{doc:s,selection:a}=n,{$from:c,from:u,to:f}=a;if(o){const p=lO(c,i,t);if(p&&p.from<=u&&p.to>=f){const g=Ve.create(s,p.from,p.to);n.setSelection(g)}}return!0},Kwe=e=>t=>{const n=typeof e=="function"?e(t):e;for(let r=0;r({editor:n,view:r,tr:o,dispatch:i})=>{t={scrollIntoView:!0,...t};const s=()=>{cO()&&r.dom.focus(),requestAnimationFrame(()=>{n.isDestroyed||(r.focus(),t?.scrollIntoView&&n.commands.scrollIntoView())})};if(r.hasFocus()&&e===null||e===!1)return!0;if(i&&e===null&&!l9(n.state.selection))return s(),!0;const a=c9(o.doc,e)||n.state.selection,c=n.state.selection.eq(a);return i&&(c||o.setSelection(a),c&&o.storedMarks&&o.setStoredMarks(o.storedMarks),s()),!0},Jwe=(e,t)=>n=>e.every((r,o)=>t(r,{...n,index:o})),Xwe=(e,t)=>({tr:n,commands:r})=>r.insertContentAt({from:n.selection.from,to:n.selection.to},e,t);function fI(e){const t=`${e}`;return new window.DOMParser().parseFromString(t,"text/html").body}function Gv(e,t,n){if(n={slice:!0,parseOptions:{},...n},typeof e=="object"&&e!==null)try{return Array.isArray(e)&&e.length>0?se.fromArray(e.map(r=>t.nodeFromJSON(r))):t.nodeFromJSON(e)}catch(r){return console.warn("[tiptap warn]: Invalid content.","Passed value:",e,"Error:",r),Gv("",t,n)}if(typeof e=="string"){const r=fu.fromSchema(t);return n.slice?r.parseSlice(fI(e),n.parseOptions).content:r.parse(fI(e),n.parseOptions)}return Gv("",t,n)}function Qwe(e,t,n){const r=e.steps.length-1;if(r{s===0&&(s=f)}),e.setSelection(Ze.near(e.doc.resolve(s),n))}const ebe=e=>e.toString().startsWith("<"),tbe=(e,t,n)=>({tr:r,dispatch:o,editor:i})=>{if(o){n={parseOptions:{},updateSelection:!0,...n};const s=Gv(t,i.schema,{parseOptions:{preserveWhitespace:"full",...n.parseOptions}});if(s.toString()==="<>")return!0;let{from:a,to:c}=typeof e=="number"?{from:e,to:e}:{from:e.from,to:e.to},u=!0,f=!0;if((ebe(s)?s:[s]).forEach(g=>{g.check(),u=u?g.isText&&g.marks.length===0:!1,f=f?g.isBlock:!1}),a===c&&f){const{parent:g}=r.doc.resolve(a);g.isTextblock&&!g.type.spec.code&&!g.childCount&&(a-=1,c+=1)}u?Array.isArray(t)?r.insertText(t.map(g=>g.text||"").join(""),a,c):typeof t=="object"&&t&&t.text?r.insertText(t.text,a,c):r.insertText(t,a,c):r.replaceWith(a,c,s),n.updateSelection&&Qwe(r,r.steps.length-1,-1)}return!0},nbe=()=>({state:e,dispatch:t})=>nwe(e,t),rbe=()=>({state:e,dispatch:t})=>rwe(e,t),obe=()=>({state:e,dispatch:t})=>J_e(e,t),ibe=()=>({state:e,dispatch:t})=>ewe(e,t),sbe=()=>({tr:e,state:t,dispatch:n})=>{try{const r=Z0(t.doc,t.selection.$from.pos,-1);return r==null?!1:(e.join(r,2),n&&n(e),!0)}catch{return!1}},abe=()=>({state:e,dispatch:t,tr:n})=>{try{const r=Z0(e.doc,e.selection.$from.pos,1);return r==null?!1:(n.join(r,2),t&&t(n),!0)}catch{return!1}};function uO(){return typeof navigator<"u"?/Mac/.test(navigator.platform):!1}function lbe(e){const t=e.split(/-(?!$)/);let n=t[t.length-1];n==="Space"&&(n=" ");let r,o,i,s;for(let a=0;a({editor:t,view:n,tr:r,dispatch:o})=>{const i=lbe(e).split(/-(?!$)/),s=i.find(u=>!["Alt","Ctrl","Meta","Shift"].includes(u)),a=new KeyboardEvent("keydown",{key:s==="Space"?" ":s,altKey:i.includes("Alt"),ctrlKey:i.includes("Ctrl"),metaKey:i.includes("Meta"),shiftKey:i.includes("Shift"),bubbles:!0,cancelable:!0}),c=t.captureTransaction(()=>{n.someProp("handleKeyDown",u=>u(n,a))});return c?.steps.forEach(u=>{const f=u.map(r.mapping);f&&o&&r.maybeStep(f)}),!0};function bf(e,t,n={}){const{from:r,to:o,empty:i}=e.selection,s=t?Mn(t,e.schema):null,a=[];e.doc.nodesBetween(r,o,(p,g)=>{if(p.isText)return;const v=Math.max(r,g),y=Math.min(o,g+p.nodeSize);a.push({node:p,from:v,to:y})});const c=o-r,u=a.filter(p=>s?s.name===p.node.type.name:!0).filter(p=>Zv(p.node.attrs,n,{strict:!1}));return i?!!u.length:u.reduce((p,g)=>p+g.to-g.from,0)>=c}const ube=(e,t={})=>({state:n,dispatch:r})=>{const o=Mn(e,n.schema);return bf(n,o,t)?owe(n,r):!1},dbe=()=>({state:e,dispatch:t})=>lwe(e,t),fbe=e=>({state:t,dispatch:n})=>{const r=Mn(e,t.schema);return gwe(r)(t,n)},pbe=()=>({state:e,dispatch:t})=>iwe(e,t);function n1(e,t){return t.nodes[e]?"node":t.marks[e]?"mark":null}function pI(e,t){const n=typeof t=="string"?[t]:t;return Object.keys(e).reduce((r,o)=>(n.includes(o)||(r[o]=e[o]),r),{})}const hbe=(e,t)=>({tr:n,state:r,dispatch:o})=>{let i=null,s=null;const a=n1(typeof e=="string"?e:e.name,r.schema);return a?(a==="node"&&(i=Mn(e,r.schema)),a==="mark"&&(s=Ra(e,r.schema)),o&&n.selection.ranges.forEach(c=>{r.doc.nodesBetween(c.$from.pos,c.$to.pos,(u,f)=>{i&&i===u.type&&n.setNodeMarkup(f,void 0,pI(u.attrs,t)),s&&u.marks.length&&u.marks.forEach(p=>{s===p.type&&n.addMark(f,f+u.nodeSize,s.create(pI(p.attrs,t)))})})}),!0):!1},mbe=()=>({tr:e,dispatch:t})=>(t&&e.scrollIntoView(),!0),gbe=()=>({tr:e,commands:t})=>t.setTextSelection({from:0,to:e.doc.content.size}),vbe=()=>({state:e,dispatch:t})=>X_e(e,t),ybe=()=>({state:e,dispatch:t})=>twe(e,t),_be=()=>({state:e,dispatch:t})=>cwe(e,t),wbe=()=>({state:e,dispatch:t})=>fwe(e,t),bbe=()=>({state:e,dispatch:t})=>dwe(e,t);function u9(e,t,n={}){return Gv(e,t,{slice:!1,parseOptions:n})}const xbe=(e,t=!1,n={})=>({tr:r,editor:o,dispatch:i})=>{const{doc:s}=r,a=u9(e,o.schema,n);return i&&r.replaceWith(0,s.content.size,a).setMeta("preventUpdate",!t),!0};function Xf(e,t){const n=Ra(t,e.schema),{from:r,to:o,empty:i}=e.selection,s=[];i?(e.storedMarks&&s.push(...e.storedMarks),s.push(...e.selection.$head.marks())):e.doc.nodesBetween(r,o,c=>{s.push(...c.marks)});const a=s.find(c=>c.type.name===n.name);return a?{...a.attrs}:{}}function Sbe(e,t){const n=new y7(e);return t.forEach(r=>{r.steps.forEach(o=>{n.step(o)})}),n}function Pbe(e){for(let t=0;t{n(o)&&r.push({node:o,pos:i})}),r}function Cbe(e,t){for(let n=e.depth;n>0;n-=1){const r=e.node(n);if(t(r))return{pos:n>0?e.before(n):0,start:e.start(n),depth:n,node:r}}}function dO(e){return t=>Cbe(t.$from,e)}function kbe(e,t){const n=$i.fromSchema(t).serializeFragment(e),o=document.implementation.createHTMLDocument().createElement("div");return o.appendChild(n),o.innerHTML}function Ebe(e,t){const n={from:0,to:e.content.size};return s9(e,n,t)}function $be(e,t){const n=Mn(t,e.schema),{from:r,to:o}=e.selection,i=[];e.doc.nodesBetween(r,o,a=>{i.push(a)});const s=i.reverse().find(a=>a.type.name===n.name);return s?{...s.attrs}:{}}function d9(e,t){const n=n1(typeof t=="string"?t:t.name,e.schema);return n==="node"?$be(e,t):n==="mark"?Xf(e,t):{}}function Mbe(e,t=JSON.stringify){const n={};return e.filter(r=>{const o=t(r);return Object.prototype.hasOwnProperty.call(n,o)?!1:n[o]=!0})}function Nbe(e){const t=Mbe(e);return t.length===1?t:t.filter((n,r)=>!t.filter((i,s)=>s!==r).some(i=>n.oldRange.from>=i.oldRange.from&&n.oldRange.to<=i.oldRange.to&&n.newRange.from>=i.newRange.from&&n.newRange.to<=i.newRange.to))}function Tbe(e){const{mapping:t,steps:n}=e,r=[];return t.maps.forEach((o,i)=>{const s=[];if(o.ranges.length)o.forEach((a,c)=>{s.push({from:a,to:c})});else{const{from:a,to:c}=n[i];if(a===void 0||c===void 0)return;s.push({from:a,to:c})}s.forEach(({from:a,to:c})=>{const u=t.slice(i).map(a,-1),f=t.slice(i).map(c),p=t.invert().map(u,-1),g=t.invert().map(f);r.push({oldRange:{from:p,to:g},newRange:{from:u,to:f}})})}),Nbe(r)}function fO(e,t,n){const r=[];return e===t?n.resolve(e).marks().forEach(o=>{const i=n.resolve(e-1),s=lO(i,o.type);s&&r.push({mark:o,...s})}):n.nodesBetween(e,t,(o,i)=>{r.push(...o.marks.map(s=>({from:i,to:i+o.nodeSize,mark:s})))}),r}function Xh(e,t,n){return Object.fromEntries(Object.entries(n).filter(([r])=>{const o=e.find(i=>i.type===t&&i.name===r);return o?o.attribute.keepOnSplit:!1}))}function xx(e,t,n={}){const{empty:r,ranges:o}=e.selection,i=t?Ra(t,e.schema):null;if(r)return!!(e.storedMarks||e.selection.$from.marks()).filter(p=>i?i.name===p.type.name:!0).find(p=>Zv(p.attrs,n,{strict:!1}));let s=0;const a=[];if(o.forEach(({$from:p,$to:g})=>{const v=p.pos,y=g.pos;e.doc.nodesBetween(v,y,(w,P)=>{if(!w.isText&&!w.marks.length)return;const x=Math.max(v,P),S=Math.min(y,P+w.nodeSize),O=S-x;s+=O,a.push(...w.marks.map(E=>({mark:E,from:x,to:S})))})}),s===0)return!1;const c=a.filter(p=>i?i.name===p.mark.type.name:!0).filter(p=>Zv(p.mark.attrs,n,{strict:!1})).reduce((p,g)=>p+g.to-g.from,0),u=a.filter(p=>i?p.mark.type!==i&&p.mark.type.excludes(i):!0).reduce((p,g)=>p+g.to-g.from,0);return(c>0?c+u:c)>=s}function Ibe(e,t,n={}){if(!t)return bf(e,null,n)||xx(e,null,n);const r=n1(t,e.schema);return r==="node"?bf(e,t,n):r==="mark"?xx(e,t,n):!1}function hI(e,t){const{nodeExtensions:n}=Q0(t),r=n.find(s=>s.name===e);if(!r)return!1;const o={name:r.name,options:r.options,storage:r.storage},i=Ue(Ce(r,"group",o));return typeof i!="string"?!1:i.split(" ").includes("list")}function jbe(e){var t;const n=(t=e.type.createAndFill())===null||t===void 0?void 0:t.toJSON(),r=e.toJSON();return JSON.stringify(n)===JSON.stringify(r)}function Lbe(e,t,n){var r;const{selection:o}=t;let i=null;if(l9(o)&&(i=o.$cursor),i){const a=(r=e.storedMarks)!==null&&r!==void 0?r:i.marks();return!!n.isInSet(a)||!a.some(c=>c.type.excludes(n))}const{ranges:s}=o;return s.some(({$from:a,$to:c})=>{let u=a.depth===0?e.doc.inlineContent&&e.doc.type.allowsMarkType(n):!1;return e.doc.nodesBetween(a.pos,c.pos,(f,p,g)=>{if(u)return!1;if(f.isInline){const v=!g||g.type.allowsMarkType(n),y=!!n.isInSet(f.marks)||!f.marks.some(w=>w.type.excludes(n));u=v&&y}return!u}),u})}const Dbe=(e,t={})=>({tr:n,state:r,dispatch:o})=>{const{selection:i}=n,{empty:s,ranges:a}=i,c=Ra(e,r.schema);if(o)if(s){const u=Xf(r,c);n.addStoredMark(c.create({...u,...t}))}else a.forEach(u=>{const f=u.$from.pos,p=u.$to.pos;r.doc.nodesBetween(f,p,(g,v)=>{const y=Math.max(v,f),w=Math.min(v+g.nodeSize,p);g.marks.find(x=>x.type===c)?g.marks.forEach(x=>{c===x.type&&n.addMark(y,w,c.create({...x.attrs,...t}))}):n.addMark(y,w,c.create(t))})});return Lbe(r,n,c)},Rbe=(e,t)=>({tr:n})=>(n.setMeta(e,t),!0),zbe=(e,t={})=>({state:n,dispatch:r,chain:o})=>{const i=Mn(e,n.schema);return i.isTextblock?o().command(({commands:s})=>lI(i,t)(n)?!0:s.clearNodes()).command(({state:s})=>lI(i,t)(s,r)).run():(console.warn('[tiptap warn]: Currently "setNode()" only supports text block nodes.'),!1)},Abe=e=>({tr:t,dispatch:n})=>{if(n){const{doc:r}=t,o=pl(e,0,r.content.size),i=Le.create(r,o);t.setSelection(i)}return!0},Bbe=e=>({tr:t,dispatch:n})=>{if(n){const{doc:r}=t,{from:o,to:i}=typeof e=="number"?{from:e,to:e}:e,s=Ve.atStart(r).from,a=Ve.atEnd(r).to,c=pl(o,s,a),u=pl(i,s,a),f=Ve.create(r,c,u);t.setSelection(f)}return!0},Fbe=e=>({state:t,dispatch:n})=>{const r=Mn(e,t.schema);return _we(r)(t,n)};function mI(e,t){const n=e.storedMarks||e.selection.$to.parentOffset&&e.selection.$from.marks();if(n){const r=n.filter(o=>t?.includes(o.type.name));e.tr.ensureMarks(r)}}const Vbe=({keepMarks:e=!0}={})=>({tr:t,state:n,dispatch:r,editor:o})=>{const{selection:i,doc:s}=t,{$from:a,$to:c}=i,u=o.extensionManager.attributes,f=Xh(u,a.node().type.name,a.node().attrs);if(i instanceof Le&&i.node.isBlock)return!a.parentOffset||!Yc(s,a.pos)?!1:(r&&(e&&mI(n,o.extensionManager.splittableMarks),t.split(a.pos).scrollIntoView()),!0);if(!a.parent.isBlock)return!1;if(r){const p=c.parentOffset===c.parent.content.size;i instanceof Ve&&t.deleteSelection();const g=a.depth===0?void 0:Pbe(a.node(-1).contentMatchAt(a.indexAfter(-1)));let v=p&&g?[{type:g,attrs:f}]:void 0,y=Yc(t.doc,t.mapping.map(a.pos),1,v);if(!v&&!y&&Yc(t.doc,t.mapping.map(a.pos),1,g?[{type:g}]:void 0)&&(y=!0,v=g?[{type:g,attrs:f}]:void 0),y&&(t.split(t.mapping.map(a.pos),1,v),g&&!p&&!a.parentOffset&&a.parent.type!==g)){const w=t.mapping.map(a.before()),P=t.doc.resolve(w);a.node(-1).canReplaceWith(P.index(),P.index()+1,g)&&t.setNodeMarkup(t.mapping.map(a.before()),g)}e&&mI(n,o.extensionManager.splittableMarks),t.scrollIntoView()}return!0},Hbe=e=>({tr:t,state:n,dispatch:r,editor:o})=>{var i;const s=Mn(e,n.schema),{$from:a,$to:c}=n.selection,u=n.selection.node;if(u&&u.isBlock||a.depth<2||!a.sameParent(c))return!1;const f=a.node(-1);if(f.type!==s)return!1;const p=o.extensionManager.attributes;if(a.parent.content.size===0&&a.node(-1).childCount===a.indexAfter(-1)){if(a.depth===2||a.node(-3).type!==s||a.index(-2)!==a.node(-2).childCount-1)return!1;if(r){let P=se.empty;const x=a.index(-1)?1:a.index(-2)?2:3;for(let I=a.depth-x;I>=a.depth-3;I-=1)P=se.from(a.node(I).copy(P));const S=a.indexAfter(-1){if(N>-1)return!1;I.isTextblock&&I.content.size===0&&(N=R+1)}),N>-1&&t.setSelection(Ve.near(t.doc.resolve(N))),t.scrollIntoView()}return!0}const g=c.pos===a.end()?f.contentMatchAt(0).defaultType:null,v=Xh(p,f.type.name,f.attrs),y=Xh(p,a.node().type.name,a.node().attrs);t.delete(a.pos,c.pos);const w=g?[{type:s,attrs:v},{type:g,attrs:y}]:[{type:s,attrs:v}];if(!Yc(t.doc,a.pos,2))return!1;if(r){const{selection:P,storedMarks:x}=n,{splittableMarks:S}=o.extensionManager,O=x||P.$to.parentOffset&&P.$from.marks();if(t.split(a.pos,2,w).scrollIntoView(),!O||!r)return!0;const E=O.filter($=>S.includes($.type.name));t.ensureMarks(E)}return!0},hw=(e,t)=>{const n=dO(s=>s.type===t)(e.selection);if(!n)return!0;const r=e.doc.resolve(Math.max(0,n.pos-1)).before(n.depth);if(r===void 0)return!0;const o=e.doc.nodeAt(r);return n.node.type===o?.type&&La(e.doc,n.pos)&&e.join(n.pos),!0},mw=(e,t)=>{const n=dO(s=>s.type===t)(e.selection);if(!n)return!0;const r=e.doc.resolve(n.start).after(n.depth);if(r===void 0)return!0;const o=e.doc.nodeAt(r);return n.node.type===o?.type&&La(e.doc,r)&&e.join(r),!0},Wbe=(e,t,n,r={})=>({editor:o,tr:i,state:s,dispatch:a,chain:c,commands:u,can:f})=>{const{extensions:p,splittableMarks:g}=o.extensionManager,v=Mn(e,s.schema),y=Mn(t,s.schema),{selection:w,storedMarks:P}=s,{$from:x,$to:S}=w,O=x.blockRange(S),E=P||w.$to.parentOffset&&w.$from.marks();if(!O)return!1;const $=dO(N=>hI(N.type.name,p))(w);if(O.depth>=1&&$&&O.depth-$.depth<=1){if($.node.type===v)return u.liftListItem(y);if(hI($.node.type.name,p)&&v.validContent($.node.content)&&a)return c().command(()=>(i.setNodeMarkup($.pos,v),!0)).command(()=>hw(i,v)).command(()=>mw(i,v)).run()}return!n||!E||!a?c().command(()=>f().wrapInList(v,r)?!0:u.clearNodes()).wrapInList(v,r).command(()=>hw(i,v)).command(()=>mw(i,v)).run():c().command(()=>{const N=f().wrapInList(v,r),I=E.filter(R=>g.includes(R.type.name));return i.ensureMarks(I),N?!0:u.clearNodes()}).wrapInList(v,r).command(()=>hw(i,v)).command(()=>mw(i,v)).run()},Ube=(e,t={},n={})=>({state:r,commands:o})=>{const{extendEmptyMarkRange:i=!1}=n,s=Ra(e,r.schema);return xx(r,s,t)?o.unsetMark(s,{extendEmptyMarkRange:i}):o.setMark(s,t)},Zbe=(e,t,n={})=>({state:r,commands:o})=>{const i=Mn(e,r.schema),s=Mn(t,r.schema);return bf(r,i,n)?o.setNode(s):o.setNode(i,n)},Gbe=(e,t={})=>({state:n,commands:r})=>{const o=Mn(e,n.schema);return bf(n,o,t)?r.lift(o):r.wrapIn(o,t)},Ybe=()=>({state:e,dispatch:t})=>{const n=e.plugins;for(let r=0;r=0;c-=1)s.step(a.steps[c].invert(a.docs[c]));if(i.text){const c=s.doc.resolve(i.from).marks();s.replaceWith(i.from,i.to,e.schema.text(i.text,c))}else s.delete(i.from,i.to)}return!0}}return!1},Kbe=()=>({tr:e,dispatch:t})=>{const{selection:n}=e,{empty:r,ranges:o}=n;return r||t&&o.forEach(i=>{e.removeMark(i.$from.pos,i.$to.pos)}),!0},qbe=(e,t={})=>({tr:n,state:r,dispatch:o})=>{var i;const{extendEmptyMarkRange:s=!1}=t,{selection:a}=n,c=Ra(e,r.schema),{$from:u,empty:f,ranges:p}=a;if(!o)return!0;if(f&&s){let{from:g,to:v}=a;const y=(i=u.marks().find(P=>P.type===c))===null||i===void 0?void 0:i.attrs,w=lO(u,c,y);w&&(g=w.from,v=w.to),n.removeMark(g,v,c)}else p.forEach(g=>{n.removeMark(g.$from.pos,g.$to.pos,c)});return n.removeStoredMark(c),!0},Jbe=(e,t={})=>({tr:n,state:r,dispatch:o})=>{let i=null,s=null;const a=n1(typeof e=="string"?e:e.name,r.schema);return a?(a==="node"&&(i=Mn(e,r.schema)),a==="mark"&&(s=Ra(e,r.schema)),o&&n.selection.ranges.forEach(c=>{const u=c.$from.pos,f=c.$to.pos;r.doc.nodesBetween(u,f,(p,g)=>{i&&i===p.type&&n.setNodeMarkup(g,void 0,{...p.attrs,...t}),s&&p.marks.length&&p.marks.forEach(v=>{if(s===v.type){const y=Math.max(g,u),w=Math.min(g+p.nodeSize,f);n.addMark(y,w,s.create({...v.attrs,...t}))}})})}),!0):!1},Xbe=(e,t={})=>({state:n,dispatch:r})=>{const o=Mn(e,n.schema);return pwe(o,t)(n,r)},Qbe=(e,t={})=>({state:n,dispatch:r})=>{const o=Mn(e,n.schema);return hwe(o,t)(n,r)};var exe=Object.freeze({__proto__:null,blur:Lwe,clearContent:Dwe,clearNodes:Rwe,command:zwe,createParagraphNear:Awe,cut:Bwe,deleteCurrentNode:Fwe,deleteNode:Vwe,deleteRange:Hwe,deleteSelection:Wwe,enter:Uwe,exitCode:Zwe,extendMarkRange:Ywe,first:Kwe,focus:qwe,forEach:Jwe,insertContent:Xwe,insertContentAt:tbe,joinUp:nbe,joinDown:rbe,joinBackward:obe,joinForward:ibe,joinItemBackward:sbe,joinItemForward:abe,keyboardShortcut:cbe,lift:ube,liftEmptyBlock:dbe,liftListItem:fbe,newlineInCode:pbe,resetAttributes:hbe,scrollIntoView:mbe,selectAll:gbe,selectNodeBackward:vbe,selectNodeForward:ybe,selectParentNode:_be,selectTextblockEnd:wbe,selectTextblockStart:bbe,setContent:xbe,setMark:Dbe,setMeta:Rbe,setNode:zbe,setNodeSelection:Abe,setTextSelection:Bbe,sinkListItem:Fbe,splitBlock:Vbe,splitListItem:Hbe,toggleList:Wbe,toggleMark:Ube,toggleNode:Zbe,toggleWrap:Gbe,undoInputRule:Ybe,unsetAllMarks:Kbe,unsetMark:qbe,updateAttributes:Jbe,wrapIn:Xbe,wrapInList:Qbe});const txe=br.create({name:"commands",addCommands(){return{...exe}}}),nxe=br.create({name:"editable",addProseMirrorPlugins(){return[new Zr({key:new Ai("editable"),props:{editable:()=>this.editor.options.editable}})]}}),rxe=br.create({name:"focusEvents",addProseMirrorPlugins(){const{editor:e}=this;return[new Zr({key:new Ai("focusEvents"),props:{handleDOMEvents:{focus:(t,n)=>{e.isFocused=!0;const r=e.state.tr.setMeta("focus",{event:n}).setMeta("addToHistory",!1);return t.dispatch(r),!1},blur:(t,n)=>{e.isFocused=!1;const r=e.state.tr.setMeta("blur",{event:n}).setMeta("addToHistory",!1);return t.dispatch(r),!1}}}})]}}),oxe=br.create({name:"keymap",addKeyboardShortcuts(){const e=()=>this.editor.commands.first(({commands:s})=>[()=>s.undoInputRule(),()=>s.command(({tr:a})=>{const{selection:c,doc:u}=a,{empty:f,$anchor:p}=c,{pos:g,parent:v}=p,y=p.parent.isTextblock?a.doc.resolve(g-1):p,w=y.parent.type.spec.isolating,P=p.pos-p.parentOffset,x=w&&y.parent.childCount===1?P===p.pos:Ze.atStart(u).from===g;return!f||!x||!v.type.isTextblock||v.textContent.length?!1:s.clearNodes()}),()=>s.deleteSelection(),()=>s.joinBackward(),()=>s.selectNodeBackward()]),t=()=>this.editor.commands.first(({commands:s})=>[()=>s.deleteSelection(),()=>s.deleteCurrentNode(),()=>s.joinForward(),()=>s.selectNodeForward()]),r={Enter:()=>this.editor.commands.first(({commands:s})=>[()=>s.newlineInCode(),()=>s.createParagraphNear(),()=>s.liftEmptyBlock(),()=>s.splitBlock()]),"Mod-Enter":()=>this.editor.commands.exitCode(),Backspace:e,"Mod-Backspace":e,"Shift-Backspace":e,Delete:t,"Mod-Delete":t,"Mod-a":()=>this.editor.commands.selectAll()},o={...r},i={...r,"Ctrl-h":e,"Alt-Backspace":e,"Ctrl-d":t,"Ctrl-Alt-Backspace":t,"Alt-Delete":t,"Alt-d":t,"Ctrl-a":()=>this.editor.commands.selectTextblockStart(),"Ctrl-e":()=>this.editor.commands.selectTextblockEnd()};return cO()||uO()?i:o},addProseMirrorPlugins(){return[new Zr({key:new Ai("clearDocument"),appendTransaction:(e,t,n)=>{if(!(e.some(y=>y.docChanged)&&!t.doc.eq(n.doc)))return;const{empty:o,from:i,to:s}=t.selection,a=Ze.atStart(t.doc).from,c=Ze.atEnd(t.doc).to;if(o||!(i===a&&s===c)||!(n.doc.textBetween(0,n.doc.content.size," "," ").length===0))return;const p=n.tr,g=J0({state:n,transaction:p}),{commands:v}=new X0({editor:this.editor,state:g});if(v.clearNodes(),!!p.steps.length)return p}})]}}),ixe=br.create({name:"tabindex",addProseMirrorPlugins(){return[new Zr({key:new Ai("tabindex"),props:{attributes:this.editor.isEditable?{tabindex:"0"}:{}}})]}});var sxe=Object.freeze({__proto__:null,ClipboardTextSerializer:jwe,Commands:txe,Editable:nxe,FocusEvents:rxe,Keymap:oxe,Tabindex:ixe});const axe=`.ProseMirror { position: relative; } @@ -662,20 +662,20 @@ img.ProseMirror-separator { .tippy-box[data-animation=fade][data-state=hidden] { opacity: 0 -}`;function cxe(e,t,n){const r=document.querySelector(`style[data-tiptap-style${n?`-${n}`:""}]`);if(r!==null)return r;const o=document.createElement("style");return t&&o.setAttribute("nonce",t),o.setAttribute(`data-tiptap-style${n?`-${n}`:""}`,""),o.innerHTML=e,document.getElementsByTagName("head")[0].appendChild(o),o}let uxe=class extends bwe{constructor(t={}){super(),this.isFocused=!1,this.extensionStorage={},this.options={element:document.createElement("div"),content:"",injectCSS:!0,injectNonce:void 0,extensions:[],autofocus:!1,editable:!0,editorProps:{},parseOptions:{},enableInputRules:!0,enablePasteRules:!0,enableCoreExtensions:!0,onBeforeCreate:()=>null,onCreate:()=>null,onUpdate:()=>null,onSelectionUpdate:()=>null,onTransaction:()=>null,onFocus:()=>null,onBlur:()=>null,onDestroy:()=>null},this.isCapturingTransaction=!1,this.capturedTransaction=null,this.setOptions(t),this.createExtensionManager(),this.createCommandManager(),this.createSchema(),this.on("beforeCreate",this.options.onBeforeCreate),this.emit("beforeCreate",{editor:this}),this.createView(),this.injectCSS(),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),window.setTimeout(()=>{this.isDestroyed||(this.commands.focus(this.options.autofocus),this.emit("create",{editor:this}))},0)}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&&document&&(this.css=cxe(lxe,this.options.injectNonce))}setOptions(t={}){this.options={...this.options,...t},!(!this.view||!this.state||this.isDestroyed)&&(this.options.editorProps&&this.view.setProps(this.options.editorProps),this.view.updateState(this.state))}setEditable(t,n=!0){this.setOptions({editable:t}),n&&this.emit("update",{editor:this,transaction:this.state.tr})}get isEditable(){return this.options.editable&&this.view&&this.view.editable}get state(){return this.view.state}registerPlugin(t,n){const r=i9(n)?n(t,[...this.state.plugins]):[...this.state.plugins,t],o=this.state.reconfigure({plugins:r});this.view.updateState(o)}unregisterPlugin(t){if(this.isDestroyed)return;const n=typeof t=="string"?`${t}$`:t.key,r=this.state.reconfigure({plugins:this.state.plugins.filter(o=>!o.key.startsWith(n))});this.view.updateState(r)}createExtensionManager(){const n=[...this.options.enableCoreExtensions?Object.values(axe):[],...this.options.extensions].filter(r=>["extension","node","mark"].includes(r?.type));this.extensionManager=new Nc(n,this)}createCommandManager(){this.commandManager=new X0({editor:this})}createSchema(){this.schema=this.extensionManager.schema}createView(){const t=u9(this.options.content,this.schema,this.options.parseOptions),n=c9(t,this.options.autofocus);this.view=new B_e(this.options.element,{...this.options.editorProps,dispatchTransaction:this.dispatchTransaction.bind(this),state:Mc.create({doc:t,selection:n||void 0})});const r=this.state.reconfigure({plugins:this.extensionManager.plugins});this.view.updateState(r),this.createNodeViews(),this.prependClass();const o=this.view.dom;o.editor=this}createNodeViews(){this.view.setProps({nodeViews:this.extensionManager.nodeViews})}prependClass(){this.view.dom.className=`tiptap ${this.view.dom.className}`}captureTransaction(t){this.isCapturingTransaction=!0,t(),this.isCapturingTransaction=!1;const n=this.capturedTransaction;return this.capturedTransaction=null,n}dispatchTransaction(t){if(this.view.isDestroyed)return;if(this.isCapturingTransaction){if(!this.capturedTransaction){this.capturedTransaction=t;return}t.steps.forEach(s=>{var a;return(a=this.capturedTransaction)===null||a===void 0?void 0:a.step(s)});return}const n=this.state.apply(t),r=!this.state.selection.eq(n.selection);this.view.updateState(n),this.emit("transaction",{editor:this,transaction:t}),r&&this.emit("selectionUpdate",{editor:this,transaction:t});const o=t.getMeta("focus"),i=t.getMeta("blur");o&&this.emit("focus",{editor:this,event:o.event,transaction:t}),i&&this.emit("blur",{editor:this,event:i.event,transaction:t}),!(!t.docChanged||t.getMeta("preventUpdate"))&&this.emit("update",{editor:this,transaction:t})}getAttributes(t){return d9(this.state,t)}isActive(t,n){const r=typeof t=="string"?t:null,o=typeof t=="string"?n:t;return jbe(this.state,r,o)}getJSON(){return this.state.doc.toJSON()}getHTML(){return Ebe(this.state.doc.content,this.schema)}getText(t){const{blockSeparator:n=` +}`;function lxe(e,t,n){const r=document.querySelector(`style[data-tiptap-style${n?`-${n}`:""}]`);if(r!==null)return r;const o=document.createElement("style");return t&&o.setAttribute("nonce",t),o.setAttribute(`data-tiptap-style${n?`-${n}`:""}`,""),o.innerHTML=e,document.getElementsByTagName("head")[0].appendChild(o),o}let cxe=class extends wwe{constructor(t={}){super(),this.isFocused=!1,this.extensionStorage={},this.options={element:document.createElement("div"),content:"",injectCSS:!0,injectNonce:void 0,extensions:[],autofocus:!1,editable:!0,editorProps:{},parseOptions:{},enableInputRules:!0,enablePasteRules:!0,enableCoreExtensions:!0,onBeforeCreate:()=>null,onCreate:()=>null,onUpdate:()=>null,onSelectionUpdate:()=>null,onTransaction:()=>null,onFocus:()=>null,onBlur:()=>null,onDestroy:()=>null},this.isCapturingTransaction=!1,this.capturedTransaction=null,this.setOptions(t),this.createExtensionManager(),this.createCommandManager(),this.createSchema(),this.on("beforeCreate",this.options.onBeforeCreate),this.emit("beforeCreate",{editor:this}),this.createView(),this.injectCSS(),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),window.setTimeout(()=>{this.isDestroyed||(this.commands.focus(this.options.autofocus),this.emit("create",{editor:this}))},0)}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&&document&&(this.css=lxe(axe,this.options.injectNonce))}setOptions(t={}){this.options={...this.options,...t},!(!this.view||!this.state||this.isDestroyed)&&(this.options.editorProps&&this.view.setProps(this.options.editorProps),this.view.updateState(this.state))}setEditable(t,n=!0){this.setOptions({editable:t}),n&&this.emit("update",{editor:this,transaction:this.state.tr})}get isEditable(){return this.options.editable&&this.view&&this.view.editable}get state(){return this.view.state}registerPlugin(t,n){const r=i9(n)?n(t,[...this.state.plugins]):[...this.state.plugins,t],o=this.state.reconfigure({plugins:r});this.view.updateState(o)}unregisterPlugin(t){if(this.isDestroyed)return;const n=typeof t=="string"?`${t}$`:t.key,r=this.state.reconfigure({plugins:this.state.plugins.filter(o=>!o.key.startsWith(n))});this.view.updateState(r)}createExtensionManager(){const n=[...this.options.enableCoreExtensions?Object.values(sxe):[],...this.options.extensions].filter(r=>["extension","node","mark"].includes(r?.type));this.extensionManager=new Nc(n,this)}createCommandManager(){this.commandManager=new X0({editor:this})}createSchema(){this.schema=this.extensionManager.schema}createView(){const t=u9(this.options.content,this.schema,this.options.parseOptions),n=c9(t,this.options.autofocus);this.view=new A_e(this.options.element,{...this.options.editorProps,dispatchTransaction:this.dispatchTransaction.bind(this),state:Mc.create({doc:t,selection:n||void 0})});const r=this.state.reconfigure({plugins:this.extensionManager.plugins});this.view.updateState(r),this.createNodeViews(),this.prependClass();const o=this.view.dom;o.editor=this}createNodeViews(){this.view.setProps({nodeViews:this.extensionManager.nodeViews})}prependClass(){this.view.dom.className=`tiptap ${this.view.dom.className}`}captureTransaction(t){this.isCapturingTransaction=!0,t(),this.isCapturingTransaction=!1;const n=this.capturedTransaction;return this.capturedTransaction=null,n}dispatchTransaction(t){if(this.view.isDestroyed)return;if(this.isCapturingTransaction){if(!this.capturedTransaction){this.capturedTransaction=t;return}t.steps.forEach(s=>{var a;return(a=this.capturedTransaction)===null||a===void 0?void 0:a.step(s)});return}const n=this.state.apply(t),r=!this.state.selection.eq(n.selection);this.view.updateState(n),this.emit("transaction",{editor:this,transaction:t}),r&&this.emit("selectionUpdate",{editor:this,transaction:t});const o=t.getMeta("focus"),i=t.getMeta("blur");o&&this.emit("focus",{editor:this,event:o.event,transaction:t}),i&&this.emit("blur",{editor:this,event:i.event,transaction:t}),!(!t.docChanged||t.getMeta("preventUpdate"))&&this.emit("update",{editor:this,transaction:t})}getAttributes(t){return d9(this.state,t)}isActive(t,n){const r=typeof t=="string"?t:null,o=typeof t=="string"?n:t;return Ibe(this.state,r,o)}getJSON(){return this.state.doc.toJSON()}getHTML(){return kbe(this.state.doc.content,this.schema)}getText(t){const{blockSeparator:n=` -`,textSerializers:r={}}=t||{};return $be(this.state.doc,{blockSeparator:n,textSerializers:{...a9(this.schema),...r}})}get isEmpty(){return Lbe(this.state.doc)}getCharacterCount(){return console.warn('[tiptap warn]: "editor.getCharacterCount()" is deprecated. Please use "editor.storage.characterCount.characters()" instead.'),this.state.doc.content.size-2}destroy(){this.emit("destroy"),this.view&&this.view.destroy(),this.removeAllListeners()}get isDestroyed(){var t;return!(!((t=this.view)===null||t===void 0)&&t.docView)}};function Ll(e){return new e1({find:e.find,handler:({state:t,range:n,match:r})=>{const o=Ue(e.getAttributes,void 0,r);if(o===!1||o===null)return null;const{tr:i}=t,s=r[r.length-1],a=r[0];if(s){const c=a.search(/\S/),u=n.from+a.indexOf(s),f=u+s.length;if(fO(n.from,n.to,t.doc).filter(v=>v.mark.type.excluded.find(w=>w===e.type&&w!==v.mark.type)).filter(v=>v.to>u).length)return null;fn.from&&i.delete(n.from+c,u);const g=n.from+c+s.length;i.addMark(n.from+c,g,e.type.create(o||{})),i.removeStoredMark(e.type)}}})}function f9(e){return new e1({find:e.find,handler:({state:t,range:n,match:r})=>{const o=Ue(e.getAttributes,void 0,r)||{},{tr:i}=t,s=n.from;let a=n.to;const c=e.type.create(o);if(r[1]){const u=r[0].lastIndexOf(r[1]);let f=s+u;f>a?f=a:a=f+r[1].length;const p=r[0][r[0].length-1];i.insertText(p,s+r[0].length-1),i.replaceWith(f,a,c)}else r[0]&&i.insert(s-1,e.type.create(o)).delete(i.mapping.map(s),i.mapping.map(a));i.scrollIntoView()}})}function Sx(e){return new e1({find:e.find,handler:({state:t,range:n,match:r})=>{const o=t.doc.resolve(n.from),i=Ue(e.getAttributes,void 0,r)||{};if(!o.node(-1).canReplaceWith(o.index(-1),o.indexAfter(-1),e.type))return null;t.tr.delete(n.from,n.to).setBlockType(n.from,n.from,e.type,i)}})}function xf(e){return new e1({find:e.find,handler:({state:t,range:n,match:r,chain:o})=>{const i=Ue(e.getAttributes,void 0,r)||{},s=t.tr.delete(n.from,n.to),c=s.doc.resolve(n.from).blockRange(),u=c&&KP(c,e.type,i);if(!u)return null;if(s.wrap(c,u),e.keepMarks&&e.editor){const{selection:p,storedMarks:g}=t,{splittableMarks:v}=e.editor.extensionManager,y=g||p.$to.parentOffset&&p.$from.marks();if(y){const w=y.filter(P=>v.includes(P.type.name));s.ensureMarks(w)}}if(e.keepAttributes){const p=e.type.name==="bulletList"||e.type.name==="orderedList"?"listItem":"taskList";o().updateAttributes(p,i).run()}const f=s.doc.resolve(n.from-1).nodeBefore;f&&f.type===e.type&&La(s.doc,n.from-1)&&(!e.joinPredicate||e.joinPredicate(r,f))&&s.join(n.from-1)}})}class or{constructor(t={}){this.type="mark",this.name="mark",this.parent=null,this.child=null,this.config={name:this.name,defaultOptions:{}},this.config={...this.config,...t},this.name=this.config.name,t.defaultOptions&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`),this.options=this.config.defaultOptions,this.config.addOptions&&(this.options=Ue(Ce(this,"addOptions",{name:this.name}))),this.storage=Ue(Ce(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(t={}){return new or(t)}configure(t={}){const n=this.extend();return n.options=t1(this.options,t),n.storage=Ue(Ce(n,"addStorage",{name:n.name,options:n.options})),n}extend(t={}){const n=new or(t);return n.parent=this,this.child=n,n.name=t.name?t.name:n.parent.name,t.defaultOptions&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${n.name}".`),n.options=Ue(Ce(n,"addOptions",{name:n.name})),n.storage=Ue(Ce(n,"addStorage",{name:n.name,options:n.options})),n}static handleExit({editor:t,mark:n}){const{tr:r}=t.state,o=t.state.selection.$from;if(o.pos===o.end()){const s=o.marks();if(!!!s.find(u=>u?.type.name===n.name))return!1;const c=s.find(u=>u?.type.name===n.name);return c&&r.removeStoredMark(c),r.insertText(" ",o.pos),t.view.dispatch(r),!0}return!1}}let Gr=class Px{constructor(t={}){this.type="node",this.name="node",this.parent=null,this.child=null,this.config={name:this.name,defaultOptions:{}},this.config={...this.config,...t},this.name=this.config.name,t.defaultOptions&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`),this.options=this.config.defaultOptions,this.config.addOptions&&(this.options=Ue(Ce(this,"addOptions",{name:this.name}))),this.storage=Ue(Ce(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(t={}){return new Px(t)}configure(t={}){const n=this.extend();return n.options=t1(this.options,t),n.storage=Ue(Ce(n,"addStorage",{name:n.name,options:n.options})),n}extend(t={}){const n=new Px(t);return n.parent=this,this.child=n,n.name=t.name?t.name:n.parent.name,t.defaultOptions&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${n.name}".`),n.options=Ue(Ce(n,"addOptions",{name:n.name})),n.storage=Ue(Ce(n,"addStorage",{name:n.name,options:n.options})),n}};function ka(e){return new $we({find:e.find,handler:({state:t,range:n,match:r,pasteEvent:o})=>{const i=Ue(e.getAttributes,void 0,r,o);if(i===!1||i===null)return null;const{tr:s}=t,a=r[r.length-1],c=r[0];let u=n.to;if(a){const f=c.search(/\S/),p=n.from+c.indexOf(a),g=p+a.length;if(fO(n.from,n.to,t.doc).filter(y=>y.mark.type.excluded.find(P=>P===e.type&&P!==y.mark.type)).filter(y=>y.to>p).length)return null;gn.from&&s.delete(n.from+f,p),u=n.from+f+a.length,s.addMark(n.from+f,u,e.type.create(i||{})),s.removeStoredMark(e.type)}}})}const dxe=({renderers:e})=>k.createElement(k.Fragment,null,Object.entries(e).map(([t,n])=>mq.createPortal(n.reactElement,n.element,t)));class fxe extends k.Component{constructor(t){super(t),this.editorContentRef=k.createRef(),this.initialized=!1,this.state={renderers:{}}}componentDidMount(){this.init()}componentDidUpdate(){this.init()}init(){const{editor:t}=this.props;if(t&&t.options.element){if(t.contentComponent)return;const n=this.editorContentRef.current;n.append(...t.options.element.childNodes),t.setOptions({element:n}),t.contentComponent=this,t.createNodeViews(),this.initialized=!0}}maybeFlushSync(t){this.initialized?xs.flushSync(t):t()}setRenderer(t,n){this.maybeFlushSync(()=>{this.setState(({renderers:r})=>({renderers:{...r,[t]:n}}))})}removeRenderer(t){this.maybeFlushSync(()=>{this.setState(({renderers:n})=>{const r={...n};return delete r[t],{renderers:r}})})}componentWillUnmount(){const{editor:t}=this.props;if(!t||(this.initialized=!1,t.isDestroyed||t.view.setProps({nodeViews:{}}),t.contentComponent=null,!t.options.element.firstChild))return;const n=document.createElement("div");n.append(...t.options.element.childNodes),t.setOptions({element:n})}render(){const{editor:t,...n}=this.props;return k.createElement(k.Fragment,null,k.createElement("div",{ref:this.editorContentRef,...n}),k.createElement(dxe,{renderers:this.state.renderers}))}}const pxe=e=>{const t=k.useMemo(()=>Math.floor(Math.random()*4294967295).toString(),[e.editor]);return k.createElement(fxe,{key:t,...e})},hxe=k.memo(pxe);class mxe extends uxe{constructor(){super(...arguments),this.contentComponent=null}}function gxe(){const[,e]=_.useState(0);return()=>e(t=>t+1)}const p9=(e={},t=[])=>{const[n,r]=_.useState(null),o=gxe(),{onBeforeCreate:i,onBlur:s,onCreate:a,onDestroy:c,onFocus:u,onSelectionUpdate:f,onTransaction:p,onUpdate:g}=e,v=_.useRef(i),y=_.useRef(s),w=_.useRef(a),P=_.useRef(c),x=_.useRef(u),S=_.useRef(f),O=_.useRef(p),E=_.useRef(g);return _.useEffect(()=>{n&&(i&&(n.off("beforeCreate",v.current),n.on("beforeCreate",i),v.current=i),s&&(n.off("blur",y.current),n.on("blur",s),y.current=s),a&&(n.off("create",w.current),n.on("create",a),w.current=a),c&&(n.off("destroy",P.current),n.on("destroy",c),P.current=c),u&&(n.off("focus",x.current),n.on("focus",u),x.current=u),f&&(n.off("selectionUpdate",S.current),n.on("selectionUpdate",f),S.current=f),p&&(n.off("transaction",O.current),n.on("transaction",p),O.current=p),g&&(n.off("update",E.current),n.on("update",g),E.current=g))},[i,s,a,c,u,f,p,g,n]),_.useEffect(()=>{let $=!0;const N=new mxe(e);return r(N),N.on("transaction",()=>{requestAnimationFrame(()=>{requestAnimationFrame(()=>{$&&o()})})}),()=>{$=!1}},t),_.useEffect(()=>()=>{n?.destroy()},[n]),n},vxe=_.createContext({editor:null});vxe.Consumer;const yxe=_.createContext({onDragStart:void 0}),_xe=()=>_.useContext(yxe);k.forwardRef((e,t)=>{const{onDragStart:n}=_xe(),r=e.as||"div";return k.createElement(r,{...e,ref:t,"data-node-view-wrapper":"",onDragStart:n,style:{whiteSpace:"normal",...e.style}})});var wxe=Object.defineProperty,gI=Object.getOwnPropertySymbols,bxe=Object.prototype.hasOwnProperty,xxe=Object.prototype.propertyIsEnumerable,vI=(e,t,n)=>t in e?wxe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,gw=(e,t)=>{for(var n in t||(t={}))bxe.call(t,n)&&vI(e,n,t[n]);if(gI)for(var n of gI(t))xxe.call(t,n)&&vI(e,n,t[n]);return e};function Sxe(e,t){if(!e)return null;const n=t.colorScheme==="dark"?5:7;return{pre:{background:t.colorScheme==="dark"?t.colors.dark[8]:t.fn.rgba(t.colors.gray[0],.65),borderRadius:t.fn.radius(),color:t.colorScheme==="dark"?t.colors.dark[0]:t.colors.gray[9],fontFamily:t.fontFamilyMonospace,padding:`${t.spacing.md} ${t.spacing.xl}`,"& code":{background:"none",color:"inherit",fontSize:t.fontSizes.sm,padding:0}," & .hljs-comment, & .hljs-quote":{color:t.colorScheme==="dark"?t.colors.dark[2]:t.colors.gray[5]},"& .hljs-variable, & .hljs-template-variable, & .hljs-attribute, & .hljs-tag, & .hljs-name, & .hljs-regexp, & .hljs-link, & .hljs-name, & .hljs-selector-id, & .hljs-selector-class":{color:t.colors.red[n]},"& .hljs-number, & .hljs-meta, & .hljs-built_in, & .hljs-builtin-name, & .hljs-literal, & .hljs-type, & .hljs-params":{color:t.colors[t.colorScheme==="dark"?"cyan":"blue"][n]},"& .hljs-string, & .hljs-symbol, & .hljs-bullet":{color:t.colors.red[n]},"& .hljs-title, & .hljs-section":{color:t.colors[t.colorScheme==="dark"?"yellow":"pink"][n]},"& .hljs-keyword, & .hljs-selector-tag":{color:t.colors.violet[n]},"& .hljs-emphasis":{fontStyle:"italic"},"& .hljs-strong":{fontWeight:700}}}}function Pxe(e){return e?{"& li > p":{margin:0},"& ul li, & ol li":{marginTop:M(2)},"& ul, & ol":{marginTop:M(5),marginBottom:M(5)},"& p":{marginBottom:M(7)},"& h1, & h2, & h3, & h4, & h5, & h6, & p":{marginTop:0}}:null}var Oxe=ue((e,{withCodeHighlightStyles:t,withTypographyStyles:n})=>({typographyStylesProvider:gw({},Pxe(n)),content:gw({backgroundColor:e.colorScheme==="dark"?e.colors.dark[7]:e.white,borderRadius:e.fn.radius(),"& .ProseMirror":{outline:0,padding:e.spacing.md},"& .ProseMirror > *:last-child":{marginBottom:0},"& .ProseMirror p.is-editor-empty:first-of-type::before":gw({content:"attr(data-placeholder)",pointerEvents:"none",userSelect:"none",float:"left",height:0},e.fn.placeholderStyles())},Sxe(t,e))}));const Cxe=Oxe;var kxe=Object.defineProperty,Yv=Object.getOwnPropertySymbols,h9=Object.prototype.hasOwnProperty,m9=Object.prototype.propertyIsEnumerable,yI=(e,t,n)=>t in e?kxe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Exe=(e,t)=>{for(var n in t||(t={}))h9.call(t,n)&&yI(e,n,t[n]);if(Yv)for(var n of Yv(t))m9.call(t,n)&&yI(e,n,t[n]);return e},$xe=(e,t)=>{var n={};for(var r in e)h9.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Yv)for(var r of Yv(e))t.indexOf(r)<0&&m9.call(e,r)&&(n[r]=e[r]);return n};const Mxe={},g9=_.forwardRef((e,t)=>{const n=ae("RichTextEditorContent",Mxe,e),{className:r}=n,o=$xe(n,["className"]),{editor:i,withCodeHighlightStyles:s,withTypographyStyles:a,classNames:c,styles:u,unstyled:f,variant:p}=ja(),{classes:g,cx:v}=Cxe({withCodeHighlightStyles:s,withTypographyStyles:a},{name:"RichTextEditor",classNames:c,styles:u,unstyled:f,variant:p});return k.createElement(l8,{className:v(g.typographyStylesProvider,r),unstyled:!a||f,ref:t},k.createElement(Pe,Exe({component:hxe,editor:i,className:g.content},o)))});g9.displayName="@mantine/tiptap/Content";var Nxe=Object.defineProperty,_I=Object.getOwnPropertySymbols,Txe=Object.prototype.hasOwnProperty,Ixe=Object.prototype.propertyIsEnumerable,wI=(e,t,n)=>t in e?Nxe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,bI=(e,t)=>{for(var n in t||(t={}))Txe.call(t,n)&&wI(e,n,t[n]);if(_I)for(var n of _I(t))Ixe.call(t,n)&&wI(e,n,t[n]);return e},jxe=ue(e=>{const t=e.fn.variant({variant:"light"});return{control:{backgroundColor:e.colorScheme==="dark"?e.colors.dark[6]:e.white,minWidth:M(26),height:M(26),display:"flex",justifyContent:"center",alignItems:"center",border:`${M(1)} solid ${e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[4]}`,borderRadius:e.fn.radius(),cursor:"default","&[data-interactive]":bI({cursor:"pointer"},e.fn.hover({backgroundColor:e.colorScheme==="dark"?e.colors.dark[5]:e.colors.gray[0]})),"&[data-active]":{backgroundColor:t.background,color:t.color,"&:hover":bI({},e.fn.hover({backgroundColor:t.hover}))}}}});const Lxe=jxe;var Dxe=Object.defineProperty,Kv=Object.getOwnPropertySymbols,v9=Object.prototype.hasOwnProperty,y9=Object.prototype.propertyIsEnumerable,xI=(e,t,n)=>t in e?Dxe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Rxe=(e,t)=>{for(var n in t||(t={}))v9.call(t,n)&&xI(e,n,t[n]);if(Kv)for(var n of Kv(t))y9.call(t,n)&&xI(e,n,t[n]);return e},zxe=(e,t)=>{var n={};for(var r in e)v9.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Kv)for(var r of Kv(e))t.indexOf(r)<0&&y9.call(e,r)&&(n[r]=e[r]);return n};const Axe={interactive:!0},Qf=_.forwardRef((e,t)=>{const n=ae("RichTextEditorControl",Axe,e),{className:r,active:o,children:i,interactive:s}=n,a=zxe(n,["className","active","children","interactive"]),{classNames:c,styles:u,unstyled:f,variant:p}=ja(),{classes:g,cx:v}=Lxe(null,{name:"RichTextEditor",classNames:c,styles:u,unstyled:f,variant:p});return k.createElement(ls,Rxe({className:v(g.control,r),"data-rich-text-editor-control":!0,tabIndex:s?0:-1,"data-interactive":s||void 0,"data-active":o||void 0,"aria-pressed":o&&s||void 0,"aria-hidden":!s||void 0,ref:t,unstyled:f},a),i)});Qf.displayName="@mantine/tiptap/Control";var Bxe=ue(e=>({controlsGroup:{display:"flex","& [data-rich-text-editor-control]":{borderRadius:0,"&:not(:last-of-type)":{borderRight:0},"&:last-of-type":{borderTopRightRadius:e.fn.radius(),borderBottomRightRadius:e.fn.radius()},"&:first-of-type":{borderTopLeftRadius:e.fn.radius(),borderBottomLeftRadius:e.fn.radius()}}}}));const Fxe=Bxe;var Vxe=Object.defineProperty,qv=Object.getOwnPropertySymbols,_9=Object.prototype.hasOwnProperty,w9=Object.prototype.propertyIsEnumerable,SI=(e,t,n)=>t in e?Vxe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Hxe=(e,t)=>{for(var n in t||(t={}))_9.call(t,n)&&SI(e,n,t[n]);if(qv)for(var n of qv(t))w9.call(t,n)&&SI(e,n,t[n]);return e},Wxe=(e,t)=>{var n={};for(var r in e)_9.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&qv)for(var r of qv(e))t.indexOf(r)<0&&w9.call(e,r)&&(n[r]=e[r]);return n};const Uxe={},b9=_.forwardRef((e,t)=>{const n=ae("RichTextEditorControlsGroup",Uxe,e),{className:r,children:o}=n,i=Wxe(n,["className","children"]),{classNames:s,styles:a,unstyled:c}=ja(),{classes:u,cx:f}=Fxe(null,{name:"RichTextEditor",classNames:s,styles:a,unstyled:c});return k.createElement(Pe,Hxe({className:f(u.controlsGroup,r),ref:t},i),o)});b9.displayName="@mantine/tiptap/ControlsGroup";var Zxe=ue((e,{sticky:t,stickyOffset:n})=>({toolbar:{position:t?"sticky":"static",top:t?M(n):void 0,padding:`${e.spacing.xs} ${e.spacing.md}`,backgroundColor:e.colorScheme==="dark"?e.colors.dark[7]:e.white,zIndex:1,borderTopRightRadius:e.fn.radius(),borderTopLeftRadius:e.fn.radius(),borderBottom:`${M(1)} solid ${e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[4]}`}}));const Gxe=Zxe;var Yxe=Object.defineProperty,Jv=Object.getOwnPropertySymbols,x9=Object.prototype.hasOwnProperty,S9=Object.prototype.propertyIsEnumerable,PI=(e,t,n)=>t in e?Yxe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Kxe=(e,t)=>{for(var n in t||(t={}))x9.call(t,n)&&PI(e,n,t[n]);if(Jv)for(var n of Jv(t))S9.call(t,n)&&PI(e,n,t[n]);return e},qxe=(e,t)=>{var n={};for(var r in e)x9.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Jv)for(var r of Jv(e))t.indexOf(r)<0&&S9.call(e,r)&&(n[r]=e[r]);return n};const Jxe={stickyOffset:0},P9=_.forwardRef((e,t)=>{const n=ae("RichTextEditorToolbar",Jxe,e),{className:r,children:o,sticky:i,stickyOffset:s}=n,a=qxe(n,["className","children","sticky","stickyOffset"]),c=ja(),{classes:u,cx:f}=Gxe({sticky:i,stickyOffset:s},{name:"RichTextEditor",classNames:c.classNames,styles:c.styles,unstyled:c.unstyled,variant:c.variant});return k.createElement(nt,Kxe({className:f(u.toolbar,r),ref:t},a),o)});P9.displayName="@mantine/tiptap/Toolbar";const Xxe={linkControlLabel:"Link",colorPickerControlLabel:"Text color",highlightControlLabel:"Highlight text",colorControlLabel:e=>`Set text color ${e}`,boldControlLabel:"Bold",italicControlLabel:"Italic",underlineControlLabel:"Underline",strikeControlLabel:"Strikethrough",clearFormattingControlLabel:"Clear formatting",unlinkControlLabel:"Remove link",bulletListControlLabel:"Bullet list",orderedListControlLabel:"Ordered list",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",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:e=>`Set text color ${e}`};var Qxe=ue(e=>({root:{position:"relative",border:`${M(1)} solid ${e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[4]}`,borderRadius:e.fn.radius()}}));const eSe=Qxe;var tSe=Object.defineProperty,Xv=Object.getOwnPropertySymbols,O9=Object.prototype.hasOwnProperty,C9=Object.prototype.propertyIsEnumerable,OI=(e,t,n)=>t in e?tSe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,nSe=(e,t)=>{for(var n in t||(t={}))O9.call(t,n)&&OI(e,n,t[n]);if(Xv)for(var n of Xv(t))C9.call(t,n)&&OI(e,n,t[n]);return e},rSe=(e,t)=>{var n={};for(var r in e)O9.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Xv)for(var r of Xv(e))t.indexOf(r)<0&&C9.call(e,r)&&(n[r]=e[r]);return n};const pO=_.forwardRef((e,t)=>{var n=e,{className:r,active:o,icon:i}=n,s=rSe(n,["className","active","icon"]);return k.createElement(Qf,nSe({active:o,ref:t},s),k.createElement(i,{size:"1rem"}))});pO.displayName="@mantine/tiptap/ControlBase";var oSe=Object.defineProperty,CI=Object.getOwnPropertySymbols,iSe=Object.prototype.hasOwnProperty,sSe=Object.prototype.propertyIsEnumerable,kI=(e,t,n)=>t in e?oSe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,aSe=(e,t)=>{for(var n in t||(t={}))iSe.call(t,n)&&kI(e,n,t[n]);if(CI)for(var n of CI(t))sSe.call(t,n)&&kI(e,n,t[n]);return e};function $t({label:e,isActive:t,operation:n,icon:r}){return _.forwardRef((o,i)=>{const{editor:s,labels:a}=ja(),c=a[e];return k.createElement(pO,aSe({"aria-label":c,title:c,active:t?.name?s?.isActive(t.name,t.attributes):!1,ref:i,onClick:()=>s?.chain().focus()[n.name](n.attributes).run(),icon:r},o))})}var lSe=Object.defineProperty,cSe=Object.defineProperties,uSe=Object.getOwnPropertyDescriptors,EI=Object.getOwnPropertySymbols,dSe=Object.prototype.hasOwnProperty,fSe=Object.prototype.propertyIsEnumerable,$I=(e,t,n)=>t in e?lSe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Mt=(e,t)=>{for(var n in t||(t={}))dSe.call(t,n)&&$I(e,n,t[n]);if(EI)for(var n of EI(t))fSe.call(t,n)&&$I(e,n,t[n]);return e},Nt=(e,t)=>cSe(e,uSe(t));const pSe=$t({label:"boldControlLabel",icon:e=>k.createElement(lhe,Nt(Mt({},e),{stroke:1.5})),isActive:{name:"bold"},operation:{name:"toggleBold"}}),hSe=$t({label:"italicControlLabel",icon:e=>k.createElement(khe,Nt(Mt({},e),{stroke:1.5})),isActive:{name:"italic"},operation:{name:"toggleItalic"}}),mSe=$t({label:"underlineControlLabel",icon:e=>k.createElement(Ghe,Nt(Mt({},e),{stroke:1.5})),isActive:{name:"underline"},operation:{name:"toggleUnderline"}}),gSe=$t({label:"strikeControlLabel",icon:e=>k.createElement(Hhe,Nt(Mt({},e),{stroke:1.5})),isActive:{name:"strike"},operation:{name:"toggleStrike"}}),vSe=$t({label:"clearFormattingControlLabel",icon:e=>k.createElement(dhe,Nt(Mt({},e),{stroke:1.5})),operation:{name:"unsetAllMarks"}}),ySe=$t({label:"unlinkControlLabel",icon:e=>k.createElement(M8,Nt(Mt({},e),{stroke:1.5})),operation:{name:"unsetLink"}}),_Se=$t({label:"bulletListControlLabel",icon:e=>k.createElement(jhe,Nt(Mt({},e),{stroke:1.5})),isActive:{name:"bulletList"},operation:{name:"toggleBulletList"}}),wSe=$t({label:"orderedListControlLabel",icon:e=>k.createElement(Ihe,Nt(Mt({},e),{stroke:1.5})),isActive:{name:"orderedList"},operation:{name:"toggleOrderedList"}}),bSe=$t({label:"h1ControlLabel",icon:e=>k.createElement(whe,Nt(Mt({},e),{stroke:1.5})),isActive:{name:"heading",attributes:{level:1}},operation:{name:"toggleHeading",attributes:{level:1}}}),xSe=$t({label:"h2ControlLabel",icon:e=>k.createElement(bhe,Nt(Mt({},e),{stroke:1.5})),isActive:{name:"heading",attributes:{level:2}},operation:{name:"toggleHeading",attributes:{level:2}}}),SSe=$t({label:"h3ControlLabel",icon:e=>k.createElement(xhe,Nt(Mt({},e),{stroke:1.5})),isActive:{name:"heading",attributes:{level:3}},operation:{name:"toggleHeading",attributes:{level:3}}}),PSe=$t({label:"h4ControlLabel",icon:e=>k.createElement(She,Nt(Mt({},e),{stroke:1.5})),isActive:{name:"heading",attributes:{level:4}},operation:{name:"toggleHeading",attributes:{level:4}}}),OSe=$t({label:"h5ControlLabel",icon:e=>k.createElement(Phe,Nt(Mt({},e),{stroke:1.5})),isActive:{name:"heading",attributes:{level:5}},operation:{name:"toggleHeading",attributes:{level:5}}}),CSe=$t({label:"h6ControlLabel",icon:e=>k.createElement(Ohe,Nt(Mt({},e),{stroke:1.5})),isActive:{name:"heading",attributes:{level:6}},operation:{name:"toggleHeading",attributes:{level:6}}}),kSe=$t({label:"blockquoteControlLabel",icon:e=>k.createElement(ahe,Nt(Mt({},e),{stroke:1.5})),isActive:{name:"blockquote"},operation:{name:"toggleBlockquote"}}),ESe=$t({label:"alignLeftControlLabel",icon:e=>k.createElement(the,Nt(Mt({},e),{stroke:1.5})),operation:{name:"setTextAlign",attributes:"left"}}),$Se=$t({label:"alignRightControlLabel",icon:e=>k.createElement(nhe,Nt(Mt({},e),{stroke:1.5})),operation:{name:"setTextAlign",attributes:"right"}}),MSe=$t({label:"alignCenterControlLabel",icon:e=>k.createElement(Qpe,Nt(Mt({},e),{stroke:1.5})),operation:{name:"setTextAlign",attributes:"center"}}),NSe=$t({label:"alignJustifyControlLabel",icon:e=>k.createElement(ehe,Nt(Mt({},e),{stroke:1.5})),operation:{name:"setTextAlign",attributes:"justify"}}),TSe=$t({label:"subscriptControlLabel",icon:e=>k.createElement(Whe,Nt(Mt({},e),{stroke:1.5})),isActive:{name:"subscript"},operation:{name:"toggleSubscript"}}),ISe=$t({label:"superscriptControlLabel",icon:e=>k.createElement(Uhe,Nt(Mt({},e),{stroke:1.5})),isActive:{name:"superscript"},operation:{name:"toggleSuperscript"}}),jSe=$t({label:"codeControlLabel",icon:e=>k.createElement(S8,Nt(Mt({},e),{stroke:1.5})),isActive:{name:"code"},operation:{name:"toggleCode"}}),LSe=$t({label:"codeBlockControlLabel",icon:e=>k.createElement(S8,Nt(Mt({},e),{stroke:1.5})),isActive:{name:"codeBlock"},operation:{name:"toggleCodeBlock"}}),DSe=$t({label:"highlightControlLabel",icon:e=>k.createElement(Che,Nt(Mt({},e),{stroke:1.5})),isActive:{name:"highlight"},operation:{name:"toggleHighlight"}}),RSe=$t({label:"hrControlLabel",icon:e=>k.createElement(Mhe,Nt(Mt({},e),{stroke:1.5})),operation:{name:"setHorizontalRule"}}),zSe=$t({label:"unsetColorControlLabel",icon:e=>k.createElement(x8,Nt(Mt({},e),{stroke:1.5})),operation:{name:"unsetColor"}});var ASe=Object.defineProperty,MI=Object.getOwnPropertySymbols,BSe=Object.prototype.hasOwnProperty,FSe=Object.prototype.propertyIsEnumerable,NI=(e,t,n)=>t in e?ASe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,VSe=(e,t)=>{for(var n in t||(t={}))BSe.call(t,n)&&NI(e,n,t[n]);if(MI)for(var n of MI(t))FSe.call(t,n)&&NI(e,n,t[n]);return e},HSe=ue(e=>{const t=e.fn.variant({variant:"light"});return{linkEditor:{display:"flex"},linkEditorInput:{borderTopRightRadius:0,borderBottomRightRadius:0,borderRight:0},linkEditorExternalControl:{backgroundColor:e.colorScheme==="dark"?e.fn.rgba(e.colors.dark[7],.5):e.white,border:`${M(1)} solid ${e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[4]}`,height:M(24),width:M(24),display:"flex",justifyContent:"center",alignItems:"center",borderRadius:e.fn.radius(),"&[data-active]":VSe({backgroundColor:t.background,borderColor:t.border,color:t.color},e.fn.hover({background:t.hover}))},linkEditorSave:{borderTopLeftRadius:0,borderBottomLeftRadius:0}}});const WSe=HSe;var USe=Object.defineProperty,ZSe=Object.defineProperties,GSe=Object.getOwnPropertyDescriptors,Qv=Object.getOwnPropertySymbols,k9=Object.prototype.hasOwnProperty,E9=Object.prototype.propertyIsEnumerable,TI=(e,t,n)=>t in e?USe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Ox=(e,t)=>{for(var n in t||(t={}))k9.call(t,n)&&TI(e,n,t[n]);if(Qv)for(var n of Qv(t))E9.call(t,n)&&TI(e,n,t[n]);return e},YSe=(e,t)=>ZSe(e,GSe(t)),$9=(e,t)=>{var n={};for(var r in e)k9.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Qv)for(var r of Qv(e))t.indexOf(r)<0&&E9.call(e,r)&&(n[r]=e[r]);return n};const KSe=e=>{var t=e,{size:n}=t,r=$9(t,["size"]);return k.createElement(Nhe,Ox({size:n,stroke:1.5},r))},qSe={initialExternal:!1},JSe=_.forwardRef((e,t)=>{const n=ae("RichTextEditorLinkControl",qSe,e),{icon:r,popoverProps:o,disableTooltips:i,initialExternal:s}=n,a=$9(n,["icon","popoverProps","disableTooltips","initialExternal"]),{editor:c,labels:u,classNames:f,styles:p,unstyled:g,variant:v}=ja(),{classes:y}=WSe(null,{name:"RichTextEditor",classNames:f,styles:p,unstyled:g,variant:v}),[w,P]=IG(""),[x,S]=_.useState(s),[O,{open:E,close:$}]=pS(!1),N=()=>{E();const z=c?.getAttributes("link");P(z?.href||""),S(z?.target==="_blank")},I=()=>{$(),P(""),S(s)},R=()=>{I(),w===""?c.chain().focus().extendMarkRange("link").unsetLink().run():c.chain().focus().extendMarkRange("link").setLink({href:w,target:x?"_blank":null}).run()},B=z=>{z.key==="Enter"&&(z.preventDefault(),R())};return mm("edit-link",N,!1),k.createElement(kn,Ox({trapFocus:!0,shadow:"md",withinPortal:!0,opened:O,onClose:I,offset:-44,zIndex:1e4,unstyled:g},o),k.createElement(kn.Target,null,k.createElement(pO,YSe(Ox({icon:r||KSe,"aria-label":u.linkControlLabel,title:u.linkControlLabel,onClick:N,active:c?.isActive("link"),unstyled:g},a),{ref:t}))),k.createElement(kn.Dropdown,{sx:z=>({backgroundColor:z.colorScheme==="dark"?z.colors.dark[7]:z.white})},k.createElement("div",{className:y.linkEditor},k.createElement(yn,{placeholder:u.linkEditorInputPlaceholder,"aria-label":u.linkEditorInputLabel,type:"url",value:w,onChange:P,classNames:{input:y.linkEditorInput},onKeyDown:B,unstyled:g,rightSection:k.createElement(At,{label:x?u.linkEditorExternalLink:u.linkEditorInternalLink,events:{hover:!0,focus:!0,touch:!0},withinPortal:!0,withArrow:!0,disabled:i,unstyled:g,zIndex:1e4},k.createElement(ls,{onClick:()=>S(z=>!z),"data-active":x||void 0,className:y.linkEditorExternalControl,unstyled:g},k.createElement(ghe,{size:M(14),stroke:1.5})))}),k.createElement(st,{variant:"default",onClick:R,className:y.linkEditorSave,unstyled:g},u.linkEditorSave))))});var XSe=Object.defineProperty,QSe=Object.defineProperties,ePe=Object.getOwnPropertyDescriptors,ey=Object.getOwnPropertySymbols,M9=Object.prototype.hasOwnProperty,N9=Object.prototype.propertyIsEnumerable,II=(e,t,n)=>t in e?XSe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,vw=(e,t)=>{for(var n in t||(t={}))M9.call(t,n)&&II(e,n,t[n]);if(ey)for(var n of ey(t))N9.call(t,n)&&II(e,n,t[n]);return e},tPe=(e,t)=>QSe(e,ePe(t)),nPe=(e,t)=>{var n={};for(var r in e)M9.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&ey)for(var r of ey(e))t.indexOf(r)<0&&N9.call(e,r)&&(n[r]=e[r]);return n};const rPe={},T9=_.forwardRef((e,t)=>{const n=ae("RichTextEditorColorPickerControl",rPe,e),{popoverProps:r,colors:o,colorPickerProps:i}=n,s=nPe(n,["popoverProps","colors","colorPickerProps"]),{editor:a,labels:c,unstyled:u}=ja(),[f,{toggle:p,close:g}]=pS(!1),[v,y]=_.useState("palette"),w=ir(),P=a?.getAttributes("textStyle").color||(w.colorScheme==="dark"?w.colors.dark[1]:w.black),x=(E,$=!0)=>{a.chain().focus().setColor(E).run(),$&&g()},S=()=>{a.chain().focus().unsetColor().run(),g()},O=o.map((E,$)=>k.createElement(hf,{key:$,component:"button",color:E,onClick:()=>x(E),size:26,radius:"xs",sx:{cursor:"pointer"},title:c.colorPickerColorLabel(E),"aria-label":c.colorPickerColorLabel(E),unstyled:u}));return k.createElement(kn,vw({opened:f,withinPortal:!0,trapFocus:!0,onClose:g,unstyled:u},r),k.createElement(kn.Target,null,k.createElement(Qf,tPe(vw({"aria-label":c.colorPickerControlLabel,title:c.colorPickerControlLabel},s),{ref:t,onClick:p}),k.createElement(hf,{color:P,size:14,unstyled:u}))),k.createElement(kn.Dropdown,{sx:()=>({backgroundColor:w.colorScheme==="dark"?w.colors.dark[7]:w.white})},v==="palette"&&k.createElement(TP,{cols:7,spacing:2},O),v==="colorPicker"&&k.createElement(e4,vw({defaultValue:P,onChange:E=>x(E,!1),unstyled:u},i)),k.createElement(At.Group,{closeDelay:200},k.createElement(nt,{position:"right",spacing:"xs",mt:"sm"},v==="palette"&&k.createElement(Qe,{variant:"default",onClick:g,unstyled:u,title:c.colorPickerCancel,"aria-label":c.colorPickerCancel},k.createElement(uu,{stroke:1.5,size:"1rem"})),k.createElement(Qe,{variant:"default",onClick:S,unstyled:u,title:c.colorPickerClear,"aria-label":c.colorPickerClear},k.createElement(x8,{stroke:1.5,size:"1rem"})),v==="palette"?k.createElement(Qe,{variant:"default",onClick:()=>y("colorPicker"),unstyled:u,title:c.colorPickerColorPicker,"aria-label":c.colorPickerColorPicker},k.createElement(phe,{stroke:1.5,size:"1rem"})):k.createElement(Qe,{variant:"default",onClick:()=>y("palette"),unstyled:u,"aria-label":c.colorPickerPalette,title:c.colorPickerPalette},k.createElement(E8,{stroke:1.5,size:"1rem"})),v==="colorPicker"&&k.createElement(Qe,{variant:"default",onClick:g,unstyled:u,title:c.colorPickerSave,"aria-label":c.colorPickerSave},k.createElement(uhe,{stroke:1.5,size:"1rem"}))))))});T9.displayName="@mantine/tiptap/ColorPickerControl";var oPe=Object.defineProperty,iPe=Object.defineProperties,sPe=Object.getOwnPropertyDescriptors,ty=Object.getOwnPropertySymbols,I9=Object.prototype.hasOwnProperty,j9=Object.prototype.propertyIsEnumerable,jI=(e,t,n)=>t in e?oPe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,aPe=(e,t)=>{for(var n in t||(t={}))I9.call(t,n)&&jI(e,n,t[n]);if(ty)for(var n of ty(t))j9.call(t,n)&&jI(e,n,t[n]);return e},lPe=(e,t)=>iPe(e,sPe(t)),cPe=(e,t)=>{var n={};for(var r in e)I9.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&ty)for(var r of ty(e))t.indexOf(r)<0&&j9.call(e,r)&&(n[r]=e[r]);return n};const uPe={},dPe=_.forwardRef((e,t)=>{const n=ae("RichTextEditorColorControl",uPe,e),{color:r}=n,o=cPe(n,["color"]),{editor:i,labels:s,unstyled:a}=ja(),c=i?.getAttributes("textStyle").color||null,u=s.colorControlLabel(r);return k.createElement(Qf,lPe(aPe({active:c===r,"aria-label":u,title:u,onClick:()=>i.chain().focus().setColor(r).run()},o),{ref:t}),k.createElement(hf,{color:r,size:14,unstyled:a}))});var fPe=Object.defineProperty,pPe=Object.defineProperties,hPe=Object.getOwnPropertyDescriptors,ny=Object.getOwnPropertySymbols,L9=Object.prototype.hasOwnProperty,D9=Object.prototype.propertyIsEnumerable,LI=(e,t,n)=>t in e?fPe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,yw=(e,t)=>{for(var n in t||(t={}))L9.call(t,n)&&LI(e,n,t[n]);if(ny)for(var n of ny(t))D9.call(t,n)&&LI(e,n,t[n]);return e},mPe=(e,t)=>pPe(e,hPe(t)),gPe=(e,t)=>{var n={};for(var r in e)L9.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&ny)for(var r of ny(e))t.indexOf(r)<0&&D9.call(e,r)&&(n[r]=e[r]);return n};const vPe={withCodeHighlightStyles:!0,withTypographyStyles:!0},Ee=_.forwardRef((e,t)=>{const n=ae("RichTextEditor",vPe,e),{editor:r,children:o,className:i,labels:s,withCodeHighlightStyles:a,withTypographyStyles:c,classNames:u,styles:f,unstyled:p,variant:g}=n,v=gPe(n,["editor","children","className","labels","withCodeHighlightStyles","withTypographyStyles","classNames","styles","unstyled","variant"]),{classes:y,cx:w}=eSe(null,{name:"RichTextEditor",classNames:u,styles:f,unstyled:p,variant:g}),P=_.useMemo(()=>yw(yw({},Xxe),s),[s]);return k.createElement(y0e,{value:{editor:r,labels:P,withCodeHighlightStyles:a,withTypographyStyles:c,classNames:u,styles:f,unstyled:p,variant:g}},k.createElement(Pe,mPe(yw({className:w(y.root,i)},v),{ref:t}),o))});Ee.Content=g9;Ee.Control=Qf;Ee.ControlsGroup=b9;Ee.Toolbar=P9;Ee.Bold=pSe;Ee.Italic=hSe;Ee.Strikethrough=gSe;Ee.Underline=mSe;Ee.ClearFormatting=vSe;Ee.H1=bSe;Ee.H2=xSe;Ee.H3=SSe;Ee.H4=PSe;Ee.H5=OSe;Ee.H6=CSe;Ee.BulletList=_Se;Ee.OrderedList=wSe;Ee.Link=JSe;Ee.Unlink=ySe;Ee.Blockquote=kSe;Ee.AlignLeft=ESe;Ee.AlignRight=$Se;Ee.AlignCenter=MSe;Ee.AlignJustify=NSe;Ee.Superscript=ISe;Ee.Subscript=TSe;Ee.Code=jSe;Ee.CodeBlock=LSe;Ee.ColorPicker=T9;Ee.Color=dPe;Ee.Highlight=DSe;Ee.Hr=RSe;Ee.UnsetColor=zSe;Ee.displayName="@mantine/tiptap/RichTextEditor";const yPe="aaa1rp3barth4b0ott3vie4c1le2ogado5udhabi7c0ademy5centure6ountant0s9o1tor4d0s1ult4e0g1ro2tna4f0l1rica5g0akhan5ency5i0g1rbus3force5tel5kdn3l0faromeo7ibaba4pay4lfinanz6state5y2sace3tom5m0azon4ericanexpress7family11x2fam3ica3sterdam8nalytics7droid5quan4z2o0l2partments8p0le4q0uarelle8r0ab1mco4chi3my2pa2t0e3s0da2ia2sociates9t0hleta5torney7u0ction5di0ble3o3spost5thor3o0s4vianca6w0s2x0a2z0ure5ba0by2idu3namex3narepublic11d1k2r0celona5laycard4s5efoot5gains6seball5ketball8uhaus5yern5b0c1t1va3cg1n2d1e0ats2uty4er2ntley5rlin4st0buy5t2f1g1h0arti5i0ble3d1ke2ng0o3o1z2j1lack0friday9ockbuster8g1omberg7ue3m0s1w2n0pparibas9o0ats3ehringer8fa2m1nd2o0k0ing5sch2tik2on4t1utique6x2r0adesco6idgestone9oadway5ker3ther5ussels7s1t1uild0ers6siness6y1zz3v1w1y1z0h3ca0b1fe2l0l1vinklein9m0era3p2non3petown5ital0one8r0avan4ds2e0er0s4s2sa1e1h1ino4t0ering5holic7ba1n1re2s2c1d1enter4o1rn3f0a1d2g1h0anel2nel4rity4se2t2eap3intai5ristmas6ome4urch5i0priani6rcle4sco3tadel4i0c2y0eats7k1l0aims4eaning6ick2nic1que6othing5ud3ub0med6m1n1o0ach3des3ffee4llege4ogne5m0cast4mbank4unity6pany2re3uter5sec4ndos3struction8ulting7tact3ractors9oking0channel11l1p2rsica5untry4pon0s4rses6pa2r0edit0card4union9icket5own3s1uise0s6u0isinella9v1w1x1y0mru3ou3z2dabur3d1nce3ta1e1ing3sun4y2clk3ds2e0al0er2s3gree4livery5l1oitte5ta3mocrat6ntal2ist5si0gn4v2hl2iamonds6et2gital5rect0ory7scount3ver5h2y2j1k1m1np2o0cs1tor4g1mains5t1wnload7rive4tv2ubai3nlop4pont4rban5vag2r2z2earth3t2c0o2deka3u0cation8e1g1mail3erck5nergy4gineer0ing9terprises10pson4quipment8r0icsson6ni3s0q1tate5t0isalat7u0rovision8s2vents5xchange6pert3osed4ress5traspace10fage2il1rwinds6th3mily4n0s2rm0ers5shion4t3edex3edback6rrari3ero6i0at2delity5o2lm2nal1nce1ial7re0stone6mdale6sh0ing5t0ness6j1k1lickr3ghts4r2orist4wers5y2m1o0o0d0network8tball6rd1ex2sale4um3undation8x2r0ee1senius7l1ogans4ntdoor4ier7tr2ujitsu5n0d2rniture7tbol5yi3ga0l0lery3o1up4me0s3p1rden4y2b0iz3d0n2e0a1nt0ing5orge5f1g0ee3h1i0ft0s3ves2ing5l0ass3e1obal2o4m0ail3bh2o1x2n1odaddy5ld0point6f2o0dyear5g0le4p1t1v2p1q1r0ainger5phics5tis4een3ipe3ocery4up4s1t1u0ardian6cci3ge2ide2tars5ru3w1y2hair2mburg5ngout5us3bo2dfc0bank7ealth0care8lp1sinki6re1mes5gtv3iphop4samitsu7tachi5v2k0t2m1n1ockey4ldings5iday5medepot5goods5s0ense7nda3rse3spital5t0ing5t0eles2s3mail5use3w2r1sbc3t1u0ghes5yatt3undai7ibm2cbc2e1u2d1e0ee3fm2kano4l1m0amat4db2mo0bilien9n0c1dustries8finiti5o2g1k1stitute6urance4e4t0ernational10uit4vestments10o1piranga7q1r0ish4s0maili5t0anbul7t0au2v3jaguar4va3cb2e0ep2tzt3welry6io2ll2m0p2nj2o0bs1urg4t1y2p0morgan6rs3uegos4niper7kaufen5ddi3e0rryhotels6logistics9properties14fh2g1h1i0a1ds2m1nder2le4tchen5wi3m1n1oeln3matsu5sher5p0mg2n2r0d1ed3uokgroup8w1y0oto4z2la0caixa5mborghini8er3ncaster5ia3d0rover6xess5salle5t0ino3robe5w0yer5b1c1ds2ease3clerc5frak4gal2o2xus4gbt3i0dl2fe0insurance9style7ghting6ke2lly3mited4o2ncoln4de2k2psy3ve1ing5k1lc1p2oan0s3cker3us3l1ndon4tte1o3ve3pl0financial11r1s1t0d0a3u0ndbeck6xe1ury5v1y2ma0cys3drid4if1son4keup4n0agement7go3p1rket0ing3s4riott5shalls7serati6ttel5ba2c0kinsey7d1e0d0ia3et2lbourne7me1orial6n0u2rckmsd7g1h1iami3crosoft7l1ni1t2t0subishi9k1l0b1s2m0a2n1o0bi0le4da2e1i1m1nash3ey2ster5rmon3tgage6scow4to0rcycles9v0ie4p1q1r1s0d2t0n1r2u0seum3ic3tual5v1w1x1y1z2na0b1goya4me2tura4vy3ba2c1e0c1t0bank4flix4work5ustar5w0s2xt0direct7us4f0l2g0o2hk2i0co2ke1on3nja3ssan1y5l1o0kia3rthwesternmutual14on4w0ruz3tv4p1r0a1w2tt2u1yc2z2obi1server7ffice5kinawa6layan0group9dnavy5lo3m0ega4ne1g1l0ine5oo2pen3racle3nge4g0anic5igins6saka4tsuka4t2vh3pa0ge2nasonic7ris2s1tners4s1y3ssagens7y2ccw3e0t2f0izer5g1h0armacy6d1ilips5one2to0graphy6s4ysio5ics1tet2ures6d1n0g1k2oneer5zza4k1l0ace2y0station9umbing5s3m1n0c2ohl2ker3litie5rn2st3r0america6xi3ess3ime3o0d0uctions8f1gressive8mo2perties3y5tection8u0dential9s1t1ub2w0c2y2qa1pon3uebec3st5racing4dio4e0ad1lestate6tor2y4cipes5d0stone5umbrella9hab3ise0n3t2liance6n0t0als5pair3ort3ublican8st0aurant8view0s5xroth6ich0ardli6oh3l1o1p2o0cher3ks3deo3gers4om3s0vp3u0gby3hr2n2w0e2yukyu6sa0arland6fe0ty4kura4le1on3msclub4ung5ndvik0coromant12ofi4p1rl2s1ve2xo3b0i1s2c0a1b1haeffler7midt4olarships8ol3ule3warz5ience5ot3d1e0arch3t2cure1ity6ek2lect4ner3rvices6ven3w1x0y3fr2g1h0angrila6rp2w2ell3ia1ksha5oes2p0ping5uji3w0time7i0lk2na1gles5te3j1k0i0n2y0pe4l0ing4m0art3ile4n0cf3o0ccer3ial4ftbank4ware6hu2lar2utions7ng1y2y2pa0ce3ort2t3r0l2s1t0ada2ples4r1tebank4farm7c0group6ockholm6rage3e3ream4udio2y3yle4u0cks3pplies3y2ort5rf1gery5zuki5v1watch4iss4x1y0dney4stems6z2tab1ipei4lk2obao4rget4tamotors6r2too4x0i3c0i2d0k2eam2ch0nology8l1masek5nnis4va3f1g1h0d1eater2re6iaa2ckets5enda4ffany5ps2res2ol4j0maxx4x2k0maxx5l1m0all4n1o0day3kyo3ols3p1ray3shiba5tal3urs3wn2yota3s3r0ade1ing4ining5vel0channel7ers0insurance16ust3v2t1ube2i1nes3shu4v0s2w1z2ua1bank3s2g1k1nicom3versity8o2ol2ps2s1y1z2va0cations7na1guard7c1e0gas3ntures6risign5mögensberater2ung14sicherung10t2g1i0ajes4deo3g1king4llas4n1p1rgin4sa1ion4va1o3laanderen9n1odka3lkswagen7vo3te1ing3o2yage5u0elos6wales2mart4ter4ng0gou5tch0es6eather0channel12bcam3er2site5d0ding5ibo2r3f1hoswho6ien2ki2lliamhill9n0dows4e1ners6me2olterskluwer11odside6rk0s2ld3w2s1tc1f3xbox3erox4finity6ihuan4n2xx2yz3yachts4hoo3maxun5ndex5e1odobashi7ga2kohama6u0tube6t1un3za0ppos4ra3ero3ip2m1one3uerich6w2",_Pe="ελ1υ2бг1ел3дети4ею2католик6ом3мкд2он1сква6онлайн5рг3рус2ф2сайт3рб3укр3қаз3հայ3ישראל5קום3ابوظبي5تصالات6رامكو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",yu=(e,t)=>{for(const n in t)e[n]=t[n];return e},Cx="numeric",kx="ascii",Ex="alpha",Qh="asciinumeric",ch="alphanumeric",$x="domain",R9="emoji",wPe="scheme",bPe="slashscheme",DI="whitespace";function xPe(e,t){return e in t||(t[e]=[]),t[e]}function hl(e,t,n){t[Cx]&&(t[Qh]=!0,t[ch]=!0),t[kx]&&(t[Qh]=!0,t[Ex]=!0),t[Qh]&&(t[ch]=!0),t[Ex]&&(t[ch]=!0),t[ch]&&(t[$x]=!0),t[R9]&&(t[$x]=!0);for(const r in t){const o=xPe(r,n);o.indexOf(e)<0&&o.push(e)}}function SPe(e,t){const n={};for(const r in t)t[r].indexOf(e)>=0&&(n[r]=!0);return n}function Rr(e){e===void 0&&(e=null),this.j={},this.jr=[],this.jd=null,this.t=e}Rr.groups={};Rr.prototype={accepts(){return!!this.t},go(e){const t=this,n=t.j[e];if(n)return n;for(let r=0;re.ta(t,n,r,o),Eo=(e,t,n,r,o)=>e.tr(t,n,r,o),RI=(e,t,n,r,o)=>e.ts(t,n,r,o),de=(e,t,n,r,o)=>e.tt(t,n,r,o),Xi="WORD",Mx="UWORD",Sf="LOCALHOST",Nx="TLD",Tx="UTLD",em="SCHEME",gc="SLASH_SCHEME",hO="NUM",z9="WS",mO="NL",Tc="OPENBRACE",Bd="OPENBRACKET",Fd="OPENANGLEBRACKET",Vd="OPENPAREN",rl="CLOSEBRACE",Ic="CLOSEBRACKET",jc="CLOSEANGLEBRACKET",ol="CLOSEPAREN",ry="AMPERSAND",oy="APOSTROPHE",iy="ASTERISK",Ws="AT",sy="BACKSLASH",ay="BACKTICK",ly="CARET",Ks="COLON",gO="COMMA",cy="DOLLAR",vi="DOT",uy="EQUALS",vO="EXCLAMATION",yi="HYPHEN",dy="PERCENT",fy="PIPE",py="PLUS",hy="POUND",my="QUERY",yO="QUOTE",_O="SEMI",_i="SLASH",Hd="TILDE",gy="UNDERSCORE",A9="EMOJI",vy="SYM";var B9=Object.freeze({__proto__:null,WORD:Xi,UWORD:Mx,LOCALHOST:Sf,TLD:Nx,UTLD:Tx,SCHEME:em,SLASH_SCHEME:gc,NUM:hO,WS:z9,NL:mO,OPENBRACE:Tc,OPENBRACKET:Bd,OPENANGLEBRACKET:Fd,OPENPAREN:Vd,CLOSEBRACE:rl,CLOSEBRACKET:Ic,CLOSEANGLEBRACKET:jc,CLOSEPAREN:ol,AMPERSAND:ry,APOSTROPHE:oy,ASTERISK:iy,AT:Ws,BACKSLASH:sy,BACKTICK:ay,CARET:ly,COLON:Ks,COMMA:gO,DOLLAR:cy,DOT:vi,EQUALS:uy,EXCLAMATION:vO,HYPHEN:yi,PERCENT:dy,PIPE:fy,PLUS:py,POUND:hy,QUERY:my,QUOTE:yO,SEMI:_O,SLASH:_i,TILDE:Hd,UNDERSCORE:gy,EMOJI:A9,SYM:vy});const fc=/[a-z]/,_w=/\p{L}/u,ww=/\p{Emoji}/u,bw=/\d/,zI=/\s/,AI=` -`,PPe="️",OPe="‍";let uh=null,dh=null;function CPe(e){e===void 0&&(e=[]);const t={};Rr.groups=t;const n=new Rr;uh==null&&(uh=BI(yPe)),dh==null&&(dh=BI(_Pe)),de(n,"'",oy),de(n,"{",Tc),de(n,"[",Bd),de(n,"<",Fd),de(n,"(",Vd),de(n,"}",rl),de(n,"]",Ic),de(n,">",jc),de(n,")",ol),de(n,"&",ry),de(n,"*",iy),de(n,"@",Ws),de(n,"`",ay),de(n,"^",ly),de(n,":",Ks),de(n,",",gO),de(n,"$",cy),de(n,".",vi),de(n,"=",uy),de(n,"!",vO),de(n,"-",yi),de(n,"%",dy),de(n,"|",fy),de(n,"+",py),de(n,"#",hy),de(n,"?",my),de(n,'"',yO),de(n,"/",_i),de(n,";",_O),de(n,"~",Hd),de(n,"_",gy),de(n,"\\",sy);const r=Eo(n,bw,hO,{[Cx]:!0});Eo(r,bw,r);const o=Eo(n,fc,Xi,{[kx]:!0});Eo(o,fc,o);const i=Eo(n,_w,Mx,{[Ex]:!0});Eo(i,fc),Eo(i,_w,i);const s=Eo(n,zI,z9,{[DI]:!0});de(n,AI,mO,{[DI]:!0}),de(s,AI),Eo(s,zI,s);const a=Eo(n,ww,A9,{[R9]:!0});Eo(a,ww,a),de(a,PPe,a);const c=de(a,OPe);Eo(c,ww,a);const u=[[fc,o]],f=[[fc,null],[_w,i]];for(let p=0;pp[0]>g[0]?1:-1);for(let p=0;p=0?y[$x]=!0:fc.test(g)?bw.test(g)?y[Qh]=!0:y[kx]=!0:y[Cx]=!0,RI(n,g,g,y)}return RI(n,"localhost",Sf,{ascii:!0}),n.jd=new Rr(vy),{start:n,tokens:yu({groups:t},B9)}}function kPe(e,t){const n=EPe(t.replace(/[A-Z]/g,a=>a.toLowerCase())),r=n.length,o=[];let i=0,s=0;for(;s=0&&(p+=n[s].length,g++),u+=n[s].length,i+=n[s].length,s++;i-=p,s-=g,u-=p,o.push({t:f.t,v:t.slice(i-u,i),s:i-u,e:i})}return o}function EPe(e){const t=[],n=e.length;let r=0;for(;r56319||r+1===n||(i=e.charCodeAt(r+1))<56320||i>57343?e[r]:e.slice(r,r+2);t.push(s),r+=s.length}return t}function js(e,t,n,r,o){let i;const s=t.length;for(let a=0;a=0;)i++;if(i>0){t.push(n.join(""));for(let s=parseInt(e.substring(r,r+i),10);s>0;s--)n.pop();r+=i}else n.push(e[r]),r++}return t}const Pf={defaultProtocol:"http",events:null,format:FI,formatHref:FI,nl2br:!1,tagName:"a",target:null,rel:null,validate:!0,truncate:1/0,className:null,attributes:null,ignoreTags:[],render:null};function wO(e,t){t===void 0&&(t=null);let n=yu({},Pf);e&&(n=yu(n,e instanceof wO?e.o:e));const r=n.ignoreTags,o=[];for(let i=0;in?r.substring(0,n)+"…":r},toFormattedHref(e){return e.get("formatHref",this.toHref(e.get("defaultProtocol")),this)},startIndex(){return this.tk[0].s},endIndex(){return this.tk[this.tk.length-1].e},toObject(e){return e===void 0&&(e=Pf.defaultProtocol),{type:this.t,value:this.toString(),isLink:this.isLink,href:this.toHref(e),start:this.startIndex(),end:this.endIndex()}},toFormattedObject(e){return{type:this.t,value:this.toFormattedString(e),isLink:this.isLink,href:this.toFormattedHref(e),start:this.startIndex(),end:this.endIndex()}},validate(e){return e.get("validate",this.toString(),this)},render(e){const t=this,n=this.toHref(e.get("defaultProtocol")),r=e.get("formatHref",n,this),o=e.get("tagName",n,t),i=this.toFormattedString(e),s={},a=e.get("className",n,t),c=e.get("target",n,t),u=e.get("rel",n,t),f=e.getObj("attributes",n,t),p=e.getObj("events",n,t);return s.href=r,a&&(s.class=a),c&&(s.target=c),u&&(s.rel=u),f&&yu(s,f),{tagName:o,attributes:s,content:i,eventListeners:p}}};function r1(e,t){class n extends F9{constructor(o,i){super(o,i),this.t=e}}for(const r in t)n.prototype[r]=t[r];return n.t=e,n}const VI=r1("email",{isLink:!0,toHref(){return"mailto:"+this.toString()}}),HI=r1("text"),$Pe=r1("nl"),Ka=r1("url",{isLink:!0,toHref(e){return e===void 0&&(e=Pf.defaultProtocol),this.hasProtocol()?this.v:`${e}://${this.v}`},hasProtocol(){const e=this.tk;return e.length>=2&&e[0].t!==Sf&&e[1].t===Ks}}),Pn=e=>new Rr(e);function MPe(e){let{groups:t}=e;const n=t.domain.concat([ry,iy,Ws,sy,ay,ly,cy,uy,yi,hO,dy,fy,py,hy,_i,vy,Hd,gy]),r=[oy,jc,rl,Ic,ol,Ks,gO,vi,vO,Fd,Tc,Bd,Vd,my,yO,_O],o=[ry,oy,iy,sy,ay,ly,rl,cy,uy,yi,Tc,dy,fy,py,hy,my,_i,vy,Hd,gy],i=Pn(),s=de(i,Hd);Me(s,o,s),Me(s,t.domain,s);const a=Pn(),c=Pn(),u=Pn();Me(i,t.domain,a),Me(i,t.scheme,c),Me(i,t.slashscheme,u),Me(a,o,s),Me(a,t.domain,a);const f=de(a,Ws);de(s,Ws,f),de(c,Ws,f),de(u,Ws,f);const p=de(s,vi);Me(p,o,s),Me(p,t.domain,s);const g=Pn();Me(f,t.domain,g),Me(g,t.domain,g);const v=de(g,vi);Me(v,t.domain,g);const y=Pn(VI);Me(v,t.tld,y),Me(v,t.utld,y),de(f,Sf,y);const w=de(g,yi);Me(w,t.domain,g),Me(y,t.domain,g),de(y,vi,v),de(y,yi,w);const P=de(y,Ks);Me(P,t.numeric,VI);const x=de(a,yi),S=de(a,vi);Me(x,t.domain,a),Me(S,o,s),Me(S,t.domain,a);const O=Pn(Ka);Me(S,t.tld,O),Me(S,t.utld,O),Me(O,t.domain,a),Me(O,o,s),de(O,vi,S),de(O,yi,x),de(O,Ws,f);const E=de(O,Ks),$=Pn(Ka);Me(E,t.numeric,$);const N=Pn(Ka),I=Pn();Me(N,n,N),Me(N,r,I),Me(I,n,N),Me(I,r,I),de(O,_i,N),de($,_i,N);const R=de(c,Ks),B=de(u,Ks),z=de(B,_i),G=de(z,_i);Me(c,t.domain,a),de(c,vi,S),de(c,yi,x),Me(u,t.domain,a),de(u,vi,S),de(u,yi,x),Me(R,t.domain,N),de(R,_i,N),Me(G,t.domain,N),Me(G,n,N),de(G,_i,N);const X=de(N,Tc),Q=de(N,Bd),V=de(N,Fd),H=de(N,Vd);de(I,Tc,X),de(I,Bd,Q),de(I,Fd,V),de(I,Vd,H),de(X,rl,N),de(Q,Ic,N),de(V,jc,N),de(H,ol,N),de(X,rl,N);const Z=Pn(Ka),Y=Pn(Ka),j=Pn(Ka),U=Pn(Ka);Me(X,n,Z),Me(Q,n,Y),Me(V,n,j),Me(H,n,U);const F=Pn(),K=Pn(),ee=Pn(),fe=Pn();return Me(X,r),Me(Q,r),Me(V,r),Me(H,r),Me(Z,n,Z),Me(Y,n,Y),Me(j,n,j),Me(U,n,U),Me(Z,r,Z),Me(Y,r,Y),Me(j,r,j),Me(U,r,U),Me(F,n,F),Me(K,n,Y),Me(ee,n,j),Me(fe,n,U),Me(F,r,F),Me(K,r,K),Me(ee,r,ee),Me(fe,r,fe),de(Y,Ic,N),de(j,jc,N),de(U,ol,N),de(Z,rl,N),de(K,Ic,N),de(ee,jc,N),de(fe,ol,N),de(F,ol,N),de(i,Sf,O),de(i,mO,$Pe),{start:i,tokens:B9}}function NPe(e,t,n){let r=n.length,o=0,i=[],s=[];for(;o=0&&g++,o++,f++;if(g<0)o-=f,o0&&(i.push(xw(HI,t,s)),s=[]),o-=g,f-=g;const v=p.t,y=n.slice(o-f,o);i.push(xw(v,t,y))}}return s.length>0&&i.push(xw(HI,t,s)),i}function xw(e,t,n){const r=n[0].s,o=n[n.length-1].e,i=t.slice(r,o);return new e(i,n)}const TPe=typeof console<"u"&&console&&console.warn||(()=>{}),IPe="until manual call of linkify.init(). Register all schemes and plugins before invoking linkify the first time.",Vt={scanner:null,parser:null,tokenQueue:[],pluginQueue:[],customSchemes:[],initialized:!1};function jPe(){Rr.groups={},Vt.scanner=null,Vt.parser=null,Vt.tokenQueue=[],Vt.pluginQueue=[],Vt.customSchemes=[],Vt.initialized=!1}function WI(e,t){if(t===void 0&&(t=!1),Vt.initialized&&TPe(`linkifyjs: already initialized - will not register custom scheme "${e}" ${IPe}`),!/^[0-9a-z]+(-[0-9a-z]+)*$/.test(e))throw new Error(`linkifyjs: incorrect scheme format. +`,textSerializers:r={}}=t||{};return Ebe(this.state.doc,{blockSeparator:n,textSerializers:{...a9(this.schema),...r}})}get isEmpty(){return jbe(this.state.doc)}getCharacterCount(){return console.warn('[tiptap warn]: "editor.getCharacterCount()" is deprecated. Please use "editor.storage.characterCount.characters()" instead.'),this.state.doc.content.size-2}destroy(){this.emit("destroy"),this.view&&this.view.destroy(),this.removeAllListeners()}get isDestroyed(){var t;return!(!((t=this.view)===null||t===void 0)&&t.docView)}};function Ll(e){return new e1({find:e.find,handler:({state:t,range:n,match:r})=>{const o=Ue(e.getAttributes,void 0,r);if(o===!1||o===null)return null;const{tr:i}=t,s=r[r.length-1],a=r[0];if(s){const c=a.search(/\S/),u=n.from+a.indexOf(s),f=u+s.length;if(fO(n.from,n.to,t.doc).filter(v=>v.mark.type.excluded.find(w=>w===e.type&&w!==v.mark.type)).filter(v=>v.to>u).length)return null;fn.from&&i.delete(n.from+c,u);const g=n.from+c+s.length;i.addMark(n.from+c,g,e.type.create(o||{})),i.removeStoredMark(e.type)}}})}function f9(e){return new e1({find:e.find,handler:({state:t,range:n,match:r})=>{const o=Ue(e.getAttributes,void 0,r)||{},{tr:i}=t,s=n.from;let a=n.to;const c=e.type.create(o);if(r[1]){const u=r[0].lastIndexOf(r[1]);let f=s+u;f>a?f=a:a=f+r[1].length;const p=r[0][r[0].length-1];i.insertText(p,s+r[0].length-1),i.replaceWith(f,a,c)}else r[0]&&i.insert(s-1,e.type.create(o)).delete(i.mapping.map(s),i.mapping.map(a));i.scrollIntoView()}})}function Sx(e){return new e1({find:e.find,handler:({state:t,range:n,match:r})=>{const o=t.doc.resolve(n.from),i=Ue(e.getAttributes,void 0,r)||{};if(!o.node(-1).canReplaceWith(o.index(-1),o.indexAfter(-1),e.type))return null;t.tr.delete(n.from,n.to).setBlockType(n.from,n.from,e.type,i)}})}function xf(e){return new e1({find:e.find,handler:({state:t,range:n,match:r,chain:o})=>{const i=Ue(e.getAttributes,void 0,r)||{},s=t.tr.delete(n.from,n.to),c=s.doc.resolve(n.from).blockRange(),u=c&&KP(c,e.type,i);if(!u)return null;if(s.wrap(c,u),e.keepMarks&&e.editor){const{selection:p,storedMarks:g}=t,{splittableMarks:v}=e.editor.extensionManager,y=g||p.$to.parentOffset&&p.$from.marks();if(y){const w=y.filter(P=>v.includes(P.type.name));s.ensureMarks(w)}}if(e.keepAttributes){const p=e.type.name==="bulletList"||e.type.name==="orderedList"?"listItem":"taskList";o().updateAttributes(p,i).run()}const f=s.doc.resolve(n.from-1).nodeBefore;f&&f.type===e.type&&La(s.doc,n.from-1)&&(!e.joinPredicate||e.joinPredicate(r,f))&&s.join(n.from-1)}})}class or{constructor(t={}){this.type="mark",this.name="mark",this.parent=null,this.child=null,this.config={name:this.name,defaultOptions:{}},this.config={...this.config,...t},this.name=this.config.name,t.defaultOptions&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`),this.options=this.config.defaultOptions,this.config.addOptions&&(this.options=Ue(Ce(this,"addOptions",{name:this.name}))),this.storage=Ue(Ce(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(t={}){return new or(t)}configure(t={}){const n=this.extend();return n.options=t1(this.options,t),n.storage=Ue(Ce(n,"addStorage",{name:n.name,options:n.options})),n}extend(t={}){const n=new or(t);return n.parent=this,this.child=n,n.name=t.name?t.name:n.parent.name,t.defaultOptions&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${n.name}".`),n.options=Ue(Ce(n,"addOptions",{name:n.name})),n.storage=Ue(Ce(n,"addStorage",{name:n.name,options:n.options})),n}static handleExit({editor:t,mark:n}){const{tr:r}=t.state,o=t.state.selection.$from;if(o.pos===o.end()){const s=o.marks();if(!!!s.find(u=>u?.type.name===n.name))return!1;const c=s.find(u=>u?.type.name===n.name);return c&&r.removeStoredMark(c),r.insertText(" ",o.pos),t.view.dispatch(r),!0}return!1}}let Gr=class Px{constructor(t={}){this.type="node",this.name="node",this.parent=null,this.child=null,this.config={name:this.name,defaultOptions:{}},this.config={...this.config,...t},this.name=this.config.name,t.defaultOptions&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`),this.options=this.config.defaultOptions,this.config.addOptions&&(this.options=Ue(Ce(this,"addOptions",{name:this.name}))),this.storage=Ue(Ce(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(t={}){return new Px(t)}configure(t={}){const n=this.extend();return n.options=t1(this.options,t),n.storage=Ue(Ce(n,"addStorage",{name:n.name,options:n.options})),n}extend(t={}){const n=new Px(t);return n.parent=this,this.child=n,n.name=t.name?t.name:n.parent.name,t.defaultOptions&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${n.name}".`),n.options=Ue(Ce(n,"addOptions",{name:n.name})),n.storage=Ue(Ce(n,"addStorage",{name:n.name,options:n.options})),n}};function ka(e){return new Ewe({find:e.find,handler:({state:t,range:n,match:r,pasteEvent:o})=>{const i=Ue(e.getAttributes,void 0,r,o);if(i===!1||i===null)return null;const{tr:s}=t,a=r[r.length-1],c=r[0];let u=n.to;if(a){const f=c.search(/\S/),p=n.from+c.indexOf(a),g=p+a.length;if(fO(n.from,n.to,t.doc).filter(y=>y.mark.type.excluded.find(P=>P===e.type&&P!==y.mark.type)).filter(y=>y.to>p).length)return null;gn.from&&s.delete(n.from+f,p),u=n.from+f+a.length,s.addMark(n.from+f,u,e.type.create(i||{})),s.removeStoredMark(e.type)}}})}const uxe=({renderers:e})=>k.createElement(k.Fragment,null,Object.entries(e).map(([t,n])=>mq.createPortal(n.reactElement,n.element,t)));class dxe extends k.Component{constructor(t){super(t),this.editorContentRef=k.createRef(),this.initialized=!1,this.state={renderers:{}}}componentDidMount(){this.init()}componentDidUpdate(){this.init()}init(){const{editor:t}=this.props;if(t&&t.options.element){if(t.contentComponent)return;const n=this.editorContentRef.current;n.append(...t.options.element.childNodes),t.setOptions({element:n}),t.contentComponent=this,t.createNodeViews(),this.initialized=!0}}maybeFlushSync(t){this.initialized?xs.flushSync(t):t()}setRenderer(t,n){this.maybeFlushSync(()=>{this.setState(({renderers:r})=>({renderers:{...r,[t]:n}}))})}removeRenderer(t){this.maybeFlushSync(()=>{this.setState(({renderers:n})=>{const r={...n};return delete r[t],{renderers:r}})})}componentWillUnmount(){const{editor:t}=this.props;if(!t||(this.initialized=!1,t.isDestroyed||t.view.setProps({nodeViews:{}}),t.contentComponent=null,!t.options.element.firstChild))return;const n=document.createElement("div");n.append(...t.options.element.childNodes),t.setOptions({element:n})}render(){const{editor:t,...n}=this.props;return k.createElement(k.Fragment,null,k.createElement("div",{ref:this.editorContentRef,...n}),k.createElement(uxe,{renderers:this.state.renderers}))}}const fxe=e=>{const t=k.useMemo(()=>Math.floor(Math.random()*4294967295).toString(),[e.editor]);return k.createElement(dxe,{key:t,...e})},pxe=k.memo(fxe);class hxe extends cxe{constructor(){super(...arguments),this.contentComponent=null}}function mxe(){const[,e]=_.useState(0);return()=>e(t=>t+1)}const p9=(e={},t=[])=>{const[n,r]=_.useState(null),o=mxe(),{onBeforeCreate:i,onBlur:s,onCreate:a,onDestroy:c,onFocus:u,onSelectionUpdate:f,onTransaction:p,onUpdate:g}=e,v=_.useRef(i),y=_.useRef(s),w=_.useRef(a),P=_.useRef(c),x=_.useRef(u),S=_.useRef(f),O=_.useRef(p),E=_.useRef(g);return _.useEffect(()=>{n&&(i&&(n.off("beforeCreate",v.current),n.on("beforeCreate",i),v.current=i),s&&(n.off("blur",y.current),n.on("blur",s),y.current=s),a&&(n.off("create",w.current),n.on("create",a),w.current=a),c&&(n.off("destroy",P.current),n.on("destroy",c),P.current=c),u&&(n.off("focus",x.current),n.on("focus",u),x.current=u),f&&(n.off("selectionUpdate",S.current),n.on("selectionUpdate",f),S.current=f),p&&(n.off("transaction",O.current),n.on("transaction",p),O.current=p),g&&(n.off("update",E.current),n.on("update",g),E.current=g))},[i,s,a,c,u,f,p,g,n]),_.useEffect(()=>{let $=!0;const N=new hxe(e);return r(N),N.on("transaction",()=>{requestAnimationFrame(()=>{requestAnimationFrame(()=>{$&&o()})})}),()=>{$=!1}},t),_.useEffect(()=>()=>{n?.destroy()},[n]),n},gxe=_.createContext({editor:null});gxe.Consumer;const vxe=_.createContext({onDragStart:void 0}),yxe=()=>_.useContext(vxe);k.forwardRef((e,t)=>{const{onDragStart:n}=yxe(),r=e.as||"div";return k.createElement(r,{...e,ref:t,"data-node-view-wrapper":"",onDragStart:n,style:{whiteSpace:"normal",...e.style}})});var _xe=Object.defineProperty,gI=Object.getOwnPropertySymbols,wxe=Object.prototype.hasOwnProperty,bxe=Object.prototype.propertyIsEnumerable,vI=(e,t,n)=>t in e?_xe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,gw=(e,t)=>{for(var n in t||(t={}))wxe.call(t,n)&&vI(e,n,t[n]);if(gI)for(var n of gI(t))bxe.call(t,n)&&vI(e,n,t[n]);return e};function xxe(e,t){if(!e)return null;const n=t.colorScheme==="dark"?5:7;return{pre:{background:t.colorScheme==="dark"?t.colors.dark[8]:t.fn.rgba(t.colors.gray[0],.65),borderRadius:t.fn.radius(),color:t.colorScheme==="dark"?t.colors.dark[0]:t.colors.gray[9],fontFamily:t.fontFamilyMonospace,padding:`${t.spacing.md} ${t.spacing.xl}`,"& code":{background:"none",color:"inherit",fontSize:t.fontSizes.sm,padding:0}," & .hljs-comment, & .hljs-quote":{color:t.colorScheme==="dark"?t.colors.dark[2]:t.colors.gray[5]},"& .hljs-variable, & .hljs-template-variable, & .hljs-attribute, & .hljs-tag, & .hljs-name, & .hljs-regexp, & .hljs-link, & .hljs-name, & .hljs-selector-id, & .hljs-selector-class":{color:t.colors.red[n]},"& .hljs-number, & .hljs-meta, & .hljs-built_in, & .hljs-builtin-name, & .hljs-literal, & .hljs-type, & .hljs-params":{color:t.colors[t.colorScheme==="dark"?"cyan":"blue"][n]},"& .hljs-string, & .hljs-symbol, & .hljs-bullet":{color:t.colors.red[n]},"& .hljs-title, & .hljs-section":{color:t.colors[t.colorScheme==="dark"?"yellow":"pink"][n]},"& .hljs-keyword, & .hljs-selector-tag":{color:t.colors.violet[n]},"& .hljs-emphasis":{fontStyle:"italic"},"& .hljs-strong":{fontWeight:700}}}}function Sxe(e){return e?{"& li > p":{margin:0},"& ul li, & ol li":{marginTop:M(2)},"& ul, & ol":{marginTop:M(5),marginBottom:M(5)},"& p":{marginBottom:M(7)},"& h1, & h2, & h3, & h4, & h5, & h6, & p":{marginTop:0}}:null}var Pxe=ue((e,{withCodeHighlightStyles:t,withTypographyStyles:n})=>({typographyStylesProvider:gw({},Sxe(n)),content:gw({backgroundColor:e.colorScheme==="dark"?e.colors.dark[7]:e.white,borderRadius:e.fn.radius(),"& .ProseMirror":{outline:0,padding:e.spacing.md},"& .ProseMirror > *:last-child":{marginBottom:0},"& .ProseMirror p.is-editor-empty:first-of-type::before":gw({content:"attr(data-placeholder)",pointerEvents:"none",userSelect:"none",float:"left",height:0},e.fn.placeholderStyles())},xxe(t,e))}));const Oxe=Pxe;var Cxe=Object.defineProperty,Yv=Object.getOwnPropertySymbols,h9=Object.prototype.hasOwnProperty,m9=Object.prototype.propertyIsEnumerable,yI=(e,t,n)=>t in e?Cxe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,kxe=(e,t)=>{for(var n in t||(t={}))h9.call(t,n)&&yI(e,n,t[n]);if(Yv)for(var n of Yv(t))m9.call(t,n)&&yI(e,n,t[n]);return e},Exe=(e,t)=>{var n={};for(var r in e)h9.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Yv)for(var r of Yv(e))t.indexOf(r)<0&&m9.call(e,r)&&(n[r]=e[r]);return n};const $xe={},g9=_.forwardRef((e,t)=>{const n=ae("RichTextEditorContent",$xe,e),{className:r}=n,o=Exe(n,["className"]),{editor:i,withCodeHighlightStyles:s,withTypographyStyles:a,classNames:c,styles:u,unstyled:f,variant:p}=ja(),{classes:g,cx:v}=Oxe({withCodeHighlightStyles:s,withTypographyStyles:a},{name:"RichTextEditor",classNames:c,styles:u,unstyled:f,variant:p});return k.createElement(l8,{className:v(g.typographyStylesProvider,r),unstyled:!a||f,ref:t},k.createElement(Pe,kxe({component:pxe,editor:i,className:g.content},o)))});g9.displayName="@mantine/tiptap/Content";var Mxe=Object.defineProperty,_I=Object.getOwnPropertySymbols,Nxe=Object.prototype.hasOwnProperty,Txe=Object.prototype.propertyIsEnumerable,wI=(e,t,n)=>t in e?Mxe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,bI=(e,t)=>{for(var n in t||(t={}))Nxe.call(t,n)&&wI(e,n,t[n]);if(_I)for(var n of _I(t))Txe.call(t,n)&&wI(e,n,t[n]);return e},Ixe=ue(e=>{const t=e.fn.variant({variant:"light"});return{control:{backgroundColor:e.colorScheme==="dark"?e.colors.dark[6]:e.white,minWidth:M(26),height:M(26),display:"flex",justifyContent:"center",alignItems:"center",border:`${M(1)} solid ${e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[4]}`,borderRadius:e.fn.radius(),cursor:"default","&[data-interactive]":bI({cursor:"pointer"},e.fn.hover({backgroundColor:e.colorScheme==="dark"?e.colors.dark[5]:e.colors.gray[0]})),"&[data-active]":{backgroundColor:t.background,color:t.color,"&:hover":bI({},e.fn.hover({backgroundColor:t.hover}))}}}});const jxe=Ixe;var Lxe=Object.defineProperty,Kv=Object.getOwnPropertySymbols,v9=Object.prototype.hasOwnProperty,y9=Object.prototype.propertyIsEnumerable,xI=(e,t,n)=>t in e?Lxe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Dxe=(e,t)=>{for(var n in t||(t={}))v9.call(t,n)&&xI(e,n,t[n]);if(Kv)for(var n of Kv(t))y9.call(t,n)&&xI(e,n,t[n]);return e},Rxe=(e,t)=>{var n={};for(var r in e)v9.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Kv)for(var r of Kv(e))t.indexOf(r)<0&&y9.call(e,r)&&(n[r]=e[r]);return n};const zxe={interactive:!0},Qf=_.forwardRef((e,t)=>{const n=ae("RichTextEditorControl",zxe,e),{className:r,active:o,children:i,interactive:s}=n,a=Rxe(n,["className","active","children","interactive"]),{classNames:c,styles:u,unstyled:f,variant:p}=ja(),{classes:g,cx:v}=jxe(null,{name:"RichTextEditor",classNames:c,styles:u,unstyled:f,variant:p});return k.createElement(ls,Dxe({className:v(g.control,r),"data-rich-text-editor-control":!0,tabIndex:s?0:-1,"data-interactive":s||void 0,"data-active":o||void 0,"aria-pressed":o&&s||void 0,"aria-hidden":!s||void 0,ref:t,unstyled:f},a),i)});Qf.displayName="@mantine/tiptap/Control";var Axe=ue(e=>({controlsGroup:{display:"flex","& [data-rich-text-editor-control]":{borderRadius:0,"&:not(:last-of-type)":{borderRight:0},"&:last-of-type":{borderTopRightRadius:e.fn.radius(),borderBottomRightRadius:e.fn.radius()},"&:first-of-type":{borderTopLeftRadius:e.fn.radius(),borderBottomLeftRadius:e.fn.radius()}}}}));const Bxe=Axe;var Fxe=Object.defineProperty,qv=Object.getOwnPropertySymbols,_9=Object.prototype.hasOwnProperty,w9=Object.prototype.propertyIsEnumerable,SI=(e,t,n)=>t in e?Fxe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Vxe=(e,t)=>{for(var n in t||(t={}))_9.call(t,n)&&SI(e,n,t[n]);if(qv)for(var n of qv(t))w9.call(t,n)&&SI(e,n,t[n]);return e},Hxe=(e,t)=>{var n={};for(var r in e)_9.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&qv)for(var r of qv(e))t.indexOf(r)<0&&w9.call(e,r)&&(n[r]=e[r]);return n};const Wxe={},b9=_.forwardRef((e,t)=>{const n=ae("RichTextEditorControlsGroup",Wxe,e),{className:r,children:o}=n,i=Hxe(n,["className","children"]),{classNames:s,styles:a,unstyled:c}=ja(),{classes:u,cx:f}=Bxe(null,{name:"RichTextEditor",classNames:s,styles:a,unstyled:c});return k.createElement(Pe,Vxe({className:f(u.controlsGroup,r),ref:t},i),o)});b9.displayName="@mantine/tiptap/ControlsGroup";var Uxe=ue((e,{sticky:t,stickyOffset:n})=>({toolbar:{position:t?"sticky":"static",top:t?M(n):void 0,padding:`${e.spacing.xs} ${e.spacing.md}`,backgroundColor:e.colorScheme==="dark"?e.colors.dark[7]:e.white,zIndex:1,borderTopRightRadius:e.fn.radius(),borderTopLeftRadius:e.fn.radius(),borderBottom:`${M(1)} solid ${e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[4]}`}}));const Zxe=Uxe;var Gxe=Object.defineProperty,Jv=Object.getOwnPropertySymbols,x9=Object.prototype.hasOwnProperty,S9=Object.prototype.propertyIsEnumerable,PI=(e,t,n)=>t in e?Gxe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Yxe=(e,t)=>{for(var n in t||(t={}))x9.call(t,n)&&PI(e,n,t[n]);if(Jv)for(var n of Jv(t))S9.call(t,n)&&PI(e,n,t[n]);return e},Kxe=(e,t)=>{var n={};for(var r in e)x9.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Jv)for(var r of Jv(e))t.indexOf(r)<0&&S9.call(e,r)&&(n[r]=e[r]);return n};const qxe={stickyOffset:0},P9=_.forwardRef((e,t)=>{const n=ae("RichTextEditorToolbar",qxe,e),{className:r,children:o,sticky:i,stickyOffset:s}=n,a=Kxe(n,["className","children","sticky","stickyOffset"]),c=ja(),{classes:u,cx:f}=Zxe({sticky:i,stickyOffset:s},{name:"RichTextEditor",classNames:c.classNames,styles:c.styles,unstyled:c.unstyled,variant:c.variant});return k.createElement(nt,Yxe({className:f(u.toolbar,r),ref:t},a),o)});P9.displayName="@mantine/tiptap/Toolbar";const Jxe={linkControlLabel:"Link",colorPickerControlLabel:"Text color",highlightControlLabel:"Highlight text",colorControlLabel:e=>`Set text color ${e}`,boldControlLabel:"Bold",italicControlLabel:"Italic",underlineControlLabel:"Underline",strikeControlLabel:"Strikethrough",clearFormattingControlLabel:"Clear formatting",unlinkControlLabel:"Remove link",bulletListControlLabel:"Bullet list",orderedListControlLabel:"Ordered list",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",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:e=>`Set text color ${e}`};var Xxe=ue(e=>({root:{position:"relative",border:`${M(1)} solid ${e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[4]}`,borderRadius:e.fn.radius()}}));const Qxe=Xxe;var eSe=Object.defineProperty,Xv=Object.getOwnPropertySymbols,O9=Object.prototype.hasOwnProperty,C9=Object.prototype.propertyIsEnumerable,OI=(e,t,n)=>t in e?eSe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,tSe=(e,t)=>{for(var n in t||(t={}))O9.call(t,n)&&OI(e,n,t[n]);if(Xv)for(var n of Xv(t))C9.call(t,n)&&OI(e,n,t[n]);return e},nSe=(e,t)=>{var n={};for(var r in e)O9.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Xv)for(var r of Xv(e))t.indexOf(r)<0&&C9.call(e,r)&&(n[r]=e[r]);return n};const pO=_.forwardRef((e,t)=>{var n=e,{className:r,active:o,icon:i}=n,s=nSe(n,["className","active","icon"]);return k.createElement(Qf,tSe({active:o,ref:t},s),k.createElement(i,{size:"1rem"}))});pO.displayName="@mantine/tiptap/ControlBase";var rSe=Object.defineProperty,CI=Object.getOwnPropertySymbols,oSe=Object.prototype.hasOwnProperty,iSe=Object.prototype.propertyIsEnumerable,kI=(e,t,n)=>t in e?rSe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,sSe=(e,t)=>{for(var n in t||(t={}))oSe.call(t,n)&&kI(e,n,t[n]);if(CI)for(var n of CI(t))iSe.call(t,n)&&kI(e,n,t[n]);return e};function $t({label:e,isActive:t,operation:n,icon:r}){return _.forwardRef((o,i)=>{const{editor:s,labels:a}=ja(),c=a[e];return k.createElement(pO,sSe({"aria-label":c,title:c,active:t?.name?s?.isActive(t.name,t.attributes):!1,ref:i,onClick:()=>s?.chain().focus()[n.name](n.attributes).run(),icon:r},o))})}var aSe=Object.defineProperty,lSe=Object.defineProperties,cSe=Object.getOwnPropertyDescriptors,EI=Object.getOwnPropertySymbols,uSe=Object.prototype.hasOwnProperty,dSe=Object.prototype.propertyIsEnumerable,$I=(e,t,n)=>t in e?aSe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Mt=(e,t)=>{for(var n in t||(t={}))uSe.call(t,n)&&$I(e,n,t[n]);if(EI)for(var n of EI(t))dSe.call(t,n)&&$I(e,n,t[n]);return e},Nt=(e,t)=>lSe(e,cSe(t));const fSe=$t({label:"boldControlLabel",icon:e=>k.createElement(ahe,Nt(Mt({},e),{stroke:1.5})),isActive:{name:"bold"},operation:{name:"toggleBold"}}),pSe=$t({label:"italicControlLabel",icon:e=>k.createElement(Che,Nt(Mt({},e),{stroke:1.5})),isActive:{name:"italic"},operation:{name:"toggleItalic"}}),hSe=$t({label:"underlineControlLabel",icon:e=>k.createElement(Zhe,Nt(Mt({},e),{stroke:1.5})),isActive:{name:"underline"},operation:{name:"toggleUnderline"}}),mSe=$t({label:"strikeControlLabel",icon:e=>k.createElement(Vhe,Nt(Mt({},e),{stroke:1.5})),isActive:{name:"strike"},operation:{name:"toggleStrike"}}),gSe=$t({label:"clearFormattingControlLabel",icon:e=>k.createElement(uhe,Nt(Mt({},e),{stroke:1.5})),operation:{name:"unsetAllMarks"}}),vSe=$t({label:"unlinkControlLabel",icon:e=>k.createElement(M8,Nt(Mt({},e),{stroke:1.5})),operation:{name:"unsetLink"}}),ySe=$t({label:"bulletListControlLabel",icon:e=>k.createElement(Ihe,Nt(Mt({},e),{stroke:1.5})),isActive:{name:"bulletList"},operation:{name:"toggleBulletList"}}),_Se=$t({label:"orderedListControlLabel",icon:e=>k.createElement(The,Nt(Mt({},e),{stroke:1.5})),isActive:{name:"orderedList"},operation:{name:"toggleOrderedList"}}),wSe=$t({label:"h1ControlLabel",icon:e=>k.createElement(_he,Nt(Mt({},e),{stroke:1.5})),isActive:{name:"heading",attributes:{level:1}},operation:{name:"toggleHeading",attributes:{level:1}}}),bSe=$t({label:"h2ControlLabel",icon:e=>k.createElement(whe,Nt(Mt({},e),{stroke:1.5})),isActive:{name:"heading",attributes:{level:2}},operation:{name:"toggleHeading",attributes:{level:2}}}),xSe=$t({label:"h3ControlLabel",icon:e=>k.createElement(bhe,Nt(Mt({},e),{stroke:1.5})),isActive:{name:"heading",attributes:{level:3}},operation:{name:"toggleHeading",attributes:{level:3}}}),SSe=$t({label:"h4ControlLabel",icon:e=>k.createElement(xhe,Nt(Mt({},e),{stroke:1.5})),isActive:{name:"heading",attributes:{level:4}},operation:{name:"toggleHeading",attributes:{level:4}}}),PSe=$t({label:"h5ControlLabel",icon:e=>k.createElement(She,Nt(Mt({},e),{stroke:1.5})),isActive:{name:"heading",attributes:{level:5}},operation:{name:"toggleHeading",attributes:{level:5}}}),OSe=$t({label:"h6ControlLabel",icon:e=>k.createElement(Phe,Nt(Mt({},e),{stroke:1.5})),isActive:{name:"heading",attributes:{level:6}},operation:{name:"toggleHeading",attributes:{level:6}}}),CSe=$t({label:"blockquoteControlLabel",icon:e=>k.createElement(she,Nt(Mt({},e),{stroke:1.5})),isActive:{name:"blockquote"},operation:{name:"toggleBlockquote"}}),kSe=$t({label:"alignLeftControlLabel",icon:e=>k.createElement(ehe,Nt(Mt({},e),{stroke:1.5})),operation:{name:"setTextAlign",attributes:"left"}}),ESe=$t({label:"alignRightControlLabel",icon:e=>k.createElement(the,Nt(Mt({},e),{stroke:1.5})),operation:{name:"setTextAlign",attributes:"right"}}),$Se=$t({label:"alignCenterControlLabel",icon:e=>k.createElement(Xpe,Nt(Mt({},e),{stroke:1.5})),operation:{name:"setTextAlign",attributes:"center"}}),MSe=$t({label:"alignJustifyControlLabel",icon:e=>k.createElement(Qpe,Nt(Mt({},e),{stroke:1.5})),operation:{name:"setTextAlign",attributes:"justify"}}),NSe=$t({label:"subscriptControlLabel",icon:e=>k.createElement(Hhe,Nt(Mt({},e),{stroke:1.5})),isActive:{name:"subscript"},operation:{name:"toggleSubscript"}}),TSe=$t({label:"superscriptControlLabel",icon:e=>k.createElement(Whe,Nt(Mt({},e),{stroke:1.5})),isActive:{name:"superscript"},operation:{name:"toggleSuperscript"}}),ISe=$t({label:"codeControlLabel",icon:e=>k.createElement(S8,Nt(Mt({},e),{stroke:1.5})),isActive:{name:"code"},operation:{name:"toggleCode"}}),jSe=$t({label:"codeBlockControlLabel",icon:e=>k.createElement(S8,Nt(Mt({},e),{stroke:1.5})),isActive:{name:"codeBlock"},operation:{name:"toggleCodeBlock"}}),LSe=$t({label:"highlightControlLabel",icon:e=>k.createElement(Ohe,Nt(Mt({},e),{stroke:1.5})),isActive:{name:"highlight"},operation:{name:"toggleHighlight"}}),DSe=$t({label:"hrControlLabel",icon:e=>k.createElement($he,Nt(Mt({},e),{stroke:1.5})),operation:{name:"setHorizontalRule"}}),RSe=$t({label:"unsetColorControlLabel",icon:e=>k.createElement(x8,Nt(Mt({},e),{stroke:1.5})),operation:{name:"unsetColor"}});var zSe=Object.defineProperty,MI=Object.getOwnPropertySymbols,ASe=Object.prototype.hasOwnProperty,BSe=Object.prototype.propertyIsEnumerable,NI=(e,t,n)=>t in e?zSe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,FSe=(e,t)=>{for(var n in t||(t={}))ASe.call(t,n)&&NI(e,n,t[n]);if(MI)for(var n of MI(t))BSe.call(t,n)&&NI(e,n,t[n]);return e},VSe=ue(e=>{const t=e.fn.variant({variant:"light"});return{linkEditor:{display:"flex"},linkEditorInput:{borderTopRightRadius:0,borderBottomRightRadius:0,borderRight:0},linkEditorExternalControl:{backgroundColor:e.colorScheme==="dark"?e.fn.rgba(e.colors.dark[7],.5):e.white,border:`${M(1)} solid ${e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[4]}`,height:M(24),width:M(24),display:"flex",justifyContent:"center",alignItems:"center",borderRadius:e.fn.radius(),"&[data-active]":FSe({backgroundColor:t.background,borderColor:t.border,color:t.color},e.fn.hover({background:t.hover}))},linkEditorSave:{borderTopLeftRadius:0,borderBottomLeftRadius:0}}});const HSe=VSe;var WSe=Object.defineProperty,USe=Object.defineProperties,ZSe=Object.getOwnPropertyDescriptors,Qv=Object.getOwnPropertySymbols,k9=Object.prototype.hasOwnProperty,E9=Object.prototype.propertyIsEnumerable,TI=(e,t,n)=>t in e?WSe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Ox=(e,t)=>{for(var n in t||(t={}))k9.call(t,n)&&TI(e,n,t[n]);if(Qv)for(var n of Qv(t))E9.call(t,n)&&TI(e,n,t[n]);return e},GSe=(e,t)=>USe(e,ZSe(t)),$9=(e,t)=>{var n={};for(var r in e)k9.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Qv)for(var r of Qv(e))t.indexOf(r)<0&&E9.call(e,r)&&(n[r]=e[r]);return n};const YSe=e=>{var t=e,{size:n}=t,r=$9(t,["size"]);return k.createElement(Mhe,Ox({size:n,stroke:1.5},r))},KSe={initialExternal:!1},qSe=_.forwardRef((e,t)=>{const n=ae("RichTextEditorLinkControl",KSe,e),{icon:r,popoverProps:o,disableTooltips:i,initialExternal:s}=n,a=$9(n,["icon","popoverProps","disableTooltips","initialExternal"]),{editor:c,labels:u,classNames:f,styles:p,unstyled:g,variant:v}=ja(),{classes:y}=HSe(null,{name:"RichTextEditor",classNames:f,styles:p,unstyled:g,variant:v}),[w,P]=IG(""),[x,S]=_.useState(s),[O,{open:E,close:$}]=pS(!1),N=()=>{E();const z=c?.getAttributes("link");P(z?.href||""),S(z?.target==="_blank")},I=()=>{$(),P(""),S(s)},R=()=>{I(),w===""?c.chain().focus().extendMarkRange("link").unsetLink().run():c.chain().focus().extendMarkRange("link").setLink({href:w,target:x?"_blank":null}).run()},B=z=>{z.key==="Enter"&&(z.preventDefault(),R())};return mm("edit-link",N,!1),k.createElement(kn,Ox({trapFocus:!0,shadow:"md",withinPortal:!0,opened:O,onClose:I,offset:-44,zIndex:1e4,unstyled:g},o),k.createElement(kn.Target,null,k.createElement(pO,GSe(Ox({icon:r||YSe,"aria-label":u.linkControlLabel,title:u.linkControlLabel,onClick:N,active:c?.isActive("link"),unstyled:g},a),{ref:t}))),k.createElement(kn.Dropdown,{sx:z=>({backgroundColor:z.colorScheme==="dark"?z.colors.dark[7]:z.white})},k.createElement("div",{className:y.linkEditor},k.createElement(yn,{placeholder:u.linkEditorInputPlaceholder,"aria-label":u.linkEditorInputLabel,type:"url",value:w,onChange:P,classNames:{input:y.linkEditorInput},onKeyDown:B,unstyled:g,rightSection:k.createElement(At,{label:x?u.linkEditorExternalLink:u.linkEditorInternalLink,events:{hover:!0,focus:!0,touch:!0},withinPortal:!0,withArrow:!0,disabled:i,unstyled:g,zIndex:1e4},k.createElement(ls,{onClick:()=>S(z=>!z),"data-active":x||void 0,className:y.linkEditorExternalControl,unstyled:g},k.createElement(mhe,{size:M(14),stroke:1.5})))}),k.createElement(st,{variant:"default",onClick:R,className:y.linkEditorSave,unstyled:g},u.linkEditorSave))))});var JSe=Object.defineProperty,XSe=Object.defineProperties,QSe=Object.getOwnPropertyDescriptors,ey=Object.getOwnPropertySymbols,M9=Object.prototype.hasOwnProperty,N9=Object.prototype.propertyIsEnumerable,II=(e,t,n)=>t in e?JSe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,vw=(e,t)=>{for(var n in t||(t={}))M9.call(t,n)&&II(e,n,t[n]);if(ey)for(var n of ey(t))N9.call(t,n)&&II(e,n,t[n]);return e},ePe=(e,t)=>XSe(e,QSe(t)),tPe=(e,t)=>{var n={};for(var r in e)M9.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&ey)for(var r of ey(e))t.indexOf(r)<0&&N9.call(e,r)&&(n[r]=e[r]);return n};const nPe={},T9=_.forwardRef((e,t)=>{const n=ae("RichTextEditorColorPickerControl",nPe,e),{popoverProps:r,colors:o,colorPickerProps:i}=n,s=tPe(n,["popoverProps","colors","colorPickerProps"]),{editor:a,labels:c,unstyled:u}=ja(),[f,{toggle:p,close:g}]=pS(!1),[v,y]=_.useState("palette"),w=ir(),P=a?.getAttributes("textStyle").color||(w.colorScheme==="dark"?w.colors.dark[1]:w.black),x=(E,$=!0)=>{a.chain().focus().setColor(E).run(),$&&g()},S=()=>{a.chain().focus().unsetColor().run(),g()},O=o.map((E,$)=>k.createElement(hf,{key:$,component:"button",color:E,onClick:()=>x(E),size:26,radius:"xs",sx:{cursor:"pointer"},title:c.colorPickerColorLabel(E),"aria-label":c.colorPickerColorLabel(E),unstyled:u}));return k.createElement(kn,vw({opened:f,withinPortal:!0,trapFocus:!0,onClose:g,unstyled:u},r),k.createElement(kn.Target,null,k.createElement(Qf,ePe(vw({"aria-label":c.colorPickerControlLabel,title:c.colorPickerControlLabel},s),{ref:t,onClick:p}),k.createElement(hf,{color:P,size:14,unstyled:u}))),k.createElement(kn.Dropdown,{sx:()=>({backgroundColor:w.colorScheme==="dark"?w.colors.dark[7]:w.white})},v==="palette"&&k.createElement(TP,{cols:7,spacing:2},O),v==="colorPicker"&&k.createElement(e4,vw({defaultValue:P,onChange:E=>x(E,!1),unstyled:u},i)),k.createElement(At.Group,{closeDelay:200},k.createElement(nt,{position:"right",spacing:"xs",mt:"sm"},v==="palette"&&k.createElement(Qe,{variant:"default",onClick:g,unstyled:u,title:c.colorPickerCancel,"aria-label":c.colorPickerCancel},k.createElement(uu,{stroke:1.5,size:"1rem"})),k.createElement(Qe,{variant:"default",onClick:S,unstyled:u,title:c.colorPickerClear,"aria-label":c.colorPickerClear},k.createElement(x8,{stroke:1.5,size:"1rem"})),v==="palette"?k.createElement(Qe,{variant:"default",onClick:()=>y("colorPicker"),unstyled:u,title:c.colorPickerColorPicker,"aria-label":c.colorPickerColorPicker},k.createElement(fhe,{stroke:1.5,size:"1rem"})):k.createElement(Qe,{variant:"default",onClick:()=>y("palette"),unstyled:u,"aria-label":c.colorPickerPalette,title:c.colorPickerPalette},k.createElement(E8,{stroke:1.5,size:"1rem"})),v==="colorPicker"&&k.createElement(Qe,{variant:"default",onClick:g,unstyled:u,title:c.colorPickerSave,"aria-label":c.colorPickerSave},k.createElement(che,{stroke:1.5,size:"1rem"}))))))});T9.displayName="@mantine/tiptap/ColorPickerControl";var rPe=Object.defineProperty,oPe=Object.defineProperties,iPe=Object.getOwnPropertyDescriptors,ty=Object.getOwnPropertySymbols,I9=Object.prototype.hasOwnProperty,j9=Object.prototype.propertyIsEnumerable,jI=(e,t,n)=>t in e?rPe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,sPe=(e,t)=>{for(var n in t||(t={}))I9.call(t,n)&&jI(e,n,t[n]);if(ty)for(var n of ty(t))j9.call(t,n)&&jI(e,n,t[n]);return e},aPe=(e,t)=>oPe(e,iPe(t)),lPe=(e,t)=>{var n={};for(var r in e)I9.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&ty)for(var r of ty(e))t.indexOf(r)<0&&j9.call(e,r)&&(n[r]=e[r]);return n};const cPe={},uPe=_.forwardRef((e,t)=>{const n=ae("RichTextEditorColorControl",cPe,e),{color:r}=n,o=lPe(n,["color"]),{editor:i,labels:s,unstyled:a}=ja(),c=i?.getAttributes("textStyle").color||null,u=s.colorControlLabel(r);return k.createElement(Qf,aPe(sPe({active:c===r,"aria-label":u,title:u,onClick:()=>i.chain().focus().setColor(r).run()},o),{ref:t}),k.createElement(hf,{color:r,size:14,unstyled:a}))});var dPe=Object.defineProperty,fPe=Object.defineProperties,pPe=Object.getOwnPropertyDescriptors,ny=Object.getOwnPropertySymbols,L9=Object.prototype.hasOwnProperty,D9=Object.prototype.propertyIsEnumerable,LI=(e,t,n)=>t in e?dPe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,yw=(e,t)=>{for(var n in t||(t={}))L9.call(t,n)&&LI(e,n,t[n]);if(ny)for(var n of ny(t))D9.call(t,n)&&LI(e,n,t[n]);return e},hPe=(e,t)=>fPe(e,pPe(t)),mPe=(e,t)=>{var n={};for(var r in e)L9.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&ny)for(var r of ny(e))t.indexOf(r)<0&&D9.call(e,r)&&(n[r]=e[r]);return n};const gPe={withCodeHighlightStyles:!0,withTypographyStyles:!0},Ee=_.forwardRef((e,t)=>{const n=ae("RichTextEditor",gPe,e),{editor:r,children:o,className:i,labels:s,withCodeHighlightStyles:a,withTypographyStyles:c,classNames:u,styles:f,unstyled:p,variant:g}=n,v=mPe(n,["editor","children","className","labels","withCodeHighlightStyles","withTypographyStyles","classNames","styles","unstyled","variant"]),{classes:y,cx:w}=Qxe(null,{name:"RichTextEditor",classNames:u,styles:f,unstyled:p,variant:g}),P=_.useMemo(()=>yw(yw({},Jxe),s),[s]);return k.createElement(v0e,{value:{editor:r,labels:P,withCodeHighlightStyles:a,withTypographyStyles:c,classNames:u,styles:f,unstyled:p,variant:g}},k.createElement(Pe,hPe(yw({className:w(y.root,i)},v),{ref:t}),o))});Ee.Content=g9;Ee.Control=Qf;Ee.ControlsGroup=b9;Ee.Toolbar=P9;Ee.Bold=fSe;Ee.Italic=pSe;Ee.Strikethrough=mSe;Ee.Underline=hSe;Ee.ClearFormatting=gSe;Ee.H1=wSe;Ee.H2=bSe;Ee.H3=xSe;Ee.H4=SSe;Ee.H5=PSe;Ee.H6=OSe;Ee.BulletList=ySe;Ee.OrderedList=_Se;Ee.Link=qSe;Ee.Unlink=vSe;Ee.Blockquote=CSe;Ee.AlignLeft=kSe;Ee.AlignRight=ESe;Ee.AlignCenter=$Se;Ee.AlignJustify=MSe;Ee.Superscript=TSe;Ee.Subscript=NSe;Ee.Code=ISe;Ee.CodeBlock=jSe;Ee.ColorPicker=T9;Ee.Color=uPe;Ee.Highlight=LSe;Ee.Hr=DSe;Ee.UnsetColor=RSe;Ee.displayName="@mantine/tiptap/RichTextEditor";const vPe="aaa1rp3barth4b0ott3vie4c1le2ogado5udhabi7c0ademy5centure6ountant0s9o1tor4d0s1ult4e0g1ro2tna4f0l1rica5g0akhan5ency5i0g1rbus3force5tel5kdn3l0faromeo7ibaba4pay4lfinanz6state5y2sace3tom5m0azon4ericanexpress7family11x2fam3ica3sterdam8nalytics7droid5quan4z2o0l2partments8p0le4q0uarelle8r0ab1mco4chi3my2pa2t0e3s0da2ia2sociates9t0hleta5torney7u0ction5di0ble3o3spost5thor3o0s4vianca6w0s2x0a2z0ure5ba0by2idu3namex3narepublic11d1k2r0celona5laycard4s5efoot5gains6seball5ketball8uhaus5yern5b0c1t1va3cg1n2d1e0ats2uty4er2ntley5rlin4st0buy5t2f1g1h0arti5i0ble3d1ke2ng0o3o1z2j1lack0friday9ockbuster8g1omberg7ue3m0s1w2n0pparibas9o0ats3ehringer8fa2m1nd2o0k0ing5sch2tik2on4t1utique6x2r0adesco6idgestone9oadway5ker3ther5ussels7s1t1uild0ers6siness6y1zz3v1w1y1z0h3ca0b1fe2l0l1vinklein9m0era3p2non3petown5ital0one8r0avan4ds2e0er0s4s2sa1e1h1ino4t0ering5holic7ba1n1re2s2c1d1enter4o1rn3f0a1d2g1h0anel2nel4rity4se2t2eap3intai5ristmas6ome4urch5i0priani6rcle4sco3tadel4i0c2y0eats7k1l0aims4eaning6ick2nic1que6othing5ud3ub0med6m1n1o0ach3des3ffee4llege4ogne5m0cast4mbank4unity6pany2re3uter5sec4ndos3struction8ulting7tact3ractors9oking0channel11l1p2rsica5untry4pon0s4rses6pa2r0edit0card4union9icket5own3s1uise0s6u0isinella9v1w1x1y0mru3ou3z2dabur3d1nce3ta1e1ing3sun4y2clk3ds2e0al0er2s3gree4livery5l1oitte5ta3mocrat6ntal2ist5si0gn4v2hl2iamonds6et2gital5rect0ory7scount3ver5h2y2j1k1m1np2o0cs1tor4g1mains5t1wnload7rive4tv2ubai3nlop4pont4rban5vag2r2z2earth3t2c0o2deka3u0cation8e1g1mail3erck5nergy4gineer0ing9terprises10pson4quipment8r0icsson6ni3s0q1tate5t0isalat7u0rovision8s2vents5xchange6pert3osed4ress5traspace10fage2il1rwinds6th3mily4n0s2rm0ers5shion4t3edex3edback6rrari3ero6i0at2delity5o2lm2nal1nce1ial7re0stone6mdale6sh0ing5t0ness6j1k1lickr3ghts4r2orist4wers5y2m1o0o0d0network8tball6rd1ex2sale4um3undation8x2r0ee1senius7l1ogans4ntdoor4ier7tr2ujitsu5n0d2rniture7tbol5yi3ga0l0lery3o1up4me0s3p1rden4y2b0iz3d0n2e0a1nt0ing5orge5f1g0ee3h1i0ft0s3ves2ing5l0ass3e1obal2o4m0ail3bh2o1x2n1odaddy5ld0point6f2o0dyear5g0le4p1t1v2p1q1r0ainger5phics5tis4een3ipe3ocery4up4s1t1u0ardian6cci3ge2ide2tars5ru3w1y2hair2mburg5ngout5us3bo2dfc0bank7ealth0care8lp1sinki6re1mes5gtv3iphop4samitsu7tachi5v2k0t2m1n1ockey4ldings5iday5medepot5goods5s0ense7nda3rse3spital5t0ing5t0eles2s3mail5use3w2r1sbc3t1u0ghes5yatt3undai7ibm2cbc2e1u2d1e0ee3fm2kano4l1m0amat4db2mo0bilien9n0c1dustries8finiti5o2g1k1stitute6urance4e4t0ernational10uit4vestments10o1piranga7q1r0ish4s0maili5t0anbul7t0au2v3jaguar4va3cb2e0ep2tzt3welry6io2ll2m0p2nj2o0bs1urg4t1y2p0morgan6rs3uegos4niper7kaufen5ddi3e0rryhotels6logistics9properties14fh2g1h1i0a1ds2m1nder2le4tchen5wi3m1n1oeln3matsu5sher5p0mg2n2r0d1ed3uokgroup8w1y0oto4z2la0caixa5mborghini8er3ncaster5ia3d0rover6xess5salle5t0ino3robe5w0yer5b1c1ds2ease3clerc5frak4gal2o2xus4gbt3i0dl2fe0insurance9style7ghting6ke2lly3mited4o2ncoln4de2k2psy3ve1ing5k1lc1p2oan0s3cker3us3l1ndon4tte1o3ve3pl0financial11r1s1t0d0a3u0ndbeck6xe1ury5v1y2ma0cys3drid4if1son4keup4n0agement7go3p1rket0ing3s4riott5shalls7serati6ttel5ba2c0kinsey7d1e0d0ia3et2lbourne7me1orial6n0u2rckmsd7g1h1iami3crosoft7l1ni1t2t0subishi9k1l0b1s2m0a2n1o0bi0le4da2e1i1m1nash3ey2ster5rmon3tgage6scow4to0rcycles9v0ie4p1q1r1s0d2t0n1r2u0seum3ic3tual5v1w1x1y1z2na0b1goya4me2tura4vy3ba2c1e0c1t0bank4flix4work5ustar5w0s2xt0direct7us4f0l2g0o2hk2i0co2ke1on3nja3ssan1y5l1o0kia3rthwesternmutual14on4w0ruz3tv4p1r0a1w2tt2u1yc2z2obi1server7ffice5kinawa6layan0group9dnavy5lo3m0ega4ne1g1l0ine5oo2pen3racle3nge4g0anic5igins6saka4tsuka4t2vh3pa0ge2nasonic7ris2s1tners4s1y3ssagens7y2ccw3e0t2f0izer5g1h0armacy6d1ilips5one2to0graphy6s4ysio5ics1tet2ures6d1n0g1k2oneer5zza4k1l0ace2y0station9umbing5s3m1n0c2ohl2ker3litie5rn2st3r0america6xi3ess3ime3o0d0uctions8f1gressive8mo2perties3y5tection8u0dential9s1t1ub2w0c2y2qa1pon3uebec3st5racing4dio4e0ad1lestate6tor2y4cipes5d0stone5umbrella9hab3ise0n3t2liance6n0t0als5pair3ort3ublican8st0aurant8view0s5xroth6ich0ardli6oh3l1o1p2o0cher3ks3deo3gers4om3s0vp3u0gby3hr2n2w0e2yukyu6sa0arland6fe0ty4kura4le1on3msclub4ung5ndvik0coromant12ofi4p1rl2s1ve2xo3b0i1s2c0a1b1haeffler7midt4olarships8ol3ule3warz5ience5ot3d1e0arch3t2cure1ity6ek2lect4ner3rvices6ven3w1x0y3fr2g1h0angrila6rp2w2ell3ia1ksha5oes2p0ping5uji3w0time7i0lk2na1gles5te3j1k0i0n2y0pe4l0ing4m0art3ile4n0cf3o0ccer3ial4ftbank4ware6hu2lar2utions7ng1y2y2pa0ce3ort2t3r0l2s1t0ada2ples4r1tebank4farm7c0group6ockholm6rage3e3ream4udio2y3yle4u0cks3pplies3y2ort5rf1gery5zuki5v1watch4iss4x1y0dney4stems6z2tab1ipei4lk2obao4rget4tamotors6r2too4x0i3c0i2d0k2eam2ch0nology8l1masek5nnis4va3f1g1h0d1eater2re6iaa2ckets5enda4ffany5ps2res2ol4j0maxx4x2k0maxx5l1m0all4n1o0day3kyo3ols3p1ray3shiba5tal3urs3wn2yota3s3r0ade1ing4ining5vel0channel7ers0insurance16ust3v2t1ube2i1nes3shu4v0s2w1z2ua1bank3s2g1k1nicom3versity8o2ol2ps2s1y1z2va0cations7na1guard7c1e0gas3ntures6risign5mögensberater2ung14sicherung10t2g1i0ajes4deo3g1king4llas4n1p1rgin4sa1ion4va1o3laanderen9n1odka3lkswagen7vo3te1ing3o2yage5u0elos6wales2mart4ter4ng0gou5tch0es6eather0channel12bcam3er2site5d0ding5ibo2r3f1hoswho6ien2ki2lliamhill9n0dows4e1ners6me2olterskluwer11odside6rk0s2ld3w2s1tc1f3xbox3erox4finity6ihuan4n2xx2yz3yachts4hoo3maxun5ndex5e1odobashi7ga2kohama6u0tube6t1un3za0ppos4ra3ero3ip2m1one3uerich6w2",yPe="ελ1υ2бг1ел3дети4ею2католик6ом3мкд2он1сква6онлайн5рг3рус2ф2сайт3рб3укр3қаз3հայ3ישראל5קום3ابوظبي5تصالات6رامكو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",yu=(e,t)=>{for(const n in t)e[n]=t[n];return e},Cx="numeric",kx="ascii",Ex="alpha",Qh="asciinumeric",ch="alphanumeric",$x="domain",R9="emoji",_Pe="scheme",wPe="slashscheme",DI="whitespace";function bPe(e,t){return e in t||(t[e]=[]),t[e]}function hl(e,t,n){t[Cx]&&(t[Qh]=!0,t[ch]=!0),t[kx]&&(t[Qh]=!0,t[Ex]=!0),t[Qh]&&(t[ch]=!0),t[Ex]&&(t[ch]=!0),t[ch]&&(t[$x]=!0),t[R9]&&(t[$x]=!0);for(const r in t){const o=bPe(r,n);o.indexOf(e)<0&&o.push(e)}}function xPe(e,t){const n={};for(const r in t)t[r].indexOf(e)>=0&&(n[r]=!0);return n}function Rr(e){e===void 0&&(e=null),this.j={},this.jr=[],this.jd=null,this.t=e}Rr.groups={};Rr.prototype={accepts(){return!!this.t},go(e){const t=this,n=t.j[e];if(n)return n;for(let r=0;re.ta(t,n,r,o),Eo=(e,t,n,r,o)=>e.tr(t,n,r,o),RI=(e,t,n,r,o)=>e.ts(t,n,r,o),de=(e,t,n,r,o)=>e.tt(t,n,r,o),Xi="WORD",Mx="UWORD",Sf="LOCALHOST",Nx="TLD",Tx="UTLD",em="SCHEME",gc="SLASH_SCHEME",hO="NUM",z9="WS",mO="NL",Tc="OPENBRACE",Bd="OPENBRACKET",Fd="OPENANGLEBRACKET",Vd="OPENPAREN",rl="CLOSEBRACE",Ic="CLOSEBRACKET",jc="CLOSEANGLEBRACKET",ol="CLOSEPAREN",ry="AMPERSAND",oy="APOSTROPHE",iy="ASTERISK",Ws="AT",sy="BACKSLASH",ay="BACKTICK",ly="CARET",Ks="COLON",gO="COMMA",cy="DOLLAR",vi="DOT",uy="EQUALS",vO="EXCLAMATION",yi="HYPHEN",dy="PERCENT",fy="PIPE",py="PLUS",hy="POUND",my="QUERY",yO="QUOTE",_O="SEMI",_i="SLASH",Hd="TILDE",gy="UNDERSCORE",A9="EMOJI",vy="SYM";var B9=Object.freeze({__proto__:null,WORD:Xi,UWORD:Mx,LOCALHOST:Sf,TLD:Nx,UTLD:Tx,SCHEME:em,SLASH_SCHEME:gc,NUM:hO,WS:z9,NL:mO,OPENBRACE:Tc,OPENBRACKET:Bd,OPENANGLEBRACKET:Fd,OPENPAREN:Vd,CLOSEBRACE:rl,CLOSEBRACKET:Ic,CLOSEANGLEBRACKET:jc,CLOSEPAREN:ol,AMPERSAND:ry,APOSTROPHE:oy,ASTERISK:iy,AT:Ws,BACKSLASH:sy,BACKTICK:ay,CARET:ly,COLON:Ks,COMMA:gO,DOLLAR:cy,DOT:vi,EQUALS:uy,EXCLAMATION:vO,HYPHEN:yi,PERCENT:dy,PIPE:fy,PLUS:py,POUND:hy,QUERY:my,QUOTE:yO,SEMI:_O,SLASH:_i,TILDE:Hd,UNDERSCORE:gy,EMOJI:A9,SYM:vy});const fc=/[a-z]/,_w=/\p{L}/u,ww=/\p{Emoji}/u,bw=/\d/,zI=/\s/,AI=` +`,SPe="️",PPe="‍";let uh=null,dh=null;function OPe(e){e===void 0&&(e=[]);const t={};Rr.groups=t;const n=new Rr;uh==null&&(uh=BI(vPe)),dh==null&&(dh=BI(yPe)),de(n,"'",oy),de(n,"{",Tc),de(n,"[",Bd),de(n,"<",Fd),de(n,"(",Vd),de(n,"}",rl),de(n,"]",Ic),de(n,">",jc),de(n,")",ol),de(n,"&",ry),de(n,"*",iy),de(n,"@",Ws),de(n,"`",ay),de(n,"^",ly),de(n,":",Ks),de(n,",",gO),de(n,"$",cy),de(n,".",vi),de(n,"=",uy),de(n,"!",vO),de(n,"-",yi),de(n,"%",dy),de(n,"|",fy),de(n,"+",py),de(n,"#",hy),de(n,"?",my),de(n,'"',yO),de(n,"/",_i),de(n,";",_O),de(n,"~",Hd),de(n,"_",gy),de(n,"\\",sy);const r=Eo(n,bw,hO,{[Cx]:!0});Eo(r,bw,r);const o=Eo(n,fc,Xi,{[kx]:!0});Eo(o,fc,o);const i=Eo(n,_w,Mx,{[Ex]:!0});Eo(i,fc),Eo(i,_w,i);const s=Eo(n,zI,z9,{[DI]:!0});de(n,AI,mO,{[DI]:!0}),de(s,AI),Eo(s,zI,s);const a=Eo(n,ww,A9,{[R9]:!0});Eo(a,ww,a),de(a,SPe,a);const c=de(a,PPe);Eo(c,ww,a);const u=[[fc,o]],f=[[fc,null],[_w,i]];for(let p=0;pp[0]>g[0]?1:-1);for(let p=0;p=0?y[$x]=!0:fc.test(g)?bw.test(g)?y[Qh]=!0:y[kx]=!0:y[Cx]=!0,RI(n,g,g,y)}return RI(n,"localhost",Sf,{ascii:!0}),n.jd=new Rr(vy),{start:n,tokens:yu({groups:t},B9)}}function CPe(e,t){const n=kPe(t.replace(/[A-Z]/g,a=>a.toLowerCase())),r=n.length,o=[];let i=0,s=0;for(;s=0&&(p+=n[s].length,g++),u+=n[s].length,i+=n[s].length,s++;i-=p,s-=g,u-=p,o.push({t:f.t,v:t.slice(i-u,i),s:i-u,e:i})}return o}function kPe(e){const t=[],n=e.length;let r=0;for(;r56319||r+1===n||(i=e.charCodeAt(r+1))<56320||i>57343?e[r]:e.slice(r,r+2);t.push(s),r+=s.length}return t}function js(e,t,n,r,o){let i;const s=t.length;for(let a=0;a=0;)i++;if(i>0){t.push(n.join(""));for(let s=parseInt(e.substring(r,r+i),10);s>0;s--)n.pop();r+=i}else n.push(e[r]),r++}return t}const Pf={defaultProtocol:"http",events:null,format:FI,formatHref:FI,nl2br:!1,tagName:"a",target:null,rel:null,validate:!0,truncate:1/0,className:null,attributes:null,ignoreTags:[],render:null};function wO(e,t){t===void 0&&(t=null);let n=yu({},Pf);e&&(n=yu(n,e instanceof wO?e.o:e));const r=n.ignoreTags,o=[];for(let i=0;in?r.substring(0,n)+"…":r},toFormattedHref(e){return e.get("formatHref",this.toHref(e.get("defaultProtocol")),this)},startIndex(){return this.tk[0].s},endIndex(){return this.tk[this.tk.length-1].e},toObject(e){return e===void 0&&(e=Pf.defaultProtocol),{type:this.t,value:this.toString(),isLink:this.isLink,href:this.toHref(e),start:this.startIndex(),end:this.endIndex()}},toFormattedObject(e){return{type:this.t,value:this.toFormattedString(e),isLink:this.isLink,href:this.toFormattedHref(e),start:this.startIndex(),end:this.endIndex()}},validate(e){return e.get("validate",this.toString(),this)},render(e){const t=this,n=this.toHref(e.get("defaultProtocol")),r=e.get("formatHref",n,this),o=e.get("tagName",n,t),i=this.toFormattedString(e),s={},a=e.get("className",n,t),c=e.get("target",n,t),u=e.get("rel",n,t),f=e.getObj("attributes",n,t),p=e.getObj("events",n,t);return s.href=r,a&&(s.class=a),c&&(s.target=c),u&&(s.rel=u),f&&yu(s,f),{tagName:o,attributes:s,content:i,eventListeners:p}}};function r1(e,t){class n extends F9{constructor(o,i){super(o,i),this.t=e}}for(const r in t)n.prototype[r]=t[r];return n.t=e,n}const VI=r1("email",{isLink:!0,toHref(){return"mailto:"+this.toString()}}),HI=r1("text"),EPe=r1("nl"),Ka=r1("url",{isLink:!0,toHref(e){return e===void 0&&(e=Pf.defaultProtocol),this.hasProtocol()?this.v:`${e}://${this.v}`},hasProtocol(){const e=this.tk;return e.length>=2&&e[0].t!==Sf&&e[1].t===Ks}}),Pn=e=>new Rr(e);function $Pe(e){let{groups:t}=e;const n=t.domain.concat([ry,iy,Ws,sy,ay,ly,cy,uy,yi,hO,dy,fy,py,hy,_i,vy,Hd,gy]),r=[oy,jc,rl,Ic,ol,Ks,gO,vi,vO,Fd,Tc,Bd,Vd,my,yO,_O],o=[ry,oy,iy,sy,ay,ly,rl,cy,uy,yi,Tc,dy,fy,py,hy,my,_i,vy,Hd,gy],i=Pn(),s=de(i,Hd);Me(s,o,s),Me(s,t.domain,s);const a=Pn(),c=Pn(),u=Pn();Me(i,t.domain,a),Me(i,t.scheme,c),Me(i,t.slashscheme,u),Me(a,o,s),Me(a,t.domain,a);const f=de(a,Ws);de(s,Ws,f),de(c,Ws,f),de(u,Ws,f);const p=de(s,vi);Me(p,o,s),Me(p,t.domain,s);const g=Pn();Me(f,t.domain,g),Me(g,t.domain,g);const v=de(g,vi);Me(v,t.domain,g);const y=Pn(VI);Me(v,t.tld,y),Me(v,t.utld,y),de(f,Sf,y);const w=de(g,yi);Me(w,t.domain,g),Me(y,t.domain,g),de(y,vi,v),de(y,yi,w);const P=de(y,Ks);Me(P,t.numeric,VI);const x=de(a,yi),S=de(a,vi);Me(x,t.domain,a),Me(S,o,s),Me(S,t.domain,a);const O=Pn(Ka);Me(S,t.tld,O),Me(S,t.utld,O),Me(O,t.domain,a),Me(O,o,s),de(O,vi,S),de(O,yi,x),de(O,Ws,f);const E=de(O,Ks),$=Pn(Ka);Me(E,t.numeric,$);const N=Pn(Ka),I=Pn();Me(N,n,N),Me(N,r,I),Me(I,n,N),Me(I,r,I),de(O,_i,N),de($,_i,N);const R=de(c,Ks),B=de(u,Ks),z=de(B,_i),G=de(z,_i);Me(c,t.domain,a),de(c,vi,S),de(c,yi,x),Me(u,t.domain,a),de(u,vi,S),de(u,yi,x),Me(R,t.domain,N),de(R,_i,N),Me(G,t.domain,N),Me(G,n,N),de(G,_i,N);const X=de(N,Tc),Q=de(N,Bd),V=de(N,Fd),H=de(N,Vd);de(I,Tc,X),de(I,Bd,Q),de(I,Fd,V),de(I,Vd,H),de(X,rl,N),de(Q,Ic,N),de(V,jc,N),de(H,ol,N),de(X,rl,N);const Z=Pn(Ka),Y=Pn(Ka),j=Pn(Ka),U=Pn(Ka);Me(X,n,Z),Me(Q,n,Y),Me(V,n,j),Me(H,n,U);const F=Pn(),K=Pn(),ee=Pn(),fe=Pn();return Me(X,r),Me(Q,r),Me(V,r),Me(H,r),Me(Z,n,Z),Me(Y,n,Y),Me(j,n,j),Me(U,n,U),Me(Z,r,Z),Me(Y,r,Y),Me(j,r,j),Me(U,r,U),Me(F,n,F),Me(K,n,Y),Me(ee,n,j),Me(fe,n,U),Me(F,r,F),Me(K,r,K),Me(ee,r,ee),Me(fe,r,fe),de(Y,Ic,N),de(j,jc,N),de(U,ol,N),de(Z,rl,N),de(K,Ic,N),de(ee,jc,N),de(fe,ol,N),de(F,ol,N),de(i,Sf,O),de(i,mO,EPe),{start:i,tokens:B9}}function MPe(e,t,n){let r=n.length,o=0,i=[],s=[];for(;o=0&&g++,o++,f++;if(g<0)o-=f,o0&&(i.push(xw(HI,t,s)),s=[]),o-=g,f-=g;const v=p.t,y=n.slice(o-f,o);i.push(xw(v,t,y))}}return s.length>0&&i.push(xw(HI,t,s)),i}function xw(e,t,n){const r=n[0].s,o=n[n.length-1].e,i=t.slice(r,o);return new e(i,n)}const NPe=typeof console<"u"&&console&&console.warn||(()=>{}),TPe="until manual call of linkify.init(). Register all schemes and plugins before invoking linkify the first time.",Vt={scanner:null,parser:null,tokenQueue:[],pluginQueue:[],customSchemes:[],initialized:!1};function IPe(){Rr.groups={},Vt.scanner=null,Vt.parser=null,Vt.tokenQueue=[],Vt.pluginQueue=[],Vt.customSchemes=[],Vt.initialized=!1}function WI(e,t){if(t===void 0&&(t=!1),Vt.initialized&&NPe(`linkifyjs: already initialized - will not register custom scheme "${e}" ${TPe}`),!/^[0-9a-z]+(-[0-9a-z]+)*$/.test(e))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`);Vt.customSchemes.push([e,t])}function LPe(){Vt.scanner=CPe(Vt.customSchemes);for(let e=0;e{const o=t.some(u=>u.docChanged)&&!n.doc.eq(r.doc),i=t.some(u=>u.getMeta("preventAutolink"));if(!o||i)return;const{tr:s}=r,a=Pbe(n.doc,[...t]);if(Ibe(a).forEach(({newRange:u})=>{const f=Cbe(r.doc,u,v=>v.isTextblock);let p,g;if(f.length>1?(p=f[0],g=r.doc.textBetween(p.pos,p.pos+p.node.nodeSize,void 0," ")):f.length&&r.doc.textBetween(u.from,u.to," "," ").endsWith(" ")&&(p=f[0],g=r.doc.textBetween(p.pos,u.to,void 0," ")),p&&g){const v=g.split(" ").filter(P=>P!=="");if(v.length<=0)return!1;const y=v[v.length-1],w=p.pos+g.lastIndexOf(y);if(!y)return!1;V9(y).filter(P=>P.isLink).map(P=>({...P,from:w+P.start+1,to:w+P.end+1})).filter(P=>r.schema.marks.code?!r.doc.rangeHasMark(P.from,P.to,r.schema.marks.code):!0).filter(P=>e.validate?e.validate(P.value):!0).forEach(P=>{fO(P.from,P.to,r.doc).some(x=>x.mark.type===e.type)||s.addMark(P.from,P.to,e.type.create({href:P.href}))})}}),!!s.steps.length)return s}})}function zPe(e){return new Zr({key:new Ai("handleClickLink"),props:{handleClick:(t,n,r)=>{var o,i;if(r.button!==0||r.target.nodeName!=="A")return!1;const a=d9(t.state,e.type.name),c=r.target,u=(o=c?.href)!==null&&o!==void 0?o:a.href,f=(i=c?.target)!==null&&i!==void 0?i:a.target;return c&&u?(t.editable&&window.open(u,f),!0):!1}}})}const APe=or.create({name:"link",priority:1e3,keepOnSplit:!1,onCreate(){this.options.protocols.forEach(e=>{if(typeof e=="string"){WI(e);return}WI(e.scheme,e.optionalSlashes)})},onDestroy(){jPe()},inclusive(){return this.options.autolink},addOptions(){return{openOnClick:!0,linkOnPaste:!0,autolink:!0,protocols:[],HTMLAttributes:{target:"_blank",rel:"noopener noreferrer nofollow",class:null},validate:void 0}},addAttributes(){return{href:{default:null},target:{default:this.options.HTMLAttributes.target},rel:{default:this.options.HTMLAttributes.rel},class:{default:this.options.HTMLAttributes.class}}},parseHTML(){return[{tag:'a[href]:not([href *= "javascript:" i])'}]},renderHTML({HTMLAttributes:e}){return["a",Et(this.options.HTMLAttributes,e),0]},addCommands(){return{setLink:e=>({chain:t})=>t().setMark(this.name,e).setMeta("preventAutolink",!0).run(),toggleLink:e=>({chain:t})=>t().toggleMark(this.name,e,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run(),unsetLink:()=>({chain:e})=>e().unsetMark(this.name,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run()}},addPasteRules(){return[ka({find:e=>V9(e).filter(t=>this.options.validate?this.options.validate(t.value):!0).filter(t=>t.isLink).map(t=>({text:t.value,index:t.start,data:t})),type:this.type,getAttributes:(e,t)=>{var n,r;const o=(n=t.clipboardData)===null||n===void 0?void 0:n.getData("text/html"),i=/href="([^"]*)"/,s=o?.match(i);return s?{href:s[1]}:{href:(r=e.data)===null||r===void 0?void 0:r.href}}})]},addProseMirrorPlugins(){const e=[];return this.options.autolink&&e.push(RPe({type:this.type,validate:this.options.validate})),this.options.openOnClick&&e.push(zPe({type:this.type})),e}}),H9=APe.extend({addKeyboardShortcuts:()=>({"Mod-k":()=>(window.dispatchEvent(new Event("edit-link")),!0)})}).configure({openOnClick:!1}),BPe=/(?:^|\s)((?:==)((?:[^~=]+))(?:==))$/,FPe=/(?:^|\s)((?:==)((?:[^~=]+))(?:==))/g,W9=or.create({name:"highlight",addOptions(){return{multicolor:!1,HTMLAttributes:{}}},addAttributes(){return this.options.multicolor?{color:{default:null,parseHTML:e=>e.getAttribute("data-color")||e.style.backgroundColor,renderHTML:e=>e.color?{"data-color":e.color,style:`background-color: ${e.color}; color: inherit`}:{}}}:{}},parseHTML(){return[{tag:"mark"}]},renderHTML({HTMLAttributes:e}){return["mark",Et(this.options.HTMLAttributes,e),0]},addCommands(){return{setHighlight:e=>({commands:t})=>t.setMark(this.name,e),toggleHighlight:e=>({commands:t})=>t.toggleMark(this.name,e),unsetHighlight:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-h":()=>this.editor.commands.toggleHighlight()}},addInputRules(){return[Ll({find:BPe,type:this.type})]},addPasteRules(){return[ka({find:FPe,type:this.type})]}}),VPe=/^\s*>\s$/,HPe=Gr.create({name:"blockquote",addOptions(){return{HTMLAttributes:{}}},content:"block+",group:"block",defining:!0,parseHTML(){return[{tag:"blockquote"}]},renderHTML({HTMLAttributes:e}){return["blockquote",Et(this.options.HTMLAttributes,e),0]},addCommands(){return{setBlockquote:()=>({commands:e})=>e.wrapIn(this.name),toggleBlockquote:()=>({commands:e})=>e.toggleWrap(this.name),unsetBlockquote:()=>({commands:e})=>e.lift(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-b":()=>this.editor.commands.toggleBlockquote()}},addInputRules(){return[xf({find:VPe,type:this.type})]}}),WPe=/(?:^|\s)((?:\*\*)((?:[^*]+))(?:\*\*))$/,UPe=/(?:^|\s)((?:\*\*)((?:[^*]+))(?:\*\*))/g,ZPe=/(?:^|\s)((?:__)((?:[^__]+))(?:__))$/,GPe=/(?:^|\s)((?:__)((?:[^__]+))(?:__))/g,YPe=or.create({name:"bold",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"strong"},{tag:"b",getAttrs:e=>e.style.fontWeight!=="normal"&&null},{style:"font-weight",getAttrs:e=>/^(bold(er)?|[5-9]\d{2,})$/.test(e)&&null}]},renderHTML({HTMLAttributes:e}){return["strong",Et(this.options.HTMLAttributes,e),0]},addCommands(){return{setBold:()=>({commands:e})=>e.setMark(this.name),toggleBold:()=>({commands:e})=>e.toggleMark(this.name),unsetBold:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-b":()=>this.editor.commands.toggleBold(),"Mod-B":()=>this.editor.commands.toggleBold()}},addInputRules(){return[Ll({find:WPe,type:this.type}),Ll({find:ZPe,type:this.type})]},addPasteRules(){return[ka({find:UPe,type:this.type}),ka({find:GPe,type:this.type})]}}),KPe=Gr.create({name:"listItem",addOptions(){return{HTMLAttributes:{},bulletListTypeName:"bulletList",orderedListTypeName:"orderedList"}},content:"paragraph block*",defining:!0,parseHTML(){return[{tag:"li"}]},renderHTML({HTMLAttributes:e}){return["li",Et(this.options.HTMLAttributes,e),0]},addKeyboardShortcuts(){return{Enter:()=>this.editor.commands.splitListItem(this.name),Tab:()=>this.editor.commands.sinkListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)}}}),UI=or.create({name:"textStyle",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"span",getAttrs:e=>e.hasAttribute("style")?{}:!1}]},renderHTML({HTMLAttributes:e}){return["span",Et(this.options.HTMLAttributes,e),0]},addCommands(){return{removeEmptyTextStyle:()=>({state:e,commands:t})=>{const n=Xf(e,this.type);return Object.entries(n).some(([,o])=>!!o)?!0:t.unsetMark(this.name)}}}}),ZI=/^\s*([-+*])\s$/,qPe=Gr.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:e}){return["ul",Et(this.options.HTMLAttributes,e),0]},addCommands(){return{toggleBulletList:()=>({commands:e,chain:t})=>this.options.keepAttributes?t().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(KPe.name,this.editor.getAttributes(UI.name)).run():e.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-8":()=>this.editor.commands.toggleBulletList()}},addInputRules(){let e=xf({find:ZI,type:this.type});return(this.options.keepMarks||this.options.keepAttributes)&&(e=xf({find:ZI,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:()=>this.editor.getAttributes(UI.name),editor:this.editor})),[e]}}),JPe=/(?:^|\s)((?:`)((?:[^`]+))(?:`))$/,XPe=/(?:^|\s)((?:`)((?:[^`]+))(?:`))/g,QPe=or.create({name:"code",addOptions(){return{HTMLAttributes:{}}},excludes:"_",code:!0,exitable:!0,parseHTML(){return[{tag:"code"}]},renderHTML({HTMLAttributes:e}){return["code",Et(this.options.HTMLAttributes,e),0]},addCommands(){return{setCode:()=>({commands:e})=>e.setMark(this.name),toggleCode:()=>({commands:e})=>e.toggleMark(this.name),unsetCode:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-e":()=>this.editor.commands.toggleCode()}},addInputRules(){return[Ll({find:JPe,type:this.type})]},addPasteRules(){return[ka({find:XPe,type:this.type})]}}),eOe=/^```([a-z]+)?[\s\n]$/,tOe=/^~~~([a-z]+)?[\s\n]$/,nOe=Gr.create({name:"codeBlock",addOptions(){return{languageClassPrefix:"language-",exitOnTripleEnter:!0,exitOnArrowDown:!0,HTMLAttributes:{}}},content:"text*",marks:"",group:"block",code:!0,defining:!0,addAttributes(){return{language:{default:null,parseHTML:e=>{var t;const{languageClassPrefix:n}=this.options,i=[...((t=e.firstElementChild)===null||t===void 0?void 0:t.classList)||[]].filter(s=>s.startsWith(n)).map(s=>s.replace(n,""))[0];return i||null},rendered:!1}}},parseHTML(){return[{tag:"pre",preserveWhitespace:"full"}]},renderHTML({node:e,HTMLAttributes:t}){return["pre",Et(this.options.HTMLAttributes,t),["code",{class:e.attrs.language?this.options.languageClassPrefix+e.attrs.language:null},0]]},addCommands(){return{setCodeBlock:e=>({commands:t})=>t.setNode(this.name,e),toggleCodeBlock:e=>({commands:t})=>t.toggleNode(this.name,"paragraph",e)}},addKeyboardShortcuts(){return{"Mod-Alt-c":()=>this.editor.commands.toggleCodeBlock(),Backspace:()=>{const{empty:e,$anchor:t}=this.editor.state.selection,n=t.pos===1;return!e||t.parent.type.name!==this.name?!1:n||!t.parent.textContent.length?this.editor.commands.clearNodes():!1},Enter:({editor:e})=>{if(!this.options.exitOnTripleEnter)return!1;const{state:t}=e,{selection:n}=t,{$from:r,empty:o}=n;if(!o||r.parent.type!==this.type)return!1;const i=r.parentOffset===r.parent.nodeSize-2,s=r.parent.textContent.endsWith(` + 3. "-" cannot repeat`);Vt.customSchemes.push([e,t])}function jPe(){Vt.scanner=OPe(Vt.customSchemes);for(let e=0;e{const o=t.some(u=>u.docChanged)&&!n.doc.eq(r.doc),i=t.some(u=>u.getMeta("preventAutolink"));if(!o||i)return;const{tr:s}=r,a=Sbe(n.doc,[...t]);if(Tbe(a).forEach(({newRange:u})=>{const f=Obe(r.doc,u,v=>v.isTextblock);let p,g;if(f.length>1?(p=f[0],g=r.doc.textBetween(p.pos,p.pos+p.node.nodeSize,void 0," ")):f.length&&r.doc.textBetween(u.from,u.to," "," ").endsWith(" ")&&(p=f[0],g=r.doc.textBetween(p.pos,u.to,void 0," ")),p&&g){const v=g.split(" ").filter(P=>P!=="");if(v.length<=0)return!1;const y=v[v.length-1],w=p.pos+g.lastIndexOf(y);if(!y)return!1;V9(y).filter(P=>P.isLink).map(P=>({...P,from:w+P.start+1,to:w+P.end+1})).filter(P=>r.schema.marks.code?!r.doc.rangeHasMark(P.from,P.to,r.schema.marks.code):!0).filter(P=>e.validate?e.validate(P.value):!0).forEach(P=>{fO(P.from,P.to,r.doc).some(x=>x.mark.type===e.type)||s.addMark(P.from,P.to,e.type.create({href:P.href}))})}}),!!s.steps.length)return s}})}function RPe(e){return new Zr({key:new Ai("handleClickLink"),props:{handleClick:(t,n,r)=>{var o,i;if(r.button!==0||r.target.nodeName!=="A")return!1;const a=d9(t.state,e.type.name),c=r.target,u=(o=c?.href)!==null&&o!==void 0?o:a.href,f=(i=c?.target)!==null&&i!==void 0?i:a.target;return c&&u?(t.editable&&window.open(u,f),!0):!1}}})}const zPe=or.create({name:"link",priority:1e3,keepOnSplit:!1,onCreate(){this.options.protocols.forEach(e=>{if(typeof e=="string"){WI(e);return}WI(e.scheme,e.optionalSlashes)})},onDestroy(){IPe()},inclusive(){return this.options.autolink},addOptions(){return{openOnClick:!0,linkOnPaste:!0,autolink:!0,protocols:[],HTMLAttributes:{target:"_blank",rel:"noopener noreferrer nofollow",class:null},validate:void 0}},addAttributes(){return{href:{default:null},target:{default:this.options.HTMLAttributes.target},rel:{default:this.options.HTMLAttributes.rel},class:{default:this.options.HTMLAttributes.class}}},parseHTML(){return[{tag:'a[href]:not([href *= "javascript:" i])'}]},renderHTML({HTMLAttributes:e}){return["a",Et(this.options.HTMLAttributes,e),0]},addCommands(){return{setLink:e=>({chain:t})=>t().setMark(this.name,e).setMeta("preventAutolink",!0).run(),toggleLink:e=>({chain:t})=>t().toggleMark(this.name,e,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run(),unsetLink:()=>({chain:e})=>e().unsetMark(this.name,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run()}},addPasteRules(){return[ka({find:e=>V9(e).filter(t=>this.options.validate?this.options.validate(t.value):!0).filter(t=>t.isLink).map(t=>({text:t.value,index:t.start,data:t})),type:this.type,getAttributes:(e,t)=>{var n,r;const o=(n=t.clipboardData)===null||n===void 0?void 0:n.getData("text/html"),i=/href="([^"]*)"/,s=o?.match(i);return s?{href:s[1]}:{href:(r=e.data)===null||r===void 0?void 0:r.href}}})]},addProseMirrorPlugins(){const e=[];return this.options.autolink&&e.push(DPe({type:this.type,validate:this.options.validate})),this.options.openOnClick&&e.push(RPe({type:this.type})),e}}),H9=zPe.extend({addKeyboardShortcuts:()=>({"Mod-k":()=>(window.dispatchEvent(new Event("edit-link")),!0)})}).configure({openOnClick:!1}),APe=/(?:^|\s)((?:==)((?:[^~=]+))(?:==))$/,BPe=/(?:^|\s)((?:==)((?:[^~=]+))(?:==))/g,W9=or.create({name:"highlight",addOptions(){return{multicolor:!1,HTMLAttributes:{}}},addAttributes(){return this.options.multicolor?{color:{default:null,parseHTML:e=>e.getAttribute("data-color")||e.style.backgroundColor,renderHTML:e=>e.color?{"data-color":e.color,style:`background-color: ${e.color}; color: inherit`}:{}}}:{}},parseHTML(){return[{tag:"mark"}]},renderHTML({HTMLAttributes:e}){return["mark",Et(this.options.HTMLAttributes,e),0]},addCommands(){return{setHighlight:e=>({commands:t})=>t.setMark(this.name,e),toggleHighlight:e=>({commands:t})=>t.toggleMark(this.name,e),unsetHighlight:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-h":()=>this.editor.commands.toggleHighlight()}},addInputRules(){return[Ll({find:APe,type:this.type})]},addPasteRules(){return[ka({find:BPe,type:this.type})]}}),FPe=/^\s*>\s$/,VPe=Gr.create({name:"blockquote",addOptions(){return{HTMLAttributes:{}}},content:"block+",group:"block",defining:!0,parseHTML(){return[{tag:"blockquote"}]},renderHTML({HTMLAttributes:e}){return["blockquote",Et(this.options.HTMLAttributes,e),0]},addCommands(){return{setBlockquote:()=>({commands:e})=>e.wrapIn(this.name),toggleBlockquote:()=>({commands:e})=>e.toggleWrap(this.name),unsetBlockquote:()=>({commands:e})=>e.lift(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-b":()=>this.editor.commands.toggleBlockquote()}},addInputRules(){return[xf({find:FPe,type:this.type})]}}),HPe=/(?:^|\s)((?:\*\*)((?:[^*]+))(?:\*\*))$/,WPe=/(?:^|\s)((?:\*\*)((?:[^*]+))(?:\*\*))/g,UPe=/(?:^|\s)((?:__)((?:[^__]+))(?:__))$/,ZPe=/(?:^|\s)((?:__)((?:[^__]+))(?:__))/g,GPe=or.create({name:"bold",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"strong"},{tag:"b",getAttrs:e=>e.style.fontWeight!=="normal"&&null},{style:"font-weight",getAttrs:e=>/^(bold(er)?|[5-9]\d{2,})$/.test(e)&&null}]},renderHTML({HTMLAttributes:e}){return["strong",Et(this.options.HTMLAttributes,e),0]},addCommands(){return{setBold:()=>({commands:e})=>e.setMark(this.name),toggleBold:()=>({commands:e})=>e.toggleMark(this.name),unsetBold:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-b":()=>this.editor.commands.toggleBold(),"Mod-B":()=>this.editor.commands.toggleBold()}},addInputRules(){return[Ll({find:HPe,type:this.type}),Ll({find:UPe,type:this.type})]},addPasteRules(){return[ka({find:WPe,type:this.type}),ka({find:ZPe,type:this.type})]}}),YPe=Gr.create({name:"listItem",addOptions(){return{HTMLAttributes:{},bulletListTypeName:"bulletList",orderedListTypeName:"orderedList"}},content:"paragraph block*",defining:!0,parseHTML(){return[{tag:"li"}]},renderHTML({HTMLAttributes:e}){return["li",Et(this.options.HTMLAttributes,e),0]},addKeyboardShortcuts(){return{Enter:()=>this.editor.commands.splitListItem(this.name),Tab:()=>this.editor.commands.sinkListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)}}}),UI=or.create({name:"textStyle",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"span",getAttrs:e=>e.hasAttribute("style")?{}:!1}]},renderHTML({HTMLAttributes:e}){return["span",Et(this.options.HTMLAttributes,e),0]},addCommands(){return{removeEmptyTextStyle:()=>({state:e,commands:t})=>{const n=Xf(e,this.type);return Object.entries(n).some(([,o])=>!!o)?!0:t.unsetMark(this.name)}}}}),ZI=/^\s*([-+*])\s$/,KPe=Gr.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:e}){return["ul",Et(this.options.HTMLAttributes,e),0]},addCommands(){return{toggleBulletList:()=>({commands:e,chain:t})=>this.options.keepAttributes?t().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(YPe.name,this.editor.getAttributes(UI.name)).run():e.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-8":()=>this.editor.commands.toggleBulletList()}},addInputRules(){let e=xf({find:ZI,type:this.type});return(this.options.keepMarks||this.options.keepAttributes)&&(e=xf({find:ZI,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:()=>this.editor.getAttributes(UI.name),editor:this.editor})),[e]}}),qPe=/(?:^|\s)((?:`)((?:[^`]+))(?:`))$/,JPe=/(?:^|\s)((?:`)((?:[^`]+))(?:`))/g,XPe=or.create({name:"code",addOptions(){return{HTMLAttributes:{}}},excludes:"_",code:!0,exitable:!0,parseHTML(){return[{tag:"code"}]},renderHTML({HTMLAttributes:e}){return["code",Et(this.options.HTMLAttributes,e),0]},addCommands(){return{setCode:()=>({commands:e})=>e.setMark(this.name),toggleCode:()=>({commands:e})=>e.toggleMark(this.name),unsetCode:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-e":()=>this.editor.commands.toggleCode()}},addInputRules(){return[Ll({find:qPe,type:this.type})]},addPasteRules(){return[ka({find:JPe,type:this.type})]}}),QPe=/^```([a-z]+)?[\s\n]$/,eOe=/^~~~([a-z]+)?[\s\n]$/,tOe=Gr.create({name:"codeBlock",addOptions(){return{languageClassPrefix:"language-",exitOnTripleEnter:!0,exitOnArrowDown:!0,HTMLAttributes:{}}},content:"text*",marks:"",group:"block",code:!0,defining:!0,addAttributes(){return{language:{default:null,parseHTML:e=>{var t;const{languageClassPrefix:n}=this.options,i=[...((t=e.firstElementChild)===null||t===void 0?void 0:t.classList)||[]].filter(s=>s.startsWith(n)).map(s=>s.replace(n,""))[0];return i||null},rendered:!1}}},parseHTML(){return[{tag:"pre",preserveWhitespace:"full"}]},renderHTML({node:e,HTMLAttributes:t}){return["pre",Et(this.options.HTMLAttributes,t),["code",{class:e.attrs.language?this.options.languageClassPrefix+e.attrs.language:null},0]]},addCommands(){return{setCodeBlock:e=>({commands:t})=>t.setNode(this.name,e),toggleCodeBlock:e=>({commands:t})=>t.toggleNode(this.name,"paragraph",e)}},addKeyboardShortcuts(){return{"Mod-Alt-c":()=>this.editor.commands.toggleCodeBlock(),Backspace:()=>{const{empty:e,$anchor:t}=this.editor.state.selection,n=t.pos===1;return!e||t.parent.type.name!==this.name?!1:n||!t.parent.textContent.length?this.editor.commands.clearNodes():!1},Enter:({editor:e})=>{if(!this.options.exitOnTripleEnter)return!1;const{state:t}=e,{selection:n}=t,{$from:r,empty:o}=n;if(!o||r.parent.type!==this.type)return!1;const i=r.parentOffset===r.parent.nodeSize-2,s=r.parent.textContent.endsWith(` -`);return!i||!s?!1:e.chain().command(({tr:a})=>(a.delete(r.pos-2,r.pos),!0)).exitCode().run()},ArrowDown:({editor:e})=>{if(!this.options.exitOnArrowDown)return!1;const{state:t}=e,{selection:n,doc:r}=t,{$from:o,empty:i}=n;if(!i||o.parent.type!==this.type||!(o.parentOffset===o.parent.nodeSize-2))return!1;const a=o.after();return a===void 0||r.nodeAt(a)?!1:e.commands.exitCode()}}},addInputRules(){return[Sx({find:eOe,type:this.type,getAttributes:e=>({language:e[1]})}),Sx({find:tOe,type:this.type,getAttributes:e=>({language:e[1]})})]},addProseMirrorPlugins(){return[new Zr({key:new Ai("codeBlockVSCodeHandler"),props:{handlePaste:(e,t)=>{if(!t.clipboardData||this.editor.isActive(this.type.name))return!1;const n=t.clipboardData.getData("text/plain"),r=t.clipboardData.getData("vscode-editor-data"),o=r?JSON.parse(r):void 0,i=o?.mode;if(!n||!i)return!1;const{tr:s}=e.state;return s.replaceSelectionWith(this.type.create({language:i})),s.setSelection(Ve.near(s.doc.resolve(Math.max(0,s.selection.from-2)))),s.insertText(n.replace(/\r\n?/g,` -`)),s.setMeta("paste",!0),e.dispatch(s),!0}}})]}}),rOe=Gr.create({name:"doc",topNode:!0,content:"block+"});function oOe(e={}){return new Zr({view(t){return new iOe(t,e)}})}class iOe{constructor(t,n){var r;this.editorView=t,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(o=>{let i=s=>{this[o](s)};return t.dom.addEventListener(o,i),{name:o,handler:i}})}destroy(){this.handlers.forEach(({name:t,handler:n})=>this.editorView.dom.removeEventListener(t,n))}update(t,n){this.cursorPos!=null&&n.doc!=t.state.doc&&(this.cursorPos>t.state.doc.content.size?this.setCursor(null):this.updateOverlay())}setCursor(t){t!=this.cursorPos&&(this.cursorPos=t,t==null?(this.element.parentNode.removeChild(this.element),this.element=null):this.updateOverlay())}updateOverlay(){let t=this.editorView.state.doc.resolve(this.cursorPos),n=!t.parent.inlineContent,r;if(n){let a=t.nodeBefore,c=t.nodeAfter;if(a||c){let u=this.editorView.nodeDOM(this.cursorPos-(a?a.nodeSize:0));if(u){let f=u.getBoundingClientRect(),p=a?f.bottom:f.top;a&&c&&(p=(p+this.editorView.nodeDOM(this.cursorPos).getBoundingClientRect().top)/2),r={left:f.left,right:f.right,top:p-this.width/2,bottom:p+this.width/2}}}}if(!r){let a=this.editorView.coordsAtPos(this.cursorPos);r={left:a.left-this.width/2,right:a.left+this.width/2,top:a.top,bottom:a.bottom}}let o=this.editorView.dom.offsetParent;this.element||(this.element=o.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 i,s;if(!o||o==document.body&&getComputedStyle(o).position=="static")i=-pageXOffset,s=-pageYOffset;else{let a=o.getBoundingClientRect();i=a.left-o.scrollLeft,s=a.top-o.scrollTop}this.element.style.left=r.left-i+"px",this.element.style.top=r.top-s+"px",this.element.style.width=r.right-r.left+"px",this.element.style.height=r.bottom-r.top+"px"}scheduleRemoval(t){clearTimeout(this.timeout),this.timeout=setTimeout(()=>this.setCursor(null),t)}dragover(t){if(!this.editorView.editable)return;let n=this.editorView.posAtCoords({left:t.clientX,top:t.clientY}),r=n&&n.inside>=0&&this.editorView.state.doc.nodeAt(n.inside),o=r&&r.type.spec.disableDropCursor,i=typeof o=="function"?o(this.editorView,n,t):o;if(n&&!i){let s=n.pos;if(this.editorView.dragging&&this.editorView.dragging.slice){let a=p7(this.editorView.state.doc,s,this.editorView.dragging.slice);a!=null&&(s=a)}this.setCursor(s),this.scheduleRemoval(5e3)}}dragend(){this.scheduleRemoval(20)}drop(){this.scheduleRemoval(20)}dragleave(t){(t.target==this.editorView.dom||!this.editorView.dom.contains(t.relatedTarget))&&this.setCursor(null)}}const sOe=br.create({name:"dropCursor",addOptions(){return{color:"currentColor",width:1,class:void 0}},addProseMirrorPlugins(){return[oOe(this.options)]}});class Kt extends Ze{constructor(t){super(t,t)}map(t,n){let r=t.resolve(n.map(this.head));return Kt.valid(r)?new Kt(r):Ze.near(r)}content(){return ye.empty}eq(t){return t instanceof Kt&&t.head==this.head}toJSON(){return{type:"gapcursor",pos:this.head}}static fromJSON(t,n){if(typeof n.pos!="number")throw new RangeError("Invalid input for GapCursor.fromJSON");return new Kt(t.resolve(n.pos))}getBookmark(){return new bO(this.anchor)}static valid(t){let n=t.parent;if(n.isTextblock||!aOe(t)||!lOe(t))return!1;let r=n.type.spec.allowGapCursor;if(r!=null)return r;let o=n.contentMatchAt(t.index()).defaultType;return o&&o.isTextblock}static findGapCursorFrom(t,n,r=!1){e:for(;;){if(!r&&Kt.valid(t))return t;let o=t.pos,i=null;for(let s=t.depth;;s--){let a=t.node(s);if(n>0?t.indexAfter(s)0){i=a.child(n>0?t.indexAfter(s):t.index(s)-1);break}else if(s==0)return null;o+=n;let c=t.doc.resolve(o);if(Kt.valid(c))return c}for(;;){let s=n>0?i.firstChild:i.lastChild;if(!s){if(i.isAtom&&!i.isText&&!Le.isSelectable(i)){t=t.doc.resolve(o+i.nodeSize*n),r=!1;continue e}break}i=s,o+=n;let a=t.doc.resolve(o);if(Kt.valid(a))return a}return null}}}Kt.prototype.visible=!1;Kt.findFrom=Kt.findGapCursorFrom;Ze.jsonID("gapcursor",Kt);class bO{constructor(t){this.pos=t}map(t){return new bO(t.map(this.pos))}resolve(t){let n=t.resolve(this.pos);return Kt.valid(n)?new Kt(n):Ze.near(n)}}function aOe(e){for(let t=e.depth;t>=0;t--){let n=e.index(t),r=e.node(t);if(n==0){if(r.type.spec.isolating)return!0;continue}for(let o=r.child(n-1);;o=o.lastChild){if(o.childCount==0&&!o.inlineContent||o.isAtom||o.type.spec.isolating)return!0;if(o.inlineContent)return!1}}return!0}function lOe(e){for(let t=e.depth;t>=0;t--){let n=e.indexAfter(t),r=e.node(t);if(n==r.childCount){if(r.type.spec.isolating)return!0;continue}for(let o=r.child(n);;o=o.firstChild){if(o.childCount==0&&!o.inlineContent||o.isAtom||o.type.spec.isolating)return!0;if(o.inlineContent)return!1}}return!0}function cOe(){return new Zr({props:{decorations:pOe,createSelectionBetween(e,t,n){return t.pos==n.pos&&Kt.valid(n)?new Kt(n):null},handleClick:dOe,handleKeyDown:uOe,handleDOMEvents:{beforeinput:fOe}}})}const uOe=X7({ArrowLeft:fh("horiz",-1),ArrowRight:fh("horiz",1),ArrowUp:fh("vert",-1),ArrowDown:fh("vert",1)});function fh(e,t){const n=e=="vert"?t>0?"down":"up":t>0?"right":"left";return function(r,o,i){let s=r.selection,a=t>0?s.$to:s.$from,c=s.empty;if(s instanceof Ve){if(!i.endOfTextblock(n)||a.depth==0)return!1;c=!1,a=r.doc.resolve(t>0?a.after():a.before())}let u=Kt.findGapCursorFrom(a,t,c);return u?(o&&o(r.tr.setSelection(new Kt(u))),!0):!1}}function dOe(e,t,n){if(!e||!e.editable)return!1;let r=e.state.doc.resolve(t);if(!Kt.valid(r))return!1;let o=e.posAtCoords({left:n.clientX,top:n.clientY});return o&&o.inside>-1&&Le.isSelectable(e.state.doc.nodeAt(o.inside))?!1:(e.dispatch(e.state.tr.setSelection(new Kt(r))),!0)}function fOe(e,t){if(t.inputType!="insertCompositionText"||!(e.state.selection instanceof Kt))return!1;let{$from:n}=e.state.selection,r=n.parent.contentMatchAt(n.index()).findWrapping(e.state.schema.nodes.text);if(!r)return!1;let o=se.empty;for(let s=r.length-1;s>=0;s--)o=se.from(r[s].createAndFill(null,o));let i=e.state.tr.replace(n.pos,n.pos,new ye(o,0,0));return i.setSelection(Ve.near(i.doc.resolve(n.pos+1))),e.dispatch(i),!1}function pOe(e){if(!(e.selection instanceof Kt))return null;let t=document.createElement("div");return t.className="ProseMirror-gapcursor",gn.create(e.doc,[jo.widget(e.selection.head,t,{key:"gapcursor"})])}const hOe=br.create({name:"gapCursor",addProseMirrorPlugins(){return[cOe()]},extendNodeSchema(e){var t;const n={name:e.name,options:e.options,storage:e.storage};return{allowGapCursor:(t=Ue(Ce(e,"allowGapCursor",n)))!==null&&t!==void 0?t:null}}}),mOe=Gr.create({name:"hardBreak",addOptions(){return{keepMarks:!0,HTMLAttributes:{}}},inline:!0,group:"inline",selectable:!1,parseHTML(){return[{tag:"br"}]},renderHTML({HTMLAttributes:e}){return["br",Et(this.options.HTMLAttributes,e)]},renderText(){return` -`},addCommands(){return{setHardBreak:()=>({commands:e,chain:t,state:n,editor:r})=>e.first([()=>e.exitCode(),()=>e.command(()=>{const{selection:o,storedMarks:i}=n;if(o.$from.parent.type.spec.isolating)return!1;const{keepMarks:s}=this.options,{splittableMarks:a}=r.extensionManager,c=i||o.$to.parentOffset&&o.$from.marks();return t().insertContent({type:this.name}).command(({tr:u,dispatch:f})=>{if(f&&c&&s){const p=c.filter(g=>a.includes(g.type.name));u.ensureMarks(p)}return!0}).run()})])}},addKeyboardShortcuts(){return{"Mod-Enter":()=>this.editor.commands.setHardBreak(),"Shift-Enter":()=>this.editor.commands.setHardBreak()}}}),gOe=Gr.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(e=>({tag:`h${e}`,attrs:{level:e}}))},renderHTML({node:e,HTMLAttributes:t}){return[`h${this.options.levels.includes(e.attrs.level)?e.attrs.level:this.options.levels[0]}`,Et(this.options.HTMLAttributes,t),0]},addCommands(){return{setHeading:e=>({commands:t})=>this.options.levels.includes(e.level)?t.setNode(this.name,e):!1,toggleHeading:e=>({commands:t})=>this.options.levels.includes(e.level)?t.toggleNode(this.name,"paragraph",e):!1}},addKeyboardShortcuts(){return this.options.levels.reduce((e,t)=>({...e,[`Mod-Alt-${t}`]:()=>this.editor.commands.toggleHeading({level:t})}),{})},addInputRules(){return this.options.levels.map(e=>Sx({find:new RegExp(`^(#{1,${e}})\\s$`),type:this.type,getAttributes:{level:e}}))}});var yy=200,$n=function(){};$n.prototype.append=function(t){return t.length?(t=$n.from(t),!this.length&&t||t.length=n?$n.empty:this.sliceInner(Math.max(0,t),Math.min(this.length,n))};$n.prototype.get=function(t){if(!(t<0||t>=this.length))return this.getInner(t)};$n.prototype.forEach=function(t,n,r){n===void 0&&(n=0),r===void 0&&(r=this.length),n<=r?this.forEachInner(t,n,r,0):this.forEachInvertedInner(t,n,r,0)};$n.prototype.map=function(t,n,r){n===void 0&&(n=0),r===void 0&&(r=this.length);var o=[];return this.forEach(function(i,s){return o.push(t(i,s))},n,r),o};$n.from=function(t){return t instanceof $n?t:t&&t.length?new U9(t):$n.empty};var U9=function(e){function t(r){e.call(this),this.values=r}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var n={length:{configurable:!0},depth:{configurable:!0}};return t.prototype.flatten=function(){return this.values},t.prototype.sliceInner=function(o,i){return o==0&&i==this.length?this:new t(this.values.slice(o,i))},t.prototype.getInner=function(o){return this.values[o]},t.prototype.forEachInner=function(o,i,s,a){for(var c=i;c=s;c--)if(o(this.values[c],a+c)===!1)return!1},t.prototype.leafAppend=function(o){if(this.length+o.length<=yy)return new t(this.values.concat(o.flatten()))},t.prototype.leafPrepend=function(o){if(this.length+o.length<=yy)return new t(o.flatten().concat(this.values))},n.length.get=function(){return this.values.length},n.depth.get=function(){return 0},Object.defineProperties(t.prototype,n),t}($n);$n.empty=new U9([]);var vOe=function(e){function t(n,r){e.call(this),this.left=n,this.right=r,this.length=n.length+r.length,this.depth=Math.max(n.depth,r.depth)+1}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.flatten=function(){return this.left.flatten().concat(this.right.flatten())},t.prototype.getInner=function(r){return ra&&this.right.forEachInner(r,Math.max(o-a,0),Math.min(this.length,i)-a,s+a)===!1)return!1},t.prototype.forEachInvertedInner=function(r,o,i,s){var a=this.left.length;if(o>a&&this.right.forEachInvertedInner(r,o-a,Math.max(i,a)-a,s+a)===!1||i=i?this.right.slice(r-i,o-i):this.left.slice(r,i).append(this.right.slice(0,o-i))},t.prototype.leafAppend=function(r){var o=this.right.leafAppend(r);if(o)return new t(this.left,o)},t.prototype.leafPrepend=function(r){var o=this.left.leafPrepend(r);if(o)return new t(o,this.right)},t.prototype.appendInner=function(r){return this.left.depth>=Math.max(this.right.depth,r.depth)+1?new t(this.left,new t(this.right,r)):new t(this,r)},t}($n);const yOe=500;class qo{constructor(t,n){this.items=t,this.eventCount=n}popEvent(t,n){if(this.eventCount==0)return null;let r=this.items.length;for(;;r--)if(this.items.get(r-1).selection){--r;break}let o,i;n&&(o=this.remapping(r,this.items.length),i=o.maps.length);let s=t.tr,a,c,u=[],f=[];return this.items.forEach((p,g)=>{if(!p.step){o||(o=this.remapping(r,g+1),i=o.maps.length),i--,f.push(p);return}if(o){f.push(new wi(p.map));let v=p.step.map(o.slice(i)),y;v&&s.maybeStep(v).doc&&(y=s.mapping.maps[s.mapping.maps.length-1],u.push(new wi(y,void 0,void 0,u.length+f.length))),i--,y&&o.appendMap(y,i)}else s.maybeStep(p.step);if(p.selection)return a=o?p.selection.map(o.slice(i)):p.selection,c=new qo(this.items.slice(0,r).append(f.reverse().concat(u)),this.eventCount-1),!1},this.items.length,0),{remaining:c,transform:s,selection:a}}addTransform(t,n,r,o){let i=[],s=this.eventCount,a=this.items,c=!o&&a.length?a.get(a.length-1):null;for(let f=0;fwOe&&(a=_Oe(a,u),s-=u),new qo(a.append(i),s)}remapping(t,n){let r=new Gc;return this.items.forEach((o,i)=>{let s=o.mirrorOffset!=null&&i-o.mirrorOffset>=t?r.maps.length-o.mirrorOffset:void 0;r.appendMap(o.map,s)},t,n),r}addMaps(t){return this.eventCount==0?this:new qo(this.items.append(t.map(n=>new wi(n))),this.eventCount)}rebased(t,n){if(!this.eventCount)return this;let r=[],o=Math.max(0,this.items.length-n),i=t.mapping,s=t.steps.length,a=this.eventCount;this.items.forEach(g=>{g.selection&&a--},o);let c=n;this.items.forEach(g=>{let v=i.getMirror(--c);if(v==null)return;s=Math.min(s,v);let y=i.maps[v];if(g.step){let w=t.steps[v].invert(t.docs[v]),P=g.selection&&g.selection.map(i.slice(c+1,v));P&&a++,r.push(new wi(y,w,P))}else r.push(new wi(y))},o);let u=[];for(let g=n;gyOe&&(p=p.compress(this.items.length-r.length)),p}emptyItemCount(){let t=0;return this.items.forEach(n=>{n.step||t++}),t}compress(t=this.items.length){let n=this.remapping(0,t),r=n.maps.length,o=[],i=0;return this.items.forEach((s,a)=>{if(a>=t)o.push(s),s.selection&&i++;else if(s.step){let c=s.step.map(n.slice(r)),u=c&&c.getMap();if(r--,u&&n.appendMap(u,r),c){let f=s.selection&&s.selection.map(n.slice(r));f&&i++;let p=new wi(u.invert(),c,f),g,v=o.length-1;(g=o.length&&o[v].merge(p))?o[v]=g:o.push(p)}}else s.map&&r--},this.items.length,0),new qo($n.from(o.reverse()),i)}}qo.empty=new qo($n.empty,0);function _Oe(e,t){let n;return e.forEach((r,o)=>{if(r.selection&&t--==0)return n=o,!1}),e.slice(n)}class wi{constructor(t,n,r,o){this.map=t,this.step=n,this.selection=r,this.mirrorOffset=o}merge(t){if(this.step&&t.step&&!t.selection){let n=t.step.merge(this.step);if(n)return new wi(n.getMap().invert(),n,this.selection)}}}class Us{constructor(t,n,r,o,i){this.done=t,this.undone=n,this.prevRanges=r,this.prevTime=o,this.prevComposition=i}}const wOe=20;function bOe(e,t,n,r){let o=n.getMeta(wa),i;if(o)return o.historyState;n.getMeta(SOe)&&(e=new Us(e.done,e.undone,null,0,-1));let s=n.getMeta("appendedTransaction");if(n.steps.length==0)return e;if(s&&s.getMeta(wa))return s.getMeta(wa).redo?new Us(e.done.addTransform(n,void 0,r,tm(t)),e.undone,GI(n.mapping.maps[n.steps.length-1]),e.prevTime,e.prevComposition):new Us(e.done,e.undone.addTransform(n,void 0,r,tm(t)),null,e.prevTime,e.prevComposition);if(n.getMeta("addToHistory")!==!1&&!(s&&s.getMeta("addToHistory")===!1)){let a=n.getMeta("composition"),c=e.prevTime==0||!s&&e.prevComposition!=a&&(e.prevTime<(n.time||0)-r.newGroupDelay||!xOe(n,e.prevRanges)),u=s?Sw(e.prevRanges,n.mapping):GI(n.mapping.maps[n.steps.length-1]);return new Us(e.done.addTransform(n,c?t.selection.getBookmark():void 0,r,tm(t)),qo.empty,u,n.time,a??e.prevComposition)}else return(i=n.getMeta("rebased"))?new Us(e.done.rebased(n,i),e.undone.rebased(n,i),Sw(e.prevRanges,n.mapping),e.prevTime,e.prevComposition):new Us(e.done.addMaps(n.mapping.maps),e.undone.addMaps(n.mapping.maps),Sw(e.prevRanges,n.mapping),e.prevTime,e.prevComposition)}function xOe(e,t){if(!t)return!1;if(!e.docChanged)return!0;let n=!1;return e.mapping.maps[0].forEach((r,o)=>{for(let i=0;i=t[i]&&(n=!0)}),n}function GI(e){let t=[];return e.forEach((n,r,o,i)=>t.push(o,i)),t}function Sw(e,t){if(!e)return null;let n=[];for(let r=0;r{let n=wa.getState(e);return!n||n.done.eventCount==0?!1:(t&&Z9(n,e,t,!1),!0)},Y9=(e,t)=>{let n=wa.getState(e);return!n||n.undone.eventCount==0?!1:(t&&Z9(n,e,t,!0),!0)},OOe=br.create({name:"history",addOptions(){return{depth:100,newGroupDelay:500}},addCommands(){return{undo:()=>({state:e,dispatch:t})=>G9(e,t),redo:()=>({state:e,dispatch:t})=>Y9(e,t)}},addProseMirrorPlugins(){return[POe(this.options)]},addKeyboardShortcuts(){return{"Mod-z":()=>this.editor.commands.undo(),"Mod-Z":()=>this.editor.commands.undo(),"Mod-y":()=>this.editor.commands.redo(),"Mod-Y":()=>this.editor.commands.redo(),"Shift-Mod-z":()=>this.editor.commands.redo(),"Shift-Mod-Z":()=>this.editor.commands.redo(),"Mod-я":()=>this.editor.commands.undo(),"Shift-Mod-я":()=>this.editor.commands.redo()}}}),COe=Gr.create({name:"horizontalRule",addOptions(){return{HTMLAttributes:{}}},group:"block",parseHTML(){return[{tag:"hr"}]},renderHTML({HTMLAttributes:e}){return["hr",Et(this.options.HTMLAttributes,e)]},addCommands(){return{setHorizontalRule:()=>({chain:e,state:t})=>{const{$to:n}=t.selection,r=e();return n.parentOffset===0?r.insertContentAt(Math.max(n.pos-2,0),{type:this.name}):r.insertContent({type:this.name}),r.command(({tr:o,dispatch:i})=>{var s;if(i){const{$to:a}=o.selection,c=a.end();if(a.nodeAfter)a.nodeAfter.isTextblock?o.setSelection(Ve.create(o.doc,a.pos+1)):a.nodeAfter.isBlock?o.setSelection(Le.create(o.doc,a.pos)):o.setSelection(Ve.create(o.doc,a.pos));else{const u=(s=a.parent.type.contentMatch.defaultType)===null||s===void 0?void 0:s.create();u&&(o.insert(c,u),o.setSelection(Ve.create(o.doc,c+1)))}o.scrollIntoView()}return!0}).run()}}},addInputRules(){return[f9({find:/^(?:---|—-|___\s|\*\*\*\s)$/,type:this.type})]}}),kOe=/(?:^|\s)((?:\*)((?:[^*]+))(?:\*))$/,EOe=/(?:^|\s)((?:\*)((?:[^*]+))(?:\*))/g,$Oe=/(?:^|\s)((?:_)((?:[^_]+))(?:_))$/,MOe=/(?:^|\s)((?:_)((?:[^_]+))(?:_))/g,NOe=or.create({name:"italic",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"em"},{tag:"i",getAttrs:e=>e.style.fontStyle!=="normal"&&null},{style:"font-style=italic"}]},renderHTML({HTMLAttributes:e}){return["em",Et(this.options.HTMLAttributes,e),0]},addCommands(){return{setItalic:()=>({commands:e})=>e.setMark(this.name),toggleItalic:()=>({commands:e})=>e.toggleMark(this.name),unsetItalic:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-i":()=>this.editor.commands.toggleItalic(),"Mod-I":()=>this.editor.commands.toggleItalic()}},addInputRules(){return[Ll({find:kOe,type:this.type}),Ll({find:$Oe,type:this.type})]},addPasteRules(){return[ka({find:EOe,type:this.type}),ka({find:MOe,type:this.type})]}}),TOe=Gr.create({name:"listItem",addOptions(){return{HTMLAttributes:{},bulletListTypeName:"bulletList",orderedListTypeName:"orderedList"}},content:"paragraph block*",defining:!0,parseHTML(){return[{tag:"li"}]},renderHTML({HTMLAttributes:e}){return["li",Et(this.options.HTMLAttributes,e),0]},addKeyboardShortcuts(){return{Enter:()=>this.editor.commands.splitListItem(this.name),Tab:()=>this.editor.commands.sinkListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)}}}),IOe=Gr.create({name:"listItem",addOptions(){return{HTMLAttributes:{},bulletListTypeName:"bulletList",orderedListTypeName:"orderedList"}},content:"paragraph block*",defining:!0,parseHTML(){return[{tag:"li"}]},renderHTML({HTMLAttributes:e}){return["li",Et(this.options.HTMLAttributes,e),0]},addKeyboardShortcuts(){return{Enter:()=>this.editor.commands.splitListItem(this.name),Tab:()=>this.editor.commands.sinkListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)}}}),KI=or.create({name:"textStyle",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"span",getAttrs:e=>e.hasAttribute("style")?{}:!1}]},renderHTML({HTMLAttributes:e}){return["span",Et(this.options.HTMLAttributes,e),0]},addCommands(){return{removeEmptyTextStyle:()=>({state:e,commands:t})=>{const n=Xf(e,this.type);return Object.entries(n).some(([,o])=>!!o)?!0:t.unsetMark(this.name)}}}}),qI=/^(\d+)\.\s$/,jOe=Gr.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:e=>e.hasAttribute("start")?parseInt(e.getAttribute("start")||"",10):1}}},parseHTML(){return[{tag:"ol"}]},renderHTML({HTMLAttributes:e}){const{start:t,...n}=e;return t===1?["ol",Et(this.options.HTMLAttributes,n),0]:["ol",Et(this.options.HTMLAttributes,e),0]},addCommands(){return{toggleOrderedList:()=>({commands:e,chain:t})=>this.options.keepAttributes?t().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(IOe.name,this.editor.getAttributes(KI.name)).run():e.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-7":()=>this.editor.commands.toggleOrderedList()}},addInputRules(){let e=xf({find:qI,type:this.type,getAttributes:t=>({start:+t[1]}),joinPredicate:(t,n)=>n.childCount+n.attrs.start===+t[1]});return(this.options.keepMarks||this.options.keepAttributes)&&(e=xf({find:qI,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:t=>({start:+t[1],...this.editor.getAttributes(KI.name)}),joinPredicate:(t,n)=>n.childCount+n.attrs.start===+t[1],editor:this.editor})),[e]}}),LOe=Gr.create({name:"paragraph",priority:1e3,addOptions(){return{HTMLAttributes:{}}},group:"block",content:"inline*",parseHTML(){return[{tag:"p"}]},renderHTML({HTMLAttributes:e}){return["p",Et(this.options.HTMLAttributes,e),0]},addCommands(){return{setParagraph:()=>({commands:e})=>e.setNode(this.name)}},addKeyboardShortcuts(){return{"Mod-Alt-0":()=>this.editor.commands.setParagraph()}}}),DOe=/(?:^|\s)((?:~~)((?:[^~]+))(?:~~))$/,ROe=/(?:^|\s)((?:~~)((?:[^~]+))(?:~~))/g,zOe=or.create({name:"strike",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"s"},{tag:"del"},{tag:"strike"},{style:"text-decoration",consuming:!1,getAttrs:e=>e.includes("line-through")?{}:!1}]},renderHTML({HTMLAttributes:e}){return["s",Et(this.options.HTMLAttributes,e),0]},addCommands(){return{setStrike:()=>({commands:e})=>e.setMark(this.name),toggleStrike:()=>({commands:e})=>e.toggleMark(this.name),unsetStrike:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){const e={};return uO()?e["Mod-Shift-s"]=()=>this.editor.commands.toggleStrike():e["Ctrl-Shift-s"]=()=>this.editor.commands.toggleStrike(),e},addInputRules(){return[Ll({find:DOe,type:this.type})]},addPasteRules(){return[ka({find:ROe,type:this.type})]}}),AOe=Gr.create({name:"text",group:"inline"}),K9=br.create({name:"starterKit",addExtensions(){var e,t,n,r,o,i,s,a,c,u,f,p,g,v,y,w,P,x;const S=[];return this.options.blockquote!==!1&&S.push(HPe.configure((e=this.options)===null||e===void 0?void 0:e.blockquote)),this.options.bold!==!1&&S.push(YPe.configure((t=this.options)===null||t===void 0?void 0:t.bold)),this.options.bulletList!==!1&&S.push(qPe.configure((n=this.options)===null||n===void 0?void 0:n.bulletList)),this.options.code!==!1&&S.push(QPe.configure((r=this.options)===null||r===void 0?void 0:r.code)),this.options.codeBlock!==!1&&S.push(nOe.configure((o=this.options)===null||o===void 0?void 0:o.codeBlock)),this.options.document!==!1&&S.push(rOe.configure((i=this.options)===null||i===void 0?void 0:i.document)),this.options.dropcursor!==!1&&S.push(sOe.configure((s=this.options)===null||s===void 0?void 0:s.dropcursor)),this.options.gapcursor!==!1&&S.push(hOe.configure((a=this.options)===null||a===void 0?void 0:a.gapcursor)),this.options.hardBreak!==!1&&S.push(mOe.configure((c=this.options)===null||c===void 0?void 0:c.hardBreak)),this.options.heading!==!1&&S.push(gOe.configure((u=this.options)===null||u===void 0?void 0:u.heading)),this.options.history!==!1&&S.push(OOe.configure((f=this.options)===null||f===void 0?void 0:f.history)),this.options.horizontalRule!==!1&&S.push(COe.configure((p=this.options)===null||p===void 0?void 0:p.horizontalRule)),this.options.italic!==!1&&S.push(NOe.configure((g=this.options)===null||g===void 0?void 0:g.italic)),this.options.listItem!==!1&&S.push(TOe.configure((v=this.options)===null||v===void 0?void 0:v.listItem)),this.options.orderedList!==!1&&S.push(jOe.configure((y=this.options)===null||y===void 0?void 0:y.orderedList)),this.options.paragraph!==!1&&S.push(LOe.configure((w=this.options)===null||w===void 0?void 0:w.paragraph)),this.options.strike!==!1&&S.push(zOe.configure((P=this.options)===null||P===void 0?void 0:P.strike)),this.options.text!==!1&&S.push(AOe.configure((x=this.options)===null||x===void 0?void 0:x.text)),S}}),q9=or.create({name:"underline",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"u"},{style:"text-decoration",consuming:!1,getAttrs:e=>e.includes("underline")?{}:!1}]},renderHTML({HTMLAttributes:e}){return["u",Et(this.options.HTMLAttributes,e),0]},addCommands(){return{setUnderline:()=>({commands:e})=>e.setMark(this.name),toggleUnderline:()=>({commands:e})=>e.toggleMark(this.name),unsetUnderline:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-u":()=>this.editor.commands.toggleUnderline(),"Mod-U":()=>this.editor.commands.toggleUnderline()}}}),J9=br.create({name:"textAlign",addOptions(){return{types:[],alignments:["left","center","right","justify"],defaultAlignment:"left"}},addGlobalAttributes(){return[{types:this.options.types,attributes:{textAlign:{default:this.options.defaultAlignment,parseHTML:e=>e.style.textAlign||this.options.defaultAlignment,renderHTML:e=>e.textAlign===this.options.defaultAlignment?{}:{style:`text-align: ${e.textAlign}`}}}}]},addCommands(){return{setTextAlign:e=>({commands:t})=>this.options.alignments.includes(e)?this.options.types.every(n=>t.updateAttributes(n,{textAlign:e})):!1,unsetTextAlign:()=>({commands:e})=>this.options.types.every(t=>e.resetAttributes(t,"textAlign"))}},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")}}}),X9=or.create({name:"superscript",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"sup"},{style:"vertical-align",getAttrs(e){return e!=="super"?!1:null}}]},renderHTML({HTMLAttributes:e}){return["sup",Et(this.options.HTMLAttributes,e),0]},addCommands(){return{setSuperscript:()=>({commands:e})=>e.setMark(this.name),toggleSuperscript:()=>({commands:e})=>e.toggleMark(this.name),unsetSuperscript:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-.":()=>this.editor.commands.toggleSuperscript()}}}),Q9=or.create({name:"subscript",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"sub"},{style:"vertical-align",getAttrs(e){return e!=="sub"?!1:null}}]},renderHTML({HTMLAttributes:e}){return["sub",Et(this.options.HTMLAttributes,e),0]},addCommands(){return{setSubscript:()=>({commands:e})=>e.setMark(this.name),toggleSubscript:()=>({commands:e})=>e.toggleMark(this.name),unsetSubscript:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-,":()=>this.editor.commands.toggleSubscript()}}}),BOe=/(?:^|\s)(!\[(.+|:?)]\((\S+)(?:(?:\s+)["'](\S+)["'])?\))$/,eB=Gr.create({name:"image",addOptions(){return{inline:!1,allowBase64:!1,HTMLAttributes:{}}},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}}},parseHTML(){return[{tag:this.options.allowBase64?"img[src]":'img[src]:not([src^="data:"])'}]},renderHTML({HTMLAttributes:e}){return["img",Et(this.options.HTMLAttributes,e)]},addCommands(){return{setImage:e=>({commands:t})=>t.insertContent({type:this.name,attrs:e})}},addInputRules(){return[f9({find:BOe,type:this.type,getAttributes:e=>{const[,,t,n,r]=e;return{src:n,alt:t,title:r}}})]}}),tB=or.create({name:"textStyle",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"span",getAttrs:e=>e.hasAttribute("style")?{}:!1}]},renderHTML({HTMLAttributes:e}){return["span",Et(this.options.HTMLAttributes,e),0]},addCommands(){return{removeEmptyTextStyle:()=>({state:e,commands:t})=>{const n=Xf(e,this.type);return Object.entries(n).some(([,o])=>!!o)?!0:t.unsetMark(this.name)}}}}),nB=br.create({name:"color",addOptions(){return{types:["textStyle"]}},addGlobalAttributes(){return[{types:this.options.types,attributes:{color:{default:null,parseHTML:e=>{var t;return(t=e.style.color)===null||t===void 0?void 0:t.replace(/['"]+/g,"")},renderHTML:e=>e.color?{style:`color: ${e.color}`}:{}}}}]},addCommands(){return{setColor:e=>({chain:t})=>t().setMark("textStyle",{color:e}).run(),unsetColor:()=>({chain:e})=>e().setMark("textStyle",{color:null}).removeEmptyTextStyle().run()}}}),FOe=ue({saveButton:{position:"absolute",top:5,right:5,zIndex:99}}),ep=({content:e="

",onChange:t,styles:n,contentAreaStyle:r,onSave:o})=>{const{classes:i}=FOe(),[s,a]=_.useState(!1),c=p9({content:e,extensions:[K9,q9,H9,X9,Q9,W9,nB,tB,eB,J9.configure({types:["heading","paragraph"]})]});return _.useEffect(()=>{c?.commands.setContent(e,!0)},[e]),_.useEffect(()=>{if(t&&t(c?.getHTML()),!o)return;const u=setTimeout(()=>{c?.getHTML()!==e?a(!0):a(!1)},500);return()=>clearTimeout(u)},[c?.getHTML()]),h.jsx(h.Fragment,{children:h.jsxs(Ee,{editor:c,styles:n,style:{borderRadius:2},children:[h.jsxs(Ee.Toolbar,{sticky:!0,children:[h.jsxs(Ee.ControlsGroup,{children:[h.jsx(Ee.Bold,{}),h.jsx(Ee.Italic,{}),h.jsx(Ee.Underline,{}),h.jsx(Ee.Strikethrough,{}),h.jsx(Ee.ClearFormatting,{}),h.jsx(Ee.Highlight,{})]}),h.jsxs(Ee.ControlsGroup,{children:[h.jsx(Ee.Hr,{}),h.jsx(Ee.BulletList,{}),h.jsx(Ee.OrderedList,{})]}),h.jsxs(Ee.ControlsGroup,{children:[h.jsx(Ee.Link,{}),h.jsx(Ee.Unlink,{})]}),h.jsxs(Ee.ControlsGroup,{children:[h.jsx(Ee.AlignLeft,{}),h.jsx(Ee.AlignCenter,{}),h.jsx(Ee.AlignJustify,{}),h.jsx(Ee.AlignRight,{})]}),h.jsx(Ee.ControlsGroup,{children:h.jsx(Ee.ColorPicker,{colors:["#25262b","#868e96","#fa5252","#e64980","#be4bdb","#7950f2","#4c6ef5","#228be6","#15aabf","#12b886","#40c057","#82c91e","#fab005","#fd7e14"]})})]}),c&&h.jsxs(St,{style:r,children:[h.jsx(Os,{mounted:!!(s&&o),transition:"slide-down",children:u=>h.jsx(Qe,{style:u,className:i.saveButton,color:"dark",variant:"default",size:26,onClick:()=>{a(!1),o&&o(c?.getHTML())},children:h.jsx(P8,{size:20})})}),h.jsx(Ee.Content,{})]})]})})},VOe=[{contents:"Dsadaasd Hello there buddy, this is a message from the server.",id:1,playerId:1,position:[0,0,0],callsign:132,firstname:"Fdsadas",lastname:"DSasd",citizenid:"dsadas",image:"https://cdn.vectorstock.com/i/preview-1x/97/68/account-avatar-dark-mode-glyph-ui-icon-vector-44429768.jpg",createdAt:Date.now()-3e5},{contents:"Dsadaasd Hello there buddy, this is a message from the server.",id:2,playerId:1,position:[0,0,0],callsign:132,firstname:"Fdsadas",lastname:"DSasd",citizenid:"dsadas",image:"https://cdn.vectorstock.com/i/preview-1x/97/68/account-avatar-dark-mode-glyph-ui-icon-vector-44429768.jpg",createdAt:Date.now()-9e5},{contents:"Dsadaasd Hello there buddy, this is a message from the server.",id:3,playerId:1,position:[0,0,0],callsign:132,firstname:"Fdsadas",lastname:"DSasd",citizenid:"dsadas",image:"https://cdn.vectorstock.com/i/preview-1x/97/68/account-avatar-dark-mode-glyph-ui-icon-vector-44429768.jpg",createdAt:Date.now()-12e20},{contents:"Dsadaasd Hello there buddy",id:4,playerId:1,position:[0,0,0],callsign:132,firstname:"fad",lastname:"DSasd",citizenid:"dsadas",image:"https://cdn.vectorstock.com/i/preview-1x/97/68/account-avatar-dark-mode-glyph-ui-icon-vector-44429768.jpg",createdAt:Date.now()},{contents:"Dsadaasd Hello there buddy",id:5,playerId:1,position:[0,0,0],callsign:132,firstname:"fad",lastname:"DSasd",citizenid:"dsadas",image:"https://cdn.vectorstock.com/i/preview-1x/97/68/account-avatar-dark-mode-glyph-ui-icon-vector-44429768.jpg",createdAt:Date.now()}],xO=dn(e=>({announcements:[],fetchAnnouncements:async()=>{if(at())e({announcements:[...VOe]});else{const t=await me("getAnnouncements");e({announcements:[...t.announcements]})}}})),HOe=()=>{const{fetchAnnouncements:e}=xO(s=>({fetchAnnouncements:s.fetchAnnouncements})),[t,n]=_.useState(!1),[r,o]=_.useState(""),i=async()=>{if(!at()){if(n(!0),!await me("createAnnouncement",{contents:r}))return;e(),n(!1)}ke.closeAll()};return h.jsxs(Je,{h:400,style:{flex:"0 0 43.5rem"},children:[h.jsx(ep,{content:"",onChange:s=>o(s||""),styles:{content:{backgroundColor:"#1A1B1E"},toolbar:{backgroundColor:"#2C2E33"},controlsGroup:{pointerEvents:"auto",backgroundColor:"#282828"}},contentAreaStyle:{height:270,width:406,padding:0}}),h.jsx(st,{variant:"light",color:"gray",fullWidth:!0,onClick:()=>i(),loading:t,children:D.create})]})},WOe=e=>{const t=p9({extensions:[K9,q9,H9,X9,Q9,W9,nB,tB,eB,J9],content:e.contents,editable:!1});return h.jsx(Je,{children:h.jsx(Ee,{editor:t,children:h.jsx(Ee.Content,{})})})};pe.extend(B8);const rB=({announcement:e})=>{const t=`

${e.contents}

`;function n(r){return r.replace(/<\/?[^>]+(>|$)/g,"")}return h.jsxs("div",{className:"announcement-list-card",onClick:()=>{ke.open({title:h.jsxs(W,{style:{fontSize:16,color:"white"},weight:500,children:[`${e.firstname} ${e.lastname}`," | ",pe(e.createdAt).fromNow()]}),centered:!0,children:h.jsx(WOe,{contents:t})})},children:[h.jsx(nt,{position:"apart",children:h.jsxs(nt,{children:[h.jsx(CP,{color:"blue",src:e.image}),h.jsxs(Je,{spacing:0,children:[h.jsx(W,{fw:500,c:"white",children:`${e.firstname} ${e.lastname}`}),h.jsx(W,{size:"xs",c:"dark.2",children:pe(e.createdAt).fromNow()})]})]})}),h.jsx(W,{c:"gray.4",size:"sm",lineClamp:1,children:n(t)})]})},UOe=()=>{const{announcements:e}=xO(n=>({announcements:n.announcements})),t=[...e].sort((n,r)=>Number(new Date(r.createdAt))-Number(new Date(n.createdAt)));return h.jsx(St,{h:600,children:h.jsx("div",{className:"announcement-card-content",children:t.length>0?t.map(n=>h.jsx(rB,{announcement:n},n.id)):h.jsx(W,{color:"dimmed",size:"xs",children:D.no_announcements_found})})})},ZOe=()=>{const{announcements:e,fetchAnnouncements:t}=xO(a=>({announcements:a.announcements,fetchAnnouncements:a.fetchAnnouncements})),[n,r]=_.useState(!1),{role:o}=bo(a=>a.personalData);function i(a){return!(a==="Chief"||a==="Assistant Chief"||a==="Captain"||a==="Lieutenant"||a==="Sergeant")}const s=[...e].sort((a,c)=>Number(new Date(c.createdAt))-Number(new Date(a.createdAt))).slice(0,3);return _.useEffect(()=>{r(!0),(async()=>await t())().then(()=>{r(!1)})},[]),h.jsxs("div",{className:"card-background",children:[h.jsxs("div",{className:"card-title",children:[h.jsx(W,{style:{fontSize:17,color:"white"},weight:500,children:D.announcements}),h.jsxs("div",{className:"card-title-icons",children:[h.jsx(At,{label:D.create_announcement,withArrow:!0,color:"gray",position:"bottom",children:h.jsx(Qe,{variant:"light",color:"dark",disabled:i(o),onClick:()=>{ke.open({title:h.jsx(W,{style:{fontSize:16,color:"white"},weight:500,children:D.create_announcement}),centered:!0,children:h.jsx(HOe,{})})},children:h.jsx(Eu,{size:16,color:"white"})})}),h.jsx(At,{label:D.view_all,withArrow:!0,color:"gray",position:"bottom",children:h.jsx(Qe,{variant:"light",color:"dark",onClick:()=>{ke.open({title:h.jsx(W,{style:{fontSize:16,color:"white"},weight:500,children:D.all_announcements}),centered:!0,children:h.jsx(UOe,{})})},children:h.jsx($he,{size:16,color:"white"})})}),h.jsx(Vhe,{size:M(25),color:"white"})]})]}),h.jsx(Ye,{mt:5,mb:5}),h.jsx("div",{className:"announcement-card-content",children:n?h.jsx(Pr,{h:"100%",children:h.jsx(en,{})}):s.length>0?s.map(a=>h.jsx(rB,{announcement:a},a.id)):h.jsx(W,{color:"dimmed",size:"xs",children:D.no_announcements_found})})]})},GOe=[{citizenid:"AF30442",firstname:"Billy",lastname:"Bob",incidentid:3,expiresAt:Date.now(),image:"https://i.imgur.com/dqopYB9b.jpg"},{citizenid:"AF30442",firstname:"Billy",lastname:"Bob",incidentid:3,expiresAt:Date.now(),image:"https://i.imgur.com/dqopYB9b.jpg"},{citizenid:"AF30442",firstname:"Billy",lastname:"Bob",incidentid:3,expiresAt:Date.now(),image:"https://i.imgur.com/dqopYB9b.jpg"},{citizenid:"AF30442",firstname:"Billy",lastname:"Bob",incidentid:3,expiresAt:Date.now(),image:"https://i.imgur.com/dqopYB9b.jpg"},{citizenid:"AF30442",firstname:"Billy",lastname:"Bob",incidentid:3,expiresAt:Date.now(),image:"https://i.imgur.com/dqopYB9b.jpg"},{citizenid:"AF30442",firstname:"Billy",lastname:"Bob",incidentid:3,expiresAt:Date.now(),image:"https://i.imgur.com/dqopYB9b.jpg"}],YOe=dn(e=>({warrants:at()?GOe:[],getWarrants:async()=>{try{const t=await me("getWarrants");return e({warrants:t}),{warrants:t}}catch(t){return console.error("Failed to fetch recent activities:",t),{warrants:[]}}},setWarrants:t=>e({warrants:t})})),KOe=()=>{const{warrants:e,getWarrants:t}=YOe(),[n,r]=_.useState(!1),o=Ul(),{setActiveIncident:i,setIncidentActive:s}=Ur();return _.useEffect(()=>{r(!0),(async()=>{t()})().then(()=>{r(!1)})},[]),h.jsxs("div",{className:"card-background",children:[h.jsxs("div",{className:"card-title",children:[h.jsx(W,{style:{fontSize:17,color:"white"},weight:500,children:D.active_warrants}),h.jsx(Yhe,{size:M(25),color:"white"})]}),h.jsx(Ye,{mt:5,mb:5}),h.jsx(St,{h:290,children:h.jsx("div",{className:"warrants-card-content",children:n?h.jsx(Pr,{h:"100%",children:h.jsx(en,{})}):e.length>0?e.map(a=>h.jsx(nt,{position:"apart",className:"warrants-card",onClick:async()=>{if(at())return;const c=await me("getIncident",a.incidentid);i(c),s(!0),o("/incidents")},children:h.jsxs(nt,{children:[h.jsx(CP,{color:"blue",src:a.image}),h.jsxs(Je,{spacing:0,children:[h.jsx(W,{fw:500,c:"white",children:`${a.firstname} ${a.lastname}`}),h.jsxs(W,{size:"xs",c:"dark.2",children:[D.expires_in,": ",pe().to(a.expiresAt,!0)]})]})]})})):h.jsx(W,{color:"dimmed",size:"xs",children:D.no_warrants_found})})})]})},_u=e=>e?Object.entries(e).map(t=>({id:+t[0],...t[1]})):[],qOe=e=>Array.isArray(e)?e.map(t=>({...t,units:_u(t.units)})):Object.entries(e).map(t=>{const n={...t[1],units:[]};return n.units=_u(t[1].units),n}),wd=e=>e.length===0?e:e.charAt(0).toUpperCase()+e.slice(1),JOe=[{id:1,time:Date.now(),location:"Somewhere",coords:[350,350],linked:!1,offense:"Bank robbery",code:"10-29",blip:162,units:[{name:"Unit 132",type:"car",members:[{firstname:"Billy",lastname:"Bob",callsign:132,citizenid:"321553",playerId:1,position:[0,0,0]}],id:132},{name:"Unit 322",type:"heli",members:[{firstname:"Marc",lastname:"Marshall",callsign:322,citizenid:"451503",playerId:1,position:[0,0,0]}],id:322}]},{id:2,time:Date.now(),location:"Somewhere",info:[{label:"Sultan RS",icon:"gun"},{label:"XYZ 123",icon:"badge-tm"}],coords:[255,150],blip:51,linked:!1,offense:"Officer Down",code:"10-13",units:[{name:"Unit 132",type:"car",members:[{firstname:"Billy",lastname:"Bob",callsign:132,citizenid:"311342",playerId:1,position:[0,0,0]},{firstname:"Martin",lastname:"Contreras",callsign:521,citizenid:"912132",playerId:1,position:[0,0,0]}],id:132},{name:"Unit 823",type:"heli",members:[{firstname:"Bobby",lastname:"Hopkins",callsign:823,citizenid:"100341",playerId:1,position:[0,0,0]}],id:823},{name:"Unit 531",type:"motor",members:[{firstname:"Connor",lastname:"Collins",callsign:531,citizenid:"913213",playerId:1,position:[0,0,0]}],id:531},{name:"Unit 274",type:"boat",members:[{firstname:"Corey",lastname:"Hayes",callsign:274,citizenid:"920132",playerId:1,position:[0,0,0]}],id:274}]},{id:3,time:Date.now(),location:"Somewhere",coords:[500,750],linked:!1,blip:310,offense:"Officer Down",code:"10-13",units:[{name:"Unit 1",type:"car",members:[{firstname:"Billy",lastname:"bob",callsign:132,citizenid:"913213",playerId:1,position:[0,0,0]}],id:136},{name:"Unit 6",type:"heli",members:[{firstname:"Freddie",lastname:"Reid",callsign:823,citizenid:"920132",playerId:2,position:[0,0,0]}],id:823}]}],XOe=async()=>{if(at())return JOe;const e=await me("getCalls");return qOe(e)},Mu=dn(e=>({calls:[],fetchCalls:async()=>{const t=await XOe();e({calls:t})},updateCallUnits:(t,n)=>{e(r=>{const o=r.calls.findIndex(s=>s.id===t);if(o===-1)return r;const i=[...r.calls];return i[o]={...i[o],units:n},{calls:i}})},addCall:t=>{e(n=>({calls:[t,...n.calls]}))},setCalls:t=>e({calls:t})})),oB=()=>Mu(e=>e.calls),QOe=()=>Mu(e=>e.fetchCalls),eCe=()=>{const{calls:e,fetchCalls:t}=Mu(),[n,r]=_.useState(!1),o=Ul();_.useEffect(()=>{r(!0),(async()=>{t()})().then(()=>{r(!1)})},[]);const i=_.useMemo(()=>e.sort((s,a)=>a.id-s.id),[e]);return h.jsxs("div",{className:"card-background",children:[h.jsxs("div",{className:"card-title",children:[h.jsx(W,{style:{fontSize:17,color:"white"},weight:500,children:D.dispatch}),h.jsx(Bhe,{size:M(25),color:"white"})]}),h.jsx(Ye,{mt:5,mb:5}),h.jsx(St,{h:330,children:h.jsx("div",{className:"warrants-card-content",children:n?h.jsx(Pr,{h:"100%",children:h.jsx(en,{})}):i.length>0?i.map(s=>h.jsx("div",{className:"active-dispatchcall-card",onClick:()=>{o("/dispatch")},children:h.jsxs(nt,{style:{width:"100%"},children:[h.jsxs("div",{style:{flex:1},children:[h.jsxs(W,{style:{fontSize:13,color:"white"},weight:500,children:["(",s.code,") ",s.offense]}),h.jsxs("div",{style:{display:"flex",gap:5},children:[h.jsx(L0,{size:16,color:"#C1C2C5"}),h.jsx(W,{color:"dimmed",size:"xs",children:pe(s.time).fromNow()})]})]}),h.jsxs(W,{color:"dimmed",size:"xs",children:[D.responding_units,": ",s.units.length]})]})})):h.jsx(W,{color:"dimmed",size:"xs",children:D.no_recent_calls_found})})})]})},tCe=[{plate:"AF30442",reason:"This vehicle is wanted because its been a part of a murder and we need to confiscate it to check for evidence",expiresAt:pe(new Date).format("DD-MM-YYYY")},{plate:"AF30442",reason:"Billy",expiresAt:pe(new Date).format("DD-MM-YYYY")}],nCe=dn(e=>({bolos:at()?tCe:[],getBolos:async()=>{try{const t=await me("getBolos");return e({bolos:t}),{bolos:t}}catch(t){return console.error("Failed to fetch recent activities:",t),{bolos:[]}}},setBolos:t=>e({bolos:t})})),iB=[];for(let e=0;e<25;e++)iB[e]={plate:`44HJJO263${e+1}`,model:"Adder"};const SO={plate:"44HJJO263",model:"gauntlet2",owner:"John Doe (ABC123AW)",color:"Red",notes:"string",class:"Muscle",knownInformation:["Gaunlet"]},PO={plate:"44HJJO263",model:"sultan3",owner:"John Doe (ABC123AW)",color:"Black",notes:"string",class:"Super",knownInformation:["Adder"]},Nu=dn(e=>({selectedVehicle:null,isVehicleBOLO:!1,BOLOExpirationDate:"",getVehicles:async()=>at()?iB:await me("getAllVehicles"),setSelectedVehicle:t=>{at()&&e({selectedVehicle:Math.random()*10>5?SO:PO}),e({selectedVehicle:t})},setIsVehicleBOLO(t){e({isVehicleBOLO:t})},setBOLOExpirationDate(t){e({BOLOExpirationDate:t})}})),rCe=e=>{const{setSelectedVehicle:t,setIsVehicleBOLO:n,setBOLOExpirationDate:r}=Nu(),o=Math.random()*10>5?SO:PO,i=Ul();return h.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:10},children:[h.jsx(Ye,{}),h.jsxs("div",{style:{display:"flex",flexDirection:"column"},children:[h.jsx(W,{style:{fontSize:18,color:"white"},weight:500,children:D.reason}),h.jsx(W,{c:"gray.4",size:"sm",children:e.bolo.reason}),h.jsxs(W,{c:"dimmed",size:"xs",mt:5,children:[D.expires_at," ",e.bolo.expiresAt]})]}),h.jsx(Ye,{}),h.jsx("div",{style:{display:"flex",flexDirection:"column",gap:10,alignItems:"center",width:"100%",justifyContent:"center"},children:h.jsx(st,{variant:"light",color:"gray",w:200,onClick:async()=>{t(null);const s=await me("getVehicle",{plate:e.bolo.plate},{data:{...o}}),a=await me("isVehicleBOLO",{plate:e.bolo.plate},{data:!1});if(a){const c=await me("getBOLOExpirationDate",{plate:e.bolo.plate},{data:"12/12/2024"});r(c)}t(s),n(a),i("/vehicles"),ke.closeAll()},children:D.goto_vehicle})})]})},oCe=()=>{const{bolos:e,getBolos:t}=nCe(),[n,r]=_.useState(!1);return _.useEffect(()=>{r(!0),(async()=>{t()})().then(()=>{r(!1)})},[]),h.jsxs("div",{className:"card-background",children:[h.jsxs("div",{className:"card-title",children:[h.jsx(W,{style:{fontSize:17,color:"white"},weight:500,children:D.bolos}),h.jsx(Xhe,{size:M(25),color:"white"})]}),h.jsx(Ye,{mt:5,mb:5}),h.jsx(St,{h:290,children:h.jsx("div",{className:"warrants-card-content",children:n?h.jsx(Pr,{h:"100%",children:h.jsx(en,{})}):e.length>0?e.map(o=>h.jsx("div",{className:"bolos-card",onClick:async()=>{const i=await me("getBolo",{plate:o.plate},{data:{plate:"ABCDEFG",reason:"A pretty nice and cool reason",expiresAt:pe(new Date).format("DD-MM-YYYY")}});ke.open({title:h.jsxs("div",{style:{display:"flex",gap:10,alignItems:"center"},children:[h.jsx(ox,{size:20,color:"#C1C2C5"}),h.jsx(W,{style:{fontSize:16,color:"white"},weight:500,children:i.plate})]}),centered:!0,children:h.jsx(rCe,{bolo:i})})},children:h.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:5,width:"100%"},children:[h.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[h.jsxs("div",{style:{display:"flex",gap:5,alignItems:"center"},children:[h.jsx(ox,{size:20,color:"#C1C2C5"}),h.jsx(W,{style:{fontSize:13,color:"white"},weight:500,children:o.plate})]}),h.jsxs(W,{color:"dimmed",size:"xs",children:[D.expires_at," ",o.expiresAt]})]}),h.jsx(W,{c:"gray.4",size:"xs",lineClamp:2,children:o.reason})]})})):h.jsx(W,{color:"dimmed",size:"xs",children:D.no_bolos_found})})})]})},iCe=()=>{const{firstname:e,lastname:t}=bo(o=>o.personalData),{activeOfficers:n,getActiveOfficers:r}=ZP();return _.useEffect(()=>{r()},[]),h.jsxs("div",{className:"dashboard",children:[h.jsxs("div",{className:"left-side",children:[h.jsxs("div",{className:"header",children:[h.jsx(W,{style:{fontSize:24,color:"white"},weight:500,children:D.welcome_back.format(e,t)}),h.jsxs(W,{color:"dimmed",size:"xs",style:{display:"flex",gap:10},children:[h.jsx(DP,{size:M(18)})," ",h.jsx(W,{color:"dimmed",size:14,children:new Date().toLocaleDateString("en-EN",{weekday:"long",year:"numeric",month:"long",day:"numeric"})})]})]}),h.jsx(Ye,{}),h.jsx(Xye,{}),h.jsxs("div",{className:"content-bottom",children:[h.jsx(KOe,{}),h.jsx(ZOe,{}),h.jsx(oCe,{})]})]}),h.jsx(Ye,{orientation:"vertical"}),h.jsxs("div",{className:"right-side",children:[h.jsx("div",{className:"card-background",children:h.jsxs(St,{h:400,children:[h.jsxs("div",{className:"card-title",children:[h.jsx(W,{style:{fontSize:17,color:"white"},weight:500,children:D.active_officers}),h.jsxs("div",{className:"right-side-title",children:[h.jsx(W,{style:{fontSize:17,color:"white"},weight:500,children:n.length}),h.jsx(A0,{size:M(20),color:"white"})]})]}),h.jsx(Ye,{mt:5,mb:5}),h.jsx("div",{className:"card-content",children:n.length>0?h.jsx("div",{className:"active-officers-cards",children:n.map(o=>h.jsx("div",{className:"active-officer-card",children:h.jsxs(nt,{style:{width:"100%"},children:[h.jsxs("div",{style:{flex:1},children:[h.jsxs(W,{style:{fontSize:13,color:"white"},weight:500,children:[o.firstname," ",o.lastname]}),h.jsxs(W,{color:"dimmed",size:"xs",children:[D.callsign,": ",o.callsign]})]}),h.jsxs(W,{color:"dimmed",size:"xs",children:[D.attached_unit,": ",o.unitId||"None"]})]})}))}):h.jsx(W,{color:"dimmed",size:"xs",children:"No active officers"})})]})}),h.jsx(eCe,{})]})]})};const sCe=e=>h.jsxs("div",{className:"card-background profile-card-info",children:[h.jsxs("div",{className:"card-title",children:[h.jsx(W,{style:{fontSize:17,color:"white"},weight:500,children:e.title}),typeof e.icon=="string"?h.jsx("i",{className:`ti ti-${e.icon}`,style:{fontSize:24,color:"white"}}):h.jsx(e.icon,{})]}),h.jsx(Ye,{style:{width:"100%"}}),h.jsx("div",{className:"profile-card-info-badges",children:e.children})]}),JI={title:"Debug Report title",id:0,description:"

This is a incident description

",evidence:[],officersInvolved:[{firstname:"Callum",lastname:"Graham",callsign:188,citizenid:"132142",playerId:1,position:[0,0,0]},{firstname:"Jacob",lastname:"Gray",callsign:273,citizenid:"152312",playerId:1,position:[0,0,0]},{firstname:"Edward",lastname:"Atkinson",callsign:125,citizenid:"948213",playerId:1,position:[0,0,0]}],citizensInvolved:[{firstname:"John",lastname:"Doe",citizenid:"BUB193Z4A",dob:Date.now()}]},Bi=dn(e=>({report:JI,isReportActive:!1,setActiveReport:t=>{at()&&e({report:JI}),e({report:t})},setReportActive:t=>{e({isReportActive:t})},setDescription:t=>{e(n=>({report:{...n.report,description:t}}))},setOfficersInvolved:t=>{e(n=>({report:{...n.report,officersInvolved:typeof t=="function"?t(n.report.officersInvolved):t}}))},setCitizensInvolved:t=>{e(n=>({report:{...n.report,citizensInvolved:typeof t=="function"?t(n.report.citizensInvolved):t}}))},setEvidence:t=>{e(n=>({report:{...n.report,evidence:typeof t=="function"?t(n.report.evidence):t}}))}})),aCe=()=>{const{setActiveReport:e,setReportActive:t}=Bi(),n=Li(u=>u.selectedProfile),r=Li(u=>u.profileCards),{setActiveIncident:o,setIncidentActive:i}=Ur(),s=Ul();if(!n)return h.jsx("div",{className:"content-width",children:h.jsx("div",{className:"card-background",children:h.jsxs("div",{className:"profile-no-selected",children:[h.jsx(HP,{size:M(50),color:"white"}),h.jsx(W,{style:{fontSize:15,color:"white"},weight:600,children:D.no_profile_selected})]})})});async function a(u){if(at())return s("/reports");const f=await me("getReport",u);e(f),t(!0),s("/reports")}async function c(u){if(at())return s("/incidents");const f=await me("getIncident",u);o(f),i(!0),s("/incidents")}return h.jsx("div",{className:"content-width",children:h.jsx(St,{h:860,children:h.jsxs("div",{className:"additional-profile-info",children:[r.map(u=>h.jsx(sCe,{title:u.title,icon:u.icon,children:h.jsx("div",{className:"profile-card-info-badges",children:n[u.id]?n[u.id].map(f=>h.jsx(mt,{color:"gray",variant:"filled",className:"profile-info-badge",radius:"md",children:f},f)):h.jsx(W,{color:"dimmed",size:"xs",children:D.no_cardid_registered.format(u.id)})})})),h.jsxs("div",{className:"card-background profile-card-info",children:[h.jsxs("div",{className:"card-title",children:[h.jsx(W,{style:{fontSize:17,color:"white"},weight:500,children:D.related_reports}),h.jsx(zP,{size:M(25),color:"white"})]}),h.jsx(Ye,{style:{width:"100%"}}),n.relatedReports&&(n.relatedReports.length>0?n.relatedReports.map(u=>h.jsxs("div",{className:"related-reports-card",onClick:()=>{a(u.id)},children:[h.jsx(W,{style:{fontSize:15,color:"white"},weight:500,children:u.title}),h.jsxs("div",{className:"related-reports-extra-info",children:[h.jsxs(W,{style:{fontSize:12},weight:500,color:"dimmed",children:[u.author," - Date: ",u.date]}),h.jsxs(W,{style:{fontSize:12},weight:500,color:"dimmed",children:["#",u.id]})]})]},u.id)):h.jsx(W,{color:"dimmed",size:"xs",children:D.no_related_reports}))]}),h.jsxs("div",{className:"card-background profile-card-info",children:[h.jsxs("div",{className:"card-title",children:[h.jsx(W,{style:{fontSize:17,color:"white"},weight:500,children:D.related_incidents}),h.jsx(FP,{size:M(25),color:"white"})]}),h.jsx(Ye,{style:{width:"100%"}}),n.relatedIncidents&&(n.relatedIncidents.length>0?n.relatedIncidents.map(u=>h.jsxs("div",{className:"related-reports-card",onClick:()=>{c(u.id)},children:[h.jsx(W,{style:{fontSize:15,color:"white"},weight:500,children:u.title}),h.jsxs("div",{className:"related-reports-extra-info",children:[h.jsxs(W,{style:{fontSize:12},weight:500,color:"dimmed",children:[u.author," - Date: ",u.date]}),h.jsxs(W,{style:{fontSize:12},weight:500,color:"dimmed",children:["#",u.id]})]})]},u.id)):h.jsx(W,{color:"dimmed",size:"xs",children:D.no_related_incidents}))]})]})})})},lCe=e=>{const{setSelectedProfile:t,selectedProfile:n}=Li(),r=_.useRef(null),[o,i]=_.useState(!1),s=async()=>{if(!n)return;i(!0);const a=r.current?.value;await me("updateProfileImage",{citizenId:n.citizenid,image:a},{data:1}),t({...n,image:a}),ke.closeAll()};return h.jsxs(Je,{children:[h.jsx(yn,{defaultValue:e.image,ref:r,label:D.image,description:D.avatar_description,placeholder:"https://r2.fivemanage.com/placeholder.jpg"}),h.jsx(st,{variant:"light",color:"gray",onClick:s,loading:o,children:"Confirm"})]})},cCe=()=>{const{selectedProfile:e,setSelectedProfile:t,isProfileWanted:n}=Li(),[r,o]=_.useState(!1);return e?h.jsx("div",{className:"content-width",children:h.jsx("div",{className:"card-background",children:h.jsxs("div",{className:"profile-card-content",children:[h.jsxs("div",{className:"profile-card-header",children:[h.jsxs(W,{style:{fontSize:14,color:"white"},children:[D.edit_citizen," #",e.citizenid]}),h.jsx("div",{className:"profile-card-header-buttons",children:h.jsx(At,{label:"Unlink",withArrow:!0,color:"gray",position:"bottom",children:h.jsx(Qe,{variant:"filled",color:"gray",onClick:()=>{t(null)},children:h.jsx(R0,{size:16,color:"white"})})})})]}),h.jsx(Ye,{style:{width:"100%"}}),h.jsxs("div",{className:"profile-card-profile-content",children:[h.jsxs("div",{className:"profile-card-wrapper",children:[h.jsxs("div",{className:"profile-card-image",onMouseEnter:()=>o(!0),onMouseLeave:()=>o(!1),children:[r&&h.jsx(Qe,{style:{position:"absolute",top:5,right:5,zIndex:99},onClick:()=>ke.open({title:h.jsx(W,{style:{fontSize:17,color:"white"},weight:500,children:D.change_picture}),centered:!0,size:"sm",children:h.jsx(lCe,{image:e.image})}),children:h.jsx(RP,{})}),h.jsx(ri,{width:145,height:180,src:e.image??"https://r2.fivemanage.com/s64hZD0G9WtYHbURWCuSc/placeholder.jpg",radius:"md",alt:"With default placeholder",withPlaceholder:!0}),n&&h.jsx(ri,{className:"watermark",src:"https://r2.fivemanage.com/s64hZD0G9WtYHbURWCuSc/wanted-stamp.png",radius:"md",alt:"With default placeholder",withPlaceholder:!0})]}),h.jsxs("div",{className:"profile-card-inputs",children:[h.jsx(et,{disabled:!0,icon:h.jsx(C8,{size:16}),placeholder:e.citizenid,size:"xs"}),h.jsx(et,{disabled:!0,icon:h.jsx(Jhe,{size:16}),placeholder:e.firstname+" "+e.lastname,size:"xs"}),h.jsx(et,{disabled:!0,icon:h.jsx(che,{size:16}),placeholder:pe(e.dob).format("DD/MM/YYYY"),size:"xs"}),h.jsx(et,{disabled:!0,icon:h.jsx(hhe,{size:16}),placeholder:e.phoneNumber,size:"xs"}),h.jsx(et,{disabled:!0,icon:h.jsx(yhe,{size:16}),placeholder:e.fingerprint??"No fingerprint found",size:"xs"})]})]}),h.jsx(Ye,{style:{width:"100%"}}),h.jsx("div",{className:"profile-card-information",children:h.jsx(ep,{content:e.notes,onSave:i=>{t({...e,notes:i}),me("saveProfileNotes",{citizenid:e.citizenid,notes:i})},styles:{content:{backgroundColor:"#242527"},toolbar:{backgroundColor:"#2C2E33"},controlsGroup:{pointerEvents:"auto",backgroundColor:"#282828"}},contentAreaStyle:{height:475,width:413,padding:0}})})]})]})})}):h.jsx("div",{className:"content-width",children:h.jsx("div",{className:"card-background",children:h.jsxs("div",{className:"profile-no-selected",children:[h.jsx(HP,{size:M(50),color:"white"}),h.jsx(W,{style:{fontSize:15,color:"white"},weight:600,children:D.no_profile_selected})]})})})},uCe=e=>{const[t,n]=_.useState(""),r=Li(f=>f.getPlayers),[o,i]=_.useState([]),[s,a]=_.useState(o),[c,u]=_.useState(!1);return _.useEffect(()=>{u(!0),(async()=>await r())().then(p=>{i(p.profiles),a(p.profiles),u(!1)})},[]),_.useEffect(()=>{if(t.trim()==="")a(o);else{const f=o.filter(p=>(p.citizenid||"").includes(t)||(p.firstname||"").toLowerCase().includes(t.toLowerCase())||(p.lastname||"").toLowerCase().includes(t.toLowerCase())||(p.firstname+" "+p.lastname||"").toLowerCase().includes(t.toLowerCase()));a(f)}},[t,s]),h.jsx("div",{className:"content-width",children:h.jsxs("div",{className:"card-background",children:[h.jsxs("div",{className:"card-title",children:[h.jsx(W,{style:{fontSize:17,color:"white"},weight:500,children:D.profiles}),h.jsx(WP,{size:M(25),color:"white"})]}),h.jsx(et,{icon:h.jsx(Ia,{}),variant:"filled",placeholder:D.search,mt:10,mb:10,value:t,onChange:f=>n(f.target.value)}),h.jsx(Ye,{mt:5,mb:5}),h.jsx("div",{className:"profiles-card-content",children:h.jsx(St,{h:860,children:h.jsx("div",{className:"profiles-card-content-flex",children:c?h.jsx(Pr,{h:"100%",children:h.jsx(en,{})}):s.length>0?s.map(f=>h.jsxs("div",{className:"profile-card",onClick:()=>e.handleProfileClick(f),children:[h.jsx(ri,{width:65,height:65,src:f.image??"https://cdn.vectorstock.com/i/preview-1x/97/68/account-avatar-dark-mode-glyph-ui-icon-vector-44429768.jpg",radius:"lg",alt:"With default placeholder",withPlaceholder:!0}),h.jsxs("div",{children:[h.jsxs(W,{weight:600,style:{fontSize:13,color:"white"},children:[f.firstname," ",f.lastname]}),h.jsxs(W,{style:{fontSize:12,color:"white"},children:[D.dob,": ",pe(f.dob).format("DD/MM/YYYY")]}),h.jsxs(W,{style:{fontSize:12,color:"white"},children:[D.citizen_id,": ",f.citizenid]})]})]},f.citizenid)):h.jsx(W,{color:"dimmed",size:"xs",children:D.no_profiles_found})})})})]})})},o1=h.jsx("svg",{width:"54",height:"54",viewBox:"0 0 38 38",xmlns:"http://www.w3.org/2000/svg",stroke:qy.colors.blue[6],children:h.jsx("g",{fill:"none",fillRule:"evenodd",children:h.jsxs("g",{transform:"translate(1 1)",strokeWidth:"2",children:[h.jsx("circle",{strokeOpacity:".5",cx:"18",cy:"18",r:"18"}),h.jsx("path",{d:"M36 18c0-9.94-8.06-18-18-18",children:h.jsx("animateTransform",{attributeName:"transform",type:"rotate",from:"0 18 18",to:"360 18 18",dur:"1s",repeatCount:"indefinite"})})]})})}),dCe=()=>{const[e,t]=_.useState(!1),{setIsProfileWanted:n,setSelectedProfile:r}=Li(),o=async i=>{t(!0),r(null),n(!1);const s=await me("getProfile",i.citizenid,{data:{...UP,firstName:i.firstname,lastName:i.lastname,citizenid:i.citizenid}}),a=await me("isProfileWanted",i.citizenid,{data:!1});t(!1),r(s),n(a)};return h.jsxs("div",{className:"profiles",children:[h.jsx(uCe,{handleProfileClick:o}),h.jsx(Wf,{visible:e,overlayOpacity:.97,overlayColor:"rgb(34, 35, 37)",transitionDuration:250,loader:o1,style:{left:795,width:935,height:"96%",top:19,borderRadius:"0.25rem"}}),h.jsx(cCe,{}),h.jsx(aCe,{})]})};var fCe=function e(t,n){if(t===n)return!0;if(t&&n&&typeof t=="object"&&typeof n=="object"){if(t.constructor!==n.constructor)return!1;var r,o,i;if(Array.isArray(t)){if(r=t.length,r!=n.length)return!1;for(o=r;o--!==0;)if(!e(t[o],n[o]))return!1;return!0}if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===n.toString();if(i=Object.keys(t),r=i.length,r!==Object.keys(n).length)return!1;for(o=r;o--!==0;)if(!Object.prototype.hasOwnProperty.call(n,i[o]))return!1;for(o=r;o--!==0;){var s=i[o];if(!e(t[s],n[s]))return!1}return!0}return t!==t&&n!==n};const XI=Ea(fCe);function Ix(e){return e===null||typeof e!="object"?{}:Object.keys(e).reduce((t,n)=>{const r=e[n];return r!=null&&r!==!1&&(t[n]=r),t},{})}var pCe=Object.defineProperty,QI=Object.getOwnPropertySymbols,hCe=Object.prototype.hasOwnProperty,mCe=Object.prototype.propertyIsEnumerable,ej=(e,t,n)=>t in e?pCe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,gCe=(e,t)=>{for(var n in t||(t={}))hCe.call(t,n)&&ej(e,n,t[n]);if(QI)for(var n of QI(t))mCe.call(t,n)&&ej(e,n,t[n]);return e};function sB(e,t){if(t===null||typeof t!="object")return{};const n=gCe({},t);return Object.keys(t).forEach(r=>{r.includes(`${String(e)}.`)&&delete n[r]}),n}const vCe="__MANTINE_FORM_INDEX__";function tj(e,t){return t?typeof t=="boolean"?t:Array.isArray(t)?t.includes(e.replace(/[.][0-9]/g,`.${vCe}`)):!1:!1}function nj(e,t,n){typeof n.value=="object"&&(n.value=Lc(n.value)),!n.enumerable||n.get||n.set||!n.configurable||!n.writable||t==="__proto__"?Object.defineProperty(e,t,n):e[t]=n.value}function Lc(e){if(typeof e!="object")return e;var t=0,n,r,o,i=Object.prototype.toString.call(e);if(i==="[object Object]"?o=Object.create(e.__proto__||null):i==="[object Array]"?o=Array(e.length):i==="[object Set]"?(o=new Set,e.forEach(function(s){o.add(Lc(s))})):i==="[object Map]"?(o=new Map,e.forEach(function(s,a){o.set(Lc(a),Lc(s))})):i==="[object Date]"?o=new Date(+e):i==="[object RegExp]"?o=new RegExp(e.source,e.flags):i==="[object DataView]"?o=new e.constructor(Lc(e.buffer)):i==="[object ArrayBuffer]"?o=e.slice(0):i.slice(-6)==="Array]"&&(o=new e.constructor(e)),o){for(r=Object.getOwnPropertySymbols(e);t0,errors:t}}function jx(e,t,n="",r={}){return typeof e!="object"||e===null?r:Object.keys(e).reduce((o,i)=>{const s=e[i],a=`${n===""?"":`${n}.`}${i}`,c=rs(a,t);let u=!1;return typeof s=="function"&&(o[a]=s(c,t,a)),typeof s=="object"&&Array.isArray(c)&&(u=!0,c.forEach((f,p)=>jx(s,t,`${a}.${p}`,o))),typeof s=="object"&&typeof c=="object"&&c!==null&&(u||jx(s,t,a,o)),o},r)}function Lx(e,t){return rj(typeof e=="function"?e(t):jx(e,t))}function ph(e,t,n){if(typeof e!="string")return{hasError:!1,error:null};const r=Lx(t,n),o=Object.keys(r.errors).find(i=>e.split(".").every((s,a)=>s===i.split(".")[a]));return{hasError:!!o,error:o?r.errors[o]:null}}function yCe(e,{from:t,to:n},r){const o=rs(e,r);if(!Array.isArray(o))return r;const i=[...o],s=o[t];return i.splice(t,1),i.splice(n,0,s),i1(e,i,r)}var _Ce=Object.defineProperty,oj=Object.getOwnPropertySymbols,wCe=Object.prototype.hasOwnProperty,bCe=Object.prototype.propertyIsEnumerable,ij=(e,t,n)=>t in e?_Ce(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,xCe=(e,t)=>{for(var n in t||(t={}))wCe.call(t,n)&&ij(e,n,t[n]);if(oj)for(var n of oj(t))bCe.call(t,n)&&ij(e,n,t[n]);return e};function SCe(e,{from:t,to:n},r){const o=`${e}.${t}`,i=`${e}.${n}`,s=xCe({},r);return Object.keys(r).every(a=>{let c,u;if(a.startsWith(o)&&(c=a,u=a.replace(o,i)),a.startsWith(i)&&(c=a.replace(i,o),u=a),c&&u){const f=s[c],p=s[u];return p===void 0?delete s[c]:s[c]=p,f===void 0?delete s[u]:s[u]=f,!1}return!0}),s}function PCe(e,t,n){const r=rs(e,n);return Array.isArray(r)?i1(e,r.filter((o,i)=>i!==t),n):n}var OCe=Object.defineProperty,sj=Object.getOwnPropertySymbols,CCe=Object.prototype.hasOwnProperty,kCe=Object.prototype.propertyIsEnumerable,aj=(e,t,n)=>t in e?OCe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,ECe=(e,t)=>{for(var n in t||(t={}))CCe.call(t,n)&&aj(e,n,t[n]);if(sj)for(var n of sj(t))kCe.call(t,n)&&aj(e,n,t[n]);return e};function lj(e,t){const n=e.substring(t.length+1).split(".")[0];return parseInt(n,10)}function cj(e,t,n,r){if(t===void 0)return n;const o=`${String(e)}`;let i=n;r===-1&&(i=sB(`${o}.${t}`,i));const s=ECe({},i),a=new Set;return Object.entries(i).filter(([c])=>{if(!c.startsWith(`${o}.`))return!1;const u=lj(c,o);return Number.isNaN(u)?!1:u>=t}).forEach(([c,u])=>{const f=lj(c,o),p=c.replace(`${o}.${f}`,`${o}.${f+r}`);s[p]=u,a.add(p),a.has(c)||delete s[c]}),s}function $Ce(e,t,n,r){const o=rs(e,r);if(!Array.isArray(o))return r;const i=[...o];return i.splice(typeof n=="number"?n:i.length,0,t),i1(e,i,r)}function uj(e,t){const n=Object.keys(e);if(typeof t=="string"){const r=n.filter(o=>o.startsWith(`${t}.`));return e[t]||r.some(o=>e[o])||!1}return n.some(r=>e[r])}function MCe(e){return t=>{if(!t)e(t);else if(typeof t=="function")e(t);else if(typeof t=="object"&&"nativeEvent"in t){const{currentTarget:n}=t;n instanceof HTMLInputElement?n.type==="checkbox"?e(n.checked):e(n.value):(n instanceof HTMLTextAreaElement||n instanceof HTMLSelectElement)&&e(n.value)}else e(t)}}var NCe=Object.defineProperty,TCe=Object.defineProperties,ICe=Object.getOwnPropertyDescriptors,dj=Object.getOwnPropertySymbols,jCe=Object.prototype.hasOwnProperty,LCe=Object.prototype.propertyIsEnumerable,fj=(e,t,n)=>t in e?NCe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Ls=(e,t)=>{for(var n in t||(t={}))jCe.call(t,n)&&fj(e,n,t[n]);if(dj)for(var n of dj(t))LCe.call(t,n)&&fj(e,n,t[n]);return e},Ow=(e,t)=>TCe(e,ICe(t));function Zl({initialValues:e={},initialErrors:t={},initialDirty:n={},initialTouched:r={},clearInputErrorOnChange:o=!0,validateInputOnChange:i=!1,validateInputOnBlur:s=!1,transformValues:a=u=>u,validate:c}={}){const[u,f]=_.useState(r),[p,g]=_.useState(n),[v,y]=_.useState(e),[w,P]=_.useState(Ix(t)),x=_.useRef(e),S=J=>{x.current=J},O=_.useCallback(()=>f({}),[]),E=J=>{const ne=J?Ls(Ls({},v),J):v;S(ne),g({})},$=_.useCallback(J=>P(ne=>Ix(typeof J=="function"?J(ne):J)),[]),N=_.useCallback(()=>P({}),[]),I=_.useCallback(()=>{y(e),N(),S(e),g({}),O()},[]),R=_.useCallback((J,ne)=>$(le=>Ow(Ls({},le),{[J]:ne})),[]),B=_.useCallback(J=>$(ne=>{if(typeof J!="string")return ne;const le=Ls({},ne);return delete le[J],le}),[]),z=_.useCallback(J=>g(ne=>{if(typeof J!="string")return ne;const le=sB(J,ne);return delete le[J],le}),[]),G=_.useCallback((J,ne)=>{const le=tj(J,i);z(J),f(_e=>Ow(Ls({},_e),{[J]:!0})),y(_e=>{const Ne=i1(J,ne,_e);if(le){const we=ph(J,c,Ne);we.hasError?R(J,we.error):B(J)}return Ne}),!le&&o&&R(J,null)},[]),X=_.useCallback(J=>{y(ne=>{const le=typeof J=="function"?J(ne):J;return Ls(Ls({},ne),le)}),o&&N()},[]),Q=_.useCallback((J,ne)=>{z(J),y(le=>yCe(J,ne,le)),P(le=>SCe(J,ne,le))},[]),V=_.useCallback((J,ne)=>{z(J),y(le=>PCe(J,ne,le)),P(le=>cj(J,ne,le,-1))},[]),H=_.useCallback((J,ne,le)=>{z(J),y(_e=>$Ce(J,ne,le,_e)),P(_e=>cj(J,le,_e,1))},[]),Z=_.useCallback(()=>{const J=Lx(c,v);return P(J.errors),J},[v,c]),Y=_.useCallback(J=>{const ne=ph(J,c,v);return ne.hasError?R(J,ne.error):B(J),ne},[v,c]),j=(J,{type:ne="input",withError:le=!0,withFocus:_e=!0}={})=>{const we={onChange:MCe(He=>G(J,He))};return le&&(we.error=w[J]),ne==="checkbox"?we.checked=rs(J,v):we.value=rs(J,v),_e&&(we.onFocus=()=>f(He=>Ow(Ls({},He),{[J]:!0})),we.onBlur=()=>{if(tj(J,s)){const He=ph(J,c,v);He.hasError?R(J,He.error):B(J)}}),we},U=(J,ne)=>le=>{le?.preventDefault();const _e=Z();_e.hasErrors?ne?.(_e.errors,v,le):J?.(a(v),le)},F=J=>a(J||v),K=_.useCallback(J=>{J.preventDefault(),I()},[]),ee=J=>{if(J){const le=rs(J,p);if(typeof le=="boolean")return le;const _e=rs(J,v),Ne=rs(J,x.current);return!XI(_e,Ne)}return Object.keys(p).length>0?uj(p):!XI(v,x.current)},fe=_.useCallback(J=>uj(u,J),[u]),ie=_.useCallback(J=>J?!ph(J,c,v).hasError:!Lx(c,v).hasErrors,[v,c]);return{values:v,errors:w,setValues:X,setErrors:$,setFieldValue:G,setFieldError:R,clearFieldError:B,clearErrors:N,reset:I,validate:Z,validateField:Y,reorderListItem:Q,removeListItem:V,insertListItem:H,getInputProps:j,onSubmit:U,onReset:K,isDirty:ee,isTouched:fe,setTouched:f,setDirty:g,resetTouched:O,resetDirty:E,isValid:ie,getTransformedValues:F}}const DCe=()=>{const{setActiveIncident:e,setIncidentActive:t}=Ur(),n=Zl({initialValues:{title:""},validate:{title:o=>o.length===0?D.incident_title_required:null}}),r=async o=>{ke.closeAll();const i=await me("createIncident",o.title,{data:1});e({title:o.title,id:i,criminals:[],description:"

",evidence:[],officersInvolved:[]}),t(!0)};return h.jsx("form",{onSubmit:n.onSubmit(o=>r(o)),children:h.jsxs(Je,{children:[h.jsx(yn,{label:D.incident_title,"data-autofocus":!0,withAsterisk:!0,...n.getInputProps("title")}),h.jsx(st,{type:"submit",fullWidth:!0,variant:"light",color:"gray",children:D.confirm})]})})},lB=[];for(let e=0;e<25;e++)lB[e]={title:`Incident ${e+1}`,id:e,author:"Some One",date:Date.now()};const RCe=async()=>at()?{incidents:lB}:await me("getIncidents"),cB=dn(e=>({incidents:[],fetchIncidents:async()=>{const t=await RCe();e({incidents:t.incidents})},setIncidents:t=>{e(n=>({incidents:typeof t=="function"?t(n.incidents):t}))}})),zCe=e=>{const{incidents:t,fetchIncidents:n}=cB(),[r,o]=_.useState(!1),[i,s]=_.useState(""),a=500,[c,u]=_.useState(i),[f,p]=_.useState(null),[g,v]=_.useState(t);return _.useEffect(()=>{f!==null&&clearTimeout(f),o(!0);const y=setTimeout(()=>{u(i),o(!1)},a);return p(y),()=>{clearTimeout(y)}},[i]),_.useEffect(()=>{if(c.trim()==="")v(t);else{const y=t.filter(w=>(w.title||"").toLocaleLowerCase().includes(i.toLocaleLowerCase())||(w.author||"").toLocaleLowerCase().includes(i.toLocaleLowerCase()));v(y)}},[c,t]),_.useEffect(()=>{o(!0),(async()=>await n())().then(()=>{o(!1)})},[]),h.jsx("div",{className:"content-width",children:h.jsxs("div",{className:"card-background",children:[h.jsxs("div",{className:"card-title",children:[h.jsx(W,{style:{fontSize:17,color:"white"},weight:500,children:D.incidents}),h.jsx(FP,{size:M(25),color:"white"})]}),h.jsx(et,{icon:h.jsx(Ia,{}),variant:"filled",placeholder:D.search,mt:10,mb:10,onChange:y=>s(y.target.value)}),h.jsxs(st,{fullWidth:!0,variant:"light",color:"gray",onClick:()=>ke.open({title:h.jsx(W,{style:{fontSize:17,color:"white"},weight:500,children:D.create_incident}),centered:!0,size:"sm",children:h.jsx(DCe,{})}),children:[h.jsx(O8,{size:M(18),style:{marginRight:5}})," ",D.create_incident]}),h.jsx(Ye,{mt:10,mb:10}),h.jsx("div",{className:"incidents-cards-content",children:h.jsx(St,{h:680,children:h.jsx("div",{className:"profiles-card-content-flex",children:r?h.jsx(Pr,{children:h.jsx(en,{})}):g.map(y=>h.jsx("div",{className:"incident-card",onClick:()=>e.handleIncidentClick(y),children:h.jsxs("div",{className:"incident-card-content",children:[h.jsx(W,{style:{fontSize:17,color:"white"},weight:500,children:y.title}),h.jsxs("div",{className:"incident-card-dimmed-text",children:[h.jsxs(W,{color:"dimmed",size:"xs",children:[y.author," - ",new Date(y.date).toLocaleDateString()]}),h.jsxs(W,{color:"dimmed",size:"xs",children:["#",y.id]})]})]})},y.id))})})})]})})},ACe=()=>{const{incident:e,setOfficersInvolved:t}=Ur(),[n,r]=_.useState(""),{officers:o,getOfficers:i}=ZP(),[s,a]=_.useState(o),c=500,[u,f]=_.useState(n),[p,g]=_.useState(!1),[v,y]=_.useState(null);_.useEffect(()=>{v!==null&&clearTimeout(v),g(!0);const P=setTimeout(()=>{f(n),g(!1)},c);return y(P),()=>{clearTimeout(P)}},[n]),_.useEffect(()=>{if(u.trim()==="")a(o);else{const P=o.filter(x=>(x.citizenid||"").toLowerCase().includes(n.toLowerCase())||(x.firstname||"").toLowerCase().includes(n.toLowerCase())||(x.lastname||"").toLowerCase().includes(n.toLowerCase())||(x.firstname+" "+x.lastname||"").toLowerCase().includes(n.toLowerCase()));a(P)}},[u,o]),_.useEffect(()=>{i()},[]);const w=async P=>{if(e.officersInvolved.some(x=>x.citizenid===P.citizenid))return ke.closeAll();await me("addOfficer",{id:e.id,citizenid:P.citizenid},{data:1}),ke.closeAll(),t(x=>x.some(S=>S.citizenid===P.citizenid)?x:[...x,{firstname:P.firstname,lastname:P.lastname,callsign:P.callsign,citizenid:P.citizenid,playerId:P.playerId,position:[1,1,1]}])};return h.jsx("form",{children:h.jsxs(Je,{children:[h.jsx(et,{icon:h.jsx(Ia,{}),variant:"filled",placeholder:D.search,mt:10,mb:10,value:n,onChange:P=>r(P.target.value)}),p?h.jsx(Pr,{children:h.jsx(en,{})}):s.length>0?s.map(P=>h.jsxs("div",{className:"add-officer-card",onClick:()=>w(P),children:[h.jsxs(W,{weight:500,style:{fontSize:13,color:"white"},children:[P.firstname," ",P.lastname]}),h.jsxs(W,{style:{fontSize:13,color:"white"},children:[D.callsign,": ",P.callsign]})]},P.citizenid)):h.jsxs(Je,{spacing:0,c:"dark.2",justify:"center",align:"center",children:[h.jsx(Gf,{size:36}),h.jsx(W,{size:"xl",children:D.no_officers_found})]})]})})},BCe=()=>{const[e,t]=_.useState(!1),{incident:n,setEvidence:r}=Ur(),o=Zl({initialValues:{label:"",image:""},validate:{label:s=>s.length===0?D.image_label_required:null,image:s=>s.length===0?D.image_url_required:null}}),i=async s=>{t(!0),await me("addEvidence",{id:n.id,evidence:{...s}},{data:1}),r(a=>[...a,s]),t(!1),ke.closeAll()};return h.jsx("form",{onSubmit:o.onSubmit(s=>i(s)),children:h.jsxs(Je,{children:[h.jsx(yn,{label:D.image_label,withAsterisk:!0,...o.getInputProps("label")}),h.jsx(yn,{label:h.jsxs("div",{style:{display:"flex",gap:10,alignItems:"center",marginBottom:5},children:[h.jsx(W,{children:D.image_url}),h.jsx(At,{label:D.take_picture,withArrow:!0,color:"gray",children:h.jsx(Qe,{disabled:o.getInputProps("label").value==="",variant:"default",size:"sm",p:1.5,onClick:async()=>{await me("takePicture",{id:n.id,imageLabel:o.getInputProps("label").value,type:"incident"},{data:1})},children:h.jsx(b8,{size:"1.125rem"})})})]}),placeholder:"https://i.imgur.com/dqopYB9b.jpg",...o.getInputProps("image")}),h.jsx(st,{variant:"light",color:"gray",type:"submit",loading:e,children:D.add_evidence})]})})},FCe=ue(()=>({container:{position:"relative"},image:{zIndex:2,"&:hover":{cursor:"pointer"}},actionIcon:{position:"absolute",top:0,right:0,zIndex:1}})),VCe=({evidence:e})=>{const{classes:t}=FCe(),[n,r]=_.useState(!1),{incident:o,setEvidence:i}=Ur();return h.jsx(At,{label:e.label,withArrow:!0,color:"gray",children:h.jsxs(Pe,{className:t.container,onMouseEnter:()=>r(!0),onMouseLeave:()=>r(!1),children:[h.jsx(ri,{src:e.image,radius:"sm",width:105,height:105,className:t.image,onClick:()=>ke.open({children:h.jsx(ri,{src:e.image,onClick:()=>ke.closeAll()}),withCloseButton:!1,centered:!0,padding:0,size:"unset",transitionProps:{transition:"pop"}})},`${e.label}-${e.image}`),n&&h.jsx(Qe,{variant:"filled",color:"red",radius:"sm",size:"xs",className:t.actionIcon,onClick:()=>ke.openConfirmModal({title:h.jsx(W,{style:{fontSize:16,color:"white"},weight:500,children:D.remove_evidence}),centered:!0,children:h.jsx(W,{size:"sm",c:"dark.2",children:D.remove_evidence_confirm.format(e.label)}),labels:{confirm:D.confirm,cancel:D.cancel},confirmProps:{color:"red"},groupProps:{spacing:6},onConfirm:async()=>{await me("removeEvidence",{id:o.id,label:e.label,image:e.image},{data:1}),i(s=>s.filter(a=>a.image!==e.image&&a.label!==e.label))}}),children:h.jsx(uu,{})})]})})},HCe=()=>{const{incident:e,isIncidentActive:t,setIncidentActive:n,setOfficersInvolved:r,setDescription:o}=Ur(),{setIncidents:i}=cB();return t?h.jsx(St,{h:860,children:h.jsxs("div",{className:"incident-content-width",children:[h.jsxs("div",{className:"incident-middle-content",children:[h.jsxs("div",{className:"profile-card-header",children:[h.jsx(W,{style:{fontSize:15,color:"white"},children:e.title}),h.jsxs("div",{className:"profile-card-header-buttons",children:[h.jsx(At,{label:D.delete_incident,withArrow:!0,color:"gray",position:"bottom",children:h.jsx(Qe,{variant:"filled",color:"red",onClick:()=>{ke.openConfirmModal({title:h.jsx(W,{style:{fontSize:17,color:"white"},weight:500,children:D.delete_incident}),size:"sm",centered:!0,labels:{confirm:D.confirm,cancel:D.cancel},groupProps:{spacing:6},confirmProps:{color:"red"},onConfirm:async()=>{await me("deleteIncident",{id:e.id},{data:1})&&i(a=>a.filter(c=>c.id!==e.id)),n(!1)},children:h.jsx(W,{size:"sm",c:"dark.2",children:D.delete_incident_confirm.format(e.title)})})},children:h.jsx(z0,{size:16,color:"white"})})}),h.jsx(At,{label:D.unlink,withArrow:!0,color:"gray",position:"bottom",children:h.jsx(Qe,{variant:"filled",color:"gray",onClick:()=>{n(!1)},children:h.jsx(R0,{size:16,color:"white"})})})]})]}),h.jsx(Ye,{style:{width:"100%"}}),h.jsx("div",{className:"incident-middle-card",children:h.jsx(ep,{content:e.description,onSave:s=>{me("saveIncidentContents",{incidentId:e.id,contents:s}),o(s)},styles:{content:{backgroundColor:"#242527"},toolbar:{backgroundColor:"#2C2E33"},controlsGroup:{pointerEvents:"auto",backgroundColor:"#282828"}},contentAreaStyle:{height:270,width:413,padding:0}})})]}),h.jsxs("div",{className:"card-background profile-card-info",children:[h.jsxs("div",{className:"card-title",children:[h.jsx(W,{style:{fontSize:17,color:"white"},weight:500,children:D.officers_involved}),h.jsx(A0,{size:M(25),color:"white"})]}),h.jsx(Ye,{style:{width:"100%"}}),h.jsxs("div",{className:"profile-card-info-badges",children:[h.jsx(mt,{color:"gray",variant:"filled",className:"incident-info-badge-main",radius:"md",onClick:()=>ke.open({title:h.jsx(W,{style:{fontSize:17,color:"white"},weight:500,children:D.add_officer}),centered:!0,size:"sm",children:h.jsx(ACe,{})}),children:D.add_officer}),e.officersInvolved.map(s=>h.jsxs(mt,{color:"gray",variant:"filled",className:"incident-info-badge",rightSection:h.jsx(Qe,{size:"xs",radius:"xl",variant:"transparent",onClick:()=>{ke.openConfirmModal({title:h.jsx(W,{style:{fontSize:16,color:"white"},weight:500,children:D.remove_officer}),centered:!0,children:h.jsx(W,{size:"sm",c:"dark.2",children:D.remove_officer_confirm.format(s.firstname,s.lastname,s.callsign)}),confirmProps:{color:"red"},groupProps:{spacing:6},labels:{confirm:D.confirm,cancel:D.cancel},onConfirm:async()=>{await me("removeOfficer",{id:e.id,citizenid:s.citizenid},{data:1}),r(a=>a.filter(c=>c.citizenid!==s.citizenid))}})},children:h.jsx(uu,{size:M(10)})}),children:[s.firstname," ",s.lastname," ",s.callsign?`(${s.callsign})`:""]},s.citizenid))]})]}),h.jsxs("div",{className:"card-background profile-card-info",children:[h.jsxs("div",{className:"card-title",children:[h.jsx(W,{style:{fontSize:17,color:"white"},weight:500,children:D.evidence}),h.jsx($8,{size:M(25),color:"white"})]}),h.jsx(Ye,{style:{width:"100%"}}),h.jsxs("div",{className:"profile-card-info-badges",children:[h.jsx(st,{onClick:()=>ke.open({centered:!0,title:h.jsx(W,{style:{fontSize:16,color:"white"},weight:500,children:D.add_evidence}),children:h.jsx(BCe,{}),size:"sm"}),variant:"filled",color:"gray",w:105,h:105,children:h.jsx(Eu,{size:36})}),e.evidence.map(s=>h.jsx(VCe,{evidence:s},`${s.image}-${s.label}`))]})]})]})}):h.jsx("div",{className:"content-width",children:h.jsx("div",{className:"card-background",children:h.jsxs("div",{className:"profile-no-selected",children:[h.jsx(D0,{size:M(50),color:"white"}),h.jsx(W,{style:{fontSize:15,color:"white"},weight:600,children:D.no_incident_selected})]})})})},pj=[{firstname:"John",lastname:"Doe",dob:Date.now(),citizenid:"12345"},{firstname:"Jane",lastname:"Smith",dob:Date.now(),citizenid:"67890"},{firstname:"David",lastname:"Williams",dob:Date.now(),citizenid:"13579"},{firstname:"Samantha",lastname:"Jones",dob:Date.now(),citizenid:"24680"},{firstname:"Robert",lastname:"Garcia",dob:Date.now(),citizenid:"97531"},{firstname:"Emily",lastname:"Brown",dob:Date.now(),citizenid:"11223"},{firstname:"Michael",lastname:"Davis",dob:Date.now(),citizenid:"33445"},{firstname:"Sarah",lastname:"Wilson",dob:Date.now(),citizenid:"55667"},{firstname:"James",lastname:"Taylor",dob:Date.now(),citizenid:"77889"},{firstname:"Laura",lastname:"Moore",dob:Date.now(),citizenid:"99001"},{firstname:"Kevin",lastname:"Martin",dob:Date.now(),citizenid:"12321"},{firstname:"Jessica",lastname:"Lee",dob:Date.now(),citizenid:"34543"},{firstname:"Daniel",lastname:"Perez",dob:Date.now(),citizenid:"56765"},{firstname:"Nancy",lastname:"White",dob:Date.now(),citizenid:"78987"},{firstname:"Steven",lastname:"Harris",dob:Date.now(),citizenid:"90109"},{firstname:"Lisa",lastname:"Clark",dob:Date.now(),citizenid:"12212"},{firstname:"Paul",lastname:"Rodriguez",dob:Date.now(),citizenid:"34434"},{firstname:"Anna",lastname:"Lewis",dob:Date.now(),citizenid:"56656"},{firstname:"Charles",lastname:"Walker",dob:Date.now(),citizenid:"78878"},{firstname:"Susan",lastname:"Allen",dob:Date.now(),citizenid:"90090"}],WCe=dn(e=>({criminalProfiles:at()?pj:[],getCriminalProfiles:async()=>{const t=await me("getCriminalProfiles",{data:pj,delay:300});e({criminalProfiles:t})},setCriminalProfiles:t=>e({criminalProfiles:t})})),UCe=e=>{let t=e.length,n;for(;t!==0;)n=Math.floor(Math.random()*t),t--,[e[t],e[n]]=[e[n],e[t]];return e},ZCe=()=>{const{incident:e,setCriminals:t}=Ur(),[n,r]=_.useState(""),{criminalProfiles:o,getCriminalProfiles:i}=WCe(),[s,a]=_.useState(o),c=500,[u,f]=_.useState(n),[p,g]=_.useState(!1),[v,y]=_.useState(null);_.useEffect(()=>{v!==null&&clearTimeout(v),g(!0);const P=setTimeout(()=>{f(n),g(!1)},c);return y(P),()=>{clearTimeout(P)}},[n]),_.useEffect(()=>{if(u.trim()==="")a(UCe([...o]).slice(0,5));else{const P=o.filter(x=>(x.citizenid||"").toLowerCase().includes(n.toLowerCase())||(x.firstname||"").toLowerCase().includes(n.toLowerCase())||(x.lastname||"").toLowerCase().includes(n.toLowerCase())||(x.firstname+" "+x.lastname||"").toLowerCase().includes(n.toLowerCase()));a(P)}},[u,o]),_.useEffect(()=>{(async()=>{await i()})()},[]);const w=async P=>{await me("addCriminal",{id:e.id,criminalId:P.citizenid},{data:1}),ke.closeAll(),t(x=>x.some(S=>S.citizenid===P.citizenid)?x:[...x,{citizenid:P.citizenid,dob:P.dob,firstname:P.firstname,lastname:P.lastname,image:P.image,charges:[],issueWarrant:!1,pleadedGuilty:!1,processed:!1,penalty:{time:0,reduction:0,points:0,fine:0}}])};return h.jsx("form",{children:h.jsxs(Je,{children:[h.jsx(et,{icon:h.jsx(Ia,{}),variant:"filled",placeholder:D.search,mt:10,mb:10,value:n,onChange:P=>r(P.target.value)}),p?h.jsx(Pr,{children:h.jsx(en,{})}):s.length>0?s.map(P=>h.jsxs("div",{className:"profile-card",onClick:()=>w(P),children:[h.jsx(ri,{width:65,height:65,src:P.image??"https://cdn.vectorstock.com/i/preview-1x/97/68/account-avatar-dark-mode-glyph-ui-icon-vector-44429768.jpg",radius:"lg",alt:"With default placeholder",withPlaceholder:!0}),h.jsxs("div",{children:[h.jsxs(W,{weight:600,style:{fontSize:13,color:"white"},children:[P.firstname," ",P.lastname]}),h.jsxs(W,{style:{fontSize:12,color:"white"},children:[D.dob,": ",P.dob]}),h.jsxs(W,{style:{fontSize:12,color:"white"},children:[D.citizen_id,": ",P.citizenid]})]})]},P.citizenid)):h.jsxs(Je,{spacing:0,c:"dark.2",justify:"center",align:"center",children:[h.jsx(Gf,{size:36}),h.jsx(W,{size:"xl",children:D.no_profiles_found})]})]})})};var GCe=Object.defineProperty,YCe=Object.defineProperties,KCe=Object.getOwnPropertyDescriptors,_y=Object.getOwnPropertySymbols,uB=Object.prototype.hasOwnProperty,dB=Object.prototype.propertyIsEnumerable,hj=(e,t,n)=>t in e?GCe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,mj=(e,t)=>{for(var n in t||(t={}))uB.call(t,n)&&hj(e,n,t[n]);if(_y)for(var n of _y(t))dB.call(t,n)&&hj(e,n,t[n]);return e},gj=(e,t)=>YCe(e,KCe(t)),qCe=(e,t)=>{var n={};for(var r in e)uB.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&_y)for(var r of _y(e))t.indexOf(r)<0&&dB.call(e,r)&&(n[r]=e[r]);return n};function Dx(e){var t=e,{direction:n,style:r}=t,o=qCe(t,["direction","style"]);const i=ir();return k.createElement(yq,gj(mj({},o),{style:gj(mj({},r),{transform:n==="next"&&i.dir==="ltr"||n==="previous"&&i.dir==="rtl"?"rotate(270deg)":"rotate(90deg)"})}))}Dx.displayName="@mantine/dates/Chevron";var JCe=Object.defineProperty,XCe=Object.defineProperties,QCe=Object.getOwnPropertyDescriptors,vj=Object.getOwnPropertySymbols,eke=Object.prototype.hasOwnProperty,tke=Object.prototype.propertyIsEnumerable,yj=(e,t,n)=>t in e?JCe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,hh=(e,t)=>{for(var n in t||(t={}))eke.call(t,n)&&yj(e,n,t[n]);if(vj)for(var n of vj(t))tke.call(t,n)&&yj(e,n,t[n]);return e},_j=(e,t)=>XCe(e,QCe(t));const Of={xs:M(30),sm:M(36),md:M(42),lg:M(48),xl:M(54)};var nke=ue((e,{radius:t,isStatic:n},{size:r})=>{const o=e.fn.variant({variant:"filled"}),i=e.fn.variant({variant:"light"});return{day:_j(hh({width:re({size:r,sizes:Of}),height:re({size:r,sizes:Of}),fontSize:re({size:r,sizes:e.fontSizes}),display:"inline-flex",justifyContent:"center",alignItems:"center",userSelect:n?void 0:"none",cursor:n?"default":"pointer",borderRadius:e.fn.radius(t)},n?null:e.fn.hover({backgroundColor:e.colorScheme==="dark"?e.colors.dark[5]:e.colors.gray[0]})),{"&:active":n?void 0:e.activeStyles,"&[data-disabled]":_j(hh({color:e.colorScheme==="dark"?e.colors.dark[3]:e.colors.gray[4],cursor:"not-allowed"},e.fn.hover({backgroundColor:"transparent"})),{"&:active":{transform:"none"}}),"&[data-weekend]":{color:e.colors.red[e.fn.primaryShade()]},"&[data-outside]":{color:e.colorScheme==="dark"?e.colors.dark[3]:e.colors.gray[4]},"&[data-in-range]":hh({backgroundColor:i.background,borderRadius:0},n?null:e.fn.hover({backgroundColor:i.hover})),"&[data-first-in-range]":{borderTopLeftRadius:e.radius.sm,borderBottomLeftRadius:e.radius.sm},"&[data-last-in-range]":{borderTopRightRadius:e.radius.sm,borderBottomRightRadius:e.radius.sm},"&[data-selected]":hh({color:o.color,backgroundColor:o.background},n?null:e.fn.hover({backgroundColor:o.hover})),"&[data-hidden]":{display:"none"}})}});const rke=nke;var oke=Object.defineProperty,ike=Object.defineProperties,ske=Object.getOwnPropertyDescriptors,wj=Object.getOwnPropertySymbols,ake=Object.prototype.hasOwnProperty,lke=Object.prototype.propertyIsEnumerable,bj=(e,t,n)=>t in e?oke(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,mh=(e,t)=>{for(var n in t||(t={}))ake.call(t,n)&&bj(e,n,t[n]);if(wj)for(var n of wj(t))lke.call(t,n)&&bj(e,n,t[n]);return e},gh=(e,t)=>ike(e,ske(t)),cke=ue((e,t,{size:n})=>{const r=re({size:n,sizes:Of});return{calendarHeaderControlIcon:{},calendarHeader:{display:"flex",maxWidth:`calc(${r} * 7 + ${M(7)})`},calendarHeaderControl:gh(mh({width:r,height:r,borderRadius:e.fn.radius(),display:"flex",justifyContent:"center",alignItems:"center",userSelect:"none"},e.fn.hover({backgroundColor:e.colorScheme==="dark"?e.colors.dark[5]:e.colors.gray[0]})),{"&:active":e.activeStyles,"&[data-disabled]":gh(mh({opacity:.2,cursor:"not-allowed"},e.fn.hover({backgroundColor:"transparent"})),{"&:active":{transform:"none"}})}),calendarHeaderLevel:gh(mh({height:r,borderRadius:e.fn.radius(),display:"flex",justifyContent:"center",alignItems:"center",userSelect:"none",flex:1,fontSize:re({size:n,sizes:e.fontSizes}),fontWeight:500,textTransform:"capitalize"},e.fn.hover({backgroundColor:e.colorScheme==="dark"?e.colors.dark[5]:e.colors.gray[0]})),{"&:active":e.activeStyles,"&[data-static]":gh(mh({cursor:"default",userSelect:"unset"},e.fn.hover({backgroundColor:"transparent"})),{"&:active":{transform:"none"}})})}});const uke=cke;var dke=Object.defineProperty,wy=Object.getOwnPropertySymbols,fB=Object.prototype.hasOwnProperty,pB=Object.prototype.propertyIsEnumerable,xj=(e,t,n)=>t in e?dke(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,fke=(e,t)=>{for(var n in t||(t={}))fB.call(t,n)&&xj(e,n,t[n]);if(wy)for(var n of wy(t))pB.call(t,n)&&xj(e,n,t[n]);return e},pke=(e,t)=>{var n={};for(var r in e)fB.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&wy)for(var r of wy(e))t.indexOf(r)<0&&pB.call(e,r)&&(n[r]=e[r]);return n};const hke={nextDisabled:!1,previousDisabled:!1,hasNextLevel:!0,withNext:!0,withPrevious:!0,size:"sm"},s1=_.forwardRef((e,t)=>{const n=ae("CalendarHeader",hke,e),{className:r,nextIcon:o,previousIcon:i,nextLabel:s,previousLabel:a,onNext:c,onPrevious:u,onLevelClick:f,label:p,classNames:g,styles:v,unstyled:y,nextDisabled:w,previousDisabled:P,hasNextLevel:x,levelControlAriaLabel:S,withNext:O,withPrevious:E,__staticSelector:$,__preventFocus:N,__stopPropagation:I,size:R,variant:B}=n,z=pke(n,["className","nextIcon","previousIcon","nextLabel","previousLabel","onNext","onPrevious","onLevelClick","label","classNames","styles","unstyled","nextDisabled","previousDisabled","hasNextLevel","levelControlAriaLabel","withNext","withPrevious","__staticSelector","__preventFocus","__stopPropagation","size","variant"]),{classes:G,cx:X}=uke(null,{name:["CalendarHeader",$],classNames:g,styles:v,unstyled:y,size:R,variant:B}),Q=N?V=>V.preventDefault():void 0;return k.createElement(Pe,fke({className:X(G.calendarHeader,r),ref:t},z),E&&k.createElement(ls,{className:G.calendarHeaderControl,"data-previous":!0,"aria-label":a,onClick:u,unstyled:y,onMouseDown:Q,disabled:P,"data-disabled":P||void 0,tabIndex:N?-1:0,"data-mantine-stop-propagation":I||void 0},i||k.createElement(Dx,{className:G.calendarHeaderControlIcon,direction:"previous","data-previous":!0})),k.createElement(ls,{component:x?"button":"div",className:G.calendarHeaderLevel,onClick:x?f:void 0,unstyled:y,onMouseDown:x?Q:void 0,disabled:!x,"data-static":!x||void 0,"aria-label":S,tabIndex:N||!x?-1:0,"data-mantine-stop-propagation":I||void 0},p),O&&k.createElement(ls,{className:G.calendarHeaderControl,"data-next":!0,"aria-label":s,onClick:c,unstyled:y,onMouseDown:Q,disabled:w,"data-disabled":w||void 0,tabIndex:N?-1:0,"data-mantine-stop-propagation":I||void 0},o||k.createElement(Dx,{className:G.calendarHeaderControlIcon,direction:"next","data-next":!0})))});s1.displayName="@mantine/dates/CalendarHeader";function Cw(e,t){return e?e==="month"?0:e==="year"?1:2:t}function mke(e){return e===0?"month":e===1?"year":"decade"}function dd(e,t,n){return mke(ia(Cw(e,0),Cw(t,0),Cw(n,2)))}var gke=ue(()=>({calendar:{}}));const vke=gke;var yke=ue((e,t,{size:n})=>({monthLevelGroup:{display:"flex","& [data-month-level]:not(:last-of-type)":{marginRight:re({size:n,sizes:e.spacing})}}}));const _ke=yke;var wke=ue(e=>({monthLevel:{},calendarHeader:{marginBottom:e.spacing.xs}}));const bke=wke,xke={locale:"en",firstDayOfWeek:1,weekendDays:[0,6],labelSeparator:"–"},Ske=_.createContext(xke);var Pke=Object.defineProperty,Oke=Object.defineProperties,Cke=Object.getOwnPropertyDescriptors,Sj=Object.getOwnPropertySymbols,kke=Object.prototype.hasOwnProperty,Eke=Object.prototype.propertyIsEnumerable,Pj=(e,t,n)=>t in e?Pke(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,$ke=(e,t)=>{for(var n in t||(t={}))kke.call(t,n)&&Pj(e,n,t[n]);if(Sj)for(var n of Sj(t))Eke.call(t,n)&&Pj(e,n,t[n]);return e},Mke=(e,t)=>Oke(e,Cke(t));function za(){const e=_.useContext(Ske),t=_.useCallback(i=>i||e.locale,[e.locale]),n=_.useCallback(i=>typeof i=="number"?i:e.firstDayOfWeek,[e.firstDayOfWeek]),r=_.useCallback(i=>Array.isArray(i)?i:e.weekendDays,[e.weekendDays]),o=_.useCallback(i=>typeof i=="string"?i:e.labelSeparator,[e.labelSeparator]);return Mke($ke({},e),{getLocale:t,getFirstDayOfWeek:n,getWeekendDays:r,getLabelSeparator:o})}function Nke(e,t=1){const n=new Date(e);for(;n.getDay()!==t;)n.setDate(n.getDate()-1);return n}function Tke(e,t=1){const n=new Date(e),r=t===0?6:t-1;for(;n.getDay()!==r;)n.setDate(n.getDate()+1);return n}function Ike(e,t=1){const n=e.getMonth(),r=new Date(e.getFullYear(),n,1),o=new Date(e.getFullYear(),e.getMonth()+1,0),i=Tke(o,t),s=Nke(r,t),a=[];for(;s<=i;){const c=[];for(let u=0;u<7;u+=1)c.push(new Date(s)),s.setDate(s.getDate()+1);a.push(c)}return a}function hB(e,t){return e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()}function mB(e,t){return t instanceof Date?pe(e).isBefore(pe(t).add(1,"day"),"day"):!0}function gB(e,t){return t instanceof Date?pe(e).isAfter(pe(t).subtract(1,"day"),"day"):!0}var jke=Object.defineProperty,Lke=Object.defineProperties,Dke=Object.getOwnPropertyDescriptors,Oj=Object.getOwnPropertySymbols,Rke=Object.prototype.hasOwnProperty,zke=Object.prototype.propertyIsEnumerable,Cj=(e,t,n)=>t in e?jke(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Ake=(e,t)=>{for(var n in t||(t={}))Rke.call(t,n)&&Cj(e,n,t[n]);if(Oj)for(var n of Oj(t))zke.call(t,n)&&Cj(e,n,t[n]);return e},Bke=(e,t)=>Lke(e,Dke(t)),Fke=ue(e=>({monthThead:{},monthRow:{},monthTbody:{},monthCell:{padding:0,"&[data-with-spacing]":{padding:M(.5)}},month:Bke(Ake({},e.fn.fontStyles()),{borderCollapse:"collapse",tableLayout:"fixed","& *":{boxSizing:"border-box"}})}));const Vke=Fke;function Hke(e,t,n,r,o,i,s){const a=e.flat().filter(f=>{var p;return mB(f,n)&&gB(f,t)&&!o?.(f)&&!((p=r?.(f))!=null&&p.disabled)&&(!i||hB(f,s))}),c=a.find(f=>{var p;return(p=r?.(f))==null?void 0:p.selected});if(c)return c;const u=a.find(f=>pe().isSame(f,"date"));return u||a[0]}var Wke=Object.defineProperty,by=Object.getOwnPropertySymbols,vB=Object.prototype.hasOwnProperty,yB=Object.prototype.propertyIsEnumerable,kj=(e,t,n)=>t in e?Wke(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Uke=(e,t)=>{for(var n in t||(t={}))vB.call(t,n)&&kj(e,n,t[n]);if(by)for(var n of by(t))yB.call(t,n)&&kj(e,n,t[n]);return e},Zke=(e,t)=>{var n={};for(var r in e)vB.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&by)for(var r of by(e))t.indexOf(r)<0&&yB.call(e,r)&&(n[r]=e[r]);return n};const Gke={tabIndex:0,size:"sm"},_B=_.forwardRef((e,t)=>{const n=ae("Day",Gke,e),{className:r,date:o,radius:i,disabled:s,styles:a,classNames:c,unstyled:u,__staticSelector:f,weekend:p,outside:g,selected:v,renderDay:y,inRange:w,firstInRange:P,lastInRange:x,hidden:S,static:O,variant:E,size:$}=n,N=Zke(n,["className","date","radius","disabled","styles","classNames","unstyled","__staticSelector","weekend","outside","selected","renderDay","inRange","firstInRange","lastInRange","hidden","static","variant","size"]),{classes:I,cx:R}=rke({radius:i,isStatic:O},{name:["Day",f],classNames:c,styles:a,unstyled:u,variant:E,size:$});return k.createElement(ls,Uke({component:O?"div":"button",ref:t,className:R(I.day,r),disabled:s,"data-today":pe(o).isSame(new Date,"day")||void 0,"data-hidden":S||void 0,"data-disabled":s||void 0,"data-weekend":!s&&!g&&p||void 0,"data-outside":!s&&g||void 0,"data-selected":!s&&v||void 0,"data-in-range":w&&!s||void 0,"data-first-in-range":P&&!s||void 0,"data-last-in-range":x&&!s||void 0,unstyled:u},N),y?.(o)||o.getDate())});_B.displayName="@mantine/dates/Day";function Yke({locale:e,format:t="dd",firstDayOfWeek:n=1}){const r=pe().day(n),o=[];for(let i=0;i<7;i+=1)typeof t=="string"?o.push(pe(r).add(i,"days").locale(e).format(t)):o.push(t(pe(r).add(i,"days").toDate()));return o}var Kke=ue((e,t,{size:n})=>({weekdaysRow:{},weekday:{color:e.colorScheme==="dark"?e.colors.dark[1]:e.colors.gray[5],fontWeight:400,fontSize:re({size:n,sizes:e.fontSizes}),textTransform:"capitalize",paddingBottom:`calc(${re({size:n,sizes:e.spacing})} / 2)`}}));const qke=Kke;var Jke=Object.defineProperty,xy=Object.getOwnPropertySymbols,wB=Object.prototype.hasOwnProperty,bB=Object.prototype.propertyIsEnumerable,Ej=(e,t,n)=>t in e?Jke(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Xke=(e,t)=>{for(var n in t||(t={}))wB.call(t,n)&&Ej(e,n,t[n]);if(xy)for(var n of xy(t))bB.call(t,n)&&Ej(e,n,t[n]);return e},Qke=(e,t)=>{var n={};for(var r in e)wB.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&xy)for(var r of xy(e))t.indexOf(r)<0&&bB.call(e,r)&&(n[r]=e[r]);return n};const e2e={weekdayFormat:"dd",cellComponent:"th",size:"sm"},xB=_.forwardRef((e,t)=>{const n=ae("WeekdaysRow",e2e,e),{className:r,locale:o,firstDayOfWeek:i,weekdayFormat:s,cellComponent:a,__staticSelector:c,classNames:u,styles:f,unstyled:p,variant:g,size:v}=n,y=Qke(n,["className","locale","firstDayOfWeek","weekdayFormat","cellComponent","__staticSelector","classNames","styles","unstyled","variant","size"]),w=za(),{classes:P,cx:x}=qke(null,{name:["WeekdaysRow",c],classNames:u,styles:f,unstyled:p,variant:g,size:v}),S=Yke({locale:w.getLocale(o),format:s,firstDayOfWeek:w.getFirstDayOfWeek(i)}).map((O,E)=>k.createElement(a,{key:E,className:P.weekday},O));return k.createElement(Pe,Xke({component:"tr",ref:t,className:x(P.weekdaysRow,r)},y),S)});xB.displayName="@mantine/dates/WeekdaysRow";var t2e=Object.defineProperty,n2e=Object.defineProperties,r2e=Object.getOwnPropertyDescriptors,Sy=Object.getOwnPropertySymbols,SB=Object.prototype.hasOwnProperty,PB=Object.prototype.propertyIsEnumerable,$j=(e,t,n)=>t in e?t2e(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,vh=(e,t)=>{for(var n in t||(t={}))SB.call(t,n)&&$j(e,n,t[n]);if(Sy)for(var n of Sy(t))PB.call(t,n)&&$j(e,n,t[n]);return e},kw=(e,t)=>n2e(e,r2e(t)),o2e=(e,t)=>{var n={};for(var r in e)SB.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Sy)for(var r of Sy(e))t.indexOf(r)<0&&PB.call(e,r)&&(n[r]=e[r]);return n};const i2e={size:"sm",withCellSpacing:!0},OB=_.forwardRef((e,t)=>{const n=ae("Month",i2e,e),{className:r,classNames:o,styles:i,unstyled:s,__staticSelector:a,locale:c,firstDayOfWeek:u,weekdayFormat:f,month:p,weekendDays:g,getDayProps:v,excludeDate:y,minDate:w,maxDate:P,renderDay:x,hideOutsideDates:S,hideWeekdays:O,getDayAriaLabel:E,static:$,__getDayRef:N,__onDayKeyDown:I,__onDayClick:R,__onDayMouseEnter:B,__preventFocus:z,__stopPropagation:G,withCellSpacing:X,size:Q,variant:V}=n,H=o2e(n,["className","classNames","styles","unstyled","__staticSelector","locale","firstDayOfWeek","weekdayFormat","month","weekendDays","getDayProps","excludeDate","minDate","maxDate","renderDay","hideOutsideDates","hideWeekdays","getDayAriaLabel","static","__getDayRef","__onDayKeyDown","__onDayClick","__onDayMouseEnter","__preventFocus","__stopPropagation","withCellSpacing","size","variant"]),Z=za(),{classes:Y,cx:j}=Vke(null,{name:["Month",a],classNames:o,styles:i,unstyled:s,variant:V,size:Q}),U={__staticSelector:a||"Month",classNames:o,styles:i,unstyled:s,variant:V,size:Q},F=Ike(p,Z.getFirstDayOfWeek(u)),K=Hke(F,w,P,v,y,S,p),ee=F.map((fe,ie)=>{const J=fe.map((ne,le)=>{const _e=!hB(ne,p),Ne=E?.(ne)||pe(ne).locale(c||Z.locale).format("D MMMM YYYY"),we=v?.(ne),He=pe(ne).isSame(K,"date");return k.createElement("td",{key:ne.toString(),className:Y.monthCell,"data-with-spacing":X||void 0},k.createElement(_B,kw(vh(kw(vh({},U),{"data-mantine-stop-propagation":G||void 0,renderDay:x,date:ne,weekend:Z.getWeekendDays(g).includes(ne.getDay()),outside:_e,hidden:S?_e:!1,"aria-label":Ne,static:$,disabled:y?.(ne)||!mB(ne,P)||!gB(ne,w),ref:Te=>N?.(ie,le,Te)}),we),{onKeyDown:Te=>{var je;(je=we?.onKeyDown)==null||je.call(we,Te),I?.(Te,{rowIndex:ie,cellIndex:le,date:ne})},onMouseEnter:Te=>{var je;(je=we?.onMouseEnter)==null||je.call(we,Te),B?.(Te,ne)},onClick:Te=>{var je;(je=we?.onClick)==null||je.call(we,Te),R?.(Te,ne)},onMouseDown:Te=>{var je;(je=we?.onMouseDown)==null||je.call(we,Te),z&&Te.preventDefault()},tabIndex:z||!He?-1:0})))});return k.createElement("tr",{key:ie,className:Y.monthRow},J)});return k.createElement(Pe,vh({component:"table",className:j(Y.month,r),ref:t},H),!O&&k.createElement("thead",{className:Y.monthThead},k.createElement(xB,kw(vh({},U),{locale:c,firstDayOfWeek:u,weekdayFormat:f}))),k.createElement("tbody",{className:Y.monthTbody},ee))});OB.displayName="@mantine/dates/Month";var s2e=Object.defineProperty,Py=Object.getOwnPropertySymbols,CB=Object.prototype.hasOwnProperty,kB=Object.prototype.propertyIsEnumerable,Mj=(e,t,n)=>t in e?s2e(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Ew=(e,t)=>{for(var n in t||(t={}))CB.call(t,n)&&Mj(e,n,t[n]);if(Py)for(var n of Py(t))kB.call(t,n)&&Mj(e,n,t[n]);return e},a2e=(e,t)=>{var n={};for(var r in e)CB.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Py)for(var r of Py(e))t.indexOf(r)<0&&kB.call(e,r)&&(n[r]=e[r]);return n};const l2e={monthLabelFormat:"MMMM YYYY"},EB=_.forwardRef((e,t)=>{const n=ae("MonthLevel",l2e,e),{month:r,locale:o,firstDayOfWeek:i,weekdayFormat:s,weekendDays:a,getDayProps:c,excludeDate:u,minDate:f,maxDate:p,renderDay:g,hideOutsideDates:v,hideWeekdays:y,getDayAriaLabel:w,__getDayRef:P,__onDayKeyDown:x,__onDayClick:S,__onDayMouseEnter:O,withCellSpacing:E,__preventFocus:$,__stopPropagation:N,nextIcon:I,previousIcon:R,nextLabel:B,previousLabel:z,onNext:G,onPrevious:X,onLevelClick:Q,nextDisabled:V,previousDisabled:H,hasNextLevel:Z,levelControlAriaLabel:Y,withNext:j,withPrevious:U,className:F,monthLabelFormat:K,classNames:ee,styles:fe,unstyled:ie,__staticSelector:J,size:ne,variant:le,static:_e}=n,Ne=a2e(n,["month","locale","firstDayOfWeek","weekdayFormat","weekendDays","getDayProps","excludeDate","minDate","maxDate","renderDay","hideOutsideDates","hideWeekdays","getDayAriaLabel","__getDayRef","__onDayKeyDown","__onDayClick","__onDayMouseEnter","withCellSpacing","__preventFocus","__stopPropagation","nextIcon","previousIcon","nextLabel","previousLabel","onNext","onPrevious","onLevelClick","nextDisabled","previousDisabled","hasNextLevel","levelControlAriaLabel","withNext","withPrevious","className","monthLabelFormat","classNames","styles","unstyled","__staticSelector","size","variant","static"]),{classes:we,cx:He}=bke(null,{name:["MonthLevel",J],classNames:ee,styles:fe,unstyled:ie,variant:le,size:ne}),Te=za(),je={__staticSelector:J||"MonthLevel",classNames:ee,styles:fe,unstyled:ie,variant:le,size:ne},it=typeof V=="boolean"?V:p?!pe(r).endOf("month").isBefore(p):!1,bt=typeof H=="boolean"?H:f?!pe(r).startOf("month").isAfter(f):!1;return k.createElement(Pe,Ew({className:He(we.monthLevel,F),"data-month-level":!0,ref:t},Ne),k.createElement(s1,Ew({label:typeof K=="function"?K(r):pe(r).locale(o||Te.locale).format(K),className:we.calendarHeader,__preventFocus:$,__stopPropagation:N,nextIcon:I,previousIcon:R,nextLabel:B,previousLabel:z,onNext:G,onPrevious:X,onLevelClick:Q,nextDisabled:it,previousDisabled:bt,hasNextLevel:Z,levelControlAriaLabel:Y,withNext:j,withPrevious:U},je)),k.createElement(OB,Ew({month:r,locale:o,firstDayOfWeek:i,weekdayFormat:s,weekendDays:a,getDayProps:c,excludeDate:u,minDate:f,maxDate:p,renderDay:g,hideOutsideDates:v,hideWeekdays:y,getDayAriaLabel:w,__getDayRef:P,__onDayKeyDown:x,__onDayClick:S,__onDayMouseEnter:O,__preventFocus:$,__stopPropagation:N,static:_e,withCellSpacing:E},je)))});EB.displayName="@mantine/dates/MonthLevel";function c2e({direction:e,levelIndex:t,rowIndex:n,cellIndex:r,size:o}){switch(e){case"up":return t===0&&n===0?null:n===0?{levelIndex:t-1,rowIndex:r<=o[t-1][o[t-1].length-1]-1?o[t-1].length-1:o[t-1].length-2,cellIndex:r}:{levelIndex:t,rowIndex:n-1,cellIndex:r};case"down":return n===o[t].length-1?{levelIndex:t+1,rowIndex:0,cellIndex:r}:n===o[t].length-2&&r>=o[t][o[t].length-1]?{levelIndex:t+1,rowIndex:0,cellIndex:r}:{levelIndex:t,rowIndex:n+1,cellIndex:r};case"left":return t===0&&n===0&&r===0?null:n===0&&r===0?{levelIndex:t-1,rowIndex:o[t-1].length-1,cellIndex:o[t-1][o[t-1].length-1]-1}:r===0?{levelIndex:t,rowIndex:n-1,cellIndex:o[t][n-1]-1}:{levelIndex:t,rowIndex:n,cellIndex:r-1};case"right":return n===o[t].length-1&&r===o[t][n]-1?{levelIndex:t+1,rowIndex:0,cellIndex:0}:r===o[t][n]-1?{levelIndex:t,rowIndex:n+1,cellIndex:0}:{levelIndex:t,rowIndex:n,cellIndex:r+1};default:return{levelIndex:t,rowIndex:n,cellIndex:r}}}function $B({controlsRef:e,direction:t,levelIndex:n,rowIndex:r,cellIndex:o,size:i}){var s,a;const c=c2e({direction:t,size:i,rowIndex:r,cellIndex:o,levelIndex:n});if(!c)return;const u=(a=(s=e.current[c.levelIndex])==null?void 0:s[c.rowIndex])==null?void 0:a[c.cellIndex];u&&(u.disabled||u.getAttribute("data-hidden")||u.getAttribute("data-outside")?$B({controlsRef:e,direction:t,levelIndex:c.levelIndex,cellIndex:c.cellIndex,rowIndex:c.rowIndex,size:i}):u.focus())}function u2e(e){switch(e){case"ArrowDown":return"down";case"ArrowUp":return"up";case"ArrowRight":return"right";case"ArrowLeft":return"left";default:return null}}function d2e(e){return e.current.map(t=>t.map(n=>n.length))}function OO({controlsRef:e,levelIndex:t,rowIndex:n,cellIndex:r,event:o}){const i=u2e(o.key);if(i){o.preventDefault();const s=d2e(e);$B({controlsRef:e,direction:i,levelIndex:t,rowIndex:n,cellIndex:r,size:s})}}var f2e=Object.defineProperty,Oy=Object.getOwnPropertySymbols,MB=Object.prototype.hasOwnProperty,NB=Object.prototype.propertyIsEnumerable,Nj=(e,t,n)=>t in e?f2e(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,p2e=(e,t)=>{for(var n in t||(t={}))MB.call(t,n)&&Nj(e,n,t[n]);if(Oy)for(var n of Oy(t))NB.call(t,n)&&Nj(e,n,t[n]);return e},h2e=(e,t)=>{var n={};for(var r in e)MB.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Oy)for(var r of Oy(e))t.indexOf(r)<0&&NB.call(e,r)&&(n[r]=e[r]);return n};const m2e={numberOfColumns:1},TB=_.forwardRef((e,t)=>{const n=ae("MonthLevelGroup",m2e,e),{month:r,locale:o,firstDayOfWeek:i,weekdayFormat:s,weekendDays:a,getDayProps:c,excludeDate:u,minDate:f,maxDate:p,renderDay:g,hideOutsideDates:v,hideWeekdays:y,getDayAriaLabel:w,__onDayClick:P,__onDayMouseEnter:x,withCellSpacing:S,__preventFocus:O,nextIcon:E,previousIcon:$,nextLabel:N,previousLabel:I,onNext:R,onPrevious:B,onLevelClick:z,nextDisabled:G,previousDisabled:X,hasNextLevel:Q,className:V,classNames:H,styles:Z,unstyled:Y,numberOfColumns:j,levelControlAriaLabel:U,monthLabelFormat:F,__staticSelector:K,__stopPropagation:ee,size:fe,variant:ie,static:J}=n,ne=h2e(n,["month","locale","firstDayOfWeek","weekdayFormat","weekendDays","getDayProps","excludeDate","minDate","maxDate","renderDay","hideOutsideDates","hideWeekdays","getDayAriaLabel","__onDayClick","__onDayMouseEnter","withCellSpacing","__preventFocus","nextIcon","previousIcon","nextLabel","previousLabel","onNext","onPrevious","onLevelClick","nextDisabled","previousDisabled","hasNextLevel","className","classNames","styles","unstyled","numberOfColumns","levelControlAriaLabel","monthLabelFormat","__staticSelector","__stopPropagation","size","variant","static"]),{classes:le,cx:_e}=_ke(null,{name:["MonthLevelGroup",K],classNames:H,styles:Z,unstyled:Y,variant:ie,size:fe}),Ne=_.useRef([]),we=Array(j).fill(0).map((He,Te)=>{const je=pe(r).add(Te,"months").toDate();return k.createElement(EB,{key:Te,month:je,withNext:Te===j-1,withPrevious:Te===0,monthLabelFormat:F,__stopPropagation:ee,__onDayClick:P,__onDayMouseEnter:x,__onDayKeyDown:(it,bt)=>OO({levelIndex:Te,rowIndex:bt.rowIndex,cellIndex:bt.cellIndex,event:it,controlsRef:Ne}),__getDayRef:(it,bt,_n)=>{Array.isArray(Ne.current[Te])||(Ne.current[Te]=[]),Array.isArray(Ne.current[Te][it])||(Ne.current[Te][it]=[]),Ne.current[Te][it][bt]=_n},levelControlAriaLabel:typeof U=="function"?U(je):U,locale:o,firstDayOfWeek:i,weekdayFormat:s,weekendDays:a,getDayProps:c,excludeDate:u,minDate:f,maxDate:p,renderDay:g,hideOutsideDates:v,hideWeekdays:y,getDayAriaLabel:w,__preventFocus:O,nextIcon:E,previousIcon:$,nextLabel:N,previousLabel:I,onNext:R,onPrevious:B,onLevelClick:z,nextDisabled:G,previousDisabled:X,hasNextLevel:Q,classNames:H,styles:Z,unstyled:Y,__staticSelector:K||"MonthLevelGroup",size:fe,variant:ie,static:J,withCellSpacing:S})});return k.createElement(Pe,p2e({className:_e(le.monthLevelGroup,V),ref:t},ne),we)});TB.displayName="@mantine/dates/MonthLevelGroup";var g2e=ue((e,t,{size:n})=>({yearLevelGroup:{display:"flex","& [data-year-level]:not(:last-of-type)":{marginRight:re({size:n,sizes:e.spacing})}}}));const v2e=g2e;var y2e=ue(e=>({yearLevel:{},calendarHeader:{marginBottom:e.spacing.xs}}));const _2e=y2e;function w2e(e){const t=pe(e).startOf("year").toDate(),n=[[],[],[],[]];let r=0;for(let o=0;o<4;o+=1)for(let i=0;i<3;i+=1)n[o].push(pe(t).add(r,"months").toDate()),r+=1;return n}function IB(e,t,n){return!t&&!n?!1:!!(t&&pe(e).isBefore(t,"month")||n&&pe(e).isAfter(n,"month"))}var b2e=ue(()=>({monthsList:{borderCollapse:"collapse",borderWidth:0,cursor:"pointer"},monthsListCell:{padding:0,"&[data-with-spacing]":{padding:M(.5)}},monthsListRow:{}}));const x2e=b2e;function S2e(e,t,n,r){const o=e.flat().filter(a=>{var c;return!IB(a,t,n)&&!((c=r?.(a))!=null&&c.disabled)}),i=o.find(a=>{var c;return(c=r?.(a))==null?void 0:c.selected});if(i)return i;const s=o.find(a=>pe().isSame(a,"month"));return s||o[0]}var P2e=Object.defineProperty,O2e=Object.defineProperties,C2e=Object.getOwnPropertyDescriptors,Tj=Object.getOwnPropertySymbols,k2e=Object.prototype.hasOwnProperty,E2e=Object.prototype.propertyIsEnumerable,Ij=(e,t,n)=>t in e?P2e(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,yh=(e,t)=>{for(var n in t||(t={}))k2e.call(t,n)&&Ij(e,n,t[n]);if(Tj)for(var n of Tj(t))E2e.call(t,n)&&Ij(e,n,t[n]);return e},jj=(e,t)=>O2e(e,C2e(t)),$2e=ue((e,t,{size:n})=>{const r=e.fn.variant({variant:"filled"}),o=e.fn.variant({variant:"light"});return{pickerControl:jj(yh({fontSize:re({size:n,sizes:e.fontSizes}),height:re({size:n,sizes:Of}),width:`calc((${re({size:n,sizes:Of})} * 7) / 3 + ${M(1.5)})`,display:"flex",justifyContent:"center",alignItems:"center",userSelect:"none",borderRadius:e.fn.radius()},e.fn.hover({backgroundColor:e.colorScheme==="dark"?e.colors.dark[5]:e.colors.gray[0]})),{"&:active":e.activeStyles,"&[data-in-range]":yh({backgroundColor:o.background,borderRadius:0},e.fn.hover({backgroundColor:o.hover})),"&[data-first-in-range]":{borderRadius:0,borderTopLeftRadius:e.radius.sm,borderBottomLeftRadius:e.radius.sm},"&[data-last-in-range]":{borderRadius:0,borderTopRightRadius:e.radius.sm,borderBottomRightRadius:e.radius.sm},"&[data-last-in-range][data-first-in-range]":{borderRadius:e.radius.sm},"&[data-selected]":yh({color:r.color,backgroundColor:r.background},e.fn.hover({backgroundColor:r.hover})),"&[data-disabled]":jj(yh({color:e.colorScheme==="dark"?e.colors.dark[3]:e.colors.gray[4],cursor:"not-allowed"},e.fn.hover({backgroundColor:"transparent"})),{"&:active":{transform:"none"}})})}});const M2e=$2e;var N2e=Object.defineProperty,Cy=Object.getOwnPropertySymbols,jB=Object.prototype.hasOwnProperty,LB=Object.prototype.propertyIsEnumerable,Lj=(e,t,n)=>t in e?N2e(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,T2e=(e,t)=>{for(var n in t||(t={}))jB.call(t,n)&&Lj(e,n,t[n]);if(Cy)for(var n of Cy(t))LB.call(t,n)&&Lj(e,n,t[n]);return e},I2e=(e,t)=>{var n={};for(var r in e)jB.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Cy)for(var r of Cy(e))t.indexOf(r)<0&&LB.call(e,r)&&(n[r]=e[r]);return n};const j2e={size:"sm"},CO=_.forwardRef((e,t)=>{const n=ae("PickerControl",j2e,e),{className:r,children:o,disabled:i,selected:s,classNames:a,styles:c,unstyled:u,firstInRange:f,lastInRange:p,inRange:g,__staticSelector:v,size:y,variant:w}=n,P=I2e(n,["className","children","disabled","selected","classNames","styles","unstyled","firstInRange","lastInRange","inRange","__staticSelector","size","variant"]),{classes:x,cx:S}=M2e(null,{name:["PickerControl",v],classNames:a,styles:c,unstyled:u,variant:w,size:y});return k.createElement(ls,T2e({className:S(x.pickerControl,r),ref:t,unstyled:u,"data-picker-control":!0,"data-selected":s&&!i||void 0,"data-disabled":i||void 0,"data-in-range":g&&!i&&!s||void 0,"data-first-in-range":f&&!i||void 0,"data-last-in-range":p&&!i||void 0,disabled:i},P),o)});CO.displayName="@mantine/dates/PickerControl";var L2e=Object.defineProperty,D2e=Object.defineProperties,R2e=Object.getOwnPropertyDescriptors,ky=Object.getOwnPropertySymbols,DB=Object.prototype.hasOwnProperty,RB=Object.prototype.propertyIsEnumerable,Dj=(e,t,n)=>t in e?L2e(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Rj=(e,t)=>{for(var n in t||(t={}))DB.call(t,n)&&Dj(e,n,t[n]);if(ky)for(var n of ky(t))RB.call(t,n)&&Dj(e,n,t[n]);return e},z2e=(e,t)=>D2e(e,R2e(t)),A2e=(e,t)=>{var n={};for(var r in e)DB.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&ky)for(var r of ky(e))t.indexOf(r)<0&&RB.call(e,r)&&(n[r]=e[r]);return n};const B2e={monthsListFormat:"MMM",size:"sm",withCellSpacing:!0},zB=_.forwardRef((e,t)=>{const n=ae("MonthsList",B2e,e),{year:r,className:o,monthsListFormat:i,locale:s,minDate:a,maxDate:c,getMonthControlProps:u,classNames:f,styles:p,unstyled:g,__staticSelector:v,__getControlRef:y,__onControlKeyDown:w,__onControlClick:P,__onControlMouseEnter:x,__preventFocus:S,size:O,variant:E,__stopPropagation:$,withCellSpacing:N}=n,I=A2e(n,["year","className","monthsListFormat","locale","minDate","maxDate","getMonthControlProps","classNames","styles","unstyled","__staticSelector","__getControlRef","__onControlKeyDown","__onControlClick","__onControlMouseEnter","__preventFocus","size","variant","__stopPropagation","withCellSpacing"]),{classes:R,cx:B}=x2e(null,{name:["MonthsList",v],classNames:f,styles:p,unstyled:g,variant:E,size:O}),z=za(),G=w2e(r),X=S2e(G,a,c,u),Q=G.map((V,H)=>{const Z=V.map((Y,j)=>{const U=u?.(Y),F=pe(Y).isSame(X,"month");return k.createElement("td",{key:j,className:R.monthsListCell,"data-with-spacing":N||void 0},k.createElement(CO,z2e(Rj({variant:E,size:O,classNames:f,styles:p,unstyled:g,__staticSelector:v||"MonthsList","data-mantine-stop-propagation":$||void 0,disabled:IB(Y,a,c),ref:K=>y?.(H,j,K)},U),{onKeyDown:K=>{var ee;(ee=U?.onKeyDown)==null||ee.call(U,K),w?.(K,{rowIndex:H,cellIndex:j,date:Y})},onClick:K=>{var ee;(ee=U?.onClick)==null||ee.call(U,K),P?.(K,Y)},onMouseEnter:K=>{var ee;(ee=U?.onMouseEnter)==null||ee.call(U,K),x?.(K,Y)},onMouseDown:K=>{var ee;(ee=U?.onMouseDown)==null||ee.call(U,K),S&&K.preventDefault()},tabIndex:S||!F?-1:0}),pe(Y).locale(z.getLocale(s)).format(i)))});return k.createElement("tr",{key:H,className:R.monthsListRow},Z)});return k.createElement(Pe,Rj({component:"table",ref:t,className:B(R.monthsList,o)},I),k.createElement("tbody",null,Q))});zB.displayName="@mantine/dates/MonthsList";var F2e=Object.defineProperty,Ey=Object.getOwnPropertySymbols,AB=Object.prototype.hasOwnProperty,BB=Object.prototype.propertyIsEnumerable,zj=(e,t,n)=>t in e?F2e(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,$w=(e,t)=>{for(var n in t||(t={}))AB.call(t,n)&&zj(e,n,t[n]);if(Ey)for(var n of Ey(t))BB.call(t,n)&&zj(e,n,t[n]);return e},V2e=(e,t)=>{var n={};for(var r in e)AB.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Ey)for(var r of Ey(e))t.indexOf(r)<0&&BB.call(e,r)&&(n[r]=e[r]);return n};const H2e={yearLabelFormat:"YYYY",size:"sm"},FB=_.forwardRef((e,t)=>{const n=ae("YearLevel",H2e,e),{year:r,locale:o,minDate:i,maxDate:s,monthsListFormat:a,getMonthControlProps:c,__getControlRef:u,__onControlKeyDown:f,__onControlClick:p,__onControlMouseEnter:g,withCellSpacing:v,__preventFocus:y,nextIcon:w,previousIcon:P,nextLabel:x,previousLabel:S,onNext:O,onPrevious:E,onLevelClick:$,nextDisabled:N,previousDisabled:I,hasNextLevel:R,levelControlAriaLabel:B,withNext:z,withPrevious:G,className:X,yearLabelFormat:Q,classNames:V,styles:H,unstyled:Z,__staticSelector:Y,__stopPropagation:j,size:U,variant:F}=n,K=V2e(n,["year","locale","minDate","maxDate","monthsListFormat","getMonthControlProps","__getControlRef","__onControlKeyDown","__onControlClick","__onControlMouseEnter","withCellSpacing","__preventFocus","nextIcon","previousIcon","nextLabel","previousLabel","onNext","onPrevious","onLevelClick","nextDisabled","previousDisabled","hasNextLevel","levelControlAriaLabel","withNext","withPrevious","className","yearLabelFormat","classNames","styles","unstyled","__staticSelector","__stopPropagation","size","variant"]),{classes:ee,cx:fe}=_2e(null,{name:["YearLevel",Y],classNames:V,styles:H,unstyled:Z,size:U,variant:F}),ie=za(),J={__staticSelector:Y||"YearLevel",classNames:V,styles:H,unstyled:Z,size:U,variant:F},ne=typeof N=="boolean"?N:s?!pe(r).endOf("year").isBefore(s):!1,le=typeof I=="boolean"?I:i?!pe(r).startOf("year").isAfter(i):!1;return k.createElement(Pe,$w({className:fe(ee.yearLevel,X),"data-year-level":!0,ref:t},K),k.createElement(s1,$w({label:typeof Q=="function"?Q(r):pe(r).locale(o||ie.locale).format(Q),className:ee.calendarHeader,__preventFocus:y,__stopPropagation:j,nextIcon:w,previousIcon:P,nextLabel:x,previousLabel:S,onNext:O,onPrevious:E,onLevelClick:$,nextDisabled:ne,previousDisabled:le,hasNextLevel:R,levelControlAriaLabel:B,withNext:z,withPrevious:G},J)),k.createElement(zB,$w({year:r,locale:o,minDate:i,maxDate:s,monthsListFormat:a,getMonthControlProps:c,__getControlRef:u,__onControlKeyDown:f,__onControlClick:p,__onControlMouseEnter:g,__preventFocus:y,__stopPropagation:j,withCellSpacing:v},J)))});FB.displayName="@mantine/dates/YearLevel";var W2e=Object.defineProperty,$y=Object.getOwnPropertySymbols,VB=Object.prototype.hasOwnProperty,HB=Object.prototype.propertyIsEnumerable,Aj=(e,t,n)=>t in e?W2e(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,U2e=(e,t)=>{for(var n in t||(t={}))VB.call(t,n)&&Aj(e,n,t[n]);if($y)for(var n of $y(t))HB.call(t,n)&&Aj(e,n,t[n]);return e},Z2e=(e,t)=>{var n={};for(var r in e)VB.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&$y)for(var r of $y(e))t.indexOf(r)<0&&HB.call(e,r)&&(n[r]=e[r]);return n};const G2e={numberOfColumns:1,size:"sm"},WB=_.forwardRef((e,t)=>{const n=ae("YearLevelGroup",G2e,e),{year:r,locale:o,minDate:i,maxDate:s,monthsListFormat:a,getMonthControlProps:c,__onControlClick:u,__onControlMouseEnter:f,withCellSpacing:p,__preventFocus:g,nextIcon:v,previousIcon:y,nextLabel:w,previousLabel:P,onNext:x,onPrevious:S,onLevelClick:O,nextDisabled:E,previousDisabled:$,hasNextLevel:N,className:I,classNames:R,styles:B,unstyled:z,__staticSelector:G,__stopPropagation:X,numberOfColumns:Q,levelControlAriaLabel:V,yearLabelFormat:H,variant:Z,size:Y}=n,j=Z2e(n,["year","locale","minDate","maxDate","monthsListFormat","getMonthControlProps","__onControlClick","__onControlMouseEnter","withCellSpacing","__preventFocus","nextIcon","previousIcon","nextLabel","previousLabel","onNext","onPrevious","onLevelClick","nextDisabled","previousDisabled","hasNextLevel","className","classNames","styles","unstyled","__staticSelector","__stopPropagation","numberOfColumns","levelControlAriaLabel","yearLabelFormat","variant","size"]),{classes:U,cx:F}=v2e(null,{name:["YearLevelGroup",G],styles:B,classNames:R,unstyled:z,variant:Z,size:Y}),K=_.useRef([]),ee=Array(Q).fill(0).map((fe,ie)=>{const J=pe(r).add(ie,"years").toDate();return k.createElement(FB,{key:ie,variant:Z,size:Y,monthsListFormat:a,year:J,withNext:ie===Q-1,withPrevious:ie===0,yearLabelFormat:H,__stopPropagation:X,__onControlClick:u,__onControlMouseEnter:f,__onControlKeyDown:(ne,le)=>OO({levelIndex:ie,rowIndex:le.rowIndex,cellIndex:le.cellIndex,event:ne,controlsRef:K}),__getControlRef:(ne,le,_e)=>{Array.isArray(K.current[ie])||(K.current[ie]=[]),Array.isArray(K.current[ie][ne])||(K.current[ie][ne]=[]),K.current[ie][ne][le]=_e},levelControlAriaLabel:typeof V=="function"?V(J):V,locale:o,minDate:i,maxDate:s,__preventFocus:g,nextIcon:v,previousIcon:y,nextLabel:w,previousLabel:P,onNext:x,onPrevious:S,onLevelClick:O,nextDisabled:E,previousDisabled:$,hasNextLevel:N,getMonthControlProps:c,classNames:R,styles:B,unstyled:z,__staticSelector:G||"YearLevelGroup",withCellSpacing:p})});return k.createElement(Pe,U2e({className:F(U.yearLevelGroup,I),ref:t},j),ee)});WB.displayName="@mantine/dates/YearLevelGroup";var Y2e=ue(e=>({decadeLevelGroup:{display:"flex",gap:e.spacing.md}}));const K2e=Y2e;function UB(e){const t=e.getFullYear(),n=t-t%10;let r=0;const o=[[],[],[],[]];for(let i=0;i<4;i+=1){const s=i===3?1:3;for(let a=0;a({decadeLevel:{},calendarHeader:{marginBottom:e.spacing.xs}}));const X2e=J2e;function ZB(e,t,n){return!t&&!n?!1:!!(t&&pe(e).isBefore(t,"year")||n&&pe(e).isAfter(n,"year"))}var Q2e=ue(()=>({yearsList:{borderCollapse:"collapse",borderWidth:0},yearsListCell:{padding:0,"&[data-with-spacing]":{padding:M(.5)}},yearsListRow:{}}));const eEe=Q2e;function tEe(e,t,n,r){const o=e.flat().filter(a=>{var c;return!ZB(a,t,n)&&!((c=r?.(a))!=null&&c.disabled)}),i=o.find(a=>{var c;return(c=r?.(a))==null?void 0:c.selected});if(i)return i;const s=o.find(a=>pe().isSame(a,"year"));return s||o[0]}var nEe=Object.defineProperty,rEe=Object.defineProperties,oEe=Object.getOwnPropertyDescriptors,My=Object.getOwnPropertySymbols,GB=Object.prototype.hasOwnProperty,YB=Object.prototype.propertyIsEnumerable,Bj=(e,t,n)=>t in e?nEe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Fj=(e,t)=>{for(var n in t||(t={}))GB.call(t,n)&&Bj(e,n,t[n]);if(My)for(var n of My(t))YB.call(t,n)&&Bj(e,n,t[n]);return e},iEe=(e,t)=>rEe(e,oEe(t)),sEe=(e,t)=>{var n={};for(var r in e)GB.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&My)for(var r of My(e))t.indexOf(r)<0&&YB.call(e,r)&&(n[r]=e[r]);return n};const aEe={yearsListFormat:"YYYY",size:"sm",withCellSpacing:!0},KB=_.forwardRef((e,t)=>{const n=ae("YearsList",aEe,e),{decade:r,className:o,yearsListFormat:i,locale:s,minDate:a,maxDate:c,getYearControlProps:u,classNames:f,styles:p,unstyled:g,__staticSelector:v,__getControlRef:y,__onControlKeyDown:w,__onControlClick:P,__onControlMouseEnter:x,__preventFocus:S,__stopPropagation:O,size:E,variant:$,withCellSpacing:N}=n,I=sEe(n,["decade","className","yearsListFormat","locale","minDate","maxDate","getYearControlProps","classNames","styles","unstyled","__staticSelector","__getControlRef","__onControlKeyDown","__onControlClick","__onControlMouseEnter","__preventFocus","__stopPropagation","size","variant","withCellSpacing"]),{classes:R,cx:B}=eEe(null,{name:["YearsList",v],classNames:f,styles:p,unstyled:g,variant:$,size:E}),z=za(),G=UB(r),X=tEe(G,a,c,u),Q=G.map((V,H)=>{const Z=V.map((Y,j)=>{const U=u?.(Y),F=pe(Y).isSame(X,"year");return k.createElement("td",{key:j,className:R.yearsListCell,"data-with-spacing":N||void 0},k.createElement(CO,iEe(Fj({size:E,variant:$,classNames:f,styles:p,unstyled:g,__staticSelector:v||"YearsList","data-mantine-stop-propagation":O||void 0,disabled:ZB(Y,a,c),ref:K=>y?.(H,j,K)},U),{onKeyDown:K=>{var ee;(ee=U?.onKeyDown)==null||ee.call(U,K),w?.(K,{rowIndex:H,cellIndex:j,date:Y})},onClick:K=>{var ee;(ee=U?.onClick)==null||ee.call(U,K),P?.(K,Y)},onMouseEnter:K=>{var ee;(ee=U?.onMouseEnter)==null||ee.call(U,K),x?.(K,Y)},onMouseDown:K=>{var ee;(ee=U?.onMouseDown)==null||ee.call(U,K),S&&K.preventDefault()},tabIndex:S||!F?-1:0}),pe(Y).locale(z.getLocale(s)).format(i)))});return k.createElement("tr",{key:H,className:R.yearsListRow},Z)});return k.createElement(Pe,Fj({component:"table",ref:t,className:B(R.yearsList,o)},I),k.createElement("tbody",null,Q))});KB.displayName="@mantine/dates/YearsList";var lEe=Object.defineProperty,Ny=Object.getOwnPropertySymbols,qB=Object.prototype.hasOwnProperty,JB=Object.prototype.propertyIsEnumerable,Vj=(e,t,n)=>t in e?lEe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Mw=(e,t)=>{for(var n in t||(t={}))qB.call(t,n)&&Vj(e,n,t[n]);if(Ny)for(var n of Ny(t))JB.call(t,n)&&Vj(e,n,t[n]);return e},cEe=(e,t)=>{var n={};for(var r in e)qB.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Ny)for(var r of Ny(e))t.indexOf(r)<0&&JB.call(e,r)&&(n[r]=e[r]);return n};const uEe={decadeLabelFormat:"YYYY"},XB=_.forwardRef((e,t)=>{const n=ae("DecadeLevel",uEe,e),{decade:r,locale:o,minDate:i,maxDate:s,yearsListFormat:a,getYearControlProps:c,__getControlRef:u,__onControlKeyDown:f,__onControlClick:p,__onControlMouseEnter:g,withCellSpacing:v,__preventFocus:y,nextIcon:w,previousIcon:P,nextLabel:x,previousLabel:S,onNext:O,onPrevious:E,nextDisabled:$,previousDisabled:N,levelControlAriaLabel:I,withNext:R,withPrevious:B,className:z,decadeLabelFormat:G,classNames:X,styles:Q,unstyled:V,__staticSelector:H,__stopPropagation:Z,variant:Y,size:j}=n,U=cEe(n,["decade","locale","minDate","maxDate","yearsListFormat","getYearControlProps","__getControlRef","__onControlKeyDown","__onControlClick","__onControlMouseEnter","withCellSpacing","__preventFocus","nextIcon","previousIcon","nextLabel","previousLabel","onNext","onPrevious","nextDisabled","previousDisabled","levelControlAriaLabel","withNext","withPrevious","className","decadeLabelFormat","classNames","styles","unstyled","__staticSelector","__stopPropagation","variant","size"]),{classes:F,cx:K}=X2e(null,{name:["DecadeLevel",H],classNames:X,styles:Q,unstyled:V,variant:Y,size:j}),ee=za(),[fe,ie]=q2e(r),J={__staticSelector:H||"DecadeLevel",classNames:X,styles:Q,unstyled:V,variant:Y,size:j},ne=typeof $=="boolean"?$:s?!pe(ie).endOf("year").isBefore(s):!1,le=typeof N=="boolean"?N:i?!pe(fe).startOf("year").isAfter(i):!1,_e=(Ne,we)=>pe(Ne).locale(o||ee.locale).format(we);return k.createElement(Pe,Mw({className:K(F.decadeLevel,z),"data-decade-level":!0,ref:t},U),k.createElement(s1,Mw({label:typeof G=="function"?G(fe,ie):`${_e(fe,G)} – ${_e(ie,G)}`,className:F.calendarHeader,__preventFocus:y,__stopPropagation:Z,nextIcon:w,previousIcon:P,nextLabel:x,previousLabel:S,onNext:O,onPrevious:E,nextDisabled:ne,previousDisabled:le,hasNextLevel:!1,levelControlAriaLabel:I,withNext:R,withPrevious:B},J)),k.createElement(KB,Mw({decade:r,locale:o,minDate:i,maxDate:s,yearsListFormat:a,getYearControlProps:c,__getControlRef:u,__onControlKeyDown:f,__onControlClick:p,__onControlMouseEnter:g,__preventFocus:y,__stopPropagation:Z,withCellSpacing:v},J)))});XB.displayName="@mantine/dates/DecadeLevel";var dEe=Object.defineProperty,Ty=Object.getOwnPropertySymbols,QB=Object.prototype.hasOwnProperty,eF=Object.prototype.propertyIsEnumerable,Hj=(e,t,n)=>t in e?dEe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,fEe=(e,t)=>{for(var n in t||(t={}))QB.call(t,n)&&Hj(e,n,t[n]);if(Ty)for(var n of Ty(t))eF.call(t,n)&&Hj(e,n,t[n]);return e},pEe=(e,t)=>{var n={};for(var r in e)QB.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Ty)for(var r of Ty(e))t.indexOf(r)<0&&eF.call(e,r)&&(n[r]=e[r]);return n};const hEe={numberOfColumns:1},tF=_.forwardRef((e,t)=>{const n=ae("DecadeLevelGroup",hEe,e),{decade:r,locale:o,minDate:i,maxDate:s,yearsListFormat:a,getYearControlProps:c,__onControlClick:u,__onControlMouseEnter:f,withCellSpacing:p,__preventFocus:g,nextIcon:v,previousIcon:y,nextLabel:w,previousLabel:P,onNext:x,onPrevious:S,nextDisabled:O,previousDisabled:E,className:$,classNames:N,styles:I,unstyled:R,__staticSelector:B,__stopPropagation:z,numberOfColumns:G,levelControlAriaLabel:X,decadeLabelFormat:Q,variant:V,size:H}=n,Z=pEe(n,["decade","locale","minDate","maxDate","yearsListFormat","getYearControlProps","__onControlClick","__onControlMouseEnter","withCellSpacing","__preventFocus","nextIcon","previousIcon","nextLabel","previousLabel","onNext","onPrevious","nextDisabled","previousDisabled","className","classNames","styles","unstyled","__staticSelector","__stopPropagation","numberOfColumns","levelControlAriaLabel","decadeLabelFormat","variant","size"]),{classes:Y,cx:j}=K2e(null,{name:["DecadeLevelGroup",B],styles:I,classNames:N,unstyled:R,variant:V,size:H}),U=_.useRef([]),F=Array(G).fill(0).map((K,ee)=>{const fe=pe(r).add(ee*10,"years").toDate();return k.createElement(XB,{key:ee,variant:V,size:H,yearsListFormat:a,decade:fe,withNext:ee===G-1,withPrevious:ee===0,decadeLabelFormat:Q,__onControlClick:u,__onControlMouseEnter:f,__onControlKeyDown:(ie,J)=>OO({levelIndex:ee,rowIndex:J.rowIndex,cellIndex:J.cellIndex,event:ie,controlsRef:U}),__getControlRef:(ie,J,ne)=>{Array.isArray(U.current[ee])||(U.current[ee]=[]),Array.isArray(U.current[ee][ie])||(U.current[ee][ie]=[]),U.current[ee][ie][J]=ne},levelControlAriaLabel:typeof X=="function"?X(fe):X,locale:o,minDate:i,maxDate:s,__preventFocus:g,__stopPropagation:z,nextIcon:v,previousIcon:y,nextLabel:w,previousLabel:P,onNext:x,onPrevious:S,nextDisabled:O,previousDisabled:E,getYearControlProps:c,__staticSelector:B||"DecadeLevelGroup",classNames:N,styles:I,unstyled:R,withCellSpacing:p})});return k.createElement(Pe,fEe({className:j(Y.decadeLevelGroup,$),ref:t},Z),F)});tF.displayName="@mantine/dates/DecadeLevelGroup";var mEe=Object.defineProperty,Iy=Object.getOwnPropertySymbols,nF=Object.prototype.hasOwnProperty,rF=Object.prototype.propertyIsEnumerable,Wj=(e,t,n)=>t in e?mEe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,_h=(e,t)=>{for(var n in t||(t={}))nF.call(t,n)&&Wj(e,n,t[n]);if(Iy)for(var n of Iy(t))rF.call(t,n)&&Wj(e,n,t[n]);return e},gEe=(e,t)=>{var n={};for(var r in e)nF.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Iy)for(var r of Iy(e))t.indexOf(r)<0&&rF.call(e,r)&&(n[r]=e[r]);return n};const vEe={maxLevel:"decade",minLevel:"month",__updateDateOnYearSelect:!0,__updateDateOnMonthSelect:!0},oF=_.forwardRef((e,t)=>{const n=ae("Calendar",vEe,e),{maxLevel:r,minLevel:o,defaultLevel:i,level:s,onLevelChange:a,date:c,defaultDate:u,onDateChange:f,numberOfColumns:p,columnsToScroll:g,ariaLabels:v,onYearSelect:y,onMonthSelect:w,onYearMouseEnter:P,onMonthMouseEnter:x,__updateDateOnYearSelect:S,__updateDateOnMonthSelect:O,firstDayOfWeek:E,weekdayFormat:$,weekendDays:N,getDayProps:I,excludeDate:R,renderDay:B,hideOutsideDates:z,hideWeekdays:G,getDayAriaLabel:X,monthLabelFormat:Q,nextIcon:V,previousIcon:H,__onDayClick:Z,__onDayMouseEnter:Y,withCellSpacing:j,monthsListFormat:U,getMonthControlProps:F,yearLabelFormat:K,yearsListFormat:ee,getYearControlProps:fe,decadeLabelFormat:ie,minDate:J,maxDate:ne,locale:le,className:_e,classNames:Ne,styles:we,__staticSelector:He,unstyled:Te,variant:je,size:it,__preventFocus:bt,__stopPropagation:_n,onNextDecade:pt,onPreviousDecade:Tn,onNextYear:kr,onPreviousYear:lt,onNextMonth:Zn,onPreviousMonth:Jt,static:ht}=n,xo=gEe(n,["maxLevel","minLevel","defaultLevel","level","onLevelChange","date","defaultDate","onDateChange","numberOfColumns","columnsToScroll","ariaLabels","onYearSelect","onMonthSelect","onYearMouseEnter","onMonthMouseEnter","__updateDateOnYearSelect","__updateDateOnMonthSelect","firstDayOfWeek","weekdayFormat","weekendDays","getDayProps","excludeDate","renderDay","hideOutsideDates","hideWeekdays","getDayAriaLabel","monthLabelFormat","nextIcon","previousIcon","__onDayClick","__onDayMouseEnter","withCellSpacing","monthsListFormat","getMonthControlProps","yearLabelFormat","yearsListFormat","getYearControlProps","decadeLabelFormat","minDate","maxDate","locale","className","classNames","styles","__staticSelector","unstyled","variant","size","__preventFocus","__stopPropagation","onNextDecade","onPreviousDecade","onNextYear","onPreviousYear","onNextMonth","onPreviousMonth","static"]),{classes:Yr,cx:ar}=vke(null,{name:["Calendar",He],classNames:Ne,styles:we,unstyled:Te,variant:je,size:it}),[Kr,Bt]=go({value:s?dd(s,o,r):void 0,defaultValue:i?dd(i,o,r):void 0,finalValue:dd(void 0,o,r),onChange:a}),[qr,fn]=go({value:c,defaultValue:u,finalValue:null,onChange:f}),wn={__staticSelector:He||"Calendar",styles:we,classNames:Ne,unstyled:Te,variant:je,size:it},Er=g||p||1,gt=qr||new Date,be=()=>{const xt=pe(gt).add(Er,"month").toDate();Zn?.(xt),fn(xt)},De=()=>{const xt=pe(gt).subtract(Er,"month").toDate();Jt?.(xt),fn(xt)},Jr=()=>{const xt=pe(gt).add(Er,"year").toDate();kr?.(xt),fn(xt)},Rt=()=>{const xt=pe(gt).subtract(Er,"year").toDate();lt?.(xt),fn(xt)},Zt=()=>{const xt=pe(gt).add(10*Er,"year").toDate();pt?.(xt),fn(xt)},$r=()=>{const xt=pe(gt).subtract(10*Er,"year").toDate();Tn?.(xt),fn(xt)};return k.createElement(Pe,_h({className:ar(Yr.calendar,_e),ref:t},xo),Kr==="month"&&k.createElement(TB,_h({month:gt,minDate:J,maxDate:ne,firstDayOfWeek:E,weekdayFormat:$,weekendDays:N,getDayProps:I,excludeDate:R,renderDay:B,hideOutsideDates:z,hideWeekdays:G,getDayAriaLabel:X,onNext:be,onPrevious:De,hasNextLevel:r!=="month",onLevelClick:()=>Bt("year"),numberOfColumns:p,locale:le,levelControlAriaLabel:v?.monthLevelControl,nextLabel:v?.nextMonth,nextIcon:V,previousLabel:v?.previousMonth,previousIcon:H,monthLabelFormat:Q,__onDayClick:Z,__onDayMouseEnter:Y,__preventFocus:bt,__stopPropagation:_n,static:ht,withCellSpacing:j},wn)),Kr==="year"&&k.createElement(WB,_h({year:gt,numberOfColumns:p,minDate:J,maxDate:ne,monthsListFormat:U,getMonthControlProps:F,locale:le,onNext:Jr,onPrevious:Rt,hasNextLevel:r!=="month"&&r!=="year",onLevelClick:()=>Bt("decade"),levelControlAriaLabel:v?.yearLevelControl,nextLabel:v?.nextYear,nextIcon:V,previousLabel:v?.previousYear,previousIcon:H,yearLabelFormat:K,__onControlMouseEnter:x,__onControlClick:(xt,tn)=>{O&&fn(tn),Bt(dd("month",o,r)),w?.(tn)},__preventFocus:bt,__stopPropagation:_n,withCellSpacing:j},wn)),Kr==="decade"&&k.createElement(tF,_h({decade:gt,minDate:J,maxDate:ne,yearsListFormat:ee,getYearControlProps:fe,locale:le,onNext:Zt,onPrevious:$r,numberOfColumns:p,nextLabel:v?.nextDecade,nextIcon:V,previousLabel:v?.previousDecade,previousIcon:H,decadeLabelFormat:ie,__onControlMouseEnter:P,__onControlClick:(xt,tn)=>{S&&fn(tn),Bt(dd("year",o,r)),y?.(tn)},__preventFocus:bt,__stopPropagation:_n,withCellSpacing:j},wn)))});oF.displayName="@mantine/dates/Calendar";var Uj=Object.getOwnPropertySymbols,yEe=Object.prototype.hasOwnProperty,_Ee=Object.prototype.propertyIsEnumerable,wEe=(e,t)=>{var n={};for(var r in e)yEe.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Uj)for(var r of Uj(e))t.indexOf(r)<0&&_Ee.call(e,r)&&(n[r]=e[r]);return n};function bEe(e){const t=e,{maxLevel:n,minLevel:r,defaultLevel:o,level:i,onLevelChange:s,nextIcon:a,previousIcon:c,date:u,defaultDate:f,onDateChange:p,numberOfColumns:g,columnsToScroll:v,ariaLabels:y,onYearSelect:w,onMonthSelect:P,onYearMouseEnter:x,onMonthMouseEnter:S,onNextMonth:O,onPreviousMonth:E,onNextYear:$,onPreviousYear:N,onNextDecade:I,onPreviousDecade:R,withCellSpacing:B,__updateDateOnYearSelect:z,__updateDateOnMonthSelect:G,firstDayOfWeek:X,weekdayFormat:Q,weekendDays:V,getDayProps:H,excludeDate:Z,renderDay:Y,hideOutsideDates:j,hideWeekdays:U,getDayAriaLabel:F,monthLabelFormat:K,monthsListFormat:ee,getMonthControlProps:fe,yearLabelFormat:ie,yearsListFormat:J,getYearControlProps:ne,decadeLabelFormat:le,allowSingleDateInRange:_e,allowDeselect:Ne,minDate:we,maxDate:He,locale:Te}=t,je=wEe(t,["maxLevel","minLevel","defaultLevel","level","onLevelChange","nextIcon","previousIcon","date","defaultDate","onDateChange","numberOfColumns","columnsToScroll","ariaLabels","onYearSelect","onMonthSelect","onYearMouseEnter","onMonthMouseEnter","onNextMonth","onPreviousMonth","onNextYear","onPreviousYear","onNextDecade","onPreviousDecade","withCellSpacing","__updateDateOnYearSelect","__updateDateOnMonthSelect","firstDayOfWeek","weekdayFormat","weekendDays","getDayProps","excludeDate","renderDay","hideOutsideDates","hideWeekdays","getDayAriaLabel","monthLabelFormat","monthsListFormat","getMonthControlProps","yearLabelFormat","yearsListFormat","getYearControlProps","decadeLabelFormat","allowSingleDateInRange","allowDeselect","minDate","maxDate","locale"]);return{calendarProps:{maxLevel:n,minLevel:r,defaultLevel:o,level:i,onLevelChange:s,nextIcon:a,previousIcon:c,date:u,defaultDate:f,onDateChange:p,numberOfColumns:g,columnsToScroll:v,ariaLabels:y,onYearSelect:w,onMonthSelect:P,onYearMouseEnter:x,onMonthMouseEnter:S,onNextMonth:O,onPreviousMonth:E,onNextYear:$,onPreviousYear:N,onNextDecade:I,onPreviousDecade:R,withCellSpacing:B,__updateDateOnYearSelect:z,__updateDateOnMonthSelect:G,firstDayOfWeek:X,weekdayFormat:Q,weekendDays:V,getDayProps:H,excludeDate:Z,renderDay:Y,hideOutsideDates:j,hideWeekdays:U,getDayAriaLabel:F,monthLabelFormat:K,monthsListFormat:ee,getMonthControlProps:fe,yearLabelFormat:ie,yearsListFormat:J,getYearControlProps:ne,decadeLabelFormat:le,allowSingleDateInRange:_e,allowDeselect:Ne,minDate:we,maxDate:He,locale:Te},others:je}}function xEe(e,t){if(t==="range"&&Array.isArray(e)){const[n,r]=e;return n?r?`${n.toISOString()} – ${r.toISOString()}`:`${n.toISOString()} –`:""}return t==="multiple"&&Array.isArray(e)?e.map(n=>n.toISOString()).join(", "):!Array.isArray(e)&&e?e.toISOString():""}function iF({value:e,type:t,name:n,form:r}){return k.createElement("input",{type:"hidden",value:xEe(e,t),name:n,form:r})}iF.displayName="@mantine/dates/HiddenDatesInput";const Zj=e=>e==="range"?[null,null]:e==="multiple"?[]:null;function sF({type:e,value:t,defaultValue:n,onChange:r}){const o=_.useRef(e),[i,s]=go({value:t,defaultValue:n,onChange:r,finalValue:Zj(e)});let a=i;return o.current!==e&&(o.current=e,t===void 0&&(a=n!==void 0?n:Zj(e),s(a))),[a,s]}function Gj(e,t){const n=[...t].sort((r,o)=>r.getTime()-o.getTime());return pe(n[0]).startOf("day").subtract(1,"ms").isBefore(e)&&pe(n[1]).endOf("day").add(1,"ms").isAfter(e)}function SEe({type:e,level:t,value:n,defaultValue:r,onChange:o,allowSingleDateInRange:i,allowDeselect:s,onMouseLeave:a}){const[c,u]=sF({type:e,value:n,defaultValue:r,onChange:o}),[f,p]=_.useState(e==="range"&&c[0]&&!c[1]?c[0]:null),[g,v]=_.useState(null),y=$=>{if(e==="range"){if(f instanceof Date&&!c[1]){if(pe($).isSame(f,t)&&!i){p(null),v(null),u([null,null]);return}const N=[$,f];N.sort((I,R)=>I.getTime()-R.getTime()),u(N),v(null),p(null);return}if(c[0]&&!c[1]&&pe($).isSame(c[0],t)&&!i){p(null),v(null),u([null,null]);return}u([$,null]),v(null),p($);return}if(e==="multiple"){c.some(N=>pe(N).isSame($,t))?u(c.filter(N=>!pe(N).isSame($,t))):u([...c,$]);return}c&&s&&pe($).isSame(c,t)?u(null):u($)},w=$=>f instanceof Date&&g instanceof Date?Gj($,[g,f]):c[0]instanceof Date&&c[1]instanceof Date?Gj($,c):!1,P=e==="range"?$=>{a?.($),v(null)}:a,x=$=>c[0]instanceof Date&&pe($).isSame(c[0],t)?!(g&&pe(g).isBefore(c[0])):!1,S=$=>c[1]instanceof Date?pe($).isSame(c[1],t):!(c[0]instanceof Date)||!g?!1:pe(g).isBefore(c[0])&&pe($).isSame(c[0],t);return{onDateChange:y,onRootMouseLeave:P,onHoveredDateChange:e==="range"&&f?v:()=>{},getControlProps:$=>{if(e==="range")return{selected:c.some(I=>I&&pe(I).isSame($,t)),inRange:w($),firstInRange:x($),lastInRange:S($),"data-autofocus":!!c[0]&&pe(c[0]).isSame($,t)||void 0};if(e==="multiple")return{selected:c.some(I=>I&&pe(I).isSame($,t)),"data-autofocus":!!c[0]&&pe(c[0]).isSame($,t)||void 0};const N=pe(c).isSame($,t);return{selected:N,"data-autofocus":N||void 0}},_value:c,setValue:u}}var PEe=Object.defineProperty,jy=Object.getOwnPropertySymbols,aF=Object.prototype.hasOwnProperty,lF=Object.prototype.propertyIsEnumerable,Yj=(e,t,n)=>t in e?PEe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Nw=(e,t)=>{for(var n in t||(t={}))aF.call(t,n)&&Yj(e,n,t[n]);if(jy)for(var n of jy(t))lF.call(t,n)&&Yj(e,n,t[n]);return e},OEe=(e,t)=>{var n={};for(var r in e)aF.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&jy)for(var r of jy(e))t.indexOf(r)<0&&lF.call(e,r)&&(n[r]=e[r]);return n};const CEe={type:"default",numberOfColumns:1},cF=_.forwardRef((e,t)=>{const n=ae("DatePicker",CEe,e),{type:r,defaultValue:o,value:i,onChange:s,__staticSelector:a,getDayProps:c,allowSingleDateInRange:u,allowDeselect:f,onMouseLeave:p,numberOfColumns:g}=n,v=OEe(n,["type","defaultValue","value","onChange","__staticSelector","getDayProps","allowSingleDateInRange","allowDeselect","onMouseLeave","numberOfColumns"]),{onDateChange:y,onRootMouseLeave:w,onHoveredDateChange:P,getControlProps:x}=SEe({type:r,level:"day",allowDeselect:f,allowSingleDateInRange:u,value:i,defaultValue:o,onChange:s,onMouseLeave:p});return k.createElement(oF,Nw({ref:t,minLevel:"month",__staticSelector:a||"DatePicker",onMouseLeave:w,hideOutsideDates:g!==1,numberOfColumns:g,__onDayMouseEnter:(S,O)=>P(O),__onDayClick:(S,O)=>y(O),getDayProps:S=>Nw(Nw({},x(S)),c?.(S))},v))});cF.displayName="@mantine/dates/DatePicker";function kEe({type:e,date:t,locale:n,format:r,labelSeparator:o}){const i=s=>pe(s).locale(n).format(r);return e==="default"?t===null?"":i(t):e==="multiple"?t.map(i).join(", "):e==="range"?t[0]&&t[1]?`${i(t[0])} ${o} ${i(t[1])}`:t[0]?`${i(t[0])} ${o} `:"":""}function EEe({type:e,value:t,defaultValue:n,onChange:r,locale:o,format:i,closeOnChange:s,sortDates:a,labelSeparator:c}){const u=za(),[f,p]=pS(!1),[g,v]=sF({type:e,value:t,defaultValue:n,onChange:r}),y=kEe({type:e,date:g,locale:u.getLocale(o),format:i,labelSeparator:u.getLabelSeparator(c)}),w=S=>{s&&(e==="default"&&p.close(),e==="range"&&S[0]&&S[1]&&p.close()),v(a&&e==="multiple"?[...S].sort((O,E)=>O.getTime()-E.getTime()):S)},P=()=>w(e==="range"?[null,null]:e==="multiple"?[]:null),x=e==="range"?!!g[0]:e==="multiple"?g.length>0:g!==null;return{_value:g,setValue:w,onClear:P,shouldClear:x,formattedValue:y,dropdownOpened:f,dropdownHandlers:p}}function $Ee({minDate:e,maxDate:t}){const n=new Date;return!e&&!t?n:pe(n).isBefore(e)?e:pe(n).isAfter(t)?t:n}var MEe=ue(()=>({placeholder:{},input:{cursor:"pointer",lineHeight:"unset","&[data-read-only]":{cursor:"default"}}}));const NEe=MEe;var TEe=Object.defineProperty,IEe=Object.defineProperties,jEe=Object.getOwnPropertyDescriptors,Ly=Object.getOwnPropertySymbols,uF=Object.prototype.hasOwnProperty,dF=Object.prototype.propertyIsEnumerable,Kj=(e,t,n)=>t in e?TEe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,qa=(e,t)=>{for(var n in t||(t={}))uF.call(t,n)&&Kj(e,n,t[n]);if(Ly)for(var n of Ly(t))dF.call(t,n)&&Kj(e,n,t[n]);return e},qj=(e,t)=>IEe(e,jEe(t)),LEe=(e,t)=>{var n={};for(var r in e)uF.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Ly)for(var r of Ly(e))t.indexOf(r)<0&&dF.call(e,r)&&(n[r]=e[r]);return n};const DEe={},fF=_.forwardRef((e,t)=>{const n=bP("PickerInputBase",DEe,e),{inputProps:r,wrapperProps:o,placeholder:i,classNames:s,styles:a,unstyled:c,popoverProps:u,modalProps:f,dropdownType:p,children:g,formattedValue:v,dropdownHandlers:y,dropdownOpened:w,onClick:P,clearable:x,onClear:S,clearButtonProps:O,rightSection:E,shouldClear:$,readOnly:N,disabled:I,value:R,name:B,form:z,type:G}=n,X=LEe(n,["inputProps","wrapperProps","placeholder","classNames","styles","unstyled","popoverProps","modalProps","dropdownType","children","formattedValue","dropdownHandlers","dropdownOpened","onClick","clearable","onClear","clearButtonProps","rightSection","shouldClear","readOnly","disabled","value","name","form","type"]),{classes:Q,cx:V}=NEe(null,{name:r.__staticSelector,classNames:s,styles:a,unstyled:c,variant:r.variant,size:r.size}),H=E||(x&&$&&!N&&!I?k.createElement(O0,qa({variant:"transparent",onClick:S,unstyled:c,size:r.size},O)):null),Z=()=>{G==="range"&&R[0]&&!R[1]&&S(),y.close()},Y=o.label;return k.createElement(k.Fragment,null,p==="modal"&&!N&&k.createElement(zi,qa({opened:w,onClose:Z,withCloseButton:!1,size:"auto","data-dates-modal":!0,unstyled:c},f),g),k.createElement(et.Wrapper,qa({},o),k.createElement(kn,qa({position:"bottom-start",opened:w,onClose:Z,disabled:p==="modal"||N,trapFocus:!0,returnFocus:!0,unstyled:c},u),k.createElement(kn.Target,{shouldOverrideDefaultTargetId:!Y},k.createElement(et,qa(qj(qa({"aria-label":v,"data-dates-input":!0,"data-read-only":N||void 0,disabled:I,component:"button",type:"button",multiline:!0,onClick:j=>{P?.(j),y.toggle()},rightSection:H},r),{ref:t,classNames:qj(qa({},s),{input:V(Q.input,s?.input)})}),X),v||k.createElement(et.Placeholder,{className:Q.placeholder,sx:{color:r.error?"inherit":void 0}},i))),k.createElement(kn.Dropdown,{"data-dates-dropdown":!0},g))),k.createElement(iF,{value:R,name:B,form:z,type:G}))});fF.displayName="@mantine/dates/PickerInputBase";var REe=Object.defineProperty,zEe=Object.defineProperties,AEe=Object.getOwnPropertyDescriptors,Dy=Object.getOwnPropertySymbols,pF=Object.prototype.hasOwnProperty,hF=Object.prototype.propertyIsEnumerable,Jj=(e,t,n)=>t in e?REe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Xj=(e,t)=>{for(var n in t||(t={}))pF.call(t,n)&&Jj(e,n,t[n]);if(Dy)for(var n of Dy(t))hF.call(t,n)&&Jj(e,n,t[n]);return e},BEe=(e,t)=>zEe(e,AEe(t)),FEe=(e,t)=>{var n={};for(var r in e)pF.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Dy)for(var r of Dy(e))t.indexOf(r)<0&&hF.call(e,r)&&(n[r]=e[r]);return n};const VEe={type:"default",valueFormat:"MMMM D, YYYY",closeOnChange:!0,sortDates:!0,dropdownType:"popover"},kO=_.forwardRef((e,t)=>{const n=ae("DatePickerInput",VEe,e),{type:r,value:o,defaultValue:i,onChange:s,valueFormat:a,labelSeparator:c,locale:u,classNames:f,styles:p,unstyled:g,closeOnChange:v,size:y,variant:w,dropdownType:P,sortDates:x,maxDate:S,minDate:O,defaultDate:E}=n,$=FEe(n,["type","value","defaultValue","onChange","valueFormat","labelSeparator","locale","classNames","styles","unstyled","closeOnChange","size","variant","dropdownType","sortDates","maxDate","minDate","defaultDate"]),{calendarProps:N,others:I}=bEe($),{_value:R,setValue:B,formattedValue:z,dropdownHandlers:G,dropdownOpened:X,onClear:Q,shouldClear:V}=EEe({type:r,value:o,defaultValue:i,onChange:s,locale:u,format:a,labelSeparator:c,closeOnChange:v,sortDates:x}),H=E||$Ee({maxDate:S,minDate:O});return k.createElement(fF,Xj({formattedValue:z,dropdownOpened:X,dropdownHandlers:G,classNames:f,styles:p,unstyled:g,__staticSelector:"DatePickerInput",ref:t,onClear:Q,shouldClear:V,value:R,type:r,size:y,variant:w,dropdownType:P},I),k.createElement(cF,BEe(Xj({},N),{size:y,variant:w,type:r,value:R,defaultDate:Array.isArray(R)?R[0]||H:R||H,onChange:B,locale:u,classNames:f,styles:p,unstyled:g,__staticSelector:"DatePickerInput",__stopPropagation:P==="popover",maxDate:S,minDate:O})))});kO.displayName="@mantine/dates/DatePickerInput";const a1=dn(e=>({selectedCharges:[],setSelectedCharges:t=>e(n=>({selectedCharges:typeof t=="function"?t(n.selectedCharges):t})),setSelectedCharge:(t,n)=>{e(r=>({selectedCharges:r.selectedCharges.map(o=>o.label===t?n(o):o)}))}})),HEe=ue(e=>({wrapper:{width:105,display:"flex",alignItems:"center",justifyContent:"space-between",padding:`${M(.5)} ${e.spacing.xs}`,borderRadius:e.radius.sm,border:`${M(1)} solid ${e.colorScheme==="dark"?"transparent":e.colors.gray[3]}`,backgroundColor:e.colorScheme==="dark"?e.colors.dark[5]:e.white,"&:focus-within":{borderColor:e.colors[e.primaryColor][6]}},control:{backgroundColor:e.colorScheme==="dark"?e.colors.dark[7]:e.white,border:`${M(1)} solid ${e.colorScheme==="dark"?"transparent":e.colors.gray[3]}`,"&:disabled":{borderColor:e.colorScheme==="dark"?"transparent":e.colors.gray[3],opacity:.8,backgroundColor:"transparent"}},input:{textAlign:"center",paddingRight:`${e.spacing.md} !important`,paddingLeft:`${e.spacing.sm} !important`,height:M(18),flex:1,"&:disabled":{backgroundColor:"#2C2E33",cursor:"auto",color:"#C1C2C5"}}})),WEe=({charge:e,index:t})=>{const{classes:n}=HEe(),{setSelectedCharge:r,setSelectedCharges:o}=a1();return h.jsxs("div",{className:"edit-charges-modal-charge-card",children:[h.jsx(W,{fz:"sm",fw:500,c:"white",style:{textAlign:"center"},children:e.label}),h.jsxs("div",{style:{display:"flex",gap:5,justifyContent:"center"},children:[h.jsxs(mt,{radius:"xs",variant:"filled",style:{backgroundColor:"rgb(42, 42, 42)",color:"white",fontSize:10,padding:12.5,margin:5,fontWeight:500},children:["$",e.fine," fine"]}),h.jsxs(mt,{radius:"xs",variant:"filled",style:{backgroundColor:"rgb(42, 42, 42)",color:"white",fontSize:10,padding:12.5,margin:5,fontWeight:500},children:[e.time," month(s)"]}),h.jsxs(mt,{radius:"xs",variant:"filled",style:{backgroundColor:"rgb(42, 42, 42)",color:"white",fontSize:10,padding:12.5,margin:5,fontWeight:500},children:[e.points," point(s)"]})]}),h.jsx(At,{label:e.description,multiline:!0,withArrow:!0,color:"gray",children:h.jsx(W,{fz:"xs",fw:500,mt:5,style:{textAlign:"center"},lineClamp:2,children:e.description})}),h.jsxs(nt,{position:"apart",style:{gap:5},children:[h.jsx(mt,{radius:"xs",variant:"filled",style:{fontSize:10,padding:12.5,fontWeight:500},color:e.type.toLocaleLowerCase()==="felony"?"red":e.type.toLocaleLowerCase()==="infraction"?"green":"yellow",children:e.type}),h.jsxs(nt,{style:{gap:5},children:[h.jsx(At,{label:D.remove_charge,withArrow:!0,color:"gray",children:h.jsx(Qe,{onClick:()=>{o(i=>i.filter((s,a)=>a!==t))},h:31,className:"action-icon",children:h.jsx(z0,{size:18})})}),h.jsxs("div",{className:n.wrapper,children:[h.jsx(Qe,{size:18,variant:"transparent",onClick:()=>r(e.label,i=>({...i,count:--i.count})),disabled:e.count===1,className:n.control,onMouseDown:i=>i.preventDefault(),children:h.jsx(Rhe,{size:"1rem",stroke:1.5})}),h.jsx(ma,{variant:"unstyled",min:1,max:99,value:e.count,classNames:{input:n.input},disabled:!0}),h.jsx(Qe,{size:18,variant:"transparent",onClick:()=>r(e.label,i=>({...i,count:++i.count})),className:n.control,onMouseDown:i=>i.preventDefault(),children:h.jsx(Eu,{size:"1rem",stroke:1.5})})]})]})]})]})},UEe=e=>{const t={reduction:null,fine:0,time:0,points:0};for(let n=0;n{const[t,n]=_.useState(!1),{selectedCharges:r,setSelectedCharges:o}=a1(),{setCriminal:i}=Ur();return h.jsx(st,{variant:"light",color:"gray",loading:t,onClick:async()=>{n(!0);const s=await me("getRecommendedWarrantExpiry",r,{data:Date.now()});i(e.citizenid,a=>({...a,charges:r,penalty:UEe(r),warrantExpiry:new Date(s)})),n(!1),o([]),ke.closeAll()},children:D.confirm})},GEe=({criminal:e})=>{const{selectedCharges:t,setSelectedCharges:n}=a1(),{charges:r}=Yf(),[o,i]=_.useState({}),[s,a]=_.useState(!1),[c,u]=_.useState(null),f=500,[p,g]=_.useState(""),[v,y]=_.useState(p);return _.useEffect(()=>{c!==null&&clearTimeout(c),a(!0);const w=setTimeout(()=>{y(p),a(!1)},f);return u(w),()=>{clearTimeout(w)}},[p]),_.useEffect(()=>{if(v.trim()==="")i(r);else{const w=Object.entries(r).reduce((P,[x,S])=>{const O=v.trim()?S.filter(E=>E.label.toLowerCase().includes(v.toLowerCase())):S;return O.length>0&&(P[x]=O),P},{});i(w)}},[v,r]),h.jsxs("div",{className:"edit-charges-modal",children:[h.jsx(Ye,{}),h.jsxs("div",{className:"edit-charges-modal-content",children:[h.jsxs("div",{className:"edit-charges-modal-current-charges",children:[h.jsx(W,{fz:"md",fw:500,c:"white",mb:5,children:D.current_charges}),h.jsx(St,{h:620,children:h.jsx("div",{className:"edit-charges-modal-added-charges",children:t.map((w,P)=>h.jsx(WEe,{charge:w,index:P},P))})}),h.jsx(ZEe,{criminal:e})]}),h.jsx(Ye,{orientation:"vertical"}),h.jsxs("div",{className:"edit-charges-modal-all-charges",children:[h.jsxs("div",{className:"edit-charges-modal-all-charges-header",children:[h.jsx(W,{fz:"md",fw:500,c:"white",mb:5,children:D.all_charges}),h.jsx(yn,{radius:"xs",variant:"filled",placeholder:D.search,w:300,value:p,onChange:w=>g(w.target.value)})]}),h.jsx(St,{h:635,children:h.jsx("div",{className:"edit-charges-modal-all-charges-list",children:s?h.jsx("div",{style:{display:"flex",width:"100%",marginTop:100,justifyContent:"center",alignItems:"center"},children:h.jsx(en,{})}):h.jsx(h.Fragment,{children:Object.entries(o).map(([w,P])=>h.jsxs("div",{children:[h.jsx(W,{style:{fontSize:17,color:"white"},weight:500,children:w}),h.jsx("div",{className:"edit-charges-modal-charges-content",children:P.map((x,S)=>h.jsxs("div",{className:"edit-charges-modal-charge-card",children:[h.jsx(W,{fz:"sm",fw:500,c:"white",style:{textAlign:"center"},children:x.label}),h.jsxs("div",{style:{display:"flex",gap:5,justifyContent:"center"},children:[h.jsxs(mt,{radius:"xs",variant:"filled",style:{backgroundColor:"rgb(42, 42, 42)",color:"white",fontSize:10,padding:12.5,margin:5,fontWeight:500},children:["$",x.fine," fine"]}),h.jsxs(mt,{radius:"xs",variant:"filled",style:{backgroundColor:"rgb(42, 42, 42)",color:"white",fontSize:10,padding:12.5,margin:5,fontWeight:500},children:[x.time," ",D.months]}),h.jsxs(mt,{radius:"xs",variant:"filled",style:{backgroundColor:"rgb(42, 42, 42)",color:"white",fontSize:10,padding:12.5,margin:5,fontWeight:500},children:[x.points," ",D.points]})]}),h.jsx(At,{label:x.description,multiline:!0,withArrow:!0,color:"gray",children:h.jsx(W,{fz:"xs",fw:500,mt:5,style:{textAlign:"center"},lineClamp:2,children:x.description})}),h.jsxs(nt,{position:"apart",children:[h.jsx(mt,{radius:"xs",variant:"filled",style:{fontSize:10,padding:12.5,fontWeight:500},color:x.type.toLocaleLowerCase()==="felony"?"red":x.type.toLocaleLowerCase()==="infraction"?"green":"yellow",children:x.type}),h.jsx(At,{label:D.add_charge,withArrow:!0,color:"gray",children:h.jsx(Qe,{onClick:()=>n(O=>{const E=O.findIndex($=>$.label===x.label);return E===-1?[...O,{...x,count:1}]:O.map(($,N)=>N===E?{...$,count:++$.count}:$)}),h:31,className:"action-icon",children:h.jsx(Eu,{size:18})})})]})]},S))})]},w))})})})]})]})]})},mF=e=>Intl.NumberFormat("en-US",{style:"currency",currency:"USD",maximumFractionDigits:0}).format(e),Qj=[25,50,75,80,90],Ry=(e,t)=>t?Math.round(e-t/100*e):e,YEe=e=>{const t=[];if(!e)return[];for(let n=0;n{const{incident:t,setCriminals:n,setCriminal:r}=Ur(),{setSelectedCharges:o}=a1(),{setSelectedProfile:i}=Li(),s=Ul();return h.jsxs("div",{className:"incident-criminal-card-background",children:[h.jsxs("div",{className:"incident-criminal-card-header",children:[h.jsxs(W,{style:{fontSize:15,color:"white"},weight:600,children:[e.firstname," ",e.lastname]}),h.jsxs("div",{className:"incident-criminal-card-buttons",children:[h.jsx(At,{label:D.remove_criminal,withArrow:!0,color:"gray",position:"bottom",children:h.jsx(Qe,{variant:"light",color:"red",onClick:()=>{ke.openConfirmModal({title:h.jsx(W,{style:{fontSize:17,color:"white"},weight:500,children:D.remove_criminal}),size:"sm",centered:!0,labels:{confirm:D.confirm,cancel:D.cancel},groupProps:{spacing:6},confirmProps:{color:"red"},onConfirm:async()=>{await me("removeCriminal",{id:t.id,criminalId:e.citizenid},{data:1})&&n(c=>c.filter(u=>u.citizenid!==e.citizenid))},children:h.jsx(W,{size:"sm",c:"dark.2",children:D.remove_criminal_confirm.format(e.firstname,e.lastname)})})},children:h.jsx(z0,{size:16,color:"white"})})}),h.jsx(At,{label:D.go_to_profile,withArrow:!0,color:"gray",position:"bottom",children:h.jsx(Qe,{variant:"light",color:"dark",onClick:async()=>{if(!at()){const a=await me("getProfile",e.citizenid);i(a)}s("/profiles")},children:h.jsx(Khe,{size:16,color:"white"})})}),h.jsx(At,{label:D.save_criminal,withArrow:!0,color:"gray",position:"bottom",children:h.jsx(Qe,{variant:"light",color:"dark",onClick:()=>{me("saveCriminal",{id:t.id,criminal:{...e,warrantExpiry:e.warrantExpiry?pe(e.warrantExpiry).format("YYYY-MM-DD HH:mm:ss"):null}},{data:1})},children:h.jsx(P8,{size:16,color:"white"})})})]})]}),h.jsxs(W,{color:"dimmed",size:"xs",children:["#",e.citizenid]}),h.jsxs("div",{className:"incident-criminal-content",children:[h.jsxs("div",{className:"incident-criminal-edit-charges-badges",children:[h.jsx(mt,{radius:"xs",variant:"light",style:{color:"white",fontSize:10,padding:12.5,cursor:"pointer",backgroundColor:"#343a40"},w:125,onClick:()=>{o(e.charges),ke.open({title:h.jsx(W,{style:{fontSize:17,color:"white"},weight:500,children:D.edit_charges}),styles:{body:{height:700,overflow:"hidden"},content:{width:1400}},centered:!0,size:1445,children:h.jsx(GEe,{criminal:e})})},children:D.edit_charges}),e.charges.map((a,c)=>h.jsxs(mt,{radius:"xs",variant:"filled",style:{fontSize:10,padding:12.5,fontWeight:500},color:a.type.toLowerCase()==="felony"?"red":a.type.toLowerCase()==="infraction"?"green":"yellow",children:[a.count,"x ",a.label]},c))]}),h.jsx(Ye,{style:{width:"100%"}}),h.jsx(mr,{label:D.issue_warrant,description:D.issue_warrant_description,checked:e.issueWarrant,onChange:()=>r(e.citizenid,a=>({...a,issueWarrant:!a.issueWarrant}))}),e.issueWarrant?h.jsx(kO,{icon:h.jsx(DP,{size:20}),label:D.warrant_expiration_date,placeholder:"2023-03-12",weekendDays:[],minDate:new Date,value:e.warrantExpiry?new Date(e.warrantExpiry):null,onChange:a=>{r(e.citizenid,c=>({...c,warrantExpiry:a}))}}):h.jsxs(h.Fragment,{children:[h.jsx(Nl,{label:D.reduction,value:e.penalty.reduction?e.penalty.reduction.toString():null,data:YEe(e.penalty),icon:h.jsx(fhe,{size:20}),onChange:a=>r(e.citizenid,c=>({...c,penalty:c.penalty?{...c.penalty,reduction:a?+a:null}:{reduction:a?+a:null,time:0,fine:0,points:0}})),clearable:!0,placeholder:D.no_reduction,variant:"filled"}),h.jsxs(nt,{children:[h.jsxs(W,{size:"xs",style:{color:"white"},children:[D.time,": ",Ry(e.penalty.time,e.penalty.reduction)," ",D.months]}),h.jsxs(W,{size:"xs",style:{color:"white"},children:[D.fine,": ",mF(Ry(e.penalty.fine,e.penalty.reduction))]})]}),h.jsxs(nt,{children:[h.jsx(mr,{label:D.pleaded_guilty,checked:e.pleadedGuilty,onChange:()=>r(e.citizenid,a=>({...a,pleadedGuilty:!a.pleadedGuilty}))}),h.jsx(mr,{label:D.processed,checked:e.processed,onChange:()=>r(e.citizenid,a=>({...a,processed:!a.processed}))})]})]})]})]})},qEe=()=>{const{incident:e,isIncidentActive:t}=Ur();return t?h.jsx(St,{h:860,children:h.jsxs("div",{className:"incident-criminals-content-width",children:[h.jsxs(st,{fullWidth:!0,variant:"light",color:"gray",onClick:()=>ke.open({title:h.jsx(W,{style:{fontSize:17,color:"white"},weight:500,children:D.add_criminal}),centered:!0,size:"sm",children:h.jsx(ZCe,{})}),children:[h.jsx(N8,{size:M(18),style:{marginRight:5}})," ",D.add_criminal]}),e.criminals.map(n=>h.jsx(KEe,{criminal:n},n.citizenid))]})}):h.jsx("div",{className:"content-width",children:h.jsx("div",{className:"card-background",children:h.jsxs("div",{className:"profile-no-selected",children:[h.jsx(D0,{size:M(50),color:"white"}),h.jsx(W,{style:{fontSize:15,color:"white"},weight:600,children:D.no_incident_selected})]})})})},JEe=()=>{const{setActiveIncident:e,setIncidentActive:t}=Ur(),[n,r]=_.useState(!1),o=async i=>{r(!0);const s=await me("getIncident",i.id,{data:{id:1,officersInvolved:[],evidence:[],title:i.title,description:"

",criminals:[]}});e(s),t(!0),r(!1)};return h.jsxs("div",{className:"incidents",children:[h.jsx(zCe,{handleIncidentClick:o}),h.jsx(Wf,{visible:n,overlayOpacity:.97,overlayColor:"rgb(34, 35, 37)",transitionDuration:250,loader:o1,style:{left:795,width:935,height:"96%",top:19,borderRadius:"0.25rem"}}),h.jsx(HCe,{}),h.jsx(qEe,{})]})};const XEe=[{firstname:"John",lastname:"Doe",callsign:"1A-01",citizenid:"ABCD1234",playerId:1,position:[0,0,0],unitId:1,image:"",title:"Chief",apu:!0,air:!0,mc:!0,k9:!0,fto:!0,lastActive:Date.now()},{firstname:"Jenna",lastname:"Doe",callsign:"1A-02",citizenid:"ABCD1235",playerId:2,position:[0,0,0],image:"",title:"Captain",apu:!1,air:!0,mc:!0,k9:!1,fto:!1,lastActive:Date.now()}],Tu=dn(e=>({rosterOfficers:at()?XEe:[],getRosterOfficers:async()=>{try{const t=await me("fetchRoster");return e({rosterOfficers:t}),{rosterOfficers:t}}catch(t){return console.error("Failed to fetch recent activities:",t),{rosterOfficers:[]}}},setRosterOfficers:t=>{e(n=>({rosterOfficers:typeof t=="function"?t(n.rosterOfficers):t}))}})),QEe=({officer:e})=>{const[t,n]=_.useState(!1),{setRosterOfficers:r}=Tu(),o=Zl({initialValues:{callsign:e.callsign}});return h.jsx("form",{onSubmit:o.onSubmit(async i=>{n(!0);const s=await me("setOfficerCallSign",{citizenid:e.citizenid,callsign:i.callsign},{data:!0,delay:500});if(n(!1),!s)return o.setFieldError("callSign",D.callsign_in_use);r(a=>a.map(c=>c.citizenid===e.citizenid?{...e,callsign:i.callsign}:c)),ke.closeAll()}),children:h.jsxs(Je,{children:[h.jsx(yn,{label:D.callsign,...o.getInputProps("callsign")}),h.jsx(st,{type:"submit",color:"gray",loading:t,variant:"light",children:D.confirm})]})})},e$e=({officer:e})=>{const t=["Cadet","Probationary Trooper","Trooper","Senior Trooper","Master Trooper","Corporal","Sergeant","Lieutenant","Captain","Assistant Chief","Chief"],[n,r]=_.useState(null),[o,i]=_.useState(!1),{setRosterOfficers:s}=Tu(),a=async()=>{n===null||(i(!0),!await me("setOfficerRank",{citizenId:e.citizenid,grade:+n},{data:!0}))||(s(u=>u.map(f=>f.citizenid===e.citizenid?{...e,title:`${t[n]}`}:f)),i(!1),ke.closeAll())};return h.jsxs(Je,{children:[h.jsx(Nl,{withinPortal:!0,value:n!==null?n.toString():null,data:t?t.map((c,u)=>({label:c,value:u.toString()})):[],onChange:c=>r(c!==null?+c:null),label:D.rank}),h.jsx(st,{variant:"light",color:"gray",onClick:a,loading:o,children:D.confirm})]})},t$e=({officer:e})=>{const[t,n]=_.useState(!1),{setRosterOfficers:r}=Tu(),[o,i]=_.useState(e.apu||!1),[s,a]=_.useState(e.air||!1),[c,u]=_.useState(e.mc||!1),[f,p]=_.useState(e.k9||!1),[g,v]=_.useState(e.fto||!1),y=async()=>{n(!0),await me("setOfficerRoles",{citizenid:e.citizenid,roles:{apu:o,air:s,mc:c,k9:f,fto:g}},{data:!0,delay:500}),n(!1),r(w=>w.map(P=>P.citizenid===e.citizenid?{...e,apu:o,air:s,mc:c,k9:f,fto:g}:P)),ke.closeAll()};return h.jsxs(Je,{children:[h.jsxs("div",{style:{display:"flex",gap:15,alignItems:"center",justifyContent:"center"},children:[h.jsx(mr,{label:D.apu,checked:o,onChange:()=>{i(!o)}}),h.jsx(mr,{label:D.air,checked:s,onChange:()=>{a(!s)}}),h.jsx(mr,{label:D.mc,checked:c,onChange:()=>{u(!c)}}),h.jsx(mr,{label:D.k9,checked:f,onChange:()=>{p(!f)}}),h.jsx(mr,{label:D.fto,checked:g,onChange:()=>{v(!g)}})]}),h.jsx(st,{type:"submit",color:"gray",loading:t,variant:"light",onClick:y,children:D.confirm})]})},n$e=({officers:e,hasPermission:t})=>{const{setRosterOfficers:n}=Tu(),r=s=>s.charAt(0).toUpperCase()+s.slice(1),o=s=>{const a=pe(),c=pe(s),u=a.diff(c,"day");return r(u===0?D.today:u===1?D.yesterday:pe(s).fromNow())},i=e.map(s=>h.jsxs("tr",{children:[h.jsx("td",{children:h.jsxs(nt,{spacing:"sm",children:[h.jsx(CP,{size:55,src:s.image,radius:5}),h.jsx("div",{children:h.jsxs(W,{fz:"sm",fw:500,children:[s.firstname," ",s.lastname]})})]})}),h.jsx("td",{children:s.callsign}),h.jsx("td",{children:h.jsx(mr,{checked:s.apu,disabled:!0,styles:{input:{"&:disabled ":{backgroundColor:s.apu?"#1971c2":"#373A40"}}}})}),h.jsx("td",{children:h.jsx(mr,{checked:s.air,disabled:!0,styles:{input:{"&:disabled ":{backgroundColor:s.air?"#1971c2":"#373A40"}}}})}),h.jsx("td",{children:h.jsx(mr,{checked:s.mc,disabled:!0,styles:{input:{"&:disabled ":{backgroundColor:s.mc?"#1971c2":"#373A40"}}}})}),h.jsx("td",{children:h.jsx(mr,{checked:s.k9,disabled:!0,styles:{input:{"&:disabled ":{backgroundColor:s.k9?"#1971c2":"#373A40"}}}})}),h.jsx("td",{children:h.jsx(mr,{checked:s.fto,disabled:!0,styles:{input:{"&:disabled ":{backgroundColor:s.fto?"#1971c2":"#373A40"}}}})}),h.jsx("td",{children:s.lastActive?o(s.lastActive):""}),h.jsx("td",{children:h.jsx(et,{disabled:!0,icon:h.jsx(w8,{size:16}),variant:"unstyled",placeholder:s.title,size:"xs"})}),h.jsx("td",{children:h.jsx(nt,{spacing:2,position:"right",children:h.jsxs(It,{withinPortal:!0,withArrow:!0,position:"bottom-end",children:[h.jsx(It.Target,{children:h.jsx(Qe,{children:h.jsx(Fhe,{size:"1.2rem",stroke:1.5})})}),h.jsxs(It.Dropdown,{children:[h.jsx(It.Item,{icon:h.jsx(zhe,{size:20}),onClick:()=>ke.open({title:h.jsx(W,{style:{fontSize:17,color:"white"},weight:500,children:D.set_callsign}),children:h.jsx(QEe,{officer:s}),size:"xs",centered:!0}),children:D.set_callsign}),h.jsx(It.Item,{disabled:t,icon:h.jsx(ohe,{size:20}),onClick:()=>ke.open({title:h.jsx(W,{style:{fontSize:17,color:"white"},weight:500,children:D.set_rank}),centered:!0,size:"xs",children:h.jsx(e$e,{officer:s})}),children:D.set_rank}),h.jsx(It.Item,{disabled:t,icon:h.jsx(The,{size:20}),onClick:()=>ke.open({title:h.jsx(W,{style:{fontSize:17,color:"white"},weight:500,children:D.set_roles}),centered:!0,size:"sm",children:h.jsx(t$e,{officer:s})}),children:D.set_roles}),h.jsx(It.Item,{icon:h.jsx(Gf,{size:20}),color:"red",disabled:t,onClick:()=>ke.openConfirmModal({title:h.jsx(W,{style:{fontSize:17,color:"white"},weight:500,children:D.fire_officer}),children:h.jsx(W,{c:"dark.2",size:"sm",children:D.fire_officer_description.format(s.firstname,s.lastname)}),labels:{confirm:D.confirm,cancel:D.cancel},centered:!0,groupProps:{spacing:6},confirmProps:{color:"red"},onConfirm:async()=>{await me("fireOfficer",s.citizenid,{data:!0})&&(n(c=>c.filter(u=>u.citizenid!==s.citizenid)),ke.closeAll())}}),children:D.fire_officer})]})]})})})]},s.citizenid));return h.jsx(St,{h:735,children:h.jsxs(Zc,{verticalSpacing:"sm",children:[h.jsx("thead",{children:h.jsxs("tr",{children:[h.jsx("th",{children:D.officer}),h.jsx("th",{children:D.callsign}),h.jsx("th",{children:D.apu}),h.jsx("th",{children:D.air}),h.jsx("th",{children:D.mc}),h.jsx("th",{children:D.k9}),h.jsx("th",{children:D.fto}),h.jsx("th",{children:D.last_active}),h.jsx("th",{children:D.role}),h.jsx("th",{})]})}),h.jsx("tbody",{children:i})]})})},r$e=()=>{const{getRosterOfficers:e}=Tu(),[t,n]=_.useState(!1),r=Zl({initialValues:{citizenid:"",callsign:""}});return h.jsx("form",{onSubmit:r.onSubmit(async o=>{n(!0);const i=await me("hireOfficer",{citizenid:o.citizenid,callsign:o.callsign,lastActive:Date.now()},{data:!1,delay:500});if(n(!1),!i)return r.setFieldError("citizenid",D.citizen_id_already_hired);await e(),ke.closeAll()}),children:h.jsxs(Je,{children:[h.jsx(yn,{label:D.citizen_id,description:D.citizen_id_you_want_to_hire,required:!0,...r.getInputProps("citizenid")}),h.jsx(yn,{label:D.callsign,description:D.callsign_you_want_to_hire,required:!0,...r.getInputProps("callsign")}),h.jsx(st,{variant:"light",color:"gray",type:"submit",loading:t,children:D.confirm})]})})},o$e=()=>{const{rosterOfficers:e,getRosterOfficers:t}=Tu(),[n,r]=_.useState(""),[o,i]=_.useState(e),s=200,[a,c]=_.useState(n),[u,f]=_.useState(null),[p,g]=_.useState(!1),v=bo(w=>w.personalData.role);function y(w){return!(w==="Chief"||w==="Assistant Chief"||w==="Captain"||w==="Lieutenant"||w==="Sergeant")}return _.useEffect(()=>{u!==null&&clearTimeout(u),g(!0);const w=setTimeout(()=>{c(n),g(!1)},s);return f(w),()=>{clearTimeout(w)}},[n]),_.useEffect(()=>{if(a.trim()==="")i(e);else{const w=e.filter(P=>(P.firstname||"").toLocaleLowerCase().includes(n.toLocaleLowerCase())||(P.lastname||"").toLocaleLowerCase().includes(n.toLocaleLowerCase()));i(w)}},[a,e]),_.useEffect(()=>{g(!0),(async()=>await t())().then(()=>{g(!1)})},[]),h.jsxs("div",{className:"roster",children:[h.jsxs("div",{className:"roster-top",children:[h.jsxs("div",{children:[h.jsx(W,{style:{fontSize:12},weight:500,c:"dimmed",children:D.manage_roster}),h.jsx(W,{style:{fontSize:24,color:"white"},weight:500,children:D.roster})]}),h.jsxs("div",{className:"roster-top-right",style:{display:"flex",gap:15,alignItems:"center"},children:[h.jsxs(W,{style:{fontSize:13,textAlign:"center"},weight:500,c:"dimmed",children:[e.length," ",D.members]}),h.jsx(yn,{placeholder:D.search,variant:"filled",value:n,onChange:w=>r(w.target.value)}),h.jsx(st,{leftIcon:h.jsx(N8,{size:20}),style:{backgroundColor:"rgba(51, 124, 255, 0.2)",color:"rgba(159, 194, 255, 1)"},onClick:()=>ke.open({title:h.jsx(W,{style:{fontSize:17,color:"white"},weight:500,children:D.hire_officer}),centered:!0,size:"xs",children:h.jsx(r$e,{})}),disabled:y(v),children:D.hire_officer})]})]}),h.jsx("div",{className:"roster-list",children:p?h.jsx(Pr,{children:h.jsx(en,{})}):h.jsx(n$e,{officers:o,hasPermission:y(v)})})]})};const i$e=({charge:e})=>{const{setCharges:t}=Yf(),[n,r]=_.useState(!1),[o,i]=_.useState(e.fine),[s,a]=_.useState(e.time),[c,u]=_.useState(e.points),f=bo(v=>v.personalData.role);function p(v){return!(v==="Chief"||v==="Assistant Chief"||v==="Captain"||v==="Lieutenant"||v==="Sergeant")}const g=async()=>{r(!0),await me("editCharge",{chargelabel:e.label,fine:o,time:s,points:c},{data:!0})&&(r(!1),t(y=>{const w={...y};return Object.keys(y).forEach(P=>{w[P]=y[P].map(x=>x.label===e.label?{...e,fine:Number(o),time:Number(s),points:Number(c)}:x)}),w}),ke.closeAll())};return h.jsxs(Je,{children:[h.jsx(ma,{withAsterisk:!0,label:D.charge_fine,value:o,onChange:i,min:0,variant:"filled",placeholder:D.charge_fine,parser:v=>v.replace(/\$\s?|(,*)/g,""),formatter:v=>Number.isNaN(parseFloat(v))?"$ ":`$ ${v}`.replace(/\B(?{const{setCharges:t}=Yf(),n=bo(o=>o.personalData.role);function r(o){return!(o==="Chief"||o==="Assistant Chief"||o==="Captain"||o==="Lieutenant"||o==="Sergeant")}return h.jsxs("div",{className:"charges-charge-card",children:[h.jsx(W,{fz:"sm",fw:500,c:"white",style:{textAlign:"center"},children:e.label}),h.jsxs("div",{style:{display:"flex",gap:5,justifyContent:"center"},children:[h.jsxs(mt,{radius:"xs",variant:"filled",style:{backgroundColor:"rgb(42, 42, 42)",color:"white",fontSize:10,padding:12.5,fontWeight:500},children:["$",e.fine," ",D.fine]}),h.jsxs(mt,{radius:"xs",variant:"filled",style:{backgroundColor:"rgb(42, 42, 42)",color:"white",fontSize:10,padding:12.5,fontWeight:500},children:[e.time," ",D.months]}),h.jsxs(mt,{radius:"xs",variant:"filled",style:{backgroundColor:"rgb(42, 42, 42)",color:"white",fontSize:10,padding:12.5,fontWeight:500},children:[e.points," ",D.points]})]}),h.jsx(At,{label:e.description,multiline:!0,withArrow:!0,color:"gray",children:h.jsx(W,{fz:"xs",fw:500,mt:2,style:{textAlign:"center",color:"white"},lineClamp:2,children:e.description})}),h.jsxs(nt,{position:"apart",style:{flex:"1"},children:[h.jsx(mt,{radius:"xs",variant:"filled",style:{fontSize:10,padding:12.5,fontWeight:500},color:e.type.toLocaleLowerCase()==="felony"?"red":e.type.toLocaleLowerCase()==="infraction"?"green":"yellow",children:e.type.charAt(0).toUpperCase()+e.type.slice(1)}),h.jsxs("div",{style:{display:"flex",gap:5,alignItems:"center"},children:[h.jsx(Qe,{variant:"light",disabled:r(n),onClick:()=>{ke.openConfirmModal({title:h.jsx(W,{style:{fontSize:17,color:"white"},weight:500,children:D.delete_charge}),size:"sm",centered:!0,labels:{confirm:D.confirm,cancel:D.cancel},groupProps:{spacing:6},confirmProps:{color:"red"},onConfirm:async()=>{await me("deleteCharge",{label:e.label},{data:1})&&t(i=>{const s={};return Object.keys(i).forEach(a=>{s[a]=i[a].filter(c=>c.label!==e.label)}),s})},children:h.jsx(W,{size:"sm",c:"dark.2",children:D.delete_charge_confirm.format(e.label)})})},children:h.jsx(z0,{size:16,color:r(n)?"gray":"white"})}),h.jsx(st,{disabled:r(n),color:"gray",compact:!0,onClick:()=>ke.open({title:h.jsx(W,{style:{fontSize:17,color:"white"},weight:500,children:D.edit_charge}),centered:!0,size:"sm",children:h.jsx(i$e,{charge:e})}),children:D.edit})]})]})]})},a$e=()=>{const{charges:e,setCharges:t}=Yf(),n=bo(E=>E.personalData.role),[r,o]=_.useState(""),[i,s]=_.useState(""),[a,c]=_.useState(""),[u,f]=_.useState(0),[p,g]=_.useState(0),[v,y]=_.useState(0),[w,P]=_.useState("infraction");function x(E){return!(E==="Chief"||E==="Assistant Chief"||E==="Captain"||E==="Lieutenant"||E==="Sergeant")}const S=E=>E.sort(($,N)=>{const I={infraction:1,misdemeanor:2,felony:3};return I[$.type]-I[N.type]}),O=async()=>{r.length<3||i.length<3||a.length<2||u===""||u<=0||w.length<3||(at()?t(E=>{const $={...E};return $[a].push({label:r,description:i,fine:u,time:Number(p),points:Number(v),type:w}),$}):(await me("createCharge",{label:r,description:i,category:a,fine:u,time:p,points:v,type:w},{data:1}),t(E=>{const $={...E};return $[a].push({label:r,description:i,fine:u,time:Number(p),points:Number(v),type:w}),$})),o(""),s(""),c(""),f(0),g(0),y(0),P("infraction"))};return h.jsxs("div",{className:"charges",children:[h.jsx("div",{className:"top-side-create-charges",children:h.jsxs("div",{className:"charges-create",children:[h.jsx(W,{style:{fontSize:17,color:"white"},weight:500,children:D.create_charge}),h.jsxs("div",{className:"charges-create-content",children:[h.jsx(yn,{withAsterisk:!0,label:D.charge_label,variant:"filled",placeholder:D.charge_label,value:r,onChange:E=>o(E.target.value),w:200,disabled:x(n)}),h.jsx(yn,{withAsterisk:!0,label:D.charge_description,variant:"filled",placeholder:D.charge_description,value:i,onChange:E=>s(E.target.value),w:250,disabled:x(n)}),h.jsx(Nl,{withAsterisk:!0,label:D.charge_category,placeholder:D.charge_category,variant:"filled",data:[{value:"OFFENSES AGAINST PERSONS",label:"OFFENSES AGAINST PERSONS"},{value:"OFFENSES INVOLVING THEFT",label:"OFFENSES INVOLVING THEFT"},{value:"OFFENSES INVOLVING FRAUD",label:"OFFENSES INVOLVING FRAUD"},{value:"OFFENSES INVOLVING DAMAGE TO PROPERTY",label:"OFFENSES INVOLVING DAMAGE TO PROPERTY"},{value:"OFFENSES AGAINST PUBLIC ADMINISTRATION",label:"OFFENSES AGAINST PUBLIC ADMINISTRATION"},{value:"OFFENSES AGAINST PUBLIC ORDER",label:"OFFENSES AGAINST PUBLIC ORDER"},{value:"OFFENSES AGAINST HEALTH AND MORALS",label:"OFFENSES AGAINST HEALTH AND MORALS"},{value:"OFFENSES AGAINST PUBLIC SAFETY",label:"OFFENSES AGAINST PUBLIC SAFETY"},{value:"OFFENSES INVOLVING THE OPERATION OF A VEHICLE",label:"OFFENSES INVOLVING THE OPERATION OF A VEHICLE"},{value:"OFFENSES INVOLVING THE WELL-BEING OF WILDLIFE",label:"OFFENSES INVOLVING THE WELL-BEING OF WILDLIFE"}],value:a,onChange:E=>c(E),w:275,disabled:x(n)}),h.jsx(ma,{withAsterisk:!0,label:D.charge_fine,value:u,onChange:f,min:0,variant:"filled",placeholder:D.charge_fine,w:140,parser:E=>E.replace(/\$\s?|(,*)/g,""),formatter:E=>Number.isNaN(parseFloat(E))?"$ ":`$ ${E}`.replace(/\B(?P(E)})]}),h.jsx("div",{className:"charges-create-buttons",children:h.jsx(st,{color:"green",disabled:x(n),onClick:O,children:D.create})})]})}),h.jsx(St,{h:700,scrollbarSize:4,children:h.jsx("div",{className:"charges-all-charges",children:h.jsx("div",{className:"charges-category",children:Object.entries(e).map(([E,$])=>h.jsxs("div",{children:[h.jsx(W,{style:{fontSize:17,color:"white"},weight:500,children:E}),h.jsx("div",{className:"charges-cards-row",children:S($).map(N=>h.jsx(s$e,{charge:N},N.label))})]},E))})})})]})};const l$e=ue(e=>({header:{position:"sticky",top:-1,backgroundColor:e.colorScheme==="dark"?e.colors.dark[7]:e.white,transition:"box-shadow 150ms ease","&::after":{content:'""',position:"absolute",left:0,right:0,bottom:0,borderBottom:`${M(1)} solid ${e.colorScheme==="dark"?e.colors.dark[3]:e.colors.gray[2]}`}},scrolled:{boxShadow:e.shadows.sm}})),c$e=[{code:"10-0",description:"Mistet mistænkte af syne"},{code:"10-3",description:"Stop radio transmission"},{code:"10-4",description:"Modtaget"},{code:"10-6",description:"Ikke tilgængelig"},{code:"10-7",description:"Off-Duty"},{code:"10-8",description:"On-duty"},{code:"10-9",description:"Gentag"},{code:"10-10",description:"Skift radio frekvens"},{code:"10-13",description:"Skud affyret"},{code:"10-14",description:"Stolen numberplate"},{code:"10-15",description:"Igangværende biltyveri"},{code:"10-16",description:"Brug for persontransport"},{code:"10-19",description:"Kører tilbage til stationen"},{code:"10-20",description:"Position"},{code:"10-22",description:"Ignorer sidste signal"},{code:"10-23",description:"Ankommet til _____"},{code:"10-25",description:"Mangler køremakker"},{code:"10-26",description:"Person i varetægt"},{code:"10-28",description:"Tjek MDT for oplysninger"},{code:"10-37",description:"Afvent"},{code:"10-38",description:"Trafikstop"},{code:"10-39",description:"Mistænkelig adfærd"},{code:"10-43",description:"Kald en læge"},{code:"10-50",description:"Færdselsuheld"},{code:"10-51",description:"Totalskadet køretøj"},{code:"10-56",description:"Butiks-/juvelrøveri"},{code:"10-66",description:"Husrøveri"},{code:"10-76",description:"På vej til"},{code:"10-77",description:"Ankomsttid / ETA"},{code:"10-78",description:"Brug for assistance"},{code:"10-80",description:"Biljagt"},{code:"10-81",description:"Jagt til fods"},{code:"10-85",description:"Helikopter enhed"},{code:"10-89",description:"Betjent nede"},{code:"10-90",description:"Bankrøveri"},{code:"10-92",description:"Oil Rig Angreb"},{code:"10-98",description:"Fængselsudbrud"},{code:"10-99",description:"Efterlyst person"},{code:"10-101",description:"Status"}],u$e=[{code:"Code 1",description:"Almindelig kørsel"},{code:"Code 2",description:"Kørsel med lys"},{code:"Code 3",description:"Kørsel med lys & sirene"},{code:"Code 4",description:"Alt under kontrol"},{code:"Code 5",description:"Felony stop"}],d$e=[{code:"Kode rød",description:"Stop med nødvendig force"},{code:"Kode orange",description:"Pit tilladt hvis muligt"},{code:"Kode grøn",description:"Følg efter personen"},{code:"Ocean king",description:"Besvarer 10-101"},{code:"Signal 100",description:"Alt radio kommunikation stoppes"}],f$e=()=>{const{classes:e,cx:t}=l$e(),[n,r]=_.useState(!1),o=c$e.map(a=>h.jsxs("tr",{children:[h.jsx("td",{children:a.code}),h.jsx("td",{children:a.description})]},a.code)),i=u$e.map(a=>h.jsxs("tr",{children:[h.jsx("td",{children:a.code}),h.jsx("td",{children:a.description})]},a.code)),s=d$e.map(a=>h.jsxs("tr",{children:[h.jsx("td",{children:a.code}),h.jsx("td",{children:a.description})]},a.code));return h.jsxs("div",{className:"codes-and-command",children:[h.jsxs("div",{className:"codes-and-command-background",children:[h.jsx(W,{color:"white",size:"md",weight:600,children:"10 Codes"}),h.jsx(St,{h:800,onScrollPositionChange:({y:a})=>r(a!==0),children:h.jsxs(Zc,{striped:!0,withBorder:!0,children:[h.jsx("thead",{className:t(e.header,{[e.scrolled]:n}),children:h.jsxs("tr",{children:[h.jsx("th",{children:"Code"}),h.jsx("th",{children:"Description"})]})}),h.jsx("tbody",{children:o})]})})]}),h.jsxs("div",{className:"codes-and-command-extra",children:[h.jsxs("div",{className:"command-background",children:[h.jsx(W,{color:"white",size:"md",weight:600,children:"Codes Meaning"}),h.jsx(St,{h:300,children:h.jsxs(Zc,{striped:!0,withBorder:!0,children:[h.jsx("thead",{className:t(e.header),children:h.jsxs("tr",{children:[h.jsx("th",{children:"Codes"}),h.jsx("th",{children:"Meaning"})]})}),h.jsx("tbody",{children:i})]})})]}),h.jsxs("div",{className:"command-background",children:[h.jsx(W,{color:"white",size:"md",weight:600,children:"Codes Color Meaning"}),h.jsx(St,{h:300,children:h.jsxs(Zc,{striped:!0,withBorder:!0,children:[h.jsx("thead",{className:t(e.header),children:h.jsxs("tr",{children:[h.jsx("th",{children:"Color Codes"}),h.jsx("th",{children:"Meaning"})]})}),h.jsx("tbody",{children:s})]})})]})]})]})};var Rx={exports:{}};/* @preserve +`);return!i||!s?!1:e.chain().command(({tr:a})=>(a.delete(r.pos-2,r.pos),!0)).exitCode().run()},ArrowDown:({editor:e})=>{if(!this.options.exitOnArrowDown)return!1;const{state:t}=e,{selection:n,doc:r}=t,{$from:o,empty:i}=n;if(!i||o.parent.type!==this.type||!(o.parentOffset===o.parent.nodeSize-2))return!1;const a=o.after();return a===void 0||r.nodeAt(a)?!1:e.commands.exitCode()}}},addInputRules(){return[Sx({find:QPe,type:this.type,getAttributes:e=>({language:e[1]})}),Sx({find:eOe,type:this.type,getAttributes:e=>({language:e[1]})})]},addProseMirrorPlugins(){return[new Zr({key:new Ai("codeBlockVSCodeHandler"),props:{handlePaste:(e,t)=>{if(!t.clipboardData||this.editor.isActive(this.type.name))return!1;const n=t.clipboardData.getData("text/plain"),r=t.clipboardData.getData("vscode-editor-data"),o=r?JSON.parse(r):void 0,i=o?.mode;if(!n||!i)return!1;const{tr:s}=e.state;return s.replaceSelectionWith(this.type.create({language:i})),s.setSelection(Ve.near(s.doc.resolve(Math.max(0,s.selection.from-2)))),s.insertText(n.replace(/\r\n?/g,` +`)),s.setMeta("paste",!0),e.dispatch(s),!0}}})]}}),nOe=Gr.create({name:"doc",topNode:!0,content:"block+"});function rOe(e={}){return new Zr({view(t){return new oOe(t,e)}})}class oOe{constructor(t,n){var r;this.editorView=t,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(o=>{let i=s=>{this[o](s)};return t.dom.addEventListener(o,i),{name:o,handler:i}})}destroy(){this.handlers.forEach(({name:t,handler:n})=>this.editorView.dom.removeEventListener(t,n))}update(t,n){this.cursorPos!=null&&n.doc!=t.state.doc&&(this.cursorPos>t.state.doc.content.size?this.setCursor(null):this.updateOverlay())}setCursor(t){t!=this.cursorPos&&(this.cursorPos=t,t==null?(this.element.parentNode.removeChild(this.element),this.element=null):this.updateOverlay())}updateOverlay(){let t=this.editorView.state.doc.resolve(this.cursorPos),n=!t.parent.inlineContent,r;if(n){let a=t.nodeBefore,c=t.nodeAfter;if(a||c){let u=this.editorView.nodeDOM(this.cursorPos-(a?a.nodeSize:0));if(u){let f=u.getBoundingClientRect(),p=a?f.bottom:f.top;a&&c&&(p=(p+this.editorView.nodeDOM(this.cursorPos).getBoundingClientRect().top)/2),r={left:f.left,right:f.right,top:p-this.width/2,bottom:p+this.width/2}}}}if(!r){let a=this.editorView.coordsAtPos(this.cursorPos);r={left:a.left-this.width/2,right:a.left+this.width/2,top:a.top,bottom:a.bottom}}let o=this.editorView.dom.offsetParent;this.element||(this.element=o.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 i,s;if(!o||o==document.body&&getComputedStyle(o).position=="static")i=-pageXOffset,s=-pageYOffset;else{let a=o.getBoundingClientRect();i=a.left-o.scrollLeft,s=a.top-o.scrollTop}this.element.style.left=r.left-i+"px",this.element.style.top=r.top-s+"px",this.element.style.width=r.right-r.left+"px",this.element.style.height=r.bottom-r.top+"px"}scheduleRemoval(t){clearTimeout(this.timeout),this.timeout=setTimeout(()=>this.setCursor(null),t)}dragover(t){if(!this.editorView.editable)return;let n=this.editorView.posAtCoords({left:t.clientX,top:t.clientY}),r=n&&n.inside>=0&&this.editorView.state.doc.nodeAt(n.inside),o=r&&r.type.spec.disableDropCursor,i=typeof o=="function"?o(this.editorView,n,t):o;if(n&&!i){let s=n.pos;if(this.editorView.dragging&&this.editorView.dragging.slice){let a=p7(this.editorView.state.doc,s,this.editorView.dragging.slice);a!=null&&(s=a)}this.setCursor(s),this.scheduleRemoval(5e3)}}dragend(){this.scheduleRemoval(20)}drop(){this.scheduleRemoval(20)}dragleave(t){(t.target==this.editorView.dom||!this.editorView.dom.contains(t.relatedTarget))&&this.setCursor(null)}}const iOe=br.create({name:"dropCursor",addOptions(){return{color:"currentColor",width:1,class:void 0}},addProseMirrorPlugins(){return[rOe(this.options)]}});class Kt extends Ze{constructor(t){super(t,t)}map(t,n){let r=t.resolve(n.map(this.head));return Kt.valid(r)?new Kt(r):Ze.near(r)}content(){return ye.empty}eq(t){return t instanceof Kt&&t.head==this.head}toJSON(){return{type:"gapcursor",pos:this.head}}static fromJSON(t,n){if(typeof n.pos!="number")throw new RangeError("Invalid input for GapCursor.fromJSON");return new Kt(t.resolve(n.pos))}getBookmark(){return new bO(this.anchor)}static valid(t){let n=t.parent;if(n.isTextblock||!sOe(t)||!aOe(t))return!1;let r=n.type.spec.allowGapCursor;if(r!=null)return r;let o=n.contentMatchAt(t.index()).defaultType;return o&&o.isTextblock}static findGapCursorFrom(t,n,r=!1){e:for(;;){if(!r&&Kt.valid(t))return t;let o=t.pos,i=null;for(let s=t.depth;;s--){let a=t.node(s);if(n>0?t.indexAfter(s)0){i=a.child(n>0?t.indexAfter(s):t.index(s)-1);break}else if(s==0)return null;o+=n;let c=t.doc.resolve(o);if(Kt.valid(c))return c}for(;;){let s=n>0?i.firstChild:i.lastChild;if(!s){if(i.isAtom&&!i.isText&&!Le.isSelectable(i)){t=t.doc.resolve(o+i.nodeSize*n),r=!1;continue e}break}i=s,o+=n;let a=t.doc.resolve(o);if(Kt.valid(a))return a}return null}}}Kt.prototype.visible=!1;Kt.findFrom=Kt.findGapCursorFrom;Ze.jsonID("gapcursor",Kt);class bO{constructor(t){this.pos=t}map(t){return new bO(t.map(this.pos))}resolve(t){let n=t.resolve(this.pos);return Kt.valid(n)?new Kt(n):Ze.near(n)}}function sOe(e){for(let t=e.depth;t>=0;t--){let n=e.index(t),r=e.node(t);if(n==0){if(r.type.spec.isolating)return!0;continue}for(let o=r.child(n-1);;o=o.lastChild){if(o.childCount==0&&!o.inlineContent||o.isAtom||o.type.spec.isolating)return!0;if(o.inlineContent)return!1}}return!0}function aOe(e){for(let t=e.depth;t>=0;t--){let n=e.indexAfter(t),r=e.node(t);if(n==r.childCount){if(r.type.spec.isolating)return!0;continue}for(let o=r.child(n);;o=o.firstChild){if(o.childCount==0&&!o.inlineContent||o.isAtom||o.type.spec.isolating)return!0;if(o.inlineContent)return!1}}return!0}function lOe(){return new Zr({props:{decorations:fOe,createSelectionBetween(e,t,n){return t.pos==n.pos&&Kt.valid(n)?new Kt(n):null},handleClick:uOe,handleKeyDown:cOe,handleDOMEvents:{beforeinput:dOe}}})}const cOe=X7({ArrowLeft:fh("horiz",-1),ArrowRight:fh("horiz",1),ArrowUp:fh("vert",-1),ArrowDown:fh("vert",1)});function fh(e,t){const n=e=="vert"?t>0?"down":"up":t>0?"right":"left";return function(r,o,i){let s=r.selection,a=t>0?s.$to:s.$from,c=s.empty;if(s instanceof Ve){if(!i.endOfTextblock(n)||a.depth==0)return!1;c=!1,a=r.doc.resolve(t>0?a.after():a.before())}let u=Kt.findGapCursorFrom(a,t,c);return u?(o&&o(r.tr.setSelection(new Kt(u))),!0):!1}}function uOe(e,t,n){if(!e||!e.editable)return!1;let r=e.state.doc.resolve(t);if(!Kt.valid(r))return!1;let o=e.posAtCoords({left:n.clientX,top:n.clientY});return o&&o.inside>-1&&Le.isSelectable(e.state.doc.nodeAt(o.inside))?!1:(e.dispatch(e.state.tr.setSelection(new Kt(r))),!0)}function dOe(e,t){if(t.inputType!="insertCompositionText"||!(e.state.selection instanceof Kt))return!1;let{$from:n}=e.state.selection,r=n.parent.contentMatchAt(n.index()).findWrapping(e.state.schema.nodes.text);if(!r)return!1;let o=se.empty;for(let s=r.length-1;s>=0;s--)o=se.from(r[s].createAndFill(null,o));let i=e.state.tr.replace(n.pos,n.pos,new ye(o,0,0));return i.setSelection(Ve.near(i.doc.resolve(n.pos+1))),e.dispatch(i),!1}function fOe(e){if(!(e.selection instanceof Kt))return null;let t=document.createElement("div");return t.className="ProseMirror-gapcursor",gn.create(e.doc,[jo.widget(e.selection.head,t,{key:"gapcursor"})])}const pOe=br.create({name:"gapCursor",addProseMirrorPlugins(){return[lOe()]},extendNodeSchema(e){var t;const n={name:e.name,options:e.options,storage:e.storage};return{allowGapCursor:(t=Ue(Ce(e,"allowGapCursor",n)))!==null&&t!==void 0?t:null}}}),hOe=Gr.create({name:"hardBreak",addOptions(){return{keepMarks:!0,HTMLAttributes:{}}},inline:!0,group:"inline",selectable:!1,parseHTML(){return[{tag:"br"}]},renderHTML({HTMLAttributes:e}){return["br",Et(this.options.HTMLAttributes,e)]},renderText(){return` +`},addCommands(){return{setHardBreak:()=>({commands:e,chain:t,state:n,editor:r})=>e.first([()=>e.exitCode(),()=>e.command(()=>{const{selection:o,storedMarks:i}=n;if(o.$from.parent.type.spec.isolating)return!1;const{keepMarks:s}=this.options,{splittableMarks:a}=r.extensionManager,c=i||o.$to.parentOffset&&o.$from.marks();return t().insertContent({type:this.name}).command(({tr:u,dispatch:f})=>{if(f&&c&&s){const p=c.filter(g=>a.includes(g.type.name));u.ensureMarks(p)}return!0}).run()})])}},addKeyboardShortcuts(){return{"Mod-Enter":()=>this.editor.commands.setHardBreak(),"Shift-Enter":()=>this.editor.commands.setHardBreak()}}}),mOe=Gr.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(e=>({tag:`h${e}`,attrs:{level:e}}))},renderHTML({node:e,HTMLAttributes:t}){return[`h${this.options.levels.includes(e.attrs.level)?e.attrs.level:this.options.levels[0]}`,Et(this.options.HTMLAttributes,t),0]},addCommands(){return{setHeading:e=>({commands:t})=>this.options.levels.includes(e.level)?t.setNode(this.name,e):!1,toggleHeading:e=>({commands:t})=>this.options.levels.includes(e.level)?t.toggleNode(this.name,"paragraph",e):!1}},addKeyboardShortcuts(){return this.options.levels.reduce((e,t)=>({...e,[`Mod-Alt-${t}`]:()=>this.editor.commands.toggleHeading({level:t})}),{})},addInputRules(){return this.options.levels.map(e=>Sx({find:new RegExp(`^(#{1,${e}})\\s$`),type:this.type,getAttributes:{level:e}}))}});var yy=200,$n=function(){};$n.prototype.append=function(t){return t.length?(t=$n.from(t),!this.length&&t||t.length=n?$n.empty:this.sliceInner(Math.max(0,t),Math.min(this.length,n))};$n.prototype.get=function(t){if(!(t<0||t>=this.length))return this.getInner(t)};$n.prototype.forEach=function(t,n,r){n===void 0&&(n=0),r===void 0&&(r=this.length),n<=r?this.forEachInner(t,n,r,0):this.forEachInvertedInner(t,n,r,0)};$n.prototype.map=function(t,n,r){n===void 0&&(n=0),r===void 0&&(r=this.length);var o=[];return this.forEach(function(i,s){return o.push(t(i,s))},n,r),o};$n.from=function(t){return t instanceof $n?t:t&&t.length?new U9(t):$n.empty};var U9=function(e){function t(r){e.call(this),this.values=r}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var n={length:{configurable:!0},depth:{configurable:!0}};return t.prototype.flatten=function(){return this.values},t.prototype.sliceInner=function(o,i){return o==0&&i==this.length?this:new t(this.values.slice(o,i))},t.prototype.getInner=function(o){return this.values[o]},t.prototype.forEachInner=function(o,i,s,a){for(var c=i;c=s;c--)if(o(this.values[c],a+c)===!1)return!1},t.prototype.leafAppend=function(o){if(this.length+o.length<=yy)return new t(this.values.concat(o.flatten()))},t.prototype.leafPrepend=function(o){if(this.length+o.length<=yy)return new t(o.flatten().concat(this.values))},n.length.get=function(){return this.values.length},n.depth.get=function(){return 0},Object.defineProperties(t.prototype,n),t}($n);$n.empty=new U9([]);var gOe=function(e){function t(n,r){e.call(this),this.left=n,this.right=r,this.length=n.length+r.length,this.depth=Math.max(n.depth,r.depth)+1}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.flatten=function(){return this.left.flatten().concat(this.right.flatten())},t.prototype.getInner=function(r){return ra&&this.right.forEachInner(r,Math.max(o-a,0),Math.min(this.length,i)-a,s+a)===!1)return!1},t.prototype.forEachInvertedInner=function(r,o,i,s){var a=this.left.length;if(o>a&&this.right.forEachInvertedInner(r,o-a,Math.max(i,a)-a,s+a)===!1||i=i?this.right.slice(r-i,o-i):this.left.slice(r,i).append(this.right.slice(0,o-i))},t.prototype.leafAppend=function(r){var o=this.right.leafAppend(r);if(o)return new t(this.left,o)},t.prototype.leafPrepend=function(r){var o=this.left.leafPrepend(r);if(o)return new t(o,this.right)},t.prototype.appendInner=function(r){return this.left.depth>=Math.max(this.right.depth,r.depth)+1?new t(this.left,new t(this.right,r)):new t(this,r)},t}($n);const vOe=500;class qo{constructor(t,n){this.items=t,this.eventCount=n}popEvent(t,n){if(this.eventCount==0)return null;let r=this.items.length;for(;;r--)if(this.items.get(r-1).selection){--r;break}let o,i;n&&(o=this.remapping(r,this.items.length),i=o.maps.length);let s=t.tr,a,c,u=[],f=[];return this.items.forEach((p,g)=>{if(!p.step){o||(o=this.remapping(r,g+1),i=o.maps.length),i--,f.push(p);return}if(o){f.push(new wi(p.map));let v=p.step.map(o.slice(i)),y;v&&s.maybeStep(v).doc&&(y=s.mapping.maps[s.mapping.maps.length-1],u.push(new wi(y,void 0,void 0,u.length+f.length))),i--,y&&o.appendMap(y,i)}else s.maybeStep(p.step);if(p.selection)return a=o?p.selection.map(o.slice(i)):p.selection,c=new qo(this.items.slice(0,r).append(f.reverse().concat(u)),this.eventCount-1),!1},this.items.length,0),{remaining:c,transform:s,selection:a}}addTransform(t,n,r,o){let i=[],s=this.eventCount,a=this.items,c=!o&&a.length?a.get(a.length-1):null;for(let f=0;f_Oe&&(a=yOe(a,u),s-=u),new qo(a.append(i),s)}remapping(t,n){let r=new Gc;return this.items.forEach((o,i)=>{let s=o.mirrorOffset!=null&&i-o.mirrorOffset>=t?r.maps.length-o.mirrorOffset:void 0;r.appendMap(o.map,s)},t,n),r}addMaps(t){return this.eventCount==0?this:new qo(this.items.append(t.map(n=>new wi(n))),this.eventCount)}rebased(t,n){if(!this.eventCount)return this;let r=[],o=Math.max(0,this.items.length-n),i=t.mapping,s=t.steps.length,a=this.eventCount;this.items.forEach(g=>{g.selection&&a--},o);let c=n;this.items.forEach(g=>{let v=i.getMirror(--c);if(v==null)return;s=Math.min(s,v);let y=i.maps[v];if(g.step){let w=t.steps[v].invert(t.docs[v]),P=g.selection&&g.selection.map(i.slice(c+1,v));P&&a++,r.push(new wi(y,w,P))}else r.push(new wi(y))},o);let u=[];for(let g=n;gvOe&&(p=p.compress(this.items.length-r.length)),p}emptyItemCount(){let t=0;return this.items.forEach(n=>{n.step||t++}),t}compress(t=this.items.length){let n=this.remapping(0,t),r=n.maps.length,o=[],i=0;return this.items.forEach((s,a)=>{if(a>=t)o.push(s),s.selection&&i++;else if(s.step){let c=s.step.map(n.slice(r)),u=c&&c.getMap();if(r--,u&&n.appendMap(u,r),c){let f=s.selection&&s.selection.map(n.slice(r));f&&i++;let p=new wi(u.invert(),c,f),g,v=o.length-1;(g=o.length&&o[v].merge(p))?o[v]=g:o.push(p)}}else s.map&&r--},this.items.length,0),new qo($n.from(o.reverse()),i)}}qo.empty=new qo($n.empty,0);function yOe(e,t){let n;return e.forEach((r,o)=>{if(r.selection&&t--==0)return n=o,!1}),e.slice(n)}class wi{constructor(t,n,r,o){this.map=t,this.step=n,this.selection=r,this.mirrorOffset=o}merge(t){if(this.step&&t.step&&!t.selection){let n=t.step.merge(this.step);if(n)return new wi(n.getMap().invert(),n,this.selection)}}}class Us{constructor(t,n,r,o,i){this.done=t,this.undone=n,this.prevRanges=r,this.prevTime=o,this.prevComposition=i}}const _Oe=20;function wOe(e,t,n,r){let o=n.getMeta(wa),i;if(o)return o.historyState;n.getMeta(xOe)&&(e=new Us(e.done,e.undone,null,0,-1));let s=n.getMeta("appendedTransaction");if(n.steps.length==0)return e;if(s&&s.getMeta(wa))return s.getMeta(wa).redo?new Us(e.done.addTransform(n,void 0,r,tm(t)),e.undone,GI(n.mapping.maps[n.steps.length-1]),e.prevTime,e.prevComposition):new Us(e.done,e.undone.addTransform(n,void 0,r,tm(t)),null,e.prevTime,e.prevComposition);if(n.getMeta("addToHistory")!==!1&&!(s&&s.getMeta("addToHistory")===!1)){let a=n.getMeta("composition"),c=e.prevTime==0||!s&&e.prevComposition!=a&&(e.prevTime<(n.time||0)-r.newGroupDelay||!bOe(n,e.prevRanges)),u=s?Sw(e.prevRanges,n.mapping):GI(n.mapping.maps[n.steps.length-1]);return new Us(e.done.addTransform(n,c?t.selection.getBookmark():void 0,r,tm(t)),qo.empty,u,n.time,a??e.prevComposition)}else return(i=n.getMeta("rebased"))?new Us(e.done.rebased(n,i),e.undone.rebased(n,i),Sw(e.prevRanges,n.mapping),e.prevTime,e.prevComposition):new Us(e.done.addMaps(n.mapping.maps),e.undone.addMaps(n.mapping.maps),Sw(e.prevRanges,n.mapping),e.prevTime,e.prevComposition)}function bOe(e,t){if(!t)return!1;if(!e.docChanged)return!0;let n=!1;return e.mapping.maps[0].forEach((r,o)=>{for(let i=0;i=t[i]&&(n=!0)}),n}function GI(e){let t=[];return e.forEach((n,r,o,i)=>t.push(o,i)),t}function Sw(e,t){if(!e)return null;let n=[];for(let r=0;r{let n=wa.getState(e);return!n||n.done.eventCount==0?!1:(t&&Z9(n,e,t,!1),!0)},Y9=(e,t)=>{let n=wa.getState(e);return!n||n.undone.eventCount==0?!1:(t&&Z9(n,e,t,!0),!0)},POe=br.create({name:"history",addOptions(){return{depth:100,newGroupDelay:500}},addCommands(){return{undo:()=>({state:e,dispatch:t})=>G9(e,t),redo:()=>({state:e,dispatch:t})=>Y9(e,t)}},addProseMirrorPlugins(){return[SOe(this.options)]},addKeyboardShortcuts(){return{"Mod-z":()=>this.editor.commands.undo(),"Mod-Z":()=>this.editor.commands.undo(),"Mod-y":()=>this.editor.commands.redo(),"Mod-Y":()=>this.editor.commands.redo(),"Shift-Mod-z":()=>this.editor.commands.redo(),"Shift-Mod-Z":()=>this.editor.commands.redo(),"Mod-я":()=>this.editor.commands.undo(),"Shift-Mod-я":()=>this.editor.commands.redo()}}}),OOe=Gr.create({name:"horizontalRule",addOptions(){return{HTMLAttributes:{}}},group:"block",parseHTML(){return[{tag:"hr"}]},renderHTML({HTMLAttributes:e}){return["hr",Et(this.options.HTMLAttributes,e)]},addCommands(){return{setHorizontalRule:()=>({chain:e,state:t})=>{const{$to:n}=t.selection,r=e();return n.parentOffset===0?r.insertContentAt(Math.max(n.pos-2,0),{type:this.name}):r.insertContent({type:this.name}),r.command(({tr:o,dispatch:i})=>{var s;if(i){const{$to:a}=o.selection,c=a.end();if(a.nodeAfter)a.nodeAfter.isTextblock?o.setSelection(Ve.create(o.doc,a.pos+1)):a.nodeAfter.isBlock?o.setSelection(Le.create(o.doc,a.pos)):o.setSelection(Ve.create(o.doc,a.pos));else{const u=(s=a.parent.type.contentMatch.defaultType)===null||s===void 0?void 0:s.create();u&&(o.insert(c,u),o.setSelection(Ve.create(o.doc,c+1)))}o.scrollIntoView()}return!0}).run()}}},addInputRules(){return[f9({find:/^(?:---|—-|___\s|\*\*\*\s)$/,type:this.type})]}}),COe=/(?:^|\s)((?:\*)((?:[^*]+))(?:\*))$/,kOe=/(?:^|\s)((?:\*)((?:[^*]+))(?:\*))/g,EOe=/(?:^|\s)((?:_)((?:[^_]+))(?:_))$/,$Oe=/(?:^|\s)((?:_)((?:[^_]+))(?:_))/g,MOe=or.create({name:"italic",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"em"},{tag:"i",getAttrs:e=>e.style.fontStyle!=="normal"&&null},{style:"font-style=italic"}]},renderHTML({HTMLAttributes:e}){return["em",Et(this.options.HTMLAttributes,e),0]},addCommands(){return{setItalic:()=>({commands:e})=>e.setMark(this.name),toggleItalic:()=>({commands:e})=>e.toggleMark(this.name),unsetItalic:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-i":()=>this.editor.commands.toggleItalic(),"Mod-I":()=>this.editor.commands.toggleItalic()}},addInputRules(){return[Ll({find:COe,type:this.type}),Ll({find:EOe,type:this.type})]},addPasteRules(){return[ka({find:kOe,type:this.type}),ka({find:$Oe,type:this.type})]}}),NOe=Gr.create({name:"listItem",addOptions(){return{HTMLAttributes:{},bulletListTypeName:"bulletList",orderedListTypeName:"orderedList"}},content:"paragraph block*",defining:!0,parseHTML(){return[{tag:"li"}]},renderHTML({HTMLAttributes:e}){return["li",Et(this.options.HTMLAttributes,e),0]},addKeyboardShortcuts(){return{Enter:()=>this.editor.commands.splitListItem(this.name),Tab:()=>this.editor.commands.sinkListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)}}}),TOe=Gr.create({name:"listItem",addOptions(){return{HTMLAttributes:{},bulletListTypeName:"bulletList",orderedListTypeName:"orderedList"}},content:"paragraph block*",defining:!0,parseHTML(){return[{tag:"li"}]},renderHTML({HTMLAttributes:e}){return["li",Et(this.options.HTMLAttributes,e),0]},addKeyboardShortcuts(){return{Enter:()=>this.editor.commands.splitListItem(this.name),Tab:()=>this.editor.commands.sinkListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)}}}),KI=or.create({name:"textStyle",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"span",getAttrs:e=>e.hasAttribute("style")?{}:!1}]},renderHTML({HTMLAttributes:e}){return["span",Et(this.options.HTMLAttributes,e),0]},addCommands(){return{removeEmptyTextStyle:()=>({state:e,commands:t})=>{const n=Xf(e,this.type);return Object.entries(n).some(([,o])=>!!o)?!0:t.unsetMark(this.name)}}}}),qI=/^(\d+)\.\s$/,IOe=Gr.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:e=>e.hasAttribute("start")?parseInt(e.getAttribute("start")||"",10):1}}},parseHTML(){return[{tag:"ol"}]},renderHTML({HTMLAttributes:e}){const{start:t,...n}=e;return t===1?["ol",Et(this.options.HTMLAttributes,n),0]:["ol",Et(this.options.HTMLAttributes,e),0]},addCommands(){return{toggleOrderedList:()=>({commands:e,chain:t})=>this.options.keepAttributes?t().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(TOe.name,this.editor.getAttributes(KI.name)).run():e.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-7":()=>this.editor.commands.toggleOrderedList()}},addInputRules(){let e=xf({find:qI,type:this.type,getAttributes:t=>({start:+t[1]}),joinPredicate:(t,n)=>n.childCount+n.attrs.start===+t[1]});return(this.options.keepMarks||this.options.keepAttributes)&&(e=xf({find:qI,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:t=>({start:+t[1],...this.editor.getAttributes(KI.name)}),joinPredicate:(t,n)=>n.childCount+n.attrs.start===+t[1],editor:this.editor})),[e]}}),jOe=Gr.create({name:"paragraph",priority:1e3,addOptions(){return{HTMLAttributes:{}}},group:"block",content:"inline*",parseHTML(){return[{tag:"p"}]},renderHTML({HTMLAttributes:e}){return["p",Et(this.options.HTMLAttributes,e),0]},addCommands(){return{setParagraph:()=>({commands:e})=>e.setNode(this.name)}},addKeyboardShortcuts(){return{"Mod-Alt-0":()=>this.editor.commands.setParagraph()}}}),LOe=/(?:^|\s)((?:~~)((?:[^~]+))(?:~~))$/,DOe=/(?:^|\s)((?:~~)((?:[^~]+))(?:~~))/g,ROe=or.create({name:"strike",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"s"},{tag:"del"},{tag:"strike"},{style:"text-decoration",consuming:!1,getAttrs:e=>e.includes("line-through")?{}:!1}]},renderHTML({HTMLAttributes:e}){return["s",Et(this.options.HTMLAttributes,e),0]},addCommands(){return{setStrike:()=>({commands:e})=>e.setMark(this.name),toggleStrike:()=>({commands:e})=>e.toggleMark(this.name),unsetStrike:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){const e={};return uO()?e["Mod-Shift-s"]=()=>this.editor.commands.toggleStrike():e["Ctrl-Shift-s"]=()=>this.editor.commands.toggleStrike(),e},addInputRules(){return[Ll({find:LOe,type:this.type})]},addPasteRules(){return[ka({find:DOe,type:this.type})]}}),zOe=Gr.create({name:"text",group:"inline"}),K9=br.create({name:"starterKit",addExtensions(){var e,t,n,r,o,i,s,a,c,u,f,p,g,v,y,w,P,x;const S=[];return this.options.blockquote!==!1&&S.push(VPe.configure((e=this.options)===null||e===void 0?void 0:e.blockquote)),this.options.bold!==!1&&S.push(GPe.configure((t=this.options)===null||t===void 0?void 0:t.bold)),this.options.bulletList!==!1&&S.push(KPe.configure((n=this.options)===null||n===void 0?void 0:n.bulletList)),this.options.code!==!1&&S.push(XPe.configure((r=this.options)===null||r===void 0?void 0:r.code)),this.options.codeBlock!==!1&&S.push(tOe.configure((o=this.options)===null||o===void 0?void 0:o.codeBlock)),this.options.document!==!1&&S.push(nOe.configure((i=this.options)===null||i===void 0?void 0:i.document)),this.options.dropcursor!==!1&&S.push(iOe.configure((s=this.options)===null||s===void 0?void 0:s.dropcursor)),this.options.gapcursor!==!1&&S.push(pOe.configure((a=this.options)===null||a===void 0?void 0:a.gapcursor)),this.options.hardBreak!==!1&&S.push(hOe.configure((c=this.options)===null||c===void 0?void 0:c.hardBreak)),this.options.heading!==!1&&S.push(mOe.configure((u=this.options)===null||u===void 0?void 0:u.heading)),this.options.history!==!1&&S.push(POe.configure((f=this.options)===null||f===void 0?void 0:f.history)),this.options.horizontalRule!==!1&&S.push(OOe.configure((p=this.options)===null||p===void 0?void 0:p.horizontalRule)),this.options.italic!==!1&&S.push(MOe.configure((g=this.options)===null||g===void 0?void 0:g.italic)),this.options.listItem!==!1&&S.push(NOe.configure((v=this.options)===null||v===void 0?void 0:v.listItem)),this.options.orderedList!==!1&&S.push(IOe.configure((y=this.options)===null||y===void 0?void 0:y.orderedList)),this.options.paragraph!==!1&&S.push(jOe.configure((w=this.options)===null||w===void 0?void 0:w.paragraph)),this.options.strike!==!1&&S.push(ROe.configure((P=this.options)===null||P===void 0?void 0:P.strike)),this.options.text!==!1&&S.push(zOe.configure((x=this.options)===null||x===void 0?void 0:x.text)),S}}),q9=or.create({name:"underline",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"u"},{style:"text-decoration",consuming:!1,getAttrs:e=>e.includes("underline")?{}:!1}]},renderHTML({HTMLAttributes:e}){return["u",Et(this.options.HTMLAttributes,e),0]},addCommands(){return{setUnderline:()=>({commands:e})=>e.setMark(this.name),toggleUnderline:()=>({commands:e})=>e.toggleMark(this.name),unsetUnderline:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-u":()=>this.editor.commands.toggleUnderline(),"Mod-U":()=>this.editor.commands.toggleUnderline()}}}),J9=br.create({name:"textAlign",addOptions(){return{types:[],alignments:["left","center","right","justify"],defaultAlignment:"left"}},addGlobalAttributes(){return[{types:this.options.types,attributes:{textAlign:{default:this.options.defaultAlignment,parseHTML:e=>e.style.textAlign||this.options.defaultAlignment,renderHTML:e=>e.textAlign===this.options.defaultAlignment?{}:{style:`text-align: ${e.textAlign}`}}}}]},addCommands(){return{setTextAlign:e=>({commands:t})=>this.options.alignments.includes(e)?this.options.types.every(n=>t.updateAttributes(n,{textAlign:e})):!1,unsetTextAlign:()=>({commands:e})=>this.options.types.every(t=>e.resetAttributes(t,"textAlign"))}},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")}}}),X9=or.create({name:"superscript",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"sup"},{style:"vertical-align",getAttrs(e){return e!=="super"?!1:null}}]},renderHTML({HTMLAttributes:e}){return["sup",Et(this.options.HTMLAttributes,e),0]},addCommands(){return{setSuperscript:()=>({commands:e})=>e.setMark(this.name),toggleSuperscript:()=>({commands:e})=>e.toggleMark(this.name),unsetSuperscript:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-.":()=>this.editor.commands.toggleSuperscript()}}}),Q9=or.create({name:"subscript",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"sub"},{style:"vertical-align",getAttrs(e){return e!=="sub"?!1:null}}]},renderHTML({HTMLAttributes:e}){return["sub",Et(this.options.HTMLAttributes,e),0]},addCommands(){return{setSubscript:()=>({commands:e})=>e.setMark(this.name),toggleSubscript:()=>({commands:e})=>e.toggleMark(this.name),unsetSubscript:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-,":()=>this.editor.commands.toggleSubscript()}}}),AOe=/(?:^|\s)(!\[(.+|:?)]\((\S+)(?:(?:\s+)["'](\S+)["'])?\))$/,eB=Gr.create({name:"image",addOptions(){return{inline:!1,allowBase64:!1,HTMLAttributes:{}}},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}}},parseHTML(){return[{tag:this.options.allowBase64?"img[src]":'img[src]:not([src^="data:"])'}]},renderHTML({HTMLAttributes:e}){return["img",Et(this.options.HTMLAttributes,e)]},addCommands(){return{setImage:e=>({commands:t})=>t.insertContent({type:this.name,attrs:e})}},addInputRules(){return[f9({find:AOe,type:this.type,getAttributes:e=>{const[,,t,n,r]=e;return{src:n,alt:t,title:r}}})]}}),tB=or.create({name:"textStyle",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"span",getAttrs:e=>e.hasAttribute("style")?{}:!1}]},renderHTML({HTMLAttributes:e}){return["span",Et(this.options.HTMLAttributes,e),0]},addCommands(){return{removeEmptyTextStyle:()=>({state:e,commands:t})=>{const n=Xf(e,this.type);return Object.entries(n).some(([,o])=>!!o)?!0:t.unsetMark(this.name)}}}}),nB=br.create({name:"color",addOptions(){return{types:["textStyle"]}},addGlobalAttributes(){return[{types:this.options.types,attributes:{color:{default:null,parseHTML:e=>{var t;return(t=e.style.color)===null||t===void 0?void 0:t.replace(/['"]+/g,"")},renderHTML:e=>e.color?{style:`color: ${e.color}`}:{}}}}]},addCommands(){return{setColor:e=>({chain:t})=>t().setMark("textStyle",{color:e}).run(),unsetColor:()=>({chain:e})=>e().setMark("textStyle",{color:null}).removeEmptyTextStyle().run()}}}),BOe=ue({saveButton:{position:"absolute",top:5,right:5,zIndex:99}}),ep=({content:e="

",onChange:t,styles:n,contentAreaStyle:r,onSave:o})=>{const{classes:i}=BOe(),[s,a]=_.useState(!1),c=p9({content:e,extensions:[K9,q9,H9,X9,Q9,W9,nB,tB,eB,J9.configure({types:["heading","paragraph"]})]});return _.useEffect(()=>{c?.commands.setContent(e,!0)},[e]),_.useEffect(()=>{if(t&&t(c?.getHTML()),!o)return;const u=setTimeout(()=>{c?.getHTML()!==e?a(!0):a(!1)},500);return()=>clearTimeout(u)},[c?.getHTML()]),h.jsx(h.Fragment,{children:h.jsxs(Ee,{editor:c,styles:n,style:{borderRadius:2},children:[h.jsxs(Ee.Toolbar,{sticky:!0,children:[h.jsxs(Ee.ControlsGroup,{children:[h.jsx(Ee.Bold,{}),h.jsx(Ee.Italic,{}),h.jsx(Ee.Underline,{}),h.jsx(Ee.Strikethrough,{}),h.jsx(Ee.ClearFormatting,{}),h.jsx(Ee.Highlight,{})]}),h.jsxs(Ee.ControlsGroup,{children:[h.jsx(Ee.Hr,{}),h.jsx(Ee.BulletList,{}),h.jsx(Ee.OrderedList,{})]}),h.jsxs(Ee.ControlsGroup,{children:[h.jsx(Ee.Link,{}),h.jsx(Ee.Unlink,{})]}),h.jsxs(Ee.ControlsGroup,{children:[h.jsx(Ee.AlignLeft,{}),h.jsx(Ee.AlignCenter,{}),h.jsx(Ee.AlignJustify,{}),h.jsx(Ee.AlignRight,{})]}),h.jsx(Ee.ControlsGroup,{children:h.jsx(Ee.ColorPicker,{colors:["#25262b","#868e96","#fa5252","#e64980","#be4bdb","#7950f2","#4c6ef5","#228be6","#15aabf","#12b886","#40c057","#82c91e","#fab005","#fd7e14"]})})]}),c&&h.jsxs(St,{style:r,children:[h.jsx(Os,{mounted:!!(s&&o),transition:"slide-down",children:u=>h.jsx(Qe,{style:u,className:i.saveButton,color:"dark",variant:"default",size:26,onClick:()=>{a(!1),o&&o(c?.getHTML())},children:h.jsx(P8,{size:20})})}),h.jsx(Ee.Content,{})]})]})})},FOe=[{contents:"Dsadaasd Hello there buddy, this is a message from the server.",id:1,playerId:1,position:[0,0,0],callsign:132,firstname:"Fdsadas",lastname:"DSasd",citizenid:"dsadas",image:"https://cdn.vectorstock.com/i/preview-1x/97/68/account-avatar-dark-mode-glyph-ui-icon-vector-44429768.jpg",createdAt:Date.now()-3e5},{contents:"Dsadaasd Hello there buddy, this is a message from the server.",id:2,playerId:1,position:[0,0,0],callsign:132,firstname:"Fdsadas",lastname:"DSasd",citizenid:"dsadas",image:"https://cdn.vectorstock.com/i/preview-1x/97/68/account-avatar-dark-mode-glyph-ui-icon-vector-44429768.jpg",createdAt:Date.now()-9e5},{contents:"Dsadaasd Hello there buddy, this is a message from the server.",id:3,playerId:1,position:[0,0,0],callsign:132,firstname:"Fdsadas",lastname:"DSasd",citizenid:"dsadas",image:"https://cdn.vectorstock.com/i/preview-1x/97/68/account-avatar-dark-mode-glyph-ui-icon-vector-44429768.jpg",createdAt:Date.now()-12e20},{contents:"Dsadaasd Hello there buddy",id:4,playerId:1,position:[0,0,0],callsign:132,firstname:"fad",lastname:"DSasd",citizenid:"dsadas",image:"https://cdn.vectorstock.com/i/preview-1x/97/68/account-avatar-dark-mode-glyph-ui-icon-vector-44429768.jpg",createdAt:Date.now()},{contents:"Dsadaasd Hello there buddy",id:5,playerId:1,position:[0,0,0],callsign:132,firstname:"fad",lastname:"DSasd",citizenid:"dsadas",image:"https://cdn.vectorstock.com/i/preview-1x/97/68/account-avatar-dark-mode-glyph-ui-icon-vector-44429768.jpg",createdAt:Date.now()}],xO=dn(e=>({announcements:[],fetchAnnouncements:async()=>{if(at())e({announcements:[...FOe]});else{const t=await me("getAnnouncements");e({announcements:[...t.announcements]})}}})),VOe=()=>{const{fetchAnnouncements:e}=xO(s=>({fetchAnnouncements:s.fetchAnnouncements})),[t,n]=_.useState(!1),[r,o]=_.useState(""),i=async()=>{if(!at()){if(n(!0),!await me("createAnnouncement",{contents:r}))return;e(),n(!1)}ke.closeAll()};return h.jsxs(Je,{h:400,style:{flex:"0 0 43.5rem"},children:[h.jsx(ep,{content:"",onChange:s=>o(s||""),styles:{content:{backgroundColor:"#1A1B1E"},toolbar:{backgroundColor:"#2C2E33"},controlsGroup:{pointerEvents:"auto",backgroundColor:"#282828"}},contentAreaStyle:{height:270,width:406,padding:0}}),h.jsx(st,{variant:"light",color:"gray",fullWidth:!0,onClick:()=>i(),loading:t,children:D.create})]})},HOe=e=>{const t=p9({extensions:[K9,q9,H9,X9,Q9,W9,nB,tB,eB,J9],content:e.contents,editable:!1});return h.jsx(Je,{children:h.jsx(Ee,{editor:t,children:h.jsx(Ee.Content,{})})})};pe.extend(B8);const rB=({announcement:e})=>{const t=`

${e.contents}

`;function n(r){return r.replace(/<\/?[^>]+(>|$)/g,"")}return h.jsxs("div",{className:"announcement-list-card",onClick:()=>{ke.open({title:h.jsxs(W,{style:{fontSize:16,color:"white"},weight:500,children:[`${e.firstname} ${e.lastname}`," | ",pe(e.createdAt).fromNow()]}),centered:!0,children:h.jsx(HOe,{contents:t})})},children:[h.jsx(nt,{position:"apart",children:h.jsxs(nt,{children:[h.jsx(CP,{color:"blue",src:e.image}),h.jsxs(Je,{spacing:0,children:[h.jsx(W,{fw:500,c:"white",children:`${e.firstname} ${e.lastname}`}),h.jsx(W,{size:"xs",c:"dark.2",children:pe(e.createdAt).fromNow()})]})]})}),h.jsx(W,{c:"gray.4",size:"sm",lineClamp:1,children:n(t)})]})},WOe=()=>{const{announcements:e}=xO(n=>({announcements:n.announcements})),t=[...e].sort((n,r)=>Number(new Date(r.createdAt))-Number(new Date(n.createdAt)));return h.jsx(St,{h:600,children:h.jsx("div",{className:"announcement-card-content",children:t.length>0?t.map(n=>h.jsx(rB,{announcement:n},n.id)):h.jsx(W,{color:"dimmed",size:"xs",children:D.no_announcements_found})})})},UOe=()=>{const{announcements:e,fetchAnnouncements:t}=xO(a=>({announcements:a.announcements,fetchAnnouncements:a.fetchAnnouncements})),[n,r]=_.useState(!1),{role:o}=bo(a=>a.personalData);function i(a){return!(a==="Chief"||a==="Assistant Chief"||a==="Captain"||a==="Lieutenant"||a==="Sergeant")}const s=[...e].sort((a,c)=>Number(new Date(c.createdAt))-Number(new Date(a.createdAt))).slice(0,3);return _.useEffect(()=>{r(!0),(async()=>await t())().then(()=>{r(!1)})},[]),h.jsxs("div",{className:"card-background",children:[h.jsxs("div",{className:"card-title",children:[h.jsx(W,{style:{fontSize:17,color:"white"},weight:500,children:D.announcements}),h.jsxs("div",{className:"card-title-icons",children:[h.jsx(At,{label:D.create_announcement,withArrow:!0,color:"gray",position:"bottom",children:h.jsx(Qe,{variant:"light",color:"dark",disabled:i(o),onClick:()=>{ke.open({title:h.jsx(W,{style:{fontSize:16,color:"white"},weight:500,children:D.create_announcement}),centered:!0,children:h.jsx(VOe,{})})},children:h.jsx(Eu,{size:16,color:"white"})})}),h.jsx(At,{label:D.view_all,withArrow:!0,color:"gray",position:"bottom",children:h.jsx(Qe,{variant:"light",color:"dark",onClick:()=>{ke.open({title:h.jsx(W,{style:{fontSize:16,color:"white"},weight:500,children:D.all_announcements}),centered:!0,children:h.jsx(WOe,{})})},children:h.jsx(Ehe,{size:16,color:"white"})})}),h.jsx(Fhe,{size:M(25),color:"white"})]})]}),h.jsx(Ye,{mt:5,mb:5}),h.jsx("div",{className:"announcement-card-content",children:n?h.jsx(Pr,{h:"100%",children:h.jsx(en,{})}):s.length>0?s.map(a=>h.jsx(rB,{announcement:a},a.id)):h.jsx(W,{color:"dimmed",size:"xs",children:D.no_announcements_found})})]})},ZOe=[{citizenid:"AF30442",firstname:"Billy",lastname:"Bob",incidentid:3,expiresAt:Date.now(),image:"https://i.imgur.com/dqopYB9b.jpg"},{citizenid:"AF30442",firstname:"Billy",lastname:"Bob",incidentid:3,expiresAt:Date.now(),image:"https://i.imgur.com/dqopYB9b.jpg"},{citizenid:"AF30442",firstname:"Billy",lastname:"Bob",incidentid:3,expiresAt:Date.now(),image:"https://i.imgur.com/dqopYB9b.jpg"},{citizenid:"AF30442",firstname:"Billy",lastname:"Bob",incidentid:3,expiresAt:Date.now(),image:"https://i.imgur.com/dqopYB9b.jpg"},{citizenid:"AF30442",firstname:"Billy",lastname:"Bob",incidentid:3,expiresAt:Date.now(),image:"https://i.imgur.com/dqopYB9b.jpg"},{citizenid:"AF30442",firstname:"Billy",lastname:"Bob",incidentid:3,expiresAt:Date.now(),image:"https://i.imgur.com/dqopYB9b.jpg"}],GOe=dn(e=>({warrants:at()?ZOe:[],getWarrants:async()=>{try{const t=await me("getWarrants");return e({warrants:t}),{warrants:t}}catch(t){return console.error("Failed to fetch recent activities:",t),{warrants:[]}}},setWarrants:t=>e({warrants:t})})),YOe=()=>{const{warrants:e,getWarrants:t}=GOe(),[n,r]=_.useState(!1),o=Ul(),{setActiveIncident:i,setIncidentActive:s}=Ur();return _.useEffect(()=>{r(!0),(async()=>{t()})().then(()=>{r(!1)})},[]),h.jsxs("div",{className:"card-background",children:[h.jsxs("div",{className:"card-title",children:[h.jsx(W,{style:{fontSize:17,color:"white"},weight:500,children:D.active_warrants}),h.jsx(Ghe,{size:M(25),color:"white"})]}),h.jsx(Ye,{mt:5,mb:5}),h.jsx(St,{h:290,children:h.jsx("div",{className:"warrants-card-content",children:n?h.jsx(Pr,{h:"100%",children:h.jsx(en,{})}):e.length>0?e.map(a=>h.jsx(nt,{position:"apart",className:"warrants-card",onClick:async()=>{if(at())return;const c=await me("getIncident",a.incidentid);i(c),s(!0),o("/incidents")},children:h.jsxs(nt,{children:[h.jsx(CP,{color:"blue",src:a.image}),h.jsxs(Je,{spacing:0,children:[h.jsx(W,{fw:500,c:"white",children:`${a.firstname} ${a.lastname}`}),h.jsxs(W,{size:"xs",c:"dark.2",children:[D.expires_in,": ",pe().to(a.expiresAt,!0)]})]})]})})):h.jsx(W,{color:"dimmed",size:"xs",children:D.no_warrants_found})})})]})},_u=e=>e?Object.entries(e).map(t=>({id:+t[0],...t[1]})):[],KOe=e=>Array.isArray(e)?e.map(t=>({...t,units:_u(t.units)})):Object.entries(e).map(t=>{const n={...t[1],units:[]};return n.units=_u(t[1].units),n}),wd=e=>e.length===0?e:e.charAt(0).toUpperCase()+e.slice(1),qOe=[{id:1,time:Date.now(),location:"Somewhere",coords:[350,350],linked:!1,offense:"Bank robbery",code:"10-29",blip:162,units:[{name:"Unit 132",type:"car",members:[{firstname:"Billy",lastname:"Bob",callsign:132,citizenid:"321553",playerId:1,position:[0,0,0]}],id:132},{name:"Unit 322",type:"heli",members:[{firstname:"Marc",lastname:"Marshall",callsign:322,citizenid:"451503",playerId:1,position:[0,0,0]}],id:322}]},{id:2,time:Date.now(),location:"Somewhere",info:[{label:"Sultan RS",icon:"gun"},{label:"XYZ 123",icon:"badge-tm"}],coords:[255,150],blip:51,linked:!1,offense:"Officer Down",code:"10-13",units:[{name:"Unit 132",type:"car",members:[{firstname:"Billy",lastname:"Bob",callsign:132,citizenid:"311342",playerId:1,position:[0,0,0]},{firstname:"Martin",lastname:"Contreras",callsign:521,citizenid:"912132",playerId:1,position:[0,0,0]}],id:132},{name:"Unit 823",type:"heli",members:[{firstname:"Bobby",lastname:"Hopkins",callsign:823,citizenid:"100341",playerId:1,position:[0,0,0]}],id:823},{name:"Unit 531",type:"motor",members:[{firstname:"Connor",lastname:"Collins",callsign:531,citizenid:"913213",playerId:1,position:[0,0,0]}],id:531},{name:"Unit 274",type:"boat",members:[{firstname:"Corey",lastname:"Hayes",callsign:274,citizenid:"920132",playerId:1,position:[0,0,0]}],id:274}]},{id:3,time:Date.now(),location:"Somewhere",coords:[500,750],linked:!1,blip:310,offense:"Officer Down",code:"10-13",units:[{name:"Unit 1",type:"car",members:[{firstname:"Billy",lastname:"bob",callsign:132,citizenid:"913213",playerId:1,position:[0,0,0]}],id:136},{name:"Unit 6",type:"heli",members:[{firstname:"Freddie",lastname:"Reid",callsign:823,citizenid:"920132",playerId:2,position:[0,0,0]}],id:823}]}],JOe=async()=>{if(at())return qOe;const e=await me("getCalls");return KOe(e)},Mu=dn(e=>({calls:[],fetchCalls:async()=>{const t=await JOe();e({calls:t})},updateCallUnits:(t,n)=>{e(r=>{const o=r.calls.findIndex(s=>s.id===t);if(o===-1)return r;const i=[...r.calls];return i[o]={...i[o],units:n},{calls:i}})},addCall:t=>{e(n=>({calls:[t,...n.calls]}))},setCalls:t=>e({calls:t})})),oB=()=>Mu(e=>e.calls),XOe=()=>Mu(e=>e.fetchCalls),QOe=()=>{const{calls:e,fetchCalls:t}=Mu(),[n,r]=_.useState(!1),o=Ul();_.useEffect(()=>{r(!0),(async()=>{t()})().then(()=>{r(!1)})},[]);const i=_.useMemo(()=>e.sort((s,a)=>a.id-s.id),[e]);return h.jsxs("div",{className:"card-background",children:[h.jsxs("div",{className:"card-title",children:[h.jsx(W,{style:{fontSize:17,color:"white"},weight:500,children:D.dispatch}),h.jsx(Ahe,{size:M(25),color:"white"})]}),h.jsx(Ye,{mt:5,mb:5}),h.jsx(St,{h:330,children:h.jsx("div",{className:"warrants-card-content",children:n?h.jsx(Pr,{h:"100%",children:h.jsx(en,{})}):i.length>0?i.map(s=>h.jsx("div",{className:"active-dispatchcall-card",onClick:()=>{o("/dispatch")},children:h.jsxs(nt,{style:{width:"100%"},children:[h.jsxs("div",{style:{flex:1},children:[h.jsxs(W,{style:{fontSize:13,color:"white"},weight:500,children:["(",s.code,") ",s.offense]}),h.jsxs("div",{style:{display:"flex",gap:5},children:[h.jsx(L0,{size:16,color:"#C1C2C5"}),h.jsx(W,{color:"dimmed",size:"xs",children:pe(s.time).fromNow()})]})]}),h.jsxs(W,{color:"dimmed",size:"xs",children:[D.responding_units,": ",s.units.length]})]})})):h.jsx(W,{color:"dimmed",size:"xs",children:D.no_recent_calls_found})})})]})},eCe=[{plate:"AF30442",reason:"This vehicle is wanted because its been a part of a murder and we need to confiscate it to check for evidence",expiresAt:pe(new Date).format("DD-MM-YYYY")},{plate:"AF30442",reason:"Billy",expiresAt:pe(new Date).format("DD-MM-YYYY")}],tCe=dn(e=>({bolos:at()?eCe:[],getBolos:async()=>{try{const t=await me("getBolos");return e({bolos:t}),{bolos:t}}catch(t){return console.error("Failed to fetch recent activities:",t),{bolos:[]}}},setBolos:t=>e({bolos:t})})),iB=[];for(let e=0;e<25;e++)iB[e]={plate:`44HJJO263${e+1}`,model:"Adder"};const SO={plate:"44HJJO263",model:"gauntlet2",owner:"John Doe (ABC123AW)",color:"Red",notes:"string",class:"Muscle",knownInformation:["Gaunlet"]},PO={plate:"44HJJO263",model:"sultan3",owner:"John Doe (ABC123AW)",color:"Black",notes:"string",class:"Super",knownInformation:["Adder"]},Nu=dn(e=>({selectedVehicle:null,isVehicleBOLO:!1,BOLOExpirationDate:"",getVehicles:async()=>at()?iB:await me("getAllVehicles"),setSelectedVehicle:t=>{at()&&e({selectedVehicle:Math.random()*10>5?SO:PO}),e({selectedVehicle:t})},setIsVehicleBOLO(t){e({isVehicleBOLO:t})},setBOLOExpirationDate(t){e({BOLOExpirationDate:t})}})),nCe=e=>{const{setSelectedVehicle:t,setIsVehicleBOLO:n,setBOLOExpirationDate:r}=Nu(),o=Math.random()*10>5?SO:PO,i=Ul();return h.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:10},children:[h.jsx(Ye,{}),h.jsxs("div",{style:{display:"flex",flexDirection:"column"},children:[h.jsx(W,{style:{fontSize:18,color:"white"},weight:500,children:D.reason}),h.jsx(W,{c:"gray.4",size:"sm",children:e.bolo.reason}),h.jsxs(W,{c:"dimmed",size:"xs",mt:5,children:[D.expires_at," ",e.bolo.expiresAt]})]}),h.jsx(Ye,{}),h.jsx("div",{style:{display:"flex",flexDirection:"column",gap:10,alignItems:"center",width:"100%",justifyContent:"center"},children:h.jsx(st,{variant:"light",color:"gray",w:200,onClick:async()=>{t(null);const s=await me("getVehicle",{plate:e.bolo.plate},{data:{...o}}),a=await me("isVehicleBOLO",{plate:e.bolo.plate},{data:!1});if(a){const c=await me("getBOLOExpirationDate",{plate:e.bolo.plate},{data:"12/12/2024"});r(c)}t(s),n(a),i("/vehicles"),ke.closeAll()},children:D.goto_vehicle})})]})},rCe=()=>{const{bolos:e,getBolos:t}=tCe(),[n,r]=_.useState(!1);return _.useEffect(()=>{r(!0),(async()=>{t()})().then(()=>{r(!1)})},[]),h.jsxs("div",{className:"card-background",children:[h.jsxs("div",{className:"card-title",children:[h.jsx(W,{style:{fontSize:17,color:"white"},weight:500,children:D.bolos}),h.jsx(Jhe,{size:M(25),color:"white"})]}),h.jsx(Ye,{mt:5,mb:5}),h.jsx(St,{h:290,children:h.jsx("div",{className:"warrants-card-content",children:n?h.jsx(Pr,{h:"100%",children:h.jsx(en,{})}):e.length>0?e.map(o=>h.jsx("div",{className:"bolos-card",onClick:async()=>{const i=await me("getBolo",{plate:o.plate},{data:{plate:"ABCDEFG",reason:"A pretty nice and cool reason",expiresAt:pe(new Date).format("DD-MM-YYYY")}});ke.open({title:h.jsxs("div",{style:{display:"flex",gap:10,alignItems:"center"},children:[h.jsx(ox,{size:20,color:"#C1C2C5"}),h.jsx(W,{style:{fontSize:16,color:"white"},weight:500,children:i.plate})]}),centered:!0,children:h.jsx(nCe,{bolo:i})})},children:h.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:5,width:"100%"},children:[h.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[h.jsxs("div",{style:{display:"flex",gap:5,alignItems:"center"},children:[h.jsx(ox,{size:20,color:"#C1C2C5"}),h.jsx(W,{style:{fontSize:13,color:"white"},weight:500,children:o.plate})]}),h.jsxs(W,{color:"dimmed",size:"xs",children:[D.expires_at," ",o.expiresAt]})]}),h.jsx(W,{c:"gray.4",size:"xs",lineClamp:2,children:o.reason})]})})):h.jsx(W,{color:"dimmed",size:"xs",children:D.no_bolos_found})})})]})},oCe=()=>{const{firstname:e,lastname:t}=bo(o=>o.personalData),{activeOfficers:n,getActiveOfficers:r}=ZP();return _.useEffect(()=>{r()},[]),h.jsxs("div",{className:"dashboard",children:[h.jsxs("div",{className:"left-side",children:[h.jsxs("div",{className:"header",children:[h.jsx(W,{style:{fontSize:24,color:"white"},weight:500,children:D.welcome_back.format(e,t)}),h.jsxs(W,{color:"dimmed",size:"xs",style:{display:"flex",gap:10},children:[h.jsx(DP,{size:M(18)})," ",h.jsx(W,{color:"dimmed",size:14,children:new Date().toLocaleDateString("en-EN",{weekday:"long",year:"numeric",month:"long",day:"numeric"})})]})]}),h.jsx(Ye,{}),h.jsx(Jye,{}),h.jsxs("div",{className:"content-bottom",children:[h.jsx(YOe,{}),h.jsx(UOe,{}),h.jsx(rCe,{})]})]}),h.jsx(Ye,{orientation:"vertical"}),h.jsxs("div",{className:"right-side",children:[h.jsx("div",{className:"card-background",children:h.jsxs(St,{h:400,children:[h.jsxs("div",{className:"card-title",children:[h.jsx(W,{style:{fontSize:17,color:"white"},weight:500,children:D.active_officers}),h.jsxs("div",{className:"right-side-title",children:[h.jsx(W,{style:{fontSize:17,color:"white"},weight:500,children:n.length}),h.jsx(A0,{size:M(20),color:"white"})]})]}),h.jsx(Ye,{mt:5,mb:5}),h.jsx("div",{className:"card-content",children:n.length>0?h.jsx("div",{className:"active-officers-cards",children:n.map(o=>h.jsx("div",{className:"active-officer-card",children:h.jsxs(nt,{style:{width:"100%"},children:[h.jsxs("div",{style:{flex:1},children:[h.jsxs(W,{style:{fontSize:13,color:"white"},weight:500,children:[o.firstname," ",o.lastname]}),h.jsxs(W,{color:"dimmed",size:"xs",children:[D.callsign,": ",o.callsign]})]}),h.jsxs(W,{color:"dimmed",size:"xs",children:[D.attached_unit,": ",o.unitId||"None"]})]})}))}):h.jsx(W,{color:"dimmed",size:"xs",children:"No active officers"})})]})}),h.jsx(QOe,{})]})]})};const iCe=e=>h.jsxs("div",{className:"card-background profile-card-info",children:[h.jsxs("div",{className:"card-title",children:[h.jsx(W,{style:{fontSize:17,color:"white"},weight:500,children:e.title}),typeof e.icon=="string"?h.jsx("i",{className:`ti ti-${e.icon}`,style:{fontSize:24,color:"white"}}):h.jsx(e.icon,{})]}),h.jsx(Ye,{style:{width:"100%"}}),h.jsx("div",{className:"profile-card-info-badges",children:e.children})]}),JI={title:"Debug Report title",id:0,description:"

This is a incident description

",evidence:[],officersInvolved:[{firstname:"Callum",lastname:"Graham",callsign:188,citizenid:"132142",playerId:1,position:[0,0,0]},{firstname:"Jacob",lastname:"Gray",callsign:273,citizenid:"152312",playerId:1,position:[0,0,0]},{firstname:"Edward",lastname:"Atkinson",callsign:125,citizenid:"948213",playerId:1,position:[0,0,0]}],citizensInvolved:[{firstname:"John",lastname:"Doe",citizenid:"BUB193Z4A",dob:Date.now()}]},Bi=dn(e=>({report:JI,isReportActive:!1,setActiveReport:t=>{at()&&e({report:JI}),e({report:t})},setReportActive:t=>{e({isReportActive:t})},setDescription:t=>{e(n=>({report:{...n.report,description:t}}))},setOfficersInvolved:t=>{e(n=>({report:{...n.report,officersInvolved:typeof t=="function"?t(n.report.officersInvolved):t}}))},setCitizensInvolved:t=>{e(n=>({report:{...n.report,citizensInvolved:typeof t=="function"?t(n.report.citizensInvolved):t}}))},setEvidence:t=>{e(n=>({report:{...n.report,evidence:typeof t=="function"?t(n.report.evidence):t}}))}})),sCe=()=>{const{setActiveReport:e,setReportActive:t}=Bi(),n=Li(u=>u.selectedProfile),r=Li(u=>u.profileCards),{setActiveIncident:o,setIncidentActive:i}=Ur(),s=Ul();if(!n)return h.jsx("div",{className:"content-width",children:h.jsx("div",{className:"card-background",children:h.jsxs("div",{className:"profile-no-selected",children:[h.jsx(HP,{size:M(50),color:"white"}),h.jsx(W,{style:{fontSize:15,color:"white"},weight:600,children:D.no_profile_selected})]})})});async function a(u){if(at())return s("/reports");const f=await me("getReport",u);e(f),t(!0),s("/reports")}async function c(u){if(at())return s("/incidents");const f=await me("getIncident",u);o(f),i(!0),s("/incidents")}return h.jsx("div",{className:"content-width",children:h.jsx(St,{h:860,children:h.jsxs("div",{className:"additional-profile-info",children:[r.map(u=>h.jsx(iCe,{title:u.title,icon:u.icon,children:h.jsx("div",{className:"profile-card-info-badges",children:n[u.id]?n[u.id].map(f=>h.jsx(mt,{color:"gray",variant:"filled",className:"profile-info-badge",radius:"md",children:f},f)):h.jsx(W,{color:"dimmed",size:"xs",children:D.no_cardid_registered.format(u.id)})})})),h.jsxs("div",{className:"card-background profile-card-info",children:[h.jsxs("div",{className:"card-title",children:[h.jsx(W,{style:{fontSize:17,color:"white"},weight:500,children:D.related_reports}),h.jsx(zP,{size:M(25),color:"white"})]}),h.jsx(Ye,{style:{width:"100%"}}),n.relatedReports&&(n.relatedReports.length>0?n.relatedReports.map(u=>h.jsxs("div",{className:"related-reports-card",onClick:()=>{a(u.id)},children:[h.jsx(W,{style:{fontSize:15,color:"white"},weight:500,children:u.title}),h.jsxs("div",{className:"related-reports-extra-info",children:[h.jsxs(W,{style:{fontSize:12},weight:500,color:"dimmed",children:[u.author," - Date: ",u.date]}),h.jsxs(W,{style:{fontSize:12},weight:500,color:"dimmed",children:["#",u.id]})]})]},u.id)):h.jsx(W,{color:"dimmed",size:"xs",children:D.no_related_reports}))]}),h.jsxs("div",{className:"card-background profile-card-info",children:[h.jsxs("div",{className:"card-title",children:[h.jsx(W,{style:{fontSize:17,color:"white"},weight:500,children:D.related_incidents}),h.jsx(FP,{size:M(25),color:"white"})]}),h.jsx(Ye,{style:{width:"100%"}}),n.relatedIncidents&&(n.relatedIncidents.length>0?n.relatedIncidents.map(u=>h.jsxs("div",{className:"related-reports-card",onClick:()=>{c(u.id)},children:[h.jsx(W,{style:{fontSize:15,color:"white"},weight:500,children:u.title}),h.jsxs("div",{className:"related-reports-extra-info",children:[h.jsxs(W,{style:{fontSize:12},weight:500,color:"dimmed",children:[u.author," - Date: ",u.date]}),h.jsxs(W,{style:{fontSize:12},weight:500,color:"dimmed",children:["#",u.id]})]})]},u.id)):h.jsx(W,{color:"dimmed",size:"xs",children:D.no_related_incidents}))]})]})})})},aCe=e=>{const{setSelectedProfile:t,selectedProfile:n}=Li(),r=_.useRef(null),[o,i]=_.useState(!1),s=async()=>{if(!n)return;i(!0);const a=r.current?.value;await me("updateProfileImage",{citizenId:n.citizenid,image:a},{data:1}),t({...n,image:a}),ke.closeAll()};return h.jsxs(Je,{children:[h.jsx(yn,{defaultValue:e.image,ref:r,label:D.image,description:D.avatar_description,placeholder:"https://r2.fivemanage.com/placeholder.jpg"}),h.jsx(st,{variant:"light",color:"gray",onClick:s,loading:o,children:"Confirm"})]})},lCe=()=>{const{selectedProfile:e,setSelectedProfile:t,isProfileWanted:n}=Li(),[r,o]=_.useState(!1);return e?h.jsx("div",{className:"content-width",children:h.jsx("div",{className:"card-background",children:h.jsxs("div",{className:"profile-card-content",children:[h.jsxs("div",{className:"profile-card-header",children:[h.jsxs(W,{style:{fontSize:14,color:"white"},children:[D.edit_citizen," #",e.citizenid]}),h.jsx("div",{className:"profile-card-header-buttons",children:h.jsx(At,{label:"Unlink",withArrow:!0,color:"gray",position:"bottom",children:h.jsx(Qe,{variant:"filled",color:"gray",onClick:()=>{t(null)},children:h.jsx(R0,{size:16,color:"white"})})})})]}),h.jsx(Ye,{style:{width:"100%"}}),h.jsxs("div",{className:"profile-card-profile-content",children:[h.jsxs("div",{className:"profile-card-wrapper",children:[h.jsxs("div",{className:"profile-card-image",onMouseEnter:()=>o(!0),onMouseLeave:()=>o(!1),children:[r&&h.jsx(Qe,{style:{position:"absolute",top:5,right:5,zIndex:99},onClick:()=>ke.open({title:h.jsx(W,{style:{fontSize:17,color:"white"},weight:500,children:D.change_picture}),centered:!0,size:"sm",children:h.jsx(aCe,{image:e.image})}),children:h.jsx(RP,{})}),h.jsx(ri,{width:145,height:180,src:e.image??"https://r2.fivemanage.com/s64hZD0G9WtYHbURWCuSc/placeholder.jpg",radius:"md",alt:"With default placeholder",withPlaceholder:!0}),n&&h.jsx(ri,{className:"watermark",src:"https://r2.fivemanage.com/s64hZD0G9WtYHbURWCuSc/wanted-stamp.png",radius:"md",alt:"With default placeholder",withPlaceholder:!0})]}),h.jsxs("div",{className:"profile-card-inputs",children:[h.jsx(et,{disabled:!0,icon:h.jsx(C8,{size:16}),placeholder:e.citizenid,size:"xs"}),h.jsx(et,{disabled:!0,icon:h.jsx(qhe,{size:16}),placeholder:e.firstname+" "+e.lastname,size:"xs"}),h.jsx(et,{disabled:!0,icon:h.jsx(lhe,{size:16}),placeholder:pe(e.dob).format("DD/MM/YYYY"),size:"xs"}),h.jsx(et,{disabled:!0,icon:h.jsx(phe,{size:16}),placeholder:e.phoneNumber,size:"xs"}),h.jsx(et,{disabled:!0,icon:h.jsx(vhe,{size:16}),placeholder:e.fingerprint??"No fingerprint found",size:"xs"})]})]}),h.jsx(Ye,{style:{width:"100%"}}),h.jsx("div",{className:"profile-card-information",children:h.jsx(ep,{content:e.notes,onSave:i=>{t({...e,notes:i}),me("saveProfileNotes",{citizenid:e.citizenid,notes:i})},styles:{content:{backgroundColor:"#242527"},toolbar:{backgroundColor:"#2C2E33"},controlsGroup:{pointerEvents:"auto",backgroundColor:"#282828"}},contentAreaStyle:{height:475,width:413,padding:0}})})]})]})})}):h.jsx("div",{className:"content-width",children:h.jsx("div",{className:"card-background",children:h.jsxs("div",{className:"profile-no-selected",children:[h.jsx(HP,{size:M(50),color:"white"}),h.jsx(W,{style:{fontSize:15,color:"white"},weight:600,children:D.no_profile_selected})]})})})},cCe=e=>{const[t,n]=_.useState(""),r=Li(f=>f.getPlayers),[o,i]=_.useState([]),[s,a]=_.useState(o),[c,u]=_.useState(!1);return _.useEffect(()=>{u(!0),(async()=>await r())().then(p=>{i(p.profiles),a(p.profiles),u(!1)})},[]),_.useEffect(()=>{if(t.trim()==="")a(o);else{const f=o.filter(p=>(p.citizenid||"").includes(t)||(p.firstname||"").toLowerCase().includes(t.toLowerCase())||(p.lastname||"").toLowerCase().includes(t.toLowerCase())||(p.firstname+" "+p.lastname||"").toLowerCase().includes(t.toLowerCase()));a(f)}},[t,s]),h.jsx("div",{className:"content-width",children:h.jsxs("div",{className:"card-background",children:[h.jsxs("div",{className:"card-title",children:[h.jsx(W,{style:{fontSize:17,color:"white"},weight:500,children:D.profiles}),h.jsx(WP,{size:M(25),color:"white"})]}),h.jsx(et,{icon:h.jsx(Ia,{}),variant:"filled",placeholder:D.search,mt:10,mb:10,value:t,onChange:f=>n(f.target.value)}),h.jsx(Ye,{mt:5,mb:5}),h.jsx("div",{className:"profiles-card-content",children:h.jsx(St,{h:860,children:h.jsx("div",{className:"profiles-card-content-flex",children:c?h.jsx(Pr,{h:"100%",children:h.jsx(en,{})}):s.length>0?s.map(f=>h.jsxs("div",{className:"profile-card",onClick:()=>e.handleProfileClick(f),children:[h.jsx(ri,{width:65,height:65,src:f.image??"https://cdn.vectorstock.com/i/preview-1x/97/68/account-avatar-dark-mode-glyph-ui-icon-vector-44429768.jpg",radius:"lg",alt:"With default placeholder",withPlaceholder:!0}),h.jsxs("div",{children:[h.jsxs(W,{weight:600,style:{fontSize:13,color:"white"},children:[f.firstname," ",f.lastname]}),h.jsxs(W,{style:{fontSize:12,color:"white"},children:[D.dob,": ",pe(f.dob).format("DD/MM/YYYY")]}),h.jsxs(W,{style:{fontSize:12,color:"white"},children:[D.citizen_id,": ",f.citizenid]})]})]},f.citizenid)):h.jsx(W,{color:"dimmed",size:"xs",children:D.no_profiles_found})})})})]})})},o1=h.jsx("svg",{width:"54",height:"54",viewBox:"0 0 38 38",xmlns:"http://www.w3.org/2000/svg",stroke:qy.colors.blue[6],children:h.jsx("g",{fill:"none",fillRule:"evenodd",children:h.jsxs("g",{transform:"translate(1 1)",strokeWidth:"2",children:[h.jsx("circle",{strokeOpacity:".5",cx:"18",cy:"18",r:"18"}),h.jsx("path",{d:"M36 18c0-9.94-8.06-18-18-18",children:h.jsx("animateTransform",{attributeName:"transform",type:"rotate",from:"0 18 18",to:"360 18 18",dur:"1s",repeatCount:"indefinite"})})]})})}),uCe=()=>{const[e,t]=_.useState(!1),{setIsProfileWanted:n,setSelectedProfile:r}=Li(),o=async i=>{t(!0),r(null),n(!1);const s=await me("getProfile",i.citizenid,{data:{...UP,firstName:i.firstname,lastName:i.lastname,citizenid:i.citizenid}}),a=await me("isProfileWanted",i.citizenid,{data:!1});t(!1),r(s),n(a)};return h.jsxs("div",{className:"profiles",children:[h.jsx(cCe,{handleProfileClick:o}),h.jsx(Wf,{visible:e,overlayOpacity:.97,overlayColor:"rgb(34, 35, 37)",transitionDuration:250,loader:o1,style:{left:795,width:935,height:"96%",top:19,borderRadius:"0.25rem"}}),h.jsx(lCe,{}),h.jsx(sCe,{})]})};var dCe=function e(t,n){if(t===n)return!0;if(t&&n&&typeof t=="object"&&typeof n=="object"){if(t.constructor!==n.constructor)return!1;var r,o,i;if(Array.isArray(t)){if(r=t.length,r!=n.length)return!1;for(o=r;o--!==0;)if(!e(t[o],n[o]))return!1;return!0}if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===n.toString();if(i=Object.keys(t),r=i.length,r!==Object.keys(n).length)return!1;for(o=r;o--!==0;)if(!Object.prototype.hasOwnProperty.call(n,i[o]))return!1;for(o=r;o--!==0;){var s=i[o];if(!e(t[s],n[s]))return!1}return!0}return t!==t&&n!==n};const XI=Ea(dCe);function Ix(e){return e===null||typeof e!="object"?{}:Object.keys(e).reduce((t,n)=>{const r=e[n];return r!=null&&r!==!1&&(t[n]=r),t},{})}var fCe=Object.defineProperty,QI=Object.getOwnPropertySymbols,pCe=Object.prototype.hasOwnProperty,hCe=Object.prototype.propertyIsEnumerable,ej=(e,t,n)=>t in e?fCe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,mCe=(e,t)=>{for(var n in t||(t={}))pCe.call(t,n)&&ej(e,n,t[n]);if(QI)for(var n of QI(t))hCe.call(t,n)&&ej(e,n,t[n]);return e};function sB(e,t){if(t===null||typeof t!="object")return{};const n=mCe({},t);return Object.keys(t).forEach(r=>{r.includes(`${String(e)}.`)&&delete n[r]}),n}const gCe="__MANTINE_FORM_INDEX__";function tj(e,t){return t?typeof t=="boolean"?t:Array.isArray(t)?t.includes(e.replace(/[.][0-9]/g,`.${gCe}`)):!1:!1}function nj(e,t,n){typeof n.value=="object"&&(n.value=Lc(n.value)),!n.enumerable||n.get||n.set||!n.configurable||!n.writable||t==="__proto__"?Object.defineProperty(e,t,n):e[t]=n.value}function Lc(e){if(typeof e!="object")return e;var t=0,n,r,o,i=Object.prototype.toString.call(e);if(i==="[object Object]"?o=Object.create(e.__proto__||null):i==="[object Array]"?o=Array(e.length):i==="[object Set]"?(o=new Set,e.forEach(function(s){o.add(Lc(s))})):i==="[object Map]"?(o=new Map,e.forEach(function(s,a){o.set(Lc(a),Lc(s))})):i==="[object Date]"?o=new Date(+e):i==="[object RegExp]"?o=new RegExp(e.source,e.flags):i==="[object DataView]"?o=new e.constructor(Lc(e.buffer)):i==="[object ArrayBuffer]"?o=e.slice(0):i.slice(-6)==="Array]"&&(o=new e.constructor(e)),o){for(r=Object.getOwnPropertySymbols(e);t0,errors:t}}function jx(e,t,n="",r={}){return typeof e!="object"||e===null?r:Object.keys(e).reduce((o,i)=>{const s=e[i],a=`${n===""?"":`${n}.`}${i}`,c=rs(a,t);let u=!1;return typeof s=="function"&&(o[a]=s(c,t,a)),typeof s=="object"&&Array.isArray(c)&&(u=!0,c.forEach((f,p)=>jx(s,t,`${a}.${p}`,o))),typeof s=="object"&&typeof c=="object"&&c!==null&&(u||jx(s,t,a,o)),o},r)}function Lx(e,t){return rj(typeof e=="function"?e(t):jx(e,t))}function ph(e,t,n){if(typeof e!="string")return{hasError:!1,error:null};const r=Lx(t,n),o=Object.keys(r.errors).find(i=>e.split(".").every((s,a)=>s===i.split(".")[a]));return{hasError:!!o,error:o?r.errors[o]:null}}function vCe(e,{from:t,to:n},r){const o=rs(e,r);if(!Array.isArray(o))return r;const i=[...o],s=o[t];return i.splice(t,1),i.splice(n,0,s),i1(e,i,r)}var yCe=Object.defineProperty,oj=Object.getOwnPropertySymbols,_Ce=Object.prototype.hasOwnProperty,wCe=Object.prototype.propertyIsEnumerable,ij=(e,t,n)=>t in e?yCe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,bCe=(e,t)=>{for(var n in t||(t={}))_Ce.call(t,n)&&ij(e,n,t[n]);if(oj)for(var n of oj(t))wCe.call(t,n)&&ij(e,n,t[n]);return e};function xCe(e,{from:t,to:n},r){const o=`${e}.${t}`,i=`${e}.${n}`,s=bCe({},r);return Object.keys(r).every(a=>{let c,u;if(a.startsWith(o)&&(c=a,u=a.replace(o,i)),a.startsWith(i)&&(c=a.replace(i,o),u=a),c&&u){const f=s[c],p=s[u];return p===void 0?delete s[c]:s[c]=p,f===void 0?delete s[u]:s[u]=f,!1}return!0}),s}function SCe(e,t,n){const r=rs(e,n);return Array.isArray(r)?i1(e,r.filter((o,i)=>i!==t),n):n}var PCe=Object.defineProperty,sj=Object.getOwnPropertySymbols,OCe=Object.prototype.hasOwnProperty,CCe=Object.prototype.propertyIsEnumerable,aj=(e,t,n)=>t in e?PCe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,kCe=(e,t)=>{for(var n in t||(t={}))OCe.call(t,n)&&aj(e,n,t[n]);if(sj)for(var n of sj(t))CCe.call(t,n)&&aj(e,n,t[n]);return e};function lj(e,t){const n=e.substring(t.length+1).split(".")[0];return parseInt(n,10)}function cj(e,t,n,r){if(t===void 0)return n;const o=`${String(e)}`;let i=n;r===-1&&(i=sB(`${o}.${t}`,i));const s=kCe({},i),a=new Set;return Object.entries(i).filter(([c])=>{if(!c.startsWith(`${o}.`))return!1;const u=lj(c,o);return Number.isNaN(u)?!1:u>=t}).forEach(([c,u])=>{const f=lj(c,o),p=c.replace(`${o}.${f}`,`${o}.${f+r}`);s[p]=u,a.add(p),a.has(c)||delete s[c]}),s}function ECe(e,t,n,r){const o=rs(e,r);if(!Array.isArray(o))return r;const i=[...o];return i.splice(typeof n=="number"?n:i.length,0,t),i1(e,i,r)}function uj(e,t){const n=Object.keys(e);if(typeof t=="string"){const r=n.filter(o=>o.startsWith(`${t}.`));return e[t]||r.some(o=>e[o])||!1}return n.some(r=>e[r])}function $Ce(e){return t=>{if(!t)e(t);else if(typeof t=="function")e(t);else if(typeof t=="object"&&"nativeEvent"in t){const{currentTarget:n}=t;n instanceof HTMLInputElement?n.type==="checkbox"?e(n.checked):e(n.value):(n instanceof HTMLTextAreaElement||n instanceof HTMLSelectElement)&&e(n.value)}else e(t)}}var MCe=Object.defineProperty,NCe=Object.defineProperties,TCe=Object.getOwnPropertyDescriptors,dj=Object.getOwnPropertySymbols,ICe=Object.prototype.hasOwnProperty,jCe=Object.prototype.propertyIsEnumerable,fj=(e,t,n)=>t in e?MCe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Ls=(e,t)=>{for(var n in t||(t={}))ICe.call(t,n)&&fj(e,n,t[n]);if(dj)for(var n of dj(t))jCe.call(t,n)&&fj(e,n,t[n]);return e},Ow=(e,t)=>NCe(e,TCe(t));function Zl({initialValues:e={},initialErrors:t={},initialDirty:n={},initialTouched:r={},clearInputErrorOnChange:o=!0,validateInputOnChange:i=!1,validateInputOnBlur:s=!1,transformValues:a=u=>u,validate:c}={}){const[u,f]=_.useState(r),[p,g]=_.useState(n),[v,y]=_.useState(e),[w,P]=_.useState(Ix(t)),x=_.useRef(e),S=J=>{x.current=J},O=_.useCallback(()=>f({}),[]),E=J=>{const ne=J?Ls(Ls({},v),J):v;S(ne),g({})},$=_.useCallback(J=>P(ne=>Ix(typeof J=="function"?J(ne):J)),[]),N=_.useCallback(()=>P({}),[]),I=_.useCallback(()=>{y(e),N(),S(e),g({}),O()},[]),R=_.useCallback((J,ne)=>$(le=>Ow(Ls({},le),{[J]:ne})),[]),B=_.useCallback(J=>$(ne=>{if(typeof J!="string")return ne;const le=Ls({},ne);return delete le[J],le}),[]),z=_.useCallback(J=>g(ne=>{if(typeof J!="string")return ne;const le=sB(J,ne);return delete le[J],le}),[]),G=_.useCallback((J,ne)=>{const le=tj(J,i);z(J),f(_e=>Ow(Ls({},_e),{[J]:!0})),y(_e=>{const Ne=i1(J,ne,_e);if(le){const we=ph(J,c,Ne);we.hasError?R(J,we.error):B(J)}return Ne}),!le&&o&&R(J,null)},[]),X=_.useCallback(J=>{y(ne=>{const le=typeof J=="function"?J(ne):J;return Ls(Ls({},ne),le)}),o&&N()},[]),Q=_.useCallback((J,ne)=>{z(J),y(le=>vCe(J,ne,le)),P(le=>xCe(J,ne,le))},[]),V=_.useCallback((J,ne)=>{z(J),y(le=>SCe(J,ne,le)),P(le=>cj(J,ne,le,-1))},[]),H=_.useCallback((J,ne,le)=>{z(J),y(_e=>ECe(J,ne,le,_e)),P(_e=>cj(J,le,_e,1))},[]),Z=_.useCallback(()=>{const J=Lx(c,v);return P(J.errors),J},[v,c]),Y=_.useCallback(J=>{const ne=ph(J,c,v);return ne.hasError?R(J,ne.error):B(J),ne},[v,c]),j=(J,{type:ne="input",withError:le=!0,withFocus:_e=!0}={})=>{const we={onChange:$Ce(He=>G(J,He))};return le&&(we.error=w[J]),ne==="checkbox"?we.checked=rs(J,v):we.value=rs(J,v),_e&&(we.onFocus=()=>f(He=>Ow(Ls({},He),{[J]:!0})),we.onBlur=()=>{if(tj(J,s)){const He=ph(J,c,v);He.hasError?R(J,He.error):B(J)}}),we},U=(J,ne)=>le=>{le?.preventDefault();const _e=Z();_e.hasErrors?ne?.(_e.errors,v,le):J?.(a(v),le)},F=J=>a(J||v),K=_.useCallback(J=>{J.preventDefault(),I()},[]),ee=J=>{if(J){const le=rs(J,p);if(typeof le=="boolean")return le;const _e=rs(J,v),Ne=rs(J,x.current);return!XI(_e,Ne)}return Object.keys(p).length>0?uj(p):!XI(v,x.current)},fe=_.useCallback(J=>uj(u,J),[u]),ie=_.useCallback(J=>J?!ph(J,c,v).hasError:!Lx(c,v).hasErrors,[v,c]);return{values:v,errors:w,setValues:X,setErrors:$,setFieldValue:G,setFieldError:R,clearFieldError:B,clearErrors:N,reset:I,validate:Z,validateField:Y,reorderListItem:Q,removeListItem:V,insertListItem:H,getInputProps:j,onSubmit:U,onReset:K,isDirty:ee,isTouched:fe,setTouched:f,setDirty:g,resetTouched:O,resetDirty:E,isValid:ie,getTransformedValues:F}}const LCe=()=>{const{setActiveIncident:e,setIncidentActive:t}=Ur(),n=Zl({initialValues:{title:""},validate:{title:o=>o.length===0?D.incident_title_required:null}}),r=async o=>{ke.closeAll();const i=await me("createIncident",o.title,{data:1});e({title:o.title,id:i,criminals:[],description:"

",evidence:[],officersInvolved:[]}),t(!0)};return h.jsx("form",{onSubmit:n.onSubmit(o=>r(o)),children:h.jsxs(Je,{children:[h.jsx(yn,{label:D.incident_title,"data-autofocus":!0,withAsterisk:!0,...n.getInputProps("title")}),h.jsx(st,{type:"submit",fullWidth:!0,variant:"light",color:"gray",children:D.confirm})]})})},lB=[];for(let e=0;e<25;e++)lB[e]={title:`Incident ${e+1}`,id:e,author:"Some One",date:Date.now()};const DCe=async()=>at()?{incidents:lB}:await me("getIncidents"),cB=dn(e=>({incidents:[],fetchIncidents:async()=>{const t=await DCe();e({incidents:t.incidents})},setIncidents:t=>{e(n=>({incidents:typeof t=="function"?t(n.incidents):t}))}})),RCe=e=>{const{incidents:t,fetchIncidents:n}=cB(),[r,o]=_.useState(!1),[i,s]=_.useState(""),a=500,[c,u]=_.useState(i),[f,p]=_.useState(null),[g,v]=_.useState(t);return _.useEffect(()=>{f!==null&&clearTimeout(f),o(!0);const y=setTimeout(()=>{u(i),o(!1)},a);return p(y),()=>{clearTimeout(y)}},[i]),_.useEffect(()=>{if(c.trim()==="")v(t);else{const y=t.filter(w=>(w.title||"").toLocaleLowerCase().includes(i.toLocaleLowerCase())||(w.author||"").toLocaleLowerCase().includes(i.toLocaleLowerCase()));v(y)}},[c,t]),_.useEffect(()=>{o(!0),(async()=>await n())().then(()=>{o(!1)})},[]),h.jsx("div",{className:"content-width",children:h.jsxs("div",{className:"card-background",children:[h.jsxs("div",{className:"card-title",children:[h.jsx(W,{style:{fontSize:17,color:"white"},weight:500,children:D.incidents}),h.jsx(FP,{size:M(25),color:"white"})]}),h.jsx(et,{icon:h.jsx(Ia,{}),variant:"filled",placeholder:D.search,mt:10,mb:10,onChange:y=>s(y.target.value)}),h.jsxs(st,{fullWidth:!0,variant:"light",color:"gray",onClick:()=>ke.open({title:h.jsx(W,{style:{fontSize:17,color:"white"},weight:500,children:D.create_incident}),centered:!0,size:"sm",children:h.jsx(LCe,{})}),children:[h.jsx(O8,{size:M(18),style:{marginRight:5}})," ",D.create_incident]}),h.jsx(Ye,{mt:10,mb:10}),h.jsx("div",{className:"incidents-cards-content",children:h.jsx(St,{h:680,children:h.jsx("div",{className:"profiles-card-content-flex",children:r?h.jsx(Pr,{children:h.jsx(en,{})}):g.map(y=>h.jsx("div",{className:"incident-card",onClick:()=>e.handleIncidentClick(y),children:h.jsxs("div",{className:"incident-card-content",children:[h.jsx(W,{style:{fontSize:17,color:"white"},weight:500,children:y.title}),h.jsxs("div",{className:"incident-card-dimmed-text",children:[h.jsxs(W,{color:"dimmed",size:"xs",children:[y.author," - ",new Date(y.date).toLocaleDateString()]}),h.jsxs(W,{color:"dimmed",size:"xs",children:["#",y.id]})]})]})},y.id))})})})]})})},zCe=()=>{const{incident:e,setOfficersInvolved:t}=Ur(),[n,r]=_.useState(""),{officers:o,getOfficers:i}=ZP(),[s,a]=_.useState(o),c=500,[u,f]=_.useState(n),[p,g]=_.useState(!1),[v,y]=_.useState(null);_.useEffect(()=>{v!==null&&clearTimeout(v),g(!0);const P=setTimeout(()=>{f(n),g(!1)},c);return y(P),()=>{clearTimeout(P)}},[n]),_.useEffect(()=>{if(u.trim()==="")a(o);else{const P=o.filter(x=>(x.citizenid||"").toLowerCase().includes(n.toLowerCase())||(x.firstname||"").toLowerCase().includes(n.toLowerCase())||(x.lastname||"").toLowerCase().includes(n.toLowerCase())||(x.firstname+" "+x.lastname||"").toLowerCase().includes(n.toLowerCase()));a(P)}},[u,o]),_.useEffect(()=>{i()},[]);const w=async P=>{if(e.officersInvolved.some(x=>x.citizenid===P.citizenid))return ke.closeAll();await me("addOfficer",{id:e.id,citizenid:P.citizenid},{data:1}),ke.closeAll(),t(x=>x.some(S=>S.citizenid===P.citizenid)?x:[...x,{firstname:P.firstname,lastname:P.lastname,callsign:P.callsign,citizenid:P.citizenid,playerId:P.playerId,position:[1,1,1]}])};return h.jsx("form",{children:h.jsxs(Je,{children:[h.jsx(et,{icon:h.jsx(Ia,{}),variant:"filled",placeholder:D.search,mt:10,mb:10,value:n,onChange:P=>r(P.target.value)}),p?h.jsx(Pr,{children:h.jsx(en,{})}):s.length>0?s.map(P=>h.jsxs("div",{className:"add-officer-card",onClick:()=>w(P),children:[h.jsxs(W,{weight:500,style:{fontSize:13,color:"white"},children:[P.firstname," ",P.lastname]}),h.jsxs(W,{style:{fontSize:13,color:"white"},children:[D.callsign,": ",P.callsign]})]},P.citizenid)):h.jsxs(Je,{spacing:0,c:"dark.2",justify:"center",align:"center",children:[h.jsx(Gf,{size:36}),h.jsx(W,{size:"xl",children:D.no_officers_found})]})]})})},ACe=()=>{const[e,t]=_.useState(!1),{incident:n,setEvidence:r}=Ur(),o=Zl({initialValues:{label:"",image:""},validate:{label:s=>s.length===0?D.image_label_required:null,image:s=>s.length===0?D.image_url_required:null}}),i=async s=>{t(!0),await me("addEvidence",{id:n.id,evidence:{...s}},{data:1}),r(a=>[...a,s]),t(!1),ke.closeAll()};return h.jsx("form",{onSubmit:o.onSubmit(s=>i(s)),children:h.jsxs(Je,{children:[h.jsx(yn,{label:D.image_label,withAsterisk:!0,...o.getInputProps("label")}),h.jsx(yn,{label:h.jsxs("div",{style:{display:"flex",gap:10,alignItems:"center",marginBottom:5},children:[h.jsx(W,{children:D.image_url}),h.jsx(At,{label:D.take_picture,withArrow:!0,color:"gray",children:h.jsx(Qe,{disabled:o.getInputProps("label").value==="",variant:"default",size:"sm",p:1.5,onClick:async()=>{await me("takePicture",{id:n.id,imageLabel:o.getInputProps("label").value,type:"incident"},{data:1})},children:h.jsx(b8,{size:"1.125rem"})})})]}),placeholder:"https://i.imgur.com/dqopYB9b.jpg",...o.getInputProps("image")}),h.jsx(st,{variant:"light",color:"gray",type:"submit",loading:e,children:D.add_evidence})]})})},BCe=ue(()=>({container:{position:"relative"},image:{zIndex:2,"&:hover":{cursor:"pointer"}},actionIcon:{position:"absolute",top:0,right:0,zIndex:1}})),FCe=({evidence:e})=>{const{classes:t}=BCe(),[n,r]=_.useState(!1),{incident:o,setEvidence:i}=Ur();return h.jsx(At,{label:e.label,withArrow:!0,color:"gray",children:h.jsxs(Pe,{className:t.container,onMouseEnter:()=>r(!0),onMouseLeave:()=>r(!1),children:[h.jsx(ri,{src:e.image,radius:"sm",width:105,height:105,className:t.image,onClick:()=>ke.open({children:h.jsx(ri,{src:e.image,onClick:()=>ke.closeAll()}),withCloseButton:!1,centered:!0,padding:0,size:"unset",transitionProps:{transition:"pop"}})},`${e.label}-${e.image}`),n&&h.jsx(Qe,{variant:"filled",color:"red",radius:"sm",size:"xs",className:t.actionIcon,onClick:()=>ke.openConfirmModal({title:h.jsx(W,{style:{fontSize:16,color:"white"},weight:500,children:D.remove_evidence}),centered:!0,children:h.jsx(W,{size:"sm",c:"dark.2",children:D.remove_evidence_confirm.format(e.label)}),labels:{confirm:D.confirm,cancel:D.cancel},confirmProps:{color:"red"},groupProps:{spacing:6},onConfirm:async()=>{await me("removeEvidence",{id:o.id,label:e.label,image:e.image},{data:1}),i(s=>s.filter(a=>a.image!==e.image&&a.label!==e.label))}}),children:h.jsx(uu,{})})]})})},VCe=()=>{const{incident:e,isIncidentActive:t,setIncidentActive:n,setOfficersInvolved:r,setDescription:o}=Ur(),{setIncidents:i}=cB();return t?h.jsx(St,{h:860,children:h.jsxs("div",{className:"incident-content-width",children:[h.jsxs("div",{className:"incident-middle-content",children:[h.jsxs("div",{className:"profile-card-header",children:[h.jsx(W,{style:{fontSize:15,color:"white"},children:e.title}),h.jsxs("div",{className:"profile-card-header-buttons",children:[h.jsx(At,{label:D.delete_incident,withArrow:!0,color:"gray",position:"bottom",children:h.jsx(Qe,{variant:"filled",color:"red",onClick:()=>{ke.openConfirmModal({title:h.jsx(W,{style:{fontSize:17,color:"white"},weight:500,children:D.delete_incident}),size:"sm",centered:!0,labels:{confirm:D.confirm,cancel:D.cancel},groupProps:{spacing:6},confirmProps:{color:"red"},onConfirm:async()=>{await me("deleteIncident",{id:e.id},{data:1})&&i(a=>a.filter(c=>c.id!==e.id)),n(!1)},children:h.jsx(W,{size:"sm",c:"dark.2",children:D.delete_incident_confirm.format(e.title)})})},children:h.jsx(z0,{size:16,color:"white"})})}),h.jsx(At,{label:D.unlink,withArrow:!0,color:"gray",position:"bottom",children:h.jsx(Qe,{variant:"filled",color:"gray",onClick:()=>{n(!1)},children:h.jsx(R0,{size:16,color:"white"})})})]})]}),h.jsx(Ye,{style:{width:"100%"}}),h.jsx("div",{className:"incident-middle-card",children:h.jsx(ep,{content:e.description,onSave:s=>{me("saveIncidentContents",{incidentId:e.id,contents:s}),o(s)},styles:{content:{backgroundColor:"#242527"},toolbar:{backgroundColor:"#2C2E33"},controlsGroup:{pointerEvents:"auto",backgroundColor:"#282828"}},contentAreaStyle:{height:270,width:413,padding:0}})})]}),h.jsxs("div",{className:"card-background profile-card-info",children:[h.jsxs("div",{className:"card-title",children:[h.jsx(W,{style:{fontSize:17,color:"white"},weight:500,children:D.officers_involved}),h.jsx(A0,{size:M(25),color:"white"})]}),h.jsx(Ye,{style:{width:"100%"}}),h.jsxs("div",{className:"profile-card-info-badges",children:[h.jsx(mt,{color:"gray",variant:"filled",className:"incident-info-badge-main",radius:"md",onClick:()=>ke.open({title:h.jsx(W,{style:{fontSize:17,color:"white"},weight:500,children:D.add_officer}),centered:!0,size:"sm",children:h.jsx(zCe,{})}),children:D.add_officer}),e.officersInvolved.map(s=>h.jsxs(mt,{color:"gray",variant:"filled",className:"incident-info-badge",rightSection:h.jsx(Qe,{size:"xs",radius:"xl",variant:"transparent",onClick:()=>{ke.openConfirmModal({title:h.jsx(W,{style:{fontSize:16,color:"white"},weight:500,children:D.remove_officer}),centered:!0,children:h.jsx(W,{size:"sm",c:"dark.2",children:D.remove_officer_confirm.format(s.firstname,s.lastname,s.callsign)}),confirmProps:{color:"red"},groupProps:{spacing:6},labels:{confirm:D.confirm,cancel:D.cancel},onConfirm:async()=>{await me("removeOfficer",{id:e.id,citizenid:s.citizenid},{data:1}),r(a=>a.filter(c=>c.citizenid!==s.citizenid))}})},children:h.jsx(uu,{size:M(10)})}),children:[s.firstname," ",s.lastname," ",s.callsign?`(${s.callsign})`:""]},s.citizenid))]})]}),h.jsxs("div",{className:"card-background profile-card-info",children:[h.jsxs("div",{className:"card-title",children:[h.jsx(W,{style:{fontSize:17,color:"white"},weight:500,children:D.evidence}),h.jsx($8,{size:M(25),color:"white"})]}),h.jsx(Ye,{style:{width:"100%"}}),h.jsxs("div",{className:"profile-card-info-badges",children:[h.jsx(st,{onClick:()=>ke.open({centered:!0,title:h.jsx(W,{style:{fontSize:16,color:"white"},weight:500,children:D.add_evidence}),children:h.jsx(ACe,{}),size:"sm"}),variant:"filled",color:"gray",w:105,h:105,children:h.jsx(Eu,{size:36})}),e.evidence.map(s=>h.jsx(FCe,{evidence:s},`${s.image}-${s.label}`))]})]})]})}):h.jsx("div",{className:"content-width",children:h.jsx("div",{className:"card-background",children:h.jsxs("div",{className:"profile-no-selected",children:[h.jsx(D0,{size:M(50),color:"white"}),h.jsx(W,{style:{fontSize:15,color:"white"},weight:600,children:D.no_incident_selected})]})})})},pj=[{firstname:"John",lastname:"Doe",dob:Date.now(),citizenid:"12345"},{firstname:"Jane",lastname:"Smith",dob:Date.now(),citizenid:"67890"},{firstname:"David",lastname:"Williams",dob:Date.now(),citizenid:"13579"},{firstname:"Samantha",lastname:"Jones",dob:Date.now(),citizenid:"24680"},{firstname:"Robert",lastname:"Garcia",dob:Date.now(),citizenid:"97531"},{firstname:"Emily",lastname:"Brown",dob:Date.now(),citizenid:"11223"},{firstname:"Michael",lastname:"Davis",dob:Date.now(),citizenid:"33445"},{firstname:"Sarah",lastname:"Wilson",dob:Date.now(),citizenid:"55667"},{firstname:"James",lastname:"Taylor",dob:Date.now(),citizenid:"77889"},{firstname:"Laura",lastname:"Moore",dob:Date.now(),citizenid:"99001"},{firstname:"Kevin",lastname:"Martin",dob:Date.now(),citizenid:"12321"},{firstname:"Jessica",lastname:"Lee",dob:Date.now(),citizenid:"34543"},{firstname:"Daniel",lastname:"Perez",dob:Date.now(),citizenid:"56765"},{firstname:"Nancy",lastname:"White",dob:Date.now(),citizenid:"78987"},{firstname:"Steven",lastname:"Harris",dob:Date.now(),citizenid:"90109"},{firstname:"Lisa",lastname:"Clark",dob:Date.now(),citizenid:"12212"},{firstname:"Paul",lastname:"Rodriguez",dob:Date.now(),citizenid:"34434"},{firstname:"Anna",lastname:"Lewis",dob:Date.now(),citizenid:"56656"},{firstname:"Charles",lastname:"Walker",dob:Date.now(),citizenid:"78878"},{firstname:"Susan",lastname:"Allen",dob:Date.now(),citizenid:"90090"}],HCe=dn(e=>({criminalProfiles:at()?pj:[],getCriminalProfiles:async()=>{const t=await me("getCriminalProfiles",{data:pj,delay:300});e({criminalProfiles:t})},setCriminalProfiles:t=>e({criminalProfiles:t})})),WCe=e=>{let t=e.length,n;for(;t!==0;)n=Math.floor(Math.random()*t),t--,[e[t],e[n]]=[e[n],e[t]];return e},UCe=()=>{const{incident:e,setCriminals:t}=Ur(),[n,r]=_.useState(""),{criminalProfiles:o,getCriminalProfiles:i}=HCe(),[s,a]=_.useState(o),c=500,[u,f]=_.useState(n),[p,g]=_.useState(!1),[v,y]=_.useState(null);_.useEffect(()=>{v!==null&&clearTimeout(v),g(!0);const P=setTimeout(()=>{f(n),g(!1)},c);return y(P),()=>{clearTimeout(P)}},[n]),_.useEffect(()=>{if(u.trim()==="")a(WCe([...o]).slice(0,5));else{const P=o.filter(x=>(x.citizenid||"").toLowerCase().includes(n.toLowerCase())||(x.firstname||"").toLowerCase().includes(n.toLowerCase())||(x.lastname||"").toLowerCase().includes(n.toLowerCase())||(x.firstname+" "+x.lastname||"").toLowerCase().includes(n.toLowerCase()));a(P)}},[u,o]),_.useEffect(()=>{(async()=>{await i()})()},[]);const w=async P=>{await me("addCriminal",{id:e.id,criminalId:P.citizenid},{data:1}),ke.closeAll(),t(x=>x.some(S=>S.citizenid===P.citizenid)?x:[...x,{citizenid:P.citizenid,dob:P.dob,firstname:P.firstname,lastname:P.lastname,image:P.image,charges:[],issueWarrant:!1,pleadedGuilty:!1,processed:!1,penalty:{time:0,reduction:0,points:0,fine:0}}])};return h.jsx("form",{children:h.jsxs(Je,{children:[h.jsx(et,{icon:h.jsx(Ia,{}),variant:"filled",placeholder:D.search,mt:10,mb:10,value:n,onChange:P=>r(P.target.value)}),p?h.jsx(Pr,{children:h.jsx(en,{})}):s.length>0?s.map(P=>h.jsxs("div",{className:"profile-card",onClick:()=>w(P),children:[h.jsx(ri,{width:65,height:65,src:P.image??"https://cdn.vectorstock.com/i/preview-1x/97/68/account-avatar-dark-mode-glyph-ui-icon-vector-44429768.jpg",radius:"lg",alt:"With default placeholder",withPlaceholder:!0}),h.jsxs("div",{children:[h.jsxs(W,{weight:600,style:{fontSize:13,color:"white"},children:[P.firstname," ",P.lastname]}),h.jsxs(W,{style:{fontSize:12,color:"white"},children:[D.dob,": ",P.dob]}),h.jsxs(W,{style:{fontSize:12,color:"white"},children:[D.citizen_id,": ",P.citizenid]})]})]},P.citizenid)):h.jsxs(Je,{spacing:0,c:"dark.2",justify:"center",align:"center",children:[h.jsx(Gf,{size:36}),h.jsx(W,{size:"xl",children:D.no_profiles_found})]})]})})};var ZCe=Object.defineProperty,GCe=Object.defineProperties,YCe=Object.getOwnPropertyDescriptors,_y=Object.getOwnPropertySymbols,uB=Object.prototype.hasOwnProperty,dB=Object.prototype.propertyIsEnumerable,hj=(e,t,n)=>t in e?ZCe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,mj=(e,t)=>{for(var n in t||(t={}))uB.call(t,n)&&hj(e,n,t[n]);if(_y)for(var n of _y(t))dB.call(t,n)&&hj(e,n,t[n]);return e},gj=(e,t)=>GCe(e,YCe(t)),KCe=(e,t)=>{var n={};for(var r in e)uB.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&_y)for(var r of _y(e))t.indexOf(r)<0&&dB.call(e,r)&&(n[r]=e[r]);return n};function Dx(e){var t=e,{direction:n,style:r}=t,o=KCe(t,["direction","style"]);const i=ir();return k.createElement(yq,gj(mj({},o),{style:gj(mj({},r),{transform:n==="next"&&i.dir==="ltr"||n==="previous"&&i.dir==="rtl"?"rotate(270deg)":"rotate(90deg)"})}))}Dx.displayName="@mantine/dates/Chevron";var qCe=Object.defineProperty,JCe=Object.defineProperties,XCe=Object.getOwnPropertyDescriptors,vj=Object.getOwnPropertySymbols,QCe=Object.prototype.hasOwnProperty,eke=Object.prototype.propertyIsEnumerable,yj=(e,t,n)=>t in e?qCe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,hh=(e,t)=>{for(var n in t||(t={}))QCe.call(t,n)&&yj(e,n,t[n]);if(vj)for(var n of vj(t))eke.call(t,n)&&yj(e,n,t[n]);return e},_j=(e,t)=>JCe(e,XCe(t));const Of={xs:M(30),sm:M(36),md:M(42),lg:M(48),xl:M(54)};var tke=ue((e,{radius:t,isStatic:n},{size:r})=>{const o=e.fn.variant({variant:"filled"}),i=e.fn.variant({variant:"light"});return{day:_j(hh({width:re({size:r,sizes:Of}),height:re({size:r,sizes:Of}),fontSize:re({size:r,sizes:e.fontSizes}),display:"inline-flex",justifyContent:"center",alignItems:"center",userSelect:n?void 0:"none",cursor:n?"default":"pointer",borderRadius:e.fn.radius(t)},n?null:e.fn.hover({backgroundColor:e.colorScheme==="dark"?e.colors.dark[5]:e.colors.gray[0]})),{"&:active":n?void 0:e.activeStyles,"&[data-disabled]":_j(hh({color:e.colorScheme==="dark"?e.colors.dark[3]:e.colors.gray[4],cursor:"not-allowed"},e.fn.hover({backgroundColor:"transparent"})),{"&:active":{transform:"none"}}),"&[data-weekend]":{color:e.colors.red[e.fn.primaryShade()]},"&[data-outside]":{color:e.colorScheme==="dark"?e.colors.dark[3]:e.colors.gray[4]},"&[data-in-range]":hh({backgroundColor:i.background,borderRadius:0},n?null:e.fn.hover({backgroundColor:i.hover})),"&[data-first-in-range]":{borderTopLeftRadius:e.radius.sm,borderBottomLeftRadius:e.radius.sm},"&[data-last-in-range]":{borderTopRightRadius:e.radius.sm,borderBottomRightRadius:e.radius.sm},"&[data-selected]":hh({color:o.color,backgroundColor:o.background},n?null:e.fn.hover({backgroundColor:o.hover})),"&[data-hidden]":{display:"none"}})}});const nke=tke;var rke=Object.defineProperty,oke=Object.defineProperties,ike=Object.getOwnPropertyDescriptors,wj=Object.getOwnPropertySymbols,ske=Object.prototype.hasOwnProperty,ake=Object.prototype.propertyIsEnumerable,bj=(e,t,n)=>t in e?rke(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,mh=(e,t)=>{for(var n in t||(t={}))ske.call(t,n)&&bj(e,n,t[n]);if(wj)for(var n of wj(t))ake.call(t,n)&&bj(e,n,t[n]);return e},gh=(e,t)=>oke(e,ike(t)),lke=ue((e,t,{size:n})=>{const r=re({size:n,sizes:Of});return{calendarHeaderControlIcon:{},calendarHeader:{display:"flex",maxWidth:`calc(${r} * 7 + ${M(7)})`},calendarHeaderControl:gh(mh({width:r,height:r,borderRadius:e.fn.radius(),display:"flex",justifyContent:"center",alignItems:"center",userSelect:"none"},e.fn.hover({backgroundColor:e.colorScheme==="dark"?e.colors.dark[5]:e.colors.gray[0]})),{"&:active":e.activeStyles,"&[data-disabled]":gh(mh({opacity:.2,cursor:"not-allowed"},e.fn.hover({backgroundColor:"transparent"})),{"&:active":{transform:"none"}})}),calendarHeaderLevel:gh(mh({height:r,borderRadius:e.fn.radius(),display:"flex",justifyContent:"center",alignItems:"center",userSelect:"none",flex:1,fontSize:re({size:n,sizes:e.fontSizes}),fontWeight:500,textTransform:"capitalize"},e.fn.hover({backgroundColor:e.colorScheme==="dark"?e.colors.dark[5]:e.colors.gray[0]})),{"&:active":e.activeStyles,"&[data-static]":gh(mh({cursor:"default",userSelect:"unset"},e.fn.hover({backgroundColor:"transparent"})),{"&:active":{transform:"none"}})})}});const cke=lke;var uke=Object.defineProperty,wy=Object.getOwnPropertySymbols,fB=Object.prototype.hasOwnProperty,pB=Object.prototype.propertyIsEnumerable,xj=(e,t,n)=>t in e?uke(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,dke=(e,t)=>{for(var n in t||(t={}))fB.call(t,n)&&xj(e,n,t[n]);if(wy)for(var n of wy(t))pB.call(t,n)&&xj(e,n,t[n]);return e},fke=(e,t)=>{var n={};for(var r in e)fB.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&wy)for(var r of wy(e))t.indexOf(r)<0&&pB.call(e,r)&&(n[r]=e[r]);return n};const pke={nextDisabled:!1,previousDisabled:!1,hasNextLevel:!0,withNext:!0,withPrevious:!0,size:"sm"},s1=_.forwardRef((e,t)=>{const n=ae("CalendarHeader",pke,e),{className:r,nextIcon:o,previousIcon:i,nextLabel:s,previousLabel:a,onNext:c,onPrevious:u,onLevelClick:f,label:p,classNames:g,styles:v,unstyled:y,nextDisabled:w,previousDisabled:P,hasNextLevel:x,levelControlAriaLabel:S,withNext:O,withPrevious:E,__staticSelector:$,__preventFocus:N,__stopPropagation:I,size:R,variant:B}=n,z=fke(n,["className","nextIcon","previousIcon","nextLabel","previousLabel","onNext","onPrevious","onLevelClick","label","classNames","styles","unstyled","nextDisabled","previousDisabled","hasNextLevel","levelControlAriaLabel","withNext","withPrevious","__staticSelector","__preventFocus","__stopPropagation","size","variant"]),{classes:G,cx:X}=cke(null,{name:["CalendarHeader",$],classNames:g,styles:v,unstyled:y,size:R,variant:B}),Q=N?V=>V.preventDefault():void 0;return k.createElement(Pe,dke({className:X(G.calendarHeader,r),ref:t},z),E&&k.createElement(ls,{className:G.calendarHeaderControl,"data-previous":!0,"aria-label":a,onClick:u,unstyled:y,onMouseDown:Q,disabled:P,"data-disabled":P||void 0,tabIndex:N?-1:0,"data-mantine-stop-propagation":I||void 0},i||k.createElement(Dx,{className:G.calendarHeaderControlIcon,direction:"previous","data-previous":!0})),k.createElement(ls,{component:x?"button":"div",className:G.calendarHeaderLevel,onClick:x?f:void 0,unstyled:y,onMouseDown:x?Q:void 0,disabled:!x,"data-static":!x||void 0,"aria-label":S,tabIndex:N||!x?-1:0,"data-mantine-stop-propagation":I||void 0},p),O&&k.createElement(ls,{className:G.calendarHeaderControl,"data-next":!0,"aria-label":s,onClick:c,unstyled:y,onMouseDown:Q,disabled:w,"data-disabled":w||void 0,tabIndex:N?-1:0,"data-mantine-stop-propagation":I||void 0},o||k.createElement(Dx,{className:G.calendarHeaderControlIcon,direction:"next","data-next":!0})))});s1.displayName="@mantine/dates/CalendarHeader";function Cw(e,t){return e?e==="month"?0:e==="year"?1:2:t}function hke(e){return e===0?"month":e===1?"year":"decade"}function dd(e,t,n){return hke(ia(Cw(e,0),Cw(t,0),Cw(n,2)))}var mke=ue(()=>({calendar:{}}));const gke=mke;var vke=ue((e,t,{size:n})=>({monthLevelGroup:{display:"flex","& [data-month-level]:not(:last-of-type)":{marginRight:re({size:n,sizes:e.spacing})}}}));const yke=vke;var _ke=ue(e=>({monthLevel:{},calendarHeader:{marginBottom:e.spacing.xs}}));const wke=_ke,bke={locale:"en",firstDayOfWeek:1,weekendDays:[0,6],labelSeparator:"–"},xke=_.createContext(bke);var Ske=Object.defineProperty,Pke=Object.defineProperties,Oke=Object.getOwnPropertyDescriptors,Sj=Object.getOwnPropertySymbols,Cke=Object.prototype.hasOwnProperty,kke=Object.prototype.propertyIsEnumerable,Pj=(e,t,n)=>t in e?Ske(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Eke=(e,t)=>{for(var n in t||(t={}))Cke.call(t,n)&&Pj(e,n,t[n]);if(Sj)for(var n of Sj(t))kke.call(t,n)&&Pj(e,n,t[n]);return e},$ke=(e,t)=>Pke(e,Oke(t));function za(){const e=_.useContext(xke),t=_.useCallback(i=>i||e.locale,[e.locale]),n=_.useCallback(i=>typeof i=="number"?i:e.firstDayOfWeek,[e.firstDayOfWeek]),r=_.useCallback(i=>Array.isArray(i)?i:e.weekendDays,[e.weekendDays]),o=_.useCallback(i=>typeof i=="string"?i:e.labelSeparator,[e.labelSeparator]);return $ke(Eke({},e),{getLocale:t,getFirstDayOfWeek:n,getWeekendDays:r,getLabelSeparator:o})}function Mke(e,t=1){const n=new Date(e);for(;n.getDay()!==t;)n.setDate(n.getDate()-1);return n}function Nke(e,t=1){const n=new Date(e),r=t===0?6:t-1;for(;n.getDay()!==r;)n.setDate(n.getDate()+1);return n}function Tke(e,t=1){const n=e.getMonth(),r=new Date(e.getFullYear(),n,1),o=new Date(e.getFullYear(),e.getMonth()+1,0),i=Nke(o,t),s=Mke(r,t),a=[];for(;s<=i;){const c=[];for(let u=0;u<7;u+=1)c.push(new Date(s)),s.setDate(s.getDate()+1);a.push(c)}return a}function hB(e,t){return e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()}function mB(e,t){return t instanceof Date?pe(e).isBefore(pe(t).add(1,"day"),"day"):!0}function gB(e,t){return t instanceof Date?pe(e).isAfter(pe(t).subtract(1,"day"),"day"):!0}var Ike=Object.defineProperty,jke=Object.defineProperties,Lke=Object.getOwnPropertyDescriptors,Oj=Object.getOwnPropertySymbols,Dke=Object.prototype.hasOwnProperty,Rke=Object.prototype.propertyIsEnumerable,Cj=(e,t,n)=>t in e?Ike(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,zke=(e,t)=>{for(var n in t||(t={}))Dke.call(t,n)&&Cj(e,n,t[n]);if(Oj)for(var n of Oj(t))Rke.call(t,n)&&Cj(e,n,t[n]);return e},Ake=(e,t)=>jke(e,Lke(t)),Bke=ue(e=>({monthThead:{},monthRow:{},monthTbody:{},monthCell:{padding:0,"&[data-with-spacing]":{padding:M(.5)}},month:Ake(zke({},e.fn.fontStyles()),{borderCollapse:"collapse",tableLayout:"fixed","& *":{boxSizing:"border-box"}})}));const Fke=Bke;function Vke(e,t,n,r,o,i,s){const a=e.flat().filter(f=>{var p;return mB(f,n)&&gB(f,t)&&!o?.(f)&&!((p=r?.(f))!=null&&p.disabled)&&(!i||hB(f,s))}),c=a.find(f=>{var p;return(p=r?.(f))==null?void 0:p.selected});if(c)return c;const u=a.find(f=>pe().isSame(f,"date"));return u||a[0]}var Hke=Object.defineProperty,by=Object.getOwnPropertySymbols,vB=Object.prototype.hasOwnProperty,yB=Object.prototype.propertyIsEnumerable,kj=(e,t,n)=>t in e?Hke(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Wke=(e,t)=>{for(var n in t||(t={}))vB.call(t,n)&&kj(e,n,t[n]);if(by)for(var n of by(t))yB.call(t,n)&&kj(e,n,t[n]);return e},Uke=(e,t)=>{var n={};for(var r in e)vB.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&by)for(var r of by(e))t.indexOf(r)<0&&yB.call(e,r)&&(n[r]=e[r]);return n};const Zke={tabIndex:0,size:"sm"},_B=_.forwardRef((e,t)=>{const n=ae("Day",Zke,e),{className:r,date:o,radius:i,disabled:s,styles:a,classNames:c,unstyled:u,__staticSelector:f,weekend:p,outside:g,selected:v,renderDay:y,inRange:w,firstInRange:P,lastInRange:x,hidden:S,static:O,variant:E,size:$}=n,N=Uke(n,["className","date","radius","disabled","styles","classNames","unstyled","__staticSelector","weekend","outside","selected","renderDay","inRange","firstInRange","lastInRange","hidden","static","variant","size"]),{classes:I,cx:R}=nke({radius:i,isStatic:O},{name:["Day",f],classNames:c,styles:a,unstyled:u,variant:E,size:$});return k.createElement(ls,Wke({component:O?"div":"button",ref:t,className:R(I.day,r),disabled:s,"data-today":pe(o).isSame(new Date,"day")||void 0,"data-hidden":S||void 0,"data-disabled":s||void 0,"data-weekend":!s&&!g&&p||void 0,"data-outside":!s&&g||void 0,"data-selected":!s&&v||void 0,"data-in-range":w&&!s||void 0,"data-first-in-range":P&&!s||void 0,"data-last-in-range":x&&!s||void 0,unstyled:u},N),y?.(o)||o.getDate())});_B.displayName="@mantine/dates/Day";function Gke({locale:e,format:t="dd",firstDayOfWeek:n=1}){const r=pe().day(n),o=[];for(let i=0;i<7;i+=1)typeof t=="string"?o.push(pe(r).add(i,"days").locale(e).format(t)):o.push(t(pe(r).add(i,"days").toDate()));return o}var Yke=ue((e,t,{size:n})=>({weekdaysRow:{},weekday:{color:e.colorScheme==="dark"?e.colors.dark[1]:e.colors.gray[5],fontWeight:400,fontSize:re({size:n,sizes:e.fontSizes}),textTransform:"capitalize",paddingBottom:`calc(${re({size:n,sizes:e.spacing})} / 2)`}}));const Kke=Yke;var qke=Object.defineProperty,xy=Object.getOwnPropertySymbols,wB=Object.prototype.hasOwnProperty,bB=Object.prototype.propertyIsEnumerable,Ej=(e,t,n)=>t in e?qke(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Jke=(e,t)=>{for(var n in t||(t={}))wB.call(t,n)&&Ej(e,n,t[n]);if(xy)for(var n of xy(t))bB.call(t,n)&&Ej(e,n,t[n]);return e},Xke=(e,t)=>{var n={};for(var r in e)wB.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&xy)for(var r of xy(e))t.indexOf(r)<0&&bB.call(e,r)&&(n[r]=e[r]);return n};const Qke={weekdayFormat:"dd",cellComponent:"th",size:"sm"},xB=_.forwardRef((e,t)=>{const n=ae("WeekdaysRow",Qke,e),{className:r,locale:o,firstDayOfWeek:i,weekdayFormat:s,cellComponent:a,__staticSelector:c,classNames:u,styles:f,unstyled:p,variant:g,size:v}=n,y=Xke(n,["className","locale","firstDayOfWeek","weekdayFormat","cellComponent","__staticSelector","classNames","styles","unstyled","variant","size"]),w=za(),{classes:P,cx:x}=Kke(null,{name:["WeekdaysRow",c],classNames:u,styles:f,unstyled:p,variant:g,size:v}),S=Gke({locale:w.getLocale(o),format:s,firstDayOfWeek:w.getFirstDayOfWeek(i)}).map((O,E)=>k.createElement(a,{key:E,className:P.weekday},O));return k.createElement(Pe,Jke({component:"tr",ref:t,className:x(P.weekdaysRow,r)},y),S)});xB.displayName="@mantine/dates/WeekdaysRow";var e2e=Object.defineProperty,t2e=Object.defineProperties,n2e=Object.getOwnPropertyDescriptors,Sy=Object.getOwnPropertySymbols,SB=Object.prototype.hasOwnProperty,PB=Object.prototype.propertyIsEnumerable,$j=(e,t,n)=>t in e?e2e(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,vh=(e,t)=>{for(var n in t||(t={}))SB.call(t,n)&&$j(e,n,t[n]);if(Sy)for(var n of Sy(t))PB.call(t,n)&&$j(e,n,t[n]);return e},kw=(e,t)=>t2e(e,n2e(t)),r2e=(e,t)=>{var n={};for(var r in e)SB.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Sy)for(var r of Sy(e))t.indexOf(r)<0&&PB.call(e,r)&&(n[r]=e[r]);return n};const o2e={size:"sm",withCellSpacing:!0},OB=_.forwardRef((e,t)=>{const n=ae("Month",o2e,e),{className:r,classNames:o,styles:i,unstyled:s,__staticSelector:a,locale:c,firstDayOfWeek:u,weekdayFormat:f,month:p,weekendDays:g,getDayProps:v,excludeDate:y,minDate:w,maxDate:P,renderDay:x,hideOutsideDates:S,hideWeekdays:O,getDayAriaLabel:E,static:$,__getDayRef:N,__onDayKeyDown:I,__onDayClick:R,__onDayMouseEnter:B,__preventFocus:z,__stopPropagation:G,withCellSpacing:X,size:Q,variant:V}=n,H=r2e(n,["className","classNames","styles","unstyled","__staticSelector","locale","firstDayOfWeek","weekdayFormat","month","weekendDays","getDayProps","excludeDate","minDate","maxDate","renderDay","hideOutsideDates","hideWeekdays","getDayAriaLabel","static","__getDayRef","__onDayKeyDown","__onDayClick","__onDayMouseEnter","__preventFocus","__stopPropagation","withCellSpacing","size","variant"]),Z=za(),{classes:Y,cx:j}=Fke(null,{name:["Month",a],classNames:o,styles:i,unstyled:s,variant:V,size:Q}),U={__staticSelector:a||"Month",classNames:o,styles:i,unstyled:s,variant:V,size:Q},F=Tke(p,Z.getFirstDayOfWeek(u)),K=Vke(F,w,P,v,y,S,p),ee=F.map((fe,ie)=>{const J=fe.map((ne,le)=>{const _e=!hB(ne,p),Ne=E?.(ne)||pe(ne).locale(c||Z.locale).format("D MMMM YYYY"),we=v?.(ne),He=pe(ne).isSame(K,"date");return k.createElement("td",{key:ne.toString(),className:Y.monthCell,"data-with-spacing":X||void 0},k.createElement(_B,kw(vh(kw(vh({},U),{"data-mantine-stop-propagation":G||void 0,renderDay:x,date:ne,weekend:Z.getWeekendDays(g).includes(ne.getDay()),outside:_e,hidden:S?_e:!1,"aria-label":Ne,static:$,disabled:y?.(ne)||!mB(ne,P)||!gB(ne,w),ref:Te=>N?.(ie,le,Te)}),we),{onKeyDown:Te=>{var je;(je=we?.onKeyDown)==null||je.call(we,Te),I?.(Te,{rowIndex:ie,cellIndex:le,date:ne})},onMouseEnter:Te=>{var je;(je=we?.onMouseEnter)==null||je.call(we,Te),B?.(Te,ne)},onClick:Te=>{var je;(je=we?.onClick)==null||je.call(we,Te),R?.(Te,ne)},onMouseDown:Te=>{var je;(je=we?.onMouseDown)==null||je.call(we,Te),z&&Te.preventDefault()},tabIndex:z||!He?-1:0})))});return k.createElement("tr",{key:ie,className:Y.monthRow},J)});return k.createElement(Pe,vh({component:"table",className:j(Y.month,r),ref:t},H),!O&&k.createElement("thead",{className:Y.monthThead},k.createElement(xB,kw(vh({},U),{locale:c,firstDayOfWeek:u,weekdayFormat:f}))),k.createElement("tbody",{className:Y.monthTbody},ee))});OB.displayName="@mantine/dates/Month";var i2e=Object.defineProperty,Py=Object.getOwnPropertySymbols,CB=Object.prototype.hasOwnProperty,kB=Object.prototype.propertyIsEnumerable,Mj=(e,t,n)=>t in e?i2e(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Ew=(e,t)=>{for(var n in t||(t={}))CB.call(t,n)&&Mj(e,n,t[n]);if(Py)for(var n of Py(t))kB.call(t,n)&&Mj(e,n,t[n]);return e},s2e=(e,t)=>{var n={};for(var r in e)CB.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Py)for(var r of Py(e))t.indexOf(r)<0&&kB.call(e,r)&&(n[r]=e[r]);return n};const a2e={monthLabelFormat:"MMMM YYYY"},EB=_.forwardRef((e,t)=>{const n=ae("MonthLevel",a2e,e),{month:r,locale:o,firstDayOfWeek:i,weekdayFormat:s,weekendDays:a,getDayProps:c,excludeDate:u,minDate:f,maxDate:p,renderDay:g,hideOutsideDates:v,hideWeekdays:y,getDayAriaLabel:w,__getDayRef:P,__onDayKeyDown:x,__onDayClick:S,__onDayMouseEnter:O,withCellSpacing:E,__preventFocus:$,__stopPropagation:N,nextIcon:I,previousIcon:R,nextLabel:B,previousLabel:z,onNext:G,onPrevious:X,onLevelClick:Q,nextDisabled:V,previousDisabled:H,hasNextLevel:Z,levelControlAriaLabel:Y,withNext:j,withPrevious:U,className:F,monthLabelFormat:K,classNames:ee,styles:fe,unstyled:ie,__staticSelector:J,size:ne,variant:le,static:_e}=n,Ne=s2e(n,["month","locale","firstDayOfWeek","weekdayFormat","weekendDays","getDayProps","excludeDate","minDate","maxDate","renderDay","hideOutsideDates","hideWeekdays","getDayAriaLabel","__getDayRef","__onDayKeyDown","__onDayClick","__onDayMouseEnter","withCellSpacing","__preventFocus","__stopPropagation","nextIcon","previousIcon","nextLabel","previousLabel","onNext","onPrevious","onLevelClick","nextDisabled","previousDisabled","hasNextLevel","levelControlAriaLabel","withNext","withPrevious","className","monthLabelFormat","classNames","styles","unstyled","__staticSelector","size","variant","static"]),{classes:we,cx:He}=wke(null,{name:["MonthLevel",J],classNames:ee,styles:fe,unstyled:ie,variant:le,size:ne}),Te=za(),je={__staticSelector:J||"MonthLevel",classNames:ee,styles:fe,unstyled:ie,variant:le,size:ne},it=typeof V=="boolean"?V:p?!pe(r).endOf("month").isBefore(p):!1,bt=typeof H=="boolean"?H:f?!pe(r).startOf("month").isAfter(f):!1;return k.createElement(Pe,Ew({className:He(we.monthLevel,F),"data-month-level":!0,ref:t},Ne),k.createElement(s1,Ew({label:typeof K=="function"?K(r):pe(r).locale(o||Te.locale).format(K),className:we.calendarHeader,__preventFocus:$,__stopPropagation:N,nextIcon:I,previousIcon:R,nextLabel:B,previousLabel:z,onNext:G,onPrevious:X,onLevelClick:Q,nextDisabled:it,previousDisabled:bt,hasNextLevel:Z,levelControlAriaLabel:Y,withNext:j,withPrevious:U},je)),k.createElement(OB,Ew({month:r,locale:o,firstDayOfWeek:i,weekdayFormat:s,weekendDays:a,getDayProps:c,excludeDate:u,minDate:f,maxDate:p,renderDay:g,hideOutsideDates:v,hideWeekdays:y,getDayAriaLabel:w,__getDayRef:P,__onDayKeyDown:x,__onDayClick:S,__onDayMouseEnter:O,__preventFocus:$,__stopPropagation:N,static:_e,withCellSpacing:E},je)))});EB.displayName="@mantine/dates/MonthLevel";function l2e({direction:e,levelIndex:t,rowIndex:n,cellIndex:r,size:o}){switch(e){case"up":return t===0&&n===0?null:n===0?{levelIndex:t-1,rowIndex:r<=o[t-1][o[t-1].length-1]-1?o[t-1].length-1:o[t-1].length-2,cellIndex:r}:{levelIndex:t,rowIndex:n-1,cellIndex:r};case"down":return n===o[t].length-1?{levelIndex:t+1,rowIndex:0,cellIndex:r}:n===o[t].length-2&&r>=o[t][o[t].length-1]?{levelIndex:t+1,rowIndex:0,cellIndex:r}:{levelIndex:t,rowIndex:n+1,cellIndex:r};case"left":return t===0&&n===0&&r===0?null:n===0&&r===0?{levelIndex:t-1,rowIndex:o[t-1].length-1,cellIndex:o[t-1][o[t-1].length-1]-1}:r===0?{levelIndex:t,rowIndex:n-1,cellIndex:o[t][n-1]-1}:{levelIndex:t,rowIndex:n,cellIndex:r-1};case"right":return n===o[t].length-1&&r===o[t][n]-1?{levelIndex:t+1,rowIndex:0,cellIndex:0}:r===o[t][n]-1?{levelIndex:t,rowIndex:n+1,cellIndex:0}:{levelIndex:t,rowIndex:n,cellIndex:r+1};default:return{levelIndex:t,rowIndex:n,cellIndex:r}}}function $B({controlsRef:e,direction:t,levelIndex:n,rowIndex:r,cellIndex:o,size:i}){var s,a;const c=l2e({direction:t,size:i,rowIndex:r,cellIndex:o,levelIndex:n});if(!c)return;const u=(a=(s=e.current[c.levelIndex])==null?void 0:s[c.rowIndex])==null?void 0:a[c.cellIndex];u&&(u.disabled||u.getAttribute("data-hidden")||u.getAttribute("data-outside")?$B({controlsRef:e,direction:t,levelIndex:c.levelIndex,cellIndex:c.cellIndex,rowIndex:c.rowIndex,size:i}):u.focus())}function c2e(e){switch(e){case"ArrowDown":return"down";case"ArrowUp":return"up";case"ArrowRight":return"right";case"ArrowLeft":return"left";default:return null}}function u2e(e){return e.current.map(t=>t.map(n=>n.length))}function OO({controlsRef:e,levelIndex:t,rowIndex:n,cellIndex:r,event:o}){const i=c2e(o.key);if(i){o.preventDefault();const s=u2e(e);$B({controlsRef:e,direction:i,levelIndex:t,rowIndex:n,cellIndex:r,size:s})}}var d2e=Object.defineProperty,Oy=Object.getOwnPropertySymbols,MB=Object.prototype.hasOwnProperty,NB=Object.prototype.propertyIsEnumerable,Nj=(e,t,n)=>t in e?d2e(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,f2e=(e,t)=>{for(var n in t||(t={}))MB.call(t,n)&&Nj(e,n,t[n]);if(Oy)for(var n of Oy(t))NB.call(t,n)&&Nj(e,n,t[n]);return e},p2e=(e,t)=>{var n={};for(var r in e)MB.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Oy)for(var r of Oy(e))t.indexOf(r)<0&&NB.call(e,r)&&(n[r]=e[r]);return n};const h2e={numberOfColumns:1},TB=_.forwardRef((e,t)=>{const n=ae("MonthLevelGroup",h2e,e),{month:r,locale:o,firstDayOfWeek:i,weekdayFormat:s,weekendDays:a,getDayProps:c,excludeDate:u,minDate:f,maxDate:p,renderDay:g,hideOutsideDates:v,hideWeekdays:y,getDayAriaLabel:w,__onDayClick:P,__onDayMouseEnter:x,withCellSpacing:S,__preventFocus:O,nextIcon:E,previousIcon:$,nextLabel:N,previousLabel:I,onNext:R,onPrevious:B,onLevelClick:z,nextDisabled:G,previousDisabled:X,hasNextLevel:Q,className:V,classNames:H,styles:Z,unstyled:Y,numberOfColumns:j,levelControlAriaLabel:U,monthLabelFormat:F,__staticSelector:K,__stopPropagation:ee,size:fe,variant:ie,static:J}=n,ne=p2e(n,["month","locale","firstDayOfWeek","weekdayFormat","weekendDays","getDayProps","excludeDate","minDate","maxDate","renderDay","hideOutsideDates","hideWeekdays","getDayAriaLabel","__onDayClick","__onDayMouseEnter","withCellSpacing","__preventFocus","nextIcon","previousIcon","nextLabel","previousLabel","onNext","onPrevious","onLevelClick","nextDisabled","previousDisabled","hasNextLevel","className","classNames","styles","unstyled","numberOfColumns","levelControlAriaLabel","monthLabelFormat","__staticSelector","__stopPropagation","size","variant","static"]),{classes:le,cx:_e}=yke(null,{name:["MonthLevelGroup",K],classNames:H,styles:Z,unstyled:Y,variant:ie,size:fe}),Ne=_.useRef([]),we=Array(j).fill(0).map((He,Te)=>{const je=pe(r).add(Te,"months").toDate();return k.createElement(EB,{key:Te,month:je,withNext:Te===j-1,withPrevious:Te===0,monthLabelFormat:F,__stopPropagation:ee,__onDayClick:P,__onDayMouseEnter:x,__onDayKeyDown:(it,bt)=>OO({levelIndex:Te,rowIndex:bt.rowIndex,cellIndex:bt.cellIndex,event:it,controlsRef:Ne}),__getDayRef:(it,bt,_n)=>{Array.isArray(Ne.current[Te])||(Ne.current[Te]=[]),Array.isArray(Ne.current[Te][it])||(Ne.current[Te][it]=[]),Ne.current[Te][it][bt]=_n},levelControlAriaLabel:typeof U=="function"?U(je):U,locale:o,firstDayOfWeek:i,weekdayFormat:s,weekendDays:a,getDayProps:c,excludeDate:u,minDate:f,maxDate:p,renderDay:g,hideOutsideDates:v,hideWeekdays:y,getDayAriaLabel:w,__preventFocus:O,nextIcon:E,previousIcon:$,nextLabel:N,previousLabel:I,onNext:R,onPrevious:B,onLevelClick:z,nextDisabled:G,previousDisabled:X,hasNextLevel:Q,classNames:H,styles:Z,unstyled:Y,__staticSelector:K||"MonthLevelGroup",size:fe,variant:ie,static:J,withCellSpacing:S})});return k.createElement(Pe,f2e({className:_e(le.monthLevelGroup,V),ref:t},ne),we)});TB.displayName="@mantine/dates/MonthLevelGroup";var m2e=ue((e,t,{size:n})=>({yearLevelGroup:{display:"flex","& [data-year-level]:not(:last-of-type)":{marginRight:re({size:n,sizes:e.spacing})}}}));const g2e=m2e;var v2e=ue(e=>({yearLevel:{},calendarHeader:{marginBottom:e.spacing.xs}}));const y2e=v2e;function _2e(e){const t=pe(e).startOf("year").toDate(),n=[[],[],[],[]];let r=0;for(let o=0;o<4;o+=1)for(let i=0;i<3;i+=1)n[o].push(pe(t).add(r,"months").toDate()),r+=1;return n}function IB(e,t,n){return!t&&!n?!1:!!(t&&pe(e).isBefore(t,"month")||n&&pe(e).isAfter(n,"month"))}var w2e=ue(()=>({monthsList:{borderCollapse:"collapse",borderWidth:0,cursor:"pointer"},monthsListCell:{padding:0,"&[data-with-spacing]":{padding:M(.5)}},monthsListRow:{}}));const b2e=w2e;function x2e(e,t,n,r){const o=e.flat().filter(a=>{var c;return!IB(a,t,n)&&!((c=r?.(a))!=null&&c.disabled)}),i=o.find(a=>{var c;return(c=r?.(a))==null?void 0:c.selected});if(i)return i;const s=o.find(a=>pe().isSame(a,"month"));return s||o[0]}var S2e=Object.defineProperty,P2e=Object.defineProperties,O2e=Object.getOwnPropertyDescriptors,Tj=Object.getOwnPropertySymbols,C2e=Object.prototype.hasOwnProperty,k2e=Object.prototype.propertyIsEnumerable,Ij=(e,t,n)=>t in e?S2e(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,yh=(e,t)=>{for(var n in t||(t={}))C2e.call(t,n)&&Ij(e,n,t[n]);if(Tj)for(var n of Tj(t))k2e.call(t,n)&&Ij(e,n,t[n]);return e},jj=(e,t)=>P2e(e,O2e(t)),E2e=ue((e,t,{size:n})=>{const r=e.fn.variant({variant:"filled"}),o=e.fn.variant({variant:"light"});return{pickerControl:jj(yh({fontSize:re({size:n,sizes:e.fontSizes}),height:re({size:n,sizes:Of}),width:`calc((${re({size:n,sizes:Of})} * 7) / 3 + ${M(1.5)})`,display:"flex",justifyContent:"center",alignItems:"center",userSelect:"none",borderRadius:e.fn.radius()},e.fn.hover({backgroundColor:e.colorScheme==="dark"?e.colors.dark[5]:e.colors.gray[0]})),{"&:active":e.activeStyles,"&[data-in-range]":yh({backgroundColor:o.background,borderRadius:0},e.fn.hover({backgroundColor:o.hover})),"&[data-first-in-range]":{borderRadius:0,borderTopLeftRadius:e.radius.sm,borderBottomLeftRadius:e.radius.sm},"&[data-last-in-range]":{borderRadius:0,borderTopRightRadius:e.radius.sm,borderBottomRightRadius:e.radius.sm},"&[data-last-in-range][data-first-in-range]":{borderRadius:e.radius.sm},"&[data-selected]":yh({color:r.color,backgroundColor:r.background},e.fn.hover({backgroundColor:r.hover})),"&[data-disabled]":jj(yh({color:e.colorScheme==="dark"?e.colors.dark[3]:e.colors.gray[4],cursor:"not-allowed"},e.fn.hover({backgroundColor:"transparent"})),{"&:active":{transform:"none"}})})}});const $2e=E2e;var M2e=Object.defineProperty,Cy=Object.getOwnPropertySymbols,jB=Object.prototype.hasOwnProperty,LB=Object.prototype.propertyIsEnumerable,Lj=(e,t,n)=>t in e?M2e(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,N2e=(e,t)=>{for(var n in t||(t={}))jB.call(t,n)&&Lj(e,n,t[n]);if(Cy)for(var n of Cy(t))LB.call(t,n)&&Lj(e,n,t[n]);return e},T2e=(e,t)=>{var n={};for(var r in e)jB.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Cy)for(var r of Cy(e))t.indexOf(r)<0&&LB.call(e,r)&&(n[r]=e[r]);return n};const I2e={size:"sm"},CO=_.forwardRef((e,t)=>{const n=ae("PickerControl",I2e,e),{className:r,children:o,disabled:i,selected:s,classNames:a,styles:c,unstyled:u,firstInRange:f,lastInRange:p,inRange:g,__staticSelector:v,size:y,variant:w}=n,P=T2e(n,["className","children","disabled","selected","classNames","styles","unstyled","firstInRange","lastInRange","inRange","__staticSelector","size","variant"]),{classes:x,cx:S}=$2e(null,{name:["PickerControl",v],classNames:a,styles:c,unstyled:u,variant:w,size:y});return k.createElement(ls,N2e({className:S(x.pickerControl,r),ref:t,unstyled:u,"data-picker-control":!0,"data-selected":s&&!i||void 0,"data-disabled":i||void 0,"data-in-range":g&&!i&&!s||void 0,"data-first-in-range":f&&!i||void 0,"data-last-in-range":p&&!i||void 0,disabled:i},P),o)});CO.displayName="@mantine/dates/PickerControl";var j2e=Object.defineProperty,L2e=Object.defineProperties,D2e=Object.getOwnPropertyDescriptors,ky=Object.getOwnPropertySymbols,DB=Object.prototype.hasOwnProperty,RB=Object.prototype.propertyIsEnumerable,Dj=(e,t,n)=>t in e?j2e(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Rj=(e,t)=>{for(var n in t||(t={}))DB.call(t,n)&&Dj(e,n,t[n]);if(ky)for(var n of ky(t))RB.call(t,n)&&Dj(e,n,t[n]);return e},R2e=(e,t)=>L2e(e,D2e(t)),z2e=(e,t)=>{var n={};for(var r in e)DB.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&ky)for(var r of ky(e))t.indexOf(r)<0&&RB.call(e,r)&&(n[r]=e[r]);return n};const A2e={monthsListFormat:"MMM",size:"sm",withCellSpacing:!0},zB=_.forwardRef((e,t)=>{const n=ae("MonthsList",A2e,e),{year:r,className:o,monthsListFormat:i,locale:s,minDate:a,maxDate:c,getMonthControlProps:u,classNames:f,styles:p,unstyled:g,__staticSelector:v,__getControlRef:y,__onControlKeyDown:w,__onControlClick:P,__onControlMouseEnter:x,__preventFocus:S,size:O,variant:E,__stopPropagation:$,withCellSpacing:N}=n,I=z2e(n,["year","className","monthsListFormat","locale","minDate","maxDate","getMonthControlProps","classNames","styles","unstyled","__staticSelector","__getControlRef","__onControlKeyDown","__onControlClick","__onControlMouseEnter","__preventFocus","size","variant","__stopPropagation","withCellSpacing"]),{classes:R,cx:B}=b2e(null,{name:["MonthsList",v],classNames:f,styles:p,unstyled:g,variant:E,size:O}),z=za(),G=_2e(r),X=x2e(G,a,c,u),Q=G.map((V,H)=>{const Z=V.map((Y,j)=>{const U=u?.(Y),F=pe(Y).isSame(X,"month");return k.createElement("td",{key:j,className:R.monthsListCell,"data-with-spacing":N||void 0},k.createElement(CO,R2e(Rj({variant:E,size:O,classNames:f,styles:p,unstyled:g,__staticSelector:v||"MonthsList","data-mantine-stop-propagation":$||void 0,disabled:IB(Y,a,c),ref:K=>y?.(H,j,K)},U),{onKeyDown:K=>{var ee;(ee=U?.onKeyDown)==null||ee.call(U,K),w?.(K,{rowIndex:H,cellIndex:j,date:Y})},onClick:K=>{var ee;(ee=U?.onClick)==null||ee.call(U,K),P?.(K,Y)},onMouseEnter:K=>{var ee;(ee=U?.onMouseEnter)==null||ee.call(U,K),x?.(K,Y)},onMouseDown:K=>{var ee;(ee=U?.onMouseDown)==null||ee.call(U,K),S&&K.preventDefault()},tabIndex:S||!F?-1:0}),pe(Y).locale(z.getLocale(s)).format(i)))});return k.createElement("tr",{key:H,className:R.monthsListRow},Z)});return k.createElement(Pe,Rj({component:"table",ref:t,className:B(R.monthsList,o)},I),k.createElement("tbody",null,Q))});zB.displayName="@mantine/dates/MonthsList";var B2e=Object.defineProperty,Ey=Object.getOwnPropertySymbols,AB=Object.prototype.hasOwnProperty,BB=Object.prototype.propertyIsEnumerable,zj=(e,t,n)=>t in e?B2e(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,$w=(e,t)=>{for(var n in t||(t={}))AB.call(t,n)&&zj(e,n,t[n]);if(Ey)for(var n of Ey(t))BB.call(t,n)&&zj(e,n,t[n]);return e},F2e=(e,t)=>{var n={};for(var r in e)AB.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Ey)for(var r of Ey(e))t.indexOf(r)<0&&BB.call(e,r)&&(n[r]=e[r]);return n};const V2e={yearLabelFormat:"YYYY",size:"sm"},FB=_.forwardRef((e,t)=>{const n=ae("YearLevel",V2e,e),{year:r,locale:o,minDate:i,maxDate:s,monthsListFormat:a,getMonthControlProps:c,__getControlRef:u,__onControlKeyDown:f,__onControlClick:p,__onControlMouseEnter:g,withCellSpacing:v,__preventFocus:y,nextIcon:w,previousIcon:P,nextLabel:x,previousLabel:S,onNext:O,onPrevious:E,onLevelClick:$,nextDisabled:N,previousDisabled:I,hasNextLevel:R,levelControlAriaLabel:B,withNext:z,withPrevious:G,className:X,yearLabelFormat:Q,classNames:V,styles:H,unstyled:Z,__staticSelector:Y,__stopPropagation:j,size:U,variant:F}=n,K=F2e(n,["year","locale","minDate","maxDate","monthsListFormat","getMonthControlProps","__getControlRef","__onControlKeyDown","__onControlClick","__onControlMouseEnter","withCellSpacing","__preventFocus","nextIcon","previousIcon","nextLabel","previousLabel","onNext","onPrevious","onLevelClick","nextDisabled","previousDisabled","hasNextLevel","levelControlAriaLabel","withNext","withPrevious","className","yearLabelFormat","classNames","styles","unstyled","__staticSelector","__stopPropagation","size","variant"]),{classes:ee,cx:fe}=y2e(null,{name:["YearLevel",Y],classNames:V,styles:H,unstyled:Z,size:U,variant:F}),ie=za(),J={__staticSelector:Y||"YearLevel",classNames:V,styles:H,unstyled:Z,size:U,variant:F},ne=typeof N=="boolean"?N:s?!pe(r).endOf("year").isBefore(s):!1,le=typeof I=="boolean"?I:i?!pe(r).startOf("year").isAfter(i):!1;return k.createElement(Pe,$w({className:fe(ee.yearLevel,X),"data-year-level":!0,ref:t},K),k.createElement(s1,$w({label:typeof Q=="function"?Q(r):pe(r).locale(o||ie.locale).format(Q),className:ee.calendarHeader,__preventFocus:y,__stopPropagation:j,nextIcon:w,previousIcon:P,nextLabel:x,previousLabel:S,onNext:O,onPrevious:E,onLevelClick:$,nextDisabled:ne,previousDisabled:le,hasNextLevel:R,levelControlAriaLabel:B,withNext:z,withPrevious:G},J)),k.createElement(zB,$w({year:r,locale:o,minDate:i,maxDate:s,monthsListFormat:a,getMonthControlProps:c,__getControlRef:u,__onControlKeyDown:f,__onControlClick:p,__onControlMouseEnter:g,__preventFocus:y,__stopPropagation:j,withCellSpacing:v},J)))});FB.displayName="@mantine/dates/YearLevel";var H2e=Object.defineProperty,$y=Object.getOwnPropertySymbols,VB=Object.prototype.hasOwnProperty,HB=Object.prototype.propertyIsEnumerable,Aj=(e,t,n)=>t in e?H2e(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,W2e=(e,t)=>{for(var n in t||(t={}))VB.call(t,n)&&Aj(e,n,t[n]);if($y)for(var n of $y(t))HB.call(t,n)&&Aj(e,n,t[n]);return e},U2e=(e,t)=>{var n={};for(var r in e)VB.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&$y)for(var r of $y(e))t.indexOf(r)<0&&HB.call(e,r)&&(n[r]=e[r]);return n};const Z2e={numberOfColumns:1,size:"sm"},WB=_.forwardRef((e,t)=>{const n=ae("YearLevelGroup",Z2e,e),{year:r,locale:o,minDate:i,maxDate:s,monthsListFormat:a,getMonthControlProps:c,__onControlClick:u,__onControlMouseEnter:f,withCellSpacing:p,__preventFocus:g,nextIcon:v,previousIcon:y,nextLabel:w,previousLabel:P,onNext:x,onPrevious:S,onLevelClick:O,nextDisabled:E,previousDisabled:$,hasNextLevel:N,className:I,classNames:R,styles:B,unstyled:z,__staticSelector:G,__stopPropagation:X,numberOfColumns:Q,levelControlAriaLabel:V,yearLabelFormat:H,variant:Z,size:Y}=n,j=U2e(n,["year","locale","minDate","maxDate","monthsListFormat","getMonthControlProps","__onControlClick","__onControlMouseEnter","withCellSpacing","__preventFocus","nextIcon","previousIcon","nextLabel","previousLabel","onNext","onPrevious","onLevelClick","nextDisabled","previousDisabled","hasNextLevel","className","classNames","styles","unstyled","__staticSelector","__stopPropagation","numberOfColumns","levelControlAriaLabel","yearLabelFormat","variant","size"]),{classes:U,cx:F}=g2e(null,{name:["YearLevelGroup",G],styles:B,classNames:R,unstyled:z,variant:Z,size:Y}),K=_.useRef([]),ee=Array(Q).fill(0).map((fe,ie)=>{const J=pe(r).add(ie,"years").toDate();return k.createElement(FB,{key:ie,variant:Z,size:Y,monthsListFormat:a,year:J,withNext:ie===Q-1,withPrevious:ie===0,yearLabelFormat:H,__stopPropagation:X,__onControlClick:u,__onControlMouseEnter:f,__onControlKeyDown:(ne,le)=>OO({levelIndex:ie,rowIndex:le.rowIndex,cellIndex:le.cellIndex,event:ne,controlsRef:K}),__getControlRef:(ne,le,_e)=>{Array.isArray(K.current[ie])||(K.current[ie]=[]),Array.isArray(K.current[ie][ne])||(K.current[ie][ne]=[]),K.current[ie][ne][le]=_e},levelControlAriaLabel:typeof V=="function"?V(J):V,locale:o,minDate:i,maxDate:s,__preventFocus:g,nextIcon:v,previousIcon:y,nextLabel:w,previousLabel:P,onNext:x,onPrevious:S,onLevelClick:O,nextDisabled:E,previousDisabled:$,hasNextLevel:N,getMonthControlProps:c,classNames:R,styles:B,unstyled:z,__staticSelector:G||"YearLevelGroup",withCellSpacing:p})});return k.createElement(Pe,W2e({className:F(U.yearLevelGroup,I),ref:t},j),ee)});WB.displayName="@mantine/dates/YearLevelGroup";var G2e=ue(e=>({decadeLevelGroup:{display:"flex",gap:e.spacing.md}}));const Y2e=G2e;function UB(e){const t=e.getFullYear(),n=t-t%10;let r=0;const o=[[],[],[],[]];for(let i=0;i<4;i+=1){const s=i===3?1:3;for(let a=0;a({decadeLevel:{},calendarHeader:{marginBottom:e.spacing.xs}}));const J2e=q2e;function ZB(e,t,n){return!t&&!n?!1:!!(t&&pe(e).isBefore(t,"year")||n&&pe(e).isAfter(n,"year"))}var X2e=ue(()=>({yearsList:{borderCollapse:"collapse",borderWidth:0},yearsListCell:{padding:0,"&[data-with-spacing]":{padding:M(.5)}},yearsListRow:{}}));const Q2e=X2e;function eEe(e,t,n,r){const o=e.flat().filter(a=>{var c;return!ZB(a,t,n)&&!((c=r?.(a))!=null&&c.disabled)}),i=o.find(a=>{var c;return(c=r?.(a))==null?void 0:c.selected});if(i)return i;const s=o.find(a=>pe().isSame(a,"year"));return s||o[0]}var tEe=Object.defineProperty,nEe=Object.defineProperties,rEe=Object.getOwnPropertyDescriptors,My=Object.getOwnPropertySymbols,GB=Object.prototype.hasOwnProperty,YB=Object.prototype.propertyIsEnumerable,Bj=(e,t,n)=>t in e?tEe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Fj=(e,t)=>{for(var n in t||(t={}))GB.call(t,n)&&Bj(e,n,t[n]);if(My)for(var n of My(t))YB.call(t,n)&&Bj(e,n,t[n]);return e},oEe=(e,t)=>nEe(e,rEe(t)),iEe=(e,t)=>{var n={};for(var r in e)GB.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&My)for(var r of My(e))t.indexOf(r)<0&&YB.call(e,r)&&(n[r]=e[r]);return n};const sEe={yearsListFormat:"YYYY",size:"sm",withCellSpacing:!0},KB=_.forwardRef((e,t)=>{const n=ae("YearsList",sEe,e),{decade:r,className:o,yearsListFormat:i,locale:s,minDate:a,maxDate:c,getYearControlProps:u,classNames:f,styles:p,unstyled:g,__staticSelector:v,__getControlRef:y,__onControlKeyDown:w,__onControlClick:P,__onControlMouseEnter:x,__preventFocus:S,__stopPropagation:O,size:E,variant:$,withCellSpacing:N}=n,I=iEe(n,["decade","className","yearsListFormat","locale","minDate","maxDate","getYearControlProps","classNames","styles","unstyled","__staticSelector","__getControlRef","__onControlKeyDown","__onControlClick","__onControlMouseEnter","__preventFocus","__stopPropagation","size","variant","withCellSpacing"]),{classes:R,cx:B}=Q2e(null,{name:["YearsList",v],classNames:f,styles:p,unstyled:g,variant:$,size:E}),z=za(),G=UB(r),X=eEe(G,a,c,u),Q=G.map((V,H)=>{const Z=V.map((Y,j)=>{const U=u?.(Y),F=pe(Y).isSame(X,"year");return k.createElement("td",{key:j,className:R.yearsListCell,"data-with-spacing":N||void 0},k.createElement(CO,oEe(Fj({size:E,variant:$,classNames:f,styles:p,unstyled:g,__staticSelector:v||"YearsList","data-mantine-stop-propagation":O||void 0,disabled:ZB(Y,a,c),ref:K=>y?.(H,j,K)},U),{onKeyDown:K=>{var ee;(ee=U?.onKeyDown)==null||ee.call(U,K),w?.(K,{rowIndex:H,cellIndex:j,date:Y})},onClick:K=>{var ee;(ee=U?.onClick)==null||ee.call(U,K),P?.(K,Y)},onMouseEnter:K=>{var ee;(ee=U?.onMouseEnter)==null||ee.call(U,K),x?.(K,Y)},onMouseDown:K=>{var ee;(ee=U?.onMouseDown)==null||ee.call(U,K),S&&K.preventDefault()},tabIndex:S||!F?-1:0}),pe(Y).locale(z.getLocale(s)).format(i)))});return k.createElement("tr",{key:H,className:R.yearsListRow},Z)});return k.createElement(Pe,Fj({component:"table",ref:t,className:B(R.yearsList,o)},I),k.createElement("tbody",null,Q))});KB.displayName="@mantine/dates/YearsList";var aEe=Object.defineProperty,Ny=Object.getOwnPropertySymbols,qB=Object.prototype.hasOwnProperty,JB=Object.prototype.propertyIsEnumerable,Vj=(e,t,n)=>t in e?aEe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Mw=(e,t)=>{for(var n in t||(t={}))qB.call(t,n)&&Vj(e,n,t[n]);if(Ny)for(var n of Ny(t))JB.call(t,n)&&Vj(e,n,t[n]);return e},lEe=(e,t)=>{var n={};for(var r in e)qB.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Ny)for(var r of Ny(e))t.indexOf(r)<0&&JB.call(e,r)&&(n[r]=e[r]);return n};const cEe={decadeLabelFormat:"YYYY"},XB=_.forwardRef((e,t)=>{const n=ae("DecadeLevel",cEe,e),{decade:r,locale:o,minDate:i,maxDate:s,yearsListFormat:a,getYearControlProps:c,__getControlRef:u,__onControlKeyDown:f,__onControlClick:p,__onControlMouseEnter:g,withCellSpacing:v,__preventFocus:y,nextIcon:w,previousIcon:P,nextLabel:x,previousLabel:S,onNext:O,onPrevious:E,nextDisabled:$,previousDisabled:N,levelControlAriaLabel:I,withNext:R,withPrevious:B,className:z,decadeLabelFormat:G,classNames:X,styles:Q,unstyled:V,__staticSelector:H,__stopPropagation:Z,variant:Y,size:j}=n,U=lEe(n,["decade","locale","minDate","maxDate","yearsListFormat","getYearControlProps","__getControlRef","__onControlKeyDown","__onControlClick","__onControlMouseEnter","withCellSpacing","__preventFocus","nextIcon","previousIcon","nextLabel","previousLabel","onNext","onPrevious","nextDisabled","previousDisabled","levelControlAriaLabel","withNext","withPrevious","className","decadeLabelFormat","classNames","styles","unstyled","__staticSelector","__stopPropagation","variant","size"]),{classes:F,cx:K}=J2e(null,{name:["DecadeLevel",H],classNames:X,styles:Q,unstyled:V,variant:Y,size:j}),ee=za(),[fe,ie]=K2e(r),J={__staticSelector:H||"DecadeLevel",classNames:X,styles:Q,unstyled:V,variant:Y,size:j},ne=typeof $=="boolean"?$:s?!pe(ie).endOf("year").isBefore(s):!1,le=typeof N=="boolean"?N:i?!pe(fe).startOf("year").isAfter(i):!1,_e=(Ne,we)=>pe(Ne).locale(o||ee.locale).format(we);return k.createElement(Pe,Mw({className:K(F.decadeLevel,z),"data-decade-level":!0,ref:t},U),k.createElement(s1,Mw({label:typeof G=="function"?G(fe,ie):`${_e(fe,G)} – ${_e(ie,G)}`,className:F.calendarHeader,__preventFocus:y,__stopPropagation:Z,nextIcon:w,previousIcon:P,nextLabel:x,previousLabel:S,onNext:O,onPrevious:E,nextDisabled:ne,previousDisabled:le,hasNextLevel:!1,levelControlAriaLabel:I,withNext:R,withPrevious:B},J)),k.createElement(KB,Mw({decade:r,locale:o,minDate:i,maxDate:s,yearsListFormat:a,getYearControlProps:c,__getControlRef:u,__onControlKeyDown:f,__onControlClick:p,__onControlMouseEnter:g,__preventFocus:y,__stopPropagation:Z,withCellSpacing:v},J)))});XB.displayName="@mantine/dates/DecadeLevel";var uEe=Object.defineProperty,Ty=Object.getOwnPropertySymbols,QB=Object.prototype.hasOwnProperty,eF=Object.prototype.propertyIsEnumerable,Hj=(e,t,n)=>t in e?uEe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,dEe=(e,t)=>{for(var n in t||(t={}))QB.call(t,n)&&Hj(e,n,t[n]);if(Ty)for(var n of Ty(t))eF.call(t,n)&&Hj(e,n,t[n]);return e},fEe=(e,t)=>{var n={};for(var r in e)QB.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Ty)for(var r of Ty(e))t.indexOf(r)<0&&eF.call(e,r)&&(n[r]=e[r]);return n};const pEe={numberOfColumns:1},tF=_.forwardRef((e,t)=>{const n=ae("DecadeLevelGroup",pEe,e),{decade:r,locale:o,minDate:i,maxDate:s,yearsListFormat:a,getYearControlProps:c,__onControlClick:u,__onControlMouseEnter:f,withCellSpacing:p,__preventFocus:g,nextIcon:v,previousIcon:y,nextLabel:w,previousLabel:P,onNext:x,onPrevious:S,nextDisabled:O,previousDisabled:E,className:$,classNames:N,styles:I,unstyled:R,__staticSelector:B,__stopPropagation:z,numberOfColumns:G,levelControlAriaLabel:X,decadeLabelFormat:Q,variant:V,size:H}=n,Z=fEe(n,["decade","locale","minDate","maxDate","yearsListFormat","getYearControlProps","__onControlClick","__onControlMouseEnter","withCellSpacing","__preventFocus","nextIcon","previousIcon","nextLabel","previousLabel","onNext","onPrevious","nextDisabled","previousDisabled","className","classNames","styles","unstyled","__staticSelector","__stopPropagation","numberOfColumns","levelControlAriaLabel","decadeLabelFormat","variant","size"]),{classes:Y,cx:j}=Y2e(null,{name:["DecadeLevelGroup",B],styles:I,classNames:N,unstyled:R,variant:V,size:H}),U=_.useRef([]),F=Array(G).fill(0).map((K,ee)=>{const fe=pe(r).add(ee*10,"years").toDate();return k.createElement(XB,{key:ee,variant:V,size:H,yearsListFormat:a,decade:fe,withNext:ee===G-1,withPrevious:ee===0,decadeLabelFormat:Q,__onControlClick:u,__onControlMouseEnter:f,__onControlKeyDown:(ie,J)=>OO({levelIndex:ee,rowIndex:J.rowIndex,cellIndex:J.cellIndex,event:ie,controlsRef:U}),__getControlRef:(ie,J,ne)=>{Array.isArray(U.current[ee])||(U.current[ee]=[]),Array.isArray(U.current[ee][ie])||(U.current[ee][ie]=[]),U.current[ee][ie][J]=ne},levelControlAriaLabel:typeof X=="function"?X(fe):X,locale:o,minDate:i,maxDate:s,__preventFocus:g,__stopPropagation:z,nextIcon:v,previousIcon:y,nextLabel:w,previousLabel:P,onNext:x,onPrevious:S,nextDisabled:O,previousDisabled:E,getYearControlProps:c,__staticSelector:B||"DecadeLevelGroup",classNames:N,styles:I,unstyled:R,withCellSpacing:p})});return k.createElement(Pe,dEe({className:j(Y.decadeLevelGroup,$),ref:t},Z),F)});tF.displayName="@mantine/dates/DecadeLevelGroup";var hEe=Object.defineProperty,Iy=Object.getOwnPropertySymbols,nF=Object.prototype.hasOwnProperty,rF=Object.prototype.propertyIsEnumerable,Wj=(e,t,n)=>t in e?hEe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,_h=(e,t)=>{for(var n in t||(t={}))nF.call(t,n)&&Wj(e,n,t[n]);if(Iy)for(var n of Iy(t))rF.call(t,n)&&Wj(e,n,t[n]);return e},mEe=(e,t)=>{var n={};for(var r in e)nF.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Iy)for(var r of Iy(e))t.indexOf(r)<0&&rF.call(e,r)&&(n[r]=e[r]);return n};const gEe={maxLevel:"decade",minLevel:"month",__updateDateOnYearSelect:!0,__updateDateOnMonthSelect:!0},oF=_.forwardRef((e,t)=>{const n=ae("Calendar",gEe,e),{maxLevel:r,minLevel:o,defaultLevel:i,level:s,onLevelChange:a,date:c,defaultDate:u,onDateChange:f,numberOfColumns:p,columnsToScroll:g,ariaLabels:v,onYearSelect:y,onMonthSelect:w,onYearMouseEnter:P,onMonthMouseEnter:x,__updateDateOnYearSelect:S,__updateDateOnMonthSelect:O,firstDayOfWeek:E,weekdayFormat:$,weekendDays:N,getDayProps:I,excludeDate:R,renderDay:B,hideOutsideDates:z,hideWeekdays:G,getDayAriaLabel:X,monthLabelFormat:Q,nextIcon:V,previousIcon:H,__onDayClick:Z,__onDayMouseEnter:Y,withCellSpacing:j,monthsListFormat:U,getMonthControlProps:F,yearLabelFormat:K,yearsListFormat:ee,getYearControlProps:fe,decadeLabelFormat:ie,minDate:J,maxDate:ne,locale:le,className:_e,classNames:Ne,styles:we,__staticSelector:He,unstyled:Te,variant:je,size:it,__preventFocus:bt,__stopPropagation:_n,onNextDecade:pt,onPreviousDecade:Tn,onNextYear:kr,onPreviousYear:lt,onNextMonth:Zn,onPreviousMonth:Jt,static:ht}=n,xo=mEe(n,["maxLevel","minLevel","defaultLevel","level","onLevelChange","date","defaultDate","onDateChange","numberOfColumns","columnsToScroll","ariaLabels","onYearSelect","onMonthSelect","onYearMouseEnter","onMonthMouseEnter","__updateDateOnYearSelect","__updateDateOnMonthSelect","firstDayOfWeek","weekdayFormat","weekendDays","getDayProps","excludeDate","renderDay","hideOutsideDates","hideWeekdays","getDayAriaLabel","monthLabelFormat","nextIcon","previousIcon","__onDayClick","__onDayMouseEnter","withCellSpacing","monthsListFormat","getMonthControlProps","yearLabelFormat","yearsListFormat","getYearControlProps","decadeLabelFormat","minDate","maxDate","locale","className","classNames","styles","__staticSelector","unstyled","variant","size","__preventFocus","__stopPropagation","onNextDecade","onPreviousDecade","onNextYear","onPreviousYear","onNextMonth","onPreviousMonth","static"]),{classes:Yr,cx:ar}=gke(null,{name:["Calendar",He],classNames:Ne,styles:we,unstyled:Te,variant:je,size:it}),[Kr,Bt]=go({value:s?dd(s,o,r):void 0,defaultValue:i?dd(i,o,r):void 0,finalValue:dd(void 0,o,r),onChange:a}),[qr,fn]=go({value:c,defaultValue:u,finalValue:null,onChange:f}),wn={__staticSelector:He||"Calendar",styles:we,classNames:Ne,unstyled:Te,variant:je,size:it},Er=g||p||1,gt=qr||new Date,be=()=>{const xt=pe(gt).add(Er,"month").toDate();Zn?.(xt),fn(xt)},De=()=>{const xt=pe(gt).subtract(Er,"month").toDate();Jt?.(xt),fn(xt)},Jr=()=>{const xt=pe(gt).add(Er,"year").toDate();kr?.(xt),fn(xt)},Rt=()=>{const xt=pe(gt).subtract(Er,"year").toDate();lt?.(xt),fn(xt)},Zt=()=>{const xt=pe(gt).add(10*Er,"year").toDate();pt?.(xt),fn(xt)},$r=()=>{const xt=pe(gt).subtract(10*Er,"year").toDate();Tn?.(xt),fn(xt)};return k.createElement(Pe,_h({className:ar(Yr.calendar,_e),ref:t},xo),Kr==="month"&&k.createElement(TB,_h({month:gt,minDate:J,maxDate:ne,firstDayOfWeek:E,weekdayFormat:$,weekendDays:N,getDayProps:I,excludeDate:R,renderDay:B,hideOutsideDates:z,hideWeekdays:G,getDayAriaLabel:X,onNext:be,onPrevious:De,hasNextLevel:r!=="month",onLevelClick:()=>Bt("year"),numberOfColumns:p,locale:le,levelControlAriaLabel:v?.monthLevelControl,nextLabel:v?.nextMonth,nextIcon:V,previousLabel:v?.previousMonth,previousIcon:H,monthLabelFormat:Q,__onDayClick:Z,__onDayMouseEnter:Y,__preventFocus:bt,__stopPropagation:_n,static:ht,withCellSpacing:j},wn)),Kr==="year"&&k.createElement(WB,_h({year:gt,numberOfColumns:p,minDate:J,maxDate:ne,monthsListFormat:U,getMonthControlProps:F,locale:le,onNext:Jr,onPrevious:Rt,hasNextLevel:r!=="month"&&r!=="year",onLevelClick:()=>Bt("decade"),levelControlAriaLabel:v?.yearLevelControl,nextLabel:v?.nextYear,nextIcon:V,previousLabel:v?.previousYear,previousIcon:H,yearLabelFormat:K,__onControlMouseEnter:x,__onControlClick:(xt,tn)=>{O&&fn(tn),Bt(dd("month",o,r)),w?.(tn)},__preventFocus:bt,__stopPropagation:_n,withCellSpacing:j},wn)),Kr==="decade"&&k.createElement(tF,_h({decade:gt,minDate:J,maxDate:ne,yearsListFormat:ee,getYearControlProps:fe,locale:le,onNext:Zt,onPrevious:$r,numberOfColumns:p,nextLabel:v?.nextDecade,nextIcon:V,previousLabel:v?.previousDecade,previousIcon:H,decadeLabelFormat:ie,__onControlMouseEnter:P,__onControlClick:(xt,tn)=>{S&&fn(tn),Bt(dd("year",o,r)),y?.(tn)},__preventFocus:bt,__stopPropagation:_n,withCellSpacing:j},wn)))});oF.displayName="@mantine/dates/Calendar";var Uj=Object.getOwnPropertySymbols,vEe=Object.prototype.hasOwnProperty,yEe=Object.prototype.propertyIsEnumerable,_Ee=(e,t)=>{var n={};for(var r in e)vEe.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Uj)for(var r of Uj(e))t.indexOf(r)<0&&yEe.call(e,r)&&(n[r]=e[r]);return n};function wEe(e){const t=e,{maxLevel:n,minLevel:r,defaultLevel:o,level:i,onLevelChange:s,nextIcon:a,previousIcon:c,date:u,defaultDate:f,onDateChange:p,numberOfColumns:g,columnsToScroll:v,ariaLabels:y,onYearSelect:w,onMonthSelect:P,onYearMouseEnter:x,onMonthMouseEnter:S,onNextMonth:O,onPreviousMonth:E,onNextYear:$,onPreviousYear:N,onNextDecade:I,onPreviousDecade:R,withCellSpacing:B,__updateDateOnYearSelect:z,__updateDateOnMonthSelect:G,firstDayOfWeek:X,weekdayFormat:Q,weekendDays:V,getDayProps:H,excludeDate:Z,renderDay:Y,hideOutsideDates:j,hideWeekdays:U,getDayAriaLabel:F,monthLabelFormat:K,monthsListFormat:ee,getMonthControlProps:fe,yearLabelFormat:ie,yearsListFormat:J,getYearControlProps:ne,decadeLabelFormat:le,allowSingleDateInRange:_e,allowDeselect:Ne,minDate:we,maxDate:He,locale:Te}=t,je=_Ee(t,["maxLevel","minLevel","defaultLevel","level","onLevelChange","nextIcon","previousIcon","date","defaultDate","onDateChange","numberOfColumns","columnsToScroll","ariaLabels","onYearSelect","onMonthSelect","onYearMouseEnter","onMonthMouseEnter","onNextMonth","onPreviousMonth","onNextYear","onPreviousYear","onNextDecade","onPreviousDecade","withCellSpacing","__updateDateOnYearSelect","__updateDateOnMonthSelect","firstDayOfWeek","weekdayFormat","weekendDays","getDayProps","excludeDate","renderDay","hideOutsideDates","hideWeekdays","getDayAriaLabel","monthLabelFormat","monthsListFormat","getMonthControlProps","yearLabelFormat","yearsListFormat","getYearControlProps","decadeLabelFormat","allowSingleDateInRange","allowDeselect","minDate","maxDate","locale"]);return{calendarProps:{maxLevel:n,minLevel:r,defaultLevel:o,level:i,onLevelChange:s,nextIcon:a,previousIcon:c,date:u,defaultDate:f,onDateChange:p,numberOfColumns:g,columnsToScroll:v,ariaLabels:y,onYearSelect:w,onMonthSelect:P,onYearMouseEnter:x,onMonthMouseEnter:S,onNextMonth:O,onPreviousMonth:E,onNextYear:$,onPreviousYear:N,onNextDecade:I,onPreviousDecade:R,withCellSpacing:B,__updateDateOnYearSelect:z,__updateDateOnMonthSelect:G,firstDayOfWeek:X,weekdayFormat:Q,weekendDays:V,getDayProps:H,excludeDate:Z,renderDay:Y,hideOutsideDates:j,hideWeekdays:U,getDayAriaLabel:F,monthLabelFormat:K,monthsListFormat:ee,getMonthControlProps:fe,yearLabelFormat:ie,yearsListFormat:J,getYearControlProps:ne,decadeLabelFormat:le,allowSingleDateInRange:_e,allowDeselect:Ne,minDate:we,maxDate:He,locale:Te},others:je}}function bEe(e,t){if(t==="range"&&Array.isArray(e)){const[n,r]=e;return n?r?`${n.toISOString()} – ${r.toISOString()}`:`${n.toISOString()} –`:""}return t==="multiple"&&Array.isArray(e)?e.map(n=>n.toISOString()).join(", "):!Array.isArray(e)&&e?e.toISOString():""}function iF({value:e,type:t,name:n,form:r}){return k.createElement("input",{type:"hidden",value:bEe(e,t),name:n,form:r})}iF.displayName="@mantine/dates/HiddenDatesInput";const Zj=e=>e==="range"?[null,null]:e==="multiple"?[]:null;function sF({type:e,value:t,defaultValue:n,onChange:r}){const o=_.useRef(e),[i,s]=go({value:t,defaultValue:n,onChange:r,finalValue:Zj(e)});let a=i;return o.current!==e&&(o.current=e,t===void 0&&(a=n!==void 0?n:Zj(e),s(a))),[a,s]}function Gj(e,t){const n=[...t].sort((r,o)=>r.getTime()-o.getTime());return pe(n[0]).startOf("day").subtract(1,"ms").isBefore(e)&&pe(n[1]).endOf("day").add(1,"ms").isAfter(e)}function xEe({type:e,level:t,value:n,defaultValue:r,onChange:o,allowSingleDateInRange:i,allowDeselect:s,onMouseLeave:a}){const[c,u]=sF({type:e,value:n,defaultValue:r,onChange:o}),[f,p]=_.useState(e==="range"&&c[0]&&!c[1]?c[0]:null),[g,v]=_.useState(null),y=$=>{if(e==="range"){if(f instanceof Date&&!c[1]){if(pe($).isSame(f,t)&&!i){p(null),v(null),u([null,null]);return}const N=[$,f];N.sort((I,R)=>I.getTime()-R.getTime()),u(N),v(null),p(null);return}if(c[0]&&!c[1]&&pe($).isSame(c[0],t)&&!i){p(null),v(null),u([null,null]);return}u([$,null]),v(null),p($);return}if(e==="multiple"){c.some(N=>pe(N).isSame($,t))?u(c.filter(N=>!pe(N).isSame($,t))):u([...c,$]);return}c&&s&&pe($).isSame(c,t)?u(null):u($)},w=$=>f instanceof Date&&g instanceof Date?Gj($,[g,f]):c[0]instanceof Date&&c[1]instanceof Date?Gj($,c):!1,P=e==="range"?$=>{a?.($),v(null)}:a,x=$=>c[0]instanceof Date&&pe($).isSame(c[0],t)?!(g&&pe(g).isBefore(c[0])):!1,S=$=>c[1]instanceof Date?pe($).isSame(c[1],t):!(c[0]instanceof Date)||!g?!1:pe(g).isBefore(c[0])&&pe($).isSame(c[0],t);return{onDateChange:y,onRootMouseLeave:P,onHoveredDateChange:e==="range"&&f?v:()=>{},getControlProps:$=>{if(e==="range")return{selected:c.some(I=>I&&pe(I).isSame($,t)),inRange:w($),firstInRange:x($),lastInRange:S($),"data-autofocus":!!c[0]&&pe(c[0]).isSame($,t)||void 0};if(e==="multiple")return{selected:c.some(I=>I&&pe(I).isSame($,t)),"data-autofocus":!!c[0]&&pe(c[0]).isSame($,t)||void 0};const N=pe(c).isSame($,t);return{selected:N,"data-autofocus":N||void 0}},_value:c,setValue:u}}var SEe=Object.defineProperty,jy=Object.getOwnPropertySymbols,aF=Object.prototype.hasOwnProperty,lF=Object.prototype.propertyIsEnumerable,Yj=(e,t,n)=>t in e?SEe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Nw=(e,t)=>{for(var n in t||(t={}))aF.call(t,n)&&Yj(e,n,t[n]);if(jy)for(var n of jy(t))lF.call(t,n)&&Yj(e,n,t[n]);return e},PEe=(e,t)=>{var n={};for(var r in e)aF.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&jy)for(var r of jy(e))t.indexOf(r)<0&&lF.call(e,r)&&(n[r]=e[r]);return n};const OEe={type:"default",numberOfColumns:1},cF=_.forwardRef((e,t)=>{const n=ae("DatePicker",OEe,e),{type:r,defaultValue:o,value:i,onChange:s,__staticSelector:a,getDayProps:c,allowSingleDateInRange:u,allowDeselect:f,onMouseLeave:p,numberOfColumns:g}=n,v=PEe(n,["type","defaultValue","value","onChange","__staticSelector","getDayProps","allowSingleDateInRange","allowDeselect","onMouseLeave","numberOfColumns"]),{onDateChange:y,onRootMouseLeave:w,onHoveredDateChange:P,getControlProps:x}=xEe({type:r,level:"day",allowDeselect:f,allowSingleDateInRange:u,value:i,defaultValue:o,onChange:s,onMouseLeave:p});return k.createElement(oF,Nw({ref:t,minLevel:"month",__staticSelector:a||"DatePicker",onMouseLeave:w,hideOutsideDates:g!==1,numberOfColumns:g,__onDayMouseEnter:(S,O)=>P(O),__onDayClick:(S,O)=>y(O),getDayProps:S=>Nw(Nw({},x(S)),c?.(S))},v))});cF.displayName="@mantine/dates/DatePicker";function CEe({type:e,date:t,locale:n,format:r,labelSeparator:o}){const i=s=>pe(s).locale(n).format(r);return e==="default"?t===null?"":i(t):e==="multiple"?t.map(i).join(", "):e==="range"?t[0]&&t[1]?`${i(t[0])} ${o} ${i(t[1])}`:t[0]?`${i(t[0])} ${o} `:"":""}function kEe({type:e,value:t,defaultValue:n,onChange:r,locale:o,format:i,closeOnChange:s,sortDates:a,labelSeparator:c}){const u=za(),[f,p]=pS(!1),[g,v]=sF({type:e,value:t,defaultValue:n,onChange:r}),y=CEe({type:e,date:g,locale:u.getLocale(o),format:i,labelSeparator:u.getLabelSeparator(c)}),w=S=>{s&&(e==="default"&&p.close(),e==="range"&&S[0]&&S[1]&&p.close()),v(a&&e==="multiple"?[...S].sort((O,E)=>O.getTime()-E.getTime()):S)},P=()=>w(e==="range"?[null,null]:e==="multiple"?[]:null),x=e==="range"?!!g[0]:e==="multiple"?g.length>0:g!==null;return{_value:g,setValue:w,onClear:P,shouldClear:x,formattedValue:y,dropdownOpened:f,dropdownHandlers:p}}function EEe({minDate:e,maxDate:t}){const n=new Date;return!e&&!t?n:pe(n).isBefore(e)?e:pe(n).isAfter(t)?t:n}var $Ee=ue(()=>({placeholder:{},input:{cursor:"pointer",lineHeight:"unset","&[data-read-only]":{cursor:"default"}}}));const MEe=$Ee;var NEe=Object.defineProperty,TEe=Object.defineProperties,IEe=Object.getOwnPropertyDescriptors,Ly=Object.getOwnPropertySymbols,uF=Object.prototype.hasOwnProperty,dF=Object.prototype.propertyIsEnumerable,Kj=(e,t,n)=>t in e?NEe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,qa=(e,t)=>{for(var n in t||(t={}))uF.call(t,n)&&Kj(e,n,t[n]);if(Ly)for(var n of Ly(t))dF.call(t,n)&&Kj(e,n,t[n]);return e},qj=(e,t)=>TEe(e,IEe(t)),jEe=(e,t)=>{var n={};for(var r in e)uF.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Ly)for(var r of Ly(e))t.indexOf(r)<0&&dF.call(e,r)&&(n[r]=e[r]);return n};const LEe={},fF=_.forwardRef((e,t)=>{const n=bP("PickerInputBase",LEe,e),{inputProps:r,wrapperProps:o,placeholder:i,classNames:s,styles:a,unstyled:c,popoverProps:u,modalProps:f,dropdownType:p,children:g,formattedValue:v,dropdownHandlers:y,dropdownOpened:w,onClick:P,clearable:x,onClear:S,clearButtonProps:O,rightSection:E,shouldClear:$,readOnly:N,disabled:I,value:R,name:B,form:z,type:G}=n,X=jEe(n,["inputProps","wrapperProps","placeholder","classNames","styles","unstyled","popoverProps","modalProps","dropdownType","children","formattedValue","dropdownHandlers","dropdownOpened","onClick","clearable","onClear","clearButtonProps","rightSection","shouldClear","readOnly","disabled","value","name","form","type"]),{classes:Q,cx:V}=MEe(null,{name:r.__staticSelector,classNames:s,styles:a,unstyled:c,variant:r.variant,size:r.size}),H=E||(x&&$&&!N&&!I?k.createElement(O0,qa({variant:"transparent",onClick:S,unstyled:c,size:r.size},O)):null),Z=()=>{G==="range"&&R[0]&&!R[1]&&S(),y.close()},Y=o.label;return k.createElement(k.Fragment,null,p==="modal"&&!N&&k.createElement(zi,qa({opened:w,onClose:Z,withCloseButton:!1,size:"auto","data-dates-modal":!0,unstyled:c},f),g),k.createElement(et.Wrapper,qa({},o),k.createElement(kn,qa({position:"bottom-start",opened:w,onClose:Z,disabled:p==="modal"||N,trapFocus:!0,returnFocus:!0,unstyled:c},u),k.createElement(kn.Target,{shouldOverrideDefaultTargetId:!Y},k.createElement(et,qa(qj(qa({"aria-label":v,"data-dates-input":!0,"data-read-only":N||void 0,disabled:I,component:"button",type:"button",multiline:!0,onClick:j=>{P?.(j),y.toggle()},rightSection:H},r),{ref:t,classNames:qj(qa({},s),{input:V(Q.input,s?.input)})}),X),v||k.createElement(et.Placeholder,{className:Q.placeholder,sx:{color:r.error?"inherit":void 0}},i))),k.createElement(kn.Dropdown,{"data-dates-dropdown":!0},g))),k.createElement(iF,{value:R,name:B,form:z,type:G}))});fF.displayName="@mantine/dates/PickerInputBase";var DEe=Object.defineProperty,REe=Object.defineProperties,zEe=Object.getOwnPropertyDescriptors,Dy=Object.getOwnPropertySymbols,pF=Object.prototype.hasOwnProperty,hF=Object.prototype.propertyIsEnumerable,Jj=(e,t,n)=>t in e?DEe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Xj=(e,t)=>{for(var n in t||(t={}))pF.call(t,n)&&Jj(e,n,t[n]);if(Dy)for(var n of Dy(t))hF.call(t,n)&&Jj(e,n,t[n]);return e},AEe=(e,t)=>REe(e,zEe(t)),BEe=(e,t)=>{var n={};for(var r in e)pF.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Dy)for(var r of Dy(e))t.indexOf(r)<0&&hF.call(e,r)&&(n[r]=e[r]);return n};const FEe={type:"default",valueFormat:"MMMM D, YYYY",closeOnChange:!0,sortDates:!0,dropdownType:"popover"},kO=_.forwardRef((e,t)=>{const n=ae("DatePickerInput",FEe,e),{type:r,value:o,defaultValue:i,onChange:s,valueFormat:a,labelSeparator:c,locale:u,classNames:f,styles:p,unstyled:g,closeOnChange:v,size:y,variant:w,dropdownType:P,sortDates:x,maxDate:S,minDate:O,defaultDate:E}=n,$=BEe(n,["type","value","defaultValue","onChange","valueFormat","labelSeparator","locale","classNames","styles","unstyled","closeOnChange","size","variant","dropdownType","sortDates","maxDate","minDate","defaultDate"]),{calendarProps:N,others:I}=wEe($),{_value:R,setValue:B,formattedValue:z,dropdownHandlers:G,dropdownOpened:X,onClear:Q,shouldClear:V}=kEe({type:r,value:o,defaultValue:i,onChange:s,locale:u,format:a,labelSeparator:c,closeOnChange:v,sortDates:x}),H=E||EEe({maxDate:S,minDate:O});return k.createElement(fF,Xj({formattedValue:z,dropdownOpened:X,dropdownHandlers:G,classNames:f,styles:p,unstyled:g,__staticSelector:"DatePickerInput",ref:t,onClear:Q,shouldClear:V,value:R,type:r,size:y,variant:w,dropdownType:P},I),k.createElement(cF,AEe(Xj({},N),{size:y,variant:w,type:r,value:R,defaultDate:Array.isArray(R)?R[0]||H:R||H,onChange:B,locale:u,classNames:f,styles:p,unstyled:g,__staticSelector:"DatePickerInput",__stopPropagation:P==="popover",maxDate:S,minDate:O})))});kO.displayName="@mantine/dates/DatePickerInput";const a1=dn(e=>({selectedCharges:[],setSelectedCharges:t=>e(n=>({selectedCharges:typeof t=="function"?t(n.selectedCharges):t})),setSelectedCharge:(t,n)=>{e(r=>({selectedCharges:r.selectedCharges.map(o=>o.label===t?n(o):o)}))}})),VEe=ue(e=>({wrapper:{width:105,display:"flex",alignItems:"center",justifyContent:"space-between",padding:`${M(.5)} ${e.spacing.xs}`,borderRadius:e.radius.sm,border:`${M(1)} solid ${e.colorScheme==="dark"?"transparent":e.colors.gray[3]}`,backgroundColor:e.colorScheme==="dark"?e.colors.dark[5]:e.white,"&:focus-within":{borderColor:e.colors[e.primaryColor][6]}},control:{backgroundColor:e.colorScheme==="dark"?e.colors.dark[7]:e.white,border:`${M(1)} solid ${e.colorScheme==="dark"?"transparent":e.colors.gray[3]}`,"&:disabled":{borderColor:e.colorScheme==="dark"?"transparent":e.colors.gray[3],opacity:.8,backgroundColor:"transparent"}},input:{textAlign:"center",paddingRight:`${e.spacing.md} !important`,paddingLeft:`${e.spacing.sm} !important`,height:M(18),flex:1,"&:disabled":{backgroundColor:"#2C2E33",cursor:"auto",color:"#C1C2C5"}}})),HEe=({charge:e,index:t})=>{const{classes:n}=VEe(),{setSelectedCharge:r,setSelectedCharges:o}=a1();return h.jsxs("div",{className:"edit-charges-modal-charge-card",children:[h.jsx(W,{fz:"sm",fw:500,c:"white",style:{textAlign:"center"},children:e.label}),h.jsxs("div",{style:{display:"flex",gap:5,justifyContent:"center"},children:[h.jsxs(mt,{radius:"xs",variant:"filled",style:{backgroundColor:"rgb(42, 42, 42)",color:"white",fontSize:10,padding:12.5,margin:5,fontWeight:500},children:["$",e.fine," fine"]}),h.jsxs(mt,{radius:"xs",variant:"filled",style:{backgroundColor:"rgb(42, 42, 42)",color:"white",fontSize:10,padding:12.5,margin:5,fontWeight:500},children:[e.time," month(s)"]}),h.jsxs(mt,{radius:"xs",variant:"filled",style:{backgroundColor:"rgb(42, 42, 42)",color:"white",fontSize:10,padding:12.5,margin:5,fontWeight:500},children:[e.points," point(s)"]})]}),h.jsx(At,{label:e.description,multiline:!0,withArrow:!0,color:"gray",children:h.jsx(W,{fz:"xs",fw:500,mt:5,style:{textAlign:"center"},lineClamp:2,children:e.description})}),h.jsxs(nt,{position:"apart",style:{gap:5},children:[h.jsx(mt,{radius:"xs",variant:"filled",style:{fontSize:10,padding:12.5,fontWeight:500},color:e.type.toLocaleLowerCase()==="felony"?"red":e.type.toLocaleLowerCase()==="infraction"?"green":"yellow",children:e.type}),h.jsxs(nt,{style:{gap:5},children:[h.jsx(At,{label:D.remove_charge,withArrow:!0,color:"gray",children:h.jsx(Qe,{onClick:()=>{o(i=>i.filter((s,a)=>a!==t))},h:31,className:"action-icon",children:h.jsx(z0,{size:18})})}),h.jsxs("div",{className:n.wrapper,children:[h.jsx(Qe,{size:18,variant:"transparent",onClick:()=>r(e.label,i=>({...i,count:--i.count})),disabled:e.count===1,className:n.control,onMouseDown:i=>i.preventDefault(),children:h.jsx(Dhe,{size:"1rem",stroke:1.5})}),h.jsx(ma,{variant:"unstyled",min:1,max:99,value:e.count,classNames:{input:n.input},disabled:!0}),h.jsx(Qe,{size:18,variant:"transparent",onClick:()=>r(e.label,i=>({...i,count:++i.count})),className:n.control,onMouseDown:i=>i.preventDefault(),children:h.jsx(Eu,{size:"1rem",stroke:1.5})})]})]})]})]})},WEe=e=>{const t={reduction:null,fine:0,time:0,points:0};for(let n=0;n{const[t,n]=_.useState(!1),{selectedCharges:r,setSelectedCharges:o}=a1(),{setCriminal:i}=Ur();return h.jsx(st,{variant:"light",color:"gray",loading:t,onClick:async()=>{n(!0);const s=await me("getRecommendedWarrantExpiry",r,{data:Date.now()});i(e.citizenid,a=>({...a,charges:r,penalty:WEe(r),warrantExpiry:new Date(s)})),n(!1),o([]),ke.closeAll()},children:D.confirm})},ZEe=({criminal:e})=>{const{selectedCharges:t,setSelectedCharges:n}=a1(),{charges:r}=Yf(),[o,i]=_.useState({}),[s,a]=_.useState(!1),[c,u]=_.useState(null),f=500,[p,g]=_.useState(""),[v,y]=_.useState(p);return _.useEffect(()=>{c!==null&&clearTimeout(c),a(!0);const w=setTimeout(()=>{y(p),a(!1)},f);return u(w),()=>{clearTimeout(w)}},[p]),_.useEffect(()=>{if(v.trim()==="")i(r);else{const w=Object.entries(r).reduce((P,[x,S])=>{const O=v.trim()?S.filter(E=>E.label.toLowerCase().includes(v.toLowerCase())):S;return O.length>0&&(P[x]=O),P},{});i(w)}},[v,r]),h.jsxs("div",{className:"edit-charges-modal",children:[h.jsx(Ye,{}),h.jsxs("div",{className:"edit-charges-modal-content",children:[h.jsxs("div",{className:"edit-charges-modal-current-charges",children:[h.jsx(W,{fz:"md",fw:500,c:"white",mb:5,children:D.current_charges}),h.jsx(St,{h:620,children:h.jsx("div",{className:"edit-charges-modal-added-charges",children:t.map((w,P)=>h.jsx(HEe,{charge:w,index:P},P))})}),h.jsx(UEe,{criminal:e})]}),h.jsx(Ye,{orientation:"vertical"}),h.jsxs("div",{className:"edit-charges-modal-all-charges",children:[h.jsxs("div",{className:"edit-charges-modal-all-charges-header",children:[h.jsx(W,{fz:"md",fw:500,c:"white",mb:5,children:D.all_charges}),h.jsx(yn,{radius:"xs",variant:"filled",placeholder:D.search,w:300,value:p,onChange:w=>g(w.target.value)})]}),h.jsx(St,{h:635,children:h.jsx("div",{className:"edit-charges-modal-all-charges-list",children:s?h.jsx("div",{style:{display:"flex",width:"100%",marginTop:100,justifyContent:"center",alignItems:"center"},children:h.jsx(en,{})}):h.jsx(h.Fragment,{children:Object.entries(o).map(([w,P])=>h.jsxs("div",{children:[h.jsx(W,{style:{fontSize:17,color:"white"},weight:500,children:w}),h.jsx("div",{className:"edit-charges-modal-charges-content",children:P.map((x,S)=>h.jsxs("div",{className:"edit-charges-modal-charge-card",children:[h.jsx(W,{fz:"sm",fw:500,c:"white",style:{textAlign:"center"},children:x.label}),h.jsxs("div",{style:{display:"flex",gap:5,justifyContent:"center"},children:[h.jsxs(mt,{radius:"xs",variant:"filled",style:{backgroundColor:"rgb(42, 42, 42)",color:"white",fontSize:10,padding:12.5,margin:5,fontWeight:500},children:["$",x.fine," fine"]}),h.jsxs(mt,{radius:"xs",variant:"filled",style:{backgroundColor:"rgb(42, 42, 42)",color:"white",fontSize:10,padding:12.5,margin:5,fontWeight:500},children:[x.time," ",D.months]}),h.jsxs(mt,{radius:"xs",variant:"filled",style:{backgroundColor:"rgb(42, 42, 42)",color:"white",fontSize:10,padding:12.5,margin:5,fontWeight:500},children:[x.points," ",D.points]})]}),h.jsx(At,{label:x.description,multiline:!0,withArrow:!0,color:"gray",children:h.jsx(W,{fz:"xs",fw:500,mt:5,style:{textAlign:"center"},lineClamp:2,children:x.description})}),h.jsxs(nt,{position:"apart",children:[h.jsx(mt,{radius:"xs",variant:"filled",style:{fontSize:10,padding:12.5,fontWeight:500},color:x.type.toLocaleLowerCase()==="felony"?"red":x.type.toLocaleLowerCase()==="infraction"?"green":"yellow",children:x.type}),h.jsx(At,{label:D.add_charge,withArrow:!0,color:"gray",children:h.jsx(Qe,{onClick:()=>n(O=>{const E=O.findIndex($=>$.label===x.label);return E===-1?[...O,{...x,count:1}]:O.map(($,N)=>N===E?{...$,count:++$.count}:$)}),h:31,className:"action-icon",children:h.jsx(Eu,{size:18})})})]})]},S))})]},w))})})})]})]})]})},mF=e=>Intl.NumberFormat("en-US",{style:"currency",currency:"USD",maximumFractionDigits:0}).format(e),Qj=[25,50,75,80,90],Ry=(e,t)=>t?Math.round(e-t/100*e):e,GEe=e=>{const t=[];if(!e)return[];for(let n=0;n{const{incident:t,setCriminals:n,setCriminal:r}=Ur(),{setSelectedCharges:o}=a1(),{setSelectedProfile:i}=Li(),s=Ul();return h.jsxs("div",{className:"incident-criminal-card-background",children:[h.jsxs("div",{className:"incident-criminal-card-header",children:[h.jsxs(W,{style:{fontSize:15,color:"white"},weight:600,children:[e.firstname," ",e.lastname]}),h.jsxs("div",{className:"incident-criminal-card-buttons",children:[h.jsx(At,{label:D.remove_criminal,withArrow:!0,color:"gray",position:"bottom",children:h.jsx(Qe,{variant:"light",color:"red",onClick:()=>{ke.openConfirmModal({title:h.jsx(W,{style:{fontSize:17,color:"white"},weight:500,children:D.remove_criminal}),size:"sm",centered:!0,labels:{confirm:D.confirm,cancel:D.cancel},groupProps:{spacing:6},confirmProps:{color:"red"},onConfirm:async()=>{await me("removeCriminal",{id:t.id,criminalId:e.citizenid},{data:1})&&n(c=>c.filter(u=>u.citizenid!==e.citizenid))},children:h.jsx(W,{size:"sm",c:"dark.2",children:D.remove_criminal_confirm.format(e.firstname,e.lastname)})})},children:h.jsx(z0,{size:16,color:"white"})})}),h.jsx(At,{label:D.go_to_profile,withArrow:!0,color:"gray",position:"bottom",children:h.jsx(Qe,{variant:"light",color:"dark",onClick:async()=>{if(!at()){const a=await me("getProfile",e.citizenid);i(a)}s("/profiles")},children:h.jsx(Yhe,{size:16,color:"white"})})}),h.jsx(At,{label:D.save_criminal,withArrow:!0,color:"gray",position:"bottom",children:h.jsx(Qe,{variant:"light",color:"dark",onClick:()=>{me("saveCriminal",{id:t.id,criminal:{...e,warrantExpiry:e.warrantExpiry?pe(e.warrantExpiry).format("YYYY-MM-DD HH:mm:ss"):null}},{data:1})},children:h.jsx(P8,{size:16,color:"white"})})})]})]}),h.jsxs(W,{color:"dimmed",size:"xs",children:["#",e.citizenid]}),h.jsxs("div",{className:"incident-criminal-content",children:[h.jsxs("div",{className:"incident-criminal-edit-charges-badges",children:[h.jsx(mt,{radius:"xs",variant:"light",style:{color:"white",fontSize:10,padding:12.5,cursor:"pointer",backgroundColor:"#343a40"},w:125,onClick:()=>{o(e.charges),ke.open({title:h.jsx(W,{style:{fontSize:17,color:"white"},weight:500,children:D.edit_charges}),styles:{body:{height:700,overflow:"hidden"},content:{width:1400}},centered:!0,size:1445,children:h.jsx(ZEe,{criminal:e})})},children:D.edit_charges}),e.charges.map((a,c)=>h.jsxs(mt,{radius:"xs",variant:"filled",style:{fontSize:10,padding:12.5,fontWeight:500},color:a.type.toLowerCase()==="felony"?"red":a.type.toLowerCase()==="infraction"?"green":"yellow",children:[a.count,"x ",a.label]},c))]}),h.jsx(Ye,{style:{width:"100%"}}),h.jsx(mr,{label:D.issue_warrant,description:D.issue_warrant_description,checked:e.issueWarrant,onChange:()=>r(e.citizenid,a=>({...a,issueWarrant:!a.issueWarrant}))}),e.issueWarrant?h.jsx(kO,{icon:h.jsx(DP,{size:20}),label:D.warrant_expiration_date,placeholder:"2023-03-12",weekendDays:[],minDate:new Date,value:e.warrantExpiry?new Date(e.warrantExpiry):null,onChange:a=>{r(e.citizenid,c=>({...c,warrantExpiry:a}))}}):h.jsxs(h.Fragment,{children:[h.jsx(Nl,{label:D.reduction,value:e.penalty.reduction?e.penalty.reduction.toString():null,data:GEe(e.penalty),icon:h.jsx(dhe,{size:20}),onChange:a=>r(e.citizenid,c=>({...c,penalty:c.penalty?{...c.penalty,reduction:a?+a:null}:{reduction:a?+a:null,time:0,fine:0,points:0}})),clearable:!0,placeholder:D.no_reduction,variant:"filled"}),h.jsxs(nt,{children:[h.jsxs(W,{size:"xs",style:{color:"white"},children:[D.time,": ",Ry(e.penalty.time,e.penalty.reduction)," ",D.months]}),h.jsxs(W,{size:"xs",style:{color:"white"},children:[D.fine,": ",mF(Ry(e.penalty.fine,e.penalty.reduction))]})]}),h.jsxs(nt,{children:[h.jsx(mr,{label:D.pleaded_guilty,checked:e.pleadedGuilty,onChange:()=>r(e.citizenid,a=>({...a,pleadedGuilty:!a.pleadedGuilty}))}),h.jsx(mr,{label:D.processed,checked:e.processed,onChange:()=>r(e.citizenid,a=>({...a,processed:!a.processed}))})]})]})]})]})},KEe=()=>{const{incident:e,isIncidentActive:t}=Ur();return t?h.jsx(St,{h:860,children:h.jsxs("div",{className:"incident-criminals-content-width",children:[h.jsxs(st,{fullWidth:!0,variant:"light",color:"gray",onClick:()=>ke.open({title:h.jsx(W,{style:{fontSize:17,color:"white"},weight:500,children:D.add_criminal}),centered:!0,size:"sm",children:h.jsx(UCe,{})}),children:[h.jsx(N8,{size:M(18),style:{marginRight:5}})," ",D.add_criminal]}),e.criminals.map(n=>h.jsx(YEe,{criminal:n},n.citizenid))]})}):h.jsx("div",{className:"content-width",children:h.jsx("div",{className:"card-background",children:h.jsxs("div",{className:"profile-no-selected",children:[h.jsx(D0,{size:M(50),color:"white"}),h.jsx(W,{style:{fontSize:15,color:"white"},weight:600,children:D.no_incident_selected})]})})})},qEe=()=>{const{setActiveIncident:e,setIncidentActive:t}=Ur(),[n,r]=_.useState(!1),o=async i=>{r(!0);const s=await me("getIncident",i.id,{data:{id:1,officersInvolved:[],evidence:[],title:i.title,description:"

",criminals:[]}});e(s),t(!0),r(!1)};return h.jsxs("div",{className:"incidents",children:[h.jsx(RCe,{handleIncidentClick:o}),h.jsx(Wf,{visible:n,overlayOpacity:.97,overlayColor:"rgb(34, 35, 37)",transitionDuration:250,loader:o1,style:{left:795,width:935,height:"96%",top:19,borderRadius:"0.25rem"}}),h.jsx(VCe,{}),h.jsx(KEe,{})]})};const JEe=[{firstname:"John",lastname:"Doe",callsign:"1A-01",citizenid:"ABCD1234",playerId:1,position:[0,0,0],unitId:1,image:"",title:"Chief",apu:!0,air:!0,mc:!0,k9:!0,fto:!0,lastActive:Date.now()},{firstname:"Jenna",lastname:"Doe",callsign:"1A-02",citizenid:"ABCD1235",playerId:2,position:[0,0,0],image:"",title:"Captain",apu:!1,air:!0,mc:!0,k9:!1,fto:!1,lastActive:Date.now()}],Tu=dn(e=>({rosterOfficers:at()?JEe:[],getRosterOfficers:async()=>{try{const t=await me("fetchRoster");return e({rosterOfficers:t}),{rosterOfficers:t}}catch(t){return console.error("Failed to fetch recent activities:",t),{rosterOfficers:[]}}},setRosterOfficers:t=>{e(n=>({rosterOfficers:typeof t=="function"?t(n.rosterOfficers):t}))}})),XEe=({officer:e})=>{const[t,n]=_.useState(!1),{setRosterOfficers:r}=Tu(),o=Zl({initialValues:{callsign:e.callsign}});return h.jsx("form",{onSubmit:o.onSubmit(async i=>{n(!0);const s=await me("setOfficerCallSign",{citizenid:e.citizenid,callsign:i.callsign},{data:!0,delay:500});if(n(!1),!s)return o.setFieldError("callSign",D.callsign_in_use);r(a=>a.map(c=>c.citizenid===e.citizenid?{...e,callsign:i.callsign}:c)),ke.closeAll()}),children:h.jsxs(Je,{children:[h.jsx(yn,{label:D.callsign,...o.getInputProps("callsign")}),h.jsx(st,{type:"submit",color:"gray",loading:t,variant:"light",children:D.confirm})]})})},QEe=({officer:e})=>{const t=["Cadet","Probationary Trooper","Trooper","Senior Trooper","Master Trooper","Corporal","Sergeant","Lieutenant","Captain","Assistant Chief","Chief"],[n,r]=_.useState(null),[o,i]=_.useState(!1),{setRosterOfficers:s}=Tu(),a=async()=>{n===null||(i(!0),!await me("setOfficerRank",{citizenId:e.citizenid,grade:+n},{data:!0}))||(s(u=>u.map(f=>f.citizenid===e.citizenid?{...e,title:`${t[n]}`}:f)),i(!1),ke.closeAll())};return h.jsxs(Je,{children:[h.jsx(Nl,{withinPortal:!0,value:n!==null?n.toString():null,data:t?t.map((c,u)=>({label:c,value:u.toString()})):[],onChange:c=>r(c!==null?+c:null),label:D.rank}),h.jsx(st,{variant:"light",color:"gray",onClick:a,loading:o,children:D.confirm})]})},e$e=({officer:e})=>{const[t,n]=_.useState(!1),{setRosterOfficers:r}=Tu(),[o,i]=_.useState(e.apu||!1),[s,a]=_.useState(e.air||!1),[c,u]=_.useState(e.mc||!1),[f,p]=_.useState(e.k9||!1),[g,v]=_.useState(e.fto||!1),y=async()=>{n(!0),await me("setOfficerRoles",{citizenid:e.citizenid,roles:{apu:o,air:s,mc:c,k9:f,fto:g}},{data:!0,delay:500}),n(!1),r(w=>w.map(P=>P.citizenid===e.citizenid?{...e,apu:o,air:s,mc:c,k9:f,fto:g}:P)),ke.closeAll()};return h.jsxs(Je,{children:[h.jsxs("div",{style:{display:"flex",gap:15,alignItems:"center",justifyContent:"center"},children:[h.jsx(mr,{label:D.apu,checked:o,onChange:()=>{i(!o)}}),h.jsx(mr,{label:D.air,checked:s,onChange:()=>{a(!s)}}),h.jsx(mr,{label:D.mc,checked:c,onChange:()=>{u(!c)}}),h.jsx(mr,{label:D.k9,checked:f,onChange:()=>{p(!f)}}),h.jsx(mr,{label:D.fto,checked:g,onChange:()=>{v(!g)}})]}),h.jsx(st,{type:"submit",color:"gray",loading:t,variant:"light",onClick:y,children:D.confirm})]})},t$e=({officers:e,hasPermission:t})=>{const{setRosterOfficers:n}=Tu(),r=s=>s.charAt(0).toUpperCase()+s.slice(1),o=s=>{const a=pe(),c=pe(s),u=a.diff(c,"day");return r(u===0?D.today:u===1?D.yesterday:pe(s).fromNow())},i=e.map(s=>h.jsxs("tr",{children:[h.jsx("td",{children:h.jsxs(nt,{spacing:"sm",children:[h.jsx(CP,{size:55,src:s.image,radius:5}),h.jsx("div",{children:h.jsxs(W,{fz:"sm",fw:500,children:[s.firstname," ",s.lastname]})})]})}),h.jsx("td",{children:s.callsign}),h.jsx("td",{children:h.jsx(mr,{checked:s.apu,disabled:!0,styles:{input:{"&:disabled ":{backgroundColor:s.apu?"#1971c2":"#373A40"}}}})}),h.jsx("td",{children:h.jsx(mr,{checked:s.air,disabled:!0,styles:{input:{"&:disabled ":{backgroundColor:s.air?"#1971c2":"#373A40"}}}})}),h.jsx("td",{children:h.jsx(mr,{checked:s.mc,disabled:!0,styles:{input:{"&:disabled ":{backgroundColor:s.mc?"#1971c2":"#373A40"}}}})}),h.jsx("td",{children:h.jsx(mr,{checked:s.k9,disabled:!0,styles:{input:{"&:disabled ":{backgroundColor:s.k9?"#1971c2":"#373A40"}}}})}),h.jsx("td",{children:h.jsx(mr,{checked:s.fto,disabled:!0,styles:{input:{"&:disabled ":{backgroundColor:s.fto?"#1971c2":"#373A40"}}}})}),h.jsx("td",{children:s.lastActive?o(s.lastActive):""}),h.jsx("td",{children:h.jsx(et,{disabled:!0,icon:h.jsx(w8,{size:16}),variant:"unstyled",placeholder:s.title,size:"xs"})}),h.jsx("td",{children:h.jsx(nt,{spacing:2,position:"right",children:h.jsxs(It,{withinPortal:!0,withArrow:!0,position:"bottom-end",children:[h.jsx(It.Target,{children:h.jsx(Qe,{children:h.jsx(Bhe,{size:"1.2rem",stroke:1.5})})}),h.jsxs(It.Dropdown,{children:[h.jsx(It.Item,{icon:h.jsx(Rhe,{size:20}),onClick:()=>ke.open({title:h.jsx(W,{style:{fontSize:17,color:"white"},weight:500,children:D.set_callsign}),children:h.jsx(XEe,{officer:s}),size:"xs",centered:!0}),children:D.set_callsign}),h.jsx(It.Item,{disabled:t,icon:h.jsx(rhe,{size:20}),onClick:()=>ke.open({title:h.jsx(W,{style:{fontSize:17,color:"white"},weight:500,children:D.set_rank}),centered:!0,size:"xs",children:h.jsx(QEe,{officer:s})}),children:D.set_rank}),h.jsx(It.Item,{disabled:t,icon:h.jsx(Nhe,{size:20}),onClick:()=>ke.open({title:h.jsx(W,{style:{fontSize:17,color:"white"},weight:500,children:D.set_roles}),centered:!0,size:"sm",children:h.jsx(e$e,{officer:s})}),children:D.set_roles}),h.jsx(It.Item,{icon:h.jsx(Gf,{size:20}),color:"red",disabled:t,onClick:()=>ke.openConfirmModal({title:h.jsx(W,{style:{fontSize:17,color:"white"},weight:500,children:D.fire_officer}),children:h.jsx(W,{c:"dark.2",size:"sm",children:D.fire_officer_description.format(s.firstname,s.lastname)}),labels:{confirm:D.confirm,cancel:D.cancel},centered:!0,groupProps:{spacing:6},confirmProps:{color:"red"},onConfirm:async()=>{await me("fireOfficer",s.citizenid,{data:!0})&&(n(c=>c.filter(u=>u.citizenid!==s.citizenid)),ke.closeAll())}}),children:D.fire_officer})]})]})})})]},s.citizenid));return h.jsx(St,{h:735,children:h.jsxs(Zc,{verticalSpacing:"sm",children:[h.jsx("thead",{children:h.jsxs("tr",{children:[h.jsx("th",{children:D.officer}),h.jsx("th",{children:D.callsign}),h.jsx("th",{children:D.apu}),h.jsx("th",{children:D.air}),h.jsx("th",{children:D.mc}),h.jsx("th",{children:D.k9}),h.jsx("th",{children:D.fto}),h.jsx("th",{children:D.last_active}),h.jsx("th",{children:D.role}),h.jsx("th",{})]})}),h.jsx("tbody",{children:i})]})})},n$e=()=>{const{getRosterOfficers:e}=Tu(),[t,n]=_.useState(!1),r=Zl({initialValues:{citizenid:"",callsign:""}});return h.jsx("form",{onSubmit:r.onSubmit(async o=>{n(!0);const i=await me("hireOfficer",{citizenid:o.citizenid,callsign:o.callsign,lastActive:Date.now()},{data:!1,delay:500});if(n(!1),!i)return r.setFieldError("citizenid",D.citizen_id_already_hired);await e(),ke.closeAll()}),children:h.jsxs(Je,{children:[h.jsx(yn,{label:D.citizen_id,description:D.citizen_id_you_want_to_hire,required:!0,...r.getInputProps("citizenid")}),h.jsx(yn,{label:D.callsign,description:D.callsign_you_want_to_hire,required:!0,...r.getInputProps("callsign")}),h.jsx(st,{variant:"light",color:"gray",type:"submit",loading:t,children:D.confirm})]})})},r$e=()=>{const{rosterOfficers:e,getRosterOfficers:t}=Tu(),[n,r]=_.useState(""),[o,i]=_.useState(e),s=200,[a,c]=_.useState(n),[u,f]=_.useState(null),[p,g]=_.useState(!1),v=bo(w=>w.personalData.role);function y(w){return!(w==="Chief"||w==="Assistant Chief"||w==="Captain"||w==="Lieutenant"||w==="Sergeant")}return _.useEffect(()=>{u!==null&&clearTimeout(u),g(!0);const w=setTimeout(()=>{c(n),g(!1)},s);return f(w),()=>{clearTimeout(w)}},[n]),_.useEffect(()=>{if(a.trim()==="")i(e);else{const w=e.filter(P=>(P.firstname||"").toLocaleLowerCase().includes(n.toLocaleLowerCase())||(P.lastname||"").toLocaleLowerCase().includes(n.toLocaleLowerCase()));i(w)}},[a,e]),_.useEffect(()=>{g(!0),(async()=>await t())().then(()=>{g(!1)})},[]),h.jsxs("div",{className:"roster",children:[h.jsxs("div",{className:"roster-top",children:[h.jsxs("div",{children:[h.jsx(W,{style:{fontSize:12},weight:500,c:"dimmed",children:D.manage_roster}),h.jsx(W,{style:{fontSize:24,color:"white"},weight:500,children:D.roster})]}),h.jsxs("div",{className:"roster-top-right",style:{display:"flex",gap:15,alignItems:"center"},children:[h.jsxs(W,{style:{fontSize:13,textAlign:"center"},weight:500,c:"dimmed",children:[e.length," ",D.members]}),h.jsx(yn,{placeholder:D.search,variant:"filled",value:n,onChange:w=>r(w.target.value)}),h.jsx(st,{leftIcon:h.jsx(N8,{size:20}),style:{backgroundColor:"rgba(51, 124, 255, 0.2)",color:"rgba(159, 194, 255, 1)"},onClick:()=>ke.open({title:h.jsx(W,{style:{fontSize:17,color:"white"},weight:500,children:D.hire_officer}),centered:!0,size:"xs",children:h.jsx(n$e,{})}),disabled:y(v),children:D.hire_officer})]})]}),h.jsx("div",{className:"roster-list",children:p?h.jsx(Pr,{children:h.jsx(en,{})}):h.jsx(t$e,{officers:o,hasPermission:y(v)})})]})};const o$e=({charge:e})=>{const{setCharges:t}=Yf(),[n,r]=_.useState(!1),[o,i]=_.useState(e.fine),[s,a]=_.useState(e.time),[c,u]=_.useState(e.points),f=bo(v=>v.personalData.role);function p(v){return!(v==="Chief"||v==="Assistant Chief"||v==="Captain"||v==="Lieutenant"||v==="Sergeant")}const g=async()=>{r(!0),await me("editCharge",{chargelabel:e.label,fine:o,time:s,points:c},{data:!0})&&(r(!1),t(y=>{const w={...y};return Object.keys(y).forEach(P=>{w[P]=y[P].map(x=>x.label===e.label?{...e,fine:Number(o),time:Number(s),points:Number(c)}:x)}),w}),ke.closeAll())};return h.jsxs(Je,{children:[h.jsx(ma,{withAsterisk:!0,label:D.charge_fine,value:o,onChange:i,min:0,variant:"filled",placeholder:D.charge_fine,parser:v=>v.replace(/\$\s?|(,*)/g,""),formatter:v=>Number.isNaN(parseFloat(v))?"$ ":`$ ${v}`.replace(/\B(?{const{setCharges:t}=Yf(),n=bo(o=>o.personalData.role);function r(o){return!(o==="Chief"||o==="Assistant Chief"||o==="Captain"||o==="Lieutenant"||o==="Sergeant")}return h.jsxs("div",{className:"charges-charge-card",children:[h.jsx(W,{fz:"sm",fw:500,c:"white",style:{textAlign:"center"},children:e.label}),h.jsxs("div",{style:{display:"flex",gap:5,justifyContent:"center"},children:[h.jsxs(mt,{radius:"xs",variant:"filled",style:{backgroundColor:"rgb(42, 42, 42)",color:"white",fontSize:10,padding:12.5,fontWeight:500},children:["$",e.fine," ",D.fine]}),h.jsxs(mt,{radius:"xs",variant:"filled",style:{backgroundColor:"rgb(42, 42, 42)",color:"white",fontSize:10,padding:12.5,fontWeight:500},children:[e.time," ",D.months]}),h.jsxs(mt,{radius:"xs",variant:"filled",style:{backgroundColor:"rgb(42, 42, 42)",color:"white",fontSize:10,padding:12.5,fontWeight:500},children:[e.points," ",D.points]})]}),h.jsx(At,{label:e.description,multiline:!0,withArrow:!0,color:"gray",children:h.jsx(W,{fz:"xs",fw:500,mt:2,style:{textAlign:"center",color:"white"},lineClamp:2,children:e.description})}),h.jsxs(nt,{position:"apart",style:{flex:"1"},children:[h.jsx(mt,{radius:"xs",variant:"filled",style:{fontSize:10,padding:12.5,fontWeight:500},color:e.type.toLocaleLowerCase()==="felony"?"red":e.type.toLocaleLowerCase()==="infraction"?"green":"yellow",children:e.type.charAt(0).toUpperCase()+e.type.slice(1)}),h.jsxs("div",{style:{display:"flex",gap:5,alignItems:"center"},children:[h.jsx(Qe,{variant:"light",disabled:r(n),onClick:()=>{ke.openConfirmModal({title:h.jsx(W,{style:{fontSize:17,color:"white"},weight:500,children:D.delete_charge}),size:"sm",centered:!0,labels:{confirm:D.confirm,cancel:D.cancel},groupProps:{spacing:6},confirmProps:{color:"red"},onConfirm:async()=>{await me("deleteCharge",{label:e.label},{data:1})&&t(i=>{const s={};return Object.keys(i).forEach(a=>{s[a]=i[a].filter(c=>c.label!==e.label)}),s})},children:h.jsx(W,{size:"sm",c:"dark.2",children:D.delete_charge_confirm.format(e.label)})})},children:h.jsx(z0,{size:16,color:r(n)?"gray":"white"})}),h.jsx(st,{disabled:r(n),color:"gray",compact:!0,onClick:()=>ke.open({title:h.jsx(W,{style:{fontSize:17,color:"white"},weight:500,children:D.edit_charge}),centered:!0,size:"sm",children:h.jsx(o$e,{charge:e})}),children:D.edit})]})]})]})},s$e=()=>{const{charges:e,setCharges:t}=Yf(),n=bo(E=>E.personalData.role),[r,o]=_.useState(""),[i,s]=_.useState(""),[a,c]=_.useState(""),[u,f]=_.useState(0),[p,g]=_.useState(0),[v,y]=_.useState(0),[w,P]=_.useState("infraction");function x(E){return!(E==="Chief"||E==="Assistant Chief"||E==="Captain"||E==="Lieutenant"||E==="Sergeant")}const S=E=>E.sort(($,N)=>{const I={infraction:1,misdemeanor:2,felony:3};return I[$.type]-I[N.type]}),O=async()=>{r.length<3||i.length<3||a.length<2||u===""||u<=0||w.length<3||(at()?t(E=>{const $={...E};return $[a].push({label:r,description:i,fine:u,time:Number(p),points:Number(v),type:w}),$}):(await me("createCharge",{label:r,description:i,category:a,fine:u,time:p,points:v,type:w},{data:1}),t(E=>{const $={...E};return $[a].push({label:r,description:i,fine:u,time:Number(p),points:Number(v),type:w}),$})),o(""),s(""),c(""),f(0),g(0),y(0),P("infraction"))};return h.jsxs("div",{className:"charges",children:[h.jsx("div",{className:"top-side-create-charges",children:h.jsxs("div",{className:"charges-create",children:[h.jsx(W,{style:{fontSize:17,color:"white"},weight:500,children:D.create_charge}),h.jsxs("div",{className:"charges-create-content",children:[h.jsx(yn,{withAsterisk:!0,label:D.charge_label,variant:"filled",placeholder:D.charge_label,value:r,onChange:E=>o(E.target.value),w:200,disabled:x(n)}),h.jsx(yn,{withAsterisk:!0,label:D.charge_description,variant:"filled",placeholder:D.charge_description,value:i,onChange:E=>s(E.target.value),w:250,disabled:x(n)}),h.jsx(Nl,{withAsterisk:!0,label:D.charge_category,placeholder:D.charge_category,variant:"filled",data:[{value:"OFFENSES AGAINST PERSONS",label:"OFFENSES AGAINST PERSONS"},{value:"OFFENSES INVOLVING THEFT",label:"OFFENSES INVOLVING THEFT"},{value:"OFFENSES INVOLVING FRAUD",label:"OFFENSES INVOLVING FRAUD"},{value:"OFFENSES INVOLVING DAMAGE TO PROPERTY",label:"OFFENSES INVOLVING DAMAGE TO PROPERTY"},{value:"OFFENSES AGAINST PUBLIC ADMINISTRATION",label:"OFFENSES AGAINST PUBLIC ADMINISTRATION"},{value:"OFFENSES AGAINST PUBLIC ORDER",label:"OFFENSES AGAINST PUBLIC ORDER"},{value:"OFFENSES AGAINST HEALTH AND MORALS",label:"OFFENSES AGAINST HEALTH AND MORALS"},{value:"OFFENSES AGAINST PUBLIC SAFETY",label:"OFFENSES AGAINST PUBLIC SAFETY"},{value:"OFFENSES INVOLVING THE OPERATION OF A VEHICLE",label:"OFFENSES INVOLVING THE OPERATION OF A VEHICLE"},{value:"OFFENSES INVOLVING THE WELL-BEING OF WILDLIFE",label:"OFFENSES INVOLVING THE WELL-BEING OF WILDLIFE"}],value:a,onChange:E=>c(E),w:275,disabled:x(n)}),h.jsx(ma,{withAsterisk:!0,label:D.charge_fine,value:u,onChange:f,min:0,variant:"filled",placeholder:D.charge_fine,w:140,parser:E=>E.replace(/\$\s?|(,*)/g,""),formatter:E=>Number.isNaN(parseFloat(E))?"$ ":`$ ${E}`.replace(/\B(?P(E)})]}),h.jsx("div",{className:"charges-create-buttons",children:h.jsx(st,{color:"green",disabled:x(n),onClick:O,children:D.create})})]})}),h.jsx(St,{h:700,scrollbarSize:4,children:h.jsx("div",{className:"charges-all-charges",children:h.jsx("div",{className:"charges-category",children:Object.entries(e).map(([E,$])=>h.jsxs("div",{children:[h.jsx(W,{style:{fontSize:17,color:"white"},weight:500,children:E}),h.jsx("div",{className:"charges-cards-row",children:S($).map(N=>h.jsx(i$e,{charge:N},N.label))})]},E))})})})]})};const a$e=ue(e=>({header:{position:"sticky",top:-1,backgroundColor:e.colorScheme==="dark"?e.colors.dark[7]:e.white,transition:"box-shadow 150ms ease","&::after":{content:'""',position:"absolute",left:0,right:0,bottom:0,borderBottom:`${M(1)} solid ${e.colorScheme==="dark"?e.colors.dark[3]:e.colors.gray[2]}`}},scrolled:{boxShadow:e.shadows.sm}})),l$e=[{code:"10-0",description:"Mistet mistænkte af syne"},{code:"10-3",description:"Stop radio transmission"},{code:"10-4",description:"Modtaget"},{code:"10-6",description:"Ikke tilgængelig"},{code:"10-7",description:"Off-Duty"},{code:"10-8",description:"On-duty"},{code:"10-9",description:"Gentag"},{code:"10-10",description:"Skift radio frekvens"},{code:"10-13",description:"Skud affyret"},{code:"10-14",description:"Stolen numberplate"},{code:"10-15",description:"Igangværende biltyveri"},{code:"10-16",description:"Brug for persontransport"},{code:"10-19",description:"Kører tilbage til stationen"},{code:"10-20",description:"Position"},{code:"10-22",description:"Ignorer sidste signal"},{code:"10-23",description:"Ankommet til _____"},{code:"10-25",description:"Mangler køremakker"},{code:"10-26",description:"Person i varetægt"},{code:"10-28",description:"Tjek MDT for oplysninger"},{code:"10-37",description:"Afvent"},{code:"10-38",description:"Trafikstop"},{code:"10-39",description:"Mistænkelig adfærd"},{code:"10-43",description:"Kald en læge"},{code:"10-50",description:"Færdselsuheld"},{code:"10-51",description:"Totalskadet køretøj"},{code:"10-56",description:"Butiks-/juvelrøveri"},{code:"10-66",description:"Husrøveri"},{code:"10-76",description:"På vej til"},{code:"10-77",description:"Ankomsttid / ETA"},{code:"10-78",description:"Brug for assistance"},{code:"10-80",description:"Biljagt"},{code:"10-81",description:"Jagt til fods"},{code:"10-85",description:"Helikopter enhed"},{code:"10-89",description:"Betjent nede"},{code:"10-90",description:"Bankrøveri"},{code:"10-92",description:"Oil Rig Angreb"},{code:"10-98",description:"Fængselsudbrud"},{code:"10-99",description:"Efterlyst person"},{code:"10-101",description:"Status"}],c$e=[{code:"Code 1",description:"Almindelig kørsel"},{code:"Code 2",description:"Kørsel med lys"},{code:"Code 3",description:"Kørsel med lys & sirene"},{code:"Code 4",description:"Alt under kontrol"},{code:"Code 5",description:"Felony stop"}],u$e=[{code:"Kode rød",description:"Stop med nødvendig force"},{code:"Kode orange",description:"Pit tilladt hvis muligt"},{code:"Kode grøn",description:"Følg efter personen"},{code:"Ocean king",description:"Besvarer 10-101"},{code:"Signal 100",description:"Alt radio kommunikation stoppes"}],d$e=()=>{const{classes:e,cx:t}=a$e(),[n,r]=_.useState(!1),o=l$e.map(a=>h.jsxs("tr",{children:[h.jsx("td",{children:a.code}),h.jsx("td",{children:a.description})]},a.code)),i=c$e.map(a=>h.jsxs("tr",{children:[h.jsx("td",{children:a.code}),h.jsx("td",{children:a.description})]},a.code)),s=u$e.map(a=>h.jsxs("tr",{children:[h.jsx("td",{children:a.code}),h.jsx("td",{children:a.description})]},a.code));return h.jsxs("div",{className:"codes-and-command",children:[h.jsxs("div",{className:"codes-and-command-background",children:[h.jsx(W,{color:"white",size:"md",weight:600,children:"10 Codes"}),h.jsx(St,{h:800,onScrollPositionChange:({y:a})=>r(a!==0),children:h.jsxs(Zc,{striped:!0,withBorder:!0,children:[h.jsx("thead",{className:t(e.header,{[e.scrolled]:n}),children:h.jsxs("tr",{children:[h.jsx("th",{children:"Code"}),h.jsx("th",{children:"Description"})]})}),h.jsx("tbody",{children:o})]})})]}),h.jsxs("div",{className:"codes-and-command-extra",children:[h.jsxs("div",{className:"command-background",children:[h.jsx(W,{color:"white",size:"md",weight:600,children:"Codes Meaning"}),h.jsx(St,{h:300,children:h.jsxs(Zc,{striped:!0,withBorder:!0,children:[h.jsx("thead",{className:t(e.header),children:h.jsxs("tr",{children:[h.jsx("th",{children:"Codes"}),h.jsx("th",{children:"Meaning"})]})}),h.jsx("tbody",{children:i})]})})]}),h.jsxs("div",{className:"command-background",children:[h.jsx(W,{color:"white",size:"md",weight:600,children:"Codes Color Meaning"}),h.jsx(St,{h:300,children:h.jsxs(Zc,{striped:!0,withBorder:!0,children:[h.jsx("thead",{className:t(e.header),children:h.jsxs("tr",{children:[h.jsx("th",{children:"Color Codes"}),h.jsx("th",{children:"Meaning"})]})}),h.jsx("tbody",{children:s})]})})]})]})]})};var Rx={exports:{}};/* @preserve * Leaflet 1.9.4, a JS library for interactive maps. https://leafletjs.com * (c) 2010-2023 Vladimir Agafonkin, (c) 2010-2011 CloudMade - */(function(e,t){(function(n,r){r(t)})(Kx,function(n){var r="1.9.4";function o(l){var d,m,b,C;for(m=1,b=arguments.length;m"u"||!L||!L.Mixin)){l=O(l)?l:[l];for(var d=0;d0?Math.floor(l):Math.ceil(l)};j.prototype={clone:function(){return new j(this.x,this.y)},add:function(l){return this.clone()._add(F(l))},_add:function(l){return this.x+=l.x,this.y+=l.y,this},subtract:function(l){return this.clone()._subtract(F(l))},_subtract:function(l){return this.x-=l.x,this.y-=l.y,this},divideBy:function(l){return this.clone()._divideBy(l)},_divideBy:function(l){return this.x/=l,this.y/=l,this},multiplyBy:function(l){return this.clone()._multiplyBy(l)},_multiplyBy:function(l){return this.x*=l,this.y*=l,this},scaleBy:function(l){return new j(this.x*l.x,this.y*l.y)},unscaleBy:function(l){return new j(this.x/l.x,this.y/l.y)},round:function(){return this.clone()._round()},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this},floor:function(){return this.clone()._floor()},_floor:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this},ceil:function(){return this.clone()._ceil()},_ceil:function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this},trunc:function(){return this.clone()._trunc()},_trunc:function(){return this.x=U(this.x),this.y=U(this.y),this},distanceTo:function(l){l=F(l);var d=l.x-this.x,m=l.y-this.y;return Math.sqrt(d*d+m*m)},equals:function(l){return l=F(l),l.x===this.x&&l.y===this.y},contains:function(l){return l=F(l),Math.abs(l.x)<=Math.abs(this.x)&&Math.abs(l.y)<=Math.abs(this.y)},toString:function(){return"Point("+g(this.x)+", "+g(this.y)+")"}};function F(l,d,m){return l instanceof j?l:O(l)?new j(l[0],l[1]):l==null?l:typeof l=="object"&&"x"in l&&"y"in l?new j(l.x,l.y):new j(l,d,m)}function K(l,d){if(l)for(var m=d?[l,d]:l,b=0,C=m.length;b=this.min.x&&m.x<=this.max.x&&d.y>=this.min.y&&m.y<=this.max.y},intersects:function(l){l=ee(l);var d=this.min,m=this.max,b=l.min,C=l.max,T=C.x>=d.x&&b.x<=m.x,A=C.y>=d.y&&b.y<=m.y;return T&&A},overlaps:function(l){l=ee(l);var d=this.min,m=this.max,b=l.min,C=l.max,T=C.x>d.x&&b.xd.y&&b.y=d.lat&&C.lat<=m.lat&&b.lng>=d.lng&&C.lng<=m.lng},intersects:function(l){l=ie(l);var d=this._southWest,m=this._northEast,b=l.getSouthWest(),C=l.getNorthEast(),T=C.lat>=d.lat&&b.lat<=m.lat,A=C.lng>=d.lng&&b.lng<=m.lng;return T&&A},overlaps:function(l){l=ie(l);var d=this._southWest,m=this._northEast,b=l.getSouthWest(),C=l.getNorthEast(),T=C.lat>d.lat&&b.latd.lng&&b.lng1,Gt=function(){var l=!1;try{var d=Object.defineProperty({},"passive",{get:function(){l=!0}});window.addEventListener("testPassiveEventSupport",p,d),window.removeEventListener("testPassiveEventSupport",p,d)}catch{}return l}(),Xr=function(){return!!document.createElement("canvas").getContext}(),So=!!(document.createElementNS&&bt("svg").createSVGRect),lr=!!So&&function(){var l=document.createElement("div");return l.innerHTML="",(l.firstChild&&l.firstChild.namespaceURI)==="http://www.w3.org/2000/svg"}(),cr=!So&&function(){try{var l=document.createElement("div");l.innerHTML='';var d=l.firstChild;return d.style.behavior="url(#default#VML)",d&&typeof d.adj=="object"}catch{return!1}}(),Hi=navigator.platform.indexOf("Mac")===0,Es=navigator.platform.indexOf("Linux")===0;function ur(l){return navigator.userAgent.toLowerCase().indexOf(l)>=0}var Oe={ie:Tn,ielt9:kr,edge:lt,webkit:Zn,android:Jt,android23:ht,androidStock:Yr,opera:ar,chrome:Kr,gecko:Bt,safari:qr,phantom:fn,opera12:wn,win:Er,ie3d:gt,webkit3d:be,gecko3d:De,any3d:Jr,mobile:Rt,mobileWebkit:Zt,mobileWebkit3d:$r,msPointer:xt,pointer:tn,touch:Aa,touchNative:Gn,mobileOpera:Yn,mobileGecko:bn,retina:Ft,passiveEvents:Gt,canvas:Xr,svg:So,vml:cr,inlineSvg:lr,mac:Hi,linux:Es},Ba=Oe.msPointer?"MSPointerDown":"pointerdown",Yl=Oe.msPointer?"MSPointerMove":"pointermove",Fa=Oe.msPointer?"MSPointerUp":"pointerup",Se=Oe.msPointer?"MSPointerCancel":"pointercancel",ct={touchstart:Ba,touchmove:Yl,touchend:Fa,touchcancel:Se},nn={touchstart:Kl,touchmove:Va,touchend:Va,touchcancel:Va},ze={},Wi=!1;function Qr(l,d,m){return d==="touchstart"&&Ui(),nn[d]?(m=nn[d].bind(this,m),l.addEventListener(ct[d],m,!1),m):(console.warn("wrong event specified:",d),p)}function tp(l,d,m){if(!ct[d]){console.warn("wrong event specified:",d);return}l.removeEventListener(ct[d],m,!1)}function w1(l){ze[l.pointerId]=l}function b1(l){ze[l.pointerId]&&(ze[l.pointerId]=l)}function rn(l){delete ze[l.pointerId]}function Ui(){Wi||(document.addEventListener(Ba,w1,!0),document.addEventListener(Yl,b1,!0),document.addEventListener(Fa,rn,!0),document.addEventListener(Se,rn,!0),Wi=!0)}function Va(l,d){if(d.pointerType!==(d.MSPOINTER_TYPE_MOUSE||"mouse")){d.touches=[];for(var m in ze)d.touches.push(ze[m]);d.changedTouches=[d],l(d)}}function Kl(l,d){d.MSPOINTER_TYPE_TOUCH&&d.pointerType===d.MSPOINTER_TYPE_TOUCH&&In(d),Va(l,d)}function x1(l){var d={},m,b;for(b in l)m=l[b],d[b]=m&&m.bind?m.bind(l):m;return l=d,d.type="dblclick",d.detail=2,d.isTrusted=!1,d._simulated=!0,d}var S1=200;function P1(l,d){l.addEventListener("dblclick",d);var m=0,b;function C(T){if(T.detail!==1){b=T.detail;return}if(!(T.pointerType==="mouse"||T.sourceCapabilities&&!T.sourceCapabilities.firesTouchEvents)){var A=XO(T);if(!(A.some(function(te){return te instanceof HTMLLabelElement&&te.attributes.for})&&!A.some(function(te){return te instanceof HTMLInputElement||te instanceof HTMLSelectElement}))){var q=Date.now();q-m<=S1?(b++,b===2&&d(x1(T))):b=1,m=q}}}return l.addEventListener("click",C),{dblclick:d,simDblclick:C}}function O1(l,d){l.removeEventListener("dblclick",d.dblclick),l.removeEventListener("click",d.simDblclick)}var Lu=rp(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),si=rp(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),Ie=si==="webkitTransition"||si==="OTransition"?si+"End":"transitionend";function vt(l){return typeof l=="string"?document.getElementById(l):l}function xn(l,d){var m=l.style[d]||l.currentStyle&&l.currentStyle[d];if((!m||m==="auto")&&document.defaultView){var b=document.defaultView.getComputedStyle(l,null);m=b?b[d]:null}return m==="auto"?null:m}function Fe(l,d,m){var b=document.createElement(l);return b.className=d||"",m&&m.appendChild(b),b}function ut(l){var d=l.parentNode;d&&d.removeChild(l)}function Mr(l){for(;l.firstChild;)l.removeChild(l.firstChild)}function Po(l){var d=l.parentNode;d&&d.lastChild!==l&&d.appendChild(l)}function Nr(l){var d=l.parentNode;d&&d.firstChild!==l&&d.insertBefore(l,d.firstChild)}function C1(l,d){if(l.classList!==void 0)return l.classList.contains(d);var m=np(l);return m.length>0&&new RegExp("(^|\\s)"+d+"(\\s|$)").test(m)}function We(l,d){if(l.classList!==void 0)for(var m=y(d),b=0,C=m.length;b0?2*window.devicePixelRatio:1;function eC(l){return Oe.edge?l.wheelDeltaY/2:l.deltaY&&l.deltaMode===0?-l.deltaY/BV:l.deltaY&&l.deltaMode===1?-l.deltaY*20:l.deltaY&&l.deltaMode===2?-l.deltaY*60:l.deltaX||l.deltaZ?0:l.wheelDelta?(l.wheelDeltaY||l.wheelDelta)/2:l.detail&&Math.abs(l.detail)<32765?-l.detail*20:l.detail?l.detail/-32765*60:0}function z1(l,d){var m=d.relatedTarget;if(!m)return!0;try{for(;m&&m!==l;)m=m.parentNode}catch{return!1}return m!==l}var FV={__proto__:null,on:Ae,off:Pt,stopPropagation:Ua,disableScrollPropagation:R1,disableClickPropagation:Au,preventDefault:In,stop:Za,getPropagationPath:XO,getMousePosition:QO,getWheelDelta:eC,isExternalTarget:z1,addListener:Ae,removeListener:Pt},tC=Y.extend({run:function(l,d,m,b){this.stop(),this._el=l,this._inProgress=!0,this._duration=m||.25,this._easeOutPower=1/Math.max(b||.5,.2),this._startPos=Wa(l),this._offset=d.subtract(this._startPos),this._startTime=+new Date,this.fire("start"),this._animate()},stop:function(){this._inProgress&&(this._step(!0),this._complete())},_animate:function(){this._animId=G(this._animate,this),this._step()},_step:function(l){var d=+new Date-this._startTime,m=this._duration*1e3;dthis.options.maxZoom)?this.setZoom(l):this},panInsideBounds:function(l,d){this._enforcingBounds=!0;var m=this.getCenter(),b=this._limitCenter(m,this._zoom,ie(l));return m.equals(b)||this.panTo(b,d),this._enforcingBounds=!1,this},panInside:function(l,d){d=d||{};var m=F(d.paddingTopLeft||d.padding||[0,0]),b=F(d.paddingBottomRight||d.padding||[0,0]),C=this.project(this.getCenter()),T=this.project(l),A=this.getPixelBounds(),q=ee([A.min.add(m),A.max.subtract(b)]),te=q.getSize();if(!q.contains(T)){this._enforcingBounds=!0;var oe=T.subtract(q.getCenter()),ve=q.extend(T).getSize().subtract(te);C.x+=oe.x<0?-ve.x:ve.x,C.y+=oe.y<0?-ve.y:ve.y,this.panTo(this.unproject(C),d),this._enforcingBounds=!1}return this},invalidateSize:function(l){if(!this._loaded)return this;l=o({animate:!1,pan:!0},l===!0?{animate:!0}:l);var d=this.getSize();this._sizeChanged=!0,this._lastCenter=null;var m=this.getSize(),b=d.divideBy(2).round(),C=m.divideBy(2).round(),T=b.subtract(C);return!T.x&&!T.y?this:(l.animate&&l.pan?this.panBy(T):(l.pan&&this._rawPanBy(T),this.fire("move"),l.debounceMoveend?(clearTimeout(this._sizeTimer),this._sizeTimer=setTimeout(s(this.fire,this,"moveend"),200)):this.fire("moveend")),this.fire("resize",{oldSize:d,newSize:m}))},stop:function(){return this.setZoom(this._limitZoom(this._zoom)),this.options.zoomSnap||this.fire("viewreset"),this._stop()},locate:function(l){if(l=this._locateOptions=o({timeout:1e4,watch:!1},l),!("geolocation"in navigator))return this._handleGeolocationError({code:0,message:"Geolocation not supported."}),this;var d=s(this._handleGeolocationResponse,this),m=s(this._handleGeolocationError,this);return l.watch?this._locationWatchId=navigator.geolocation.watchPosition(d,m,l):navigator.geolocation.getCurrentPosition(d,m,l),this},stopLocate:function(){return navigator.geolocation&&navigator.geolocation.clearWatch&&navigator.geolocation.clearWatch(this._locationWatchId),this._locateOptions&&(this._locateOptions.setView=!1),this},_handleGeolocationError:function(l){if(this._container._leaflet_id){var d=l.code,m=l.message||(d===1?"permission denied":d===2?"position unavailable":"timeout");this._locateOptions.setView&&!this._loaded&&this.fitWorld(),this.fire("locationerror",{code:d,message:"Geolocation error: "+m+"."})}},_handleGeolocationResponse:function(l){if(this._container._leaflet_id){var d=l.coords.latitude,m=l.coords.longitude,b=new J(d,m),C=b.toBounds(l.coords.accuracy*2),T=this._locateOptions;if(T.setView){var A=this.getBoundsZoom(C);this.setView(b,T.maxZoom?Math.min(A,T.maxZoom):A)}var q={latlng:b,bounds:C,timestamp:l.timestamp};for(var te in l.coords)typeof l.coords[te]=="number"&&(q[te]=l.coords[te]);this.fire("locationfound",q)}},addHandler:function(l,d){if(!d)return this;var m=this[l]=new d(this);return this._handlers.push(m),this.options[l]&&m.enable(),this},remove:function(){if(this._initEvents(!0),this.options.maxBounds&&this.off("moveend",this._panInsideMaxBounds),this._containerId!==this._container._leaflet_id)throw new Error("Map container is being reused by another instance");try{delete this._container._leaflet_id,delete this._containerId}catch{this._container._leaflet_id=void 0,this._containerId=void 0}this._locationWatchId!==void 0&&this.stopLocate(),this._stop(),ut(this._mapPane),this._clearControlPos&&this._clearControlPos(),this._resizeRequest&&(X(this._resizeRequest),this._resizeRequest=null),this._clearHandlers(),this._loaded&&this.fire("unload");var l;for(l in this._layers)this._layers[l].remove();for(l in this._panes)ut(this._panes[l]);return this._layers=[],this._panes=[],delete this._mapPane,delete this._renderer,this},createPane:function(l,d){var m="leaflet-pane"+(l?" leaflet-"+l.replace("Pane","")+"-pane":""),b=Fe("div",m,d||this._mapPane);return l&&(this._panes[l]=b),b},getCenter:function(){return this._checkIfLoaded(),this._lastCenter&&!this._moved()?this._lastCenter.clone():this.layerPointToLatLng(this._getCenterLayerPoint())},getZoom:function(){return this._zoom},getBounds:function(){var l=this.getPixelBounds(),d=this.unproject(l.getBottomLeft()),m=this.unproject(l.getTopRight());return new fe(d,m)},getMinZoom:function(){return this.options.minZoom===void 0?this._layersMinZoom||0:this.options.minZoom},getMaxZoom:function(){return this.options.maxZoom===void 0?this._layersMaxZoom===void 0?1/0:this._layersMaxZoom:this.options.maxZoom},getBoundsZoom:function(l,d,m){l=ie(l),m=F(m||[0,0]);var b=this.getZoom()||0,C=this.getMinZoom(),T=this.getMaxZoom(),A=l.getNorthWest(),q=l.getSouthEast(),te=this.getSize().subtract(m),oe=ee(this.project(q,b),this.project(A,b)).getSize(),ve=Oe.any3d?this.options.zoomSnap:1,Re=te.x/oe.x,Ke=te.y/oe.y,dr=d?Math.max(Re,Ke):Math.min(Re,Ke);return b=this.getScaleZoom(dr,b),ve&&(b=Math.round(b/(ve/100))*(ve/100),b=d?Math.ceil(b/ve)*ve:Math.floor(b/ve)*ve),Math.max(C,Math.min(T,b))},getSize:function(){return(!this._size||this._sizeChanged)&&(this._size=new j(this._container.clientWidth||0,this._container.clientHeight||0),this._sizeChanged=!1),this._size.clone()},getPixelBounds:function(l,d){var m=this._getTopLeftPoint(l,d);return new K(m,m.add(this.getSize()))},getPixelOrigin:function(){return this._checkIfLoaded(),this._pixelOrigin},getPixelWorldBounds:function(l){return this.options.crs.getProjectedBounds(l===void 0?this.getZoom():l)},getPane:function(l){return typeof l=="string"?this._panes[l]:l},getPanes:function(){return this._panes},getContainer:function(){return this._container},getZoomScale:function(l,d){var m=this.options.crs;return d=d===void 0?this._zoom:d,m.scale(l)/m.scale(d)},getScaleZoom:function(l,d){var m=this.options.crs;d=d===void 0?this._zoom:d;var b=m.zoom(l*m.scale(d));return isNaN(b)?1/0:b},project:function(l,d){return d=d===void 0?this._zoom:d,this.options.crs.latLngToPoint(ne(l),d)},unproject:function(l,d){return d=d===void 0?this._zoom:d,this.options.crs.pointToLatLng(F(l),d)},layerPointToLatLng:function(l){var d=F(l).add(this.getPixelOrigin());return this.unproject(d)},latLngToLayerPoint:function(l){var d=this.project(ne(l))._round();return d._subtract(this.getPixelOrigin())},wrapLatLng:function(l){return this.options.crs.wrapLatLng(ne(l))},wrapLatLngBounds:function(l){return this.options.crs.wrapLatLngBounds(ie(l))},distance:function(l,d){return this.options.crs.distance(ne(l),ne(d))},containerPointToLayerPoint:function(l){return F(l).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(l){return F(l).add(this._getMapPanePos())},containerPointToLatLng:function(l){var d=this.containerPointToLayerPoint(F(l));return this.layerPointToLatLng(d)},latLngToContainerPoint:function(l){return this.layerPointToContainerPoint(this.latLngToLayerPoint(ne(l)))},mouseEventToContainerPoint:function(l){return QO(l,this._container)},mouseEventToLayerPoint:function(l){return this.containerPointToLayerPoint(this.mouseEventToContainerPoint(l))},mouseEventToLatLng:function(l){return this.layerPointToLatLng(this.mouseEventToLayerPoint(l))},_initContainer:function(l){var d=this._container=vt(l);if(d){if(d._leaflet_id)throw new Error("Map container is already initialized.")}else throw new Error("Map container not found.");Ae(d,"scroll",this._onScroll,this),this._containerId=c(d)},_initLayout:function(){var l=this._container;this._fadeAnimated=this.options.fadeAnimation&&Oe.any3d,We(l,"leaflet-container"+(Oe.touch?" leaflet-touch":"")+(Oe.retina?" leaflet-retina":"")+(Oe.ielt9?" leaflet-oldie":"")+(Oe.safari?" leaflet-safari":"")+(this._fadeAnimated?" leaflet-fade-anim":""));var d=xn(l,"position");d!=="absolute"&&d!=="relative"&&d!=="fixed"&&d!=="sticky"&&(l.style.position="relative"),this._initPanes(),this._initControlPos&&this._initControlPos()},_initPanes:function(){var l=this._panes={};this._paneRenderers={},this._mapPane=this.createPane("mapPane",this._container),on(this._mapPane,new j(0,0)),this.createPane("tilePane"),this.createPane("overlayPane"),this.createPane("shadowPane"),this.createPane("markerPane"),this.createPane("tooltipPane"),this.createPane("popupPane"),this.options.markerZoomAnimation||(We(l.markerPane,"leaflet-zoom-hide"),We(l.shadowPane,"leaflet-zoom-hide"))},_resetView:function(l,d,m){on(this._mapPane,new j(0,0));var b=!this._loaded;this._loaded=!0,d=this._limitZoom(d),this.fire("viewprereset");var C=this._zoom!==d;this._moveStart(C,m)._move(l,d)._moveEnd(C),this.fire("viewreset"),b&&this.fire("load")},_moveStart:function(l,d){return l&&this.fire("zoomstart"),d||this.fire("movestart"),this},_move:function(l,d,m,b){d===void 0&&(d=this._zoom);var C=this._zoom!==d;return this._zoom=d,this._lastCenter=l,this._pixelOrigin=this._getNewPixelOrigin(l),b?m&&m.pinch&&this.fire("zoom",m):((C||m&&m.pinch)&&this.fire("zoom",m),this.fire("move",m)),this},_moveEnd:function(l){return l&&this.fire("zoomend"),this.fire("moveend")},_stop:function(){return X(this._flyToFrame),this._panAnim&&this._panAnim.stop(),this},_rawPanBy:function(l){on(this._mapPane,this._getMapPanePos().subtract(l))},_getZoomSpan:function(){return this.getMaxZoom()-this.getMinZoom()},_panInsideMaxBounds:function(){this._enforcingBounds||this.panInsideBounds(this.options.maxBounds)},_checkIfLoaded:function(){if(!this._loaded)throw new Error("Set map center and zoom first.")},_initEvents:function(l){this._targets={},this._targets[c(this._container)]=this;var d=l?Pt:Ae;d(this._container,"click dblclick mousedown mouseup mouseover mouseout mousemove contextmenu keypress keydown keyup",this._handleDOMEvent,this),this.options.trackResize&&d(window,"resize",this._onResize,this),Oe.any3d&&this.options.transform3DLimit&&(l?this.off:this.on).call(this,"moveend",this._onMoveEnd)},_onResize:function(){X(this._resizeRequest),this._resizeRequest=G(function(){this.invalidateSize({debounceMoveend:!0})},this)},_onScroll:function(){this._container.scrollTop=0,this._container.scrollLeft=0},_onMoveEnd:function(){var l=this._getMapPanePos();Math.max(Math.abs(l.x),Math.abs(l.y))>=this.options.transform3DLimit&&this._resetView(this.getCenter(),this.getZoom())},_findEventTargets:function(l,d){for(var m=[],b,C=d==="mouseout"||d==="mouseover",T=l.target||l.srcElement,A=!1;T;){if(b=this._targets[c(T)],b&&(d==="click"||d==="preclick")&&this._draggableMoved(b)){A=!0;break}if(b&&b.listens(d,!0)&&(C&&!z1(T,l)||(m.push(b),C))||T===this._container)break;T=T.parentNode}return!m.length&&!A&&!C&&this.listens(d,!0)&&(m=[this]),m},_isClickDisabled:function(l){for(;l&&l!==this._container;){if(l._leaflet_disable_click)return!0;l=l.parentNode}},_handleDOMEvent:function(l){var d=l.target||l.srcElement;if(!(!this._loaded||d._leaflet_disable_events||l.type==="click"&&this._isClickDisabled(d))){var m=l.type;m==="mousedown"&&T1(d),this._fireDOMEvent(l,m)}},_mouseEvents:["click","dblclick","mouseover","mouseout","contextmenu"],_fireDOMEvent:function(l,d,m){if(l.type==="click"){var b=o({},l);b.type="preclick",this._fireDOMEvent(b,b.type,m)}var C=this._findEventTargets(l,d);if(m){for(var T=[],A=0;A0?Math.round(l-d)/2:Math.max(0,Math.ceil(l))-Math.max(0,Math.floor(d))},_limitZoom:function(l){var d=this.getMinZoom(),m=this.getMaxZoom(),b=Oe.any3d?this.options.zoomSnap:1;return b&&(l=Math.round(l/b)*b),Math.max(d,Math.min(m,l))},_onPanTransitionStep:function(){this.fire("move")},_onPanTransitionEnd:function(){Xt(this._mapPane,"leaflet-pan-anim"),this.fire("moveend")},_tryAnimatedPan:function(l,d){var m=this._getCenterOffset(l)._trunc();return(d&&d.animate)!==!0&&!this.getSize().contains(m)?!1:(this.panBy(m,d),!0)},_createAnimProxy:function(){var l=this._proxy=Fe("div","leaflet-proxy leaflet-zoom-animated");this._panes.mapPane.appendChild(l),this.on("zoomanim",function(d){var m=Lu,b=this._proxy.style[m];Ha(this._proxy,this.project(d.center,d.zoom),this.getZoomScale(d.zoom,1)),b===this._proxy.style[m]&&this._animatingZoom&&this._onZoomTransitionEnd()},this),this.on("load moveend",this._animMoveEnd,this),this._on("unload",this._destroyAnimProxy,this)},_destroyAnimProxy:function(){ut(this._proxy),this.off("load moveend",this._animMoveEnd,this),delete this._proxy},_animMoveEnd:function(){var l=this.getCenter(),d=this.getZoom();Ha(this._proxy,this.project(l,d),this.getZoomScale(d,1))},_catchTransitionEnd:function(l){this._animatingZoom&&l.propertyName.indexOf("transform")>=0&&this._onZoomTransitionEnd()},_nothingToAnimate:function(){return!this._container.getElementsByClassName("leaflet-zoom-animated").length},_tryAnimatedZoom:function(l,d,m){if(this._animatingZoom)return!0;if(m=m||{},!this._zoomAnimated||m.animate===!1||this._nothingToAnimate()||Math.abs(d-this._zoom)>this.options.zoomAnimationThreshold)return!1;var b=this.getZoomScale(d),C=this._getCenterOffset(l)._divideBy(1-1/b);return m.animate!==!0&&!this.getSize().contains(C)?!1:(G(function(){this._moveStart(!0,m.noMoveStart||!1)._animateZoom(l,d,!0)},this),!0)},_animateZoom:function(l,d,m,b){this._mapPane&&(m&&(this._animatingZoom=!0,this._animateToCenter=l,this._animateToZoom=d,We(this._mapPane,"leaflet-zoom-anim")),this.fire("zoomanim",{center:l,zoom:d,noUpdate:b}),this._tempFireZoomEvent||(this._tempFireZoomEvent=this._zoom!==this._animateToZoom),this._move(this._animateToCenter,this._animateToZoom,void 0,!0),setTimeout(s(this._onZoomTransitionEnd,this),250))},_onZoomTransitionEnd:function(){this._animatingZoom&&(this._mapPane&&Xt(this._mapPane,"leaflet-zoom-anim"),this._animatingZoom=!1,this._move(this._animateToCenter,this._animateToZoom,void 0,!0),this._tempFireZoomEvent&&this.fire("zoom"),delete this._tempFireZoomEvent,this.fire("move"),this._moveEnd(!0))}});function VV(l,d){return new rt(l,d)}var Vo=V.extend({options:{position:"topright"},initialize:function(l){w(this,l)},getPosition:function(){return this.options.position},setPosition:function(l){var d=this._map;return d&&d.removeControl(this),this.options.position=l,d&&d.addControl(this),this},getContainer:function(){return this._container},addTo:function(l){this.remove(),this._map=l;var d=this._container=this.onAdd(l),m=this.getPosition(),b=l._controlCorners[m];return We(d,"leaflet-control"),m.indexOf("bottom")!==-1?b.insertBefore(d,b.firstChild):b.appendChild(d),this._map.on("unload",this.remove,this),this},remove:function(){return this._map?(ut(this._container),this.onRemove&&this.onRemove(this._map),this._map.off("unload",this.remove,this),this._map=null,this):this},_refocusOnMap:function(l){this._map&&l&&l.screenX>0&&l.screenY>0&&this._map.getContainer().focus()}}),Bu=function(l){return new Vo(l)};rt.include({addControl:function(l){return l.addTo(this),this},removeControl:function(l){return l.remove(),this},_initControlPos:function(){var l=this._controlCorners={},d="leaflet-",m=this._controlContainer=Fe("div",d+"control-container",this._container);function b(C,T){var A=d+C+" "+d+T;l[C+T]=Fe("div",A,m)}b("top","left"),b("top","right"),b("bottom","left"),b("bottom","right")},_clearControlPos:function(){for(var l in this._controlCorners)ut(this._controlCorners[l]);ut(this._controlContainer),delete this._controlCorners,delete this._controlContainer}});var nC=Vo.extend({options:{collapsed:!0,position:"topright",autoZIndex:!0,hideSingleBase:!1,sortLayers:!1,sortFunction:function(l,d,m,b){return m1,this._baseLayersList.style.display=l?"":"none"),this._separator.style.display=d&&l?"":"none",this},_onLayerChange:function(l){this._handlingClick||this._update();var d=this._getLayer(c(l.target)),m=d.overlay?l.type==="add"?"overlayadd":"overlayremove":l.type==="add"?"baselayerchange":null;m&&this._map.fire(m,d)},_createRadioElement:function(l,d){var m='",b=document.createElement("div");return b.innerHTML=m,b.firstChild},_addItem:function(l){var d=document.createElement("label"),m=this._map.hasLayer(l.layer),b;l.overlay?(b=document.createElement("input"),b.type="checkbox",b.className="leaflet-control-layers-selector",b.defaultChecked=m):b=this._createRadioElement("leaflet-base-layers_"+c(this),m),this._layerControlInputs.push(b),b.layerId=c(l.layer),Ae(b,"click",this._onInputClick,this);var C=document.createElement("span");C.innerHTML=" "+l.name;var T=document.createElement("span");d.appendChild(T),T.appendChild(b),T.appendChild(C);var A=l.overlay?this._overlaysList:this._baseLayersList;return A.appendChild(d),this._checkDisabledLayers(),d},_onInputClick:function(){if(!this._preventClick){var l=this._layerControlInputs,d,m,b=[],C=[];this._handlingClick=!0;for(var T=l.length-1;T>=0;T--)d=l[T],m=this._getLayer(d.layerId).layer,d.checked?b.push(m):d.checked||C.push(m);for(T=0;T=0;C--)d=l[C],m=this._getLayer(d.layerId).layer,d.disabled=m.options.minZoom!==void 0&&bm.options.maxZoom},_expandIfNotCollapsed:function(){return this._map&&!this.options.collapsed&&this.expand(),this},_expandSafely:function(){var l=this._section;this._preventClick=!0,Ae(l,"click",In),this.expand();var d=this;setTimeout(function(){Pt(l,"click",In),d._preventClick=!1})}}),HV=function(l,d,m){return new nC(l,d,m)},A1=Vo.extend({options:{position:"topleft",zoomInText:'',zoomInTitle:"Zoom in",zoomOutText:'',zoomOutTitle:"Zoom out"},onAdd:function(l){var d="leaflet-control-zoom",m=Fe("div",d+" leaflet-bar"),b=this.options;return this._zoomInButton=this._createButton(b.zoomInText,b.zoomInTitle,d+"-in",m,this._zoomIn),this._zoomOutButton=this._createButton(b.zoomOutText,b.zoomOutTitle,d+"-out",m,this._zoomOut),this._updateDisabled(),l.on("zoomend zoomlevelschange",this._updateDisabled,this),m},onRemove:function(l){l.off("zoomend zoomlevelschange",this._updateDisabled,this)},disable:function(){return this._disabled=!0,this._updateDisabled(),this},enable:function(){return this._disabled=!1,this._updateDisabled(),this},_zoomIn:function(l){!this._disabled&&this._map._zoomthis._map.getMinZoom()&&this._map.zoomOut(this._map.options.zoomDelta*(l.shiftKey?3:1))},_createButton:function(l,d,m,b,C){var T=Fe("a",m,b);return T.innerHTML=l,T.href="#",T.title=d,T.setAttribute("role","button"),T.setAttribute("aria-label",d),Au(T),Ae(T,"click",Za),Ae(T,"click",C,this),Ae(T,"click",this._refocusOnMap,this),T},_updateDisabled:function(){var l=this._map,d="leaflet-disabled";Xt(this._zoomInButton,d),Xt(this._zoomOutButton,d),this._zoomInButton.setAttribute("aria-disabled","false"),this._zoomOutButton.setAttribute("aria-disabled","false"),(this._disabled||l._zoom===l.getMinZoom())&&(We(this._zoomOutButton,d),this._zoomOutButton.setAttribute("aria-disabled","true")),(this._disabled||l._zoom===l.getMaxZoom())&&(We(this._zoomInButton,d),this._zoomInButton.setAttribute("aria-disabled","true"))}});rt.mergeOptions({zoomControl:!0}),rt.addInitHook(function(){this.options.zoomControl&&(this.zoomControl=new A1,this.addControl(this.zoomControl))});var WV=function(l){return new A1(l)},rC=Vo.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0},onAdd:function(l){var d="leaflet-control-scale",m=Fe("div",d),b=this.options;return this._addScales(b,d+"-line",m),l.on(b.updateWhenIdle?"moveend":"move",this._update,this),l.whenReady(this._update,this),m},onRemove:function(l){l.off(this.options.updateWhenIdle?"moveend":"move",this._update,this)},_addScales:function(l,d,m){l.metric&&(this._mScale=Fe("div",d,m)),l.imperial&&(this._iScale=Fe("div",d,m))},_update:function(){var l=this._map,d=l.getSize().y/2,m=l.distance(l.containerPointToLatLng([0,d]),l.containerPointToLatLng([this.options.maxWidth,d]));this._updateScales(m)},_updateScales:function(l){this.options.metric&&l&&this._updateMetric(l),this.options.imperial&&l&&this._updateImperial(l)},_updateMetric:function(l){var d=this._getRoundNum(l),m=d<1e3?d+" m":d/1e3+" km";this._updateScale(this._mScale,m,d/l)},_updateImperial:function(l){var d=l*3.2808399,m,b,C;d>5280?(m=d/5280,b=this._getRoundNum(m),this._updateScale(this._iScale,b+" mi",b/m)):(C=this._getRoundNum(d),this._updateScale(this._iScale,C+" ft",C/d))},_updateScale:function(l,d,m){l.style.width=Math.round(this.options.maxWidth*m)+"px",l.innerHTML=d},_getRoundNum:function(l){var d=Math.pow(10,(Math.floor(l)+"").length-1),m=l/d;return m=m>=10?10:m>=5?5:m>=3?3:m>=2?2:1,d*m}}),UV=function(l){return new rC(l)},ZV='',B1=Vo.extend({options:{position:"bottomright",prefix:''+(Oe.inlineSvg?ZV+" ":"")+"Leaflet"},initialize:function(l){w(this,l),this._attributions={}},onAdd:function(l){l.attributionControl=this,this._container=Fe("div","leaflet-control-attribution"),Au(this._container);for(var d in l._layers)l._layers[d].getAttribution&&this.addAttribution(l._layers[d].getAttribution());return this._update(),l.on("layeradd",this._addAttribution,this),this._container},onRemove:function(l){l.off("layeradd",this._addAttribution,this)},_addAttribution:function(l){l.layer.getAttribution&&(this.addAttribution(l.layer.getAttribution()),l.layer.once("remove",function(){this.removeAttribution(l.layer.getAttribution())},this))},setPrefix:function(l){return this.options.prefix=l,this._update(),this},addAttribution:function(l){return l?(this._attributions[l]||(this._attributions[l]=0),this._attributions[l]++,this._update(),this):this},removeAttribution:function(l){return l?(this._attributions[l]&&(this._attributions[l]--,this._update()),this):this},_update:function(){if(this._map){var l=[];for(var d in this._attributions)this._attributions[d]&&l.push(d);var m=[];this.options.prefix&&m.push(this.options.prefix),l.length&&m.push(l.join(", ")),this._container.innerHTML=m.join(' ')}}});rt.mergeOptions({attributionControl:!0}),rt.addInitHook(function(){this.options.attributionControl&&new B1().addTo(this)});var GV=function(l){return new B1(l)};Vo.Layers=nC,Vo.Zoom=A1,Vo.Scale=rC,Vo.Attribution=B1,Bu.layers=HV,Bu.zoom=WV,Bu.scale=UV,Bu.attribution=GV;var li=V.extend({initialize:function(l){this._map=l},enable:function(){return this._enabled?this:(this._enabled=!0,this.addHooks(),this)},disable:function(){return this._enabled?(this._enabled=!1,this.removeHooks(),this):this},enabled:function(){return!!this._enabled}});li.addTo=function(l,d){return l.addHandler(d,this),this};var YV={Events:Z},oC=Oe.touch?"touchstart mousedown":"mousedown",$s=Y.extend({options:{clickTolerance:3},initialize:function(l,d,m,b){w(this,b),this._element=l,this._dragStartTarget=d||l,this._preventOutline=m},enable:function(){this._enabled||(Ae(this._dragStartTarget,oC,this._onDown,this),this._enabled=!0)},disable:function(){this._enabled&&($s._dragging===this&&this.finishDrag(!0),Pt(this._dragStartTarget,oC,this._onDown,this),this._enabled=!1,this._moved=!1)},_onDown:function(l){if(this._enabled&&(this._moved=!1,!C1(this._element,"leaflet-zoom-anim"))){if(l.touches&&l.touches.length!==1){$s._dragging===this&&this.finishDrag();return}if(!($s._dragging||l.shiftKey||l.which!==1&&l.button!==1&&!l.touches)&&($s._dragging=this,this._preventOutline&&T1(this._element),$1(),Du(),!this._moving)){this.fire("down");var d=l.touches?l.touches[0]:l,m=qO(this._element);this._startPoint=new j(d.clientX,d.clientY),this._startPos=Wa(this._element),this._parentScale=I1(m);var b=l.type==="mousedown";Ae(document,b?"mousemove":"touchmove",this._onMove,this),Ae(document,b?"mouseup":"touchend touchcancel",this._onUp,this)}}},_onMove:function(l){if(this._enabled){if(l.touches&&l.touches.length>1){this._moved=!0;return}var d=l.touches&&l.touches.length===1?l.touches[0]:l,m=new j(d.clientX,d.clientY)._subtract(this._startPoint);!m.x&&!m.y||Math.abs(m.x)+Math.abs(m.y)T&&(A=q,T=te);T>m&&(d[A]=1,V1(l,d,m,b,A),V1(l,d,m,A,C))}function XV(l,d){for(var m=[l[0]],b=1,C=0,T=l.length;bd&&(m.push(l[b]),C=b);return Cd.max.x&&(m|=2),l.yd.max.y&&(m|=8),m}function QV(l,d){var m=d.x-l.x,b=d.y-l.y;return m*m+b*b}function Fu(l,d,m,b){var C=d.x,T=d.y,A=m.x-C,q=m.y-T,te=A*A+q*q,oe;return te>0&&(oe=((l.x-C)*A+(l.y-T)*q)/te,oe>1?(C=m.x,T=m.y):oe>0&&(C+=A*oe,T+=q*oe)),A=l.x-C,q=l.y-T,b?A*A+q*q:new j(C,T)}function Co(l){return!O(l[0])||typeof l[0][0]!="object"&&typeof l[0][0]<"u"}function dC(l){return console.warn("Deprecated use of _flat, please use L.LineUtil.isFlat instead."),Co(l)}function fC(l,d){var m,b,C,T,A,q,te,oe;if(!l||l.length===0)throw new Error("latlngs not passed");Co(l)||(console.warn("latlngs are not flat! Only the first ring will be used"),l=l[0]);var ve=ne([0,0]),Re=ie(l),Ke=Re.getNorthWest().distanceTo(Re.getSouthWest())*Re.getNorthEast().distanceTo(Re.getNorthWest());Ke<1700&&(ve=F1(l));var dr=l.length,Sn=[];for(m=0;mb){te=(T-b)/C,oe=[q.x-te*(q.x-A.x),q.y-te*(q.y-A.y)];break}var Tr=d.unproject(F(oe));return ne([Tr.lat+ve.lat,Tr.lng+ve.lng])}var eH={__proto__:null,simplify:aC,pointToSegmentDistance:lC,closestPointOnSegment:qV,clipSegment:uC,_getEdgeIntersection:sp,_getBitCode:Ga,_sqClosestPointOnSegment:Fu,isFlat:Co,_flat:dC,polylineCenter:fC},H1={project:function(l){return new j(l.lng,l.lat)},unproject:function(l){return new J(l.y,l.x)},bounds:new K([-180,-90],[180,90])},W1={R:6378137,R_MINOR:6356752314245179e-9,bounds:new K([-2003750834279e-5,-1549657073972e-5],[2003750834279e-5,1876465623138e-5]),project:function(l){var d=Math.PI/180,m=this.R,b=l.lat*d,C=this.R_MINOR/m,T=Math.sqrt(1-C*C),A=T*Math.sin(b),q=Math.tan(Math.PI/4-b/2)/Math.pow((1-A)/(1+A),T/2);return b=-m*Math.log(Math.max(q,1e-10)),new j(l.lng*d*m,b)},unproject:function(l){for(var d=180/Math.PI,m=this.R,b=this.R_MINOR/m,C=Math.sqrt(1-b*b),T=Math.exp(-l.y/m),A=Math.PI/2-2*Math.atan(T),q=0,te=.1,oe;q<15&&Math.abs(te)>1e-7;q++)oe=C*Math.sin(A),oe=Math.pow((1-oe)/(1+oe),C/2),te=Math.PI/2-2*Math.atan(T*oe)-A,A+=te;return new J(A*d,l.x*d/m)}},tH={__proto__:null,LonLat:H1,Mercator:W1,SphericalMercator:we},nH=o({},_e,{code:"EPSG:3395",projection:W1,transformation:function(){var l=.5/(Math.PI*W1.R);return Te(l,.5,-l,.5)}()}),pC=o({},_e,{code:"EPSG:4326",projection:H1,transformation:Te(1/180,1,-1/180,.5)}),rH=o({},le,{projection:H1,transformation:Te(1,0,-1,0),scale:function(l){return Math.pow(2,l)},zoom:function(l){return Math.log(l)/Math.LN2},distance:function(l,d){var m=d.lng-l.lng,b=d.lat-l.lat;return Math.sqrt(m*m+b*b)},infinite:!0});le.Earth=_e,le.EPSG3395=nH,le.EPSG3857=je,le.EPSG900913=it,le.EPSG4326=pC,le.Simple=rH;var Ho=Y.extend({options:{pane:"overlayPane",attribution:null,bubblingMouseEvents:!0},addTo:function(l){return l.addLayer(this),this},remove:function(){return this.removeFrom(this._map||this._mapToAdd)},removeFrom:function(l){return l&&l.removeLayer(this),this},getPane:function(l){return this._map.getPane(l?this.options[l]||l:this.options.pane)},addInteractiveTarget:function(l){return this._map._targets[c(l)]=this,this},removeInteractiveTarget:function(l){return delete this._map._targets[c(l)],this},getAttribution:function(){return this.options.attribution},_layerAdd:function(l){var d=l.target;if(d.hasLayer(this)){if(this._map=d,this._zoomAnimated=d._zoomAnimated,this.getEvents){var m=this.getEvents();d.on(m,this),this.once("remove",function(){d.off(m,this)},this)}this.onAdd(d),this.fire("add"),d.fire("layeradd",{layer:this})}}});rt.include({addLayer:function(l){if(!l._layerAdd)throw new Error("The provided object is not a Layer.");var d=c(l);return this._layers[d]?this:(this._layers[d]=l,l._mapToAdd=this,l.beforeAdd&&l.beforeAdd(this),this.whenReady(l._layerAdd,l),this)},removeLayer:function(l){var d=c(l);return this._layers[d]?(this._loaded&&l.onRemove(this),delete this._layers[d],this._loaded&&(this.fire("layerremove",{layer:l}),l.fire("remove")),l._map=l._mapToAdd=null,this):this},hasLayer:function(l){return c(l)in this._layers},eachLayer:function(l,d){for(var m in this._layers)l.call(d,this._layers[m]);return this},_addLayers:function(l){l=l?O(l)?l:[l]:[];for(var d=0,m=l.length;dthis._layersMaxZoom&&this.setZoom(this._layersMaxZoom),this.options.minZoom===void 0&&this._layersMinZoom&&this.getZoom()=2&&d[0]instanceof J&&d[0].equals(d[m-1])&&d.pop(),d},_setLatLngs:function(l){Gi.prototype._setLatLngs.call(this,l),Co(this._latlngs)&&(this._latlngs=[this._latlngs])},_defaultShape:function(){return Co(this._latlngs[0])?this._latlngs[0]:this._latlngs[0][0]},_clipPoints:function(){var l=this._renderer._bounds,d=this.options.weight,m=new j(d,d);if(l=new K(l.min.subtract(m),l.max.add(m)),this._parts=[],!(!this._pxBounds||!this._pxBounds.intersects(l))){if(this.options.noClip){this._parts=this._rings;return}for(var b=0,C=this._rings.length,T;bl.y!=C.y>l.y&&l.x<(C.x-b.x)*(l.y-b.y)/(C.y-b.y)+b.x&&(d=!d);return d||Gi.prototype._containsPoint.call(this,l,!0)}});function dH(l,d){return new Xl(l,d)}var Yi=Zi.extend({initialize:function(l,d){w(this,d),this._layers={},l&&this.addData(l)},addData:function(l){var d=O(l)?l:l.features,m,b,C;if(d){for(m=0,b=d.length;m0&&C.push(C[0].slice()),C}function Ql(l,d){return l.feature?o({},l.feature,{geometry:d}):fp(d)}function fp(l){return l.type==="Feature"||l.type==="FeatureCollection"?l:{type:"Feature",properties:{},geometry:l}}var Y1={toGeoJSON:function(l){return Ql(this,{type:"Point",coordinates:G1(this.getLatLng(),l)})}};ap.include(Y1),U1.include(Y1),lp.include(Y1),Gi.include({toGeoJSON:function(l){var d=!Co(this._latlngs),m=dp(this._latlngs,d?1:0,!1,l);return Ql(this,{type:(d?"Multi":"")+"LineString",coordinates:m})}}),Xl.include({toGeoJSON:function(l){var d=!Co(this._latlngs),m=d&&!Co(this._latlngs[0]),b=dp(this._latlngs,m?2:d?1:0,!0,l);return d||(b=[b]),Ql(this,{type:(m?"Multi":"")+"Polygon",coordinates:b})}}),ql.include({toMultiPoint:function(l){var d=[];return this.eachLayer(function(m){d.push(m.toGeoJSON(l).geometry.coordinates)}),Ql(this,{type:"MultiPoint",coordinates:d})},toGeoJSON:function(l){var d=this.feature&&this.feature.geometry&&this.feature.geometry.type;if(d==="MultiPoint")return this.toMultiPoint(l);var m=d==="GeometryCollection",b=[];return this.eachLayer(function(C){if(C.toGeoJSON){var T=C.toGeoJSON(l);if(m)b.push(T.geometry);else{var A=fp(T);A.type==="FeatureCollection"?b.push.apply(b,A.features):b.push(A)}}}),m?Ql(this,{geometries:b,type:"GeometryCollection"}):{type:"FeatureCollection",features:b}}});function gC(l,d){return new Yi(l,d)}var fH=gC,pp=Ho.extend({options:{opacity:1,alt:"",interactive:!1,crossOrigin:!1,errorOverlayUrl:"",zIndex:1,className:""},initialize:function(l,d,m){this._url=l,this._bounds=ie(d),w(this,m)},onAdd:function(){this._image||(this._initImage(),this.options.opacity<1&&this._updateOpacity()),this.options.interactive&&(We(this._image,"leaflet-interactive"),this.addInteractiveTarget(this._image)),this.getPane().appendChild(this._image),this._reset()},onRemove:function(){ut(this._image),this.options.interactive&&this.removeInteractiveTarget(this._image)},setOpacity:function(l){return this.options.opacity=l,this._image&&this._updateOpacity(),this},setStyle:function(l){return l.opacity&&this.setOpacity(l.opacity),this},bringToFront:function(){return this._map&&Po(this._image),this},bringToBack:function(){return this._map&&Nr(this._image),this},setUrl:function(l){return this._url=l,this._image&&(this._image.src=l),this},setBounds:function(l){return this._bounds=ie(l),this._map&&this._reset(),this},getEvents:function(){var l={zoom:this._reset,viewreset:this._reset};return this._zoomAnimated&&(l.zoomanim=this._animateZoom),l},setZIndex:function(l){return this.options.zIndex=l,this._updateZIndex(),this},getBounds:function(){return this._bounds},getElement:function(){return this._image},_initImage:function(){var l=this._url.tagName==="IMG",d=this._image=l?this._url:Fe("img");if(We(d,"leaflet-image-layer"),this._zoomAnimated&&We(d,"leaflet-zoom-animated"),this.options.className&&We(d,this.options.className),d.onselectstart=p,d.onmousemove=p,d.onload=s(this.fire,this,"load"),d.onerror=s(this._overlayOnError,this,"error"),(this.options.crossOrigin||this.options.crossOrigin==="")&&(d.crossOrigin=this.options.crossOrigin===!0?"":this.options.crossOrigin),this.options.zIndex&&this._updateZIndex(),l){this._url=d.src;return}d.src=this._url,d.alt=this.options.alt},_animateZoom:function(l){var d=this._map.getZoomScale(l.zoom),m=this._map._latLngBoundsToNewLayerBounds(this._bounds,l.zoom,l.center).min;Ha(this._image,m,d)},_reset:function(){var l=this._image,d=new K(this._map.latLngToLayerPoint(this._bounds.getNorthWest()),this._map.latLngToLayerPoint(this._bounds.getSouthEast())),m=d.getSize();on(l,d.min),l.style.width=m.x+"px",l.style.height=m.y+"px"},_updateOpacity:function(){Oo(this._image,this.options.opacity)},_updateZIndex:function(){this._image&&this.options.zIndex!==void 0&&this.options.zIndex!==null&&(this._image.style.zIndex=this.options.zIndex)},_overlayOnError:function(){this.fire("error");var l=this.options.errorOverlayUrl;l&&this._url!==l&&(this._url=l,this._image.src=l)},getCenter:function(){return this._bounds.getCenter()}}),pH=function(l,d,m){return new pp(l,d,m)},vC=pp.extend({options:{autoplay:!0,loop:!0,keepAspectRatio:!0,muted:!1,playsInline:!0},_initImage:function(){var l=this._url.tagName==="VIDEO",d=this._image=l?this._url:Fe("video");if(We(d,"leaflet-image-layer"),this._zoomAnimated&&We(d,"leaflet-zoom-animated"),this.options.className&&We(d,this.options.className),d.onselectstart=p,d.onmousemove=p,d.onloadeddata=s(this.fire,this,"load"),l){for(var m=d.getElementsByTagName("source"),b=[],C=0;C0?b:[d.src];return}O(this._url)||(this._url=[this._url]),!this.options.keepAspectRatio&&Object.prototype.hasOwnProperty.call(d.style,"objectFit")&&(d.style.objectFit="fill"),d.autoplay=!!this.options.autoplay,d.loop=!!this.options.loop,d.muted=!!this.options.muted,d.playsInline=!!this.options.playsInline;for(var T=0;TC?(d.height=C+"px",We(l,T)):Xt(l,T),this._containerWidth=this._container.offsetWidth},_animateZoom:function(l){var d=this._map._latLngToNewLayerPoint(this._latlng,l.zoom,l.center),m=this._getAnchor();on(this._container,d.add(m))},_adjustPan:function(){if(this.options.autoPan){if(this._map._panAnim&&this._map._panAnim.stop(),this._autopanning){this._autopanning=!1;return}var l=this._map,d=parseInt(xn(this._container,"marginBottom"),10)||0,m=this._container.offsetHeight+d,b=this._containerWidth,C=new j(this._containerLeft,-m-this._containerBottom);C._add(Wa(this._container));var T=l.layerPointToContainerPoint(C),A=F(this.options.autoPanPadding),q=F(this.options.autoPanPaddingTopLeft||A),te=F(this.options.autoPanPaddingBottomRight||A),oe=l.getSize(),ve=0,Re=0;T.x+b+te.x>oe.x&&(ve=T.x+b-oe.x+te.x),T.x-ve-q.x<0&&(ve=T.x-q.x),T.y+m+te.y>oe.y&&(Re=T.y+m-oe.y+te.y),T.y-Re-q.y<0&&(Re=T.y-q.y),(ve||Re)&&(this.options.keepInView&&(this._autopanning=!0),l.fire("autopanstart").panBy([ve,Re]))}},_getAnchor:function(){return F(this._source&&this._source._getPopupAnchor?this._source._getPopupAnchor():[0,0])}}),gH=function(l,d){return new hp(l,d)};rt.mergeOptions({closePopupOnClick:!0}),rt.include({openPopup:function(l,d,m){return this._initOverlay(hp,l,d,m).openOn(this),this},closePopup:function(l){return l=arguments.length?l:this._popup,l&&l.close(),this}}),Ho.include({bindPopup:function(l,d){return this._popup=this._initOverlay(hp,this._popup,l,d),this._popupHandlersAdded||(this.on({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!0),this},unbindPopup:function(){return this._popup&&(this.off({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!1,this._popup=null),this},openPopup:function(l){return this._popup&&(this instanceof Zi||(this._popup._source=this),this._popup._prepareOpen(l||this._latlng)&&this._popup.openOn(this._map)),this},closePopup:function(){return this._popup&&this._popup.close(),this},togglePopup:function(){return this._popup&&this._popup.toggle(this),this},isPopupOpen:function(){return this._popup?this._popup.isOpen():!1},setPopupContent:function(l){return this._popup&&this._popup.setContent(l),this},getPopup:function(){return this._popup},_openPopup:function(l){if(!(!this._popup||!this._map)){Za(l);var d=l.layer||l.target;if(this._popup._source===d&&!(d instanceof Ms)){this._map.hasLayer(this._popup)?this.closePopup():this.openPopup(l.latlng);return}this._popup._source=d,this.openPopup(l.latlng)}},_movePopup:function(l){this._popup.setLatLng(l.latlng)},_onKeyPress:function(l){l.originalEvent.keyCode===13&&this._openPopup(l)}});var mp=ci.extend({options:{pane:"tooltipPane",offset:[0,0],direction:"auto",permanent:!1,sticky:!1,opacity:.9},onAdd:function(l){ci.prototype.onAdd.call(this,l),this.setOpacity(this.options.opacity),l.fire("tooltipopen",{tooltip:this}),this._source&&(this.addEventParent(this._source),this._source.fire("tooltipopen",{tooltip:this},!0))},onRemove:function(l){ci.prototype.onRemove.call(this,l),l.fire("tooltipclose",{tooltip:this}),this._source&&(this.removeEventParent(this._source),this._source.fire("tooltipclose",{tooltip:this},!0))},getEvents:function(){var l=ci.prototype.getEvents.call(this);return this.options.permanent||(l.preclick=this.close),l},_initLayout:function(){var l="leaflet-tooltip",d=l+" "+(this.options.className||"")+" leaflet-zoom-"+(this._zoomAnimated?"animated":"hide");this._contentNode=this._container=Fe("div",d),this._container.setAttribute("role","tooltip"),this._container.setAttribute("id","leaflet-tooltip-"+c(this))},_updateLayout:function(){},_adjustPan:function(){},_setPosition:function(l){var d,m,b=this._map,C=this._container,T=b.latLngToContainerPoint(b.getCenter()),A=b.layerPointToContainerPoint(l),q=this.options.direction,te=C.offsetWidth,oe=C.offsetHeight,ve=F(this.options.offset),Re=this._getAnchor();q==="top"?(d=te/2,m=oe):q==="bottom"?(d=te/2,m=0):q==="center"?(d=te/2,m=oe/2):q==="right"?(d=0,m=oe/2):q==="left"?(d=te,m=oe/2):A.xthis.options.maxZoom||mb?this._retainParent(C,T,A,b):!1)},_retainChildren:function(l,d,m,b){for(var C=2*l;C<2*l+2;C++)for(var T=2*d;T<2*d+2;T++){var A=new j(C,T);A.z=m+1;var q=this._tileCoordsToKey(A),te=this._tiles[q];if(te&&te.active){te.retain=!0;continue}else te&&te.loaded&&(te.retain=!0);m+1this.options.maxZoom||this.options.minZoom!==void 0&&C1){this._setView(l,m);return}for(var Re=C.min.y;Re<=C.max.y;Re++)for(var Ke=C.min.x;Ke<=C.max.x;Ke++){var dr=new j(Ke,Re);if(dr.z=this._tileZoom,!!this._isValidTile(dr)){var Sn=this._tiles[this._tileCoordsToKey(dr)];Sn?Sn.current=!0:A.push(dr)}}if(A.sort(function(Tr,tc){return Tr.distanceTo(T)-tc.distanceTo(T)}),A.length!==0){this._loading||(this._loading=!0,this.fire("loading"));var ko=document.createDocumentFragment();for(Ke=0;Kem.max.x)||!d.wrapLat&&(l.ym.max.y))return!1}if(!this.options.bounds)return!0;var b=this._tileCoordsToBounds(l);return ie(this.options.bounds).overlaps(b)},_keyToBounds:function(l){return this._tileCoordsToBounds(this._keyToTileCoords(l))},_tileCoordsToNwSe:function(l){var d=this._map,m=this.getTileSize(),b=l.scaleBy(m),C=b.add(m),T=d.unproject(b,l.z),A=d.unproject(C,l.z);return[T,A]},_tileCoordsToBounds:function(l){var d=this._tileCoordsToNwSe(l),m=new fe(d[0],d[1]);return this.options.noWrap||(m=this._map.wrapLatLngBounds(m)),m},_tileCoordsToKey:function(l){return l.x+":"+l.y+":"+l.z},_keyToTileCoords:function(l){var d=l.split(":"),m=new j(+d[0],+d[1]);return m.z=+d[2],m},_removeTile:function(l){var d=this._tiles[l];d&&(ut(d.el),delete this._tiles[l],this.fire("tileunload",{tile:d.el,coords:this._keyToTileCoords(l)}))},_initTile:function(l){We(l,"leaflet-tile");var d=this.getTileSize();l.style.width=d.x+"px",l.style.height=d.y+"px",l.onselectstart=p,l.onmousemove=p,Oe.ielt9&&this.options.opacity<1&&Oo(l,this.options.opacity)},_addTile:function(l,d){var m=this._getTilePos(l),b=this._tileCoordsToKey(l),C=this.createTile(this._wrapCoords(l),s(this._tileReady,this,l));this._initTile(C),this.createTile.length<2&&G(s(this._tileReady,this,l,null,C)),on(C,m),this._tiles[b]={el:C,coords:l,current:!0},d.appendChild(C),this.fire("tileloadstart",{tile:C,coords:l})},_tileReady:function(l,d,m){d&&this.fire("tileerror",{error:d,tile:m,coords:l});var b=this._tileCoordsToKey(l);m=this._tiles[b],m&&(m.loaded=+new Date,this._map._fadeAnimated?(Oo(m.el,0),X(this._fadeFrame),this._fadeFrame=G(this._updateOpacity,this)):(m.active=!0,this._pruneTiles()),d||(We(m.el,"leaflet-tile-loaded"),this.fire("tileload",{tile:m.el,coords:l})),this._noTilesToLoad()&&(this._loading=!1,this.fire("load"),Oe.ielt9||!this._map._fadeAnimated?G(this._pruneTiles,this):setTimeout(s(this._pruneTiles,this),250)))},_getTilePos:function(l){return l.scaleBy(this.getTileSize()).subtract(this._level.origin)},_wrapCoords:function(l){var d=new j(this._wrapX?f(l.x,this._wrapX):l.x,this._wrapY?f(l.y,this._wrapY):l.y);return d.z=l.z,d},_pxBoundsToTileRange:function(l){var d=this.getTileSize();return new K(l.min.unscaleBy(d).floor(),l.max.unscaleBy(d).ceil().subtract([1,1]))},_noTilesToLoad:function(){for(var l in this._tiles)if(!this._tiles[l].loaded)return!1;return!0}});function _H(l){return new Hu(l)}var ec=Hu.extend({options:{minZoom:0,maxZoom:18,subdomains:"abc",errorTileUrl:"",zoomOffset:0,tms:!1,zoomReverse:!1,detectRetina:!1,crossOrigin:!1,referrerPolicy:!1},initialize:function(l,d){this._url=l,d=w(this,d),d.detectRetina&&Oe.retina&&d.maxZoom>0?(d.tileSize=Math.floor(d.tileSize/2),d.zoomReverse?(d.zoomOffset--,d.minZoom=Math.min(d.maxZoom,d.minZoom+1)):(d.zoomOffset++,d.maxZoom=Math.max(d.minZoom,d.maxZoom-1)),d.minZoom=Math.max(0,d.minZoom)):d.zoomReverse?d.minZoom=Math.min(d.maxZoom,d.minZoom):d.maxZoom=Math.max(d.minZoom,d.maxZoom),typeof d.subdomains=="string"&&(d.subdomains=d.subdomains.split("")),this.on("tileunload",this._onTileRemove)},setUrl:function(l,d){return this._url===l&&d===void 0&&(d=!0),this._url=l,d||this.redraw(),this},createTile:function(l,d){var m=document.createElement("img");return Ae(m,"load",s(this._tileOnLoad,this,d,m)),Ae(m,"error",s(this._tileOnError,this,d,m)),(this.options.crossOrigin||this.options.crossOrigin==="")&&(m.crossOrigin=this.options.crossOrigin===!0?"":this.options.crossOrigin),typeof this.options.referrerPolicy=="string"&&(m.referrerPolicy=this.options.referrerPolicy),m.alt="",m.src=this.getTileUrl(l),m},getTileUrl:function(l){var d={r:Oe.retina?"@2x":"",s:this._getSubdomain(l),x:l.x,y:l.y,z:this._getZoomForUrl()};if(this._map&&!this._map.options.crs.infinite){var m=this._globalTileRange.max.y-l.y;this.options.tms&&(d.y=m),d["-y"]=m}return S(this._url,o(d,this.options))},_tileOnLoad:function(l,d){Oe.ielt9?setTimeout(s(l,this,null,d),0):l(null,d)},_tileOnError:function(l,d,m){var b=this.options.errorTileUrl;b&&d.getAttribute("src")!==b&&(d.src=b),l(m,d)},_onTileRemove:function(l){l.tile.onload=null},_getZoomForUrl:function(){var l=this._tileZoom,d=this.options.maxZoom,m=this.options.zoomReverse,b=this.options.zoomOffset;return m&&(l=d-l),l+b},_getSubdomain:function(l){var d=Math.abs(l.x+l.y)%this.options.subdomains.length;return this.options.subdomains[d]},_abortLoading:function(){var l,d;for(l in this._tiles)if(this._tiles[l].coords.z!==this._tileZoom&&(d=this._tiles[l].el,d.onload=p,d.onerror=p,!d.complete)){d.src=$;var m=this._tiles[l].coords;ut(d),delete this._tiles[l],this.fire("tileabort",{tile:d,coords:m})}},_removeTile:function(l){var d=this._tiles[l];if(d)return d.el.setAttribute("src",$),Hu.prototype._removeTile.call(this,l)},_tileReady:function(l,d,m){if(!(!this._map||m&&m.getAttribute("src")===$))return Hu.prototype._tileReady.call(this,l,d,m)}});function wC(l,d){return new ec(l,d)}var bC=ec.extend({defaultWmsParams:{service:"WMS",request:"GetMap",layers:"",styles:"",format:"image/jpeg",transparent:!1,version:"1.1.1"},options:{crs:null,uppercase:!1},initialize:function(l,d){this._url=l;var m=o({},this.defaultWmsParams);for(var b in d)b in this.options||(m[b]=d[b]);d=w(this,d);var C=d.detectRetina&&Oe.retina?2:1,T=this.getTileSize();m.width=T.x*C,m.height=T.y*C,this.wmsParams=m},onAdd:function(l){this._crs=this.options.crs||l.options.crs,this._wmsVersion=parseFloat(this.wmsParams.version);var d=this._wmsVersion>=1.3?"crs":"srs";this.wmsParams[d]=this._crs.code,ec.prototype.onAdd.call(this,l)},getTileUrl:function(l){var d=this._tileCoordsToNwSe(l),m=this._crs,b=ee(m.project(d[0]),m.project(d[1])),C=b.min,T=b.max,A=(this._wmsVersion>=1.3&&this._crs===pC?[C.y,C.x,T.y,T.x]:[C.x,C.y,T.x,T.y]).join(","),q=ec.prototype.getTileUrl.call(this,l);return q+P(this.wmsParams,q,this.options.uppercase)+(this.options.uppercase?"&BBOX=":"&bbox=")+A},setParams:function(l,d){return o(this.wmsParams,l),d||this.redraw(),this}});function wH(l,d){return new bC(l,d)}ec.WMS=bC,wC.wms=wH;var Ki=Ho.extend({options:{padding:.1},initialize:function(l){w(this,l),c(this),this._layers=this._layers||{}},onAdd:function(){this._container||(this._initContainer(),We(this._container,"leaflet-zoom-animated")),this.getPane().appendChild(this._container),this._update(),this.on("update",this._updatePaths,this)},onRemove:function(){this.off("update",this._updatePaths,this),this._destroyContainer()},getEvents:function(){var l={viewreset:this._reset,zoom:this._onZoom,moveend:this._update,zoomend:this._onZoomEnd};return this._zoomAnimated&&(l.zoomanim=this._onAnimZoom),l},_onAnimZoom:function(l){this._updateTransform(l.center,l.zoom)},_onZoom:function(){this._updateTransform(this._map.getCenter(),this._map.getZoom())},_updateTransform:function(l,d){var m=this._map.getZoomScale(d,this._zoom),b=this._map.getSize().multiplyBy(.5+this.options.padding),C=this._map.project(this._center,d),T=b.multiplyBy(-m).add(C).subtract(this._map._getNewPixelOrigin(l,d));Oe.any3d?Ha(this._container,T,m):on(this._container,T)},_reset:function(){this._update(),this._updateTransform(this._center,this._zoom);for(var l in this._layers)this._layers[l]._reset()},_onZoomEnd:function(){for(var l in this._layers)this._layers[l]._project()},_updatePaths:function(){for(var l in this._layers)this._layers[l]._update()},_update:function(){var l=this.options.padding,d=this._map.getSize(),m=this._map.containerPointToLayerPoint(d.multiplyBy(-l)).round();this._bounds=new K(m,m.add(d.multiplyBy(1+l*2)).round()),this._center=this._map.getCenter(),this._zoom=this._map.getZoom()}}),xC=Ki.extend({options:{tolerance:0},getEvents:function(){var l=Ki.prototype.getEvents.call(this);return l.viewprereset=this._onViewPreReset,l},_onViewPreReset:function(){this._postponeUpdatePaths=!0},onAdd:function(){Ki.prototype.onAdd.call(this),this._draw()},_initContainer:function(){var l=this._container=document.createElement("canvas");Ae(l,"mousemove",this._onMouseMove,this),Ae(l,"click dblclick mousedown mouseup contextmenu",this._onClick,this),Ae(l,"mouseout",this._handleMouseOut,this),l._leaflet_disable_events=!0,this._ctx=l.getContext("2d")},_destroyContainer:function(){X(this._redrawRequest),delete this._ctx,ut(this._container),Pt(this._container),delete this._container},_updatePaths:function(){if(!this._postponeUpdatePaths){var l;this._redrawBounds=null;for(var d in this._layers)l=this._layers[d],l._update();this._redraw()}},_update:function(){if(!(this._map._animatingZoom&&this._bounds)){Ki.prototype._update.call(this);var l=this._bounds,d=this._container,m=l.getSize(),b=Oe.retina?2:1;on(d,l.min),d.width=b*m.x,d.height=b*m.y,d.style.width=m.x+"px",d.style.height=m.y+"px",Oe.retina&&this._ctx.scale(2,2),this._ctx.translate(-l.min.x,-l.min.y),this.fire("update")}},_reset:function(){Ki.prototype._reset.call(this),this._postponeUpdatePaths&&(this._postponeUpdatePaths=!1,this._updatePaths())},_initPath:function(l){this._updateDashArray(l),this._layers[c(l)]=l;var d=l._order={layer:l,prev:this._drawLast,next:null};this._drawLast&&(this._drawLast.next=d),this._drawLast=d,this._drawFirst=this._drawFirst||this._drawLast},_addPath:function(l){this._requestRedraw(l)},_removePath:function(l){var d=l._order,m=d.next,b=d.prev;m?m.prev=b:this._drawLast=b,b?b.next=m:this._drawFirst=m,delete l._order,delete this._layers[c(l)],this._requestRedraw(l)},_updatePath:function(l){this._extendRedrawBounds(l),l._project(),l._update(),this._requestRedraw(l)},_updateStyle:function(l){this._updateDashArray(l),this._requestRedraw(l)},_updateDashArray:function(l){if(typeof l.options.dashArray=="string"){var d=l.options.dashArray.split(/[, ]+/),m=[],b,C;for(C=0;C')}}catch{}return function(l){return document.createElement("<"+l+' xmlns="urn:schemas-microsoft.com:vml" class="lvml">')}}(),bH={_initContainer:function(){this._container=Fe("div","leaflet-vml-container")},_update:function(){this._map._animatingZoom||(Ki.prototype._update.call(this),this.fire("update"))},_initPath:function(l){var d=l._container=Wu("shape");We(d,"leaflet-vml-shape "+(this.options.className||"")),d.coordsize="1 1",l._path=Wu("path"),d.appendChild(l._path),this._updateStyle(l),this._layers[c(l)]=l},_addPath:function(l){var d=l._container;this._container.appendChild(d),l.options.interactive&&l.addInteractiveTarget(d)},_removePath:function(l){var d=l._container;ut(d),l.removeInteractiveTarget(d),delete this._layers[c(l)]},_updateStyle:function(l){var d=l._stroke,m=l._fill,b=l.options,C=l._container;C.stroked=!!b.stroke,C.filled=!!b.fill,b.stroke?(d||(d=l._stroke=Wu("stroke")),C.appendChild(d),d.weight=b.weight+"px",d.color=b.color,d.opacity=b.opacity,b.dashArray?d.dashStyle=O(b.dashArray)?b.dashArray.join(" "):b.dashArray.replace(/( *, *)/g," "):d.dashStyle="",d.endcap=b.lineCap.replace("butt","flat"),d.joinstyle=b.lineJoin):d&&(C.removeChild(d),l._stroke=null),b.fill?(m||(m=l._fill=Wu("fill")),C.appendChild(m),m.color=b.fillColor||b.color,m.opacity=b.fillOpacity):m&&(C.removeChild(m),l._fill=null)},_updateCircle:function(l){var d=l._point.round(),m=Math.round(l._radius),b=Math.round(l._radiusY||m);this._setPath(l,l._empty()?"M0 0":"AL "+d.x+","+d.y+" "+m+","+b+" 0,"+65535*360)},_setPath:function(l,d){l._path.v=d},_bringToFront:function(l){Po(l._container)},_bringToBack:function(l){Nr(l._container)}},gp=Oe.vml?Wu:bt,Uu=Ki.extend({_initContainer:function(){this._container=gp("svg"),this._container.setAttribute("pointer-events","none"),this._rootGroup=gp("g"),this._container.appendChild(this._rootGroup)},_destroyContainer:function(){ut(this._container),Pt(this._container),delete this._container,delete this._rootGroup,delete this._svgSize},_update:function(){if(!(this._map._animatingZoom&&this._bounds)){Ki.prototype._update.call(this);var l=this._bounds,d=l.getSize(),m=this._container;(!this._svgSize||!this._svgSize.equals(d))&&(this._svgSize=d,m.setAttribute("width",d.x),m.setAttribute("height",d.y)),on(m,l.min),m.setAttribute("viewBox",[l.min.x,l.min.y,d.x,d.y].join(" ")),this.fire("update")}},_initPath:function(l){var d=l._path=gp("path");l.options.className&&We(d,l.options.className),l.options.interactive&&We(d,"leaflet-interactive"),this._updateStyle(l),this._layers[c(l)]=l},_addPath:function(l){this._rootGroup||this._initContainer(),this._rootGroup.appendChild(l._path),l.addInteractiveTarget(l._path)},_removePath:function(l){ut(l._path),l.removeInteractiveTarget(l._path),delete this._layers[c(l)]},_updatePath:function(l){l._project(),l._update()},_updateStyle:function(l){var d=l._path,m=l.options;d&&(m.stroke?(d.setAttribute("stroke",m.color),d.setAttribute("stroke-opacity",m.opacity),d.setAttribute("stroke-width",m.weight),d.setAttribute("stroke-linecap",m.lineCap),d.setAttribute("stroke-linejoin",m.lineJoin),m.dashArray?d.setAttribute("stroke-dasharray",m.dashArray):d.removeAttribute("stroke-dasharray"),m.dashOffset?d.setAttribute("stroke-dashoffset",m.dashOffset):d.removeAttribute("stroke-dashoffset")):d.setAttribute("stroke","none"),m.fill?(d.setAttribute("fill",m.fillColor||m.color),d.setAttribute("fill-opacity",m.fillOpacity),d.setAttribute("fill-rule",m.fillRule||"evenodd")):d.setAttribute("fill","none"))},_updatePoly:function(l,d){this._setPath(l,_n(l._parts,d))},_updateCircle:function(l){var d=l._point,m=Math.max(Math.round(l._radius),1),b=Math.max(Math.round(l._radiusY),1)||m,C="a"+m+","+b+" 0 1,0 ",T=l._empty()?"M0 0":"M"+(d.x-m)+","+d.y+C+m*2+",0 "+C+-m*2+",0 ";this._setPath(l,T)},_setPath:function(l,d){l._path.setAttribute("d",d)},_bringToFront:function(l){Po(l._path)},_bringToBack:function(l){Nr(l._path)}});Oe.vml&&Uu.include(bH);function PC(l){return Oe.svg||Oe.vml?new Uu(l):null}rt.include({getRenderer:function(l){var d=l.options.renderer||this._getPaneRenderer(l.options.pane)||this.options.renderer||this._renderer;return d||(d=this._renderer=this._createRenderer()),this.hasLayer(d)||this.addLayer(d),d},_getPaneRenderer:function(l){if(l==="overlayPane"||l===void 0)return!1;var d=this._paneRenderers[l];return d===void 0&&(d=this._createRenderer({pane:l}),this._paneRenderers[l]=d),d},_createRenderer:function(l){return this.options.preferCanvas&&SC(l)||PC(l)}});var OC=Xl.extend({initialize:function(l,d){Xl.prototype.initialize.call(this,this._boundsToLatLngs(l),d)},setBounds:function(l){return this.setLatLngs(this._boundsToLatLngs(l))},_boundsToLatLngs:function(l){return l=ie(l),[l.getSouthWest(),l.getNorthWest(),l.getNorthEast(),l.getSouthEast()]}});function xH(l,d){return new OC(l,d)}Uu.create=gp,Uu.pointsToPath=_n,Yi.geometryToLayer=cp,Yi.coordsToLatLng=Z1,Yi.coordsToLatLngs=up,Yi.latLngToCoords=G1,Yi.latLngsToCoords=dp,Yi.getFeature=Ql,Yi.asFeature=fp,rt.mergeOptions({boxZoom:!0});var CC=li.extend({initialize:function(l){this._map=l,this._container=l._container,this._pane=l._panes.overlayPane,this._resetStateTimeout=0,l.on("unload",this._destroy,this)},addHooks:function(){Ae(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){Pt(this._container,"mousedown",this._onMouseDown,this)},moved:function(){return this._moved},_destroy:function(){ut(this._pane),delete this._pane},_resetState:function(){this._resetStateTimeout=0,this._moved=!1},_clearDeferredResetState:function(){this._resetStateTimeout!==0&&(clearTimeout(this._resetStateTimeout),this._resetStateTimeout=0)},_onMouseDown:function(l){if(!l.shiftKey||l.which!==1&&l.button!==1)return!1;this._clearDeferredResetState(),this._resetState(),Du(),$1(),this._startPoint=this._map.mouseEventToContainerPoint(l),Ae(document,{contextmenu:Za,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseMove:function(l){this._moved||(this._moved=!0,this._box=Fe("div","leaflet-zoom-box",this._container),We(this._container,"leaflet-crosshair"),this._map.fire("boxzoomstart")),this._point=this._map.mouseEventToContainerPoint(l);var d=new K(this._point,this._startPoint),m=d.getSize();on(this._box,d.min),this._box.style.width=m.x+"px",this._box.style.height=m.y+"px"},_finish:function(){this._moved&&(ut(this._box),Xt(this._container,"leaflet-crosshair")),Ru(),M1(),Pt(document,{contextmenu:Za,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseUp:function(l){if(!(l.which!==1&&l.button!==1)&&(this._finish(),!!this._moved)){this._clearDeferredResetState(),this._resetStateTimeout=setTimeout(s(this._resetState,this),0);var d=new fe(this._map.containerPointToLatLng(this._startPoint),this._map.containerPointToLatLng(this._point));this._map.fitBounds(d).fire("boxzoomend",{boxZoomBounds:d})}},_onKeyDown:function(l){l.keyCode===27&&(this._finish(),this._clearDeferredResetState(),this._resetState())}});rt.addInitHook("addHandler","boxZoom",CC),rt.mergeOptions({doubleClickZoom:!0});var kC=li.extend({addHooks:function(){this._map.on("dblclick",this._onDoubleClick,this)},removeHooks:function(){this._map.off("dblclick",this._onDoubleClick,this)},_onDoubleClick:function(l){var d=this._map,m=d.getZoom(),b=d.options.zoomDelta,C=l.originalEvent.shiftKey?m-b:m+b;d.options.doubleClickZoom==="center"?d.setZoom(C):d.setZoomAround(l.containerPoint,C)}});rt.addInitHook("addHandler","doubleClickZoom",kC),rt.mergeOptions({dragging:!0,inertia:!0,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,easeLinearity:.2,worldCopyJump:!1,maxBoundsViscosity:0});var EC=li.extend({addHooks:function(){if(!this._draggable){var l=this._map;this._draggable=new $s(l._mapPane,l._container),this._draggable.on({dragstart:this._onDragStart,drag:this._onDrag,dragend:this._onDragEnd},this),this._draggable.on("predrag",this._onPreDragLimit,this),l.options.worldCopyJump&&(this._draggable.on("predrag",this._onPreDragWrap,this),l.on("zoomend",this._onZoomEnd,this),l.whenReady(this._onZoomEnd,this))}We(this._map._container,"leaflet-grab leaflet-touch-drag"),this._draggable.enable(),this._positions=[],this._times=[]},removeHooks:function(){Xt(this._map._container,"leaflet-grab"),Xt(this._map._container,"leaflet-touch-drag"),this._draggable.disable()},moved:function(){return this._draggable&&this._draggable._moved},moving:function(){return this._draggable&&this._draggable._moving},_onDragStart:function(){var l=this._map;if(l._stop(),this._map.options.maxBounds&&this._map.options.maxBoundsViscosity){var d=ie(this._map.options.maxBounds);this._offsetLimit=ee(this._map.latLngToContainerPoint(d.getNorthWest()).multiplyBy(-1),this._map.latLngToContainerPoint(d.getSouthEast()).multiplyBy(-1).add(this._map.getSize())),this._viscosity=Math.min(1,Math.max(0,this._map.options.maxBoundsViscosity))}else this._offsetLimit=null;l.fire("movestart").fire("dragstart"),l.options.inertia&&(this._positions=[],this._times=[])},_onDrag:function(l){if(this._map.options.inertia){var d=this._lastTime=+new Date,m=this._lastPos=this._draggable._absPos||this._draggable._newPos;this._positions.push(m),this._times.push(d),this._prunePositions(d)}this._map.fire("move",l).fire("drag",l)},_prunePositions:function(l){for(;this._positions.length>1&&l-this._times[0]>50;)this._positions.shift(),this._times.shift()},_onZoomEnd:function(){var l=this._map.getSize().divideBy(2),d=this._map.latLngToLayerPoint([0,0]);this._initialWorldOffset=d.subtract(l).x,this._worldWidth=this._map.getPixelWorldBounds().getSize().x},_viscousLimit:function(l,d){return l-(l-d)*this._viscosity},_onPreDragLimit:function(){if(!(!this._viscosity||!this._offsetLimit)){var l=this._draggable._newPos.subtract(this._draggable._startPos),d=this._offsetLimit;l.xd.max.x&&(l.x=this._viscousLimit(l.x,d.max.x)),l.y>d.max.y&&(l.y=this._viscousLimit(l.y,d.max.y)),this._draggable._newPos=this._draggable._startPos.add(l)}},_onPreDragWrap:function(){var l=this._worldWidth,d=Math.round(l/2),m=this._initialWorldOffset,b=this._draggable._newPos.x,C=(b-d+m)%l+d-m,T=(b+d+m)%l-d-m,A=Math.abs(C+m)0?T:-T))-d;this._delta=0,this._startTime=null,A&&(l.options.scrollWheelZoom==="center"?l.setZoom(d+A):l.setZoomAround(this._lastMousePos,d+A))}});rt.addInitHook("addHandler","scrollWheelZoom",MC);var SH=600;rt.mergeOptions({tapHold:Oe.touchNative&&Oe.safari&&Oe.mobile,tapTolerance:15});var NC=li.extend({addHooks:function(){Ae(this._map._container,"touchstart",this._onDown,this)},removeHooks:function(){Pt(this._map._container,"touchstart",this._onDown,this)},_onDown:function(l){if(clearTimeout(this._holdTimeout),l.touches.length===1){var d=l.touches[0];this._startPos=this._newPos=new j(d.clientX,d.clientY),this._holdTimeout=setTimeout(s(function(){this._cancel(),this._isTapValid()&&(Ae(document,"touchend",In),Ae(document,"touchend touchcancel",this._cancelClickPrevent),this._simulateEvent("contextmenu",d))},this),SH),Ae(document,"touchend touchcancel contextmenu",this._cancel,this),Ae(document,"touchmove",this._onMove,this)}},_cancelClickPrevent:function l(){Pt(document,"touchend",In),Pt(document,"touchend touchcancel",l)},_cancel:function(){clearTimeout(this._holdTimeout),Pt(document,"touchend touchcancel contextmenu",this._cancel,this),Pt(document,"touchmove",this._onMove,this)},_onMove:function(l){var d=l.touches[0];this._newPos=new j(d.clientX,d.clientY)},_isTapValid:function(){return this._newPos.distanceTo(this._startPos)<=this._map.options.tapTolerance},_simulateEvent:function(l,d){var m=new MouseEvent(l,{bubbles:!0,cancelable:!0,view:window,screenX:d.screenX,screenY:d.screenY,clientX:d.clientX,clientY:d.clientY});m._simulated=!0,d.target.dispatchEvent(m)}});rt.addInitHook("addHandler","tapHold",NC),rt.mergeOptions({touchZoom:Oe.touch,bounceAtZoomLimits:!0});var TC=li.extend({addHooks:function(){We(this._map._container,"leaflet-touch-zoom"),Ae(this._map._container,"touchstart",this._onTouchStart,this)},removeHooks:function(){Xt(this._map._container,"leaflet-touch-zoom"),Pt(this._map._container,"touchstart",this._onTouchStart,this)},_onTouchStart:function(l){var d=this._map;if(!(!l.touches||l.touches.length!==2||d._animatingZoom||this._zooming)){var m=d.mouseEventToContainerPoint(l.touches[0]),b=d.mouseEventToContainerPoint(l.touches[1]);this._centerPoint=d.getSize()._divideBy(2),this._startLatLng=d.containerPointToLatLng(this._centerPoint),d.options.touchZoom!=="center"&&(this._pinchStartLatLng=d.containerPointToLatLng(m.add(b)._divideBy(2))),this._startDist=m.distanceTo(b),this._startZoom=d.getZoom(),this._moved=!1,this._zooming=!0,d._stop(),Ae(document,"touchmove",this._onTouchMove,this),Ae(document,"touchend touchcancel",this._onTouchEnd,this),In(l)}},_onTouchMove:function(l){if(!(!l.touches||l.touches.length!==2||!this._zooming)){var d=this._map,m=d.mouseEventToContainerPoint(l.touches[0]),b=d.mouseEventToContainerPoint(l.touches[1]),C=m.distanceTo(b)/this._startDist;if(this._zoom=d.getScaleZoom(C,this._startZoom),!d.options.bounceAtZoomLimits&&(this._zoomd.getMaxZoom()&&C>1)&&(this._zoom=d._limitZoom(this._zoom)),d.options.touchZoom==="center"){if(this._center=this._startLatLng,C===1)return}else{var T=m._add(b)._divideBy(2)._subtract(this._centerPoint);if(C===1&&T.x===0&&T.y===0)return;this._center=d.unproject(d.project(this._pinchStartLatLng,this._zoom).subtract(T),this._zoom)}this._moved||(d._moveStart(!0,!1),this._moved=!0),X(this._animRequest);var A=s(d._move,d,this._center,this._zoom,{pinch:!0,round:!1},void 0);this._animRequest=G(A,this,!0),In(l)}},_onTouchEnd:function(){if(!this._moved||!this._zooming){this._zooming=!1;return}this._zooming=!1,X(this._animRequest),Pt(document,"touchmove",this._onTouchMove,this),Pt(document,"touchend touchcancel",this._onTouchEnd,this),this._map.options.zoomAnimation?this._map._animateZoom(this._center,this._map._limitZoom(this._zoom),!0,this._map.options.zoomSnap):this._map._resetView(this._center,this._map._limitZoom(this._zoom))}});rt.addInitHook("addHandler","touchZoom",TC),rt.BoxZoom=CC,rt.DoubleClickZoom=kC,rt.Drag=EC,rt.Keyboard=$C,rt.ScrollWheelZoom=MC,rt.TapHold=NC,rt.TouchZoom=TC,n.Bounds=K,n.Browser=Oe,n.CRS=le,n.Canvas=xC,n.Circle=U1,n.CircleMarker=lp,n.Class=V,n.Control=Vo,n.DivIcon=_C,n.DivOverlay=ci,n.DomEvent=FV,n.DomUtil=AV,n.Draggable=$s,n.Evented=Y,n.FeatureGroup=Zi,n.GeoJSON=Yi,n.GridLayer=Hu,n.Handler=li,n.Icon=Jl,n.ImageOverlay=pp,n.LatLng=J,n.LatLngBounds=fe,n.Layer=Ho,n.LayerGroup=ql,n.LineUtil=eH,n.Map=rt,n.Marker=ap,n.Mixin=YV,n.Path=Ms,n.Point=j,n.PolyUtil=KV,n.Polygon=Xl,n.Polyline=Gi,n.Popup=hp,n.PosAnimation=tC,n.Projection=tH,n.Rectangle=OC,n.Renderer=Ki,n.SVG=Uu,n.SVGOverlay=yC,n.TileLayer=ec,n.Tooltip=mp,n.Transformation=He,n.Util=Q,n.VideoOverlay=vC,n.bind=s,n.bounds=ee,n.canvas=SC,n.circle=cH,n.circleMarker=lH,n.control=Bu,n.divIcon=yH,n.extend=o,n.featureGroup=iH,n.geoJSON=gC,n.geoJson=fH,n.gridLayer=_H,n.icon=sH,n.imageOverlay=pH,n.latLng=ne,n.latLngBounds=ie,n.layerGroup=oH,n.map=VV,n.marker=aH,n.point=F,n.polygon=dH,n.polyline=uH,n.popup=gH,n.rectangle=xH,n.setOptions=w,n.stamp=c,n.svg=PC,n.svgOverlay=mH,n.tileLayer=wC,n.tooltip=vH,n.transformation=Te,n.version=r,n.videoOverlay=hH;var PH=window.L;n.noConflict=function(){return window.L=PH,this},window.L=n})})(Rx,Rx.exports);var l1=Rx.exports;const bi=Ea(l1);function gF(e,t){const n=_.useRef(t);_.useEffect(function(){t!==n.current&&e.attributionControl!=null&&(n.current!=null&&e.attributionControl.removeAttribution(n.current),t!=null&&e.attributionControl.addAttribution(t)),n.current=t},[e,t])}const p$e=1;function h$e(e){return Object.freeze({__version:p$e,map:e})}function m$e(e,t){return Object.freeze({...e,...t})}const vF=_.createContext(null),yF=vF.Provider;function EO(){const e=_.useContext(vF);if(e==null)throw new Error("No context provided: useLeafletContext() can only be used in a descendant of ");return e}function g$e(e){function t(n,r){const{instance:o,context:i}=e(n).current;return _.useImperativeHandle(r,()=>o),n.children==null?null:k.createElement(yF,{value:i},n.children)}return _.forwardRef(t)}function v$e(e){function t(n,r){const[o,i]=_.useState(!1),{instance:s}=e(n,i).current;_.useImperativeHandle(r,()=>s),_.useEffect(function(){o&&s.update()},[s,o,n.children]);const a=s._contentNode;return a?xs.createPortal(n.children,a):null}return _.forwardRef(t)}function _F(e,t){const n=_.useRef();_.useEffect(function(){return t!=null&&e.instance.on(t),n.current=t,function(){n.current!=null&&e.instance.off(n.current),n.current=null}},[e,t])}function wF(e,t){const n=e.pane??t.pane;return n?{...e,pane:n}:e}function y$e(e,t){return function(r,o){const i=EO(),s=e(wF(r,i),i);return gF(i.map,r.attribution),_F(s.current,r.eventHandlers),t(s.current,i,r,o),s}}function bF(e,t,n){return Object.freeze({instance:e,context:t,container:n})}function xF(e,t){return t==null?function(r,o){const i=_.useRef();return i.current||(i.current=e(r,o)),i}:function(r,o){const i=_.useRef();i.current||(i.current=e(r,o));const s=_.useRef(r),{instance:a}=i.current;return _.useEffect(function(){s.current!==r&&(t(a,r,s.current),s.current=r)},[a,r,o]),i}}function _$e(e,t){_.useEffect(function(){return(t.layerContainer??t.map).addLayer(e.instance),function(){t.layerContainer?.removeLayer(e.instance),t.map.removeLayer(e.instance)}},[t,e])}function w$e(e){return function(n){const r=EO(),o=e(wF(n,r),r);return gF(r.map,n.attribution),_F(o.current,n.eventHandlers),_$e(o.current,r),o}}function b$e(e,t){const n=xF(e,t),r=w$e(n);return g$e(r)}function x$e(e,t){const n=xF(e),r=y$e(n,t);return v$e(r)}function S$e(){return EO().map}function zx(){return zx=Object.assign||function(e){for(var t=1;tv?.map??null,[v]);const w=_.useCallback(x=>{if(x!==null&&v===null){const S=new l1.Map(x,f);n!=null&&u!=null?S.setView(n,u):e!=null&&S.fitBounds(e,t),c!=null&&S.whenReady(c),y(h$e(S))}},[]);_.useEffect(()=>()=>{v?.map.remove()},[v]);const P=v?k.createElement(yF,{value:v},r):s??null;return k.createElement("div",zx({},g,{ref:w}),P)}const O$e=_.forwardRef(P$e),SF=b$e(function({position:t,...n},r){const o=new l1.Marker(t,n);return bF(o,m$e(r,{overlayContainer:o}))},function(t,n,r){n.position!==r.position&&t.setLatLng(n.position),n.icon!=null&&n.icon!==r.icon&&t.setIcon(n.icon),n.zIndexOffset!=null&&n.zIndexOffset!==r.zIndexOffset&&t.setZIndexOffset(n.zIndexOffset),n.opacity!=null&&n.opacity!==r.opacity&&t.setOpacity(n.opacity),t.dragging!=null&&n.draggable!==r.draggable&&(n.draggable===!0?t.dragging.enable():t.dragging.disable())}),C$e=x$e(function(t,n){const r=new l1.Popup(t,n.overlayContainer);return bF(r,n)},function(t,n,{position:r},o){_.useEffect(function(){const{instance:s}=t;function a(u){u.popup===s&&(s.update(),o(!0))}function c(u){u.popup===s&&o(!1)}return n.map.on({popupopen:a,popupclose:c}),n.overlayContainer==null?(r!=null&&s.setLatLng(r),s.openOn(n.map)):n.overlayContainer.bindPopup(s),function(){n.map.off({popupopen:a,popupclose:c}),n.overlayContainer?.unbindPopup(),n.map.removeLayer(s)}},[t,n,o,r])}),k$e=e=>{const t=S$e(),n=bi.tileLayer(`https://s.rsg.sc/sc/images/games/GTAV/map/${e.mapLayer}/{z}/{x}/{y}.jpg`,{maxZoom:7,minZoom:2,bounds:bi.latLngBounds(bi.latLng(0,128),bi.latLng(-192,0))}),r=bi.latLngBounds(bi.latLng(0,128),bi.latLng(-192,0));return t.setMaxBounds(r),t.attributionControl.setPrefix(!1),t.setView([0,0],2),t.addLayer(n),null};var Iu={};/** + */(function(e,t){(function(n,r){r(t)})(Kx,function(n){var r="1.9.4";function o(l){var d,m,b,C;for(m=1,b=arguments.length;m"u"||!L||!L.Mixin)){l=O(l)?l:[l];for(var d=0;d0?Math.floor(l):Math.ceil(l)};j.prototype={clone:function(){return new j(this.x,this.y)},add:function(l){return this.clone()._add(F(l))},_add:function(l){return this.x+=l.x,this.y+=l.y,this},subtract:function(l){return this.clone()._subtract(F(l))},_subtract:function(l){return this.x-=l.x,this.y-=l.y,this},divideBy:function(l){return this.clone()._divideBy(l)},_divideBy:function(l){return this.x/=l,this.y/=l,this},multiplyBy:function(l){return this.clone()._multiplyBy(l)},_multiplyBy:function(l){return this.x*=l,this.y*=l,this},scaleBy:function(l){return new j(this.x*l.x,this.y*l.y)},unscaleBy:function(l){return new j(this.x/l.x,this.y/l.y)},round:function(){return this.clone()._round()},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this},floor:function(){return this.clone()._floor()},_floor:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this},ceil:function(){return this.clone()._ceil()},_ceil:function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this},trunc:function(){return this.clone()._trunc()},_trunc:function(){return this.x=U(this.x),this.y=U(this.y),this},distanceTo:function(l){l=F(l);var d=l.x-this.x,m=l.y-this.y;return Math.sqrt(d*d+m*m)},equals:function(l){return l=F(l),l.x===this.x&&l.y===this.y},contains:function(l){return l=F(l),Math.abs(l.x)<=Math.abs(this.x)&&Math.abs(l.y)<=Math.abs(this.y)},toString:function(){return"Point("+g(this.x)+", "+g(this.y)+")"}};function F(l,d,m){return l instanceof j?l:O(l)?new j(l[0],l[1]):l==null?l:typeof l=="object"&&"x"in l&&"y"in l?new j(l.x,l.y):new j(l,d,m)}function K(l,d){if(l)for(var m=d?[l,d]:l,b=0,C=m.length;b=this.min.x&&m.x<=this.max.x&&d.y>=this.min.y&&m.y<=this.max.y},intersects:function(l){l=ee(l);var d=this.min,m=this.max,b=l.min,C=l.max,T=C.x>=d.x&&b.x<=m.x,A=C.y>=d.y&&b.y<=m.y;return T&&A},overlaps:function(l){l=ee(l);var d=this.min,m=this.max,b=l.min,C=l.max,T=C.x>d.x&&b.xd.y&&b.y=d.lat&&C.lat<=m.lat&&b.lng>=d.lng&&C.lng<=m.lng},intersects:function(l){l=ie(l);var d=this._southWest,m=this._northEast,b=l.getSouthWest(),C=l.getNorthEast(),T=C.lat>=d.lat&&b.lat<=m.lat,A=C.lng>=d.lng&&b.lng<=m.lng;return T&&A},overlaps:function(l){l=ie(l);var d=this._southWest,m=this._northEast,b=l.getSouthWest(),C=l.getNorthEast(),T=C.lat>d.lat&&b.latd.lng&&b.lng1,Gt=function(){var l=!1;try{var d=Object.defineProperty({},"passive",{get:function(){l=!0}});window.addEventListener("testPassiveEventSupport",p,d),window.removeEventListener("testPassiveEventSupport",p,d)}catch{}return l}(),Xr=function(){return!!document.createElement("canvas").getContext}(),So=!!(document.createElementNS&&bt("svg").createSVGRect),lr=!!So&&function(){var l=document.createElement("div");return l.innerHTML="",(l.firstChild&&l.firstChild.namespaceURI)==="http://www.w3.org/2000/svg"}(),cr=!So&&function(){try{var l=document.createElement("div");l.innerHTML='';var d=l.firstChild;return d.style.behavior="url(#default#VML)",d&&typeof d.adj=="object"}catch{return!1}}(),Hi=navigator.platform.indexOf("Mac")===0,Es=navigator.platform.indexOf("Linux")===0;function ur(l){return navigator.userAgent.toLowerCase().indexOf(l)>=0}var Oe={ie:Tn,ielt9:kr,edge:lt,webkit:Zn,android:Jt,android23:ht,androidStock:Yr,opera:ar,chrome:Kr,gecko:Bt,safari:qr,phantom:fn,opera12:wn,win:Er,ie3d:gt,webkit3d:be,gecko3d:De,any3d:Jr,mobile:Rt,mobileWebkit:Zt,mobileWebkit3d:$r,msPointer:xt,pointer:tn,touch:Aa,touchNative:Gn,mobileOpera:Yn,mobileGecko:bn,retina:Ft,passiveEvents:Gt,canvas:Xr,svg:So,vml:cr,inlineSvg:lr,mac:Hi,linux:Es},Ba=Oe.msPointer?"MSPointerDown":"pointerdown",Yl=Oe.msPointer?"MSPointerMove":"pointermove",Fa=Oe.msPointer?"MSPointerUp":"pointerup",Se=Oe.msPointer?"MSPointerCancel":"pointercancel",ct={touchstart:Ba,touchmove:Yl,touchend:Fa,touchcancel:Se},nn={touchstart:Kl,touchmove:Va,touchend:Va,touchcancel:Va},ze={},Wi=!1;function Qr(l,d,m){return d==="touchstart"&&Ui(),nn[d]?(m=nn[d].bind(this,m),l.addEventListener(ct[d],m,!1),m):(console.warn("wrong event specified:",d),p)}function tp(l,d,m){if(!ct[d]){console.warn("wrong event specified:",d);return}l.removeEventListener(ct[d],m,!1)}function w1(l){ze[l.pointerId]=l}function b1(l){ze[l.pointerId]&&(ze[l.pointerId]=l)}function rn(l){delete ze[l.pointerId]}function Ui(){Wi||(document.addEventListener(Ba,w1,!0),document.addEventListener(Yl,b1,!0),document.addEventListener(Fa,rn,!0),document.addEventListener(Se,rn,!0),Wi=!0)}function Va(l,d){if(d.pointerType!==(d.MSPOINTER_TYPE_MOUSE||"mouse")){d.touches=[];for(var m in ze)d.touches.push(ze[m]);d.changedTouches=[d],l(d)}}function Kl(l,d){d.MSPOINTER_TYPE_TOUCH&&d.pointerType===d.MSPOINTER_TYPE_TOUCH&&In(d),Va(l,d)}function x1(l){var d={},m,b;for(b in l)m=l[b],d[b]=m&&m.bind?m.bind(l):m;return l=d,d.type="dblclick",d.detail=2,d.isTrusted=!1,d._simulated=!0,d}var S1=200;function P1(l,d){l.addEventListener("dblclick",d);var m=0,b;function C(T){if(T.detail!==1){b=T.detail;return}if(!(T.pointerType==="mouse"||T.sourceCapabilities&&!T.sourceCapabilities.firesTouchEvents)){var A=XO(T);if(!(A.some(function(te){return te instanceof HTMLLabelElement&&te.attributes.for})&&!A.some(function(te){return te instanceof HTMLInputElement||te instanceof HTMLSelectElement}))){var q=Date.now();q-m<=S1?(b++,b===2&&d(x1(T))):b=1,m=q}}}return l.addEventListener("click",C),{dblclick:d,simDblclick:C}}function O1(l,d){l.removeEventListener("dblclick",d.dblclick),l.removeEventListener("click",d.simDblclick)}var Lu=rp(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),si=rp(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),Ie=si==="webkitTransition"||si==="OTransition"?si+"End":"transitionend";function vt(l){return typeof l=="string"?document.getElementById(l):l}function xn(l,d){var m=l.style[d]||l.currentStyle&&l.currentStyle[d];if((!m||m==="auto")&&document.defaultView){var b=document.defaultView.getComputedStyle(l,null);m=b?b[d]:null}return m==="auto"?null:m}function Fe(l,d,m){var b=document.createElement(l);return b.className=d||"",m&&m.appendChild(b),b}function ut(l){var d=l.parentNode;d&&d.removeChild(l)}function Mr(l){for(;l.firstChild;)l.removeChild(l.firstChild)}function Po(l){var d=l.parentNode;d&&d.lastChild!==l&&d.appendChild(l)}function Nr(l){var d=l.parentNode;d&&d.firstChild!==l&&d.insertBefore(l,d.firstChild)}function C1(l,d){if(l.classList!==void 0)return l.classList.contains(d);var m=np(l);return m.length>0&&new RegExp("(^|\\s)"+d+"(\\s|$)").test(m)}function We(l,d){if(l.classList!==void 0)for(var m=y(d),b=0,C=m.length;b0?2*window.devicePixelRatio:1;function eC(l){return Oe.edge?l.wheelDeltaY/2:l.deltaY&&l.deltaMode===0?-l.deltaY/BV:l.deltaY&&l.deltaMode===1?-l.deltaY*20:l.deltaY&&l.deltaMode===2?-l.deltaY*60:l.deltaX||l.deltaZ?0:l.wheelDelta?(l.wheelDeltaY||l.wheelDelta)/2:l.detail&&Math.abs(l.detail)<32765?-l.detail*20:l.detail?l.detail/-32765*60:0}function z1(l,d){var m=d.relatedTarget;if(!m)return!0;try{for(;m&&m!==l;)m=m.parentNode}catch{return!1}return m!==l}var FV={__proto__:null,on:Ae,off:Pt,stopPropagation:Ua,disableScrollPropagation:R1,disableClickPropagation:Au,preventDefault:In,stop:Za,getPropagationPath:XO,getMousePosition:QO,getWheelDelta:eC,isExternalTarget:z1,addListener:Ae,removeListener:Pt},tC=Y.extend({run:function(l,d,m,b){this.stop(),this._el=l,this._inProgress=!0,this._duration=m||.25,this._easeOutPower=1/Math.max(b||.5,.2),this._startPos=Wa(l),this._offset=d.subtract(this._startPos),this._startTime=+new Date,this.fire("start"),this._animate()},stop:function(){this._inProgress&&(this._step(!0),this._complete())},_animate:function(){this._animId=G(this._animate,this),this._step()},_step:function(l){var d=+new Date-this._startTime,m=this._duration*1e3;dthis.options.maxZoom)?this.setZoom(l):this},panInsideBounds:function(l,d){this._enforcingBounds=!0;var m=this.getCenter(),b=this._limitCenter(m,this._zoom,ie(l));return m.equals(b)||this.panTo(b,d),this._enforcingBounds=!1,this},panInside:function(l,d){d=d||{};var m=F(d.paddingTopLeft||d.padding||[0,0]),b=F(d.paddingBottomRight||d.padding||[0,0]),C=this.project(this.getCenter()),T=this.project(l),A=this.getPixelBounds(),q=ee([A.min.add(m),A.max.subtract(b)]),te=q.getSize();if(!q.contains(T)){this._enforcingBounds=!0;var oe=T.subtract(q.getCenter()),ve=q.extend(T).getSize().subtract(te);C.x+=oe.x<0?-ve.x:ve.x,C.y+=oe.y<0?-ve.y:ve.y,this.panTo(this.unproject(C),d),this._enforcingBounds=!1}return this},invalidateSize:function(l){if(!this._loaded)return this;l=o({animate:!1,pan:!0},l===!0?{animate:!0}:l);var d=this.getSize();this._sizeChanged=!0,this._lastCenter=null;var m=this.getSize(),b=d.divideBy(2).round(),C=m.divideBy(2).round(),T=b.subtract(C);return!T.x&&!T.y?this:(l.animate&&l.pan?this.panBy(T):(l.pan&&this._rawPanBy(T),this.fire("move"),l.debounceMoveend?(clearTimeout(this._sizeTimer),this._sizeTimer=setTimeout(s(this.fire,this,"moveend"),200)):this.fire("moveend")),this.fire("resize",{oldSize:d,newSize:m}))},stop:function(){return this.setZoom(this._limitZoom(this._zoom)),this.options.zoomSnap||this.fire("viewreset"),this._stop()},locate:function(l){if(l=this._locateOptions=o({timeout:1e4,watch:!1},l),!("geolocation"in navigator))return this._handleGeolocationError({code:0,message:"Geolocation not supported."}),this;var d=s(this._handleGeolocationResponse,this),m=s(this._handleGeolocationError,this);return l.watch?this._locationWatchId=navigator.geolocation.watchPosition(d,m,l):navigator.geolocation.getCurrentPosition(d,m,l),this},stopLocate:function(){return navigator.geolocation&&navigator.geolocation.clearWatch&&navigator.geolocation.clearWatch(this._locationWatchId),this._locateOptions&&(this._locateOptions.setView=!1),this},_handleGeolocationError:function(l){if(this._container._leaflet_id){var d=l.code,m=l.message||(d===1?"permission denied":d===2?"position unavailable":"timeout");this._locateOptions.setView&&!this._loaded&&this.fitWorld(),this.fire("locationerror",{code:d,message:"Geolocation error: "+m+"."})}},_handleGeolocationResponse:function(l){if(this._container._leaflet_id){var d=l.coords.latitude,m=l.coords.longitude,b=new J(d,m),C=b.toBounds(l.coords.accuracy*2),T=this._locateOptions;if(T.setView){var A=this.getBoundsZoom(C);this.setView(b,T.maxZoom?Math.min(A,T.maxZoom):A)}var q={latlng:b,bounds:C,timestamp:l.timestamp};for(var te in l.coords)typeof l.coords[te]=="number"&&(q[te]=l.coords[te]);this.fire("locationfound",q)}},addHandler:function(l,d){if(!d)return this;var m=this[l]=new d(this);return this._handlers.push(m),this.options[l]&&m.enable(),this},remove:function(){if(this._initEvents(!0),this.options.maxBounds&&this.off("moveend",this._panInsideMaxBounds),this._containerId!==this._container._leaflet_id)throw new Error("Map container is being reused by another instance");try{delete this._container._leaflet_id,delete this._containerId}catch{this._container._leaflet_id=void 0,this._containerId=void 0}this._locationWatchId!==void 0&&this.stopLocate(),this._stop(),ut(this._mapPane),this._clearControlPos&&this._clearControlPos(),this._resizeRequest&&(X(this._resizeRequest),this._resizeRequest=null),this._clearHandlers(),this._loaded&&this.fire("unload");var l;for(l in this._layers)this._layers[l].remove();for(l in this._panes)ut(this._panes[l]);return this._layers=[],this._panes=[],delete this._mapPane,delete this._renderer,this},createPane:function(l,d){var m="leaflet-pane"+(l?" leaflet-"+l.replace("Pane","")+"-pane":""),b=Fe("div",m,d||this._mapPane);return l&&(this._panes[l]=b),b},getCenter:function(){return this._checkIfLoaded(),this._lastCenter&&!this._moved()?this._lastCenter.clone():this.layerPointToLatLng(this._getCenterLayerPoint())},getZoom:function(){return this._zoom},getBounds:function(){var l=this.getPixelBounds(),d=this.unproject(l.getBottomLeft()),m=this.unproject(l.getTopRight());return new fe(d,m)},getMinZoom:function(){return this.options.minZoom===void 0?this._layersMinZoom||0:this.options.minZoom},getMaxZoom:function(){return this.options.maxZoom===void 0?this._layersMaxZoom===void 0?1/0:this._layersMaxZoom:this.options.maxZoom},getBoundsZoom:function(l,d,m){l=ie(l),m=F(m||[0,0]);var b=this.getZoom()||0,C=this.getMinZoom(),T=this.getMaxZoom(),A=l.getNorthWest(),q=l.getSouthEast(),te=this.getSize().subtract(m),oe=ee(this.project(q,b),this.project(A,b)).getSize(),ve=Oe.any3d?this.options.zoomSnap:1,Re=te.x/oe.x,Ke=te.y/oe.y,dr=d?Math.max(Re,Ke):Math.min(Re,Ke);return b=this.getScaleZoom(dr,b),ve&&(b=Math.round(b/(ve/100))*(ve/100),b=d?Math.ceil(b/ve)*ve:Math.floor(b/ve)*ve),Math.max(C,Math.min(T,b))},getSize:function(){return(!this._size||this._sizeChanged)&&(this._size=new j(this._container.clientWidth||0,this._container.clientHeight||0),this._sizeChanged=!1),this._size.clone()},getPixelBounds:function(l,d){var m=this._getTopLeftPoint(l,d);return new K(m,m.add(this.getSize()))},getPixelOrigin:function(){return this._checkIfLoaded(),this._pixelOrigin},getPixelWorldBounds:function(l){return this.options.crs.getProjectedBounds(l===void 0?this.getZoom():l)},getPane:function(l){return typeof l=="string"?this._panes[l]:l},getPanes:function(){return this._panes},getContainer:function(){return this._container},getZoomScale:function(l,d){var m=this.options.crs;return d=d===void 0?this._zoom:d,m.scale(l)/m.scale(d)},getScaleZoom:function(l,d){var m=this.options.crs;d=d===void 0?this._zoom:d;var b=m.zoom(l*m.scale(d));return isNaN(b)?1/0:b},project:function(l,d){return d=d===void 0?this._zoom:d,this.options.crs.latLngToPoint(ne(l),d)},unproject:function(l,d){return d=d===void 0?this._zoom:d,this.options.crs.pointToLatLng(F(l),d)},layerPointToLatLng:function(l){var d=F(l).add(this.getPixelOrigin());return this.unproject(d)},latLngToLayerPoint:function(l){var d=this.project(ne(l))._round();return d._subtract(this.getPixelOrigin())},wrapLatLng:function(l){return this.options.crs.wrapLatLng(ne(l))},wrapLatLngBounds:function(l){return this.options.crs.wrapLatLngBounds(ie(l))},distance:function(l,d){return this.options.crs.distance(ne(l),ne(d))},containerPointToLayerPoint:function(l){return F(l).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(l){return F(l).add(this._getMapPanePos())},containerPointToLatLng:function(l){var d=this.containerPointToLayerPoint(F(l));return this.layerPointToLatLng(d)},latLngToContainerPoint:function(l){return this.layerPointToContainerPoint(this.latLngToLayerPoint(ne(l)))},mouseEventToContainerPoint:function(l){return QO(l,this._container)},mouseEventToLayerPoint:function(l){return this.containerPointToLayerPoint(this.mouseEventToContainerPoint(l))},mouseEventToLatLng:function(l){return this.layerPointToLatLng(this.mouseEventToLayerPoint(l))},_initContainer:function(l){var d=this._container=vt(l);if(d){if(d._leaflet_id)throw new Error("Map container is already initialized.")}else throw new Error("Map container not found.");Ae(d,"scroll",this._onScroll,this),this._containerId=c(d)},_initLayout:function(){var l=this._container;this._fadeAnimated=this.options.fadeAnimation&&Oe.any3d,We(l,"leaflet-container"+(Oe.touch?" leaflet-touch":"")+(Oe.retina?" leaflet-retina":"")+(Oe.ielt9?" leaflet-oldie":"")+(Oe.safari?" leaflet-safari":"")+(this._fadeAnimated?" leaflet-fade-anim":""));var d=xn(l,"position");d!=="absolute"&&d!=="relative"&&d!=="fixed"&&d!=="sticky"&&(l.style.position="relative"),this._initPanes(),this._initControlPos&&this._initControlPos()},_initPanes:function(){var l=this._panes={};this._paneRenderers={},this._mapPane=this.createPane("mapPane",this._container),on(this._mapPane,new j(0,0)),this.createPane("tilePane"),this.createPane("overlayPane"),this.createPane("shadowPane"),this.createPane("markerPane"),this.createPane("tooltipPane"),this.createPane("popupPane"),this.options.markerZoomAnimation||(We(l.markerPane,"leaflet-zoom-hide"),We(l.shadowPane,"leaflet-zoom-hide"))},_resetView:function(l,d,m){on(this._mapPane,new j(0,0));var b=!this._loaded;this._loaded=!0,d=this._limitZoom(d),this.fire("viewprereset");var C=this._zoom!==d;this._moveStart(C,m)._move(l,d)._moveEnd(C),this.fire("viewreset"),b&&this.fire("load")},_moveStart:function(l,d){return l&&this.fire("zoomstart"),d||this.fire("movestart"),this},_move:function(l,d,m,b){d===void 0&&(d=this._zoom);var C=this._zoom!==d;return this._zoom=d,this._lastCenter=l,this._pixelOrigin=this._getNewPixelOrigin(l),b?m&&m.pinch&&this.fire("zoom",m):((C||m&&m.pinch)&&this.fire("zoom",m),this.fire("move",m)),this},_moveEnd:function(l){return l&&this.fire("zoomend"),this.fire("moveend")},_stop:function(){return X(this._flyToFrame),this._panAnim&&this._panAnim.stop(),this},_rawPanBy:function(l){on(this._mapPane,this._getMapPanePos().subtract(l))},_getZoomSpan:function(){return this.getMaxZoom()-this.getMinZoom()},_panInsideMaxBounds:function(){this._enforcingBounds||this.panInsideBounds(this.options.maxBounds)},_checkIfLoaded:function(){if(!this._loaded)throw new Error("Set map center and zoom first.")},_initEvents:function(l){this._targets={},this._targets[c(this._container)]=this;var d=l?Pt:Ae;d(this._container,"click dblclick mousedown mouseup mouseover mouseout mousemove contextmenu keypress keydown keyup",this._handleDOMEvent,this),this.options.trackResize&&d(window,"resize",this._onResize,this),Oe.any3d&&this.options.transform3DLimit&&(l?this.off:this.on).call(this,"moveend",this._onMoveEnd)},_onResize:function(){X(this._resizeRequest),this._resizeRequest=G(function(){this.invalidateSize({debounceMoveend:!0})},this)},_onScroll:function(){this._container.scrollTop=0,this._container.scrollLeft=0},_onMoveEnd:function(){var l=this._getMapPanePos();Math.max(Math.abs(l.x),Math.abs(l.y))>=this.options.transform3DLimit&&this._resetView(this.getCenter(),this.getZoom())},_findEventTargets:function(l,d){for(var m=[],b,C=d==="mouseout"||d==="mouseover",T=l.target||l.srcElement,A=!1;T;){if(b=this._targets[c(T)],b&&(d==="click"||d==="preclick")&&this._draggableMoved(b)){A=!0;break}if(b&&b.listens(d,!0)&&(C&&!z1(T,l)||(m.push(b),C))||T===this._container)break;T=T.parentNode}return!m.length&&!A&&!C&&this.listens(d,!0)&&(m=[this]),m},_isClickDisabled:function(l){for(;l&&l!==this._container;){if(l._leaflet_disable_click)return!0;l=l.parentNode}},_handleDOMEvent:function(l){var d=l.target||l.srcElement;if(!(!this._loaded||d._leaflet_disable_events||l.type==="click"&&this._isClickDisabled(d))){var m=l.type;m==="mousedown"&&T1(d),this._fireDOMEvent(l,m)}},_mouseEvents:["click","dblclick","mouseover","mouseout","contextmenu"],_fireDOMEvent:function(l,d,m){if(l.type==="click"){var b=o({},l);b.type="preclick",this._fireDOMEvent(b,b.type,m)}var C=this._findEventTargets(l,d);if(m){for(var T=[],A=0;A0?Math.round(l-d)/2:Math.max(0,Math.ceil(l))-Math.max(0,Math.floor(d))},_limitZoom:function(l){var d=this.getMinZoom(),m=this.getMaxZoom(),b=Oe.any3d?this.options.zoomSnap:1;return b&&(l=Math.round(l/b)*b),Math.max(d,Math.min(m,l))},_onPanTransitionStep:function(){this.fire("move")},_onPanTransitionEnd:function(){Xt(this._mapPane,"leaflet-pan-anim"),this.fire("moveend")},_tryAnimatedPan:function(l,d){var m=this._getCenterOffset(l)._trunc();return(d&&d.animate)!==!0&&!this.getSize().contains(m)?!1:(this.panBy(m,d),!0)},_createAnimProxy:function(){var l=this._proxy=Fe("div","leaflet-proxy leaflet-zoom-animated");this._panes.mapPane.appendChild(l),this.on("zoomanim",function(d){var m=Lu,b=this._proxy.style[m];Ha(this._proxy,this.project(d.center,d.zoom),this.getZoomScale(d.zoom,1)),b===this._proxy.style[m]&&this._animatingZoom&&this._onZoomTransitionEnd()},this),this.on("load moveend",this._animMoveEnd,this),this._on("unload",this._destroyAnimProxy,this)},_destroyAnimProxy:function(){ut(this._proxy),this.off("load moveend",this._animMoveEnd,this),delete this._proxy},_animMoveEnd:function(){var l=this.getCenter(),d=this.getZoom();Ha(this._proxy,this.project(l,d),this.getZoomScale(d,1))},_catchTransitionEnd:function(l){this._animatingZoom&&l.propertyName.indexOf("transform")>=0&&this._onZoomTransitionEnd()},_nothingToAnimate:function(){return!this._container.getElementsByClassName("leaflet-zoom-animated").length},_tryAnimatedZoom:function(l,d,m){if(this._animatingZoom)return!0;if(m=m||{},!this._zoomAnimated||m.animate===!1||this._nothingToAnimate()||Math.abs(d-this._zoom)>this.options.zoomAnimationThreshold)return!1;var b=this.getZoomScale(d),C=this._getCenterOffset(l)._divideBy(1-1/b);return m.animate!==!0&&!this.getSize().contains(C)?!1:(G(function(){this._moveStart(!0,m.noMoveStart||!1)._animateZoom(l,d,!0)},this),!0)},_animateZoom:function(l,d,m,b){this._mapPane&&(m&&(this._animatingZoom=!0,this._animateToCenter=l,this._animateToZoom=d,We(this._mapPane,"leaflet-zoom-anim")),this.fire("zoomanim",{center:l,zoom:d,noUpdate:b}),this._tempFireZoomEvent||(this._tempFireZoomEvent=this._zoom!==this._animateToZoom),this._move(this._animateToCenter,this._animateToZoom,void 0,!0),setTimeout(s(this._onZoomTransitionEnd,this),250))},_onZoomTransitionEnd:function(){this._animatingZoom&&(this._mapPane&&Xt(this._mapPane,"leaflet-zoom-anim"),this._animatingZoom=!1,this._move(this._animateToCenter,this._animateToZoom,void 0,!0),this._tempFireZoomEvent&&this.fire("zoom"),delete this._tempFireZoomEvent,this.fire("move"),this._moveEnd(!0))}});function VV(l,d){return new rt(l,d)}var Vo=V.extend({options:{position:"topright"},initialize:function(l){w(this,l)},getPosition:function(){return this.options.position},setPosition:function(l){var d=this._map;return d&&d.removeControl(this),this.options.position=l,d&&d.addControl(this),this},getContainer:function(){return this._container},addTo:function(l){this.remove(),this._map=l;var d=this._container=this.onAdd(l),m=this.getPosition(),b=l._controlCorners[m];return We(d,"leaflet-control"),m.indexOf("bottom")!==-1?b.insertBefore(d,b.firstChild):b.appendChild(d),this._map.on("unload",this.remove,this),this},remove:function(){return this._map?(ut(this._container),this.onRemove&&this.onRemove(this._map),this._map.off("unload",this.remove,this),this._map=null,this):this},_refocusOnMap:function(l){this._map&&l&&l.screenX>0&&l.screenY>0&&this._map.getContainer().focus()}}),Bu=function(l){return new Vo(l)};rt.include({addControl:function(l){return l.addTo(this),this},removeControl:function(l){return l.remove(),this},_initControlPos:function(){var l=this._controlCorners={},d="leaflet-",m=this._controlContainer=Fe("div",d+"control-container",this._container);function b(C,T){var A=d+C+" "+d+T;l[C+T]=Fe("div",A,m)}b("top","left"),b("top","right"),b("bottom","left"),b("bottom","right")},_clearControlPos:function(){for(var l in this._controlCorners)ut(this._controlCorners[l]);ut(this._controlContainer),delete this._controlCorners,delete this._controlContainer}});var nC=Vo.extend({options:{collapsed:!0,position:"topright",autoZIndex:!0,hideSingleBase:!1,sortLayers:!1,sortFunction:function(l,d,m,b){return m1,this._baseLayersList.style.display=l?"":"none"),this._separator.style.display=d&&l?"":"none",this},_onLayerChange:function(l){this._handlingClick||this._update();var d=this._getLayer(c(l.target)),m=d.overlay?l.type==="add"?"overlayadd":"overlayremove":l.type==="add"?"baselayerchange":null;m&&this._map.fire(m,d)},_createRadioElement:function(l,d){var m='",b=document.createElement("div");return b.innerHTML=m,b.firstChild},_addItem:function(l){var d=document.createElement("label"),m=this._map.hasLayer(l.layer),b;l.overlay?(b=document.createElement("input"),b.type="checkbox",b.className="leaflet-control-layers-selector",b.defaultChecked=m):b=this._createRadioElement("leaflet-base-layers_"+c(this),m),this._layerControlInputs.push(b),b.layerId=c(l.layer),Ae(b,"click",this._onInputClick,this);var C=document.createElement("span");C.innerHTML=" "+l.name;var T=document.createElement("span");d.appendChild(T),T.appendChild(b),T.appendChild(C);var A=l.overlay?this._overlaysList:this._baseLayersList;return A.appendChild(d),this._checkDisabledLayers(),d},_onInputClick:function(){if(!this._preventClick){var l=this._layerControlInputs,d,m,b=[],C=[];this._handlingClick=!0;for(var T=l.length-1;T>=0;T--)d=l[T],m=this._getLayer(d.layerId).layer,d.checked?b.push(m):d.checked||C.push(m);for(T=0;T=0;C--)d=l[C],m=this._getLayer(d.layerId).layer,d.disabled=m.options.minZoom!==void 0&&bm.options.maxZoom},_expandIfNotCollapsed:function(){return this._map&&!this.options.collapsed&&this.expand(),this},_expandSafely:function(){var l=this._section;this._preventClick=!0,Ae(l,"click",In),this.expand();var d=this;setTimeout(function(){Pt(l,"click",In),d._preventClick=!1})}}),HV=function(l,d,m){return new nC(l,d,m)},A1=Vo.extend({options:{position:"topleft",zoomInText:'',zoomInTitle:"Zoom in",zoomOutText:'',zoomOutTitle:"Zoom out"},onAdd:function(l){var d="leaflet-control-zoom",m=Fe("div",d+" leaflet-bar"),b=this.options;return this._zoomInButton=this._createButton(b.zoomInText,b.zoomInTitle,d+"-in",m,this._zoomIn),this._zoomOutButton=this._createButton(b.zoomOutText,b.zoomOutTitle,d+"-out",m,this._zoomOut),this._updateDisabled(),l.on("zoomend zoomlevelschange",this._updateDisabled,this),m},onRemove:function(l){l.off("zoomend zoomlevelschange",this._updateDisabled,this)},disable:function(){return this._disabled=!0,this._updateDisabled(),this},enable:function(){return this._disabled=!1,this._updateDisabled(),this},_zoomIn:function(l){!this._disabled&&this._map._zoomthis._map.getMinZoom()&&this._map.zoomOut(this._map.options.zoomDelta*(l.shiftKey?3:1))},_createButton:function(l,d,m,b,C){var T=Fe("a",m,b);return T.innerHTML=l,T.href="#",T.title=d,T.setAttribute("role","button"),T.setAttribute("aria-label",d),Au(T),Ae(T,"click",Za),Ae(T,"click",C,this),Ae(T,"click",this._refocusOnMap,this),T},_updateDisabled:function(){var l=this._map,d="leaflet-disabled";Xt(this._zoomInButton,d),Xt(this._zoomOutButton,d),this._zoomInButton.setAttribute("aria-disabled","false"),this._zoomOutButton.setAttribute("aria-disabled","false"),(this._disabled||l._zoom===l.getMinZoom())&&(We(this._zoomOutButton,d),this._zoomOutButton.setAttribute("aria-disabled","true")),(this._disabled||l._zoom===l.getMaxZoom())&&(We(this._zoomInButton,d),this._zoomInButton.setAttribute("aria-disabled","true"))}});rt.mergeOptions({zoomControl:!0}),rt.addInitHook(function(){this.options.zoomControl&&(this.zoomControl=new A1,this.addControl(this.zoomControl))});var WV=function(l){return new A1(l)},rC=Vo.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0},onAdd:function(l){var d="leaflet-control-scale",m=Fe("div",d),b=this.options;return this._addScales(b,d+"-line",m),l.on(b.updateWhenIdle?"moveend":"move",this._update,this),l.whenReady(this._update,this),m},onRemove:function(l){l.off(this.options.updateWhenIdle?"moveend":"move",this._update,this)},_addScales:function(l,d,m){l.metric&&(this._mScale=Fe("div",d,m)),l.imperial&&(this._iScale=Fe("div",d,m))},_update:function(){var l=this._map,d=l.getSize().y/2,m=l.distance(l.containerPointToLatLng([0,d]),l.containerPointToLatLng([this.options.maxWidth,d]));this._updateScales(m)},_updateScales:function(l){this.options.metric&&l&&this._updateMetric(l),this.options.imperial&&l&&this._updateImperial(l)},_updateMetric:function(l){var d=this._getRoundNum(l),m=d<1e3?d+" m":d/1e3+" km";this._updateScale(this._mScale,m,d/l)},_updateImperial:function(l){var d=l*3.2808399,m,b,C;d>5280?(m=d/5280,b=this._getRoundNum(m),this._updateScale(this._iScale,b+" mi",b/m)):(C=this._getRoundNum(d),this._updateScale(this._iScale,C+" ft",C/d))},_updateScale:function(l,d,m){l.style.width=Math.round(this.options.maxWidth*m)+"px",l.innerHTML=d},_getRoundNum:function(l){var d=Math.pow(10,(Math.floor(l)+"").length-1),m=l/d;return m=m>=10?10:m>=5?5:m>=3?3:m>=2?2:1,d*m}}),UV=function(l){return new rC(l)},ZV='',B1=Vo.extend({options:{position:"bottomright",prefix:''+(Oe.inlineSvg?ZV+" ":"")+"Leaflet"},initialize:function(l){w(this,l),this._attributions={}},onAdd:function(l){l.attributionControl=this,this._container=Fe("div","leaflet-control-attribution"),Au(this._container);for(var d in l._layers)l._layers[d].getAttribution&&this.addAttribution(l._layers[d].getAttribution());return this._update(),l.on("layeradd",this._addAttribution,this),this._container},onRemove:function(l){l.off("layeradd",this._addAttribution,this)},_addAttribution:function(l){l.layer.getAttribution&&(this.addAttribution(l.layer.getAttribution()),l.layer.once("remove",function(){this.removeAttribution(l.layer.getAttribution())},this))},setPrefix:function(l){return this.options.prefix=l,this._update(),this},addAttribution:function(l){return l?(this._attributions[l]||(this._attributions[l]=0),this._attributions[l]++,this._update(),this):this},removeAttribution:function(l){return l?(this._attributions[l]&&(this._attributions[l]--,this._update()),this):this},_update:function(){if(this._map){var l=[];for(var d in this._attributions)this._attributions[d]&&l.push(d);var m=[];this.options.prefix&&m.push(this.options.prefix),l.length&&m.push(l.join(", ")),this._container.innerHTML=m.join(' ')}}});rt.mergeOptions({attributionControl:!0}),rt.addInitHook(function(){this.options.attributionControl&&new B1().addTo(this)});var GV=function(l){return new B1(l)};Vo.Layers=nC,Vo.Zoom=A1,Vo.Scale=rC,Vo.Attribution=B1,Bu.layers=HV,Bu.zoom=WV,Bu.scale=UV,Bu.attribution=GV;var li=V.extend({initialize:function(l){this._map=l},enable:function(){return this._enabled?this:(this._enabled=!0,this.addHooks(),this)},disable:function(){return this._enabled?(this._enabled=!1,this.removeHooks(),this):this},enabled:function(){return!!this._enabled}});li.addTo=function(l,d){return l.addHandler(d,this),this};var YV={Events:Z},oC=Oe.touch?"touchstart mousedown":"mousedown",$s=Y.extend({options:{clickTolerance:3},initialize:function(l,d,m,b){w(this,b),this._element=l,this._dragStartTarget=d||l,this._preventOutline=m},enable:function(){this._enabled||(Ae(this._dragStartTarget,oC,this._onDown,this),this._enabled=!0)},disable:function(){this._enabled&&($s._dragging===this&&this.finishDrag(!0),Pt(this._dragStartTarget,oC,this._onDown,this),this._enabled=!1,this._moved=!1)},_onDown:function(l){if(this._enabled&&(this._moved=!1,!C1(this._element,"leaflet-zoom-anim"))){if(l.touches&&l.touches.length!==1){$s._dragging===this&&this.finishDrag();return}if(!($s._dragging||l.shiftKey||l.which!==1&&l.button!==1&&!l.touches)&&($s._dragging=this,this._preventOutline&&T1(this._element),$1(),Du(),!this._moving)){this.fire("down");var d=l.touches?l.touches[0]:l,m=qO(this._element);this._startPoint=new j(d.clientX,d.clientY),this._startPos=Wa(this._element),this._parentScale=I1(m);var b=l.type==="mousedown";Ae(document,b?"mousemove":"touchmove",this._onMove,this),Ae(document,b?"mouseup":"touchend touchcancel",this._onUp,this)}}},_onMove:function(l){if(this._enabled){if(l.touches&&l.touches.length>1){this._moved=!0;return}var d=l.touches&&l.touches.length===1?l.touches[0]:l,m=new j(d.clientX,d.clientY)._subtract(this._startPoint);!m.x&&!m.y||Math.abs(m.x)+Math.abs(m.y)T&&(A=q,T=te);T>m&&(d[A]=1,V1(l,d,m,b,A),V1(l,d,m,A,C))}function XV(l,d){for(var m=[l[0]],b=1,C=0,T=l.length;bd&&(m.push(l[b]),C=b);return Cd.max.x&&(m|=2),l.yd.max.y&&(m|=8),m}function QV(l,d){var m=d.x-l.x,b=d.y-l.y;return m*m+b*b}function Fu(l,d,m,b){var C=d.x,T=d.y,A=m.x-C,q=m.y-T,te=A*A+q*q,oe;return te>0&&(oe=((l.x-C)*A+(l.y-T)*q)/te,oe>1?(C=m.x,T=m.y):oe>0&&(C+=A*oe,T+=q*oe)),A=l.x-C,q=l.y-T,b?A*A+q*q:new j(C,T)}function Co(l){return!O(l[0])||typeof l[0][0]!="object"&&typeof l[0][0]<"u"}function dC(l){return console.warn("Deprecated use of _flat, please use L.LineUtil.isFlat instead."),Co(l)}function fC(l,d){var m,b,C,T,A,q,te,oe;if(!l||l.length===0)throw new Error("latlngs not passed");Co(l)||(console.warn("latlngs are not flat! Only the first ring will be used"),l=l[0]);var ve=ne([0,0]),Re=ie(l),Ke=Re.getNorthWest().distanceTo(Re.getSouthWest())*Re.getNorthEast().distanceTo(Re.getNorthWest());Ke<1700&&(ve=F1(l));var dr=l.length,Sn=[];for(m=0;mb){te=(T-b)/C,oe=[q.x-te*(q.x-A.x),q.y-te*(q.y-A.y)];break}var Tr=d.unproject(F(oe));return ne([Tr.lat+ve.lat,Tr.lng+ve.lng])}var eH={__proto__:null,simplify:aC,pointToSegmentDistance:lC,closestPointOnSegment:qV,clipSegment:uC,_getEdgeIntersection:sp,_getBitCode:Ga,_sqClosestPointOnSegment:Fu,isFlat:Co,_flat:dC,polylineCenter:fC},H1={project:function(l){return new j(l.lng,l.lat)},unproject:function(l){return new J(l.y,l.x)},bounds:new K([-180,-90],[180,90])},W1={R:6378137,R_MINOR:6356752314245179e-9,bounds:new K([-2003750834279e-5,-1549657073972e-5],[2003750834279e-5,1876465623138e-5]),project:function(l){var d=Math.PI/180,m=this.R,b=l.lat*d,C=this.R_MINOR/m,T=Math.sqrt(1-C*C),A=T*Math.sin(b),q=Math.tan(Math.PI/4-b/2)/Math.pow((1-A)/(1+A),T/2);return b=-m*Math.log(Math.max(q,1e-10)),new j(l.lng*d*m,b)},unproject:function(l){for(var d=180/Math.PI,m=this.R,b=this.R_MINOR/m,C=Math.sqrt(1-b*b),T=Math.exp(-l.y/m),A=Math.PI/2-2*Math.atan(T),q=0,te=.1,oe;q<15&&Math.abs(te)>1e-7;q++)oe=C*Math.sin(A),oe=Math.pow((1-oe)/(1+oe),C/2),te=Math.PI/2-2*Math.atan(T*oe)-A,A+=te;return new J(A*d,l.x*d/m)}},tH={__proto__:null,LonLat:H1,Mercator:W1,SphericalMercator:we},nH=o({},_e,{code:"EPSG:3395",projection:W1,transformation:function(){var l=.5/(Math.PI*W1.R);return Te(l,.5,-l,.5)}()}),pC=o({},_e,{code:"EPSG:4326",projection:H1,transformation:Te(1/180,1,-1/180,.5)}),rH=o({},le,{projection:H1,transformation:Te(1,0,-1,0),scale:function(l){return Math.pow(2,l)},zoom:function(l){return Math.log(l)/Math.LN2},distance:function(l,d){var m=d.lng-l.lng,b=d.lat-l.lat;return Math.sqrt(m*m+b*b)},infinite:!0});le.Earth=_e,le.EPSG3395=nH,le.EPSG3857=je,le.EPSG900913=it,le.EPSG4326=pC,le.Simple=rH;var Ho=Y.extend({options:{pane:"overlayPane",attribution:null,bubblingMouseEvents:!0},addTo:function(l){return l.addLayer(this),this},remove:function(){return this.removeFrom(this._map||this._mapToAdd)},removeFrom:function(l){return l&&l.removeLayer(this),this},getPane:function(l){return this._map.getPane(l?this.options[l]||l:this.options.pane)},addInteractiveTarget:function(l){return this._map._targets[c(l)]=this,this},removeInteractiveTarget:function(l){return delete this._map._targets[c(l)],this},getAttribution:function(){return this.options.attribution},_layerAdd:function(l){var d=l.target;if(d.hasLayer(this)){if(this._map=d,this._zoomAnimated=d._zoomAnimated,this.getEvents){var m=this.getEvents();d.on(m,this),this.once("remove",function(){d.off(m,this)},this)}this.onAdd(d),this.fire("add"),d.fire("layeradd",{layer:this})}}});rt.include({addLayer:function(l){if(!l._layerAdd)throw new Error("The provided object is not a Layer.");var d=c(l);return this._layers[d]?this:(this._layers[d]=l,l._mapToAdd=this,l.beforeAdd&&l.beforeAdd(this),this.whenReady(l._layerAdd,l),this)},removeLayer:function(l){var d=c(l);return this._layers[d]?(this._loaded&&l.onRemove(this),delete this._layers[d],this._loaded&&(this.fire("layerremove",{layer:l}),l.fire("remove")),l._map=l._mapToAdd=null,this):this},hasLayer:function(l){return c(l)in this._layers},eachLayer:function(l,d){for(var m in this._layers)l.call(d,this._layers[m]);return this},_addLayers:function(l){l=l?O(l)?l:[l]:[];for(var d=0,m=l.length;dthis._layersMaxZoom&&this.setZoom(this._layersMaxZoom),this.options.minZoom===void 0&&this._layersMinZoom&&this.getZoom()=2&&d[0]instanceof J&&d[0].equals(d[m-1])&&d.pop(),d},_setLatLngs:function(l){Gi.prototype._setLatLngs.call(this,l),Co(this._latlngs)&&(this._latlngs=[this._latlngs])},_defaultShape:function(){return Co(this._latlngs[0])?this._latlngs[0]:this._latlngs[0][0]},_clipPoints:function(){var l=this._renderer._bounds,d=this.options.weight,m=new j(d,d);if(l=new K(l.min.subtract(m),l.max.add(m)),this._parts=[],!(!this._pxBounds||!this._pxBounds.intersects(l))){if(this.options.noClip){this._parts=this._rings;return}for(var b=0,C=this._rings.length,T;bl.y!=C.y>l.y&&l.x<(C.x-b.x)*(l.y-b.y)/(C.y-b.y)+b.x&&(d=!d);return d||Gi.prototype._containsPoint.call(this,l,!0)}});function dH(l,d){return new Xl(l,d)}var Yi=Zi.extend({initialize:function(l,d){w(this,d),this._layers={},l&&this.addData(l)},addData:function(l){var d=O(l)?l:l.features,m,b,C;if(d){for(m=0,b=d.length;m0&&C.push(C[0].slice()),C}function Ql(l,d){return l.feature?o({},l.feature,{geometry:d}):fp(d)}function fp(l){return l.type==="Feature"||l.type==="FeatureCollection"?l:{type:"Feature",properties:{},geometry:l}}var Y1={toGeoJSON:function(l){return Ql(this,{type:"Point",coordinates:G1(this.getLatLng(),l)})}};ap.include(Y1),U1.include(Y1),lp.include(Y1),Gi.include({toGeoJSON:function(l){var d=!Co(this._latlngs),m=dp(this._latlngs,d?1:0,!1,l);return Ql(this,{type:(d?"Multi":"")+"LineString",coordinates:m})}}),Xl.include({toGeoJSON:function(l){var d=!Co(this._latlngs),m=d&&!Co(this._latlngs[0]),b=dp(this._latlngs,m?2:d?1:0,!0,l);return d||(b=[b]),Ql(this,{type:(m?"Multi":"")+"Polygon",coordinates:b})}}),ql.include({toMultiPoint:function(l){var d=[];return this.eachLayer(function(m){d.push(m.toGeoJSON(l).geometry.coordinates)}),Ql(this,{type:"MultiPoint",coordinates:d})},toGeoJSON:function(l){var d=this.feature&&this.feature.geometry&&this.feature.geometry.type;if(d==="MultiPoint")return this.toMultiPoint(l);var m=d==="GeometryCollection",b=[];return this.eachLayer(function(C){if(C.toGeoJSON){var T=C.toGeoJSON(l);if(m)b.push(T.geometry);else{var A=fp(T);A.type==="FeatureCollection"?b.push.apply(b,A.features):b.push(A)}}}),m?Ql(this,{geometries:b,type:"GeometryCollection"}):{type:"FeatureCollection",features:b}}});function gC(l,d){return new Yi(l,d)}var fH=gC,pp=Ho.extend({options:{opacity:1,alt:"",interactive:!1,crossOrigin:!1,errorOverlayUrl:"",zIndex:1,className:""},initialize:function(l,d,m){this._url=l,this._bounds=ie(d),w(this,m)},onAdd:function(){this._image||(this._initImage(),this.options.opacity<1&&this._updateOpacity()),this.options.interactive&&(We(this._image,"leaflet-interactive"),this.addInteractiveTarget(this._image)),this.getPane().appendChild(this._image),this._reset()},onRemove:function(){ut(this._image),this.options.interactive&&this.removeInteractiveTarget(this._image)},setOpacity:function(l){return this.options.opacity=l,this._image&&this._updateOpacity(),this},setStyle:function(l){return l.opacity&&this.setOpacity(l.opacity),this},bringToFront:function(){return this._map&&Po(this._image),this},bringToBack:function(){return this._map&&Nr(this._image),this},setUrl:function(l){return this._url=l,this._image&&(this._image.src=l),this},setBounds:function(l){return this._bounds=ie(l),this._map&&this._reset(),this},getEvents:function(){var l={zoom:this._reset,viewreset:this._reset};return this._zoomAnimated&&(l.zoomanim=this._animateZoom),l},setZIndex:function(l){return this.options.zIndex=l,this._updateZIndex(),this},getBounds:function(){return this._bounds},getElement:function(){return this._image},_initImage:function(){var l=this._url.tagName==="IMG",d=this._image=l?this._url:Fe("img");if(We(d,"leaflet-image-layer"),this._zoomAnimated&&We(d,"leaflet-zoom-animated"),this.options.className&&We(d,this.options.className),d.onselectstart=p,d.onmousemove=p,d.onload=s(this.fire,this,"load"),d.onerror=s(this._overlayOnError,this,"error"),(this.options.crossOrigin||this.options.crossOrigin==="")&&(d.crossOrigin=this.options.crossOrigin===!0?"":this.options.crossOrigin),this.options.zIndex&&this._updateZIndex(),l){this._url=d.src;return}d.src=this._url,d.alt=this.options.alt},_animateZoom:function(l){var d=this._map.getZoomScale(l.zoom),m=this._map._latLngBoundsToNewLayerBounds(this._bounds,l.zoom,l.center).min;Ha(this._image,m,d)},_reset:function(){var l=this._image,d=new K(this._map.latLngToLayerPoint(this._bounds.getNorthWest()),this._map.latLngToLayerPoint(this._bounds.getSouthEast())),m=d.getSize();on(l,d.min),l.style.width=m.x+"px",l.style.height=m.y+"px"},_updateOpacity:function(){Oo(this._image,this.options.opacity)},_updateZIndex:function(){this._image&&this.options.zIndex!==void 0&&this.options.zIndex!==null&&(this._image.style.zIndex=this.options.zIndex)},_overlayOnError:function(){this.fire("error");var l=this.options.errorOverlayUrl;l&&this._url!==l&&(this._url=l,this._image.src=l)},getCenter:function(){return this._bounds.getCenter()}}),pH=function(l,d,m){return new pp(l,d,m)},vC=pp.extend({options:{autoplay:!0,loop:!0,keepAspectRatio:!0,muted:!1,playsInline:!0},_initImage:function(){var l=this._url.tagName==="VIDEO",d=this._image=l?this._url:Fe("video");if(We(d,"leaflet-image-layer"),this._zoomAnimated&&We(d,"leaflet-zoom-animated"),this.options.className&&We(d,this.options.className),d.onselectstart=p,d.onmousemove=p,d.onloadeddata=s(this.fire,this,"load"),l){for(var m=d.getElementsByTagName("source"),b=[],C=0;C0?b:[d.src];return}O(this._url)||(this._url=[this._url]),!this.options.keepAspectRatio&&Object.prototype.hasOwnProperty.call(d.style,"objectFit")&&(d.style.objectFit="fill"),d.autoplay=!!this.options.autoplay,d.loop=!!this.options.loop,d.muted=!!this.options.muted,d.playsInline=!!this.options.playsInline;for(var T=0;TC?(d.height=C+"px",We(l,T)):Xt(l,T),this._containerWidth=this._container.offsetWidth},_animateZoom:function(l){var d=this._map._latLngToNewLayerPoint(this._latlng,l.zoom,l.center),m=this._getAnchor();on(this._container,d.add(m))},_adjustPan:function(){if(this.options.autoPan){if(this._map._panAnim&&this._map._panAnim.stop(),this._autopanning){this._autopanning=!1;return}var l=this._map,d=parseInt(xn(this._container,"marginBottom"),10)||0,m=this._container.offsetHeight+d,b=this._containerWidth,C=new j(this._containerLeft,-m-this._containerBottom);C._add(Wa(this._container));var T=l.layerPointToContainerPoint(C),A=F(this.options.autoPanPadding),q=F(this.options.autoPanPaddingTopLeft||A),te=F(this.options.autoPanPaddingBottomRight||A),oe=l.getSize(),ve=0,Re=0;T.x+b+te.x>oe.x&&(ve=T.x+b-oe.x+te.x),T.x-ve-q.x<0&&(ve=T.x-q.x),T.y+m+te.y>oe.y&&(Re=T.y+m-oe.y+te.y),T.y-Re-q.y<0&&(Re=T.y-q.y),(ve||Re)&&(this.options.keepInView&&(this._autopanning=!0),l.fire("autopanstart").panBy([ve,Re]))}},_getAnchor:function(){return F(this._source&&this._source._getPopupAnchor?this._source._getPopupAnchor():[0,0])}}),gH=function(l,d){return new hp(l,d)};rt.mergeOptions({closePopupOnClick:!0}),rt.include({openPopup:function(l,d,m){return this._initOverlay(hp,l,d,m).openOn(this),this},closePopup:function(l){return l=arguments.length?l:this._popup,l&&l.close(),this}}),Ho.include({bindPopup:function(l,d){return this._popup=this._initOverlay(hp,this._popup,l,d),this._popupHandlersAdded||(this.on({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!0),this},unbindPopup:function(){return this._popup&&(this.off({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!1,this._popup=null),this},openPopup:function(l){return this._popup&&(this instanceof Zi||(this._popup._source=this),this._popup._prepareOpen(l||this._latlng)&&this._popup.openOn(this._map)),this},closePopup:function(){return this._popup&&this._popup.close(),this},togglePopup:function(){return this._popup&&this._popup.toggle(this),this},isPopupOpen:function(){return this._popup?this._popup.isOpen():!1},setPopupContent:function(l){return this._popup&&this._popup.setContent(l),this},getPopup:function(){return this._popup},_openPopup:function(l){if(!(!this._popup||!this._map)){Za(l);var d=l.layer||l.target;if(this._popup._source===d&&!(d instanceof Ms)){this._map.hasLayer(this._popup)?this.closePopup():this.openPopup(l.latlng);return}this._popup._source=d,this.openPopup(l.latlng)}},_movePopup:function(l){this._popup.setLatLng(l.latlng)},_onKeyPress:function(l){l.originalEvent.keyCode===13&&this._openPopup(l)}});var mp=ci.extend({options:{pane:"tooltipPane",offset:[0,0],direction:"auto",permanent:!1,sticky:!1,opacity:.9},onAdd:function(l){ci.prototype.onAdd.call(this,l),this.setOpacity(this.options.opacity),l.fire("tooltipopen",{tooltip:this}),this._source&&(this.addEventParent(this._source),this._source.fire("tooltipopen",{tooltip:this},!0))},onRemove:function(l){ci.prototype.onRemove.call(this,l),l.fire("tooltipclose",{tooltip:this}),this._source&&(this.removeEventParent(this._source),this._source.fire("tooltipclose",{tooltip:this},!0))},getEvents:function(){var l=ci.prototype.getEvents.call(this);return this.options.permanent||(l.preclick=this.close),l},_initLayout:function(){var l="leaflet-tooltip",d=l+" "+(this.options.className||"")+" leaflet-zoom-"+(this._zoomAnimated?"animated":"hide");this._contentNode=this._container=Fe("div",d),this._container.setAttribute("role","tooltip"),this._container.setAttribute("id","leaflet-tooltip-"+c(this))},_updateLayout:function(){},_adjustPan:function(){},_setPosition:function(l){var d,m,b=this._map,C=this._container,T=b.latLngToContainerPoint(b.getCenter()),A=b.layerPointToContainerPoint(l),q=this.options.direction,te=C.offsetWidth,oe=C.offsetHeight,ve=F(this.options.offset),Re=this._getAnchor();q==="top"?(d=te/2,m=oe):q==="bottom"?(d=te/2,m=0):q==="center"?(d=te/2,m=oe/2):q==="right"?(d=0,m=oe/2):q==="left"?(d=te,m=oe/2):A.xthis.options.maxZoom||mb?this._retainParent(C,T,A,b):!1)},_retainChildren:function(l,d,m,b){for(var C=2*l;C<2*l+2;C++)for(var T=2*d;T<2*d+2;T++){var A=new j(C,T);A.z=m+1;var q=this._tileCoordsToKey(A),te=this._tiles[q];if(te&&te.active){te.retain=!0;continue}else te&&te.loaded&&(te.retain=!0);m+1this.options.maxZoom||this.options.minZoom!==void 0&&C1){this._setView(l,m);return}for(var Re=C.min.y;Re<=C.max.y;Re++)for(var Ke=C.min.x;Ke<=C.max.x;Ke++){var dr=new j(Ke,Re);if(dr.z=this._tileZoom,!!this._isValidTile(dr)){var Sn=this._tiles[this._tileCoordsToKey(dr)];Sn?Sn.current=!0:A.push(dr)}}if(A.sort(function(Tr,tc){return Tr.distanceTo(T)-tc.distanceTo(T)}),A.length!==0){this._loading||(this._loading=!0,this.fire("loading"));var ko=document.createDocumentFragment();for(Ke=0;Kem.max.x)||!d.wrapLat&&(l.ym.max.y))return!1}if(!this.options.bounds)return!0;var b=this._tileCoordsToBounds(l);return ie(this.options.bounds).overlaps(b)},_keyToBounds:function(l){return this._tileCoordsToBounds(this._keyToTileCoords(l))},_tileCoordsToNwSe:function(l){var d=this._map,m=this.getTileSize(),b=l.scaleBy(m),C=b.add(m),T=d.unproject(b,l.z),A=d.unproject(C,l.z);return[T,A]},_tileCoordsToBounds:function(l){var d=this._tileCoordsToNwSe(l),m=new fe(d[0],d[1]);return this.options.noWrap||(m=this._map.wrapLatLngBounds(m)),m},_tileCoordsToKey:function(l){return l.x+":"+l.y+":"+l.z},_keyToTileCoords:function(l){var d=l.split(":"),m=new j(+d[0],+d[1]);return m.z=+d[2],m},_removeTile:function(l){var d=this._tiles[l];d&&(ut(d.el),delete this._tiles[l],this.fire("tileunload",{tile:d.el,coords:this._keyToTileCoords(l)}))},_initTile:function(l){We(l,"leaflet-tile");var d=this.getTileSize();l.style.width=d.x+"px",l.style.height=d.y+"px",l.onselectstart=p,l.onmousemove=p,Oe.ielt9&&this.options.opacity<1&&Oo(l,this.options.opacity)},_addTile:function(l,d){var m=this._getTilePos(l),b=this._tileCoordsToKey(l),C=this.createTile(this._wrapCoords(l),s(this._tileReady,this,l));this._initTile(C),this.createTile.length<2&&G(s(this._tileReady,this,l,null,C)),on(C,m),this._tiles[b]={el:C,coords:l,current:!0},d.appendChild(C),this.fire("tileloadstart",{tile:C,coords:l})},_tileReady:function(l,d,m){d&&this.fire("tileerror",{error:d,tile:m,coords:l});var b=this._tileCoordsToKey(l);m=this._tiles[b],m&&(m.loaded=+new Date,this._map._fadeAnimated?(Oo(m.el,0),X(this._fadeFrame),this._fadeFrame=G(this._updateOpacity,this)):(m.active=!0,this._pruneTiles()),d||(We(m.el,"leaflet-tile-loaded"),this.fire("tileload",{tile:m.el,coords:l})),this._noTilesToLoad()&&(this._loading=!1,this.fire("load"),Oe.ielt9||!this._map._fadeAnimated?G(this._pruneTiles,this):setTimeout(s(this._pruneTiles,this),250)))},_getTilePos:function(l){return l.scaleBy(this.getTileSize()).subtract(this._level.origin)},_wrapCoords:function(l){var d=new j(this._wrapX?f(l.x,this._wrapX):l.x,this._wrapY?f(l.y,this._wrapY):l.y);return d.z=l.z,d},_pxBoundsToTileRange:function(l){var d=this.getTileSize();return new K(l.min.unscaleBy(d).floor(),l.max.unscaleBy(d).ceil().subtract([1,1]))},_noTilesToLoad:function(){for(var l in this._tiles)if(!this._tiles[l].loaded)return!1;return!0}});function _H(l){return new Hu(l)}var ec=Hu.extend({options:{minZoom:0,maxZoom:18,subdomains:"abc",errorTileUrl:"",zoomOffset:0,tms:!1,zoomReverse:!1,detectRetina:!1,crossOrigin:!1,referrerPolicy:!1},initialize:function(l,d){this._url=l,d=w(this,d),d.detectRetina&&Oe.retina&&d.maxZoom>0?(d.tileSize=Math.floor(d.tileSize/2),d.zoomReverse?(d.zoomOffset--,d.minZoom=Math.min(d.maxZoom,d.minZoom+1)):(d.zoomOffset++,d.maxZoom=Math.max(d.minZoom,d.maxZoom-1)),d.minZoom=Math.max(0,d.minZoom)):d.zoomReverse?d.minZoom=Math.min(d.maxZoom,d.minZoom):d.maxZoom=Math.max(d.minZoom,d.maxZoom),typeof d.subdomains=="string"&&(d.subdomains=d.subdomains.split("")),this.on("tileunload",this._onTileRemove)},setUrl:function(l,d){return this._url===l&&d===void 0&&(d=!0),this._url=l,d||this.redraw(),this},createTile:function(l,d){var m=document.createElement("img");return Ae(m,"load",s(this._tileOnLoad,this,d,m)),Ae(m,"error",s(this._tileOnError,this,d,m)),(this.options.crossOrigin||this.options.crossOrigin==="")&&(m.crossOrigin=this.options.crossOrigin===!0?"":this.options.crossOrigin),typeof this.options.referrerPolicy=="string"&&(m.referrerPolicy=this.options.referrerPolicy),m.alt="",m.src=this.getTileUrl(l),m},getTileUrl:function(l){var d={r:Oe.retina?"@2x":"",s:this._getSubdomain(l),x:l.x,y:l.y,z:this._getZoomForUrl()};if(this._map&&!this._map.options.crs.infinite){var m=this._globalTileRange.max.y-l.y;this.options.tms&&(d.y=m),d["-y"]=m}return S(this._url,o(d,this.options))},_tileOnLoad:function(l,d){Oe.ielt9?setTimeout(s(l,this,null,d),0):l(null,d)},_tileOnError:function(l,d,m){var b=this.options.errorTileUrl;b&&d.getAttribute("src")!==b&&(d.src=b),l(m,d)},_onTileRemove:function(l){l.tile.onload=null},_getZoomForUrl:function(){var l=this._tileZoom,d=this.options.maxZoom,m=this.options.zoomReverse,b=this.options.zoomOffset;return m&&(l=d-l),l+b},_getSubdomain:function(l){var d=Math.abs(l.x+l.y)%this.options.subdomains.length;return this.options.subdomains[d]},_abortLoading:function(){var l,d;for(l in this._tiles)if(this._tiles[l].coords.z!==this._tileZoom&&(d=this._tiles[l].el,d.onload=p,d.onerror=p,!d.complete)){d.src=$;var m=this._tiles[l].coords;ut(d),delete this._tiles[l],this.fire("tileabort",{tile:d,coords:m})}},_removeTile:function(l){var d=this._tiles[l];if(d)return d.el.setAttribute("src",$),Hu.prototype._removeTile.call(this,l)},_tileReady:function(l,d,m){if(!(!this._map||m&&m.getAttribute("src")===$))return Hu.prototype._tileReady.call(this,l,d,m)}});function wC(l,d){return new ec(l,d)}var bC=ec.extend({defaultWmsParams:{service:"WMS",request:"GetMap",layers:"",styles:"",format:"image/jpeg",transparent:!1,version:"1.1.1"},options:{crs:null,uppercase:!1},initialize:function(l,d){this._url=l;var m=o({},this.defaultWmsParams);for(var b in d)b in this.options||(m[b]=d[b]);d=w(this,d);var C=d.detectRetina&&Oe.retina?2:1,T=this.getTileSize();m.width=T.x*C,m.height=T.y*C,this.wmsParams=m},onAdd:function(l){this._crs=this.options.crs||l.options.crs,this._wmsVersion=parseFloat(this.wmsParams.version);var d=this._wmsVersion>=1.3?"crs":"srs";this.wmsParams[d]=this._crs.code,ec.prototype.onAdd.call(this,l)},getTileUrl:function(l){var d=this._tileCoordsToNwSe(l),m=this._crs,b=ee(m.project(d[0]),m.project(d[1])),C=b.min,T=b.max,A=(this._wmsVersion>=1.3&&this._crs===pC?[C.y,C.x,T.y,T.x]:[C.x,C.y,T.x,T.y]).join(","),q=ec.prototype.getTileUrl.call(this,l);return q+P(this.wmsParams,q,this.options.uppercase)+(this.options.uppercase?"&BBOX=":"&bbox=")+A},setParams:function(l,d){return o(this.wmsParams,l),d||this.redraw(),this}});function wH(l,d){return new bC(l,d)}ec.WMS=bC,wC.wms=wH;var Ki=Ho.extend({options:{padding:.1},initialize:function(l){w(this,l),c(this),this._layers=this._layers||{}},onAdd:function(){this._container||(this._initContainer(),We(this._container,"leaflet-zoom-animated")),this.getPane().appendChild(this._container),this._update(),this.on("update",this._updatePaths,this)},onRemove:function(){this.off("update",this._updatePaths,this),this._destroyContainer()},getEvents:function(){var l={viewreset:this._reset,zoom:this._onZoom,moveend:this._update,zoomend:this._onZoomEnd};return this._zoomAnimated&&(l.zoomanim=this._onAnimZoom),l},_onAnimZoom:function(l){this._updateTransform(l.center,l.zoom)},_onZoom:function(){this._updateTransform(this._map.getCenter(),this._map.getZoom())},_updateTransform:function(l,d){var m=this._map.getZoomScale(d,this._zoom),b=this._map.getSize().multiplyBy(.5+this.options.padding),C=this._map.project(this._center,d),T=b.multiplyBy(-m).add(C).subtract(this._map._getNewPixelOrigin(l,d));Oe.any3d?Ha(this._container,T,m):on(this._container,T)},_reset:function(){this._update(),this._updateTransform(this._center,this._zoom);for(var l in this._layers)this._layers[l]._reset()},_onZoomEnd:function(){for(var l in this._layers)this._layers[l]._project()},_updatePaths:function(){for(var l in this._layers)this._layers[l]._update()},_update:function(){var l=this.options.padding,d=this._map.getSize(),m=this._map.containerPointToLayerPoint(d.multiplyBy(-l)).round();this._bounds=new K(m,m.add(d.multiplyBy(1+l*2)).round()),this._center=this._map.getCenter(),this._zoom=this._map.getZoom()}}),xC=Ki.extend({options:{tolerance:0},getEvents:function(){var l=Ki.prototype.getEvents.call(this);return l.viewprereset=this._onViewPreReset,l},_onViewPreReset:function(){this._postponeUpdatePaths=!0},onAdd:function(){Ki.prototype.onAdd.call(this),this._draw()},_initContainer:function(){var l=this._container=document.createElement("canvas");Ae(l,"mousemove",this._onMouseMove,this),Ae(l,"click dblclick mousedown mouseup contextmenu",this._onClick,this),Ae(l,"mouseout",this._handleMouseOut,this),l._leaflet_disable_events=!0,this._ctx=l.getContext("2d")},_destroyContainer:function(){X(this._redrawRequest),delete this._ctx,ut(this._container),Pt(this._container),delete this._container},_updatePaths:function(){if(!this._postponeUpdatePaths){var l;this._redrawBounds=null;for(var d in this._layers)l=this._layers[d],l._update();this._redraw()}},_update:function(){if(!(this._map._animatingZoom&&this._bounds)){Ki.prototype._update.call(this);var l=this._bounds,d=this._container,m=l.getSize(),b=Oe.retina?2:1;on(d,l.min),d.width=b*m.x,d.height=b*m.y,d.style.width=m.x+"px",d.style.height=m.y+"px",Oe.retina&&this._ctx.scale(2,2),this._ctx.translate(-l.min.x,-l.min.y),this.fire("update")}},_reset:function(){Ki.prototype._reset.call(this),this._postponeUpdatePaths&&(this._postponeUpdatePaths=!1,this._updatePaths())},_initPath:function(l){this._updateDashArray(l),this._layers[c(l)]=l;var d=l._order={layer:l,prev:this._drawLast,next:null};this._drawLast&&(this._drawLast.next=d),this._drawLast=d,this._drawFirst=this._drawFirst||this._drawLast},_addPath:function(l){this._requestRedraw(l)},_removePath:function(l){var d=l._order,m=d.next,b=d.prev;m?m.prev=b:this._drawLast=b,b?b.next=m:this._drawFirst=m,delete l._order,delete this._layers[c(l)],this._requestRedraw(l)},_updatePath:function(l){this._extendRedrawBounds(l),l._project(),l._update(),this._requestRedraw(l)},_updateStyle:function(l){this._updateDashArray(l),this._requestRedraw(l)},_updateDashArray:function(l){if(typeof l.options.dashArray=="string"){var d=l.options.dashArray.split(/[, ]+/),m=[],b,C;for(C=0;C')}}catch{}return function(l){return document.createElement("<"+l+' xmlns="urn:schemas-microsoft.com:vml" class="lvml">')}}(),bH={_initContainer:function(){this._container=Fe("div","leaflet-vml-container")},_update:function(){this._map._animatingZoom||(Ki.prototype._update.call(this),this.fire("update"))},_initPath:function(l){var d=l._container=Wu("shape");We(d,"leaflet-vml-shape "+(this.options.className||"")),d.coordsize="1 1",l._path=Wu("path"),d.appendChild(l._path),this._updateStyle(l),this._layers[c(l)]=l},_addPath:function(l){var d=l._container;this._container.appendChild(d),l.options.interactive&&l.addInteractiveTarget(d)},_removePath:function(l){var d=l._container;ut(d),l.removeInteractiveTarget(d),delete this._layers[c(l)]},_updateStyle:function(l){var d=l._stroke,m=l._fill,b=l.options,C=l._container;C.stroked=!!b.stroke,C.filled=!!b.fill,b.stroke?(d||(d=l._stroke=Wu("stroke")),C.appendChild(d),d.weight=b.weight+"px",d.color=b.color,d.opacity=b.opacity,b.dashArray?d.dashStyle=O(b.dashArray)?b.dashArray.join(" "):b.dashArray.replace(/( *, *)/g," "):d.dashStyle="",d.endcap=b.lineCap.replace("butt","flat"),d.joinstyle=b.lineJoin):d&&(C.removeChild(d),l._stroke=null),b.fill?(m||(m=l._fill=Wu("fill")),C.appendChild(m),m.color=b.fillColor||b.color,m.opacity=b.fillOpacity):m&&(C.removeChild(m),l._fill=null)},_updateCircle:function(l){var d=l._point.round(),m=Math.round(l._radius),b=Math.round(l._radiusY||m);this._setPath(l,l._empty()?"M0 0":"AL "+d.x+","+d.y+" "+m+","+b+" 0,"+65535*360)},_setPath:function(l,d){l._path.v=d},_bringToFront:function(l){Po(l._container)},_bringToBack:function(l){Nr(l._container)}},gp=Oe.vml?Wu:bt,Uu=Ki.extend({_initContainer:function(){this._container=gp("svg"),this._container.setAttribute("pointer-events","none"),this._rootGroup=gp("g"),this._container.appendChild(this._rootGroup)},_destroyContainer:function(){ut(this._container),Pt(this._container),delete this._container,delete this._rootGroup,delete this._svgSize},_update:function(){if(!(this._map._animatingZoom&&this._bounds)){Ki.prototype._update.call(this);var l=this._bounds,d=l.getSize(),m=this._container;(!this._svgSize||!this._svgSize.equals(d))&&(this._svgSize=d,m.setAttribute("width",d.x),m.setAttribute("height",d.y)),on(m,l.min),m.setAttribute("viewBox",[l.min.x,l.min.y,d.x,d.y].join(" ")),this.fire("update")}},_initPath:function(l){var d=l._path=gp("path");l.options.className&&We(d,l.options.className),l.options.interactive&&We(d,"leaflet-interactive"),this._updateStyle(l),this._layers[c(l)]=l},_addPath:function(l){this._rootGroup||this._initContainer(),this._rootGroup.appendChild(l._path),l.addInteractiveTarget(l._path)},_removePath:function(l){ut(l._path),l.removeInteractiveTarget(l._path),delete this._layers[c(l)]},_updatePath:function(l){l._project(),l._update()},_updateStyle:function(l){var d=l._path,m=l.options;d&&(m.stroke?(d.setAttribute("stroke",m.color),d.setAttribute("stroke-opacity",m.opacity),d.setAttribute("stroke-width",m.weight),d.setAttribute("stroke-linecap",m.lineCap),d.setAttribute("stroke-linejoin",m.lineJoin),m.dashArray?d.setAttribute("stroke-dasharray",m.dashArray):d.removeAttribute("stroke-dasharray"),m.dashOffset?d.setAttribute("stroke-dashoffset",m.dashOffset):d.removeAttribute("stroke-dashoffset")):d.setAttribute("stroke","none"),m.fill?(d.setAttribute("fill",m.fillColor||m.color),d.setAttribute("fill-opacity",m.fillOpacity),d.setAttribute("fill-rule",m.fillRule||"evenodd")):d.setAttribute("fill","none"))},_updatePoly:function(l,d){this._setPath(l,_n(l._parts,d))},_updateCircle:function(l){var d=l._point,m=Math.max(Math.round(l._radius),1),b=Math.max(Math.round(l._radiusY),1)||m,C="a"+m+","+b+" 0 1,0 ",T=l._empty()?"M0 0":"M"+(d.x-m)+","+d.y+C+m*2+",0 "+C+-m*2+",0 ";this._setPath(l,T)},_setPath:function(l,d){l._path.setAttribute("d",d)},_bringToFront:function(l){Po(l._path)},_bringToBack:function(l){Nr(l._path)}});Oe.vml&&Uu.include(bH);function PC(l){return Oe.svg||Oe.vml?new Uu(l):null}rt.include({getRenderer:function(l){var d=l.options.renderer||this._getPaneRenderer(l.options.pane)||this.options.renderer||this._renderer;return d||(d=this._renderer=this._createRenderer()),this.hasLayer(d)||this.addLayer(d),d},_getPaneRenderer:function(l){if(l==="overlayPane"||l===void 0)return!1;var d=this._paneRenderers[l];return d===void 0&&(d=this._createRenderer({pane:l}),this._paneRenderers[l]=d),d},_createRenderer:function(l){return this.options.preferCanvas&&SC(l)||PC(l)}});var OC=Xl.extend({initialize:function(l,d){Xl.prototype.initialize.call(this,this._boundsToLatLngs(l),d)},setBounds:function(l){return this.setLatLngs(this._boundsToLatLngs(l))},_boundsToLatLngs:function(l){return l=ie(l),[l.getSouthWest(),l.getNorthWest(),l.getNorthEast(),l.getSouthEast()]}});function xH(l,d){return new OC(l,d)}Uu.create=gp,Uu.pointsToPath=_n,Yi.geometryToLayer=cp,Yi.coordsToLatLng=Z1,Yi.coordsToLatLngs=up,Yi.latLngToCoords=G1,Yi.latLngsToCoords=dp,Yi.getFeature=Ql,Yi.asFeature=fp,rt.mergeOptions({boxZoom:!0});var CC=li.extend({initialize:function(l){this._map=l,this._container=l._container,this._pane=l._panes.overlayPane,this._resetStateTimeout=0,l.on("unload",this._destroy,this)},addHooks:function(){Ae(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){Pt(this._container,"mousedown",this._onMouseDown,this)},moved:function(){return this._moved},_destroy:function(){ut(this._pane),delete this._pane},_resetState:function(){this._resetStateTimeout=0,this._moved=!1},_clearDeferredResetState:function(){this._resetStateTimeout!==0&&(clearTimeout(this._resetStateTimeout),this._resetStateTimeout=0)},_onMouseDown:function(l){if(!l.shiftKey||l.which!==1&&l.button!==1)return!1;this._clearDeferredResetState(),this._resetState(),Du(),$1(),this._startPoint=this._map.mouseEventToContainerPoint(l),Ae(document,{contextmenu:Za,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseMove:function(l){this._moved||(this._moved=!0,this._box=Fe("div","leaflet-zoom-box",this._container),We(this._container,"leaflet-crosshair"),this._map.fire("boxzoomstart")),this._point=this._map.mouseEventToContainerPoint(l);var d=new K(this._point,this._startPoint),m=d.getSize();on(this._box,d.min),this._box.style.width=m.x+"px",this._box.style.height=m.y+"px"},_finish:function(){this._moved&&(ut(this._box),Xt(this._container,"leaflet-crosshair")),Ru(),M1(),Pt(document,{contextmenu:Za,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseUp:function(l){if(!(l.which!==1&&l.button!==1)&&(this._finish(),!!this._moved)){this._clearDeferredResetState(),this._resetStateTimeout=setTimeout(s(this._resetState,this),0);var d=new fe(this._map.containerPointToLatLng(this._startPoint),this._map.containerPointToLatLng(this._point));this._map.fitBounds(d).fire("boxzoomend",{boxZoomBounds:d})}},_onKeyDown:function(l){l.keyCode===27&&(this._finish(),this._clearDeferredResetState(),this._resetState())}});rt.addInitHook("addHandler","boxZoom",CC),rt.mergeOptions({doubleClickZoom:!0});var kC=li.extend({addHooks:function(){this._map.on("dblclick",this._onDoubleClick,this)},removeHooks:function(){this._map.off("dblclick",this._onDoubleClick,this)},_onDoubleClick:function(l){var d=this._map,m=d.getZoom(),b=d.options.zoomDelta,C=l.originalEvent.shiftKey?m-b:m+b;d.options.doubleClickZoom==="center"?d.setZoom(C):d.setZoomAround(l.containerPoint,C)}});rt.addInitHook("addHandler","doubleClickZoom",kC),rt.mergeOptions({dragging:!0,inertia:!0,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,easeLinearity:.2,worldCopyJump:!1,maxBoundsViscosity:0});var EC=li.extend({addHooks:function(){if(!this._draggable){var l=this._map;this._draggable=new $s(l._mapPane,l._container),this._draggable.on({dragstart:this._onDragStart,drag:this._onDrag,dragend:this._onDragEnd},this),this._draggable.on("predrag",this._onPreDragLimit,this),l.options.worldCopyJump&&(this._draggable.on("predrag",this._onPreDragWrap,this),l.on("zoomend",this._onZoomEnd,this),l.whenReady(this._onZoomEnd,this))}We(this._map._container,"leaflet-grab leaflet-touch-drag"),this._draggable.enable(),this._positions=[],this._times=[]},removeHooks:function(){Xt(this._map._container,"leaflet-grab"),Xt(this._map._container,"leaflet-touch-drag"),this._draggable.disable()},moved:function(){return this._draggable&&this._draggable._moved},moving:function(){return this._draggable&&this._draggable._moving},_onDragStart:function(){var l=this._map;if(l._stop(),this._map.options.maxBounds&&this._map.options.maxBoundsViscosity){var d=ie(this._map.options.maxBounds);this._offsetLimit=ee(this._map.latLngToContainerPoint(d.getNorthWest()).multiplyBy(-1),this._map.latLngToContainerPoint(d.getSouthEast()).multiplyBy(-1).add(this._map.getSize())),this._viscosity=Math.min(1,Math.max(0,this._map.options.maxBoundsViscosity))}else this._offsetLimit=null;l.fire("movestart").fire("dragstart"),l.options.inertia&&(this._positions=[],this._times=[])},_onDrag:function(l){if(this._map.options.inertia){var d=this._lastTime=+new Date,m=this._lastPos=this._draggable._absPos||this._draggable._newPos;this._positions.push(m),this._times.push(d),this._prunePositions(d)}this._map.fire("move",l).fire("drag",l)},_prunePositions:function(l){for(;this._positions.length>1&&l-this._times[0]>50;)this._positions.shift(),this._times.shift()},_onZoomEnd:function(){var l=this._map.getSize().divideBy(2),d=this._map.latLngToLayerPoint([0,0]);this._initialWorldOffset=d.subtract(l).x,this._worldWidth=this._map.getPixelWorldBounds().getSize().x},_viscousLimit:function(l,d){return l-(l-d)*this._viscosity},_onPreDragLimit:function(){if(!(!this._viscosity||!this._offsetLimit)){var l=this._draggable._newPos.subtract(this._draggable._startPos),d=this._offsetLimit;l.xd.max.x&&(l.x=this._viscousLimit(l.x,d.max.x)),l.y>d.max.y&&(l.y=this._viscousLimit(l.y,d.max.y)),this._draggable._newPos=this._draggable._startPos.add(l)}},_onPreDragWrap:function(){var l=this._worldWidth,d=Math.round(l/2),m=this._initialWorldOffset,b=this._draggable._newPos.x,C=(b-d+m)%l+d-m,T=(b+d+m)%l-d-m,A=Math.abs(C+m)0?T:-T))-d;this._delta=0,this._startTime=null,A&&(l.options.scrollWheelZoom==="center"?l.setZoom(d+A):l.setZoomAround(this._lastMousePos,d+A))}});rt.addInitHook("addHandler","scrollWheelZoom",MC);var SH=600;rt.mergeOptions({tapHold:Oe.touchNative&&Oe.safari&&Oe.mobile,tapTolerance:15});var NC=li.extend({addHooks:function(){Ae(this._map._container,"touchstart",this._onDown,this)},removeHooks:function(){Pt(this._map._container,"touchstart",this._onDown,this)},_onDown:function(l){if(clearTimeout(this._holdTimeout),l.touches.length===1){var d=l.touches[0];this._startPos=this._newPos=new j(d.clientX,d.clientY),this._holdTimeout=setTimeout(s(function(){this._cancel(),this._isTapValid()&&(Ae(document,"touchend",In),Ae(document,"touchend touchcancel",this._cancelClickPrevent),this._simulateEvent("contextmenu",d))},this),SH),Ae(document,"touchend touchcancel contextmenu",this._cancel,this),Ae(document,"touchmove",this._onMove,this)}},_cancelClickPrevent:function l(){Pt(document,"touchend",In),Pt(document,"touchend touchcancel",l)},_cancel:function(){clearTimeout(this._holdTimeout),Pt(document,"touchend touchcancel contextmenu",this._cancel,this),Pt(document,"touchmove",this._onMove,this)},_onMove:function(l){var d=l.touches[0];this._newPos=new j(d.clientX,d.clientY)},_isTapValid:function(){return this._newPos.distanceTo(this._startPos)<=this._map.options.tapTolerance},_simulateEvent:function(l,d){var m=new MouseEvent(l,{bubbles:!0,cancelable:!0,view:window,screenX:d.screenX,screenY:d.screenY,clientX:d.clientX,clientY:d.clientY});m._simulated=!0,d.target.dispatchEvent(m)}});rt.addInitHook("addHandler","tapHold",NC),rt.mergeOptions({touchZoom:Oe.touch,bounceAtZoomLimits:!0});var TC=li.extend({addHooks:function(){We(this._map._container,"leaflet-touch-zoom"),Ae(this._map._container,"touchstart",this._onTouchStart,this)},removeHooks:function(){Xt(this._map._container,"leaflet-touch-zoom"),Pt(this._map._container,"touchstart",this._onTouchStart,this)},_onTouchStart:function(l){var d=this._map;if(!(!l.touches||l.touches.length!==2||d._animatingZoom||this._zooming)){var m=d.mouseEventToContainerPoint(l.touches[0]),b=d.mouseEventToContainerPoint(l.touches[1]);this._centerPoint=d.getSize()._divideBy(2),this._startLatLng=d.containerPointToLatLng(this._centerPoint),d.options.touchZoom!=="center"&&(this._pinchStartLatLng=d.containerPointToLatLng(m.add(b)._divideBy(2))),this._startDist=m.distanceTo(b),this._startZoom=d.getZoom(),this._moved=!1,this._zooming=!0,d._stop(),Ae(document,"touchmove",this._onTouchMove,this),Ae(document,"touchend touchcancel",this._onTouchEnd,this),In(l)}},_onTouchMove:function(l){if(!(!l.touches||l.touches.length!==2||!this._zooming)){var d=this._map,m=d.mouseEventToContainerPoint(l.touches[0]),b=d.mouseEventToContainerPoint(l.touches[1]),C=m.distanceTo(b)/this._startDist;if(this._zoom=d.getScaleZoom(C,this._startZoom),!d.options.bounceAtZoomLimits&&(this._zoomd.getMaxZoom()&&C>1)&&(this._zoom=d._limitZoom(this._zoom)),d.options.touchZoom==="center"){if(this._center=this._startLatLng,C===1)return}else{var T=m._add(b)._divideBy(2)._subtract(this._centerPoint);if(C===1&&T.x===0&&T.y===0)return;this._center=d.unproject(d.project(this._pinchStartLatLng,this._zoom).subtract(T),this._zoom)}this._moved||(d._moveStart(!0,!1),this._moved=!0),X(this._animRequest);var A=s(d._move,d,this._center,this._zoom,{pinch:!0,round:!1},void 0);this._animRequest=G(A,this,!0),In(l)}},_onTouchEnd:function(){if(!this._moved||!this._zooming){this._zooming=!1;return}this._zooming=!1,X(this._animRequest),Pt(document,"touchmove",this._onTouchMove,this),Pt(document,"touchend touchcancel",this._onTouchEnd,this),this._map.options.zoomAnimation?this._map._animateZoom(this._center,this._map._limitZoom(this._zoom),!0,this._map.options.zoomSnap):this._map._resetView(this._center,this._map._limitZoom(this._zoom))}});rt.addInitHook("addHandler","touchZoom",TC),rt.BoxZoom=CC,rt.DoubleClickZoom=kC,rt.Drag=EC,rt.Keyboard=$C,rt.ScrollWheelZoom=MC,rt.TapHold=NC,rt.TouchZoom=TC,n.Bounds=K,n.Browser=Oe,n.CRS=le,n.Canvas=xC,n.Circle=U1,n.CircleMarker=lp,n.Class=V,n.Control=Vo,n.DivIcon=_C,n.DivOverlay=ci,n.DomEvent=FV,n.DomUtil=AV,n.Draggable=$s,n.Evented=Y,n.FeatureGroup=Zi,n.GeoJSON=Yi,n.GridLayer=Hu,n.Handler=li,n.Icon=Jl,n.ImageOverlay=pp,n.LatLng=J,n.LatLngBounds=fe,n.Layer=Ho,n.LayerGroup=ql,n.LineUtil=eH,n.Map=rt,n.Marker=ap,n.Mixin=YV,n.Path=Ms,n.Point=j,n.PolyUtil=KV,n.Polygon=Xl,n.Polyline=Gi,n.Popup=hp,n.PosAnimation=tC,n.Projection=tH,n.Rectangle=OC,n.Renderer=Ki,n.SVG=Uu,n.SVGOverlay=yC,n.TileLayer=ec,n.Tooltip=mp,n.Transformation=He,n.Util=Q,n.VideoOverlay=vC,n.bind=s,n.bounds=ee,n.canvas=SC,n.circle=cH,n.circleMarker=lH,n.control=Bu,n.divIcon=yH,n.extend=o,n.featureGroup=iH,n.geoJSON=gC,n.geoJson=fH,n.gridLayer=_H,n.icon=sH,n.imageOverlay=pH,n.latLng=ne,n.latLngBounds=ie,n.layerGroup=oH,n.map=VV,n.marker=aH,n.point=F,n.polygon=dH,n.polyline=uH,n.popup=gH,n.rectangle=xH,n.setOptions=w,n.stamp=c,n.svg=PC,n.svgOverlay=mH,n.tileLayer=wC,n.tooltip=vH,n.transformation=Te,n.version=r,n.videoOverlay=hH;var PH=window.L;n.noConflict=function(){return window.L=PH,this},window.L=n})})(Rx,Rx.exports);var l1=Rx.exports;const bi=Ea(l1);function gF(e,t){const n=_.useRef(t);_.useEffect(function(){t!==n.current&&e.attributionControl!=null&&(n.current!=null&&e.attributionControl.removeAttribution(n.current),t!=null&&e.attributionControl.addAttribution(t)),n.current=t},[e,t])}const f$e=1;function p$e(e){return Object.freeze({__version:f$e,map:e})}function h$e(e,t){return Object.freeze({...e,...t})}const vF=_.createContext(null),yF=vF.Provider;function EO(){const e=_.useContext(vF);if(e==null)throw new Error("No context provided: useLeafletContext() can only be used in a descendant of ");return e}function m$e(e){function t(n,r){const{instance:o,context:i}=e(n).current;return _.useImperativeHandle(r,()=>o),n.children==null?null:k.createElement(yF,{value:i},n.children)}return _.forwardRef(t)}function g$e(e){function t(n,r){const[o,i]=_.useState(!1),{instance:s}=e(n,i).current;_.useImperativeHandle(r,()=>s),_.useEffect(function(){o&&s.update()},[s,o,n.children]);const a=s._contentNode;return a?xs.createPortal(n.children,a):null}return _.forwardRef(t)}function _F(e,t){const n=_.useRef();_.useEffect(function(){return t!=null&&e.instance.on(t),n.current=t,function(){n.current!=null&&e.instance.off(n.current),n.current=null}},[e,t])}function wF(e,t){const n=e.pane??t.pane;return n?{...e,pane:n}:e}function v$e(e,t){return function(r,o){const i=EO(),s=e(wF(r,i),i);return gF(i.map,r.attribution),_F(s.current,r.eventHandlers),t(s.current,i,r,o),s}}function bF(e,t,n){return Object.freeze({instance:e,context:t,container:n})}function xF(e,t){return t==null?function(r,o){const i=_.useRef();return i.current||(i.current=e(r,o)),i}:function(r,o){const i=_.useRef();i.current||(i.current=e(r,o));const s=_.useRef(r),{instance:a}=i.current;return _.useEffect(function(){s.current!==r&&(t(a,r,s.current),s.current=r)},[a,r,o]),i}}function y$e(e,t){_.useEffect(function(){return(t.layerContainer??t.map).addLayer(e.instance),function(){t.layerContainer?.removeLayer(e.instance),t.map.removeLayer(e.instance)}},[t,e])}function _$e(e){return function(n){const r=EO(),o=e(wF(n,r),r);return gF(r.map,n.attribution),_F(o.current,n.eventHandlers),y$e(o.current,r),o}}function w$e(e,t){const n=xF(e,t),r=_$e(n);return m$e(r)}function b$e(e,t){const n=xF(e),r=v$e(n,t);return g$e(r)}function x$e(){return EO().map}function zx(){return zx=Object.assign||function(e){for(var t=1;tv?.map??null,[v]);const w=_.useCallback(x=>{if(x!==null&&v===null){const S=new l1.Map(x,f);n!=null&&u!=null?S.setView(n,u):e!=null&&S.fitBounds(e,t),c!=null&&S.whenReady(c),y(p$e(S))}},[]);_.useEffect(()=>()=>{v?.map.remove()},[v]);const P=v?k.createElement(yF,{value:v},r):s??null;return k.createElement("div",zx({},g,{ref:w}),P)}const P$e=_.forwardRef(S$e),SF=w$e(function({position:t,...n},r){const o=new l1.Marker(t,n);return bF(o,h$e(r,{overlayContainer:o}))},function(t,n,r){n.position!==r.position&&t.setLatLng(n.position),n.icon!=null&&n.icon!==r.icon&&t.setIcon(n.icon),n.zIndexOffset!=null&&n.zIndexOffset!==r.zIndexOffset&&t.setZIndexOffset(n.zIndexOffset),n.opacity!=null&&n.opacity!==r.opacity&&t.setOpacity(n.opacity),t.dragging!=null&&n.draggable!==r.draggable&&(n.draggable===!0?t.dragging.enable():t.dragging.disable())}),O$e=b$e(function(t,n){const r=new l1.Popup(t,n.overlayContainer);return bF(r,n)},function(t,n,{position:r},o){_.useEffect(function(){const{instance:s}=t;function a(u){u.popup===s&&(s.update(),o(!0))}function c(u){u.popup===s&&o(!1)}return n.map.on({popupopen:a,popupclose:c}),n.overlayContainer==null?(r!=null&&s.setLatLng(r),s.openOn(n.map)):n.overlayContainer.bindPopup(s),function(){n.map.off({popupopen:a,popupclose:c}),n.overlayContainer?.unbindPopup(),n.map.removeLayer(s)}},[t,n,o,r])}),C$e=e=>{const t=x$e(),n=bi.tileLayer(`https://s.rsg.sc/sc/images/games/GTAV/map/${e.mapLayer}/{z}/{x}/{y}.jpg`,{maxZoom:7,minZoom:2,bounds:bi.latLngBounds(bi.latLng(0,128),bi.latLng(-192,0))}),r=bi.latLngBounds(bi.latLng(0,128),bi.latLng(-192,0));return t.setMaxBounds(r),t.attributionControl.setPrefix(!1),t.setView([0,0],2),t.addLayer(n),null};var Iu={};/** * @license React * react-dom-server-legacy.browser.production.min.js * @@ -683,13 +683,13 @@ img.ProseMirror-separator { * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var PF=_;function Be(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n