From fc7e6a34a782128276b95de690d4bce6769b86e5 Mon Sep 17 00:00:00 2001 From: egutierrez Date: Thu, 14 May 2026 17:43:29 +0200 Subject: [PATCH] feat(kanban): reporte diario al click en dia del calendario (issue 0093) Adds a daily report dashboard accessible by clicking a day number in the calendar view. Renders inside a full-width modal (90% width). Backend (new file backend/reports.go): - Type DailyReport with KPIs, rankings, done_cards list, reopened cards, 3-bucket stale list (7/14/30d), lead time avg+p50+p95, 24-hour movement histogram, deadlines met/missed list, tag distribution and archived count. - DB.DailyReportFor(date, tz) uses Europe/Madrid by default; computes [start,end) in local time, converts to UTC and queries: * cards.completed_at in range -> done list * card_events kind=created in range -> created counts * card_column_history.entered_at in range -> moves + hourly * previousColumnWasDone() -> reopened detection * card_lock_history overlapping the day -> blocked_ms * stale buckets: open history entries on non-done columns aged >=7d - New route GET /api/reports/daily?date=YYYY-MM-DD&tz=Europe/Madrid. Frontend: - api.ts: DailyReport type + dailyReport(date, tz?) call. - New component DailyReportView (components/DailyReport.tsx): * 6 KPI cards (Hechas, Creadas, Movimientos, Bloqueado, Reabiertas, Deadlines on-time %). * 4 ranking cards (Top assignees done, Top assignees created, Top requesters atendidas, Top requesters aportadas). * Done cards table with click-to-jump (links open the card in board). * Mantine BarChart with movements per hour. * Tag chips, reopened list, deadlines list with late_ms, stale buckets. - CalendarView wraps the day number in UnstyledButton with data-test attribute and forwards onOpenDailyReport. - App.handleOpenDailyReport opens modals.open size 90% with the view; click on a card title closes the modal and jumps to the board with highlight (reuses existing handleJumpToCard). Tests (e2e/daily-report.spec.ts): - Endpoint shape: kpis, done_cards, hourly_moves[24], stale buckets. - Calendar day click opens the modal with "Reporte diario" title and KPI labels visible. Co-Authored-By: Claude Opus 4.7 (1M context) --- backend/dist/assets/index-B70qRZGH.js | 1181 --------------------- backend/dist/assets/index-zy-U5pO-.js | 1186 ++++++++++++++++++++++ backend/dist/index.html | 2 +- backend/handlers.go | 21 + backend/reports.go | 588 +++++++++++ frontend/e2e/daily-report.spec.ts | 57 ++ frontend/src/App.tsx | 19 +- frontend/src/api.ts | 84 ++ frontend/src/components/CalendarView.tsx | 23 +- frontend/src/components/DailyReport.tsx | 523 ++++++++++ 10 files changed, 2497 insertions(+), 1187 deletions(-) delete mode 100644 backend/dist/assets/index-B70qRZGH.js create mode 100644 backend/dist/assets/index-zy-U5pO-.js create mode 100644 backend/reports.go create mode 100644 frontend/e2e/daily-report.spec.ts create mode 100644 frontend/src/components/DailyReport.tsx diff --git a/backend/dist/assets/index-B70qRZGH.js b/backend/dist/assets/index-B70qRZGH.js deleted file mode 100644 index 74afbd6..0000000 --- a/backend/dist/assets/index-B70qRZGH.js +++ /dev/null @@ -1,1181 +0,0 @@ -function BY(e,n){for(var t=0;ti[r]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const n=document.createElement("link").relList;if(n&&n.supports&&n.supports("modulepreload"))return;for(const r of document.querySelectorAll('link[rel="modulepreload"]'))i(r);new MutationObserver(r=>{for(const a of r)if(a.type==="childList")for(const o of a.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&i(o)}).observe(document,{childList:!0,subtree:!0});function t(r){const a={};return r.integrity&&(a.integrity=r.integrity),r.referrerPolicy&&(a.referrerPolicy=r.referrerPolicy),r.crossOrigin==="use-credentials"?a.credentials="include":r.crossOrigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function i(r){if(r.ep)return;r.ep=!0;const a=t(r);fetch(r.href,a)}})();var Av=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function dt(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Vw={exports:{}},qd={};/** - * @license React - * react-jsx-runtime.production.js - * - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var n5;function FY(){if(n5)return qd;n5=1;var e=Symbol.for("react.transitional.element"),n=Symbol.for("react.fragment");function t(i,r,a){var o=null;if(a!==void 0&&(o=""+a),r.key!==void 0&&(o=""+r.key),"key"in r){a={};for(var l in r)l!=="key"&&(a[l]=r[l])}else a=r;return r=a.ref,{$$typeof:e,type:i,key:o,ref:r!==void 0?r:null,props:a}}return qd.Fragment=n,qd.jsx=t,qd.jsxs=t,qd}var t5;function qY(){return t5||(t5=1,Vw.exports=FY()),Vw.exports}var y=qY();function Tt(e){return Object.keys(e)}function Ww(e){return e&&typeof e=="object"&&!Array.isArray(e)}function b6(e,n){const t={...e},i=n;return Ww(e)&&Ww(n)&&Object.keys(n).forEach(r=>{Ww(i[r])&&r in e?t[r]=b6(t[r],i[r]):t[r]=i[r]}),t}function HY(e){return e.replace(/[A-Z]/g,n=>`-${n.toLowerCase()}`)}function UY(e){var n;return typeof e!="string"||!e.includes("var(--mantine-scale)")?e:(n=e.match(/^calc\((.*?)\)$/))==null?void 0:n[1].split("*")[0].trim()}function Rh(e){const n=UY(e);return typeof n=="number"?n:typeof n=="string"?n.includes("calc")||n.includes("var")?n:n.includes("px")?Number(n.replace("px","")):n.includes("rem")?Number(n.replace("rem",""))*16:n.includes("em")?Number(n.replace("em",""))*16:Number(n):NaN}function i5(e){return e==="0rem"?"0rem":`calc(${e} * var(--mantine-scale))`}function K$(e,{shouldScale:n=!1}={}){function t(i){if(i===0||i==="0")return`0${e}`;if(typeof i=="number"){const r=`${i/16}${e}`;return n?i5(r):r}if(typeof i=="string"){if(i===""||i.startsWith("calc(")||i.startsWith("clamp(")||i.includes("rgba("))return i;if(i.includes(","))return i.split(",").map(a=>t(a)).join(",");if(i.includes(" "))return i.split(" ").map(a=>t(a)).join(" ");const r=i.replace("px","");if(!Number.isNaN(Number(r))){const a=`${Number(r)/16}${e}`;return n?i5(a):a}}return i}return t}const pe=K$("rem",{shouldScale:!0}),wg=K$("em");function xu(e){return Object.keys(e).reduce((n,t)=>(e[t]!==void 0&&(n[t]=e[t]),n),{})}function X$(e){if(typeof e=="number")return!0;if(typeof e=="string"){if(e.startsWith("calc(")||e.startsWith("var(")||e.includes(" ")&&e.trim()!=="")return!0;const n=/^[+-]?[0-9]+(\.[0-9]+)?(px|em|rem|ex|ch|lh|rlh|vw|vh|vmin|vmax|vb|vi|svw|svh|lvw|lvh|dvw|dvh|cm|mm|in|pt|pc|q|cqw|cqh|cqi|cqb|cqmin|cqmax|%)?$/;return e.trim().split(/\s+/).every(t=>n.test(t))}return!1}var Gw={exports:{}},Mn={};/** - * @license React - * react.production.js - * - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var r5;function VY(){if(r5)return Mn;r5=1;var e=Symbol.for("react.transitional.element"),n=Symbol.for("react.portal"),t=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),r=Symbol.for("react.profiler"),a=Symbol.for("react.consumer"),o=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),c=Symbol.for("react.memo"),h=Symbol.for("react.lazy"),d=Symbol.for("react.activity"),p=Symbol.iterator;function v(V){return V===null||typeof V!="object"?null:(V=p&&V[p]||V["@@iterator"],typeof V=="function"?V:null)}var b={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},w=Object.assign,k={};function _(V,W,$){this.props=V,this.context=W,this.refs=k,this.updater=$||b}_.prototype.isReactComponent={},_.prototype.setState=function(V,W){if(typeof V!="object"&&typeof V!="function"&&V!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,V,W,"setState")},_.prototype.forceUpdate=function(V){this.updater.enqueueForceUpdate(this,V,"forceUpdate")};function x(){}x.prototype=_.prototype;function C(V,W,$){this.props=V,this.context=W,this.refs=k,this.updater=$||b}var T=C.prototype=new x;T.constructor=C,w(T,_.prototype),T.isPureReactComponent=!0;var O=Array.isArray;function E(){}var M={H:null,A:null,T:null,S:null},N=Object.prototype.hasOwnProperty;function F(V,W,$){var X=$.ref;return{$$typeof:e,type:V,key:W,ref:X!==void 0?X:null,props:$}}function R(V,W){return F(V.type,W,V.props)}function L(V){return typeof V=="object"&&V!==null&&V.$$typeof===e}function B(V){var W={"=":"=0",":":"=2"};return"$"+V.replace(/[=:]/g,function($){return W[$]})}var G=/\/+/g;function U(V,W){return typeof V=="object"&&V!==null&&V.key!=null?B(""+V.key):W.toString(36)}function H(V){switch(V.status){case"fulfilled":return V.value;case"rejected":throw V.reason;default:switch(typeof V.status=="string"?V.then(E,E):(V.status="pending",V.then(function(W){V.status==="pending"&&(V.status="fulfilled",V.value=W)},function(W){V.status==="pending"&&(V.status="rejected",V.reason=W)})),V.status){case"fulfilled":return V.value;case"rejected":throw V.reason}}throw V}function P(V,W,$,X,ee){var re=typeof V;(re==="undefined"||re==="boolean")&&(V=null);var se=!1;if(V===null)se=!0;else switch(re){case"bigint":case"string":case"number":se=!0;break;case"object":switch(V.$$typeof){case e:case n:se=!0;break;case h:return se=V._init,P(se(V._payload),W,$,X,ee)}}if(se)return ee=ee(V),se=X===""?"."+U(V,0):X,O(ee)?($="",se!=null&&($=se.replace(G,"$&/")+"/"),P(ee,W,$,"",function(le){return le})):ee!=null&&(L(ee)&&(ee=R(ee,$+(ee.key==null||V&&V.key===ee.key?"":(""+ee.key).replace(G,"$&/")+"/")+se)),W.push(ee)),1;se=0;var ge=X===""?".":X+":";if(O(V))for(var ae=0;ae{const i=A.use(n);if(i===null)throw new Error(e);return i}]}function o5(e,n){return t=>{if(typeof t!="string"||t.trim().length===0)throw new Error(n);return`${e}-${t}`}}function kg(e,n){let t=e;for(;(t=t.parentElement)&&!t.matches(n););return t}function WY(e,n,t){for(let i=e-1;i>=0;i-=1)if(!n[i].disabled)return i;if(t){for(let i=n.length-1;i>-1;i-=1)if(!n[i].disabled)return i}return e}function GY(e,n,t){for(let i=e+1;i{var b;t==null||t(l);const f=Array.from(((b=kg(l.currentTarget,e))==null?void 0:b.querySelectorAll(n))||[]).filter(w=>YY(l.currentTarget,w,e)),c=f.findIndex(w=>l.currentTarget===w),h=GY(c,f,i),d=WY(c,f,i),p=a==="rtl"?d:h,v=a==="rtl"?h:d;switch(l.key){case"ArrowRight":o==="horizontal"&&(l.stopPropagation(),l.preventDefault(),f[p].focus(),r&&f[p].click());break;case"ArrowLeft":o==="horizontal"&&(l.stopPropagation(),l.preventDefault(),f[v].focus(),r&&f[v].click());break;case"ArrowUp":o==="vertical"&&(l.stopPropagation(),l.preventDefault(),f[d].focus(),r&&f[d].click());break;case"ArrowDown":o==="vertical"&&(l.stopPropagation(),l.preventDefault(),f[h].focus(),r&&f[h].click());break;case"Home":l.stopPropagation(),l.preventDefault(),!f[0].disabled&&f[0].focus();break;case"End":{l.stopPropagation(),l.preventDefault();const w=f.length-1;!f[w].disabled&&f[w].focus();break}}}}const KY={app:100,modal:200,popover:300,overlay:400,max:9999};function wa(e){return KY[e]}const Q3=()=>{};function XY(e,n={active:!0}){return typeof e!="function"||!n.active?n.onKeyDown||Q3:t=>{var i;t.key==="Escape"&&(e(t),(i=n.onTrigger)==null||i.call(n))}}function Rn(e,n="size",t=!0){if(e!==void 0)return X$(e)?t?pe(e):e:`var(--${n}-${e})`}function Ut(e){return Rn(e,"mantine-spacing")}function Gt(e){return e===void 0?"var(--mantine-radius-default)":Rn(e,"mantine-radius")}function ei(e){return Rn(e,"mantine-font-size")}function ZY(e){return Rn(e,"mantine-line-height",!1)}function x6(e){if(e)return Rn(e,"mantine-shadow",!1)}function br(e,n){return t=>{e==null||e(t),n==null||n(t)}}function S6(e,n){return e in n?Rh(n[e]):Rh(e)}function Ph(e,n){const t=e.map(i=>({value:i,px:S6(i,n)}));return t.sort((i,r)=>i.px-r.px),t}function qr(e){return typeof e=="object"&&e!==null?"base"in e?e.base:void 0:e}function QY(e,n,t){var i;return t?Array.from(((i=kg(t,n))==null?void 0:i.querySelectorAll(e))||[]).findIndex(r=>r===t):null}function Go(e,n,t){return n===void 0&&t===void 0?e:n!==void 0&&t===void 0?Math.max(e,n):Math.min(n===void 0&&t!==void 0?e:Math.max(e,n),t)}function el(e="mantine-"){return`${e}${Math.random().toString(36).slice(2,11)}`}function lh(e){const n=A.useRef(e);return A.useEffect(()=>{n.current=e}),A.useMemo(()=>((...t)=>{var i;return(i=n.current)==null?void 0:i.call(n,...t)}),[])}function K1(e,n){const{delay:t,flushOnUnmount:i,leading:r,maxWait:a}=typeof n=="number"?{delay:n,flushOnUnmount:!1,leading:!1,maxWait:void 0}:n,o=lh(e),l=A.useRef(0),f=A.useRef(0),c=A.useRef(null),h=A.useMemo(()=>{const d=Object.assign((...p)=>{window.clearTimeout(l.current),c.current=p;const v=d._isFirstCall;d._isFirstCall=!1;function b(){window.clearTimeout(l.current),window.clearTimeout(f.current),l.current=0,f.current=0,d._isFirstCall=!0,d._hasPendingCallback=!1}function w(){a!==void 0&&f.current===0&&(f.current=window.setTimeout(()=>{if(l.current!==0){const x=c.current;b(),o(...x)}},a))}if(r&&v){o(...p);const x=()=>{b()},C=()=>{l.current!==0&&(b(),o(...p))},T=()=>{b()};d.flush=C,d.cancel=T,l.current=window.setTimeout(x,t),w();return}if(r&&!v){d._hasPendingCallback=!0;const x=()=>{l.current!==0&&(b(),o(...p))},C=()=>{b()};d.flush=x,d.cancel=C;const T=()=>{b()};l.current=window.setTimeout(T,t),w();return}d._hasPendingCallback=!0;const k=()=>{l.current!==0&&(b(),o(...p))},_=()=>{b()};d.flush=k,d.cancel=_,l.current=window.setTimeout(k,t),w()},{flush:()=>{},cancel:()=>{},isPending:()=>d._hasPendingCallback,_isFirstCall:!0,_hasPendingCallback:!1});return d},[o,t,r,a]);return A.useEffect(()=>()=>{i?h.flush():h.cancel()},[h,i]),h}const JY=["mousedown","touchstart"];function eK(e,n,t,i=!0){const r=A.useRef(null),a=n||JY,o=A.useEffectEvent(f=>{const{target:c}=f??{};if(!document.body.contains(c)&&(c==null?void 0:c.tagName)!=="HTML")return;const h=f.composedPath();Array.isArray(t)?t.every(d=>!!d&&!h.includes(d))&&e(f):r.current&&!h.includes(r.current)&&e(f)}),l=a.join(",");return A.useEffect(()=>{if(!i)return;const f=l.split(",");return f.forEach(c=>document.addEventListener(c,o)),()=>{f.forEach(c=>document.removeEventListener(c,o))}},[l,i]),r}function nK(e,n){return typeof window<"u"&&"matchMedia"in window?window.matchMedia(e).matches:!1}function tK(e,n,{getInitialValueInEffect:t}={getInitialValueInEffect:!0}){const[i,r]=A.useState(t?n:nK(e));return A.useEffect(()=>{try{if("matchMedia"in window){const a=window.matchMedia(e);r(a.matches);const o=l=>r(l.matches);return a.addEventListener("change",o),()=>{a.removeEventListener("change",o)}}}catch{return}},[e]),i||!1}const ss=typeof document<"u"?A.useLayoutEffect:A.useEffect;function es(e,n){const t=A.useRef(!1);A.useEffect(()=>()=>{t.current=!1},[]),A.useEffect(()=>{if(t.current)return e();t.current=!0},n)}function Q$({opened:e,shouldReturnFocus:n=!0}){const t=A.useRef(null),i=()=>{var r;t.current&&"focus"in t.current&&typeof t.current.focus=="function"&&((r=t.current)==null||r.focus({preventScroll:!0}))};return es(()=>{let r=-1;const a=o=>{o.key==="Tab"&&window.clearTimeout(r)};if(document.addEventListener("keydown",a),e)t.current=document.activeElement;else if(n){const o=document.activeElement;r=window.setTimeout(()=>{const l=document.activeElement;(l===null||l===document.body||l===o)&&i()},10)}return()=>{window.clearTimeout(r),document.removeEventListener("keydown",a)}},[e,n]),i}const iK=/input|select|textarea|button|object/,J$="a, input, select, textarea, button, object, [tabindex]";function rK(e){return e.style.display==="none"}function aK(e){if(e.getAttribute("aria-hidden")||e.getAttribute("hidden")||e.getAttribute("type")==="hidden")return!1;let n=e;for(;n&&!(n===document.body||n.nodeType===11);){if(rK(n))return!1;n=n.parentNode}return!0}function ez(e){let n=e.getAttribute("tabindex");return n===null&&(n=void 0),parseInt(n,10)}function J3(e){const n=e.nodeName.toLowerCase(),t=!Number.isNaN(ez(e));return(iK.test(n)&&!e.disabled||e instanceof HTMLAnchorElement&&e.href||t)&&aK(e)}function nz(e){const n=ez(e);return(Number.isNaN(n)||n>=0)&&J3(e)}function oK(e){return Array.from(e.querySelectorAll(J$)).filter(nz)}function sK(e,n){const t=oK(e);if(!t.length){n.preventDefault();return}const i=t[n.shiftKey?0:t.length-1],r=e.getRootNode();let a=i===r.activeElement||e===r.activeElement;const o=r.activeElement;if(o.tagName==="INPUT"&&o.getAttribute("type")==="radio"&&(a=t.filter(f=>f.getAttribute("type")==="radio"&&f.getAttribute("name")===o.getAttribute("name")).includes(i)),!a)return;n.preventDefault();const l=t[n.shiftKey?t.length-1:0];l&&l.focus()}function lK(e=!0){const n=A.useRef(null),t=r=>{let a=r.querySelector("[data-autofocus]");if(!a){const o=Array.from(r.querySelectorAll(J$));a=o.find(nz)||o.find(J3)||null,!a&&J3(r)&&(a=r)}a?a.focus({preventScroll:!0}):console.warn("[@mantine/hooks/use-focus-trap] Failed to find focusable element within provided node",r)},i=A.useCallback(r=>{if(e){if(r===null){n.current=null;return}n.current!==r&&(setTimeout(()=>{r.getRootNode()?t(r):console.warn("[@mantine/hooks/use-focus-trap] Ref node is not part of the dom",r)}),n.current=r)}},[e]);return A.useEffect(()=>{if(!e)return;n.current&&setTimeout(()=>{n.current&&t(n.current)});const r=a=>{a.key==="Tab"&&n.current&&sK(n.current,a)};return document.addEventListener("keydown",r),()=>document.removeEventListener("keydown",r)},[e]),i}const uK=e=>(e+1)%1e6;function fK(){const[,e]=A.useReducer(uK,0);return e}function Qi(e){const[n,t]=A.useState(`mantine-${A.useId().replace(/:/g,"")}`);return ss(()=>{t(el())},[]),typeof e=="string"?e:n}function tz(e,n,t){const i=A.useEffectEvent(n);A.useEffect(()=>(window.addEventListener(e,i,t),()=>window.removeEventListener(e,i,t)),[e])}function _g(e,n){if(typeof e=="function")return e(n);typeof e=="object"&&e!==null&&"current"in e&&(e.current=n)}function cK(...e){const n=new Map;return t=>{if(e.forEach(i=>{const r=_g(i,t);r&&n.set(i,r)}),n.size>0)return()=>{e.forEach(i=>{const r=n.get(i);r&&typeof r=="function"?r():_g(i,null)}),n.clear()}}}function Bt(...e){return A.useCallback(cK(...e),e)}function iz(e){return{x:Go(e.x,0,1),y:Go(e.y,0,1)}}function rz(e,n,t="ltr"){const i=A.useRef(!1),r=A.useRef(!1),a=A.useRef(0),o=A.useRef(null),[l,f]=A.useState(!1);return A.useEffect(()=>(i.current=!0,()=>{var c;(c=o.current)==null||c.call(o)}),[]),{ref:A.useCallback(c=>{const h=({x:C,y:T})=>{cancelAnimationFrame(a.current),a.current=requestAnimationFrame(()=>{if(i.current&&c){c.style.userSelect="none";const O=c.getBoundingClientRect();if(O.width&&O.height){const E=Go((C-O.left)/O.width,0,1);e({x:t==="ltr"?E:1-E,y:Go((T-O.top)/O.height,0,1)})}}})},d=()=>{document.addEventListener("mousemove",k),document.addEventListener("mouseup",b),document.addEventListener("touchmove",x,{passive:!1}),document.addEventListener("touchend",b)},p=()=>{document.removeEventListener("mousemove",k),document.removeEventListener("mouseup",b),document.removeEventListener("touchmove",x),document.removeEventListener("touchend",b)},v=()=>{!r.current&&i.current&&(r.current=!0,typeof(n==null?void 0:n.onScrubStart)=="function"&&n.onScrubStart(),f(!0),d())},b=()=>{r.current&&i.current&&(r.current=!1,f(!1),p(),setTimeout(()=>{typeof(n==null?void 0:n.onScrubEnd)=="function"&&n.onScrubEnd()},0))},w=C=>{v(),C.preventDefault(),k(C)},k=C=>h({x:C.clientX,y:C.clientY}),_=C=>{C.cancelable&&C.preventDefault(),v(),x(C)},x=C=>{C.cancelable&&C.preventDefault(),h({x:C.changedTouches[0].clientX,y:C.changedTouches[0].clientY})};return c==null||c.addEventListener("mousedown",w),c==null||c.addEventListener("touchstart",_,{passive:!1}),o.current=()=>{p(),cancelAnimationFrame(a.current)},()=>{c&&(c.removeEventListener("mousedown",w),c.removeEventListener("touchstart",_))}},[t,e]),active:l}}function Mi({value:e,defaultValue:n,finalValue:t,onChange:i=()=>{}}){const[r,a]=A.useState(n!==void 0?n:t),o=(l,...f)=>{a(l),i==null||i(l,...f)};return e!==void 0?[e,i,!0]:[r,o,!1]}function C6(e,n){return tK("(prefers-reduced-motion: reduce)",e,n)}function az(e=!1,n={}){const[t,i]=A.useState(e),r=A.useCallback(()=>{i(o=>{var l;return o||((l=n.onOpen)==null||l.call(n),!0)})},[n.onOpen]),a=A.useCallback(()=>{i(o=>{var l;return o&&((l=n.onClose)==null||l.call(n),!1)})},[n.onClose]);return[t,{open:r,close:a,toggle:A.useCallback(()=>{t?a():r()},[a,r,t]),set:i}]}function dK(e){const n=A.useRef(void 0);return A.useEffect(()=>{n.current=e},[e]),n.current}var Yw={exports:{}},Vi={};/** - * @license React - * react-dom.production.js - * - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var s5;function hK(){if(s5)return Vi;s5=1;var e=w6();function n(f){var c="https://react.dev/errors/"+f;if(1"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(n){console.error(n)}}return e(),Yw.exports=hK(),Yw.exports}var Ks=oz();const uh=dt(Ks);function mK(e,n){window.dispatchEvent(new CustomEvent(e,{detail:n}))}function pK(e){function n(i){const r=Object.keys(i).reduce((a,o)=>(a[`${e}:${o}`]=l=>i[o](l.detail),a),{});ss(()=>(Object.keys(r).forEach(a=>{window.removeEventListener(a,r[a]),window.addEventListener(a,r[a])}),()=>Object.keys(r).forEach(a=>{window.removeEventListener(a,r[a])})),[r])}function t(i){return(...r)=>mK(`${e}:${String(i)}`,r[0])}return[n,t]}var vK={};function gK(){return"development"}function X1(e){var t;const n=Q.version;return typeof Q.version!="string"||n.startsWith("18.")?e==null?void 0:e.ref:(t=e==null?void 0:e.props)==null?void 0:t.ref}function ag(e,n=document){const t=n.querySelector(e);if(t)return t;const i=n.querySelectorAll("*");for(let r=0;r{Object.entries(t).forEach(([i,r])=>{n[i]?n[i]=dn(n[i],r):n[i]=r})}),n}function Nh({theme:e,classNames:n,props:t,stylesCtx:i}){return bK((Array.isArray(n)?n:[n]).map(r=>typeof r=="function"?r(e,t,i):r||yK))}function xg({theme:e,styles:n,props:t,stylesCtx:i}){const r=Array.isArray(n)?n:[n],a={};for(const o of r)typeof o=="function"?Object.assign(a,o(e,t,i)):o&&Object.assign(a,o);return a}function u5(e){return e==="auto"||e==="dark"||e==="light"}function wK({key:e="mantine-color-scheme-value"}={}){let n;return{get:t=>{if(typeof window>"u")return t;try{const i=window.localStorage.getItem(e);return u5(i)?i:t}catch{return t}},set:t=>{try{window.localStorage.setItem(e,t)}catch(i){console.warn("[@mantine/core] Local storage color scheme manager was unable to save color scheme.",i)}},subscribe:t=>{n=i=>{i.storageArea===window.localStorage&&i.key===e&&u5(i.newValue)&&t(i.newValue)},window.addEventListener("storage",n)},unsubscribe:()=>{window.removeEventListener("storage",n)},clear:()=>{window.localStorage.removeItem(e)}}}function $h(e,n){return typeof e.primaryShade=="number"?e.primaryShade:n==="dark"?e.primaryShade.dark:e.primaryShade.light}function kK(e){return/^#?([0-9A-F]{3}){1,2}([0-9A-F]{2})?$/i.test(e)}function _K(e){let n=e.replace("#","");if(n.length===3){const i=n.split("");n=[i[0],i[0],i[1],i[1],i[2],i[2]].join("")}if(n.length===8){const i=parseInt(n.slice(6,8),16)/255;return{r:parseInt(n.slice(0,2),16),g:parseInt(n.slice(2,4),16),b:parseInt(n.slice(4,6),16),a:i}}const t=parseInt(n,16);return{r:t>>16&255,g:t>>8&255,b:t&255,a:1}}function xK(e){const[n,t,i,r]=e.replace(/[^0-9,./]/g,"").split(/[/,]/).map(Number);return{r:n,g:t,b:i,a:r===void 0?1:r}}function SK(e){const n=e.match(/^hsla?\(\s*(\d+)\s*,\s*(\d+%)\s*,\s*(\d+%)\s*(,\s*(0?\.\d+|\d+(\.\d+)?))?\s*\)$/i);if(!n)return{r:0,g:0,b:0,a:1};const t=parseInt(n[1],10),i=parseInt(n[2],10)/100,r=parseInt(n[3],10)/100,a=n[5]?parseFloat(n[5]):void 0,o=(1-Math.abs(2*r-1))*i,l=t/60,f=o*(1-Math.abs(l%2-1)),c=r-o/2;let h,d,p;return l>=0&&l<1?(h=o,d=f,p=0):l>=1&&l<2?(h=f,d=o,p=0):l>=2&&l<3?(h=0,d=o,p=f):l>=3&&l<4?(h=0,d=f,p=o):l>=4&&l<5?(h=f,d=0,p=o):(h=o,d=0,p=f),{r:Math.round((h+c)*255),g:Math.round((d+c)*255),b:Math.round((p+c)*255),a:a||1}}function A6(e){return kK(e)?_K(e):e.startsWith("rgb")?xK(e):e.startsWith("hsl")?SK(e):{r:0,g:0,b:0,a:1}}function Kw(e){return e<=.03928?e/12.92:((e+.055)/1.055)**2.4}function CK(e){const n=e.match(/oklch\((.*?)%\s/);return n?parseFloat(n[1]):null}function lz(e){if(e.startsWith("oklch("))return(CK(e)||0)/100;const{r:n,g:t,b:i}=A6(e),r=n/255,a=t/255,o=i/255,l=Kw(r),f=Kw(a),c=Kw(o);return .2126*l+.7152*f+.0722*c}function Hd(e,n=.179){return e.startsWith("var(")?!1:lz(e)>n}function ls({color:e,theme:n,colorScheme:t}){if(typeof e!="string")throw new Error(`[@mantine/core] Failed to parse color. Expected color to be a string, instead got ${typeof e}`);if(e==="bright")return{color:e,value:t==="dark"?n.white:n.black,shade:void 0,isThemeColor:!1,isLight:Hd(t==="dark"?n.white:n.black,n.luminanceThreshold),variable:"--mantine-color-bright"};if(e==="dimmed")return{color:e,value:t==="dark"?n.colors.dark[2]:n.colors.gray[7],shade:void 0,isThemeColor:!1,isLight:Hd(t==="dark"?n.colors.dark[2]:n.colors.gray[6],n.luminanceThreshold),variable:"--mantine-color-dimmed"};if(e==="white"||e==="black")return{color:e,value:e==="white"?n.white:n.black,shade:void 0,isThemeColor:!1,isLight:Hd(e==="white"?n.white:n.black,n.luminanceThreshold),variable:`--mantine-color-${e}`};const[i,r]=e.split("."),a=r?Number(r):void 0,o=i in n.colors;if(o){const l=a!==void 0?n.colors[i][a]:n.colors[i][$h(n,t||"light")];return{color:i,value:l,shade:a,isThemeColor:o,isLight:Hd(l,n.luminanceThreshold),variable:r?`--mantine-color-${i}-${a}`:`--mantine-color-${i}-filled`}}return{color:e,value:e,isThemeColor:o,isLight:Hd(e,n.luminanceThreshold),shade:a,variable:void 0}}function ot(e,n){const t=ls({color:e||n.primaryColor,theme:n});return t.variable?`var(${t.variable})`:e}function Zl(e,n){if(e.startsWith("var("))return`color-mix(in srgb, ${e}, black ${n*100}%)`;const{r:t,g:i,b:r,a}=A6(e),o=1-n,l=f=>Math.round(f*o);return`rgba(${l(t)}, ${l(i)}, ${l(r)}, ${a})`}function eS(e,n){const t={from:(e==null?void 0:e.from)||n.defaultGradient.from,to:(e==null?void 0:e.to)||n.defaultGradient.to,deg:(e==null?void 0:e.deg)??n.defaultGradient.deg??0},i=ot(t.from,n),r=ot(t.to,n);return`linear-gradient(${t.deg}deg, ${i} 0%, ${r} 100%)`}function Hs(e,n){if(typeof e!="string"||n>1||n<0)return"rgba(0, 0, 0, 1)";if(e.startsWith("var("))return`color-mix(in srgb, ${e}, transparent ${(1-n)*100}%)`;if(e.startsWith("oklch"))return e.includes("/")?e.replace(/\/\s*[\d.]+\s*\)/,`/ ${n})`):e.replace(")",` / ${n})`);const{r:t,g:i,b:r}=A6(e);return`rgba(${t}, ${i}, ${r}, ${n})`}const f5=Hs,AK=({color:e,theme:n,variant:t,gradient:i,autoContrast:r})=>{const a=ls({color:e,theme:n}),o=typeof r=="boolean"?r:n.autoContrast;if(t==="none")return{background:"transparent",hover:"transparent",color:"inherit",border:"none"};if(t==="filled"){const l=o&&a.isLight?"var(--mantine-color-black)":"var(--mantine-color-white)";return a.isThemeColor?a.shade===void 0?{background:`var(--mantine-color-${e}-filled)`,hover:`var(--mantine-color-${e}-filled-hover)`,color:l,border:`${pe(1)} solid transparent`}:{background:`var(--mantine-color-${a.color}-${a.shade})`,hover:`var(--mantine-color-${a.color}-${a.shade===9?8:a.shade+1})`,color:l,border:`${pe(1)} solid transparent`}:{background:e,hover:Zl(e,.1),color:l,border:`${pe(1)} solid transparent`}}if(t==="light"){if(a.isThemeColor){if(a.shade===void 0)return{background:`var(--mantine-color-${e}-light)`,hover:`var(--mantine-color-${e}-light-hover)`,color:`var(--mantine-color-${e}-light-color)`,border:`${pe(1)} solid transparent`};const l=n.colors[a.color][a.shade];return{background:l,hover:Zl(l,.1),color:`var(--mantine-color-${a.color}-light-color)`,border:`${pe(1)} solid transparent`}}return{background:Hs(e,.1),hover:Hs(e,.12),color:e,border:`${pe(1)} solid transparent`}}if(t==="outline")return a.isThemeColor?a.shade===void 0?{background:"transparent",hover:`var(--mantine-color-${e}-outline-hover)`,color:`var(--mantine-color-${e}-outline)`,border:`${pe(1)} solid var(--mantine-color-${e}-outline)`}:{background:"transparent",hover:Hs(n.colors[a.color][a.shade],.05),color:`var(--mantine-color-${a.color}-${a.shade})`,border:`${pe(1)} solid var(--mantine-color-${a.color}-${a.shade})`}:{background:"transparent",hover:Hs(e,.05),color:e,border:`${pe(1)} solid ${e}`};if(t==="subtle"){if(a.isThemeColor){if(a.shade===void 0)return{background:"transparent",hover:`var(--mantine-color-${e}-light-hover)`,color:`var(--mantine-color-${e}-light-color)`,border:`${pe(1)} solid transparent`};const l=n.colors[a.color][a.shade];return{background:"transparent",hover:Hs(l,.12),color:`var(--mantine-color-${a.color}-${Math.min(a.shade,6)})`,border:`${pe(1)} solid transparent`}}return{background:"transparent",hover:Hs(e,.12),color:e,border:`${pe(1)} solid transparent`}}return t==="transparent"?a.isThemeColor?a.shade===void 0?{background:"transparent",hover:"transparent",color:`var(--mantine-color-${e}-light-color)`,border:`${pe(1)} solid transparent`}:{background:"transparent",hover:"transparent",color:`var(--mantine-color-${a.color}-${Math.min(a.shade,6)})`,border:`${pe(1)} solid transparent`}:{background:"transparent",hover:"transparent",color:e,border:`${pe(1)} solid transparent`}:t==="white"?a.isThemeColor?a.shade===void 0?{background:"var(--mantine-color-white)",hover:Zl(n.white,.01),color:`var(--mantine-color-${e}-filled)`,border:`${pe(1)} solid transparent`}:{background:"var(--mantine-color-white)",hover:Zl(n.white,.01),color:`var(--mantine-color-${a.color}-${a.shade})`,border:`${pe(1)} solid transparent`}:{background:"var(--mantine-color-white)",hover:Zl(n.white,.01),color:e,border:`${pe(1)} solid transparent`}:t==="gradient"?{background:eS(i,n),hover:eS(i,n),color:"var(--mantine-color-white)",border:"none"}:t==="default"?{background:"var(--mantine-color-default)",hover:"var(--mantine-color-default-hover)",color:"var(--mantine-color-default-color)",border:`${pe(1)} solid var(--mantine-color-default-border)`}:{}};function Dm({color:e,theme:n,autoContrast:t}){return(typeof t=="boolean"?t:n.autoContrast)&&ls({color:e||n.primaryColor,theme:n}).isLight?"var(--mantine-color-black)":"var(--mantine-color-white)"}function c5(e,n){return Dm({color:e.colors[e.primaryColor][$h(e,n)],theme:e,autoContrast:null})}function Z1(e,n){return typeof e=="boolean"?e:n.autoContrast}const uz=A.createContext(null);function yo(){const e=A.use(uz);if(!e)throw new Error("[@mantine/core] MantineProvider was not found in tree");return e}function OK(){return yo().cssVariablesResolver}function EK(){return yo().classNamesPrefix}function O6(){return yo().getStyleNonce}function TK(){return yo().withStaticClasses}function jK(){return yo().headless}function MK(){var e;return(e=yo().stylesTransform)==null?void 0:e.sx}function DK(){var e;return(e=yo().stylesTransform)==null?void 0:e.styles}function Rm(){return yo().env||"default"}function RK(){return yo().deduplicateInlineStyles}function wf(e,n){var r,a;const t=typeof window<"u"&&"matchMedia"in window&&((r=window.matchMedia("(prefers-color-scheme: dark)"))==null?void 0:r.matches),i=e!=="auto"?e:t?"dark":"light";(a=n())==null||a.setAttribute("data-mantine-color-scheme",i)}function PK({manager:e,defaultColorScheme:n,getRootElement:t,forceColorScheme:i}){const r=A.useRef(null),[a,o]=A.useState(()=>e.get(n)),l=i||a,f=A.useCallback(h=>{i||(wf(h,t),o(h),e.set(h))},[e.set,l,i]),c=A.useCallback(()=>{o(n),wf(n,t),e.clear()},[e.clear,n]);return A.useEffect(()=>(e.subscribe(f),e.unsubscribe),[e.subscribe,e.unsubscribe]),ss(()=>{wf(e.get(n),t)},[]),A.useEffect(()=>{var d;if(i)return wf(i,t),()=>{};i===void 0&&wf(a,t),typeof window<"u"&&"matchMedia"in window&&(r.current=window.matchMedia("(prefers-color-scheme: dark)"));const h=p=>{a==="auto"&&wf(p.matches?"dark":"light",t)};return(d=r.current)==null||d.addEventListener("change",h),()=>{var p;return(p=r.current)==null?void 0:p.removeEventListener("change",h)}},[a,i]),{colorScheme:l,setColorScheme:f,clearColorScheme:c}}const NK={dark:["#C9C9C9","#b8b8b8","#828282","#696969","#424242","#3b3b3b","#2e2e2e","#242424","#1f1f1f","#141414"],gray:["#f8f9fa","#f1f3f5","#e9ecef","#dee2e6","#ced4da","#adb5bd","#868e96","#495057","#343a40","#212529"],red:["#fff5f5","#ffe3e3","#ffc9c9","#ffa8a8","#ff8787","#ff6b6b","#fa5252","#f03e3e","#e03131","#c92a2a"],pink:["#fff0f6","#ffdeeb","#fcc2d7","#faa2c1","#f783ac","#f06595","#e64980","#d6336c","#c2255c","#a61e4d"],grape:["#f8f0fc","#f3d9fa","#eebefa","#e599f7","#da77f2","#cc5de8","#be4bdb","#ae3ec9","#9c36b5","#862e9c"],violet:["#f3f0ff","#e5dbff","#d0bfff","#b197fc","#9775fa","#845ef7","#7950f2","#7048e8","#6741d9","#5f3dc4"],indigo:["#edf2ff","#dbe4ff","#bac8ff","#91a7ff","#748ffc","#5c7cfa","#4c6ef5","#4263eb","#3b5bdb","#364fc7"],blue:["#e7f5ff","#d0ebff","#a5d8ff","#74c0fc","#4dabf7","#339af0","#228be6","#1c7ed6","#1971c2","#1864ab"],cyan:["#e3fafc","#c5f6fa","#99e9f2","#66d9e8","#3bc9db","#22b8cf","#15aabf","#1098ad","#0c8599","#0b7285"],teal:["#e6fcf5","#c3fae8","#96f2d7","#63e6be","#38d9a9","#20c997","#12b886","#0ca678","#099268","#087f5b"],green:["#ebfbee","#d3f9d8","#b2f2bb","#8ce99a","#69db7c","#51cf66","#40c057","#37b24d","#2f9e44","#2b8a3e"],lime:["#f4fce3","#e9fac8","#d8f5a2","#c0eb75","#a9e34b","#94d82d","#82c91e","#74b816","#66a80f","#5c940d"],yellow:["#fff9db","#fff3bf","#ffec99","#ffe066","#ffd43b","#fcc419","#fab005","#f59f00","#f08c00","#e67700"],orange:["#fff4e6","#ffe8cc","#ffd8a8","#ffc078","#ffa94d","#ff922b","#fd7e14","#f76707","#e8590c","#d9480f"]},d5="-apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji",E6={scale:1,fontSmoothing:!0,focusRing:"auto",white:"#fff",black:"#000",colors:NK,primaryShade:{light:6,dark:8},primaryColor:"blue",variantColorResolver:AK,autoContrast:!1,luminanceThreshold:.3,fontFamily:d5,fontFamilyMonospace:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, Liberation Mono, Courier New, monospace",respectReducedMotion:!1,cursorType:"default",defaultGradient:{from:"blue",to:"cyan",deg:45},defaultRadius:"md",activeClassName:"mantine-active",focusClassName:"",headings:{fontFamily:d5,fontWeight:"700",textWrap:"wrap",sizes:{h1:{fontSize:pe(34),lineHeight:"1.3"},h2:{fontSize:pe(26),lineHeight:"1.35"},h3:{fontSize:pe(22),lineHeight:"1.4"},h4:{fontSize:pe(18),lineHeight:"1.45"},h5:{fontSize:pe(16),lineHeight:"1.5"},h6:{fontSize:pe(14),lineHeight:"1.5"}}},fontSizes:{xs:pe(12),sm:pe(14),md:pe(16),lg:pe(18),xl:pe(20)},lineHeights:{xs:"1.4",sm:"1.45",md:"1.55",lg:"1.6",xl:"1.65"},fontWeights:{regular:"400",medium:"600",bold:"700"},radius:{xs:pe(2),sm:pe(4),md:pe(8),lg:pe(16),xl:pe(32)},spacing:{xs:pe(10),sm:pe(12),md:pe(16),lg:pe(20),xl:pe(32)},breakpoints:{xs:"36em",sm:"48em",md:"62em",lg:"75em",xl:"88em"},shadows:{xs:`0 ${pe(1)} ${pe(3)} rgba(0, 0, 0, 0.05), 0 ${pe(1)} ${pe(2)} rgba(0, 0, 0, 0.1)`,sm:`0 ${pe(1)} ${pe(3)} rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 ${pe(10)} ${pe(15)} ${pe(-5)}, rgba(0, 0, 0, 0.04) 0 ${pe(7)} ${pe(7)} ${pe(-5)}`,md:`0 ${pe(1)} ${pe(3)} rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 ${pe(20)} ${pe(25)} ${pe(-5)}, rgba(0, 0, 0, 0.04) 0 ${pe(10)} ${pe(10)} ${pe(-5)}`,lg:`0 ${pe(1)} ${pe(3)} rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 ${pe(28)} ${pe(23)} ${pe(-7)}, rgba(0, 0, 0, 0.04) 0 ${pe(12)} ${pe(12)} ${pe(-7)}`,xl:`0 ${pe(1)} ${pe(3)} rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 ${pe(36)} ${pe(28)} ${pe(-7)}, rgba(0, 0, 0, 0.04) 0 ${pe(17)} ${pe(17)} ${pe(-7)}`},other:{},components:{}},$K="[@mantine/core] MantineProvider: Invalid theme.primaryColor, it accepts only key of theme.colors, learn more – https://mantine.dev/theming/colors/#primary-color",h5="[@mantine/core] MantineProvider: Invalid theme.primaryShade, it accepts only 0-9 integers or an object { light: 0-9, dark: 0-9 }";function Xw(e){return e<0||e>9?!1:parseInt(e.toString(),10)===e}function m5(e){if(!(e.primaryColor in e.colors))throw new Error($K);if(typeof e.primaryShade=="object"&&(!Xw(e.primaryShade.dark)||!Xw(e.primaryShade.light)))throw new Error(h5);if(typeof e.primaryShade=="number"&&!Xw(e.primaryShade))throw new Error(h5)}function zK(e,n){var i;if(!n)return m5(e),e;const t=b6(e,n);return n.fontFamily&&!((i=n.headings)!=null&&i.fontFamily)&&(t.headings.fontFamily=n.fontFamily),m5(t),t}const T6=A.createContext(null),LK=()=>A.use(T6)||E6;function oi(){const e=A.use(T6);if(!e)throw new Error("@mantine/core: MantineProvider was not found in component tree, make sure you have it in your app");return e}function fz({theme:e,children:n,inherit:t=!0}){const i=LK();return y.jsx(T6,{value:A.useMemo(()=>zK(t?i:E6,e),[e,i,t]),children:n})}fz.displayName="@mantine/core/MantineThemeProvider";function Zw(e){return Object.entries(e).map(([n,t])=>`${n}: ${t};`).join("")}function cz(e,n){const t=n?[n]:[":root",":host"],i=Zw(e.variables),r=i?`${t.join(", ")}{${i}}`:"",a=Zw(e.dark),o=Zw(e.light),l=f=>t.map(c=>c===":host"?`${c}([data-mantine-color-scheme="${f}"])`:`${c}[data-mantine-color-scheme="${f}"]`).join(", ");return`${r} - -${a?`${l("dark")}{${a}}`:""} - -${o?`${l("light")}{${o}}`:""}`}function Ov({theme:e,color:n,colorScheme:t,name:i=n,withColorValues:r=!0}){if(!e.colors[n])return{};if(t==="light"){const l=$h(e,"light"),f={[`--mantine-color-${i}-text`]:`var(--mantine-color-${i}-filled)`,[`--mantine-color-${i}-filled`]:`var(--mantine-color-${i}-${l})`,[`--mantine-color-${i}-filled-hover`]:`var(--mantine-color-${i}-${l===9?8:l+1})`,[`--mantine-color-${i}-light`]:`var(--mantine-color-${i}-1)`,[`--mantine-color-${i}-light-hover`]:`var(--mantine-color-${i}-2)`,[`--mantine-color-${i}-light-color`]:`var(--mantine-color-${i}-9)`,[`--mantine-color-${i}-outline`]:`var(--mantine-color-${i}-${l})`,[`--mantine-color-${i}-outline-hover`]:f5(e.colors[n][l],.05)};return r?{[`--mantine-color-${i}-0`]:e.colors[n][0],[`--mantine-color-${i}-1`]:e.colors[n][1],[`--mantine-color-${i}-2`]:e.colors[n][2],[`--mantine-color-${i}-3`]:e.colors[n][3],[`--mantine-color-${i}-4`]:e.colors[n][4],[`--mantine-color-${i}-5`]:e.colors[n][5],[`--mantine-color-${i}-6`]:e.colors[n][6],[`--mantine-color-${i}-7`]:e.colors[n][7],[`--mantine-color-${i}-8`]:e.colors[n][8],[`--mantine-color-${i}-9`]:e.colors[n][9],...f}:f}const a=$h(e,"dark"),o={[`--mantine-color-${i}-text`]:`var(--mantine-color-${i}-4)`,[`--mantine-color-${i}-filled`]:`var(--mantine-color-${i}-${a})`,[`--mantine-color-${i}-filled-hover`]:`var(--mantine-color-${i}-${a===9?8:a+1})`,[`--mantine-color-${i}-light`]:Zl(e.colors[n][9],.5),[`--mantine-color-${i}-light-hover`]:Zl(e.colors[n][9],.3),[`--mantine-color-${i}-light-color`]:`var(--mantine-color-${i}-0)`,[`--mantine-color-${i}-outline`]:`var(--mantine-color-${i}-${Math.max(a-4,0)})`,[`--mantine-color-${i}-outline-hover`]:f5(e.colors[n][Math.max(a-4,0)],.05)};return r?{[`--mantine-color-${i}-0`]:e.colors[n][0],[`--mantine-color-${i}-1`]:e.colors[n][1],[`--mantine-color-${i}-2`]:e.colors[n][2],[`--mantine-color-${i}-3`]:e.colors[n][3],[`--mantine-color-${i}-4`]:e.colors[n][4],[`--mantine-color-${i}-5`]:e.colors[n][5],[`--mantine-color-${i}-6`]:e.colors[n][6],[`--mantine-color-${i}-7`]:e.colors[n][7],[`--mantine-color-${i}-8`]:e.colors[n][8],[`--mantine-color-${i}-9`]:e.colors[n][9],...o}:o}function IK(e){return!!e&&typeof e=="object"&&"mantine-virtual-color"in e}function ql(e,n,t){Tt(n).forEach(i=>Object.assign(e,{[`--mantine-${t}-${i}`]:n[i]}))}const dz=e=>{const n=$h(e,"light"),t=e.defaultRadius in e.radius?e.radius[e.defaultRadius]:pe(e.defaultRadius),i={variables:{"--mantine-z-index-app":"100","--mantine-z-index-modal":"200","--mantine-z-index-popover":"300","--mantine-z-index-overlay":"400","--mantine-z-index-max":"9999","--mantine-scale":e.scale.toString(),"--mantine-cursor-type":e.cursorType,"--mantine-webkit-font-smoothing":e.fontSmoothing?"antialiased":"unset","--mantine-moz-font-smoothing":e.fontSmoothing?"grayscale":"unset","--mantine-color-white":e.white,"--mantine-color-black":e.black,"--mantine-line-height":e.lineHeights.md,"--mantine-font-family":e.fontFamily,"--mantine-font-family-monospace":e.fontFamilyMonospace,"--mantine-font-family-headings":e.headings.fontFamily,"--mantine-heading-font-weight":e.headings.fontWeight,"--mantine-heading-text-wrap":e.headings.textWrap,"--mantine-radius-default":t,"--mantine-primary-color-filled":`var(--mantine-color-${e.primaryColor}-filled)`,"--mantine-primary-color-filled-hover":`var(--mantine-color-${e.primaryColor}-filled-hover)`,"--mantine-primary-color-light":`var(--mantine-color-${e.primaryColor}-light)`,"--mantine-primary-color-light-hover":`var(--mantine-color-${e.primaryColor}-light-hover)`,"--mantine-primary-color-light-color":`var(--mantine-color-${e.primaryColor}-light-color)`},light:{"--mantine-color-scheme":"light","--mantine-primary-color-contrast":c5(e,"light"),"--mantine-color-bright":"var(--mantine-color-black)","--mantine-color-text":e.black,"--mantine-color-body":e.white,"--mantine-color-error":"var(--mantine-color-red-6)","--mantine-color-placeholder":"var(--mantine-color-gray-5)","--mantine-color-anchor":`var(--mantine-color-${e.primaryColor}-${n})`,"--mantine-color-default":"var(--mantine-color-white)","--mantine-color-default-hover":"var(--mantine-color-gray-0)","--mantine-color-default-color":"var(--mantine-color-black)","--mantine-color-default-border":"var(--mantine-color-gray-4)","--mantine-color-dimmed":"var(--mantine-color-gray-6)","--mantine-color-disabled":"var(--mantine-color-gray-2)","--mantine-color-disabled-color":"var(--mantine-color-gray-5)","--mantine-color-disabled-border":"var(--mantine-color-gray-3)"},dark:{"--mantine-color-scheme":"dark","--mantine-primary-color-contrast":c5(e,"dark"),"--mantine-color-bright":"var(--mantine-color-white)","--mantine-color-text":"var(--mantine-color-dark-0)","--mantine-color-body":"var(--mantine-color-dark-7)","--mantine-color-error":"var(--mantine-color-red-8)","--mantine-color-placeholder":"var(--mantine-color-dark-3)","--mantine-color-anchor":`var(--mantine-color-${e.primaryColor}-4)`,"--mantine-color-default":"var(--mantine-color-dark-6)","--mantine-color-default-hover":"var(--mantine-color-dark-5)","--mantine-color-default-color":"var(--mantine-color-white)","--mantine-color-default-border":"var(--mantine-color-dark-4)","--mantine-color-dimmed":"var(--mantine-color-dark-2)","--mantine-color-disabled":"var(--mantine-color-dark-6)","--mantine-color-disabled-color":"var(--mantine-color-dark-3)","--mantine-color-disabled-border":"var(--mantine-color-dark-4)"}};ql(i.variables,e.breakpoints,"breakpoint"),ql(i.variables,e.spacing,"spacing"),ql(i.variables,e.fontSizes,"font-size"),ql(i.variables,e.lineHeights,"line-height"),ql(i.variables,e.shadows,"shadow"),ql(i.variables,e.radius,"radius"),ql(i.variables,e.fontWeights,"font-weight"),e.colors[e.primaryColor].forEach((a,o)=>{i.variables[`--mantine-primary-color-${o}`]=`var(--mantine-color-${e.primaryColor}-${o})`}),Tt(e.colors).forEach(a=>{const o=e.colors[a];if(IK(o)){Object.assign(i.light,Ov({theme:e,name:o.name,color:o.light,colorScheme:"light",withColorValues:!0})),Object.assign(i.dark,Ov({theme:e,name:o.name,color:o.dark,colorScheme:"dark",withColorValues:!0}));return}o.forEach((l,f)=>{i.variables[`--mantine-color-${a}-${f}`]=l}),Object.assign(i.light,Ov({theme:e,color:a,colorScheme:"light",withColorValues:!1})),Object.assign(i.dark,Ov({theme:e,color:a,colorScheme:"dark",withColorValues:!1}))});const r=e.headings.sizes;return Tt(r).forEach(a=>{i.variables[`--mantine-${a}-font-size`]=r[a].fontSize,i.variables[`--mantine-${a}-line-height`]=r[a].lineHeight,i.variables[`--mantine-${a}-font-weight`]=r[a].fontWeight||e.headings.fontWeight}),i};function BK(){const e=oi(),n=O6(),t=Tt(e.breakpoints).reduce((i,r)=>{const a=e.breakpoints[r].includes("px"),o=Rh(e.breakpoints[r]);return`${i}@media (max-width: ${a?`${o-.1}px`:wg(o-.1)}) {.mantine-visible-from-${r} {display: none !important;}}@media (min-width: ${a?`${o}px`:wg(o)}) {.mantine-hidden-from-${r} {display: none !important;}}`},"");return y.jsx("style",{"data-mantine-styles":"classes",nonce:n==null?void 0:n(),dangerouslySetInnerHTML:{__html:t}})}function FK({theme:e,generator:n}){const t=dz(e),i=n==null?void 0:n(e);return i?b6(t,i):t}const Qw=dz(E6);function qK(e){const n={variables:{},light:{},dark:{}};return Tt(e.variables).forEach(t=>{Qw.variables[t]!==e.variables[t]&&(n.variables[t]=e.variables[t])}),Tt(e.light).forEach(t=>{Qw.light[t]!==e.light[t]&&(n.light[t]=e.light[t])}),Tt(e.dark).forEach(t=>{Qw.dark[t]!==e.dark[t]&&(n.dark[t]=e.dark[t])}),n}function HK(e){return cz({variables:{},dark:{"--mantine-color-scheme":"dark"},light:{"--mantine-color-scheme":"light"}},e)}function hz({cssVariablesSelector:e,deduplicateCssVariables:n}){const t=oi(),i=O6(),r=FK({theme:t,generator:OK()}),a=(e===void 0||e===":root"||e===":host")&&n,o=cz(a?qK(r):r,e);return o?y.jsx("style",{"data-mantine-styles":!0,nonce:i==null?void 0:i(),dangerouslySetInnerHTML:{__html:`${o}${a?"":HK(e)}`}}):null}hz.displayName="@mantine/CssVariables";function UK({respectReducedMotion:e,getRootElement:n}){ss(()=>{var t;e&&((t=n())==null||t.setAttribute("data-respect-reduced-motion","true"))},[e])}function mz({theme:e,children:n,getStyleNonce:t,withStaticClasses:i=!0,withGlobalClasses:r=!0,deduplicateCssVariables:a=!0,withCssVariables:o=!0,cssVariablesSelector:l,classNamesPrefix:f="mantine",colorSchemeManager:c=wK(),defaultColorScheme:h="light",getRootElement:d=()=>document.documentElement,cssVariablesResolver:p,forceColorScheme:v,stylesTransform:b,env:w,deduplicateInlineStyles:k=!1}){const{colorScheme:_,setColorScheme:x,clearColorScheme:C}=PK({defaultColorScheme:h,forceColorScheme:v,manager:c,getRootElement:d});return UK({respectReducedMotion:(e==null?void 0:e.respectReducedMotion)||!1,getRootElement:d}),y.jsx(uz,{value:{colorScheme:_,setColorScheme:x,clearColorScheme:C,getRootElement:d,classNamesPrefix:f,getStyleNonce:t,cssVariablesResolver:p,cssVariablesSelector:l??":root",withStaticClasses:i,stylesTransform:b,env:w,deduplicateInlineStyles:k},children:y.jsxs(fz,{theme:e,children:[o&&y.jsx(hz,{cssVariablesSelector:l,deduplicateCssVariables:a}),r&&y.jsx(BK,{}),n]})})}mz.displayName="@mantine/core/MantineProvider";function ke(e,n,t){var o;const i=oi(),r=(o=i.components[e])==null?void 0:o.defaultProps,a=typeof r=="function"?r(i):r;return{...n,...a,...xu(t)}}function qi({classNames:e,styles:n,props:t,stylesCtx:i}){const r=oi();return{resolvedClassNames:e===void 0?void 0:Nh({theme:r,classNames:e,props:t,stylesCtx:i||void 0}),resolvedStyles:n===void 0?void 0:xg({theme:r,styles:n,props:t,stylesCtx:i||void 0})}}const VK={always:"mantine-focus-always",auto:"mantine-focus-auto",never:"mantine-focus-never"};function WK({theme:e,options:n,unstyled:t}){return dn((n==null?void 0:n.focusable)&&!t&&(e.focusClassName||VK[e.focusRing]),(n==null?void 0:n.active)&&!t&&e.activeClassName)}function GK({selector:e,stylesCtx:n,options:t,props:i,theme:r}){return Nh({theme:r,classNames:t==null?void 0:t.classNames,props:(t==null?void 0:t.props)||i,stylesCtx:n})[e]}function YK({selector:e,stylesCtx:n,theme:t,classNames:i,props:r}){return Nh({theme:t,classNames:i,props:r,stylesCtx:n})[e]}function KK({rootSelector:e,selector:n,className:t}){return e===n?t:void 0}function XK({selector:e,classes:n,unstyled:t}){return t?void 0:n[e]}function ZK({themeName:e,classNamesPrefix:n,selector:t,withStaticClass:i}){return i===!1?[]:e.map(r=>`${n}-${r}-${t}`)}function QK({options:e,classes:n,selector:t,unstyled:i}){return e!=null&&e.variant&&!i?n[`${t}--${e.variant}`]:void 0}function JK({theme:e,options:n,themeName:t,selector:i,classNamesPrefix:r,resolvedClassNames:a,resolvedThemeClassNames:o,classes:l,unstyled:f,className:c,rootSelector:h,props:d,stylesCtx:p,withStaticClasses:v,headless:b,transformedStyles:w}){return dn(WK({theme:e,options:n,unstyled:f||b}),o.map(k=>k[i]),QK({options:n,classes:l,selector:i,unstyled:f||b}),a[i],YK({selector:i,stylesCtx:p,theme:e,classNames:w,props:d}),GK({selector:i,stylesCtx:p,options:n,props:d,theme:e}),KK({rootSelector:h,selector:i,className:c}),XK({selector:i,classes:l,unstyled:f||b}),v&&!b&&ZK({themeName:t,classNamesPrefix:r,selector:i,withStaticClass:n==null?void 0:n.withStaticClass}),n==null?void 0:n.className)}function j6({style:e,theme:n}){return Array.isArray(e)?e.reduce((t,i)=>({...t,...j6({style:i,theme:n})}),{}):typeof e=="function"?e(n):e??{}}function eX({theme:e,selector:n,options:t,props:i,stylesCtx:r,rootSelector:a,withStylesTransform:o,resolvedStyles:l,resolvedThemeStyles:f,resolvedVars:c,resolvedRootStyle:h}){return{...f[n],...l[n],...!o&&xg({theme:e,styles:t==null?void 0:t.styles,props:(t==null?void 0:t.props)||i,stylesCtx:r})[n],...c[n],...a===n?h:null,...j6({style:t==null?void 0:t.style,theme:e})}}function nX(e){return e.reduce((n,t)=>(t&&Object.keys(t).forEach(i=>{n[i]={...n[i],...xu(t[i])}}),n),{})}function tX({props:e,stylesCtx:n,themeName:t,theme:i}){var o;const r=(o=DK())==null?void 0:o();return{getTransformedStyles:l=>r?[...l.map(f=>r(f,{props:e,theme:i,ctx:n})),...t.map(f=>{var c;return r((c=i.components[f])==null?void 0:c.styles,{props:e,theme:i,ctx:n})})].filter(Boolean):[],withStylesTransform:!!r}}function Qe({name:e,classes:n,props:t,stylesCtx:i,className:r,style:a,rootSelector:o="root",unstyled:l,classNames:f,styles:c,vars:h,varsResolver:d,attributes:p}){var R;const v=oi(),b=EK(),w=TK(),k=jK(),_=(Array.isArray(e)?e:[e]).filter(L=>L),{withStylesTransform:x,getTransformedStyles:C}=tX({props:t,stylesCtx:i,themeName:_,theme:v}),T=Nh({theme:v,classNames:f,props:t,stylesCtx:i}),O=_.map(L=>{var B;return Nh({theme:v,classNames:(B=v.components[L])==null?void 0:B.classNames,props:t,stylesCtx:i})}),E=x?{}:xg({theme:v,styles:c,props:t,stylesCtx:i}),M={};if(!x)for(const L of _){const B=xg({theme:v,styles:(R=v.components[L])==null?void 0:R.styles,props:t,stylesCtx:i});for(const G of Object.keys(B))M[G]={...M[G],...B[G]}}const N=nX([k?{}:d==null?void 0:d(v,t,i),..._.map(L=>{var B,G,U;return(U=(G=(B=v.components)==null?void 0:B[L])==null?void 0:G.vars)==null?void 0:U.call(G,v,t,i)}),h==null?void 0:h(v,t,i)]),F=j6({style:a,theme:v});return(L,B)=>({...p==null?void 0:p[L],className:JK({theme:v,options:B,themeName:_,selector:L,classNamesPrefix:b,resolvedClassNames:T,resolvedThemeClassNames:O,classes:n,unstyled:l,className:r,rootSelector:o,props:t,stylesCtx:i,withStaticClasses:w,headless:k,transformedStyles:C([B==null?void 0:B.styles,c])}),style:eX({theme:v,selector:L,options:B,props:t,stylesCtx:i,rootSelector:o,withStylesTransform:x,resolvedStyles:E,resolvedThemeStyles:M,resolvedVars:N,resolvedRootStyle:F})})}function bh(e){return Tt(e).reduce((n,t)=>e[t]!==void 0?`${n}${HY(t)}:${e[t]};`:n,"").trim()}function iX({selector:e,styles:n,media:t,container:i}){const r=n?bh(n):"",a=Array.isArray(t)?t.map(l=>`@media${l.query}{${e}{${bh(l.styles)}}}`):[],o=Array.isArray(i)?i.map(l=>`@container ${l.query}{${e}{${bh(l.styles)}}}`):[];return`${r?`${e}{${r}}`:""}${a.join("")}${o.join("")}`.trim()}function rX(e){let n=5381;for(let t=0;t>>0).toString(36)}function Cc({deduplicate:e,...n}){const t=O6(),i=iX(n);return e?y.jsx("style",{href:`mantine-${rX(i)}`,precedence:"mantine",nonce:t==null?void 0:t(),children:i}):y.jsx("style",{"data-mantine-styles":"inline",nonce:t==null?void 0:t(),dangerouslySetInnerHTML:{__html:i}})}function aX(e){let n=5381;for(let t=0;t>>0).toString(36)}function oX(e,n){return`__mdi__-${aX(`${e?bh(e):""}|${Array.isArray(n)?n.map(t=>`${t.query}:${bh(t.styles)}`).join("|"):""}`)}`}function Cu(e){const{m:n,mx:t,my:i,mt:r,mb:a,ml:o,mr:l,me:f,ms:c,mis:h,mie:d,p,px:v,py:b,pt:w,pb:k,pl:_,pr:x,pe:C,ps:T,pis:O,pie:E,bd:M,bdrs:N,bg:F,c:R,opacity:L,ff:B,fz:G,fw:U,lts:H,ta:P,lh:z,fs:q,tt:Y,td:D,w:V,miw:W,maw:$,h:X,mih:ee,mah:re,bgsz:se,bgp:ge,bgr:ae,bga:le,pos:_e,top:ne,left:$e,bottom:be,right:Ce,inset:Pe,display:ve,flex:xe,hiddenFrom:Re,visibleFrom:ue,lightHidden:Ie,darkHidden:Ve,sx:He,...Ke}=e;return{styleProps:xu({m:n,mx:t,my:i,mt:r,mb:a,ml:o,mr:l,me:f,ms:c,mis:h,mie:d,p,px:v,py:b,pt:w,pb:k,pl:_,pr:x,pis:O,pie:E,pe:C,ps:T,bd:M,bg:F,c:R,opacity:L,ff:B,fz:G,fw:U,lts:H,ta:P,lh:z,fs:q,tt:Y,td:D,w:V,miw:W,maw:$,h:X,mih:ee,mah:re,bgsz:se,bgp:ge,bgr:ae,bga:le,pos:_e,top:ne,left:$e,bottom:be,right:Ce,inset:Pe,display:ve,flex:xe,bdrs:N,hiddenFrom:Re,visibleFrom:ue,lightHidden:Ie,darkHidden:Ve,sx:He}),rest:Ke}}const sX={m:{type:"spacing",property:"margin"},mt:{type:"spacing",property:"marginTop"},mb:{type:"spacing",property:"marginBottom"},ml:{type:"spacing",property:"marginLeft"},mr:{type:"spacing",property:"marginRight"},ms:{type:"spacing",property:"marginInlineStart"},me:{type:"spacing",property:"marginInlineEnd"},mis:{type:"spacing",property:"marginInlineStart"},mie:{type:"spacing",property:"marginInlineEnd"},mx:{type:"spacing",property:"marginInline"},my:{type:"spacing",property:"marginBlock"},p:{type:"spacing",property:"padding"},pt:{type:"spacing",property:"paddingTop"},pb:{type:"spacing",property:"paddingBottom"},pl:{type:"spacing",property:"paddingLeft"},pr:{type:"spacing",property:"paddingRight"},ps:{type:"spacing",property:"paddingInlineStart"},pe:{type:"spacing",property:"paddingInlineEnd"},pis:{type:"spacing",property:"paddingInlineStart"},pie:{type:"spacing",property:"paddingInlineEnd"},px:{type:"spacing",property:"paddingInline"},py:{type:"spacing",property:"paddingBlock"},bd:{type:"border",property:"border"},bdrs:{type:"radius",property:"borderRadius"},bg:{type:"color",property:"background"},c:{type:"textColor",property:"color"},opacity:{type:"identity",property:"opacity"},ff:{type:"fontFamily",property:"fontFamily"},fz:{type:"fontSize",property:"fontSize"},fw:{type:"identity",property:"fontWeight"},lts:{type:"size",property:"letterSpacing"},ta:{type:"identity",property:"textAlign"},lh:{type:"lineHeight",property:"lineHeight"},fs:{type:"identity",property:"fontStyle"},tt:{type:"identity",property:"textTransform"},td:{type:"identity",property:"textDecoration"},w:{type:"spacing",property:"width"},miw:{type:"spacing",property:"minWidth"},maw:{type:"spacing",property:"maxWidth"},h:{type:"spacing",property:"height"},mih:{type:"spacing",property:"minHeight"},mah:{type:"spacing",property:"maxHeight"},bgsz:{type:"size",property:"backgroundSize"},bgp:{type:"identity",property:"backgroundPosition"},bgr:{type:"identity",property:"backgroundRepeat"},bga:{type:"identity",property:"backgroundAttachment"},pos:{type:"identity",property:"position"},top:{type:"size",property:"top"},left:{type:"size",property:"left"},bottom:{type:"size",property:"bottom"},right:{type:"size",property:"right"},inset:{type:"size",property:"inset"},display:{type:"identity",property:"display"},flex:{type:"identity",property:"flex"}};function M6(e,n){const t=ls({color:e,theme:n});return t.color==="dimmed"?"var(--mantine-color-dimmed)":t.color==="bright"?"var(--mantine-color-bright)":t.variable?`var(${t.variable})`:t.color}function lX(e,n){const t=ls({color:e,theme:n});return t.isThemeColor&&t.shade===void 0?`var(--mantine-color-${t.color}-text)`:M6(e,n)}function uX(e,n){if(typeof e=="number")return pe(e);if(typeof e=="string"){const[t,i,...r]=e.split(" ").filter(o=>o.trim()!=="");let a=`${pe(t)}`;return i&&(a+=` ${i}`),r.length>0&&(a+=` ${M6(r.join(" "),n)}`),a.trim()}return e}const p5={text:"var(--mantine-font-family)",mono:"var(--mantine-font-family-monospace)",monospace:"var(--mantine-font-family-monospace)",heading:"var(--mantine-font-family-headings)",headings:"var(--mantine-font-family-headings)"};function fX(e){return typeof e=="string"&&e in p5?p5[e]:e}const cX=["h1","h2","h3","h4","h5","h6"];function dX(e,n){return typeof e=="string"&&e in n.fontSizes?`var(--mantine-font-size-${e})`:typeof e=="string"&&cX.includes(e)?`var(--mantine-${e}-font-size)`:typeof e=="number"||typeof e=="string"?pe(e):e}function hX(e){return e}const mX=["h1","h2","h3","h4","h5","h6"];function pX(e,n){return typeof e=="string"&&e in n.lineHeights?`var(--mantine-line-height-${e})`:typeof e=="string"&&mX.includes(e)?`var(--mantine-${e}-line-height)`:e}function vX(e,n){return typeof e=="string"&&e in n.radius?`var(--mantine-radius-${e})`:typeof e=="number"||typeof e=="string"?pe(e):e}function gX(e){return typeof e=="number"?pe(e):e}function yX(e,n){if(typeof e=="number")return pe(e);if(typeof e=="string"){const t=e.replace("-","");if(!(t in n.spacing))return pe(e);const i=`--mantine-spacing-${t}`;return e.startsWith("-")?`calc(var(${i}) * -1)`:`var(${i})`}return e}const Jw={color:M6,textColor:lX,fontSize:dX,spacing:yX,radius:vX,identity:hX,size:gX,lineHeight:pX,fontFamily:fX,border:uX};function v5(e){return e.replace("(min-width: ","").replace("em)","")}function bX({media:e,...n}){const t=Object.keys(e).sort((i,r)=>Number(v5(i))-Number(v5(r))).map(i=>({query:i,styles:e[i]}));return{...n,media:t}}function wX(e){if(typeof e!="object"||e===null)return!1;const n=Object.keys(e);return!(n.length===1&&n[0]==="base")}function kX(e){return typeof e=="object"&&e!==null?"base"in e?e.base:void 0:e}function _X(e){return typeof e=="object"&&e!==null?Tt(e).filter(n=>n!=="base"):[]}function xX(e,n){return typeof e=="object"&&e!==null&&n in e?e[n]:e}function SX({styleProps:e,data:n,theme:t}){return bX(Tt(e).reduce((i,r)=>{if(r==="hiddenFrom"||r==="visibleFrom"||r==="sx")return i;const a=n[r],o=Array.isArray(a.property)?a.property:[a.property],l=kX(e[r]);if(!wX(e[r]))return o.forEach(c=>{i.inlineStyles[c]=Jw[a.type](l,t)}),i;i.hasResponsiveStyles=!0;const f=_X(e[r]);return o.forEach(c=>{l!=null&&(i.styles[c]=Jw[a.type](l,t)),f.forEach(h=>{const d=`(min-width: ${t.breakpoints[h]})`;i.media[d]={...i.media[d],[c]:Jw[a.type](xX(e[r],h),t)}})}),i},{hasResponsiveStyles:!1,styles:{},inlineStyles:{},media:{}}))}function Q1(){return`__m__-${A.useId().replace(/[:«»]/g,"")}`}function pz(e,n){return Array.isArray(e)?[...e].reduce((t,i)=>({...t,...pz(i,n)}),{}):typeof e=="function"?e(n):e??{}}function CX(e){return e}const AX=CX;function vz(e){return e}function De(e){const n=e;return n.extend=vz,n.withProps=t=>{const i=r=>y.jsx(n,{...t,...r});return i.extend=n.extend,i.displayName=`WithProps(${n.displayName})`,i},n}function J1(e){return De(e)}function Hi(e){const n=e;return n.withProps=t=>{const i=r=>y.jsx(n,{...t,...r});return i.extend=n.extend,i.displayName=`WithProps(${n.displayName})`,i},n.extend=vz,n}function gz(e){return`data-${(e.startsWith("data-")?e.slice(5):e).replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}`}function OX(e){return Object.keys(e).reduce((n,t)=>{const i=e[t];return i===void 0||i===""||i===!1||i===null||(n[gz(t)]=e[t]),n},{})}function yz(e){return e?typeof e=="string"?{[gz(e)]:!0}:Array.isArray(e)?[...e].reduce((n,t)=>({...n,...yz(t)}),{}):OX(e):null}function nS(e,n){return Array.isArray(e)?[...e].reduce((t,i)=>({...t,...nS(i,n)}),{}):typeof e=="function"?e(n):e??{}}function EX({theme:e,style:n,vars:t,styleProps:i}){const r=nS(n,e),a=nS(t,e);return{...r,...a,...i}}function bz({component:e,style:n,__vars:t,className:i,variant:r,mod:a,size:o,hiddenFrom:l,visibleFrom:f,lightHidden:c,darkHidden:h,renderRoot:d,__size:p,ref:v,...b}){var F,R;const w=oi(),k=e||"div",{styleProps:_,rest:x}=Cu(b),C=(R=(F=MK())==null?void 0:F())==null?void 0:R(_.sx),T=Q1(),O=SX({styleProps:_,theme:w,data:sX}),E=RK(),M=E&&O.hasResponsiveStyles?oX(O.styles,O.media):T,N={ref:v,style:EX({theme:w,style:n,vars:t,styleProps:O.inlineStyles}),className:dn(i,C,{[M]:O.hasResponsiveStyles,"mantine-light-hidden":c,"mantine-dark-hidden":h,[`mantine-hidden-from-${l}`]:l,[`mantine-visible-from-${f}`]:f}),"data-variant":r,"data-size":X$(o)?void 0:o||void 0,size:p,...yz(a),...x};return y.jsxs(y.Fragment,{children:[O.hasResponsiveStyles&&y.jsx(Cc,{selector:`.${M}`,styles:O.styles,media:O.media,deduplicate:E}),typeof d=="function"?d(N):y.jsx(k,{...N})]})}bz.displayName="@mantine/core/Box";const ye=AX(bz),TX=A.createContext({dir:"ltr",toggleDirection:()=>{},setDirection:()=>{}});function Au(){return A.use(TX)}const[jX,ka]=ba("ScrollArea.Root component was not found in tree");function il(e,n){const t=A.useEffectEvent(n);ss(()=>{let i=0;if(e){const r=new ResizeObserver(()=>{cancelAnimationFrame(i),i=window.requestAnimationFrame(t)});return r.observe(e),()=>{window.cancelAnimationFrame(i),r.unobserve(e)}}},[e])}function MX(e){const{style:n,...t}=e,i=ka(),[r,a]=A.useState(0),[o,l]=A.useState(0),f=!!(r&&o);return il(i.scrollbarX,()=>{var h;const c=((h=i.scrollbarX)==null?void 0:h.offsetHeight)||0;i.onCornerHeightChange(c),l(c)}),il(i.scrollbarY,()=>{var h;const c=((h=i.scrollbarY)==null?void 0:h.offsetWidth)||0;i.onCornerWidthChange(c),a(c)}),f?y.jsx("div",{...t,style:{...n,width:r,height:o}}):null}function DX(e){const n=ka(),t=!!(n.scrollbarX&&n.scrollbarY);return n.type!=="scroll"&&t?y.jsx(MX,{...e}):null}const RX={scrollHideDelay:1e3,type:"hover"};function wz(e){const{type:n,scrollHideDelay:t,scrollbars:i,getStyles:r,ref:a,...o}=ke("ScrollAreaRoot",RX,e),[l,f]=A.useState(null),[c,h]=A.useState(null),[d,p]=A.useState(null),[v,b]=A.useState(null),[w,k]=A.useState(null),[_,x]=A.useState(0),[C,T]=A.useState(0),[O,E]=A.useState(!1),[M,N]=A.useState(!1),F=Bt(a,R=>f(R));return y.jsx(jX,{value:{type:n,scrollHideDelay:t,scrollArea:l,viewport:c,onViewportChange:h,content:d,onContentChange:p,scrollbarX:v,onScrollbarXChange:b,scrollbarXEnabled:O,onScrollbarXEnabledChange:E,scrollbarY:w,onScrollbarYChange:k,scrollbarYEnabled:M,onScrollbarYEnabledChange:N,onCornerWidthChange:x,onCornerHeightChange:T,getStyles:r},children:y.jsx(ye,{...o,ref:F,__vars:{"--sa-corner-width":i!=="xy"?"0px":`${_}px`,"--sa-corner-height":i!=="xy"?"0px":`${C}px`}})})}wz.displayName="@mantine/core/ScrollAreaRoot";function kz(e,n){const t=e/n;return Number.isNaN(t)?0:t}function ey(e){const n=kz(e.viewport,e.content),t=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,i=(e.scrollbar.size-t)*n;return Math.max(i,18)}function _z(e,n){return t=>{if(e[0]===e[1]||n[0]===n[1])return n[0];const i=(n[1]-n[0])/(e[1]-e[0]);return n[0]+i*(t-e[0])}}function PX(e,[n,t]){return Math.min(t,Math.max(n,e))}function g5(e,n,t="ltr"){const i=ey(n),r=n.scrollbar.paddingStart+n.scrollbar.paddingEnd,a=n.scrollbar.size-r,o=n.content-n.viewport,l=a-i,f=PX(e,t==="ltr"?[0,o]:[o*-1,0]);return _z([0,o],[0,l])(f)}function NX(e,n,t,i="ltr"){const r=ey(t),a=r/2,o=n||a,l=r-o,f=t.scrollbar.paddingStart+o,c=t.scrollbar.size-t.scrollbar.paddingEnd-l,h=t.content-t.viewport,d=i==="ltr"?[0,h]:[h*-1,0];return _z([f,c],d)(e)}function xz(e,n){return e>0&&e{e==null||e(i),(t===!1||!i.defaultPrevented)&&(n==null||n(i))}}const[$X,Sz]=ba("ScrollAreaScrollbar was not found in tree");function Cz(e){const{sizes:n,hasThumb:t,onThumbChange:i,onThumbPointerUp:r,onThumbPointerDown:a,onThumbPositionChange:o,onDragScroll:l,onWheelScroll:f,onResize:c,ref:h,...d}=e,p=ka(),[v,b]=A.useState(null),w=Bt(h,N=>b(N)),k=A.useRef(null),_=A.useRef(""),{viewport:x}=p,C=n.content-n.viewport,T=A.useEffectEvent(f),O=lh(o),E=K1(c,10),M=N=>{k.current&&l({x:N.clientX-k.current.left,y:N.clientY-k.current.top})};return A.useEffect(()=>{const N=F=>{const R=F.target;v!=null&&v.contains(R)&&T(F,C)};return document.addEventListener("wheel",N,{passive:!1}),()=>document.removeEventListener("wheel",N,{passive:!1})},[x,v,C]),A.useEffect(O,[n,O]),il(v,E),il(p.content,E),y.jsx($X,{value:{scrollbar:v,hasThumb:t,onThumbChange:lh(i),onThumbPointerUp:lh(r),onThumbPositionChange:O,onThumbPointerDown:lh(a)},children:y.jsx("div",{...d,ref:w,"data-mantine-scrollbar":!0,style:{position:"absolute",...d.style},onPointerDown:lu(e.onPointerDown,N=>{N.preventDefault(),N.button===0&&(N.target.setPointerCapture(N.pointerId),k.current=v.getBoundingClientRect(),_.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",M(N))}),onPointerMove:lu(e.onPointerMove,M),onPointerUp:lu(e.onPointerUp,N=>{const F=N.target;F.hasPointerCapture(N.pointerId)&&(N.preventDefault(),F.releasePointerCapture(N.pointerId))}),onLostPointerCapture:()=>{document.body.style.webkitUserSelect=_.current,k.current=null}})})}const Az=e=>{const{sizes:n,onSizesChange:t,style:i,ref:r,...a}=e,o=ka(),[l,f]=A.useState(),c=A.useRef(null),h=Bt(r,c,o.onScrollbarXChange);return A.useEffect(()=>{c.current&&f(getComputedStyle(c.current))},[c]),y.jsx(Cz,{"data-orientation":"horizontal",...a,ref:h,sizes:n,style:{...i,"--sa-thumb-width":`${ey(n)}px`},onThumbPointerDown:d=>e.onThumbPointerDown(d.x),onDragScroll:d=>e.onDragScroll(d.x),onWheelScroll:(d,p)=>{if(o.viewport){const v=o.viewport.scrollLeft+d.deltaX;e.onWheelScroll(v),xz(v,p)&&d.preventDefault()}},onResize:()=>{c.current&&o.viewport&&l&&t({content:o.viewport.scrollWidth,viewport:o.viewport.offsetWidth,scrollbar:{size:c.current.clientWidth,paddingStart:Sg(l.paddingLeft),paddingEnd:Sg(l.paddingRight)}})}})};Az.displayName="@mantine/core/ScrollAreaScrollbarX";function Oz(e){const{sizes:n,onSizesChange:t,style:i,ref:r,...a}=e,o=ka(),[l,f]=A.useState(),c=A.useRef(null),h=Bt(r,c,o.onScrollbarYChange);return A.useEffect(()=>{c.current&&f(window.getComputedStyle(c.current))},[]),y.jsx(Cz,{...a,"data-orientation":"vertical",ref:h,sizes:n,style:{"--sa-thumb-height":`${ey(n)}px`,...i},onThumbPointerDown:d=>e.onThumbPointerDown(d.y),onDragScroll:d=>e.onDragScroll(d.y),onWheelScroll:(d,p)=>{if(o.viewport){const v=o.viewport.scrollTop+d.deltaY;e.onWheelScroll(v),xz(v,p)&&d.preventDefault()}},onResize:()=>{c.current&&o.viewport&&l&&t({content:o.viewport.scrollHeight,viewport:o.viewport.offsetHeight,scrollbar:{size:c.current.clientHeight,paddingStart:Sg(l.paddingTop),paddingEnd:Sg(l.paddingBottom)}})}})}Oz.displayName="@mantine/core/ScrollAreaScrollbarY";function ny(e){const{orientation:n="vertical",...t}=e,{dir:i}=Au(),r=ka(),a=A.useRef(null),o=A.useRef(0),[l,f]=A.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),c=kz(l.viewport,l.content),h={...t,sizes:l,onSizesChange:f,hasThumb:c>0&&c<1,onThumbChange:p=>{a.current=p},onThumbPointerUp:()=>{o.current=0},onThumbPointerDown:p=>{o.current=p}},d=(p,v)=>NX(p,o.current,l,v);return n==="horizontal"?y.jsx(Az,{...h,onThumbPositionChange:()=>{if(r.viewport&&a.current){const p=r.viewport.scrollLeft,v=g5(p,l,i);a.current.style.transform=`translate3d(${v}px, 0, 0)`}},onWheelScroll:p=>{r.viewport&&(r.viewport.scrollLeft=p)},onDragScroll:p=>{r.viewport&&(r.viewport.scrollLeft=d(p,i))}}):n==="vertical"?y.jsx(Oz,{...h,onThumbPositionChange:()=>{if(r.viewport&&a.current){const p=r.viewport.scrollTop,v=g5(p,l);l.scrollbar.size===0?a.current.style.setProperty("--thumb-opacity","0"):a.current.style.setProperty("--thumb-opacity","1"),a.current.style.transform=`translate3d(0, ${v}px, 0)`}},onWheelScroll:p=>{r.viewport&&(r.viewport.scrollTop=p)},onDragScroll:p=>{r.viewport&&(r.viewport.scrollTop=d(p))}}):null}ny.displayName="@mantine/core/ScrollAreaScrollbarVisible";function D6(e){const n=ka(),{forceMount:t,...i}=e,[r,a]=A.useState(!1),o=e.orientation==="horizontal",l=K1(()=>{if(n.viewport){const f=n.viewport.offsetWidth{const{scrollArea:o}=i;let l=0;if(o){const f=()=>{window.clearTimeout(l),a(!0)},c=()=>{l=window.setTimeout(()=>a(!1),i.scrollHideDelay)};return o.addEventListener("pointerenter",f),o.addEventListener("pointerleave",c),()=>{window.clearTimeout(l),o.removeEventListener("pointerenter",f),o.removeEventListener("pointerleave",c)}}},[i.scrollArea,i.scrollHideDelay]),n||r?y.jsx(D6,{"data-state":r?"visible":"hidden",...t}):null}Ez.displayName="@mantine/core/ScrollAreaScrollbarHover";function zX(e){const{forceMount:n,...t}=e,i=ka(),r=e.orientation==="horizontal",[a,o]=A.useState("hidden"),l=K1(()=>o("idle"),100);return A.useEffect(()=>{if(a==="idle"){const f=window.setTimeout(()=>o("hidden"),i.scrollHideDelay);return()=>window.clearTimeout(f)}},[a,i.scrollHideDelay]),A.useEffect(()=>{const{viewport:f}=i,c=r?"scrollLeft":"scrollTop";if(f){let h=f[c];const d=()=>{const p=f[c];h!==p&&(o("scrolling"),l()),h=p};return f.addEventListener("scroll",d),()=>f.removeEventListener("scroll",d)}},[i.viewport,r,l]),n||a!=="hidden"?y.jsx(ny,{"data-state":a==="hidden"?"hidden":"visible",...t,onPointerEnter:lu(e.onPointerEnter,()=>o("interacting")),onPointerLeave:lu(e.onPointerLeave,()=>o("idle"))}):null}function tS(e){const{forceMount:n,...t}=e,i=ka(),{onScrollbarXEnabledChange:r,onScrollbarYEnabledChange:a}=i,o=e.orientation==="horizontal";return A.useEffect(()=>(o?r(!0):a(!0),()=>{o?r(!1):a(!1)}),[o,r,a]),i.type==="hover"?y.jsx(Ez,{...t,forceMount:n}):i.type==="scroll"?y.jsx(zX,{...t,forceMount:n}):i.type==="auto"?y.jsx(D6,{...t,forceMount:n}):i.type==="always"?y.jsx(ny,{...t}):null}tS.displayName="@mantine/core/ScrollAreaScrollbar";function LX(e,n=()=>{}){let t={left:e.scrollLeft,top:e.scrollTop},i=0;return(function r(){const a={left:e.scrollLeft,top:e.scrollTop},o=t.left!==a.left,l=t.top!==a.top;(o||l)&&n(),t=a,i=window.requestAnimationFrame(r)})(),()=>window.cancelAnimationFrame(i)}function Tz(e){const{style:n,ref:t,...i}=e,r=ka(),a=Sz(),{onThumbPositionChange:o}=a,l=Bt(t,h=>a.onThumbChange(h)),f=A.useRef(void 0),c=K1(()=>{f.current&&(f.current(),f.current=void 0)},100);return A.useEffect(()=>{const{viewport:h}=r;if(h){const d=()=>{c(),f.current||(f.current=LX(h,o),o())};return o(),h.addEventListener("scroll",d),()=>h.removeEventListener("scroll",d)}},[r.viewport,c,o]),y.jsx("div",{"data-state":a.hasThumb?"visible":"hidden",...i,ref:l,style:{width:"var(--sa-thumb-width)",height:"var(--sa-thumb-height)",...n},onPointerDownCapture:lu(e.onPointerDownCapture,h=>{const d=h.target.getBoundingClientRect(),p=h.clientX-d.left,v=h.clientY-d.top;a.onThumbPointerDown({x:p,y:v})}),onPointerUp:lu(e.onPointerUp,a.onThumbPointerUp)})}Tz.displayName="@mantine/core/ScrollAreaThumb";function iS(e){const{forceMount:n,...t}=e,i=Sz();return n||i.hasThumb?y.jsx(Tz,{...t}):null}iS.displayName="@mantine/core/ScrollAreaThumb";function jz({children:e,style:n,ref:t,onWheel:i,...r}){const a=ka(),o=Bt(t,a.onViewportChange),l=f=>{if(i==null||i(f),a.scrollbarXEnabled&&a.viewport&&f.shiftKey){const{scrollTop:c,scrollHeight:h,clientHeight:d,scrollWidth:p,clientWidth:v}=a.viewport,b=c<1,w=c>=h-d-1;p>v&&(b||w)&&f.stopPropagation()}};return y.jsx(ye,{...r,ref:o,onWheel:l,style:{overflowX:a.scrollbarXEnabled?"scroll":"hidden",overflowY:a.scrollbarYEnabled?"scroll":"hidden",...n},children:y.jsx("div",{...a.getStyles("content"),ref:a.onContentChange,children:e})})}jz.displayName="@mantine/core/ScrollAreaViewport";var R6={root:"m_d57069b5",content:"m_b1336c6",viewport:"m_c0783ff9",viewportInner:"m_f8f631dd",scrollbar:"m_c44ba933",thumb:"m_d8b5e363",corner:"m_21657268"};function ty(){return typeof window<"u"}function Ac(e){return Mz(e)?(e.nodeName||"").toLowerCase():"#document"}function kr(e){var n;return(e==null||(n=e.ownerDocument)==null?void 0:n.defaultView)||window}function bo(e){var n;return(n=(Mz(e)?e.ownerDocument:e.document)||window.document)==null?void 0:n.documentElement}function Mz(e){return ty()?e instanceof Node||e instanceof kr(e).Node:!1}function Lt(e){return ty()?e instanceof Element||e instanceof kr(e).Element:!1}function _a(e){return ty()?e instanceof HTMLElement||e instanceof kr(e).HTMLElement:!1}function rS(e){return!ty()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof kr(e).ShadowRoot}function Pm(e){const{overflow:n,overflowX:t,overflowY:i,display:r}=ga(e);return/auto|scroll|overlay|hidden|clip/.test(n+i+t)&&r!=="inline"&&r!=="contents"}function IX(e){return/^(table|td|th)$/.test(Ac(e))}function iy(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const BX=/transform|translate|scale|rotate|perspective|filter/,FX=/paint|layout|strict|content/,Hl=e=>!!e&&e!=="none";let ek;function P6(e){const n=Lt(e)?ga(e):e;return Hl(n.transform)||Hl(n.translate)||Hl(n.scale)||Hl(n.rotate)||Hl(n.perspective)||!ry()&&(Hl(n.backdropFilter)||Hl(n.filter))||BX.test(n.willChange||"")||FX.test(n.contain||"")}function qX(e){let n=ns(e);for(;_a(n)&&!Yo(n);){if(P6(n))return n;if(iy(n))return null;n=ns(n)}return null}function ry(){return ek==null&&(ek=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),ek}function Yo(e){return/^(html|body|#document)$/.test(Ac(e))}function ga(e){return kr(e).getComputedStyle(e)}function ay(e){return Lt(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function ns(e){if(Ac(e)==="html")return e;const n=e.assignedSlot||e.parentNode||rS(e)&&e.host||bo(e);return rS(n)?n.host:n}function Dz(e){const n=ns(e);return Yo(n)?e.ownerDocument?e.ownerDocument.body:e.body:_a(n)&&Pm(n)?n:Dz(n)}function Ko(e,n,t){var i;n===void 0&&(n=[]),t===void 0&&(t=!0);const r=Dz(e),a=r===((i=e.ownerDocument)==null?void 0:i.body),o=kr(r);if(a){const l=aS(o);return n.concat(o,o.visualViewport||[],Pm(r)?r:[],l&&t?Ko(l):[])}else return n.concat(r,Ko(r,[],t))}function aS(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}const HX=["top","right","bottom","left"],Ba=Math.min,Yi=Math.max,Cg=Math.round,Ev=Math.floor,ao=e=>({x:e,y:e}),UX={left:"right",right:"left",bottom:"top",top:"bottom"};function oS(e,n,t){return Yi(e,Ba(n,t))}function co(e,n){return typeof e=="function"?e(n):e}function Fa(e){return e.split("-")[0]}function Oc(e){return e.split("-")[1]}function N6(e){return e==="x"?"y":"x"}function $6(e){return e==="y"?"height":"width"}function $a(e){const n=e[0];return n==="t"||n==="b"?"y":"x"}function z6(e){return N6($a(e))}function VX(e,n,t){t===void 0&&(t=!1);const i=Oc(e),r=z6(e),a=$6(r);let o=r==="x"?i===(t?"end":"start")?"right":"left":i==="start"?"bottom":"top";return n.reference[a]>n.floating[a]&&(o=Ag(o)),[o,Ag(o)]}function WX(e){const n=Ag(e);return[sS(e),n,sS(n)]}function sS(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const y5=["left","right"],b5=["right","left"],GX=["top","bottom"],YX=["bottom","top"];function KX(e,n,t){switch(e){case"top":case"bottom":return t?n?b5:y5:n?y5:b5;case"left":case"right":return n?GX:YX;default:return[]}}function XX(e,n,t,i){const r=Oc(e);let a=KX(Fa(e),t==="start",i);return r&&(a=a.map(o=>o+"-"+r),n&&(a=a.concat(a.map(sS)))),a}function Ag(e){const n=Fa(e);return UX[n]+e.slice(n.length)}function ZX(e){return{top:0,right:0,bottom:0,left:0,...e}}function L6(e){return typeof e!="number"?ZX(e):{top:e,right:e,bottom:e,left:e}}function Gf(e){const{x:n,y:t,width:i,height:r}=e;return{width:i,height:r,top:t,left:n,right:n+i,bottom:t+r,x:n,y:t}}function QX(){const e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform}function JX(){const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(n=>{let{brand:t,version:i}=n;return t+"/"+i}).join(" "):navigator.userAgent}function eZ(){return/apple/i.test(navigator.vendor)}function nZ(){return QX().toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints}function tZ(){return JX().includes("jsdom/")}const w5="data-floating-ui-focusable",iZ="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function k5(e){let n=e.activeElement;for(;((t=n)==null||(t=t.shadowRoot)==null?void 0:t.activeElement)!=null;){var t;n=n.shadowRoot.activeElement}return n}function zh(e,n){if(!e||!n)return!1;const t=n.getRootNode==null?void 0:n.getRootNode();if(e.contains(n))return!0;if(t&&rS(t)){let i=n;for(;i;){if(e===i)return!0;i=i.parentNode||i.host}}return!1}function Mf(e){return"composedPath"in e?e.composedPath()[0]:e.target}function nk(e,n){if(n==null)return!1;if("composedPath"in e)return e.composedPath().includes(n);const t=e;return t.target!=null&&n.contains(t.target)}function rZ(e){return e.matches("html,body")}function Jl(e){return(e==null?void 0:e.ownerDocument)||document}function aZ(e){return _a(e)&&e.matches(iZ)}function oZ(e){if(!e||tZ())return!0;try{return e.matches(":focus-visible")}catch{return!0}}function sZ(e){return e?e.hasAttribute(w5)?e:e.querySelector("["+w5+"]")||e:null}function og(e,n,t){return t===void 0&&(t=!0),e.filter(r=>{var a;return r.parentId===n&&(!t||((a=r.context)==null?void 0:a.open))}).flatMap(r=>[r,...og(e,r.id,t)])}function lZ(e){return"nativeEvent"in e}function lS(e,n){const t=["mouse","pen"];return t.push("",void 0),t.includes(e)}var uZ=typeof document<"u",fZ=function(){},oo=uZ?A.useLayoutEffect:fZ;const cZ={...Z$};function Tv(e){const n=A.useRef(e);return oo(()=>{n.current=e}),n}const dZ=cZ.useInsertionEffect,hZ=dZ||(e=>e());function no(e){const n=A.useRef(()=>{});return hZ(()=>{n.current=e}),A.useCallback(function(){for(var t=arguments.length,i=new Array(t),r=0;r{const{placement:i="bottom",strategy:r="absolute",middleware:a=[],platform:o}=t,l=o.detectOverflow?o:{...o,detectOverflow:mZ},f=await(o.isRTL==null?void 0:o.isRTL(n));let c=await o.getElementRects({reference:e,floating:n,strategy:r}),{x:h,y:d}=_5(c,i,f),p=i,v=0;const b={};for(let w=0;w({name:"arrow",options:e,async fn(n){const{x:t,y:i,placement:r,rects:a,platform:o,elements:l,middlewareData:f}=n,{element:c,padding:h=0}=co(e,n)||{};if(c==null)return{};const d=L6(h),p={x:t,y:i},v=z6(r),b=$6(v),w=await o.getDimensions(c),k=v==="y",_=k?"top":"left",x=k?"bottom":"right",C=k?"clientHeight":"clientWidth",T=a.reference[b]+a.reference[v]-p[v]-a.floating[b],O=p[v]-a.reference[v],E=await(o.getOffsetParent==null?void 0:o.getOffsetParent(c));let M=E?E[C]:0;(!M||!await(o.isElement==null?void 0:o.isElement(E)))&&(M=l.floating[C]||a.floating[b]);const N=T/2-O/2,F=M/2-w[b]/2-1,R=Ba(d[_],F),L=Ba(d[x],F),B=R,G=M-w[b]-L,U=M/2-w[b]/2+N,H=oS(B,U,G),P=!f.arrow&&Oc(r)!=null&&U!==H&&a.reference[b]/2-(UU<=0)){var L,B;const U=(((L=a.flip)==null?void 0:L.index)||0)+1,H=M[U];if(H&&(!(d==="alignment"?x!==$a(H):!1)||R.every(q=>$a(q.placement)===x?q.overflows[0]>0:!0)))return{data:{index:U,overflows:R},reset:{placement:H}};let P=(B=R.filter(z=>z.overflows[0]<=0).sort((z,q)=>z.overflows[1]-q.overflows[1])[0])==null?void 0:B.placement;if(!P)switch(v){case"bestFit":{var G;const z=(G=R.filter(q=>{if(E){const Y=$a(q.placement);return Y===x||Y==="y"}return!0}).map(q=>[q.placement,q.overflows.filter(Y=>Y>0).reduce((Y,D)=>Y+D,0)]).sort((q,Y)=>q[1]-Y[1])[0])==null?void 0:G[0];z&&(P=z);break}case"initialPlacement":P=l;break}if(r!==P)return{reset:{placement:P}}}return{}}}};function x5(e,n){return{top:e.top-n.height,right:e.right-n.width,bottom:e.bottom-n.height,left:e.left-n.width}}function S5(e){return HX.some(n=>e[n]>=0)}const bZ=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(n){const{rects:t,platform:i}=n,{strategy:r="referenceHidden",...a}=co(e,n);switch(r){case"referenceHidden":{const o=await i.detectOverflow(n,{...a,elementContext:"reference"}),l=x5(o,t.reference);return{data:{referenceHiddenOffsets:l,referenceHidden:S5(l)}}}case"escaped":{const o=await i.detectOverflow(n,{...a,altBoundary:!0}),l=x5(o,t.floating);return{data:{escapedOffsets:l,escaped:S5(l)}}}default:return{}}}}};function Rz(e){const n=Ba(...e.map(a=>a.left)),t=Ba(...e.map(a=>a.top)),i=Yi(...e.map(a=>a.right)),r=Yi(...e.map(a=>a.bottom));return{x:n,y:t,width:i-n,height:r-t}}function wZ(e){const n=e.slice().sort((r,a)=>r.y-a.y),t=[];let i=null;for(let r=0;ri.height/2?t.push([a]):t[t.length-1].push(a),i=a}return t.map(r=>Gf(Rz(r)))}const kZ=function(e){return e===void 0&&(e={}),{name:"inline",options:e,async fn(n){const{placement:t,elements:i,rects:r,platform:a,strategy:o}=n,{padding:l=2,x:f,y:c}=co(e,n),h=Array.from(await(a.getClientRects==null?void 0:a.getClientRects(i.reference))||[]),d=wZ(h),p=Gf(Rz(h)),v=L6(l);function b(){if(d.length===2&&d[0].left>d[1].right&&f!=null&&c!=null)return d.find(k=>f>k.left-v.left&&fk.top-v.top&&c=2){if($a(t)==="y"){const R=d[0],L=d[d.length-1],B=Fa(t)==="top",G=R.top,U=L.bottom,H=B?R.left:L.left,P=B?R.right:L.right,z=P-H,q=U-G;return{top:G,bottom:U,left:H,right:P,width:z,height:q,x:H,y:G}}const k=Fa(t)==="left",_=Yi(...d.map(R=>R.right)),x=Ba(...d.map(R=>R.left)),C=d.filter(R=>k?R.left===x:R.right===_),T=C[0].top,O=C[C.length-1].bottom,E=x,M=_,N=M-E,F=O-T;return{top:T,bottom:O,left:E,right:M,width:N,height:F,x:E,y:T}}return p}const w=await a.getElementRects({reference:{getBoundingClientRect:b},floating:i.floating,strategy:o});return r.reference.x!==w.reference.x||r.reference.y!==w.reference.y||r.reference.width!==w.reference.width||r.reference.height!==w.reference.height?{reset:{rects:w}}:{}}}},Pz=new Set(["left","top"]);async function _Z(e,n){const{placement:t,platform:i,elements:r}=e,a=await(i.isRTL==null?void 0:i.isRTL(r.floating)),o=Fa(t),l=Oc(t),f=$a(t)==="y",c=Pz.has(o)?-1:1,h=a&&f?-1:1,d=co(n,e);let{mainAxis:p,crossAxis:v,alignmentAxis:b}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return l&&typeof b=="number"&&(v=l==="end"?b*-1:b),f?{x:v*h,y:p*c}:{x:p*c,y:v*h}}const xZ=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(n){var t,i;const{x:r,y:a,placement:o,middlewareData:l}=n,f=await _Z(n,e);return o===((t=l.offset)==null?void 0:t.placement)&&(i=l.arrow)!=null&&i.alignmentOffset?{}:{x:r+f.x,y:a+f.y,data:{...f,placement:o}}}}},SZ=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(n){const{x:t,y:i,placement:r,platform:a}=n,{mainAxis:o=!0,crossAxis:l=!1,limiter:f={fn:_=>{let{x,y:C}=_;return{x,y:C}}},...c}=co(e,n),h={x:t,y:i},d=await a.detectOverflow(n,c),p=$a(Fa(r)),v=N6(p);let b=h[v],w=h[p];if(o){const _=v==="y"?"top":"left",x=v==="y"?"bottom":"right",C=b+d[_],T=b-d[x];b=oS(C,b,T)}if(l){const _=p==="y"?"top":"left",x=p==="y"?"bottom":"right",C=w+d[_],T=w-d[x];w=oS(C,w,T)}const k=f.fn({...n,[v]:b,[p]:w});return{...k,data:{x:k.x-t,y:k.y-i,enabled:{[v]:o,[p]:l}}}}}},CZ=function(e){return e===void 0&&(e={}),{options:e,fn(n){const{x:t,y:i,placement:r,rects:a,middlewareData:o}=n,{offset:l=0,mainAxis:f=!0,crossAxis:c=!0}=co(e,n),h={x:t,y:i},d=$a(r),p=N6(d);let v=h[p],b=h[d];const w=co(l,n),k=typeof w=="number"?{mainAxis:w,crossAxis:0}:{mainAxis:0,crossAxis:0,...w};if(f){const C=p==="y"?"height":"width",T=a.reference[p]-a.floating[C]+k.mainAxis,O=a.reference[p]+a.reference[C]-k.mainAxis;vO&&(v=O)}if(c){var _,x;const C=p==="y"?"width":"height",T=Pz.has(Fa(r)),O=a.reference[d]-a.floating[C]+(T&&((_=o.offset)==null?void 0:_[d])||0)+(T?0:k.crossAxis),E=a.reference[d]+a.reference[C]+(T?0:((x=o.offset)==null?void 0:x[d])||0)-(T?k.crossAxis:0);bE&&(b=E)}return{[p]:v,[d]:b}}}},AZ=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(n){var t,i;const{placement:r,rects:a,platform:o,elements:l}=n,{apply:f=()=>{},...c}=co(e,n),h=await o.detectOverflow(n,c),d=Fa(r),p=Oc(r),v=$a(r)==="y",{width:b,height:w}=a.floating;let k,_;d==="top"||d==="bottom"?(k=d,_=p===(await(o.isRTL==null?void 0:o.isRTL(l.floating))?"start":"end")?"left":"right"):(_=d,k=p==="end"?"top":"bottom");const x=w-h.top-h.bottom,C=b-h.left-h.right,T=Ba(w-h[k],x),O=Ba(b-h[_],C),E=!n.middlewareData.shift;let M=T,N=O;if((t=n.middlewareData.shift)!=null&&t.enabled.x&&(N=C),(i=n.middlewareData.shift)!=null&&i.enabled.y&&(M=x),E&&!p){const R=Yi(h.left,0),L=Yi(h.right,0),B=Yi(h.top,0),G=Yi(h.bottom,0);v?N=b-2*(R!==0||L!==0?R+L:Yi(h.left,h.right)):M=w-2*(B!==0||G!==0?B+G:Yi(h.top,h.bottom))}await f({...n,availableWidth:N,availableHeight:M});const F=await o.getDimensions(l.floating);return b!==F.width||w!==F.height?{reset:{rects:!0}}:{}}}};function Nz(e){const n=ga(e);let t=parseFloat(n.width)||0,i=parseFloat(n.height)||0;const r=_a(e),a=r?e.offsetWidth:t,o=r?e.offsetHeight:i,l=Cg(t)!==a||Cg(i)!==o;return l&&(t=a,i=o),{width:t,height:i,$:l}}function I6(e){return Lt(e)?e:e.contextElement}function Lf(e){const n=I6(e);if(!_a(n))return ao(1);const t=n.getBoundingClientRect(),{width:i,height:r,$:a}=Nz(n);let o=(a?Cg(t.width):t.width)/i,l=(a?Cg(t.height):t.height)/r;return(!o||!Number.isFinite(o))&&(o=1),(!l||!Number.isFinite(l))&&(l=1),{x:o,y:l}}const OZ=ao(0);function $z(e){const n=kr(e);return!ry()||!n.visualViewport?OZ:{x:n.visualViewport.offsetLeft,y:n.visualViewport.offsetTop}}function EZ(e,n,t){return n===void 0&&(n=!1),!t||n&&t!==kr(e)?!1:n}function cu(e,n,t,i){n===void 0&&(n=!1),t===void 0&&(t=!1);const r=e.getBoundingClientRect(),a=I6(e);let o=ao(1);n&&(i?Lt(i)&&(o=Lf(i)):o=Lf(e));const l=EZ(a,t,i)?$z(a):ao(0);let f=(r.left+l.x)/o.x,c=(r.top+l.y)/o.y,h=r.width/o.x,d=r.height/o.y;if(a){const p=kr(a),v=i&&Lt(i)?kr(i):i;let b=p,w=aS(b);for(;w&&i&&v!==b;){const k=Lf(w),_=w.getBoundingClientRect(),x=ga(w),C=_.left+(w.clientLeft+parseFloat(x.paddingLeft))*k.x,T=_.top+(w.clientTop+parseFloat(x.paddingTop))*k.y;f*=k.x,c*=k.y,h*=k.x,d*=k.y,f+=C,c+=T,b=kr(w),w=aS(b)}}return Gf({width:h,height:d,x:f,y:c})}function oy(e,n){const t=ay(e).scrollLeft;return n?n.left+t:cu(bo(e)).left+t}function zz(e,n){const t=e.getBoundingClientRect(),i=t.left+n.scrollLeft-oy(e,t),r=t.top+n.scrollTop;return{x:i,y:r}}function TZ(e){let{elements:n,rect:t,offsetParent:i,strategy:r}=e;const a=r==="fixed",o=bo(i),l=n?iy(n.floating):!1;if(i===o||l&&a)return t;let f={scrollLeft:0,scrollTop:0},c=ao(1);const h=ao(0),d=_a(i);if((d||!d&&!a)&&((Ac(i)!=="body"||Pm(o))&&(f=ay(i)),d)){const v=cu(i);c=Lf(i),h.x=v.x+i.clientLeft,h.y=v.y+i.clientTop}const p=o&&!d&&!a?zz(o,f):ao(0);return{width:t.width*c.x,height:t.height*c.y,x:t.x*c.x-f.scrollLeft*c.x+h.x+p.x,y:t.y*c.y-f.scrollTop*c.y+h.y+p.y}}function jZ(e){return Array.from(e.getClientRects())}function MZ(e){const n=bo(e),t=ay(e),i=e.ownerDocument.body,r=Yi(n.scrollWidth,n.clientWidth,i.scrollWidth,i.clientWidth),a=Yi(n.scrollHeight,n.clientHeight,i.scrollHeight,i.clientHeight);let o=-t.scrollLeft+oy(e);const l=-t.scrollTop;return ga(i).direction==="rtl"&&(o+=Yi(n.clientWidth,i.clientWidth)-r),{width:r,height:a,x:o,y:l}}const C5=25;function DZ(e,n){const t=kr(e),i=bo(e),r=t.visualViewport;let a=i.clientWidth,o=i.clientHeight,l=0,f=0;if(r){a=r.width,o=r.height;const h=ry();(!h||h&&n==="fixed")&&(l=r.offsetLeft,f=r.offsetTop)}const c=oy(i);if(c<=0){const h=i.ownerDocument,d=h.body,p=getComputedStyle(d),v=h.compatMode==="CSS1Compat"&&parseFloat(p.marginLeft)+parseFloat(p.marginRight)||0,b=Math.abs(i.clientWidth-d.clientWidth-v);b<=C5&&(a-=b)}else c<=C5&&(a+=c);return{width:a,height:o,x:l,y:f}}function RZ(e,n){const t=cu(e,!0,n==="fixed"),i=t.top+e.clientTop,r=t.left+e.clientLeft,a=_a(e)?Lf(e):ao(1),o=e.clientWidth*a.x,l=e.clientHeight*a.y,f=r*a.x,c=i*a.y;return{width:o,height:l,x:f,y:c}}function A5(e,n,t){let i;if(n==="viewport")i=DZ(e,t);else if(n==="document")i=MZ(bo(e));else if(Lt(n))i=RZ(n,t);else{const r=$z(e);i={x:n.x-r.x,y:n.y-r.y,width:n.width,height:n.height}}return Gf(i)}function Lz(e,n){const t=ns(e);return t===n||!Lt(t)||Yo(t)?!1:ga(t).position==="fixed"||Lz(t,n)}function PZ(e,n){const t=n.get(e);if(t)return t;let i=Ko(e,[],!1).filter(l=>Lt(l)&&Ac(l)!=="body"),r=null;const a=ga(e).position==="fixed";let o=a?ns(e):e;for(;Lt(o)&&!Yo(o);){const l=ga(o),f=P6(o);!f&&l.position==="fixed"&&(r=null),(a?!f&&!r:!f&&l.position==="static"&&!!r&&(r.position==="absolute"||r.position==="fixed")||Pm(o)&&!f&&Lz(e,o))?i=i.filter(h=>h!==o):r=l,o=ns(o)}return n.set(e,i),i}function NZ(e){let{element:n,boundary:t,rootBoundary:i,strategy:r}=e;const o=[...t==="clippingAncestors"?iy(n)?[]:PZ(n,this._c):[].concat(t),i],l=A5(n,o[0],r);let f=l.top,c=l.right,h=l.bottom,d=l.left;for(let p=1;p{o(!1,1e-7)},1e3)}M===1&&!Bz(c,e.getBoundingClientRect())&&o(),T=!1}try{t=new IntersectionObserver(O,{...C,root:r.ownerDocument})}catch{t=new IntersectionObserver(O,C)}t.observe(e)}return o(!0),a}function uS(e,n,t,i){i===void 0&&(i={});const{ancestorScroll:r=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:f=!1}=i,c=I6(e),h=r||a?[...c?Ko(c):[],...n?Ko(n):[]]:[];h.forEach(_=>{r&&_.addEventListener("scroll",t,{passive:!0}),a&&_.addEventListener("resize",t)});const d=c&&l?FZ(c,t):null;let p=-1,v=null;o&&(v=new ResizeObserver(_=>{let[x]=_;x&&x.target===c&&v&&n&&(v.unobserve(n),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var C;(C=v)==null||C.observe(n)})),t()}),c&&!f&&v.observe(c),n&&v.observe(n));let b,w=f?cu(e):null;f&&k();function k(){const _=cu(e);w&&!Bz(w,_)&&t(),w=_,b=requestAnimationFrame(k)}return t(),()=>{var _;h.forEach(x=>{r&&x.removeEventListener("scroll",t),a&&x.removeEventListener("resize",t)}),d==null||d(),(_=v)==null||_.disconnect(),v=null,f&&cancelAnimationFrame(b)}}const qZ=xZ,HZ=SZ,UZ=yZ,VZ=AZ,WZ=bZ,E5=gZ,GZ=kZ,YZ=CZ,KZ=(e,n,t)=>{const i=new Map,r={platform:BZ,...t},a={...r.platform,_c:i};return vZ(e,n,{...r,platform:a})};var XZ=typeof document<"u",ZZ=function(){},sg=XZ?A.useLayoutEffect:ZZ;function Og(e,n){if(e===n)return!0;if(typeof e!=typeof n)return!1;if(typeof e=="function"&&e.toString()===n.toString())return!0;let t,i,r;if(e&&n&&typeof e=="object"){if(Array.isArray(e)){if(t=e.length,t!==n.length)return!1;for(i=t;i--!==0;)if(!Og(e[i],n[i]))return!1;return!0}if(r=Object.keys(e),t=r.length,t!==Object.keys(n).length)return!1;for(i=t;i--!==0;)if(!{}.hasOwnProperty.call(n,r[i]))return!1;for(i=t;i--!==0;){const a=r[i];if(!(a==="_owner"&&e.$$typeof)&&!Og(e[a],n[a]))return!1}return!0}return e!==e&&n!==n}function Fz(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function T5(e,n){const t=Fz(e);return Math.round(n*t)/t}function ik(e){const n=A.useRef(e);return sg(()=>{n.current=e}),n}function QZ(e){e===void 0&&(e={});const{placement:n="bottom",strategy:t="absolute",middleware:i=[],platform:r,elements:{reference:a,floating:o}={},transform:l=!0,whileElementsMounted:f,open:c}=e,[h,d]=A.useState({x:0,y:0,strategy:t,placement:n,middlewareData:{},isPositioned:!1}),[p,v]=A.useState(i);Og(p,i)||v(i);const[b,w]=A.useState(null),[k,_]=A.useState(null),x=A.useCallback(q=>{q!==E.current&&(E.current=q,w(q))},[]),C=A.useCallback(q=>{q!==M.current&&(M.current=q,_(q))},[]),T=a||b,O=o||k,E=A.useRef(null),M=A.useRef(null),N=A.useRef(h),F=f!=null,R=ik(f),L=ik(r),B=ik(c),G=A.useCallback(()=>{if(!E.current||!M.current)return;const q={placement:n,strategy:t,middleware:p};L.current&&(q.platform=L.current),KZ(E.current,M.current,q).then(Y=>{const D={...Y,isPositioned:B.current!==!1};U.current&&!Og(N.current,D)&&(N.current=D,Ks.flushSync(()=>{d(D)}))})},[p,n,t,L,B]);sg(()=>{c===!1&&N.current.isPositioned&&(N.current.isPositioned=!1,d(q=>({...q,isPositioned:!1})))},[c]);const U=A.useRef(!1);sg(()=>(U.current=!0,()=>{U.current=!1}),[]),sg(()=>{if(T&&(E.current=T),O&&(M.current=O),T&&O){if(R.current)return R.current(T,O,G);G()}},[T,O,G,R,F]);const H=A.useMemo(()=>({reference:E,floating:M,setReference:x,setFloating:C}),[x,C]),P=A.useMemo(()=>({reference:T,floating:O}),[T,O]),z=A.useMemo(()=>{const q={position:t,left:0,top:0};if(!P.floating)return q;const Y=T5(P.floating,h.x),D=T5(P.floating,h.y);return l?{...q,transform:"translate("+Y+"px, "+D+"px)",...Fz(P.floating)>=1.5&&{willChange:"transform"}}:{position:t,left:Y,top:D}},[t,l,P.floating,h.x,h.y]);return A.useMemo(()=>({...h,update:G,refs:H,elements:P,floatingStyles:z}),[h,G,H,P,z])}const JZ=e=>{function n(t){return{}.hasOwnProperty.call(t,"current")}return{name:"arrow",options:e,fn(t){const{element:i,padding:r}=typeof e=="function"?e(t):e;return i&&n(i)?i.current!=null?E5({element:i.current,padding:r}).fn(t):{}:i?E5({element:i,padding:r}).fn(t):{}}}},qz=(e,n)=>{const t=qZ(e);return{name:t.name,fn:t.fn,options:[e,n]}},B6=(e,n)=>{const t=HZ(e);return{name:t.name,fn:t.fn,options:[e,n]}},j5=(e,n)=>({fn:YZ(e).fn,options:[e,n]}),Eg=(e,n)=>{const t=UZ(e);return{name:t.name,fn:t.fn,options:[e,n]}},eQ=(e,n)=>{const t=VZ(e);return{name:t.name,fn:t.fn,options:[e,n]}},nQ=(e,n)=>{const t=WZ(e);return{name:t.name,fn:t.fn,options:[e,n]}},wh=(e,n)=>{const t=GZ(e);return{name:t.name,fn:t.fn,options:[e,n]}},Hz=(e,n)=>{const t=JZ(e);return{name:t.name,fn:t.fn,options:[e,n]}};function Uz(e){const n=A.useRef(void 0),t=A.useCallback(i=>{const r=e.map(a=>{if(a!=null){if(typeof a=="function"){const o=a,l=o(i);return typeof l=="function"?l:()=>{o(null)}}return a.current=i,()=>{a.current=null}}});return()=>{r.forEach(a=>a==null?void 0:a())}},e);return A.useMemo(()=>e.every(i=>i==null)?null:i=>{n.current&&(n.current(),n.current=void 0),i!=null&&(n.current=t(i))},e)}const tQ="data-floating-ui-focusable",M5="active",D5="selected",iQ={...Z$};let R5=!1,rQ=0;const P5=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+rQ++;function aQ(){const[e,n]=A.useState(()=>R5?P5():void 0);return oo(()=>{e==null&&n(P5())},[]),A.useEffect(()=>{R5=!0},[]),e}const oQ=iQ.useId,Vz=oQ||aQ;function sQ(){const e=new Map;return{emit(n,t){var i;(i=e.get(n))==null||i.forEach(r=>r(t))},on(n,t){e.has(n)||e.set(n,new Set),e.get(n).add(t)},off(n,t){var i;(i=e.get(n))==null||i.delete(t)}}}const lQ=A.createContext(null),uQ=A.createContext(null),F6=()=>{var e;return((e=A.useContext(lQ))==null?void 0:e.id)||null},q6=()=>A.useContext(uQ);function H6(e){return"data-floating-ui-"+e}function la(e){e.current!==-1&&(clearTimeout(e.current),e.current=-1)}const N5=H6("safe-polygon");function lg(e,n,t){if(t&&!lS(t))return 0;if(typeof e=="number")return e;if(typeof e=="function"){const i=e();return typeof i=="number"?i:i==null?void 0:i[n]}return e==null?void 0:e[n]}function rk(e){return typeof e=="function"?e():e}function fQ(e,n){n===void 0&&(n={});const{open:t,onOpenChange:i,dataRef:r,events:a,elements:o}=e,{enabled:l=!0,delay:f=0,handleClose:c=null,mouseOnly:h=!1,restMs:d=0,move:p=!0}=n,v=q6(),b=F6(),w=Tv(c),k=Tv(f),_=Tv(t),x=Tv(d),C=A.useRef(),T=A.useRef(-1),O=A.useRef(),E=A.useRef(-1),M=A.useRef(!0),N=A.useRef(!1),F=A.useRef(()=>{}),R=A.useRef(!1),L=no(()=>{var z;const q=(z=r.current.openEvent)==null?void 0:z.type;return(q==null?void 0:q.includes("mouse"))&&q!=="mousedown"});A.useEffect(()=>{if(!l)return;function z(q){let{open:Y}=q;Y||(la(T),la(E),M.current=!0,R.current=!1)}return a.on("openchange",z),()=>{a.off("openchange",z)}},[l,a]),A.useEffect(()=>{if(!l||!w.current||!t)return;function z(Y){L()&&i(!1,Y,"hover")}const q=Jl(o.floating).documentElement;return q.addEventListener("mouseleave",z),()=>{q.removeEventListener("mouseleave",z)}},[o.floating,t,i,l,w,L]);const B=A.useCallback(function(z,q,Y){q===void 0&&(q=!0),Y===void 0&&(Y="hover");const D=lg(k.current,"close",C.current);D&&!O.current?(la(T),T.current=window.setTimeout(()=>i(!1,z,Y),D)):q&&(la(T),i(!1,z,Y))},[k,i]),G=no(()=>{F.current(),O.current=void 0}),U=no(()=>{if(N.current){const z=Jl(o.floating).body;z.style.pointerEvents="",z.removeAttribute(N5),N.current=!1}}),H=no(()=>r.current.openEvent?["click","mousedown"].includes(r.current.openEvent.type):!1);A.useEffect(()=>{if(!l)return;function z(W){if(la(T),M.current=!1,h&&!lS(C.current)||rk(x.current)>0&&!lg(k.current,"open"))return;const $=lg(k.current,"open",C.current);$?T.current=window.setTimeout(()=>{_.current||i(!0,W,"hover")},$):t||i(!0,W,"hover")}function q(W){if(H()){U();return}F.current();const $=Jl(o.floating);if(la(E),R.current=!1,w.current&&r.current.floatingContext){t||la(T),O.current=w.current({...r.current.floatingContext,tree:v,x:W.clientX,y:W.clientY,onClose(){U(),G(),H()||B(W,!0,"safe-polygon")}});const ee=O.current;$.addEventListener("mousemove",ee),F.current=()=>{$.removeEventListener("mousemove",ee)};return}(C.current==="touch"?!zh(o.floating,W.relatedTarget):!0)&&B(W)}function Y(W){H()||r.current.floatingContext&&(w.current==null||w.current({...r.current.floatingContext,tree:v,x:W.clientX,y:W.clientY,onClose(){U(),G(),H()||B(W)}})(W))}function D(){la(T)}function V(W){H()||B(W,!1)}if(Lt(o.domReference)){const W=o.domReference,$=o.floating;return t&&W.addEventListener("mouseleave",Y),p&&W.addEventListener("mousemove",z,{once:!0}),W.addEventListener("mouseenter",z),W.addEventListener("mouseleave",q),$&&($.addEventListener("mouseleave",Y),$.addEventListener("mouseenter",D),$.addEventListener("mouseleave",V)),()=>{t&&W.removeEventListener("mouseleave",Y),p&&W.removeEventListener("mousemove",z),W.removeEventListener("mouseenter",z),W.removeEventListener("mouseleave",q),$&&($.removeEventListener("mouseleave",Y),$.removeEventListener("mouseenter",D),$.removeEventListener("mouseleave",V))}}},[o,l,e,h,p,B,G,U,i,t,_,v,k,w,r,H,x]),oo(()=>{var z;if(l&&t&&(z=w.current)!=null&&(z=z.__options)!=null&&z.blockPointerEvents&&L()){N.current=!0;const Y=o.floating;if(Lt(o.domReference)&&Y){var q;const D=Jl(o.floating).body;D.setAttribute(N5,"");const V=o.domReference,W=v==null||(q=v.nodesRef.current.find($=>$.id===b))==null||(q=q.context)==null?void 0:q.elements.floating;return W&&(W.style.pointerEvents=""),D.style.pointerEvents="none",V.style.pointerEvents="auto",Y.style.pointerEvents="auto",()=>{D.style.pointerEvents="",V.style.pointerEvents="",Y.style.pointerEvents=""}}}},[l,t,b,o,v,w,L]),oo(()=>{t||(C.current=void 0,R.current=!1,G(),U())},[t,G,U]),A.useEffect(()=>()=>{G(),la(T),la(E),U()},[l,o.domReference,G,U]);const P=A.useMemo(()=>{function z(q){C.current=q.pointerType}return{onPointerDown:z,onPointerEnter:z,onMouseMove(q){const{nativeEvent:Y}=q;function D(){!M.current&&!_.current&&i(!0,Y,"hover")}h&&!lS(C.current)||t||rk(x.current)===0||R.current&&q.movementX**2+q.movementY**2<2||(la(E),C.current==="touch"?D():(R.current=!0,E.current=window.setTimeout(D,rk(x.current))))}}},[h,i,t,_,x]);return A.useMemo(()=>l?{reference:P}:{},[l,P])}const fS=()=>{},Wz=A.createContext({delay:0,initialDelay:0,timeoutMs:0,currentId:null,setCurrentId:fS,setState:fS,isInstantPhase:!1}),cQ=()=>A.useContext(Wz);function dQ(e){const{children:n,delay:t,timeoutMs:i=0}=e,[r,a]=A.useReducer((f,c)=>({...f,...c}),{delay:t,timeoutMs:i,initialDelay:t,currentId:null,isInstantPhase:!1}),o=A.useRef(null),l=A.useCallback(f=>{a({currentId:f})},[]);return oo(()=>{r.currentId?o.current===null?o.current=r.currentId:r.isInstantPhase||a({isInstantPhase:!0}):(r.isInstantPhase&&a({isInstantPhase:!1}),o.current=null)},[r.currentId,r.isInstantPhase]),y.jsx(Wz.Provider,{value:A.useMemo(()=>({...r,setState:a,setCurrentId:l}),[r,l]),children:n})}function hQ(e,n){n===void 0&&(n={});const{open:t,onOpenChange:i,floatingId:r}=e,{id:a,enabled:o=!0}=n,l=a??r,f=cQ(),{currentId:c,setCurrentId:h,initialDelay:d,setState:p,timeoutMs:v}=f;return oo(()=>{o&&c&&(p({delay:{open:1,close:lg(d,"close")}}),c!==l&&i(!1))},[o,l,i,p,c,d]),oo(()=>{function b(){i(!1),p({delay:d,currentId:null})}if(o&&c&&!t&&c===l){if(v){const w=window.setTimeout(b,v);return()=>{clearTimeout(w)}}b()}},[o,t,p,c,l,i,d,v]),oo(()=>{o&&(h===fS||!t||h(l))},[o,t,h,l]),f}const mQ={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},pQ={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},$5=e=>{var n,t;return{escapeKey:typeof e=="boolean"?e:(n=e==null?void 0:e.escapeKey)!=null?n:!1,outsidePress:typeof e=="boolean"?e:(t=e==null?void 0:e.outsidePress)!=null?t:!0}};function vQ(e,n){n===void 0&&(n={});const{open:t,onOpenChange:i,elements:r,dataRef:a}=e,{enabled:o=!0,escapeKey:l=!0,outsidePress:f=!0,outsidePressEvent:c="pointerdown",referencePress:h=!1,referencePressEvent:d="pointerdown",ancestorScroll:p=!1,bubbles:v,capture:b}=n,w=q6(),k=no(typeof f=="function"?f:()=>!1),_=typeof f=="function"?k:f,x=A.useRef(!1),{escapeKey:C,outsidePress:T}=$5(v),{escapeKey:O,outsidePress:E}=$5(b),M=A.useRef(!1),N=no(U=>{var H;if(!t||!o||!l||U.key!=="Escape"||M.current)return;const P=(H=a.current.floatingContext)==null?void 0:H.nodeId,z=w?og(w.nodesRef.current,P):[];if(!C&&(U.stopPropagation(),z.length>0)){let q=!0;if(z.forEach(Y=>{var D;if((D=Y.context)!=null&&D.open&&!Y.context.dataRef.current.__escapeKeyBubbles){q=!1;return}}),!q)return}i(!1,lZ(U)?U.nativeEvent:U,"escape-key")}),F=no(U=>{var H;const P=()=>{var z;N(U),(z=Mf(U))==null||z.removeEventListener("keydown",P)};(H=Mf(U))==null||H.addEventListener("keydown",P)}),R=no(U=>{var H;const P=a.current.insideReactTree;a.current.insideReactTree=!1;const z=x.current;if(x.current=!1,c==="click"&&z||P||typeof _=="function"&&!_(U))return;const q=Mf(U),Y="["+H6("inert")+"]",D=Jl(r.floating).querySelectorAll(Y);let V=Lt(q)?q:null;for(;V&&!Yo(V);){const ee=ns(V);if(Yo(ee)||!Lt(ee))break;V=ee}if(D.length&&Lt(q)&&!rZ(q)&&!zh(q,r.floating)&&Array.from(D).every(ee=>!zh(V,ee)))return;if(_a(q)&&G){const ee=Yo(q),re=ga(q),se=/auto|scroll/,ge=ee||se.test(re.overflowX),ae=ee||se.test(re.overflowY),le=ge&&q.clientWidth>0&&q.scrollWidth>q.clientWidth,_e=ae&&q.clientHeight>0&&q.scrollHeight>q.clientHeight,ne=re.direction==="rtl",$e=_e&&(ne?U.offsetX<=q.offsetWidth-q.clientWidth:U.offsetX>q.clientWidth),be=le&&U.offsetY>q.clientHeight;if($e||be)return}const W=(H=a.current.floatingContext)==null?void 0:H.nodeId,$=w&&og(w.nodesRef.current,W).some(ee=>{var re;return nk(U,(re=ee.context)==null?void 0:re.elements.floating)});if(nk(U,r.floating)||nk(U,r.domReference)||$)return;const X=w?og(w.nodesRef.current,W):[];if(X.length>0){let ee=!0;if(X.forEach(re=>{var se;if((se=re.context)!=null&&se.open&&!re.context.dataRef.current.__outsidePressBubbles){ee=!1;return}}),!ee)return}i(!1,U,"outside-press")}),L=no(U=>{var H;const P=()=>{var z;R(U),(z=Mf(U))==null||z.removeEventListener(c,P)};(H=Mf(U))==null||H.addEventListener(c,P)});A.useEffect(()=>{if(!t||!o)return;a.current.__escapeKeyBubbles=C,a.current.__outsidePressBubbles=T;let U=-1;function H(D){i(!1,D,"ancestor-scroll")}function P(){window.clearTimeout(U),M.current=!0}function z(){U=window.setTimeout(()=>{M.current=!1},ry()?5:0)}const q=Jl(r.floating);l&&(q.addEventListener("keydown",O?F:N,O),q.addEventListener("compositionstart",P),q.addEventListener("compositionend",z)),_&&q.addEventListener(c,E?L:R,E);let Y=[];return p&&(Lt(r.domReference)&&(Y=Ko(r.domReference)),Lt(r.floating)&&(Y=Y.concat(Ko(r.floating))),!Lt(r.reference)&&r.reference&&r.reference.contextElement&&(Y=Y.concat(Ko(r.reference.contextElement)))),Y=Y.filter(D=>{var V;return D!==((V=q.defaultView)==null?void 0:V.visualViewport)}),Y.forEach(D=>{D.addEventListener("scroll",H,{passive:!0})}),()=>{l&&(q.removeEventListener("keydown",O?F:N,O),q.removeEventListener("compositionstart",P),q.removeEventListener("compositionend",z)),_&&q.removeEventListener(c,E?L:R,E),Y.forEach(D=>{D.removeEventListener("scroll",H)}),window.clearTimeout(U)}},[a,r,l,_,c,t,i,p,o,C,T,N,O,F,R,E,L]),A.useEffect(()=>{a.current.insideReactTree=!1},[a,_,c]);const B=A.useMemo(()=>({onKeyDown:N,...h&&{[mQ[d]]:U=>{i(!1,U.nativeEvent,"reference-press")},...d!=="click"&&{onClick(U){i(!1,U.nativeEvent,"reference-press")}}}}),[N,i,h,d]),G=A.useMemo(()=>{function U(H){H.button===0&&(x.current=!0)}return{onKeyDown:N,onMouseDown:U,onMouseUp:U,[pQ[c]]:()=>{a.current.insideReactTree=!0}}},[N,c,a]);return A.useMemo(()=>o?{reference:B,floating:G}:{},[o,B,G])}function gQ(e){const{open:n=!1,onOpenChange:t,elements:i}=e,r=Vz(),a=A.useRef({}),[o]=A.useState(()=>sQ()),l=F6()!=null,[f,c]=A.useState(i.reference),h=no((v,b,w)=>{a.current.openEvent=v?b:void 0,o.emit("openchange",{open:v,event:b,reason:w,nested:l}),t==null||t(v,b,w)}),d=A.useMemo(()=>({setPositionReference:c}),[]),p=A.useMemo(()=>({reference:f||i.reference||null,floating:i.floating||null,domReference:i.reference}),[f,i.reference,i.floating]);return A.useMemo(()=>({dataRef:a,open:n,onOpenChange:h,elements:p,events:o,floatingId:r,refs:d}),[n,h,p,o,r,d])}function U6(e){e===void 0&&(e={});const{nodeId:n}=e,t=gQ({...e,elements:{reference:null,floating:null,...e.elements}}),i=e.rootContext||t,r=i.elements,[a,o]=A.useState(null),[l,f]=A.useState(null),h=(r==null?void 0:r.domReference)||a,d=A.useRef(null),p=q6();oo(()=>{h&&(d.current=h)},[h]);const v=QZ({...e,elements:{...r,...l&&{reference:l}}}),b=A.useCallback(C=>{const T=Lt(C)?{getBoundingClientRect:()=>C.getBoundingClientRect(),getClientRects:()=>C.getClientRects(),contextElement:C}:C;f(T),v.refs.setReference(T)},[v.refs]),w=A.useCallback(C=>{(Lt(C)||C===null)&&(d.current=C,o(C)),(Lt(v.refs.reference.current)||v.refs.reference.current===null||C!==null&&!Lt(C))&&v.refs.setReference(C)},[v.refs]),k=A.useMemo(()=>({...v.refs,setReference:w,setPositionReference:b,domReference:d}),[v.refs,w,b]),_=A.useMemo(()=>({...v.elements,domReference:h}),[v.elements,h]),x=A.useMemo(()=>({...v,...i,refs:k,elements:_,nodeId:n}),[v,k,_,n,i]);return oo(()=>{i.dataRef.current.floatingContext=x;const C=p==null?void 0:p.nodesRef.current.find(T=>T.id===n);C&&(C.context=x)}),A.useMemo(()=>({...v,context:x,refs:k,elements:_}),[v,k,_,x])}function ak(){return nZ()&&eZ()}function yQ(e,n){n===void 0&&(n={});const{open:t,onOpenChange:i,events:r,dataRef:a,elements:o}=e,{enabled:l=!0,visibleOnly:f=!0}=n,c=A.useRef(!1),h=A.useRef(-1),d=A.useRef(!0);A.useEffect(()=>{if(!l)return;const v=kr(o.domReference);function b(){!t&&_a(o.domReference)&&o.domReference===k5(Jl(o.domReference))&&(c.current=!0)}function w(){d.current=!0}function k(){d.current=!1}return v.addEventListener("blur",b),ak()&&(v.addEventListener("keydown",w,!0),v.addEventListener("pointerdown",k,!0)),()=>{v.removeEventListener("blur",b),ak()&&(v.removeEventListener("keydown",w,!0),v.removeEventListener("pointerdown",k,!0))}},[o.domReference,t,l]),A.useEffect(()=>{if(!l)return;function v(b){let{reason:w}=b;(w==="reference-press"||w==="escape-key")&&(c.current=!0)}return r.on("openchange",v),()=>{r.off("openchange",v)}},[r,l]),A.useEffect(()=>()=>{la(h)},[]);const p=A.useMemo(()=>({onMouseLeave(){c.current=!1},onFocus(v){if(c.current)return;const b=Mf(v.nativeEvent);if(f&&Lt(b)){if(ak()&&!v.relatedTarget){if(!d.current&&!aZ(b))return}else if(!oZ(b))return}i(!0,v.nativeEvent,"focus")},onBlur(v){c.current=!1;const b=v.relatedTarget,w=v.nativeEvent,k=Lt(b)&&b.hasAttribute(H6("focus-guard"))&&b.getAttribute("data-type")==="outside";h.current=window.setTimeout(()=>{var _;const x=k5(o.domReference?o.domReference.ownerDocument:document);!b&&x===o.domReference||zh((_=a.current.floatingContext)==null?void 0:_.refs.floating.current,x)||zh(o.domReference,x)||k||i(!1,w,"focus")})}}),[a,o.domReference,i,f]);return A.useMemo(()=>l?{reference:p}:{},[l,p])}function ok(e,n,t){const i=new Map,r=t==="item";let a=e;if(r&&e){const{[M5]:o,[D5]:l,...f}=e;a=f}return{...t==="floating"&&{tabIndex:-1,[tQ]:""},...a,...n.map(o=>{const l=o?o[t]:null;return typeof l=="function"?e?l(e):null:l}).concat(e).reduce((o,l)=>(l&&Object.entries(l).forEach(f=>{let[c,h]=f;if(!(r&&[M5,D5].includes(c)))if(c.indexOf("on")===0){if(i.has(c)||i.set(c,[]),typeof h=="function"){var d;(d=i.get(c))==null||d.push(h),o[c]=function(){for(var p,v=arguments.length,b=new Array(v),w=0;wk(...b)).find(k=>k!==void 0)}}}else o[c]=h}),o),{})}}function bQ(e){e===void 0&&(e=[]);const n=e.map(l=>l==null?void 0:l.reference),t=e.map(l=>l==null?void 0:l.floating),i=e.map(l=>l==null?void 0:l.item),r=A.useCallback(l=>ok(l,e,"reference"),n),a=A.useCallback(l=>ok(l,e,"floating"),t),o=A.useCallback(l=>ok(l,e,"item"),i);return A.useMemo(()=>({getReferenceProps:r,getFloatingProps:a,getItemProps:o}),[r,a,o])}const wQ=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function kQ(e,n){var t,i;n===void 0&&(n={});const{open:r,elements:a,floatingId:o}=e,{enabled:l=!0,role:f="dialog"}=n,c=Vz(),h=((t=a.domReference)==null?void 0:t.id)||c,d=A.useMemo(()=>{var x;return((x=sZ(a.floating))==null?void 0:x.id)||o},[a.floating,o]),p=(i=wQ.get(f))!=null?i:f,b=F6()!=null,w=A.useMemo(()=>p==="tooltip"||f==="label"?{["aria-"+(f==="label"?"labelledby":"describedby")]:r?d:void 0}:{"aria-expanded":r?"true":"false","aria-haspopup":p==="alertdialog"?"dialog":p,"aria-controls":r?d:void 0,...p==="listbox"&&{role:"combobox"},...p==="menu"&&{id:h},...p==="menu"&&b&&{role:"menuitem"},...f==="select"&&{"aria-autocomplete":"none"},...f==="combobox"&&{"aria-autocomplete":"list"}},[p,d,b,r,h,f]),k=A.useMemo(()=>{const x={id:d,...p&&{role:p}};return p==="tooltip"||f==="label"?x:{...x,...p==="menu"&&{"aria-labelledby":h}}},[p,d,h,f]),_=A.useCallback(x=>{let{active:C,selected:T}=x;const O={role:"option",...C&&{id:d+"-fui-option"}};switch(f){case"select":case"combobox":return{...O,"aria-selected":T}}return{}},[d,f]);return A.useMemo(()=>l?{reference:w,floating:k,item:_}:{},[l,w,k,_])}const Gz={scrollHideDelay:1e3,type:"hover",scrollbars:"xy"},Yz=(e,{scrollbarSize:n,overscrollBehavior:t,scrollbars:i})=>{let r=t;return t&&i&&(i==="x"?r=`${t} auto`:i==="y"&&(r=`auto ${t}`)),{root:{"--scrollarea-scrollbar-size":pe(n),"--scrollarea-over-scroll-behavior":r}}},Ua=De(e=>{const n=ke("ScrollArea",Gz,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,scrollbarSize:l,vars:f,type:c,scrollHideDelay:h,viewportProps:d,viewportRef:p,onScrollPositionChange:v,children:b,offsetScrollbars:w,scrollbars:k,onBottomReached:_,onTopReached:x,onLeftReached:C,onRightReached:T,overscrollBehavior:O,startScrollPosition:E,attributes:M,...N}=n,[F,R]=A.useState(!1),[L,B]=A.useState(!1),[G,U]=A.useState(!1),H=A.useRef(!0),P=A.useRef(!1),z=A.useRef(!0),q=A.useRef(!1),Y=Qe({name:"ScrollArea",props:n,classes:R6,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:M,vars:f,varsResolver:Yz}),D=A.useRef(null),[V,W]=A.useState(null),$=Uz([p,D,A.useCallback(X=>{W(ee=>ee===X?ee:X)},[])]);return il(w==="present"?V:null,()=>{const X=D.current;X&&(B(X.scrollHeight>X.clientHeight),U(X.scrollWidth>X.clientWidth))}),ss(()=>{E&&D.current&&D.current.scrollTo({left:E.x??0,top:E.y??0})},[]),y.jsxs(wz,{getStyles:Y,type:c==="never"?"always":c,scrollHideDelay:h,scrollbars:k,...Y("root"),...N,children:[y.jsx(jz,{...d,...Y("viewport",{style:d==null?void 0:d.style}),ref:$,"data-offset-scrollbars":w===!0?"xy":w||void 0,"data-scrollbars":k||void 0,"data-horizontal-hidden":w==="present"&&!G?"true":void 0,"data-vertical-hidden":w==="present"&&!L?"true":void 0,onScroll:X=>{var Ce;(Ce=d==null?void 0:d.onScroll)==null||Ce.call(d,X),v==null||v({x:X.currentTarget.scrollLeft,y:X.currentTarget.scrollTop});const{scrollTop:ee,scrollHeight:re,clientHeight:se,scrollLeft:ge,scrollWidth:ae,clientWidth:le}=X.currentTarget,_e=ee-(re-se)>=-.8,ne=ee===0;_e&&!P.current&&(_==null||_()),ne&&!H.current&&(x==null||x()),P.current=_e,H.current=ne;const $e=ge-(ae-le)>=-.8,be=ge===0;$e&&!q.current&&(T==null||T()),be&&!z.current&&(C==null||C()),q.current=$e,z.current=be},children:b}),(k==="xy"||k==="x")&&y.jsx(tS,{...Y("scrollbar"),orientation:"horizontal","data-hidden":c==="never"||w==="present"&&!G?!0:void 0,forceMount:!0,onMouseEnter:()=>R(!0),onMouseLeave:()=>R(!1),children:y.jsx(iS,{...Y("thumb")})}),(k==="xy"||k==="y")&&y.jsx(tS,{...Y("scrollbar"),orientation:"vertical","data-hidden":c==="never"||w==="present"&&!L?!0:void 0,forceMount:!0,onMouseEnter:()=>R(!0),onMouseLeave:()=>R(!1),children:y.jsx(iS,{...Y("thumb")})}),y.jsx(DX,{...Y("corner"),"data-hovered":F||void 0,"data-hidden":c==="never"||void 0})]})});Ua.displayName="@mantine/core/ScrollArea";const V6=De(e=>{const{children:n,classNames:t,styles:i,scrollbarSize:r,scrollHideDelay:a,type:o,dir:l,offsetScrollbars:f,overscrollBehavior:c,viewportRef:h,onScrollPositionChange:d,unstyled:p,variant:v,viewportProps:b,scrollbars:w,style:k,vars:_,onBottomReached:x,onTopReached:C,startScrollPosition:T,onOverflowChange:O,...E}=ke("ScrollAreaAutosize",Gz,e),M=A.useRef(null),[N,F]=A.useState(null),R=Uz([h,M,A.useCallback(U=>{F(H=>H===U?H:U)},[])]),L=A.useRef(!1),B=A.useRef(!1),G=A.useEffectEvent(()=>{const U=M.current;if(!U||!O)return;const H=U.scrollHeight>U.clientHeight;H!==L.current&&(B.current?O(H):(B.current=!0,H&&O(!0)),L.current=H)});return il(O?N:null,G),y.jsx(ye,{...E,variant:v,style:[{display:"flex",overflow:"hidden"},k],children:y.jsx(ye,{style:{display:"flex",flexDirection:"column",flex:1,overflow:"hidden",...w==="y"&&{minWidth:0},...w==="x"&&{minHeight:0},...w==="xy"&&{minWidth:0,minHeight:0},...w===!1&&{minWidth:0,minHeight:0}},children:y.jsx(Ua,{classNames:t,styles:i,scrollHideDelay:a,scrollbarSize:r,type:o,dir:l,offsetScrollbars:f,overscrollBehavior:c,viewportRef:R,onScrollPositionChange:d,unstyled:p,variant:v,viewportProps:b,vars:_,scrollbars:w,onBottomReached:x,onTopReached:C,startScrollPosition:T,"data-autosize":"true",children:n})})})});Ua.classes=R6;Ua.varsResolver=Yz;V6.displayName="@mantine/core/ScrollAreaAutosize";V6.classes=R6;Ua.Autosize=V6;var Kz={root:"m_87cf2631"};const _Q={__staticSelector:"UnstyledButton"},pi=Hi(e=>{const n=ke("UnstyledButton",_Q,e),{className:t,component:i="button",__staticSelector:r,unstyled:a,classNames:o,styles:l,style:f,attributes:c,...h}=n;return y.jsx(ye,{...Qe({name:r,props:n,classes:Kz,className:t,style:f,classNames:o,styles:l,unstyled:a,attributes:c})("root",{focusable:!0}),component:i,type:i==="button"?"button":void 0,...h})});pi.classes=Kz;pi.displayName="@mantine/core/UnstyledButton";var Xz={root:"m_515a97f8"};const W6=De(e=>{const n=ke("VisuallyHidden",null,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,attributes:f,...c}=n;return y.jsx(ye,{component:"span",...Qe({name:"VisuallyHidden",classes:Xz,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:f})("root"),...c})});W6.classes=Xz;W6.displayName="@mantine/core/VisuallyHidden";var Zz={root:"m_1b7284a3"};const Qz=(e,{radius:n,shadow:t})=>({root:{"--paper-radius":n===void 0?void 0:Gt(n),"--paper-shadow":x6(t)}}),Ht=Hi(e=>{const n=ke("Paper",null,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,withBorder:l,vars:f,radius:c,shadow:h,variant:d,mod:p,attributes:v,...b}=n,w=Qe({name:"Paper",props:n,classes:Zz,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:v,vars:f,varsResolver:Qz});return y.jsx(ye,{mod:[{"data-with-border":l},p],...w("root"),variant:d,...b})});Ht.classes=Zz;Ht.varsResolver=Qz;Ht.displayName="@mantine/core/Paper";function z5(e,n,t,i){return e==="center"||i==="center"?{top:n}:e==="end"?{bottom:t}:e==="start"?{top:t}:{}}function L5(e,n,t,i,r){return e==="center"||i==="center"?{left:n}:e==="end"?{[r==="ltr"?"right":"left"]:t}:e==="start"?{[r==="ltr"?"left":"right"]:t}:{}}const xQ={bottom:"borderTopLeftRadius",left:"borderTopRightRadius",right:"borderBottomLeftRadius",top:"borderBottomRightRadius"};function SQ({position:e,arrowSize:n,arrowOffset:t,arrowRadius:i,arrowPosition:r,arrowX:a,arrowY:o,dir:l}){const[f,c="center"]=e.split("-"),h={width:n,height:n,transform:"rotate(45deg)",position:"absolute",[xQ[f]]:i},d=-n/2;return f==="left"?{...h,...z5(c,o,t,r),right:d,borderLeftColor:"transparent",borderBottomColor:"transparent",clipPath:"polygon(100% 0, 0 0, 100% 100%)"}:f==="right"?{...h,...z5(c,o,t,r),left:d,borderRightColor:"transparent",borderTopColor:"transparent",clipPath:"polygon(0 100%, 0 0, 100% 100%)"}:f==="top"?{...h,...L5(c,a,t,r,l),bottom:d,borderTopColor:"transparent",borderLeftColor:"transparent",clipPath:"polygon(0 100%, 100% 100%, 100% 0)"}:f==="bottom"?{...h,...L5(c,a,t,r,l),top:d,borderBottomColor:"transparent",borderRightColor:"transparent",clipPath:"polygon(0 100%, 0 0, 100% 0)"}:{}}function Tg({position:e,arrowSize:n,arrowOffset:t,arrowRadius:i,arrowPosition:r,visible:a,arrowX:o,arrowY:l,style:f,...c}){const{dir:h}=Au();return a?y.jsx("div",{...c,style:{...f,...SQ({position:e,arrowSize:n,arrowOffset:t,arrowRadius:i,arrowPosition:r,dir:h,arrowX:o,arrowY:l})}}):null}Tg.displayName="@mantine/core/FloatingArrow";function Jz(e,n){if(e==="rtl"&&(n.includes("right")||n.includes("left"))){const[t,i]=n.split("-"),r=t==="right"?"left":"right";return i===void 0?r:`${r}-${i}`}return n}function eL({open:e,close:n,openDelay:t,closeDelay:i}){const r=A.useRef(-1),a=A.useRef(-1),o=()=>{window.clearTimeout(r.current),window.clearTimeout(a.current)},l=()=>{o(),t===0||t===void 0?e():r.current=window.setTimeout(e,t)},f=()=>{o(),i===0||i===void 0?n():a.current=window.setTimeout(n,i)};return A.useEffect(()=>o,[]),{openDropdown:l,closeDropdown:f}}var nL={root:"m_9814e45f"};const CQ={zIndex:wa("modal")},tL=(e,{gradient:n,color:t,backgroundOpacity:i,blur:r,radius:a,zIndex:o})=>({root:{"--overlay-bg":n||(t!==void 0||i!==void 0)&&Hs(t||"#000",i??.6)||void 0,"--overlay-filter":r?`blur(${pe(r)})`:void 0,"--overlay-radius":a===void 0?void 0:Gt(a),"--overlay-z-index":o==null?void 0:o.toString()}}),Nm=Hi(e=>{const n=ke("Overlay",CQ,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,fixed:f,center:c,children:h,radius:d,zIndex:p,gradient:v,blur:b,color:w,backgroundOpacity:k,mod:_,attributes:x,...C}=n;return y.jsx(ye,{...Qe({name:"Overlay",props:n,classes:nL,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:x,vars:l,varsResolver:tL})("root"),mod:[{center:c,fixed:f},_],...C,children:h})});Nm.classes=nL;Nm.varsResolver=tL;Nm.displayName="@mantine/core/Overlay";function sk(e){const n=document.createElement("div");return n.setAttribute("data-portal","true"),typeof e.className=="string"&&n.classList.add(...e.className.split(" ").filter(Boolean)),typeof e.style=="object"&&Object.assign(n.style,e.style),typeof e.id=="string"&&n.setAttribute("id",e.id),n}function AQ({target:e,reuseTargetNode:n,...t}){if(e)return typeof e=="string"?document.querySelector(e)||sk(t):e;if(n){const i=document.querySelector("[data-mantine-shared-portal-node]");if(i)return i;const r=sk(t);return r.setAttribute("data-mantine-shared-portal-node","true"),document.body.appendChild(r),r}return sk(t)}const OQ={reuseTargetNode:!0},iL=De(e=>{const{children:n,target:t,reuseTargetNode:i,ref:r,...a}=ke("Portal",OQ,e),[o,l]=A.useState(!1),f=A.useRef(null);return ss(()=>(l(!0),f.current=AQ({target:t,reuseTargetNode:i,...a}),_g(r,f.current),!t&&!i&&f.current&&document.body.appendChild(f.current),()=>{!t&&!i&&f.current&&document.body.removeChild(f.current)}),[t]),!o||!f.current?null:Ks.createPortal(y.jsx(y.Fragment,{children:n}),f.current)});iL.displayName="@mantine/core/Portal";const rl=De(({withinPortal:e=!0,children:n,...t})=>Rm()==="test"||!e?y.jsx(y.Fragment,{children:n}):y.jsx(iL,{...t,children:n}));rl.displayName="@mantine/core/OptionalPortal";const Ud=e=>({in:{opacity:1,transform:"scale(1)"},out:{opacity:0,transform:`scale(.9) translateY(${e==="bottom"?10:-10}px)`},transitionProperty:"transform, opacity"}),jv={fade:{in:{opacity:1},out:{opacity:0},transitionProperty:"opacity"},"fade-up":{in:{opacity:1,transform:"translateY(0)"},out:{opacity:0,transform:"translateY(30px)"},transitionProperty:"opacity, transform"},"fade-down":{in:{opacity:1,transform:"translateY(0)"},out:{opacity:0,transform:"translateY(-30px)"},transitionProperty:"opacity, transform"},"fade-left":{in:{opacity:1,transform:"translateX(0)"},out:{opacity:0,transform:"translateX(30px)"},transitionProperty:"opacity, transform"},"fade-right":{in:{opacity:1,transform:"translateX(0)"},out:{opacity:0,transform:"translateX(-30px)"},transitionProperty:"opacity, transform"},scale:{in:{opacity:1,transform:"scale(1)"},out:{opacity:0,transform:"scale(0)"},common:{transformOrigin:"top"},transitionProperty:"transform, opacity"},"scale-y":{in:{opacity:1,transform:"scaleY(1)"},out:{opacity:0,transform:"scaleY(0)"},common:{transformOrigin:"top"},transitionProperty:"transform, opacity"},"scale-x":{in:{opacity:1,transform:"scaleX(1)"},out:{opacity:0,transform:"scaleX(0)"},common:{transformOrigin:"left"},transitionProperty:"transform, opacity"},"skew-up":{in:{opacity:1,transform:"translateY(0) skew(0deg, 0deg)"},out:{opacity:0,transform:"translateY(-20px) skew(-10deg, -5deg)"},common:{transformOrigin:"top"},transitionProperty:"transform, opacity"},"skew-down":{in:{opacity:1,transform:"translateY(0) skew(0deg, 0deg)"},out:{opacity:0,transform:"translateY(20px) skew(-10deg, -5deg)"},common:{transformOrigin:"bottom"},transitionProperty:"transform, opacity"},"rotate-left":{in:{opacity:1,transform:"translateY(0) rotate(0deg)"},out:{opacity:0,transform:"translateY(20px) rotate(-5deg)"},common:{transformOrigin:"bottom"},transitionProperty:"transform, opacity"},"rotate-right":{in:{opacity:1,transform:"translateY(0) rotate(0deg)"},out:{opacity:0,transform:"translateY(20px) rotate(5deg)"},common:{transformOrigin:"top"},transitionProperty:"transform, opacity"},"slide-down":{in:{opacity:1,transform:"translateY(0)"},out:{opacity:0,transform:"translateY(-100%)"},common:{transformOrigin:"top"},transitionProperty:"transform, opacity"},"slide-up":{in:{opacity:1,transform:"translateY(0)"},out:{opacity:0,transform:"translateY(100%)"},common:{transformOrigin:"bottom"},transitionProperty:"transform, opacity"},"slide-left":{in:{opacity:1,transform:"translateX(0)"},out:{opacity:0,transform:"translateX(100%)"},common:{transformOrigin:"left"},transitionProperty:"transform, opacity"},"slide-right":{in:{opacity:1,transform:"translateX(0)"},out:{opacity:0,transform:"translateX(-100%)"},common:{transformOrigin:"right"},transitionProperty:"transform, opacity"},pop:{...Ud("bottom"),common:{transformOrigin:"center center"}},"pop-bottom-left":{...Ud("bottom"),common:{transformOrigin:"bottom left"}},"pop-bottom-right":{...Ud("bottom"),common:{transformOrigin:"bottom right"}},"pop-top-left":{...Ud("top"),common:{transformOrigin:"top left"}},"pop-top-right":{...Ud("top"),common:{transformOrigin:"top right"}}},I5={entering:"in",entered:"in",exiting:"out",exited:"out","pre-exiting":"out","pre-entering":"out"};function B5({transition:e,state:n,duration:t,timingFunction:i}){const r={WebkitBackfaceVisibility:"hidden",transitionDuration:`${t}ms`,transitionTimingFunction:i};return typeof e=="string"?e in jv?{transitionProperty:jv[e].transitionProperty,...r,...jv[e].common,...jv[e][I5[n]]}:{}:{transitionProperty:e.transitionProperty,...r,...e.common,...e[I5[n]]}}function EQ({duration:e,exitDuration:n,timingFunction:t,mounted:i,onEnter:r,onExit:a,onEntered:o,onExited:l,enterDelay:f,exitDelay:c}){const h=oi(),d=C6(),p=h.respectReducedMotion?d:!1,[v,b]=A.useState(p?0:e),[w,k]=A.useState(i?"entered":"exited"),_=A.useRef(-1),x=A.useRef(-1),C=A.useRef(-1);function T(){window.clearTimeout(_.current),window.clearTimeout(x.current),cancelAnimationFrame(C.current)}const O=M=>{T();const N=M?r:a,F=M?o:l,R=p?0:M?e:n;b(R),R===0?(typeof N=="function"&&N(),typeof F=="function"&&F(),k(M?"entered":"exited")):C.current=requestAnimationFrame(()=>{uh.flushSync(()=>{k(M?"pre-entering":"pre-exiting")}),C.current=requestAnimationFrame(()=>{typeof N=="function"&&N(),k(M?"entering":"exiting"),_.current=window.setTimeout(()=>{typeof F=="function"&&F(),k(M?"entered":"exited")},R)})})},E=M=>{if(T(),typeof(M?f:c)!="number"){O(M);return}x.current=window.setTimeout(()=>{O(M)},M?f:c)};return es(()=>{E(i)},[i]),A.useEffect(()=>()=>{T()},[]),{transitionDuration:v,transitionStatus:w,transitionTimingFunction:t||"ease"}}function ts({keepMounted:e,transition:n="fade",duration:t=250,exitDuration:i=t,mounted:r,children:a,timingFunction:o="ease",onExit:l,onEntered:f,onEnter:c,onExited:h,enterDelay:d,exitDelay:p}){const v=Rm(),{transitionDuration:b,transitionStatus:w,transitionTimingFunction:k}=EQ({mounted:r,exitDuration:i,duration:t,timingFunction:o,onExit:l,onEntered:f,onEnter:c,onExited:h,enterDelay:d,exitDelay:p});if(v==="test")return r?y.jsx(y.Fragment,{children:a({})}):e?a({display:"none"}):null;if(b===0)return e?y.jsx(A.Activity,{mode:r?"visible":"hidden",children:a({})}):r?y.jsx(y.Fragment,{children:a({})}):null;const _=w==="exited";return e?y.jsx(A.Activity,{mode:_?"hidden":"visible",children:a(_?{}:B5({transition:n,duration:b,state:w,timingFunction:k}))}):_?null:y.jsx(y.Fragment,{children:a(B5({transition:n,duration:b,state:w,timingFunction:k}))})}ts.displayName="@mantine/core/Transition";const TQ={duration:100,transition:"fade"};function F5(e,n){return{...TQ,...n,...e}}const[jQ,rL]=ba("Popover component was not found in the tree");function sy({children:e,active:n=!0,refProp:t="ref",innerRef:i}){const r=Bt(lK(n),i),a=Su(e);return a?A.cloneElement(a,{[t]:r}):e}function aL(e){return y.jsx(W6,{tabIndex:-1,"data-autofocus":!0,...e})}sy.displayName="@mantine/core/FocusTrap";aL.displayName="@mantine/core/FocusTrapInitialFocus";sy.InitialFocus=aL;var oL={dropdown:"m_38a85659",arrow:"m_a31dc6c1",overlay:"m_3d7bc908"};const G6=De(e=>{var k,_,x,C;const n=ke("PopoverDropdown",null,e),{className:t,style:i,vars:r,children:a,onKeyDownCapture:o,variant:l,classNames:f,styles:c,ref:h,...d}=n,p=rL(),v=Q$({opened:p.opened,shouldReturnFocus:p.returnFocus}),b=p.withRoles?{"aria-labelledby":p.getTargetId(),id:p.getDropdownId(),role:"dialog",tabIndex:-1}:{},w=Bt(h,p.floating);return p.disabled?null:y.jsx(rl,{...p.portalProps,withinPortal:p.withinPortal,children:y.jsx(ts,{mounted:p.opened,...p.transitionProps,transition:((k=p.transitionProps)==null?void 0:k.transition)||"fade",duration:((_=p.transitionProps)==null?void 0:_.duration)??150,keepMounted:p.keepMounted,exitDuration:typeof((x=p.transitionProps)==null?void 0:x.exitDuration)=="number"?p.transitionProps.exitDuration:(C=p.transitionProps)==null?void 0:C.duration,children:T=>{var O;return y.jsx(sy,{active:p.trapFocus&&p.opened,innerRef:w,children:y.jsxs(ye,{...b,...d,variant:l,onKeyDownCapture:XY(()=>{var E,M;(E=p.onClose)==null||E.call(p),(M=p.onDismiss)==null||M.call(p)},{active:p.closeOnEscape,onTrigger:v,onKeyDown:o}),"data-position":p.placement,"data-fixed":p.floatingStrategy==="fixed"||void 0,...p.getStyles("dropdown",{className:t,props:n,classNames:f,styles:c,style:[{...T,zIndex:p.zIndex,top:p.y??0,left:p.x??0,width:p.width==="target"?void 0:pe(p.width),...p.referenceHidden?{display:"none"}:null},(O=p.resolvedStyles)==null?void 0:O.dropdown,c==null?void 0:c.dropdown,i]}),children:[a,y.jsx(Tg,{ref:p.arrowRef,arrowX:p.arrowX,arrowY:p.arrowY,visible:p.withArrow,position:p.placement,arrowSize:p.arrowSize,arrowRadius:p.arrowRadius,arrowOffset:p.arrowOffset,arrowPosition:p.arrowPosition,...p.getStyles("arrow",{props:n,classNames:f,styles:c})})]})})}})})});G6.classes=oL;G6.displayName="@mantine/core/PopoverDropdown";const MQ={refProp:"ref",popupType:"dialog"},sL=De(e=>{const{children:n,refProp:t,popupType:i,ref:r,...a}=ke("PopoverTarget",MQ,e),o=Su(n);if(!o)throw new Error("Popover.Target component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported");const l=a,f=rL(),c=Bt(f.reference,X1(o),r),h=f.withRoles?{"aria-haspopup":i,"aria-expanded":f.opened,"aria-controls":f.opened?f.getDropdownId():void 0,id:f.getTargetId()}:{},d=o.props;return A.cloneElement(o,{...l,...h,...f.targetProps,className:dn(f.targetProps.className,l.className,d.className),[t]:c,...f.controlled?null:{onClick:p=>{var v;f.onToggle(),(v=d.onClick)==null||v.call(d,p)}}})});sL.displayName="@mantine/core/PopoverTarget";function DQ(e){if(e===void 0)return{shift:!0,flip:!0};const n={...e};return e.shift===void 0&&(n.shift=!0),e.flip===void 0&&(n.flip=!0),n}function RQ(e,n,t){const i=DQ(e.middlewares),r=[qz(e.offset),nQ()];return e.dropdownVisible&&t!=="test"&&e.preventPositionChangeWhenVisible&&(i.flip=!1),i.flip&&r.push(typeof i.flip=="boolean"?Eg():Eg(i.flip)),i.shift&&r.push(B6(typeof i.shift=="boolean"?{limiter:j5(),padding:5}:{limiter:j5(),padding:5,...i.shift})),i.inline&&r.push(typeof i.inline=="boolean"?wh():wh(i.inline)),r.push(Hz({element:e.arrowRef,padding:e.arrowOffset})),(i.size||e.width==="target")&&r.push(eQ({...typeof i.size=="boolean"?{}:i.size,apply({rects:a,availableWidth:o,availableHeight:l,...f}){var h;const c=((h=n().refs.floating.current)==null?void 0:h.style)??{};i.size&&(typeof i.size=="object"&&i.size.apply?i.size.apply({rects:a,availableWidth:o,availableHeight:l,...f}):Object.assign(c,{maxWidth:`${o}px`,maxHeight:`${l}px`})),e.width==="target"&&Object.assign(c,{width:`${a.reference.width}px`})}})),r}function PQ(e){const n=Rm(),[t,i]=Mi({value:e.opened,defaultValue:e.defaultOpened,finalValue:!1,onChange:e.onChange}),r=A.useRef(t),a=()=>{t&&!e.disabled&&i(!1)},o=()=>{e.disabled||i(!t)},l=U6({strategy:e.strategy,placement:e.preventPositionChangeWhenVisible?e.positionRef.current:e.position,middleware:RQ(e,()=>l,n),whileElementsMounted:e.keepMounted?void 0:uS});return A.useEffect(()=>{if(!(!l.refs.reference.current||!l.refs.floating.current)&&t)return uS(l.refs.reference.current,l.refs.floating.current,l.update)},[t,l.update]),es(()=>{var f;(f=e.onPositionChange)==null||f.call(e,l.placement),e.positionRef.current=l.placement},[l.placement,e.preventPositionChangeWhenVisible]),es(()=>{var f,c;t!==r.current&&(t?(c=e.onOpen)==null||c.call(e):(f=e.onClose)==null||f.call(e)),r.current=t},[t,e.onClose,e.onOpen]),ss(()=>{let f=-1;return t&&(f=window.setTimeout(()=>e.setDropdownVisible(!0),4)),()=>{window.clearTimeout(f)}},[t,e.position]),{floating:l,controlled:typeof e.opened=="boolean",opened:t,onClose:a,onToggle:o}}const NQ={position:"bottom",offset:8,transitionProps:{transition:"fade",duration:150},middlewares:{flip:!0,shift:!0,inline:!1},arrowSize:7,arrowOffset:5,arrowRadius:0,arrowPosition:"side",closeOnClickOutside:!0,withinPortal:!0,closeOnEscape:!0,trapFocus:!1,withRoles:!0,returnFocus:!1,withOverlay:!1,hideDetached:!0,clickOutsideEvents:["mousedown","touchstart"],zIndex:wa("popover"),__staticSelector:"Popover",width:"max-content"},lL=(e,{radius:n,shadow:t})=>({dropdown:{"--popover-radius":n===void 0?void 0:Gt(n),"--popover-shadow":x6(t)}});function En(e){var nn,cn,An,mn,rn,Je,Dn;const n=ke("Popover",NQ,e),{children:t,position:i,offset:r,onPositionChange:a,opened:o,transitionProps:l,onExitTransitionEnd:f,onEnterTransitionEnd:c,width:h,middlewares:d,withArrow:p,arrowSize:v,arrowOffset:b,arrowRadius:w,arrowPosition:k,unstyled:_,classNames:x,styles:C,closeOnClickOutside:T,withinPortal:O,portalProps:E,closeOnEscape:M,clickOutsideEvents:N,trapFocus:F,onClose:R,onDismiss:L,onOpen:B,onChange:G,zIndex:U,radius:H,shadow:P,id:z,defaultOpened:q,__staticSelector:Y,withRoles:D,disabled:V,returnFocus:W,variant:$,keepMounted:X,vars:ee,floatingStrategy:re,withOverlay:se,overlayProps:ge,hideDetached:ae,attributes:le,preventPositionChangeWhenVisible:_e,...ne}=n,$e=Qe({name:Y,props:n,classes:oL,classNames:x,styles:C,unstyled:_,attributes:le,rootSelector:"dropdown",vars:ee,varsResolver:lL}),{resolvedStyles:be}=qi({classNames:x,styles:C,props:n}),[Ce,Pe]=A.useState(o??q??!1),ve=A.useRef(i),xe=A.useRef(null),[Re,ue]=A.useState(null),[Ie,Ve]=A.useState(null),{dir:He}=Au(),Ke=Rm(),Xe=Qi(z),ie=PQ({middlewares:d,width:h,position:Jz(He,i),offset:typeof r=="number"?r+(p?v/2:0):r,arrowRef:xe,arrowOffset:b,onPositionChange:a,opened:o,defaultOpened:q,onChange:G,onOpen:B,onClose:R,onDismiss:L,strategy:re,dropdownVisible:Ce,setDropdownVisible:Pe,positionRef:ve,disabled:V,preventPositionChangeWhenVisible:_e,keepMounted:X});eK(()=>{T&&(ie.onClose(),L==null||L())},N,[Re,Ie]);const me=A.useCallback(Me=>{ue(Me),ie.floating.refs.setReference(Me)},[ie.floating.refs.setReference]),We=A.useCallback(Me=>{Ve(Me),ie.floating.refs.setFloating(Me)},[ie.floating.refs.setFloating]),Ze=A.useCallback(()=>{var Me;(Me=l==null?void 0:l.onExited)==null||Me.call(l),f==null||f(),Pe(!1),_e||(ve.current=i)},[l==null?void 0:l.onExited,f,_e,i]),Se=A.useCallback(()=>{var Me;(Me=l==null?void 0:l.onEntered)==null||Me.call(l),c==null||c()},[l==null?void 0:l.onEntered,c]);return y.jsxs(jQ,{value:{returnFocus:W,disabled:V,controlled:ie.controlled,reference:me,floating:We,x:ie.floating.x,y:ie.floating.y,arrowX:(An=(cn=(nn=ie.floating)==null?void 0:nn.middlewareData)==null?void 0:cn.arrow)==null?void 0:An.x,arrowY:(Je=(rn=(mn=ie.floating)==null?void 0:mn.middlewareData)==null?void 0:rn.arrow)==null?void 0:Je.y,opened:ie.opened,arrowRef:xe,transitionProps:{...l,onExited:Ze,onEntered:Se},width:h,withArrow:p,arrowSize:v,arrowOffset:b,arrowRadius:w,arrowPosition:k,placement:ie.floating.placement,trapFocus:F,withinPortal:O,portalProps:E,zIndex:U,radius:H,shadow:P,closeOnEscape:M,onDismiss:L,onClose:ie.onClose,onToggle:ie.onToggle,getTargetId:()=>Xe,getDropdownId:()=>`${Xe}-dropdown`,withRoles:D,targetProps:ne,__staticSelector:Y,classNames:x,styles:C,unstyled:_,variant:$,keepMounted:X,getStyles:$e,resolvedStyles:be,floatingStrategy:re,referenceHidden:ae&&Ke!=="test"?(Dn=ie.floating.middlewareData.hide)==null?void 0:Dn.referenceHidden:!1},children:[t,se&&y.jsx(ts,{transition:"fade",mounted:ie.opened,duration:(l==null?void 0:l.duration)||250,exitDuration:(l==null?void 0:l.exitDuration)||250,children:Me=>y.jsx(rl,{withinPortal:O,children:y.jsx(Nm,{...ge,...$e("overlay",{className:ge==null?void 0:ge.className,style:[Me,ge==null?void 0:ge.style]})})})})]})}En.Target=sL;En.Dropdown=G6;En.varsResolver=lL;En.displayName="@mantine/core/Popover";En.extend=e=>e;En.withProps=e=>{const n=t=>y.jsx(En,{...e,...t});return n.extend=En.extend,n.displayName=`WithProps(${En.displayName})`,n};var za={root:"m_5ae2e3c",barsLoader:"m_7a2bd4cd",bar:"m_870bb79","bars-loader-animation":"m_5d2b3b9d",dotsLoader:"m_4e3f22d7",dot:"m_870c4af","loader-dots-animation":"m_aac34a1",ovalLoader:"m_b34414df","oval-loader-animation":"m_f8e89c4b"};const uL=({className:e,...n})=>y.jsxs(ye,{component:"span",className:dn(za.barsLoader,e),...n,children:[y.jsx("span",{className:za.bar}),y.jsx("span",{className:za.bar}),y.jsx("span",{className:za.bar})]});uL.displayName="@mantine/core/Bars";const fL=({className:e,...n})=>y.jsxs(ye,{component:"span",className:dn(za.dotsLoader,e),...n,children:[y.jsx("span",{className:za.dot}),y.jsx("span",{className:za.dot}),y.jsx("span",{className:za.dot})]});fL.displayName="@mantine/core/Dots";const cL=({className:e,...n})=>y.jsx(ye,{component:"span",className:dn(za.ovalLoader,e),...n});cL.displayName="@mantine/core/Oval";const dL={bars:uL,oval:cL,dots:fL},$Q={loaders:dL,type:"oval"},hL=(e,{size:n,color:t})=>({root:{"--loader-size":Rn(n,"loader-size"),"--loader-color":t?ot(t,e):void 0}}),Fi=De(e=>{const n=ke("Loader",$Q,e),{size:t,color:i,type:r,vars:a,className:o,style:l,classNames:f,styles:c,unstyled:h,loaders:d,variant:p,children:v,attributes:b,...w}=n,k=Qe({name:"Loader",props:n,classes:za,className:o,style:l,classNames:f,styles:c,unstyled:h,attributes:b,vars:a,varsResolver:hL});return v?y.jsx(ye,{...k("root"),...w,children:v}):y.jsx(ye,{...k("root"),component:d[r],variant:p,size:t,...w})});Fi.defaultLoaders=dL;Fi.classes=za;Fi.varsResolver=hL;Fi.displayName="@mantine/core/Loader";var Ec={root:"m_8d3f4000",icon:"m_8d3afb97",loader:"m_302b9fb1",group:"m_1a0f1b21",groupSection:"m_437b6484"};const q5={orientation:"horizontal"},mL=(e,{borderWidth:n})=>({group:{"--ai-border-width":pe(n)}}),ly=De(e=>{const n=ke("ActionIconGroup",q5,e),{className:t,style:i,classNames:r,styles:a,unstyled:o,orientation:l,vars:f,borderWidth:c,variant:h,mod:d,attributes:p,...v}=ke("ActionIconGroup",q5,e);return y.jsx(ye,{...Qe({name:"ActionIconGroup",props:n,classes:Ec,className:t,style:i,classNames:r,styles:a,unstyled:o,attributes:p,vars:f,varsResolver:mL,rootSelector:"group"})("group"),variant:h,mod:[{"data-orientation":l},d],role:"group",...v})});ly.classes=Ec;ly.varsResolver=mL;ly.displayName="@mantine/core/ActionIconGroup";const pL=(e,{radius:n,color:t,gradient:i,variant:r,autoContrast:a,size:o})=>{const l=e.variantColorResolver({color:t||e.primaryColor,theme:e,gradient:i,variant:r||"filled",autoContrast:a});return{groupSection:{"--section-height":Rn(o,"section-height"),"--section-padding-x":Rn(o,"section-padding-x"),"--section-fz":ei(o),"--section-radius":n===void 0?void 0:Gt(n),"--section-bg":t||r?l.background:void 0,"--section-color":l.color,"--section-bd":t||r?l.border:void 0}}},uy=De(e=>{const n=ke("ActionIconGroupSection",null,e),{className:t,style:i,classNames:r,styles:a,unstyled:o,vars:l,variant:f,gradient:c,radius:h,autoContrast:d,attributes:p,...v}=n;return y.jsx(ye,{...Qe({name:"ActionIconGroupSection",props:n,classes:Ec,className:t,style:i,classNames:r,styles:a,unstyled:o,attributes:p,vars:l,varsResolver:pL,rootSelector:"groupSection"})("groupSection"),variant:f,...v})});uy.classes=Ec;uy.varsResolver=pL;uy.displayName="@mantine/core/ActionIconGroupSection";const vL=(e,{size:n,radius:t,variant:i,gradient:r,color:a,autoContrast:o})=>{const l=e.variantColorResolver({color:a||e.primaryColor,theme:e,gradient:r,variant:i||"filled",autoContrast:o});return{root:{"--ai-size":Rn(n,"ai-size"),"--ai-radius":t===void 0?void 0:Gt(t),"--ai-bg":a||i?l.background:void 0,"--ai-hover":a||i?l.hover:void 0,"--ai-hover-color":a||i?l.hoverColor:void 0,"--ai-color":l.color,"--ai-bd":a||i?l.border:void 0}}},Ot=Hi(e=>{const n=ke("ActionIcon",null,e),{className:t,unstyled:i,variant:r,classNames:a,styles:o,style:l,loading:f,loaderProps:c,size:h,color:d,radius:p,__staticSelector:v,gradient:b,vars:w,children:k,disabled:_,"data-disabled":x,autoContrast:C,mod:T,attributes:O,...E}=n,M=Qe({name:["ActionIcon",v],props:n,className:t,style:l,classes:Ec,classNames:a,styles:o,unstyled:i,attributes:O,vars:w,varsResolver:vL});return y.jsxs(pi,{...M("root",{active:!_&&!f&&!x}),...E,unstyled:i,variant:r,size:h,disabled:_||f,mod:[{loading:f,disabled:_||x},T],children:[typeof f=="boolean"&&y.jsx(ts,{mounted:f,transition:"slide-down",duration:150,children:N=>y.jsx(ye,{component:"span",...M("loader",{style:N}),"aria-hidden":!0,children:y.jsx(Fi,{color:"var(--ai-color)",size:"calc(var(--ai-size) * 0.55)",...c})})}),y.jsx(ye,{component:"span",mod:{loading:f},...M("icon"),children:k})]})});Ot.classes=Ec;Ot.varsResolver=vL;Ot.displayName="@mantine/core/ActionIcon";Ot.Group=ly;Ot.GroupSection=uy;function gL({size:e="var(--cb-icon-size, 70%)",style:n,...t}){return y.jsx("svg",{viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{...n,width:e,height:e},...t,children:y.jsx("path",{d:"M11.7816 4.03157C12.0062 3.80702 12.0062 3.44295 11.7816 3.2184C11.5571 2.99385 11.193 2.99385 10.9685 3.2184L7.50005 6.68682L4.03164 3.2184C3.80708 2.99385 3.44301 2.99385 3.21846 3.2184C2.99391 3.44295 2.99391 3.80702 3.21846 4.03157L6.68688 7.49999L3.21846 10.9684C2.99391 11.193 2.99391 11.557 3.21846 11.7816C3.44301 12.0061 3.80708 12.0061 4.03164 11.7816L7.50005 8.31316L10.9685 11.7816C11.193 12.0061 11.5571 12.0061 11.7816 11.7816C12.0062 11.557 12.0062 11.193 11.7816 10.9684L8.31322 7.49999L11.7816 4.03157Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})})}gL.displayName="@mantine/core/CloseIcon";var yL={root:"m_86a44da5","root--subtle":"m_220c80f2"};const zQ={variant:"subtle"},bL=(e,{size:n,radius:t,iconSize:i})=>({root:{"--cb-size":Rn(n,"cb-size"),"--cb-radius":t===void 0?void 0:Gt(t),"--cb-icon-size":pe(i)}}),Ou=Hi(e=>{const n=ke("CloseButton",zQ,e),{iconSize:t,children:i,vars:r,radius:a,className:o,classNames:l,style:f,styles:c,unstyled:h,"data-disabled":d,disabled:p,variant:v,icon:b,mod:w,attributes:k,__staticSelector:_,...x}=n,C=Qe({name:_||"CloseButton",props:n,className:o,style:f,classes:yL,classNames:l,styles:c,unstyled:h,attributes:k,vars:r,varsResolver:bL});return y.jsxs(pi,{...x,unstyled:h,variant:v,disabled:p,mod:[{disabled:p||d},w],...C("root",{variant:v,active:!p&&!d}),children:[b||y.jsx(gL,{}),i]})});Ou.classes=yL;Ou.varsResolver=bL;Ou.displayName="@mantine/core/CloseButton";function LQ(e){return A.Children.toArray(e).filter(Boolean)}var wL={root:"m_4081bf90"};const IQ={preventGrowOverflow:!0,gap:"md",align:"center",justify:"flex-start",wrap:"wrap"},kL=(e,{grow:n,preventGrowOverflow:t,gap:i,align:r,justify:a,wrap:o},{childWidth:l})=>({root:{"--group-child-width":n&&t?l:void 0,"--group-gap":Ut(i),"--group-align":r,"--group-justify":a,"--group-wrap":o}}),un=De(e=>{const n=ke("Group",IQ,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,children:l,gap:f,align:c,justify:h,wrap:d,grow:p,preventGrowOverflow:v,vars:b,variant:w,__size:k,mod:_,attributes:x,...C}=n,T=LQ(l),O=T.length,E=Ut(f??"md");return y.jsx(ye,{...Qe({name:"Group",props:n,stylesCtx:{childWidth:`calc(${100/O}% - (${E} - ${E} / ${O}))`},className:i,style:r,classes:wL,classNames:t,styles:a,unstyled:o,attributes:x,vars:b,varsResolver:kL})("root"),variant:w,mod:[{grow:p},_],size:k,...C,children:T})});un.classes=wL;un.varsResolver=kL;un.displayName="@mantine/core/Group";const[BQ,us]=ba("ModalBase component was not found in tree");function FQ({opened:e,transitionDuration:n}){const[t,i]=A.useState(e),r=A.useRef(-1),a=C6()?0:n;return A.useEffect(()=>(e?(i(!0),window.clearTimeout(r.current)):a===0?i(!1):r.current=window.setTimeout(()=>i(!1),a),()=>window.clearTimeout(r.current)),[e,a]),t}function qQ({id:e,transitionProps:n,opened:t,trapFocus:i,closeOnEscape:r,onClose:a,returnFocus:o}){const l=Qi(e),[f,c]=A.useState(!1),[h,d]=A.useState(!1),p=FQ({opened:t,transitionDuration:typeof(n==null?void 0:n.duration)=="number"?n==null?void 0:n.duration:200});return tz("keydown",v=>{var b;v.key==="Escape"&&r&&!v.isComposing&&t&&((b=v.target)==null?void 0:b.getAttribute("data-mantine-stop-propagation"))!=="true"&&a()},{capture:!0}),Q$({opened:t,shouldReturnFocus:i&&o}),{_id:l,titleMounted:f,bodyMounted:h,shouldLockScroll:p,setTitleMounted:c,setBodyMounted:d}}var to=function(){return to=Object.assign||function(n){for(var t,i=1,r=arguments.length;i"u")return aJ;var n=oJ(e),t=document.documentElement.clientWidth,i=window.innerWidth;return{left:n[0],top:n[1],right:n[2],gap:Math.max(0,i-t+n[2]-n[0])}},lJ=CL(),If="data-scroll-locked",uJ=function(e,n,t,i){var r=e.left,a=e.top,o=e.right,l=e.gap;return t===void 0&&(t="margin"),` - .`.concat(UQ,` { - overflow: hidden `).concat(i,`; - padding-right: `).concat(l,"px ").concat(i,`; - } - body[`).concat(If,`] { - overflow: hidden `).concat(i,`; - overscroll-behavior: contain; - `).concat([n&&"position: relative ".concat(i,";"),t==="margin"&&` - padding-left: `.concat(r,`px; - padding-top: `).concat(a,`px; - padding-right: `).concat(o,`px; - margin-left:0; - margin-top:0; - margin-right: `).concat(l,"px ").concat(i,`; - `),t==="padding"&&"padding-right: ".concat(l,"px ").concat(i,";")].filter(Boolean).join(""),` - } - - .`).concat(ug,` { - right: `).concat(l,"px ").concat(i,`; - } - - .`).concat(fg,` { - margin-right: `).concat(l,"px ").concat(i,`; - } - - .`).concat(ug," .").concat(ug,` { - right: 0 `).concat(i,`; - } - - .`).concat(fg," .").concat(fg,` { - margin-right: 0 `).concat(i,`; - } - - body[`).concat(If,`] { - `).concat(VQ,": ").concat(l,`px; - } -`)},U5=function(){var e=parseInt(document.body.getAttribute(If)||"0",10);return isFinite(e)?e:0},fJ=function(){A.useEffect(function(){return document.body.setAttribute(If,(U5()+1).toString()),function(){var e=U5()-1;e<=0?document.body.removeAttribute(If):document.body.setAttribute(If,e.toString())}},[])},cJ=function(e){var n=e.noRelative,t=e.noImportant,i=e.gapMode,r=i===void 0?"margin":i;fJ();var a=A.useMemo(function(){return sJ(r)},[r]);return A.createElement(lJ,{styles:uJ(a,!n,r,t?"":"!important")})},cS=!1;if(typeof window<"u")try{var Mv=Object.defineProperty({},"passive",{get:function(){return cS=!0,!0}});window.addEventListener("test",Mv,Mv),window.removeEventListener("test",Mv,Mv)}catch{cS=!1}var kf=cS?{passive:!1}:!1,dJ=function(e){return e.tagName==="TEXTAREA"},AL=function(e,n){if(!(e instanceof Element))return!1;var t=window.getComputedStyle(e);return t[n]!=="hidden"&&!(t.overflowY===t.overflowX&&!dJ(e)&&t[n]==="visible")},hJ=function(e){return AL(e,"overflowY")},mJ=function(e){return AL(e,"overflowX")},V5=function(e,n){var t=n.ownerDocument,i=n;do{typeof ShadowRoot<"u"&&i instanceof ShadowRoot&&(i=i.host);var r=OL(e,i);if(r){var a=EL(e,i),o=a[1],l=a[2];if(o>l)return!0}i=i.parentNode}while(i&&i!==t.body);return!1},pJ=function(e){var n=e.scrollTop,t=e.scrollHeight,i=e.clientHeight;return[n,t,i]},vJ=function(e){var n=e.scrollLeft,t=e.scrollWidth,i=e.clientWidth;return[n,t,i]},OL=function(e,n){return e==="v"?hJ(n):mJ(n)},EL=function(e,n){return e==="v"?pJ(n):vJ(n)},gJ=function(e,n){return e==="h"&&n==="rtl"?-1:1},yJ=function(e,n,t,i,r){var a=gJ(e,window.getComputedStyle(n).direction),o=a*i,l=t.target,f=n.contains(l),c=!1,h=o>0,d=0,p=0;do{if(!l)break;var v=EL(e,l),b=v[0],w=v[1],k=v[2],_=w-k-a*b;(b||_)&&OL(e,l)&&(d+=_,p+=b);var x=l.parentNode;l=x&&x.nodeType===Node.DOCUMENT_FRAGMENT_NODE?x.host:x}while(!f&&l!==document.body||f&&(n.contains(l)||n===l));return(h&&Math.abs(d)<1||!h&&Math.abs(p)<1)&&(c=!0),c},Dv=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},W5=function(e){return[e.deltaX,e.deltaY]},G5=function(e){return e&&"current"in e?e.current:e},bJ=function(e,n){return e[0]===n[0]&&e[1]===n[1]},wJ=function(e){return` - .block-interactivity-`.concat(e,` {pointer-events: none;} - .allow-interactivity-`).concat(e,` {pointer-events: all;} -`)},kJ=0,_f=[];function _J(e){var n=A.useRef([]),t=A.useRef([0,0]),i=A.useRef(),r=A.useState(kJ++)[0],a=A.useState(CL)[0],o=A.useRef(e);A.useEffect(function(){o.current=e},[e]),A.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(r));var w=HQ([e.lockRef.current],(e.shards||[]).map(G5),!0).filter(Boolean);return w.forEach(function(k){return k.classList.add("allow-interactivity-".concat(r))}),function(){document.body.classList.remove("block-interactivity-".concat(r)),w.forEach(function(k){return k.classList.remove("allow-interactivity-".concat(r))})}}},[e.inert,e.lockRef.current,e.shards]);var l=A.useCallback(function(w,k){if("touches"in w&&w.touches.length===2||w.type==="wheel"&&w.ctrlKey)return!o.current.allowPinchZoom;var _=Dv(w),x=t.current,C="deltaX"in w?w.deltaX:x[0]-_[0],T="deltaY"in w?w.deltaY:x[1]-_[1],O,E=w.target,M=Math.abs(C)>Math.abs(T)?"h":"v";if("touches"in w&&M==="h"&&E.type==="range")return!1;var N=window.getSelection(),F=N&&N.anchorNode,R=F?F===E||F.contains(E):!1;if(R)return!1;var L=V5(M,E);if(!L)return!0;if(L?O=M:(O=M==="v"?"h":"v",L=V5(M,E)),!L)return!1;if(!i.current&&"changedTouches"in w&&(C||T)&&(i.current=O),!O)return!0;var B=i.current||O;return yJ(B,k,w,B==="h"?C:T)},[]),f=A.useCallback(function(w){var k=w;if(!(!_f.length||_f[_f.length-1]!==a)){var _="deltaY"in k?W5(k):Dv(k),x=n.current.filter(function(O){return O.name===k.type&&(O.target===k.target||k.target===O.shadowParent)&&bJ(O.delta,_)})[0];if(x&&x.should){k.cancelable&&k.preventDefault();return}if(!x){var C=(o.current.shards||[]).map(G5).filter(Boolean).filter(function(O){return O.contains(k.target)}),T=C.length>0?l(k,C[0]):!o.current.noIsolation;T&&k.cancelable&&k.preventDefault()}}},[]),c=A.useCallback(function(w,k,_,x){var C={name:w,delta:k,target:_,should:x,shadowParent:xJ(_)};n.current.push(C),setTimeout(function(){n.current=n.current.filter(function(T){return T!==C})},1)},[]),h=A.useCallback(function(w){t.current=Dv(w),i.current=void 0},[]),d=A.useCallback(function(w){c(w.type,W5(w),w.target,l(w,e.lockRef.current))},[]),p=A.useCallback(function(w){c(w.type,Dv(w),w.target,l(w,e.lockRef.current))},[]);A.useEffect(function(){return _f.push(a),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:p}),document.addEventListener("wheel",f,kf),document.addEventListener("touchmove",f,kf),document.addEventListener("touchstart",h,kf),function(){_f=_f.filter(function(w){return w!==a}),document.removeEventListener("wheel",f,kf),document.removeEventListener("touchmove",f,kf),document.removeEventListener("touchstart",h,kf)}},[]);var v=e.removeScrollBar,b=e.inert;return A.createElement(A.Fragment,null,b?A.createElement(a,{styles:wJ(r)}):null,v?A.createElement(cJ,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function xJ(e){for(var n=null;e!==null;)e instanceof ShadowRoot&&(n=e.host,e=e.host),e=e.parentNode;return n}const SJ=QQ(SL,_J);var du=A.forwardRef(function(e,n){return A.createElement(fy,to({},e,{ref:n,sideCar:SJ}))});du.classNames=fy.classNames;function TL({keepMounted:e,opened:n,onClose:t,id:i,transitionProps:r,onExitTransitionEnd:a,onEnterTransitionEnd:o,trapFocus:l,closeOnEscape:f,returnFocus:c,closeOnClickOutside:h,withinPortal:d,portalProps:p,lockScroll:v,children:b,zIndex:w,shadow:k,padding:_,__vars:x,unstyled:C,removeScrollProps:T,...O}){const{_id:E,titleMounted:M,bodyMounted:N,shouldLockScroll:F,setTitleMounted:R,setBodyMounted:L}=qQ({id:i,transitionProps:r,opened:n,trapFocus:l,closeOnEscape:f,onClose:t,returnFocus:c}),{key:B,...G}=T||{};return y.jsx(rl,{...p,withinPortal:d,children:y.jsx(BQ,{value:{opened:n,onClose:t,closeOnClickOutside:h,onExitTransitionEnd:a,onEnterTransitionEnd:o,transitionProps:{...r,keepMounted:e},getTitleId:()=>`${E}-title`,getBodyId:()=>`${E}-body`,titleMounted:M,bodyMounted:N,setTitleMounted:R,setBodyMounted:L,trapFocus:l,closeOnEscape:f,zIndex:w,unstyled:C},children:y.jsx(du,{enabled:F&&v,...G,children:y.jsx(ye,{...O,id:E,__vars:{...x,"--mb-z-index":(w||wa("modal")).toString(),"--mb-shadow":x6(k),"--mb-padding":Ut(_)},children:b})},B)})})}TL.displayName="@mantine/core/ModalBase";function CJ(){const e=us();return A.useEffect(()=>(e.setBodyMounted(!0),()=>e.setBodyMounted(!1)),[]),e.getBodyId()}var Yf={title:"m_615af6c9",header:"m_b5489c3c",inner:"m_60c222c7",content:"m_fd1ab0aa",close:"m_606cb269",body:"m_5df29311"};function jL({className:e,...n}){const t=CJ(),i=us();return y.jsx(ye,{id:t,className:dn({[Yf.body]:!i.unstyled},e),...n})}jL.displayName="@mantine/core/ModalBaseBody";function ML({className:e,onClick:n,...t}){const i=us();return y.jsx(Ou,{...t,onClick:r=>{i.onClose(),n==null||n(r)},className:dn({[Yf.close]:!i.unstyled},e),unstyled:i.unstyled})}ML.displayName="@mantine/core/ModalBaseCloseButton";function DL({transitionProps:e,className:n,innerProps:t,onKeyDown:i,style:r,ref:a,...o}){const l=us();return y.jsx(ts,{mounted:l.opened,transition:"pop",...l.transitionProps,onExited:()=>{var f,c,h;(f=l.onExitTransitionEnd)==null||f.call(l),(h=(c=l.transitionProps)==null?void 0:c.onExited)==null||h.call(c)},onEntered:()=>{var f,c,h;(f=l.onEnterTransitionEnd)==null||f.call(l),(h=(c=l.transitionProps)==null?void 0:c.onEntered)==null||h.call(c)},...e,children:f=>y.jsx("div",{...t,className:dn({[Yf.inner]:!l.unstyled},t.className),children:y.jsx(sy,{active:l.opened&&l.trapFocus,innerRef:a,children:y.jsx(Ht,{...o,component:"section",role:"dialog",tabIndex:-1,"aria-modal":!0,"aria-describedby":l.bodyMounted?l.getBodyId():void 0,"aria-labelledby":l.titleMounted?l.getTitleId():void 0,style:[r,f],className:dn({[Yf.content]:!l.unstyled},n),unstyled:l.unstyled,children:o.children})})})})}DL.displayName="@mantine/core/ModalBaseContent";function RL({className:e,...n}){const t=us();return y.jsx(ye,{component:"header",className:dn({[Yf.header]:!t.unstyled},e),...n})}RL.displayName="@mantine/core/ModalBaseHeader";const AJ={duration:200,timingFunction:"ease",transition:"fade"};function OJ(e){const n=us();return{...AJ,...n.transitionProps,...e}}function PL({onClick:e,transitionProps:n,style:t,visible:i,...r}){const a=us(),o=OJ(n);return y.jsx(ts,{mounted:i!==void 0?i:a.opened,...o,transition:"fade",children:l=>y.jsx(Nm,{fixed:!0,style:[t,l],zIndex:a.zIndex,unstyled:a.unstyled,onClick:f=>{e==null||e(f),a.closeOnClickOutside&&a.onClose()},...r})})}PL.displayName="@mantine/core/ModalBaseOverlay";function EJ(){const e=us();return A.useEffect(()=>(e.setTitleMounted(!0),()=>e.setTitleMounted(!1)),[]),e.getTitleId()}function NL({className:e,...n}){const t=EJ(),i=us();return y.jsx(ye,{component:"h2",className:dn({[Yf.title]:!i.unstyled},e),id:t,...n})}NL.displayName="@mantine/core/ModalBaseTitle";function TJ({children:e}){return y.jsx(y.Fragment,{children:e})}const $L=A.createContext({size:"sm"}),zL=De(e=>{const n=ke("InputClearButton",null,e),{size:t,variant:i,vars:r,classNames:a,styles:o,...l}=n,f=A.use($L),{resolvedClassNames:c,resolvedStyles:h}=qi({classNames:a,styles:o,props:n});return y.jsx(Ou,{variant:i||"transparent",size:t||(f==null?void 0:f.size)||"sm",classNames:c,styles:h,__staticSelector:"InputClearButton",style:{pointerEvents:"all",background:"var(--input-bg)",...l.style},...l})});zL.displayName="@mantine/core/InputClearButton";const jJ={xs:7,sm:8,md:10,lg:12,xl:15};function MJ({__clearable:e,__clearSection:n,rightSection:t,__defaultRightSection:i,size:r="sm",__clearSectionMode:a="both"}){const o=e&&n;return a==="rightSection"?t===null?null:t||i:a==="clear"?t===null?null:o||i:o&&(t||i)?y.jsxs("div",{"data-combined-clear-section":!0,style:{display:"flex",gap:2,alignItems:"center",paddingInlineEnd:jJ[r]},children:[o,t||i]}):t===null?null:t||o||i}const Eu=A.createContext({offsetBottom:!1,offsetTop:!1,describedBy:void 0,getStyles:null,inputId:void 0,labelId:void 0});var xa={wrapper:"m_6c018570",input:"m_8fb7ebe7",section:"m_82577fc2",placeholder:"m_88bacfd0",root:"m_46b77525",label:"m_8fdc1311",required:"m_78a94662",error:"m_8f816625",description:"m_fe47ce59"};const LL=(e,{size:n})=>({description:{"--input-description-size":n===void 0?void 0:`calc(${ei(n)} - ${pe(2)})`}}),$m=De(e=>{const n=ke("InputDescription",null,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,__staticSelector:f,__inheritStyles:c=!0,attributes:h,...d}=ke("InputDescription",null,n),p=A.use(Eu),v=Qe({name:["InputWrapper",f],props:n,classes:xa,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:h,rootSelector:"description",vars:l,varsResolver:LL});return y.jsx(ye,{component:"p",...(c&&(p==null?void 0:p.getStyles)||v)("description",p!=null&&p.getStyles?{className:i,style:r}:void 0),...d})});$m.classes=xa;$m.varsResolver=LL;$m.displayName="@mantine/core/InputDescription";const IL=(e,{size:n})=>({error:{"--input-error-size":n===void 0?void 0:`calc(${ei(n)} - ${pe(2)})`}}),zm=De(e=>{const n=ke("InputError",null,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,attributes:f,__staticSelector:c,__inheritStyles:h=!0,...d}=n,p=Qe({name:["InputWrapper",c],props:n,classes:xa,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:f,rootSelector:"error",vars:l,varsResolver:IL}),v=A.use(Eu);return y.jsx(ye,{component:"p",...(h&&(v==null?void 0:v.getStyles)||p)("error",v!=null&&v.getStyles?{className:i,style:r}:void 0),...d})});zm.classes=xa;zm.varsResolver=IL;zm.displayName="@mantine/core/InputError";const DJ={labelElement:"label"},BL=(e,{size:n})=>({label:{"--input-label-size":ei(n),"--input-asterisk-color":void 0}}),Lm=De(e=>{const n=ke("InputLabel",DJ,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,labelElement:f,required:c,htmlFor:h,onMouseDown:d,children:p,__staticSelector:v,mod:b,attributes:w,...k}=n,_=Qe({name:["InputWrapper",v],props:n,classes:xa,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:w,rootSelector:"label",vars:l,varsResolver:BL}),x=A.use(Eu),C=(x==null?void 0:x.getStyles)||_;return y.jsxs(ye,{...C("label",x!=null&&x.getStyles?{className:i,style:r}:void 0),component:f,htmlFor:f==="label"?h:void 0,mod:[{required:c},b],onMouseDown:T=>{d==null||d(T),!T.defaultPrevented&&T.detail>1&&T.preventDefault()},...k,children:[p,c&&y.jsx("span",{...C("required"),"aria-hidden":!0,children:" *"})]})});Lm.classes=xa;Lm.varsResolver=BL;Lm.displayName="@mantine/core/InputLabel";const Y6=De(e=>{const n=ke("InputPlaceholder",null,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,__staticSelector:f,error:c,mod:h,attributes:d,...p}=n;return y.jsx(ye,{...Qe({name:["InputPlaceholder",f],props:n,classes:xa,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:d,rootSelector:"placeholder"})("placeholder"),mod:[{error:!!c},h],component:"span",...p})});Y6.classes=xa;Y6.displayName="@mantine/core/InputPlaceholder";function RJ(e,{hasDescription:n,hasError:t}){const i=e.findIndex(l=>l==="input"),r=e.slice(0,i),a=e.slice(i+1),o=n&&r.includes("description")||t&&r.includes("error");return{offsetBottom:n&&a.includes("description")||t&&a.includes("error"),offsetTop:o}}const PJ={labelElement:"label",inputContainer:e=>e,inputWrapperOrder:["label","description","input","error"]},FL=(e,{size:n})=>({label:{"--input-label-size":ei(n),"--input-asterisk-color":void 0},error:{"--input-error-size":n===void 0?void 0:`calc(${ei(n)} - ${pe(2)})`},description:{"--input-description-size":n===void 0?void 0:`calc(${ei(n)} - ${pe(2)})`}}),cy=De(e=>{const n=ke("InputWrapper",PJ,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,size:f,variant:c,__staticSelector:h,inputContainer:d,inputWrapperOrder:p,label:v,error:b,description:w,labelProps:k,descriptionProps:_,errorProps:x,labelElement:C,children:T,withAsterisk:O,id:E,required:M,__stylesApiProps:N,mod:F,attributes:R,...L}=n,B=Qe({name:["InputWrapper",h],props:N||n,classes:xa,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:R,vars:l,varsResolver:FL}),G={size:f,variant:c,__staticSelector:h},U=Qi(E),H=typeof O=="boolean"?O:M,P=(x==null?void 0:x.id)||`${U}-error`,z=(_==null?void 0:_.id)||`${U}-description`,q=U,Y=!!b&&typeof b!="boolean",D=!!w,V=`${Y?P:""} ${D?z:""}`,W=V.trim().length>0?V.trim():void 0,$=(k==null?void 0:k.id)||`${U}-label`,X=v&&y.jsx(Lm,{labelElement:C,id:$,htmlFor:q,required:H,...G,...k,children:v},"label"),ee=D&&y.jsx($m,{..._,...G,size:(_==null?void 0:_.size)||G.size,id:(_==null?void 0:_.id)||z,children:w},"description"),re=y.jsx(A.Fragment,{children:d(T)},"input"),se=Y&&A.createElement(zm,{...x,...G,size:(x==null?void 0:x.size)||G.size,key:"error",id:(x==null?void 0:x.id)||P},b),ge=p.map(ae=>{switch(ae){case"label":return X;case"input":return re;case"description":return ee;case"error":return se;default:return null}});return y.jsx(Eu,{value:{getStyles:B,describedBy:W,inputId:q,labelId:$,...RJ(p,{hasDescription:D,hasError:Y})},children:y.jsx(ye,{variant:c,size:f,mod:[{error:!!b},F],id:C==="label"?void 0:E,...B("root"),...L,children:ge})})});cy.classes=xa;cy.varsResolver=FL;cy.displayName="@mantine/core/InputWrapper";const NJ={variant:"default",leftSectionPointerEvents:"none",rightSectionPointerEvents:"none",withAria:!0,withErrorStyles:!0,size:"sm",loading:!1,loadingPosition:"right"},qL=(e,n,t)=>({wrapper:{"--input-margin-top":t.offsetTop?"calc(var(--mantine-spacing-xs) / 2)":void 0,"--input-margin-bottom":t.offsetBottom?"calc(var(--mantine-spacing-xs) / 2)":void 0,"--input-height":Rn(n.size,"input-height"),"--input-fz":ei(n.size),"--input-radius":n.radius===void 0?void 0:Gt(n.radius),"--input-left-section-width":n.leftSectionWidth!==void 0?pe(n.leftSectionWidth):void 0,"--input-right-section-width":n.rightSectionWidth!==void 0?pe(n.rightSectionWidth):void 0,"--input-padding-y":n.multiline?Rn(n.size,"input-padding-y"):void 0,"--input-left-section-pointer-events":n.leftSectionPointerEvents,"--input-right-section-pointer-events":n.rightSectionPointerEvents}}),It=Hi(e=>{const n=ke("Input",NJ,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,required:l,__staticSelector:f,__stylesApiProps:c,size:h,wrapperProps:d,error:p,disabled:v,leftSection:b,leftSectionProps:w,leftSectionWidth:k,rightSection:_,rightSectionProps:x,rightSectionWidth:C,rightSectionPointerEvents:T,leftSectionPointerEvents:O,variant:E,vars:M,pointer:N,multiline:F,radius:R,id:L,withAria:B,withErrorStyles:G,mod:U,inputSize:H,attributes:P,__clearSection:z,__clearable:q,__clearSectionMode:Y,__defaultRightSection:D,loading:V,loadingPosition:W,rootRef:$,...X}=n,{styleProps:ee,rest:re}=Cu(X),se=A.use(Eu),ge={offsetBottom:se==null?void 0:se.offsetBottom,offsetTop:se==null?void 0:se.offsetTop},ae=Qe({name:["Input",f],props:c||n,classes:xa,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:P,stylesCtx:ge,rootSelector:"wrapper",vars:M,varsResolver:qL}),le=B?{required:l,disabled:v,"aria-invalid":p?!0:void 0,"aria-describedby":se==null?void 0:se.describedBy,id:(se==null?void 0:se.inputId)||L}:{},_e=V?y.jsx(Fi,{size:W==="left"?"calc(var(--input-left-section-size) / 2)":"calc(var(--input-right-section-size) / 2)"}):null,ne=V&&W==="left"?_e:b,$e=MJ({__clearable:q,__clearSection:z,rightSection:V&&W==="right"?_e:_,__defaultRightSection:D,size:h,__clearSectionMode:Y});return y.jsx($L,{value:{size:h||"sm"},children:y.jsxs(ye,{ref:$,...ae("wrapper"),...ee,...d,mod:[{error:!!p&&G,pointer:N,disabled:v,multiline:F,"data-with-right-section":!!$e,"data-with-left-section":!!ne},U],variant:E,size:h,children:[ne&&y.jsx("div",{...w,"data-position":"left",...ae("section",{className:w==null?void 0:w.className,style:w==null?void 0:w.style}),children:ne}),y.jsx(ye,{component:"input",...re,...le,required:l,mod:{disabled:v,error:!!p&&G},variant:E,__size:H,...ae("input")}),$e&&y.jsx("div",{...x,"data-position":"right",...ae("section",{className:x==null?void 0:x.className,style:x==null?void 0:x.style}),children:$e})]})})});It.classes=xa;It.varsResolver=qL;It.Wrapper=cy;It.Label=Lm;It.Error=zm;It.Description=$m;It.Placeholder=Y6;It.ClearButton=zL;It.displayName="@mantine/core/Input";function HL(e,n,t){const i=ke(e,n,t),{label:r,description:a,error:o,required:l,classNames:f,styles:c,className:h,unstyled:d,__staticSelector:p,__stylesApiProps:v,errorProps:b,labelProps:w,descriptionProps:k,wrapperProps:_,id:x,size:C,style:T,inputContainer:O,inputWrapperOrder:E,withAsterisk:M,variant:N,vars:F,mod:R,attributes:L,...B}=i,{styleProps:G,rest:U}=Cu(B),H={label:r,description:a,error:o,required:l,classNames:f,className:h,__staticSelector:p,__stylesApiProps:v||i,errorProps:b,labelProps:w,descriptionProps:k,unstyled:d,styles:c,size:C,style:T,inputContainer:O,inputWrapperOrder:E,withAsterisk:M,variant:N,id:x,mod:R,attributes:L,..._};return{...U,classNames:f,styles:c,unstyled:d,wrapperProps:{...H,...G},inputProps:{required:l,classNames:f,styles:c,unstyled:d,size:C,__staticSelector:p,__stylesApiProps:v||i,error:o,variant:N,id:x,attributes:L}}}const $J={__staticSelector:"InputBase",withAria:!0,size:"sm"},Ui=Hi(e=>{const{inputProps:n,wrapperProps:t,...i}=HL("InputBase",$J,e);return y.jsx(It.Wrapper,{...t,children:y.jsx(It,{...n,...i})})});Ui.classes={...It.classes,...It.Wrapper.classes};Ui.displayName="@mantine/core/InputBase";function jg({style:e,size:n=16,...t}){return y.jsx("svg",{viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{...e,width:pe(n),height:pe(n),display:"block"},...t,children:y.jsx("path",{d:"M3.13523 6.15803C3.3241 5.95657 3.64052 5.94637 3.84197 6.13523L7.5 9.56464L11.158 6.13523C11.3595 5.94637 11.6759 5.95657 11.8648 6.15803C12.0536 6.35949 12.0434 6.67591 11.842 6.86477L7.84197 10.6148C7.64964 10.7951 7.35036 10.7951 7.15803 10.6148L3.15803 6.86477C2.95657 6.67591 2.94637 6.35949 3.13523 6.15803Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})})}jg.displayName="@mantine/core/AccordionChevron";var UL={root:"m_b6d8b162"};function zJ(e){if(e==="start")return"start";if(e==="end"||e)return"end"}const LJ={inherit:!1},VL=(e,{variant:n,lineClamp:t,gradient:i,size:r})=>({root:{"--text-fz":ei(r),"--text-lh":ZY(r),"--text-gradient":n==="gradient"?eS(i,e):void 0,"--text-line-clamp":typeof t=="number"?t.toString():void 0}}),Ye=Hi(e=>{const n=ke("Text",LJ,e),{lineClamp:t,truncate:i,inline:r,inherit:a,gradient:o,span:l,__staticSelector:f,vars:c,className:h,style:d,classNames:p,styles:v,unstyled:b,variant:w,mod:k,size:_,attributes:x,...C}=n;return y.jsx(ye,{...Qe({name:["Text",f],props:n,classes:UL,className:h,style:d,classNames:p,styles:v,unstyled:b,attributes:x,vars:c,varsResolver:VL})("root",{focusable:!0}),component:l?"span":"p",variant:w,mod:[{"data-truncate":zJ(i),"data-line-clamp":typeof t=="number","data-inline":r,"data-inherit":a},k],size:_,...C})});Ye.classes=UL;Ye.varsResolver=VL;Ye.displayName="@mantine/core/Text";var WL={root:"m_849cf0da"};const IJ={underline:"hover"},dy=Hi(e=>{const{underline:n,className:t,unstyled:i,mod:r,...a}=ke("Anchor",IJ,e);return y.jsx(Ye,{component:"a",className:dn({[WL.root]:!i},t),...a,mod:[{underline:n},r],__staticSelector:"Anchor",unstyled:i})});dy.classes=WL;dy.displayName="@mantine/core/Anchor";const[BJ,Tc]=ba("AppShell was not found in tree");var ul={root:"m_89ab340",navbar:"m_45252eee",aside:"m_9cdde9a",header:"m_3b16f56b",main:"m_8983817",footer:"m_3840c879",section:"m_6dcfc7c7"};const K6=De(e=>{const{classNames:n,className:t,style:i,styles:r,unstyled:a,vars:o,withBorder:l,zIndex:f,mod:c,...h}=ke("AppShellAside",null,e),d=Tc();return d.disabled?null:y.jsx(ye,{component:"aside",mod:[{"with-border":l??d.withBorder},c],...d.getStyles("aside",{className:dn({[du.classNames.zeroRight]:d.offsetScrollbars},t),classNames:n,styles:r,style:i}),...h,__vars:{"--app-shell-aside-z-index":`calc(${f??d.zIndex} + 1)`}})});K6.classes=ul;K6.displayName="@mantine/core/AppShellAside";const X6=De(e=>{var p;const{classNames:n,className:t,style:i,styles:r,unstyled:a,vars:o,withBorder:l,zIndex:f,mod:c,...h}=ke("AppShellFooter",null,e),d=Tc();return d.disabled?null:y.jsx(ye,{component:"footer",mod:[{"with-border":l??d.withBorder},c],...d.getStyles("footer",{className:dn({[du.classNames.zeroRight]:d.offsetScrollbars},t),classNames:n,styles:r,style:i}),...h,__vars:{"--app-shell-footer-z-index":(p=f??d.zIndex)==null?void 0:p.toString()}})});X6.classes=ul;X6.displayName="@mantine/core/AppShellFooter";const Z6=De(e=>{var p;const{classNames:n,className:t,style:i,styles:r,unstyled:a,vars:o,withBorder:l,zIndex:f,mod:c,...h}=ke("AppShellHeader",null,e),d=Tc();return d.disabled?null:y.jsx(ye,{component:"header",mod:[{"with-border":l??d.withBorder},c],...d.getStyles("header",{className:dn({[du.classNames.zeroRight]:d.offsetScrollbars},t),classNames:n,styles:r,style:i}),...h,__vars:{"--app-shell-header-z-index":(p=f??d.zIndex)==null?void 0:p.toString()}})});Z6.classes=ul;Z6.displayName="@mantine/core/AppShellHeader";const Q6=De(e=>{const{classNames:n,className:t,style:i,styles:r,vars:a,...o}=ke("AppShellMain",null,e);return y.jsx(ye,{component:"main",...Tc().getStyles("main",{className:t,style:i,classNames:n,styles:r}),...o})});Q6.classes=ul;Q6.displayName="@mantine/core/AppShellMain";const J6=De(e=>{const{classNames:n,className:t,style:i,styles:r,unstyled:a,vars:o,withBorder:l,zIndex:f,mod:c,...h}=ke("AppShellNavbar",null,e),d=Tc();return d.disabled?null:y.jsx(ye,{component:"nav",mod:[{"with-border":l??d.withBorder},c],...d.getStyles("navbar",{className:t,classNames:n,styles:r,style:i}),...h,__vars:{"--app-shell-navbar-z-index":`calc(${f??d.zIndex} + 1)`}})});J6.classes=ul;J6.displayName="@mantine/core/AppShellNavbar";const eC=Hi(e=>{const{classNames:n,className:t,style:i,styles:r,vars:a,grow:o,mod:l,...f}=ke("AppShellSection",null,e),c=Tc();return y.jsx(ye,{mod:[{grow:o},l],...c.getStyles("section",{className:t,style:i,classNames:n,styles:r}),...f})});eC.classes=ul;eC.displayName="@mantine/core/AppShellSection";function Im(e){return typeof e=="object"?e.base:e}function Bm(e){const n=typeof e=="object"&&e!==null&&typeof e.base<"u"&&Object.keys(e).length===1;return typeof e=="number"||typeof e=="string"||n}function Fm(e){return!(typeof e!="object"||e===null||Object.keys(e).length===1&&"base"in e)}function FJ({baseStyles:e,minMediaStyles:n,maxMediaStyles:t,aside:i,theme:r,mode:a}){var c,h,d;const o=i==null?void 0:i.width,l="translateX(var(--app-shell-aside-width))",f="translateX(calc(var(--app-shell-aside-width) * -1))";if(i!=null&&i.breakpoint&&!((c=i==null?void 0:i.collapsed)!=null&&c.mobile)&&(t[i==null?void 0:i.breakpoint]=t[i==null?void 0:i.breakpoint]||{},a==="fixed"?(t[i==null?void 0:i.breakpoint]["--app-shell-aside-width"]="100%",t[i==null?void 0:i.breakpoint]["--app-shell-aside-offset"]="0px"):(t[i==null?void 0:i.breakpoint]["--app-shell-aside-width"]="0px",t[i==null?void 0:i.breakpoint]["--app-shell-aside-offset"]="0px")),Bm(o)){const p=pe(Im(o));e["--app-shell-aside-width"]=p,e["--app-shell-aside-offset"]=p}if(Fm(o)&&(typeof o.base<"u"&&(e["--app-shell-aside-width"]=pe(o.base),e["--app-shell-aside-offset"]=pe(o.base)),Tt(o).forEach(p=>{p!=="base"&&(n[p]=n[p]||{},n[p]["--app-shell-aside-width"]=pe(o[p]),n[p]["--app-shell-aside-offset"]=pe(o[p]))})),i!=null&&i.breakpoint&&a==="static"&&(n[i.breakpoint]=n[i.breakpoint]||{},n[i.breakpoint]["--app-shell-aside-position"]="sticky",n[i.breakpoint]["--app-shell-aside-grid-row"]="2",n[i.breakpoint]["--app-shell-aside-grid-column"]="3",n[i.breakpoint]["--app-shell-main-column-end"]="3"),(h=i==null?void 0:i.collapsed)!=null&&h.desktop){const p=i.breakpoint;n[p]=n[p]||{},n[p]["--app-shell-aside-transform"]=l,n[p]["--app-shell-aside-transform-rtl"]=f,a==="fixed"?n[p]["--app-shell-aside-offset"]="0px !important":(n[p]["--app-shell-aside-width"]="0px",n[p]["--app-shell-aside-display"]="none",n[p]["--app-shell-main-column-end"]="-1"),n[p]["--app-shell-aside-scroll-locked-visibility"]="hidden"}if((d=i==null?void 0:i.collapsed)!=null&&d.mobile){const p=S6(i.breakpoint,r.breakpoints)-.1;t[p]=t[p]||{},a==="fixed"?(t[p]["--app-shell-aside-width"]="100%",t[p]["--app-shell-aside-offset"]="0px"):t[p]["--app-shell-aside-width"]="0px",t[p]["--app-shell-aside-transform"]=l,t[p]["--app-shell-aside-transform-rtl"]=f,t[p]["--app-shell-aside-scroll-locked-visibility"]="hidden"}}function qJ({baseStyles:e,minMediaStyles:n,footer:t,mode:i}){const r=t==null?void 0:t.height,a="translateY(var(--app-shell-footer-height))",o=i==="static"?!0:(t==null?void 0:t.offset)??!0;if(i==="static"&&t&&(e["--app-shell-footer-position"]="sticky",e["--app-shell-footer-grid-column"]="1 / -1",e["--app-shell-footer-grid-row"]="3"),Bm(r)){const l=pe(Im(r));e["--app-shell-footer-height"]=l,o&&(e["--app-shell-footer-offset"]=l)}Fm(r)&&(typeof r.base<"u"&&(e["--app-shell-footer-height"]=pe(r.base),o&&(e["--app-shell-footer-offset"]=pe(r.base))),Tt(r).forEach(l=>{l!=="base"&&(n[l]=n[l]||{},n[l]["--app-shell-footer-height"]=pe(r[l]),o&&(n[l]["--app-shell-footer-offset"]=pe(r[l])))})),t!=null&&t.collapsed&&(e["--app-shell-footer-transform"]=a,i==="fixed"&&(e["--app-shell-footer-offset"]="0px !important"))}function HJ({baseStyles:e,minMediaStyles:n,header:t,mode:i}){const r=t==null?void 0:t.height,a="translateY(calc(var(--app-shell-header-height) * -1))",o=i==="static"?!0:(t==null?void 0:t.offset)??!0;if(i==="static"&&t&&(e["--app-shell-header-position"]="sticky",e["--app-shell-header-grid-column"]="1 / -1",e["--app-shell-header-grid-row"]="1"),Bm(r)){const l=pe(Im(r));e["--app-shell-header-height"]=l,o&&(e["--app-shell-header-offset"]=l)}Fm(r)&&(typeof r.base<"u"&&(e["--app-shell-header-height"]=pe(r.base),o&&(e["--app-shell-header-offset"]=pe(r.base))),Tt(r).forEach(l=>{l!=="base"&&(n[l]=n[l]||{},n[l]["--app-shell-header-height"]=pe(r[l]),o&&(n[l]["--app-shell-header-offset"]=pe(r[l])))})),t!=null&&t.collapsed&&(e["--app-shell-header-transform"]=a,i==="fixed"&&(e["--app-shell-header-offset"]="0px !important"))}function UJ({baseStyles:e,minMediaStyles:n,maxMediaStyles:t,navbar:i,theme:r,mode:a}){var c,h,d;const o=i==null?void 0:i.width,l="translateX(calc(var(--app-shell-navbar-width) * -1))",f="translateX(var(--app-shell-navbar-width))";if(i!=null&&i.breakpoint&&!((c=i==null?void 0:i.collapsed)!=null&&c.mobile)&&(t[i==null?void 0:i.breakpoint]=t[i==null?void 0:i.breakpoint]||{},t[i==null?void 0:i.breakpoint]["--app-shell-navbar-offset"]="0px",t[i==null?void 0:i.breakpoint]["--app-shell-navbar-width"]="100%",a==="static"&&(t[i==null?void 0:i.breakpoint]["--app-shell-navbar-grid-width"]="0px")),Bm(o)){const p=pe(Im(o));e["--app-shell-navbar-width"]=p,e["--app-shell-navbar-offset"]=p,a==="static"&&(e["--app-shell-navbar-grid-width"]=p)}if(Fm(o)&&(typeof o.base<"u"&&(e["--app-shell-navbar-width"]=pe(o.base),e["--app-shell-navbar-offset"]=pe(o.base),a==="static"&&(e["--app-shell-navbar-grid-width"]=pe(o.base))),Tt(o).forEach(p=>{p!=="base"&&(n[p]=n[p]||{},n[p]["--app-shell-navbar-width"]=pe(o[p]),n[p]["--app-shell-navbar-offset"]=pe(o[p]),a==="static"&&(n[p]["--app-shell-navbar-grid-width"]=pe(o[p])))})),i!=null&&i.breakpoint&&a==="static"&&(n[i.breakpoint]=n[i.breakpoint]||{},n[i.breakpoint]["--app-shell-navbar-position"]="sticky",n[i.breakpoint]["--app-shell-navbar-grid-row"]="2",n[i.breakpoint]["--app-shell-navbar-grid-column"]="1",n[i.breakpoint]["--app-shell-main-column-start"]="2"),(h=i==null?void 0:i.collapsed)!=null&&h.desktop){const p=i.breakpoint;n[p]=n[p]||{},n[p]["--app-shell-navbar-transform"]=l,n[p]["--app-shell-navbar-transform-rtl"]=f,a==="fixed"?n[p]["--app-shell-navbar-offset"]="0px !important":(n[p]["--app-shell-navbar-width"]="0px",n[p]["--app-shell-navbar-display"]="none",n[p]["--app-shell-main-column-start"]="1")}if((d=i==null?void 0:i.collapsed)!=null&&d.mobile){const p=S6(i.breakpoint,r.breakpoints)-.1;t[p]=t[p]||{},t[p]["--app-shell-navbar-width"]="100%",t[p]["--app-shell-navbar-offset"]="0px",a==="static"&&(t[p]["--app-shell-navbar-grid-width"]="0px"),t[p]["--app-shell-navbar-transform"]=l,t[p]["--app-shell-navbar-transform-rtl"]=f}}function ck(e){return Number(e)===0?"0px":Ut(e)}function VJ({padding:e,baseStyles:n,minMediaStyles:t}){Bm(e)&&(n["--app-shell-padding"]=ck(Im(e))),Fm(e)&&(e.base&&(n["--app-shell-padding"]=ck(e.base)),Tt(e).forEach(i=>{i!=="base"&&(t[i]=t[i]||{},t[i]["--app-shell-padding"]=ck(e[i]))}))}function WJ({navbar:e,header:n,footer:t,aside:i,padding:r,theme:a,mode:o}){const l={},f={},c={};o==="static"&&(c["--app-shell-main-grid-column"]="1 / -1",c["--app-shell-main-grid-row"]="2"),UJ({baseStyles:c,minMediaStyles:l,maxMediaStyles:f,navbar:e,theme:a,mode:o}),FJ({baseStyles:c,minMediaStyles:l,maxMediaStyles:f,aside:i,theme:a,mode:o}),HJ({baseStyles:c,minMediaStyles:l,header:n,mode:o}),qJ({baseStyles:c,minMediaStyles:l,footer:t,mode:o}),VJ({baseStyles:c,minMediaStyles:l,padding:r});const h=Ph(Tt(l),a.breakpoints).map(p=>({query:`(min-width: ${wg(p.px)})`,styles:l[p.value]})),d=Ph(Tt(f),a.breakpoints).map(p=>({query:`(max-width: ${wg(p.px)})`,styles:f[p.value]}));return{baseStyles:c,media:[...h,...d]}}function GJ({navbar:e,header:n,aside:t,footer:i,padding:r,mode:a,selector:o}){const l=oi(),f=yo(),{media:c,baseStyles:h}=WJ({navbar:e,header:n,footer:i,aside:t,padding:r,theme:l,mode:a});return y.jsx(Cc,{media:c,styles:h,selector:o||f.cssVariablesSelector})}function YJ({transitionDuration:e,disabled:n}){const[t,i]=A.useState(!0),r=A.useRef(-1),a=A.useRef(-1);return tz("resize",()=>{i(!0),clearTimeout(r.current),r.current=window.setTimeout(()=>A.startTransition(()=>{i(!1)}),200)}),ss(()=>{i(!0),clearTimeout(a.current),a.current=window.setTimeout(()=>A.startTransition(()=>{i(!1)}),e||0)},[n,e]),t}const KJ={withBorder:!0,padding:0,transitionDuration:200,transitionTimingFunction:"ease",zIndex:wa("app"),mode:"fixed"},GL=(e,{transitionDuration:n,transitionTimingFunction:t})=>({root:{"--app-shell-transition-duration":`${n}ms`,"--app-shell-transition-timing-function":t}}),yr=De(e=>{const n=ke("AppShell",KJ,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,navbar:f,withBorder:c,padding:h,transitionDuration:d,transitionTimingFunction:p,header:v,zIndex:b,layout:w,disabled:k,aside:_,footer:x,offsetScrollbars:C=!0,mode:T,mod:O,attributes:E,id:M,...N}=n,F=Qe({name:"AppShell",classes:ul,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:E,vars:l,varsResolver:GL}),R=YJ({disabled:k,transitionDuration:d}),L=Qi(M);return y.jsxs(BJ,{value:{getStyles:F,withBorder:c,zIndex:b,disabled:k,offsetScrollbars:C,mode:T},children:[y.jsx(GJ,{navbar:f,header:v,aside:_,footer:x,padding:h,mode:T,selector:T==="static"?`#${L}`:void 0}),y.jsx(ye,{...F("root"),id:L,mod:[{resizing:R,layout:w,disabled:k,mode:T},O],...N})]})});yr.classes=ul;yr.varsResolver=GL;yr.displayName="@mantine/core/AppShell";yr.Navbar=J6;yr.Header=Z6;yr.Main=Q6;yr.Aside=K6;yr.Footer=X6;yr.Section=eC;function YL(e){return typeof e=="string"?{value:e,label:e}:typeof e=="object"&&"value"in e&&!("label"in e)?{value:e.value,label:`${e.value}`,disabled:e.disabled}:typeof e=="object"&&"group"in e?{group:e.group,items:e.items.map(n=>YL(n))}:typeof e=="number"||typeof e=="bigint"||typeof e=="boolean"?{value:e,label:`${e}`}:e}function hy(e){return e?e.map(n=>YL(n)):[]}function qm(e){return e.reduce((n,t)=>"group"in t?{...n,...qm(t.items)}:(n[`${t.value}`]=t,n),{})}var sr={dropdown:"m_88b62a41",search:"m_985517d8",options:"m_b2821a6e",option:"m_92253aa5",empty:"m_2530cd1d",header:"m_858f94bd",footer:"m_82b967cb",group:"m_254f3e4f",groupLabel:"m_2bb2e9e5",chevron:"m_2943220b",optionsDropdownOption:"m_390b5f4",optionsDropdownCheckIcon:"m_8ee53fc2",optionsDropdownCheckPlaceholder:"m_a530ee0a"};const XJ={error:null},KL=(e,{size:n,color:t})=>({chevron:{"--combobox-chevron-size":Rn(n,"combobox-chevron-size"),"--combobox-chevron-color":t?ot(t,e):void 0}}),my=De(e=>{const n=ke("ComboboxChevron",XJ,e),{size:t,error:i,style:r,className:a,classNames:o,styles:l,unstyled:f,vars:c,attributes:h,mod:d,...p}=n,v=Qe({name:"ComboboxChevron",classes:sr,props:n,style:r,className:a,classNames:o,styles:l,unstyled:f,vars:c,varsResolver:KL,attributes:h,rootSelector:"chevron"});return y.jsx(ye,{component:"svg",...p,...v("chevron"),size:t,viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",mod:["combobox-chevron",{error:i},d],children:y.jsx("path",{d:"M4.93179 5.43179C4.75605 5.60753 4.75605 5.89245 4.93179 6.06819C5.10753 6.24392 5.39245 6.24392 5.56819 6.06819L7.49999 4.13638L9.43179 6.06819C9.60753 6.24392 9.89245 6.24392 10.0682 6.06819C10.2439 5.89245 10.2439 5.60753 10.0682 5.43179L7.81819 3.18179C7.73379 3.0974 7.61933 3.04999 7.49999 3.04999C7.38064 3.04999 7.26618 3.0974 7.18179 3.18179L4.93179 5.43179ZM10.0682 9.56819C10.2439 9.39245 10.2439 9.10753 10.0682 8.93179C9.89245 8.75606 9.60753 8.75606 9.43179 8.93179L7.49999 10.8636L5.56819 8.93179C5.39245 8.75606 5.10753 8.75606 4.93179 8.93179C4.75605 9.10753 4.75605 9.39245 4.93179 9.56819L7.18179 11.8182C7.35753 11.9939 7.64245 11.9939 7.81819 11.8182L10.0682 9.56819Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})})});my.classes=sr;my.varsResolver=KL;my.displayName="@mantine/core/ComboboxChevron";const[ZJ,Sa]=ba("Combobox component was not found in tree");function XL({onMouseDown:e,onClick:n,onClear:t,...i}){return y.jsx(It.ClearButton,{tabIndex:-1,"aria-hidden":!0,...i,onMouseDown:r=>{r.preventDefault(),e==null||e(r)},onClick:r=>{t(),n==null||n(r)}})}XL.displayName="@mantine/core/ComboboxClearButton";const nC=De(e=>{const{classNames:n,styles:t,className:i,style:r,hidden:a,...o}=ke("ComboboxDropdown",null,e),l=Sa();return y.jsx(En.Dropdown,{...o,role:"presentation","data-hidden":a||void 0,...l.getStyles("dropdown",{className:i,style:r,classNames:n,styles:t})})});nC.classes=sr;nC.displayName="@mantine/core/ComboboxDropdown";const QJ={refProp:"ref"},ZL=De(e=>{const{children:n,refProp:t,ref:i}=ke("ComboboxDropdownTarget",QJ,e);if(Sa(),!k6(n))throw new Error("Combobox.DropdownTarget component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported");return y.jsx(En.Target,{ref:i,refProp:t,children:n})});ZL.displayName="@mantine/core/ComboboxDropdownTarget";const tC=De(e=>{const{classNames:n,className:t,style:i,styles:r,vars:a,...o}=ke("ComboboxEmpty",null,e);return y.jsx(ye,{...Sa().getStyles("empty",{className:t,classNames:n,styles:r,style:i}),...o})});tC.classes=sr;tC.displayName="@mantine/core/ComboboxEmpty";function iC({onKeyDown:e,onClick:n,withKeyboardNavigation:t,withAriaAttributes:i,withExpandedAttribute:r,targetType:a,autoComplete:o}){const l=Sa(),[f,c]=A.useState(null),h=v=>{if(e==null||e(v),!l.readOnly&&t){if(v.nativeEvent.isComposing)return;if(v.nativeEvent.code==="ArrowDown"&&(v.preventDefault(),l.store.dropdownOpened?c(l.store.selectNextOption()):(l.store.openDropdown("keyboard"),c(l.store.selectActiveOption()),l.store.updateSelectedOptionIndex("selected",{scrollIntoView:!0}))),v.nativeEvent.code==="ArrowUp"&&(v.preventDefault(),l.store.dropdownOpened?c(l.store.selectPreviousOption()):(l.store.openDropdown("keyboard"),c(l.store.selectActiveOption()),l.store.updateSelectedOptionIndex("selected",{scrollIntoView:!0}))),v.nativeEvent.code==="Enter"||v.nativeEvent.code==="NumpadEnter"){if(v.nativeEvent.keyCode===229)return;const b=l.store.getSelectedOptionIndex();l.store.dropdownOpened&&b!==-1?(v.preventDefault(),l.store.clickSelectedOption()):a==="button"&&(v.preventDefault(),l.store.openDropdown("keyboard"))}v.key==="Escape"&&l.store.closeDropdown("keyboard"),v.nativeEvent.code==="Space"&&a==="button"&&(v.preventDefault(),l.store.toggleDropdown("keyboard"))}};return{...i?{...r?{role:"combobox"}:{},"aria-haspopup":"listbox","aria-expanded":r?!!(l.store.listId&&l.store.dropdownOpened):void 0,"aria-controls":l.store.dropdownOpened&&l.store.listId?l.store.listId:void 0,"aria-activedescendant":l.store.dropdownOpened&&f||void 0,autoComplete:o,"data-expanded":l.store.dropdownOpened||void 0,"data-mantine-stop-propagation":l.store.dropdownOpened||void 0}:{},onKeyDown:h,onClick:v=>{a==="button"&&v.currentTarget.focus(),n==null||n(v)}}}const JJ={refProp:"ref",targetType:"input",withKeyboardNavigation:!0,withAriaAttributes:!0,withExpandedAttribute:!1,autoComplete:"off"},QL=De(e=>{const{children:n,refProp:t,withKeyboardNavigation:i,withAriaAttributes:r,withExpandedAttribute:a,targetType:o,autoComplete:l,ref:f,...c}=ke("ComboboxEventsTarget",JJ,e),h=Su(n);if(!h)throw new Error("Combobox.EventsTarget component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported");const d=Sa();return A.cloneElement(h,{...iC({targetType:o,withAriaAttributes:r,withKeyboardNavigation:i,withExpandedAttribute:a,onKeyDown:h.props.onKeyDown,onClick:h.props.onClick,autoComplete:l}),...c,[t]:Bt(f,d.store.targetRef,X1(h))})});QL.displayName="@mantine/core/ComboboxEventsTarget";const rC=De(e=>{const{classNames:n,className:t,style:i,styles:r,vars:a,...o}=ke("ComboboxFooter",null,e);return y.jsx(ye,{...Sa().getStyles("footer",{className:t,classNames:n,style:i,styles:r}),...o,onMouseDown:l=>{l.preventDefault()}})});rC.classes=sr;rC.displayName="@mantine/core/ComboboxFooter";const aC=De(e=>{const{classNames:n,className:t,style:i,styles:r,vars:a,children:o,label:l,id:f,...c}=ke("ComboboxGroup",null,e),h=Sa(),d=Qi(f);return y.jsxs(ye,{role:"group","aria-labelledby":l?d:void 0,...h.getStyles("group",{className:t,classNames:n,style:i,styles:r}),...c,children:[l&&y.jsx("div",{id:d,...h.getStyles("groupLabel",{classNames:n,styles:r}),children:l}),o]})});aC.classes=sr;aC.displayName="@mantine/core/ComboboxGroup";const oC=De(e=>{const{classNames:n,className:t,style:i,styles:r,vars:a,...o}=ke("ComboboxHeader",null,e);return y.jsx(ye,{...Sa().getStyles("header",{className:t,classNames:n,style:i,styles:r}),...o,onMouseDown:l=>{l.preventDefault()}})});oC.classes=sr;oC.displayName="@mantine/core/ComboboxHeader";function JL({value:e,valuesDivider:n=",",...t}){return y.jsx("input",{type:"hidden",value:Array.isArray(e)?e.join(n):e?`${e}`:"",...t})}JL.displayName="@mantine/core/ComboboxHiddenInput";const sC=De(e=>{const n=ke("ComboboxOption",null,e),{classNames:t,className:i,style:r,styles:a,vars:o,onClick:l,id:f,active:c,onMouseDown:h,onMouseOver:d,disabled:p,selected:v,mod:b,...w}=n,k=Sa(),_=A.useId(),x=f||_;return y.jsx(ye,{...k.getStyles("option",{className:i,classNames:t,styles:a,style:r}),...w,id:x,mod:["combobox-option",{"combobox-active":c,"combobox-disabled":p,"combobox-selected":v},b],role:"option",onClick:C=>{var T;p?C.preventDefault():((T=k.onOptionSubmit)==null||T.call(k,n.value,n),l==null||l(C))},onMouseDown:C=>{C.preventDefault(),h==null||h(C)},onMouseOver:C=>{k.resetSelectionOnOptionHover&&k.store.resetSelectedOption(),d==null||d(C)}})});sC.classes=sr;sC.displayName="@mantine/core/ComboboxOption";const lC=De(e=>{const{classNames:n,className:t,style:i,styles:r,id:a,onMouseDown:o,labelledBy:l,...f}=ke("ComboboxOptions",null,e),c=Sa(),h=Qi(a);return A.useEffect(()=>{c.store.setListId(h)},[h]),y.jsx(ye,{...c.getStyles("options",{className:t,style:i,classNames:n,styles:r}),...f,id:h,role:"listbox","aria-labelledby":l,onMouseDown:d=>{d.preventDefault(),o==null||o(d)}})});lC.classes=sr;lC.displayName="@mantine/core/ComboboxOptions";const eee={withAriaAttributes:!0,withKeyboardNavigation:!0},uC=De(e=>{const{classNames:n,styles:t,unstyled:i,vars:r,withAriaAttributes:a,onKeyDown:o,onClick:l,withKeyboardNavigation:f,size:c,ref:h,...d}=ke("ComboboxSearch",eee,e),p=Sa(),v=p.getStyles("search"),b=iC({targetType:"input",withAriaAttributes:a,withKeyboardNavigation:f,withExpandedAttribute:!1,onKeyDown:o,onClick:l,autoComplete:"off"});return y.jsx(It,{ref:Bt(h,p.store.searchRef),classNames:[{input:v.className},n],styles:[{input:v.style},t],size:c||p.size,...b,...d,__staticSelector:"Combobox"})});uC.classes=sr;uC.displayName="@mantine/core/ComboboxSearch";const nee={refProp:"ref",targetType:"input",withKeyboardNavigation:!0,withAriaAttributes:!0,withExpandedAttribute:!1,autoComplete:"off"},eI=De(e=>{const{children:n,refProp:t,withKeyboardNavigation:i,withAriaAttributes:r,withExpandedAttribute:a,targetType:o,autoComplete:l,ref:f,...c}=ke("ComboboxTarget",nee,e),h=Su(n);if(!h)throw new Error("Combobox.Target component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported");const d=Sa(),p=A.cloneElement(h,{...iC({targetType:o,withAriaAttributes:r,withKeyboardNavigation:i,withExpandedAttribute:a,onKeyDown:h.props.onKeyDown,onClick:h.props.onClick,autoComplete:l}),...c});return y.jsx(En.Target,{refProp:t,ref:Bt(f,d.store.targetRef),children:p})});eI.displayName="@mantine/core/ComboboxTarget";function tee(e,n,t){for(let i=e-1;i>=0;i-=1)if(!n[i].hasAttribute("data-combobox-disabled"))return i;if(t){for(let i=n.length-1;i>-1;i-=1)if(!n[i].hasAttribute("data-combobox-disabled"))return i}return e}function iee(e,n,t){for(let i=e+1;i{l||(f(!0),r==null||r(P))},[f,r,l]),_=A.useCallback((P="unknown")=>{l&&(f(!1),i==null||i(P))},[f,i,l]),x=A.useCallback((P="unknown")=>{l?_(P):k(P)},[_,k,l]),C=A.useCallback(()=>{const P=Lo(p.current),z=ag(`#${c.current} [data-combobox-selected]`,P);z==null||z.removeAttribute("data-combobox-selected"),z==null||z.removeAttribute("aria-selected")},[]),T=A.useCallback(P=>{const z=Lo(p.current),q=ag(`#${c.current}`,z),Y=q?qo("[data-combobox-option]",q):null;if(!Y)return null;const D=P>=Y.length?0:P<0?Y.length-1:P;return h.current=D,Y!=null&&Y[D]&&!Y[D].hasAttribute("data-combobox-disabled")?(C(),Y[D].setAttribute("data-combobox-selected","true"),Y[D].setAttribute("aria-selected","true"),Y[D].scrollIntoView({block:"nearest",behavior:o}),Y[D].id):null},[o,C]),O=A.useCallback(()=>{const P=Lo(p.current),z=ag(`#${c.current} [data-combobox-active]`,P);return T(z?qo(`#${c.current} [data-combobox-option]`,P).findIndex(q=>q===z):0)},[T]),E=A.useCallback(()=>{const P=Lo(p.current),z=qo(`#${c.current} [data-combobox-option]`,P);return T(iee(h.current,z,a))},[T,a]),M=A.useCallback(()=>{const P=Lo(p.current),z=qo(`#${c.current} [data-combobox-option]`,P);return T(tee(h.current,z,a))},[T,a]),N=A.useCallback(()=>{const P=Lo(p.current);return T(ree(qo(`#${c.current} [data-combobox-option]`,P)))},[T]),F=A.useCallback((P="selected",z)=>{var q;if(typeof P=="number"){h.current=P;const Y=Lo(p.current),D=qo(`#${c.current} [data-combobox-option]`,Y);z!=null&&z.scrollIntoView&&((q=D[P])==null||q.scrollIntoView({block:"nearest",behavior:o}));return}w.current=window.setTimeout(()=>{var W;const Y=Lo(p.current),D=qo(`#${c.current} [data-combobox-option]`,Y),V=D.findIndex($=>$.hasAttribute(`data-combobox-${P}`));h.current=V,z!=null&&z.scrollIntoView&&((W=D[V])==null||W.scrollIntoView({block:"nearest",behavior:o}))},0)},[]),R=A.useCallback(()=>{h.current=-1,C()},[C]),L=A.useCallback(()=>{var z,q;const P=Lo(p.current);(q=(z=qo(`#${c.current} [data-combobox-option]`,P))==null?void 0:z[h.current])==null||q.click()},[]),B=A.useCallback(P=>{c.current=P},[]),G=A.useCallback(()=>{v.current=window.setTimeout(()=>{var P;return(P=d.current)==null?void 0:P.focus()},0)},[]),U=A.useCallback(()=>{b.current=window.setTimeout(()=>{var P;return(P=p.current)==null?void 0:P.focus()},0)},[]),H=A.useCallback(()=>h.current,[]);return A.useEffect(()=>()=>{window.clearTimeout(v.current),window.clearTimeout(b.current),window.clearTimeout(w.current)},[]),{dropdownOpened:l,openDropdown:k,closeDropdown:_,toggleDropdown:x,selectedOptionIndex:h.current,getSelectedOptionIndex:H,selectOption:T,selectFirstOption:N,selectActiveOption:O,selectNextOption:E,selectPreviousOption:M,resetSelectedOption:R,updateSelectedOptionIndex:F,listId:c.current,setListId:B,clickSelectedOption:L,searchRef:d,focusSearchInput:G,targetRef:p,focusTarget:U}}const aee={keepMounted:!0,withinPortal:!0,resetSelectionOnOptionHover:!1,width:"target",transitionProps:{transition:"fade",duration:0},size:"sm"},nI=(e,{size:n,dropdownPadding:t})=>({options:{"--combobox-option-fz":ei(n),"--combobox-option-padding":Rn(n,"combobox-option-padding")},dropdown:{"--combobox-padding":t===void 0?void 0:pe(t),"--combobox-option-fz":ei(n),"--combobox-option-padding":Rn(n,"combobox-option-padding")}}),Tn=e=>{const n=ke("Combobox",aee,e),{classNames:t,styles:i,unstyled:r,children:a,store:o,vars:l,onOptionSubmit:f,onClose:c,size:h,dropdownPadding:d,resetSelectionOnOptionHover:p,__staticSelector:v,readOnly:b,attributes:w,...k}=n,_=Hm(),x=o||_,C=Qe({name:v||"Combobox",classes:sr,props:n,classNames:t,styles:i,unstyled:r,attributes:w,vars:l,varsResolver:nI}),T=()=>{c==null||c(),x.closeDropdown()};return y.jsx(ZJ,{value:{getStyles:C,store:x,onOptionSubmit:f,size:h,resetSelectionOnOptionHover:p,readOnly:b},children:y.jsx(En,{opened:x.dropdownOpened,preventPositionChangeWhenVisible:!1,...k,onChange:O=>!O&&T(),withRoles:!1,unstyled:r,children:a})})},oee=e=>e;Tn.extend=oee;Tn.classes=sr;Tn.varsResolver=nI;Tn.displayName="@mantine/core/Combobox";Tn.Target=eI;Tn.Dropdown=nC;Tn.Options=lC;Tn.Option=sC;Tn.Search=uC;Tn.Empty=tC;Tn.Chevron=my;Tn.Footer=rC;Tn.Header=oC;Tn.EventsTarget=QL;Tn.DropdownTarget=ZL;Tn.Group=aC;Tn.ClearButton=XL;Tn.HiddenInput=JL;function see({children:e,role:n}){const t=A.use(Eu);return t?y.jsx("div",{role:n,"aria-labelledby":t.labelId,"aria-describedby":t.describedBy,children:e}):y.jsx(y.Fragment,{children:e})}const fC=A.createContext(null),lee={hiddenInputValuesSeparator:","},cC=J1((e=>{const{value:n,defaultValue:t,onChange:i,size:r,wrapperProps:a,children:o,readOnly:l,name:f,hiddenInputValuesSeparator:c,hiddenInputProps:h,maxSelectedValues:d,disabled:p,...v}=ke("CheckboxGroup",lee,e),[b,w]=Mi({value:n,defaultValue:t,finalValue:[],onChange:i}),k=C=>{const T=typeof C=="string"?C:C.currentTarget.value;if(l)return;const O=b.includes(T);!O&&d&&b.length>=d||w(O?b.filter(E=>E!==T):[...b,T])},_=C=>{if(p)return!0;if(!d)return!1;const T=b.includes(C),O=b.length>=d;return!T&&O},x=b.join(c);return y.jsx(fC,{value:{value:b,onChange:k,size:r,isDisabled:_},children:y.jsxs(It.Wrapper,{size:r,...a,...v,labelElement:"div",__staticSelector:"CheckboxGroup",children:[y.jsx(see,{role:"group",children:o}),y.jsx("input",{type:"hidden",name:f,value:x,...h})]})})}));cC.classes=It.Wrapper.classes;cC.displayName="@mantine/core/CheckboxGroup";var tI={card:"m_26775b0a"};const iI=A.createContext(null),uee={withBorder:!0},rI=(e,{radius:n})=>({card:{"--card-radius":Gt(n)}}),py=De(e=>{const n=ke("CheckboxCard",uee,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,checked:f,mod:c,withBorder:h,value:d,onClick:p,defaultChecked:v,onChange:b,attributes:w,...k}=n,_=Qe({name:"CheckboxCard",classes:tI,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:w,vars:l,varsResolver:rI,rootSelector:"card"}),x=A.use(fC),[C,T]=Mi({value:typeof f=="boolean"?f:x?x.value.includes(d||""):void 0,defaultValue:v,finalValue:!1,onChange:b});return y.jsx(iI,{value:{checked:C},children:y.jsx(pi,{mod:[{"with-border":h,checked:C},c],..._("card"),...k,role:"checkbox","aria-checked":C,onClick:O=>{p==null||p(O),x==null||x.onChange(d||""),T(!C)}})})});py.displayName="@mantine/core/CheckboxCard";py.classes=tI;py.varsResolver=rI;function dC({size:e,style:n,...t}){return y.jsx("svg",{viewBox:"0 0 10 7",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:e!==void 0?{width:pe(e),height:pe(e),...n}:n,"aria-hidden":!0,...t,children:y.jsx("path",{d:"M4 4.586L1.707 2.293A1 1 0 1 0 .293 3.707l3 3a.997.997 0 0 0 1.414 0l5-5A1 1 0 1 0 8.293.293L4 4.586z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})})}function aI({indeterminate:e,...n}){return e?y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 32 6","aria-hidden":!0,...n,children:y.jsx("rect",{width:"32",height:"6",fill:"currentColor",rx:"3"})}):y.jsx(dC,{...n})}var oI={indicator:"m_5e5256ee",icon:"m_1b1c543a","indicator--outline":"m_76e20374"};const fee={icon:aI,variant:"filled",radius:"sm"},sI=(e,{radius:n,color:t,size:i,iconColor:r,variant:a,autoContrast:o})=>{const l=ls({color:t||e.primaryColor,theme:e}),f=l.isThemeColor&&l.shade===void 0?`var(--mantine-color-${l.color}-outline)`:l.color;return{indicator:{"--checkbox-size":Rn(i,"checkbox-size"),"--checkbox-radius":n===void 0?void 0:Gt(n),"--checkbox-color":a==="outline"?f:ot(t,e),"--checkbox-icon-color":r?ot(r,e):Z1(o,e)?Dm({color:t,theme:e,autoContrast:o}):void 0}}},vy=De(e=>{const n=ke("CheckboxIndicator",fee,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,icon:f,indeterminate:c,radius:h,color:d,iconColor:p,autoContrast:v,checked:b,mod:w,variant:k,disabled:_,attributes:x,...C}=n,T=Qe({name:"CheckboxIndicator",classes:oI,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:x,vars:l,varsResolver:sI,rootSelector:"indicator"}),O=A.use(iI),E=typeof b=="boolean"||typeof c=="boolean"?b||c:(O==null?void 0:O.checked)||!1;return y.jsx(ye,{...T("indicator",{variant:k}),variant:k,mod:[{checked:E,disabled:_},w],...C,children:y.jsx(f,{indeterminate:c,...T("icon")})})});vy.displayName="@mantine/core/CheckboxIndicator";vy.classes=oI;vy.varsResolver=sI;var lI={root:"m_5f75b09e",body:"m_5f6e695e",labelWrapper:"m_d3ea56bb",label:"m_8ee546b8",description:"m_328f68c0",error:"m_8e8a99cc"};const cee=lI;function uI({__staticSelector:e,__stylesApiProps:n,className:t,classNames:i,styles:r,unstyled:a,children:o,label:l,description:f,id:c,disabled:h,error:d,size:p,labelPosition:v="left",bodyElement:b="div",labelElement:w="label",variant:k,style:_,vars:x,mod:C,attributes:T,...O}){const E=Qe({name:e,props:n,className:t,style:_,classes:lI,classNames:i,styles:r,unstyled:a,attributes:T});return y.jsx(ye,{...E("root"),__vars:{"--label-fz":ei(p),"--label-lh":Rn(p,"label-lh")},mod:[{"label-position":v},C],variant:k,size:p,...O,children:y.jsxs(ye,{component:b,htmlFor:b==="label"?c:void 0,...E("body"),children:[o,y.jsxs("div",{...E("labelWrapper"),"data-disabled":h||void 0,children:[l&&y.jsx(ye,{component:w,htmlFor:w==="label"?c:void 0,...E("label"),"data-disabled":h||void 0,children:l}),f&&y.jsx(It.Description,{size:p,__inheritStyles:!1,...E("description"),children:f}),d&&typeof d!="boolean"&&y.jsx(It.Error,{size:p,__inheritStyles:!1,...E("error"),children:d})]})]})})}uI.displayName="@mantine/core/InlineInput";var fI={root:"m_bf2d988c",inner:"m_26062bec",input:"m_26063560",icon:"m_bf295423","input--outline":"m_215c4542"};const dee={labelPosition:"right",icon:aI,withErrorStyles:!0,variant:"filled",radius:"sm"},cI=(e,{radius:n,color:t,size:i,iconColor:r,variant:a,autoContrast:o})=>{const l=ls({color:t||e.primaryColor,theme:e}),f=l.isThemeColor&&l.shade===void 0?`var(--mantine-color-${l.color}-outline)`:l.color;return{root:{"--checkbox-size":Rn(i,"checkbox-size"),"--checkbox-radius":n===void 0?void 0:Gt(n),"--checkbox-color":a==="outline"?f:ot(t,e),"--checkbox-icon-color":r?ot(r,e):Z1(o,e)?Dm({color:t,theme:e,autoContrast:o}):void 0}}},al=De(e=>{var se;const n=ke("Checkbox",dee,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,color:f,label:c,id:h,size:d,radius:p,wrapperProps:v,checked:b,labelPosition:w,description:k,error:_,disabled:x,variant:C,indeterminate:T,icon:O,rootRef:E,iconColor:M,onChange:N,autoContrast:F,mod:R,attributes:L,readOnly:B,onClick:G,withErrorStyles:U,ref:H,...P}=n,z=A.useRef(null),q=A.use(fC),Y=d||(q==null?void 0:q.size),D=Qe({name:"Checkbox",props:n,classes:fI,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:L,vars:l,varsResolver:cI}),{styleProps:V,rest:W}=Cu(P),$=Qi(h),X={checked:(q==null?void 0:q.value.includes(W.value))??b,onChange:ge=>{q==null||q.onChange(ge),N==null||N(ge)}},ee=((se=q==null?void 0:q.isDisabled)==null?void 0:se.call(q,W.value))??!1,re=x||ee;return A.useEffect(()=>{z.current&&(z.current.indeterminate=T||!1,T?z.current.setAttribute("data-indeterminate","true"):z.current.removeAttribute("data-indeterminate"))},[T]),y.jsx(uI,{...D("root"),__staticSelector:"Checkbox",__stylesApiProps:n,id:$,size:Y,labelPosition:w,label:c,description:k,error:_,disabled:re,classNames:t,styles:a,unstyled:o,"data-checked":X.checked||b||void 0,variant:C,ref:E,mod:R,attributes:L,inert:W.inert,...V,...v,children:y.jsxs(ye,{...D("inner"),mod:{"data-label-position":w},children:[y.jsx(ye,{component:"input",id:$,ref:Bt(z,H),mod:{error:!!_},...D("input",{focusable:!0,variant:C}),...W,...X,disabled:re,inert:W.inert,type:"checkbox",onClick:ge=>{B&&ge.preventDefault(),G==null||G(ge)}}),y.jsx(O,{indeterminate:T,...D("icon")})]})})});al.classes={...fI,...cee};al.varsResolver=cI;al.displayName="@mantine/core/Checkbox";al.Group=cC;al.Indicator=vy;al.Card=py;function hu(e){return"group"in e}function dI({options:e,search:n,limit:t}){const i=n.trim().toLowerCase(),r=[];for(let a=0;a0)return!1;return!0}function hI(e,n=new Set){if(Array.isArray(e))for(const t of e)if(hu(t))hI(t.items,n);else{if(typeof t.value>"u")throw new Error("[@mantine/core] Each option must have value property");if(n.has(t.value))throw new Error(`[@mantine/core] Duplicate options are not supported. Option with value "${t.value}" was provided more than once`);n.add(t.value)}}function mee(e,n){return Array.isArray(e)?e.includes(n):e===n}function mI({data:e,withCheckIcon:n,withAlignedLabels:t,value:i,checkIconPosition:r,unstyled:a,renderOption:o}){if(!hu(e)){const f=mee(i,e.value),c=n&&(f?y.jsx(dC,{className:sr.optionsDropdownCheckIcon}):t?y.jsx("div",{className:sr.optionsDropdownCheckPlaceholder}):null),h=y.jsxs(y.Fragment,{children:[r==="left"&&c,y.jsx("span",{children:e.label}),r==="right"&&c]});return y.jsx(Tn.Option,{value:e.value,disabled:e.disabled,className:dn({[sr.optionsDropdownOption]:!a}),"data-reverse":r==="right"||void 0,"data-checked":f||void 0,"aria-selected":f,active:f,children:typeof o=="function"?o({option:e,checked:f}):h})}const l=e.items.map(f=>y.jsx(mI,{data:f,value:i,unstyled:a,withCheckIcon:n,withAlignedLabels:t,checkIconPosition:r,renderOption:o},`${f.value}`));return y.jsx(Tn.Group,{label:e.group,children:l})}function gy({data:e,hidden:n,hiddenWhenEmpty:t,filter:i,search:r,limit:a,maxDropdownHeight:o,withScrollArea:l=!0,filterOptions:f=!0,withCheckIcon:c=!1,withAlignedLabels:h=!1,value:d,checkIconPosition:p,nothingFoundMessage:v,unstyled:b,labelId:w,renderOption:k,scrollAreaProps:_,"aria-label":x}){hI(e);const C=typeof r=="string"?(i||dI)({options:e,search:f?r:"",limit:a??1/0}):e,T=hee(C),O=C.map(E=>y.jsx(mI,{data:E,withCheckIcon:c,withAlignedLabels:h,value:d,checkIconPosition:p,unstyled:b,renderOption:k},hu(E)?E.group:`${E.value}`));return y.jsx(Tn.Dropdown,{hidden:n||t&&T,"data-composed":!0,children:y.jsxs(Tn.Options,{labelledBy:w,"aria-label":x,children:[l?y.jsx(Ua.Autosize,{mah:o??220,type:"scroll",scrollbarSize:"var(--combobox-padding)",offsetScrollbars:"y",..._,children:O}):O,T&&v&&y.jsx(Tn.Empty,{children:v})]})})}const yy=De(e=>{const n=ke("Autocomplete",{size:"sm"},e),{classNames:t,styles:i,unstyled:r,vars:a,dropdownOpened:o,defaultDropdownOpened:l,onDropdownClose:f,onDropdownOpen:c,onFocus:h,onBlur:d,onClick:p,onChange:v,data:b,value:w,defaultValue:k,selectFirstOptionOnChange:_,selectFirstOptionOnDropdownOpen:x,onOptionSubmit:C,comboboxProps:T,readOnly:O,disabled:E,filter:M,limit:N,withScrollArea:F,maxDropdownHeight:R,size:L,id:B,renderOption:G,autoComplete:U,scrollAreaProps:H,onClear:P,clearButtonProps:z,error:q,clearable:Y,clearSectionMode:D,rightSection:V,autoSelectOnBlur:W,openOnFocus:$=!0,attributes:X,...ee}=n,re=Qi(B),se=hy(b),ge=qm(se),[ae,le]=Mi({value:w,defaultValue:k,finalValue:"",onChange:v}),_e=Hm({opened:o,defaultOpened:l,onDropdownOpen:()=>{c==null||c(),x&&_e.selectFirstOption()},onDropdownClose:()=>{f==null||f(),setTimeout(_e.resetSelectedOption,0)}}),ne=Pe=>{le(Pe),_e.resetSelectedOption()},{resolvedClassNames:$e,resolvedStyles:be}=qi({props:n,styles:i,classNames:t});A.useEffect(()=>{_&&_e.selectFirstOption()},[_,ae]);const Ce=y.jsx(Tn.ClearButton,{...z,onClear:()=>{ne(""),P==null||P()}});return y.jsxs(Tn,{store:_e,__staticSelector:"Autocomplete",classNames:$e,styles:be,unstyled:r,readOnly:O,size:L,attributes:X,keepMounted:W,onOptionSubmit:Pe=>{C==null||C(Pe),ne(ge[Pe].label),_e.closeDropdown()},...T,children:[y.jsx(Tn.Target,{autoComplete:U,withExpandedAttribute:!0,children:y.jsx(Ui,{...ee,size:L,__staticSelector:"Autocomplete",__clearSection:Ce,__clearable:Y&&!!ae&&!E&&!O,__clearSectionMode:D,rightSection:V,disabled:E,readOnly:O,value:ae,error:q,onChange:Pe=>{ne(Pe.currentTarget.value),_e.openDropdown(),_&&_e.selectFirstOption()},onFocus:Pe=>{$&&_e.openDropdown(),h==null||h(Pe)},onBlur:Pe=>{W&&_e.clickSelectedOption(),_e.closeDropdown(),d==null||d(Pe)},onClick:Pe=>{_e.openDropdown(),p==null||p(Pe)},classNames:$e,styles:be,unstyled:r,attributes:X,id:re})}),y.jsx(gy,{data:se,hidden:O||E,filter:M,search:ae,limit:N,hiddenWhenEmpty:!0,withScrollArea:F,maxDropdownHeight:R,unstyled:r,labelId:ee.label?`${re}-label`:void 0,"aria-label":ee.label?void 0:ee["aria-label"],renderOption:G,scrollAreaProps:H})]})});yy.classes={...Ui.classes,...Tn.classes};yy.displayName="@mantine/core/Autocomplete";var by={group:"m_11def92b",root:"m_f85678b6",image:"m_11f8ac07",placeholder:"m_104cd71f"};const pI=A.createContext({withinGroup:!1}),vI=(e,{spacing:n})=>({group:{"--ag-spacing":Ut(n)}}),wy=De(e=>{const n=ke("AvatarGroup",null,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,spacing:f,attributes:c,...h}=n;return y.jsx(pI,{value:{withinGroup:!0},children:y.jsx(ye,{...Qe({name:"AvatarGroup",classes:by,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:c,vars:l,varsResolver:vI,rootSelector:"group"})("group"),...h})})});wy.classes=by;wy.varsResolver=vI;wy.displayName="@mantine/core/AvatarGroup";function pee(e){return y.jsx("svg",{...e,"data-avatar-placeholder-icon":!0,viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:y.jsx("path",{d:"M0.877014 7.49988C0.877014 3.84219 3.84216 0.877045 7.49985 0.877045C11.1575 0.877045 14.1227 3.84219 14.1227 7.49988C14.1227 11.1575 11.1575 14.1227 7.49985 14.1227C3.84216 14.1227 0.877014 11.1575 0.877014 7.49988ZM7.49985 1.82704C4.36683 1.82704 1.82701 4.36686 1.82701 7.49988C1.82701 8.97196 2.38774 10.3131 3.30727 11.3213C4.19074 9.94119 5.73818 9.02499 7.50023 9.02499C9.26206 9.02499 10.8093 9.94097 11.6929 11.3208C12.6121 10.3127 13.1727 8.97172 13.1727 7.49988C13.1727 4.36686 10.6328 1.82704 7.49985 1.82704ZM10.9818 11.9787C10.2839 10.7795 8.9857 9.97499 7.50023 9.97499C6.01458 9.97499 4.71624 10.7797 4.01845 11.9791C4.97952 12.7272 6.18765 13.1727 7.49985 13.1727C8.81227 13.1727 10.0206 12.727 10.9818 11.9787ZM5.14999 6.50487C5.14999 5.207 6.20212 4.15487 7.49999 4.15487C8.79786 4.15487 9.84999 5.207 9.84999 6.50487C9.84999 7.80274 8.79786 8.85487 7.49999 8.85487C6.20212 8.85487 5.14999 7.80274 5.14999 6.50487ZM7.49999 5.10487C6.72679 5.10487 6.09999 5.73167 6.09999 6.50487C6.09999 7.27807 6.72679 7.90487 7.49999 7.90487C8.27319 7.90487 8.89999 7.27807 8.89999 6.50487C8.89999 5.73167 8.27319 5.10487 7.49999 5.10487Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})})}function vee(e){let n=0;for(let t=0;ti[0]).slice(0,n).join("").toUpperCase()}const gI=(e,{size:n,radius:t,variant:i,gradient:r,color:a,autoContrast:o,name:l,allowedInitialsColors:f})=>{const c=a==="initials"&&typeof l=="string"?yee(l,f):a,h=e.variantColorResolver({color:c||"gray",theme:e,gradient:r,variant:i||"light",autoContrast:o});return{root:{"--avatar-size":Rn(n,"avatar-size"),"--avatar-radius":t===void 0?void 0:Gt(t),"--avatar-bg":c||i?h.background:void 0,"--avatar-color":c||i?h.color:void 0,"--avatar-bd":c||i?h.border:void 0}}},ol=Hi(e=>{const n=ke("Avatar",null,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,src:f,alt:c,radius:h,color:d,gradient:p,imageProps:v,children:b,autoContrast:w,mod:k,name:_,allowedInitialsColors:x,attributes:C,...T}=n,O=A.use(pI),[E,M]=A.useState(!f),N=Qe({name:"Avatar",props:n,classes:by,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:C,vars:l,varsResolver:gI});return A.useEffect(()=>M(!f),[f]),y.jsx(ye,{...N("root"),mod:[{"within-group":O.withinGroup},k],...T,children:E||!f?y.jsx("span",{...N("placeholder"),title:c,children:b||typeof _=="string"&&bee(_)||y.jsx(pee,{})}):y.jsx("img",{...v,...N("image"),src:f,alt:c,onError:F=>{var R;M(!0),(R=v==null?void 0:v.onError)==null||R.call(v,F)}})})});ol.classes=by;ol.varsResolver=gI;ol.displayName="@mantine/core/Avatar";ol.Group=wy;var yI={root:"m_347db0ec","root--dot":"m_fbd81e3d",label:"m_5add502a",section:"m_91fdda9b"};const bI=(e,{radius:n,color:t,gradient:i,variant:r,size:a,autoContrast:o,circle:l})=>{const f=e.variantColorResolver({color:t||e.primaryColor,theme:e,gradient:i,variant:r||"filled",autoContrast:o});return{root:{"--badge-height":Rn(a,"badge-height"),"--badge-padding-x":Rn(a,"badge-padding-x"),"--badge-fz":Rn(a,"badge-fz"),"--badge-radius":l||n===void 0?void 0:Gt(n),"--badge-bg":t||r?f.background:void 0,"--badge-color":t||r?f.color:void 0,"--badge-bd":t||r?f.border:void 0,"--badge-dot-color":r==="dot"?ot(t,e):void 0}}},hi=Hi(e=>{const n=ke("Badge",null,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,radius:f,color:c,gradient:h,leftSection:d,rightSection:p,children:v,variant:b,fullWidth:w,autoContrast:k,circle:_,mod:x,attributes:C,...T}=n,O=Qe({name:"Badge",props:n,classes:yI,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:C,vars:l,varsResolver:bI});return y.jsxs(ye,{variant:b,mod:[{block:w,circle:_,"with-right-section":!!p,"with-left-section":!!d},x],...O("root",{variant:b}),...T,children:[d&&y.jsx("span",{...O("section"),"data-position":"left",children:d}),y.jsx("span",{...O("label"),children:v}),p&&y.jsx("span",{...O("section"),"data-position":"right",children:p})]})});hi.classes=yI;hi.varsResolver=bI;hi.displayName="@mantine/core/Badge";var jc={root:"m_77c9d27d",inner:"m_80f1301b",label:"m_811560b9",section:"m_a74036a",loader:"m_a25b86ee",group:"m_80d6d844",groupSection:"m_70be2a01"};const Y5={orientation:"horizontal"},wI=(e,{borderWidth:n})=>({group:{"--button-border-width":pe(n)}}),ky=De(e=>{const n=ke("ButtonGroup",Y5,e),{className:t,style:i,classNames:r,styles:a,unstyled:o,orientation:l,vars:f,borderWidth:c,mod:h,attributes:d,...p}=ke("ButtonGroup",Y5,e);return y.jsx(ye,{...Qe({name:"ButtonGroup",props:n,classes:jc,className:t,style:i,classNames:r,styles:a,unstyled:o,attributes:d,vars:f,varsResolver:wI,rootSelector:"group"})("group"),mod:[{"data-orientation":l},h],role:"group",...p})});ky.classes=jc;ky.varsResolver=wI;ky.displayName="@mantine/core/ButtonGroup";const kI=(e,{radius:n,color:t,gradient:i,variant:r,autoContrast:a,size:o})=>{const l=e.variantColorResolver({color:t||e.primaryColor,theme:e,gradient:i,variant:r||"filled",autoContrast:a});return{groupSection:{"--section-height":Rn(o,"section-height"),"--section-padding-x":Rn(o,"section-padding-x"),"--section-fz":o!=null&&o.includes("compact")?ei(o.replace("compact-","")):ei(o),"--section-radius":n===void 0?void 0:Gt(n),"--section-bg":t||r?l.background:void 0,"--section-color":l.color,"--section-bd":t||r?l.border:void 0}}},_y=De(e=>{const n=ke("ButtonGroupSection",null,e),{className:t,style:i,classNames:r,styles:a,unstyled:o,vars:l,gradient:f,radius:c,autoContrast:h,attributes:d,...p}=n;return y.jsx(ye,{...Qe({name:"ButtonGroupSection",props:n,classes:jc,className:t,style:i,classNames:r,styles:a,unstyled:o,attributes:d,vars:l,varsResolver:kI,rootSelector:"groupSection"})("groupSection"),...p})});_y.classes=jc;_y.varsResolver=kI;_y.displayName="@mantine/core/ButtonGroupSection";const wee={in:{opacity:1,transform:`translate(-50%, calc(-50% + ${pe(1)}))`},out:{opacity:0,transform:"translate(-50%, -200%)"},common:{transformOrigin:"center"},transitionProperty:"transform, opacity"},_I=(e,{radius:n,color:t,gradient:i,variant:r,size:a,justify:o,autoContrast:l})=>{const f=e.variantColorResolver({color:t||e.primaryColor,theme:e,gradient:i,variant:r||"filled",autoContrast:l});return{root:{"--button-justify":o,"--button-height":Rn(a,"button-height"),"--button-padding-x":Rn(a,"button-padding-x"),"--button-fz":a!=null&&a.includes("compact")?ei(a.replace("compact-","")):ei(a),"--button-radius":n===void 0?void 0:Gt(n),"--button-bg":t||r?f.background:void 0,"--button-hover":t||r?f.hover:void 0,"--button-color":f.color,"--button-bd":t||r?f.border:void 0,"--button-hover-color":t||r?f.hoverColor:void 0}}},Rt=Hi(e=>{const n=ke("Button",null,e),{style:t,vars:i,className:r,color:a,disabled:o,children:l,leftSection:f,rightSection:c,fullWidth:h,variant:d,radius:p,loading:v,loaderProps:b,gradient:w,classNames:k,styles:_,unstyled:x,"data-disabled":C,autoContrast:T,mod:O,attributes:E,...M}=n,N=Qe({name:"Button",props:n,classes:jc,className:r,style:t,classNames:k,styles:_,unstyled:x,attributes:E,vars:i,varsResolver:_I}),F=!!f,R=!!c;return y.jsxs(pi,{...N("root",{active:!o&&!v&&!C}),unstyled:x,variant:d,disabled:o||v,mod:[{disabled:o||C,loading:v,block:h,"with-left-section":F,"with-right-section":R},O],...M,children:[typeof v=="boolean"&&y.jsx(ts,{mounted:v,transition:wee,duration:150,children:L=>y.jsx(ye,{component:"span",...N("loader",{style:L}),"aria-hidden":!0,children:y.jsx(Fi,{color:"var(--button-color)",size:"calc(var(--button-height) / 1.8)",...b})})}),y.jsxs("span",{...N("inner"),children:[f&&y.jsx(ye,{component:"span",...N("section"),mod:{position:"left"},children:f}),y.jsx(ye,{component:"span",mod:{loading:v},...N("label"),children:l}),c&&y.jsx(ye,{component:"span",...N("section"),mod:{position:"right"},children:c})]})]})});Rt.classes=jc;Rt.varsResolver=_I;Rt.displayName="@mantine/core/Button";Rt.Group=ky;Rt.GroupSection=_y;var xI={root:"m_4451eb3a"};const Mc=Hi(e=>{const n=ke("Center",null,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,inline:f,mod:c,attributes:h,...d}=n,p=Qe({name:"Center",props:n,classes:xI,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:h,vars:l});return y.jsx(ye,{mod:[{inline:f},c],...p("root"),...d})});Mc.classes=xI;Mc.displayName="@mantine/core/Center";var SI={root:"m_de3d2490",colorOverlay:"m_862f3d1b",shadowOverlay:"m_98ae7f22",alphaOverlay:"m_95709ac0",childrenOverlay:"m_93e74e3"};const K5={withShadow:!0},CI=(e,{radius:n,size:t})=>({root:{"--cs-radius":n===void 0?void 0:Gt(n),"--cs-size":pe(t)}}),Dc=Hi(e=>{const n=ke("ColorSwatch",K5,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,color:f,radius:c,withShadow:h,children:d,attributes:p,...v}=ke("ColorSwatch",K5,n),b=Qe({name:"ColorSwatch",props:n,classes:SI,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:p,vars:l,varsResolver:CI});return y.jsxs(ye,{...b("root",{focusable:!0}),...v,children:[y.jsx("span",{...b("alphaOverlay")}),h&&y.jsx("span",{...b("shadowOverlay")}),y.jsx("span",{...b("colorOverlay",{style:{backgroundColor:f}})}),y.jsx("span",{...b("childrenOverlay"),children:d})]})});Dc.classes=SI;Dc.varsResolver=CI;Dc.displayName="@mantine/core/ColorSwatch";function ha(e,n=0,t=10**n){return Math.round(t*e)/t}function kee({h:e,s:n,l:t,a:i}){const r=n*((t<50?t:100-t)/100);return{h:e,s:r>0?2*r/(t+r)*100:0,v:t+r,a:i}}const _ee={grad:360/400,turn:360,rad:360/(Math.PI*2)};function xee(e,n="deg"){return Number(e)*(_ee[n]||1)}const See=/hsla?\(?\s*(-?\d*\.?\d+)(deg|rad|grad|turn)?[,\s]+(-?\d*\.?\d+)%?[,\s]+(-?\d*\.?\d+)%?,?\s*[/\s]*(-?\d*\.?\d+)?(%)?\s*\)?/i;function X5(e){const n=See.exec(e);return n?kee({h:xee(n[1],n[2]),s:Number(n[3]),l:Number(n[4]),a:n[5]===void 0?1:Number(n[5])/(n[6]?100:1)}):{h:0,s:0,v:0,a:1}}function dS({r:e,g:n,b:t,a:i}){const r=Math.max(e,n,t),a=r-Math.min(e,n,t),o=a?r===e?(n-t)/a:r===n?2+(t-e)/a:4+(e-n)/a:0;return{h:ha(60*(o<0?o+6:o),3),s:ha(r?a/r*100:0,3),v:ha(r/255*100,3),a:i}}function hS(e){const n=e[0]==="#"?e.slice(1):e;return n.length===3?dS({r:parseInt(n[0]+n[0],16),g:parseInt(n[1]+n[1],16),b:parseInt(n[2]+n[2],16),a:1}):dS({r:parseInt(n.slice(0,2),16),g:parseInt(n.slice(2,4),16),b:parseInt(n.slice(4,6),16),a:1})}function Cee(e){const n=e[0]==="#"?e.slice(1):e,t=a=>ha(parseInt(a,16)/255,3);if(n.length===4){const a=n.slice(0,3),o=t(n[3]+n[3]);return{...hS(a),a:o}}const i=n.slice(0,6),r=t(n.slice(6,8));return{...hS(i),a:r}}const Aee=/rgba?\(?\s*(-?\d*\.?\d+)(%)?[,\s]+(-?\d*\.?\d+)(%)?[,\s]+(-?\d*\.?\d+)(%)?,?\s*[/\s]*(-?\d*\.?\d+)?(%)?\s*\)?/i;function Z5(e){const n=Aee.exec(e);return n?dS({r:Number(n[1])/(n[2]?100/255:1),g:Number(n[3])/(n[4]?100/255:1),b:Number(n[5])/(n[6]?100/255:1),a:n[7]===void 0?1:Number(n[7])/(n[8]?100:1)}):{h:0,s:0,v:0,a:1}}const AI={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},Oee={hex:hS,hexa:Cee,rgb:Z5,rgba:Z5,hsl:X5,hsla:X5};function Eee(e){for(const[,n]of Object.entries(AI))if(n.test(e))return!0;return!1}function Rv(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 n=e.trim();for(const[t,i]of Object.entries(AI))if(i.test(n))return Oee[t](n);return{h:0,s:0,v:0,a:1}}const xy=A.createContext(null);function hC({position:e,...n}){return y.jsx(ye,{__vars:{"--thumb-y-offset":`${e.y*100}%`,"--thumb-x-offset":`${e.x*100}%`},...n})}hC.displayName="@mantine/core/ColorPickerThumb";var Sy={wrapper:"m_fee9c77",preview:"m_9dddfbac",body:"m_bffecc3e",sliders:"m_3283bb96",thumb:"m_40d572ba",swatch:"m_d8ee6fd8",swatches:"m_5711e686",saturation:"m_202a296e",saturationOverlay:"m_11b3db02",slider:"m_d856d47d",sliderOverlay:"m_8f327113"};const Rc=De(e=>{var q;const n=ke("ColorSlider",null,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,onChange:f,onChangeEnd:c,maxValue:h,round:d,size:p="md",focusable:v=!0,value:b,overlays:w,thumbColor:k="transparent",onScrubStart:_,onScrubEnd:x,__staticSelector:C="ColorPicker",attributes:T,ref:O,...E}=n,M=Qe({name:C,classes:Sy,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:T,rootSelector:"slider"}),N=((q=A.use(xy))==null?void 0:q.getStyles)||M,F=oi(),[R,L]=A.useState({y:0,x:b/h}),B=A.useRef(R),G=Y=>d?Math.round(Y*h):Y*h,{ref:U}=rz(({x:Y,y:D})=>{B.current={x:Y,y:D},f==null||f(G(Y))},{onScrubEnd:()=>{const{x:Y}=B.current;c==null||c(G(Y)),x==null||x()},onScrubStart:_});es(()=>{L({y:0,x:b/h})},[b]);const H=(Y,D)=>{Y.preventDefault();const V=iz(D);f==null||f(G(V.x)),c==null||c(G(V.x))},P=Y=>{switch(Y.key){case"ArrowRight":H(Y,{x:R.x+.05,y:R.y});break;case"ArrowLeft":H(Y,{x:R.x-.05,y:R.y});break}},z=w.map((Y,D)=>A.createElement("div",{...N("sliderOverlay"),style:Y,key:D}));return y.jsxs(ye,{...E,ref:Bt(U,O),...N("slider"),size:p,role:"slider","aria-valuenow":b,"aria-valuemax":h,"aria-valuemin":0,tabIndex:v?0:-1,onKeyDown:P,"data-focus-ring":F.focusRing,__vars:{"--cp-thumb-size":`var(--cp-thumb-size-${p})`},children:[z,y.jsx(hC,{position:R,...N("thumb",{style:{top:pe(1),background:k}})})]})});Rc.displayName="@mantine/core/ColorSlider";Rc.classes=Sy;const Tee={__staticSelector:"AlphaSlider"},mC=De(e=>{const{value:n,onChange:t,onChangeEnd:i,color:r,...a}=ke("AlphaSlider",Tee,e);return y.jsx(Rc,{...a,value:n,onChange:o=>t==null?void 0:t(ha(o,2)),onChangeEnd:o=>i==null?void 0:i(ha(o,2)),maxValue:1,round:!1,"data-alpha":!0,overlays:[{backgroundImage:"linear-gradient(45deg, var(--slider-checkers) 25%, transparent 25%), linear-gradient(-45deg, var(--slider-checkers) 25%, transparent 25%), linear-gradient(45deg, transparent 75%, var(--slider-checkers) 75%), linear-gradient(-45deg, var(--mantine-color-body) 75%, var(--slider-checkers) 75%)",backgroundSize:`${pe(8)} ${pe(8)}`,backgroundPosition:`0 0, 0 ${pe(4)}, ${pe(4)} ${pe(-4)}, ${pe(-4)} 0`},{backgroundImage:`linear-gradient(90deg, transparent, ${r})`},{boxShadow:`rgba(0, 0, 0, .1) 0 0 0 ${pe(1)} inset, rgb(0, 0, 0, .15) 0 0 ${pe(4)} inset`}]})});mC.displayName="@mantine/core/AlphaSlider";mC.classes=Rc.classes;function OI({h:e,s:n,v:t,a:i}){const r=e/360*6,a=n/100,o=t/100,l=Math.floor(r),f=o*(1-a),c=o*(1-(r-l)*a),h=o*(1-(1-r+l)*a),d=l%6;return{r:ha([o,c,f,f,h,o][d]*255),g:ha([h,o,o,c,f,f][d]*255),b:ha([f,f,h,o,o,c][d]*255),a:ha(i,2)}}function Q5(e,n){const{r:t,g:i,b:r,a}=OI(e);return n?`rgba(${t}, ${i}, ${r}, ${ha(a,2)})`:`rgb(${t}, ${i}, ${r})`}function J5({h:e,s:n,v:t,a:i},r){const a=(200-n)*t/100,o={h:Math.round(e),s:Math.round(a>0&&a<200?n*t/100/(a<=100?a:200-a)*100:0),l:Math.round(a/2)};return r?`hsla(${o.h}, ${o.s}%, ${o.l}%, ${ha(i,2)})`:`hsl(${o.h}, ${o.s}%, ${o.l}%)`}function cg(e){const n=e.toString(16);return n.length<2?`0${n}`:n}function EI(e){const{r:n,g:t,b:i}=OI(e);return`#${cg(n)}${cg(t)}${cg(i)}`}function jee(e){const n=Math.round(e.a*255);return`${EI(e)}${cg(n)}`}const dk={hex:EI,hexa:e=>jee(e),rgb:e=>Q5(e,!1),rgba:e=>Q5(e,!0),hsl:e=>J5(e,!1),hsla:e=>J5(e,!0)};function Fs(e,n){return n?e in dk?dk[e](n):dk.hex(n):"#000000"}const Mee={__staticSelector:"HueSlider"},pC=De(e=>{const{value:n,onChange:t,onChangeEnd:i,color:r,...a}=ke("HueSlider",Mee,e);return y.jsx(Rc,{...a,value:n,onChange:t,onChangeEnd:i,maxValue:360,thumbColor:`hsl(${n}, 100%, 50%)`,round:!0,"data-hue":!0,overlays:[{backgroundImage:"linear-gradient(to right,hsl(0,100%,50%),hsl(60,100%,50%),hsl(120,100%,50%),hsl(170,100%,50%),hsl(240,100%,50%),hsl(300,100%,50%),hsl(360,100%,50%))"},{boxShadow:`rgba(0, 0, 0, .1) 0 0 0 ${pe(1)} inset, rgb(0, 0, 0, .15) 0 0 ${pe(4)} inset`}]})});pC.displayName="@mantine/core/HueSlider";pC.classes=Rc.classes;function TI({className:e,onChange:n,onChangeEnd:t,value:i,saturationLabel:r,focusable:a=!0,size:o,color:l,onScrubStart:f,onScrubEnd:c,...h}){const{getStyles:d}=A.use(xy),[p,v]=A.useState({x:i.s/100,y:1-i.v/100}),b=A.useRef(p),{ref:w}=rz(({x,y:C})=>{b.current={x,y:C},n({s:Math.round(x*100),v:Math.round((1-C)*100)})},{onScrubEnd:()=>{const{x,y:C}=b.current;t({s:Math.round(x*100),v:Math.round((1-C)*100)}),c==null||c()},onScrubStart:f});A.useEffect(()=>{v({x:i.s/100,y:1-i.v/100})},[i.s,i.v]);const k=(x,C)=>{x.preventDefault();const T=iz(C);n({s:Math.round(T.x*100),v:Math.round((1-T.y)*100)}),t({s:Math.round(T.x*100),v:Math.round((1-T.y)*100)})},_=x=>{switch(x.key){case"ArrowUp":k(x,{y:p.y-.05,x:p.x});break;case"ArrowDown":k(x,{y:p.y+.05,x:p.x});break;case"ArrowRight":k(x,{x:p.x+.05,y:p.y});break;case"ArrowLeft":k(x,{x:p.x-.05,y:p.y});break}};return y.jsxs(ye,{...d("saturation"),ref:w,...h,role:"slider","aria-label":r,"aria-valuenow":p.x,"aria-valuetext":Fs("rgba",i),tabIndex:a?0:-1,onKeyDown:_,children:[y.jsx("div",{...d("saturationOverlay",{style:{backgroundColor:`hsl(${i.h}, 100%, 50%)`}})}),y.jsx("div",{...d("saturationOverlay",{style:{backgroundImage:"linear-gradient(90deg, #fff, transparent)"}})}),y.jsx("div",{...d("saturationOverlay",{style:{backgroundImage:"linear-gradient(0deg, #000, transparent)"}})}),y.jsx(hC,{position:p,...d("thumb",{style:{backgroundColor:l}})})]})}TI.displayName="@mantine/core/Saturation";function jI({className:e,datatype:n,setValue:t,onChangeEnd:i,size:r,focusable:a,data:o,swatchesPerRow:l,value:f,...c}){const h=A.use(xy),d=o.map((p,v)=>A.createElement(Dc,{...h.getStyles("swatch"),unstyled:h.unstyled,component:"button",type:"button",color:p,key:v,radius:"sm",onClick:()=>{t(p),i==null||i(p)},"aria-label":p,tabIndex:a?0:-1,"data-swatch":!0},f===p&&y.jsx(dC,{size:"35%",color:lz(p)<.5?"white":"black"})));return y.jsx(ye,{...h.getStyles("swatches"),...c,children:d})}jI.displayName="@mantine/core/Swatches";const Dee={swatchesPerRow:7,withPicker:!0,focusable:!0,size:"md",__staticSelector:"ColorPicker"},MI=(e,{size:n,swatchesPerRow:t})=>({wrapper:{"--cp-preview-size":Rn(n,"cp-preview-size"),"--cp-width":Rn(n,"cp-width"),"--cp-body-spacing":Ut(n),"--cp-swatch-size":`${100/t}%`,"--cp-thumb-size":Rn(n,"cp-thumb-size"),"--cp-saturation-height":Rn(n,"cp-saturation-height")}}),Cy=De(e=>{const n=ke("ColorPicker",Dee,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,format:f="hex",value:c,defaultValue:h,onChange:d,onChangeEnd:p,withPicker:v,size:b,saturationLabel:w,hueLabel:k,alphaLabel:_,focusable:x,swatches:C,swatchesPerRow:T,fullWidth:O,onColorSwatchClick:E,__staticSelector:M,mod:N,attributes:F,name:R,hiddenInputProps:L,...B}=n,G=Qe({name:M,props:n,classes:Sy,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:F,rootSelector:"wrapper",vars:l,varsResolver:MI}),U=A.useRef(f||"hex"),H=A.useRef(""),P=A.useRef(-1),z=A.useRef(!1),q=f==="hexa"||f==="rgba"||f==="hsla",[Y,D,V]=Mi({value:c,defaultValue:h,finalValue:"#FFFFFF",onChange:d}),[W,$]=A.useState(Rv(Y)),X=()=>{window.clearTimeout(P.current),z.current=!0},ee=()=>{window.clearTimeout(P.current),P.current=window.setTimeout(()=>{z.current=!1},200)},re=se=>{$(ge=>{const ae={...ge,...se};return H.current=Fs(U.current,ae),ae}),D(H.current)};return es(()=>{typeof c=="string"&&Eee(c)&&!z.current&&$(Rv(c))},[c]),es(()=>{U.current=f||"hex",D(Fs(U.current,W))},[f]),y.jsx(xy,{value:{getStyles:G,unstyled:o},children:y.jsxs(ye,{...G("wrapper"),size:b,mod:[{"full-width":O},N],...B,children:[R&&y.jsx("input",{type:"hidden",name:R,value:Y,...L}),v&&y.jsxs(y.Fragment,{children:[y.jsx(TI,{value:W,onChange:re,onChangeEnd:({s:se,v:ge})=>p==null?void 0:p(Fs(U.current,{...W,s:se,v:ge})),color:Y,size:b,focusable:x,saturationLabel:w,onScrubStart:X,onScrubEnd:ee}),y.jsxs("div",{...G("body"),children:[y.jsxs("div",{...G("sliders"),children:[y.jsx(pC,{value:W.h,onChange:se=>re({h:se}),onChangeEnd:se=>p==null?void 0:p(Fs(U.current,{...W,h:se})),size:b,focusable:x,"aria-label":k,onScrubStart:X,onScrubEnd:ee}),q&&y.jsx(mC,{value:W.a,onChange:se=>re({a:se}),onChangeEnd:se=>{p==null||p(Fs(U.current,{...W,a:se}))},size:b,color:Fs("hex",W),focusable:x,"aria-label":_,onScrubStart:X,onScrubEnd:ee})]}),q&&y.jsx(Dc,{color:Y,radius:"sm",size:"var(--cp-preview-size)",...G("preview")})]})]}),Array.isArray(C)&&y.jsx(jI,{data:C,swatchesPerRow:T,focusable:x,setValue:D,value:Y,onChangeEnd:se=>{const ge=Fs(f,Rv(se));E==null||E(ge),p==null||p(ge),V||$(Rv(se))}})]})})});Cy.classes=Sy;Cy.varsResolver=MI;Cy.displayName="@mantine/core/ColorPicker";var DI={root:"m_3eebeb36",label:"m_9e365f20"};const Ree={orientation:"horizontal"},RI=(e,{color:n,variant:t,size:i})=>({root:{"--divider-color":n?ot(n,e):void 0,"--divider-border-style":t,"--divider-size":Rn(i,"divider-size")}}),Um=De(e=>{const n=ke("Divider",Ree,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,color:f,orientation:c,label:h,labelPosition:d,mod:p,attributes:v,...b}=n,w=Qe({name:"Divider",classes:DI,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:v,vars:l,varsResolver:RI});return y.jsx(ye,{mod:[{orientation:c,withLabel:!!h},p],role:"separator",...w("root"),...b,children:h&&y.jsx(ye,{component:"span",mod:{position:d},...w("label"),children:h})})});Um.classes=DI;Um.varsResolver=RI;Um.displayName="@mantine/core/Divider";const[ej,PI]=ba("Grid component was not found in tree"),mS=(e,n)=>{if(e==="content")return"auto";if(e==="auto")return"0rem";if(e)return e===n?"100%":`calc(${100*e/n}% - ${(n-e)/n} * var(--grid-column-gap))`},nj=(e,n,t)=>t||e==="auto"?"100%":e==="content"?"unset":mS(e,n),tj=(e,n)=>{if(e)return e==="auto"||n?"1":"auto"},ij=(e,n)=>{if(e===0)return"0";if(e)return`calc(${100*e/n}% + ${e/n} * var(--grid-column-gap))`};function Pee({span:e,order:n,offset:t,align:i,selector:r}){var v;const a=oi(),o=PI(),l=o.breakpoints||a.breakpoints,f=qr(e),c=f===void 0?12:f,h=xu({"--col-order":(v=qr(n))==null?void 0:v.toString(),"--col-flex-grow":tj(c,o.grow),"--col-flex-basis":mS(c,o.columns),"--col-width":c==="content"?"auto":void 0,"--col-max-width":nj(c,o.columns,o.grow),"--col-offset":ij(qr(t),o.columns),"--col-align-self":qr(i)}),d=Tt(l).reduce((b,w)=>{var k;return b[w]||(b[w]={}),typeof n=="object"&&n[w]!==void 0&&(b[w]["--col-order"]=(k=n[w])==null?void 0:k.toString()),typeof e=="object"&&e[w]!==void 0&&(b[w]["--col-flex-grow"]=tj(e[w],o.grow),b[w]["--col-flex-basis"]=mS(e[w],o.columns),b[w]["--col-width"]=e[w]==="content"?"auto":void 0,b[w]["--col-max-width"]=nj(e[w],o.columns,o.grow)),typeof t=="object"&&t[w]!==void 0&&(b[w]["--col-offset"]=ij(t[w],o.columns)),typeof i=="object"&&i[w]!==void 0&&(b[w]["--col-align-self"]=i[w]),b},{}),p=Ph(Tt(d),l).filter(b=>Tt(d[b.value]).length>0).map(b=>({query:o.type==="container"?`mantine-grid (min-width: ${l[b.value]})`:`(min-width: ${l[b.value]})`,styles:d[b.value]}));return y.jsx(Cc,{styles:h,media:o.type==="container"?void 0:p,container:o.type==="container"?p:void 0,selector:r})}var vC={container:"m_8478a6da",root:"m_410352e9",inner:"m_dee7bd2f",col:"m_96bdd299"};const Nee={span:12},gC=De(e=>{const{classNames:n,className:t,style:i,styles:r,vars:a,span:o,order:l,offset:f,align:c,...h}=ke("GridCol",Nee,e),d=PI(),p=Q1();return y.jsxs(y.Fragment,{children:[y.jsx(Pee,{selector:`.${p}`,span:o,order:l,offset:f,align:c}),y.jsx(ye,{...d.getStyles("col",{className:dn(t,p),style:i,classNames:n,styles:r}),...h})]})});gC.classes=vC;gC.displayName="@mantine/core/GridCol";function rj({gap:e,rowGap:n,columnGap:t,selector:i,breakpoints:r,type:a}){const o=oi(),l=r||o.breakpoints,f=xu({"--grid-gap":Ut(qr(e)),"--grid-row-gap":Ut(qr(n)),"--grid-column-gap":Ut(qr(t))}),c=Tt(l).reduce((d,p)=>(d[p]||(d[p]={}),typeof e=="object"&&e[p]!==void 0&&(d[p]["--grid-gap"]=Ut(e[p])),typeof n=="object"&&n[p]!==void 0&&(d[p]["--grid-row-gap"]=Ut(n[p])),typeof t=="object"&&t[p]!==void 0&&(d[p]["--grid-column-gap"]=Ut(t[p])),d),{}),h=Ph(Tt(c),l).filter(d=>Tt(c[d.value]).length>0).map(d=>({query:a==="container"?`mantine-grid (min-width: ${l[d.value]})`:`(min-width: ${l[d.value]})`,styles:c[d.value]}));return y.jsx(Cc,{styles:f,media:a==="container"?void 0:h,container:a==="container"?h:void 0,selector:i})}const $ee={gap:"md",columns:12},NI=(e,{justify:n,align:t,overflow:i})=>({root:{"--grid-justify":n,"--grid-align":t,"--grid-overflow":i}}),Ir=De(e=>{const n=ke("Grid",$ee,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,grow:f,gap:c,rowGap:h,columnGap:d,columns:p,align:v,justify:b,children:w,breakpoints:k,type:_,attributes:x,...C}=n,T=Qe({name:"Grid",classes:vC,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:x,vars:l,varsResolver:NI}),O=Q1();return _==="container"&&k?y.jsxs(ej,{value:{getStyles:T,grow:f,columns:p,breakpoints:k,type:_},children:[y.jsx(rj,{selector:`.${O}`,...n}),y.jsx("div",{...T("container"),children:y.jsx(ye,{...T("root",{className:O}),...C,children:y.jsx("div",{...T("inner"),children:w})})})]}):y.jsxs(ej,{value:{getStyles:T,grow:f,columns:p,breakpoints:k,type:_},children:[y.jsx(rj,{selector:`.${O}`,...n}),y.jsx(ye,{...T("root",{className:O}),...C,children:y.jsx("div",{...T("inner"),children:w})})]})});Ir.classes=vC;Ir.varsResolver=NI;Ir.displayName="@mantine/core/Grid";Ir.Col=gC;const zee=["borderBottomWidth","borderLeftWidth","borderRightWidth","borderTopWidth","boxSizing","fontFamily","fontSize","fontStyle","fontWeight","letterSpacing","lineHeight","paddingBottom","paddingLeft","paddingRight","paddingTop","tabSize","textIndent","textRendering","textTransform","width","wordBreak","wordSpacing","scrollbarGutter"],aj={"min-height":"0","max-height":"none",height:"0",visibility:"hidden",overflow:"hidden",position:"absolute","z-index":"-1000",top:"0",right:"0",display:"block"};function oj(e){Object.keys(aj).forEach(n=>{e.style.setProperty(n,aj[n],"important")})}function Lee(e){const n=window.getComputedStyle(e);if(n===null)return null;const t={};for(const i of zee)t[i]=n[i];return t.boxSizing===""?null:{sizingStyle:t,paddingSize:parseFloat(t.paddingBottom)+parseFloat(t.paddingTop),borderSize:parseFloat(t.borderBottomWidth)+parseFloat(t.borderTopWidth)}}let Ei=null;function Iee(e,n,t=1,i=1/0){Ei||(Ei=document.createElement("textarea"),Ei.setAttribute("tabindex","-1"),Ei.setAttribute("aria-hidden","true"),Ei.setAttribute("aria-label","autosize measurement"),oj(Ei)),Ei.parentNode===null&&document.body.appendChild(Ei);const{paddingSize:r,borderSize:a,sizingStyle:o}=e,{boxSizing:l}=o;Object.keys(o).forEach(p=>{Ei.style[p]=o[p]}),oj(Ei),Ei.value=n;let f=l==="border-box"?Ei.scrollHeight+a:Ei.scrollHeight-r;Ei.value=n,f=l==="border-box"?Ei.scrollHeight+a:Ei.scrollHeight-r,Ei.value="x";const c=Ei.scrollHeight-r;let h=c*t;l==="border-box"&&(h=h+r+a),f=Math.max(h,f);let d=c*i;return l==="border-box"&&(d=d+r+a),f=Math.min(d,f),[f,c]}function Bee({maxRows:e,minRows:n,onChange:t,ref:i,...r}){const a=r.value!==void 0,o=A.useRef(null),l=Bt(o,i),f=A.useRef(0),c=()=>{const d=o.current;if(!d)return;const p=Lee(d);if(!p)return;const[v]=Iee(p,d.value||d.placeholder||"x",n,e);f.current!==v&&(f.current=v,d.style.setProperty("height",`${v}px`,"important"))},h=d=>{a||c(),t==null||t(d)};return A.useLayoutEffect(c),A.useEffect(()=>{const d=()=>c();return window.addEventListener("resize",d),()=>window.removeEventListener("resize",d)},[]),A.useEffect(()=>{const d=()=>c();return document.fonts.addEventListener("loadingdone",d),()=>document.fonts.removeEventListener("loadingdone",d)},[]),A.useEffect(()=>{const d=p=>{var v;if(((v=o.current)==null?void 0:v.form)===p.target&&!a){const b=o.current.value;requestAnimationFrame(()=>{o.current&&b!==o.current.value&&c()})}};return document.body.addEventListener("reset",d),()=>document.body.removeEventListener("reset",d)},[a]),y.jsx("textarea",{...r,onChange:h,ref:l})}const Fee={size:"sm"},Kf=De(e=>{const{autosize:n,maxRows:t,minRows:i,__staticSelector:r,resize:a,...o}=ke("Textarea",Fee,e),l=n&&gK()!=="test",f=l?{maxRows:t,minRows:i}:{};return y.jsx(Ui,{component:l?Bee:"textarea",...o,__staticSelector:r||"Textarea",multiline:!0,"data-no-overflow":n&&t===void 0||void 0,__vars:{"--input-resize":a},...f})});Kf.classes=Ui.classes;Kf.displayName="@mantine/core/Textarea";const[qee,fl]=ba("Menu component was not found in the tree");var cl={dropdown:"m_dc9b7c9f",label:"m_9bfac126",divider:"m_efdf90cb",item:"m_99ac2aa1",itemLabel:"m_5476e0d3",itemSection:"m_8b75e504",chevron:"m_b85b0bed"};const yC=De(e=>{const{classNames:n,className:t,style:i,styles:r,vars:a,...o}=ke("MenuDivider",null,e);return y.jsx(ye,{...fl().getStyles("divider",{className:t,style:i,styles:r,classNames:n}),...o})});yC.classes=cl;yC.displayName="@mantine/core/MenuDivider";const bC=De(e=>{const{classNames:n,className:t,style:i,styles:r,vars:a,onMouseEnter:o,onMouseLeave:l,onKeyDown:f,children:c,ref:h,...d}=ke("MenuDropdown",null,e),p=A.useRef(null),v=fl(),b=br(f,_=>{var x,C;(_.key==="ArrowUp"||_.key==="ArrowDown")&&(_.preventDefault(),(C=(x=p.current)==null?void 0:x.querySelectorAll("[data-menu-item]:not(:disabled)")[0])==null||C.focus())}),w=br(o,()=>(v.trigger==="hover"||v.trigger==="click-hover")&&v.openDropdown()),k=br(l,()=>(v.trigger==="hover"||v.trigger==="click-hover")&&v.closeDropdown());return y.jsxs(En.Dropdown,{...d,onMouseEnter:w,onMouseLeave:k,role:"menu","aria-orientation":"vertical",ref:Bt(h,p),...v.getStyles("dropdown",{className:t,style:i,styles:r,classNames:n,withStaticClass:!1}),tabIndex:-1,"data-menu-dropdown":!0,onKeyDown:b,children:[v.withInitialFocusPlaceholder&&y.jsx("div",{tabIndex:-1,"data-autofocus":!0,"data-mantine-stop-propagation":!0,style:{outline:0}}),c]})});bC.classes=cl;bC.displayName="@mantine/core/MenuDropdown";const Lh=A.createContext(null),wC=Hi(e=>{const{classNames:n,className:t,style:i,styles:r,vars:a,color:o,closeMenuOnClick:l,leftSection:f,rightSection:c,children:h,disabled:d,"data-disabled":p,ref:v,...b}=ke("MenuItem",null,e),w=fl(),k=A.use(Lh),_=oi(),{dir:x}=Au(),C=A.useRef(null),T=b,O=br(T.onClick,()=>{p||(typeof l=="boolean"?l&&w.closeDropdownImmediately():w.closeOnItemClick&&w.closeDropdownImmediately())}),E=o?_.variantColorResolver({color:o,theme:_,variant:"light"}):void 0,M=o?ls({color:o,theme:_}):null,N=br(T.onKeyDown,F=>{F.key==="ArrowLeft"&&k&&(k.close(),k.focusParentItem())});return y.jsxs(pi,{onMouseDown:F=>F.preventDefault(),...b,unstyled:w.unstyled,tabIndex:w.menuItemTabIndex,...w.getStyles("item",{className:t,style:i,styles:r,classNames:n}),ref:Bt(C,v),role:"menuitem",disabled:d,"data-menu-item":!0,"data-disabled":d||p||void 0,"data-mantine-stop-propagation":!0,onClick:O,onKeyDown:_6({siblingSelector:"[data-menu-item]:not([data-disabled])",parentSelector:"[data-menu-dropdown]",activateOnFocus:!1,loop:w.loop,dir:x,orientation:"vertical",onKeyDown:N}),__vars:{"--menu-item-color":M!=null&&M.isThemeColor&&(M==null?void 0:M.shade)===void 0?`var(--mantine-color-${M.color}-6)`:E==null?void 0:E.color,"--menu-item-hover":E==null?void 0:E.hover},children:[f&&y.jsx("div",{...w.getStyles("itemSection",{styles:r,classNames:n}),"data-position":"left",children:f}),h&&y.jsx("div",{...w.getStyles("itemLabel",{styles:r,classNames:n}),children:h}),c&&y.jsx("div",{...w.getStyles("itemSection",{styles:r,classNames:n}),"data-position":"right",children:c})]})});wC.classes=cl;wC.displayName="@mantine/core/MenuItem";const kC=De(e=>{const{classNames:n,className:t,style:i,styles:r,vars:a,...o}=ke("MenuLabel",null,e);return y.jsx(ye,{...fl().getStyles("label",{className:t,style:i,styles:r,classNames:n}),...o})});kC.classes=cl;kC.displayName="@mantine/core/MenuLabel";const _C=De(e=>{const{classNames:n,className:t,style:i,styles:r,vars:a,onMouseEnter:o,onMouseLeave:l,onKeyDown:f,children:c,ref:h,...d}=ke("MenuSubDropdown",null,e),p=A.useRef(null),v=fl(),b=A.use(Lh),w=br(o,b==null?void 0:b.open),k=br(l,b==null?void 0:b.close);return y.jsx(En.Dropdown,{...d,onMouseEnter:w,onMouseLeave:k,role:"menu","aria-orientation":"vertical",ref:Bt(h,p),...v.getStyles("dropdown",{className:t,style:i,styles:r,classNames:n,withStaticClass:!1}),tabIndex:-1,"data-menu-dropdown":!0,children:c})});_C.classes=cl;_C.displayName="@mantine/core/MenuSubDropdown";const xC=Hi(e=>{const{classNames:n,className:t,style:i,styles:r,vars:a,color:o,leftSection:l,rightSection:f,children:c,disabled:h,"data-disabled":d,closeMenuOnClick:p,ref:v,...b}=ke("MenuSubItem",null,e),w=fl(),k=A.use(Lh),_=oi(),{dir:x}=Au(),C=A.useRef(null),T=b,O=o?_.variantColorResolver({color:o,theme:_,variant:"light"}):void 0,E=o?ls({color:o,theme:_}):null,M=br(T.onKeyDown,L=>{L.key==="ArrowRight"&&(k==null||k.open(),k==null||k.focusFirstItem()),L.key==="ArrowLeft"&&(k!=null&&k.parentContext)&&(k.parentContext.close(),k.parentContext.focusParentItem())}),N=br(T.onClick,()=>{!d&&p&&w.closeDropdownImmediately()}),F=br(T.onMouseEnter,k==null?void 0:k.open),R=br(T.onMouseLeave,k==null?void 0:k.close);return y.jsxs(pi,{onMouseDown:L=>L.preventDefault(),...b,unstyled:w.unstyled,tabIndex:w.menuItemTabIndex,...w.getStyles("item",{className:t,style:i,styles:r,classNames:n}),ref:Bt(C,v),role:"menuitem",disabled:h,"data-menu-item":!0,"data-sub-menu-item":!0,"data-disabled":h||d||void 0,"data-mantine-stop-propagation":!0,onMouseEnter:F,onMouseLeave:R,onClick:N,onKeyDown:_6({siblingSelector:"[data-menu-item]:not([data-disabled])",parentSelector:"[data-menu-dropdown]",activateOnFocus:!1,loop:w.loop,dir:x,orientation:"vertical",onKeyDown:M}),__vars:{"--menu-item-color":E!=null&&E.isThemeColor&&(E==null?void 0:E.shade)===void 0?`var(--mantine-color-${E.color}-6)`:O==null?void 0:O.color,"--menu-item-hover":O==null?void 0:O.hover},children:[l&&y.jsx("div",{...w.getStyles("itemSection",{styles:r,classNames:n}),"data-position":"left",children:l}),c&&y.jsx("div",{...w.getStyles("itemLabel",{styles:r,classNames:n}),children:c}),y.jsx("div",{...w.getStyles("itemSection",{styles:r,classNames:n}),"data-position":"right",children:f||y.jsx(jg,{...w.getStyles("chevron"),size:14})})]})});xC.classes=cl;xC.displayName="@mantine/core/MenuSubItem";function $I({children:e,refProp:n}){if(!k6(e))throw new Error("Menu.Sub.Target component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported");return fl(),y.jsx(En.Target,{refProp:n,popupType:"menu",children:e})}$I.displayName="@mantine/core/MenuSubTarget";const Hee={offset:0,position:"right-start",transitionProps:{duration:0},openDelay:0,middlewares:{shift:{crossAxis:!0}}};function Pc(e){const{children:n,closeDelay:t,openDelay:i,...r}=ke("MenuSub",Hee,e),a=Qi(),[o,{open:l,close:f}]=az(!1),c=A.use(Lh),{openDropdown:h,closeDropdown:d}=eL({open:l,close:f,closeDelay:t,openDelay:i}),p=()=>window.setTimeout(()=>{var b,w;(w=(b=document.getElementById(`${a}-dropdown`))==null?void 0:b.querySelectorAll("[data-menu-item]:not([data-disabled])")[0])==null||w.focus()},16),v=()=>window.setTimeout(()=>{var b;(b=document.getElementById(`${a}-target`))==null||b.focus()},16);return y.jsx(Lh,{value:{opened:o,close:d,open:h,focusFirstItem:p,focusParentItem:v,parentContext:c},children:y.jsx(En,{opened:o,withinPortal:!1,withArrow:!1,id:a,...r,children:n})})}Pc.extend=e=>e;Pc.displayName="@mantine/core/MenuSub";Pc.Target=$I;Pc.Dropdown=_C;Pc.Item=xC;const Uee={refProp:"ref"};function zI(e){const{children:n,refProp:t,...i}=ke("MenuTarget",Uee,e),r=Su(n);if(!r)throw new Error("Menu.Target component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported");const a=fl(),o=r.props,l=br(o.onClick,()=>{a.trigger==="click"?a.toggleDropdown():a.trigger==="click-hover"&&(a.setOpenedViaClick(!0),a.opened||a.openDropdown())}),f=br(o.onMouseEnter,()=>(a.trigger==="hover"||a.trigger==="click-hover")&&a.openDropdown()),c=br(o.onMouseLeave,()=>{(a.trigger==="hover"||a.trigger==="click-hover"&&!a.openedViaClick)&&a.closeDropdown()});return y.jsx(En.Target,{refProp:t,popupType:"menu",...i,children:A.cloneElement(r,{onClick:l,onMouseEnter:f,onMouseLeave:c,"data-expanded":a.opened?!0:void 0})})}zI.displayName="@mantine/core/MenuTarget";const Vee={trapFocus:!0,closeOnItemClick:!0,withInitialFocusPlaceholder:!0,clickOutsideEvents:["mousedown","touchstart","keydown"],loop:!0,trigger:"click",openDelay:0,closeDelay:100,menuItemTabIndex:-1},Hn=De(e=>{const n=ke("Menu",Vee,e),{children:t,onOpen:i,onClose:r,opened:a,defaultOpened:o,trapFocus:l,onChange:f,closeOnItemClick:c,loop:h,closeOnEscape:d,trigger:p,openDelay:v,closeDelay:b,classNames:w,styles:k,unstyled:_,variant:x,vars:C,menuItemTabIndex:T,keepMounted:O,withInitialFocusPlaceholder:E,attributes:M,...N}=n,F=Qe({name:"Menu",classes:cl,props:n,classNames:w,styles:k,unstyled:_,attributes:M}),[R,L]=Mi({value:a,defaultValue:o,finalValue:!1,onChange:f}),[B,G]=A.useState(!1),U=()=>{L(!1),G(!1),R&&(r==null||r())},H=()=>{L(!0),!R&&(i==null||i())},P=()=>{R?U():H()},{openDropdown:z,closeDropdown:q}=eL({open:H,close:U,closeDelay:b,openDelay:v}),Y=W=>QY("[data-menu-item]","[data-menu-dropdown]",W),{resolvedClassNames:D,resolvedStyles:V}=qi({classNames:w,styles:k,props:n});return y.jsx(qee,{value:{getStyles:F,opened:R,toggleDropdown:P,getItemIndex:Y,openedViaClick:B,setOpenedViaClick:G,closeOnItemClick:c,closeDropdown:p==="click"?U:q,openDropdown:p==="click"?H:z,closeDropdownImmediately:U,loop:h,trigger:p,unstyled:_,menuItemTabIndex:T,withInitialFocusPlaceholder:E},children:y.jsx(En,{returnFocus:!0,...N,opened:R,onChange:P,defaultOpened:o,trapFocus:O?!1:l,closeOnEscape:d,__staticSelector:"Menu",classNames:D,styles:V,unstyled:_,variant:x,keepMounted:O,children:t})})});Hn.displayName="@mantine/core/Menu";Hn.classes=cl;Hn.Item=wC;Hn.Label=kC;Hn.Dropdown=bC;Hn.Target=zI;Hn.Divider=yC;Hn.Sub=Pc;const[Wee,Nc]=ba("Modal component was not found in tree");var fs={root:"m_9df02822",content:"m_54c44539",inner:"m_1f958f16",header:"m_d0e2b9cd"};const Ay=De(e=>{const{classNames:n,className:t,style:i,styles:r,vars:a,...o}=ke("ModalBody",null,e);return y.jsx(jL,{...Nc().getStyles("body",{classNames:n,style:i,styles:r,className:t}),...o})});Ay.classes=fs;Ay.displayName="@mantine/core/ModalBody";const Oy=De(e=>{const{classNames:n,className:t,style:i,styles:r,vars:a,...o}=ke("ModalCloseButton",null,e);return y.jsx(ML,{...Nc().getStyles("close",{classNames:n,style:i,styles:r,className:t}),...o})});Oy.classes=fs;Oy.displayName="@mantine/core/ModalCloseButton";const Ey=De(e=>{const{classNames:n,className:t,style:i,styles:r,vars:a,children:o,__hidden:l,...f}=ke("ModalContent",null,e),c=Nc(),h=c.scrollAreaComponent||TJ;return y.jsx(DL,{...c.getStyles("content",{className:t,style:i,styles:r,classNames:n}),innerProps:c.getStyles("inner",{className:t,style:i,styles:r,classNames:n}),"data-full-screen":c.fullScreen||void 0,"data-modal-content":!0,"data-hidden":l||void 0,...f,children:y.jsx(h,{style:{maxHeight:c.fullScreen?"100dvh":`calc(100dvh - (${pe(c.yOffset)} * 2))`},children:o})})});Ey.classes=fs;Ey.displayName="@mantine/core/ModalContent";const Ty=De(e=>{const{classNames:n,className:t,style:i,styles:r,vars:a,...o}=ke("ModalHeader",null,e);return y.jsx(RL,{...Nc().getStyles("header",{classNames:n,style:i,styles:r,className:t}),...o})});Ty.classes=fs;Ty.displayName="@mantine/core/ModalHeader";const jy=De(e=>{const{classNames:n,className:t,style:i,styles:r,vars:a,...o}=ke("ModalOverlay",null,e);return y.jsx(PL,{...Nc().getStyles("overlay",{classNames:n,style:i,styles:r,className:t}),...o})});jy.classes=fs;jy.displayName="@mantine/core/ModalOverlay";const Gee={__staticSelector:"Modal",closeOnClickOutside:!0,withinPortal:!0,lockScroll:!0,trapFocus:!0,returnFocus:!0,closeOnEscape:!0,keepMounted:!1,zIndex:wa("modal"),transitionProps:{duration:200,transition:"fade-down"},yOffset:"5dvh"},LI=(e,{radius:n,size:t,yOffset:i,xOffset:r})=>({root:{"--modal-radius":n===void 0?void 0:Gt(n),"--modal-size":Rn(t,"modal-size"),"--modal-y-offset":pe(i),"--modal-x-offset":pe(r)}}),Vm=De(e=>{const n=ke("ModalRoot",Gee,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,yOffset:f,scrollAreaComponent:c,radius:h,fullScreen:d,centered:p,xOffset:v,__staticSelector:b,attributes:w,...k}=n,_=Qe({name:b,classes:fs,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:w,vars:l,varsResolver:LI});return y.jsx(Wee,{value:{yOffset:f,scrollAreaComponent:c,getStyles:_,fullScreen:d},children:y.jsx(TL,{..._("root"),"data-full-screen":d||void 0,"data-centered":p||void 0,"data-offset-scrollbars":c===Ua.Autosize||void 0,unstyled:o,...k})})});Vm.classes=fs;Vm.varsResolver=LI;Vm.displayName="@mantine/core/ModalRoot";const II=A.createContext(null);function BI({children:e}){const[n,t]=A.useState([]),[i,r]=A.useState(wa("modal"));return y.jsx(II,{value:{stack:n,addModal:(a,o)=>{t(l=>[...new Set([...l,a])]),r(l=>typeof o=="number"&&typeof l=="number"?Math.max(l,o):l)},removeModal:a=>t(o=>o.filter(l=>l!==a)),getZIndex:a=>`calc(${i} + ${n.indexOf(a)} + 1)`,currentId:n[n.length-1],maxZIndex:i},children:e})}BI.displayName="@mantine/core/ModalStack";const My=De(e=>{const{classNames:n,className:t,style:i,styles:r,vars:a,...o}=ke("ModalTitle",null,e);return y.jsx(NL,{...Nc().getStyles("title",{classNames:n,style:i,styles:r,className:t}),...o})});My.classes=fs;My.displayName="@mantine/core/ModalTitle";const Yee={closeOnClickOutside:!0,withinPortal:!0,lockScroll:!0,trapFocus:!0,returnFocus:!0,closeOnEscape:!0,keepMounted:!1,zIndex:wa("modal"),transitionProps:{duration:200,transition:"fade-down"},withOverlay:!0,withCloseButton:!0},Ur=De(e=>{const{title:n,withOverlay:t,overlayProps:i,withCloseButton:r,closeButtonProps:a,children:o,radius:l,opened:f,stackId:c,zIndex:h,...d}=ke("Modal",Yee,e),p=A.use(II),v=!!n||r,b=p&&c?{closeOnEscape:p.currentId===c,trapFocus:p.currentId===c,zIndex:p.getZIndex(c)}:{},w=t===!1?!1:c&&p?p.currentId===c:f;return A.useEffect(()=>{p&&c&&(f?p.addModal(c,h||wa("modal")):p.removeModal(c))},[f,c,h]),y.jsxs(Vm,{radius:l,opened:f,zIndex:p&&c?p.getZIndex(c):h,...d,...b,children:[t&&y.jsx(jy,{visible:w,transitionProps:p&&c?{duration:0}:void 0,...i}),y.jsxs(Ey,{radius:l,__hidden:p&&c&&f?c!==p.currentId:!1,children:[v&&y.jsxs(Ty,{children:[n&&y.jsx(My,{children:n}),r&&y.jsx(Oy,{...a})]}),y.jsx(Ay,{children:o})]})]})});Ur.classes=fs;Ur.displayName="@mantine/core/Modal";Ur.Root=Vm;Ur.Overlay=jy;Ur.Content=Ey;Ur.Body=Ay;Ur.Header=Ty;Ur.Title=My;Ur.CloseButton=Oy;Ur.Stack=BI;const Dy=A.createContext(null);var Ry={root:"m_7cda1cd6","root--default":"m_44da308b","root--contrast":"m_e3a01f8",label:"m_1e0e6180",remove:"m_ae386778",group:"m_1dcfd90b"};const FI=A.createContext(null),qI=(e,{gap:n},{size:t})=>({group:{"--pg-gap":n!==void 0?Rn(n):Rn(t,"pg-gap")}}),Py=De(e=>{var b;const n=ke("PillGroup",null,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,size:f,disabled:c,attributes:h,...d}=n,p=((b=A.use(Dy))==null?void 0:b.size)||f||void 0,v=Qe({name:"PillGroup",classes:Ry,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:h,vars:l,varsResolver:qI,stylesCtx:{size:p},rootSelector:"group"});return y.jsx(FI,{value:{size:p,disabled:c},children:y.jsx(ye,{size:p,...v("group"),...d})})});Py.classes=Ry;Py.varsResolver=qI;Py.displayName="@mantine/core/PillGroup";const Kee={variant:"default"},HI=(e,{radius:n},{size:t})=>({root:{"--pill-fz":Rn(t,"pill-fz"),"--pill-height":Rn(t,"pill-height"),"--pill-radius":n===void 0?void 0:Gt(n)}}),sl=De(e=>{const n=ke("Pill",Kee,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,variant:f,children:c,withRemoveButton:h,onRemove:d,removeButtonProps:p,radius:v,size:b,disabled:w,mod:k,attributes:_,...x}=n,C=A.use(FI),T=A.use(Dy),O=b||(C==null?void 0:C.size)||void 0,E=(T==null?void 0:T.variant)==="filled"?"contrast":f||"default",M=Qe({name:"Pill",classes:Ry,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:_,vars:l,varsResolver:HI,stylesCtx:{size:O}});return y.jsxs(ye,{component:"span",variant:E,size:O,...M("root",{variant:E}),mod:[{"with-remove":h&&!w,disabled:w||(C==null?void 0:C.disabled)},k],...x,children:[y.jsx("span",{...M("label"),children:c}),h&&y.jsx(Ou,{variant:"transparent",radius:v,tabIndex:-1,"aria-hidden":!0,unstyled:o,...p,...M("remove",{className:p==null?void 0:p.className,style:p==null?void 0:p.style}),onMouseDown:N=>{var F;N.preventDefault(),N.stopPropagation(),(F=p==null?void 0:p.onMouseDown)==null||F.call(p,N)},onClick:N=>{var F;N.stopPropagation(),d==null||d(),(F=p==null?void 0:p.onClick)==null||F.call(p,N)}})]})});sl.classes=Ry;sl.varsResolver=HI;sl.displayName="@mantine/core/Pill";sl.Group=Py;var UI={field:"m_45c4369d"};const Xee={type:"visible"},SC=De(e=>{const n=ke("PillsInputField",Xee,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,type:f,disabled:c,id:h,pointer:d,mod:p,attributes:v,ref:b,...w}=n,k=A.use(Dy),_=A.use(Eu),x=Qe({name:"PillsInputField",classes:UI,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:v,rootSelector:"field"}),C=c||(k==null?void 0:k.disabled);return y.jsx(ye,{component:"input",ref:Bt(b,k==null?void 0:k.fieldRef),"data-type":f,disabled:C,mod:[{disabled:C,pointer:d},p],...x("field"),...w,id:(_==null?void 0:_.inputId)||h,"aria-invalid":k==null?void 0:k.hasError,"aria-describedby":_==null?void 0:_.describedBy,type:"text",onMouseDown:T=>!d&&T.stopPropagation()})});SC.classes=UI;SC.displayName="@mantine/core/PillsInputField";const Zee={size:"sm"},mu=De(e=>{const{children:n,onMouseDown:t,onClick:i,size:r,disabled:a,__staticSelector:o,error:l,variant:f,...c}=ke("PillsInput",Zee,e),h=A.useRef(null);return y.jsx(Dy,{value:{fieldRef:h,size:r,disabled:a,hasError:!!l,variant:f},children:y.jsx(Ui,{size:r,error:l,variant:f,component:"div","data-no-overflow":!0,onMouseDown:d=>{var p;d.preventDefault(),t==null||t(d),(p=h.current)==null||p.focus()},onClick:d=>{var p,v;d.preventDefault(),(p=d.currentTarget.closest("fieldset"))!=null&&p.disabled||((v=h.current)==null||v.focus(),i==null||i(d))},...c,multiline:!0,disabled:a,__staticSelector:o||"PillsInput",withAria:!1,children:n})})});mu.displayName="@mantine/core/PillsInput";mu.classes=Ui.classes;mu.Field=SC;function hk(e){return typeof e=="string"?e.trim().toLowerCase():e}function Qee({data:e,value:n}){const t=n.map(hk);return e.reduce((i,r)=>(hu(r)?i.push({group:r.group,items:r.items.filter(a=>t.indexOf(hk(a.value))===-1)}):t.indexOf(hk(r.value))===-1&&i.push(r),i),[])}const sj={xs:41,sm:50,md:60,lg:72,xl:89},Jee={maxValues:1/0,withCheckIcon:!0,checkIconPosition:"left",hiddenInputValuesDivider:",",clearSearchOnChange:!0,openOnFocus:!0,size:"sm"},Ny=J1(e=>{const n=ke("MultiSelect",Jee,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,size:f,value:c,defaultValue:h,onChange:d,onKeyDown:p,variant:v,data:b,dropdownOpened:w,defaultDropdownOpened:k,onDropdownOpen:_,onDropdownClose:x,selectFirstOptionOnChange:C,selectFirstOptionOnDropdownOpen:T,onOptionSubmit:O,comboboxProps:E,filter:M,limit:N,withScrollArea:F,maxDropdownHeight:R,searchValue:L,defaultSearchValue:B,onSearchChange:G,readOnly:U,disabled:H,onFocus:P,onBlur:z,radius:q,rightSection:Y,rightSectionWidth:D,rightSectionPointerEvents:V,rightSectionProps:W,leftSection:$,leftSectionWidth:X,leftSectionPointerEvents:ee,leftSectionProps:re,inputContainer:se,inputWrapperOrder:ge,withAsterisk:ae,labelProps:le,descriptionProps:_e,errorProps:ne,wrapperProps:$e,description:be,label:Ce,error:Pe,maxValues:ve,searchable:xe,nothingFoundMessage:Re,withCheckIcon:ue,withAlignedLabels:Ie,checkIconPosition:Ve,hidePickedOptions:He,withErrorStyles:Ke,name:Xe,form:ie,id:me,clearable:We,clearSectionMode:Ze,clearButtonProps:Se,hiddenInputProps:nn,placeholder:cn,hiddenInputValuesDivider:An,required:mn,mod:rn,renderOption:Je,renderPill:Dn,onRemove:Me,onClear:Be,onMaxValues:On,scrollAreaProps:gn,chevronColor:vn,attributes:yn,clearSearchOnChange:et,openOnFocus:wt,loading:ze,loadingPosition:Fe,...Pn}=n,rt=Qi(me),jn=hy(b),en=qm(jn),tn=A.useRef({}),an=Hm({opened:w,defaultOpened:k,onDropdownOpen:()=>{_==null||_(),T&&an.selectFirstOption()},onDropdownClose:()=>{x==null||x(),an.resetSelectedOption()}}),{styleProps:Ln,rest:{type:Un,autoComplete:kt,...Sn}}=Cu(Pn),[Cn,Zn]=Mi({value:c,defaultValue:h,finalValue:[],onChange:d}),[Wt,Ai]=Mi({value:L,defaultValue:B,finalValue:"",onChange:G}),er=ln=>{Ai(ln),an.resetSelectedOption()},Aa=Qe({name:"MultiSelect",classes:{},props:n,classNames:t,styles:a,unstyled:o,attributes:yn}),{resolvedClassNames:Wa,resolvedStyles:Oa}=qi({props:n,styles:a,classNames:t}),Vr=ln=>{p==null||p(ln),ln.key===" "&&!xe&&(ln.preventDefault(),an.toggleDropdown()),ln.key==="Backspace"&&Wt.length===0&&Cn.length>0&&(Me==null||Me(Cn[Cn.length-1]),Zn(Cn.slice(0,Cn.length-1)))},Ga=Cn.map((ln,Ar)=>{var Wr;const Ya=en[`${ln}`]||tn.current[`${ln}`];return Dn?y.jsx(A.Fragment,{children:Dn({option:Ya,value:ln,onRemove:()=>{Zn(Cn.filter(Gr=>ln!==Gr)),Me==null||Me(ln)},disabled:H})},`${ln}-${Ar}`):y.jsx(sl,{withRemoveButton:!U&&!((Wr=en[`${ln}`])!=null&&Wr.disabled),onRemove:()=>{Zn(Cn.filter(Gr=>ln!==Gr)),Me==null||Me(ln)},unstyled:o,disabled:H,...Aa("pill"),children:(Ya==null?void 0:Ya.label)||ln},`${ln}-${Ar}`)});A.useEffect(()=>{C&&an.selectFirstOption()},[C,Wt]),A.useEffect(()=>{Cn.forEach(ln=>{`${ln}`in en&&(tn.current[`${ln}`]=en[`${ln}`])})},[en,Cn]);const Sr=y.jsx(Tn.ClearButton,{...Se,onClear:()=>{Be==null||Be(),Zn([]),er("")}}),Cr=Qee({data:jn,value:Cn}),hn=We&&Cn.length>0&&!H&&!U,gi=hn?{paddingInlineEnd:sj[f]??sj.sm}:void 0;return y.jsxs(y.Fragment,{children:[y.jsxs(Tn,{store:an,classNames:Wa,styles:Oa,unstyled:o,size:f,readOnly:U,__staticSelector:"MultiSelect",attributes:yn,onOptionSubmit:ln=>{O==null||O(ln),et&&er(""),an.updateSelectedOptionIndex("selected"),Cn.includes(en[`${ln}`].value)?(Zn(Cn.filter(Ar=>Ar!==en[`${ln}`].value)),Me==null||Me(en[`${ln}`].value)):Cn.lengthxe?an.openDropdown():an.toggleDropdown(),"data-expanded":an.dropdownOpened||void 0,id:rt,required:mn,mod:rn,attributes:yn,children:y.jsxs(sl.Group,{attributes:yn,disabled:H,unstyled:o,...Aa("pillsList",{style:gi}),children:[Ga,y.jsx(Tn.EventsTarget,{autoComplete:kt,withExpandedAttribute:!0,children:y.jsx(mu.Field,{...Sn,id:rt,placeholder:cn,type:!xe&&!cn?"hidden":"visible",...Aa("inputField"),unstyled:o,onFocus:ln=>{P==null||P(ln),wt&&xe&&an.openDropdown()},onBlur:ln=>{z==null||z(ln),an.closeDropdown(),er("")},onKeyDown:Vr,value:Wt,onChange:ln=>{er(ln.currentTarget.value),xe&&an.openDropdown(),C&&an.selectFirstOption()},disabled:H,readOnly:U||!xe,pointer:!xe})})]})})}),y.jsx(gy,{data:He?Cr:jn,hidden:U||H,filter:M,search:Wt,limit:N,hiddenWhenEmpty:!Re,withScrollArea:F,maxDropdownHeight:R,filterOptions:xe,value:Cn,checkIconPosition:Ve,withCheckIcon:ue,withAlignedLabels:Ie,nothingFoundMessage:Re,unstyled:o,labelId:Ce?`${rt}-label`:void 0,"aria-label":Ce?void 0:Pn["aria-label"],renderOption:Je,scrollAreaProps:gn})]}),y.jsx(Tn.HiddenInput,{name:Xe,valuesDivider:An,value:Cn,form:ie,disabled:H,...nn})]})});Ny.classes={...Ui.classes,...Tn.classes};Ny.displayName="@mantine/core/MultiSelect";var VI={root:"m_a513464",icon:"m_a4ceffb",loader:"m_b0920b15",body:"m_a49ed24",title:"m_3feedf16",description:"m_3d733a3a",closeButton:"m_919a4d88"};const ene={withCloseButton:!0},WI=(e,{radius:n,color:t})=>({root:{"--notification-radius":n===void 0?void 0:Gt(n),"--notification-color":t?ot(t,e):void 0}}),$y=De(e=>{const n=ke("Notification",ene,e),{className:t,color:i,radius:r,loading:a,withCloseButton:o,withBorder:l,title:f,icon:c,children:h,onClose:d,closeButtonProps:p,classNames:v,style:b,styles:w,unstyled:k,vars:_,mod:x,loaderProps:C,role:T,attributes:O,...E}=n,M=Qe({name:"Notification",classes:VI,props:n,className:t,style:b,classNames:v,styles:w,unstyled:k,attributes:O,vars:_,varsResolver:WI});return y.jsxs(ye,{...M("root"),mod:[{"data-with-icon":!!c||a,"data-with-border":l},x],role:T||"alert",...E,children:[c&&!a&&y.jsx("div",{...M("icon"),children:c}),a&&y.jsx(Fi,{size:28,color:i,...M("loader"),...C}),y.jsxs("div",{...M("body"),children:[f&&y.jsx("div",{...M("title"),children:f}),y.jsx(ye,{...M("description"),mod:{"data-with-title":!!f},children:h})]}),o&&y.jsx(Ou,{iconSize:16,color:"gray",...p,unstyled:k,onClick:N=>{var F;(F=p==null?void 0:p.onClick)==null||F.call(p,N),d==null||d()},...M("closeButton")})]})});$y.classes=VI;$y.varsResolver=WI;$y.displayName="@mantine/core/Notification";function GI(e,n){var t={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&n.indexOf(i)<0&&(t[i]=e[i]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,i=Object.getOwnPropertySymbols(e);r=l?r=r+uj("0",o-l):r=(r.substring(0,o)||"0")+"."+r.substring(o),t+r}function fj(e,n,t){if(["","-"].indexOf(e)!==-1)return e;var i=(e.indexOf(".")!==-1||t)&&n,r=CC(e),a=r.beforeDecimal,o=r.afterDecimal,l=r.hasNegation,f=parseFloat("0."+(o||"0")),c=o.length<=n?"0."+o:f.toFixed(n),h=c.split("."),d=a;a&&Number(h[0])&&(d=a.split("").reverse().reduce(function(w,k,_){return w.length>_?(Number(w[0])+Number(k)).toString()+w.substring(1,w.length):k+w},h[0]));var p=XI(h[1]||"",n,t),v=l?"-":"",b=i?".":"";return""+v+d+b+p}function Ql(e,n){if(e.value=e.value,e!==null){if(e.createTextRange){var t=e.createTextRange();return t.move("character",n),t.select(),!0}return e.selectionStart||e.selectionStart===0?(e.focus(),e.setSelectionRange(n,n),!0):(e.focus(),!1)}}var QI=nne(function(e,n){for(var t=0,i=0,r=e.length,a=n.length;e[t]===n[t]&&tt&&r-i>t;)i++;return{from:{start:t,end:r-i},to:{start:t,end:a-i}}}),one=function(e,n){var t=Math.min(e.selectionStart,n);return{from:{start:t,end:e.selectionEnd},to:{start:t,end:n}}};function sne(e,n,t){return Math.min(Math.max(e,n),t)}function mk(e){return Math.max(e.selectionStart,e.selectionEnd)}function lne(){return typeof navigator<"u"&&!(navigator.platform&&/iPhone|iPod/.test(navigator.platform))}function une(e){return{from:{start:0,end:0},to:{start:0,end:e.length},lastValue:""}}function fne(e){var n=e.currentValue,t=e.formattedValue,i=e.currentValueIndex,r=e.formattedValueIndex;return n[i]===t[r]}function cne(e,n,t,i,r,a,o){o===void 0&&(o=fne);var l=r.findIndex(function(T){return T}),f=e.slice(0,l);!n&&!t.startsWith(f)&&(n=f,t=f+t,i=i+f.length);for(var c=t.length,h=e.length,d={},p=new Array(c),v=0;v0&&p[_]===-1;)_--;var C=_===-1||p[_]===-1?0:p[_]+1;return C>x?x:i-C=0&&!t[n];)n--;n===-1&&(n=t.indexOf(!0))}else{for(;n<=r&&!t[n];)n++;n>r&&(n=t.lastIndexOf(!0))}return n===-1&&(n=r),n}function dne(e){for(var n=Array.from({length:e.length+1}).map(function(){return!0}),t=0,i=n.length;tM.length-o.length||EL||d>e.length-o.length)&&(R=d),e=e.substring(0,R),e=vne(C?"-"+e:e,r),e=(e.match(gne(b))||[]).join("");var B=e.indexOf(b);e=e.replace(new RegExp(KI(b),"g"),function(z,q){return q===B?".":""});var G=CC(e,r),U=G.beforeDecimal,H=G.afterDecimal,P=G.addNegation;return c.end-c.startV?!1:D>=ee.start&&Dt?t:e}function Ane(e){return e.toString().replace(".","").length}function One(e,n){return(typeof e=="number"?e=n)&&(t===void 0||e<=t)}const yk={size:"sm",step:1,clampBehavior:"blur",allowDecimal:!0,allowNegative:!0,withKeyboardEvents:!0,allowLeadingZeros:!0,trimLeadingZeroesOnBlur:!0,startValue:0,allowedDecimalSeparators:[".",","]},tB=(e,{size:n})=>({controls:{"--ni-chevron-size":Rn(n,"ni-chevron-size")}});function Tne(e,n,t){const i=e.toString(),r=eB.test(i),a=i.replace(/^0+(?=\d)/,""),o=parseFloat(a);if(Number.isNaN(o))return a;if(o>Number.MAX_SAFE_INTEGER)return n!==void 0?n:a;const l=Go(o,t,n);return r?`${l.toString().replace(/^0+(?=\d)/,"")}.`:l}function jne(e,n){if(e===""||e==="-")return e;const t=fh(e);return t===null?e:n.clampBehavior==="blur"?dg(t,n.min,n.max):t}const Bh=J1(e=>{const n=ke("NumberInput",yk,e),{className:t,classNames:i,styles:r,unstyled:a,vars:o,onChange:l,onValueChange:f,value:c,defaultValue:h,max:d,min:p,step:v,hideControls:b,rightSection:w,isAllowed:k,clampBehavior:_,onBlur:x,allowDecimal:C,decimalScale:T,onKeyDown:O,onKeyDownCapture:E,handlersRef:M,startValue:N,disabled:F,rightSectionPointerEvents:R,allowNegative:L,readOnly:B,size:G,rightSectionWidth:U,stepHoldInterval:H,stepHoldDelay:P,allowLeadingZeros:z,withKeyboardEvents:q,trimLeadingZeroesOnBlur:Y,allowedDecimalSeparators:D,selectAllOnFocus:V,onMinReached:W,onMaxReached:$,onFocus:X,attributes:ee,ref:re,...se}=n,ge=L??!0,ae=z??!0,le=Qe({name:"NumberInput",classes:pS,props:n,classNames:i,styles:r,unstyled:a,attributes:ee,vars:o,varsResolver:tB}),{resolvedClassNames:_e,resolvedStyles:ne}=qi({classNames:i,styles:r,props:n}),$e=A.useRef(pk(c)||pk(h)?"bigint":"number");pk(c)?$e.current="bigint":typeof c=="number"&&($e.current="number");const be=$e.current==="bigint",[Ce,Pe]=Mi({value:c,defaultValue:h,finalValue:"",onChange:l}),ve=P!==void 0&&H!==void 0,xe=A.useRef(null),Re=A.useRef(null),ue=A.useRef(0),Ie=typeof p=="number"?p:void 0,Ve=typeof d=="number"?d:void 0,He=typeof v=="number"?v:yk.step,Ke=typeof N=="number"?N:yk.startValue,Xe=Pv(p),ie=Pv(d),me=Pv(v)??BigInt(1),We=Pv(N)??BigInt(0),Ze=ze=>!nB(ze,ge)||ae&&mj.test(ze)?ze:fh(ze)??ze,Se=ze=>{const Fe=Number(ze);return Number.isSafeInteger(Fe)?Fe:void 0},nn=(ze,Fe)=>{Fe.source==="event"&&Pe(be?Ze(ze.value):One(ze.floatValue,ze.value)&&!Sne.test(ze.value)&&!(ae&&mj.test(ze.value))&&!Cne.test(ze.value)&&!eB.test(ze.value)?ze.floatValue:ze.value),f==null||f(ze,Fe)},cn=ze=>{const Fe=String(ze).match(/(?:\.(\d+))?(?:[eE]([+-]?\d+))?$/);return Fe?Math.max(0,(Fe[1]?Fe[1].length:0)-(Fe[2]?+Fe[2]:0)):0},An=ze=>{xe.current&&typeof ze<"u"&&xe.current.setSelectionRange(ze,ze)},mn=A.useRef(Q3);mn.current=()=>{if(be){if(!gk(Ce,ge))return;let tn;const an=Ce;if(typeof an=="bigint"){const Un=an+me;ie!==void 0&&Un>ie&&($==null||$()),tn=ie!==void 0&&Un>ie?ie:Un}else if(typeof an=="string"&&an!==""){const Un=fh(an);if(Un===null)return;const kt=Un+me;ie!==void 0&&kt>ie&&($==null||$()),tn=ie!==void 0&&kt>ie?ie:kt}else tn=dg(We,Xe,ie);const Ln=tn.toString();Pe(tn),f==null||f({floatValue:Se(tn),formattedValue:Ln,value:Ln},{source:"increment"}),setTimeout(()=>{var Un;return An((Un=xe.current)==null?void 0:Un.value.length)},0);return}if(!vk(Ce))return;let ze;const Fe=cn(Ce),Pn=cn(He),rt=Math.max(Fe,Pn),jn=10**rt;if(!vS(Ce)&&(typeof Ce!="number"||Number.isNaN(Ce)))ze=Go(Ke,Ie,Ve);else if(Ve!==void 0){const tn=(Math.round(Number(Ce)*jn)+Math.round(He*jn))/jn;tn>Ve&&($==null||$()),ze=tn<=Ve?tn:Ve}else ze=(Math.round(Number(Ce)*jn)+Math.round(He*jn))/jn;const en=ze.toFixed(rt);Pe(parseFloat(en)),f==null||f({floatValue:parseFloat(en),formattedValue:en,value:en},{source:"increment"}),setTimeout(()=>{var tn;return An((tn=xe.current)==null?void 0:tn.value.length)},0)};const rn=A.useRef(Q3);rn.current=()=>{if(be){if(!gk(Ce,ge))return;let an;const Ln=Xe!==void 0?Xe:ge?void 0:BigInt(0),Un=Ce;if(typeof Un=="bigint"){const Sn=Un-me;Ln!==void 0&&Sn{var Sn;return An((Sn=xe.current)==null?void 0:Sn.value.length)},0);return}if(!vk(Ce))return;let ze;const Fe=Ie!==void 0?Ie:ge?Number.MIN_SAFE_INTEGER:0,Pn=cn(Ce),rt=cn(He),jn=Math.max(Pn,rt),en=10**jn;if(!vS(Ce)&&typeof Ce!="number"||Number.isNaN(Ce))ze=Go(Ke,Fe,Ve);else{const an=(Math.round(Number(Ce)*en)-Math.round(He*en))/en;Fe!==void 0&&an{var an;return An((an=xe.current)==null?void 0:an.value.length)},0)};const Je=ze=>{var jn,en,tn;const Fe=ze.clipboardData.getData("text"),Pn=se.decimalSeparator||".",rt=(D||[".",","]).filter(an=>an!==Pn);if(rt.some(an=>Fe.includes(an))){ze.preventDefault();let an=Fe;rt.forEach(Un=>{an=an.split(Un).join(Pn)});const Ln=xe.current;if(Ln){const Un=Ln.selectionStart??0,kt=Ln.selectionEnd??0,Sn=Ln.value,Cn=Sn.substring(0,Un)+an+Sn.substring(kt);(en=(jn=Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype,"value"))==null?void 0:jn.set)==null||en.call(Ln,Cn),Ln.dispatchEvent(new Event("change",{bubbles:!0}));const Zn=Un+an.length;setTimeout(()=>An(Zn),0)}}(tn=se.onPaste)==null||tn.call(se,ze)},Dn=ze=>{var Fe,Pn;O==null||O(ze),!(B||!q)&&(ze.key==="ArrowUp"&&(ze.preventDefault(),(Fe=mn.current)==null||Fe.call(mn)),ze.key==="ArrowDown"&&(ze.preventDefault(),(Pn=rn.current)==null||Pn.call(rn)))},Me=ze=>{if(E==null||E(ze),ze.key==="Backspace"){const Fe=xe.current;Fe&&Fe.selectionStart===0&&Fe.selectionStart===Fe.selectionEnd&&(ze.preventDefault(),window.setTimeout(()=>An(0),0))}},Be=ze=>{V&&setTimeout(()=>ze.currentTarget.select(),0),X==null||X(ze)},On=ze=>{let Fe=Ce;be?(_==="blur"&&typeof Fe=="bigint"&&(Fe=dg(Fe,Xe,ie)),Y&&typeof Fe=="string"&&(Fe=jne(Fe,{min:Xe,max:ie,clampBehavior:_}))):(_==="blur"&&typeof Fe=="number"&&(Fe=Go(Fe,Ie,Ve)),Y&&typeof Fe=="string"&&cn(Fe)<15&&(Fe=Tne(Fe,Ve,Ie))),Ce!==Fe&&Pe(Fe),x==null||x(ze)};_g(M,{increment:mn.current,decrement:rn.current});const gn=ze=>{var Fe,Pn;ze?(Fe=mn.current)==null||Fe.call(mn):(Pn=rn.current)==null||Pn.call(rn),ue.current+=1},vn=ze=>{if(gn(ze),ve){const Fe=typeof H=="number"?H:H(ue.current);Re.current=window.setTimeout(()=>vn(ze),Fe)}},yn=(ze,Fe)=>{var Pn;ze.preventDefault(),(Pn=xe.current)==null||Pn.focus(),gn(Fe),ve&&(Re.current=window.setTimeout(()=>vn(Fe),P))},et=()=>{Re.current&&window.clearTimeout(Re.current),Re.current=null,ue.current=0},wt=y.jsxs("div",{...le("controls"),children:[y.jsx(pi,{...le("control"),tabIndex:-1,"aria-hidden":!0,disabled:F||typeof Ce=="number"&&Ve!==void 0&&Ce>=Ve||typeof Ce=="bigint"&&ie!==void 0&&Ce>=ie,mod:{direction:"up"},onMouseDown:ze=>ze.preventDefault(),onPointerDown:ze=>{yn(ze,!0)},onPointerUp:et,onPointerLeave:et,children:y.jsx(hj,{direction:"up"})}),y.jsx(pi,{...le("control"),tabIndex:-1,"aria-hidden":!0,disabled:F||typeof Ce=="number"&&Ie!==void 0&&Ce<=Ie||typeof Ce=="bigint"&&Xe!==void 0&&Ce<=Xe,mod:{direction:"down"},onMouseDown:ze=>ze.preventDefault(),onPointerDown:ze=>{yn(ze,!1)},onPointerUp:et,onPointerLeave:et,children:y.jsx(hj,{direction:"down"})})]});return y.jsx(Ui,{component:xne,allowNegative:L,className:dn(pS.root,t),size:G,...se,inputMode:be?"numeric":"decimal",readOnly:B,disabled:F,value:typeof Ce=="bigint"?Ce.toString():Ce,getInputRef:Bt(re,xe),onValueChange:nn,rightSection:b||B||!(be?gk(Ce,ge):vk(Ce))?w:w||wt,classNames:_e,styles:ne,unstyled:a,__staticSelector:"NumberInput",decimalScale:be?0:C?T:0,onPaste:Je,onFocus:Be,onKeyDown:Dn,onKeyDownCapture:Me,rightSectionPointerEvents:R??(F?"none":void 0),rightSectionWidth:U??`var(--ni-right-section-width-${G||"sm"})`,allowLeadingZeros:z,allowedDecimalSeparators:D,onBlur:On,attributes:ee,isAllowed:ze=>{if(!(!k||k(ze)))return!1;if(_!=="strict")return!0;if(!be)return Ene(ze.floatValue,Ie,Ve);if(ze.value===""||ze.value==="-")return!0;const Fe=fh(ze.value);return Fe===null?!0:(Xe===void 0||Fe>=Xe)&&(ie===void 0||Fe<=ie)}})});Bh.classes={...Ui.classes,...pS};Bh.varsResolver=tB;Bh.displayName="@mantine/core/NumberInput";function Mne({reveal:e}){return y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 256 256",style:{width:"var(--psi-icon-size)",height:"var(--psi-icon-size)"},children:e?y.jsxs(y.Fragment,{children:[y.jsx("path",{fill:"none",d:"M0 0h256v256H0z"}),y.jsx("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"16",d:"M48 40l160 176M154.91 157.6a40 40 0 01-53.82-59.2M135.53 88.71a40 40 0 0132.3 35.53"}),y.jsx("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"16",d:"M208.61 169.1C230.41 149.58 240 128 240 128s-32-72-112-72a126 126 0 00-20.68 1.68M74 68.6C33.23 89.24 16 128 16 128s32 72 112 72a118.05 118.05 0 0054-12.6"})]}):y.jsxs(y.Fragment,{children:[y.jsx("path",{fill:"none",d:"M0 0h256v256H0z"}),y.jsx("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"16",d:"M128 56c-80 0-112 72-112 72s32 72 112 72 112-72 112-72-32-72-112-72z"}),y.jsx("circle",{cx:"128",cy:"128",r:"40",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"16"})]})})}var gS={root:"m_f61ca620",input:"m_ccf8da4c",innerInput:"m_f2d85dd2",visibilityToggle:"m_b1072d44"};const Dne={visibilityToggleIcon:Mne,size:"sm"},iB=(e,{size:n})=>({root:{"--psi-icon-size":Rn(n,"psi-icon-size"),"--psi-button-size":Rn(n,"psi-button-size")}}),Ly=De(e=>{const n=ke("PasswordInput",Dne,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,required:f,error:c,leftSection:h,disabled:d,id:p,variant:v,inputContainer:b,description:w,label:k,size:_,errorProps:x,descriptionProps:C,labelProps:T,withAsterisk:O,inputWrapperOrder:E,wrapperProps:M,radius:N,rightSection:F,rightSectionWidth:R,rightSectionPointerEvents:L,leftSectionWidth:B,visible:G,defaultVisible:U,onVisibilityChange:H,visibilityToggleIcon:P,visibilityToggleButtonProps:z,rightSectionProps:q,leftSectionProps:Y,leftSectionPointerEvents:D,withErrorStyles:V,mod:W,attributes:$,...X}=n,ee=Qi(p),[re,se]=Mi({value:G,defaultValue:U,finalValue:!1,onChange:H}),ge=()=>se(!re),ae=Qe({name:"PasswordInput",classes:gS,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:$,vars:l,varsResolver:iB}),{resolvedClassNames:le,resolvedStyles:_e}=qi({classNames:t,styles:a,props:n}),{styleProps:ne,rest:$e}=Cu(X),be=(x==null?void 0:x.id)||`${ee}-error`,Ce=(C==null?void 0:C.id)||`${ee}-description`,Pe=`${c&&typeof c!="boolean"?be:""} ${w?Ce:""}`,ve=Pe.trim().length>0?Pe.trim():void 0,xe=y.jsx(Ot,{...ae("visibilityToggle"),disabled:d,radius:N,"aria-pressed":re,tabIndex:-1,"aria-label":"Toggle password visibility",...z,variant:(z==null?void 0:z.variant)??"subtle",color:"gray",unstyled:o,onTouchEnd:Re=>{var ue;Re.preventDefault(),(ue=z==null?void 0:z.onTouchEnd)==null||ue.call(z,Re),ge()},onMouseDown:Re=>{var ue;Re.preventDefault(),(ue=z==null?void 0:z.onMouseDown)==null||ue.call(z,Re),ge()},onKeyDown:Re=>{var ue;(ue=z==null?void 0:z.onKeyDown)==null||ue.call(z,Re),Re.key===" "&&(Re.preventDefault(),ge())},children:y.jsx(P,{reveal:re})});return y.jsx(It.Wrapper,{required:f,id:ee,label:k,error:c,description:w,size:_,classNames:le,styles:_e,__staticSelector:"PasswordInput",__stylesApiProps:n,unstyled:o,withAsterisk:O,inputWrapperOrder:E,inputContainer:b,variant:v,labelProps:{...T,htmlFor:ee},descriptionProps:{...C,id:Ce},errorProps:{...x,id:be},mod:W,attributes:$,...ae("root"),...ne,...M,children:y.jsx(It,{component:"div",error:c,leftSection:h,size:_,classNames:{...le,input:dn(gS.input,le==null?void 0:le.input)},styles:_e,radius:N,disabled:d,__staticSelector:"PasswordInput",__stylesApiProps:n,rightSectionWidth:R,rightSection:F??xe,variant:v,unstyled:o,leftSectionWidth:B,rightSectionPointerEvents:L||"all",rightSectionProps:q,leftSectionProps:Y,leftSectionPointerEvents:D,withAria:!1,withErrorStyles:V,attributes:$,children:y.jsx("input",{required:f,"data-invalid":!!c||void 0,"data-with-left-section":!!h||void 0,...ae("innerInput"),disabled:d,id:ee,...$e,"aria-describedby":ve,autoComplete:$e.autoComplete||"off",type:re?"text":"password"})})})});Ly.classes={...Ui.classes,...gS};Ly.varsResolver=iB;Ly.displayName="@mantine/core/PasswordInput";function Rne({offset:e,position:n,defaultOpened:t}){const[i,r]=A.useState(t),a=A.useRef(null),{x:o,y:l,elements:f,refs:c,update:h,placement:d}=U6({placement:n,middleware:[B6({crossAxis:!0,padding:5,rootBoundary:"document"})]}),p=d.includes("right")?e:n.includes("left")?e*-1:0,v=d.includes("bottom")?e:n.includes("top")?e*-1:0,b=A.useCallback(({clientX:w,clientY:k})=>{c.setPositionReference({getBoundingClientRect(){return{width:0,height:0,x:w,y:k,left:w+p,top:k+v,right:w,bottom:k}}})},[f.reference]);return A.useEffect(()=>{if(c.floating.current){const w=a.current;w.addEventListener("mousemove",b);const k=Ko(c.floating.current);return k.forEach(_=>{_.addEventListener("scroll",h)}),()=>{w.removeEventListener("mousemove",b),k.forEach(_=>{_.removeEventListener("scroll",h)})}}},[f.reference,c.floating.current,h,b,i]),{handleMouseMove:b,x:o,y:l,opened:i,setOpened:r,boundaryRef:a,floating:c.setFloating}}var Iy={tooltip:"m_1b3c8819",arrow:"m_f898399f"};const Pne={refProp:"ref",withinPortal:!0,offset:10,position:"right",zIndex:wa("popover")},rB=(e,{radius:n,color:t})=>({tooltip:{"--tooltip-radius":n===void 0?void 0:Gt(n),"--tooltip-bg":t?ot(t,e):void 0,"--tooltip-color":t?"var(--mantine-color-white)":void 0}}),By=De(e=>{const n=ke("TooltipFloating",Pne,e),{children:t,refProp:i,withinPortal:r,style:a,className:o,classNames:l,styles:f,unstyled:c,radius:h,color:d,label:p,offset:v,position:b,multiline:w,zIndex:k,disabled:_,defaultOpened:x,variant:C,vars:T,portalProps:O,attributes:E,ref:M,...N}=n,F=oi(),R=Qe({name:"TooltipFloating",props:n,classes:Iy,className:o,style:a,classNames:l,styles:f,unstyled:c,attributes:E,rootSelector:"tooltip",vars:T,varsResolver:rB}),{handleMouseMove:L,x:B,y:G,opened:U,boundaryRef:H,floating:P,setOpened:z}=Rne({offset:v,position:b,defaultOpened:x}),q=Su(t);if(!q)throw new Error("[@mantine/core] Tooltip.Floating component children should be an element or a component that accepts ref, fragments, strings, numbers and other primitive values are not supported");const Y=Bt(H,X1(q),M),D=q.props,V=$=>{var X;(X=D.onMouseEnter)==null||X.call(D,$),L($),z(!0)},W=$=>{var X;(X=D.onMouseLeave)==null||X.call(D,$),z(!1)};return y.jsxs(y.Fragment,{children:[y.jsx(rl,{...O,withinPortal:r,children:y.jsx(ye,{...N,...R("tooltip",{style:{...pz(a,F),zIndex:k,display:!_&&U?"block":"none",top:(G&&Math.round(G))??"",left:(B&&Math.round(B))??""}}),variant:C,ref:P,mod:{multiline:w},children:p})}),A.cloneElement(q,{...D,[i]:Y,onMouseEnter:V,onMouseLeave:W})]})});By.classes=Iy;By.varsResolver=rB;By.displayName="@mantine/core/TooltipFloating";const aB=A.createContext({withinGroup:!1}),Nne={openDelay:0,closeDelay:0};function AC(e){const{openDelay:n,closeDelay:t,children:i}=ke("TooltipGroup",Nne,e);return y.jsx(aB,{value:{withinGroup:!0},children:y.jsx(dQ,{delay:{open:n,close:t},children:i})})}AC.displayName="@mantine/core/TooltipGroup";AC.extend=e=>e;function $ne(e){if(e===void 0)return{shift:!0,flip:!0};const n={...e};return e.shift===void 0&&(n.shift=!0),e.flip===void 0&&(n.flip=!0),n}function zne(e){const n=$ne(e.middlewares),t=[qz(e.offset)];return n.shift&&t.push(B6(typeof n.shift=="boolean"?{padding:8}:{padding:8,...n.shift})),n.flip&&t.push(typeof n.flip=="boolean"?Eg():Eg(n.flip)),t.push(Hz({element:e.arrowRef,padding:e.arrowOffset})),n.inline?t.push(typeof n.inline=="boolean"?wh():wh(n.inline)):e.inline&&t.push(wh()),t}function Lne(e){var T,O,E;const[n,t]=A.useState(e.defaultOpened),i=typeof e.opened=="boolean"?e.opened:n,r=A.use(aB).withinGroup,a=Qi(),o=A.useCallback(M=>{t(M),M&&k(a)},[a]),{x:l,y:f,context:c,refs:h,placement:d,middlewareData:{arrow:{x:p,y:v}={}}}=U6({strategy:e.strategy,placement:e.position,open:i,onOpenChange:o,middleware:zne(e),whileElementsMounted:uS}),{delay:b,currentId:w,setCurrentId:k}=hQ(c,{id:a}),{getReferenceProps:_,getFloatingProps:x}=bQ([fQ(c,{enabled:(T=e.events)==null?void 0:T.hover,delay:r?b:{open:e.openDelay,close:e.closeDelay},mouseOnly:!((O=e.events)!=null&&O.touch)}),yQ(c,{enabled:(E=e.events)==null?void 0:E.focus,visibleOnly:!0}),kQ(c,{role:"tooltip"}),vQ(c,{enabled:typeof e.opened>"u"})]);es(()=>{var M;(M=e.onPositionChange)==null||M.call(e,d)},[d]);const C=i&&w&&w!==a;return{x:l,y:f,arrowX:p,arrowY:v,reference:h.setReference,floating:h.setFloating,getFloatingProps:x,getReferenceProps:_,isGroupPhase:C,opened:i,placement:d}}const Ine={position:"top",refProp:"ref",withinPortal:!0,arrowSize:4,arrowOffset:5,arrowRadius:0,arrowPosition:"side",offset:5,transitionProps:{duration:100,transition:"fade"},events:{hover:!0,focus:!1,touch:!1},zIndex:wa("popover"),middlewares:{flip:!0,shift:!0,inline:!1}},oB=(e,{radius:n,color:t,variant:i,autoContrast:r})=>{const a=e.variantColorResolver({theme:e,color:t||e.primaryColor,autoContrast:r,variant:i||"filled"});return{tooltip:{"--tooltip-radius":n===void 0?void 0:Gt(n),"--tooltip-bg":t?a.background:void 0,"--tooltip-color":t?a.color:void 0}}},mi=De(e=>{const n=ke("Tooltip",Ine,e),{children:t,position:i,refProp:r,label:a,openDelay:o,closeDelay:l,onPositionChange:f,opened:c,defaultOpened:h,withinPortal:d,radius:p,color:v,classNames:b,styles:w,unstyled:k,style:_,className:x,withArrow:C,arrowSize:T,arrowOffset:O,arrowRadius:E,arrowPosition:M,offset:N,transitionProps:F,multiline:R,events:L,zIndex:B,disabled:G,onClick:U,onMouseEnter:H,onMouseLeave:P,inline:z,variant:q,keepMounted:Y,vars:D,portalProps:V,mod:W,floatingStrategy:$,middlewares:X,autoContrast:ee,attributes:re,target:se,ref:ge,...ae}=n,{dir:le}=Au(),_e=A.useRef(null),ne=Lne({position:Jz(le,i),closeDelay:l,openDelay:o,onPositionChange:f,opened:c,defaultOpened:h,events:L,arrowRef:_e,arrowOffset:O,offset:typeof N=="number"?N+(C?T/2:0):N,inline:z,strategy:$,middlewares:X});A.useEffect(()=>{const Re=se instanceof HTMLElement?se:typeof se=="string"?document.querySelector(se):(se==null?void 0:se.current)||null;Re&&ne.reference(Re)},[se,ne]);const $e=Qe({name:"Tooltip",props:n,classes:Iy,className:x,style:_,classNames:b,styles:w,unstyled:k,attributes:re,rootSelector:"tooltip",vars:D,varsResolver:oB}),be=Su(t);if(!se&&!be)throw new Error("[@mantine/core] Tooltip component children should be an element or a component that accepts ref, fragments, strings, numbers and other primitive values are not supported");const Ce=$e("tooltip");if(se){const Re=F5(F,{duration:100,transition:"fade"});return y.jsx(y.Fragment,{children:y.jsx(rl,{...V,withinPortal:d,children:y.jsx(ts,{...Re,keepMounted:Y,mounted:!G&&!!ne.opened,duration:ne.isGroupPhase?10:Re.duration,children:ue=>y.jsxs(ye,{...ae,"data-fixed":$==="fixed"||void 0,variant:q,mod:[{multiline:R},W],...Ce,...ne.getFloatingProps({ref:ne.floating,className:Ce.className,style:{...Ce.style,...ue,zIndex:B,top:ne.y??0,left:ne.x??0}}),children:[a,y.jsx(Tg,{ref:_e,arrowX:ne.arrowX,arrowY:ne.arrowY,visible:C,position:ne.placement,arrowSize:T,arrowOffset:O,arrowRadius:E,arrowPosition:M,...$e("arrow")})]})})})})}const Pe=be.props,ve=Bt(ne.reference,X1(be),ge),xe=F5(F,{duration:100,transition:"fade"});return y.jsxs(y.Fragment,{children:[y.jsx(rl,{...V,withinPortal:d,children:y.jsx(ts,{...xe,keepMounted:Y,mounted:!G&&!!ne.opened,duration:ne.isGroupPhase?10:xe.duration,children:Re=>y.jsxs(ye,{...ae,"data-fixed":$==="fixed"||void 0,variant:q,mod:[{multiline:R},W],...ne.getFloatingProps({ref:ne.floating,className:$e("tooltip").className,style:{...$e("tooltip").style,...Re,zIndex:B,top:ne.y??0,left:ne.x??0}}),children:[a,y.jsx(Tg,{ref:_e,arrowX:ne.arrowX,arrowY:ne.arrowY,visible:C,position:ne.placement,arrowSize:T,arrowOffset:O,arrowRadius:E,arrowPosition:M,...$e("arrow")})]})})}),A.cloneElement(be,ne.getReferenceProps({onClick:U,onMouseEnter:H,onMouseLeave:P,onMouseMove:n.onMouseMove,onPointerDown:n.onPointerDown,onPointerEnter:n.onPointerEnter,...Pe,className:dn(x,Pe.className),[r]:ve}))]})});mi.classes=Iy;mi.varsResolver=oB;mi.displayName="@mantine/core/Tooltip";mi.Floating=By;mi.Group=AC;const Bne={size:"sm",withCheckIcon:!0,allowDeselect:!0,checkIconPosition:"left",openOnFocus:!0},ho=J1(e=>{const n=ke("Select",Bne,e),{classNames:t,styles:i,unstyled:r,vars:a,dropdownOpened:o,defaultDropdownOpened:l,onDropdownClose:f,onDropdownOpen:c,onFocus:h,onBlur:d,onClick:p,onChange:v,data:b,value:w,defaultValue:k,selectFirstOptionOnChange:_,selectFirstOptionOnDropdownOpen:x,onOptionSubmit:C,comboboxProps:T,readOnly:O,disabled:E,filter:M,limit:N,withScrollArea:F,maxDropdownHeight:R,size:L,searchable:B,rightSection:G,checkIconPosition:U,withCheckIcon:H,withAlignedLabels:P,nothingFoundMessage:z,name:q,form:Y,searchValue:D,defaultSearchValue:V,onSearchChange:W,allowDeselect:$,error:X,rightSectionPointerEvents:ee,id:re,clearable:se,clearSectionMode:ge,clearButtonProps:ae,hiddenInputProps:le,renderOption:_e,onClear:ne,autoComplete:$e,scrollAreaProps:be,__defaultRightSection:Ce,__clearSection:Pe,__clearable:ve,chevronColor:xe,autoSelectOnBlur:Re,openOnFocus:ue,attributes:Ie,...Ve}=n,He=A.useMemo(()=>hy(b),[b]),Ke=A.useRef({}),Xe=A.useMemo(()=>qm(He),[He]),ie=Qi(re),[me,We,Ze]=Mi({value:w,defaultValue:k,finalValue:null,onChange:v}),Se=me!=null?`${me}`in Xe?Xe[`${me}`]:Ke.current[`${me}`]:void 0,nn=dK(Se),[cn,An,mn]=Mi({value:D,defaultValue:V,finalValue:Se?Se.label:"",onChange:W}),rn=Hm({opened:o,defaultOpened:l,onDropdownOpen:()=>{c==null||c(),x?rn.selectFirstOption():rn.updateSelectedOptionIndex("active",{scrollIntoView:!0})},onDropdownClose:()=>{f==null||f(),setTimeout(rn.resetSelectedOption,0)}}),Je=gn=>{An(gn),rn.resetSelectedOption()},{resolvedClassNames:Dn,resolvedStyles:Me}=qi({props:n,styles:i,classNames:t});A.useEffect(()=>{_&&rn.selectFirstOption()},[_,cn]),A.useEffect(()=>{w===null&&Je(""),w!=null&&Se&&((nn==null?void 0:nn.value)!==Se.value||(nn==null?void 0:nn.label)!==Se.label)&&Je(Se.label)},[w,Se]),A.useEffect(()=>{var gn,vn;!Ze&&!mn&&Je(me!=null?`${me}`in Xe?(gn=Xe[`${me}`])==null?void 0:gn.label:((vn=Ke.current[`${me}`])==null?void 0:vn.label)||"":"")},[Xe,me]),A.useEffect(()=>{me&&`${me}`in Xe&&(Ke.current[`${me}`]=Xe[`${me}`])},[Xe,me]);const Be=y.jsx(Tn.ClearButton,{...ae,onClear:()=>{We(null,null),Je(""),ne==null||ne()}}),On=se&&!!me&&!E&&!O;return y.jsxs(y.Fragment,{children:[y.jsxs(Tn,{store:rn,__staticSelector:"Select",classNames:Dn,styles:Me,unstyled:r,readOnly:O,size:L,attributes:Ie,keepMounted:Re,onOptionSubmit:gn=>{C==null||C(gn);const vn=$&&`${Xe[gn].value}`==`${me}`?null:Xe[gn],yn=vn?vn.value:null;yn!==me&&We(yn,vn),!Ze&&Je(yn!=null&&(vn==null?void 0:vn.label)||""),rn.closeDropdown()},...T,children:[y.jsx(Tn.Target,{targetType:B?"input":"button",autoComplete:$e,withExpandedAttribute:!0,children:y.jsx(Ui,{id:ie,__defaultRightSection:y.jsx(Tn.Chevron,{size:L,error:X,unstyled:r,color:xe}),__clearSection:Be,__clearable:On,__clearSectionMode:ge,rightSection:G,rightSectionPointerEvents:ee||"none",...Ve,size:L,__staticSelector:"Select",disabled:E,readOnly:O||!B,value:cn,onChange:gn=>{Je(gn.currentTarget.value),rn.openDropdown(),_&&rn.selectFirstOption()},onFocus:gn=>{ue&&B&&rn.openDropdown(),h==null||h(gn)},onBlur:gn=>{Re&&rn.clickSelectedOption(),B&&rn.closeDropdown();const vn=me!=null&&(`${me}`in Xe?Xe[`${me}`]:Ke.current[`${me}`]);Je(vn&&vn.label||""),d==null||d(gn)},onClick:gn=>{B?rn.openDropdown():rn.toggleDropdown(),p==null||p(gn)},classNames:Dn,styles:Me,unstyled:r,pointer:!B,error:X,attributes:Ie})}),y.jsx(gy,{data:He,hidden:O||E,filter:M,search:cn,limit:N,hiddenWhenEmpty:!z,withScrollArea:F,maxDropdownHeight:R,filterOptions:!!B&&(Se==null?void 0:Se.label)!==cn,value:me,checkIconPosition:U,withCheckIcon:H,withAlignedLabels:P,nothingFoundMessage:z,unstyled:r,labelId:Ve.label?`${ie}-label`:void 0,"aria-label":Ve.label?void 0:Ve["aria-label"],renderOption:_e,scrollAreaProps:be})]}),y.jsx(Tn.HiddenInput,{value:me,name:q,form:Y,disabled:E,...le})]})});ho.classes={...Ui.classes,...Tn.classes};ho.displayName="@mantine/core/Select";function sB(e){if(e!==void 0)return typeof e=="number"?pe(e):e}function Fne({spacing:e,verticalSpacing:n,cols:t,minColWidth:i,autoRows:r,selector:a}){var d;const o=oi(),l=n===void 0?e:n,f=i!==void 0,c=xu({"--sg-spacing-x":Ut(qr(e)),"--sg-spacing-y":Ut(qr(l)),"--sg-auto-rows":r,...f?{"--sg-min-col-width":sB(i)}:{"--sg-cols":(d=qr(t))==null?void 0:d.toString()}}),h=Tt(o.breakpoints).reduce((p,v)=>(p[v]||(p[v]={}),typeof e=="object"&&e[v]!==void 0&&(p[v]["--sg-spacing-x"]=Ut(e[v])),typeof l=="object"&&l[v]!==void 0&&(p[v]["--sg-spacing-y"]=Ut(l[v])),!f&&typeof t=="object"&&t[v]!==void 0&&(p[v]["--sg-cols"]=t[v]),p),{});return y.jsx(Cc,{styles:c,media:Ph(Tt(h),o.breakpoints).filter(p=>Tt(h[p.value]).length>0).map(p=>({query:`(min-width: ${o.breakpoints[p.value]})`,styles:h[p.value]})),selector:a})}function bk(e){return typeof e=="object"&&e!==null?Tt(e):[]}function qne(e){return e.sort((n,t)=>Rh(n)-Rh(t))}function Hne({spacing:e,verticalSpacing:n,cols:t,minColWidth:i}){return qne(Array.from(new Set([...bk(e),...bk(n),...i!==void 0?[]:bk(t)])))}function Une({spacing:e,verticalSpacing:n,cols:t,minColWidth:i,autoRows:r,selector:a}){var d;const o=n===void 0?e:n,l=i!==void 0,f=xu({"--sg-spacing-x":Ut(qr(e)),"--sg-spacing-y":Ut(qr(o)),"--sg-auto-rows":r,...l?{"--sg-min-col-width":sB(i)}:{"--sg-cols":(d=qr(t))==null?void 0:d.toString()}}),c=Hne({spacing:e,verticalSpacing:n,cols:t,minColWidth:i}),h=c.reduce((p,v)=>(p[v]||(p[v]={}),typeof e=="object"&&e[v]!==void 0&&(p[v]["--sg-spacing-x"]=Ut(e[v])),typeof o=="object"&&o[v]!==void 0&&(p[v]["--sg-spacing-y"]=Ut(o[v])),!l&&typeof t=="object"&&t[v]!==void 0&&(p[v]["--sg-cols"]=t[v]),p),{});return y.jsx(Cc,{styles:f,container:c.map(p=>({query:`simple-grid (min-width: ${p})`,styles:h[p]})),selector:a})}var lB={container:"m_925c2d2c",root:"m_2415a157"};const Vne={cols:1,spacing:"md",type:"media"},Fh=De(e=>{const n=ke("SimpleGrid",Vne,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,cols:f,verticalSpacing:c,spacing:h,type:d,minColWidth:p,autoFlow:v,autoRows:b,attributes:w,...k}=n,_=Qe({name:"SimpleGrid",classes:lB,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:w,vars:l}),x=Q1(),C=p!==void 0?v||"auto-fill":void 0;return d==="container"?y.jsxs(y.Fragment,{children:[y.jsx(Une,{...n,selector:`.${x}`}),y.jsx("div",{..._("container"),children:y.jsx(ye,{..._("root",{className:x}),...k,"data-auto-cols":C})})]}):y.jsxs(y.Fragment,{children:[y.jsx(Fne,{...n,selector:`.${x}`}),y.jsx(ye,{..._("root",{className:x}),...k,"data-auto-cols":C})]})});Fh.classes=lB;Fh.displayName="@mantine/core/SimpleGrid";var uB={root:"m_6d731127"};const Wne={gap:"md",align:"stretch",justify:"flex-start"},fB=(e,{gap:n,align:t,justify:i})=>({root:{"--stack-gap":Ut(n),"--stack-align":t,"--stack-justify":i}}),ft=De(e=>{const n=ke("Stack",Wne,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,align:f,justify:c,gap:h,variant:d,attributes:p,...v}=n;return y.jsx(ye,{...Qe({name:"Stack",props:n,classes:uB,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:p,vars:l,varsResolver:fB})("root"),variant:d,...v})});ft.classes=uB;ft.varsResolver=fB;ft.displayName="@mantine/core/Stack";const[Gne,Yne]=ba("Table component was not found in the tree");var Wm={table:"m_b23fa0ef",th:"m_4e7aa4f3",tr:"m_4e7aa4fd",td:"m_4e7aa4ef",tbody:"m_b2404537",thead:"m_b242d975",caption:"m_9e5a3ac7",scrollContainer:"m_a100c15",scrollContainerInner:"m_62259741"};function Kne(e,n){if(!n)return;const t={};return n.columnBorder&&e.withColumnBorders&&(t["data-with-column-border"]=!0),n.rowBorder&&e.withRowBorders&&(t["data-with-row-border"]=!0),n.striped&&e.striped&&(t["data-striped"]=e.striped),n.highlightOnHover&&e.highlightOnHover&&(t["data-hover"]=!0),n.captionSide&&e.captionSide&&(t["data-side"]=e.captionSide),n.stickyHeader&&e.stickyHeader&&(t["data-sticky"]=!0),t}function Tu(e,n){const t=`Table${e.charAt(0).toUpperCase()}${e.slice(1)}`,i=De(r=>{const a=ke(t,{},r),{classNames:o,className:l,style:f,styles:c,...h}=a,d=Yne();return y.jsx(ye,{component:e,...Kne(d,n),...d.getStyles(e,{className:l,classNames:o,style:f,styles:c,props:a}),...h})});return i.displayName=`@mantine/core/${t}`,i.classes=Wm,i}const yS=Tu("th",{columnBorder:!0}),cB=Tu("td",{columnBorder:!0}),hg=Tu("tr",{rowBorder:!0,striped:!0,highlightOnHover:!0}),dB=Tu("thead",{stickyHeader:!0}),hB=Tu("tbody"),mB=Tu("tfoot"),pB=Tu("caption",{captionSide:!0}),Xne={type:"scrollarea"},vB=(e,{minWidth:n,maxHeight:t,type:i})=>({scrollContainer:{"--table-min-width":pe(n),"--table-max-height":pe(t),"--table-overflow":i==="native"?"auto":void 0}}),Fy=De(e=>{const n=ke("TableScrollContainer",Xne,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,children:f,minWidth:c,maxHeight:h,type:d,scrollAreaProps:p,attributes:v,...b}=n,w=Qe({name:"TableScrollContainer",classes:Wm,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:v,vars:l,varsResolver:vB,rootSelector:"scrollContainer"});return y.jsx(ye,{component:d==="scrollarea"?Ua:"div",...d==="scrollarea"?h?{offsetScrollbars:"xy",...p}:{offsetScrollbars:"x",...p}:{},...w("scrollContainer"),...b,children:y.jsx("div",{...w("scrollContainerInner"),children:f})})});Fy.classes=Wm;Fy.varsResolver=vB;Fy.displayName="@mantine/core/TableScrollContainer";function OC({data:e}){return y.jsxs(y.Fragment,{children:[e.caption&&y.jsx(pB,{children:e.caption}),e.head&&y.jsx(dB,{children:y.jsx(hg,{children:e.head.map((n,t)=>y.jsx(yS,{children:n},t))})}),e.body&&y.jsx(hB,{children:e.body.map((n,t)=>y.jsx(hg,{children:n.map((i,r)=>y.jsx(cB,{children:i},r))},t))}),e.foot&&y.jsx(mB,{children:y.jsx(hg,{children:e.foot.map((n,t)=>y.jsx(yS,{children:n},t))})})]})}OC.displayName="@mantine/core/TableDataRenderer";const Zne={withRowBorders:!0,verticalSpacing:7},gB=(e,{layout:n,captionSide:t,horizontalSpacing:i,verticalSpacing:r,borderColor:a,stripedColor:o,highlightOnHoverColor:l,striped:f,highlightOnHover:c,stickyHeaderOffset:h,stickyHeader:d})=>({table:{"--table-layout":n,"--table-caption-side":t,"--table-horizontal-spacing":Ut(i),"--table-vertical-spacing":Ut(r),"--table-border-color":a?ot(a,e):void 0,"--table-striped-color":f&&o?ot(o,e):void 0,"--table-highlight-on-hover-color":c&&l?ot(l,e):void 0,"--table-sticky-header-offset":d?pe(h):void 0}}),Wn=De(e=>{const n=ke("Table",Zne,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,horizontalSpacing:f,verticalSpacing:c,captionSide:h,stripedColor:d,highlightOnHoverColor:p,striped:v,highlightOnHover:b,withColumnBorders:w,withRowBorders:k,withTableBorder:_,borderColor:x,layout:C,data:T,children:O,stickyHeader:E,stickyHeaderOffset:M,mod:N,tabularNums:F,attributes:R,...L}=n,B=Qe({name:"Table",props:n,className:i,style:r,classes:Wm,classNames:t,styles:a,unstyled:o,attributes:R,rootSelector:"table",vars:l,varsResolver:gB});return y.jsx(Gne,{value:{getStyles:B,stickyHeader:E,striped:v===!0?"odd":v||void 0,highlightOnHover:b,withColumnBorders:w,withRowBorders:k,captionSide:h||"bottom"},children:y.jsx(ye,{component:"table",mod:[{"data-with-table-border":_,"data-tabular-nums":F},N],...B("table"),...L,children:O||!!T&&y.jsx(OC,{data:T})})})});Wn.classes=Wm;Wn.varsResolver=gB;Wn.displayName="@mantine/core/Table";Wn.Td=cB;Wn.Th=yS;Wn.Tr=hg;Wn.Thead=dB;Wn.Tbody=hB;Wn.Tfoot=mB;Wn.Caption=pB;Wn.ScrollContainer=Fy;Wn.DataRenderer=OC;const[Qne,EC]=ba("Tabs component was not found in the tree");var Gm={root:"m_89d60db1","list--default":"m_576c9d4",list:"m_89d33d6d",tab:"m_4ec4dce6",panel:"m_b0c91715",tabSection:"m_fc420b1f",tabLabel:"m_42bbd1ae","tab--default":"m_539e827b","list--outline":"m_6772fbd5","tab--outline":"m_b59ab47c","tab--pills":"m_c3381914"};const TC=De(e=>{const n=ke("TabsList",null,e),{children:t,className:i,grow:r,justify:a,classNames:o,styles:l,style:f,mod:c,...h}=n,d=EC();return y.jsx(ye,{...d.getStyles("list",{className:i,style:f,classNames:o,styles:l,props:n,variant:d.variant}),role:"tablist",variant:d.variant,mod:[{grow:r,orientation:d.orientation,placement:d.orientation==="vertical"&&d.placement,inverted:d.inverted},c],"aria-orientation":d.orientation,__vars:{"--tabs-justify":a},...h,children:t})});TC.classes=Gm;TC.displayName="@mantine/core/TabsList";const jC=De(e=>{const n=ke("TabsPanel",null,e),{children:t,className:i,value:r,classNames:a,styles:o,style:l,mod:f,keepMounted:c,...h}=n,d=Rm(),p=EC(),v=p.value===r,b=p.keepMounted||c,w=p.keepMountedMode!=="display-none",k=b&&w&&d!=="test"?y.jsx(A.Activity,{mode:v?"visible":"hidden",children:t}):b||v?t:null;return y.jsx(ye,{...p.getStyles("panel",{className:i,classNames:a,styles:o,style:[l,v?void 0:{display:"none"}],props:n}),mod:[{orientation:p.orientation},f],role:"tabpanel",id:p.getPanelId(r),"aria-labelledby":p.getTabId(r),...h,children:k})});jC.classes=Gm;jC.displayName="@mantine/core/TabsPanel";const MC=De(e=>{const n=ke("TabsTab",null,e),{className:t,children:i,rightSection:r,leftSection:a,value:o,onClick:l,onKeyDown:f,disabled:c,color:h,style:d,classNames:p,styles:v,vars:b,mod:w,tabIndex:k,..._}=n,x=oi(),{dir:C}=Au(),T=EC(),O=o===T.value,E=N=>{T.onChange(T.allowTabDeactivation&&o===T.value?null:o),l==null||l(N)},M={classNames:p,styles:v,props:n};return y.jsxs(pi,{...T.getStyles("tab",{className:t,style:d,variant:T.variant,...M}),disabled:c,unstyled:T.unstyled,variant:T.variant,mod:[{active:O,disabled:c,orientation:T.orientation,inverted:T.inverted,placement:T.orientation==="vertical"&&T.placement},w],role:"tab",id:T.getTabId(o),"aria-selected":O,tabIndex:k!==void 0?k:O||T.value===null?0:-1,"aria-controls":T.getPanelId(o),onClick:E,__vars:{"--tabs-color":h?ot(h,x):void 0},onKeyDown:_6({siblingSelector:'[role="tab"]',parentSelector:'[role="tablist"]',activateOnFocus:T.activateTabWithKeyboard,loop:T.loop,orientation:T.orientation||"horizontal",dir:C,onKeyDown:f}),..._,children:[a&&y.jsx("span",{...T.getStyles("tabSection",M),"data-position":"left",children:a}),i&&y.jsx("span",{...T.getStyles("tabLabel",M),children:i}),r&&y.jsx("span",{...T.getStyles("tabSection",M),"data-position":"right",children:r})]})});MC.classes=Gm;MC.displayName="@mantine/core/TabsTab";const pj="Tabs.Tab or Tabs.Panel component was rendered with invalid value or without value",Jne={keepMounted:!0,keepMountedMode:"activity",orientation:"horizontal",loop:!0,activateTabWithKeyboard:!0,variant:"default",placement:"left"},yB=(e,{radius:n,color:t,autoContrast:i})=>({root:{"--tabs-radius":Gt(n),"--tabs-color":ot(t,e),"--tabs-text-color":Z1(i,e)?Dm({color:t,theme:e,autoContrast:i}):void 0}}),_i=De(e=>{const n=ke("Tabs",Jne,e),{defaultValue:t,value:i,onChange:r,orientation:a,children:o,loop:l,id:f,activateTabWithKeyboard:c,allowTabDeactivation:h,variant:d,color:p,radius:v,inverted:b,placement:w,keepMounted:k,keepMountedMode:_,classNames:x,styles:C,unstyled:T,className:O,style:E,vars:M,autoContrast:N,mod:F,attributes:R,...L}=n,B=Qi(f),[G,U]=Mi({value:i,defaultValue:t,finalValue:null,onChange:r}),H=Qe({name:"Tabs",props:n,classes:Gm,className:O,style:E,classNames:x,styles:C,unstyled:T,attributes:R,vars:M,varsResolver:yB});return y.jsx(Qne,{value:{placement:w,value:G,orientation:a,id:B,loop:l,activateTabWithKeyboard:c,getTabId:o5(`${B}-tab`,pj),getPanelId:o5(`${B}-panel`,pj),onChange:U,allowTabDeactivation:h,variant:d,color:p,radius:v,inverted:b,keepMounted:k,keepMountedMode:_,unstyled:T,getStyles:H},children:y.jsx(ye,{id:B,variant:d,mod:[{orientation:a,inverted:a==="horizontal"&&b,placement:a==="vertical"&&w},F],...H("root"),...L,children:o})})});_i.classes=Gm;_i.varsResolver=yB;_i.displayName="@mantine/core/Tabs";_i.Tab=MC;_i.Panel=jC;_i.List=TC;function ete({data:e,value:n}){const t=n.map(i=>i.trim().toLowerCase());return e.reduce((i,r)=>(hu(r)?i.push({group:r.group,items:r.items.filter(a=>t.indexOf(a.label.toLowerCase().trim())===-1)}):t.indexOf(r.label.toLowerCase().trim())===-1&&i.push(r),i),[])}function nte(e,n){return e?n.split(new RegExp(`[${e.join("")}]`)).map(t=>t.trim()).filter(t=>t!==""):[n]}function vj({splitChars:e,allowDuplicates:n,maxTags:t,value:i,currentTags:r,isDuplicate:a,onDuplicate:o}){const l=nte(e,i),f=[];if(n)f.push(...r,...l);else{f.push(...r);for(const c of l)(a?h=>a(h,f):h=>f.some(d=>d.toLowerCase()===h.toLowerCase()))(c)?o==null||o(c):f.push(c)}return t?f.slice(0,t):f}const tte={maxTags:1/0,acceptValueOnBlur:!0,splitChars:[","],hiddenInputValuesDivider:",",openOnFocus:!0,size:"sm"},DC=De(e=>{const n=ke("TagsInput",tte,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,size:f,value:c,defaultValue:h,onChange:d,onKeyDown:p,maxTags:v,allowDuplicates:b,onDuplicate:w,variant:k,data:_,dropdownOpened:x,defaultDropdownOpened:C,onDropdownOpen:T,onDropdownClose:O,selectFirstOptionOnChange:E,selectFirstOptionOnDropdownOpen:M,onOptionSubmit:N,comboboxProps:F,filter:R,limit:L,withScrollArea:B,maxDropdownHeight:G,searchValue:U,defaultSearchValue:H,onSearchChange:P,readOnly:z,disabled:q,splitChars:Y,onFocus:D,onBlur:V,onPaste:W,radius:$,rightSection:X,rightSectionWidth:ee,rightSectionPointerEvents:re,rightSectionProps:se,leftSection:ge,leftSectionWidth:ae,leftSectionPointerEvents:le,leftSectionProps:_e,inputContainer:ne,inputWrapperOrder:$e,withAsterisk:be,required:Ce,labelProps:Pe,descriptionProps:ve,errorProps:xe,wrapperProps:Re,description:ue,label:Ie,error:Ve,withErrorStyles:He,name:Ke,form:Xe,id:ie,clearable:me,clearSectionMode:We,clearButtonProps:Ze,hiddenInputProps:Se,hiddenInputValuesDivider:nn,mod:cn,renderOption:An,renderPill:mn,onRemove:rn,onClear:Je,onMaxTags:Dn,scrollAreaProps:Me,acceptValueOnBlur:Be,isDuplicate:On,openOnFocus:gn,attributes:vn,ref:yn,loading:et,loadingPosition:wt,...ze}=n,Fe=Qi(ie),Pn=hy(_),rt=qm(Pn),jn=A.useRef(null),en=Bt(jn,yn),tn=Hm({opened:x,defaultOpened:C,onDropdownOpen:()=>{T==null||T(),M&&tn.selectFirstOption()},onDropdownClose:()=>{O==null||O(),tn.resetSelectedOption()}}),{styleProps:an,rest:{type:Ln,autoComplete:Un,...kt}}=Cu(ze),[Sn,Cn]=Mi({value:c,defaultValue:h,finalValue:[],onChange:d}),[Zn,Wt]=Mi({value:U,defaultValue:H,finalValue:"",onChange:P}),Ai=hn=>{Wt(hn),tn.resetSelectedOption()},er=Qe({name:"TagsInput",classes:{},props:n,classNames:t,styles:a,unstyled:o}),{resolvedClassNames:Aa,resolvedStyles:Wa}=qi({props:n,styles:a,classNames:t}),Oa=hn=>{if((On?On(hn,Sn):Sn.some(gi=>gi.toLowerCase()===hn.toLowerCase()))&&(w==null||w(hn),!b)){Ai("");return}if(Sn.length>=v){Dn==null||Dn(hn);return}N==null||N(hn),Ai(""),hn.length>0&&Cn([...Sn,hn])},Vr=hn=>{if(p==null||p(hn),hn.isPropagationStopped())return;const gi=Zn.trim(),{length:ln}=gi;if(Y.includes(hn.key)&&ln>0&&(Cn(vj({splitChars:Y,allowDuplicates:b,maxTags:v,value:Zn,currentTags:Sn,isDuplicate:On,onDuplicate:w})),Ai(""),hn.preventDefault()),hn.key==="Enter"&&ln>0&&!hn.nativeEvent.isComposing){if(hn.preventDefault(),document.querySelector(`#${tn.listId} [data-combobox-option][data-combobox-selected]`))return;Oa(gi)}hn.key==="Backspace"&&ln===0&&Sn.length>0&&!hn.nativeEvent.isComposing&&!z&&(rn==null||rn(Sn[Sn.length-1]),Cn(Sn.slice(0,Sn.length-1)))},Ga=hn=>{W==null||W(hn),hn.preventDefault(),hn.clipboardData&&(Cn(vj({splitChars:Y,allowDuplicates:b,maxTags:v,value:`${Zn}${hn.clipboardData.getData("text/plain")}`,currentTags:Sn,isDuplicate:On,onDuplicate:w})),Ai(""))},Sr=Sn.map((hn,gi)=>{const ln=()=>{const Ar=Sn.slice();Ar.splice(gi,1),Cn(Ar),rn==null||rn(hn)};return mn?y.jsx(A.Fragment,{children:mn({option:rt[hn]||{value:hn,label:hn,disabled:!1},value:hn,onRemove:ln,disabled:q||z})},`${hn}-${gi}`):y.jsx(sl,{withRemoveButton:!z,onRemove:ln,unstyled:o,disabled:q,attributes:vn,...er("pill"),children:hn},`${hn}-${gi}`)});A.useEffect(()=>{E&&tn.selectFirstOption()},[E,Sn,Zn]);const Cr=y.jsx(Tn.ClearButton,{...Ze,onClear:()=>{var hn;Cn([]),Ai(""),(hn=jn.current)==null||hn.focus(),tn.openDropdown(),Je==null||Je()}});return y.jsxs(y.Fragment,{children:[y.jsxs(Tn,{store:tn,classNames:Aa,styles:Wa,unstyled:o,size:f,readOnly:z,__staticSelector:"TagsInput",attributes:vn,onOptionSubmit:hn=>{N==null||N(hn),Ai(""),Sn.length>=v?Dn==null||Dn(hn):Cn([...Sn,rt[hn].value]),tn.resetSelectedOption()},...F,children:[y.jsx(Tn.DropdownTarget,{children:y.jsx(mu,{...an,__staticSelector:"TagsInput",classNames:Aa,styles:Wa,unstyled:o,size:f,className:i,style:r,variant:k,disabled:q,radius:$,rightSection:X,__clearSection:Cr,__clearable:me&&Sn.length>0&&!q&&!z,__clearSectionMode:We,rightSectionWidth:ee,rightSectionPointerEvents:re,rightSectionProps:se,leftSection:ge,leftSectionWidth:ae,leftSectionPointerEvents:le,leftSectionProps:_e,loading:et,loadingPosition:wt,inputContainer:ne,inputWrapperOrder:$e,withAsterisk:be,required:Ce,labelProps:Pe,descriptionProps:ve,errorProps:xe,wrapperProps:Re,description:ue,label:Ie,error:Ve,withErrorStyles:He,__stylesApiProps:{...n,multiline:!0},id:Fe,mod:cn,attributes:vn,children:y.jsxs(sl.Group,{disabled:q,unstyled:o,...er("pillsList"),children:[Sr,y.jsx(Tn.EventsTarget,{autoComplete:Un,withExpandedAttribute:!0,children:y.jsx(mu.Field,{...kt,ref:en,...er("inputField"),unstyled:o,onKeyDown:Vr,onFocus:hn=>{D==null||D(hn),gn&&tn.openDropdown()},onBlur:hn=>{V==null||V(hn),Be&&Oa(Zn),tn.closeDropdown()},onPaste:Ga,value:Zn,onChange:hn=>Ai(hn.currentTarget.value),required:Ce&&Sn.length===0,disabled:q,readOnly:z,id:Fe})})]})})}),y.jsx(gy,{data:ete({data:Pn,value:Sn}),hidden:z||q,filter:R,search:Zn,limit:L,hiddenWhenEmpty:!0,withScrollArea:B,maxDropdownHeight:G,unstyled:o,labelId:Ie?`${Fe}-label`:void 0,"aria-label":Ie?void 0:ze["aria-label"],renderOption:An,scrollAreaProps:Me})]}),y.jsx(Tn.HiddenInput,{name:Ke,form:Xe,value:Sn,valuesDivider:nn,disabled:q,...Se})]})});DC.classes={...Ui.classes,...Tn.classes};DC.displayName="@mantine/core/TagsInput";const ll=De(e=>y.jsx(Ui,{component:"input",...ke("TextInput",null,e),__staticSelector:"TextInput"}));ll.classes=Ui.classes;ll.displayName="@mantine/core/TextInput";const[ite,rte]=ba("Timeline component was not found in tree");var RC={root:"m_43657ece",itemTitle:"m_2ebe8099",item:"m_436178ff",itemBullet:"m_8affcee1",itemBody:"m_540e8f41"};const PC=De(e=>{const{classNames:n,className:t,style:i,styles:r,vars:a,__active:o,__align:l,__lineActive:f,__vars:c,bullet:h,radius:d,color:p,lineVariant:v,children:b,title:w,mod:k,..._}=ke("TimelineItem",null,e),x=rte(),C=oi(),T={classNames:n,styles:r};return y.jsxs(ye,{...x.getStyles("item",{...T,className:t,style:i}),mod:[{"line-active":f,active:o},k],__vars:{"--tli-radius":d!==void 0?Gt(d):void 0,"--tli-color":p?ot(p,C):void 0,"--tli-border-style":v||void 0},..._,children:[y.jsx(ye,{...x.getStyles("itemBullet",T),mod:{"with-child":!!h,align:l,active:o},children:h}),y.jsxs("div",{...x.getStyles("itemBody",T),children:[w&&y.jsx("div",{...x.getStyles("itemTitle",T),children:w}),y.jsx("div",{...x.getStyles("itemContent",T),children:b})]})]})});PC.classes=RC;PC.displayName="@mantine/core/TimelineItem";const ate={active:-1,align:"left"},bB=(e,{bulletSize:n,lineWidth:t,radius:i,color:r,autoContrast:a})=>({root:{"--tl-bullet-size":pe(n),"--tl-line-width":pe(t),"--tl-radius":i===void 0?void 0:Gt(i),"--tl-color":r?ot(r,e):void 0,"--tl-icon-color":Z1(a,e)?Dm({color:r,theme:e,autoContrast:a}):void 0}}),Zf=De(e=>{const n=ke("Timeline",ate,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,children:f,active:c,color:h,radius:d,bulletSize:p,align:v,lineWidth:b,reverseActive:w,mod:k,autoContrast:_,attributes:x,...C}=n,T=Qe({name:"Timeline",classes:RC,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:x,vars:l,varsResolver:bB}),O=A.Children.toArray(f),E=O.map((M,N)=>{var F,R;return A.cloneElement(M,{unstyled:o,__align:v,__active:((F=M.props)==null?void 0:F.active)||(w?c>=O.length-N-1:c>=N),__lineActive:((R=M.props)==null?void 0:R.lineActive)||(w?c>=O.length-N-1:c-1>=N)})});return y.jsx(ite,{value:{getStyles:T},children:y.jsx(ye,{...T("root"),mod:[{align:v},k],...C,children:E})})});Zf.classes=RC;Zf.varsResolver=bB;Zf.displayName="@mantine/core/Timeline";Zf.Item=PC;const ote=["h1","h2","h3","h4","h5","h6"],ste=["xs","sm","md","lg","xl"];function lte(e,n){const t=n!==void 0?n:`h${e}`;return ote.includes(t)?{fontSize:`var(--mantine-${t}-font-size)`,fontWeight:`var(--mantine-${t}-font-weight)`,lineHeight:`var(--mantine-${t}-line-height)`}:ste.includes(t)?{fontSize:`var(--mantine-font-size-${t})`,fontWeight:`var(--mantine-h${e}-font-weight)`,lineHeight:`var(--mantine-h${e}-line-height)`}:{fontSize:pe(t),fontWeight:`var(--mantine-h${e}-font-weight)`,lineHeight:`var(--mantine-h${e}-line-height)`}}var wB={root:"m_8a5d1357"};const ute={order:1},kB=(e,{order:n,size:t,lineClamp:i,textWrap:r})=>{const a=lte(n||1,t);return{root:{"--title-fw":a.fontWeight,"--title-lh":a.lineHeight,"--title-fz":a.fontSize,"--title-line-clamp":typeof i=="number"?i.toString():void 0,"--title-text-wrap":r}}},ju=De(e=>{const n=ke("Title",ute,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,order:l,vars:f,size:c,variant:h,lineClamp:d,textWrap:p,mod:v,attributes:b,...w}=n,k=Qe({name:"Title",props:n,classes:wB,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:b,vars:f,varsResolver:kB});return[1,2,3,4,5,6].includes(l)?y.jsx(ye,{...k("root"),component:`h${l}`,variant:h,mod:[{order:l,"data-line-clamp":typeof d=="number"},v],size:c,...w}):null});ju.classes=wB;ju.varsResolver=kB;ju.displayName="@mantine/core/Title";const NC=A.createContext(null);NC.displayName="@mantine/modals/ModalsContext";function fte(){const e=A.use(NC);if(!e)throw new Error("[@mantine/modals] useModals hook was called outside of context, wrap your app with ModalsProvider component");return e}const[cte,Mu]=pK("mantine-modals"),dte=e=>{const n=e.modalId||el();return Mu("openModal")({...e,modalId:n}),n},hte=e=>{const n=e.modalId||el();return Mu("openConfirmModal")({...e,modalId:n}),n},mte=e=>{const n=e.modalId||el();return Mu("openContextModal")({...e,modalId:n}),n},pte=Mu("closeModal"),vte=Mu("closeAllModals"),gte=e=>Mu("updateModal")(e),yte=e=>Mu("updateContextModal")(e),Io={open:dte,close:pte,closeAll:vte,openConfirmModal:hte,openContextModal:mte,updateModal:gte,updateContextModal:yte};function bte({id:e,cancelProps:n,confirmProps:t,labels:i={cancel:"",confirm:""},closeOnConfirm:r=!0,closeOnCancel:a=!0,groupProps:o,onCancel:l,onConfirm:f,children:c}){const{cancel:h,confirm:d}=i,p=fte(),v=w=>{typeof(n==null?void 0:n.onClick)=="function"&&(n==null||n.onClick(w)),typeof l=="function"&&l(),a&&p.closeModal(e)},b=w=>{typeof(t==null?void 0:t.onClick)=="function"&&(t==null||t.onClick(w)),typeof f=="function"&&f(),r&&p.closeModal(e)};return y.jsxs(y.Fragment,{children:[c&&y.jsx(ye,{mb:"md",children:c}),y.jsxs(un,{mt:c?0:"md",justify:"flex-end",...o,children:[y.jsx(Rt,{variant:"default",...n,onClick:v,children:(n==null?void 0:n.children)||h}),y.jsx(Rt,{...t,onClick:b,children:(t==null?void 0:t.children)||d})]})]})}function gj(e,n){var t,i,r,a;n&&e.type==="confirm"&&((i=(t=e.props).onCancel)==null||i.call(t)),(a=(r=e.props).onClose)==null||a.call(r)}function wte(e,n){var t;switch(n.type){case"OPEN":return{current:n.modal,modals:[...e.modals,n.modal]};case"CLOSE":{if(!e.modals.find(r=>r.id===n.modalId))return e;const i=e.modals.filter(r=>r.id!==n.modalId);return{current:i[i.length-1]||e.current,modals:i}}case"CLOSE_ALL":return e.modals.length?{current:e.current,modals:[]}:e;case"UPDATE":{const{modalId:i,newProps:r}=n,a=e.modals.map(l=>l.id!==i?l:l.type==="content"||l.type==="confirm"?{...l,props:{...l.props,...r}}:l.type==="context"?{...l,props:{...l.props,...r,innerProps:{...l.props.innerProps,...r.innerProps}}}:l),o=((t=e.current)==null?void 0:t.id)===i&&a.find(l=>l.id===i)||e.current;return{...e,modals:a,current:o}}default:return e}}function kte(e){if(!e)return{confirmProps:{},modalProps:{}};const{id:n,children:t,onCancel:i,onConfirm:r,closeOnConfirm:a,closeOnCancel:o,cancelProps:l,confirmProps:f,groupProps:c,labels:h,...d}=e;return{confirmProps:{id:n,children:t,onCancel:i,onConfirm:r,closeOnConfirm:a,closeOnCancel:o,cancelProps:l,confirmProps:f,groupProps:c,labels:h},modalProps:{id:n,...d}}}function _te({children:e,modalProps:n,labels:t,modals:i}){const[r,a]=A.useReducer(wte,{modals:[],current:null}),o=A.useRef(r);o.current=r;const l=A.useRef(!1),f=A.useCallback(C=>{l.current||(l.current=!0,o.current.modals.concat().reverse().forEach(T=>{gj(T,C)}),l.current=!1),a({type:"CLOSE_ALL",canceled:C})},[o,a]),c=A.useCallback(({modalId:C,...T})=>{const O=C||el();return a({type:"OPEN",modal:{id:O,type:"content",props:T}}),O},[a]),h=A.useCallback(({modalId:C,...T})=>{const O=C||el();return a({type:"OPEN",modal:{id:O,type:"confirm",props:T}}),O},[a]),d=A.useCallback((C,{modalId:T,...O})=>{const E=T||el();return a({type:"OPEN",modal:{id:E,type:"context",props:O,ctx:C}}),E},[a]),p=A.useCallback((C,T)=>{if(!l.current){const O=o.current.modals.find(E=>E.id===C);O&&(l.current=!0,gj(O,T),l.current=!1)}a({type:"CLOSE",modalId:C,canceled:T})},[o,a]),v=A.useCallback(({modalId:C,...T})=>{a({type:"UPDATE",modalId:C,newProps:T})},[a]),b=A.useCallback(({modalId:C,...T})=>{a({type:"UPDATE",modalId:C,newProps:T})},[a]);cte({openModal:c,openConfirmModal:h,openContextModal:({modal:C,...T})=>d(C,T),closeModal:p,closeContextModal:p,closeAllModals:f,updateModal:v,updateContextModal:b});const w={modalProps:n||{},modals:r.modals,openModal:c,openConfirmModal:h,openContextModal:d,closeModal:p,closeContextModal:p,closeAll:f,updateModal:v,updateContextModal:b},k=()=>{const C=o.current.current;switch(C==null?void 0:C.type){case"context":{const{innerProps:T,...O}=C.props,E=i[C.ctx];return{modalProps:O,content:y.jsx(E,{innerProps:T,context:w,id:C.id})}}case"confirm":{const{modalProps:T,confirmProps:O}=kte(C.props);return{modalProps:T,content:y.jsx(bte,{...O,id:C.id,labels:C.props.labels||t})}}case"content":{const{children:T,...O}=C.props;return{modalProps:O,content:T}}default:return{modalProps:{},content:null}}},{modalProps:_,content:x}=k();return y.jsxs(NC,{value:w,children:[y.jsx(Ur,{zIndex:wa("modal")+1,...n,..._,opened:r.modals.length>0,onClose:()=>{var C;return p((C=r.current)==null?void 0:C.id)},children:x}),e]})}function xte(e){let n=e,t=!1;const i=new Set;return{getState(){return n},updateState(r){n=typeof r=="function"?r(n):r},setState(r){this.updateState(r),i.forEach(a=>a(n))},initialize(r){t||(n=r,t=!0)},subscribe(r){return i.add(r),()=>i.delete(r)}}}function Ste(e){return A.useSyncExternalStore(e.subscribe,()=>e.getState(),()=>e.getState())}function Cte(e,n,t){const i=[],r=[],a={};for(const o of e){const l=o.position||n;a[l]=a[l]||0,a[l]+=1,a[l]<=t?r.push(o):i.push(o)}return{notifications:r,queue:i}}const Ate=()=>xte({notifications:[],queue:[],defaultPosition:"bottom-right",limit:5}),Du=Ate(),Ote=(e=Du)=>Ste(e);function $c(e,n){const t=e.getState(),i=Cte(n([...t.notifications,...t.queue]),t.defaultPosition,t.limit);e.setState({notifications:i.notifications,queue:i.queue,limit:t.limit,defaultPosition:t.defaultPosition})}function Ete(e,n=Du){const t=e.id||el();return $c(n,i=>e.id&&i.some(r=>r.id===e.id)?i:[...i,{...e,id:t}]),t}function _B(e,n=Du){return $c(n,t=>t.filter(i=>{var r;return i.id===e?((r=i.onClose)==null||r.call(i,i),!1):!0})),e}function Tte(e,n=Du){return $c(n,t=>t.map(i=>i.id===e.id?{...i,...e}:i)),e.id}function jte(e=Du){$c(e,()=>[])}function Mte(e=Du){$c(e,n=>n.slice(0,e.getState().limit))}const $n={show:Ete,hide:_B,update:Tte,clean:jte,cleanQueue:Mte,updateState:$c},xB=["bottom-center","bottom-left","bottom-right","top-center","top-left","top-right"];function Dte(e,n){return e.reduce((t,i)=>(t[i.position||n].push(i),t),xB.reduce((t,i)=>(t[i]=[],t),{}))}const yj={left:"translateX(-100%)",right:"translateX(100%)","top-center":"translateY(-100%)","bottom-center":"translateY(100%)"},Rte={left:"translateX(0)",right:"translateX(0)","top-center":"translateY(0)","bottom-center":"translateY(0)"};function Pte({state:e,maxHeight:n,position:t,transitionDuration:i}){const[r,a]=t.split("-"),o=a==="center"?`${r}-center`:a,l={opacity:0,maxHeight:n,transform:yj[o],transitionDuration:`${i}ms, ${i}ms, ${i}ms`,transitionTimingFunction:"cubic-bezier(.51,.3,0,1.21), cubic-bezier(.51,.3,0,1.21), linear",transitionProperty:"opacity, transform, max-height"},f={opacity:1,transform:Rte[o]},c={opacity:0,maxHeight:0,transform:yj[o]};return{...l,...{entering:f,entered:f,exiting:c,exited:c}[e]}}function Nte(e,n){return typeof n=="number"?n:n===!1||e===!1?!1:e}function SB({data:e,onHide:n,autoClose:t,paused:i,onHoverStart:r,onHoverEnd:a,...o}){const{autoClose:l,message:f,onOpen:c,...h}=e,d=Nte(t,e.autoClose),p=A.useRef(-1),[v,b]=A.useState(!1),w=()=>window.clearTimeout(p.current),k=()=>{n(e.id),w()},_=()=>{w(),typeof d=="number"&&(p.current=window.setTimeout(k,d))},x=()=>{b(!0),r==null||r()},C=()=>{b(!1),a==null||a()};return A.useEffect(()=>{var T;(T=e.onOpen)==null||T.call(e,e)},[]),A.useEffect(()=>(_(),w),[d]),A.useEffect(()=>(i||v?w():_(),w),[i,v]),y.jsx($y,{...o,...h,onClose:k,onMouseEnter:x,onMouseLeave:C,children:f})}SB.displayName="@mantine/notifications/NotificationContainer";var CB={root:"m_b37d9ac7",notification:"m_5ed0edd0"};function bS(){return bS=Object.assign?Object.assign.bind():function(e){for(var n=1;n({root:{"--notifications-z-index":n==null?void 0:n.toString(),"--notifications-container-width":pe(t)}}),wo=De(e=>{const n=ke("Notifications",Yte,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,attributes:f,position:c,autoClose:h,transitionDuration:d,containerWidth:p,notificationMaxHeight:v,limit:b,zIndex:w,store:k,portalProps:_,withinPortal:x,pauseResetOnHover:C,...T}=n,O=oi(),E=Ote(k),M=fK(),N=C6(),F=A.useRef({}),R=A.useRef(0),[L,B]=A.useState(0),G=A.useCallback(()=>B(Y=>Y+1),[]),U=A.useCallback(()=>B(Y=>Math.max(0,Y-1)),[]),H=O.respectReducedMotion&&N?1:d,P=Qe({name:"Notifications",classes:CB,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:f,vars:l,varsResolver:EB});A.useEffect(()=>{k==null||k.updateState(Y=>({...Y,limit:b||5,defaultPosition:c}))},[b,c]),es(()=>{E.notifications.length>R.current&&setTimeout(()=>M(),0),R.current=E.notifications.length},[E.notifications]);const z=Dte(E.notifications,c),q=xB.reduce((Y,D)=>(Y[D]=z[D].map(({style:V,...W})=>y.jsx(Gte,{timeout:H,onEnter:()=>F.current[W.id].offsetHeight,nodeRef:{current:F.current[W.id]},children:$=>y.jsx(SB,{ref:X=>{X&&(F.current[W.id]=X)},data:W,onHide:X=>_B(X,k),autoClose:h,paused:C==="all"?L>0:!1,onHoverStart:G,onHoverEnd:U,...P("notification",{style:{...Pte({state:$,position:D,transitionDuration:H,maxHeight:v}),...V}})})},W.id)),Y),{});return y.jsxs(rl,{withinPortal:x,..._,children:[y.jsx(ye,{...P("root"),"data-position":"top-center",...T,children:y.jsx(Us,{children:q["top-center"]})}),y.jsx(ye,{...P("root"),"data-position":"top-left",...T,children:y.jsx(Us,{children:q["top-left"]})}),y.jsx(ye,{...P("root",{className:du.classNames.fullWidth}),"data-position":"top-right",...T,children:y.jsx(Us,{children:q["top-right"]})}),y.jsx(ye,{...P("root",{className:du.classNames.fullWidth}),"data-position":"bottom-right",...T,children:y.jsx(Us,{children:q["bottom-right"]})}),y.jsx(ye,{...P("root"),"data-position":"bottom-left",...T,children:y.jsx(Us,{children:q["bottom-left"]})}),y.jsx(ye,{...P("root"),"data-position":"bottom-center",...T,children:y.jsx(Us,{children:q["bottom-center"]})})]})});wo.classes=CB;wo.varsResolver=EB;wo.displayName="@mantine/notifications/Notifications";wo.show=$n.show;wo.hide=$n.hide;wo.update=$n.update;wo.clean=$n.clean;wo.cleanQueue=$n.cleanQueue;wo.updateState=$n.updateState;var xk={exports:{}},Vd={},Sk={exports:{}},Ck={};/** - * @license React - * scheduler.production.js - * - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var xj;function Kte(){return xj||(xj=1,(function(e){function n(P,z){var q=P.length;P.push(z);e:for(;0>>1,D=P[Y];if(0>>1;Yr($,q))Xr(ee,$)?(P[Y]=ee,P[X]=q,Y=X):(P[Y]=$,P[W]=q,Y=W);else if(Xr(ee,q))P[Y]=ee,P[X]=q,Y=X;else break e}}return z}function r(P,z){var q=P.sortIndex-z.sortIndex;return q!==0?q:P.id-z.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,l=o.now();e.unstable_now=function(){return o.now()-l}}var f=[],c=[],h=1,d=null,p=3,v=!1,b=!1,w=!1,k=!1,_=typeof setTimeout=="function"?setTimeout:null,x=typeof clearTimeout=="function"?clearTimeout:null,C=typeof setImmediate<"u"?setImmediate:null;function T(P){for(var z=t(c);z!==null;){if(z.callback===null)i(c);else if(z.startTime<=P)i(c),z.sortIndex=z.expirationTime,n(f,z);else break;z=t(c)}}function O(P){if(w=!1,T(P),!b)if(t(f)!==null)b=!0,E||(E=!0,B());else{var z=t(c);z!==null&&H(O,z.startTime-P)}}var E=!1,M=-1,N=5,F=-1;function R(){return k?!0:!(e.unstable_now()-FP&&R());){var Y=d.callback;if(typeof Y=="function"){d.callback=null,p=d.priorityLevel;var D=Y(d.expirationTime<=P);if(P=e.unstable_now(),typeof D=="function"){d.callback=D,T(P),z=!0;break n}d===t(f)&&i(f),T(P)}else i(f);d=t(f)}if(d!==null)z=!0;else{var V=t(c);V!==null&&H(O,V.startTime-P),z=!1}}break e}finally{d=null,p=q,v=!1}z=void 0}}finally{z?B():E=!1}}}var B;if(typeof C=="function")B=function(){C(L)};else if(typeof MessageChannel<"u"){var G=new MessageChannel,U=G.port2;G.port1.onmessage=L,B=function(){U.postMessage(null)}}else B=function(){_(L,0)};function H(P,z){M=_(function(){P(e.unstable_now())},z)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(P){P.callback=null},e.unstable_forceFrameRate=function(P){0>P||125Y?(P.sortIndex=q,n(c,P),t(f)===null&&P===t(c)&&(w?(x(M),M=-1):w=!0,H(O,q-Y))):(P.sortIndex=D,n(f,P),b||v||(b=!0,E||(E=!0,B()))),P},e.unstable_shouldYield=R,e.unstable_wrapCallback=function(P){var z=p;return function(){var q=p;p=z;try{return P.apply(this,arguments)}finally{p=q}}}})(Ck)),Ck}var Sj;function Xte(){return Sj||(Sj=1,Sk.exports=Kte()),Sk.exports}/** - * @license React - * react-dom-client.production.js - * - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var Cj;function Zte(){if(Cj)return Vd;Cj=1;var e=Xte(),n=w6(),t=oz();function i(s){var u="https://react.dev/errors/"+s;if(1D||(s.current=Y[D],Y[D]=null,D--)}function $(s,u){D++,Y[D]=s.current,s.current=u}var X=V(null),ee=V(null),re=V(null),se=V(null);function ge(s,u){switch($(re,u),$(ee,s),$(X,null),u.nodeType){case 9:case 11:s=(s=u.documentElement)&&(s=s.namespaceURI)?ST(s):0;break;default:if(s=u.tagName,u=u.namespaceURI)u=ST(u),s=CT(u,s);else switch(s){case"svg":s=1;break;case"math":s=2;break;default:s=0}}W(X),$(X,s)}function ae(){W(X),W(ee),W(re)}function le(s){s.memoizedState!==null&&$(se,s);var u=X.current,m=CT(u,s.type);u!==m&&($(ee,s),$(X,m))}function _e(s){ee.current===s&&(W(X),W(ee)),se.current===s&&(W(se),Ld._currentValue=q)}var ne,$e;function be(s){if(ne===void 0)try{throw Error()}catch(m){var u=m.stack.trim().match(/\n( *(at )?)/);ne=u&&u[1]||"",$e=-1)":-1S||J[g]!==ce[S]){var Ae=` -`+J[g].replace(" at new "," at ");return s.displayName&&Ae.includes("")&&(Ae=Ae.replace("",s.displayName)),Ae}while(1<=g&&0<=S);break}}}finally{Ce=!1,Error.prepareStackTrace=m}return(m=s?s.displayName||s.name:"")?be(m):""}function ve(s,u){switch(s.tag){case 26:case 27:case 5:return be(s.type);case 16:return be("Lazy");case 13:return s.child!==u&&u!==null?be("Suspense Fallback"):be("Suspense");case 19:return be("SuspenseList");case 0:case 15:return Pe(s.type,!1);case 11:return Pe(s.type.render,!1);case 1:return Pe(s.type,!0);case 31:return be("Activity");default:return""}}function xe(s){try{var u="",m=null;do u+=ve(s,m),m=s,s=s.return;while(s);return u}catch(g){return` -Error generating stack: `+g.message+` -`+g.stack}}var Re=Object.prototype.hasOwnProperty,ue=e.unstable_scheduleCallback,Ie=e.unstable_cancelCallback,Ve=e.unstable_shouldYield,He=e.unstable_requestPaint,Ke=e.unstable_now,Xe=e.unstable_getCurrentPriorityLevel,ie=e.unstable_ImmediatePriority,me=e.unstable_UserBlockingPriority,We=e.unstable_NormalPriority,Ze=e.unstable_LowPriority,Se=e.unstable_IdlePriority,nn=e.log,cn=e.unstable_setDisableYieldValue,An=null,mn=null;function rn(s){if(typeof nn=="function"&&cn(s),mn&&typeof mn.setStrictMode=="function")try{mn.setStrictMode(An,s)}catch{}}var Je=Math.clz32?Math.clz32:Be,Dn=Math.log,Me=Math.LN2;function Be(s){return s>>>=0,s===0?32:31-(Dn(s)/Me|0)|0}var On=256,gn=262144,vn=4194304;function yn(s){var u=s&42;if(u!==0)return u;switch(s&-s){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return s&261888;case 262144:case 524288:case 1048576:case 2097152:return s&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return s&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return s}}function et(s,u,m){var g=s.pendingLanes;if(g===0)return 0;var S=0,j=s.suspendedLanes,I=s.pingedLanes;s=s.warmLanes;var K=g&134217727;return K!==0?(g=K&~j,g!==0?S=yn(g):(I&=K,I!==0?S=yn(I):m||(m=K&~s,m!==0&&(S=yn(m))))):(K=g&~j,K!==0?S=yn(K):I!==0?S=yn(I):m||(m=g&~s,m!==0&&(S=yn(m)))),S===0?0:u!==0&&u!==S&&(u&j)===0&&(j=S&-S,m=u&-u,j>=m||j===32&&(m&4194048)!==0)?u:S}function wt(s,u){return(s.pendingLanes&~(s.suspendedLanes&~s.pingedLanes)&u)===0}function ze(s,u){switch(s){case 1:case 2:case 4:case 8:case 64:return u+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return u+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Fe(){var s=vn;return vn<<=1,(vn&62914560)===0&&(vn=4194304),s}function Pn(s){for(var u=[],m=0;31>m;m++)u.push(s);return u}function rt(s,u){s.pendingLanes|=u,u!==268435456&&(s.suspendedLanes=0,s.pingedLanes=0,s.warmLanes=0)}function jn(s,u,m,g,S,j){var I=s.pendingLanes;s.pendingLanes=m,s.suspendedLanes=0,s.pingedLanes=0,s.warmLanes=0,s.expiredLanes&=m,s.entangledLanes&=m,s.errorRecoveryDisabledLanes&=m,s.shellSuspendCounter=0;var K=s.entanglements,J=s.expirationTimes,ce=s.hiddenUpdates;for(m=I&~m;0"u")return null;try{return s.activeElement||s.body}catch{return s.body}}var yp=/[\n"\\]/g;function fr(s){return s.replace(yp,function(u){return"\\"+u.charCodeAt(0).toString(16)+" "})}function nd(s,u,m,g,S,j,I,K){s.name="",I!=null&&typeof I!="function"&&typeof I!="symbol"&&typeof I!="boolean"?s.type=I:s.removeAttribute("type"),u!=null?I==="number"?(u===0&&s.value===""||s.value!=u)&&(s.value=""+nr(u)):s.value!==""+nr(u)&&(s.value=""+nr(u)):I!=="submit"&&I!=="reset"||s.removeAttribute("value"),u!=null?td(s,I,nr(u)):m!=null?td(s,I,nr(m)):g!=null&&s.removeAttribute("value"),S==null&&j!=null&&(s.defaultChecked=!!j),S!=null&&(s.checked=S&&typeof S!="function"&&typeof S!="symbol"),K!=null&&typeof K!="function"&&typeof K!="symbol"&&typeof K!="boolean"?s.name=""+nr(K):s.removeAttribute("name")}function bp(s,u,m,g,S,j,I,K){if(j!=null&&typeof j!="function"&&typeof j!="symbol"&&typeof j!="boolean"&&(s.type=j),u!=null||m!=null){if(!(j!=="submit"&&j!=="reset"||u!=null)){Fu(s);return}m=m!=null?""+nr(m):"",u=u!=null?""+nr(u):m,K||u===s.value||(s.value=u),s.defaultValue=u}g=g??S,g=typeof g!="function"&&typeof g!="symbol"&&!!g,s.checked=K?s.checked:!!g,s.defaultChecked=!!g,I!=null&&typeof I!="function"&&typeof I!="symbol"&&typeof I!="boolean"&&(s.name=I),Fu(s)}function td(s,u,m){u==="number"&&xl(s.ownerDocument)===s||s.defaultValue===""+m||(s.defaultValue=""+m)}function Ea(s,u,m,g){if(s=s.options,u){u={};for(var S=0;S"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),gs=!1;if(Or)try{var Ka={};Object.defineProperty(Ka,"passive",{get:function(){gs=!0}}),window.addEventListener("test",Ka,Ka),window.removeEventListener("test",Ka,Ka)}catch{gs=!1}var Kt=null,Cl=null,qu=null;function Er(){if(qu)return qu;var s,u=Cl,m=u.length,g,S="value"in Kt?Kt.value:Kt.textContent,j=S.length;for(s=0;s=ad),MA=" ",DA=!1;function RA(s,u){switch(s){case"keyup":return lG.indexOf(u.keyCode)!==-1;case"keydown":return u.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function PA(s){return s=s.detail,typeof s=="object"&&"data"in s?s.data:null}var Uu=!1;function fG(s,u){switch(s){case"compositionend":return PA(u);case"keypress":return u.which!==32?null:(DA=!0,MA);case"textInput":return s=u.data,s===MA&&DA?null:s;default:return null}}function cG(s,u){if(Uu)return s==="compositionend"||!Z0&&RA(s,u)?(s=Er(),qu=Cl=Kt=null,Uu=!1,s):null;switch(s){case"paste":return null;case"keypress":if(!(u.ctrlKey||u.altKey||u.metaKey)||u.ctrlKey&&u.altKey){if(u.char&&1=u)return{node:m,offset:u-s};s=g}e:{for(;m;){if(m.nextSibling){m=m.nextSibling;break e}m=m.parentNode}m=void 0}m=qA(m)}}function UA(s,u){return s&&u?s===u?!0:s&&s.nodeType===3?!1:u&&u.nodeType===3?UA(s,u.parentNode):"contains"in s?s.contains(u):s.compareDocumentPosition?!!(s.compareDocumentPosition(u)&16):!1:!1}function VA(s){s=s!=null&&s.ownerDocument!=null&&s.ownerDocument.defaultView!=null?s.ownerDocument.defaultView:window;for(var u=xl(s.document);u instanceof s.HTMLIFrameElement;){try{var m=typeof u.contentWindow.location.href=="string"}catch{m=!1}if(m)s=u.contentWindow;else break;u=xl(s.document)}return u}function eb(s){var u=s&&s.nodeName&&s.nodeName.toLowerCase();return u&&(u==="input"&&(s.type==="text"||s.type==="search"||s.type==="tel"||s.type==="url"||s.type==="password")||u==="textarea"||s.contentEditable==="true")}var bG=Or&&"documentMode"in document&&11>=document.documentMode,Vu=null,nb=null,ud=null,tb=!1;function WA(s,u,m){var g=m.window===m?m.document:m.nodeType===9?m:m.ownerDocument;tb||Vu==null||Vu!==xl(g)||(g=Vu,"selectionStart"in g&&eb(g)?g={start:g.selectionStart,end:g.selectionEnd}:(g=(g.ownerDocument&&g.ownerDocument.defaultView||window).getSelection(),g={anchorNode:g.anchorNode,anchorOffset:g.anchorOffset,focusNode:g.focusNode,focusOffset:g.focusOffset}),ud&&ld(ud,g)||(ud=g,g=cv(nb,"onSelect"),0>=I,S-=I,Xa=1<<32-Je(u)+S|m<Bn?(Jn=fn,fn=null):Jn=fn.sibling;var ut=he(oe,fn,fe[Bn],Te);if(ut===null){fn===null&&(fn=Jn);break}s&&fn&&ut.alternate===null&&u(oe,fn),te=j(ut,te,Bn),lt===null?pn=ut:lt.sibling=ut,lt=ut,fn=Jn}if(Bn===fe.length)return m(oe,fn),nt&&So(oe,Bn),pn;if(fn===null){for(;BnBn?(Jn=fn,fn=null):Jn=fn.sibling;var Is=he(oe,fn,ut.value,Te);if(Is===null){fn===null&&(fn=Jn);break}s&&fn&&Is.alternate===null&&u(oe,fn),te=j(Is,te,Bn),lt===null?pn=Is:lt.sibling=Is,lt=Is,fn=Jn}if(ut.done)return m(oe,fn),nt&&So(oe,Bn),pn;if(fn===null){for(;!ut.done;Bn++,ut=fe.next())ut=je(oe,ut.value,Te),ut!==null&&(te=j(ut,te,Bn),lt===null?pn=ut:lt.sibling=ut,lt=ut);return nt&&So(oe,Bn),pn}for(fn=g(fn);!ut.done;Bn++,ut=fe.next())ut=we(fn,oe,Bn,ut.value,Te),ut!==null&&(s&&ut.alternate!==null&&fn.delete(ut.key===null?Bn:ut.key),te=j(ut,te,Bn),lt===null?pn=ut:lt.sibling=ut,lt=ut);return s&&fn.forEach(function(IY){return u(oe,IY)}),nt&&So(oe,Bn),pn}function St(oe,te,fe,Te){if(typeof fe=="object"&&fe!==null&&fe.type===w&&fe.key===null&&(fe=fe.props.children),typeof fe=="object"&&fe!==null){switch(fe.$$typeof){case v:e:{for(var pn=fe.key;te!==null;){if(te.key===pn){if(pn=fe.type,pn===w){if(te.tag===7){m(oe,te.sibling),Te=S(te,fe.props.children),Te.return=oe,oe=Te;break e}}else if(te.elementType===pn||typeof pn=="object"&&pn!==null&&pn.$$typeof===N&&Nl(pn)===te.type){m(oe,te.sibling),Te=S(te,fe.props),pd(Te,fe),Te.return=oe,oe=Te;break e}m(oe,te);break}else u(oe,te);te=te.sibling}fe.type===w?(Te=jl(fe.props.children,oe.mode,Te,fe.key),Te.return=oe,oe=Te):(Te=Ep(fe.type,fe.key,fe.props,null,oe.mode,Te),pd(Te,fe),Te.return=oe,oe=Te)}return I(oe);case b:e:{for(pn=fe.key;te!==null;){if(te.key===pn)if(te.tag===4&&te.stateNode.containerInfo===fe.containerInfo&&te.stateNode.implementation===fe.implementation){m(oe,te.sibling),Te=S(te,fe.children||[]),Te.return=oe,oe=Te;break e}else{m(oe,te);break}else u(oe,te);te=te.sibling}Te=ub(fe,oe.mode,Te),Te.return=oe,oe=Te}return I(oe);case N:return fe=Nl(fe),St(oe,te,fe,Te)}if(H(fe))return sn(oe,te,fe,Te);if(B(fe)){if(pn=B(fe),typeof pn!="function")throw Error(i(150));return fe=pn.call(fe),wn(oe,te,fe,Te)}if(typeof fe.then=="function")return St(oe,te,Np(fe),Te);if(fe.$$typeof===C)return St(oe,te,Mp(oe,fe),Te);$p(oe,fe)}return typeof fe=="string"&&fe!==""||typeof fe=="number"||typeof fe=="bigint"?(fe=""+fe,te!==null&&te.tag===6?(m(oe,te.sibling),Te=S(te,fe),Te.return=oe,oe=Te):(m(oe,te),Te=lb(fe,oe.mode,Te),Te.return=oe,oe=Te),I(oe)):m(oe,te)}return function(oe,te,fe,Te){try{md=0;var pn=St(oe,te,fe,Te);return tf=null,pn}catch(fn){if(fn===nf||fn===Rp)throw fn;var lt=jr(29,fn,null,oe.mode);return lt.lanes=Te,lt.return=oe,lt}finally{}}}var zl=pO(!0),vO=pO(!1),_s=!1;function kb(s){s.updateQueue={baseState:s.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function _b(s,u){s=s.updateQueue,u.updateQueue===s&&(u.updateQueue={baseState:s.baseState,firstBaseUpdate:s.firstBaseUpdate,lastBaseUpdate:s.lastBaseUpdate,shared:s.shared,callbacks:null})}function xs(s){return{lane:s,tag:0,payload:null,callback:null,next:null}}function Ss(s,u,m){var g=s.updateQueue;if(g===null)return null;if(g=g.shared,(ht&2)!==0){var S=g.pending;return S===null?u.next=u:(u.next=S.next,S.next=u),g.pending=u,u=Op(s),JA(s,null,m),u}return Ap(s,g,u,m),Op(s)}function vd(s,u,m){if(u=u.updateQueue,u!==null&&(u=u.shared,(m&4194048)!==0)){var g=u.lanes;g&=s.pendingLanes,m|=g,u.lanes=m,tn(s,m)}}function xb(s,u){var m=s.updateQueue,g=s.alternate;if(g!==null&&(g=g.updateQueue,m===g)){var S=null,j=null;if(m=m.firstBaseUpdate,m!==null){do{var I={lane:m.lane,tag:m.tag,payload:m.payload,callback:null,next:null};j===null?S=j=I:j=j.next=I,m=m.next}while(m!==null);j===null?S=j=u:j=j.next=u}else S=j=u;m={baseState:g.baseState,firstBaseUpdate:S,lastBaseUpdate:j,shared:g.shared,callbacks:g.callbacks},s.updateQueue=m;return}s=m.lastBaseUpdate,s===null?m.firstBaseUpdate=u:s.next=u,m.lastBaseUpdate=u}var Sb=!1;function gd(){if(Sb){var s=ef;if(s!==null)throw s}}function yd(s,u,m,g){Sb=!1;var S=s.updateQueue;_s=!1;var j=S.firstBaseUpdate,I=S.lastBaseUpdate,K=S.shared.pending;if(K!==null){S.shared.pending=null;var J=K,ce=J.next;J.next=null,I===null?j=ce:I.next=ce,I=J;var Ae=s.alternate;Ae!==null&&(Ae=Ae.updateQueue,K=Ae.lastBaseUpdate,K!==I&&(K===null?Ae.firstBaseUpdate=ce:K.next=ce,Ae.lastBaseUpdate=J))}if(j!==null){var je=S.baseState;I=0,Ae=ce=J=null,K=j;do{var he=K.lane&-536870913,we=he!==K.lane;if(we?(Qn&he)===he:(g&he)===he){he!==0&&he===Ju&&(Sb=!0),Ae!==null&&(Ae=Ae.next={lane:0,tag:K.tag,payload:K.payload,callback:null,next:null});e:{var sn=s,wn=K;he=u;var St=m;switch(wn.tag){case 1:if(sn=wn.payload,typeof sn=="function"){je=sn.call(St,je,he);break e}je=sn;break e;case 3:sn.flags=sn.flags&-65537|128;case 0:if(sn=wn.payload,he=typeof sn=="function"?sn.call(St,je,he):sn,he==null)break e;je=d({},je,he);break e;case 2:_s=!0}}he=K.callback,he!==null&&(s.flags|=64,we&&(s.flags|=8192),we=S.callbacks,we===null?S.callbacks=[he]:we.push(he))}else we={lane:he,tag:K.tag,payload:K.payload,callback:K.callback,next:null},Ae===null?(ce=Ae=we,J=je):Ae=Ae.next=we,I|=he;if(K=K.next,K===null){if(K=S.shared.pending,K===null)break;we=K,K=we.next,we.next=null,S.lastBaseUpdate=we,S.shared.pending=null}}while(!0);Ae===null&&(J=je),S.baseState=J,S.firstBaseUpdate=ce,S.lastBaseUpdate=Ae,j===null&&(S.shared.lanes=0),Ts|=I,s.lanes=I,s.memoizedState=je}}function gO(s,u){if(typeof s!="function")throw Error(i(191,s));s.call(u)}function yO(s,u){var m=s.callbacks;if(m!==null)for(s.callbacks=null,s=0;sj?j:8;var I=P.T,K={};P.T=K,Hb(s,!1,u,m);try{var J=S(),ce=P.S;if(ce!==null&&ce(K,J),J!==null&&typeof J=="object"&&typeof J.then=="function"){var Ae=EG(J,g);kd(s,u,Ae,Nr(s))}else kd(s,u,g,Nr(s))}catch(je){kd(s,u,{then:function(){},status:"rejected",reason:je},Nr())}finally{z.p=j,I!==null&&K.types!==null&&(I.types=K.types),P.T=I}}function PG(){}function Fb(s,u,m,g){if(s.tag!==5)throw Error(i(476));var S=XO(s).queue;KO(s,S,u,q,m===null?PG:function(){return ZO(s),m(g)})}function XO(s){var u=s.memoizedState;if(u!==null)return u;u={memoizedState:q,baseState:q,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Eo,lastRenderedState:q},next:null};var m={};return u.next={memoizedState:m,baseState:m,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Eo,lastRenderedState:m},next:null},s.memoizedState=u,s=s.alternate,s!==null&&(s.memoizedState=u),u}function ZO(s){var u=XO(s);u.next===null&&(u=s.alternate.memoizedState),kd(s,u.next.queue,{},Nr())}function qb(){return Pi(Ld)}function QO(){return ai().memoizedState}function JO(){return ai().memoizedState}function NG(s){for(var u=s.return;u!==null;){switch(u.tag){case 24:case 3:var m=Nr();s=xs(m);var g=Ss(u,s,m);g!==null&&(vr(g,u,m),vd(g,u,m)),u={cache:gb()},s.payload=u;return}u=u.return}}function $G(s,u,m){var g=Nr();m={lane:g,revertLane:0,gesture:null,action:m,hasEagerState:!1,eagerState:null,next:null},Wp(s)?nE(u,m):(m=ob(s,u,m,g),m!==null&&(vr(m,s,g),tE(m,u,g)))}function eE(s,u,m){var g=Nr();kd(s,u,m,g)}function kd(s,u,m,g){var S={lane:g,revertLane:0,gesture:null,action:m,hasEagerState:!1,eagerState:null,next:null};if(Wp(s))nE(u,S);else{var j=s.alternate;if(s.lanes===0&&(j===null||j.lanes===0)&&(j=u.lastRenderedReducer,j!==null))try{var I=u.lastRenderedState,K=j(I,m);if(S.hasEagerState=!0,S.eagerState=K,Tr(K,I))return Ap(s,u,S,0),At===null&&Cp(),!1}catch{}finally{}if(m=ob(s,u,S,g),m!==null)return vr(m,s,g),tE(m,u,g),!0}return!1}function Hb(s,u,m,g){if(g={lane:2,revertLane:kw(),gesture:null,action:g,hasEagerState:!1,eagerState:null,next:null},Wp(s)){if(u)throw Error(i(479))}else u=ob(s,m,g,2),u!==null&&vr(u,s,2)}function Wp(s){var u=s.alternate;return s===Nn||u!==null&&u===Nn}function nE(s,u){af=Ip=!0;var m=s.pending;m===null?u.next=u:(u.next=m.next,m.next=u),s.pending=u}function tE(s,u,m){if((m&4194048)!==0){var g=u.lanes;g&=s.pendingLanes,m|=g,u.lanes=m,tn(s,m)}}var _d={readContext:Pi,use:qp,useCallback:Xt,useContext:Xt,useEffect:Xt,useImperativeHandle:Xt,useLayoutEffect:Xt,useInsertionEffect:Xt,useMemo:Xt,useReducer:Xt,useRef:Xt,useState:Xt,useDebugValue:Xt,useDeferredValue:Xt,useTransition:Xt,useSyncExternalStore:Xt,useId:Xt,useHostTransitionStatus:Xt,useFormState:Xt,useActionState:Xt,useOptimistic:Xt,useMemoCache:Xt,useCacheRefresh:Xt};_d.useEffectEvent=Xt;var iE={readContext:Pi,use:qp,useCallback:function(s,u){return ir().memoizedState=[s,u===void 0?null:u],s},useContext:Pi,useEffect:BO,useImperativeHandle:function(s,u,m){m=m!=null?m.concat([s]):null,Up(4194308,4,UO.bind(null,u,s),m)},useLayoutEffect:function(s,u){return Up(4194308,4,s,u)},useInsertionEffect:function(s,u){Up(4,2,s,u)},useMemo:function(s,u){var m=ir();u=u===void 0?null:u;var g=s();if(Ll){rn(!0);try{s()}finally{rn(!1)}}return m.memoizedState=[g,u],g},useReducer:function(s,u,m){var g=ir();if(m!==void 0){var S=m(u);if(Ll){rn(!0);try{m(u)}finally{rn(!1)}}}else S=u;return g.memoizedState=g.baseState=S,s={pending:null,lanes:0,dispatch:null,lastRenderedReducer:s,lastRenderedState:S},g.queue=s,s=s.dispatch=$G.bind(null,Nn,s),[g.memoizedState,s]},useRef:function(s){var u=ir();return s={current:s},u.memoizedState=s},useState:function(s){s=$b(s);var u=s.queue,m=eE.bind(null,Nn,u);return u.dispatch=m,[s.memoizedState,m]},useDebugValue:Ib,useDeferredValue:function(s,u){var m=ir();return Bb(m,s,u)},useTransition:function(){var s=$b(!1);return s=KO.bind(null,Nn,s.queue,!0,!1),ir().memoizedState=s,[!1,s]},useSyncExternalStore:function(s,u,m){var g=Nn,S=ir();if(nt){if(m===void 0)throw Error(i(407));m=m()}else{if(m=u(),At===null)throw Error(i(349));(Qn&127)!==0||SO(g,u,m)}S.memoizedState=m;var j={value:m,getSnapshot:u};return S.queue=j,BO(AO.bind(null,g,j,s),[s]),g.flags|=2048,sf(9,{destroy:void 0},CO.bind(null,g,j,m,u),null),m},useId:function(){var s=ir(),u=At.identifierPrefix;if(nt){var m=Za,g=Xa;m=(g&~(1<<32-Je(g)-1)).toString(32)+m,u="_"+u+"R_"+m,m=Bp++,0<\/script>",j=j.removeChild(j.firstChild);break;case"select":j=typeof g.is=="string"?I.createElement("select",{is:g.is}):I.createElement("select"),g.multiple?j.multiple=!0:g.size&&(j.size=g.size);break;default:j=typeof g.is=="string"?I.createElement(S,{is:g.is}):I.createElement(S)}}j[Zn]=u,j[Wt]=g;e:for(I=u.child;I!==null;){if(I.tag===5||I.tag===6)j.appendChild(I.stateNode);else if(I.tag!==4&&I.tag!==27&&I.child!==null){I.child.return=I,I=I.child;continue}if(I===u)break e;for(;I.sibling===null;){if(I.return===null||I.return===u)break e;I=I.return}I.sibling.return=I.return,I=I.sibling}u.stateNode=j;e:switch($i(j,S,g),S){case"button":case"input":case"select":case"textarea":g=!!g.autoFocus;break e;case"img":g=!0;break e;default:g=!1}g&&jo(u)}}return $t(u),iw(u,u.type,s===null?null:s.memoizedProps,u.pendingProps,m),null;case 6:if(s&&u.stateNode!=null)s.memoizedProps!==g&&jo(u);else{if(typeof g!="string"&&u.stateNode===null)throw Error(i(166));if(s=re.current,Zu(u)){if(s=u.stateNode,m=u.memoizedProps,g=null,S=Ri,S!==null)switch(S.tag){case 27:case 5:g=S.memoizedProps}s[Zn]=u,s=!!(s.nodeValue===m||g!==null&&g.suppressHydrationWarning===!0||_T(s.nodeValue,m)),s||ws(u,!0)}else s=dv(s).createTextNode(g),s[Zn]=u,u.stateNode=s}return $t(u),null;case 31:if(m=u.memoizedState,s===null||s.memoizedState!==null){if(g=Zu(u),m!==null){if(s===null){if(!g)throw Error(i(318));if(s=u.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(i(557));s[Zn]=u}else Ml(),(u.flags&128)===0&&(u.memoizedState=null),u.flags|=4;$t(u),s=!1}else m=hb(),s!==null&&s.memoizedState!==null&&(s.memoizedState.hydrationErrors=m),s=!0;if(!s)return u.flags&256?(Dr(u),u):(Dr(u),null);if((u.flags&128)!==0)throw Error(i(558))}return $t(u),null;case 13:if(g=u.memoizedState,s===null||s.memoizedState!==null&&s.memoizedState.dehydrated!==null){if(S=Zu(u),g!==null&&g.dehydrated!==null){if(s===null){if(!S)throw Error(i(318));if(S=u.memoizedState,S=S!==null?S.dehydrated:null,!S)throw Error(i(317));S[Zn]=u}else Ml(),(u.flags&128)===0&&(u.memoizedState=null),u.flags|=4;$t(u),S=!1}else S=hb(),s!==null&&s.memoizedState!==null&&(s.memoizedState.hydrationErrors=S),S=!0;if(!S)return u.flags&256?(Dr(u),u):(Dr(u),null)}return Dr(u),(u.flags&128)!==0?(u.lanes=m,u):(m=g!==null,s=s!==null&&s.memoizedState!==null,m&&(g=u.child,S=null,g.alternate!==null&&g.alternate.memoizedState!==null&&g.alternate.memoizedState.cachePool!==null&&(S=g.alternate.memoizedState.cachePool.pool),j=null,g.memoizedState!==null&&g.memoizedState.cachePool!==null&&(j=g.memoizedState.cachePool.pool),j!==S&&(g.flags|=2048)),m!==s&&m&&(u.child.flags|=8192),Zp(u,u.updateQueue),$t(u),null);case 4:return ae(),s===null&&Cw(u.stateNode.containerInfo),$t(u),null;case 10:return Ao(u.type),$t(u),null;case 19:if(W(ri),g=u.memoizedState,g===null)return $t(u),null;if(S=(u.flags&128)!==0,j=g.rendering,j===null)if(S)Sd(g,!1);else{if(Zt!==0||s!==null&&(s.flags&128)!==0)for(s=u.child;s!==null;){if(j=Lp(s),j!==null){for(u.flags|=128,Sd(g,!1),s=j.updateQueue,u.updateQueue=s,Zp(u,s),u.subtreeFlags=0,s=m,m=u.child;m!==null;)eO(m,s),m=m.sibling;return $(ri,ri.current&1|2),nt&&So(u,g.treeForkCount),u.child}s=s.sibling}g.tail!==null&&Ke()>tv&&(u.flags|=128,S=!0,Sd(g,!1),u.lanes=4194304)}else{if(!S)if(s=Lp(j),s!==null){if(u.flags|=128,S=!0,s=s.updateQueue,u.updateQueue=s,Zp(u,s),Sd(g,!0),g.tail===null&&g.tailMode==="hidden"&&!j.alternate&&!nt)return $t(u),null}else 2*Ke()-g.renderingStartTime>tv&&m!==536870912&&(u.flags|=128,S=!0,Sd(g,!1),u.lanes=4194304);g.isBackwards?(j.sibling=u.child,u.child=j):(s=g.last,s!==null?s.sibling=j:u.child=j,g.last=j)}return g.tail!==null?(s=g.tail,g.rendering=s,g.tail=s.sibling,g.renderingStartTime=Ke(),s.sibling=null,m=ri.current,$(ri,S?m&1|2:m&1),nt&&So(u,g.treeForkCount),s):($t(u),null);case 22:case 23:return Dr(u),Ab(),g=u.memoizedState!==null,s!==null?s.memoizedState!==null!==g&&(u.flags|=8192):g&&(u.flags|=8192),g?(m&536870912)!==0&&(u.flags&128)===0&&($t(u),u.subtreeFlags&6&&(u.flags|=8192)):$t(u),m=u.updateQueue,m!==null&&Zp(u,m.retryQueue),m=null,s!==null&&s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(m=s.memoizedState.cachePool.pool),g=null,u.memoizedState!==null&&u.memoizedState.cachePool!==null&&(g=u.memoizedState.cachePool.pool),g!==m&&(u.flags|=2048),s!==null&&W(Pl),null;case 24:return m=null,s!==null&&(m=s.memoizedState.cache),u.memoizedState.cache!==m&&(u.flags|=2048),Ao(si),$t(u),null;case 25:return null;case 30:return null}throw Error(i(156,u.tag))}function FG(s,u){switch(cb(u),u.tag){case 1:return s=u.flags,s&65536?(u.flags=s&-65537|128,u):null;case 3:return Ao(si),ae(),s=u.flags,(s&65536)!==0&&(s&128)===0?(u.flags=s&-65537|128,u):null;case 26:case 27:case 5:return _e(u),null;case 31:if(u.memoizedState!==null){if(Dr(u),u.alternate===null)throw Error(i(340));Ml()}return s=u.flags,s&65536?(u.flags=s&-65537|128,u):null;case 13:if(Dr(u),s=u.memoizedState,s!==null&&s.dehydrated!==null){if(u.alternate===null)throw Error(i(340));Ml()}return s=u.flags,s&65536?(u.flags=s&-65537|128,u):null;case 19:return W(ri),null;case 4:return ae(),null;case 10:return Ao(u.type),null;case 22:case 23:return Dr(u),Ab(),s!==null&&W(Pl),s=u.flags,s&65536?(u.flags=s&-65537|128,u):null;case 24:return Ao(si),null;case 25:return null;default:return null}}function OE(s,u){switch(cb(u),u.tag){case 3:Ao(si),ae();break;case 26:case 27:case 5:_e(u);break;case 4:ae();break;case 31:u.memoizedState!==null&&Dr(u);break;case 13:Dr(u);break;case 19:W(ri);break;case 10:Ao(u.type);break;case 22:case 23:Dr(u),Ab(),s!==null&&W(Pl);break;case 24:Ao(si)}}function Cd(s,u){try{var m=u.updateQueue,g=m!==null?m.lastEffect:null;if(g!==null){var S=g.next;m=S;do{if((m.tag&s)===s){g=void 0;var j=m.create,I=m.inst;g=j(),I.destroy=g}m=m.next}while(m!==S)}}catch(K){bt(u,u.return,K)}}function Os(s,u,m){try{var g=u.updateQueue,S=g!==null?g.lastEffect:null;if(S!==null){var j=S.next;g=j;do{if((g.tag&s)===s){var I=g.inst,K=I.destroy;if(K!==void 0){I.destroy=void 0,S=u;var J=m,ce=K;try{ce()}catch(Ae){bt(S,J,Ae)}}}g=g.next}while(g!==j)}}catch(Ae){bt(u,u.return,Ae)}}function EE(s){var u=s.updateQueue;if(u!==null){var m=s.stateNode;try{yO(u,m)}catch(g){bt(s,s.return,g)}}}function TE(s,u,m){m.props=Il(s.type,s.memoizedProps),m.state=s.memoizedState;try{m.componentWillUnmount()}catch(g){bt(s,u,g)}}function Ad(s,u){try{var m=s.ref;if(m!==null){switch(s.tag){case 26:case 27:case 5:var g=s.stateNode;break;case 30:g=s.stateNode;break;default:g=s.stateNode}typeof m=="function"?s.refCleanup=m(g):m.current=g}}catch(S){bt(s,u,S)}}function Qa(s,u){var m=s.ref,g=s.refCleanup;if(m!==null)if(typeof g=="function")try{g()}catch(S){bt(s,u,S)}finally{s.refCleanup=null,s=s.alternate,s!=null&&(s.refCleanup=null)}else if(typeof m=="function")try{m(null)}catch(S){bt(s,u,S)}else m.current=null}function jE(s){var u=s.type,m=s.memoizedProps,g=s.stateNode;try{e:switch(u){case"button":case"input":case"select":case"textarea":m.autoFocus&&g.focus();break e;case"img":m.src?g.src=m.src:m.srcSet&&(g.srcset=m.srcSet)}}catch(S){bt(s,s.return,S)}}function rw(s,u,m){try{var g=s.stateNode;uY(g,s.type,m,u),g[Wt]=u}catch(S){bt(s,s.return,S)}}function ME(s){return s.tag===5||s.tag===3||s.tag===26||s.tag===27&&Ps(s.type)||s.tag===4}function aw(s){e:for(;;){for(;s.sibling===null;){if(s.return===null||ME(s.return))return null;s=s.return}for(s.sibling.return=s.return,s=s.sibling;s.tag!==5&&s.tag!==6&&s.tag!==18;){if(s.tag===27&&Ps(s.type)||s.flags&2||s.child===null||s.tag===4)continue e;s.child.return=s,s=s.child}if(!(s.flags&2))return s.stateNode}}function ow(s,u,m){var g=s.tag;if(g===5||g===6)s=s.stateNode,u?(m.nodeType===9?m.body:m.nodeName==="HTML"?m.ownerDocument.body:m).insertBefore(s,u):(u=m.nodeType===9?m.body:m.nodeName==="HTML"?m.ownerDocument.body:m,u.appendChild(s),m=m._reactRootContainer,m!=null||u.onclick!==null||(u.onclick=ti));else if(g!==4&&(g===27&&Ps(s.type)&&(m=s.stateNode,u=null),s=s.child,s!==null))for(ow(s,u,m),s=s.sibling;s!==null;)ow(s,u,m),s=s.sibling}function Qp(s,u,m){var g=s.tag;if(g===5||g===6)s=s.stateNode,u?m.insertBefore(s,u):m.appendChild(s);else if(g!==4&&(g===27&&Ps(s.type)&&(m=s.stateNode),s=s.child,s!==null))for(Qp(s,u,m),s=s.sibling;s!==null;)Qp(s,u,m),s=s.sibling}function DE(s){var u=s.stateNode,m=s.memoizedProps;try{for(var g=s.type,S=u.attributes;S.length;)u.removeAttributeNode(S[0]);$i(u,g,m),u[Zn]=s,u[Wt]=m}catch(j){bt(s,s.return,j)}}var Mo=!1,fi=!1,sw=!1,RE=typeof WeakSet=="function"?WeakSet:Set,Oi=null;function qG(s,u){if(s=s.containerInfo,Ew=bv,s=VA(s),eb(s)){if("selectionStart"in s)var m={start:s.selectionStart,end:s.selectionEnd};else e:{m=(m=s.ownerDocument)&&m.defaultView||window;var g=m.getSelection&&m.getSelection();if(g&&g.rangeCount!==0){m=g.anchorNode;var S=g.anchorOffset,j=g.focusNode;g=g.focusOffset;try{m.nodeType,j.nodeType}catch{m=null;break e}var I=0,K=-1,J=-1,ce=0,Ae=0,je=s,he=null;n:for(;;){for(var we;je!==m||S!==0&&je.nodeType!==3||(K=I+S),je!==j||g!==0&&je.nodeType!==3||(J=I+g),je.nodeType===3&&(I+=je.nodeValue.length),(we=je.firstChild)!==null;)he=je,je=we;for(;;){if(je===s)break n;if(he===m&&++ce===S&&(K=I),he===j&&++Ae===g&&(J=I),(we=je.nextSibling)!==null)break;je=he,he=je.parentNode}je=we}m=K===-1||J===-1?null:{start:K,end:J}}else m=null}m=m||{start:0,end:0}}else m=null;for(Tw={focusedElem:s,selectionRange:m},bv=!1,Oi=u;Oi!==null;)if(u=Oi,s=u.child,(u.subtreeFlags&1028)!==0&&s!==null)s.return=u,Oi=s;else for(;Oi!==null;){switch(u=Oi,j=u.alternate,s=u.flags,u.tag){case 0:if((s&4)!==0&&(s=u.updateQueue,s=s!==null?s.events:null,s!==null))for(m=0;m title"))),$i(j,g,m),j[Zn]=s,ln(j),g=j;break e;case"link":var I=IT("link","href",S).get(g+(m.href||""));if(I){for(var K=0;KSt&&(I=St,St=wn,wn=I);var oe=HA(K,wn),te=HA(K,St);if(oe&&te&&(we.rangeCount!==1||we.anchorNode!==oe.node||we.anchorOffset!==oe.offset||we.focusNode!==te.node||we.focusOffset!==te.offset)){var fe=je.createRange();fe.setStart(oe.node,oe.offset),we.removeAllRanges(),wn>St?(we.addRange(fe),we.extend(te.node,te.offset)):(fe.setEnd(te.node,te.offset),we.addRange(fe))}}}}for(je=[],we=K;we=we.parentNode;)we.nodeType===1&&je.push({element:we,left:we.scrollLeft,top:we.scrollTop});for(typeof K.focus=="function"&&K.focus(),K=0;Km?32:m,P.T=null,m=mw,mw=null;var j=Ms,I=$o;if(bi=0,df=Ms=null,$o=0,(ht&6)!==0)throw Error(i(331));var K=ht;if(ht|=4,UE(j.current),FE(j,j.current,I,m),ht=K,Dd(0,!1),mn&&typeof mn.onPostCommitFiberRoot=="function")try{mn.onPostCommitFiberRoot(An,j)}catch{}return!0}finally{z.p=S,P.T=g,lT(s,u)}}function fT(s,u,m){u=Qr(m,u),u=Gb(s.stateNode,u,2),s=Ss(s,u,2),s!==null&&(rt(s,2),Ja(s))}function bt(s,u,m){if(s.tag===3)fT(s,s,m);else for(;u!==null;){if(u.tag===3){fT(u,s,m);break}else if(u.tag===1){var g=u.stateNode;if(typeof u.type.getDerivedStateFromError=="function"||typeof g.componentDidCatch=="function"&&(js===null||!js.has(g))){s=Qr(m,s),m=cE(2),g=Ss(u,m,2),g!==null&&(dE(m,g,u,s),rt(g,2),Ja(g));break}}u=u.return}}function yw(s,u,m){var g=s.pingCache;if(g===null){g=s.pingCache=new VG;var S=new Set;g.set(u,S)}else S=g.get(u),S===void 0&&(S=new Set,g.set(u,S));S.has(m)||(fw=!0,S.add(m),s=XG.bind(null,s,u,m),u.then(s,s))}function XG(s,u,m){var g=s.pingCache;g!==null&&g.delete(u),s.pingedLanes|=s.suspendedLanes&m,s.warmLanes&=~m,At===s&&(Qn&m)===m&&(Zt===4||Zt===3&&(Qn&62914560)===Qn&&300>Ke()-nv?(ht&2)===0&&hf(s,0):cw|=m,cf===Qn&&(cf=0)),Ja(s)}function cT(s,u){u===0&&(u=Fe()),s=Tl(s,u),s!==null&&(rt(s,u),Ja(s))}function ZG(s){var u=s.memoizedState,m=0;u!==null&&(m=u.retryLane),cT(s,m)}function QG(s,u){var m=0;switch(s.tag){case 31:case 13:var g=s.stateNode,S=s.memoizedState;S!==null&&(m=S.retryLane);break;case 19:g=s.stateNode;break;case 22:g=s.stateNode._retryCache;break;default:throw Error(i(314))}g!==null&&g.delete(u),cT(s,m)}function JG(s,u){return ue(s,u)}var lv=null,pf=null,bw=!1,uv=!1,ww=!1,Rs=0;function Ja(s){s!==pf&&s.next===null&&(pf===null?lv=pf=s:pf=pf.next=s),uv=!0,bw||(bw=!0,nY())}function Dd(s,u){if(!ww&&uv){ww=!0;do for(var m=!1,g=lv;g!==null;){if(s!==0){var S=g.pendingLanes;if(S===0)var j=0;else{var I=g.suspendedLanes,K=g.pingedLanes;j=(1<<31-Je(42|s)+1)-1,j&=S&~(I&~K),j=j&201326741?j&201326741|1:j?j|2:0}j!==0&&(m=!0,pT(g,j))}else j=Qn,j=et(g,g===At?j:0,g.cancelPendingCommit!==null||g.timeoutHandle!==-1),(j&3)===0||wt(g,j)||(m=!0,pT(g,j));g=g.next}while(m);ww=!1}}function eY(){dT()}function dT(){uv=bw=!1;var s=0;Rs!==0&&cY()&&(s=Rs);for(var u=Ke(),m=null,g=lv;g!==null;){var S=g.next,j=hT(g,u);j===0?(g.next=null,m===null?lv=S:m.next=S,S===null&&(pf=m)):(m=g,(s!==0||(j&3)!==0)&&(uv=!0)),g=S}bi!==0&&bi!==5||Dd(s),Rs!==0&&(Rs=0)}function hT(s,u){for(var m=s.suspendedLanes,g=s.pingedLanes,S=s.expirationTimes,j=s.pendingLanes&-62914561;0K)break;var Ae=J.transferSize,je=J.initiatorType;Ae&&xT(je)&&(J=J.responseEnd,I+=Ae*(J"u"?null:document;function NT(s,u,m){var g=vf;if(g&&typeof u=="string"&&u){var S=fr(u);S='link[rel="'+s+'"][href="'+S+'"]',typeof m=="string"&&(S+='[crossorigin="'+m+'"]'),PT.has(S)||(PT.add(S),s={rel:s,crossOrigin:m,href:u},g.querySelector(S)===null&&(u=g.createElement("link"),$i(u,"link",s),ln(u),g.head.appendChild(u)))}}function wY(s){zo.D(s),NT("dns-prefetch",s,null)}function kY(s,u){zo.C(s,u),NT("preconnect",s,u)}function _Y(s,u,m){zo.L(s,u,m);var g=vf;if(g&&s&&u){var S='link[rel="preload"][as="'+fr(u)+'"]';u==="image"&&m&&m.imageSrcSet?(S+='[imagesrcset="'+fr(m.imageSrcSet)+'"]',typeof m.imageSizes=="string"&&(S+='[imagesizes="'+fr(m.imageSizes)+'"]')):S+='[href="'+fr(s)+'"]';var j=S;switch(u){case"style":j=gf(s);break;case"script":j=yf(s)}ra.has(j)||(s=d({rel:"preload",href:u==="image"&&m&&m.imageSrcSet?void 0:s,as:u},m),ra.set(j,s),g.querySelector(S)!==null||u==="style"&&g.querySelector($d(j))||u==="script"&&g.querySelector(zd(j))||(u=g.createElement("link"),$i(u,"link",s),ln(u),g.head.appendChild(u)))}}function xY(s,u){zo.m(s,u);var m=vf;if(m&&s){var g=u&&typeof u.as=="string"?u.as:"script",S='link[rel="modulepreload"][as="'+fr(g)+'"][href="'+fr(s)+'"]',j=S;switch(g){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":j=yf(s)}if(!ra.has(j)&&(s=d({rel:"modulepreload",href:s},u),ra.set(j,s),m.querySelector(S)===null)){switch(g){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(m.querySelector(zd(j)))return}g=m.createElement("link"),$i(g,"link",s),ln(g),m.head.appendChild(g)}}}function SY(s,u,m){zo.S(s,u,m);var g=vf;if(g&&s){var S=gi(g).hoistableStyles,j=gf(s);u=u||"default";var I=S.get(j);if(!I){var K={loading:0,preload:null};if(I=g.querySelector($d(j)))K.loading=5;else{s=d({rel:"stylesheet",href:s,"data-precedence":u},m),(m=ra.get(j))&&$w(s,m);var J=I=g.createElement("link");ln(J),$i(J,"link",s),J._p=new Promise(function(ce,Ae){J.onload=ce,J.onerror=Ae}),J.addEventListener("load",function(){K.loading|=1}),J.addEventListener("error",function(){K.loading|=2}),K.loading|=4,mv(I,u,g)}I={type:"stylesheet",instance:I,count:1,state:K},S.set(j,I)}}}function CY(s,u){zo.X(s,u);var m=vf;if(m&&s){var g=gi(m).hoistableScripts,S=yf(s),j=g.get(S);j||(j=m.querySelector(zd(S)),j||(s=d({src:s,async:!0},u),(u=ra.get(S))&&zw(s,u),j=m.createElement("script"),ln(j),$i(j,"link",s),m.head.appendChild(j)),j={type:"script",instance:j,count:1,state:null},g.set(S,j))}}function AY(s,u){zo.M(s,u);var m=vf;if(m&&s){var g=gi(m).hoistableScripts,S=yf(s),j=g.get(S);j||(j=m.querySelector(zd(S)),j||(s=d({src:s,async:!0,type:"module"},u),(u=ra.get(S))&&zw(s,u),j=m.createElement("script"),ln(j),$i(j,"link",s),m.head.appendChild(j)),j={type:"script",instance:j,count:1,state:null},g.set(S,j))}}function $T(s,u,m,g){var S=(S=re.current)?hv(S):null;if(!S)throw Error(i(446));switch(s){case"meta":case"title":return null;case"style":return typeof m.precedence=="string"&&typeof m.href=="string"?(u=gf(m.href),m=gi(S).hoistableStyles,g=m.get(u),g||(g={type:"style",instance:null,count:0,state:null},m.set(u,g)),g):{type:"void",instance:null,count:0,state:null};case"link":if(m.rel==="stylesheet"&&typeof m.href=="string"&&typeof m.precedence=="string"){s=gf(m.href);var j=gi(S).hoistableStyles,I=j.get(s);if(I||(S=S.ownerDocument||S,I={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},j.set(s,I),(j=S.querySelector($d(s)))&&!j._p&&(I.instance=j,I.state.loading=5),ra.has(s)||(m={rel:"preload",as:"style",href:m.href,crossOrigin:m.crossOrigin,integrity:m.integrity,media:m.media,hrefLang:m.hrefLang,referrerPolicy:m.referrerPolicy},ra.set(s,m),j||OY(S,s,m,I.state))),u&&g===null)throw Error(i(528,""));return I}if(u&&g!==null)throw Error(i(529,""));return null;case"script":return u=m.async,m=m.src,typeof m=="string"&&u&&typeof u!="function"&&typeof u!="symbol"?(u=yf(m),m=gi(S).hoistableScripts,g=m.get(u),g||(g={type:"script",instance:null,count:0,state:null},m.set(u,g)),g):{type:"void",instance:null,count:0,state:null};default:throw Error(i(444,s))}}function gf(s){return'href="'+fr(s)+'"'}function $d(s){return'link[rel="stylesheet"]['+s+"]"}function zT(s){return d({},s,{"data-precedence":s.precedence,precedence:null})}function OY(s,u,m,g){s.querySelector('link[rel="preload"][as="style"]['+u+"]")?g.loading=1:(u=s.createElement("link"),g.preload=u,u.addEventListener("load",function(){return g.loading|=1}),u.addEventListener("error",function(){return g.loading|=2}),$i(u,"link",m),ln(u),s.head.appendChild(u))}function yf(s){return'[src="'+fr(s)+'"]'}function zd(s){return"script[async]"+s}function LT(s,u,m){if(u.count++,u.instance===null)switch(u.type){case"style":var g=s.querySelector('style[data-href~="'+fr(m.href)+'"]');if(g)return u.instance=g,ln(g),g;var S=d({},m,{"data-href":m.href,"data-precedence":m.precedence,href:null,precedence:null});return g=(s.ownerDocument||s).createElement("style"),ln(g),$i(g,"style",S),mv(g,m.precedence,s),u.instance=g;case"stylesheet":S=gf(m.href);var j=s.querySelector($d(S));if(j)return u.state.loading|=4,u.instance=j,ln(j),j;g=zT(m),(S=ra.get(S))&&$w(g,S),j=(s.ownerDocument||s).createElement("link"),ln(j);var I=j;return I._p=new Promise(function(K,J){I.onload=K,I.onerror=J}),$i(j,"link",g),u.state.loading|=4,mv(j,m.precedence,s),u.instance=j;case"script":return j=yf(m.src),(S=s.querySelector(zd(j)))?(u.instance=S,ln(S),S):(g=m,(S=ra.get(j))&&(g=d({},m),zw(g,S)),s=s.ownerDocument||s,S=s.createElement("script"),ln(S),$i(S,"link",g),s.head.appendChild(S),u.instance=S);case"void":return null;default:throw Error(i(443,u.type))}else u.type==="stylesheet"&&(u.state.loading&4)===0&&(g=u.instance,u.state.loading|=4,mv(g,m.precedence,s));return u.instance}function mv(s,u,m){for(var g=m.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),S=g.length?g[g.length-1]:null,j=S,I=0;I title"):null)}function EY(s,u,m){if(m===1||u.itemProp!=null)return!1;switch(s){case"meta":case"title":return!0;case"style":if(typeof u.precedence!="string"||typeof u.href!="string"||u.href==="")break;return!0;case"link":if(typeof u.rel!="string"||typeof u.href!="string"||u.href===""||u.onLoad||u.onError)break;switch(u.rel){case"stylesheet":return s=u.disabled,typeof u.precedence=="string"&&s==null;default:return!0}case"script":if(u.async&&typeof u.async!="function"&&typeof u.async!="symbol"&&!u.onLoad&&!u.onError&&u.src&&typeof u.src=="string")return!0}return!1}function FT(s){return!(s.type==="stylesheet"&&(s.state.loading&3)===0)}function TY(s,u,m,g){if(m.type==="stylesheet"&&(typeof g.media!="string"||matchMedia(g.media).matches!==!1)&&(m.state.loading&4)===0){if(m.instance===null){var S=gf(g.href),j=u.querySelector($d(S));if(j){u=j._p,u!==null&&typeof u=="object"&&typeof u.then=="function"&&(s.count++,s=vv.bind(s),u.then(s,s)),m.state.loading|=4,m.instance=j,ln(j);return}j=u.ownerDocument||u,g=zT(g),(S=ra.get(S))&&$w(g,S),j=j.createElement("link"),ln(j);var I=j;I._p=new Promise(function(K,J){I.onload=K,I.onerror=J}),$i(j,"link",g),m.instance=j}s.stylesheets===null&&(s.stylesheets=new Map),s.stylesheets.set(m,u),(u=m.state.preload)&&(m.state.loading&3)===0&&(s.count++,m=vv.bind(s),u.addEventListener("load",m),u.addEventListener("error",m))}}var Lw=0;function jY(s,u){return s.stylesheets&&s.count===0&&yv(s,s.stylesheets),0Lw?50:800)+u);return s.unsuspend=m,function(){s.unsuspend=null,clearTimeout(g),clearTimeout(S)}}:null}function vv(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)yv(this,this.stylesheets);else if(this.unsuspend){var s=this.unsuspend;this.unsuspend=null,s()}}}var gv=null;function yv(s,u){s.stylesheets=null,s.unsuspend!==null&&(s.count++,gv=new Map,u.forEach(MY,s),gv=null,vv.call(s))}function MY(s,u){if(!(u.state.loading&4)){var m=gv.get(s);if(m)var g=m.get(null);else{m=new Map,gv.set(s,m);for(var S=s.querySelectorAll("link[data-precedence],style[data-precedence]"),j=0;j"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(n){console.error(n)}}return e(),xk.exports=Zte(),xk.exports}var Jte=Qte();class TB extends Error{constructor(n,t){super(t),this.status=n,this.name="HTTPError"}}async function eie(e,n,t){const i=await fetch(`${t}${e}`,{credentials:"include",...n,headers:{"Content-Type":"application/json",...(n==null?void 0:n.headers)??{}}});if(!i.ok){const r=await i.json().catch(()=>({Message:i.statusText}));throw new TB(i.status,r.Message??r.message??i.statusText)}if(i.status!==204)return i.json()}const nie="/api";function mt(e,n){return eie(e,n,nie)}function tie(){return mt("/board")}function iie(){return mt("/flags")}function rie(e){return mt("/columns",{method:"POST",body:JSON.stringify({name:e})})}function Ul(e,n){return mt(`/columns/${e}`,{method:"PATCH",body:JSON.stringify(n)})}function aie(e){return mt(`/columns/${e}`,{method:"DELETE"})}function oie(e){return mt("/columns/reorder",{method:"POST",body:JSON.stringify({ids:e})})}function sie(e){return mt("/cards",{method:"POST",body:JSON.stringify(e)})}function Sf(e,n){return mt(`/cards/${e}`,{method:"PATCH",body:JSON.stringify(n)})}function lie(e){return mt(`/cards/${e}`,{method:"DELETE"})}function Ak(e,n){return mt(`/cards/${e}/stickers`,{method:"PUT",body:JSON.stringify({stickers:n})})}function uie(){return mt("/trash")}function fie(e){return mt(`/cards/${e}/restore`,{method:"POST"})}function cie(e){return mt(`/cards/${e}/purge`,{method:"DELETE"})}function die(){return mt("/archive")}function hie(e){return mt(`/cards/${e}/archive`,{method:"POST"})}function mie(e){return mt(`/cards/${e}/unarchive`,{method:"POST"})}function pie(e,n,t){return mt(`/cards/${e}/move`,{method:"POST",body:JSON.stringify({column_id:n,ordered_ids:t})})}function vie(e){return mt(`/cards/${e}/history`)}function gie(e){return mt(`/cards/${e}/messages`)}function yie(e,n){return mt(`/cards/${e}/messages`,{method:"POST",body:JSON.stringify({body:n})})}function bie(e,n){return mt(`/cards/${e}/messages/${n}`,{method:"DELETE"})}function wie(e){return mt(`/cards/${e}/duplicate`,{method:"POST"})}function kie(){return`${window.location.protocol==="https:"?"wss:":"ws:"}//${window.location.host}/api/chat/ws`}function _ie(e,n,t){return new Promise((i,r)=>{const a=new WebSocket(kie());let o=!1;const l=f=>{if(!o){o=!0;try{a.close()}catch{}f?r(f):i()}};a.onopen=()=>{a.send(JSON.stringify({messages:e}))},a.onmessage=f=>{try{const c=JSON.parse(typeof f.data=="string"?f.data:"");n(c),(c.type==="done"||c.type==="error")&&l(c.type==="error"?new Error(c.error):void 0)}catch(c){l(c)}},a.onerror=()=>l(new Error("websocket error")),a.onclose=()=>l()})}function Oj(e,n){return mt("/auth/login",{method:"POST",body:JSON.stringify({username:e,password:n})})}function xie(e,n,t){return mt("/auth/register",{method:"POST",body:JSON.stringify({username:e,password:n,display_name:t})})}function Sie(){return mt("/auth/logout",{method:"POST"})}function Cie(){return mt("/me")}function Ej(e){return mt("/me",{method:"PATCH",body:JSON.stringify(e)})}function jB(){return mt("/users")}function MB(){return mt("/tags")}function Aie(){return mt("/requesters")}function DB(e){const n=new URLSearchParams;e.from&&n.set("from",e.from),e.to&&n.set("to",e.to),e.assignee_id&&n.set("assignee_id",e.assignee_id),e.requester&&n.set("requester",e.requester),e.tags&&e.tags.length>0&&n.set("tags",e.tags.join(","));const t=n.toString();return mt(`/metrics${t?`?${t}`:""}`)}const RB=A.createContext(null);function Oie({children:e}){const[n,t]=A.useState(null),[i,r]=A.useState(!0);A.useEffect(()=>{Cie().then(t).catch(f=>{(!(f instanceof TB)||f.status!==401)&&console.warn("getMe failed",f)}).finally(()=>r(!1))},[]);const a=A.useCallback(async(f,c)=>{const h=await Oj(f,c);t(h)},[]),o=A.useCallback(async(f,c,h)=>{await xie(f,c,h);const d=await Oj(f,c);t(d)},[]),l=A.useCallback(async()=>{await Sie(),t(null)},[]);return y.jsx(RB.Provider,{value:{user:n,loading:i,login:a,register:o,logout:l,setUser:t},children:e})}function zC(){const e=A.useContext(RB);if(!e)throw new Error("useAuth: missing AuthProvider");return e}function Eie(){for(var e=arguments.length,n=new Array(e),t=0;ti=>{n.forEach(r=>r(i))},n)}const qy=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function zc(e){const n=Object.prototype.toString.call(e);return n==="[object Window]"||n==="[object global]"}function LC(e){return"nodeType"in e}function ur(e){var n,t;return e?zc(e)?e:LC(e)&&(n=(t=e.ownerDocument)==null?void 0:t.defaultView)!=null?n:window:window}function IC(e){const{Document:n}=ur(e);return e instanceof n}function Ym(e){return zc(e)?!1:e instanceof ur(e).HTMLElement}function PB(e){return e instanceof ur(e).SVGElement}function Lc(e){return e?zc(e)?e.document:LC(e)?IC(e)?e:Ym(e)||PB(e)?e.ownerDocument:document:document:document}const qa=qy?A.useLayoutEffect:A.useEffect;function Hy(e){const n=A.useRef(e);return qa(()=>{n.current=e}),A.useCallback(function(){for(var t=arguments.length,i=new Array(t),r=0;r{e.current=setInterval(i,r)},[]),t=A.useCallback(()=>{e.current!==null&&(clearInterval(e.current),e.current=null)},[]);return[n,t]}function qh(e,n){n===void 0&&(n=[e]);const t=A.useRef(e);return qa(()=>{t.current!==e&&(t.current=e)},n),t}function Km(e,n){const t=A.useRef();return A.useMemo(()=>{const i=e(t.current);return t.current=i,i},[...n])}function Dg(e){const n=Hy(e),t=A.useRef(null),i=A.useCallback(r=>{r!==t.current&&(n==null||n(r,t.current)),t.current=r},[]);return[t,i]}function Rg(e){const n=A.useRef();return A.useEffect(()=>{n.current=e},[e]),n.current}let Ok={};function Xm(e,n){return A.useMemo(()=>{if(n)return n;const t=Ok[e]==null?0:Ok[e]+1;return Ok[e]=t,e+"-"+t},[e,n])}function NB(e){return function(n){for(var t=arguments.length,i=new Array(t>1?t-1:0),r=1;r{const l=Object.entries(o);for(const[f,c]of l){const h=a[f];h!=null&&(a[f]=h+e*c)}return a},{...n})}}const Bf=NB(1),Hh=NB(-1);function jie(e){return"clientX"in e&&"clientY"in e}function Uy(e){if(!e)return!1;const{KeyboardEvent:n}=ur(e.target);return n&&e instanceof n}function Mie(e){if(!e)return!1;const{TouchEvent:n}=ur(e.target);return n&&e instanceof n}function Pg(e){if(Mie(e)){if(e.touches&&e.touches.length){const{clientX:n,clientY:t}=e.touches[0];return{x:n,y:t}}else if(e.changedTouches&&e.changedTouches.length){const{clientX:n,clientY:t}=e.changedTouches[0];return{x:n,y:t}}}return jie(e)?{x:e.clientX,y:e.clientY}:null}const mo=Object.freeze({Translate:{toString(e){if(!e)return;const{x:n,y:t}=e;return"translate3d("+(n?Math.round(n):0)+"px, "+(t?Math.round(t):0)+"px, 0)"}},Scale:{toString(e){if(!e)return;const{scaleX:n,scaleY:t}=e;return"scaleX("+n+") scaleY("+t+")"}},Transform:{toString(e){if(e)return[mo.Translate.toString(e),mo.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:n,duration:t,easing:i}=e;return n+" "+t+"ms "+i}}}),Tj="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function Die(e){return e.matches(Tj)?e:e.querySelector(Tj)}const Rie={display:"none"};function Pie(e){let{id:n,value:t}=e;return Q.createElement("div",{id:n,style:Rie},t)}function Nie(e){let{id:n,announcement:t,ariaLiveType:i="assertive"}=e;const r={position:"fixed",top:0,left:0,width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"};return Q.createElement("div",{id:n,style:r,role:"status","aria-live":i,"aria-atomic":!0},t)}function $ie(){const[e,n]=A.useState("");return{announce:A.useCallback(i=>{i!=null&&n(i)},[]),announcement:e}}const $B=A.createContext(null);function zie(e){const n=A.useContext($B);A.useEffect(()=>{if(!n)throw new Error("useDndMonitor must be used within a children of ");return n(e)},[e,n])}function Lie(){const[e]=A.useState(()=>new Set),n=A.useCallback(i=>(e.add(i),()=>e.delete(i)),[e]);return[A.useCallback(i=>{let{type:r,event:a}=i;e.forEach(o=>{var l;return(l=o[r])==null?void 0:l.call(o,a)})},[e]),n]}const Iie={draggable:` - To pick up a draggable item, press the space bar. - While dragging, use the arrow keys to move the item. - Press space again to drop the item in its new position, or press escape to cancel. - `},Bie={onDragStart(e){let{active:n}=e;return"Picked up draggable item "+n.id+"."},onDragOver(e){let{active:n,over:t}=e;return t?"Draggable item "+n.id+" was moved over droppable area "+t.id+".":"Draggable item "+n.id+" is no longer over a droppable area."},onDragEnd(e){let{active:n,over:t}=e;return t?"Draggable item "+n.id+" was dropped over droppable area "+t.id:"Draggable item "+n.id+" was dropped."},onDragCancel(e){let{active:n}=e;return"Dragging was cancelled. Draggable item "+n.id+" was dropped."}};function Fie(e){let{announcements:n=Bie,container:t,hiddenTextDescribedById:i,screenReaderInstructions:r=Iie}=e;const{announce:a,announcement:o}=$ie(),l=Xm("DndLiveRegion"),[f,c]=A.useState(!1);if(A.useEffect(()=>{c(!0)},[]),zie(A.useMemo(()=>({onDragStart(d){let{active:p}=d;a(n.onDragStart({active:p}))},onDragMove(d){let{active:p,over:v}=d;n.onDragMove&&a(n.onDragMove({active:p,over:v}))},onDragOver(d){let{active:p,over:v}=d;a(n.onDragOver({active:p,over:v}))},onDragEnd(d){let{active:p,over:v}=d;a(n.onDragEnd({active:p,over:v}))},onDragCancel(d){let{active:p,over:v}=d;a(n.onDragCancel({active:p,over:v}))}}),[a,n])),!f)return null;const h=Q.createElement(Q.Fragment,null,Q.createElement(Pie,{id:i,value:r.draggable}),Q.createElement(Nie,{id:l,announcement:o}));return t?Ks.createPortal(h,t):h}var xi;(function(e){e.DragStart="dragStart",e.DragMove="dragMove",e.DragEnd="dragEnd",e.DragCancel="dragCancel",e.DragOver="dragOver",e.RegisterDroppable="registerDroppable",e.SetDroppableDisabled="setDroppableDisabled",e.UnregisterDroppable="unregisterDroppable"})(xi||(xi={}));function Ng(){}function jj(e,n){return A.useMemo(()=>({sensor:e,options:n??{}}),[e,n])}function qie(){for(var e=arguments.length,n=new Array(e),t=0;t[...n].filter(i=>i!=null),[...n])}const Ha=Object.freeze({x:0,y:0});function BC(e,n){return Math.sqrt(Math.pow(e.x-n.x,2)+Math.pow(e.y-n.y,2))}function Hie(e,n){const t=Pg(e);if(!t)return"0 0";const i={x:(t.x-n.left)/n.width*100,y:(t.y-n.top)/n.height*100};return i.x+"% "+i.y+"%"}function FC(e,n){let{data:{value:t}}=e,{data:{value:i}}=n;return t-i}function Uie(e,n){let{data:{value:t}}=e,{data:{value:i}}=n;return i-t}function _S(e){let{left:n,top:t,height:i,width:r}=e;return[{x:n,y:t},{x:n+r,y:t},{x:n,y:t+i},{x:n+r,y:t+i}]}function zB(e,n){if(!e||e.length===0)return null;const[t]=e;return t[n]}function Mj(e,n,t){return n===void 0&&(n=e.left),t===void 0&&(t=e.top),{x:n+e.width*.5,y:t+e.height*.5}}const Vie=e=>{let{collisionRect:n,droppableRects:t,droppableContainers:i}=e;const r=Mj(n,n.left,n.top),a=[];for(const o of i){const{id:l}=o,f=t.get(l);if(f){const c=BC(Mj(f),r);a.push({id:l,data:{droppableContainer:o,value:c}})}}return a.sort(FC)},LB=e=>{let{collisionRect:n,droppableRects:t,droppableContainers:i}=e;const r=_S(n),a=[];for(const o of i){const{id:l}=o,f=t.get(l);if(f){const c=_S(f),h=r.reduce((p,v,b)=>p+BC(c[b],v),0),d=Number((h/4).toFixed(4));a.push({id:l,data:{droppableContainer:o,value:d}})}}return a.sort(FC)};function Wie(e,n){const t=Math.max(n.top,e.top),i=Math.max(n.left,e.left),r=Math.min(n.left+n.width,e.left+e.width),a=Math.min(n.top+n.height,e.top+e.height),o=r-i,l=a-t;if(i{let{collisionRect:n,droppableRects:t,droppableContainers:i}=e;const r=[];for(const a of i){const{id:o}=a,l=t.get(o);if(l){const f=Wie(l,n);f>0&&r.push({id:o,data:{droppableContainer:a,value:f}})}}return r.sort(Uie)};function Gie(e,n){const{top:t,left:i,bottom:r,right:a}=n;return t<=e.y&&e.y<=r&&i<=e.x&&e.x<=a}const Yie=e=>{let{droppableContainers:n,droppableRects:t,pointerCoordinates:i}=e;if(!i)return[];const r=[];for(const a of n){const{id:o}=a,l=t.get(o);if(l&&Gie(i,l)){const c=_S(l).reduce((d,p)=>d+BC(i,p),0),h=Number((c/4).toFixed(4));r.push({id:o,data:{droppableContainer:a,value:h}})}}return r.sort(FC)};function Kie(e,n,t){return{...e,scaleX:n&&t?n.width/t.width:1,scaleY:n&&t?n.height/t.height:1}}function BB(e,n){return e&&n?{x:e.left-n.left,y:e.top-n.top}:Ha}function Xie(e){return function(t){for(var i=arguments.length,r=new Array(i>1?i-1:0),a=1;a({...o,top:o.top+e*l.y,bottom:o.bottom+e*l.y,left:o.left+e*l.x,right:o.right+e*l.x}),{...t})}}const Zie=Xie(1);function FB(e){if(e.startsWith("matrix3d(")){const n=e.slice(9,-1).split(/, /);return{x:+n[12],y:+n[13],scaleX:+n[0],scaleY:+n[5]}}else if(e.startsWith("matrix(")){const n=e.slice(7,-1).split(/, /);return{x:+n[4],y:+n[5],scaleX:+n[0],scaleY:+n[3]}}return null}function Qie(e,n,t){const i=FB(n);if(!i)return e;const{scaleX:r,scaleY:a,x:o,y:l}=i,f=e.left-o-(1-r)*parseFloat(t),c=e.top-l-(1-a)*parseFloat(t.slice(t.indexOf(" ")+1)),h=r?e.width/r:e.width,d=a?e.height/a:e.height;return{width:h,height:d,top:c,right:f+h,bottom:c+d,left:f}}const Jie={ignoreTransform:!1};function Ic(e,n){n===void 0&&(n=Jie);let t=e.getBoundingClientRect();if(n.ignoreTransform){const{transform:c,transformOrigin:h}=ur(e).getComputedStyle(e);c&&(t=Qie(t,c,h))}const{top:i,left:r,width:a,height:o,bottom:l,right:f}=t;return{top:i,left:r,width:a,height:o,bottom:l,right:f}}function Dj(e){return Ic(e,{ignoreTransform:!0})}function ere(e){const n=e.innerWidth,t=e.innerHeight;return{top:0,left:0,right:n,bottom:t,width:n,height:t}}function nre(e,n){return n===void 0&&(n=ur(e).getComputedStyle(e)),n.position==="fixed"}function tre(e,n){n===void 0&&(n=ur(e).getComputedStyle(e));const t=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some(r=>{const a=n[r];return typeof a=="string"?t.test(a):!1})}function Vy(e,n){const t=[];function i(r){if(n!=null&&t.length>=n||!r)return t;if(IC(r)&&r.scrollingElement!=null&&!t.includes(r.scrollingElement))return t.push(r.scrollingElement),t;if(!Ym(r)||PB(r)||t.includes(r))return t;const a=ur(e).getComputedStyle(r);return r!==e&&tre(r,a)&&t.push(r),nre(r,a)?t:i(r.parentNode)}return e?i(e):t}function qB(e){const[n]=Vy(e,1);return n??null}function Ek(e){return!qy||!e?null:zc(e)?e:LC(e)?IC(e)||e===Lc(e).scrollingElement?window:Ym(e)?e:null:null}function HB(e){return zc(e)?e.scrollX:e.scrollLeft}function UB(e){return zc(e)?e.scrollY:e.scrollTop}function xS(e){return{x:HB(e),y:UB(e)}}var ji;(function(e){e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward"})(ji||(ji={}));function VB(e){return!qy||!e?!1:e===document.scrollingElement}function WB(e){const n={x:0,y:0},t=VB(e)?{height:window.innerHeight,width:window.innerWidth}:{height:e.clientHeight,width:e.clientWidth},i={x:e.scrollWidth-t.width,y:e.scrollHeight-t.height},r=e.scrollTop<=n.y,a=e.scrollLeft<=n.x,o=e.scrollTop>=i.y,l=e.scrollLeft>=i.x;return{isTop:r,isLeft:a,isBottom:o,isRight:l,maxScroll:i,minScroll:n}}const ire={x:.2,y:.2};function rre(e,n,t,i,r){let{top:a,left:o,right:l,bottom:f}=t;i===void 0&&(i=10),r===void 0&&(r=ire);const{isTop:c,isBottom:h,isLeft:d,isRight:p}=WB(e),v={x:0,y:0},b={x:0,y:0},w={height:n.height*r.y,width:n.width*r.x};return!c&&a<=n.top+w.height?(v.y=ji.Backward,b.y=i*Math.abs((n.top+w.height-a)/w.height)):!h&&f>=n.bottom-w.height&&(v.y=ji.Forward,b.y=i*Math.abs((n.bottom-w.height-f)/w.height)),!p&&l>=n.right-w.width?(v.x=ji.Forward,b.x=i*Math.abs((n.right-w.width-l)/w.width)):!d&&o<=n.left+w.width&&(v.x=ji.Backward,b.x=i*Math.abs((n.left+w.width-o)/w.width)),{direction:v,speed:b}}function are(e){if(e===document.scrollingElement){const{innerWidth:a,innerHeight:o}=window;return{top:0,left:0,right:a,bottom:o,width:a,height:o}}const{top:n,left:t,right:i,bottom:r}=e.getBoundingClientRect();return{top:n,left:t,right:i,bottom:r,width:e.clientWidth,height:e.clientHeight}}function GB(e){return e.reduce((n,t)=>Bf(n,xS(t)),Ha)}function ore(e){return e.reduce((n,t)=>n+HB(t),0)}function sre(e){return e.reduce((n,t)=>n+UB(t),0)}function YB(e,n){if(n===void 0&&(n=Ic),!e)return;const{top:t,left:i,bottom:r,right:a}=n(e);qB(e)&&(r<=0||a<=0||t>=window.innerHeight||i>=window.innerWidth)&&e.scrollIntoView({block:"center",inline:"center"})}const lre=[["x",["left","right"],ore],["y",["top","bottom"],sre]];class qC{constructor(n,t){this.rect=void 0,this.width=void 0,this.height=void 0,this.top=void 0,this.bottom=void 0,this.right=void 0,this.left=void 0;const i=Vy(t),r=GB(i);this.rect={...n},this.width=n.width,this.height=n.height;for(const[a,o,l]of lre)for(const f of o)Object.defineProperty(this,f,{get:()=>{const c=l(i),h=r[a]-c;return this.rect[f]+h},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class kh{constructor(n){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach(t=>{var i;return(i=this.target)==null?void 0:i.removeEventListener(...t)})},this.target=n}add(n,t,i){var r;(r=this.target)==null||r.addEventListener(n,t,i),this.listeners.push([n,t,i])}}function ure(e){const{EventTarget:n}=ur(e);return e instanceof n?e:Lc(e)}function Tk(e,n){const t=Math.abs(e.x),i=Math.abs(e.y);return typeof n=="number"?Math.sqrt(t**2+i**2)>n:"x"in n&&"y"in n?t>n.x&&i>n.y:"x"in n?t>n.x:"y"in n?i>n.y:!1}var fa;(function(e){e.Click="click",e.DragStart="dragstart",e.Keydown="keydown",e.ContextMenu="contextmenu",e.Resize="resize",e.SelectionChange="selectionchange",e.VisibilityChange="visibilitychange"})(fa||(fa={}));function Rj(e){e.preventDefault()}function fre(e){e.stopPropagation()}var tt;(function(e){e.Space="Space",e.Down="ArrowDown",e.Right="ArrowRight",e.Left="ArrowLeft",e.Up="ArrowUp",e.Esc="Escape",e.Enter="Enter",e.Tab="Tab"})(tt||(tt={}));const KB={start:[tt.Space,tt.Enter],cancel:[tt.Esc],end:[tt.Space,tt.Enter,tt.Tab]},cre=(e,n)=>{let{currentCoordinates:t}=n;switch(e.code){case tt.Right:return{...t,x:t.x+25};case tt.Left:return{...t,x:t.x-25};case tt.Down:return{...t,y:t.y+25};case tt.Up:return{...t,y:t.y-25}}};class HC{constructor(n){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=n;const{event:{target:t}}=n;this.props=n,this.listeners=new kh(Lc(t)),this.windowListeners=new kh(ur(t)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(fa.Resize,this.handleCancel),this.windowListeners.add(fa.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(fa.Keydown,this.handleKeyDown))}handleStart(){const{activeNode:n,onStart:t}=this.props,i=n.node.current;i&&YB(i),t(Ha)}handleKeyDown(n){if(Uy(n)){const{active:t,context:i,options:r}=this.props,{keyboardCodes:a=KB,coordinateGetter:o=cre,scrollBehavior:l="smooth"}=r,{code:f}=n;if(a.end.includes(f)){this.handleEnd(n);return}if(a.cancel.includes(f)){this.handleCancel(n);return}const{collisionRect:c}=i.current,h=c?{x:c.left,y:c.top}:Ha;this.referenceCoordinates||(this.referenceCoordinates=h);const d=o(n,{active:t,context:i.current,currentCoordinates:h});if(d){const p=Hh(d,h),v={x:0,y:0},{scrollableAncestors:b}=i.current;for(const w of b){const k=n.code,{isTop:_,isRight:x,isLeft:C,isBottom:T,maxScroll:O,minScroll:E}=WB(w),M=are(w),N={x:Math.min(k===tt.Right?M.right-M.width/2:M.right,Math.max(k===tt.Right?M.left:M.left+M.width/2,d.x)),y:Math.min(k===tt.Down?M.bottom-M.height/2:M.bottom,Math.max(k===tt.Down?M.top:M.top+M.height/2,d.y))},F=k===tt.Right&&!x||k===tt.Left&&!C,R=k===tt.Down&&!T||k===tt.Up&&!_;if(F&&N.x!==d.x){const L=w.scrollLeft+p.x,B=k===tt.Right&&L<=O.x||k===tt.Left&&L>=E.x;if(B&&!p.y){w.scrollTo({left:L,behavior:l});return}B?v.x=w.scrollLeft-L:v.x=k===tt.Right?w.scrollLeft-O.x:w.scrollLeft-E.x,v.x&&w.scrollBy({left:-v.x,behavior:l});break}else if(R&&N.y!==d.y){const L=w.scrollTop+p.y,B=k===tt.Down&&L<=O.y||k===tt.Up&&L>=E.y;if(B&&!p.x){w.scrollTo({top:L,behavior:l});return}B?v.y=w.scrollTop-L:v.y=k===tt.Down?w.scrollTop-O.y:w.scrollTop-E.y,v.y&&w.scrollBy({top:-v.y,behavior:l});break}}this.handleMove(n,Bf(Hh(d,this.referenceCoordinates),v))}}}handleMove(n,t){const{onMove:i}=this.props;n.preventDefault(),i(t)}handleEnd(n){const{onEnd:t}=this.props;n.preventDefault(),this.detach(),t()}handleCancel(n){const{onCancel:t}=this.props;n.preventDefault(),this.detach(),t()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}}HC.activators=[{eventName:"onKeyDown",handler:(e,n,t)=>{let{keyboardCodes:i=KB,onActivation:r}=n,{active:a}=t;const{code:o}=e.nativeEvent;if(i.start.includes(o)){const l=a.activatorNode.current;return l&&e.target!==l?!1:(e.preventDefault(),r==null||r({event:e.nativeEvent}),!0)}return!1}}];function Pj(e){return!!(e&&"distance"in e)}function Nj(e){return!!(e&&"delay"in e)}class UC{constructor(n,t,i){var r;i===void 0&&(i=ure(n.event.target)),this.props=void 0,this.events=void 0,this.autoScrollEnabled=!0,this.document=void 0,this.activated=!1,this.initialCoordinates=void 0,this.timeoutId=null,this.listeners=void 0,this.documentListeners=void 0,this.windowListeners=void 0,this.props=n,this.events=t;const{event:a}=n,{target:o}=a;this.props=n,this.events=t,this.document=Lc(o),this.documentListeners=new kh(this.document),this.listeners=new kh(i),this.windowListeners=new kh(ur(o)),this.initialCoordinates=(r=Pg(a))!=null?r:Ha,this.handleStart=this.handleStart.bind(this),this.handleMove=this.handleMove.bind(this),this.handleEnd=this.handleEnd.bind(this),this.handleCancel=this.handleCancel.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.removeTextSelection=this.removeTextSelection.bind(this),this.attach()}attach(){const{events:n,props:{options:{activationConstraint:t,bypassActivationConstraint:i}}}=this;if(this.listeners.add(n.move.name,this.handleMove,{passive:!1}),this.listeners.add(n.end.name,this.handleEnd),n.cancel&&this.listeners.add(n.cancel.name,this.handleCancel),this.windowListeners.add(fa.Resize,this.handleCancel),this.windowListeners.add(fa.DragStart,Rj),this.windowListeners.add(fa.VisibilityChange,this.handleCancel),this.windowListeners.add(fa.ContextMenu,Rj),this.documentListeners.add(fa.Keydown,this.handleKeydown),t){if(i!=null&&i({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(Nj(t)){this.timeoutId=setTimeout(this.handleStart,t.delay),this.handlePending(t);return}if(Pj(t)){this.handlePending(t);return}}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),this.timeoutId!==null&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handlePending(n,t){const{active:i,onPending:r}=this.props;r(i,n,this.initialCoordinates,t)}handleStart(){const{initialCoordinates:n}=this,{onStart:t}=this.props;n&&(this.activated=!0,this.documentListeners.add(fa.Click,fre,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(fa.SelectionChange,this.removeTextSelection),t(n))}handleMove(n){var t;const{activated:i,initialCoordinates:r,props:a}=this,{onMove:o,options:{activationConstraint:l}}=a;if(!r)return;const f=(t=Pg(n))!=null?t:Ha,c=Hh(r,f);if(!i&&l){if(Pj(l)){if(l.tolerance!=null&&Tk(c,l.tolerance))return this.handleCancel();if(Tk(c,l.distance))return this.handleStart()}if(Nj(l)&&Tk(c,l.tolerance))return this.handleCancel();this.handlePending(l,c);return}n.cancelable&&n.preventDefault(),o(f)}handleEnd(){const{onAbort:n,onEnd:t}=this.props;this.detach(),this.activated||n(this.props.active),t()}handleCancel(){const{onAbort:n,onCancel:t}=this.props;this.detach(),this.activated||n(this.props.active),t()}handleKeydown(n){n.code===tt.Esc&&this.handleCancel()}removeTextSelection(){var n;(n=this.document.getSelection())==null||n.removeAllRanges()}}const dre={cancel:{name:"pointercancel"},move:{name:"pointermove"},end:{name:"pointerup"}};class VC extends UC{constructor(n){const{event:t}=n,i=Lc(t.target);super(n,dre,i)}}VC.activators=[{eventName:"onPointerDown",handler:(e,n)=>{let{nativeEvent:t}=e,{onActivation:i}=n;return!t.isPrimary||t.button!==0?!1:(i==null||i({event:t}),!0)}}];const hre={move:{name:"mousemove"},end:{name:"mouseup"}};var SS;(function(e){e[e.RightClick=2]="RightClick"})(SS||(SS={}));class mre extends UC{constructor(n){super(n,hre,Lc(n.event.target))}}mre.activators=[{eventName:"onMouseDown",handler:(e,n)=>{let{nativeEvent:t}=e,{onActivation:i}=n;return t.button===SS.RightClick?!1:(i==null||i({event:t}),!0)}}];const jk={cancel:{name:"touchcancel"},move:{name:"touchmove"},end:{name:"touchend"}};class pre extends UC{constructor(n){super(n,jk)}static setup(){return window.addEventListener(jk.move.name,n,{capture:!1,passive:!1}),function(){window.removeEventListener(jk.move.name,n)};function n(){}}}pre.activators=[{eventName:"onTouchStart",handler:(e,n)=>{let{nativeEvent:t}=e,{onActivation:i}=n;const{touches:r}=t;return r.length>1?!1:(i==null||i({event:t}),!0)}}];var _h;(function(e){e[e.Pointer=0]="Pointer",e[e.DraggableRect=1]="DraggableRect"})(_h||(_h={}));var $g;(function(e){e[e.TreeOrder=0]="TreeOrder",e[e.ReversedTreeOrder=1]="ReversedTreeOrder"})($g||($g={}));function vre(e){let{acceleration:n,activator:t=_h.Pointer,canScroll:i,draggingRect:r,enabled:a,interval:o=5,order:l=$g.TreeOrder,pointerCoordinates:f,scrollableAncestors:c,scrollableAncestorRects:h,delta:d,threshold:p}=e;const v=yre({delta:d,disabled:!a}),[b,w]=Tie(),k=A.useRef({x:0,y:0}),_=A.useRef({x:0,y:0}),x=A.useMemo(()=>{switch(t){case _h.Pointer:return f?{top:f.y,bottom:f.y,left:f.x,right:f.x}:null;case _h.DraggableRect:return r}},[t,r,f]),C=A.useRef(null),T=A.useCallback(()=>{const E=C.current;if(!E)return;const M=k.current.x*_.current.x,N=k.current.y*_.current.y;E.scrollBy(M,N)},[]),O=A.useMemo(()=>l===$g.TreeOrder?[...c].reverse():c,[l,c]);A.useEffect(()=>{if(!a||!c.length||!x){w();return}for(const E of O){if((i==null?void 0:i(E))===!1)continue;const M=c.indexOf(E),N=h[M];if(!N)continue;const{direction:F,speed:R}=rre(E,N,x,n,p);for(const L of["x","y"])v[L][F[L]]||(R[L]=0,F[L]=0);if(R.x>0||R.y>0){w(),C.current=E,b(T,o),k.current=R,_.current=F;return}}k.current={x:0,y:0},_.current={x:0,y:0},w()},[n,T,i,w,a,o,JSON.stringify(x),JSON.stringify(v),b,c,O,h,JSON.stringify(p)])}const gre={x:{[ji.Backward]:!1,[ji.Forward]:!1},y:{[ji.Backward]:!1,[ji.Forward]:!1}};function yre(e){let{delta:n,disabled:t}=e;const i=Rg(n);return Km(r=>{if(t||!i||!r)return gre;const a={x:Math.sign(n.x-i.x),y:Math.sign(n.y-i.y)};return{x:{[ji.Backward]:r.x[ji.Backward]||a.x===-1,[ji.Forward]:r.x[ji.Forward]||a.x===1},y:{[ji.Backward]:r.y[ji.Backward]||a.y===-1,[ji.Forward]:r.y[ji.Forward]||a.y===1}}},[t,n,i])}function bre(e,n){const t=n!=null?e.get(n):void 0,i=t?t.node.current:null;return Km(r=>{var a;return n==null?null:(a=i??r)!=null?a:null},[i,n])}function wre(e,n){return A.useMemo(()=>e.reduce((t,i)=>{const{sensor:r}=i,a=r.activators.map(o=>({eventName:o.eventName,handler:n(o.handler,i)}));return[...t,...a]},[]),[e,n])}var Uh;(function(e){e[e.Always=0]="Always",e[e.BeforeDragging=1]="BeforeDragging",e[e.WhileDragging=2]="WhileDragging"})(Uh||(Uh={}));var CS;(function(e){e.Optimized="optimized"})(CS||(CS={}));const $j=new Map;function kre(e,n){let{dragging:t,dependencies:i,config:r}=n;const[a,o]=A.useState(null),{frequency:l,measure:f,strategy:c}=r,h=A.useRef(e),d=k(),p=qh(d),v=A.useCallback(function(_){_===void 0&&(_=[]),!p.current&&o(x=>x===null?_:x.concat(_.filter(C=>!x.includes(C))))},[p]),b=A.useRef(null),w=Km(_=>{if(d&&!t)return $j;if(!_||_===$j||h.current!==e||a!=null){const x=new Map;for(let C of e){if(!C)continue;if(a&&a.length>0&&!a.includes(C.id)&&C.rect.current){x.set(C.id,C.rect.current);continue}const T=C.node.current,O=T?new qC(f(T),T):null;C.rect.current=O,O&&x.set(C.id,O)}return x}return _},[e,a,t,d,f]);return A.useEffect(()=>{h.current=e},[e]),A.useEffect(()=>{d||v()},[t,d]),A.useEffect(()=>{a&&a.length>0&&o(null)},[JSON.stringify(a)]),A.useEffect(()=>{d||typeof l!="number"||b.current!==null||(b.current=setTimeout(()=>{v(),b.current=null},l))},[l,d,v,...i]),{droppableRects:w,measureDroppableContainers:v,measuringScheduled:a!=null};function k(){switch(c){case Uh.Always:return!1;case Uh.BeforeDragging:return t;default:return!t}}}function WC(e,n){return Km(t=>e?t||(typeof n=="function"?n(e):e):null,[n,e])}function _re(e,n){return WC(e,n)}function xre(e){let{callback:n,disabled:t}=e;const i=Hy(n),r=A.useMemo(()=>{if(t||typeof window>"u"||typeof window.MutationObserver>"u")return;const{MutationObserver:a}=window;return new a(i)},[i,t]);return A.useEffect(()=>()=>r==null?void 0:r.disconnect(),[r]),r}function Wy(e){let{callback:n,disabled:t}=e;const i=Hy(n),r=A.useMemo(()=>{if(t||typeof window>"u"||typeof window.ResizeObserver>"u")return;const{ResizeObserver:a}=window;return new a(i)},[t]);return A.useEffect(()=>()=>r==null?void 0:r.disconnect(),[r]),r}function Sre(e){return new qC(Ic(e),e)}function zj(e,n,t){n===void 0&&(n=Sre);const[i,r]=A.useState(null);function a(){r(f=>{if(!e)return null;if(e.isConnected===!1){var c;return(c=f??t)!=null?c:null}const h=n(e);return JSON.stringify(f)===JSON.stringify(h)?f:h})}const o=xre({callback(f){if(e)for(const c of f){const{type:h,target:d}=c;if(h==="childList"&&d instanceof HTMLElement&&d.contains(e)){a();break}}}}),l=Wy({callback:a});return qa(()=>{a(),e?(l==null||l.observe(e),o==null||o.observe(document.body,{childList:!0,subtree:!0})):(l==null||l.disconnect(),o==null||o.disconnect())},[e]),i}function Cre(e){const n=WC(e);return BB(e,n)}const Lj=[];function Are(e){const n=A.useRef(e),t=Km(i=>e?i&&i!==Lj&&e&&n.current&&e.parentNode===n.current.parentNode?i:Vy(e):Lj,[e]);return A.useEffect(()=>{n.current=e},[e]),t}function Ore(e){const[n,t]=A.useState(null),i=A.useRef(e),r=A.useCallback(a=>{const o=Ek(a.target);o&&t(l=>l?(l.set(o,xS(o)),new Map(l)):null)},[]);return A.useEffect(()=>{const a=i.current;if(e!==a){o(a);const l=e.map(f=>{const c=Ek(f);return c?(c.addEventListener("scroll",r,{passive:!0}),[c,xS(c)]):null}).filter(f=>f!=null);t(l.length?new Map(l):null),i.current=e}return()=>{o(e),o(a)};function o(l){l.forEach(f=>{const c=Ek(f);c==null||c.removeEventListener("scroll",r)})}},[r,e]),A.useMemo(()=>e.length?n?Array.from(n.values()).reduce((a,o)=>Bf(a,o),Ha):GB(e):Ha,[e,n])}function Ij(e,n){n===void 0&&(n=[]);const t=A.useRef(null);return A.useEffect(()=>{t.current=null},n),A.useEffect(()=>{const i=e!==Ha;i&&!t.current&&(t.current=e),!i&&t.current&&(t.current=null)},[e]),t.current?Hh(e,t.current):Ha}function Ere(e){A.useEffect(()=>{if(!qy)return;const n=e.map(t=>{let{sensor:i}=t;return i.setup==null?void 0:i.setup()});return()=>{for(const t of n)t==null||t()}},e.map(n=>{let{sensor:t}=n;return t}))}function Tre(e,n){return A.useMemo(()=>e.reduce((t,i)=>{let{eventName:r,handler:a}=i;return t[r]=o=>{a(o,n)},t},{}),[e,n])}function XB(e){return A.useMemo(()=>e?ere(e):null,[e])}const Bj=[];function jre(e,n){n===void 0&&(n=Ic);const[t]=e,i=XB(t?ur(t):null),[r,a]=A.useState(Bj);function o(){a(()=>e.length?e.map(f=>VB(f)?i:new qC(n(f),f)):Bj)}const l=Wy({callback:o});return qa(()=>{l==null||l.disconnect(),o(),e.forEach(f=>l==null?void 0:l.observe(f))},[e]),r}function ZB(e){if(!e)return null;if(e.children.length>1)return e;const n=e.children[0];return Ym(n)?n:e}function Mre(e){let{measure:n}=e;const[t,i]=A.useState(null),r=A.useCallback(c=>{for(const{target:h}of c)if(Ym(h)){i(d=>{const p=n(h);return d?{...d,width:p.width,height:p.height}:p});break}},[n]),a=Wy({callback:r}),o=A.useCallback(c=>{const h=ZB(c);a==null||a.disconnect(),h&&(a==null||a.observe(h)),i(h?n(h):null)},[n,a]),[l,f]=Dg(o);return A.useMemo(()=>({nodeRef:l,rect:t,setRef:f}),[t,l,f])}const Dre=[{sensor:VC,options:{}},{sensor:HC,options:{}}],Rre={current:{}},mg={draggable:{measure:Dj},droppable:{measure:Dj,strategy:Uh.WhileDragging,frequency:CS.Optimized},dragOverlay:{measure:Ic}};class xh extends Map{get(n){var t;return n!=null&&(t=super.get(n))!=null?t:void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter(n=>{let{disabled:t}=n;return!t})}getNodeFor(n){var t,i;return(t=(i=this.get(n))==null?void 0:i.node.current)!=null?t:void 0}}const Pre={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new xh,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:Ng},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:mg,measureDroppableContainers:Ng,windowRect:null,measuringScheduled:!1},QB={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:Ng,draggableNodes:new Map,over:null,measureDroppableContainers:Ng},Zm=A.createContext(QB),JB=A.createContext(Pre);function Nre(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new xh}}}function $re(e,n){switch(n.type){case xi.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:n.initialCoordinates,active:n.active}};case xi.DragMove:return e.draggable.active==null?e:{...e,draggable:{...e.draggable,translate:{x:n.coordinates.x-e.draggable.initialCoordinates.x,y:n.coordinates.y-e.draggable.initialCoordinates.y}}};case xi.DragEnd:case xi.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case xi.RegisterDroppable:{const{element:t}=n,{id:i}=t,r=new xh(e.droppable.containers);return r.set(i,t),{...e,droppable:{...e.droppable,containers:r}}}case xi.SetDroppableDisabled:{const{id:t,key:i,disabled:r}=n,a=e.droppable.containers.get(t);if(!a||i!==a.key)return e;const o=new xh(e.droppable.containers);return o.set(t,{...a,disabled:r}),{...e,droppable:{...e.droppable,containers:o}}}case xi.UnregisterDroppable:{const{id:t,key:i}=n,r=e.droppable.containers.get(t);if(!r||i!==r.key)return e;const a=new xh(e.droppable.containers);return a.delete(t),{...e,droppable:{...e.droppable,containers:a}}}default:return e}}function zre(e){let{disabled:n}=e;const{active:t,activatorEvent:i,draggableNodes:r}=A.useContext(Zm),a=Rg(i),o=Rg(t==null?void 0:t.id);return A.useEffect(()=>{if(!n&&!i&&a&&o!=null){if(!Uy(a)||document.activeElement===a.target)return;const l=r.get(o);if(!l)return;const{activatorNode:f,node:c}=l;if(!f.current&&!c.current)return;requestAnimationFrame(()=>{for(const h of[f.current,c.current]){if(!h)continue;const d=Die(h);if(d){d.focus();break}}})}},[i,n,r,o,a]),null}function eF(e,n){let{transform:t,...i}=n;return e!=null&&e.length?e.reduce((r,a)=>a({transform:r,...i}),t):t}function Lre(e){return A.useMemo(()=>({draggable:{...mg.draggable,...e==null?void 0:e.draggable},droppable:{...mg.droppable,...e==null?void 0:e.droppable},dragOverlay:{...mg.dragOverlay,...e==null?void 0:e.dragOverlay}}),[e==null?void 0:e.draggable,e==null?void 0:e.droppable,e==null?void 0:e.dragOverlay])}function Ire(e){let{activeNode:n,measure:t,initialRect:i,config:r=!0}=e;const a=A.useRef(!1),{x:o,y:l}=typeof r=="boolean"?{x:r,y:r}:r;qa(()=>{if(!o&&!l||!n){a.current=!1;return}if(a.current||!i)return;const c=n==null?void 0:n.node.current;if(!c||c.isConnected===!1)return;const h=t(c),d=BB(h,i);if(o||(d.x=0),l||(d.y=0),a.current=!0,Math.abs(d.x)>0||Math.abs(d.y)>0){const p=qB(c);p&&p.scrollBy({top:d.y,left:d.x})}},[n,o,l,i,t])}const Gy=A.createContext({...Ha,scaleX:1,scaleY:1});var Vs;(function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Initializing=1]="Initializing",e[e.Initialized=2]="Initialized"})(Vs||(Vs={}));const Bre=A.memo(function(n){var t,i,r,a;let{id:o,accessibility:l,autoScroll:f=!0,children:c,sensors:h=Dre,collisionDetection:d=IB,measuring:p,modifiers:v,...b}=n;const w=A.useReducer($re,void 0,Nre),[k,_]=w,[x,C]=Lie(),[T,O]=A.useState(Vs.Uninitialized),E=T===Vs.Initialized,{draggable:{active:M,nodes:N,translate:F},droppable:{containers:R}}=k,L=M!=null?N.get(M):null,B=A.useRef({initial:null,translated:null}),G=A.useMemo(()=>{var vn;return M!=null?{id:M,data:(vn=L==null?void 0:L.data)!=null?vn:Rre,rect:B}:null},[M,L]),U=A.useRef(null),[H,P]=A.useState(null),[z,q]=A.useState(null),Y=qh(b,Object.values(b)),D=Xm("DndDescribedBy",o),V=A.useMemo(()=>R.getEnabled(),[R]),W=Lre(p),{droppableRects:$,measureDroppableContainers:X,measuringScheduled:ee}=kre(V,{dragging:E,dependencies:[F.x,F.y],config:W.droppable}),re=bre(N,M),se=A.useMemo(()=>z?Pg(z):null,[z]),ge=gn(),ae=_re(re,W.draggable.measure);Ire({activeNode:M!=null?N.get(M):null,config:ge.layoutShiftCompensation,initialRect:ae,measure:W.draggable.measure});const le=zj(re,W.draggable.measure,ae),_e=zj(re?re.parentElement:null),ne=A.useRef({activatorEvent:null,active:null,activeNode:re,collisionRect:null,collisions:null,droppableRects:$,draggableNodes:N,draggingNode:null,draggingNodeRect:null,droppableContainers:R,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),$e=R.getNodeFor((t=ne.current.over)==null?void 0:t.id),be=Mre({measure:W.dragOverlay.measure}),Ce=(i=be.nodeRef.current)!=null?i:re,Pe=E?(r=be.rect)!=null?r:le:null,ve=!!(be.nodeRef.current&&be.rect),xe=Cre(ve?null:le),Re=XB(Ce?ur(Ce):null),ue=Are(E?$e??re:null),Ie=jre(ue),Ve=eF(v,{transform:{x:F.x-xe.x,y:F.y-xe.y,scaleX:1,scaleY:1},activatorEvent:z,active:G,activeNodeRect:le,containerNodeRect:_e,draggingNodeRect:Pe,over:ne.current.over,overlayNodeRect:be.rect,scrollableAncestors:ue,scrollableAncestorRects:Ie,windowRect:Re}),He=se?Bf(se,F):null,Ke=Ore(ue),Xe=Ij(Ke),ie=Ij(Ke,[le]),me=Bf(Ve,Xe),We=Pe?Zie(Pe,Ve):null,Ze=G&&We?d({active:G,collisionRect:We,droppableRects:$,droppableContainers:V,pointerCoordinates:He}):null,Se=zB(Ze,"id"),[nn,cn]=A.useState(null),An=ve?Ve:Bf(Ve,ie),mn=Kie(An,(a=nn==null?void 0:nn.rect)!=null?a:null,le),rn=A.useRef(null),Je=A.useCallback((vn,yn)=>{let{sensor:et,options:wt}=yn;if(U.current==null)return;const ze=N.get(U.current);if(!ze)return;const Fe=vn.nativeEvent,Pn=new et({active:U.current,activeNode:ze,event:Fe,options:wt,context:ne,onAbort(jn){if(!N.get(jn))return;const{onDragAbort:tn}=Y.current,an={id:jn};tn==null||tn(an),x({type:"onDragAbort",event:an})},onPending(jn,en,tn,an){if(!N.get(jn))return;const{onDragPending:Un}=Y.current,kt={id:jn,constraint:en,initialCoordinates:tn,offset:an};Un==null||Un(kt),x({type:"onDragPending",event:kt})},onStart(jn){const en=U.current;if(en==null)return;const tn=N.get(en);if(!tn)return;const{onDragStart:an}=Y.current,Ln={activatorEvent:Fe,active:{id:en,data:tn.data,rect:B}};Ks.unstable_batchedUpdates(()=>{an==null||an(Ln),O(Vs.Initializing),_({type:xi.DragStart,initialCoordinates:jn,active:en}),x({type:"onDragStart",event:Ln}),P(rn.current),q(Fe)})},onMove(jn){_({type:xi.DragMove,coordinates:jn})},onEnd:rt(xi.DragEnd),onCancel:rt(xi.DragCancel)});rn.current=Pn;function rt(jn){return async function(){const{active:tn,collisions:an,over:Ln,scrollAdjustedTranslate:Un}=ne.current;let kt=null;if(tn&&Un){const{cancelDrop:Sn}=Y.current;kt={activatorEvent:Fe,active:tn,collisions:an,delta:Un,over:Ln},jn===xi.DragEnd&&typeof Sn=="function"&&await Promise.resolve(Sn(kt))&&(jn=xi.DragCancel)}U.current=null,Ks.unstable_batchedUpdates(()=>{_({type:jn}),O(Vs.Uninitialized),cn(null),P(null),q(null),rn.current=null;const Sn=jn===xi.DragEnd?"onDragEnd":"onDragCancel";if(kt){const Cn=Y.current[Sn];Cn==null||Cn(kt),x({type:Sn,event:kt})}})}}},[N]),Dn=A.useCallback((vn,yn)=>(et,wt)=>{const ze=et.nativeEvent,Fe=N.get(wt);if(U.current!==null||!Fe||ze.dndKit||ze.defaultPrevented)return;const Pn={active:Fe};vn(et,yn.options,Pn)===!0&&(ze.dndKit={capturedBy:yn.sensor},U.current=wt,Je(et,yn))},[N,Je]),Me=wre(h,Dn);Ere(h),qa(()=>{le&&T===Vs.Initializing&&O(Vs.Initialized)},[le,T]),A.useEffect(()=>{const{onDragMove:vn}=Y.current,{active:yn,activatorEvent:et,collisions:wt,over:ze}=ne.current;if(!yn||!et)return;const Fe={active:yn,activatorEvent:et,collisions:wt,delta:{x:me.x,y:me.y},over:ze};Ks.unstable_batchedUpdates(()=>{vn==null||vn(Fe),x({type:"onDragMove",event:Fe})})},[me.x,me.y]),A.useEffect(()=>{const{active:vn,activatorEvent:yn,collisions:et,droppableContainers:wt,scrollAdjustedTranslate:ze}=ne.current;if(!vn||U.current==null||!yn||!ze)return;const{onDragOver:Fe}=Y.current,Pn=wt.get(Se),rt=Pn&&Pn.rect.current?{id:Pn.id,rect:Pn.rect.current,data:Pn.data,disabled:Pn.disabled}:null,jn={active:vn,activatorEvent:yn,collisions:et,delta:{x:ze.x,y:ze.y},over:rt};Ks.unstable_batchedUpdates(()=>{cn(rt),Fe==null||Fe(jn),x({type:"onDragOver",event:jn})})},[Se]),qa(()=>{ne.current={activatorEvent:z,active:G,activeNode:re,collisionRect:We,collisions:Ze,droppableRects:$,draggableNodes:N,draggingNode:Ce,draggingNodeRect:Pe,droppableContainers:R,over:nn,scrollableAncestors:ue,scrollAdjustedTranslate:me},B.current={initial:Pe,translated:We}},[G,re,Ze,We,N,Ce,Pe,$,R,nn,ue,me]),vre({...ge,delta:F,draggingRect:We,pointerCoordinates:He,scrollableAncestors:ue,scrollableAncestorRects:Ie});const Be=A.useMemo(()=>({active:G,activeNode:re,activeNodeRect:le,activatorEvent:z,collisions:Ze,containerNodeRect:_e,dragOverlay:be,draggableNodes:N,droppableContainers:R,droppableRects:$,over:nn,measureDroppableContainers:X,scrollableAncestors:ue,scrollableAncestorRects:Ie,measuringConfiguration:W,measuringScheduled:ee,windowRect:Re}),[G,re,le,z,Ze,_e,be,N,R,$,nn,X,ue,Ie,W,ee,Re]),On=A.useMemo(()=>({activatorEvent:z,activators:Me,active:G,activeNodeRect:le,ariaDescribedById:{draggable:D},dispatch:_,draggableNodes:N,over:nn,measureDroppableContainers:X}),[z,Me,G,le,_,D,N,nn,X]);return Q.createElement($B.Provider,{value:C},Q.createElement(Zm.Provider,{value:On},Q.createElement(JB.Provider,{value:Be},Q.createElement(Gy.Provider,{value:mn},c)),Q.createElement(zre,{disabled:(l==null?void 0:l.restoreFocus)===!1})),Q.createElement(Fie,{...l,hiddenTextDescribedById:D}));function gn(){const vn=(H==null?void 0:H.autoScrollEnabled)===!1,yn=typeof f=="object"?f.enabled===!1:f===!1,et=E&&!vn&&!yn;return typeof f=="object"?{...f,enabled:et}:{enabled:et}}}),Fre=A.createContext(null),Fj="button",qre="Draggable";function Hre(e){let{id:n,data:t,disabled:i=!1,attributes:r}=e;const a=Xm(qre),{activators:o,activatorEvent:l,active:f,activeNodeRect:c,ariaDescribedById:h,draggableNodes:d,over:p}=A.useContext(Zm),{role:v=Fj,roleDescription:b="draggable",tabIndex:w=0}=r??{},k=(f==null?void 0:f.id)===n,_=A.useContext(k?Gy:Fre),[x,C]=Dg(),[T,O]=Dg(),E=Tre(o,n),M=qh(t);qa(()=>(d.set(n,{id:n,key:a,node:x,activatorNode:T,data:M}),()=>{const F=d.get(n);F&&F.key===a&&d.delete(n)}),[d,n]);const N=A.useMemo(()=>({role:v,tabIndex:w,"aria-disabled":i,"aria-pressed":k&&v===Fj?!0:void 0,"aria-roledescription":b,"aria-describedby":h.draggable}),[i,v,w,k,b,h.draggable]);return{active:f,activatorEvent:l,activeNodeRect:c,attributes:N,isDragging:k,listeners:i?void 0:E,node:x,over:p,setNodeRef:C,setActivatorNodeRef:O,transform:_}}function nF(){return A.useContext(JB)}const Ure="Droppable",Vre={timeout:25};function Wre(e){let{data:n,disabled:t=!1,id:i,resizeObserverConfig:r}=e;const a=Xm(Ure),{active:o,dispatch:l,over:f,measureDroppableContainers:c}=A.useContext(Zm),h=A.useRef({disabled:t}),d=A.useRef(!1),p=A.useRef(null),v=A.useRef(null),{disabled:b,updateMeasurementsFor:w,timeout:k}={...Vre,...r},_=qh(w??i),x=A.useCallback(()=>{if(!d.current){d.current=!0;return}v.current!=null&&clearTimeout(v.current),v.current=setTimeout(()=>{c(Array.isArray(_.current)?_.current:[_.current]),v.current=null},k)},[k]),C=Wy({callback:x,disabled:b||!o}),T=A.useCallback((N,F)=>{C&&(F&&(C.unobserve(F),d.current=!1),N&&C.observe(N))},[C]),[O,E]=Dg(T),M=qh(n);return A.useEffect(()=>{!C||!O.current||(C.disconnect(),d.current=!1,C.observe(O.current))},[O,C]),A.useEffect(()=>(l({type:xi.RegisterDroppable,element:{id:i,key:a,disabled:t,node:O,rect:p,data:M}}),()=>l({type:xi.UnregisterDroppable,key:a,id:i})),[i]),A.useEffect(()=>{t!==h.current.disabled&&(l({type:xi.SetDroppableDisabled,id:i,key:a,disabled:t}),h.current.disabled=t)},[i,a,t,l]),{active:o,rect:p,isOver:(f==null?void 0:f.id)===i,node:O,over:f,setNodeRef:E}}function Gre(e){let{animation:n,children:t}=e;const[i,r]=A.useState(null),[a,o]=A.useState(null),l=Rg(t);return!t&&!i&&l&&r(l),qa(()=>{if(!a)return;const f=i==null?void 0:i.key,c=i==null?void 0:i.props.id;if(f==null||c==null){r(null);return}Promise.resolve(n(c,a)).then(()=>{r(null)})},[n,i,a]),Q.createElement(Q.Fragment,null,t,i?A.cloneElement(i,{ref:o}):null)}const Yre={x:0,y:0,scaleX:1,scaleY:1};function Kre(e){let{children:n}=e;return Q.createElement(Zm.Provider,{value:QB},Q.createElement(Gy.Provider,{value:Yre},n))}const Xre={position:"fixed",touchAction:"none"},Zre=e=>Uy(e)?"transform 250ms ease":void 0,Qre=A.forwardRef((e,n)=>{let{as:t,activatorEvent:i,adjustScale:r,children:a,className:o,rect:l,style:f,transform:c,transition:h=Zre}=e;if(!l)return null;const d=r?c:{...c,scaleX:1,scaleY:1},p={...Xre,width:l.width,height:l.height,top:l.top,left:l.left,transform:mo.Transform.toString(d),transformOrigin:r&&i?Hie(i,l):void 0,transition:typeof h=="function"?h(i):h,...f};return Q.createElement(t,{className:o,style:p,ref:n},a)}),Jre=e=>n=>{let{active:t,dragOverlay:i}=n;const r={},{styles:a,className:o}=e;if(a!=null&&a.active)for(const[l,f]of Object.entries(a.active))f!==void 0&&(r[l]=t.node.style.getPropertyValue(l),t.node.style.setProperty(l,f));if(a!=null&&a.dragOverlay)for(const[l,f]of Object.entries(a.dragOverlay))f!==void 0&&i.node.style.setProperty(l,f);return o!=null&&o.active&&t.node.classList.add(o.active),o!=null&&o.dragOverlay&&i.node.classList.add(o.dragOverlay),function(){for(const[f,c]of Object.entries(r))t.node.style.setProperty(f,c);o!=null&&o.active&&t.node.classList.remove(o.active)}},eae=e=>{let{transform:{initial:n,final:t}}=e;return[{transform:mo.Transform.toString(n)},{transform:mo.Transform.toString(t)}]},nae={duration:250,easing:"ease",keyframes:eae,sideEffects:Jre({styles:{active:{opacity:"0"}}})};function tae(e){let{config:n,draggableNodes:t,droppableContainers:i,measuringConfiguration:r}=e;return Hy((a,o)=>{if(n===null)return;const l=t.get(a);if(!l)return;const f=l.node.current;if(!f)return;const c=ZB(o);if(!c)return;const{transform:h}=ur(o).getComputedStyle(o),d=FB(h);if(!d)return;const p=typeof n=="function"?n:iae(n);return YB(f,r.draggable.measure),p({active:{id:a,data:l.data,node:f,rect:r.draggable.measure(f)},draggableNodes:t,dragOverlay:{node:o,rect:r.dragOverlay.measure(c)},droppableContainers:i,measuringConfiguration:r,transform:d})})}function iae(e){const{duration:n,easing:t,sideEffects:i,keyframes:r}={...nae,...e};return a=>{let{active:o,dragOverlay:l,transform:f,...c}=a;if(!n)return;const h={x:l.rect.left-o.rect.left,y:l.rect.top-o.rect.top},d={scaleX:f.scaleX!==1?o.rect.width*f.scaleX/l.rect.width:1,scaleY:f.scaleY!==1?o.rect.height*f.scaleY/l.rect.height:1},p={x:f.x-h.x,y:f.y-h.y,...d},v=r({...c,active:o,dragOverlay:l,transform:{initial:f,final:p}}),[b]=v,w=v[v.length-1];if(JSON.stringify(b)===JSON.stringify(w))return;const k=i==null?void 0:i({active:o,dragOverlay:l,...c}),_=l.node.animate(v,{duration:n,easing:t,fill:"forwards"});return new Promise(x=>{_.onfinish=()=>{k==null||k(),x()}})}}let qj=0;function rae(e){return A.useMemo(()=>{if(e!=null)return qj++,qj},[e])}const aae=Q.memo(e=>{let{adjustScale:n=!1,children:t,dropAnimation:i,style:r,transition:a,modifiers:o,wrapperElement:l="div",className:f,zIndex:c=999}=e;const{activatorEvent:h,active:d,activeNodeRect:p,containerNodeRect:v,draggableNodes:b,droppableContainers:w,dragOverlay:k,over:_,measuringConfiguration:x,scrollableAncestors:C,scrollableAncestorRects:T,windowRect:O}=nF(),E=A.useContext(Gy),M=rae(d==null?void 0:d.id),N=eF(o,{activatorEvent:h,active:d,activeNodeRect:p,containerNodeRect:v,draggingNodeRect:k.rect,over:_,overlayNodeRect:k.rect,scrollableAncestors:C,scrollableAncestorRects:T,transform:E,windowRect:O}),F=WC(p),R=tae({config:i,draggableNodes:b,droppableContainers:w,measuringConfiguration:x}),L=F?k.setRef:void 0;return Q.createElement(Kre,null,Q.createElement(Gre,{animation:R},d&&M?Q.createElement(Qre,{key:M,id:d.id,ref:L,as:l,activatorEvent:h,adjustScale:n,className:f,transition:a,rect:F,style:{zIndex:c,...r},transform:N},t):null))});function zg(e,n,t){const i=e.slice();return i.splice(t<0?i.length+t:t,0,i.splice(n,1)[0]),i}function oae(e,n){return e.reduce((t,i,r)=>{const a=n.get(i);return a&&(t[r]=a),t},Array(e.length))}function Nv(e){return e!==null&&e>=0}function sae(e,n){if(e===n)return!0;if(e.length!==n.length)return!1;for(let t=0;t{var n;let{rects:t,activeNodeRect:i,activeIndex:r,overIndex:a,index:o}=e;const l=(n=t[r])!=null?n:i;if(!l)return null;const f=fae(t,o,r);if(o===r){const c=t[a];return c?{x:rr&&o<=a?{x:-l.width-f,y:0,...$v}:o=a?{x:l.width+f,y:0,...$v}:{x:0,y:0,...$v}};function fae(e,n,t){const i=e[n],r=e[n-1],a=e[n+1];return!i||!r&&!a?0:t{let{rects:n,activeIndex:t,overIndex:i,index:r}=e;const a=zg(n,i,t),o=n[r],l=a[r];return!l||!o?null:{x:l.left-o.left,y:l.top-o.top,scaleX:l.width/o.width,scaleY:l.height/o.height}},zv={scaleX:1,scaleY:1},iF=e=>{var n;let{activeIndex:t,activeNodeRect:i,index:r,rects:a,overIndex:o}=e;const l=(n=a[t])!=null?n:i;if(!l)return null;if(r===t){const c=a[o];return c?{x:0,y:tt&&r<=o?{x:0,y:-l.height-f,...zv}:r=o?{x:0,y:l.height+f,...zv}:{x:0,y:0,...zv}};function cae(e,n,t){const i=e[n],r=e[n-1],a=e[n+1];return i?ti.map(E=>typeof E=="object"&&"id"in E?E.id:E),[i]),b=o!=null,w=o?v.indexOf(o.id):-1,k=c?v.indexOf(c.id):-1,_=A.useRef(v),x=!sae(v,_.current),C=k!==-1&&w===-1||x,T=lae(a);qa(()=>{x&&b&&h(v)},[x,v,b,h]),A.useEffect(()=>{_.current=v},[v]);const O=A.useMemo(()=>({activeIndex:w,containerId:d,disabled:T,disableTransforms:C,items:v,overIndex:k,useDragOverlay:p,sortedRects:oae(v,f),strategy:r}),[w,d,T.draggable,T.droppable,C,v,k,f,p,r]);return Q.createElement(aF.Provider,{value:O},n)}const dae=e=>{let{id:n,items:t,activeIndex:i,overIndex:r}=e;return zg(t,i,r).indexOf(n)},hae=e=>{let{containerId:n,isSorting:t,wasDragging:i,index:r,items:a,newIndex:o,previousItems:l,previousContainerId:f,transition:c}=e;return!c||!i||l!==a&&r===o?!1:t?!0:o!==r&&n===f},mae={duration:200,easing:"ease"},oF="transform",pae=mo.Transition.toString({property:oF,duration:0,easing:"linear"}),vae={roleDescription:"sortable"};function gae(e){let{disabled:n,index:t,node:i,rect:r}=e;const[a,o]=A.useState(null),l=A.useRef(t);return qa(()=>{if(!n&&t!==l.current&&i.current){const f=r.current;if(f){const c=Ic(i.current,{ignoreTransform:!0}),h={x:f.left-c.left,y:f.top-c.top,scaleX:f.width/c.width,scaleY:f.height/c.height};(h.x||h.y)&&o(h)}}t!==l.current&&(l.current=t)},[n,t,i,r]),A.useEffect(()=>{a&&o(null)},[a]),a}function sF(e){let{animateLayoutChanges:n=hae,attributes:t,disabled:i,data:r,getNewIndex:a=dae,id:o,strategy:l,resizeObserverConfig:f,transition:c=mae}=e;const{items:h,containerId:d,activeIndex:p,disabled:v,disableTransforms:b,sortedRects:w,overIndex:k,useDragOverlay:_,strategy:x}=A.useContext(aF),C=yae(i,v),T=h.indexOf(o),O=A.useMemo(()=>({sortable:{containerId:d,index:T,items:h},...r}),[d,r,T,h]),E=A.useMemo(()=>h.slice(h.indexOf(o)),[h,o]),{rect:M,node:N,isOver:F,setNodeRef:R}=Wre({id:o,data:O,disabled:C.droppable,resizeObserverConfig:{updateMeasurementsFor:E,...f}}),{active:L,activatorEvent:B,activeNodeRect:G,attributes:U,setNodeRef:H,listeners:P,isDragging:z,over:q,setActivatorNodeRef:Y,transform:D}=Hre({id:o,data:O,attributes:{...vae,...t},disabled:C.draggable}),V=Eie(R,H),W=!!L,$=W&&!b&&Nv(p)&&Nv(k),X=!_&&z,ee=X&&$?D:null,se=$?ee??(l??x)({rects:w,activeNodeRect:G,activeIndex:p,overIndex:k,index:T}):null,ge=Nv(p)&&Nv(k)?a({id:o,items:h,activeIndex:p,overIndex:k}):T,ae=L==null?void 0:L.id,le=A.useRef({activeId:ae,items:h,newIndex:ge,containerId:d}),_e=h!==le.current.items,ne=n({active:L,containerId:d,isDragging:z,isSorting:W,id:o,index:T,items:h,newIndex:le.current.newIndex,previousItems:le.current.items,previousContainerId:le.current.containerId,transition:c,wasDragging:le.current.activeId!=null}),$e=gae({disabled:!ne,index:T,node:N,rect:M});return A.useEffect(()=>{W&&le.current.newIndex!==ge&&(le.current.newIndex=ge),d!==le.current.containerId&&(le.current.containerId=d),h!==le.current.items&&(le.current.items=h)},[W,ge,d,h]),A.useEffect(()=>{if(ae===le.current.activeId)return;if(ae!=null&&le.current.activeId==null){le.current.activeId=ae;return}const Ce=setTimeout(()=>{le.current.activeId=ae},50);return()=>clearTimeout(Ce)},[ae]),{active:L,activeIndex:p,attributes:U,data:O,rect:M,index:T,newIndex:ge,items:h,isOver:F,isSorting:W,isDragging:z,listeners:P,node:N,overIndex:k,over:q,setNodeRef:V,setActivatorNodeRef:Y,setDroppableNodeRef:R,setDraggableNodeRef:H,transform:$e??se,transition:be()};function be(){if($e||_e&&le.current.newIndex===T)return pae;if(!(X&&!Uy(B)||!c)&&(W||ne))return mo.Transition.toString({...c,property:oF})}}function yae(e,n){var t,i;return typeof e=="boolean"?{draggable:e,droppable:!1}:{draggable:(t=e==null?void 0:e.draggable)!=null?t:n.draggable,droppable:(i=e==null?void 0:e.droppable)!=null?i:n.droppable}}function Lg(e){if(!e)return!1;const n=e.data.current;return!!(n&&"sortable"in n&&typeof n.sortable=="object"&&"containerId"in n.sortable&&"items"in n.sortable&&"index"in n.sortable)}const bae=[tt.Down,tt.Right,tt.Up,tt.Left],wae=(e,n)=>{let{context:{active:t,collisionRect:i,droppableRects:r,droppableContainers:a,over:o,scrollableAncestors:l}}=n;if(bae.includes(e.code)){if(e.preventDefault(),!t||!i)return;const f=[];a.getEnabled().forEach(d=>{if(!d||d!=null&&d.disabled)return;const p=r.get(d.id);if(p)switch(e.code){case tt.Down:i.topp.top&&f.push(d);break;case tt.Left:i.left>p.left&&f.push(d);break;case tt.Right:i.left1&&(h=c[1].id),h!=null){const d=a.get(t.id),p=a.get(h),v=p?r.get(p.id):null,b=p==null?void 0:p.node.current;if(b&&v&&d&&p){const k=Vy(b).some((E,M)=>l[M]!==E),_=lF(d,p),x=kae(d,p),C=k||!_?{x:0,y:0}:{x:x?i.width-v.width:0,y:x?i.height-v.height:0},T={x:v.left,y:v.top};return C.x&&C.y?T:Hh(T,C)}}}};function lF(e,n){return!Lg(e)||!Lg(n)?!1:e.data.current.sortable.containerId===n.data.current.sortable.containerId}function kae(e,n){return!Lg(e)||!Lg(n)||!lF(e,n)?!1:e.data.current.sortable.index=H?U:""+Array(H+1-z.length).join(P)+U},T={s:C,z:function(U){var H=-U.utcOffset(),P=Math.abs(H),z=Math.floor(P/60),q=P%60;return(H<=0?"+":"-")+C(z,2,"0")+":"+C(q,2,"0")},m:function U(H,P){if(H.date()1)return U(D[0])}else{var V=H.name;E[V]=H,q=V}return!z&&q&&(O=q),q||!z&&O},R=function(U,H){if(N(U))return U.clone();var P=typeof H=="object"?H:{};return P.date=U,P.args=arguments,new B(P)},L=T;L.l=F,L.i=N,L.w=function(U,H){return R(U,{locale:H.$L,utc:H.$u,x:H.$x,$offset:H.$offset})};var B=(function(){function U(P){this.$L=F(P.locale,null,!0),this.parse(P),this.$x=this.$x||P.x||{},this[M]=!0}var H=U.prototype;return H.parse=function(P){this.$d=(function(z){var q=z.date,Y=z.utc;if(q===null)return new Date(NaN);if(L.u(q))return new Date;if(q instanceof Date)return new Date(q);if(typeof q=="string"&&!/Z$/i.test(q)){var D=q.match(k);if(D){var V=D[2]-1||0,W=(D[7]||"0").substring(0,3);return Y?new Date(Date.UTC(D[1],V,D[3]||1,D[4]||0,D[5]||0,D[6]||0,W)):new Date(D[1],V,D[3]||1,D[4]||0,D[5]||0,D[6]||0,W)}}return new Date(q)})(P),this.init()},H.init=function(){var P=this.$d;this.$y=P.getFullYear(),this.$M=P.getMonth(),this.$D=P.getDate(),this.$W=P.getDay(),this.$H=P.getHours(),this.$m=P.getMinutes(),this.$s=P.getSeconds(),this.$ms=P.getMilliseconds()},H.$utils=function(){return L},H.isValid=function(){return this.$d.toString()!==w},H.isSame=function(P,z){var q=R(P);return this.startOf(z)<=q&&q<=this.endOf(z)},H.isAfter=function(P,z){return R(P)Le(o).locale(t).format(i);return e==="default"?n===null?"":a(n):e==="multiple"?n.map(a).join(", "):e==="range"&&Array.isArray(n)?n[0]&&n[1]?`${a(n[0])} ${r} ${a(n[1])}`:n[0]?`${a(n[0])} ${r} `:"":""}function Aae({formatter:e,...n}){return(e||Cae)(n)}function Oae({direction:e,levelIndex:n,rowIndex:t,cellIndex:i,size:r}){switch(e){case"up":return n===0&&t===0?null:t===0?{levelIndex:n-1,rowIndex:i<=r[n-1][r[n-1].length-1]-1?r[n-1].length-1:r[n-1].length-2,cellIndex:i}:{levelIndex:n,rowIndex:t-1,cellIndex:i};case"down":return t===r[n].length-1?{levelIndex:n+1,rowIndex:0,cellIndex:i}:t===r[n].length-2&&i>=r[n][r[n].length-1]?{levelIndex:n+1,rowIndex:0,cellIndex:i}:{levelIndex:n,rowIndex:t+1,cellIndex:i};case"left":return n===0&&t===0&&i===0?null:t===0&&i===0?{levelIndex:n-1,rowIndex:r[n-1].length-1,cellIndex:r[n-1][r[n-1].length-1]-1}:i===0?{levelIndex:n,rowIndex:t-1,cellIndex:r[n][t-1]-1}:{levelIndex:n,rowIndex:t,cellIndex:i-1};case"right":return t===r[n].length-1&&i===r[n][t]-1?{levelIndex:n+1,rowIndex:0,cellIndex:0}:i===r[n][t]-1?{levelIndex:n,rowIndex:t+1,cellIndex:0}:{levelIndex:n,rowIndex:t,cellIndex:i+1};default:return{levelIndex:n,rowIndex:t,cellIndex:i}}}function uF({controlsRef:e,direction:n,levelIndex:t,rowIndex:i,cellIndex:r,size:a}){var f,c,h;const o=Oae({direction:n,size:a,rowIndex:i,cellIndex:r,levelIndex:t});if(!o)return;const l=(h=(c=(f=e.current)==null?void 0:f[o.levelIndex])==null?void 0:c[o.rowIndex])==null?void 0:h[o.cellIndex];l&&(l.disabled||l.getAttribute("data-hidden")||l.getAttribute("data-outside")?uF({controlsRef:e,direction:n,levelIndex:o.levelIndex,cellIndex:o.cellIndex,rowIndex:o.rowIndex,size:a}):l.focus())}function Eae(e){switch(e){case"ArrowDown":return"down";case"ArrowUp":return"up";case"ArrowRight":return"right";case"ArrowLeft":return"left";default:return null}}function Tae(e){var n;return(n=e.current)==null?void 0:n.map(t=>t.map(i=>i.length))}function GC({controlsRef:e,levelIndex:n,rowIndex:t,cellIndex:i,event:r}){const a=Eae(r.key);a&&(r.preventDefault(),uF({controlsRef:e,direction:a,levelIndex:n,rowIndex:t,cellIndex:i,size:Tae(e)}))}function Xi(e){return e==null||e===""?e:Le(e).format("YYYY-MM-DD")}function fF(e){return e==null||e===""?e:Le(e).format("YYYY-MM-DD HH:mm:ss")}function OS({minDate:e,maxDate:n}){const t=Le();return!e&&!n?Xi(t):e&&Le(t).isBefore(e)?Xi(e):n&&Le(t).isAfter(n)?Xi(n):Xi(t)}const jae={locale:"en",firstDayOfWeek:1,weekendDays:[0,6],labelSeparator:"–",consistentWeeks:!1},Mae=A.createContext(jae);function dl(){const e=A.use(Mae),n=A.useCallback(a=>a||e.locale,[e.locale]),t=A.useCallback(a=>typeof a=="number"?a:e.firstDayOfWeek,[e.firstDayOfWeek]),i=A.useCallback(a=>Array.isArray(a)?a:e.weekendDays,[e.weekendDays]),r=A.useCallback(a=>typeof a=="string"?a:e.labelSeparator,[e.labelSeparator]);return{...e,getLocale:n,getFirstDayOfWeek:t,getWeekendDays:i,getLabelSeparator:r}}function Dae({value:e,type:n,withTime:t}){const i=t?fF:Xi;if(n==="range"&&Array.isArray(e)){const r=i(e[0]),a=i(e[1]);return r?a?`${r} – ${a}`:`${r} –`:""}return n==="multiple"&&Array.isArray(e)?e.filter(Boolean).join(", "):!Array.isArray(e)&&e?i(e):""}function cF({value:e,type:n,name:t,form:i,withTime:r=!1}){return y.jsx("input",{type:"hidden",value:Dae({value:e,type:n,withTime:r}),name:t,form:i})}cF.displayName="@mantine/dates/HiddenDatesInput";var dF={day:"m_396ce5cb"};const hF=(e,{size:n})=>({day:{"--day-size":Rn(n,"day-size")}}),Yy=De(e=>{const n=ke("Day",null,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,date:f,disabled:c,__staticSelector:h,weekend:d,outside:p,selected:v,renderDay:b,inRange:w,firstInRange:k,lastInRange:_,hidden:x,static:C,highlightToday:T,fullWidth:O,attributes:E,...M}=n;return y.jsx(pi,{...Qe({name:h||"Day",classes:dF,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:E,vars:l,varsResolver:hF,rootSelector:"day"})("day",{style:x?{display:"none"}:void 0}),component:C?"div":"button",disabled:c,"data-today":Le(f).isSame(new Date,"day")||void 0,"data-hidden":x||void 0,"data-highlight-today":T||void 0,"data-disabled":c||void 0,"data-weekend":!c&&!p&&d||void 0,"data-outside":!c&&p||void 0,"data-selected":!c&&v||void 0,"data-in-range":w&&!c||void 0,"data-first-in-range":k&&!c||void 0,"data-last-in-range":_&&!c||void 0,"data-static":C||void 0,"data-full-width":O||void 0,unstyled:o,...M,children:(b==null?void 0:b(f))||Le(f).date()})});Yy.classes=dF;Yy.varsResolver=hF;Yy.displayName="@mantine/dates/Day";function Rae({locale:e,format:n="dd",firstDayOfWeek:t=1}){const i=Le().day(t),r=[];for(let a=0;a<7;a+=1)typeof n=="string"?r.push(Le(i).add(a,"days").locale(e).format(n)):r.push(n(Le(i).add(a,"days").format("YYYY-MM-DD")));return r}var mF={weekday:"m_18a3eca"};const pF=(e,{size:n})=>({weekdaysRow:{"--wr-fz":ei(n),"--wr-spacing":Ut(n)}}),Ky=De(e=>{const n=ke("WeekdaysRow",null,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,locale:f,firstDayOfWeek:c,weekdayFormat:h,cellComponent:d="th",__staticSelector:p,withWeekNumbers:v,attributes:b,...w}=n,k=Qe({name:p||"WeekdaysRow",classes:mF,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:b,vars:l,varsResolver:pF,rootSelector:"weekdaysRow"}),_=dl(),x=Rae({locale:_.getLocale(f),format:h,firstDayOfWeek:_.getFirstDayOfWeek(c)}).map((C,T)=>y.jsx(d,{...k("weekday"),children:C},T));return y.jsxs(ye,{component:"tr",...k("weekdaysRow"),...w,children:[v&&y.jsx(d,{...k("weekday"),children:"#"}),x]})});Ky.classes=mF;Ky.varsResolver=pF;Ky.displayName="@mantine/dates/WeekdaysRow";function Pae(e,n=1){let t=Le(e);if(!t.isValid())return t;const i=n===0?6:n-1;for(;t.day()!==i;)t=t.add(1,"day");return t.format("YYYY-MM-DD")}function Nae(e,n=1){let t=Le(e);for(;t.day()!==n;)t=t.subtract(1,"day");return t.format("YYYY-MM-DD")}function $ae({month:e,firstDayOfWeek:n=1,consistentWeeks:t}){const i=Le(Le(e).subtract(Le(e).date()-1,"day").format("YYYY-M-D")),r=i.format("YYYY-MM-DD"),a=Pae(i.add(+i.daysInMonth()-1,"day").format("YYYY-MM-DD"),n),o=[];let l=Le(Nae(r,n));for(;Le(l).isBefore(a,"day");){const f=[];for(let c=0;c<7;c+=1)f.push(l.format("YYYY-MM-DD")),l=l.add(1,"day");o.push(f)}if(t&&o.length<6){const f=o[o.length-1],c=f[f.length-1];let h=Le(c).add(1,"day");for(;o.length<6;){const d=[];for(let p=0;p<7;p+=1)d.push(h.format("YYYY-MM-DD")),h=h.add(1,"day");o.push(d)}}return o}function YC(e,n){return Le(e).format("YYYY-MM")===Le(n).format("YYYY-MM")}function vF(e,n){return n?Le(e).isAfter(Le(n).subtract(1,"day"),"day"):!0}function gF(e,n){return n?Le(e).isBefore(Le(n).add(1,"day"),"day"):!0}function zae({dates:e,minDate:n,maxDate:t,getDayProps:i,excludeDate:r,hideOutsideDates:a,month:o}){const l=e.flat().filter(h=>{var d;return gF(h,t)&&vF(h,n)&&!(r!=null&&r(h))&&!((d=i==null?void 0:i(h))!=null&&d.disabled)&&(!a||YC(h,o))}),f=l.find(h=>{var d;return(d=i==null?void 0:i(h))==null?void 0:d.selected});if(f)return f;const c=l.find(h=>Le().isSame(h,"date"));return c||l[0]}var vg={exports:{}},Lae=vg.exports,Uj;function Iae(){return Uj||(Uj=1,(function(e,n){(function(t,i){e.exports=i()})(Lae,(function(){var t="day";return function(i,r,a){var o=function(c){return c.add(4-c.isoWeekday(),t)},l=r.prototype;l.isoWeekYear=function(){return o(this).year()},l.isoWeek=function(c){if(!this.$utils().u(c))return this.add(7*(c-this.isoWeek()),t);var h,d,p,v,b=o(this),w=(h=this.isoWeekYear(),d=this.$u,p=(d?a.utc:a)().year(h).startOf("year"),v=4-p.isoWeekday(),p.isoWeekday()>4&&(v+=7),p.add(v,t));return b.diff(w,"week")+1},l.isoWeekday=function(c){return this.$utils().u(c)?this.day()||7:this.day(this.day()%7?c:c-7)};var f=l.startOf;l.startOf=function(c,h){var d=this.$utils(),p=!!d.u(h)||h;return d.p(c)==="isoweek"?p?this.date(this.date()-(this.isoWeekday()-1)).startOf("day"):this.date(this.date()-1-(this.isoWeekday()-1)+7).endOf("day"):f.bind(this)(c,h)}}}))})(vg)),vg.exports}var Bae=Iae();const Fae=dt(Bae);Le.extend(Fae);function qae(e){return Le(e.find(n=>Le(n).day()===1)).isoWeek()}var yF={month:"m_cc9820d3",monthCell:"m_8f457cd5",weekNumber:"m_6cff9dea"};const Hae={withCellSpacing:!0},bF=(e,{size:n})=>({weekNumber:{"--wn-fz":ei(n),"--wn-size":Rn(n,"wn-size")}}),Qm=De(e=>{const n=ke("Month",Hae,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,__staticSelector:f,locale:c,firstDayOfWeek:h,weekdayFormat:d,month:p,weekendDays:v,getDayProps:b,excludeDate:w,minDate:k,maxDate:_,renderDay:x,hideOutsideDates:C,hideWeekdays:T,getDayAriaLabel:O,static:E,__getDayRef:M,__onDayKeyDown:N,__onDayClick:F,__onDayMouseEnter:R,__preventFocus:L,__stopPropagation:B,withCellSpacing:G,size:U,highlightToday:H,withWeekNumbers:P,fullWidth:z,attributes:q,...Y}=n,D=Qe({name:f||"Month",classes:yF,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:q,vars:l,varsResolver:bF,rootSelector:"month"}),V=dl(),W=$ae({month:p,firstDayOfWeek:V.getFirstDayOfWeek(h),consistentWeeks:V.consistentWeeks}),$=zae({dates:W,minDate:Xi(k),maxDate:Xi(_),getDayProps:b,excludeDate:w,hideOutsideDates:C,month:p}),{resolvedClassNames:X,resolvedStyles:ee}=qi({classNames:t,styles:a,props:n}),re=W.map((se,ge)=>{const ae=se.map((le,_e)=>{const ne=!YC(le,p),$e=(O==null?void 0:O(le))||Le(le).locale(c||V.locale).format("D MMMM YYYY"),be=b==null?void 0:b(le),Ce=Le(le).isSame($,"date");return y.jsx("td",{...D("monthCell"),"data-with-spacing":G||void 0,children:y.jsx(Yy,{__staticSelector:f||"Month",classNames:X,styles:ee,attributes:q,unstyled:o,"data-mantine-stop-propagation":B||void 0,highlightToday:H,renderDay:x,date:le,size:U,weekend:V.getWeekendDays(v).includes(Le(le).get("day")),outside:ne,hidden:C?ne:!1,"aria-label":$e,static:E,fullWidth:z,disabled:(w==null?void 0:w(le))||!gF(le,Xi(_))||!vF(le,Xi(k)),ref:Pe=>{Pe&&(M==null||M(ge,_e,Pe))},...be,onKeyDown:Pe=>{var ve;(ve=be==null?void 0:be.onKeyDown)==null||ve.call(be,Pe),N==null||N(Pe,{rowIndex:ge,cellIndex:_e,date:le})},onMouseEnter:Pe=>{var ve;(ve=be==null?void 0:be.onMouseEnter)==null||ve.call(be,Pe),R==null||R(Pe,le)},onClick:Pe=>{var ve;(ve=be==null?void 0:be.onClick)==null||ve.call(be,Pe),F==null||F(Pe,le)},onMouseDown:Pe=>{var ve;(ve=be==null?void 0:be.onMouseDown)==null||ve.call(be,Pe),L&&Pe.preventDefault()},tabIndex:L||!Ce?-1:0})},le.toString())});return y.jsxs("tr",{...D("monthRow"),children:[P&&y.jsx("td",{...D("weekNumber"),children:qae(se)}),ae]},ge)});return y.jsxs(ye,{component:"table",...D("month"),size:U,"data-full-width":z||void 0,...Y,children:[!T&&y.jsx("thead",{...D("monthThead"),children:y.jsx(Ky,{__staticSelector:f||"Month",locale:c,firstDayOfWeek:h,weekdayFormat:d,withWeekNumbers:P,size:U,classNames:X,styles:ee,unstyled:o,attributes:q})}),y.jsx("tbody",{...D("monthTbody"),children:re})]})});Qm.classes=yF;Qm.varsResolver=bF;Qm.displayName="@mantine/dates/Month";var wF={pickerControl:"m_dc6a3c71"};const kF=(e,{size:n})=>({pickerControl:{"--dpc-fz":ei(n),"--dpc-size":Rn(n,"dpc-size")}}),Jm=De(e=>{const n=ke("PickerControl",null,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,firstInRange:f,lastInRange:c,inRange:h,__staticSelector:d,selected:p,disabled:v,fullWidth:b,attributes:w,...k}=n;return y.jsx(pi,{...Qe({name:d||"PickerControl",classes:wF,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:w,vars:l,varsResolver:kF,rootSelector:"pickerControl"})("pickerControl"),unstyled:o,"data-picker-control":!0,"data-full-width":b||void 0,"data-selected":p&&!v||void 0,"data-disabled":v||void 0,"data-in-range":h&&!v&&!p||void 0,"data-first-in-range":f&&!v||void 0,"data-last-in-range":c&&!v||void 0,disabled:v,...k})});Jm.classes=wF;Jm.varsResolver=kF;Jm.displayName="@mantine/dates/PickerControl";function _F({year:e,minDate:n,maxDate:t}){return!n&&!t?!1:!!(n&&Le(e).isBefore(n,"year")||t&&Le(e).isAfter(t,"year"))}function Uae({years:e,minDate:n,maxDate:t,getYearControlProps:i}){const r=e.flat().filter(l=>{var f;return!_F({year:l,minDate:n,maxDate:t})&&!((f=i==null?void 0:i(l))!=null&&f.disabled)}),a=r.find(l=>{var f;return(f=i==null?void 0:i(l))==null?void 0:f.selected});if(a)return a;const o=r.find(l=>Le().isSame(l,"year"));return o||r[0]}function xF(e){const n=Le(e).year(),t=n-n%10;let i=0;const r=[[],[],[],[]];for(let a=0;a<4;a+=1){const o=a===3?1:3;for(let l=0;l{const n=ke("YearsList",Vae,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,decade:f,yearsListFormat:c,locale:h,minDate:d,maxDate:p,getYearControlProps:v,__staticSelector:b,__getControlRef:w,__onControlKeyDown:k,__onControlClick:_,__onControlMouseEnter:x,__preventFocus:C,__stopPropagation:T,withCellSpacing:O,fullWidth:E,size:M,attributes:N,...F}=n,R=Qe({name:b||"YearsList",classes:SF,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:N,vars:l,rootSelector:"yearsList"}),L=dl(),B=xF(f),G=Uae({years:B,minDate:d,maxDate:p,getYearControlProps:v}),U=B.map((H,P)=>{const z=H.map((q,Y)=>{const D=v==null?void 0:v(q),V=Le(q).isSame(G,"year");return y.jsx("td",{...R("yearsListCell"),"data-with-spacing":O||void 0,children:y.jsx(Jm,{...R("yearsListControl"),size:M,unstyled:o,fullWidth:E,"data-mantine-stop-propagation":T||void 0,disabled:_F({year:q,minDate:d,maxDate:p}),ref:W=>{W&&(w==null||w(P,Y,W))},...D,onKeyDown:W=>{var $;($=D==null?void 0:D.onKeyDown)==null||$.call(D,W),k==null||k(W,{rowIndex:P,cellIndex:Y,date:q})},onClick:W=>{var $;($=D==null?void 0:D.onClick)==null||$.call(D,W),_==null||_(W,q)},onMouseEnter:W=>{var $;($=D==null?void 0:D.onMouseEnter)==null||$.call(D,W),x==null||x(W,q)},onMouseDown:W=>{var $;($=D==null?void 0:D.onMouseDown)==null||$.call(D,W),C&&W.preventDefault()},tabIndex:C||!V?-1:0,children:(D==null?void 0:D.children)??Le(q).locale(L.getLocale(h)).format(c)})},Y)});return y.jsx("tr",{...R("yearsListRow"),children:z},P)});return y.jsx(ye,{component:"table",size:M,...R("yearsList"),"data-full-width":E||void 0,...F,children:y.jsx("tbody",{children:U})})});Xy.classes=SF;Xy.displayName="@mantine/dates/YearsList";function CF({month:e,minDate:n,maxDate:t}){return!n&&!t?!1:!!(n&&Le(e).isBefore(n,"month")||t&&Le(e).isAfter(t,"month"))}function Wae({months:e,minDate:n,maxDate:t,getMonthControlProps:i}){const r=e.flat().filter(l=>{var f;return!CF({month:l,minDate:n,maxDate:t})&&!((f=i==null?void 0:i(l))!=null&&f.disabled)}),a=r.find(l=>{var f;return(f=i==null?void 0:i(l))==null?void 0:f.selected});if(a)return a;const o=r.find(l=>Le().isSame(l,"month"));return o||r[0]}function Gae(e){const n=Le(e).startOf("year").toDate(),t=[[],[],[],[]];let i=0;for(let r=0;r<4;r+=1)for(let a=0;a<3;a+=1)t[r].push(Le(n).add(i,"months").format("YYYY-MM-DD")),i+=1;return t}var AF={monthsList:"m_2a6c32d",monthsListCell:"m_fe27622f"};const Yae={monthsListFormat:"MMM",withCellSpacing:!0},Zy=De(e=>{const n=ke("MonthsList",Yae,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,__staticSelector:f,year:c,monthsListFormat:h,locale:d,minDate:p,maxDate:v,getMonthControlProps:b,__getControlRef:w,__onControlKeyDown:k,__onControlClick:_,__onControlMouseEnter:x,__preventFocus:C,__stopPropagation:T,withCellSpacing:O,fullWidth:E,size:M,attributes:N,...F}=n,R=Qe({name:f||"MonthsList",classes:AF,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:N,vars:l,rootSelector:"monthsList"}),L=dl(),B=Gae(c),G=Wae({months:B,minDate:Xi(p),maxDate:Xi(v),getMonthControlProps:b}),U=B.map((H,P)=>{const z=H.map((q,Y)=>{const D=b==null?void 0:b(q),V=Le(q).isSame(G,"month");return y.jsx("td",{...R("monthsListCell"),"data-with-spacing":O||void 0,children:y.jsx(Jm,{...R("monthsListControl"),size:M,unstyled:o,fullWidth:E,__staticSelector:f||"MonthsList","data-mantine-stop-propagation":T||void 0,disabled:CF({month:q,minDate:Xi(p),maxDate:Xi(v)}),ref:W=>{W&&(w==null||w(P,Y,W))},...D,onKeyDown:W=>{var $;($=D==null?void 0:D.onKeyDown)==null||$.call(D,W),k==null||k(W,{rowIndex:P,cellIndex:Y,date:q})},onClick:W=>{var $;($=D==null?void 0:D.onClick)==null||$.call(D,W),_==null||_(W,q)},onMouseEnter:W=>{var $;($=D==null?void 0:D.onMouseEnter)==null||$.call(D,W),x==null||x(W,q)},onMouseDown:W=>{var $;($=D==null?void 0:D.onMouseDown)==null||$.call(D,W),C&&W.preventDefault()},tabIndex:C||!V?-1:0,children:(D==null?void 0:D.children)??Le(q).locale(L.getLocale(d)).format(h)})},Y)});return y.jsx("tr",{...R("monthsListRow"),children:z},P)});return y.jsx(ye,{component:"table",size:M,...R("monthsList"),"data-full-width":E||void 0,...F,children:y.jsx("tbody",{children:U})})});Zy.classes=AF;Zy.displayName="@mantine/dates/MonthsList";var OF={calendarHeader:"m_730a79ed",calendarHeaderLevel:"m_f6645d97",calendarHeaderControl:"m_2351eeb0",calendarHeaderControlIcon:"m_367dc749"};const Kae={hasNextLevel:!0,withNext:!0,withPrevious:!0,headerControlsOrder:["previous","level","next"]},EF=(e,{size:n})=>({calendarHeader:{"--dch-control-size":Rn(n,"dch-control-size"),"--dch-fz":ei(n)}}),ds=De(e=>{const n=ke("CalendarHeader",Kae,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,nextIcon:f,previousIcon:c,nextLabel:h,previousLabel:d,onNext:p,onPrevious:v,onLevelClick:b,label:w,nextDisabled:k,previousDisabled:_,hasNextLevel:x,levelControlAriaLabel:C,withNext:T,withPrevious:O,headerControlsOrder:E,fullWidth:M,__staticSelector:N,__preventFocus:F,__stopPropagation:R,attributes:L,...B}=n,G=Qe({name:N||"CalendarHeader",classes:OF,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:L,vars:l,varsResolver:EF,rootSelector:"calendarHeader"}),U=F?Y=>Y.preventDefault():void 0,H=O&&A.createElement(pi,{...G("calendarHeaderControl"),key:"previous","data-direction":"previous","aria-label":d,onClick:v,unstyled:o,onMouseDown:U,disabled:_,"data-disabled":_||void 0,tabIndex:F||_?-1:0,"data-mantine-stop-propagation":R||void 0},c||y.jsx(jg,{...G("calendarHeaderControlIcon"),"data-direction":"previous",size:"45%"})),P=A.createElement(pi,{component:x?"button":"div",...G("calendarHeaderLevel"),key:"level",onClick:x?b:void 0,unstyled:o,onMouseDown:x?U:void 0,disabled:!x,"data-static":!x||void 0,"aria-label":C,tabIndex:F||!x?-1:0,"data-mantine-stop-propagation":R||void 0},w),z=T&&A.createElement(pi,{...G("calendarHeaderControl"),key:"next","data-direction":"next","aria-label":h,onClick:p,unstyled:o,onMouseDown:U,disabled:k,"data-disabled":k||void 0,tabIndex:F||k?-1:0,"data-mantine-stop-propagation":R||void 0},f||y.jsx(jg,{...G("calendarHeaderControlIcon"),"data-direction":"next",size:"45%"})),q=E.map(Y=>Y==="previous"?H:Y==="level"?P:Y==="next"?z:null);return y.jsx(ye,{...G("calendarHeader"),"data-full-width":M||void 0,...B,children:q})});ds.classes=OF;ds.varsResolver=EF;ds.displayName="@mantine/dates/CalendarHeader";function Xae(e){const n=xF(e);return[n[0][0],n[3][0]]}const Zae={decadeLabelFormat:"YYYY"},Qy=De(e=>{const{decade:n,locale:t,minDate:i,maxDate:r,yearsListFormat:a,getYearControlProps:o,__getControlRef:l,__onControlKeyDown:f,__onControlClick:c,__onControlMouseEnter:h,withCellSpacing:d,__preventFocus:p,nextIcon:v,previousIcon:b,nextLabel:w,previousLabel:k,onNext:_,onPrevious:x,nextDisabled:C,previousDisabled:T,levelControlAriaLabel:O,withNext:E,withPrevious:M,headerControlsOrder:N,decadeLabelFormat:F,classNames:R,styles:L,unstyled:B,__staticSelector:G,__stopPropagation:U,size:H,fullWidth:P,attributes:z,...q}=ke("DecadeLevel",Zae,e),Y=dl(),[D,V]=Xae(n),W={__staticSelector:G||"DecadeLevel",classNames:R,styles:L,unstyled:B,size:H,attributes:z},$=typeof C=="boolean"?C:r?!Le(V).endOf("year").isBefore(r):!1,X=typeof T=="boolean"?T:i?!Le(D).startOf("year").isAfter(i):!1,ee=(re,se)=>Le(re).locale(t||Y.locale).format(se);return y.jsxs(ye,{"data-decade-level":!0,size:H,...q,children:[y.jsx(ds,{label:typeof F=="function"?F(D,V):`${ee(D,F)} – ${ee(V,F)}`,__preventFocus:p,__stopPropagation:U,nextIcon:v,previousIcon:b,nextLabel:w,previousLabel:k,onNext:_,onPrevious:x,nextDisabled:$,previousDisabled:X,hasNextLevel:!1,levelControlAriaLabel:O,withNext:E,withPrevious:M,headerControlsOrder:N,fullWidth:P,...W}),y.jsx(Xy,{decade:n,locale:t,minDate:i,maxDate:r,yearsListFormat:a,getYearControlProps:o,__getControlRef:l,__onControlKeyDown:f,__onControlClick:c,__onControlMouseEnter:h,__preventFocus:p,__stopPropagation:U,withCellSpacing:d,fullWidth:P,...W})]})});Qy.classes={...Xy.classes,...ds.classes};Qy.displayName="@mantine/dates/DecadeLevel";const Qae={yearLabelFormat:"YYYY"},Jy=De(e=>{const{year:n,locale:t,minDate:i,maxDate:r,monthsListFormat:a,getMonthControlProps:o,__getControlRef:l,__onControlKeyDown:f,__onControlClick:c,__onControlMouseEnter:h,withCellSpacing:d,__preventFocus:p,nextIcon:v,previousIcon:b,nextLabel:w,previousLabel:k,onNext:_,onPrevious:x,onLevelClick:C,nextDisabled:T,previousDisabled:O,hasNextLevel:E,levelControlAriaLabel:M,withNext:N,withPrevious:F,headerControlsOrder:R,yearLabelFormat:L,__staticSelector:B,__stopPropagation:G,size:U,classNames:H,styles:P,unstyled:z,fullWidth:q,attributes:Y,...D}=ke("YearLevel",Qae,e),V=dl(),W={__staticSelector:B||"YearLevel",classNames:H,styles:P,unstyled:z,size:U,attributes:Y},$=typeof T=="boolean"?T:r?!Le(n).endOf("year").isBefore(r):!1,X=typeof O=="boolean"?O:i?!Le(n).startOf("year").isAfter(i):!1;return y.jsxs(ye,{"data-year-level":!0,size:U,...D,children:[y.jsx(ds,{label:typeof L=="function"?L(n):Le(n).locale(t||V.locale).format(L),__preventFocus:p,__stopPropagation:G,nextIcon:v,previousIcon:b,nextLabel:w,previousLabel:k,onNext:_,onPrevious:x,onLevelClick:C,nextDisabled:$,previousDisabled:X,hasNextLevel:E,levelControlAriaLabel:M,withNext:N,withPrevious:F,headerControlsOrder:R,fullWidth:q,...W}),y.jsx(Zy,{year:n,locale:t,minDate:i,maxDate:r,monthsListFormat:a,getMonthControlProps:o,__getControlRef:l,__onControlKeyDown:f,__onControlClick:c,__onControlMouseEnter:h,__preventFocus:p,__stopPropagation:G,withCellSpacing:d,fullWidth:q,...W})]})});Jy.classes={...ds.classes,...Zy.classes};Jy.displayName="@mantine/dates/YearLevel";const Jae={monthLabelFormat:"MMMM YYYY"},e0=De(e=>{const{month:n,locale:t,firstDayOfWeek:i,weekdayFormat:r,weekendDays:a,getDayProps:o,excludeDate:l,minDate:f,maxDate:c,renderDay:h,hideOutsideDates:d,hideWeekdays:p,getDayAriaLabel:v,__getDayRef:b,__onDayKeyDown:w,__onDayClick:k,__onDayMouseEnter:_,withCellSpacing:x,highlightToday:C,withWeekNumbers:T,__preventFocus:O,__stopPropagation:E,nextIcon:M,previousIcon:N,nextLabel:F,previousLabel:R,onNext:L,onPrevious:B,onLevelClick:G,nextDisabled:U,previousDisabled:H,hasNextLevel:P,levelControlAriaLabel:z,withNext:q,withPrevious:Y,headerControlsOrder:D,monthLabelFormat:V,classNames:W,styles:$,unstyled:X,__staticSelector:ee,size:re,static:se,fullWidth:ge,attributes:ae,...le}=ke("MonthLevel",Jae,e),_e=dl(),ne={__staticSelector:ee||"MonthLevel",classNames:W,styles:$,unstyled:X,size:re,attributes:ae},$e=typeof U=="boolean"?U:c?!Le(n).endOf("month").isBefore(c):!1,be=typeof H=="boolean"?H:f?!Le(n).startOf("month").isAfter(f):!1;return y.jsxs(ye,{"data-month-level":!0,size:re,...le,children:[y.jsx(ds,{label:typeof V=="function"?V(n):Le(n).locale(t||_e.locale).format(V),__preventFocus:O,__stopPropagation:E,nextIcon:M,previousIcon:N,nextLabel:F,previousLabel:R,onNext:L,onPrevious:B,onLevelClick:G,nextDisabled:$e,previousDisabled:be,hasNextLevel:P,levelControlAriaLabel:z,withNext:q,withPrevious:Y,headerControlsOrder:D,fullWidth:ge,...ne}),y.jsx(Qm,{month:n,locale:t,firstDayOfWeek:i,weekdayFormat:r,weekendDays:a,getDayProps:o,excludeDate:l,minDate:f,maxDate:c,renderDay:h,hideOutsideDates:d,hideWeekdays:p,getDayAriaLabel:v,__getDayRef:b,__onDayKeyDown:w,__onDayClick:k,__onDayMouseEnter:_,__preventFocus:O,__stopPropagation:E,static:se,withCellSpacing:x,highlightToday:C,withWeekNumbers:T,fullWidth:ge,...ne})]})});e0.classes={...Qm.classes,...ds.classes};e0.displayName="@mantine/dates/MonthLevel";var TF={levelsGroup:"m_30b26e33"};const hl=De(e=>{const n=ke("LevelsGroup",null,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,__staticSelector:f,fullWidth:c,attributes:h,...d}=n;return y.jsx(ye,{...Qe({name:f||"LevelsGroup",classes:TF,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:h,vars:l,rootSelector:"levelsGroup"})("levelsGroup"),"data-full-width":c||void 0,...d})});hl.classes=TF;hl.displayName="@mantine/dates/LevelsGroup";const eoe={numberOfColumns:1},n0=De(e=>{const{decade:n,locale:t,minDate:i,maxDate:r,yearsListFormat:a,getYearControlProps:o,__onControlClick:l,__onControlMouseEnter:f,withCellSpacing:c,__preventFocus:h,nextIcon:d,previousIcon:p,nextLabel:v,previousLabel:b,onNext:w,onPrevious:k,nextDisabled:_,previousDisabled:x,headerControlsOrder:C,classNames:T,styles:O,unstyled:E,__staticSelector:M,__stopPropagation:N,numberOfColumns:F,levelControlAriaLabel:R,decadeLabelFormat:L,size:B,fullWidth:G,vars:U,attributes:H,...P}=ke("DecadeLevelGroup",eoe,e),z=A.useRef([]),q=Array(F).fill(0).map((Y,D)=>{const V=Le(n).add(D*10,"years").format("YYYY-MM-DD");return y.jsx(Qy,{size:B,yearsListFormat:a,decade:V,withNext:D===F-1,withPrevious:D===0,decadeLabelFormat:L,__onControlClick:l,__onControlMouseEnter:f,__onControlKeyDown:(W,$)=>GC({levelIndex:D,rowIndex:$.rowIndex,cellIndex:$.cellIndex,event:W,controlsRef:z}),__getControlRef:(W,$,X)=>{Array.isArray(z.current[D])||(z.current[D]=[]),Array.isArray(z.current[D][W])||(z.current[D][W]=[]),z.current[D][W][$]=X},levelControlAriaLabel:typeof R=="function"?R(V):R,locale:t,minDate:i,maxDate:r,__preventFocus:h,__stopPropagation:N,nextIcon:d,previousIcon:p,nextLabel:v,previousLabel:b,onNext:w,onPrevious:k,nextDisabled:_,previousDisabled:x,getYearControlProps:o,__staticSelector:M||"DecadeLevelGroup",classNames:T,styles:O,unstyled:E,withCellSpacing:c,headerControlsOrder:C,fullWidth:G,attributes:H},D)});return y.jsx(hl,{classNames:T,styles:O,__staticSelector:M||"DecadeLevelGroup",size:B,unstyled:E,fullWidth:G,attributes:H,...P,children:q})});n0.classes={...hl.classes,...Qy.classes};n0.displayName="@mantine/dates/DecadeLevelGroup";const noe={numberOfColumns:1},t0=De(e=>{const{year:n,locale:t,minDate:i,maxDate:r,monthsListFormat:a,getMonthControlProps:o,__onControlClick:l,__onControlMouseEnter:f,withCellSpacing:c,__preventFocus:h,nextIcon:d,previousIcon:p,nextLabel:v,previousLabel:b,onNext:w,onPrevious:k,onLevelClick:_,nextDisabled:x,previousDisabled:C,hasNextLevel:T,headerControlsOrder:O,classNames:E,styles:M,unstyled:N,__staticSelector:F,__stopPropagation:R,numberOfColumns:L,levelControlAriaLabel:B,yearLabelFormat:G,size:U,fullWidth:H,vars:P,attributes:z,...q}=ke("YearLevelGroup",noe,e),Y=A.useRef([]),D=Array(L).fill(0).map((V,W)=>{const $=Le(n).add(W,"years").format("YYYY-MM-DD");return y.jsx(Jy,{size:U,monthsListFormat:a,year:$,withNext:W===L-1,withPrevious:W===0,yearLabelFormat:G,__stopPropagation:R,__onControlClick:l,__onControlMouseEnter:f,__onControlKeyDown:(X,ee)=>GC({levelIndex:W,rowIndex:ee.rowIndex,cellIndex:ee.cellIndex,event:X,controlsRef:Y}),__getControlRef:(X,ee,re)=>{Array.isArray(Y.current[W])||(Y.current[W]=[]),Array.isArray(Y.current[W][X])||(Y.current[W][X]=[]),Y.current[W][X][ee]=re},levelControlAriaLabel:typeof B=="function"?B($):B,locale:t,minDate:i,maxDate:r,__preventFocus:h,nextIcon:d,previousIcon:p,nextLabel:v,previousLabel:b,onNext:w,onPrevious:k,onLevelClick:_,nextDisabled:x,previousDisabled:C,hasNextLevel:T,getMonthControlProps:o,classNames:E,styles:M,unstyled:N,__staticSelector:F||"YearLevelGroup",withCellSpacing:c,headerControlsOrder:O,fullWidth:H,attributes:z},W)});return y.jsx(hl,{classNames:E,styles:M,__staticSelector:F||"YearLevelGroup",size:U,unstyled:N,fullWidth:H,attributes:z,...q,children:D})});t0.classes={...Jy.classes,...hl.classes};t0.displayName="@mantine/dates/YearLevelGroup";const toe={numberOfColumns:1},i0=De(e=>{const{month:n,locale:t,firstDayOfWeek:i,weekdayFormat:r,weekendDays:a,getDayProps:o,excludeDate:l,minDate:f,maxDate:c,renderDay:h,hideOutsideDates:d,hideWeekdays:p,getDayAriaLabel:v,__onDayClick:b,__onDayMouseEnter:w,withCellSpacing:k,highlightToday:_,withWeekNumbers:x,__preventFocus:C,nextIcon:T,previousIcon:O,nextLabel:E,previousLabel:M,onNext:N,onPrevious:F,onLevelClick:R,nextDisabled:L,previousDisabled:B,hasNextLevel:G,headerControlsOrder:U,classNames:H,styles:P,unstyled:z,numberOfColumns:q,levelControlAriaLabel:Y,monthLabelFormat:D,__staticSelector:V,__stopPropagation:W,size:$,static:X,fullWidth:ee,vars:re,attributes:se,...ge}=ke("MonthLevelGroup",toe,e),ae=A.useRef([]),le=Array(q).fill(0).map((_e,ne)=>{const $e=Le(n).add(ne,"months").format("YYYY-MM-DD");return y.jsx(e0,{month:$e,withNext:ne===q-1,withPrevious:ne===0,monthLabelFormat:D,__stopPropagation:W,__onDayClick:b,__onDayMouseEnter:w,__onDayKeyDown:(be,Ce)=>GC({levelIndex:ne,rowIndex:Ce.rowIndex,cellIndex:Ce.cellIndex,event:be,controlsRef:ae}),__getDayRef:(be,Ce,Pe)=>{Array.isArray(ae.current[ne])||(ae.current[ne]=[]),Array.isArray(ae.current[ne][be])||(ae.current[ne][be]=[]),ae.current[ne][be][Ce]=Pe},levelControlAriaLabel:typeof Y=="function"?Y($e):Y,locale:t,firstDayOfWeek:i,weekdayFormat:r,weekendDays:a,getDayProps:o,excludeDate:l,minDate:f,maxDate:c,renderDay:h,hideOutsideDates:d,hideWeekdays:p,getDayAriaLabel:v,__preventFocus:C,nextIcon:T,previousIcon:O,nextLabel:E,previousLabel:M,onNext:N,onPrevious:F,onLevelClick:R,nextDisabled:L,previousDisabled:B,hasNextLevel:G,classNames:H,styles:P,unstyled:z,__staticSelector:V||"MonthLevelGroup",size:$,static:X,withCellSpacing:k,highlightToday:_,withWeekNumbers:x,headerControlsOrder:U,fullWidth:ee,attributes:se},ne)});return y.jsx(hl,{classNames:H,styles:P,__staticSelector:V||"MonthLevelGroup",size:$,fullWidth:ee,attributes:se,...ge,children:le})});i0.classes={...hl.classes,...e0.classes};i0.displayName="@mantine/dates/MonthLevelGroup";var jF={input:"m_6fa5e2aa"};const Bc=De(e=>{const{inputProps:n,wrapperProps:t,placeholder:i,classNames:r,styles:a,unstyled:o,popoverProps:l,modalProps:f,dropdownType:c,children:h,formattedValue:d,dropdownHandlers:p,dropdownOpened:v,onClick:b,clearable:w,clearSectionMode:k,onClear:_,clearButtonProps:x,rightSection:C,shouldClear:T,readOnly:O,disabled:E,value:M,name:N,form:F,type:R,onDropdownClose:L,withTime:B,...G}=HL("PickerInputBase",{size:"sm"},e),U=y.jsx(It.ClearButton,{onClick:_,unstyled:o,...x}),H=()=>{R==="range"&&Array.isArray(M)&&M[0]&&!M[1]&&_(),p.close()};return y.jsxs(y.Fragment,{children:[c==="modal"&&!O&&y.jsx(Ur,{opened:v,onClose:H,withCloseButton:!1,size:"auto","data-dates-modal":!0,unstyled:o,...f,children:h}),y.jsx(It.Wrapper,{...t,children:y.jsxs(En,{position:"bottom-start",opened:v,trapFocus:!0,returnFocus:!1,unstyled:o,onClose:L,...l,disabled:(l==null?void 0:l.disabled)||c==="modal"||O,onChange:P=>{var z;P||((z=l==null?void 0:l.onClose)==null||z.call(l),H())},children:[y.jsx(En.Target,{children:y.jsx(It,{"data-dates-input":!0,"data-read-only":O||void 0,disabled:E,component:"button",type:"button",multiline:!0,onClick:P=>{b==null||b(P),p.toggle()},__clearSection:U,__clearable:w&&T&&!O&&!E,__clearSectionMode:k,rightSection:C,...n,classNames:{...r,input:dn(jF.input,r==null?void 0:r.input)},...G,children:d||y.jsx(It.Placeholder,{error:n.error,unstyled:o,classNames:r,styles:a,__staticSelector:n.__staticSelector,children:i})})}),y.jsx(En.Dropdown,{"data-dates-dropdown":!0,children:h})]})}),y.jsx(cF,{value:M,name:N,form:F,type:R,withTime:B})]})});Bc.classes=jF;Bc.displayName="@mantine/dates/PickerInputBase";const Vj=e=>e==="range"?[null,null]:e==="multiple"?[]:null,Wj=(e,n)=>{const t=n?fF:Xi;return Array.isArray(e)?e.map(t):t(e)};function KC({type:e,value:n,defaultValue:t,onChange:i,withTime:r=!1}){const a=A.useRef(e),[o,l,f]=Mi({value:Wj(n,r),defaultValue:Wj(t,r),finalValue:Vj(e),onChange:i});let c=o;return a.current!==e&&(a.current=e,n===void 0&&(c=t!==void 0?t:Vj(e),l(c))),[c,l,f]}function Mk(e,n){return e?e==="month"?0:e==="year"?1:2:n||0}function ioe(e){return e===0?"month":e===1?"year":"decade"}function Wd(e,n,t){return ioe(Go(Mk(e,0),Mk(n,0),Mk(t,2)))}const roe={maxLevel:"decade",minLevel:"month",__updateDateOnYearSelect:!0,__updateDateOnMonthSelect:!0,enableKeyboardNavigation:!0},Fc=De(e=>{const n=ke("Calendar",roe,e),{vars:t,maxLevel:i,minLevel:r,defaultLevel:a,level:o,onLevelChange:l,date:f,defaultDate:c,onDateChange:h,numberOfColumns:d,columnsToScroll:p,ariaLabels:v,nextLabel:b,previousLabel:w,onYearSelect:k,onMonthSelect:_,onYearMouseEnter:x,onMonthMouseEnter:C,headerControlsOrder:T,__updateDateOnYearSelect:O,__updateDateOnMonthSelect:E,__setDateRef:M,__setLevelRef:N,firstDayOfWeek:F,weekdayFormat:R,weekendDays:L,getDayProps:B,excludeDate:G,renderDay:U,hideOutsideDates:H,hideWeekdays:P,getDayAriaLabel:z,monthLabelFormat:q,nextIcon:Y,previousIcon:D,__onDayClick:V,__onDayMouseEnter:W,withCellSpacing:$,highlightToday:X,withWeekNumbers:ee,monthsListFormat:re,getMonthControlProps:se,yearLabelFormat:ge,yearsListFormat:ae,getYearControlProps:le,decadeLabelFormat:_e,classNames:ne,styles:$e,unstyled:be,minDate:Ce,maxDate:Pe,locale:ve,__staticSelector:xe,size:Re,__preventFocus:ue,__stopPropagation:Ie,onNextDecade:Ve,onPreviousDecade:He,onNextYear:Ke,onPreviousYear:Xe,onNextMonth:ie,onPreviousMonth:me,static:We,enableKeyboardNavigation:Ze,fullWidth:Se,attributes:nn,ref:cn,...An}=n,{resolvedClassNames:mn,resolvedStyles:rn}=qi({classNames:ne,styles:$e,props:n}),[Je,Dn]=Mi({value:o?Wd(o,r,i):void 0,defaultValue:a?Wd(a,r,i):void 0,finalValue:Wd(void 0,r,i),onChange:l}),[Me,Be]=KC({type:"default",value:Xi(f),defaultValue:Xi(c),onChange:h});A.useImperativeHandle(M,()=>en=>{Be(en)}),A.useImperativeHandle(N,()=>en=>{Dn(en)});const On={__staticSelector:xe||"Calendar",styles:rn,classNames:mn,unstyled:be,size:Re,attributes:nn},gn=p||d||1,vn=A.useRef(null);if(vn.current===null){const en=new Date;vn.current=Ce&&Le(en).isAfter(Ce)?Ce:Le(en).format("YYYY-MM-DD")}const yn=Me||vn.current,et=()=>{const en=Le(yn).add(gn,"month").format("YYYY-MM-DD");ie==null||ie(en),Be(en)},wt=()=>{const en=Le(yn).subtract(gn,"month").format("YYYY-MM-DD");me==null||me(en),Be(en)},ze=()=>{const en=Le(yn).add(gn,"year").format("YYYY-MM-DD");Ke==null||Ke(en),Be(en)},Fe=()=>{const en=Le(yn).subtract(gn,"year").format("YYYY-MM-DD");Xe==null||Xe(en),Be(en)},Pn=()=>{const en=Le(yn).add(10*gn,"year").format("YYYY-MM-DD");Ve==null||Ve(en),Be(en)},rt=()=>{const en=Le(yn).subtract(10*gn,"year").format("YYYY-MM-DD");He==null||He(en),Be(en)},jn=A.useRef(null);return A.useEffect(()=>{if(!Ze||We)return;const en=tn=>{var Un;if(!((Un=jn.current)!=null&&Un.contains(document.activeElement)))return;const an=tn.ctrlKey||tn.metaKey,Ln=tn.shiftKey;switch(tn.key){case"ArrowUp":an&&Ln?(tn.preventDefault(),rt()):an&&(tn.preventDefault(),Fe());break;case"ArrowDown":an&&Ln?(tn.preventDefault(),Pn()):an&&(tn.preventDefault(),ze());break;case"y":case"Y":Je==="month"&&(tn.preventDefault(),Dn("year"));break}};return document.addEventListener("keydown",en),()=>{document.removeEventListener("keydown",en)}},[Ze,We,Je,ze,Fe,Pn,rt]),y.jsxs(ye,{ref:Bt(jn,cn),size:Re,"data-calendar":!0,"data-full-width":Se||void 0,...An,children:[Je==="month"&&y.jsx(i0,{month:yn,minDate:Ce,maxDate:Pe,firstDayOfWeek:F,weekdayFormat:R,weekendDays:L,getDayProps:B,excludeDate:G,renderDay:U,hideOutsideDates:H,hideWeekdays:P,getDayAriaLabel:z,onNext:et,onPrevious:wt,hasNextLevel:i!=="month",onLevelClick:()=>Dn("year"),numberOfColumns:d,locale:ve,levelControlAriaLabel:v==null?void 0:v.monthLevelControl,nextLabel:(v==null?void 0:v.nextMonth)??b,nextIcon:Y,previousLabel:(v==null?void 0:v.previousMonth)??w,previousIcon:D,monthLabelFormat:q,__onDayClick:V,__onDayMouseEnter:W,__preventFocus:ue,__stopPropagation:Ie,static:We,withCellSpacing:$,highlightToday:X,withWeekNumbers:ee,headerControlsOrder:T,fullWidth:Se,...On}),Je==="year"&&y.jsx(t0,{year:yn,numberOfColumns:d,minDate:Ce,maxDate:Pe,monthsListFormat:re,getMonthControlProps:se,locale:ve,onNext:ze,onPrevious:Fe,hasNextLevel:i!=="month"&&i!=="year",onLevelClick:()=>Dn("decade"),levelControlAriaLabel:v==null?void 0:v.yearLevelControl,nextLabel:(v==null?void 0:v.nextYear)??b,nextIcon:Y,previousLabel:(v==null?void 0:v.previousYear)??w,previousIcon:D,yearLabelFormat:ge,__onControlMouseEnter:C,__onControlClick:(en,tn)=>{E&&Be(tn),Dn(Wd("month",r,i)),_==null||_(tn)},__preventFocus:ue,__stopPropagation:Ie,withCellSpacing:$,headerControlsOrder:T,fullWidth:Se,...On}),Je==="decade"&&y.jsx(n0,{decade:yn,minDate:Ce,maxDate:Pe,yearsListFormat:ae,getYearControlProps:le,locale:ve,onNext:Pn,onPrevious:rt,numberOfColumns:d,nextLabel:(v==null?void 0:v.nextDecade)??b,nextIcon:Y,previousLabel:(v==null?void 0:v.previousDecade)??w,previousIcon:D,decadeLabelFormat:_e,__onControlMouseEnter:x,__onControlClick:(en,tn)=>{O&&Be(tn),Dn(Wd("year",r,i)),k==null||k(tn)},__preventFocus:ue,__stopPropagation:Ie,withCellSpacing:$,headerControlsOrder:T,fullWidth:Se,...On})]})});Fc.classes={...n0.classes,...t0.classes,...i0.classes};Fc.displayName="@mantine/dates/Calendar";function r0(e){const{maxLevel:n,minLevel:t,defaultLevel:i,level:r,onLevelChange:a,nextIcon:o,previousIcon:l,date:f,defaultDate:c,onDateChange:h,numberOfColumns:d,columnsToScroll:p,ariaLabels:v,nextLabel:b,previousLabel:w,onYearSelect:k,onMonthSelect:_,onYearMouseEnter:x,onMonthMouseEnter:C,onNextMonth:T,onPreviousMonth:O,onNextYear:E,onPreviousYear:M,onNextDecade:N,onPreviousDecade:F,withCellSpacing:R,highlightToday:L,__updateDateOnYearSelect:B,__updateDateOnMonthSelect:G,__setDateRef:U,__setLevelRef:H,withWeekNumbers:P,headerControlsOrder:z,firstDayOfWeek:q,weekdayFormat:Y,weekendDays:D,getDayProps:V,excludeDate:W,renderDay:$,hideOutsideDates:X,hideWeekdays:ee,getDayAriaLabel:re,monthLabelFormat:se,monthsListFormat:ge,getMonthControlProps:ae,yearLabelFormat:le,yearsListFormat:_e,getYearControlProps:ne,decadeLabelFormat:$e,allowSingleDateInRange:be,allowDeselect:Ce,minDate:Pe,maxDate:ve,locale:xe,...Re}=e;return{calendarProps:{maxLevel:n,minLevel:t,defaultLevel:i,level:r,onLevelChange:a,nextIcon:o,previousIcon:l,date:f,defaultDate:c,onDateChange:h,numberOfColumns:d,columnsToScroll:p,ariaLabels:v,nextLabel:b,previousLabel:w,onYearSelect:k,onMonthSelect:_,onYearMouseEnter:x,onMonthMouseEnter:C,onNextMonth:T,onPreviousMonth:O,onNextYear:E,onPreviousYear:M,onNextDecade:N,onPreviousDecade:F,withCellSpacing:R,highlightToday:L,__updateDateOnYearSelect:B,__updateDateOnMonthSelect:G,__setDateRef:U,withWeekNumbers:P,headerControlsOrder:z,firstDayOfWeek:q,weekdayFormat:Y,weekendDays:D,getDayProps:V,excludeDate:W,renderDay:$,hideOutsideDates:X,hideWeekdays:ee,getDayAriaLabel:re,monthLabelFormat:se,monthsListFormat:ge,getMonthControlProps:ae,yearLabelFormat:le,yearsListFormat:_e,getYearControlProps:ne,decadeLabelFormat:$e,allowSingleDateInRange:be,allowDeselect:Ce,minDate:Pe,maxDate:ve,locale:xe},others:Re}}function Gj(e,n){const t=[...n].sort((i,r)=>Le(i).isAfter(Le(r))?1:-1);return Le(t[0]).startOf("day").subtract(1,"ms").isBefore(e)&&Le(t[1]).endOf("day").add(1,"ms").isAfter(e)}function MF({type:e,level:n,value:t,defaultValue:i,onChange:r,allowSingleDateInRange:a,allowDeselect:o,onMouseLeave:l}){const[f,c]=KC({type:e,value:t,defaultValue:i,onChange:r}),[h,d]=A.useState(e==="range"&&f[0]&&!f[1]?f[0]:null),[p,v]=A.useState(null),b=O=>{if(e==="range"){if(h&&!f[1]){if(Le(O).isSame(h,n)&&!a){d(null),v(null),c([null,null]);return}const E=[O,h];E.sort((M,N)=>Le(M).isAfter(Le(N))?1:-1),c(E),v(null),d(null);return}if(f[0]&&!f[1]&&Le(O).isSame(f[0],n)&&!a){d(null),v(null),c([null,null]);return}c([O,null]),v(null),d(O);return}if(e==="multiple"){f.some(E=>Le(E).isSame(O,n))?c(f.filter(E=>!Le(E).isSame(O,n))):c([...f,O]);return}f&&o&&Le(O).isSame(f,n)?c(null):c(O)},w=O=>h&&p?Gj(O,[p,h]):f[0]&&f[1]?Gj(O,f):!1,k=e==="range"?O=>{l==null||l(O),v(null)}:l,_=O=>f[0]&&Le(O).isSame(f[0],n)?!(p&&Le(p).isBefore(f[0])):!1,x=O=>f[1]?Le(O).isSame(f[1],n):!f[0]||!p?!1:Le(p).isBefore(f[0])&&Le(O).isSame(f[0],n),C=O=>{if(e==="range")return{selected:f.some(M=>M&&Le(M).isSame(O,n)),inRange:w(O),firstInRange:_(O),lastInRange:x(O),"data-autofocus":!!f[0]&&Le(f[0]).isSame(O,n)||void 0};if(e==="multiple")return{selected:f.some(M=>M&&Le(M).isSame(O,n)),"data-autofocus":!!f[0]&&Le(f[0]).isSame(O,n)||void 0};const E=Le(f).isSame(O,n);return{selected:E,"data-autofocus":E||void 0}},T=e==="range"&&h?v:()=>{};return A.useEffect(()=>{if(e==="range")if(f[0]&&!f[1])d(f[0]);else{const O=f[0]==null&&f[1]==null,E=f[0]!=null&&f[1]!=null;(O||E)&&(d(null),v(null))}},[f]),{onDateChange:b,onRootMouseLeave:k,onHoveredDateChange:T,getControlProps:C,_value:f,setValue:c}}var DF={monthPickerRoot:"m_53c9e871",presetsList:"m_cccb8ff3",presetButton:"m_7b4fbf50"};const RF=(e,{size:n})=>({monthPickerRoot:{"--preset-font-size":ei(n)}}),aoe={type:"default"},ep=De(e=>{const n=ke("MonthPicker",aoe,e),{classNames:t,styles:i,vars:r,type:a,defaultValue:o,value:l,onChange:f,__staticSelector:c,getMonthControlProps:h,allowSingleDateInRange:d,allowDeselect:p,onMouseLeave:v,onMonthSelect:b,__updateDateOnMonthSelect:w,__onPresetSelect:k,__stopPropagation:_,presets:x,className:C,style:T,unstyled:O,size:E,attributes:M,onLevelChange:N,...F}=n,{calendarProps:R,others:L}=r0(F),B=A.useRef(null),G=A.useRef(null),U=Qe({name:c||"MonthPicker",classes:DF,props:n,className:C,style:T,classNames:t,styles:i,unstyled:O,attributes:M,rootSelector:x?"monthPickerRoot":void 0,varsResolver:RF,vars:r}),{onDateChange:H,onRootMouseLeave:P,onHoveredDateChange:z,getControlProps:q,setValue:Y}=MF({type:a,level:"month",allowDeselect:p,allowSingleDateInRange:d,value:l,defaultValue:o,onChange:f,onMouseLeave:v}),{resolvedClassNames:D,resolvedStyles:V}=qi({classNames:t,styles:i,props:n}),W=y.jsx(Fc,{classNames:D,styles:V,size:E,...R,...x?{}:L,minLevel:"year",__updateDateOnMonthSelect:w??!1,__staticSelector:c||"MonthPicker",onMouseLeave:P,onMonthMouseEnter:(ee,re)=>z(re),onMonthSelect:ee=>{H(ee),b==null||b(ee)},getMonthControlProps:ee=>({...q(ee),...h==null?void 0:h(ee)}),onLevelChange:N,__setDateRef:B,__setLevelRef:G,__stopPropagation:_,attributes:M,...x?{}:{className:C,style:T}});if(!x)return W;const $=ee=>{var se,ge;const re=Array.isArray(ee)?ee[0]:ee;re!==void 0&&((se=B.current)==null||se.call(B,re),(ge=G.current)==null||ge.call(G,"year"),k?k(re):Y(ee))},X=x.map((ee,re)=>y.jsx(pi,{...U("presetButton"),onClick:()=>$(ee.value),onMouseDown:se=>se.preventDefault(),"data-mantine-stop-propagation":_||void 0,children:ee.label},re));return y.jsxs(ye,{...U("monthPickerRoot"),size:E,...L,children:[y.jsx("div",{...U("presetsList"),children:X}),W]})});ep.classes={...Fc.classes,...DF};ep.varsResolver=RF;ep.displayName="@mantine/dates/MonthPicker";var ooe={datePickerRoot:"m_765a40cf",presetsList:"m_d6a681e1",presetButton:"m_acd30b22"};const PF=(e,{size:n})=>({datePickerRoot:{"--preset-font-size":ei(n)}}),soe={type:"default",defaultLevel:"month",numberOfColumns:1,size:"sm"},np=De(e=>{const n=ke("DatePicker",soe,e),{allowDeselect:t,allowSingleDateInRange:i,value:r,defaultValue:a,onChange:o,onMouseLeave:l,classNames:f,styles:c,__staticSelector:h,__onDayClick:d,__onDayMouseEnter:p,__onPresetSelect:v,__stopPropagation:b,presets:w,className:k,style:_,unstyled:x,size:C,vars:T,attributes:O,...E}=n,{calendarProps:M,others:N}=r0(E),F=A.useRef(null),R=A.useRef(null),L=Qe({name:h||"DatePicker",classes:ooe,props:n,className:k,style:_,classNames:f,styles:c,unstyled:x,attributes:O,rootSelector:w?"datePickerRoot":void 0,varsResolver:PF,vars:T}),{onDateChange:B,onRootMouseLeave:G,onHoveredDateChange:U,getControlProps:H,_value:P,setValue:z}=MF({type:N.type,level:"day",allowDeselect:t,allowSingleDateInRange:i,value:r,defaultValue:a,onChange:o,onMouseLeave:l}),{resolvedClassNames:q,resolvedStyles:Y}=qi({classNames:f,styles:c,props:n}),D=y.jsx(Fc,{classNames:q,styles:Y,__staticSelector:h||"DatePicker",onMouseLeave:G,size:C,...M,...w?{}:N,__stopPropagation:b,__setDateRef:F,__setLevelRef:R,minLevel:M.minLevel||"month",__onDayMouseEnter:($,X)=>{U(X),p==null||p($,X)},__onDayClick:($,X)=>{B(X),d==null||d($,X)},getDayProps:$=>{var X;return{...H($),...(X=M.getDayProps)==null?void 0:X.call(M,$)}},getMonthControlProps:$=>{var X;return{selected:typeof P=="string"?YC($,P):!1,...(X=M.getMonthControlProps)==null?void 0:X.call(M,$)}},getYearControlProps:$=>{var X;return{selected:typeof P=="string"?Le($).isSame(P,"year"):!1,...(X=M.getYearControlProps)==null?void 0:X.call(M,$)}},hideOutsideDates:M.hideOutsideDates??M.numberOfColumns!==1,attributes:O,...w?{}:{className:k,style:_}});if(!w)return D;const V=$=>{var ee,re;const X=Array.isArray($)?$[0]:$;X!==void 0&&((ee=F.current)==null||ee.call(F,X),(re=R.current)==null||re.call(R,"month"),v?v(X):z($))},W=w.map(($,X)=>y.jsx(pi,{...L("presetButton"),onClick:()=>V($.value),onMouseDown:ee=>ee.preventDefault(),"data-mantine-stop-propagation":b||void 0,children:$.label},X));return y.jsxs(ye,{...L("datePickerRoot"),size:C,...N,children:[y.jsx("div",{...L("presetsList"),children:W}),D]})});np.classes=Fc.classes;np.varsResolver=PF;np.displayName="@mantine/dates/DatePicker";function NF({type:e,value:n,defaultValue:t,onChange:i,locale:r,format:a,closeOnChange:o,sortDates:l,labelSeparator:f,valueFormatter:c}){const h=dl(),[d,p]=az(!1),[v,b]=KC({type:e,value:n,defaultValue:t,onChange:i}),w=Aae({type:e,date:v,locale:h.getLocale(r),format:a,labelSeparator:h.getLabelSeparator(f),formatter:c}),k=x=>{o&&(e==="default"&&p.close(),e==="range"&&x[0]&&x[1]&&p.close()),b(l&&e==="multiple"?[...x].sort((C,T)=>Le(C).isAfter(Le(T))?1:-1):x)};return{_value:v,setValue:k,onClear:()=>k(e==="range"?[null,null]:e==="multiple"?[]:null),shouldClear:e==="range"?!!v[0]:e==="multiple"?v.length>0:v!==null,formattedValue:w,dropdownOpened:d,dropdownHandlers:p}}const loe={type:"default",size:"sm",valueFormat:"MMMM YYYY",closeOnChange:!0,sortDates:!0,dropdownType:"popover"},XC=De(e=>{const n=ke("MonthPickerInput",loe,e),{type:t,value:i,defaultValue:r,onChange:a,valueFormat:o,labelSeparator:l,locale:f,classNames:c,styles:h,unstyled:d,closeOnChange:p,size:v,variant:b,dropdownType:w,sortDates:k,minDate:_,maxDate:x,vars:C,valueFormatter:T,presets:O,attributes:E,...M}=n,{resolvedClassNames:N,resolvedStyles:F}=qi({classNames:c,styles:h,props:n}),{calendarProps:R,others:L}=r0(M),{_value:B,setValue:G,formattedValue:U,dropdownHandlers:H,dropdownOpened:P,onClear:z,shouldClear:q}=NF({type:t,value:i,defaultValue:r,onChange:a,locale:f,format:o,labelSeparator:l,closeOnChange:p,sortDates:k,valueFormatter:T});return y.jsx(Bc,{formattedValue:U,dropdownOpened:P,dropdownHandlers:H,classNames:N,styles:F,unstyled:d,onClear:z,shouldClear:q,value:B,size:v,variant:b,dropdownType:w,...L,attributes:E,type:t,__staticSelector:"MonthPickerInput",children:y.jsx(ep,{...R,size:v,variant:b,type:t,value:B,defaultDate:R.defaultDate||(Array.isArray(B)?B[0]||OS({maxDate:x,minDate:_}):B||OS({maxDate:x,minDate:_})),onChange:G,locale:f,classNames:N,styles:F,unstyled:d,__staticSelector:"MonthPickerInput",__stopPropagation:w==="popover",minDate:_,maxDate:x,presets:O,attributes:E})})});XC.classes={...Bc.classes,...ep.classes};XC.displayName="@mantine/dates/MonthPickerInput";const uoe={type:"default",size:"sm",valueFormat:"MMMM D, YYYY",closeOnChange:!0,sortDates:!0,dropdownType:"popover"},pu=De(e=>{const n=ke("DatePickerInput",uoe,e),{type:t,value:i,defaultValue:r,onChange:a,valueFormat:o,labelSeparator:l,locale:f,classNames:c,styles:h,unstyled:d,closeOnChange:p,size:v,variant:b,dropdownType:w,sortDates:k,minDate:_,maxDate:x,vars:C,defaultDate:T,valueFormatter:O,presets:E,attributes:M,...N}=n,{resolvedClassNames:F,resolvedStyles:R}=qi({classNames:c,styles:h,props:n}),{calendarProps:L,others:B}=r0(N),{_value:G,setValue:U,formattedValue:H,dropdownHandlers:P,dropdownOpened:z,onClear:q,shouldClear:Y}=NF({type:t,value:i,defaultValue:r,onChange:a,locale:f,format:o,labelSeparator:l,closeOnChange:p,sortDates:k,valueFormatter:O}),D=Array.isArray(G)?G[0]||T:G||T;return y.jsx(Bc,{formattedValue:H,dropdownOpened:z,dropdownHandlers:P,classNames:F,styles:R,unstyled:d,onClear:q,shouldClear:Y,value:G,size:v,variant:b,dropdownType:w,...B,type:t,__staticSelector:"DatePickerInput",attributes:M,children:y.jsx(np,{...L,size:v,variant:b,type:t,value:G,defaultDate:D||OS({maxDate:x,minDate:_}),onChange:U,locale:f,classNames:F,styles:R,unstyled:d,__staticSelector:"DatePickerInput",__stopPropagation:w==="popover",minDate:_,maxDate:x,presets:E,attributes:M})})});pu.classes={...Bc.classes,...np.classes};pu.displayName="@mantine/dates/DatePickerInput";/** - * @license @tabler/icons-react v3.42.0 - MIT - * - * This source code is licensed under the MIT license. - * See the LICENSE file in the root directory of this source tree. - */var foe={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.42.0 - MIT - * - * This source code is licensed under the MIT license. - * See the LICENSE file in the root directory of this source tree. - */const _n=(e,n,t,i)=>{const r=A.forwardRef(({color:a="currentColor",size:o=24,stroke:l=2,title:f,className:c,children:h,...d},p)=>A.createElement("svg",{ref:p,...foe[e],width:o,height:o,className:["tabler-icon",`tabler-icon-${n}`,c].join(" "),strokeWidth:l,stroke:a,...d},[f&&A.createElement("title",{key:"svg-title"},f),...i.map(([v,b])=>A.createElement(v,b)),...Array.isArray(h)?h:[h]]));return r.displayName=`${t}`,r};/** - * @license @tabler/icons-react v3.42.0 - MIT - * - * This source code is licensed under the MIT license. - * See the LICENSE file in the root directory of this source tree. - */const coe=[["path",{d:"M12 9v4",key:"svg-0"}],["path",{d:"M10.363 3.591l-8.106 13.534a1.914 1.914 0 0 0 1.636 2.871h16.214a1.914 1.914 0 0 0 1.636 -2.87l-8.106 -13.536a1.914 1.914 0 0 0 -3.274 0",key:"svg-1"}],["path",{d:"M12 16h.01",key:"svg-2"}]],doe=_n("outline","alert-triangle","AlertTriangle",coe);/** - * @license @tabler/icons-react v3.42.0 - MIT - * - * This source code is licensed under the MIT license. - * See the LICENSE file in the root directory of this source tree. - */const hoe=[["path",{d:"M8 4h11a2 2 0 1 1 0 4h-7m-4 0h-3a2 2 0 0 1 -.826 -3.822",key:"svg-0"}],["path",{d:"M5 8v10a2 2 0 0 0 2 2h10a2 2 0 0 0 1.824 -1.18m.176 -3.82v-7",key:"svg-1"}],["path",{d:"M10 12h2",key:"svg-2"}],["path",{d:"M3 3l18 18",key:"svg-3"}]],moe=_n("outline","archive-off","ArchiveOff",hoe);/** - * @license @tabler/icons-react v3.42.0 - MIT - * - * This source code is licensed under the MIT license. - * See the LICENSE file in the root directory of this source tree. - */const poe=[["path",{d:"M3 6a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2",key:"svg-0"}],["path",{d:"M5 8v10a2 2 0 0 0 2 2h10a2 2 0 0 0 2 -2v-10",key:"svg-1"}],["path",{d:"M10 12l4 0",key:"svg-2"}]],$F=_n("outline","archive","Archive",poe);/** - * @license @tabler/icons-react v3.42.0 - MIT - * - * This source code is licensed under the MIT license. - * See the LICENSE file in the root directory of this source tree. - */const voe=[["path",{d:"M9 14l-4 -4l4 -4",key:"svg-0"}],["path",{d:"M5 10h11a4 4 0 1 1 0 8h-1",key:"svg-1"}]],Yj=_n("outline","arrow-back-up","ArrowBackUp",voe);/** - * @license @tabler/icons-react v3.42.0 - MIT - * - * This source code is licensed under the MIT license. - * See the LICENSE file in the root directory of this source tree. - */const goe=[["path",{d:"M7 8l-4 4l4 4",key:"svg-0"}],["path",{d:"M17 8l4 4l-4 4",key:"svg-1"}],["path",{d:"M3 12l18 0",key:"svg-2"}]],yoe=_n("outline","arrows-horizontal","ArrowsHorizontal",goe);/** - * @license @tabler/icons-react v3.42.0 - MIT - * - * This source code is licensed under the MIT license. - * See the LICENSE file in the root directory of this source tree. - */const boe=[["path",{d:"M4 7a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2l0 -12",key:"svg-0"}],["path",{d:"M16 3v4",key:"svg-1"}],["path",{d:"M8 3v4",key:"svg-2"}],["path",{d:"M4 11h16",key:"svg-3"}],["path",{d:"M11 16a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-4"}]],zF=_n("outline","calendar-due","CalendarDue",boe);/** - * @license @tabler/icons-react v3.42.0 - MIT - * - * This source code is licensed under the MIT license. - * See the LICENSE file in the root directory of this source tree. - */const woe=[["path",{d:"M9 5h9a2 2 0 0 1 2 2v9m-.184 3.839a2 2 0 0 1 -1.816 1.161h-12a2 2 0 0 1 -2 -2v-12a2 2 0 0 1 1.158 -1.815",key:"svg-0"}],["path",{d:"M16 3v4",key:"svg-1"}],["path",{d:"M8 3v1",key:"svg-2"}],["path",{d:"M4 11h7m4 0h5",key:"svg-3"}],["path",{d:"M3 3l18 18",key:"svg-4"}]],koe=_n("outline","calendar-off","CalendarOff",woe);/** - * @license @tabler/icons-react v3.42.0 - MIT - * - * This source code is licensed under the MIT license. - * See the LICENSE file in the root directory of this source tree. - */const _oe=[["path",{d:"M4 7a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2v-12",key:"svg-0"}],["path",{d:"M16 3v4",key:"svg-1"}],["path",{d:"M8 3v4",key:"svg-2"}],["path",{d:"M4 11h16",key:"svg-3"}],["path",{d:"M11 15h1",key:"svg-4"}],["path",{d:"M12 15v3",key:"svg-5"}]],xoe=_n("outline","calendar","Calendar",_oe);/** - * @license @tabler/icons-react v3.42.0 - MIT - * - * This source code is licensed under the MIT license. - * See the LICENSE file in the root directory of this source tree. - */const Soe=[["path",{d:"M3 13a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v6a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1l0 -6",key:"svg-0"}],["path",{d:"M15 9a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v10a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1l0 -10",key:"svg-1"}],["path",{d:"M9 5a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v14a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1l0 -14",key:"svg-2"}],["path",{d:"M4 20h14",key:"svg-3"}]],Coe=_n("outline","chart-bar","ChartBar",Soe);/** - * @license @tabler/icons-react v3.42.0 - MIT - * - * This source code is licensed under the MIT license. - * See the LICENSE file in the root directory of this source tree. - */const Aoe=[["path",{d:"M5 12l5 5l10 -10",key:"svg-0"}]],Vh=_n("outline","check","Check",Aoe);/** - * @license @tabler/icons-react v3.42.0 - MIT - * - * This source code is licensed under the MIT license. - * See the LICENSE file in the root directory of this source tree. - */const Ooe=[["path",{d:"M9 11l3 3l8 -8",key:"svg-0"}],["path",{d:"M20 12v6a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2v-12a2 2 0 0 1 2 -2h9",key:"svg-1"}]],Wh=_n("outline","checkbox","Checkbox",Ooe);/** - * @license @tabler/icons-react v3.42.0 - MIT - * - * This source code is licensed under the MIT license. - * See the LICENSE file in the root directory of this source tree. - */const Eoe=[["path",{d:"M6 9l6 6l6 -6",key:"svg-0"}]],ES=_n("outline","chevron-down","ChevronDown",Eoe);/** - * @license @tabler/icons-react v3.42.0 - MIT - * - * This source code is licensed under the MIT license. - * See the LICENSE file in the root directory of this source tree. - */const Toe=[["path",{d:"M9 6l6 6l-6 6",key:"svg-0"}]],TS=_n("outline","chevron-right","ChevronRight",Toe);/** - * @license @tabler/icons-react v3.42.0 - MIT - * - * This source code is licensed under the MIT license. - * See the LICENSE file in the root directory of this source tree. - */const joe=[["path",{d:"M9 5h-2a2 2 0 0 0 -2 2v12a2 2 0 0 0 2 2h10a2 2 0 0 0 2 -2v-12a2 2 0 0 0 -2 -2h-2",key:"svg-0"}],["path",{d:"M9 5a2 2 0 0 1 2 -2h2a2 2 0 0 1 2 2a2 2 0 0 1 -2 2h-2a2 2 0 0 1 -2 -2",key:"svg-1"}],["path",{d:"M9 12l.01 0",key:"svg-2"}],["path",{d:"M13 12l2 0",key:"svg-3"}],["path",{d:"M9 16l.01 0",key:"svg-4"}],["path",{d:"M13 16l2 0",key:"svg-5"}]],Kj=_n("outline","clipboard-list","ClipboardList",joe);/** - * @license @tabler/icons-react v3.42.0 - MIT - * - * This source code is licensed under the MIT license. - * See the LICENSE file in the root directory of this source tree. - */const Moe=[["path",{d:"M3 12a9 9 0 1 0 18 0a9 9 0 1 0 -18 0",key:"svg-0"}],["path",{d:"M12 12l3 2",key:"svg-1"}],["path",{d:"M12 7v5",key:"svg-2"}]],Doe=_n("outline","clock-hour-4","ClockHour4",Moe);/** - * @license @tabler/icons-react v3.42.0 - MIT - * - * This source code is licensed under the MIT license. - * See the LICENSE file in the root directory of this source tree. - */const Roe=[["path",{d:"M3 12a9 9 0 1 0 18 0a9 9 0 0 0 -18 0",key:"svg-0"}],["path",{d:"M12 7v5l3 3",key:"svg-1"}]],jS=_n("outline","clock","Clock",Roe);/** - * @license @tabler/icons-react v3.42.0 - MIT - * - * This source code is licensed under the MIT license. - * See the LICENSE file in the root directory of this source tree. - */const Poe=[["path",{d:"M3 4a1 1 0 0 1 1 -1h16a1 1 0 0 1 1 1v16a1 1 0 0 1 -1 1h-16a1 1 0 0 1 -1 -1v-16",key:"svg-0"}],["path",{d:"M9 3v18",key:"svg-1"}],["path",{d:"M15 3v18",key:"svg-2"}]],Noe=_n("outline","columns-3","Columns3",Poe);/** - * @license @tabler/icons-react v3.42.0 - MIT - * - * This source code is licensed under the MIT license. - * See the LICENSE file in the root directory of this source tree. - */const $oe=[["path",{d:"M7 9.667a2.667 2.667 0 0 1 2.667 -2.667h8.666a2.667 2.667 0 0 1 2.667 2.667v8.666a2.667 2.667 0 0 1 -2.667 2.667h-8.666a2.667 2.667 0 0 1 -2.667 -2.667l0 -8.666",key:"svg-0"}],["path",{d:"M4.012 16.737a2.005 2.005 0 0 1 -1.012 -1.737v-10c0 -1.1 .9 -2 2 -2h10c.75 0 1.158 .385 1.5 1",key:"svg-1"}]],zoe=_n("outline","copy","Copy",$oe);/** - * @license @tabler/icons-react v3.42.0 - MIT - * - * This source code is licensed under the MIT license. - * See the LICENSE file in the root directory of this source tree. - */const Loe=[["path",{d:"M3 5a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v14a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2v-14",key:"svg-0"}],["path",{d:"M8 8.5a.5 .5 0 1 0 1 0a.5 .5 0 1 0 -1 0",fill:"currentColor",key:"svg-1"}],["path",{d:"M15 8.5a.5 .5 0 1 0 1 0a.5 .5 0 1 0 -1 0",fill:"currentColor",key:"svg-2"}],["path",{d:"M15 15.5a.5 .5 0 1 0 1 0a.5 .5 0 1 0 -1 0",fill:"currentColor",key:"svg-3"}],["path",{d:"M8 15.5a.5 .5 0 1 0 1 0a.5 .5 0 1 0 -1 0",fill:"currentColor",key:"svg-4"}],["path",{d:"M11.5 12a.5 .5 0 1 0 1 0a.5 .5 0 1 0 -1 0",fill:"currentColor",key:"svg-5"}]],Ioe=_n("outline","dice-5","Dice5",Loe);/** - * @license @tabler/icons-react v3.42.0 - MIT - * - * This source code is licensed under the MIT license. - * See the LICENSE file in the root directory of this source tree. - */const Boe=[["path",{d:"M11 12a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-0"}],["path",{d:"M11 19a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-1"}],["path",{d:"M11 5a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-2"}]],LF=_n("outline","dots-vertical","DotsVertical",Boe);/** - * @license @tabler/icons-react v3.42.0 - MIT - * - * This source code is licensed under the MIT license. - * See the LICENSE file in the root directory of this source tree. - */const Foe=[["path",{d:"M7 7h-1a2 2 0 0 0 -2 2v9a2 2 0 0 0 2 2h9a2 2 0 0 0 2 -2v-1",key:"svg-0"}],["path",{d:"M20.385 6.585a2.1 2.1 0 0 0 -2.97 -2.97l-8.415 8.385v3h3l8.385 -8.415",key:"svg-1"}],["path",{d:"M16 5l3 3",key:"svg-2"}]],dh=_n("outline","edit","Edit",Foe);/** - * @license @tabler/icons-react v3.42.0 - MIT - * - * This source code is licensed under the MIT license. - * See the LICENSE file in the root directory of this source tree. - */const qoe=[["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"}]],Hoe=_n("outline","external-link","ExternalLink",qoe);/** - * @license @tabler/icons-react v3.42.0 - MIT - * - * This source code is licensed under the MIT license. - * See the LICENSE file in the root directory of this source tree. - */const Uoe=[["path",{d:"M8 5a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-0"}],["path",{d:"M8 12a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-1"}],["path",{d:"M8 19a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-2"}],["path",{d:"M14 5a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-3"}],["path",{d:"M14 12a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-4"}],["path",{d:"M14 19a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-5"}]],IF=_n("outline","grip-vertical","GripVertical",Uoe);/** - * @license @tabler/icons-react v3.42.0 - MIT - * - * This source code is licensed under the MIT license. - * See the LICENSE file in the root directory of this source tree. - */const Voe=[["path",{d:"M12 8l0 4l2 2",key:"svg-0"}],["path",{d:"M3.05 11a9 9 0 1 1 .5 4m-.5 5v-5h5",key:"svg-1"}]],Woe=_n("outline","history","History",Voe);/** - * @license @tabler/icons-react v3.42.0 - MIT - * - * This source code is licensed under the MIT license. - * See the LICENSE file in the root directory of this source tree. - */const Goe=[["path",{d:"M6.5 7h11",key:"svg-0"}],["path",{d:"M6.5 17h11",key:"svg-1"}],["path",{d:"M6 20v-2a6 6 0 1 1 12 0v2a1 1 0 0 1 -1 1h-10a1 1 0 0 1 -1 -1",key:"svg-2"}],["path",{d:"M6 4v2a6 6 0 1 0 12 0v-2a1 1 0 0 0 -1 -1h-10a1 1 0 0 0 -1 1",key:"svg-3"}]],BF=_n("outline","hourglass","Hourglass",Goe);/** - * @license @tabler/icons-react v3.42.0 - MIT - * - * This source code is licensed under the MIT license. - * See the LICENSE file in the root directory of this source tree. - */const Yoe=[["path",{d:"M4 4l6 0",key:"svg-0"}],["path",{d:"M14 4l6 0",key:"svg-1"}],["path",{d:"M4 10a2 2 0 0 1 2 -2h2a2 2 0 0 1 2 2v8a2 2 0 0 1 -2 2h-2a2 2 0 0 1 -2 -2l0 -8",key:"svg-2"}],["path",{d:"M14 10a2 2 0 0 1 2 -2h2a2 2 0 0 1 2 2v2a2 2 0 0 1 -2 2h-2a2 2 0 0 1 -2 -2l0 -2",key:"svg-3"}]],MS=_n("outline","layout-kanban","LayoutKanban",Yoe);/** - * @license @tabler/icons-react v3.42.0 - MIT - * - * This source code is licensed under the MIT license. - * See the LICENSE file in the root directory of this source tree. - */const Koe=[["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"}]],Xoe=_n("outline","link","Link",Koe);/** - * @license @tabler/icons-react v3.42.0 - MIT - * - * This source code is licensed under the MIT license. - * See the LICENSE file in the root directory of this source tree. - */const Zoe=[["path",{d:"M5 13a2 2 0 0 1 2 -2h10a2 2 0 0 1 2 2v6a2 2 0 0 1 -2 2h-10a2 2 0 0 1 -2 -2l0 -6",key:"svg-0"}],["path",{d:"M11 16a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-1"}],["path",{d:"M8 11v-5a4 4 0 0 1 8 0",key:"svg-2"}]],FF=_n("outline","lock-open","LockOpen",Zoe);/** - * @license @tabler/icons-react v3.42.0 - MIT - * - * This source code is licensed under the MIT license. - * See the LICENSE file in the root directory of this source tree. - */const Qoe=[["path",{d:"M5 13a2 2 0 0 1 2 -2h10a2 2 0 0 1 2 2v6a2 2 0 0 1 -2 2h-10a2 2 0 0 1 -2 -2v-6",key:"svg-0"}],["path",{d:"M11 16a1 1 0 1 0 2 0a1 1 0 0 0 -2 0",key:"svg-1"}],["path",{d:"M8 11v-4a4 4 0 1 1 8 0v4",key:"svg-2"}]],nu=_n("outline","lock","Lock",Qoe);/** - * @license @tabler/icons-react v3.42.0 - MIT - * - * This source code is licensed under the MIT license. - * See the LICENSE file in the root directory of this source tree. - */const Joe=[["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"}]],ese=_n("outline","logout","Logout",Joe);/** - * @license @tabler/icons-react v3.42.0 - MIT - * - * This source code is licensed under the MIT license. - * See the LICENSE file in the root directory of this source tree. - */const nse=[["path",{d:"M4 6l16 0",key:"svg-0"}],["path",{d:"M4 12l16 0",key:"svg-1"}],["path",{d:"M4 18l16 0",key:"svg-2"}]],tse=_n("outline","menu-2","Menu2",nse);/** - * @license @tabler/icons-react v3.42.0 - MIT - * - * This source code is licensed under the MIT license. - * See the LICENSE file in the root directory of this source tree. - */const ise=[["path",{d:"M18 4a3 3 0 0 1 3 3v8a3 3 0 0 1 -3 3h-5l-5 3v-3h-2a3 3 0 0 1 -3 -3v-8a3 3 0 0 1 3 -3h12",key:"svg-0"}],["path",{d:"M9.5 9h.01",key:"svg-1"}],["path",{d:"M14.5 9h.01",key:"svg-2"}],["path",{d:"M9.5 13a3.5 3.5 0 0 0 5 0",key:"svg-3"}]],qF=_n("outline","message-chatbot","MessageChatbot",ise);/** - * @license @tabler/icons-react v3.42.0 - MIT - * - * This source code is licensed under the MIT license. - * See the LICENSE file in the root directory of this source tree. - */const rse=[["path",{d:"M8 9h8",key:"svg-0"}],["path",{d:"M8 13h6",key:"svg-1"}],["path",{d:"M18 4a3 3 0 0 1 3 3v8a3 3 0 0 1 -3 3h-5l-5 3v-3h-2a3 3 0 0 1 -3 -3v-8a3 3 0 0 1 3 -3h12",key:"svg-2"}]],ase=_n("outline","message","Message",rse);/** - * @license @tabler/icons-react v3.42.0 - MIT - * - * This source code is licensed under the MIT license. - * See the LICENSE file in the root directory of this source tree. - */const ose=[["path",{d:"M3 12a9 9 0 1 0 18 0a9 9 0 1 0 -18 0",key:"svg-0"}],["path",{d:"M9 10l.01 0",key:"svg-1"}],["path",{d:"M15 10l.01 0",key:"svg-2"}],["path",{d:"M9.5 15a3.5 3.5 0 0 0 5 0",key:"svg-3"}]],sse=_n("outline","mood-smile","MoodSmile",ose);/** - * @license @tabler/icons-react v3.42.0 - MIT - * - * This source code is licensed under the MIT license. - * See the LICENSE file in the root directory of this source tree. - */const lse=[["path",{d:"M12 21a9 9 0 0 1 0 -18c4.97 0 9 3.582 9 8c0 1.06 -.474 2.078 -1.318 2.828c-.844 .75 -1.989 1.172 -3.182 1.172h-2.5a2 2 0 0 0 -1 3.75a1.3 1.3 0 0 1 -1 2.25",key:"svg-0"}],["path",{d:"M7.5 10.5a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-1"}],["path",{d:"M11.5 7.5a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-2"}],["path",{d:"M15.5 10.5a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-3"}]],ZC=_n("outline","palette","Palette",lse);/** - * @license @tabler/icons-react v3.42.0 - MIT - * - * This source code is licensed under the MIT license. - * See the LICENSE file in the root directory of this source tree. - */const use=[["path",{d:"M15 7l-6.5 6.5a1.5 1.5 0 0 0 3 3l6.5 -6.5a3 3 0 0 0 -6 -6l-6.5 6.5a4.5 4.5 0 0 0 9 9l6.5 -6.5",key:"svg-0"}]],fse=_n("outline","paperclip","Paperclip",use);/** - * @license @tabler/icons-react v3.42.0 - MIT - * - * This source code is licensed under the MIT license. - * See the LICENSE file in the root directory of this source tree. - */const cse=[["path",{d:"M4 20h4l10.5 -10.5a2.828 2.828 0 1 0 -4 -4l-10.5 10.5v4",key:"svg-0"}],["path",{d:"M13.5 6.5l4 4",key:"svg-1"}]],dse=_n("outline","pencil","Pencil",cse);/** - * @license @tabler/icons-react v3.42.0 - MIT - * - * This source code is licensed under the MIT license. - * See the LICENSE file in the root directory of this source tree. - */const hse=[["path",{d:"M12 5l0 14",key:"svg-0"}],["path",{d:"M5 12l14 0",key:"svg-1"}]],Gh=_n("outline","plus","Plus",hse);/** - * @license @tabler/icons-react v3.42.0 - MIT - * - * This source code is licensed under the MIT license. - * See the LICENSE file in the root directory of this source tree. - */const mse=[["path",{d:"M20 11a8.1 8.1 0 0 0 -15.5 -2m-.5 -4v4h4",key:"svg-0"}],["path",{d:"M4 13a8.1 8.1 0 0 0 15.5 2m.5 4v-4h-4",key:"svg-1"}]],pse=_n("outline","refresh","Refresh",mse);/** - * @license @tabler/icons-react v3.42.0 - MIT - * - * This source code is licensed under the MIT license. - * See the LICENSE file in the root directory of this source tree. - */const vse=[["path",{d:"M3 10a7 7 0 1 0 14 0a7 7 0 1 0 -14 0",key:"svg-0"}],["path",{d:"M21 21l-6 -6",key:"svg-1"}]],gse=_n("outline","search","Search",vse);/** - * @license @tabler/icons-react v3.42.0 - MIT - * - * This source code is licensed under the MIT license. - * See the LICENSE file in the root directory of this source tree. - */const yse=[["path",{d:"M10 14l11 -11",key:"svg-0"}],["path",{d:"M21 3l-6.5 18a.55 .55 0 0 1 -1 0l-3.5 -7l-7 -3.5a.55 .55 0 0 1 0 -1l18 -6.5",key:"svg-1"}]],HF=_n("outline","send","Send",yse);/** - * @license @tabler/icons-react v3.42.0 - MIT - * - * This source code is licensed under the MIT license. - * See the LICENSE file in the root directory of this source tree. - */const bse=[["path",{d:"M6.5 7.5a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-0"}],["path",{d:"M3 6v5.172a2 2 0 0 0 .586 1.414l7.71 7.71a2.41 2.41 0 0 0 3.408 0l5.592 -5.592a2.41 2.41 0 0 0 0 -3.408l-7.71 -7.71a2 2 0 0 0 -1.414 -.586h-5.172a3 3 0 0 0 -3 3",key:"svg-1"}]],wse=_n("outline","tag","Tag",bse);/** - * @license @tabler/icons-react v3.42.0 - MIT - * - * This source code is licensed under the MIT license. - * See the LICENSE file in the root directory of this source tree. - */const kse=[["path",{d:"M4 7h16",key:"svg-0"}],["path",{d:"M5 7l1 12a2 2 0 0 0 2 2h8a2 2 0 0 0 2 -2l1 -12",key:"svg-1"}],["path",{d:"M9 7v-3a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v3",key:"svg-2"}],["path",{d:"M10 12l4 4m0 -4l-4 4",key:"svg-3"}]],_se=_n("outline","trash-x","TrashX",kse);/** - * @license @tabler/icons-react v3.42.0 - MIT - * - * This source code is licensed under the MIT license. - * See the LICENSE file in the root directory of this source tree. - */const xse=[["path",{d:"M4 7l16 0",key:"svg-0"}],["path",{d:"M10 11l0 6",key:"svg-1"}],["path",{d:"M14 11l0 6",key:"svg-2"}],["path",{d:"M5 7l1 12a2 2 0 0 0 2 2h8a2 2 0 0 0 2 -2l1 -12",key:"svg-3"}],["path",{d:"M9 7v-3a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v3",key:"svg-4"}]],vu=_n("outline","trash","Trash",xse);/** - * @license @tabler/icons-react v3.42.0 - MIT - * - * This source code is licensed under the MIT license. - * See the LICENSE file in the root directory of this source tree. - */const Sse=[["path",{d:"M3 17l6 -6l4 4l8 -8",key:"svg-0"}],["path",{d:"M14 7l7 0l0 7",key:"svg-1"}]],Xj=_n("outline","trending-up","TrendingUp",Sse);/** - * @license @tabler/icons-react v3.42.0 - MIT - * - * This source code is licensed under the MIT license. - * See the LICENSE file in the root directory of this source tree. - */const Cse=[["path",{d:"M3 12a9 9 0 1 0 18 0a9 9 0 1 0 -18 0",key:"svg-0"}],["path",{d:"M9 10a3 3 0 1 0 6 0a3 3 0 1 0 -6 0",key:"svg-1"}],["path",{d:"M6.168 18.849a4 4 0 0 1 3.832 -2.849h4a4 4 0 0 1 3.834 2.855",key:"svg-2"}]],Ase=_n("outline","user-circle","UserCircle",Cse);/** - * @license @tabler/icons-react v3.42.0 - MIT - * - * This source code is licensed under the MIT license. - * See the LICENSE file in the root directory of this source tree. - */const Ose=[["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.009 .128",key:"svg-1"}],["path",{d:"M16 19h6",key:"svg-2"}]],Ese=_n("outline","user-minus","UserMinus",Ose);/** - * @license @tabler/icons-react v3.42.0 - MIT - * - * This source code is licensed under the MIT license. - * See the LICENSE file in the root directory of this source tree. - */const Tse=[["path",{d:"M8 7a4 4 0 1 0 8 0a4 4 0 0 0 -8 0",key:"svg-0"}],["path",{d:"M16 19h6",key:"svg-1"}],["path",{d:"M19 16v6",key:"svg-2"}],["path",{d:"M6 21v-2a4 4 0 0 1 4 -4h4",key:"svg-3"}]],jse=_n("outline","user-plus","UserPlus",Tse);/** - * @license @tabler/icons-react v3.42.0 - MIT - * - * This source code is licensed under the MIT license. - * See the LICENSE file in the root directory of this source tree. - */const Mse=[["path",{d:"M9 10a3 3 0 1 0 6 0a3 3 0 0 0 -6 0",key:"svg-0"}],["path",{d:"M6 21v-1a4 4 0 0 1 4 -4h4a4 4 0 0 1 4 4v1",key:"svg-1"}],["path",{d:"M3 5a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v14a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2v-14",key:"svg-2"}]],Dse=_n("outline","user-square","UserSquare",Mse);/** - * @license @tabler/icons-react v3.42.0 - MIT - * - * This source code is licensed under the MIT license. - * See the LICENSE file in the root directory of this source tree. - */const Rse=[["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 -4h4a4 4 0 0 1 4 4v2",key:"svg-1"}]],Pse=_n("outline","user","User",Rse);/** - * @license @tabler/icons-react v3.42.0 - MIT - * - * This source code is licensed under the MIT license. - * See the LICENSE file in the root directory of this source tree. - */const Nse=[["path",{d:"M18 6l-12 12",key:"svg-0"}],["path",{d:"M6 6l12 12",key:"svg-1"}]],hh=_n("outline","x","X",Nse);function UF({initial:e,submitLabel:n="Guardar",users:t=[],requesterOptions:i=[],tagOptions:r=[],onSubmit:a,onCancel:o}){const[l,f]=A.useState((e==null?void 0:e.requester)??""),[c,h]=A.useState((e==null?void 0:e.title)??""),[d,p]=A.useState((e==null?void 0:e.description)??""),[v,b]=A.useState((e==null?void 0:e.assignee_id)??null),[w,k]=A.useState((e==null?void 0:e.tags)??[]),_=async C=>{C==null||C.preventDefault();const T=c.trim();T&&await a({requester:l.trim(),title:T,description:d,assignee_id:v,tags:w})},x=C=>{C.key==="Enter"&&(C.ctrlKey||C.metaKey)&&(C.preventDefault(),_())};return y.jsx("form",{onSubmit:_,children:y.jsxs(ft,{gap:"sm",children:[y.jsx(Kf,{label:"Tarea",value:c,onChange:C=>h(C.currentTarget.value),tabIndex:1,required:!0,autoComplete:"off","data-autofocus":!0,autosize:!0,minRows:1,maxRows:4,onKeyDown:C=>{C.key==="Enter"&&!C.shiftKey&&(C.preventDefault(),_())}}),y.jsx(yy,{label:"Solicitante",value:l,onChange:f,data:i,tabIndex:2,autoComplete:"off","data-field":"requester",placeholder:"Empieza a escribir y elige uno existente",limit:10,onKeyDown:C=>{C.key==="Enter"&&C.preventDefault()}}),y.jsx(Kf,{label:"Descripcion",value:d,onChange:C=>p(C.currentTarget.value),tabIndex:3,autosize:!0,minRows:3,maxRows:8,onKeyDown:x,description:"Ctrl+Enter para guardar"}),y.jsx(ho,{label:"Asignar a",placeholder:"Sin asignar",value:v,onChange:C=>b(C),data:t.map(C=>({value:C.id,label:C.display_name||C.username})),clearable:!0,searchable:!0,tabIndex:4}),y.jsx(DC,{label:"Tags",value:w,onChange:k,data:r,clearable:!0,tabIndex:5,placeholder:"Enter para añadir; sugiere existentes",splitChars:[","," "]}),y.jsxs(un,{justify:"flex-end",gap:"xs",mt:"xs",children:[y.jsx(Rt,{variant:"subtle",color:"gray",tabIndex:7,type:"button",onClick:o,children:"Cancelar"}),y.jsx(Rt,{tabIndex:6,type:"submit",disabled:!c.trim(),children:n})]})]})})}function $se(e,n){if(n.length===0)throw new Error("palette must not be empty");let t=0;for(let i=0;i>>0;return n[t%n.length]}const QC=new Set(["blue","cyan","teal","green","lime","yellow","orange","red","pink","grape","violet","indigo","gray","dark"]);function JC(e){return/^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/.test(e)}function VF(e){return e?JC(e)?`color-mix(in srgb, ${e} 18%, var(--mantine-color-dark-6))`:QC.has(e)?`color-mix(in srgb, var(--mantine-color-${e}-9) 18%, var(--mantine-color-dark-6))`:"var(--mantine-color-dark-6)":"var(--mantine-color-dark-6)"}function e9(e){return e?JC(e)?`color-mix(in srgb, ${e} 30%, var(--mantine-color-dark-4))`:QC.has(e)?`color-mix(in srgb, var(--mantine-color-${e}-7) 30%, var(--mantine-color-dark-4))`:"var(--mantine-color-dark-4)":"var(--mantine-color-dark-4)"}function zse(e){return e?JC(e)?e:QC.has(e)?`var(--mantine-color-${e}-7)`:"var(--mantine-color-dark-3)":"var(--mantine-color-dark-3)"}const WF=[{value:"",label:"Default"},{value:"blue",label:"Azul"},{value:"cyan",label:"Cian"},{value:"teal",label:"Teal"},{value:"green",label:"Verde"},{value:"lime",label:"Lima"},{value:"yellow",label:"Amarillo"},{value:"orange",label:"Naranja"},{value:"red",label:"Rojo"},{value:"pink",label:"Rosa"},{value:"grape",label:"Uva"},{value:"violet",label:"Violeta"},{value:"indigo",label:"Indigo"},{value:"gray",label:"Gris"},{value:"#0ea5e9",label:"Sky"},{value:"#14b8a6",label:"Esmeralda"},{value:"#84cc16",label:"Lima fluor"},{value:"#ec4899",label:"Magenta"},{value:"#a855f7",label:"Lavanda"},{value:"#f97316",label:"Mandarina"},{value:"#dc2626",label:"Rubi"},{value:"#0891b2",label:"Petroleo"},{value:"#fde047",label:"Limon"},{value:"#10b981",label:"Menta"},{value:"#fb7185",label:"Coral"},{value:"#6366f1",label:"Iris"},{value:"#94a3b8",label:"Pizarra"}],Lse=WF,Ise=["blue","cyan","teal","green","lime","yellow","orange","red","pink","grape","violet","indigo"];function DS(e){return $se(e,Ise)}const RS=6e4,mh=60*RS,Pf=24*mh,Lv=7*Pf,Dk=30*Pf;function rr(e){if(!Number.isFinite(e)||e<0)return"0m";if(e[x.id,x])),b=A.useCallback(async()=>{try{const x=await gie(e);a(x),i==null||i(x)}catch(x){$n.show({color:"red",message:x.message})}finally{l(!1)}},[e,i]);A.useEffect(()=>{b()},[b]),A.useEffect(()=>{p.current&&p.current.scrollTo({top:p.current.scrollHeight,behavior:"smooth"})},[r.length]);const w=async()=>{const x=f.trim();if(!(!x||h)){d(!0);try{const C=await yie(e,x),T=[...r,C];a(T),i==null||i(T),c("")}catch(C){$n.show({color:"red",message:C.message})}finally{d(!1)}}},k=async x=>{try{await bie(e,x);const C=r.filter(T=>T.id!==x);a(C),i==null||i(C)}catch(C){$n.show({color:"red",message:C.message})}},_=x=>{x.key==="Enter"&&!x.shiftKey&&(x.preventDefault(),w())};return y.jsxs(ft,{gap:"xs",style:{height:"100%",minHeight:0},children:[y.jsx(Ua,{viewportRef:p,style:{flex:1,minHeight:200},type:"auto",offsetScrollbars:!0,children:o?y.jsx(un,{justify:"center",p:"md",children:y.jsx(Fi,{size:"sm"})}):r.length===0?y.jsx(Ye,{size:"sm",c:"dimmed",ta:"center",p:"md",children:"Sin mensajes aun. Escribe el primero."}):y.jsx(ft,{gap:6,p:4,children:r.map(x=>{const C=x.author_id?v.get(x.author_id):null,T=x.author_id&&x.author_id===t,O=C?C.display_name||C.username:"Anonimo";return y.jsx(Ht,{withBorder:!0,p:"xs",radius:"sm",bg:T?"var(--mantine-color-blue-light)":void 0,children:y.jsxs(un,{gap:6,wrap:"nowrap",align:"flex-start",children:[y.jsx(ol,{size:22,radius:"xl",color:(C==null?void 0:C.color)||DS(O),children:O.slice(0,2).toUpperCase()}),y.jsxs(ye,{style:{flex:1,minWidth:0},children:[y.jsxs(un,{gap:6,wrap:"nowrap",justify:"space-between",children:[y.jsxs(un,{gap:6,wrap:"nowrap",children:[y.jsx(Ye,{size:"xs",fw:600,children:O}),y.jsx(Ye,{size:"xs",c:"dimmed",children:PS(x.created_at)})]}),T&&y.jsx(mi,{label:"Borrar",withArrow:!0,children:y.jsx(Ot,{size:"xs",variant:"subtle",color:"red",onClick:()=>k(x.id),children:y.jsx(vu,{size:12})})})]}),y.jsx(Ye,{size:"sm",style:{whiteSpace:"pre-wrap",wordBreak:"break-word"},children:x.body})]})]})},x.id)})})}),y.jsxs(un,{gap:"xs",align:"flex-end",children:[y.jsx(Kf,{value:f,onChange:x=>c(x.currentTarget.value),onKeyDown:_,placeholder:"Escribe un mensaje (Enter = enviar, Shift+Enter = salto)",autosize:!0,minRows:1,maxRows:6,style:{flex:1},disabled:h}),y.jsx(mi,{label:"Enviar",withArrow:!0,children:y.jsx(Ot,{size:"lg",variant:"filled",color:"blue",onClick:w,disabled:!f.trim()||h,"aria-label":"Enviar",children:y.jsx(HF,{size:16})})})]})]})}const Zj=/(https?:\/\/[^\s<>()"']+)/gi;function Rk(e,n){if(!n)return[];const t=[],i=new Set;let r;for(Zj.lastIndex=0;(r=Zj.exec(n))!==null;){let a=r[1];a=a.replace(/[.,;:!?)\]}>]+$/,""),!i.has(a)&&(i.add(a),t.push({url:a,source:e,context:n}))}return t}function Fse(e){try{return new URL(e).hostname}catch{return e}}function qse({card:e,messages:n}){const t=A.useMemo(()=>{const a=[...Rk("title",e.title),...Rk("description",e.description),...n.flatMap(l=>Rk("chat",l.body))],o=new Set;return a.filter(l=>o.has(l.url)?!1:(o.add(l.url),!0))},[e.title,e.description,n]);if(t.length===0)return y.jsxs(ft,{gap:"xs",p:"md",align:"center",justify:"center",style:{minHeight:200},children:[y.jsx(Ye,{size:"sm",c:"dimmed",children:"Sin enlaces detectados"}),y.jsx(Ye,{size:"xs",c:"dimmed",ta:"center",children:"Pega URLs en el titulo, descripcion o chat y apareceran aqui."})]});const i=a=>a==="title"?"grape":a==="description"?"blue":"teal",r=a=>a==="title"?"titulo":a==="description"?"descripcion":"chat";return y.jsx(ft,{gap:6,p:4,children:t.map(a=>y.jsx(Ht,{withBorder:!0,p:"xs",radius:"sm",children:y.jsxs(un,{gap:"xs",wrap:"nowrap",justify:"space-between",align:"flex-start",children:[y.jsxs(ye,{style:{flex:1,minWidth:0},children:[y.jsx(dy,{href:a.url,target:"_blank",rel:"noopener noreferrer",size:"sm",style:{wordBreak:"break-all"},children:y.jsxs(un,{gap:4,wrap:"nowrap",align:"center",children:[y.jsx(Hoe,{size:12}),y.jsx("span",{children:Fse(a.url)})]})}),y.jsx(Ye,{size:"xs",c:"dimmed",style:{wordBreak:"break-all"},children:a.url})]}),y.jsx(hi,{size:"xs",variant:"light",color:i(a.source),children:r(a.source)})]})},a.url))})}function Hse({card:e,users:n,currentUserId:t,requesterOptions:i,tagOptions:r,onSubmit:a,onCancel:o}){const[l,f]=A.useState([]),[c,h]=A.useState(e),d=async p=>{h(v=>({...v,title:p.title,description:p.description,requester:p.requester,tags:p.tags,assignee_id:p.assignee_id})),await a(p)};return y.jsxs(un,{align:"stretch",gap:"md",wrap:"nowrap",style:{minHeight:460},children:[y.jsx(ye,{style:{flex:"1 1 0",minWidth:320},children:y.jsx(UF,{users:n,requesterOptions:i,tagOptions:r,initial:{requester:c.requester,title:c.title,description:c.description,assignee_id:c.assignee_id,tags:c.tags||[]},submitLabel:"Guardar",onSubmit:d,onCancel:o})}),y.jsx(Um,{orientation:"vertical"}),y.jsx(ye,{style:{flex:"1 1 0",minWidth:320,display:"flex",flexDirection:"column"},children:y.jsxs(_i,{defaultValue:"chat",keepMounted:!1,style:{display:"flex",flexDirection:"column",flex:1,minHeight:0},children:[y.jsxs(_i.List,{children:[y.jsx(_i.Tab,{value:"chat",leftSection:y.jsx(ase,{size:14}),children:"Chat"}),y.jsx(_i.Tab,{value:"links",leftSection:y.jsx(Xoe,{size:14}),children:"Enlaces"}),y.jsx(_i.Tab,{value:"files",leftSection:y.jsx(fse,{size:14}),disabled:!0,children:"Archivos"})]}),y.jsxs(ye,{pt:"xs",style:{flex:1,minHeight:0,display:"flex",flexDirection:"column"},children:[y.jsx(_i.Panel,{value:"chat",style:{flex:1,minHeight:0,display:"flex"},children:y.jsx(ye,{style:{flex:1,minHeight:0,display:"flex",flexDirection:"column",width:"100%"},children:y.jsx(Bse,{cardId:c.id,users:n,currentUserId:t,onMessagesChange:f})})}),y.jsx(_i.Panel,{value:"links",children:y.jsx(qse,{card:c,messages:l})}),y.jsx(_i.Panel,{value:"files",children:y.jsx(Ye,{size:"sm",c:"dimmed",ta:"center",p:"md",children:"Proximamente: adjuntos de archivos."})})]})]})})]})}function Use(e,n){const t={};return(e[e.length-1]===""?[...e,""]:e).join((t.padRight?" ":"")+","+(t.padLeft===!1?"":" ")).trim()}const Vse=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Wse=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Gse={};function Qj(e,n){return(Gse.jsx?Wse:Vse).test(e)}const Yse=/[ \t\n\f\r]/g;function Kse(e){return typeof e=="object"?e.type==="text"?Jj(e.value):!1:Jj(e)}function Jj(e){return e.replace(Yse,"")===""}class tp{constructor(n,t,i){this.normal=t,this.property=n,i&&(this.space=i)}}tp.prototype.normal={};tp.prototype.property={};tp.prototype.space=void 0;function GF(e,n){const t={},i={};for(const r of e)Object.assign(t,r.property),Object.assign(i,r.normal);return new tp(t,i,n)}function NS(e){return e.toLowerCase()}class _r{constructor(n,t){this.attribute=t,this.property=n}}_r.prototype.attribute="";_r.prototype.booleanish=!1;_r.prototype.boolean=!1;_r.prototype.commaOrSpaceSeparated=!1;_r.prototype.commaSeparated=!1;_r.prototype.defined=!1;_r.prototype.mustUseProperty=!1;_r.prototype.number=!1;_r.prototype.overloadedBoolean=!1;_r.prototype.property="";_r.prototype.spaceSeparated=!1;_r.prototype.space=void 0;let Xse=0;const Fn=Ru(),ci=Ru(),$S=Ru(),qe=Ru(),Mt=Ru(),Ff=Ru(),$r=Ru();function Ru(){return 2**++Xse}const zS=Object.freeze(Object.defineProperty({__proto__:null,boolean:Fn,booleanish:ci,commaOrSpaceSeparated:$r,commaSeparated:Ff,number:qe,overloadedBoolean:$S,spaceSeparated:Mt},Symbol.toStringTag,{value:"Module"})),Pk=Object.keys(zS);class n9 extends _r{constructor(n,t,i,r){let a=-1;if(super(n,t),eM(this,"space",r),typeof i=="number")for(;++a4&&t.slice(0,4)==="data"&&nle.test(n)){if(n.charAt(4)==="-"){const a=n.slice(5).replace(nM,rle);i="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=n.slice(4);if(!nM.test(a)){let o=a.replace(ele,ile);o.charAt(0)!=="-"&&(o="-"+o),n="data"+o}}r=n9}return new r(i,n)}function ile(e){return"-"+e.toLowerCase()}function rle(e){return e.charAt(1).toUpperCase()}const ale=GF([YF,Zse,ZF,QF,JF],"html"),t9=GF([YF,Qse,ZF,QF,JF],"svg");function ole(e){return e.join(" ").trim()}var Cf={},Nk,tM;function sle(){if(tM)return Nk;tM=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,n=/\n/g,t=/^\s*/,i=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,r=/^:\s*/,a=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,o=/^[;\s]*/,l=/^\s+|\s+$/g,f=` -`,c="/",h="*",d="",p="comment",v="declaration";function b(k,_){if(typeof k!="string")throw new TypeError("First argument must be a string");if(!k)return[];_=_||{};var x=1,C=1;function T(U){var H=U.match(n);H&&(x+=H.length);var P=U.lastIndexOf(f);C=~P?U.length-P:C+U.length}function O(){var U={line:x,column:C};return function(H){return H.position=new E(U),F(),H}}function E(U){this.start=U,this.end={line:x,column:C},this.source=_.source}E.prototype.content=k;function M(U){var H=new Error(_.source+":"+x+":"+C+": "+U);if(H.reason=U,H.filename=_.source,H.line=x,H.column=C,H.source=k,!_.silent)throw H}function N(U){var H=U.exec(k);if(H){var P=H[0];return T(P),k=k.slice(P.length),H}}function F(){N(t)}function R(U){var H;for(U=U||[];H=L();)H!==!1&&U.push(H);return U}function L(){var U=O();if(!(c!=k.charAt(0)||h!=k.charAt(1))){for(var H=2;d!=k.charAt(H)&&(h!=k.charAt(H)||c!=k.charAt(H+1));)++H;if(H+=2,d===k.charAt(H-1))return M("End of comment missing");var P=k.slice(2,H-2);return C+=2,T(P),k=k.slice(H),C+=2,U({type:p,comment:P})}}function B(){var U=O(),H=N(i);if(H){if(L(),!N(r))return M("property missing ':'");var P=N(a),z=U({type:v,property:w(H[0].replace(e,d)),value:P?w(P[0].replace(e,d)):d});return N(o),z}}function G(){var U=[];R(U);for(var H;H=B();)H!==!1&&(U.push(H),R(U));return U}return F(),G()}function w(k){return k?k.replace(l,d):d}return Nk=b,Nk}var iM;function lle(){if(iM)return Cf;iM=1;var e=Cf&&Cf.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(Cf,"__esModule",{value:!0}),Cf.default=t;const n=e(sle());function t(i,r){let a=null;if(!i||typeof i!="string")return a;const o=(0,n.default)(i),l=typeof r=="function";return o.forEach(f=>{if(f.type!=="declaration")return;const{property:c,value:h}=f;l?r(c,h,f):h&&(a=a||{},a[c]=h)}),a}return Cf}var Gd={},rM;function ule(){if(rM)return Gd;rM=1,Object.defineProperty(Gd,"__esModule",{value:!0}),Gd.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,n=/-([a-z])/g,t=/^[^-]+$/,i=/^-(webkit|moz|ms|o|khtml)-/,r=/^-(ms)-/,a=function(c){return!c||t.test(c)||e.test(c)},o=function(c,h){return h.toUpperCase()},l=function(c,h){return"".concat(h,"-")},f=function(c,h){return h===void 0&&(h={}),a(c)?c:(c=c.toLowerCase(),h.reactCompat?c=c.replace(r,l):c=c.replace(i,l),c.replace(n,o))};return Gd.camelCase=f,Gd}var Yd,aM;function fle(){if(aM)return Yd;aM=1;var e=Yd&&Yd.__importDefault||function(r){return r&&r.__esModule?r:{default:r}},n=e(lle()),t=ule();function i(r,a){var o={};return!r||typeof r!="string"||(0,n.default)(r,function(l,f){l&&f&&(o[(0,t.camelCase)(l,a)]=f)}),o}return i.default=i,Yd=i,Yd}var cle=fle();const dle=dt(cle),eq=nq("end"),i9=nq("start");function nq(e){return n;function n(t){const i=t&&t.position&&t.position[e]||{};if(typeof i.line=="number"&&i.line>0&&typeof i.column=="number"&&i.column>0)return{line:i.line,column:i.column,offset:typeof i.offset=="number"&&i.offset>-1?i.offset:void 0}}}function hle(e){const n=i9(e),t=eq(e);if(n&&t)return{start:n,end:t}}function Sh(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?oM(e.position):"start"in e||"end"in e?oM(e):"line"in e||"column"in e?LS(e):""}function LS(e){return sM(e&&e.line)+":"+sM(e&&e.column)}function oM(e){return LS(e&&e.start)+"-"+LS(e&&e.end)}function sM(e){return e&&typeof e=="number"?e:1}class Ji extends Error{constructor(n,t,i){super(),typeof t=="string"&&(i=t,t=void 0);let r="",a={},o=!1;if(t&&("line"in t&&"column"in t?a={place:t}:"start"in t&&"end"in t?a={place:t}:"type"in t?a={ancestors:[t],place:t.position}:a={...t}),typeof n=="string"?r=n:!a.cause&&n&&(o=!0,r=n.message,a.cause=n),!a.ruleId&&!a.source&&typeof i=="string"){const f=i.indexOf(":");f===-1?a.ruleId=i:(a.source=i.slice(0,f),a.ruleId=i.slice(f+1))}if(!a.place&&a.ancestors&&a.ancestors){const f=a.ancestors[a.ancestors.length-1];f&&(a.place=f.position)}const l=a.place&&"start"in a.place?a.place.start:a.place;this.ancestors=a.ancestors||void 0,this.cause=a.cause||void 0,this.column=l?l.column:void 0,this.fatal=void 0,this.file="",this.message=r,this.line=l?l.line:void 0,this.name=Sh(a.place)||"1:1",this.place=a.place||void 0,this.reason=this.message,this.ruleId=a.ruleId||void 0,this.source=a.source||void 0,this.stack=o&&a.cause&&typeof a.cause.stack=="string"?a.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}Ji.prototype.file="";Ji.prototype.name="";Ji.prototype.reason="";Ji.prototype.message="";Ji.prototype.stack="";Ji.prototype.column=void 0;Ji.prototype.line=void 0;Ji.prototype.ancestors=void 0;Ji.prototype.cause=void 0;Ji.prototype.fatal=void 0;Ji.prototype.place=void 0;Ji.prototype.ruleId=void 0;Ji.prototype.source=void 0;const r9={}.hasOwnProperty,mle=new Map,ple=/[A-Z]/g,vle=new Set(["table","tbody","thead","tfoot","tr"]),gle=new Set(["td","th"]),tq="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function yle(e,n){if(!n||n.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const t=n.filePath||void 0;let i;if(n.development){if(typeof n.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");i=Ale(t,n.jsxDEV)}else{if(typeof n.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof n.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");i=Cle(t,n.jsx,n.jsxs)}const r={Fragment:n.Fragment,ancestors:[],components:n.components||{},create:i,elementAttributeNameCase:n.elementAttributeNameCase||"react",evaluater:n.createEvaluater?n.createEvaluater():void 0,filePath:t,ignoreInvalidStyle:n.ignoreInvalidStyle||!1,passKeys:n.passKeys!==!1,passNode:n.passNode||!1,schema:n.space==="svg"?t9:ale,stylePropertyNameCase:n.stylePropertyNameCase||"dom",tableCellAlignToStyle:n.tableCellAlignToStyle!==!1},a=iq(r,e,void 0);return a&&typeof a!="string"?a:r.create(e,r.Fragment,{children:a||void 0},void 0)}function iq(e,n,t){if(n.type==="element")return ble(e,n,t);if(n.type==="mdxFlowExpression"||n.type==="mdxTextExpression")return wle(e,n);if(n.type==="mdxJsxFlowElement"||n.type==="mdxJsxTextElement")return _le(e,n,t);if(n.type==="mdxjsEsm")return kle(e,n);if(n.type==="root")return xle(e,n,t);if(n.type==="text")return Sle(e,n)}function ble(e,n,t){const i=e.schema;let r=i;n.tagName.toLowerCase()==="svg"&&i.space==="html"&&(r=t9,e.schema=r),e.ancestors.push(n);const a=aq(e,n.tagName,!1),o=Ole(e,n);let l=o9(e,n);return vle.has(n.tagName)&&(l=l.filter(function(f){return typeof f=="string"?!Kse(f):!0})),rq(e,o,a,n),a9(o,l),e.ancestors.pop(),e.schema=i,e.create(n,a,o,t)}function wle(e,n){if(n.data&&n.data.estree&&e.evaluater){const i=n.data.estree.body[0];return i.type,e.evaluater.evaluateExpression(i.expression)}Yh(e,n.position)}function kle(e,n){if(n.data&&n.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(n.data.estree);Yh(e,n.position)}function _le(e,n,t){const i=e.schema;let r=i;n.name==="svg"&&i.space==="html"&&(r=t9,e.schema=r),e.ancestors.push(n);const a=n.name===null?e.Fragment:aq(e,n.name,!0),o=Ele(e,n),l=o9(e,n);return rq(e,o,a,n),a9(o,l),e.ancestors.pop(),e.schema=i,e.create(n,a,o,t)}function xle(e,n,t){const i={};return a9(i,o9(e,n)),e.create(n,e.Fragment,i,t)}function Sle(e,n){return n.value}function rq(e,n,t,i){typeof t!="string"&&t!==e.Fragment&&e.passNode&&(n.node=i)}function a9(e,n){if(n.length>0){const t=n.length>1?n:n[0];t&&(e.children=t)}}function Cle(e,n,t){return i;function i(r,a,o,l){const c=Array.isArray(o.children)?t:n;return l?c(a,o,l):c(a,o)}}function Ale(e,n){return t;function t(i,r,a,o){const l=Array.isArray(a.children),f=i9(i);return n(r,a,o,l,{columnNumber:f?f.column-1:void 0,fileName:e,lineNumber:f?f.line:void 0},void 0)}}function Ole(e,n){const t={};let i,r;for(r in n.properties)if(r!=="children"&&r9.call(n.properties,r)){const a=Tle(e,r,n.properties[r]);if(a){const[o,l]=a;e.tableCellAlignToStyle&&o==="align"&&typeof l=="string"&&gle.has(n.tagName)?i=l:t[o]=l}}if(i){const a=t.style||(t.style={});a[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=i}return t}function Ele(e,n){const t={};for(const i of n.attributes)if(i.type==="mdxJsxExpressionAttribute")if(i.data&&i.data.estree&&e.evaluater){const a=i.data.estree.body[0];a.type;const o=a.expression;o.type;const l=o.properties[0];l.type,Object.assign(t,e.evaluater.evaluateExpression(l.argument))}else Yh(e,n.position);else{const r=i.name;let a;if(i.value&&typeof i.value=="object")if(i.value.data&&i.value.data.estree&&e.evaluater){const l=i.value.data.estree.body[0];l.type,a=e.evaluater.evaluateExpression(l.expression)}else Yh(e,n.position);else a=i.value===null?!0:i.value;t[r]=a}return t}function o9(e,n){const t=[];let i=-1;const r=e.passKeys?new Map:mle;for(;++ir?0:r+n:n=n>r?r:n,t=t>0?t:0,i.length<1e4)o=Array.from(i),o.unshift(n,t),e.splice(...o);else for(t&&e.splice(n,t);a0?(Hr(e,e.length,0,n),e):n}const fM={}.hasOwnProperty;function sq(e){const n={};let t=-1;for(;++t13&&t<32||t>126&&t<160||t>55295&&t<57344||t>64975&&t<65008||(t&65535)===65535||(t&65535)===65534||t>1114111?"�":String.fromCodePoint(t)}function Ia(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const ar=ml(/[A-Za-z]/),Zi=ml(/[\dA-Za-z]/),Lle=ml(/[#-'*+\--9=?A-Z^-~]/);function Ig(e){return e!==null&&(e<32||e===127)}const IS=ml(/\d/),Ile=ml(/[\dA-Fa-f]/),Ble=ml(/[!-/:-@[-`{-~]/);function bn(e){return e!==null&&e<-2}function jt(e){return e!==null&&(e<0||e===32)}function Xn(e){return e===-2||e===-1||e===32}const a0=ml(new RegExp("\\p{P}|\\p{S}","u")),gu=ml(/\s/);function ml(e){return n;function n(t){return t!==null&&t>-1&&e.test(String.fromCharCode(t))}}function Hc(e){const n=[];let t=-1,i=0,r=0;for(;++t55295&&a<57344){const l=e.charCodeAt(t+1);a<56320&&l>56319&&l<57344?(o=String.fromCharCode(a,l),r=1):o="�"}else o=String.fromCharCode(a);o&&(n.push(e.slice(i,t),encodeURIComponent(o)),i=t+r+1,o=""),r&&(t+=r,r=0)}return n.join("")+e.slice(i)}function it(e,n,t,i){const r=i?i-1:Number.POSITIVE_INFINITY;let a=0;return o;function o(f){return Xn(f)?(e.enter(t),l(f)):n(f)}function l(f){return Xn(f)&&a++o))return;const M=n.events.length;let N=M,F,R;for(;N--;)if(n.events[N][0]==="exit"&&n.events[N][1].type==="chunkFlow"){if(F){R=n.events[N][1].end;break}F=!0}for(_(i),E=M;EC;){const O=t[T];n.containerState=O[1],O[0].exit.call(n,e)}t.length=C}function x(){r.write([null]),a=void 0,r=void 0,n.containerState._closeFlow=void 0}}function Vle(e,n,t){return it(e,e.attempt(this.parser.constructs.document,n,t),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Qf(e){if(e===null||jt(e)||gu(e))return 1;if(a0(e))return 2}function o0(e,n,t){const i=[];let r=-1;for(;++r1&&e[t][1].end.offset-e[t][1].start.offset>1?2:1;const d={...e[i][1].end},p={...e[t][1].start};dM(d,-f),dM(p,f),o={type:f>1?"strongSequence":"emphasisSequence",start:d,end:{...e[i][1].end}},l={type:f>1?"strongSequence":"emphasisSequence",start:{...e[t][1].start},end:p},a={type:f>1?"strongText":"emphasisText",start:{...e[i][1].end},end:{...e[t][1].start}},r={type:f>1?"strong":"emphasis",start:{...o.start},end:{...l.end}},e[i][1].end={...o.start},e[t][1].start={...l.end},c=[],e[i][1].end.offset-e[i][1].start.offset&&(c=da(c,[["enter",e[i][1],n],["exit",e[i][1],n]])),c=da(c,[["enter",r,n],["enter",o,n],["exit",o,n],["enter",a,n]]),c=da(c,o0(n.parser.constructs.insideSpan.null,e.slice(i+1,t),n)),c=da(c,[["exit",a,n],["enter",l,n],["exit",l,n],["exit",r,n]]),e[t][1].end.offset-e[t][1].start.offset?(h=2,c=da(c,[["enter",e[t][1],n],["exit",e[t][1],n]])):h=0,Hr(e,i-1,t-i+3,c),t=i+c.length-h-2;break}}for(t=-1;++t0&&Xn(E)?it(e,x,"linePrefix",a+1)(E):x(E)}function x(E){return E===null||bn(E)?e.check(hM,w,T)(E):(e.enter("codeFlowValue"),C(E))}function C(E){return E===null||bn(E)?(e.exit("codeFlowValue"),x(E)):(e.consume(E),C)}function T(E){return e.exit("codeFenced"),n(E)}function O(E,M,N){let F=0;return R;function R(H){return E.enter("lineEnding"),E.consume(H),E.exit("lineEnding"),L}function L(H){return E.enter("codeFencedFence"),Xn(H)?it(E,B,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(H):B(H)}function B(H){return H===l?(E.enter("codeFencedFenceSequence"),G(H)):N(H)}function G(H){return H===l?(F++,E.consume(H),G):F>=o?(E.exit("codeFencedFenceSequence"),Xn(H)?it(E,U,"whitespace")(H):U(H)):N(H)}function U(H){return H===null||bn(H)?(E.exit("codeFencedFence"),M(H)):N(H)}}}function iue(e,n,t){const i=this;return r;function r(o){return o===null?t(o):(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),a)}function a(o){return i.parser.lazy[i.now().line]?t(o):n(o)}}const zk={name:"codeIndented",tokenize:aue},rue={partial:!0,tokenize:oue};function aue(e,n,t){const i=this;return r;function r(c){return e.enter("codeIndented"),it(e,a,"linePrefix",5)(c)}function a(c){const h=i.events[i.events.length-1];return h&&h[1].type==="linePrefix"&&h[2].sliceSerialize(h[1],!0).length>=4?o(c):t(c)}function o(c){return c===null?f(c):bn(c)?e.attempt(rue,o,f)(c):(e.enter("codeFlowValue"),l(c))}function l(c){return c===null||bn(c)?(e.exit("codeFlowValue"),o(c)):(e.consume(c),l)}function f(c){return e.exit("codeIndented"),n(c)}}function oue(e,n,t){const i=this;return r;function r(o){return i.parser.lazy[i.now().line]?t(o):bn(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),r):it(e,a,"linePrefix",5)(o)}function a(o){const l=i.events[i.events.length-1];return l&&l[1].type==="linePrefix"&&l[2].sliceSerialize(l[1],!0).length>=4?n(o):bn(o)?r(o):t(o)}}const sue={name:"codeText",previous:uue,resolve:lue,tokenize:fue};function lue(e){let n=e.length-4,t=3,i,r;if((e[t][1].type==="lineEnding"||e[t][1].type==="space")&&(e[n][1].type==="lineEnding"||e[n][1].type==="space")){for(i=t;++i=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+n+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return nthis.left.length?this.right.slice(this.right.length-i+this.left.length,this.right.length-n+this.left.length).reverse():this.left.slice(n).concat(this.right.slice(this.right.length-i+this.left.length).reverse())}splice(n,t,i){const r=t||0;this.setCursor(Math.trunc(n));const a=this.right.splice(this.right.length-r,Number.POSITIVE_INFINITY);return i&&Kd(this.left,i),a.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(n){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(n)}pushMany(n){this.setCursor(Number.POSITIVE_INFINITY),Kd(this.left,n)}unshift(n){this.setCursor(0),this.right.push(n)}unshiftMany(n){this.setCursor(0),Kd(this.right,n.reverse())}setCursor(n){if(!(n===this.left.length||n>this.left.length&&this.right.length===0||n<0&&this.left.length===0))if(n=4?n(o):e.interrupt(i.parser.constructs.flow,t,n)(o)}}function hq(e,n,t,i,r,a,o,l,f){const c=f||Number.POSITIVE_INFINITY;let h=0;return d;function d(_){return _===60?(e.enter(i),e.enter(r),e.enter(a),e.consume(_),e.exit(a),p):_===null||_===32||_===41||Ig(_)?t(_):(e.enter(i),e.enter(o),e.enter(l),e.enter("chunkString",{contentType:"string"}),w(_))}function p(_){return _===62?(e.enter(a),e.consume(_),e.exit(a),e.exit(r),e.exit(i),n):(e.enter(l),e.enter("chunkString",{contentType:"string"}),v(_))}function v(_){return _===62?(e.exit("chunkString"),e.exit(l),p(_)):_===null||_===60||bn(_)?t(_):(e.consume(_),_===92?b:v)}function b(_){return _===60||_===62||_===92?(e.consume(_),v):v(_)}function w(_){return!h&&(_===null||_===41||jt(_))?(e.exit("chunkString"),e.exit(l),e.exit(o),e.exit(i),n(_)):h999||v===null||v===91||v===93&&!f||v===94&&!l&&"_hiddenFootnoteSupport"in o.parser.constructs?t(v):v===93?(e.exit(a),e.enter(r),e.consume(v),e.exit(r),e.exit(i),n):bn(v)?(e.enter("lineEnding"),e.consume(v),e.exit("lineEnding"),h):(e.enter("chunkString",{contentType:"string"}),d(v))}function d(v){return v===null||v===91||v===93||bn(v)||l++>999?(e.exit("chunkString"),h(v)):(e.consume(v),f||(f=!Xn(v)),v===92?p:d)}function p(v){return v===91||v===92||v===93?(e.consume(v),l++,d):d(v)}}function pq(e,n,t,i,r,a){let o;return l;function l(p){return p===34||p===39||p===40?(e.enter(i),e.enter(r),e.consume(p),e.exit(r),o=p===40?41:p,f):t(p)}function f(p){return p===o?(e.enter(r),e.consume(p),e.exit(r),e.exit(i),n):(e.enter(a),c(p))}function c(p){return p===o?(e.exit(a),f(o)):p===null?t(p):bn(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),it(e,c,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),h(p))}function h(p){return p===o||p===null||bn(p)?(e.exit("chunkString"),c(p)):(e.consume(p),p===92?d:h)}function d(p){return p===o||p===92?(e.consume(p),h):h(p)}}function Ch(e,n){let t;return i;function i(r){return bn(r)?(e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),t=!0,i):Xn(r)?it(e,i,t?"linePrefix":"lineSuffix")(r):n(r)}}const yue={name:"definition",tokenize:wue},bue={partial:!0,tokenize:kue};function wue(e,n,t){const i=this;let r;return a;function a(v){return e.enter("definition"),o(v)}function o(v){return mq.call(i,e,l,t,"definitionLabel","definitionLabelMarker","definitionLabelString")(v)}function l(v){return r=Ia(i.sliceSerialize(i.events[i.events.length-1][1]).slice(1,-1)),v===58?(e.enter("definitionMarker"),e.consume(v),e.exit("definitionMarker"),f):t(v)}function f(v){return jt(v)?Ch(e,c)(v):c(v)}function c(v){return hq(e,h,t,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(v)}function h(v){return e.attempt(bue,d,d)(v)}function d(v){return Xn(v)?it(e,p,"whitespace")(v):p(v)}function p(v){return v===null||bn(v)?(e.exit("definition"),i.parser.defined.push(r),n(v)):t(v)}}function kue(e,n,t){return i;function i(l){return jt(l)?Ch(e,r)(l):t(l)}function r(l){return pq(e,a,t,"definitionTitle","definitionTitleMarker","definitionTitleString")(l)}function a(l){return Xn(l)?it(e,o,"whitespace")(l):o(l)}function o(l){return l===null||bn(l)?n(l):t(l)}}const _ue={name:"hardBreakEscape",tokenize:xue};function xue(e,n,t){return i;function i(a){return e.enter("hardBreakEscape"),e.consume(a),r}function r(a){return bn(a)?(e.exit("hardBreakEscape"),n(a)):t(a)}}const Sue={name:"headingAtx",resolve:Cue,tokenize:Aue};function Cue(e,n){let t=e.length-2,i=3,r,a;return e[i][1].type==="whitespace"&&(i+=2),t-2>i&&e[t][1].type==="whitespace"&&(t-=2),e[t][1].type==="atxHeadingSequence"&&(i===t-1||t-4>i&&e[t-2][1].type==="whitespace")&&(t-=i+1===t?2:4),t>i&&(r={type:"atxHeadingText",start:e[i][1].start,end:e[t][1].end},a={type:"chunkText",start:e[i][1].start,end:e[t][1].end,contentType:"text"},Hr(e,i,t-i+1,[["enter",r,n],["enter",a,n],["exit",a,n],["exit",r,n]])),e}function Aue(e,n,t){let i=0;return r;function r(h){return e.enter("atxHeading"),a(h)}function a(h){return e.enter("atxHeadingSequence"),o(h)}function o(h){return h===35&&i++<6?(e.consume(h),o):h===null||jt(h)?(e.exit("atxHeadingSequence"),l(h)):t(h)}function l(h){return h===35?(e.enter("atxHeadingSequence"),f(h)):h===null||bn(h)?(e.exit("atxHeading"),n(h)):Xn(h)?it(e,l,"whitespace")(h):(e.enter("atxHeadingText"),c(h))}function f(h){return h===35?(e.consume(h),f):(e.exit("atxHeadingSequence"),l(h))}function c(h){return h===null||h===35||jt(h)?(e.exit("atxHeadingText"),l(h)):(e.consume(h),c)}}const Oue=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],pM=["pre","script","style","textarea"],Eue={concrete:!0,name:"htmlFlow",resolveTo:Mue,tokenize:Due},Tue={partial:!0,tokenize:Pue},jue={partial:!0,tokenize:Rue};function Mue(e){let n=e.length;for(;n--&&!(e[n][0]==="enter"&&e[n][1].type==="htmlFlow"););return n>1&&e[n-2][1].type==="linePrefix"&&(e[n][1].start=e[n-2][1].start,e[n+1][1].start=e[n-2][1].start,e.splice(n-2,2)),e}function Due(e,n,t){const i=this;let r,a,o,l,f;return c;function c($){return h($)}function h($){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume($),d}function d($){return $===33?(e.consume($),p):$===47?(e.consume($),a=!0,w):$===63?(e.consume($),r=3,i.interrupt?n:D):ar($)?(e.consume($),o=String.fromCharCode($),k):t($)}function p($){return $===45?(e.consume($),r=2,v):$===91?(e.consume($),r=5,l=0,b):ar($)?(e.consume($),r=4,i.interrupt?n:D):t($)}function v($){return $===45?(e.consume($),i.interrupt?n:D):t($)}function b($){const X="CDATA[";return $===X.charCodeAt(l++)?(e.consume($),l===X.length?i.interrupt?n:B:b):t($)}function w($){return ar($)?(e.consume($),o=String.fromCharCode($),k):t($)}function k($){if($===null||$===47||$===62||jt($)){const X=$===47,ee=o.toLowerCase();return!X&&!a&&pM.includes(ee)?(r=1,i.interrupt?n($):B($)):Oue.includes(o.toLowerCase())?(r=6,X?(e.consume($),_):i.interrupt?n($):B($)):(r=7,i.interrupt&&!i.parser.lazy[i.now().line]?t($):a?x($):C($))}return $===45||Zi($)?(e.consume($),o+=String.fromCharCode($),k):t($)}function _($){return $===62?(e.consume($),i.interrupt?n:B):t($)}function x($){return Xn($)?(e.consume($),x):R($)}function C($){return $===47?(e.consume($),R):$===58||$===95||ar($)?(e.consume($),T):Xn($)?(e.consume($),C):R($)}function T($){return $===45||$===46||$===58||$===95||Zi($)?(e.consume($),T):O($)}function O($){return $===61?(e.consume($),E):Xn($)?(e.consume($),O):C($)}function E($){return $===null||$===60||$===61||$===62||$===96?t($):$===34||$===39?(e.consume($),f=$,M):Xn($)?(e.consume($),E):N($)}function M($){return $===f?(e.consume($),f=null,F):$===null||bn($)?t($):(e.consume($),M)}function N($){return $===null||$===34||$===39||$===47||$===60||$===61||$===62||$===96||jt($)?O($):(e.consume($),N)}function F($){return $===47||$===62||Xn($)?C($):t($)}function R($){return $===62?(e.consume($),L):t($)}function L($){return $===null||bn($)?B($):Xn($)?(e.consume($),L):t($)}function B($){return $===45&&r===2?(e.consume($),P):$===60&&r===1?(e.consume($),z):$===62&&r===4?(e.consume($),V):$===63&&r===3?(e.consume($),D):$===93&&r===5?(e.consume($),Y):bn($)&&(r===6||r===7)?(e.exit("htmlFlowData"),e.check(Tue,W,G)($)):$===null||bn($)?(e.exit("htmlFlowData"),G($)):(e.consume($),B)}function G($){return e.check(jue,U,W)($)}function U($){return e.enter("lineEnding"),e.consume($),e.exit("lineEnding"),H}function H($){return $===null||bn($)?G($):(e.enter("htmlFlowData"),B($))}function P($){return $===45?(e.consume($),D):B($)}function z($){return $===47?(e.consume($),o="",q):B($)}function q($){if($===62){const X=o.toLowerCase();return pM.includes(X)?(e.consume($),V):B($)}return ar($)&&o.length<8?(e.consume($),o+=String.fromCharCode($),q):B($)}function Y($){return $===93?(e.consume($),D):B($)}function D($){return $===62?(e.consume($),V):$===45&&r===2?(e.consume($),D):B($)}function V($){return $===null||bn($)?(e.exit("htmlFlowData"),W($)):(e.consume($),V)}function W($){return e.exit("htmlFlow"),n($)}}function Rue(e,n,t){const i=this;return r;function r(o){return bn(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),a):t(o)}function a(o){return i.parser.lazy[i.now().line]?t(o):n(o)}}function Pue(e,n,t){return i;function i(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),e.attempt(ip,n,t)}}const Nue={name:"htmlText",tokenize:$ue};function $ue(e,n,t){const i=this;let r,a,o;return l;function l(D){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(D),f}function f(D){return D===33?(e.consume(D),c):D===47?(e.consume(D),O):D===63?(e.consume(D),C):ar(D)?(e.consume(D),N):t(D)}function c(D){return D===45?(e.consume(D),h):D===91?(e.consume(D),a=0,b):ar(D)?(e.consume(D),x):t(D)}function h(D){return D===45?(e.consume(D),v):t(D)}function d(D){return D===null?t(D):D===45?(e.consume(D),p):bn(D)?(o=d,z(D)):(e.consume(D),d)}function p(D){return D===45?(e.consume(D),v):d(D)}function v(D){return D===62?P(D):D===45?p(D):d(D)}function b(D){const V="CDATA[";return D===V.charCodeAt(a++)?(e.consume(D),a===V.length?w:b):t(D)}function w(D){return D===null?t(D):D===93?(e.consume(D),k):bn(D)?(o=w,z(D)):(e.consume(D),w)}function k(D){return D===93?(e.consume(D),_):w(D)}function _(D){return D===62?P(D):D===93?(e.consume(D),_):w(D)}function x(D){return D===null||D===62?P(D):bn(D)?(o=x,z(D)):(e.consume(D),x)}function C(D){return D===null?t(D):D===63?(e.consume(D),T):bn(D)?(o=C,z(D)):(e.consume(D),C)}function T(D){return D===62?P(D):C(D)}function O(D){return ar(D)?(e.consume(D),E):t(D)}function E(D){return D===45||Zi(D)?(e.consume(D),E):M(D)}function M(D){return bn(D)?(o=M,z(D)):Xn(D)?(e.consume(D),M):P(D)}function N(D){return D===45||Zi(D)?(e.consume(D),N):D===47||D===62||jt(D)?F(D):t(D)}function F(D){return D===47?(e.consume(D),P):D===58||D===95||ar(D)?(e.consume(D),R):bn(D)?(o=F,z(D)):Xn(D)?(e.consume(D),F):P(D)}function R(D){return D===45||D===46||D===58||D===95||Zi(D)?(e.consume(D),R):L(D)}function L(D){return D===61?(e.consume(D),B):bn(D)?(o=L,z(D)):Xn(D)?(e.consume(D),L):F(D)}function B(D){return D===null||D===60||D===61||D===62||D===96?t(D):D===34||D===39?(e.consume(D),r=D,G):bn(D)?(o=B,z(D)):Xn(D)?(e.consume(D),B):(e.consume(D),U)}function G(D){return D===r?(e.consume(D),r=void 0,H):D===null?t(D):bn(D)?(o=G,z(D)):(e.consume(D),G)}function U(D){return D===null||D===34||D===39||D===60||D===61||D===96?t(D):D===47||D===62||jt(D)?F(D):(e.consume(D),U)}function H(D){return D===47||D===62||jt(D)?F(D):t(D)}function P(D){return D===62?(e.consume(D),e.exit("htmlTextData"),e.exit("htmlText"),n):t(D)}function z(D){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(D),e.exit("lineEnding"),q}function q(D){return Xn(D)?it(e,Y,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(D):Y(D)}function Y(D){return e.enter("htmlTextData"),o(D)}}const u9={name:"labelEnd",resolveAll:Bue,resolveTo:Fue,tokenize:que},zue={tokenize:Hue},Lue={tokenize:Uue},Iue={tokenize:Vue};function Bue(e){let n=-1;const t=[];for(;++n=3&&(c===null||bn(c))?(e.exit("thematicBreak"),n(c)):t(c)}function f(c){return c===r?(e.consume(c),i++,f):(e.exit("thematicBreakSequence"),Xn(c)?it(e,l,"whitespace")(c):l(c))}}const gr={continuation:{tokenize:nfe},exit:ife,name:"list",tokenize:efe},Que={partial:!0,tokenize:rfe},Jue={partial:!0,tokenize:tfe};function efe(e,n,t){const i=this,r=i.events[i.events.length-1];let a=r&&r[1].type==="linePrefix"?r[2].sliceSerialize(r[1],!0).length:0,o=0;return l;function l(v){const b=i.containerState.type||(v===42||v===43||v===45?"listUnordered":"listOrdered");if(b==="listUnordered"?!i.containerState.marker||v===i.containerState.marker:IS(v)){if(i.containerState.type||(i.containerState.type=b,e.enter(b,{_container:!0})),b==="listUnordered")return e.enter("listItemPrefix"),v===42||v===45?e.check(gg,t,c)(v):c(v);if(!i.interrupt||v===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),f(v)}return t(v)}function f(v){return IS(v)&&++o<10?(e.consume(v),f):(!i.interrupt||o<2)&&(i.containerState.marker?v===i.containerState.marker:v===41||v===46)?(e.exit("listItemValue"),c(v)):t(v)}function c(v){return e.enter("listItemMarker"),e.consume(v),e.exit("listItemMarker"),i.containerState.marker=i.containerState.marker||v,e.check(ip,i.interrupt?t:h,e.attempt(Que,p,d))}function h(v){return i.containerState.initialBlankLine=!0,a++,p(v)}function d(v){return Xn(v)?(e.enter("listItemPrefixWhitespace"),e.consume(v),e.exit("listItemPrefixWhitespace"),p):t(v)}function p(v){return i.containerState.size=a+i.sliceSerialize(e.exit("listItemPrefix"),!0).length,n(v)}}function nfe(e,n,t){const i=this;return i.containerState._closeFlow=void 0,e.check(ip,r,a);function r(l){return i.containerState.furtherBlankLines=i.containerState.furtherBlankLines||i.containerState.initialBlankLine,it(e,n,"listItemIndent",i.containerState.size+1)(l)}function a(l){return i.containerState.furtherBlankLines||!Xn(l)?(i.containerState.furtherBlankLines=void 0,i.containerState.initialBlankLine=void 0,o(l)):(i.containerState.furtherBlankLines=void 0,i.containerState.initialBlankLine=void 0,e.attempt(Jue,n,o)(l))}function o(l){return i.containerState._closeFlow=!0,i.interrupt=void 0,it(e,e.attempt(gr,n,t),"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(l)}}function tfe(e,n,t){const i=this;return it(e,r,"listItemIndent",i.containerState.size+1);function r(a){const o=i.events[i.events.length-1];return o&&o[1].type==="listItemIndent"&&o[2].sliceSerialize(o[1],!0).length===i.containerState.size?n(a):t(a)}}function ife(e){e.exit(this.containerState.type)}function rfe(e,n,t){const i=this;return it(e,r,"listItemPrefixWhitespace",i.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function r(a){const o=i.events[i.events.length-1];return!Xn(a)&&o&&o[1].type==="listItemPrefixWhitespace"?n(a):t(a)}}const vM={name:"setextUnderline",resolveTo:afe,tokenize:ofe};function afe(e,n){let t=e.length,i,r,a;for(;t--;)if(e[t][0]==="enter"){if(e[t][1].type==="content"){i=t;break}e[t][1].type==="paragraph"&&(r=t)}else e[t][1].type==="content"&&e.splice(t,1),!a&&e[t][1].type==="definition"&&(a=t);const o={type:"setextHeading",start:{...e[i][1].start},end:{...e[e.length-1][1].end}};return e[r][1].type="setextHeadingText",a?(e.splice(r,0,["enter",o,n]),e.splice(a+1,0,["exit",e[i][1],n]),e[i][1].end={...e[a][1].end}):e[i][1]=o,e.push(["exit",o,n]),e}function ofe(e,n,t){const i=this;let r;return a;function a(c){let h=i.events.length,d;for(;h--;)if(i.events[h][1].type!=="lineEnding"&&i.events[h][1].type!=="linePrefix"&&i.events[h][1].type!=="content"){d=i.events[h][1].type==="paragraph";break}return!i.parser.lazy[i.now().line]&&(i.interrupt||d)?(e.enter("setextHeadingLine"),r=c,o(c)):t(c)}function o(c){return e.enter("setextHeadingLineSequence"),l(c)}function l(c){return c===r?(e.consume(c),l):(e.exit("setextHeadingLineSequence"),Xn(c)?it(e,f,"lineSuffix")(c):f(c))}function f(c){return c===null||bn(c)?(e.exit("setextHeadingLine"),n(c)):t(c)}}const sfe={tokenize:lfe};function lfe(e){const n=this,t=e.attempt(ip,i,e.attempt(this.parser.constructs.flowInitial,r,it(e,e.attempt(this.parser.constructs.flow,r,e.attempt(hue,r)),"linePrefix")));return t;function i(a){if(a===null){e.consume(a);return}return e.enter("lineEndingBlank"),e.consume(a),e.exit("lineEndingBlank"),n.currentConstruct=void 0,t}function r(a){if(a===null){e.consume(a);return}return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),n.currentConstruct=void 0,t}}const ufe={resolveAll:gq()},ffe=vq("string"),cfe=vq("text");function vq(e){return{resolveAll:gq(e==="text"?dfe:void 0),tokenize:n};function n(t){const i=this,r=this.parser.constructs[e],a=t.attempt(r,o,l);return o;function o(h){return c(h)?a(h):l(h)}function l(h){if(h===null){t.consume(h);return}return t.enter("data"),t.consume(h),f}function f(h){return c(h)?(t.exit("data"),a(h)):(t.consume(h),f)}function c(h){if(h===null)return!0;const d=r[h];let p=-1;if(d)for(;++p-1){const l=o[0];typeof l=="string"?o[0]=l.slice(i):o.shift()}a>0&&o.push(e[r].slice(0,a))}return o}function Cfe(e,n){let t=-1;const i=[];let r;for(;++t0){const nn=We.tokenStack[We.tokenStack.length-1];(nn[1]||yM).call(We,void 0,nn[0])}for(me.position={start:Bs(ie.length>0?ie[0][1].start:{line:1,column:1,offset:0}),end:Bs(ie.length>0?ie[ie.length-2][1].end:{line:1,column:1,offset:0})},Se=-1;++Se0&&(i.className=["language-"+r[0]]);let a={type:"element",tagName:"code",properties:i,children:[{type:"text",value:t}]};return n.meta&&(a.data={meta:n.meta}),e.patch(n,a),a=e.applyData(n,a),a={type:"element",tagName:"pre",properties:{},children:[a]},e.patch(n,a),a}function Ife(e,n){const t={type:"element",tagName:"del",properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)}function Bfe(e,n){const t={type:"element",tagName:"em",properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)}function Ffe(e,n){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",i=String(n.identifier).toUpperCase(),r=Hc(i.toLowerCase()),a=e.footnoteOrder.indexOf(i);let o,l=e.footnoteCounts.get(i);l===void 0?(l=0,e.footnoteOrder.push(i),o=e.footnoteOrder.length):o=a+1,l+=1,e.footnoteCounts.set(i,l);const f={type:"element",tagName:"a",properties:{href:"#"+t+"fn-"+r,id:t+"fnref-"+r+(l>1?"-"+l:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(o)}]};e.patch(n,f);const c={type:"element",tagName:"sup",properties:{},children:[f]};return e.patch(n,c),e.applyData(n,c)}function qfe(e,n){const t={type:"element",tagName:"h"+n.depth,properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)}function Hfe(e,n){if(e.options.allowDangerousHtml){const t={type:"raw",value:n.value};return e.patch(n,t),e.applyData(n,t)}}function wq(e,n){const t=n.referenceType;let i="]";if(t==="collapsed"?i+="[]":t==="full"&&(i+="["+(n.label||n.identifier)+"]"),n.type==="imageReference")return[{type:"text",value:"!["+n.alt+i}];const r=e.all(n),a=r[0];a&&a.type==="text"?a.value="["+a.value:r.unshift({type:"text",value:"["});const o=r[r.length-1];return o&&o.type==="text"?o.value+=i:r.push({type:"text",value:i}),r}function Ufe(e,n){const t=String(n.identifier).toUpperCase(),i=e.definitionById.get(t);if(!i)return wq(e,n);const r={src:Hc(i.url||""),alt:n.alt};i.title!==null&&i.title!==void 0&&(r.title=i.title);const a={type:"element",tagName:"img",properties:r,children:[]};return e.patch(n,a),e.applyData(n,a)}function Vfe(e,n){const t={src:Hc(n.url)};n.alt!==null&&n.alt!==void 0&&(t.alt=n.alt),n.title!==null&&n.title!==void 0&&(t.title=n.title);const i={type:"element",tagName:"img",properties:t,children:[]};return e.patch(n,i),e.applyData(n,i)}function Wfe(e,n){const t={type:"text",value:n.value.replace(/\r?\n|\r/g," ")};e.patch(n,t);const i={type:"element",tagName:"code",properties:{},children:[t]};return e.patch(n,i),e.applyData(n,i)}function Gfe(e,n){const t=String(n.identifier).toUpperCase(),i=e.definitionById.get(t);if(!i)return wq(e,n);const r={href:Hc(i.url||"")};i.title!==null&&i.title!==void 0&&(r.title=i.title);const a={type:"element",tagName:"a",properties:r,children:e.all(n)};return e.patch(n,a),e.applyData(n,a)}function Yfe(e,n){const t={href:Hc(n.url)};n.title!==null&&n.title!==void 0&&(t.title=n.title);const i={type:"element",tagName:"a",properties:t,children:e.all(n)};return e.patch(n,i),e.applyData(n,i)}function Kfe(e,n,t){const i=e.all(n),r=t?Xfe(t):kq(n),a={},o=[];if(typeof n.checked=="boolean"){const h=i[0];let d;h&&h.type==="element"&&h.tagName==="p"?d=h:(d={type:"element",tagName:"p",properties:{},children:[]},i.unshift(d)),d.children.length>0&&d.children.unshift({type:"text",value:" "}),d.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:n.checked,disabled:!0},children:[]}),a.className=["task-list-item"]}let l=-1;for(;++l1}function Zfe(e,n){const t={},i=e.all(n);let r=-1;for(typeof n.start=="number"&&n.start!==1&&(t.start=n.start);++r0){const o={type:"element",tagName:"tbody",properties:{},children:e.wrap(t,!0)},l=i9(n.children[1]),f=eq(n.children[n.children.length-1]);l&&f&&(o.position={start:l,end:f}),r.push(o)}const a={type:"element",tagName:"table",properties:{},children:e.wrap(r,!0)};return e.patch(n,a),e.applyData(n,a)}function tce(e,n,t){const i=t?t.children:void 0,a=(i?i.indexOf(n):1)===0?"th":"td",o=t&&t.type==="table"?t.align:void 0,l=o?o.length:n.children.length;let f=-1;const c=[];for(;++f0,!0),i[0]),r=i.index+i[0].length,i=t.exec(n);return a.push(kM(n.slice(r),r>0,!1)),a.join("")}function kM(e,n,t){let i=0,r=e.length;if(n){let a=e.codePointAt(i);for(;a===bM||a===wM;)i++,a=e.codePointAt(i)}if(t){let a=e.codePointAt(r-1);for(;a===bM||a===wM;)r--,a=e.codePointAt(r-1)}return r>i?e.slice(i,r):""}function ace(e,n){const t={type:"text",value:rce(String(n.value))};return e.patch(n,t),e.applyData(n,t)}function oce(e,n){const t={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(n,t),e.applyData(n,t)}const sce={blockquote:$fe,break:zfe,code:Lfe,delete:Ife,emphasis:Bfe,footnoteReference:Ffe,heading:qfe,html:Hfe,imageReference:Ufe,image:Vfe,inlineCode:Wfe,linkReference:Gfe,link:Yfe,listItem:Kfe,list:Zfe,paragraph:Qfe,root:Jfe,strong:ece,table:nce,tableCell:ice,tableRow:tce,text:ace,thematicBreak:oce,toml:Iv,yaml:Iv,definition:Iv,footnoteDefinition:Iv};function Iv(){}const _q=-1,s0=0,Ah=1,Bg=2,f9=3,c9=4,d9=5,h9=6,xq=7,Sq=8,lce=typeof self=="object"?self:globalThis,_M=(e,n)=>{switch(e){case"Function":case"SharedWorker":case"Worker":case"eval":case"setInterval":case"setTimeout":throw new TypeError("unable to deserialize "+e)}return new lce[e](n)},uce=(e,n)=>{const t=(r,a)=>(e.set(a,r),r),i=r=>{if(e.has(r))return e.get(r);const[a,o]=n[r];switch(a){case s0:case _q:return t(o,r);case Ah:{const l=t([],r);for(const f of o)l.push(i(f));return l}case Bg:{const l=t({},r);for(const[f,c]of o)l[i(f)]=i(c);return l}case f9:return t(new Date(o),r);case c9:{const{source:l,flags:f}=o;return t(new RegExp(l,f),r)}case d9:{const l=t(new Map,r);for(const[f,c]of o)l.set(i(f),i(c));return l}case h9:{const l=t(new Set,r);for(const f of o)l.add(i(f));return l}case xq:{const{name:l,message:f}=o;return t(_M(l,f),r)}case Sq:return t(BigInt(o),r);case"BigInt":return t(Object(BigInt(o)),r);case"ArrayBuffer":return t(new Uint8Array(o).buffer,o);case"DataView":{const{buffer:l}=new Uint8Array(o);return t(new DataView(l),o)}}return t(_M(a,o),r)};return i},xM=e=>uce(new Map,e)(0),Af="",{toString:fce}={},{keys:cce}=Object,Xd=e=>{const n=typeof e;if(n!=="object"||!e)return[s0,n];const t=fce.call(e).slice(8,-1);switch(t){case"Array":return[Ah,Af];case"Object":return[Bg,Af];case"Date":return[f9,Af];case"RegExp":return[c9,Af];case"Map":return[d9,Af];case"Set":return[h9,Af];case"DataView":return[Ah,t]}return t.includes("Array")?[Ah,t]:t.includes("Error")?[xq,t]:[Bg,t]},Bv=([e,n])=>e===s0&&(n==="function"||n==="symbol"),dce=(e,n,t,i)=>{const r=(o,l)=>{const f=i.push(o)-1;return t.set(l,f),f},a=o=>{if(t.has(o))return t.get(o);let[l,f]=Xd(o);switch(l){case s0:{let h=o;switch(f){case"bigint":l=Sq,h=o.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+f);h=null;break;case"undefined":return r([_q],o)}return r([l,h],o)}case Ah:{if(f){let p=o;return f==="DataView"?p=new Uint8Array(o.buffer):f==="ArrayBuffer"&&(p=new Uint8Array(o)),r([f,[...p]],o)}const h=[],d=r([l,h],o);for(const p of o)h.push(a(p));return d}case Bg:{if(f)switch(f){case"BigInt":return r([f,o.toString()],o);case"Boolean":case"Number":case"String":return r([f,o.valueOf()],o)}if(n&&"toJSON"in o)return a(o.toJSON());const h=[],d=r([l,h],o);for(const p of cce(o))(e||!Bv(Xd(o[p])))&&h.push([a(p),a(o[p])]);return d}case f9:return r([l,o.toISOString()],o);case c9:{const{source:h,flags:d}=o;return r([l,{source:h,flags:d}],o)}case d9:{const h=[],d=r([l,h],o);for(const[p,v]of o)(e||!(Bv(Xd(p))||Bv(Xd(v))))&&h.push([a(p),a(v)]);return d}case h9:{const h=[],d=r([l,h],o);for(const p of o)(e||!Bv(Xd(p)))&&h.push(a(p));return d}}const{message:c}=o;return r([l,{name:f,message:c}],o)};return a},SM=(e,{json:n,lossy:t}={})=>{const i=[];return dce(!(n||t),!!n,new Map,i)(e),i},Fg=typeof structuredClone=="function"?(e,n)=>n&&("json"in n||"lossy"in n)?xM(SM(e,n)):structuredClone(e):(e,n)=>xM(SM(e,n));function hce(e,n){const t=[{type:"text",value:"↩"}];return n>1&&t.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(n)}]}),t}function mce(e,n){return"Back to reference "+(e+1)+(n>1?"-"+n:"")}function pce(e){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",t=e.options.footnoteBackContent||hce,i=e.options.footnoteBackLabel||mce,r=e.options.footnoteLabel||"Footnotes",a=e.options.footnoteLabelTagName||"h2",o=e.options.footnoteLabelProperties||{className:["sr-only"]},l=[];let f=-1;for(;++f0&&b.push({type:"text",value:" "});let x=typeof t=="string"?t:t(f,v);typeof x=="string"&&(x={type:"text",value:x}),b.push({type:"element",tagName:"a",properties:{href:"#"+n+"fnref-"+p+(v>1?"-"+v:""),dataFootnoteBackref:"",ariaLabel:typeof i=="string"?i:i(f,v),className:["data-footnote-backref"]},children:Array.isArray(x)?x:[x]})}const k=h[h.length-1];if(k&&k.type==="element"&&k.tagName==="p"){const x=k.children[k.children.length-1];x&&x.type==="text"?x.value+=" ":k.children.push({type:"text",value:" "}),k.children.push(...b)}else h.push(...b);const _={type:"element",tagName:"li",properties:{id:n+"fn-"+p},children:e.wrap(h,!0)};e.patch(c,_),l.push(_)}if(l.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:a,properties:{...Fg(o),id:"footnote-label"},children:[{type:"text",value:r}]},{type:"text",value:` -`},{type:"element",tagName:"ol",properties:{},children:e.wrap(l,!0)},{type:"text",value:` -`}]}}const l0=(function(e){if(e==null)return bce;if(typeof e=="function")return u0(e);if(typeof e=="object")return Array.isArray(e)?vce(e):gce(e);if(typeof e=="string")return yce(e);throw new Error("Expected function, string, or object as test")});function vce(e){const n=[];let t=-1;for(;++t":""))+")"})}return p;function p(){let v=Cq,b,w,k;if((!n||a(f,c,h[h.length-1]||void 0))&&(v=xce(t(f,h)),v[0]===FS))return v;if("children"in f&&f.children){const _=f;if(_.children&&v[0]!==_ce)for(w=(i?_.children.length:-1)+o,k=h.concat(_);w>-1&&w<_.children.length;){const x=_.children[w];if(b=l(x,w,k)(),b[0]===FS)return b;w=typeof b[1]=="number"?b[1]:w+o}}return v}}}function xce(e){return Array.isArray(e)?e:typeof e=="number"?[kce,e]:e==null?Cq:[e]}function m9(e,n,t,i){let r,a,o;typeof n=="function"&&typeof t!="function"?(a=void 0,o=n,r=t):(a=n,o=t,r=i),Aq(e,a,l,r);function l(f,c){const h=c[c.length-1],d=h?h.children.indexOf(f):void 0;return o(f,d,h)}}const qS={}.hasOwnProperty,Sce={};function Cce(e,n){const t=n||Sce,i=new Map,r=new Map,a=new Map,o={...sce,...t.handlers},l={all:c,applyData:Oce,definitionById:i,footnoteById:r,footnoteCounts:a,footnoteOrder:[],handlers:o,one:f,options:t,patch:Ace,wrap:Tce};return m9(e,function(h){if(h.type==="definition"||h.type==="footnoteDefinition"){const d=h.type==="definition"?i:r,p=String(h.identifier).toUpperCase();d.has(p)||d.set(p,h)}}),l;function f(h,d){const p=h.type,v=l.handlers[p];if(qS.call(l.handlers,p)&&v)return v(l,h,d);if(l.options.passThrough&&l.options.passThrough.includes(p)){if("children"in h){const{children:w,...k}=h,_=Fg(k);return _.children=l.all(h),_}return Fg(h)}return(l.options.unknownHandler||Ece)(l,h,d)}function c(h){const d=[];if("children"in h){const p=h.children;let v=-1;for(;++v0&&t.push({type:"text",value:` -`}),t}function CM(e){let n=0,t=e.charCodeAt(n);for(;t===9||t===32;)n++,t=e.charCodeAt(n);return e.slice(n)}function AM(e,n){const t=Cce(e,n),i=t.one(e,void 0),r=pce(t),a=Array.isArray(i)?{type:"root",children:i}:i||{type:"root",children:[]};return r&&a.children.push({type:"text",value:` -`},r),a}function jce(e,n){return e&&"run"in e?async function(t,i){const r=AM(t,{file:i,...n});await e.run(r,i)}:function(t,i){return AM(t,{file:i,...e||n})}}function OM(e){if(e)throw e}var Ik,EM;function Mce(){if(EM)return Ik;EM=1;var e=Object.prototype.hasOwnProperty,n=Object.prototype.toString,t=Object.defineProperty,i=Object.getOwnPropertyDescriptor,r=function(c){return typeof Array.isArray=="function"?Array.isArray(c):n.call(c)==="[object Array]"},a=function(c){if(!c||n.call(c)!=="[object Object]")return!1;var h=e.call(c,"constructor"),d=c.constructor&&c.constructor.prototype&&e.call(c.constructor.prototype,"isPrototypeOf");if(c.constructor&&!h&&!d)return!1;var p;for(p in c);return typeof p>"u"||e.call(c,p)},o=function(c,h){t&&h.name==="__proto__"?t(c,h.name,{enumerable:!0,configurable:!0,value:h.newValue,writable:!0}):c[h.name]=h.newValue},l=function(c,h){if(h==="__proto__")if(e.call(c,h)){if(i)return i(c,h).value}else return;return c[h]};return Ik=function f(){var c,h,d,p,v,b,w=arguments[0],k=1,_=arguments.length,x=!1;for(typeof w=="boolean"&&(x=w,w=arguments[1]||{},k=2),(w==null||typeof w!="object"&&typeof w!="function")&&(w={});k<_;++k)if(c=arguments[k],c!=null)for(h in c)d=l(w,h),p=l(c,h),w!==p&&(x&&p&&(a(p)||(v=r(p)))?(v?(v=!1,b=d&&r(d)?d:[]):b=d&&a(d)?d:{},o(w,{name:h,newValue:f(x,b,p)})):typeof p<"u"&&o(w,{name:h,newValue:p}));return w},Ik}var Dce=Mce();const Bk=dt(Dce);function HS(e){if(typeof e!="object"||e===null)return!1;const n=Object.getPrototypeOf(e);return(n===null||n===Object.prototype||Object.getPrototypeOf(n)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function Rce(){const e=[],n={run:t,use:i};return n;function t(...r){let a=-1;const o=r.pop();if(typeof o!="function")throw new TypeError("Expected function as last argument, not "+o);l(null,...r);function l(f,...c){const h=e[++a];let d=-1;if(f){o(f);return}for(;++do.length;let f;l&&o.push(r);try{f=e.apply(this,o)}catch(c){const h=c;if(l&&t)throw h;return r(h)}l||(f&&f.then&&typeof f.then=="function"?f.then(a,r):f instanceof Error?r(f):a(f))}function r(o,...l){t||(t=!0,n(o,...l))}function a(o){r(null,o)}}const eo={basename:Nce,dirname:$ce,extname:zce,join:Lce,sep:"/"};function Nce(e,n){if(n!==void 0&&typeof n!="string")throw new TypeError('"ext" argument must be a string');rp(e);let t=0,i=-1,r=e.length,a;if(n===void 0||n.length===0||n.length>e.length){for(;r--;)if(e.codePointAt(r)===47){if(a){t=r+1;break}}else i<0&&(a=!0,i=r+1);return i<0?"":e.slice(t,i)}if(n===e)return"";let o=-1,l=n.length-1;for(;r--;)if(e.codePointAt(r)===47){if(a){t=r+1;break}}else o<0&&(a=!0,o=r+1),l>-1&&(e.codePointAt(r)===n.codePointAt(l--)?l<0&&(i=r):(l=-1,i=o));return t===i?i=o:i<0&&(i=e.length),e.slice(t,i)}function $ce(e){if(rp(e),e.length===0)return".";let n=-1,t=e.length,i;for(;--t;)if(e.codePointAt(t)===47){if(i){n=t;break}}else i||(i=!0);return n<0?e.codePointAt(0)===47?"/":".":n===1&&e.codePointAt(0)===47?"//":e.slice(0,n)}function zce(e){rp(e);let n=e.length,t=-1,i=0,r=-1,a=0,o;for(;n--;){const l=e.codePointAt(n);if(l===47){if(o){i=n+1;break}continue}t<0&&(o=!0,t=n+1),l===46?r<0?r=n:a!==1&&(a=1):r>-1&&(a=-1)}return r<0||t<0||a===0||a===1&&r===t-1&&r===i+1?"":e.slice(r,t)}function Lce(...e){let n=-1,t;for(;++n0&&e.codePointAt(e.length-1)===47&&(t+="/"),n?"/"+t:t}function Bce(e,n){let t="",i=0,r=-1,a=0,o=-1,l,f;for(;++o<=e.length;){if(o2){if(f=t.lastIndexOf("/"),f!==t.length-1){f<0?(t="",i=0):(t=t.slice(0,f),i=t.length-1-t.lastIndexOf("/")),r=o,a=0;continue}}else if(t.length>0){t="",i=0,r=o,a=0;continue}}n&&(t=t.length>0?t+"/..":"..",i=2)}else t.length>0?t+="/"+e.slice(r+1,o):t=e.slice(r+1,o),i=o-r-1;r=o,a=0}else l===46&&a>-1?a++:a=-1}return t}function rp(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const Fce={cwd:qce};function qce(){return"/"}function US(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function Hce(e){if(typeof e=="string")e=new URL(e);else if(!US(e)){const n=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw n.code="ERR_INVALID_ARG_TYPE",n}if(e.protocol!=="file:"){const n=new TypeError("The URL must be of scheme file");throw n.code="ERR_INVALID_URL_SCHEME",n}return Uce(e)}function Uce(e){if(e.hostname!==""){const i=new TypeError('File URL host must be "localhost" or empty on darwin');throw i.code="ERR_INVALID_FILE_URL_HOST",i}const n=e.pathname;let t=-1;for(;++t0){let[v,...b]=h;const w=i[p][1];HS(w)&&HS(v)&&(v=Bk(!0,w,v)),i[p]=[c,v,...b]}}}}const Yce=new p9().freeze();function Uk(e,n){if(typeof n!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function Vk(e,n){if(typeof n!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function Wk(e,n){if(n)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function jM(e){if(!HS(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function MM(e,n,t){if(!t)throw new Error("`"+e+"` finished async. Use `"+n+"` instead")}function Fv(e){return Kce(e)?e:new Oq(e)}function Kce(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function Xce(e){return typeof e=="string"||Zce(e)}function Zce(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const Qce="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",DM=[],RM={allowDangerousHtml:!0},Jce=/^(https?|ircs?|mailto|xmpp)$/i,ede=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"className",id:"remove-classname"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function nde(e){const n=tde(e),t=ide(e);return rde(n.runSync(n.parse(t),t),e)}function tde(e){const n=e.rehypePlugins||DM,t=e.remarkPlugins||DM,i=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...RM}:RM;return Yce().use(Nfe).use(t).use(jce,i).use(n)}function ide(e){const n=e.children||"",t=new Oq;return typeof n=="string"&&(t.value=n),t}function rde(e,n){const t=n.allowedElements,i=n.allowElement,r=n.components,a=n.disallowedElements,o=n.skipHtml,l=n.unwrapDisallowed,f=n.urlTransform||ade;for(const h of ede)Object.hasOwn(n,h.from)&&(""+h.from+(h.to?"use `"+h.to+"` instead":"remove it")+Qce+h.id,void 0);return m9(e,c),yle(e,{Fragment:y.Fragment,components:r,ignoreInvalidStyle:!0,jsx:y.jsx,jsxs:y.jsxs,passKeys:!0,passNode:!0});function c(h,d,p){if(h.type==="raw"&&p&&typeof d=="number")return o?p.children.splice(d,1):p.children[d]={type:"text",value:h.value},d;if(h.type==="element"){let v;for(v in $k)if(Object.hasOwn($k,v)&&Object.hasOwn(h.properties,v)){const b=h.properties[v],w=$k[v];(w===null||w.includes(h.tagName))&&(h.properties[v]=f(String(b||""),v,h))}}if(h.type==="element"){let v=t?!t.includes(h.tagName):a?a.includes(h.tagName):!1;if(!v&&i&&typeof d=="number"&&(v=!i(h,d,p)),v&&p&&typeof d=="number")return l&&h.children?p.children.splice(d,1,...h.children):p.children.splice(d,1),d}}}function ade(e){const n=e.indexOf(":"),t=e.indexOf("?"),i=e.indexOf("#"),r=e.indexOf("/");return n===-1||r!==-1&&n>r||t!==-1&&n>t||i!==-1&&n>i||Jce.test(e.slice(0,n))?e:""}function PM(e,n){const t=String(e);if(typeof n!="string")throw new TypeError("Expected character");let i=0,r=t.indexOf(n);for(;r!==-1;)i++,r=t.indexOf(n,r+n.length);return i}function ode(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function sde(e,n,t){const r=l0((t||{}).ignore||[]),a=lde(n);let o=-1;for(;++o0?{type:"text",value:E}:void 0),E===!1?p.lastIndex=T+1:(b!==T&&x.push({type:"text",value:c.value.slice(b,T)}),Array.isArray(E)?x.push(...E):E&&x.push(E),b=T+C[0].length,_=!0),!p.global)break;C=p.exec(c.value)}return _?(b?\]}]+$/.exec(e);if(!n)return[e,void 0];e=e.slice(0,n.index);let t=n[0],i=t.indexOf(")");const r=PM(e,"(");let a=PM(e,")");for(;i!==-1&&r>a;)e+=t.slice(0,i+1),t=t.slice(i+1),i=t.indexOf(")"),a++;return[e,t]}function Eq(e,n){const t=e.input.charCodeAt(e.index-1);return(e.index===0||gu(t)||a0(t))&&(!n||t!==47)}Tq.peek=Mde;function xde(){this.buffer()}function Sde(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function Cde(){this.buffer()}function Ade(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function Ode(e){const n=this.resume(),t=this.stack[this.stack.length-1];t.type,t.identifier=Ia(this.sliceSerialize(e)).toLowerCase(),t.label=n}function Ede(e){this.exit(e)}function Tde(e){const n=this.resume(),t=this.stack[this.stack.length-1];t.type,t.identifier=Ia(this.sliceSerialize(e)).toLowerCase(),t.label=n}function jde(e){this.exit(e)}function Mde(){return"["}function Tq(e,n,t,i){const r=t.createTracker(i);let a=r.move("[^");const o=t.enter("footnoteReference"),l=t.enter("reference");return a+=r.move(t.safe(t.associationId(e),{after:"]",before:a})),l(),o(),a+=r.move("]"),a}function Dde(){return{enter:{gfmFootnoteCallString:xde,gfmFootnoteCall:Sde,gfmFootnoteDefinitionLabelString:Cde,gfmFootnoteDefinition:Ade},exit:{gfmFootnoteCallString:Ode,gfmFootnoteCall:Ede,gfmFootnoteDefinitionLabelString:Tde,gfmFootnoteDefinition:jde}}}function Rde(e){let n=!1;return e&&e.firstLineBlank&&(n=!0),{handlers:{footnoteDefinition:t,footnoteReference:Tq},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function t(i,r,a,o){const l=a.createTracker(o);let f=l.move("[^");const c=a.enter("footnoteDefinition"),h=a.enter("label");return f+=l.move(a.safe(a.associationId(i),{before:f,after:"]"})),h(),f+=l.move("]:"),i.children&&i.children.length>0&&(l.shift(4),f+=l.move((n?` -`:" ")+a.indentLines(a.containerFlow(i,l.current()),n?jq:Pde))),c(),f}}function Pde(e,n,t){return n===0?e:jq(e,n,t)}function jq(e,n,t){return(t?"":" ")+e}const Nde=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];Mq.peek=Bde;function $de(){return{canContainEols:["delete"],enter:{strikethrough:Lde},exit:{strikethrough:Ide}}}function zde(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:Nde}],handlers:{delete:Mq}}}function Lde(e){this.enter({type:"delete",children:[]},e)}function Ide(e){this.exit(e)}function Mq(e,n,t,i){const r=t.createTracker(i),a=t.enter("strikethrough");let o=r.move("~~");return o+=t.containerPhrasing(e,{...r.current(),before:o,after:"~"}),o+=r.move("~~"),a(),o}function Bde(){return"~"}function Fde(e){return e.length}function qde(e,n){const t=n||{},i=(t.align||[]).concat(),r=t.stringLength||Fde,a=[],o=[],l=[],f=[];let c=0,h=-1;for(;++hc&&(c=e[h].length);++_f[_])&&(f[_]=C)}w.push(x)}o[h]=w,l[h]=k}let d=-1;if(typeof i=="object"&&"length"in i)for(;++df[d]&&(f[d]=x),v[d]=x),p[d]=C}o.splice(1,0,p),l.splice(1,0,v),h=-1;const b=[];for(;++h "),a.shift(2);const o=t.indentLines(t.containerFlow(e,a.current()),Vde);return r(),o}function Vde(e,n,t){return">"+(t?"":" ")+e}function Wde(e,n){return $M(e,n.inConstruct,!0)&&!$M(e,n.notInConstruct,!1)}function $M(e,n,t){if(typeof n=="string"&&(n=[n]),!n||n.length===0)return t;let i=-1;for(;++io&&(o=a):a=1,r=i+n.length,i=t.indexOf(n,r);return o}function Yde(e,n){return!!(n.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function Kde(e){const n=e.options.fence||"`";if(n!=="`"&&n!=="~")throw new Error("Cannot serialize code with `"+n+"` for `options.fence`, expected `` ` `` or `~`");return n}function Xde(e,n,t,i){const r=Kde(t),a=e.value||"",o=r==="`"?"GraveAccent":"Tilde";if(Yde(e,t)){const d=t.enter("codeIndented"),p=t.indentLines(a,Zde);return d(),p}const l=t.createTracker(i),f=r.repeat(Math.max(Gde(a,r)+1,3)),c=t.enter("codeFenced");let h=l.move(f);if(e.lang){const d=t.enter(`codeFencedLang${o}`);h+=l.move(t.safe(e.lang,{before:h,after:" ",encode:["`"],...l.current()})),d()}if(e.lang&&e.meta){const d=t.enter(`codeFencedMeta${o}`);h+=l.move(" "),h+=l.move(t.safe(e.meta,{before:h,after:` -`,encode:["`"],...l.current()})),d()}return h+=l.move(` -`),a&&(h+=l.move(a+` -`)),h+=l.move(f),c(),h}function Zde(e,n,t){return(t?"":" ")+e}function v9(e){const n=e.options.quote||'"';if(n!=='"'&&n!=="'")throw new Error("Cannot serialize title with `"+n+"` for `options.quote`, expected `\"`, or `'`");return n}function Qde(e,n,t,i){const r=v9(t),a=r==='"'?"Quote":"Apostrophe",o=t.enter("definition");let l=t.enter("label");const f=t.createTracker(i);let c=f.move("[");return c+=f.move(t.safe(t.associationId(e),{before:c,after:"]",...f.current()})),c+=f.move("]: "),l(),!e.url||/[\0- \u007F]/.test(e.url)?(l=t.enter("destinationLiteral"),c+=f.move("<"),c+=f.move(t.safe(e.url,{before:c,after:">",...f.current()})),c+=f.move(">")):(l=t.enter("destinationRaw"),c+=f.move(t.safe(e.url,{before:c,after:e.title?" ":` -`,...f.current()}))),l(),e.title&&(l=t.enter(`title${a}`),c+=f.move(" "+r),c+=f.move(t.safe(e.title,{before:c,after:r,...f.current()})),c+=f.move(r),l()),o(),c}function Jde(e){const n=e.options.emphasis||"*";if(n!=="*"&&n!=="_")throw new Error("Cannot serialize emphasis with `"+n+"` for `options.emphasis`, expected `*`, or `_`");return n}function Kh(e){return"&#x"+e.toString(16).toUpperCase()+";"}function qg(e,n,t){const i=Qf(e),r=Qf(n);return i===void 0?r===void 0?t==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:r===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:i===1?r===void 0?{inside:!1,outside:!1}:r===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:r===void 0?{inside:!1,outside:!1}:r===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}Dq.peek=ehe;function Dq(e,n,t,i){const r=Jde(t),a=t.enter("emphasis"),o=t.createTracker(i),l=o.move(r);let f=o.move(t.containerPhrasing(e,{after:r,before:l,...o.current()}));const c=f.charCodeAt(0),h=qg(i.before.charCodeAt(i.before.length-1),c,r);h.inside&&(f=Kh(c)+f.slice(1));const d=f.charCodeAt(f.length-1),p=qg(i.after.charCodeAt(0),d,r);p.inside&&(f=f.slice(0,-1)+Kh(d));const v=o.move(r);return a(),t.attentionEncodeSurroundingInfo={after:p.outside,before:h.outside},l+f+v}function ehe(e,n,t){return t.options.emphasis||"*"}function nhe(e,n){let t=!1;return m9(e,function(i){if("value"in i&&/\r?\n|\r/.test(i.value)||i.type==="break")return t=!0,FS}),!!((!e.depth||e.depth<3)&&s9(e)&&(n.options.setext||t))}function the(e,n,t,i){const r=Math.max(Math.min(6,e.depth||1),1),a=t.createTracker(i);if(nhe(e,t)){const h=t.enter("headingSetext"),d=t.enter("phrasing"),p=t.containerPhrasing(e,{...a.current(),before:` -`,after:` -`});return d(),h(),p+` -`+(r===1?"=":"-").repeat(p.length-(Math.max(p.lastIndexOf("\r"),p.lastIndexOf(` -`))+1))}const o="#".repeat(r),l=t.enter("headingAtx"),f=t.enter("phrasing");a.move(o+" ");let c=t.containerPhrasing(e,{before:"# ",after:` -`,...a.current()});return/^[\t ]/.test(c)&&(c=Kh(c.charCodeAt(0))+c.slice(1)),c=c?o+" "+c:o,t.options.closeAtx&&(c+=" "+o),f(),l(),c}Rq.peek=ihe;function Rq(e){return e.value||""}function ihe(){return"<"}Pq.peek=rhe;function Pq(e,n,t,i){const r=v9(t),a=r==='"'?"Quote":"Apostrophe",o=t.enter("image");let l=t.enter("label");const f=t.createTracker(i);let c=f.move("![");return c+=f.move(t.safe(e.alt,{before:c,after:"]",...f.current()})),c+=f.move("]("),l(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(l=t.enter("destinationLiteral"),c+=f.move("<"),c+=f.move(t.safe(e.url,{before:c,after:">",...f.current()})),c+=f.move(">")):(l=t.enter("destinationRaw"),c+=f.move(t.safe(e.url,{before:c,after:e.title?" ":")",...f.current()}))),l(),e.title&&(l=t.enter(`title${a}`),c+=f.move(" "+r),c+=f.move(t.safe(e.title,{before:c,after:r,...f.current()})),c+=f.move(r),l()),c+=f.move(")"),o(),c}function rhe(){return"!"}Nq.peek=ahe;function Nq(e,n,t,i){const r=e.referenceType,a=t.enter("imageReference");let o=t.enter("label");const l=t.createTracker(i);let f=l.move("![");const c=t.safe(e.alt,{before:f,after:"]",...l.current()});f+=l.move(c+"]["),o();const h=t.stack;t.stack=[],o=t.enter("reference");const d=t.safe(t.associationId(e),{before:f,after:"]",...l.current()});return o(),t.stack=h,a(),r==="full"||!c||c!==d?f+=l.move(d+"]"):r==="shortcut"?f=f.slice(0,-1):f+=l.move("]"),f}function ahe(){return"!"}$q.peek=ohe;function $q(e,n,t){let i=e.value||"",r="`",a=-1;for(;new RegExp("(^|[^`])"+r+"([^`]|$)").test(i);)r+="`";for(/[^ \r\n]/.test(i)&&(/^[ \r\n]/.test(i)&&/[ \r\n]$/.test(i)||/^`|`$/.test(i))&&(i=" "+i+" ");++a\u007F]/.test(e.url))}Lq.peek=she;function Lq(e,n,t,i){const r=v9(t),a=r==='"'?"Quote":"Apostrophe",o=t.createTracker(i);let l,f;if(zq(e,t)){const h=t.stack;t.stack=[],l=t.enter("autolink");let d=o.move("<");return d+=o.move(t.containerPhrasing(e,{before:d,after:">",...o.current()})),d+=o.move(">"),l(),t.stack=h,d}l=t.enter("link"),f=t.enter("label");let c=o.move("[");return c+=o.move(t.containerPhrasing(e,{before:c,after:"](",...o.current()})),c+=o.move("]("),f(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(f=t.enter("destinationLiteral"),c+=o.move("<"),c+=o.move(t.safe(e.url,{before:c,after:">",...o.current()})),c+=o.move(">")):(f=t.enter("destinationRaw"),c+=o.move(t.safe(e.url,{before:c,after:e.title?" ":")",...o.current()}))),f(),e.title&&(f=t.enter(`title${a}`),c+=o.move(" "+r),c+=o.move(t.safe(e.title,{before:c,after:r,...o.current()})),c+=o.move(r),f()),c+=o.move(")"),l(),c}function she(e,n,t){return zq(e,t)?"<":"["}Iq.peek=lhe;function Iq(e,n,t,i){const r=e.referenceType,a=t.enter("linkReference");let o=t.enter("label");const l=t.createTracker(i);let f=l.move("[");const c=t.containerPhrasing(e,{before:f,after:"]",...l.current()});f+=l.move(c+"]["),o();const h=t.stack;t.stack=[],o=t.enter("reference");const d=t.safe(t.associationId(e),{before:f,after:"]",...l.current()});return o(),t.stack=h,a(),r==="full"||!c||c!==d?f+=l.move(d+"]"):r==="shortcut"?f=f.slice(0,-1):f+=l.move("]"),f}function lhe(){return"["}function g9(e){const n=e.options.bullet||"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bullet`, expected `*`, `+`, or `-`");return n}function uhe(e){const n=g9(e),t=e.options.bulletOther;if(!t)return n==="*"?"-":"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(t===n)throw new Error("Expected `bullet` (`"+n+"`) and `bulletOther` (`"+t+"`) to be different");return t}function fhe(e){const n=e.options.bulletOrdered||".";if(n!=="."&&n!==")")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOrdered`, expected `.` or `)`");return n}function Bq(e){const n=e.options.rule||"*";if(n!=="*"&&n!=="-"&&n!=="_")throw new Error("Cannot serialize rules with `"+n+"` for `options.rule`, expected `*`, `-`, or `_`");return n}function che(e,n,t,i){const r=t.enter("list"),a=t.bulletCurrent;let o=e.ordered?fhe(t):g9(t);const l=e.ordered?o==="."?")":".":uhe(t);let f=n&&t.bulletLastUsed?o===t.bulletLastUsed:!1;if(!e.ordered){const h=e.children?e.children[0]:void 0;if((o==="*"||o==="-")&&h&&(!h.children||!h.children[0])&&t.stack[t.stack.length-1]==="list"&&t.stack[t.stack.length-2]==="listItem"&&t.stack[t.stack.length-3]==="list"&&t.stack[t.stack.length-4]==="listItem"&&t.indexStack[t.indexStack.length-1]===0&&t.indexStack[t.indexStack.length-2]===0&&t.indexStack[t.indexStack.length-3]===0&&(f=!0),Bq(t)===o&&h){let d=-1;for(;++d-1?n.start:1)+(t.options.incrementListMarker===!1?0:n.children.indexOf(e))+a);let o=a.length+1;(r==="tab"||r==="mixed"&&(n&&n.type==="list"&&n.spread||e.spread))&&(o=Math.ceil(o/4)*4);const l=t.createTracker(i);l.move(a+" ".repeat(o-a.length)),l.shift(o);const f=t.enter("listItem"),c=t.indentLines(t.containerFlow(e,l.current()),h);return f(),c;function h(d,p,v){return p?(v?"":" ".repeat(o))+d:(v?a:a+" ".repeat(o-a.length))+d}}function mhe(e,n,t,i){const r=t.enter("paragraph"),a=t.enter("phrasing"),o=t.containerPhrasing(e,i);return a(),r(),o}const phe=l0(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function vhe(e,n,t,i){return(e.children.some(function(o){return phe(o)})?t.containerPhrasing:t.containerFlow).call(t,e,i)}function ghe(e){const n=e.options.strong||"*";if(n!=="*"&&n!=="_")throw new Error("Cannot serialize strong with `"+n+"` for `options.strong`, expected `*`, or `_`");return n}Fq.peek=yhe;function Fq(e,n,t,i){const r=ghe(t),a=t.enter("strong"),o=t.createTracker(i),l=o.move(r+r);let f=o.move(t.containerPhrasing(e,{after:r,before:l,...o.current()}));const c=f.charCodeAt(0),h=qg(i.before.charCodeAt(i.before.length-1),c,r);h.inside&&(f=Kh(c)+f.slice(1));const d=f.charCodeAt(f.length-1),p=qg(i.after.charCodeAt(0),d,r);p.inside&&(f=f.slice(0,-1)+Kh(d));const v=o.move(r+r);return a(),t.attentionEncodeSurroundingInfo={after:p.outside,before:h.outside},l+f+v}function yhe(e,n,t){return t.options.strong||"*"}function bhe(e,n,t,i){return t.safe(e.value,i)}function whe(e){const n=e.options.ruleRepetition||3;if(n<3)throw new Error("Cannot serialize rules with repetition `"+n+"` for `options.ruleRepetition`, expected `3` or more");return n}function khe(e,n,t){const i=(Bq(t)+(t.options.ruleSpaces?" ":"")).repeat(whe(t));return t.options.ruleSpaces?i.slice(0,-1):i}const qq={blockquote:Ude,break:zM,code:Xde,definition:Qde,emphasis:Dq,hardBreak:zM,heading:the,html:Rq,image:Pq,imageReference:Nq,inlineCode:$q,link:Lq,linkReference:Iq,list:che,listItem:hhe,paragraph:mhe,root:vhe,strong:Fq,text:bhe,thematicBreak:khe};function _he(){return{enter:{table:xhe,tableData:LM,tableHeader:LM,tableRow:Che},exit:{codeText:Ahe,table:She,tableData:Xk,tableHeader:Xk,tableRow:Xk}}}function xhe(e){const n=e._align;this.enter({type:"table",align:n.map(function(t){return t==="none"?null:t}),children:[]},e),this.data.inTable=!0}function She(e){this.exit(e),this.data.inTable=void 0}function Che(e){this.enter({type:"tableRow",children:[]},e)}function Xk(e){this.exit(e)}function LM(e){this.enter({type:"tableCell",children:[]},e)}function Ahe(e){let n=this.resume();this.data.inTable&&(n=n.replace(/\\([\\|])/g,Ohe));const t=this.stack[this.stack.length-1];t.type,t.value=n,this.exit(e)}function Ohe(e,n){return n==="|"?n:e}function Ehe(e){const n=e||{},t=n.tableCellPadding,i=n.tablePipeAlign,r=n.stringLength,a=t?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:` -`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:p,table:o,tableCell:f,tableRow:l}};function o(v,b,w,k){return c(h(v,w,k),v.align)}function l(v,b,w,k){const _=d(v,w,k),x=c([_]);return x.slice(0,x.indexOf(` -`))}function f(v,b,w,k){const _=w.enter("tableCell"),x=w.enter("phrasing"),C=w.containerPhrasing(v,{...k,before:a,after:a});return x(),_(),C}function c(v,b){return qde(v,{align:b,alignDelimiters:i,padding:t,stringLength:r})}function h(v,b,w){const k=v.children;let _=-1;const x=[],C=b.enter("table");for(;++_0&&!t&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),t}const Whe={tokenize:eme,partial:!0};function Ghe(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:Zhe,continuation:{tokenize:Qhe},exit:Jhe}},text:{91:{name:"gfmFootnoteCall",tokenize:Xhe},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:Yhe,resolveTo:Khe}}}}function Yhe(e,n,t){const i=this;let r=i.events.length;const a=i.parser.gfmFootnotes||(i.parser.gfmFootnotes=[]);let o;for(;r--;){const f=i.events[r][1];if(f.type==="labelImage"){o=f;break}if(f.type==="gfmFootnoteCall"||f.type==="labelLink"||f.type==="label"||f.type==="image"||f.type==="link")break}return l;function l(f){if(!o||!o._balanced)return t(f);const c=Ia(i.sliceSerialize({start:o.end,end:i.now()}));return c.codePointAt(0)!==94||!a.includes(c.slice(1))?t(f):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(f),e.exit("gfmFootnoteCallLabelMarker"),n(f))}}function Khe(e,n){let t=e.length;for(;t--;)if(e[t][1].type==="labelImage"&&e[t][0]==="enter"){e[t][1];break}e[t+1][1].type="data",e[t+3][1].type="gfmFootnoteCallLabelMarker";const i={type:"gfmFootnoteCall",start:Object.assign({},e[t+3][1].start),end:Object.assign({},e[e.length-1][1].end)},r={type:"gfmFootnoteCallMarker",start:Object.assign({},e[t+3][1].end),end:Object.assign({},e[t+3][1].end)};r.end.column++,r.end.offset++,r.end._bufferIndex++;const a={type:"gfmFootnoteCallString",start:Object.assign({},r.end),end:Object.assign({},e[e.length-1][1].start)},o={type:"chunkString",contentType:"string",start:Object.assign({},a.start),end:Object.assign({},a.end)},l=[e[t+1],e[t+2],["enter",i,n],e[t+3],e[t+4],["enter",r,n],["exit",r,n],["enter",a,n],["enter",o,n],["exit",o,n],["exit",a,n],e[e.length-2],e[e.length-1],["exit",i,n]];return e.splice(t,e.length-t+1,...l),e}function Xhe(e,n,t){const i=this,r=i.parser.gfmFootnotes||(i.parser.gfmFootnotes=[]);let a=0,o;return l;function l(d){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),f}function f(d){return d!==94?t(d):(e.enter("gfmFootnoteCallMarker"),e.consume(d),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",c)}function c(d){if(a>999||d===93&&!o||d===null||d===91||jt(d))return t(d);if(d===93){e.exit("chunkString");const p=e.exit("gfmFootnoteCallString");return r.includes(Ia(i.sliceSerialize(p)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),n):t(d)}return jt(d)||(o=!0),a++,e.consume(d),d===92?h:c}function h(d){return d===91||d===92||d===93?(e.consume(d),a++,c):c(d)}}function Zhe(e,n,t){const i=this,r=i.parser.gfmFootnotes||(i.parser.gfmFootnotes=[]);let a,o=0,l;return f;function f(b){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(b),e.exit("gfmFootnoteDefinitionLabelMarker"),c}function c(b){return b===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(b),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",h):t(b)}function h(b){if(o>999||b===93&&!l||b===null||b===91||jt(b))return t(b);if(b===93){e.exit("chunkString");const w=e.exit("gfmFootnoteDefinitionLabelString");return a=Ia(i.sliceSerialize(w)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(b),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),p}return jt(b)||(l=!0),o++,e.consume(b),b===92?d:h}function d(b){return b===91||b===92||b===93?(e.consume(b),o++,h):h(b)}function p(b){return b===58?(e.enter("definitionMarker"),e.consume(b),e.exit("definitionMarker"),r.includes(a)||r.push(a),it(e,v,"gfmFootnoteDefinitionWhitespace")):t(b)}function v(b){return n(b)}}function Qhe(e,n,t){return e.check(ip,n,e.attempt(Whe,n,t))}function Jhe(e){e.exit("gfmFootnoteDefinition")}function eme(e,n,t){const i=this;return it(e,r,"gfmFootnoteDefinitionIndent",5);function r(a){const o=i.events[i.events.length-1];return o&&o[1].type==="gfmFootnoteDefinitionIndent"&&o[2].sliceSerialize(o[1],!0).length===4?n(a):t(a)}}function nme(e){let t=(e||{}).singleTilde;const i={name:"strikethrough",tokenize:a,resolveAll:r};return t==null&&(t=!0),{text:{126:i},insideSpan:{null:[i]},attentionMarkers:{null:[126]}};function r(o,l){let f=-1;for(;++f1?f(b):(o.consume(b),d++,v);if(d<2&&!t)return f(b);const k=o.exit("strikethroughSequenceTemporary"),_=Qf(b);return k._open=!_||_===2&&!!w,k._close=!w||w===2&&!!_,l(b)}}}class tme{constructor(){this.map=[]}add(n,t,i){ime(this,n,t,i)}consume(n){if(this.map.sort(function(a,o){return a[0]-o[0]}),this.map.length===0)return;let t=this.map.length;const i=[];for(;t>0;)t-=1,i.push(n.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),n.length=this.map[t][0];i.push(n.slice()),n.length=0;let r=i.pop();for(;r;){for(const a of r)n.push(a);r=i.pop()}this.map.length=0}}function ime(e,n,t,i){let r=0;if(!(t===0&&i.length===0)){for(;r-1;){const U=i.events[L][1].type;if(U==="lineEnding"||U==="linePrefix")L--;else break}const B=L>-1?i.events[L][1].type:null,G=B==="tableHead"||B==="tableRow"?E:f;return G===E&&i.parser.lazy[i.now().line]?t(R):G(R)}function f(R){return e.enter("tableHead"),e.enter("tableRow"),c(R)}function c(R){return R===124||(o=!0,a+=1),h(R)}function h(R){return R===null?t(R):bn(R)?a>1?(a=0,i.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(R),e.exit("lineEnding"),v):t(R):Xn(R)?it(e,h,"whitespace")(R):(a+=1,o&&(o=!1,r+=1),R===124?(e.enter("tableCellDivider"),e.consume(R),e.exit("tableCellDivider"),o=!0,h):(e.enter("data"),d(R)))}function d(R){return R===null||R===124||jt(R)?(e.exit("data"),h(R)):(e.consume(R),R===92?p:d)}function p(R){return R===92||R===124?(e.consume(R),d):d(R)}function v(R){return i.interrupt=!1,i.parser.lazy[i.now().line]?t(R):(e.enter("tableDelimiterRow"),o=!1,Xn(R)?it(e,b,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(R):b(R))}function b(R){return R===45||R===58?k(R):R===124?(o=!0,e.enter("tableCellDivider"),e.consume(R),e.exit("tableCellDivider"),w):O(R)}function w(R){return Xn(R)?it(e,k,"whitespace")(R):k(R)}function k(R){return R===58?(a+=1,o=!0,e.enter("tableDelimiterMarker"),e.consume(R),e.exit("tableDelimiterMarker"),_):R===45?(a+=1,_(R)):R===null||bn(R)?T(R):O(R)}function _(R){return R===45?(e.enter("tableDelimiterFiller"),x(R)):O(R)}function x(R){return R===45?(e.consume(R),x):R===58?(o=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(R),e.exit("tableDelimiterMarker"),C):(e.exit("tableDelimiterFiller"),C(R))}function C(R){return Xn(R)?it(e,T,"whitespace")(R):T(R)}function T(R){return R===124?b(R):R===null||bn(R)?!o||r!==a?O(R):(e.exit("tableDelimiterRow"),e.exit("tableHead"),n(R)):O(R)}function O(R){return t(R)}function E(R){return e.enter("tableRow"),M(R)}function M(R){return R===124?(e.enter("tableCellDivider"),e.consume(R),e.exit("tableCellDivider"),M):R===null||bn(R)?(e.exit("tableRow"),n(R)):Xn(R)?it(e,M,"whitespace")(R):(e.enter("data"),N(R))}function N(R){return R===null||R===124||jt(R)?(e.exit("data"),M(R)):(e.consume(R),R===92?F:N)}function F(R){return R===92||R===124?(e.consume(R),N):N(R)}}function sme(e,n){let t=-1,i=!0,r=0,a=[0,0,0,0],o=[0,0,0,0],l=!1,f=0,c,h,d;const p=new tme;for(;++tt[2]+1){const b=t[2]+1,w=t[3]-t[2]-1;e.add(b,w,[])}}e.add(t[3]+1,0,[["exit",d,n]])}return r!==void 0&&(a.end=Object.assign({},Rf(n.events,r)),e.add(r,0,[["exit",a,n]]),a=void 0),a}function BM(e,n,t,i,r){const a=[],o=Rf(n.events,t);r&&(r.end=Object.assign({},o),a.push(["exit",r,n])),i.end=Object.assign({},o),a.push(["exit",i,n]),e.add(t+1,0,a)}function Rf(e,n){const t=e[n],i=t[0]==="enter"?"start":"end";return t[1][i]}const lme={name:"tasklistCheck",tokenize:fme};function ume(){return{text:{91:lme}}}function fme(e,n,t){const i=this;return r;function r(f){return i.previous!==null||!i._gfmTasklistFirstContentOfListItem?t(f):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(f),e.exit("taskListCheckMarker"),a)}function a(f){return jt(f)?(e.enter("taskListCheckValueUnchecked"),e.consume(f),e.exit("taskListCheckValueUnchecked"),o):f===88||f===120?(e.enter("taskListCheckValueChecked"),e.consume(f),e.exit("taskListCheckValueChecked"),o):t(f)}function o(f){return f===93?(e.enter("taskListCheckMarker"),e.consume(f),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),l):t(f)}function l(f){return bn(f)?n(f):Xn(f)?e.check({tokenize:cme},n,t)(f):t(f)}}function cme(e,n,t){return it(e,i,"whitespace");function i(r){return r===null?t(r):n(r)}}function dme(e){return sq([zhe(),Ghe(),nme(e),ame(),ume()])}const hme={};function mme(e){const n=this,t=e||hme,i=n.data(),r=i.micromarkExtensions||(i.micromarkExtensions=[]),a=i.fromMarkdownExtensions||(i.fromMarkdownExtensions=[]),o=i.toMarkdownExtensions||(i.toMarkdownExtensions=[]);r.push(dme(t)),a.push(Rhe()),o.push(Phe(t))}const WS="kanban_chat_v1";function pme(){try{const e=localStorage.getItem(WS);if(!e)return[];const n=JSON.parse(e);if(Array.isArray(n))return n}catch{}return[]}function vme({onBoardChange:e}){const[n,t]=A.useState(()=>pme()),[i,r]=A.useState(""),[a,o]=A.useState(!1),[l,f]=A.useState(""),[c,h]=A.useState([]),d=A.useRef(null);A.useEffect(()=>{localStorage.setItem(WS,JSON.stringify(n))},[n]),A.useEffect(()=>{var w;(w=d.current)==null||w.scrollTo({top:d.current.scrollHeight,behavior:"smooth"})},[n,l,c,a]);const p=async()=>{const w=i.trim();if(!w||a)return;const k={role:"user",content:w,ts:Date.now()},_=[...n,k];t(_),r(""),o(!0),f(""),h([]);let x="";const C=[];let T=!1;const O=E=>{switch(E.type){case"delta":x+=E.text,f(x);break;case"tool_use":{const M={tool:E.tool,ok:!0,input:E.input};C.push(M),h([...C]);break}case"tool_result":{for(let M=C.length-1;M>=0;M--){const N=C[M];if(N.error===void 0&&N.ok){E.is_error&&(N.ok=!1,N.error=E.result||"tool error");break}}h([...C]);break}case"result":E.text&&x.trim()===""&&(x=E.text,f(x));break;case"done":E.board_changed&&(T=!0);break;case"error":x=`Error: ${E.error}`,f(x);break}};try{const E=_.map(M=>({role:M.role,content:M.content}));await _ie(E,O)}catch(E){const M=E.message;$n.show({color:"red",message:M}),x=x||`Error: ${M}`}finally{const E={role:"assistant",content:x,ts:Date.now(),tool_calls:C.length>0?C:void 0};t(M=>[...M,E]),f(""),h([]),o(!1),T&&e()}},v=w=>{w.key==="Enter"&&!w.shiftKey&&(w.preventDefault(),p())},b=()=>{t([]),localStorage.removeItem(WS)};return y.jsxs(ft,{gap:0,h:"100%",children:[y.jsxs(un,{justify:"space-between",p:"xs",style:{borderBottom:"1px solid var(--mantine-color-dark-4)"},children:[y.jsxs(un,{gap:6,children:[y.jsx(qF,{size:18}),y.jsx(Ye,{fw:600,size:"sm",children:"Asistente"})]}),y.jsx(mi,{label:"Limpiar conversacion",withArrow:!0,children:y.jsx(Ot,{variant:"subtle",color:"gray",size:"sm",onClick:b,disabled:n.length===0,children:y.jsx(vu,{size:14})})})]}),y.jsx(Ua,{viewportRef:d,style:{flex:1},type:"auto",p:"xs",children:y.jsxs(ft,{gap:"xs",children:[n.length===0&&!a&&y.jsxs(Ye,{size:"sm",c:"dimmed",ta:"center",mt:"md",children:["Escribe algo. Ejemplos:",y.jsx("br",{}),'- "crea columna Backlog"',y.jsx("br",{}),'- "anade tarjeta para revisar PR de Lucas en Doing"',y.jsx("br",{}),'- "que hay en Doing?"']}),n.map((w,k)=>y.jsx(FM,{msg:w},k)),a&&y.jsx(FM,{msg:{role:"assistant",content:l,ts:Date.now(),tool_calls:c.length>0?c:void 0},streaming:!0}),a&&l===""&&c.length===0&&y.jsxs(un,{gap:6,pl:"xs",children:[y.jsx(Fi,{size:"xs"}),y.jsx(Ye,{size:"xs",c:"dimmed",children:"Pensando..."})]})]})}),y.jsx(ft,{gap:4,p:"xs",style:{borderTop:"1px solid var(--mantine-color-dark-4)"},children:y.jsxs(un,{align:"flex-end",gap:4,wrap:"nowrap",children:[y.jsx(Kf,{placeholder:"Pide algo... (Enter envia, Shift+Enter newline)",value:i,onChange:w=>r(w.currentTarget.value),onKeyDown:v,disabled:a,autosize:!0,minRows:1,maxRows:6,style:{flex:1}}),y.jsx(Ot,{size:"lg",variant:"filled",onClick:p,disabled:!i.trim()||a,"aria-label":"Send",children:a?y.jsx(Fi,{size:"xs",color:"white"}):y.jsx(HF,{size:16})})]})})]})}function FM({msg:e,streaming:n=!1}){const t=e.role==="user";return y.jsx(Ht,{p:"xs",radius:"md",withBorder:!0,bg:t?"blue.9":"dark.6",style:{alignSelf:t?"flex-end":"flex-start",maxWidth:"92%"},children:y.jsxs(ft,{gap:4,children:[e.content&&y.jsx(ye,{className:"kanban-md",style:{fontSize:13,lineHeight:1.45,color:"var(--mantine-color-text)"},children:y.jsx(nde,{remarkPlugins:[mme],children:e.content})}),n&&e.content&&y.jsx(ye,{style:{display:"inline-block",width:8,height:14,background:"currentColor",opacity:.6}}),e.tool_calls&&e.tool_calls.length>0&&y.jsx(un,{gap:4,wrap:"wrap",children:e.tool_calls.map((i,r)=>y.jsxs(hi,{size:"xs",color:i.ok?"teal":"red",variant:"light",title:i.error||"",leftSection:i.ok&&n?y.jsx(Fi,{size:8,color:"teal"}):null,children:[i.tool,!i.ok&&i.error?`: ${i.error}`:""]},r))})]})})}const gme=["Lun","Mar","Mie","Jue","Vie","Sab","Dom"];function yme({users:e,cards:n,onJumpToCard:t}){const[i,r]=A.useState(null),[a,o]=A.useState(new Date),[l,f]=A.useState(null),[c,h]=A.useState(null),[d,p]=A.useState(!1);A.useEffect(()=>{let x=!1;p(!0);const C=Le(a).startOf("month").format("YYYY-MM-DD"),T=Le(a).endOf("month").format("YYYY-MM-DD");return DB({from:C,to:T,assignee_id:l||void 0}).then(O=>{x||h(O)}).finally(()=>{x||p(!1)}),()=>{x=!0}},[a,l]);const v=A.useMemo(()=>e.map(x=>({value:x.id,label:x.display_name||x.username})),[e]),b=A.useMemo(()=>{const x=new Map;if(!c)return x;for(const C of c.created_daily){const T=x.get(C.date)??{created:0,done:0,deadlines:[]};T.created=C.count,x.set(C.date,T)}for(const C of c.throughput_daily){const T=x.get(C.date)??{created:0,done:0,deadlines:[]};T.done=C.count,x.set(C.date,T)}for(const C of n){if(!C.deadline||C.deleted_at)continue;const T=C.deadline.slice(0,10),O=x.get(T)??{created:0,done:0,deadlines:[]};O.deadlines.push(C),x.set(T,O)}return x},[c,n]),w=A.useMemo(()=>{const x=Le(a).startOf("month"),C=Le(a).endOf("month"),T=(x.day()+6)%7,O=[];for(let E=0;EArray.from(b.values()).reduce((x,C)=>x+C.created,0),[b]),_=A.useMemo(()=>Array.from(b.values()).reduce((x,C)=>x+C.done,0),[b]);return y.jsx(ye,{p:"md",children:y.jsxs(ft,{gap:"md",children:[y.jsxs(un,{justify:"space-between",children:[y.jsx(ju,{order:3,children:"Calendario"}),y.jsxs(un,{gap:"xs",wrap:"nowrap",children:[y.jsx(XC,{label:"Mes",size:"xs",value:a,onChange:x=>x&&o(typeof x=="string"?new Date(x):x),style:{minWidth:160},clearable:!1}),y.jsx(ho,{label:"Asignado",size:"xs",placeholder:"Todos",value:l,onChange:f,data:v,clearable:!0,searchable:!0,style:{minWidth:180}})]})]}),y.jsxs(un,{gap:"md",children:[y.jsx(Ht,{withBorder:!0,p:"sm",radius:"md",children:y.jsxs(un,{gap:6,children:[y.jsx(Gh,{size:14,color:"var(--mantine-color-blue-5)"}),y.jsx(Ye,{size:"sm",fw:600,children:k}),y.jsx(Ye,{size:"xs",c:"dimmed",children:"creadas"})]})}),y.jsx(Ht,{withBorder:!0,p:"sm",radius:"md",children:y.jsxs(un,{gap:6,children:[y.jsx(Wh,{size:14,color:"var(--mantine-color-green-5)"}),y.jsx(Ye,{size:"sm",fw:600,children:_}),y.jsx(Ye,{size:"xs",c:"dimmed",children:"hechas"})]})})]}),d&&!c?y.jsx(Mc,{p:"xl",children:y.jsx(Fi,{})}):y.jsxs(Ht,{withBorder:!0,p:"md",radius:"md",children:[y.jsx(Fh,{cols:7,spacing:4,mb:4,children:gme.map(x=>y.jsx(Ye,{size:"xs",c:"dimmed",ta:"center",fw:600,children:x},x))}),y.jsx(Fh,{cols:7,spacing:4,children:w.map((x,C)=>{if(!x.date)return y.jsx(ye,{style:{minHeight:72}},C);const T=b.get(x.date)??{created:0,done:0,deadlines:[]},O=parseInt(x.date.slice(8,10),10),E=x.date===Le().format("YYYY-MM-DD"),M=Le().startOf("day").valueOf(),F=Le(x.date).startOf("day").valueOf()0?"rgba(81, 207, 102, 0.08)":T.created>0?"rgba(34, 139, 230, 0.06)":void 0},children:y.jsxs(ft,{gap:2,children:[y.jsx(Ye,{size:"xs",fw:E?700:500,c:E?"blue":void 0,children:O}),T.created>0&&y.jsxs(un,{gap:3,wrap:"nowrap",children:[y.jsx(Gh,{size:10,color:"var(--mantine-color-blue-5)"}),y.jsx(Ye,{size:"xs",c:"blue",children:T.created})]}),T.done>0&&y.jsxs(un,{gap:3,wrap:"nowrap",children:[y.jsx(Wh,{size:10,color:"var(--mantine-color-green-5)"}),y.jsx(Ye,{size:"xs",c:"green",children:T.done})]}),T.deadlines.length>0&&y.jsxs(En,{opened:i===x.date,onChange:R=>r(R?x.date:null),position:"bottom",withArrow:!0,shadow:"md",width:280,children:[y.jsx(En.Target,{children:y.jsx(pi,{onClick:()=>r(i===x.date?null:x.date),style:{textAlign:"left"},children:y.jsx(ft,{gap:1,children:y.jsxs(un,{gap:3,wrap:"nowrap",children:[y.jsx(BF,{size:10,color:F?"var(--mantine-color-red-5)":"var(--mantine-color-orange-5)"}),y.jsxs(Ye,{size:"xs",c:F?"red":"orange",fw:700,td:"underline",children:[T.deadlines.length," deadline",T.deadlines.length===1?"":"s"]})]})})})}),y.jsx(En.Dropdown,{p:6,children:y.jsxs(ft,{gap:2,children:[y.jsxs(Ye,{size:"xs",c:"dimmed",fw:600,mb:2,children:["Vencen el ",Le(x.date).format("DD/MM/YYYY")]}),T.deadlines.map(R=>y.jsx(pi,{onClick:()=>{r(null),t==null||t(R.id)},style:{padding:"4px 6px",borderRadius:4,background:"var(--mantine-color-dark-6)"},children:y.jsxs(un,{gap:6,wrap:"nowrap",children:[y.jsxs(Ye,{size:"xs",c:"dimmed",ff:"monospace",children:["#",String(R.seq_num).padStart(5,"0")]}),y.jsx(Ye,{size:"xs",lineClamp:1,title:R.title,children:R.title})]})},R.id))]})})]})]})},C)})})]})]})})}function Zq(e){return e?e.reduce((n,t)=>{const i=t.name.search(/\./);if(i>=0){const r=t.name.substring(i+1);return n[r]=t.label,n}return n[t.name]=t.label,n},{}):{}}var bme={tooltip:"m_e4d36c9b",tooltipLabel:"m_7f4bcb19",tooltipBody:"m_3de554dd",tooltipItemColor:"m_b30369b5",tooltipItem:"m_3de8964e",tooltipItemBody:"m_50186d10",tooltipItemName:"m_501dadf9",tooltipItemData:"m_50192318"};function wme(e){return e.map(n=>{if(!n.payload||n.payload[n.name])return n;const t=n.name.search(/\./);if(t>=0){const i=n.name.substring(0,t),r={...n.payload[i]},a=Object.entries(n.payload).reduce((o,l)=>{const[f,c]=l;return f===i?o:{...o,[f]:c}},{});return{...n,name:n.name.substring(t+1),payload:{...a,...r}}}return n})}function kme(e,n){const t=wme(e.filter(i=>i.fill!=="none"||!i.color));return n?t.filter(i=>i.name===n):t}function qM(e,n){return n==="radial"||n==="scatter"?Array.isArray(e.value)?e.value[1]-e.value[0]:e.value:Array.isArray(e.payload[e.dataKey])?e.payload[e.dataKey][1]-e.payload[e.dataKey][0]:e.payload[e.name]}const _me={type:"area",showColor:!0},b9=De(e=>{var R,L;const n=ke("ChartTooltip",_me,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,payload:f,label:c,unit:h,type:d,segmentId:p,mod:v,series:b,valueFormatter:w,showColor:k,attributes:_,...x}=n,C=oi(),T=Qe({name:"ChartTooltip",classes:bme,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:_});if(!f)return null;const O=kme(f,p),E=d==="scatter"?(L=(R=f[0])==null?void 0:R.payload)==null?void 0:L.name:null,M=Zq(b),N=c||E,F=O.map(B=>y.jsxs("div",{"data-type":d,...T("tooltipItem"),children:[y.jsxs("div",{...T("tooltipItemBody"),children:[k&&y.jsx("svg",{...T("tooltipItemColor"),children:y.jsx("circle",{r:6,fill:ot(B.color,C),width:12,height:12,cx:6,cy:6})}),y.jsx("div",{...T("tooltipItemName"),children:M[B.name]||B.name})]}),y.jsxs("div",{...T("tooltipItemData"),children:[typeof w=="function"?w(qM(B,d)):qM(B,d),h||B.unit]})]},(B==null?void 0:B.key)??B.name));return y.jsxs(ye,{...T("tooltip"),mod:[{type:d},v],...x,children:[N&&y.jsx("div",{...T("tooltipLabel"),children:N}),y.jsx("div",{...T("tooltipBody"),children:F})]})});b9.displayName="@mantine/charts/ChartTooltip";var Qq={legend:"m_847eaf",legendItem:"m_17da7e62",legendItemColor:"m_6e236e21",legendItemName:"m_8ff56c0d"};function xme(e){return e.map(n=>{var i;const t=(i=n.dataKey)==null?void 0:i.split(".").pop();return{...n,dataKey:t,payload:{...n.payload,name:t,dataKey:t}}})}function Sme(e){return xme(e.filter(n=>n.color!=="none"))}const f0=De(e=>{const n=ke("ChartLegend",null,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,payload:f,onHighlight:c,legendPosition:h,mod:d,series:p,showColor:v,centered:b,attributes:w,...k}=n,_=Qe({name:"ChartLegend",classes:Qq,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:w,rootSelector:"legend"});if(!f)return null;const x=Sme(f),C=Zq(p),T=x.map((O,E)=>y.jsxs("div",{..._("legendItem"),onMouseEnter:()=>c(O.dataKey),onMouseLeave:()=>c(null),"data-without-color":v===!1||void 0,children:[y.jsx(Dc,{color:O.color,size:12,..._("legendItemColor"),withShadow:!1}),y.jsx("p",{..._("legendItemName"),children:C[O.dataKey]||O.dataKey})]},E));return y.jsx(ye,{mod:[{position:h,centered:b},d],..._("legend"),...k,children:T})});f0.displayName="@mantine/charts/ChartLegend";f0.classes=Qq;function Cme({x:e,y:n,value:t,valueFormatter:i}){return y.jsx("g",{transform:`translate(${e},${n})`,children:y.jsx("text",{x:0,y:0,dy:-8,dx:-10,textAnchor:"start",fill:"var(--chart-text-color, var(--mantine-color-dimmed))",fontSize:8,children:i?i(t):t})})}var c0={root:"m_a50f3e58",container:"m_af9188cb",grid:"m_a50a48bc",axis:"m_a507a517",axisLabel:"m_2293801d",tooltip:"m_92b296cd"},Zk,HM;function xr(){if(HM)return Zk;HM=1;var e=Array.isArray;return Zk=e,Zk}var Qk,UM;function Jq(){if(UM)return Qk;UM=1;var e=typeof Av=="object"&&Av&&Av.Object===Object&&Av;return Qk=e,Qk}var Jk,VM;function _o(){if(VM)return Jk;VM=1;var e=Jq(),n=typeof self=="object"&&self&&self.Object===Object&&self,t=e||n||Function("return this")();return Jk=t,Jk}var e_,WM;function ap(){if(WM)return e_;WM=1;var e=_o(),n=e.Symbol;return e_=n,e_}var n_,GM;function Ame(){if(GM)return n_;GM=1;var e=ap(),n=Object.prototype,t=n.hasOwnProperty,i=n.toString,r=e?e.toStringTag:void 0;function a(o){var l=t.call(o,r),f=o[r];try{o[r]=void 0;var c=!0}catch{}var h=i.call(o);return c&&(l?o[r]=f:delete o[r]),h}return n_=a,n_}var t_,YM;function Ome(){if(YM)return t_;YM=1;var e=Object.prototype,n=e.toString;function t(i){return n.call(i)}return t_=t,t_}var i_,KM;function ms(){if(KM)return i_;KM=1;var e=ap(),n=Ame(),t=Ome(),i="[object Null]",r="[object Undefined]",a=e?e.toStringTag:void 0;function o(l){return l==null?l===void 0?r:i:a&&a in Object(l)?n(l):t(l)}return i_=o,i_}var r_,XM;function ps(){if(XM)return r_;XM=1;function e(n){return n!=null&&typeof n=="object"}return r_=e,r_}var a_,ZM;function Uc(){if(ZM)return a_;ZM=1;var e=ms(),n=ps(),t="[object Symbol]";function i(r){return typeof r=="symbol"||n(r)&&e(r)==t}return a_=i,a_}var o_,QM;function w9(){if(QM)return o_;QM=1;var e=xr(),n=Uc(),t=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,i=/^\w*$/;function r(a,o){if(e(a))return!1;var l=typeof a;return l=="number"||l=="symbol"||l=="boolean"||a==null||n(a)?!0:i.test(a)||!t.test(a)||o!=null&&a in Object(o)}return o_=r,o_}var s_,JM;function pl(){if(JM)return s_;JM=1;function e(n){var t=typeof n;return n!=null&&(t=="object"||t=="function")}return s_=e,s_}var l_,e8;function k9(){if(e8)return l_;e8=1;var e=ms(),n=pl(),t="[object AsyncFunction]",i="[object Function]",r="[object GeneratorFunction]",a="[object Proxy]";function o(l){if(!n(l))return!1;var f=e(l);return f==i||f==r||f==t||f==a}return l_=o,l_}var u_,n8;function Eme(){if(n8)return u_;n8=1;var e=_o(),n=e["__core-js_shared__"];return u_=n,u_}var f_,t8;function Tme(){if(t8)return f_;t8=1;var e=Eme(),n=(function(){var i=/[^.]+$/.exec(e&&e.keys&&e.keys.IE_PROTO||"");return i?"Symbol(src)_1."+i:""})();function t(i){return!!n&&n in i}return f_=t,f_}var c_,i8;function eH(){if(i8)return c_;i8=1;var e=Function.prototype,n=e.toString;function t(i){if(i!=null){try{return n.call(i)}catch{}try{return i+""}catch{}}return""}return c_=t,c_}var d_,r8;function jme(){if(r8)return d_;r8=1;var e=k9(),n=Tme(),t=pl(),i=eH(),r=/[\\^$.*+?()[\]{}|]/g,a=/^\[object .+?Constructor\]$/,o=Function.prototype,l=Object.prototype,f=o.toString,c=l.hasOwnProperty,h=RegExp("^"+f.call(c).replace(r,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function d(p){if(!t(p)||n(p))return!1;var v=e(p)?h:a;return v.test(i(p))}return d_=d,d_}var h_,a8;function Mme(){if(a8)return h_;a8=1;function e(n,t){return n==null?void 0:n[t]}return h_=e,h_}var m_,o8;function Pu(){if(o8)return m_;o8=1;var e=jme(),n=Mme();function t(i,r){var a=n(i,r);return e(a)?a:void 0}return m_=t,m_}var p_,s8;function d0(){if(s8)return p_;s8=1;var e=Pu(),n=e(Object,"create");return p_=n,p_}var v_,l8;function Dme(){if(l8)return v_;l8=1;var e=d0();function n(){this.__data__=e?e(null):{},this.size=0}return v_=n,v_}var g_,u8;function Rme(){if(u8)return g_;u8=1;function e(n){var t=this.has(n)&&delete this.__data__[n];return this.size-=t?1:0,t}return g_=e,g_}var y_,f8;function Pme(){if(f8)return y_;f8=1;var e=d0(),n="__lodash_hash_undefined__",t=Object.prototype,i=t.hasOwnProperty;function r(a){var o=this.__data__;if(e){var l=o[a];return l===n?void 0:l}return i.call(o,a)?o[a]:void 0}return y_=r,y_}var b_,c8;function Nme(){if(c8)return b_;c8=1;var e=d0(),n=Object.prototype,t=n.hasOwnProperty;function i(r){var a=this.__data__;return e?a[r]!==void 0:t.call(a,r)}return b_=i,b_}var w_,d8;function $me(){if(d8)return w_;d8=1;var e=d0(),n="__lodash_hash_undefined__";function t(i,r){var a=this.__data__;return this.size+=this.has(i)?0:1,a[i]=e&&r===void 0?n:r,this}return w_=t,w_}var k_,h8;function zme(){if(h8)return k_;h8=1;var e=Dme(),n=Rme(),t=Pme(),i=Nme(),r=$me();function a(o){var l=-1,f=o==null?0:o.length;for(this.clear();++l-1}return O_=n,O_}var E_,w8;function qme(){if(w8)return E_;w8=1;var e=h0();function n(t,i){var r=this.__data__,a=e(r,t);return a<0?(++this.size,r.push([t,i])):r[a][1]=i,this}return E_=n,E_}var T_,k8;function m0(){if(k8)return T_;k8=1;var e=Lme(),n=Ime(),t=Bme(),i=Fme(),r=qme();function a(o){var l=-1,f=o==null?0:o.length;for(this.clear();++l0?1:-1},tu=function(n){return yu(n)&&n.indexOf("%")===n.length-1},Ue=function(n){return cpe(n)&&!Wc(n)},dpe=function(n){return Vn(n)},Si=function(n){return Ue(n)||yu(n)},hpe=0,Gc=function(n){var t=++hpe;return"".concat(n||"").concat(t)},bu=function(n,t){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(!Ue(n)&&!yu(n))return i;var a;if(tu(n)){var o=n.indexOf("%");a=t*parseFloat(n.slice(0,o))/100}else a=+n;return Wc(a)&&(a=i),r&&a>t&&(a=t),a},Ys=function(n){if(!n)return null;var t=Object.keys(n);return t&&t.length?n[t[0]]:null},mpe=function(n){if(!Array.isArray(n))return!1;for(var t=n.length,i={},r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(t[i]=e[i])}return t}function kpe(e,n){if(e==null)return{};var t={};for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){if(n.indexOf(i)>=0)continue;t[i]=e[i]}return t}function YS(e){"@babel/helpers - typeof";return YS=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},YS(e)}var K8={click:"onClick",mousedown:"onMouseDown",mouseup:"onMouseUp",mouseover:"onMouseOver",mousemove:"onMouseMove",mouseout:"onMouseOut",mouseenter:"onMouseEnter",mouseleave:"onMouseLeave",touchcancel:"onTouchCancel",touchend:"onTouchEnd",touchmove:"onTouchMove",touchstart:"onTouchStart",contextmenu:"onContextMenu",dblclick:"onDoubleClick"},Xo=function(n){return typeof n=="string"?n:n?n.displayName||n.name||"Component":""},X8=null,n2=null,E9=function e(n){if(n===X8&&Array.isArray(n2))return n2;var t=[];return A.Children.forEach(n,function(i){Vn(i)||(spe.isFragment(i)?t=t.concat(e(i.props.children)):t.push(i))}),n2=t,X8=n,t};function va(e,n){var t=[],i=[];return Array.isArray(n)?i=n.map(function(r){return Xo(r)}):i=[Xo(n)],E9(e).forEach(function(r){var a=pa(r,"type.displayName")||pa(r,"type.name");i.indexOf(a)!==-1&&t.push(r)}),t}function Br(e,n){var t=va(e,n);return t&&t[0]}var Z8=function(n){if(!n||!n.props)return!1;var t=n.props,i=t.width,r=t.height;return!(!Ue(i)||i<=0||!Ue(r)||r<=0)},_pe=["a","altGlyph","altGlyphDef","altGlyphItem","animate","animateColor","animateMotion","animateTransform","circle","clipPath","color-profile","cursor","defs","desc","ellipse","feBlend","feColormatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","font","font-face","font-face-format","font-face-name","font-face-url","foreignObject","g","glyph","glyphRef","hkern","image","line","lineGradient","marker","mask","metadata","missing-glyph","mpath","path","pattern","polygon","polyline","radialGradient","rect","script","set","stop","style","svg","switch","symbol","text","textPath","title","tref","tspan","use","view","vkern"],xpe=function(n){return n&&n.type&&yu(n.type)&&_pe.indexOf(n.type)>=0},oH=function(n){return n&&YS(n)==="object"&&"clipDot"in n},Spe=function(n,t,i,r){var a,o=(a=e2==null?void 0:e2[r])!==null&&a!==void 0?a:[];return t.startsWith("data-")||!zn(n)&&(r&&o.includes(t)||gpe.includes(t))||i&&O9.includes(t)},qn=function(n,t,i){if(!n||typeof n=="function"||typeof n=="boolean")return null;var r=n;if(A.isValidElement(n)&&(r=n.props),!Vc(r))return null;var a={};return Object.keys(r).forEach(function(o){var l;Spe((l=r)===null||l===void 0?void 0:l[o],o,t,i)&&(a[o]=r[o])}),a},KS=function e(n,t){if(n===t)return!0;var i=A.Children.count(n);if(i!==A.Children.count(t))return!1;if(i===0)return!0;if(i===1)return Q8(Array.isArray(n)?n[0]:n,Array.isArray(t)?t[0]:t);for(var r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(t[i]=e[i])}return t}function Tpe(e,n){if(e==null)return{};var t={};for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){if(n.indexOf(i)>=0)continue;t[i]=e[i]}return t}function ZS(e){var n=e.children,t=e.width,i=e.height,r=e.viewBox,a=e.className,o=e.style,l=e.title,f=e.desc,c=Epe(e,Ope),h=r||{width:t,height:i,x:0,y:0},d=dn("recharts-surface",a);return Q.createElement("svg",XS({},qn(c,!0,"svg"),{className:d,width:t,height:i,style:o,viewBox:"".concat(h.x," ").concat(h.y," ").concat(h.width," ").concat(h.height)}),Q.createElement("title",null,l),Q.createElement("desc",null,f),n)}var jpe=["children","className"];function QS(){return QS=Object.assign?Object.assign.bind():function(e){for(var n=1;n=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(t[i]=e[i])}return t}function Dpe(e,n){if(e==null)return{};var t={};for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){if(n.indexOf(i)>=0)continue;t[i]=e[i]}return t}var Pt=Q.forwardRef(function(e,n){var t=e.children,i=e.className,r=Mpe(e,jpe),a=dn("recharts-layer",i);return Q.createElement("g",QS({className:a},qn(r,!0),{ref:n}),t)}),Zo=function(n,t){for(var i=arguments.length,r=new Array(i>2?i-2:0),a=2;aa?0:a+t),i=i>a?a:i,i<0&&(i+=a),a=t>i?0:i-t>>>0,t>>>=0;for(var o=Array(a);++r=a?t:e(t,i,r)}return i2=n,i2}var r2,tD;function sH(){if(tD)return r2;tD=1;var e="\\ud800-\\udfff",n="\\u0300-\\u036f",t="\\ufe20-\\ufe2f",i="\\u20d0-\\u20ff",r=n+t+i,a="\\ufe0e\\ufe0f",o="\\u200d",l=RegExp("["+o+e+r+a+"]");function f(c){return l.test(c)}return r2=f,r2}var a2,iD;function Npe(){if(iD)return a2;iD=1;function e(n){return n.split("")}return a2=e,a2}var o2,rD;function $pe(){if(rD)return o2;rD=1;var e="\\ud800-\\udfff",n="\\u0300-\\u036f",t="\\ufe20-\\ufe2f",i="\\u20d0-\\u20ff",r=n+t+i,a="\\ufe0e\\ufe0f",o="["+e+"]",l="["+r+"]",f="\\ud83c[\\udffb-\\udfff]",c="(?:"+l+"|"+f+")",h="[^"+e+"]",d="(?:\\ud83c[\\udde6-\\uddff]){2}",p="[\\ud800-\\udbff][\\udc00-\\udfff]",v="\\u200d",b=c+"?",w="["+a+"]?",k="(?:"+v+"(?:"+[h,d,p].join("|")+")"+w+b+")*",_=w+b+k,x="(?:"+[h+l+"?",l,d,p,o].join("|")+")",C=RegExp(f+"(?="+f+")|"+x+_,"g");function T(O){return O.match(C)||[]}return o2=T,o2}var s2,aD;function zpe(){if(aD)return s2;aD=1;var e=Npe(),n=sH(),t=$pe();function i(r){return n(r)?t(r):e(r)}return s2=i,s2}var l2,oD;function Lpe(){if(oD)return l2;oD=1;var e=Ppe(),n=sH(),t=zpe(),i=tH();function r(a){return function(o){o=i(o);var l=n(o)?t(o):void 0,f=l?l[0]:o.charAt(0),c=l?e(l,1).join(""):o.slice(1);return f[a]()+c}}return l2=r,l2}var u2,sD;function Ipe(){if(sD)return u2;sD=1;var e=Lpe(),n=e("toUpperCase");return u2=n,u2}var Bpe=Ipe();const g0=dt(Bpe);function Dt(e){return function(){return e}}const lH=Math.cos,Wg=Math.sin,Va=Math.sqrt,Gg=Math.PI,y0=2*Gg,JS=Math.PI,e4=2*JS,Kl=1e-6,Fpe=e4-Kl;function uH(e){this._+=e[0];for(let n=1,t=e.length;n=0))throw new Error(`invalid digits: ${e}`);if(n>15)return uH;const t=10**n;return function(i){this._+=i[0];for(let r=1,a=i.length;rKl)if(!(Math.abs(d*f-c*h)>Kl)||!a)this._append`L${this._x1=n},${this._y1=t}`;else{let v=i-o,b=r-l,w=f*f+c*c,k=v*v+b*b,_=Math.sqrt(w),x=Math.sqrt(p),C=a*Math.tan((JS-Math.acos((w+p-k)/(2*_*x)))/2),T=C/x,O=C/_;Math.abs(T-1)>Kl&&this._append`L${n+T*h},${t+T*d}`,this._append`A${a},${a},0,0,${+(d*v>h*b)},${this._x1=n+O*f},${this._y1=t+O*c}`}}arc(n,t,i,r,a,o){if(n=+n,t=+t,i=+i,o=!!o,i<0)throw new Error(`negative radius: ${i}`);let l=i*Math.cos(r),f=i*Math.sin(r),c=n+l,h=t+f,d=1^o,p=o?r-a:a-r;this._x1===null?this._append`M${c},${h}`:(Math.abs(this._x1-c)>Kl||Math.abs(this._y1-h)>Kl)&&this._append`L${c},${h}`,i&&(p<0&&(p=p%e4+e4),p>Fpe?this._append`A${i},${i},0,1,${d},${n-l},${t-f}A${i},${i},0,1,${d},${this._x1=c},${this._y1=h}`:p>Kl&&this._append`A${i},${i},0,${+(p>=JS)},${d},${this._x1=n+i*Math.cos(a)},${this._y1=t+i*Math.sin(a)}`)}rect(n,t,i,r){this._append`M${this._x0=this._x1=+n},${this._y0=this._y1=+t}h${i=+i}v${+r}h${-i}Z`}toString(){return this._}}function T9(e){let n=3;return e.digits=function(t){if(!arguments.length)return n;if(t==null)n=null;else{const i=Math.floor(t);if(!(i>=0))throw new RangeError(`invalid digits: ${t}`);n=i}return e},()=>new Hpe(n)}function j9(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function fH(e){this._context=e}fH.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,n){switch(e=+e,n=+n,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,n):this._context.moveTo(e,n);break;case 1:this._point=2;default:this._context.lineTo(e,n);break}}};function b0(e){return new fH(e)}function cH(e){return e[0]}function dH(e){return e[1]}function hH(e,n){var t=Dt(!0),i=null,r=b0,a=null,o=T9(l);e=typeof e=="function"?e:e===void 0?cH:Dt(e),n=typeof n=="function"?n:n===void 0?dH:Dt(n);function l(f){var c,h=(f=j9(f)).length,d,p=!1,v;for(i==null&&(a=r(v=o())),c=0;c<=h;++c)!(c=v;--b)l.point(C[b],T[b]);l.lineEnd(),l.areaEnd()}_&&(C[p]=+e(k,p,d),T[p]=+n(k,p,d),l.point(i?+i(k,p,d):C[p],t?+t(k,p,d):T[p]))}if(x)return l=null,x+""||null}function h(){return hH().defined(r).curve(o).context(a)}return c.x=function(d){return arguments.length?(e=typeof d=="function"?d:Dt(+d),i=null,c):e},c.x0=function(d){return arguments.length?(e=typeof d=="function"?d:Dt(+d),c):e},c.x1=function(d){return arguments.length?(i=d==null?null:typeof d=="function"?d:Dt(+d),c):i},c.y=function(d){return arguments.length?(n=typeof d=="function"?d:Dt(+d),t=null,c):n},c.y0=function(d){return arguments.length?(n=typeof d=="function"?d:Dt(+d),c):n},c.y1=function(d){return arguments.length?(t=d==null?null:typeof d=="function"?d:Dt(+d),c):t},c.lineX0=c.lineY0=function(){return h().x(e).y(n)},c.lineY1=function(){return h().x(e).y(t)},c.lineX1=function(){return h().x(i).y(n)},c.defined=function(d){return arguments.length?(r=typeof d=="function"?d:Dt(!!d),c):r},c.curve=function(d){return arguments.length?(o=d,a!=null&&(l=o(a)),c):o},c.context=function(d){return arguments.length?(d==null?a=l=null:l=o(a=d),c):a},c}class mH{constructor(n,t){this._context=n,this._x=t}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(n,t){switch(n=+n,t=+t,this._point){case 0:{this._point=1,this._line?this._context.lineTo(n,t):this._context.moveTo(n,t);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+n)/2,this._y0,this._x0,t,n,t):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+t)/2,n,this._y0,n,t);break}}this._x0=n,this._y0=t}}function Upe(e){return new mH(e,!0)}function Vpe(e){return new mH(e,!1)}const M9={draw(e,n){const t=Va(n/Gg);e.moveTo(t,0),e.arc(0,0,t,0,y0)}},Wpe={draw(e,n){const t=Va(n/5)/2;e.moveTo(-3*t,-t),e.lineTo(-t,-t),e.lineTo(-t,-3*t),e.lineTo(t,-3*t),e.lineTo(t,-t),e.lineTo(3*t,-t),e.lineTo(3*t,t),e.lineTo(t,t),e.lineTo(t,3*t),e.lineTo(-t,3*t),e.lineTo(-t,t),e.lineTo(-3*t,t),e.closePath()}},pH=Va(1/3),Gpe=pH*2,Ype={draw(e,n){const t=Va(n/Gpe),i=t*pH;e.moveTo(0,-t),e.lineTo(i,0),e.lineTo(0,t),e.lineTo(-i,0),e.closePath()}},Kpe={draw(e,n){const t=Va(n),i=-t/2;e.rect(i,i,t,t)}},Xpe=.8908130915292852,vH=Wg(Gg/10)/Wg(7*Gg/10),Zpe=Wg(y0/10)*vH,Qpe=-lH(y0/10)*vH,Jpe={draw(e,n){const t=Va(n*Xpe),i=Zpe*t,r=Qpe*t;e.moveTo(0,-t),e.lineTo(i,r);for(let a=1;a<5;++a){const o=y0*a/5,l=lH(o),f=Wg(o);e.lineTo(f*t,-l*t),e.lineTo(l*i-f*r,f*i+l*r)}e.closePath()}},f2=Va(3),eve={draw(e,n){const t=-Va(n/(f2*3));e.moveTo(0,t*2),e.lineTo(-f2*t,-t),e.lineTo(f2*t,-t),e.closePath()}},aa=-.5,oa=Va(3)/2,n4=1/Va(12),nve=(n4/2+1)*3,tve={draw(e,n){const t=Va(n/nve),i=t/2,r=t*n4,a=i,o=t*n4+t,l=-a,f=o;e.moveTo(i,r),e.lineTo(a,o),e.lineTo(l,f),e.lineTo(aa*i-oa*r,oa*i+aa*r),e.lineTo(aa*a-oa*o,oa*a+aa*o),e.lineTo(aa*l-oa*f,oa*l+aa*f),e.lineTo(aa*i+oa*r,aa*r-oa*i),e.lineTo(aa*a+oa*o,aa*o-oa*a),e.lineTo(aa*l+oa*f,aa*f-oa*l),e.closePath()}};function ive(e,n){let t=null,i=T9(r);e=typeof e=="function"?e:Dt(e||M9),n=typeof n=="function"?n:Dt(n===void 0?64:+n);function r(){let a;if(t||(t=a=i()),e.apply(this,arguments).draw(t,+n.apply(this,arguments)),a)return t=null,a+""||null}return r.type=function(a){return arguments.length?(e=typeof a=="function"?a:Dt(a),r):e},r.size=function(a){return arguments.length?(n=typeof a=="function"?a:Dt(+a),r):n},r.context=function(a){return arguments.length?(t=a??null,r):t},r}function Yg(){}function Kg(e,n,t){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+n)/6,(e._y0+4*e._y1+t)/6)}function gH(e){this._context=e}gH.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:Kg(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,n){switch(e=+e,n=+n,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,n):this._context.moveTo(e,n);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:Kg(this,e,n);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=n}};function rve(e){return new gH(e)}function yH(e){this._context=e}yH.prototype={areaStart:Yg,areaEnd:Yg,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(e,n){switch(e=+e,n=+n,this._point){case 0:this._point=1,this._x2=e,this._y2=n;break;case 1:this._point=2,this._x3=e,this._y3=n;break;case 2:this._point=3,this._x4=e,this._y4=n,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+n)/6);break;default:Kg(this,e,n);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=n}};function ave(e){return new yH(e)}function bH(e){this._context=e}bH.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,n){switch(e=+e,n=+n,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var t=(this._x0+4*this._x1+e)/6,i=(this._y0+4*this._y1+n)/6;this._line?this._context.lineTo(t,i):this._context.moveTo(t,i);break;case 3:this._point=4;default:Kg(this,e,n);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=n}};function ove(e){return new bH(e)}function wH(e){this._context=e}wH.prototype={areaStart:Yg,areaEnd:Yg,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,n){e=+e,n=+n,this._point?this._context.lineTo(e,n):(this._point=1,this._context.moveTo(e,n))}};function sve(e){return new wH(e)}function lD(e){return e<0?-1:1}function uD(e,n,t){var i=e._x1-e._x0,r=n-e._x1,a=(e._y1-e._y0)/(i||r<0&&-0),o=(t-e._y1)/(r||i<0&&-0),l=(a*r+o*i)/(i+r);return(lD(a)+lD(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(l))||0}function fD(e,n){var t=e._x1-e._x0;return t?(3*(e._y1-e._y0)/t-n)/2:n}function c2(e,n,t){var i=e._x0,r=e._y0,a=e._x1,o=e._y1,l=(a-i)/3;e._context.bezierCurveTo(i+l,r+l*n,a-l,o-l*t,a,o)}function Xg(e){this._context=e}Xg.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:c2(this,this._t0,fD(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,n){var t=NaN;if(e=+e,n=+n,!(e===this._x1&&n===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,n):this._context.moveTo(e,n);break;case 1:this._point=2;break;case 2:this._point=3,c2(this,fD(this,t=uD(this,e,n)),t);break;default:c2(this,this._t0,t=uD(this,e,n));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=n,this._t0=t}}};function kH(e){this._context=new _H(e)}(kH.prototype=Object.create(Xg.prototype)).point=function(e,n){Xg.prototype.point.call(this,n,e)};function _H(e){this._context=e}_H.prototype={moveTo:function(e,n){this._context.moveTo(n,e)},closePath:function(){this._context.closePath()},lineTo:function(e,n){this._context.lineTo(n,e)},bezierCurveTo:function(e,n,t,i,r,a){this._context.bezierCurveTo(n,e,i,t,a,r)}};function lve(e){return new Xg(e)}function uve(e){return new kH(e)}function xH(e){this._context=e}xH.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,n=this._y,t=e.length;if(t)if(this._line?this._context.lineTo(e[0],n[0]):this._context.moveTo(e[0],n[0]),t===2)this._context.lineTo(e[1],n[1]);else for(var i=cD(e),r=cD(n),a=0,o=1;o=0;--n)r[n]=(o[n]-r[n+1])/a[n];for(a[t-1]=(e[t]+r[t-1])/2,n=0;n=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,n){switch(e=+e,n=+n,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,n):this._context.moveTo(e,n);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,n),this._context.lineTo(e,n);else{var t=this._x*(1-this._t)+e*this._t;this._context.lineTo(t,this._y),this._context.lineTo(t,n)}break}}this._x=e,this._y=n}};function cve(e){return new w0(e,.5)}function dve(e){return new w0(e,0)}function hve(e){return new w0(e,1)}function Jf(e,n){if((o=e.length)>1)for(var t=1,i,r,a=e[n[0]],o,l=a.length;t=0;)t[n]=n;return t}function mve(e,n){return e[n]}function pve(e){const n=[];return n.key=e,n}function vve(){var e=Dt([]),n=t4,t=Jf,i=mve;function r(a){var o=Array.from(e.apply(this,arguments),pve),l,f=o.length,c=-1,h;for(const d of a)for(l=0,++c;l0){for(var t,i,r=0,a=e[0].length,o;r0){for(var t=0,i=e[n[0]],r,a=i.length;t0)||!((a=(r=e[n[0]]).length)>0))){for(var t=0,i=1,r,a,o;i=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(t[i]=e[i])}return t}function Cve(e,n){if(e==null)return{};var t={};for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){if(n.indexOf(i)>=0)continue;t[i]=e[i]}return t}var SH={symbolCircle:M9,symbolCross:Wpe,symbolDiamond:Ype,symbolSquare:Kpe,symbolStar:Jpe,symbolTriangle:eve,symbolWye:tve},Ave=Math.PI/180,Ove=function(n){var t="symbol".concat(g0(n));return SH[t]||M9},Eve=function(n,t,i){if(t==="area")return n;switch(i){case"cross":return 5*n*n/9;case"diamond":return .5*n*n/Math.sqrt(3);case"square":return n*n;case"star":{var r=18*Ave;return 1.25*n*n*(Math.tan(r)-Math.tan(r*2)*Math.pow(Math.tan(r),2))}case"triangle":return Math.sqrt(3)*n*n/4;case"wye":return(21-10*Math.sqrt(3))*n*n/8;default:return Math.PI*n*n/4}},Tve=function(n,t){SH["symbol".concat(g0(n))]=t},D9=function(n){var t=n.type,i=t===void 0?"circle":t,r=n.size,a=r===void 0?64:r,o=n.sizeType,l=o===void 0?"area":o,f=Sve(n,wve),c=hD(hD({},f),{},{type:i,size:a,sizeType:l}),h=function(){var k=Ove(i),_=ive().type(k).size(Eve(a,l,i));return _()},d=c.className,p=c.cx,v=c.cy,b=qn(c,!0);return p===+p&&v===+v&&a===+a?Q.createElement("path",i4({},b,{className:dn("recharts-symbols",d),transform:"translate(".concat(p,", ").concat(v,")"),d:h()})):null};D9.registerSymbol=Tve;function ec(e){"@babel/helpers - typeof";return ec=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},ec(e)}function r4(){return r4=Object.assign?Object.assign.bind():function(e){for(var n=1;n`);var x=v.inactive?c:v.color;return Q.createElement("li",r4({className:k,style:d,key:"legend-item-".concat(b)},Vg(i.props,v,b)),Q.createElement(ZS,{width:o,height:o,viewBox:h,style:p},i.renderIcon(v)),Q.createElement("span",{className:"recharts-legend-item-text",style:{color:x}},w?w(_,v,b):_))})}},{key:"render",value:function(){var i=this.props,r=i.payload,a=i.layout,o=i.align;if(!r||!r.length)return null;var l={padding:0,margin:0,textAlign:a==="horizontal"?o:"left"};return Q.createElement("ul",{className:"recharts-default-legend",style:l},this.renderItems())}}])})(A.PureComponent);Zh(R9,"displayName","Legend");Zh(R9,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"middle",inactiveColor:"#ccc"});var d2,pD;function Ive(){if(pD)return d2;pD=1;var e=m0();function n(){this.__data__=new e,this.size=0}return d2=n,d2}var h2,vD;function Bve(){if(vD)return h2;vD=1;function e(n){var t=this.__data__,i=t.delete(n);return this.size=t.size,i}return h2=e,h2}var m2,gD;function Fve(){if(gD)return m2;gD=1;function e(n){return this.__data__.get(n)}return m2=e,m2}var p2,yD;function qve(){if(yD)return p2;yD=1;function e(n){return this.__data__.has(n)}return p2=e,p2}var v2,bD;function Hve(){if(bD)return v2;bD=1;var e=m0(),n=x9(),t=S9(),i=200;function r(a,o){var l=this.__data__;if(l instanceof e){var f=l.__data__;if(!n||f.lengthv))return!1;var w=d.get(o),k=d.get(l);if(w&&k)return w==l&&k==o;var _=-1,x=!0,C=f&r?new e:void 0;for(d.set(o,l),d.set(l,o);++_-1&&i%1==0&&i-1&&t%1==0&&t<=e}return L2=n,L2}var I2,HD;function tge(){if(HD)return I2;HD=1;var e=ms(),n=z9(),t=ps(),i="[object Arguments]",r="[object Array]",a="[object Boolean]",o="[object Date]",l="[object Error]",f="[object Function]",c="[object Map]",h="[object Number]",d="[object Object]",p="[object RegExp]",v="[object Set]",b="[object String]",w="[object WeakMap]",k="[object ArrayBuffer]",_="[object DataView]",x="[object Float32Array]",C="[object Float64Array]",T="[object Int8Array]",O="[object Int16Array]",E="[object Int32Array]",M="[object Uint8Array]",N="[object Uint8ClampedArray]",F="[object Uint16Array]",R="[object Uint32Array]",L={};L[x]=L[C]=L[T]=L[O]=L[E]=L[M]=L[N]=L[F]=L[R]=!0,L[i]=L[r]=L[k]=L[a]=L[_]=L[o]=L[l]=L[f]=L[c]=L[h]=L[d]=L[p]=L[v]=L[b]=L[w]=!1;function B(G){return t(G)&&n(G.length)&&!!L[e(G)]}return I2=B,I2}var B2,UD;function PH(){if(UD)return B2;UD=1;function e(n){return function(t){return n(t)}}return B2=e,B2}var vh={exports:{}};vh.exports;var VD;function ige(){return VD||(VD=1,(function(e,n){var t=Jq(),i=n&&!n.nodeType&&n,r=i&&!0&&e&&!e.nodeType&&e,a=r&&r.exports===i,o=a&&t.process,l=(function(){try{var f=r&&r.require&&r.require("util").types;return f||o&&o.binding&&o.binding("util")}catch{}})();e.exports=l})(vh,vh.exports)),vh.exports}var F2,WD;function NH(){if(WD)return F2;WD=1;var e=tge(),n=PH(),t=ige(),i=t&&t.isTypedArray,r=i?n(i):e;return F2=r,F2}var q2,GD;function rge(){if(GD)return q2;GD=1;var e=Jve(),n=N9(),t=xr(),i=RH(),r=$9(),a=NH(),o=Object.prototype,l=o.hasOwnProperty;function f(c,h){var d=t(c),p=!d&&n(c),v=!d&&!p&&i(c),b=!d&&!p&&!v&&a(c),w=d||p||v||b,k=w?e(c.length,String):[],_=k.length;for(var x in c)(h||l.call(c,x))&&!(w&&(x=="length"||v&&(x=="offset"||x=="parent")||b&&(x=="buffer"||x=="byteLength"||x=="byteOffset")||r(x,_)))&&k.push(x);return k}return q2=f,q2}var H2,YD;function age(){if(YD)return H2;YD=1;var e=Object.prototype;function n(t){var i=t&&t.constructor,r=typeof i=="function"&&i.prototype||e;return t===r}return H2=n,H2}var U2,KD;function $H(){if(KD)return U2;KD=1;function e(n,t){return function(i){return n(t(i))}}return U2=e,U2}var V2,XD;function oge(){if(XD)return V2;XD=1;var e=$H(),n=e(Object.keys,Object);return V2=n,V2}var W2,ZD;function sge(){if(ZD)return W2;ZD=1;var e=age(),n=oge(),t=Object.prototype,i=t.hasOwnProperty;function r(a){if(!e(a))return n(a);var o=[];for(var l in Object(a))i.call(a,l)&&l!="constructor"&&o.push(l);return o}return W2=r,W2}var G2,QD;function op(){if(QD)return G2;QD=1;var e=k9(),n=z9();function t(i){return i!=null&&n(i.length)&&!e(i)}return G2=t,G2}var Y2,JD;function k0(){if(JD)return Y2;JD=1;var e=rge(),n=sge(),t=op();function i(r){return t(r)?e(r):n(r)}return Y2=i,Y2}var K2,e7;function lge(){if(e7)return K2;e7=1;var e=Kve(),n=Qve(),t=k0();function i(r){return e(r,t,n)}return K2=i,K2}var X2,n7;function uge(){if(n7)return X2;n7=1;var e=lge(),n=1,t=Object.prototype,i=t.hasOwnProperty;function r(a,o,l,f,c,h){var d=l&n,p=e(a),v=p.length,b=e(o),w=b.length;if(v!=w&&!d)return!1;for(var k=v;k--;){var _=p[k];if(!(d?_ in o:i.call(o,_)))return!1}var x=h.get(a),C=h.get(o);if(x&&C)return x==o&&C==a;var T=!0;h.set(a,o),h.set(o,a);for(var O=d;++k-1}return _x=n,_x}var xx,E7;function Tge(){if(E7)return xx;E7=1;function e(n,t,i){for(var r=-1,a=n==null?0:n.length;++r=o){var _=c?null:r(f);if(_)return a(_);b=!1,p=i,k=new e}else k=c?[]:w;e:for(;++d=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(t[i]=e[i])}return t}function Uge(e,n){if(e==null)return{};var t={};for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){if(n.indexOf(i)>=0)continue;t[i]=e[i]}return t}function Vge(e){return e.value}function Wge(e,n){if(Q.isValidElement(e))return Q.cloneElement(e,n);if(typeof e=="function")return Q.createElement(e,n);n.ref;var t=Hge(n,Nge);return Q.createElement(R9,t)}var $7=1,Qo=(function(e){function n(){var t;$ge(this,n);for(var i=arguments.length,r=new Array(i),a=0;a$7||Math.abs(r.height-this.lastBoundingBox.height)>$7)&&(this.lastBoundingBox.width=r.width,this.lastBoundingBox.height=r.height,i&&i(r)):(this.lastBoundingBox.width!==-1||this.lastBoundingBox.height!==-1)&&(this.lastBoundingBox.width=-1,this.lastBoundingBox.height=-1,i&&i(null))}},{key:"getBBoxSnapshot",value:function(){return this.lastBoundingBox.width>=0&&this.lastBoundingBox.height>=0?Bo({},this.lastBoundingBox):{width:0,height:0}}},{key:"getDefaultPosition",value:function(i){var r=this.props,a=r.layout,o=r.align,l=r.verticalAlign,f=r.margin,c=r.chartWidth,h=r.chartHeight,d,p;if(!i||(i.left===void 0||i.left===null)&&(i.right===void 0||i.right===null))if(o==="center"&&a==="vertical"){var v=this.getBBoxSnapshot();d={left:((c||0)-v.width)/2}}else d=o==="right"?{right:f&&f.right||0}:{left:f&&f.left||0};if(!i||(i.top===void 0||i.top===null)&&(i.bottom===void 0||i.bottom===null))if(l==="middle"){var b=this.getBBoxSnapshot();p={top:((h||0)-b.height)/2}}else p=l==="bottom"?{bottom:f&&f.bottom||0}:{top:f&&f.top||0};return Bo(Bo({},d),p)}},{key:"render",value:function(){var i=this,r=this.props,a=r.content,o=r.width,l=r.height,f=r.wrapperStyle,c=r.payloadUniqBy,h=r.payload,d=Bo(Bo({position:"absolute",width:o||"auto",height:l||"auto"},this.getDefaultPosition(f)),f);return Q.createElement("div",{className:"recharts-legend-wrapper",style:d,ref:function(v){i.wrapperNode=v}},Wge(a,Bo(Bo({},this.props),{},{payload:FH(h,c,Vge)})))}}],[{key:"getWithHeight",value:function(i,r){var a=Bo(Bo({},this.defaultProps),i.props),o=a.layout;return o==="vertical"&&Ue(i.props.height)?{height:i.props.height}:o==="horizontal"?{width:i.props.width||r}:null}}])})(A.PureComponent);_0(Qo,"displayName","Legend");_0(Qo,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"bottom"});var Ex,z7;function Gge(){if(z7)return Ex;z7=1;var e=ap(),n=N9(),t=xr(),i=e?e.isConcatSpreadable:void 0;function r(a){return t(a)||n(a)||!!(i&&a&&a[i])}return Ex=r,Ex}var Tx,L7;function UH(){if(L7)return Tx;L7=1;var e=DH(),n=Gge();function t(i,r,a,o,l){var f=-1,c=i.length;for(a||(a=n),l||(l=[]);++f0&&a(h)?r>1?t(h,r-1,a,o,l):e(l,h):o||(l[l.length]=h)}return l}return Tx=t,Tx}var jx,I7;function Yge(){if(I7)return jx;I7=1;function e(n){return function(t,i,r){for(var a=-1,o=Object(t),l=r(t),f=l.length;f--;){var c=l[n?f:++a];if(i(o[c],c,o)===!1)break}return t}}return jx=e,jx}var Mx,B7;function Kge(){if(B7)return Mx;B7=1;var e=Yge(),n=e();return Mx=n,Mx}var Dx,F7;function VH(){if(F7)return Dx;F7=1;var e=Kge(),n=k0();function t(i,r){return i&&e(i,r,n)}return Dx=t,Dx}var Rx,q7;function Xge(){if(q7)return Rx;q7=1;var e=op();function n(t,i){return function(r,a){if(r==null)return r;if(!e(r))return t(r,a);for(var o=r.length,l=i?o:-1,f=Object(r);(i?l--:++li||l&&f&&h&&!c&&!d||a&&f&&h||!r&&h||!o)return 1;if(!a&&!l&&!d&&t=c)return h;var d=r[a];return h*(d=="desc"?-1:1)}}return t.index-i.index}return Lx=n,Lx}var Ix,Y7;function e1e(){if(Y7)return Ix;Y7=1;var e=C9(),n=A9(),t=vl(),i=WH(),r=Zge(),a=PH(),o=Jge(),l=Yc(),f=xr();function c(h,d,p){d.length?d=e(d,function(w){return f(w)?function(k){return n(k,w.length===1?w[0]:w)}:w}):d=[l];var v=-1;d=e(d,a(t));var b=i(h,function(w,k,_){var x=e(d,function(C){return C(w)});return{criteria:x,index:++v,value:w}});return r(b,function(w,k){return o(w,k,p)})}return Ix=c,Ix}var Bx,K7;function n1e(){if(K7)return Bx;K7=1;function e(n,t,i){switch(i.length){case 0:return n.call(t);case 1:return n.call(t,i[0]);case 2:return n.call(t,i[0],i[1]);case 3:return n.call(t,i[0],i[1],i[2])}return n.apply(t,i)}return Bx=e,Bx}var Fx,X7;function t1e(){if(X7)return Fx;X7=1;var e=n1e(),n=Math.max;function t(i,r,a){return r=n(r===void 0?i.length-1:r,0),function(){for(var o=arguments,l=-1,f=n(o.length-r,0),c=Array(f);++l0){if(++a>=e)return arguments[0]}else a=0;return r.apply(void 0,arguments)}}return Vx=i,Vx}var Wx,nR;function o1e(){if(nR)return Wx;nR=1;var e=r1e(),n=a1e(),t=n(e);return Wx=t,Wx}var Gx,tR;function s1e(){if(tR)return Gx;tR=1;var e=Yc(),n=t1e(),t=o1e();function i(r,a){return t(n(r,a,e),r+"")}return Gx=i,Gx}var Yx,iR;function x0(){if(iR)return Yx;iR=1;var e=_9(),n=op(),t=$9(),i=pl();function r(a,o,l){if(!i(l))return!1;var f=typeof o;return(f=="number"?n(l)&&t(o,l.length):f=="string"&&o in l)?e(l[o],a):!1}return Yx=r,Yx}var Kx,rR;function l1e(){if(rR)return Kx;rR=1;var e=UH(),n=e1e(),t=s1e(),i=x0(),r=t(function(a,o){if(a==null)return[];var l=o.length;return l>1&&i(a,o[0],o[1])?o=[]:l>2&&i(o[0],o[1],o[2])&&(o=[o[0]]),n(a,e(o,1),[])});return Kx=r,Kx}var u1e=l1e();const B9=dt(u1e);function Qh(e){"@babel/helpers - typeof";return Qh=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Qh(e)}function s4(){return s4=Object.assign?Object.assign.bind():function(e){for(var n=1;ne.length)&&(n=e.length);for(var t=0,i=new Array(n);t=n.x),"".concat(Zd,"-left"),Ue(t)&&n&&Ue(n.x)&&t=n.y),"".concat(Zd,"-top"),Ue(i)&&n&&Ue(n.y)&&iw?Math.max(h,f[i]):Math.max(d,f[i])}function S1e(e){var n=e.translateX,t=e.translateY,i=e.useTranslate3d;return{transform:i?"translate3d(".concat(n,"px, ").concat(t,"px, 0)"):"translate(".concat(n,"px, ").concat(t,"px)")}}function C1e(e){var n=e.allowEscapeViewBox,t=e.coordinate,i=e.offsetTopLeft,r=e.position,a=e.reverseDirection,o=e.tooltipBox,l=e.useTranslate3d,f=e.viewBox,c,h,d;return o.height>0&&o.width>0&&t?(h=sR({allowEscapeViewBox:n,coordinate:t,key:"x",offsetTopLeft:i,position:r,reverseDirection:a,tooltipDimension:o.width,viewBox:f,viewBoxDimension:f.width}),d=sR({allowEscapeViewBox:n,coordinate:t,key:"y",offsetTopLeft:i,position:r,reverseDirection:a,tooltipDimension:o.height,viewBox:f,viewBoxDimension:f.height}),c=S1e({translateX:h,translateY:d,useTranslate3d:l})):c=_1e,{cssProperties:c,cssClasses:x1e({translateX:h,translateY:d,coordinate:t})}}function tc(e){"@babel/helpers - typeof";return tc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},tc(e)}function lR(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),t.push.apply(t,i)}return t}function uR(e){for(var n=1;nfR||Math.abs(i.height-this.state.lastBoundingBox.height)>fR)&&this.setState({lastBoundingBox:{width:i.width,height:i.height}})}else(this.state.lastBoundingBox.width!==-1||this.state.lastBoundingBox.height!==-1)&&this.setState({lastBoundingBox:{width:-1,height:-1}})}},{key:"componentDidMount",value:function(){document.addEventListener("keydown",this.handleKeyDown),this.updateBBox()}},{key:"componentWillUnmount",value:function(){document.removeEventListener("keydown",this.handleKeyDown)}},{key:"componentDidUpdate",value:function(){var i,r;this.props.active&&this.updateBBox(),this.state.dismissed&&(((i=this.props.coordinate)===null||i===void 0?void 0:i.x)!==this.state.dismissedAtCoordinate.x||((r=this.props.coordinate)===null||r===void 0?void 0:r.y)!==this.state.dismissedAtCoordinate.y)&&(this.state.dismissed=!1)}},{key:"render",value:function(){var i=this,r=this.props,a=r.active,o=r.allowEscapeViewBox,l=r.animationDuration,f=r.animationEasing,c=r.children,h=r.coordinate,d=r.hasPayload,p=r.isAnimationActive,v=r.offset,b=r.position,w=r.reverseDirection,k=r.useTranslate3d,_=r.viewBox,x=r.wrapperStyle,C=C1e({allowEscapeViewBox:o,coordinate:h,offsetTopLeft:v,position:b,reverseDirection:w,tooltipBox:this.state.lastBoundingBox,useTranslate3d:k,viewBox:_}),T=C.cssClasses,O=C.cssProperties,E=uR(uR({transition:p&&a?"transform ".concat(l,"ms ").concat(f):void 0},O),{},{pointerEvents:"none",visibility:!this.state.dismissed&&a&&d?"visible":"hidden",position:"absolute",top:0,left:0},x);return Q.createElement("div",{tabIndex:-1,className:T,style:E,ref:function(N){i.wrapperNode=N}},c)}}])})(A.PureComponent),N1e=function(){return!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout)},Nu={isSsr:N1e()};function ic(e){"@babel/helpers - typeof";return ic=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},ic(e)}function cR(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),t.push.apply(t,i)}return t}function dR(e){for(var n=1;n0;return Q.createElement(P1e,{allowEscapeViewBox:o,animationDuration:l,animationEasing:f,isAnimationActive:p,active:a,coordinate:h,hasPayload:E,offset:v,position:k,reverseDirection:_,useTranslate3d:x,viewBox:C,wrapperStyle:T},V1e(c,dR(dR({},this.props),{},{payload:O})))}}])})(A.PureComponent);F9(ca,"displayName","Tooltip");F9(ca,"defaultProps",{accessibilityLayer:!1,allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",contentStyle:{},coordinate:{x:0,y:0},cursor:!0,cursorStyle:{},filterNull:!0,isAnimationActive:!Nu.isSsr,itemStyle:{},labelStyle:{},offset:10,reverseDirection:{x:!1,y:!1},separator:" : ",trigger:"hover",useTranslate3d:!1,viewBox:{x:0,y:0,height:0,width:0},wrapperStyle:{}});var Zx,hR;function W1e(){if(hR)return Zx;hR=1;var e=_o(),n=function(){return e.Date.now()};return Zx=n,Zx}var Qx,mR;function G1e(){if(mR)return Qx;mR=1;var e=/\s/;function n(t){for(var i=t.length;i--&&e.test(t.charAt(i)););return i}return Qx=n,Qx}var Jx,pR;function Y1e(){if(pR)return Jx;pR=1;var e=G1e(),n=/^\s+/;function t(i){return i&&i.slice(0,e(i)+1).replace(n,"")}return Jx=t,Jx}var e3,vR;function QH(){if(vR)return e3;vR=1;var e=Y1e(),n=pl(),t=Uc(),i=NaN,r=/^[-+]0x[0-9a-f]+$/i,a=/^0b[01]+$/i,o=/^0o[0-7]+$/i,l=parseInt;function f(c){if(typeof c=="number")return c;if(t(c))return i;if(n(c)){var h=typeof c.valueOf=="function"?c.valueOf():c;c=n(h)?h+"":h}if(typeof c!="string")return c===0?c:+c;c=e(c);var d=a.test(c);return d||o.test(c)?l(c.slice(2),d?2:8):r.test(c)?i:+c}return e3=f,e3}var n3,gR;function K1e(){if(gR)return n3;gR=1;var e=pl(),n=W1e(),t=QH(),i="Expected a function",r=Math.max,a=Math.min;function o(l,f,c){var h,d,p,v,b,w,k=0,_=!1,x=!1,C=!0;if(typeof l!="function")throw new TypeError(i);f=t(f)||0,e(c)&&(_=!!c.leading,x="maxWait"in c,p=x?r(t(c.maxWait)||0,f):p,C="trailing"in c?!!c.trailing:C);function T(G){var U=h,H=d;return h=d=void 0,k=G,v=l.apply(H,U),v}function O(G){return k=G,b=setTimeout(N,f),_?T(G):v}function E(G){var U=G-w,H=G-k,P=f-U;return x?a(P,p-H):P}function M(G){var U=G-w,H=G-k;return w===void 0||U>=f||U<0||x&&H>=p}function N(){var G=n();if(M(G))return F(G);b=setTimeout(N,E(G))}function F(G){return b=void 0,C&&h?T(G):(h=d=void 0,v)}function R(){b!==void 0&&clearTimeout(b),k=0,h=w=d=b=void 0}function L(){return b===void 0?v:F(n())}function B(){var G=n(),U=M(G);if(h=arguments,d=this,w=G,U){if(b===void 0)return O(w);if(x)return clearTimeout(b),b=setTimeout(N,f),T(w)}return b===void 0&&(b=setTimeout(N,f)),v}return B.cancel=R,B.flush=L,B}return n3=o,n3}var t3,yR;function X1e(){if(yR)return t3;yR=1;var e=K1e(),n=pl(),t="Expected a function";function i(r,a,o){var l=!0,f=!0;if(typeof r!="function")throw new TypeError(t);return n(o)&&(l="leading"in o?!!o.leading:l,f="trailing"in o?!!o.trailing:f),e(r,a,{leading:l,maxWait:a,trailing:f})}return t3=i,t3}var Z1e=X1e();const JH=dt(Z1e);function em(e){"@babel/helpers - typeof";return em=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},em(e)}function bR(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),t.push.apply(t,i)}return t}function Vv(e){for(var n=1;ne.length)&&(n=e.length);for(var t=0,i=new Array(n);t0&&(G=JH(G,w,{trailing:!0,leading:!1}));var U=new ResizeObserver(G),H=O.current.getBoundingClientRect(),P=H.width,z=H.height;return L(P,z),U.observe(O.current),function(){U.disconnect()}},[L,w]);var B=A.useMemo(function(){var G=F.containerWidth,U=F.containerHeight;if(G<0||U<0)return null;Zo(tu(o)||tu(f),`The width(%s) and height(%s) are both fixed numbers, - maybe you don't need to use a ResponsiveContainer.`,o,f),Zo(!t||t>0,"The aspect(%s) must be greater than zero.",t);var H=tu(o)?G:o,P=tu(f)?U:f;t&&t>0&&(H?P=H/t:P&&(H=P*t),p&&P>p&&(P=p)),Zo(H>0||P>0,`The width(%s) and height(%s) of chart should be greater than 0, - please check the style of container, or the props width(%s) and height(%s), - or add a minWidth(%s) or minHeight(%s) or use aspect(%s) to control the - height and width.`,H,P,o,f,h,d,t);var z=!Array.isArray(v)&&Xo(v.type).endsWith("Chart");return Q.Children.map(v,function(q){return Q.isValidElement(q)?A.cloneElement(q,Vv({width:H,height:P},z?{style:Vv({height:"100%",width:"100%",maxHeight:P,maxWidth:H},q.props.style)}:{})):q})},[t,v,f,p,d,h,F,o]);return Q.createElement("div",{id:k?"".concat(k):void 0,className:dn("recharts-responsive-container",_),style:Vv(Vv({},T),{},{width:o,height:f,minWidth:h,minHeight:d,maxHeight:p}),ref:O},B)}),eU=function(n){return null};eU.displayName="Cell";function nm(e){"@babel/helpers - typeof";return nm=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},nm(e)}function kR(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),t.push.apply(t,i)}return t}function c4(e){for(var n=1;n1&&arguments[1]!==void 0?arguments[1]:{};if(n==null||Nu.isSsr)return{width:0,height:0};var i=cye(t),r=JSON.stringify({text:n,copyStyle:i});if(Of.widthCache[r])return Of.widthCache[r];try{var a=document.getElementById(_R);a||(a=document.createElement("span"),a.setAttribute("id",_R),a.setAttribute("aria-hidden","true"),document.body.appendChild(a));var o=c4(c4({},fye),i);Object.assign(a.style,o),a.textContent="".concat(n);var l=a.getBoundingClientRect(),f={width:l.width,height:l.height};return Of.widthCache[r]=f,++Of.cacheCount>uye&&(Of.cacheCount=0,Of.widthCache={}),f}catch{return{width:0,height:0}}},dye=function(n){return{top:n.top+window.scrollY-document.documentElement.clientTop,left:n.left+window.scrollX-document.documentElement.clientLeft}};function tm(e){"@babel/helpers - typeof";return tm=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},tm(e)}function n1(e,n){return vye(e)||pye(e,n)||mye(e,n)||hye()}function hye(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function mye(e,n){if(e){if(typeof e=="string")return xR(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);if(t==="Object"&&e.constructor&&(t=e.constructor.name),t==="Map"||t==="Set")return Array.from(e);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return xR(e,n)}}function xR(e,n){(n==null||n>e.length)&&(n=e.length);for(var t=0,i=new Array(n);t=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(t[i]=e[i])}return t}function jye(e,n){if(e==null)return{};var t={};for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){if(n.indexOf(i)>=0)continue;t[i]=e[i]}return t}function TR(e,n){return Pye(e)||Rye(e,n)||Dye(e,n)||Mye()}function Mye(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Dye(e,n){if(e){if(typeof e=="string")return jR(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);if(t==="Object"&&e.constructor&&(t=e.constructor.name),t==="Map"||t==="Set")return Array.from(e);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return jR(e,n)}}function jR(e,n){(n==null||n>e.length)&&(n=e.length);for(var t=0,i=new Array(n);t0&&arguments[0]!==void 0?arguments[0]:[];return H.reduce(function(P,z){var q=z.word,Y=z.width,D=P[P.length-1];if(D&&(r==null||a||D.width+Y+iz.width?P:z})};if(!h)return v;for(var w="…",k=function(H){var P=d.slice(0,H),z=rU({breakAll:c,style:f,children:P+w}).wordsWithComputedWidth,q=p(z),Y=q.length>o||b(q).width>Number(r);return[Y,q]},_=0,x=d.length-1,C=0,T;_<=x&&C<=d.length-1;){var O=Math.floor((_+x)/2),E=O-1,M=k(E),N=TR(M,2),F=N[0],R=N[1],L=k(O),B=TR(L,1),G=B[0];if(!F&&!G&&(_=O+1),F&&G&&(x=O-1),!F&&G){T=R;break}C++}return T||v},MR=function(n){var t=Vn(n)?[]:n.toString().split(iU);return[{words:t}]},$ye=function(n){var t=n.width,i=n.scaleToFit,r=n.children,a=n.style,o=n.breakAll,l=n.maxLines;if((t||i)&&!Nu.isSsr){var f,c,h=rU({breakAll:o,children:r,style:a});if(h){var d=h.wordsWithComputedWidth,p=h.spaceWidth;f=d,c=p}else return MR(r);return Nye({breakAll:o,children:r,maxLines:l,style:a},f,c,t,i)}return MR(r)},DR="#808080",t1=function(n){var t=n.x,i=t===void 0?0:t,r=n.y,a=r===void 0?0:r,o=n.lineHeight,l=o===void 0?"1em":o,f=n.capHeight,c=f===void 0?"0.71em":f,h=n.scaleToFit,d=h===void 0?!1:h,p=n.textAnchor,v=p===void 0?"start":p,b=n.verticalAnchor,w=b===void 0?"end":b,k=n.fill,_=k===void 0?DR:k,x=ER(n,Eye),C=A.useMemo(function(){return $ye({breakAll:x.breakAll,children:x.children,maxLines:x.maxLines,scaleToFit:d,style:x.style,width:x.width})},[x.breakAll,x.children,x.maxLines,d,x.style,x.width]),T=x.dx,O=x.dy,E=x.angle,M=x.className,N=x.breakAll,F=ER(x,Tye);if(!Si(i)||!Si(a))return null;var R=i+(Ue(T)?T:0),L=a+(Ue(O)?O:0),B;switch(w){case"start":B=i3("calc(".concat(c,")"));break;case"middle":B=i3("calc(".concat((C.length-1)/2," * -").concat(l," + (").concat(c," / 2))"));break;default:B=i3("calc(".concat(C.length-1," * -").concat(l,")"));break}var G=[];if(d){var U=C[0].width,H=x.width;G.push("scale(".concat((Ue(H)?H/U:1)/U,")"))}return E&&G.push("rotate(".concat(E,", ").concat(R,", ").concat(L,")")),G.length&&(F.transform=G.join(" ")),Q.createElement("text",d4({},qn(F,!0),{x:R,y:L,className:dn("recharts-text",M),textAnchor:v,fill:_.includes("url")?DR:_}),C.map(function(P,z){var q=P.words.join(N?"":" ");return Q.createElement("tspan",{x:R,dy:z===0?B:l,key:"".concat(q,"-").concat(z)},q)}))};function nl(e,n){return e==null||n==null?NaN:en?1:e>=n?0:NaN}function zye(e,n){return e==null||n==null?NaN:ne?1:n>=e?0:NaN}function H9(e){let n,t,i;e.length!==2?(n=nl,t=(l,f)=>nl(e(l),f),i=(l,f)=>e(l)-f):(n=e===nl||e===zye?e:Lye,t=e,i=e);function r(l,f,c=0,h=l.length){if(c>>1;t(l[d],f)<0?c=d+1:h=d}while(c>>1;t(l[d],f)<=0?c=d+1:h=d}while(cc&&i(l[d-1],f)>-i(l[d],f)?d-1:d}return{left:r,center:o,right:a}}function Lye(){return 0}function aU(e){return e===null?NaN:+e}function*Iye(e,n){for(let t of e)t!=null&&(t=+t)>=t&&(yield t)}const Bye=H9(nl),sp=Bye.right;H9(aU).center;class RR extends Map{constructor(n,t=Hye){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:t}}),n!=null)for(const[i,r]of n)this.set(i,r)}get(n){return super.get(PR(this,n))}has(n){return super.has(PR(this,n))}set(n,t){return super.set(Fye(this,n),t)}delete(n){return super.delete(qye(this,n))}}function PR({_intern:e,_key:n},t){const i=n(t);return e.has(i)?e.get(i):t}function Fye({_intern:e,_key:n},t){const i=n(t);return e.has(i)?e.get(i):(e.set(i,t),t)}function qye({_intern:e,_key:n},t){const i=n(t);return e.has(i)&&(t=e.get(i),e.delete(i)),t}function Hye(e){return e!==null&&typeof e=="object"?e.valueOf():e}function Uye(e=nl){if(e===nl)return oU;if(typeof e!="function")throw new TypeError("compare is not a function");return(n,t)=>{const i=e(n,t);return i||i===0?i:(e(t,t)===0)-(e(n,n)===0)}}function oU(e,n){return(e==null||!(e>=e))-(n==null||!(n>=n))||(en?1:0)}const Vye=Math.sqrt(50),Wye=Math.sqrt(10),Gye=Math.sqrt(2);function i1(e,n,t){const i=(n-e)/Math.max(0,t),r=Math.floor(Math.log10(i)),a=i/Math.pow(10,r),o=a>=Vye?10:a>=Wye?5:a>=Gye?2:1;let l,f,c;return r<0?(c=Math.pow(10,-r)/o,l=Math.round(e*c),f=Math.round(n*c),l/cn&&--f,c=-c):(c=Math.pow(10,r)*o,l=Math.round(e/c),f=Math.round(n/c),l*cn&&--f),f0))return[];if(e===n)return[e];const i=n=r))return[];const l=a-r+1,f=new Array(l);if(i)if(o<0)for(let c=0;c=i)&&(t=i);return t}function $R(e,n){let t;for(const i of e)i!=null&&(t>i||t===void 0&&i>=i)&&(t=i);return t}function sU(e,n,t=0,i=1/0,r){if(n=Math.floor(n),t=Math.floor(Math.max(0,t)),i=Math.floor(Math.min(e.length-1,i)),!(t<=n&&n<=i))return e;for(r=r===void 0?oU:Uye(r);i>t;){if(i-t>600){const f=i-t+1,c=n-t+1,h=Math.log(f),d=.5*Math.exp(2*h/3),p=.5*Math.sqrt(h*d*(f-d)/f)*(c-f/2<0?-1:1),v=Math.max(t,Math.floor(n-c*d/f+p)),b=Math.min(i,Math.floor(n+(f-c)*d/f+p));sU(e,n,v,b,r)}const a=e[n];let o=t,l=i;for(Qd(e,t,n),r(e[i],a)>0&&Qd(e,t,i);o0;)--l}r(e[t],a)===0?Qd(e,t,l):(++l,Qd(e,l,i)),l<=n&&(t=l+1),n<=l&&(i=l-1)}return e}function Qd(e,n,t){const i=e[n];e[n]=e[t],e[t]=i}function Yye(e,n,t){if(e=Float64Array.from(Iye(e)),!(!(i=e.length)||isNaN(n=+n))){if(n<=0||i<2)return $R(e);if(n>=1)return NR(e);var i,r=(i-1)*n,a=Math.floor(r),o=NR(sU(e,a).subarray(0,a+1)),l=$R(e.subarray(a+1));return o+(l-o)*(r-a)}}function Kye(e,n,t=aU){if(!(!(i=e.length)||isNaN(n=+n))){if(n<=0||i<2)return+t(e[0],0,e);if(n>=1)return+t(e[i-1],i-1,e);var i,r=(i-1)*n,a=Math.floor(r),o=+t(e[a],a,e),l=+t(e[a+1],a+1,e);return o+(l-o)*(r-a)}}function Xye(e,n,t){e=+e,n=+n,t=(r=arguments.length)<2?(n=e,e=0,1):r<3?1:+t;for(var i=-1,r=Math.max(0,Math.ceil((n-e)/t))|0,a=new Array(r);++i>8&15|n>>4&240,n>>4&15|n&240,(n&15)<<4|n&15,1):t===8?Gv(n>>24&255,n>>16&255,n>>8&255,(n&255)/255):t===4?Gv(n>>12&15|n>>8&240,n>>8&15|n>>4&240,n>>4&15|n&240,((n&15)<<4|n&15)/255):null):(n=Qye.exec(e))?new wr(n[1],n[2],n[3],1):(n=Jye.exec(e))?new wr(n[1]*255/100,n[2]*255/100,n[3]*255/100,1):(n=e0e.exec(e))?Gv(n[1],n[2],n[3],n[4]):(n=n0e.exec(e))?Gv(n[1]*255/100,n[2]*255/100,n[3]*255/100,n[4]):(n=t0e.exec(e))?HR(n[1],n[2]/100,n[3]/100,1):(n=i0e.exec(e))?HR(n[1],n[2]/100,n[3]/100,n[4]):zR.hasOwnProperty(e)?BR(zR[e]):e==="transparent"?new wr(NaN,NaN,NaN,0):null}function BR(e){return new wr(e>>16&255,e>>8&255,e&255,1)}function Gv(e,n,t,i){return i<=0&&(e=n=t=NaN),new wr(e,n,t,i)}function o0e(e){return e instanceof lp||(e=om(e)),e?(e=e.rgb(),new wr(e.r,e.g,e.b,e.opacity)):new wr}function g4(e,n,t,i){return arguments.length===1?o0e(e):new wr(e,n,t,i??1)}function wr(e,n,t,i){this.r=+e,this.g=+n,this.b=+t,this.opacity=+i}V9(wr,g4,uU(lp,{brighter(e){return e=e==null?r1:Math.pow(r1,e),new wr(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?rm:Math.pow(rm,e),new wr(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new wr(uu(this.r),uu(this.g),uu(this.b),a1(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:FR,formatHex:FR,formatHex8:s0e,formatRgb:qR,toString:qR}));function FR(){return`#${iu(this.r)}${iu(this.g)}${iu(this.b)}`}function s0e(){return`#${iu(this.r)}${iu(this.g)}${iu(this.b)}${iu((isNaN(this.opacity)?1:this.opacity)*255)}`}function qR(){const e=a1(this.opacity);return`${e===1?"rgb(":"rgba("}${uu(this.r)}, ${uu(this.g)}, ${uu(this.b)}${e===1?")":`, ${e})`}`}function a1(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function uu(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function iu(e){return e=uu(e),(e<16?"0":"")+e.toString(16)}function HR(e,n,t,i){return i<=0?e=n=t=NaN:t<=0||t>=1?e=n=NaN:n<=0&&(e=NaN),new Na(e,n,t,i)}function fU(e){if(e instanceof Na)return new Na(e.h,e.s,e.l,e.opacity);if(e instanceof lp||(e=om(e)),!e)return new Na;if(e instanceof Na)return e;e=e.rgb();var n=e.r/255,t=e.g/255,i=e.b/255,r=Math.min(n,t,i),a=Math.max(n,t,i),o=NaN,l=a-r,f=(a+r)/2;return l?(n===a?o=(t-i)/l+(t0&&f<1?0:o,new Na(o,l,f,e.opacity)}function l0e(e,n,t,i){return arguments.length===1?fU(e):new Na(e,n,t,i??1)}function Na(e,n,t,i){this.h=+e,this.s=+n,this.l=+t,this.opacity=+i}V9(Na,l0e,uU(lp,{brighter(e){return e=e==null?r1:Math.pow(r1,e),new Na(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?rm:Math.pow(rm,e),new Na(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,n=isNaN(e)||isNaN(this.s)?0:this.s,t=this.l,i=t+(t<.5?t:1-t)*n,r=2*t-i;return new wr(r3(e>=240?e-240:e+120,r,i),r3(e,r,i),r3(e<120?e+240:e-120,r,i),this.opacity)},clamp(){return new Na(UR(this.h),Yv(this.s),Yv(this.l),a1(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=a1(this.opacity);return`${e===1?"hsl(":"hsla("}${UR(this.h)}, ${Yv(this.s)*100}%, ${Yv(this.l)*100}%${e===1?")":`, ${e})`}`}}));function UR(e){return e=(e||0)%360,e<0?e+360:e}function Yv(e){return Math.max(0,Math.min(1,e||0))}function r3(e,n,t){return(e<60?n+(t-n)*e/60:e<180?t:e<240?n+(t-n)*(240-e)/60:n)*255}const W9=e=>()=>e;function u0e(e,n){return function(t){return e+t*n}}function f0e(e,n,t){return e=Math.pow(e,t),n=Math.pow(n,t)-e,t=1/t,function(i){return Math.pow(e+i*n,t)}}function c0e(e){return(e=+e)==1?cU:function(n,t){return t-n?f0e(n,t,e):W9(isNaN(n)?t:n)}}function cU(e,n){var t=n-e;return t?u0e(e,t):W9(isNaN(e)?n:e)}const VR=(function e(n){var t=c0e(n);function i(r,a){var o=t((r=g4(r)).r,(a=g4(a)).r),l=t(r.g,a.g),f=t(r.b,a.b),c=cU(r.opacity,a.opacity);return function(h){return r.r=o(h),r.g=l(h),r.b=f(h),r.opacity=c(h),r+""}}return i.gamma=e,i})(1);function d0e(e,n){n||(n=[]);var t=e?Math.min(n.length,e.length):0,i=n.slice(),r;return function(a){for(r=0;rt&&(a=n.slice(t,a),l[o]?l[o]+=a:l[++o]=a),(i=i[0])===(r=r[0])?l[o]?l[o]+=r:l[++o]=r:(l[++o]=null,f.push({i:o,x:o1(i,r)})),t=a3.lastIndex;return tn&&(t=e,e=n,n=t),function(i){return Math.max(e,Math.min(n,i))}}function x0e(e,n,t){var i=e[0],r=e[1],a=n[0],o=n[1];return r2?S0e:x0e,f=c=null,d}function d(p){return p==null||isNaN(p=+p)?a:(f||(f=l(e.map(i),n,t)))(i(o(p)))}return d.invert=function(p){return o(r((c||(c=l(n,e.map(i),o1)))(p)))},d.domain=function(p){return arguments.length?(e=Array.from(p,s1),h()):e.slice()},d.range=function(p){return arguments.length?(n=Array.from(p),h()):n.slice()},d.rangeRound=function(p){return n=Array.from(p),t=G9,h()},d.clamp=function(p){return arguments.length?(o=p?!0:or,h()):o!==or},d.interpolate=function(p){return arguments.length?(t=p,h()):t},d.unknown=function(p){return arguments.length?(a=p,d):a},function(p,v){return i=p,r=v,h()}}function Y9(){return S0()(or,or)}function C0e(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function l1(e,n){if(!isFinite(e)||e===0)return null;var t=(e=n?e.toExponential(n-1):e.toExponential()).indexOf("e"),i=e.slice(0,t);return[i.length>1?i[0]+i.slice(2):i,+e.slice(t+1)]}function rc(e){return e=l1(Math.abs(e)),e?e[1]:NaN}function A0e(e,n){return function(t,i){for(var r=t.length,a=[],o=0,l=e[0],f=0;r>0&&l>0&&(f+l+1>i&&(l=Math.max(1,i-f)),a.push(t.substring(r-=l,r+l)),!((f+=l+1)>i));)l=e[o=(o+1)%e.length];return a.reverse().join(n)}}function O0e(e){return function(n){return n.replace(/[0-9]/g,function(t){return e[+t]})}}var E0e=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function sm(e){if(!(n=E0e.exec(e)))throw new Error("invalid format: "+e);var n;return new K9({fill:n[1],align:n[2],sign:n[3],symbol:n[4],zero:n[5],width:n[6],comma:n[7],precision:n[8]&&n[8].slice(1),trim:n[9],type:n[10]})}sm.prototype=K9.prototype;function K9(e){this.fill=e.fill===void 0?" ":e.fill+"",this.align=e.align===void 0?">":e.align+"",this.sign=e.sign===void 0?"-":e.sign+"",this.symbol=e.symbol===void 0?"":e.symbol+"",this.zero=!!e.zero,this.width=e.width===void 0?void 0:+e.width,this.comma=!!e.comma,this.precision=e.precision===void 0?void 0:+e.precision,this.trim=!!e.trim,this.type=e.type===void 0?"":e.type+""}K9.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function T0e(e){e:for(var n=e.length,t=1,i=-1,r;t0&&(i=0);break}return i>0?e.slice(0,i)+e.slice(r+1):e}var u1;function j0e(e,n){var t=l1(e,n);if(!t)return u1=void 0,e.toPrecision(n);var i=t[0],r=t[1],a=r-(u1=Math.max(-8,Math.min(8,Math.floor(r/3)))*3)+1,o=i.length;return a===o?i:a>o?i+new Array(a-o+1).join("0"):a>0?i.slice(0,a)+"."+i.slice(a):"0."+new Array(1-a).join("0")+l1(e,Math.max(0,n+a-1))[0]}function GR(e,n){var t=l1(e,n);if(!t)return e+"";var i=t[0],r=t[1];return r<0?"0."+new Array(-r).join("0")+i:i.length>r+1?i.slice(0,r+1)+"."+i.slice(r+1):i+new Array(r-i.length+2).join("0")}const YR={"%":(e,n)=>(e*100).toFixed(n),b:e=>Math.round(e).toString(2),c:e=>e+"",d:C0e,e:(e,n)=>e.toExponential(n),f:(e,n)=>e.toFixed(n),g:(e,n)=>e.toPrecision(n),o:e=>Math.round(e).toString(8),p:(e,n)=>GR(e*100,n),r:GR,s:j0e,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function KR(e){return e}var XR=Array.prototype.map,ZR=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function M0e(e){var n=e.grouping===void 0||e.thousands===void 0?KR:A0e(XR.call(e.grouping,Number),e.thousands+""),t=e.currency===void 0?"":e.currency[0]+"",i=e.currency===void 0?"":e.currency[1]+"",r=e.decimal===void 0?".":e.decimal+"",a=e.numerals===void 0?KR:O0e(XR.call(e.numerals,String)),o=e.percent===void 0?"%":e.percent+"",l=e.minus===void 0?"−":e.minus+"",f=e.nan===void 0?"NaN":e.nan+"";function c(d,p){d=sm(d);var v=d.fill,b=d.align,w=d.sign,k=d.symbol,_=d.zero,x=d.width,C=d.comma,T=d.precision,O=d.trim,E=d.type;E==="n"?(C=!0,E="g"):YR[E]||(T===void 0&&(T=12),O=!0,E="g"),(_||v==="0"&&b==="=")&&(_=!0,v="0",b="=");var M=(p&&p.prefix!==void 0?p.prefix:"")+(k==="$"?t:k==="#"&&/[boxX]/.test(E)?"0"+E.toLowerCase():""),N=(k==="$"?i:/[%p]/.test(E)?o:"")+(p&&p.suffix!==void 0?p.suffix:""),F=YR[E],R=/[defgprs%]/.test(E);T=T===void 0?6:/[gprs]/.test(E)?Math.max(1,Math.min(21,T)):Math.max(0,Math.min(20,T));function L(B){var G=M,U=N,H,P,z;if(E==="c")U=F(B)+U,B="";else{B=+B;var q=B<0||1/B<0;if(B=isNaN(B)?f:F(Math.abs(B),T),O&&(B=T0e(B)),q&&+B==0&&w!=="+"&&(q=!1),G=(q?w==="("?w:l:w==="-"||w==="("?"":w)+G,U=(E==="s"&&!isNaN(B)&&u1!==void 0?ZR[8+u1/3]:"")+U+(q&&w==="("?")":""),R){for(H=-1,P=B.length;++Hz||z>57){U=(z===46?r+B.slice(H+1):B.slice(H))+U,B=B.slice(0,H);break}}}C&&!_&&(B=n(B,1/0));var Y=G.length+B.length+U.length,D=Y>1)+G+B+U+D.slice(Y);break;default:B=D+G+B+U;break}return a(B)}return L.toString=function(){return d+""},L}function h(d,p){var v=Math.max(-8,Math.min(8,Math.floor(rc(p)/3)))*3,b=Math.pow(10,-v),w=c((d=sm(d),d.type="f",d),{suffix:ZR[8+v/3]});return function(k){return w(b*k)}}return{format:c,formatPrefix:h}}var Kv,X9,dU;D0e({thousands:",",grouping:[3],currency:["$",""]});function D0e(e){return Kv=M0e(e),X9=Kv.format,dU=Kv.formatPrefix,Kv}function R0e(e){return Math.max(0,-rc(Math.abs(e)))}function P0e(e,n){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(rc(n)/3)))*3-rc(Math.abs(e)))}function N0e(e,n){return e=Math.abs(e),n=Math.abs(n)-e,Math.max(0,rc(n)-rc(e))+1}function hU(e,n,t,i){var r=p4(e,n,t),a;switch(i=sm(i??",f"),i.type){case"s":{var o=Math.max(Math.abs(e),Math.abs(n));return i.precision==null&&!isNaN(a=P0e(r,o))&&(i.precision=a),dU(i,o)}case"":case"e":case"g":case"p":case"r":{i.precision==null&&!isNaN(a=N0e(r,Math.max(Math.abs(e),Math.abs(n))))&&(i.precision=a-(i.type==="e"));break}case"f":case"%":{i.precision==null&&!isNaN(a=R0e(r))&&(i.precision=a-(i.type==="%")*2);break}}return X9(i)}function gl(e){var n=e.domain;return e.ticks=function(t){var i=n();return h4(i[0],i[i.length-1],t??10)},e.tickFormat=function(t,i){var r=n();return hU(r[0],r[r.length-1],t??10,i)},e.nice=function(t){t==null&&(t=10);var i=n(),r=0,a=i.length-1,o=i[r],l=i[a],f,c,h=10;for(l0;){if(c=m4(o,l,t),c===f)return i[r]=o,i[a]=l,n(i);if(c>0)o=Math.floor(o/c)*c,l=Math.ceil(l/c)*c;else if(c<0)o=Math.ceil(o*c)/c,l=Math.floor(l*c)/c;else break;f=c}return e},e}function f1(){var e=Y9();return e.copy=function(){return up(e,f1())},Ca.apply(e,arguments),gl(e)}function mU(e){var n;function t(i){return i==null||isNaN(i=+i)?n:i}return t.invert=t,t.domain=t.range=function(i){return arguments.length?(e=Array.from(i,s1),t):e.slice()},t.unknown=function(i){return arguments.length?(n=i,t):n},t.copy=function(){return mU(e).unknown(n)},e=arguments.length?Array.from(e,s1):[0,1],gl(t)}function pU(e,n){e=e.slice();var t=0,i=e.length-1,r=e[t],a=e[i],o;return aMath.pow(e,n)}function B0e(e){return e===Math.E?Math.log:e===10&&Math.log10||e===2&&Math.log2||(e=Math.log(e),n=>Math.log(n)/e)}function eP(e){return(n,t)=>-e(-n,t)}function Z9(e){const n=e(QR,JR),t=n.domain;let i=10,r,a;function o(){return r=B0e(i),a=I0e(i),t()[0]<0?(r=eP(r),a=eP(a),e($0e,z0e)):e(QR,JR),n}return n.base=function(l){return arguments.length?(i=+l,o()):i},n.domain=function(l){return arguments.length?(t(l),o()):t()},n.ticks=l=>{const f=t();let c=f[0],h=f[f.length-1];const d=h0){for(;p<=v;++p)for(b=1;bh)break;_.push(w)}}else for(;p<=v;++p)for(b=i-1;b>=1;--b)if(w=p>0?b/a(-p):b*a(p),!(wh)break;_.push(w)}_.length*2{if(l==null&&(l=10),f==null&&(f=i===10?"s":","),typeof f!="function"&&(!(i%1)&&(f=sm(f)).precision==null&&(f.trim=!0),f=X9(f)),l===1/0)return f;const c=Math.max(1,i*l/n.ticks().length);return h=>{let d=h/a(Math.round(r(h)));return d*it(pU(t(),{floor:l=>a(Math.floor(r(l))),ceil:l=>a(Math.ceil(r(l)))})),n}function vU(){const e=Z9(S0()).domain([1,10]);return e.copy=()=>up(e,vU()).base(e.base()),Ca.apply(e,arguments),e}function nP(e){return function(n){return Math.sign(n)*Math.log1p(Math.abs(n/e))}}function tP(e){return function(n){return Math.sign(n)*Math.expm1(Math.abs(n))*e}}function Q9(e){var n=1,t=e(nP(n),tP(n));return t.constant=function(i){return arguments.length?e(nP(n=+i),tP(n)):n},gl(t)}function gU(){var e=Q9(S0());return e.copy=function(){return up(e,gU()).constant(e.constant())},Ca.apply(e,arguments)}function iP(e){return function(n){return n<0?-Math.pow(-n,e):Math.pow(n,e)}}function F0e(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function q0e(e){return e<0?-e*e:e*e}function J9(e){var n=e(or,or),t=1;function i(){return t===1?e(or,or):t===.5?e(F0e,q0e):e(iP(t),iP(1/t))}return n.exponent=function(r){return arguments.length?(t=+r,i()):t},gl(n)}function eA(){var e=J9(S0());return e.copy=function(){return up(e,eA()).exponent(e.exponent())},Ca.apply(e,arguments),e}function H0e(){return eA.apply(null,arguments).exponent(.5)}function rP(e){return Math.sign(e)*e*e}function U0e(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function yU(){var e=Y9(),n=[0,1],t=!1,i;function r(a){var o=U0e(e(a));return isNaN(o)?i:t?Math.round(o):o}return r.invert=function(a){return e.invert(rP(a))},r.domain=function(a){return arguments.length?(e.domain(a),r):e.domain()},r.range=function(a){return arguments.length?(e.range((n=Array.from(a,s1)).map(rP)),r):n.slice()},r.rangeRound=function(a){return r.range(a).round(!0)},r.round=function(a){return arguments.length?(t=!!a,r):t},r.clamp=function(a){return arguments.length?(e.clamp(a),r):e.clamp()},r.unknown=function(a){return arguments.length?(i=a,r):i},r.copy=function(){return yU(e.domain(),n).round(t).clamp(e.clamp()).unknown(i)},Ca.apply(r,arguments),gl(r)}function bU(){var e=[],n=[],t=[],i;function r(){var o=0,l=Math.max(1,n.length);for(t=new Array(l-1);++o0?t[l-1]:e[0],l=t?[i[t-1],n]:[i[c-1],i[c]]},o.unknown=function(f){return arguments.length&&(a=f),o},o.thresholds=function(){return i.slice()},o.copy=function(){return wU().domain([e,n]).range(r).unknown(a)},Ca.apply(gl(o),arguments)}function kU(){var e=[.5],n=[0,1],t,i=1;function r(a){return a!=null&&a<=a?n[sp(e,a,0,i)]:t}return r.domain=function(a){return arguments.length?(e=Array.from(a),i=Math.min(e.length,n.length-1),r):e.slice()},r.range=function(a){return arguments.length?(n=Array.from(a),i=Math.min(e.length,n.length-1),r):n.slice()},r.invertExtent=function(a){var o=n.indexOf(a);return[e[o-1],e[o]]},r.unknown=function(a){return arguments.length?(t=a,r):t},r.copy=function(){return kU().domain(e).range(n).unknown(t)},Ca.apply(r,arguments)}const o3=new Date,s3=new Date;function Ci(e,n,t,i){function r(a){return e(a=arguments.length===0?new Date:new Date(+a)),a}return r.floor=a=>(e(a=new Date(+a)),a),r.ceil=a=>(e(a=new Date(a-1)),n(a,1),e(a),a),r.round=a=>{const o=r(a),l=r.ceil(a);return a-o(n(a=new Date(+a),o==null?1:Math.floor(o)),a),r.range=(a,o,l)=>{const f=[];if(a=r.ceil(a),l=l==null?1:Math.floor(l),!(a0))return f;let c;do f.push(c=new Date(+a)),n(a,l),e(a);while(cCi(o=>{if(o>=o)for(;e(o),!a(o);)o.setTime(o-1)},(o,l)=>{if(o>=o)if(l<0)for(;++l<=0;)for(;n(o,-1),!a(o););else for(;--l>=0;)for(;n(o,1),!a(o););}),t&&(r.count=(a,o)=>(o3.setTime(+a),s3.setTime(+o),e(o3),e(s3),Math.floor(t(o3,s3))),r.every=a=>(a=Math.floor(a),!isFinite(a)||!(a>0)?null:a>1?r.filter(i?o=>i(o)%a===0:o=>r.count(0,o)%a===0):r)),r}const c1=Ci(()=>{},(e,n)=>{e.setTime(+e+n)},(e,n)=>n-e);c1.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?Ci(n=>{n.setTime(Math.floor(n/e)*e)},(n,t)=>{n.setTime(+n+t*e)},(n,t)=>(t-n)/e):c1);c1.range;const Uo=1e3,ma=Uo*60,Vo=ma*60,is=Vo*24,nA=is*7,aP=is*30,l3=is*365,ru=Ci(e=>{e.setTime(e-e.getMilliseconds())},(e,n)=>{e.setTime(+e+n*Uo)},(e,n)=>(n-e)/Uo,e=>e.getUTCSeconds());ru.range;const tA=Ci(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Uo)},(e,n)=>{e.setTime(+e+n*ma)},(e,n)=>(n-e)/ma,e=>e.getMinutes());tA.range;const iA=Ci(e=>{e.setUTCSeconds(0,0)},(e,n)=>{e.setTime(+e+n*ma)},(e,n)=>(n-e)/ma,e=>e.getUTCMinutes());iA.range;const rA=Ci(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Uo-e.getMinutes()*ma)},(e,n)=>{e.setTime(+e+n*Vo)},(e,n)=>(n-e)/Vo,e=>e.getHours());rA.range;const aA=Ci(e=>{e.setUTCMinutes(0,0,0)},(e,n)=>{e.setTime(+e+n*Vo)},(e,n)=>(n-e)/Vo,e=>e.getUTCHours());aA.range;const fp=Ci(e=>e.setHours(0,0,0,0),(e,n)=>e.setDate(e.getDate()+n),(e,n)=>(n-e-(n.getTimezoneOffset()-e.getTimezoneOffset())*ma)/is,e=>e.getDate()-1);fp.range;const C0=Ci(e=>{e.setUTCHours(0,0,0,0)},(e,n)=>{e.setUTCDate(e.getUTCDate()+n)},(e,n)=>(n-e)/is,e=>e.getUTCDate()-1);C0.range;const _U=Ci(e=>{e.setUTCHours(0,0,0,0)},(e,n)=>{e.setUTCDate(e.getUTCDate()+n)},(e,n)=>(n-e)/is,e=>Math.floor(e/is));_U.range;function $u(e){return Ci(n=>{n.setDate(n.getDate()-(n.getDay()+7-e)%7),n.setHours(0,0,0,0)},(n,t)=>{n.setDate(n.getDate()+t*7)},(n,t)=>(t-n-(t.getTimezoneOffset()-n.getTimezoneOffset())*ma)/nA)}const A0=$u(0),d1=$u(1),V0e=$u(2),W0e=$u(3),ac=$u(4),G0e=$u(5),Y0e=$u(6);A0.range;d1.range;V0e.range;W0e.range;ac.range;G0e.range;Y0e.range;function zu(e){return Ci(n=>{n.setUTCDate(n.getUTCDate()-(n.getUTCDay()+7-e)%7),n.setUTCHours(0,0,0,0)},(n,t)=>{n.setUTCDate(n.getUTCDate()+t*7)},(n,t)=>(t-n)/nA)}const O0=zu(0),h1=zu(1),K0e=zu(2),X0e=zu(3),oc=zu(4),Z0e=zu(5),Q0e=zu(6);O0.range;h1.range;K0e.range;X0e.range;oc.range;Z0e.range;Q0e.range;const oA=Ci(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,n)=>{e.setMonth(e.getMonth()+n)},(e,n)=>n.getMonth()-e.getMonth()+(n.getFullYear()-e.getFullYear())*12,e=>e.getMonth());oA.range;const sA=Ci(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,n)=>{e.setUTCMonth(e.getUTCMonth()+n)},(e,n)=>n.getUTCMonth()-e.getUTCMonth()+(n.getUTCFullYear()-e.getUTCFullYear())*12,e=>e.getUTCMonth());sA.range;const rs=Ci(e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,n)=>{e.setFullYear(e.getFullYear()+n)},(e,n)=>n.getFullYear()-e.getFullYear(),e=>e.getFullYear());rs.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Ci(n=>{n.setFullYear(Math.floor(n.getFullYear()/e)*e),n.setMonth(0,1),n.setHours(0,0,0,0)},(n,t)=>{n.setFullYear(n.getFullYear()+t*e)});rs.range;const as=Ci(e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,n)=>{e.setUTCFullYear(e.getUTCFullYear()+n)},(e,n)=>n.getUTCFullYear()-e.getUTCFullYear(),e=>e.getUTCFullYear());as.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Ci(n=>{n.setUTCFullYear(Math.floor(n.getUTCFullYear()/e)*e),n.setUTCMonth(0,1),n.setUTCHours(0,0,0,0)},(n,t)=>{n.setUTCFullYear(n.getUTCFullYear()+t*e)});as.range;function xU(e,n,t,i,r,a){const o=[[ru,1,Uo],[ru,5,5*Uo],[ru,15,15*Uo],[ru,30,30*Uo],[a,1,ma],[a,5,5*ma],[a,15,15*ma],[a,30,30*ma],[r,1,Vo],[r,3,3*Vo],[r,6,6*Vo],[r,12,12*Vo],[i,1,is],[i,2,2*is],[t,1,nA],[n,1,aP],[n,3,3*aP],[e,1,l3]];function l(c,h,d){const p=hk).right(o,p);if(v===o.length)return e.every(p4(c/l3,h/l3,d));if(v===0)return c1.every(Math.max(p4(c,h,d),1));const[b,w]=o[p/o[v-1][2]53)return null;"w"in ne||(ne.w=1),"Z"in ne?(be=f3(Jd(ne.y,0,1)),Ce=be.getUTCDay(),be=Ce>4||Ce===0?h1.ceil(be):h1(be),be=C0.offset(be,(ne.V-1)*7),ne.y=be.getUTCFullYear(),ne.m=be.getUTCMonth(),ne.d=be.getUTCDate()+(ne.w+6)%7):(be=u3(Jd(ne.y,0,1)),Ce=be.getDay(),be=Ce>4||Ce===0?d1.ceil(be):d1(be),be=fp.offset(be,(ne.V-1)*7),ne.y=be.getFullYear(),ne.m=be.getMonth(),ne.d=be.getDate()+(ne.w+6)%7)}else("W"in ne||"U"in ne)&&("w"in ne||(ne.w="u"in ne?ne.u%7:"W"in ne?1:0),Ce="Z"in ne?f3(Jd(ne.y,0,1)).getUTCDay():u3(Jd(ne.y,0,1)).getDay(),ne.m=0,ne.d="W"in ne?(ne.w+6)%7+ne.W*7-(Ce+5)%7:ne.w+ne.U*7-(Ce+6)%7);return"Z"in ne?(ne.H+=ne.Z/100|0,ne.M+=ne.Z%100,f3(ne)):u3(ne)}}function N(ae,le,_e,ne){for(var $e=0,be=le.length,Ce=_e.length,Pe,ve;$e=Ce)return-1;if(Pe=le.charCodeAt($e++),Pe===37){if(Pe=le.charAt($e++),ve=O[Pe in oP?le.charAt($e++):Pe],!ve||(ne=ve(ae,_e,ne))<0)return-1}else if(Pe!=_e.charCodeAt(ne++))return-1}return ne}function F(ae,le,_e){var ne=c.exec(le.slice(_e));return ne?(ae.p=h.get(ne[0].toLowerCase()),_e+ne[0].length):-1}function R(ae,le,_e){var ne=v.exec(le.slice(_e));return ne?(ae.w=b.get(ne[0].toLowerCase()),_e+ne[0].length):-1}function L(ae,le,_e){var ne=d.exec(le.slice(_e));return ne?(ae.w=p.get(ne[0].toLowerCase()),_e+ne[0].length):-1}function B(ae,le,_e){var ne=_.exec(le.slice(_e));return ne?(ae.m=x.get(ne[0].toLowerCase()),_e+ne[0].length):-1}function G(ae,le,_e){var ne=w.exec(le.slice(_e));return ne?(ae.m=k.get(ne[0].toLowerCase()),_e+ne[0].length):-1}function U(ae,le,_e){return N(ae,n,le,_e)}function H(ae,le,_e){return N(ae,t,le,_e)}function P(ae,le,_e){return N(ae,i,le,_e)}function z(ae){return o[ae.getDay()]}function q(ae){return a[ae.getDay()]}function Y(ae){return f[ae.getMonth()]}function D(ae){return l[ae.getMonth()]}function V(ae){return r[+(ae.getHours()>=12)]}function W(ae){return 1+~~(ae.getMonth()/3)}function $(ae){return o[ae.getUTCDay()]}function X(ae){return a[ae.getUTCDay()]}function ee(ae){return f[ae.getUTCMonth()]}function re(ae){return l[ae.getUTCMonth()]}function se(ae){return r[+(ae.getUTCHours()>=12)]}function ge(ae){return 1+~~(ae.getUTCMonth()/3)}return{format:function(ae){var le=E(ae+="",C);return le.toString=function(){return ae},le},parse:function(ae){var le=M(ae+="",!1);return le.toString=function(){return ae},le},utcFormat:function(ae){var le=E(ae+="",T);return le.toString=function(){return ae},le},utcParse:function(ae){var le=M(ae+="",!0);return le.toString=function(){return ae},le}}}var oP={"-":"",_:" ",0:"0"},Di=/^\s*\d+/,rbe=/^%/,abe=/[\\^$*+?|[\]().{}]/g;function ct(e,n,t){var i=e<0?"-":"",r=(i?-e:e)+"",a=r.length;return i+(a[n.toLowerCase(),t]))}function sbe(e,n,t){var i=Di.exec(n.slice(t,t+1));return i?(e.w=+i[0],t+i[0].length):-1}function lbe(e,n,t){var i=Di.exec(n.slice(t,t+1));return i?(e.u=+i[0],t+i[0].length):-1}function ube(e,n,t){var i=Di.exec(n.slice(t,t+2));return i?(e.U=+i[0],t+i[0].length):-1}function fbe(e,n,t){var i=Di.exec(n.slice(t,t+2));return i?(e.V=+i[0],t+i[0].length):-1}function cbe(e,n,t){var i=Di.exec(n.slice(t,t+2));return i?(e.W=+i[0],t+i[0].length):-1}function sP(e,n,t){var i=Di.exec(n.slice(t,t+4));return i?(e.y=+i[0],t+i[0].length):-1}function lP(e,n,t){var i=Di.exec(n.slice(t,t+2));return i?(e.y=+i[0]+(+i[0]>68?1900:2e3),t+i[0].length):-1}function dbe(e,n,t){var i=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(n.slice(t,t+6));return i?(e.Z=i[1]?0:-(i[2]+(i[3]||"00")),t+i[0].length):-1}function hbe(e,n,t){var i=Di.exec(n.slice(t,t+1));return i?(e.q=i[0]*3-3,t+i[0].length):-1}function mbe(e,n,t){var i=Di.exec(n.slice(t,t+2));return i?(e.m=i[0]-1,t+i[0].length):-1}function uP(e,n,t){var i=Di.exec(n.slice(t,t+2));return i?(e.d=+i[0],t+i[0].length):-1}function pbe(e,n,t){var i=Di.exec(n.slice(t,t+3));return i?(e.m=0,e.d=+i[0],t+i[0].length):-1}function fP(e,n,t){var i=Di.exec(n.slice(t,t+2));return i?(e.H=+i[0],t+i[0].length):-1}function vbe(e,n,t){var i=Di.exec(n.slice(t,t+2));return i?(e.M=+i[0],t+i[0].length):-1}function gbe(e,n,t){var i=Di.exec(n.slice(t,t+2));return i?(e.S=+i[0],t+i[0].length):-1}function ybe(e,n,t){var i=Di.exec(n.slice(t,t+3));return i?(e.L=+i[0],t+i[0].length):-1}function bbe(e,n,t){var i=Di.exec(n.slice(t,t+6));return i?(e.L=Math.floor(i[0]/1e3),t+i[0].length):-1}function wbe(e,n,t){var i=rbe.exec(n.slice(t,t+1));return i?t+i[0].length:-1}function kbe(e,n,t){var i=Di.exec(n.slice(t));return i?(e.Q=+i[0],t+i[0].length):-1}function _be(e,n,t){var i=Di.exec(n.slice(t));return i?(e.s=+i[0],t+i[0].length):-1}function cP(e,n){return ct(e.getDate(),n,2)}function xbe(e,n){return ct(e.getHours(),n,2)}function Sbe(e,n){return ct(e.getHours()%12||12,n,2)}function Cbe(e,n){return ct(1+fp.count(rs(e),e),n,3)}function SU(e,n){return ct(e.getMilliseconds(),n,3)}function Abe(e,n){return SU(e,n)+"000"}function Obe(e,n){return ct(e.getMonth()+1,n,2)}function Ebe(e,n){return ct(e.getMinutes(),n,2)}function Tbe(e,n){return ct(e.getSeconds(),n,2)}function jbe(e){var n=e.getDay();return n===0?7:n}function Mbe(e,n){return ct(A0.count(rs(e)-1,e),n,2)}function CU(e){var n=e.getDay();return n>=4||n===0?ac(e):ac.ceil(e)}function Dbe(e,n){return e=CU(e),ct(ac.count(rs(e),e)+(rs(e).getDay()===4),n,2)}function Rbe(e){return e.getDay()}function Pbe(e,n){return ct(d1.count(rs(e)-1,e),n,2)}function Nbe(e,n){return ct(e.getFullYear()%100,n,2)}function $be(e,n){return e=CU(e),ct(e.getFullYear()%100,n,2)}function zbe(e,n){return ct(e.getFullYear()%1e4,n,4)}function Lbe(e,n){var t=e.getDay();return e=t>=4||t===0?ac(e):ac.ceil(e),ct(e.getFullYear()%1e4,n,4)}function Ibe(e){var n=e.getTimezoneOffset();return(n>0?"-":(n*=-1,"+"))+ct(n/60|0,"0",2)+ct(n%60,"0",2)}function dP(e,n){return ct(e.getUTCDate(),n,2)}function Bbe(e,n){return ct(e.getUTCHours(),n,2)}function Fbe(e,n){return ct(e.getUTCHours()%12||12,n,2)}function qbe(e,n){return ct(1+C0.count(as(e),e),n,3)}function AU(e,n){return ct(e.getUTCMilliseconds(),n,3)}function Hbe(e,n){return AU(e,n)+"000"}function Ube(e,n){return ct(e.getUTCMonth()+1,n,2)}function Vbe(e,n){return ct(e.getUTCMinutes(),n,2)}function Wbe(e,n){return ct(e.getUTCSeconds(),n,2)}function Gbe(e){var n=e.getUTCDay();return n===0?7:n}function Ybe(e,n){return ct(O0.count(as(e)-1,e),n,2)}function OU(e){var n=e.getUTCDay();return n>=4||n===0?oc(e):oc.ceil(e)}function Kbe(e,n){return e=OU(e),ct(oc.count(as(e),e)+(as(e).getUTCDay()===4),n,2)}function Xbe(e){return e.getUTCDay()}function Zbe(e,n){return ct(h1.count(as(e)-1,e),n,2)}function Qbe(e,n){return ct(e.getUTCFullYear()%100,n,2)}function Jbe(e,n){return e=OU(e),ct(e.getUTCFullYear()%100,n,2)}function ewe(e,n){return ct(e.getUTCFullYear()%1e4,n,4)}function nwe(e,n){var t=e.getUTCDay();return e=t>=4||t===0?oc(e):oc.ceil(e),ct(e.getUTCFullYear()%1e4,n,4)}function twe(){return"+0000"}function hP(){return"%"}function mP(e){return+e}function pP(e){return Math.floor(+e/1e3)}var Ef,EU,TU;iwe({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function iwe(e){return Ef=ibe(e),EU=Ef.format,Ef.parse,TU=Ef.utcFormat,Ef.utcParse,Ef}function rwe(e){return new Date(e)}function awe(e){return e instanceof Date?+e:+new Date(+e)}function lA(e,n,t,i,r,a,o,l,f,c){var h=Y9(),d=h.invert,p=h.domain,v=c(".%L"),b=c(":%S"),w=c("%I:%M"),k=c("%I %p"),_=c("%a %d"),x=c("%b %d"),C=c("%B"),T=c("%Y");function O(E){return(f(E)n(r/(e.length-1)))},t.quantiles=function(i){return Array.from({length:i+1},(r,a)=>Yye(e,a/i))},t.copy=function(){return RU(n).domain(e)},vs.apply(t,arguments)}function T0(){var e=0,n=.5,t=1,i=1,r,a,o,l,f,c=or,h,d=!1,p;function v(w){return isNaN(w=+w)?p:(w=.5+((w=+h(w))-a)*(i*wt}return d3=e,d3}var h3,bP;function cwe(){if(bP)return h3;bP=1;var e=zU(),n=fwe(),t=Yc();function i(r){return r&&r.length?e(r,t,n):void 0}return h3=i,h3}var dwe=cwe();const Zs=dt(dwe);var m3,wP;function hwe(){if(wP)return m3;wP=1;function e(n,t){return ne.e^a.s<0?1:-1;for(i=a.d.length,r=e.d.length,n=0,t=ie.d[n]^a.s<0?1:-1;return i===r?0:i>r^a.s<0?1:-1};on.decimalPlaces=on.dp=function(){var e=this,n=e.d.length-1,t=(n-e.e)*zt;if(n=e.d[n],n)for(;n%10==0;n/=10)t--;return t<0?0:t};on.dividedBy=on.div=function(e){return Jo(this,new this.constructor(e))};on.dividedToIntegerBy=on.idiv=function(e){var n=this,t=n.constructor;return Et(Jo(n,new t(e),0,1),t.precision)};on.equals=on.eq=function(e){return!this.cmp(e)};on.exponent=function(){return vi(this)};on.greaterThan=on.gt=function(e){return this.cmp(e)>0};on.greaterThanOrEqualTo=on.gte=function(e){return this.cmp(e)>=0};on.isInteger=on.isint=function(){return this.e>this.d.length-2};on.isNegative=on.isneg=function(){return this.s<0};on.isPositive=on.ispos=function(){return this.s>0};on.isZero=function(){return this.s===0};on.lessThan=on.lt=function(e){return this.cmp(e)<0};on.lessThanOrEqualTo=on.lte=function(e){return this.cmp(e)<1};on.logarithm=on.log=function(e){var n,t=this,i=t.constructor,r=i.precision,a=r+5;if(e===void 0)e=new i(10);else if(e=new i(e),e.s<1||e.eq(Fr))throw Error(ya+"NaN");if(t.s<1)throw Error(ya+(t.s?"NaN":"-Infinity"));return t.eq(Fr)?new i(0):(Vt=!1,n=Jo(lm(t,a),lm(e,a),a),Vt=!0,Et(n,r))};on.minus=on.sub=function(e){var n=this;return e=new n.constructor(e),n.s==e.s?FU(n,e):IU(n,(e.s=-e.s,e))};on.modulo=on.mod=function(e){var n,t=this,i=t.constructor,r=i.precision;if(e=new i(e),!e.s)throw Error(ya+"NaN");return t.s?(Vt=!1,n=Jo(t,e,0,1).times(e),Vt=!0,t.minus(n)):Et(new i(t),r)};on.naturalExponential=on.exp=function(){return BU(this)};on.naturalLogarithm=on.ln=function(){return lm(this)};on.negated=on.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e};on.plus=on.add=function(e){var n=this;return e=new n.constructor(e),n.s==e.s?IU(n,e):FU(n,(e.s=-e.s,e))};on.precision=on.sd=function(e){var n,t,i,r=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(fu+e);if(n=vi(r)+1,i=r.d.length-1,t=i*zt+1,i=r.d[i],i){for(;i%10==0;i/=10)t--;for(i=r.d[0];i>=10;i/=10)t++}return e&&n>t?n:t};on.squareRoot=on.sqrt=function(){var e,n,t,i,r,a,o,l=this,f=l.constructor;if(l.s<1){if(!l.s)return new f(0);throw Error(ya+"NaN")}for(e=vi(l),Vt=!1,r=Math.sqrt(+l),r==0||r==1/0?(n=io(l.d),(n.length+e)%2==0&&(n+="0"),r=Math.sqrt(n),e=Zc((e+1)/2)-(e<0||e%2),r==1/0?n="5e"+e:(n=r.toExponential(),n=n.slice(0,n.indexOf("e")+1)+e),i=new f(n)):i=new f(r.toString()),t=f.precision,r=o=t+3;;)if(a=i,i=a.plus(Jo(l,a,o+2)).times(.5),io(a.d).slice(0,o)===(n=io(i.d)).slice(0,o)){if(n=n.slice(o-3,o+1),r==o&&n=="4999"){if(Et(a,t+1,0),a.times(a).eq(l)){i=a;break}}else if(n!="9999")break;o+=4}return Vt=!0,Et(i,t)};on.times=on.mul=function(e){var n,t,i,r,a,o,l,f,c,h=this,d=h.constructor,p=h.d,v=(e=new d(e)).d;if(!h.s||!e.s)return new d(0);for(e.s*=h.s,t=h.e+e.e,f=p.length,c=v.length,f=0;){for(n=0,r=f+i;r>i;)l=a[r]+v[i]*p[r-i-1]+n,a[r--]=l%Ti|0,n=l/Ti|0;a[r]=(a[r]+n)%Ti|0}for(;!a[--o];)a.pop();return n?++t:a.shift(),e.d=a,e.e=t,Vt?Et(e,d.precision):e};on.toDecimalPlaces=on.todp=function(e,n){var t=this,i=t.constructor;return t=new i(t),e===void 0?t:(po(e,0,Xc),n===void 0?n=i.rounding:po(n,0,8),Et(t,e+vi(t)+1,n))};on.toExponential=function(e,n){var t,i=this,r=i.constructor;return e===void 0?t=wu(i,!0):(po(e,0,Xc),n===void 0?n=r.rounding:po(n,0,8),i=Et(new r(i),e+1,n),t=wu(i,!0,e+1)),t};on.toFixed=function(e,n){var t,i,r=this,a=r.constructor;return e===void 0?wu(r):(po(e,0,Xc),n===void 0?n=a.rounding:po(n,0,8),i=Et(new a(r),e+vi(r)+1,n),t=wu(i.abs(),!1,e+vi(i)+1),r.isneg()&&!r.isZero()?"-"+t:t)};on.toInteger=on.toint=function(){var e=this,n=e.constructor;return Et(new n(e),vi(e)+1,n.rounding)};on.toNumber=function(){return+this};on.toPower=on.pow=function(e){var n,t,i,r,a,o,l=this,f=l.constructor,c=12,h=+(e=new f(e));if(!e.s)return new f(Fr);if(l=new f(l),!l.s){if(e.s<1)throw Error(ya+"Infinity");return l}if(l.eq(Fr))return l;if(i=f.precision,e.eq(Fr))return Et(l,i);if(n=e.e,t=e.d.length-1,o=n>=t,a=l.s,o){if((t=h<0?-h:h)<=LU){for(r=new f(Fr),n=Math.ceil(i/zt+4),Vt=!1;t%2&&(r=r.times(l),AP(r.d,n)),t=Zc(t/2),t!==0;)l=l.times(l),AP(l.d,n);return Vt=!0,e.s<0?new f(Fr).div(r):Et(r,i)}}else if(a<0)throw Error(ya+"NaN");return a=a<0&&e.d[Math.max(n,t)]&1?-1:1,l.s=1,Vt=!1,r=e.times(lm(l,i+c)),Vt=!0,r=BU(r),r.s=a,r};on.toPrecision=function(e,n){var t,i,r=this,a=r.constructor;return e===void 0?(t=vi(r),i=wu(r,t<=a.toExpNeg||t>=a.toExpPos)):(po(e,1,Xc),n===void 0?n=a.rounding:po(n,0,8),r=Et(new a(r),e,n),t=vi(r),i=wu(r,e<=t||t<=a.toExpNeg,e)),i};on.toSignificantDigits=on.tosd=function(e,n){var t=this,i=t.constructor;return e===void 0?(e=i.precision,n=i.rounding):(po(e,1,Xc),n===void 0?n=i.rounding:po(n,0,8)),Et(new i(t),e,n)};on.toString=on.valueOf=on.val=on.toJSON=on[Symbol.for("nodejs.util.inspect.custom")]=function(){var e=this,n=vi(e),t=e.constructor;return wu(e,n<=t.toExpNeg||n>=t.toExpPos)};function IU(e,n){var t,i,r,a,o,l,f,c,h=e.constructor,d=h.precision;if(!e.s||!n.s)return n.s||(n=new h(e)),Vt?Et(n,d):n;if(f=e.d,c=n.d,o=e.e,r=n.e,f=f.slice(),a=o-r,a){for(a<0?(i=f,a=-a,l=c.length):(i=c,r=o,l=f.length),o=Math.ceil(d/zt),l=o>l?o+1:l+1,a>l&&(a=l,i.length=1),i.reverse();a--;)i.push(0);i.reverse()}for(l=f.length,a=c.length,l-a<0&&(a=l,i=c,c=f,f=i),t=0;a;)t=(f[--a]=f[a]+c[a]+t)/Ti|0,f[a]%=Ti;for(t&&(f.unshift(t),++r),l=f.length;f[--l]==0;)f.pop();return n.d=f,n.e=r,Vt?Et(n,d):n}function po(e,n,t){if(e!==~~e||et)throw Error(fu+e)}function io(e){var n,t,i,r=e.length-1,a="",o=e[0];if(r>0){for(a+=o,n=1;no?1:-1;else for(l=f=0;lr[l]?1:-1;break}return f}function t(i,r,a){for(var o=0;a--;)i[a]-=o,o=i[a]1;)i.shift()}return function(i,r,a,o){var l,f,c,h,d,p,v,b,w,k,_,x,C,T,O,E,M,N,F=i.constructor,R=i.s==r.s?1:-1,L=i.d,B=r.d;if(!i.s)return new F(i);if(!r.s)throw Error(ya+"Division by zero");for(f=i.e-r.e,M=B.length,O=L.length,v=new F(R),b=v.d=[],c=0;B[c]==(L[c]||0);)++c;if(B[c]>(L[c]||0)&&--f,a==null?x=a=F.precision:o?x=a+(vi(i)-vi(r))+1:x=a,x<0)return new F(0);if(x=x/zt+2|0,c=0,M==1)for(h=0,B=B[0],x++;(c1&&(B=e(B,h),L=e(L,h),M=B.length,O=L.length),T=M,w=L.slice(0,M),k=w.length;k=Ti/2&&++E;do h=0,l=n(B,w,M,k),l<0?(_=w[0],M!=k&&(_=_*Ti+(w[1]||0)),h=_/E|0,h>1?(h>=Ti&&(h=Ti-1),d=e(B,h),p=d.length,k=w.length,l=n(d,w,p,k),l==1&&(h--,t(d,M16)throw Error(cA+vi(e));if(!e.s)return new h(Fr);for(Vt=!1,l=d,o=new h(.03125);e.abs().gte(.1);)e=e.times(o),c+=5;for(i=Math.log(Xl(2,c))/Math.LN10*2+5|0,l+=i,t=r=a=new h(Fr),h.precision=l;;){if(r=Et(r.times(e),l),t=t.times(++f),o=a.plus(Jo(r,t,l)),io(o.d).slice(0,l)===io(a.d).slice(0,l)){for(;c--;)a=Et(a.times(a),l);return h.precision=d,n==null?(Vt=!0,Et(a,d)):a}a=o}}function vi(e){for(var n=e.e*zt,t=e.d[0];t>=10;t/=10)n++;return n}function b3(e,n,t){if(n>e.LN10.sd())throw Vt=!0,t&&(e.precision=t),Error(ya+"LN10 precision limit exceeded");return Et(new e(e.LN10),n)}function Ws(e){for(var n="";e--;)n+="0";return n}function lm(e,n){var t,i,r,a,o,l,f,c,h,d=1,p=10,v=e,b=v.d,w=v.constructor,k=w.precision;if(v.s<1)throw Error(ya+(v.s?"NaN":"-Infinity"));if(v.eq(Fr))return new w(0);if(n==null?(Vt=!1,c=k):c=n,v.eq(10))return n==null&&(Vt=!0),b3(w,c);if(c+=p,w.precision=c,t=io(b),i=t.charAt(0),a=vi(v),Math.abs(a)<15e14){for(;i<7&&i!=1||i==1&&t.charAt(1)>3;)v=v.times(e),t=io(v.d),i=t.charAt(0),d++;a=vi(v),i>1?(v=new w("0."+t),a++):v=new w(i+"."+t.slice(1))}else return f=b3(w,c+2,k).times(a+""),v=lm(new w(i+"."+t.slice(1)),c-p).plus(f),w.precision=k,n==null?(Vt=!0,Et(v,k)):v;for(l=o=v=Jo(v.minus(Fr),v.plus(Fr),c),h=Et(v.times(v),c),r=3;;){if(o=Et(o.times(h),c),f=l.plus(Jo(o,new w(r),c)),io(f.d).slice(0,c)===io(l.d).slice(0,c))return l=l.times(2),a!==0&&(l=l.plus(b3(w,c+2,k).times(a+""))),l=Jo(l,new w(d),c),w.precision=k,n==null?(Vt=!0,Et(l,k)):l;l=f,r+=2}}function CP(e,n){var t,i,r;for((t=n.indexOf("."))>-1&&(n=n.replace(".","")),(i=n.search(/e/i))>0?(t<0&&(t=i),t+=+n.slice(i+1),n=n.substring(0,i)):t<0&&(t=n.length),i=0;n.charCodeAt(i)===48;)++i;for(r=n.length;n.charCodeAt(r-1)===48;)--r;if(n=n.slice(i,r),n){if(r-=i,t=t-i-1,e.e=Zc(t/zt),e.d=[],i=(t+1)%zt,t<0&&(i+=zt),im1||e.e<-m1))throw Error(cA+t)}else e.s=0,e.e=0,e.d=[0];return e}function Et(e,n,t){var i,r,a,o,l,f,c,h,d=e.d;for(o=1,a=d[0];a>=10;a/=10)o++;if(i=n-o,i<0)i+=zt,r=n,c=d[h=0];else{if(h=Math.ceil((i+1)/zt),a=d.length,h>=a)return e;for(c=a=d[h],o=1;a>=10;a/=10)o++;i%=zt,r=i-zt+o}if(t!==void 0&&(a=Xl(10,o-r-1),l=c/a%10|0,f=n<0||d[h+1]!==void 0||c%a,f=t<4?(l||f)&&(t==0||t==(e.s<0?3:2)):l>5||l==5&&(t==4||f||t==6&&(i>0?r>0?c/Xl(10,o-r):0:d[h-1])%10&1||t==(e.s<0?8:7))),n<1||!d[0])return f?(a=vi(e),d.length=1,n=n-a-1,d[0]=Xl(10,(zt-n%zt)%zt),e.e=Zc(-n/zt)||0):(d.length=1,d[0]=e.e=e.s=0),e;if(i==0?(d.length=h,a=1,h--):(d.length=h+1,a=Xl(10,zt-i),d[h]=r>0?(c/Xl(10,o-r)%Xl(10,r)|0)*a:0),f)for(;;)if(h==0){(d[0]+=a)==Ti&&(d[0]=1,++e.e);break}else{if(d[h]+=a,d[h]!=Ti)break;d[h--]=0,a=1}for(i=d.length;d[--i]===0;)d.pop();if(Vt&&(e.e>m1||e.e<-m1))throw Error(cA+vi(e));return e}function FU(e,n){var t,i,r,a,o,l,f,c,h,d,p=e.constructor,v=p.precision;if(!e.s||!n.s)return n.s?n.s=-n.s:n=new p(e),Vt?Et(n,v):n;if(f=e.d,d=n.d,i=n.e,c=e.e,f=f.slice(),o=c-i,o){for(h=o<0,h?(t=f,o=-o,l=d.length):(t=d,i=c,l=f.length),r=Math.max(Math.ceil(v/zt),l)+2,o>r&&(o=r,t.length=1),t.reverse(),r=o;r--;)t.push(0);t.reverse()}else{for(r=f.length,l=d.length,h=r0;--r)f[l++]=0;for(r=d.length;r>o;){if(f[--r]0?a=a.charAt(0)+"."+a.slice(1)+Ws(i):o>1&&(a=a.charAt(0)+"."+a.slice(1)),a=a+(r<0?"e":"e+")+r):r<0?(a="0."+Ws(-r-1)+a,t&&(i=t-o)>0&&(a+=Ws(i))):r>=o?(a+=Ws(r+1-o),t&&(i=t-r-1)>0&&(a=a+"."+Ws(i))):((i=r+1)0&&(r+1===o&&(a+="."),a+=Ws(i))),e.s<0?"-"+a:a}function AP(e,n){if(e.length>n)return e.length=n,!0}function qU(e){var n,t,i;function r(a){var o=this;if(!(o instanceof r))return new r(a);if(o.constructor=r,a instanceof r){o.s=a.s,o.e=a.e,o.d=(a=a.d)?a.slice():a;return}if(typeof a=="number"){if(a*0!==0)throw Error(fu+a);if(a>0)o.s=1;else if(a<0)a=-a,o.s=-1;else{o.s=0,o.e=0,o.d=[0];return}if(a===~~a&&a<1e7){o.e=0,o.d=[a];return}return CP(o,a.toString())}else if(typeof a!="string")throw Error(fu+a);if(a.charCodeAt(0)===45?(a=a.slice(1),o.s=-1):o.s=1,xwe.test(a))CP(o,a);else throw Error(fu+a)}if(r.prototype=on,r.ROUND_UP=0,r.ROUND_DOWN=1,r.ROUND_CEIL=2,r.ROUND_FLOOR=3,r.ROUND_HALF_UP=4,r.ROUND_HALF_DOWN=5,r.ROUND_HALF_EVEN=6,r.ROUND_HALF_CEIL=7,r.ROUND_HALF_FLOOR=8,r.clone=qU,r.config=r.set=Swe,e===void 0&&(e={}),e)for(i=["precision","rounding","toExpNeg","toExpPos","LN10"],n=0;n=r[n+1]&&i<=r[n+2])this[t]=i;else throw Error(fu+t+": "+i);if((i=e[t="LN10"])!==void 0)if(i==Math.LN10)this[t]=new this(i);else throw Error(fu+t+": "+i);return this}var dA=qU(_we);Fr=new dA(1);const Ct=dA;function Cwe(e){return Twe(e)||Ewe(e)||Owe(e)||Awe()}function Awe(){throw new TypeError(`Invalid attempt to spread non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Owe(e,n){if(e){if(typeof e=="string")return w4(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);if(t==="Object"&&e.constructor&&(t=e.constructor.name),t==="Map"||t==="Set")return Array.from(e);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return w4(e,n)}}function Ewe(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function Twe(e){if(Array.isArray(e))return w4(e)}function w4(e,n){(n==null||n>e.length)&&(n=e.length);for(var t=0,i=new Array(n);t=n?t.apply(void 0,r):e(n-o,OP(function(){for(var l=arguments.length,f=new Array(l),c=0;ce.length)&&(n=e.length);for(var t=0,i=new Array(n);t"u"||!(Symbol.iterator in Object(e)))){var t=[],i=!0,r=!1,a=void 0;try{for(var o=e[Symbol.iterator](),l;!(i=(l=o.next()).done)&&(t.push(l.value),!(n&&t.length===n));i=!0);}catch(f){r=!0,a=f}finally{try{!i&&o.return!=null&&o.return()}finally{if(r)throw a}}return t}}function Uwe(e){if(Array.isArray(e))return e}function GU(e){var n=um(e,2),t=n[0],i=n[1],r=t,a=i;return t>i&&(r=i,a=t),[r,a]}function YU(e,n,t){if(e.lte(0))return new Ct(0);var i=D0.getDigitCount(e.toNumber()),r=new Ct(10).pow(i),a=e.div(r),o=i!==1?.05:.1,l=new Ct(Math.ceil(a.div(o).toNumber())).add(t).mul(o),f=l.mul(r);return n?f:new Ct(Math.ceil(f))}function Vwe(e,n,t){var i=1,r=new Ct(e);if(!r.isint()&&t){var a=Math.abs(e);a<1?(i=new Ct(10).pow(D0.getDigitCount(e)-1),r=new Ct(Math.floor(r.div(i).toNumber())).mul(i)):a>1&&(r=new Ct(Math.floor(e)))}else e===0?r=new Ct(Math.floor((n-1)/2)):t||(r=new Ct(Math.floor(e)));var o=Math.floor((n-1)/2),l=Rwe(Dwe(function(f){return r.add(new Ct(f-o).mul(i)).toNumber()}),k4);return l(0,n)}function KU(e,n,t,i){var r=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0;if(!Number.isFinite((n-e)/(t-1)))return{step:new Ct(0),tickMin:new Ct(0),tickMax:new Ct(0)};var a=YU(new Ct(n).sub(e).div(t-1),i,r),o;e<=0&&n>=0?o=new Ct(0):(o=new Ct(e).add(n).div(2),o=o.sub(new Ct(o).mod(a)));var l=Math.ceil(o.sub(e).div(a).toNumber()),f=Math.ceil(new Ct(n).sub(o).div(a).toNumber()),c=l+f+1;return c>t?KU(e,n,t,i,r+1):(c0?f+(t-c):f,l=n>0?l:l+(t-c)),{step:a,tickMin:o.sub(new Ct(l).mul(a)),tickMax:o.add(new Ct(f).mul(a))})}function Wwe(e){var n=um(e,2),t=n[0],i=n[1],r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:6,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,o=Math.max(r,2),l=GU([t,i]),f=um(l,2),c=f[0],h=f[1];if(c===-1/0||h===1/0){var d=h===1/0?[c].concat(x4(k4(0,r-1).map(function(){return 1/0}))):[].concat(x4(k4(0,r-1).map(function(){return-1/0})),[h]);return t>i?_4(d):d}if(c===h)return Vwe(c,r,a);var p=KU(c,h,o,a),v=p.step,b=p.tickMin,w=p.tickMax,k=D0.rangeStep(b,w.add(new Ct(.1).mul(v)),v);return t>i?_4(k):k}function Gwe(e,n){var t=um(e,2),i=t[0],r=t[1],a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,o=GU([i,r]),l=um(o,2),f=l[0],c=l[1];if(f===-1/0||c===1/0)return[i,r];if(f===c)return[f];var h=Math.max(n,2),d=YU(new Ct(c).sub(f).div(h-1),a,0),p=[].concat(x4(D0.rangeStep(new Ct(f),new Ct(c).sub(new Ct(.99).mul(d)),d)),[c]);return i>r?_4(p):p}var Ywe=VU(Wwe),Kwe=VU(Gwe),Xwe="Invariant failed";function ku(e,n){throw new Error(Xwe)}var Zwe=["offset","layout","width","dataKey","data","dataPointFormatter","xAxis","yAxis"];function lc(e){"@babel/helpers - typeof";return lc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},lc(e)}function p1(){return p1=Object.assign?Object.assign.bind():function(e){for(var n=1;ne.length)&&(n=e.length);for(var t=0,i=new Array(n);t=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(t[i]=e[i])}return t}function rke(e,n){if(e==null)return{};var t={};for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){if(n.indexOf(i)>=0)continue;t[i]=e[i]}return t}function ake(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function oke(e,n){for(var t=0;te.length)&&(n=e.length);for(var t=0,i=new Array(n);t1&&arguments[1]!==void 0?arguments[1]:[],r=arguments.length>2?arguments[2]:void 0,a=arguments.length>3?arguments[3]:void 0,o=-1,l=(t=i==null?void 0:i.length)!==null&&t!==void 0?t:0;if(l<=1)return 0;if(a&&a.axisType==="angleAxis"&&Math.abs(Math.abs(a.range[1]-a.range[0])-360)<=1e-6)for(var f=a.range,c=0;c0?r[c-1].coordinate:r[l-1].coordinate,d=r[c].coordinate,p=c>=l-1?r[0].coordinate:r[c+1].coordinate,v=void 0;if(La(d-h)!==La(p-d)){var b=[];if(La(p-d)===La(f[1]-f[0])){v=p;var w=d+f[1]-f[0];b[0]=Math.min(w,(w+h)/2),b[1]=Math.max(w,(w+h)/2)}else{v=h;var k=p+f[1]-f[0];b[0]=Math.min(d,(k+d)/2),b[1]=Math.max(d,(k+d)/2)}var _=[Math.min(d,(v+d)/2),Math.max(d,(v+d)/2)];if(n>_[0]&&n<=_[1]||n>=b[0]&&n<=b[1]){o=r[c].index;break}}else{var x=Math.min(h,p),C=Math.max(h,p);if(n>(x+d)/2&&n<=(C+d)/2){o=r[c].index;break}}}else for(var T=0;T0&&T(i[T].coordinate+i[T-1].coordinate)/2&&n<=(i[T].coordinate+i[T+1].coordinate)/2||T===l-1&&n>(i[T].coordinate+i[T-1].coordinate)/2){o=i[T].index;break}return o},hA=function(n){var t,i=n,r=i.type.displayName,a=(t=n.type)!==null&&t!==void 0&&t.defaultProps?Qt(Qt({},n.type.defaultProps),n.props):n.props,o=a.stroke,l=a.fill,f;switch(r){case"Line":f=o;break;case"Area":case"Radar":f=o&&o!=="none"?o:l;break;default:f=l;break}return f},xke=function(n){var t=n.barSize,i=n.totalSize,r=n.stackGroups,a=r===void 0?{}:r;if(!a)return{};for(var o={},l=Object.keys(a),f=0,c=l.length;f=0});if(_&&_.length){var x=_[0].type.defaultProps,C=x!==void 0?Qt(Qt({},x),_[0].props):_[0].props,T=C.barSize,O=C[k];o[O]||(o[O]=[]);var E=Vn(T)?t:T;o[O].push({item:_[0],stackList:_.slice(1),barSize:Vn(E)?void 0:bu(E,i,0)})}}return o},Ske=function(n){var t=n.barGap,i=n.barCategoryGap,r=n.bandSize,a=n.sizeList,o=a===void 0?[]:a,l=n.maxBarSize,f=o.length;if(f<1)return null;var c=bu(t,r,0,!0),h,d=[];if(o[0].barSize===+o[0].barSize){var p=!1,v=r/f,b=o.reduce(function(T,O){return T+O.barSize||0},0);b+=(f-1)*c,b>=r&&(b-=(f-1)*c,c=0),b>=r&&v>0&&(p=!0,v*=.9,b=f*v);var w=(r-b)/2>>0,k={offset:w-c,size:0};h=o.reduce(function(T,O){var E={item:O.item,position:{offset:k.offset+k.size+c,size:p?v:O.barSize}},M=[].concat(jP(T),[E]);return k=M[M.length-1].position,O.stackList&&O.stackList.length&&O.stackList.forEach(function(N){M.push({item:N,position:k})}),M},d)}else{var _=bu(i,r,0,!0);r-2*_-(f-1)*c<=0&&(c=0);var x=(r-2*_-(f-1)*c)/f;x>1&&(x>>=0);var C=l===+l?Math.min(x,l):x;h=o.reduce(function(T,O,E){var M=[].concat(jP(T),[{item:O.item,position:{offset:_+(x+c)*E+(x-C)/2,size:C}}]);return O.stackList&&O.stackList.length&&O.stackList.forEach(function(N){M.push({item:N,position:M[M.length-1].position})}),M},d)}return h},Cke=function(n,t,i,r){var a=i.children,o=i.width,l=i.margin,f=o-(l.left||0)-(l.right||0),c=JU({children:a,legendWidth:f});if(c){var h=r||{},d=h.width,p=h.height,v=c.align,b=c.verticalAlign,w=c.layout;if((w==="vertical"||w==="horizontal"&&b==="middle")&&v!=="center"&&Ue(n[v]))return Qt(Qt({},n),{},Uf({},v,n[v]+(d||0)));if((w==="horizontal"||w==="vertical"&&v==="center")&&b!=="middle"&&Ue(n[b]))return Qt(Qt({},n),{},Uf({},b,n[b]+(p||0)))}return n},Ake=function(n,t,i){return Vn(t)?!0:n==="horizontal"?t==="yAxis":n==="vertical"||i==="x"?t==="xAxis":i==="y"?t==="yAxis":!0},eV=function(n,t,i,r,a){var o=t.props.children,l=va(o,cp).filter(function(c){return Ake(r,a,c.props.direction)});if(l&&l.length){var f=l.map(function(c){return c.props.dataKey});return n.reduce(function(c,h){var d=lr(h,i);if(Vn(d))return c;var p=Array.isArray(d)?[j0(d),Zs(d)]:[d,d],v=f.reduce(function(b,w){var k=lr(h,w,0),_=p[0]-Math.abs(Array.isArray(k)?k[0]:k),x=p[1]+Math.abs(Array.isArray(k)?k[1]:k);return[Math.min(_,b[0]),Math.max(x,b[1])]},[1/0,-1/0]);return[Math.min(v[0],c[0]),Math.max(v[1],c[1])]},[1/0,-1/0])}return null},Oke=function(n,t,i,r,a){var o=t.map(function(l){return eV(n,l,i,a,r)}).filter(function(l){return!Vn(l)});return o&&o.length?o.reduce(function(l,f){return[Math.min(l[0],f[0]),Math.max(l[1],f[1])]},[1/0,-1/0]):null},nV=function(n,t,i,r,a){var o=t.map(function(f){var c=f.props.dataKey;return i==="number"&&c&&eV(n,f,c,r)||Th(n,c,i,a)});if(i==="number")return o.reduce(function(f,c){return[Math.min(f[0],c[0]),Math.max(f[1],c[1])]},[1/0,-1/0]);var l={};return o.reduce(function(f,c){for(var h=0,d=c.length;h=2?La(l[0]-l[1])*2*c:c,t&&(n.ticks||n.niceTicks)){var h=(n.ticks||n.niceTicks).map(function(d){var p=a?a.indexOf(d):d;return{coordinate:r(p)+c,value:d,offset:c}});return h.filter(function(d){return!Wc(d.coordinate)})}return n.isCategorical&&n.categoricalDomain?n.categoricalDomain.map(function(d,p){return{coordinate:r(d)+c,value:d,index:p,offset:c}}):r.ticks&&!i?r.ticks(n.tickCount).map(function(d){return{coordinate:r(d)+c,value:d,offset:c}}):r.domain().map(function(d,p){return{coordinate:r(d)+c,value:a?a[d]:d,index:p,offset:c}})},w3=new WeakMap,Xv=function(n,t){if(typeof t!="function")return n;w3.has(n)||w3.set(n,new WeakMap);var i=w3.get(n);if(i.has(t))return i.get(t);var r=function(){n.apply(void 0,arguments),t.apply(void 0,arguments)};return i.set(t,r),r},Eke=function(n,t,i){var r=n.scale,a=n.type,o=n.layout,l=n.axisType;if(r==="auto")return o==="radial"&&l==="radiusAxis"?{scale:im(),realScaleType:"band"}:o==="radial"&&l==="angleAxis"?{scale:f1(),realScaleType:"linear"}:a==="category"&&t&&(t.indexOf("LineChart")>=0||t.indexOf("AreaChart")>=0||t.indexOf("ComposedChart")>=0&&!i)?{scale:Eh(),realScaleType:"point"}:a==="category"?{scale:im(),realScaleType:"band"}:{scale:f1(),realScaleType:"linear"};if(yu(r)){var f="scale".concat(g0(r));return{scale:(vP[f]||Eh)(),realScaleType:vP[f]?f:"point"}}return zn(r)?{scale:r}:{scale:Eh(),realScaleType:"point"}},DP=1e-4,Tke=function(n){var t=n.domain();if(!(!t||t.length<=2)){var i=t.length,r=n.range(),a=Math.min(r[0],r[1])-DP,o=Math.max(r[0],r[1])+DP,l=n(t[0]),f=n(t[i-1]);(lo||fo)&&n.domain([t[0],t[i-1]])}},jke=function(n,t){if(!n)return null;for(var i=0,r=n.length;ir)&&(a[1]=r),a[0]>r&&(a[0]=r),a[1]=0?(n[l][i][0]=a,n[l][i][1]=a+f,a=n[l][i][1]):(n[l][i][0]=o,n[l][i][1]=o+f,o=n[l][i][1])}},Rke=function(n){var t=n.length;if(!(t<=0))for(var i=0,r=n[0].length;i=0?(n[o][i][0]=a,n[o][i][1]=a+l,a=n[o][i][1]):(n[o][i][0]=0,n[o][i][1]=0)}},Pke={sign:Dke,expand:gve,none:Jf,silhouette:yve,wiggle:bve,positive:Rke},Nke=function(n,t,i){var r=t.map(function(l){return l.props.dataKey}),a=Pke[i],o=vve().keys(r).value(function(l,f){return+lr(l,f,0)}).order(t4).offset(a);return o(n)},$ke=function(n,t,i,r,a,o){if(!n)return null;var l=o?t.reverse():t,f={},c=l.reduce(function(d,p){var v,b=(v=p.type)!==null&&v!==void 0&&v.defaultProps?Qt(Qt({},p.type.defaultProps),p.props):p.props,w=b.stackId,k=b.hide;if(k)return d;var _=b[i],x=d[_]||{hasStack:!1,stackGroups:{}};if(Si(w)){var C=x.stackGroups[w]||{numericAxisId:i,cateAxisId:r,items:[]};C.items.push(p),x.hasStack=!0,x.stackGroups[w]=C}else x.stackGroups[Gc("_stackId_")]={numericAxisId:i,cateAxisId:r,items:[p]};return Qt(Qt({},d),{},Uf({},_,x))},f),h={};return Object.keys(c).reduce(function(d,p){var v=c[p];if(v.hasStack){var b={};v.stackGroups=Object.keys(v.stackGroups).reduce(function(w,k){var _=v.stackGroups[k];return Qt(Qt({},w),{},Uf({},k,{numericAxisId:i,cateAxisId:r,items:_.items,stackedData:Nke(n,_.items,a)}))},b)}return Qt(Qt({},d),{},Uf({},p,v))},h)},zke=function(n,t){var i=t.realScaleType,r=t.type,a=t.tickCount,o=t.originalDomain,l=t.allowDecimals,f=i||t.scale;if(f!=="auto"&&f!=="linear")return null;if(a&&r==="number"&&o&&(o[0]==="auto"||o[1]==="auto")){var c=n.domain();if(!c.length)return null;var h=Ywe(c,a,l);return n.domain([j0(h),Zs(h)]),{niceTicks:h}}if(a&&r==="number"){var d=n.domain(),p=Kwe(d,a,l);return{niceTicks:p}}return null};function g1(e){var n=e.axis,t=e.ticks,i=e.bandSize,r=e.entry,a=e.index,o=e.dataKey;if(n.type==="category"){if(!n.allowDuplicatedCategory&&n.dataKey&&!Vn(r[n.dataKey])){var l=Hg(t,"value",r[n.dataKey]);if(l)return l.coordinate+i/2}return t[a]?t[a].coordinate+i/2:null}var f=lr(r,Vn(o)?n.dataKey:o);return Vn(f)?null:n.scale(f)}var RP=function(n){var t=n.axis,i=n.ticks,r=n.offset,a=n.bandSize,o=n.entry,l=n.index;if(t.type==="category")return i[l]?i[l].coordinate+r:null;var f=lr(o,t.dataKey,t.domain[l]);return Vn(f)?null:t.scale(f)-a/2+r},Lke=function(n){var t=n.numericAxis,i=t.scale.domain();if(t.type==="number"){var r=Math.min(i[0],i[1]),a=Math.max(i[0],i[1]);return r<=0&&a>=0?0:a<0?a:r}return i[0]},Ike=function(n,t){var i,r=(i=n.type)!==null&&i!==void 0&&i.defaultProps?Qt(Qt({},n.type.defaultProps),n.props):n.props,a=r.stackId;if(Si(a)){var o=t[a];if(o){var l=o.items.indexOf(n);return l>=0?o.stackedData[l]:null}}return null},Bke=function(n){return n.reduce(function(t,i){return[j0(i.concat([t[0]]).filter(Ue)),Zs(i.concat([t[1]]).filter(Ue))]},[1/0,-1/0])},rV=function(n,t,i){return Object.keys(n).reduce(function(r,a){var o=n[a],l=o.stackedData,f=l.reduce(function(c,h){var d=Bke(h.slice(t,i+1));return[Math.min(c[0],d[0]),Math.max(c[1],d[1])]},[1/0,-1/0]);return[Math.min(f[0],r[0]),Math.max(f[1],r[1])]},[1/0,-1/0]).map(function(r){return r===1/0||r===-1/0?0:r})},PP=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,NP=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,O4=function(n,t,i){if(zn(n))return n(t,i);if(!Array.isArray(n))return t;var r=[];if(Ue(n[0]))r[0]=i?n[0]:Math.min(n[0],t[0]);else if(PP.test(n[0])){var a=+PP.exec(n[0])[1];r[0]=t[0]-a}else zn(n[0])?r[0]=n[0](t[0]):r[0]=t[0];if(Ue(n[1]))r[1]=i?n[1]:Math.max(n[1],t[1]);else if(NP.test(n[1])){var o=+NP.exec(n[1])[1];r[1]=t[1]+o}else zn(n[1])?r[1]=n[1](t[1]):r[1]=t[1];return r},y1=function(n,t,i){if(n&&n.scale&&n.scale.bandwidth){var r=n.scale.bandwidth();if(!i||r>0)return r}if(n&&t&&t.length>=2){for(var a=B9(t,function(d){return d.coordinate}),o=1/0,l=1,f=a.length;lo&&(c=2*Math.PI-c),{radius:l,angle:Uke(c),angleInRadian:c}},Gke=function(n){var t=n.startAngle,i=n.endAngle,r=Math.floor(t/360),a=Math.floor(i/360),o=Math.min(r,a);return{startAngle:t-o*360,endAngle:i-o*360}},Yke=function(n,t){var i=t.startAngle,r=t.endAngle,a=Math.floor(i/360),o=Math.floor(r/360),l=Math.min(a,o);return n+l*360},IP=function(n,t){var i=n.x,r=n.y,a=Wke({x:i,y:r},t),o=a.radius,l=a.angle,f=t.innerRadius,c=t.outerRadius;if(oc)return!1;if(o===0)return!0;var h=Gke(t),d=h.startAngle,p=h.endAngle,v=l,b;if(d<=p){for(;v>p;)v-=360;for(;v=d&&v<=p}else{for(;v>d;)v-=360;for(;v=p&&v<=d}return b?LP(LP({},t),{},{radius:o,angle:Yke(v,t)}):null};function hm(e){"@babel/helpers - typeof";return hm=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},hm(e)}var Kke=["offset"];function Xke(e){return e_e(e)||Jke(e)||Qke(e)||Zke()}function Zke(){throw new TypeError(`Invalid attempt to spread non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Qke(e,n){if(e){if(typeof e=="string")return E4(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);if(t==="Object"&&e.constructor&&(t=e.constructor.name),t==="Map"||t==="Set")return Array.from(e);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return E4(e,n)}}function Jke(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function e_e(e){if(Array.isArray(e))return E4(e)}function E4(e,n){(n==null||n>e.length)&&(n=e.length);for(var t=0,i=new Array(n);t=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(t[i]=e[i])}return t}function t_e(e,n){if(e==null)return{};var t={};for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){if(n.indexOf(i)>=0)continue;t[i]=e[i]}return t}function BP(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),t.push.apply(t,i)}return t}function ki(e){for(var n=1;n=0?1:-1,C,T;r==="insideStart"?(C=v+x*o,T=w):r==="insideEnd"?(C=b-x*o,T=!w):r==="end"&&(C=b+x*o,T=w),T=_<=0?T:!T;var O=Bi(c,h,k,C),E=Bi(c,h,k,C+(T?1:-1)*359),M="M".concat(O.x,",").concat(O.y,` - A`).concat(k,",").concat(k,",0,1,").concat(T?0:1,`, - `).concat(E.x,",").concat(E.y),N=Vn(n.id)?Gc("recharts-radial-line-"):n.id;return Q.createElement("text",mm({},i,{dominantBaseline:"central",className:dn("recharts-radial-bar-label",l)}),Q.createElement("defs",null,Q.createElement("path",{id:N,d:M})),Q.createElement("textPath",{xlinkHref:"#".concat(N)},t))},u_e=function(n){var t=n.viewBox,i=n.offset,r=n.position,a=t,o=a.cx,l=a.cy,f=a.innerRadius,c=a.outerRadius,h=a.startAngle,d=a.endAngle,p=(h+d)/2;if(r==="outside"){var v=Bi(o,l,c+i,p),b=v.x,w=v.y;return{x:b,y:w,textAnchor:b>=o?"start":"end",verticalAnchor:"middle"}}if(r==="center")return{x:o,y:l,textAnchor:"middle",verticalAnchor:"middle"};if(r==="centerTop")return{x:o,y:l,textAnchor:"middle",verticalAnchor:"start"};if(r==="centerBottom")return{x:o,y:l,textAnchor:"middle",verticalAnchor:"end"};var k=(f+c)/2,_=Bi(o,l,k,p),x=_.x,C=_.y;return{x,y:C,textAnchor:"middle",verticalAnchor:"middle"}},f_e=function(n){var t=n.viewBox,i=n.parentViewBox,r=n.offset,a=n.position,o=t,l=o.x,f=o.y,c=o.width,h=o.height,d=h>=0?1:-1,p=d*r,v=d>0?"end":"start",b=d>0?"start":"end",w=c>=0?1:-1,k=w*r,_=w>0?"end":"start",x=w>0?"start":"end";if(a==="top"){var C={x:l+c/2,y:f-d*r,textAnchor:"middle",verticalAnchor:v};return ki(ki({},C),i?{height:Math.max(f-i.y,0),width:c}:{})}if(a==="bottom"){var T={x:l+c/2,y:f+h+p,textAnchor:"middle",verticalAnchor:b};return ki(ki({},T),i?{height:Math.max(i.y+i.height-(f+h),0),width:c}:{})}if(a==="left"){var O={x:l-k,y:f+h/2,textAnchor:_,verticalAnchor:"middle"};return ki(ki({},O),i?{width:Math.max(O.x-i.x,0),height:h}:{})}if(a==="right"){var E={x:l+c+k,y:f+h/2,textAnchor:x,verticalAnchor:"middle"};return ki(ki({},E),i?{width:Math.max(i.x+i.width-E.x,0),height:h}:{})}var M=i?{width:c,height:h}:{};return a==="insideLeft"?ki({x:l+k,y:f+h/2,textAnchor:x,verticalAnchor:"middle"},M):a==="insideRight"?ki({x:l+c-k,y:f+h/2,textAnchor:_,verticalAnchor:"middle"},M):a==="insideTop"?ki({x:l+c/2,y:f+p,textAnchor:"middle",verticalAnchor:b},M):a==="insideBottom"?ki({x:l+c/2,y:f+h-p,textAnchor:"middle",verticalAnchor:v},M):a==="insideTopLeft"?ki({x:l+k,y:f+p,textAnchor:x,verticalAnchor:b},M):a==="insideTopRight"?ki({x:l+c-k,y:f+p,textAnchor:_,verticalAnchor:b},M):a==="insideBottomLeft"?ki({x:l+k,y:f+h-p,textAnchor:x,verticalAnchor:v},M):a==="insideBottomRight"?ki({x:l+c-k,y:f+h-p,textAnchor:_,verticalAnchor:v},M):Vc(a)&&(Ue(a.x)||tu(a.x))&&(Ue(a.y)||tu(a.y))?ki({x:l+bu(a.x,c),y:f+bu(a.y,h),textAnchor:"end",verticalAnchor:"end"},M):ki({x:l+c/2,y:f+h/2,textAnchor:"middle",verticalAnchor:"middle"},M)},c_e=function(n){return"cx"in n&&Ue(n.cx)};function Jt(e){var n=e.offset,t=n===void 0?5:n,i=n_e(e,Kke),r=ki({offset:t},i),a=r.viewBox,o=r.position,l=r.value,f=r.children,c=r.content,h=r.className,d=h===void 0?"":h,p=r.textBreakAll;if(!a||Vn(l)&&Vn(f)&&!A.isValidElement(c)&&!zn(c))return null;if(A.isValidElement(c))return A.cloneElement(c,r);var v;if(zn(c)){if(v=A.createElement(c,r),A.isValidElement(v))return v}else v=o_e(r);var b=c_e(a),w=qn(r,!0);if(b&&(o==="insideStart"||o==="insideEnd"||o==="end"))return l_e(r,v,w);var k=b?u_e(r):f_e(r);return Q.createElement(t1,mm({className:dn("recharts-label",d)},w,k,{breakAll:p}),v)}Jt.displayName="Label";var oV=function(n){var t=n.cx,i=n.cy,r=n.angle,a=n.startAngle,o=n.endAngle,l=n.r,f=n.radius,c=n.innerRadius,h=n.outerRadius,d=n.x,p=n.y,v=n.top,b=n.left,w=n.width,k=n.height,_=n.clockWise,x=n.labelViewBox;if(x)return x;if(Ue(w)&&Ue(k)){if(Ue(d)&&Ue(p))return{x:d,y:p,width:w,height:k};if(Ue(v)&&Ue(b))return{x:v,y:b,width:w,height:k}}return Ue(d)&&Ue(p)?{x:d,y:p,width:0,height:0}:Ue(t)&&Ue(i)?{cx:t,cy:i,startAngle:a||r||0,endAngle:o||r||0,innerRadius:c||0,outerRadius:h||f||l||0,clockWise:_}:n.viewBox?n.viewBox:{}},d_e=function(n,t){return n?n===!0?Q.createElement(Jt,{key:"label-implicit",viewBox:t}):Si(n)?Q.createElement(Jt,{key:"label-implicit",viewBox:t,value:n}):A.isValidElement(n)?n.type===Jt?A.cloneElement(n,{key:"label-implicit",viewBox:t}):Q.createElement(Jt,{key:"label-implicit",content:n,viewBox:t}):zn(n)?Q.createElement(Jt,{key:"label-implicit",content:n,viewBox:t}):Vc(n)?Q.createElement(Jt,mm({viewBox:t},n,{key:"label-implicit"})):null:null},h_e=function(n,t){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!n||!n.children&&i&&!n.label)return null;var r=n.children,a=oV(n),o=va(r,Jt).map(function(f,c){return A.cloneElement(f,{viewBox:t||a,key:"label-".concat(c)})});if(!i)return o;var l=d_e(n.label,t||a);return[l].concat(Xke(o))};Jt.parseViewBox=oV;Jt.renderCallByParent=h_e;var k3,FP;function m_e(){if(FP)return k3;FP=1;function e(n){var t=n==null?0:n.length;return t?n[t-1]:void 0}return k3=e,k3}var p_e=m_e();const v_e=dt(p_e);function pm(e){"@babel/helpers - typeof";return pm=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},pm(e)}var g_e=["valueAccessor"],y_e=["data","dataKey","clockWise","id","textBreakAll"];function b_e(e){return x_e(e)||__e(e)||k_e(e)||w_e()}function w_e(){throw new TypeError(`Invalid attempt to spread non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function k_e(e,n){if(e){if(typeof e=="string")return T4(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);if(t==="Object"&&e.constructor&&(t=e.constructor.name),t==="Map"||t==="Set")return Array.from(e);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return T4(e,n)}}function __e(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function x_e(e){if(Array.isArray(e))return T4(e)}function T4(e,n){(n==null||n>e.length)&&(n=e.length);for(var t=0,i=new Array(n);t=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(t[i]=e[i])}return t}function O_e(e,n){if(e==null)return{};var t={};for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){if(n.indexOf(i)>=0)continue;t[i]=e[i]}return t}var E_e=function(n){return Array.isArray(n.value)?v_e(n.value):n.value};function lo(e){var n=e.valueAccessor,t=n===void 0?E_e:n,i=UP(e,g_e),r=i.data,a=i.dataKey,o=i.clockWise,l=i.id,f=i.textBreakAll,c=UP(i,y_e);return!r||!r.length?null:Q.createElement(Pt,{className:"recharts-label-list"},r.map(function(h,d){var p=Vn(a)?t(h,d):lr(h&&h.payload,a),v=Vn(l)?{}:{id:"".concat(l,"-").concat(d)};return Q.createElement(Jt,w1({},qn(h,!0),c,v,{parentViewBox:h.parentViewBox,value:p,textBreakAll:f,viewBox:Jt.parseViewBox(Vn(o)?h:HP(HP({},h),{},{clockWise:o})),key:"label-".concat(d),index:d}))}))}lo.displayName="LabelList";function T_e(e,n){return e?e===!0?Q.createElement(lo,{key:"labelList-implicit",data:n}):Q.isValidElement(e)||zn(e)?Q.createElement(lo,{key:"labelList-implicit",data:n,content:e}):Vc(e)?Q.createElement(lo,w1({data:n},e,{key:"labelList-implicit"})):null:null}function j_e(e,n){var t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!e||!e.children&&t&&!e.label)return null;var i=e.children,r=va(i,lo).map(function(o,l){return A.cloneElement(o,{data:n,key:"labelList-".concat(l)})});if(!t)return r;var a=T_e(e.label,n);return[a].concat(b_e(r))}lo.renderCallByParent=j_e;function vm(e){"@babel/helpers - typeof";return vm=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},vm(e)}function j4(){return j4=Object.assign?Object.assign.bind():function(e){for(var n=1;n180),",").concat(+(o>c),`, - `).concat(d.x,",").concat(d.y,` - `);if(r>0){var v=Bi(t,i,r,o),b=Bi(t,i,r,c);p+="L ".concat(b.x,",").concat(b.y,` - A `).concat(r,",").concat(r,`,0, - `).concat(+(Math.abs(f)>180),",").concat(+(o<=c),`, - `).concat(v.x,",").concat(v.y," Z")}else p+="L ".concat(t,",").concat(i," Z");return p},N_e=function(n){var t=n.cx,i=n.cy,r=n.innerRadius,a=n.outerRadius,o=n.cornerRadius,l=n.forceCornerRadius,f=n.cornerIsExternal,c=n.startAngle,h=n.endAngle,d=La(h-c),p=Zv({cx:t,cy:i,radius:a,angle:c,sign:d,cornerRadius:o,cornerIsExternal:f}),v=p.circleTangency,b=p.lineTangency,w=p.theta,k=Zv({cx:t,cy:i,radius:a,angle:h,sign:-d,cornerRadius:o,cornerIsExternal:f}),_=k.circleTangency,x=k.lineTangency,C=k.theta,T=f?Math.abs(c-h):Math.abs(c-h)-w-C;if(T<0)return l?"M ".concat(b.x,",").concat(b.y,` - a`).concat(o,",").concat(o,",0,0,1,").concat(o*2,`,0 - a`).concat(o,",").concat(o,",0,0,1,").concat(-o*2,`,0 - `):sV({cx:t,cy:i,innerRadius:r,outerRadius:a,startAngle:c,endAngle:h});var O="M ".concat(b.x,",").concat(b.y,` - A`).concat(o,",").concat(o,",0,0,").concat(+(d<0),",").concat(v.x,",").concat(v.y,` - A`).concat(a,",").concat(a,",0,").concat(+(T>180),",").concat(+(d<0),",").concat(_.x,",").concat(_.y,` - A`).concat(o,",").concat(o,",0,0,").concat(+(d<0),",").concat(x.x,",").concat(x.y,` - `);if(r>0){var E=Zv({cx:t,cy:i,radius:r,angle:c,sign:d,isExternal:!0,cornerRadius:o,cornerIsExternal:f}),M=E.circleTangency,N=E.lineTangency,F=E.theta,R=Zv({cx:t,cy:i,radius:r,angle:h,sign:-d,isExternal:!0,cornerRadius:o,cornerIsExternal:f}),L=R.circleTangency,B=R.lineTangency,G=R.theta,U=f?Math.abs(c-h):Math.abs(c-h)-F-G;if(U<0&&o===0)return"".concat(O,"L").concat(t,",").concat(i,"Z");O+="L".concat(B.x,",").concat(B.y,` - A`).concat(o,",").concat(o,",0,0,").concat(+(d<0),",").concat(L.x,",").concat(L.y,` - A`).concat(r,",").concat(r,",0,").concat(+(U>180),",").concat(+(d>0),",").concat(M.x,",").concat(M.y,` - A`).concat(o,",").concat(o,",0,0,").concat(+(d<0),",").concat(N.x,",").concat(N.y,"Z")}else O+="L".concat(t,",").concat(i,"Z");return O},$_e={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},lV=function(n){var t=WP(WP({},$_e),n),i=t.cx,r=t.cy,a=t.innerRadius,o=t.outerRadius,l=t.cornerRadius,f=t.forceCornerRadius,c=t.cornerIsExternal,h=t.startAngle,d=t.endAngle,p=t.className;if(o0&&Math.abs(h-d)<360?k=N_e({cx:i,cy:r,innerRadius:a,outerRadius:o,cornerRadius:Math.min(w,b/2),forceCornerRadius:f,cornerIsExternal:c,startAngle:h,endAngle:d}):k=sV({cx:i,cy:r,innerRadius:a,outerRadius:o,startAngle:h,endAngle:d}),Q.createElement("path",j4({},qn(t,!0),{className:v,d:k,role:"img"}))};function gm(e){"@babel/helpers - typeof";return gm=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},gm(e)}function M4(){return M4=Object.assign?Object.assign.bind():function(e){for(var n=1;nU_e.call(e,n));function Lu(e,n){return e===n||!e&&!n&&e!==e&&n!==n}const G_e="__v",Y_e="__o",K_e="_owner",{getOwnPropertyDescriptor:ZP,keys:QP}=Object;function X_e(e,n){return e.byteLength===n.byteLength&&k1(new Uint8Array(e),new Uint8Array(n))}function Z_e(e,n,t){let i=e.length;if(n.length!==i)return!1;for(;i-- >0;)if(!t.equals(e[i],n[i],i,i,e,n,t))return!1;return!0}function Q_e(e,n){return e.byteLength===n.byteLength&&k1(new Uint8Array(e.buffer,e.byteOffset,e.byteLength),new Uint8Array(n.buffer,n.byteOffset,n.byteLength))}function J_e(e,n){return Lu(e.getTime(),n.getTime())}function e2e(e,n){return e.name===n.name&&e.message===n.message&&e.cause===n.cause&&e.stack===n.stack}function n2e(e,n){return e===n}function JP(e,n,t){const i=e.size;if(i!==n.size)return!1;if(!i)return!0;const r=new Array(i),a=e.entries();let o,l,f=0;for(;(o=a.next())&&!o.done;){const c=n.entries();let h=!1,d=0;for(;(l=c.next())&&!l.done;){if(r[d]){d++;continue}const p=o.value,v=l.value;if(t.equals(p[0],v[0],f,d,e,n,t)&&t.equals(p[1],v[1],p[0],v[0],e,n,t)){h=r[d]=!0;break}d++}if(!h)return!1;f++}return!0}const t2e=Lu;function i2e(e,n,t){const i=QP(e);let r=i.length;if(QP(n).length!==r)return!1;for(;r-- >0;)if(!uV(e,n,t,i[r]))return!1;return!0}function rh(e,n,t){const i=XP(e);let r=i.length;if(XP(n).length!==r)return!1;let a,o,l;for(;r-- >0;)if(a=i[r],!uV(e,n,t,a)||(o=ZP(e,a),l=ZP(n,a),(o||l)&&(!o||!l||o.configurable!==l.configurable||o.enumerable!==l.enumerable||o.writable!==l.writable)))return!1;return!0}function r2e(e,n){return Lu(e.valueOf(),n.valueOf())}function a2e(e,n){return e.source===n.source&&e.flags===n.flags}function eN(e,n,t){const i=e.size;if(i!==n.size)return!1;if(!i)return!0;const r=new Array(i),a=e.values();let o,l;for(;(o=a.next())&&!o.done;){const f=n.values();let c=!1,h=0;for(;(l=f.next())&&!l.done;){if(!r[h]&&t.equals(o.value,l.value,o.value,l.value,e,n,t)){c=r[h]=!0;break}h++}if(!c)return!1}return!0}function k1(e,n){let t=e.byteLength;if(n.byteLength!==t||e.byteOffset!==n.byteOffset)return!1;for(;t-- >0;)if(e[t]!==n[t])return!1;return!0}function o2e(e,n){return e.hostname===n.hostname&&e.pathname===n.pathname&&e.protocol===n.protocol&&e.port===n.port&&e.hash===n.hash&&e.username===n.username&&e.password===n.password}function uV(e,n,t,i){return(i===K_e||i===Y_e||i===G_e)&&(e.$$typeof||n.$$typeof)?!0:W_e(n,i)&&t.equals(e[i],n[i],i,i,e,n,t)}const s2e="[object ArrayBuffer]",l2e="[object Arguments]",u2e="[object Boolean]",f2e="[object DataView]",c2e="[object Date]",d2e="[object Error]",h2e="[object Map]",m2e="[object Number]",p2e="[object Object]",v2e="[object RegExp]",g2e="[object Set]",y2e="[object String]",b2e={"[object Int8Array]":!0,"[object Uint8Array]":!0,"[object Uint8ClampedArray]":!0,"[object Int16Array]":!0,"[object Uint16Array]":!0,"[object Int32Array]":!0,"[object Uint32Array]":!0,"[object Float16Array]":!0,"[object Float32Array]":!0,"[object Float64Array]":!0,"[object BigInt64Array]":!0,"[object BigUint64Array]":!0},w2e="[object URL]",k2e=Object.prototype.toString;function _2e({areArrayBuffersEqual:e,areArraysEqual:n,areDataViewsEqual:t,areDatesEqual:i,areErrorsEqual:r,areFunctionsEqual:a,areMapsEqual:o,areNumbersEqual:l,areObjectsEqual:f,arePrimitiveWrappersEqual:c,areRegExpsEqual:h,areSetsEqual:d,areTypedArraysEqual:p,areUrlsEqual:v,unknownTagComparators:b}){return function(k,_,x){if(k===_)return!0;if(k==null||_==null)return!1;const C=typeof k;if(C!==typeof _)return!1;if(C!=="object")return C==="number"?l(k,_,x):C==="function"?a(k,_,x):!1;const T=k.constructor;if(T!==_.constructor)return!1;if(T===Object)return f(k,_,x);if(Array.isArray(k))return n(k,_,x);if(T===Date)return i(k,_,x);if(T===RegExp)return h(k,_,x);if(T===Map)return o(k,_,x);if(T===Set)return d(k,_,x);const O=k2e.call(k);if(O===c2e)return i(k,_,x);if(O===v2e)return h(k,_,x);if(O===h2e)return o(k,_,x);if(O===g2e)return d(k,_,x);if(O===p2e)return typeof k.then!="function"&&typeof _.then!="function"&&f(k,_,x);if(O===w2e)return v(k,_,x);if(O===d2e)return r(k,_,x);if(O===l2e)return f(k,_,x);if(b2e[O])return p(k,_,x);if(O===s2e)return e(k,_,x);if(O===f2e)return t(k,_,x);if(O===u2e||O===m2e||O===y2e)return c(k,_,x);if(b){let E=b[O];if(!E){const M=V_e(k);M&&(E=b[M])}if(E)return E(k,_,x)}return!1}}function x2e({circular:e,createCustomConfig:n,strict:t}){let i={areArrayBuffersEqual:X_e,areArraysEqual:t?rh:Z_e,areDataViewsEqual:Q_e,areDatesEqual:J_e,areErrorsEqual:e2e,areFunctionsEqual:n2e,areMapsEqual:t?_3(JP,rh):JP,areNumbersEqual:t2e,areObjectsEqual:t?rh:i2e,arePrimitiveWrappersEqual:r2e,areRegExpsEqual:a2e,areSetsEqual:t?_3(eN,rh):eN,areTypedArraysEqual:t?_3(k1,rh):k1,areUrlsEqual:o2e,unknownTagComparators:void 0};if(n&&(i=Object.assign({},i,n(i))),e){const r=Jv(i.areArraysEqual),a=Jv(i.areMapsEqual),o=Jv(i.areObjectsEqual),l=Jv(i.areSetsEqual);i=Object.assign({},i,{areArraysEqual:r,areMapsEqual:a,areObjectsEqual:o,areSetsEqual:l})}return i}function S2e(e){return function(n,t,i,r,a,o,l){return e(n,t,l)}}function C2e({circular:e,comparator:n,createState:t,equals:i,strict:r}){if(t)return function(l,f){const{cache:c=e?new WeakMap:void 0,meta:h}=t();return n(l,f,{cache:c,equals:i,meta:h,strict:r})};if(e)return function(l,f){return n(l,f,{cache:new WeakMap,equals:i,meta:void 0,strict:r})};const a={cache:void 0,equals:i,meta:void 0,strict:r};return function(l,f){return n(l,f,a)}}const A2e=bl();bl({strict:!0});bl({circular:!0});bl({circular:!0,strict:!0});bl({createInternalComparator:()=>Lu});bl({strict:!0,createInternalComparator:()=>Lu});bl({circular:!0,createInternalComparator:()=>Lu});bl({circular:!0,createInternalComparator:()=>Lu,strict:!0});function bl(e={}){const{circular:n=!1,createInternalComparator:t,createState:i,strict:r=!1}=e,a=x2e(e),o=_2e(a),l=t?t(o):S2e(o);return C2e({circular:n,comparator:o,createState:i,equals:l,strict:r})}function O2e(e){typeof requestAnimationFrame<"u"&&requestAnimationFrame(e)}function nN(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,t=-1,i=function r(a){t<0&&(t=a),a-t>n?(e(a),t=-1):O2e(r)};requestAnimationFrame(i)}function D4(e){"@babel/helpers - typeof";return D4=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},D4(e)}function E2e(e){return D2e(e)||M2e(e)||j2e(e)||T2e()}function T2e(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function j2e(e,n){if(e){if(typeof e=="string")return tN(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);if(t==="Object"&&e.constructor&&(t=e.constructor.name),t==="Map"||t==="Set")return Array.from(e);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return tN(e,n)}}function tN(e,n){(n==null||n>e.length)&&(n=e.length);for(var t=0,i=new Array(n);te.length)&&(n=e.length);for(var t=0,i=new Array(n);t1?1:_<0?0:_},w=function(_){for(var x=_>1?1:_,C=x,T=0;T<8;++T){var O=d(C)-x,E=v(C);if(Math.abs(O-x)<_1||E<_1)return p(C);C=b(C-O/E)}return p(C)};return w.isStepper=!1,w},Y2e=function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=n.stiff,i=t===void 0?100:t,r=n.damping,a=r===void 0?8:r,o=n.dt,l=o===void 0?17:o,f=function(h,d,p){var v=-(h-d)*i,b=p*a,w=p+(v-b)*l/1e3,k=p*l/1e3+h;return Math.abs(k-d)<_1&&Math.abs(w)<_1?[d,0]:[k,w]};return f.isStepper=!0,f.dt=l,f},K2e=function(){for(var n=arguments.length,t=new Array(n),i=0;ie.length)&&(n=e.length);for(var t=0,i=new Array(n);t=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(t[i]=e[i])}return t}function uxe(e,n){if(e==null)return{};var t={},i=Object.keys(e),r,a;for(a=0;a=0)&&(t[r]=e[r]);return t}function x3(e){return hxe(e)||dxe(e)||cxe(e)||fxe()}function fxe(){throw new TypeError(`Invalid attempt to spread non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function cxe(e,n){if(e){if(typeof e=="string")return z4(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);if(t==="Object"&&e.constructor&&(t=e.constructor.name),t==="Map"||t==="Set")return Array.from(e);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return z4(e,n)}}function dxe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function hxe(e){if(Array.isArray(e))return z4(e)}function z4(e,n){(n==null||n>e.length)&&(n=e.length);for(var t=0,i=new Array(n);t"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function S1(e){return S1=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},S1(e)}var vo=(function(e){yxe(t,e);var n=bxe(t);function t(i,r){var a;mxe(this,t),a=n.call(this,i,r);var o=a.props,l=o.isActive,f=o.attributeName,c=o.from,h=o.to,d=o.steps,p=o.children,v=o.duration;if(a.handleStyleChange=a.handleStyleChange.bind(B4(a)),a.changeStyle=a.changeStyle.bind(B4(a)),!l||v<=0)return a.state={style:{}},typeof p=="function"&&(a.state={style:h}),I4(a);if(d&&d.length)a.state={style:d[0].style};else if(c){if(typeof p=="function")return a.state={style:c},I4(a);a.state={style:f?gh({},f,c):c}}else a.state={style:{}};return a}return vxe(t,[{key:"componentDidMount",value:function(){var r=this.props,a=r.isActive,o=r.canBegin;this.mounted=!0,!(!a||!o)&&this.runAnimation(this.props)}},{key:"componentDidUpdate",value:function(r){var a=this.props,o=a.isActive,l=a.canBegin,f=a.attributeName,c=a.shouldReAnimate,h=a.to,d=a.from,p=this.state.style;if(l){if(!o){var v={style:f?gh({},f,h):h};this.state&&p&&(f&&p[f]!==h||!f&&p!==h)&&this.setState(v);return}if(!(A2e(r.to,h)&&r.canBegin&&r.isActive)){var b=!r.canBegin||!r.isActive;this.manager&&this.manager.stop(),this.stopJSAnimation&&this.stopJSAnimation();var w=b||c?d:r.to;if(this.state&&p){var k={style:f?gh({},f,w):w};(f&&p[f]!==w||!f&&p!==w)&&this.setState(k)}this.runAnimation(Da(Da({},this.props),{},{from:w,begin:0}))}}}},{key:"componentWillUnmount",value:function(){this.mounted=!1;var r=this.props.onAnimationEnd;this.unSubscribe&&this.unSubscribe(),this.manager&&(this.manager.stop(),this.manager=null),this.stopJSAnimation&&this.stopJSAnimation(),r&&r()}},{key:"handleStyleChange",value:function(r){this.changeStyle(r)}},{key:"changeStyle",value:function(r){this.mounted&&this.setState({style:r})}},{key:"runJSAnimation",value:function(r){var a=this,o=r.from,l=r.to,f=r.duration,c=r.easing,h=r.begin,d=r.onAnimationEnd,p=r.onAnimationStart,v=oxe(o,l,K2e(c),f,this.changeStyle),b=function(){a.stopJSAnimation=v()};this.manager.start([p,h,b,f,d])}},{key:"runStepAnimation",value:function(r){var a=this,o=r.steps,l=r.begin,f=r.onAnimationStart,c=o[0],h=c.style,d=c.duration,p=d===void 0?0:d,v=function(w,k,_){if(_===0)return w;var x=k.duration,C=k.easing,T=C===void 0?"ease":C,O=k.style,E=k.properties,M=k.onAnimationEnd,N=_>0?o[_-1]:k,F=E||Object.keys(O);if(typeof T=="function"||T==="spring")return[].concat(x3(w),[a.runJSAnimation.bind(a,{from:N.style,to:O,duration:x,easing:T}),x]);var R=aN(F,x,T),L=Da(Da(Da({},N.style),O),{},{transition:R});return[].concat(x3(w),[L,x,M]).filter(z2e)};return this.manager.start([f].concat(x3(o.reduce(v,[h,Math.max(p,l)])),[r.onAnimationEnd]))}},{key:"runAnimation",value:function(r){this.manager||(this.manager=R2e());var a=r.begin,o=r.duration,l=r.attributeName,f=r.to,c=r.easing,h=r.onAnimationStart,d=r.onAnimationEnd,p=r.steps,v=r.children,b=this.manager;if(this.unSubscribe=b.subscribe(this.handleStyleChange),typeof c=="function"||typeof v=="function"||c==="spring"){this.runJSAnimation(r);return}if(p.length>1){this.runStepAnimation(r);return}var w=l?gh({},l,f):f,k=aN(Object.keys(w),o,c);b.start([h,a,Da(Da({},w),{},{transition:k}),o,d])}},{key:"render",value:function(){var r=this.props,a=r.children;r.begin;var o=r.duration;r.attributeName,r.easing;var l=r.isActive;r.steps,r.from,r.to,r.canBegin,r.onAnimationEnd,r.shouldReAnimate,r.onAnimationReStart;var f=lxe(r,sxe),c=A.Children.count(a),h=this.state.style;if(typeof a=="function")return a(h);if(!l||c===0||o<=0)return a;var d=function(v){var b=v.props,w=b.style,k=w===void 0?{}:w,_=b.className,x=A.cloneElement(v,Da(Da({},f),{},{style:Da(Da({},k),h),className:_}));return x};return c===1?d(A.Children.only(a)):Q.createElement("div",null,A.Children.map(a,function(p){return d(p)}))}}]),t})(A.PureComponent);vo.displayName="Animate";vo.defaultProps={begin:0,duration:1e3,from:"",to:"",attributeName:"",easing:"ease",isActive:!0,canBegin:!0,steps:[],onAnimationEnd:function(){},onAnimationStart:function(){}};vo.propTypes={from:vt.oneOfType([vt.object,vt.string]),to:vt.oneOfType([vt.object,vt.string]),attributeName:vt.string,duration:vt.number,begin:vt.number,easing:vt.oneOfType([vt.string,vt.func]),steps:vt.arrayOf(vt.shape({duration:vt.number.isRequired,style:vt.object.isRequired,easing:vt.oneOfType([vt.oneOf(["ease","ease-in","ease-out","ease-in-out","linear"]),vt.func]),properties:vt.arrayOf("string"),onAnimationEnd:vt.func})),children:vt.oneOfType([vt.node,vt.func]),isActive:vt.bool,canBegin:vt.bool,onAnimationEnd:vt.func,shouldReAnimate:vt.bool,onAnimationStart:vt.func,onAnimationReStart:vt.func};function wm(e){"@babel/helpers - typeof";return wm=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},wm(e)}function C1(){return C1=Object.assign?Object.assign.bind():function(e){for(var n=1;ne.length)&&(n=e.length);for(var t=0,i=new Array(n);t=0?1:-1,f=i>=0?1:-1,c=r>=0&&i>=0||r<0&&i<0?1:0,h;if(o>0&&a instanceof Array){for(var d=[0,0,0,0],p=0,v=4;po?o:a[p];h="M".concat(n,",").concat(t+l*d[0]),d[0]>0&&(h+="A ".concat(d[0],",").concat(d[0],",0,0,").concat(c,",").concat(n+f*d[0],",").concat(t)),h+="L ".concat(n+i-f*d[1],",").concat(t),d[1]>0&&(h+="A ".concat(d[1],",").concat(d[1],",0,0,").concat(c,`, - `).concat(n+i,",").concat(t+l*d[1])),h+="L ".concat(n+i,",").concat(t+r-l*d[2]),d[2]>0&&(h+="A ".concat(d[2],",").concat(d[2],",0,0,").concat(c,`, - `).concat(n+i-f*d[2],",").concat(t+r)),h+="L ".concat(n+f*d[3],",").concat(t+r),d[3]>0&&(h+="A ".concat(d[3],",").concat(d[3],",0,0,").concat(c,`, - `).concat(n,",").concat(t+r-l*d[3])),h+="Z"}else if(o>0&&a===+a&&a>0){var b=Math.min(o,a);h="M ".concat(n,",").concat(t+l*b,` - A `).concat(b,",").concat(b,",0,0,").concat(c,",").concat(n+f*b,",").concat(t,` - L `).concat(n+i-f*b,",").concat(t,` - A `).concat(b,",").concat(b,",0,0,").concat(c,",").concat(n+i,",").concat(t+l*b,` - L `).concat(n+i,",").concat(t+r-l*b,` - A `).concat(b,",").concat(b,",0,0,").concat(c,",").concat(n+i-f*b,",").concat(t+r,` - L `).concat(n+f*b,",").concat(t+r,` - A `).concat(b,",").concat(b,",0,0,").concat(c,",").concat(n,",").concat(t+r-l*b," Z")}else h="M ".concat(n,",").concat(t," h ").concat(i," v ").concat(r," h ").concat(-i," Z");return h},Txe=function(n,t){if(!n||!t)return!1;var i=n.x,r=n.y,a=t.x,o=t.y,l=t.width,f=t.height;if(Math.abs(l)>0&&Math.abs(f)>0){var c=Math.min(a,a+l),h=Math.max(a,a+l),d=Math.min(o,o+f),p=Math.max(o,o+f);return i>=c&&i<=h&&r>=d&&r<=p}return!1},jxe={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},km=function(n){var t=hN(hN({},jxe),n),i=A.useRef(),r=A.useState(-1),a=kxe(r,2),o=a[0],l=a[1];A.useEffect(function(){if(i.current&&i.current.getTotalLength)try{var T=i.current.getTotalLength();T&&l(T)}catch{}},[]);var f=t.x,c=t.y,h=t.width,d=t.height,p=t.radius,v=t.className,b=t.animationEasing,w=t.animationDuration,k=t.animationBegin,_=t.isAnimationActive,x=t.isUpdateAnimationActive;if(f!==+f||c!==+c||h!==+h||d!==+d||h===0||d===0)return null;var C=dn("recharts-rectangle",v);return x?Q.createElement(vo,{canBegin:o>0,from:{width:h,height:d,x:f,y:c},to:{width:h,height:d,x:f,y:c},duration:w,animationEasing:b,isActive:x},function(T){var O=T.width,E=T.height,M=T.x,N=T.y;return Q.createElement(vo,{canBegin:o>0,from:"0px ".concat(o===-1?1:o,"px"),to:"".concat(o,"px 0px"),attributeName:"strokeDasharray",begin:k,duration:w,isActive:_,easing:b},Q.createElement("path",C1({},qn(t,!0),{className:C,d:mN(M,N,O,E,p),ref:i})))}):Q.createElement("path",C1({},qn(t,!0),{className:C,d:mN(f,c,h,d,p)}))};function F4(){return F4=Object.assign?Object.assign.bind():function(e){for(var n=1;n=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(t[i]=e[i])}return t}function zxe(e,n){if(e==null)return{};var t={};for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){if(n.indexOf(i)>=0)continue;t[i]=e[i]}return t}var Lxe=function(n,t,i,r,a,o){return"M".concat(n,",").concat(a,"v").concat(r,"M").concat(o,",").concat(t,"h").concat(i)},Ixe=function(n){var t=n.x,i=t===void 0?0:t,r=n.y,a=r===void 0?0:r,o=n.top,l=o===void 0?0:o,f=n.left,c=f===void 0?0:f,h=n.width,d=h===void 0?0:h,p=n.height,v=p===void 0?0:p,b=n.className,w=$xe(n,Mxe),k=Dxe({x:i,y:a,top:l,left:c,width:d,height:v},w);return!Ue(i)||!Ue(a)||!Ue(d)||!Ue(v)||!Ue(l)||!Ue(c)?null:Q.createElement("path",q4({},qn(k,!0),{className:dn("recharts-cross",b),d:Lxe(i,a,d,v,l,c)}))},S3,vN;function Bxe(){if(vN)return S3;vN=1;var e=$H(),n=e(Object.getPrototypeOf,Object);return S3=n,S3}var C3,gN;function Fxe(){if(gN)return C3;gN=1;var e=ms(),n=Bxe(),t=ps(),i="[object Object]",r=Function.prototype,a=Object.prototype,o=r.toString,l=a.hasOwnProperty,f=o.call(Object);function c(h){if(!t(h)||e(h)!=i)return!1;var d=n(h);if(d===null)return!0;var p=l.call(d,"constructor")&&d.constructor;return typeof p=="function"&&p instanceof p&&o.call(p)==f}return C3=c,C3}var qxe=Fxe();const Hxe=dt(qxe);var A3,yN;function Uxe(){if(yN)return A3;yN=1;var e=ms(),n=ps(),t="[object Boolean]";function i(r){return r===!0||r===!1||n(r)&&e(r)==t}return A3=i,A3}var Vxe=Uxe();const Wxe=dt(Vxe);function xm(e){"@babel/helpers - typeof";return xm=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},xm(e)}function A1(){return A1=Object.assign?Object.assign.bind():function(e){for(var n=1;ne.length)&&(n=e.length);for(var t=0,i=new Array(n);t0,from:{upperWidth:0,lowerWidth:0,height:p,x:f,y:c},to:{upperWidth:h,lowerWidth:d,height:p,x:f,y:c},duration:w,animationEasing:b,isActive:_},function(C){var T=C.upperWidth,O=C.lowerWidth,E=C.height,M=C.x,N=C.y;return Q.createElement(vo,{canBegin:o>0,from:"0px ".concat(o===-1?1:o,"px"),to:"".concat(o,"px 0px"),attributeName:"strokeDasharray",begin:k,duration:w,easing:b},Q.createElement("path",A1({},qn(t,!0),{className:x,d:_N(M,N,T,O,E),ref:i})))}):Q.createElement("g",null,Q.createElement("path",A1({},qn(t,!0),{className:x,d:_N(f,c,h,d,p)})))},i3e=["option","shapeType","propTransformer","activeClassName","isActive"];function Sm(e){"@babel/helpers - typeof";return Sm=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Sm(e)}function r3e(e,n){if(e==null)return{};var t=a3e(e,n),i,r;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(t[i]=e[i])}return t}function a3e(e,n){if(e==null)return{};var t={};for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){if(n.indexOf(i)>=0)continue;t[i]=e[i]}return t}function xN(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),t.push.apply(t,i)}return t}function O1(e){for(var n=1;n0&&i.handleDrag(r.changedTouches[0])}),Lr(i,"handleDragEnd",function(){i.setState({isTravellerMoving:!1,isSlideMoving:!1},function(){var r=i.props,a=r.endIndex,o=r.onDragEnd,l=r.startIndex;o==null||o({endIndex:a,startIndex:l})}),i.detachDragEndListener()}),Lr(i,"handleLeaveWrapper",function(){(i.state.isTravellerMoving||i.state.isSlideMoving)&&(i.leaveTimer=window.setTimeout(i.handleDragEnd,i.props.leaveTimeOut))}),Lr(i,"handleEnterSlideOrTraveller",function(){i.setState({isTextActive:!0})}),Lr(i,"handleLeaveSlideOrTraveller",function(){i.setState({isTextActive:!1})}),Lr(i,"handleSlideDragStart",function(r){var a=RN(r)?r.changedTouches[0]:r;i.setState({isTravellerMoving:!1,isSlideMoving:!0,slideMoveStartX:a.pageX}),i.attachDragEndListener()}),i.travellerDragStartHandlers={startX:i.handleTravellerDragStart.bind(i,"startX"),endX:i.handleTravellerDragStart.bind(i,"endX")},i.state={},i}return R3e(n,e),T3e(n,[{key:"componentWillUnmount",value:function(){this.leaveTimer&&(clearTimeout(this.leaveTimer),this.leaveTimer=null),this.detachDragEndListener()}},{key:"getIndex",value:function(i){var r=i.startX,a=i.endX,o=this.state.scaleValues,l=this.props,f=l.gap,c=l.data,h=c.length-1,d=Math.min(r,a),p=Math.max(r,a),v=n.getIndexInRange(o,d),b=n.getIndexInRange(o,p);return{startIndex:v-v%f,endIndex:b===h?h:b-b%f}}},{key:"getTextOfTick",value:function(i){var r=this.props,a=r.data,o=r.tickFormatter,l=r.dataKey,f=lr(a[i],l,i);return zn(o)?o(f,i):f}},{key:"attachDragEndListener",value:function(){window.addEventListener("mouseup",this.handleDragEnd,!0),window.addEventListener("touchend",this.handleDragEnd,!0),window.addEventListener("mousemove",this.handleDrag,!0)}},{key:"detachDragEndListener",value:function(){window.removeEventListener("mouseup",this.handleDragEnd,!0),window.removeEventListener("touchend",this.handleDragEnd,!0),window.removeEventListener("mousemove",this.handleDrag,!0)}},{key:"handleSlideDrag",value:function(i){var r=this.state,a=r.slideMoveStartX,o=r.startX,l=r.endX,f=this.props,c=f.x,h=f.width,d=f.travellerWidth,p=f.startIndex,v=f.endIndex,b=f.onChange,w=i.pageX-a;w>0?w=Math.min(w,c+h-d-l,c+h-d-o):w<0&&(w=Math.max(w,c-o,c-l));var k=this.getIndex({startX:o+w,endX:l+w});(k.startIndex!==p||k.endIndex!==v)&&b&&b(k),this.setState({startX:o+w,endX:l+w,slideMoveStartX:i.pageX})}},{key:"handleTravellerDragStart",value:function(i,r){var a=RN(r)?r.changedTouches[0]:r;this.setState({isSlideMoving:!1,isTravellerMoving:!0,movingTravellerId:i,brushMoveStartX:a.pageX}),this.attachDragEndListener()}},{key:"handleTravellerMove",value:function(i){var r=this.state,a=r.brushMoveStartX,o=r.movingTravellerId,l=r.endX,f=r.startX,c=this.state[o],h=this.props,d=h.x,p=h.width,v=h.travellerWidth,b=h.onChange,w=h.gap,k=h.data,_={startX:this.state.startX,endX:this.state.endX},x=i.pageX-a;x>0?x=Math.min(x,d+p-v-c):x<0&&(x=Math.max(x,d-c)),_[o]=c+x;var C=this.getIndex(_),T=C.startIndex,O=C.endIndex,E=function(){var N=k.length-1;return o==="startX"&&(l>f?T%w===0:O%w===0)||lf?O%w===0:T%w===0)||l>f&&O===N};this.setState(Lr(Lr({},o,c+x),"brushMoveStartX",i.pageX),function(){b&&E()&&b(C)})}},{key:"handleTravellerMoveKeyboard",value:function(i,r){var a=this,o=this.state,l=o.scaleValues,f=o.startX,c=o.endX,h=this.state[r],d=l.indexOf(h);if(d!==-1){var p=d+i;if(!(p===-1||p>=l.length)){var v=l[p];r==="startX"&&v>=c||r==="endX"&&v<=f||this.setState(Lr({},r,v),function(){a.props.onChange(a.getIndex({startX:a.state.startX,endX:a.state.endX}))})}}}},{key:"renderBackground",value:function(){var i=this.props,r=i.x,a=i.y,o=i.width,l=i.height,f=i.fill,c=i.stroke;return Q.createElement("rect",{stroke:c,fill:f,x:r,y:a,width:o,height:l})}},{key:"renderPanorama",value:function(){var i=this.props,r=i.x,a=i.y,o=i.width,l=i.height,f=i.data,c=i.children,h=i.padding,d=A.Children.only(c);return d?Q.cloneElement(d,{x:r,y:a,width:o,height:l,margin:h,compact:!0,data:f}):null}},{key:"renderTravellerLayer",value:function(i,r){var a,o,l=this,f=this.props,c=f.y,h=f.travellerWidth,d=f.height,p=f.traveller,v=f.ariaLabel,b=f.data,w=f.startIndex,k=f.endIndex,_=Math.max(i,this.props.x),x=M3(M3({},qn(this.props,!1)),{},{x:_,y:c,width:h,height:d}),C=v||"Min value: ".concat((a=b[w])===null||a===void 0?void 0:a.name,", Max value: ").concat((o=b[k])===null||o===void 0?void 0:o.name);return Q.createElement(Pt,{tabIndex:0,role:"slider","aria-label":C,"aria-valuenow":i,className:"recharts-brush-traveller",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.travellerDragStartHandlers[r],onTouchStart:this.travellerDragStartHandlers[r],onKeyDown:function(O){["ArrowLeft","ArrowRight"].includes(O.key)&&(O.preventDefault(),O.stopPropagation(),l.handleTravellerMoveKeyboard(O.key==="ArrowRight"?1:-1,r))},onFocus:function(){l.setState({isTravellerFocused:!0})},onBlur:function(){l.setState({isTravellerFocused:!1})},style:{cursor:"col-resize"}},n.renderTraveller(p,x))}},{key:"renderSlide",value:function(i,r){var a=this.props,o=a.y,l=a.height,f=a.stroke,c=a.travellerWidth,h=Math.min(i,r)+c,d=Math.max(Math.abs(r-i)-c,0);return Q.createElement("rect",{className:"recharts-brush-slide",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.handleSlideDragStart,onTouchStart:this.handleSlideDragStart,style:{cursor:"move"},stroke:"none",fill:f,fillOpacity:.2,x:h,y:o,width:d,height:l})}},{key:"renderText",value:function(){var i=this.props,r=i.startIndex,a=i.endIndex,o=i.y,l=i.height,f=i.travellerWidth,c=i.stroke,h=this.state,d=h.startX,p=h.endX,v=5,b={pointerEvents:"none",fill:c};return Q.createElement(Pt,{className:"recharts-brush-texts"},Q.createElement(t1,T1({textAnchor:"end",verticalAnchor:"middle",x:Math.min(d,p)-v,y:o+l/2},b),this.getTextOfTick(r)),Q.createElement(t1,T1({textAnchor:"start",verticalAnchor:"middle",x:Math.max(d,p)+f+v,y:o+l/2},b),this.getTextOfTick(a)))}},{key:"render",value:function(){var i=this.props,r=i.data,a=i.className,o=i.children,l=i.x,f=i.y,c=i.width,h=i.height,d=i.alwaysShowText,p=this.state,v=p.startX,b=p.endX,w=p.isTextActive,k=p.isSlideMoving,_=p.isTravellerMoving,x=p.isTravellerFocused;if(!r||!r.length||!Ue(l)||!Ue(f)||!Ue(c)||!Ue(h)||c<=0||h<=0)return null;var C=dn("recharts-brush",a),T=Q.Children.count(o)===1,O=O3e("userSelect","none");return Q.createElement(Pt,{className:C,onMouseLeave:this.handleLeaveWrapper,onTouchMove:this.handleTouchMove,style:O},this.renderBackground(),T&&this.renderPanorama(),this.renderSlide(v,b),this.renderTravellerLayer(v,"startX"),this.renderTravellerLayer(b,"endX"),(w||k||_||x||d)&&this.renderText())}}],[{key:"renderDefaultTraveller",value:function(i){var r=i.x,a=i.y,o=i.width,l=i.height,f=i.stroke,c=Math.floor(a+l/2)-1;return Q.createElement(Q.Fragment,null,Q.createElement("rect",{x:r,y:a,width:o,height:l,fill:f,stroke:"none"}),Q.createElement("line",{x1:r+1,y1:c,x2:r+o-1,y2:c,fill:"none",stroke:"#fff"}),Q.createElement("line",{x1:r+1,y1:c+2,x2:r+o-1,y2:c+2,fill:"none",stroke:"#fff"}))}},{key:"renderTraveller",value:function(i,r){var a;return Q.isValidElement(i)?a=Q.cloneElement(i,r):zn(i)?a=i(r):a=n.renderDefaultTraveller(r),a}},{key:"getDerivedStateFromProps",value:function(i,r){var a=i.data,o=i.width,l=i.x,f=i.travellerWidth,c=i.updateId,h=i.startIndex,d=i.endIndex;if(a!==r.prevData||c!==r.prevUpdateId)return M3({prevData:a,prevTravellerWidth:f,prevUpdateId:c,prevX:l,prevWidth:o},a&&a.length?N3e({data:a,width:o,x:l,travellerWidth:f,startIndex:h,endIndex:d}):{scale:null,scaleValues:null});if(r.scale&&(o!==r.prevWidth||l!==r.prevX||f!==r.prevTravellerWidth)){r.scale.range([l,l+o-f]);var p=r.scale.domain().map(function(v){return r.scale(v)});return{prevData:a,prevTravellerWidth:f,prevUpdateId:c,prevX:l,prevWidth:o,startX:r.scale(i.startIndex),endX:r.scale(i.endIndex),scaleValues:p}}return null}},{key:"getIndexInRange",value:function(i,r){for(var a=i.length,o=0,l=a-1;l-o>1;){var f=Math.floor((o+l)/2);i[f]>r?l=f:o=f}return r>=i[l]?l:o}}])})(A.PureComponent);Lr(cc,"displayName","Brush");Lr(cc,"defaultProps",{height:40,travellerWidth:5,gap:1,fill:"#fff",stroke:"#666",padding:{top:1,right:1,bottom:1,left:1},leaveTimeOut:1e3,alwaysShowText:!1});var D3,PN;function $3e(){if(PN)return D3;PN=1;var e=I9();function n(t,i){var r;return e(t,function(a,o,l){return r=i(a,o,l),!r}),!!r}return D3=n,D3}var R3,NN;function z3e(){if(NN)return R3;NN=1;var e=TH(),n=vl(),t=$3e(),i=xr(),r=x0();function a(o,l,f){var c=i(o)?e:t;return f&&r(o,l,f)&&(l=void 0),c(o,n(l,3))}return R3=a,R3}var L3e=z3e();const I3e=dt(L3e);var uo=function(n,t){var i=n.alwaysShow,r=n.ifOverflow;return i&&(r="extendDomain"),r===t},P3,$N;function B3e(){if($N)return P3;$N=1;var e=GH();function n(t,i,r){i=="__proto__"&&e?e(t,i,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[i]=r}return P3=n,P3}var N3,zN;function F3e(){if(zN)return N3;zN=1;var e=B3e(),n=VH(),t=vl();function i(r,a){var o={};return a=t(a,3),n(r,function(l,f,c){e(o,f,a(l,f,c))}),o}return N3=i,N3}var q3e=F3e();const H3e=dt(q3e);var $3,LN;function U3e(){if(LN)return $3;LN=1;function e(n,t){for(var i=-1,r=n==null?0:n.length;++i=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(t[i]=e[i])}return t}function J3e(e,n){if(e==null)return{};var t={};for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){if(n.indexOf(i)>=0)continue;t[i]=e[i]}return t}function eSe(e,n){var t=e.x,i=e.y,r=Q3e(e,Y3e),a="".concat(t),o=parseInt(a,10),l="".concat(i),f=parseInt(l,10),c="".concat(n.height||r.height),h=parseInt(c,10),d="".concat(n.width||r.width),p=parseInt(d,10);return ah(ah(ah(ah(ah({},n),r),o?{x:o}:{}),f?{y:f}:{}),{},{height:h,width:p,name:n.name,radius:n.radius})}function qN(e){return Q.createElement(d3e,U4({shapeType:"rectangle",propTransformer:eSe,activeClassName:"recharts-active-bar"},e))}var nSe=function(n){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return function(i,r){if(typeof n=="number")return n;var a=Ue(i)||dpe(i);return a?n(i,r):(a||ku(),t)}},tSe=["value","background"],kV;function dc(e){"@babel/helpers - typeof";return dc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},dc(e)}function iSe(e,n){if(e==null)return{};var t=rSe(e,n),i,r;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(t[i]=e[i])}return t}function rSe(e,n){if(e==null)return{};var t={};for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){if(n.indexOf(i)>=0)continue;t[i]=e[i]}return t}function M1(){return M1=Object.assign?Object.assign.bind():function(e){for(var n=1;n0&&Math.abs(H)0&&Math.abs(U)0&&(G=Math.min((X||0)-(U[ee-1]||0),G))}),Number.isFinite(G)){var H=G/B,P=w.layout==="vertical"?i.height:i.width;if(w.padding==="gap"&&(M=H*P/2),w.padding==="no-gap"){var z=bu(n.barCategoryGap,H*P),q=H*P/2;M=q-z-(q-z)/P*z}}}r==="xAxis"?N=[i.left+(C.left||0)+(M||0),i.left+i.width-(C.right||0)-(M||0)]:r==="yAxis"?N=f==="horizontal"?[i.top+i.height-(C.bottom||0),i.top+(C.top||0)]:[i.top+(C.top||0)+(M||0),i.top+i.height-(C.bottom||0)-(M||0)]:N=w.range,O&&(N=[N[1],N[0]]);var Y=Eke(w,a,p),D=Y.scale,V=Y.realScaleType;D.domain(_).range(N),Tke(D);var W=zke(D,Ra(Ra({},w),{},{realScaleType:V}));r==="xAxis"?(L=k==="top"&&!T||k==="bottom"&&T,F=i.left,R=d[E]-L*w.height):r==="yAxis"&&(L=k==="left"&&!T||k==="right"&&T,F=d[E]-L*w.width,R=i.top);var $=Ra(Ra(Ra({},w),W),{},{realScaleType:V,x:F,y:R,scale:D,width:r==="xAxis"?i.width:w.width,height:r==="yAxis"?i.height:w.height});return $.bandSize=y1($,W),!w.hide&&r==="xAxis"?d[E]+=(L?-1:1)*$.height:w.hide||(d[E]+=(L?-1:1)*$.width),Ra(Ra({},v),{},$0({},b,$))},{})},CV=function(n,t){var i=n.x,r=n.y,a=t.x,o=t.y;return{x:Math.min(i,a),y:Math.min(r,o),width:Math.abs(a-i),height:Math.abs(o-r)}},pSe=function(n){var t=n.x1,i=n.y1,r=n.x2,a=n.y2;return CV({x:t,y:i},{x:r,y:a})},AV=(function(){function e(n){dSe(this,e),this.scale=n}return hSe(e,[{key:"domain",get:function(){return this.scale.domain}},{key:"range",get:function(){return this.scale.range}},{key:"rangeMin",get:function(){return this.range()[0]}},{key:"rangeMax",get:function(){return this.range()[1]}},{key:"bandwidth",get:function(){return this.scale.bandwidth}},{key:"apply",value:function(t){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=i.bandAware,a=i.position;if(t!==void 0){if(a)switch(a){case"start":return this.scale(t);case"middle":{var o=this.bandwidth?this.bandwidth()/2:0;return this.scale(t)+o}case"end":{var l=this.bandwidth?this.bandwidth():0;return this.scale(t)+l}default:return this.scale(t)}if(r){var f=this.bandwidth?this.bandwidth()/2:0;return this.scale(t)+f}return this.scale(t)}}},{key:"isInRange",value:function(t){var i=this.range(),r=i[0],a=i[i.length-1];return r<=a?t>=r&&t<=a:t>=a&&t<=r}}],[{key:"create",value:function(t){return new e(t)}}])})();$0(AV,"EPS",1e-4);var pA=function(n){var t=Object.keys(n).reduce(function(i,r){return Ra(Ra({},i),{},$0({},r,AV.create(n[r])))},{});return Ra(Ra({},t),{},{apply:function(r){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=a.bandAware,l=a.position;return H3e(r,function(f,c){return t[c].apply(f,{bandAware:o,position:l})})},isInRange:function(r){return wV(r,function(a,o){return t[o].isInRange(a)})}})};function vSe(e){return(e%180+180)%180}var gSe=function(n){var t=n.width,i=n.height,r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,a=vSe(r),o=a*Math.PI/180,l=Math.atan(i/t),f=o>l&&o-1?f[c?a[h]:h]:void 0}}return I3=i,I3}var B3,YN;function bSe(){if(YN)return B3;YN=1;var e=vV();function n(t){var i=e(t),r=i%1;return i===i?r?i-r:i:0}return B3=n,B3}var F3,KN;function wSe(){if(KN)return F3;KN=1;var e=BH(),n=vl(),t=bSe(),i=Math.max;function r(a,o,l){var f=a==null?0:a.length;if(!f)return-1;var c=l==null?0:t(l);return c<0&&(c=i(f+c,0)),e(a,n(o,3),c)}return F3=r,F3}var q3,XN;function kSe(){if(XN)return q3;XN=1;var e=ySe(),n=wSe(),t=e(n);return q3=t,q3}var _Se=kSe();const xSe=dt(_Se);var SSe=nH();const CSe=dt(SSe);var ASe=CSe(function(e){return{x:e.left,y:e.top,width:e.width,height:e.height}},function(e){return["l",e.left,"t",e.top,"w",e.width,"h",e.height].join("")}),vA=A.createContext(void 0),gA=A.createContext(void 0),OV=A.createContext(void 0),EV=A.createContext({}),TV=A.createContext(void 0),jV=A.createContext(0),MV=A.createContext(0),ZN=function(n){var t=n.state,i=t.xAxisMap,r=t.yAxisMap,a=t.offset,o=n.clipPathId,l=n.children,f=n.width,c=n.height,h=ASe(a);return Q.createElement(vA.Provider,{value:i},Q.createElement(gA.Provider,{value:r},Q.createElement(EV.Provider,{value:a},Q.createElement(OV.Provider,{value:h},Q.createElement(TV.Provider,{value:o},Q.createElement(jV.Provider,{value:c},Q.createElement(MV.Provider,{value:f},l)))))))},OSe=function(){return A.useContext(TV)},DV=function(n){var t=A.useContext(vA);t==null&&ku();var i=t[n];return i==null&&ku(),i},ESe=function(){var n=A.useContext(vA);return Ys(n)},TSe=function(){var n=A.useContext(gA),t=xSe(n,function(i){return wV(i.domain,Number.isFinite)});return t||Ys(n)},RV=function(n){var t=A.useContext(gA);t==null&&ku();var i=t[n];return i==null&&ku(),i},jSe=function(){var n=A.useContext(OV);return n},MSe=function(){return A.useContext(EV)},yA=function(){return A.useContext(MV)},bA=function(){return A.useContext(jV)};function hc(e){"@babel/helpers - typeof";return hc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},hc(e)}function DSe(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function RSe(e,n){for(var t=0;te.length)&&(n=e.length);for(var t=0,i=new Array(n);te*r)return!1;var a=t();return e*(n-e*a/2-i)>=0&&e*(n+e*a/2-r)<=0}function m4e(e,n){return BV(e,n+1)}function p4e(e,n,t,i,r){for(var a=(i||[]).slice(),o=n.start,l=n.end,f=0,c=1,h=o,d=function(){var b=i==null?void 0:i[f];if(b===void 0)return{v:BV(i,c)};var w=f,k,_=function(){return k===void 0&&(k=t(b,w)),k},x=b.coordinate,C=f===0||$1(e,x,_,h,l);C||(f=0,h=o,c+=1),C&&(h=x+e*(_()/2+r),f+=c)},p;c<=a.length;)if(p=d(),p)return p.v;return[]}function Tm(e){"@babel/helpers - typeof";return Tm=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Tm(e)}function a$(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),t.push.apply(t,i)}return t}function Gi(e){for(var n=1;n0?v.coordinate-k*e:v.coordinate})}else a[p]=v=Gi(Gi({},v),{},{tickCoord:v.coordinate});var _=$1(e,v.tickCoord,w,l,f);_&&(f=v.tickCoord-e*(w()/2+r),a[p]=Gi(Gi({},v),{},{isShow:!0}))},h=o-1;h>=0;h--)c(h);return a}function w4e(e,n,t,i,r,a){var o=(i||[]).slice(),l=o.length,f=n.start,c=n.end;if(a){var h=i[l-1],d=t(h,l-1),p=e*(h.coordinate+e*d/2-c);o[l-1]=h=Gi(Gi({},h),{},{tickCoord:p>0?h.coordinate-p*e:h.coordinate});var v=$1(e,h.tickCoord,function(){return d},f,c);v&&(c=h.tickCoord-e*(d/2+r),o[l-1]=Gi(Gi({},h),{},{isShow:!0}))}for(var b=a?l-1:l,w=function(x){var C=o[x],T,O=function(){return T===void 0&&(T=t(C,x)),T};if(x===0){var E=e*(C.coordinate-e*O()/2-f);o[x]=C=Gi(Gi({},C),{},{tickCoord:E<0?C.coordinate-E*e:C.coordinate})}else o[x]=C=Gi(Gi({},C),{},{tickCoord:C.coordinate});var M=$1(e,C.tickCoord,O,f,c);M&&(f=C.tickCoord+e*(O()/2+r),o[x]=Gi(Gi({},C),{},{isShow:!0}))},k=0;k=2?La(r[1].coordinate-r[0].coordinate):1,_=h4e(a,k,v);return f==="equidistantPreserveStart"?p4e(k,_,w,r,o):(f==="preserveStart"||f==="preserveStartEnd"?p=w4e(k,_,w,r,o,f==="preserveStartEnd"):p=b4e(k,_,w,r,o),p.filter(function(x){return x.isShow}))}var k4e=["viewBox"],_4e=["viewBox"],x4e=["ticks"];function vc(e){"@babel/helpers - typeof";return vc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},vc(e)}function $f(){return $f=Object.assign?Object.assign.bind():function(e){for(var n=1;n=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(t[i]=e[i])}return t}function S4e(e,n){if(e==null)return{};var t={};for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){if(n.indexOf(i)>=0)continue;t[i]=e[i]}return t}function C4e(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function s$(e,n){for(var t=0;t0?f(this.props):f(v)),o<=0||l<=0||!b||!b.length?null:Q.createElement(Pt,{className:dn("recharts-cartesian-axis",c),ref:function(k){i.layerReference=k}},a&&this.renderAxisLine(),this.renderTicks(b,this.state.fontSize,this.state.letterSpacing),Jt.renderCallByParent(this.props))}}],[{key:"renderTickItem",value:function(i,r,a){var o,l=dn(r.className,"recharts-cartesian-axis-tick-value");return Q.isValidElement(i)?o=Q.cloneElement(i,wi(wi({},r),{},{className:l})):zn(i)?o=i(wi(wi({},r),{},{className:l})):o=Q.createElement(t1,$f({},r,{className:"recharts-cartesian-axis-tick-value"}),a),o}}])})(A.Component);_A(Qc,"displayName","CartesianAxis");_A(Qc,"defaultProps",{x:0,y:0,width:0,height:0,viewBox:{x:0,y:0,width:0,height:0},orientation:"bottom",ticks:[],stroke:"#666",tickLine:!0,axisLine:!0,tick:!0,mirror:!1,minTickGap:5,tickSize:6,tickMargin:2,interval:"preserveEnd"});var D4e=["x1","y1","x2","y2","key"],R4e=["offset"];function _u(e){"@babel/helpers - typeof";return _u=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},_u(e)}function l$(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),t.push.apply(t,i)}return t}function Ki(e){for(var n=1;n=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(t[i]=e[i])}return t}function z4e(e,n){if(e==null)return{};var t={};for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){if(n.indexOf(i)>=0)continue;t[i]=e[i]}return t}var L4e=function(n){var t=n.fill;if(!t||t==="none")return null;var i=n.fillOpacity,r=n.x,a=n.y,o=n.width,l=n.height,f=n.ry;return Q.createElement("rect",{x:r,y:a,ry:f,width:o,height:l,stroke:"none",fill:t,fillOpacity:i,className:"recharts-cartesian-grid-bg"})};function HV(e,n){var t;if(Q.isValidElement(e))t=Q.cloneElement(e,n);else if(zn(e))t=e(n);else{var i=n.x1,r=n.y1,a=n.x2,o=n.y2,l=n.key,f=u$(n,D4e),c=qn(f,!1);c.offset;var h=u$(c,R4e);t=Q.createElement("line",au({},h,{x1:i,y1:r,x2:a,y2:o,fill:"none",key:l}))}return t}function I4e(e){var n=e.x,t=e.width,i=e.horizontal,r=i===void 0?!0:i,a=e.horizontalPoints;if(!r||!a||!a.length)return null;var o=a.map(function(l,f){var c=Ki(Ki({},e),{},{x1:n,y1:l,x2:n+t,y2:l,key:"line-".concat(f),index:f});return HV(r,c)});return Q.createElement("g",{className:"recharts-cartesian-grid-horizontal"},o)}function B4e(e){var n=e.y,t=e.height,i=e.vertical,r=i===void 0?!0:i,a=e.verticalPoints;if(!r||!a||!a.length)return null;var o=a.map(function(l,f){var c=Ki(Ki({},e),{},{x1:l,y1:n,x2:l,y2:n+t,key:"line-".concat(f),index:f});return HV(r,c)});return Q.createElement("g",{className:"recharts-cartesian-grid-vertical"},o)}function F4e(e){var n=e.horizontalFill,t=e.fillOpacity,i=e.x,r=e.y,a=e.width,o=e.height,l=e.horizontalPoints,f=e.horizontal,c=f===void 0?!0:f;if(!c||!n||!n.length)return null;var h=l.map(function(p){return Math.round(p+r-r)}).sort(function(p,v){return p-v});r!==h[0]&&h.unshift(0);var d=h.map(function(p,v){var b=!h[v+1],w=b?r+o-p:h[v+1]-p;if(w<=0)return null;var k=v%n.length;return Q.createElement("rect",{key:"react-".concat(v),y:p,x:i,height:w,width:a,stroke:"none",fill:n[k],fillOpacity:t,className:"recharts-cartesian-grid-bg"})});return Q.createElement("g",{className:"recharts-cartesian-gridstripes-horizontal"},d)}function q4e(e){var n=e.vertical,t=n===void 0?!0:n,i=e.verticalFill,r=e.fillOpacity,a=e.x,o=e.y,l=e.width,f=e.height,c=e.verticalPoints;if(!t||!i||!i.length)return null;var h=c.map(function(p){return Math.round(p+a-a)}).sort(function(p,v){return p-v});a!==h[0]&&h.unshift(0);var d=h.map(function(p,v){var b=!h[v+1],w=b?a+l-p:h[v+1]-p;if(w<=0)return null;var k=v%i.length;return Q.createElement("rect",{key:"react-".concat(v),x:p,y:o,width:w,height:f,stroke:"none",fill:i[k],fillOpacity:r,className:"recharts-cartesian-grid-bg"})});return Q.createElement("g",{className:"recharts-cartesian-gridstripes-vertical"},d)}var H4e=function(n,t){var i=n.xAxis,r=n.width,a=n.height,o=n.offset;return iV(kA(Ki(Ki(Ki({},Qc.defaultProps),i),{},{ticks:Wo(i,!0),viewBox:{x:0,y:0,width:r,height:a}})),o.left,o.left+o.width,t)},U4e=function(n,t){var i=n.yAxis,r=n.width,a=n.height,o=n.offset;return iV(kA(Ki(Ki(Ki({},Qc.defaultProps),i),{},{ticks:Wo(i,!0),viewBox:{x:0,y:0,width:r,height:a}})),o.top,o.top+o.height,t)},Tf={horizontal:!0,vertical:!0,stroke:"#ccc",fill:"none",verticalFill:[],horizontalFill:[]};function F0(e){var n,t,i,r,a,o,l=yA(),f=bA(),c=MSe(),h=Ki(Ki({},e),{},{stroke:(n=e.stroke)!==null&&n!==void 0?n:Tf.stroke,fill:(t=e.fill)!==null&&t!==void 0?t:Tf.fill,horizontal:(i=e.horizontal)!==null&&i!==void 0?i:Tf.horizontal,horizontalFill:(r=e.horizontalFill)!==null&&r!==void 0?r:Tf.horizontalFill,vertical:(a=e.vertical)!==null&&a!==void 0?a:Tf.vertical,verticalFill:(o=e.verticalFill)!==null&&o!==void 0?o:Tf.verticalFill,x:Ue(e.x)?e.x:c.left,y:Ue(e.y)?e.y:c.top,width:Ue(e.width)?e.width:c.width,height:Ue(e.height)?e.height:c.height}),d=h.x,p=h.y,v=h.width,b=h.height,w=h.syncWithTicks,k=h.horizontalValues,_=h.verticalValues,x=ESe(),C=TSe();if(!Ue(v)||v<=0||!Ue(b)||b<=0||!Ue(d)||d!==+d||!Ue(p)||p!==+p)return null;var T=h.verticalCoordinatesGenerator||H4e,O=h.horizontalCoordinatesGenerator||U4e,E=h.horizontalPoints,M=h.verticalPoints;if((!E||!E.length)&&zn(O)){var N=k&&k.length,F=O({yAxis:C?Ki(Ki({},C),{},{ticks:N?k:C.ticks}):void 0,width:l,height:f,offset:c},N?!0:w);Zo(Array.isArray(F),"horizontalCoordinatesGenerator should return Array but instead it returned [".concat(_u(F),"]")),Array.isArray(F)&&(E=F)}if((!M||!M.length)&&zn(T)){var R=_&&_.length,L=T({xAxis:x?Ki(Ki({},x),{},{ticks:R?_:x.ticks}):void 0,width:l,height:f,offset:c},R?!0:w);Zo(Array.isArray(L),"verticalCoordinatesGenerator should return Array but instead it returned [".concat(_u(L),"]")),Array.isArray(L)&&(M=L)}return Q.createElement("g",{className:"recharts-cartesian-grid"},Q.createElement(L4e,{fill:h.fill,fillOpacity:h.fillOpacity,x:h.x,y:h.y,width:h.width,height:h.height,ry:h.ry}),Q.createElement(I4e,au({},h,{offset:c,horizontalPoints:E,xAxis:x,yAxis:C})),Q.createElement(B4e,au({},h,{offset:c,verticalPoints:M,xAxis:x,yAxis:C})),Q.createElement(F4e,au({},h,{horizontalPoints:E})),Q.createElement(q4e,au({},h,{verticalPoints:M})))}F0.displayName="CartesianGrid";var V4e=["type","layout","connectNulls","ref"],W4e=["key"];function gc(e){"@babel/helpers - typeof";return gc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},gc(e)}function f$(e,n){if(e==null)return{};var t=G4e(e,n),i,r;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(t[i]=e[i])}return t}function G4e(e,n){if(e==null)return{};var t={};for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){if(n.indexOf(i)>=0)continue;t[i]=e[i]}return t}function Mh(){return Mh=Object.assign?Object.assign.bind():function(e){for(var n=1;ne.length)&&(n=e.length);for(var t=0,i=new Array(n);td){v=[].concat(jf(f.slice(0,b)),[d-w]);break}var k=v.length%2===0?[0,p]:[p];return[].concat(jf(n.repeat(f,h)),jf(v),k).map(function(_){return"".concat(_,"px")}).join(", ")}),Pa(t,"id",Gc("recharts-line-")),Pa(t,"pathRef",function(o){t.mainCurve=o}),Pa(t,"handleAnimationEnd",function(){t.setState({isAnimationFinished:!0}),t.props.onAnimationEnd&&t.props.onAnimationEnd()}),Pa(t,"handleAnimationStart",function(){t.setState({isAnimationFinished:!1}),t.props.onAnimationStart&&t.props.onAnimationStart()}),t}return i6e(n,e),J4e(n,[{key:"componentDidMount",value:function(){if(this.props.isAnimationActive){var i=this.getTotalLength();this.setState({totalLength:i})}}},{key:"componentDidUpdate",value:function(){if(this.props.isAnimationActive){var i=this.getTotalLength();i!==this.state.totalLength&&this.setState({totalLength:i})}}},{key:"getTotalLength",value:function(){var i=this.mainCurve;try{return i&&i.getTotalLength&&i.getTotalLength()||0}catch{return 0}}},{key:"renderErrorBar",value:function(i,r){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var a=this.props,o=a.points,l=a.xAxis,f=a.yAxis,c=a.layout,h=a.children,d=va(h,cp);if(!d)return null;var p=function(w,k){return{x:w.x,y:w.y,value:w.value,errorVal:lr(w.payload,k)}},v={clipPath:i?"url(#clipPath-".concat(r,")"):null};return Q.createElement(Pt,v,d.map(function(b){return Q.cloneElement(b,{key:"bar-".concat(b.props.dataKey),data:o,xAxis:l,yAxis:f,layout:c,dataPointFormatter:p})}))}},{key:"renderDots",value:function(i,r,a){var o=this.props.isAnimationActive;if(o&&!this.state.isAnimationFinished)return null;var l=this.props,f=l.dot,c=l.points,h=l.dataKey,d=qn(this.props,!1),p=qn(f,!0),v=c.map(function(w,k){var _=zr(zr(zr({key:"dot-".concat(k),r:3},d),p),{},{index:k,cx:w.x,cy:w.y,value:w.value,dataKey:h,payload:w.payload,points:c});return n.renderDotItem(f,_)}),b={clipPath:i?"url(#clipPath-".concat(r?"":"dots-").concat(a,")"):null};return Q.createElement(Pt,Mh({className:"recharts-line-dots",key:"dots"},b),v)}},{key:"renderCurveStatically",value:function(i,r,a,o){var l=this.props,f=l.type,c=l.layout,h=l.connectNulls;l.ref;var d=f$(l,V4e),p=zr(zr(zr({},qn(d,!0)),{},{fill:"none",className:"recharts-line-curve",clipPath:r?"url(#clipPath-".concat(a,")"):null,points:i},o),{},{type:f,layout:c,connectNulls:h});return Q.createElement(Vf,Mh({},p,{pathRef:this.pathRef}))}},{key:"renderCurveWithAnimation",value:function(i,r){var a=this,o=this.props,l=o.points,f=o.strokeDasharray,c=o.isAnimationActive,h=o.animationBegin,d=o.animationDuration,p=o.animationEasing,v=o.animationId,b=o.animateNewValues,w=o.width,k=o.height,_=this.state,x=_.prevPoints,C=_.totalLength;return Q.createElement(vo,{begin:h,duration:d,isActive:c,easing:p,from:{t:0},to:{t:1},key:"line-".concat(v),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(T){var O=T.t;if(x){var E=x.length/l.length,M=l.map(function(B,G){var U=Math.floor(G*E);if(x[U]){var H=x[U],P=Ii(H.x,B.x),z=Ii(H.y,B.y);return zr(zr({},B),{},{x:P(O),y:z(O)})}if(b){var q=Ii(w*2,B.x),Y=Ii(k/2,B.y);return zr(zr({},B),{},{x:q(O),y:Y(O)})}return zr(zr({},B),{},{x:B.x,y:B.y})});return a.renderCurveStatically(M,i,r)}var N=Ii(0,C),F=N(O),R;if(f){var L="".concat(f).split(/[,\s]+/gim).map(function(B){return parseFloat(B)});R=a.getStrokeDasharray(F,C,L)}else R=a.generateSimpleStrokeDasharray(C,F);return a.renderCurveStatically(l,i,r,{strokeDasharray:R})})}},{key:"renderCurve",value:function(i,r){var a=this.props,o=a.points,l=a.isAnimationActive,f=this.state,c=f.prevPoints,h=f.totalLength;return l&&o&&o.length&&(!c&&h>0||!sc(c,o))?this.renderCurveWithAnimation(i,r):this.renderCurveStatically(o,i,r)}},{key:"render",value:function(){var i,r=this.props,a=r.hide,o=r.dot,l=r.points,f=r.className,c=r.xAxis,h=r.yAxis,d=r.top,p=r.left,v=r.width,b=r.height,w=r.isAnimationActive,k=r.id;if(a||!l||!l.length)return null;var _=this.state.isAnimationFinished,x=l.length===1,C=dn("recharts-line",f),T=c&&c.allowDataOverflow,O=h&&h.allowDataOverflow,E=T||O,M=Vn(k)?this.id:k,N=(i=qn(o,!1))!==null&&i!==void 0?i:{r:3,strokeWidth:2},F=N.r,R=F===void 0?3:F,L=N.strokeWidth,B=L===void 0?2:L,G=oH(o)?o:{},U=G.clipDot,H=U===void 0?!0:U,P=R*2+B;return Q.createElement(Pt,{className:C},T||O?Q.createElement("defs",null,Q.createElement("clipPath",{id:"clipPath-".concat(M)},Q.createElement("rect",{x:T?p:p-v/2,y:O?d:d-b/2,width:T?v:v*2,height:O?b:b*2})),!H&&Q.createElement("clipPath",{id:"clipPath-dots-".concat(M)},Q.createElement("rect",{x:p-P/2,y:d-P/2,width:v+P,height:b+P}))):null,!x&&this.renderCurve(E,M),this.renderErrorBar(E,M),(x||o)&&this.renderDots(E,H,M),(!w||_)&&lo.renderCallByParent(this.props,l))}}],[{key:"getDerivedStateFromProps",value:function(i,r){return i.animationId!==r.prevAnimationId?{prevAnimationId:i.animationId,curPoints:i.points,prevPoints:r.curPoints}:i.points!==r.curPoints?{curPoints:i.points}:null}},{key:"repeat",value:function(i,r){for(var a=i.length%2!==0?[].concat(jf(i),[0]):i,o=[],l=0;l=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(t[i]=e[i])}return t}function s6e(e,n){if(e==null)return{};var t={};for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){if(n.indexOf(i)>=0)continue;t[i]=e[i]}return t}function ou(){return ou=Object.assign?Object.assign.bind():function(e){for(var n=1;n0||!sc(h,o)||!sc(d,l))?this.renderAreaWithAnimation(i,r):this.renderAreaStatically(o,l,i,r)}},{key:"render",value:function(){var i,r=this.props,a=r.hide,o=r.dot,l=r.points,f=r.className,c=r.top,h=r.left,d=r.xAxis,p=r.yAxis,v=r.width,b=r.height,w=r.isAnimationActive,k=r.id;if(a||!l||!l.length)return null;var _=this.state.isAnimationFinished,x=l.length===1,C=dn("recharts-area",f),T=d&&d.allowDataOverflow,O=p&&p.allowDataOverflow,E=T||O,M=Vn(k)?this.id:k,N=(i=qn(o,!1))!==null&&i!==void 0?i:{r:3,strokeWidth:2},F=N.r,R=F===void 0?3:F,L=N.strokeWidth,B=L===void 0?2:L,G=oH(o)?o:{},U=G.clipDot,H=U===void 0?!0:U,P=R*2+B;return Q.createElement(Pt,{className:C},T||O?Q.createElement("defs",null,Q.createElement("clipPath",{id:"clipPath-".concat(M)},Q.createElement("rect",{x:T?h:h-v/2,y:O?c:c-b/2,width:T?v:v*2,height:O?b:b*2})),!H&&Q.createElement("clipPath",{id:"clipPath-dots-".concat(M)},Q.createElement("rect",{x:h-P/2,y:c-P/2,width:v+P,height:b+P}))):null,x?null:this.renderArea(E,M),(o||x)&&this.renderDots(E,H,M),(!w||_)&&lo.renderCallByParent(this.props,l))}}],[{key:"getDerivedStateFromProps",value:function(i,r){return i.animationId!==r.prevAnimationId?{prevAnimationId:i.animationId,curPoints:i.points,curBaseLine:i.baseLine,prevPoints:r.curPoints,prevBaseLine:r.curBaseLine}:i.points!==r.curPoints||i.baseLine!==r.curBaseLine?{curPoints:i.points,curBaseLine:i.baseLine}:null}}])})(A.PureComponent);WV=os;ro(os,"displayName","Area");ro(os,"defaultProps",{stroke:"#3182bd",fill:"#3182bd",fillOpacity:.6,xAxisId:0,yAxisId:0,legendType:"line",connectNulls:!1,points:[],dot:!1,activeDot:!0,hide:!1,isAnimationActive:!Nu.isSsr,animationBegin:0,animationDuration:1500,animationEasing:"ease"});ro(os,"getBaseValue",function(e,n,t,i){var r=e.layout,a=e.baseValue,o=n.props.baseValue,l=o??a;if(Ue(l)&&typeof l=="number")return l;var f=r==="horizontal"?i:t,c=f.scale.domain();if(f.type==="number"){var h=Math.max(c[0],c[1]),d=Math.min(c[0],c[1]);return l==="dataMin"?d:l==="dataMax"||h<0?h:Math.max(Math.min(c[0],c[1]),0)}return l==="dataMin"?c[0]:l==="dataMax"?c[1]:c[0]});ro(os,"getComposedData",function(e){var n=e.props,t=e.item,i=e.xAxis,r=e.yAxis,a=e.xAxisTicks,o=e.yAxisTicks,l=e.bandSize,f=e.dataKey,c=e.stackedData,h=e.dataStartIndex,d=e.displayedData,p=e.offset,v=n.layout,b=c&&c.length,w=WV.getBaseValue(n,t,i,r),k=v==="horizontal",_=!1,x=d.map(function(T,O){var E;b?E=c[h+O]:(E=lr(T,f),Array.isArray(E)?_=!0:E=[w,E]);var M=E[1]==null||b&&lr(T,f)==null;return k?{x:g1({axis:i,ticks:a,bandSize:l,entry:T,index:O}),y:M?null:r.scale(E[1]),value:E,payload:T}:{x:M?null:i.scale(E[1]),y:g1({axis:r,ticks:o,bandSize:l,entry:T,index:O}),value:E,payload:T}}),C;return b||_?C=x.map(function(T){var O=Array.isArray(T.value)?T.value[0]:null;return k?{x:T.x,y:O!=null&&T.y!=null?r.scale(O):null}:{x:O!=null?i.scale(O):null,y:T.y}}):C=k?r.scale(w):i.scale(w),qs({points:x,baseLine:C,layout:v,isRange:_},p)});ro(os,"renderDotItem",function(e,n){var t;if(Q.isValidElement(e))t=Q.cloneElement(e,n);else if(zn(e))t=e(n);else{var i=dn("recharts-area-dot",typeof e!="boolean"?e.className:""),r=n.key,a=GV(n,o6e);t=Q.createElement(R0,ou({},a,{key:r,className:i}))}return t});function bc(e){"@babel/helpers - typeof";return bc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},bc(e)}function p6e(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function v6e(e,n){for(var t=0;te.length)&&(n=e.length);for(var t=0,i=new Array(n);t=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(t[i]=e[i])}return t}function iCe(e,n){if(e==null)return{};var t={};for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){if(n.indexOf(i)>=0)continue;t[i]=e[i]}return t}function rCe(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function aCe(e,n){for(var t=0;te.length)&&(n=e.length);for(var t=0,i=new Array(n);t0?o:n&&n.length&&Ue(r)&&Ue(a)?n.slice(r,a+1):[]};function lW(e){return e==="number"?[0,"auto"]:void 0}var f6=function(n,t,i,r){var a=n.graphicalItems,o=n.tooltipAxis,l=q0(t,n);return i<0||!a||!a.length||i>=l.length?null:a.reduce(function(f,c){var h,d=(h=c.props.data)!==null&&h!==void 0?h:t;d&&n.dataStartIndex+n.dataEndIndex!==0&&n.dataEndIndex-n.dataStartIndex>=i&&(d=d.slice(n.dataStartIndex,n.dataEndIndex+1));var p;if(o.dataKey&&!o.allowDuplicatedCategory){var v=d===void 0?l:d;p=Hg(v,o.dataKey,r)}else p=d&&d[i]||l[i];return p?[].concat(_c(f),[aV(c,p)]):f},[])},k$=function(n,t,i,r){var a=r||{x:n.chartX,y:n.chartY},o=gCe(a,i),l=n.orderedTooltipTicks,f=n.tooltipAxis,c=n.tooltipTicks,h=_ke(o,l,c,f);if(h>=0&&c){var d=c[h]&&c[h].value,p=f6(n,t,h,d),v=yCe(i,l,h,a);return{activeTooltipIndex:h,activeLabel:d,activePayload:p,activeCoordinate:v}}return null},bCe=function(n,t){var i=t.axes,r=t.graphicalItems,a=t.axisType,o=t.axisIdKey,l=t.stackGroups,f=t.dataStartIndex,c=t.dataEndIndex,h=n.layout,d=n.children,p=n.stackOffset,v=tV(h,a);return i.reduce(function(b,w){var k,_=w.type.defaultProps!==void 0?Oe(Oe({},w.type.defaultProps),w.props):w.props,x=_.type,C=_.dataKey,T=_.allowDataOverflow,O=_.allowDuplicatedCategory,E=_.scale,M=_.ticks,N=_.includeHidden,F=_[o];if(b[F])return b;var R=q0(n.data,{graphicalItems:r.filter(function(W){var $,X=o in W.props?W.props[o]:($=W.type.defaultProps)===null||$===void 0?void 0:$[o];return X===F}),dataStartIndex:f,dataEndIndex:c}),L=R.length,B,G,U;V6e(_.domain,T,x)&&(B=O4(_.domain,null,T),v&&(x==="number"||E!=="auto")&&(U=Th(R,C,"category")));var H=lW(x);if(!B||B.length===0){var P,z=(P=_.domain)!==null&&P!==void 0?P:H;if(C){if(B=Th(R,C,x),x==="category"&&v){var q=mpe(B);O&&q?(G=B,B=E1(0,L)):O||(B=$P(z,B,w).reduce(function(W,$){return W.indexOf($)>=0?W:[].concat(_c(W),[$])},[]))}else if(x==="category")O?B=B.filter(function(W){return W!==""&&!Vn(W)}):B=$P(z,B,w).reduce(function(W,$){return W.indexOf($)>=0||$===""||Vn($)?W:[].concat(_c(W),[$])},[]);else if(x==="number"){var Y=Oke(R,r.filter(function(W){var $,X,ee=o in W.props?W.props[o]:($=W.type.defaultProps)===null||$===void 0?void 0:$[o],re="hide"in W.props?W.props.hide:(X=W.type.defaultProps)===null||X===void 0?void 0:X.hide;return ee===F&&(N||!re)}),C,a,h);Y&&(B=Y)}v&&(x==="number"||E!=="auto")&&(U=Th(R,C,"category"))}else v?B=E1(0,L):l&&l[F]&&l[F].hasStack&&x==="number"?B=p==="expand"?[0,1]:rV(l[F].stackGroups,f,c):B=nV(R,r.filter(function(W){var $=o in W.props?W.props[o]:W.type.defaultProps[o],X="hide"in W.props?W.props.hide:W.type.defaultProps.hide;return $===F&&(N||!X)}),x,h,!0);if(x==="number")B=s6(d,B,F,a,M),z&&(B=O4(z,B,T));else if(x==="category"&&z){var D=z,V=B.every(function(W){return D.indexOf(W)>=0});V&&(B=D)}}return Oe(Oe({},b),{},xn({},F,Oe(Oe({},_),{},{axisType:a,domain:B,categoricalDomain:U,duplicateDomain:G,originalDomain:(k=_.domain)!==null&&k!==void 0?k:H,isCategorical:v,layout:h})))},{})},wCe=function(n,t){var i=t.graphicalItems,r=t.Axis,a=t.axisType,o=t.axisIdKey,l=t.stackGroups,f=t.dataStartIndex,c=t.dataEndIndex,h=n.layout,d=n.children,p=q0(n.data,{graphicalItems:i,dataStartIndex:f,dataEndIndex:c}),v=p.length,b=tV(h,a),w=-1;return i.reduce(function(k,_){var x=_.type.defaultProps!==void 0?Oe(Oe({},_.type.defaultProps),_.props):_.props,C=x[o],T=lW("number");if(!k[C]){w++;var O;return b?O=E1(0,v):l&&l[C]&&l[C].hasStack?(O=rV(l[C].stackGroups,f,c),O=s6(d,O,C,a)):(O=O4(T,nV(p,i.filter(function(E){var M,N,F=o in E.props?E.props[o]:(M=E.type.defaultProps)===null||M===void 0?void 0:M[o],R="hide"in E.props?E.props.hide:(N=E.type.defaultProps)===null||N===void 0?void 0:N.hide;return F===C&&!R}),"number",h),r.defaultProps.allowDataOverflow),O=s6(d,O,C,a)),Oe(Oe({},k),{},xn({},C,Oe(Oe({axisType:a},r.defaultProps),{},{hide:!0,orientation:pa(pCe,"".concat(a,".").concat(w%2),null),domain:O,originalDomain:T,isCategorical:b,layout:h})))}return k},{})},kCe=function(n,t){var i=t.axisType,r=i===void 0?"xAxis":i,a=t.AxisComp,o=t.graphicalItems,l=t.stackGroups,f=t.dataStartIndex,c=t.dataEndIndex,h=n.children,d="".concat(r,"Id"),p=va(h,a),v={};return p&&p.length?v=bCe(n,{axes:p,graphicalItems:o,axisType:r,axisIdKey:d,stackGroups:l,dataStartIndex:f,dataEndIndex:c}):o&&o.length&&(v=wCe(n,{Axis:a,graphicalItems:o,axisType:r,axisIdKey:d,stackGroups:l,dataStartIndex:f,dataEndIndex:c})),v},_Ce=function(n){var t=Ys(n),i=Wo(t,!1,!0);return{tooltipTicks:i,orderedTooltipTicks:B9(i,function(r){return r.coordinate}),tooltipAxis:t,tooltipAxisBandSize:y1(t,i)}},_$=function(n){var t=n.children,i=n.defaultShowTooltip,r=Br(t,cc),a=0,o=0;return n.data&&n.data.length!==0&&(o=n.data.length-1),r&&r.props&&(r.props.startIndex>=0&&(a=r.props.startIndex),r.props.endIndex>=0&&(o=r.props.endIndex)),{chartX:0,chartY:0,dataStartIndex:a,dataEndIndex:o,activeTooltipIndex:-1,isTooltipActive:!!i}},xCe=function(n){return!n||!n.length?!1:n.some(function(t){var i=Xo(t&&t.type);return i&&i.indexOf("Bar")>=0})},x$=function(n){return n==="horizontal"?{numericAxisName:"yAxis",cateAxisName:"xAxis"}:n==="vertical"?{numericAxisName:"xAxis",cateAxisName:"yAxis"}:n==="centric"?{numericAxisName:"radiusAxis",cateAxisName:"angleAxis"}:{numericAxisName:"angleAxis",cateAxisName:"radiusAxis"}},SCe=function(n,t){var i=n.props,r=n.graphicalItems,a=n.xAxisMap,o=a===void 0?{}:a,l=n.yAxisMap,f=l===void 0?{}:l,c=i.width,h=i.height,d=i.children,p=i.margin||{},v=Br(d,cc),b=Br(d,Qo),w=Object.keys(f).reduce(function(O,E){var M=f[E],N=M.orientation;return!M.mirror&&!M.hide?Oe(Oe({},O),{},xn({},N,O[N]+M.width)):O},{left:p.left||0,right:p.right||0}),k=Object.keys(o).reduce(function(O,E){var M=o[E],N=M.orientation;return!M.mirror&&!M.hide?Oe(Oe({},O),{},xn({},N,pa(O,"".concat(N))+M.height)):O},{top:p.top||0,bottom:p.bottom||0}),_=Oe(Oe({},k),w),x=_.bottom;v&&(_.bottom+=v.props.height||cc.defaultProps.height),b&&t&&(_=Cke(_,r,i,t));var C=c-_.left-_.right,T=h-_.top-_.bottom;return Oe(Oe({brushBottom:x},_),{},{width:Math.max(C,0),height:Math.max(T,0)})},CCe=function(n,t){if(t==="xAxis")return n[t].width;if(t==="yAxis")return n[t].height},xA=function(n){var t=n.chartName,i=n.GraphicalChild,r=n.defaultTooltipEventType,a=r===void 0?"axis":r,o=n.validateTooltipEventTypes,l=o===void 0?["axis"]:o,f=n.axisComponents,c=n.legendContent,h=n.formatAxisMap,d=n.defaultProps,p=function(_,x){var C=x.graphicalItems,T=x.stackGroups,O=x.offset,E=x.updateId,M=x.dataStartIndex,N=x.dataEndIndex,F=_.barSize,R=_.layout,L=_.barGap,B=_.barCategoryGap,G=_.maxBarSize,U=x$(R),H=U.numericAxisName,P=U.cateAxisName,z=xCe(C),q=[];return C.forEach(function(Y,D){var V=q0(_.data,{graphicalItems:[Y],dataStartIndex:M,dataEndIndex:N}),W=Y.type.defaultProps!==void 0?Oe(Oe({},Y.type.defaultProps),Y.props):Y.props,$=W.dataKey,X=W.maxBarSize,ee=W["".concat(H,"Id")],re=W["".concat(P,"Id")],se={},ge=f.reduce(function(Ie,Ve){var He=x["".concat(Ve.axisType,"Map")],Ke=W["".concat(Ve.axisType,"Id")];He&&He[Ke]||Ve.axisType==="zAxis"||ku();var Xe=He[Ke];return Oe(Oe({},Ie),{},xn(xn({},Ve.axisType,Xe),"".concat(Ve.axisType,"Ticks"),Wo(Xe)))},se),ae=ge[P],le=ge["".concat(P,"Ticks")],_e=T&&T[ee]&&T[ee].hasStack&&Ike(Y,T[ee].stackGroups),ne=Xo(Y.type).indexOf("Bar")>=0,$e=y1(ae,le),be=[],Ce=z&&xke({barSize:F,stackGroups:T,totalSize:CCe(ge,P)});if(ne){var Pe,ve,xe=Vn(X)?G:X,Re=(Pe=(ve=y1(ae,le,!0))!==null&&ve!==void 0?ve:xe)!==null&&Pe!==void 0?Pe:0;be=Ske({barGap:L,barCategoryGap:B,bandSize:Re!==$e?Re:$e,sizeList:Ce[re],maxBarSize:xe}),Re!==$e&&(be=be.map(function(Ie){return Oe(Oe({},Ie),{},{position:Oe(Oe({},Ie.position),{},{offset:Ie.position.offset-Re/2})})}))}var ue=Y&&Y.type&&Y.type.getComposedData;ue&&q.push({props:Oe(Oe({},ue(Oe(Oe({},ge),{},{displayedData:V,props:_,dataKey:$,item:Y,bandSize:$e,barPosition:be,offset:O,stackedData:_e,layout:R,dataStartIndex:M,dataEndIndex:N}))),{},xn(xn(xn({key:Y.key||"item-".concat(D)},H,ge[H]),P,ge[P]),"animationId",E)),childIndex:Ape(Y,_.children),item:Y})}),q},v=function(_,x){var C=_.props,T=_.dataStartIndex,O=_.dataEndIndex,E=_.updateId;if(!Z8({props:C}))return null;var M=C.children,N=C.layout,F=C.stackOffset,R=C.data,L=C.reverseStackOrder,B=x$(N),G=B.numericAxisName,U=B.cateAxisName,H=va(M,i),P=$ke(R,H,"".concat(G,"Id"),"".concat(U,"Id"),F,L),z=f.reduce(function(W,$){var X="".concat($.axisType,"Map");return Oe(Oe({},W),{},xn({},X,kCe(C,Oe(Oe({},$),{},{graphicalItems:H,stackGroups:$.axisType===G&&P,dataStartIndex:T,dataEndIndex:O}))))},{}),q=SCe(Oe(Oe({},z),{},{props:C,graphicalItems:H}),x==null?void 0:x.legendBBox);Object.keys(z).forEach(function(W){z[W]=h(C,z[W],q,W.replace("Map",""),t)});var Y=z["".concat(U,"Map")],D=_Ce(Y),V=p(C,Oe(Oe({},z),{},{dataStartIndex:T,dataEndIndex:O,updateId:E,graphicalItems:H,stackGroups:P,offset:q}));return Oe(Oe({formattedGraphicalItems:V,graphicalItems:H,offset:q,stackGroups:P},D),z)},b=(function(k){function _(x){var C,T,O;return rCe(this,_),O=sCe(this,_,[x]),xn(O,"eventEmitterSymbol",Symbol("rechartsEventEmitter")),xn(O,"accessibilityManager",new U6e),xn(O,"handleLegendBBoxUpdate",function(E){if(E){var M=O.state,N=M.dataStartIndex,F=M.dataEndIndex,R=M.updateId;O.setState(Oe({legendBBox:E},v({props:O.props,dataStartIndex:N,dataEndIndex:F,updateId:R},Oe(Oe({},O.state),{},{legendBBox:E}))))}}),xn(O,"handleReceiveSyncEvent",function(E,M,N){if(O.props.syncId===E){if(N===O.eventEmitterSymbol&&typeof O.props.syncMethod!="function")return;O.applySyncEvent(M)}}),xn(O,"handleBrushChange",function(E){var M=E.startIndex,N=E.endIndex;if(M!==O.state.dataStartIndex||N!==O.state.dataEndIndex){var F=O.state.updateId;O.setState(function(){return Oe({dataStartIndex:M,dataEndIndex:N},v({props:O.props,dataStartIndex:M,dataEndIndex:N,updateId:F},O.state))}),O.triggerSyncEvent({dataStartIndex:M,dataEndIndex:N})}}),xn(O,"handleMouseEnter",function(E){var M=O.getMouseInfo(E);if(M){var N=Oe(Oe({},M),{},{isTooltipActive:!0});O.setState(N),O.triggerSyncEvent(N);var F=O.props.onMouseEnter;zn(F)&&F(N,E)}}),xn(O,"triggeredAfterMouseMove",function(E){var M=O.getMouseInfo(E),N=M?Oe(Oe({},M),{},{isTooltipActive:!0}):{isTooltipActive:!1};O.setState(N),O.triggerSyncEvent(N);var F=O.props.onMouseMove;zn(F)&&F(N,E)}),xn(O,"handleItemMouseEnter",function(E){O.setState(function(){return{isTooltipActive:!0,activeItem:E,activePayload:E.tooltipPayload,activeCoordinate:E.tooltipPosition||{x:E.cx,y:E.cy}}})}),xn(O,"handleItemMouseLeave",function(){O.setState(function(){return{isTooltipActive:!1}})}),xn(O,"handleMouseMove",function(E){E.persist(),O.throttleTriggeredAfterMouseMove(E)}),xn(O,"handleMouseLeave",function(E){O.throttleTriggeredAfterMouseMove.cancel();var M={isTooltipActive:!1};O.setState(M),O.triggerSyncEvent(M);var N=O.props.onMouseLeave;zn(N)&&N(M,E)}),xn(O,"handleOuterEvent",function(E){var M=Cpe(E),N=pa(O.props,"".concat(M));if(M&&zn(N)){var F,R;/.*touch.*/i.test(M)?R=O.getMouseInfo(E.changedTouches[0]):R=O.getMouseInfo(E),N((F=R)!==null&&F!==void 0?F:{},E)}}),xn(O,"handleClick",function(E){var M=O.getMouseInfo(E);if(M){var N=Oe(Oe({},M),{},{isTooltipActive:!0});O.setState(N),O.triggerSyncEvent(N);var F=O.props.onClick;zn(F)&&F(N,E)}}),xn(O,"handleMouseDown",function(E){var M=O.props.onMouseDown;if(zn(M)){var N=O.getMouseInfo(E);M(N,E)}}),xn(O,"handleMouseUp",function(E){var M=O.props.onMouseUp;if(zn(M)){var N=O.getMouseInfo(E);M(N,E)}}),xn(O,"handleTouchMove",function(E){E.changedTouches!=null&&E.changedTouches.length>0&&O.throttleTriggeredAfterMouseMove(E.changedTouches[0])}),xn(O,"handleTouchStart",function(E){E.changedTouches!=null&&E.changedTouches.length>0&&O.handleMouseDown(E.changedTouches[0])}),xn(O,"handleTouchEnd",function(E){E.changedTouches!=null&&E.changedTouches.length>0&&O.handleMouseUp(E.changedTouches[0])}),xn(O,"handleDoubleClick",function(E){var M=O.props.onDoubleClick;if(zn(M)){var N=O.getMouseInfo(E);M(N,E)}}),xn(O,"handleContextMenu",function(E){var M=O.props.onContextMenu;if(zn(M)){var N=O.getMouseInfo(E);M(N,E)}}),xn(O,"triggerSyncEvent",function(E){O.props.syncId!==void 0&&V3.emit(W3,O.props.syncId,E,O.eventEmitterSymbol)}),xn(O,"applySyncEvent",function(E){var M=O.props,N=M.layout,F=M.syncMethod,R=O.state.updateId,L=E.dataStartIndex,B=E.dataEndIndex;if(E.dataStartIndex!==void 0||E.dataEndIndex!==void 0)O.setState(Oe({dataStartIndex:L,dataEndIndex:B},v({props:O.props,dataStartIndex:L,dataEndIndex:B,updateId:R},O.state)));else if(E.activeTooltipIndex!==void 0){var G=E.chartX,U=E.chartY,H=E.activeTooltipIndex,P=O.state,z=P.offset,q=P.tooltipTicks;if(!z)return;if(typeof F=="function")H=F(q,E);else if(F==="value"){H=-1;for(var Y=0;Y=0){var _e,ne;if(G.dataKey&&!G.allowDuplicatedCategory){var $e=typeof G.dataKey=="function"?le:"payload.".concat(G.dataKey.toString());_e=Hg(Y,$e,H),ne=D&&V&&Hg(V,$e,H)}else _e=Y==null?void 0:Y[U],ne=D&&V&&V[U];if(re||ee){var be=E.props.activeIndex!==void 0?E.props.activeIndex:U;return[A.cloneElement(E,Oe(Oe(Oe({},F.props),ge),{},{activeIndex:be})),null,null]}if(!Vn(_e))return[ae].concat(_c(O.renderActivePoints({item:F,activePoint:_e,basePoint:ne,childIndex:U,isRange:D})))}else{var Ce,Pe=(Ce=O.getItemByXY(O.state.activeCoordinate))!==null&&Ce!==void 0?Ce:{graphicalItem:ae},ve=Pe.graphicalItem,xe=ve.item,Re=xe===void 0?E:xe,ue=ve.childIndex,Ie=Oe(Oe(Oe({},F.props),ge),{},{activeIndex:ue});return[A.cloneElement(Re,Ie),null,null]}return D?[ae,null,null]:[ae,null]}),xn(O,"renderCustomized",function(E,M,N){return A.cloneElement(E,Oe(Oe({key:"recharts-customized-".concat(N)},O.props),O.state))}),xn(O,"renderMap",{CartesianGrid:{handler:ng,once:!0},ReferenceArea:{handler:O.renderReferenceElement},ReferenceLine:{handler:ng},ReferenceDot:{handler:O.renderReferenceElement},XAxis:{handler:ng},YAxis:{handler:ng},Brush:{handler:O.renderBrush,once:!0},Bar:{handler:O.renderGraphicChild},Line:{handler:O.renderGraphicChild},Area:{handler:O.renderGraphicChild},Radar:{handler:O.renderGraphicChild},RadialBar:{handler:O.renderGraphicChild},Scatter:{handler:O.renderGraphicChild},Pie:{handler:O.renderGraphicChild},Funnel:{handler:O.renderGraphicChild},Tooltip:{handler:O.renderCursor,once:!0},PolarGrid:{handler:O.renderPolarGrid,once:!0},PolarAngleAxis:{handler:O.renderPolarAxis},PolarRadiusAxis:{handler:O.renderPolarAxis},Customized:{handler:O.renderCustomized}}),O.clipPathId="".concat((C=x.id)!==null&&C!==void 0?C:Gc("recharts"),"-clip"),O.throttleTriggeredAfterMouseMove=JH(O.triggeredAfterMouseMove,(T=x.throttleDelay)!==null&&T!==void 0?T:1e3/60),O.state={},O}return fCe(_,k),oCe(_,[{key:"componentDidMount",value:function(){var C,T;this.addListener(),this.accessibilityManager.setDetails({container:this.container,offset:{left:(C=this.props.margin.left)!==null&&C!==void 0?C:0,top:(T=this.props.margin.top)!==null&&T!==void 0?T:0},coordinateList:this.state.tooltipTicks,mouseHandlerCallback:this.triggeredAfterMouseMove,layout:this.props.layout}),this.displayDefaultTooltip()}},{key:"displayDefaultTooltip",value:function(){var C=this.props,T=C.children,O=C.data,E=C.height,M=C.layout,N=Br(T,ca);if(N){var F=N.props.defaultIndex;if(!(typeof F!="number"||F<0||F>this.state.tooltipTicks.length-1)){var R=this.state.tooltipTicks[F]&&this.state.tooltipTicks[F].value,L=f6(this.state,O,F,R),B=this.state.tooltipTicks[F].coordinate,G=(this.state.offset.top+E)/2,U=M==="horizontal",H=U?{x:B,y:G}:{y:B,x:G},P=this.state.formattedGraphicalItems.find(function(q){var Y=q.item;return Y.type.name==="Scatter"});P&&(H=Oe(Oe({},H),P.props.points[F].tooltipPosition),L=P.props.points[F].tooltipPayload);var z={activeTooltipIndex:F,isTooltipActive:!0,activeLabel:R,activePayload:L,activeCoordinate:H};this.setState(z),this.renderCursor(N),this.accessibilityManager.setIndex(F)}}}},{key:"getSnapshotBeforeUpdate",value:function(C,T){if(!this.props.accessibilityLayer)return null;if(this.state.tooltipTicks!==T.tooltipTicks&&this.accessibilityManager.setDetails({coordinateList:this.state.tooltipTicks}),this.props.layout!==C.layout&&this.accessibilityManager.setDetails({layout:this.props.layout}),this.props.margin!==C.margin){var O,E;this.accessibilityManager.setDetails({offset:{left:(O=this.props.margin.left)!==null&&O!==void 0?O:0,top:(E=this.props.margin.top)!==null&&E!==void 0?E:0}})}return null}},{key:"componentDidUpdate",value:function(C){KS([Br(C.children,ca)],[Br(this.props.children,ca)])||this.displayDefaultTooltip()}},{key:"componentWillUnmount",value:function(){this.removeListener(),this.throttleTriggeredAfterMouseMove.cancel()}},{key:"getTooltipEventType",value:function(){var C=Br(this.props.children,ca);if(C&&typeof C.props.shared=="boolean"){var T=C.props.shared?"axis":"item";return l.indexOf(T)>=0?T:a}return a}},{key:"getMouseInfo",value:function(C){if(!this.container)return null;var T=this.container,O=T.getBoundingClientRect(),E=dye(O),M={chartX:Math.round(C.pageX-E.left),chartY:Math.round(C.pageY-E.top)},N=O.width/T.offsetWidth||1,F=this.inRange(M.chartX,M.chartY,N);if(!F)return null;var R=this.state,L=R.xAxisMap,B=R.yAxisMap,G=this.getTooltipEventType(),U=k$(this.state,this.props.data,this.props.layout,F);if(G!=="axis"&&L&&B){var H=Ys(L).scale,P=Ys(B).scale,z=H&&H.invert?H.invert(M.chartX):null,q=P&&P.invert?P.invert(M.chartY):null;return Oe(Oe({},M),{},{xValue:z,yValue:q},U)}return U?Oe(Oe({},M),U):null}},{key:"inRange",value:function(C,T){var O=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,E=this.props.layout,M=C/O,N=T/O;if(E==="horizontal"||E==="vertical"){var F=this.state.offset,R=M>=F.left&&M<=F.left+F.width&&N>=F.top&&N<=F.top+F.height;return R?{x:M,y:N}:null}var L=this.state,B=L.angleAxisMap,G=L.radiusAxisMap;if(B&&G){var U=Ys(B);return IP({x:M,y:N},U)}return null}},{key:"parseEventsOfWrapper",value:function(){var C=this.props.children,T=this.getTooltipEventType(),O=Br(C,ca),E={};O&&T==="axis"&&(O.props.trigger==="click"?E={onClick:this.handleClick}:E={onMouseEnter:this.handleMouseEnter,onDoubleClick:this.handleDoubleClick,onMouseMove:this.handleMouseMove,onMouseLeave:this.handleMouseLeave,onTouchMove:this.handleTouchMove,onTouchStart:this.handleTouchStart,onTouchEnd:this.handleTouchEnd,onContextMenu:this.handleContextMenu});var M=Ug(this.props,this.handleOuterEvent);return Oe(Oe({},M),E)}},{key:"addListener",value:function(){V3.on(W3,this.handleReceiveSyncEvent)}},{key:"removeListener",value:function(){V3.removeListener(W3,this.handleReceiveSyncEvent)}},{key:"filterFormatItem",value:function(C,T,O){for(var E=this.state.formattedGraphicalItems,M=0,N=E.length;M({root:{"--chart-text-color":n?ot(n,e):void 0,"--chart-grid-color":t?ot(t,e):void 0,"--chart-cursor-fill":i?ot(i,e):void 0,"--chart-bar-label-color":r?ot(r,e):void 0}});function MCe(e,n){let t=0,i=0;return e.map(r=>{if(r.standalone)for(const a in r)typeof r[a]=="number"&&a!==n&&(r[a]=[0,r[a]]);else for(const a in r)typeof r[a]=="number"&&a!==n&&(i+=r[a],r[a]=[t,i],t=i);return r})}function DCe(e,n){return typeof e=="function"?e(n).fill:e==null?void 0:e.fill}const su=De(e=>{const n=ke("BarChart",jCe,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,data:f,withLegend:c,legendProps:h,series:d,onMouseLeave:p,dataKey:v,withTooltip:b,withXAxis:w,withYAxis:k,gridAxis:_,tickLine:x,xAxisProps:C,yAxisProps:T,unit:O,tooltipAnimationDuration:E,strokeDasharray:M,gridProps:N,tooltipProps:F,referenceLines:R,fillOpacity:L,barChartProps:B,type:G,orientation:U,dir:H,valueFormatter:P,children:z,barProps:q,xAxisLabel:Y,yAxisLabel:D,withBarValueLabel:V,valueLabelProps:W,withRightYAxis:$,rightYAxisLabel:X,rightYAxisProps:ee,minBarSize:re,maxBarWidth:se,mod:ge,getBarColor:ae,gridColor:le,textColor:_e,attributes:ne,...$e}=n,be=oi(),Ce=_!=="none"&&(x==="x"||x==="xy"),Pe=_!=="none"&&(x==="y"||x==="xy"),[ve,xe]=A.useState(null),Re=ve!==null,ue=G==="stacked"||G==="percent",Ie=G==="percent"?TCe:P,Ve=Se=>{xe(null),p==null||p(Se)},{resolvedClassNames:He,resolvedStyles:Ke}=qi({classNames:t,styles:a,props:n}),Xe=G==="waterfall"?MCe(f,v):f,ie=Qe({name:"BarChart",classes:c0,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:ne,vars:l,varsResolver:uW}),me=d.map(Se=>{const nn=ot(Se.color,be),cn=Re&&ve!==Se.name,An=typeof q=="function"?q(Se):q,mn=An==null?void 0:An.shape;return A.createElement(Iu,{...ie("bar"),key:Se.name,name:Se.name,dataKey:Se.name,fill:nn,stroke:nn,isAnimationActive:!1,fillOpacity:cn?.1:L,strokeOpacity:cn?.2:0,stackId:ue?"stack":Se.stackId||void 0,yAxisId:Se.yAxisId||void 0,minPointSize:re,...An,shape:rn=>{const Je=rn.payload,Dn=Je!=null&&Je.color?ot(Je.color,be):typeof ae=="function"?ot(ae(Je==null?void 0:Je[Se.name],Se),be):DCe(q,Se)||nn,Me={...rn,fill:Dn};return typeof mn=="function"?mn(Me):Q.isValidElement(mn)?Q.cloneElement(mn,Me):typeof mn=="object"&&mn?y.jsx(km,{...Me,...mn}):y.jsx(km,{...Me})}},V&&y.jsx(lo,{position:U==="vertical"?"right":"top",fontSize:12,fill:"var(--chart-bar-label-color, var(--mantine-color-dimmed))",formatter:rn=>Ie==null?void 0:Ie(rn),...typeof W=="function"?W(Se):W}))}),We=R==null?void 0:R.map((Se,nn)=>{const cn=ot(Se.color,be);return y.jsx(dp,{stroke:Se.color?cn:"var(--chart-grid-color)",strokeWidth:1,yAxisId:Se.yAxisId||void 0,...Se,label:{fill:Se.color?cn:"currentColor",fontSize:12,position:Se.labelPosition??"insideBottomLeft",...typeof Se.label=="object"?Se.label:{value:Se.label}},...ie("referenceLine")},nn)}),Ze={axisLine:!1,...U==="vertical"?{dataKey:v,type:"category"}:{type:"number"},tickLine:Pe?{stroke:"currentColor"}:!1,allowDecimals:!0,unit:O,tickFormatter:U==="vertical"?void 0:Ie,...ie("axis")};return y.jsx(ye,{...ie("root"),onMouseLeave:Ve,dir:H||"ltr",mod:[{orientation:U},ge],...$e,children:y.jsx(q9,{...ie("container"),children:y.jsxs(OCe,{data:Xe,stackOffset:G==="percent"?"expand":void 0,layout:U,maxBarSize:se,margin:{bottom:Y?30:void 0,left:D?10:void 0,right:D?5:void 0},...B,children:[c&&y.jsx(Qo,{verticalAlign:"top",content:Se=>y.jsx(f0,{payload:Se.payload,onHighlight:xe,legendPosition:(h==null?void 0:h.verticalAlign)||"top",classNames:He,styles:Ke,series:d,showColor:G!=="waterfall",attributes:ne}),...h}),y.jsxs(wl,{hide:!w,...U==="vertical"?{type:"number"}:{dataKey:v},tick:{transform:"translate(0, 10)",fontSize:12,fill:"currentColor"},stroke:"",interval:"preserveStartEnd",tickLine:Ce?{stroke:"currentColor"}:!1,minTickGap:5,tickFormatter:U==="vertical"?Ie:void 0,...ie("axis"),...C,children:[Y&&y.jsx(Jt,{position:"insideBottom",offset:-20,fontSize:12,...ie("axisLabel"),children:Y}),C==null?void 0:C.children]}),y.jsxs(go,{orientation:"left",tick:{transform:"translate(-10, 0)",fontSize:12,fill:"currentColor"},hide:!k,...Ze,...T,children:[D&&y.jsx(Jt,{position:"insideLeft",angle:-90,textAnchor:"middle",fontSize:12,offset:-5,...ie("axisLabel"),children:D}),T==null?void 0:T.children]}),y.jsxs(go,{yAxisId:"right",orientation:"right",tick:{transform:"translate(10, 0)",fontSize:12,fill:"currentColor"},hide:!$,...Ze,...ee,children:[X&&y.jsx(Jt,{position:"insideRight",angle:90,textAnchor:"middle",fontSize:12,offset:-5,...ie("axisLabel"),children:X}),T==null?void 0:T.children]}),y.jsx(F0,{strokeDasharray:M,vertical:_==="y"||_==="xy",horizontal:_==="x"||_==="xy",...ie("grid"),...N}),b&&y.jsx(ca,{animationDuration:E,isAnimationActive:E!==0,position:U==="vertical"?{}:{y:0},cursor:{stroke:"var(--chart-grid-color)",strokeWidth:1,strokeDasharray:M,fill:"var(--chart-cursor-fill)"},content:({label:Se,payload:nn,labelFormatter:cn})=>y.jsx(b9,{label:cn&&nn?cn(Se,nn):Se,payload:nn,type:G==="waterfall"?"scatter":void 0,unit:O,classNames:He,styles:Ke,series:d,valueFormatter:P,attributes:ne}),...F}),me,We,z]})})})});su.displayName="@mantine/charts/BarChart";su.classes=c0;su.varsResolver=uW;const RCe={withXAxis:!0,withYAxis:!0,withTooltip:!0,tooltipAnimationDuration:0,fillOpacity:1,tickLine:"y",strokeDasharray:"5 5",gridAxis:"x",withDots:!0,connectNulls:!0,strokeWidth:2,curveType:"monotone",gradientStops:[{offset:0,color:"red"},{offset:100,color:"blue"}]},fW=(e,{textColor:n,gridColor:t})=>({root:{"--chart-text-color":n?ot(n,e):void 0,"--chart-grid-color":t?ot(t,e):void 0}}),H0=De(e=>{const n=ke("LineChart",RCe,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,data:f,withLegend:c,legendProps:h,series:d,onMouseLeave:p,dataKey:v,withTooltip:b,withXAxis:w,withYAxis:k,gridAxis:_,tickLine:x,xAxisProps:C,yAxisProps:T,unit:O,tooltipAnimationDuration:E,strokeDasharray:M,gridProps:N,tooltipProps:F,referenceLines:R,withDots:L,dotProps:B,activeDotProps:G,strokeWidth:U,lineChartProps:H,connectNulls:P,fillOpacity:z,curveType:q,orientation:Y,dir:D,valueFormatter:V,children:W,lineProps:$,xAxisLabel:X,yAxisLabel:ee,type:re,gradientStops:se,withRightYAxis:ge,rightYAxisLabel:ae,rightYAxisProps:le,withPointLabels:_e,attributes:ne,gridColor:$e,...be}=n,Ce=oi(),Pe=_!=="none"&&(x==="x"||x==="xy"),ve=_!=="none"&&(x==="y"||x==="xy"),[xe,Re]=A.useState(null),ue=xe!==null,Ie=Se=>{Re(null),p==null||p(Se)},{resolvedClassNames:Ve,resolvedStyles:He}=qi({classNames:t,styles:a,props:n}),Ke=Qe({name:"LineChart",classes:c0,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:ne,vars:l,varsResolver:fW}),Xe=`line-chart-gradient-${Qi()}`,ie=se==null?void 0:se.map(Se=>y.jsx("stop",{offset:`${Se.offset}%`,stopColor:ot(Se.color,Ce)},Se.color)),me=d.map(Se=>{const nn=ot(Se.color,Ce),cn=ue&&xe!==Se.name;return A.createElement(hp,{...Ke("line"),key:Se.name,name:Se.name,dataKey:Se.name,dot:L?{fillOpacity:cn?0:1,strokeOpacity:cn?0:1,strokeWidth:1,fill:re==="gradient"?"var(--mantine-color-gray-7)":nn,stroke:re==="gradient"?"white":nn,...B}:!1,activeDot:L?{fill:re==="gradient"?"var(--mantine-color-gray-7)":nn,stroke:re==="gradient"?"white":nn,...G}:!1,fill:nn,stroke:re==="gradient"?`url(#${Xe})`:nn,strokeWidth:U,isAnimationActive:!1,fillOpacity:cn?0:z,strokeOpacity:cn?.5:z,connectNulls:P,type:Se.curveType??q,strokeDasharray:Se.strokeDasharray,yAxisId:Se.yAxisId||void 0,label:_e?y.jsx(Cme,{valueFormatter:V}):void 0,...typeof $=="function"?$(Se):$})}),We=R==null?void 0:R.map((Se,nn)=>{const cn=ot(Se.color,Ce);return y.jsx(dp,{stroke:Se.color?cn:"var(--chart-grid-color)",strokeWidth:1,yAxisId:Se.yAxisId||void 0,...Se,label:{fill:Se.color?cn:"currentColor",fontSize:12,position:Se.labelPosition??"insideBottomLeft",...typeof Se.label=="object"?Se.label:{value:Se.label}},...Ke("referenceLine")},nn)}),Ze={axisLine:!1,...Y==="vertical"?{dataKey:v,type:"category"}:{type:"number"},tickLine:ve?{stroke:"currentColor"}:!1,allowDecimals:!0,unit:O,tickFormatter:Y==="vertical"?void 0:V,...Ke("axis")};return y.jsx(ye,{...Ke("root"),onMouseLeave:Ie,dir:D||"ltr",...be,children:y.jsx(q9,{...Ke("container"),children:y.jsxs(ACe,{data:f,layout:Y,margin:{bottom:X?30:void 0,left:ee?10:void 0,right:ee?5:void 0},...H,children:[re==="gradient"&&y.jsx("defs",{children:y.jsx("linearGradient",{id:Xe,x1:"0",y1:"0",x2:"0",y2:"1",children:ie})}),c&&y.jsx(Qo,{verticalAlign:"top",content:Se=>y.jsx(f0,{payload:Se.payload,onHighlight:Re,legendPosition:(h==null?void 0:h.verticalAlign)||"top",classNames:Ve,styles:He,series:d,showColor:re!=="gradient",attributes:ne}),...h}),y.jsxs(wl,{hide:!w,...Y==="vertical"?{type:"number"}:{dataKey:v},tick:{transform:"translate(0, 10)",fontSize:12,fill:"currentColor"},stroke:"",interval:"preserveStartEnd",tickLine:Pe?{stroke:"currentColor"}:!1,minTickGap:5,tickFormatter:Y==="vertical"?V:void 0,...Ke("axis"),...C,children:[X&&y.jsx(Jt,{position:"insideBottom",offset:-20,fontSize:12,...Ke("axisLabel"),children:X}),C==null?void 0:C.children]}),y.jsxs(go,{tick:{transform:"translate(-10, 0)",fontSize:12,fill:"currentColor"},hide:!k,...Ze,...T,children:[ee&&y.jsx(Jt,{position:"insideLeft",angle:-90,textAnchor:"middle",fontSize:12,offset:-5,...Ke("axisLabel"),children:ee}),T==null?void 0:T.children]}),y.jsxs(go,{yAxisId:"right",orientation:"right",tick:{transform:"translate(10, 0)",fontSize:12,fill:"currentColor"},hide:!ge,...Ze,...le,children:[ae&&y.jsx(Jt,{position:"insideRight",angle:90,textAnchor:"middle",fontSize:12,offset:-5,...Ke("axisLabel"),children:ae}),T==null?void 0:T.children]}),y.jsx(F0,{strokeDasharray:M,vertical:_==="y"||_==="xy",horizontal:_==="x"||_==="xy",...Ke("grid"),...N}),b&&y.jsx(ca,{animationDuration:E,isAnimationActive:E!==0,position:Y==="vertical"?{}:{y:0},cursor:{stroke:"var(--chart-grid-color)",strokeWidth:1,strokeDasharray:M},content:({label:Se,payload:nn,labelFormatter:cn})=>y.jsx(b9,{label:cn&&nn?cn(Se,nn):Se,payload:nn,unit:O,classNames:Ve,styles:He,series:d,valueFormatter:V,showColor:re!=="gradient",attributes:ne}),...F}),me,We,W]})})})});H0.displayName="@mantine/charts/LineChart";H0.classes=c0;H0.varsResolver=fW;function S$(e){if(e)return Le(e).format("YYYY-MM-DD")}function oh({icon:e,label:n,value:t,hint:i,color:r}){return y.jsx(Ht,{withBorder:!0,p:"md",radius:"md",children:y.jsxs(ft,{gap:4,children:[y.jsxs(un,{gap:6,c:"dimmed",children:[e,y.jsx(Ye,{size:"xs",tt:"uppercase",fw:600,children:n})]}),y.jsx(Ye,{size:"xl",fw:700,c:r,children:t}),i&&y.jsx(Ye,{size:"xs",c:"dimmed",children:i})]})})}function PCe({users:e}){const[n,t]=A.useState(()=>Le().subtract(30,"day").toDate()),[i,r]=A.useState(()=>new Date),[a,o]=A.useState(null),[l,f]=A.useState(null),[c,h]=A.useState([]),[d,p]=A.useState([]),[v,b]=A.useState(null),[w,k]=A.useState(!1),[_,x]=A.useState([]);A.useEffect(()=>{MB().then(p).catch(()=>{})},[]),A.useEffect(()=>{let R=!1;return k(!0),DB({from:S$(n),to:S$(i),assignee_id:a||void 0,requester:l||void 0,tags:c.length>0?c:void 0}).then(L=>{R||(b(L),x(B=>{const G=new Set(B);for(const U of L.top_requesters??[])G.add(U.requester);return Array.from(G).sort()}))}).catch(()=>{}).finally(()=>{R||k(!1)}),()=>{R=!0}},[n,i,a,l,c]);const C=A.useMemo(()=>e.map(R=>({value:R.id,label:R.display_name||R.username})),[e]),T=A.useMemo(()=>{if(!v)return[];const R=v.cumulative_flow??[],L=R.findIndex(G=>G.total>0||G.done>0);return(L<=0?R:R.slice(Math.max(0,L-1))).map(G=>({date:G.date,done:G.done,wip:Math.max(0,G.total-G.done),total:G.total}))},[v]),O=A.useMemo(()=>{if(!v)return[];const R=new Map;for(const L of v.throughput_daily??[])R.set(L.date,{date:L.date,completed:L.count,created:0});for(const L of v.created_daily??[]){const B=R.get(L.date)??{date:L.date,completed:0,created:0};B.created=L.count,R.set(L.date,B)}return Array.from(R.values()).sort((L,B)=>L.date.localeCompare(B.date))},[v]),E=A.useMemo(()=>v?(v.by_column??[]).map(R=>({column:R.name+(R.is_done?" ✓":""),tarjetas:R.count})):[],[v]),M=A.useMemo(()=>v?(v.top_assignees??[]).slice().sort((R,L)=>L.completed_in_range+L.active-(R.completed_in_range+R.active)).slice(0,8).map(R=>({usuario:R.display_name||R.username,completadas:R.completed_in_range,activas:R.active})):[],[v]),N=A.useMemo(()=>v?(v.top_requesters??[]).map(R=>({solicitante:R.requester,activas:R.active,completadas:R.completed_in_range})):[],[v]),F=A.useMemo(()=>v?(v.movements_by_user??[]).filter(R=>R.moves>0).slice(0,8).map(R=>({usuario:R.display_name||R.username,movimientos:R.moves})):[],[v]);return y.jsx(ye,{p:"md",children:y.jsxs(ft,{gap:"md",children:[y.jsxs(un,{justify:"space-between",children:[y.jsx(ju,{order:3,children:"Dashboard"}),y.jsxs(un,{gap:"xs",wrap:"nowrap",children:[y.jsx(pu,{label:"Desde",value:n,onChange:R=>t(R),size:"xs",clearable:!1,valueFormat:"YYYY-MM-DD",style:{minWidth:140}}),y.jsx(pu,{label:"Hasta",value:i,onChange:R=>r(R),size:"xs",clearable:!1,valueFormat:"YYYY-MM-DD",style:{minWidth:140}}),y.jsx(ho,{label:"Asignado",size:"xs",placeholder:"Todos",value:a,onChange:o,data:C,clearable:!0,searchable:!0,style:{minWidth:160}}),y.jsx(ho,{label:"Solicitante",size:"xs",placeholder:"Todos",value:l,onChange:f,data:_.map(R=>({value:R,label:R})),clearable:!0,searchable:!0,style:{minWidth:160}}),y.jsx(Ny,{label:"Tags",size:"xs",placeholder:"Todas",value:c,onChange:h,data:d,clearable:!0,searchable:!0,style:{minWidth:200}})]})]}),w&&!v&&y.jsx(Mc,{p:"xl",children:y.jsx(Fi,{})}),v&&(()=>{const R=v.totals??{},L=v.lead_time??{n:0,p50_ms:0,p90_ms:0},B=G=>R[G]??0;return y.jsxs(y.Fragment,{children:[y.jsxs(Fh,{cols:{base:2,md:5},spacing:"md",children:[y.jsx(oh,{icon:y.jsx(Kj,{size:14}),label:"Totales",value:B("cards"),hint:`${B("columns")} columnas, ${B("users")} usuarios`}),y.jsx(oh,{icon:y.jsx(Kj,{size:14}),label:"Activas",value:B("cards_active"),hint:"Sin completar",color:"blue"}),y.jsx(oh,{icon:y.jsx(Wh,{size:14}),label:"Completadas (rango)",value:B("cards_completed_in_range"),hint:`${B("cards_done")} completadas total · ${B("cards_created_in_range")} creadas rango`,color:"green"}),y.jsx(oh,{icon:y.jsx(Doe,{size:14}),label:"Lead time p50",value:L.n>0?rr(L.p50_ms):0,hint:`p90 ${L.n>0?rr(L.p90_ms):0} · n=${L.n}`}),y.jsx(oh,{icon:y.jsx(nu,{size:14}),label:"Bloqueos activos",value:B("active_locks"),hint:`Total bloqueado: ${rr(v.lock_total_ms??0)}`,color:B("active_locks")>0?"yellow":void 0})]}),y.jsxs(Ht,{withBorder:!0,p:"md",radius:"md",children:[y.jsxs(un,{gap:6,mb:"sm",children:[y.jsx(Xj,{size:16}),y.jsx(Ye,{fw:600,children:"Cumulative Flow Diagram"}),y.jsx(Ye,{size:"xs",c:"dimmed",children:"total vs hechas (acumulado)"})]}),T.length===0?y.jsx(Ye,{c:"dimmed",size:"sm",children:"Sin datos."}):y.jsx("div",{style:{height:260,width:"100%"},children:y.jsx(q9,{width:"100%",height:"100%",children:y.jsxs(ECe,{data:T,margin:{top:10,right:16,left:0,bottom:0},children:[y.jsx(F0,{strokeDasharray:"5 5",stroke:"var(--mantine-color-gray-4)"}),y.jsx(wl,{dataKey:"date",tick:{fontSize:12,fill:"currentColor"}}),y.jsx(go,{allowDecimals:!1,tick:{fontSize:12,fill:"currentColor"}}),y.jsx(ca,{contentStyle:{background:"var(--mantine-color-body)",border:"1px solid var(--mantine-color-gray-3)",borderRadius:6,fontSize:12}}),y.jsx(Qo,{wrapperStyle:{fontSize:12}}),y.jsx(os,{type:"linear",dataKey:"done",name:"Hechas",stackId:"cfd",stroke:"var(--mantine-color-green-6)",fill:"var(--mantine-color-green-6)",fillOpacity:.55,strokeWidth:2,isAnimationActive:!1,dot:{r:3,fill:"var(--mantine-color-green-6)",strokeWidth:0},activeDot:{r:5}}),y.jsx(os,{type:"linear",dataKey:"wip",name:"En curso",stackId:"cfd",stroke:"var(--mantine-color-blue-6)",fill:"var(--mantine-color-blue-6)",fillOpacity:.55,strokeWidth:2,isAnimationActive:!1,dot:{r:3,fill:"var(--mantine-color-blue-6)",strokeWidth:0},activeDot:{r:5}})]})})})]}),y.jsxs(Ir,{children:[y.jsx(Ir.Col,{span:{base:12,md:8},children:y.jsxs(Ht,{withBorder:!0,p:"md",radius:"md",children:[y.jsxs(un,{gap:6,mb:"sm",children:[y.jsx(Xj,{size:16}),y.jsx(Ye,{fw:600,children:"Throughput diario"})]}),O.length===0?y.jsx(Ye,{c:"dimmed",size:"sm",children:"Sin datos en el rango."}):y.jsx(H0,{h:240,data:O,dataKey:"date",curveType:"monotone",withLegend:!0,series:[{name:"completed",label:"Completadas",color:"green.6"},{name:"created",label:"Creadas",color:"blue.6"}]})]})}),y.jsx(Ir.Col,{span:{base:12,md:4},children:y.jsxs(Ht,{withBorder:!0,p:"md",radius:"md",children:[y.jsx(Ye,{fw:600,mb:"sm",children:"Tarjetas por columna"}),E.length===0?y.jsx(Ye,{c:"dimmed",size:"sm",children:"Sin columnas."}):y.jsx(su,{h:240,data:E,dataKey:"column",orientation:"vertical",yAxisProps:{width:100},series:[{name:"tarjetas",label:"Tarjetas",color:"blue.6"}]})]})})]}),y.jsxs(Ir,{children:[y.jsx(Ir.Col,{span:{base:12,md:6},children:y.jsxs(Ht,{withBorder:!0,p:"md",radius:"md",children:[y.jsx(Ye,{fw:600,mb:"sm",children:"Top asignados"}),M.length===0?y.jsx(Ye,{c:"dimmed",size:"sm",children:"Sin asignaciones."}):y.jsx(su,{h:240,data:M,dataKey:"usuario",orientation:"vertical",yAxisProps:{width:120},withLegend:!0,series:[{name:"completadas",label:"Completadas",color:"green.6"},{name:"activas",label:"Activas",color:"blue.6"}],type:"stacked"})]})}),y.jsx(Ir.Col,{span:{base:12,md:6},children:y.jsxs(Ht,{withBorder:!0,p:"md",radius:"md",children:[y.jsx(Ye,{fw:600,mb:"sm",children:"Top solicitantes"}),N.length===0?y.jsx(Ye,{c:"dimmed",size:"sm",children:"Sin solicitantes en el rango."}):y.jsx(su,{h:Math.max(240,N.length*32),data:N,dataKey:"solicitante",orientation:"vertical",yAxisProps:{width:160,interval:0},withLegend:!0,series:[{name:"completadas",label:"Completadas",color:"green.6"},{name:"activas",label:"Activas",color:"violet.6"}],type:"stacked"})]})})]}),y.jsxs(Ir,{children:[y.jsx(Ir.Col,{span:{base:12,md:6},children:y.jsxs(Ht,{withBorder:!0,p:"md",radius:"md",children:[y.jsx(Ye,{fw:600,mb:"sm",children:"Movimientos por usuario (rango)"}),F.length===0?y.jsx(Ye,{c:"dimmed",size:"sm",children:"Sin movimientos registrados."}):y.jsx(su,{h:240,data:F,dataKey:"usuario",orientation:"vertical",yAxisProps:{width:120},series:[{name:"movimientos",label:"Movimientos",color:"orange.6"}]})]})}),y.jsx(Ir.Col,{span:{base:12,md:6},children:y.jsxs(Ht,{withBorder:!0,p:"md",radius:"md",children:[y.jsx(Ye,{fw:600,mb:"sm",children:"Tiempo en columna (cycle time)"}),y.jsxs(Wn,{striped:!0,highlightOnHover:!0,withTableBorder:!0,withColumnBorders:!0,fz:"xs",children:[y.jsx(Wn.Thead,{children:y.jsxs(Wn.Tr,{children:[y.jsx(Wn.Th,{children:"Columna"}),y.jsx(Wn.Th,{children:"n"}),y.jsx(Wn.Th,{children:"p50"}),y.jsx(Wn.Th,{children:"p90"}),y.jsx(Wn.Th,{children:"avg"})]})}),y.jsx(Wn.Tbody,{children:(v.cycle_time_per_column??[]).map(G=>y.jsxs(Wn.Tr,{children:[y.jsx(Wn.Td,{children:y.jsxs(un,{gap:6,wrap:"nowrap",children:[y.jsx(Ye,{size:"xs",fw:500,children:G.name}),G.is_done&&y.jsx(hi,{size:"xs",color:"green",variant:"light",children:"done"})]})}),y.jsx(Wn.Td,{children:G.stats.n}),y.jsx(Wn.Td,{children:G.stats.n>0?rr(G.stats.p50_ms):"—"}),y.jsx(Wn.Td,{children:G.stats.n>0?rr(G.stats.p90_ms):"—"}),y.jsx(Wn.Td,{children:G.stats.n>0?rr(G.stats.avg_ms):"—"})]},G.column_id))})]})]})})]})]})})()]})})}function NCe(e){try{return JSON.parse(e)}catch{return{}}}function $Ce(e){const n=NCe(e.payload);switch(e.kind){case"created":return{id:e.id,ts:e.created_at,kind:"Creada",actorID:e.actor_id,detail:String(n.title||""),icon:y.jsx(Gh,{size:12}),color:"green"};case"title_changed":return{id:e.id,ts:e.created_at,kind:"Titulo",actorID:e.actor_id,detail:`"${n.old}" → "${n.new}"`,icon:y.jsx(dh,{size:12}),color:"blue"};case"requester_changed":return{id:e.id,ts:e.created_at,kind:"Solicitante",actorID:e.actor_id,detail:`"${n.old||"(vacio)"}" → "${n.new||"(vacio)"}"`,icon:y.jsx(dh,{size:12}),color:"orange"};case"description_changed":return{id:e.id,ts:e.created_at,kind:"Descripcion",actorID:e.actor_id,detail:"edicion",icon:y.jsx(dh,{size:12}),color:"blue"};case"color_changed":return{id:e.id,ts:e.created_at,kind:"Color",actorID:e.actor_id,detail:String(n.color||""),icon:y.jsx(ZC,{size:12}),color:"violet"};case"tags_changed":return{id:e.id,ts:e.created_at,kind:"Tags",actorID:e.actor_id,detail:Array.isArray(n.tags)?n.tags.join(", ")||"(sin tags)":"",icon:y.jsx(wse,{size:12}),color:"grape"};case"assigned":return{id:e.id,ts:e.created_at,kind:"Asignada",actorID:e.actor_id,detail:String(n.assignee_id||""),icon:y.jsx(jse,{size:12}),color:"teal"};case"unassigned":return{id:e.id,ts:e.created_at,kind:"Sin asignar",actorID:e.actor_id,detail:"",icon:y.jsx(Ese,{size:12}),color:"gray"};case"deadline_set":{const t=String(n.deadline||"");return{id:e.id,ts:e.created_at,kind:"Deadline",actorID:e.actor_id,detail:t?t.slice(0,10):"",icon:y.jsx(zF,{size:12}),color:"orange"}}case"deadline_cleared":return{id:e.id,ts:e.created_at,kind:"Deadline quitado",actorID:e.actor_id,detail:n.prev?String(n.prev).slice(0,10):"",icon:y.jsx(koe,{size:12}),color:"gray"};default:return{id:e.id,ts:e.created_at,kind:e.kind,actorID:e.actor_id,detail:e.payload,icon:y.jsx(dh,{size:12}),color:"gray"}}}function zCe({card:e,columns:n=[]}){const[t,i]=A.useState(null),[r,a]=A.useState([]),o=A.useMemo(()=>{const _=new Map;for(const x of n)_.set(x.id,x);return _},[n]),l=_=>{var x;return((x=o.get(_))==null?void 0:x.is_done)===!0};A.useEffect(()=>{vie(e.id).then(i).catch(()=>i({column_history:[],lock_periods:[],events:[],total_locked_ms:0,currently_locked:!1})),jB().then(a).catch(()=>{})},[e.id]);const f=A.useMemo(()=>{const _=new Map;for(const x of r)_.set(x.id,x);return _},[r]),c=A.useMemo(()=>{if(!t)return[];const _=[];for(const x of t.events||[])_.push($Ce(x));for(const x of t.column_history||[]){const C=l(x.column_id);_.push({id:"h_in_"+x.id,ts:x.entered_at,kind:C?"Hecho en columna":"Mueve a columna",actorID:x.actor_id,detail:x.column_name||x.column_id,icon:C?y.jsx(Vh,{size:12}):y.jsx(yoe,{size:12}),color:C?"green":"blue",doneColumn:C})}for(const x of t.lock_periods||[])_.push({id:"lk_"+x.id,ts:x.locked_at,kind:"Bloqueada",actorID:x.actor_id,detail:"",icon:y.jsx(nu,{size:12}),color:"yellow"}),x.unlocked_at&&_.push({id:"lku_"+x.id,ts:x.unlocked_at,kind:"Desbloqueada",actorID:x.actor_id,detail:rr(x.duration_ms),icon:y.jsx(FF,{size:12}),color:"yellow"});return _.sort((x,C)=>x.ts.localeCompare(C.ts))},[t,o]);if(!t)return y.jsx(un,{justify:"center",p:"xl",children:y.jsx(Fi,{size:"sm"})});const{column_history:h,total_locked_ms:d,currently_locked:p}=t;if(c.length===0)return y.jsx(Ye,{c:"dimmed",children:"Sin historial."});const v=Date.now(),b=new Map;for(const _ of h){const x=_.exited_at?_.duration_ms:Math.max(0,v-new Date(_.entered_at).getTime()),C=_.column_id,T=b.get(C),O=o.get(C);b.set(C,{name:_.column_name||(O==null?void 0:O.name)||C,isDone:(O==null?void 0:O.is_done)??!1,ms:((T==null?void 0:T.ms)??0)+x,visits:((T==null?void 0:T.visits)??0)+1})}const w=Array.from(b.entries()).map(([_,x])=>({id:_,...x})).sort((_,x)=>x.ms-_.ms),k=_=>{if(!_)return"";const x=f.get(_);return x?x.display_name||x.username:_};return y.jsxs(ft,{gap:"md",children:[y.jsx(Ye,{size:"sm",c:"dimmed",children:"Linea de tiempo completa de la tarjeta."}),y.jsx(Zf,{active:c.length,bulletSize:22,lineWidth:2,children:c.map(_=>y.jsx(Zf.Item,{bullet:_.icon,color:_.color,lineVariant:_.doneColumn?"solid":void 0,title:y.jsxs(un,{gap:6,wrap:"wrap",children:[y.jsx(Ye,{fw:500,size:"sm",children:_.kind}),_.actorID&&y.jsx(hi,{size:"xs",variant:"light",color:"cyan",leftSection:y.jsx(Pse,{size:10}),children:k(_.actorID)}),_.detail&&y.jsx(hi,{size:"xs",variant:"outline",color:_.color,children:_.detail})]}),children:y.jsx(Ye,{size:"xs",c:"dimmed",children:new Date(_.ts).toLocaleString()})},_.id))}),y.jsx(Um,{}),y.jsxs(ft,{gap:6,children:[y.jsxs(un,{gap:6,align:"center",wrap:"wrap",children:[y.jsx(Noe,{size:14}),y.jsx(Ye,{fw:500,size:"sm",children:"Tiempo por columna"}),y.jsxs(hi,{size:"xs",variant:"light",color:"gray",children:[h.length," entradas"]}),y.jsxs(Ye,{size:"xs",c:"dimmed",ml:"auto",children:[y.jsx(nu,{size:11,style:{verticalAlign:"middle"}})," ",y.jsx(Ye,{span:!0,size:"xs",fw:500,c:d>0?"yellow":"dimmed",children:rr(d)})," ","bloqueada",p?" (en curso)":""]})]}),w.length>0?y.jsxs(Wn,{withTableBorder:!0,withColumnBorders:!0,striped:"even",verticalSpacing:4,fz:"xs",children:[y.jsx(Wn.Thead,{children:y.jsxs(Wn.Tr,{children:[y.jsx(Wn.Th,{children:"Columna"}),y.jsx(Wn.Th,{style:{width:60},children:"Visitas"}),y.jsx(Wn.Th,{style:{width:130},children:"Tiempo total"})]})}),y.jsx(Wn.Tbody,{children:w.map(_=>y.jsxs(Wn.Tr,{children:[y.jsx(Wn.Td,{children:y.jsxs(un,{gap:4,wrap:"nowrap",children:[_.isDone&&y.jsx(Vh,{size:12,color:"var(--mantine-color-green-6)"}),y.jsx(Ye,{size:"xs",fw:_.isDone?600:400,children:_.name})]})}),y.jsx(Wn.Td,{children:_.visits}),y.jsx(Wn.Td,{children:rr(_.ms)})]},_.id))})]}):y.jsx(Ye,{size:"xs",c:"dimmed",children:"Sin movimientos entre columnas."})]})]})}const tg=26;function cW({value:e,onChange:n,options:t=WF,onOpenCustom:i}){const[r,a]=A.useState(!1),[o,l]=A.useState(e&&e.startsWith("#")?e:"#888888"),f=!!e&&e.startsWith("#")&&!t.some(c=>c.value===e);return y.jsxs(y.Fragment,{children:[y.jsxs(un,{gap:6,maw:280,children:[t.map(c=>{const h=e===c.value;return y.jsx(mi,{label:c.label,withArrow:!0,children:y.jsx(ye,{role:"button",onClick:d=>{d.stopPropagation(),n(c.value)},"aria-label":c.label,style:{width:tg,height:tg,borderRadius:"50%",background:zse(c.value),border:`2px solid ${h?"var(--mantine-color-white)":e9(c.value)}`,boxShadow:h?"0 0 0 2px var(--mantine-color-blue-5)":void 0,cursor:"pointer",flexShrink:0,transition:"transform .1s"}})},c.value||"default")}),y.jsx(mi,{label:"Color personalizado",withArrow:!0,children:y.jsx(ye,{role:"button",onMouseDown:c=>{c.stopPropagation()},onClick:c=>{c.stopPropagation(),i?i():a(!0)},"aria-label":"Color personalizado",style:{width:tg,height:tg,borderRadius:"50%",background:f?o:"transparent",border:`2px dashed ${f?o:"var(--mantine-color-gray-5)"}`,boxShadow:f?"0 0 0 2px var(--mantine-color-blue-5)":void 0,cursor:"pointer",flexShrink:0,display:"flex",alignItems:"center",justifyContent:"center",color:"var(--mantine-color-gray-3)"},children:y.jsx(ZC,{size:14})})})]}),!i&&y.jsx(c6,{opened:r,onClose:()=>a(!1),value:o,onAccept:c=>{l(c),n(c)}})]})}const sh=/^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/;function c6({opened:e,onClose:n,value:t,onAccept:i}){const[r,a]=A.useState(t||"#888888"),[o,l]=A.useState(t||"#888888");A.useEffect(()=>{if(e){const d=t&&sh.test(t)?t:"#888888";a(d),l(d)}},[e,t]);const f=d=>{let p=d.trim();p&&!p.startsWith("#")&&(p="#"+p),l(p),sh.test(p)&&a(p)},c=d=>{a(d),l(d)},h=()=>{i(r),n()};return y.jsx(Ur,{opened:e,onClose:n,title:"Color personalizado",size:"auto",centered:!0,withinPortal:!0,zIndex:2e3,closeOnClickOutside:!0,closeOnEscape:!1,trapFocus:!1,withCloseButton:!1,children:y.jsxs(ft,{gap:"sm",onMouseDown:d=>d.stopPropagation(),onPointerDown:d=>d.stopPropagation(),onClick:d=>d.stopPropagation(),children:[y.jsx(Cy,{value:r,onChange:c,format:"hex",swatches:["#1c7ed6","#15aabf","#12b886","#37b24d","#82c91e","#fab005","#fd7e14","#fa5252","#e64980","#be4bdb","#7950f2","#4c6ef5","#868e96","#212529"],fullWidth:!0}),y.jsxs(un,{align:"end",gap:"xs",children:[y.jsx(ll,{label:"Hex",value:o,onChange:d=>f(d.currentTarget.value),error:o&&!sh.test(o)?"Hex invalido":void 0,size:"xs",style:{flex:1},placeholder:"#rrggbb"}),y.jsx(ye,{style:{width:32,height:32,borderRadius:4,background:sh.test(o)?o:"transparent",border:"1px solid var(--mantine-color-dark-4)"}})]}),y.jsxs(un,{justify:"flex-end",gap:"xs",children:[y.jsx(Rt,{variant:"default",size:"xs",onClick:n,children:"Cancelar"}),y.jsx(Rt,{size:"xs",onClick:h,disabled:!sh.test(r),children:"Aceptar"})]})]})})}function LCe(){const e=window;e._cardRenderProbe&&(e._cardRenderCount=(e._cardRenderCount||0)+1)}function ICe(){const e=window;e._cardRenderProbe&&(e._cardBodyRenderCount=(e._cardBodyRenderCount||0)+1)}const BCe=A.memo(function({card:n,isDone:t,isOverlay:i,activeSticker:r,cardElRef:a,now:o,users:l,assignee:f,requesterOptions:c,menuOpen:h,setMenuOpen:d,onDelete:p,onEdit:v,onDuplicate:b,onChangeColor:w,onShowHistory:k,onToggleLock:_,onAssign:x,onSetDeadline:C,onSetRequester:T,onArchive:O,onOpenCustomColor:E,onRemoveSticker:M,onMoveSticker:N,onCommitSticker:F}){ICe();const R=!!r,[L,B]=A.useState(!1),[G,U]=A.useState(!1),[H,P]=A.useState(!1),[z,q]=A.useState(!1),[Y,D]=A.useState(n.requester||""),V=A.useRef(null),W=n.entered_at?new Date(n.entered_at).getTime():o,$=Math.max(0,o-W),X=n.deadline?new Date(n.deadline).getTime():0,ee=X?X-o:0,re=X?ee<0:!1,se=n.created_at?new Date(n.created_at).getTime():0,ge=X&&se?X-se:0,ae=ge>0?ee/ge:0;let le="blue",_e="light";re?(le="red.9",_e="filled"):ae<.1?(le="red",_e="filled"):ae<.5&&(le="yellow",_e="light");const ne=n.locked_at?new Date(n.locked_at).getTime():0,$e=n.locked&&ne?Math.max(0,o-ne):0,be=n.created_at?new Date(n.created_at).getTime():0,Ce=n.completed_at?new Date(n.completed_at).getTime():0,Pe=t&&be&&Ce?Math.max(0,Ce-be):0,ve=ue=>Ie=>{var ie;if(!R||i||!N||Ie.button!==0)return;Ie.stopPropagation(),Ie.preventDefault();const Ve=(ie=a.current)==null?void 0:ie.getBoundingClientRect();if(!Ve)return;V.current=ue;const He=Ie.currentTarget;He.setPointerCapture(Ie.pointerId);const Ke=me=>{const We=V.current;if(We===null)return;const Ze=(me.clientX-Ve.left)/Ve.width,Se=(me.clientY-Ve.top)/Ve.height;N(n.id,We,Math.max(0,Math.min(1,Ze)),Math.max(0,Math.min(1,Se)))},Xe=me=>{var We;(We=He.releasePointerCapture)==null||We.call(He,me.pointerId),He.removeEventListener("pointermove",Ke),He.removeEventListener("pointerup",Xe),He.removeEventListener("pointercancel",Xe),V.current=null,F==null||F(n.id)};He.addEventListener("pointermove",Ke),He.addEventListener("pointerup",Xe),He.addEventListener("pointercancel",Xe)},xe=ue=>Ie=>{!R||i||(Ie.preventDefault(),Ie.stopPropagation(),M==null||M(n.id,ue))},Re=h?y.jsxs(y.Fragment,{children:[y.jsx(Hn.Label,{children:"Acciones"}),y.jsx(Hn.Item,{leftSection:y.jsx(dh,{size:14}),onClick:()=>{d(!1),v(n)},children:"Editar"}),b&&y.jsx(Hn.Item,{leftSection:y.jsx(zoe,{size:14}),onClick:()=>{d(!1),b(n.id)},children:"Duplicar"}),y.jsxs(En,{opened:L,onChange:B,position:"right-start",withArrow:!0,shadow:"md",children:[y.jsx(En.Target,{children:y.jsx(Hn.Item,{leftSection:y.jsx(ZC,{size:14}),onClick:ue=>{ue.preventDefault(),ue.stopPropagation(),B(Ie=>!Ie)},closeMenuOnClick:!1,children:"Color"})}),y.jsx(En.Dropdown,{p:"xs",onDoubleClick:ue=>ue.stopPropagation(),onClick:ue=>ue.stopPropagation(),onMouseDown:ue=>ue.stopPropagation(),children:y.jsx(cW,{value:n.color,onChange:ue=>w(n.id,ue),onOpenCustom:E?()=>E(n.id,n.color||"#888888"):void 0})})]}),y.jsxs(En,{opened:G,onChange:U,position:"right-start",withArrow:!0,shadow:"md",withinPortal:!1,children:[y.jsx(En.Target,{children:y.jsxs(Hn.Item,{leftSection:y.jsx(Ase,{size:14}),onClick:ue=>{ue.preventDefault(),ue.stopPropagation(),U(Ie=>!Ie)},closeMenuOnClick:!1,children:["Asignar a ",f?`(${f.display_name||f.username})`:"..."]})}),y.jsx(En.Dropdown,{p:"xs",onDoubleClick:ue=>ue.stopPropagation(),onClick:ue=>ue.stopPropagation(),onMouseDown:ue=>ue.stopPropagation(),children:y.jsx(ho,{placeholder:"Sin asignar",value:n.assignee_id??null,onChange:ue=>{x(n.id,ue),U(!1),d(!1)},data:l.map(ue=>({value:ue.id,label:ue.display_name||ue.username})),clearable:!0,searchable:!0,autoFocus:!0,comboboxProps:{withinPortal:!1}})})]}),y.jsxs(En,{opened:H,onChange:P,position:"right-start",withArrow:!0,shadow:"md",withinPortal:!1,children:[y.jsx(En.Target,{children:y.jsxs(Hn.Item,{leftSection:y.jsx(Dse,{size:14}),onClick:ue=>{ue.preventDefault(),ue.stopPropagation(),D(n.requester||""),P(Ie=>!Ie)},closeMenuOnClick:!1,children:["Solicitante ",n.requester?`(${n.requester})`:"..."]})}),y.jsx(En.Dropdown,{p:"xs",onDoubleClick:ue=>ue.stopPropagation(),onClick:ue=>ue.stopPropagation(),onMouseDown:ue=>ue.stopPropagation(),children:y.jsx(yy,{placeholder:"Sin solicitante",value:Y,onChange:D,data:c||[],autoFocus:!0,comboboxProps:{withinPortal:!1},onKeyDown:ue=>{ue.key==="Enter"?(ue.preventDefault(),T==null||T(n.id,Y.trim()),P(!1),d(!1)):ue.key==="Escape"&&P(!1)},onOptionSubmit:ue=>{D(ue),T==null||T(n.id,ue),P(!1),d(!1)}})})]}),y.jsx(Hn.Item,{leftSection:n.locked?y.jsx(FF,{size:14}):y.jsx(nu,{size:14}),color:n.locked?"yellow":void 0,onClick:()=>{d(!1),_(n.id,!n.locked)},children:n.locked?"Desbloquear":"Bloquear"}),y.jsx(Hn.Item,{leftSection:y.jsx(Woe,{size:14}),onClick:()=>{d(!1),k(n)},children:"Historial"}),C&&y.jsxs(En,{opened:z,onChange:q,position:"right-start",withArrow:!0,shadow:"md",withinPortal:!1,children:[y.jsx(En.Target,{children:y.jsx(Hn.Item,{leftSection:y.jsx(zF,{size:14}),onClick:ue=>{ue.preventDefault(),ue.stopPropagation(),q(Ie=>!Ie)},closeMenuOnClick:!1,children:n.deadline?`Deadline (${n.deadline.slice(0,10)})`:"Deadline..."})}),y.jsxs(En.Dropdown,{p:"xs",onDoubleClick:ue=>ue.stopPropagation(),onClick:ue=>ue.stopPropagation(),onMouseDown:ue=>ue.stopPropagation(),children:[y.jsx(pu,{value:n.deadline?n.deadline.slice(0,10):null,onChange:ue=>{const Ie=ue?typeof ue=="string"?ue.slice(0,10):new Date(ue).toISOString().slice(0,10):null;C(n.id,Ie?`${Ie}T23:59:59Z`:null),q(!1),d(!1)},clearable:!0,valueFormat:"DD/MM/YYYY",size:"xs",placeholder:"Elegir fecha",popoverProps:{withinPortal:!1}}),n.deadline&&y.jsx(mi,{label:"Quitar deadline",withArrow:!0,children:y.jsx(Ot,{size:"sm",variant:"subtle",color:"red",mt:6,onClick:()=>{C(n.id,null),q(!1),d(!1)},children:y.jsx(vu,{size:12})})})]})]}),t&&O&&y.jsx(Hn.Item,{leftSection:y.jsx($F,{size:14}),color:"teal",onClick:()=>{d(!1),O(n.id)},children:"Archivar"}),y.jsx(Hn.Divider,{}),y.jsx(Hn.Item,{leftSection:y.jsx(vu,{size:14}),color:"red",onClick:()=>{d(!1),p(n.id)},children:"Borrar"})]}):null;return y.jsxs(y.Fragment,{children:[y.jsxs(ft,{gap:6,style:{position:"relative",zIndex:1,pointerEvents:R?"none":void 0},children:[y.jsxs(un,{justify:"space-between",gap:4,wrap:"nowrap",align:"flex-start",children:[y.jsxs(un,{gap:4,wrap:"nowrap",style:{flex:1,minWidth:0},align:"flex-start",children:[y.jsx(IF,{size:14,color:"var(--mantine-color-dark-2)",style:{flexShrink:0,marginTop:4}}),n.locked&&y.jsx(mi,{label:"Bloqueada",withArrow:!0,children:y.jsx(nu,{size:14,color:"var(--mantine-color-yellow-6)",style:{flexShrink:0,marginTop:4}})}),y.jsx(Ye,{size:"sm",fw:500,style:{flex:1,wordBreak:"break-word",whiteSpace:"normal",textDecoration:t?"line-through":"none",opacity:t?.7:1},children:n.title})]}),y.jsxs(Hn,{opened:h,onChange:d,position:"bottom-end",shadow:"md",withArrow:!0,children:[y.jsx(Hn.Target,{children:y.jsx(Ot,{variant:"subtle",color:"gray",size:"sm","aria-label":"Acciones",style:{flexShrink:0},onPointerDown:ue=>ue.stopPropagation(),children:y.jsx(LF,{size:14})})}),y.jsx(Hn.Dropdown,{onDoubleClick:ue=>ue.stopPropagation(),onClick:ue=>ue.stopPropagation(),onMouseDown:ue=>ue.stopPropagation(),onContextMenu:ue=>ue.stopPropagation(),children:Re})]})]}),(n.requester||f)&&y.jsxs(un,{gap:6,wrap:"nowrap",style:{minWidth:0},children:[n.requester&&y.jsxs(y.Fragment,{children:[y.jsx(ol,{size:18,radius:"xs",color:DS(n.requester),style:{flexShrink:0},children:n.requester.slice(0,2).toUpperCase()}),y.jsx(Ye,{size:"xs",c:"dimmed",truncate:!0,children:n.requester})]}),n.requester&&f&&y.jsx(Ye,{size:"xs",c:"dimmed",style:{flexShrink:0},children:"-"}),f&&y.jsxs(y.Fragment,{children:[y.jsx(ol,{size:18,radius:"xl",color:f.color||"blue",style:{flexShrink:0},children:(f.display_name||f.username).slice(0,2).toUpperCase()}),y.jsx(Ye,{size:"xs",c:"dimmed",truncate:!0,children:f.display_name||f.username})]})]}),n.description&&y.jsx(Ye,{size:"xs",c:"dimmed",lineClamp:3,children:n.description}),n.tags&&n.tags.length>0&&y.jsx(un,{gap:4,wrap:"wrap",children:n.tags.map(ue=>y.jsx(hi,{size:"xs",variant:"light",color:DS(ue),radius:"sm",children:ue},ue))}),y.jsxs(un,{gap:4,wrap:"wrap",children:[n.locked&&y.jsx(hi,{size:"xs",variant:"light",color:"yellow",leftSection:y.jsx(nu,{size:10}),children:rr($e)}),!n.locked&&t&&n.completed_at?y.jsxs(y.Fragment,{children:[y.jsx(hi,{size:"xs",variant:"light",color:"teal",leftSection:y.jsx(Vh,{size:10}),children:PS(n.completed_at)}),y.jsxs(hi,{size:"xs",variant:"light",color:"gray",leftSection:y.jsx(jS,{size:10}),children:["Total: ",rr(Pe)]}),n.total_locked_ms>0&&y.jsx(hi,{size:"xs",variant:"light",color:"yellow",leftSection:y.jsx(nu,{size:10}),children:rr(n.total_locked_ms)})]}):n.locked?null:n.deadline?y.jsx(mi,{label:`Vence: ${PS(n.deadline)}`,withArrow:!0,children:y.jsx(hi,{size:"xs",variant:_e,color:le,leftSection:y.jsx(BF,{size:10}),children:re?`-${rr(-ee)}`:rr(ee)})}):y.jsx(hi,{size:"xs",variant:"light",color:"gray",leftSection:y.jsx(jS,{size:10}),children:rr($)})]}),n.seq_num>0&&y.jsxs(Ye,{size:"xs",c:"dimmed",style:{marginTop:-2},children:["#",String(n.seq_num).padStart(5,"0")]})]}),n.stickers&&n.stickers.length>0&&y.jsx("div",{"data-sticker-overlay":!0,style:{position:"absolute",inset:0,pointerEvents:"none",overflow:"hidden",borderRadius:"inherit",zIndex:0},children:n.stickers.map((ue,Ie)=>y.jsx("span",{onPointerDown:ve(Ie),onContextMenu:xe(Ie),title:R?"Arrastra para mover. Click derecho para borrar.":"",style:{position:"absolute",left:`${ue.x*100}%`,top:`${ue.y*100}%`,transform:"translate(-50%, -50%)",fontSize:48,lineHeight:1,opacity:1,userSelect:"none",cursor:R&&!i?"grab":"default",pointerEvents:R&&!i?"auto":"none",touchAction:"none"},children:ue.emoji},Ie))})]})});function FCe({card:e,now:n,onDelete:t,onEdit:i,onDuplicate:r,onChangeColor:a,onShowHistory:o,onToggleLock:l,onAssign:f,onSetDeadline:c,onSetRequester:h,onArchive:d,requesterOptions:p,onOpenCustomColor:v,activeSticker:b,onAddSticker:w,onRemoveSticker:k,onMoveSticker:_,onCommitSticker:x,users:C,assignee:T,inDoneColumn:O,columnOverdue:E,isOverlay:M,highlight:N}){LCe();const F=O||!!e.completed_at,[R,L]=A.useState(!1),B=A.useRef(null),G=!!b,U=A.useMemo(()=>({type:"card",columnId:e.column_id,locked:e.locked}),[e.column_id,e.locked]),{attributes:H,listeners:P,setNodeRef:z,transform:q,transition:Y,isDragging:D}=sF({id:e.id,data:U,disabled:G,animateLayoutChanges:()=>!1}),V=A.useCallback(re=>{B.current=re,z(re)},[z]);A.useEffect(()=>{N&&B.current&&B.current.scrollIntoView({behavior:"smooth",block:"center"})},[N]);const W=re=>{if(!G||!w||M||re.target.closest("[data-sticker-overlay]"))return;const se=re.currentTarget.getBoundingClientRect(),ge=(re.clientX-se.left)/se.width,ae=(re.clientY-se.top)/se.height;w(e.id,Math.max(0,Math.min(1,ge)),Math.max(0,Math.min(1,ae)))},$=N?"var(--mantine-color-blue-5)":E?"var(--mantine-color-red-6)":e.locked?"var(--mantine-color-yellow-6)":e9(e.color),X={transform:mo.Transform.toString(q),transition:Y,opacity:D?.4:1,background:VF(e.color),borderColor:$,borderWidth:N||e.locked||E?2:1,boxShadow:N?"0 0 0 3px var(--mantine-color-blue-4)":E?"0 0 0 2px var(--mantine-color-red-3)":void 0,filter:F?"brightness(0.55) saturate(0.7)":void 0},ee=re=>{re.preventDefault(),L(!0)};return y.jsx(Ht,{ref:V,style:{...X,position:"relative",cursor:G?"copy":"grab",touchAction:"none"},withBorder:!0,p:"xs",shadow:M?"lg":"xs",radius:"md","data-card-id":e.id,"data-column-overdue":E?"true":"false","data-locked":e.locked?"true":"false",onContextMenu:ee,onClick:W,onDoubleClick:re=>{re.stopPropagation(),i(e)},...H,...G?{}:P,children:y.jsx(BCe,{card:e,isDone:F,isOverlay:M,highlight:N,activeSticker:b,cardElRef:B,now:n,users:C,assignee:T,requesterOptions:p,menuOpen:R,setMenuOpen:L,onDelete:t,onEdit:i,onDuplicate:r,onChangeColor:a,onShowHistory:o,onToggleLock:l,onAssign:f,onSetDeadline:c,onSetRequester:h,onArchive:d,onOpenCustomColor:v,onRemoveSticker:k,onMoveSticker:_,onCommitSticker:x})})}const dW=A.memo(FCe),C$={minutes:1,hours:60,days:1440,weeks:1440*7,months:1440*30},d6={minutes:"minutos",hours:"horas",days:"dias",weeks:"semanas",months:"meses"},qCe=Object.keys(d6).map(e=>({value:e,label:d6[e]}));function HCe({column:e,cards:n,now:t,collapsed:i,onAddCard:r,onRenameColumn:a,onResizeColumn:o,onMoveColumnLocation:l,onDeleteColumn:f,onSetWIPLimit:c,onSetMaxTimeMinutes:h,onPickRandom:d,onToggleDone:p,onEditCard:v,onDeleteCard:b,onDuplicateCard:w,onChangeCardColor:k,onShowHistory:_,onToggleCardLock:x,onAssignCard:C,onSetCardDeadline:T,onSetRequester:O,onArchiveCard:E,requesterOptions:M,onOpenCustomCardColor:N,activeSticker:F,onAddSticker:R,onRemoveSticker:L,onMoveSticker:B,onCommitSticker:G,users:U,usersById:H,highlightCardId:P}){const[z,q]=A.useState(!1),[Y,D]=A.useState(e.name),[V,W]=A.useState(null),[$,X]=A.useState(!1),[ee,re]=A.useState(e.wip_limit),[se,ge]=A.useState(!1),ae=Be=>Be<=0?"minutes":Be%43200===0?"months":Be%10080===0?"weeks":Be%1440===0?"days":Be%60===0?"hours":"minutes",le=(Be,On)=>{const gn=C$[On];return Be>0?Math.max(1,Math.round(Be/gn)):0},[_e,ne]=A.useState(()=>ae(e.max_time_minutes||0)),[$e,be]=A.useState(()=>le(e.max_time_minutes||0,ae(e.max_time_minutes||0))),[Ce,Pe]=A.useState(()=>i?localStorage.getItem(`kanban_col_body_${e.id}`)==="1":!1);A.useEffect(()=>{i&&localStorage.setItem(`kanban_col_body_${e.id}`,Ce?"1":"0")},[Ce,i,e.id]);const ve=e.wip_limit,xe=ve>0&&n.length>ve;A.useEffect(()=>{W(null)},[e.width]);const Re=A.useMemo(()=>({type:"column",columnId:e.id,location:e.location}),[e.id,e.location]),{attributes:ue,listeners:Ie,setNodeRef:Ve,transform:He,transition:Ke,isDragging:Xe}=sF({id:`column-${e.id}`,data:Re}),ie=i?"100%":V??e.width,me=i?{transform:mo.Transform.toString(He),transition:Ke,opacity:Xe?.4:1,width:"100%",display:"flex",flexDirection:"column",position:"relative",flex:Ce?"0 0 auto":"1 1 auto",minHeight:0}:{transform:mo.Transform.toString(He),transition:Ke,opacity:Xe?.4:1,width:ie,minWidth:ie,maxWidth:ie,display:"flex",flexDirection:"column",height:"100%",position:"relative"},We=n.map(Be=>Be.id),Ze=()=>{const Be=Y.trim();Be&&Be!==e.name&&a(e.id,Be),q(!1)},Se=A.useRef(null),nn=Be=>{Be.preventDefault(),Be.stopPropagation(),Se.current={startX:Be.clientX,startWidth:e.width},document.body.style.cursor="col-resize",document.body.style.userSelect="none";const On=vn=>{if(!Se.current)return;const yn=vn.clientX-Se.current.startX,et=Math.min(800,Math.max(200,Se.current.startWidth+yn));W(et)},gn=()=>{Se.current&&cn.current!==null&&o(e.id,cn.current),Se.current=null,document.body.style.cursor="",document.body.style.userSelect="",window.removeEventListener("mousemove",On),window.removeEventListener("mouseup",gn)};window.addEventListener("mousemove",On),window.addEventListener("mouseup",gn)},cn=A.useRef(null);A.useEffect(()=>{cn.current=V},[V]);const An=e.location==="sidebar",mn=An?"Restaurar al board":"Mover al sidebar",rn=An?moe:$F,Je=()=>{const Be=typeof ee=="number"?ee:parseInt(String(ee),10),On=Number.isFinite(Be)&&Be>=0?Math.floor(Be):0;On!==e.wip_limit&&c(e.id,On),X(!1)},Dn=xe?"var(--mantine-color-red-9)":"var(--mantine-color-dark-7)",Me=xe?"var(--mantine-color-red-6)":void 0;return y.jsxs(Ht,{ref:Ve,style:{...me,background:Dn,borderColor:Me,borderWidth:xe?2:1},withBorder:!0,radius:"md",p:"sm","data-column-id":e.id,"data-column-location":e.location,children:[y.jsxs(un,{justify:"space-between",mb:"xs",wrap:"nowrap",children:[y.jsxs(un,{gap:4,wrap:"nowrap",style:{flex:1,minWidth:0},children:[y.jsx(Ot,{variant:"subtle",color:"gray",size:"sm",...ue,...Ie,style:{cursor:"grab"},"aria-label":"Drag column",children:y.jsx(IF,{size:14})}),z?y.jsx(ll,{size:"xs",value:Y,onChange:Be=>D(Be.currentTarget.value),autoFocus:!0,onBlur:Ze,onKeyDown:Be=>{Be.key==="Enter"&&Ze(),Be.key==="Escape"&&(D(e.name),q(!1))},style:{flex:1}}):y.jsx(Ye,{fw:600,size:"sm",truncate:!0,onDoubleClick:()=>{D(e.name),q(!0)},style:{flex:1,cursor:"text"},title:"Doble click para renombrar",children:e.name}),y.jsxs(En,{opened:$,onChange:Be=>{X(Be),Be&&re(e.wip_limit)},position:"bottom",withArrow:!0,shadow:"md",children:[y.jsx(En.Target,{children:y.jsx(mi,{label:ve>0?`WIP ${n.length}/${ve}${xe?" (excedido)":""}`:"Click para limitar WIP",withArrow:!0,children:y.jsx(hi,{size:"xs",variant:xe?"filled":"light",color:xe?"red":ve>0?"yellow":"gray",leftSection:xe?y.jsx(doe,{size:10}):null,style:{cursor:"pointer"},onClick:()=>X(Be=>!Be),children:ve>0?`${n.length}/${ve}`:n.length})})}),y.jsx(En.Dropdown,{p:"xs",children:y.jsxs(ft,{gap:"xs",children:[y.jsx(Ye,{size:"xs",c:"dimmed",children:"Maximo de tarjetas (0 = sin limite)"}),y.jsx(Bh,{size:"xs",value:ee,onChange:re,min:0,max:999,autoFocus:!0,onKeyDown:Be=>{Be.key==="Enter"&&Je(),Be.key==="Escape"&&X(!1)}}),y.jsxs(un,{justify:"flex-end",gap:4,children:[y.jsx(Rt,{size:"xs",variant:"subtle",onClick:()=>X(!1),children:"Cancelar"}),y.jsx(Rt,{size:"xs",onClick:Je,children:"Guardar"})]})]})})]})]}),y.jsx(un,{gap:2,wrap:"nowrap",children:z?y.jsxs(y.Fragment,{children:[y.jsx(Ot,{variant:"subtle",color:"green",size:"sm",onClick:Ze,"aria-label":"Save",children:y.jsx(Vh,{size:14})}),y.jsx(Ot,{variant:"subtle",color:"gray",size:"sm",onClick:()=>{D(e.name),q(!1)},"aria-label":"Cancel",children:y.jsx(hh,{size:14})})]}):y.jsxs(y.Fragment,{children:[i&&y.jsx(mi,{label:Ce?"Expandir":"Colapsar",withArrow:!0,children:y.jsx(Ot,{variant:"subtle",color:"gray",size:"sm",onClick:()=>Pe(Be=>!Be),"aria-label":Ce?"Expandir columna":"Colapsar columna",children:Ce?y.jsx(TS,{size:14}):y.jsx(ES,{size:14})})}),e.is_done&&y.jsx(mi,{label:"Columna Done",withArrow:!0,children:y.jsx(hi,{size:"xs",color:"green",variant:"filled",leftSection:y.jsx(Wh,{size:10}),children:"done"})}),y.jsxs(Hn,{position:"bottom-end",shadow:"md",withArrow:!0,children:[y.jsx(Hn.Target,{children:y.jsx(Ot,{variant:"subtle",color:"gray",size:"sm","aria-label":"Acciones columna",children:y.jsx(LF,{size:14})})}),y.jsxs(Hn.Dropdown,{children:[y.jsx(Hn.Label,{children:"Columna"}),y.jsx(Hn.Item,{leftSection:y.jsx(dse,{size:14}),onClick:()=>{D(e.name),q(!0)},children:"Renombrar"}),y.jsx(Hn.Item,{leftSection:y.jsx(Wh,{size:14}),color:e.is_done?"yellow":"green",onClick:()=>p(e.id,!e.is_done),children:e.is_done?"Quitar marca Done":"Marcar como Done"}),y.jsxs(En,{opened:se,onChange:Be=>{if(ge(Be),Be){const On=ae(e.max_time_minutes||0);ne(On),be(le(e.max_time_minutes||0,On))}},position:"right-start",withArrow:!0,shadow:"md",withinPortal:!1,children:[y.jsx(En.Target,{children:y.jsxs(Hn.Item,{leftSection:y.jsx(jS,{size:14}),"data-test":"column-max-time",closeMenuOnClick:!1,onClick:Be=>{Be.preventDefault(),Be.stopPropagation(),ge(On=>!On)},children:["Tiempo maximo",e.max_time_minutes>0?` (${(()=>{const Be=ae(e.max_time_minutes);return`${le(e.max_time_minutes,Be)} ${d6[Be]}`})()})`:""]})}),y.jsx(En.Dropdown,{p:"xs",onClick:Be=>Be.stopPropagation(),onMouseDown:Be=>Be.stopPropagation(),onDoubleClick:Be=>Be.stopPropagation(),children:y.jsxs(ft,{gap:6,style:{minWidth:240},children:[y.jsx(Ye,{size:"xs",c:"dimmed",children:"Cards que pasen este tiempo se pintaran con borde rojo. 0 = sin limite. Columnas Done no aplican."}),y.jsxs(un,{gap:6,wrap:"nowrap",children:[y.jsx(Bh,{size:"xs",min:0,max:999,value:$e,onChange:be,placeholder:"0",style:{width:90},"data-test":"column-max-time-input"}),y.jsx(ho,{size:"xs",value:_e,onChange:Be=>Be&&ne(Be),data:qCe,style:{width:130},allowDeselect:!1,"data-test":"column-max-time-unit"})]}),y.jsxs(un,{justify:"space-between",gap:6,children:[y.jsx(mi,{label:"Quitar limite",withArrow:!0,disabled:!e.max_time_minutes,children:y.jsx(Ot,{size:"sm",variant:"subtle",color:"red",disabled:!e.max_time_minutes,onClick:()=>{h(e.id,0),be(0),ge(!1)},children:y.jsx(vu,{size:12})})}),y.jsx(Rt,{size:"xs","data-test":"column-max-time-save",onClick:()=>{const Be=typeof $e=="number"?$e:parseInt(String($e),10),gn=(Number.isFinite(Be)&&Be>=0?Be:0)*C$[_e];gn!==e.max_time_minutes&&h(e.id,gn),ge(!1)},children:"Guardar"})]})]})})]}),!e.is_done&&y.jsx(Hn.Item,{leftSection:y.jsx(Ioe,{size:14}),"data-test":"column-random-pick",disabled:n.filter(Be=>!Be.locked).length===0,onClick:()=>d(e.id),children:"Seleccionar Aleatorio"}),y.jsx(Hn.Item,{leftSection:y.jsx(rn,{size:14}),onClick:()=>l(e.id,An?"board":"sidebar"),children:mn}),y.jsx(Hn.Divider,{}),y.jsx(Hn.Item,{leftSection:y.jsx(vu,{size:14}),color:"red",onClick:()=>f(e.id),children:"Borrar columna"})]})]})]})})]}),!(i&&Ce)&&y.jsxs(y.Fragment,{children:[y.jsx(Ua,{style:{flex:1},type:"auto",children:y.jsx(AS,{items:We,strategy:iF,children:y.jsx(ft,{gap:"xs",pb:"xs",style:{minHeight:40},children:n.map(Be=>y.jsx(dW,{card:Be,now:t,onDelete:b,onEdit:v,onDuplicate:w,onChangeColor:k,onShowHistory:_,onToggleLock:x,onAssign:C,onSetDeadline:T,onSetRequester:O,onArchive:E,requesterOptions:M,onOpenCustomColor:N,users:U,assignee:Be.assignee_id?H.get(Be.assignee_id):void 0,inDoneColumn:e.is_done,columnOverdue:!e.is_done&&e.max_time_minutes>0&&Be.time_in_column_ms>e.max_time_minutes*6e4,highlight:P===Be.id,activeSticker:F,onAddSticker:R,onRemoveSticker:L,onMoveSticker:B,onCommitSticker:G},Be.id))})})}),y.jsx(Rt,{variant:"subtle",color:"gray",size:"xs",leftSection:y.jsx(Gh,{size:14}),onClick:()=>r(e.id),mt:"xs",fullWidth:!0,"data-test":"add-card",children:"Anadir tarjeta"})]}),!An&&y.jsx(ye,{onMouseDown:nn,style:{position:"absolute",top:0,right:-3,width:6,height:"100%",cursor:"col-resize",zIndex:5},"aria-label":"Resize column"})]})}const A$=A.memo(HCe),UCe=JSON.parse('[{"id":"people","emojis":["grinning","smiley","smile","grin","laughing","sweat_smile","rolling_on_the_floor_laughing","joy","slightly_smiling_face","upside_down_face","melting_face","wink","blush","innocent","smiling_face_with_3_hearts","heart_eyes","star-struck","kissing_heart","kissing","relaxed","kissing_closed_eyes","kissing_smiling_eyes","smiling_face_with_tear","yum","stuck_out_tongue","stuck_out_tongue_winking_eye","zany_face","stuck_out_tongue_closed_eyes","money_mouth_face","hugging_face","face_with_hand_over_mouth","face_with_open_eyes_and_hand_over_mouth","face_with_peeking_eye","shushing_face","thinking_face","saluting_face","zipper_mouth_face","face_with_raised_eyebrow","neutral_face","expressionless","no_mouth","dotted_line_face","face_in_clouds","smirk","unamused","face_with_rolling_eyes","grimacing","face_exhaling","lying_face","shaking_face","relieved","pensive","sleepy","drooling_face","sleeping","mask","face_with_thermometer","face_with_head_bandage","nauseated_face","face_vomiting","sneezing_face","hot_face","cold_face","woozy_face","dizzy_face","face_with_spiral_eyes","exploding_head","face_with_cowboy_hat","partying_face","disguised_face","sunglasses","nerd_face","face_with_monocle","confused","face_with_diagonal_mouth","worried","slightly_frowning_face","white_frowning_face","open_mouth","hushed","astonished","flushed","pleading_face","face_holding_back_tears","frowning","anguished","fearful","cold_sweat","disappointed_relieved","cry","sob","scream","confounded","persevere","disappointed","sweat","weary","tired_face","yawning_face","triumph","rage","angry","face_with_symbols_on_mouth","smiling_imp","imp","skull","skull_and_crossbones","hankey","clown_face","japanese_ogre","japanese_goblin","ghost","alien","space_invader","wave","raised_back_of_hand","raised_hand_with_fingers_splayed","hand","spock-hand","rightwards_hand","leftwards_hand","palm_down_hand","palm_up_hand","leftwards_pushing_hand","rightwards_pushing_hand","ok_hand","pinched_fingers","pinching_hand","v","crossed_fingers","hand_with_index_finger_and_thumb_crossed","i_love_you_hand_sign","the_horns","call_me_hand","point_left","point_right","point_up_2","middle_finger","point_down","point_up","index_pointing_at_the_viewer","+1","-1","fist","facepunch","left-facing_fist","right-facing_fist","clap","raised_hands","heart_hands","open_hands","palms_up_together","handshake","pray","writing_hand","nail_care","selfie","muscle","mechanical_arm","mechanical_leg","leg","foot","ear","ear_with_hearing_aid","nose","brain","anatomical_heart","lungs","tooth","bone","eyes","eye","tongue","lips","biting_lip","baby","child","boy","girl","adult","person_with_blond_hair","man","bearded_person","man_with_beard","woman_with_beard","red_haired_man","curly_haired_man","white_haired_man","bald_man","woman","red_haired_woman","red_haired_person","curly_haired_woman","curly_haired_person","white_haired_woman","white_haired_person","bald_woman","bald_person","blond-haired-woman","blond-haired-man","older_adult","older_man","older_woman","person_frowning","man-frowning","woman-frowning","person_with_pouting_face","man-pouting","woman-pouting","no_good","man-gesturing-no","woman-gesturing-no","ok_woman","man-gesturing-ok","woman-gesturing-ok","information_desk_person","man-tipping-hand","woman-tipping-hand","raising_hand","man-raising-hand","woman-raising-hand","deaf_person","deaf_man","deaf_woman","bow","man-bowing","woman-bowing","face_palm","man-facepalming","woman-facepalming","shrug","man-shrugging","woman-shrugging","health_worker","male-doctor","female-doctor","student","male-student","female-student","teacher","male-teacher","female-teacher","judge","male-judge","female-judge","farmer","male-farmer","female-farmer","cook","male-cook","female-cook","mechanic","male-mechanic","female-mechanic","factory_worker","male-factory-worker","female-factory-worker","office_worker","male-office-worker","female-office-worker","scientist","male-scientist","female-scientist","technologist","male-technologist","female-technologist","singer","male-singer","female-singer","artist","male-artist","female-artist","pilot","male-pilot","female-pilot","astronaut","male-astronaut","female-astronaut","firefighter","male-firefighter","female-firefighter","cop","male-police-officer","female-police-officer","sleuth_or_spy","male-detective","female-detective","guardsman","male-guard","female-guard","ninja","construction_worker","male-construction-worker","female-construction-worker","person_with_crown","prince","princess","man_with_turban","man-wearing-turban","woman-wearing-turban","man_with_gua_pi_mao","person_with_headscarf","person_in_tuxedo","man_in_tuxedo","woman_in_tuxedo","bride_with_veil","man_with_veil","woman_with_veil","pregnant_woman","pregnant_man","pregnant_person","breast-feeding","woman_feeding_baby","man_feeding_baby","person_feeding_baby","angel","santa","mrs_claus","mx_claus","superhero","male_superhero","female_superhero","supervillain","male_supervillain","female_supervillain","mage","male_mage","female_mage","fairy","male_fairy","female_fairy","vampire","male_vampire","female_vampire","merperson","merman","mermaid","elf","male_elf","female_elf","genie","male_genie","female_genie","zombie","male_zombie","female_zombie","troll","massage","man-getting-massage","woman-getting-massage","haircut","man-getting-haircut","woman-getting-haircut","walking","man-walking","woman-walking","standing_person","man_standing","woman_standing","kneeling_person","man_kneeling","woman_kneeling","person_with_probing_cane","man_with_probing_cane","woman_with_probing_cane","person_in_motorized_wheelchair","man_in_motorized_wheelchair","woman_in_motorized_wheelchair","person_in_manual_wheelchair","man_in_manual_wheelchair","woman_in_manual_wheelchair","runner","man-running","woman-running","dancer","man_dancing","man_in_business_suit_levitating","dancers","men-with-bunny-ears-partying","women-with-bunny-ears-partying","person_in_steamy_room","man_in_steamy_room","woman_in_steamy_room","person_climbing","man_climbing","woman_climbing","fencer","horse_racing","skier","snowboarder","golfer","man-golfing","woman-golfing","surfer","man-surfing","woman-surfing","rowboat","man-rowing-boat","woman-rowing-boat","swimmer","man-swimming","woman-swimming","person_with_ball","man-bouncing-ball","woman-bouncing-ball","weight_lifter","man-lifting-weights","woman-lifting-weights","bicyclist","man-biking","woman-biking","mountain_bicyclist","man-mountain-biking","woman-mountain-biking","person_doing_cartwheel","man-cartwheeling","woman-cartwheeling","wrestlers","man-wrestling","woman-wrestling","water_polo","man-playing-water-polo","woman-playing-water-polo","handball","man-playing-handball","woman-playing-handball","juggling","man-juggling","woman-juggling","person_in_lotus_position","man_in_lotus_position","woman_in_lotus_position","bath","sleeping_accommodation","people_holding_hands","two_women_holding_hands","man_and_woman_holding_hands","two_men_holding_hands","couplekiss","woman-kiss-man","man-kiss-man","woman-kiss-woman","couple_with_heart","woman-heart-man","man-heart-man","woman-heart-woman","family","man-woman-boy","man-woman-girl","man-woman-girl-boy","man-woman-boy-boy","man-woman-girl-girl","man-man-boy","man-man-girl","man-man-girl-boy","man-man-boy-boy","man-man-girl-girl","woman-woman-boy","woman-woman-girl","woman-woman-girl-boy","woman-woman-boy-boy","woman-woman-girl-girl","man-boy","man-boy-boy","man-girl","man-girl-boy","man-girl-girl","woman-boy","woman-boy-boy","woman-girl","woman-girl-boy","woman-girl-girl","speaking_head_in_silhouette","bust_in_silhouette","busts_in_silhouette","people_hugging","footprints","robot_face","smiley_cat","smile_cat","joy_cat","heart_eyes_cat","smirk_cat","kissing_cat","scream_cat","crying_cat_face","pouting_cat","see_no_evil","hear_no_evil","speak_no_evil","love_letter","cupid","gift_heart","sparkling_heart","heartpulse","heartbeat","revolving_hearts","two_hearts","heart_decoration","heavy_heart_exclamation_mark_ornament","broken_heart","heart_on_fire","mending_heart","heart","pink_heart","orange_heart","yellow_heart","green_heart","blue_heart","light_blue_heart","purple_heart","brown_heart","black_heart","grey_heart","white_heart","kiss","100","anger","boom","dizzy","sweat_drops","dash","hole","speech_balloon","eye-in-speech-bubble","left_speech_bubble","right_anger_bubble","thought_balloon","zzz"]},{"id":"nature","emojis":["monkey_face","monkey","gorilla","orangutan","dog","dog2","guide_dog","service_dog","poodle","wolf","fox_face","raccoon","cat","cat2","black_cat","lion_face","tiger","tiger2","leopard","horse","moose","donkey","racehorse","unicorn_face","zebra_face","deer","bison","cow","ox","water_buffalo","cow2","pig","pig2","boar","pig_nose","ram","sheep","goat","dromedary_camel","camel","llama","giraffe_face","elephant","mammoth","rhinoceros","hippopotamus","mouse","mouse2","rat","hamster","rabbit","rabbit2","chipmunk","beaver","hedgehog","bat","bear","polar_bear","koala","panda_face","sloth","otter","skunk","kangaroo","badger","feet","turkey","chicken","rooster","hatching_chick","baby_chick","hatched_chick","bird","penguin","dove_of_peace","eagle","duck","swan","owl","dodo","feather","flamingo","peacock","parrot","wing","black_bird","goose","frog","crocodile","turtle","lizard","snake","dragon_face","dragon","sauropod","t-rex","whale","whale2","dolphin","seal","fish","tropical_fish","blowfish","shark","octopus","shell","coral","jellyfish","snail","butterfly","bug","ant","bee","beetle","ladybug","cricket","cockroach","spider","spider_web","scorpion","mosquito","fly","worm","microbe","bouquet","cherry_blossom","white_flower","lotus","rosette","rose","wilted_flower","hibiscus","sunflower","blossom","tulip","hyacinth","seedling","potted_plant","evergreen_tree","deciduous_tree","palm_tree","cactus","ear_of_rice","herb","shamrock","four_leaf_clover","maple_leaf","fallen_leaf","leaves","empty_nest","nest_with_eggs","mushroom"]},{"id":"foods","emojis":["grapes","melon","watermelon","tangerine","lemon","banana","pineapple","mango","apple","green_apple","pear","peach","cherries","strawberry","blueberries","kiwifruit","tomato","olive","coconut","avocado","eggplant","potato","carrot","corn","hot_pepper","bell_pepper","cucumber","leafy_green","broccoli","garlic","onion","peanuts","beans","chestnut","ginger_root","pea_pod","bread","croissant","baguette_bread","flatbread","pretzel","bagel","pancakes","waffle","cheese_wedge","meat_on_bone","poultry_leg","cut_of_meat","bacon","hamburger","fries","pizza","hotdog","sandwich","taco","burrito","tamale","stuffed_flatbread","falafel","egg","fried_egg","shallow_pan_of_food","stew","fondue","bowl_with_spoon","green_salad","popcorn","butter","salt","canned_food","bento","rice_cracker","rice_ball","rice","curry","ramen","spaghetti","sweet_potato","oden","sushi","fried_shrimp","fish_cake","moon_cake","dango","dumpling","fortune_cookie","takeout_box","crab","lobster","shrimp","squid","oyster","icecream","shaved_ice","ice_cream","doughnut","cookie","birthday","cake","cupcake","pie","chocolate_bar","candy","lollipop","custard","honey_pot","baby_bottle","glass_of_milk","coffee","teapot","tea","sake","champagne","wine_glass","cocktail","tropical_drink","beer","beers","clinking_glasses","tumbler_glass","pouring_liquid","cup_with_straw","bubble_tea","beverage_box","mate_drink","ice_cube","chopsticks","knife_fork_plate","fork_and_knife","spoon","hocho","jar","amphora"]},{"id":"activity","emojis":["jack_o_lantern","christmas_tree","fireworks","sparkler","firecracker","sparkles","balloon","tada","confetti_ball","tanabata_tree","bamboo","dolls","flags","wind_chime","rice_scene","red_envelope","ribbon","gift","reminder_ribbon","admission_tickets","ticket","medal","trophy","sports_medal","first_place_medal","second_place_medal","third_place_medal","soccer","baseball","softball","basketball","volleyball","football","rugby_football","tennis","flying_disc","bowling","cricket_bat_and_ball","field_hockey_stick_and_ball","ice_hockey_stick_and_puck","lacrosse","table_tennis_paddle_and_ball","badminton_racquet_and_shuttlecock","boxing_glove","martial_arts_uniform","goal_net","golf","ice_skate","fishing_pole_and_fish","diving_mask","running_shirt_with_sash","ski","sled","curling_stone","dart","yo-yo","kite","gun","8ball","crystal_ball","magic_wand","video_game","joystick","slot_machine","game_die","jigsaw","teddy_bear","pinata","mirror_ball","nesting_dolls","spades","hearts","diamonds","clubs","chess_pawn","black_joker","mahjong","flower_playing_cards","performing_arts","frame_with_picture","art","thread","sewing_needle","yarn","knot"]},{"id":"places","emojis":["earth_africa","earth_americas","earth_asia","globe_with_meridians","world_map","japan","compass","snow_capped_mountain","mountain","volcano","mount_fuji","camping","beach_with_umbrella","desert","desert_island","national_park","stadium","classical_building","building_construction","bricks","rock","wood","hut","house_buildings","derelict_house_building","house","house_with_garden","office","post_office","european_post_office","hospital","bank","hotel","love_hotel","convenience_store","school","department_store","factory","japanese_castle","european_castle","wedding","tokyo_tower","statue_of_liberty","church","mosque","hindu_temple","synagogue","shinto_shrine","kaaba","fountain","tent","foggy","night_with_stars","cityscape","sunrise_over_mountains","sunrise","city_sunset","city_sunrise","bridge_at_night","hotsprings","carousel_horse","playground_slide","ferris_wheel","roller_coaster","barber","circus_tent","steam_locomotive","railway_car","bullettrain_side","bullettrain_front","train2","metro","light_rail","station","tram","monorail","mountain_railway","train","bus","oncoming_bus","trolleybus","minibus","ambulance","fire_engine","police_car","oncoming_police_car","taxi","oncoming_taxi","car","oncoming_automobile","blue_car","pickup_truck","truck","articulated_lorry","tractor","racing_car","racing_motorcycle","motor_scooter","manual_wheelchair","motorized_wheelchair","auto_rickshaw","bike","scooter","skateboard","roller_skate","busstop","motorway","railway_track","oil_drum","fuelpump","wheel","rotating_light","traffic_light","vertical_traffic_light","octagonal_sign","construction","anchor","ring_buoy","boat","canoe","speedboat","passenger_ship","ferry","motor_boat","ship","airplane","small_airplane","airplane_departure","airplane_arriving","parachute","seat","helicopter","suspension_railway","mountain_cableway","aerial_tramway","satellite","rocket","flying_saucer","bellhop_bell","luggage","hourglass","hourglass_flowing_sand","watch","alarm_clock","stopwatch","timer_clock","mantelpiece_clock","clock12","clock1230","clock1","clock130","clock2","clock230","clock3","clock330","clock4","clock430","clock5","clock530","clock6","clock630","clock7","clock730","clock8","clock830","clock9","clock930","clock10","clock1030","clock11","clock1130","new_moon","waxing_crescent_moon","first_quarter_moon","moon","full_moon","waning_gibbous_moon","last_quarter_moon","waning_crescent_moon","crescent_moon","new_moon_with_face","first_quarter_moon_with_face","last_quarter_moon_with_face","thermometer","sunny","full_moon_with_face","sun_with_face","ringed_planet","star","star2","stars","milky_way","cloud","partly_sunny","thunder_cloud_and_rain","mostly_sunny","barely_sunny","partly_sunny_rain","rain_cloud","snow_cloud","lightning","tornado","fog","wind_blowing_face","cyclone","rainbow","closed_umbrella","umbrella","umbrella_with_rain_drops","umbrella_on_ground","zap","snowflake","snowman","snowman_without_snow","comet","fire","droplet","ocean"]},{"id":"objects","emojis":["eyeglasses","dark_sunglasses","goggles","lab_coat","safety_vest","necktie","shirt","jeans","scarf","gloves","coat","socks","dress","kimono","sari","one-piece_swimsuit","briefs","shorts","bikini","womans_clothes","folding_hand_fan","purse","handbag","pouch","shopping_bags","school_satchel","thong_sandal","mans_shoe","athletic_shoe","hiking_boot","womans_flat_shoe","high_heel","sandal","ballet_shoes","boot","hair_pick","crown","womans_hat","tophat","mortar_board","billed_cap","military_helmet","helmet_with_white_cross","prayer_beads","lipstick","ring","gem","mute","speaker","sound","loud_sound","loudspeaker","mega","postal_horn","bell","no_bell","musical_score","musical_note","notes","studio_microphone","level_slider","control_knobs","microphone","headphones","radio","saxophone","accordion","guitar","musical_keyboard","trumpet","violin","banjo","drum_with_drumsticks","long_drum","maracas","flute","iphone","calling","phone","telephone_receiver","pager","fax","battery","low_battery","electric_plug","computer","desktop_computer","printer","keyboard","three_button_mouse","trackball","minidisc","floppy_disk","cd","dvd","abacus","movie_camera","film_frames","film_projector","clapper","tv","camera","camera_with_flash","video_camera","vhs","mag","mag_right","candle","bulb","flashlight","izakaya_lantern","diya_lamp","notebook_with_decorative_cover","closed_book","book","green_book","blue_book","orange_book","books","notebook","ledger","page_with_curl","scroll","page_facing_up","newspaper","rolled_up_newspaper","bookmark_tabs","bookmark","label","moneybag","coin","yen","dollar","euro","pound","money_with_wings","credit_card","receipt","chart","email","e-mail","incoming_envelope","envelope_with_arrow","outbox_tray","inbox_tray","package","mailbox","mailbox_closed","mailbox_with_mail","mailbox_with_no_mail","postbox","ballot_box_with_ballot","pencil2","black_nib","lower_left_fountain_pen","lower_left_ballpoint_pen","lower_left_paintbrush","lower_left_crayon","memo","briefcase","file_folder","open_file_folder","card_index_dividers","date","calendar","spiral_note_pad","spiral_calendar_pad","card_index","chart_with_upwards_trend","chart_with_downwards_trend","bar_chart","clipboard","pushpin","round_pushpin","paperclip","linked_paperclips","straight_ruler","triangular_ruler","scissors","card_file_box","file_cabinet","wastebasket","lock","unlock","lock_with_ink_pen","closed_lock_with_key","key","old_key","hammer","axe","pick","hammer_and_pick","hammer_and_wrench","dagger_knife","crossed_swords","bomb","boomerang","bow_and_arrow","shield","carpentry_saw","wrench","screwdriver","nut_and_bolt","gear","compression","scales","probing_cane","link","chains","hook","toolbox","magnet","ladder","alembic","test_tube","petri_dish","dna","microscope","telescope","satellite_antenna","syringe","drop_of_blood","pill","adhesive_bandage","crutch","stethoscope","x-ray","door","elevator","mirror","window","bed","couch_and_lamp","chair","toilet","plunger","shower","bathtub","mouse_trap","razor","lotion_bottle","safety_pin","broom","basket","roll_of_paper","bucket","soap","bubbles","toothbrush","sponge","fire_extinguisher","shopping_trolley","smoking","coffin","headstone","funeral_urn","nazar_amulet","hamsa","moyai","placard","identification_card"]},{"id":"symbols","emojis":["atm","put_litter_in_its_place","potable_water","wheelchair","mens","womens","restroom","baby_symbol","wc","passport_control","customs","baggage_claim","left_luggage","warning","children_crossing","no_entry","no_entry_sign","no_bicycles","no_smoking","do_not_litter","non-potable_water","no_pedestrians","no_mobile_phones","underage","radioactive_sign","biohazard_sign","arrow_up","arrow_upper_right","arrow_right","arrow_lower_right","arrow_down","arrow_lower_left","arrow_left","arrow_upper_left","arrow_up_down","left_right_arrow","leftwards_arrow_with_hook","arrow_right_hook","arrow_heading_up","arrow_heading_down","arrows_clockwise","arrows_counterclockwise","back","end","on","soon","top","place_of_worship","atom_symbol","om_symbol","star_of_david","wheel_of_dharma","yin_yang","latin_cross","orthodox_cross","star_and_crescent","peace_symbol","menorah_with_nine_branches","six_pointed_star","khanda","aries","taurus","gemini","cancer","leo","virgo","libra","scorpius","sagittarius","capricorn","aquarius","pisces","ophiuchus","twisted_rightwards_arrows","repeat","repeat_one","arrow_forward","fast_forward","black_right_pointing_double_triangle_with_vertical_bar","black_right_pointing_triangle_with_double_vertical_bar","arrow_backward","rewind","black_left_pointing_double_triangle_with_vertical_bar","arrow_up_small","arrow_double_up","arrow_down_small","arrow_double_down","double_vertical_bar","black_square_for_stop","black_circle_for_record","eject","cinema","low_brightness","high_brightness","signal_strength","wireless","vibration_mode","mobile_phone_off","female_sign","male_sign","transgender_symbol","heavy_multiplication_x","heavy_plus_sign","heavy_minus_sign","heavy_division_sign","heavy_equals_sign","infinity","bangbang","interrobang","question","grey_question","grey_exclamation","exclamation","wavy_dash","currency_exchange","heavy_dollar_sign","medical_symbol","recycle","fleur_de_lis","trident","name_badge","beginner","o","white_check_mark","ballot_box_with_check","heavy_check_mark","x","negative_squared_cross_mark","curly_loop","loop","part_alternation_mark","eight_spoked_asterisk","eight_pointed_black_star","sparkle","copyright","registered","tm","hash","keycap_star","zero","one","two","three","four","five","six","seven","eight","nine","keycap_ten","capital_abcd","abcd","1234","symbols","abc","a","ab","b","cl","cool","free","information_source","id","m","new","ng","o2","ok","parking","sos","up","vs","koko","sa","u6708","u6709","u6307","ideograph_advantage","u5272","u7121","u7981","accept","u7533","u5408","u7a7a","congratulations","secret","u55b6","u6e80","red_circle","large_orange_circle","large_yellow_circle","large_green_circle","large_blue_circle","large_purple_circle","large_brown_circle","black_circle","white_circle","large_red_square","large_orange_square","large_yellow_square","large_green_square","large_blue_square","large_purple_square","large_brown_square","black_large_square","white_large_square","black_medium_square","white_medium_square","black_medium_small_square","white_medium_small_square","black_small_square","white_small_square","large_orange_diamond","large_blue_diamond","small_orange_diamond","small_blue_diamond","small_red_triangle","small_red_triangle_down","diamond_shape_with_a_dot_inside","radio_button","white_square_button","black_square_button"]},{"id":"flags","emojis":["checkered_flag","cn","crossed_flags","de","es","flag-ac","flag-ad","flag-ae","flag-af","flag-ag","flag-ai","flag-al","flag-am","flag-ao","flag-aq","flag-ar","flag-as","flag-at","flag-au","flag-aw","flag-ax","flag-az","flag-ba","flag-bb","flag-bd","flag-be","flag-bf","flag-bg","flag-bh","flag-bi","flag-bj","flag-bl","flag-bm","flag-bn","flag-bo","flag-bq","flag-br","flag-bs","flag-bt","flag-bv","flag-bw","flag-by","flag-bz","flag-ca","flag-cc","flag-cd","flag-cf","flag-cg","flag-ch","flag-ci","flag-ck","flag-cl","flag-cm","flag-co","flag-cp","flag-cr","flag-cu","flag-cv","flag-cw","flag-cx","flag-cy","flag-cz","flag-dg","flag-dj","flag-dk","flag-dm","flag-do","flag-dz","flag-ea","flag-ec","flag-ee","flag-eg","flag-eh","flag-england","flag-er","flag-et","flag-eu","flag-fi","flag-fj","flag-fk","flag-fm","flag-fo","flag-ga","flag-gd","flag-ge","flag-gf","flag-gg","flag-gh","flag-gi","flag-gl","flag-gm","flag-gn","flag-gp","flag-gq","flag-gr","flag-gs","flag-gt","flag-gu","flag-gw","flag-gy","flag-hk","flag-hm","flag-hn","flag-hr","flag-ht","flag-hu","flag-ic","flag-id","flag-ie","flag-il","flag-im","flag-in","flag-io","flag-iq","flag-ir","flag-is","flag-je","flag-jm","flag-jo","flag-ke","flag-kg","flag-kh","flag-ki","flag-km","flag-kn","flag-kp","flag-kw","flag-ky","flag-kz","flag-la","flag-lb","flag-lc","flag-li","flag-lk","flag-lr","flag-ls","flag-lt","flag-lu","flag-lv","flag-ly","flag-ma","flag-mc","flag-md","flag-me","flag-mf","flag-mg","flag-mh","flag-mk","flag-ml","flag-mm","flag-mn","flag-mo","flag-mp","flag-mq","flag-mr","flag-ms","flag-mt","flag-mu","flag-mv","flag-mw","flag-mx","flag-my","flag-mz","flag-na","flag-nc","flag-ne","flag-nf","flag-ng","flag-ni","flag-nl","flag-no","flag-np","flag-nr","flag-nu","flag-nz","flag-om","flag-pa","flag-pe","flag-pf","flag-pg","flag-ph","flag-pk","flag-pl","flag-pm","flag-pn","flag-pr","flag-ps","flag-pt","flag-pw","flag-py","flag-qa","flag-re","flag-ro","flag-rs","flag-rw","flag-sa","flag-sb","flag-sc","flag-scotland","flag-sd","flag-se","flag-sg","flag-sh","flag-si","flag-sj","flag-sk","flag-sl","flag-sm","flag-sn","flag-so","flag-sr","flag-ss","flag-st","flag-sv","flag-sx","flag-sy","flag-sz","flag-ta","flag-tc","flag-td","flag-tf","flag-tg","flag-th","flag-tj","flag-tk","flag-tl","flag-tm","flag-tn","flag-to","flag-tr","flag-tt","flag-tv","flag-tw","flag-tz","flag-ua","flag-ug","flag-um","flag-un","flag-uy","flag-uz","flag-va","flag-vc","flag-ve","flag-vg","flag-vi","flag-vn","flag-vu","flag-wales","flag-wf","flag-ws","flag-xk","flag-ye","flag-yt","flag-za","flag-zm","flag-zw","fr","gb","it","jp","kr","pirate_flag","rainbow-flag","ru","transgender_flag","triangular_flag_on_post","us","waving_black_flag","waving_white_flag"]}]'),VCe=JSON.parse(`{"100":{"id":"100","name":"Hundred Points","keywords":["100","score","perfect","numbers","century","exam","quiz","test","pass"],"skins":[{"unified":"1f4af","native":"💯"}],"version":1},"1234":{"id":"1234","name":"Input Numbers","keywords":["1234","blue","square","1","2","3","4"],"skins":[{"unified":"1f522","native":"🔢"}],"version":1},"grinning":{"id":"grinning","name":"Grinning Face","emoticons":[":D"],"keywords":["smile","happy","joy",":D","grin"],"skins":[{"unified":"1f600","native":"😀"}],"version":1},"smiley":{"id":"smiley","name":"Grinning Face with Big Eyes","emoticons":[":)","=)","=-)"],"keywords":["smiley","happy","joy","haha",":D",":)","smile","funny"],"skins":[{"unified":"1f603","native":"😃"}],"version":1},"smile":{"id":"smile","name":"Grinning Face with Smiling Eyes","emoticons":[":)","C:","c:",":D",":-D"],"keywords":["smile","happy","joy","funny","haha","laugh","like",":D",":)"],"skins":[{"unified":"1f604","native":"😄"}],"version":1},"grin":{"id":"grin","name":"Beaming Face with Smiling Eyes","keywords":["grin","happy","smile","joy","kawaii"],"skins":[{"unified":"1f601","native":"😁"}],"version":1},"laughing":{"id":"laughing","name":"Grinning Squinting Face","emoticons":[":>",":->"],"keywords":["laughing","satisfied","happy","joy","lol","haha","glad","XD","laugh"],"skins":[{"unified":"1f606","native":"😆"}],"version":1},"sweat_smile":{"id":"sweat_smile","name":"Grinning Face with Sweat","keywords":["smile","hot","happy","laugh","relief"],"skins":[{"unified":"1f605","native":"😅"}],"version":1},"rolling_on_the_floor_laughing":{"id":"rolling_on_the_floor_laughing","name":"Rolling on the Floor Laughing","keywords":["face","lol","haha","rofl"],"skins":[{"unified":"1f923","native":"🤣"}],"version":3},"joy":{"id":"joy","name":"Face with Tears of Joy","keywords":["cry","weep","happy","happytears","haha"],"skins":[{"unified":"1f602","native":"😂"}],"version":1},"slightly_smiling_face":{"id":"slightly_smiling_face","name":"Slightly Smiling Face","emoticons":[":)","(:",":-)"],"keywords":["smile"],"skins":[{"unified":"1f642","native":"🙂"}],"version":1},"upside_down_face":{"id":"upside_down_face","name":"Upside-Down Face","keywords":["upside","down","flipped","silly","smile"],"skins":[{"unified":"1f643","native":"🙃"}],"version":1},"melting_face":{"id":"melting_face","name":"Melting Face","keywords":["hot","heat"],"skins":[{"unified":"1fae0","native":"🫠"}],"version":14},"wink":{"id":"wink","name":"Winking Face","emoticons":[";)",";-)"],"keywords":["wink","happy","mischievous","secret",";)","smile","eye"],"skins":[{"unified":"1f609","native":"😉"}],"version":1},"blush":{"id":"blush","name":"Smiling Face with Smiling Eyes","emoticons":[":)"],"keywords":["blush","smile","happy","flushed","crush","embarrassed","shy","joy"],"skins":[{"unified":"1f60a","native":"😊"}],"version":1},"innocent":{"id":"innocent","name":"Smiling Face with Halo","keywords":["innocent","angel","heaven"],"skins":[{"unified":"1f607","native":"😇"}],"version":1},"smiling_face_with_3_hearts":{"id":"smiling_face_with_3_hearts","name":"Smiling Face with Hearts","keywords":["3","love","like","affection","valentines","infatuation","crush","adore"],"skins":[{"unified":"1f970","native":"🥰"}],"version":11},"heart_eyes":{"id":"heart_eyes","name":"Smiling Face with Heart-Eyes","keywords":["heart","eyes","love","like","affection","valentines","infatuation","crush"],"skins":[{"unified":"1f60d","native":"😍"}],"version":1},"star-struck":{"id":"star-struck","name":"Star-Struck","keywords":["star","struck","grinning","face","with","eyes","smile","starry"],"skins":[{"unified":"1f929","native":"🤩"}],"version":5},"kissing_heart":{"id":"kissing_heart","name":"Face Blowing a Kiss","emoticons":[":*",":-*"],"keywords":["kissing","heart","love","like","affection","valentines","infatuation"],"skins":[{"unified":"1f618","native":"😘"}],"version":1},"kissing":{"id":"kissing","name":"Kissing Face","keywords":["love","like","3","valentines","infatuation","kiss"],"skins":[{"unified":"1f617","native":"😗"}],"version":1},"relaxed":{"id":"relaxed","name":"Smiling Face","keywords":["relaxed","blush","massage","happiness"],"skins":[{"unified":"263a-fe0f","native":"☺️"}],"version":1},"kissing_closed_eyes":{"id":"kissing_closed_eyes","name":"Kissing Face with Closed Eyes","keywords":["love","like","affection","valentines","infatuation","kiss"],"skins":[{"unified":"1f61a","native":"😚"}],"version":1},"kissing_smiling_eyes":{"id":"kissing_smiling_eyes","name":"Kissing Face with Smiling Eyes","keywords":["affection","valentines","infatuation","kiss"],"skins":[{"unified":"1f619","native":"😙"}],"version":1},"smiling_face_with_tear":{"id":"smiling_face_with_tear","name":"Smiling Face with Tear","keywords":["sad","cry","pretend"],"skins":[{"unified":"1f972","native":"🥲"}],"version":13},"yum":{"id":"yum","name":"Face Savoring Food","keywords":["yum","happy","joy","tongue","smile","silly","yummy","nom","delicious","savouring"],"skins":[{"unified":"1f60b","native":"😋"}],"version":1},"stuck_out_tongue":{"id":"stuck_out_tongue","name":"Face with Tongue","emoticons":[":p",":-p",":P",":-P",":b",":-b"],"keywords":["stuck","out","prank","childish","playful","mischievous","smile"],"skins":[{"unified":"1f61b","native":"😛"}],"version":1},"stuck_out_tongue_winking_eye":{"id":"stuck_out_tongue_winking_eye","name":"Winking Face with Tongue","emoticons":[";p",";-p",";b",";-b",";P",";-P"],"keywords":["stuck","out","eye","prank","childish","playful","mischievous","smile","wink"],"skins":[{"unified":"1f61c","native":"😜"}],"version":1},"zany_face":{"id":"zany_face","name":"Zany Face","keywords":["grinning","with","one","large","and","small","eye","goofy","crazy"],"skins":[{"unified":"1f92a","native":"🤪"}],"version":5},"stuck_out_tongue_closed_eyes":{"id":"stuck_out_tongue_closed_eyes","name":"Squinting Face with Tongue","keywords":["stuck","out","closed","eyes","prank","playful","mischievous","smile"],"skins":[{"unified":"1f61d","native":"😝"}],"version":1},"money_mouth_face":{"id":"money_mouth_face","name":"Money-Mouth Face","keywords":["money","mouth","rich","dollar"],"skins":[{"unified":"1f911","native":"🤑"}],"version":1},"hugging_face":{"id":"hugging_face","name":"Hugging Face","keywords":["smile","hug"],"skins":[{"unified":"1f917","native":"🤗"}],"version":1},"face_with_hand_over_mouth":{"id":"face_with_hand_over_mouth","name":"Face with Hand over Mouth","keywords":["smiling","eyes","and","covering","whoops","shock","surprise"],"skins":[{"unified":"1f92d","native":"🤭"}],"version":5},"face_with_open_eyes_and_hand_over_mouth":{"id":"face_with_open_eyes_and_hand_over_mouth","name":"Face with Open Eyes and Hand over Mouth","keywords":["silence","secret","shock","surprise"],"skins":[{"unified":"1fae2","native":"🫢"}],"version":14},"face_with_peeking_eye":{"id":"face_with_peeking_eye","name":"Face with Peeking Eye","keywords":["scared","frightening","embarrassing","shy"],"skins":[{"unified":"1fae3","native":"🫣"}],"version":14},"shushing_face":{"id":"shushing_face","name":"Shushing Face","keywords":["with","finger","covering","closed","lips","quiet","shhh"],"skins":[{"unified":"1f92b","native":"🤫"}],"version":5},"thinking_face":{"id":"thinking_face","name":"Thinking Face","keywords":["hmmm","think","consider"],"skins":[{"unified":"1f914","native":"🤔"}],"version":1},"saluting_face":{"id":"saluting_face","name":"Saluting Face","keywords":["respect","salute"],"skins":[{"unified":"1fae1","native":"🫡"}],"version":14},"zipper_mouth_face":{"id":"zipper_mouth_face","name":"Zipper-Mouth Face","keywords":["zipper","mouth","sealed","secret"],"skins":[{"unified":"1f910","native":"🤐"}],"version":1},"face_with_raised_eyebrow":{"id":"face_with_raised_eyebrow","name":"Face with Raised Eyebrow","keywords":["one","distrust","scepticism","disapproval","disbelief","surprise"],"skins":[{"unified":"1f928","native":"🤨"}],"version":5},"neutral_face":{"id":"neutral_face","name":"Neutral Face","emoticons":[":|",":-|"],"keywords":["indifference","meh",":",""],"skins":[{"unified":"1f610","native":"😐"}],"version":1},"expressionless":{"id":"expressionless","name":"Expressionless Face","emoticons":["-_-"],"keywords":["indifferent","-","","meh","deadpan"],"skins":[{"unified":"1f611","native":"😑"}],"version":1},"no_mouth":{"id":"no_mouth","name":"Face Without Mouth","keywords":["no","hellokitty"],"skins":[{"unified":"1f636","native":"😶"}],"version":1},"dotted_line_face":{"id":"dotted_line_face","name":"Dotted Line Face","keywords":["invisible","lonely","isolation","depression"],"skins":[{"unified":"1fae5","native":"🫥"}],"version":14},"face_in_clouds":{"id":"face_in_clouds","name":"Face in Clouds","keywords":["shower","steam","dream"],"skins":[{"unified":"1f636-200d-1f32b-fe0f","native":"😶‍🌫️"}],"version":13.1},"smirk":{"id":"smirk","name":"Smirking Face","keywords":["smirk","smile","mean","prank","smug","sarcasm"],"skins":[{"unified":"1f60f","native":"😏"}],"version":1},"unamused":{"id":"unamused","name":"Unamused Face","emoticons":[":("],"keywords":["indifference","bored","straight","serious","sarcasm","unimpressed","skeptical","dubious","side","eye"],"skins":[{"unified":"1f612","native":"😒"}],"version":1},"face_with_rolling_eyes":{"id":"face_with_rolling_eyes","name":"Face with Rolling Eyes","keywords":["eyeroll","frustrated"],"skins":[{"unified":"1f644","native":"🙄"}],"version":1},"grimacing":{"id":"grimacing","name":"Grimacing Face","keywords":["grimace","teeth"],"skins":[{"unified":"1f62c","native":"😬"}],"version":1},"face_exhaling":{"id":"face_exhaling","name":"Face Exhaling","keywords":["relieve","relief","tired","sigh"],"skins":[{"unified":"1f62e-200d-1f4a8","native":"😮‍💨"}],"version":13.1},"lying_face":{"id":"lying_face","name":"Lying Face","keywords":["lie","pinocchio"],"skins":[{"unified":"1f925","native":"🤥"}],"version":3},"shaking_face":{"id":"shaking_face","name":"Shaking Face","keywords":["dizzy","shock","blurry","earthquake"],"skins":[{"unified":"1fae8","native":"🫨"}],"version":15},"relieved":{"id":"relieved","name":"Relieved Face","keywords":["relaxed","phew","massage","happiness"],"skins":[{"unified":"1f60c","native":"😌"}],"version":1},"pensive":{"id":"pensive","name":"Pensive Face","keywords":["sad","depressed","upset"],"skins":[{"unified":"1f614","native":"😔"}],"version":1},"sleepy":{"id":"sleepy","name":"Sleepy Face","keywords":["tired","rest","nap"],"skins":[{"unified":"1f62a","native":"😪"}],"version":1},"drooling_face":{"id":"drooling_face","name":"Drooling Face","keywords":[],"skins":[{"unified":"1f924","native":"🤤"}],"version":3},"sleeping":{"id":"sleeping","name":"Sleeping Face","keywords":["tired","sleepy","night","zzz"],"skins":[{"unified":"1f634","native":"😴"}],"version":1},"mask":{"id":"mask","name":"Face with Medical Mask","keywords":["sick","ill","disease","covid"],"skins":[{"unified":"1f637","native":"😷"}],"version":1},"face_with_thermometer":{"id":"face_with_thermometer","name":"Face with Thermometer","keywords":["sick","temperature","cold","fever","covid"],"skins":[{"unified":"1f912","native":"🤒"}],"version":1},"face_with_head_bandage":{"id":"face_with_head_bandage","name":"Face with Head-Bandage","keywords":["head","bandage","injured","clumsy","hurt"],"skins":[{"unified":"1f915","native":"🤕"}],"version":1},"nauseated_face":{"id":"nauseated_face","name":"Nauseated Face","keywords":["vomit","gross","green","sick","throw","up","ill"],"skins":[{"unified":"1f922","native":"🤢"}],"version":3},"face_vomiting":{"id":"face_vomiting","name":"Face Vomiting","keywords":["with","open","mouth","sick"],"skins":[{"unified":"1f92e","native":"🤮"}],"version":5},"sneezing_face":{"id":"sneezing_face","name":"Sneezing Face","keywords":["gesundheit","sneeze","sick","allergy"],"skins":[{"unified":"1f927","native":"🤧"}],"version":3},"hot_face":{"id":"hot_face","name":"Hot Face","keywords":["feverish","heat","red","sweating"],"skins":[{"unified":"1f975","native":"🥵"}],"version":11},"cold_face":{"id":"cold_face","name":"Cold Face","keywords":["blue","freezing","frozen","frostbite","icicles"],"skins":[{"unified":"1f976","native":"🥶"}],"version":11},"woozy_face":{"id":"woozy_face","name":"Woozy Face","keywords":["dizzy","intoxicated","tipsy","wavy"],"skins":[{"unified":"1f974","native":"🥴"}],"version":11},"dizzy_face":{"id":"dizzy_face","name":"Dizzy Face","keywords":["spent","unconscious","xox"],"skins":[{"unified":"1f635","native":"😵"}],"version":1},"face_with_spiral_eyes":{"id":"face_with_spiral_eyes","name":"Face with Spiral Eyes","keywords":["sick","ill","confused","nauseous","nausea"],"skins":[{"unified":"1f635-200d-1f4ab","native":"😵‍💫"}],"version":13.1},"exploding_head":{"id":"exploding_head","name":"Exploding Head","keywords":["shocked","face","with","mind","blown"],"skins":[{"unified":"1f92f","native":"🤯"}],"version":5},"face_with_cowboy_hat":{"id":"face_with_cowboy_hat","name":"Cowboy Hat Face","keywords":["with","cowgirl"],"skins":[{"unified":"1f920","native":"🤠"}],"version":3},"partying_face":{"id":"partying_face","name":"Partying Face","keywords":["celebration","woohoo"],"skins":[{"unified":"1f973","native":"🥳"}],"version":11},"disguised_face":{"id":"disguised_face","name":"Disguised Face","keywords":["pretent","brows","glasses","moustache"],"skins":[{"unified":"1f978","native":"🥸"}],"version":13},"sunglasses":{"id":"sunglasses","name":"Smiling Face with Sunglasses","emoticons":["8)"],"keywords":["cool","smile","summer","beach","sunglass"],"skins":[{"unified":"1f60e","native":"😎"}],"version":1},"nerd_face":{"id":"nerd_face","name":"Nerd Face","keywords":["nerdy","geek","dork"],"skins":[{"unified":"1f913","native":"🤓"}],"version":1},"face_with_monocle":{"id":"face_with_monocle","name":"Face with Monocle","keywords":["stuffy","wealthy"],"skins":[{"unified":"1f9d0","native":"🧐"}],"version":5},"confused":{"id":"confused","name":"Confused Face","emoticons":[":\\\\",":-\\\\",":/",":-/"],"keywords":["indifference","huh","weird","hmmm",":/"],"skins":[{"unified":"1f615","native":"😕"}],"version":1},"face_with_diagonal_mouth":{"id":"face_with_diagonal_mouth","name":"Face with Diagonal Mouth","keywords":["skeptic","confuse","frustrated","indifferent"],"skins":[{"unified":"1fae4","native":"🫤"}],"version":14},"worried":{"id":"worried","name":"Worried Face","keywords":["concern","nervous",":("],"skins":[{"unified":"1f61f","native":"😟"}],"version":1},"slightly_frowning_face":{"id":"slightly_frowning_face","name":"Slightly Frowning Face","keywords":["disappointed","sad","upset"],"skins":[{"unified":"1f641","native":"🙁"}],"version":1},"white_frowning_face":{"id":"white_frowning_face","name":"Frowning Face","keywords":["white","sad","upset","frown"],"skins":[{"unified":"2639-fe0f","native":"☹️"}],"version":1},"open_mouth":{"id":"open_mouth","name":"Face with Open Mouth","emoticons":[":o",":-o",":O",":-O"],"keywords":["surprise","impressed","wow","whoa",":O"],"skins":[{"unified":"1f62e","native":"😮"}],"version":1},"hushed":{"id":"hushed","name":"Hushed Face","keywords":["woo","shh"],"skins":[{"unified":"1f62f","native":"😯"}],"version":1},"astonished":{"id":"astonished","name":"Astonished Face","keywords":["xox","surprised","poisoned"],"skins":[{"unified":"1f632","native":"😲"}],"version":1},"flushed":{"id":"flushed","name":"Flushed Face","keywords":["blush","shy","flattered"],"skins":[{"unified":"1f633","native":"😳"}],"version":1},"pleading_face":{"id":"pleading_face","name":"Pleading Face","keywords":["begging","mercy","cry","tears","sad","grievance"],"skins":[{"unified":"1f97a","native":"🥺"}],"version":11},"face_holding_back_tears":{"id":"face_holding_back_tears","name":"Face Holding Back Tears","keywords":["touched","gratitude","cry"],"skins":[{"unified":"1f979","native":"🥹"}],"version":14},"frowning":{"id":"frowning","name":"Frowning Face with Open Mouth","keywords":["aw","what"],"skins":[{"unified":"1f626","native":"😦"}],"version":1},"anguished":{"id":"anguished","name":"Anguished Face","emoticons":["D:"],"keywords":["stunned","nervous"],"skins":[{"unified":"1f627","native":"😧"}],"version":1},"fearful":{"id":"fearful","name":"Fearful Face","keywords":["scared","terrified","nervous"],"skins":[{"unified":"1f628","native":"😨"}],"version":1},"cold_sweat":{"id":"cold_sweat","name":"Anxious Face with Sweat","keywords":["cold","nervous"],"skins":[{"unified":"1f630","native":"😰"}],"version":1},"disappointed_relieved":{"id":"disappointed_relieved","name":"Sad but Relieved Face","keywords":["disappointed","phew","sweat","nervous"],"skins":[{"unified":"1f625","native":"😥"}],"version":1},"cry":{"id":"cry","name":"Crying Face","emoticons":[":'("],"keywords":["cry","tears","sad","depressed","upset",":'("],"skins":[{"unified":"1f622","native":"😢"}],"version":1},"sob":{"id":"sob","name":"Loudly Crying Face","emoticons":[":'("],"keywords":["sob","cry","tears","sad","upset","depressed"],"skins":[{"unified":"1f62d","native":"😭"}],"version":1},"scream":{"id":"scream","name":"Face Screaming in Fear","keywords":["scream","munch","scared","omg"],"skins":[{"unified":"1f631","native":"😱"}],"version":1},"confounded":{"id":"confounded","name":"Confounded Face","keywords":["confused","sick","unwell","oops",":S"],"skins":[{"unified":"1f616","native":"😖"}],"version":1},"persevere":{"id":"persevere","name":"Persevering Face","keywords":["persevere","sick","no","upset","oops"],"skins":[{"unified":"1f623","native":"😣"}],"version":1},"disappointed":{"id":"disappointed","name":"Disappointed Face","emoticons":["):",":(",":-("],"keywords":["sad","upset","depressed",":("],"skins":[{"unified":"1f61e","native":"😞"}],"version":1},"sweat":{"id":"sweat","name":"Face with Cold Sweat","keywords":["downcast","hot","sad","tired","exercise"],"skins":[{"unified":"1f613","native":"😓"}],"version":1},"weary":{"id":"weary","name":"Weary Face","keywords":["tired","sleepy","sad","frustrated","upset"],"skins":[{"unified":"1f629","native":"😩"}],"version":1},"tired_face":{"id":"tired_face","name":"Tired Face","keywords":["sick","whine","upset","frustrated"],"skins":[{"unified":"1f62b","native":"😫"}],"version":1},"yawning_face":{"id":"yawning_face","name":"Yawning Face","keywords":["tired","sleepy"],"skins":[{"unified":"1f971","native":"🥱"}],"version":12},"triumph":{"id":"triumph","name":"Face with Look of Triumph","keywords":["steam","from","nose","gas","phew","proud","pride"],"skins":[{"unified":"1f624","native":"😤"}],"version":1},"rage":{"id":"rage","name":"Pouting Face","keywords":["rage","angry","mad","hate","despise"],"skins":[{"unified":"1f621","native":"😡"}],"version":1},"angry":{"id":"angry","name":"Angry Face","emoticons":[">:(",">:-("],"keywords":["mad","annoyed","frustrated"],"skins":[{"unified":"1f620","native":"😠"}],"version":1},"face_with_symbols_on_mouth":{"id":"face_with_symbols_on_mouth","name":"Face with Symbols on Mouth","keywords":["serious","covering","swearing","cursing","cussing","profanity","expletive"],"skins":[{"unified":"1f92c","native":"🤬"}],"version":5},"smiling_imp":{"id":"smiling_imp","name":"Smiling Face with Horns","keywords":["imp","devil"],"skins":[{"unified":"1f608","native":"😈"}],"version":1},"imp":{"id":"imp","name":"Imp","keywords":["angry","face","with","horns","devil"],"skins":[{"unified":"1f47f","native":"👿"}],"version":1},"skull":{"id":"skull","name":"Skull","keywords":["dead","skeleton","creepy","death"],"skins":[{"unified":"1f480","native":"💀"}],"version":1},"skull_and_crossbones":{"id":"skull_and_crossbones","name":"Skull and Crossbones","keywords":["poison","danger","deadly","scary","death","pirate","evil"],"skins":[{"unified":"2620-fe0f","native":"☠️"}],"version":1},"hankey":{"id":"hankey","name":"Pile of Poo","keywords":["hankey","poop","shit","shitface","fail","turd"],"skins":[{"unified":"1f4a9","native":"💩"}],"version":1},"clown_face":{"id":"clown_face","name":"Clown Face","keywords":[],"skins":[{"unified":"1f921","native":"🤡"}],"version":3},"japanese_ogre":{"id":"japanese_ogre","name":"Ogre","keywords":["japanese","monster","red","mask","halloween","scary","creepy","devil","demon"],"skins":[{"unified":"1f479","native":"👹"}],"version":1},"japanese_goblin":{"id":"japanese_goblin","name":"Goblin","keywords":["japanese","red","evil","mask","monster","scary","creepy"],"skins":[{"unified":"1f47a","native":"👺"}],"version":1},"ghost":{"id":"ghost","name":"Ghost","keywords":["halloween","spooky","scary"],"skins":[{"unified":"1f47b","native":"👻"}],"version":1},"alien":{"id":"alien","name":"Alien","keywords":["UFO","paul","weird","outer","space"],"skins":[{"unified":"1f47d","native":"👽"}],"version":1},"space_invader":{"id":"space_invader","name":"Alien Monster","keywords":["space","invader","game","arcade","play"],"skins":[{"unified":"1f47e","native":"👾"}],"version":1},"robot_face":{"id":"robot_face","name":"Robot","keywords":["face","computer","machine","bot"],"skins":[{"unified":"1f916","native":"🤖"}],"version":1},"smiley_cat":{"id":"smiley_cat","name":"Grinning Cat","keywords":["smiley","animal","cats","happy","smile"],"skins":[{"unified":"1f63a","native":"😺"}],"version":1},"smile_cat":{"id":"smile_cat","name":"Grinning Cat with Smiling Eyes","keywords":["smile","animal","cats"],"skins":[{"unified":"1f638","native":"😸"}],"version":1},"joy_cat":{"id":"joy_cat","name":"Cat with Tears of Joy","keywords":["animal","cats","haha","happy"],"skins":[{"unified":"1f639","native":"😹"}],"version":1},"heart_eyes_cat":{"id":"heart_eyes_cat","name":"Smiling Cat with Heart-Eyes","keywords":["heart","eyes","animal","love","like","affection","cats","valentines"],"skins":[{"unified":"1f63b","native":"😻"}],"version":1},"smirk_cat":{"id":"smirk_cat","name":"Cat with Wry Smile","keywords":["smirk","animal","cats"],"skins":[{"unified":"1f63c","native":"😼"}],"version":1},"kissing_cat":{"id":"kissing_cat","name":"Kissing Cat","keywords":["animal","cats","kiss"],"skins":[{"unified":"1f63d","native":"😽"}],"version":1},"scream_cat":{"id":"scream_cat","name":"Weary Cat","keywords":["scream","animal","cats","munch","scared"],"skins":[{"unified":"1f640","native":"🙀"}],"version":1},"crying_cat_face":{"id":"crying_cat_face","name":"Crying Cat","keywords":["face","animal","tears","weep","sad","cats","upset","cry"],"skins":[{"unified":"1f63f","native":"😿"}],"version":1},"pouting_cat":{"id":"pouting_cat","name":"Pouting Cat","keywords":["animal","cats"],"skins":[{"unified":"1f63e","native":"😾"}],"version":1},"see_no_evil":{"id":"see_no_evil","name":"See-No-Evil Monkey","keywords":["see","no","evil","animal","nature","haha"],"skins":[{"unified":"1f648","native":"🙈"}],"version":1},"hear_no_evil":{"id":"hear_no_evil","name":"Hear-No-Evil Monkey","keywords":["hear","no","evil","animal","nature"],"skins":[{"unified":"1f649","native":"🙉"}],"version":1},"speak_no_evil":{"id":"speak_no_evil","name":"Speak-No-Evil Monkey","keywords":["speak","no","evil","animal","nature","omg"],"skins":[{"unified":"1f64a","native":"🙊"}],"version":1},"love_letter":{"id":"love_letter","name":"Love Letter","keywords":["email","like","affection","envelope","valentines"],"skins":[{"unified":"1f48c","native":"💌"}],"version":1},"cupid":{"id":"cupid","name":"Heart with Arrow","keywords":["cupid","love","like","affection","valentines"],"skins":[{"unified":"1f498","native":"💘"}],"version":1},"gift_heart":{"id":"gift_heart","name":"Heart with Ribbon","keywords":["gift","love","valentines"],"skins":[{"unified":"1f49d","native":"💝"}],"version":1},"sparkling_heart":{"id":"sparkling_heart","name":"Sparkling Heart","keywords":["love","like","affection","valentines"],"skins":[{"unified":"1f496","native":"💖"}],"version":1},"heartpulse":{"id":"heartpulse","name":"Growing Heart","keywords":["heartpulse","like","love","affection","valentines","pink"],"skins":[{"unified":"1f497","native":"💗"}],"version":1},"heartbeat":{"id":"heartbeat","name":"Beating Heart","keywords":["heartbeat","love","like","affection","valentines","pink"],"skins":[{"unified":"1f493","native":"💓"}],"version":1},"revolving_hearts":{"id":"revolving_hearts","name":"Revolving Hearts","keywords":["love","like","affection","valentines"],"skins":[{"unified":"1f49e","native":"💞"}],"version":1},"two_hearts":{"id":"two_hearts","name":"Two Hearts","keywords":["love","like","affection","valentines","heart"],"skins":[{"unified":"1f495","native":"💕"}],"version":1},"heart_decoration":{"id":"heart_decoration","name":"Heart Decoration","keywords":["purple","square","love","like"],"skins":[{"unified":"1f49f","native":"💟"}],"version":1},"heavy_heart_exclamation_mark_ornament":{"id":"heavy_heart_exclamation_mark_ornament","name":"Heart Exclamation","keywords":["heavy","mark","ornament","decoration","love"],"skins":[{"unified":"2763-fe0f","native":"❣️"}],"version":1},"broken_heart":{"id":"broken_heart","name":"Broken Heart","emoticons":["2&&(o.children=arguments.length>3?U0.call(arguments,2):t),typeof e=="function"&&e.defaultProps!=null)for(a in e.defaultProps)o[a]===void 0&&(o[a]=e.defaultProps[a]);return yg(e,o,i,r,null)}function yg(e,n,t,i,r){var a={type:e,props:n,key:t,ref:i,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:r??++mW};return r==null&&kn.vnode!=null&&kn.vnode(a),a}function Fo(){return{current:null}}function xc(e){return e.children}function fo(e,n){this.props=e,this.context=n}function Sc(e,n){if(n==null)return e.__?Sc(e.__,e.__.__k.indexOf(e)+1):null;for(var t;n0?yg(v.type,v.props,v.key,null,v.__v):v)!=null){if(v.__=t,v.__b=t.__b+1,(p=_[h])===null||p&&v.key==p.key&&v.type===p.type)_[h]=void 0;else for(d=0;d{let e=null;try{navigator.userAgent.includes("jsdom")||(e=document.createElement("canvas").getContext("2d",{willReadFrequently:!0}))}catch{}if(!e)return()=>!1;const n=25,t=20,i=Math.floor(n/2);return e.font=i+"px Arial, Sans-Serif",e.textBaseline="top",e.canvas.width=t*2,e.canvas.height=n,r=>{e.clearRect(0,0,t*2,n),e.fillStyle="#FF0000",e.fillText(r,0,22),e.fillStyle="#0000FF",e.fillText(r,t,22);const a=e.getImageData(0,0,t,n).data,o=a.length;let l=0;for(;l=o)return!1;const f=t+l/4%t,c=Math.floor(l/4/t),h=e.getImageData(f,c,1,1).data;return!(a[l]!==h[0]||a[l+2]!==h[2]||e.measureText(r).width>=t)}})();var D$={latestVersion:i9e,noCountryFlags:r9e};const m6=["+1","grinning","kissing_heart","heart_eyes","laughing","stuck_out_tongue_winking_eye","sweat_smile","joy","scream","disappointed","unamused","weary","sob","sunglasses","heart"];let Li=null;function o9e(e){Li||(Li=tl.get("frequently")||{});const n=e.id||e;n&&(Li[n]||(Li[n]=0),Li[n]+=1,tl.set("last",n),tl.set("frequently",Li))}function s9e({maxFrequentRows:e,perLine:n}){if(!e)return[];Li||(Li=tl.get("frequently"));let t=[];if(!Li){Li={};for(let a in m6.slice(0,n)){const o=m6[a];Li[o]=n-a,t.push(o)}return t}const i=e*n,r=tl.get("last");for(let a in Li)t.push(a);if(t.sort((a,o)=>{const l=Li[o],f=Li[a];return l==f?a.localeCompare(o):l-f}),t.length>i){const a=t.slice(i);t=t.slice(0,i);for(let o of a)o!=r&&delete Li[o];r&&t.indexOf(r)==-1&&(delete Li[t[t.length-1]],t.splice(-1,1,r)),tl.set("frequently",Li)}return t}var OW={add:o9e,get:s9e,DEFAULTS:m6},EW={};EW=JSON.parse('{"search":"Search","search_no_results_1":"Oh no!","search_no_results_2":"That emoji couldn’t be found","pick":"Pick an emoji…","add_custom":"Add custom emoji","categories":{"activity":"Activity","custom":"Custom","flags":"Flags","foods":"Food & Drink","frequent":"Frequently used","nature":"Animals & Nature","objects":"Objects","people":"Smileys & People","places":"Travel & Places","search":"Search Results","symbols":"Symbols"},"skins":{"1":"Default","2":"Light","3":"Medium-Light","4":"Medium","5":"Medium-Dark","6":"Dark","choose":"Choose default skin tone"}}');var Ho={autoFocus:{value:!1},dynamicWidth:{value:!1},emojiButtonColors:{value:null},emojiButtonRadius:{value:"100%"},emojiButtonSize:{value:36},emojiSize:{value:24},emojiVersion:{value:15,choices:[1,2,3,4,5,11,12,12.1,13,13.1,14,15]},exceptEmojis:{value:[]},icons:{value:"auto",choices:["auto","outline","solid"]},locale:{value:"en",choices:["en","ar","be","cs","de","es","fa","fi","fr","hi","it","ja","ko","nl","pl","pt","ru","sa","tr","uk","vi","zh"]},maxFrequentRows:{value:4},navPosition:{value:"top",choices:["top","bottom","none"]},noCountryFlags:{value:!1},noResultsEmoji:{value:null},perLine:{value:9},previewEmoji:{value:null},previewPosition:{value:"bottom",choices:["top","bottom","none"]},searchPosition:{value:"sticky",choices:["sticky","static","none"]},set:{value:"native",choices:["native","apple","facebook","google","twitter"]},skin:{value:1,choices:[1,2,3,4,5,6]},skinTonePosition:{value:"preview",choices:["preview","search","none"]},theme:{value:"auto",choices:["auto","light","dark"]},categories:null,categoryIcons:null,custom:null,data:null,i18n:null,getImageURL:null,getSpritesheetURL:null,onAddCustomEmoji:null,onClickOutside:null,onEmojiSelect:null,stickySearch:{deprecated:!0,value:!0}};let Wi=null,Kn=null;const K3={};async function R$(e){if(K3[e])return K3[e];const t=await(await fetch(e)).json();return K3[e]=t,t}let X3=null,TW=null,jW=!1;function V0(e,{caller:n}={}){return X3||(X3=new Promise(t=>{TW=t})),e?l9e(e):n&&!jW&&console.warn(`\`${n}\` requires data to be initialized first. Promise will be pending until \`init\` is called.`),X3}async function l9e(e){jW=!0;let{emojiVersion:n,set:t,locale:i}=e;if(n||(n=Ho.emojiVersion.value),t||(t=Ho.set.value),i||(i=Ho.locale.value),Kn)Kn.categories=Kn.categories.filter(f=>!f.name);else{Kn=(typeof e.data=="function"?await e.data():e.data)||await R$(`https://cdn.jsdelivr.net/npm/@emoji-mart/data@latest/sets/${n}/${t}.json`),Kn.emoticons={},Kn.natives={},Kn.categories.unshift({id:"frequent",emojis:[]});for(const f in Kn.aliases){const c=Kn.aliases[f],h=Kn.emojis[c];h&&(h.aliases||(h.aliases=[]),h.aliases.push(f))}Kn.originalCategories=Kn.categories}if(Wi=(typeof e.i18n=="function"?await e.i18n():e.i18n)||(i=="en"?hW(EW):await R$(`https://cdn.jsdelivr.net/npm/@emoji-mart/data@latest/i18n/${i}.json`)),e.custom)for(let f in e.custom){f=parseInt(f);const c=e.custom[f],h=e.custom[f-1];if(!(!c.emojis||!c.emojis.length)){c.id||(c.id=`custom_${f+1}`),c.name||(c.name=Wi.categories.custom),h&&!c.icon&&(c.target=h.target||h),Kn.categories.push(c);for(const d of c.emojis)Kn.emojis[d.id]=d}}e.categories&&(Kn.categories=Kn.originalCategories.filter(f=>e.categories.indexOf(f.id)!=-1).sort((f,c)=>{const h=e.categories.indexOf(f.id),d=e.categories.indexOf(c.id);return h-d}));let r=null,a=null;t=="native"&&(r=D$.latestVersion(),a=e.noCountryFlags||D$.noCountryFlags());let o=Kn.categories.length,l=!1;for(;o--;){const f=Kn.categories[o];if(f.id=="frequent"){let{maxFrequentRows:d,perLine:p}=e;d=d>=0?d:Ho.maxFrequentRows.value,p||(p=Ho.perLine.value),f.emojis=OW.get({maxFrequentRows:d,perLine:p})}if(!f.emojis||!f.emojis.length){Kn.categories.splice(o,1);continue}const{categoryIcons:c}=e;if(c){const d=c[f.id];d&&!f.icon&&(f.icon=d)}let h=f.emojis.length;for(;h--;){const d=f.emojis[h],p=d.id?d:Kn.emojis[d],v=()=>{f.emojis.splice(h,1)};if(!p||e.exceptEmojis&&e.exceptEmojis.includes(p.id)){v();continue}if(r&&p.version>r){v();continue}if(a&&f.id=="flags"&&!h9e.includes(p.id)){v();continue}if(!p.search){if(l=!0,p.search=","+[[p.id,!1],[p.name,!0],[p.keywords,!1],[p.emoticons,!1]].map(([w,k])=>{if(w)return(Array.isArray(w)?w:[w]).map(_=>(k?_.split(/[-|_|\s]+/):[_]).map(x=>x.toLowerCase())).flat()}).flat().filter(w=>w&&w.trim()).join(","),p.emoticons)for(const w of p.emoticons)Kn.emoticons[w]||(Kn.emoticons[w]=p.id);let b=0;for(const w of p.skins){if(!w)continue;b++;const{native:k}=w;k&&(Kn.natives[k]=p.id,p.search+=`,${k}`);const _=b==1?"":`:skin-tone-${b}:`;w.shortcodes=`:${p.id}:${_}`}}}}l&&Wf.reset(),TW()}function MW(e,n,t){e||(e={});const i={};for(let r in n)i[r]=DW(r,e,n,t);return i}function DW(e,n,t,i){const r=t[e];let a=i&&i.getAttribute(e)||(n[e]!=null&&n[e]!=null?n[e]:null);return r&&(a!=null&&r.value&&typeof r.value!=typeof a&&(typeof r.value=="boolean"?a=a!="false":a=r.value.constructor(a)),r.transform&&a&&(a=r.transform(a)),(a==null||r.choices&&r.choices.indexOf(a)==-1)&&(a=r.value)),a}const u9e=/^(?:\:([^\:]+)\:)(?:\:skin-tone-(\d)\:)?$/;let p6=null;function f9e(e){return e.id?e:Kn.emojis[e]||Kn.emojis[Kn.aliases[e]]||Kn.emojis[Kn.natives[e]]}function c9e(){p6=null}async function d9e(e,{maxResults:n,caller:t}={}){if(!e||!e.trim().length)return null;n||(n=90),await V0(null,{caller:t||"SearchIndex.search"});const i=e.toLowerCase().replace(/(\w)-/,"$1 ").split(/[\s|,]+/).filter((l,f,c)=>l.trim()&&c.indexOf(l)==f);if(!i.length)return;let r=p6||(p6=Object.values(Kn.emojis)),a,o;for(const l of i){if(!r.length)break;a=[],o={};for(const f of r){if(!f.search)continue;const c=f.search.indexOf(`,${l}`);c!=-1&&(a.push(f),o[f.id]||(o[f.id]=0),o[f.id]+=f.id==l?0:c+1)}r=a}return a.length<2||(a.sort((l,f)=>{const c=o[l.id],h=o[f.id];return c==h?l.id.localeCompare(f.id):c-h}),a.length>n&&(a=a.slice(0,n))),a}var Wf={search:d9e,get:f9e,reset:c9e,SHORTCODES_REGEX:u9e};const h9e=["checkered_flag","crossed_flags","pirate_flag","rainbow-flag","transgender_flag","triangular_flag_on_post","waving_black_flag","waving_white_flag"];function m9e(e,n){return Array.isArray(e)&&Array.isArray(n)&&e.length===n.length&&e.every((t,i)=>t==n[i])}async function p9e(e=1){for(let n in[...Array(e).keys()])await new Promise(requestAnimationFrame)}function v9e(e,{skinIndex:n=0}={}){const t=e.skins[n]||(n=0,e.skins[n]),i={id:e.id,name:e.name,native:t.native,unified:t.unified,keywords:e.keywords,shortcodes:t.shortcodes||e.shortcodes};return e.skins.length>1&&(i.skin=n+1),t.src&&(i.src=t.src),e.aliases&&e.aliases.length&&(i.aliases=e.aliases),e.emoticons&&e.emoticons.length&&(i.emoticons=e.emoticons),i}const g9e={activity:{outline:Ne("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:Ne("path",{d:"M12 0C5.373 0 0 5.372 0 12c0 6.627 5.373 12 12 12 6.628 0 12-5.373 12-12 0-6.628-5.372-12-12-12m9.949 11H17.05c.224-2.527 1.232-4.773 1.968-6.113A9.966 9.966 0 0 1 21.949 11M13 11V2.051a9.945 9.945 0 0 1 4.432 1.564c-.858 1.491-2.156 4.22-2.392 7.385H13zm-2 0H8.961c-.238-3.165-1.536-5.894-2.393-7.385A9.95 9.95 0 0 1 11 2.051V11zm0 2v8.949a9.937 9.937 0 0 1-4.432-1.564c.857-1.492 2.155-4.221 2.393-7.385H11zm4.04 0c.236 3.164 1.534 5.893 2.392 7.385A9.92 9.92 0 0 1 13 21.949V13h2.04zM4.982 4.887C5.718 6.227 6.726 8.473 6.951 11h-4.9a9.977 9.977 0 0 1 2.931-6.113M2.051 13h4.9c-.226 2.527-1.233 4.771-1.969 6.113A9.972 9.972 0 0 1 2.051 13m16.967 6.113c-.735-1.342-1.744-3.586-1.968-6.113h4.899a9.961 9.961 0 0 1-2.931 6.113"})}),solid:Ne("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",children:Ne("path",{d:"M16.17 337.5c0 44.98 7.565 83.54 13.98 107.9C35.22 464.3 50.46 496 174.9 496c9.566 0 19.59-.4707 29.84-1.271L17.33 307.3C16.53 317.6 16.17 327.7 16.17 337.5zM495.8 174.5c0-44.98-7.565-83.53-13.98-107.9c-4.688-17.54-18.34-31.23-36.04-35.95C435.5 27.91 392.9 16 337 16c-9.564 0-19.59 .4707-29.84 1.271l187.5 187.5C495.5 194.4 495.8 184.3 495.8 174.5zM26.77 248.8l236.3 236.3c142-36.1 203.9-150.4 222.2-221.1L248.9 26.87C106.9 62.96 45.07 177.2 26.77 248.8zM256 335.1c0 9.141-7.474 16-16 16c-4.094 0-8.188-1.564-11.31-4.689L164.7 283.3C161.6 280.2 160 276.1 160 271.1c0-8.529 6.865-16 16-16c4.095 0 8.189 1.562 11.31 4.688l64.01 64C254.4 327.8 256 331.9 256 335.1zM304 287.1c0 9.141-7.474 16-16 16c-4.094 0-8.188-1.564-11.31-4.689L212.7 235.3C209.6 232.2 208 228.1 208 223.1c0-9.141 7.473-16 16-16c4.094 0 8.188 1.562 11.31 4.688l64.01 64.01C302.5 279.8 304 283.9 304 287.1zM256 175.1c0-9.141 7.473-16 16-16c4.094 0 8.188 1.562 11.31 4.688l64.01 64.01c3.125 3.125 4.688 7.219 4.688 11.31c0 9.133-7.468 16-16 16c-4.094 0-8.189-1.562-11.31-4.688l-64.01-64.01C257.6 184.2 256 180.1 256 175.1z"})})},custom:Ne("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512",children:Ne("path",{d:"M417.1 368c-5.937 10.27-16.69 16-27.75 16c-5.422 0-10.92-1.375-15.97-4.281L256 311.4V448c0 17.67-14.33 32-31.1 32S192 465.7 192 448V311.4l-118.3 68.29C68.67 382.6 63.17 384 57.75 384c-11.06 0-21.81-5.734-27.75-16c-8.828-15.31-3.594-34.88 11.72-43.72L159.1 256L41.72 187.7C26.41 178.9 21.17 159.3 29.1 144C36.63 132.5 49.26 126.7 61.65 128.2C65.78 128.7 69.88 130.1 73.72 132.3L192 200.6V64c0-17.67 14.33-32 32-32S256 46.33 256 64v136.6l118.3-68.29c3.838-2.213 7.939-3.539 12.07-4.051C398.7 126.7 411.4 132.5 417.1 144c8.828 15.31 3.594 34.88-11.72 43.72L288 256l118.3 68.28C421.6 333.1 426.8 352.7 417.1 368z"})}),flags:{outline:Ne("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:Ne("path",{d:"M0 0l6.084 24H8L1.916 0zM21 5h-4l-1-4H4l3 12h3l1 4h13L21 5zM6.563 3h7.875l2 8H8.563l-2-8zm8.832 10l-2.856 1.904L12.063 13h3.332zM19 13l-1.5-6h1.938l2 8H16l3-2z"})}),solid:Ne("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",children:Ne("path",{d:"M64 496C64 504.8 56.75 512 48 512h-32C7.25 512 0 504.8 0 496V32c0-17.75 14.25-32 32-32s32 14.25 32 32V496zM476.3 0c-6.365 0-13.01 1.35-19.34 4.233c-45.69 20.86-79.56 27.94-107.8 27.94c-59.96 0-94.81-31.86-163.9-31.87C160.9 .3055 131.6 4.867 96 15.75v350.5c32-9.984 59.87-14.1 84.85-14.1c73.63 0 124.9 31.78 198.6 31.78c31.91 0 68.02-5.971 111.1-23.09C504.1 355.9 512 344.4 512 332.1V30.73C512 11.1 495.3 0 476.3 0z"})})},foods:{outline:Ne("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:Ne("path",{d:"M17 4.978c-1.838 0-2.876.396-3.68.934.513-1.172 1.768-2.934 4.68-2.934a1 1 0 0 0 0-2c-2.921 0-4.629 1.365-5.547 2.512-.064.078-.119.162-.18.244C11.73 1.838 10.798.023 9.207.023 8.579.022 7.85.306 7 .978 5.027 2.54 5.329 3.902 6.492 4.999 3.609 5.222 0 7.352 0 12.969c0 4.582 4.961 11.009 9 11.009 1.975 0 2.371-.486 3-1 .629.514 1.025 1 3 1 4.039 0 9-6.418 9-11 0-5.953-4.055-8-7-8M8.242 2.546c.641-.508.943-.523.965-.523.426.169.975 1.405 1.357 3.055-1.527-.629-2.741-1.352-2.98-1.846.059-.112.241-.356.658-.686M15 21.978c-1.08 0-1.21-.109-1.559-.402l-.176-.146c-.367-.302-.816-.452-1.266-.452s-.898.15-1.266.452l-.176.146c-.347.292-.477.402-1.557.402-2.813 0-7-5.389-7-9.009 0-5.823 4.488-5.991 5-5.991 1.939 0 2.484.471 3.387 1.251l.323.276a1.995 1.995 0 0 0 2.58 0l.323-.276c.902-.78 1.447-1.251 3.387-1.251.512 0 5 .168 5 6 0 3.617-4.187 9-7 9"})}),solid:Ne("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",children:Ne("path",{d:"M481.9 270.1C490.9 279.1 496 291.3 496 304C496 316.7 490.9 328.9 481.9 337.9C472.9 346.9 460.7 352 448 352H64C51.27 352 39.06 346.9 30.06 337.9C21.06 328.9 16 316.7 16 304C16 291.3 21.06 279.1 30.06 270.1C39.06 261.1 51.27 256 64 256H448C460.7 256 472.9 261.1 481.9 270.1zM475.3 388.7C478.3 391.7 480 395.8 480 400V416C480 432.1 473.3 449.3 461.3 461.3C449.3 473.3 432.1 480 416 480H96C79.03 480 62.75 473.3 50.75 461.3C38.74 449.3 32 432.1 32 416V400C32 395.8 33.69 391.7 36.69 388.7C39.69 385.7 43.76 384 48 384H464C468.2 384 472.3 385.7 475.3 388.7zM50.39 220.8C45.93 218.6 42.03 215.5 38.97 211.6C35.91 207.7 33.79 203.2 32.75 198.4C31.71 193.5 31.8 188.5 32.99 183.7C54.98 97.02 146.5 32 256 32C365.5 32 457 97.02 479 183.7C480.2 188.5 480.3 193.5 479.2 198.4C478.2 203.2 476.1 207.7 473 211.6C469.1 215.5 466.1 218.6 461.6 220.8C457.2 222.9 452.3 224 447.3 224H64.67C59.73 224 54.84 222.9 50.39 220.8zM372.7 116.7C369.7 119.7 368 123.8 368 128C368 131.2 368.9 134.3 370.7 136.9C372.5 139.5 374.1 141.6 377.9 142.8C380.8 143.1 384 144.3 387.1 143.7C390.2 143.1 393.1 141.6 395.3 139.3C397.6 137.1 399.1 134.2 399.7 131.1C400.3 128 399.1 124.8 398.8 121.9C397.6 118.1 395.5 116.5 392.9 114.7C390.3 112.9 387.2 111.1 384 111.1C379.8 111.1 375.7 113.7 372.7 116.7V116.7zM244.7 84.69C241.7 87.69 240 91.76 240 96C240 99.16 240.9 102.3 242.7 104.9C244.5 107.5 246.1 109.6 249.9 110.8C252.8 111.1 256 112.3 259.1 111.7C262.2 111.1 265.1 109.6 267.3 107.3C269.6 105.1 271.1 102.2 271.7 99.12C272.3 96.02 271.1 92.8 270.8 89.88C269.6 86.95 267.5 84.45 264.9 82.7C262.3 80.94 259.2 79.1 256 79.1C251.8 79.1 247.7 81.69 244.7 84.69V84.69zM116.7 116.7C113.7 119.7 112 123.8 112 128C112 131.2 112.9 134.3 114.7 136.9C116.5 139.5 118.1 141.6 121.9 142.8C124.8 143.1 128 144.3 131.1 143.7C134.2 143.1 137.1 141.6 139.3 139.3C141.6 137.1 143.1 134.2 143.7 131.1C144.3 128 143.1 124.8 142.8 121.9C141.6 118.1 139.5 116.5 136.9 114.7C134.3 112.9 131.2 111.1 128 111.1C123.8 111.1 119.7 113.7 116.7 116.7L116.7 116.7z"})})},frequent:{outline:Ne("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[Ne("path",{d:"M13 4h-2l-.001 7H9v2h2v2h2v-2h4v-2h-4z"}),Ne("path",{d:"M12 0C5.373 0 0 5.373 0 12s5.373 12 12 12 12-5.373 12-12S18.627 0 12 0m0 22C6.486 22 2 17.514 2 12S6.486 2 12 2s10 4.486 10 10-4.486 10-10 10"})]}),solid:Ne("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",children:Ne("path",{d:"M256 512C114.6 512 0 397.4 0 256C0 114.6 114.6 0 256 0C397.4 0 512 114.6 512 256C512 397.4 397.4 512 256 512zM232 256C232 264 236 271.5 242.7 275.1L338.7 339.1C349.7 347.3 364.6 344.3 371.1 333.3C379.3 322.3 376.3 307.4 365.3 300L280 243.2V120C280 106.7 269.3 96 255.1 96C242.7 96 231.1 106.7 231.1 120L232 256z"})})},nature:{outline:Ne("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[Ne("path",{d:"M15.5 8a1.5 1.5 0 1 0 .001 3.001A1.5 1.5 0 0 0 15.5 8M8.5 8a1.5 1.5 0 1 0 .001 3.001A1.5 1.5 0 0 0 8.5 8"}),Ne("path",{d:"M18.933 0h-.027c-.97 0-2.138.787-3.018 1.497-1.274-.374-2.612-.51-3.887-.51-1.285 0-2.616.133-3.874.517C7.245.79 6.069 0 5.093 0h-.027C3.352 0 .07 2.67.002 7.026c-.039 2.479.276 4.238 1.04 5.013.254.258.882.677 1.295.882.191 3.177.922 5.238 2.536 6.38.897.637 2.187.949 3.2 1.102C8.04 20.6 8 20.795 8 21c0 1.773 2.35 3 4 3 1.648 0 4-1.227 4-3 0-.201-.038-.393-.072-.586 2.573-.385 5.435-1.877 5.925-7.587.396-.22.887-.568 1.104-.788.763-.774 1.079-2.534 1.04-5.013C23.929 2.67 20.646 0 18.933 0M3.223 9.135c-.237.281-.837 1.155-.884 1.238-.15-.41-.368-1.349-.337-3.291.051-3.281 2.478-4.972 3.091-5.031.256.015.731.27 1.265.646-1.11 1.171-2.275 2.915-2.352 5.125-.133.546-.398.858-.783 1.313M12 22c-.901 0-1.954-.693-2-1 0-.654.475-1.236 1-1.602V20a1 1 0 1 0 2 0v-.602c.524.365 1 .947 1 1.602-.046.307-1.099 1-2 1m3-3.48v.02a4.752 4.752 0 0 0-1.262-1.02c1.092-.516 2.239-1.334 2.239-2.217 0-1.842-1.781-2.195-3.977-2.195-2.196 0-3.978.354-3.978 2.195 0 .883 1.148 1.701 2.238 2.217A4.8 4.8 0 0 0 9 18.539v-.025c-1-.076-2.182-.281-2.973-.842-1.301-.92-1.838-3.045-1.853-6.478l.023-.041c.496-.826 1.49-1.45 1.804-3.102 0-2.047 1.357-3.631 2.362-4.522C9.37 3.178 10.555 3 11.948 3c1.447 0 2.685.192 3.733.57 1 .9 2.316 2.465 2.316 4.48.313 1.651 1.307 2.275 1.803 3.102.035.058.068.117.102.178-.059 5.967-1.949 7.01-4.902 7.19m6.628-8.202c-.037-.065-.074-.13-.113-.195a7.587 7.587 0 0 0-.739-.987c-.385-.455-.648-.768-.782-1.313-.076-2.209-1.241-3.954-2.353-5.124.531-.376 1.004-.63 1.261-.647.636.071 3.044 1.764 3.096 5.031.027 1.81-.347 3.218-.37 3.235"})]}),solid:Ne("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 576 512",children:Ne("path",{d:"M332.7 19.85C334.6 8.395 344.5 0 356.1 0C363.6 0 370.6 3.52 375.1 9.502L392 32H444.1C456.8 32 469.1 37.06 478.1 46.06L496 64H552C565.3 64 576 74.75 576 88V112C576 156.2 540.2 192 496 192H426.7L421.6 222.5L309.6 158.5L332.7 19.85zM448 64C439.2 64 432 71.16 432 80C432 88.84 439.2 96 448 96C456.8 96 464 88.84 464 80C464 71.16 456.8 64 448 64zM416 256.1V480C416 497.7 401.7 512 384 512H352C334.3 512 320 497.7 320 480V364.8C295.1 377.1 268.8 384 240 384C211.2 384 184 377.1 160 364.8V480C160 497.7 145.7 512 128 512H96C78.33 512 64 497.7 64 480V249.8C35.23 238.9 12.64 214.5 4.836 183.3L.9558 167.8C-3.331 150.6 7.094 133.2 24.24 128.1C41.38 124.7 58.76 135.1 63.05 152.2L66.93 167.8C70.49 182 83.29 191.1 97.97 191.1H303.8L416 256.1z"})})},objects:{outline:Ne("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[Ne("path",{d:"M12 0a9 9 0 0 0-5 16.482V21s2.035 3 5 3 5-3 5-3v-4.518A9 9 0 0 0 12 0zm0 2c3.86 0 7 3.141 7 7s-3.14 7-7 7-7-3.141-7-7 3.14-7 7-7zM9 17.477c.94.332 1.946.523 3 .523s2.06-.19 3-.523v.834c-.91.436-1.925.689-3 .689a6.924 6.924 0 0 1-3-.69v-.833zm.236 3.07A8.854 8.854 0 0 0 12 21c.965 0 1.888-.167 2.758-.451C14.155 21.173 13.153 22 12 22c-1.102 0-2.117-.789-2.764-1.453z"}),Ne("path",{d:"M14.745 12.449h-.004c-.852-.024-1.188-.858-1.577-1.824-.421-1.061-.703-1.561-1.182-1.566h-.009c-.481 0-.783.497-1.235 1.537-.436.982-.801 1.811-1.636 1.791l-.276-.043c-.565-.171-.853-.691-1.284-1.794-.125-.313-.202-.632-.27-.913-.051-.213-.127-.53-.195-.634C7.067 9.004 7.039 9 6.99 9A1 1 0 0 1 7 7h.01c1.662.017 2.015 1.373 2.198 2.134.486-.981 1.304-2.058 2.797-2.075 1.531.018 2.28 1.153 2.731 2.141l.002-.008C14.944 8.424 15.327 7 16.979 7h.032A1 1 0 1 1 17 9h-.011c-.149.076-.256.474-.319.709a6.484 6.484 0 0 1-.311.951c-.429.973-.79 1.789-1.614 1.789"})]}),solid:Ne("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 384 512",children:Ne("path",{d:"M112.1 454.3c0 6.297 1.816 12.44 5.284 17.69l17.14 25.69c5.25 7.875 17.17 14.28 26.64 14.28h61.67c9.438 0 21.36-6.401 26.61-14.28l17.08-25.68c2.938-4.438 5.348-12.37 5.348-17.7L272 415.1h-160L112.1 454.3zM191.4 .0132C89.44 .3257 16 82.97 16 175.1c0 44.38 16.44 84.84 43.56 115.8c16.53 18.84 42.34 58.23 52.22 91.45c.0313 .25 .0938 .5166 .125 .7823h160.2c.0313-.2656 .0938-.5166 .125-.7823c9.875-33.22 35.69-72.61 52.22-91.45C351.6 260.8 368 220.4 368 175.1C368 78.61 288.9-.2837 191.4 .0132zM192 96.01c-44.13 0-80 35.89-80 79.1C112 184.8 104.8 192 96 192S80 184.8 80 176c0-61.76 50.25-111.1 112-111.1c8.844 0 16 7.159 16 16S200.8 96.01 192 96.01z"})})},people:{outline:Ne("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[Ne("path",{d:"M12 0C5.373 0 0 5.373 0 12s5.373 12 12 12 12-5.373 12-12S18.627 0 12 0m0 22C6.486 22 2 17.514 2 12S6.486 2 12 2s10 4.486 10 10-4.486 10-10 10"}),Ne("path",{d:"M8 7a2 2 0 1 0-.001 3.999A2 2 0 0 0 8 7M16 7a2 2 0 1 0-.001 3.999A2 2 0 0 0 16 7M15.232 15c-.693 1.195-1.87 2-3.349 2-1.477 0-2.655-.805-3.347-2H15m3-2H6a6 6 0 1 0 12 0"})]}),solid:Ne("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",children:Ne("path",{d:"M0 256C0 114.6 114.6 0 256 0C397.4 0 512 114.6 512 256C512 397.4 397.4 512 256 512C114.6 512 0 397.4 0 256zM256 432C332.1 432 396.2 382 415.2 314.1C419.1 300.4 407.8 288 393.6 288H118.4C104.2 288 92.92 300.4 96.76 314.1C115.8 382 179.9 432 256 432V432zM176.4 160C158.7 160 144.4 174.3 144.4 192C144.4 209.7 158.7 224 176.4 224C194 224 208.4 209.7 208.4 192C208.4 174.3 194 160 176.4 160zM336.4 224C354 224 368.4 209.7 368.4 192C368.4 174.3 354 160 336.4 160C318.7 160 304.4 174.3 304.4 192C304.4 209.7 318.7 224 336.4 224z"})})},places:{outline:Ne("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[Ne("path",{d:"M6.5 12C5.122 12 4 13.121 4 14.5S5.122 17 6.5 17 9 15.879 9 14.5 7.878 12 6.5 12m0 3c-.275 0-.5-.225-.5-.5s.225-.5.5-.5.5.225.5.5-.225.5-.5.5M17.5 12c-1.378 0-2.5 1.121-2.5 2.5s1.122 2.5 2.5 2.5 2.5-1.121 2.5-2.5-1.122-2.5-2.5-2.5m0 3c-.275 0-.5-.225-.5-.5s.225-.5.5-.5.5.225.5.5-.225.5-.5.5"}),Ne("path",{d:"M22.482 9.494l-1.039-.346L21.4 9h.6c.552 0 1-.439 1-.992 0-.006-.003-.008-.003-.008H23c0-1-.889-2-1.984-2h-.642l-.731-1.717C19.262 3.012 18.091 2 16.764 2H7.236C5.909 2 4.738 3.012 4.357 4.283L3.626 6h-.642C1.889 6 1 7 1 8h.003S1 8.002 1 8.008C1 8.561 1.448 9 2 9h.6l-.043.148-1.039.346a2.001 2.001 0 0 0-1.359 2.097l.751 7.508a1 1 0 0 0 .994.901H3v1c0 1.103.896 2 2 2h2c1.104 0 2-.897 2-2v-1h6v1c0 1.103.896 2 2 2h2c1.104 0 2-.897 2-2v-1h1.096a.999.999 0 0 0 .994-.901l.751-7.508a2.001 2.001 0 0 0-1.359-2.097M6.273 4.857C6.402 4.43 6.788 4 7.236 4h9.527c.448 0 .834.43.963.857L19.313 9H4.688l1.585-4.143zM7 21H5v-1h2v1zm12 0h-2v-1h2v1zm2.189-3H2.811l-.662-6.607L3 11h18l.852.393L21.189 18z"})]}),solid:Ne("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",children:Ne("path",{d:"M39.61 196.8L74.8 96.29C88.27 57.78 124.6 32 165.4 32H346.6C387.4 32 423.7 57.78 437.2 96.29L472.4 196.8C495.6 206.4 512 229.3 512 256V448C512 465.7 497.7 480 480 480H448C430.3 480 416 465.7 416 448V400H96V448C96 465.7 81.67 480 64 480H32C14.33 480 0 465.7 0 448V256C0 229.3 16.36 206.4 39.61 196.8V196.8zM109.1 192H402.9L376.8 117.4C372.3 104.6 360.2 96 346.6 96H165.4C151.8 96 139.7 104.6 135.2 117.4L109.1 192zM96 256C78.33 256 64 270.3 64 288C64 305.7 78.33 320 96 320C113.7 320 128 305.7 128 288C128 270.3 113.7 256 96 256zM416 320C433.7 320 448 305.7 448 288C448 270.3 433.7 256 416 256C398.3 256 384 270.3 384 288C384 305.7 398.3 320 416 320z"})})},symbols:{outline:Ne("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:Ne("path",{d:"M0 0h11v2H0zM4 11h3V6h4V4H0v2h4zM15.5 17c1.381 0 2.5-1.116 2.5-2.493s-1.119-2.493-2.5-2.493S13 13.13 13 14.507 14.119 17 15.5 17m0-2.986c.276 0 .5.222.5.493 0 .272-.224.493-.5.493s-.5-.221-.5-.493.224-.493.5-.493M21.5 19.014c-1.381 0-2.5 1.116-2.5 2.493S20.119 24 21.5 24s2.5-1.116 2.5-2.493-1.119-2.493-2.5-2.493m0 2.986a.497.497 0 0 1-.5-.493c0-.271.224-.493.5-.493s.5.222.5.493a.497.497 0 0 1-.5.493M22 13l-9 9 1.513 1.5 8.99-9.009zM17 11c2.209 0 4-1.119 4-2.5V2s.985-.161 1.498.949C23.01 4.055 23 6 23 6s1-1.119 1-3.135C24-.02 21 0 21 0h-2v6.347A5.853 5.853 0 0 0 17 6c-2.209 0-4 1.119-4 2.5s1.791 2.5 4 2.5M10.297 20.482l-1.475-1.585a47.54 47.54 0 0 1-1.442 1.129c-.307-.288-.989-1.016-2.045-2.183.902-.836 1.479-1.466 1.729-1.892s.376-.871.376-1.336c0-.592-.273-1.178-.818-1.759-.546-.581-1.329-.871-2.349-.871-1.008 0-1.79.293-2.344.879-.556.587-.832 1.181-.832 1.784 0 .813.419 1.748 1.256 2.805-.847.614-1.444 1.208-1.794 1.784a3.465 3.465 0 0 0-.523 1.833c0 .857.308 1.56.924 2.107.616.549 1.423.823 2.42.823 1.173 0 2.444-.379 3.813-1.137L8.235 24h2.819l-2.09-2.383 1.333-1.135zm-6.736-6.389a1.02 1.02 0 0 1 .73-.286c.31 0 .559.085.747.254a.849.849 0 0 1 .283.659c0 .518-.419 1.112-1.257 1.784-.536-.651-.805-1.231-.805-1.742a.901.901 0 0 1 .302-.669M3.74 22c-.427 0-.778-.116-1.057-.349-.279-.232-.418-.487-.418-.766 0-.594.509-1.288 1.527-2.083.968 1.134 1.717 1.946 2.248 2.438-.921.507-1.686.76-2.3.76"})}),solid:Ne("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",children:Ne("path",{d:"M500.3 7.251C507.7 13.33 512 22.41 512 31.1V175.1C512 202.5 483.3 223.1 447.1 223.1C412.7 223.1 383.1 202.5 383.1 175.1C383.1 149.5 412.7 127.1 447.1 127.1V71.03L351.1 90.23V207.1C351.1 234.5 323.3 255.1 287.1 255.1C252.7 255.1 223.1 234.5 223.1 207.1C223.1 181.5 252.7 159.1 287.1 159.1V63.1C287.1 48.74 298.8 35.61 313.7 32.62L473.7 .6198C483.1-1.261 492.9 1.173 500.3 7.251H500.3zM74.66 303.1L86.5 286.2C92.43 277.3 102.4 271.1 113.1 271.1H174.9C185.6 271.1 195.6 277.3 201.5 286.2L213.3 303.1H239.1C266.5 303.1 287.1 325.5 287.1 351.1V463.1C287.1 490.5 266.5 511.1 239.1 511.1H47.1C21.49 511.1-.0019 490.5-.0019 463.1V351.1C-.0019 325.5 21.49 303.1 47.1 303.1H74.66zM143.1 359.1C117.5 359.1 95.1 381.5 95.1 407.1C95.1 434.5 117.5 455.1 143.1 455.1C170.5 455.1 191.1 434.5 191.1 407.1C191.1 381.5 170.5 359.1 143.1 359.1zM440.3 367.1H496C502.7 367.1 508.6 372.1 510.1 378.4C513.3 384.6 511.6 391.7 506.5 396L378.5 508C372.9 512.1 364.6 513.3 358.6 508.9C352.6 504.6 350.3 496.6 353.3 489.7L391.7 399.1H336C329.3 399.1 323.4 395.9 321 389.6C318.7 383.4 320.4 376.3 325.5 371.1L453.5 259.1C459.1 255 467.4 254.7 473.4 259.1C479.4 263.4 481.6 271.4 478.7 278.3L440.3 367.1zM116.7 219.1L19.85 119.2C-8.112 90.26-6.614 42.31 24.85 15.34C51.82-8.137 93.26-3.642 118.2 21.83L128.2 32.32L137.7 21.83C162.7-3.642 203.6-8.137 231.6 15.34C262.6 42.31 264.1 90.26 236.1 119.2L139.7 219.1C133.2 225.6 122.7 225.6 116.7 219.1H116.7z"})})}},y9e={loupe:Ne("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",children:Ne("path",{d:"M12.9 14.32a8 8 0 1 1 1.41-1.41l5.35 5.33-1.42 1.42-5.33-5.34zM8 14A6 6 0 1 0 8 2a6 6 0 0 0 0 12z"})}),delete:Ne("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",children:Ne("path",{d:"M10 8.586L2.929 1.515 1.515 2.929 8.586 10l-7.071 7.071 1.414 1.414L10 11.414l7.071 7.071 1.414-1.414L11.414 10l7.071-7.071-1.414-1.414L10 8.586z"})})};var G1={categories:g9e,search:y9e};function v6(e){let{id:n,skin:t,emoji:i}=e;if(e.shortcodes){const l=e.shortcodes.match(Wf.SHORTCODES_REGEX);l&&(n=l[1],l[2]&&(t=l[2]))}if(i||(i=Wf.get(n||e.native)),!i)return e.fallback;const r=i.skins[t-1]||i.skins[0],a=r.src||(e.set!="native"&&!e.spritesheet?typeof e.getImageURL=="function"?e.getImageURL(e.set,r.unified):`https://cdn.jsdelivr.net/npm/emoji-datasource-${e.set}@15.0.1/img/${e.set}/64/${r.unified}.png`:void 0),o=typeof e.getSpritesheetURL=="function"?e.getSpritesheetURL(e.set):`https://cdn.jsdelivr.net/npm/emoji-datasource-${e.set}@15.0.1/img/${e.set}/sheets-256/64.png`;return Ne("span",{class:"emoji-mart-emoji","data-emoji-set":e.set,children:a?Ne("img",{style:{maxWidth:e.size||"1em",maxHeight:e.size||"1em",display:"inline-block"},alt:r.native||r.shortcodes,src:a}):e.set=="native"?Ne("span",{style:{fontSize:e.size,fontFamily:'"EmojiMart", "Segoe UI Emoji", "Segoe UI Symbol", "Segoe UI", "Apple Color Emoji", "Twemoji Mozilla", "Noto Color Emoji", "Android Emoji"'},children:r.native}):Ne("span",{style:{display:"block",width:e.size,height:e.size,backgroundImage:`url(${o})`,backgroundSize:`${100*Kn.sheet.cols}% ${100*Kn.sheet.rows}%`,backgroundPosition:`${100/(Kn.sheet.cols-1)*r.x}% ${100/(Kn.sheet.rows-1)*r.y}%`}})})}const b9e=typeof window<"u"&&window.HTMLElement?window.HTMLElement:Object;class RW extends b9e{static get observedAttributes(){return Object.keys(this.Props)}update(n={}){for(let t in n)this.attributeChangedCallback(t,null,n[t])}attributeChangedCallback(n,t,i){if(!this.component)return;const r=DW(n,{[n]:i},this.constructor.Props,this);this.component.componentWillReceiveProps?this.component.componentWillReceiveProps({[n]:r}):(this.component.props[n]=r,this.component.forceUpdate())}disconnectedCallback(){this.disconnected=!0,this.component&&this.component.unregister&&this.component.unregister()}constructor(n={}){if(super(),this.props=n,n.parent||n.ref){let t=null;const i=n.parent||(t=n.ref&&n.ref.current);t&&(t.innerHTML=""),i&&i.appendChild(this)}}}class w9e extends RW{setShadow(){this.attachShadow({mode:"open"})}injectStyles(n){if(!n)return;const t=document.createElement("style");t.textContent=n,this.shadowRoot.insertBefore(t,this.shadowRoot.firstChild)}constructor(n,{styles:t}={}){super(n),this.setShadow(),this.injectStyles(t)}}var PW={fallback:"",id:"",native:"",shortcodes:"",size:{value:"",transform:e=>/\D/.test(e)?e:`${e}px`},set:Ho.set,skin:Ho.skin};class NW extends RW{async connectedCallback(){const n=MW(this.props,PW,this);n.element=this,n.ref=t=>{this.component=t},await V0(),!this.disconnected&&CW(Ne(v6,{...n}),this)}constructor(n){super(n)}}ua(NW,"Props",PW);typeof customElements<"u"&&!customElements.get("em-emoji")&&customElements.define("em-emoji",NW);var P$,g6=[],N$=kn.__b,$$=kn.__r,z$=kn.diffed,L$=kn.__c,I$=kn.unmount;function k9e(){var e;for(g6.sort(function(n,t){return n.__v.__b-t.__v.__b});e=g6.pop();)if(e.__P)try{e.__H.__h.forEach(bg),e.__H.__h.forEach(y6),e.__H.__h=[]}catch(n){e.__H.__h=[],kn.__e(n,e.__v)}}kn.__b=function(e){N$&&N$(e)},kn.__r=function(e){$$&&$$(e);var n=e.__c.__H;n&&(n.__h.forEach(bg),n.__h.forEach(y6),n.__h=[])},kn.diffed=function(e){z$&&z$(e);var n=e.__c;n&&n.__H&&n.__H.__h.length&&(g6.push(n)!==1&&P$===kn.requestAnimationFrame||((P$=kn.requestAnimationFrame)||function(t){var i,r=function(){clearTimeout(a),B$&&cancelAnimationFrame(i),setTimeout(t)},a=setTimeout(r,100);B$&&(i=requestAnimationFrame(r))})(k9e))},kn.__c=function(e,n){n.some(function(t){try{t.__h.forEach(bg),t.__h=t.__h.filter(function(i){return!i.__||y6(i)})}catch(i){n.some(function(r){r.__h&&(r.__h=[])}),n=[],kn.__e(i,t.__v)}}),L$&&L$(e,n)},kn.unmount=function(e){I$&&I$(e);var n,t=e.__c;t&&t.__H&&(t.__H.__.forEach(function(i){try{bg(i)}catch(r){n=r}}),n&&kn.__e(n,t.__v))};var B$=typeof requestAnimationFrame=="function";function bg(e){var n=e.__c;typeof n=="function"&&(e.__c=void 0,n())}function y6(e){e.__c=e.__()}function _9e(e,n){for(var t in n)e[t]=n[t];return e}function F$(e,n){for(var t in e)if(t!=="__source"&&!(t in n))return!0;for(var i in n)if(i!=="__source"&&e[i]!==n[i])return!0;return!1}function Y1(e){this.props=e}(Y1.prototype=new fo).isPureReactComponent=!0,Y1.prototype.shouldComponentUpdate=function(e,n){return F$(this.props,e)||F$(this.state,n)};var q$=kn.__b;kn.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),q$&&q$(e)};var x9e=kn.__e;kn.__e=function(e,n,t){if(e.then){for(var i,r=n;r=r.__;)if((i=r.__c)&&i.__c)return n.__e==null&&(n.__e=t.__e,n.__k=t.__k),i.__c(e,n)}x9e(e,n,t)};var H$=kn.unmount;function Z3(){this.__u=0,this.t=null,this.__b=null}function $W(e){var n=e.__.__c;return n&&n.__e&&n.__e(e)}function ig(){this.u=null,this.o=null}kn.unmount=function(e){var n=e.__c;n&&n.__R&&n.__R(),n&&e.__h===!0&&(e.type=null),H$&&H$(e)},(Z3.prototype=new fo).__c=function(e,n){var t=n.__c,i=this;i.t==null&&(i.t=[]),i.t.push(t);var r=$W(i.__v),a=!1,o=function(){a||(a=!0,t.__R=null,r?r(l):l())};t.__R=o;var l=function(){if(!--i.__u){if(i.state.__e){var c=i.state.__e;i.__v.__k[0]=(function d(p,v,b){return p&&(p.__v=null,p.__k=p.__k&&p.__k.map(function(w){return d(w,v,b)}),p.__c&&p.__c.__P===v&&(p.__e&&b.insertBefore(p.__e,p.__d),p.__c.__e=!0,p.__c.__P=b)),p})(c,c.__c.__P,c.__c.__O)}var h;for(i.setState({__e:i.__b=null});h=i.t.pop();)h.forceUpdate()}},f=n.__h===!0;i.__u++||f||i.setState({__e:i.__b=i.__v.__k[0]}),e.then(o,o)},Z3.prototype.componentWillUnmount=function(){this.t=[]},Z3.prototype.render=function(e,n){if(this.__b){if(this.__v.__k){var t=document.createElement("div"),i=this.__v.__k[0].__c;this.__v.__k[0]=(function a(o,l,f){return o&&(o.__c&&o.__c.__H&&(o.__c.__H.__.forEach(function(c){typeof c.__c=="function"&&c.__c()}),o.__c.__H=null),(o=_9e({},o)).__c!=null&&(o.__c.__P===f&&(o.__c.__P=l),o.__c=null),o.__k=o.__k&&o.__k.map(function(c){return a(c,l,f)})),o})(this.__b,t,i.__O=i.__P)}this.__b=null}var r=n.__e&&h6(xc,null,e.fallback);return r&&(r.__h=null),[h6(xc,null,n.__e?null:e.children),r]};var U$=function(e,n,t){if(++t[1]===t[0]&&e.o.delete(n),e.props.revealOrder&&(e.props.revealOrder[0]!=="t"||!e.o.size))for(t=e.u;t;){for(;t.length>3;)t.pop()();if(t[1]{const r=t.name||Wi.categories[t.id],a=!this.props.unfocused&&t.id==this.state.categoryId;return a&&(n=i),Ne("button",{"aria-label":r,"aria-selected":a||void 0,title:r,type:"button",class:"flex flex-grow flex-center",onMouseDown:o=>o.preventDefault(),onClick:()=>{this.props.onClick({category:t,i})},children:this.renderIcon(t)})}),Ne("div",{class:"bar",style:{width:`${100/this.categories.length}%`,opacity:n==null?0:1,transform:this.props.dir==="rtl"?`scaleX(-1) translateX(${n*100}%)`:`translateX(${n*100}%)`}})]})})}constructor(){super(),this.categories=Kn.categories.filter(n=>!n.target),this.state={categoryId:this.categories[0].id}}}class R9e extends Y1{shouldComponentUpdate(n){for(let t in n)if(t!="children"&&n[t]!=this.props[t])return!0;return!1}render(){return this.props.children}}const rg={rowsPerRender:10};class P9e extends fo{getInitialState(n=this.props){return{skin:tl.get("skin")||n.skin,theme:this.initTheme(n.theme)}}componentWillMount(){this.dir=Wi.rtl?"rtl":"ltr",this.refs={menu:Fo(),navigation:Fo(),scroll:Fo(),search:Fo(),searchInput:Fo(),skinToneButton:Fo(),skinToneRadio:Fo()},this.initGrid(),this.props.stickySearch==!1&&this.props.searchPosition=="sticky"&&(console.warn("[EmojiMart] Deprecation warning: `stickySearch` has been renamed `searchPosition`."),this.props.searchPosition="static")}componentDidMount(){if(this.register(),this.shadowRoot=this.base.parentNode,this.props.autoFocus){const{searchInput:n}=this.refs;n.current&&n.current.focus()}}componentWillReceiveProps(n){this.nextState||(this.nextState={});for(const t in n)this.nextState[t]=n[t];clearTimeout(this.nextStateTimer),this.nextStateTimer=setTimeout(()=>{let t=!1;for(const r in this.nextState)this.props[r]=this.nextState[r],(r==="custom"||r==="categories")&&(t=!0);delete this.nextState;const i=this.getInitialState();if(t)return this.reset(i);this.setState(i)})}componentWillUnmount(){this.unregister()}async reset(n={}){await V0(this.props),this.initGrid(),this.unobserve(),this.setState(n,()=>{this.observeCategories(),this.observeRows()})}register(){document.addEventListener("click",this.handleClickOutside),this.observe()}unregister(){var n;document.removeEventListener("click",this.handleClickOutside),(n=this.darkMedia)==null||n.removeEventListener("change",this.darkMediaCallback),this.unobserve()}observe(){this.observeCategories(),this.observeRows()}unobserve({except:n=[]}={}){Array.isArray(n)||(n=[n]);for(const t of this.observers)n.includes(t)||t.disconnect();this.observers=[].concat(n)}initGrid(){const{categories:n}=Kn;this.refs.categories=new Map;const t=Kn.categories.map(r=>r.id).join(",");this.navKey&&this.navKey!=t&&this.refs.scroll.current&&(this.refs.scroll.current.scrollTop=0),this.navKey=t,this.grid=[],this.grid.setsize=0;const i=(r,a)=>{const o=[];o.__categoryId=a.id,o.__index=r.length,this.grid.push(o);const l=this.grid.length-1,f=l%rg.rowsPerRender?{}:Fo();return f.index=l,f.posinset=this.grid.setsize+1,r.push(f),o};for(let r of n){const a=[];let o=i(a,r);for(let l of r.emojis)o.length==this.getPerLine()&&(o=i(a,r)),this.grid.setsize+=1,o.push(l);this.refs.categories.set(r.id,{root:Fo(),rows:a})}}initTheme(n){if(n!="auto")return n;if(!this.darkMedia){if(this.darkMedia=matchMedia("(prefers-color-scheme: dark)"),this.darkMedia.media.match(/^not/))return"light";this.darkMedia.addEventListener("change",this.darkMediaCallback)}return this.darkMedia.matches?"dark":"light"}initDynamicPerLine(n=this.props){if(!n.dynamicWidth)return;const{element:t,emojiButtonSize:i}=n,r=()=>{const{width:o}=t.getBoundingClientRect();return Math.floor(o/i)},a=new ResizeObserver(()=>{this.unobserve({except:a}),this.setState({perLine:r()},()=>{this.initGrid(),this.forceUpdate(()=>{this.observeCategories(),this.observeRows()})})});return a.observe(t),this.observers.push(a),r()}getPerLine(){return this.state.perLine||this.props.perLine}getEmojiByPos([n,t]){const i=this.state.searchResults||this.grid,r=i[n]&&i[n][t];if(r)return Wf.get(r)}observeCategories(){const n=this.refs.navigation.current;if(!n)return;const t=new Map,i=o=>{o!=n.state.categoryId&&n.setState({categoryId:o})},r={root:this.refs.scroll.current,threshold:[0,1]},a=new IntersectionObserver(o=>{for(const f of o){const c=f.target.dataset.id;t.set(c,f.intersectionRatio)}const l=[...t];for(const[f,c]of l)if(c){i(f);break}},r);for(const{root:o}of this.refs.categories.values())a.observe(o.current);this.observers.push(a)}observeRows(){const n={...this.state.visibleRows},t=new IntersectionObserver(i=>{for(const r of i){const a=parseInt(r.target.dataset.index);r.isIntersecting?n[a]=!0:delete n[a]}this.setState({visibleRows:n})},{root:this.refs.scroll.current,rootMargin:`${this.props.emojiButtonSize*(rg.rowsPerRender+5)}px 0px ${this.props.emojiButtonSize*rg.rowsPerRender}px`});for(const{rows:i}of this.refs.categories.values())for(const r of i)r.current&&t.observe(r.current);this.observers.push(t)}preventDefault(n){n.preventDefault()}unfocusSearch(){const n=this.refs.searchInput.current;n&&n.blur()}navigate({e:n,input:t,left:i,right:r,up:a,down:o}){const l=this.state.searchResults||this.grid;if(!l.length)return;let[f,c]=this.state.pos;const h=(()=>{if(f==0&&c==0&&!n.repeat&&(i||a))return null;if(f==-1)return!n.repeat&&(r||o)&&t.selectionStart==t.value.length?[0,0]:null;if(i||r){let d=l[f];const p=i?-1:1;if(c+=p,!d[c]){if(f+=p,d=l[f],!d)return f=i?0:l.length-1,c=i?0:l[f].length-1,[f,c];c=i?d.length-1:0}return[f,c]}if(a||o){f+=a?-1:1;const d=l[f];return d?(d[c]||(c=d.length-1),[f,c]):(f=a?0:l.length-1,c=a?0:l[f].length-1,[f,c])}})();if(h)n.preventDefault();else{this.state.pos[0]>-1&&this.setState({pos:[-1,-1]});return}this.setState({pos:h,keyboard:!0},()=>{this.scrollTo({row:h[0]})})}scrollTo({categoryId:n,row:t}){const i=this.state.searchResults||this.grid;if(!i.length)return;const r=this.refs.scroll.current,a=r.getBoundingClientRect();let o=0;if(t>=0&&(n=i[t].__categoryId),n&&(o=(this.refs[n]||this.refs.categories.get(n).root).current.getBoundingClientRect().top-(a.top-r.scrollTop)+1),t>=0)if(!t)o=0;else{const l=i[t].__index,f=o+l*this.props.emojiButtonSize,c=f+this.props.emojiButtonSize+this.props.emojiButtonSize*.88;if(fr.scrollTop+a.height)o=c-a.height;else return}this.ignoreMouse(),r.scrollTop=o}ignoreMouse(){this.mouseIsIgnored=!0,clearTimeout(this.ignoreMouseTimer),this.ignoreMouseTimer=setTimeout(()=>{delete this.mouseIsIgnored},100)}handleEmojiOver(n){this.mouseIsIgnored||this.state.showSkins||this.setState({pos:n||[-1,-1],keyboard:!1})}handleEmojiClick({e:n,emoji:t,pos:i}){if(this.props.onEmojiSelect&&(!t&&i&&(t=this.getEmojiByPos(i)),t)){const r=v9e(t,{skinIndex:this.state.skin-1});this.props.maxFrequentRows&&OW.add(r,this.props),this.props.onEmojiSelect(r,n)}}closeSkins(){this.state.showSkins&&(this.setState({showSkins:null,tempSkin:null}),this.base.removeEventListener("click",this.handleBaseClick),this.base.removeEventListener("keydown",this.handleBaseKeydown))}handleSkinMouseOver(n){this.setState({tempSkin:n})}handleSkinClick(n){this.ignoreMouse(),this.closeSkins(),this.setState({skin:n,tempSkin:null}),tl.set("skin",n)}renderNav(){return Ne(D9e,{ref:this.refs.navigation,icons:this.props.icons,theme:this.state.theme,dir:this.dir,unfocused:!!this.state.searchResults,position:this.props.navPosition,onClick:this.handleCategoryClick},this.navKey)}renderPreview(){const n=this.getEmojiByPos(this.state.pos),t=this.state.searchResults&&!this.state.searchResults.length;return Ne("div",{id:"preview",class:"flex flex-middle",dir:this.dir,"data-position":this.props.previewPosition,children:[Ne("div",{class:"flex flex-middle flex-grow",children:[Ne("div",{class:"flex flex-auto flex-middle flex-center",style:{height:this.props.emojiButtonSize,fontSize:this.props.emojiButtonSize},children:Ne(v6,{emoji:n,id:t?this.props.noResultsEmoji||"cry":this.props.previewEmoji||(this.props.previewPosition=="top"?"point_down":"point_up"),set:this.props.set,size:this.props.emojiButtonSize,skin:this.state.tempSkin||this.state.skin,spritesheet:!0,getSpritesheetURL:this.props.getSpritesheetURL})}),Ne("div",{class:`margin-${this.dir[0]}`,children:n||t?Ne("div",{class:`padding-${this.dir[2]} align-${this.dir[0]}`,children:[Ne("div",{class:"preview-title ellipsis",children:n?n.name:Wi.search_no_results_1}),Ne("div",{class:"preview-subtitle ellipsis color-c",children:n?n.skins[0].shortcodes:Wi.search_no_results_2})]}):Ne("div",{class:"preview-placeholder color-c",children:Wi.pick})})]}),!n&&this.props.skinTonePosition=="preview"&&this.renderSkinToneButton()]})}renderEmojiButton(n,{pos:t,posinset:i,grid:r}){const a=this.props.emojiButtonSize,o=this.state.tempSkin||this.state.skin,f=(n.skins[o-1]||n.skins[0]).native,c=m9e(this.state.pos,t),h=t.concat(n.id).join("");return Ne(R9e,{selected:c,skin:o,size:a,children:Ne("button",{"aria-label":f,"aria-selected":c||void 0,"aria-posinset":i,"aria-setsize":r.setsize,"data-keyboard":this.state.keyboard,title:this.props.previewPosition=="none"?n.name:void 0,type:"button",class:"flex flex-center flex-middle",tabindex:"-1",onClick:d=>this.handleEmojiClick({e:d,emoji:n}),onMouseEnter:()=>this.handleEmojiOver(t),onMouseLeave:()=>this.handleEmojiOver(),style:{width:this.props.emojiButtonSize,height:this.props.emojiButtonSize,fontSize:this.props.emojiSize,lineHeight:0},children:[Ne("div",{"aria-hidden":"true",class:"background",style:{borderRadius:this.props.emojiButtonRadius,backgroundColor:this.props.emojiButtonColors?this.props.emojiButtonColors[(i-1)%this.props.emojiButtonColors.length]:void 0}}),Ne(v6,{emoji:n,set:this.props.set,size:this.props.emojiSize,skin:o,spritesheet:!0,getSpritesheetURL:this.props.getSpritesheetURL})]})},h)}renderSearch(){const n=this.props.previewPosition=="none"||this.props.skinTonePosition=="search";return Ne("div",{children:[Ne("div",{class:"spacer"}),Ne("div",{class:"flex flex-middle",children:[Ne("div",{class:"search relative flex-grow",children:[Ne("input",{type:"search",ref:this.refs.searchInput,placeholder:Wi.search,onClick:this.handleSearchClick,onInput:this.handleSearchInput,onKeyDown:this.handleSearchKeyDown,autoComplete:"off"}),Ne("span",{class:"icon loupe flex",children:G1.search.loupe}),this.state.searchResults&&Ne("button",{title:"Clear","aria-label":"Clear",type:"button",class:"icon delete flex",onClick:this.clearSearch,onMouseDown:this.preventDefault,children:G1.search.delete})]}),n&&this.renderSkinToneButton()]})]})}renderSearchResults(){const{searchResults:n}=this.state;return n?Ne("div",{class:"category",ref:this.refs.search,children:[Ne("div",{class:`sticky padding-small align-${this.dir[0]}`,children:Wi.categories.search}),Ne("div",{children:n.length?n.map((t,i)=>Ne("div",{class:"flex",children:t.map((r,a)=>this.renderEmojiButton(r,{pos:[i,a],posinset:i*this.props.perLine+a+1,grid:n}))})):Ne("div",{class:`padding-small align-${this.dir[0]}`,children:this.props.onAddCustomEmoji&&Ne("a",{onClick:this.props.onAddCustomEmoji,children:Wi.add_custom})})})]}):null}renderCategories(){const{categories:n}=Kn,t=!!this.state.searchResults,i=this.getPerLine();return Ne("div",{style:{visibility:t?"hidden":void 0,display:t?"none":void 0,height:"100%"},children:n.map(r=>{const{root:a,rows:o}=this.refs.categories.get(r.id);return Ne("div",{"data-id":r.target?r.target.id:r.id,class:"category",ref:a,children:[Ne("div",{class:`sticky padding-small align-${this.dir[0]}`,children:r.name||Wi.categories[r.id]}),Ne("div",{class:"relative",style:{height:o.length*this.props.emojiButtonSize},children:o.map((l,f)=>{const c=l.index-l.index%rg.rowsPerRender,h=this.state.visibleRows[c],d="current"in l?l:void 0;if(!h&&!d)return null;const p=f*i,v=p+i,b=r.emojis.slice(p,v);return b.length{if(!w)return Ne("div",{style:{width:this.props.emojiButtonSize,height:this.props.emojiButtonSize}});const _=Wf.get(w);return this.renderEmojiButton(_,{pos:[l.index,k],posinset:l.posinset+k,grid:this.grid})})},l.index)})})]})})})}renderSkinToneButton(){return this.props.skinTonePosition=="none"?null:Ne("div",{class:"flex flex-auto flex-center flex-middle",style:{position:"relative",width:this.props.emojiButtonSize,height:this.props.emojiButtonSize},children:Ne("button",{type:"button",ref:this.refs.skinToneButton,class:"skin-tone-button flex flex-auto flex-center flex-middle","aria-selected":this.state.showSkins?"":void 0,"aria-label":Wi.skins.choose,title:Wi.skins.choose,onClick:this.openSkins,style:{width:this.props.emojiSize,height:this.props.emojiSize},children:Ne("span",{class:`skin-tone skin-tone-${this.state.skin}`})})})}renderLiveRegion(){const n=this.getEmojiByPos(this.state.pos),t=n?n.name:"";return Ne("div",{"aria-live":"polite",class:"sr-only",children:t})}renderSkins(){const t=this.refs.skinToneButton.current.getBoundingClientRect(),i=this.base.getBoundingClientRect(),r={};return this.dir=="ltr"?r.right=i.right-t.right-3:r.left=t.left-i.left-3,this.props.previewPosition=="bottom"&&this.props.skinTonePosition=="preview"?r.bottom=i.bottom-t.top+6:(r.top=t.bottom-i.top+3,r.bottom="auto"),Ne("div",{ref:this.refs.menu,role:"radiogroup",dir:this.dir,"aria-label":Wi.skins.choose,class:"menu hidden","data-position":r.top?"top":"bottom",style:r,children:[...Array(6).keys()].map(a=>{const o=a+1,l=this.state.skin==o;return Ne("div",{children:[Ne("input",{type:"radio",name:"skin-tone",value:o,"aria-label":Wi.skins[o],ref:l?this.refs.skinToneRadio:null,defaultChecked:l,onChange:()=>this.handleSkinMouseOver(o),onKeyDown:f=>{(f.code=="Enter"||f.code=="Space"||f.code=="Tab")&&(f.preventDefault(),this.handleSkinClick(o))}}),Ne("button",{"aria-hidden":"true",tabindex:"-1",onClick:()=>this.handleSkinClick(o),onMouseEnter:()=>this.handleSkinMouseOver(o),onMouseLeave:()=>this.handleSkinMouseOver(),class:"option flex flex-grow flex-middle",children:[Ne("span",{class:`skin-tone skin-tone-${o}`}),Ne("span",{class:"margin-small-lr",children:Wi.skins[o]})]})]})})})}render(){const n=this.props.perLine*this.props.emojiButtonSize;return Ne("section",{id:"root",class:"flex flex-column",dir:this.dir,style:{width:this.props.dynamicWidth?"100%":`calc(${n}px + (var(--padding) + var(--sidebar-width)))`},"data-emoji-set":this.props.set,"data-theme":this.state.theme,"data-menu":this.state.showSkins?"":void 0,children:[this.props.previewPosition=="top"&&this.renderPreview(),this.props.navPosition=="top"&&this.renderNav(),this.props.searchPosition=="sticky"&&Ne("div",{class:"padding-lr",children:this.renderSearch()}),Ne("div",{ref:this.refs.scroll,class:"scroll flex-grow padding-lr",children:Ne("div",{style:{width:this.props.dynamicWidth?"100%":n,height:"100%"},children:[this.props.searchPosition=="static"&&this.renderSearch(),this.renderSearchResults(),this.renderCategories()]})}),this.props.navPosition=="bottom"&&this.renderNav(),this.props.previewPosition=="bottom"&&this.renderPreview(),this.state.showSkins&&this.renderSkins(),this.renderLiveRegion()]})}constructor(n){super(),ua(this,"darkMediaCallback",()=>{this.props.theme=="auto"&&this.setState({theme:this.darkMedia.matches?"dark":"light"})}),ua(this,"handleClickOutside",t=>{const{element:i}=this.props;t.target!=i&&(this.state.showSkins&&this.closeSkins(),this.props.onClickOutside&&this.props.onClickOutside(t))}),ua(this,"handleBaseClick",t=>{this.state.showSkins&&(t.target.closest(".menu")||(t.preventDefault(),t.stopImmediatePropagation(),this.closeSkins()))}),ua(this,"handleBaseKeydown",t=>{this.state.showSkins&&t.key=="Escape"&&(t.preventDefault(),t.stopImmediatePropagation(),this.closeSkins())}),ua(this,"handleSearchClick",()=>{this.getEmojiByPos(this.state.pos)&&this.setState({pos:[-1,-1]})}),ua(this,"handleSearchInput",async()=>{const t=this.refs.searchInput.current;if(!t)return;const{value:i}=t,r=await Wf.search(i),a=()=>{this.refs.scroll.current&&(this.refs.scroll.current.scrollTop=0)};if(!r)return this.setState({searchResults:r,pos:[-1,-1]},a);const o=t.selectionStart==t.value.length?[0,0]:[-1,-1],l=[];l.setsize=r.length;let f=null;for(let c of r)(!l.length||f.length==this.getPerLine())&&(f=[],f.__categoryId="search",f.__index=l.length,l.push(f)),f.push(c);this.ignoreMouse(),this.setState({searchResults:l,pos:o},a)}),ua(this,"handleSearchKeyDown",t=>{const i=t.currentTarget;switch(t.stopImmediatePropagation(),t.key){case"ArrowLeft":this.navigate({e:t,input:i,left:!0});break;case"ArrowRight":this.navigate({e:t,input:i,right:!0});break;case"ArrowUp":this.navigate({e:t,input:i,up:!0});break;case"ArrowDown":this.navigate({e:t,input:i,down:!0});break;case"Enter":t.preventDefault(),this.handleEmojiClick({e:t,pos:this.state.pos});break;case"Escape":t.preventDefault(),this.state.searchResults?this.clearSearch():this.unfocusSearch();break}}),ua(this,"clearSearch",()=>{const t=this.refs.searchInput.current;t&&(t.value="",t.focus(),this.handleSearchInput())}),ua(this,"handleCategoryClick",({category:t,i})=>{this.scrollTo(i==0?{row:-1}:{categoryId:t.id})}),ua(this,"openSkins",t=>{const{currentTarget:i}=t,r=i.getBoundingClientRect();this.setState({showSkins:r},async()=>{await p9e(2);const a=this.refs.menu.current;a&&(a.classList.remove("hidden"),this.refs.skinToneRadio.current.focus(),this.base.addEventListener("click",this.handleBaseClick,!0),this.base.addEventListener("keydown",this.handleBaseKeydown,!0))})}),this.observers=[],this.state={pos:[-1,-1],perLine:this.initDynamicPerLine(n),visibleRows:{0:!0},...this.getInitialState(n)}}}class CA extends w9e{async connectedCallback(){const n=MW(this.props,Ho,this);n.element=this,n.ref=t=>{this.component=t},await V0(n),!this.disconnected&&CW(Ne(P9e,{...n}),this.shadowRoot)}constructor(n){super(n,{styles:hW(zW)})}}ua(CA,"Props",Ho);typeof customElements<"u"&&!customElements.get("em-emoji-picker")&&customElements.define("em-emoji-picker",CA);var zW={};zW=`:host { - width: min-content; - height: 435px; - min-height: 230px; - border-radius: var(--border-radius); - box-shadow: var(--shadow); - --border-radius: 10px; - --category-icon-size: 18px; - --font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif; - --font-size: 15px; - --preview-placeholder-size: 21px; - --preview-title-size: 1.1em; - --preview-subtitle-size: .9em; - --shadow-color: 0deg 0% 0%; - --shadow: .3px .5px 2.7px hsl(var(--shadow-color) / .14), .4px .8px 1px -3.2px hsl(var(--shadow-color) / .14), 1px 2px 2.5px -4.5px hsl(var(--shadow-color) / .14); - display: flex; -} - -[data-theme="light"] { - --em-rgb-color: var(--rgb-color, 34, 36, 39); - --em-rgb-accent: var(--rgb-accent, 34, 102, 237); - --em-rgb-background: var(--rgb-background, 255, 255, 255); - --em-rgb-input: var(--rgb-input, 255, 255, 255); - --em-color-border: var(--color-border, rgba(0, 0, 0, .05)); - --em-color-border-over: var(--color-border-over, rgba(0, 0, 0, .1)); -} - -[data-theme="dark"] { - --em-rgb-color: var(--rgb-color, 222, 222, 221); - --em-rgb-accent: var(--rgb-accent, 58, 130, 247); - --em-rgb-background: var(--rgb-background, 21, 22, 23); - --em-rgb-input: var(--rgb-input, 0, 0, 0); - --em-color-border: var(--color-border, rgba(255, 255, 255, .1)); - --em-color-border-over: var(--color-border-over, rgba(255, 255, 255, .2)); -} - -#root { - --color-a: rgb(var(--em-rgb-color)); - --color-b: rgba(var(--em-rgb-color), .65); - --color-c: rgba(var(--em-rgb-color), .45); - --padding: 12px; - --padding-small: calc(var(--padding) / 2); - --sidebar-width: 16px; - --duration: 225ms; - --duration-fast: 125ms; - --duration-instant: 50ms; - --easing: cubic-bezier(.4, 0, .2, 1); - width: 100%; - text-align: left; - border-radius: var(--border-radius); - background-color: rgb(var(--em-rgb-background)); - position: relative; -} - -@media (prefers-reduced-motion) { - #root { - --duration: 0; - --duration-fast: 0; - --duration-instant: 0; - } -} - -#root[data-menu] button { - cursor: auto; -} - -#root[data-menu] .menu button { - cursor: pointer; -} - -:host, #root, input, button { - color: rgb(var(--em-rgb-color)); - font-family: var(--font-family); - font-size: var(--font-size); - -webkit-font-smoothing: antialiased; - -moz-osx-font-smoothing: grayscale; - line-height: normal; -} - -*, :before, :after { - box-sizing: border-box; - min-width: 0; - margin: 0; - padding: 0; -} - -.relative { - position: relative; -} - -.flex { - display: flex; -} - -.flex-auto { - flex: none; -} - -.flex-center { - justify-content: center; -} - -.flex-column { - flex-direction: column; -} - -.flex-grow { - flex: auto; -} - -.flex-middle { - align-items: center; -} - -.flex-wrap { - flex-wrap: wrap; -} - -.padding { - padding: var(--padding); -} - -.padding-t { - padding-top: var(--padding); -} - -.padding-lr { - padding-left: var(--padding); - padding-right: var(--padding); -} - -.padding-r { - padding-right: var(--padding); -} - -.padding-small { - padding: var(--padding-small); -} - -.padding-small-b { - padding-bottom: var(--padding-small); -} - -.padding-small-lr { - padding-left: var(--padding-small); - padding-right: var(--padding-small); -} - -.margin { - margin: var(--padding); -} - -.margin-r { - margin-right: var(--padding); -} - -.margin-l { - margin-left: var(--padding); -} - -.margin-small-l { - margin-left: var(--padding-small); -} - -.margin-small-lr { - margin-left: var(--padding-small); - margin-right: var(--padding-small); -} - -.align-l { - text-align: left; -} - -.align-r { - text-align: right; -} - -.color-a { - color: var(--color-a); -} - -.color-b { - color: var(--color-b); -} - -.color-c { - color: var(--color-c); -} - -.ellipsis { - white-space: nowrap; - max-width: 100%; - width: auto; - text-overflow: ellipsis; - overflow: hidden; -} - -.sr-only { - width: 1px; - height: 1px; - position: absolute; - top: auto; - left: -10000px; - overflow: hidden; -} - -a { - cursor: pointer; - color: rgb(var(--em-rgb-accent)); -} - -a:hover { - text-decoration: underline; -} - -.spacer { - height: 10px; -} - -[dir="rtl"] .scroll { - padding-left: 0; - padding-right: var(--padding); -} - -.scroll { - padding-right: 0; - overflow-x: hidden; - overflow-y: auto; -} - -.scroll::-webkit-scrollbar { - width: var(--sidebar-width); - height: var(--sidebar-width); -} - -.scroll::-webkit-scrollbar-track { - border: 0; -} - -.scroll::-webkit-scrollbar-button { - width: 0; - height: 0; - display: none; -} - -.scroll::-webkit-scrollbar-corner { - background-color: rgba(0, 0, 0, 0); -} - -.scroll::-webkit-scrollbar-thumb { - min-height: 20%; - min-height: 65px; - border: 4px solid rgb(var(--em-rgb-background)); - border-radius: 8px; -} - -.scroll::-webkit-scrollbar-thumb:hover { - background-color: var(--em-color-border-over) !important; -} - -.scroll:hover::-webkit-scrollbar-thumb { - background-color: var(--em-color-border); -} - -.sticky { - z-index: 1; - background-color: rgba(var(--em-rgb-background), .9); - -webkit-backdrop-filter: blur(4px); - backdrop-filter: blur(4px); - font-weight: 500; - position: sticky; - top: -1px; -} - -[dir="rtl"] .search input[type="search"] { - padding: 10px 2.2em 10px 2em; -} - -[dir="rtl"] .search .loupe { - left: auto; - right: .7em; -} - -[dir="rtl"] .search .delete { - left: .7em; - right: auto; -} - -.search { - z-index: 2; - position: relative; -} - -.search input, .search button { - font-size: calc(var(--font-size) - 1px); -} - -.search input[type="search"] { - width: 100%; - background-color: var(--em-color-border); - transition-duration: var(--duration); - transition-property: background-color, box-shadow; - transition-timing-function: var(--easing); - border: 0; - border-radius: 10px; - outline: 0; - padding: 10px 2em 10px 2.2em; - display: block; -} - -.search input[type="search"]::-ms-input-placeholder { - color: inherit; - opacity: .6; -} - -.search input[type="search"]::placeholder { - color: inherit; - opacity: .6; -} - -.search input[type="search"], .search input[type="search"]::-webkit-search-decoration, .search input[type="search"]::-webkit-search-cancel-button, .search input[type="search"]::-webkit-search-results-button, .search input[type="search"]::-webkit-search-results-decoration { - -webkit-appearance: none; - -ms-appearance: none; - appearance: none; -} - -.search input[type="search"]:focus { - background-color: rgb(var(--em-rgb-input)); - box-shadow: inset 0 0 0 1px rgb(var(--em-rgb-accent)), 0 1px 3px rgba(65, 69, 73, .2); -} - -.search .icon { - z-index: 1; - color: rgba(var(--em-rgb-color), .7); - position: absolute; - top: 50%; - transform: translateY(-50%); -} - -.search .loupe { - pointer-events: none; - left: .7em; -} - -.search .delete { - right: .7em; -} - -svg { - fill: currentColor; - width: 1em; - height: 1em; -} - -button { - -webkit-appearance: none; - -ms-appearance: none; - appearance: none; - cursor: pointer; - color: currentColor; - background-color: rgba(0, 0, 0, 0); - border: 0; -} - -#nav { - z-index: 2; - padding-top: 12px; - padding-bottom: 12px; - padding-right: var(--sidebar-width); - position: relative; -} - -#nav button { - color: var(--color-b); - transition: color var(--duration) var(--easing); -} - -#nav button:hover { - color: var(--color-a); -} - -#nav svg, #nav img { - width: var(--category-icon-size); - height: var(--category-icon-size); -} - -#nav[dir="rtl"] .bar { - left: auto; - right: 0; -} - -#nav .bar { - width: 100%; - height: 3px; - background-color: rgb(var(--em-rgb-accent)); - transition: transform var(--duration) var(--easing); - border-radius: 3px 3px 0 0; - position: absolute; - bottom: -12px; - left: 0; -} - -#nav button[aria-selected] { - color: rgb(var(--em-rgb-accent)); -} - -#preview { - z-index: 2; - padding: calc(var(--padding) + 4px) var(--padding); - padding-right: var(--sidebar-width); - position: relative; -} - -#preview .preview-placeholder { - font-size: var(--preview-placeholder-size); -} - -#preview .preview-title { - font-size: var(--preview-title-size); -} - -#preview .preview-subtitle { - font-size: var(--preview-subtitle-size); -} - -#nav:before, #preview:before { - content: ""; - height: 2px; - position: absolute; - left: 0; - right: 0; -} - -#nav[data-position="top"]:before, #preview[data-position="top"]:before { - background: linear-gradient(to bottom, var(--em-color-border), transparent); - top: 100%; -} - -#nav[data-position="bottom"]:before, #preview[data-position="bottom"]:before { - background: linear-gradient(to top, var(--em-color-border), transparent); - bottom: 100%; -} - -.category:last-child { - min-height: calc(100% + 1px); -} - -.category button { - font-family: -apple-system, BlinkMacSystemFont, Helvetica Neue, sans-serif; - position: relative; -} - -.category button > * { - position: relative; -} - -.category button .background { - opacity: 0; - background-color: var(--em-color-border); - transition: opacity var(--duration-fast) var(--easing) var(--duration-instant); - position: absolute; - top: 0; - bottom: 0; - left: 0; - right: 0; -} - -.category button:hover .background { - transition-duration: var(--duration-instant); - transition-delay: 0s; -} - -.category button[aria-selected] .background { - opacity: 1; -} - -.category button[data-keyboard] .background { - transition: none; -} - -.row { - width: 100%; - position: absolute; - top: 0; - left: 0; -} - -.skin-tone-button { - border: 1px solid rgba(0, 0, 0, 0); - border-radius: 100%; -} - -.skin-tone-button:hover { - border-color: var(--em-color-border); -} - -.skin-tone-button:active .skin-tone { - transform: scale(.85) !important; -} - -.skin-tone-button .skin-tone { - transition: transform var(--duration) var(--easing); -} - -.skin-tone-button[aria-selected] { - background-color: var(--em-color-border); - border-top-color: rgba(0, 0, 0, .05); - border-bottom-color: rgba(0, 0, 0, 0); - border-left-width: 0; - border-right-width: 0; -} - -.skin-tone-button[aria-selected] .skin-tone { - transform: scale(.9); -} - -.menu { - z-index: 2; - white-space: nowrap; - border: 1px solid var(--em-color-border); - background-color: rgba(var(--em-rgb-background), .9); - -webkit-backdrop-filter: blur(4px); - backdrop-filter: blur(4px); - transition-property: opacity, transform; - transition-duration: var(--duration); - transition-timing-function: var(--easing); - border-radius: 10px; - padding: 4px; - position: absolute; - box-shadow: 1px 1px 5px rgba(0, 0, 0, .05); -} - -.menu.hidden { - opacity: 0; -} - -.menu[data-position="bottom"] { - transform-origin: 100% 100%; -} - -.menu[data-position="bottom"].hidden { - transform: scale(.9)rotate(-3deg)translateY(5%); -} - -.menu[data-position="top"] { - transform-origin: 100% 0; -} - -.menu[data-position="top"].hidden { - transform: scale(.9)rotate(3deg)translateY(-5%); -} - -.menu input[type="radio"] { - clip: rect(0 0 0 0); - width: 1px; - height: 1px; - border: 0; - margin: 0; - padding: 0; - position: absolute; - overflow: hidden; -} - -.menu input[type="radio"]:checked + .option { - box-shadow: 0 0 0 2px rgb(var(--em-rgb-accent)); -} - -.option { - width: 100%; - border-radius: 6px; - padding: 4px 6px; -} - -.option:hover { - color: #fff; - background-color: rgb(var(--em-rgb-accent)); -} - -.skin-tone { - width: 16px; - height: 16px; - border-radius: 100%; - display: inline-block; - position: relative; - overflow: hidden; -} - -.skin-tone:after { - content: ""; - mix-blend-mode: overlay; - background: linear-gradient(rgba(255, 255, 255, .2), rgba(0, 0, 0, 0)); - border: 1px solid rgba(0, 0, 0, .8); - border-radius: 100%; - position: absolute; - top: 0; - bottom: 0; - left: 0; - right: 0; - box-shadow: inset 0 -2px 3px #000, inset 0 1px 2px #fff; -} - -.skin-tone-1 { - background-color: #ffc93a; -} - -.skin-tone-2 { - background-color: #ffdab7; -} - -.skin-tone-3 { - background-color: #e7b98f; -} - -.skin-tone-4 { - background-color: #c88c61; -} - -.skin-tone-5 { - background-color: #a46134; -} - -.skin-tone-6 { - background-color: #5d4437; -} - -[data-index] { - justify-content: space-between; -} - -[data-emoji-set="twitter"] .skin-tone:after { - box-shadow: none; - border-color: rgba(0, 0, 0, .5); -} - -[data-emoji-set="twitter"] .skin-tone-1 { - background-color: #fade72; -} - -[data-emoji-set="twitter"] .skin-tone-2 { - background-color: #f3dfd0; -} - -[data-emoji-set="twitter"] .skin-tone-3 { - background-color: #eed3a8; -} - -[data-emoji-set="twitter"] .skin-tone-4 { - background-color: #cfad8d; -} - -[data-emoji-set="twitter"] .skin-tone-5 { - background-color: #a8805d; -} - -[data-emoji-set="twitter"] .skin-tone-6 { - background-color: #765542; -} - -[data-emoji-set="google"] .skin-tone:after { - box-shadow: inset 0 0 2px 2px rgba(0, 0, 0, .4); -} - -[data-emoji-set="google"] .skin-tone-1 { - background-color: #f5c748; -} - -[data-emoji-set="google"] .skin-tone-2 { - background-color: #f1d5aa; -} - -[data-emoji-set="google"] .skin-tone-3 { - background-color: #d4b48d; -} - -[data-emoji-set="google"] .skin-tone-4 { - background-color: #aa876b; -} - -[data-emoji-set="google"] .skin-tone-5 { - background-color: #916544; -} - -[data-emoji-set="google"] .skin-tone-6 { - background-color: #61493f; -} - -[data-emoji-set="facebook"] .skin-tone:after { - border-color: rgba(0, 0, 0, .4); - box-shadow: inset 0 -2px 3px #000, inset 0 1px 4px #fff; -} - -[data-emoji-set="facebook"] .skin-tone-1 { - background-color: #f5c748; -} - -[data-emoji-set="facebook"] .skin-tone-2 { - background-color: #f1d5aa; -} - -[data-emoji-set="facebook"] .skin-tone-3 { - background-color: #d4b48d; -} - -[data-emoji-set="facebook"] .skin-tone-4 { - background-color: #aa876b; -} - -[data-emoji-set="facebook"] .skin-tone-5 { - background-color: #916544; -} - -[data-emoji-set="facebook"] .skin-tone-6 { - background-color: #61493f; -} - -`;function N9e({opened:e,onClose:n,onSelect:t,target:i}){return y.jsxs(En,{opened:e,onChange:r=>{r||n()},onDismiss:n,position:"bottom-start",withArrow:!0,shadow:"md",withinPortal:!0,closeOnClickOutside:!0,closeOnEscape:!0,trapFocus:!1,children:[y.jsx(En.Target,{children:i}),y.jsx(En.Dropdown,{p:0,style:{background:"transparent",border:"none"},children:y.jsx($9e,{onSelect:r=>{t(r),n()}})})]})}function $9e({onSelect:e}){const n=A.useRef(null),t=A.useRef(null),i=A.useRef(e);return i.current=e,A.useEffect(()=>{if(n.current)return t.current=new CA({data:YCe,onEmojiSelect:r=>{const a=i.current;r.native?a(r.native):r.shortcodes&&a(r.shortcodes)},theme:"dark",previewPosition:"none",skinTonePosition:"search",autoFocus:!0,maxFrequentRows:2,ref:n}),()=>{n.current&&(n.current.innerHTML=""),t.current=null}},[]),y.jsx("div",{ref:n})}const yh="column-";function z9e(e){return e==="column"?n=>{const t=n.droppableContainers.filter(r=>String(r.id).startsWith(yh)),i=IB({...n,droppableContainers:t});return i.length>0?i:Vie({...n,droppableContainers:t})}:n=>{const t=Yie(n);return t.length>0?t:LB(n)}}function L9e(){const e=zC(),[n,t]=A.useState(null),[i,r]=A.useState([]),[a,o]=A.useState(null),[l,f]=A.useState(null),[c,h]=A.useState(void 0),[d,p]=A.useState(!1),[v,b]=A.useState(""),[w,k]=A.useState(Date.now()),[_,x]=A.useState(!1),[C,T]=A.useState("board"),[O,E]=A.useState([]),[M,N]=A.useState(!1),[F,R]=A.useState([]),[L,B]=A.useState(!1),[G,U]=A.useState([]),[H,P]=A.useState([]),[z,q]=A.useState(""),[Y,D]=A.useState(null),[V,W]=A.useState(null),[$,X]=A.useState([]),[ee,re]=A.useState(!1),[se,ge]=A.useState(null),[ae,le]=A.useState(null),[_e,ne]=A.useState(!1),[$e,be]=A.useState(null),[Ce,Pe]=A.useState(!1),[ve,xe]=A.useState(null),[Re,ue]=A.useState(!1),[Ie,Ve]=A.useState("#888888"),[He,Ke]=A.useState(null),[Xe,ie]=A.useState(!1),[me,We]=A.useState(()=>{const Z=localStorage.getItem("kanban_nav_width"),de=Z?parseInt(Z,10):NaN;return Number.isFinite(de)&&de>=180&&de<=600?de:240}),Ze=A.useRef(me);A.useEffect(()=>{Ze.current=me,localStorage.setItem("kanban_nav_width",String(me))},[me]);const Se=Z=>{Z.preventDefault();const de=Z.clientX,Ee=Ze.current;document.body.style.cursor="col-resize",document.body.style.userSelect="none";const Ge=pt=>{const st=pt.clientX-de,Ft=Math.min(600,Math.max(180,Ee+st));We(Ft)},In=()=>{document.body.style.cursor="",document.body.style.userSelect="",window.removeEventListener("mousemove",Ge),window.removeEventListener("mouseup",In)};window.addEventListener("mousemove",Ge),window.addEventListener("mouseup",In)},nn=qie(jj(VC,{activationConstraint:{distance:5}}),jj(HC,{coordinateGetter:wae})),cn=32,An=400,mn=a!==null||l!==null,[rn,Je]=A.useState(!1),Dn=A.useRef(Xe);A.useEffect(()=>{Dn.current=Xe},[Xe]),A.useEffect(()=>{if(!mn){Je(!1);return}let Z=null,de=!1,Ee=!1;const Ge=()=>{Z!==null&&(window.clearTimeout(Z),Z=null)},In=pt=>{const st=pt.clientX<=cn;if(st===de)return;if(de=st,Je(st),!st){Ee=!0,Ge();return}if(!(!Dn.current||Ee))return;Ge();const ni=!Dn.current;Z=window.setTimeout(()=>{ie(ni),Ee=!1},An)};return document.addEventListener("mousemove",In),()=>{document.removeEventListener("mousemove",In),Ge(),Je(!1)}},[mn]);const Me=A.useCallback(async()=>{try{const Z=await tie();t(Z)}catch(Z){$n.show({color:"red",message:Z.message})}},[]);A.useEffect(()=>{Me()},[Me]);const Be=A.useCallback(async()=>{try{const Z=await jB();r(Z)}catch(Z){console.warn("listUsers failed",Z)}},[]),On=A.useCallback(async()=>{try{const Z=await uie();E(Z)}catch(Z){console.warn("listTrash failed",Z)}},[]),gn=A.useCallback(async()=>{try{const Z=await die();R(Z)}catch(Z){console.warn("listArchive failed",Z)}},[]),vn=A.useCallback(async()=>{try{const Z=await MB();U(Z)}catch(Z){console.warn("listTags failed",Z)}},[]),yn=A.useCallback(async()=>{try{const Z=await Aie();P(Z)}catch(Z){console.warn("listRequesters failed",Z)}},[]);A.useEffect(()=>{Be()},[Be]),A.useEffect(()=>{On()},[On]),A.useEffect(()=>{gn()},[gn]),A.useEffect(()=>{vn(),yn()},[vn,yn]),A.useEffect(()=>{if(a||l)return;const Z=setInterval(()=>k(Date.now()),1e3);return()=>clearInterval(Z)},[a,l]),A.useEffect(()=>{const Z=setInterval(()=>{Me()},3e4);return()=>clearInterval(Z)},[Me]),A.useEffect(()=>{if(!ve)return;const Z=de=>{de.key==="Escape"&&xe(null)};return window.addEventListener("keydown",Z),()=>window.removeEventListener("keydown",Z)},[ve]);const et=A.useMemo(()=>{const Z=new Map;for(const de of i)Z.set(de.id,de);return Z},[i]),wt=A.useMemo(()=>n?[...n.columns].sort((Z,de)=>Z.position-de.position):[],[n]),ze=A.useMemo(()=>wt.filter(Z=>Z.location!=="sidebar"),[wt]),Fe=A.useMemo(()=>wt.filter(Z=>Z.location==="sidebar"),[wt]),Pn=A.useMemo(()=>ze.map(Z=>`${yh}${Z.id}`),[ze]),rt=A.useMemo(()=>Fe.map(Z=>`${yh}${Z.id}`),[Fe]),jn=A.useCallback(Z=>{const de=z.trim().toLowerCase();if(de&&![Z.title,Z.description,Z.requester,...Z.tags||[]].filter(Boolean).join(" ").toLowerCase().includes(de)||Y&&Z.assignee_id!==Y||ee&&Z.assignee_id||V&&Z.requester!==V)return!1;if($.length>0){const Ee=new Set(Z.tags||[]);for(const Ge of $)if(!Ee.has(Ge))return!1}if(_e&&!Z.deadline)return!1;if(se||ae){const Ee=se?new Date(se).setHours(0,0,0,0):-1/0,Ge=ae?new Date(ae).setHours(23,59,59,999):1/0,In=Z.created_at?new Date(Z.created_at).getTime():NaN,pt=Z.entered_at?new Date(Z.entered_at).getTime():NaN,st=Ft=>!isNaN(Ft)&&Ft>=Ee&&Ft<=Ge;if(!st(In)&&!st(pt))return!1}return!0},[z,Y,ee,V,$,se,ae,_e]),en=A.useMemo(()=>{const Z=new Map;if(!n)return Z;for(const de of n.columns)Z.set(de.id,[]);for(const de of[...n.cards].sort((Ee,Ge)=>Ee.position-Ge.position)){if(!jn(de))continue;const Ee=Z.get(de.column_id);Ee&&Ee.push(de)}return Z},[n,jn]),tn=!!z.trim()||!!Y||ee||!!V||$.length>0||!!se||!!ae||_e,an=Z=>n==null?void 0:n.cards.find(de=>de.id===Z),Ln=Z=>n==null?void 0:n.columns.find(de=>de.id===Z),Un=Z=>{var de;return(de=an(Z))==null?void 0:de.column_id},kt=Z=>Z.startsWith(yh),Sn=Z=>Z.slice(yh.length),Cn=Z=>{if(n)return kt(Z)?Sn(Z):Un(Z)},Zn=Z=>{var In;const de=Z.active.id,Ee=(In=Z.active.data.current)==null?void 0:In.type;if(h(Ee),Ee==="column"){f(Sn(de));return}const Ge=an(de);Ge&&o(Ge)},Wt=Z=>{var pt,st;if(!n||((pt=Z.active.data.current)==null?void 0:pt.type)!=="card")return;const de=Z.active.id,Ee=(st=Z.over)==null?void 0:st.id;if(!Ee)return;const Ge=Un(de),In=Cn(Ee);!Ge||!In||Ge===In||t(Ft=>{if(!Ft)return Ft;const ni=Ft.cards.map(ti=>ti.id===de?{...ti,column_id:In}:ti);return{...Ft,cards:ni}})},Ai=async Z=>{var ti,ii;const de=(ti=Z.active.data.current)==null?void 0:ti.type,Ee=Z.active.id,Ge=(ii=Z.over)==null?void 0:ii.id;if(o(null),f(null),h(void 0),!n||!Ge)return;if(de==="column"){if(!kt(Ge))return;const at=Sn(Ee),Yt=Sn(Ge);if(at===Yt)return;const yi=Ln(at),tr=Ln(Yt);if(!yi||!tr)return;const Kr=tr.location,Xr=wt.filter(Kt=>Kt.location===Kr).map(Kt=>Kt.id),Or=Xr.indexOf(at),gs=Xr.indexOf(Yt);let Ka;if(Or===-1){const Kt=gs===-1?Xr.length:gs;Ka=[...Xr.slice(0,Kt),at,...Xr.slice(Kt)]}else{if(Or===gs)return;Ka=zg(Xr,Or,gs)}t(Kt=>{if(!Kt)return Kt;const Cl=new Map(Ka.map((Er,Hu)=>[Er,Hu])),qu=Kt.columns.map(Er=>Er.id===at?{...Er,location:Kr,position:Cl.get(Er.id)??Er.position}:Cl.has(Er.id)?{...Er,position:Cl.get(Er.id)}:Er);return{...Kt,columns:qu}});try{yi.location!==Kr&&await Ul(at,{location:Kr}),await oie(Ka)}catch(Kt){$n.show({color:"red",message:Kt.message})}Me();return}const In=Cn(Ge);if(!In)return;const pt=n.cards.find(at=>at.id===Ee);if(pt!=null&&pt.locked&&pt.column_id!==In){$n.show({color:"yellow",message:"Card bloqueada: no se puede mover entre columnas"}),Me();return}const st=n.cards.filter(at=>at.column_id===In).sort((at,Yt)=>at.position-Yt.position),Ft=st.findIndex(at=>at.id===Ee);let ni;if(kt(Ge)||Ft===-1)ni=[...st.filter(at=>at.id!==Ee).map(at=>at.id),Ee];else{const at=st.findIndex(Yt=>Yt.id===Ge);ni=zg(st.map(Yt=>Yt.id),Ft,at)}t(at=>{if(!at)return at;const Yt=new Map(ni.map((tr,Kr)=>[tr,Kr])),yi=at.cards.map(tr=>tr.column_id===In&&Yt.has(tr.id)?{...tr,position:Yt.get(tr.id)}:tr);return{...at,cards:yi}});try{await pie(Ee,In,ni)}catch(at){$n.show({color:"red",message:at.message})}Me()},er=async()=>{const Z=v.trim();if(Z)try{await rie(Z),b(""),p(!1),Me()}catch(de){$n.show({color:"red",message:de.message})}},Aa=A.useCallback(async(Z,de)=>{try{await Ul(Z,{name:de}),Me()}catch(Ee){$n.show({color:"red",message:Ee.message})}},[Me]),Wa=A.useCallback(async(Z,de)=>{try{await Ul(Z,{width:de}),Me()}catch(Ee){$n.show({color:"red",message:Ee.message})}},[Me]),Oa=A.useCallback(async(Z,de)=>{try{await Ul(Z,{location:de}),Me()}catch(Ee){$n.show({color:"red",message:Ee.message})}},[Me]),Vr=A.useCallback(Z=>{Io.openConfirmModal({title:"Eliminar columna",children:y.jsx(Ye,{size:"sm",children:"Se borraran todas sus tarjetas. Continuar?"}),labels:{confirm:"Eliminar",cancel:"Cancelar"},confirmProps:{color:"red"},onConfirm:async()=>{try{await aie(Z),Me()}catch(de){$n.show({color:"red",message:de.message})}}})},[Me]),Ga=A.useCallback(Z=>{const de=Io.open({title:"Nueva tarjeta",size:"md",children:y.jsx(UF,{users:i,requesterOptions:H,tagOptions:G,initial:{requester:""},submitLabel:"Crear",onCancel:()=>Io.close(de),onSubmit:async Ee=>{try{await sie({column_id:Z,requester:Ee.requester,title:Ee.title,description:Ee.description,assignee_id:Ee.assignee_id,tags:Ee.tags}),Io.close(de),Me(),vn(),yn()}catch(Ge){$n.show({color:"red",message:Ge.message})}}})})},[Me,i,e.user,H,G]),Sr=A.useCallback(Z=>{var Ee;const de=Io.open({title:"Editar tarjeta",size:"85%",children:y.jsx(Hse,{card:Z,users:i,currentUserId:(Ee=e.user)==null?void 0:Ee.id,requesterOptions:H,tagOptions:G,onCancel:()=>Io.close(de),onSubmit:async Ge=>{try{await Sf(Z.id,{requester:Ge.requester,title:Ge.title,description:Ge.description,assignee_id:Ge.assignee_id,tags:Ge.tags}),Io.close(de),Me(),vn(),yn()}catch(In){$n.show({color:"red",message:In.message})}}})})},[Me,i,e.user,H,G]),Cr=A.useCallback(async Z=>{try{const de=await wie(Z);await Me(),$n.show({color:"teal",message:`Duplicada: ${de.title}`})}catch(de){$n.show({color:"red",message:de.message})}},[Me]),hn=A.useCallback(async(Z,de)=>{t(Ee=>Ee&&{...Ee,cards:Ee.cards.map(Ge=>Ge.id===Z?{...Ge,requester:de}:Ge)});try{await Sf(Z,{requester:de})}catch(Ee){$n.show({color:"red",message:Ee.message}),Me()}},[Me]),gi=A.useCallback(Z=>{T("board"),be(Z),window.setTimeout(()=>be(null),3e3)},[]),ln=A.useCallback(async(Z,de)=>{t(Ee=>Ee&&{...Ee,cards:Ee.cards.map(Ge=>Ge.id===Z?{...Ge,deadline:de}:Ge)});try{await Sf(Z,{deadline:de})}catch(Ee){$n.show({color:"red",message:Ee.message}),Me()}},[Me]),Ar=A.useCallback(async(Z,de)=>{t(Ee=>Ee&&{...Ee,cards:Ee.cards.map(Ge=>Ge.id===Z?{...Ge,assignee_id:de}:Ge)});try{await Sf(Z,{assignee_id:de})}catch(Ee){$n.show({color:"red",message:Ee.message}),Me()}},[Me]),Ya=A.useCallback(async Z=>{try{await lie(Z),Me(),On()}catch(de){$n.show({color:"red",message:de.message})}},[Me,On]),Wr=A.useCallback(async Z=>{try{await fie(Z),Me(),On()}catch(de){$n.show({color:"red",message:de.message})}},[Me,On]),Gr=A.useCallback(async Z=>{try{await mie(Z),Me(),gn()}catch(de){$n.show({color:"red",message:de.message})}},[Me,gn]),mp=A.useCallback(async Z=>{try{await hie(Z),Me(),gn()}catch(de){$n.show({color:"red",message:de.message})}},[Me,gn]),pp=A.useCallback(async Z=>{Io.openConfirmModal({title:"Borrar permanentemente",children:y.jsx(Ye,{size:"sm",children:"Esta accion no se puede deshacer."}),labels:{confirm:"Borrar",cancel:"Cancelar"},confirmProps:{color:"red"},onConfirm:async()=>{try{await cie(Z),On()}catch(de){$n.show({color:"red",message:de.message})}}})},[On]),Bu=A.useCallback(async(Z,de)=>{t(Ee=>Ee&&{...Ee,cards:Ee.cards.map(Ge=>Ge.id===Z?{...Ge,color:de}:Ge)});try{await Sf(Z,{color:de})}catch(Ee){$n.show({color:"red",message:Ee.message}),Me()}},[Me]),vp=A.useCallback(async(Z,de)=>{t(Ee=>Ee&&{...Ee,cards:Ee.cards.map(Ge=>Ge.id===Z?{...Ge,stickers:de}:Ge)});try{await Ak(Z,de)}catch(Ee){$n.show({color:"red",message:Ee.message}),Me()}},[Me]),kl=A.useCallback((Z,de,Ee)=>{ve&&t(Ge=>{if(!Ge)return Ge;const In=Ge.cards.map(pt=>{if(pt.id!==Z)return pt;const st=[...pt.stickers||[],{emoji:ve,x:de,y:Ee}];return Ak(Z,st).catch(Ft=>{$n.show({color:"red",message:Ft.message}),Me()}),{...pt,stickers:st}});return{...Ge,cards:In}})},[ve,Me]),_l=A.useCallback((Z,de)=>{t(Ee=>{if(!Ee)return Ee;const Ge=Ee.cards.map(In=>{if(In.id!==Z)return In;const pt=(In.stickers||[]).filter((st,Ft)=>Ft!==de);return Ak(Z,pt).catch(st=>{$n.show({color:"red",message:st.message}),Me()}),{...In,stickers:pt}});return{...Ee,cards:Ge}})},[Me]),Yr=A.useCallback((Z,de,Ee,Ge)=>{t(In=>{if(!In)return In;const pt=In.cards.map(st=>{if(st.id!==Z)return st;const Ft=(st.stickers||[]).map((ni,ti)=>ti===de?{...ni,x:Ee,y:Ge}:ni);return{...st,stickers:Ft}});return{...In,cards:pt}})},[]),nr=A.useCallback(Z=>{t(de=>{if(!de)return de;const Ee=de.cards.find(Ge=>Ge.id===Z);return Ee&&vp(Z,Ee.stickers||[]),de})},[vp]),Jc=A.useCallback(Z=>{Io.open({title:Z.title,size:"md",children:y.jsx(zCe,{card:Z,columns:(n==null?void 0:n.columns)??[]})})},[n==null?void 0:n.columns]),gp=A.useCallback(async(Z,de)=>{t(Ee=>Ee&&{...Ee,cards:Ee.cards.map(Ge=>Ge.id===Z?{...Ge,locked:de}:Ge)});try{await Sf(Z,{locked:de})}catch(Ee){$n.show({color:"red",message:Ee.message}),Me()}},[Me]),Fu=A.useCallback(async(Z,de)=>{t(Ee=>Ee&&{...Ee,columns:Ee.columns.map(Ge=>Ge.id===Z?{...Ge,wip_limit:de}:Ge)});try{await Ul(Z,{wip_limit:de})}catch(Ee){$n.show({color:"red",message:Ee.message}),Me()}},[Me]),ed=A.useCallback(Z=>{const de=(en.get(Z)||[]).filter(ii=>!ii.locked);if(de.length===0){$n.show({color:"yellow",message:"No hay cards disponibles (filtro y bloqueadas excluidas)"});return}if(de.length===1){const ii=document.querySelector(`[data-card-id="${de[0].id}"]`);ii&&(ii.scrollIntoView({behavior:"smooth",block:"center"}),ii.classList.add("kanban-roulette-winner"),setTimeout(()=>ii.classList.remove("kanban-roulette-winner"),1700));return}const Ee=(()=>{const ii=new Uint32Array(1);return crypto.getRandomValues(ii),ii[0]%de.length})(),In=2*de.length+(Ee-0+de.length)%de.length,pt=50,st=220,Ft=ii=>1-Math.pow(1-ii,3);let ni=0;const ti=()=>{const ii=ni%de.length,at=(ii-1+de.length)%de.length,Yt=document.querySelector(`[data-card-id="${de[at].id}"]`),yi=document.querySelector(`[data-card-id="${de[ii].id}"]`);if(Yt&&Yt.classList.remove("kanban-roulette-active"),yi&&(yi.classList.add("kanban-roulette-active"),yi.scrollIntoView({behavior:"smooth",block:"center"})),ni++,ni>In){yi&&(yi.classList.remove("kanban-roulette-active"),yi.classList.add("kanban-roulette-winner"),setTimeout(()=>yi.classList.remove("kanban-roulette-winner"),1700));return}const tr=In>0?ni/In:1,Kr=pt+(st-pt)*Ft(tr);setTimeout(ti,Kr)};ti()},[en]),xl=A.useCallback(async(Z,de)=>{t(Ee=>Ee&&{...Ee,columns:Ee.columns.map(Ge=>Ge.id===Z?{...Ge,max_time_minutes:de}:Ge)});try{await Ul(Z,{max_time_minutes:de})}catch(Ee){$n.show({color:"red",message:Ee.message}),Me()}},[Me]),yp=A.useCallback(async(Z,de)=>{t(Ee=>Ee&&{...Ee,columns:Ee.columns.map(Ge=>Ge.id===Z?{...Ge,is_done:de}:Ge)});try{await Ul(Z,{is_done:de}),Me()}catch(Ee){$n.show({color:"red",message:Ee.message}),Me()}},[Me]),fr=A.useMemo(()=>({height:50}),[]),nd=A.useMemo(()=>({width:me,breakpoint:"md",collapsed:{mobile:!Xe,desktop:!Xe}}),[me,Xe]),bp=A.useMemo(()=>({width:380,breakpoint:"md",collapsed:{mobile:!_,desktop:!_}}),[_]),td=A.useMemo(()=>({main:{paddingInlineStart:0,paddingInlineEnd:0}}),[]);if(!n)return y.jsx(un,{justify:"center",p:"xl",children:y.jsx(Fi,{})});const Ea=a,Sl=l?Ln(l):null;return y.jsxs(Bre,{sensors:nn,collisionDetection:z9e(c),onDragStart:Zn,onDragOver:Wt,onDragEnd:Ai,children:[y.jsx("div",{className:"kanban-drag-edge"+(mn?" is-active":"")+(rn?" is-armed":""),"data-test":"kanban-drag-edge","data-active":mn?"1":"0","data-armed":rn?"1":"0","aria-hidden":"true"}),y.jsxs(yr,{header:fr,navbar:nd,aside:bp,padding:0,styles:td,children:[y.jsx(yr.Header,{children:y.jsxs(un,{h:"100%",px:"md",justify:"space-between",children:[y.jsxs(un,{gap:6,children:[y.jsx(Ot,{variant:Xe?"filled":"subtle",onClick:()=>ie(Z=>!Z),"aria-label":"Toggle sidebar",children:y.jsx(tse,{size:16})}),y.jsx(MS,{size:22}),y.jsx(ju,{order:4,children:"Kanban"}),y.jsx(_i,{value:C,onChange:Z=>Z&&T(Z),variant:"pills",ml:"md",children:y.jsxs(_i.List,{children:[y.jsx(_i.Tab,{value:"board",leftSection:y.jsx(MS,{size:14}),children:"Tablero"}),y.jsx(_i.Tab,{value:"dashboard",leftSection:y.jsx(Coe,{size:14}),children:"Dashboard"}),y.jsx(_i.Tab,{value:"calendar",leftSection:y.jsx(xoe,{size:14}),children:"Calendario"})]})})]}),y.jsxs(un,{gap:4,children:[y.jsx(Ot,{variant:"subtle",onClick:Me,"aria-label":"Refresh",children:y.jsx(pse,{size:16})}),y.jsx(Ot,{variant:_?"filled":"subtle",onClick:()=>x(Z=>!Z),"aria-label":"Toggle chat",children:y.jsx(qF,{size:16})}),e.user&&y.jsxs(Hn,{position:"bottom-end",shadow:"md",withArrow:!0,closeOnItemClick:!1,children:[y.jsx(Hn.Target,{children:y.jsx(Ot,{variant:"subtle","aria-label":"Usuario",children:y.jsx(ol,{size:26,radius:"xl",color:e.user.color||"blue",children:(e.user.display_name||e.user.username).slice(0,2).toUpperCase()})})}),y.jsxs(Hn.Dropdown,{children:[y.jsx(Hn.Label,{children:e.user.display_name||e.user.username}),y.jsxs(ye,{p:"xs",children:[y.jsx(Ye,{size:"xs",c:"dimmed",mb:4,children:"Color del avatar"}),y.jsx(cW,{value:e.user.color||"",onChange:async Z=>{try{const de=await Ej({color:Z});e.setUser(de)}catch(de){$n.show({color:"red",message:de.message})}},options:Lse,onOpenCustom:()=>{var Z,de;Ve((de=(Z=e.user)==null?void 0:Z.color)!=null&&de.startsWith("#")?e.user.color:"#888888"),ue(!0)}})]}),y.jsx(Hn.Divider,{}),y.jsx(Hn.Item,{leftSection:y.jsx(ese,{size:14}),color:"red",onClick:()=>e.logout(),children:"Cerrar sesion"})]})]})]})]})}),y.jsxs(yr.Navbar,{p:"xs",children:[y.jsx(ye,{onMouseDown:Se,style:{position:"absolute",top:0,right:-3,width:6,height:"100%",cursor:"col-resize",zIndex:10},"aria-label":"Resize sidebar"}),y.jsxs(ft,{gap:"xs",h:"100%",children:[y.jsx(Ye,{size:"xs",c:"dimmed",fw:600,tt:"uppercase",children:"Columnas parqueadas"}),y.jsx(ye,{style:{flex:1,overflowY:"auto"},children:y.jsx(AS,{items:rt,strategy:iF,children:y.jsxs(ft,{gap:"xs",children:[Fe.length===0&&y.jsx(Ye,{size:"xs",c:"dimmed",children:'Vacio. Mueve columnas aqui con el icono "archivar" en su cabecera.'}),Fe.map(Z=>y.jsx(A$,{column:Z,cards:en.get(Z.id)??[],now:w,collapsed:!0,onAddCard:Ga,onRenameColumn:Aa,onResizeColumn:Wa,onMoveColumnLocation:Oa,onDeleteColumn:Vr,onSetWIPLimit:Fu,onSetMaxTimeMinutes:xl,onPickRandom:ed,onToggleDone:yp,onEditCard:Sr,onDeleteCard:Ya,onDuplicateCard:Cr,onChangeCardColor:Bu,onShowHistory:Jc,onToggleCardLock:gp,onAssignCard:Ar,onSetCardDeadline:ln,highlightCardId:$e,onSetRequester:hn,onArchiveCard:mp,requesterOptions:H,onOpenCustomCardColor:(de,Ee)=>Ke({cardId:de,color:Ee}),activeSticker:ve,onAddSticker:kl,onRemoveSticker:_l,onMoveSticker:Yr,onCommitSticker:nr,users:i,usersById:et},Z.id))]})})}),y.jsxs(ye,{style:{borderTop:"1px solid var(--mantine-color-dark-5)",paddingTop:8},children:[y.jsx(Rt,{variant:"subtle",color:"gray",size:"xs",fullWidth:!0,justify:"space-between",leftSection:y.jsx(vu,{size:14}),rightSection:y.jsxs(un,{gap:4,children:[y.jsx(hi,{size:"xs",variant:"light",color:O.length>0?"red":"gray",children:O.length}),M?y.jsx(ES,{size:12}):y.jsx(TS,{size:12})]}),onClick:()=>N(Z=>!Z),children:"Papelera"}),M&&y.jsxs(ft,{gap:4,mt:4,style:{maxHeight:220,overflowY:"auto"},children:[O.length===0&&y.jsx(Ye,{size:"xs",c:"dimmed",px:"xs",children:"Vacia."}),O.map(Z=>y.jsx(Ht,{p:6,withBorder:!0,radius:"sm",bg:"dark.7",children:y.jsxs(un,{justify:"space-between",gap:4,wrap:"nowrap",children:[y.jsx(Ye,{size:"xs",truncate:!0,style:{flex:1},title:Z.title,children:Z.title}),y.jsx(mi,{label:"Restaurar",withArrow:!0,children:y.jsx(Ot,{size:"xs",variant:"subtle",color:"green",onClick:()=>Wr(Z.id),children:y.jsx(Yj,{size:12})})}),y.jsx(mi,{label:"Borrar permanentemente",withArrow:!0,children:y.jsx(Ot,{size:"xs",variant:"subtle",color:"red",onClick:()=>pp(Z.id),children:y.jsx(_se,{size:12})})})]})},Z.id))]})]}),y.jsxs(ye,{style:{borderTop:"1px solid var(--mantine-color-dark-5)",paddingTop:8},children:[y.jsx(Rt,{variant:"subtle",color:"gray",size:"xs",fullWidth:!0,justify:"space-between",leftSection:y.jsx(Vh,{size:14}),rightSection:y.jsxs(un,{gap:4,children:[y.jsx(hi,{size:"xs",variant:"light",color:F.length>0?"teal":"gray",children:F.length}),L?y.jsx(ES,{size:12}):y.jsx(TS,{size:12})]}),onClick:()=>B(Z=>!Z),"data-test":"archive-toggle",children:"Hecho (archivo)"}),L&&y.jsxs(ft,{gap:4,mt:4,style:{maxHeight:220,overflowY:"auto"},children:[F.length===0&&y.jsx(Ye,{size:"xs",c:"dimmed",px:"xs",children:"Sin cards archivadas."}),F.map(Z=>y.jsx(Ht,{p:6,withBorder:!0,radius:"sm",bg:"dark.7","data-archived-card-id":Z.id,children:y.jsxs(un,{justify:"space-between",gap:4,wrap:"nowrap",children:[y.jsx(Ye,{size:"xs",truncate:!0,style:{flex:1},title:Z.title,children:Z.title}),y.jsx(mi,{label:"Sacar del archivo (volver a Hecho)",withArrow:!0,children:y.jsx(Ot,{size:"xs",variant:"subtle",color:"teal",onClick:()=>Gr(Z.id),children:y.jsx(Yj,{size:12})})})]})},Z.id))]})]})]})]}),y.jsx(yr.Aside,{children:y.jsx(vme,{onBoardChange:Me})}),y.jsx(yr.Main,{children:C==="dashboard"?y.jsx(ye,{style:{height:"calc(100vh - 50px)",overflow:"auto"},children:y.jsx(PCe,{users:i})}):C==="calendar"?y.jsx(ye,{style:{height:"calc(100vh - 50px)",overflow:"auto"},children:y.jsx(yme,{users:i,cards:n.cards,onJumpToCard:gi})}):y.jsxs(ye,{style:{height:"calc(100vh - 50px)",overflow:"hidden",display:"flex",flexDirection:"column"},children:[y.jsxs(un,{gap:"xs",p:"xs",wrap:"wrap",align:"end",style:{borderBottom:"1px solid var(--mantine-color-dark-4)"},children:[y.jsx(ll,{leftSection:y.jsx(gse,{size:14}),placeholder:"Buscar (titulo, descripcion, solicitante, tag)",value:z,onChange:Z=>q(Z.currentTarget.value),rightSection:z?y.jsx(Ot,{size:"sm",variant:"subtle",color:"gray",onClick:()=>q(""),"aria-label":"Limpiar",children:y.jsx(hh,{size:14})}):null,style:{minWidth:280,flex:1},size:"xs"}),y.jsx(ho,{placeholder:"Asignado",value:Y,onChange:D,data:i.map(Z=>({value:Z.id,label:Z.display_name||Z.username})),clearable:!0,searchable:!0,size:"xs",style:{minWidth:160},disabled:ee}),y.jsx(al,{size:"xs",label:"Sin asignar",checked:ee,onChange:Z=>{const de=Z.currentTarget.checked;re(de),de&&D(null)}}),y.jsx(al,{size:"xs",label:"Con deadline",checked:_e,onChange:Z=>ne(Z.currentTarget.checked)}),y.jsx(ho,{placeholder:"Solicitante",value:V,onChange:W,data:H,clearable:!0,searchable:!0,size:"xs",style:{minWidth:160}}),y.jsx(Ny,{placeholder:"Tags",value:$,onChange:X,data:G,clearable:!0,searchable:!0,size:"xs",style:{minWidth:200}}),y.jsx(pu,{placeholder:"Desde",value:se,onChange:Z=>ge(Z?new Date(Z):null),clearable:!0,size:"xs",style:{minWidth:130},valueFormat:"DD/MM/YY"}),y.jsx(pu,{placeholder:"Hasta",value:ae,onChange:Z=>le(Z?new Date(Z):null),clearable:!0,size:"xs",style:{minWidth:130},valueFormat:"DD/MM/YY"}),y.jsxs(un,{gap:4,children:[y.jsx(Rt,{size:"xs",variant:"default",onClick:()=>{const Z=new Date;ge(Z),le(Z)},children:"Hoy"}),y.jsx(Rt,{size:"xs",variant:"default",onClick:()=>{const Z=new Date,de=new Date;de.setDate(de.getDate()-7),ge(de),le(Z)},children:"7d"}),y.jsx(Rt,{size:"xs",variant:"default",onClick:()=>{const Z=new Date,de=new Date;de.setDate(de.getDate()-30),ge(de),le(Z)},children:"30d"})]}),y.jsx(N9e,{opened:Ce,onClose:()=>Pe(!1),onSelect:Z=>xe(Z),target:y.jsx(Rt,{size:"xs",variant:ve?"filled":"default",color:ve?"yellow":void 0,leftSection:y.jsx(sse,{size:14}),onClick:()=>{ve?Pe(Z=>!Z):xe("😀")},children:ve?`Modo sticker: ${ve}`:"Stickers"})}),ve&&y.jsx(Rt,{size:"xs",variant:"subtle",color:"gray",leftSection:y.jsx(hh,{size:12}),onClick:()=>xe(null),children:"ESC"}),tn&&y.jsx(Rt,{size:"xs",variant:"subtle",color:"gray",leftSection:y.jsx(hh,{size:12}),onClick:()=>{q(""),D(null),re(!1),W(null),X([]),ge(null),le(null),ne(!1)},children:"Limpiar"})]}),y.jsx(AS,{items:Pn,strategy:uae,children:y.jsxs(un,{align:"stretch",wrap:"nowrap",gap:"md",p:"md",style:{flex:1,overflowX:"auto",overflowY:"hidden"},children:[ze.map(Z=>y.jsx(A$,{column:Z,cards:en.get(Z.id)??[],now:w,onAddCard:Ga,onRenameColumn:Aa,onResizeColumn:Wa,onMoveColumnLocation:Oa,onDeleteColumn:Vr,onSetWIPLimit:Fu,onSetMaxTimeMinutes:xl,onPickRandom:ed,onToggleDone:yp,onEditCard:Sr,onDeleteCard:Ya,onDuplicateCard:Cr,onChangeCardColor:Bu,onShowHistory:Jc,onToggleCardLock:gp,onAssignCard:Ar,onSetCardDeadline:ln,highlightCardId:$e,onSetRequester:hn,onArchiveCard:mp,requesterOptions:H,activeSticker:ve,onAddSticker:kl,onRemoveSticker:_l,onMoveSticker:Yr,onCommitSticker:nr,users:i,usersById:et},Z.id)),y.jsx(ye,{style:{minWidth:280,maxWidth:320},children:d?y.jsxs(ft,{gap:4,children:[y.jsx(ll,{size:"xs",placeholder:"Nombre de columna...",value:v,onChange:Z=>b(Z.currentTarget.value),autoFocus:!0,onKeyDown:Z=>{Z.key==="Enter"&&er(),Z.key==="Escape"&&(p(!1),b(""))}}),y.jsxs(un,{gap:4,children:[y.jsx(Rt,{size:"xs",onClick:er,children:"Anadir"}),y.jsx(Ot,{variant:"subtle",color:"gray",onClick:()=>p(!1),children:y.jsx(hh,{size:14})})]})]}):y.jsx(Rt,{variant:"light",color:"gray",leftSection:y.jsx(Gh,{size:14}),onClick:()=>p(!0),children:"Anadir columna"})})]})})]})})]}),y.jsx(aae,{children:Ea?y.jsx(dW,{card:Ea,now:w,onDelete:()=>{},onEdit:()=>{},onChangeColor:()=>{},onShowHistory:()=>{},onToggleLock:()=>{},onAssign:()=>{},users:i,assignee:Ea.assignee_id?et.get(Ea.assignee_id):void 0,isOverlay:!0}):Sl?y.jsx(ye,{style:{width:Sl.location==="sidebar"?220:Sl.width,padding:8,background:VF(""),border:`1px solid ${e9("")}`,borderRadius:8,opacity:.9},children:y.jsx(Ye,{fw:600,size:"sm",children:Sl.name})}):null}),y.jsx(c6,{opened:Re,onClose:()=>ue(!1),value:Ie,onAccept:async Z=>{Ve(Z);try{const de=await Ej({color:Z});e.setUser(de)}catch(de){$n.show({color:"red",message:de.message})}}}),y.jsx(c6,{opened:!!He,onClose:()=>Ke(null),value:(He==null?void 0:He.color)||"#888888",onAccept:Z=>{He&&Bu(He.cardId,Z)}})]})}function I9e(){const e=zC(),[n,t]=A.useState("login"),[i,r]=A.useState(""),[a,o]=A.useState(""),[l,f]=A.useState(""),[c,h]=A.useState(!1),[d,p]=A.useState(null),[v,b]=A.useState(!1);A.useEffect(()=>{iie().then(k=>b(!!k["registration-enabled"])).catch(()=>b(!1))},[]),A.useEffect(()=>{!v&&n==="register"&&t("login")},[v,n]);const w=async k=>{k.preventDefault(),p(null),h(!0);try{n==="login"?await e.login(i.trim(),a):await e.register(i.trim(),a,l.trim()||i.trim())}catch(_){p(_.message)}finally{h(!1)}};return y.jsx(Mc,{style:{minHeight:"100vh"},p:"md",children:y.jsx(Ht,{p:"xl",withBorder:!0,radius:"md",shadow:"md",style:{width:360,maxWidth:"100%"},children:y.jsx("form",{onSubmit:w,children:y.jsxs(ft,{gap:"md",children:[y.jsxs(ft,{gap:4,align:"center",children:[y.jsx(MS,{size:36}),y.jsx(ju,{order:3,children:"Kanban"}),y.jsx(Ye,{size:"sm",c:"dimmed",children:n==="login"?"Inicia sesion":"Crea una cuenta"})]}),y.jsx(ll,{label:"Usuario",value:i,onChange:k=>r(k.currentTarget.value),required:!0,autoFocus:!0,autoComplete:"username"}),n==="register"&&y.jsx(ll,{label:"Nombre (opcional)",value:l,onChange:k=>f(k.currentTarget.value),autoComplete:"name"}),y.jsx(Ly,{label:"Contrasena",value:a,onChange:k=>o(k.currentTarget.value),required:!0,autoComplete:n==="login"?"current-password":"new-password"}),d&&y.jsx(Ye,{size:"sm",c:"red",children:d}),y.jsx(Rt,{type:"submit",loading:c,fullWidth:!0,children:n==="login"?"Entrar":"Registrar"}),v?y.jsxs(Ye,{size:"xs",c:"dimmed",ta:"center",children:[n==="login"?"No tienes cuenta?":"Ya tienes cuenta?"," ",y.jsx(dy,{component:"button",type:"button",size:"xs",onClick:()=>{p(null),t(n==="login"?"register":"login")},children:n==="login"?"Registrate":"Inicia sesion"})]}):y.jsx(Ye,{size:"xs",c:"dimmed",ta:"center",children:"Registro de nuevos usuarios deshabilitado."})]})})})})}function B9e(){const{user:e,loading:n}=zC();return n?y.jsx(Mc,{style:{minHeight:"100vh"},children:y.jsx(Fi,{})}):e?y.jsx(L9e,{}):y.jsx(I9e,{})}const F9e={primaryColor:"blue",fontFamily:"system-ui, -apple-system, sans-serif"};Jte.createRoot(document.getElementById("root")).render(y.jsx(mz,{theme:F9e,defaultColorScheme:"dark",children:y.jsxs(_te,{children:[y.jsx(wo,{position:"top-right"}),y.jsx(Oie,{children:y.jsx(B9e,{})})]})})); diff --git a/backend/dist/assets/index-zy-U5pO-.js b/backend/dist/assets/index-zy-U5pO-.js new file mode 100644 index 0000000..2ffc34d --- /dev/null +++ b/backend/dist/assets/index-zy-U5pO-.js @@ -0,0 +1,1186 @@ +function ZY(e,n){for(var t=0;ti[r]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const n=document.createElement("link").relList;if(n&&n.supports&&n.supports("modulepreload"))return;for(const r of document.querySelectorAll('link[rel="modulepreload"]'))i(r);new MutationObserver(r=>{for(const a of r)if(a.type==="childList")for(const o of a.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&i(o)}).observe(document,{childList:!0,subtree:!0});function t(r){const a={};return r.integrity&&(a.integrity=r.integrity),r.referrerPolicy&&(a.referrerPolicy=r.referrerPolicy),r.crossOrigin==="use-credentials"?a.credentials="include":r.crossOrigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function i(r){if(r.ep)return;r.ep=!0;const a=t(r);fetch(r.href,a)}})();var Ev=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function ht(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ek={exports:{}},Zd={};/** + * @license React + * react-jsx-runtime.production.js + * + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var fT;function QY(){if(fT)return Zd;fT=1;var e=Symbol.for("react.transitional.element"),n=Symbol.for("react.fragment");function t(i,r,a){var o=null;if(a!==void 0&&(o=""+a),r.key!==void 0&&(o=""+r.key),"key"in r){a={};for(var l in r)l!=="key"&&(a[l]=r[l])}else a=r;return r=a.ref,{$$typeof:e,type:i,key:o,ref:r!==void 0?r:null,props:a}}return Zd.Fragment=n,Zd.jsx=t,Zd.jsxs=t,Zd}var cT;function JY(){return cT||(cT=1,ek.exports=QY()),ek.exports}var y=JY();function Dt(e){return Object.keys(e)}function nk(e){return e&&typeof e=="object"&&!Array.isArray(e)}function O6(e,n){const t={...e},i=n;return nk(e)&&nk(n)&&Object.keys(n).forEach(r=>{nk(i[r])&&r in e?t[r]=O6(t[r],i[r]):t[r]=i[r]}),t}function eK(e){return e.replace(/[A-Z]/g,n=>`-${n.toLowerCase()}`)}function nK(e){var n;return typeof e!="string"||!e.includes("var(--mantine-scale)")?e:(n=e.match(/^calc\((.*?)\)$/))==null?void 0:n[1].split("*")[0].trim()}function qh(e){const n=nK(e);return typeof n=="number"?n:typeof n=="string"?n.includes("calc")||n.includes("var")?n:n.includes("px")?Number(n.replace("px","")):n.includes("rem")?Number(n.replace("rem",""))*16:n.includes("em")?Number(n.replace("em",""))*16:Number(n):NaN}function dT(e){return e==="0rem"?"0rem":`calc(${e} * var(--mantine-scale))`}function tz(e,{shouldScale:n=!1}={}){function t(i){if(i===0||i==="0")return`0${e}`;if(typeof i=="number"){const r=`${i/16}${e}`;return n?dT(r):r}if(typeof i=="string"){if(i===""||i.startsWith("calc(")||i.startsWith("clamp(")||i.includes("rgba("))return i;if(i.includes(","))return i.split(",").map(a=>t(a)).join(",");if(i.includes(" "))return i.split(" ").map(a=>t(a)).join(" ");const r=i.replace("px","");if(!Number.isNaN(Number(r))){const a=`${Number(r)/16}${e}`;return n?dT(a):a}}return i}return t}const me=tz("rem",{shouldScale:!0}),Sg=tz("em");function ju(e){return Object.keys(e).reduce((n,t)=>(e[t]!==void 0&&(n[t]=e[t]),n),{})}function iz(e){if(typeof e=="number")return!0;if(typeof e=="string"){if(e.startsWith("calc(")||e.startsWith("var(")||e.includes(" ")&&e.trim()!=="")return!0;const n=/^[+-]?[0-9]+(\.[0-9]+)?(px|em|rem|ex|ch|lh|rlh|vw|vh|vmin|vmax|vb|vi|svw|svh|lvw|lvh|dvw|dvh|cm|mm|in|pt|pc|q|cqw|cqh|cqi|cqb|cqmin|cqmax|%)?$/;return e.trim().split(/\s+/).every(t=>n.test(t))}return!1}var tk={exports:{}},Dn={};/** + * @license React + * react.production.js + * + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var hT;function tK(){if(hT)return Dn;hT=1;var e=Symbol.for("react.transitional.element"),n=Symbol.for("react.portal"),t=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),r=Symbol.for("react.profiler"),a=Symbol.for("react.consumer"),o=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),c=Symbol.for("react.memo"),h=Symbol.for("react.lazy"),d=Symbol.for("react.activity"),p=Symbol.iterator;function v(V){return V===null||typeof V!="object"?null:(V=p&&V[p]||V["@@iterator"],typeof V=="function"?V:null)}var b={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},w=Object.assign,k={};function _(V,W,$){this.props=V,this.context=W,this.refs=k,this.updater=$||b}_.prototype.isReactComponent={},_.prototype.setState=function(V,W){if(typeof V!="object"&&typeof V!="function"&&V!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,V,W,"setState")},_.prototype.forceUpdate=function(V){this.updater.enqueueForceUpdate(this,V,"forceUpdate")};function C(){}C.prototype=_.prototype;function x(V,W,$){this.props=V,this.context=W,this.refs=k,this.updater=$||b}var E=x.prototype=new C;E.constructor=x,w(E,_.prototype),E.isPureReactComponent=!0;var O=Array.isArray;function j(){}var M={H:null,A:null,T:null,S:null},P=Object.prototype.hasOwnProperty;function F(V,W,$){var X=$.ref;return{$$typeof:e,type:V,key:W,ref:X!==void 0?X:null,props:$}}function R(V,W){return F(V.type,W,V.props)}function L(V){return typeof V=="object"&&V!==null&&V.$$typeof===e}function B(V){var W={"=":"=0",":":"=2"};return"$"+V.replace(/[=:]/g,function($){return W[$]})}var G=/\/+/g;function U(V,W){return typeof V=="object"&&V!==null&&V.key!=null?B(""+V.key):W.toString(36)}function H(V){switch(V.status){case"fulfilled":return V.value;case"rejected":throw V.reason;default:switch(typeof V.status=="string"?V.then(j,j):(V.status="pending",V.then(function(W){V.status==="pending"&&(V.status="fulfilled",V.value=W)},function(W){V.status==="pending"&&(V.status="rejected",V.reason=W)})),V.status){case"fulfilled":return V.value;case"rejected":throw V.reason}}throw V}function N(V,W,$,X,ee){var re=typeof V;(re==="undefined"||re==="boolean")&&(V=null);var se=!1;if(V===null)se=!0;else switch(re){case"bigint":case"string":case"number":se=!0;break;case"object":switch(V.$$typeof){case e:case n:se=!0;break;case h:return se=V._init,N(se(V._payload),W,$,X,ee)}}if(se)return ee=ee(V),se=X===""?"."+U(V,0):X,O(ee)?($="",se!=null&&($=se.replace(G,"$&/")+"/"),N(ee,W,$,"",function(le){return le})):ee!=null&&(L(ee)&&(ee=R(ee,$+(ee.key==null||V&&V.key===ee.key?"":(""+ee.key).replace(G,"$&/")+"/")+se)),W.push(ee)),1;se=0;var ye=X===""?".":X+":";if(O(V))for(var ae=0;ae{const i=A.use(n);if(i===null)throw new Error(e);return i}]}function pT(e,n){return t=>{if(typeof t!="string"||t.trim().length===0)throw new Error(n);return`${e}-${t}`}}function Cg(e,n){let t=e;for(;(t=t.parentElement)&&!t.matches(n););return t}function iK(e,n,t){for(let i=e-1;i>=0;i-=1)if(!n[i].disabled)return i;if(t){for(let i=n.length-1;i>-1;i-=1)if(!n[i].disabled)return i}return e}function rK(e,n,t){for(let i=e+1;i{var b;t==null||t(l);const f=Array.from(((b=Cg(l.currentTarget,e))==null?void 0:b.querySelectorAll(n))||[]).filter(w=>aK(l.currentTarget,w,e)),c=f.findIndex(w=>l.currentTarget===w),h=rK(c,f,i),d=iK(c,f,i),p=a==="rtl"?d:h,v=a==="rtl"?h:d;switch(l.key){case"ArrowRight":o==="horizontal"&&(l.stopPropagation(),l.preventDefault(),f[p].focus(),r&&f[p].click());break;case"ArrowLeft":o==="horizontal"&&(l.stopPropagation(),l.preventDefault(),f[v].focus(),r&&f[v].click());break;case"ArrowUp":o==="vertical"&&(l.stopPropagation(),l.preventDefault(),f[d].focus(),r&&f[d].click());break;case"ArrowDown":o==="vertical"&&(l.stopPropagation(),l.preventDefault(),f[h].focus(),r&&f[h].click());break;case"Home":l.stopPropagation(),l.preventDefault(),!f[0].disabled&&f[0].focus();break;case"End":{l.stopPropagation(),l.preventDefault();const w=f.length-1;!f[w].disabled&&f[w].focus();break}}}}const oK={app:100,modal:200,popover:300,overlay:400,max:9999};function ba(e){return oK[e]}const sS=()=>{};function sK(e,n={active:!0}){return typeof e!="function"||!n.active?n.onKeyDown||sS:t=>{var i;t.key==="Escape"&&(e(t),(i=n.onTrigger)==null||i.call(n))}}function Pn(e,n="size",t=!0){if(e!==void 0)return iz(e)?t?me(e):e:`var(--${n}-${e})`}function Ht(e){return Pn(e,"mantine-spacing")}function Kt(e){return e===void 0?"var(--mantine-radius-default)":Pn(e,"mantine-radius")}function ti(e){return Pn(e,"mantine-font-size")}function lK(e){return Pn(e,"mantine-line-height",!1)}function M6(e){if(e)return Pn(e,"mantine-shadow",!1)}function kr(e,n){return t=>{e==null||e(t),n==null||n(t)}}function D6(e,n){return e in n?qh(n[e]):qh(e)}function Hh(e,n){const t=e.map(i=>({value:i,px:D6(i,n)}));return t.sort((i,r)=>i.px-r.px),t}function Ur(e){return typeof e=="object"&&e!==null?"base"in e?e.base:void 0:e}function uK(e,n,t){var i;return t?Array.from(((i=Cg(t,n))==null?void 0:i.querySelectorAll(e))||[]).findIndex(r=>r===t):null}function Yo(e,n,t){return n===void 0&&t===void 0?e:n!==void 0&&t===void 0?Math.max(e,n):Math.min(n===void 0&&t!==void 0?e:Math.max(e,n),t)}function al(e="mantine-"){return`${e}${Math.random().toString(36).slice(2,11)}`}function gh(e){const n=A.useRef(e);return A.useEffect(()=>{n.current=e}),A.useMemo(()=>((...t)=>{var i;return(i=n.current)==null?void 0:i.call(n,...t)}),[])}function ty(e,n){const{delay:t,flushOnUnmount:i,leading:r,maxWait:a}=typeof n=="number"?{delay:n,flushOnUnmount:!1,leading:!1,maxWait:void 0}:n,o=gh(e),l=A.useRef(0),f=A.useRef(0),c=A.useRef(null),h=A.useMemo(()=>{const d=Object.assign((...p)=>{window.clearTimeout(l.current),c.current=p;const v=d._isFirstCall;d._isFirstCall=!1;function b(){window.clearTimeout(l.current),window.clearTimeout(f.current),l.current=0,f.current=0,d._isFirstCall=!0,d._hasPendingCallback=!1}function w(){a!==void 0&&f.current===0&&(f.current=window.setTimeout(()=>{if(l.current!==0){const C=c.current;b(),o(...C)}},a))}if(r&&v){o(...p);const C=()=>{b()},x=()=>{l.current!==0&&(b(),o(...p))},E=()=>{b()};d.flush=x,d.cancel=E,l.current=window.setTimeout(C,t),w();return}if(r&&!v){d._hasPendingCallback=!0;const C=()=>{l.current!==0&&(b(),o(...p))},x=()=>{b()};d.flush=C,d.cancel=x;const E=()=>{b()};l.current=window.setTimeout(E,t),w();return}d._hasPendingCallback=!0;const k=()=>{l.current!==0&&(b(),o(...p))},_=()=>{b()};d.flush=k,d.cancel=_,l.current=window.setTimeout(k,t),w()},{flush:()=>{},cancel:()=>{},isPending:()=>d._hasPendingCallback,_isFirstCall:!0,_hasPendingCallback:!1});return d},[o,t,r,a]);return A.useEffect(()=>()=>{i?h.flush():h.cancel()},[h,i]),h}const fK=["mousedown","touchstart"];function cK(e,n,t,i=!0){const r=A.useRef(null),a=n||fK,o=A.useEffectEvent(f=>{const{target:c}=f??{};if(!document.body.contains(c)&&(c==null?void 0:c.tagName)!=="HTML")return;const h=f.composedPath();Array.isArray(t)?t.every(d=>!!d&&!h.includes(d))&&e(f):r.current&&!h.includes(r.current)&&e(f)}),l=a.join(",");return A.useEffect(()=>{if(!i)return;const f=l.split(",");return f.forEach(c=>document.addEventListener(c,o)),()=>{f.forEach(c=>document.removeEventListener(c,o))}},[l,i]),r}function dK(e,n){return typeof window<"u"&&"matchMedia"in window?window.matchMedia(e).matches:!1}function hK(e,n,{getInitialValueInEffect:t}={getInitialValueInEffect:!0}){const[i,r]=A.useState(t?n:dK(e));return A.useEffect(()=>{try{if("matchMedia"in window){const a=window.matchMedia(e);r(a.matches);const o=l=>r(l.matches);return a.addEventListener("change",o),()=>{a.removeEventListener("change",o)}}}catch{return}},[e]),i||!1}const us=typeof document<"u"?A.useLayoutEffect:A.useEffect;function ns(e,n){const t=A.useRef(!1);A.useEffect(()=>()=>{t.current=!1},[]),A.useEffect(()=>{if(t.current)return e();t.current=!0},n)}function az({opened:e,shouldReturnFocus:n=!0}){const t=A.useRef(null),i=()=>{var r;t.current&&"focus"in t.current&&typeof t.current.focus=="function"&&((r=t.current)==null||r.focus({preventScroll:!0}))};return ns(()=>{let r=-1;const a=o=>{o.key==="Tab"&&window.clearTimeout(r)};if(document.addEventListener("keydown",a),e)t.current=document.activeElement;else if(n){const o=document.activeElement;r=window.setTimeout(()=>{const l=document.activeElement;(l===null||l===document.body||l===o)&&i()},10)}return()=>{window.clearTimeout(r),document.removeEventListener("keydown",a)}},[e,n]),i}const mK=/input|select|textarea|button|object/,oz="a, input, select, textarea, button, object, [tabindex]";function pK(e){return e.style.display==="none"}function vK(e){if(e.getAttribute("aria-hidden")||e.getAttribute("hidden")||e.getAttribute("type")==="hidden")return!1;let n=e;for(;n&&!(n===document.body||n.nodeType===11);){if(pK(n))return!1;n=n.parentNode}return!0}function sz(e){let n=e.getAttribute("tabindex");return n===null&&(n=void 0),parseInt(n,10)}function lS(e){const n=e.nodeName.toLowerCase(),t=!Number.isNaN(sz(e));return(mK.test(n)&&!e.disabled||e instanceof HTMLAnchorElement&&e.href||t)&&vK(e)}function lz(e){const n=sz(e);return(Number.isNaN(n)||n>=0)&&lS(e)}function gK(e){return Array.from(e.querySelectorAll(oz)).filter(lz)}function yK(e,n){const t=gK(e);if(!t.length){n.preventDefault();return}const i=t[n.shiftKey?0:t.length-1],r=e.getRootNode();let a=i===r.activeElement||e===r.activeElement;const o=r.activeElement;if(o.tagName==="INPUT"&&o.getAttribute("type")==="radio"&&(a=t.filter(f=>f.getAttribute("type")==="radio"&&f.getAttribute("name")===o.getAttribute("name")).includes(i)),!a)return;n.preventDefault();const l=t[n.shiftKey?t.length-1:0];l&&l.focus()}function bK(e=!0){const n=A.useRef(null),t=r=>{let a=r.querySelector("[data-autofocus]");if(!a){const o=Array.from(r.querySelectorAll(oz));a=o.find(lz)||o.find(lS)||null,!a&&lS(r)&&(a=r)}a?a.focus({preventScroll:!0}):console.warn("[@mantine/hooks/use-focus-trap] Failed to find focusable element within provided node",r)},i=A.useCallback(r=>{if(e){if(r===null){n.current=null;return}n.current!==r&&(setTimeout(()=>{r.getRootNode()?t(r):console.warn("[@mantine/hooks/use-focus-trap] Ref node is not part of the dom",r)}),n.current=r)}},[e]);return A.useEffect(()=>{if(!e)return;n.current&&setTimeout(()=>{n.current&&t(n.current)});const r=a=>{a.key==="Tab"&&n.current&&yK(n.current,a)};return document.addEventListener("keydown",r),()=>document.removeEventListener("keydown",r)},[e]),i}const wK=e=>(e+1)%1e6;function kK(){const[,e]=A.useReducer(wK,0);return e}function qi(e){const[n,t]=A.useState(`mantine-${A.useId().replace(/:/g,"")}`);return us(()=>{t(al())},[]),typeof e=="string"?e:n}function uz(e,n,t){const i=A.useEffectEvent(n);A.useEffect(()=>(window.addEventListener(e,i,t),()=>window.removeEventListener(e,i,t)),[e])}function Ag(e,n){if(typeof e=="function")return e(n);typeof e=="object"&&e!==null&&"current"in e&&(e.current=n)}function _K(...e){const n=new Map;return t=>{if(e.forEach(i=>{const r=Ag(i,t);r&&n.set(i,r)}),n.size>0)return()=>{e.forEach(i=>{const r=n.get(i);r&&typeof r=="function"?r():Ag(i,null)}),n.clear()}}}function Wt(...e){return A.useCallback(_K(...e),e)}function fz(e){return{x:Yo(e.x,0,1),y:Yo(e.y,0,1)}}function cz(e,n,t="ltr"){const i=A.useRef(!1),r=A.useRef(!1),a=A.useRef(0),o=A.useRef(null),[l,f]=A.useState(!1);return A.useEffect(()=>(i.current=!0,()=>{var c;(c=o.current)==null||c.call(o)}),[]),{ref:A.useCallback(c=>{const h=({x,y:E})=>{cancelAnimationFrame(a.current),a.current=requestAnimationFrame(()=>{if(i.current&&c){c.style.userSelect="none";const O=c.getBoundingClientRect();if(O.width&&O.height){const j=Yo((x-O.left)/O.width,0,1);e({x:t==="ltr"?j:1-j,y:Yo((E-O.top)/O.height,0,1)})}}})},d=()=>{document.addEventListener("mousemove",k),document.addEventListener("mouseup",b),document.addEventListener("touchmove",C,{passive:!1}),document.addEventListener("touchend",b)},p=()=>{document.removeEventListener("mousemove",k),document.removeEventListener("mouseup",b),document.removeEventListener("touchmove",C),document.removeEventListener("touchend",b)},v=()=>{!r.current&&i.current&&(r.current=!0,typeof(n==null?void 0:n.onScrubStart)=="function"&&n.onScrubStart(),f(!0),d())},b=()=>{r.current&&i.current&&(r.current=!1,f(!1),p(),setTimeout(()=>{typeof(n==null?void 0:n.onScrubEnd)=="function"&&n.onScrubEnd()},0))},w=x=>{v(),x.preventDefault(),k(x)},k=x=>h({x:x.clientX,y:x.clientY}),_=x=>{x.cancelable&&x.preventDefault(),v(),C(x)},C=x=>{x.cancelable&&x.preventDefault(),h({x:x.changedTouches[0].clientX,y:x.changedTouches[0].clientY})};return c==null||c.addEventListener("mousedown",w),c==null||c.addEventListener("touchstart",_,{passive:!1}),o.current=()=>{p(),cancelAnimationFrame(a.current)},()=>{c&&(c.removeEventListener("mousedown",w),c.removeEventListener("touchstart",_))}},[t,e]),active:l}}function Ti({value:e,defaultValue:n,finalValue:t,onChange:i=()=>{}}){const[r,a]=A.useState(n!==void 0?n:t),o=(l,...f)=>{a(l),i==null||i(l,...f)};return e!==void 0?[e,i,!0]:[r,o,!1]}function R6(e,n){return hK("(prefers-reduced-motion: reduce)",e,n)}function dz(e=!1,n={}){const[t,i]=A.useState(e),r=A.useCallback(()=>{i(o=>{var l;return o||((l=n.onOpen)==null||l.call(n),!0)})},[n.onOpen]),a=A.useCallback(()=>{i(o=>{var l;return o&&((l=n.onClose)==null||l.call(n),!1)})},[n.onClose]);return[t,{open:r,close:a,toggle:A.useCallback(()=>{t?a():r()},[a,r,t]),set:i}]}function xK(e){const n=A.useRef(void 0);return A.useEffect(()=>{n.current=e},[e]),n.current}var ik={exports:{}},Gi={};/** + * @license React + * react-dom.production.js + * + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var vT;function SK(){if(vT)return Gi;vT=1;var e=j6();function n(f){var c="https://react.dev/errors/"+f;if(1"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(n){console.error(n)}}return e(),ik.exports=SK(),ik.exports}var Qs=hz();const yh=ht(Qs);function CK(e,n){window.dispatchEvent(new CustomEvent(e,{detail:n}))}function AK(e){function n(i){const r=Object.keys(i).reduce((a,o)=>(a[`${e}:${o}`]=l=>i[o](l.detail),a),{});us(()=>(Object.keys(r).forEach(a=>{window.removeEventListener(a,r[a]),window.addEventListener(a,r[a])}),()=>Object.keys(r).forEach(a=>{window.removeEventListener(a,r[a])})),[r])}function t(i){return(...r)=>CK(`${e}:${String(i)}`,r[0])}return[n,t]}var OK={};function jK(){return"development"}function iy(e){var t;const n=Q.version;return typeof Q.version!="string"||n.startsWith("18.")?e==null?void 0:e.ref:(t=e==null?void 0:e.props)==null?void 0:t.ref}function ug(e,n=document){const t=n.querySelector(e);if(t)return t;const i=n.querySelectorAll("*");for(let r=0;r{Object.entries(t).forEach(([i,r])=>{n[i]?n[i]=dn(n[i],r):n[i]=r})}),n}function Uh({theme:e,classNames:n,props:t,stylesCtx:i}){return TK((Array.isArray(n)?n:[n]).map(r=>typeof r=="function"?r(e,t,i):r||EK))}function Og({theme:e,styles:n,props:t,stylesCtx:i}){const r=Array.isArray(n)?n:[n],a={};for(const o of r)typeof o=="function"?Object.assign(a,o(e,t,i)):o&&Object.assign(a,o);return a}function yT(e){return e==="auto"||e==="dark"||e==="light"}function MK({key:e="mantine-color-scheme-value"}={}){let n;return{get:t=>{if(typeof window>"u")return t;try{const i=window.localStorage.getItem(e);return yT(i)?i:t}catch{return t}},set:t=>{try{window.localStorage.setItem(e,t)}catch(i){console.warn("[@mantine/core] Local storage color scheme manager was unable to save color scheme.",i)}},subscribe:t=>{n=i=>{i.storageArea===window.localStorage&&i.key===e&&yT(i.newValue)&&t(i.newValue)},window.addEventListener("storage",n)},unsubscribe:()=>{window.removeEventListener("storage",n)},clear:()=>{window.localStorage.removeItem(e)}}}function Vh(e,n){return typeof e.primaryShade=="number"?e.primaryShade:n==="dark"?e.primaryShade.dark:e.primaryShade.light}function DK(e){return/^#?([0-9A-F]{3}){1,2}([0-9A-F]{2})?$/i.test(e)}function RK(e){let n=e.replace("#","");if(n.length===3){const i=n.split("");n=[i[0],i[0],i[1],i[1],i[2],i[2]].join("")}if(n.length===8){const i=parseInt(n.slice(6,8),16)/255;return{r:parseInt(n.slice(0,2),16),g:parseInt(n.slice(2,4),16),b:parseInt(n.slice(4,6),16),a:i}}const t=parseInt(n,16);return{r:t>>16&255,g:t>>8&255,b:t&255,a:1}}function PK(e){const[n,t,i,r]=e.replace(/[^0-9,./]/g,"").split(/[/,]/).map(Number);return{r:n,g:t,b:i,a:r===void 0?1:r}}function NK(e){const n=e.match(/^hsla?\(\s*(\d+)\s*,\s*(\d+%)\s*,\s*(\d+%)\s*(,\s*(0?\.\d+|\d+(\.\d+)?))?\s*\)$/i);if(!n)return{r:0,g:0,b:0,a:1};const t=parseInt(n[1],10),i=parseInt(n[2],10)/100,r=parseInt(n[3],10)/100,a=n[5]?parseFloat(n[5]):void 0,o=(1-Math.abs(2*r-1))*i,l=t/60,f=o*(1-Math.abs(l%2-1)),c=r-o/2;let h,d,p;return l>=0&&l<1?(h=o,d=f,p=0):l>=1&&l<2?(h=f,d=o,p=0):l>=2&&l<3?(h=0,d=o,p=f):l>=3&&l<4?(h=0,d=f,p=o):l>=4&&l<5?(h=f,d=0,p=o):(h=o,d=0,p=f),{r:Math.round((h+c)*255),g:Math.round((d+c)*255),b:Math.round((p+c)*255),a:a||1}}function P6(e){return DK(e)?RK(e):e.startsWith("rgb")?PK(e):e.startsWith("hsl")?NK(e):{r:0,g:0,b:0,a:1}}function rk(e){return e<=.03928?e/12.92:((e+.055)/1.055)**2.4}function $K(e){const n=e.match(/oklch\((.*?)%\s/);return n?parseFloat(n[1]):null}function pz(e){if(e.startsWith("oklch("))return($K(e)||0)/100;const{r:n,g:t,b:i}=P6(e),r=n/255,a=t/255,o=i/255,l=rk(r),f=rk(a),c=rk(o);return .2126*l+.7152*f+.0722*c}function Qd(e,n=.179){return e.startsWith("var(")?!1:pz(e)>n}function fs({color:e,theme:n,colorScheme:t}){if(typeof e!="string")throw new Error(`[@mantine/core] Failed to parse color. Expected color to be a string, instead got ${typeof e}`);if(e==="bright")return{color:e,value:t==="dark"?n.white:n.black,shade:void 0,isThemeColor:!1,isLight:Qd(t==="dark"?n.white:n.black,n.luminanceThreshold),variable:"--mantine-color-bright"};if(e==="dimmed")return{color:e,value:t==="dark"?n.colors.dark[2]:n.colors.gray[7],shade:void 0,isThemeColor:!1,isLight:Qd(t==="dark"?n.colors.dark[2]:n.colors.gray[6],n.luminanceThreshold),variable:"--mantine-color-dimmed"};if(e==="white"||e==="black")return{color:e,value:e==="white"?n.white:n.black,shade:void 0,isThemeColor:!1,isLight:Qd(e==="white"?n.white:n.black,n.luminanceThreshold),variable:`--mantine-color-${e}`};const[i,r]=e.split("."),a=r?Number(r):void 0,o=i in n.colors;if(o){const l=a!==void 0?n.colors[i][a]:n.colors[i][Vh(n,t||"light")];return{color:i,value:l,shade:a,isThemeColor:o,isLight:Qd(l,n.luminanceThreshold),variable:r?`--mantine-color-${i}-${a}`:`--mantine-color-${i}-filled`}}return{color:e,value:e,isThemeColor:o,isLight:Qd(e,n.luminanceThreshold),shade:a,variable:void 0}}function st(e,n){const t=fs({color:e||n.primaryColor,theme:n});return t.variable?`var(${t.variable})`:e}function ru(e,n){if(e.startsWith("var("))return`color-mix(in srgb, ${e}, black ${n*100}%)`;const{r:t,g:i,b:r,a}=P6(e),o=1-n,l=f=>Math.round(f*o);return`rgba(${l(t)}, ${l(i)}, ${l(r)}, ${a})`}function uS(e,n){const t={from:(e==null?void 0:e.from)||n.defaultGradient.from,to:(e==null?void 0:e.to)||n.defaultGradient.to,deg:(e==null?void 0:e.deg)??n.defaultGradient.deg??0},i=st(t.from,n),r=st(t.to,n);return`linear-gradient(${t.deg}deg, ${i} 0%, ${r} 100%)`}function Ws(e,n){if(typeof e!="string"||n>1||n<0)return"rgba(0, 0, 0, 1)";if(e.startsWith("var("))return`color-mix(in srgb, ${e}, transparent ${(1-n)*100}%)`;if(e.startsWith("oklch"))return e.includes("/")?e.replace(/\/\s*[\d.]+\s*\)/,`/ ${n})`):e.replace(")",` / ${n})`);const{r:t,g:i,b:r}=P6(e);return`rgba(${t}, ${i}, ${r}, ${n})`}const bT=Ws,zK=({color:e,theme:n,variant:t,gradient:i,autoContrast:r})=>{const a=fs({color:e,theme:n}),o=typeof r=="boolean"?r:n.autoContrast;if(t==="none")return{background:"transparent",hover:"transparent",color:"inherit",border:"none"};if(t==="filled"){const l=o&&a.isLight?"var(--mantine-color-black)":"var(--mantine-color-white)";return a.isThemeColor?a.shade===void 0?{background:`var(--mantine-color-${e}-filled)`,hover:`var(--mantine-color-${e}-filled-hover)`,color:l,border:`${me(1)} solid transparent`}:{background:`var(--mantine-color-${a.color}-${a.shade})`,hover:`var(--mantine-color-${a.color}-${a.shade===9?8:a.shade+1})`,color:l,border:`${me(1)} solid transparent`}:{background:e,hover:ru(e,.1),color:l,border:`${me(1)} solid transparent`}}if(t==="light"){if(a.isThemeColor){if(a.shade===void 0)return{background:`var(--mantine-color-${e}-light)`,hover:`var(--mantine-color-${e}-light-hover)`,color:`var(--mantine-color-${e}-light-color)`,border:`${me(1)} solid transparent`};const l=n.colors[a.color][a.shade];return{background:l,hover:ru(l,.1),color:`var(--mantine-color-${a.color}-light-color)`,border:`${me(1)} solid transparent`}}return{background:Ws(e,.1),hover:Ws(e,.12),color:e,border:`${me(1)} solid transparent`}}if(t==="outline")return a.isThemeColor?a.shade===void 0?{background:"transparent",hover:`var(--mantine-color-${e}-outline-hover)`,color:`var(--mantine-color-${e}-outline)`,border:`${me(1)} solid var(--mantine-color-${e}-outline)`}:{background:"transparent",hover:Ws(n.colors[a.color][a.shade],.05),color:`var(--mantine-color-${a.color}-${a.shade})`,border:`${me(1)} solid var(--mantine-color-${a.color}-${a.shade})`}:{background:"transparent",hover:Ws(e,.05),color:e,border:`${me(1)} solid ${e}`};if(t==="subtle"){if(a.isThemeColor){if(a.shade===void 0)return{background:"transparent",hover:`var(--mantine-color-${e}-light-hover)`,color:`var(--mantine-color-${e}-light-color)`,border:`${me(1)} solid transparent`};const l=n.colors[a.color][a.shade];return{background:"transparent",hover:Ws(l,.12),color:`var(--mantine-color-${a.color}-${Math.min(a.shade,6)})`,border:`${me(1)} solid transparent`}}return{background:"transparent",hover:Ws(e,.12),color:e,border:`${me(1)} solid transparent`}}return t==="transparent"?a.isThemeColor?a.shade===void 0?{background:"transparent",hover:"transparent",color:`var(--mantine-color-${e}-light-color)`,border:`${me(1)} solid transparent`}:{background:"transparent",hover:"transparent",color:`var(--mantine-color-${a.color}-${Math.min(a.shade,6)})`,border:`${me(1)} solid transparent`}:{background:"transparent",hover:"transparent",color:e,border:`${me(1)} solid transparent`}:t==="white"?a.isThemeColor?a.shade===void 0?{background:"var(--mantine-color-white)",hover:ru(n.white,.01),color:`var(--mantine-color-${e}-filled)`,border:`${me(1)} solid transparent`}:{background:"var(--mantine-color-white)",hover:ru(n.white,.01),color:`var(--mantine-color-${a.color}-${a.shade})`,border:`${me(1)} solid transparent`}:{background:"var(--mantine-color-white)",hover:ru(n.white,.01),color:e,border:`${me(1)} solid transparent`}:t==="gradient"?{background:uS(i,n),hover:uS(i,n),color:"var(--mantine-color-white)",border:"none"}:t==="default"?{background:"var(--mantine-color-default)",hover:"var(--mantine-color-default-hover)",color:"var(--mantine-color-default-color)",border:`${me(1)} solid var(--mantine-color-default-border)`}:{}};function Lm({color:e,theme:n,autoContrast:t}){return(typeof t=="boolean"?t:n.autoContrast)&&fs({color:e||n.primaryColor,theme:n}).isLight?"var(--mantine-color-black)":"var(--mantine-color-white)"}function wT(e,n){return Lm({color:e.colors[e.primaryColor][Vh(e,n)],theme:e,autoContrast:null})}function ry(e,n){return typeof e=="boolean"?e:n.autoContrast}const vz=A.createContext(null);function bo(){const e=A.use(vz);if(!e)throw new Error("[@mantine/core] MantineProvider was not found in tree");return e}function LK(){return bo().cssVariablesResolver}function IK(){return bo().classNamesPrefix}function N6(){return bo().getStyleNonce}function BK(){return bo().withStaticClasses}function FK(){return bo().headless}function qK(){var e;return(e=bo().stylesTransform)==null?void 0:e.sx}function HK(){var e;return(e=bo().stylesTransform)==null?void 0:e.styles}function Im(){return bo().env||"default"}function UK(){return bo().deduplicateInlineStyles}function _f(e,n){var r,a;const t=typeof window<"u"&&"matchMedia"in window&&((r=window.matchMedia("(prefers-color-scheme: dark)"))==null?void 0:r.matches),i=e!=="auto"?e:t?"dark":"light";(a=n())==null||a.setAttribute("data-mantine-color-scheme",i)}function VK({manager:e,defaultColorScheme:n,getRootElement:t,forceColorScheme:i}){const r=A.useRef(null),[a,o]=A.useState(()=>e.get(n)),l=i||a,f=A.useCallback(h=>{i||(_f(h,t),o(h),e.set(h))},[e.set,l,i]),c=A.useCallback(()=>{o(n),_f(n,t),e.clear()},[e.clear,n]);return A.useEffect(()=>(e.subscribe(f),e.unsubscribe),[e.subscribe,e.unsubscribe]),us(()=>{_f(e.get(n),t)},[]),A.useEffect(()=>{var d;if(i)return _f(i,t),()=>{};i===void 0&&_f(a,t),typeof window<"u"&&"matchMedia"in window&&(r.current=window.matchMedia("(prefers-color-scheme: dark)"));const h=p=>{a==="auto"&&_f(p.matches?"dark":"light",t)};return(d=r.current)==null||d.addEventListener("change",h),()=>{var p;return(p=r.current)==null?void 0:p.removeEventListener("change",h)}},[a,i]),{colorScheme:l,setColorScheme:f,clearColorScheme:c}}const WK={dark:["#C9C9C9","#b8b8b8","#828282","#696969","#424242","#3b3b3b","#2e2e2e","#242424","#1f1f1f","#141414"],gray:["#f8f9fa","#f1f3f5","#e9ecef","#dee2e6","#ced4da","#adb5bd","#868e96","#495057","#343a40","#212529"],red:["#fff5f5","#ffe3e3","#ffc9c9","#ffa8a8","#ff8787","#ff6b6b","#fa5252","#f03e3e","#e03131","#c92a2a"],pink:["#fff0f6","#ffdeeb","#fcc2d7","#faa2c1","#f783ac","#f06595","#e64980","#d6336c","#c2255c","#a61e4d"],grape:["#f8f0fc","#f3d9fa","#eebefa","#e599f7","#da77f2","#cc5de8","#be4bdb","#ae3ec9","#9c36b5","#862e9c"],violet:["#f3f0ff","#e5dbff","#d0bfff","#b197fc","#9775fa","#845ef7","#7950f2","#7048e8","#6741d9","#5f3dc4"],indigo:["#edf2ff","#dbe4ff","#bac8ff","#91a7ff","#748ffc","#5c7cfa","#4c6ef5","#4263eb","#3b5bdb","#364fc7"],blue:["#e7f5ff","#d0ebff","#a5d8ff","#74c0fc","#4dabf7","#339af0","#228be6","#1c7ed6","#1971c2","#1864ab"],cyan:["#e3fafc","#c5f6fa","#99e9f2","#66d9e8","#3bc9db","#22b8cf","#15aabf","#1098ad","#0c8599","#0b7285"],teal:["#e6fcf5","#c3fae8","#96f2d7","#63e6be","#38d9a9","#20c997","#12b886","#0ca678","#099268","#087f5b"],green:["#ebfbee","#d3f9d8","#b2f2bb","#8ce99a","#69db7c","#51cf66","#40c057","#37b24d","#2f9e44","#2b8a3e"],lime:["#f4fce3","#e9fac8","#d8f5a2","#c0eb75","#a9e34b","#94d82d","#82c91e","#74b816","#66a80f","#5c940d"],yellow:["#fff9db","#fff3bf","#ffec99","#ffe066","#ffd43b","#fcc419","#fab005","#f59f00","#f08c00","#e67700"],orange:["#fff4e6","#ffe8cc","#ffd8a8","#ffc078","#ffa94d","#ff922b","#fd7e14","#f76707","#e8590c","#d9480f"]},kT="-apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji",$6={scale:1,fontSmoothing:!0,focusRing:"auto",white:"#fff",black:"#000",colors:WK,primaryShade:{light:6,dark:8},primaryColor:"blue",variantColorResolver:zK,autoContrast:!1,luminanceThreshold:.3,fontFamily:kT,fontFamilyMonospace:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, Liberation Mono, Courier New, monospace",respectReducedMotion:!1,cursorType:"default",defaultGradient:{from:"blue",to:"cyan",deg:45},defaultRadius:"md",activeClassName:"mantine-active",focusClassName:"",headings:{fontFamily:kT,fontWeight:"700",textWrap:"wrap",sizes:{h1:{fontSize:me(34),lineHeight:"1.3"},h2:{fontSize:me(26),lineHeight:"1.35"},h3:{fontSize:me(22),lineHeight:"1.4"},h4:{fontSize:me(18),lineHeight:"1.45"},h5:{fontSize:me(16),lineHeight:"1.5"},h6:{fontSize:me(14),lineHeight:"1.5"}}},fontSizes:{xs:me(12),sm:me(14),md:me(16),lg:me(18),xl:me(20)},lineHeights:{xs:"1.4",sm:"1.45",md:"1.55",lg:"1.6",xl:"1.65"},fontWeights:{regular:"400",medium:"600",bold:"700"},radius:{xs:me(2),sm:me(4),md:me(8),lg:me(16),xl:me(32)},spacing:{xs:me(10),sm:me(12),md:me(16),lg:me(20),xl:me(32)},breakpoints:{xs:"36em",sm:"48em",md:"62em",lg:"75em",xl:"88em"},shadows:{xs:`0 ${me(1)} ${me(3)} rgba(0, 0, 0, 0.05), 0 ${me(1)} ${me(2)} rgba(0, 0, 0, 0.1)`,sm:`0 ${me(1)} ${me(3)} rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 ${me(10)} ${me(15)} ${me(-5)}, rgba(0, 0, 0, 0.04) 0 ${me(7)} ${me(7)} ${me(-5)}`,md:`0 ${me(1)} ${me(3)} rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 ${me(20)} ${me(25)} ${me(-5)}, rgba(0, 0, 0, 0.04) 0 ${me(10)} ${me(10)} ${me(-5)}`,lg:`0 ${me(1)} ${me(3)} rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 ${me(28)} ${me(23)} ${me(-7)}, rgba(0, 0, 0, 0.04) 0 ${me(12)} ${me(12)} ${me(-7)}`,xl:`0 ${me(1)} ${me(3)} rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 ${me(36)} ${me(28)} ${me(-7)}, rgba(0, 0, 0, 0.04) 0 ${me(17)} ${me(17)} ${me(-7)}`},other:{},components:{}},GK="[@mantine/core] MantineProvider: Invalid theme.primaryColor, it accepts only key of theme.colors, learn more – https://mantine.dev/theming/colors/#primary-color",_T="[@mantine/core] MantineProvider: Invalid theme.primaryShade, it accepts only 0-9 integers or an object { light: 0-9, dark: 0-9 }";function ak(e){return e<0||e>9?!1:parseInt(e.toString(),10)===e}function xT(e){if(!(e.primaryColor in e.colors))throw new Error(GK);if(typeof e.primaryShade=="object"&&(!ak(e.primaryShade.dark)||!ak(e.primaryShade.light)))throw new Error(_T);if(typeof e.primaryShade=="number"&&!ak(e.primaryShade))throw new Error(_T)}function YK(e,n){var i;if(!n)return xT(e),e;const t=O6(e,n);return n.fontFamily&&!((i=n.headings)!=null&&i.fontFamily)&&(t.headings.fontFamily=n.fontFamily),xT(t),t}const z6=A.createContext(null),KK=()=>A.use(z6)||$6;function li(){const e=A.use(z6);if(!e)throw new Error("@mantine/core: MantineProvider was not found in component tree, make sure you have it in your app");return e}function gz({theme:e,children:n,inherit:t=!0}){const i=KK();return y.jsx(z6,{value:A.useMemo(()=>YK(t?i:$6,e),[e,i,t]),children:n})}gz.displayName="@mantine/core/MantineThemeProvider";function ok(e){return Object.entries(e).map(([n,t])=>`${n}: ${t};`).join("")}function yz(e,n){const t=n?[n]:[":root",":host"],i=ok(e.variables),r=i?`${t.join(", ")}{${i}}`:"",a=ok(e.dark),o=ok(e.light),l=f=>t.map(c=>c===":host"?`${c}([data-mantine-color-scheme="${f}"])`:`${c}[data-mantine-color-scheme="${f}"]`).join(", ");return`${r} + +${a?`${l("dark")}{${a}}`:""} + +${o?`${l("light")}{${o}}`:""}`}function Tv({theme:e,color:n,colorScheme:t,name:i=n,withColorValues:r=!0}){if(!e.colors[n])return{};if(t==="light"){const l=Vh(e,"light"),f={[`--mantine-color-${i}-text`]:`var(--mantine-color-${i}-filled)`,[`--mantine-color-${i}-filled`]:`var(--mantine-color-${i}-${l})`,[`--mantine-color-${i}-filled-hover`]:`var(--mantine-color-${i}-${l===9?8:l+1})`,[`--mantine-color-${i}-light`]:`var(--mantine-color-${i}-1)`,[`--mantine-color-${i}-light-hover`]:`var(--mantine-color-${i}-2)`,[`--mantine-color-${i}-light-color`]:`var(--mantine-color-${i}-9)`,[`--mantine-color-${i}-outline`]:`var(--mantine-color-${i}-${l})`,[`--mantine-color-${i}-outline-hover`]:bT(e.colors[n][l],.05)};return r?{[`--mantine-color-${i}-0`]:e.colors[n][0],[`--mantine-color-${i}-1`]:e.colors[n][1],[`--mantine-color-${i}-2`]:e.colors[n][2],[`--mantine-color-${i}-3`]:e.colors[n][3],[`--mantine-color-${i}-4`]:e.colors[n][4],[`--mantine-color-${i}-5`]:e.colors[n][5],[`--mantine-color-${i}-6`]:e.colors[n][6],[`--mantine-color-${i}-7`]:e.colors[n][7],[`--mantine-color-${i}-8`]:e.colors[n][8],[`--mantine-color-${i}-9`]:e.colors[n][9],...f}:f}const a=Vh(e,"dark"),o={[`--mantine-color-${i}-text`]:`var(--mantine-color-${i}-4)`,[`--mantine-color-${i}-filled`]:`var(--mantine-color-${i}-${a})`,[`--mantine-color-${i}-filled-hover`]:`var(--mantine-color-${i}-${a===9?8:a+1})`,[`--mantine-color-${i}-light`]:ru(e.colors[n][9],.5),[`--mantine-color-${i}-light-hover`]:ru(e.colors[n][9],.3),[`--mantine-color-${i}-light-color`]:`var(--mantine-color-${i}-0)`,[`--mantine-color-${i}-outline`]:`var(--mantine-color-${i}-${Math.max(a-4,0)})`,[`--mantine-color-${i}-outline-hover`]:bT(e.colors[n][Math.max(a-4,0)],.05)};return r?{[`--mantine-color-${i}-0`]:e.colors[n][0],[`--mantine-color-${i}-1`]:e.colors[n][1],[`--mantine-color-${i}-2`]:e.colors[n][2],[`--mantine-color-${i}-3`]:e.colors[n][3],[`--mantine-color-${i}-4`]:e.colors[n][4],[`--mantine-color-${i}-5`]:e.colors[n][5],[`--mantine-color-${i}-6`]:e.colors[n][6],[`--mantine-color-${i}-7`]:e.colors[n][7],[`--mantine-color-${i}-8`]:e.colors[n][8],[`--mantine-color-${i}-9`]:e.colors[n][9],...o}:o}function XK(e){return!!e&&typeof e=="object"&&"mantine-virtual-color"in e}function Kl(e,n,t){Dt(n).forEach(i=>Object.assign(e,{[`--mantine-${t}-${i}`]:n[i]}))}const bz=e=>{const n=Vh(e,"light"),t=e.defaultRadius in e.radius?e.radius[e.defaultRadius]:me(e.defaultRadius),i={variables:{"--mantine-z-index-app":"100","--mantine-z-index-modal":"200","--mantine-z-index-popover":"300","--mantine-z-index-overlay":"400","--mantine-z-index-max":"9999","--mantine-scale":e.scale.toString(),"--mantine-cursor-type":e.cursorType,"--mantine-webkit-font-smoothing":e.fontSmoothing?"antialiased":"unset","--mantine-moz-font-smoothing":e.fontSmoothing?"grayscale":"unset","--mantine-color-white":e.white,"--mantine-color-black":e.black,"--mantine-line-height":e.lineHeights.md,"--mantine-font-family":e.fontFamily,"--mantine-font-family-monospace":e.fontFamilyMonospace,"--mantine-font-family-headings":e.headings.fontFamily,"--mantine-heading-font-weight":e.headings.fontWeight,"--mantine-heading-text-wrap":e.headings.textWrap,"--mantine-radius-default":t,"--mantine-primary-color-filled":`var(--mantine-color-${e.primaryColor}-filled)`,"--mantine-primary-color-filled-hover":`var(--mantine-color-${e.primaryColor}-filled-hover)`,"--mantine-primary-color-light":`var(--mantine-color-${e.primaryColor}-light)`,"--mantine-primary-color-light-hover":`var(--mantine-color-${e.primaryColor}-light-hover)`,"--mantine-primary-color-light-color":`var(--mantine-color-${e.primaryColor}-light-color)`},light:{"--mantine-color-scheme":"light","--mantine-primary-color-contrast":wT(e,"light"),"--mantine-color-bright":"var(--mantine-color-black)","--mantine-color-text":e.black,"--mantine-color-body":e.white,"--mantine-color-error":"var(--mantine-color-red-6)","--mantine-color-placeholder":"var(--mantine-color-gray-5)","--mantine-color-anchor":`var(--mantine-color-${e.primaryColor}-${n})`,"--mantine-color-default":"var(--mantine-color-white)","--mantine-color-default-hover":"var(--mantine-color-gray-0)","--mantine-color-default-color":"var(--mantine-color-black)","--mantine-color-default-border":"var(--mantine-color-gray-4)","--mantine-color-dimmed":"var(--mantine-color-gray-6)","--mantine-color-disabled":"var(--mantine-color-gray-2)","--mantine-color-disabled-color":"var(--mantine-color-gray-5)","--mantine-color-disabled-border":"var(--mantine-color-gray-3)"},dark:{"--mantine-color-scheme":"dark","--mantine-primary-color-contrast":wT(e,"dark"),"--mantine-color-bright":"var(--mantine-color-white)","--mantine-color-text":"var(--mantine-color-dark-0)","--mantine-color-body":"var(--mantine-color-dark-7)","--mantine-color-error":"var(--mantine-color-red-8)","--mantine-color-placeholder":"var(--mantine-color-dark-3)","--mantine-color-anchor":`var(--mantine-color-${e.primaryColor}-4)`,"--mantine-color-default":"var(--mantine-color-dark-6)","--mantine-color-default-hover":"var(--mantine-color-dark-5)","--mantine-color-default-color":"var(--mantine-color-white)","--mantine-color-default-border":"var(--mantine-color-dark-4)","--mantine-color-dimmed":"var(--mantine-color-dark-2)","--mantine-color-disabled":"var(--mantine-color-dark-6)","--mantine-color-disabled-color":"var(--mantine-color-dark-3)","--mantine-color-disabled-border":"var(--mantine-color-dark-4)"}};Kl(i.variables,e.breakpoints,"breakpoint"),Kl(i.variables,e.spacing,"spacing"),Kl(i.variables,e.fontSizes,"font-size"),Kl(i.variables,e.lineHeights,"line-height"),Kl(i.variables,e.shadows,"shadow"),Kl(i.variables,e.radius,"radius"),Kl(i.variables,e.fontWeights,"font-weight"),e.colors[e.primaryColor].forEach((a,o)=>{i.variables[`--mantine-primary-color-${o}`]=`var(--mantine-color-${e.primaryColor}-${o})`}),Dt(e.colors).forEach(a=>{const o=e.colors[a];if(XK(o)){Object.assign(i.light,Tv({theme:e,name:o.name,color:o.light,colorScheme:"light",withColorValues:!0})),Object.assign(i.dark,Tv({theme:e,name:o.name,color:o.dark,colorScheme:"dark",withColorValues:!0}));return}o.forEach((l,f)=>{i.variables[`--mantine-color-${a}-${f}`]=l}),Object.assign(i.light,Tv({theme:e,color:a,colorScheme:"light",withColorValues:!1})),Object.assign(i.dark,Tv({theme:e,color:a,colorScheme:"dark",withColorValues:!1}))});const r=e.headings.sizes;return Dt(r).forEach(a=>{i.variables[`--mantine-${a}-font-size`]=r[a].fontSize,i.variables[`--mantine-${a}-line-height`]=r[a].lineHeight,i.variables[`--mantine-${a}-font-weight`]=r[a].fontWeight||e.headings.fontWeight}),i};function ZK(){const e=li(),n=N6(),t=Dt(e.breakpoints).reduce((i,r)=>{const a=e.breakpoints[r].includes("px"),o=qh(e.breakpoints[r]);return`${i}@media (max-width: ${a?`${o-.1}px`:Sg(o-.1)}) {.mantine-visible-from-${r} {display: none !important;}}@media (min-width: ${a?`${o}px`:Sg(o)}) {.mantine-hidden-from-${r} {display: none !important;}}`},"");return y.jsx("style",{"data-mantine-styles":"classes",nonce:n==null?void 0:n(),dangerouslySetInnerHTML:{__html:t}})}function QK({theme:e,generator:n}){const t=bz(e),i=n==null?void 0:n(e);return i?O6(t,i):t}const sk=bz($6);function JK(e){const n={variables:{},light:{},dark:{}};return Dt(e.variables).forEach(t=>{sk.variables[t]!==e.variables[t]&&(n.variables[t]=e.variables[t])}),Dt(e.light).forEach(t=>{sk.light[t]!==e.light[t]&&(n.light[t]=e.light[t])}),Dt(e.dark).forEach(t=>{sk.dark[t]!==e.dark[t]&&(n.dark[t]=e.dark[t])}),n}function eX(e){return yz({variables:{},dark:{"--mantine-color-scheme":"dark"},light:{"--mantine-color-scheme":"light"}},e)}function wz({cssVariablesSelector:e,deduplicateCssVariables:n}){const t=li(),i=N6(),r=QK({theme:t,generator:LK()}),a=(e===void 0||e===":root"||e===":host")&&n,o=yz(a?JK(r):r,e);return o?y.jsx("style",{"data-mantine-styles":!0,nonce:i==null?void 0:i(),dangerouslySetInnerHTML:{__html:`${o}${a?"":eX(e)}`}}):null}wz.displayName="@mantine/CssVariables";function nX({respectReducedMotion:e,getRootElement:n}){us(()=>{var t;e&&((t=n())==null||t.setAttribute("data-respect-reduced-motion","true"))},[e])}function kz({theme:e,children:n,getStyleNonce:t,withStaticClasses:i=!0,withGlobalClasses:r=!0,deduplicateCssVariables:a=!0,withCssVariables:o=!0,cssVariablesSelector:l,classNamesPrefix:f="mantine",colorSchemeManager:c=MK(),defaultColorScheme:h="light",getRootElement:d=()=>document.documentElement,cssVariablesResolver:p,forceColorScheme:v,stylesTransform:b,env:w,deduplicateInlineStyles:k=!1}){const{colorScheme:_,setColorScheme:C,clearColorScheme:x}=VK({defaultColorScheme:h,forceColorScheme:v,manager:c,getRootElement:d});return nX({respectReducedMotion:(e==null?void 0:e.respectReducedMotion)||!1,getRootElement:d}),y.jsx(vz,{value:{colorScheme:_,setColorScheme:C,clearColorScheme:x,getRootElement:d,classNamesPrefix:f,getStyleNonce:t,cssVariablesResolver:p,cssVariablesSelector:l??":root",withStaticClasses:i,stylesTransform:b,env:w,deduplicateInlineStyles:k},children:y.jsxs(gz,{theme:e,children:[o&&y.jsx(wz,{cssVariablesSelector:l,deduplicateCssVariables:a}),r&&y.jsx(ZK,{}),n]})})}kz.displayName="@mantine/core/MantineProvider";function be(e,n,t){var o;const i=li(),r=(o=i.components[e])==null?void 0:o.defaultProps,a=typeof r=="function"?r(i):r;return{...n,...a,...ju(t)}}function Hi({classNames:e,styles:n,props:t,stylesCtx:i}){const r=li();return{resolvedClassNames:e===void 0?void 0:Uh({theme:r,classNames:e,props:t,stylesCtx:i||void 0}),resolvedStyles:n===void 0?void 0:Og({theme:r,styles:n,props:t,stylesCtx:i||void 0})}}const tX={always:"mantine-focus-always",auto:"mantine-focus-auto",never:"mantine-focus-never"};function iX({theme:e,options:n,unstyled:t}){return dn((n==null?void 0:n.focusable)&&!t&&(e.focusClassName||tX[e.focusRing]),(n==null?void 0:n.active)&&!t&&e.activeClassName)}function rX({selector:e,stylesCtx:n,options:t,props:i,theme:r}){return Uh({theme:r,classNames:t==null?void 0:t.classNames,props:(t==null?void 0:t.props)||i,stylesCtx:n})[e]}function aX({selector:e,stylesCtx:n,theme:t,classNames:i,props:r}){return Uh({theme:t,classNames:i,props:r,stylesCtx:n})[e]}function oX({rootSelector:e,selector:n,className:t}){return e===n?t:void 0}function sX({selector:e,classes:n,unstyled:t}){return t?void 0:n[e]}function lX({themeName:e,classNamesPrefix:n,selector:t,withStaticClass:i}){return i===!1?[]:e.map(r=>`${n}-${r}-${t}`)}function uX({options:e,classes:n,selector:t,unstyled:i}){return e!=null&&e.variant&&!i?n[`${t}--${e.variant}`]:void 0}function fX({theme:e,options:n,themeName:t,selector:i,classNamesPrefix:r,resolvedClassNames:a,resolvedThemeClassNames:o,classes:l,unstyled:f,className:c,rootSelector:h,props:d,stylesCtx:p,withStaticClasses:v,headless:b,transformedStyles:w}){return dn(iX({theme:e,options:n,unstyled:f||b}),o.map(k=>k[i]),uX({options:n,classes:l,selector:i,unstyled:f||b}),a[i],aX({selector:i,stylesCtx:p,theme:e,classNames:w,props:d}),rX({selector:i,stylesCtx:p,options:n,props:d,theme:e}),oX({rootSelector:h,selector:i,className:c}),sX({selector:i,classes:l,unstyled:f||b}),v&&!b&&lX({themeName:t,classNamesPrefix:r,selector:i,withStaticClass:n==null?void 0:n.withStaticClass}),n==null?void 0:n.className)}function L6({style:e,theme:n}){return Array.isArray(e)?e.reduce((t,i)=>({...t,...L6({style:i,theme:n})}),{}):typeof e=="function"?e(n):e??{}}function cX({theme:e,selector:n,options:t,props:i,stylesCtx:r,rootSelector:a,withStylesTransform:o,resolvedStyles:l,resolvedThemeStyles:f,resolvedVars:c,resolvedRootStyle:h}){return{...f[n],...l[n],...!o&&Og({theme:e,styles:t==null?void 0:t.styles,props:(t==null?void 0:t.props)||i,stylesCtx:r})[n],...c[n],...a===n?h:null,...L6({style:t==null?void 0:t.style,theme:e})}}function dX(e){return e.reduce((n,t)=>(t&&Object.keys(t).forEach(i=>{n[i]={...n[i],...ju(t[i])}}),n),{})}function hX({props:e,stylesCtx:n,themeName:t,theme:i}){var o;const r=(o=HK())==null?void 0:o();return{getTransformedStyles:l=>r?[...l.map(f=>r(f,{props:e,theme:i,ctx:n})),...t.map(f=>{var c;return r((c=i.components[f])==null?void 0:c.styles,{props:e,theme:i,ctx:n})})].filter(Boolean):[],withStylesTransform:!!r}}function Ze({name:e,classes:n,props:t,stylesCtx:i,className:r,style:a,rootSelector:o="root",unstyled:l,classNames:f,styles:c,vars:h,varsResolver:d,attributes:p}){var R;const v=li(),b=IK(),w=BK(),k=FK(),_=(Array.isArray(e)?e:[e]).filter(L=>L),{withStylesTransform:C,getTransformedStyles:x}=hX({props:t,stylesCtx:i,themeName:_,theme:v}),E=Uh({theme:v,classNames:f,props:t,stylesCtx:i}),O=_.map(L=>{var B;return Uh({theme:v,classNames:(B=v.components[L])==null?void 0:B.classNames,props:t,stylesCtx:i})}),j=C?{}:Og({theme:v,styles:c,props:t,stylesCtx:i}),M={};if(!C)for(const L of _){const B=Og({theme:v,styles:(R=v.components[L])==null?void 0:R.styles,props:t,stylesCtx:i});for(const G of Object.keys(B))M[G]={...M[G],...B[G]}}const P=dX([k?{}:d==null?void 0:d(v,t,i),..._.map(L=>{var B,G,U;return(U=(G=(B=v.components)==null?void 0:B[L])==null?void 0:G.vars)==null?void 0:U.call(G,v,t,i)}),h==null?void 0:h(v,t,i)]),F=L6({style:a,theme:v});return(L,B)=>({...p==null?void 0:p[L],className:fX({theme:v,options:B,themeName:_,selector:L,classNamesPrefix:b,resolvedClassNames:E,resolvedThemeClassNames:O,classes:n,unstyled:l,className:r,rootSelector:o,props:t,stylesCtx:i,withStaticClasses:w,headless:k,transformedStyles:x([B==null?void 0:B.styles,c])}),style:cX({theme:v,selector:L,options:B,props:t,stylesCtx:i,rootSelector:o,withStylesTransform:C,resolvedStyles:j,resolvedThemeStyles:M,resolvedVars:P,resolvedRootStyle:F})})}function jh(e){return Dt(e).reduce((n,t)=>e[t]!==void 0?`${n}${eK(t)}:${e[t]};`:n,"").trim()}function mX({selector:e,styles:n,media:t,container:i}){const r=n?jh(n):"",a=Array.isArray(t)?t.map(l=>`@media${l.query}{${e}{${jh(l.styles)}}}`):[],o=Array.isArray(i)?i.map(l=>`@container ${l.query}{${e}{${jh(l.styles)}}}`):[];return`${r?`${e}{${r}}`:""}${a.join("")}${o.join("")}`.trim()}function pX(e){let n=5381;for(let t=0;t>>0).toString(36)}function Mc({deduplicate:e,...n}){const t=N6(),i=mX(n);return e?y.jsx("style",{href:`mantine-${pX(i)}`,precedence:"mantine",nonce:t==null?void 0:t(),children:i}):y.jsx("style",{"data-mantine-styles":"inline",nonce:t==null?void 0:t(),dangerouslySetInnerHTML:{__html:i}})}function vX(e){let n=5381;for(let t=0;t>>0).toString(36)}function gX(e,n){return`__mdi__-${vX(`${e?jh(e):""}|${Array.isArray(n)?n.map(t=>`${t.query}:${jh(t.styles)}`).join("|"):""}`)}`}function Tu(e){const{m:n,mx:t,my:i,mt:r,mb:a,ml:o,mr:l,me:f,ms:c,mis:h,mie:d,p,px:v,py:b,pt:w,pb:k,pl:_,pr:C,pe:x,ps:E,pis:O,pie:j,bd:M,bdrs:P,bg:F,c:R,opacity:L,ff:B,fz:G,fw:U,lts:H,ta:N,lh:z,fs:q,tt:Y,td:D,w:V,miw:W,maw:$,h:X,mih:ee,mah:re,bgsz:se,bgp:ye,bgr:ae,bga:le,pos:_e,top:ne,left:ze,bottom:we,right:Ce,inset:Ne,display:ve,flex:xe,hiddenFrom:Pe,visibleFrom:ue,lightHidden:Be,darkHidden:We,sx:Ue,...Xe}=e;return{styleProps:ju({m:n,mx:t,my:i,mt:r,mb:a,ml:o,mr:l,me:f,ms:c,mis:h,mie:d,p,px:v,py:b,pt:w,pb:k,pl:_,pr:C,pis:O,pie:j,pe:x,ps:E,bd:M,bg:F,c:R,opacity:L,ff:B,fz:G,fw:U,lts:H,ta:N,lh:z,fs:q,tt:Y,td:D,w:V,miw:W,maw:$,h:X,mih:ee,mah:re,bgsz:se,bgp:ye,bgr:ae,bga:le,pos:_e,top:ne,left:ze,bottom:we,right:Ce,inset:Ne,display:ve,flex:xe,bdrs:P,hiddenFrom:Pe,visibleFrom:ue,lightHidden:Be,darkHidden:We,sx:Ue}),rest:Xe}}const yX={m:{type:"spacing",property:"margin"},mt:{type:"spacing",property:"marginTop"},mb:{type:"spacing",property:"marginBottom"},ml:{type:"spacing",property:"marginLeft"},mr:{type:"spacing",property:"marginRight"},ms:{type:"spacing",property:"marginInlineStart"},me:{type:"spacing",property:"marginInlineEnd"},mis:{type:"spacing",property:"marginInlineStart"},mie:{type:"spacing",property:"marginInlineEnd"},mx:{type:"spacing",property:"marginInline"},my:{type:"spacing",property:"marginBlock"},p:{type:"spacing",property:"padding"},pt:{type:"spacing",property:"paddingTop"},pb:{type:"spacing",property:"paddingBottom"},pl:{type:"spacing",property:"paddingLeft"},pr:{type:"spacing",property:"paddingRight"},ps:{type:"spacing",property:"paddingInlineStart"},pe:{type:"spacing",property:"paddingInlineEnd"},pis:{type:"spacing",property:"paddingInlineStart"},pie:{type:"spacing",property:"paddingInlineEnd"},px:{type:"spacing",property:"paddingInline"},py:{type:"spacing",property:"paddingBlock"},bd:{type:"border",property:"border"},bdrs:{type:"radius",property:"borderRadius"},bg:{type:"color",property:"background"},c:{type:"textColor",property:"color"},opacity:{type:"identity",property:"opacity"},ff:{type:"fontFamily",property:"fontFamily"},fz:{type:"fontSize",property:"fontSize"},fw:{type:"identity",property:"fontWeight"},lts:{type:"size",property:"letterSpacing"},ta:{type:"identity",property:"textAlign"},lh:{type:"lineHeight",property:"lineHeight"},fs:{type:"identity",property:"fontStyle"},tt:{type:"identity",property:"textTransform"},td:{type:"identity",property:"textDecoration"},w:{type:"spacing",property:"width"},miw:{type:"spacing",property:"minWidth"},maw:{type:"spacing",property:"maxWidth"},h:{type:"spacing",property:"height"},mih:{type:"spacing",property:"minHeight"},mah:{type:"spacing",property:"maxHeight"},bgsz:{type:"size",property:"backgroundSize"},bgp:{type:"identity",property:"backgroundPosition"},bgr:{type:"identity",property:"backgroundRepeat"},bga:{type:"identity",property:"backgroundAttachment"},pos:{type:"identity",property:"position"},top:{type:"size",property:"top"},left:{type:"size",property:"left"},bottom:{type:"size",property:"bottom"},right:{type:"size",property:"right"},inset:{type:"size",property:"inset"},display:{type:"identity",property:"display"},flex:{type:"identity",property:"flex"}};function I6(e,n){const t=fs({color:e,theme:n});return t.color==="dimmed"?"var(--mantine-color-dimmed)":t.color==="bright"?"var(--mantine-color-bright)":t.variable?`var(${t.variable})`:t.color}function bX(e,n){const t=fs({color:e,theme:n});return t.isThemeColor&&t.shade===void 0?`var(--mantine-color-${t.color}-text)`:I6(e,n)}function wX(e,n){if(typeof e=="number")return me(e);if(typeof e=="string"){const[t,i,...r]=e.split(" ").filter(o=>o.trim()!=="");let a=`${me(t)}`;return i&&(a+=` ${i}`),r.length>0&&(a+=` ${I6(r.join(" "),n)}`),a.trim()}return e}const ST={text:"var(--mantine-font-family)",mono:"var(--mantine-font-family-monospace)",monospace:"var(--mantine-font-family-monospace)",heading:"var(--mantine-font-family-headings)",headings:"var(--mantine-font-family-headings)"};function kX(e){return typeof e=="string"&&e in ST?ST[e]:e}const _X=["h1","h2","h3","h4","h5","h6"];function xX(e,n){return typeof e=="string"&&e in n.fontSizes?`var(--mantine-font-size-${e})`:typeof e=="string"&&_X.includes(e)?`var(--mantine-${e}-font-size)`:typeof e=="number"||typeof e=="string"?me(e):e}function SX(e){return e}const CX=["h1","h2","h3","h4","h5","h6"];function AX(e,n){return typeof e=="string"&&e in n.lineHeights?`var(--mantine-line-height-${e})`:typeof e=="string"&&CX.includes(e)?`var(--mantine-${e}-line-height)`:e}function OX(e,n){return typeof e=="string"&&e in n.radius?`var(--mantine-radius-${e})`:typeof e=="number"||typeof e=="string"?me(e):e}function jX(e){return typeof e=="number"?me(e):e}function EX(e,n){if(typeof e=="number")return me(e);if(typeof e=="string"){const t=e.replace("-","");if(!(t in n.spacing))return me(e);const i=`--mantine-spacing-${t}`;return e.startsWith("-")?`calc(var(${i}) * -1)`:`var(${i})`}return e}const lk={color:I6,textColor:bX,fontSize:xX,spacing:EX,radius:OX,identity:SX,size:jX,lineHeight:AX,fontFamily:kX,border:wX};function CT(e){return e.replace("(min-width: ","").replace("em)","")}function TX({media:e,...n}){const t=Object.keys(e).sort((i,r)=>Number(CT(i))-Number(CT(r))).map(i=>({query:i,styles:e[i]}));return{...n,media:t}}function MX(e){if(typeof e!="object"||e===null)return!1;const n=Object.keys(e);return!(n.length===1&&n[0]==="base")}function DX(e){return typeof e=="object"&&e!==null?"base"in e?e.base:void 0:e}function RX(e){return typeof e=="object"&&e!==null?Dt(e).filter(n=>n!=="base"):[]}function PX(e,n){return typeof e=="object"&&e!==null&&n in e?e[n]:e}function NX({styleProps:e,data:n,theme:t}){return TX(Dt(e).reduce((i,r)=>{if(r==="hiddenFrom"||r==="visibleFrom"||r==="sx")return i;const a=n[r],o=Array.isArray(a.property)?a.property:[a.property],l=DX(e[r]);if(!MX(e[r]))return o.forEach(c=>{i.inlineStyles[c]=lk[a.type](l,t)}),i;i.hasResponsiveStyles=!0;const f=RX(e[r]);return o.forEach(c=>{l!=null&&(i.styles[c]=lk[a.type](l,t)),f.forEach(h=>{const d=`(min-width: ${t.breakpoints[h]})`;i.media[d]={...i.media[d],[c]:lk[a.type](PX(e[r],h),t)}})}),i},{hasResponsiveStyles:!1,styles:{},inlineStyles:{},media:{}}))}function ay(){return`__m__-${A.useId().replace(/[:«»]/g,"")}`}function _z(e,n){return Array.isArray(e)?[...e].reduce((t,i)=>({...t,..._z(i,n)}),{}):typeof e=="function"?e(n):e??{}}function $X(e){return e}const zX=$X;function xz(e){return e}function Re(e){const n=e;return n.extend=xz,n.withProps=t=>{const i=r=>y.jsx(n,{...t,...r});return i.extend=n.extend,i.displayName=`WithProps(${n.displayName})`,i},n}function oy(e){return Re(e)}function xi(e){const n=e;return n.withProps=t=>{const i=r=>y.jsx(n,{...t,...r});return i.extend=n.extend,i.displayName=`WithProps(${n.displayName})`,i},n.extend=xz,n}function Sz(e){return`data-${(e.startsWith("data-")?e.slice(5):e).replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}`}function LX(e){return Object.keys(e).reduce((n,t)=>{const i=e[t];return i===void 0||i===""||i===!1||i===null||(n[Sz(t)]=e[t]),n},{})}function Cz(e){return e?typeof e=="string"?{[Sz(e)]:!0}:Array.isArray(e)?[...e].reduce((n,t)=>({...n,...Cz(t)}),{}):LX(e):null}function fS(e,n){return Array.isArray(e)?[...e].reduce((t,i)=>({...t,...fS(i,n)}),{}):typeof e=="function"?e(n):e??{}}function IX({theme:e,style:n,vars:t,styleProps:i}){const r=fS(n,e),a=fS(t,e);return{...r,...a,...i}}function Az({component:e,style:n,__vars:t,className:i,variant:r,mod:a,size:o,hiddenFrom:l,visibleFrom:f,lightHidden:c,darkHidden:h,renderRoot:d,__size:p,ref:v,...b}){var F,R;const w=li(),k=e||"div",{styleProps:_,rest:C}=Tu(b),x=(R=(F=qK())==null?void 0:F())==null?void 0:R(_.sx),E=ay(),O=NX({styleProps:_,theme:w,data:yX}),j=UK(),M=j&&O.hasResponsiveStyles?gX(O.styles,O.media):E,P={ref:v,style:IX({theme:w,style:n,vars:t,styleProps:O.inlineStyles}),className:dn(i,x,{[M]:O.hasResponsiveStyles,"mantine-light-hidden":c,"mantine-dark-hidden":h,[`mantine-hidden-from-${l}`]:l,[`mantine-visible-from-${f}`]:f}),"data-variant":r,"data-size":iz(o)?void 0:o||void 0,size:p,...Cz(a),...C};return y.jsxs(y.Fragment,{children:[O.hasResponsiveStyles&&y.jsx(Mc,{selector:`.${M}`,styles:O.styles,media:O.media,deduplicate:j}),typeof d=="function"?d(P):y.jsx(k,{...P})]})}Az.displayName="@mantine/core/Box";const ge=zX(Az),BX=A.createContext({dir:"ltr",toggleDirection:()=>{},setDirection:()=>{}});function Mu(){return A.use(BX)}const[FX,wa]=Wr("ScrollArea.Root component was not found in tree");function ll(e,n){const t=A.useEffectEvent(n);us(()=>{let i=0;if(e){const r=new ResizeObserver(()=>{cancelAnimationFrame(i),i=window.requestAnimationFrame(t)});return r.observe(e),()=>{window.cancelAnimationFrame(i),r.unobserve(e)}}},[e])}function qX(e){const{style:n,...t}=e,i=wa(),[r,a]=A.useState(0),[o,l]=A.useState(0),f=!!(r&&o);return ll(i.scrollbarX,()=>{var h;const c=((h=i.scrollbarX)==null?void 0:h.offsetHeight)||0;i.onCornerHeightChange(c),l(c)}),ll(i.scrollbarY,()=>{var h;const c=((h=i.scrollbarY)==null?void 0:h.offsetWidth)||0;i.onCornerWidthChange(c),a(c)}),f?y.jsx("div",{...t,style:{...n,width:r,height:o}}):null}function HX(e){const n=wa(),t=!!(n.scrollbarX&&n.scrollbarY);return n.type!=="scroll"&&t?y.jsx(qX,{...e}):null}const UX={scrollHideDelay:1e3,type:"hover"};function Oz(e){const{type:n,scrollHideDelay:t,scrollbars:i,getStyles:r,ref:a,...o}=be("ScrollAreaRoot",UX,e),[l,f]=A.useState(null),[c,h]=A.useState(null),[d,p]=A.useState(null),[v,b]=A.useState(null),[w,k]=A.useState(null),[_,C]=A.useState(0),[x,E]=A.useState(0),[O,j]=A.useState(!1),[M,P]=A.useState(!1),F=Wt(a,R=>f(R));return y.jsx(FX,{value:{type:n,scrollHideDelay:t,scrollArea:l,viewport:c,onViewportChange:h,content:d,onContentChange:p,scrollbarX:v,onScrollbarXChange:b,scrollbarXEnabled:O,onScrollbarXEnabledChange:j,scrollbarY:w,onScrollbarYChange:k,scrollbarYEnabled:M,onScrollbarYEnabledChange:P,onCornerWidthChange:C,onCornerHeightChange:E,getStyles:r},children:y.jsx(ge,{...o,ref:F,__vars:{"--sa-corner-width":i!=="xy"?"0px":`${_}px`,"--sa-corner-height":i!=="xy"?"0px":`${x}px`}})})}Oz.displayName="@mantine/core/ScrollAreaRoot";function jz(e,n){const t=e/n;return Number.isNaN(t)?0:t}function sy(e){const n=jz(e.viewport,e.content),t=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,i=(e.scrollbar.size-t)*n;return Math.max(i,18)}function Ez(e,n){return t=>{if(e[0]===e[1]||n[0]===n[1])return n[0];const i=(n[1]-n[0])/(e[1]-e[0]);return n[0]+i*(t-e[0])}}function VX(e,[n,t]){return Math.min(t,Math.max(n,e))}function AT(e,n,t="ltr"){const i=sy(n),r=n.scrollbar.paddingStart+n.scrollbar.paddingEnd,a=n.scrollbar.size-r,o=n.content-n.viewport,l=a-i,f=VX(e,t==="ltr"?[0,o]:[o*-1,0]);return Ez([0,o],[0,l])(f)}function WX(e,n,t,i="ltr"){const r=sy(t),a=r/2,o=n||a,l=r-o,f=t.scrollbar.paddingStart+o,c=t.scrollbar.size-t.scrollbar.paddingEnd-l,h=t.content-t.viewport,d=i==="ltr"?[0,h]:[h*-1,0];return Ez([f,c],d)(e)}function Tz(e,n){return e>0&&e{e==null||e(i),(t===!1||!i.defaultPrevented)&&(n==null||n(i))}}const[GX,Mz]=Wr("ScrollAreaScrollbar was not found in tree");function Dz(e){const{sizes:n,hasThumb:t,onThumbChange:i,onThumbPointerUp:r,onThumbPointerDown:a,onThumbPositionChange:o,onDragScroll:l,onWheelScroll:f,onResize:c,ref:h,...d}=e,p=wa(),[v,b]=A.useState(null),w=Wt(h,P=>b(P)),k=A.useRef(null),_=A.useRef(""),{viewport:C}=p,x=n.content-n.viewport,E=A.useEffectEvent(f),O=gh(o),j=ty(c,10),M=P=>{k.current&&l({x:P.clientX-k.current.left,y:P.clientY-k.current.top})};return A.useEffect(()=>{const P=F=>{const R=F.target;v!=null&&v.contains(R)&&E(F,x)};return document.addEventListener("wheel",P,{passive:!1}),()=>document.removeEventListener("wheel",P,{passive:!1})},[C,v,x]),A.useEffect(O,[n,O]),ll(v,j),ll(p.content,j),y.jsx(GX,{value:{scrollbar:v,hasThumb:t,onThumbChange:gh(i),onThumbPointerUp:gh(r),onThumbPositionChange:O,onThumbPointerDown:gh(a)},children:y.jsx("div",{...d,ref:w,"data-mantine-scrollbar":!0,style:{position:"absolute",...d.style},onPointerDown:hu(e.onPointerDown,P=>{P.preventDefault(),P.button===0&&(P.target.setPointerCapture(P.pointerId),k.current=v.getBoundingClientRect(),_.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",M(P))}),onPointerMove:hu(e.onPointerMove,M),onPointerUp:hu(e.onPointerUp,P=>{const F=P.target;F.hasPointerCapture(P.pointerId)&&(P.preventDefault(),F.releasePointerCapture(P.pointerId))}),onLostPointerCapture:()=>{document.body.style.webkitUserSelect=_.current,k.current=null}})})}const Rz=e=>{const{sizes:n,onSizesChange:t,style:i,ref:r,...a}=e,o=wa(),[l,f]=A.useState(),c=A.useRef(null),h=Wt(r,c,o.onScrollbarXChange);return A.useEffect(()=>{c.current&&f(getComputedStyle(c.current))},[c]),y.jsx(Dz,{"data-orientation":"horizontal",...a,ref:h,sizes:n,style:{...i,"--sa-thumb-width":`${sy(n)}px`},onThumbPointerDown:d=>e.onThumbPointerDown(d.x),onDragScroll:d=>e.onDragScroll(d.x),onWheelScroll:(d,p)=>{if(o.viewport){const v=o.viewport.scrollLeft+d.deltaX;e.onWheelScroll(v),Tz(v,p)&&d.preventDefault()}},onResize:()=>{c.current&&o.viewport&&l&&t({content:o.viewport.scrollWidth,viewport:o.viewport.offsetWidth,scrollbar:{size:c.current.clientWidth,paddingStart:jg(l.paddingLeft),paddingEnd:jg(l.paddingRight)}})}})};Rz.displayName="@mantine/core/ScrollAreaScrollbarX";function Pz(e){const{sizes:n,onSizesChange:t,style:i,ref:r,...a}=e,o=wa(),[l,f]=A.useState(),c=A.useRef(null),h=Wt(r,c,o.onScrollbarYChange);return A.useEffect(()=>{c.current&&f(window.getComputedStyle(c.current))},[]),y.jsx(Dz,{...a,"data-orientation":"vertical",ref:h,sizes:n,style:{"--sa-thumb-height":`${sy(n)}px`,...i},onThumbPointerDown:d=>e.onThumbPointerDown(d.y),onDragScroll:d=>e.onDragScroll(d.y),onWheelScroll:(d,p)=>{if(o.viewport){const v=o.viewport.scrollTop+d.deltaY;e.onWheelScroll(v),Tz(v,p)&&d.preventDefault()}},onResize:()=>{c.current&&o.viewport&&l&&t({content:o.viewport.scrollHeight,viewport:o.viewport.offsetHeight,scrollbar:{size:c.current.clientHeight,paddingStart:jg(l.paddingTop),paddingEnd:jg(l.paddingBottom)}})}})}Pz.displayName="@mantine/core/ScrollAreaScrollbarY";function ly(e){const{orientation:n="vertical",...t}=e,{dir:i}=Mu(),r=wa(),a=A.useRef(null),o=A.useRef(0),[l,f]=A.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),c=jz(l.viewport,l.content),h={...t,sizes:l,onSizesChange:f,hasThumb:c>0&&c<1,onThumbChange:p=>{a.current=p},onThumbPointerUp:()=>{o.current=0},onThumbPointerDown:p=>{o.current=p}},d=(p,v)=>WX(p,o.current,l,v);return n==="horizontal"?y.jsx(Rz,{...h,onThumbPositionChange:()=>{if(r.viewport&&a.current){const p=r.viewport.scrollLeft,v=AT(p,l,i);a.current.style.transform=`translate3d(${v}px, 0, 0)`}},onWheelScroll:p=>{r.viewport&&(r.viewport.scrollLeft=p)},onDragScroll:p=>{r.viewport&&(r.viewport.scrollLeft=d(p,i))}}):n==="vertical"?y.jsx(Pz,{...h,onThumbPositionChange:()=>{if(r.viewport&&a.current){const p=r.viewport.scrollTop,v=AT(p,l);l.scrollbar.size===0?a.current.style.setProperty("--thumb-opacity","0"):a.current.style.setProperty("--thumb-opacity","1"),a.current.style.transform=`translate3d(0, ${v}px, 0)`}},onWheelScroll:p=>{r.viewport&&(r.viewport.scrollTop=p)},onDragScroll:p=>{r.viewport&&(r.viewport.scrollTop=d(p))}}):null}ly.displayName="@mantine/core/ScrollAreaScrollbarVisible";function B6(e){const n=wa(),{forceMount:t,...i}=e,[r,a]=A.useState(!1),o=e.orientation==="horizontal",l=ty(()=>{if(n.viewport){const f=n.viewport.offsetWidth{const{scrollArea:o}=i;let l=0;if(o){const f=()=>{window.clearTimeout(l),a(!0)},c=()=>{l=window.setTimeout(()=>a(!1),i.scrollHideDelay)};return o.addEventListener("pointerenter",f),o.addEventListener("pointerleave",c),()=>{window.clearTimeout(l),o.removeEventListener("pointerenter",f),o.removeEventListener("pointerleave",c)}}},[i.scrollArea,i.scrollHideDelay]),n||r?y.jsx(B6,{"data-state":r?"visible":"hidden",...t}):null}Nz.displayName="@mantine/core/ScrollAreaScrollbarHover";function YX(e){const{forceMount:n,...t}=e,i=wa(),r=e.orientation==="horizontal",[a,o]=A.useState("hidden"),l=ty(()=>o("idle"),100);return A.useEffect(()=>{if(a==="idle"){const f=window.setTimeout(()=>o("hidden"),i.scrollHideDelay);return()=>window.clearTimeout(f)}},[a,i.scrollHideDelay]),A.useEffect(()=>{const{viewport:f}=i,c=r?"scrollLeft":"scrollTop";if(f){let h=f[c];const d=()=>{const p=f[c];h!==p&&(o("scrolling"),l()),h=p};return f.addEventListener("scroll",d),()=>f.removeEventListener("scroll",d)}},[i.viewport,r,l]),n||a!=="hidden"?y.jsx(ly,{"data-state":a==="hidden"?"hidden":"visible",...t,onPointerEnter:hu(e.onPointerEnter,()=>o("interacting")),onPointerLeave:hu(e.onPointerLeave,()=>o("idle"))}):null}function cS(e){const{forceMount:n,...t}=e,i=wa(),{onScrollbarXEnabledChange:r,onScrollbarYEnabledChange:a}=i,o=e.orientation==="horizontal";return A.useEffect(()=>(o?r(!0):a(!0),()=>{o?r(!1):a(!1)}),[o,r,a]),i.type==="hover"?y.jsx(Nz,{...t,forceMount:n}):i.type==="scroll"?y.jsx(YX,{...t,forceMount:n}):i.type==="auto"?y.jsx(B6,{...t,forceMount:n}):i.type==="always"?y.jsx(ly,{...t}):null}cS.displayName="@mantine/core/ScrollAreaScrollbar";function KX(e,n=()=>{}){let t={left:e.scrollLeft,top:e.scrollTop},i=0;return(function r(){const a={left:e.scrollLeft,top:e.scrollTop},o=t.left!==a.left,l=t.top!==a.top;(o||l)&&n(),t=a,i=window.requestAnimationFrame(r)})(),()=>window.cancelAnimationFrame(i)}function $z(e){const{style:n,ref:t,...i}=e,r=wa(),a=Mz(),{onThumbPositionChange:o}=a,l=Wt(t,h=>a.onThumbChange(h)),f=A.useRef(void 0),c=ty(()=>{f.current&&(f.current(),f.current=void 0)},100);return A.useEffect(()=>{const{viewport:h}=r;if(h){const d=()=>{c(),f.current||(f.current=KX(h,o),o())};return o(),h.addEventListener("scroll",d),()=>h.removeEventListener("scroll",d)}},[r.viewport,c,o]),y.jsx("div",{"data-state":a.hasThumb?"visible":"hidden",...i,ref:l,style:{width:"var(--sa-thumb-width)",height:"var(--sa-thumb-height)",...n},onPointerDownCapture:hu(e.onPointerDownCapture,h=>{const d=h.target.getBoundingClientRect(),p=h.clientX-d.left,v=h.clientY-d.top;a.onThumbPointerDown({x:p,y:v})}),onPointerUp:hu(e.onPointerUp,a.onThumbPointerUp)})}$z.displayName="@mantine/core/ScrollAreaThumb";function dS(e){const{forceMount:n,...t}=e,i=Mz();return n||i.hasThumb?y.jsx($z,{...t}):null}dS.displayName="@mantine/core/ScrollAreaThumb";function zz({children:e,style:n,ref:t,onWheel:i,...r}){const a=wa(),o=Wt(t,a.onViewportChange),l=f=>{if(i==null||i(f),a.scrollbarXEnabled&&a.viewport&&f.shiftKey){const{scrollTop:c,scrollHeight:h,clientHeight:d,scrollWidth:p,clientWidth:v}=a.viewport,b=c<1,w=c>=h-d-1;p>v&&(b||w)&&f.stopPropagation()}};return y.jsx(ge,{...r,ref:o,onWheel:l,style:{overflowX:a.scrollbarXEnabled?"scroll":"hidden",overflowY:a.scrollbarYEnabled?"scroll":"hidden",...n},children:y.jsx("div",{...a.getStyles("content"),ref:a.onContentChange,children:e})})}zz.displayName="@mantine/core/ScrollAreaViewport";var F6={root:"m_d57069b5",content:"m_b1336c6",viewport:"m_c0783ff9",viewportInner:"m_f8f631dd",scrollbar:"m_c44ba933",thumb:"m_d8b5e363",corner:"m_21657268"};function uy(){return typeof window<"u"}function Dc(e){return Lz(e)?(e.nodeName||"").toLowerCase():"#document"}function xr(e){var n;return(e==null||(n=e.ownerDocument)==null?void 0:n.defaultView)||window}function wo(e){var n;return(n=(Lz(e)?e.ownerDocument:e.document)||window.document)==null?void 0:n.documentElement}function Lz(e){return uy()?e instanceof Node||e instanceof xr(e).Node:!1}function Ut(e){return uy()?e instanceof Element||e instanceof xr(e).Element:!1}function ka(e){return uy()?e instanceof HTMLElement||e instanceof xr(e).HTMLElement:!1}function hS(e){return!uy()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof xr(e).ShadowRoot}function Bm(e){const{overflow:n,overflowX:t,overflowY:i,display:r}=ga(e);return/auto|scroll|overlay|hidden|clip/.test(n+i+t)&&r!=="inline"&&r!=="contents"}function XX(e){return/^(table|td|th)$/.test(Dc(e))}function fy(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const ZX=/transform|translate|scale|rotate|perspective|filter/,QX=/paint|layout|strict|content/,Xl=e=>!!e&&e!=="none";let uk;function q6(e){const n=Ut(e)?ga(e):e;return Xl(n.transform)||Xl(n.translate)||Xl(n.scale)||Xl(n.rotate)||Xl(n.perspective)||!cy()&&(Xl(n.backdropFilter)||Xl(n.filter))||ZX.test(n.willChange||"")||QX.test(n.contain||"")}function JX(e){let n=ts(e);for(;ka(n)&&!Ko(n);){if(q6(n))return n;if(fy(n))return null;n=ts(n)}return null}function cy(){return uk==null&&(uk=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),uk}function Ko(e){return/^(html|body|#document)$/.test(Dc(e))}function ga(e){return xr(e).getComputedStyle(e)}function dy(e){return Ut(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function ts(e){if(Dc(e)==="html")return e;const n=e.assignedSlot||e.parentNode||hS(e)&&e.host||wo(e);return hS(n)?n.host:n}function Iz(e){const n=ts(e);return Ko(n)?e.ownerDocument?e.ownerDocument.body:e.body:ka(n)&&Bm(n)?n:Iz(n)}function Xo(e,n,t){var i;n===void 0&&(n=[]),t===void 0&&(t=!0);const r=Iz(e),a=r===((i=e.ownerDocument)==null?void 0:i.body),o=xr(r);if(a){const l=mS(o);return n.concat(o,o.visualViewport||[],Bm(r)?r:[],l&&t?Xo(l):[])}else return n.concat(r,Xo(r,[],t))}function mS(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}const eZ=["top","right","bottom","left"],qa=Math.min,Xi=Math.max,Eg=Math.round,Mv=Math.floor,oo=e=>({x:e,y:e}),nZ={left:"right",right:"left",bottom:"top",top:"bottom"};function pS(e,n,t){return Xi(e,qa(n,t))}function ho(e,n){return typeof e=="function"?e(n):e}function Ha(e){return e.split("-")[0]}function Rc(e){return e.split("-")[1]}function H6(e){return e==="x"?"y":"x"}function U6(e){return e==="y"?"height":"width"}function La(e){const n=e[0];return n==="t"||n==="b"?"y":"x"}function V6(e){return H6(La(e))}function tZ(e,n,t){t===void 0&&(t=!1);const i=Rc(e),r=V6(e),a=U6(r);let o=r==="x"?i===(t?"end":"start")?"right":"left":i==="start"?"bottom":"top";return n.reference[a]>n.floating[a]&&(o=Tg(o)),[o,Tg(o)]}function iZ(e){const n=Tg(e);return[vS(e),n,vS(n)]}function vS(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const OT=["left","right"],jT=["right","left"],rZ=["top","bottom"],aZ=["bottom","top"];function oZ(e,n,t){switch(e){case"top":case"bottom":return t?n?jT:OT:n?OT:jT;case"left":case"right":return n?rZ:aZ;default:return[]}}function sZ(e,n,t,i){const r=Rc(e);let a=oZ(Ha(e),t==="start",i);return r&&(a=a.map(o=>o+"-"+r),n&&(a=a.concat(a.map(vS)))),a}function Tg(e){const n=Ha(e);return nZ[n]+e.slice(n.length)}function lZ(e){return{top:0,right:0,bottom:0,left:0,...e}}function W6(e){return typeof e!="number"?lZ(e):{top:e,right:e,bottom:e,left:e}}function Xf(e){const{x:n,y:t,width:i,height:r}=e;return{width:i,height:r,top:t,left:n,right:n+i,bottom:t+r,x:n,y:t}}function uZ(){const e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform}function fZ(){const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(n=>{let{brand:t,version:i}=n;return t+"/"+i}).join(" "):navigator.userAgent}function cZ(){return/apple/i.test(navigator.vendor)}function dZ(){return uZ().toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints}function hZ(){return fZ().includes("jsdom/")}const ET="data-floating-ui-focusable",mZ="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function TT(e){let n=e.activeElement;for(;((t=n)==null||(t=t.shadowRoot)==null?void 0:t.activeElement)!=null;){var t;n=n.shadowRoot.activeElement}return n}function Wh(e,n){if(!e||!n)return!1;const t=n.getRootNode==null?void 0:n.getRootNode();if(e.contains(n))return!0;if(t&&hS(t)){let i=n;for(;i;){if(e===i)return!0;i=i.parentNode||i.host}}return!1}function Pf(e){return"composedPath"in e?e.composedPath()[0]:e.target}function fk(e,n){if(n==null)return!1;if("composedPath"in e)return e.composedPath().includes(n);const t=e;return t.target!=null&&n.contains(t.target)}function pZ(e){return e.matches("html,body")}function ou(e){return(e==null?void 0:e.ownerDocument)||document}function vZ(e){return ka(e)&&e.matches(mZ)}function gZ(e){if(!e||hZ())return!0;try{return e.matches(":focus-visible")}catch{return!0}}function yZ(e){return e?e.hasAttribute(ET)?e:e.querySelector("["+ET+"]")||e:null}function fg(e,n,t){return t===void 0&&(t=!0),e.filter(r=>{var a;return r.parentId===n&&(!t||((a=r.context)==null?void 0:a.open))}).flatMap(r=>[r,...fg(e,r.id,t)])}function bZ(e){return"nativeEvent"in e}function gS(e,n){const t=["mouse","pen"];return t.push("",void 0),t.includes(e)}var wZ=typeof document<"u",kZ=function(){},so=wZ?A.useLayoutEffect:kZ;const _Z={...rz};function Dv(e){const n=A.useRef(e);return so(()=>{n.current=e}),n}const xZ=_Z.useInsertionEffect,SZ=xZ||(e=>e());function to(e){const n=A.useRef(()=>{});return SZ(()=>{n.current=e}),A.useCallback(function(){for(var t=arguments.length,i=new Array(t),r=0;r{const{placement:i="bottom",strategy:r="absolute",middleware:a=[],platform:o}=t,l=o.detectOverflow?o:{...o,detectOverflow:CZ},f=await(o.isRTL==null?void 0:o.isRTL(n));let c=await o.getElementRects({reference:e,floating:n,strategy:r}),{x:h,y:d}=MT(c,i,f),p=i,v=0;const b={};for(let w=0;w({name:"arrow",options:e,async fn(n){const{x:t,y:i,placement:r,rects:a,platform:o,elements:l,middlewareData:f}=n,{element:c,padding:h=0}=ho(e,n)||{};if(c==null)return{};const d=W6(h),p={x:t,y:i},v=V6(r),b=U6(v),w=await o.getDimensions(c),k=v==="y",_=k?"top":"left",C=k?"bottom":"right",x=k?"clientHeight":"clientWidth",E=a.reference[b]+a.reference[v]-p[v]-a.floating[b],O=p[v]-a.reference[v],j=await(o.getOffsetParent==null?void 0:o.getOffsetParent(c));let M=j?j[x]:0;(!M||!await(o.isElement==null?void 0:o.isElement(j)))&&(M=l.floating[x]||a.floating[b]);const P=E/2-O/2,F=M/2-w[b]/2-1,R=qa(d[_],F),L=qa(d[C],F),B=R,G=M-w[b]-L,U=M/2-w[b]/2+P,H=pS(B,U,G),N=!f.arrow&&Rc(r)!=null&&U!==H&&a.reference[b]/2-(UU<=0)){var L,B;const U=(((L=a.flip)==null?void 0:L.index)||0)+1,H=M[U];if(H&&(!(d==="alignment"?C!==La(H):!1)||R.every(q=>La(q.placement)===C?q.overflows[0]>0:!0)))return{data:{index:U,overflows:R},reset:{placement:H}};let N=(B=R.filter(z=>z.overflows[0]<=0).sort((z,q)=>z.overflows[1]-q.overflows[1])[0])==null?void 0:B.placement;if(!N)switch(v){case"bestFit":{var G;const z=(G=R.filter(q=>{if(j){const Y=La(q.placement);return Y===C||Y==="y"}return!0}).map(q=>[q.placement,q.overflows.filter(Y=>Y>0).reduce((Y,D)=>Y+D,0)]).sort((q,Y)=>q[1]-Y[1])[0])==null?void 0:G[0];z&&(N=z);break}case"initialPlacement":N=l;break}if(r!==N)return{reset:{placement:N}}}return{}}}};function DT(e,n){return{top:e.top-n.height,right:e.right-n.width,bottom:e.bottom-n.height,left:e.left-n.width}}function RT(e){return eZ.some(n=>e[n]>=0)}const TZ=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(n){const{rects:t,platform:i}=n,{strategy:r="referenceHidden",...a}=ho(e,n);switch(r){case"referenceHidden":{const o=await i.detectOverflow(n,{...a,elementContext:"reference"}),l=DT(o,t.reference);return{data:{referenceHiddenOffsets:l,referenceHidden:RT(l)}}}case"escaped":{const o=await i.detectOverflow(n,{...a,altBoundary:!0}),l=DT(o,t.floating);return{data:{escapedOffsets:l,escaped:RT(l)}}}default:return{}}}}};function Bz(e){const n=qa(...e.map(a=>a.left)),t=qa(...e.map(a=>a.top)),i=Xi(...e.map(a=>a.right)),r=Xi(...e.map(a=>a.bottom));return{x:n,y:t,width:i-n,height:r-t}}function MZ(e){const n=e.slice().sort((r,a)=>r.y-a.y),t=[];let i=null;for(let r=0;ri.height/2?t.push([a]):t[t.length-1].push(a),i=a}return t.map(r=>Xf(Bz(r)))}const DZ=function(e){return e===void 0&&(e={}),{name:"inline",options:e,async fn(n){const{placement:t,elements:i,rects:r,platform:a,strategy:o}=n,{padding:l=2,x:f,y:c}=ho(e,n),h=Array.from(await(a.getClientRects==null?void 0:a.getClientRects(i.reference))||[]),d=MZ(h),p=Xf(Bz(h)),v=W6(l);function b(){if(d.length===2&&d[0].left>d[1].right&&f!=null&&c!=null)return d.find(k=>f>k.left-v.left&&fk.top-v.top&&c=2){if(La(t)==="y"){const R=d[0],L=d[d.length-1],B=Ha(t)==="top",G=R.top,U=L.bottom,H=B?R.left:L.left,N=B?R.right:L.right,z=N-H,q=U-G;return{top:G,bottom:U,left:H,right:N,width:z,height:q,x:H,y:G}}const k=Ha(t)==="left",_=Xi(...d.map(R=>R.right)),C=qa(...d.map(R=>R.left)),x=d.filter(R=>k?R.left===C:R.right===_),E=x[0].top,O=x[x.length-1].bottom,j=C,M=_,P=M-j,F=O-E;return{top:E,bottom:O,left:j,right:M,width:P,height:F,x:j,y:E}}return p}const w=await a.getElementRects({reference:{getBoundingClientRect:b},floating:i.floating,strategy:o});return r.reference.x!==w.reference.x||r.reference.y!==w.reference.y||r.reference.width!==w.reference.width||r.reference.height!==w.reference.height?{reset:{rects:w}}:{}}}},Fz=new Set(["left","top"]);async function RZ(e,n){const{placement:t,platform:i,elements:r}=e,a=await(i.isRTL==null?void 0:i.isRTL(r.floating)),o=Ha(t),l=Rc(t),f=La(t)==="y",c=Fz.has(o)?-1:1,h=a&&f?-1:1,d=ho(n,e);let{mainAxis:p,crossAxis:v,alignmentAxis:b}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return l&&typeof b=="number"&&(v=l==="end"?b*-1:b),f?{x:v*h,y:p*c}:{x:p*c,y:v*h}}const PZ=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(n){var t,i;const{x:r,y:a,placement:o,middlewareData:l}=n,f=await RZ(n,e);return o===((t=l.offset)==null?void 0:t.placement)&&(i=l.arrow)!=null&&i.alignmentOffset?{}:{x:r+f.x,y:a+f.y,data:{...f,placement:o}}}}},NZ=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(n){const{x:t,y:i,placement:r,platform:a}=n,{mainAxis:o=!0,crossAxis:l=!1,limiter:f={fn:_=>{let{x:C,y:x}=_;return{x:C,y:x}}},...c}=ho(e,n),h={x:t,y:i},d=await a.detectOverflow(n,c),p=La(Ha(r)),v=H6(p);let b=h[v],w=h[p];if(o){const _=v==="y"?"top":"left",C=v==="y"?"bottom":"right",x=b+d[_],E=b-d[C];b=pS(x,b,E)}if(l){const _=p==="y"?"top":"left",C=p==="y"?"bottom":"right",x=w+d[_],E=w-d[C];w=pS(x,w,E)}const k=f.fn({...n,[v]:b,[p]:w});return{...k,data:{x:k.x-t,y:k.y-i,enabled:{[v]:o,[p]:l}}}}}},$Z=function(e){return e===void 0&&(e={}),{options:e,fn(n){const{x:t,y:i,placement:r,rects:a,middlewareData:o}=n,{offset:l=0,mainAxis:f=!0,crossAxis:c=!0}=ho(e,n),h={x:t,y:i},d=La(r),p=H6(d);let v=h[p],b=h[d];const w=ho(l,n),k=typeof w=="number"?{mainAxis:w,crossAxis:0}:{mainAxis:0,crossAxis:0,...w};if(f){const x=p==="y"?"height":"width",E=a.reference[p]-a.floating[x]+k.mainAxis,O=a.reference[p]+a.reference[x]-k.mainAxis;vO&&(v=O)}if(c){var _,C;const x=p==="y"?"width":"height",E=Fz.has(Ha(r)),O=a.reference[d]-a.floating[x]+(E&&((_=o.offset)==null?void 0:_[d])||0)+(E?0:k.crossAxis),j=a.reference[d]+a.reference[x]+(E?0:((C=o.offset)==null?void 0:C[d])||0)-(E?k.crossAxis:0);bj&&(b=j)}return{[p]:v,[d]:b}}}},zZ=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(n){var t,i;const{placement:r,rects:a,platform:o,elements:l}=n,{apply:f=()=>{},...c}=ho(e,n),h=await o.detectOverflow(n,c),d=Ha(r),p=Rc(r),v=La(r)==="y",{width:b,height:w}=a.floating;let k,_;d==="top"||d==="bottom"?(k=d,_=p===(await(o.isRTL==null?void 0:o.isRTL(l.floating))?"start":"end")?"left":"right"):(_=d,k=p==="end"?"top":"bottom");const C=w-h.top-h.bottom,x=b-h.left-h.right,E=qa(w-h[k],C),O=qa(b-h[_],x),j=!n.middlewareData.shift;let M=E,P=O;if((t=n.middlewareData.shift)!=null&&t.enabled.x&&(P=x),(i=n.middlewareData.shift)!=null&&i.enabled.y&&(M=C),j&&!p){const R=Xi(h.left,0),L=Xi(h.right,0),B=Xi(h.top,0),G=Xi(h.bottom,0);v?P=b-2*(R!==0||L!==0?R+L:Xi(h.left,h.right)):M=w-2*(B!==0||G!==0?B+G:Xi(h.top,h.bottom))}await f({...n,availableWidth:P,availableHeight:M});const F=await o.getDimensions(l.floating);return b!==F.width||w!==F.height?{reset:{rects:!0}}:{}}}};function qz(e){const n=ga(e);let t=parseFloat(n.width)||0,i=parseFloat(n.height)||0;const r=ka(e),a=r?e.offsetWidth:t,o=r?e.offsetHeight:i,l=Eg(t)!==a||Eg(i)!==o;return l&&(t=a,i=o),{width:t,height:i,$:l}}function G6(e){return Ut(e)?e:e.contextElement}function Ff(e){const n=G6(e);if(!ka(n))return oo(1);const t=n.getBoundingClientRect(),{width:i,height:r,$:a}=qz(n);let o=(a?Eg(t.width):t.width)/i,l=(a?Eg(t.height):t.height)/r;return(!o||!Number.isFinite(o))&&(o=1),(!l||!Number.isFinite(l))&&(l=1),{x:o,y:l}}const LZ=oo(0);function Hz(e){const n=xr(e);return!cy()||!n.visualViewport?LZ:{x:n.visualViewport.offsetLeft,y:n.visualViewport.offsetTop}}function IZ(e,n,t){return n===void 0&&(n=!1),!t||n&&t!==xr(e)?!1:n}function vu(e,n,t,i){n===void 0&&(n=!1),t===void 0&&(t=!1);const r=e.getBoundingClientRect(),a=G6(e);let o=oo(1);n&&(i?Ut(i)&&(o=Ff(i)):o=Ff(e));const l=IZ(a,t,i)?Hz(a):oo(0);let f=(r.left+l.x)/o.x,c=(r.top+l.y)/o.y,h=r.width/o.x,d=r.height/o.y;if(a){const p=xr(a),v=i&&Ut(i)?xr(i):i;let b=p,w=mS(b);for(;w&&i&&v!==b;){const k=Ff(w),_=w.getBoundingClientRect(),C=ga(w),x=_.left+(w.clientLeft+parseFloat(C.paddingLeft))*k.x,E=_.top+(w.clientTop+parseFloat(C.paddingTop))*k.y;f*=k.x,c*=k.y,h*=k.x,d*=k.y,f+=x,c+=E,b=xr(w),w=mS(b)}}return Xf({width:h,height:d,x:f,y:c})}function hy(e,n){const t=dy(e).scrollLeft;return n?n.left+t:vu(wo(e)).left+t}function Uz(e,n){const t=e.getBoundingClientRect(),i=t.left+n.scrollLeft-hy(e,t),r=t.top+n.scrollTop;return{x:i,y:r}}function BZ(e){let{elements:n,rect:t,offsetParent:i,strategy:r}=e;const a=r==="fixed",o=wo(i),l=n?fy(n.floating):!1;if(i===o||l&&a)return t;let f={scrollLeft:0,scrollTop:0},c=oo(1);const h=oo(0),d=ka(i);if((d||!d&&!a)&&((Dc(i)!=="body"||Bm(o))&&(f=dy(i)),d)){const v=vu(i);c=Ff(i),h.x=v.x+i.clientLeft,h.y=v.y+i.clientTop}const p=o&&!d&&!a?Uz(o,f):oo(0);return{width:t.width*c.x,height:t.height*c.y,x:t.x*c.x-f.scrollLeft*c.x+h.x+p.x,y:t.y*c.y-f.scrollTop*c.y+h.y+p.y}}function FZ(e){return Array.from(e.getClientRects())}function qZ(e){const n=wo(e),t=dy(e),i=e.ownerDocument.body,r=Xi(n.scrollWidth,n.clientWidth,i.scrollWidth,i.clientWidth),a=Xi(n.scrollHeight,n.clientHeight,i.scrollHeight,i.clientHeight);let o=-t.scrollLeft+hy(e);const l=-t.scrollTop;return ga(i).direction==="rtl"&&(o+=Xi(n.clientWidth,i.clientWidth)-r),{width:r,height:a,x:o,y:l}}const PT=25;function HZ(e,n){const t=xr(e),i=wo(e),r=t.visualViewport;let a=i.clientWidth,o=i.clientHeight,l=0,f=0;if(r){a=r.width,o=r.height;const h=cy();(!h||h&&n==="fixed")&&(l=r.offsetLeft,f=r.offsetTop)}const c=hy(i);if(c<=0){const h=i.ownerDocument,d=h.body,p=getComputedStyle(d),v=h.compatMode==="CSS1Compat"&&parseFloat(p.marginLeft)+parseFloat(p.marginRight)||0,b=Math.abs(i.clientWidth-d.clientWidth-v);b<=PT&&(a-=b)}else c<=PT&&(a+=c);return{width:a,height:o,x:l,y:f}}function UZ(e,n){const t=vu(e,!0,n==="fixed"),i=t.top+e.clientTop,r=t.left+e.clientLeft,a=ka(e)?Ff(e):oo(1),o=e.clientWidth*a.x,l=e.clientHeight*a.y,f=r*a.x,c=i*a.y;return{width:o,height:l,x:f,y:c}}function NT(e,n,t){let i;if(n==="viewport")i=HZ(e,t);else if(n==="document")i=qZ(wo(e));else if(Ut(n))i=UZ(n,t);else{const r=Hz(e);i={x:n.x-r.x,y:n.y-r.y,width:n.width,height:n.height}}return Xf(i)}function Vz(e,n){const t=ts(e);return t===n||!Ut(t)||Ko(t)?!1:ga(t).position==="fixed"||Vz(t,n)}function VZ(e,n){const t=n.get(e);if(t)return t;let i=Xo(e,[],!1).filter(l=>Ut(l)&&Dc(l)!=="body"),r=null;const a=ga(e).position==="fixed";let o=a?ts(e):e;for(;Ut(o)&&!Ko(o);){const l=ga(o),f=q6(o);!f&&l.position==="fixed"&&(r=null),(a?!f&&!r:!f&&l.position==="static"&&!!r&&(r.position==="absolute"||r.position==="fixed")||Bm(o)&&!f&&Vz(e,o))?i=i.filter(h=>h!==o):r=l,o=ts(o)}return n.set(e,i),i}function WZ(e){let{element:n,boundary:t,rootBoundary:i,strategy:r}=e;const o=[...t==="clippingAncestors"?fy(n)?[]:VZ(n,this._c):[].concat(t),i],l=NT(n,o[0],r);let f=l.top,c=l.right,h=l.bottom,d=l.left;for(let p=1;p{o(!1,1e-7)},1e3)}M===1&&!Gz(c,e.getBoundingClientRect())&&o(),E=!1}try{t=new IntersectionObserver(O,{...x,root:r.ownerDocument})}catch{t=new IntersectionObserver(O,x)}t.observe(e)}return o(!0),a}function yS(e,n,t,i){i===void 0&&(i={});const{ancestorScroll:r=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:f=!1}=i,c=G6(e),h=r||a?[...c?Xo(c):[],...n?Xo(n):[]]:[];h.forEach(_=>{r&&_.addEventListener("scroll",t,{passive:!0}),a&&_.addEventListener("resize",t)});const d=c&&l?QZ(c,t):null;let p=-1,v=null;o&&(v=new ResizeObserver(_=>{let[C]=_;C&&C.target===c&&v&&n&&(v.unobserve(n),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var x;(x=v)==null||x.observe(n)})),t()}),c&&!f&&v.observe(c),n&&v.observe(n));let b,w=f?vu(e):null;f&&k();function k(){const _=vu(e);w&&!Gz(w,_)&&t(),w=_,b=requestAnimationFrame(k)}return t(),()=>{var _;h.forEach(C=>{r&&C.removeEventListener("scroll",t),a&&C.removeEventListener("resize",t)}),d==null||d(),(_=v)==null||_.disconnect(),v=null,f&&cancelAnimationFrame(b)}}const JZ=PZ,eQ=NZ,nQ=EZ,tQ=zZ,iQ=TZ,zT=jZ,rQ=DZ,aQ=$Z,oQ=(e,n,t)=>{const i=new Map,r={platform:ZZ,...t},a={...r.platform,_c:i};return OZ(e,n,{...r,platform:a})};var sQ=typeof document<"u",lQ=function(){},cg=sQ?A.useLayoutEffect:lQ;function Mg(e,n){if(e===n)return!0;if(typeof e!=typeof n)return!1;if(typeof e=="function"&&e.toString()===n.toString())return!0;let t,i,r;if(e&&n&&typeof e=="object"){if(Array.isArray(e)){if(t=e.length,t!==n.length)return!1;for(i=t;i--!==0;)if(!Mg(e[i],n[i]))return!1;return!0}if(r=Object.keys(e),t=r.length,t!==Object.keys(n).length)return!1;for(i=t;i--!==0;)if(!{}.hasOwnProperty.call(n,r[i]))return!1;for(i=t;i--!==0;){const a=r[i];if(!(a==="_owner"&&e.$$typeof)&&!Mg(e[a],n[a]))return!1}return!0}return e!==e&&n!==n}function Yz(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function LT(e,n){const t=Yz(e);return Math.round(n*t)/t}function dk(e){const n=A.useRef(e);return cg(()=>{n.current=e}),n}function uQ(e){e===void 0&&(e={});const{placement:n="bottom",strategy:t="absolute",middleware:i=[],platform:r,elements:{reference:a,floating:o}={},transform:l=!0,whileElementsMounted:f,open:c}=e,[h,d]=A.useState({x:0,y:0,strategy:t,placement:n,middlewareData:{},isPositioned:!1}),[p,v]=A.useState(i);Mg(p,i)||v(i);const[b,w]=A.useState(null),[k,_]=A.useState(null),C=A.useCallback(q=>{q!==j.current&&(j.current=q,w(q))},[]),x=A.useCallback(q=>{q!==M.current&&(M.current=q,_(q))},[]),E=a||b,O=o||k,j=A.useRef(null),M=A.useRef(null),P=A.useRef(h),F=f!=null,R=dk(f),L=dk(r),B=dk(c),G=A.useCallback(()=>{if(!j.current||!M.current)return;const q={placement:n,strategy:t,middleware:p};L.current&&(q.platform=L.current),oQ(j.current,M.current,q).then(Y=>{const D={...Y,isPositioned:B.current!==!1};U.current&&!Mg(P.current,D)&&(P.current=D,Qs.flushSync(()=>{d(D)}))})},[p,n,t,L,B]);cg(()=>{c===!1&&P.current.isPositioned&&(P.current.isPositioned=!1,d(q=>({...q,isPositioned:!1})))},[c]);const U=A.useRef(!1);cg(()=>(U.current=!0,()=>{U.current=!1}),[]),cg(()=>{if(E&&(j.current=E),O&&(M.current=O),E&&O){if(R.current)return R.current(E,O,G);G()}},[E,O,G,R,F]);const H=A.useMemo(()=>({reference:j,floating:M,setReference:C,setFloating:x}),[C,x]),N=A.useMemo(()=>({reference:E,floating:O}),[E,O]),z=A.useMemo(()=>{const q={position:t,left:0,top:0};if(!N.floating)return q;const Y=LT(N.floating,h.x),D=LT(N.floating,h.y);return l?{...q,transform:"translate("+Y+"px, "+D+"px)",...Yz(N.floating)>=1.5&&{willChange:"transform"}}:{position:t,left:Y,top:D}},[t,l,N.floating,h.x,h.y]);return A.useMemo(()=>({...h,update:G,refs:H,elements:N,floatingStyles:z}),[h,G,H,N,z])}const fQ=e=>{function n(t){return{}.hasOwnProperty.call(t,"current")}return{name:"arrow",options:e,fn(t){const{element:i,padding:r}=typeof e=="function"?e(t):e;return i&&n(i)?i.current!=null?zT({element:i.current,padding:r}).fn(t):{}:i?zT({element:i,padding:r}).fn(t):{}}}},Kz=(e,n)=>{const t=JZ(e);return{name:t.name,fn:t.fn,options:[e,n]}},Y6=(e,n)=>{const t=eQ(e);return{name:t.name,fn:t.fn,options:[e,n]}},IT=(e,n)=>({fn:aQ(e).fn,options:[e,n]}),Dg=(e,n)=>{const t=nQ(e);return{name:t.name,fn:t.fn,options:[e,n]}},cQ=(e,n)=>{const t=tQ(e);return{name:t.name,fn:t.fn,options:[e,n]}},dQ=(e,n)=>{const t=iQ(e);return{name:t.name,fn:t.fn,options:[e,n]}},Eh=(e,n)=>{const t=rQ(e);return{name:t.name,fn:t.fn,options:[e,n]}},Xz=(e,n)=>{const t=fQ(e);return{name:t.name,fn:t.fn,options:[e,n]}};function Zz(e){const n=A.useRef(void 0),t=A.useCallback(i=>{const r=e.map(a=>{if(a!=null){if(typeof a=="function"){const o=a,l=o(i);return typeof l=="function"?l:()=>{o(null)}}return a.current=i,()=>{a.current=null}}});return()=>{r.forEach(a=>a==null?void 0:a())}},e);return A.useMemo(()=>e.every(i=>i==null)?null:i=>{n.current&&(n.current(),n.current=void 0),i!=null&&(n.current=t(i))},e)}const hQ="data-floating-ui-focusable",BT="active",FT="selected",mQ={...rz};let qT=!1,pQ=0;const HT=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+pQ++;function vQ(){const[e,n]=A.useState(()=>qT?HT():void 0);return so(()=>{e==null&&n(HT())},[]),A.useEffect(()=>{qT=!0},[]),e}const gQ=mQ.useId,Qz=gQ||vQ;function yQ(){const e=new Map;return{emit(n,t){var i;(i=e.get(n))==null||i.forEach(r=>r(t))},on(n,t){e.has(n)||e.set(n,new Set),e.get(n).add(t)},off(n,t){var i;(i=e.get(n))==null||i.delete(t)}}}const bQ=A.createContext(null),wQ=A.createContext(null),K6=()=>{var e;return((e=A.useContext(bQ))==null?void 0:e.id)||null},X6=()=>A.useContext(wQ);function Z6(e){return"data-floating-ui-"+e}function la(e){e.current!==-1&&(clearTimeout(e.current),e.current=-1)}const UT=Z6("safe-polygon");function dg(e,n,t){if(t&&!gS(t))return 0;if(typeof e=="number")return e;if(typeof e=="function"){const i=e();return typeof i=="number"?i:i==null?void 0:i[n]}return e==null?void 0:e[n]}function hk(e){return typeof e=="function"?e():e}function kQ(e,n){n===void 0&&(n={});const{open:t,onOpenChange:i,dataRef:r,events:a,elements:o}=e,{enabled:l=!0,delay:f=0,handleClose:c=null,mouseOnly:h=!1,restMs:d=0,move:p=!0}=n,v=X6(),b=K6(),w=Dv(c),k=Dv(f),_=Dv(t),C=Dv(d),x=A.useRef(),E=A.useRef(-1),O=A.useRef(),j=A.useRef(-1),M=A.useRef(!0),P=A.useRef(!1),F=A.useRef(()=>{}),R=A.useRef(!1),L=to(()=>{var z;const q=(z=r.current.openEvent)==null?void 0:z.type;return(q==null?void 0:q.includes("mouse"))&&q!=="mousedown"});A.useEffect(()=>{if(!l)return;function z(q){let{open:Y}=q;Y||(la(E),la(j),M.current=!0,R.current=!1)}return a.on("openchange",z),()=>{a.off("openchange",z)}},[l,a]),A.useEffect(()=>{if(!l||!w.current||!t)return;function z(Y){L()&&i(!1,Y,"hover")}const q=ou(o.floating).documentElement;return q.addEventListener("mouseleave",z),()=>{q.removeEventListener("mouseleave",z)}},[o.floating,t,i,l,w,L]);const B=A.useCallback(function(z,q,Y){q===void 0&&(q=!0),Y===void 0&&(Y="hover");const D=dg(k.current,"close",x.current);D&&!O.current?(la(E),E.current=window.setTimeout(()=>i(!1,z,Y),D)):q&&(la(E),i(!1,z,Y))},[k,i]),G=to(()=>{F.current(),O.current=void 0}),U=to(()=>{if(P.current){const z=ou(o.floating).body;z.style.pointerEvents="",z.removeAttribute(UT),P.current=!1}}),H=to(()=>r.current.openEvent?["click","mousedown"].includes(r.current.openEvent.type):!1);A.useEffect(()=>{if(!l)return;function z(W){if(la(E),M.current=!1,h&&!gS(x.current)||hk(C.current)>0&&!dg(k.current,"open"))return;const $=dg(k.current,"open",x.current);$?E.current=window.setTimeout(()=>{_.current||i(!0,W,"hover")},$):t||i(!0,W,"hover")}function q(W){if(H()){U();return}F.current();const $=ou(o.floating);if(la(j),R.current=!1,w.current&&r.current.floatingContext){t||la(E),O.current=w.current({...r.current.floatingContext,tree:v,x:W.clientX,y:W.clientY,onClose(){U(),G(),H()||B(W,!0,"safe-polygon")}});const ee=O.current;$.addEventListener("mousemove",ee),F.current=()=>{$.removeEventListener("mousemove",ee)};return}(x.current==="touch"?!Wh(o.floating,W.relatedTarget):!0)&&B(W)}function Y(W){H()||r.current.floatingContext&&(w.current==null||w.current({...r.current.floatingContext,tree:v,x:W.clientX,y:W.clientY,onClose(){U(),G(),H()||B(W)}})(W))}function D(){la(E)}function V(W){H()||B(W,!1)}if(Ut(o.domReference)){const W=o.domReference,$=o.floating;return t&&W.addEventListener("mouseleave",Y),p&&W.addEventListener("mousemove",z,{once:!0}),W.addEventListener("mouseenter",z),W.addEventListener("mouseleave",q),$&&($.addEventListener("mouseleave",Y),$.addEventListener("mouseenter",D),$.addEventListener("mouseleave",V)),()=>{t&&W.removeEventListener("mouseleave",Y),p&&W.removeEventListener("mousemove",z),W.removeEventListener("mouseenter",z),W.removeEventListener("mouseleave",q),$&&($.removeEventListener("mouseleave",Y),$.removeEventListener("mouseenter",D),$.removeEventListener("mouseleave",V))}}},[o,l,e,h,p,B,G,U,i,t,_,v,k,w,r,H,C]),so(()=>{var z;if(l&&t&&(z=w.current)!=null&&(z=z.__options)!=null&&z.blockPointerEvents&&L()){P.current=!0;const Y=o.floating;if(Ut(o.domReference)&&Y){var q;const D=ou(o.floating).body;D.setAttribute(UT,"");const V=o.domReference,W=v==null||(q=v.nodesRef.current.find($=>$.id===b))==null||(q=q.context)==null?void 0:q.elements.floating;return W&&(W.style.pointerEvents=""),D.style.pointerEvents="none",V.style.pointerEvents="auto",Y.style.pointerEvents="auto",()=>{D.style.pointerEvents="",V.style.pointerEvents="",Y.style.pointerEvents=""}}}},[l,t,b,o,v,w,L]),so(()=>{t||(x.current=void 0,R.current=!1,G(),U())},[t,G,U]),A.useEffect(()=>()=>{G(),la(E),la(j),U()},[l,o.domReference,G,U]);const N=A.useMemo(()=>{function z(q){x.current=q.pointerType}return{onPointerDown:z,onPointerEnter:z,onMouseMove(q){const{nativeEvent:Y}=q;function D(){!M.current&&!_.current&&i(!0,Y,"hover")}h&&!gS(x.current)||t||hk(C.current)===0||R.current&&q.movementX**2+q.movementY**2<2||(la(j),x.current==="touch"?D():(R.current=!0,j.current=window.setTimeout(D,hk(C.current))))}}},[h,i,t,_,C]);return A.useMemo(()=>l?{reference:N}:{},[l,N])}const bS=()=>{},Jz=A.createContext({delay:0,initialDelay:0,timeoutMs:0,currentId:null,setCurrentId:bS,setState:bS,isInstantPhase:!1}),_Q=()=>A.useContext(Jz);function xQ(e){const{children:n,delay:t,timeoutMs:i=0}=e,[r,a]=A.useReducer((f,c)=>({...f,...c}),{delay:t,timeoutMs:i,initialDelay:t,currentId:null,isInstantPhase:!1}),o=A.useRef(null),l=A.useCallback(f=>{a({currentId:f})},[]);return so(()=>{r.currentId?o.current===null?o.current=r.currentId:r.isInstantPhase||a({isInstantPhase:!0}):(r.isInstantPhase&&a({isInstantPhase:!1}),o.current=null)},[r.currentId,r.isInstantPhase]),y.jsx(Jz.Provider,{value:A.useMemo(()=>({...r,setState:a,setCurrentId:l}),[r,l]),children:n})}function SQ(e,n){n===void 0&&(n={});const{open:t,onOpenChange:i,floatingId:r}=e,{id:a,enabled:o=!0}=n,l=a??r,f=_Q(),{currentId:c,setCurrentId:h,initialDelay:d,setState:p,timeoutMs:v}=f;return so(()=>{o&&c&&(p({delay:{open:1,close:dg(d,"close")}}),c!==l&&i(!1))},[o,l,i,p,c,d]),so(()=>{function b(){i(!1),p({delay:d,currentId:null})}if(o&&c&&!t&&c===l){if(v){const w=window.setTimeout(b,v);return()=>{clearTimeout(w)}}b()}},[o,t,p,c,l,i,d,v]),so(()=>{o&&(h===bS||!t||h(l))},[o,t,h,l]),f}const CQ={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},AQ={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},VT=e=>{var n,t;return{escapeKey:typeof e=="boolean"?e:(n=e==null?void 0:e.escapeKey)!=null?n:!1,outsidePress:typeof e=="boolean"?e:(t=e==null?void 0:e.outsidePress)!=null?t:!0}};function OQ(e,n){n===void 0&&(n={});const{open:t,onOpenChange:i,elements:r,dataRef:a}=e,{enabled:o=!0,escapeKey:l=!0,outsidePress:f=!0,outsidePressEvent:c="pointerdown",referencePress:h=!1,referencePressEvent:d="pointerdown",ancestorScroll:p=!1,bubbles:v,capture:b}=n,w=X6(),k=to(typeof f=="function"?f:()=>!1),_=typeof f=="function"?k:f,C=A.useRef(!1),{escapeKey:x,outsidePress:E}=VT(v),{escapeKey:O,outsidePress:j}=VT(b),M=A.useRef(!1),P=to(U=>{var H;if(!t||!o||!l||U.key!=="Escape"||M.current)return;const N=(H=a.current.floatingContext)==null?void 0:H.nodeId,z=w?fg(w.nodesRef.current,N):[];if(!x&&(U.stopPropagation(),z.length>0)){let q=!0;if(z.forEach(Y=>{var D;if((D=Y.context)!=null&&D.open&&!Y.context.dataRef.current.__escapeKeyBubbles){q=!1;return}}),!q)return}i(!1,bZ(U)?U.nativeEvent:U,"escape-key")}),F=to(U=>{var H;const N=()=>{var z;P(U),(z=Pf(U))==null||z.removeEventListener("keydown",N)};(H=Pf(U))==null||H.addEventListener("keydown",N)}),R=to(U=>{var H;const N=a.current.insideReactTree;a.current.insideReactTree=!1;const z=C.current;if(C.current=!1,c==="click"&&z||N||typeof _=="function"&&!_(U))return;const q=Pf(U),Y="["+Z6("inert")+"]",D=ou(r.floating).querySelectorAll(Y);let V=Ut(q)?q:null;for(;V&&!Ko(V);){const ee=ts(V);if(Ko(ee)||!Ut(ee))break;V=ee}if(D.length&&Ut(q)&&!pZ(q)&&!Wh(q,r.floating)&&Array.from(D).every(ee=>!Wh(V,ee)))return;if(ka(q)&&G){const ee=Ko(q),re=ga(q),se=/auto|scroll/,ye=ee||se.test(re.overflowX),ae=ee||se.test(re.overflowY),le=ye&&q.clientWidth>0&&q.scrollWidth>q.clientWidth,_e=ae&&q.clientHeight>0&&q.scrollHeight>q.clientHeight,ne=re.direction==="rtl",ze=_e&&(ne?U.offsetX<=q.offsetWidth-q.clientWidth:U.offsetX>q.clientWidth),we=le&&U.offsetY>q.clientHeight;if(ze||we)return}const W=(H=a.current.floatingContext)==null?void 0:H.nodeId,$=w&&fg(w.nodesRef.current,W).some(ee=>{var re;return fk(U,(re=ee.context)==null?void 0:re.elements.floating)});if(fk(U,r.floating)||fk(U,r.domReference)||$)return;const X=w?fg(w.nodesRef.current,W):[];if(X.length>0){let ee=!0;if(X.forEach(re=>{var se;if((se=re.context)!=null&&se.open&&!re.context.dataRef.current.__outsidePressBubbles){ee=!1;return}}),!ee)return}i(!1,U,"outside-press")}),L=to(U=>{var H;const N=()=>{var z;R(U),(z=Pf(U))==null||z.removeEventListener(c,N)};(H=Pf(U))==null||H.addEventListener(c,N)});A.useEffect(()=>{if(!t||!o)return;a.current.__escapeKeyBubbles=x,a.current.__outsidePressBubbles=E;let U=-1;function H(D){i(!1,D,"ancestor-scroll")}function N(){window.clearTimeout(U),M.current=!0}function z(){U=window.setTimeout(()=>{M.current=!1},cy()?5:0)}const q=ou(r.floating);l&&(q.addEventListener("keydown",O?F:P,O),q.addEventListener("compositionstart",N),q.addEventListener("compositionend",z)),_&&q.addEventListener(c,j?L:R,j);let Y=[];return p&&(Ut(r.domReference)&&(Y=Xo(r.domReference)),Ut(r.floating)&&(Y=Y.concat(Xo(r.floating))),!Ut(r.reference)&&r.reference&&r.reference.contextElement&&(Y=Y.concat(Xo(r.reference.contextElement)))),Y=Y.filter(D=>{var V;return D!==((V=q.defaultView)==null?void 0:V.visualViewport)}),Y.forEach(D=>{D.addEventListener("scroll",H,{passive:!0})}),()=>{l&&(q.removeEventListener("keydown",O?F:P,O),q.removeEventListener("compositionstart",N),q.removeEventListener("compositionend",z)),_&&q.removeEventListener(c,j?L:R,j),Y.forEach(D=>{D.removeEventListener("scroll",H)}),window.clearTimeout(U)}},[a,r,l,_,c,t,i,p,o,x,E,P,O,F,R,j,L]),A.useEffect(()=>{a.current.insideReactTree=!1},[a,_,c]);const B=A.useMemo(()=>({onKeyDown:P,...h&&{[CQ[d]]:U=>{i(!1,U.nativeEvent,"reference-press")},...d!=="click"&&{onClick(U){i(!1,U.nativeEvent,"reference-press")}}}}),[P,i,h,d]),G=A.useMemo(()=>{function U(H){H.button===0&&(C.current=!0)}return{onKeyDown:P,onMouseDown:U,onMouseUp:U,[AQ[c]]:()=>{a.current.insideReactTree=!0}}},[P,c,a]);return A.useMemo(()=>o?{reference:B,floating:G}:{},[o,B,G])}function jQ(e){const{open:n=!1,onOpenChange:t,elements:i}=e,r=Qz(),a=A.useRef({}),[o]=A.useState(()=>yQ()),l=K6()!=null,[f,c]=A.useState(i.reference),h=to((v,b,w)=>{a.current.openEvent=v?b:void 0,o.emit("openchange",{open:v,event:b,reason:w,nested:l}),t==null||t(v,b,w)}),d=A.useMemo(()=>({setPositionReference:c}),[]),p=A.useMemo(()=>({reference:f||i.reference||null,floating:i.floating||null,domReference:i.reference}),[f,i.reference,i.floating]);return A.useMemo(()=>({dataRef:a,open:n,onOpenChange:h,elements:p,events:o,floatingId:r,refs:d}),[n,h,p,o,r,d])}function Q6(e){e===void 0&&(e={});const{nodeId:n}=e,t=jQ({...e,elements:{reference:null,floating:null,...e.elements}}),i=e.rootContext||t,r=i.elements,[a,o]=A.useState(null),[l,f]=A.useState(null),h=(r==null?void 0:r.domReference)||a,d=A.useRef(null),p=X6();so(()=>{h&&(d.current=h)},[h]);const v=uQ({...e,elements:{...r,...l&&{reference:l}}}),b=A.useCallback(x=>{const E=Ut(x)?{getBoundingClientRect:()=>x.getBoundingClientRect(),getClientRects:()=>x.getClientRects(),contextElement:x}:x;f(E),v.refs.setReference(E)},[v.refs]),w=A.useCallback(x=>{(Ut(x)||x===null)&&(d.current=x,o(x)),(Ut(v.refs.reference.current)||v.refs.reference.current===null||x!==null&&!Ut(x))&&v.refs.setReference(x)},[v.refs]),k=A.useMemo(()=>({...v.refs,setReference:w,setPositionReference:b,domReference:d}),[v.refs,w,b]),_=A.useMemo(()=>({...v.elements,domReference:h}),[v.elements,h]),C=A.useMemo(()=>({...v,...i,refs:k,elements:_,nodeId:n}),[v,k,_,n,i]);return so(()=>{i.dataRef.current.floatingContext=C;const x=p==null?void 0:p.nodesRef.current.find(E=>E.id===n);x&&(x.context=C)}),A.useMemo(()=>({...v,context:C,refs:k,elements:_}),[v,k,_,C])}function mk(){return dZ()&&cZ()}function EQ(e,n){n===void 0&&(n={});const{open:t,onOpenChange:i,events:r,dataRef:a,elements:o}=e,{enabled:l=!0,visibleOnly:f=!0}=n,c=A.useRef(!1),h=A.useRef(-1),d=A.useRef(!0);A.useEffect(()=>{if(!l)return;const v=xr(o.domReference);function b(){!t&&ka(o.domReference)&&o.domReference===TT(ou(o.domReference))&&(c.current=!0)}function w(){d.current=!0}function k(){d.current=!1}return v.addEventListener("blur",b),mk()&&(v.addEventListener("keydown",w,!0),v.addEventListener("pointerdown",k,!0)),()=>{v.removeEventListener("blur",b),mk()&&(v.removeEventListener("keydown",w,!0),v.removeEventListener("pointerdown",k,!0))}},[o.domReference,t,l]),A.useEffect(()=>{if(!l)return;function v(b){let{reason:w}=b;(w==="reference-press"||w==="escape-key")&&(c.current=!0)}return r.on("openchange",v),()=>{r.off("openchange",v)}},[r,l]),A.useEffect(()=>()=>{la(h)},[]);const p=A.useMemo(()=>({onMouseLeave(){c.current=!1},onFocus(v){if(c.current)return;const b=Pf(v.nativeEvent);if(f&&Ut(b)){if(mk()&&!v.relatedTarget){if(!d.current&&!vZ(b))return}else if(!gZ(b))return}i(!0,v.nativeEvent,"focus")},onBlur(v){c.current=!1;const b=v.relatedTarget,w=v.nativeEvent,k=Ut(b)&&b.hasAttribute(Z6("focus-guard"))&&b.getAttribute("data-type")==="outside";h.current=window.setTimeout(()=>{var _;const C=TT(o.domReference?o.domReference.ownerDocument:document);!b&&C===o.domReference||Wh((_=a.current.floatingContext)==null?void 0:_.refs.floating.current,C)||Wh(o.domReference,C)||k||i(!1,w,"focus")})}}),[a,o.domReference,i,f]);return A.useMemo(()=>l?{reference:p}:{},[l,p])}function pk(e,n,t){const i=new Map,r=t==="item";let a=e;if(r&&e){const{[BT]:o,[FT]:l,...f}=e;a=f}return{...t==="floating"&&{tabIndex:-1,[hQ]:""},...a,...n.map(o=>{const l=o?o[t]:null;return typeof l=="function"?e?l(e):null:l}).concat(e).reduce((o,l)=>(l&&Object.entries(l).forEach(f=>{let[c,h]=f;if(!(r&&[BT,FT].includes(c)))if(c.indexOf("on")===0){if(i.has(c)||i.set(c,[]),typeof h=="function"){var d;(d=i.get(c))==null||d.push(h),o[c]=function(){for(var p,v=arguments.length,b=new Array(v),w=0;wk(...b)).find(k=>k!==void 0)}}}else o[c]=h}),o),{})}}function TQ(e){e===void 0&&(e=[]);const n=e.map(l=>l==null?void 0:l.reference),t=e.map(l=>l==null?void 0:l.floating),i=e.map(l=>l==null?void 0:l.item),r=A.useCallback(l=>pk(l,e,"reference"),n),a=A.useCallback(l=>pk(l,e,"floating"),t),o=A.useCallback(l=>pk(l,e,"item"),i);return A.useMemo(()=>({getReferenceProps:r,getFloatingProps:a,getItemProps:o}),[r,a,o])}const MQ=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function DQ(e,n){var t,i;n===void 0&&(n={});const{open:r,elements:a,floatingId:o}=e,{enabled:l=!0,role:f="dialog"}=n,c=Qz(),h=((t=a.domReference)==null?void 0:t.id)||c,d=A.useMemo(()=>{var C;return((C=yZ(a.floating))==null?void 0:C.id)||o},[a.floating,o]),p=(i=MQ.get(f))!=null?i:f,b=K6()!=null,w=A.useMemo(()=>p==="tooltip"||f==="label"?{["aria-"+(f==="label"?"labelledby":"describedby")]:r?d:void 0}:{"aria-expanded":r?"true":"false","aria-haspopup":p==="alertdialog"?"dialog":p,"aria-controls":r?d:void 0,...p==="listbox"&&{role:"combobox"},...p==="menu"&&{id:h},...p==="menu"&&b&&{role:"menuitem"},...f==="select"&&{"aria-autocomplete":"none"},...f==="combobox"&&{"aria-autocomplete":"list"}},[p,d,b,r,h,f]),k=A.useMemo(()=>{const C={id:d,...p&&{role:p}};return p==="tooltip"||f==="label"?C:{...C,...p==="menu"&&{"aria-labelledby":h}}},[p,d,h,f]),_=A.useCallback(C=>{let{active:x,selected:E}=C;const O={role:"option",...x&&{id:d+"-fui-option"}};switch(f){case"select":case"combobox":return{...O,"aria-selected":E}}return{}},[d,f]);return A.useMemo(()=>l?{reference:w,floating:k,item:_}:{},[l,w,k,_])}const eL={scrollHideDelay:1e3,type:"hover",scrollbars:"xy"},nL=(e,{scrollbarSize:n,overscrollBehavior:t,scrollbars:i})=>{let r=t;return t&&i&&(i==="x"?r=`${t} auto`:i==="y"&&(r=`auto ${t}`)),{root:{"--scrollarea-scrollbar-size":me(n),"--scrollarea-over-scroll-behavior":r}}},_a=Re(e=>{const n=be("ScrollArea",eL,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,scrollbarSize:l,vars:f,type:c,scrollHideDelay:h,viewportProps:d,viewportRef:p,onScrollPositionChange:v,children:b,offsetScrollbars:w,scrollbars:k,onBottomReached:_,onTopReached:C,onLeftReached:x,onRightReached:E,overscrollBehavior:O,startScrollPosition:j,attributes:M,...P}=n,[F,R]=A.useState(!1),[L,B]=A.useState(!1),[G,U]=A.useState(!1),H=A.useRef(!0),N=A.useRef(!1),z=A.useRef(!0),q=A.useRef(!1),Y=Ze({name:"ScrollArea",props:n,classes:F6,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:M,vars:f,varsResolver:nL}),D=A.useRef(null),[V,W]=A.useState(null),$=Zz([p,D,A.useCallback(X=>{W(ee=>ee===X?ee:X)},[])]);return ll(w==="present"?V:null,()=>{const X=D.current;X&&(B(X.scrollHeight>X.clientHeight),U(X.scrollWidth>X.clientWidth))}),us(()=>{j&&D.current&&D.current.scrollTo({left:j.x??0,top:j.y??0})},[]),y.jsxs(Oz,{getStyles:Y,type:c==="never"?"always":c,scrollHideDelay:h,scrollbars:k,...Y("root"),...P,children:[y.jsx(zz,{...d,...Y("viewport",{style:d==null?void 0:d.style}),ref:$,"data-offset-scrollbars":w===!0?"xy":w||void 0,"data-scrollbars":k||void 0,"data-horizontal-hidden":w==="present"&&!G?"true":void 0,"data-vertical-hidden":w==="present"&&!L?"true":void 0,onScroll:X=>{var Ce;(Ce=d==null?void 0:d.onScroll)==null||Ce.call(d,X),v==null||v({x:X.currentTarget.scrollLeft,y:X.currentTarget.scrollTop});const{scrollTop:ee,scrollHeight:re,clientHeight:se,scrollLeft:ye,scrollWidth:ae,clientWidth:le}=X.currentTarget,_e=ee-(re-se)>=-.8,ne=ee===0;_e&&!N.current&&(_==null||_()),ne&&!H.current&&(C==null||C()),N.current=_e,H.current=ne;const ze=ye-(ae-le)>=-.8,we=ye===0;ze&&!q.current&&(E==null||E()),we&&!z.current&&(x==null||x()),q.current=ze,z.current=we},children:b}),(k==="xy"||k==="x")&&y.jsx(cS,{...Y("scrollbar"),orientation:"horizontal","data-hidden":c==="never"||w==="present"&&!G?!0:void 0,forceMount:!0,onMouseEnter:()=>R(!0),onMouseLeave:()=>R(!1),children:y.jsx(dS,{...Y("thumb")})}),(k==="xy"||k==="y")&&y.jsx(cS,{...Y("scrollbar"),orientation:"vertical","data-hidden":c==="never"||w==="present"&&!L?!0:void 0,forceMount:!0,onMouseEnter:()=>R(!0),onMouseLeave:()=>R(!1),children:y.jsx(dS,{...Y("thumb")})}),y.jsx(HX,{...Y("corner"),"data-hovered":F||void 0,"data-hidden":c==="never"||void 0})]})});_a.displayName="@mantine/core/ScrollArea";const J6=Re(e=>{const{children:n,classNames:t,styles:i,scrollbarSize:r,scrollHideDelay:a,type:o,dir:l,offsetScrollbars:f,overscrollBehavior:c,viewportRef:h,onScrollPositionChange:d,unstyled:p,variant:v,viewportProps:b,scrollbars:w,style:k,vars:_,onBottomReached:C,onTopReached:x,startScrollPosition:E,onOverflowChange:O,...j}=be("ScrollAreaAutosize",eL,e),M=A.useRef(null),[P,F]=A.useState(null),R=Zz([h,M,A.useCallback(U=>{F(H=>H===U?H:U)},[])]),L=A.useRef(!1),B=A.useRef(!1),G=A.useEffectEvent(()=>{const U=M.current;if(!U||!O)return;const H=U.scrollHeight>U.clientHeight;H!==L.current&&(B.current?O(H):(B.current=!0,H&&O(!0)),L.current=H)});return ll(O?P:null,G),y.jsx(ge,{...j,variant:v,style:[{display:"flex",overflow:"hidden"},k],children:y.jsx(ge,{style:{display:"flex",flexDirection:"column",flex:1,overflow:"hidden",...w==="y"&&{minWidth:0},...w==="x"&&{minHeight:0},...w==="xy"&&{minWidth:0,minHeight:0},...w===!1&&{minWidth:0,minHeight:0}},children:y.jsx(_a,{classNames:t,styles:i,scrollHideDelay:a,scrollbarSize:r,type:o,dir:l,offsetScrollbars:f,overscrollBehavior:c,viewportRef:R,onScrollPositionChange:d,unstyled:p,variant:v,viewportProps:b,vars:_,scrollbars:w,onBottomReached:C,onTopReached:x,startScrollPosition:E,"data-autosize":"true",children:n})})})});_a.classes=F6;_a.varsResolver=nL;J6.displayName="@mantine/core/ScrollAreaAutosize";J6.classes=F6;_a.Autosize=J6;var tL={root:"m_87cf2631"};const RQ={__staticSelector:"UnstyledButton"},Tt=xi(e=>{const n=be("UnstyledButton",RQ,e),{className:t,component:i="button",__staticSelector:r,unstyled:a,classNames:o,styles:l,style:f,attributes:c,...h}=n;return y.jsx(ge,{...Ze({name:r,props:n,classes:tL,className:t,style:f,classNames:o,styles:l,unstyled:a,attributes:c})("root",{focusable:!0}),component:i,type:i==="button"?"button":void 0,...h})});Tt.classes=tL;Tt.displayName="@mantine/core/UnstyledButton";var iL={root:"m_515a97f8"};const eC=Re(e=>{const n=be("VisuallyHidden",null,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,attributes:f,...c}=n;return y.jsx(ge,{component:"span",...Ze({name:"VisuallyHidden",classes:iL,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:f})("root"),...c})});eC.classes=iL;eC.displayName="@mantine/core/VisuallyHidden";var rL={root:"m_1b7284a3"};const aL=(e,{radius:n,shadow:t})=>({root:{"--paper-radius":n===void 0?void 0:Kt(n),"--paper-shadow":M6(t)}}),Lt=xi(e=>{const n=be("Paper",null,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,withBorder:l,vars:f,radius:c,shadow:h,variant:d,mod:p,attributes:v,...b}=n,w=Ze({name:"Paper",props:n,classes:rL,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:v,vars:f,varsResolver:aL});return y.jsx(ge,{mod:[{"data-with-border":l},p],...w("root"),variant:d,...b})});Lt.classes=rL;Lt.varsResolver=aL;Lt.displayName="@mantine/core/Paper";function WT(e,n,t,i){return e==="center"||i==="center"?{top:n}:e==="end"?{bottom:t}:e==="start"?{top:t}:{}}function GT(e,n,t,i,r){return e==="center"||i==="center"?{left:n}:e==="end"?{[r==="ltr"?"right":"left"]:t}:e==="start"?{[r==="ltr"?"left":"right"]:t}:{}}const PQ={bottom:"borderTopLeftRadius",left:"borderTopRightRadius",right:"borderBottomLeftRadius",top:"borderBottomRightRadius"};function NQ({position:e,arrowSize:n,arrowOffset:t,arrowRadius:i,arrowPosition:r,arrowX:a,arrowY:o,dir:l}){const[f,c="center"]=e.split("-"),h={width:n,height:n,transform:"rotate(45deg)",position:"absolute",[PQ[f]]:i},d=-n/2;return f==="left"?{...h,...WT(c,o,t,r),right:d,borderLeftColor:"transparent",borderBottomColor:"transparent",clipPath:"polygon(100% 0, 0 0, 100% 100%)"}:f==="right"?{...h,...WT(c,o,t,r),left:d,borderRightColor:"transparent",borderTopColor:"transparent",clipPath:"polygon(0 100%, 0 0, 100% 100%)"}:f==="top"?{...h,...GT(c,a,t,r,l),bottom:d,borderTopColor:"transparent",borderLeftColor:"transparent",clipPath:"polygon(0 100%, 100% 100%, 100% 0)"}:f==="bottom"?{...h,...GT(c,a,t,r,l),top:d,borderBottomColor:"transparent",borderRightColor:"transparent",clipPath:"polygon(0 100%, 0 0, 100% 0)"}:{}}function Rg({position:e,arrowSize:n,arrowOffset:t,arrowRadius:i,arrowPosition:r,visible:a,arrowX:o,arrowY:l,style:f,...c}){const{dir:h}=Mu();return a?y.jsx("div",{...c,style:{...f,...NQ({position:e,arrowSize:n,arrowOffset:t,arrowRadius:i,arrowPosition:r,dir:h,arrowX:o,arrowY:l})}}):null}Rg.displayName="@mantine/core/FloatingArrow";function oL(e,n){if(e==="rtl"&&(n.includes("right")||n.includes("left"))){const[t,i]=n.split("-"),r=t==="right"?"left":"right";return i===void 0?r:`${r}-${i}`}return n}function sL({open:e,close:n,openDelay:t,closeDelay:i}){const r=A.useRef(-1),a=A.useRef(-1),o=()=>{window.clearTimeout(r.current),window.clearTimeout(a.current)},l=()=>{o(),t===0||t===void 0?e():r.current=window.setTimeout(e,t)},f=()=>{o(),i===0||i===void 0?n():a.current=window.setTimeout(n,i)};return A.useEffect(()=>o,[]),{openDropdown:l,closeDropdown:f}}var lL={root:"m_9814e45f"};const $Q={zIndex:ba("modal")},uL=(e,{gradient:n,color:t,backgroundOpacity:i,blur:r,radius:a,zIndex:o})=>({root:{"--overlay-bg":n||(t!==void 0||i!==void 0)&&Ws(t||"#000",i??.6)||void 0,"--overlay-filter":r?`blur(${me(r)})`:void 0,"--overlay-radius":a===void 0?void 0:Kt(a),"--overlay-z-index":o==null?void 0:o.toString()}}),Fm=xi(e=>{const n=be("Overlay",$Q,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,fixed:f,center:c,children:h,radius:d,zIndex:p,gradient:v,blur:b,color:w,backgroundOpacity:k,mod:_,attributes:C,...x}=n;return y.jsx(ge,{...Ze({name:"Overlay",props:n,classes:lL,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:C,vars:l,varsResolver:uL})("root"),mod:[{center:c,fixed:f},_],...x,children:h})});Fm.classes=lL;Fm.varsResolver=uL;Fm.displayName="@mantine/core/Overlay";function vk(e){const n=document.createElement("div");return n.setAttribute("data-portal","true"),typeof e.className=="string"&&n.classList.add(...e.className.split(" ").filter(Boolean)),typeof e.style=="object"&&Object.assign(n.style,e.style),typeof e.id=="string"&&n.setAttribute("id",e.id),n}function zQ({target:e,reuseTargetNode:n,...t}){if(e)return typeof e=="string"?document.querySelector(e)||vk(t):e;if(n){const i=document.querySelector("[data-mantine-shared-portal-node]");if(i)return i;const r=vk(t);return r.setAttribute("data-mantine-shared-portal-node","true"),document.body.appendChild(r),r}return vk(t)}const LQ={reuseTargetNode:!0},fL=Re(e=>{const{children:n,target:t,reuseTargetNode:i,ref:r,...a}=be("Portal",LQ,e),[o,l]=A.useState(!1),f=A.useRef(null);return us(()=>(l(!0),f.current=zQ({target:t,reuseTargetNode:i,...a}),Ag(r,f.current),!t&&!i&&f.current&&document.body.appendChild(f.current),()=>{!t&&!i&&f.current&&document.body.removeChild(f.current)}),[t]),!o||!f.current?null:Qs.createPortal(y.jsx(y.Fragment,{children:n}),f.current)});fL.displayName="@mantine/core/Portal";const ul=Re(({withinPortal:e=!0,children:n,...t})=>Im()==="test"||!e?y.jsx(y.Fragment,{children:n}):y.jsx(fL,{...t,children:n}));ul.displayName="@mantine/core/OptionalPortal";const Jd=e=>({in:{opacity:1,transform:"scale(1)"},out:{opacity:0,transform:`scale(.9) translateY(${e==="bottom"?10:-10}px)`},transitionProperty:"transform, opacity"}),Rv={fade:{in:{opacity:1},out:{opacity:0},transitionProperty:"opacity"},"fade-up":{in:{opacity:1,transform:"translateY(0)"},out:{opacity:0,transform:"translateY(30px)"},transitionProperty:"opacity, transform"},"fade-down":{in:{opacity:1,transform:"translateY(0)"},out:{opacity:0,transform:"translateY(-30px)"},transitionProperty:"opacity, transform"},"fade-left":{in:{opacity:1,transform:"translateX(0)"},out:{opacity:0,transform:"translateX(30px)"},transitionProperty:"opacity, transform"},"fade-right":{in:{opacity:1,transform:"translateX(0)"},out:{opacity:0,transform:"translateX(-30px)"},transitionProperty:"opacity, transform"},scale:{in:{opacity:1,transform:"scale(1)"},out:{opacity:0,transform:"scale(0)"},common:{transformOrigin:"top"},transitionProperty:"transform, opacity"},"scale-y":{in:{opacity:1,transform:"scaleY(1)"},out:{opacity:0,transform:"scaleY(0)"},common:{transformOrigin:"top"},transitionProperty:"transform, opacity"},"scale-x":{in:{opacity:1,transform:"scaleX(1)"},out:{opacity:0,transform:"scaleX(0)"},common:{transformOrigin:"left"},transitionProperty:"transform, opacity"},"skew-up":{in:{opacity:1,transform:"translateY(0) skew(0deg, 0deg)"},out:{opacity:0,transform:"translateY(-20px) skew(-10deg, -5deg)"},common:{transformOrigin:"top"},transitionProperty:"transform, opacity"},"skew-down":{in:{opacity:1,transform:"translateY(0) skew(0deg, 0deg)"},out:{opacity:0,transform:"translateY(20px) skew(-10deg, -5deg)"},common:{transformOrigin:"bottom"},transitionProperty:"transform, opacity"},"rotate-left":{in:{opacity:1,transform:"translateY(0) rotate(0deg)"},out:{opacity:0,transform:"translateY(20px) rotate(-5deg)"},common:{transformOrigin:"bottom"},transitionProperty:"transform, opacity"},"rotate-right":{in:{opacity:1,transform:"translateY(0) rotate(0deg)"},out:{opacity:0,transform:"translateY(20px) rotate(5deg)"},common:{transformOrigin:"top"},transitionProperty:"transform, opacity"},"slide-down":{in:{opacity:1,transform:"translateY(0)"},out:{opacity:0,transform:"translateY(-100%)"},common:{transformOrigin:"top"},transitionProperty:"transform, opacity"},"slide-up":{in:{opacity:1,transform:"translateY(0)"},out:{opacity:0,transform:"translateY(100%)"},common:{transformOrigin:"bottom"},transitionProperty:"transform, opacity"},"slide-left":{in:{opacity:1,transform:"translateX(0)"},out:{opacity:0,transform:"translateX(100%)"},common:{transformOrigin:"left"},transitionProperty:"transform, opacity"},"slide-right":{in:{opacity:1,transform:"translateX(0)"},out:{opacity:0,transform:"translateX(-100%)"},common:{transformOrigin:"right"},transitionProperty:"transform, opacity"},pop:{...Jd("bottom"),common:{transformOrigin:"center center"}},"pop-bottom-left":{...Jd("bottom"),common:{transformOrigin:"bottom left"}},"pop-bottom-right":{...Jd("bottom"),common:{transformOrigin:"bottom right"}},"pop-top-left":{...Jd("top"),common:{transformOrigin:"top left"}},"pop-top-right":{...Jd("top"),common:{transformOrigin:"top right"}}},YT={entering:"in",entered:"in",exiting:"out",exited:"out","pre-exiting":"out","pre-entering":"out"};function KT({transition:e,state:n,duration:t,timingFunction:i}){const r={WebkitBackfaceVisibility:"hidden",transitionDuration:`${t}ms`,transitionTimingFunction:i};return typeof e=="string"?e in Rv?{transitionProperty:Rv[e].transitionProperty,...r,...Rv[e].common,...Rv[e][YT[n]]}:{}:{transitionProperty:e.transitionProperty,...r,...e.common,...e[YT[n]]}}function IQ({duration:e,exitDuration:n,timingFunction:t,mounted:i,onEnter:r,onExit:a,onEntered:o,onExited:l,enterDelay:f,exitDelay:c}){const h=li(),d=R6(),p=h.respectReducedMotion?d:!1,[v,b]=A.useState(p?0:e),[w,k]=A.useState(i?"entered":"exited"),_=A.useRef(-1),C=A.useRef(-1),x=A.useRef(-1);function E(){window.clearTimeout(_.current),window.clearTimeout(C.current),cancelAnimationFrame(x.current)}const O=M=>{E();const P=M?r:a,F=M?o:l,R=p?0:M?e:n;b(R),R===0?(typeof P=="function"&&P(),typeof F=="function"&&F(),k(M?"entered":"exited")):x.current=requestAnimationFrame(()=>{yh.flushSync(()=>{k(M?"pre-entering":"pre-exiting")}),x.current=requestAnimationFrame(()=>{typeof P=="function"&&P(),k(M?"entering":"exiting"),_.current=window.setTimeout(()=>{typeof F=="function"&&F(),k(M?"entered":"exited")},R)})})},j=M=>{if(E(),typeof(M?f:c)!="number"){O(M);return}C.current=window.setTimeout(()=>{O(M)},M?f:c)};return ns(()=>{j(i)},[i]),A.useEffect(()=>()=>{E()},[]),{transitionDuration:v,transitionStatus:w,transitionTimingFunction:t||"ease"}}function is({keepMounted:e,transition:n="fade",duration:t=250,exitDuration:i=t,mounted:r,children:a,timingFunction:o="ease",onExit:l,onEntered:f,onEnter:c,onExited:h,enterDelay:d,exitDelay:p}){const v=Im(),{transitionDuration:b,transitionStatus:w,transitionTimingFunction:k}=IQ({mounted:r,exitDuration:i,duration:t,timingFunction:o,onExit:l,onEntered:f,onEnter:c,onExited:h,enterDelay:d,exitDelay:p});if(v==="test")return r?y.jsx(y.Fragment,{children:a({})}):e?a({display:"none"}):null;if(b===0)return e?y.jsx(A.Activity,{mode:r?"visible":"hidden",children:a({})}):r?y.jsx(y.Fragment,{children:a({})}):null;const _=w==="exited";return e?y.jsx(A.Activity,{mode:_?"hidden":"visible",children:a(_?{}:KT({transition:n,duration:b,state:w,timingFunction:k}))}):_?null:y.jsx(y.Fragment,{children:a(KT({transition:n,duration:b,state:w,timingFunction:k}))})}is.displayName="@mantine/core/Transition";const BQ={duration:100,transition:"fade"};function XT(e,n){return{...BQ,...n,...e}}const[FQ,cL]=Wr("Popover component was not found in the tree");function my({children:e,active:n=!0,refProp:t="ref",innerRef:i}){const r=Wt(bK(n),i),a=Eu(e);return a?A.cloneElement(a,{[t]:r}):e}function dL(e){return y.jsx(eC,{tabIndex:-1,"data-autofocus":!0,...e})}my.displayName="@mantine/core/FocusTrap";dL.displayName="@mantine/core/FocusTrapInitialFocus";my.InitialFocus=dL;var hL={dropdown:"m_38a85659",arrow:"m_a31dc6c1",overlay:"m_3d7bc908"};const nC=Re(e=>{var k,_,C,x;const n=be("PopoverDropdown",null,e),{className:t,style:i,vars:r,children:a,onKeyDownCapture:o,variant:l,classNames:f,styles:c,ref:h,...d}=n,p=cL(),v=az({opened:p.opened,shouldReturnFocus:p.returnFocus}),b=p.withRoles?{"aria-labelledby":p.getTargetId(),id:p.getDropdownId(),role:"dialog",tabIndex:-1}:{},w=Wt(h,p.floating);return p.disabled?null:y.jsx(ul,{...p.portalProps,withinPortal:p.withinPortal,children:y.jsx(is,{mounted:p.opened,...p.transitionProps,transition:((k=p.transitionProps)==null?void 0:k.transition)||"fade",duration:((_=p.transitionProps)==null?void 0:_.duration)??150,keepMounted:p.keepMounted,exitDuration:typeof((C=p.transitionProps)==null?void 0:C.exitDuration)=="number"?p.transitionProps.exitDuration:(x=p.transitionProps)==null?void 0:x.duration,children:E=>{var O;return y.jsx(my,{active:p.trapFocus&&p.opened,innerRef:w,children:y.jsxs(ge,{...b,...d,variant:l,onKeyDownCapture:sK(()=>{var j,M;(j=p.onClose)==null||j.call(p),(M=p.onDismiss)==null||M.call(p)},{active:p.closeOnEscape,onTrigger:v,onKeyDown:o}),"data-position":p.placement,"data-fixed":p.floatingStrategy==="fixed"||void 0,...p.getStyles("dropdown",{className:t,props:n,classNames:f,styles:c,style:[{...E,zIndex:p.zIndex,top:p.y??0,left:p.x??0,width:p.width==="target"?void 0:me(p.width),...p.referenceHidden?{display:"none"}:null},(O=p.resolvedStyles)==null?void 0:O.dropdown,c==null?void 0:c.dropdown,i]}),children:[a,y.jsx(Rg,{ref:p.arrowRef,arrowX:p.arrowX,arrowY:p.arrowY,visible:p.withArrow,position:p.placement,arrowSize:p.arrowSize,arrowRadius:p.arrowRadius,arrowOffset:p.arrowOffset,arrowPosition:p.arrowPosition,...p.getStyles("arrow",{props:n,classNames:f,styles:c})})]})})}})})});nC.classes=hL;nC.displayName="@mantine/core/PopoverDropdown";const qQ={refProp:"ref",popupType:"dialog"},mL=Re(e=>{const{children:n,refProp:t,popupType:i,ref:r,...a}=be("PopoverTarget",qQ,e),o=Eu(n);if(!o)throw new Error("Popover.Target component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported");const l=a,f=cL(),c=Wt(f.reference,iy(o),r),h=f.withRoles?{"aria-haspopup":i,"aria-expanded":f.opened,"aria-controls":f.opened?f.getDropdownId():void 0,id:f.getTargetId()}:{},d=o.props;return A.cloneElement(o,{...l,...h,...f.targetProps,className:dn(f.targetProps.className,l.className,d.className),[t]:c,...f.controlled?null:{onClick:p=>{var v;f.onToggle(),(v=d.onClick)==null||v.call(d,p)}}})});mL.displayName="@mantine/core/PopoverTarget";function HQ(e){if(e===void 0)return{shift:!0,flip:!0};const n={...e};return e.shift===void 0&&(n.shift=!0),e.flip===void 0&&(n.flip=!0),n}function UQ(e,n,t){const i=HQ(e.middlewares),r=[Kz(e.offset),dQ()];return e.dropdownVisible&&t!=="test"&&e.preventPositionChangeWhenVisible&&(i.flip=!1),i.flip&&r.push(typeof i.flip=="boolean"?Dg():Dg(i.flip)),i.shift&&r.push(Y6(typeof i.shift=="boolean"?{limiter:IT(),padding:5}:{limiter:IT(),padding:5,...i.shift})),i.inline&&r.push(typeof i.inline=="boolean"?Eh():Eh(i.inline)),r.push(Xz({element:e.arrowRef,padding:e.arrowOffset})),(i.size||e.width==="target")&&r.push(cQ({...typeof i.size=="boolean"?{}:i.size,apply({rects:a,availableWidth:o,availableHeight:l,...f}){var h;const c=((h=n().refs.floating.current)==null?void 0:h.style)??{};i.size&&(typeof i.size=="object"&&i.size.apply?i.size.apply({rects:a,availableWidth:o,availableHeight:l,...f}):Object.assign(c,{maxWidth:`${o}px`,maxHeight:`${l}px`})),e.width==="target"&&Object.assign(c,{width:`${a.reference.width}px`})}})),r}function VQ(e){const n=Im(),[t,i]=Ti({value:e.opened,defaultValue:e.defaultOpened,finalValue:!1,onChange:e.onChange}),r=A.useRef(t),a=()=>{t&&!e.disabled&&i(!1)},o=()=>{e.disabled||i(!t)},l=Q6({strategy:e.strategy,placement:e.preventPositionChangeWhenVisible?e.positionRef.current:e.position,middleware:UQ(e,()=>l,n),whileElementsMounted:e.keepMounted?void 0:yS});return A.useEffect(()=>{if(!(!l.refs.reference.current||!l.refs.floating.current)&&t)return yS(l.refs.reference.current,l.refs.floating.current,l.update)},[t,l.update]),ns(()=>{var f;(f=e.onPositionChange)==null||f.call(e,l.placement),e.positionRef.current=l.placement},[l.placement,e.preventPositionChangeWhenVisible]),ns(()=>{var f,c;t!==r.current&&(t?(c=e.onOpen)==null||c.call(e):(f=e.onClose)==null||f.call(e)),r.current=t},[t,e.onClose,e.onOpen]),us(()=>{let f=-1;return t&&(f=window.setTimeout(()=>e.setDropdownVisible(!0),4)),()=>{window.clearTimeout(f)}},[t,e.position]),{floating:l,controlled:typeof e.opened=="boolean",opened:t,onClose:a,onToggle:o}}const WQ={position:"bottom",offset:8,transitionProps:{transition:"fade",duration:150},middlewares:{flip:!0,shift:!0,inline:!1},arrowSize:7,arrowOffset:5,arrowRadius:0,arrowPosition:"side",closeOnClickOutside:!0,withinPortal:!0,closeOnEscape:!0,trapFocus:!1,withRoles:!0,returnFocus:!1,withOverlay:!1,hideDetached:!0,clickOutsideEvents:["mousedown","touchstart"],zIndex:ba("popover"),__staticSelector:"Popover",width:"max-content"},pL=(e,{radius:n,shadow:t})=>({dropdown:{"--popover-radius":n===void 0?void 0:Kt(n),"--popover-shadow":M6(t)}});function En(e){var tn,cn,On,mn,an,en,Rn;const n=be("Popover",WQ,e),{children:t,position:i,offset:r,onPositionChange:a,opened:o,transitionProps:l,onExitTransitionEnd:f,onEnterTransitionEnd:c,width:h,middlewares:d,withArrow:p,arrowSize:v,arrowOffset:b,arrowRadius:w,arrowPosition:k,unstyled:_,classNames:C,styles:x,closeOnClickOutside:E,withinPortal:O,portalProps:j,closeOnEscape:M,clickOutsideEvents:P,trapFocus:F,onClose:R,onDismiss:L,onOpen:B,onChange:G,zIndex:U,radius:H,shadow:N,id:z,defaultOpened:q,__staticSelector:Y,withRoles:D,disabled:V,returnFocus:W,variant:$,keepMounted:X,vars:ee,floatingStrategy:re,withOverlay:se,overlayProps:ye,hideDetached:ae,attributes:le,preventPositionChangeWhenVisible:_e,...ne}=n,ze=Ze({name:Y,props:n,classes:hL,classNames:C,styles:x,unstyled:_,attributes:le,rootSelector:"dropdown",vars:ee,varsResolver:pL}),{resolvedStyles:we}=Hi({classNames:C,styles:x,props:n}),[Ce,Ne]=A.useState(o??q??!1),ve=A.useRef(i),xe=A.useRef(null),[Pe,ue]=A.useState(null),[Be,We]=A.useState(null),{dir:Ue}=Mu(),Xe=Im(),Qe=qi(z),ie=VQ({middlewares:d,width:h,position:oL(Ue,i),offset:typeof r=="number"?r+(p?v/2:0):r,arrowRef:xe,arrowOffset:b,onPositionChange:a,opened:o,defaultOpened:q,onChange:G,onOpen:B,onClose:R,onDismiss:L,strategy:re,dropdownVisible:Ce,setDropdownVisible:Ne,positionRef:ve,disabled:V,preventPositionChangeWhenVisible:_e,keepMounted:X});cK(()=>{E&&(ie.onClose(),L==null||L())},P,[Pe,Be]);const he=A.useCallback(De=>{ue(De),ie.floating.refs.setReference(De)},[ie.floating.refs.setReference]),Ge=A.useCallback(De=>{We(De),ie.floating.refs.setFloating(De)},[ie.floating.refs.setFloating]),Je=A.useCallback(()=>{var De;(De=l==null?void 0:l.onExited)==null||De.call(l),f==null||f(),Ne(!1),_e||(ve.current=i)},[l==null?void 0:l.onExited,f,_e,i]),Se=A.useCallback(()=>{var De;(De=l==null?void 0:l.onEntered)==null||De.call(l),c==null||c()},[l==null?void 0:l.onEntered,c]);return y.jsxs(FQ,{value:{returnFocus:W,disabled:V,controlled:ie.controlled,reference:he,floating:Ge,x:ie.floating.x,y:ie.floating.y,arrowX:(On=(cn=(tn=ie.floating)==null?void 0:tn.middlewareData)==null?void 0:cn.arrow)==null?void 0:On.x,arrowY:(en=(an=(mn=ie.floating)==null?void 0:mn.middlewareData)==null?void 0:an.arrow)==null?void 0:en.y,opened:ie.opened,arrowRef:xe,transitionProps:{...l,onExited:Je,onEntered:Se},width:h,withArrow:p,arrowSize:v,arrowOffset:b,arrowRadius:w,arrowPosition:k,placement:ie.floating.placement,trapFocus:F,withinPortal:O,portalProps:j,zIndex:U,radius:H,shadow:N,closeOnEscape:M,onDismiss:L,onClose:ie.onClose,onToggle:ie.onToggle,getTargetId:()=>Qe,getDropdownId:()=>`${Qe}-dropdown`,withRoles:D,targetProps:ne,__staticSelector:Y,classNames:C,styles:x,unstyled:_,variant:$,keepMounted:X,getStyles:ze,resolvedStyles:we,floatingStrategy:re,referenceHidden:ae&&Xe!=="test"?(Rn=ie.floating.middlewareData.hide)==null?void 0:Rn.referenceHidden:!1},children:[t,se&&y.jsx(is,{transition:"fade",mounted:ie.opened,duration:(l==null?void 0:l.duration)||250,exitDuration:(l==null?void 0:l.exitDuration)||250,children:De=>y.jsx(ul,{withinPortal:O,children:y.jsx(Fm,{...ye,...ze("overlay",{className:ye==null?void 0:ye.className,style:[De,ye==null?void 0:ye.style]})})})})]})}En.Target=mL;En.Dropdown=nC;En.varsResolver=pL;En.displayName="@mantine/core/Popover";En.extend=e=>e;En.withProps=e=>{const n=t=>y.jsx(En,{...e,...t});return n.extend=En.extend,n.displayName=`WithProps(${En.displayName})`,n};var Ia={root:"m_5ae2e3c",barsLoader:"m_7a2bd4cd",bar:"m_870bb79","bars-loader-animation":"m_5d2b3b9d",dotsLoader:"m_4e3f22d7",dot:"m_870c4af","loader-dots-animation":"m_aac34a1",ovalLoader:"m_b34414df","oval-loader-animation":"m_f8e89c4b"};const vL=({className:e,...n})=>y.jsxs(ge,{component:"span",className:dn(Ia.barsLoader,e),...n,children:[y.jsx("span",{className:Ia.bar}),y.jsx("span",{className:Ia.bar}),y.jsx("span",{className:Ia.bar})]});vL.displayName="@mantine/core/Bars";const gL=({className:e,...n})=>y.jsxs(ge,{component:"span",className:dn(Ia.dotsLoader,e),...n,children:[y.jsx("span",{className:Ia.dot}),y.jsx("span",{className:Ia.dot}),y.jsx("span",{className:Ia.dot})]});gL.displayName="@mantine/core/Dots";const yL=({className:e,...n})=>y.jsx(ge,{component:"span",className:dn(Ia.ovalLoader,e),...n});yL.displayName="@mantine/core/Oval";const bL={bars:vL,oval:yL,dots:gL},GQ={loaders:bL,type:"oval"},wL=(e,{size:n,color:t})=>({root:{"--loader-size":Pn(n,"loader-size"),"--loader-color":t?st(t,e):void 0}}),Mi=Re(e=>{const n=be("Loader",GQ,e),{size:t,color:i,type:r,vars:a,className:o,style:l,classNames:f,styles:c,unstyled:h,loaders:d,variant:p,children:v,attributes:b,...w}=n,k=Ze({name:"Loader",props:n,classes:Ia,className:o,style:l,classNames:f,styles:c,unstyled:h,attributes:b,vars:a,varsResolver:wL});return v?y.jsx(ge,{...k("root"),...w,children:v}):y.jsx(ge,{...k("root"),component:d[r],variant:p,size:t,...w})});Mi.defaultLoaders=bL;Mi.classes=Ia;Mi.varsResolver=wL;Mi.displayName="@mantine/core/Loader";var Pc={root:"m_8d3f4000",icon:"m_8d3afb97",loader:"m_302b9fb1",group:"m_1a0f1b21",groupSection:"m_437b6484"};const ZT={orientation:"horizontal"},kL=(e,{borderWidth:n})=>({group:{"--ai-border-width":me(n)}}),py=Re(e=>{const n=be("ActionIconGroup",ZT,e),{className:t,style:i,classNames:r,styles:a,unstyled:o,orientation:l,vars:f,borderWidth:c,variant:h,mod:d,attributes:p,...v}=be("ActionIconGroup",ZT,e);return y.jsx(ge,{...Ze({name:"ActionIconGroup",props:n,classes:Pc,className:t,style:i,classNames:r,styles:a,unstyled:o,attributes:p,vars:f,varsResolver:kL,rootSelector:"group"})("group"),variant:h,mod:[{"data-orientation":l},d],role:"group",...v})});py.classes=Pc;py.varsResolver=kL;py.displayName="@mantine/core/ActionIconGroup";const _L=(e,{radius:n,color:t,gradient:i,variant:r,autoContrast:a,size:o})=>{const l=e.variantColorResolver({color:t||e.primaryColor,theme:e,gradient:i,variant:r||"filled",autoContrast:a});return{groupSection:{"--section-height":Pn(o,"section-height"),"--section-padding-x":Pn(o,"section-padding-x"),"--section-fz":ti(o),"--section-radius":n===void 0?void 0:Kt(n),"--section-bg":t||r?l.background:void 0,"--section-color":l.color,"--section-bd":t||r?l.border:void 0}}},vy=Re(e=>{const n=be("ActionIconGroupSection",null,e),{className:t,style:i,classNames:r,styles:a,unstyled:o,vars:l,variant:f,gradient:c,radius:h,autoContrast:d,attributes:p,...v}=n;return y.jsx(ge,{...Ze({name:"ActionIconGroupSection",props:n,classes:Pc,className:t,style:i,classNames:r,styles:a,unstyled:o,attributes:p,vars:l,varsResolver:_L,rootSelector:"groupSection"})("groupSection"),variant:f,...v})});vy.classes=Pc;vy.varsResolver=_L;vy.displayName="@mantine/core/ActionIconGroupSection";const xL=(e,{size:n,radius:t,variant:i,gradient:r,color:a,autoContrast:o})=>{const l=e.variantColorResolver({color:a||e.primaryColor,theme:e,gradient:r,variant:i||"filled",autoContrast:o});return{root:{"--ai-size":Pn(n,"ai-size"),"--ai-radius":t===void 0?void 0:Kt(t),"--ai-bg":a||i?l.background:void 0,"--ai-hover":a||i?l.hover:void 0,"--ai-hover-color":a||i?l.hoverColor:void 0,"--ai-color":l.color,"--ai-bd":a||i?l.border:void 0}}},Et=xi(e=>{const n=be("ActionIcon",null,e),{className:t,unstyled:i,variant:r,classNames:a,styles:o,style:l,loading:f,loaderProps:c,size:h,color:d,radius:p,__staticSelector:v,gradient:b,vars:w,children:k,disabled:_,"data-disabled":C,autoContrast:x,mod:E,attributes:O,...j}=n,M=Ze({name:["ActionIcon",v],props:n,className:t,style:l,classes:Pc,classNames:a,styles:o,unstyled:i,attributes:O,vars:w,varsResolver:xL});return y.jsxs(Tt,{...M("root",{active:!_&&!f&&!C}),...j,unstyled:i,variant:r,size:h,disabled:_||f,mod:[{loading:f,disabled:_||C},E],children:[typeof f=="boolean"&&y.jsx(is,{mounted:f,transition:"slide-down",duration:150,children:P=>y.jsx(ge,{component:"span",...M("loader",{style:P}),"aria-hidden":!0,children:y.jsx(Mi,{color:"var(--ai-color)",size:"calc(var(--ai-size) * 0.55)",...c})})}),y.jsx(ge,{component:"span",mod:{loading:f},...M("icon"),children:k})]})});Et.classes=Pc;Et.varsResolver=xL;Et.displayName="@mantine/core/ActionIcon";Et.Group=py;Et.GroupSection=vy;function SL({size:e="var(--cb-icon-size, 70%)",style:n,...t}){return y.jsx("svg",{viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{...n,width:e,height:e},...t,children:y.jsx("path",{d:"M11.7816 4.03157C12.0062 3.80702 12.0062 3.44295 11.7816 3.2184C11.5571 2.99385 11.193 2.99385 10.9685 3.2184L7.50005 6.68682L4.03164 3.2184C3.80708 2.99385 3.44301 2.99385 3.21846 3.2184C2.99391 3.44295 2.99391 3.80702 3.21846 4.03157L6.68688 7.49999L3.21846 10.9684C2.99391 11.193 2.99391 11.557 3.21846 11.7816C3.44301 12.0061 3.80708 12.0061 4.03164 11.7816L7.50005 8.31316L10.9685 11.7816C11.193 12.0061 11.5571 12.0061 11.7816 11.7816C12.0062 11.557 12.0062 11.193 11.7816 10.9684L8.31322 7.49999L11.7816 4.03157Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})})}SL.displayName="@mantine/core/CloseIcon";var CL={root:"m_86a44da5","root--subtle":"m_220c80f2"};const YQ={variant:"subtle"},AL=(e,{size:n,radius:t,iconSize:i})=>({root:{"--cb-size":Pn(n,"cb-size"),"--cb-radius":t===void 0?void 0:Kt(t),"--cb-icon-size":me(i)}}),hl=xi(e=>{const n=be("CloseButton",YQ,e),{iconSize:t,children:i,vars:r,radius:a,className:o,classNames:l,style:f,styles:c,unstyled:h,"data-disabled":d,disabled:p,variant:v,icon:b,mod:w,attributes:k,__staticSelector:_,...C}=n,x=Ze({name:_||"CloseButton",props:n,className:o,style:f,classes:CL,classNames:l,styles:c,unstyled:h,attributes:k,vars:r,varsResolver:AL});return y.jsxs(Tt,{...C,unstyled:h,variant:v,disabled:p,mod:[{disabled:p||d},w],...x("root",{variant:v,active:!p&&!d}),children:[b||y.jsx(SL,{}),i]})});hl.classes=CL;hl.varsResolver=AL;hl.displayName="@mantine/core/CloseButton";function KQ(e){return A.Children.toArray(e).filter(Boolean)}var OL={root:"m_4081bf90"};const XQ={preventGrowOverflow:!0,gap:"md",align:"center",justify:"flex-start",wrap:"wrap"},jL=(e,{grow:n,preventGrowOverflow:t,gap:i,align:r,justify:a,wrap:o},{childWidth:l})=>({root:{"--group-child-width":n&&t?l:void 0,"--group-gap":Ht(i),"--group-align":r,"--group-justify":a,"--group-wrap":o}}),Ke=Re(e=>{const n=be("Group",XQ,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,children:l,gap:f,align:c,justify:h,wrap:d,grow:p,preventGrowOverflow:v,vars:b,variant:w,__size:k,mod:_,attributes:C,...x}=n,E=KQ(l),O=E.length,j=Ht(f??"md");return y.jsx(ge,{...Ze({name:"Group",props:n,stylesCtx:{childWidth:`calc(${100/O}% - (${j} - ${j} / ${O}))`},className:i,style:r,classes:OL,classNames:t,styles:a,unstyled:o,attributes:C,vars:b,varsResolver:jL})("root"),variant:w,mod:[{grow:p},_],size:k,...x,children:E})});Ke.classes=OL;Ke.varsResolver=jL;Ke.displayName="@mantine/core/Group";const[ZQ,cs]=Wr("ModalBase component was not found in tree");function QQ({opened:e,transitionDuration:n}){const[t,i]=A.useState(e),r=A.useRef(-1),a=R6()?0:n;return A.useEffect(()=>(e?(i(!0),window.clearTimeout(r.current)):a===0?i(!1):r.current=window.setTimeout(()=>i(!1),a),()=>window.clearTimeout(r.current)),[e,a]),t}function JQ({id:e,transitionProps:n,opened:t,trapFocus:i,closeOnEscape:r,onClose:a,returnFocus:o}){const l=qi(e),[f,c]=A.useState(!1),[h,d]=A.useState(!1),p=QQ({opened:t,transitionDuration:typeof(n==null?void 0:n.duration)=="number"?n==null?void 0:n.duration:200});return uz("keydown",v=>{var b;v.key==="Escape"&&r&&!v.isComposing&&t&&((b=v.target)==null?void 0:b.getAttribute("data-mantine-stop-propagation"))!=="true"&&a()},{capture:!0}),az({opened:t,shouldReturnFocus:i&&o}),{_id:l,titleMounted:f,bodyMounted:h,shouldLockScroll:p,setTitleMounted:c,setBodyMounted:d}}var io=function(){return io=Object.assign||function(n){for(var t,i=1,r=arguments.length;i"u")return vJ;var n=gJ(e),t=document.documentElement.clientWidth,i=window.innerWidth;return{left:n[0],top:n[1],right:n[2],gap:Math.max(0,i-t+n[2]-n[0])}},bJ=DL(),qf="data-scroll-locked",wJ=function(e,n,t,i){var r=e.left,a=e.top,o=e.right,l=e.gap;return t===void 0&&(t="margin"),` + .`.concat(nJ,` { + overflow: hidden `).concat(i,`; + padding-right: `).concat(l,"px ").concat(i,`; + } + body[`).concat(qf,`] { + overflow: hidden `).concat(i,`; + overscroll-behavior: contain; + `).concat([n&&"position: relative ".concat(i,";"),t==="margin"&&` + padding-left: `.concat(r,`px; + padding-top: `).concat(a,`px; + padding-right: `).concat(o,`px; + margin-left:0; + margin-top:0; + margin-right: `).concat(l,"px ").concat(i,`; + `),t==="padding"&&"padding-right: ".concat(l,"px ").concat(i,";")].filter(Boolean).join(""),` + } + + .`).concat(hg,` { + right: `).concat(l,"px ").concat(i,`; + } + + .`).concat(mg,` { + margin-right: `).concat(l,"px ").concat(i,`; + } + + .`).concat(hg," .").concat(hg,` { + right: 0 `).concat(i,`; + } + + .`).concat(mg," .").concat(mg,` { + margin-right: 0 `).concat(i,`; + } + + body[`).concat(qf,`] { + `).concat(tJ,": ").concat(l,`px; + } +`)},JT=function(){var e=parseInt(document.body.getAttribute(qf)||"0",10);return isFinite(e)?e:0},kJ=function(){A.useEffect(function(){return document.body.setAttribute(qf,(JT()+1).toString()),function(){var e=JT()-1;e<=0?document.body.removeAttribute(qf):document.body.setAttribute(qf,e.toString())}},[])},_J=function(e){var n=e.noRelative,t=e.noImportant,i=e.gapMode,r=i===void 0?"margin":i;kJ();var a=A.useMemo(function(){return yJ(r)},[r]);return A.createElement(bJ,{styles:wJ(a,!n,r,t?"":"!important")})},wS=!1;if(typeof window<"u")try{var Pv=Object.defineProperty({},"passive",{get:function(){return wS=!0,!0}});window.addEventListener("test",Pv,Pv),window.removeEventListener("test",Pv,Pv)}catch{wS=!1}var xf=wS?{passive:!1}:!1,xJ=function(e){return e.tagName==="TEXTAREA"},RL=function(e,n){if(!(e instanceof Element))return!1;var t=window.getComputedStyle(e);return t[n]!=="hidden"&&!(t.overflowY===t.overflowX&&!xJ(e)&&t[n]==="visible")},SJ=function(e){return RL(e,"overflowY")},CJ=function(e){return RL(e,"overflowX")},e5=function(e,n){var t=n.ownerDocument,i=n;do{typeof ShadowRoot<"u"&&i instanceof ShadowRoot&&(i=i.host);var r=PL(e,i);if(r){var a=NL(e,i),o=a[1],l=a[2];if(o>l)return!0}i=i.parentNode}while(i&&i!==t.body);return!1},AJ=function(e){var n=e.scrollTop,t=e.scrollHeight,i=e.clientHeight;return[n,t,i]},OJ=function(e){var n=e.scrollLeft,t=e.scrollWidth,i=e.clientWidth;return[n,t,i]},PL=function(e,n){return e==="v"?SJ(n):CJ(n)},NL=function(e,n){return e==="v"?AJ(n):OJ(n)},jJ=function(e,n){return e==="h"&&n==="rtl"?-1:1},EJ=function(e,n,t,i,r){var a=jJ(e,window.getComputedStyle(n).direction),o=a*i,l=t.target,f=n.contains(l),c=!1,h=o>0,d=0,p=0;do{if(!l)break;var v=NL(e,l),b=v[0],w=v[1],k=v[2],_=w-k-a*b;(b||_)&&PL(e,l)&&(d+=_,p+=b);var C=l.parentNode;l=C&&C.nodeType===Node.DOCUMENT_FRAGMENT_NODE?C.host:C}while(!f&&l!==document.body||f&&(n.contains(l)||n===l));return(h&&Math.abs(d)<1||!h&&Math.abs(p)<1)&&(c=!0),c},Nv=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},n5=function(e){return[e.deltaX,e.deltaY]},t5=function(e){return e&&"current"in e?e.current:e},TJ=function(e,n){return e[0]===n[0]&&e[1]===n[1]},MJ=function(e){return` + .block-interactivity-`.concat(e,` {pointer-events: none;} + .allow-interactivity-`).concat(e,` {pointer-events: all;} +`)},DJ=0,Sf=[];function RJ(e){var n=A.useRef([]),t=A.useRef([0,0]),i=A.useRef(),r=A.useState(DJ++)[0],a=A.useState(DL)[0],o=A.useRef(e);A.useEffect(function(){o.current=e},[e]),A.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(r));var w=eJ([e.lockRef.current],(e.shards||[]).map(t5),!0).filter(Boolean);return w.forEach(function(k){return k.classList.add("allow-interactivity-".concat(r))}),function(){document.body.classList.remove("block-interactivity-".concat(r)),w.forEach(function(k){return k.classList.remove("allow-interactivity-".concat(r))})}}},[e.inert,e.lockRef.current,e.shards]);var l=A.useCallback(function(w,k){if("touches"in w&&w.touches.length===2||w.type==="wheel"&&w.ctrlKey)return!o.current.allowPinchZoom;var _=Nv(w),C=t.current,x="deltaX"in w?w.deltaX:C[0]-_[0],E="deltaY"in w?w.deltaY:C[1]-_[1],O,j=w.target,M=Math.abs(x)>Math.abs(E)?"h":"v";if("touches"in w&&M==="h"&&j.type==="range")return!1;var P=window.getSelection(),F=P&&P.anchorNode,R=F?F===j||F.contains(j):!1;if(R)return!1;var L=e5(M,j);if(!L)return!0;if(L?O=M:(O=M==="v"?"h":"v",L=e5(M,j)),!L)return!1;if(!i.current&&"changedTouches"in w&&(x||E)&&(i.current=O),!O)return!0;var B=i.current||O;return EJ(B,k,w,B==="h"?x:E)},[]),f=A.useCallback(function(w){var k=w;if(!(!Sf.length||Sf[Sf.length-1]!==a)){var _="deltaY"in k?n5(k):Nv(k),C=n.current.filter(function(O){return O.name===k.type&&(O.target===k.target||k.target===O.shadowParent)&&TJ(O.delta,_)})[0];if(C&&C.should){k.cancelable&&k.preventDefault();return}if(!C){var x=(o.current.shards||[]).map(t5).filter(Boolean).filter(function(O){return O.contains(k.target)}),E=x.length>0?l(k,x[0]):!o.current.noIsolation;E&&k.cancelable&&k.preventDefault()}}},[]),c=A.useCallback(function(w,k,_,C){var x={name:w,delta:k,target:_,should:C,shadowParent:PJ(_)};n.current.push(x),setTimeout(function(){n.current=n.current.filter(function(E){return E!==x})},1)},[]),h=A.useCallback(function(w){t.current=Nv(w),i.current=void 0},[]),d=A.useCallback(function(w){c(w.type,n5(w),w.target,l(w,e.lockRef.current))},[]),p=A.useCallback(function(w){c(w.type,Nv(w),w.target,l(w,e.lockRef.current))},[]);A.useEffect(function(){return Sf.push(a),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:p}),document.addEventListener("wheel",f,xf),document.addEventListener("touchmove",f,xf),document.addEventListener("touchstart",h,xf),function(){Sf=Sf.filter(function(w){return w!==a}),document.removeEventListener("wheel",f,xf),document.removeEventListener("touchmove",f,xf),document.removeEventListener("touchstart",h,xf)}},[]);var v=e.removeScrollBar,b=e.inert;return A.createElement(A.Fragment,null,b?A.createElement(a,{styles:MJ(r)}):null,v?A.createElement(_J,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function PJ(e){for(var n=null;e!==null;)e instanceof ShadowRoot&&(n=e.host,e=e.host),e=e.parentNode;return n}const NJ=uJ(ML,RJ);var gu=A.forwardRef(function(e,n){return A.createElement(gy,io({},e,{ref:n,sideCar:NJ}))});gu.classNames=gy.classNames;function $L({keepMounted:e,opened:n,onClose:t,id:i,transitionProps:r,onExitTransitionEnd:a,onEnterTransitionEnd:o,trapFocus:l,closeOnEscape:f,returnFocus:c,closeOnClickOutside:h,withinPortal:d,portalProps:p,lockScroll:v,children:b,zIndex:w,shadow:k,padding:_,__vars:C,unstyled:x,removeScrollProps:E,...O}){const{_id:j,titleMounted:M,bodyMounted:P,shouldLockScroll:F,setTitleMounted:R,setBodyMounted:L}=JQ({id:i,transitionProps:r,opened:n,trapFocus:l,closeOnEscape:f,onClose:t,returnFocus:c}),{key:B,...G}=E||{};return y.jsx(ul,{...p,withinPortal:d,children:y.jsx(ZQ,{value:{opened:n,onClose:t,closeOnClickOutside:h,onExitTransitionEnd:a,onEnterTransitionEnd:o,transitionProps:{...r,keepMounted:e},getTitleId:()=>`${j}-title`,getBodyId:()=>`${j}-body`,titleMounted:M,bodyMounted:P,setTitleMounted:R,setBodyMounted:L,trapFocus:l,closeOnEscape:f,zIndex:w,unstyled:x},children:y.jsx(gu,{enabled:F&&v,...G,children:y.jsx(ge,{...O,id:j,__vars:{...C,"--mb-z-index":(w||ba("modal")).toString(),"--mb-shadow":M6(k),"--mb-padding":Ht(_)},children:b})},B)})})}$L.displayName="@mantine/core/ModalBase";function $J(){const e=cs();return A.useEffect(()=>(e.setBodyMounted(!0),()=>e.setBodyMounted(!1)),[]),e.getBodyId()}var Zf={title:"m_615af6c9",header:"m_b5489c3c",inner:"m_60c222c7",content:"m_fd1ab0aa",close:"m_606cb269",body:"m_5df29311"};function zL({className:e,...n}){const t=$J(),i=cs();return y.jsx(ge,{id:t,className:dn({[Zf.body]:!i.unstyled},e),...n})}zL.displayName="@mantine/core/ModalBaseBody";function LL({className:e,onClick:n,...t}){const i=cs();return y.jsx(hl,{...t,onClick:r=>{i.onClose(),n==null||n(r)},className:dn({[Zf.close]:!i.unstyled},e),unstyled:i.unstyled})}LL.displayName="@mantine/core/ModalBaseCloseButton";function IL({transitionProps:e,className:n,innerProps:t,onKeyDown:i,style:r,ref:a,...o}){const l=cs();return y.jsx(is,{mounted:l.opened,transition:"pop",...l.transitionProps,onExited:()=>{var f,c,h;(f=l.onExitTransitionEnd)==null||f.call(l),(h=(c=l.transitionProps)==null?void 0:c.onExited)==null||h.call(c)},onEntered:()=>{var f,c,h;(f=l.onEnterTransitionEnd)==null||f.call(l),(h=(c=l.transitionProps)==null?void 0:c.onEntered)==null||h.call(c)},...e,children:f=>y.jsx("div",{...t,className:dn({[Zf.inner]:!l.unstyled},t.className),children:y.jsx(my,{active:l.opened&&l.trapFocus,innerRef:a,children:y.jsx(Lt,{...o,component:"section",role:"dialog",tabIndex:-1,"aria-modal":!0,"aria-describedby":l.bodyMounted?l.getBodyId():void 0,"aria-labelledby":l.titleMounted?l.getTitleId():void 0,style:[r,f],className:dn({[Zf.content]:!l.unstyled},n),unstyled:l.unstyled,children:o.children})})})})}IL.displayName="@mantine/core/ModalBaseContent";function BL({className:e,...n}){const t=cs();return y.jsx(ge,{component:"header",className:dn({[Zf.header]:!t.unstyled},e),...n})}BL.displayName="@mantine/core/ModalBaseHeader";const zJ={duration:200,timingFunction:"ease",transition:"fade"};function LJ(e){const n=cs();return{...zJ,...n.transitionProps,...e}}function FL({onClick:e,transitionProps:n,style:t,visible:i,...r}){const a=cs(),o=LJ(n);return y.jsx(is,{mounted:i!==void 0?i:a.opened,...o,transition:"fade",children:l=>y.jsx(Fm,{fixed:!0,style:[t,l],zIndex:a.zIndex,unstyled:a.unstyled,onClick:f=>{e==null||e(f),a.closeOnClickOutside&&a.onClose()},...r})})}FL.displayName="@mantine/core/ModalBaseOverlay";function IJ(){const e=cs();return A.useEffect(()=>(e.setTitleMounted(!0),()=>e.setTitleMounted(!1)),[]),e.getTitleId()}function qL({className:e,...n}){const t=IJ(),i=cs();return y.jsx(ge,{component:"h2",className:dn({[Zf.title]:!i.unstyled},e),id:t,...n})}qL.displayName="@mantine/core/ModalBaseTitle";function BJ({children:e}){return y.jsx(y.Fragment,{children:e})}const HL=A.createContext({size:"sm"}),UL=Re(e=>{const n=be("InputClearButton",null,e),{size:t,variant:i,vars:r,classNames:a,styles:o,...l}=n,f=A.use(HL),{resolvedClassNames:c,resolvedStyles:h}=Hi({classNames:a,styles:o,props:n});return y.jsx(hl,{variant:i||"transparent",size:t||(f==null?void 0:f.size)||"sm",classNames:c,styles:h,__staticSelector:"InputClearButton",style:{pointerEvents:"all",background:"var(--input-bg)",...l.style},...l})});UL.displayName="@mantine/core/InputClearButton";const FJ={xs:7,sm:8,md:10,lg:12,xl:15};function qJ({__clearable:e,__clearSection:n,rightSection:t,__defaultRightSection:i,size:r="sm",__clearSectionMode:a="both"}){const o=e&&n;return a==="rightSection"?t===null?null:t||i:a==="clear"?t===null?null:o||i:o&&(t||i)?y.jsxs("div",{"data-combined-clear-section":!0,style:{display:"flex",gap:2,alignItems:"center",paddingInlineEnd:FJ[r]},children:[o,t||i]}):t===null?null:t||o||i}const Du=A.createContext({offsetBottom:!1,offsetTop:!1,describedBy:void 0,getStyles:null,inputId:void 0,labelId:void 0});var xa={wrapper:"m_6c018570",input:"m_8fb7ebe7",section:"m_82577fc2",placeholder:"m_88bacfd0",root:"m_46b77525",label:"m_8fdc1311",required:"m_78a94662",error:"m_8f816625",description:"m_fe47ce59"};const VL=(e,{size:n})=>({description:{"--input-description-size":n===void 0?void 0:`calc(${ti(n)} - ${me(2)})`}}),qm=Re(e=>{const n=be("InputDescription",null,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,__staticSelector:f,__inheritStyles:c=!0,attributes:h,...d}=be("InputDescription",null,n),p=A.use(Du),v=Ze({name:["InputWrapper",f],props:n,classes:xa,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:h,rootSelector:"description",vars:l,varsResolver:VL});return y.jsx(ge,{component:"p",...(c&&(p==null?void 0:p.getStyles)||v)("description",p!=null&&p.getStyles?{className:i,style:r}:void 0),...d})});qm.classes=xa;qm.varsResolver=VL;qm.displayName="@mantine/core/InputDescription";const WL=(e,{size:n})=>({error:{"--input-error-size":n===void 0?void 0:`calc(${ti(n)} - ${me(2)})`}}),Hm=Re(e=>{const n=be("InputError",null,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,attributes:f,__staticSelector:c,__inheritStyles:h=!0,...d}=n,p=Ze({name:["InputWrapper",c],props:n,classes:xa,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:f,rootSelector:"error",vars:l,varsResolver:WL}),v=A.use(Du);return y.jsx(ge,{component:"p",...(h&&(v==null?void 0:v.getStyles)||p)("error",v!=null&&v.getStyles?{className:i,style:r}:void 0),...d})});Hm.classes=xa;Hm.varsResolver=WL;Hm.displayName="@mantine/core/InputError";const HJ={labelElement:"label"},GL=(e,{size:n})=>({label:{"--input-label-size":ti(n),"--input-asterisk-color":void 0}}),Um=Re(e=>{const n=be("InputLabel",HJ,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,labelElement:f,required:c,htmlFor:h,onMouseDown:d,children:p,__staticSelector:v,mod:b,attributes:w,...k}=n,_=Ze({name:["InputWrapper",v],props:n,classes:xa,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:w,rootSelector:"label",vars:l,varsResolver:GL}),C=A.use(Du),x=(C==null?void 0:C.getStyles)||_;return y.jsxs(ge,{...x("label",C!=null&&C.getStyles?{className:i,style:r}:void 0),component:f,htmlFor:f==="label"?h:void 0,mod:[{required:c},b],onMouseDown:E=>{d==null||d(E),!E.defaultPrevented&&E.detail>1&&E.preventDefault()},...k,children:[p,c&&y.jsx("span",{...x("required"),"aria-hidden":!0,children:" *"})]})});Um.classes=xa;Um.varsResolver=GL;Um.displayName="@mantine/core/InputLabel";const tC=Re(e=>{const n=be("InputPlaceholder",null,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,__staticSelector:f,error:c,mod:h,attributes:d,...p}=n;return y.jsx(ge,{...Ze({name:["InputPlaceholder",f],props:n,classes:xa,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:d,rootSelector:"placeholder"})("placeholder"),mod:[{error:!!c},h],component:"span",...p})});tC.classes=xa;tC.displayName="@mantine/core/InputPlaceholder";function UJ(e,{hasDescription:n,hasError:t}){const i=e.findIndex(l=>l==="input"),r=e.slice(0,i),a=e.slice(i+1),o=n&&r.includes("description")||t&&r.includes("error");return{offsetBottom:n&&a.includes("description")||t&&a.includes("error"),offsetTop:o}}const VJ={labelElement:"label",inputContainer:e=>e,inputWrapperOrder:["label","description","input","error"]},YL=(e,{size:n})=>({label:{"--input-label-size":ti(n),"--input-asterisk-color":void 0},error:{"--input-error-size":n===void 0?void 0:`calc(${ti(n)} - ${me(2)})`},description:{"--input-description-size":n===void 0?void 0:`calc(${ti(n)} - ${me(2)})`}}),yy=Re(e=>{const n=be("InputWrapper",VJ,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,size:f,variant:c,__staticSelector:h,inputContainer:d,inputWrapperOrder:p,label:v,error:b,description:w,labelProps:k,descriptionProps:_,errorProps:C,labelElement:x,children:E,withAsterisk:O,id:j,required:M,__stylesApiProps:P,mod:F,attributes:R,...L}=n,B=Ze({name:["InputWrapper",h],props:P||n,classes:xa,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:R,vars:l,varsResolver:YL}),G={size:f,variant:c,__staticSelector:h},U=qi(j),H=typeof O=="boolean"?O:M,N=(C==null?void 0:C.id)||`${U}-error`,z=(_==null?void 0:_.id)||`${U}-description`,q=U,Y=!!b&&typeof b!="boolean",D=!!w,V=`${Y?N:""} ${D?z:""}`,W=V.trim().length>0?V.trim():void 0,$=(k==null?void 0:k.id)||`${U}-label`,X=v&&y.jsx(Um,{labelElement:x,id:$,htmlFor:q,required:H,...G,...k,children:v},"label"),ee=D&&y.jsx(qm,{..._,...G,size:(_==null?void 0:_.size)||G.size,id:(_==null?void 0:_.id)||z,children:w},"description"),re=y.jsx(A.Fragment,{children:d(E)},"input"),se=Y&&A.createElement(Hm,{...C,...G,size:(C==null?void 0:C.size)||G.size,key:"error",id:(C==null?void 0:C.id)||N},b),ye=p.map(ae=>{switch(ae){case"label":return X;case"input":return re;case"description":return ee;case"error":return se;default:return null}});return y.jsx(Du,{value:{getStyles:B,describedBy:W,inputId:q,labelId:$,...UJ(p,{hasDescription:D,hasError:Y})},children:y.jsx(ge,{variant:c,size:f,mod:[{error:!!b},F],id:x==="label"?void 0:j,...B("root"),...L,children:ye})})});yy.classes=xa;yy.varsResolver=YL;yy.displayName="@mantine/core/InputWrapper";const WJ={variant:"default",leftSectionPointerEvents:"none",rightSectionPointerEvents:"none",withAria:!0,withErrorStyles:!0,size:"sm",loading:!1,loadingPosition:"right"},KL=(e,n,t)=>({wrapper:{"--input-margin-top":t.offsetTop?"calc(var(--mantine-spacing-xs) / 2)":void 0,"--input-margin-bottom":t.offsetBottom?"calc(var(--mantine-spacing-xs) / 2)":void 0,"--input-height":Pn(n.size,"input-height"),"--input-fz":ti(n.size),"--input-radius":n.radius===void 0?void 0:Kt(n.radius),"--input-left-section-width":n.leftSectionWidth!==void 0?me(n.leftSectionWidth):void 0,"--input-right-section-width":n.rightSectionWidth!==void 0?me(n.rightSectionWidth):void 0,"--input-padding-y":n.multiline?Pn(n.size,"input-padding-y"):void 0,"--input-left-section-pointer-events":n.leftSectionPointerEvents,"--input-right-section-pointer-events":n.rightSectionPointerEvents}}),Vt=xi(e=>{const n=be("Input",WJ,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,required:l,__staticSelector:f,__stylesApiProps:c,size:h,wrapperProps:d,error:p,disabled:v,leftSection:b,leftSectionProps:w,leftSectionWidth:k,rightSection:_,rightSectionProps:C,rightSectionWidth:x,rightSectionPointerEvents:E,leftSectionPointerEvents:O,variant:j,vars:M,pointer:P,multiline:F,radius:R,id:L,withAria:B,withErrorStyles:G,mod:U,inputSize:H,attributes:N,__clearSection:z,__clearable:q,__clearSectionMode:Y,__defaultRightSection:D,loading:V,loadingPosition:W,rootRef:$,...X}=n,{styleProps:ee,rest:re}=Tu(X),se=A.use(Du),ye={offsetBottom:se==null?void 0:se.offsetBottom,offsetTop:se==null?void 0:se.offsetTop},ae=Ze({name:["Input",f],props:c||n,classes:xa,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:N,stylesCtx:ye,rootSelector:"wrapper",vars:M,varsResolver:KL}),le=B?{required:l,disabled:v,"aria-invalid":p?!0:void 0,"aria-describedby":se==null?void 0:se.describedBy,id:(se==null?void 0:se.inputId)||L}:{},_e=V?y.jsx(Mi,{size:W==="left"?"calc(var(--input-left-section-size) / 2)":"calc(var(--input-right-section-size) / 2)"}):null,ne=V&&W==="left"?_e:b,ze=qJ({__clearable:q,__clearSection:z,rightSection:V&&W==="right"?_e:_,__defaultRightSection:D,size:h,__clearSectionMode:Y});return y.jsx(HL,{value:{size:h||"sm"},children:y.jsxs(ge,{ref:$,...ae("wrapper"),...ee,...d,mod:[{error:!!p&&G,pointer:P,disabled:v,multiline:F,"data-with-right-section":!!ze,"data-with-left-section":!!ne},U],variant:j,size:h,children:[ne&&y.jsx("div",{...w,"data-position":"left",...ae("section",{className:w==null?void 0:w.className,style:w==null?void 0:w.style}),children:ne}),y.jsx(ge,{component:"input",...re,...le,required:l,mod:{disabled:v,error:!!p&&G},variant:j,__size:H,...ae("input")}),ze&&y.jsx("div",{...C,"data-position":"right",...ae("section",{className:C==null?void 0:C.className,style:C==null?void 0:C.style}),children:ze})]})})});Vt.classes=xa;Vt.varsResolver=KL;Vt.Wrapper=yy;Vt.Label=Um;Vt.Error=Hm;Vt.Description=qm;Vt.Placeholder=tC;Vt.ClearButton=UL;Vt.displayName="@mantine/core/Input";function XL(e,n,t){const i=be(e,n,t),{label:r,description:a,error:o,required:l,classNames:f,styles:c,className:h,unstyled:d,__staticSelector:p,__stylesApiProps:v,errorProps:b,labelProps:w,descriptionProps:k,wrapperProps:_,id:C,size:x,style:E,inputContainer:O,inputWrapperOrder:j,withAsterisk:M,variant:P,vars:F,mod:R,attributes:L,...B}=i,{styleProps:G,rest:U}=Tu(B),H={label:r,description:a,error:o,required:l,classNames:f,className:h,__staticSelector:p,__stylesApiProps:v||i,errorProps:b,labelProps:w,descriptionProps:k,unstyled:d,styles:c,size:x,style:E,inputContainer:O,inputWrapperOrder:j,withAsterisk:M,variant:P,id:C,mod:R,attributes:L,..._};return{...U,classNames:f,styles:c,unstyled:d,wrapperProps:{...H,...G},inputProps:{required:l,classNames:f,styles:c,unstyled:d,size:x,__staticSelector:p,__stylesApiProps:v||i,error:o,variant:P,id:C,attributes:L}}}const GJ={__staticSelector:"InputBase",withAria:!0,size:"sm"},Ui=xi(e=>{const{inputProps:n,wrapperProps:t,...i}=XL("InputBase",GJ,e);return y.jsx(Vt.Wrapper,{...t,children:y.jsx(Vt,{...n,...i})})});Ui.classes={...Vt.classes,...Vt.Wrapper.classes};Ui.displayName="@mantine/core/InputBase";function Pg({style:e,size:n=16,...t}){return y.jsx("svg",{viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{...e,width:me(n),height:me(n),display:"block"},...t,children:y.jsx("path",{d:"M3.13523 6.15803C3.3241 5.95657 3.64052 5.94637 3.84197 6.13523L7.5 9.56464L11.158 6.13523C11.3595 5.94637 11.6759 5.95657 11.8648 6.15803C12.0536 6.35949 12.0434 6.67591 11.842 6.86477L7.84197 10.6148C7.64964 10.7951 7.35036 10.7951 7.15803 10.6148L3.15803 6.86477C2.95657 6.67591 2.94637 6.35949 3.13523 6.15803Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})})}Pg.displayName="@mantine/core/AccordionChevron";var ZL={root:"m_66836ed3",wrapper:"m_a5d60502",body:"m_667c2793",title:"m_6a03f287",label:"m_698f4f23",icon:"m_667f2a6a",message:"m_7fa78076",closeButton:"m_87f54839"};const QL=(e,{radius:n,color:t,variant:i,autoContrast:r})=>{const a=e.variantColorResolver({color:t||e.primaryColor,theme:e,variant:i||"light",autoContrast:r});return{root:{"--alert-radius":n===void 0?void 0:Kt(n),"--alert-bg":t||i?a.background:void 0,"--alert-color":a.color,"--alert-bd":t||i?a.border:void 0}}},by=Re(e=>{const n=be("Alert",null,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,radius:f,color:c,title:h,children:d,id:p,icon:v,withCloseButton:b,onClose:w,closeButtonLabel:k,variant:_,autoContrast:C,role:x,attributes:E,...O}=n,j=Ze({name:"Alert",classes:ZL,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:E,vars:l,varsResolver:QL}),M=qi(p),P=h&&`${M}-title`||void 0,F=`${M}-body`;return y.jsx(ge,{id:M,...j("root",{variant:_}),variant:_,...O,role:x||"alert","aria-describedby":d?F:void 0,"aria-labelledby":h?P:void 0,children:y.jsxs("div",{...j("wrapper"),children:[v&&y.jsx("div",{...j("icon"),children:v}),y.jsxs("div",{...j("body"),children:[h&&y.jsx("div",{...j("title"),"data-with-close-button":b||void 0,children:y.jsx("span",{id:P,...j("label"),children:h})}),d&&y.jsx("div",{id:F,...j("message"),"data-variant":_,children:d})]}),b&&y.jsx(hl,{...j("closeButton"),onClick:w,variant:"transparent",size:16,iconSize:16,"aria-label":k,unstyled:o})]})})});by.classes=ZL;by.varsResolver=QL;by.displayName="@mantine/core/Alert";var JL={root:"m_b6d8b162"};function YJ(e){if(e==="start")return"start";if(e==="end"||e)return"end"}const KJ={inherit:!1},eI=(e,{variant:n,lineClamp:t,gradient:i,size:r})=>({root:{"--text-fz":ti(r),"--text-lh":lK(r),"--text-gradient":n==="gradient"?uS(i,e):void 0,"--text-line-clamp":typeof t=="number"?t.toString():void 0}}),Te=xi(e=>{const n=be("Text",KJ,e),{lineClamp:t,truncate:i,inline:r,inherit:a,gradient:o,span:l,__staticSelector:f,vars:c,className:h,style:d,classNames:p,styles:v,unstyled:b,variant:w,mod:k,size:_,attributes:C,...x}=n;return y.jsx(ge,{...Ze({name:["Text",f],props:n,classes:JL,className:h,style:d,classNames:p,styles:v,unstyled:b,attributes:C,vars:c,varsResolver:eI})("root",{focusable:!0}),component:l?"span":"p",variant:w,mod:[{"data-truncate":YJ(i),"data-line-clamp":typeof t=="number","data-inline":r,"data-inherit":a},k],size:_,...x})});Te.classes=JL;Te.varsResolver=eI;Te.displayName="@mantine/core/Text";var nI={root:"m_849cf0da"};const XJ={underline:"hover"},wy=xi(e=>{const{underline:n,className:t,unstyled:i,mod:r,...a}=be("Anchor",XJ,e);return y.jsx(Te,{component:"a",className:dn({[nI.root]:!i},t),...a,mod:[{underline:n},r],__staticSelector:"Anchor",unstyled:i})});wy.classes=nI;wy.displayName="@mantine/core/Anchor";const[ZJ,Nc]=Wr("AppShell was not found in tree");var ml={root:"m_89ab340",navbar:"m_45252eee",aside:"m_9cdde9a",header:"m_3b16f56b",main:"m_8983817",footer:"m_3840c879",section:"m_6dcfc7c7"};const iC=Re(e=>{const{classNames:n,className:t,style:i,styles:r,unstyled:a,vars:o,withBorder:l,zIndex:f,mod:c,...h}=be("AppShellAside",null,e),d=Nc();return d.disabled?null:y.jsx(ge,{component:"aside",mod:[{"with-border":l??d.withBorder},c],...d.getStyles("aside",{className:dn({[gu.classNames.zeroRight]:d.offsetScrollbars},t),classNames:n,styles:r,style:i}),...h,__vars:{"--app-shell-aside-z-index":`calc(${f??d.zIndex} + 1)`}})});iC.classes=ml;iC.displayName="@mantine/core/AppShellAside";const rC=Re(e=>{var p;const{classNames:n,className:t,style:i,styles:r,unstyled:a,vars:o,withBorder:l,zIndex:f,mod:c,...h}=be("AppShellFooter",null,e),d=Nc();return d.disabled?null:y.jsx(ge,{component:"footer",mod:[{"with-border":l??d.withBorder},c],...d.getStyles("footer",{className:dn({[gu.classNames.zeroRight]:d.offsetScrollbars},t),classNames:n,styles:r,style:i}),...h,__vars:{"--app-shell-footer-z-index":(p=f??d.zIndex)==null?void 0:p.toString()}})});rC.classes=ml;rC.displayName="@mantine/core/AppShellFooter";const aC=Re(e=>{var p;const{classNames:n,className:t,style:i,styles:r,unstyled:a,vars:o,withBorder:l,zIndex:f,mod:c,...h}=be("AppShellHeader",null,e),d=Nc();return d.disabled?null:y.jsx(ge,{component:"header",mod:[{"with-border":l??d.withBorder},c],...d.getStyles("header",{className:dn({[gu.classNames.zeroRight]:d.offsetScrollbars},t),classNames:n,styles:r,style:i}),...h,__vars:{"--app-shell-header-z-index":(p=f??d.zIndex)==null?void 0:p.toString()}})});aC.classes=ml;aC.displayName="@mantine/core/AppShellHeader";const oC=Re(e=>{const{classNames:n,className:t,style:i,styles:r,vars:a,...o}=be("AppShellMain",null,e);return y.jsx(ge,{component:"main",...Nc().getStyles("main",{className:t,style:i,classNames:n,styles:r}),...o})});oC.classes=ml;oC.displayName="@mantine/core/AppShellMain";const sC=Re(e=>{const{classNames:n,className:t,style:i,styles:r,unstyled:a,vars:o,withBorder:l,zIndex:f,mod:c,...h}=be("AppShellNavbar",null,e),d=Nc();return d.disabled?null:y.jsx(ge,{component:"nav",mod:[{"with-border":l??d.withBorder},c],...d.getStyles("navbar",{className:t,classNames:n,styles:r,style:i}),...h,__vars:{"--app-shell-navbar-z-index":`calc(${f??d.zIndex} + 1)`}})});sC.classes=ml;sC.displayName="@mantine/core/AppShellNavbar";const lC=xi(e=>{const{classNames:n,className:t,style:i,styles:r,vars:a,grow:o,mod:l,...f}=be("AppShellSection",null,e),c=Nc();return y.jsx(ge,{mod:[{grow:o},l],...c.getStyles("section",{className:t,style:i,classNames:n,styles:r}),...f})});lC.classes=ml;lC.displayName="@mantine/core/AppShellSection";function Vm(e){return typeof e=="object"?e.base:e}function Wm(e){const n=typeof e=="object"&&e!==null&&typeof e.base<"u"&&Object.keys(e).length===1;return typeof e=="number"||typeof e=="string"||n}function Gm(e){return!(typeof e!="object"||e===null||Object.keys(e).length===1&&"base"in e)}function QJ({baseStyles:e,minMediaStyles:n,maxMediaStyles:t,aside:i,theme:r,mode:a}){var c,h,d;const o=i==null?void 0:i.width,l="translateX(var(--app-shell-aside-width))",f="translateX(calc(var(--app-shell-aside-width) * -1))";if(i!=null&&i.breakpoint&&!((c=i==null?void 0:i.collapsed)!=null&&c.mobile)&&(t[i==null?void 0:i.breakpoint]=t[i==null?void 0:i.breakpoint]||{},a==="fixed"?(t[i==null?void 0:i.breakpoint]["--app-shell-aside-width"]="100%",t[i==null?void 0:i.breakpoint]["--app-shell-aside-offset"]="0px"):(t[i==null?void 0:i.breakpoint]["--app-shell-aside-width"]="0px",t[i==null?void 0:i.breakpoint]["--app-shell-aside-offset"]="0px")),Wm(o)){const p=me(Vm(o));e["--app-shell-aside-width"]=p,e["--app-shell-aside-offset"]=p}if(Gm(o)&&(typeof o.base<"u"&&(e["--app-shell-aside-width"]=me(o.base),e["--app-shell-aside-offset"]=me(o.base)),Dt(o).forEach(p=>{p!=="base"&&(n[p]=n[p]||{},n[p]["--app-shell-aside-width"]=me(o[p]),n[p]["--app-shell-aside-offset"]=me(o[p]))})),i!=null&&i.breakpoint&&a==="static"&&(n[i.breakpoint]=n[i.breakpoint]||{},n[i.breakpoint]["--app-shell-aside-position"]="sticky",n[i.breakpoint]["--app-shell-aside-grid-row"]="2",n[i.breakpoint]["--app-shell-aside-grid-column"]="3",n[i.breakpoint]["--app-shell-main-column-end"]="3"),(h=i==null?void 0:i.collapsed)!=null&&h.desktop){const p=i.breakpoint;n[p]=n[p]||{},n[p]["--app-shell-aside-transform"]=l,n[p]["--app-shell-aside-transform-rtl"]=f,a==="fixed"?n[p]["--app-shell-aside-offset"]="0px !important":(n[p]["--app-shell-aside-width"]="0px",n[p]["--app-shell-aside-display"]="none",n[p]["--app-shell-main-column-end"]="-1"),n[p]["--app-shell-aside-scroll-locked-visibility"]="hidden"}if((d=i==null?void 0:i.collapsed)!=null&&d.mobile){const p=D6(i.breakpoint,r.breakpoints)-.1;t[p]=t[p]||{},a==="fixed"?(t[p]["--app-shell-aside-width"]="100%",t[p]["--app-shell-aside-offset"]="0px"):t[p]["--app-shell-aside-width"]="0px",t[p]["--app-shell-aside-transform"]=l,t[p]["--app-shell-aside-transform-rtl"]=f,t[p]["--app-shell-aside-scroll-locked-visibility"]="hidden"}}function JJ({baseStyles:e,minMediaStyles:n,footer:t,mode:i}){const r=t==null?void 0:t.height,a="translateY(var(--app-shell-footer-height))",o=i==="static"?!0:(t==null?void 0:t.offset)??!0;if(i==="static"&&t&&(e["--app-shell-footer-position"]="sticky",e["--app-shell-footer-grid-column"]="1 / -1",e["--app-shell-footer-grid-row"]="3"),Wm(r)){const l=me(Vm(r));e["--app-shell-footer-height"]=l,o&&(e["--app-shell-footer-offset"]=l)}Gm(r)&&(typeof r.base<"u"&&(e["--app-shell-footer-height"]=me(r.base),o&&(e["--app-shell-footer-offset"]=me(r.base))),Dt(r).forEach(l=>{l!=="base"&&(n[l]=n[l]||{},n[l]["--app-shell-footer-height"]=me(r[l]),o&&(n[l]["--app-shell-footer-offset"]=me(r[l])))})),t!=null&&t.collapsed&&(e["--app-shell-footer-transform"]=a,i==="fixed"&&(e["--app-shell-footer-offset"]="0px !important"))}function eee({baseStyles:e,minMediaStyles:n,header:t,mode:i}){const r=t==null?void 0:t.height,a="translateY(calc(var(--app-shell-header-height) * -1))",o=i==="static"?!0:(t==null?void 0:t.offset)??!0;if(i==="static"&&t&&(e["--app-shell-header-position"]="sticky",e["--app-shell-header-grid-column"]="1 / -1",e["--app-shell-header-grid-row"]="1"),Wm(r)){const l=me(Vm(r));e["--app-shell-header-height"]=l,o&&(e["--app-shell-header-offset"]=l)}Gm(r)&&(typeof r.base<"u"&&(e["--app-shell-header-height"]=me(r.base),o&&(e["--app-shell-header-offset"]=me(r.base))),Dt(r).forEach(l=>{l!=="base"&&(n[l]=n[l]||{},n[l]["--app-shell-header-height"]=me(r[l]),o&&(n[l]["--app-shell-header-offset"]=me(r[l])))})),t!=null&&t.collapsed&&(e["--app-shell-header-transform"]=a,i==="fixed"&&(e["--app-shell-header-offset"]="0px !important"))}function nee({baseStyles:e,minMediaStyles:n,maxMediaStyles:t,navbar:i,theme:r,mode:a}){var c,h,d;const o=i==null?void 0:i.width,l="translateX(calc(var(--app-shell-navbar-width) * -1))",f="translateX(var(--app-shell-navbar-width))";if(i!=null&&i.breakpoint&&!((c=i==null?void 0:i.collapsed)!=null&&c.mobile)&&(t[i==null?void 0:i.breakpoint]=t[i==null?void 0:i.breakpoint]||{},t[i==null?void 0:i.breakpoint]["--app-shell-navbar-offset"]="0px",t[i==null?void 0:i.breakpoint]["--app-shell-navbar-width"]="100%",a==="static"&&(t[i==null?void 0:i.breakpoint]["--app-shell-navbar-grid-width"]="0px")),Wm(o)){const p=me(Vm(o));e["--app-shell-navbar-width"]=p,e["--app-shell-navbar-offset"]=p,a==="static"&&(e["--app-shell-navbar-grid-width"]=p)}if(Gm(o)&&(typeof o.base<"u"&&(e["--app-shell-navbar-width"]=me(o.base),e["--app-shell-navbar-offset"]=me(o.base),a==="static"&&(e["--app-shell-navbar-grid-width"]=me(o.base))),Dt(o).forEach(p=>{p!=="base"&&(n[p]=n[p]||{},n[p]["--app-shell-navbar-width"]=me(o[p]),n[p]["--app-shell-navbar-offset"]=me(o[p]),a==="static"&&(n[p]["--app-shell-navbar-grid-width"]=me(o[p])))})),i!=null&&i.breakpoint&&a==="static"&&(n[i.breakpoint]=n[i.breakpoint]||{},n[i.breakpoint]["--app-shell-navbar-position"]="sticky",n[i.breakpoint]["--app-shell-navbar-grid-row"]="2",n[i.breakpoint]["--app-shell-navbar-grid-column"]="1",n[i.breakpoint]["--app-shell-main-column-start"]="2"),(h=i==null?void 0:i.collapsed)!=null&&h.desktop){const p=i.breakpoint;n[p]=n[p]||{},n[p]["--app-shell-navbar-transform"]=l,n[p]["--app-shell-navbar-transform-rtl"]=f,a==="fixed"?n[p]["--app-shell-navbar-offset"]="0px !important":(n[p]["--app-shell-navbar-width"]="0px",n[p]["--app-shell-navbar-display"]="none",n[p]["--app-shell-main-column-start"]="1")}if((d=i==null?void 0:i.collapsed)!=null&&d.mobile){const p=D6(i.breakpoint,r.breakpoints)-.1;t[p]=t[p]||{},t[p]["--app-shell-navbar-width"]="100%",t[p]["--app-shell-navbar-offset"]="0px",a==="static"&&(t[p]["--app-shell-navbar-grid-width"]="0px"),t[p]["--app-shell-navbar-transform"]=l,t[p]["--app-shell-navbar-transform-rtl"]=f}}function wk(e){return Number(e)===0?"0px":Ht(e)}function tee({padding:e,baseStyles:n,minMediaStyles:t}){Wm(e)&&(n["--app-shell-padding"]=wk(Vm(e))),Gm(e)&&(e.base&&(n["--app-shell-padding"]=wk(e.base)),Dt(e).forEach(i=>{i!=="base"&&(t[i]=t[i]||{},t[i]["--app-shell-padding"]=wk(e[i]))}))}function iee({navbar:e,header:n,footer:t,aside:i,padding:r,theme:a,mode:o}){const l={},f={},c={};o==="static"&&(c["--app-shell-main-grid-column"]="1 / -1",c["--app-shell-main-grid-row"]="2"),nee({baseStyles:c,minMediaStyles:l,maxMediaStyles:f,navbar:e,theme:a,mode:o}),QJ({baseStyles:c,minMediaStyles:l,maxMediaStyles:f,aside:i,theme:a,mode:o}),eee({baseStyles:c,minMediaStyles:l,header:n,mode:o}),JJ({baseStyles:c,minMediaStyles:l,footer:t,mode:o}),tee({baseStyles:c,minMediaStyles:l,padding:r});const h=Hh(Dt(l),a.breakpoints).map(p=>({query:`(min-width: ${Sg(p.px)})`,styles:l[p.value]})),d=Hh(Dt(f),a.breakpoints).map(p=>({query:`(max-width: ${Sg(p.px)})`,styles:f[p.value]}));return{baseStyles:c,media:[...h,...d]}}function ree({navbar:e,header:n,aside:t,footer:i,padding:r,mode:a,selector:o}){const l=li(),f=bo(),{media:c,baseStyles:h}=iee({navbar:e,header:n,footer:i,aside:t,padding:r,theme:l,mode:a});return y.jsx(Mc,{media:c,styles:h,selector:o||f.cssVariablesSelector})}function aee({transitionDuration:e,disabled:n}){const[t,i]=A.useState(!0),r=A.useRef(-1),a=A.useRef(-1);return uz("resize",()=>{i(!0),clearTimeout(r.current),r.current=window.setTimeout(()=>A.startTransition(()=>{i(!1)}),200)}),us(()=>{i(!0),clearTimeout(a.current),a.current=window.setTimeout(()=>A.startTransition(()=>{i(!1)}),e||0)},[n,e]),t}const oee={withBorder:!0,padding:0,transitionDuration:200,transitionTimingFunction:"ease",zIndex:ba("app"),mode:"fixed"},tI=(e,{transitionDuration:n,transitionTimingFunction:t})=>({root:{"--app-shell-transition-duration":`${n}ms`,"--app-shell-transition-timing-function":t}}),wr=Re(e=>{const n=be("AppShell",oee,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,navbar:f,withBorder:c,padding:h,transitionDuration:d,transitionTimingFunction:p,header:v,zIndex:b,layout:w,disabled:k,aside:_,footer:C,offsetScrollbars:x=!0,mode:E,mod:O,attributes:j,id:M,...P}=n,F=Ze({name:"AppShell",classes:ml,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:j,vars:l,varsResolver:tI}),R=aee({disabled:k,transitionDuration:d}),L=qi(M);return y.jsxs(ZJ,{value:{getStyles:F,withBorder:c,zIndex:b,disabled:k,offsetScrollbars:x,mode:E},children:[y.jsx(ree,{navbar:f,header:v,aside:_,footer:C,padding:h,mode:E,selector:E==="static"?`#${L}`:void 0}),y.jsx(ge,{...F("root"),id:L,mod:[{resizing:R,layout:w,disabled:k,mode:E},O],...P})]})});wr.classes=ml;wr.varsResolver=tI;wr.displayName="@mantine/core/AppShell";wr.Navbar=sC;wr.Header=aC;wr.Main=oC;wr.Aside=iC;wr.Footer=rC;wr.Section=lC;function iI(e){return typeof e=="string"?{value:e,label:e}:typeof e=="object"&&"value"in e&&!("label"in e)?{value:e.value,label:`${e.value}`,disabled:e.disabled}:typeof e=="object"&&"group"in e?{group:e.group,items:e.items.map(n=>iI(n))}:typeof e=="number"||typeof e=="bigint"||typeof e=="boolean"?{value:e,label:`${e}`}:e}function ky(e){return e?e.map(n=>iI(n)):[]}function Ym(e){return e.reduce((n,t)=>"group"in t?{...n,...Ym(t.items)}:(n[`${t.value}`]=t,n),{})}var fr={dropdown:"m_88b62a41",search:"m_985517d8",options:"m_b2821a6e",option:"m_92253aa5",empty:"m_2530cd1d",header:"m_858f94bd",footer:"m_82b967cb",group:"m_254f3e4f",groupLabel:"m_2bb2e9e5",chevron:"m_2943220b",optionsDropdownOption:"m_390b5f4",optionsDropdownCheckIcon:"m_8ee53fc2",optionsDropdownCheckPlaceholder:"m_a530ee0a"};const see={error:null},rI=(e,{size:n,color:t})=>({chevron:{"--combobox-chevron-size":Pn(n,"combobox-chevron-size"),"--combobox-chevron-color":t?st(t,e):void 0}}),_y=Re(e=>{const n=be("ComboboxChevron",see,e),{size:t,error:i,style:r,className:a,classNames:o,styles:l,unstyled:f,vars:c,attributes:h,mod:d,...p}=n,v=Ze({name:"ComboboxChevron",classes:fr,props:n,style:r,className:a,classNames:o,styles:l,unstyled:f,vars:c,varsResolver:rI,attributes:h,rootSelector:"chevron"});return y.jsx(ge,{component:"svg",...p,...v("chevron"),size:t,viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",mod:["combobox-chevron",{error:i},d],children:y.jsx("path",{d:"M4.93179 5.43179C4.75605 5.60753 4.75605 5.89245 4.93179 6.06819C5.10753 6.24392 5.39245 6.24392 5.56819 6.06819L7.49999 4.13638L9.43179 6.06819C9.60753 6.24392 9.89245 6.24392 10.0682 6.06819C10.2439 5.89245 10.2439 5.60753 10.0682 5.43179L7.81819 3.18179C7.73379 3.0974 7.61933 3.04999 7.49999 3.04999C7.38064 3.04999 7.26618 3.0974 7.18179 3.18179L4.93179 5.43179ZM10.0682 9.56819C10.2439 9.39245 10.2439 9.10753 10.0682 8.93179C9.89245 8.75606 9.60753 8.75606 9.43179 8.93179L7.49999 10.8636L5.56819 8.93179C5.39245 8.75606 5.10753 8.75606 4.93179 8.93179C4.75605 9.10753 4.75605 9.39245 4.93179 9.56819L7.18179 11.8182C7.35753 11.9939 7.64245 11.9939 7.81819 11.8182L10.0682 9.56819Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})})});_y.classes=fr;_y.varsResolver=rI;_y.displayName="@mantine/core/ComboboxChevron";const[lee,Sa]=Wr("Combobox component was not found in tree");function aI({onMouseDown:e,onClick:n,onClear:t,...i}){return y.jsx(Vt.ClearButton,{tabIndex:-1,"aria-hidden":!0,...i,onMouseDown:r=>{r.preventDefault(),e==null||e(r)},onClick:r=>{t(),n==null||n(r)}})}aI.displayName="@mantine/core/ComboboxClearButton";const uC=Re(e=>{const{classNames:n,styles:t,className:i,style:r,hidden:a,...o}=be("ComboboxDropdown",null,e),l=Sa();return y.jsx(En.Dropdown,{...o,role:"presentation","data-hidden":a||void 0,...l.getStyles("dropdown",{className:i,style:r,classNames:n,styles:t})})});uC.classes=fr;uC.displayName="@mantine/core/ComboboxDropdown";const uee={refProp:"ref"},oI=Re(e=>{const{children:n,refProp:t,ref:i}=be("ComboboxDropdownTarget",uee,e);if(Sa(),!E6(n))throw new Error("Combobox.DropdownTarget component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported");return y.jsx(En.Target,{ref:i,refProp:t,children:n})});oI.displayName="@mantine/core/ComboboxDropdownTarget";const fC=Re(e=>{const{classNames:n,className:t,style:i,styles:r,vars:a,...o}=be("ComboboxEmpty",null,e);return y.jsx(ge,{...Sa().getStyles("empty",{className:t,classNames:n,styles:r,style:i}),...o})});fC.classes=fr;fC.displayName="@mantine/core/ComboboxEmpty";function cC({onKeyDown:e,onClick:n,withKeyboardNavigation:t,withAriaAttributes:i,withExpandedAttribute:r,targetType:a,autoComplete:o}){const l=Sa(),[f,c]=A.useState(null),h=v=>{if(e==null||e(v),!l.readOnly&&t){if(v.nativeEvent.isComposing)return;if(v.nativeEvent.code==="ArrowDown"&&(v.preventDefault(),l.store.dropdownOpened?c(l.store.selectNextOption()):(l.store.openDropdown("keyboard"),c(l.store.selectActiveOption()),l.store.updateSelectedOptionIndex("selected",{scrollIntoView:!0}))),v.nativeEvent.code==="ArrowUp"&&(v.preventDefault(),l.store.dropdownOpened?c(l.store.selectPreviousOption()):(l.store.openDropdown("keyboard"),c(l.store.selectActiveOption()),l.store.updateSelectedOptionIndex("selected",{scrollIntoView:!0}))),v.nativeEvent.code==="Enter"||v.nativeEvent.code==="NumpadEnter"){if(v.nativeEvent.keyCode===229)return;const b=l.store.getSelectedOptionIndex();l.store.dropdownOpened&&b!==-1?(v.preventDefault(),l.store.clickSelectedOption()):a==="button"&&(v.preventDefault(),l.store.openDropdown("keyboard"))}v.key==="Escape"&&l.store.closeDropdown("keyboard"),v.nativeEvent.code==="Space"&&a==="button"&&(v.preventDefault(),l.store.toggleDropdown("keyboard"))}};return{...i?{...r?{role:"combobox"}:{},"aria-haspopup":"listbox","aria-expanded":r?!!(l.store.listId&&l.store.dropdownOpened):void 0,"aria-controls":l.store.dropdownOpened&&l.store.listId?l.store.listId:void 0,"aria-activedescendant":l.store.dropdownOpened&&f||void 0,autoComplete:o,"data-expanded":l.store.dropdownOpened||void 0,"data-mantine-stop-propagation":l.store.dropdownOpened||void 0}:{},onKeyDown:h,onClick:v=>{a==="button"&&v.currentTarget.focus(),n==null||n(v)}}}const fee={refProp:"ref",targetType:"input",withKeyboardNavigation:!0,withAriaAttributes:!0,withExpandedAttribute:!1,autoComplete:"off"},sI=Re(e=>{const{children:n,refProp:t,withKeyboardNavigation:i,withAriaAttributes:r,withExpandedAttribute:a,targetType:o,autoComplete:l,ref:f,...c}=be("ComboboxEventsTarget",fee,e),h=Eu(n);if(!h)throw new Error("Combobox.EventsTarget component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported");const d=Sa();return A.cloneElement(h,{...cC({targetType:o,withAriaAttributes:r,withKeyboardNavigation:i,withExpandedAttribute:a,onKeyDown:h.props.onKeyDown,onClick:h.props.onClick,autoComplete:l}),...c,[t]:Wt(f,d.store.targetRef,iy(h))})});sI.displayName="@mantine/core/ComboboxEventsTarget";const dC=Re(e=>{const{classNames:n,className:t,style:i,styles:r,vars:a,...o}=be("ComboboxFooter",null,e);return y.jsx(ge,{...Sa().getStyles("footer",{className:t,classNames:n,style:i,styles:r}),...o,onMouseDown:l=>{l.preventDefault()}})});dC.classes=fr;dC.displayName="@mantine/core/ComboboxFooter";const hC=Re(e=>{const{classNames:n,className:t,style:i,styles:r,vars:a,children:o,label:l,id:f,...c}=be("ComboboxGroup",null,e),h=Sa(),d=qi(f);return y.jsxs(ge,{role:"group","aria-labelledby":l?d:void 0,...h.getStyles("group",{className:t,classNames:n,style:i,styles:r}),...c,children:[l&&y.jsx("div",{id:d,...h.getStyles("groupLabel",{classNames:n,styles:r}),children:l}),o]})});hC.classes=fr;hC.displayName="@mantine/core/ComboboxGroup";const mC=Re(e=>{const{classNames:n,className:t,style:i,styles:r,vars:a,...o}=be("ComboboxHeader",null,e);return y.jsx(ge,{...Sa().getStyles("header",{className:t,classNames:n,style:i,styles:r}),...o,onMouseDown:l=>{l.preventDefault()}})});mC.classes=fr;mC.displayName="@mantine/core/ComboboxHeader";function lI({value:e,valuesDivider:n=",",...t}){return y.jsx("input",{type:"hidden",value:Array.isArray(e)?e.join(n):e?`${e}`:"",...t})}lI.displayName="@mantine/core/ComboboxHiddenInput";const pC=Re(e=>{const n=be("ComboboxOption",null,e),{classNames:t,className:i,style:r,styles:a,vars:o,onClick:l,id:f,active:c,onMouseDown:h,onMouseOver:d,disabled:p,selected:v,mod:b,...w}=n,k=Sa(),_=A.useId(),C=f||_;return y.jsx(ge,{...k.getStyles("option",{className:i,classNames:t,styles:a,style:r}),...w,id:C,mod:["combobox-option",{"combobox-active":c,"combobox-disabled":p,"combobox-selected":v},b],role:"option",onClick:x=>{var E;p?x.preventDefault():((E=k.onOptionSubmit)==null||E.call(k,n.value,n),l==null||l(x))},onMouseDown:x=>{x.preventDefault(),h==null||h(x)},onMouseOver:x=>{k.resetSelectionOnOptionHover&&k.store.resetSelectedOption(),d==null||d(x)}})});pC.classes=fr;pC.displayName="@mantine/core/ComboboxOption";const vC=Re(e=>{const{classNames:n,className:t,style:i,styles:r,id:a,onMouseDown:o,labelledBy:l,...f}=be("ComboboxOptions",null,e),c=Sa(),h=qi(a);return A.useEffect(()=>{c.store.setListId(h)},[h]),y.jsx(ge,{...c.getStyles("options",{className:t,style:i,classNames:n,styles:r}),...f,id:h,role:"listbox","aria-labelledby":l,onMouseDown:d=>{d.preventDefault(),o==null||o(d)}})});vC.classes=fr;vC.displayName="@mantine/core/ComboboxOptions";const cee={withAriaAttributes:!0,withKeyboardNavigation:!0},gC=Re(e=>{const{classNames:n,styles:t,unstyled:i,vars:r,withAriaAttributes:a,onKeyDown:o,onClick:l,withKeyboardNavigation:f,size:c,ref:h,...d}=be("ComboboxSearch",cee,e),p=Sa(),v=p.getStyles("search"),b=cC({targetType:"input",withAriaAttributes:a,withKeyboardNavigation:f,withExpandedAttribute:!1,onKeyDown:o,onClick:l,autoComplete:"off"});return y.jsx(Vt,{ref:Wt(h,p.store.searchRef),classNames:[{input:v.className},n],styles:[{input:v.style},t],size:c||p.size,...b,...d,__staticSelector:"Combobox"})});gC.classes=fr;gC.displayName="@mantine/core/ComboboxSearch";const dee={refProp:"ref",targetType:"input",withKeyboardNavigation:!0,withAriaAttributes:!0,withExpandedAttribute:!1,autoComplete:"off"},uI=Re(e=>{const{children:n,refProp:t,withKeyboardNavigation:i,withAriaAttributes:r,withExpandedAttribute:a,targetType:o,autoComplete:l,ref:f,...c}=be("ComboboxTarget",dee,e),h=Eu(n);if(!h)throw new Error("Combobox.Target component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported");const d=Sa(),p=A.cloneElement(h,{...cC({targetType:o,withAriaAttributes:r,withKeyboardNavigation:i,withExpandedAttribute:a,onKeyDown:h.props.onKeyDown,onClick:h.props.onClick,autoComplete:l}),...c});return y.jsx(En.Target,{refProp:t,ref:Wt(f,d.store.targetRef),children:p})});uI.displayName="@mantine/core/ComboboxTarget";function hee(e,n,t){for(let i=e-1;i>=0;i-=1)if(!n[i].hasAttribute("data-combobox-disabled"))return i;if(t){for(let i=n.length-1;i>-1;i-=1)if(!n[i].hasAttribute("data-combobox-disabled"))return i}return e}function mee(e,n,t){for(let i=e+1;i{l||(f(!0),r==null||r(N))},[f,r,l]),_=A.useCallback((N="unknown")=>{l&&(f(!1),i==null||i(N))},[f,i,l]),C=A.useCallback((N="unknown")=>{l?_(N):k(N)},[_,k,l]),x=A.useCallback(()=>{const N=Io(p.current),z=ug(`#${c.current} [data-combobox-selected]`,N);z==null||z.removeAttribute("data-combobox-selected"),z==null||z.removeAttribute("aria-selected")},[]),E=A.useCallback(N=>{const z=Io(p.current),q=ug(`#${c.current}`,z),Y=q?qo("[data-combobox-option]",q):null;if(!Y)return null;const D=N>=Y.length?0:N<0?Y.length-1:N;return h.current=D,Y!=null&&Y[D]&&!Y[D].hasAttribute("data-combobox-disabled")?(x(),Y[D].setAttribute("data-combobox-selected","true"),Y[D].setAttribute("aria-selected","true"),Y[D].scrollIntoView({block:"nearest",behavior:o}),Y[D].id):null},[o,x]),O=A.useCallback(()=>{const N=Io(p.current),z=ug(`#${c.current} [data-combobox-active]`,N);return E(z?qo(`#${c.current} [data-combobox-option]`,N).findIndex(q=>q===z):0)},[E]),j=A.useCallback(()=>{const N=Io(p.current),z=qo(`#${c.current} [data-combobox-option]`,N);return E(mee(h.current,z,a))},[E,a]),M=A.useCallback(()=>{const N=Io(p.current),z=qo(`#${c.current} [data-combobox-option]`,N);return E(hee(h.current,z,a))},[E,a]),P=A.useCallback(()=>{const N=Io(p.current);return E(pee(qo(`#${c.current} [data-combobox-option]`,N)))},[E]),F=A.useCallback((N="selected",z)=>{var q;if(typeof N=="number"){h.current=N;const Y=Io(p.current),D=qo(`#${c.current} [data-combobox-option]`,Y);z!=null&&z.scrollIntoView&&((q=D[N])==null||q.scrollIntoView({block:"nearest",behavior:o}));return}w.current=window.setTimeout(()=>{var W;const Y=Io(p.current),D=qo(`#${c.current} [data-combobox-option]`,Y),V=D.findIndex($=>$.hasAttribute(`data-combobox-${N}`));h.current=V,z!=null&&z.scrollIntoView&&((W=D[V])==null||W.scrollIntoView({block:"nearest",behavior:o}))},0)},[]),R=A.useCallback(()=>{h.current=-1,x()},[x]),L=A.useCallback(()=>{var z,q;const N=Io(p.current);(q=(z=qo(`#${c.current} [data-combobox-option]`,N))==null?void 0:z[h.current])==null||q.click()},[]),B=A.useCallback(N=>{c.current=N},[]),G=A.useCallback(()=>{v.current=window.setTimeout(()=>{var N;return(N=d.current)==null?void 0:N.focus()},0)},[]),U=A.useCallback(()=>{b.current=window.setTimeout(()=>{var N;return(N=p.current)==null?void 0:N.focus()},0)},[]),H=A.useCallback(()=>h.current,[]);return A.useEffect(()=>()=>{window.clearTimeout(v.current),window.clearTimeout(b.current),window.clearTimeout(w.current)},[]),{dropdownOpened:l,openDropdown:k,closeDropdown:_,toggleDropdown:C,selectedOptionIndex:h.current,getSelectedOptionIndex:H,selectOption:E,selectFirstOption:P,selectActiveOption:O,selectNextOption:j,selectPreviousOption:M,resetSelectedOption:R,updateSelectedOptionIndex:F,listId:c.current,setListId:B,clickSelectedOption:L,searchRef:d,focusSearchInput:G,targetRef:p,focusTarget:U}}const vee={keepMounted:!0,withinPortal:!0,resetSelectionOnOptionHover:!1,width:"target",transitionProps:{transition:"fade",duration:0},size:"sm"},fI=(e,{size:n,dropdownPadding:t})=>({options:{"--combobox-option-fz":ti(n),"--combobox-option-padding":Pn(n,"combobox-option-padding")},dropdown:{"--combobox-padding":t===void 0?void 0:me(t),"--combobox-option-fz":ti(n),"--combobox-option-padding":Pn(n,"combobox-option-padding")}}),Tn=e=>{const n=be("Combobox",vee,e),{classNames:t,styles:i,unstyled:r,children:a,store:o,vars:l,onOptionSubmit:f,onClose:c,size:h,dropdownPadding:d,resetSelectionOnOptionHover:p,__staticSelector:v,readOnly:b,attributes:w,...k}=n,_=Km(),C=o||_,x=Ze({name:v||"Combobox",classes:fr,props:n,classNames:t,styles:i,unstyled:r,attributes:w,vars:l,varsResolver:fI}),E=()=>{c==null||c(),C.closeDropdown()};return y.jsx(lee,{value:{getStyles:x,store:C,onOptionSubmit:f,size:h,resetSelectionOnOptionHover:p,readOnly:b},children:y.jsx(En,{opened:C.dropdownOpened,preventPositionChangeWhenVisible:!1,...k,onChange:O=>!O&&E(),withRoles:!1,unstyled:r,children:a})})},gee=e=>e;Tn.extend=gee;Tn.classes=fr;Tn.varsResolver=fI;Tn.displayName="@mantine/core/Combobox";Tn.Target=uI;Tn.Dropdown=uC;Tn.Options=vC;Tn.Option=pC;Tn.Search=gC;Tn.Empty=fC;Tn.Chevron=_y;Tn.Footer=dC;Tn.Header=mC;Tn.EventsTarget=sI;Tn.DropdownTarget=oI;Tn.Group=hC;Tn.ClearButton=aI;Tn.HiddenInput=lI;function yee({children:e,role:n}){const t=A.use(Du);return t?y.jsx("div",{role:n,"aria-labelledby":t.labelId,"aria-describedby":t.describedBy,children:e}):y.jsx(y.Fragment,{children:e})}const yC=A.createContext(null),bee={hiddenInputValuesSeparator:","},bC=oy((e=>{const{value:n,defaultValue:t,onChange:i,size:r,wrapperProps:a,children:o,readOnly:l,name:f,hiddenInputValuesSeparator:c,hiddenInputProps:h,maxSelectedValues:d,disabled:p,...v}=be("CheckboxGroup",bee,e),[b,w]=Ti({value:n,defaultValue:t,finalValue:[],onChange:i}),k=x=>{const E=typeof x=="string"?x:x.currentTarget.value;if(l)return;const O=b.includes(E);!O&&d&&b.length>=d||w(O?b.filter(j=>j!==E):[...b,E])},_=x=>{if(p)return!0;if(!d)return!1;const E=b.includes(x),O=b.length>=d;return!E&&O},C=b.join(c);return y.jsx(yC,{value:{value:b,onChange:k,size:r,isDisabled:_},children:y.jsxs(Vt.Wrapper,{size:r,...a,...v,labelElement:"div",__staticSelector:"CheckboxGroup",children:[y.jsx(yee,{role:"group",children:o}),y.jsx("input",{type:"hidden",name:f,value:C,...h})]})})}));bC.classes=Vt.Wrapper.classes;bC.displayName="@mantine/core/CheckboxGroup";var cI={card:"m_26775b0a"};const dI=A.createContext(null),wee={withBorder:!0},hI=(e,{radius:n})=>({card:{"--card-radius":Kt(n)}}),xy=Re(e=>{const n=be("CheckboxCard",wee,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,checked:f,mod:c,withBorder:h,value:d,onClick:p,defaultChecked:v,onChange:b,attributes:w,...k}=n,_=Ze({name:"CheckboxCard",classes:cI,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:w,vars:l,varsResolver:hI,rootSelector:"card"}),C=A.use(yC),[x,E]=Ti({value:typeof f=="boolean"?f:C?C.value.includes(d||""):void 0,defaultValue:v,finalValue:!1,onChange:b});return y.jsx(dI,{value:{checked:x},children:y.jsx(Tt,{mod:[{"with-border":h,checked:x},c],..._("card"),...k,role:"checkbox","aria-checked":x,onClick:O=>{p==null||p(O),C==null||C.onChange(d||""),E(!x)}})})});xy.displayName="@mantine/core/CheckboxCard";xy.classes=cI;xy.varsResolver=hI;function wC({size:e,style:n,...t}){return y.jsx("svg",{viewBox:"0 0 10 7",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:e!==void 0?{width:me(e),height:me(e),...n}:n,"aria-hidden":!0,...t,children:y.jsx("path",{d:"M4 4.586L1.707 2.293A1 1 0 1 0 .293 3.707l3 3a.997.997 0 0 0 1.414 0l5-5A1 1 0 1 0 8.293.293L4 4.586z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})})}function mI({indeterminate:e,...n}){return e?y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 32 6","aria-hidden":!0,...n,children:y.jsx("rect",{width:"32",height:"6",fill:"currentColor",rx:"3"})}):y.jsx(wC,{...n})}var pI={indicator:"m_5e5256ee",icon:"m_1b1c543a","indicator--outline":"m_76e20374"};const kee={icon:mI,variant:"filled",radius:"sm"},vI=(e,{radius:n,color:t,size:i,iconColor:r,variant:a,autoContrast:o})=>{const l=fs({color:t||e.primaryColor,theme:e}),f=l.isThemeColor&&l.shade===void 0?`var(--mantine-color-${l.color}-outline)`:l.color;return{indicator:{"--checkbox-size":Pn(i,"checkbox-size"),"--checkbox-radius":n===void 0?void 0:Kt(n),"--checkbox-color":a==="outline"?f:st(t,e),"--checkbox-icon-color":r?st(r,e):ry(o,e)?Lm({color:t,theme:e,autoContrast:o}):void 0}}},Sy=Re(e=>{const n=be("CheckboxIndicator",kee,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,icon:f,indeterminate:c,radius:h,color:d,iconColor:p,autoContrast:v,checked:b,mod:w,variant:k,disabled:_,attributes:C,...x}=n,E=Ze({name:"CheckboxIndicator",classes:pI,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:C,vars:l,varsResolver:vI,rootSelector:"indicator"}),O=A.use(dI),j=typeof b=="boolean"||typeof c=="boolean"?b||c:(O==null?void 0:O.checked)||!1;return y.jsx(ge,{...E("indicator",{variant:k}),variant:k,mod:[{checked:j,disabled:_},w],...x,children:y.jsx(f,{indeterminate:c,...E("icon")})})});Sy.displayName="@mantine/core/CheckboxIndicator";Sy.classes=pI;Sy.varsResolver=vI;var gI={root:"m_5f75b09e",body:"m_5f6e695e",labelWrapper:"m_d3ea56bb",label:"m_8ee546b8",description:"m_328f68c0",error:"m_8e8a99cc"};const _ee=gI;function yI({__staticSelector:e,__stylesApiProps:n,className:t,classNames:i,styles:r,unstyled:a,children:o,label:l,description:f,id:c,disabled:h,error:d,size:p,labelPosition:v="left",bodyElement:b="div",labelElement:w="label",variant:k,style:_,vars:C,mod:x,attributes:E,...O}){const j=Ze({name:e,props:n,className:t,style:_,classes:gI,classNames:i,styles:r,unstyled:a,attributes:E});return y.jsx(ge,{...j("root"),__vars:{"--label-fz":ti(p),"--label-lh":Pn(p,"label-lh")},mod:[{"label-position":v},x],variant:k,size:p,...O,children:y.jsxs(ge,{component:b,htmlFor:b==="label"?c:void 0,...j("body"),children:[o,y.jsxs("div",{...j("labelWrapper"),"data-disabled":h||void 0,children:[l&&y.jsx(ge,{component:w,htmlFor:w==="label"?c:void 0,...j("label"),"data-disabled":h||void 0,children:l}),f&&y.jsx(Vt.Description,{size:p,__inheritStyles:!1,...j("description"),children:f}),d&&typeof d!="boolean"&&y.jsx(Vt.Error,{size:p,__inheritStyles:!1,...j("error"),children:d})]})]})})}yI.displayName="@mantine/core/InlineInput";var bI={root:"m_bf2d988c",inner:"m_26062bec",input:"m_26063560",icon:"m_bf295423","input--outline":"m_215c4542"};const xee={labelPosition:"right",icon:mI,withErrorStyles:!0,variant:"filled",radius:"sm"},wI=(e,{radius:n,color:t,size:i,iconColor:r,variant:a,autoContrast:o})=>{const l=fs({color:t||e.primaryColor,theme:e}),f=l.isThemeColor&&l.shade===void 0?`var(--mantine-color-${l.color}-outline)`:l.color;return{root:{"--checkbox-size":Pn(i,"checkbox-size"),"--checkbox-radius":n===void 0?void 0:Kt(n),"--checkbox-color":a==="outline"?f:st(t,e),"--checkbox-icon-color":r?st(r,e):ry(o,e)?Lm({color:t,theme:e,autoContrast:o}):void 0}}},fl=Re(e=>{var se;const n=be("Checkbox",xee,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,color:f,label:c,id:h,size:d,radius:p,wrapperProps:v,checked:b,labelPosition:w,description:k,error:_,disabled:C,variant:x,indeterminate:E,icon:O,rootRef:j,iconColor:M,onChange:P,autoContrast:F,mod:R,attributes:L,readOnly:B,onClick:G,withErrorStyles:U,ref:H,...N}=n,z=A.useRef(null),q=A.use(yC),Y=d||(q==null?void 0:q.size),D=Ze({name:"Checkbox",props:n,classes:bI,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:L,vars:l,varsResolver:wI}),{styleProps:V,rest:W}=Tu(N),$=qi(h),X={checked:(q==null?void 0:q.value.includes(W.value))??b,onChange:ye=>{q==null||q.onChange(ye),P==null||P(ye)}},ee=((se=q==null?void 0:q.isDisabled)==null?void 0:se.call(q,W.value))??!1,re=C||ee;return A.useEffect(()=>{z.current&&(z.current.indeterminate=E||!1,E?z.current.setAttribute("data-indeterminate","true"):z.current.removeAttribute("data-indeterminate"))},[E]),y.jsx(yI,{...D("root"),__staticSelector:"Checkbox",__stylesApiProps:n,id:$,size:Y,labelPosition:w,label:c,description:k,error:_,disabled:re,classNames:t,styles:a,unstyled:o,"data-checked":X.checked||b||void 0,variant:x,ref:j,mod:R,attributes:L,inert:W.inert,...V,...v,children:y.jsxs(ge,{...D("inner"),mod:{"data-label-position":w},children:[y.jsx(ge,{component:"input",id:$,ref:Wt(z,H),mod:{error:!!_},...D("input",{focusable:!0,variant:x}),...W,...X,disabled:re,inert:W.inert,type:"checkbox",onClick:ye=>{B&&ye.preventDefault(),G==null||G(ye)}}),y.jsx(O,{indeterminate:E,...D("icon")})]})})});fl.classes={...bI,..._ee};fl.varsResolver=wI;fl.displayName="@mantine/core/Checkbox";fl.Group=bC;fl.Indicator=Sy;fl.Card=xy;function yu(e){return"group"in e}function kI({options:e,search:n,limit:t}){const i=n.trim().toLowerCase(),r=[];for(let a=0;a0)return!1;return!0}function _I(e,n=new Set){if(Array.isArray(e))for(const t of e)if(yu(t))_I(t.items,n);else{if(typeof t.value>"u")throw new Error("[@mantine/core] Each option must have value property");if(n.has(t.value))throw new Error(`[@mantine/core] Duplicate options are not supported. Option with value "${t.value}" was provided more than once`);n.add(t.value)}}function Cee(e,n){return Array.isArray(e)?e.includes(n):e===n}function xI({data:e,withCheckIcon:n,withAlignedLabels:t,value:i,checkIconPosition:r,unstyled:a,renderOption:o}){if(!yu(e)){const f=Cee(i,e.value),c=n&&(f?y.jsx(wC,{className:fr.optionsDropdownCheckIcon}):t?y.jsx("div",{className:fr.optionsDropdownCheckPlaceholder}):null),h=y.jsxs(y.Fragment,{children:[r==="left"&&c,y.jsx("span",{children:e.label}),r==="right"&&c]});return y.jsx(Tn.Option,{value:e.value,disabled:e.disabled,className:dn({[fr.optionsDropdownOption]:!a}),"data-reverse":r==="right"||void 0,"data-checked":f||void 0,"aria-selected":f,active:f,children:typeof o=="function"?o({option:e,checked:f}):h})}const l=e.items.map(f=>y.jsx(xI,{data:f,value:i,unstyled:a,withCheckIcon:n,withAlignedLabels:t,checkIconPosition:r,renderOption:o},`${f.value}`));return y.jsx(Tn.Group,{label:e.group,children:l})}function Cy({data:e,hidden:n,hiddenWhenEmpty:t,filter:i,search:r,limit:a,maxDropdownHeight:o,withScrollArea:l=!0,filterOptions:f=!0,withCheckIcon:c=!1,withAlignedLabels:h=!1,value:d,checkIconPosition:p,nothingFoundMessage:v,unstyled:b,labelId:w,renderOption:k,scrollAreaProps:_,"aria-label":C}){_I(e);const x=typeof r=="string"?(i||kI)({options:e,search:f?r:"",limit:a??1/0}):e,E=See(x),O=x.map(j=>y.jsx(xI,{data:j,withCheckIcon:c,withAlignedLabels:h,value:d,checkIconPosition:p,unstyled:b,renderOption:k},yu(j)?j.group:`${j.value}`));return y.jsx(Tn.Dropdown,{hidden:n||t&&E,"data-composed":!0,children:y.jsxs(Tn.Options,{labelledBy:w,"aria-label":C,children:[l?y.jsx(_a.Autosize,{mah:o??220,type:"scroll",scrollbarSize:"var(--combobox-padding)",offsetScrollbars:"y",..._,children:O}):O,E&&v&&y.jsx(Tn.Empty,{children:v})]})})}const Ay=Re(e=>{const n=be("Autocomplete",{size:"sm"},e),{classNames:t,styles:i,unstyled:r,vars:a,dropdownOpened:o,defaultDropdownOpened:l,onDropdownClose:f,onDropdownOpen:c,onFocus:h,onBlur:d,onClick:p,onChange:v,data:b,value:w,defaultValue:k,selectFirstOptionOnChange:_,selectFirstOptionOnDropdownOpen:C,onOptionSubmit:x,comboboxProps:E,readOnly:O,disabled:j,filter:M,limit:P,withScrollArea:F,maxDropdownHeight:R,size:L,id:B,renderOption:G,autoComplete:U,scrollAreaProps:H,onClear:N,clearButtonProps:z,error:q,clearable:Y,clearSectionMode:D,rightSection:V,autoSelectOnBlur:W,openOnFocus:$=!0,attributes:X,...ee}=n,re=qi(B),se=ky(b),ye=Ym(se),[ae,le]=Ti({value:w,defaultValue:k,finalValue:"",onChange:v}),_e=Km({opened:o,defaultOpened:l,onDropdownOpen:()=>{c==null||c(),C&&_e.selectFirstOption()},onDropdownClose:()=>{f==null||f(),setTimeout(_e.resetSelectedOption,0)}}),ne=Ne=>{le(Ne),_e.resetSelectedOption()},{resolvedClassNames:ze,resolvedStyles:we}=Hi({props:n,styles:i,classNames:t});A.useEffect(()=>{_&&_e.selectFirstOption()},[_,ae]);const Ce=y.jsx(Tn.ClearButton,{...z,onClear:()=>{ne(""),N==null||N()}});return y.jsxs(Tn,{store:_e,__staticSelector:"Autocomplete",classNames:ze,styles:we,unstyled:r,readOnly:O,size:L,attributes:X,keepMounted:W,onOptionSubmit:Ne=>{x==null||x(Ne),ne(ye[Ne].label),_e.closeDropdown()},...E,children:[y.jsx(Tn.Target,{autoComplete:U,withExpandedAttribute:!0,children:y.jsx(Ui,{...ee,size:L,__staticSelector:"Autocomplete",__clearSection:Ce,__clearable:Y&&!!ae&&!j&&!O,__clearSectionMode:D,rightSection:V,disabled:j,readOnly:O,value:ae,error:q,onChange:Ne=>{ne(Ne.currentTarget.value),_e.openDropdown(),_&&_e.selectFirstOption()},onFocus:Ne=>{$&&_e.openDropdown(),h==null||h(Ne)},onBlur:Ne=>{W&&_e.clickSelectedOption(),_e.closeDropdown(),d==null||d(Ne)},onClick:Ne=>{_e.openDropdown(),p==null||p(Ne)},classNames:ze,styles:we,unstyled:r,attributes:X,id:re})}),y.jsx(Cy,{data:se,hidden:O||j,filter:M,search:ae,limit:P,hiddenWhenEmpty:!0,withScrollArea:F,maxDropdownHeight:R,unstyled:r,labelId:ee.label?`${re}-label`:void 0,"aria-label":ee.label?void 0:ee["aria-label"],renderOption:G,scrollAreaProps:H})]})});Ay.classes={...Ui.classes,...Tn.classes};Ay.displayName="@mantine/core/Autocomplete";var Oy={group:"m_11def92b",root:"m_f85678b6",image:"m_11f8ac07",placeholder:"m_104cd71f"};const SI=A.createContext({withinGroup:!1}),CI=(e,{spacing:n})=>({group:{"--ag-spacing":Ht(n)}}),jy=Re(e=>{const n=be("AvatarGroup",null,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,spacing:f,attributes:c,...h}=n;return y.jsx(SI,{value:{withinGroup:!0},children:y.jsx(ge,{...Ze({name:"AvatarGroup",classes:Oy,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:c,vars:l,varsResolver:CI,rootSelector:"group"})("group"),...h})})});jy.classes=Oy;jy.varsResolver=CI;jy.displayName="@mantine/core/AvatarGroup";function Aee(e){return y.jsx("svg",{...e,"data-avatar-placeholder-icon":!0,viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:y.jsx("path",{d:"M0.877014 7.49988C0.877014 3.84219 3.84216 0.877045 7.49985 0.877045C11.1575 0.877045 14.1227 3.84219 14.1227 7.49988C14.1227 11.1575 11.1575 14.1227 7.49985 14.1227C3.84216 14.1227 0.877014 11.1575 0.877014 7.49988ZM7.49985 1.82704C4.36683 1.82704 1.82701 4.36686 1.82701 7.49988C1.82701 8.97196 2.38774 10.3131 3.30727 11.3213C4.19074 9.94119 5.73818 9.02499 7.50023 9.02499C9.26206 9.02499 10.8093 9.94097 11.6929 11.3208C12.6121 10.3127 13.1727 8.97172 13.1727 7.49988C13.1727 4.36686 10.6328 1.82704 7.49985 1.82704ZM10.9818 11.9787C10.2839 10.7795 8.9857 9.97499 7.50023 9.97499C6.01458 9.97499 4.71624 10.7797 4.01845 11.9791C4.97952 12.7272 6.18765 13.1727 7.49985 13.1727C8.81227 13.1727 10.0206 12.727 10.9818 11.9787ZM5.14999 6.50487C5.14999 5.207 6.20212 4.15487 7.49999 4.15487C8.79786 4.15487 9.84999 5.207 9.84999 6.50487C9.84999 7.80274 8.79786 8.85487 7.49999 8.85487C6.20212 8.85487 5.14999 7.80274 5.14999 6.50487ZM7.49999 5.10487C6.72679 5.10487 6.09999 5.73167 6.09999 6.50487C6.09999 7.27807 6.72679 7.90487 7.49999 7.90487C8.27319 7.90487 8.89999 7.27807 8.89999 6.50487C8.89999 5.73167 8.27319 5.10487 7.49999 5.10487Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})})}function Oee(e){let n=0;for(let t=0;ti[0]).slice(0,n).join("").toUpperCase()}const AI=(e,{size:n,radius:t,variant:i,gradient:r,color:a,autoContrast:o,name:l,allowedInitialsColors:f})=>{const c=a==="initials"&&typeof l=="string"?Eee(l,f):a,h=e.variantColorResolver({color:c||"gray",theme:e,gradient:r,variant:i||"light",autoContrast:o});return{root:{"--avatar-size":Pn(n,"avatar-size"),"--avatar-radius":t===void 0?void 0:Kt(t),"--avatar-bg":c||i?h.background:void 0,"--avatar-color":c||i?h.color:void 0,"--avatar-bd":c||i?h.border:void 0}}},rs=xi(e=>{const n=be("Avatar",null,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,src:f,alt:c,radius:h,color:d,gradient:p,imageProps:v,children:b,autoContrast:w,mod:k,name:_,allowedInitialsColors:C,attributes:x,...E}=n,O=A.use(SI),[j,M]=A.useState(!f),P=Ze({name:"Avatar",props:n,classes:Oy,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:x,vars:l,varsResolver:AI});return A.useEffect(()=>M(!f),[f]),y.jsx(ge,{...P("root"),mod:[{"within-group":O.withinGroup},k],...E,children:j||!f?y.jsx("span",{...P("placeholder"),title:c,children:b||typeof _=="string"&&Tee(_)||y.jsx(Aee,{})}):y.jsx("img",{...v,...P("image"),src:f,alt:c,onError:F=>{var R;M(!0),(R=v==null?void 0:v.onError)==null||R.call(v,F)}})})});rs.classes=Oy;rs.varsResolver=AI;rs.displayName="@mantine/core/Avatar";rs.Group=jy;var OI={root:"m_347db0ec","root--dot":"m_fbd81e3d",label:"m_5add502a",section:"m_91fdda9b"};const jI=(e,{radius:n,color:t,gradient:i,variant:r,size:a,autoContrast:o,circle:l})=>{const f=e.variantColorResolver({color:t||e.primaryColor,theme:e,gradient:i,variant:r||"filled",autoContrast:o});return{root:{"--badge-height":Pn(a,"badge-height"),"--badge-padding-x":Pn(a,"badge-padding-x"),"--badge-fz":Pn(a,"badge-fz"),"--badge-radius":l||n===void 0?void 0:Kt(n),"--badge-bg":t||r?f.background:void 0,"--badge-color":t||r?f.color:void 0,"--badge-bd":t||r?f.border:void 0,"--badge-dot-color":r==="dot"?st(t,e):void 0}}},ct=xi(e=>{const n=be("Badge",null,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,radius:f,color:c,gradient:h,leftSection:d,rightSection:p,children:v,variant:b,fullWidth:w,autoContrast:k,circle:_,mod:C,attributes:x,...E}=n,O=Ze({name:"Badge",props:n,classes:OI,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:x,vars:l,varsResolver:jI});return y.jsxs(ge,{variant:b,mod:[{block:w,circle:_,"with-right-section":!!p,"with-left-section":!!d},C],...O("root",{variant:b}),...E,children:[d&&y.jsx("span",{...O("section"),"data-position":"left",children:d}),y.jsx("span",{...O("label"),children:v}),p&&y.jsx("span",{...O("section"),"data-position":"right",children:p})]})});ct.classes=OI;ct.varsResolver=jI;ct.displayName="@mantine/core/Badge";var $c={root:"m_77c9d27d",inner:"m_80f1301b",label:"m_811560b9",section:"m_a74036a",loader:"m_a25b86ee",group:"m_80d6d844",groupSection:"m_70be2a01"};const i5={orientation:"horizontal"},EI=(e,{borderWidth:n})=>({group:{"--button-border-width":me(n)}}),Ey=Re(e=>{const n=be("ButtonGroup",i5,e),{className:t,style:i,classNames:r,styles:a,unstyled:o,orientation:l,vars:f,borderWidth:c,mod:h,attributes:d,...p}=be("ButtonGroup",i5,e);return y.jsx(ge,{...Ze({name:"ButtonGroup",props:n,classes:$c,className:t,style:i,classNames:r,styles:a,unstyled:o,attributes:d,vars:f,varsResolver:EI,rootSelector:"group"})("group"),mod:[{"data-orientation":l},h],role:"group",...p})});Ey.classes=$c;Ey.varsResolver=EI;Ey.displayName="@mantine/core/ButtonGroup";const TI=(e,{radius:n,color:t,gradient:i,variant:r,autoContrast:a,size:o})=>{const l=e.variantColorResolver({color:t||e.primaryColor,theme:e,gradient:i,variant:r||"filled",autoContrast:a});return{groupSection:{"--section-height":Pn(o,"section-height"),"--section-padding-x":Pn(o,"section-padding-x"),"--section-fz":o!=null&&o.includes("compact")?ti(o.replace("compact-","")):ti(o),"--section-radius":n===void 0?void 0:Kt(n),"--section-bg":t||r?l.background:void 0,"--section-color":l.color,"--section-bd":t||r?l.border:void 0}}},Ty=Re(e=>{const n=be("ButtonGroupSection",null,e),{className:t,style:i,classNames:r,styles:a,unstyled:o,vars:l,gradient:f,radius:c,autoContrast:h,attributes:d,...p}=n;return y.jsx(ge,{...Ze({name:"ButtonGroupSection",props:n,classes:$c,className:t,style:i,classNames:r,styles:a,unstyled:o,attributes:d,vars:l,varsResolver:TI,rootSelector:"groupSection"})("groupSection"),...p})});Ty.classes=$c;Ty.varsResolver=TI;Ty.displayName="@mantine/core/ButtonGroupSection";const Mee={in:{opacity:1,transform:`translate(-50%, calc(-50% + ${me(1)}))`},out:{opacity:0,transform:"translate(-50%, -200%)"},common:{transformOrigin:"center"},transitionProperty:"transform, opacity"},MI=(e,{radius:n,color:t,gradient:i,variant:r,size:a,justify:o,autoContrast:l})=>{const f=e.variantColorResolver({color:t||e.primaryColor,theme:e,gradient:i,variant:r||"filled",autoContrast:l});return{root:{"--button-justify":o,"--button-height":Pn(a,"button-height"),"--button-padding-x":Pn(a,"button-padding-x"),"--button-fz":a!=null&&a.includes("compact")?ti(a.replace("compact-","")):ti(a),"--button-radius":n===void 0?void 0:Kt(n),"--button-bg":t||r?f.background:void 0,"--button-hover":t||r?f.hover:void 0,"--button-color":f.color,"--button-bd":t||r?f.border:void 0,"--button-hover-color":t||r?f.hoverColor:void 0}}},zt=xi(e=>{const n=be("Button",null,e),{style:t,vars:i,className:r,color:a,disabled:o,children:l,leftSection:f,rightSection:c,fullWidth:h,variant:d,radius:p,loading:v,loaderProps:b,gradient:w,classNames:k,styles:_,unstyled:C,"data-disabled":x,autoContrast:E,mod:O,attributes:j,...M}=n,P=Ze({name:"Button",props:n,classes:$c,className:r,style:t,classNames:k,styles:_,unstyled:C,attributes:j,vars:i,varsResolver:MI}),F=!!f,R=!!c;return y.jsxs(Tt,{...P("root",{active:!o&&!v&&!x}),unstyled:C,variant:d,disabled:o||v,mod:[{disabled:o||x,loading:v,block:h,"with-left-section":F,"with-right-section":R},O],...M,children:[typeof v=="boolean"&&y.jsx(is,{mounted:v,transition:Mee,duration:150,children:L=>y.jsx(ge,{component:"span",...P("loader",{style:L}),"aria-hidden":!0,children:y.jsx(Mi,{color:"var(--button-color)",size:"calc(var(--button-height) / 1.8)",...b})})}),y.jsxs("span",{...P("inner"),children:[f&&y.jsx(ge,{component:"span",...P("section"),mod:{position:"left"},children:f}),y.jsx(ge,{component:"span",mod:{loading:v},...P("label"),children:l}),c&&y.jsx(ge,{component:"span",...P("section"),mod:{position:"right"},children:c})]})]})});zt.classes=$c;zt.varsResolver=MI;zt.displayName="@mantine/core/Button";zt.Group=Ey;zt.GroupSection=Ty;const[Dee,Ree]=Wr("Card component was not found in tree");var kC={root:"m_e615b15f",section:"m_599a2148"};const My=xi(e=>{const{classNames:n,className:t,style:i,styles:r,vars:a,withBorder:o,inheritPadding:l,mod:f,...c}=be("CardSection",null,e),h=Ree();return y.jsx(ge,{mod:[{"with-border":o,"inherit-padding":l},f],...h.getStyles("section",{className:t,style:i,styles:r,classNames:n}),...c})});My.classes=kC;My.displayName="@mantine/core/CardSection";const DI=(e,{padding:n})=>({root:{"--card-padding":Ht(n)}}),Pee={orientation:"vertical"},$a=xi(e=>{const n=be("Card",Pee,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,children:f,padding:c,attributes:h,orientation:d,...p}=n,v=Ze({name:"Card",props:n,classes:kC,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:h,vars:l,varsResolver:DI}),b=A.Children.toArray(f),w=b.map((k,_)=>{var C;return typeof k=="object"&&k&&"type"in k&&(k.type===My||((C=k.type)==null?void 0:C.displayName)==="@mantine/core/CardSection")?A.cloneElement(k,{"data-orientation":d,"data-first-section":_===0||void 0,"data-last-section":_===b.length-1||void 0}):k});return y.jsx(Dee,{value:{getStyles:v},children:y.jsx(Lt,{unstyled:o,"data-orientation":d,...v("root"),...p,children:w})})});$a.classes=kC;$a.varsResolver=DI;$a.displayName="@mantine/core/Card";$a.Section=My;var RI={root:"m_4451eb3a"};const zc=xi(e=>{const n=be("Center",null,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,inline:f,mod:c,attributes:h,...d}=n,p=Ze({name:"Center",props:n,classes:RI,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:h,vars:l});return y.jsx(ge,{mod:[{inline:f},c],...p("root"),...d})});zc.classes=RI;zc.displayName="@mantine/core/Center";var PI={root:"m_de3d2490",colorOverlay:"m_862f3d1b",shadowOverlay:"m_98ae7f22",alphaOverlay:"m_95709ac0",childrenOverlay:"m_93e74e3"};const r5={withShadow:!0},NI=(e,{radius:n,size:t})=>({root:{"--cs-radius":n===void 0?void 0:Kt(n),"--cs-size":me(t)}}),Lc=xi(e=>{const n=be("ColorSwatch",r5,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,color:f,radius:c,withShadow:h,children:d,attributes:p,...v}=be("ColorSwatch",r5,n),b=Ze({name:"ColorSwatch",props:n,classes:PI,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:p,vars:l,varsResolver:NI});return y.jsxs(ge,{...b("root",{focusable:!0}),...v,children:[y.jsx("span",{...b("alphaOverlay")}),h&&y.jsx("span",{...b("shadowOverlay")}),y.jsx("span",{...b("colorOverlay",{style:{backgroundColor:f}})}),y.jsx("span",{...b("childrenOverlay"),children:d})]})});Lc.classes=PI;Lc.varsResolver=NI;Lc.displayName="@mantine/core/ColorSwatch";function ha(e,n=0,t=10**n){return Math.round(t*e)/t}function Nee({h:e,s:n,l:t,a:i}){const r=n*((t<50?t:100-t)/100);return{h:e,s:r>0?2*r/(t+r)*100:0,v:t+r,a:i}}const $ee={grad:360/400,turn:360,rad:360/(Math.PI*2)};function zee(e,n="deg"){return Number(e)*($ee[n]||1)}const Lee=/hsla?\(?\s*(-?\d*\.?\d+)(deg|rad|grad|turn)?[,\s]+(-?\d*\.?\d+)%?[,\s]+(-?\d*\.?\d+)%?,?\s*[/\s]*(-?\d*\.?\d+)?(%)?\s*\)?/i;function a5(e){const n=Lee.exec(e);return n?Nee({h:zee(n[1],n[2]),s:Number(n[3]),l:Number(n[4]),a:n[5]===void 0?1:Number(n[5])/(n[6]?100:1)}):{h:0,s:0,v:0,a:1}}function kS({r:e,g:n,b:t,a:i}){const r=Math.max(e,n,t),a=r-Math.min(e,n,t),o=a?r===e?(n-t)/a:r===n?2+(t-e)/a:4+(e-n)/a:0;return{h:ha(60*(o<0?o+6:o),3),s:ha(r?a/r*100:0,3),v:ha(r/255*100,3),a:i}}function _S(e){const n=e[0]==="#"?e.slice(1):e;return n.length===3?kS({r:parseInt(n[0]+n[0],16),g:parseInt(n[1]+n[1],16),b:parseInt(n[2]+n[2],16),a:1}):kS({r:parseInt(n.slice(0,2),16),g:parseInt(n.slice(2,4),16),b:parseInt(n.slice(4,6),16),a:1})}function Iee(e){const n=e[0]==="#"?e.slice(1):e,t=a=>ha(parseInt(a,16)/255,3);if(n.length===4){const a=n.slice(0,3),o=t(n[3]+n[3]);return{..._S(a),a:o}}const i=n.slice(0,6),r=t(n.slice(6,8));return{..._S(i),a:r}}const Bee=/rgba?\(?\s*(-?\d*\.?\d+)(%)?[,\s]+(-?\d*\.?\d+)(%)?[,\s]+(-?\d*\.?\d+)(%)?,?\s*[/\s]*(-?\d*\.?\d+)?(%)?\s*\)?/i;function o5(e){const n=Bee.exec(e);return n?kS({r:Number(n[1])/(n[2]?100/255:1),g:Number(n[3])/(n[4]?100/255:1),b:Number(n[5])/(n[6]?100/255:1),a:n[7]===void 0?1:Number(n[7])/(n[8]?100:1)}):{h:0,s:0,v:0,a:1}}const $I={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},Fee={hex:_S,hexa:Iee,rgb:o5,rgba:o5,hsl:a5,hsla:a5};function qee(e){for(const[,n]of Object.entries($I))if(n.test(e))return!0;return!1}function $v(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 n=e.trim();for(const[t,i]of Object.entries($I))if(i.test(n))return Fee[t](n);return{h:0,s:0,v:0,a:1}}const Dy=A.createContext(null);function _C({position:e,...n}){return y.jsx(ge,{__vars:{"--thumb-y-offset":`${e.y*100}%`,"--thumb-x-offset":`${e.x*100}%`},...n})}_C.displayName="@mantine/core/ColorPickerThumb";var Ry={wrapper:"m_fee9c77",preview:"m_9dddfbac",body:"m_bffecc3e",sliders:"m_3283bb96",thumb:"m_40d572ba",swatch:"m_d8ee6fd8",swatches:"m_5711e686",saturation:"m_202a296e",saturationOverlay:"m_11b3db02",slider:"m_d856d47d",sliderOverlay:"m_8f327113"};const Ic=Re(e=>{var q;const n=be("ColorSlider",null,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,onChange:f,onChangeEnd:c,maxValue:h,round:d,size:p="md",focusable:v=!0,value:b,overlays:w,thumbColor:k="transparent",onScrubStart:_,onScrubEnd:C,__staticSelector:x="ColorPicker",attributes:E,ref:O,...j}=n,M=Ze({name:x,classes:Ry,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:E,rootSelector:"slider"}),P=((q=A.use(Dy))==null?void 0:q.getStyles)||M,F=li(),[R,L]=A.useState({y:0,x:b/h}),B=A.useRef(R),G=Y=>d?Math.round(Y*h):Y*h,{ref:U}=cz(({x:Y,y:D})=>{B.current={x:Y,y:D},f==null||f(G(Y))},{onScrubEnd:()=>{const{x:Y}=B.current;c==null||c(G(Y)),C==null||C()},onScrubStart:_});ns(()=>{L({y:0,x:b/h})},[b]);const H=(Y,D)=>{Y.preventDefault();const V=fz(D);f==null||f(G(V.x)),c==null||c(G(V.x))},N=Y=>{switch(Y.key){case"ArrowRight":H(Y,{x:R.x+.05,y:R.y});break;case"ArrowLeft":H(Y,{x:R.x-.05,y:R.y});break}},z=w.map((Y,D)=>A.createElement("div",{...P("sliderOverlay"),style:Y,key:D}));return y.jsxs(ge,{...j,ref:Wt(U,O),...P("slider"),size:p,role:"slider","aria-valuenow":b,"aria-valuemax":h,"aria-valuemin":0,tabIndex:v?0:-1,onKeyDown:N,"data-focus-ring":F.focusRing,__vars:{"--cp-thumb-size":`var(--cp-thumb-size-${p})`},children:[z,y.jsx(_C,{position:R,...P("thumb",{style:{top:me(1),background:k}})})]})});Ic.displayName="@mantine/core/ColorSlider";Ic.classes=Ry;const Hee={__staticSelector:"AlphaSlider"},xC=Re(e=>{const{value:n,onChange:t,onChangeEnd:i,color:r,...a}=be("AlphaSlider",Hee,e);return y.jsx(Ic,{...a,value:n,onChange:o=>t==null?void 0:t(ha(o,2)),onChangeEnd:o=>i==null?void 0:i(ha(o,2)),maxValue:1,round:!1,"data-alpha":!0,overlays:[{backgroundImage:"linear-gradient(45deg, var(--slider-checkers) 25%, transparent 25%), linear-gradient(-45deg, var(--slider-checkers) 25%, transparent 25%), linear-gradient(45deg, transparent 75%, var(--slider-checkers) 75%), linear-gradient(-45deg, var(--mantine-color-body) 75%, var(--slider-checkers) 75%)",backgroundSize:`${me(8)} ${me(8)}`,backgroundPosition:`0 0, 0 ${me(4)}, ${me(4)} ${me(-4)}, ${me(-4)} 0`},{backgroundImage:`linear-gradient(90deg, transparent, ${r})`},{boxShadow:`rgba(0, 0, 0, .1) 0 0 0 ${me(1)} inset, rgb(0, 0, 0, .15) 0 0 ${me(4)} inset`}]})});xC.displayName="@mantine/core/AlphaSlider";xC.classes=Ic.classes;function zI({h:e,s:n,v:t,a:i}){const r=e/360*6,a=n/100,o=t/100,l=Math.floor(r),f=o*(1-a),c=o*(1-(r-l)*a),h=o*(1-(1-r+l)*a),d=l%6;return{r:ha([o,c,f,f,h,o][d]*255),g:ha([h,o,o,c,f,f][d]*255),b:ha([f,f,h,o,o,c][d]*255),a:ha(i,2)}}function s5(e,n){const{r:t,g:i,b:r,a}=zI(e);return n?`rgba(${t}, ${i}, ${r}, ${ha(a,2)})`:`rgb(${t}, ${i}, ${r})`}function l5({h:e,s:n,v:t,a:i},r){const a=(200-n)*t/100,o={h:Math.round(e),s:Math.round(a>0&&a<200?n*t/100/(a<=100?a:200-a)*100:0),l:Math.round(a/2)};return r?`hsla(${o.h}, ${o.s}%, ${o.l}%, ${ha(i,2)})`:`hsl(${o.h}, ${o.s}%, ${o.l}%)`}function pg(e){const n=e.toString(16);return n.length<2?`0${n}`:n}function LI(e){const{r:n,g:t,b:i}=zI(e);return`#${pg(n)}${pg(t)}${pg(i)}`}function Uee(e){const n=Math.round(e.a*255);return`${LI(e)}${pg(n)}`}const kk={hex:LI,hexa:e=>Uee(e),rgb:e=>s5(e,!1),rgba:e=>s5(e,!0),hsl:e=>l5(e,!1),hsla:e=>l5(e,!0)};function Us(e,n){return n?e in kk?kk[e](n):kk.hex(n):"#000000"}const Vee={__staticSelector:"HueSlider"},SC=Re(e=>{const{value:n,onChange:t,onChangeEnd:i,color:r,...a}=be("HueSlider",Vee,e);return y.jsx(Ic,{...a,value:n,onChange:t,onChangeEnd:i,maxValue:360,thumbColor:`hsl(${n}, 100%, 50%)`,round:!0,"data-hue":!0,overlays:[{backgroundImage:"linear-gradient(to right,hsl(0,100%,50%),hsl(60,100%,50%),hsl(120,100%,50%),hsl(170,100%,50%),hsl(240,100%,50%),hsl(300,100%,50%),hsl(360,100%,50%))"},{boxShadow:`rgba(0, 0, 0, .1) 0 0 0 ${me(1)} inset, rgb(0, 0, 0, .15) 0 0 ${me(4)} inset`}]})});SC.displayName="@mantine/core/HueSlider";SC.classes=Ic.classes;function II({className:e,onChange:n,onChangeEnd:t,value:i,saturationLabel:r,focusable:a=!0,size:o,color:l,onScrubStart:f,onScrubEnd:c,...h}){const{getStyles:d}=A.use(Dy),[p,v]=A.useState({x:i.s/100,y:1-i.v/100}),b=A.useRef(p),{ref:w}=cz(({x:C,y:x})=>{b.current={x:C,y:x},n({s:Math.round(C*100),v:Math.round((1-x)*100)})},{onScrubEnd:()=>{const{x:C,y:x}=b.current;t({s:Math.round(C*100),v:Math.round((1-x)*100)}),c==null||c()},onScrubStart:f});A.useEffect(()=>{v({x:i.s/100,y:1-i.v/100})},[i.s,i.v]);const k=(C,x)=>{C.preventDefault();const E=fz(x);n({s:Math.round(E.x*100),v:Math.round((1-E.y)*100)}),t({s:Math.round(E.x*100),v:Math.round((1-E.y)*100)})},_=C=>{switch(C.key){case"ArrowUp":k(C,{y:p.y-.05,x:p.x});break;case"ArrowDown":k(C,{y:p.y+.05,x:p.x});break;case"ArrowRight":k(C,{x:p.x+.05,y:p.y});break;case"ArrowLeft":k(C,{x:p.x-.05,y:p.y});break}};return y.jsxs(ge,{...d("saturation"),ref:w,...h,role:"slider","aria-label":r,"aria-valuenow":p.x,"aria-valuetext":Us("rgba",i),tabIndex:a?0:-1,onKeyDown:_,children:[y.jsx("div",{...d("saturationOverlay",{style:{backgroundColor:`hsl(${i.h}, 100%, 50%)`}})}),y.jsx("div",{...d("saturationOverlay",{style:{backgroundImage:"linear-gradient(90deg, #fff, transparent)"}})}),y.jsx("div",{...d("saturationOverlay",{style:{backgroundImage:"linear-gradient(0deg, #000, transparent)"}})}),y.jsx(_C,{position:p,...d("thumb",{style:{backgroundColor:l}})})]})}II.displayName="@mantine/core/Saturation";function BI({className:e,datatype:n,setValue:t,onChangeEnd:i,size:r,focusable:a,data:o,swatchesPerRow:l,value:f,...c}){const h=A.use(Dy),d=o.map((p,v)=>A.createElement(Lc,{...h.getStyles("swatch"),unstyled:h.unstyled,component:"button",type:"button",color:p,key:v,radius:"sm",onClick:()=>{t(p),i==null||i(p)},"aria-label":p,tabIndex:a?0:-1,"data-swatch":!0},f===p&&y.jsx(wC,{size:"35%",color:pz(p)<.5?"white":"black"})));return y.jsx(ge,{...h.getStyles("swatches"),...c,children:d})}BI.displayName="@mantine/core/Swatches";const Wee={swatchesPerRow:7,withPicker:!0,focusable:!0,size:"md",__staticSelector:"ColorPicker"},FI=(e,{size:n,swatchesPerRow:t})=>({wrapper:{"--cp-preview-size":Pn(n,"cp-preview-size"),"--cp-width":Pn(n,"cp-width"),"--cp-body-spacing":Ht(n),"--cp-swatch-size":`${100/t}%`,"--cp-thumb-size":Pn(n,"cp-thumb-size"),"--cp-saturation-height":Pn(n,"cp-saturation-height")}}),Py=Re(e=>{const n=be("ColorPicker",Wee,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,format:f="hex",value:c,defaultValue:h,onChange:d,onChangeEnd:p,withPicker:v,size:b,saturationLabel:w,hueLabel:k,alphaLabel:_,focusable:C,swatches:x,swatchesPerRow:E,fullWidth:O,onColorSwatchClick:j,__staticSelector:M,mod:P,attributes:F,name:R,hiddenInputProps:L,...B}=n,G=Ze({name:M,props:n,classes:Ry,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:F,rootSelector:"wrapper",vars:l,varsResolver:FI}),U=A.useRef(f||"hex"),H=A.useRef(""),N=A.useRef(-1),z=A.useRef(!1),q=f==="hexa"||f==="rgba"||f==="hsla",[Y,D,V]=Ti({value:c,defaultValue:h,finalValue:"#FFFFFF",onChange:d}),[W,$]=A.useState($v(Y)),X=()=>{window.clearTimeout(N.current),z.current=!0},ee=()=>{window.clearTimeout(N.current),N.current=window.setTimeout(()=>{z.current=!1},200)},re=se=>{$(ye=>{const ae={...ye,...se};return H.current=Us(U.current,ae),ae}),D(H.current)};return ns(()=>{typeof c=="string"&&qee(c)&&!z.current&&$($v(c))},[c]),ns(()=>{U.current=f||"hex",D(Us(U.current,W))},[f]),y.jsx(Dy,{value:{getStyles:G,unstyled:o},children:y.jsxs(ge,{...G("wrapper"),size:b,mod:[{"full-width":O},P],...B,children:[R&&y.jsx("input",{type:"hidden",name:R,value:Y,...L}),v&&y.jsxs(y.Fragment,{children:[y.jsx(II,{value:W,onChange:re,onChangeEnd:({s:se,v:ye})=>p==null?void 0:p(Us(U.current,{...W,s:se,v:ye})),color:Y,size:b,focusable:C,saturationLabel:w,onScrubStart:X,onScrubEnd:ee}),y.jsxs("div",{...G("body"),children:[y.jsxs("div",{...G("sliders"),children:[y.jsx(SC,{value:W.h,onChange:se=>re({h:se}),onChangeEnd:se=>p==null?void 0:p(Us(U.current,{...W,h:se})),size:b,focusable:C,"aria-label":k,onScrubStart:X,onScrubEnd:ee}),q&&y.jsx(xC,{value:W.a,onChange:se=>re({a:se}),onChangeEnd:se=>{p==null||p(Us(U.current,{...W,a:se}))},size:b,color:Us("hex",W),focusable:C,"aria-label":_,onScrubStart:X,onScrubEnd:ee})]}),q&&y.jsx(Lc,{color:Y,radius:"sm",size:"var(--cp-preview-size)",...G("preview")})]})]}),Array.isArray(x)&&y.jsx(BI,{data:x,swatchesPerRow:E,focusable:C,setValue:D,value:Y,onChangeEnd:se=>{const ye=Us(f,$v(se));j==null||j(ye),p==null||p(ye),V||$($v(se))}})]})})});Py.classes=Ry;Py.varsResolver=FI;Py.displayName="@mantine/core/ColorPicker";var qI={root:"m_3eebeb36",label:"m_9e365f20"};const Gee={orientation:"horizontal"},HI=(e,{color:n,variant:t,size:i})=>({root:{"--divider-color":n?st(n,e):void 0,"--divider-border-style":t,"--divider-size":Pn(i,"divider-size")}}),Bc=Re(e=>{const n=be("Divider",Gee,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,color:f,orientation:c,label:h,labelPosition:d,mod:p,attributes:v,...b}=n,w=Ze({name:"Divider",classes:qI,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:v,vars:l,varsResolver:HI});return y.jsx(ge,{mod:[{orientation:c,withLabel:!!h},p],role:"separator",...w("root"),...b,children:h&&y.jsx(ge,{component:"span",mod:{position:d},...w("label"),children:h})})});Bc.classes=qI;Bc.varsResolver=HI;Bc.displayName="@mantine/core/Divider";const[u5,UI]=Wr("Grid component was not found in tree"),xS=(e,n)=>{if(e==="content")return"auto";if(e==="auto")return"0rem";if(e)return e===n?"100%":`calc(${100*e/n}% - ${(n-e)/n} * var(--grid-column-gap))`},f5=(e,n,t)=>t||e==="auto"?"100%":e==="content"?"unset":xS(e,n),c5=(e,n)=>{if(e)return e==="auto"||n?"1":"auto"},d5=(e,n)=>{if(e===0)return"0";if(e)return`calc(${100*e/n}% + ${e/n} * var(--grid-column-gap))`};function Yee({span:e,order:n,offset:t,align:i,selector:r}){var v;const a=li(),o=UI(),l=o.breakpoints||a.breakpoints,f=Ur(e),c=f===void 0?12:f,h=ju({"--col-order":(v=Ur(n))==null?void 0:v.toString(),"--col-flex-grow":c5(c,o.grow),"--col-flex-basis":xS(c,o.columns),"--col-width":c==="content"?"auto":void 0,"--col-max-width":f5(c,o.columns,o.grow),"--col-offset":d5(Ur(t),o.columns),"--col-align-self":Ur(i)}),d=Dt(l).reduce((b,w)=>{var k;return b[w]||(b[w]={}),typeof n=="object"&&n[w]!==void 0&&(b[w]["--col-order"]=(k=n[w])==null?void 0:k.toString()),typeof e=="object"&&e[w]!==void 0&&(b[w]["--col-flex-grow"]=c5(e[w],o.grow),b[w]["--col-flex-basis"]=xS(e[w],o.columns),b[w]["--col-width"]=e[w]==="content"?"auto":void 0,b[w]["--col-max-width"]=f5(e[w],o.columns,o.grow)),typeof t=="object"&&t[w]!==void 0&&(b[w]["--col-offset"]=d5(t[w],o.columns)),typeof i=="object"&&i[w]!==void 0&&(b[w]["--col-align-self"]=i[w]),b},{}),p=Hh(Dt(d),l).filter(b=>Dt(d[b.value]).length>0).map(b=>({query:o.type==="container"?`mantine-grid (min-width: ${l[b.value]})`:`(min-width: ${l[b.value]})`,styles:d[b.value]}));return y.jsx(Mc,{styles:h,media:o.type==="container"?void 0:p,container:o.type==="container"?p:void 0,selector:r})}var CC={container:"m_8478a6da",root:"m_410352e9",inner:"m_dee7bd2f",col:"m_96bdd299"};const Kee={span:12},AC=Re(e=>{const{classNames:n,className:t,style:i,styles:r,vars:a,span:o,order:l,offset:f,align:c,...h}=be("GridCol",Kee,e),d=UI(),p=ay();return y.jsxs(y.Fragment,{children:[y.jsx(Yee,{selector:`.${p}`,span:o,order:l,offset:f,align:c}),y.jsx(ge,{...d.getStyles("col",{className:dn(t,p),style:i,classNames:n,styles:r}),...h})]})});AC.classes=CC;AC.displayName="@mantine/core/GridCol";function h5({gap:e,rowGap:n,columnGap:t,selector:i,breakpoints:r,type:a}){const o=li(),l=r||o.breakpoints,f=ju({"--grid-gap":Ht(Ur(e)),"--grid-row-gap":Ht(Ur(n)),"--grid-column-gap":Ht(Ur(t))}),c=Dt(l).reduce((d,p)=>(d[p]||(d[p]={}),typeof e=="object"&&e[p]!==void 0&&(d[p]["--grid-gap"]=Ht(e[p])),typeof n=="object"&&n[p]!==void 0&&(d[p]["--grid-row-gap"]=Ht(n[p])),typeof t=="object"&&t[p]!==void 0&&(d[p]["--grid-column-gap"]=Ht(t[p])),d),{}),h=Hh(Dt(c),l).filter(d=>Dt(c[d.value]).length>0).map(d=>({query:a==="container"?`mantine-grid (min-width: ${l[d.value]})`:`(min-width: ${l[d.value]})`,styles:c[d.value]}));return y.jsx(Mc,{styles:f,media:a==="container"?void 0:h,container:a==="container"?h:void 0,selector:i})}const Xee={gap:"md",columns:12},VI=(e,{justify:n,align:t,overflow:i})=>({root:{"--grid-justify":n,"--grid-align":t,"--grid-overflow":i}}),Fr=Re(e=>{const n=be("Grid",Xee,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,grow:f,gap:c,rowGap:h,columnGap:d,columns:p,align:v,justify:b,children:w,breakpoints:k,type:_,attributes:C,...x}=n,E=Ze({name:"Grid",classes:CC,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:C,vars:l,varsResolver:VI}),O=ay();return _==="container"&&k?y.jsxs(u5,{value:{getStyles:E,grow:f,columns:p,breakpoints:k,type:_},children:[y.jsx(h5,{selector:`.${O}`,...n}),y.jsx("div",{...E("container"),children:y.jsx(ge,{...E("root",{className:O}),...x,children:y.jsx("div",{...E("inner"),children:w})})})]}):y.jsxs(u5,{value:{getStyles:E,grow:f,columns:p,breakpoints:k,type:_},children:[y.jsx(h5,{selector:`.${O}`,...n}),y.jsx(ge,{...E("root",{className:O}),...x,children:y.jsx("div",{...E("inner"),children:w})})]})});Fr.classes=CC;Fr.varsResolver=VI;Fr.displayName="@mantine/core/Grid";Fr.Col=AC;const Zee=["borderBottomWidth","borderLeftWidth","borderRightWidth","borderTopWidth","boxSizing","fontFamily","fontSize","fontStyle","fontWeight","letterSpacing","lineHeight","paddingBottom","paddingLeft","paddingRight","paddingTop","tabSize","textIndent","textRendering","textTransform","width","wordBreak","wordSpacing","scrollbarGutter"],m5={"min-height":"0","max-height":"none",height:"0",visibility:"hidden",overflow:"hidden",position:"absolute","z-index":"-1000",top:"0",right:"0",display:"block"};function p5(e){Object.keys(m5).forEach(n=>{e.style.setProperty(n,m5[n],"important")})}function Qee(e){const n=window.getComputedStyle(e);if(n===null)return null;const t={};for(const i of Zee)t[i]=n[i];return t.boxSizing===""?null:{sizingStyle:t,paddingSize:parseFloat(t.paddingBottom)+parseFloat(t.paddingTop),borderSize:parseFloat(t.borderBottomWidth)+parseFloat(t.borderTopWidth)}}let Oi=null;function Jee(e,n,t=1,i=1/0){Oi||(Oi=document.createElement("textarea"),Oi.setAttribute("tabindex","-1"),Oi.setAttribute("aria-hidden","true"),Oi.setAttribute("aria-label","autosize measurement"),p5(Oi)),Oi.parentNode===null&&document.body.appendChild(Oi);const{paddingSize:r,borderSize:a,sizingStyle:o}=e,{boxSizing:l}=o;Object.keys(o).forEach(p=>{Oi.style[p]=o[p]}),p5(Oi),Oi.value=n;let f=l==="border-box"?Oi.scrollHeight+a:Oi.scrollHeight-r;Oi.value=n,f=l==="border-box"?Oi.scrollHeight+a:Oi.scrollHeight-r,Oi.value="x";const c=Oi.scrollHeight-r;let h=c*t;l==="border-box"&&(h=h+r+a),f=Math.max(h,f);let d=c*i;return l==="border-box"&&(d=d+r+a),f=Math.min(d,f),[f,c]}function ene({maxRows:e,minRows:n,onChange:t,ref:i,...r}){const a=r.value!==void 0,o=A.useRef(null),l=Wt(o,i),f=A.useRef(0),c=()=>{const d=o.current;if(!d)return;const p=Qee(d);if(!p)return;const[v]=Jee(p,d.value||d.placeholder||"x",n,e);f.current!==v&&(f.current=v,d.style.setProperty("height",`${v}px`,"important"))},h=d=>{a||c(),t==null||t(d)};return A.useLayoutEffect(c),A.useEffect(()=>{const d=()=>c();return window.addEventListener("resize",d),()=>window.removeEventListener("resize",d)},[]),A.useEffect(()=>{const d=()=>c();return document.fonts.addEventListener("loadingdone",d),()=>document.fonts.removeEventListener("loadingdone",d)},[]),A.useEffect(()=>{const d=p=>{var v;if(((v=o.current)==null?void 0:v.form)===p.target&&!a){const b=o.current.value;requestAnimationFrame(()=>{o.current&&b!==o.current.value&&c()})}};return document.body.addEventListener("reset",d),()=>document.body.removeEventListener("reset",d)},[a]),y.jsx("textarea",{...r,onChange:h,ref:l})}const nne={size:"sm"},Qf=Re(e=>{const{autosize:n,maxRows:t,minRows:i,__staticSelector:r,resize:a,...o}=be("Textarea",nne,e),l=n&&jK()!=="test",f=l?{maxRows:t,minRows:i}:{};return y.jsx(Ui,{component:l?ene:"textarea",...o,__staticSelector:r||"Textarea",multiline:!0,"data-no-overflow":n&&t===void 0||void 0,__vars:{"--input-resize":a},...f})});Qf.classes=Ui.classes;Qf.displayName="@mantine/core/Textarea";const[tne,pl]=Wr("Menu component was not found in the tree");var vl={dropdown:"m_dc9b7c9f",label:"m_9bfac126",divider:"m_efdf90cb",item:"m_99ac2aa1",itemLabel:"m_5476e0d3",itemSection:"m_8b75e504",chevron:"m_b85b0bed"};const OC=Re(e=>{const{classNames:n,className:t,style:i,styles:r,vars:a,...o}=be("MenuDivider",null,e);return y.jsx(ge,{...pl().getStyles("divider",{className:t,style:i,styles:r,classNames:n}),...o})});OC.classes=vl;OC.displayName="@mantine/core/MenuDivider";const jC=Re(e=>{const{classNames:n,className:t,style:i,styles:r,vars:a,onMouseEnter:o,onMouseLeave:l,onKeyDown:f,children:c,ref:h,...d}=be("MenuDropdown",null,e),p=A.useRef(null),v=pl(),b=kr(f,_=>{var C,x;(_.key==="ArrowUp"||_.key==="ArrowDown")&&(_.preventDefault(),(x=(C=p.current)==null?void 0:C.querySelectorAll("[data-menu-item]:not(:disabled)")[0])==null||x.focus())}),w=kr(o,()=>(v.trigger==="hover"||v.trigger==="click-hover")&&v.openDropdown()),k=kr(l,()=>(v.trigger==="hover"||v.trigger==="click-hover")&&v.closeDropdown());return y.jsxs(En.Dropdown,{...d,onMouseEnter:w,onMouseLeave:k,role:"menu","aria-orientation":"vertical",ref:Wt(h,p),...v.getStyles("dropdown",{className:t,style:i,styles:r,classNames:n,withStaticClass:!1}),tabIndex:-1,"data-menu-dropdown":!0,onKeyDown:b,children:[v.withInitialFocusPlaceholder&&y.jsx("div",{tabIndex:-1,"data-autofocus":!0,"data-mantine-stop-propagation":!0,style:{outline:0}}),c]})});jC.classes=vl;jC.displayName="@mantine/core/MenuDropdown";const Gh=A.createContext(null),EC=xi(e=>{const{classNames:n,className:t,style:i,styles:r,vars:a,color:o,closeMenuOnClick:l,leftSection:f,rightSection:c,children:h,disabled:d,"data-disabled":p,ref:v,...b}=be("MenuItem",null,e),w=pl(),k=A.use(Gh),_=li(),{dir:C}=Mu(),x=A.useRef(null),E=b,O=kr(E.onClick,()=>{p||(typeof l=="boolean"?l&&w.closeDropdownImmediately():w.closeOnItemClick&&w.closeDropdownImmediately())}),j=o?_.variantColorResolver({color:o,theme:_,variant:"light"}):void 0,M=o?fs({color:o,theme:_}):null,P=kr(E.onKeyDown,F=>{F.key==="ArrowLeft"&&k&&(k.close(),k.focusParentItem())});return y.jsxs(Tt,{onMouseDown:F=>F.preventDefault(),...b,unstyled:w.unstyled,tabIndex:w.menuItemTabIndex,...w.getStyles("item",{className:t,style:i,styles:r,classNames:n}),ref:Wt(x,v),role:"menuitem",disabled:d,"data-menu-item":!0,"data-disabled":d||p||void 0,"data-mantine-stop-propagation":!0,onClick:O,onKeyDown:T6({siblingSelector:"[data-menu-item]:not([data-disabled])",parentSelector:"[data-menu-dropdown]",activateOnFocus:!1,loop:w.loop,dir:C,orientation:"vertical",onKeyDown:P}),__vars:{"--menu-item-color":M!=null&&M.isThemeColor&&(M==null?void 0:M.shade)===void 0?`var(--mantine-color-${M.color}-6)`:j==null?void 0:j.color,"--menu-item-hover":j==null?void 0:j.hover},children:[f&&y.jsx("div",{...w.getStyles("itemSection",{styles:r,classNames:n}),"data-position":"left",children:f}),h&&y.jsx("div",{...w.getStyles("itemLabel",{styles:r,classNames:n}),children:h}),c&&y.jsx("div",{...w.getStyles("itemSection",{styles:r,classNames:n}),"data-position":"right",children:c})]})});EC.classes=vl;EC.displayName="@mantine/core/MenuItem";const TC=Re(e=>{const{classNames:n,className:t,style:i,styles:r,vars:a,...o}=be("MenuLabel",null,e);return y.jsx(ge,{...pl().getStyles("label",{className:t,style:i,styles:r,classNames:n}),...o})});TC.classes=vl;TC.displayName="@mantine/core/MenuLabel";const MC=Re(e=>{const{classNames:n,className:t,style:i,styles:r,vars:a,onMouseEnter:o,onMouseLeave:l,onKeyDown:f,children:c,ref:h,...d}=be("MenuSubDropdown",null,e),p=A.useRef(null),v=pl(),b=A.use(Gh),w=kr(o,b==null?void 0:b.open),k=kr(l,b==null?void 0:b.close);return y.jsx(En.Dropdown,{...d,onMouseEnter:w,onMouseLeave:k,role:"menu","aria-orientation":"vertical",ref:Wt(h,p),...v.getStyles("dropdown",{className:t,style:i,styles:r,classNames:n,withStaticClass:!1}),tabIndex:-1,"data-menu-dropdown":!0,children:c})});MC.classes=vl;MC.displayName="@mantine/core/MenuSubDropdown";const DC=xi(e=>{const{classNames:n,className:t,style:i,styles:r,vars:a,color:o,leftSection:l,rightSection:f,children:c,disabled:h,"data-disabled":d,closeMenuOnClick:p,ref:v,...b}=be("MenuSubItem",null,e),w=pl(),k=A.use(Gh),_=li(),{dir:C}=Mu(),x=A.useRef(null),E=b,O=o?_.variantColorResolver({color:o,theme:_,variant:"light"}):void 0,j=o?fs({color:o,theme:_}):null,M=kr(E.onKeyDown,L=>{L.key==="ArrowRight"&&(k==null||k.open(),k==null||k.focusFirstItem()),L.key==="ArrowLeft"&&(k!=null&&k.parentContext)&&(k.parentContext.close(),k.parentContext.focusParentItem())}),P=kr(E.onClick,()=>{!d&&p&&w.closeDropdownImmediately()}),F=kr(E.onMouseEnter,k==null?void 0:k.open),R=kr(E.onMouseLeave,k==null?void 0:k.close);return y.jsxs(Tt,{onMouseDown:L=>L.preventDefault(),...b,unstyled:w.unstyled,tabIndex:w.menuItemTabIndex,...w.getStyles("item",{className:t,style:i,styles:r,classNames:n}),ref:Wt(x,v),role:"menuitem",disabled:h,"data-menu-item":!0,"data-sub-menu-item":!0,"data-disabled":h||d||void 0,"data-mantine-stop-propagation":!0,onMouseEnter:F,onMouseLeave:R,onClick:P,onKeyDown:T6({siblingSelector:"[data-menu-item]:not([data-disabled])",parentSelector:"[data-menu-dropdown]",activateOnFocus:!1,loop:w.loop,dir:C,orientation:"vertical",onKeyDown:M}),__vars:{"--menu-item-color":j!=null&&j.isThemeColor&&(j==null?void 0:j.shade)===void 0?`var(--mantine-color-${j.color}-6)`:O==null?void 0:O.color,"--menu-item-hover":O==null?void 0:O.hover},children:[l&&y.jsx("div",{...w.getStyles("itemSection",{styles:r,classNames:n}),"data-position":"left",children:l}),c&&y.jsx("div",{...w.getStyles("itemLabel",{styles:r,classNames:n}),children:c}),y.jsx("div",{...w.getStyles("itemSection",{styles:r,classNames:n}),"data-position":"right",children:f||y.jsx(Pg,{...w.getStyles("chevron"),size:14})})]})});DC.classes=vl;DC.displayName="@mantine/core/MenuSubItem";function WI({children:e,refProp:n}){if(!E6(e))throw new Error("Menu.Sub.Target component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported");return pl(),y.jsx(En.Target,{refProp:n,popupType:"menu",children:e})}WI.displayName="@mantine/core/MenuSubTarget";const ine={offset:0,position:"right-start",transitionProps:{duration:0},openDelay:0,middlewares:{shift:{crossAxis:!0}}};function Fc(e){const{children:n,closeDelay:t,openDelay:i,...r}=be("MenuSub",ine,e),a=qi(),[o,{open:l,close:f}]=dz(!1),c=A.use(Gh),{openDropdown:h,closeDropdown:d}=sL({open:l,close:f,closeDelay:t,openDelay:i}),p=()=>window.setTimeout(()=>{var b,w;(w=(b=document.getElementById(`${a}-dropdown`))==null?void 0:b.querySelectorAll("[data-menu-item]:not([data-disabled])")[0])==null||w.focus()},16),v=()=>window.setTimeout(()=>{var b;(b=document.getElementById(`${a}-target`))==null||b.focus()},16);return y.jsx(Gh,{value:{opened:o,close:d,open:h,focusFirstItem:p,focusParentItem:v,parentContext:c},children:y.jsx(En,{opened:o,withinPortal:!1,withArrow:!1,id:a,...r,children:n})})}Fc.extend=e=>e;Fc.displayName="@mantine/core/MenuSub";Fc.Target=WI;Fc.Dropdown=MC;Fc.Item=DC;const rne={refProp:"ref"};function GI(e){const{children:n,refProp:t,...i}=be("MenuTarget",rne,e),r=Eu(n);if(!r)throw new Error("Menu.Target component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported");const a=pl(),o=r.props,l=kr(o.onClick,()=>{a.trigger==="click"?a.toggleDropdown():a.trigger==="click-hover"&&(a.setOpenedViaClick(!0),a.opened||a.openDropdown())}),f=kr(o.onMouseEnter,()=>(a.trigger==="hover"||a.trigger==="click-hover")&&a.openDropdown()),c=kr(o.onMouseLeave,()=>{(a.trigger==="hover"||a.trigger==="click-hover"&&!a.openedViaClick)&&a.closeDropdown()});return y.jsx(En.Target,{refProp:t,popupType:"menu",...i,children:A.cloneElement(r,{onClick:l,onMouseEnter:f,onMouseLeave:c,"data-expanded":a.opened?!0:void 0})})}GI.displayName="@mantine/core/MenuTarget";const ane={trapFocus:!0,closeOnItemClick:!0,withInitialFocusPlaceholder:!0,clickOutsideEvents:["mousedown","touchstart","keydown"],loop:!0,trigger:"click",openDelay:0,closeDelay:100,menuItemTabIndex:-1},Un=Re(e=>{const n=be("Menu",ane,e),{children:t,onOpen:i,onClose:r,opened:a,defaultOpened:o,trapFocus:l,onChange:f,closeOnItemClick:c,loop:h,closeOnEscape:d,trigger:p,openDelay:v,closeDelay:b,classNames:w,styles:k,unstyled:_,variant:C,vars:x,menuItemTabIndex:E,keepMounted:O,withInitialFocusPlaceholder:j,attributes:M,...P}=n,F=Ze({name:"Menu",classes:vl,props:n,classNames:w,styles:k,unstyled:_,attributes:M}),[R,L]=Ti({value:a,defaultValue:o,finalValue:!1,onChange:f}),[B,G]=A.useState(!1),U=()=>{L(!1),G(!1),R&&(r==null||r())},H=()=>{L(!0),!R&&(i==null||i())},N=()=>{R?U():H()},{openDropdown:z,closeDropdown:q}=sL({open:H,close:U,closeDelay:b,openDelay:v}),Y=W=>uK("[data-menu-item]","[data-menu-dropdown]",W),{resolvedClassNames:D,resolvedStyles:V}=Hi({classNames:w,styles:k,props:n});return y.jsx(tne,{value:{getStyles:F,opened:R,toggleDropdown:N,getItemIndex:Y,openedViaClick:B,setOpenedViaClick:G,closeOnItemClick:c,closeDropdown:p==="click"?U:q,openDropdown:p==="click"?H:z,closeDropdownImmediately:U,loop:h,trigger:p,unstyled:_,menuItemTabIndex:E,withInitialFocusPlaceholder:j},children:y.jsx(En,{returnFocus:!0,...P,opened:R,onChange:N,defaultOpened:o,trapFocus:O?!1:l,closeOnEscape:d,__staticSelector:"Menu",classNames:D,styles:V,unstyled:_,variant:C,keepMounted:O,children:t})})});Un.displayName="@mantine/core/Menu";Un.classes=vl;Un.Item=EC;Un.Label=TC;Un.Dropdown=jC;Un.Target=GI;Un.Divider=OC;Un.Sub=Fc;const[one,qc]=Wr("Modal component was not found in tree");var ds={root:"m_9df02822",content:"m_54c44539",inner:"m_1f958f16",header:"m_d0e2b9cd"};const Ny=Re(e=>{const{classNames:n,className:t,style:i,styles:r,vars:a,...o}=be("ModalBody",null,e);return y.jsx(zL,{...qc().getStyles("body",{classNames:n,style:i,styles:r,className:t}),...o})});Ny.classes=ds;Ny.displayName="@mantine/core/ModalBody";const $y=Re(e=>{const{classNames:n,className:t,style:i,styles:r,vars:a,...o}=be("ModalCloseButton",null,e);return y.jsx(LL,{...qc().getStyles("close",{classNames:n,style:i,styles:r,className:t}),...o})});$y.classes=ds;$y.displayName="@mantine/core/ModalCloseButton";const zy=Re(e=>{const{classNames:n,className:t,style:i,styles:r,vars:a,children:o,__hidden:l,...f}=be("ModalContent",null,e),c=qc(),h=c.scrollAreaComponent||BJ;return y.jsx(IL,{...c.getStyles("content",{className:t,style:i,styles:r,classNames:n}),innerProps:c.getStyles("inner",{className:t,style:i,styles:r,classNames:n}),"data-full-screen":c.fullScreen||void 0,"data-modal-content":!0,"data-hidden":l||void 0,...f,children:y.jsx(h,{style:{maxHeight:c.fullScreen?"100dvh":`calc(100dvh - (${me(c.yOffset)} * 2))`},children:o})})});zy.classes=ds;zy.displayName="@mantine/core/ModalContent";const Ly=Re(e=>{const{classNames:n,className:t,style:i,styles:r,vars:a,...o}=be("ModalHeader",null,e);return y.jsx(BL,{...qc().getStyles("header",{classNames:n,style:i,styles:r,className:t}),...o})});Ly.classes=ds;Ly.displayName="@mantine/core/ModalHeader";const Iy=Re(e=>{const{classNames:n,className:t,style:i,styles:r,vars:a,...o}=be("ModalOverlay",null,e);return y.jsx(FL,{...qc().getStyles("overlay",{classNames:n,style:i,styles:r,className:t}),...o})});Iy.classes=ds;Iy.displayName="@mantine/core/ModalOverlay";const sne={__staticSelector:"Modal",closeOnClickOutside:!0,withinPortal:!0,lockScroll:!0,trapFocus:!0,returnFocus:!0,closeOnEscape:!0,keepMounted:!1,zIndex:ba("modal"),transitionProps:{duration:200,transition:"fade-down"},yOffset:"5dvh"},YI=(e,{radius:n,size:t,yOffset:i,xOffset:r})=>({root:{"--modal-radius":n===void 0?void 0:Kt(n),"--modal-size":Pn(t,"modal-size"),"--modal-y-offset":me(i),"--modal-x-offset":me(r)}}),Xm=Re(e=>{const n=be("ModalRoot",sne,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,yOffset:f,scrollAreaComponent:c,radius:h,fullScreen:d,centered:p,xOffset:v,__staticSelector:b,attributes:w,...k}=n,_=Ze({name:b,classes:ds,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:w,vars:l,varsResolver:YI});return y.jsx(one,{value:{yOffset:f,scrollAreaComponent:c,getStyles:_,fullScreen:d},children:y.jsx($L,{..._("root"),"data-full-screen":d||void 0,"data-centered":p||void 0,"data-offset-scrollbars":c===_a.Autosize||void 0,unstyled:o,...k})})});Xm.classes=ds;Xm.varsResolver=YI;Xm.displayName="@mantine/core/ModalRoot";const KI=A.createContext(null);function XI({children:e}){const[n,t]=A.useState([]),[i,r]=A.useState(ba("modal"));return y.jsx(KI,{value:{stack:n,addModal:(a,o)=>{t(l=>[...new Set([...l,a])]),r(l=>typeof o=="number"&&typeof l=="number"?Math.max(l,o):l)},removeModal:a=>t(o=>o.filter(l=>l!==a)),getZIndex:a=>`calc(${i} + ${n.indexOf(a)} + 1)`,currentId:n[n.length-1],maxZIndex:i},children:e})}XI.displayName="@mantine/core/ModalStack";const By=Re(e=>{const{classNames:n,className:t,style:i,styles:r,vars:a,...o}=be("ModalTitle",null,e);return y.jsx(qL,{...qc().getStyles("title",{classNames:n,style:i,styles:r,className:t}),...o})});By.classes=ds;By.displayName="@mantine/core/ModalTitle";const lne={closeOnClickOutside:!0,withinPortal:!0,lockScroll:!0,trapFocus:!0,returnFocus:!0,closeOnEscape:!0,keepMounted:!1,zIndex:ba("modal"),transitionProps:{duration:200,transition:"fade-down"},withOverlay:!0,withCloseButton:!0},Gr=Re(e=>{const{title:n,withOverlay:t,overlayProps:i,withCloseButton:r,closeButtonProps:a,children:o,radius:l,opened:f,stackId:c,zIndex:h,...d}=be("Modal",lne,e),p=A.use(KI),v=!!n||r,b=p&&c?{closeOnEscape:p.currentId===c,trapFocus:p.currentId===c,zIndex:p.getZIndex(c)}:{},w=t===!1?!1:c&&p?p.currentId===c:f;return A.useEffect(()=>{p&&c&&(f?p.addModal(c,h||ba("modal")):p.removeModal(c))},[f,c,h]),y.jsxs(Xm,{radius:l,opened:f,zIndex:p&&c?p.getZIndex(c):h,...d,...b,children:[t&&y.jsx(Iy,{visible:w,transitionProps:p&&c?{duration:0}:void 0,...i}),y.jsxs(zy,{radius:l,__hidden:p&&c&&f?c!==p.currentId:!1,children:[v&&y.jsxs(Ly,{children:[n&&y.jsx(By,{children:n}),r&&y.jsx($y,{...a})]}),y.jsx(Ny,{children:o})]})]})});Gr.classes=ds;Gr.displayName="@mantine/core/Modal";Gr.Root=Xm;Gr.Overlay=Iy;Gr.Content=zy;Gr.Body=Ny;Gr.Header=Ly;Gr.Title=By;Gr.CloseButton=$y;Gr.Stack=XI;const Fy=A.createContext(null);var qy={root:"m_7cda1cd6","root--default":"m_44da308b","root--contrast":"m_e3a01f8",label:"m_1e0e6180",remove:"m_ae386778",group:"m_1dcfd90b"};const ZI=A.createContext(null),QI=(e,{gap:n},{size:t})=>({group:{"--pg-gap":n!==void 0?Pn(n):Pn(t,"pg-gap")}}),Hy=Re(e=>{var b;const n=be("PillGroup",null,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,size:f,disabled:c,attributes:h,...d}=n,p=((b=A.use(Fy))==null?void 0:b.size)||f||void 0,v=Ze({name:"PillGroup",classes:qy,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:h,vars:l,varsResolver:QI,stylesCtx:{size:p},rootSelector:"group"});return y.jsx(ZI,{value:{size:p,disabled:c},children:y.jsx(ge,{size:p,...v("group"),...d})})});Hy.classes=qy;Hy.varsResolver=QI;Hy.displayName="@mantine/core/PillGroup";const une={variant:"default"},JI=(e,{radius:n},{size:t})=>({root:{"--pill-fz":Pn(t,"pill-fz"),"--pill-height":Pn(t,"pill-height"),"--pill-radius":n===void 0?void 0:Kt(n)}}),cl=Re(e=>{const n=be("Pill",une,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,variant:f,children:c,withRemoveButton:h,onRemove:d,removeButtonProps:p,radius:v,size:b,disabled:w,mod:k,attributes:_,...C}=n,x=A.use(ZI),E=A.use(Fy),O=b||(x==null?void 0:x.size)||void 0,j=(E==null?void 0:E.variant)==="filled"?"contrast":f||"default",M=Ze({name:"Pill",classes:qy,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:_,vars:l,varsResolver:JI,stylesCtx:{size:O}});return y.jsxs(ge,{component:"span",variant:j,size:O,...M("root",{variant:j}),mod:[{"with-remove":h&&!w,disabled:w||(x==null?void 0:x.disabled)},k],...C,children:[y.jsx("span",{...M("label"),children:c}),h&&y.jsx(hl,{variant:"transparent",radius:v,tabIndex:-1,"aria-hidden":!0,unstyled:o,...p,...M("remove",{className:p==null?void 0:p.className,style:p==null?void 0:p.style}),onMouseDown:P=>{var F;P.preventDefault(),P.stopPropagation(),(F=p==null?void 0:p.onMouseDown)==null||F.call(p,P)},onClick:P=>{var F;P.stopPropagation(),d==null||d(),(F=p==null?void 0:p.onClick)==null||F.call(p,P)}})]})});cl.classes=qy;cl.varsResolver=JI;cl.displayName="@mantine/core/Pill";cl.Group=Hy;var eB={field:"m_45c4369d"};const fne={type:"visible"},RC=Re(e=>{const n=be("PillsInputField",fne,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,type:f,disabled:c,id:h,pointer:d,mod:p,attributes:v,ref:b,...w}=n,k=A.use(Fy),_=A.use(Du),C=Ze({name:"PillsInputField",classes:eB,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:v,rootSelector:"field"}),x=c||(k==null?void 0:k.disabled);return y.jsx(ge,{component:"input",ref:Wt(b,k==null?void 0:k.fieldRef),"data-type":f,disabled:x,mod:[{disabled:x,pointer:d},p],...C("field"),...w,id:(_==null?void 0:_.inputId)||h,"aria-invalid":k==null?void 0:k.hasError,"aria-describedby":_==null?void 0:_.describedBy,type:"text",onMouseDown:E=>!d&&E.stopPropagation()})});RC.classes=eB;RC.displayName="@mantine/core/PillsInputField";const cne={size:"sm"},bu=Re(e=>{const{children:n,onMouseDown:t,onClick:i,size:r,disabled:a,__staticSelector:o,error:l,variant:f,...c}=be("PillsInput",cne,e),h=A.useRef(null);return y.jsx(Fy,{value:{fieldRef:h,size:r,disabled:a,hasError:!!l,variant:f},children:y.jsx(Ui,{size:r,error:l,variant:f,component:"div","data-no-overflow":!0,onMouseDown:d=>{var p;d.preventDefault(),t==null||t(d),(p=h.current)==null||p.focus()},onClick:d=>{var p,v;d.preventDefault(),(p=d.currentTarget.closest("fieldset"))!=null&&p.disabled||((v=h.current)==null||v.focus(),i==null||i(d))},...c,multiline:!0,disabled:a,__staticSelector:o||"PillsInput",withAria:!1,children:n})})});bu.displayName="@mantine/core/PillsInput";bu.classes=Ui.classes;bu.Field=RC;function _k(e){return typeof e=="string"?e.trim().toLowerCase():e}function dne({data:e,value:n}){const t=n.map(_k);return e.reduce((i,r)=>(yu(r)?i.push({group:r.group,items:r.items.filter(a=>t.indexOf(_k(a.value))===-1)}):t.indexOf(_k(r.value))===-1&&i.push(r),i),[])}const v5={xs:41,sm:50,md:60,lg:72,xl:89},hne={maxValues:1/0,withCheckIcon:!0,checkIconPosition:"left",hiddenInputValuesDivider:",",clearSearchOnChange:!0,openOnFocus:!0,size:"sm"},Uy=oy(e=>{const n=be("MultiSelect",hne,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,size:f,value:c,defaultValue:h,onChange:d,onKeyDown:p,variant:v,data:b,dropdownOpened:w,defaultDropdownOpened:k,onDropdownOpen:_,onDropdownClose:C,selectFirstOptionOnChange:x,selectFirstOptionOnDropdownOpen:E,onOptionSubmit:O,comboboxProps:j,filter:M,limit:P,withScrollArea:F,maxDropdownHeight:R,searchValue:L,defaultSearchValue:B,onSearchChange:G,readOnly:U,disabled:H,onFocus:N,onBlur:z,radius:q,rightSection:Y,rightSectionWidth:D,rightSectionPointerEvents:V,rightSectionProps:W,leftSection:$,leftSectionWidth:X,leftSectionPointerEvents:ee,leftSectionProps:re,inputContainer:se,inputWrapperOrder:ye,withAsterisk:ae,labelProps:le,descriptionProps:_e,errorProps:ne,wrapperProps:ze,description:we,label:Ce,error:Ne,maxValues:ve,searchable:xe,nothingFoundMessage:Pe,withCheckIcon:ue,withAlignedLabels:Be,checkIconPosition:We,hidePickedOptions:Ue,withErrorStyles:Xe,name:Qe,form:ie,id:he,clearable:Ge,clearSectionMode:Je,clearButtonProps:Se,hiddenInputProps:tn,placeholder:cn,hiddenInputValuesDivider:On,required:mn,mod:an,renderOption:en,renderPill:Rn,onRemove:De,onClear:Fe,onMaxValues:jn,scrollAreaProps:yn,chevronColor:gn,attributes:bn,clearSearchOnChange:tt,openOnFocus:wt,loading:Le,loadingPosition:qe,...Nn}=n,ot=qi(he),Mn=ky(b),nn=Ym(Mn),rn=A.useRef({}),on=Km({opened:w,defaultOpened:k,onDropdownOpen:()=>{_==null||_(),E&&on.selectFirstOption()},onDropdownClose:()=>{C==null||C(),on.resetSelectedOption()}}),{styleProps:Bn,rest:{type:Vn,autoComplete:kt,...Cn}}=Tu(Nn),[An,Qn]=Ti({value:c,defaultValue:h,finalValue:[],onChange:d}),[Xt,Ci]=Ti({value:L,defaultValue:B,finalValue:"",onChange:G}),nr=un=>{Ci(un),on.resetSelectedOption()},Aa=Ze({name:"MultiSelect",classes:{},props:n,classNames:t,styles:a,unstyled:o,attributes:bn}),{resolvedClassNames:Ga,resolvedStyles:Oa}=Hi({props:n,styles:a,classNames:t}),Yr=un=>{p==null||p(un),un.key===" "&&!xe&&(un.preventDefault(),on.toggleDropdown()),un.key==="Backspace"&&Xt.length===0&&An.length>0&&(De==null||De(An[An.length-1]),Qn(An.slice(0,An.length-1)))},Ya=An.map((un,jr)=>{var Er;const Ka=nn[`${un}`]||rn.current[`${un}`];return Rn?y.jsx(A.Fragment,{children:Rn({option:Ka,value:un,onRemove:()=>{Qn(An.filter(Kr=>un!==Kr)),De==null||De(un)},disabled:H})},`${un}-${jr}`):y.jsx(cl,{withRemoveButton:!U&&!((Er=nn[`${un}`])!=null&&Er.disabled),onRemove:()=>{Qn(An.filter(Kr=>un!==Kr)),De==null||De(un)},unstyled:o,disabled:H,...Aa("pill"),children:(Ka==null?void 0:Ka.label)||un},`${un}-${jr}`)});A.useEffect(()=>{x&&on.selectFirstOption()},[x,Xt]),A.useEffect(()=>{An.forEach(un=>{`${un}`in nn&&(rn.current[`${un}`]=nn[`${un}`])})},[nn,An]);const Ar=y.jsx(Tn.ClearButton,{...Se,onClear:()=>{Fe==null||Fe(),Qn([]),nr("")}}),Or=dne({data:Mn,value:An}),hn=Ge&&An.length>0&&!H&&!U,ii=hn?{paddingInlineEnd:v5[f]??v5.sm}:void 0;return y.jsxs(y.Fragment,{children:[y.jsxs(Tn,{store:on,classNames:Ga,styles:Oa,unstyled:o,size:f,readOnly:U,__staticSelector:"MultiSelect",attributes:bn,onOptionSubmit:un=>{O==null||O(un),tt&&nr(""),on.updateSelectedOptionIndex("selected"),An.includes(nn[`${un}`].value)?(Qn(An.filter(jr=>jr!==nn[`${un}`].value)),De==null||De(nn[`${un}`].value)):An.lengthxe?on.openDropdown():on.toggleDropdown(),"data-expanded":on.dropdownOpened||void 0,id:ot,required:mn,mod:an,attributes:bn,children:y.jsxs(cl.Group,{attributes:bn,disabled:H,unstyled:o,...Aa("pillsList",{style:ii}),children:[Ya,y.jsx(Tn.EventsTarget,{autoComplete:kt,withExpandedAttribute:!0,children:y.jsx(bu.Field,{...Cn,id:ot,placeholder:cn,type:!xe&&!cn?"hidden":"visible",...Aa("inputField"),unstyled:o,onFocus:un=>{N==null||N(un),wt&&xe&&on.openDropdown()},onBlur:un=>{z==null||z(un),on.closeDropdown(),nr("")},onKeyDown:Yr,value:Xt,onChange:un=>{nr(un.currentTarget.value),xe&&on.openDropdown(),x&&on.selectFirstOption()},disabled:H,readOnly:U||!xe,pointer:!xe})})]})})}),y.jsx(Cy,{data:Ue?Or:Mn,hidden:U||H,filter:M,search:Xt,limit:P,hiddenWhenEmpty:!Pe,withScrollArea:F,maxDropdownHeight:R,filterOptions:xe,value:An,checkIconPosition:We,withCheckIcon:ue,withAlignedLabels:Be,nothingFoundMessage:Pe,unstyled:o,labelId:Ce?`${ot}-label`:void 0,"aria-label":Ce?void 0:Nn["aria-label"],renderOption:en,scrollAreaProps:yn})]}),y.jsx(Tn.HiddenInput,{name:Qe,valuesDivider:On,value:An,form:ie,disabled:H,...tn})]})});Uy.classes={...Ui.classes,...Tn.classes};Uy.displayName="@mantine/core/MultiSelect";var nB={root:"m_a513464",icon:"m_a4ceffb",loader:"m_b0920b15",body:"m_a49ed24",title:"m_3feedf16",description:"m_3d733a3a",closeButton:"m_919a4d88"};const mne={withCloseButton:!0},tB=(e,{radius:n,color:t})=>({root:{"--notification-radius":n===void 0?void 0:Kt(n),"--notification-color":t?st(t,e):void 0}}),Vy=Re(e=>{const n=be("Notification",mne,e),{className:t,color:i,radius:r,loading:a,withCloseButton:o,withBorder:l,title:f,icon:c,children:h,onClose:d,closeButtonProps:p,classNames:v,style:b,styles:w,unstyled:k,vars:_,mod:C,loaderProps:x,role:E,attributes:O,...j}=n,M=Ze({name:"Notification",classes:nB,props:n,className:t,style:b,classNames:v,styles:w,unstyled:k,attributes:O,vars:_,varsResolver:tB});return y.jsxs(ge,{...M("root"),mod:[{"data-with-icon":!!c||a,"data-with-border":l},C],role:E||"alert",...j,children:[c&&!a&&y.jsx("div",{...M("icon"),children:c}),a&&y.jsx(Mi,{size:28,color:i,...M("loader"),...x}),y.jsxs("div",{...M("body"),children:[f&&y.jsx("div",{...M("title"),children:f}),y.jsx(ge,{...M("description"),mod:{"data-with-title":!!f},children:h})]}),o&&y.jsx(hl,{iconSize:16,color:"gray",...p,unstyled:k,onClick:P=>{var F;(F=p==null?void 0:p.onClick)==null||F.call(p,P),d==null||d()},...M("closeButton")})]})});Vy.classes=nB;Vy.varsResolver=tB;Vy.displayName="@mantine/core/Notification";function iB(e,n){var t={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&n.indexOf(i)<0&&(t[i]=e[i]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,i=Object.getOwnPropertySymbols(e);r=l?r=r+y5("0",o-l):r=(r.substring(0,o)||"0")+"."+r.substring(o),t+r}function b5(e,n,t){if(["","-"].indexOf(e)!==-1)return e;var i=(e.indexOf(".")!==-1||t)&&n,r=PC(e),a=r.beforeDecimal,o=r.afterDecimal,l=r.hasNegation,f=parseFloat("0."+(o||"0")),c=o.length<=n?"0."+o:f.toFixed(n),h=c.split("."),d=a;a&&Number(h[0])&&(d=a.split("").reverse().reduce(function(w,k,_){return w.length>_?(Number(w[0])+Number(k)).toString()+w.substring(1,w.length):k+w},h[0]));var p=oB(h[1]||"",n,t),v=l?"-":"",b=i?".":"";return""+v+d+b+p}function au(e,n){if(e.value=e.value,e!==null){if(e.createTextRange){var t=e.createTextRange();return t.move("character",n),t.select(),!0}return e.selectionStart||e.selectionStart===0?(e.focus(),e.setSelectionRange(n,n),!0):(e.focus(),!1)}}var lB=pne(function(e,n){for(var t=0,i=0,r=e.length,a=n.length;e[t]===n[t]&&tt&&r-i>t;)i++;return{from:{start:t,end:r-i},to:{start:t,end:a-i}}}),wne=function(e,n){var t=Math.min(e.selectionStart,n);return{from:{start:t,end:e.selectionEnd},to:{start:t,end:n}}};function kne(e,n,t){return Math.min(Math.max(e,n),t)}function xk(e){return Math.max(e.selectionStart,e.selectionEnd)}function _ne(){return typeof navigator<"u"&&!(navigator.platform&&/iPhone|iPod/.test(navigator.platform))}function xne(e){return{from:{start:0,end:0},to:{start:0,end:e.length},lastValue:""}}function Sne(e){var n=e.currentValue,t=e.formattedValue,i=e.currentValueIndex,r=e.formattedValueIndex;return n[i]===t[r]}function Cne(e,n,t,i,r,a,o){o===void 0&&(o=Sne);var l=r.findIndex(function(E){return E}),f=e.slice(0,l);!n&&!t.startsWith(f)&&(n=f,t=f+t,i=i+f.length);for(var c=t.length,h=e.length,d={},p=new Array(c),v=0;v0&&p[_]===-1;)_--;var x=_===-1||p[_]===-1?0:p[_]+1;return x>C?C:i-x=0&&!t[n];)n--;n===-1&&(n=t.indexOf(!0))}else{for(;n<=r&&!t[n];)n++;n>r&&(n=t.lastIndexOf(!0))}return n===-1&&(n=r),n}function Ane(e){for(var n=Array.from({length:e.length+1}).map(function(){return!0}),t=0,i=n.length;tM.length-o.length||jL||d>e.length-o.length)&&(R=d),e=e.substring(0,R),e=Tne(x?"-"+e:e,r),e=(e.match(Mne(b))||[]).join("");var B=e.indexOf(b);e=e.replace(new RegExp(aB(b),"g"),function(z,q){return q===B?".":""});var G=PC(e,r),U=G.beforeDecimal,H=G.afterDecimal,N=G.addNegation;return c.end-c.startV?!1:D>=ee.start&&Dt?t:e}function Bne(e){return e.toString().replace(".","").length}function Fne(e,n){return(typeof e=="number"?e=n)&&(t===void 0||e<=t)}const Ok={size:"sm",step:1,clampBehavior:"blur",allowDecimal:!0,allowNegative:!0,withKeyboardEvents:!0,allowLeadingZeros:!0,trimLeadingZeroesOnBlur:!0,startValue:0,allowedDecimalSeparators:[".",","]},dB=(e,{size:n})=>({controls:{"--ni-chevron-size":Pn(n,"ni-chevron-size")}});function Hne(e,n,t){const i=e.toString(),r=fB.test(i),a=i.replace(/^0+(?=\d)/,""),o=parseFloat(a);if(Number.isNaN(o))return a;if(o>Number.MAX_SAFE_INTEGER)return n!==void 0?n:a;const l=Yo(o,t,n);return r?`${l.toString().replace(/^0+(?=\d)/,"")}.`:l}function Une(e,n){if(e===""||e==="-")return e;const t=bh(e);return t===null?e:n.clampBehavior==="blur"?vg(t,n.min,n.max):t}const Kh=oy(e=>{const n=be("NumberInput",Ok,e),{className:t,classNames:i,styles:r,unstyled:a,vars:o,onChange:l,onValueChange:f,value:c,defaultValue:h,max:d,min:p,step:v,hideControls:b,rightSection:w,isAllowed:k,clampBehavior:_,onBlur:C,allowDecimal:x,decimalScale:E,onKeyDown:O,onKeyDownCapture:j,handlersRef:M,startValue:P,disabled:F,rightSectionPointerEvents:R,allowNegative:L,readOnly:B,size:G,rightSectionWidth:U,stepHoldInterval:H,stepHoldDelay:N,allowLeadingZeros:z,withKeyboardEvents:q,trimLeadingZeroesOnBlur:Y,allowedDecimalSeparators:D,selectAllOnFocus:V,onMinReached:W,onMaxReached:$,onFocus:X,attributes:ee,ref:re,...se}=n,ye=L??!0,ae=z??!0,le=Ze({name:"NumberInput",classes:SS,props:n,classNames:i,styles:r,unstyled:a,attributes:ee,vars:o,varsResolver:dB}),{resolvedClassNames:_e,resolvedStyles:ne}=Hi({classNames:i,styles:r,props:n}),ze=A.useRef(Sk(c)||Sk(h)?"bigint":"number");Sk(c)?ze.current="bigint":typeof c=="number"&&(ze.current="number");const we=ze.current==="bigint",[Ce,Ne]=Ti({value:c,defaultValue:h,finalValue:"",onChange:l}),ve=N!==void 0&&H!==void 0,xe=A.useRef(null),Pe=A.useRef(null),ue=A.useRef(0),Be=typeof p=="number"?p:void 0,We=typeof d=="number"?d:void 0,Ue=typeof v=="number"?v:Ok.step,Xe=typeof P=="number"?P:Ok.startValue,Qe=zv(p),ie=zv(d),he=zv(v)??BigInt(1),Ge=zv(P)??BigInt(0),Je=Le=>!cB(Le,ye)||ae&&x5.test(Le)?Le:bh(Le)??Le,Se=Le=>{const qe=Number(Le);return Number.isSafeInteger(qe)?qe:void 0},tn=(Le,qe)=>{qe.source==="event"&&Ne(we?Je(Le.value):Fne(Le.floatValue,Le.value)&&!Lne.test(Le.value)&&!(ae&&x5.test(Le.value))&&!Ine.test(Le.value)&&!fB.test(Le.value)?Le.floatValue:Le.value),f==null||f(Le,qe)},cn=Le=>{const qe=String(Le).match(/(?:\.(\d+))?(?:[eE]([+-]?\d+))?$/);return qe?Math.max(0,(qe[1]?qe[1].length:0)-(qe[2]?+qe[2]:0)):0},On=Le=>{xe.current&&typeof Le<"u"&&xe.current.setSelectionRange(Le,Le)},mn=A.useRef(sS);mn.current=()=>{if(we){if(!Ak(Ce,ye))return;let rn;const on=Ce;if(typeof on=="bigint"){const Vn=on+he;ie!==void 0&&Vn>ie&&($==null||$()),rn=ie!==void 0&&Vn>ie?ie:Vn}else if(typeof on=="string"&&on!==""){const Vn=bh(on);if(Vn===null)return;const kt=Vn+he;ie!==void 0&&kt>ie&&($==null||$()),rn=ie!==void 0&&kt>ie?ie:kt}else rn=vg(Ge,Qe,ie);const Bn=rn.toString();Ne(rn),f==null||f({floatValue:Se(rn),formattedValue:Bn,value:Bn},{source:"increment"}),setTimeout(()=>{var Vn;return On((Vn=xe.current)==null?void 0:Vn.value.length)},0);return}if(!Ck(Ce))return;let Le;const qe=cn(Ce),Nn=cn(Ue),ot=Math.max(qe,Nn),Mn=10**ot;if(!CS(Ce)&&(typeof Ce!="number"||Number.isNaN(Ce)))Le=Yo(Xe,Be,We);else if(We!==void 0){const rn=(Math.round(Number(Ce)*Mn)+Math.round(Ue*Mn))/Mn;rn>We&&($==null||$()),Le=rn<=We?rn:We}else Le=(Math.round(Number(Ce)*Mn)+Math.round(Ue*Mn))/Mn;const nn=Le.toFixed(ot);Ne(parseFloat(nn)),f==null||f({floatValue:parseFloat(nn),formattedValue:nn,value:nn},{source:"increment"}),setTimeout(()=>{var rn;return On((rn=xe.current)==null?void 0:rn.value.length)},0)};const an=A.useRef(sS);an.current=()=>{if(we){if(!Ak(Ce,ye))return;let on;const Bn=Qe!==void 0?Qe:ye?void 0:BigInt(0),Vn=Ce;if(typeof Vn=="bigint"){const Cn=Vn-he;Bn!==void 0&&Cn{var Cn;return On((Cn=xe.current)==null?void 0:Cn.value.length)},0);return}if(!Ck(Ce))return;let Le;const qe=Be!==void 0?Be:ye?Number.MIN_SAFE_INTEGER:0,Nn=cn(Ce),ot=cn(Ue),Mn=Math.max(Nn,ot),nn=10**Mn;if(!CS(Ce)&&typeof Ce!="number"||Number.isNaN(Ce))Le=Yo(Xe,qe,We);else{const on=(Math.round(Number(Ce)*nn)-Math.round(Ue*nn))/nn;qe!==void 0&&on{var on;return On((on=xe.current)==null?void 0:on.value.length)},0)};const en=Le=>{var Mn,nn,rn;const qe=Le.clipboardData.getData("text"),Nn=se.decimalSeparator||".",ot=(D||[".",","]).filter(on=>on!==Nn);if(ot.some(on=>qe.includes(on))){Le.preventDefault();let on=qe;ot.forEach(Vn=>{on=on.split(Vn).join(Nn)});const Bn=xe.current;if(Bn){const Vn=Bn.selectionStart??0,kt=Bn.selectionEnd??0,Cn=Bn.value,An=Cn.substring(0,Vn)+on+Cn.substring(kt);(nn=(Mn=Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype,"value"))==null?void 0:Mn.set)==null||nn.call(Bn,An),Bn.dispatchEvent(new Event("change",{bubbles:!0}));const Qn=Vn+on.length;setTimeout(()=>On(Qn),0)}}(rn=se.onPaste)==null||rn.call(se,Le)},Rn=Le=>{var qe,Nn;O==null||O(Le),!(B||!q)&&(Le.key==="ArrowUp"&&(Le.preventDefault(),(qe=mn.current)==null||qe.call(mn)),Le.key==="ArrowDown"&&(Le.preventDefault(),(Nn=an.current)==null||Nn.call(an)))},De=Le=>{if(j==null||j(Le),Le.key==="Backspace"){const qe=xe.current;qe&&qe.selectionStart===0&&qe.selectionStart===qe.selectionEnd&&(Le.preventDefault(),window.setTimeout(()=>On(0),0))}},Fe=Le=>{V&&setTimeout(()=>Le.currentTarget.select(),0),X==null||X(Le)},jn=Le=>{let qe=Ce;we?(_==="blur"&&typeof qe=="bigint"&&(qe=vg(qe,Qe,ie)),Y&&typeof qe=="string"&&(qe=Une(qe,{min:Qe,max:ie,clampBehavior:_}))):(_==="blur"&&typeof qe=="number"&&(qe=Yo(qe,Be,We)),Y&&typeof qe=="string"&&cn(qe)<15&&(qe=Hne(qe,We,Be))),Ce!==qe&&Ne(qe),C==null||C(Le)};Ag(M,{increment:mn.current,decrement:an.current});const yn=Le=>{var qe,Nn;Le?(qe=mn.current)==null||qe.call(mn):(Nn=an.current)==null||Nn.call(an),ue.current+=1},gn=Le=>{if(yn(Le),ve){const qe=typeof H=="number"?H:H(ue.current);Pe.current=window.setTimeout(()=>gn(Le),qe)}},bn=(Le,qe)=>{var Nn;Le.preventDefault(),(Nn=xe.current)==null||Nn.focus(),yn(qe),ve&&(Pe.current=window.setTimeout(()=>gn(qe),N))},tt=()=>{Pe.current&&window.clearTimeout(Pe.current),Pe.current=null,ue.current=0},wt=y.jsxs("div",{...le("controls"),children:[y.jsx(Tt,{...le("control"),tabIndex:-1,"aria-hidden":!0,disabled:F||typeof Ce=="number"&&We!==void 0&&Ce>=We||typeof Ce=="bigint"&&ie!==void 0&&Ce>=ie,mod:{direction:"up"},onMouseDown:Le=>Le.preventDefault(),onPointerDown:Le=>{bn(Le,!0)},onPointerUp:tt,onPointerLeave:tt,children:y.jsx(_5,{direction:"up"})}),y.jsx(Tt,{...le("control"),tabIndex:-1,"aria-hidden":!0,disabled:F||typeof Ce=="number"&&Be!==void 0&&Ce<=Be||typeof Ce=="bigint"&&Qe!==void 0&&Ce<=Qe,mod:{direction:"down"},onMouseDown:Le=>Le.preventDefault(),onPointerDown:Le=>{bn(Le,!1)},onPointerUp:tt,onPointerLeave:tt,children:y.jsx(_5,{direction:"down"})})]});return y.jsx(Ui,{component:zne,allowNegative:L,className:dn(SS.root,t),size:G,...se,inputMode:we?"numeric":"decimal",readOnly:B,disabled:F,value:typeof Ce=="bigint"?Ce.toString():Ce,getInputRef:Wt(re,xe),onValueChange:tn,rightSection:b||B||!(we?Ak(Ce,ye):Ck(Ce))?w:w||wt,classNames:_e,styles:ne,unstyled:a,__staticSelector:"NumberInput",decimalScale:we?0:x?E:0,onPaste:en,onFocus:Fe,onKeyDown:Rn,onKeyDownCapture:De,rightSectionPointerEvents:R??(F?"none":void 0),rightSectionWidth:U??`var(--ni-right-section-width-${G||"sm"})`,allowLeadingZeros:z,allowedDecimalSeparators:D,onBlur:jn,attributes:ee,isAllowed:Le=>{if(!(!k||k(Le)))return!1;if(_!=="strict")return!0;if(!we)return qne(Le.floatValue,Be,We);if(Le.value===""||Le.value==="-")return!0;const qe=bh(Le.value);return qe===null?!0:(Qe===void 0||qe>=Qe)&&(ie===void 0||qe<=ie)}})});Kh.classes={...Ui.classes,...SS};Kh.varsResolver=dB;Kh.displayName="@mantine/core/NumberInput";function Vne({reveal:e}){return y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 256 256",style:{width:"var(--psi-icon-size)",height:"var(--psi-icon-size)"},children:e?y.jsxs(y.Fragment,{children:[y.jsx("path",{fill:"none",d:"M0 0h256v256H0z"}),y.jsx("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"16",d:"M48 40l160 176M154.91 157.6a40 40 0 01-53.82-59.2M135.53 88.71a40 40 0 0132.3 35.53"}),y.jsx("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"16",d:"M208.61 169.1C230.41 149.58 240 128 240 128s-32-72-112-72a126 126 0 00-20.68 1.68M74 68.6C33.23 89.24 16 128 16 128s32 72 112 72a118.05 118.05 0 0054-12.6"})]}):y.jsxs(y.Fragment,{children:[y.jsx("path",{fill:"none",d:"M0 0h256v256H0z"}),y.jsx("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"16",d:"M128 56c-80 0-112 72-112 72s32 72 112 72 112-72 112-72-32-72-112-72z"}),y.jsx("circle",{cx:"128",cy:"128",r:"40",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"16"})]})})}var AS={root:"m_f61ca620",input:"m_ccf8da4c",innerInput:"m_f2d85dd2",visibilityToggle:"m_b1072d44"};const Wne={visibilityToggleIcon:Vne,size:"sm"},hB=(e,{size:n})=>({root:{"--psi-icon-size":Pn(n,"psi-icon-size"),"--psi-button-size":Pn(n,"psi-button-size")}}),Gy=Re(e=>{const n=be("PasswordInput",Wne,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,required:f,error:c,leftSection:h,disabled:d,id:p,variant:v,inputContainer:b,description:w,label:k,size:_,errorProps:C,descriptionProps:x,labelProps:E,withAsterisk:O,inputWrapperOrder:j,wrapperProps:M,radius:P,rightSection:F,rightSectionWidth:R,rightSectionPointerEvents:L,leftSectionWidth:B,visible:G,defaultVisible:U,onVisibilityChange:H,visibilityToggleIcon:N,visibilityToggleButtonProps:z,rightSectionProps:q,leftSectionProps:Y,leftSectionPointerEvents:D,withErrorStyles:V,mod:W,attributes:$,...X}=n,ee=qi(p),[re,se]=Ti({value:G,defaultValue:U,finalValue:!1,onChange:H}),ye=()=>se(!re),ae=Ze({name:"PasswordInput",classes:AS,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:$,vars:l,varsResolver:hB}),{resolvedClassNames:le,resolvedStyles:_e}=Hi({classNames:t,styles:a,props:n}),{styleProps:ne,rest:ze}=Tu(X),we=(C==null?void 0:C.id)||`${ee}-error`,Ce=(x==null?void 0:x.id)||`${ee}-description`,Ne=`${c&&typeof c!="boolean"?we:""} ${w?Ce:""}`,ve=Ne.trim().length>0?Ne.trim():void 0,xe=y.jsx(Et,{...ae("visibilityToggle"),disabled:d,radius:P,"aria-pressed":re,tabIndex:-1,"aria-label":"Toggle password visibility",...z,variant:(z==null?void 0:z.variant)??"subtle",color:"gray",unstyled:o,onTouchEnd:Pe=>{var ue;Pe.preventDefault(),(ue=z==null?void 0:z.onTouchEnd)==null||ue.call(z,Pe),ye()},onMouseDown:Pe=>{var ue;Pe.preventDefault(),(ue=z==null?void 0:z.onMouseDown)==null||ue.call(z,Pe),ye()},onKeyDown:Pe=>{var ue;(ue=z==null?void 0:z.onKeyDown)==null||ue.call(z,Pe),Pe.key===" "&&(Pe.preventDefault(),ye())},children:y.jsx(N,{reveal:re})});return y.jsx(Vt.Wrapper,{required:f,id:ee,label:k,error:c,description:w,size:_,classNames:le,styles:_e,__staticSelector:"PasswordInput",__stylesApiProps:n,unstyled:o,withAsterisk:O,inputWrapperOrder:j,inputContainer:b,variant:v,labelProps:{...E,htmlFor:ee},descriptionProps:{...x,id:Ce},errorProps:{...C,id:we},mod:W,attributes:$,...ae("root"),...ne,...M,children:y.jsx(Vt,{component:"div",error:c,leftSection:h,size:_,classNames:{...le,input:dn(AS.input,le==null?void 0:le.input)},styles:_e,radius:P,disabled:d,__staticSelector:"PasswordInput",__stylesApiProps:n,rightSectionWidth:R,rightSection:F??xe,variant:v,unstyled:o,leftSectionWidth:B,rightSectionPointerEvents:L||"all",rightSectionProps:q,leftSectionProps:Y,leftSectionPointerEvents:D,withAria:!1,withErrorStyles:V,attributes:$,children:y.jsx("input",{required:f,"data-invalid":!!c||void 0,"data-with-left-section":!!h||void 0,...ae("innerInput"),disabled:d,id:ee,...ze,"aria-describedby":ve,autoComplete:ze.autoComplete||"off",type:re?"text":"password"})})})});Gy.classes={...Ui.classes,...AS};Gy.varsResolver=hB;Gy.displayName="@mantine/core/PasswordInput";function Gne({offset:e,position:n,defaultOpened:t}){const[i,r]=A.useState(t),a=A.useRef(null),{x:o,y:l,elements:f,refs:c,update:h,placement:d}=Q6({placement:n,middleware:[Y6({crossAxis:!0,padding:5,rootBoundary:"document"})]}),p=d.includes("right")?e:n.includes("left")?e*-1:0,v=d.includes("bottom")?e:n.includes("top")?e*-1:0,b=A.useCallback(({clientX:w,clientY:k})=>{c.setPositionReference({getBoundingClientRect(){return{width:0,height:0,x:w,y:k,left:w+p,top:k+v,right:w,bottom:k}}})},[f.reference]);return A.useEffect(()=>{if(c.floating.current){const w=a.current;w.addEventListener("mousemove",b);const k=Xo(c.floating.current);return k.forEach(_=>{_.addEventListener("scroll",h)}),()=>{w.removeEventListener("mousemove",b),k.forEach(_=>{_.removeEventListener("scroll",h)})}}},[f.reference,c.floating.current,h,b,i]),{handleMouseMove:b,x:o,y:l,opened:i,setOpened:r,boundaryRef:a,floating:c.setFloating}}var Yy={tooltip:"m_1b3c8819",arrow:"m_f898399f"};const Yne={refProp:"ref",withinPortal:!0,offset:10,position:"right",zIndex:ba("popover")},mB=(e,{radius:n,color:t})=>({tooltip:{"--tooltip-radius":n===void 0?void 0:Kt(n),"--tooltip-bg":t?st(t,e):void 0,"--tooltip-color":t?"var(--mantine-color-white)":void 0}}),Ky=Re(e=>{const n=be("TooltipFloating",Yne,e),{children:t,refProp:i,withinPortal:r,style:a,className:o,classNames:l,styles:f,unstyled:c,radius:h,color:d,label:p,offset:v,position:b,multiline:w,zIndex:k,disabled:_,defaultOpened:C,variant:x,vars:E,portalProps:O,attributes:j,ref:M,...P}=n,F=li(),R=Ze({name:"TooltipFloating",props:n,classes:Yy,className:o,style:a,classNames:l,styles:f,unstyled:c,attributes:j,rootSelector:"tooltip",vars:E,varsResolver:mB}),{handleMouseMove:L,x:B,y:G,opened:U,boundaryRef:H,floating:N,setOpened:z}=Gne({offset:v,position:b,defaultOpened:C}),q=Eu(t);if(!q)throw new Error("[@mantine/core] Tooltip.Floating component children should be an element or a component that accepts ref, fragments, strings, numbers and other primitive values are not supported");const Y=Wt(H,iy(q),M),D=q.props,V=$=>{var X;(X=D.onMouseEnter)==null||X.call(D,$),L($),z(!0)},W=$=>{var X;(X=D.onMouseLeave)==null||X.call(D,$),z(!1)};return y.jsxs(y.Fragment,{children:[y.jsx(ul,{...O,withinPortal:r,children:y.jsx(ge,{...P,...R("tooltip",{style:{..._z(a,F),zIndex:k,display:!_&&U?"block":"none",top:(G&&Math.round(G))??"",left:(B&&Math.round(B))??""}}),variant:x,ref:N,mod:{multiline:w},children:p})}),A.cloneElement(q,{...D,[i]:Y,onMouseEnter:V,onMouseLeave:W})]})});Ky.classes=Yy;Ky.varsResolver=mB;Ky.displayName="@mantine/core/TooltipFloating";const pB=A.createContext({withinGroup:!1}),Kne={openDelay:0,closeDelay:0};function NC(e){const{openDelay:n,closeDelay:t,children:i}=be("TooltipGroup",Kne,e);return y.jsx(pB,{value:{withinGroup:!0},children:y.jsx(xQ,{delay:{open:n,close:t},children:i})})}NC.displayName="@mantine/core/TooltipGroup";NC.extend=e=>e;function Xne(e){if(e===void 0)return{shift:!0,flip:!0};const n={...e};return e.shift===void 0&&(n.shift=!0),e.flip===void 0&&(n.flip=!0),n}function Zne(e){const n=Xne(e.middlewares),t=[Kz(e.offset)];return n.shift&&t.push(Y6(typeof n.shift=="boolean"?{padding:8}:{padding:8,...n.shift})),n.flip&&t.push(typeof n.flip=="boolean"?Dg():Dg(n.flip)),t.push(Xz({element:e.arrowRef,padding:e.arrowOffset})),n.inline?t.push(typeof n.inline=="boolean"?Eh():Eh(n.inline)):e.inline&&t.push(Eh()),t}function Qne(e){var E,O,j;const[n,t]=A.useState(e.defaultOpened),i=typeof e.opened=="boolean"?e.opened:n,r=A.use(pB).withinGroup,a=qi(),o=A.useCallback(M=>{t(M),M&&k(a)},[a]),{x:l,y:f,context:c,refs:h,placement:d,middlewareData:{arrow:{x:p,y:v}={}}}=Q6({strategy:e.strategy,placement:e.position,open:i,onOpenChange:o,middleware:Zne(e),whileElementsMounted:yS}),{delay:b,currentId:w,setCurrentId:k}=SQ(c,{id:a}),{getReferenceProps:_,getFloatingProps:C}=TQ([kQ(c,{enabled:(E=e.events)==null?void 0:E.hover,delay:r?b:{open:e.openDelay,close:e.closeDelay},mouseOnly:!((O=e.events)!=null&&O.touch)}),EQ(c,{enabled:(j=e.events)==null?void 0:j.focus,visibleOnly:!0}),DQ(c,{role:"tooltip"}),OQ(c,{enabled:typeof e.opened>"u"})]);ns(()=>{var M;(M=e.onPositionChange)==null||M.call(e,d)},[d]);const x=i&&w&&w!==a;return{x:l,y:f,arrowX:p,arrowY:v,reference:h.setReference,floating:h.setFloating,getFloatingProps:C,getReferenceProps:_,isGroupPhase:x,opened:i,placement:d}}const Jne={position:"top",refProp:"ref",withinPortal:!0,arrowSize:4,arrowOffset:5,arrowRadius:0,arrowPosition:"side",offset:5,transitionProps:{duration:100,transition:"fade"},events:{hover:!0,focus:!1,touch:!1},zIndex:ba("popover"),middlewares:{flip:!0,shift:!0,inline:!1}},vB=(e,{radius:n,color:t,variant:i,autoContrast:r})=>{const a=e.variantColorResolver({theme:e,color:t||e.primaryColor,autoContrast:r,variant:i||"filled"});return{tooltip:{"--tooltip-radius":n===void 0?void 0:Kt(n),"--tooltip-bg":t?a.background:void 0,"--tooltip-color":t?a.color:void 0}}},pi=Re(e=>{const n=be("Tooltip",Jne,e),{children:t,position:i,refProp:r,label:a,openDelay:o,closeDelay:l,onPositionChange:f,opened:c,defaultOpened:h,withinPortal:d,radius:p,color:v,classNames:b,styles:w,unstyled:k,style:_,className:C,withArrow:x,arrowSize:E,arrowOffset:O,arrowRadius:j,arrowPosition:M,offset:P,transitionProps:F,multiline:R,events:L,zIndex:B,disabled:G,onClick:U,onMouseEnter:H,onMouseLeave:N,inline:z,variant:q,keepMounted:Y,vars:D,portalProps:V,mod:W,floatingStrategy:$,middlewares:X,autoContrast:ee,attributes:re,target:se,ref:ye,...ae}=n,{dir:le}=Mu(),_e=A.useRef(null),ne=Qne({position:oL(le,i),closeDelay:l,openDelay:o,onPositionChange:f,opened:c,defaultOpened:h,events:L,arrowRef:_e,arrowOffset:O,offset:typeof P=="number"?P+(x?E/2:0):P,inline:z,strategy:$,middlewares:X});A.useEffect(()=>{const Pe=se instanceof HTMLElement?se:typeof se=="string"?document.querySelector(se):(se==null?void 0:se.current)||null;Pe&&ne.reference(Pe)},[se,ne]);const ze=Ze({name:"Tooltip",props:n,classes:Yy,className:C,style:_,classNames:b,styles:w,unstyled:k,attributes:re,rootSelector:"tooltip",vars:D,varsResolver:vB}),we=Eu(t);if(!se&&!we)throw new Error("[@mantine/core] Tooltip component children should be an element or a component that accepts ref, fragments, strings, numbers and other primitive values are not supported");const Ce=ze("tooltip");if(se){const Pe=XT(F,{duration:100,transition:"fade"});return y.jsx(y.Fragment,{children:y.jsx(ul,{...V,withinPortal:d,children:y.jsx(is,{...Pe,keepMounted:Y,mounted:!G&&!!ne.opened,duration:ne.isGroupPhase?10:Pe.duration,children:ue=>y.jsxs(ge,{...ae,"data-fixed":$==="fixed"||void 0,variant:q,mod:[{multiline:R},W],...Ce,...ne.getFloatingProps({ref:ne.floating,className:Ce.className,style:{...Ce.style,...ue,zIndex:B,top:ne.y??0,left:ne.x??0}}),children:[a,y.jsx(Rg,{ref:_e,arrowX:ne.arrowX,arrowY:ne.arrowY,visible:x,position:ne.placement,arrowSize:E,arrowOffset:O,arrowRadius:j,arrowPosition:M,...ze("arrow")})]})})})})}const Ne=we.props,ve=Wt(ne.reference,iy(we),ye),xe=XT(F,{duration:100,transition:"fade"});return y.jsxs(y.Fragment,{children:[y.jsx(ul,{...V,withinPortal:d,children:y.jsx(is,{...xe,keepMounted:Y,mounted:!G&&!!ne.opened,duration:ne.isGroupPhase?10:xe.duration,children:Pe=>y.jsxs(ge,{...ae,"data-fixed":$==="fixed"||void 0,variant:q,mod:[{multiline:R},W],...ne.getFloatingProps({ref:ne.floating,className:ze("tooltip").className,style:{...ze("tooltip").style,...Pe,zIndex:B,top:ne.y??0,left:ne.x??0}}),children:[a,y.jsx(Rg,{ref:_e,arrowX:ne.arrowX,arrowY:ne.arrowY,visible:x,position:ne.placement,arrowSize:E,arrowOffset:O,arrowRadius:j,arrowPosition:M,...ze("arrow")})]})})}),A.cloneElement(we,ne.getReferenceProps({onClick:U,onMouseEnter:H,onMouseLeave:N,onMouseMove:n.onMouseMove,onPointerDown:n.onPointerDown,onPointerEnter:n.onPointerEnter,...Ne,className:dn(C,Ne.className),[r]:ve}))]})});pi.classes=Yy;pi.varsResolver=vB;pi.displayName="@mantine/core/Tooltip";pi.Floating=Ky;pi.Group=NC;const ete={size:"sm",withCheckIcon:!0,allowDeselect:!0,checkIconPosition:"left",openOnFocus:!0},mo=oy(e=>{const n=be("Select",ete,e),{classNames:t,styles:i,unstyled:r,vars:a,dropdownOpened:o,defaultDropdownOpened:l,onDropdownClose:f,onDropdownOpen:c,onFocus:h,onBlur:d,onClick:p,onChange:v,data:b,value:w,defaultValue:k,selectFirstOptionOnChange:_,selectFirstOptionOnDropdownOpen:C,onOptionSubmit:x,comboboxProps:E,readOnly:O,disabled:j,filter:M,limit:P,withScrollArea:F,maxDropdownHeight:R,size:L,searchable:B,rightSection:G,checkIconPosition:U,withCheckIcon:H,withAlignedLabels:N,nothingFoundMessage:z,name:q,form:Y,searchValue:D,defaultSearchValue:V,onSearchChange:W,allowDeselect:$,error:X,rightSectionPointerEvents:ee,id:re,clearable:se,clearSectionMode:ye,clearButtonProps:ae,hiddenInputProps:le,renderOption:_e,onClear:ne,autoComplete:ze,scrollAreaProps:we,__defaultRightSection:Ce,__clearSection:Ne,__clearable:ve,chevronColor:xe,autoSelectOnBlur:Pe,openOnFocus:ue,attributes:Be,...We}=n,Ue=A.useMemo(()=>ky(b),[b]),Xe=A.useRef({}),Qe=A.useMemo(()=>Ym(Ue),[Ue]),ie=qi(re),[he,Ge,Je]=Ti({value:w,defaultValue:k,finalValue:null,onChange:v}),Se=he!=null?`${he}`in Qe?Qe[`${he}`]:Xe.current[`${he}`]:void 0,tn=xK(Se),[cn,On,mn]=Ti({value:D,defaultValue:V,finalValue:Se?Se.label:"",onChange:W}),an=Km({opened:o,defaultOpened:l,onDropdownOpen:()=>{c==null||c(),C?an.selectFirstOption():an.updateSelectedOptionIndex("active",{scrollIntoView:!0})},onDropdownClose:()=>{f==null||f(),setTimeout(an.resetSelectedOption,0)}}),en=yn=>{On(yn),an.resetSelectedOption()},{resolvedClassNames:Rn,resolvedStyles:De}=Hi({props:n,styles:i,classNames:t});A.useEffect(()=>{_&&an.selectFirstOption()},[_,cn]),A.useEffect(()=>{w===null&&en(""),w!=null&&Se&&((tn==null?void 0:tn.value)!==Se.value||(tn==null?void 0:tn.label)!==Se.label)&&en(Se.label)},[w,Se]),A.useEffect(()=>{var yn,gn;!Je&&!mn&&en(he!=null?`${he}`in Qe?(yn=Qe[`${he}`])==null?void 0:yn.label:((gn=Xe.current[`${he}`])==null?void 0:gn.label)||"":"")},[Qe,he]),A.useEffect(()=>{he&&`${he}`in Qe&&(Xe.current[`${he}`]=Qe[`${he}`])},[Qe,he]);const Fe=y.jsx(Tn.ClearButton,{...ae,onClear:()=>{Ge(null,null),en(""),ne==null||ne()}}),jn=se&&!!he&&!j&&!O;return y.jsxs(y.Fragment,{children:[y.jsxs(Tn,{store:an,__staticSelector:"Select",classNames:Rn,styles:De,unstyled:r,readOnly:O,size:L,attributes:Be,keepMounted:Pe,onOptionSubmit:yn=>{x==null||x(yn);const gn=$&&`${Qe[yn].value}`==`${he}`?null:Qe[yn],bn=gn?gn.value:null;bn!==he&&Ge(bn,gn),!Je&&en(bn!=null&&(gn==null?void 0:gn.label)||""),an.closeDropdown()},...E,children:[y.jsx(Tn.Target,{targetType:B?"input":"button",autoComplete:ze,withExpandedAttribute:!0,children:y.jsx(Ui,{id:ie,__defaultRightSection:y.jsx(Tn.Chevron,{size:L,error:X,unstyled:r,color:xe}),__clearSection:Fe,__clearable:jn,__clearSectionMode:ye,rightSection:G,rightSectionPointerEvents:ee||"none",...We,size:L,__staticSelector:"Select",disabled:j,readOnly:O||!B,value:cn,onChange:yn=>{en(yn.currentTarget.value),an.openDropdown(),_&&an.selectFirstOption()},onFocus:yn=>{ue&&B&&an.openDropdown(),h==null||h(yn)},onBlur:yn=>{Pe&&an.clickSelectedOption(),B&&an.closeDropdown();const gn=he!=null&&(`${he}`in Qe?Qe[`${he}`]:Xe.current[`${he}`]);en(gn&&gn.label||""),d==null||d(yn)},onClick:yn=>{B?an.openDropdown():an.toggleDropdown(),p==null||p(yn)},classNames:Rn,styles:De,unstyled:r,pointer:!B,error:X,attributes:Be})}),y.jsx(Cy,{data:Ue,hidden:O||j,filter:M,search:cn,limit:P,hiddenWhenEmpty:!z,withScrollArea:F,maxDropdownHeight:R,filterOptions:!!B&&(Se==null?void 0:Se.label)!==cn,value:he,checkIconPosition:U,withCheckIcon:H,withAlignedLabels:N,nothingFoundMessage:z,unstyled:r,labelId:We.label?`${ie}-label`:void 0,"aria-label":We.label?void 0:We["aria-label"],renderOption:_e,scrollAreaProps:we})]}),y.jsx(Tn.HiddenInput,{value:he,name:q,form:Y,disabled:j,...le})]})});mo.classes={...Ui.classes,...Tn.classes};mo.displayName="@mantine/core/Select";function gB(e){if(e!==void 0)return typeof e=="number"?me(e):e}function nte({spacing:e,verticalSpacing:n,cols:t,minColWidth:i,autoRows:r,selector:a}){var d;const o=li(),l=n===void 0?e:n,f=i!==void 0,c=ju({"--sg-spacing-x":Ht(Ur(e)),"--sg-spacing-y":Ht(Ur(l)),"--sg-auto-rows":r,...f?{"--sg-min-col-width":gB(i)}:{"--sg-cols":(d=Ur(t))==null?void 0:d.toString()}}),h=Dt(o.breakpoints).reduce((p,v)=>(p[v]||(p[v]={}),typeof e=="object"&&e[v]!==void 0&&(p[v]["--sg-spacing-x"]=Ht(e[v])),typeof l=="object"&&l[v]!==void 0&&(p[v]["--sg-spacing-y"]=Ht(l[v])),!f&&typeof t=="object"&&t[v]!==void 0&&(p[v]["--sg-cols"]=t[v]),p),{});return y.jsx(Mc,{styles:c,media:Hh(Dt(h),o.breakpoints).filter(p=>Dt(h[p.value]).length>0).map(p=>({query:`(min-width: ${o.breakpoints[p.value]})`,styles:h[p.value]})),selector:a})}function jk(e){return typeof e=="object"&&e!==null?Dt(e):[]}function tte(e){return e.sort((n,t)=>qh(n)-qh(t))}function ite({spacing:e,verticalSpacing:n,cols:t,minColWidth:i}){return tte(Array.from(new Set([...jk(e),...jk(n),...i!==void 0?[]:jk(t)])))}function rte({spacing:e,verticalSpacing:n,cols:t,minColWidth:i,autoRows:r,selector:a}){var d;const o=n===void 0?e:n,l=i!==void 0,f=ju({"--sg-spacing-x":Ht(Ur(e)),"--sg-spacing-y":Ht(Ur(o)),"--sg-auto-rows":r,...l?{"--sg-min-col-width":gB(i)}:{"--sg-cols":(d=Ur(t))==null?void 0:d.toString()}}),c=ite({spacing:e,verticalSpacing:n,cols:t,minColWidth:i}),h=c.reduce((p,v)=>(p[v]||(p[v]={}),typeof e=="object"&&e[v]!==void 0&&(p[v]["--sg-spacing-x"]=Ht(e[v])),typeof o=="object"&&o[v]!==void 0&&(p[v]["--sg-spacing-y"]=Ht(o[v])),!l&&typeof t=="object"&&t[v]!==void 0&&(p[v]["--sg-cols"]=t[v]),p),{});return y.jsx(Mc,{styles:f,container:c.map(p=>({query:`simple-grid (min-width: ${p})`,styles:h[p]})),selector:a})}var yB={container:"m_925c2d2c",root:"m_2415a157"};const ate={cols:1,spacing:"md",type:"media"},Uo=Re(e=>{const n=be("SimpleGrid",ate,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,cols:f,verticalSpacing:c,spacing:h,type:d,minColWidth:p,autoFlow:v,autoRows:b,attributes:w,...k}=n,_=Ze({name:"SimpleGrid",classes:yB,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:w,vars:l}),C=ay(),x=p!==void 0?v||"auto-fill":void 0;return d==="container"?y.jsxs(y.Fragment,{children:[y.jsx(rte,{...n,selector:`.${C}`}),y.jsx("div",{..._("container"),children:y.jsx(ge,{..._("root",{className:C}),...k,"data-auto-cols":x})})]}):y.jsxs(y.Fragment,{children:[y.jsx(nte,{...n,selector:`.${C}`}),y.jsx(ge,{..._("root",{className:C}),...k,"data-auto-cols":x})]})});Uo.classes=yB;Uo.displayName="@mantine/core/SimpleGrid";var bB={root:"m_6d731127"};const ote={gap:"md",align:"stretch",justify:"flex-start"},wB=(e,{gap:n,align:t,justify:i})=>({root:{"--stack-gap":Ht(n),"--stack-align":t,"--stack-justify":i}}),Wn=Re(e=>{const n=be("Stack",ote,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,align:f,justify:c,gap:h,variant:d,attributes:p,...v}=n;return y.jsx(ge,{...Ze({name:"Stack",props:n,classes:bB,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:p,vars:l,varsResolver:wB})("root"),variant:d,...v})});Wn.classes=bB;Wn.varsResolver=wB;Wn.displayName="@mantine/core/Stack";const[ste,lte]=Wr("Table component was not found in the tree");var Zm={table:"m_b23fa0ef",th:"m_4e7aa4f3",tr:"m_4e7aa4fd",td:"m_4e7aa4ef",tbody:"m_b2404537",thead:"m_b242d975",caption:"m_9e5a3ac7",scrollContainer:"m_a100c15",scrollContainerInner:"m_62259741"};function ute(e,n){if(!n)return;const t={};return n.columnBorder&&e.withColumnBorders&&(t["data-with-column-border"]=!0),n.rowBorder&&e.withRowBorders&&(t["data-with-row-border"]=!0),n.striped&&e.striped&&(t["data-striped"]=e.striped),n.highlightOnHover&&e.highlightOnHover&&(t["data-hover"]=!0),n.captionSide&&e.captionSide&&(t["data-side"]=e.captionSide),n.stickyHeader&&e.stickyHeader&&(t["data-sticky"]=!0),t}function Ru(e,n){const t=`Table${e.charAt(0).toUpperCase()}${e.slice(1)}`,i=Re(r=>{const a=be(t,{},r),{classNames:o,className:l,style:f,styles:c,...h}=a,d=lte();return y.jsx(ge,{component:e,...ute(d,n),...d.getStyles(e,{className:l,classNames:o,style:f,styles:c,props:a}),...h})});return i.displayName=`@mantine/core/${t}`,i.classes=Zm,i}const OS=Ru("th",{columnBorder:!0}),kB=Ru("td",{columnBorder:!0}),gg=Ru("tr",{rowBorder:!0,striped:!0,highlightOnHover:!0}),_B=Ru("thead",{stickyHeader:!0}),xB=Ru("tbody"),SB=Ru("tfoot"),CB=Ru("caption",{captionSide:!0}),fte={type:"scrollarea"},AB=(e,{minWidth:n,maxHeight:t,type:i})=>({scrollContainer:{"--table-min-width":me(n),"--table-max-height":me(t),"--table-overflow":i==="native"?"auto":void 0}}),Xy=Re(e=>{const n=be("TableScrollContainer",fte,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,children:f,minWidth:c,maxHeight:h,type:d,scrollAreaProps:p,attributes:v,...b}=n,w=Ze({name:"TableScrollContainer",classes:Zm,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:v,vars:l,varsResolver:AB,rootSelector:"scrollContainer"});return y.jsx(ge,{component:d==="scrollarea"?_a:"div",...d==="scrollarea"?h?{offsetScrollbars:"xy",...p}:{offsetScrollbars:"x",...p}:{},...w("scrollContainer"),...b,children:y.jsx("div",{...w("scrollContainerInner"),children:f})})});Xy.classes=Zm;Xy.varsResolver=AB;Xy.displayName="@mantine/core/TableScrollContainer";function $C({data:e}){return y.jsxs(y.Fragment,{children:[e.caption&&y.jsx(CB,{children:e.caption}),e.head&&y.jsx(_B,{children:y.jsx(gg,{children:e.head.map((n,t)=>y.jsx(OS,{children:n},t))})}),e.body&&y.jsx(xB,{children:e.body.map((n,t)=>y.jsx(gg,{children:n.map((i,r)=>y.jsx(kB,{children:i},r))},t))}),e.foot&&y.jsx(SB,{children:y.jsx(gg,{children:e.foot.map((n,t)=>y.jsx(OS,{children:n},t))})})]})}$C.displayName="@mantine/core/TableDataRenderer";const cte={withRowBorders:!0,verticalSpacing:7},OB=(e,{layout:n,captionSide:t,horizontalSpacing:i,verticalSpacing:r,borderColor:a,stripedColor:o,highlightOnHoverColor:l,striped:f,highlightOnHover:c,stickyHeaderOffset:h,stickyHeader:d})=>({table:{"--table-layout":n,"--table-caption-side":t,"--table-horizontal-spacing":Ht(i),"--table-vertical-spacing":Ht(r),"--table-border-color":a?st(a,e):void 0,"--table-striped-color":f&&o?st(o,e):void 0,"--table-highlight-on-hover-color":c&&l?st(l,e):void 0,"--table-sticky-header-offset":d?me(h):void 0}}),vn=Re(e=>{const n=be("Table",cte,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,horizontalSpacing:f,verticalSpacing:c,captionSide:h,stripedColor:d,highlightOnHoverColor:p,striped:v,highlightOnHover:b,withColumnBorders:w,withRowBorders:k,withTableBorder:_,borderColor:C,layout:x,data:E,children:O,stickyHeader:j,stickyHeaderOffset:M,mod:P,tabularNums:F,attributes:R,...L}=n,B=Ze({name:"Table",props:n,className:i,style:r,classes:Zm,classNames:t,styles:a,unstyled:o,attributes:R,rootSelector:"table",vars:l,varsResolver:OB});return y.jsx(ste,{value:{getStyles:B,stickyHeader:j,striped:v===!0?"odd":v||void 0,highlightOnHover:b,withColumnBorders:w,withRowBorders:k,captionSide:h||"bottom"},children:y.jsx(ge,{component:"table",mod:[{"data-with-table-border":_,"data-tabular-nums":F},P],...B("table"),...L,children:O||!!E&&y.jsx($C,{data:E})})})});vn.classes=Zm;vn.varsResolver=OB;vn.displayName="@mantine/core/Table";vn.Td=kB;vn.Th=OS;vn.Tr=gg;vn.Thead=_B;vn.Tbody=xB;vn.Tfoot=SB;vn.Caption=CB;vn.ScrollContainer=Xy;vn.DataRenderer=$C;const[dte,zC]=Wr("Tabs component was not found in the tree");var Qm={root:"m_89d60db1","list--default":"m_576c9d4",list:"m_89d33d6d",tab:"m_4ec4dce6",panel:"m_b0c91715",tabSection:"m_fc420b1f",tabLabel:"m_42bbd1ae","tab--default":"m_539e827b","list--outline":"m_6772fbd5","tab--outline":"m_b59ab47c","tab--pills":"m_c3381914"};const LC=Re(e=>{const n=be("TabsList",null,e),{children:t,className:i,grow:r,justify:a,classNames:o,styles:l,style:f,mod:c,...h}=n,d=zC();return y.jsx(ge,{...d.getStyles("list",{className:i,style:f,classNames:o,styles:l,props:n,variant:d.variant}),role:"tablist",variant:d.variant,mod:[{grow:r,orientation:d.orientation,placement:d.orientation==="vertical"&&d.placement,inverted:d.inverted},c],"aria-orientation":d.orientation,__vars:{"--tabs-justify":a},...h,children:t})});LC.classes=Qm;LC.displayName="@mantine/core/TabsList";const IC=Re(e=>{const n=be("TabsPanel",null,e),{children:t,className:i,value:r,classNames:a,styles:o,style:l,mod:f,keepMounted:c,...h}=n,d=Im(),p=zC(),v=p.value===r,b=p.keepMounted||c,w=p.keepMountedMode!=="display-none",k=b&&w&&d!=="test"?y.jsx(A.Activity,{mode:v?"visible":"hidden",children:t}):b||v?t:null;return y.jsx(ge,{...p.getStyles("panel",{className:i,classNames:a,styles:o,style:[l,v?void 0:{display:"none"}],props:n}),mod:[{orientation:p.orientation},f],role:"tabpanel",id:p.getPanelId(r),"aria-labelledby":p.getTabId(r),...h,children:k})});IC.classes=Qm;IC.displayName="@mantine/core/TabsPanel";const BC=Re(e=>{const n=be("TabsTab",null,e),{className:t,children:i,rightSection:r,leftSection:a,value:o,onClick:l,onKeyDown:f,disabled:c,color:h,style:d,classNames:p,styles:v,vars:b,mod:w,tabIndex:k,..._}=n,C=li(),{dir:x}=Mu(),E=zC(),O=o===E.value,j=P=>{E.onChange(E.allowTabDeactivation&&o===E.value?null:o),l==null||l(P)},M={classNames:p,styles:v,props:n};return y.jsxs(Tt,{...E.getStyles("tab",{className:t,style:d,variant:E.variant,...M}),disabled:c,unstyled:E.unstyled,variant:E.variant,mod:[{active:O,disabled:c,orientation:E.orientation,inverted:E.inverted,placement:E.orientation==="vertical"&&E.placement},w],role:"tab",id:E.getTabId(o),"aria-selected":O,tabIndex:k!==void 0?k:O||E.value===null?0:-1,"aria-controls":E.getPanelId(o),onClick:j,__vars:{"--tabs-color":h?st(h,C):void 0},onKeyDown:T6({siblingSelector:'[role="tab"]',parentSelector:'[role="tablist"]',activateOnFocus:E.activateTabWithKeyboard,loop:E.loop,orientation:E.orientation||"horizontal",dir:x,onKeyDown:f}),..._,children:[a&&y.jsx("span",{...E.getStyles("tabSection",M),"data-position":"left",children:a}),i&&y.jsx("span",{...E.getStyles("tabLabel",M),children:i}),r&&y.jsx("span",{...E.getStyles("tabSection",M),"data-position":"right",children:r})]})});BC.classes=Qm;BC.displayName="@mantine/core/TabsTab";const S5="Tabs.Tab or Tabs.Panel component was rendered with invalid value or without value",hte={keepMounted:!0,keepMountedMode:"activity",orientation:"horizontal",loop:!0,activateTabWithKeyboard:!0,variant:"default",placement:"left"},jB=(e,{radius:n,color:t,autoContrast:i})=>({root:{"--tabs-radius":Kt(n),"--tabs-color":st(t,e),"--tabs-text-color":ry(i,e)?Lm({color:t,theme:e,autoContrast:i}):void 0}}),wi=Re(e=>{const n=be("Tabs",hte,e),{defaultValue:t,value:i,onChange:r,orientation:a,children:o,loop:l,id:f,activateTabWithKeyboard:c,allowTabDeactivation:h,variant:d,color:p,radius:v,inverted:b,placement:w,keepMounted:k,keepMountedMode:_,classNames:C,styles:x,unstyled:E,className:O,style:j,vars:M,autoContrast:P,mod:F,attributes:R,...L}=n,B=qi(f),[G,U]=Ti({value:i,defaultValue:t,finalValue:null,onChange:r}),H=Ze({name:"Tabs",props:n,classes:Qm,className:O,style:j,classNames:C,styles:x,unstyled:E,attributes:R,vars:M,varsResolver:jB});return y.jsx(dte,{value:{placement:w,value:G,orientation:a,id:B,loop:l,activateTabWithKeyboard:c,getTabId:pT(`${B}-tab`,S5),getPanelId:pT(`${B}-panel`,S5),onChange:U,allowTabDeactivation:h,variant:d,color:p,radius:v,inverted:b,keepMounted:k,keepMountedMode:_,unstyled:E,getStyles:H},children:y.jsx(ge,{id:B,variant:d,mod:[{orientation:a,inverted:a==="horizontal"&&b,placement:a==="vertical"&&w},F],...H("root"),...L,children:o})})});wi.classes=Qm;wi.varsResolver=jB;wi.displayName="@mantine/core/Tabs";wi.Tab=BC;wi.Panel=IC;wi.List=LC;function mte({data:e,value:n}){const t=n.map(i=>i.trim().toLowerCase());return e.reduce((i,r)=>(yu(r)?i.push({group:r.group,items:r.items.filter(a=>t.indexOf(a.label.toLowerCase().trim())===-1)}):t.indexOf(r.label.toLowerCase().trim())===-1&&i.push(r),i),[])}function pte(e,n){return e?n.split(new RegExp(`[${e.join("")}]`)).map(t=>t.trim()).filter(t=>t!==""):[n]}function C5({splitChars:e,allowDuplicates:n,maxTags:t,value:i,currentTags:r,isDuplicate:a,onDuplicate:o}){const l=pte(e,i),f=[];if(n)f.push(...r,...l);else{f.push(...r);for(const c of l)(a?h=>a(h,f):h=>f.some(d=>d.toLowerCase()===h.toLowerCase()))(c)?o==null||o(c):f.push(c)}return t?f.slice(0,t):f}const vte={maxTags:1/0,acceptValueOnBlur:!0,splitChars:[","],hiddenInputValuesDivider:",",openOnFocus:!0,size:"sm"},FC=Re(e=>{const n=be("TagsInput",vte,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,size:f,value:c,defaultValue:h,onChange:d,onKeyDown:p,maxTags:v,allowDuplicates:b,onDuplicate:w,variant:k,data:_,dropdownOpened:C,defaultDropdownOpened:x,onDropdownOpen:E,onDropdownClose:O,selectFirstOptionOnChange:j,selectFirstOptionOnDropdownOpen:M,onOptionSubmit:P,comboboxProps:F,filter:R,limit:L,withScrollArea:B,maxDropdownHeight:G,searchValue:U,defaultSearchValue:H,onSearchChange:N,readOnly:z,disabled:q,splitChars:Y,onFocus:D,onBlur:V,onPaste:W,radius:$,rightSection:X,rightSectionWidth:ee,rightSectionPointerEvents:re,rightSectionProps:se,leftSection:ye,leftSectionWidth:ae,leftSectionPointerEvents:le,leftSectionProps:_e,inputContainer:ne,inputWrapperOrder:ze,withAsterisk:we,required:Ce,labelProps:Ne,descriptionProps:ve,errorProps:xe,wrapperProps:Pe,description:ue,label:Be,error:We,withErrorStyles:Ue,name:Xe,form:Qe,id:ie,clearable:he,clearSectionMode:Ge,clearButtonProps:Je,hiddenInputProps:Se,hiddenInputValuesDivider:tn,mod:cn,renderOption:On,renderPill:mn,onRemove:an,onClear:en,onMaxTags:Rn,scrollAreaProps:De,acceptValueOnBlur:Fe,isDuplicate:jn,openOnFocus:yn,attributes:gn,ref:bn,loading:tt,loadingPosition:wt,...Le}=n,qe=qi(ie),Nn=ky(_),ot=Ym(Nn),Mn=A.useRef(null),nn=Wt(Mn,bn),rn=Km({opened:C,defaultOpened:x,onDropdownOpen:()=>{E==null||E(),M&&rn.selectFirstOption()},onDropdownClose:()=>{O==null||O(),rn.resetSelectedOption()}}),{styleProps:on,rest:{type:Bn,autoComplete:Vn,...kt}}=Tu(Le),[Cn,An]=Ti({value:c,defaultValue:h,finalValue:[],onChange:d}),[Qn,Xt]=Ti({value:U,defaultValue:H,finalValue:"",onChange:N}),Ci=hn=>{Xt(hn),rn.resetSelectedOption()},nr=Ze({name:"TagsInput",classes:{},props:n,classNames:t,styles:a,unstyled:o}),{resolvedClassNames:Aa,resolvedStyles:Ga}=Hi({props:n,styles:a,classNames:t}),Oa=hn=>{if((jn?jn(hn,Cn):Cn.some(ii=>ii.toLowerCase()===hn.toLowerCase()))&&(w==null||w(hn),!b)){Ci("");return}if(Cn.length>=v){Rn==null||Rn(hn);return}P==null||P(hn),Ci(""),hn.length>0&&An([...Cn,hn])},Yr=hn=>{if(p==null||p(hn),hn.isPropagationStopped())return;const ii=Qn.trim(),{length:un}=ii;if(Y.includes(hn.key)&&un>0&&(An(C5({splitChars:Y,allowDuplicates:b,maxTags:v,value:Qn,currentTags:Cn,isDuplicate:jn,onDuplicate:w})),Ci(""),hn.preventDefault()),hn.key==="Enter"&&un>0&&!hn.nativeEvent.isComposing){if(hn.preventDefault(),document.querySelector(`#${rn.listId} [data-combobox-option][data-combobox-selected]`))return;Oa(ii)}hn.key==="Backspace"&&un===0&&Cn.length>0&&!hn.nativeEvent.isComposing&&!z&&(an==null||an(Cn[Cn.length-1]),An(Cn.slice(0,Cn.length-1)))},Ya=hn=>{W==null||W(hn),hn.preventDefault(),hn.clipboardData&&(An(C5({splitChars:Y,allowDuplicates:b,maxTags:v,value:`${Qn}${hn.clipboardData.getData("text/plain")}`,currentTags:Cn,isDuplicate:jn,onDuplicate:w})),Ci(""))},Ar=Cn.map((hn,ii)=>{const un=()=>{const jr=Cn.slice();jr.splice(ii,1),An(jr),an==null||an(hn)};return mn?y.jsx(A.Fragment,{children:mn({option:ot[hn]||{value:hn,label:hn,disabled:!1},value:hn,onRemove:un,disabled:q||z})},`${hn}-${ii}`):y.jsx(cl,{withRemoveButton:!z,onRemove:un,unstyled:o,disabled:q,attributes:gn,...nr("pill"),children:hn},`${hn}-${ii}`)});A.useEffect(()=>{j&&rn.selectFirstOption()},[j,Cn,Qn]);const Or=y.jsx(Tn.ClearButton,{...Je,onClear:()=>{var hn;An([]),Ci(""),(hn=Mn.current)==null||hn.focus(),rn.openDropdown(),en==null||en()}});return y.jsxs(y.Fragment,{children:[y.jsxs(Tn,{store:rn,classNames:Aa,styles:Ga,unstyled:o,size:f,readOnly:z,__staticSelector:"TagsInput",attributes:gn,onOptionSubmit:hn=>{P==null||P(hn),Ci(""),Cn.length>=v?Rn==null||Rn(hn):An([...Cn,ot[hn].value]),rn.resetSelectedOption()},...F,children:[y.jsx(Tn.DropdownTarget,{children:y.jsx(bu,{...on,__staticSelector:"TagsInput",classNames:Aa,styles:Ga,unstyled:o,size:f,className:i,style:r,variant:k,disabled:q,radius:$,rightSection:X,__clearSection:Or,__clearable:he&&Cn.length>0&&!q&&!z,__clearSectionMode:Ge,rightSectionWidth:ee,rightSectionPointerEvents:re,rightSectionProps:se,leftSection:ye,leftSectionWidth:ae,leftSectionPointerEvents:le,leftSectionProps:_e,loading:tt,loadingPosition:wt,inputContainer:ne,inputWrapperOrder:ze,withAsterisk:we,required:Ce,labelProps:Ne,descriptionProps:ve,errorProps:xe,wrapperProps:Pe,description:ue,label:Be,error:We,withErrorStyles:Ue,__stylesApiProps:{...n,multiline:!0},id:qe,mod:cn,attributes:gn,children:y.jsxs(cl.Group,{disabled:q,unstyled:o,...nr("pillsList"),children:[Ar,y.jsx(Tn.EventsTarget,{autoComplete:Vn,withExpandedAttribute:!0,children:y.jsx(bu.Field,{...kt,ref:nn,...nr("inputField"),unstyled:o,onKeyDown:Yr,onFocus:hn=>{D==null||D(hn),yn&&rn.openDropdown()},onBlur:hn=>{V==null||V(hn),Fe&&Oa(Qn),rn.closeDropdown()},onPaste:Ya,value:Qn,onChange:hn=>Ci(hn.currentTarget.value),required:Ce&&Cn.length===0,disabled:q,readOnly:z,id:qe})})]})})}),y.jsx(Cy,{data:mte({data:Nn,value:Cn}),hidden:z||q,filter:R,search:Qn,limit:L,hiddenWhenEmpty:!0,withScrollArea:B,maxDropdownHeight:G,unstyled:o,labelId:Be?`${qe}-label`:void 0,"aria-label":Be?void 0:Le["aria-label"],renderOption:On,scrollAreaProps:De})]}),y.jsx(Tn.HiddenInput,{name:Xe,form:Qe,value:Cn,valuesDivider:tn,disabled:q,...Se})]})});FC.classes={...Ui.classes,...Tn.classes};FC.displayName="@mantine/core/TagsInput";const dl=Re(e=>y.jsx(Ui,{component:"input",...be("TextInput",null,e),__staticSelector:"TextInput"}));dl.classes=Ui.classes;dl.displayName="@mantine/core/TextInput";const[gte,yte]=Wr("Timeline component was not found in tree");var qC={root:"m_43657ece",itemTitle:"m_2ebe8099",item:"m_436178ff",itemBullet:"m_8affcee1",itemBody:"m_540e8f41"};const HC=Re(e=>{const{classNames:n,className:t,style:i,styles:r,vars:a,__active:o,__align:l,__lineActive:f,__vars:c,bullet:h,radius:d,color:p,lineVariant:v,children:b,title:w,mod:k,..._}=be("TimelineItem",null,e),C=yte(),x=li(),E={classNames:n,styles:r};return y.jsxs(ge,{...C.getStyles("item",{...E,className:t,style:i}),mod:[{"line-active":f,active:o},k],__vars:{"--tli-radius":d!==void 0?Kt(d):void 0,"--tli-color":p?st(p,x):void 0,"--tli-border-style":v||void 0},..._,children:[y.jsx(ge,{...C.getStyles("itemBullet",E),mod:{"with-child":!!h,align:l,active:o},children:h}),y.jsxs("div",{...C.getStyles("itemBody",E),children:[w&&y.jsx("div",{...C.getStyles("itemTitle",E),children:w}),y.jsx("div",{...C.getStyles("itemContent",E),children:b})]})]})});HC.classes=qC;HC.displayName="@mantine/core/TimelineItem";const bte={active:-1,align:"left"},EB=(e,{bulletSize:n,lineWidth:t,radius:i,color:r,autoContrast:a})=>({root:{"--tl-bullet-size":me(n),"--tl-line-width":me(t),"--tl-radius":i===void 0?void 0:Kt(i),"--tl-color":r?st(r,e):void 0,"--tl-icon-color":ry(a,e)?Lm({color:r,theme:e,autoContrast:a}):void 0}}),ec=Re(e=>{const n=be("Timeline",bte,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,children:f,active:c,color:h,radius:d,bulletSize:p,align:v,lineWidth:b,reverseActive:w,mod:k,autoContrast:_,attributes:C,...x}=n,E=Ze({name:"Timeline",classes:qC,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:C,vars:l,varsResolver:EB}),O=A.Children.toArray(f),j=O.map((M,P)=>{var F,R;return A.cloneElement(M,{unstyled:o,__align:v,__active:((F=M.props)==null?void 0:F.active)||(w?c>=O.length-P-1:c>=P),__lineActive:((R=M.props)==null?void 0:R.lineActive)||(w?c>=O.length-P-1:c-1>=P)})});return y.jsx(gte,{value:{getStyles:E},children:y.jsx(ge,{...E("root"),mod:[{align:v},k],...x,children:j})})});ec.classes=qC;ec.varsResolver=EB;ec.displayName="@mantine/core/Timeline";ec.Item=HC;const wte=["h1","h2","h3","h4","h5","h6"],kte=["xs","sm","md","lg","xl"];function _te(e,n){const t=n!==void 0?n:`h${e}`;return wte.includes(t)?{fontSize:`var(--mantine-${t}-font-size)`,fontWeight:`var(--mantine-${t}-font-weight)`,lineHeight:`var(--mantine-${t}-line-height)`}:kte.includes(t)?{fontSize:`var(--mantine-font-size-${t})`,fontWeight:`var(--mantine-h${e}-font-weight)`,lineHeight:`var(--mantine-h${e}-line-height)`}:{fontSize:me(t),fontWeight:`var(--mantine-h${e}-font-weight)`,lineHeight:`var(--mantine-h${e}-line-height)`}}var TB={root:"m_8a5d1357"};const xte={order:1},MB=(e,{order:n,size:t,lineClamp:i,textWrap:r})=>{const a=_te(n||1,t);return{root:{"--title-fw":a.fontWeight,"--title-lh":a.lineHeight,"--title-fz":a.fontSize,"--title-line-clamp":typeof i=="number"?i.toString():void 0,"--title-text-wrap":r}}},gl=Re(e=>{const n=be("Title",xte,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,order:l,vars:f,size:c,variant:h,lineClamp:d,textWrap:p,mod:v,attributes:b,...w}=n,k=Ze({name:"Title",props:n,classes:TB,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:b,vars:f,varsResolver:MB});return[1,2,3,4,5,6].includes(l)?y.jsx(ge,{...k("root"),component:`h${l}`,variant:h,mod:[{order:l,"data-line-clamp":typeof d=="number"},v],size:c,...w}):null});gl.classes=TB;gl.varsResolver=MB;gl.displayName="@mantine/core/Title";const UC=A.createContext(null);UC.displayName="@mantine/modals/ModalsContext";function Ste(){const e=A.use(UC);if(!e)throw new Error("[@mantine/modals] useModals hook was called outside of context, wrap your app with ModalsProvider component");return e}const[Cte,Pu]=AK("mantine-modals"),Ate=e=>{const n=e.modalId||al();return Pu("openModal")({...e,modalId:n}),n},Ote=e=>{const n=e.modalId||al();return Pu("openConfirmModal")({...e,modalId:n}),n},jte=e=>{const n=e.modalId||al();return Pu("openContextModal")({...e,modalId:n}),n},Ete=Pu("closeModal"),Tte=Pu("closeAllModals"),Mte=e=>Pu("updateModal")(e),Dte=e=>Pu("updateContextModal")(e),Da={open:Ate,close:Ete,closeAll:Tte,openConfirmModal:Ote,openContextModal:jte,updateModal:Mte,updateContextModal:Dte};function Rte({id:e,cancelProps:n,confirmProps:t,labels:i={cancel:"",confirm:""},closeOnConfirm:r=!0,closeOnCancel:a=!0,groupProps:o,onCancel:l,onConfirm:f,children:c}){const{cancel:h,confirm:d}=i,p=Ste(),v=w=>{typeof(n==null?void 0:n.onClick)=="function"&&(n==null||n.onClick(w)),typeof l=="function"&&l(),a&&p.closeModal(e)},b=w=>{typeof(t==null?void 0:t.onClick)=="function"&&(t==null||t.onClick(w)),typeof f=="function"&&f(),r&&p.closeModal(e)};return y.jsxs(y.Fragment,{children:[c&&y.jsx(ge,{mb:"md",children:c}),y.jsxs(Ke,{mt:c?0:"md",justify:"flex-end",...o,children:[y.jsx(zt,{variant:"default",...n,onClick:v,children:(n==null?void 0:n.children)||h}),y.jsx(zt,{...t,onClick:b,children:(t==null?void 0:t.children)||d})]})]})}function A5(e,n){var t,i,r,a;n&&e.type==="confirm"&&((i=(t=e.props).onCancel)==null||i.call(t)),(a=(r=e.props).onClose)==null||a.call(r)}function Pte(e,n){var t;switch(n.type){case"OPEN":return{current:n.modal,modals:[...e.modals,n.modal]};case"CLOSE":{if(!e.modals.find(r=>r.id===n.modalId))return e;const i=e.modals.filter(r=>r.id!==n.modalId);return{current:i[i.length-1]||e.current,modals:i}}case"CLOSE_ALL":return e.modals.length?{current:e.current,modals:[]}:e;case"UPDATE":{const{modalId:i,newProps:r}=n,a=e.modals.map(l=>l.id!==i?l:l.type==="content"||l.type==="confirm"?{...l,props:{...l.props,...r}}:l.type==="context"?{...l,props:{...l.props,...r,innerProps:{...l.props.innerProps,...r.innerProps}}}:l),o=((t=e.current)==null?void 0:t.id)===i&&a.find(l=>l.id===i)||e.current;return{...e,modals:a,current:o}}default:return e}}function Nte(e){if(!e)return{confirmProps:{},modalProps:{}};const{id:n,children:t,onCancel:i,onConfirm:r,closeOnConfirm:a,closeOnCancel:o,cancelProps:l,confirmProps:f,groupProps:c,labels:h,...d}=e;return{confirmProps:{id:n,children:t,onCancel:i,onConfirm:r,closeOnConfirm:a,closeOnCancel:o,cancelProps:l,confirmProps:f,groupProps:c,labels:h},modalProps:{id:n,...d}}}function $te({children:e,modalProps:n,labels:t,modals:i}){const[r,a]=A.useReducer(Pte,{modals:[],current:null}),o=A.useRef(r);o.current=r;const l=A.useRef(!1),f=A.useCallback(x=>{l.current||(l.current=!0,o.current.modals.concat().reverse().forEach(E=>{A5(E,x)}),l.current=!1),a({type:"CLOSE_ALL",canceled:x})},[o,a]),c=A.useCallback(({modalId:x,...E})=>{const O=x||al();return a({type:"OPEN",modal:{id:O,type:"content",props:E}}),O},[a]),h=A.useCallback(({modalId:x,...E})=>{const O=x||al();return a({type:"OPEN",modal:{id:O,type:"confirm",props:E}}),O},[a]),d=A.useCallback((x,{modalId:E,...O})=>{const j=E||al();return a({type:"OPEN",modal:{id:j,type:"context",props:O,ctx:x}}),j},[a]),p=A.useCallback((x,E)=>{if(!l.current){const O=o.current.modals.find(j=>j.id===x);O&&(l.current=!0,A5(O,E),l.current=!1)}a({type:"CLOSE",modalId:x,canceled:E})},[o,a]),v=A.useCallback(({modalId:x,...E})=>{a({type:"UPDATE",modalId:x,newProps:E})},[a]),b=A.useCallback(({modalId:x,...E})=>{a({type:"UPDATE",modalId:x,newProps:E})},[a]);Cte({openModal:c,openConfirmModal:h,openContextModal:({modal:x,...E})=>d(x,E),closeModal:p,closeContextModal:p,closeAllModals:f,updateModal:v,updateContextModal:b});const w={modalProps:n||{},modals:r.modals,openModal:c,openConfirmModal:h,openContextModal:d,closeModal:p,closeContextModal:p,closeAll:f,updateModal:v,updateContextModal:b},k=()=>{const x=o.current.current;switch(x==null?void 0:x.type){case"context":{const{innerProps:E,...O}=x.props,j=i[x.ctx];return{modalProps:O,content:y.jsx(j,{innerProps:E,context:w,id:x.id})}}case"confirm":{const{modalProps:E,confirmProps:O}=Nte(x.props);return{modalProps:E,content:y.jsx(Rte,{...O,id:x.id,labels:x.props.labels||t})}}case"content":{const{children:E,...O}=x.props;return{modalProps:O,content:E}}default:return{modalProps:{},content:null}}},{modalProps:_,content:C}=k();return y.jsxs(UC,{value:w,children:[y.jsx(Gr,{zIndex:ba("modal")+1,...n,..._,opened:r.modals.length>0,onClose:()=>{var x;return p((x=r.current)==null?void 0:x.id)},children:C}),e]})}function zte(e){let n=e,t=!1;const i=new Set;return{getState(){return n},updateState(r){n=typeof r=="function"?r(n):r},setState(r){this.updateState(r),i.forEach(a=>a(n))},initialize(r){t||(n=r,t=!0)},subscribe(r){return i.add(r),()=>i.delete(r)}}}function Lte(e){return A.useSyncExternalStore(e.subscribe,()=>e.getState(),()=>e.getState())}function Ite(e,n,t){const i=[],r=[],a={};for(const o of e){const l=o.position||n;a[l]=a[l]||0,a[l]+=1,a[l]<=t?r.push(o):i.push(o)}return{notifications:r,queue:i}}const Bte=()=>zte({notifications:[],queue:[],defaultPosition:"bottom-right",limit:5}),Nu=Bte(),Fte=(e=Nu)=>Lte(e);function Hc(e,n){const t=e.getState(),i=Ite(n([...t.notifications,...t.queue]),t.defaultPosition,t.limit);e.setState({notifications:i.notifications,queue:i.queue,limit:t.limit,defaultPosition:t.defaultPosition})}function qte(e,n=Nu){const t=e.id||al();return Hc(n,i=>e.id&&i.some(r=>r.id===e.id)?i:[...i,{...e,id:t}]),t}function DB(e,n=Nu){return Hc(n,t=>t.filter(i=>{var r;return i.id===e?((r=i.onClose)==null||r.call(i,i),!1):!0})),e}function Hte(e,n=Nu){return Hc(n,t=>t.map(i=>i.id===e.id?{...i,...e}:i)),e.id}function Ute(e=Nu){Hc(e,()=>[])}function Vte(e=Nu){Hc(e,n=>n.slice(0,e.getState().limit))}const Ln={show:qte,hide:DB,update:Hte,clean:Ute,cleanQueue:Vte,updateState:Hc},RB=["bottom-center","bottom-left","bottom-right","top-center","top-left","top-right"];function Wte(e,n){return e.reduce((t,i)=>(t[i.position||n].push(i),t),RB.reduce((t,i)=>(t[i]=[],t),{}))}const O5={left:"translateX(-100%)",right:"translateX(100%)","top-center":"translateY(-100%)","bottom-center":"translateY(100%)"},Gte={left:"translateX(0)",right:"translateX(0)","top-center":"translateY(0)","bottom-center":"translateY(0)"};function Yte({state:e,maxHeight:n,position:t,transitionDuration:i}){const[r,a]=t.split("-"),o=a==="center"?`${r}-center`:a,l={opacity:0,maxHeight:n,transform:O5[o],transitionDuration:`${i}ms, ${i}ms, ${i}ms`,transitionTimingFunction:"cubic-bezier(.51,.3,0,1.21), cubic-bezier(.51,.3,0,1.21), linear",transitionProperty:"opacity, transform, max-height"},f={opacity:1,transform:Gte[o]},c={opacity:0,maxHeight:0,transform:O5[o]};return{...l,...{entering:f,entered:f,exiting:c,exited:c}[e]}}function Kte(e,n){return typeof n=="number"?n:n===!1||e===!1?!1:e}function PB({data:e,onHide:n,autoClose:t,paused:i,onHoverStart:r,onHoverEnd:a,...o}){const{autoClose:l,message:f,onOpen:c,...h}=e,d=Kte(t,e.autoClose),p=A.useRef(-1),[v,b]=A.useState(!1),w=()=>window.clearTimeout(p.current),k=()=>{n(e.id),w()},_=()=>{w(),typeof d=="number"&&(p.current=window.setTimeout(k,d))},C=()=>{b(!0),r==null||r()},x=()=>{b(!1),a==null||a()};return A.useEffect(()=>{var E;(E=e.onOpen)==null||E.call(e,e)},[]),A.useEffect(()=>(_(),w),[d]),A.useEffect(()=>(i||v?w():_(),w),[i,v]),y.jsx(Vy,{...o,...h,onClose:k,onMouseEnter:C,onMouseLeave:x,children:f})}PB.displayName="@mantine/notifications/NotificationContainer";var NB={root:"m_b37d9ac7",notification:"m_5ed0edd0"};function jS(){return jS=Object.assign?Object.assign.bind():function(e){for(var n=1;n({root:{"--notifications-z-index":n==null?void 0:n.toString(),"--notifications-container-width":me(t)}}),ko=Re(e=>{const n=be("Notifications",lie,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,attributes:f,position:c,autoClose:h,transitionDuration:d,containerWidth:p,notificationMaxHeight:v,limit:b,zIndex:w,store:k,portalProps:_,withinPortal:C,pauseResetOnHover:x,...E}=n,O=li(),j=Fte(k),M=kK(),P=R6(),F=A.useRef({}),R=A.useRef(0),[L,B]=A.useState(0),G=A.useCallback(()=>B(Y=>Y+1),[]),U=A.useCallback(()=>B(Y=>Math.max(0,Y-1)),[]),H=O.respectReducedMotion&&P?1:d,N=Ze({name:"Notifications",classes:NB,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:f,vars:l,varsResolver:LB});A.useEffect(()=>{k==null||k.updateState(Y=>({...Y,limit:b||5,defaultPosition:c}))},[b,c]),ns(()=>{j.notifications.length>R.current&&setTimeout(()=>M(),0),R.current=j.notifications.length},[j.notifications]);const z=Wte(j.notifications,c),q=RB.reduce((Y,D)=>(Y[D]=z[D].map(({style:V,...W})=>y.jsx(sie,{timeout:H,onEnter:()=>F.current[W.id].offsetHeight,nodeRef:{current:F.current[W.id]},children:$=>y.jsx(PB,{ref:X=>{X&&(F.current[W.id]=X)},data:W,onHide:X=>DB(X,k),autoClose:h,paused:x==="all"?L>0:!1,onHoverStart:G,onHoverEnd:U,...N("notification",{style:{...Yte({state:$,position:D,transitionDuration:H,maxHeight:v}),...V}})})},W.id)),Y),{});return y.jsxs(ul,{withinPortal:C,..._,children:[y.jsx(ge,{...N("root"),"data-position":"top-center",...E,children:y.jsx(Gs,{children:q["top-center"]})}),y.jsx(ge,{...N("root"),"data-position":"top-left",...E,children:y.jsx(Gs,{children:q["top-left"]})}),y.jsx(ge,{...N("root",{className:gu.classNames.fullWidth}),"data-position":"top-right",...E,children:y.jsx(Gs,{children:q["top-right"]})}),y.jsx(ge,{...N("root",{className:gu.classNames.fullWidth}),"data-position":"bottom-right",...E,children:y.jsx(Gs,{children:q["bottom-right"]})}),y.jsx(ge,{...N("root"),"data-position":"bottom-left",...E,children:y.jsx(Gs,{children:q["bottom-left"]})}),y.jsx(ge,{...N("root"),"data-position":"bottom-center",...E,children:y.jsx(Gs,{children:q["bottom-center"]})})]})});ko.classes=NB;ko.varsResolver=LB;ko.displayName="@mantine/notifications/Notifications";ko.show=Ln.show;ko.hide=Ln.hide;ko.update=Ln.update;ko.clean=Ln.clean;ko.cleanQueue=Ln.cleanQueue;ko.updateState=Ln.updateState;var Dk={exports:{}},eh={},Rk={exports:{}},Pk={};/** + * @license React + * scheduler.production.js + * + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var D5;function uie(){return D5||(D5=1,(function(e){function n(N,z){var q=N.length;N.push(z);e:for(;0>>1,D=N[Y];if(0>>1;Yr($,q))Xr(ee,$)?(N[Y]=ee,N[X]=q,Y=X):(N[Y]=$,N[W]=q,Y=W);else if(Xr(ee,q))N[Y]=ee,N[X]=q,Y=X;else break e}}return z}function r(N,z){var q=N.sortIndex-z.sortIndex;return q!==0?q:N.id-z.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,l=o.now();e.unstable_now=function(){return o.now()-l}}var f=[],c=[],h=1,d=null,p=3,v=!1,b=!1,w=!1,k=!1,_=typeof setTimeout=="function"?setTimeout:null,C=typeof clearTimeout=="function"?clearTimeout:null,x=typeof setImmediate<"u"?setImmediate:null;function E(N){for(var z=t(c);z!==null;){if(z.callback===null)i(c);else if(z.startTime<=N)i(c),z.sortIndex=z.expirationTime,n(f,z);else break;z=t(c)}}function O(N){if(w=!1,E(N),!b)if(t(f)!==null)b=!0,j||(j=!0,B());else{var z=t(c);z!==null&&H(O,z.startTime-N)}}var j=!1,M=-1,P=5,F=-1;function R(){return k?!0:!(e.unstable_now()-FN&&R());){var Y=d.callback;if(typeof Y=="function"){d.callback=null,p=d.priorityLevel;var D=Y(d.expirationTime<=N);if(N=e.unstable_now(),typeof D=="function"){d.callback=D,E(N),z=!0;break n}d===t(f)&&i(f),E(N)}else i(f);d=t(f)}if(d!==null)z=!0;else{var V=t(c);V!==null&&H(O,V.startTime-N),z=!1}}break e}finally{d=null,p=q,v=!1}z=void 0}}finally{z?B():j=!1}}}var B;if(typeof x=="function")B=function(){x(L)};else if(typeof MessageChannel<"u"){var G=new MessageChannel,U=G.port2;G.port1.onmessage=L,B=function(){U.postMessage(null)}}else B=function(){_(L,0)};function H(N,z){M=_(function(){N(e.unstable_now())},z)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(N){N.callback=null},e.unstable_forceFrameRate=function(N){0>N||125Y?(N.sortIndex=q,n(c,N),t(f)===null&&N===t(c)&&(w?(C(M),M=-1):w=!0,H(O,q-Y))):(N.sortIndex=D,n(f,N),b||v||(b=!0,j||(j=!0,B()))),N},e.unstable_shouldYield=R,e.unstable_wrapCallback=function(N){var z=p;return function(){var q=p;p=z;try{return N.apply(this,arguments)}finally{p=q}}}})(Pk)),Pk}var R5;function fie(){return R5||(R5=1,Rk.exports=uie()),Rk.exports}/** + * @license React + * react-dom-client.production.js + * + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var P5;function cie(){if(P5)return eh;P5=1;var e=fie(),n=j6(),t=hz();function i(s){var u="https://react.dev/errors/"+s;if(1D||(s.current=Y[D],Y[D]=null,D--)}function $(s,u){D++,Y[D]=s.current,s.current=u}var X=V(null),ee=V(null),re=V(null),se=V(null);function ye(s,u){switch($(re,u),$(ee,s),$(X,null),u.nodeType){case 9:case 11:s=(s=u.documentElement)&&(s=s.namespaceURI)?RE(s):0;break;default:if(s=u.tagName,u=u.namespaceURI)u=RE(u),s=PE(u,s);else switch(s){case"svg":s=1;break;case"math":s=2;break;default:s=0}}W(X),$(X,s)}function ae(){W(X),W(ee),W(re)}function le(s){s.memoizedState!==null&&$(se,s);var u=X.current,m=PE(u,s.type);u!==m&&($(ee,s),$(X,m))}function _e(s){ee.current===s&&(W(X),W(ee)),se.current===s&&(W(se),Gd._currentValue=q)}var ne,ze;function we(s){if(ne===void 0)try{throw Error()}catch(m){var u=m.stack.trim().match(/\n( *(at )?)/);ne=u&&u[1]||"",ze=-1)":-1S||J[g]!==ce[S]){var Oe=` +`+J[g].replace(" at new "," at ");return s.displayName&&Oe.includes("")&&(Oe=Oe.replace("",s.displayName)),Oe}while(1<=g&&0<=S);break}}}finally{Ce=!1,Error.prepareStackTrace=m}return(m=s?s.displayName||s.name:"")?we(m):""}function ve(s,u){switch(s.tag){case 26:case 27:case 5:return we(s.type);case 16:return we("Lazy");case 13:return s.child!==u&&u!==null?we("Suspense Fallback"):we("Suspense");case 19:return we("SuspenseList");case 0:case 15:return Ne(s.type,!1);case 11:return Ne(s.type.render,!1);case 1:return Ne(s.type,!0);case 31:return we("Activity");default:return""}}function xe(s){try{var u="",m=null;do u+=ve(s,m),m=s,s=s.return;while(s);return u}catch(g){return` +Error generating stack: `+g.message+` +`+g.stack}}var Pe=Object.prototype.hasOwnProperty,ue=e.unstable_scheduleCallback,Be=e.unstable_cancelCallback,We=e.unstable_shouldYield,Ue=e.unstable_requestPaint,Xe=e.unstable_now,Qe=e.unstable_getCurrentPriorityLevel,ie=e.unstable_ImmediatePriority,he=e.unstable_UserBlockingPriority,Ge=e.unstable_NormalPriority,Je=e.unstable_LowPriority,Se=e.unstable_IdlePriority,tn=e.log,cn=e.unstable_setDisableYieldValue,On=null,mn=null;function an(s){if(typeof tn=="function"&&cn(s),mn&&typeof mn.setStrictMode=="function")try{mn.setStrictMode(On,s)}catch{}}var en=Math.clz32?Math.clz32:Fe,Rn=Math.log,De=Math.LN2;function Fe(s){return s>>>=0,s===0?32:31-(Rn(s)/De|0)|0}var jn=256,yn=262144,gn=4194304;function bn(s){var u=s&42;if(u!==0)return u;switch(s&-s){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return s&261888;case 262144:case 524288:case 1048576:case 2097152:return s&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return s&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return s}}function tt(s,u,m){var g=s.pendingLanes;if(g===0)return 0;var S=0,T=s.suspendedLanes,I=s.pingedLanes;s=s.warmLanes;var K=g&134217727;return K!==0?(g=K&~T,g!==0?S=bn(g):(I&=K,I!==0?S=bn(I):m||(m=K&~s,m!==0&&(S=bn(m))))):(K=g&~T,K!==0?S=bn(K):I!==0?S=bn(I):m||(m=g&~s,m!==0&&(S=bn(m)))),S===0?0:u!==0&&u!==S&&(u&T)===0&&(T=S&-S,m=u&-u,T>=m||T===32&&(m&4194048)!==0)?u:S}function wt(s,u){return(s.pendingLanes&~(s.suspendedLanes&~s.pingedLanes)&u)===0}function Le(s,u){switch(s){case 1:case 2:case 4:case 8:case 64:return u+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return u+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function qe(){var s=gn;return gn<<=1,(gn&62914560)===0&&(gn=4194304),s}function Nn(s){for(var u=[],m=0;31>m;m++)u.push(s);return u}function ot(s,u){s.pendingLanes|=u,u!==268435456&&(s.suspendedLanes=0,s.pingedLanes=0,s.warmLanes=0)}function Mn(s,u,m,g,S,T){var I=s.pendingLanes;s.pendingLanes=m,s.suspendedLanes=0,s.pingedLanes=0,s.warmLanes=0,s.expiredLanes&=m,s.entangledLanes&=m,s.errorRecoveryDisabledLanes&=m,s.shellSuspendCounter=0;var K=s.entanglements,J=s.expirationTimes,ce=s.hiddenUpdates;for(m=I&~m;0"u")return null;try{return s.activeElement||s.body}catch{return s.body}}var kp=/[\n"\\]/g;function ir(s){return s.replace(kp,function(u){return"\\"+u.charCodeAt(0).toString(16)+" "})}function fd(s,u,m,g,S,T,I,K){s.name="",I!=null&&typeof I!="function"&&typeof I!="symbol"&&typeof I!="boolean"?s.type=I:s.removeAttribute("type"),u!=null?I==="number"?(u===0&&s.value===""||s.value!=u)&&(s.value=""+tr(u)):s.value!==""+tr(u)&&(s.value=""+tr(u)):I!=="submit"&&I!=="reset"||s.removeAttribute("value"),u!=null?cd(s,I,tr(u)):m!=null?cd(s,I,tr(m)):g!=null&&s.removeAttribute("value"),S==null&&T!=null&&(s.defaultChecked=!!T),S!=null&&(s.checked=S&&typeof S!="function"&&typeof S!="symbol"),K!=null&&typeof K!="function"&&typeof K!="symbol"&&typeof K!="boolean"?s.name=""+tr(K):s.removeAttribute("name")}function _p(s,u,m,g,S,T,I,K){if(T!=null&&typeof T!="function"&&typeof T!="symbol"&&typeof T!="boolean"&&(s.type=T),u!=null||m!=null){if(!(T!=="submit"&&T!=="reset"||u!=null)){Hu(s);return}m=m!=null?""+tr(m):"",u=u!=null?""+tr(u):m,K||u===s.value||(s.value=u),s.defaultValue=u}g=g??S,g=typeof g!="function"&&typeof g!="symbol"&&!!g,s.checked=K?s.checked:!!g,s.defaultChecked=!!g,I!=null&&typeof I!="function"&&typeof I!="symbol"&&typeof I!="boolean"&&(s.name=I),Hu(s)}function cd(s,u,m){u==="number"&&El(s.ownerDocument)===s||s.defaultValue===""+m||(s.defaultValue=""+m)}function bs(s,u,m,g){if(s=s.options,u){u={};for(var S=0;S"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Dl=!1;if(Wi)try{var Xa={};Object.defineProperty(Xa,"passive",{get:function(){Dl=!0}}),window.addEventListener("test",Xa,Xa),window.removeEventListener("test",Xa,Xa)}catch{Dl=!1}var Tr=null,Ri=null,ws=null;function xp(){if(ws)return ws;var s,u=Ri,m=u.length,g,S="value"in Tr?Tr.value:Tr.textContent,T=S.length;for(s=0;s=md),BA=" ",FA=!1;function qA(s,u){switch(s){case"keyup":return bG.indexOf(u.keyCode)!==-1;case"keydown":return u.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function HA(s){return s=s.detail,typeof s=="object"&&"data"in s?s.data:null}var Wu=!1;function kG(s,u){switch(s){case"compositionend":return HA(u);case"keypress":return u.which!==32?null:(FA=!0,BA);case"textInput":return s=u.data,s===BA&&FA?null:s;default:return null}}function _G(s,u){if(Wu)return s==="compositionend"||!ob&&qA(s,u)?(s=xp(),ws=Ri=Tr=null,Wu=!1,s):null;switch(s){case"paste":return null;case"keypress":if(!(u.ctrlKey||u.altKey||u.metaKey)||u.ctrlKey&&u.altKey){if(u.char&&1=u)return{node:m,offset:u-s};s=g}e:{for(;m;){if(m.nextSibling){m=m.nextSibling;break e}m=m.parentNode}m=void 0}m=ZA(m)}}function JA(s,u){return s&&u?s===u?!0:s&&s.nodeType===3?!1:u&&u.nodeType===3?JA(s,u.parentNode):"contains"in s?s.contains(u):s.compareDocumentPosition?!!(s.compareDocumentPosition(u)&16):!1:!1}function eO(s){s=s!=null&&s.ownerDocument!=null&&s.ownerDocument.defaultView!=null?s.ownerDocument.defaultView:window;for(var u=El(s.document);u instanceof s.HTMLIFrameElement;){try{var m=typeof u.contentWindow.location.href=="string"}catch{m=!1}if(m)s=u.contentWindow;else break;u=El(s.document)}return u}function ub(s){var u=s&&s.nodeName&&s.nodeName.toLowerCase();return u&&(u==="input"&&(s.type==="text"||s.type==="search"||s.type==="tel"||s.type==="url"||s.type==="password")||u==="textarea"||s.contentEditable==="true")}var TG=Wi&&"documentMode"in document&&11>=document.documentMode,Gu=null,fb=null,yd=null,cb=!1;function nO(s,u,m){var g=m.window===m?m.document:m.nodeType===9?m:m.ownerDocument;cb||Gu==null||Gu!==El(g)||(g=Gu,"selectionStart"in g&&ub(g)?g={start:g.selectionStart,end:g.selectionEnd}:(g=(g.ownerDocument&&g.ownerDocument.defaultView||window).getSelection(),g={anchorNode:g.anchorNode,anchorOffset:g.anchorOffset,focusNode:g.focusNode,focusOffset:g.focusOffset}),yd&&gd(yd,g)||(yd=g,g=mv(fb,"onSelect"),0>=I,S-=I,Za=1<<32-en(u)+S|m<Fn?(nt=fn,fn=null):nt=fn.sibling;var ft=de(oe,fn,fe[Fn],Ee);if(ft===null){fn===null&&(fn=nt);break}s&&fn&&ft.alternate===null&&u(oe,fn),te=T(ft,te,Fn),ut===null?pn=ft:ut.sibling=ft,ut=ft,fn=nt}if(Fn===fe.length)return m(oe,fn),it&&Co(oe,Fn),pn;if(fn===null){for(;FnFn?(nt=fn,fn=null):nt=fn.sibling;var qs=de(oe,fn,ft.value,Ee);if(qs===null){fn===null&&(fn=nt);break}s&&fn&&qs.alternate===null&&u(oe,fn),te=T(qs,te,Fn),ut===null?pn=qs:ut.sibling=qs,ut=qs,fn=nt}if(ft.done)return m(oe,fn),it&&Co(oe,Fn),pn;if(fn===null){for(;!ft.done;Fn++,ft=fe.next())ft=Me(oe,ft.value,Ee),ft!==null&&(te=T(ft,te,Fn),ut===null?pn=ft:ut.sibling=ft,ut=ft);return it&&Co(oe,Fn),pn}for(fn=g(fn);!ft.done;Fn++,ft=fe.next())ft=ke(fn,oe,Fn,ft.value,Ee),ft!==null&&(s&&ft.alternate!==null&&fn.delete(ft.key===null?Fn:ft.key),te=T(ft,te,Fn),ut===null?pn=ft:ut.sibling=ft,ut=ft);return s&&fn.forEach(function(XY){return u(oe,XY)}),it&&Co(oe,Fn),pn}function Ct(oe,te,fe,Ee){if(typeof fe=="object"&&fe!==null&&fe.type===w&&fe.key===null&&(fe=fe.props.children),typeof fe=="object"&&fe!==null){switch(fe.$$typeof){case v:e:{for(var pn=fe.key;te!==null;){if(te.key===pn){if(pn=fe.type,pn===w){if(te.tag===7){m(oe,te.sibling),Ee=S(te,fe.props.children),Ee.return=oe,oe=Ee;break e}}else if(te.elementType===pn||typeof pn=="object"&&pn!==null&&pn.$$typeof===P&&ql(pn)===te.type){m(oe,te.sibling),Ee=S(te,fe.props),Sd(Ee,fe),Ee.return=oe,oe=Ee;break e}m(oe,te);break}else u(oe,te);te=te.sibling}fe.type===w?(Ee=zl(fe.props.children,oe.mode,Ee,fe.key),Ee.return=oe,oe=Ee):(Ee=Mp(fe.type,fe.key,fe.props,null,oe.mode,Ee),Sd(Ee,fe),Ee.return=oe,oe=Ee)}return I(oe);case b:e:{for(pn=fe.key;te!==null;){if(te.key===pn)if(te.tag===4&&te.stateNode.containerInfo===fe.containerInfo&&te.stateNode.implementation===fe.implementation){m(oe,te.sibling),Ee=S(te,fe.children||[]),Ee.return=oe,oe=Ee;break e}else{m(oe,te);break}else u(oe,te);te=te.sibling}Ee=yb(fe,oe.mode,Ee),Ee.return=oe,oe=Ee}return I(oe);case P:return fe=ql(fe),Ct(oe,te,fe,Ee)}if(H(fe))return ln(oe,te,fe,Ee);if(B(fe)){if(pn=B(fe),typeof pn!="function")throw Error(i(150));return fe=pn.call(fe),_n(oe,te,fe,Ee)}if(typeof fe.then=="function")return Ct(oe,te,Lp(fe),Ee);if(fe.$$typeof===x)return Ct(oe,te,Pp(oe,fe),Ee);Ip(oe,fe)}return typeof fe=="string"&&fe!==""||typeof fe=="number"||typeof fe=="bigint"?(fe=""+fe,te!==null&&te.tag===6?(m(oe,te.sibling),Ee=S(te,fe),Ee.return=oe,oe=Ee):(m(oe,te),Ee=gb(fe,oe.mode,Ee),Ee.return=oe,oe=Ee),I(oe)):m(oe,te)}return function(oe,te,fe,Ee){try{xd=0;var pn=Ct(oe,te,fe,Ee);return af=null,pn}catch(fn){if(fn===rf||fn===$p)throw fn;var ut=Dr(29,fn,null,oe.mode);return ut.lanes=Ee,ut.return=oe,ut}finally{}}}var Ul=SO(!0),CO=SO(!1),Cs=!1;function Tb(s){s.updateQueue={baseState:s.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Mb(s,u){s=s.updateQueue,u.updateQueue===s&&(u.updateQueue={baseState:s.baseState,firstBaseUpdate:s.firstBaseUpdate,lastBaseUpdate:s.lastBaseUpdate,shared:s.shared,callbacks:null})}function As(s){return{lane:s,tag:0,payload:null,callback:null,next:null}}function Os(s,u,m){var g=s.updateQueue;if(g===null)return null;if(g=g.shared,(pt&2)!==0){var S=g.pending;return S===null?u.next=u:(u.next=S.next,S.next=u),g.pending=u,u=Tp(s),lO(s,null,m),u}return Ep(s,g,u,m),Tp(s)}function Cd(s,u,m){if(u=u.updateQueue,u!==null&&(u=u.shared,(m&4194048)!==0)){var g=u.lanes;g&=s.pendingLanes,m|=g,u.lanes=m,rn(s,m)}}function Db(s,u){var m=s.updateQueue,g=s.alternate;if(g!==null&&(g=g.updateQueue,m===g)){var S=null,T=null;if(m=m.firstBaseUpdate,m!==null){do{var I={lane:m.lane,tag:m.tag,payload:m.payload,callback:null,next:null};T===null?S=T=I:T=T.next=I,m=m.next}while(m!==null);T===null?S=T=u:T=T.next=u}else S=T=u;m={baseState:g.baseState,firstBaseUpdate:S,lastBaseUpdate:T,shared:g.shared,callbacks:g.callbacks},s.updateQueue=m;return}s=m.lastBaseUpdate,s===null?m.firstBaseUpdate=u:s.next=u,m.lastBaseUpdate=u}var Rb=!1;function Ad(){if(Rb){var s=tf;if(s!==null)throw s}}function Od(s,u,m,g){Rb=!1;var S=s.updateQueue;Cs=!1;var T=S.firstBaseUpdate,I=S.lastBaseUpdate,K=S.shared.pending;if(K!==null){S.shared.pending=null;var J=K,ce=J.next;J.next=null,I===null?T=ce:I.next=ce,I=J;var Oe=s.alternate;Oe!==null&&(Oe=Oe.updateQueue,K=Oe.lastBaseUpdate,K!==I&&(K===null?Oe.firstBaseUpdate=ce:K.next=ce,Oe.lastBaseUpdate=J))}if(T!==null){var Me=S.baseState;I=0,Oe=ce=J=null,K=T;do{var de=K.lane&-536870913,ke=de!==K.lane;if(ke?(et&de)===de:(g&de)===de){de!==0&&de===nf&&(Rb=!0),Oe!==null&&(Oe=Oe.next={lane:0,tag:K.tag,payload:K.payload,callback:null,next:null});e:{var ln=s,_n=K;de=u;var Ct=m;switch(_n.tag){case 1:if(ln=_n.payload,typeof ln=="function"){Me=ln.call(Ct,Me,de);break e}Me=ln;break e;case 3:ln.flags=ln.flags&-65537|128;case 0:if(ln=_n.payload,de=typeof ln=="function"?ln.call(Ct,Me,de):ln,de==null)break e;Me=d({},Me,de);break e;case 2:Cs=!0}}de=K.callback,de!==null&&(s.flags|=64,ke&&(s.flags|=8192),ke=S.callbacks,ke===null?S.callbacks=[de]:ke.push(de))}else ke={lane:de,tag:K.tag,payload:K.payload,callback:K.callback,next:null},Oe===null?(ce=Oe=ke,J=Me):Oe=Oe.next=ke,I|=de;if(K=K.next,K===null){if(K=S.shared.pending,K===null)break;ke=K,K=ke.next,ke.next=null,S.lastBaseUpdate=ke,S.shared.pending=null}}while(!0);Oe===null&&(J=Me),S.baseState=J,S.firstBaseUpdate=ce,S.lastBaseUpdate=Oe,T===null&&(S.shared.lanes=0),Ds|=I,s.lanes=I,s.memoizedState=Me}}function AO(s,u){if(typeof s!="function")throw Error(i(191,s));s.call(u)}function OO(s,u){var m=s.callbacks;if(m!==null)for(s.callbacks=null,s=0;sT?T:8;var I=N.T,K={};N.T=K,Qb(s,!1,u,m);try{var J=S(),ce=N.S;if(ce!==null&&ce(K,J),J!==null&&typeof J=="object"&&typeof J.then=="function"){var Oe=IG(J,g);Td(s,u,Oe,zr(s))}else Td(s,u,g,zr(s))}catch(Me){Td(s,u,{then:function(){},status:"rejected",reason:Me},zr())}finally{z.p=T,I!==null&&K.types!==null&&(I.types=K.types),N.T=I}}function VG(){}function Xb(s,u,m,g){if(s.tag!==5)throw Error(i(476));var S=aj(s).queue;rj(s,S,u,q,m===null?VG:function(){return oj(s),m(g)})}function aj(s){var u=s.memoizedState;if(u!==null)return u;u={memoizedState:q,baseState:q,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Eo,lastRenderedState:q},next:null};var m={};return u.next={memoizedState:m,baseState:m,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Eo,lastRenderedState:m},next:null},s.memoizedState=u,s=s.alternate,s!==null&&(s.memoizedState=u),u}function oj(s){var u=aj(s);u.next===null&&(u=s.alternate.memoizedState),Td(s,u.next.queue,{},zr())}function Zb(){return Ni(Gd)}function sj(){return oi().memoizedState}function lj(){return oi().memoizedState}function WG(s){for(var u=s.return;u!==null;){switch(u.tag){case 24:case 3:var m=zr();s=As(m);var g=Os(u,s,m);g!==null&&(yr(g,u,m),Cd(g,u,m)),u={cache:Ab()},s.payload=u;return}u=u.return}}function GG(s,u,m){var g=zr();m={lane:g,revertLane:0,gesture:null,action:m,hasEagerState:!1,eagerState:null,next:null},Kp(s)?fj(u,m):(m=pb(s,u,m,g),m!==null&&(yr(m,s,g),cj(m,u,g)))}function uj(s,u,m){var g=zr();Td(s,u,m,g)}function Td(s,u,m,g){var S={lane:g,revertLane:0,gesture:null,action:m,hasEagerState:!1,eagerState:null,next:null};if(Kp(s))fj(u,S);else{var T=s.alternate;if(s.lanes===0&&(T===null||T.lanes===0)&&(T=u.lastRenderedReducer,T!==null))try{var I=u.lastRenderedState,K=T(I,m);if(S.hasEagerState=!0,S.eagerState=K,Mr(K,I))return Ep(s,u,S,0),jt===null&&jp(),!1}catch{}finally{}if(m=pb(s,u,S,g),m!==null)return yr(m,s,g),cj(m,u,g),!0}return!1}function Qb(s,u,m,g){if(g={lane:2,revertLane:Tw(),gesture:null,action:g,hasEagerState:!1,eagerState:null,next:null},Kp(s)){if(u)throw Error(i(479))}else u=pb(s,m,g,2),u!==null&&yr(u,s,2)}function Kp(s){var u=s.alternate;return s===zn||u!==null&&u===zn}function fj(s,u){sf=qp=!0;var m=s.pending;m===null?u.next=u:(u.next=m.next,m.next=u),s.pending=u}function cj(s,u,m){if((m&4194048)!==0){var g=u.lanes;g&=s.pendingLanes,m|=g,u.lanes=m,rn(s,m)}}var Md={readContext:Ni,use:Vp,useCallback:Qt,useContext:Qt,useEffect:Qt,useImperativeHandle:Qt,useLayoutEffect:Qt,useInsertionEffect:Qt,useMemo:Qt,useReducer:Qt,useRef:Qt,useState:Qt,useDebugValue:Qt,useDeferredValue:Qt,useTransition:Qt,useSyncExternalStore:Qt,useId:Qt,useHostTransitionStatus:Qt,useFormState:Qt,useActionState:Qt,useOptimistic:Qt,useMemoCache:Qt,useCacheRefresh:Qt};Md.useEffectEvent=Qt;var dj={readContext:Ni,use:Vp,useCallback:function(s,u){return sr().memoizedState=[s,u===void 0?null:u],s},useContext:Ni,useEffect:KO,useImperativeHandle:function(s,u,m){m=m!=null?m.concat([s]):null,Gp(4194308,4,JO.bind(null,u,s),m)},useLayoutEffect:function(s,u){return Gp(4194308,4,s,u)},useInsertionEffect:function(s,u){Gp(4,2,s,u)},useMemo:function(s,u){var m=sr();u=u===void 0?null:u;var g=s();if(Vl){an(!0);try{s()}finally{an(!1)}}return m.memoizedState=[g,u],g},useReducer:function(s,u,m){var g=sr();if(m!==void 0){var S=m(u);if(Vl){an(!0);try{m(u)}finally{an(!1)}}}else S=u;return g.memoizedState=g.baseState=S,s={pending:null,lanes:0,dispatch:null,lastRenderedReducer:s,lastRenderedState:S},g.queue=s,s=s.dispatch=GG.bind(null,zn,s),[g.memoizedState,s]},useRef:function(s){var u=sr();return s={current:s},u.memoizedState=s},useState:function(s){s=Vb(s);var u=s.queue,m=uj.bind(null,zn,u);return u.dispatch=m,[s.memoizedState,m]},useDebugValue:Yb,useDeferredValue:function(s,u){var m=sr();return Kb(m,s,u)},useTransition:function(){var s=Vb(!1);return s=rj.bind(null,zn,s.queue,!0,!1),sr().memoizedState=s,[!1,s]},useSyncExternalStore:function(s,u,m){var g=zn,S=sr();if(it){if(m===void 0)throw Error(i(407));m=m()}else{if(m=u(),jt===null)throw Error(i(349));(et&127)!==0||RO(g,u,m)}S.memoizedState=m;var T={value:m,getSnapshot:u};return S.queue=T,KO(NO.bind(null,g,T,s),[s]),g.flags|=2048,uf(9,{destroy:void 0},PO.bind(null,g,T,m,u),null),m},useId:function(){var s=sr(),u=jt.identifierPrefix;if(it){var m=Qa,g=Za;m=(g&~(1<<32-en(g)-1)).toString(32)+m,u="_"+u+"R_"+m,m=Hp++,0<\/script>",T=T.removeChild(T.firstChild);break;case"select":T=typeof g.is=="string"?I.createElement("select",{is:g.is}):I.createElement("select"),g.multiple?T.multiple=!0:g.size&&(T.size=g.size);break;default:T=typeof g.is=="string"?I.createElement(S,{is:g.is}):I.createElement(S)}}T[Qn]=u,T[Xt]=g;e:for(I=u.child;I!==null;){if(I.tag===5||I.tag===6)T.appendChild(I.stateNode);else if(I.tag!==4&&I.tag!==27&&I.child!==null){I.child.return=I,I=I.child;continue}if(I===u)break e;for(;I.sibling===null;){if(I.return===null||I.return===u)break e;I=I.return}I.sibling.return=I.return,I=I.sibling}u.stateNode=T;e:switch(zi(T,S,g),S){case"button":case"input":case"select":case"textarea":g=!!g.autoFocus;break e;case"img":g=!0;break e;default:g=!1}g&&Mo(u)}}return Ft(u),dw(u,u.type,s===null?null:s.memoizedProps,u.pendingProps,m),null;case 6:if(s&&u.stateNode!=null)s.memoizedProps!==g&&Mo(u);else{if(typeof g!="string"&&u.stateNode===null)throw Error(i(166));if(s=re.current,Ju(u)){if(s=u.stateNode,m=u.memoizedProps,g=null,S=Pi,S!==null)switch(S.tag){case 27:case 5:g=S.memoizedProps}s[Qn]=u,s=!!(s.nodeValue===m||g!==null&&g.suppressHydrationWarning===!0||ME(s.nodeValue,m)),s||xs(u,!0)}else s=pv(s).createTextNode(g),s[Qn]=u,u.stateNode=s}return Ft(u),null;case 31:if(m=u.memoizedState,s===null||s.memoizedState!==null){if(g=Ju(u),m!==null){if(s===null){if(!g)throw Error(i(318));if(s=u.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(i(557));s[Qn]=u}else Ll(),(u.flags&128)===0&&(u.memoizedState=null),u.flags|=4;Ft(u),s=!1}else m=_b(),s!==null&&s.memoizedState!==null&&(s.memoizedState.hydrationErrors=m),s=!0;if(!s)return u.flags&256?(Pr(u),u):(Pr(u),null);if((u.flags&128)!==0)throw Error(i(558))}return Ft(u),null;case 13:if(g=u.memoizedState,s===null||s.memoizedState!==null&&s.memoizedState.dehydrated!==null){if(S=Ju(u),g!==null&&g.dehydrated!==null){if(s===null){if(!S)throw Error(i(318));if(S=u.memoizedState,S=S!==null?S.dehydrated:null,!S)throw Error(i(317));S[Qn]=u}else Ll(),(u.flags&128)===0&&(u.memoizedState=null),u.flags|=4;Ft(u),S=!1}else S=_b(),s!==null&&s.memoizedState!==null&&(s.memoizedState.hydrationErrors=S),S=!0;if(!S)return u.flags&256?(Pr(u),u):(Pr(u),null)}return Pr(u),(u.flags&128)!==0?(u.lanes=m,u):(m=g!==null,s=s!==null&&s.memoizedState!==null,m&&(g=u.child,S=null,g.alternate!==null&&g.alternate.memoizedState!==null&&g.alternate.memoizedState.cachePool!==null&&(S=g.alternate.memoizedState.cachePool.pool),T=null,g.memoizedState!==null&&g.memoizedState.cachePool!==null&&(T=g.memoizedState.cachePool.pool),T!==S&&(g.flags|=2048)),m!==s&&m&&(u.child.flags|=8192),ev(u,u.updateQueue),Ft(u),null);case 4:return ae(),s===null&&Pw(u.stateNode.containerInfo),Ft(u),null;case 10:return Oo(u.type),Ft(u),null;case 19:if(W(ai),g=u.memoizedState,g===null)return Ft(u),null;if(S=(u.flags&128)!==0,T=g.rendering,T===null)if(S)Rd(g,!1);else{if(Jt!==0||s!==null&&(s.flags&128)!==0)for(s=u.child;s!==null;){if(T=Fp(s),T!==null){for(u.flags|=128,Rd(g,!1),s=T.updateQueue,u.updateQueue=s,ev(u,s),u.subtreeFlags=0,s=m,m=u.child;m!==null;)uO(m,s),m=m.sibling;return $(ai,ai.current&1|2),it&&Co(u,g.treeForkCount),u.child}s=s.sibling}g.tail!==null&&Xe()>av&&(u.flags|=128,S=!0,Rd(g,!1),u.lanes=4194304)}else{if(!S)if(s=Fp(T),s!==null){if(u.flags|=128,S=!0,s=s.updateQueue,u.updateQueue=s,ev(u,s),Rd(g,!0),g.tail===null&&g.tailMode==="hidden"&&!T.alternate&&!it)return Ft(u),null}else 2*Xe()-g.renderingStartTime>av&&m!==536870912&&(u.flags|=128,S=!0,Rd(g,!1),u.lanes=4194304);g.isBackwards?(T.sibling=u.child,u.child=T):(s=g.last,s!==null?s.sibling=T:u.child=T,g.last=T)}return g.tail!==null?(s=g.tail,g.rendering=s,g.tail=s.sibling,g.renderingStartTime=Xe(),s.sibling=null,m=ai.current,$(ai,S?m&1|2:m&1),it&&Co(u,g.treeForkCount),s):(Ft(u),null);case 22:case 23:return Pr(u),Nb(),g=u.memoizedState!==null,s!==null?s.memoizedState!==null!==g&&(u.flags|=8192):g&&(u.flags|=8192),g?(m&536870912)!==0&&(u.flags&128)===0&&(Ft(u),u.subtreeFlags&6&&(u.flags|=8192)):Ft(u),m=u.updateQueue,m!==null&&ev(u,m.retryQueue),m=null,s!==null&&s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(m=s.memoizedState.cachePool.pool),g=null,u.memoizedState!==null&&u.memoizedState.cachePool!==null&&(g=u.memoizedState.cachePool.pool),g!==m&&(u.flags|=2048),s!==null&&W(Fl),null;case 24:return m=null,s!==null&&(m=s.memoizedState.cache),u.memoizedState.cache!==m&&(u.flags|=2048),Oo(ui),Ft(u),null;case 25:return null;case 30:return null}throw Error(i(156,u.tag))}function QG(s,u){switch(wb(u),u.tag){case 1:return s=u.flags,s&65536?(u.flags=s&-65537|128,u):null;case 3:return Oo(ui),ae(),s=u.flags,(s&65536)!==0&&(s&128)===0?(u.flags=s&-65537|128,u):null;case 26:case 27:case 5:return _e(u),null;case 31:if(u.memoizedState!==null){if(Pr(u),u.alternate===null)throw Error(i(340));Ll()}return s=u.flags,s&65536?(u.flags=s&-65537|128,u):null;case 13:if(Pr(u),s=u.memoizedState,s!==null&&s.dehydrated!==null){if(u.alternate===null)throw Error(i(340));Ll()}return s=u.flags,s&65536?(u.flags=s&-65537|128,u):null;case 19:return W(ai),null;case 4:return ae(),null;case 10:return Oo(u.type),null;case 22:case 23:return Pr(u),Nb(),s!==null&&W(Fl),s=u.flags,s&65536?(u.flags=s&-65537|128,u):null;case 24:return Oo(ui),null;case 25:return null;default:return null}}function $j(s,u){switch(wb(u),u.tag){case 3:Oo(ui),ae();break;case 26:case 27:case 5:_e(u);break;case 4:ae();break;case 31:u.memoizedState!==null&&Pr(u);break;case 13:Pr(u);break;case 19:W(ai);break;case 10:Oo(u.type);break;case 22:case 23:Pr(u),Nb(),s!==null&&W(Fl);break;case 24:Oo(ui)}}function Pd(s,u){try{var m=u.updateQueue,g=m!==null?m.lastEffect:null;if(g!==null){var S=g.next;m=S;do{if((m.tag&s)===s){g=void 0;var T=m.create,I=m.inst;g=T(),I.destroy=g}m=m.next}while(m!==S)}}catch(K){bt(u,u.return,K)}}function Ts(s,u,m){try{var g=u.updateQueue,S=g!==null?g.lastEffect:null;if(S!==null){var T=S.next;g=T;do{if((g.tag&s)===s){var I=g.inst,K=I.destroy;if(K!==void 0){I.destroy=void 0,S=u;var J=m,ce=K;try{ce()}catch(Oe){bt(S,J,Oe)}}}g=g.next}while(g!==T)}}catch(Oe){bt(u,u.return,Oe)}}function zj(s){var u=s.updateQueue;if(u!==null){var m=s.stateNode;try{OO(u,m)}catch(g){bt(s,s.return,g)}}}function Lj(s,u,m){m.props=Wl(s.type,s.memoizedProps),m.state=s.memoizedState;try{m.componentWillUnmount()}catch(g){bt(s,u,g)}}function Nd(s,u){try{var m=s.ref;if(m!==null){switch(s.tag){case 26:case 27:case 5:var g=s.stateNode;break;case 30:g=s.stateNode;break;default:g=s.stateNode}typeof m=="function"?s.refCleanup=m(g):m.current=g}}catch(S){bt(s,u,S)}}function Ja(s,u){var m=s.ref,g=s.refCleanup;if(m!==null)if(typeof g=="function")try{g()}catch(S){bt(s,u,S)}finally{s.refCleanup=null,s=s.alternate,s!=null&&(s.refCleanup=null)}else if(typeof m=="function")try{m(null)}catch(S){bt(s,u,S)}else m.current=null}function Ij(s){var u=s.type,m=s.memoizedProps,g=s.stateNode;try{e:switch(u){case"button":case"input":case"select":case"textarea":m.autoFocus&&g.focus();break e;case"img":m.src?g.src=m.src:m.srcSet&&(g.srcset=m.srcSet)}}catch(S){bt(s,s.return,S)}}function hw(s,u,m){try{var g=s.stateNode;wY(g,s.type,m,u),g[Xt]=u}catch(S){bt(s,s.return,S)}}function Bj(s){return s.tag===5||s.tag===3||s.tag===26||s.tag===27&&zs(s.type)||s.tag===4}function mw(s){e:for(;;){for(;s.sibling===null;){if(s.return===null||Bj(s.return))return null;s=s.return}for(s.sibling.return=s.return,s=s.sibling;s.tag!==5&&s.tag!==6&&s.tag!==18;){if(s.tag===27&&zs(s.type)||s.flags&2||s.child===null||s.tag===4)continue e;s.child.return=s,s=s.child}if(!(s.flags&2))return s.stateNode}}function pw(s,u,m){var g=s.tag;if(g===5||g===6)s=s.stateNode,u?(m.nodeType===9?m.body:m.nodeName==="HTML"?m.ownerDocument.body:m).insertBefore(s,u):(u=m.nodeType===9?m.body:m.nodeName==="HTML"?m.ownerDocument.body:m,u.appendChild(s),m=m._reactRootContainer,m!=null||u.onclick!==null||(u.onclick=Pt));else if(g!==4&&(g===27&&zs(s.type)&&(m=s.stateNode,u=null),s=s.child,s!==null))for(pw(s,u,m),s=s.sibling;s!==null;)pw(s,u,m),s=s.sibling}function nv(s,u,m){var g=s.tag;if(g===5||g===6)s=s.stateNode,u?m.insertBefore(s,u):m.appendChild(s);else if(g!==4&&(g===27&&zs(s.type)&&(m=s.stateNode),s=s.child,s!==null))for(nv(s,u,m),s=s.sibling;s!==null;)nv(s,u,m),s=s.sibling}function Fj(s){var u=s.stateNode,m=s.memoizedProps;try{for(var g=s.type,S=u.attributes;S.length;)u.removeAttributeNode(S[0]);zi(u,g,m),u[Qn]=s,u[Xt]=m}catch(T){bt(s,s.return,T)}}var Do=!1,di=!1,vw=!1,qj=typeof WeakSet=="function"?WeakSet:Set,Ai=null;function JG(s,u){if(s=s.containerInfo,zw=_v,s=eO(s),ub(s)){if("selectionStart"in s)var m={start:s.selectionStart,end:s.selectionEnd};else e:{m=(m=s.ownerDocument)&&m.defaultView||window;var g=m.getSelection&&m.getSelection();if(g&&g.rangeCount!==0){m=g.anchorNode;var S=g.anchorOffset,T=g.focusNode;g=g.focusOffset;try{m.nodeType,T.nodeType}catch{m=null;break e}var I=0,K=-1,J=-1,ce=0,Oe=0,Me=s,de=null;n:for(;;){for(var ke;Me!==m||S!==0&&Me.nodeType!==3||(K=I+S),Me!==T||g!==0&&Me.nodeType!==3||(J=I+g),Me.nodeType===3&&(I+=Me.nodeValue.length),(ke=Me.firstChild)!==null;)de=Me,Me=ke;for(;;){if(Me===s)break n;if(de===m&&++ce===S&&(K=I),de===T&&++Oe===g&&(J=I),(ke=Me.nextSibling)!==null)break;Me=de,de=Me.parentNode}Me=ke}m=K===-1||J===-1?null:{start:K,end:J}}else m=null}m=m||{start:0,end:0}}else m=null;for(Lw={focusedElem:s,selectionRange:m},_v=!1,Ai=u;Ai!==null;)if(u=Ai,s=u.child,(u.subtreeFlags&1028)!==0&&s!==null)s.return=u,Ai=s;else for(;Ai!==null;){switch(u=Ai,T=u.alternate,s=u.flags,u.tag){case 0:if((s&4)!==0&&(s=u.updateQueue,s=s!==null?s.events:null,s!==null))for(m=0;m title"))),zi(T,g,m),T[Qn]=s,un(T),g=T;break e;case"link":var I=YE("link","href",S).get(g+(m.href||""));if(I){for(var K=0;KCt&&(I=Ct,Ct=_n,_n=I);var oe=QA(K,_n),te=QA(K,Ct);if(oe&&te&&(ke.rangeCount!==1||ke.anchorNode!==oe.node||ke.anchorOffset!==oe.offset||ke.focusNode!==te.node||ke.focusOffset!==te.offset)){var fe=Me.createRange();fe.setStart(oe.node,oe.offset),ke.removeAllRanges(),_n>Ct?(ke.addRange(fe),ke.extend(te.node,te.offset)):(fe.setEnd(te.node,te.offset),ke.addRange(fe))}}}}for(Me=[],ke=K;ke=ke.parentNode;)ke.nodeType===1&&Me.push({element:ke,left:ke.scrollLeft,top:ke.scrollTop});for(typeof K.focus=="function"&&K.focus(),K=0;Km?32:m,N.T=null,m=xw,xw=null;var T=Ps,I=zo;if(gi=0,mf=Ps=null,zo=0,(pt&6)!==0)throw Error(i(331));var K=pt;if(pt|=4,Jj(T.current),Xj(T,T.current,I,m),pt=K,Fd(0,!1),mn&&typeof mn.onPostCommitFiberRoot=="function")try{mn.onPostCommitFiberRoot(On,T)}catch{}return!0}finally{z.p=S,N.T=g,gE(s,u)}}function bE(s,u,m){u=Qr(m,u),u=tw(s.stateNode,u,2),s=Os(s,u,2),s!==null&&(ot(s,2),eo(s))}function bt(s,u,m){if(s.tag===3)bE(s,s,m);else for(;u!==null;){if(u.tag===3){bE(u,s,m);break}else if(u.tag===1){var g=u.stateNode;if(typeof u.type.getDerivedStateFromError=="function"||typeof g.componentDidCatch=="function"&&(Rs===null||!Rs.has(g))){s=Qr(m,s),m=wj(2),g=Os(u,m,2),g!==null&&(kj(m,g,u,s),ot(g,2),eo(g));break}}u=u.return}}function Ow(s,u,m){var g=s.pingCache;if(g===null){g=s.pingCache=new tY;var S=new Set;g.set(u,S)}else S=g.get(u),S===void 0&&(S=new Set,g.set(u,S));S.has(m)||(bw=!0,S.add(m),s=sY.bind(null,s,u,m),u.then(s,s))}function sY(s,u,m){var g=s.pingCache;g!==null&&g.delete(u),s.pingedLanes|=s.suspendedLanes&m,s.warmLanes&=~m,jt===s&&(et&m)===m&&(Jt===4||Jt===3&&(et&62914560)===et&&300>Xe()-rv?(pt&2)===0&&pf(s,0):ww|=m,hf===et&&(hf=0)),eo(s)}function wE(s,u){u===0&&(u=qe()),s=$l(s,u),s!==null&&(ot(s,u),eo(s))}function lY(s){var u=s.memoizedState,m=0;u!==null&&(m=u.retryLane),wE(s,m)}function uY(s,u){var m=0;switch(s.tag){case 31:case 13:var g=s.stateNode,S=s.memoizedState;S!==null&&(m=S.retryLane);break;case 19:g=s.stateNode;break;case 22:g=s.stateNode._retryCache;break;default:throw Error(i(314))}g!==null&&g.delete(u),wE(s,m)}function fY(s,u){return ue(s,u)}var cv=null,gf=null,jw=!1,dv=!1,Ew=!1,$s=0;function eo(s){s!==gf&&s.next===null&&(gf===null?cv=gf=s:gf=gf.next=s),dv=!0,jw||(jw=!0,dY())}function Fd(s,u){if(!Ew&&dv){Ew=!0;do for(var m=!1,g=cv;g!==null;){if(s!==0){var S=g.pendingLanes;if(S===0)var T=0;else{var I=g.suspendedLanes,K=g.pingedLanes;T=(1<<31-en(42|s)+1)-1,T&=S&~(I&~K),T=T&201326741?T&201326741|1:T?T|2:0}T!==0&&(m=!0,SE(g,T))}else T=et,T=tt(g,g===jt?T:0,g.cancelPendingCommit!==null||g.timeoutHandle!==-1),(T&3)===0||wt(g,T)||(m=!0,SE(g,T));g=g.next}while(m);Ew=!1}}function cY(){kE()}function kE(){dv=jw=!1;var s=0;$s!==0&&_Y()&&(s=$s);for(var u=Xe(),m=null,g=cv;g!==null;){var S=g.next,T=_E(g,u);T===0?(g.next=null,m===null?cv=S:m.next=S,S===null&&(gf=m)):(m=g,(s!==0||(T&3)!==0)&&(dv=!0)),g=S}gi!==0&&gi!==5||Fd(s),$s!==0&&($s=0)}function _E(s,u){for(var m=s.suspendedLanes,g=s.pingedLanes,S=s.expirationTimes,T=s.pendingLanes&-62914561;0K)break;var Oe=J.transferSize,Me=J.initiatorType;Oe&&DE(Me)&&(J=J.responseEnd,I+=Oe*(J"u"?null:document;function UE(s,u,m){var g=yf;if(g&&typeof u=="string"&&u){var S=ir(u);S='link[rel="'+s+'"][href="'+S+'"]',typeof m=="string"&&(S+='[crossorigin="'+m+'"]'),HE.has(S)||(HE.add(S),s={rel:s,crossOrigin:m,href:u},g.querySelector(S)===null&&(u=g.createElement("link"),zi(u,"link",s),un(u),g.head.appendChild(u)))}}function MY(s){Lo.D(s),UE("dns-prefetch",s,null)}function DY(s,u){Lo.C(s,u),UE("preconnect",s,u)}function RY(s,u,m){Lo.L(s,u,m);var g=yf;if(g&&s&&u){var S='link[rel="preload"][as="'+ir(u)+'"]';u==="image"&&m&&m.imageSrcSet?(S+='[imagesrcset="'+ir(m.imageSrcSet)+'"]',typeof m.imageSizes=="string"&&(S+='[imagesizes="'+ir(m.imageSizes)+'"]')):S+='[href="'+ir(s)+'"]';var T=S;switch(u){case"style":T=bf(s);break;case"script":T=wf(s)}ra.has(T)||(s=d({rel:"preload",href:u==="image"&&m&&m.imageSrcSet?void 0:s,as:u},m),ra.set(T,s),g.querySelector(S)!==null||u==="style"&&g.querySelector(Vd(T))||u==="script"&&g.querySelector(Wd(T))||(u=g.createElement("link"),zi(u,"link",s),un(u),g.head.appendChild(u)))}}function PY(s,u){Lo.m(s,u);var m=yf;if(m&&s){var g=u&&typeof u.as=="string"?u.as:"script",S='link[rel="modulepreload"][as="'+ir(g)+'"][href="'+ir(s)+'"]',T=S;switch(g){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":T=wf(s)}if(!ra.has(T)&&(s=d({rel:"modulepreload",href:s},u),ra.set(T,s),m.querySelector(S)===null)){switch(g){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(m.querySelector(Wd(T)))return}g=m.createElement("link"),zi(g,"link",s),un(g),m.head.appendChild(g)}}}function NY(s,u,m){Lo.S(s,u,m);var g=yf;if(g&&s){var S=ii(g).hoistableStyles,T=bf(s);u=u||"default";var I=S.get(T);if(!I){var K={loading:0,preload:null};if(I=g.querySelector(Vd(T)))K.loading=5;else{s=d({rel:"stylesheet",href:s,"data-precedence":u},m),(m=ra.get(T))&&Vw(s,m);var J=I=g.createElement("link");un(J),zi(J,"link",s),J._p=new Promise(function(ce,Oe){J.onload=ce,J.onerror=Oe}),J.addEventListener("load",function(){K.loading|=1}),J.addEventListener("error",function(){K.loading|=2}),K.loading|=4,gv(I,u,g)}I={type:"stylesheet",instance:I,count:1,state:K},S.set(T,I)}}}function $Y(s,u){Lo.X(s,u);var m=yf;if(m&&s){var g=ii(m).hoistableScripts,S=wf(s),T=g.get(S);T||(T=m.querySelector(Wd(S)),T||(s=d({src:s,async:!0},u),(u=ra.get(S))&&Ww(s,u),T=m.createElement("script"),un(T),zi(T,"link",s),m.head.appendChild(T)),T={type:"script",instance:T,count:1,state:null},g.set(S,T))}}function zY(s,u){Lo.M(s,u);var m=yf;if(m&&s){var g=ii(m).hoistableScripts,S=wf(s),T=g.get(S);T||(T=m.querySelector(Wd(S)),T||(s=d({src:s,async:!0,type:"module"},u),(u=ra.get(S))&&Ww(s,u),T=m.createElement("script"),un(T),zi(T,"link",s),m.head.appendChild(T)),T={type:"script",instance:T,count:1,state:null},g.set(S,T))}}function VE(s,u,m,g){var S=(S=re.current)?vv(S):null;if(!S)throw Error(i(446));switch(s){case"meta":case"title":return null;case"style":return typeof m.precedence=="string"&&typeof m.href=="string"?(u=bf(m.href),m=ii(S).hoistableStyles,g=m.get(u),g||(g={type:"style",instance:null,count:0,state:null},m.set(u,g)),g):{type:"void",instance:null,count:0,state:null};case"link":if(m.rel==="stylesheet"&&typeof m.href=="string"&&typeof m.precedence=="string"){s=bf(m.href);var T=ii(S).hoistableStyles,I=T.get(s);if(I||(S=S.ownerDocument||S,I={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},T.set(s,I),(T=S.querySelector(Vd(s)))&&!T._p&&(I.instance=T,I.state.loading=5),ra.has(s)||(m={rel:"preload",as:"style",href:m.href,crossOrigin:m.crossOrigin,integrity:m.integrity,media:m.media,hrefLang:m.hrefLang,referrerPolicy:m.referrerPolicy},ra.set(s,m),T||LY(S,s,m,I.state))),u&&g===null)throw Error(i(528,""));return I}if(u&&g!==null)throw Error(i(529,""));return null;case"script":return u=m.async,m=m.src,typeof m=="string"&&u&&typeof u!="function"&&typeof u!="symbol"?(u=wf(m),m=ii(S).hoistableScripts,g=m.get(u),g||(g={type:"script",instance:null,count:0,state:null},m.set(u,g)),g):{type:"void",instance:null,count:0,state:null};default:throw Error(i(444,s))}}function bf(s){return'href="'+ir(s)+'"'}function Vd(s){return'link[rel="stylesheet"]['+s+"]"}function WE(s){return d({},s,{"data-precedence":s.precedence,precedence:null})}function LY(s,u,m,g){s.querySelector('link[rel="preload"][as="style"]['+u+"]")?g.loading=1:(u=s.createElement("link"),g.preload=u,u.addEventListener("load",function(){return g.loading|=1}),u.addEventListener("error",function(){return g.loading|=2}),zi(u,"link",m),un(u),s.head.appendChild(u))}function wf(s){return'[src="'+ir(s)+'"]'}function Wd(s){return"script[async]"+s}function GE(s,u,m){if(u.count++,u.instance===null)switch(u.type){case"style":var g=s.querySelector('style[data-href~="'+ir(m.href)+'"]');if(g)return u.instance=g,un(g),g;var S=d({},m,{"data-href":m.href,"data-precedence":m.precedence,href:null,precedence:null});return g=(s.ownerDocument||s).createElement("style"),un(g),zi(g,"style",S),gv(g,m.precedence,s),u.instance=g;case"stylesheet":S=bf(m.href);var T=s.querySelector(Vd(S));if(T)return u.state.loading|=4,u.instance=T,un(T),T;g=WE(m),(S=ra.get(S))&&Vw(g,S),T=(s.ownerDocument||s).createElement("link"),un(T);var I=T;return I._p=new Promise(function(K,J){I.onload=K,I.onerror=J}),zi(T,"link",g),u.state.loading|=4,gv(T,m.precedence,s),u.instance=T;case"script":return T=wf(m.src),(S=s.querySelector(Wd(T)))?(u.instance=S,un(S),S):(g=m,(S=ra.get(T))&&(g=d({},m),Ww(g,S)),s=s.ownerDocument||s,S=s.createElement("script"),un(S),zi(S,"link",g),s.head.appendChild(S),u.instance=S);case"void":return null;default:throw Error(i(443,u.type))}else u.type==="stylesheet"&&(u.state.loading&4)===0&&(g=u.instance,u.state.loading|=4,gv(g,m.precedence,s));return u.instance}function gv(s,u,m){for(var g=m.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),S=g.length?g[g.length-1]:null,T=S,I=0;I title"):null)}function IY(s,u,m){if(m===1||u.itemProp!=null)return!1;switch(s){case"meta":case"title":return!0;case"style":if(typeof u.precedence!="string"||typeof u.href!="string"||u.href==="")break;return!0;case"link":if(typeof u.rel!="string"||typeof u.href!="string"||u.href===""||u.onLoad||u.onError)break;switch(u.rel){case"stylesheet":return s=u.disabled,typeof u.precedence=="string"&&s==null;default:return!0}case"script":if(u.async&&typeof u.async!="function"&&typeof u.async!="symbol"&&!u.onLoad&&!u.onError&&u.src&&typeof u.src=="string")return!0}return!1}function XE(s){return!(s.type==="stylesheet"&&(s.state.loading&3)===0)}function BY(s,u,m,g){if(m.type==="stylesheet"&&(typeof g.media!="string"||matchMedia(g.media).matches!==!1)&&(m.state.loading&4)===0){if(m.instance===null){var S=bf(g.href),T=u.querySelector(Vd(S));if(T){u=T._p,u!==null&&typeof u=="object"&&typeof u.then=="function"&&(s.count++,s=bv.bind(s),u.then(s,s)),m.state.loading|=4,m.instance=T,un(T);return}T=u.ownerDocument||u,g=WE(g),(S=ra.get(S))&&Vw(g,S),T=T.createElement("link"),un(T);var I=T;I._p=new Promise(function(K,J){I.onload=K,I.onerror=J}),zi(T,"link",g),m.instance=T}s.stylesheets===null&&(s.stylesheets=new Map),s.stylesheets.set(m,u),(u=m.state.preload)&&(m.state.loading&3)===0&&(s.count++,m=bv.bind(s),u.addEventListener("load",m),u.addEventListener("error",m))}}var Gw=0;function FY(s,u){return s.stylesheets&&s.count===0&&kv(s,s.stylesheets),0Gw?50:800)+u);return s.unsuspend=m,function(){s.unsuspend=null,clearTimeout(g),clearTimeout(S)}}:null}function bv(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)kv(this,this.stylesheets);else if(this.unsuspend){var s=this.unsuspend;this.unsuspend=null,s()}}}var wv=null;function kv(s,u){s.stylesheets=null,s.unsuspend!==null&&(s.count++,wv=new Map,u.forEach(qY,s),wv=null,bv.call(s))}function qY(s,u){if(!(u.state.loading&4)){var m=wv.get(s);if(m)var g=m.get(null);else{m=new Map,wv.set(s,m);for(var S=s.querySelectorAll("link[data-precedence],style[data-precedence]"),T=0;T"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(n){console.error(n)}}return e(),Dk.exports=cie(),Dk.exports}var hie=die();class IB extends Error{constructor(n,t){super(t),this.status=n,this.name="HTTPError"}}async function mie(e,n,t){const i=await fetch(`${t}${e}`,{credentials:"include",...n,headers:{"Content-Type":"application/json",...(n==null?void 0:n.headers)??{}}});if(!i.ok){const r=await i.json().catch(()=>({Message:i.statusText}));throw new IB(i.status,r.Message??r.message??i.statusText)}if(i.status!==204)return i.json()}const pie="/api";function mt(e,n){return mie(e,n,pie)}function vie(){return mt("/board")}function gie(){return mt("/flags")}function yie(e){return mt("/columns",{method:"POST",body:JSON.stringify({name:e})})}function Zl(e,n){return mt(`/columns/${e}`,{method:"PATCH",body:JSON.stringify(n)})}function bie(e){return mt(`/columns/${e}`,{method:"DELETE"})}function wie(e){return mt("/columns/reorder",{method:"POST",body:JSON.stringify({ids:e})})}function kie(e){return mt("/cards",{method:"POST",body:JSON.stringify(e)})}function Af(e,n){return mt(`/cards/${e}`,{method:"PATCH",body:JSON.stringify(n)})}function _ie(e){return mt(`/cards/${e}`,{method:"DELETE"})}function Nk(e,n){return mt(`/cards/${e}/stickers`,{method:"PUT",body:JSON.stringify({stickers:n})})}function xie(){return mt("/trash")}function Sie(e){return mt(`/cards/${e}/restore`,{method:"POST"})}function Cie(e){return mt(`/cards/${e}/purge`,{method:"DELETE"})}function Aie(){return mt("/archive")}function Oie(e){return mt(`/cards/${e}/archive`,{method:"POST"})}function jie(e){return mt(`/cards/${e}/unarchive`,{method:"POST"})}function Eie(e,n){const t=new URLSearchParams({date:e});return mt(`/reports/daily?${t.toString()}`)}function Tie(e,n,t){return mt(`/cards/${e}/move`,{method:"POST",body:JSON.stringify({column_id:n,ordered_ids:t})})}function Mie(e){return mt(`/cards/${e}/history`)}function Die(e){return mt(`/cards/${e}/messages`)}function Rie(e,n){return mt(`/cards/${e}/messages`,{method:"POST",body:JSON.stringify({body:n})})}function Pie(e,n){return mt(`/cards/${e}/messages/${n}`,{method:"DELETE"})}function Nie(e){return mt(`/cards/${e}/duplicate`,{method:"POST"})}function $ie(){return`${window.location.protocol==="https:"?"wss:":"ws:"}//${window.location.host}/api/chat/ws`}function zie(e,n,t){return new Promise((i,r)=>{const a=new WebSocket($ie());let o=!1;const l=f=>{if(!o){o=!0;try{a.close()}catch{}f?r(f):i()}};a.onopen=()=>{a.send(JSON.stringify({messages:e}))},a.onmessage=f=>{try{const c=JSON.parse(typeof f.data=="string"?f.data:"");n(c),(c.type==="done"||c.type==="error")&&l(c.type==="error"?new Error(c.error):void 0)}catch(c){l(c)}},a.onerror=()=>l(new Error("websocket error")),a.onclose=()=>l()})}function $5(e,n){return mt("/auth/login",{method:"POST",body:JSON.stringify({username:e,password:n})})}function Lie(e,n,t){return mt("/auth/register",{method:"POST",body:JSON.stringify({username:e,password:n,display_name:t})})}function Iie(){return mt("/auth/logout",{method:"POST"})}function Bie(){return mt("/me")}function z5(e){return mt("/me",{method:"PATCH",body:JSON.stringify(e)})}function BB(){return mt("/users")}function FB(){return mt("/tags")}function Fie(){return mt("/requesters")}function qB(e){const n=new URLSearchParams;e.from&&n.set("from",e.from),e.to&&n.set("to",e.to),e.assignee_id&&n.set("assignee_id",e.assignee_id),e.requester&&n.set("requester",e.requester),e.tags&&e.tags.length>0&&n.set("tags",e.tags.join(","));const t=n.toString();return mt(`/metrics${t?`?${t}`:""}`)}const HB=A.createContext(null);function qie({children:e}){const[n,t]=A.useState(null),[i,r]=A.useState(!0);A.useEffect(()=>{Bie().then(t).catch(f=>{(!(f instanceof IB)||f.status!==401)&&console.warn("getMe failed",f)}).finally(()=>r(!1))},[]);const a=A.useCallback(async(f,c)=>{const h=await $5(f,c);t(h)},[]),o=A.useCallback(async(f,c,h)=>{await Lie(f,c,h);const d=await $5(f,c);t(d)},[]),l=A.useCallback(async()=>{await Iie(),t(null)},[]);return y.jsx(HB.Provider,{value:{user:n,loading:i,login:a,register:o,logout:l,setUser:t},children:e})}function WC(){const e=A.useContext(HB);if(!e)throw new Error("useAuth: missing AuthProvider");return e}function Hie(){for(var e=arguments.length,n=new Array(e),t=0;ti=>{n.forEach(r=>r(i))},n)}const Zy=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function Uc(e){const n=Object.prototype.toString.call(e);return n==="[object Window]"||n==="[object global]"}function GC(e){return"nodeType"in e}function dr(e){var n,t;return e?Uc(e)?e:GC(e)&&(n=(t=e.ownerDocument)==null?void 0:t.defaultView)!=null?n:window:window}function YC(e){const{Document:n}=dr(e);return e instanceof n}function Jm(e){return Uc(e)?!1:e instanceof dr(e).HTMLElement}function UB(e){return e instanceof dr(e).SVGElement}function Vc(e){return e?Uc(e)?e.document:GC(e)?YC(e)?e:Jm(e)||UB(e)?e.ownerDocument:document:document:document}const Ua=Zy?A.useLayoutEffect:A.useEffect;function Qy(e){const n=A.useRef(e);return Ua(()=>{n.current=e}),A.useCallback(function(){for(var t=arguments.length,i=new Array(t),r=0;r{e.current=setInterval(i,r)},[]),t=A.useCallback(()=>{e.current!==null&&(clearInterval(e.current),e.current=null)},[]);return[n,t]}function Xh(e,n){n===void 0&&(n=[e]);const t=A.useRef(e);return Ua(()=>{t.current!==e&&(t.current=e)},n),t}function ep(e,n){const t=A.useRef();return A.useMemo(()=>{const i=e(t.current);return t.current=i,i},[...n])}function $g(e){const n=Qy(e),t=A.useRef(null),i=A.useCallback(r=>{r!==t.current&&(n==null||n(r,t.current)),t.current=r},[]);return[t,i]}function zg(e){const n=A.useRef();return A.useEffect(()=>{n.current=e},[e]),n.current}let $k={};function np(e,n){return A.useMemo(()=>{if(n)return n;const t=$k[e]==null?0:$k[e]+1;return $k[e]=t,e+"-"+t},[e,n])}function VB(e){return function(n){for(var t=arguments.length,i=new Array(t>1?t-1:0),r=1;r{const l=Object.entries(o);for(const[f,c]of l){const h=a[f];h!=null&&(a[f]=h+e*c)}return a},{...n})}}const Hf=VB(1),Zh=VB(-1);function Vie(e){return"clientX"in e&&"clientY"in e}function Jy(e){if(!e)return!1;const{KeyboardEvent:n}=dr(e.target);return n&&e instanceof n}function Wie(e){if(!e)return!1;const{TouchEvent:n}=dr(e.target);return n&&e instanceof n}function Lg(e){if(Wie(e)){if(e.touches&&e.touches.length){const{clientX:n,clientY:t}=e.touches[0];return{x:n,y:t}}else if(e.changedTouches&&e.changedTouches.length){const{clientX:n,clientY:t}=e.changedTouches[0];return{x:n,y:t}}}return Vie(e)?{x:e.clientX,y:e.clientY}:null}const po=Object.freeze({Translate:{toString(e){if(!e)return;const{x:n,y:t}=e;return"translate3d("+(n?Math.round(n):0)+"px, "+(t?Math.round(t):0)+"px, 0)"}},Scale:{toString(e){if(!e)return;const{scaleX:n,scaleY:t}=e;return"scaleX("+n+") scaleY("+t+")"}},Transform:{toString(e){if(e)return[po.Translate.toString(e),po.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:n,duration:t,easing:i}=e;return n+" "+t+"ms "+i}}}),L5="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function Gie(e){return e.matches(L5)?e:e.querySelector(L5)}const Yie={display:"none"};function Kie(e){let{id:n,value:t}=e;return Q.createElement("div",{id:n,style:Yie},t)}function Xie(e){let{id:n,announcement:t,ariaLiveType:i="assertive"}=e;const r={position:"fixed",top:0,left:0,width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"};return Q.createElement("div",{id:n,style:r,role:"status","aria-live":i,"aria-atomic":!0},t)}function Zie(){const[e,n]=A.useState("");return{announce:A.useCallback(i=>{i!=null&&n(i)},[]),announcement:e}}const WB=A.createContext(null);function Qie(e){const n=A.useContext(WB);A.useEffect(()=>{if(!n)throw new Error("useDndMonitor must be used within a children of ");return n(e)},[e,n])}function Jie(){const[e]=A.useState(()=>new Set),n=A.useCallback(i=>(e.add(i),()=>e.delete(i)),[e]);return[A.useCallback(i=>{let{type:r,event:a}=i;e.forEach(o=>{var l;return(l=o[r])==null?void 0:l.call(o,a)})},[e]),n]}const ere={draggable:` + To pick up a draggable item, press the space bar. + While dragging, use the arrow keys to move the item. + Press space again to drop the item in its new position, or press escape to cancel. + `},nre={onDragStart(e){let{active:n}=e;return"Picked up draggable item "+n.id+"."},onDragOver(e){let{active:n,over:t}=e;return t?"Draggable item "+n.id+" was moved over droppable area "+t.id+".":"Draggable item "+n.id+" is no longer over a droppable area."},onDragEnd(e){let{active:n,over:t}=e;return t?"Draggable item "+n.id+" was dropped over droppable area "+t.id:"Draggable item "+n.id+" was dropped."},onDragCancel(e){let{active:n}=e;return"Dragging was cancelled. Draggable item "+n.id+" was dropped."}};function tre(e){let{announcements:n=nre,container:t,hiddenTextDescribedById:i,screenReaderInstructions:r=ere}=e;const{announce:a,announcement:o}=Zie(),l=np("DndLiveRegion"),[f,c]=A.useState(!1);if(A.useEffect(()=>{c(!0)},[]),Qie(A.useMemo(()=>({onDragStart(d){let{active:p}=d;a(n.onDragStart({active:p}))},onDragMove(d){let{active:p,over:v}=d;n.onDragMove&&a(n.onDragMove({active:p,over:v}))},onDragOver(d){let{active:p,over:v}=d;a(n.onDragOver({active:p,over:v}))},onDragEnd(d){let{active:p,over:v}=d;a(n.onDragEnd({active:p,over:v}))},onDragCancel(d){let{active:p,over:v}=d;a(n.onDragCancel({active:p,over:v}))}}),[a,n])),!f)return null;const h=Q.createElement(Q.Fragment,null,Q.createElement(Kie,{id:i,value:r.draggable}),Q.createElement(Xie,{id:l,announcement:o}));return t?Qs.createPortal(h,t):h}var ki;(function(e){e.DragStart="dragStart",e.DragMove="dragMove",e.DragEnd="dragEnd",e.DragCancel="dragCancel",e.DragOver="dragOver",e.RegisterDroppable="registerDroppable",e.SetDroppableDisabled="setDroppableDisabled",e.UnregisterDroppable="unregisterDroppable"})(ki||(ki={}));function Ig(){}function I5(e,n){return A.useMemo(()=>({sensor:e,options:n??{}}),[e,n])}function ire(){for(var e=arguments.length,n=new Array(e),t=0;t[...n].filter(i=>i!=null),[...n])}const Va=Object.freeze({x:0,y:0});function KC(e,n){return Math.sqrt(Math.pow(e.x-n.x,2)+Math.pow(e.y-n.y,2))}function rre(e,n){const t=Lg(e);if(!t)return"0 0";const i={x:(t.x-n.left)/n.width*100,y:(t.y-n.top)/n.height*100};return i.x+"% "+i.y+"%"}function XC(e,n){let{data:{value:t}}=e,{data:{value:i}}=n;return t-i}function are(e,n){let{data:{value:t}}=e,{data:{value:i}}=n;return i-t}function MS(e){let{left:n,top:t,height:i,width:r}=e;return[{x:n,y:t},{x:n+r,y:t},{x:n,y:t+i},{x:n+r,y:t+i}]}function GB(e,n){if(!e||e.length===0)return null;const[t]=e;return t[n]}function B5(e,n,t){return n===void 0&&(n=e.left),t===void 0&&(t=e.top),{x:n+e.width*.5,y:t+e.height*.5}}const ore=e=>{let{collisionRect:n,droppableRects:t,droppableContainers:i}=e;const r=B5(n,n.left,n.top),a=[];for(const o of i){const{id:l}=o,f=t.get(l);if(f){const c=KC(B5(f),r);a.push({id:l,data:{droppableContainer:o,value:c}})}}return a.sort(XC)},YB=e=>{let{collisionRect:n,droppableRects:t,droppableContainers:i}=e;const r=MS(n),a=[];for(const o of i){const{id:l}=o,f=t.get(l);if(f){const c=MS(f),h=r.reduce((p,v,b)=>p+KC(c[b],v),0),d=Number((h/4).toFixed(4));a.push({id:l,data:{droppableContainer:o,value:d}})}}return a.sort(XC)};function sre(e,n){const t=Math.max(n.top,e.top),i=Math.max(n.left,e.left),r=Math.min(n.left+n.width,e.left+e.width),a=Math.min(n.top+n.height,e.top+e.height),o=r-i,l=a-t;if(i{let{collisionRect:n,droppableRects:t,droppableContainers:i}=e;const r=[];for(const a of i){const{id:o}=a,l=t.get(o);if(l){const f=sre(l,n);f>0&&r.push({id:o,data:{droppableContainer:a,value:f}})}}return r.sort(are)};function lre(e,n){const{top:t,left:i,bottom:r,right:a}=n;return t<=e.y&&e.y<=r&&i<=e.x&&e.x<=a}const ure=e=>{let{droppableContainers:n,droppableRects:t,pointerCoordinates:i}=e;if(!i)return[];const r=[];for(const a of n){const{id:o}=a,l=t.get(o);if(l&&lre(i,l)){const c=MS(l).reduce((d,p)=>d+KC(i,p),0),h=Number((c/4).toFixed(4));r.push({id:o,data:{droppableContainer:a,value:h}})}}return r.sort(XC)};function fre(e,n,t){return{...e,scaleX:n&&t?n.width/t.width:1,scaleY:n&&t?n.height/t.height:1}}function XB(e,n){return e&&n?{x:e.left-n.left,y:e.top-n.top}:Va}function cre(e){return function(t){for(var i=arguments.length,r=new Array(i>1?i-1:0),a=1;a({...o,top:o.top+e*l.y,bottom:o.bottom+e*l.y,left:o.left+e*l.x,right:o.right+e*l.x}),{...t})}}const dre=cre(1);function ZB(e){if(e.startsWith("matrix3d(")){const n=e.slice(9,-1).split(/, /);return{x:+n[12],y:+n[13],scaleX:+n[0],scaleY:+n[5]}}else if(e.startsWith("matrix(")){const n=e.slice(7,-1).split(/, /);return{x:+n[4],y:+n[5],scaleX:+n[0],scaleY:+n[3]}}return null}function hre(e,n,t){const i=ZB(n);if(!i)return e;const{scaleX:r,scaleY:a,x:o,y:l}=i,f=e.left-o-(1-r)*parseFloat(t),c=e.top-l-(1-a)*parseFloat(t.slice(t.indexOf(" ")+1)),h=r?e.width/r:e.width,d=a?e.height/a:e.height;return{width:h,height:d,top:c,right:f+h,bottom:c+d,left:f}}const mre={ignoreTransform:!1};function Wc(e,n){n===void 0&&(n=mre);let t=e.getBoundingClientRect();if(n.ignoreTransform){const{transform:c,transformOrigin:h}=dr(e).getComputedStyle(e);c&&(t=hre(t,c,h))}const{top:i,left:r,width:a,height:o,bottom:l,right:f}=t;return{top:i,left:r,width:a,height:o,bottom:l,right:f}}function F5(e){return Wc(e,{ignoreTransform:!0})}function pre(e){const n=e.innerWidth,t=e.innerHeight;return{top:0,left:0,right:n,bottom:t,width:n,height:t}}function vre(e,n){return n===void 0&&(n=dr(e).getComputedStyle(e)),n.position==="fixed"}function gre(e,n){n===void 0&&(n=dr(e).getComputedStyle(e));const t=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some(r=>{const a=n[r];return typeof a=="string"?t.test(a):!1})}function e0(e,n){const t=[];function i(r){if(n!=null&&t.length>=n||!r)return t;if(YC(r)&&r.scrollingElement!=null&&!t.includes(r.scrollingElement))return t.push(r.scrollingElement),t;if(!Jm(r)||UB(r)||t.includes(r))return t;const a=dr(e).getComputedStyle(r);return r!==e&&gre(r,a)&&t.push(r),vre(r,a)?t:i(r.parentNode)}return e?i(e):t}function QB(e){const[n]=e0(e,1);return n??null}function zk(e){return!Zy||!e?null:Uc(e)?e:GC(e)?YC(e)||e===Vc(e).scrollingElement?window:Jm(e)?e:null:null}function JB(e){return Uc(e)?e.scrollX:e.scrollLeft}function eF(e){return Uc(e)?e.scrollY:e.scrollTop}function DS(e){return{x:JB(e),y:eF(e)}}var Ei;(function(e){e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward"})(Ei||(Ei={}));function nF(e){return!Zy||!e?!1:e===document.scrollingElement}function tF(e){const n={x:0,y:0},t=nF(e)?{height:window.innerHeight,width:window.innerWidth}:{height:e.clientHeight,width:e.clientWidth},i={x:e.scrollWidth-t.width,y:e.scrollHeight-t.height},r=e.scrollTop<=n.y,a=e.scrollLeft<=n.x,o=e.scrollTop>=i.y,l=e.scrollLeft>=i.x;return{isTop:r,isLeft:a,isBottom:o,isRight:l,maxScroll:i,minScroll:n}}const yre={x:.2,y:.2};function bre(e,n,t,i,r){let{top:a,left:o,right:l,bottom:f}=t;i===void 0&&(i=10),r===void 0&&(r=yre);const{isTop:c,isBottom:h,isLeft:d,isRight:p}=tF(e),v={x:0,y:0},b={x:0,y:0},w={height:n.height*r.y,width:n.width*r.x};return!c&&a<=n.top+w.height?(v.y=Ei.Backward,b.y=i*Math.abs((n.top+w.height-a)/w.height)):!h&&f>=n.bottom-w.height&&(v.y=Ei.Forward,b.y=i*Math.abs((n.bottom-w.height-f)/w.height)),!p&&l>=n.right-w.width?(v.x=Ei.Forward,b.x=i*Math.abs((n.right-w.width-l)/w.width)):!d&&o<=n.left+w.width&&(v.x=Ei.Backward,b.x=i*Math.abs((n.left+w.width-o)/w.width)),{direction:v,speed:b}}function wre(e){if(e===document.scrollingElement){const{innerWidth:a,innerHeight:o}=window;return{top:0,left:0,right:a,bottom:o,width:a,height:o}}const{top:n,left:t,right:i,bottom:r}=e.getBoundingClientRect();return{top:n,left:t,right:i,bottom:r,width:e.clientWidth,height:e.clientHeight}}function iF(e){return e.reduce((n,t)=>Hf(n,DS(t)),Va)}function kre(e){return e.reduce((n,t)=>n+JB(t),0)}function _re(e){return e.reduce((n,t)=>n+eF(t),0)}function rF(e,n){if(n===void 0&&(n=Wc),!e)return;const{top:t,left:i,bottom:r,right:a}=n(e);QB(e)&&(r<=0||a<=0||t>=window.innerHeight||i>=window.innerWidth)&&e.scrollIntoView({block:"center",inline:"center"})}const xre=[["x",["left","right"],kre],["y",["top","bottom"],_re]];class ZC{constructor(n,t){this.rect=void 0,this.width=void 0,this.height=void 0,this.top=void 0,this.bottom=void 0,this.right=void 0,this.left=void 0;const i=e0(t),r=iF(i);this.rect={...n},this.width=n.width,this.height=n.height;for(const[a,o,l]of xre)for(const f of o)Object.defineProperty(this,f,{get:()=>{const c=l(i),h=r[a]-c;return this.rect[f]+h},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class Th{constructor(n){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach(t=>{var i;return(i=this.target)==null?void 0:i.removeEventListener(...t)})},this.target=n}add(n,t,i){var r;(r=this.target)==null||r.addEventListener(n,t,i),this.listeners.push([n,t,i])}}function Sre(e){const{EventTarget:n}=dr(e);return e instanceof n?e:Vc(e)}function Lk(e,n){const t=Math.abs(e.x),i=Math.abs(e.y);return typeof n=="number"?Math.sqrt(t**2+i**2)>n:"x"in n&&"y"in n?t>n.x&&i>n.y:"x"in n?t>n.x:"y"in n?i>n.y:!1}var fa;(function(e){e.Click="click",e.DragStart="dragstart",e.Keydown="keydown",e.ContextMenu="contextmenu",e.Resize="resize",e.SelectionChange="selectionchange",e.VisibilityChange="visibilitychange"})(fa||(fa={}));function q5(e){e.preventDefault()}function Cre(e){e.stopPropagation()}var rt;(function(e){e.Space="Space",e.Down="ArrowDown",e.Right="ArrowRight",e.Left="ArrowLeft",e.Up="ArrowUp",e.Esc="Escape",e.Enter="Enter",e.Tab="Tab"})(rt||(rt={}));const aF={start:[rt.Space,rt.Enter],cancel:[rt.Esc],end:[rt.Space,rt.Enter,rt.Tab]},Are=(e,n)=>{let{currentCoordinates:t}=n;switch(e.code){case rt.Right:return{...t,x:t.x+25};case rt.Left:return{...t,x:t.x-25};case rt.Down:return{...t,y:t.y+25};case rt.Up:return{...t,y:t.y-25}}};class QC{constructor(n){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=n;const{event:{target:t}}=n;this.props=n,this.listeners=new Th(Vc(t)),this.windowListeners=new Th(dr(t)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(fa.Resize,this.handleCancel),this.windowListeners.add(fa.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(fa.Keydown,this.handleKeyDown))}handleStart(){const{activeNode:n,onStart:t}=this.props,i=n.node.current;i&&rF(i),t(Va)}handleKeyDown(n){if(Jy(n)){const{active:t,context:i,options:r}=this.props,{keyboardCodes:a=aF,coordinateGetter:o=Are,scrollBehavior:l="smooth"}=r,{code:f}=n;if(a.end.includes(f)){this.handleEnd(n);return}if(a.cancel.includes(f)){this.handleCancel(n);return}const{collisionRect:c}=i.current,h=c?{x:c.left,y:c.top}:Va;this.referenceCoordinates||(this.referenceCoordinates=h);const d=o(n,{active:t,context:i.current,currentCoordinates:h});if(d){const p=Zh(d,h),v={x:0,y:0},{scrollableAncestors:b}=i.current;for(const w of b){const k=n.code,{isTop:_,isRight:C,isLeft:x,isBottom:E,maxScroll:O,minScroll:j}=tF(w),M=wre(w),P={x:Math.min(k===rt.Right?M.right-M.width/2:M.right,Math.max(k===rt.Right?M.left:M.left+M.width/2,d.x)),y:Math.min(k===rt.Down?M.bottom-M.height/2:M.bottom,Math.max(k===rt.Down?M.top:M.top+M.height/2,d.y))},F=k===rt.Right&&!C||k===rt.Left&&!x,R=k===rt.Down&&!E||k===rt.Up&&!_;if(F&&P.x!==d.x){const L=w.scrollLeft+p.x,B=k===rt.Right&&L<=O.x||k===rt.Left&&L>=j.x;if(B&&!p.y){w.scrollTo({left:L,behavior:l});return}B?v.x=w.scrollLeft-L:v.x=k===rt.Right?w.scrollLeft-O.x:w.scrollLeft-j.x,v.x&&w.scrollBy({left:-v.x,behavior:l});break}else if(R&&P.y!==d.y){const L=w.scrollTop+p.y,B=k===rt.Down&&L<=O.y||k===rt.Up&&L>=j.y;if(B&&!p.x){w.scrollTo({top:L,behavior:l});return}B?v.y=w.scrollTop-L:v.y=k===rt.Down?w.scrollTop-O.y:w.scrollTop-j.y,v.y&&w.scrollBy({top:-v.y,behavior:l});break}}this.handleMove(n,Hf(Zh(d,this.referenceCoordinates),v))}}}handleMove(n,t){const{onMove:i}=this.props;n.preventDefault(),i(t)}handleEnd(n){const{onEnd:t}=this.props;n.preventDefault(),this.detach(),t()}handleCancel(n){const{onCancel:t}=this.props;n.preventDefault(),this.detach(),t()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}}QC.activators=[{eventName:"onKeyDown",handler:(e,n,t)=>{let{keyboardCodes:i=aF,onActivation:r}=n,{active:a}=t;const{code:o}=e.nativeEvent;if(i.start.includes(o)){const l=a.activatorNode.current;return l&&e.target!==l?!1:(e.preventDefault(),r==null||r({event:e.nativeEvent}),!0)}return!1}}];function H5(e){return!!(e&&"distance"in e)}function U5(e){return!!(e&&"delay"in e)}class JC{constructor(n,t,i){var r;i===void 0&&(i=Sre(n.event.target)),this.props=void 0,this.events=void 0,this.autoScrollEnabled=!0,this.document=void 0,this.activated=!1,this.initialCoordinates=void 0,this.timeoutId=null,this.listeners=void 0,this.documentListeners=void 0,this.windowListeners=void 0,this.props=n,this.events=t;const{event:a}=n,{target:o}=a;this.props=n,this.events=t,this.document=Vc(o),this.documentListeners=new Th(this.document),this.listeners=new Th(i),this.windowListeners=new Th(dr(o)),this.initialCoordinates=(r=Lg(a))!=null?r:Va,this.handleStart=this.handleStart.bind(this),this.handleMove=this.handleMove.bind(this),this.handleEnd=this.handleEnd.bind(this),this.handleCancel=this.handleCancel.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.removeTextSelection=this.removeTextSelection.bind(this),this.attach()}attach(){const{events:n,props:{options:{activationConstraint:t,bypassActivationConstraint:i}}}=this;if(this.listeners.add(n.move.name,this.handleMove,{passive:!1}),this.listeners.add(n.end.name,this.handleEnd),n.cancel&&this.listeners.add(n.cancel.name,this.handleCancel),this.windowListeners.add(fa.Resize,this.handleCancel),this.windowListeners.add(fa.DragStart,q5),this.windowListeners.add(fa.VisibilityChange,this.handleCancel),this.windowListeners.add(fa.ContextMenu,q5),this.documentListeners.add(fa.Keydown,this.handleKeydown),t){if(i!=null&&i({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(U5(t)){this.timeoutId=setTimeout(this.handleStart,t.delay),this.handlePending(t);return}if(H5(t)){this.handlePending(t);return}}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),this.timeoutId!==null&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handlePending(n,t){const{active:i,onPending:r}=this.props;r(i,n,this.initialCoordinates,t)}handleStart(){const{initialCoordinates:n}=this,{onStart:t}=this.props;n&&(this.activated=!0,this.documentListeners.add(fa.Click,Cre,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(fa.SelectionChange,this.removeTextSelection),t(n))}handleMove(n){var t;const{activated:i,initialCoordinates:r,props:a}=this,{onMove:o,options:{activationConstraint:l}}=a;if(!r)return;const f=(t=Lg(n))!=null?t:Va,c=Zh(r,f);if(!i&&l){if(H5(l)){if(l.tolerance!=null&&Lk(c,l.tolerance))return this.handleCancel();if(Lk(c,l.distance))return this.handleStart()}if(U5(l)&&Lk(c,l.tolerance))return this.handleCancel();this.handlePending(l,c);return}n.cancelable&&n.preventDefault(),o(f)}handleEnd(){const{onAbort:n,onEnd:t}=this.props;this.detach(),this.activated||n(this.props.active),t()}handleCancel(){const{onAbort:n,onCancel:t}=this.props;this.detach(),this.activated||n(this.props.active),t()}handleKeydown(n){n.code===rt.Esc&&this.handleCancel()}removeTextSelection(){var n;(n=this.document.getSelection())==null||n.removeAllRanges()}}const Ore={cancel:{name:"pointercancel"},move:{name:"pointermove"},end:{name:"pointerup"}};class e9 extends JC{constructor(n){const{event:t}=n,i=Vc(t.target);super(n,Ore,i)}}e9.activators=[{eventName:"onPointerDown",handler:(e,n)=>{let{nativeEvent:t}=e,{onActivation:i}=n;return!t.isPrimary||t.button!==0?!1:(i==null||i({event:t}),!0)}}];const jre={move:{name:"mousemove"},end:{name:"mouseup"}};var RS;(function(e){e[e.RightClick=2]="RightClick"})(RS||(RS={}));class Ere extends JC{constructor(n){super(n,jre,Vc(n.event.target))}}Ere.activators=[{eventName:"onMouseDown",handler:(e,n)=>{let{nativeEvent:t}=e,{onActivation:i}=n;return t.button===RS.RightClick?!1:(i==null||i({event:t}),!0)}}];const Ik={cancel:{name:"touchcancel"},move:{name:"touchmove"},end:{name:"touchend"}};class Tre extends JC{constructor(n){super(n,Ik)}static setup(){return window.addEventListener(Ik.move.name,n,{capture:!1,passive:!1}),function(){window.removeEventListener(Ik.move.name,n)};function n(){}}}Tre.activators=[{eventName:"onTouchStart",handler:(e,n)=>{let{nativeEvent:t}=e,{onActivation:i}=n;const{touches:r}=t;return r.length>1?!1:(i==null||i({event:t}),!0)}}];var Mh;(function(e){e[e.Pointer=0]="Pointer",e[e.DraggableRect=1]="DraggableRect"})(Mh||(Mh={}));var Bg;(function(e){e[e.TreeOrder=0]="TreeOrder",e[e.ReversedTreeOrder=1]="ReversedTreeOrder"})(Bg||(Bg={}));function Mre(e){let{acceleration:n,activator:t=Mh.Pointer,canScroll:i,draggingRect:r,enabled:a,interval:o=5,order:l=Bg.TreeOrder,pointerCoordinates:f,scrollableAncestors:c,scrollableAncestorRects:h,delta:d,threshold:p}=e;const v=Rre({delta:d,disabled:!a}),[b,w]=Uie(),k=A.useRef({x:0,y:0}),_=A.useRef({x:0,y:0}),C=A.useMemo(()=>{switch(t){case Mh.Pointer:return f?{top:f.y,bottom:f.y,left:f.x,right:f.x}:null;case Mh.DraggableRect:return r}},[t,r,f]),x=A.useRef(null),E=A.useCallback(()=>{const j=x.current;if(!j)return;const M=k.current.x*_.current.x,P=k.current.y*_.current.y;j.scrollBy(M,P)},[]),O=A.useMemo(()=>l===Bg.TreeOrder?[...c].reverse():c,[l,c]);A.useEffect(()=>{if(!a||!c.length||!C){w();return}for(const j of O){if((i==null?void 0:i(j))===!1)continue;const M=c.indexOf(j),P=h[M];if(!P)continue;const{direction:F,speed:R}=bre(j,P,C,n,p);for(const L of["x","y"])v[L][F[L]]||(R[L]=0,F[L]=0);if(R.x>0||R.y>0){w(),x.current=j,b(E,o),k.current=R,_.current=F;return}}k.current={x:0,y:0},_.current={x:0,y:0},w()},[n,E,i,w,a,o,JSON.stringify(C),JSON.stringify(v),b,c,O,h,JSON.stringify(p)])}const Dre={x:{[Ei.Backward]:!1,[Ei.Forward]:!1},y:{[Ei.Backward]:!1,[Ei.Forward]:!1}};function Rre(e){let{delta:n,disabled:t}=e;const i=zg(n);return ep(r=>{if(t||!i||!r)return Dre;const a={x:Math.sign(n.x-i.x),y:Math.sign(n.y-i.y)};return{x:{[Ei.Backward]:r.x[Ei.Backward]||a.x===-1,[Ei.Forward]:r.x[Ei.Forward]||a.x===1},y:{[Ei.Backward]:r.y[Ei.Backward]||a.y===-1,[Ei.Forward]:r.y[Ei.Forward]||a.y===1}}},[t,n,i])}function Pre(e,n){const t=n!=null?e.get(n):void 0,i=t?t.node.current:null;return ep(r=>{var a;return n==null?null:(a=i??r)!=null?a:null},[i,n])}function Nre(e,n){return A.useMemo(()=>e.reduce((t,i)=>{const{sensor:r}=i,a=r.activators.map(o=>({eventName:o.eventName,handler:n(o.handler,i)}));return[...t,...a]},[]),[e,n])}var Qh;(function(e){e[e.Always=0]="Always",e[e.BeforeDragging=1]="BeforeDragging",e[e.WhileDragging=2]="WhileDragging"})(Qh||(Qh={}));var PS;(function(e){e.Optimized="optimized"})(PS||(PS={}));const V5=new Map;function $re(e,n){let{dragging:t,dependencies:i,config:r}=n;const[a,o]=A.useState(null),{frequency:l,measure:f,strategy:c}=r,h=A.useRef(e),d=k(),p=Xh(d),v=A.useCallback(function(_){_===void 0&&(_=[]),!p.current&&o(C=>C===null?_:C.concat(_.filter(x=>!C.includes(x))))},[p]),b=A.useRef(null),w=ep(_=>{if(d&&!t)return V5;if(!_||_===V5||h.current!==e||a!=null){const C=new Map;for(let x of e){if(!x)continue;if(a&&a.length>0&&!a.includes(x.id)&&x.rect.current){C.set(x.id,x.rect.current);continue}const E=x.node.current,O=E?new ZC(f(E),E):null;x.rect.current=O,O&&C.set(x.id,O)}return C}return _},[e,a,t,d,f]);return A.useEffect(()=>{h.current=e},[e]),A.useEffect(()=>{d||v()},[t,d]),A.useEffect(()=>{a&&a.length>0&&o(null)},[JSON.stringify(a)]),A.useEffect(()=>{d||typeof l!="number"||b.current!==null||(b.current=setTimeout(()=>{v(),b.current=null},l))},[l,d,v,...i]),{droppableRects:w,measureDroppableContainers:v,measuringScheduled:a!=null};function k(){switch(c){case Qh.Always:return!1;case Qh.BeforeDragging:return t;default:return!t}}}function n9(e,n){return ep(t=>e?t||(typeof n=="function"?n(e):e):null,[n,e])}function zre(e,n){return n9(e,n)}function Lre(e){let{callback:n,disabled:t}=e;const i=Qy(n),r=A.useMemo(()=>{if(t||typeof window>"u"||typeof window.MutationObserver>"u")return;const{MutationObserver:a}=window;return new a(i)},[i,t]);return A.useEffect(()=>()=>r==null?void 0:r.disconnect(),[r]),r}function n0(e){let{callback:n,disabled:t}=e;const i=Qy(n),r=A.useMemo(()=>{if(t||typeof window>"u"||typeof window.ResizeObserver>"u")return;const{ResizeObserver:a}=window;return new a(i)},[t]);return A.useEffect(()=>()=>r==null?void 0:r.disconnect(),[r]),r}function Ire(e){return new ZC(Wc(e),e)}function W5(e,n,t){n===void 0&&(n=Ire);const[i,r]=A.useState(null);function a(){r(f=>{if(!e)return null;if(e.isConnected===!1){var c;return(c=f??t)!=null?c:null}const h=n(e);return JSON.stringify(f)===JSON.stringify(h)?f:h})}const o=Lre({callback(f){if(e)for(const c of f){const{type:h,target:d}=c;if(h==="childList"&&d instanceof HTMLElement&&d.contains(e)){a();break}}}}),l=n0({callback:a});return Ua(()=>{a(),e?(l==null||l.observe(e),o==null||o.observe(document.body,{childList:!0,subtree:!0})):(l==null||l.disconnect(),o==null||o.disconnect())},[e]),i}function Bre(e){const n=n9(e);return XB(e,n)}const G5=[];function Fre(e){const n=A.useRef(e),t=ep(i=>e?i&&i!==G5&&e&&n.current&&e.parentNode===n.current.parentNode?i:e0(e):G5,[e]);return A.useEffect(()=>{n.current=e},[e]),t}function qre(e){const[n,t]=A.useState(null),i=A.useRef(e),r=A.useCallback(a=>{const o=zk(a.target);o&&t(l=>l?(l.set(o,DS(o)),new Map(l)):null)},[]);return A.useEffect(()=>{const a=i.current;if(e!==a){o(a);const l=e.map(f=>{const c=zk(f);return c?(c.addEventListener("scroll",r,{passive:!0}),[c,DS(c)]):null}).filter(f=>f!=null);t(l.length?new Map(l):null),i.current=e}return()=>{o(e),o(a)};function o(l){l.forEach(f=>{const c=zk(f);c==null||c.removeEventListener("scroll",r)})}},[r,e]),A.useMemo(()=>e.length?n?Array.from(n.values()).reduce((a,o)=>Hf(a,o),Va):iF(e):Va,[e,n])}function Y5(e,n){n===void 0&&(n=[]);const t=A.useRef(null);return A.useEffect(()=>{t.current=null},n),A.useEffect(()=>{const i=e!==Va;i&&!t.current&&(t.current=e),!i&&t.current&&(t.current=null)},[e]),t.current?Zh(e,t.current):Va}function Hre(e){A.useEffect(()=>{if(!Zy)return;const n=e.map(t=>{let{sensor:i}=t;return i.setup==null?void 0:i.setup()});return()=>{for(const t of n)t==null||t()}},e.map(n=>{let{sensor:t}=n;return t}))}function Ure(e,n){return A.useMemo(()=>e.reduce((t,i)=>{let{eventName:r,handler:a}=i;return t[r]=o=>{a(o,n)},t},{}),[e,n])}function oF(e){return A.useMemo(()=>e?pre(e):null,[e])}const K5=[];function Vre(e,n){n===void 0&&(n=Wc);const[t]=e,i=oF(t?dr(t):null),[r,a]=A.useState(K5);function o(){a(()=>e.length?e.map(f=>nF(f)?i:new ZC(n(f),f)):K5)}const l=n0({callback:o});return Ua(()=>{l==null||l.disconnect(),o(),e.forEach(f=>l==null?void 0:l.observe(f))},[e]),r}function sF(e){if(!e)return null;if(e.children.length>1)return e;const n=e.children[0];return Jm(n)?n:e}function Wre(e){let{measure:n}=e;const[t,i]=A.useState(null),r=A.useCallback(c=>{for(const{target:h}of c)if(Jm(h)){i(d=>{const p=n(h);return d?{...d,width:p.width,height:p.height}:p});break}},[n]),a=n0({callback:r}),o=A.useCallback(c=>{const h=sF(c);a==null||a.disconnect(),h&&(a==null||a.observe(h)),i(h?n(h):null)},[n,a]),[l,f]=$g(o);return A.useMemo(()=>({nodeRef:l,rect:t,setRef:f}),[t,l,f])}const Gre=[{sensor:e9,options:{}},{sensor:QC,options:{}}],Yre={current:{}},yg={draggable:{measure:F5},droppable:{measure:F5,strategy:Qh.WhileDragging,frequency:PS.Optimized},dragOverlay:{measure:Wc}};class Dh extends Map{get(n){var t;return n!=null&&(t=super.get(n))!=null?t:void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter(n=>{let{disabled:t}=n;return!t})}getNodeFor(n){var t,i;return(t=(i=this.get(n))==null?void 0:i.node.current)!=null?t:void 0}}const Kre={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new Dh,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:Ig},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:yg,measureDroppableContainers:Ig,windowRect:null,measuringScheduled:!1},lF={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:Ig,draggableNodes:new Map,over:null,measureDroppableContainers:Ig},tp=A.createContext(lF),uF=A.createContext(Kre);function Xre(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new Dh}}}function Zre(e,n){switch(n.type){case ki.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:n.initialCoordinates,active:n.active}};case ki.DragMove:return e.draggable.active==null?e:{...e,draggable:{...e.draggable,translate:{x:n.coordinates.x-e.draggable.initialCoordinates.x,y:n.coordinates.y-e.draggable.initialCoordinates.y}}};case ki.DragEnd:case ki.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case ki.RegisterDroppable:{const{element:t}=n,{id:i}=t,r=new Dh(e.droppable.containers);return r.set(i,t),{...e,droppable:{...e.droppable,containers:r}}}case ki.SetDroppableDisabled:{const{id:t,key:i,disabled:r}=n,a=e.droppable.containers.get(t);if(!a||i!==a.key)return e;const o=new Dh(e.droppable.containers);return o.set(t,{...a,disabled:r}),{...e,droppable:{...e.droppable,containers:o}}}case ki.UnregisterDroppable:{const{id:t,key:i}=n,r=e.droppable.containers.get(t);if(!r||i!==r.key)return e;const a=new Dh(e.droppable.containers);return a.delete(t),{...e,droppable:{...e.droppable,containers:a}}}default:return e}}function Qre(e){let{disabled:n}=e;const{active:t,activatorEvent:i,draggableNodes:r}=A.useContext(tp),a=zg(i),o=zg(t==null?void 0:t.id);return A.useEffect(()=>{if(!n&&!i&&a&&o!=null){if(!Jy(a)||document.activeElement===a.target)return;const l=r.get(o);if(!l)return;const{activatorNode:f,node:c}=l;if(!f.current&&!c.current)return;requestAnimationFrame(()=>{for(const h of[f.current,c.current]){if(!h)continue;const d=Gie(h);if(d){d.focus();break}}})}},[i,n,r,o,a]),null}function fF(e,n){let{transform:t,...i}=n;return e!=null&&e.length?e.reduce((r,a)=>a({transform:r,...i}),t):t}function Jre(e){return A.useMemo(()=>({draggable:{...yg.draggable,...e==null?void 0:e.draggable},droppable:{...yg.droppable,...e==null?void 0:e.droppable},dragOverlay:{...yg.dragOverlay,...e==null?void 0:e.dragOverlay}}),[e==null?void 0:e.draggable,e==null?void 0:e.droppable,e==null?void 0:e.dragOverlay])}function eae(e){let{activeNode:n,measure:t,initialRect:i,config:r=!0}=e;const a=A.useRef(!1),{x:o,y:l}=typeof r=="boolean"?{x:r,y:r}:r;Ua(()=>{if(!o&&!l||!n){a.current=!1;return}if(a.current||!i)return;const c=n==null?void 0:n.node.current;if(!c||c.isConnected===!1)return;const h=t(c),d=XB(h,i);if(o||(d.x=0),l||(d.y=0),a.current=!0,Math.abs(d.x)>0||Math.abs(d.y)>0){const p=QB(c);p&&p.scrollBy({top:d.y,left:d.x})}},[n,o,l,i,t])}const t0=A.createContext({...Va,scaleX:1,scaleY:1});var Ys;(function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Initializing=1]="Initializing",e[e.Initialized=2]="Initialized"})(Ys||(Ys={}));const nae=A.memo(function(n){var t,i,r,a;let{id:o,accessibility:l,autoScroll:f=!0,children:c,sensors:h=Gre,collisionDetection:d=KB,measuring:p,modifiers:v,...b}=n;const w=A.useReducer(Zre,void 0,Xre),[k,_]=w,[C,x]=Jie(),[E,O]=A.useState(Ys.Uninitialized),j=E===Ys.Initialized,{draggable:{active:M,nodes:P,translate:F},droppable:{containers:R}}=k,L=M!=null?P.get(M):null,B=A.useRef({initial:null,translated:null}),G=A.useMemo(()=>{var gn;return M!=null?{id:M,data:(gn=L==null?void 0:L.data)!=null?gn:Yre,rect:B}:null},[M,L]),U=A.useRef(null),[H,N]=A.useState(null),[z,q]=A.useState(null),Y=Xh(b,Object.values(b)),D=np("DndDescribedBy",o),V=A.useMemo(()=>R.getEnabled(),[R]),W=Jre(p),{droppableRects:$,measureDroppableContainers:X,measuringScheduled:ee}=$re(V,{dragging:j,dependencies:[F.x,F.y],config:W.droppable}),re=Pre(P,M),se=A.useMemo(()=>z?Lg(z):null,[z]),ye=yn(),ae=zre(re,W.draggable.measure);eae({activeNode:M!=null?P.get(M):null,config:ye.layoutShiftCompensation,initialRect:ae,measure:W.draggable.measure});const le=W5(re,W.draggable.measure,ae),_e=W5(re?re.parentElement:null),ne=A.useRef({activatorEvent:null,active:null,activeNode:re,collisionRect:null,collisions:null,droppableRects:$,draggableNodes:P,draggingNode:null,draggingNodeRect:null,droppableContainers:R,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),ze=R.getNodeFor((t=ne.current.over)==null?void 0:t.id),we=Wre({measure:W.dragOverlay.measure}),Ce=(i=we.nodeRef.current)!=null?i:re,Ne=j?(r=we.rect)!=null?r:le:null,ve=!!(we.nodeRef.current&&we.rect),xe=Bre(ve?null:le),Pe=oF(Ce?dr(Ce):null),ue=Fre(j?ze??re:null),Be=Vre(ue),We=fF(v,{transform:{x:F.x-xe.x,y:F.y-xe.y,scaleX:1,scaleY:1},activatorEvent:z,active:G,activeNodeRect:le,containerNodeRect:_e,draggingNodeRect:Ne,over:ne.current.over,overlayNodeRect:we.rect,scrollableAncestors:ue,scrollableAncestorRects:Be,windowRect:Pe}),Ue=se?Hf(se,F):null,Xe=qre(ue),Qe=Y5(Xe),ie=Y5(Xe,[le]),he=Hf(We,Qe),Ge=Ne?dre(Ne,We):null,Je=G&&Ge?d({active:G,collisionRect:Ge,droppableRects:$,droppableContainers:V,pointerCoordinates:Ue}):null,Se=GB(Je,"id"),[tn,cn]=A.useState(null),On=ve?We:Hf(We,ie),mn=fre(On,(a=tn==null?void 0:tn.rect)!=null?a:null,le),an=A.useRef(null),en=A.useCallback((gn,bn)=>{let{sensor:tt,options:wt}=bn;if(U.current==null)return;const Le=P.get(U.current);if(!Le)return;const qe=gn.nativeEvent,Nn=new tt({active:U.current,activeNode:Le,event:qe,options:wt,context:ne,onAbort(Mn){if(!P.get(Mn))return;const{onDragAbort:rn}=Y.current,on={id:Mn};rn==null||rn(on),C({type:"onDragAbort",event:on})},onPending(Mn,nn,rn,on){if(!P.get(Mn))return;const{onDragPending:Vn}=Y.current,kt={id:Mn,constraint:nn,initialCoordinates:rn,offset:on};Vn==null||Vn(kt),C({type:"onDragPending",event:kt})},onStart(Mn){const nn=U.current;if(nn==null)return;const rn=P.get(nn);if(!rn)return;const{onDragStart:on}=Y.current,Bn={activatorEvent:qe,active:{id:nn,data:rn.data,rect:B}};Qs.unstable_batchedUpdates(()=>{on==null||on(Bn),O(Ys.Initializing),_({type:ki.DragStart,initialCoordinates:Mn,active:nn}),C({type:"onDragStart",event:Bn}),N(an.current),q(qe)})},onMove(Mn){_({type:ki.DragMove,coordinates:Mn})},onEnd:ot(ki.DragEnd),onCancel:ot(ki.DragCancel)});an.current=Nn;function ot(Mn){return async function(){const{active:rn,collisions:on,over:Bn,scrollAdjustedTranslate:Vn}=ne.current;let kt=null;if(rn&&Vn){const{cancelDrop:Cn}=Y.current;kt={activatorEvent:qe,active:rn,collisions:on,delta:Vn,over:Bn},Mn===ki.DragEnd&&typeof Cn=="function"&&await Promise.resolve(Cn(kt))&&(Mn=ki.DragCancel)}U.current=null,Qs.unstable_batchedUpdates(()=>{_({type:Mn}),O(Ys.Uninitialized),cn(null),N(null),q(null),an.current=null;const Cn=Mn===ki.DragEnd?"onDragEnd":"onDragCancel";if(kt){const An=Y.current[Cn];An==null||An(kt),C({type:Cn,event:kt})}})}}},[P]),Rn=A.useCallback((gn,bn)=>(tt,wt)=>{const Le=tt.nativeEvent,qe=P.get(wt);if(U.current!==null||!qe||Le.dndKit||Le.defaultPrevented)return;const Nn={active:qe};gn(tt,bn.options,Nn)===!0&&(Le.dndKit={capturedBy:bn.sensor},U.current=wt,en(tt,bn))},[P,en]),De=Nre(h,Rn);Hre(h),Ua(()=>{le&&E===Ys.Initializing&&O(Ys.Initialized)},[le,E]),A.useEffect(()=>{const{onDragMove:gn}=Y.current,{active:bn,activatorEvent:tt,collisions:wt,over:Le}=ne.current;if(!bn||!tt)return;const qe={active:bn,activatorEvent:tt,collisions:wt,delta:{x:he.x,y:he.y},over:Le};Qs.unstable_batchedUpdates(()=>{gn==null||gn(qe),C({type:"onDragMove",event:qe})})},[he.x,he.y]),A.useEffect(()=>{const{active:gn,activatorEvent:bn,collisions:tt,droppableContainers:wt,scrollAdjustedTranslate:Le}=ne.current;if(!gn||U.current==null||!bn||!Le)return;const{onDragOver:qe}=Y.current,Nn=wt.get(Se),ot=Nn&&Nn.rect.current?{id:Nn.id,rect:Nn.rect.current,data:Nn.data,disabled:Nn.disabled}:null,Mn={active:gn,activatorEvent:bn,collisions:tt,delta:{x:Le.x,y:Le.y},over:ot};Qs.unstable_batchedUpdates(()=>{cn(ot),qe==null||qe(Mn),C({type:"onDragOver",event:Mn})})},[Se]),Ua(()=>{ne.current={activatorEvent:z,active:G,activeNode:re,collisionRect:Ge,collisions:Je,droppableRects:$,draggableNodes:P,draggingNode:Ce,draggingNodeRect:Ne,droppableContainers:R,over:tn,scrollableAncestors:ue,scrollAdjustedTranslate:he},B.current={initial:Ne,translated:Ge}},[G,re,Je,Ge,P,Ce,Ne,$,R,tn,ue,he]),Mre({...ye,delta:F,draggingRect:Ge,pointerCoordinates:Ue,scrollableAncestors:ue,scrollableAncestorRects:Be});const Fe=A.useMemo(()=>({active:G,activeNode:re,activeNodeRect:le,activatorEvent:z,collisions:Je,containerNodeRect:_e,dragOverlay:we,draggableNodes:P,droppableContainers:R,droppableRects:$,over:tn,measureDroppableContainers:X,scrollableAncestors:ue,scrollableAncestorRects:Be,measuringConfiguration:W,measuringScheduled:ee,windowRect:Pe}),[G,re,le,z,Je,_e,we,P,R,$,tn,X,ue,Be,W,ee,Pe]),jn=A.useMemo(()=>({activatorEvent:z,activators:De,active:G,activeNodeRect:le,ariaDescribedById:{draggable:D},dispatch:_,draggableNodes:P,over:tn,measureDroppableContainers:X}),[z,De,G,le,_,D,P,tn,X]);return Q.createElement(WB.Provider,{value:x},Q.createElement(tp.Provider,{value:jn},Q.createElement(uF.Provider,{value:Fe},Q.createElement(t0.Provider,{value:mn},c)),Q.createElement(Qre,{disabled:(l==null?void 0:l.restoreFocus)===!1})),Q.createElement(tre,{...l,hiddenTextDescribedById:D}));function yn(){const gn=(H==null?void 0:H.autoScrollEnabled)===!1,bn=typeof f=="object"?f.enabled===!1:f===!1,tt=j&&!gn&&!bn;return typeof f=="object"?{...f,enabled:tt}:{enabled:tt}}}),tae=A.createContext(null),X5="button",iae="Draggable";function rae(e){let{id:n,data:t,disabled:i=!1,attributes:r}=e;const a=np(iae),{activators:o,activatorEvent:l,active:f,activeNodeRect:c,ariaDescribedById:h,draggableNodes:d,over:p}=A.useContext(tp),{role:v=X5,roleDescription:b="draggable",tabIndex:w=0}=r??{},k=(f==null?void 0:f.id)===n,_=A.useContext(k?t0:tae),[C,x]=$g(),[E,O]=$g(),j=Ure(o,n),M=Xh(t);Ua(()=>(d.set(n,{id:n,key:a,node:C,activatorNode:E,data:M}),()=>{const F=d.get(n);F&&F.key===a&&d.delete(n)}),[d,n]);const P=A.useMemo(()=>({role:v,tabIndex:w,"aria-disabled":i,"aria-pressed":k&&v===X5?!0:void 0,"aria-roledescription":b,"aria-describedby":h.draggable}),[i,v,w,k,b,h.draggable]);return{active:f,activatorEvent:l,activeNodeRect:c,attributes:P,isDragging:k,listeners:i?void 0:j,node:C,over:p,setNodeRef:x,setActivatorNodeRef:O,transform:_}}function cF(){return A.useContext(uF)}const aae="Droppable",oae={timeout:25};function sae(e){let{data:n,disabled:t=!1,id:i,resizeObserverConfig:r}=e;const a=np(aae),{active:o,dispatch:l,over:f,measureDroppableContainers:c}=A.useContext(tp),h=A.useRef({disabled:t}),d=A.useRef(!1),p=A.useRef(null),v=A.useRef(null),{disabled:b,updateMeasurementsFor:w,timeout:k}={...oae,...r},_=Xh(w??i),C=A.useCallback(()=>{if(!d.current){d.current=!0;return}v.current!=null&&clearTimeout(v.current),v.current=setTimeout(()=>{c(Array.isArray(_.current)?_.current:[_.current]),v.current=null},k)},[k]),x=n0({callback:C,disabled:b||!o}),E=A.useCallback((P,F)=>{x&&(F&&(x.unobserve(F),d.current=!1),P&&x.observe(P))},[x]),[O,j]=$g(E),M=Xh(n);return A.useEffect(()=>{!x||!O.current||(x.disconnect(),d.current=!1,x.observe(O.current))},[O,x]),A.useEffect(()=>(l({type:ki.RegisterDroppable,element:{id:i,key:a,disabled:t,node:O,rect:p,data:M}}),()=>l({type:ki.UnregisterDroppable,key:a,id:i})),[i]),A.useEffect(()=>{t!==h.current.disabled&&(l({type:ki.SetDroppableDisabled,id:i,key:a,disabled:t}),h.current.disabled=t)},[i,a,t,l]),{active:o,rect:p,isOver:(f==null?void 0:f.id)===i,node:O,over:f,setNodeRef:j}}function lae(e){let{animation:n,children:t}=e;const[i,r]=A.useState(null),[a,o]=A.useState(null),l=zg(t);return!t&&!i&&l&&r(l),Ua(()=>{if(!a)return;const f=i==null?void 0:i.key,c=i==null?void 0:i.props.id;if(f==null||c==null){r(null);return}Promise.resolve(n(c,a)).then(()=>{r(null)})},[n,i,a]),Q.createElement(Q.Fragment,null,t,i?A.cloneElement(i,{ref:o}):null)}const uae={x:0,y:0,scaleX:1,scaleY:1};function fae(e){let{children:n}=e;return Q.createElement(tp.Provider,{value:lF},Q.createElement(t0.Provider,{value:uae},n))}const cae={position:"fixed",touchAction:"none"},dae=e=>Jy(e)?"transform 250ms ease":void 0,hae=A.forwardRef((e,n)=>{let{as:t,activatorEvent:i,adjustScale:r,children:a,className:o,rect:l,style:f,transform:c,transition:h=dae}=e;if(!l)return null;const d=r?c:{...c,scaleX:1,scaleY:1},p={...cae,width:l.width,height:l.height,top:l.top,left:l.left,transform:po.Transform.toString(d),transformOrigin:r&&i?rre(i,l):void 0,transition:typeof h=="function"?h(i):h,...f};return Q.createElement(t,{className:o,style:p,ref:n},a)}),mae=e=>n=>{let{active:t,dragOverlay:i}=n;const r={},{styles:a,className:o}=e;if(a!=null&&a.active)for(const[l,f]of Object.entries(a.active))f!==void 0&&(r[l]=t.node.style.getPropertyValue(l),t.node.style.setProperty(l,f));if(a!=null&&a.dragOverlay)for(const[l,f]of Object.entries(a.dragOverlay))f!==void 0&&i.node.style.setProperty(l,f);return o!=null&&o.active&&t.node.classList.add(o.active),o!=null&&o.dragOverlay&&i.node.classList.add(o.dragOverlay),function(){for(const[f,c]of Object.entries(r))t.node.style.setProperty(f,c);o!=null&&o.active&&t.node.classList.remove(o.active)}},pae=e=>{let{transform:{initial:n,final:t}}=e;return[{transform:po.Transform.toString(n)},{transform:po.Transform.toString(t)}]},vae={duration:250,easing:"ease",keyframes:pae,sideEffects:mae({styles:{active:{opacity:"0"}}})};function gae(e){let{config:n,draggableNodes:t,droppableContainers:i,measuringConfiguration:r}=e;return Qy((a,o)=>{if(n===null)return;const l=t.get(a);if(!l)return;const f=l.node.current;if(!f)return;const c=sF(o);if(!c)return;const{transform:h}=dr(o).getComputedStyle(o),d=ZB(h);if(!d)return;const p=typeof n=="function"?n:yae(n);return rF(f,r.draggable.measure),p({active:{id:a,data:l.data,node:f,rect:r.draggable.measure(f)},draggableNodes:t,dragOverlay:{node:o,rect:r.dragOverlay.measure(c)},droppableContainers:i,measuringConfiguration:r,transform:d})})}function yae(e){const{duration:n,easing:t,sideEffects:i,keyframes:r}={...vae,...e};return a=>{let{active:o,dragOverlay:l,transform:f,...c}=a;if(!n)return;const h={x:l.rect.left-o.rect.left,y:l.rect.top-o.rect.top},d={scaleX:f.scaleX!==1?o.rect.width*f.scaleX/l.rect.width:1,scaleY:f.scaleY!==1?o.rect.height*f.scaleY/l.rect.height:1},p={x:f.x-h.x,y:f.y-h.y,...d},v=r({...c,active:o,dragOverlay:l,transform:{initial:f,final:p}}),[b]=v,w=v[v.length-1];if(JSON.stringify(b)===JSON.stringify(w))return;const k=i==null?void 0:i({active:o,dragOverlay:l,...c}),_=l.node.animate(v,{duration:n,easing:t,fill:"forwards"});return new Promise(C=>{_.onfinish=()=>{k==null||k(),C()}})}}let Z5=0;function bae(e){return A.useMemo(()=>{if(e!=null)return Z5++,Z5},[e])}const wae=Q.memo(e=>{let{adjustScale:n=!1,children:t,dropAnimation:i,style:r,transition:a,modifiers:o,wrapperElement:l="div",className:f,zIndex:c=999}=e;const{activatorEvent:h,active:d,activeNodeRect:p,containerNodeRect:v,draggableNodes:b,droppableContainers:w,dragOverlay:k,over:_,measuringConfiguration:C,scrollableAncestors:x,scrollableAncestorRects:E,windowRect:O}=cF(),j=A.useContext(t0),M=bae(d==null?void 0:d.id),P=fF(o,{activatorEvent:h,active:d,activeNodeRect:p,containerNodeRect:v,draggingNodeRect:k.rect,over:_,overlayNodeRect:k.rect,scrollableAncestors:x,scrollableAncestorRects:E,transform:j,windowRect:O}),F=n9(p),R=gae({config:i,draggableNodes:b,droppableContainers:w,measuringConfiguration:C}),L=F?k.setRef:void 0;return Q.createElement(fae,null,Q.createElement(lae,{animation:R},d&&M?Q.createElement(hae,{key:M,id:d.id,ref:L,as:l,activatorEvent:h,adjustScale:n,className:f,transition:a,rect:F,style:{zIndex:c,...r},transform:P},t):null))});function Fg(e,n,t){const i=e.slice();return i.splice(t<0?i.length+t:t,0,i.splice(n,1)[0]),i}function kae(e,n){return e.reduce((t,i,r)=>{const a=n.get(i);return a&&(t[r]=a),t},Array(e.length))}function Lv(e){return e!==null&&e>=0}function _ae(e,n){if(e===n)return!0;if(e.length!==n.length)return!1;for(let t=0;t{var n;let{rects:t,activeNodeRect:i,activeIndex:r,overIndex:a,index:o}=e;const l=(n=t[r])!=null?n:i;if(!l)return null;const f=Cae(t,o,r);if(o===r){const c=t[a];return c?{x:rr&&o<=a?{x:-l.width-f,y:0,...Iv}:o=a?{x:l.width+f,y:0,...Iv}:{x:0,y:0,...Iv}};function Cae(e,n,t){const i=e[n],r=e[n-1],a=e[n+1];return!i||!r&&!a?0:t{let{rects:n,activeIndex:t,overIndex:i,index:r}=e;const a=Fg(n,i,t),o=n[r],l=a[r];return!l||!o?null:{x:l.left-o.left,y:l.top-o.top,scaleX:l.width/o.width,scaleY:l.height/o.height}},Bv={scaleX:1,scaleY:1},hF=e=>{var n;let{activeIndex:t,activeNodeRect:i,index:r,rects:a,overIndex:o}=e;const l=(n=a[t])!=null?n:i;if(!l)return null;if(r===t){const c=a[o];return c?{x:0,y:tt&&r<=o?{x:0,y:-l.height-f,...Bv}:r=o?{x:0,y:l.height+f,...Bv}:{x:0,y:0,...Bv}};function Aae(e,n,t){const i=e[n],r=e[n-1],a=e[n+1];return i?ti.map(j=>typeof j=="object"&&"id"in j?j.id:j),[i]),b=o!=null,w=o?v.indexOf(o.id):-1,k=c?v.indexOf(c.id):-1,_=A.useRef(v),C=!_ae(v,_.current),x=k!==-1&&w===-1||C,E=xae(a);Ua(()=>{C&&b&&h(v)},[C,v,b,h]),A.useEffect(()=>{_.current=v},[v]);const O=A.useMemo(()=>({activeIndex:w,containerId:d,disabled:E,disableTransforms:x,items:v,overIndex:k,useDragOverlay:p,sortedRects:kae(v,f),strategy:r}),[w,d,E.draggable,E.droppable,x,v,k,f,p,r]);return Q.createElement(pF.Provider,{value:O},n)}const Oae=e=>{let{id:n,items:t,activeIndex:i,overIndex:r}=e;return Fg(t,i,r).indexOf(n)},jae=e=>{let{containerId:n,isSorting:t,wasDragging:i,index:r,items:a,newIndex:o,previousItems:l,previousContainerId:f,transition:c}=e;return!c||!i||l!==a&&r===o?!1:t?!0:o!==r&&n===f},Eae={duration:200,easing:"ease"},vF="transform",Tae=po.Transition.toString({property:vF,duration:0,easing:"linear"}),Mae={roleDescription:"sortable"};function Dae(e){let{disabled:n,index:t,node:i,rect:r}=e;const[a,o]=A.useState(null),l=A.useRef(t);return Ua(()=>{if(!n&&t!==l.current&&i.current){const f=r.current;if(f){const c=Wc(i.current,{ignoreTransform:!0}),h={x:f.left-c.left,y:f.top-c.top,scaleX:f.width/c.width,scaleY:f.height/c.height};(h.x||h.y)&&o(h)}}t!==l.current&&(l.current=t)},[n,t,i,r]),A.useEffect(()=>{a&&o(null)},[a]),a}function gF(e){let{animateLayoutChanges:n=jae,attributes:t,disabled:i,data:r,getNewIndex:a=Oae,id:o,strategy:l,resizeObserverConfig:f,transition:c=Eae}=e;const{items:h,containerId:d,activeIndex:p,disabled:v,disableTransforms:b,sortedRects:w,overIndex:k,useDragOverlay:_,strategy:C}=A.useContext(pF),x=Rae(i,v),E=h.indexOf(o),O=A.useMemo(()=>({sortable:{containerId:d,index:E,items:h},...r}),[d,r,E,h]),j=A.useMemo(()=>h.slice(h.indexOf(o)),[h,o]),{rect:M,node:P,isOver:F,setNodeRef:R}=sae({id:o,data:O,disabled:x.droppable,resizeObserverConfig:{updateMeasurementsFor:j,...f}}),{active:L,activatorEvent:B,activeNodeRect:G,attributes:U,setNodeRef:H,listeners:N,isDragging:z,over:q,setActivatorNodeRef:Y,transform:D}=rae({id:o,data:O,attributes:{...Mae,...t},disabled:x.draggable}),V=Hie(R,H),W=!!L,$=W&&!b&&Lv(p)&&Lv(k),X=!_&&z,ee=X&&$?D:null,se=$?ee??(l??C)({rects:w,activeNodeRect:G,activeIndex:p,overIndex:k,index:E}):null,ye=Lv(p)&&Lv(k)?a({id:o,items:h,activeIndex:p,overIndex:k}):E,ae=L==null?void 0:L.id,le=A.useRef({activeId:ae,items:h,newIndex:ye,containerId:d}),_e=h!==le.current.items,ne=n({active:L,containerId:d,isDragging:z,isSorting:W,id:o,index:E,items:h,newIndex:le.current.newIndex,previousItems:le.current.items,previousContainerId:le.current.containerId,transition:c,wasDragging:le.current.activeId!=null}),ze=Dae({disabled:!ne,index:E,node:P,rect:M});return A.useEffect(()=>{W&&le.current.newIndex!==ye&&(le.current.newIndex=ye),d!==le.current.containerId&&(le.current.containerId=d),h!==le.current.items&&(le.current.items=h)},[W,ye,d,h]),A.useEffect(()=>{if(ae===le.current.activeId)return;if(ae!=null&&le.current.activeId==null){le.current.activeId=ae;return}const Ce=setTimeout(()=>{le.current.activeId=ae},50);return()=>clearTimeout(Ce)},[ae]),{active:L,activeIndex:p,attributes:U,data:O,rect:M,index:E,newIndex:ye,items:h,isOver:F,isSorting:W,isDragging:z,listeners:N,node:P,overIndex:k,over:q,setNodeRef:V,setActivatorNodeRef:Y,setDroppableNodeRef:R,setDraggableNodeRef:H,transform:ze??se,transition:we()};function we(){if(ze||_e&&le.current.newIndex===E)return Tae;if(!(X&&!Jy(B)||!c)&&(W||ne))return po.Transition.toString({...c,property:vF})}}function Rae(e,n){var t,i;return typeof e=="boolean"?{draggable:e,droppable:!1}:{draggable:(t=e==null?void 0:e.draggable)!=null?t:n.draggable,droppable:(i=e==null?void 0:e.droppable)!=null?i:n.droppable}}function qg(e){if(!e)return!1;const n=e.data.current;return!!(n&&"sortable"in n&&typeof n.sortable=="object"&&"containerId"in n.sortable&&"items"in n.sortable&&"index"in n.sortable)}const Pae=[rt.Down,rt.Right,rt.Up,rt.Left],Nae=(e,n)=>{let{context:{active:t,collisionRect:i,droppableRects:r,droppableContainers:a,over:o,scrollableAncestors:l}}=n;if(Pae.includes(e.code)){if(e.preventDefault(),!t||!i)return;const f=[];a.getEnabled().forEach(d=>{if(!d||d!=null&&d.disabled)return;const p=r.get(d.id);if(p)switch(e.code){case rt.Down:i.topp.top&&f.push(d);break;case rt.Left:i.left>p.left&&f.push(d);break;case rt.Right:i.left1&&(h=c[1].id),h!=null){const d=a.get(t.id),p=a.get(h),v=p?r.get(p.id):null,b=p==null?void 0:p.node.current;if(b&&v&&d&&p){const k=e0(b).some((j,M)=>l[M]!==j),_=yF(d,p),C=$ae(d,p),x=k||!_?{x:0,y:0}:{x:C?i.width-v.width:0,y:C?i.height-v.height:0},E={x:v.left,y:v.top};return x.x&&x.y?E:Zh(E,x)}}}};function yF(e,n){return!qg(e)||!qg(n)?!1:e.data.current.sortable.containerId===n.data.current.sortable.containerId}function $ae(e,n){return!qg(e)||!qg(n)||!yF(e,n)?!1:e.data.current.sortable.index=H?U:""+Array(H+1-z.length).join(N)+U},E={s:x,z:function(U){var H=-U.utcOffset(),N=Math.abs(H),z=Math.floor(N/60),q=N%60;return(H<=0?"+":"-")+x(z,2,"0")+":"+x(q,2,"0")},m:function U(H,N){if(H.date()1)return U(D[0])}else{var V=H.name;j[V]=H,q=V}return!z&&q&&(O=q),q||!z&&O},R=function(U,H){if(P(U))return U.clone();var N=typeof H=="object"?H:{};return N.date=U,N.args=arguments,new B(N)},L=E;L.l=F,L.i=P,L.w=function(U,H){return R(U,{locale:H.$L,utc:H.$u,x:H.$x,$offset:H.$offset})};var B=(function(){function U(N){this.$L=F(N.locale,null,!0),this.parse(N),this.$x=this.$x||N.x||{},this[M]=!0}var H=U.prototype;return H.parse=function(N){this.$d=(function(z){var q=z.date,Y=z.utc;if(q===null)return new Date(NaN);if(L.u(q))return new Date;if(q instanceof Date)return new Date(q);if(typeof q=="string"&&!/Z$/i.test(q)){var D=q.match(k);if(D){var V=D[2]-1||0,W=(D[7]||"0").substring(0,3);return Y?new Date(Date.UTC(D[1],V,D[3]||1,D[4]||0,D[5]||0,D[6]||0,W)):new Date(D[1],V,D[3]||1,D[4]||0,D[5]||0,D[6]||0,W)}}return new Date(q)})(N),this.init()},H.init=function(){var N=this.$d;this.$y=N.getFullYear(),this.$M=N.getMonth(),this.$D=N.getDate(),this.$W=N.getDay(),this.$H=N.getHours(),this.$m=N.getMinutes(),this.$s=N.getSeconds(),this.$ms=N.getMilliseconds()},H.$utils=function(){return L},H.isValid=function(){return this.$d.toString()!==w},H.isSame=function(N,z){var q=R(N);return this.startOf(z)<=q&&q<=this.endOf(z)},H.isAfter=function(N,z){return R(N)Ie(o).locale(t).format(i);return e==="default"?n===null?"":a(n):e==="multiple"?n.map(a).join(", "):e==="range"&&Array.isArray(n)?n[0]&&n[1]?`${a(n[0])} ${r} ${a(n[1])}`:n[0]?`${a(n[0])} ${r} `:"":""}function Fae({formatter:e,...n}){return(e||Bae)(n)}function qae({direction:e,levelIndex:n,rowIndex:t,cellIndex:i,size:r}){switch(e){case"up":return n===0&&t===0?null:t===0?{levelIndex:n-1,rowIndex:i<=r[n-1][r[n-1].length-1]-1?r[n-1].length-1:r[n-1].length-2,cellIndex:i}:{levelIndex:n,rowIndex:t-1,cellIndex:i};case"down":return t===r[n].length-1?{levelIndex:n+1,rowIndex:0,cellIndex:i}:t===r[n].length-2&&i>=r[n][r[n].length-1]?{levelIndex:n+1,rowIndex:0,cellIndex:i}:{levelIndex:n,rowIndex:t+1,cellIndex:i};case"left":return n===0&&t===0&&i===0?null:t===0&&i===0?{levelIndex:n-1,rowIndex:r[n-1].length-1,cellIndex:r[n-1][r[n-1].length-1]-1}:i===0?{levelIndex:n,rowIndex:t-1,cellIndex:r[n][t-1]-1}:{levelIndex:n,rowIndex:t,cellIndex:i-1};case"right":return t===r[n].length-1&&i===r[n][t]-1?{levelIndex:n+1,rowIndex:0,cellIndex:0}:i===r[n][t]-1?{levelIndex:n,rowIndex:t+1,cellIndex:0}:{levelIndex:n,rowIndex:t,cellIndex:i+1};default:return{levelIndex:n,rowIndex:t,cellIndex:i}}}function bF({controlsRef:e,direction:n,levelIndex:t,rowIndex:i,cellIndex:r,size:a}){var f,c,h;const o=qae({direction:n,size:a,rowIndex:i,cellIndex:r,levelIndex:t});if(!o)return;const l=(h=(c=(f=e.current)==null?void 0:f[o.levelIndex])==null?void 0:c[o.rowIndex])==null?void 0:h[o.cellIndex];l&&(l.disabled||l.getAttribute("data-hidden")||l.getAttribute("data-outside")?bF({controlsRef:e,direction:n,levelIndex:o.levelIndex,cellIndex:o.cellIndex,rowIndex:o.rowIndex,size:a}):l.focus())}function Hae(e){switch(e){case"ArrowDown":return"down";case"ArrowUp":return"up";case"ArrowRight":return"right";case"ArrowLeft":return"left";default:return null}}function Uae(e){var n;return(n=e.current)==null?void 0:n.map(t=>t.map(i=>i.length))}function t9({controlsRef:e,levelIndex:n,rowIndex:t,cellIndex:i,event:r}){const a=Hae(r.key);a&&(r.preventDefault(),bF({controlsRef:e,direction:a,levelIndex:n,rowIndex:t,cellIndex:i,size:Uae(e)}))}function Qi(e){return e==null||e===""?e:Ie(e).format("YYYY-MM-DD")}function wF(e){return e==null||e===""?e:Ie(e).format("YYYY-MM-DD HH:mm:ss")}function $S({minDate:e,maxDate:n}){const t=Ie();return!e&&!n?Qi(t):e&&Ie(t).isBefore(e)?Qi(e):n&&Ie(t).isAfter(n)?Qi(n):Qi(t)}const Vae={locale:"en",firstDayOfWeek:1,weekendDays:[0,6],labelSeparator:"–",consistentWeeks:!1},Wae=A.createContext(Vae);function yl(){const e=A.use(Wae),n=A.useCallback(a=>a||e.locale,[e.locale]),t=A.useCallback(a=>typeof a=="number"?a:e.firstDayOfWeek,[e.firstDayOfWeek]),i=A.useCallback(a=>Array.isArray(a)?a:e.weekendDays,[e.weekendDays]),r=A.useCallback(a=>typeof a=="string"?a:e.labelSeparator,[e.labelSeparator]);return{...e,getLocale:n,getFirstDayOfWeek:t,getWeekendDays:i,getLabelSeparator:r}}function Gae({value:e,type:n,withTime:t}){const i=t?wF:Qi;if(n==="range"&&Array.isArray(e)){const r=i(e[0]),a=i(e[1]);return r?a?`${r} – ${a}`:`${r} –`:""}return n==="multiple"&&Array.isArray(e)?e.filter(Boolean).join(", "):!Array.isArray(e)&&e?i(e):""}function kF({value:e,type:n,name:t,form:i,withTime:r=!1}){return y.jsx("input",{type:"hidden",value:Gae({value:e,type:n,withTime:r}),name:t,form:i})}kF.displayName="@mantine/dates/HiddenDatesInput";var _F={day:"m_396ce5cb"};const xF=(e,{size:n})=>({day:{"--day-size":Pn(n,"day-size")}}),i0=Re(e=>{const n=be("Day",null,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,date:f,disabled:c,__staticSelector:h,weekend:d,outside:p,selected:v,renderDay:b,inRange:w,firstInRange:k,lastInRange:_,hidden:C,static:x,highlightToday:E,fullWidth:O,attributes:j,...M}=n;return y.jsx(Tt,{...Ze({name:h||"Day",classes:_F,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:j,vars:l,varsResolver:xF,rootSelector:"day"})("day",{style:C?{display:"none"}:void 0}),component:x?"div":"button",disabled:c,"data-today":Ie(f).isSame(new Date,"day")||void 0,"data-hidden":C||void 0,"data-highlight-today":E||void 0,"data-disabled":c||void 0,"data-weekend":!c&&!p&&d||void 0,"data-outside":!c&&p||void 0,"data-selected":!c&&v||void 0,"data-in-range":w&&!c||void 0,"data-first-in-range":k&&!c||void 0,"data-last-in-range":_&&!c||void 0,"data-static":x||void 0,"data-full-width":O||void 0,unstyled:o,...M,children:(b==null?void 0:b(f))||Ie(f).date()})});i0.classes=_F;i0.varsResolver=xF;i0.displayName="@mantine/dates/Day";function Yae({locale:e,format:n="dd",firstDayOfWeek:t=1}){const i=Ie().day(t),r=[];for(let a=0;a<7;a+=1)typeof n=="string"?r.push(Ie(i).add(a,"days").locale(e).format(n)):r.push(n(Ie(i).add(a,"days").format("YYYY-MM-DD")));return r}var SF={weekday:"m_18a3eca"};const CF=(e,{size:n})=>({weekdaysRow:{"--wr-fz":ti(n),"--wr-spacing":Ht(n)}}),r0=Re(e=>{const n=be("WeekdaysRow",null,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,locale:f,firstDayOfWeek:c,weekdayFormat:h,cellComponent:d="th",__staticSelector:p,withWeekNumbers:v,attributes:b,...w}=n,k=Ze({name:p||"WeekdaysRow",classes:SF,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:b,vars:l,varsResolver:CF,rootSelector:"weekdaysRow"}),_=yl(),C=Yae({locale:_.getLocale(f),format:h,firstDayOfWeek:_.getFirstDayOfWeek(c)}).map((x,E)=>y.jsx(d,{...k("weekday"),children:x},E));return y.jsxs(ge,{component:"tr",...k("weekdaysRow"),...w,children:[v&&y.jsx(d,{...k("weekday"),children:"#"}),C]})});r0.classes=SF;r0.varsResolver=CF;r0.displayName="@mantine/dates/WeekdaysRow";function Kae(e,n=1){let t=Ie(e);if(!t.isValid())return t;const i=n===0?6:n-1;for(;t.day()!==i;)t=t.add(1,"day");return t.format("YYYY-MM-DD")}function Xae(e,n=1){let t=Ie(e);for(;t.day()!==n;)t=t.subtract(1,"day");return t.format("YYYY-MM-DD")}function Zae({month:e,firstDayOfWeek:n=1,consistentWeeks:t}){const i=Ie(Ie(e).subtract(Ie(e).date()-1,"day").format("YYYY-M-D")),r=i.format("YYYY-MM-DD"),a=Kae(i.add(+i.daysInMonth()-1,"day").format("YYYY-MM-DD"),n),o=[];let l=Ie(Xae(r,n));for(;Ie(l).isBefore(a,"day");){const f=[];for(let c=0;c<7;c+=1)f.push(l.format("YYYY-MM-DD")),l=l.add(1,"day");o.push(f)}if(t&&o.length<6){const f=o[o.length-1],c=f[f.length-1];let h=Ie(c).add(1,"day");for(;o.length<6;){const d=[];for(let p=0;p<7;p+=1)d.push(h.format("YYYY-MM-DD")),h=h.add(1,"day");o.push(d)}}return o}function i9(e,n){return Ie(e).format("YYYY-MM")===Ie(n).format("YYYY-MM")}function AF(e,n){return n?Ie(e).isAfter(Ie(n).subtract(1,"day"),"day"):!0}function OF(e,n){return n?Ie(e).isBefore(Ie(n).add(1,"day"),"day"):!0}function Qae({dates:e,minDate:n,maxDate:t,getDayProps:i,excludeDate:r,hideOutsideDates:a,month:o}){const l=e.flat().filter(h=>{var d;return OF(h,t)&&AF(h,n)&&!(r!=null&&r(h))&&!((d=i==null?void 0:i(h))!=null&&d.disabled)&&(!a||i9(h,o))}),f=l.find(h=>{var d;return(d=i==null?void 0:i(h))==null?void 0:d.selected});if(f)return f;const c=l.find(h=>Ie().isSame(h,"date"));return c||l[0]}var wg={exports:{}},Jae=wg.exports,J5;function eoe(){return J5||(J5=1,(function(e,n){(function(t,i){e.exports=i()})(Jae,(function(){var t="day";return function(i,r,a){var o=function(c){return c.add(4-c.isoWeekday(),t)},l=r.prototype;l.isoWeekYear=function(){return o(this).year()},l.isoWeek=function(c){if(!this.$utils().u(c))return this.add(7*(c-this.isoWeek()),t);var h,d,p,v,b=o(this),w=(h=this.isoWeekYear(),d=this.$u,p=(d?a.utc:a)().year(h).startOf("year"),v=4-p.isoWeekday(),p.isoWeekday()>4&&(v+=7),p.add(v,t));return b.diff(w,"week")+1},l.isoWeekday=function(c){return this.$utils().u(c)?this.day()||7:this.day(this.day()%7?c:c-7)};var f=l.startOf;l.startOf=function(c,h){var d=this.$utils(),p=!!d.u(h)||h;return d.p(c)==="isoweek"?p?this.date(this.date()-(this.isoWeekday()-1)).startOf("day"):this.date(this.date()-1-(this.isoWeekday()-1)+7).endOf("day"):f.bind(this)(c,h)}}}))})(wg)),wg.exports}var noe=eoe();const toe=ht(noe);Ie.extend(toe);function ioe(e){return Ie(e.find(n=>Ie(n).day()===1)).isoWeek()}var jF={month:"m_cc9820d3",monthCell:"m_8f457cd5",weekNumber:"m_6cff9dea"};const roe={withCellSpacing:!0},EF=(e,{size:n})=>({weekNumber:{"--wn-fz":ti(n),"--wn-size":Pn(n,"wn-size")}}),ip=Re(e=>{const n=be("Month",roe,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,__staticSelector:f,locale:c,firstDayOfWeek:h,weekdayFormat:d,month:p,weekendDays:v,getDayProps:b,excludeDate:w,minDate:k,maxDate:_,renderDay:C,hideOutsideDates:x,hideWeekdays:E,getDayAriaLabel:O,static:j,__getDayRef:M,__onDayKeyDown:P,__onDayClick:F,__onDayMouseEnter:R,__preventFocus:L,__stopPropagation:B,withCellSpacing:G,size:U,highlightToday:H,withWeekNumbers:N,fullWidth:z,attributes:q,...Y}=n,D=Ze({name:f||"Month",classes:jF,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:q,vars:l,varsResolver:EF,rootSelector:"month"}),V=yl(),W=Zae({month:p,firstDayOfWeek:V.getFirstDayOfWeek(h),consistentWeeks:V.consistentWeeks}),$=Qae({dates:W,minDate:Qi(k),maxDate:Qi(_),getDayProps:b,excludeDate:w,hideOutsideDates:x,month:p}),{resolvedClassNames:X,resolvedStyles:ee}=Hi({classNames:t,styles:a,props:n}),re=W.map((se,ye)=>{const ae=se.map((le,_e)=>{const ne=!i9(le,p),ze=(O==null?void 0:O(le))||Ie(le).locale(c||V.locale).format("D MMMM YYYY"),we=b==null?void 0:b(le),Ce=Ie(le).isSame($,"date");return y.jsx("td",{...D("monthCell"),"data-with-spacing":G||void 0,children:y.jsx(i0,{__staticSelector:f||"Month",classNames:X,styles:ee,attributes:q,unstyled:o,"data-mantine-stop-propagation":B||void 0,highlightToday:H,renderDay:C,date:le,size:U,weekend:V.getWeekendDays(v).includes(Ie(le).get("day")),outside:ne,hidden:x?ne:!1,"aria-label":ze,static:j,fullWidth:z,disabled:(w==null?void 0:w(le))||!OF(le,Qi(_))||!AF(le,Qi(k)),ref:Ne=>{Ne&&(M==null||M(ye,_e,Ne))},...we,onKeyDown:Ne=>{var ve;(ve=we==null?void 0:we.onKeyDown)==null||ve.call(we,Ne),P==null||P(Ne,{rowIndex:ye,cellIndex:_e,date:le})},onMouseEnter:Ne=>{var ve;(ve=we==null?void 0:we.onMouseEnter)==null||ve.call(we,Ne),R==null||R(Ne,le)},onClick:Ne=>{var ve;(ve=we==null?void 0:we.onClick)==null||ve.call(we,Ne),F==null||F(Ne,le)},onMouseDown:Ne=>{var ve;(ve=we==null?void 0:we.onMouseDown)==null||ve.call(we,Ne),L&&Ne.preventDefault()},tabIndex:L||!Ce?-1:0})},le.toString())});return y.jsxs("tr",{...D("monthRow"),children:[N&&y.jsx("td",{...D("weekNumber"),children:ioe(se)}),ae]},ye)});return y.jsxs(ge,{component:"table",...D("month"),size:U,"data-full-width":z||void 0,...Y,children:[!E&&y.jsx("thead",{...D("monthThead"),children:y.jsx(r0,{__staticSelector:f||"Month",locale:c,firstDayOfWeek:h,weekdayFormat:d,withWeekNumbers:N,size:U,classNames:X,styles:ee,unstyled:o,attributes:q})}),y.jsx("tbody",{...D("monthTbody"),children:re})]})});ip.classes=jF;ip.varsResolver=EF;ip.displayName="@mantine/dates/Month";var TF={pickerControl:"m_dc6a3c71"};const MF=(e,{size:n})=>({pickerControl:{"--dpc-fz":ti(n),"--dpc-size":Pn(n,"dpc-size")}}),rp=Re(e=>{const n=be("PickerControl",null,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,firstInRange:f,lastInRange:c,inRange:h,__staticSelector:d,selected:p,disabled:v,fullWidth:b,attributes:w,...k}=n;return y.jsx(Tt,{...Ze({name:d||"PickerControl",classes:TF,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:w,vars:l,varsResolver:MF,rootSelector:"pickerControl"})("pickerControl"),unstyled:o,"data-picker-control":!0,"data-full-width":b||void 0,"data-selected":p&&!v||void 0,"data-disabled":v||void 0,"data-in-range":h&&!v&&!p||void 0,"data-first-in-range":f&&!v||void 0,"data-last-in-range":c&&!v||void 0,disabled:v,...k})});rp.classes=TF;rp.varsResolver=MF;rp.displayName="@mantine/dates/PickerControl";function DF({year:e,minDate:n,maxDate:t}){return!n&&!t?!1:!!(n&&Ie(e).isBefore(n,"year")||t&&Ie(e).isAfter(t,"year"))}function aoe({years:e,minDate:n,maxDate:t,getYearControlProps:i}){const r=e.flat().filter(l=>{var f;return!DF({year:l,minDate:n,maxDate:t})&&!((f=i==null?void 0:i(l))!=null&&f.disabled)}),a=r.find(l=>{var f;return(f=i==null?void 0:i(l))==null?void 0:f.selected});if(a)return a;const o=r.find(l=>Ie().isSame(l,"year"));return o||r[0]}function RF(e){const n=Ie(e).year(),t=n-n%10;let i=0;const r=[[],[],[],[]];for(let a=0;a<4;a+=1){const o=a===3?1:3;for(let l=0;l{const n=be("YearsList",ooe,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,decade:f,yearsListFormat:c,locale:h,minDate:d,maxDate:p,getYearControlProps:v,__staticSelector:b,__getControlRef:w,__onControlKeyDown:k,__onControlClick:_,__onControlMouseEnter:C,__preventFocus:x,__stopPropagation:E,withCellSpacing:O,fullWidth:j,size:M,attributes:P,...F}=n,R=Ze({name:b||"YearsList",classes:PF,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:P,vars:l,rootSelector:"yearsList"}),L=yl(),B=RF(f),G=aoe({years:B,minDate:d,maxDate:p,getYearControlProps:v}),U=B.map((H,N)=>{const z=H.map((q,Y)=>{const D=v==null?void 0:v(q),V=Ie(q).isSame(G,"year");return y.jsx("td",{...R("yearsListCell"),"data-with-spacing":O||void 0,children:y.jsx(rp,{...R("yearsListControl"),size:M,unstyled:o,fullWidth:j,"data-mantine-stop-propagation":E||void 0,disabled:DF({year:q,minDate:d,maxDate:p}),ref:W=>{W&&(w==null||w(N,Y,W))},...D,onKeyDown:W=>{var $;($=D==null?void 0:D.onKeyDown)==null||$.call(D,W),k==null||k(W,{rowIndex:N,cellIndex:Y,date:q})},onClick:W=>{var $;($=D==null?void 0:D.onClick)==null||$.call(D,W),_==null||_(W,q)},onMouseEnter:W=>{var $;($=D==null?void 0:D.onMouseEnter)==null||$.call(D,W),C==null||C(W,q)},onMouseDown:W=>{var $;($=D==null?void 0:D.onMouseDown)==null||$.call(D,W),x&&W.preventDefault()},tabIndex:x||!V?-1:0,children:(D==null?void 0:D.children)??Ie(q).locale(L.getLocale(h)).format(c)})},Y)});return y.jsx("tr",{...R("yearsListRow"),children:z},N)});return y.jsx(ge,{component:"table",size:M,...R("yearsList"),"data-full-width":j||void 0,...F,children:y.jsx("tbody",{children:U})})});a0.classes=PF;a0.displayName="@mantine/dates/YearsList";function NF({month:e,minDate:n,maxDate:t}){return!n&&!t?!1:!!(n&&Ie(e).isBefore(n,"month")||t&&Ie(e).isAfter(t,"month"))}function soe({months:e,minDate:n,maxDate:t,getMonthControlProps:i}){const r=e.flat().filter(l=>{var f;return!NF({month:l,minDate:n,maxDate:t})&&!((f=i==null?void 0:i(l))!=null&&f.disabled)}),a=r.find(l=>{var f;return(f=i==null?void 0:i(l))==null?void 0:f.selected});if(a)return a;const o=r.find(l=>Ie().isSame(l,"month"));return o||r[0]}function loe(e){const n=Ie(e).startOf("year").toDate(),t=[[],[],[],[]];let i=0;for(let r=0;r<4;r+=1)for(let a=0;a<3;a+=1)t[r].push(Ie(n).add(i,"months").format("YYYY-MM-DD")),i+=1;return t}var $F={monthsList:"m_2a6c32d",monthsListCell:"m_fe27622f"};const uoe={monthsListFormat:"MMM",withCellSpacing:!0},o0=Re(e=>{const n=be("MonthsList",uoe,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,__staticSelector:f,year:c,monthsListFormat:h,locale:d,minDate:p,maxDate:v,getMonthControlProps:b,__getControlRef:w,__onControlKeyDown:k,__onControlClick:_,__onControlMouseEnter:C,__preventFocus:x,__stopPropagation:E,withCellSpacing:O,fullWidth:j,size:M,attributes:P,...F}=n,R=Ze({name:f||"MonthsList",classes:$F,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:P,vars:l,rootSelector:"monthsList"}),L=yl(),B=loe(c),G=soe({months:B,minDate:Qi(p),maxDate:Qi(v),getMonthControlProps:b}),U=B.map((H,N)=>{const z=H.map((q,Y)=>{const D=b==null?void 0:b(q),V=Ie(q).isSame(G,"month");return y.jsx("td",{...R("monthsListCell"),"data-with-spacing":O||void 0,children:y.jsx(rp,{...R("monthsListControl"),size:M,unstyled:o,fullWidth:j,__staticSelector:f||"MonthsList","data-mantine-stop-propagation":E||void 0,disabled:NF({month:q,minDate:Qi(p),maxDate:Qi(v)}),ref:W=>{W&&(w==null||w(N,Y,W))},...D,onKeyDown:W=>{var $;($=D==null?void 0:D.onKeyDown)==null||$.call(D,W),k==null||k(W,{rowIndex:N,cellIndex:Y,date:q})},onClick:W=>{var $;($=D==null?void 0:D.onClick)==null||$.call(D,W),_==null||_(W,q)},onMouseEnter:W=>{var $;($=D==null?void 0:D.onMouseEnter)==null||$.call(D,W),C==null||C(W,q)},onMouseDown:W=>{var $;($=D==null?void 0:D.onMouseDown)==null||$.call(D,W),x&&W.preventDefault()},tabIndex:x||!V?-1:0,children:(D==null?void 0:D.children)??Ie(q).locale(L.getLocale(d)).format(h)})},Y)});return y.jsx("tr",{...R("monthsListRow"),children:z},N)});return y.jsx(ge,{component:"table",size:M,...R("monthsList"),"data-full-width":j||void 0,...F,children:y.jsx("tbody",{children:U})})});o0.classes=$F;o0.displayName="@mantine/dates/MonthsList";var zF={calendarHeader:"m_730a79ed",calendarHeaderLevel:"m_f6645d97",calendarHeaderControl:"m_2351eeb0",calendarHeaderControlIcon:"m_367dc749"};const foe={hasNextLevel:!0,withNext:!0,withPrevious:!0,headerControlsOrder:["previous","level","next"]},LF=(e,{size:n})=>({calendarHeader:{"--dch-control-size":Pn(n,"dch-control-size"),"--dch-fz":ti(n)}}),ms=Re(e=>{const n=be("CalendarHeader",foe,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,nextIcon:f,previousIcon:c,nextLabel:h,previousLabel:d,onNext:p,onPrevious:v,onLevelClick:b,label:w,nextDisabled:k,previousDisabled:_,hasNextLevel:C,levelControlAriaLabel:x,withNext:E,withPrevious:O,headerControlsOrder:j,fullWidth:M,__staticSelector:P,__preventFocus:F,__stopPropagation:R,attributes:L,...B}=n,G=Ze({name:P||"CalendarHeader",classes:zF,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:L,vars:l,varsResolver:LF,rootSelector:"calendarHeader"}),U=F?Y=>Y.preventDefault():void 0,H=O&&A.createElement(Tt,{...G("calendarHeaderControl"),key:"previous","data-direction":"previous","aria-label":d,onClick:v,unstyled:o,onMouseDown:U,disabled:_,"data-disabled":_||void 0,tabIndex:F||_?-1:0,"data-mantine-stop-propagation":R||void 0},c||y.jsx(Pg,{...G("calendarHeaderControlIcon"),"data-direction":"previous",size:"45%"})),N=A.createElement(Tt,{component:C?"button":"div",...G("calendarHeaderLevel"),key:"level",onClick:C?b:void 0,unstyled:o,onMouseDown:C?U:void 0,disabled:!C,"data-static":!C||void 0,"aria-label":x,tabIndex:F||!C?-1:0,"data-mantine-stop-propagation":R||void 0},w),z=E&&A.createElement(Tt,{...G("calendarHeaderControl"),key:"next","data-direction":"next","aria-label":h,onClick:p,unstyled:o,onMouseDown:U,disabled:k,"data-disabled":k||void 0,tabIndex:F||k?-1:0,"data-mantine-stop-propagation":R||void 0},f||y.jsx(Pg,{...G("calendarHeaderControlIcon"),"data-direction":"next",size:"45%"})),q=j.map(Y=>Y==="previous"?H:Y==="level"?N:Y==="next"?z:null);return y.jsx(ge,{...G("calendarHeader"),"data-full-width":M||void 0,...B,children:q})});ms.classes=zF;ms.varsResolver=LF;ms.displayName="@mantine/dates/CalendarHeader";function coe(e){const n=RF(e);return[n[0][0],n[3][0]]}const doe={decadeLabelFormat:"YYYY"},s0=Re(e=>{const{decade:n,locale:t,minDate:i,maxDate:r,yearsListFormat:a,getYearControlProps:o,__getControlRef:l,__onControlKeyDown:f,__onControlClick:c,__onControlMouseEnter:h,withCellSpacing:d,__preventFocus:p,nextIcon:v,previousIcon:b,nextLabel:w,previousLabel:k,onNext:_,onPrevious:C,nextDisabled:x,previousDisabled:E,levelControlAriaLabel:O,withNext:j,withPrevious:M,headerControlsOrder:P,decadeLabelFormat:F,classNames:R,styles:L,unstyled:B,__staticSelector:G,__stopPropagation:U,size:H,fullWidth:N,attributes:z,...q}=be("DecadeLevel",doe,e),Y=yl(),[D,V]=coe(n),W={__staticSelector:G||"DecadeLevel",classNames:R,styles:L,unstyled:B,size:H,attributes:z},$=typeof x=="boolean"?x:r?!Ie(V).endOf("year").isBefore(r):!1,X=typeof E=="boolean"?E:i?!Ie(D).startOf("year").isAfter(i):!1,ee=(re,se)=>Ie(re).locale(t||Y.locale).format(se);return y.jsxs(ge,{"data-decade-level":!0,size:H,...q,children:[y.jsx(ms,{label:typeof F=="function"?F(D,V):`${ee(D,F)} – ${ee(V,F)}`,__preventFocus:p,__stopPropagation:U,nextIcon:v,previousIcon:b,nextLabel:w,previousLabel:k,onNext:_,onPrevious:C,nextDisabled:$,previousDisabled:X,hasNextLevel:!1,levelControlAriaLabel:O,withNext:j,withPrevious:M,headerControlsOrder:P,fullWidth:N,...W}),y.jsx(a0,{decade:n,locale:t,minDate:i,maxDate:r,yearsListFormat:a,getYearControlProps:o,__getControlRef:l,__onControlKeyDown:f,__onControlClick:c,__onControlMouseEnter:h,__preventFocus:p,__stopPropagation:U,withCellSpacing:d,fullWidth:N,...W})]})});s0.classes={...a0.classes,...ms.classes};s0.displayName="@mantine/dates/DecadeLevel";const hoe={yearLabelFormat:"YYYY"},l0=Re(e=>{const{year:n,locale:t,minDate:i,maxDate:r,monthsListFormat:a,getMonthControlProps:o,__getControlRef:l,__onControlKeyDown:f,__onControlClick:c,__onControlMouseEnter:h,withCellSpacing:d,__preventFocus:p,nextIcon:v,previousIcon:b,nextLabel:w,previousLabel:k,onNext:_,onPrevious:C,onLevelClick:x,nextDisabled:E,previousDisabled:O,hasNextLevel:j,levelControlAriaLabel:M,withNext:P,withPrevious:F,headerControlsOrder:R,yearLabelFormat:L,__staticSelector:B,__stopPropagation:G,size:U,classNames:H,styles:N,unstyled:z,fullWidth:q,attributes:Y,...D}=be("YearLevel",hoe,e),V=yl(),W={__staticSelector:B||"YearLevel",classNames:H,styles:N,unstyled:z,size:U,attributes:Y},$=typeof E=="boolean"?E:r?!Ie(n).endOf("year").isBefore(r):!1,X=typeof O=="boolean"?O:i?!Ie(n).startOf("year").isAfter(i):!1;return y.jsxs(ge,{"data-year-level":!0,size:U,...D,children:[y.jsx(ms,{label:typeof L=="function"?L(n):Ie(n).locale(t||V.locale).format(L),__preventFocus:p,__stopPropagation:G,nextIcon:v,previousIcon:b,nextLabel:w,previousLabel:k,onNext:_,onPrevious:C,onLevelClick:x,nextDisabled:$,previousDisabled:X,hasNextLevel:j,levelControlAriaLabel:M,withNext:P,withPrevious:F,headerControlsOrder:R,fullWidth:q,...W}),y.jsx(o0,{year:n,locale:t,minDate:i,maxDate:r,monthsListFormat:a,getMonthControlProps:o,__getControlRef:l,__onControlKeyDown:f,__onControlClick:c,__onControlMouseEnter:h,__preventFocus:p,__stopPropagation:G,withCellSpacing:d,fullWidth:q,...W})]})});l0.classes={...ms.classes,...o0.classes};l0.displayName="@mantine/dates/YearLevel";const moe={monthLabelFormat:"MMMM YYYY"},u0=Re(e=>{const{month:n,locale:t,firstDayOfWeek:i,weekdayFormat:r,weekendDays:a,getDayProps:o,excludeDate:l,minDate:f,maxDate:c,renderDay:h,hideOutsideDates:d,hideWeekdays:p,getDayAriaLabel:v,__getDayRef:b,__onDayKeyDown:w,__onDayClick:k,__onDayMouseEnter:_,withCellSpacing:C,highlightToday:x,withWeekNumbers:E,__preventFocus:O,__stopPropagation:j,nextIcon:M,previousIcon:P,nextLabel:F,previousLabel:R,onNext:L,onPrevious:B,onLevelClick:G,nextDisabled:U,previousDisabled:H,hasNextLevel:N,levelControlAriaLabel:z,withNext:q,withPrevious:Y,headerControlsOrder:D,monthLabelFormat:V,classNames:W,styles:$,unstyled:X,__staticSelector:ee,size:re,static:se,fullWidth:ye,attributes:ae,...le}=be("MonthLevel",moe,e),_e=yl(),ne={__staticSelector:ee||"MonthLevel",classNames:W,styles:$,unstyled:X,size:re,attributes:ae},ze=typeof U=="boolean"?U:c?!Ie(n).endOf("month").isBefore(c):!1,we=typeof H=="boolean"?H:f?!Ie(n).startOf("month").isAfter(f):!1;return y.jsxs(ge,{"data-month-level":!0,size:re,...le,children:[y.jsx(ms,{label:typeof V=="function"?V(n):Ie(n).locale(t||_e.locale).format(V),__preventFocus:O,__stopPropagation:j,nextIcon:M,previousIcon:P,nextLabel:F,previousLabel:R,onNext:L,onPrevious:B,onLevelClick:G,nextDisabled:ze,previousDisabled:we,hasNextLevel:N,levelControlAriaLabel:z,withNext:q,withPrevious:Y,headerControlsOrder:D,fullWidth:ye,...ne}),y.jsx(ip,{month:n,locale:t,firstDayOfWeek:i,weekdayFormat:r,weekendDays:a,getDayProps:o,excludeDate:l,minDate:f,maxDate:c,renderDay:h,hideOutsideDates:d,hideWeekdays:p,getDayAriaLabel:v,__getDayRef:b,__onDayKeyDown:w,__onDayClick:k,__onDayMouseEnter:_,__preventFocus:O,__stopPropagation:j,static:se,withCellSpacing:C,highlightToday:x,withWeekNumbers:E,fullWidth:ye,...ne})]})});u0.classes={...ip.classes,...ms.classes};u0.displayName="@mantine/dates/MonthLevel";var IF={levelsGroup:"m_30b26e33"};const bl=Re(e=>{const n=be("LevelsGroup",null,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,__staticSelector:f,fullWidth:c,attributes:h,...d}=n;return y.jsx(ge,{...Ze({name:f||"LevelsGroup",classes:IF,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:h,vars:l,rootSelector:"levelsGroup"})("levelsGroup"),"data-full-width":c||void 0,...d})});bl.classes=IF;bl.displayName="@mantine/dates/LevelsGroup";const poe={numberOfColumns:1},f0=Re(e=>{const{decade:n,locale:t,minDate:i,maxDate:r,yearsListFormat:a,getYearControlProps:o,__onControlClick:l,__onControlMouseEnter:f,withCellSpacing:c,__preventFocus:h,nextIcon:d,previousIcon:p,nextLabel:v,previousLabel:b,onNext:w,onPrevious:k,nextDisabled:_,previousDisabled:C,headerControlsOrder:x,classNames:E,styles:O,unstyled:j,__staticSelector:M,__stopPropagation:P,numberOfColumns:F,levelControlAriaLabel:R,decadeLabelFormat:L,size:B,fullWidth:G,vars:U,attributes:H,...N}=be("DecadeLevelGroup",poe,e),z=A.useRef([]),q=Array(F).fill(0).map((Y,D)=>{const V=Ie(n).add(D*10,"years").format("YYYY-MM-DD");return y.jsx(s0,{size:B,yearsListFormat:a,decade:V,withNext:D===F-1,withPrevious:D===0,decadeLabelFormat:L,__onControlClick:l,__onControlMouseEnter:f,__onControlKeyDown:(W,$)=>t9({levelIndex:D,rowIndex:$.rowIndex,cellIndex:$.cellIndex,event:W,controlsRef:z}),__getControlRef:(W,$,X)=>{Array.isArray(z.current[D])||(z.current[D]=[]),Array.isArray(z.current[D][W])||(z.current[D][W]=[]),z.current[D][W][$]=X},levelControlAriaLabel:typeof R=="function"?R(V):R,locale:t,minDate:i,maxDate:r,__preventFocus:h,__stopPropagation:P,nextIcon:d,previousIcon:p,nextLabel:v,previousLabel:b,onNext:w,onPrevious:k,nextDisabled:_,previousDisabled:C,getYearControlProps:o,__staticSelector:M||"DecadeLevelGroup",classNames:E,styles:O,unstyled:j,withCellSpacing:c,headerControlsOrder:x,fullWidth:G,attributes:H},D)});return y.jsx(bl,{classNames:E,styles:O,__staticSelector:M||"DecadeLevelGroup",size:B,unstyled:j,fullWidth:G,attributes:H,...N,children:q})});f0.classes={...bl.classes,...s0.classes};f0.displayName="@mantine/dates/DecadeLevelGroup";const voe={numberOfColumns:1},c0=Re(e=>{const{year:n,locale:t,minDate:i,maxDate:r,monthsListFormat:a,getMonthControlProps:o,__onControlClick:l,__onControlMouseEnter:f,withCellSpacing:c,__preventFocus:h,nextIcon:d,previousIcon:p,nextLabel:v,previousLabel:b,onNext:w,onPrevious:k,onLevelClick:_,nextDisabled:C,previousDisabled:x,hasNextLevel:E,headerControlsOrder:O,classNames:j,styles:M,unstyled:P,__staticSelector:F,__stopPropagation:R,numberOfColumns:L,levelControlAriaLabel:B,yearLabelFormat:G,size:U,fullWidth:H,vars:N,attributes:z,...q}=be("YearLevelGroup",voe,e),Y=A.useRef([]),D=Array(L).fill(0).map((V,W)=>{const $=Ie(n).add(W,"years").format("YYYY-MM-DD");return y.jsx(l0,{size:U,monthsListFormat:a,year:$,withNext:W===L-1,withPrevious:W===0,yearLabelFormat:G,__stopPropagation:R,__onControlClick:l,__onControlMouseEnter:f,__onControlKeyDown:(X,ee)=>t9({levelIndex:W,rowIndex:ee.rowIndex,cellIndex:ee.cellIndex,event:X,controlsRef:Y}),__getControlRef:(X,ee,re)=>{Array.isArray(Y.current[W])||(Y.current[W]=[]),Array.isArray(Y.current[W][X])||(Y.current[W][X]=[]),Y.current[W][X][ee]=re},levelControlAriaLabel:typeof B=="function"?B($):B,locale:t,minDate:i,maxDate:r,__preventFocus:h,nextIcon:d,previousIcon:p,nextLabel:v,previousLabel:b,onNext:w,onPrevious:k,onLevelClick:_,nextDisabled:C,previousDisabled:x,hasNextLevel:E,getMonthControlProps:o,classNames:j,styles:M,unstyled:P,__staticSelector:F||"YearLevelGroup",withCellSpacing:c,headerControlsOrder:O,fullWidth:H,attributes:z},W)});return y.jsx(bl,{classNames:j,styles:M,__staticSelector:F||"YearLevelGroup",size:U,unstyled:P,fullWidth:H,attributes:z,...q,children:D})});c0.classes={...l0.classes,...bl.classes};c0.displayName="@mantine/dates/YearLevelGroup";const goe={numberOfColumns:1},d0=Re(e=>{const{month:n,locale:t,firstDayOfWeek:i,weekdayFormat:r,weekendDays:a,getDayProps:o,excludeDate:l,minDate:f,maxDate:c,renderDay:h,hideOutsideDates:d,hideWeekdays:p,getDayAriaLabel:v,__onDayClick:b,__onDayMouseEnter:w,withCellSpacing:k,highlightToday:_,withWeekNumbers:C,__preventFocus:x,nextIcon:E,previousIcon:O,nextLabel:j,previousLabel:M,onNext:P,onPrevious:F,onLevelClick:R,nextDisabled:L,previousDisabled:B,hasNextLevel:G,headerControlsOrder:U,classNames:H,styles:N,unstyled:z,numberOfColumns:q,levelControlAriaLabel:Y,monthLabelFormat:D,__staticSelector:V,__stopPropagation:W,size:$,static:X,fullWidth:ee,vars:re,attributes:se,...ye}=be("MonthLevelGroup",goe,e),ae=A.useRef([]),le=Array(q).fill(0).map((_e,ne)=>{const ze=Ie(n).add(ne,"months").format("YYYY-MM-DD");return y.jsx(u0,{month:ze,withNext:ne===q-1,withPrevious:ne===0,monthLabelFormat:D,__stopPropagation:W,__onDayClick:b,__onDayMouseEnter:w,__onDayKeyDown:(we,Ce)=>t9({levelIndex:ne,rowIndex:Ce.rowIndex,cellIndex:Ce.cellIndex,event:we,controlsRef:ae}),__getDayRef:(we,Ce,Ne)=>{Array.isArray(ae.current[ne])||(ae.current[ne]=[]),Array.isArray(ae.current[ne][we])||(ae.current[ne][we]=[]),ae.current[ne][we][Ce]=Ne},levelControlAriaLabel:typeof Y=="function"?Y(ze):Y,locale:t,firstDayOfWeek:i,weekdayFormat:r,weekendDays:a,getDayProps:o,excludeDate:l,minDate:f,maxDate:c,renderDay:h,hideOutsideDates:d,hideWeekdays:p,getDayAriaLabel:v,__preventFocus:x,nextIcon:E,previousIcon:O,nextLabel:j,previousLabel:M,onNext:P,onPrevious:F,onLevelClick:R,nextDisabled:L,previousDisabled:B,hasNextLevel:G,classNames:H,styles:N,unstyled:z,__staticSelector:V||"MonthLevelGroup",size:$,static:X,withCellSpacing:k,highlightToday:_,withWeekNumbers:C,headerControlsOrder:U,fullWidth:ee,attributes:se},ne)});return y.jsx(bl,{classNames:H,styles:N,__staticSelector:V||"MonthLevelGroup",size:$,fullWidth:ee,attributes:se,...ye,children:le})});d0.classes={...bl.classes,...u0.classes};d0.displayName="@mantine/dates/MonthLevelGroup";var BF={input:"m_6fa5e2aa"};const Gc=Re(e=>{const{inputProps:n,wrapperProps:t,placeholder:i,classNames:r,styles:a,unstyled:o,popoverProps:l,modalProps:f,dropdownType:c,children:h,formattedValue:d,dropdownHandlers:p,dropdownOpened:v,onClick:b,clearable:w,clearSectionMode:k,onClear:_,clearButtonProps:C,rightSection:x,shouldClear:E,readOnly:O,disabled:j,value:M,name:P,form:F,type:R,onDropdownClose:L,withTime:B,...G}=XL("PickerInputBase",{size:"sm"},e),U=y.jsx(Vt.ClearButton,{onClick:_,unstyled:o,...C}),H=()=>{R==="range"&&Array.isArray(M)&&M[0]&&!M[1]&&_(),p.close()};return y.jsxs(y.Fragment,{children:[c==="modal"&&!O&&y.jsx(Gr,{opened:v,onClose:H,withCloseButton:!1,size:"auto","data-dates-modal":!0,unstyled:o,...f,children:h}),y.jsx(Vt.Wrapper,{...t,children:y.jsxs(En,{position:"bottom-start",opened:v,trapFocus:!0,returnFocus:!1,unstyled:o,onClose:L,...l,disabled:(l==null?void 0:l.disabled)||c==="modal"||O,onChange:N=>{var z;N||((z=l==null?void 0:l.onClose)==null||z.call(l),H())},children:[y.jsx(En.Target,{children:y.jsx(Vt,{"data-dates-input":!0,"data-read-only":O||void 0,disabled:j,component:"button",type:"button",multiline:!0,onClick:N=>{b==null||b(N),p.toggle()},__clearSection:U,__clearable:w&&E&&!O&&!j,__clearSectionMode:k,rightSection:x,...n,classNames:{...r,input:dn(BF.input,r==null?void 0:r.input)},...G,children:d||y.jsx(Vt.Placeholder,{error:n.error,unstyled:o,classNames:r,styles:a,__staticSelector:n.__staticSelector,children:i})})}),y.jsx(En.Dropdown,{"data-dates-dropdown":!0,children:h})]})}),y.jsx(kF,{value:M,name:P,form:F,type:R,withTime:B})]})});Gc.classes=BF;Gc.displayName="@mantine/dates/PickerInputBase";const eM=e=>e==="range"?[null,null]:e==="multiple"?[]:null,nM=(e,n)=>{const t=n?wF:Qi;return Array.isArray(e)?e.map(t):t(e)};function r9({type:e,value:n,defaultValue:t,onChange:i,withTime:r=!1}){const a=A.useRef(e),[o,l,f]=Ti({value:nM(n,r),defaultValue:nM(t,r),finalValue:eM(e),onChange:i});let c=o;return a.current!==e&&(a.current=e,n===void 0&&(c=t!==void 0?t:eM(e),l(c))),[c,l,f]}function Bk(e,n){return e?e==="month"?0:e==="year"?1:2:n||0}function yoe(e){return e===0?"month":e===1?"year":"decade"}function nh(e,n,t){return yoe(Yo(Bk(e,0),Bk(n,0),Bk(t,2)))}const boe={maxLevel:"decade",minLevel:"month",__updateDateOnYearSelect:!0,__updateDateOnMonthSelect:!0,enableKeyboardNavigation:!0},Yc=Re(e=>{const n=be("Calendar",boe,e),{vars:t,maxLevel:i,minLevel:r,defaultLevel:a,level:o,onLevelChange:l,date:f,defaultDate:c,onDateChange:h,numberOfColumns:d,columnsToScroll:p,ariaLabels:v,nextLabel:b,previousLabel:w,onYearSelect:k,onMonthSelect:_,onYearMouseEnter:C,onMonthMouseEnter:x,headerControlsOrder:E,__updateDateOnYearSelect:O,__updateDateOnMonthSelect:j,__setDateRef:M,__setLevelRef:P,firstDayOfWeek:F,weekdayFormat:R,weekendDays:L,getDayProps:B,excludeDate:G,renderDay:U,hideOutsideDates:H,hideWeekdays:N,getDayAriaLabel:z,monthLabelFormat:q,nextIcon:Y,previousIcon:D,__onDayClick:V,__onDayMouseEnter:W,withCellSpacing:$,highlightToday:X,withWeekNumbers:ee,monthsListFormat:re,getMonthControlProps:se,yearLabelFormat:ye,yearsListFormat:ae,getYearControlProps:le,decadeLabelFormat:_e,classNames:ne,styles:ze,unstyled:we,minDate:Ce,maxDate:Ne,locale:ve,__staticSelector:xe,size:Pe,__preventFocus:ue,__stopPropagation:Be,onNextDecade:We,onPreviousDecade:Ue,onNextYear:Xe,onPreviousYear:Qe,onNextMonth:ie,onPreviousMonth:he,static:Ge,enableKeyboardNavigation:Je,fullWidth:Se,attributes:tn,ref:cn,...On}=n,{resolvedClassNames:mn,resolvedStyles:an}=Hi({classNames:ne,styles:ze,props:n}),[en,Rn]=Ti({value:o?nh(o,r,i):void 0,defaultValue:a?nh(a,r,i):void 0,finalValue:nh(void 0,r,i),onChange:l}),[De,Fe]=r9({type:"default",value:Qi(f),defaultValue:Qi(c),onChange:h});A.useImperativeHandle(M,()=>nn=>{Fe(nn)}),A.useImperativeHandle(P,()=>nn=>{Rn(nn)});const jn={__staticSelector:xe||"Calendar",styles:an,classNames:mn,unstyled:we,size:Pe,attributes:tn},yn=p||d||1,gn=A.useRef(null);if(gn.current===null){const nn=new Date;gn.current=Ce&&Ie(nn).isAfter(Ce)?Ce:Ie(nn).format("YYYY-MM-DD")}const bn=De||gn.current,tt=()=>{const nn=Ie(bn).add(yn,"month").format("YYYY-MM-DD");ie==null||ie(nn),Fe(nn)},wt=()=>{const nn=Ie(bn).subtract(yn,"month").format("YYYY-MM-DD");he==null||he(nn),Fe(nn)},Le=()=>{const nn=Ie(bn).add(yn,"year").format("YYYY-MM-DD");Xe==null||Xe(nn),Fe(nn)},qe=()=>{const nn=Ie(bn).subtract(yn,"year").format("YYYY-MM-DD");Qe==null||Qe(nn),Fe(nn)},Nn=()=>{const nn=Ie(bn).add(10*yn,"year").format("YYYY-MM-DD");We==null||We(nn),Fe(nn)},ot=()=>{const nn=Ie(bn).subtract(10*yn,"year").format("YYYY-MM-DD");Ue==null||Ue(nn),Fe(nn)},Mn=A.useRef(null);return A.useEffect(()=>{if(!Je||Ge)return;const nn=rn=>{var Vn;if(!((Vn=Mn.current)!=null&&Vn.contains(document.activeElement)))return;const on=rn.ctrlKey||rn.metaKey,Bn=rn.shiftKey;switch(rn.key){case"ArrowUp":on&&Bn?(rn.preventDefault(),ot()):on&&(rn.preventDefault(),qe());break;case"ArrowDown":on&&Bn?(rn.preventDefault(),Nn()):on&&(rn.preventDefault(),Le());break;case"y":case"Y":en==="month"&&(rn.preventDefault(),Rn("year"));break}};return document.addEventListener("keydown",nn),()=>{document.removeEventListener("keydown",nn)}},[Je,Ge,en,Le,qe,Nn,ot]),y.jsxs(ge,{ref:Wt(Mn,cn),size:Pe,"data-calendar":!0,"data-full-width":Se||void 0,...On,children:[en==="month"&&y.jsx(d0,{month:bn,minDate:Ce,maxDate:Ne,firstDayOfWeek:F,weekdayFormat:R,weekendDays:L,getDayProps:B,excludeDate:G,renderDay:U,hideOutsideDates:H,hideWeekdays:N,getDayAriaLabel:z,onNext:tt,onPrevious:wt,hasNextLevel:i!=="month",onLevelClick:()=>Rn("year"),numberOfColumns:d,locale:ve,levelControlAriaLabel:v==null?void 0:v.monthLevelControl,nextLabel:(v==null?void 0:v.nextMonth)??b,nextIcon:Y,previousLabel:(v==null?void 0:v.previousMonth)??w,previousIcon:D,monthLabelFormat:q,__onDayClick:V,__onDayMouseEnter:W,__preventFocus:ue,__stopPropagation:Be,static:Ge,withCellSpacing:$,highlightToday:X,withWeekNumbers:ee,headerControlsOrder:E,fullWidth:Se,...jn}),en==="year"&&y.jsx(c0,{year:bn,numberOfColumns:d,minDate:Ce,maxDate:Ne,monthsListFormat:re,getMonthControlProps:se,locale:ve,onNext:Le,onPrevious:qe,hasNextLevel:i!=="month"&&i!=="year",onLevelClick:()=>Rn("decade"),levelControlAriaLabel:v==null?void 0:v.yearLevelControl,nextLabel:(v==null?void 0:v.nextYear)??b,nextIcon:Y,previousLabel:(v==null?void 0:v.previousYear)??w,previousIcon:D,yearLabelFormat:ye,__onControlMouseEnter:x,__onControlClick:(nn,rn)=>{j&&Fe(rn),Rn(nh("month",r,i)),_==null||_(rn)},__preventFocus:ue,__stopPropagation:Be,withCellSpacing:$,headerControlsOrder:E,fullWidth:Se,...jn}),en==="decade"&&y.jsx(f0,{decade:bn,minDate:Ce,maxDate:Ne,yearsListFormat:ae,getYearControlProps:le,locale:ve,onNext:Nn,onPrevious:ot,numberOfColumns:d,nextLabel:(v==null?void 0:v.nextDecade)??b,nextIcon:Y,previousLabel:(v==null?void 0:v.previousDecade)??w,previousIcon:D,decadeLabelFormat:_e,__onControlMouseEnter:C,__onControlClick:(nn,rn)=>{O&&Fe(rn),Rn(nh("year",r,i)),k==null||k(rn)},__preventFocus:ue,__stopPropagation:Be,withCellSpacing:$,headerControlsOrder:E,fullWidth:Se,...jn})]})});Yc.classes={...f0.classes,...c0.classes,...d0.classes};Yc.displayName="@mantine/dates/Calendar";function h0(e){const{maxLevel:n,minLevel:t,defaultLevel:i,level:r,onLevelChange:a,nextIcon:o,previousIcon:l,date:f,defaultDate:c,onDateChange:h,numberOfColumns:d,columnsToScroll:p,ariaLabels:v,nextLabel:b,previousLabel:w,onYearSelect:k,onMonthSelect:_,onYearMouseEnter:C,onMonthMouseEnter:x,onNextMonth:E,onPreviousMonth:O,onNextYear:j,onPreviousYear:M,onNextDecade:P,onPreviousDecade:F,withCellSpacing:R,highlightToday:L,__updateDateOnYearSelect:B,__updateDateOnMonthSelect:G,__setDateRef:U,__setLevelRef:H,withWeekNumbers:N,headerControlsOrder:z,firstDayOfWeek:q,weekdayFormat:Y,weekendDays:D,getDayProps:V,excludeDate:W,renderDay:$,hideOutsideDates:X,hideWeekdays:ee,getDayAriaLabel:re,monthLabelFormat:se,monthsListFormat:ye,getMonthControlProps:ae,yearLabelFormat:le,yearsListFormat:_e,getYearControlProps:ne,decadeLabelFormat:ze,allowSingleDateInRange:we,allowDeselect:Ce,minDate:Ne,maxDate:ve,locale:xe,...Pe}=e;return{calendarProps:{maxLevel:n,minLevel:t,defaultLevel:i,level:r,onLevelChange:a,nextIcon:o,previousIcon:l,date:f,defaultDate:c,onDateChange:h,numberOfColumns:d,columnsToScroll:p,ariaLabels:v,nextLabel:b,previousLabel:w,onYearSelect:k,onMonthSelect:_,onYearMouseEnter:C,onMonthMouseEnter:x,onNextMonth:E,onPreviousMonth:O,onNextYear:j,onPreviousYear:M,onNextDecade:P,onPreviousDecade:F,withCellSpacing:R,highlightToday:L,__updateDateOnYearSelect:B,__updateDateOnMonthSelect:G,__setDateRef:U,withWeekNumbers:N,headerControlsOrder:z,firstDayOfWeek:q,weekdayFormat:Y,weekendDays:D,getDayProps:V,excludeDate:W,renderDay:$,hideOutsideDates:X,hideWeekdays:ee,getDayAriaLabel:re,monthLabelFormat:se,monthsListFormat:ye,getMonthControlProps:ae,yearLabelFormat:le,yearsListFormat:_e,getYearControlProps:ne,decadeLabelFormat:ze,allowSingleDateInRange:we,allowDeselect:Ce,minDate:Ne,maxDate:ve,locale:xe},others:Pe}}function tM(e,n){const t=[...n].sort((i,r)=>Ie(i).isAfter(Ie(r))?1:-1);return Ie(t[0]).startOf("day").subtract(1,"ms").isBefore(e)&&Ie(t[1]).endOf("day").add(1,"ms").isAfter(e)}function FF({type:e,level:n,value:t,defaultValue:i,onChange:r,allowSingleDateInRange:a,allowDeselect:o,onMouseLeave:l}){const[f,c]=r9({type:e,value:t,defaultValue:i,onChange:r}),[h,d]=A.useState(e==="range"&&f[0]&&!f[1]?f[0]:null),[p,v]=A.useState(null),b=O=>{if(e==="range"){if(h&&!f[1]){if(Ie(O).isSame(h,n)&&!a){d(null),v(null),c([null,null]);return}const j=[O,h];j.sort((M,P)=>Ie(M).isAfter(Ie(P))?1:-1),c(j),v(null),d(null);return}if(f[0]&&!f[1]&&Ie(O).isSame(f[0],n)&&!a){d(null),v(null),c([null,null]);return}c([O,null]),v(null),d(O);return}if(e==="multiple"){f.some(j=>Ie(j).isSame(O,n))?c(f.filter(j=>!Ie(j).isSame(O,n))):c([...f,O]);return}f&&o&&Ie(O).isSame(f,n)?c(null):c(O)},w=O=>h&&p?tM(O,[p,h]):f[0]&&f[1]?tM(O,f):!1,k=e==="range"?O=>{l==null||l(O),v(null)}:l,_=O=>f[0]&&Ie(O).isSame(f[0],n)?!(p&&Ie(p).isBefore(f[0])):!1,C=O=>f[1]?Ie(O).isSame(f[1],n):!f[0]||!p?!1:Ie(p).isBefore(f[0])&&Ie(O).isSame(f[0],n),x=O=>{if(e==="range")return{selected:f.some(M=>M&&Ie(M).isSame(O,n)),inRange:w(O),firstInRange:_(O),lastInRange:C(O),"data-autofocus":!!f[0]&&Ie(f[0]).isSame(O,n)||void 0};if(e==="multiple")return{selected:f.some(M=>M&&Ie(M).isSame(O,n)),"data-autofocus":!!f[0]&&Ie(f[0]).isSame(O,n)||void 0};const j=Ie(f).isSame(O,n);return{selected:j,"data-autofocus":j||void 0}},E=e==="range"&&h?v:()=>{};return A.useEffect(()=>{if(e==="range")if(f[0]&&!f[1])d(f[0]);else{const O=f[0]==null&&f[1]==null,j=f[0]!=null&&f[1]!=null;(O||j)&&(d(null),v(null))}},[f]),{onDateChange:b,onRootMouseLeave:k,onHoveredDateChange:E,getControlProps:x,_value:f,setValue:c}}var qF={monthPickerRoot:"m_53c9e871",presetsList:"m_cccb8ff3",presetButton:"m_7b4fbf50"};const HF=(e,{size:n})=>({monthPickerRoot:{"--preset-font-size":ti(n)}}),woe={type:"default"},ap=Re(e=>{const n=be("MonthPicker",woe,e),{classNames:t,styles:i,vars:r,type:a,defaultValue:o,value:l,onChange:f,__staticSelector:c,getMonthControlProps:h,allowSingleDateInRange:d,allowDeselect:p,onMouseLeave:v,onMonthSelect:b,__updateDateOnMonthSelect:w,__onPresetSelect:k,__stopPropagation:_,presets:C,className:x,style:E,unstyled:O,size:j,attributes:M,onLevelChange:P,...F}=n,{calendarProps:R,others:L}=h0(F),B=A.useRef(null),G=A.useRef(null),U=Ze({name:c||"MonthPicker",classes:qF,props:n,className:x,style:E,classNames:t,styles:i,unstyled:O,attributes:M,rootSelector:C?"monthPickerRoot":void 0,varsResolver:HF,vars:r}),{onDateChange:H,onRootMouseLeave:N,onHoveredDateChange:z,getControlProps:q,setValue:Y}=FF({type:a,level:"month",allowDeselect:p,allowSingleDateInRange:d,value:l,defaultValue:o,onChange:f,onMouseLeave:v}),{resolvedClassNames:D,resolvedStyles:V}=Hi({classNames:t,styles:i,props:n}),W=y.jsx(Yc,{classNames:D,styles:V,size:j,...R,...C?{}:L,minLevel:"year",__updateDateOnMonthSelect:w??!1,__staticSelector:c||"MonthPicker",onMouseLeave:N,onMonthMouseEnter:(ee,re)=>z(re),onMonthSelect:ee=>{H(ee),b==null||b(ee)},getMonthControlProps:ee=>({...q(ee),...h==null?void 0:h(ee)}),onLevelChange:P,__setDateRef:B,__setLevelRef:G,__stopPropagation:_,attributes:M,...C?{}:{className:x,style:E}});if(!C)return W;const $=ee=>{var se,ye;const re=Array.isArray(ee)?ee[0]:ee;re!==void 0&&((se=B.current)==null||se.call(B,re),(ye=G.current)==null||ye.call(G,"year"),k?k(re):Y(ee))},X=C.map((ee,re)=>y.jsx(Tt,{...U("presetButton"),onClick:()=>$(ee.value),onMouseDown:se=>se.preventDefault(),"data-mantine-stop-propagation":_||void 0,children:ee.label},re));return y.jsxs(ge,{...U("monthPickerRoot"),size:j,...L,children:[y.jsx("div",{...U("presetsList"),children:X}),W]})});ap.classes={...Yc.classes,...qF};ap.varsResolver=HF;ap.displayName="@mantine/dates/MonthPicker";var koe={datePickerRoot:"m_765a40cf",presetsList:"m_d6a681e1",presetButton:"m_acd30b22"};const UF=(e,{size:n})=>({datePickerRoot:{"--preset-font-size":ti(n)}}),_oe={type:"default",defaultLevel:"month",numberOfColumns:1,size:"sm"},op=Re(e=>{const n=be("DatePicker",_oe,e),{allowDeselect:t,allowSingleDateInRange:i,value:r,defaultValue:a,onChange:o,onMouseLeave:l,classNames:f,styles:c,__staticSelector:h,__onDayClick:d,__onDayMouseEnter:p,__onPresetSelect:v,__stopPropagation:b,presets:w,className:k,style:_,unstyled:C,size:x,vars:E,attributes:O,...j}=n,{calendarProps:M,others:P}=h0(j),F=A.useRef(null),R=A.useRef(null),L=Ze({name:h||"DatePicker",classes:koe,props:n,className:k,style:_,classNames:f,styles:c,unstyled:C,attributes:O,rootSelector:w?"datePickerRoot":void 0,varsResolver:UF,vars:E}),{onDateChange:B,onRootMouseLeave:G,onHoveredDateChange:U,getControlProps:H,_value:N,setValue:z}=FF({type:P.type,level:"day",allowDeselect:t,allowSingleDateInRange:i,value:r,defaultValue:a,onChange:o,onMouseLeave:l}),{resolvedClassNames:q,resolvedStyles:Y}=Hi({classNames:f,styles:c,props:n}),D=y.jsx(Yc,{classNames:q,styles:Y,__staticSelector:h||"DatePicker",onMouseLeave:G,size:x,...M,...w?{}:P,__stopPropagation:b,__setDateRef:F,__setLevelRef:R,minLevel:M.minLevel||"month",__onDayMouseEnter:($,X)=>{U(X),p==null||p($,X)},__onDayClick:($,X)=>{B(X),d==null||d($,X)},getDayProps:$=>{var X;return{...H($),...(X=M.getDayProps)==null?void 0:X.call(M,$)}},getMonthControlProps:$=>{var X;return{selected:typeof N=="string"?i9($,N):!1,...(X=M.getMonthControlProps)==null?void 0:X.call(M,$)}},getYearControlProps:$=>{var X;return{selected:typeof N=="string"?Ie($).isSame(N,"year"):!1,...(X=M.getYearControlProps)==null?void 0:X.call(M,$)}},hideOutsideDates:M.hideOutsideDates??M.numberOfColumns!==1,attributes:O,...w?{}:{className:k,style:_}});if(!w)return D;const V=$=>{var ee,re;const X=Array.isArray($)?$[0]:$;X!==void 0&&((ee=F.current)==null||ee.call(F,X),(re=R.current)==null||re.call(R,"month"),v?v(X):z($))},W=w.map(($,X)=>y.jsx(Tt,{...L("presetButton"),onClick:()=>V($.value),onMouseDown:ee=>ee.preventDefault(),"data-mantine-stop-propagation":b||void 0,children:$.label},X));return y.jsxs(ge,{...L("datePickerRoot"),size:x,...P,children:[y.jsx("div",{...L("presetsList"),children:W}),D]})});op.classes=Yc.classes;op.varsResolver=UF;op.displayName="@mantine/dates/DatePicker";function VF({type:e,value:n,defaultValue:t,onChange:i,locale:r,format:a,closeOnChange:o,sortDates:l,labelSeparator:f,valueFormatter:c}){const h=yl(),[d,p]=dz(!1),[v,b]=r9({type:e,value:n,defaultValue:t,onChange:i}),w=Fae({type:e,date:v,locale:h.getLocale(r),format:a,labelSeparator:h.getLabelSeparator(f),formatter:c}),k=C=>{o&&(e==="default"&&p.close(),e==="range"&&C[0]&&C[1]&&p.close()),b(l&&e==="multiple"?[...C].sort((x,E)=>Ie(x).isAfter(Ie(E))?1:-1):C)};return{_value:v,setValue:k,onClear:()=>k(e==="range"?[null,null]:e==="multiple"?[]:null),shouldClear:e==="range"?!!v[0]:e==="multiple"?v.length>0:v!==null,formattedValue:w,dropdownOpened:d,dropdownHandlers:p}}const xoe={type:"default",size:"sm",valueFormat:"MMMM YYYY",closeOnChange:!0,sortDates:!0,dropdownType:"popover"},a9=Re(e=>{const n=be("MonthPickerInput",xoe,e),{type:t,value:i,defaultValue:r,onChange:a,valueFormat:o,labelSeparator:l,locale:f,classNames:c,styles:h,unstyled:d,closeOnChange:p,size:v,variant:b,dropdownType:w,sortDates:k,minDate:_,maxDate:C,vars:x,valueFormatter:E,presets:O,attributes:j,...M}=n,{resolvedClassNames:P,resolvedStyles:F}=Hi({classNames:c,styles:h,props:n}),{calendarProps:R,others:L}=h0(M),{_value:B,setValue:G,formattedValue:U,dropdownHandlers:H,dropdownOpened:N,onClear:z,shouldClear:q}=VF({type:t,value:i,defaultValue:r,onChange:a,locale:f,format:o,labelSeparator:l,closeOnChange:p,sortDates:k,valueFormatter:E});return y.jsx(Gc,{formattedValue:U,dropdownOpened:N,dropdownHandlers:H,classNames:P,styles:F,unstyled:d,onClear:z,shouldClear:q,value:B,size:v,variant:b,dropdownType:w,...L,attributes:j,type:t,__staticSelector:"MonthPickerInput",children:y.jsx(ap,{...R,size:v,variant:b,type:t,value:B,defaultDate:R.defaultDate||(Array.isArray(B)?B[0]||$S({maxDate:C,minDate:_}):B||$S({maxDate:C,minDate:_})),onChange:G,locale:f,classNames:P,styles:F,unstyled:d,__staticSelector:"MonthPickerInput",__stopPropagation:w==="popover",minDate:_,maxDate:C,presets:O,attributes:j})})});a9.classes={...Gc.classes,...ap.classes};a9.displayName="@mantine/dates/MonthPickerInput";const Soe={type:"default",size:"sm",valueFormat:"MMMM D, YYYY",closeOnChange:!0,sortDates:!0,dropdownType:"popover"},wu=Re(e=>{const n=be("DatePickerInput",Soe,e),{type:t,value:i,defaultValue:r,onChange:a,valueFormat:o,labelSeparator:l,locale:f,classNames:c,styles:h,unstyled:d,closeOnChange:p,size:v,variant:b,dropdownType:w,sortDates:k,minDate:_,maxDate:C,vars:x,defaultDate:E,valueFormatter:O,presets:j,attributes:M,...P}=n,{resolvedClassNames:F,resolvedStyles:R}=Hi({classNames:c,styles:h,props:n}),{calendarProps:L,others:B}=h0(P),{_value:G,setValue:U,formattedValue:H,dropdownHandlers:N,dropdownOpened:z,onClear:q,shouldClear:Y}=VF({type:t,value:i,defaultValue:r,onChange:a,locale:f,format:o,labelSeparator:l,closeOnChange:p,sortDates:k,valueFormatter:O}),D=Array.isArray(G)?G[0]||E:G||E;return y.jsx(Gc,{formattedValue:H,dropdownOpened:z,dropdownHandlers:N,classNames:F,styles:R,unstyled:d,onClear:q,shouldClear:Y,value:G,size:v,variant:b,dropdownType:w,...B,type:t,__staticSelector:"DatePickerInput",attributes:M,children:y.jsx(op,{...L,size:v,variant:b,type:t,value:G,defaultDate:D||$S({maxDate:C,minDate:_}),onChange:U,locale:f,classNames:F,styles:R,unstyled:d,__staticSelector:"DatePickerInput",__stopPropagation:w==="popover",minDate:_,maxDate:C,presets:j,attributes:M})})});wu.classes={...Gc.classes,...op.classes};wu.displayName="@mantine/dates/DatePickerInput";/** + * @license @tabler/icons-react v3.42.0 - MIT + * + * This source code is licensed under the MIT license. + * See the LICENSE file in the root directory of this source tree. + */var Coe={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.42.0 - MIT + * + * This source code is licensed under the MIT license. + * See the LICENSE file in the root directory of this source tree. + */const kn=(e,n,t,i)=>{const r=A.forwardRef(({color:a="currentColor",size:o=24,stroke:l=2,title:f,className:c,children:h,...d},p)=>A.createElement("svg",{ref:p,...Coe[e],width:o,height:o,className:["tabler-icon",`tabler-icon-${n}`,c].join(" "),strokeWidth:l,stroke:a,...d},[f&&A.createElement("title",{key:"svg-title"},f),...i.map(([v,b])=>A.createElement(v,b)),...Array.isArray(h)?h:[h]]));return r.displayName=`${t}`,r};/** + * @license @tabler/icons-react v3.42.0 - MIT + * + * This source code is licensed under the MIT license. + * See the LICENSE file in the root directory of this source tree. + */const Aoe=[["path",{d:"M12 9v4",key:"svg-0"}],["path",{d:"M10.363 3.591l-8.106 13.534a1.914 1.914 0 0 0 1.636 2.871h16.214a1.914 1.914 0 0 0 1.636 -2.87l-8.106 -13.536a1.914 1.914 0 0 0 -3.274 0",key:"svg-1"}],["path",{d:"M12 16h.01",key:"svg-2"}]],WF=kn("outline","alert-triangle","AlertTriangle",Aoe);/** + * @license @tabler/icons-react v3.42.0 - MIT + * + * This source code is licensed under the MIT license. + * See the LICENSE file in the root directory of this source tree. + */const Ooe=[["path",{d:"M8 4h11a2 2 0 1 1 0 4h-7m-4 0h-3a2 2 0 0 1 -.826 -3.822",key:"svg-0"}],["path",{d:"M5 8v10a2 2 0 0 0 2 2h10a2 2 0 0 0 1.824 -1.18m.176 -3.82v-7",key:"svg-1"}],["path",{d:"M10 12h2",key:"svg-2"}],["path",{d:"M3 3l18 18",key:"svg-3"}]],joe=kn("outline","archive-off","ArchiveOff",Ooe);/** + * @license @tabler/icons-react v3.42.0 - MIT + * + * This source code is licensed under the MIT license. + * See the LICENSE file in the root directory of this source tree. + */const Eoe=[["path",{d:"M3 6a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2",key:"svg-0"}],["path",{d:"M5 8v10a2 2 0 0 0 2 2h10a2 2 0 0 0 2 -2v-10",key:"svg-1"}],["path",{d:"M10 12l4 0",key:"svg-2"}]],GF=kn("outline","archive","Archive",Eoe);/** + * @license @tabler/icons-react v3.42.0 - MIT + * + * This source code is licensed under the MIT license. + * See the LICENSE file in the root directory of this source tree. + */const Toe=[["path",{d:"M9 14l-4 -4l4 -4",key:"svg-0"}],["path",{d:"M5 10h11a4 4 0 1 1 0 8h-1",key:"svg-1"}]],Hg=kn("outline","arrow-back-up","ArrowBackUp",Toe);/** + * @license @tabler/icons-react v3.42.0 - MIT + * + * This source code is licensed under the MIT license. + * See the LICENSE file in the root directory of this source tree. + */const Moe=[["path",{d:"M7 8l-4 4l4 4",key:"svg-0"}],["path",{d:"M17 8l4 4l-4 4",key:"svg-1"}],["path",{d:"M3 12l18 0",key:"svg-2"}]],Doe=kn("outline","arrows-horizontal","ArrowsHorizontal",Moe);/** + * @license @tabler/icons-react v3.42.0 - MIT + * + * This source code is licensed under the MIT license. + * See the LICENSE file in the root directory of this source tree. + */const Roe=[["path",{d:"M4 7a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2l0 -12",key:"svg-0"}],["path",{d:"M16 3v4",key:"svg-1"}],["path",{d:"M8 3v4",key:"svg-2"}],["path",{d:"M4 11h16",key:"svg-3"}],["path",{d:"M11 16a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-4"}]],YF=kn("outline","calendar-due","CalendarDue",Roe);/** + * @license @tabler/icons-react v3.42.0 - MIT + * + * This source code is licensed under the MIT license. + * See the LICENSE file in the root directory of this source tree. + */const Poe=[["path",{d:"M9 5h9a2 2 0 0 1 2 2v9m-.184 3.839a2 2 0 0 1 -1.816 1.161h-12a2 2 0 0 1 -2 -2v-12a2 2 0 0 1 1.158 -1.815",key:"svg-0"}],["path",{d:"M16 3v4",key:"svg-1"}],["path",{d:"M8 3v1",key:"svg-2"}],["path",{d:"M4 11h7m4 0h5",key:"svg-3"}],["path",{d:"M3 3l18 18",key:"svg-4"}]],Noe=kn("outline","calendar-off","CalendarOff",Poe);/** + * @license @tabler/icons-react v3.42.0 - MIT + * + * This source code is licensed under the MIT license. + * See the LICENSE file in the root directory of this source tree. + */const $oe=[["path",{d:"M11.795 21h-6.795a2 2 0 0 1 -2 -2v-12a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v4",key:"svg-0"}],["path",{d:"M18 14v4h4",key:"svg-1"}],["path",{d:"M14 18a4 4 0 1 0 8 0a4 4 0 1 0 -8 0",key:"svg-2"}],["path",{d:"M15 3v4",key:"svg-3"}],["path",{d:"M7 3v4",key:"svg-4"}],["path",{d:"M3 11h16",key:"svg-5"}]],zoe=kn("outline","calendar-stats","CalendarStats",$oe);/** + * @license @tabler/icons-react v3.42.0 - MIT + * + * This source code is licensed under the MIT license. + * See the LICENSE file in the root directory of this source tree. + */const Loe=[["path",{d:"M4 7a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2v-12",key:"svg-0"}],["path",{d:"M16 3v4",key:"svg-1"}],["path",{d:"M8 3v4",key:"svg-2"}],["path",{d:"M4 11h16",key:"svg-3"}],["path",{d:"M11 15h1",key:"svg-4"}],["path",{d:"M12 15v3",key:"svg-5"}]],Ioe=kn("outline","calendar","Calendar",Loe);/** + * @license @tabler/icons-react v3.42.0 - MIT + * + * This source code is licensed under the MIT license. + * See the LICENSE file in the root directory of this source tree. + */const Boe=[["path",{d:"M3 13a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v6a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1l0 -6",key:"svg-0"}],["path",{d:"M15 9a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v10a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1l0 -10",key:"svg-1"}],["path",{d:"M9 5a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v14a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1l0 -14",key:"svg-2"}],["path",{d:"M4 20h14",key:"svg-3"}]],Foe=kn("outline","chart-bar","ChartBar",Boe);/** + * @license @tabler/icons-react v3.42.0 - MIT + * + * This source code is licensed under the MIT license. + * See the LICENSE file in the root directory of this source tree. + */const qoe=[["path",{d:"M5 12l5 5l10 -10",key:"svg-0"}]],nc=kn("outline","check","Check",qoe);/** + * @license @tabler/icons-react v3.42.0 - MIT + * + * This source code is licensed under the MIT license. + * See the LICENSE file in the root directory of this source tree. + */const Hoe=[["path",{d:"M9 11l3 3l8 -8",key:"svg-0"}],["path",{d:"M20 12v6a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2v-12a2 2 0 0 1 2 -2h9",key:"svg-1"}]],Jh=kn("outline","checkbox","Checkbox",Hoe);/** + * @license @tabler/icons-react v3.42.0 - MIT + * + * This source code is licensed under the MIT license. + * See the LICENSE file in the root directory of this source tree. + */const Uoe=[["path",{d:"M6 9l6 6l6 -6",key:"svg-0"}]],zS=kn("outline","chevron-down","ChevronDown",Uoe);/** + * @license @tabler/icons-react v3.42.0 - MIT + * + * This source code is licensed under the MIT license. + * See the LICENSE file in the root directory of this source tree. + */const Voe=[["path",{d:"M9 6l6 6l-6 6",key:"svg-0"}]],LS=kn("outline","chevron-right","ChevronRight",Voe);/** + * @license @tabler/icons-react v3.42.0 - MIT + * + * This source code is licensed under the MIT license. + * See the LICENSE file in the root directory of this source tree. + */const Woe=[["path",{d:"M9 5h-2a2 2 0 0 0 -2 2v12a2 2 0 0 0 2 2h10a2 2 0 0 0 2 -2v-12a2 2 0 0 0 -2 -2h-2",key:"svg-0"}],["path",{d:"M9 5a2 2 0 0 1 2 -2h2a2 2 0 0 1 2 2a2 2 0 0 1 -2 2h-2a2 2 0 0 1 -2 -2",key:"svg-1"}],["path",{d:"M9 12l.01 0",key:"svg-2"}],["path",{d:"M13 12l2 0",key:"svg-3"}],["path",{d:"M9 16l.01 0",key:"svg-4"}],["path",{d:"M13 16l2 0",key:"svg-5"}]],iM=kn("outline","clipboard-list","ClipboardList",Woe);/** + * @license @tabler/icons-react v3.42.0 - MIT + * + * This source code is licensed under the MIT license. + * See the LICENSE file in the root directory of this source tree. + */const Goe=[["path",{d:"M3 12a9 9 0 1 0 18 0a9 9 0 1 0 -18 0",key:"svg-0"}],["path",{d:"M12 12l3 2",key:"svg-1"}],["path",{d:"M12 7v5",key:"svg-2"}]],Yoe=kn("outline","clock-hour-4","ClockHour4",Goe);/** + * @license @tabler/icons-react v3.42.0 - MIT + * + * This source code is licensed under the MIT license. + * See the LICENSE file in the root directory of this source tree. + */const Koe=[["path",{d:"M3 12a9 9 0 1 0 18 0a9 9 0 0 0 -18 0",key:"svg-0"}],["path",{d:"M12 7v5l3 3",key:"svg-1"}]],Ug=kn("outline","clock","Clock",Koe);/** + * @license @tabler/icons-react v3.42.0 - MIT + * + * This source code is licensed under the MIT license. + * See the LICENSE file in the root directory of this source tree. + */const Xoe=[["path",{d:"M3 4a1 1 0 0 1 1 -1h16a1 1 0 0 1 1 1v16a1 1 0 0 1 -1 1h-16a1 1 0 0 1 -1 -1v-16",key:"svg-0"}],["path",{d:"M9 3v18",key:"svg-1"}],["path",{d:"M15 3v18",key:"svg-2"}]],Zoe=kn("outline","columns-3","Columns3",Xoe);/** + * @license @tabler/icons-react v3.42.0 - MIT + * + * This source code is licensed under the MIT license. + * See the LICENSE file in the root directory of this source tree. + */const Qoe=[["path",{d:"M7 9.667a2.667 2.667 0 0 1 2.667 -2.667h8.666a2.667 2.667 0 0 1 2.667 2.667v8.666a2.667 2.667 0 0 1 -2.667 2.667h-8.666a2.667 2.667 0 0 1 -2.667 -2.667l0 -8.666",key:"svg-0"}],["path",{d:"M4.012 16.737a2.005 2.005 0 0 1 -1.012 -1.737v-10c0 -1.1 .9 -2 2 -2h10c.75 0 1.158 .385 1.5 1",key:"svg-1"}]],Joe=kn("outline","copy","Copy",Qoe);/** + * @license @tabler/icons-react v3.42.0 - MIT + * + * This source code is licensed under the MIT license. + * See the LICENSE file in the root directory of this source tree. + */const ese=[["path",{d:"M3 5a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v14a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2v-14",key:"svg-0"}],["path",{d:"M8 8.5a.5 .5 0 1 0 1 0a.5 .5 0 1 0 -1 0",fill:"currentColor",key:"svg-1"}],["path",{d:"M15 8.5a.5 .5 0 1 0 1 0a.5 .5 0 1 0 -1 0",fill:"currentColor",key:"svg-2"}],["path",{d:"M15 15.5a.5 .5 0 1 0 1 0a.5 .5 0 1 0 -1 0",fill:"currentColor",key:"svg-3"}],["path",{d:"M8 15.5a.5 .5 0 1 0 1 0a.5 .5 0 1 0 -1 0",fill:"currentColor",key:"svg-4"}],["path",{d:"M11.5 12a.5 .5 0 1 0 1 0a.5 .5 0 1 0 -1 0",fill:"currentColor",key:"svg-5"}]],nse=kn("outline","dice-5","Dice5",ese);/** + * @license @tabler/icons-react v3.42.0 - MIT + * + * This source code is licensed under the MIT license. + * See the LICENSE file in the root directory of this source tree. + */const tse=[["path",{d:"M11 12a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-0"}],["path",{d:"M11 19a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-1"}],["path",{d:"M11 5a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-2"}]],KF=kn("outline","dots-vertical","DotsVertical",tse);/** + * @license @tabler/icons-react v3.42.0 - MIT + * + * This source code is licensed under the MIT license. + * See the LICENSE file in the root directory of this source tree. + */const ise=[["path",{d:"M7 7h-1a2 2 0 0 0 -2 2v9a2 2 0 0 0 2 2h9a2 2 0 0 0 2 -2v-1",key:"svg-0"}],["path",{d:"M20.385 6.585a2.1 2.1 0 0 0 -2.97 -2.97l-8.415 8.385v3h3l8.385 -8.415",key:"svg-1"}],["path",{d:"M16 5l3 3",key:"svg-2"}]],kh=kn("outline","edit","Edit",ise);/** + * @license @tabler/icons-react v3.42.0 - MIT + * + * This source code is licensed under the MIT license. + * See the LICENSE file in the root directory of this source tree. + */const rse=[["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"}]],ase=kn("outline","external-link","ExternalLink",rse);/** + * @license @tabler/icons-react v3.42.0 - MIT + * + * This source code is licensed under the MIT license. + * See the LICENSE file in the root directory of this source tree. + */const ose=[["path",{d:"M8 5a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-0"}],["path",{d:"M8 12a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-1"}],["path",{d:"M8 19a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-2"}],["path",{d:"M14 5a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-3"}],["path",{d:"M14 12a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-4"}],["path",{d:"M14 19a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-5"}]],XF=kn("outline","grip-vertical","GripVertical",ose);/** + * @license @tabler/icons-react v3.42.0 - MIT + * + * This source code is licensed under the MIT license. + * See the LICENSE file in the root directory of this source tree. + */const sse=[["path",{d:"M12 8l0 4l2 2",key:"svg-0"}],["path",{d:"M3.05 11a9 9 0 1 1 .5 4m-.5 5v-5h5",key:"svg-1"}]],lse=kn("outline","history","History",sse);/** + * @license @tabler/icons-react v3.42.0 - MIT + * + * This source code is licensed under the MIT license. + * See the LICENSE file in the root directory of this source tree. + */const use=[["path",{d:"M6.5 7h11",key:"svg-0"}],["path",{d:"M6.5 17h11",key:"svg-1"}],["path",{d:"M6 20v-2a6 6 0 1 1 12 0v2a1 1 0 0 1 -1 1h-10a1 1 0 0 1 -1 -1",key:"svg-2"}],["path",{d:"M6 4v2a6 6 0 1 0 12 0v-2a1 1 0 0 0 -1 -1h-10a1 1 0 0 0 -1 1",key:"svg-3"}]],Vg=kn("outline","hourglass","Hourglass",use);/** + * @license @tabler/icons-react v3.42.0 - MIT + * + * This source code is licensed under the MIT license. + * See the LICENSE file in the root directory of this source tree. + */const fse=[["path",{d:"M4 4l6 0",key:"svg-0"}],["path",{d:"M14 4l6 0",key:"svg-1"}],["path",{d:"M4 10a2 2 0 0 1 2 -2h2a2 2 0 0 1 2 2v8a2 2 0 0 1 -2 2h-2a2 2 0 0 1 -2 -2l0 -8",key:"svg-2"}],["path",{d:"M14 10a2 2 0 0 1 2 -2h2a2 2 0 0 1 2 2v2a2 2 0 0 1 -2 2h-2a2 2 0 0 1 -2 -2l0 -2",key:"svg-3"}]],IS=kn("outline","layout-kanban","LayoutKanban",fse);/** + * @license @tabler/icons-react v3.42.0 - MIT + * + * This source code is licensed under the MIT license. + * See the LICENSE file in the root directory of this source tree. + */const cse=[["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"}]],dse=kn("outline","link","Link",cse);/** + * @license @tabler/icons-react v3.42.0 - MIT + * + * This source code is licensed under the MIT license. + * See the LICENSE file in the root directory of this source tree. + */const hse=[["path",{d:"M5 13a2 2 0 0 1 2 -2h10a2 2 0 0 1 2 2v6a2 2 0 0 1 -2 2h-10a2 2 0 0 1 -2 -2l0 -6",key:"svg-0"}],["path",{d:"M11 16a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-1"}],["path",{d:"M8 11v-5a4 4 0 0 1 8 0",key:"svg-2"}]],ZF=kn("outline","lock-open","LockOpen",hse);/** + * @license @tabler/icons-react v3.42.0 - MIT + * + * This source code is licensed under the MIT license. + * See the LICENSE file in the root directory of this source tree. + */const mse=[["path",{d:"M5 13a2 2 0 0 1 2 -2h10a2 2 0 0 1 2 2v6a2 2 0 0 1 -2 2h-10a2 2 0 0 1 -2 -2v-6",key:"svg-0"}],["path",{d:"M11 16a1 1 0 1 0 2 0a1 1 0 0 0 -2 0",key:"svg-1"}],["path",{d:"M8 11v-4a4 4 0 1 1 8 0v4",key:"svg-2"}]],el=kn("outline","lock","Lock",mse);/** + * @license @tabler/icons-react v3.42.0 - MIT + * + * This source code is licensed under the MIT license. + * See the LICENSE file in the root directory of this source tree. + */const pse=[["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"}]],vse=kn("outline","logout","Logout",pse);/** + * @license @tabler/icons-react v3.42.0 - MIT + * + * This source code is licensed under the MIT license. + * See the LICENSE file in the root directory of this source tree. + */const gse=[["path",{d:"M4 6l16 0",key:"svg-0"}],["path",{d:"M4 12l16 0",key:"svg-1"}],["path",{d:"M4 18l16 0",key:"svg-2"}]],yse=kn("outline","menu-2","Menu2",gse);/** + * @license @tabler/icons-react v3.42.0 - MIT + * + * This source code is licensed under the MIT license. + * See the LICENSE file in the root directory of this source tree. + */const bse=[["path",{d:"M18 4a3 3 0 0 1 3 3v8a3 3 0 0 1 -3 3h-5l-5 3v-3h-2a3 3 0 0 1 -3 -3v-8a3 3 0 0 1 3 -3h12",key:"svg-0"}],["path",{d:"M9.5 9h.01",key:"svg-1"}],["path",{d:"M14.5 9h.01",key:"svg-2"}],["path",{d:"M9.5 13a3.5 3.5 0 0 0 5 0",key:"svg-3"}]],QF=kn("outline","message-chatbot","MessageChatbot",bse);/** + * @license @tabler/icons-react v3.42.0 - MIT + * + * This source code is licensed under the MIT license. + * See the LICENSE file in the root directory of this source tree. + */const wse=[["path",{d:"M8 9h8",key:"svg-0"}],["path",{d:"M8 13h6",key:"svg-1"}],["path",{d:"M18 4a3 3 0 0 1 3 3v8a3 3 0 0 1 -3 3h-5l-5 3v-3h-2a3 3 0 0 1 -3 -3v-8a3 3 0 0 1 3 -3h12",key:"svg-2"}]],kse=kn("outline","message","Message",wse);/** + * @license @tabler/icons-react v3.42.0 - MIT + * + * This source code is licensed under the MIT license. + * See the LICENSE file in the root directory of this source tree. + */const _se=[["path",{d:"M3 12a9 9 0 1 0 18 0a9 9 0 1 0 -18 0",key:"svg-0"}],["path",{d:"M9 10l.01 0",key:"svg-1"}],["path",{d:"M15 10l.01 0",key:"svg-2"}],["path",{d:"M9.5 15a3.5 3.5 0 0 0 5 0",key:"svg-3"}]],xse=kn("outline","mood-smile","MoodSmile",_se);/** + * @license @tabler/icons-react v3.42.0 - MIT + * + * This source code is licensed under the MIT license. + * See the LICENSE file in the root directory of this source tree. + */const Sse=[["path",{d:"M12 21a9 9 0 0 1 0 -18c4.97 0 9 3.582 9 8c0 1.06 -.474 2.078 -1.318 2.828c-.844 .75 -1.989 1.172 -3.182 1.172h-2.5a2 2 0 0 0 -1 3.75a1.3 1.3 0 0 1 -1 2.25",key:"svg-0"}],["path",{d:"M7.5 10.5a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-1"}],["path",{d:"M11.5 7.5a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-2"}],["path",{d:"M15.5 10.5a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-3"}]],o9=kn("outline","palette","Palette",Sse);/** + * @license @tabler/icons-react v3.42.0 - MIT + * + * This source code is licensed under the MIT license. + * See the LICENSE file in the root directory of this source tree. + */const Cse=[["path",{d:"M15 7l-6.5 6.5a1.5 1.5 0 0 0 3 3l6.5 -6.5a3 3 0 0 0 -6 -6l-6.5 6.5a4.5 4.5 0 0 0 9 9l6.5 -6.5",key:"svg-0"}]],Ase=kn("outline","paperclip","Paperclip",Cse);/** + * @license @tabler/icons-react v3.42.0 - MIT + * + * This source code is licensed under the MIT license. + * See the LICENSE file in the root directory of this source tree. + */const Ose=[["path",{d:"M4 20h4l10.5 -10.5a2.828 2.828 0 1 0 -4 -4l-10.5 10.5v4",key:"svg-0"}],["path",{d:"M13.5 6.5l4 4",key:"svg-1"}]],jse=kn("outline","pencil","Pencil",Ose);/** + * @license @tabler/icons-react v3.42.0 - MIT + * + * This source code is licensed under the MIT license. + * See the LICENSE file in the root directory of this source tree. + */const Ese=[["path",{d:"M12 5l0 14",key:"svg-0"}],["path",{d:"M5 12l14 0",key:"svg-1"}]],tc=kn("outline","plus","Plus",Ese);/** + * @license @tabler/icons-react v3.42.0 - MIT + * + * This source code is licensed under the MIT license. + * See the LICENSE file in the root directory of this source tree. + */const Tse=[["path",{d:"M20 11a8.1 8.1 0 0 0 -15.5 -2m-.5 -4v4h4",key:"svg-0"}],["path",{d:"M4 13a8.1 8.1 0 0 0 15.5 2m.5 4v-4h-4",key:"svg-1"}]],JF=kn("outline","refresh","Refresh",Tse);/** + * @license @tabler/icons-react v3.42.0 - MIT + * + * This source code is licensed under the MIT license. + * See the LICENSE file in the root directory of this source tree. + */const Mse=[["path",{d:"M3 10a7 7 0 1 0 14 0a7 7 0 1 0 -14 0",key:"svg-0"}],["path",{d:"M21 21l-6 -6",key:"svg-1"}]],Dse=kn("outline","search","Search",Mse);/** + * @license @tabler/icons-react v3.42.0 - MIT + * + * This source code is licensed under the MIT license. + * See the LICENSE file in the root directory of this source tree. + */const Rse=[["path",{d:"M10 14l11 -11",key:"svg-0"}],["path",{d:"M21 3l-6.5 18a.55 .55 0 0 1 -1 0l-3.5 -7l-7 -3.5a.55 .55 0 0 1 0 -1l18 -6.5",key:"svg-1"}]],eq=kn("outline","send","Send",Rse);/** + * @license @tabler/icons-react v3.42.0 - MIT + * + * This source code is licensed under the MIT license. + * See the LICENSE file in the root directory of this source tree. + */const Pse=[["path",{d:"M6.5 7.5a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-0"}],["path",{d:"M3 6v5.172a2 2 0 0 0 .586 1.414l7.71 7.71a2.41 2.41 0 0 0 3.408 0l5.592 -5.592a2.41 2.41 0 0 0 0 -3.408l-7.71 -7.71a2 2 0 0 0 -1.414 -.586h-5.172a3 3 0 0 0 -3 3",key:"svg-1"}]],Nse=kn("outline","tag","Tag",Pse);/** + * @license @tabler/icons-react v3.42.0 - MIT + * + * This source code is licensed under the MIT license. + * See the LICENSE file in the root directory of this source tree. + */const $se=[["path",{d:"M4 7h16",key:"svg-0"}],["path",{d:"M5 7l1 12a2 2 0 0 0 2 2h8a2 2 0 0 0 2 -2l1 -12",key:"svg-1"}],["path",{d:"M9 7v-3a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v3",key:"svg-2"}],["path",{d:"M10 12l4 4m0 -4l-4 4",key:"svg-3"}]],zse=kn("outline","trash-x","TrashX",$se);/** + * @license @tabler/icons-react v3.42.0 - MIT + * + * This source code is licensed under the MIT license. + * See the LICENSE file in the root directory of this source tree. + */const Lse=[["path",{d:"M4 7l16 0",key:"svg-0"}],["path",{d:"M10 11l0 6",key:"svg-1"}],["path",{d:"M14 11l0 6",key:"svg-2"}],["path",{d:"M5 7l1 12a2 2 0 0 0 2 2h8a2 2 0 0 0 2 -2l1 -12",key:"svg-3"}],["path",{d:"M9 7v-3a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v3",key:"svg-4"}]],ku=kn("outline","trash","Trash",Lse);/** + * @license @tabler/icons-react v3.42.0 - MIT + * + * This source code is licensed under the MIT license. + * See the LICENSE file in the root directory of this source tree. + */const Ise=[["path",{d:"M3 17l6 -6l4 4l8 -8",key:"svg-0"}],["path",{d:"M14 7l7 0l0 7",key:"svg-1"}]],BS=kn("outline","trending-up","TrendingUp",Ise);/** + * @license @tabler/icons-react v3.42.0 - MIT + * + * This source code is licensed under the MIT license. + * See the LICENSE file in the root directory of this source tree. + */const Bse=[["path",{d:"M3 12a9 9 0 1 0 18 0a9 9 0 1 0 -18 0",key:"svg-0"}],["path",{d:"M9 10a3 3 0 1 0 6 0a3 3 0 1 0 -6 0",key:"svg-1"}],["path",{d:"M6.168 18.849a4 4 0 0 1 3.832 -2.849h4a4 4 0 0 1 3.834 2.855",key:"svg-2"}]],Fse=kn("outline","user-circle","UserCircle",Bse);/** + * @license @tabler/icons-react v3.42.0 - MIT + * + * This source code is licensed under the MIT license. + * See the LICENSE file in the root directory of this source tree. + */const qse=[["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.009 .128",key:"svg-1"}],["path",{d:"M16 19h6",key:"svg-2"}]],Hse=kn("outline","user-minus","UserMinus",qse);/** + * @license @tabler/icons-react v3.42.0 - MIT + * + * This source code is licensed under the MIT license. + * See the LICENSE file in the root directory of this source tree. + */const Use=[["path",{d:"M8 7a4 4 0 1 0 8 0a4 4 0 0 0 -8 0",key:"svg-0"}],["path",{d:"M16 19h6",key:"svg-1"}],["path",{d:"M19 16v6",key:"svg-2"}],["path",{d:"M6 21v-2a4 4 0 0 1 4 -4h4",key:"svg-3"}]],Vse=kn("outline","user-plus","UserPlus",Use);/** + * @license @tabler/icons-react v3.42.0 - MIT + * + * This source code is licensed under the MIT license. + * See the LICENSE file in the root directory of this source tree. + */const Wse=[["path",{d:"M9 10a3 3 0 1 0 6 0a3 3 0 0 0 -6 0",key:"svg-0"}],["path",{d:"M6 21v-1a4 4 0 0 1 4 -4h4a4 4 0 0 1 4 4v1",key:"svg-1"}],["path",{d:"M3 5a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v14a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2v-14",key:"svg-2"}]],Gse=kn("outline","user-square","UserSquare",Wse);/** + * @license @tabler/icons-react v3.42.0 - MIT + * + * This source code is licensed under the MIT license. + * See the LICENSE file in the root directory of this source tree. + */const Yse=[["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 -4h4a4 4 0 0 1 4 4v2",key:"svg-1"}]],Kse=kn("outline","user","User",Yse);/** + * @license @tabler/icons-react v3.42.0 - MIT + * + * This source code is licensed under the MIT license. + * See the LICENSE file in the root directory of this source tree. + */const Xse=[["path",{d:"M18 6l-12 12",key:"svg-0"}],["path",{d:"M6 6l12 12",key:"svg-1"}]],_h=kn("outline","x","X",Xse);function nq({initial:e,submitLabel:n="Guardar",users:t=[],requesterOptions:i=[],tagOptions:r=[],onSubmit:a,onCancel:o}){const[l,f]=A.useState((e==null?void 0:e.requester)??""),[c,h]=A.useState((e==null?void 0:e.title)??""),[d,p]=A.useState((e==null?void 0:e.description)??""),[v,b]=A.useState((e==null?void 0:e.assignee_id)??null),[w,k]=A.useState((e==null?void 0:e.tags)??[]),_=async x=>{x==null||x.preventDefault();const E=c.trim();E&&await a({requester:l.trim(),title:E,description:d,assignee_id:v,tags:w})},C=x=>{x.key==="Enter"&&(x.ctrlKey||x.metaKey)&&(x.preventDefault(),_())};return y.jsx("form",{onSubmit:_,children:y.jsxs(Wn,{gap:"sm",children:[y.jsx(Qf,{label:"Tarea",value:c,onChange:x=>h(x.currentTarget.value),tabIndex:1,required:!0,autoComplete:"off","data-autofocus":!0,autosize:!0,minRows:1,maxRows:4,onKeyDown:x=>{x.key==="Enter"&&!x.shiftKey&&(x.preventDefault(),_())}}),y.jsx(Ay,{label:"Solicitante",value:l,onChange:f,data:i,tabIndex:2,autoComplete:"off","data-field":"requester",placeholder:"Empieza a escribir y elige uno existente",limit:10,onKeyDown:x=>{x.key==="Enter"&&x.preventDefault()}}),y.jsx(Qf,{label:"Descripcion",value:d,onChange:x=>p(x.currentTarget.value),tabIndex:3,autosize:!0,minRows:3,maxRows:8,onKeyDown:C,description:"Ctrl+Enter para guardar"}),y.jsx(mo,{label:"Asignar a",placeholder:"Sin asignar",value:v,onChange:x=>b(x),data:t.map(x=>({value:x.id,label:x.display_name||x.username})),clearable:!0,searchable:!0,tabIndex:4}),y.jsx(FC,{label:"Tags",value:w,onChange:k,data:r,clearable:!0,tabIndex:5,placeholder:"Enter para añadir; sugiere existentes",splitChars:[","," "]}),y.jsxs(Ke,{justify:"flex-end",gap:"xs",mt:"xs",children:[y.jsx(zt,{variant:"subtle",color:"gray",tabIndex:7,type:"button",onClick:o,children:"Cancelar"}),y.jsx(zt,{tabIndex:6,type:"submit",disabled:!c.trim(),children:n})]})]})})}function Zse(e,n){if(n.length===0)throw new Error("palette must not be empty");let t=0;for(let i=0;i>>0;return n[t%n.length]}const s9=new Set(["blue","cyan","teal","green","lime","yellow","orange","red","pink","grape","violet","indigo","gray","dark"]);function l9(e){return/^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/.test(e)}function tq(e){return e?l9(e)?`color-mix(in srgb, ${e} 18%, var(--mantine-color-dark-6))`:s9.has(e)?`color-mix(in srgb, var(--mantine-color-${e}-9) 18%, var(--mantine-color-dark-6))`:"var(--mantine-color-dark-6)":"var(--mantine-color-dark-6)"}function u9(e){return e?l9(e)?`color-mix(in srgb, ${e} 30%, var(--mantine-color-dark-4))`:s9.has(e)?`color-mix(in srgb, var(--mantine-color-${e}-7) 30%, var(--mantine-color-dark-4))`:"var(--mantine-color-dark-4)":"var(--mantine-color-dark-4)"}function Qse(e){return e?l9(e)?e:s9.has(e)?`var(--mantine-color-${e}-7)`:"var(--mantine-color-dark-3)":"var(--mantine-color-dark-3)"}const iq=[{value:"",label:"Default"},{value:"blue",label:"Azul"},{value:"cyan",label:"Cian"},{value:"teal",label:"Teal"},{value:"green",label:"Verde"},{value:"lime",label:"Lima"},{value:"yellow",label:"Amarillo"},{value:"orange",label:"Naranja"},{value:"red",label:"Rojo"},{value:"pink",label:"Rosa"},{value:"grape",label:"Uva"},{value:"violet",label:"Violeta"},{value:"indigo",label:"Indigo"},{value:"gray",label:"Gris"},{value:"#0ea5e9",label:"Sky"},{value:"#14b8a6",label:"Esmeralda"},{value:"#84cc16",label:"Lima fluor"},{value:"#ec4899",label:"Magenta"},{value:"#a855f7",label:"Lavanda"},{value:"#f97316",label:"Mandarina"},{value:"#dc2626",label:"Rubi"},{value:"#0891b2",label:"Petroleo"},{value:"#fde047",label:"Limon"},{value:"#10b981",label:"Menta"},{value:"#fb7185",label:"Coral"},{value:"#6366f1",label:"Iris"},{value:"#94a3b8",label:"Pizarra"}],Jse=iq,ele=["blue","cyan","teal","green","lime","yellow","orange","red","pink","grape","violet","indigo"];function ic(e){return Zse(e,ele)}const FS=6e4,xh=60*FS,zf=24*xh,Fv=7*zf,Fk=30*zf;function si(e){if(!Number.isFinite(e)||e<0)return"0m";if(e[C.id,C])),b=A.useCallback(async()=>{try{const C=await Die(e);a(C),i==null||i(C)}catch(C){Ln.show({color:"red",message:C.message})}finally{l(!1)}},[e,i]);A.useEffect(()=>{b()},[b]),A.useEffect(()=>{p.current&&p.current.scrollTo({top:p.current.scrollHeight,behavior:"smooth"})},[r.length]);const w=async()=>{const C=f.trim();if(!(!C||h)){d(!0);try{const x=await Rie(e,C),E=[...r,x];a(E),i==null||i(E),c("")}catch(x){Ln.show({color:"red",message:x.message})}finally{d(!1)}}},k=async C=>{try{await Pie(e,C);const x=r.filter(E=>E.id!==C);a(x),i==null||i(x)}catch(x){Ln.show({color:"red",message:x.message})}},_=C=>{C.key==="Enter"&&!C.shiftKey&&(C.preventDefault(),w())};return y.jsxs(Wn,{gap:"xs",style:{height:"100%",minHeight:0},children:[y.jsx(_a,{viewportRef:p,style:{flex:1,minHeight:200},type:"auto",offsetScrollbars:!0,children:o?y.jsx(Ke,{justify:"center",p:"md",children:y.jsx(Mi,{size:"sm"})}):r.length===0?y.jsx(Te,{size:"sm",c:"dimmed",ta:"center",p:"md",children:"Sin mensajes aun. Escribe el primero."}):y.jsx(Wn,{gap:6,p:4,children:r.map(C=>{const x=C.author_id?v.get(C.author_id):null,E=C.author_id&&C.author_id===t,O=x?x.display_name||x.username:"Anonimo";return y.jsx(Lt,{withBorder:!0,p:"xs",radius:"sm",bg:E?"var(--mantine-color-blue-light)":void 0,children:y.jsxs(Ke,{gap:6,wrap:"nowrap",align:"flex-start",children:[y.jsx(rs,{size:22,radius:"xl",color:(x==null?void 0:x.color)||ic(O),children:O.slice(0,2).toUpperCase()}),y.jsxs(ge,{style:{flex:1,minWidth:0},children:[y.jsxs(Ke,{gap:6,wrap:"nowrap",justify:"space-between",children:[y.jsxs(Ke,{gap:6,wrap:"nowrap",children:[y.jsx(Te,{size:"xs",fw:600,children:O}),y.jsx(Te,{size:"xs",c:"dimmed",children:qS(C.created_at)})]}),E&&y.jsx(pi,{label:"Borrar",withArrow:!0,children:y.jsx(Et,{size:"xs",variant:"subtle",color:"red",onClick:()=>k(C.id),children:y.jsx(ku,{size:12})})})]}),y.jsx(Te,{size:"sm",style:{whiteSpace:"pre-wrap",wordBreak:"break-word"},children:C.body})]})]})},C.id)})})}),y.jsxs(Ke,{gap:"xs",align:"flex-end",children:[y.jsx(Qf,{value:f,onChange:C=>c(C.currentTarget.value),onKeyDown:_,placeholder:"Escribe un mensaje (Enter = enviar, Shift+Enter = salto)",autosize:!0,minRows:1,maxRows:6,style:{flex:1},disabled:h}),y.jsx(pi,{label:"Enviar",withArrow:!0,children:y.jsx(Et,{size:"lg",variant:"filled",color:"blue",onClick:w,disabled:!f.trim()||h,"aria-label":"Enviar",children:y.jsx(eq,{size:16})})})]})]})}const rM=/(https?:\/\/[^\s<>()"']+)/gi;function qk(e,n){if(!n)return[];const t=[],i=new Set;let r;for(rM.lastIndex=0;(r=rM.exec(n))!==null;){let a=r[1];a=a.replace(/[.,;:!?)\]}>]+$/,""),!i.has(a)&&(i.add(a),t.push({url:a,source:e,context:n}))}return t}function tle(e){try{return new URL(e).hostname}catch{return e}}function ile({card:e,messages:n}){const t=A.useMemo(()=>{const a=[...qk("title",e.title),...qk("description",e.description),...n.flatMap(l=>qk("chat",l.body))],o=new Set;return a.filter(l=>o.has(l.url)?!1:(o.add(l.url),!0))},[e.title,e.description,n]);if(t.length===0)return y.jsxs(Wn,{gap:"xs",p:"md",align:"center",justify:"center",style:{minHeight:200},children:[y.jsx(Te,{size:"sm",c:"dimmed",children:"Sin enlaces detectados"}),y.jsx(Te,{size:"xs",c:"dimmed",ta:"center",children:"Pega URLs en el titulo, descripcion o chat y apareceran aqui."})]});const i=a=>a==="title"?"grape":a==="description"?"blue":"teal",r=a=>a==="title"?"titulo":a==="description"?"descripcion":"chat";return y.jsx(Wn,{gap:6,p:4,children:t.map(a=>y.jsx(Lt,{withBorder:!0,p:"xs",radius:"sm",children:y.jsxs(Ke,{gap:"xs",wrap:"nowrap",justify:"space-between",align:"flex-start",children:[y.jsxs(ge,{style:{flex:1,minWidth:0},children:[y.jsx(wy,{href:a.url,target:"_blank",rel:"noopener noreferrer",size:"sm",style:{wordBreak:"break-all"},children:y.jsxs(Ke,{gap:4,wrap:"nowrap",align:"center",children:[y.jsx(ase,{size:12}),y.jsx("span",{children:tle(a.url)})]})}),y.jsx(Te,{size:"xs",c:"dimmed",style:{wordBreak:"break-all"},children:a.url})]}),y.jsx(ct,{size:"xs",variant:"light",color:i(a.source),children:r(a.source)})]})},a.url))})}function rle({card:e,users:n,currentUserId:t,requesterOptions:i,tagOptions:r,onSubmit:a,onCancel:o}){const[l,f]=A.useState([]),[c,h]=A.useState(e),d=async p=>{h(v=>({...v,title:p.title,description:p.description,requester:p.requester,tags:p.tags,assignee_id:p.assignee_id})),await a(p)};return y.jsxs(Ke,{align:"stretch",gap:"md",wrap:"nowrap",style:{minHeight:460},children:[y.jsx(ge,{style:{flex:"1 1 0",minWidth:320},children:y.jsx(nq,{users:n,requesterOptions:i,tagOptions:r,initial:{requester:c.requester,title:c.title,description:c.description,assignee_id:c.assignee_id,tags:c.tags||[]},submitLabel:"Guardar",onSubmit:d,onCancel:o})}),y.jsx(Bc,{orientation:"vertical"}),y.jsx(ge,{style:{flex:"1 1 0",minWidth:320,display:"flex",flexDirection:"column"},children:y.jsxs(wi,{defaultValue:"chat",keepMounted:!1,style:{display:"flex",flexDirection:"column",flex:1,minHeight:0},children:[y.jsxs(wi.List,{children:[y.jsx(wi.Tab,{value:"chat",leftSection:y.jsx(kse,{size:14}),children:"Chat"}),y.jsx(wi.Tab,{value:"links",leftSection:y.jsx(dse,{size:14}),children:"Enlaces"}),y.jsx(wi.Tab,{value:"files",leftSection:y.jsx(Ase,{size:14}),disabled:!0,children:"Archivos"})]}),y.jsxs(ge,{pt:"xs",style:{flex:1,minHeight:0,display:"flex",flexDirection:"column"},children:[y.jsx(wi.Panel,{value:"chat",style:{flex:1,minHeight:0,display:"flex"},children:y.jsx(ge,{style:{flex:1,minHeight:0,display:"flex",flexDirection:"column",width:"100%"},children:y.jsx(nle,{cardId:c.id,users:n,currentUserId:t,onMessagesChange:f})})}),y.jsx(wi.Panel,{value:"links",children:y.jsx(ile,{card:c,messages:l})}),y.jsx(wi.Panel,{value:"files",children:y.jsx(Te,{size:"sm",c:"dimmed",ta:"center",p:"md",children:"Proximamente: adjuntos de archivos."})})]})]})})]})}function ale(e,n){const t={};return(e[e.length-1]===""?[...e,""]:e).join((t.padRight?" ":"")+","+(t.padLeft===!1?"":" ")).trim()}const ole=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,sle=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,lle={};function aM(e,n){return(lle.jsx?sle:ole).test(e)}const ule=/[ \t\n\f\r]/g;function fle(e){return typeof e=="object"?e.type==="text"?oM(e.value):!1:oM(e)}function oM(e){return e.replace(ule,"")===""}class sp{constructor(n,t,i){this.normal=t,this.property=n,i&&(this.space=i)}}sp.prototype.normal={};sp.prototype.property={};sp.prototype.space=void 0;function rq(e,n){const t={},i={};for(const r of e)Object.assign(t,r.property),Object.assign(i,r.normal);return new sp(t,i,n)}function HS(e){return e.toLowerCase()}class Sr{constructor(n,t){this.attribute=t,this.property=n}}Sr.prototype.attribute="";Sr.prototype.booleanish=!1;Sr.prototype.boolean=!1;Sr.prototype.commaOrSpaceSeparated=!1;Sr.prototype.commaSeparated=!1;Sr.prototype.defined=!1;Sr.prototype.mustUseProperty=!1;Sr.prototype.number=!1;Sr.prototype.overloadedBoolean=!1;Sr.prototype.property="";Sr.prototype.spaceSeparated=!1;Sr.prototype.space=void 0;let cle=0;const qn=$u(),hi=$u(),US=$u(),He=$u(),Nt=$u(),Uf=$u(),Lr=$u();function $u(){return 2**++cle}const VS=Object.freeze(Object.defineProperty({__proto__:null,boolean:qn,booleanish:hi,commaOrSpaceSeparated:Lr,commaSeparated:Uf,number:He,overloadedBoolean:US,spaceSeparated:Nt},Symbol.toStringTag,{value:"Module"})),Hk=Object.keys(VS);class f9 extends Sr{constructor(n,t,i,r){let a=-1;if(super(n,t),sM(this,"space",r),typeof i=="number")for(;++a4&&t.slice(0,4)==="data"&&vle.test(n)){if(n.charAt(4)==="-"){const a=n.slice(5).replace(lM,ble);i="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=n.slice(4);if(!lM.test(a)){let o=a.replace(ple,yle);o.charAt(0)!=="-"&&(o="-"+o),n="data"+o}}r=f9}return new r(i,n)}function yle(e){return"-"+e.toLowerCase()}function ble(e){return e.charAt(1).toUpperCase()}const wle=rq([aq,dle,lq,uq,fq],"html"),c9=rq([aq,hle,lq,uq,fq],"svg");function kle(e){return e.join(" ").trim()}var Of={},Uk,uM;function _le(){if(uM)return Uk;uM=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,n=/\n/g,t=/^\s*/,i=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,r=/^:\s*/,a=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,o=/^[;\s]*/,l=/^\s+|\s+$/g,f=` +`,c="/",h="*",d="",p="comment",v="declaration";function b(k,_){if(typeof k!="string")throw new TypeError("First argument must be a string");if(!k)return[];_=_||{};var C=1,x=1;function E(U){var H=U.match(n);H&&(C+=H.length);var N=U.lastIndexOf(f);x=~N?U.length-N:x+U.length}function O(){var U={line:C,column:x};return function(H){return H.position=new j(U),F(),H}}function j(U){this.start=U,this.end={line:C,column:x},this.source=_.source}j.prototype.content=k;function M(U){var H=new Error(_.source+":"+C+":"+x+": "+U);if(H.reason=U,H.filename=_.source,H.line=C,H.column=x,H.source=k,!_.silent)throw H}function P(U){var H=U.exec(k);if(H){var N=H[0];return E(N),k=k.slice(N.length),H}}function F(){P(t)}function R(U){var H;for(U=U||[];H=L();)H!==!1&&U.push(H);return U}function L(){var U=O();if(!(c!=k.charAt(0)||h!=k.charAt(1))){for(var H=2;d!=k.charAt(H)&&(h!=k.charAt(H)||c!=k.charAt(H+1));)++H;if(H+=2,d===k.charAt(H-1))return M("End of comment missing");var N=k.slice(2,H-2);return x+=2,E(N),k=k.slice(H),x+=2,U({type:p,comment:N})}}function B(){var U=O(),H=P(i);if(H){if(L(),!P(r))return M("property missing ':'");var N=P(a),z=U({type:v,property:w(H[0].replace(e,d)),value:N?w(N[0].replace(e,d)):d});return P(o),z}}function G(){var U=[];R(U);for(var H;H=B();)H!==!1&&(U.push(H),R(U));return U}return F(),G()}function w(k){return k?k.replace(l,d):d}return Uk=b,Uk}var fM;function xle(){if(fM)return Of;fM=1;var e=Of&&Of.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(Of,"__esModule",{value:!0}),Of.default=t;const n=e(_le());function t(i,r){let a=null;if(!i||typeof i!="string")return a;const o=(0,n.default)(i),l=typeof r=="function";return o.forEach(f=>{if(f.type!=="declaration")return;const{property:c,value:h}=f;l?r(c,h,f):h&&(a=a||{},a[c]=h)}),a}return Of}var th={},cM;function Sle(){if(cM)return th;cM=1,Object.defineProperty(th,"__esModule",{value:!0}),th.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,n=/-([a-z])/g,t=/^[^-]+$/,i=/^-(webkit|moz|ms|o|khtml)-/,r=/^-(ms)-/,a=function(c){return!c||t.test(c)||e.test(c)},o=function(c,h){return h.toUpperCase()},l=function(c,h){return"".concat(h,"-")},f=function(c,h){return h===void 0&&(h={}),a(c)?c:(c=c.toLowerCase(),h.reactCompat?c=c.replace(r,l):c=c.replace(i,l),c.replace(n,o))};return th.camelCase=f,th}var ih,dM;function Cle(){if(dM)return ih;dM=1;var e=ih&&ih.__importDefault||function(r){return r&&r.__esModule?r:{default:r}},n=e(xle()),t=Sle();function i(r,a){var o={};return!r||typeof r!="string"||(0,n.default)(r,function(l,f){l&&f&&(o[(0,t.camelCase)(l,a)]=f)}),o}return i.default=i,ih=i,ih}var Ale=Cle();const Ole=ht(Ale),cq=dq("end"),d9=dq("start");function dq(e){return n;function n(t){const i=t&&t.position&&t.position[e]||{};if(typeof i.line=="number"&&i.line>0&&typeof i.column=="number"&&i.column>0)return{line:i.line,column:i.column,offset:typeof i.offset=="number"&&i.offset>-1?i.offset:void 0}}}function jle(e){const n=d9(e),t=cq(e);if(n&&t)return{start:n,end:t}}function Rh(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?hM(e.position):"start"in e||"end"in e?hM(e):"line"in e||"column"in e?WS(e):""}function WS(e){return mM(e&&e.line)+":"+mM(e&&e.column)}function hM(e){return WS(e&&e.start)+"-"+WS(e&&e.end)}function mM(e){return e&&typeof e=="number"?e:1}class er extends Error{constructor(n,t,i){super(),typeof t=="string"&&(i=t,t=void 0);let r="",a={},o=!1;if(t&&("line"in t&&"column"in t?a={place:t}:"start"in t&&"end"in t?a={place:t}:"type"in t?a={ancestors:[t],place:t.position}:a={...t}),typeof n=="string"?r=n:!a.cause&&n&&(o=!0,r=n.message,a.cause=n),!a.ruleId&&!a.source&&typeof i=="string"){const f=i.indexOf(":");f===-1?a.ruleId=i:(a.source=i.slice(0,f),a.ruleId=i.slice(f+1))}if(!a.place&&a.ancestors&&a.ancestors){const f=a.ancestors[a.ancestors.length-1];f&&(a.place=f.position)}const l=a.place&&"start"in a.place?a.place.start:a.place;this.ancestors=a.ancestors||void 0,this.cause=a.cause||void 0,this.column=l?l.column:void 0,this.fatal=void 0,this.file="",this.message=r,this.line=l?l.line:void 0,this.name=Rh(a.place)||"1:1",this.place=a.place||void 0,this.reason=this.message,this.ruleId=a.ruleId||void 0,this.source=a.source||void 0,this.stack=o&&a.cause&&typeof a.cause.stack=="string"?a.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}er.prototype.file="";er.prototype.name="";er.prototype.reason="";er.prototype.message="";er.prototype.stack="";er.prototype.column=void 0;er.prototype.line=void 0;er.prototype.ancestors=void 0;er.prototype.cause=void 0;er.prototype.fatal=void 0;er.prototype.place=void 0;er.prototype.ruleId=void 0;er.prototype.source=void 0;const h9={}.hasOwnProperty,Ele=new Map,Tle=/[A-Z]/g,Mle=new Set(["table","tbody","thead","tfoot","tr"]),Dle=new Set(["td","th"]),hq="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function Rle(e,n){if(!n||n.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const t=n.filePath||void 0;let i;if(n.development){if(typeof n.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");i=Fle(t,n.jsxDEV)}else{if(typeof n.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof n.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");i=Ble(t,n.jsx,n.jsxs)}const r={Fragment:n.Fragment,ancestors:[],components:n.components||{},create:i,elementAttributeNameCase:n.elementAttributeNameCase||"react",evaluater:n.createEvaluater?n.createEvaluater():void 0,filePath:t,ignoreInvalidStyle:n.ignoreInvalidStyle||!1,passKeys:n.passKeys!==!1,passNode:n.passNode||!1,schema:n.space==="svg"?c9:wle,stylePropertyNameCase:n.stylePropertyNameCase||"dom",tableCellAlignToStyle:n.tableCellAlignToStyle!==!1},a=mq(r,e,void 0);return a&&typeof a!="string"?a:r.create(e,r.Fragment,{children:a||void 0},void 0)}function mq(e,n,t){if(n.type==="element")return Ple(e,n,t);if(n.type==="mdxFlowExpression"||n.type==="mdxTextExpression")return Nle(e,n);if(n.type==="mdxJsxFlowElement"||n.type==="mdxJsxTextElement")return zle(e,n,t);if(n.type==="mdxjsEsm")return $le(e,n);if(n.type==="root")return Lle(e,n,t);if(n.type==="text")return Ile(e,n)}function Ple(e,n,t){const i=e.schema;let r=i;n.tagName.toLowerCase()==="svg"&&i.space==="html"&&(r=c9,e.schema=r),e.ancestors.push(n);const a=vq(e,n.tagName,!1),o=qle(e,n);let l=p9(e,n);return Mle.has(n.tagName)&&(l=l.filter(function(f){return typeof f=="string"?!fle(f):!0})),pq(e,o,a,n),m9(o,l),e.ancestors.pop(),e.schema=i,e.create(n,a,o,t)}function Nle(e,n){if(n.data&&n.data.estree&&e.evaluater){const i=n.data.estree.body[0];return i.type,e.evaluater.evaluateExpression(i.expression)}em(e,n.position)}function $le(e,n){if(n.data&&n.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(n.data.estree);em(e,n.position)}function zle(e,n,t){const i=e.schema;let r=i;n.name==="svg"&&i.space==="html"&&(r=c9,e.schema=r),e.ancestors.push(n);const a=n.name===null?e.Fragment:vq(e,n.name,!0),o=Hle(e,n),l=p9(e,n);return pq(e,o,a,n),m9(o,l),e.ancestors.pop(),e.schema=i,e.create(n,a,o,t)}function Lle(e,n,t){const i={};return m9(i,p9(e,n)),e.create(n,e.Fragment,i,t)}function Ile(e,n){return n.value}function pq(e,n,t,i){typeof t!="string"&&t!==e.Fragment&&e.passNode&&(n.node=i)}function m9(e,n){if(n.length>0){const t=n.length>1?n:n[0];t&&(e.children=t)}}function Ble(e,n,t){return i;function i(r,a,o,l){const c=Array.isArray(o.children)?t:n;return l?c(a,o,l):c(a,o)}}function Fle(e,n){return t;function t(i,r,a,o){const l=Array.isArray(a.children),f=d9(i);return n(r,a,o,l,{columnNumber:f?f.column-1:void 0,fileName:e,lineNumber:f?f.line:void 0},void 0)}}function qle(e,n){const t={};let i,r;for(r in n.properties)if(r!=="children"&&h9.call(n.properties,r)){const a=Ule(e,r,n.properties[r]);if(a){const[o,l]=a;e.tableCellAlignToStyle&&o==="align"&&typeof l=="string"&&Dle.has(n.tagName)?i=l:t[o]=l}}if(i){const a=t.style||(t.style={});a[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=i}return t}function Hle(e,n){const t={};for(const i of n.attributes)if(i.type==="mdxJsxExpressionAttribute")if(i.data&&i.data.estree&&e.evaluater){const a=i.data.estree.body[0];a.type;const o=a.expression;o.type;const l=o.properties[0];l.type,Object.assign(t,e.evaluater.evaluateExpression(l.argument))}else em(e,n.position);else{const r=i.name;let a;if(i.value&&typeof i.value=="object")if(i.value.data&&i.value.data.estree&&e.evaluater){const l=i.value.data.estree.body[0];l.type,a=e.evaluater.evaluateExpression(l.expression)}else em(e,n.position);else a=i.value===null?!0:i.value;t[r]=a}return t}function p9(e,n){const t=[];let i=-1;const r=e.passKeys?new Map:Ele;for(;++ir?0:r+n:n=n>r?r:n,t=t>0?t:0,i.length<1e4)o=Array.from(i),o.unshift(n,t),e.splice(...o);else for(t&&e.splice(n,t);a0?(Vr(e,e.length,0,n),e):n}const gM={}.hasOwnProperty;function yq(e){const n={};let t=-1;for(;++t13&&t<32||t>126&&t<160||t>55295&&t<57344||t>64975&&t<65008||(t&65535)===65535||(t&65535)===65534||t>1114111?"�":String.fromCodePoint(t)}function Fa(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const lr=wl(/[A-Za-z]/),Ji=wl(/[\dA-Za-z]/),Jle=wl(/[#-'*+\--9=?A-Z^-~]/);function Wg(e){return e!==null&&(e<32||e===127)}const GS=wl(/\d/),eue=wl(/[\dA-Fa-f]/),nue=wl(/[!-/:-@[-`{-~]/);function wn(e){return e!==null&&e<-2}function Rt(e){return e!==null&&(e<0||e===32)}function Zn(e){return e===-2||e===-1||e===32}const m0=wl(new RegExp("\\p{P}|\\p{S}","u")),_u=wl(/\s/);function wl(e){return n;function n(t){return t!==null&&t>-1&&e.test(String.fromCharCode(t))}}function Xc(e){const n=[];let t=-1,i=0,r=0;for(;++t55295&&a<57344){const l=e.charCodeAt(t+1);a<56320&&l>56319&&l<57344?(o=String.fromCharCode(a,l),r=1):o="�"}else o=String.fromCharCode(a);o&&(n.push(e.slice(i,t),encodeURIComponent(o)),i=t+r+1,o=""),r&&(t+=r,r=0)}return n.join("")+e.slice(i)}function at(e,n,t,i){const r=i?i-1:Number.POSITIVE_INFINITY;let a=0;return o;function o(f){return Zn(f)?(e.enter(t),l(f)):n(f)}function l(f){return Zn(f)&&a++o))return;const M=n.events.length;let P=M,F,R;for(;P--;)if(n.events[P][0]==="exit"&&n.events[P][1].type==="chunkFlow"){if(F){R=n.events[P][1].end;break}F=!0}for(_(i),j=M;jx;){const O=t[E];n.containerState=O[1],O[0].exit.call(n,e)}t.length=x}function C(){r.write([null]),a=void 0,r=void 0,n.containerState._closeFlow=void 0}}function oue(e,n,t){return at(e,e.attempt(this.parser.constructs.document,n,t),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function rc(e){if(e===null||Rt(e)||_u(e))return 1;if(m0(e))return 2}function p0(e,n,t){const i=[];let r=-1;for(;++r1&&e[t][1].end.offset-e[t][1].start.offset>1?2:1;const d={...e[i][1].end},p={...e[t][1].start};bM(d,-f),bM(p,f),o={type:f>1?"strongSequence":"emphasisSequence",start:d,end:{...e[i][1].end}},l={type:f>1?"strongSequence":"emphasisSequence",start:{...e[t][1].start},end:p},a={type:f>1?"strongText":"emphasisText",start:{...e[i][1].end},end:{...e[t][1].start}},r={type:f>1?"strong":"emphasis",start:{...o.start},end:{...l.end}},e[i][1].end={...o.start},e[t][1].start={...l.end},c=[],e[i][1].end.offset-e[i][1].start.offset&&(c=da(c,[["enter",e[i][1],n],["exit",e[i][1],n]])),c=da(c,[["enter",r,n],["enter",o,n],["exit",o,n],["enter",a,n]]),c=da(c,p0(n.parser.constructs.insideSpan.null,e.slice(i+1,t),n)),c=da(c,[["exit",a,n],["enter",l,n],["exit",l,n],["exit",r,n]]),e[t][1].end.offset-e[t][1].start.offset?(h=2,c=da(c,[["enter",e[t][1],n],["exit",e[t][1],n]])):h=0,Vr(e,i-1,t-i+3,c),t=i+c.length-h-2;break}}for(t=-1;++t0&&Zn(j)?at(e,C,"linePrefix",a+1)(j):C(j)}function C(j){return j===null||wn(j)?e.check(wM,w,E)(j):(e.enter("codeFlowValue"),x(j))}function x(j){return j===null||wn(j)?(e.exit("codeFlowValue"),C(j)):(e.consume(j),x)}function E(j){return e.exit("codeFenced"),n(j)}function O(j,M,P){let F=0;return R;function R(H){return j.enter("lineEnding"),j.consume(H),j.exit("lineEnding"),L}function L(H){return j.enter("codeFencedFence"),Zn(H)?at(j,B,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(H):B(H)}function B(H){return H===l?(j.enter("codeFencedFenceSequence"),G(H)):P(H)}function G(H){return H===l?(F++,j.consume(H),G):F>=o?(j.exit("codeFencedFenceSequence"),Zn(H)?at(j,U,"whitespace")(H):U(H)):P(H)}function U(H){return H===null||wn(H)?(j.exit("codeFencedFence"),M(H)):P(H)}}}function yue(e,n,t){const i=this;return r;function r(o){return o===null?t(o):(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),a)}function a(o){return i.parser.lazy[i.now().line]?t(o):n(o)}}const Wk={name:"codeIndented",tokenize:wue},bue={partial:!0,tokenize:kue};function wue(e,n,t){const i=this;return r;function r(c){return e.enter("codeIndented"),at(e,a,"linePrefix",5)(c)}function a(c){const h=i.events[i.events.length-1];return h&&h[1].type==="linePrefix"&&h[2].sliceSerialize(h[1],!0).length>=4?o(c):t(c)}function o(c){return c===null?f(c):wn(c)?e.attempt(bue,o,f)(c):(e.enter("codeFlowValue"),l(c))}function l(c){return c===null||wn(c)?(e.exit("codeFlowValue"),o(c)):(e.consume(c),l)}function f(c){return e.exit("codeIndented"),n(c)}}function kue(e,n,t){const i=this;return r;function r(o){return i.parser.lazy[i.now().line]?t(o):wn(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),r):at(e,a,"linePrefix",5)(o)}function a(o){const l=i.events[i.events.length-1];return l&&l[1].type==="linePrefix"&&l[2].sliceSerialize(l[1],!0).length>=4?n(o):wn(o)?r(o):t(o)}}const _ue={name:"codeText",previous:Sue,resolve:xue,tokenize:Cue};function xue(e){let n=e.length-4,t=3,i,r;if((e[t][1].type==="lineEnding"||e[t][1].type==="space")&&(e[n][1].type==="lineEnding"||e[n][1].type==="space")){for(i=t;++i=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+n+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return nthis.left.length?this.right.slice(this.right.length-i+this.left.length,this.right.length-n+this.left.length).reverse():this.left.slice(n).concat(this.right.slice(this.right.length-i+this.left.length).reverse())}splice(n,t,i){const r=t||0;this.setCursor(Math.trunc(n));const a=this.right.splice(this.right.length-r,Number.POSITIVE_INFINITY);return i&&rh(this.left,i),a.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(n){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(n)}pushMany(n){this.setCursor(Number.POSITIVE_INFINITY),rh(this.left,n)}unshift(n){this.setCursor(0),this.right.push(n)}unshiftMany(n){this.setCursor(0),rh(this.right,n.reverse())}setCursor(n){if(!(n===this.left.length||n>this.left.length&&this.right.length===0||n<0&&this.left.length===0))if(n=4?n(o):e.interrupt(i.parser.constructs.flow,t,n)(o)}}function Sq(e,n,t,i,r,a,o,l,f){const c=f||Number.POSITIVE_INFINITY;let h=0;return d;function d(_){return _===60?(e.enter(i),e.enter(r),e.enter(a),e.consume(_),e.exit(a),p):_===null||_===32||_===41||Wg(_)?t(_):(e.enter(i),e.enter(o),e.enter(l),e.enter("chunkString",{contentType:"string"}),w(_))}function p(_){return _===62?(e.enter(a),e.consume(_),e.exit(a),e.exit(r),e.exit(i),n):(e.enter(l),e.enter("chunkString",{contentType:"string"}),v(_))}function v(_){return _===62?(e.exit("chunkString"),e.exit(l),p(_)):_===null||_===60||wn(_)?t(_):(e.consume(_),_===92?b:v)}function b(_){return _===60||_===62||_===92?(e.consume(_),v):v(_)}function w(_){return!h&&(_===null||_===41||Rt(_))?(e.exit("chunkString"),e.exit(l),e.exit(o),e.exit(i),n(_)):h999||v===null||v===91||v===93&&!f||v===94&&!l&&"_hiddenFootnoteSupport"in o.parser.constructs?t(v):v===93?(e.exit(a),e.enter(r),e.consume(v),e.exit(r),e.exit(i),n):wn(v)?(e.enter("lineEnding"),e.consume(v),e.exit("lineEnding"),h):(e.enter("chunkString",{contentType:"string"}),d(v))}function d(v){return v===null||v===91||v===93||wn(v)||l++>999?(e.exit("chunkString"),h(v)):(e.consume(v),f||(f=!Zn(v)),v===92?p:d)}function p(v){return v===91||v===92||v===93?(e.consume(v),l++,d):d(v)}}function Aq(e,n,t,i,r,a){let o;return l;function l(p){return p===34||p===39||p===40?(e.enter(i),e.enter(r),e.consume(p),e.exit(r),o=p===40?41:p,f):t(p)}function f(p){return p===o?(e.enter(r),e.consume(p),e.exit(r),e.exit(i),n):(e.enter(a),c(p))}function c(p){return p===o?(e.exit(a),f(o)):p===null?t(p):wn(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),at(e,c,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),h(p))}function h(p){return p===o||p===null||wn(p)?(e.exit("chunkString"),c(p)):(e.consume(p),p===92?d:h)}function d(p){return p===o||p===92?(e.consume(p),h):h(p)}}function Ph(e,n){let t;return i;function i(r){return wn(r)?(e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),t=!0,i):Zn(r)?at(e,i,t?"linePrefix":"lineSuffix")(r):n(r)}}const Rue={name:"definition",tokenize:Nue},Pue={partial:!0,tokenize:$ue};function Nue(e,n,t){const i=this;let r;return a;function a(v){return e.enter("definition"),o(v)}function o(v){return Cq.call(i,e,l,t,"definitionLabel","definitionLabelMarker","definitionLabelString")(v)}function l(v){return r=Fa(i.sliceSerialize(i.events[i.events.length-1][1]).slice(1,-1)),v===58?(e.enter("definitionMarker"),e.consume(v),e.exit("definitionMarker"),f):t(v)}function f(v){return Rt(v)?Ph(e,c)(v):c(v)}function c(v){return Sq(e,h,t,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(v)}function h(v){return e.attempt(Pue,d,d)(v)}function d(v){return Zn(v)?at(e,p,"whitespace")(v):p(v)}function p(v){return v===null||wn(v)?(e.exit("definition"),i.parser.defined.push(r),n(v)):t(v)}}function $ue(e,n,t){return i;function i(l){return Rt(l)?Ph(e,r)(l):t(l)}function r(l){return Aq(e,a,t,"definitionTitle","definitionTitleMarker","definitionTitleString")(l)}function a(l){return Zn(l)?at(e,o,"whitespace")(l):o(l)}function o(l){return l===null||wn(l)?n(l):t(l)}}const zue={name:"hardBreakEscape",tokenize:Lue};function Lue(e,n,t){return i;function i(a){return e.enter("hardBreakEscape"),e.consume(a),r}function r(a){return wn(a)?(e.exit("hardBreakEscape"),n(a)):t(a)}}const Iue={name:"headingAtx",resolve:Bue,tokenize:Fue};function Bue(e,n){let t=e.length-2,i=3,r,a;return e[i][1].type==="whitespace"&&(i+=2),t-2>i&&e[t][1].type==="whitespace"&&(t-=2),e[t][1].type==="atxHeadingSequence"&&(i===t-1||t-4>i&&e[t-2][1].type==="whitespace")&&(t-=i+1===t?2:4),t>i&&(r={type:"atxHeadingText",start:e[i][1].start,end:e[t][1].end},a={type:"chunkText",start:e[i][1].start,end:e[t][1].end,contentType:"text"},Vr(e,i,t-i+1,[["enter",r,n],["enter",a,n],["exit",a,n],["exit",r,n]])),e}function Fue(e,n,t){let i=0;return r;function r(h){return e.enter("atxHeading"),a(h)}function a(h){return e.enter("atxHeadingSequence"),o(h)}function o(h){return h===35&&i++<6?(e.consume(h),o):h===null||Rt(h)?(e.exit("atxHeadingSequence"),l(h)):t(h)}function l(h){return h===35?(e.enter("atxHeadingSequence"),f(h)):h===null||wn(h)?(e.exit("atxHeading"),n(h)):Zn(h)?at(e,l,"whitespace")(h):(e.enter("atxHeadingText"),c(h))}function f(h){return h===35?(e.consume(h),f):(e.exit("atxHeadingSequence"),l(h))}function c(h){return h===null||h===35||Rt(h)?(e.exit("atxHeadingText"),l(h)):(e.consume(h),c)}}const que=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],_M=["pre","script","style","textarea"],Hue={concrete:!0,name:"htmlFlow",resolveTo:Wue,tokenize:Gue},Uue={partial:!0,tokenize:Kue},Vue={partial:!0,tokenize:Yue};function Wue(e){let n=e.length;for(;n--&&!(e[n][0]==="enter"&&e[n][1].type==="htmlFlow"););return n>1&&e[n-2][1].type==="linePrefix"&&(e[n][1].start=e[n-2][1].start,e[n+1][1].start=e[n-2][1].start,e.splice(n-2,2)),e}function Gue(e,n,t){const i=this;let r,a,o,l,f;return c;function c($){return h($)}function h($){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume($),d}function d($){return $===33?(e.consume($),p):$===47?(e.consume($),a=!0,w):$===63?(e.consume($),r=3,i.interrupt?n:D):lr($)?(e.consume($),o=String.fromCharCode($),k):t($)}function p($){return $===45?(e.consume($),r=2,v):$===91?(e.consume($),r=5,l=0,b):lr($)?(e.consume($),r=4,i.interrupt?n:D):t($)}function v($){return $===45?(e.consume($),i.interrupt?n:D):t($)}function b($){const X="CDATA[";return $===X.charCodeAt(l++)?(e.consume($),l===X.length?i.interrupt?n:B:b):t($)}function w($){return lr($)?(e.consume($),o=String.fromCharCode($),k):t($)}function k($){if($===null||$===47||$===62||Rt($)){const X=$===47,ee=o.toLowerCase();return!X&&!a&&_M.includes(ee)?(r=1,i.interrupt?n($):B($)):que.includes(o.toLowerCase())?(r=6,X?(e.consume($),_):i.interrupt?n($):B($)):(r=7,i.interrupt&&!i.parser.lazy[i.now().line]?t($):a?C($):x($))}return $===45||Ji($)?(e.consume($),o+=String.fromCharCode($),k):t($)}function _($){return $===62?(e.consume($),i.interrupt?n:B):t($)}function C($){return Zn($)?(e.consume($),C):R($)}function x($){return $===47?(e.consume($),R):$===58||$===95||lr($)?(e.consume($),E):Zn($)?(e.consume($),x):R($)}function E($){return $===45||$===46||$===58||$===95||Ji($)?(e.consume($),E):O($)}function O($){return $===61?(e.consume($),j):Zn($)?(e.consume($),O):x($)}function j($){return $===null||$===60||$===61||$===62||$===96?t($):$===34||$===39?(e.consume($),f=$,M):Zn($)?(e.consume($),j):P($)}function M($){return $===f?(e.consume($),f=null,F):$===null||wn($)?t($):(e.consume($),M)}function P($){return $===null||$===34||$===39||$===47||$===60||$===61||$===62||$===96||Rt($)?O($):(e.consume($),P)}function F($){return $===47||$===62||Zn($)?x($):t($)}function R($){return $===62?(e.consume($),L):t($)}function L($){return $===null||wn($)?B($):Zn($)?(e.consume($),L):t($)}function B($){return $===45&&r===2?(e.consume($),N):$===60&&r===1?(e.consume($),z):$===62&&r===4?(e.consume($),V):$===63&&r===3?(e.consume($),D):$===93&&r===5?(e.consume($),Y):wn($)&&(r===6||r===7)?(e.exit("htmlFlowData"),e.check(Uue,W,G)($)):$===null||wn($)?(e.exit("htmlFlowData"),G($)):(e.consume($),B)}function G($){return e.check(Vue,U,W)($)}function U($){return e.enter("lineEnding"),e.consume($),e.exit("lineEnding"),H}function H($){return $===null||wn($)?G($):(e.enter("htmlFlowData"),B($))}function N($){return $===45?(e.consume($),D):B($)}function z($){return $===47?(e.consume($),o="",q):B($)}function q($){if($===62){const X=o.toLowerCase();return _M.includes(X)?(e.consume($),V):B($)}return lr($)&&o.length<8?(e.consume($),o+=String.fromCharCode($),q):B($)}function Y($){return $===93?(e.consume($),D):B($)}function D($){return $===62?(e.consume($),V):$===45&&r===2?(e.consume($),D):B($)}function V($){return $===null||wn($)?(e.exit("htmlFlowData"),W($)):(e.consume($),V)}function W($){return e.exit("htmlFlow"),n($)}}function Yue(e,n,t){const i=this;return r;function r(o){return wn(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),a):t(o)}function a(o){return i.parser.lazy[i.now().line]?t(o):n(o)}}function Kue(e,n,t){return i;function i(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),e.attempt(lp,n,t)}}const Xue={name:"htmlText",tokenize:Zue};function Zue(e,n,t){const i=this;let r,a,o;return l;function l(D){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(D),f}function f(D){return D===33?(e.consume(D),c):D===47?(e.consume(D),O):D===63?(e.consume(D),x):lr(D)?(e.consume(D),P):t(D)}function c(D){return D===45?(e.consume(D),h):D===91?(e.consume(D),a=0,b):lr(D)?(e.consume(D),C):t(D)}function h(D){return D===45?(e.consume(D),v):t(D)}function d(D){return D===null?t(D):D===45?(e.consume(D),p):wn(D)?(o=d,z(D)):(e.consume(D),d)}function p(D){return D===45?(e.consume(D),v):d(D)}function v(D){return D===62?N(D):D===45?p(D):d(D)}function b(D){const V="CDATA[";return D===V.charCodeAt(a++)?(e.consume(D),a===V.length?w:b):t(D)}function w(D){return D===null?t(D):D===93?(e.consume(D),k):wn(D)?(o=w,z(D)):(e.consume(D),w)}function k(D){return D===93?(e.consume(D),_):w(D)}function _(D){return D===62?N(D):D===93?(e.consume(D),_):w(D)}function C(D){return D===null||D===62?N(D):wn(D)?(o=C,z(D)):(e.consume(D),C)}function x(D){return D===null?t(D):D===63?(e.consume(D),E):wn(D)?(o=x,z(D)):(e.consume(D),x)}function E(D){return D===62?N(D):x(D)}function O(D){return lr(D)?(e.consume(D),j):t(D)}function j(D){return D===45||Ji(D)?(e.consume(D),j):M(D)}function M(D){return wn(D)?(o=M,z(D)):Zn(D)?(e.consume(D),M):N(D)}function P(D){return D===45||Ji(D)?(e.consume(D),P):D===47||D===62||Rt(D)?F(D):t(D)}function F(D){return D===47?(e.consume(D),N):D===58||D===95||lr(D)?(e.consume(D),R):wn(D)?(o=F,z(D)):Zn(D)?(e.consume(D),F):N(D)}function R(D){return D===45||D===46||D===58||D===95||Ji(D)?(e.consume(D),R):L(D)}function L(D){return D===61?(e.consume(D),B):wn(D)?(o=L,z(D)):Zn(D)?(e.consume(D),L):F(D)}function B(D){return D===null||D===60||D===61||D===62||D===96?t(D):D===34||D===39?(e.consume(D),r=D,G):wn(D)?(o=B,z(D)):Zn(D)?(e.consume(D),B):(e.consume(D),U)}function G(D){return D===r?(e.consume(D),r=void 0,H):D===null?t(D):wn(D)?(o=G,z(D)):(e.consume(D),G)}function U(D){return D===null||D===34||D===39||D===60||D===61||D===96?t(D):D===47||D===62||Rt(D)?F(D):(e.consume(D),U)}function H(D){return D===47||D===62||Rt(D)?F(D):t(D)}function N(D){return D===62?(e.consume(D),e.exit("htmlTextData"),e.exit("htmlText"),n):t(D)}function z(D){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(D),e.exit("lineEnding"),q}function q(D){return Zn(D)?at(e,Y,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(D):Y(D)}function Y(D){return e.enter("htmlTextData"),o(D)}}const y9={name:"labelEnd",resolveAll:nfe,resolveTo:tfe,tokenize:ife},Que={tokenize:rfe},Jue={tokenize:afe},efe={tokenize:ofe};function nfe(e){let n=-1;const t=[];for(;++n=3&&(c===null||wn(c))?(e.exit("thematicBreak"),n(c)):t(c)}function f(c){return c===r?(e.consume(c),i++,f):(e.exit("thematicBreakSequence"),Zn(c)?at(e,l,"whitespace")(c):l(c))}}const br={continuation:{tokenize:vfe},exit:yfe,name:"list",tokenize:pfe},hfe={partial:!0,tokenize:bfe},mfe={partial:!0,tokenize:gfe};function pfe(e,n,t){const i=this,r=i.events[i.events.length-1];let a=r&&r[1].type==="linePrefix"?r[2].sliceSerialize(r[1],!0).length:0,o=0;return l;function l(v){const b=i.containerState.type||(v===42||v===43||v===45?"listUnordered":"listOrdered");if(b==="listUnordered"?!i.containerState.marker||v===i.containerState.marker:GS(v)){if(i.containerState.type||(i.containerState.type=b,e.enter(b,{_container:!0})),b==="listUnordered")return e.enter("listItemPrefix"),v===42||v===45?e.check(kg,t,c)(v):c(v);if(!i.interrupt||v===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),f(v)}return t(v)}function f(v){return GS(v)&&++o<10?(e.consume(v),f):(!i.interrupt||o<2)&&(i.containerState.marker?v===i.containerState.marker:v===41||v===46)?(e.exit("listItemValue"),c(v)):t(v)}function c(v){return e.enter("listItemMarker"),e.consume(v),e.exit("listItemMarker"),i.containerState.marker=i.containerState.marker||v,e.check(lp,i.interrupt?t:h,e.attempt(hfe,p,d))}function h(v){return i.containerState.initialBlankLine=!0,a++,p(v)}function d(v){return Zn(v)?(e.enter("listItemPrefixWhitespace"),e.consume(v),e.exit("listItemPrefixWhitespace"),p):t(v)}function p(v){return i.containerState.size=a+i.sliceSerialize(e.exit("listItemPrefix"),!0).length,n(v)}}function vfe(e,n,t){const i=this;return i.containerState._closeFlow=void 0,e.check(lp,r,a);function r(l){return i.containerState.furtherBlankLines=i.containerState.furtherBlankLines||i.containerState.initialBlankLine,at(e,n,"listItemIndent",i.containerState.size+1)(l)}function a(l){return i.containerState.furtherBlankLines||!Zn(l)?(i.containerState.furtherBlankLines=void 0,i.containerState.initialBlankLine=void 0,o(l)):(i.containerState.furtherBlankLines=void 0,i.containerState.initialBlankLine=void 0,e.attempt(mfe,n,o)(l))}function o(l){return i.containerState._closeFlow=!0,i.interrupt=void 0,at(e,e.attempt(br,n,t),"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(l)}}function gfe(e,n,t){const i=this;return at(e,r,"listItemIndent",i.containerState.size+1);function r(a){const o=i.events[i.events.length-1];return o&&o[1].type==="listItemIndent"&&o[2].sliceSerialize(o[1],!0).length===i.containerState.size?n(a):t(a)}}function yfe(e){e.exit(this.containerState.type)}function bfe(e,n,t){const i=this;return at(e,r,"listItemPrefixWhitespace",i.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function r(a){const o=i.events[i.events.length-1];return!Zn(a)&&o&&o[1].type==="listItemPrefixWhitespace"?n(a):t(a)}}const xM={name:"setextUnderline",resolveTo:wfe,tokenize:kfe};function wfe(e,n){let t=e.length,i,r,a;for(;t--;)if(e[t][0]==="enter"){if(e[t][1].type==="content"){i=t;break}e[t][1].type==="paragraph"&&(r=t)}else e[t][1].type==="content"&&e.splice(t,1),!a&&e[t][1].type==="definition"&&(a=t);const o={type:"setextHeading",start:{...e[i][1].start},end:{...e[e.length-1][1].end}};return e[r][1].type="setextHeadingText",a?(e.splice(r,0,["enter",o,n]),e.splice(a+1,0,["exit",e[i][1],n]),e[i][1].end={...e[a][1].end}):e[i][1]=o,e.push(["exit",o,n]),e}function kfe(e,n,t){const i=this;let r;return a;function a(c){let h=i.events.length,d;for(;h--;)if(i.events[h][1].type!=="lineEnding"&&i.events[h][1].type!=="linePrefix"&&i.events[h][1].type!=="content"){d=i.events[h][1].type==="paragraph";break}return!i.parser.lazy[i.now().line]&&(i.interrupt||d)?(e.enter("setextHeadingLine"),r=c,o(c)):t(c)}function o(c){return e.enter("setextHeadingLineSequence"),l(c)}function l(c){return c===r?(e.consume(c),l):(e.exit("setextHeadingLineSequence"),Zn(c)?at(e,f,"lineSuffix")(c):f(c))}function f(c){return c===null||wn(c)?(e.exit("setextHeadingLine"),n(c)):t(c)}}const _fe={tokenize:xfe};function xfe(e){const n=this,t=e.attempt(lp,i,e.attempt(this.parser.constructs.flowInitial,r,at(e,e.attempt(this.parser.constructs.flow,r,e.attempt(jue,r)),"linePrefix")));return t;function i(a){if(a===null){e.consume(a);return}return e.enter("lineEndingBlank"),e.consume(a),e.exit("lineEndingBlank"),n.currentConstruct=void 0,t}function r(a){if(a===null){e.consume(a);return}return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),n.currentConstruct=void 0,t}}const Sfe={resolveAll:jq()},Cfe=Oq("string"),Afe=Oq("text");function Oq(e){return{resolveAll:jq(e==="text"?Ofe:void 0),tokenize:n};function n(t){const i=this,r=this.parser.constructs[e],a=t.attempt(r,o,l);return o;function o(h){return c(h)?a(h):l(h)}function l(h){if(h===null){t.consume(h);return}return t.enter("data"),t.consume(h),f}function f(h){return c(h)?(t.exit("data"),a(h)):(t.consume(h),f)}function c(h){if(h===null)return!0;const d=r[h];let p=-1;if(d)for(;++p-1){const l=o[0];typeof l=="string"?o[0]=l.slice(i):o.shift()}a>0&&o.push(e[r].slice(0,a))}return o}function Bfe(e,n){let t=-1;const i=[];let r;for(;++t0){const tn=Ge.tokenStack[Ge.tokenStack.length-1];(tn[1]||CM).call(Ge,void 0,tn[0])}for(he.position={start:Hs(ie.length>0?ie[0][1].start:{line:1,column:1,offset:0}),end:Hs(ie.length>0?ie[ie.length-2][1].end:{line:1,column:1,offset:0})},Se=-1;++Se0&&(i.className=["language-"+r[0]]);let a={type:"element",tagName:"code",properties:i,children:[{type:"text",value:t}]};return n.meta&&(a.data={meta:n.meta}),e.patch(n,a),a=e.applyData(n,a),a={type:"element",tagName:"pre",properties:{},children:[a]},e.patch(n,a),a}function ece(e,n){const t={type:"element",tagName:"del",properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)}function nce(e,n){const t={type:"element",tagName:"em",properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)}function tce(e,n){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",i=String(n.identifier).toUpperCase(),r=Xc(i.toLowerCase()),a=e.footnoteOrder.indexOf(i);let o,l=e.footnoteCounts.get(i);l===void 0?(l=0,e.footnoteOrder.push(i),o=e.footnoteOrder.length):o=a+1,l+=1,e.footnoteCounts.set(i,l);const f={type:"element",tagName:"a",properties:{href:"#"+t+"fn-"+r,id:t+"fnref-"+r+(l>1?"-"+l:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(o)}]};e.patch(n,f);const c={type:"element",tagName:"sup",properties:{},children:[f]};return e.patch(n,c),e.applyData(n,c)}function ice(e,n){const t={type:"element",tagName:"h"+n.depth,properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)}function rce(e,n){if(e.options.allowDangerousHtml){const t={type:"raw",value:n.value};return e.patch(n,t),e.applyData(n,t)}}function Mq(e,n){const t=n.referenceType;let i="]";if(t==="collapsed"?i+="[]":t==="full"&&(i+="["+(n.label||n.identifier)+"]"),n.type==="imageReference")return[{type:"text",value:"!["+n.alt+i}];const r=e.all(n),a=r[0];a&&a.type==="text"?a.value="["+a.value:r.unshift({type:"text",value:"["});const o=r[r.length-1];return o&&o.type==="text"?o.value+=i:r.push({type:"text",value:i}),r}function ace(e,n){const t=String(n.identifier).toUpperCase(),i=e.definitionById.get(t);if(!i)return Mq(e,n);const r={src:Xc(i.url||""),alt:n.alt};i.title!==null&&i.title!==void 0&&(r.title=i.title);const a={type:"element",tagName:"img",properties:r,children:[]};return e.patch(n,a),e.applyData(n,a)}function oce(e,n){const t={src:Xc(n.url)};n.alt!==null&&n.alt!==void 0&&(t.alt=n.alt),n.title!==null&&n.title!==void 0&&(t.title=n.title);const i={type:"element",tagName:"img",properties:t,children:[]};return e.patch(n,i),e.applyData(n,i)}function sce(e,n){const t={type:"text",value:n.value.replace(/\r?\n|\r/g," ")};e.patch(n,t);const i={type:"element",tagName:"code",properties:{},children:[t]};return e.patch(n,i),e.applyData(n,i)}function lce(e,n){const t=String(n.identifier).toUpperCase(),i=e.definitionById.get(t);if(!i)return Mq(e,n);const r={href:Xc(i.url||"")};i.title!==null&&i.title!==void 0&&(r.title=i.title);const a={type:"element",tagName:"a",properties:r,children:e.all(n)};return e.patch(n,a),e.applyData(n,a)}function uce(e,n){const t={href:Xc(n.url)};n.title!==null&&n.title!==void 0&&(t.title=n.title);const i={type:"element",tagName:"a",properties:t,children:e.all(n)};return e.patch(n,i),e.applyData(n,i)}function fce(e,n,t){const i=e.all(n),r=t?cce(t):Dq(n),a={},o=[];if(typeof n.checked=="boolean"){const h=i[0];let d;h&&h.type==="element"&&h.tagName==="p"?d=h:(d={type:"element",tagName:"p",properties:{},children:[]},i.unshift(d)),d.children.length>0&&d.children.unshift({type:"text",value:" "}),d.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:n.checked,disabled:!0},children:[]}),a.className=["task-list-item"]}let l=-1;for(;++l1}function dce(e,n){const t={},i=e.all(n);let r=-1;for(typeof n.start=="number"&&n.start!==1&&(t.start=n.start);++r0){const o={type:"element",tagName:"tbody",properties:{},children:e.wrap(t,!0)},l=d9(n.children[1]),f=cq(n.children[n.children.length-1]);l&&f&&(o.position={start:l,end:f}),r.push(o)}const a={type:"element",tagName:"table",properties:{},children:e.wrap(r,!0)};return e.patch(n,a),e.applyData(n,a)}function gce(e,n,t){const i=t?t.children:void 0,a=(i?i.indexOf(n):1)===0?"th":"td",o=t&&t.type==="table"?t.align:void 0,l=o?o.length:n.children.length;let f=-1;const c=[];for(;++f0,!0),i[0]),r=i.index+i[0].length,i=t.exec(n);return a.push(jM(n.slice(r),r>0,!1)),a.join("")}function jM(e,n,t){let i=0,r=e.length;if(n){let a=e.codePointAt(i);for(;a===AM||a===OM;)i++,a=e.codePointAt(i)}if(t){let a=e.codePointAt(r-1);for(;a===AM||a===OM;)r--,a=e.codePointAt(r-1)}return r>i?e.slice(i,r):""}function wce(e,n){const t={type:"text",value:bce(String(n.value))};return e.patch(n,t),e.applyData(n,t)}function kce(e,n){const t={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(n,t),e.applyData(n,t)}const _ce={blockquote:Zfe,break:Qfe,code:Jfe,delete:ece,emphasis:nce,footnoteReference:tce,heading:ice,html:rce,imageReference:ace,image:oce,inlineCode:sce,linkReference:lce,link:uce,listItem:fce,list:dce,paragraph:hce,root:mce,strong:pce,table:vce,tableCell:yce,tableRow:gce,text:wce,thematicBreak:kce,toml:qv,yaml:qv,definition:qv,footnoteDefinition:qv};function qv(){}const Rq=-1,v0=0,Nh=1,Gg=2,b9=3,w9=4,k9=5,_9=6,Pq=7,Nq=8,xce=typeof self=="object"?self:globalThis,EM=(e,n)=>{switch(e){case"Function":case"SharedWorker":case"Worker":case"eval":case"setInterval":case"setTimeout":throw new TypeError("unable to deserialize "+e)}return new xce[e](n)},Sce=(e,n)=>{const t=(r,a)=>(e.set(a,r),r),i=r=>{if(e.has(r))return e.get(r);const[a,o]=n[r];switch(a){case v0:case Rq:return t(o,r);case Nh:{const l=t([],r);for(const f of o)l.push(i(f));return l}case Gg:{const l=t({},r);for(const[f,c]of o)l[i(f)]=i(c);return l}case b9:return t(new Date(o),r);case w9:{const{source:l,flags:f}=o;return t(new RegExp(l,f),r)}case k9:{const l=t(new Map,r);for(const[f,c]of o)l.set(i(f),i(c));return l}case _9:{const l=t(new Set,r);for(const f of o)l.add(i(f));return l}case Pq:{const{name:l,message:f}=o;return t(EM(l,f),r)}case Nq:return t(BigInt(o),r);case"BigInt":return t(Object(BigInt(o)),r);case"ArrayBuffer":return t(new Uint8Array(o).buffer,o);case"DataView":{const{buffer:l}=new Uint8Array(o);return t(new DataView(l),o)}}return t(EM(a,o),r)};return i},TM=e=>Sce(new Map,e)(0),jf="",{toString:Cce}={},{keys:Ace}=Object,ah=e=>{const n=typeof e;if(n!=="object"||!e)return[v0,n];const t=Cce.call(e).slice(8,-1);switch(t){case"Array":return[Nh,jf];case"Object":return[Gg,jf];case"Date":return[b9,jf];case"RegExp":return[w9,jf];case"Map":return[k9,jf];case"Set":return[_9,jf];case"DataView":return[Nh,t]}return t.includes("Array")?[Nh,t]:t.includes("Error")?[Pq,t]:[Gg,t]},Hv=([e,n])=>e===v0&&(n==="function"||n==="symbol"),Oce=(e,n,t,i)=>{const r=(o,l)=>{const f=i.push(o)-1;return t.set(l,f),f},a=o=>{if(t.has(o))return t.get(o);let[l,f]=ah(o);switch(l){case v0:{let h=o;switch(f){case"bigint":l=Nq,h=o.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+f);h=null;break;case"undefined":return r([Rq],o)}return r([l,h],o)}case Nh:{if(f){let p=o;return f==="DataView"?p=new Uint8Array(o.buffer):f==="ArrayBuffer"&&(p=new Uint8Array(o)),r([f,[...p]],o)}const h=[],d=r([l,h],o);for(const p of o)h.push(a(p));return d}case Gg:{if(f)switch(f){case"BigInt":return r([f,o.toString()],o);case"Boolean":case"Number":case"String":return r([f,o.valueOf()],o)}if(n&&"toJSON"in o)return a(o.toJSON());const h=[],d=r([l,h],o);for(const p of Ace(o))(e||!Hv(ah(o[p])))&&h.push([a(p),a(o[p])]);return d}case b9:return r([l,o.toISOString()],o);case w9:{const{source:h,flags:d}=o;return r([l,{source:h,flags:d}],o)}case k9:{const h=[],d=r([l,h],o);for(const[p,v]of o)(e||!(Hv(ah(p))||Hv(ah(v))))&&h.push([a(p),a(v)]);return d}case _9:{const h=[],d=r([l,h],o);for(const p of o)(e||!Hv(ah(p)))&&h.push(a(p));return d}}const{message:c}=o;return r([l,{name:f,message:c}],o)};return a},MM=(e,{json:n,lossy:t}={})=>{const i=[];return Oce(!(n||t),!!n,new Map,i)(e),i},Yg=typeof structuredClone=="function"?(e,n)=>n&&("json"in n||"lossy"in n)?TM(MM(e,n)):structuredClone(e):(e,n)=>TM(MM(e,n));function jce(e,n){const t=[{type:"text",value:"↩"}];return n>1&&t.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(n)}]}),t}function Ece(e,n){return"Back to reference "+(e+1)+(n>1?"-"+n:"")}function Tce(e){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",t=e.options.footnoteBackContent||jce,i=e.options.footnoteBackLabel||Ece,r=e.options.footnoteLabel||"Footnotes",a=e.options.footnoteLabelTagName||"h2",o=e.options.footnoteLabelProperties||{className:["sr-only"]},l=[];let f=-1;for(;++f0&&b.push({type:"text",value:" "});let C=typeof t=="string"?t:t(f,v);typeof C=="string"&&(C={type:"text",value:C}),b.push({type:"element",tagName:"a",properties:{href:"#"+n+"fnref-"+p+(v>1?"-"+v:""),dataFootnoteBackref:"",ariaLabel:typeof i=="string"?i:i(f,v),className:["data-footnote-backref"]},children:Array.isArray(C)?C:[C]})}const k=h[h.length-1];if(k&&k.type==="element"&&k.tagName==="p"){const C=k.children[k.children.length-1];C&&C.type==="text"?C.value+=" ":k.children.push({type:"text",value:" "}),k.children.push(...b)}else h.push(...b);const _={type:"element",tagName:"li",properties:{id:n+"fn-"+p},children:e.wrap(h,!0)};e.patch(c,_),l.push(_)}if(l.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:a,properties:{...Yg(o),id:"footnote-label"},children:[{type:"text",value:r}]},{type:"text",value:` +`},{type:"element",tagName:"ol",properties:{},children:e.wrap(l,!0)},{type:"text",value:` +`}]}}const g0=(function(e){if(e==null)return Pce;if(typeof e=="function")return y0(e);if(typeof e=="object")return Array.isArray(e)?Mce(e):Dce(e);if(typeof e=="string")return Rce(e);throw new Error("Expected function, string, or object as test")});function Mce(e){const n=[];let t=-1;for(;++t":""))+")"})}return p;function p(){let v=$q,b,w,k;if((!n||a(f,c,h[h.length-1]||void 0))&&(v=Lce(t(f,h)),v[0]===KS))return v;if("children"in f&&f.children){const _=f;if(_.children&&v[0]!==zce)for(w=(i?_.children.length:-1)+o,k=h.concat(_);w>-1&&w<_.children.length;){const C=_.children[w];if(b=l(C,w,k)(),b[0]===KS)return b;w=typeof b[1]=="number"?b[1]:w+o}}return v}}}function Lce(e){return Array.isArray(e)?e:typeof e=="number"?[$ce,e]:e==null?$q:[e]}function x9(e,n,t,i){let r,a,o;typeof n=="function"&&typeof t!="function"?(a=void 0,o=n,r=t):(a=n,o=t,r=i),zq(e,a,l,r);function l(f,c){const h=c[c.length-1],d=h?h.children.indexOf(f):void 0;return o(f,d,h)}}const XS={}.hasOwnProperty,Ice={};function Bce(e,n){const t=n||Ice,i=new Map,r=new Map,a=new Map,o={..._ce,...t.handlers},l={all:c,applyData:qce,definitionById:i,footnoteById:r,footnoteCounts:a,footnoteOrder:[],handlers:o,one:f,options:t,patch:Fce,wrap:Uce};return x9(e,function(h){if(h.type==="definition"||h.type==="footnoteDefinition"){const d=h.type==="definition"?i:r,p=String(h.identifier).toUpperCase();d.has(p)||d.set(p,h)}}),l;function f(h,d){const p=h.type,v=l.handlers[p];if(XS.call(l.handlers,p)&&v)return v(l,h,d);if(l.options.passThrough&&l.options.passThrough.includes(p)){if("children"in h){const{children:w,...k}=h,_=Yg(k);return _.children=l.all(h),_}return Yg(h)}return(l.options.unknownHandler||Hce)(l,h,d)}function c(h){const d=[];if("children"in h){const p=h.children;let v=-1;for(;++v0&&t.push({type:"text",value:` +`}),t}function DM(e){let n=0,t=e.charCodeAt(n);for(;t===9||t===32;)n++,t=e.charCodeAt(n);return e.slice(n)}function RM(e,n){const t=Bce(e,n),i=t.one(e,void 0),r=Tce(t),a=Array.isArray(i)?{type:"root",children:i}:i||{type:"root",children:[]};return r&&a.children.push({type:"text",value:` +`},r),a}function Vce(e,n){return e&&"run"in e?async function(t,i){const r=RM(t,{file:i,...n});await e.run(r,i)}:function(t,i){return RM(t,{file:i,...e||n})}}function PM(e){if(e)throw e}var Yk,NM;function Wce(){if(NM)return Yk;NM=1;var e=Object.prototype.hasOwnProperty,n=Object.prototype.toString,t=Object.defineProperty,i=Object.getOwnPropertyDescriptor,r=function(c){return typeof Array.isArray=="function"?Array.isArray(c):n.call(c)==="[object Array]"},a=function(c){if(!c||n.call(c)!=="[object Object]")return!1;var h=e.call(c,"constructor"),d=c.constructor&&c.constructor.prototype&&e.call(c.constructor.prototype,"isPrototypeOf");if(c.constructor&&!h&&!d)return!1;var p;for(p in c);return typeof p>"u"||e.call(c,p)},o=function(c,h){t&&h.name==="__proto__"?t(c,h.name,{enumerable:!0,configurable:!0,value:h.newValue,writable:!0}):c[h.name]=h.newValue},l=function(c,h){if(h==="__proto__")if(e.call(c,h)){if(i)return i(c,h).value}else return;return c[h]};return Yk=function f(){var c,h,d,p,v,b,w=arguments[0],k=1,_=arguments.length,C=!1;for(typeof w=="boolean"&&(C=w,w=arguments[1]||{},k=2),(w==null||typeof w!="object"&&typeof w!="function")&&(w={});k<_;++k)if(c=arguments[k],c!=null)for(h in c)d=l(w,h),p=l(c,h),w!==p&&(C&&p&&(a(p)||(v=r(p)))?(v?(v=!1,b=d&&r(d)?d:[]):b=d&&a(d)?d:{},o(w,{name:h,newValue:f(C,b,p)})):typeof p<"u"&&o(w,{name:h,newValue:p}));return w},Yk}var Gce=Wce();const Kk=ht(Gce);function ZS(e){if(typeof e!="object"||e===null)return!1;const n=Object.getPrototypeOf(e);return(n===null||n===Object.prototype||Object.getPrototypeOf(n)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function Yce(){const e=[],n={run:t,use:i};return n;function t(...r){let a=-1;const o=r.pop();if(typeof o!="function")throw new TypeError("Expected function as last argument, not "+o);l(null,...r);function l(f,...c){const h=e[++a];let d=-1;if(f){o(f);return}for(;++do.length;let f;l&&o.push(r);try{f=e.apply(this,o)}catch(c){const h=c;if(l&&t)throw h;return r(h)}l||(f&&f.then&&typeof f.then=="function"?f.then(a,r):f instanceof Error?r(f):a(f))}function r(o,...l){t||(t=!0,n(o,...l))}function a(o){r(null,o)}}const no={basename:Xce,dirname:Zce,extname:Qce,join:Jce,sep:"/"};function Xce(e,n){if(n!==void 0&&typeof n!="string")throw new TypeError('"ext" argument must be a string');up(e);let t=0,i=-1,r=e.length,a;if(n===void 0||n.length===0||n.length>e.length){for(;r--;)if(e.codePointAt(r)===47){if(a){t=r+1;break}}else i<0&&(a=!0,i=r+1);return i<0?"":e.slice(t,i)}if(n===e)return"";let o=-1,l=n.length-1;for(;r--;)if(e.codePointAt(r)===47){if(a){t=r+1;break}}else o<0&&(a=!0,o=r+1),l>-1&&(e.codePointAt(r)===n.codePointAt(l--)?l<0&&(i=r):(l=-1,i=o));return t===i?i=o:i<0&&(i=e.length),e.slice(t,i)}function Zce(e){if(up(e),e.length===0)return".";let n=-1,t=e.length,i;for(;--t;)if(e.codePointAt(t)===47){if(i){n=t;break}}else i||(i=!0);return n<0?e.codePointAt(0)===47?"/":".":n===1&&e.codePointAt(0)===47?"//":e.slice(0,n)}function Qce(e){up(e);let n=e.length,t=-1,i=0,r=-1,a=0,o;for(;n--;){const l=e.codePointAt(n);if(l===47){if(o){i=n+1;break}continue}t<0&&(o=!0,t=n+1),l===46?r<0?r=n:a!==1&&(a=1):r>-1&&(a=-1)}return r<0||t<0||a===0||a===1&&r===t-1&&r===i+1?"":e.slice(r,t)}function Jce(...e){let n=-1,t;for(;++n0&&e.codePointAt(e.length-1)===47&&(t+="/"),n?"/"+t:t}function nde(e,n){let t="",i=0,r=-1,a=0,o=-1,l,f;for(;++o<=e.length;){if(o2){if(f=t.lastIndexOf("/"),f!==t.length-1){f<0?(t="",i=0):(t=t.slice(0,f),i=t.length-1-t.lastIndexOf("/")),r=o,a=0;continue}}else if(t.length>0){t="",i=0,r=o,a=0;continue}}n&&(t=t.length>0?t+"/..":"..",i=2)}else t.length>0?t+="/"+e.slice(r+1,o):t=e.slice(r+1,o),i=o-r-1;r=o,a=0}else l===46&&a>-1?a++:a=-1}return t}function up(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const tde={cwd:ide};function ide(){return"/"}function QS(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function rde(e){if(typeof e=="string")e=new URL(e);else if(!QS(e)){const n=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw n.code="ERR_INVALID_ARG_TYPE",n}if(e.protocol!=="file:"){const n=new TypeError("The URL must be of scheme file");throw n.code="ERR_INVALID_URL_SCHEME",n}return ade(e)}function ade(e){if(e.hostname!==""){const i=new TypeError('File URL host must be "localhost" or empty on darwin');throw i.code="ERR_INVALID_FILE_URL_HOST",i}const n=e.pathname;let t=-1;for(;++t0){let[v,...b]=h;const w=i[p][1];ZS(w)&&ZS(v)&&(v=Kk(!0,w,v)),i[p]=[c,v,...b]}}}}const ude=new S9().freeze();function Jk(e,n){if(typeof n!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function e_(e,n){if(typeof n!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function n_(e,n){if(n)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function zM(e){if(!ZS(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function LM(e,n,t){if(!t)throw new Error("`"+e+"` finished async. Use `"+n+"` instead")}function Uv(e){return fde(e)?e:new Lq(e)}function fde(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function cde(e){return typeof e=="string"||dde(e)}function dde(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const hde="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",IM=[],BM={allowDangerousHtml:!0},mde=/^(https?|ircs?|mailto|xmpp)$/i,pde=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"className",id:"remove-classname"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function vde(e){const n=gde(e),t=yde(e);return bde(n.runSync(n.parse(t),t),e)}function gde(e){const n=e.rehypePlugins||IM,t=e.remarkPlugins||IM,i=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...BM}:BM;return ude().use(Xfe).use(t).use(Vce,i).use(n)}function yde(e){const n=e.children||"",t=new Lq;return typeof n=="string"&&(t.value=n),t}function bde(e,n){const t=n.allowedElements,i=n.allowElement,r=n.components,a=n.disallowedElements,o=n.skipHtml,l=n.unwrapDisallowed,f=n.urlTransform||wde;for(const h of pde)Object.hasOwn(n,h.from)&&(""+h.from+(h.to?"use `"+h.to+"` instead":"remove it")+hde+h.id,void 0);return x9(e,c),Rle(e,{Fragment:y.Fragment,components:r,ignoreInvalidStyle:!0,jsx:y.jsx,jsxs:y.jsxs,passKeys:!0,passNode:!0});function c(h,d,p){if(h.type==="raw"&&p&&typeof d=="number")return o?p.children.splice(d,1):p.children[d]={type:"text",value:h.value},d;if(h.type==="element"){let v;for(v in Vk)if(Object.hasOwn(Vk,v)&&Object.hasOwn(h.properties,v)){const b=h.properties[v],w=Vk[v];(w===null||w.includes(h.tagName))&&(h.properties[v]=f(String(b||""),v,h))}}if(h.type==="element"){let v=t?!t.includes(h.tagName):a?a.includes(h.tagName):!1;if(!v&&i&&typeof d=="number"&&(v=!i(h,d,p)),v&&p&&typeof d=="number")return l&&h.children?p.children.splice(d,1,...h.children):p.children.splice(d,1),d}}}function wde(e){const n=e.indexOf(":"),t=e.indexOf("?"),i=e.indexOf("#"),r=e.indexOf("/");return n===-1||r!==-1&&n>r||t!==-1&&n>t||i!==-1&&n>i||mde.test(e.slice(0,n))?e:""}function FM(e,n){const t=String(e);if(typeof n!="string")throw new TypeError("Expected character");let i=0,r=t.indexOf(n);for(;r!==-1;)i++,r=t.indexOf(n,r+n.length);return i}function kde(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function _de(e,n,t){const r=g0((t||{}).ignore||[]),a=xde(n);let o=-1;for(;++o0?{type:"text",value:j}:void 0),j===!1?p.lastIndex=E+1:(b!==E&&C.push({type:"text",value:c.value.slice(b,E)}),Array.isArray(j)?C.push(...j):j&&C.push(j),b=E+x[0].length,_=!0),!p.global)break;x=p.exec(c.value)}return _?(b?\]}]+$/.exec(e);if(!n)return[e,void 0];e=e.slice(0,n.index);let t=n[0],i=t.indexOf(")");const r=FM(e,"(");let a=FM(e,")");for(;i!==-1&&r>a;)e+=t.slice(0,i+1),t=t.slice(i+1),i=t.indexOf(")"),a++;return[e,t]}function Iq(e,n){const t=e.input.charCodeAt(e.index-1);return(e.index===0||_u(t)||m0(t))&&(!n||t!==47)}Bq.peek=Wde;function Lde(){this.buffer()}function Ide(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function Bde(){this.buffer()}function Fde(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function qde(e){const n=this.resume(),t=this.stack[this.stack.length-1];t.type,t.identifier=Fa(this.sliceSerialize(e)).toLowerCase(),t.label=n}function Hde(e){this.exit(e)}function Ude(e){const n=this.resume(),t=this.stack[this.stack.length-1];t.type,t.identifier=Fa(this.sliceSerialize(e)).toLowerCase(),t.label=n}function Vde(e){this.exit(e)}function Wde(){return"["}function Bq(e,n,t,i){const r=t.createTracker(i);let a=r.move("[^");const o=t.enter("footnoteReference"),l=t.enter("reference");return a+=r.move(t.safe(t.associationId(e),{after:"]",before:a})),l(),o(),a+=r.move("]"),a}function Gde(){return{enter:{gfmFootnoteCallString:Lde,gfmFootnoteCall:Ide,gfmFootnoteDefinitionLabelString:Bde,gfmFootnoteDefinition:Fde},exit:{gfmFootnoteCallString:qde,gfmFootnoteCall:Hde,gfmFootnoteDefinitionLabelString:Ude,gfmFootnoteDefinition:Vde}}}function Yde(e){let n=!1;return e&&e.firstLineBlank&&(n=!0),{handlers:{footnoteDefinition:t,footnoteReference:Bq},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function t(i,r,a,o){const l=a.createTracker(o);let f=l.move("[^");const c=a.enter("footnoteDefinition"),h=a.enter("label");return f+=l.move(a.safe(a.associationId(i),{before:f,after:"]"})),h(),f+=l.move("]:"),i.children&&i.children.length>0&&(l.shift(4),f+=l.move((n?` +`:" ")+a.indentLines(a.containerFlow(i,l.current()),n?Fq:Kde))),c(),f}}function Kde(e,n,t){return n===0?e:Fq(e,n,t)}function Fq(e,n,t){return(t?"":" ")+e}const Xde=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];qq.peek=nhe;function Zde(){return{canContainEols:["delete"],enter:{strikethrough:Jde},exit:{strikethrough:ehe}}}function Qde(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:Xde}],handlers:{delete:qq}}}function Jde(e){this.enter({type:"delete",children:[]},e)}function ehe(e){this.exit(e)}function qq(e,n,t,i){const r=t.createTracker(i),a=t.enter("strikethrough");let o=r.move("~~");return o+=t.containerPhrasing(e,{...r.current(),before:o,after:"~"}),o+=r.move("~~"),a(),o}function nhe(){return"~"}function the(e){return e.length}function ihe(e,n){const t=n||{},i=(t.align||[]).concat(),r=t.stringLength||the,a=[],o=[],l=[],f=[];let c=0,h=-1;for(;++hc&&(c=e[h].length);++_f[_])&&(f[_]=x)}w.push(C)}o[h]=w,l[h]=k}let d=-1;if(typeof i=="object"&&"length"in i)for(;++df[d]&&(f[d]=C),v[d]=C),p[d]=x}o.splice(1,0,p),l.splice(1,0,v),h=-1;const b=[];for(;++h "),a.shift(2);const o=t.indentLines(t.containerFlow(e,a.current()),ohe);return r(),o}function ohe(e,n,t){return">"+(t?"":" ")+e}function she(e,n){return HM(e,n.inConstruct,!0)&&!HM(e,n.notInConstruct,!1)}function HM(e,n,t){if(typeof n=="string"&&(n=[n]),!n||n.length===0)return t;let i=-1;for(;++io&&(o=a):a=1,r=i+n.length,i=t.indexOf(n,r);return o}function uhe(e,n){return!!(n.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function fhe(e){const n=e.options.fence||"`";if(n!=="`"&&n!=="~")throw new Error("Cannot serialize code with `"+n+"` for `options.fence`, expected `` ` `` or `~`");return n}function che(e,n,t,i){const r=fhe(t),a=e.value||"",o=r==="`"?"GraveAccent":"Tilde";if(uhe(e,t)){const d=t.enter("codeIndented"),p=t.indentLines(a,dhe);return d(),p}const l=t.createTracker(i),f=r.repeat(Math.max(lhe(a,r)+1,3)),c=t.enter("codeFenced");let h=l.move(f);if(e.lang){const d=t.enter(`codeFencedLang${o}`);h+=l.move(t.safe(e.lang,{before:h,after:" ",encode:["`"],...l.current()})),d()}if(e.lang&&e.meta){const d=t.enter(`codeFencedMeta${o}`);h+=l.move(" "),h+=l.move(t.safe(e.meta,{before:h,after:` +`,encode:["`"],...l.current()})),d()}return h+=l.move(` +`),a&&(h+=l.move(a+` +`)),h+=l.move(f),c(),h}function dhe(e,n,t){return(t?"":" ")+e}function C9(e){const n=e.options.quote||'"';if(n!=='"'&&n!=="'")throw new Error("Cannot serialize title with `"+n+"` for `options.quote`, expected `\"`, or `'`");return n}function hhe(e,n,t,i){const r=C9(t),a=r==='"'?"Quote":"Apostrophe",o=t.enter("definition");let l=t.enter("label");const f=t.createTracker(i);let c=f.move("[");return c+=f.move(t.safe(t.associationId(e),{before:c,after:"]",...f.current()})),c+=f.move("]: "),l(),!e.url||/[\0- \u007F]/.test(e.url)?(l=t.enter("destinationLiteral"),c+=f.move("<"),c+=f.move(t.safe(e.url,{before:c,after:">",...f.current()})),c+=f.move(">")):(l=t.enter("destinationRaw"),c+=f.move(t.safe(e.url,{before:c,after:e.title?" ":` +`,...f.current()}))),l(),e.title&&(l=t.enter(`title${a}`),c+=f.move(" "+r),c+=f.move(t.safe(e.title,{before:c,after:r,...f.current()})),c+=f.move(r),l()),o(),c}function mhe(e){const n=e.options.emphasis||"*";if(n!=="*"&&n!=="_")throw new Error("Cannot serialize emphasis with `"+n+"` for `options.emphasis`, expected `*`, or `_`");return n}function nm(e){return"&#x"+e.toString(16).toUpperCase()+";"}function Kg(e,n,t){const i=rc(e),r=rc(n);return i===void 0?r===void 0?t==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:r===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:i===1?r===void 0?{inside:!1,outside:!1}:r===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:r===void 0?{inside:!1,outside:!1}:r===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}Hq.peek=phe;function Hq(e,n,t,i){const r=mhe(t),a=t.enter("emphasis"),o=t.createTracker(i),l=o.move(r);let f=o.move(t.containerPhrasing(e,{after:r,before:l,...o.current()}));const c=f.charCodeAt(0),h=Kg(i.before.charCodeAt(i.before.length-1),c,r);h.inside&&(f=nm(c)+f.slice(1));const d=f.charCodeAt(f.length-1),p=Kg(i.after.charCodeAt(0),d,r);p.inside&&(f=f.slice(0,-1)+nm(d));const v=o.move(r);return a(),t.attentionEncodeSurroundingInfo={after:p.outside,before:h.outside},l+f+v}function phe(e,n,t){return t.options.emphasis||"*"}function vhe(e,n){let t=!1;return x9(e,function(i){if("value"in i&&/\r?\n|\r/.test(i.value)||i.type==="break")return t=!0,KS}),!!((!e.depth||e.depth<3)&&v9(e)&&(n.options.setext||t))}function ghe(e,n,t,i){const r=Math.max(Math.min(6,e.depth||1),1),a=t.createTracker(i);if(vhe(e,t)){const h=t.enter("headingSetext"),d=t.enter("phrasing"),p=t.containerPhrasing(e,{...a.current(),before:` +`,after:` +`});return d(),h(),p+` +`+(r===1?"=":"-").repeat(p.length-(Math.max(p.lastIndexOf("\r"),p.lastIndexOf(` +`))+1))}const o="#".repeat(r),l=t.enter("headingAtx"),f=t.enter("phrasing");a.move(o+" ");let c=t.containerPhrasing(e,{before:"# ",after:` +`,...a.current()});return/^[\t ]/.test(c)&&(c=nm(c.charCodeAt(0))+c.slice(1)),c=c?o+" "+c:o,t.options.closeAtx&&(c+=" "+o),f(),l(),c}Uq.peek=yhe;function Uq(e){return e.value||""}function yhe(){return"<"}Vq.peek=bhe;function Vq(e,n,t,i){const r=C9(t),a=r==='"'?"Quote":"Apostrophe",o=t.enter("image");let l=t.enter("label");const f=t.createTracker(i);let c=f.move("![");return c+=f.move(t.safe(e.alt,{before:c,after:"]",...f.current()})),c+=f.move("]("),l(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(l=t.enter("destinationLiteral"),c+=f.move("<"),c+=f.move(t.safe(e.url,{before:c,after:">",...f.current()})),c+=f.move(">")):(l=t.enter("destinationRaw"),c+=f.move(t.safe(e.url,{before:c,after:e.title?" ":")",...f.current()}))),l(),e.title&&(l=t.enter(`title${a}`),c+=f.move(" "+r),c+=f.move(t.safe(e.title,{before:c,after:r,...f.current()})),c+=f.move(r),l()),c+=f.move(")"),o(),c}function bhe(){return"!"}Wq.peek=whe;function Wq(e,n,t,i){const r=e.referenceType,a=t.enter("imageReference");let o=t.enter("label");const l=t.createTracker(i);let f=l.move("![");const c=t.safe(e.alt,{before:f,after:"]",...l.current()});f+=l.move(c+"]["),o();const h=t.stack;t.stack=[],o=t.enter("reference");const d=t.safe(t.associationId(e),{before:f,after:"]",...l.current()});return o(),t.stack=h,a(),r==="full"||!c||c!==d?f+=l.move(d+"]"):r==="shortcut"?f=f.slice(0,-1):f+=l.move("]"),f}function whe(){return"!"}Gq.peek=khe;function Gq(e,n,t){let i=e.value||"",r="`",a=-1;for(;new RegExp("(^|[^`])"+r+"([^`]|$)").test(i);)r+="`";for(/[^ \r\n]/.test(i)&&(/^[ \r\n]/.test(i)&&/[ \r\n]$/.test(i)||/^`|`$/.test(i))&&(i=" "+i+" ");++a\u007F]/.test(e.url))}Kq.peek=_he;function Kq(e,n,t,i){const r=C9(t),a=r==='"'?"Quote":"Apostrophe",o=t.createTracker(i);let l,f;if(Yq(e,t)){const h=t.stack;t.stack=[],l=t.enter("autolink");let d=o.move("<");return d+=o.move(t.containerPhrasing(e,{before:d,after:">",...o.current()})),d+=o.move(">"),l(),t.stack=h,d}l=t.enter("link"),f=t.enter("label");let c=o.move("[");return c+=o.move(t.containerPhrasing(e,{before:c,after:"](",...o.current()})),c+=o.move("]("),f(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(f=t.enter("destinationLiteral"),c+=o.move("<"),c+=o.move(t.safe(e.url,{before:c,after:">",...o.current()})),c+=o.move(">")):(f=t.enter("destinationRaw"),c+=o.move(t.safe(e.url,{before:c,after:e.title?" ":")",...o.current()}))),f(),e.title&&(f=t.enter(`title${a}`),c+=o.move(" "+r),c+=o.move(t.safe(e.title,{before:c,after:r,...o.current()})),c+=o.move(r),f()),c+=o.move(")"),l(),c}function _he(e,n,t){return Yq(e,t)?"<":"["}Xq.peek=xhe;function Xq(e,n,t,i){const r=e.referenceType,a=t.enter("linkReference");let o=t.enter("label");const l=t.createTracker(i);let f=l.move("[");const c=t.containerPhrasing(e,{before:f,after:"]",...l.current()});f+=l.move(c+"]["),o();const h=t.stack;t.stack=[],o=t.enter("reference");const d=t.safe(t.associationId(e),{before:f,after:"]",...l.current()});return o(),t.stack=h,a(),r==="full"||!c||c!==d?f+=l.move(d+"]"):r==="shortcut"?f=f.slice(0,-1):f+=l.move("]"),f}function xhe(){return"["}function A9(e){const n=e.options.bullet||"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bullet`, expected `*`, `+`, or `-`");return n}function She(e){const n=A9(e),t=e.options.bulletOther;if(!t)return n==="*"?"-":"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(t===n)throw new Error("Expected `bullet` (`"+n+"`) and `bulletOther` (`"+t+"`) to be different");return t}function Che(e){const n=e.options.bulletOrdered||".";if(n!=="."&&n!==")")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOrdered`, expected `.` or `)`");return n}function Zq(e){const n=e.options.rule||"*";if(n!=="*"&&n!=="-"&&n!=="_")throw new Error("Cannot serialize rules with `"+n+"` for `options.rule`, expected `*`, `-`, or `_`");return n}function Ahe(e,n,t,i){const r=t.enter("list"),a=t.bulletCurrent;let o=e.ordered?Che(t):A9(t);const l=e.ordered?o==="."?")":".":She(t);let f=n&&t.bulletLastUsed?o===t.bulletLastUsed:!1;if(!e.ordered){const h=e.children?e.children[0]:void 0;if((o==="*"||o==="-")&&h&&(!h.children||!h.children[0])&&t.stack[t.stack.length-1]==="list"&&t.stack[t.stack.length-2]==="listItem"&&t.stack[t.stack.length-3]==="list"&&t.stack[t.stack.length-4]==="listItem"&&t.indexStack[t.indexStack.length-1]===0&&t.indexStack[t.indexStack.length-2]===0&&t.indexStack[t.indexStack.length-3]===0&&(f=!0),Zq(t)===o&&h){let d=-1;for(;++d-1?n.start:1)+(t.options.incrementListMarker===!1?0:n.children.indexOf(e))+a);let o=a.length+1;(r==="tab"||r==="mixed"&&(n&&n.type==="list"&&n.spread||e.spread))&&(o=Math.ceil(o/4)*4);const l=t.createTracker(i);l.move(a+" ".repeat(o-a.length)),l.shift(o);const f=t.enter("listItem"),c=t.indentLines(t.containerFlow(e,l.current()),h);return f(),c;function h(d,p,v){return p?(v?"":" ".repeat(o))+d:(v?a:a+" ".repeat(o-a.length))+d}}function Ehe(e,n,t,i){const r=t.enter("paragraph"),a=t.enter("phrasing"),o=t.containerPhrasing(e,i);return a(),r(),o}const The=g0(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function Mhe(e,n,t,i){return(e.children.some(function(o){return The(o)})?t.containerPhrasing:t.containerFlow).call(t,e,i)}function Dhe(e){const n=e.options.strong||"*";if(n!=="*"&&n!=="_")throw new Error("Cannot serialize strong with `"+n+"` for `options.strong`, expected `*`, or `_`");return n}Qq.peek=Rhe;function Qq(e,n,t,i){const r=Dhe(t),a=t.enter("strong"),o=t.createTracker(i),l=o.move(r+r);let f=o.move(t.containerPhrasing(e,{after:r,before:l,...o.current()}));const c=f.charCodeAt(0),h=Kg(i.before.charCodeAt(i.before.length-1),c,r);h.inside&&(f=nm(c)+f.slice(1));const d=f.charCodeAt(f.length-1),p=Kg(i.after.charCodeAt(0),d,r);p.inside&&(f=f.slice(0,-1)+nm(d));const v=o.move(r+r);return a(),t.attentionEncodeSurroundingInfo={after:p.outside,before:h.outside},l+f+v}function Rhe(e,n,t){return t.options.strong||"*"}function Phe(e,n,t,i){return t.safe(e.value,i)}function Nhe(e){const n=e.options.ruleRepetition||3;if(n<3)throw new Error("Cannot serialize rules with repetition `"+n+"` for `options.ruleRepetition`, expected `3` or more");return n}function $he(e,n,t){const i=(Zq(t)+(t.options.ruleSpaces?" ":"")).repeat(Nhe(t));return t.options.ruleSpaces?i.slice(0,-1):i}const Jq={blockquote:ahe,break:UM,code:che,definition:hhe,emphasis:Hq,hardBreak:UM,heading:ghe,html:Uq,image:Vq,imageReference:Wq,inlineCode:Gq,link:Kq,linkReference:Xq,list:Ahe,listItem:jhe,paragraph:Ehe,root:Mhe,strong:Qq,text:Phe,thematicBreak:$he};function zhe(){return{enter:{table:Lhe,tableData:VM,tableHeader:VM,tableRow:Bhe},exit:{codeText:Fhe,table:Ihe,tableData:a_,tableHeader:a_,tableRow:a_}}}function Lhe(e){const n=e._align;this.enter({type:"table",align:n.map(function(t){return t==="none"?null:t}),children:[]},e),this.data.inTable=!0}function Ihe(e){this.exit(e),this.data.inTable=void 0}function Bhe(e){this.enter({type:"tableRow",children:[]},e)}function a_(e){this.exit(e)}function VM(e){this.enter({type:"tableCell",children:[]},e)}function Fhe(e){let n=this.resume();this.data.inTable&&(n=n.replace(/\\([\\|])/g,qhe));const t=this.stack[this.stack.length-1];t.type,t.value=n,this.exit(e)}function qhe(e,n){return n==="|"?n:e}function Hhe(e){const n=e||{},t=n.tableCellPadding,i=n.tablePipeAlign,r=n.stringLength,a=t?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:` +`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:p,table:o,tableCell:f,tableRow:l}};function o(v,b,w,k){return c(h(v,w,k),v.align)}function l(v,b,w,k){const _=d(v,w,k),C=c([_]);return C.slice(0,C.indexOf(` +`))}function f(v,b,w,k){const _=w.enter("tableCell"),C=w.enter("phrasing"),x=w.containerPhrasing(v,{...k,before:a,after:a});return C(),_(),x}function c(v,b){return ihe(v,{align:b,alignDelimiters:i,padding:t,stringLength:r})}function h(v,b,w){const k=v.children;let _=-1;const C=[],x=b.enter("table");for(;++_0&&!t&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),t}const sme={tokenize:pme,partial:!0};function lme(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:dme,continuation:{tokenize:hme},exit:mme}},text:{91:{name:"gfmFootnoteCall",tokenize:cme},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:ume,resolveTo:fme}}}}function ume(e,n,t){const i=this;let r=i.events.length;const a=i.parser.gfmFootnotes||(i.parser.gfmFootnotes=[]);let o;for(;r--;){const f=i.events[r][1];if(f.type==="labelImage"){o=f;break}if(f.type==="gfmFootnoteCall"||f.type==="labelLink"||f.type==="label"||f.type==="image"||f.type==="link")break}return l;function l(f){if(!o||!o._balanced)return t(f);const c=Fa(i.sliceSerialize({start:o.end,end:i.now()}));return c.codePointAt(0)!==94||!a.includes(c.slice(1))?t(f):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(f),e.exit("gfmFootnoteCallLabelMarker"),n(f))}}function fme(e,n){let t=e.length;for(;t--;)if(e[t][1].type==="labelImage"&&e[t][0]==="enter"){e[t][1];break}e[t+1][1].type="data",e[t+3][1].type="gfmFootnoteCallLabelMarker";const i={type:"gfmFootnoteCall",start:Object.assign({},e[t+3][1].start),end:Object.assign({},e[e.length-1][1].end)},r={type:"gfmFootnoteCallMarker",start:Object.assign({},e[t+3][1].end),end:Object.assign({},e[t+3][1].end)};r.end.column++,r.end.offset++,r.end._bufferIndex++;const a={type:"gfmFootnoteCallString",start:Object.assign({},r.end),end:Object.assign({},e[e.length-1][1].start)},o={type:"chunkString",contentType:"string",start:Object.assign({},a.start),end:Object.assign({},a.end)},l=[e[t+1],e[t+2],["enter",i,n],e[t+3],e[t+4],["enter",r,n],["exit",r,n],["enter",a,n],["enter",o,n],["exit",o,n],["exit",a,n],e[e.length-2],e[e.length-1],["exit",i,n]];return e.splice(t,e.length-t+1,...l),e}function cme(e,n,t){const i=this,r=i.parser.gfmFootnotes||(i.parser.gfmFootnotes=[]);let a=0,o;return l;function l(d){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),f}function f(d){return d!==94?t(d):(e.enter("gfmFootnoteCallMarker"),e.consume(d),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",c)}function c(d){if(a>999||d===93&&!o||d===null||d===91||Rt(d))return t(d);if(d===93){e.exit("chunkString");const p=e.exit("gfmFootnoteCallString");return r.includes(Fa(i.sliceSerialize(p)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),n):t(d)}return Rt(d)||(o=!0),a++,e.consume(d),d===92?h:c}function h(d){return d===91||d===92||d===93?(e.consume(d),a++,c):c(d)}}function dme(e,n,t){const i=this,r=i.parser.gfmFootnotes||(i.parser.gfmFootnotes=[]);let a,o=0,l;return f;function f(b){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(b),e.exit("gfmFootnoteDefinitionLabelMarker"),c}function c(b){return b===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(b),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",h):t(b)}function h(b){if(o>999||b===93&&!l||b===null||b===91||Rt(b))return t(b);if(b===93){e.exit("chunkString");const w=e.exit("gfmFootnoteDefinitionLabelString");return a=Fa(i.sliceSerialize(w)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(b),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),p}return Rt(b)||(l=!0),o++,e.consume(b),b===92?d:h}function d(b){return b===91||b===92||b===93?(e.consume(b),o++,h):h(b)}function p(b){return b===58?(e.enter("definitionMarker"),e.consume(b),e.exit("definitionMarker"),r.includes(a)||r.push(a),at(e,v,"gfmFootnoteDefinitionWhitespace")):t(b)}function v(b){return n(b)}}function hme(e,n,t){return e.check(lp,n,e.attempt(sme,n,t))}function mme(e){e.exit("gfmFootnoteDefinition")}function pme(e,n,t){const i=this;return at(e,r,"gfmFootnoteDefinitionIndent",5);function r(a){const o=i.events[i.events.length-1];return o&&o[1].type==="gfmFootnoteDefinitionIndent"&&o[2].sliceSerialize(o[1],!0).length===4?n(a):t(a)}}function vme(e){let t=(e||{}).singleTilde;const i={name:"strikethrough",tokenize:a,resolveAll:r};return t==null&&(t=!0),{text:{126:i},insideSpan:{null:[i]},attentionMarkers:{null:[126]}};function r(o,l){let f=-1;for(;++f1?f(b):(o.consume(b),d++,v);if(d<2&&!t)return f(b);const k=o.exit("strikethroughSequenceTemporary"),_=rc(b);return k._open=!_||_===2&&!!w,k._close=!w||w===2&&!!_,l(b)}}}class gme{constructor(){this.map=[]}add(n,t,i){yme(this,n,t,i)}consume(n){if(this.map.sort(function(a,o){return a[0]-o[0]}),this.map.length===0)return;let t=this.map.length;const i=[];for(;t>0;)t-=1,i.push(n.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),n.length=this.map[t][0];i.push(n.slice()),n.length=0;let r=i.pop();for(;r;){for(const a of r)n.push(a);r=i.pop()}this.map.length=0}}function yme(e,n,t,i){let r=0;if(!(t===0&&i.length===0)){for(;r-1;){const U=i.events[L][1].type;if(U==="lineEnding"||U==="linePrefix")L--;else break}const B=L>-1?i.events[L][1].type:null,G=B==="tableHead"||B==="tableRow"?j:f;return G===j&&i.parser.lazy[i.now().line]?t(R):G(R)}function f(R){return e.enter("tableHead"),e.enter("tableRow"),c(R)}function c(R){return R===124||(o=!0,a+=1),h(R)}function h(R){return R===null?t(R):wn(R)?a>1?(a=0,i.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(R),e.exit("lineEnding"),v):t(R):Zn(R)?at(e,h,"whitespace")(R):(a+=1,o&&(o=!1,r+=1),R===124?(e.enter("tableCellDivider"),e.consume(R),e.exit("tableCellDivider"),o=!0,h):(e.enter("data"),d(R)))}function d(R){return R===null||R===124||Rt(R)?(e.exit("data"),h(R)):(e.consume(R),R===92?p:d)}function p(R){return R===92||R===124?(e.consume(R),d):d(R)}function v(R){return i.interrupt=!1,i.parser.lazy[i.now().line]?t(R):(e.enter("tableDelimiterRow"),o=!1,Zn(R)?at(e,b,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(R):b(R))}function b(R){return R===45||R===58?k(R):R===124?(o=!0,e.enter("tableCellDivider"),e.consume(R),e.exit("tableCellDivider"),w):O(R)}function w(R){return Zn(R)?at(e,k,"whitespace")(R):k(R)}function k(R){return R===58?(a+=1,o=!0,e.enter("tableDelimiterMarker"),e.consume(R),e.exit("tableDelimiterMarker"),_):R===45?(a+=1,_(R)):R===null||wn(R)?E(R):O(R)}function _(R){return R===45?(e.enter("tableDelimiterFiller"),C(R)):O(R)}function C(R){return R===45?(e.consume(R),C):R===58?(o=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(R),e.exit("tableDelimiterMarker"),x):(e.exit("tableDelimiterFiller"),x(R))}function x(R){return Zn(R)?at(e,E,"whitespace")(R):E(R)}function E(R){return R===124?b(R):R===null||wn(R)?!o||r!==a?O(R):(e.exit("tableDelimiterRow"),e.exit("tableHead"),n(R)):O(R)}function O(R){return t(R)}function j(R){return e.enter("tableRow"),M(R)}function M(R){return R===124?(e.enter("tableCellDivider"),e.consume(R),e.exit("tableCellDivider"),M):R===null||wn(R)?(e.exit("tableRow"),n(R)):Zn(R)?at(e,M,"whitespace")(R):(e.enter("data"),P(R))}function P(R){return R===null||R===124||Rt(R)?(e.exit("data"),M(R)):(e.consume(R),R===92?F:P)}function F(R){return R===92||R===124?(e.consume(R),P):P(R)}}function _me(e,n){let t=-1,i=!0,r=0,a=[0,0,0,0],o=[0,0,0,0],l=!1,f=0,c,h,d;const p=new gme;for(;++tt[2]+1){const b=t[2]+1,w=t[3]-t[2]-1;e.add(b,w,[])}}e.add(t[3]+1,0,[["exit",d,n]])}return r!==void 0&&(a.end=Object.assign({},$f(n.events,r)),e.add(r,0,[["exit",a,n]]),a=void 0),a}function GM(e,n,t,i,r){const a=[],o=$f(n.events,t);r&&(r.end=Object.assign({},o),a.push(["exit",r,n])),i.end=Object.assign({},o),a.push(["exit",i,n]),e.add(t+1,0,a)}function $f(e,n){const t=e[n],i=t[0]==="enter"?"start":"end";return t[1][i]}const xme={name:"tasklistCheck",tokenize:Cme};function Sme(){return{text:{91:xme}}}function Cme(e,n,t){const i=this;return r;function r(f){return i.previous!==null||!i._gfmTasklistFirstContentOfListItem?t(f):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(f),e.exit("taskListCheckMarker"),a)}function a(f){return Rt(f)?(e.enter("taskListCheckValueUnchecked"),e.consume(f),e.exit("taskListCheckValueUnchecked"),o):f===88||f===120?(e.enter("taskListCheckValueChecked"),e.consume(f),e.exit("taskListCheckValueChecked"),o):t(f)}function o(f){return f===93?(e.enter("taskListCheckMarker"),e.consume(f),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),l):t(f)}function l(f){return wn(f)?n(f):Zn(f)?e.check({tokenize:Ame},n,t)(f):t(f)}}function Ame(e,n,t){return at(e,i,"whitespace");function i(r){return r===null?t(r):n(r)}}function Ome(e){return yq([Qhe(),lme(),vme(e),wme(),Sme()])}const jme={};function Eme(e){const n=this,t=e||jme,i=n.data(),r=i.micromarkExtensions||(i.micromarkExtensions=[]),a=i.fromMarkdownExtensions||(i.fromMarkdownExtensions=[]),o=i.toMarkdownExtensions||(i.toMarkdownExtensions=[]);r.push(Ome(t)),a.push(Yhe()),o.push(Khe(t))}const e4="kanban_chat_v1";function Tme(){try{const e=localStorage.getItem(e4);if(!e)return[];const n=JSON.parse(e);if(Array.isArray(n))return n}catch{}return[]}function Mme({onBoardChange:e}){const[n,t]=A.useState(()=>Tme()),[i,r]=A.useState(""),[a,o]=A.useState(!1),[l,f]=A.useState(""),[c,h]=A.useState([]),d=A.useRef(null);A.useEffect(()=>{localStorage.setItem(e4,JSON.stringify(n))},[n]),A.useEffect(()=>{var w;(w=d.current)==null||w.scrollTo({top:d.current.scrollHeight,behavior:"smooth"})},[n,l,c,a]);const p=async()=>{const w=i.trim();if(!w||a)return;const k={role:"user",content:w,ts:Date.now()},_=[...n,k];t(_),r(""),o(!0),f(""),h([]);let C="";const x=[];let E=!1;const O=j=>{switch(j.type){case"delta":C+=j.text,f(C);break;case"tool_use":{const M={tool:j.tool,ok:!0,input:j.input};x.push(M),h([...x]);break}case"tool_result":{for(let M=x.length-1;M>=0;M--){const P=x[M];if(P.error===void 0&&P.ok){j.is_error&&(P.ok=!1,P.error=j.result||"tool error");break}}h([...x]);break}case"result":j.text&&C.trim()===""&&(C=j.text,f(C));break;case"done":j.board_changed&&(E=!0);break;case"error":C=`Error: ${j.error}`,f(C);break}};try{const j=_.map(M=>({role:M.role,content:M.content}));await zie(j,O)}catch(j){const M=j.message;Ln.show({color:"red",message:M}),C=C||`Error: ${M}`}finally{const j={role:"assistant",content:C,ts:Date.now(),tool_calls:x.length>0?x:void 0};t(M=>[...M,j]),f(""),h([]),o(!1),E&&e()}},v=w=>{w.key==="Enter"&&!w.shiftKey&&(w.preventDefault(),p())},b=()=>{t([]),localStorage.removeItem(e4)};return y.jsxs(Wn,{gap:0,h:"100%",children:[y.jsxs(Ke,{justify:"space-between",p:"xs",style:{borderBottom:"1px solid var(--mantine-color-dark-4)"},children:[y.jsxs(Ke,{gap:6,children:[y.jsx(QF,{size:18}),y.jsx(Te,{fw:600,size:"sm",children:"Asistente"})]}),y.jsx(pi,{label:"Limpiar conversacion",withArrow:!0,children:y.jsx(Et,{variant:"subtle",color:"gray",size:"sm",onClick:b,disabled:n.length===0,children:y.jsx(ku,{size:14})})})]}),y.jsx(_a,{viewportRef:d,style:{flex:1},type:"auto",p:"xs",children:y.jsxs(Wn,{gap:"xs",children:[n.length===0&&!a&&y.jsxs(Te,{size:"sm",c:"dimmed",ta:"center",mt:"md",children:["Escribe algo. Ejemplos:",y.jsx("br",{}),'- "crea columna Backlog"',y.jsx("br",{}),'- "anade tarjeta para revisar PR de Lucas en Doing"',y.jsx("br",{}),'- "que hay en Doing?"']}),n.map((w,k)=>y.jsx(YM,{msg:w},k)),a&&y.jsx(YM,{msg:{role:"assistant",content:l,ts:Date.now(),tool_calls:c.length>0?c:void 0},streaming:!0}),a&&l===""&&c.length===0&&y.jsxs(Ke,{gap:6,pl:"xs",children:[y.jsx(Mi,{size:"xs"}),y.jsx(Te,{size:"xs",c:"dimmed",children:"Pensando..."})]})]})}),y.jsx(Wn,{gap:4,p:"xs",style:{borderTop:"1px solid var(--mantine-color-dark-4)"},children:y.jsxs(Ke,{align:"flex-end",gap:4,wrap:"nowrap",children:[y.jsx(Qf,{placeholder:"Pide algo... (Enter envia, Shift+Enter newline)",value:i,onChange:w=>r(w.currentTarget.value),onKeyDown:v,disabled:a,autosize:!0,minRows:1,maxRows:6,style:{flex:1}}),y.jsx(Et,{size:"lg",variant:"filled",onClick:p,disabled:!i.trim()||a,"aria-label":"Send",children:a?y.jsx(Mi,{size:"xs",color:"white"}):y.jsx(eq,{size:16})})]})})]})}function YM({msg:e,streaming:n=!1}){const t=e.role==="user";return y.jsx(Lt,{p:"xs",radius:"md",withBorder:!0,bg:t?"blue.9":"dark.6",style:{alignSelf:t?"flex-end":"flex-start",maxWidth:"92%"},children:y.jsxs(Wn,{gap:4,children:[e.content&&y.jsx(ge,{className:"kanban-md",style:{fontSize:13,lineHeight:1.45,color:"var(--mantine-color-text)"},children:y.jsx(vde,{remarkPlugins:[Eme],children:e.content})}),n&&e.content&&y.jsx(ge,{style:{display:"inline-block",width:8,height:14,background:"currentColor",opacity:.6}}),e.tool_calls&&e.tool_calls.length>0&&y.jsx(Ke,{gap:4,wrap:"wrap",children:e.tool_calls.map((i,r)=>y.jsxs(ct,{size:"xs",color:i.ok?"teal":"red",variant:"light",title:i.error||"",leftSection:i.ok&&n?y.jsx(Mi,{size:8,color:"teal"}):null,children:[i.tool,!i.ok&&i.error?`: ${i.error}`:""]},r))})]})})}const Dme=["Lun","Mar","Mie","Jue","Vie","Sab","Dom"];function Rme({users:e,cards:n,onJumpToCard:t,onOpenDailyReport:i}){const[r,a]=A.useState(null),[o,l]=A.useState(new Date),[f,c]=A.useState(null),[h,d]=A.useState(null),[p,v]=A.useState(!1);A.useEffect(()=>{let x=!1;v(!0);const E=Ie(o).startOf("month").format("YYYY-MM-DD"),O=Ie(o).endOf("month").format("YYYY-MM-DD");return qB({from:E,to:O,assignee_id:f||void 0}).then(j=>{x||d(j)}).finally(()=>{x||v(!1)}),()=>{x=!0}},[o,f]);const b=A.useMemo(()=>e.map(x=>({value:x.id,label:x.display_name||x.username})),[e]),w=A.useMemo(()=>{const x=new Map;if(!h)return x;for(const E of h.created_daily){const O=x.get(E.date)??{created:0,done:0,deadlines:[]};O.created=E.count,x.set(E.date,O)}for(const E of h.throughput_daily){const O=x.get(E.date)??{created:0,done:0,deadlines:[]};O.done=E.count,x.set(E.date,O)}for(const E of n){if(!E.deadline||E.deleted_at)continue;const O=E.deadline.slice(0,10),j=x.get(O)??{created:0,done:0,deadlines:[]};j.deadlines.push(E),x.set(O,j)}return x},[h,n]),k=A.useMemo(()=>{const x=Ie(o).startOf("month"),E=Ie(o).endOf("month"),O=(x.day()+6)%7,j=[];for(let M=0;MArray.from(w.values()).reduce((x,E)=>x+E.created,0),[w]),C=A.useMemo(()=>Array.from(w.values()).reduce((x,E)=>x+E.done,0),[w]);return y.jsx(ge,{p:"md",children:y.jsxs(Wn,{gap:"md",children:[y.jsxs(Ke,{justify:"space-between",children:[y.jsx(gl,{order:3,children:"Calendario"}),y.jsxs(Ke,{gap:"xs",wrap:"nowrap",children:[y.jsx(a9,{label:"Mes",size:"xs",value:o,onChange:x=>x&&l(typeof x=="string"?new Date(x):x),style:{minWidth:160},clearable:!1}),y.jsx(mo,{label:"Asignado",size:"xs",placeholder:"Todos",value:f,onChange:c,data:b,clearable:!0,searchable:!0,style:{minWidth:180}})]})]}),y.jsxs(Ke,{gap:"md",children:[y.jsx(Lt,{withBorder:!0,p:"sm",radius:"md",children:y.jsxs(Ke,{gap:6,children:[y.jsx(tc,{size:14,color:"var(--mantine-color-blue-5)"}),y.jsx(Te,{size:"sm",fw:600,children:_}),y.jsx(Te,{size:"xs",c:"dimmed",children:"creadas"})]})}),y.jsx(Lt,{withBorder:!0,p:"sm",radius:"md",children:y.jsxs(Ke,{gap:6,children:[y.jsx(Jh,{size:14,color:"var(--mantine-color-green-5)"}),y.jsx(Te,{size:"sm",fw:600,children:C}),y.jsx(Te,{size:"xs",c:"dimmed",children:"hechas"})]})})]}),p&&!h?y.jsx(zc,{p:"xl",children:y.jsx(Mi,{})}):y.jsxs(Lt,{withBorder:!0,p:"md",radius:"md",children:[y.jsx(Uo,{cols:7,spacing:4,mb:4,children:Dme.map(x=>y.jsx(Te,{size:"xs",c:"dimmed",ta:"center",fw:600,children:x},x))}),y.jsx(Uo,{cols:7,spacing:4,children:k.map((x,E)=>{if(!x.date)return y.jsx(ge,{style:{minHeight:72}},E);const O=w.get(x.date)??{created:0,done:0,deadlines:[]},j=parseInt(x.date.slice(8,10),10),M=x.date===Ie().format("YYYY-MM-DD"),P=Ie().startOf("day").valueOf(),R=Ie(x.date).startOf("day").valueOf()0?"rgba(81, 207, 102, 0.08)":O.created>0?"rgba(34, 139, 230, 0.06)":void 0},children:y.jsxs(Wn,{gap:2,children:[y.jsx(Tt,{onClick:()=>x.date&&(i==null?void 0:i(x.date)),title:"Ver reporte diario",style:{alignSelf:"flex-start"},"data-test":`calendar-day-${x.date}`,children:y.jsx(Te,{size:"xs",fw:M?700:500,c:M?"blue":void 0,td:i?"underline":void 0,style:{cursor:i?"pointer":"default"},children:j})}),O.created>0&&y.jsxs(Ke,{gap:3,wrap:"nowrap",children:[y.jsx(tc,{size:10,color:"var(--mantine-color-blue-5)"}),y.jsx(Te,{size:"xs",c:"blue",children:O.created})]}),O.done>0&&y.jsxs(Ke,{gap:3,wrap:"nowrap",children:[y.jsx(Jh,{size:10,color:"var(--mantine-color-green-5)"}),y.jsx(Te,{size:"xs",c:"green",children:O.done})]}),O.deadlines.length>0&&y.jsxs(En,{opened:r===x.date,onChange:L=>a(L?x.date:null),position:"bottom",withArrow:!0,shadow:"md",width:280,children:[y.jsx(En.Target,{children:y.jsx(Tt,{onClick:()=>a(r===x.date?null:x.date),style:{textAlign:"left"},children:y.jsx(Wn,{gap:1,children:y.jsxs(Ke,{gap:3,wrap:"nowrap",children:[y.jsx(Vg,{size:10,color:R?"var(--mantine-color-red-5)":"var(--mantine-color-orange-5)"}),y.jsxs(Te,{size:"xs",c:R?"red":"orange",fw:700,td:"underline",children:[O.deadlines.length," deadline",O.deadlines.length===1?"":"s"]})]})})})}),y.jsx(En.Dropdown,{p:6,children:y.jsxs(Wn,{gap:2,children:[y.jsxs(Te,{size:"xs",c:"dimmed",fw:600,mb:2,children:["Vencen el ",Ie(x.date).format("DD/MM/YYYY")]}),O.deadlines.map(L=>y.jsx(Tt,{onClick:()=>{a(null),t==null||t(L.id)},style:{padding:"4px 6px",borderRadius:4,background:"var(--mantine-color-dark-6)"},children:y.jsxs(Ke,{gap:6,wrap:"nowrap",children:[y.jsxs(Te,{size:"xs",c:"dimmed",ff:"monospace",children:["#",String(L.seq_num).padStart(5,"0")]}),y.jsx(Te,{size:"xs",lineClamp:1,title:L.title,children:L.title})]})},L.id))]})})]})]})},E)})})]})]})})}function lH(e){return e?e.reduce((n,t)=>{const i=t.name.search(/\./);if(i>=0){const r=t.name.substring(i+1);return n[r]=t.label,n}return n[t.name]=t.label,n},{}):{}}var Pme={tooltip:"m_e4d36c9b",tooltipLabel:"m_7f4bcb19",tooltipBody:"m_3de554dd",tooltipItemColor:"m_b30369b5",tooltipItem:"m_3de8964e",tooltipItemBody:"m_50186d10",tooltipItemName:"m_501dadf9",tooltipItemData:"m_50192318"};function Nme(e){return e.map(n=>{if(!n.payload||n.payload[n.name])return n;const t=n.name.search(/\./);if(t>=0){const i=n.name.substring(0,t),r={...n.payload[i]},a=Object.entries(n.payload).reduce((o,l)=>{const[f,c]=l;return f===i?o:{...o,[f]:c}},{});return{...n,name:n.name.substring(t+1),payload:{...a,...r}}}return n})}function $me(e,n){const t=Nme(e.filter(i=>i.fill!=="none"||!i.color));return n?t.filter(i=>i.name===n):t}function KM(e,n){return n==="radial"||n==="scatter"?Array.isArray(e.value)?e.value[1]-e.value[0]:e.value:Array.isArray(e.payload[e.dataKey])?e.payload[e.dataKey][1]-e.payload[e.dataKey][0]:e.payload[e.name]}const zme={type:"area",showColor:!0},j9=Re(e=>{var R,L;const n=be("ChartTooltip",zme,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,payload:f,label:c,unit:h,type:d,segmentId:p,mod:v,series:b,valueFormatter:w,showColor:k,attributes:_,...C}=n,x=li(),E=Ze({name:"ChartTooltip",classes:Pme,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:_});if(!f)return null;const O=$me(f,p),j=d==="scatter"?(L=(R=f[0])==null?void 0:R.payload)==null?void 0:L.name:null,M=lH(b),P=c||j,F=O.map(B=>y.jsxs("div",{"data-type":d,...E("tooltipItem"),children:[y.jsxs("div",{...E("tooltipItemBody"),children:[k&&y.jsx("svg",{...E("tooltipItemColor"),children:y.jsx("circle",{r:6,fill:st(B.color,x),width:12,height:12,cx:6,cy:6})}),y.jsx("div",{...E("tooltipItemName"),children:M[B.name]||B.name})]}),y.jsxs("div",{...E("tooltipItemData"),children:[typeof w=="function"?w(KM(B,d)):KM(B,d),h||B.unit]})]},(B==null?void 0:B.key)??B.name));return y.jsxs(ge,{...E("tooltip"),mod:[{type:d},v],...C,children:[P&&y.jsx("div",{...E("tooltipLabel"),children:P}),y.jsx("div",{...E("tooltipBody"),children:F})]})});j9.displayName="@mantine/charts/ChartTooltip";var uH={legend:"m_847eaf",legendItem:"m_17da7e62",legendItemColor:"m_6e236e21",legendItemName:"m_8ff56c0d"};function Lme(e){return e.map(n=>{var i;const t=(i=n.dataKey)==null?void 0:i.split(".").pop();return{...n,dataKey:t,payload:{...n.payload,name:t,dataKey:t}}})}function Ime(e){return Lme(e.filter(n=>n.color!=="none"))}const b0=Re(e=>{const n=be("ChartLegend",null,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,payload:f,onHighlight:c,legendPosition:h,mod:d,series:p,showColor:v,centered:b,attributes:w,...k}=n,_=Ze({name:"ChartLegend",classes:uH,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:w,rootSelector:"legend"});if(!f)return null;const C=Ime(f),x=lH(p),E=C.map((O,j)=>y.jsxs("div",{..._("legendItem"),onMouseEnter:()=>c(O.dataKey),onMouseLeave:()=>c(null),"data-without-color":v===!1||void 0,children:[y.jsx(Lc,{color:O.color,size:12,..._("legendItemColor"),withShadow:!1}),y.jsx("p",{..._("legendItemName"),children:x[O.dataKey]||O.dataKey})]},j));return y.jsx(ge,{mod:[{position:h,centered:b},d],..._("legend"),...k,children:E})});b0.displayName="@mantine/charts/ChartLegend";b0.classes=uH;function Bme({x:e,y:n,value:t,valueFormatter:i}){return y.jsx("g",{transform:`translate(${e},${n})`,children:y.jsx("text",{x:0,y:0,dy:-8,dx:-10,textAnchor:"start",fill:"var(--chart-text-color, var(--mantine-color-dimmed))",fontSize:8,children:i?i(t):t})})}var w0={root:"m_a50f3e58",container:"m_af9188cb",grid:"m_a50a48bc",axis:"m_a507a517",axisLabel:"m_2293801d",tooltip:"m_92b296cd"},o_,XM;function Cr(){if(XM)return o_;XM=1;var e=Array.isArray;return o_=e,o_}var s_,ZM;function fH(){if(ZM)return s_;ZM=1;var e=typeof Ev=="object"&&Ev&&Ev.Object===Object&&Ev;return s_=e,s_}var l_,QM;function xo(){if(QM)return l_;QM=1;var e=fH(),n=typeof self=="object"&&self&&self.Object===Object&&self,t=e||n||Function("return this")();return l_=t,l_}var u_,JM;function fp(){if(JM)return u_;JM=1;var e=xo(),n=e.Symbol;return u_=n,u_}var f_,e8;function Fme(){if(e8)return f_;e8=1;var e=fp(),n=Object.prototype,t=n.hasOwnProperty,i=n.toString,r=e?e.toStringTag:void 0;function a(o){var l=t.call(o,r),f=o[r];try{o[r]=void 0;var c=!0}catch{}var h=i.call(o);return c&&(l?o[r]=f:delete o[r]),h}return f_=a,f_}var c_,n8;function qme(){if(n8)return c_;n8=1;var e=Object.prototype,n=e.toString;function t(i){return n.call(i)}return c_=t,c_}var d_,t8;function vs(){if(t8)return d_;t8=1;var e=fp(),n=Fme(),t=qme(),i="[object Null]",r="[object Undefined]",a=e?e.toStringTag:void 0;function o(l){return l==null?l===void 0?r:i:a&&a in Object(l)?n(l):t(l)}return d_=o,d_}var h_,i8;function gs(){if(i8)return h_;i8=1;function e(n){return n!=null&&typeof n=="object"}return h_=e,h_}var m_,r8;function Zc(){if(r8)return m_;r8=1;var e=vs(),n=gs(),t="[object Symbol]";function i(r){return typeof r=="symbol"||n(r)&&e(r)==t}return m_=i,m_}var p_,a8;function E9(){if(a8)return p_;a8=1;var e=Cr(),n=Zc(),t=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,i=/^\w*$/;function r(a,o){if(e(a))return!1;var l=typeof a;return l=="number"||l=="symbol"||l=="boolean"||a==null||n(a)?!0:i.test(a)||!t.test(a)||o!=null&&a in Object(o)}return p_=r,p_}var v_,o8;function kl(){if(o8)return v_;o8=1;function e(n){var t=typeof n;return n!=null&&(t=="object"||t=="function")}return v_=e,v_}var g_,s8;function T9(){if(s8)return g_;s8=1;var e=vs(),n=kl(),t="[object AsyncFunction]",i="[object Function]",r="[object GeneratorFunction]",a="[object Proxy]";function o(l){if(!n(l))return!1;var f=e(l);return f==i||f==r||f==t||f==a}return g_=o,g_}var y_,l8;function Hme(){if(l8)return y_;l8=1;var e=xo(),n=e["__core-js_shared__"];return y_=n,y_}var b_,u8;function Ume(){if(u8)return b_;u8=1;var e=Hme(),n=(function(){var i=/[^.]+$/.exec(e&&e.keys&&e.keys.IE_PROTO||"");return i?"Symbol(src)_1."+i:""})();function t(i){return!!n&&n in i}return b_=t,b_}var w_,f8;function cH(){if(f8)return w_;f8=1;var e=Function.prototype,n=e.toString;function t(i){if(i!=null){try{return n.call(i)}catch{}try{return i+""}catch{}}return""}return w_=t,w_}var k_,c8;function Vme(){if(c8)return k_;c8=1;var e=T9(),n=Ume(),t=kl(),i=cH(),r=/[\\^$.*+?()[\]{}|]/g,a=/^\[object .+?Constructor\]$/,o=Function.prototype,l=Object.prototype,f=o.toString,c=l.hasOwnProperty,h=RegExp("^"+f.call(c).replace(r,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function d(p){if(!t(p)||n(p))return!1;var v=e(p)?h:a;return v.test(i(p))}return k_=d,k_}var __,d8;function Wme(){if(d8)return __;d8=1;function e(n,t){return n==null?void 0:n[t]}return __=e,__}var x_,h8;function zu(){if(h8)return x_;h8=1;var e=Vme(),n=Wme();function t(i,r){var a=n(i,r);return e(a)?a:void 0}return x_=t,x_}var S_,m8;function k0(){if(m8)return S_;m8=1;var e=zu(),n=e(Object,"create");return S_=n,S_}var C_,p8;function Gme(){if(p8)return C_;p8=1;var e=k0();function n(){this.__data__=e?e(null):{},this.size=0}return C_=n,C_}var A_,v8;function Yme(){if(v8)return A_;v8=1;function e(n){var t=this.has(n)&&delete this.__data__[n];return this.size-=t?1:0,t}return A_=e,A_}var O_,g8;function Kme(){if(g8)return O_;g8=1;var e=k0(),n="__lodash_hash_undefined__",t=Object.prototype,i=t.hasOwnProperty;function r(a){var o=this.__data__;if(e){var l=o[a];return l===n?void 0:l}return i.call(o,a)?o[a]:void 0}return O_=r,O_}var j_,y8;function Xme(){if(y8)return j_;y8=1;var e=k0(),n=Object.prototype,t=n.hasOwnProperty;function i(r){var a=this.__data__;return e?a[r]!==void 0:t.call(a,r)}return j_=i,j_}var E_,b8;function Zme(){if(b8)return E_;b8=1;var e=k0(),n="__lodash_hash_undefined__";function t(i,r){var a=this.__data__;return this.size+=this.has(i)?0:1,a[i]=e&&r===void 0?n:r,this}return E_=t,E_}var T_,w8;function Qme(){if(w8)return T_;w8=1;var e=Gme(),n=Yme(),t=Kme(),i=Xme(),r=Zme();function a(o){var l=-1,f=o==null?0:o.length;for(this.clear();++l-1}return $_=n,$_}var z_,O8;function ipe(){if(O8)return z_;O8=1;var e=_0();function n(t,i){var r=this.__data__,a=e(r,t);return a<0?(++this.size,r.push([t,i])):r[a][1]=i,this}return z_=n,z_}var L_,j8;function x0(){if(j8)return L_;j8=1;var e=Jme(),n=epe(),t=npe(),i=tpe(),r=ipe();function a(o){var l=-1,f=o==null?0:o.length;for(this.clear();++l0?1:-1},lu=function(n){return xu(n)&&n.indexOf("%")===n.length-1},Ve=function(n){return Ape(n)&&!Jc(n)},Ope=function(n){return Gn(n)},_i=function(n){return Ve(n)||xu(n)},jpe=0,ed=function(n){var t=++jpe;return"".concat(n||"").concat(t)},Su=function(n,t){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(!Ve(n)&&!xu(n))return i;var a;if(lu(n)){var o=n.indexOf("%");a=t*parseFloat(n.slice(0,o))/100}else a=+n;return Jc(a)&&(a=i),r&&a>t&&(a=t),a},Zs=function(n){if(!n)return null;var t=Object.keys(n);return t&&t.length?n[t[0]]:null},Epe=function(n){if(!Array.isArray(n))return!1;for(var t=n.length,i={},r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(t[i]=e[i])}return t}function $pe(e,n){if(e==null)return{};var t={};for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){if(n.indexOf(i)>=0)continue;t[i]=e[i]}return t}function t4(e){"@babel/helpers - typeof";return t4=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},t4(e)}var tD={click:"onClick",mousedown:"onMouseDown",mouseup:"onMouseUp",mouseover:"onMouseOver",mousemove:"onMouseMove",mouseout:"onMouseOut",mouseenter:"onMouseEnter",mouseleave:"onMouseLeave",touchcancel:"onTouchCancel",touchend:"onTouchEnd",touchmove:"onTouchMove",touchstart:"onTouchStart",contextmenu:"onContextMenu",dblclick:"onDoubleClick"},Zo=function(n){return typeof n=="string"?n:n?n.displayName||n.name||"Component":""},iD=null,f2=null,z9=function e(n){if(n===iD&&Array.isArray(f2))return f2;var t=[];return A.Children.forEach(n,function(i){Gn(i)||(_pe.isFragment(i)?t=t.concat(e(i.props.children)):t.push(i))}),f2=t,iD=n,t};function va(e,n){var t=[],i=[];return Array.isArray(n)?i=n.map(function(r){return Zo(r)}):i=[Zo(n)],z9(e).forEach(function(r){var a=pa(r,"type.displayName")||pa(r,"type.name");i.indexOf(a)!==-1&&t.push(r)}),t}function qr(e,n){var t=va(e,n);return t&&t[0]}var rD=function(n){if(!n||!n.props)return!1;var t=n.props,i=t.width,r=t.height;return!(!Ve(i)||i<=0||!Ve(r)||r<=0)},zpe=["a","altGlyph","altGlyphDef","altGlyphItem","animate","animateColor","animateMotion","animateTransform","circle","clipPath","color-profile","cursor","defs","desc","ellipse","feBlend","feColormatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","font","font-face","font-face-format","font-face-name","font-face-url","foreignObject","g","glyph","glyphRef","hkern","image","line","lineGradient","marker","mask","metadata","missing-glyph","mpath","path","pattern","polygon","polyline","radialGradient","rect","script","set","stop","style","svg","switch","symbol","text","textPath","title","tref","tspan","use","view","vkern"],Lpe=function(n){return n&&n.type&&xu(n.type)&&zpe.indexOf(n.type)>=0},gH=function(n){return n&&t4(n)==="object"&&"clipDot"in n},Ipe=function(n,t,i,r){var a,o=(a=u2==null?void 0:u2[r])!==null&&a!==void 0?a:[];return t.startsWith("data-")||!In(n)&&(r&&o.includes(t)||Dpe.includes(t))||i&&$9.includes(t)},Hn=function(n,t,i){if(!n||typeof n=="function"||typeof n=="boolean")return null;var r=n;if(A.isValidElement(n)&&(r=n.props),!Qc(r))return null;var a={};return Object.keys(r).forEach(function(o){var l;Ipe((l=r)===null||l===void 0?void 0:l[o],o,t,i)&&(a[o]=r[o])}),a},i4=function e(n,t){if(n===t)return!0;var i=A.Children.count(n);if(i!==A.Children.count(t))return!1;if(i===0)return!0;if(i===1)return aD(Array.isArray(n)?n[0]:n,Array.isArray(t)?t[0]:t);for(var r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(t[i]=e[i])}return t}function Upe(e,n){if(e==null)return{};var t={};for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){if(n.indexOf(i)>=0)continue;t[i]=e[i]}return t}function a4(e){var n=e.children,t=e.width,i=e.height,r=e.viewBox,a=e.className,o=e.style,l=e.title,f=e.desc,c=Hpe(e,qpe),h=r||{width:t,height:i,x:0,y:0},d=dn("recharts-surface",a);return Q.createElement("svg",r4({},Hn(c,!0,"svg"),{className:d,width:t,height:i,style:o,viewBox:"".concat(h.x," ").concat(h.y," ").concat(h.width," ").concat(h.height)}),Q.createElement("title",null,l),Q.createElement("desc",null,f),n)}var Vpe=["children","className"];function o4(){return o4=Object.assign?Object.assign.bind():function(e){for(var n=1;n=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(t[i]=e[i])}return t}function Gpe(e,n){if(e==null)return{};var t={};for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){if(n.indexOf(i)>=0)continue;t[i]=e[i]}return t}var It=Q.forwardRef(function(e,n){var t=e.children,i=e.className,r=Wpe(e,Vpe),a=dn("recharts-layer",i);return Q.createElement("g",o4({className:a},Hn(r,!0),{ref:n}),t)}),Qo=function(n,t){for(var i=arguments.length,r=new Array(i>2?i-2:0),a=2;aa?0:a+t),i=i>a?a:i,i<0&&(i+=a),a=t>i?0:i-t>>>0,t>>>=0;for(var o=Array(a);++r=a?t:e(t,i,r)}return d2=n,d2}var h2,uD;function yH(){if(uD)return h2;uD=1;var e="\\ud800-\\udfff",n="\\u0300-\\u036f",t="\\ufe20-\\ufe2f",i="\\u20d0-\\u20ff",r=n+t+i,a="\\ufe0e\\ufe0f",o="\\u200d",l=RegExp("["+o+e+r+a+"]");function f(c){return l.test(c)}return h2=f,h2}var m2,fD;function Xpe(){if(fD)return m2;fD=1;function e(n){return n.split("")}return m2=e,m2}var p2,cD;function Zpe(){if(cD)return p2;cD=1;var e="\\ud800-\\udfff",n="\\u0300-\\u036f",t="\\ufe20-\\ufe2f",i="\\u20d0-\\u20ff",r=n+t+i,a="\\ufe0e\\ufe0f",o="["+e+"]",l="["+r+"]",f="\\ud83c[\\udffb-\\udfff]",c="(?:"+l+"|"+f+")",h="[^"+e+"]",d="(?:\\ud83c[\\udde6-\\uddff]){2}",p="[\\ud800-\\udbff][\\udc00-\\udfff]",v="\\u200d",b=c+"?",w="["+a+"]?",k="(?:"+v+"(?:"+[h,d,p].join("|")+")"+w+b+")*",_=w+b+k,C="(?:"+[h+l+"?",l,d,p,o].join("|")+")",x=RegExp(f+"(?="+f+")|"+C+_,"g");function E(O){return O.match(x)||[]}return p2=E,p2}var v2,dD;function Qpe(){if(dD)return v2;dD=1;var e=Xpe(),n=yH(),t=Zpe();function i(r){return n(r)?t(r):e(r)}return v2=i,v2}var g2,hD;function Jpe(){if(hD)return g2;hD=1;var e=Kpe(),n=yH(),t=Qpe(),i=hH();function r(a){return function(o){o=i(o);var l=n(o)?t(o):void 0,f=l?l[0]:o.charAt(0),c=l?e(l,1).join(""):o.slice(1);return f[a]()+c}}return g2=r,g2}var y2,mD;function eve(){if(mD)return y2;mD=1;var e=Jpe(),n=e("toUpperCase");return y2=n,y2}var nve=eve();const A0=ht(nve);function $t(e){return function(){return e}}const bH=Math.cos,Jg=Math.sin,Wa=Math.sqrt,e1=Math.PI,O0=2*e1,s4=Math.PI,l4=2*s4,tu=1e-6,tve=l4-tu;function wH(e){this._+=e[0];for(let n=1,t=e.length;n=0))throw new Error(`invalid digits: ${e}`);if(n>15)return wH;const t=10**n;return function(i){this._+=i[0];for(let r=1,a=i.length;rtu)if(!(Math.abs(d*f-c*h)>tu)||!a)this._append`L${this._x1=n},${this._y1=t}`;else{let v=i-o,b=r-l,w=f*f+c*c,k=v*v+b*b,_=Math.sqrt(w),C=Math.sqrt(p),x=a*Math.tan((s4-Math.acos((w+p-k)/(2*_*C)))/2),E=x/C,O=x/_;Math.abs(E-1)>tu&&this._append`L${n+E*h},${t+E*d}`,this._append`A${a},${a},0,0,${+(d*v>h*b)},${this._x1=n+O*f},${this._y1=t+O*c}`}}arc(n,t,i,r,a,o){if(n=+n,t=+t,i=+i,o=!!o,i<0)throw new Error(`negative radius: ${i}`);let l=i*Math.cos(r),f=i*Math.sin(r),c=n+l,h=t+f,d=1^o,p=o?r-a:a-r;this._x1===null?this._append`M${c},${h}`:(Math.abs(this._x1-c)>tu||Math.abs(this._y1-h)>tu)&&this._append`L${c},${h}`,i&&(p<0&&(p=p%l4+l4),p>tve?this._append`A${i},${i},0,1,${d},${n-l},${t-f}A${i},${i},0,1,${d},${this._x1=c},${this._y1=h}`:p>tu&&this._append`A${i},${i},0,${+(p>=s4)},${d},${this._x1=n+i*Math.cos(a)},${this._y1=t+i*Math.sin(a)}`)}rect(n,t,i,r){this._append`M${this._x0=this._x1=+n},${this._y0=this._y1=+t}h${i=+i}v${+r}h${-i}Z`}toString(){return this._}}function L9(e){let n=3;return e.digits=function(t){if(!arguments.length)return n;if(t==null)n=null;else{const i=Math.floor(t);if(!(i>=0))throw new RangeError(`invalid digits: ${t}`);n=i}return e},()=>new rve(n)}function I9(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function kH(e){this._context=e}kH.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,n){switch(e=+e,n=+n,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,n):this._context.moveTo(e,n);break;case 1:this._point=2;default:this._context.lineTo(e,n);break}}};function j0(e){return new kH(e)}function _H(e){return e[0]}function xH(e){return e[1]}function SH(e,n){var t=$t(!0),i=null,r=j0,a=null,o=L9(l);e=typeof e=="function"?e:e===void 0?_H:$t(e),n=typeof n=="function"?n:n===void 0?xH:$t(n);function l(f){var c,h=(f=I9(f)).length,d,p=!1,v;for(i==null&&(a=r(v=o())),c=0;c<=h;++c)!(c=v;--b)l.point(x[b],E[b]);l.lineEnd(),l.areaEnd()}_&&(x[p]=+e(k,p,d),E[p]=+n(k,p,d),l.point(i?+i(k,p,d):x[p],t?+t(k,p,d):E[p]))}if(C)return l=null,C+""||null}function h(){return SH().defined(r).curve(o).context(a)}return c.x=function(d){return arguments.length?(e=typeof d=="function"?d:$t(+d),i=null,c):e},c.x0=function(d){return arguments.length?(e=typeof d=="function"?d:$t(+d),c):e},c.x1=function(d){return arguments.length?(i=d==null?null:typeof d=="function"?d:$t(+d),c):i},c.y=function(d){return arguments.length?(n=typeof d=="function"?d:$t(+d),t=null,c):n},c.y0=function(d){return arguments.length?(n=typeof d=="function"?d:$t(+d),c):n},c.y1=function(d){return arguments.length?(t=d==null?null:typeof d=="function"?d:$t(+d),c):t},c.lineX0=c.lineY0=function(){return h().x(e).y(n)},c.lineY1=function(){return h().x(e).y(t)},c.lineX1=function(){return h().x(i).y(n)},c.defined=function(d){return arguments.length?(r=typeof d=="function"?d:$t(!!d),c):r},c.curve=function(d){return arguments.length?(o=d,a!=null&&(l=o(a)),c):o},c.context=function(d){return arguments.length?(d==null?a=l=null:l=o(a=d),c):a},c}class CH{constructor(n,t){this._context=n,this._x=t}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(n,t){switch(n=+n,t=+t,this._point){case 0:{this._point=1,this._line?this._context.lineTo(n,t):this._context.moveTo(n,t);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+n)/2,this._y0,this._x0,t,n,t):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+t)/2,n,this._y0,n,t);break}}this._x0=n,this._y0=t}}function ave(e){return new CH(e,!0)}function ove(e){return new CH(e,!1)}const B9={draw(e,n){const t=Wa(n/e1);e.moveTo(t,0),e.arc(0,0,t,0,O0)}},sve={draw(e,n){const t=Wa(n/5)/2;e.moveTo(-3*t,-t),e.lineTo(-t,-t),e.lineTo(-t,-3*t),e.lineTo(t,-3*t),e.lineTo(t,-t),e.lineTo(3*t,-t),e.lineTo(3*t,t),e.lineTo(t,t),e.lineTo(t,3*t),e.lineTo(-t,3*t),e.lineTo(-t,t),e.lineTo(-3*t,t),e.closePath()}},AH=Wa(1/3),lve=AH*2,uve={draw(e,n){const t=Wa(n/lve),i=t*AH;e.moveTo(0,-t),e.lineTo(i,0),e.lineTo(0,t),e.lineTo(-i,0),e.closePath()}},fve={draw(e,n){const t=Wa(n),i=-t/2;e.rect(i,i,t,t)}},cve=.8908130915292852,OH=Jg(e1/10)/Jg(7*e1/10),dve=Jg(O0/10)*OH,hve=-bH(O0/10)*OH,mve={draw(e,n){const t=Wa(n*cve),i=dve*t,r=hve*t;e.moveTo(0,-t),e.lineTo(i,r);for(let a=1;a<5;++a){const o=O0*a/5,l=bH(o),f=Jg(o);e.lineTo(f*t,-l*t),e.lineTo(l*i-f*r,f*i+l*r)}e.closePath()}},b2=Wa(3),pve={draw(e,n){const t=-Wa(n/(b2*3));e.moveTo(0,t*2),e.lineTo(-b2*t,-t),e.lineTo(b2*t,-t),e.closePath()}},aa=-.5,oa=Wa(3)/2,u4=1/Wa(12),vve=(u4/2+1)*3,gve={draw(e,n){const t=Wa(n/vve),i=t/2,r=t*u4,a=i,o=t*u4+t,l=-a,f=o;e.moveTo(i,r),e.lineTo(a,o),e.lineTo(l,f),e.lineTo(aa*i-oa*r,oa*i+aa*r),e.lineTo(aa*a-oa*o,oa*a+aa*o),e.lineTo(aa*l-oa*f,oa*l+aa*f),e.lineTo(aa*i+oa*r,aa*r-oa*i),e.lineTo(aa*a+oa*o,aa*o-oa*a),e.lineTo(aa*l+oa*f,aa*f-oa*l),e.closePath()}};function yve(e,n){let t=null,i=L9(r);e=typeof e=="function"?e:$t(e||B9),n=typeof n=="function"?n:$t(n===void 0?64:+n);function r(){let a;if(t||(t=a=i()),e.apply(this,arguments).draw(t,+n.apply(this,arguments)),a)return t=null,a+""||null}return r.type=function(a){return arguments.length?(e=typeof a=="function"?a:$t(a),r):e},r.size=function(a){return arguments.length?(n=typeof a=="function"?a:$t(+a),r):n},r.context=function(a){return arguments.length?(t=a??null,r):t},r}function n1(){}function t1(e,n,t){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+n)/6,(e._y0+4*e._y1+t)/6)}function jH(e){this._context=e}jH.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:t1(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,n){switch(e=+e,n=+n,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,n):this._context.moveTo(e,n);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:t1(this,e,n);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=n}};function bve(e){return new jH(e)}function EH(e){this._context=e}EH.prototype={areaStart:n1,areaEnd:n1,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(e,n){switch(e=+e,n=+n,this._point){case 0:this._point=1,this._x2=e,this._y2=n;break;case 1:this._point=2,this._x3=e,this._y3=n;break;case 2:this._point=3,this._x4=e,this._y4=n,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+n)/6);break;default:t1(this,e,n);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=n}};function wve(e){return new EH(e)}function TH(e){this._context=e}TH.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,n){switch(e=+e,n=+n,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var t=(this._x0+4*this._x1+e)/6,i=(this._y0+4*this._y1+n)/6;this._line?this._context.lineTo(t,i):this._context.moveTo(t,i);break;case 3:this._point=4;default:t1(this,e,n);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=n}};function kve(e){return new TH(e)}function MH(e){this._context=e}MH.prototype={areaStart:n1,areaEnd:n1,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,n){e=+e,n=+n,this._point?this._context.lineTo(e,n):(this._point=1,this._context.moveTo(e,n))}};function _ve(e){return new MH(e)}function pD(e){return e<0?-1:1}function vD(e,n,t){var i=e._x1-e._x0,r=n-e._x1,a=(e._y1-e._y0)/(i||r<0&&-0),o=(t-e._y1)/(r||i<0&&-0),l=(a*r+o*i)/(i+r);return(pD(a)+pD(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(l))||0}function gD(e,n){var t=e._x1-e._x0;return t?(3*(e._y1-e._y0)/t-n)/2:n}function w2(e,n,t){var i=e._x0,r=e._y0,a=e._x1,o=e._y1,l=(a-i)/3;e._context.bezierCurveTo(i+l,r+l*n,a-l,o-l*t,a,o)}function i1(e){this._context=e}i1.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:w2(this,this._t0,gD(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,n){var t=NaN;if(e=+e,n=+n,!(e===this._x1&&n===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,n):this._context.moveTo(e,n);break;case 1:this._point=2;break;case 2:this._point=3,w2(this,gD(this,t=vD(this,e,n)),t);break;default:w2(this,this._t0,t=vD(this,e,n));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=n,this._t0=t}}};function DH(e){this._context=new RH(e)}(DH.prototype=Object.create(i1.prototype)).point=function(e,n){i1.prototype.point.call(this,n,e)};function RH(e){this._context=e}RH.prototype={moveTo:function(e,n){this._context.moveTo(n,e)},closePath:function(){this._context.closePath()},lineTo:function(e,n){this._context.lineTo(n,e)},bezierCurveTo:function(e,n,t,i,r,a){this._context.bezierCurveTo(n,e,i,t,a,r)}};function xve(e){return new i1(e)}function Sve(e){return new DH(e)}function PH(e){this._context=e}PH.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,n=this._y,t=e.length;if(t)if(this._line?this._context.lineTo(e[0],n[0]):this._context.moveTo(e[0],n[0]),t===2)this._context.lineTo(e[1],n[1]);else for(var i=yD(e),r=yD(n),a=0,o=1;o=0;--n)r[n]=(o[n]-r[n+1])/a[n];for(a[t-1]=(e[t]+r[t-1])/2,n=0;n=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,n){switch(e=+e,n=+n,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,n):this._context.moveTo(e,n);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,n),this._context.lineTo(e,n);else{var t=this._x*(1-this._t)+e*this._t;this._context.lineTo(t,this._y),this._context.lineTo(t,n)}break}}this._x=e,this._y=n}};function Ave(e){return new E0(e,.5)}function Ove(e){return new E0(e,0)}function jve(e){return new E0(e,1)}function ac(e,n){if((o=e.length)>1)for(var t=1,i,r,a=e[n[0]],o,l=a.length;t=0;)t[n]=n;return t}function Eve(e,n){return e[n]}function Tve(e){const n=[];return n.key=e,n}function Mve(){var e=$t([]),n=f4,t=ac,i=Eve;function r(a){var o=Array.from(e.apply(this,arguments),Tve),l,f=o.length,c=-1,h;for(const d of a)for(l=0,++c;l0){for(var t,i,r=0,a=e[0].length,o;r0){for(var t=0,i=e[n[0]],r,a=i.length;t0)||!((a=(r=e[n[0]]).length)>0))){for(var t=0,i=1,r,a,o;i=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(t[i]=e[i])}return t}function Bve(e,n){if(e==null)return{};var t={};for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){if(n.indexOf(i)>=0)continue;t[i]=e[i]}return t}var NH={symbolCircle:B9,symbolCross:sve,symbolDiamond:uve,symbolSquare:fve,symbolStar:mve,symbolTriangle:pve,symbolWye:gve},Fve=Math.PI/180,qve=function(n){var t="symbol".concat(A0(n));return NH[t]||B9},Hve=function(n,t,i){if(t==="area")return n;switch(i){case"cross":return 5*n*n/9;case"diamond":return .5*n*n/Math.sqrt(3);case"square":return n*n;case"star":{var r=18*Fve;return 1.25*n*n*(Math.tan(r)-Math.tan(r*2)*Math.pow(Math.tan(r),2))}case"triangle":return Math.sqrt(3)*n*n/4;case"wye":return(21-10*Math.sqrt(3))*n*n/8;default:return Math.PI*n*n/4}},Uve=function(n,t){NH["symbol".concat(A0(n))]=t},F9=function(n){var t=n.type,i=t===void 0?"circle":t,r=n.size,a=r===void 0?64:r,o=n.sizeType,l=o===void 0?"area":o,f=Ive(n,Nve),c=wD(wD({},f),{},{type:i,size:a,sizeType:l}),h=function(){var k=qve(i),_=yve().type(k).size(Hve(a,l,i));return _()},d=c.className,p=c.cx,v=c.cy,b=Hn(c,!0);return p===+p&&v===+v&&a===+a?Q.createElement("path",c4({},b,{className:dn("recharts-symbols",d),transform:"translate(".concat(p,", ").concat(v,")"),d:h()})):null};F9.registerSymbol=Uve;function oc(e){"@babel/helpers - typeof";return oc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},oc(e)}function d4(){return d4=Object.assign?Object.assign.bind():function(e){for(var n=1;n`);var C=v.inactive?c:v.color;return Q.createElement("li",d4({className:k,style:d,key:"legend-item-".concat(b)},Qg(i.props,v,b)),Q.createElement(a4,{width:o,height:o,viewBox:h,style:p},i.renderIcon(v)),Q.createElement("span",{className:"recharts-legend-item-text",style:{color:C}},w?w(_,v,b):_))})}},{key:"render",value:function(){var i=this.props,r=i.payload,a=i.layout,o=i.align;if(!r||!r.length)return null;var l={padding:0,margin:0,textAlign:a==="horizontal"?o:"left"};return Q.createElement("ul",{className:"recharts-default-legend",style:l},this.renderItems())}}])})(A.PureComponent);im(q9,"displayName","Legend");im(q9,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"middle",inactiveColor:"#ccc"});var k2,_D;function ege(){if(_D)return k2;_D=1;var e=x0();function n(){this.__data__=new e,this.size=0}return k2=n,k2}var _2,xD;function nge(){if(xD)return _2;xD=1;function e(n){var t=this.__data__,i=t.delete(n);return this.size=t.size,i}return _2=e,_2}var x2,SD;function tge(){if(SD)return x2;SD=1;function e(n){return this.__data__.get(n)}return x2=e,x2}var S2,CD;function ige(){if(CD)return S2;CD=1;function e(n){return this.__data__.has(n)}return S2=e,S2}var C2,AD;function rge(){if(AD)return C2;AD=1;var e=x0(),n=D9(),t=R9(),i=200;function r(a,o){var l=this.__data__;if(l instanceof e){var f=l.__data__;if(!n||f.lengthv))return!1;var w=d.get(o),k=d.get(l);if(w&&k)return w==l&&k==o;var _=-1,C=!0,x=f&r?new e:void 0;for(d.set(o,l),d.set(l,o);++_-1&&i%1==0&&i-1&&t%1==0&&t<=e}return G2=n,G2}var Y2,XD;function gge(){if(XD)return Y2;XD=1;var e=vs(),n=W9(),t=gs(),i="[object Arguments]",r="[object Array]",a="[object Boolean]",o="[object Date]",l="[object Error]",f="[object Function]",c="[object Map]",h="[object Number]",d="[object Object]",p="[object RegExp]",v="[object Set]",b="[object String]",w="[object WeakMap]",k="[object ArrayBuffer]",_="[object DataView]",C="[object Float32Array]",x="[object Float64Array]",E="[object Int8Array]",O="[object Int16Array]",j="[object Int32Array]",M="[object Uint8Array]",P="[object Uint8ClampedArray]",F="[object Uint16Array]",R="[object Uint32Array]",L={};L[C]=L[x]=L[E]=L[O]=L[j]=L[M]=L[P]=L[F]=L[R]=!0,L[i]=L[r]=L[k]=L[a]=L[_]=L[o]=L[l]=L[f]=L[c]=L[h]=L[d]=L[p]=L[v]=L[b]=L[w]=!1;function B(G){return t(G)&&n(G.length)&&!!L[e(G)]}return Y2=B,Y2}var K2,ZD;function VH(){if(ZD)return K2;ZD=1;function e(n){return function(t){return n(t)}}return K2=e,K2}var Ch={exports:{}};Ch.exports;var QD;function yge(){return QD||(QD=1,(function(e,n){var t=fH(),i=n&&!n.nodeType&&n,r=i&&!0&&e&&!e.nodeType&&e,a=r&&r.exports===i,o=a&&t.process,l=(function(){try{var f=r&&r.require&&r.require("util").types;return f||o&&o.binding&&o.binding("util")}catch{}})();e.exports=l})(Ch,Ch.exports)),Ch.exports}var X2,JD;function WH(){if(JD)return X2;JD=1;var e=gge(),n=VH(),t=yge(),i=t&&t.isTypedArray,r=i?n(i):e;return X2=r,X2}var Z2,e7;function bge(){if(e7)return Z2;e7=1;var e=mge(),n=U9(),t=Cr(),i=UH(),r=V9(),a=WH(),o=Object.prototype,l=o.hasOwnProperty;function f(c,h){var d=t(c),p=!d&&n(c),v=!d&&!p&&i(c),b=!d&&!p&&!v&&a(c),w=d||p||v||b,k=w?e(c.length,String):[],_=k.length;for(var C in c)(h||l.call(c,C))&&!(w&&(C=="length"||v&&(C=="offset"||C=="parent")||b&&(C=="buffer"||C=="byteLength"||C=="byteOffset")||r(C,_)))&&k.push(C);return k}return Z2=f,Z2}var Q2,n7;function wge(){if(n7)return Q2;n7=1;var e=Object.prototype;function n(t){var i=t&&t.constructor,r=typeof i=="function"&&i.prototype||e;return t===r}return Q2=n,Q2}var J2,t7;function GH(){if(t7)return J2;t7=1;function e(n,t){return function(i){return n(t(i))}}return J2=e,J2}var ex,i7;function kge(){if(i7)return ex;i7=1;var e=GH(),n=e(Object.keys,Object);return ex=n,ex}var nx,r7;function _ge(){if(r7)return nx;r7=1;var e=wge(),n=kge(),t=Object.prototype,i=t.hasOwnProperty;function r(a){if(!e(a))return n(a);var o=[];for(var l in Object(a))i.call(a,l)&&l!="constructor"&&o.push(l);return o}return nx=r,nx}var tx,a7;function cp(){if(a7)return tx;a7=1;var e=T9(),n=W9();function t(i){return i!=null&&n(i.length)&&!e(i)}return tx=t,tx}var ix,o7;function T0(){if(o7)return ix;o7=1;var e=bge(),n=_ge(),t=cp();function i(r){return t(r)?e(r):n(r)}return ix=i,ix}var rx,s7;function xge(){if(s7)return rx;s7=1;var e=fge(),n=hge(),t=T0();function i(r){return e(r,t,n)}return rx=i,rx}var ax,l7;function Sge(){if(l7)return ax;l7=1;var e=xge(),n=1,t=Object.prototype,i=t.hasOwnProperty;function r(a,o,l,f,c,h){var d=l&n,p=e(a),v=p.length,b=e(o),w=b.length;if(v!=w&&!d)return!1;for(var k=v;k--;){var _=p[k];if(!(d?_ in o:i.call(o,_)))return!1}var C=h.get(a),x=h.get(o);if(C&&x)return C==o&&x==a;var E=!0;h.set(a,o),h.set(o,a);for(var O=d;++k-1}return Mx=n,Mx}var Dx,N7;function Uge(){if(N7)return Dx;N7=1;function e(n,t,i){for(var r=-1,a=n==null?0:n.length;++r=o){var _=c?null:r(f);if(_)return a(_);b=!1,p=i,k=new e}else k=c?[]:w;e:for(;++d=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(t[i]=e[i])}return t}function a1e(e,n){if(e==null)return{};var t={};for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){if(n.indexOf(i)>=0)continue;t[i]=e[i]}return t}function o1e(e){return e.value}function s1e(e,n){if(Q.isValidElement(e))return Q.cloneElement(e,n);if(typeof e=="function")return Q.createElement(e,n);n.ref;var t=r1e(n,Xge);return Q.createElement(q9,t)}var H7=1,Jo=(function(e){function n(){var t;Zge(this,n);for(var i=arguments.length,r=new Array(i),a=0;aH7||Math.abs(r.height-this.lastBoundingBox.height)>H7)&&(this.lastBoundingBox.width=r.width,this.lastBoundingBox.height=r.height,i&&i(r)):(this.lastBoundingBox.width!==-1||this.lastBoundingBox.height!==-1)&&(this.lastBoundingBox.width=-1,this.lastBoundingBox.height=-1,i&&i(null))}},{key:"getBBoxSnapshot",value:function(){return this.lastBoundingBox.width>=0&&this.lastBoundingBox.height>=0?Bo({},this.lastBoundingBox):{width:0,height:0}}},{key:"getDefaultPosition",value:function(i){var r=this.props,a=r.layout,o=r.align,l=r.verticalAlign,f=r.margin,c=r.chartWidth,h=r.chartHeight,d,p;if(!i||(i.left===void 0||i.left===null)&&(i.right===void 0||i.right===null))if(o==="center"&&a==="vertical"){var v=this.getBBoxSnapshot();d={left:((c||0)-v.width)/2}}else d=o==="right"?{right:f&&f.right||0}:{left:f&&f.left||0};if(!i||(i.top===void 0||i.top===null)&&(i.bottom===void 0||i.bottom===null))if(l==="middle"){var b=this.getBBoxSnapshot();p={top:((h||0)-b.height)/2}}else p=l==="bottom"?{bottom:f&&f.bottom||0}:{top:f&&f.top||0};return Bo(Bo({},d),p)}},{key:"render",value:function(){var i=this,r=this.props,a=r.content,o=r.width,l=r.height,f=r.wrapperStyle,c=r.payloadUniqBy,h=r.payload,d=Bo(Bo({position:"absolute",width:o||"auto",height:l||"auto"},this.getDefaultPosition(f)),f);return Q.createElement("div",{className:"recharts-legend-wrapper",style:d,ref:function(v){i.wrapperNode=v}},s1e(a,Bo(Bo({},this.props),{},{payload:QH(h,c,o1e)})))}}],[{key:"getWithHeight",value:function(i,r){var a=Bo(Bo({},this.defaultProps),i.props),o=a.layout;return o==="vertical"&&Ve(i.props.height)?{height:i.props.height}:o==="horizontal"?{width:i.props.width||r}:null}}])})(A.PureComponent);M0(Jo,"displayName","Legend");M0(Jo,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"bottom"});var zx,U7;function l1e(){if(U7)return zx;U7=1;var e=fp(),n=U9(),t=Cr(),i=e?e.isConcatSpreadable:void 0;function r(a){return t(a)||n(a)||!!(i&&a&&a[i])}return zx=r,zx}var Lx,V7;function nU(){if(V7)return Lx;V7=1;var e=HH(),n=l1e();function t(i,r,a,o,l){var f=-1,c=i.length;for(a||(a=n),l||(l=[]);++f0&&a(h)?r>1?t(h,r-1,a,o,l):e(l,h):o||(l[l.length]=h)}return l}return Lx=t,Lx}var Ix,W7;function u1e(){if(W7)return Ix;W7=1;function e(n){return function(t,i,r){for(var a=-1,o=Object(t),l=r(t),f=l.length;f--;){var c=l[n?f:++a];if(i(o[c],c,o)===!1)break}return t}}return Ix=e,Ix}var Bx,G7;function f1e(){if(G7)return Bx;G7=1;var e=u1e(),n=e();return Bx=n,Bx}var Fx,Y7;function tU(){if(Y7)return Fx;Y7=1;var e=f1e(),n=T0();function t(i,r){return i&&e(i,r,n)}return Fx=t,Fx}var qx,K7;function c1e(){if(K7)return qx;K7=1;var e=cp();function n(t,i){return function(r,a){if(r==null)return r;if(!e(r))return t(r,a);for(var o=r.length,l=i?o:-1,f=Object(r);(i?l--:++li||l&&f&&h&&!c&&!d||a&&f&&h||!r&&h||!o)return 1;if(!a&&!l&&!d&&t=c)return h;var d=r[a];return h*(d=="desc"?-1:1)}}return t.index-i.index}return Gx=n,Gx}var Yx,nR;function p1e(){if(nR)return Yx;nR=1;var e=P9(),n=N9(),t=_l(),i=iU(),r=d1e(),a=VH(),o=m1e(),l=nd(),f=Cr();function c(h,d,p){d.length?d=e(d,function(w){return f(w)?function(k){return n(k,w.length===1?w[0]:w)}:w}):d=[l];var v=-1;d=e(d,a(t));var b=i(h,function(w,k,_){var C=e(d,function(x){return x(w)});return{criteria:C,index:++v,value:w}});return r(b,function(w,k){return o(w,k,p)})}return Yx=c,Yx}var Kx,tR;function v1e(){if(tR)return Kx;tR=1;function e(n,t,i){switch(i.length){case 0:return n.call(t);case 1:return n.call(t,i[0]);case 2:return n.call(t,i[0],i[1]);case 3:return n.call(t,i[0],i[1],i[2])}return n.apply(t,i)}return Kx=e,Kx}var Xx,iR;function g1e(){if(iR)return Xx;iR=1;var e=v1e(),n=Math.max;function t(i,r,a){return r=n(r===void 0?i.length-1:r,0),function(){for(var o=arguments,l=-1,f=n(o.length-r,0),c=Array(f);++l0){if(++a>=e)return arguments[0]}else a=0;return r.apply(void 0,arguments)}}return e3=i,e3}var n3,lR;function k1e(){if(lR)return n3;lR=1;var e=b1e(),n=w1e(),t=n(e);return n3=t,n3}var t3,uR;function _1e(){if(uR)return t3;uR=1;var e=nd(),n=g1e(),t=k1e();function i(r,a){return t(n(r,a,e),r+"")}return t3=i,t3}var i3,fR;function D0(){if(fR)return i3;fR=1;var e=M9(),n=cp(),t=V9(),i=kl();function r(a,o,l){if(!i(l))return!1;var f=typeof o;return(f=="number"?n(l)&&t(o,l.length):f=="string"&&o in l)?e(l[o],a):!1}return i3=r,i3}var r3,cR;function x1e(){if(cR)return r3;cR=1;var e=nU(),n=p1e(),t=_1e(),i=D0(),r=t(function(a,o){if(a==null)return[];var l=o.length;return l>1&&i(a,o[0],o[1])?o=[]:l>2&&i(o[0],o[1],o[2])&&(o=[o[0]]),n(a,e(o,1),[])});return r3=r,r3}var S1e=x1e();const K9=ht(S1e);function rm(e){"@babel/helpers - typeof";return rm=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},rm(e)}function p4(){return p4=Object.assign?Object.assign.bind():function(e){for(var n=1;ne.length)&&(n=e.length);for(var t=0,i=new Array(n);t=n.x),"".concat(oh,"-left"),Ve(t)&&n&&Ve(n.x)&&t=n.y),"".concat(oh,"-top"),Ve(i)&&n&&Ve(n.y)&&iw?Math.max(h,f[i]):Math.max(d,f[i])}function I1e(e){var n=e.translateX,t=e.translateY,i=e.useTranslate3d;return{transform:i?"translate3d(".concat(n,"px, ").concat(t,"px, 0)"):"translate(".concat(n,"px, ").concat(t,"px)")}}function B1e(e){var n=e.allowEscapeViewBox,t=e.coordinate,i=e.offsetTopLeft,r=e.position,a=e.reverseDirection,o=e.tooltipBox,l=e.useTranslate3d,f=e.viewBox,c,h,d;return o.height>0&&o.width>0&&t?(h=mR({allowEscapeViewBox:n,coordinate:t,key:"x",offsetTopLeft:i,position:r,reverseDirection:a,tooltipDimension:o.width,viewBox:f,viewBoxDimension:f.width}),d=mR({allowEscapeViewBox:n,coordinate:t,key:"y",offsetTopLeft:i,position:r,reverseDirection:a,tooltipDimension:o.height,viewBox:f,viewBoxDimension:f.height}),c=I1e({translateX:h,translateY:d,useTranslate3d:l})):c=z1e,{cssProperties:c,cssClasses:L1e({translateX:h,translateY:d,coordinate:t})}}function lc(e){"@babel/helpers - typeof";return lc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},lc(e)}function pR(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),t.push.apply(t,i)}return t}function vR(e){for(var n=1;ngR||Math.abs(i.height-this.state.lastBoundingBox.height)>gR)&&this.setState({lastBoundingBox:{width:i.width,height:i.height}})}else(this.state.lastBoundingBox.width!==-1||this.state.lastBoundingBox.height!==-1)&&this.setState({lastBoundingBox:{width:-1,height:-1}})}},{key:"componentDidMount",value:function(){document.addEventListener("keydown",this.handleKeyDown),this.updateBBox()}},{key:"componentWillUnmount",value:function(){document.removeEventListener("keydown",this.handleKeyDown)}},{key:"componentDidUpdate",value:function(){var i,r;this.props.active&&this.updateBBox(),this.state.dismissed&&(((i=this.props.coordinate)===null||i===void 0?void 0:i.x)!==this.state.dismissedAtCoordinate.x||((r=this.props.coordinate)===null||r===void 0?void 0:r.y)!==this.state.dismissedAtCoordinate.y)&&(this.state.dismissed=!1)}},{key:"render",value:function(){var i=this,r=this.props,a=r.active,o=r.allowEscapeViewBox,l=r.animationDuration,f=r.animationEasing,c=r.children,h=r.coordinate,d=r.hasPayload,p=r.isAnimationActive,v=r.offset,b=r.position,w=r.reverseDirection,k=r.useTranslate3d,_=r.viewBox,C=r.wrapperStyle,x=B1e({allowEscapeViewBox:o,coordinate:h,offsetTopLeft:v,position:b,reverseDirection:w,tooltipBox:this.state.lastBoundingBox,useTranslate3d:k,viewBox:_}),E=x.cssClasses,O=x.cssProperties,j=vR(vR({transition:p&&a?"transform ".concat(l,"ms ").concat(f):void 0},O),{},{pointerEvents:"none",visibility:!this.state.dismissed&&a&&d?"visible":"hidden",position:"absolute",top:0,left:0},C);return Q.createElement("div",{tabIndex:-1,className:E,style:j,ref:function(P){i.wrapperNode=P}},c)}}])})(A.PureComponent),X1e=function(){return!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout)},Lu={isSsr:X1e()};function uc(e){"@babel/helpers - typeof";return uc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},uc(e)}function yR(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),t.push.apply(t,i)}return t}function bR(e){for(var n=1;n0;return Q.createElement(K1e,{allowEscapeViewBox:o,animationDuration:l,animationEasing:f,isAnimationActive:p,active:a,coordinate:h,hasPayload:j,offset:v,position:k,reverseDirection:_,useTranslate3d:C,viewBox:x,wrapperStyle:E},oye(c,bR(bR({},this.props),{},{payload:O})))}}])})(A.PureComponent);X9(ca,"displayName","Tooltip");X9(ca,"defaultProps",{accessibilityLayer:!1,allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",contentStyle:{},coordinate:{x:0,y:0},cursor:!0,cursorStyle:{},filterNull:!0,isAnimationActive:!Lu.isSsr,itemStyle:{},labelStyle:{},offset:10,reverseDirection:{x:!1,y:!1},separator:" : ",trigger:"hover",useTranslate3d:!1,viewBox:{x:0,y:0,height:0,width:0},wrapperStyle:{}});var o3,wR;function sye(){if(wR)return o3;wR=1;var e=xo(),n=function(){return e.Date.now()};return o3=n,o3}var s3,kR;function lye(){if(kR)return s3;kR=1;var e=/\s/;function n(t){for(var i=t.length;i--&&e.test(t.charAt(i)););return i}return s3=n,s3}var l3,_R;function uye(){if(_R)return l3;_R=1;var e=lye(),n=/^\s+/;function t(i){return i&&i.slice(0,e(i)+1).replace(n,"")}return l3=t,l3}var u3,xR;function uU(){if(xR)return u3;xR=1;var e=uye(),n=kl(),t=Zc(),i=NaN,r=/^[-+]0x[0-9a-f]+$/i,a=/^0b[01]+$/i,o=/^0o[0-7]+$/i,l=parseInt;function f(c){if(typeof c=="number")return c;if(t(c))return i;if(n(c)){var h=typeof c.valueOf=="function"?c.valueOf():c;c=n(h)?h+"":h}if(typeof c!="string")return c===0?c:+c;c=e(c);var d=a.test(c);return d||o.test(c)?l(c.slice(2),d?2:8):r.test(c)?i:+c}return u3=f,u3}var f3,SR;function fye(){if(SR)return f3;SR=1;var e=kl(),n=sye(),t=uU(),i="Expected a function",r=Math.max,a=Math.min;function o(l,f,c){var h,d,p,v,b,w,k=0,_=!1,C=!1,x=!0;if(typeof l!="function")throw new TypeError(i);f=t(f)||0,e(c)&&(_=!!c.leading,C="maxWait"in c,p=C?r(t(c.maxWait)||0,f):p,x="trailing"in c?!!c.trailing:x);function E(G){var U=h,H=d;return h=d=void 0,k=G,v=l.apply(H,U),v}function O(G){return k=G,b=setTimeout(P,f),_?E(G):v}function j(G){var U=G-w,H=G-k,N=f-U;return C?a(N,p-H):N}function M(G){var U=G-w,H=G-k;return w===void 0||U>=f||U<0||C&&H>=p}function P(){var G=n();if(M(G))return F(G);b=setTimeout(P,j(G))}function F(G){return b=void 0,x&&h?E(G):(h=d=void 0,v)}function R(){b!==void 0&&clearTimeout(b),k=0,h=w=d=b=void 0}function L(){return b===void 0?v:F(n())}function B(){var G=n(),U=M(G);if(h=arguments,d=this,w=G,U){if(b===void 0)return O(w);if(C)return clearTimeout(b),b=setTimeout(P,f),E(w)}return b===void 0&&(b=setTimeout(P,f)),v}return B.cancel=R,B.flush=L,B}return f3=o,f3}var c3,CR;function cye(){if(CR)return c3;CR=1;var e=fye(),n=kl(),t="Expected a function";function i(r,a,o){var l=!0,f=!0;if(typeof r!="function")throw new TypeError(t);return n(o)&&(l="leading"in o?!!o.leading:l,f="trailing"in o?!!o.trailing:f),e(r,a,{leading:l,maxWait:a,trailing:f})}return c3=i,c3}var dye=cye();const fU=ht(dye);function om(e){"@babel/helpers - typeof";return om=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},om(e)}function AR(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),t.push.apply(t,i)}return t}function Yv(e){for(var n=1;ne.length)&&(n=e.length);for(var t=0,i=new Array(n);t0&&(G=fU(G,w,{trailing:!0,leading:!1}));var U=new ResizeObserver(G),H=O.current.getBoundingClientRect(),N=H.width,z=H.height;return L(N,z),U.observe(O.current),function(){U.disconnect()}},[L,w]);var B=A.useMemo(function(){var G=F.containerWidth,U=F.containerHeight;if(G<0||U<0)return null;Qo(lu(o)||lu(f),`The width(%s) and height(%s) are both fixed numbers, + maybe you don't need to use a ResponsiveContainer.`,o,f),Qo(!t||t>0,"The aspect(%s) must be greater than zero.",t);var H=lu(o)?G:o,N=lu(f)?U:f;t&&t>0&&(H?N=H/t:N&&(H=N*t),p&&N>p&&(N=p)),Qo(H>0||N>0,`The width(%s) and height(%s) of chart should be greater than 0, + please check the style of container, or the props width(%s) and height(%s), + or add a minWidth(%s) or minHeight(%s) or use aspect(%s) to control the + height and width.`,H,N,o,f,h,d,t);var z=!Array.isArray(v)&&Zo(v.type).endsWith("Chart");return Q.Children.map(v,function(q){return Q.isValidElement(q)?A.cloneElement(q,Yv({width:H,height:N},z?{style:Yv({height:"100%",width:"100%",maxHeight:N,maxWidth:H},q.props.style)}:{})):q})},[t,v,f,p,d,h,F,o]);return Q.createElement("div",{id:k?"".concat(k):void 0,className:dn("recharts-responsive-container",_),style:Yv(Yv({},E),{},{width:o,height:f,minWidth:h,minHeight:d,maxHeight:p}),ref:O},B)}),cU=function(n){return null};cU.displayName="Cell";function sm(e){"@babel/helpers - typeof";return sm=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},sm(e)}function jR(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),t.push.apply(t,i)}return t}function b4(e){for(var n=1;n1&&arguments[1]!==void 0?arguments[1]:{};if(n==null||Lu.isSsr)return{width:0,height:0};var i=Aye(t),r=JSON.stringify({text:n,copyStyle:i});if(Ef.widthCache[r])return Ef.widthCache[r];try{var a=document.getElementById(ER);a||(a=document.createElement("span"),a.setAttribute("id",ER),a.setAttribute("aria-hidden","true"),document.body.appendChild(a));var o=b4(b4({},Cye),i);Object.assign(a.style,o),a.textContent="".concat(n);var l=a.getBoundingClientRect(),f={width:l.width,height:l.height};return Ef.widthCache[r]=f,++Ef.cacheCount>Sye&&(Ef.cacheCount=0,Ef.widthCache={}),f}catch{return{width:0,height:0}}},Oye=function(n){return{top:n.top+window.scrollY-document.documentElement.clientTop,left:n.left+window.scrollX-document.documentElement.clientLeft}};function lm(e){"@babel/helpers - typeof";return lm=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},lm(e)}function l1(e,n){return Mye(e)||Tye(e,n)||Eye(e,n)||jye()}function jye(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Eye(e,n){if(e){if(typeof e=="string")return TR(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);if(t==="Object"&&e.constructor&&(t=e.constructor.name),t==="Map"||t==="Set")return Array.from(e);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return TR(e,n)}}function TR(e,n){(n==null||n>e.length)&&(n=e.length);for(var t=0,i=new Array(n);t=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(t[i]=e[i])}return t}function Vye(e,n){if(e==null)return{};var t={};for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){if(n.indexOf(i)>=0)continue;t[i]=e[i]}return t}function $R(e,n){return Kye(e)||Yye(e,n)||Gye(e,n)||Wye()}function Wye(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Gye(e,n){if(e){if(typeof e=="string")return zR(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);if(t==="Object"&&e.constructor&&(t=e.constructor.name),t==="Map"||t==="Set")return Array.from(e);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return zR(e,n)}}function zR(e,n){(n==null||n>e.length)&&(n=e.length);for(var t=0,i=new Array(n);t0&&arguments[0]!==void 0?arguments[0]:[];return H.reduce(function(N,z){var q=z.word,Y=z.width,D=N[N.length-1];if(D&&(r==null||a||D.width+Y+iz.width?N:z})};if(!h)return v;for(var w="…",k=function(H){var N=d.slice(0,H),z=pU({breakAll:c,style:f,children:N+w}).wordsWithComputedWidth,q=p(z),Y=q.length>o||b(q).width>Number(r);return[Y,q]},_=0,C=d.length-1,x=0,E;_<=C&&x<=d.length-1;){var O=Math.floor((_+C)/2),j=O-1,M=k(j),P=$R(M,2),F=P[0],R=P[1],L=k(O),B=$R(L,1),G=B[0];if(!F&&!G&&(_=O+1),F&&G&&(C=O-1),!F&&G){E=R;break}x++}return E||v},LR=function(n){var t=Gn(n)?[]:n.toString().split(mU);return[{words:t}]},Zye=function(n){var t=n.width,i=n.scaleToFit,r=n.children,a=n.style,o=n.breakAll,l=n.maxLines;if((t||i)&&!Lu.isSsr){var f,c,h=pU({breakAll:o,children:r,style:a});if(h){var d=h.wordsWithComputedWidth,p=h.spaceWidth;f=d,c=p}else return LR(r);return Xye({breakAll:o,children:r,maxLines:l,style:a},f,c,t,i)}return LR(r)},IR="#808080",u1=function(n){var t=n.x,i=t===void 0?0:t,r=n.y,a=r===void 0?0:r,o=n.lineHeight,l=o===void 0?"1em":o,f=n.capHeight,c=f===void 0?"0.71em":f,h=n.scaleToFit,d=h===void 0?!1:h,p=n.textAnchor,v=p===void 0?"start":p,b=n.verticalAnchor,w=b===void 0?"end":b,k=n.fill,_=k===void 0?IR:k,C=NR(n,Hye),x=A.useMemo(function(){return Zye({breakAll:C.breakAll,children:C.children,maxLines:C.maxLines,scaleToFit:d,style:C.style,width:C.width})},[C.breakAll,C.children,C.maxLines,d,C.style,C.width]),E=C.dx,O=C.dy,j=C.angle,M=C.className,P=C.breakAll,F=NR(C,Uye);if(!_i(i)||!_i(a))return null;var R=i+(Ve(E)?E:0),L=a+(Ve(O)?O:0),B;switch(w){case"start":B=d3("calc(".concat(c,")"));break;case"middle":B=d3("calc(".concat((x.length-1)/2," * -").concat(l," + (").concat(c," / 2))"));break;default:B=d3("calc(".concat(x.length-1," * -").concat(l,")"));break}var G=[];if(d){var U=x[0].width,H=C.width;G.push("scale(".concat((Ve(H)?H/U:1)/U,")"))}return j&&G.push("rotate(".concat(j,", ").concat(R,", ").concat(L,")")),G.length&&(F.transform=G.join(" ")),Q.createElement("text",w4({},Hn(F,!0),{x:R,y:L,className:dn("recharts-text",M),textAnchor:v,fill:_.includes("url")?IR:_}),x.map(function(N,z){var q=N.words.join(P?"":" ");return Q.createElement("tspan",{x:R,dy:z===0?B:l,key:"".concat(q,"-").concat(z)},q)}))};function ol(e,n){return e==null||n==null?NaN:en?1:e>=n?0:NaN}function Qye(e,n){return e==null||n==null?NaN:ne?1:n>=e?0:NaN}function Q9(e){let n,t,i;e.length!==2?(n=ol,t=(l,f)=>ol(e(l),f),i=(l,f)=>e(l)-f):(n=e===ol||e===Qye?e:Jye,t=e,i=e);function r(l,f,c=0,h=l.length){if(c>>1;t(l[d],f)<0?c=d+1:h=d}while(c>>1;t(l[d],f)<=0?c=d+1:h=d}while(cc&&i(l[d-1],f)>-i(l[d],f)?d-1:d}return{left:r,center:o,right:a}}function Jye(){return 0}function vU(e){return e===null?NaN:+e}function*e0e(e,n){for(let t of e)t!=null&&(t=+t)>=t&&(yield t)}const n0e=Q9(ol),dp=n0e.right;Q9(vU).center;class BR extends Map{constructor(n,t=r0e){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:t}}),n!=null)for(const[i,r]of n)this.set(i,r)}get(n){return super.get(FR(this,n))}has(n){return super.has(FR(this,n))}set(n,t){return super.set(t0e(this,n),t)}delete(n){return super.delete(i0e(this,n))}}function FR({_intern:e,_key:n},t){const i=n(t);return e.has(i)?e.get(i):t}function t0e({_intern:e,_key:n},t){const i=n(t);return e.has(i)?e.get(i):(e.set(i,t),t)}function i0e({_intern:e,_key:n},t){const i=n(t);return e.has(i)&&(t=e.get(i),e.delete(i)),t}function r0e(e){return e!==null&&typeof e=="object"?e.valueOf():e}function a0e(e=ol){if(e===ol)return gU;if(typeof e!="function")throw new TypeError("compare is not a function");return(n,t)=>{const i=e(n,t);return i||i===0?i:(e(t,t)===0)-(e(n,n)===0)}}function gU(e,n){return(e==null||!(e>=e))-(n==null||!(n>=n))||(en?1:0)}const o0e=Math.sqrt(50),s0e=Math.sqrt(10),l0e=Math.sqrt(2);function f1(e,n,t){const i=(n-e)/Math.max(0,t),r=Math.floor(Math.log10(i)),a=i/Math.pow(10,r),o=a>=o0e?10:a>=s0e?5:a>=l0e?2:1;let l,f,c;return r<0?(c=Math.pow(10,-r)/o,l=Math.round(e*c),f=Math.round(n*c),l/cn&&--f,c=-c):(c=Math.pow(10,r)*o,l=Math.round(e/c),f=Math.round(n/c),l*cn&&--f),f0))return[];if(e===n)return[e];const i=n=r))return[];const l=a-r+1,f=new Array(l);if(i)if(o<0)for(let c=0;c=i)&&(t=i);return t}function HR(e,n){let t;for(const i of e)i!=null&&(t>i||t===void 0&&i>=i)&&(t=i);return t}function yU(e,n,t=0,i=1/0,r){if(n=Math.floor(n),t=Math.floor(Math.max(0,t)),i=Math.floor(Math.min(e.length-1,i)),!(t<=n&&n<=i))return e;for(r=r===void 0?gU:a0e(r);i>t;){if(i-t>600){const f=i-t+1,c=n-t+1,h=Math.log(f),d=.5*Math.exp(2*h/3),p=.5*Math.sqrt(h*d*(f-d)/f)*(c-f/2<0?-1:1),v=Math.max(t,Math.floor(n-c*d/f+p)),b=Math.min(i,Math.floor(n+(f-c)*d/f+p));yU(e,n,v,b,r)}const a=e[n];let o=t,l=i;for(sh(e,t,n),r(e[i],a)>0&&sh(e,t,i);o0;)--l}r(e[t],a)===0?sh(e,t,l):(++l,sh(e,l,i)),l<=n&&(t=l+1),n<=l&&(i=l-1)}return e}function sh(e,n,t){const i=e[n];e[n]=e[t],e[t]=i}function u0e(e,n,t){if(e=Float64Array.from(e0e(e)),!(!(i=e.length)||isNaN(n=+n))){if(n<=0||i<2)return HR(e);if(n>=1)return qR(e);var i,r=(i-1)*n,a=Math.floor(r),o=qR(yU(e,a).subarray(0,a+1)),l=HR(e.subarray(a+1));return o+(l-o)*(r-a)}}function f0e(e,n,t=vU){if(!(!(i=e.length)||isNaN(n=+n))){if(n<=0||i<2)return+t(e[0],0,e);if(n>=1)return+t(e[i-1],i-1,e);var i,r=(i-1)*n,a=Math.floor(r),o=+t(e[a],a,e),l=+t(e[a+1],a+1,e);return o+(l-o)*(r-a)}}function c0e(e,n,t){e=+e,n=+n,t=(r=arguments.length)<2?(n=e,e=0,1):r<3?1:+t;for(var i=-1,r=Math.max(0,Math.ceil((n-e)/t))|0,a=new Array(r);++i>8&15|n>>4&240,n>>4&15|n&240,(n&15)<<4|n&15,1):t===8?Xv(n>>24&255,n>>16&255,n>>8&255,(n&255)/255):t===4?Xv(n>>12&15|n>>8&240,n>>8&15|n>>4&240,n>>4&15|n&240,((n&15)<<4|n&15)/255):null):(n=h0e.exec(e))?new _r(n[1],n[2],n[3],1):(n=m0e.exec(e))?new _r(n[1]*255/100,n[2]*255/100,n[3]*255/100,1):(n=p0e.exec(e))?Xv(n[1],n[2],n[3],n[4]):(n=v0e.exec(e))?Xv(n[1]*255/100,n[2]*255/100,n[3]*255/100,n[4]):(n=g0e.exec(e))?XR(n[1],n[2]/100,n[3]/100,1):(n=y0e.exec(e))?XR(n[1],n[2]/100,n[3]/100,n[4]):UR.hasOwnProperty(e)?GR(UR[e]):e==="transparent"?new _r(NaN,NaN,NaN,0):null}function GR(e){return new _r(e>>16&255,e>>8&255,e&255,1)}function Xv(e,n,t,i){return i<=0&&(e=n=t=NaN),new _r(e,n,t,i)}function k0e(e){return e instanceof hp||(e=dm(e)),e?(e=e.rgb(),new _r(e.r,e.g,e.b,e.opacity)):new _r}function C4(e,n,t,i){return arguments.length===1?k0e(e):new _r(e,n,t,i??1)}function _r(e,n,t,i){this.r=+e,this.g=+n,this.b=+t,this.opacity=+i}eA(_r,C4,wU(hp,{brighter(e){return e=e==null?c1:Math.pow(c1,e),new _r(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?fm:Math.pow(fm,e),new _r(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new _r(mu(this.r),mu(this.g),mu(this.b),d1(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:YR,formatHex:YR,formatHex8:_0e,formatRgb:KR,toString:KR}));function YR(){return`#${uu(this.r)}${uu(this.g)}${uu(this.b)}`}function _0e(){return`#${uu(this.r)}${uu(this.g)}${uu(this.b)}${uu((isNaN(this.opacity)?1:this.opacity)*255)}`}function KR(){const e=d1(this.opacity);return`${e===1?"rgb(":"rgba("}${mu(this.r)}, ${mu(this.g)}, ${mu(this.b)}${e===1?")":`, ${e})`}`}function d1(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function mu(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function uu(e){return e=mu(e),(e<16?"0":"")+e.toString(16)}function XR(e,n,t,i){return i<=0?e=n=t=NaN:t<=0||t>=1?e=n=NaN:n<=0&&(e=NaN),new za(e,n,t,i)}function kU(e){if(e instanceof za)return new za(e.h,e.s,e.l,e.opacity);if(e instanceof hp||(e=dm(e)),!e)return new za;if(e instanceof za)return e;e=e.rgb();var n=e.r/255,t=e.g/255,i=e.b/255,r=Math.min(n,t,i),a=Math.max(n,t,i),o=NaN,l=a-r,f=(a+r)/2;return l?(n===a?o=(t-i)/l+(t0&&f<1?0:o,new za(o,l,f,e.opacity)}function x0e(e,n,t,i){return arguments.length===1?kU(e):new za(e,n,t,i??1)}function za(e,n,t,i){this.h=+e,this.s=+n,this.l=+t,this.opacity=+i}eA(za,x0e,wU(hp,{brighter(e){return e=e==null?c1:Math.pow(c1,e),new za(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?fm:Math.pow(fm,e),new za(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,n=isNaN(e)||isNaN(this.s)?0:this.s,t=this.l,i=t+(t<.5?t:1-t)*n,r=2*t-i;return new _r(h3(e>=240?e-240:e+120,r,i),h3(e,r,i),h3(e<120?e+240:e-120,r,i),this.opacity)},clamp(){return new za(ZR(this.h),Zv(this.s),Zv(this.l),d1(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=d1(this.opacity);return`${e===1?"hsl(":"hsla("}${ZR(this.h)}, ${Zv(this.s)*100}%, ${Zv(this.l)*100}%${e===1?")":`, ${e})`}`}}));function ZR(e){return e=(e||0)%360,e<0?e+360:e}function Zv(e){return Math.max(0,Math.min(1,e||0))}function h3(e,n,t){return(e<60?n+(t-n)*e/60:e<180?t:e<240?n+(t-n)*(240-e)/60:n)*255}const nA=e=>()=>e;function S0e(e,n){return function(t){return e+t*n}}function C0e(e,n,t){return e=Math.pow(e,t),n=Math.pow(n,t)-e,t=1/t,function(i){return Math.pow(e+i*n,t)}}function A0e(e){return(e=+e)==1?_U:function(n,t){return t-n?C0e(n,t,e):nA(isNaN(n)?t:n)}}function _U(e,n){var t=n-e;return t?S0e(e,t):nA(isNaN(e)?n:e)}const QR=(function e(n){var t=A0e(n);function i(r,a){var o=t((r=C4(r)).r,(a=C4(a)).r),l=t(r.g,a.g),f=t(r.b,a.b),c=_U(r.opacity,a.opacity);return function(h){return r.r=o(h),r.g=l(h),r.b=f(h),r.opacity=c(h),r+""}}return i.gamma=e,i})(1);function O0e(e,n){n||(n=[]);var t=e?Math.min(n.length,e.length):0,i=n.slice(),r;return function(a){for(r=0;rt&&(a=n.slice(t,a),l[o]?l[o]+=a:l[++o]=a),(i=i[0])===(r=r[0])?l[o]?l[o]+=r:l[++o]=r:(l[++o]=null,f.push({i:o,x:h1(i,r)})),t=m3.lastIndex;return tn&&(t=e,e=n,n=t),function(i){return Math.max(e,Math.min(n,i))}}function L0e(e,n,t){var i=e[0],r=e[1],a=n[0],o=n[1];return r2?I0e:L0e,f=c=null,d}function d(p){return p==null||isNaN(p=+p)?a:(f||(f=l(e.map(i),n,t)))(i(o(p)))}return d.invert=function(p){return o(r((c||(c=l(n,e.map(i),h1)))(p)))},d.domain=function(p){return arguments.length?(e=Array.from(p,m1),h()):e.slice()},d.range=function(p){return arguments.length?(n=Array.from(p),h()):n.slice()},d.rangeRound=function(p){return n=Array.from(p),t=tA,h()},d.clamp=function(p){return arguments.length?(o=p?!0:ur,h()):o!==ur},d.interpolate=function(p){return arguments.length?(t=p,h()):t},d.unknown=function(p){return arguments.length?(a=p,d):a},function(p,v){return i=p,r=v,h()}}function iA(){return R0()(ur,ur)}function B0e(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function p1(e,n){if(!isFinite(e)||e===0)return null;var t=(e=n?e.toExponential(n-1):e.toExponential()).indexOf("e"),i=e.slice(0,t);return[i.length>1?i[0]+i.slice(2):i,+e.slice(t+1)]}function fc(e){return e=p1(Math.abs(e)),e?e[1]:NaN}function F0e(e,n){return function(t,i){for(var r=t.length,a=[],o=0,l=e[0],f=0;r>0&&l>0&&(f+l+1>i&&(l=Math.max(1,i-f)),a.push(t.substring(r-=l,r+l)),!((f+=l+1)>i));)l=e[o=(o+1)%e.length];return a.reverse().join(n)}}function q0e(e){return function(n){return n.replace(/[0-9]/g,function(t){return e[+t]})}}var H0e=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function hm(e){if(!(n=H0e.exec(e)))throw new Error("invalid format: "+e);var n;return new rA({fill:n[1],align:n[2],sign:n[3],symbol:n[4],zero:n[5],width:n[6],comma:n[7],precision:n[8]&&n[8].slice(1),trim:n[9],type:n[10]})}hm.prototype=rA.prototype;function rA(e){this.fill=e.fill===void 0?" ":e.fill+"",this.align=e.align===void 0?">":e.align+"",this.sign=e.sign===void 0?"-":e.sign+"",this.symbol=e.symbol===void 0?"":e.symbol+"",this.zero=!!e.zero,this.width=e.width===void 0?void 0:+e.width,this.comma=!!e.comma,this.precision=e.precision===void 0?void 0:+e.precision,this.trim=!!e.trim,this.type=e.type===void 0?"":e.type+""}rA.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function U0e(e){e:for(var n=e.length,t=1,i=-1,r;t0&&(i=0);break}return i>0?e.slice(0,i)+e.slice(r+1):e}var v1;function V0e(e,n){var t=p1(e,n);if(!t)return v1=void 0,e.toPrecision(n);var i=t[0],r=t[1],a=r-(v1=Math.max(-8,Math.min(8,Math.floor(r/3)))*3)+1,o=i.length;return a===o?i:a>o?i+new Array(a-o+1).join("0"):a>0?i.slice(0,a)+"."+i.slice(a):"0."+new Array(1-a).join("0")+p1(e,Math.max(0,n+a-1))[0]}function eP(e,n){var t=p1(e,n);if(!t)return e+"";var i=t[0],r=t[1];return r<0?"0."+new Array(-r).join("0")+i:i.length>r+1?i.slice(0,r+1)+"."+i.slice(r+1):i+new Array(r-i.length+2).join("0")}const nP={"%":(e,n)=>(e*100).toFixed(n),b:e=>Math.round(e).toString(2),c:e=>e+"",d:B0e,e:(e,n)=>e.toExponential(n),f:(e,n)=>e.toFixed(n),g:(e,n)=>e.toPrecision(n),o:e=>Math.round(e).toString(8),p:(e,n)=>eP(e*100,n),r:eP,s:V0e,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function tP(e){return e}var iP=Array.prototype.map,rP=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function W0e(e){var n=e.grouping===void 0||e.thousands===void 0?tP:F0e(iP.call(e.grouping,Number),e.thousands+""),t=e.currency===void 0?"":e.currency[0]+"",i=e.currency===void 0?"":e.currency[1]+"",r=e.decimal===void 0?".":e.decimal+"",a=e.numerals===void 0?tP:q0e(iP.call(e.numerals,String)),o=e.percent===void 0?"%":e.percent+"",l=e.minus===void 0?"−":e.minus+"",f=e.nan===void 0?"NaN":e.nan+"";function c(d,p){d=hm(d);var v=d.fill,b=d.align,w=d.sign,k=d.symbol,_=d.zero,C=d.width,x=d.comma,E=d.precision,O=d.trim,j=d.type;j==="n"?(x=!0,j="g"):nP[j]||(E===void 0&&(E=12),O=!0,j="g"),(_||v==="0"&&b==="=")&&(_=!0,v="0",b="=");var M=(p&&p.prefix!==void 0?p.prefix:"")+(k==="$"?t:k==="#"&&/[boxX]/.test(j)?"0"+j.toLowerCase():""),P=(k==="$"?i:/[%p]/.test(j)?o:"")+(p&&p.suffix!==void 0?p.suffix:""),F=nP[j],R=/[defgprs%]/.test(j);E=E===void 0?6:/[gprs]/.test(j)?Math.max(1,Math.min(21,E)):Math.max(0,Math.min(20,E));function L(B){var G=M,U=P,H,N,z;if(j==="c")U=F(B)+U,B="";else{B=+B;var q=B<0||1/B<0;if(B=isNaN(B)?f:F(Math.abs(B),E),O&&(B=U0e(B)),q&&+B==0&&w!=="+"&&(q=!1),G=(q?w==="("?w:l:w==="-"||w==="("?"":w)+G,U=(j==="s"&&!isNaN(B)&&v1!==void 0?rP[8+v1/3]:"")+U+(q&&w==="("?")":""),R){for(H=-1,N=B.length;++Hz||z>57){U=(z===46?r+B.slice(H+1):B.slice(H))+U,B=B.slice(0,H);break}}}x&&!_&&(B=n(B,1/0));var Y=G.length+B.length+U.length,D=Y>1)+G+B+U+D.slice(Y);break;default:B=D+G+B+U;break}return a(B)}return L.toString=function(){return d+""},L}function h(d,p){var v=Math.max(-8,Math.min(8,Math.floor(fc(p)/3)))*3,b=Math.pow(10,-v),w=c((d=hm(d),d.type="f",d),{suffix:rP[8+v/3]});return function(k){return w(b*k)}}return{format:c,formatPrefix:h}}var Qv,aA,xU;G0e({thousands:",",grouping:[3],currency:["$",""]});function G0e(e){return Qv=W0e(e),aA=Qv.format,xU=Qv.formatPrefix,Qv}function Y0e(e){return Math.max(0,-fc(Math.abs(e)))}function K0e(e,n){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(fc(n)/3)))*3-fc(Math.abs(e)))}function X0e(e,n){return e=Math.abs(e),n=Math.abs(n)-e,Math.max(0,fc(n)-fc(e))+1}function SU(e,n,t,i){var r=x4(e,n,t),a;switch(i=hm(i??",f"),i.type){case"s":{var o=Math.max(Math.abs(e),Math.abs(n));return i.precision==null&&!isNaN(a=K0e(r,o))&&(i.precision=a),xU(i,o)}case"":case"e":case"g":case"p":case"r":{i.precision==null&&!isNaN(a=X0e(r,Math.max(Math.abs(e),Math.abs(n))))&&(i.precision=a-(i.type==="e"));break}case"f":case"%":{i.precision==null&&!isNaN(a=Y0e(r))&&(i.precision=a-(i.type==="%")*2);break}}return aA(i)}function xl(e){var n=e.domain;return e.ticks=function(t){var i=n();return k4(i[0],i[i.length-1],t??10)},e.tickFormat=function(t,i){var r=n();return SU(r[0],r[r.length-1],t??10,i)},e.nice=function(t){t==null&&(t=10);var i=n(),r=0,a=i.length-1,o=i[r],l=i[a],f,c,h=10;for(l0;){if(c=_4(o,l,t),c===f)return i[r]=o,i[a]=l,n(i);if(c>0)o=Math.floor(o/c)*c,l=Math.ceil(l/c)*c;else if(c<0)o=Math.ceil(o*c)/c,l=Math.floor(l*c)/c;else break;f=c}return e},e}function g1(){var e=iA();return e.copy=function(){return mp(e,g1())},Ca.apply(e,arguments),xl(e)}function CU(e){var n;function t(i){return i==null||isNaN(i=+i)?n:i}return t.invert=t,t.domain=t.range=function(i){return arguments.length?(e=Array.from(i,m1),t):e.slice()},t.unknown=function(i){return arguments.length?(n=i,t):n},t.copy=function(){return CU(e).unknown(n)},e=arguments.length?Array.from(e,m1):[0,1],xl(t)}function AU(e,n){e=e.slice();var t=0,i=e.length-1,r=e[t],a=e[i],o;return aMath.pow(e,n)}function nbe(e){return e===Math.E?Math.log:e===10&&Math.log10||e===2&&Math.log2||(e=Math.log(e),n=>Math.log(n)/e)}function sP(e){return(n,t)=>-e(-n,t)}function oA(e){const n=e(aP,oP),t=n.domain;let i=10,r,a;function o(){return r=nbe(i),a=ebe(i),t()[0]<0?(r=sP(r),a=sP(a),e(Z0e,Q0e)):e(aP,oP),n}return n.base=function(l){return arguments.length?(i=+l,o()):i},n.domain=function(l){return arguments.length?(t(l),o()):t()},n.ticks=l=>{const f=t();let c=f[0],h=f[f.length-1];const d=h0){for(;p<=v;++p)for(b=1;bh)break;_.push(w)}}else for(;p<=v;++p)for(b=i-1;b>=1;--b)if(w=p>0?b/a(-p):b*a(p),!(wh)break;_.push(w)}_.length*2{if(l==null&&(l=10),f==null&&(f=i===10?"s":","),typeof f!="function"&&(!(i%1)&&(f=hm(f)).precision==null&&(f.trim=!0),f=aA(f)),l===1/0)return f;const c=Math.max(1,i*l/n.ticks().length);return h=>{let d=h/a(Math.round(r(h)));return d*it(AU(t(),{floor:l=>a(Math.floor(r(l))),ceil:l=>a(Math.ceil(r(l)))})),n}function OU(){const e=oA(R0()).domain([1,10]);return e.copy=()=>mp(e,OU()).base(e.base()),Ca.apply(e,arguments),e}function lP(e){return function(n){return Math.sign(n)*Math.log1p(Math.abs(n/e))}}function uP(e){return function(n){return Math.sign(n)*Math.expm1(Math.abs(n))*e}}function sA(e){var n=1,t=e(lP(n),uP(n));return t.constant=function(i){return arguments.length?e(lP(n=+i),uP(n)):n},xl(t)}function jU(){var e=sA(R0());return e.copy=function(){return mp(e,jU()).constant(e.constant())},Ca.apply(e,arguments)}function fP(e){return function(n){return n<0?-Math.pow(-n,e):Math.pow(n,e)}}function tbe(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function ibe(e){return e<0?-e*e:e*e}function lA(e){var n=e(ur,ur),t=1;function i(){return t===1?e(ur,ur):t===.5?e(tbe,ibe):e(fP(t),fP(1/t))}return n.exponent=function(r){return arguments.length?(t=+r,i()):t},xl(n)}function uA(){var e=lA(R0());return e.copy=function(){return mp(e,uA()).exponent(e.exponent())},Ca.apply(e,arguments),e}function rbe(){return uA.apply(null,arguments).exponent(.5)}function cP(e){return Math.sign(e)*e*e}function abe(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function EU(){var e=iA(),n=[0,1],t=!1,i;function r(a){var o=abe(e(a));return isNaN(o)?i:t?Math.round(o):o}return r.invert=function(a){return e.invert(cP(a))},r.domain=function(a){return arguments.length?(e.domain(a),r):e.domain()},r.range=function(a){return arguments.length?(e.range((n=Array.from(a,m1)).map(cP)),r):n.slice()},r.rangeRound=function(a){return r.range(a).round(!0)},r.round=function(a){return arguments.length?(t=!!a,r):t},r.clamp=function(a){return arguments.length?(e.clamp(a),r):e.clamp()},r.unknown=function(a){return arguments.length?(i=a,r):i},r.copy=function(){return EU(e.domain(),n).round(t).clamp(e.clamp()).unknown(i)},Ca.apply(r,arguments),xl(r)}function TU(){var e=[],n=[],t=[],i;function r(){var o=0,l=Math.max(1,n.length);for(t=new Array(l-1);++o0?t[l-1]:e[0],l=t?[i[t-1],n]:[i[c-1],i[c]]},o.unknown=function(f){return arguments.length&&(a=f),o},o.thresholds=function(){return i.slice()},o.copy=function(){return MU().domain([e,n]).range(r).unknown(a)},Ca.apply(xl(o),arguments)}function DU(){var e=[.5],n=[0,1],t,i=1;function r(a){return a!=null&&a<=a?n[dp(e,a,0,i)]:t}return r.domain=function(a){return arguments.length?(e=Array.from(a),i=Math.min(e.length,n.length-1),r):e.slice()},r.range=function(a){return arguments.length?(n=Array.from(a),i=Math.min(e.length,n.length-1),r):n.slice()},r.invertExtent=function(a){var o=n.indexOf(a);return[e[o-1],e[o]]},r.unknown=function(a){return arguments.length?(t=a,r):t},r.copy=function(){return DU().domain(e).range(n).unknown(t)},Ca.apply(r,arguments)}const p3=new Date,v3=new Date;function Si(e,n,t,i){function r(a){return e(a=arguments.length===0?new Date:new Date(+a)),a}return r.floor=a=>(e(a=new Date(+a)),a),r.ceil=a=>(e(a=new Date(a-1)),n(a,1),e(a),a),r.round=a=>{const o=r(a),l=r.ceil(a);return a-o(n(a=new Date(+a),o==null?1:Math.floor(o)),a),r.range=(a,o,l)=>{const f=[];if(a=r.ceil(a),l=l==null?1:Math.floor(l),!(a0))return f;let c;do f.push(c=new Date(+a)),n(a,l),e(a);while(cSi(o=>{if(o>=o)for(;e(o),!a(o);)o.setTime(o-1)},(o,l)=>{if(o>=o)if(l<0)for(;++l<=0;)for(;n(o,-1),!a(o););else for(;--l>=0;)for(;n(o,1),!a(o););}),t&&(r.count=(a,o)=>(p3.setTime(+a),v3.setTime(+o),e(p3),e(v3),Math.floor(t(p3,v3))),r.every=a=>(a=Math.floor(a),!isFinite(a)||!(a>0)?null:a>1?r.filter(i?o=>i(o)%a===0:o=>r.count(0,o)%a===0):r)),r}const y1=Si(()=>{},(e,n)=>{e.setTime(+e+n)},(e,n)=>n-e);y1.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?Si(n=>{n.setTime(Math.floor(n/e)*e)},(n,t)=>{n.setTime(+n+t*e)},(n,t)=>(t-n)/e):y1);y1.range;const Vo=1e3,ma=Vo*60,Wo=ma*60,as=Wo*24,fA=as*7,dP=as*30,g3=as*365,fu=Si(e=>{e.setTime(e-e.getMilliseconds())},(e,n)=>{e.setTime(+e+n*Vo)},(e,n)=>(n-e)/Vo,e=>e.getUTCSeconds());fu.range;const cA=Si(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Vo)},(e,n)=>{e.setTime(+e+n*ma)},(e,n)=>(n-e)/ma,e=>e.getMinutes());cA.range;const dA=Si(e=>{e.setUTCSeconds(0,0)},(e,n)=>{e.setTime(+e+n*ma)},(e,n)=>(n-e)/ma,e=>e.getUTCMinutes());dA.range;const hA=Si(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Vo-e.getMinutes()*ma)},(e,n)=>{e.setTime(+e+n*Wo)},(e,n)=>(n-e)/Wo,e=>e.getHours());hA.range;const mA=Si(e=>{e.setUTCMinutes(0,0,0)},(e,n)=>{e.setTime(+e+n*Wo)},(e,n)=>(n-e)/Wo,e=>e.getUTCHours());mA.range;const pp=Si(e=>e.setHours(0,0,0,0),(e,n)=>e.setDate(e.getDate()+n),(e,n)=>(n-e-(n.getTimezoneOffset()-e.getTimezoneOffset())*ma)/as,e=>e.getDate()-1);pp.range;const P0=Si(e=>{e.setUTCHours(0,0,0,0)},(e,n)=>{e.setUTCDate(e.getUTCDate()+n)},(e,n)=>(n-e)/as,e=>e.getUTCDate()-1);P0.range;const RU=Si(e=>{e.setUTCHours(0,0,0,0)},(e,n)=>{e.setUTCDate(e.getUTCDate()+n)},(e,n)=>(n-e)/as,e=>Math.floor(e/as));RU.range;function Iu(e){return Si(n=>{n.setDate(n.getDate()-(n.getDay()+7-e)%7),n.setHours(0,0,0,0)},(n,t)=>{n.setDate(n.getDate()+t*7)},(n,t)=>(t-n-(t.getTimezoneOffset()-n.getTimezoneOffset())*ma)/fA)}const N0=Iu(0),b1=Iu(1),obe=Iu(2),sbe=Iu(3),cc=Iu(4),lbe=Iu(5),ube=Iu(6);N0.range;b1.range;obe.range;sbe.range;cc.range;lbe.range;ube.range;function Bu(e){return Si(n=>{n.setUTCDate(n.getUTCDate()-(n.getUTCDay()+7-e)%7),n.setUTCHours(0,0,0,0)},(n,t)=>{n.setUTCDate(n.getUTCDate()+t*7)},(n,t)=>(t-n)/fA)}const $0=Bu(0),w1=Bu(1),fbe=Bu(2),cbe=Bu(3),dc=Bu(4),dbe=Bu(5),hbe=Bu(6);$0.range;w1.range;fbe.range;cbe.range;dc.range;dbe.range;hbe.range;const pA=Si(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,n)=>{e.setMonth(e.getMonth()+n)},(e,n)=>n.getMonth()-e.getMonth()+(n.getFullYear()-e.getFullYear())*12,e=>e.getMonth());pA.range;const vA=Si(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,n)=>{e.setUTCMonth(e.getUTCMonth()+n)},(e,n)=>n.getUTCMonth()-e.getUTCMonth()+(n.getUTCFullYear()-e.getUTCFullYear())*12,e=>e.getUTCMonth());vA.range;const os=Si(e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,n)=>{e.setFullYear(e.getFullYear()+n)},(e,n)=>n.getFullYear()-e.getFullYear(),e=>e.getFullYear());os.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Si(n=>{n.setFullYear(Math.floor(n.getFullYear()/e)*e),n.setMonth(0,1),n.setHours(0,0,0,0)},(n,t)=>{n.setFullYear(n.getFullYear()+t*e)});os.range;const ss=Si(e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,n)=>{e.setUTCFullYear(e.getUTCFullYear()+n)},(e,n)=>n.getUTCFullYear()-e.getUTCFullYear(),e=>e.getUTCFullYear());ss.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Si(n=>{n.setUTCFullYear(Math.floor(n.getUTCFullYear()/e)*e),n.setUTCMonth(0,1),n.setUTCHours(0,0,0,0)},(n,t)=>{n.setUTCFullYear(n.getUTCFullYear()+t*e)});ss.range;function PU(e,n,t,i,r,a){const o=[[fu,1,Vo],[fu,5,5*Vo],[fu,15,15*Vo],[fu,30,30*Vo],[a,1,ma],[a,5,5*ma],[a,15,15*ma],[a,30,30*ma],[r,1,Wo],[r,3,3*Wo],[r,6,6*Wo],[r,12,12*Wo],[i,1,as],[i,2,2*as],[t,1,fA],[n,1,dP],[n,3,3*dP],[e,1,g3]];function l(c,h,d){const p=hk).right(o,p);if(v===o.length)return e.every(x4(c/g3,h/g3,d));if(v===0)return y1.every(Math.max(x4(c,h,d),1));const[b,w]=o[p/o[v-1][2]53)return null;"w"in ne||(ne.w=1),"Z"in ne?(we=b3(lh(ne.y,0,1)),Ce=we.getUTCDay(),we=Ce>4||Ce===0?w1.ceil(we):w1(we),we=P0.offset(we,(ne.V-1)*7),ne.y=we.getUTCFullYear(),ne.m=we.getUTCMonth(),ne.d=we.getUTCDate()+(ne.w+6)%7):(we=y3(lh(ne.y,0,1)),Ce=we.getDay(),we=Ce>4||Ce===0?b1.ceil(we):b1(we),we=pp.offset(we,(ne.V-1)*7),ne.y=we.getFullYear(),ne.m=we.getMonth(),ne.d=we.getDate()+(ne.w+6)%7)}else("W"in ne||"U"in ne)&&("w"in ne||(ne.w="u"in ne?ne.u%7:"W"in ne?1:0),Ce="Z"in ne?b3(lh(ne.y,0,1)).getUTCDay():y3(lh(ne.y,0,1)).getDay(),ne.m=0,ne.d="W"in ne?(ne.w+6)%7+ne.W*7-(Ce+5)%7:ne.w+ne.U*7-(Ce+6)%7);return"Z"in ne?(ne.H+=ne.Z/100|0,ne.M+=ne.Z%100,b3(ne)):y3(ne)}}function P(ae,le,_e,ne){for(var ze=0,we=le.length,Ce=_e.length,Ne,ve;ze=Ce)return-1;if(Ne=le.charCodeAt(ze++),Ne===37){if(Ne=le.charAt(ze++),ve=O[Ne in hP?le.charAt(ze++):Ne],!ve||(ne=ve(ae,_e,ne))<0)return-1}else if(Ne!=_e.charCodeAt(ne++))return-1}return ne}function F(ae,le,_e){var ne=c.exec(le.slice(_e));return ne?(ae.p=h.get(ne[0].toLowerCase()),_e+ne[0].length):-1}function R(ae,le,_e){var ne=v.exec(le.slice(_e));return ne?(ae.w=b.get(ne[0].toLowerCase()),_e+ne[0].length):-1}function L(ae,le,_e){var ne=d.exec(le.slice(_e));return ne?(ae.w=p.get(ne[0].toLowerCase()),_e+ne[0].length):-1}function B(ae,le,_e){var ne=_.exec(le.slice(_e));return ne?(ae.m=C.get(ne[0].toLowerCase()),_e+ne[0].length):-1}function G(ae,le,_e){var ne=w.exec(le.slice(_e));return ne?(ae.m=k.get(ne[0].toLowerCase()),_e+ne[0].length):-1}function U(ae,le,_e){return P(ae,n,le,_e)}function H(ae,le,_e){return P(ae,t,le,_e)}function N(ae,le,_e){return P(ae,i,le,_e)}function z(ae){return o[ae.getDay()]}function q(ae){return a[ae.getDay()]}function Y(ae){return f[ae.getMonth()]}function D(ae){return l[ae.getMonth()]}function V(ae){return r[+(ae.getHours()>=12)]}function W(ae){return 1+~~(ae.getMonth()/3)}function $(ae){return o[ae.getUTCDay()]}function X(ae){return a[ae.getUTCDay()]}function ee(ae){return f[ae.getUTCMonth()]}function re(ae){return l[ae.getUTCMonth()]}function se(ae){return r[+(ae.getUTCHours()>=12)]}function ye(ae){return 1+~~(ae.getUTCMonth()/3)}return{format:function(ae){var le=j(ae+="",x);return le.toString=function(){return ae},le},parse:function(ae){var le=M(ae+="",!1);return le.toString=function(){return ae},le},utcFormat:function(ae){var le=j(ae+="",E);return le.toString=function(){return ae},le},utcParse:function(ae){var le=M(ae+="",!0);return le.toString=function(){return ae},le}}}var hP={"-":"",_:" ",0:"0"},Di=/^\s*\d+/,bbe=/^%/,wbe=/[\\^$*+?|[\]().{}]/g;function dt(e,n,t){var i=e<0?"-":"",r=(i?-e:e)+"",a=r.length;return i+(a[n.toLowerCase(),t]))}function _be(e,n,t){var i=Di.exec(n.slice(t,t+1));return i?(e.w=+i[0],t+i[0].length):-1}function xbe(e,n,t){var i=Di.exec(n.slice(t,t+1));return i?(e.u=+i[0],t+i[0].length):-1}function Sbe(e,n,t){var i=Di.exec(n.slice(t,t+2));return i?(e.U=+i[0],t+i[0].length):-1}function Cbe(e,n,t){var i=Di.exec(n.slice(t,t+2));return i?(e.V=+i[0],t+i[0].length):-1}function Abe(e,n,t){var i=Di.exec(n.slice(t,t+2));return i?(e.W=+i[0],t+i[0].length):-1}function mP(e,n,t){var i=Di.exec(n.slice(t,t+4));return i?(e.y=+i[0],t+i[0].length):-1}function pP(e,n,t){var i=Di.exec(n.slice(t,t+2));return i?(e.y=+i[0]+(+i[0]>68?1900:2e3),t+i[0].length):-1}function Obe(e,n,t){var i=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(n.slice(t,t+6));return i?(e.Z=i[1]?0:-(i[2]+(i[3]||"00")),t+i[0].length):-1}function jbe(e,n,t){var i=Di.exec(n.slice(t,t+1));return i?(e.q=i[0]*3-3,t+i[0].length):-1}function Ebe(e,n,t){var i=Di.exec(n.slice(t,t+2));return i?(e.m=i[0]-1,t+i[0].length):-1}function vP(e,n,t){var i=Di.exec(n.slice(t,t+2));return i?(e.d=+i[0],t+i[0].length):-1}function Tbe(e,n,t){var i=Di.exec(n.slice(t,t+3));return i?(e.m=0,e.d=+i[0],t+i[0].length):-1}function gP(e,n,t){var i=Di.exec(n.slice(t,t+2));return i?(e.H=+i[0],t+i[0].length):-1}function Mbe(e,n,t){var i=Di.exec(n.slice(t,t+2));return i?(e.M=+i[0],t+i[0].length):-1}function Dbe(e,n,t){var i=Di.exec(n.slice(t,t+2));return i?(e.S=+i[0],t+i[0].length):-1}function Rbe(e,n,t){var i=Di.exec(n.slice(t,t+3));return i?(e.L=+i[0],t+i[0].length):-1}function Pbe(e,n,t){var i=Di.exec(n.slice(t,t+6));return i?(e.L=Math.floor(i[0]/1e3),t+i[0].length):-1}function Nbe(e,n,t){var i=bbe.exec(n.slice(t,t+1));return i?t+i[0].length:-1}function $be(e,n,t){var i=Di.exec(n.slice(t));return i?(e.Q=+i[0],t+i[0].length):-1}function zbe(e,n,t){var i=Di.exec(n.slice(t));return i?(e.s=+i[0],t+i[0].length):-1}function yP(e,n){return dt(e.getDate(),n,2)}function Lbe(e,n){return dt(e.getHours(),n,2)}function Ibe(e,n){return dt(e.getHours()%12||12,n,2)}function Bbe(e,n){return dt(1+pp.count(os(e),e),n,3)}function NU(e,n){return dt(e.getMilliseconds(),n,3)}function Fbe(e,n){return NU(e,n)+"000"}function qbe(e,n){return dt(e.getMonth()+1,n,2)}function Hbe(e,n){return dt(e.getMinutes(),n,2)}function Ube(e,n){return dt(e.getSeconds(),n,2)}function Vbe(e){var n=e.getDay();return n===0?7:n}function Wbe(e,n){return dt(N0.count(os(e)-1,e),n,2)}function $U(e){var n=e.getDay();return n>=4||n===0?cc(e):cc.ceil(e)}function Gbe(e,n){return e=$U(e),dt(cc.count(os(e),e)+(os(e).getDay()===4),n,2)}function Ybe(e){return e.getDay()}function Kbe(e,n){return dt(b1.count(os(e)-1,e),n,2)}function Xbe(e,n){return dt(e.getFullYear()%100,n,2)}function Zbe(e,n){return e=$U(e),dt(e.getFullYear()%100,n,2)}function Qbe(e,n){return dt(e.getFullYear()%1e4,n,4)}function Jbe(e,n){var t=e.getDay();return e=t>=4||t===0?cc(e):cc.ceil(e),dt(e.getFullYear()%1e4,n,4)}function ewe(e){var n=e.getTimezoneOffset();return(n>0?"-":(n*=-1,"+"))+dt(n/60|0,"0",2)+dt(n%60,"0",2)}function bP(e,n){return dt(e.getUTCDate(),n,2)}function nwe(e,n){return dt(e.getUTCHours(),n,2)}function twe(e,n){return dt(e.getUTCHours()%12||12,n,2)}function iwe(e,n){return dt(1+P0.count(ss(e),e),n,3)}function zU(e,n){return dt(e.getUTCMilliseconds(),n,3)}function rwe(e,n){return zU(e,n)+"000"}function awe(e,n){return dt(e.getUTCMonth()+1,n,2)}function owe(e,n){return dt(e.getUTCMinutes(),n,2)}function swe(e,n){return dt(e.getUTCSeconds(),n,2)}function lwe(e){var n=e.getUTCDay();return n===0?7:n}function uwe(e,n){return dt($0.count(ss(e)-1,e),n,2)}function LU(e){var n=e.getUTCDay();return n>=4||n===0?dc(e):dc.ceil(e)}function fwe(e,n){return e=LU(e),dt(dc.count(ss(e),e)+(ss(e).getUTCDay()===4),n,2)}function cwe(e){return e.getUTCDay()}function dwe(e,n){return dt(w1.count(ss(e)-1,e),n,2)}function hwe(e,n){return dt(e.getUTCFullYear()%100,n,2)}function mwe(e,n){return e=LU(e),dt(e.getUTCFullYear()%100,n,2)}function pwe(e,n){return dt(e.getUTCFullYear()%1e4,n,4)}function vwe(e,n){var t=e.getUTCDay();return e=t>=4||t===0?dc(e):dc.ceil(e),dt(e.getUTCFullYear()%1e4,n,4)}function gwe(){return"+0000"}function wP(){return"%"}function kP(e){return+e}function _P(e){return Math.floor(+e/1e3)}var Tf,IU,BU;ywe({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function ywe(e){return Tf=ybe(e),IU=Tf.format,Tf.parse,BU=Tf.utcFormat,Tf.utcParse,Tf}function bwe(e){return new Date(e)}function wwe(e){return e instanceof Date?+e:+new Date(+e)}function gA(e,n,t,i,r,a,o,l,f,c){var h=iA(),d=h.invert,p=h.domain,v=c(".%L"),b=c(":%S"),w=c("%I:%M"),k=c("%I %p"),_=c("%a %d"),C=c("%b %d"),x=c("%B"),E=c("%Y");function O(j){return(f(j)n(r/(e.length-1)))},t.quantiles=function(i){return Array.from({length:i+1},(r,a)=>u0e(e,a/i))},t.copy=function(){return UU(n).domain(e)},ys.apply(t,arguments)}function L0(){var e=0,n=.5,t=1,i=1,r,a,o,l,f,c=ur,h,d=!1,p;function v(w){return isNaN(w=+w)?p:(w=.5+((w=+h(w))-a)*(i*wt}return k3=e,k3}var _3,AP;function Awe(){if(AP)return _3;AP=1;var e=YU(),n=Cwe(),t=nd();function i(r){return r&&r.length?e(r,t,n):void 0}return _3=i,_3}var Owe=Awe();const nl=ht(Owe);var x3,OP;function jwe(){if(OP)return x3;OP=1;function e(n,t){return ne.e^a.s<0?1:-1;for(i=a.d.length,r=e.d.length,n=0,t=ie.d[n]^a.s<0?1:-1;return i===r?0:i>r^a.s<0?1:-1};sn.decimalPlaces=sn.dp=function(){var e=this,n=e.d.length-1,t=(n-e.e)*qt;if(n=e.d[n],n)for(;n%10==0;n/=10)t--;return t<0?0:t};sn.dividedBy=sn.div=function(e){return es(this,new this.constructor(e))};sn.dividedToIntegerBy=sn.idiv=function(e){var n=this,t=n.constructor;return Mt(es(n,new t(e),0,1),t.precision)};sn.equals=sn.eq=function(e){return!this.cmp(e)};sn.exponent=function(){return vi(this)};sn.greaterThan=sn.gt=function(e){return this.cmp(e)>0};sn.greaterThanOrEqualTo=sn.gte=function(e){return this.cmp(e)>=0};sn.isInteger=sn.isint=function(){return this.e>this.d.length-2};sn.isNegative=sn.isneg=function(){return this.s<0};sn.isPositive=sn.ispos=function(){return this.s>0};sn.isZero=function(){return this.s===0};sn.lessThan=sn.lt=function(e){return this.cmp(e)<0};sn.lessThanOrEqualTo=sn.lte=function(e){return this.cmp(e)<1};sn.logarithm=sn.log=function(e){var n,t=this,i=t.constructor,r=i.precision,a=r+5;if(e===void 0)e=new i(10);else if(e=new i(e),e.s<1||e.eq(Hr))throw Error(ya+"NaN");if(t.s<1)throw Error(ya+(t.s?"NaN":"-Infinity"));return t.eq(Hr)?new i(0):(Yt=!1,n=es(mm(t,a),mm(e,a),a),Yt=!0,Mt(n,r))};sn.minus=sn.sub=function(e){var n=this;return e=new n.constructor(e),n.s==e.s?QU(n,e):XU(n,(e.s=-e.s,e))};sn.modulo=sn.mod=function(e){var n,t=this,i=t.constructor,r=i.precision;if(e=new i(e),!e.s)throw Error(ya+"NaN");return t.s?(Yt=!1,n=es(t,e,0,1).times(e),Yt=!0,t.minus(n)):Mt(new i(t),r)};sn.naturalExponential=sn.exp=function(){return ZU(this)};sn.naturalLogarithm=sn.ln=function(){return mm(this)};sn.negated=sn.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e};sn.plus=sn.add=function(e){var n=this;return e=new n.constructor(e),n.s==e.s?XU(n,e):QU(n,(e.s=-e.s,e))};sn.precision=sn.sd=function(e){var n,t,i,r=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(pu+e);if(n=vi(r)+1,i=r.d.length-1,t=i*qt+1,i=r.d[i],i){for(;i%10==0;i/=10)t--;for(i=r.d[0];i>=10;i/=10)t++}return e&&n>t?n:t};sn.squareRoot=sn.sqrt=function(){var e,n,t,i,r,a,o,l=this,f=l.constructor;if(l.s<1){if(!l.s)return new f(0);throw Error(ya+"NaN")}for(e=vi(l),Yt=!1,r=Math.sqrt(+l),r==0||r==1/0?(n=ro(l.d),(n.length+e)%2==0&&(n+="0"),r=Math.sqrt(n),e=rd((e+1)/2)-(e<0||e%2),r==1/0?n="5e"+e:(n=r.toExponential(),n=n.slice(0,n.indexOf("e")+1)+e),i=new f(n)):i=new f(r.toString()),t=f.precision,r=o=t+3;;)if(a=i,i=a.plus(es(l,a,o+2)).times(.5),ro(a.d).slice(0,o)===(n=ro(i.d)).slice(0,o)){if(n=n.slice(o-3,o+1),r==o&&n=="4999"){if(Mt(a,t+1,0),a.times(a).eq(l)){i=a;break}}else if(n!="9999")break;o+=4}return Yt=!0,Mt(i,t)};sn.times=sn.mul=function(e){var n,t,i,r,a,o,l,f,c,h=this,d=h.constructor,p=h.d,v=(e=new d(e)).d;if(!h.s||!e.s)return new d(0);for(e.s*=h.s,t=h.e+e.e,f=p.length,c=v.length,f=0;){for(n=0,r=f+i;r>i;)l=a[r]+v[i]*p[r-i-1]+n,a[r--]=l%ji|0,n=l/ji|0;a[r]=(a[r]+n)%ji|0}for(;!a[--o];)a.pop();return n?++t:a.shift(),e.d=a,e.e=t,Yt?Mt(e,d.precision):e};sn.toDecimalPlaces=sn.todp=function(e,n){var t=this,i=t.constructor;return t=new i(t),e===void 0?t:(vo(e,0,id),n===void 0?n=i.rounding:vo(n,0,8),Mt(t,e+vi(t)+1,n))};sn.toExponential=function(e,n){var t,i=this,r=i.constructor;return e===void 0?t=Cu(i,!0):(vo(e,0,id),n===void 0?n=r.rounding:vo(n,0,8),i=Mt(new r(i),e+1,n),t=Cu(i,!0,e+1)),t};sn.toFixed=function(e,n){var t,i,r=this,a=r.constructor;return e===void 0?Cu(r):(vo(e,0,id),n===void 0?n=a.rounding:vo(n,0,8),i=Mt(new a(r),e+vi(r)+1,n),t=Cu(i.abs(),!1,e+vi(i)+1),r.isneg()&&!r.isZero()?"-"+t:t)};sn.toInteger=sn.toint=function(){var e=this,n=e.constructor;return Mt(new n(e),vi(e)+1,n.rounding)};sn.toNumber=function(){return+this};sn.toPower=sn.pow=function(e){var n,t,i,r,a,o,l=this,f=l.constructor,c=12,h=+(e=new f(e));if(!e.s)return new f(Hr);if(l=new f(l),!l.s){if(e.s<1)throw Error(ya+"Infinity");return l}if(l.eq(Hr))return l;if(i=f.precision,e.eq(Hr))return Mt(l,i);if(n=e.e,t=e.d.length-1,o=n>=t,a=l.s,o){if((t=h<0?-h:h)<=KU){for(r=new f(Hr),n=Math.ceil(i/qt+4),Yt=!1;t%2&&(r=r.times(l),RP(r.d,n)),t=rd(t/2),t!==0;)l=l.times(l),RP(l.d,n);return Yt=!0,e.s<0?new f(Hr).div(r):Mt(r,i)}}else if(a<0)throw Error(ya+"NaN");return a=a<0&&e.d[Math.max(n,t)]&1?-1:1,l.s=1,Yt=!1,r=e.times(mm(l,i+c)),Yt=!0,r=ZU(r),r.s=a,r};sn.toPrecision=function(e,n){var t,i,r=this,a=r.constructor;return e===void 0?(t=vi(r),i=Cu(r,t<=a.toExpNeg||t>=a.toExpPos)):(vo(e,1,id),n===void 0?n=a.rounding:vo(n,0,8),r=Mt(new a(r),e,n),t=vi(r),i=Cu(r,e<=t||t<=a.toExpNeg,e)),i};sn.toSignificantDigits=sn.tosd=function(e,n){var t=this,i=t.constructor;return e===void 0?(e=i.precision,n=i.rounding):(vo(e,1,id),n===void 0?n=i.rounding:vo(n,0,8)),Mt(new i(t),e,n)};sn.toString=sn.valueOf=sn.val=sn.toJSON=sn[Symbol.for("nodejs.util.inspect.custom")]=function(){var e=this,n=vi(e),t=e.constructor;return Cu(e,n<=t.toExpNeg||n>=t.toExpPos)};function XU(e,n){var t,i,r,a,o,l,f,c,h=e.constructor,d=h.precision;if(!e.s||!n.s)return n.s||(n=new h(e)),Yt?Mt(n,d):n;if(f=e.d,c=n.d,o=e.e,r=n.e,f=f.slice(),a=o-r,a){for(a<0?(i=f,a=-a,l=c.length):(i=c,r=o,l=f.length),o=Math.ceil(d/qt),l=o>l?o+1:l+1,a>l&&(a=l,i.length=1),i.reverse();a--;)i.push(0);i.reverse()}for(l=f.length,a=c.length,l-a<0&&(a=l,i=c,c=f,f=i),t=0;a;)t=(f[--a]=f[a]+c[a]+t)/ji|0,f[a]%=ji;for(t&&(f.unshift(t),++r),l=f.length;f[--l]==0;)f.pop();return n.d=f,n.e=r,Yt?Mt(n,d):n}function vo(e,n,t){if(e!==~~e||et)throw Error(pu+e)}function ro(e){var n,t,i,r=e.length-1,a="",o=e[0];if(r>0){for(a+=o,n=1;no?1:-1;else for(l=f=0;lr[l]?1:-1;break}return f}function t(i,r,a){for(var o=0;a--;)i[a]-=o,o=i[a]1;)i.shift()}return function(i,r,a,o){var l,f,c,h,d,p,v,b,w,k,_,C,x,E,O,j,M,P,F=i.constructor,R=i.s==r.s?1:-1,L=i.d,B=r.d;if(!i.s)return new F(i);if(!r.s)throw Error(ya+"Division by zero");for(f=i.e-r.e,M=B.length,O=L.length,v=new F(R),b=v.d=[],c=0;B[c]==(L[c]||0);)++c;if(B[c]>(L[c]||0)&&--f,a==null?C=a=F.precision:o?C=a+(vi(i)-vi(r))+1:C=a,C<0)return new F(0);if(C=C/qt+2|0,c=0,M==1)for(h=0,B=B[0],C++;(c1&&(B=e(B,h),L=e(L,h),M=B.length,O=L.length),E=M,w=L.slice(0,M),k=w.length;k=ji/2&&++j;do h=0,l=n(B,w,M,k),l<0?(_=w[0],M!=k&&(_=_*ji+(w[1]||0)),h=_/j|0,h>1?(h>=ji&&(h=ji-1),d=e(B,h),p=d.length,k=w.length,l=n(d,w,p,k),l==1&&(h--,t(d,M16)throw Error(wA+vi(e));if(!e.s)return new h(Hr);for(Yt=!1,l=d,o=new h(.03125);e.abs().gte(.1);)e=e.times(o),c+=5;for(i=Math.log(iu(2,c))/Math.LN10*2+5|0,l+=i,t=r=a=new h(Hr),h.precision=l;;){if(r=Mt(r.times(e),l),t=t.times(++f),o=a.plus(es(r,t,l)),ro(o.d).slice(0,l)===ro(a.d).slice(0,l)){for(;c--;)a=Mt(a.times(a),l);return h.precision=d,n==null?(Yt=!0,Mt(a,d)):a}a=o}}function vi(e){for(var n=e.e*qt,t=e.d[0];t>=10;t/=10)n++;return n}function j3(e,n,t){if(n>e.LN10.sd())throw Yt=!0,t&&(e.precision=t),Error(ya+"LN10 precision limit exceeded");return Mt(new e(e.LN10),n)}function Ks(e){for(var n="";e--;)n+="0";return n}function mm(e,n){var t,i,r,a,o,l,f,c,h,d=1,p=10,v=e,b=v.d,w=v.constructor,k=w.precision;if(v.s<1)throw Error(ya+(v.s?"NaN":"-Infinity"));if(v.eq(Hr))return new w(0);if(n==null?(Yt=!1,c=k):c=n,v.eq(10))return n==null&&(Yt=!0),j3(w,c);if(c+=p,w.precision=c,t=ro(b),i=t.charAt(0),a=vi(v),Math.abs(a)<15e14){for(;i<7&&i!=1||i==1&&t.charAt(1)>3;)v=v.times(e),t=ro(v.d),i=t.charAt(0),d++;a=vi(v),i>1?(v=new w("0."+t),a++):v=new w(i+"."+t.slice(1))}else return f=j3(w,c+2,k).times(a+""),v=mm(new w(i+"."+t.slice(1)),c-p).plus(f),w.precision=k,n==null?(Yt=!0,Mt(v,k)):v;for(l=o=v=es(v.minus(Hr),v.plus(Hr),c),h=Mt(v.times(v),c),r=3;;){if(o=Mt(o.times(h),c),f=l.plus(es(o,new w(r),c)),ro(f.d).slice(0,c)===ro(l.d).slice(0,c))return l=l.times(2),a!==0&&(l=l.plus(j3(w,c+2,k).times(a+""))),l=es(l,new w(d),c),w.precision=k,n==null?(Yt=!0,Mt(l,k)):l;l=f,r+=2}}function DP(e,n){var t,i,r;for((t=n.indexOf("."))>-1&&(n=n.replace(".","")),(i=n.search(/e/i))>0?(t<0&&(t=i),t+=+n.slice(i+1),n=n.substring(0,i)):t<0&&(t=n.length),i=0;n.charCodeAt(i)===48;)++i;for(r=n.length;n.charCodeAt(r-1)===48;)--r;if(n=n.slice(i,r),n){if(r-=i,t=t-i-1,e.e=rd(t/qt),e.d=[],i=(t+1)%qt,t<0&&(i+=qt),ik1||e.e<-k1))throw Error(wA+t)}else e.s=0,e.e=0,e.d=[0];return e}function Mt(e,n,t){var i,r,a,o,l,f,c,h,d=e.d;for(o=1,a=d[0];a>=10;a/=10)o++;if(i=n-o,i<0)i+=qt,r=n,c=d[h=0];else{if(h=Math.ceil((i+1)/qt),a=d.length,h>=a)return e;for(c=a=d[h],o=1;a>=10;a/=10)o++;i%=qt,r=i-qt+o}if(t!==void 0&&(a=iu(10,o-r-1),l=c/a%10|0,f=n<0||d[h+1]!==void 0||c%a,f=t<4?(l||f)&&(t==0||t==(e.s<0?3:2)):l>5||l==5&&(t==4||f||t==6&&(i>0?r>0?c/iu(10,o-r):0:d[h-1])%10&1||t==(e.s<0?8:7))),n<1||!d[0])return f?(a=vi(e),d.length=1,n=n-a-1,d[0]=iu(10,(qt-n%qt)%qt),e.e=rd(-n/qt)||0):(d.length=1,d[0]=e.e=e.s=0),e;if(i==0?(d.length=h,a=1,h--):(d.length=h+1,a=iu(10,qt-i),d[h]=r>0?(c/iu(10,o-r)%iu(10,r)|0)*a:0),f)for(;;)if(h==0){(d[0]+=a)==ji&&(d[0]=1,++e.e);break}else{if(d[h]+=a,d[h]!=ji)break;d[h--]=0,a=1}for(i=d.length;d[--i]===0;)d.pop();if(Yt&&(e.e>k1||e.e<-k1))throw Error(wA+vi(e));return e}function QU(e,n){var t,i,r,a,o,l,f,c,h,d,p=e.constructor,v=p.precision;if(!e.s||!n.s)return n.s?n.s=-n.s:n=new p(e),Yt?Mt(n,v):n;if(f=e.d,d=n.d,i=n.e,c=e.e,f=f.slice(),o=c-i,o){for(h=o<0,h?(t=f,o=-o,l=d.length):(t=d,i=c,l=f.length),r=Math.max(Math.ceil(v/qt),l)+2,o>r&&(o=r,t.length=1),t.reverse(),r=o;r--;)t.push(0);t.reverse()}else{for(r=f.length,l=d.length,h=r0;--r)f[l++]=0;for(r=d.length;r>o;){if(f[--r]0?a=a.charAt(0)+"."+a.slice(1)+Ks(i):o>1&&(a=a.charAt(0)+"."+a.slice(1)),a=a+(r<0?"e":"e+")+r):r<0?(a="0."+Ks(-r-1)+a,t&&(i=t-o)>0&&(a+=Ks(i))):r>=o?(a+=Ks(r+1-o),t&&(i=t-r-1)>0&&(a=a+"."+Ks(i))):((i=r+1)0&&(r+1===o&&(a+="."),a+=Ks(i))),e.s<0?"-"+a:a}function RP(e,n){if(e.length>n)return e.length=n,!0}function JU(e){var n,t,i;function r(a){var o=this;if(!(o instanceof r))return new r(a);if(o.constructor=r,a instanceof r){o.s=a.s,o.e=a.e,o.d=(a=a.d)?a.slice():a;return}if(typeof a=="number"){if(a*0!==0)throw Error(pu+a);if(a>0)o.s=1;else if(a<0)a=-a,o.s=-1;else{o.s=0,o.e=0,o.d=[0];return}if(a===~~a&&a<1e7){o.e=0,o.d=[a];return}return DP(o,a.toString())}else if(typeof a!="string")throw Error(pu+a);if(a.charCodeAt(0)===45?(a=a.slice(1),o.s=-1):o.s=1,Lwe.test(a))DP(o,a);else throw Error(pu+a)}if(r.prototype=sn,r.ROUND_UP=0,r.ROUND_DOWN=1,r.ROUND_CEIL=2,r.ROUND_FLOOR=3,r.ROUND_HALF_UP=4,r.ROUND_HALF_DOWN=5,r.ROUND_HALF_EVEN=6,r.ROUND_HALF_CEIL=7,r.ROUND_HALF_FLOOR=8,r.clone=JU,r.config=r.set=Iwe,e===void 0&&(e={}),e)for(i=["precision","rounding","toExpNeg","toExpPos","LN10"],n=0;n=r[n+1]&&i<=r[n+2])this[t]=i;else throw Error(pu+t+": "+i);if((i=e[t="LN10"])!==void 0)if(i==Math.LN10)this[t]=new this(i);else throw Error(pu+t+": "+i);return this}var kA=JU(zwe);Hr=new kA(1);const At=kA;function Bwe(e){return Uwe(e)||Hwe(e)||qwe(e)||Fwe()}function Fwe(){throw new TypeError(`Invalid attempt to spread non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function qwe(e,n){if(e){if(typeof e=="string")return j4(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);if(t==="Object"&&e.constructor&&(t=e.constructor.name),t==="Map"||t==="Set")return Array.from(e);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return j4(e,n)}}function Hwe(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function Uwe(e){if(Array.isArray(e))return j4(e)}function j4(e,n){(n==null||n>e.length)&&(n=e.length);for(var t=0,i=new Array(n);t=n?t.apply(void 0,r):e(n-o,PP(function(){for(var l=arguments.length,f=new Array(l),c=0;ce.length)&&(n=e.length);for(var t=0,i=new Array(n);t"u"||!(Symbol.iterator in Object(e)))){var t=[],i=!0,r=!1,a=void 0;try{for(var o=e[Symbol.iterator](),l;!(i=(l=o.next()).done)&&(t.push(l.value),!(n&&t.length===n));i=!0);}catch(f){r=!0,a=f}finally{try{!i&&o.return!=null&&o.return()}finally{if(r)throw a}}return t}}function ake(e){if(Array.isArray(e))return e}function rV(e){var n=pm(e,2),t=n[0],i=n[1],r=t,a=i;return t>i&&(r=i,a=t),[r,a]}function aV(e,n,t){if(e.lte(0))return new At(0);var i=F0.getDigitCount(e.toNumber()),r=new At(10).pow(i),a=e.div(r),o=i!==1?.05:.1,l=new At(Math.ceil(a.div(o).toNumber())).add(t).mul(o),f=l.mul(r);return n?f:new At(Math.ceil(f))}function oke(e,n,t){var i=1,r=new At(e);if(!r.isint()&&t){var a=Math.abs(e);a<1?(i=new At(10).pow(F0.getDigitCount(e)-1),r=new At(Math.floor(r.div(i).toNumber())).mul(i)):a>1&&(r=new At(Math.floor(e)))}else e===0?r=new At(Math.floor((n-1)/2)):t||(r=new At(Math.floor(e)));var o=Math.floor((n-1)/2),l=Ywe(Gwe(function(f){return r.add(new At(f-o).mul(i)).toNumber()}),E4);return l(0,n)}function oV(e,n,t,i){var r=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0;if(!Number.isFinite((n-e)/(t-1)))return{step:new At(0),tickMin:new At(0),tickMax:new At(0)};var a=aV(new At(n).sub(e).div(t-1),i,r),o;e<=0&&n>=0?o=new At(0):(o=new At(e).add(n).div(2),o=o.sub(new At(o).mod(a)));var l=Math.ceil(o.sub(e).div(a).toNumber()),f=Math.ceil(new At(n).sub(o).div(a).toNumber()),c=l+f+1;return c>t?oV(e,n,t,i,r+1):(c0?f+(t-c):f,l=n>0?l:l+(t-c)),{step:a,tickMin:o.sub(new At(l).mul(a)),tickMax:o.add(new At(f).mul(a))})}function ske(e){var n=pm(e,2),t=n[0],i=n[1],r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:6,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,o=Math.max(r,2),l=rV([t,i]),f=pm(l,2),c=f[0],h=f[1];if(c===-1/0||h===1/0){var d=h===1/0?[c].concat(M4(E4(0,r-1).map(function(){return 1/0}))):[].concat(M4(E4(0,r-1).map(function(){return-1/0})),[h]);return t>i?T4(d):d}if(c===h)return oke(c,r,a);var p=oV(c,h,o,a),v=p.step,b=p.tickMin,w=p.tickMax,k=F0.rangeStep(b,w.add(new At(.1).mul(v)),v);return t>i?T4(k):k}function lke(e,n){var t=pm(e,2),i=t[0],r=t[1],a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,o=rV([i,r]),l=pm(o,2),f=l[0],c=l[1];if(f===-1/0||c===1/0)return[i,r];if(f===c)return[f];var h=Math.max(n,2),d=aV(new At(c).sub(f).div(h-1),a,0),p=[].concat(M4(F0.rangeStep(new At(f),new At(c).sub(new At(.99).mul(d)),d)),[c]);return i>r?T4(p):p}var uke=tV(ske),fke=tV(lke),cke="Invariant failed";function Au(e,n){throw new Error(cke)}var dke=["offset","layout","width","dataKey","data","dataPointFormatter","xAxis","yAxis"];function mc(e){"@babel/helpers - typeof";return mc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},mc(e)}function _1(){return _1=Object.assign?Object.assign.bind():function(e){for(var n=1;ne.length)&&(n=e.length);for(var t=0,i=new Array(n);t=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(t[i]=e[i])}return t}function bke(e,n){if(e==null)return{};var t={};for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){if(n.indexOf(i)>=0)continue;t[i]=e[i]}return t}function wke(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function kke(e,n){for(var t=0;te.length)&&(n=e.length);for(var t=0,i=new Array(n);t1&&arguments[1]!==void 0?arguments[1]:[],r=arguments.length>2?arguments[2]:void 0,a=arguments.length>3?arguments[3]:void 0,o=-1,l=(t=i==null?void 0:i.length)!==null&&t!==void 0?t:0;if(l<=1)return 0;if(a&&a.axisType==="angleAxis"&&Math.abs(Math.abs(a.range[1]-a.range[0])-360)<=1e-6)for(var f=a.range,c=0;c0?r[c-1].coordinate:r[l-1].coordinate,d=r[c].coordinate,p=c>=l-1?r[0].coordinate:r[c+1].coordinate,v=void 0;if(Ba(d-h)!==Ba(p-d)){var b=[];if(Ba(p-d)===Ba(f[1]-f[0])){v=p;var w=d+f[1]-f[0];b[0]=Math.min(w,(w+h)/2),b[1]=Math.max(w,(w+h)/2)}else{v=h;var k=p+f[1]-f[0];b[0]=Math.min(d,(k+d)/2),b[1]=Math.max(d,(k+d)/2)}var _=[Math.min(d,(v+d)/2),Math.max(d,(v+d)/2)];if(n>_[0]&&n<=_[1]||n>=b[0]&&n<=b[1]){o=r[c].index;break}}else{var C=Math.min(h,p),x=Math.max(h,p);if(n>(C+d)/2&&n<=(x+d)/2){o=r[c].index;break}}}else for(var E=0;E0&&E(i[E].coordinate+i[E-1].coordinate)/2&&n<=(i[E].coordinate+i[E+1].coordinate)/2||E===l-1&&n>(i[E].coordinate+i[E-1].coordinate)/2){o=i[E].index;break}return o},_A=function(n){var t,i=n,r=i.type.displayName,a=(t=n.type)!==null&&t!==void 0&&t.defaultProps?ei(ei({},n.type.defaultProps),n.props):n.props,o=a.stroke,l=a.fill,f;switch(r){case"Line":f=o;break;case"Area":case"Radar":f=o&&o!=="none"?o:l;break;default:f=l;break}return f},Lke=function(n){var t=n.barSize,i=n.totalSize,r=n.stackGroups,a=r===void 0?{}:r;if(!a)return{};for(var o={},l=Object.keys(a),f=0,c=l.length;f=0});if(_&&_.length){var C=_[0].type.defaultProps,x=C!==void 0?ei(ei({},C),_[0].props):_[0].props,E=x.barSize,O=x[k];o[O]||(o[O]=[]);var j=Gn(E)?t:E;o[O].push({item:_[0],stackList:_.slice(1),barSize:Gn(j)?void 0:Su(j,i,0)})}}return o},Ike=function(n){var t=n.barGap,i=n.barCategoryGap,r=n.bandSize,a=n.sizeList,o=a===void 0?[]:a,l=n.maxBarSize,f=o.length;if(f<1)return null;var c=Su(t,r,0,!0),h,d=[];if(o[0].barSize===+o[0].barSize){var p=!1,v=r/f,b=o.reduce(function(E,O){return E+O.barSize||0},0);b+=(f-1)*c,b>=r&&(b-=(f-1)*c,c=0),b>=r&&v>0&&(p=!0,v*=.9,b=f*v);var w=(r-b)/2>>0,k={offset:w-c,size:0};h=o.reduce(function(E,O){var j={item:O.item,position:{offset:k.offset+k.size+c,size:p?v:O.barSize}},M=[].concat(zP(E),[j]);return k=M[M.length-1].position,O.stackList&&O.stackList.length&&O.stackList.forEach(function(P){M.push({item:P,position:k})}),M},d)}else{var _=Su(i,r,0,!0);r-2*_-(f-1)*c<=0&&(c=0);var C=(r-2*_-(f-1)*c)/f;C>1&&(C>>=0);var x=l===+l?Math.min(C,l):C;h=o.reduce(function(E,O,j){var M=[].concat(zP(E),[{item:O.item,position:{offset:_+(C+c)*j+(C-x)/2,size:x}}]);return O.stackList&&O.stackList.length&&O.stackList.forEach(function(P){M.push({item:P,position:M[M.length-1].position})}),M},d)}return h},Bke=function(n,t,i,r){var a=i.children,o=i.width,l=i.margin,f=o-(l.left||0)-(l.right||0),c=fV({children:a,legendWidth:f});if(c){var h=r||{},d=h.width,p=h.height,v=c.align,b=c.verticalAlign,w=c.layout;if((w==="vertical"||w==="horizontal"&&b==="middle")&&v!=="center"&&Ve(n[v]))return ei(ei({},n),{},Gf({},v,n[v]+(d||0)));if((w==="horizontal"||w==="vertical"&&v==="center")&&b!=="middle"&&Ve(n[b]))return ei(ei({},n),{},Gf({},b,n[b]+(p||0)))}return n},Fke=function(n,t,i){return Gn(t)?!0:n==="horizontal"?t==="yAxis":n==="vertical"||i==="x"?t==="xAxis":i==="y"?t==="yAxis":!0},cV=function(n,t,i,r,a){var o=t.props.children,l=va(o,vp).filter(function(c){return Fke(r,a,c.props.direction)});if(l&&l.length){var f=l.map(function(c){return c.props.dataKey});return n.reduce(function(c,h){var d=cr(h,i);if(Gn(d))return c;var p=Array.isArray(d)?[I0(d),nl(d)]:[d,d],v=f.reduce(function(b,w){var k=cr(h,w,0),_=p[0]-Math.abs(Array.isArray(k)?k[0]:k),C=p[1]+Math.abs(Array.isArray(k)?k[1]:k);return[Math.min(_,b[0]),Math.max(C,b[1])]},[1/0,-1/0]);return[Math.min(v[0],c[0]),Math.max(v[1],c[1])]},[1/0,-1/0])}return null},qke=function(n,t,i,r,a){var o=t.map(function(l){return cV(n,l,i,a,r)}).filter(function(l){return!Gn(l)});return o&&o.length?o.reduce(function(l,f){return[Math.min(l[0],f[0]),Math.max(l[1],f[1])]},[1/0,-1/0]):null},dV=function(n,t,i,r,a){var o=t.map(function(f){var c=f.props.dataKey;return i==="number"&&c&&cV(n,f,c,r)||Lh(n,c,i,a)});if(i==="number")return o.reduce(function(f,c){return[Math.min(f[0],c[0]),Math.max(f[1],c[1])]},[1/0,-1/0]);var l={};return o.reduce(function(f,c){for(var h=0,d=c.length;h=2?Ba(l[0]-l[1])*2*c:c,t&&(n.ticks||n.niceTicks)){var h=(n.ticks||n.niceTicks).map(function(d){var p=a?a.indexOf(d):d;return{coordinate:r(p)+c,value:d,offset:c}});return h.filter(function(d){return!Jc(d.coordinate)})}return n.isCategorical&&n.categoricalDomain?n.categoricalDomain.map(function(d,p){return{coordinate:r(d)+c,value:d,index:p,offset:c}}):r.ticks&&!i?r.ticks(n.tickCount).map(function(d){return{coordinate:r(d)+c,value:d,offset:c}}):r.domain().map(function(d,p){return{coordinate:r(d)+c,value:a?a[d]:d,index:p,offset:c}})},E3=new WeakMap,Jv=function(n,t){if(typeof t!="function")return n;E3.has(n)||E3.set(n,new WeakMap);var i=E3.get(n);if(i.has(t))return i.get(t);var r=function(){n.apply(void 0,arguments),t.apply(void 0,arguments)};return i.set(t,r),r},Hke=function(n,t,i){var r=n.scale,a=n.type,o=n.layout,l=n.axisType;if(r==="auto")return o==="radial"&&l==="radiusAxis"?{scale:um(),realScaleType:"band"}:o==="radial"&&l==="angleAxis"?{scale:g1(),realScaleType:"linear"}:a==="category"&&t&&(t.indexOf("LineChart")>=0||t.indexOf("AreaChart")>=0||t.indexOf("ComposedChart")>=0&&!i)?{scale:zh(),realScaleType:"point"}:a==="category"?{scale:um(),realScaleType:"band"}:{scale:g1(),realScaleType:"linear"};if(xu(r)){var f="scale".concat(A0(r));return{scale:(xP[f]||zh)(),realScaleType:xP[f]?f:"point"}}return In(r)?{scale:r}:{scale:zh(),realScaleType:"point"}},IP=1e-4,Uke=function(n){var t=n.domain();if(!(!t||t.length<=2)){var i=t.length,r=n.range(),a=Math.min(r[0],r[1])-IP,o=Math.max(r[0],r[1])+IP,l=n(t[0]),f=n(t[i-1]);(lo||fo)&&n.domain([t[0],t[i-1]])}},Vke=function(n,t){if(!n)return null;for(var i=0,r=n.length;ir)&&(a[1]=r),a[0]>r&&(a[0]=r),a[1]=0?(n[l][i][0]=a,n[l][i][1]=a+f,a=n[l][i][1]):(n[l][i][0]=o,n[l][i][1]=o+f,o=n[l][i][1])}},Yke=function(n){var t=n.length;if(!(t<=0))for(var i=0,r=n[0].length;i=0?(n[o][i][0]=a,n[o][i][1]=a+l,a=n[o][i][1]):(n[o][i][0]=0,n[o][i][1]=0)}},Kke={sign:Gke,expand:Dve,none:ac,silhouette:Rve,wiggle:Pve,positive:Yke},Xke=function(n,t,i){var r=t.map(function(l){return l.props.dataKey}),a=Kke[i],o=Mve().keys(r).value(function(l,f){return+cr(l,f,0)}).order(f4).offset(a);return o(n)},Zke=function(n,t,i,r,a,o){if(!n)return null;var l=o?t.reverse():t,f={},c=l.reduce(function(d,p){var v,b=(v=p.type)!==null&&v!==void 0&&v.defaultProps?ei(ei({},p.type.defaultProps),p.props):p.props,w=b.stackId,k=b.hide;if(k)return d;var _=b[i],C=d[_]||{hasStack:!1,stackGroups:{}};if(_i(w)){var x=C.stackGroups[w]||{numericAxisId:i,cateAxisId:r,items:[]};x.items.push(p),C.hasStack=!0,C.stackGroups[w]=x}else C.stackGroups[ed("_stackId_")]={numericAxisId:i,cateAxisId:r,items:[p]};return ei(ei({},d),{},Gf({},_,C))},f),h={};return Object.keys(c).reduce(function(d,p){var v=c[p];if(v.hasStack){var b={};v.stackGroups=Object.keys(v.stackGroups).reduce(function(w,k){var _=v.stackGroups[k];return ei(ei({},w),{},Gf({},k,{numericAxisId:i,cateAxisId:r,items:_.items,stackedData:Xke(n,_.items,a)}))},b)}return ei(ei({},d),{},Gf({},p,v))},h)},Qke=function(n,t){var i=t.realScaleType,r=t.type,a=t.tickCount,o=t.originalDomain,l=t.allowDecimals,f=i||t.scale;if(f!=="auto"&&f!=="linear")return null;if(a&&r==="number"&&o&&(o[0]==="auto"||o[1]==="auto")){var c=n.domain();if(!c.length)return null;var h=uke(c,a,l);return n.domain([I0(h),nl(h)]),{niceTicks:h}}if(a&&r==="number"){var d=n.domain(),p=fke(d,a,l);return{niceTicks:p}}return null};function S1(e){var n=e.axis,t=e.ticks,i=e.bandSize,r=e.entry,a=e.index,o=e.dataKey;if(n.type==="category"){if(!n.allowDuplicatedCategory&&n.dataKey&&!Gn(r[n.dataKey])){var l=Xg(t,"value",r[n.dataKey]);if(l)return l.coordinate+i/2}return t[a]?t[a].coordinate+i/2:null}var f=cr(r,Gn(o)?n.dataKey:o);return Gn(f)?null:n.scale(f)}var BP=function(n){var t=n.axis,i=n.ticks,r=n.offset,a=n.bandSize,o=n.entry,l=n.index;if(t.type==="category")return i[l]?i[l].coordinate+r:null;var f=cr(o,t.dataKey,t.domain[l]);return Gn(f)?null:t.scale(f)-a/2+r},Jke=function(n){var t=n.numericAxis,i=t.scale.domain();if(t.type==="number"){var r=Math.min(i[0],i[1]),a=Math.max(i[0],i[1]);return r<=0&&a>=0?0:a<0?a:r}return i[0]},e_e=function(n,t){var i,r=(i=n.type)!==null&&i!==void 0&&i.defaultProps?ei(ei({},n.type.defaultProps),n.props):n.props,a=r.stackId;if(_i(a)){var o=t[a];if(o){var l=o.items.indexOf(n);return l>=0?o.stackedData[l]:null}}return null},n_e=function(n){return n.reduce(function(t,i){return[I0(i.concat([t[0]]).filter(Ve)),nl(i.concat([t[1]]).filter(Ve))]},[1/0,-1/0])},pV=function(n,t,i){return Object.keys(n).reduce(function(r,a){var o=n[a],l=o.stackedData,f=l.reduce(function(c,h){var d=n_e(h.slice(t,i+1));return[Math.min(c[0],d[0]),Math.max(c[1],d[1])]},[1/0,-1/0]);return[Math.min(f[0],r[0]),Math.max(f[1],r[1])]},[1/0,-1/0]).map(function(r){return r===1/0||r===-1/0?0:r})},FP=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,qP=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,N4=function(n,t,i){if(In(n))return n(t,i);if(!Array.isArray(n))return t;var r=[];if(Ve(n[0]))r[0]=i?n[0]:Math.min(n[0],t[0]);else if(FP.test(n[0])){var a=+FP.exec(n[0])[1];r[0]=t[0]-a}else In(n[0])?r[0]=n[0](t[0]):r[0]=t[0];if(Ve(n[1]))r[1]=i?n[1]:Math.max(n[1],t[1]);else if(qP.test(n[1])){var o=+qP.exec(n[1])[1];r[1]=t[1]+o}else In(n[1])?r[1]=n[1](t[1]):r[1]=t[1];return r},C1=function(n,t,i){if(n&&n.scale&&n.scale.bandwidth){var r=n.scale.bandwidth();if(!i||r>0)return r}if(n&&t&&t.length>=2){for(var a=K9(t,function(d){return d.coordinate}),o=1/0,l=1,f=a.length;lo&&(c=2*Math.PI-c),{radius:l,angle:a_e(c),angleInRadian:c}},l_e=function(n){var t=n.startAngle,i=n.endAngle,r=Math.floor(t/360),a=Math.floor(i/360),o=Math.min(r,a);return{startAngle:t-o*360,endAngle:i-o*360}},u_e=function(n,t){var i=t.startAngle,r=t.endAngle,a=Math.floor(i/360),o=Math.floor(r/360),l=Math.min(a,o);return n+l*360},WP=function(n,t){var i=n.x,r=n.y,a=s_e({x:i,y:r},t),o=a.radius,l=a.angle,f=t.innerRadius,c=t.outerRadius;if(oc)return!1;if(o===0)return!0;var h=l_e(t),d=h.startAngle,p=h.endAngle,v=l,b;if(d<=p){for(;v>p;)v-=360;for(;v=d&&v<=p}else{for(;v>d;)v-=360;for(;v=p&&v<=d}return b?VP(VP({},t),{},{radius:o,angle:u_e(v,t)}):null};function bm(e){"@babel/helpers - typeof";return bm=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},bm(e)}var f_e=["offset"];function c_e(e){return p_e(e)||m_e(e)||h_e(e)||d_e()}function d_e(){throw new TypeError(`Invalid attempt to spread non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function h_e(e,n){if(e){if(typeof e=="string")return $4(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);if(t==="Object"&&e.constructor&&(t=e.constructor.name),t==="Map"||t==="Set")return Array.from(e);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return $4(e,n)}}function m_e(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function p_e(e){if(Array.isArray(e))return $4(e)}function $4(e,n){(n==null||n>e.length)&&(n=e.length);for(var t=0,i=new Array(n);t=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(t[i]=e[i])}return t}function g_e(e,n){if(e==null)return{};var t={};for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){if(n.indexOf(i)>=0)continue;t[i]=e[i]}return t}function GP(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),t.push.apply(t,i)}return t}function bi(e){for(var n=1;n=0?1:-1,x,E;r==="insideStart"?(x=v+C*o,E=w):r==="insideEnd"?(x=b-C*o,E=!w):r==="end"&&(x=b+C*o,E=w),E=_<=0?E:!E;var O=Fi(c,h,k,x),j=Fi(c,h,k,x+(E?1:-1)*359),M="M".concat(O.x,",").concat(O.y,` + A`).concat(k,",").concat(k,",0,1,").concat(E?0:1,`, + `).concat(j.x,",").concat(j.y),P=Gn(n.id)?ed("recharts-radial-line-"):n.id;return Q.createElement("text",wm({},i,{dominantBaseline:"central",className:dn("recharts-radial-bar-label",l)}),Q.createElement("defs",null,Q.createElement("path",{id:P,d:M})),Q.createElement("textPath",{xlinkHref:"#".concat(P)},t))},S_e=function(n){var t=n.viewBox,i=n.offset,r=n.position,a=t,o=a.cx,l=a.cy,f=a.innerRadius,c=a.outerRadius,h=a.startAngle,d=a.endAngle,p=(h+d)/2;if(r==="outside"){var v=Fi(o,l,c+i,p),b=v.x,w=v.y;return{x:b,y:w,textAnchor:b>=o?"start":"end",verticalAnchor:"middle"}}if(r==="center")return{x:o,y:l,textAnchor:"middle",verticalAnchor:"middle"};if(r==="centerTop")return{x:o,y:l,textAnchor:"middle",verticalAnchor:"start"};if(r==="centerBottom")return{x:o,y:l,textAnchor:"middle",verticalAnchor:"end"};var k=(f+c)/2,_=Fi(o,l,k,p),C=_.x,x=_.y;return{x:C,y:x,textAnchor:"middle",verticalAnchor:"middle"}},C_e=function(n){var t=n.viewBox,i=n.parentViewBox,r=n.offset,a=n.position,o=t,l=o.x,f=o.y,c=o.width,h=o.height,d=h>=0?1:-1,p=d*r,v=d>0?"end":"start",b=d>0?"start":"end",w=c>=0?1:-1,k=w*r,_=w>0?"end":"start",C=w>0?"start":"end";if(a==="top"){var x={x:l+c/2,y:f-d*r,textAnchor:"middle",verticalAnchor:v};return bi(bi({},x),i?{height:Math.max(f-i.y,0),width:c}:{})}if(a==="bottom"){var E={x:l+c/2,y:f+h+p,textAnchor:"middle",verticalAnchor:b};return bi(bi({},E),i?{height:Math.max(i.y+i.height-(f+h),0),width:c}:{})}if(a==="left"){var O={x:l-k,y:f+h/2,textAnchor:_,verticalAnchor:"middle"};return bi(bi({},O),i?{width:Math.max(O.x-i.x,0),height:h}:{})}if(a==="right"){var j={x:l+c+k,y:f+h/2,textAnchor:C,verticalAnchor:"middle"};return bi(bi({},j),i?{width:Math.max(i.x+i.width-j.x,0),height:h}:{})}var M=i?{width:c,height:h}:{};return a==="insideLeft"?bi({x:l+k,y:f+h/2,textAnchor:C,verticalAnchor:"middle"},M):a==="insideRight"?bi({x:l+c-k,y:f+h/2,textAnchor:_,verticalAnchor:"middle"},M):a==="insideTop"?bi({x:l+c/2,y:f+p,textAnchor:"middle",verticalAnchor:b},M):a==="insideBottom"?bi({x:l+c/2,y:f+h-p,textAnchor:"middle",verticalAnchor:v},M):a==="insideTopLeft"?bi({x:l+k,y:f+p,textAnchor:C,verticalAnchor:b},M):a==="insideTopRight"?bi({x:l+c-k,y:f+p,textAnchor:_,verticalAnchor:b},M):a==="insideBottomLeft"?bi({x:l+k,y:f+h-p,textAnchor:C,verticalAnchor:v},M):a==="insideBottomRight"?bi({x:l+c-k,y:f+h-p,textAnchor:_,verticalAnchor:v},M):Qc(a)&&(Ve(a.x)||lu(a.x))&&(Ve(a.y)||lu(a.y))?bi({x:l+Su(a.x,c),y:f+Su(a.y,h),textAnchor:"end",verticalAnchor:"end"},M):bi({x:l+c/2,y:f+h/2,textAnchor:"middle",verticalAnchor:"middle"},M)},A_e=function(n){return"cx"in n&&Ve(n.cx)};function ni(e){var n=e.offset,t=n===void 0?5:n,i=v_e(e,f_e),r=bi({offset:t},i),a=r.viewBox,o=r.position,l=r.value,f=r.children,c=r.content,h=r.className,d=h===void 0?"":h,p=r.textBreakAll;if(!a||Gn(l)&&Gn(f)&&!A.isValidElement(c)&&!In(c))return null;if(A.isValidElement(c))return A.cloneElement(c,r);var v;if(In(c)){if(v=A.createElement(c,r),A.isValidElement(v))return v}else v=k_e(r);var b=A_e(a),w=Hn(r,!0);if(b&&(o==="insideStart"||o==="insideEnd"||o==="end"))return x_e(r,v,w);var k=b?S_e(r):C_e(r);return Q.createElement(u1,wm({className:dn("recharts-label",d)},w,k,{breakAll:p}),v)}ni.displayName="Label";var gV=function(n){var t=n.cx,i=n.cy,r=n.angle,a=n.startAngle,o=n.endAngle,l=n.r,f=n.radius,c=n.innerRadius,h=n.outerRadius,d=n.x,p=n.y,v=n.top,b=n.left,w=n.width,k=n.height,_=n.clockWise,C=n.labelViewBox;if(C)return C;if(Ve(w)&&Ve(k)){if(Ve(d)&&Ve(p))return{x:d,y:p,width:w,height:k};if(Ve(v)&&Ve(b))return{x:v,y:b,width:w,height:k}}return Ve(d)&&Ve(p)?{x:d,y:p,width:0,height:0}:Ve(t)&&Ve(i)?{cx:t,cy:i,startAngle:a||r||0,endAngle:o||r||0,innerRadius:c||0,outerRadius:h||f||l||0,clockWise:_}:n.viewBox?n.viewBox:{}},O_e=function(n,t){return n?n===!0?Q.createElement(ni,{key:"label-implicit",viewBox:t}):_i(n)?Q.createElement(ni,{key:"label-implicit",viewBox:t,value:n}):A.isValidElement(n)?n.type===ni?A.cloneElement(n,{key:"label-implicit",viewBox:t}):Q.createElement(ni,{key:"label-implicit",content:n,viewBox:t}):In(n)?Q.createElement(ni,{key:"label-implicit",content:n,viewBox:t}):Qc(n)?Q.createElement(ni,wm({viewBox:t},n,{key:"label-implicit"})):null:null},j_e=function(n,t){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!n||!n.children&&i&&!n.label)return null;var r=n.children,a=gV(n),o=va(r,ni).map(function(f,c){return A.cloneElement(f,{viewBox:t||a,key:"label-".concat(c)})});if(!i)return o;var l=O_e(n.label,t||a);return[l].concat(c_e(o))};ni.parseViewBox=gV;ni.renderCallByParent=j_e;var T3,YP;function E_e(){if(YP)return T3;YP=1;function e(n){var t=n==null?0:n.length;return t?n[t-1]:void 0}return T3=e,T3}var T_e=E_e();const M_e=ht(T_e);function km(e){"@babel/helpers - typeof";return km=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},km(e)}var D_e=["valueAccessor"],R_e=["data","dataKey","clockWise","id","textBreakAll"];function P_e(e){return L_e(e)||z_e(e)||$_e(e)||N_e()}function N_e(){throw new TypeError(`Invalid attempt to spread non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function $_e(e,n){if(e){if(typeof e=="string")return z4(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);if(t==="Object"&&e.constructor&&(t=e.constructor.name),t==="Map"||t==="Set")return Array.from(e);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return z4(e,n)}}function z_e(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function L_e(e){if(Array.isArray(e))return z4(e)}function z4(e,n){(n==null||n>e.length)&&(n=e.length);for(var t=0,i=new Array(n);t=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(t[i]=e[i])}return t}function q_e(e,n){if(e==null)return{};var t={};for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){if(n.indexOf(i)>=0)continue;t[i]=e[i]}return t}var H_e=function(n){return Array.isArray(n.value)?M_e(n.value):n.value};function uo(e){var n=e.valueAccessor,t=n===void 0?H_e:n,i=ZP(e,D_e),r=i.data,a=i.dataKey,o=i.clockWise,l=i.id,f=i.textBreakAll,c=ZP(i,R_e);return!r||!r.length?null:Q.createElement(It,{className:"recharts-label-list"},r.map(function(h,d){var p=Gn(a)?t(h,d):cr(h&&h.payload,a),v=Gn(l)?{}:{id:"".concat(l,"-").concat(d)};return Q.createElement(ni,O1({},Hn(h,!0),c,v,{parentViewBox:h.parentViewBox,value:p,textBreakAll:f,viewBox:ni.parseViewBox(Gn(o)?h:XP(XP({},h),{},{clockWise:o})),key:"label-".concat(d),index:d}))}))}uo.displayName="LabelList";function U_e(e,n){return e?e===!0?Q.createElement(uo,{key:"labelList-implicit",data:n}):Q.isValidElement(e)||In(e)?Q.createElement(uo,{key:"labelList-implicit",data:n,content:e}):Qc(e)?Q.createElement(uo,O1({data:n},e,{key:"labelList-implicit"})):null:null}function V_e(e,n){var t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!e||!e.children&&t&&!e.label)return null;var i=e.children,r=va(i,uo).map(function(o,l){return A.cloneElement(o,{data:n,key:"labelList-".concat(l)})});if(!t)return r;var a=U_e(e.label,n);return[a].concat(P_e(r))}uo.renderCallByParent=V_e;function _m(e){"@babel/helpers - typeof";return _m=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},_m(e)}function L4(){return L4=Object.assign?Object.assign.bind():function(e){for(var n=1;n180),",").concat(+(o>c),`, + `).concat(d.x,",").concat(d.y,` + `);if(r>0){var v=Fi(t,i,r,o),b=Fi(t,i,r,c);p+="L ".concat(b.x,",").concat(b.y,` + A `).concat(r,",").concat(r,`,0, + `).concat(+(Math.abs(f)>180),",").concat(+(o<=c),`, + `).concat(v.x,",").concat(v.y," Z")}else p+="L ".concat(t,",").concat(i," Z");return p},X_e=function(n){var t=n.cx,i=n.cy,r=n.innerRadius,a=n.outerRadius,o=n.cornerRadius,l=n.forceCornerRadius,f=n.cornerIsExternal,c=n.startAngle,h=n.endAngle,d=Ba(h-c),p=eg({cx:t,cy:i,radius:a,angle:c,sign:d,cornerRadius:o,cornerIsExternal:f}),v=p.circleTangency,b=p.lineTangency,w=p.theta,k=eg({cx:t,cy:i,radius:a,angle:h,sign:-d,cornerRadius:o,cornerIsExternal:f}),_=k.circleTangency,C=k.lineTangency,x=k.theta,E=f?Math.abs(c-h):Math.abs(c-h)-w-x;if(E<0)return l?"M ".concat(b.x,",").concat(b.y,` + a`).concat(o,",").concat(o,",0,0,1,").concat(o*2,`,0 + a`).concat(o,",").concat(o,",0,0,1,").concat(-o*2,`,0 + `):yV({cx:t,cy:i,innerRadius:r,outerRadius:a,startAngle:c,endAngle:h});var O="M ".concat(b.x,",").concat(b.y,` + A`).concat(o,",").concat(o,",0,0,").concat(+(d<0),",").concat(v.x,",").concat(v.y,` + A`).concat(a,",").concat(a,",0,").concat(+(E>180),",").concat(+(d<0),",").concat(_.x,",").concat(_.y,` + A`).concat(o,",").concat(o,",0,0,").concat(+(d<0),",").concat(C.x,",").concat(C.y,` + `);if(r>0){var j=eg({cx:t,cy:i,radius:r,angle:c,sign:d,isExternal:!0,cornerRadius:o,cornerIsExternal:f}),M=j.circleTangency,P=j.lineTangency,F=j.theta,R=eg({cx:t,cy:i,radius:r,angle:h,sign:-d,isExternal:!0,cornerRadius:o,cornerIsExternal:f}),L=R.circleTangency,B=R.lineTangency,G=R.theta,U=f?Math.abs(c-h):Math.abs(c-h)-F-G;if(U<0&&o===0)return"".concat(O,"L").concat(t,",").concat(i,"Z");O+="L".concat(B.x,",").concat(B.y,` + A`).concat(o,",").concat(o,",0,0,").concat(+(d<0),",").concat(L.x,",").concat(L.y,` + A`).concat(r,",").concat(r,",0,").concat(+(U>180),",").concat(+(d>0),",").concat(M.x,",").concat(M.y,` + A`).concat(o,",").concat(o,",0,0,").concat(+(d<0),",").concat(P.x,",").concat(P.y,"Z")}else O+="L".concat(t,",").concat(i,"Z");return O},Z_e={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},bV=function(n){var t=JP(JP({},Z_e),n),i=t.cx,r=t.cy,a=t.innerRadius,o=t.outerRadius,l=t.cornerRadius,f=t.forceCornerRadius,c=t.cornerIsExternal,h=t.startAngle,d=t.endAngle,p=t.className;if(o0&&Math.abs(h-d)<360?k=X_e({cx:i,cy:r,innerRadius:a,outerRadius:o,cornerRadius:Math.min(w,b/2),forceCornerRadius:f,cornerIsExternal:c,startAngle:h,endAngle:d}):k=yV({cx:i,cy:r,innerRadius:a,outerRadius:o,startAngle:h,endAngle:d}),Q.createElement("path",L4({},Hn(t,!0),{className:v,d:k,role:"img"}))};function xm(e){"@babel/helpers - typeof";return xm=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},xm(e)}function I4(){return I4=Object.assign?Object.assign.bind():function(e){for(var n=1;na2e.call(e,n));function Fu(e,n){return e===n||!e&&!n&&e!==e&&n!==n}const l2e="__v",u2e="__o",f2e="_owner",{getOwnPropertyDescriptor:rN,keys:aN}=Object;function c2e(e,n){return e.byteLength===n.byteLength&&j1(new Uint8Array(e),new Uint8Array(n))}function d2e(e,n,t){let i=e.length;if(n.length!==i)return!1;for(;i-- >0;)if(!t.equals(e[i],n[i],i,i,e,n,t))return!1;return!0}function h2e(e,n){return e.byteLength===n.byteLength&&j1(new Uint8Array(e.buffer,e.byteOffset,e.byteLength),new Uint8Array(n.buffer,n.byteOffset,n.byteLength))}function m2e(e,n){return Fu(e.getTime(),n.getTime())}function p2e(e,n){return e.name===n.name&&e.message===n.message&&e.cause===n.cause&&e.stack===n.stack}function v2e(e,n){return e===n}function oN(e,n,t){const i=e.size;if(i!==n.size)return!1;if(!i)return!0;const r=new Array(i),a=e.entries();let o,l,f=0;for(;(o=a.next())&&!o.done;){const c=n.entries();let h=!1,d=0;for(;(l=c.next())&&!l.done;){if(r[d]){d++;continue}const p=o.value,v=l.value;if(t.equals(p[0],v[0],f,d,e,n,t)&&t.equals(p[1],v[1],p[0],v[0],e,n,t)){h=r[d]=!0;break}d++}if(!h)return!1;f++}return!0}const g2e=Fu;function y2e(e,n,t){const i=aN(e);let r=i.length;if(aN(n).length!==r)return!1;for(;r-- >0;)if(!wV(e,n,t,i[r]))return!1;return!0}function hh(e,n,t){const i=iN(e);let r=i.length;if(iN(n).length!==r)return!1;let a,o,l;for(;r-- >0;)if(a=i[r],!wV(e,n,t,a)||(o=rN(e,a),l=rN(n,a),(o||l)&&(!o||!l||o.configurable!==l.configurable||o.enumerable!==l.enumerable||o.writable!==l.writable)))return!1;return!0}function b2e(e,n){return Fu(e.valueOf(),n.valueOf())}function w2e(e,n){return e.source===n.source&&e.flags===n.flags}function sN(e,n,t){const i=e.size;if(i!==n.size)return!1;if(!i)return!0;const r=new Array(i),a=e.values();let o,l;for(;(o=a.next())&&!o.done;){const f=n.values();let c=!1,h=0;for(;(l=f.next())&&!l.done;){if(!r[h]&&t.equals(o.value,l.value,o.value,l.value,e,n,t)){c=r[h]=!0;break}h++}if(!c)return!1}return!0}function j1(e,n){let t=e.byteLength;if(n.byteLength!==t||e.byteOffset!==n.byteOffset)return!1;for(;t-- >0;)if(e[t]!==n[t])return!1;return!0}function k2e(e,n){return e.hostname===n.hostname&&e.pathname===n.pathname&&e.protocol===n.protocol&&e.port===n.port&&e.hash===n.hash&&e.username===n.username&&e.password===n.password}function wV(e,n,t,i){return(i===f2e||i===u2e||i===l2e)&&(e.$$typeof||n.$$typeof)?!0:s2e(n,i)&&t.equals(e[i],n[i],i,i,e,n,t)}const _2e="[object ArrayBuffer]",x2e="[object Arguments]",S2e="[object Boolean]",C2e="[object DataView]",A2e="[object Date]",O2e="[object Error]",j2e="[object Map]",E2e="[object Number]",T2e="[object Object]",M2e="[object RegExp]",D2e="[object Set]",R2e="[object String]",P2e={"[object Int8Array]":!0,"[object Uint8Array]":!0,"[object Uint8ClampedArray]":!0,"[object Int16Array]":!0,"[object Uint16Array]":!0,"[object Int32Array]":!0,"[object Uint32Array]":!0,"[object Float16Array]":!0,"[object Float32Array]":!0,"[object Float64Array]":!0,"[object BigInt64Array]":!0,"[object BigUint64Array]":!0},N2e="[object URL]",$2e=Object.prototype.toString;function z2e({areArrayBuffersEqual:e,areArraysEqual:n,areDataViewsEqual:t,areDatesEqual:i,areErrorsEqual:r,areFunctionsEqual:a,areMapsEqual:o,areNumbersEqual:l,areObjectsEqual:f,arePrimitiveWrappersEqual:c,areRegExpsEqual:h,areSetsEqual:d,areTypedArraysEqual:p,areUrlsEqual:v,unknownTagComparators:b}){return function(k,_,C){if(k===_)return!0;if(k==null||_==null)return!1;const x=typeof k;if(x!==typeof _)return!1;if(x!=="object")return x==="number"?l(k,_,C):x==="function"?a(k,_,C):!1;const E=k.constructor;if(E!==_.constructor)return!1;if(E===Object)return f(k,_,C);if(Array.isArray(k))return n(k,_,C);if(E===Date)return i(k,_,C);if(E===RegExp)return h(k,_,C);if(E===Map)return o(k,_,C);if(E===Set)return d(k,_,C);const O=$2e.call(k);if(O===A2e)return i(k,_,C);if(O===M2e)return h(k,_,C);if(O===j2e)return o(k,_,C);if(O===D2e)return d(k,_,C);if(O===T2e)return typeof k.then!="function"&&typeof _.then!="function"&&f(k,_,C);if(O===N2e)return v(k,_,C);if(O===O2e)return r(k,_,C);if(O===x2e)return f(k,_,C);if(P2e[O])return p(k,_,C);if(O===_2e)return e(k,_,C);if(O===C2e)return t(k,_,C);if(O===S2e||O===E2e||O===R2e)return c(k,_,C);if(b){let j=b[O];if(!j){const M=o2e(k);M&&(j=b[M])}if(j)return j(k,_,C)}return!1}}function L2e({circular:e,createCustomConfig:n,strict:t}){let i={areArrayBuffersEqual:c2e,areArraysEqual:t?hh:d2e,areDataViewsEqual:h2e,areDatesEqual:m2e,areErrorsEqual:p2e,areFunctionsEqual:v2e,areMapsEqual:t?M3(oN,hh):oN,areNumbersEqual:g2e,areObjectsEqual:t?hh:y2e,arePrimitiveWrappersEqual:b2e,areRegExpsEqual:w2e,areSetsEqual:t?M3(sN,hh):sN,areTypedArraysEqual:t?M3(j1,hh):j1,areUrlsEqual:k2e,unknownTagComparators:void 0};if(n&&(i=Object.assign({},i,n(i))),e){const r=tg(i.areArraysEqual),a=tg(i.areMapsEqual),o=tg(i.areObjectsEqual),l=tg(i.areSetsEqual);i=Object.assign({},i,{areArraysEqual:r,areMapsEqual:a,areObjectsEqual:o,areSetsEqual:l})}return i}function I2e(e){return function(n,t,i,r,a,o,l){return e(n,t,l)}}function B2e({circular:e,comparator:n,createState:t,equals:i,strict:r}){if(t)return function(l,f){const{cache:c=e?new WeakMap:void 0,meta:h}=t();return n(l,f,{cache:c,equals:i,meta:h,strict:r})};if(e)return function(l,f){return n(l,f,{cache:new WeakMap,equals:i,meta:void 0,strict:r})};const a={cache:void 0,equals:i,meta:void 0,strict:r};return function(l,f){return n(l,f,a)}}const F2e=Cl();Cl({strict:!0});Cl({circular:!0});Cl({circular:!0,strict:!0});Cl({createInternalComparator:()=>Fu});Cl({strict:!0,createInternalComparator:()=>Fu});Cl({circular:!0,createInternalComparator:()=>Fu});Cl({circular:!0,createInternalComparator:()=>Fu,strict:!0});function Cl(e={}){const{circular:n=!1,createInternalComparator:t,createState:i,strict:r=!1}=e,a=L2e(e),o=z2e(a),l=t?t(o):I2e(o);return B2e({circular:n,comparator:o,createState:i,equals:l,strict:r})}function q2e(e){typeof requestAnimationFrame<"u"&&requestAnimationFrame(e)}function lN(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,t=-1,i=function r(a){t<0&&(t=a),a-t>n?(e(a),t=-1):q2e(r)};requestAnimationFrame(i)}function B4(e){"@babel/helpers - typeof";return B4=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},B4(e)}function H2e(e){return G2e(e)||W2e(e)||V2e(e)||U2e()}function U2e(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function V2e(e,n){if(e){if(typeof e=="string")return uN(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);if(t==="Object"&&e.constructor&&(t=e.constructor.name),t==="Map"||t==="Set")return Array.from(e);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return uN(e,n)}}function uN(e,n){(n==null||n>e.length)&&(n=e.length);for(var t=0,i=new Array(n);te.length)&&(n=e.length);for(var t=0,i=new Array(n);t1?1:_<0?0:_},w=function(_){for(var C=_>1?1:_,x=C,E=0;E<8;++E){var O=d(x)-C,j=v(x);if(Math.abs(O-C)0&&arguments[0]!==void 0?arguments[0]:{},t=n.stiff,i=t===void 0?100:t,r=n.damping,a=r===void 0?8:r,o=n.dt,l=o===void 0?17:o,f=function(h,d,p){var v=-(h-d)*i,b=p*a,w=p+(v-b)*l/1e3,k=p*l/1e3+h;return Math.abs(k-d)e.length)&&(n=e.length);for(var t=0,i=new Array(n);t=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(t[i]=e[i])}return t}function Sxe(e,n){if(e==null)return{};var t={},i=Object.keys(e),r,a;for(a=0;a=0)&&(t[r]=e[r]);return t}function D3(e){return jxe(e)||Oxe(e)||Axe(e)||Cxe()}function Cxe(){throw new TypeError(`Invalid attempt to spread non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Axe(e,n){if(e){if(typeof e=="string")return V4(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);if(t==="Object"&&e.constructor&&(t=e.constructor.name),t==="Map"||t==="Set")return Array.from(e);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return V4(e,n)}}function Oxe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function jxe(e){if(Array.isArray(e))return V4(e)}function V4(e,n){(n==null||n>e.length)&&(n=e.length);for(var t=0,i=new Array(n);t"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function M1(e){return M1=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},M1(e)}var go=(function(e){Rxe(t,e);var n=Pxe(t);function t(i,r){var a;Exe(this,t),a=n.call(this,i,r);var o=a.props,l=o.isActive,f=o.attributeName,c=o.from,h=o.to,d=o.steps,p=o.children,v=o.duration;if(a.handleStyleChange=a.handleStyleChange.bind(Y4(a)),a.changeStyle=a.changeStyle.bind(Y4(a)),!l||v<=0)return a.state={style:{}},typeof p=="function"&&(a.state={style:h}),G4(a);if(d&&d.length)a.state={style:d[0].style};else if(c){if(typeof p=="function")return a.state={style:c},G4(a);a.state={style:f?Ah({},f,c):c}}else a.state={style:{}};return a}return Mxe(t,[{key:"componentDidMount",value:function(){var r=this.props,a=r.isActive,o=r.canBegin;this.mounted=!0,!(!a||!o)&&this.runAnimation(this.props)}},{key:"componentDidUpdate",value:function(r){var a=this.props,o=a.isActive,l=a.canBegin,f=a.attributeName,c=a.shouldReAnimate,h=a.to,d=a.from,p=this.state.style;if(l){if(!o){var v={style:f?Ah({},f,h):h};this.state&&p&&(f&&p[f]!==h||!f&&p!==h)&&this.setState(v);return}if(!(F2e(r.to,h)&&r.canBegin&&r.isActive)){var b=!r.canBegin||!r.isActive;this.manager&&this.manager.stop(),this.stopJSAnimation&&this.stopJSAnimation();var w=b||c?d:r.to;if(this.state&&p){var k={style:f?Ah({},f,w):w};(f&&p[f]!==w||!f&&p!==w)&&this.setState(k)}this.runAnimation(Ra(Ra({},this.props),{},{from:w,begin:0}))}}}},{key:"componentWillUnmount",value:function(){this.mounted=!1;var r=this.props.onAnimationEnd;this.unSubscribe&&this.unSubscribe(),this.manager&&(this.manager.stop(),this.manager=null),this.stopJSAnimation&&this.stopJSAnimation(),r&&r()}},{key:"handleStyleChange",value:function(r){this.changeStyle(r)}},{key:"changeStyle",value:function(r){this.mounted&&this.setState({style:r})}},{key:"runJSAnimation",value:function(r){var a=this,o=r.from,l=r.to,f=r.duration,c=r.easing,h=r.begin,d=r.onAnimationEnd,p=r.onAnimationStart,v=kxe(o,l,fxe(c),f,this.changeStyle),b=function(){a.stopJSAnimation=v()};this.manager.start([p,h,b,f,d])}},{key:"runStepAnimation",value:function(r){var a=this,o=r.steps,l=r.begin,f=r.onAnimationStart,c=o[0],h=c.style,d=c.duration,p=d===void 0?0:d,v=function(w,k,_){if(_===0)return w;var C=k.duration,x=k.easing,E=x===void 0?"ease":x,O=k.style,j=k.properties,M=k.onAnimationEnd,P=_>0?o[_-1]:k,F=j||Object.keys(O);if(typeof E=="function"||E==="spring")return[].concat(D3(w),[a.runJSAnimation.bind(a,{from:P.style,to:O,duration:C,easing:E}),C]);var R=dN(F,C,E),L=Ra(Ra(Ra({},P.style),O),{},{transition:R});return[].concat(D3(w),[L,C,M]).filter(Q2e)};return this.manager.start([f].concat(D3(o.reduce(v,[h,Math.max(p,l)])),[r.onAnimationEnd]))}},{key:"runAnimation",value:function(r){this.manager||(this.manager=Y2e());var a=r.begin,o=r.duration,l=r.attributeName,f=r.to,c=r.easing,h=r.onAnimationStart,d=r.onAnimationEnd,p=r.steps,v=r.children,b=this.manager;if(this.unSubscribe=b.subscribe(this.handleStyleChange),typeof c=="function"||typeof v=="function"||c==="spring"){this.runJSAnimation(r);return}if(p.length>1){this.runStepAnimation(r);return}var w=l?Ah({},l,f):f,k=dN(Object.keys(w),o,c);b.start([h,a,Ra(Ra({},w),{},{transition:k}),o,d])}},{key:"render",value:function(){var r=this.props,a=r.children;r.begin;var o=r.duration;r.attributeName,r.easing;var l=r.isActive;r.steps,r.from,r.to,r.canBegin,r.onAnimationEnd,r.shouldReAnimate,r.onAnimationReStart;var f=xxe(r,_xe),c=A.Children.count(a),h=this.state.style;if(typeof a=="function")return a(h);if(!l||c===0||o<=0)return a;var d=function(v){var b=v.props,w=b.style,k=w===void 0?{}:w,_=b.className,C=A.cloneElement(v,Ra(Ra({},f),{},{style:Ra(Ra({},k),h),className:_}));return C};return c===1?d(A.Children.only(a)):Q.createElement("div",null,A.Children.map(a,function(p){return d(p)}))}}]),t})(A.PureComponent);go.displayName="Animate";go.defaultProps={begin:0,duration:1e3,from:"",to:"",attributeName:"",easing:"ease",isActive:!0,canBegin:!0,steps:[],onAnimationEnd:function(){},onAnimationStart:function(){}};go.propTypes={from:vt.oneOfType([vt.object,vt.string]),to:vt.oneOfType([vt.object,vt.string]),attributeName:vt.string,duration:vt.number,begin:vt.number,easing:vt.oneOfType([vt.string,vt.func]),steps:vt.arrayOf(vt.shape({duration:vt.number.isRequired,style:vt.object.isRequired,easing:vt.oneOfType([vt.oneOf(["ease","ease-in","ease-out","ease-in-out","linear"]),vt.func]),properties:vt.arrayOf("string"),onAnimationEnd:vt.func})),children:vt.oneOfType([vt.node,vt.func]),isActive:vt.bool,canBegin:vt.bool,onAnimationEnd:vt.func,shouldReAnimate:vt.bool,onAnimationStart:vt.func,onAnimationReStart:vt.func};function Am(e){"@babel/helpers - typeof";return Am=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Am(e)}function D1(){return D1=Object.assign?Object.assign.bind():function(e){for(var n=1;ne.length)&&(n=e.length);for(var t=0,i=new Array(n);t=0?1:-1,f=i>=0?1:-1,c=r>=0&&i>=0||r<0&&i<0?1:0,h;if(o>0&&a instanceof Array){for(var d=[0,0,0,0],p=0,v=4;po?o:a[p];h="M".concat(n,",").concat(t+l*d[0]),d[0]>0&&(h+="A ".concat(d[0],",").concat(d[0],",0,0,").concat(c,",").concat(n+f*d[0],",").concat(t)),h+="L ".concat(n+i-f*d[1],",").concat(t),d[1]>0&&(h+="A ".concat(d[1],",").concat(d[1],",0,0,").concat(c,`, + `).concat(n+i,",").concat(t+l*d[1])),h+="L ".concat(n+i,",").concat(t+r-l*d[2]),d[2]>0&&(h+="A ".concat(d[2],",").concat(d[2],",0,0,").concat(c,`, + `).concat(n+i-f*d[2],",").concat(t+r)),h+="L ".concat(n+f*d[3],",").concat(t+r),d[3]>0&&(h+="A ".concat(d[3],",").concat(d[3],",0,0,").concat(c,`, + `).concat(n,",").concat(t+r-l*d[3])),h+="Z"}else if(o>0&&a===+a&&a>0){var b=Math.min(o,a);h="M ".concat(n,",").concat(t+l*b,` + A `).concat(b,",").concat(b,",0,0,").concat(c,",").concat(n+f*b,",").concat(t,` + L `).concat(n+i-f*b,",").concat(t,` + A `).concat(b,",").concat(b,",0,0,").concat(c,",").concat(n+i,",").concat(t+l*b,` + L `).concat(n+i,",").concat(t+r-l*b,` + A `).concat(b,",").concat(b,",0,0,").concat(c,",").concat(n+i-f*b,",").concat(t+r,` + L `).concat(n+f*b,",").concat(t+r,` + A `).concat(b,",").concat(b,",0,0,").concat(c,",").concat(n,",").concat(t+r-l*b," Z")}else h="M ".concat(n,",").concat(t," h ").concat(i," v ").concat(r," h ").concat(-i," Z");return h},Uxe=function(n,t){if(!n||!t)return!1;var i=n.x,r=n.y,a=t.x,o=t.y,l=t.width,f=t.height;if(Math.abs(l)>0&&Math.abs(f)>0){var c=Math.min(a,a+l),h=Math.max(a,a+l),d=Math.min(o,o+f),p=Math.max(o,o+f);return i>=c&&i<=h&&r>=d&&r<=p}return!1},Vxe={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},Om=function(n){var t=wN(wN({},Vxe),n),i=A.useRef(),r=A.useState(-1),a=$xe(r,2),o=a[0],l=a[1];A.useEffect(function(){if(i.current&&i.current.getTotalLength)try{var E=i.current.getTotalLength();E&&l(E)}catch{}},[]);var f=t.x,c=t.y,h=t.width,d=t.height,p=t.radius,v=t.className,b=t.animationEasing,w=t.animationDuration,k=t.animationBegin,_=t.isAnimationActive,C=t.isUpdateAnimationActive;if(f!==+f||c!==+c||h!==+h||d!==+d||h===0||d===0)return null;var x=dn("recharts-rectangle",v);return C?Q.createElement(go,{canBegin:o>0,from:{width:h,height:d,x:f,y:c},to:{width:h,height:d,x:f,y:c},duration:w,animationEasing:b,isActive:C},function(E){var O=E.width,j=E.height,M=E.x,P=E.y;return Q.createElement(go,{canBegin:o>0,from:"0px ".concat(o===-1?1:o,"px"),to:"".concat(o,"px 0px"),attributeName:"strokeDasharray",begin:k,duration:w,isActive:_,easing:b},Q.createElement("path",D1({},Hn(t,!0),{className:x,d:kN(M,P,O,j,p),ref:i})))}):Q.createElement("path",D1({},Hn(t,!0),{className:x,d:kN(f,c,h,d,p)}))};function K4(){return K4=Object.assign?Object.assign.bind():function(e){for(var n=1;n=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(t[i]=e[i])}return t}function Qxe(e,n){if(e==null)return{};var t={};for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){if(n.indexOf(i)>=0)continue;t[i]=e[i]}return t}var Jxe=function(n,t,i,r,a,o){return"M".concat(n,",").concat(a,"v").concat(r,"M").concat(o,",").concat(t,"h").concat(i)},e3e=function(n){var t=n.x,i=t===void 0?0:t,r=n.y,a=r===void 0?0:r,o=n.top,l=o===void 0?0:o,f=n.left,c=f===void 0?0:f,h=n.width,d=h===void 0?0:h,p=n.height,v=p===void 0?0:p,b=n.className,w=Zxe(n,Wxe),k=Gxe({x:i,y:a,top:l,left:c,width:d,height:v},w);return!Ve(i)||!Ve(a)||!Ve(d)||!Ve(v)||!Ve(l)||!Ve(c)?null:Q.createElement("path",X4({},Hn(k,!0),{className:dn("recharts-cross",b),d:Jxe(i,a,d,v,l,c)}))},R3,xN;function n3e(){if(xN)return R3;xN=1;var e=GH(),n=e(Object.getPrototypeOf,Object);return R3=n,R3}var P3,SN;function t3e(){if(SN)return P3;SN=1;var e=vs(),n=n3e(),t=gs(),i="[object Object]",r=Function.prototype,a=Object.prototype,o=r.toString,l=a.hasOwnProperty,f=o.call(Object);function c(h){if(!t(h)||e(h)!=i)return!1;var d=n(h);if(d===null)return!0;var p=l.call(d,"constructor")&&d.constructor;return typeof p=="function"&&p instanceof p&&o.call(p)==f}return P3=c,P3}var i3e=t3e();const r3e=ht(i3e);var N3,CN;function a3e(){if(CN)return N3;CN=1;var e=vs(),n=gs(),t="[object Boolean]";function i(r){return r===!0||r===!1||n(r)&&e(r)==t}return N3=i,N3}var o3e=a3e();const s3e=ht(o3e);function Em(e){"@babel/helpers - typeof";return Em=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Em(e)}function R1(){return R1=Object.assign?Object.assign.bind():function(e){for(var n=1;ne.length)&&(n=e.length);for(var t=0,i=new Array(n);t0,from:{upperWidth:0,lowerWidth:0,height:p,x:f,y:c},to:{upperWidth:h,lowerWidth:d,height:p,x:f,y:c},duration:w,animationEasing:b,isActive:_},function(x){var E=x.upperWidth,O=x.lowerWidth,j=x.height,M=x.x,P=x.y;return Q.createElement(go,{canBegin:o>0,from:"0px ".concat(o===-1?1:o,"px"),to:"".concat(o,"px 0px"),attributeName:"strokeDasharray",begin:k,duration:w,easing:b},Q.createElement("path",R1({},Hn(t,!0),{className:C,d:EN(M,P,E,O,j),ref:i})))}):Q.createElement("g",null,Q.createElement("path",R1({},Hn(t,!0),{className:C,d:EN(f,c,h,d,p)})))},y3e=["option","shapeType","propTransformer","activeClassName","isActive"];function Tm(e){"@babel/helpers - typeof";return Tm=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Tm(e)}function b3e(e,n){if(e==null)return{};var t=w3e(e,n),i,r;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(t[i]=e[i])}return t}function w3e(e,n){if(e==null)return{};var t={};for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){if(n.indexOf(i)>=0)continue;t[i]=e[i]}return t}function TN(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),t.push.apply(t,i)}return t}function P1(e){for(var n=1;n0&&i.handleDrag(r.changedTouches[0])}),Br(i,"handleDragEnd",function(){i.setState({isTravellerMoving:!1,isSlideMoving:!1},function(){var r=i.props,a=r.endIndex,o=r.onDragEnd,l=r.startIndex;o==null||o({endIndex:a,startIndex:l})}),i.detachDragEndListener()}),Br(i,"handleLeaveWrapper",function(){(i.state.isTravellerMoving||i.state.isSlideMoving)&&(i.leaveTimer=window.setTimeout(i.handleDragEnd,i.props.leaveTimeOut))}),Br(i,"handleEnterSlideOrTraveller",function(){i.setState({isTextActive:!0})}),Br(i,"handleLeaveSlideOrTraveller",function(){i.setState({isTextActive:!1})}),Br(i,"handleSlideDragStart",function(r){var a=BN(r)?r.changedTouches[0]:r;i.setState({isTravellerMoving:!1,isSlideMoving:!0,slideMoveStartX:a.pageX}),i.attachDragEndListener()}),i.travellerDragStartHandlers={startX:i.handleTravellerDragStart.bind(i,"startX"),endX:i.handleTravellerDragStart.bind(i,"endX")},i.state={},i}return Y3e(n,e),U3e(n,[{key:"componentWillUnmount",value:function(){this.leaveTimer&&(clearTimeout(this.leaveTimer),this.leaveTimer=null),this.detachDragEndListener()}},{key:"getIndex",value:function(i){var r=i.startX,a=i.endX,o=this.state.scaleValues,l=this.props,f=l.gap,c=l.data,h=c.length-1,d=Math.min(r,a),p=Math.max(r,a),v=n.getIndexInRange(o,d),b=n.getIndexInRange(o,p);return{startIndex:v-v%f,endIndex:b===h?h:b-b%f}}},{key:"getTextOfTick",value:function(i){var r=this.props,a=r.data,o=r.tickFormatter,l=r.dataKey,f=cr(a[i],l,i);return In(o)?o(f,i):f}},{key:"attachDragEndListener",value:function(){window.addEventListener("mouseup",this.handleDragEnd,!0),window.addEventListener("touchend",this.handleDragEnd,!0),window.addEventListener("mousemove",this.handleDrag,!0)}},{key:"detachDragEndListener",value:function(){window.removeEventListener("mouseup",this.handleDragEnd,!0),window.removeEventListener("touchend",this.handleDragEnd,!0),window.removeEventListener("mousemove",this.handleDrag,!0)}},{key:"handleSlideDrag",value:function(i){var r=this.state,a=r.slideMoveStartX,o=r.startX,l=r.endX,f=this.props,c=f.x,h=f.width,d=f.travellerWidth,p=f.startIndex,v=f.endIndex,b=f.onChange,w=i.pageX-a;w>0?w=Math.min(w,c+h-d-l,c+h-d-o):w<0&&(w=Math.max(w,c-o,c-l));var k=this.getIndex({startX:o+w,endX:l+w});(k.startIndex!==p||k.endIndex!==v)&&b&&b(k),this.setState({startX:o+w,endX:l+w,slideMoveStartX:i.pageX})}},{key:"handleTravellerDragStart",value:function(i,r){var a=BN(r)?r.changedTouches[0]:r;this.setState({isSlideMoving:!1,isTravellerMoving:!0,movingTravellerId:i,brushMoveStartX:a.pageX}),this.attachDragEndListener()}},{key:"handleTravellerMove",value:function(i){var r=this.state,a=r.brushMoveStartX,o=r.movingTravellerId,l=r.endX,f=r.startX,c=this.state[o],h=this.props,d=h.x,p=h.width,v=h.travellerWidth,b=h.onChange,w=h.gap,k=h.data,_={startX:this.state.startX,endX:this.state.endX},C=i.pageX-a;C>0?C=Math.min(C,d+p-v-c):C<0&&(C=Math.max(C,d-c)),_[o]=c+C;var x=this.getIndex(_),E=x.startIndex,O=x.endIndex,j=function(){var P=k.length-1;return o==="startX"&&(l>f?E%w===0:O%w===0)||lf?O%w===0:E%w===0)||l>f&&O===P};this.setState(Br(Br({},o,c+C),"brushMoveStartX",i.pageX),function(){b&&j()&&b(x)})}},{key:"handleTravellerMoveKeyboard",value:function(i,r){var a=this,o=this.state,l=o.scaleValues,f=o.startX,c=o.endX,h=this.state[r],d=l.indexOf(h);if(d!==-1){var p=d+i;if(!(p===-1||p>=l.length)){var v=l[p];r==="startX"&&v>=c||r==="endX"&&v<=f||this.setState(Br({},r,v),function(){a.props.onChange(a.getIndex({startX:a.state.startX,endX:a.state.endX}))})}}}},{key:"renderBackground",value:function(){var i=this.props,r=i.x,a=i.y,o=i.width,l=i.height,f=i.fill,c=i.stroke;return Q.createElement("rect",{stroke:c,fill:f,x:r,y:a,width:o,height:l})}},{key:"renderPanorama",value:function(){var i=this.props,r=i.x,a=i.y,o=i.width,l=i.height,f=i.data,c=i.children,h=i.padding,d=A.Children.only(c);return d?Q.cloneElement(d,{x:r,y:a,width:o,height:l,margin:h,compact:!0,data:f}):null}},{key:"renderTravellerLayer",value:function(i,r){var a,o,l=this,f=this.props,c=f.y,h=f.travellerWidth,d=f.height,p=f.traveller,v=f.ariaLabel,b=f.data,w=f.startIndex,k=f.endIndex,_=Math.max(i,this.props.x),C=B3(B3({},Hn(this.props,!1)),{},{x:_,y:c,width:h,height:d}),x=v||"Min value: ".concat((a=b[w])===null||a===void 0?void 0:a.name,", Max value: ").concat((o=b[k])===null||o===void 0?void 0:o.name);return Q.createElement(It,{tabIndex:0,role:"slider","aria-label":x,"aria-valuenow":i,className:"recharts-brush-traveller",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.travellerDragStartHandlers[r],onTouchStart:this.travellerDragStartHandlers[r],onKeyDown:function(O){["ArrowLeft","ArrowRight"].includes(O.key)&&(O.preventDefault(),O.stopPropagation(),l.handleTravellerMoveKeyboard(O.key==="ArrowRight"?1:-1,r))},onFocus:function(){l.setState({isTravellerFocused:!0})},onBlur:function(){l.setState({isTravellerFocused:!1})},style:{cursor:"col-resize"}},n.renderTraveller(p,C))}},{key:"renderSlide",value:function(i,r){var a=this.props,o=a.y,l=a.height,f=a.stroke,c=a.travellerWidth,h=Math.min(i,r)+c,d=Math.max(Math.abs(r-i)-c,0);return Q.createElement("rect",{className:"recharts-brush-slide",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.handleSlideDragStart,onTouchStart:this.handleSlideDragStart,style:{cursor:"move"},stroke:"none",fill:f,fillOpacity:.2,x:h,y:o,width:d,height:l})}},{key:"renderText",value:function(){var i=this.props,r=i.startIndex,a=i.endIndex,o=i.y,l=i.height,f=i.travellerWidth,c=i.stroke,h=this.state,d=h.startX,p=h.endX,v=5,b={pointerEvents:"none",fill:c};return Q.createElement(It,{className:"recharts-brush-texts"},Q.createElement(u1,$1({textAnchor:"end",verticalAnchor:"middle",x:Math.min(d,p)-v,y:o+l/2},b),this.getTextOfTick(r)),Q.createElement(u1,$1({textAnchor:"start",verticalAnchor:"middle",x:Math.max(d,p)+f+v,y:o+l/2},b),this.getTextOfTick(a)))}},{key:"render",value:function(){var i=this.props,r=i.data,a=i.className,o=i.children,l=i.x,f=i.y,c=i.width,h=i.height,d=i.alwaysShowText,p=this.state,v=p.startX,b=p.endX,w=p.isTextActive,k=p.isSlideMoving,_=p.isTravellerMoving,C=p.isTravellerFocused;if(!r||!r.length||!Ve(l)||!Ve(f)||!Ve(c)||!Ve(h)||c<=0||h<=0)return null;var x=dn("recharts-brush",a),E=Q.Children.count(o)===1,O=q3e("userSelect","none");return Q.createElement(It,{className:x,onMouseLeave:this.handleLeaveWrapper,onTouchMove:this.handleTouchMove,style:O},this.renderBackground(),E&&this.renderPanorama(),this.renderSlide(v,b),this.renderTravellerLayer(v,"startX"),this.renderTravellerLayer(b,"endX"),(w||k||_||C||d)&&this.renderText())}}],[{key:"renderDefaultTraveller",value:function(i){var r=i.x,a=i.y,o=i.width,l=i.height,f=i.stroke,c=Math.floor(a+l/2)-1;return Q.createElement(Q.Fragment,null,Q.createElement("rect",{x:r,y:a,width:o,height:l,fill:f,stroke:"none"}),Q.createElement("line",{x1:r+1,y1:c,x2:r+o-1,y2:c,fill:"none",stroke:"#fff"}),Q.createElement("line",{x1:r+1,y1:c+2,x2:r+o-1,y2:c+2,fill:"none",stroke:"#fff"}))}},{key:"renderTraveller",value:function(i,r){var a;return Q.isValidElement(i)?a=Q.cloneElement(i,r):In(i)?a=i(r):a=n.renderDefaultTraveller(r),a}},{key:"getDerivedStateFromProps",value:function(i,r){var a=i.data,o=i.width,l=i.x,f=i.travellerWidth,c=i.updateId,h=i.startIndex,d=i.endIndex;if(a!==r.prevData||c!==r.prevUpdateId)return B3({prevData:a,prevTravellerWidth:f,prevUpdateId:c,prevX:l,prevWidth:o},a&&a.length?X3e({data:a,width:o,x:l,travellerWidth:f,startIndex:h,endIndex:d}):{scale:null,scaleValues:null});if(r.scale&&(o!==r.prevWidth||l!==r.prevX||f!==r.prevTravellerWidth)){r.scale.range([l,l+o-f]);var p=r.scale.domain().map(function(v){return r.scale(v)});return{prevData:a,prevTravellerWidth:f,prevUpdateId:c,prevX:l,prevWidth:o,startX:r.scale(i.startIndex),endX:r.scale(i.endIndex),scaleValues:p}}return null}},{key:"getIndexInRange",value:function(i,r){for(var a=i.length,o=0,l=a-1;l-o>1;){var f=Math.floor((o+l)/2);i[f]>r?l=f:o=f}return r>=i[l]?l:o}}])})(A.PureComponent);Br(gc,"displayName","Brush");Br(gc,"defaultProps",{height:40,travellerWidth:5,gap:1,fill:"#fff",stroke:"#666",padding:{top:1,right:1,bottom:1,left:1},leaveTimeOut:1e3,alwaysShowText:!1});var F3,FN;function Z3e(){if(FN)return F3;FN=1;var e=Y9();function n(t,i){var r;return e(t,function(a,o,l){return r=i(a,o,l),!r}),!!r}return F3=n,F3}var q3,qN;function Q3e(){if(qN)return q3;qN=1;var e=BH(),n=_l(),t=Z3e(),i=Cr(),r=D0();function a(o,l,f){var c=i(o)?e:t;return f&&r(o,l,f)&&(l=void 0),c(o,n(l,3))}return q3=a,q3}var J3e=Q3e();const eSe=ht(J3e);var fo=function(n,t){var i=n.alwaysShow,r=n.ifOverflow;return i&&(r="extendDomain"),r===t},H3,HN;function nSe(){if(HN)return H3;HN=1;var e=rU();function n(t,i,r){i=="__proto__"&&e?e(t,i,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[i]=r}return H3=n,H3}var U3,UN;function tSe(){if(UN)return U3;UN=1;var e=nSe(),n=tU(),t=_l();function i(r,a){var o={};return a=t(a,3),n(r,function(l,f,c){e(o,f,a(l,f,c))}),o}return U3=i,U3}var iSe=tSe();const rSe=ht(iSe);var V3,VN;function aSe(){if(VN)return V3;VN=1;function e(n,t){for(var i=-1,r=n==null?0:n.length;++i=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(t[i]=e[i])}return t}function mSe(e,n){if(e==null)return{};var t={};for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){if(n.indexOf(i)>=0)continue;t[i]=e[i]}return t}function pSe(e,n){var t=e.x,i=e.y,r=hSe(e,uSe),a="".concat(t),o=parseInt(a,10),l="".concat(i),f=parseInt(l,10),c="".concat(n.height||r.height),h=parseInt(c,10),d="".concat(n.width||r.width),p=parseInt(d,10);return mh(mh(mh(mh(mh({},n),r),o?{x:o}:{}),f?{y:f}:{}),{},{height:h,width:p,name:n.name,radius:n.radius})}function KN(e){return Q.createElement(O3e,Q4({shapeType:"rectangle",propTransformer:pSe,activeClassName:"recharts-active-bar"},e))}var vSe=function(n){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return function(i,r){if(typeof n=="number")return n;var a=Ve(i)||Ope(i);return a?n(i,r):(a||Au(),t)}},gSe=["value","background"],DV;function yc(e){"@babel/helpers - typeof";return yc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},yc(e)}function ySe(e,n){if(e==null)return{};var t=bSe(e,n),i,r;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(t[i]=e[i])}return t}function bSe(e,n){if(e==null)return{};var t={};for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){if(n.indexOf(i)>=0)continue;t[i]=e[i]}return t}function L1(){return L1=Object.assign?Object.assign.bind():function(e){for(var n=1;n0&&Math.abs(H)0&&Math.abs(U)0&&(G=Math.min((X||0)-(U[ee-1]||0),G))}),Number.isFinite(G)){var H=G/B,N=w.layout==="vertical"?i.height:i.width;if(w.padding==="gap"&&(M=H*N/2),w.padding==="no-gap"){var z=Su(n.barCategoryGap,H*N),q=H*N/2;M=q-z-(q-z)/N*z}}}r==="xAxis"?P=[i.left+(x.left||0)+(M||0),i.left+i.width-(x.right||0)-(M||0)]:r==="yAxis"?P=f==="horizontal"?[i.top+i.height-(x.bottom||0),i.top+(x.top||0)]:[i.top+(x.top||0)+(M||0),i.top+i.height-(x.bottom||0)-(M||0)]:P=w.range,O&&(P=[P[1],P[0]]);var Y=Hke(w,a,p),D=Y.scale,V=Y.realScaleType;D.domain(_).range(P),Uke(D);var W=Qke(D,Pa(Pa({},w),{},{realScaleType:V}));r==="xAxis"?(L=k==="top"&&!E||k==="bottom"&&E,F=i.left,R=d[j]-L*w.height):r==="yAxis"&&(L=k==="left"&&!E||k==="right"&&E,F=d[j]-L*w.width,R=i.top);var $=Pa(Pa(Pa({},w),W),{},{realScaleType:V,x:F,y:R,scale:D,width:r==="xAxis"?i.width:w.width,height:r==="yAxis"?i.height:w.height});return $.bandSize=C1($,W),!w.hide&&r==="xAxis"?d[j]+=(L?-1:1)*$.height:w.hide||(d[j]+=(L?-1:1)*$.width),Pa(Pa({},v),{},V0({},b,$))},{})},$V=function(n,t){var i=n.x,r=n.y,a=t.x,o=t.y;return{x:Math.min(i,a),y:Math.min(r,o),width:Math.abs(a-i),height:Math.abs(o-r)}},TSe=function(n){var t=n.x1,i=n.y1,r=n.x2,a=n.y2;return $V({x:t,y:i},{x:r,y:a})},zV=(function(){function e(n){OSe(this,e),this.scale=n}return jSe(e,[{key:"domain",get:function(){return this.scale.domain}},{key:"range",get:function(){return this.scale.range}},{key:"rangeMin",get:function(){return this.range()[0]}},{key:"rangeMax",get:function(){return this.range()[1]}},{key:"bandwidth",get:function(){return this.scale.bandwidth}},{key:"apply",value:function(t){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=i.bandAware,a=i.position;if(t!==void 0){if(a)switch(a){case"start":return this.scale(t);case"middle":{var o=this.bandwidth?this.bandwidth()/2:0;return this.scale(t)+o}case"end":{var l=this.bandwidth?this.bandwidth():0;return this.scale(t)+l}default:return this.scale(t)}if(r){var f=this.bandwidth?this.bandwidth()/2:0;return this.scale(t)+f}return this.scale(t)}}},{key:"isInRange",value:function(t){var i=this.range(),r=i[0],a=i[i.length-1];return r<=a?t>=r&&t<=a:t>=a&&t<=r}}],[{key:"create",value:function(t){return new e(t)}}])})();V0(zV,"EPS",1e-4);var SA=function(n){var t=Object.keys(n).reduce(function(i,r){return Pa(Pa({},i),{},V0({},r,zV.create(n[r])))},{});return Pa(Pa({},t),{},{apply:function(r){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=a.bandAware,l=a.position;return rSe(r,function(f,c){return t[c].apply(f,{bandAware:o,position:l})})},isInRange:function(r){return MV(r,function(a,o){return t[o].isInRange(a)})}})};function MSe(e){return(e%180+180)%180}var DSe=function(n){var t=n.width,i=n.height,r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,a=MSe(r),o=a*Math.PI/180,l=Math.atan(i/t),f=o>l&&o-1?f[c?a[h]:h]:void 0}}return Y3=i,Y3}var K3,n$;function PSe(){if(n$)return K3;n$=1;var e=OV();function n(t){var i=e(t),r=i%1;return i===i?r?i-r:i:0}return K3=n,K3}var X3,t$;function NSe(){if(t$)return X3;t$=1;var e=ZH(),n=_l(),t=PSe(),i=Math.max;function r(a,o,l){var f=a==null?0:a.length;if(!f)return-1;var c=l==null?0:t(l);return c<0&&(c=i(f+c,0)),e(a,n(o,3),c)}return X3=r,X3}var Z3,i$;function $Se(){if(i$)return Z3;i$=1;var e=RSe(),n=NSe(),t=e(n);return Z3=t,Z3}var zSe=$Se();const LSe=ht(zSe);var ISe=dH();const BSe=ht(ISe);var FSe=BSe(function(e){return{x:e.left,y:e.top,width:e.width,height:e.height}},function(e){return["l",e.left,"t",e.top,"w",e.width,"h",e.height].join("")}),CA=A.createContext(void 0),AA=A.createContext(void 0),LV=A.createContext(void 0),IV=A.createContext({}),BV=A.createContext(void 0),FV=A.createContext(0),qV=A.createContext(0),r$=function(n){var t=n.state,i=t.xAxisMap,r=t.yAxisMap,a=t.offset,o=n.clipPathId,l=n.children,f=n.width,c=n.height,h=FSe(a);return Q.createElement(CA.Provider,{value:i},Q.createElement(AA.Provider,{value:r},Q.createElement(IV.Provider,{value:a},Q.createElement(LV.Provider,{value:h},Q.createElement(BV.Provider,{value:o},Q.createElement(FV.Provider,{value:c},Q.createElement(qV.Provider,{value:f},l)))))))},qSe=function(){return A.useContext(BV)},HV=function(n){var t=A.useContext(CA);t==null&&Au();var i=t[n];return i==null&&Au(),i},HSe=function(){var n=A.useContext(CA);return Zs(n)},USe=function(){var n=A.useContext(AA),t=LSe(n,function(i){return MV(i.domain,Number.isFinite)});return t||Zs(n)},UV=function(n){var t=A.useContext(AA);t==null&&Au();var i=t[n];return i==null&&Au(),i},VSe=function(){var n=A.useContext(LV);return n},WSe=function(){return A.useContext(IV)},OA=function(){return A.useContext(qV)},jA=function(){return A.useContext(FV)};function bc(e){"@babel/helpers - typeof";return bc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},bc(e)}function GSe(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function YSe(e,n){for(var t=0;te.length)&&(n=e.length);for(var t=0,i=new Array(n);te*r)return!1;var a=t();return e*(n-e*a/2-i)>=0&&e*(n+e*a/2-r)<=0}function E4e(e,n){return ZV(e,n+1)}function T4e(e,n,t,i,r){for(var a=(i||[]).slice(),o=n.start,l=n.end,f=0,c=1,h=o,d=function(){var b=i==null?void 0:i[f];if(b===void 0)return{v:ZV(i,c)};var w=f,k,_=function(){return k===void 0&&(k=t(b,w)),k},C=b.coordinate,x=f===0||H1(e,C,_,h,l);x||(f=0,h=o,c+=1),x&&(h=C+e*(_()/2+r),f+=c)},p;c<=a.length;)if(p=d(),p)return p.v;return[]}function Nm(e){"@babel/helpers - typeof";return Nm=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Nm(e)}function d$(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),t.push.apply(t,i)}return t}function Ki(e){for(var n=1;n0?v.coordinate-k*e:v.coordinate})}else a[p]=v=Ki(Ki({},v),{},{tickCoord:v.coordinate});var _=H1(e,v.tickCoord,w,l,f);_&&(f=v.tickCoord-e*(w()/2+r),a[p]=Ki(Ki({},v),{},{isShow:!0}))},h=o-1;h>=0;h--)c(h);return a}function N4e(e,n,t,i,r,a){var o=(i||[]).slice(),l=o.length,f=n.start,c=n.end;if(a){var h=i[l-1],d=t(h,l-1),p=e*(h.coordinate+e*d/2-c);o[l-1]=h=Ki(Ki({},h),{},{tickCoord:p>0?h.coordinate-p*e:h.coordinate});var v=H1(e,h.tickCoord,function(){return d},f,c);v&&(c=h.tickCoord-e*(d/2+r),o[l-1]=Ki(Ki({},h),{},{isShow:!0}))}for(var b=a?l-1:l,w=function(C){var x=o[C],E,O=function(){return E===void 0&&(E=t(x,C)),E};if(C===0){var j=e*(x.coordinate-e*O()/2-f);o[C]=x=Ki(Ki({},x),{},{tickCoord:j<0?x.coordinate-j*e:x.coordinate})}else o[C]=x=Ki(Ki({},x),{},{tickCoord:x.coordinate});var M=H1(e,x.tickCoord,O,f,c);M&&(f=x.tickCoord+e*(O()/2+r),o[C]=Ki(Ki({},x),{},{isShow:!0}))},k=0;k=2?Ba(r[1].coordinate-r[0].coordinate):1,_=j4e(a,k,v);return f==="equidistantPreserveStart"?T4e(k,_,w,r,o):(f==="preserveStart"||f==="preserveStartEnd"?p=N4e(k,_,w,r,o,f==="preserveStartEnd"):p=P4e(k,_,w,r,o),p.filter(function(C){return C.isShow}))}var $4e=["viewBox"],z4e=["viewBox"],L4e=["ticks"];function _c(e){"@babel/helpers - typeof";return _c=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},_c(e)}function If(){return If=Object.assign?Object.assign.bind():function(e){for(var n=1;n=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(t[i]=e[i])}return t}function I4e(e,n){if(e==null)return{};var t={};for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){if(n.indexOf(i)>=0)continue;t[i]=e[i]}return t}function B4e(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function m$(e,n){for(var t=0;t0?f(this.props):f(v)),o<=0||l<=0||!b||!b.length?null:Q.createElement(It,{className:dn("recharts-cartesian-axis",c),ref:function(k){i.layerReference=k}},a&&this.renderAxisLine(),this.renderTicks(b,this.state.fontSize,this.state.letterSpacing),ni.renderCallByParent(this.props))}}],[{key:"renderTickItem",value:function(i,r,a){var o,l=dn(r.className,"recharts-cartesian-axis-tick-value");return Q.isValidElement(i)?o=Q.cloneElement(i,yi(yi({},r),{},{className:l})):In(i)?o=i(yi(yi({},r),{},{className:l})):o=Q.createElement(u1,If({},r,{className:"recharts-cartesian-axis-tick-value"}),a),o}}])})(A.Component);MA(ad,"displayName","CartesianAxis");MA(ad,"defaultProps",{x:0,y:0,width:0,height:0,viewBox:{x:0,y:0,width:0,height:0},orientation:"bottom",ticks:[],stroke:"#666",tickLine:!0,axisLine:!0,tick:!0,mirror:!1,minTickGap:5,tickSize:6,tickMargin:2,interval:"preserveEnd"});var G4e=["x1","y1","x2","y2","key"],Y4e=["offset"];function Ou(e){"@babel/helpers - typeof";return Ou=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Ou(e)}function p$(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),t.push.apply(t,i)}return t}function Zi(e){for(var n=1;n=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(t[i]=e[i])}return t}function Q4e(e,n){if(e==null)return{};var t={};for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){if(n.indexOf(i)>=0)continue;t[i]=e[i]}return t}var J4e=function(n){var t=n.fill;if(!t||t==="none")return null;var i=n.fillOpacity,r=n.x,a=n.y,o=n.width,l=n.height,f=n.ry;return Q.createElement("rect",{x:r,y:a,ry:f,width:o,height:l,stroke:"none",fill:t,fillOpacity:i,className:"recharts-cartesian-grid-bg"})};function eW(e,n){var t;if(Q.isValidElement(e))t=Q.cloneElement(e,n);else if(In(e))t=e(n);else{var i=n.x1,r=n.y1,a=n.x2,o=n.y2,l=n.key,f=v$(n,G4e),c=Hn(f,!1);c.offset;var h=v$(c,Y4e);t=Q.createElement("line",cu({},h,{x1:i,y1:r,x2:a,y2:o,fill:"none",key:l}))}return t}function e6e(e){var n=e.x,t=e.width,i=e.horizontal,r=i===void 0?!0:i,a=e.horizontalPoints;if(!r||!a||!a.length)return null;var o=a.map(function(l,f){var c=Zi(Zi({},e),{},{x1:n,y1:l,x2:n+t,y2:l,key:"line-".concat(f),index:f});return eW(r,c)});return Q.createElement("g",{className:"recharts-cartesian-grid-horizontal"},o)}function n6e(e){var n=e.y,t=e.height,i=e.vertical,r=i===void 0?!0:i,a=e.verticalPoints;if(!r||!a||!a.length)return null;var o=a.map(function(l,f){var c=Zi(Zi({},e),{},{x1:l,y1:n,x2:l,y2:n+t,key:"line-".concat(f),index:f});return eW(r,c)});return Q.createElement("g",{className:"recharts-cartesian-grid-vertical"},o)}function t6e(e){var n=e.horizontalFill,t=e.fillOpacity,i=e.x,r=e.y,a=e.width,o=e.height,l=e.horizontalPoints,f=e.horizontal,c=f===void 0?!0:f;if(!c||!n||!n.length)return null;var h=l.map(function(p){return Math.round(p+r-r)}).sort(function(p,v){return p-v});r!==h[0]&&h.unshift(0);var d=h.map(function(p,v){var b=!h[v+1],w=b?r+o-p:h[v+1]-p;if(w<=0)return null;var k=v%n.length;return Q.createElement("rect",{key:"react-".concat(v),y:p,x:i,height:w,width:a,stroke:"none",fill:n[k],fillOpacity:t,className:"recharts-cartesian-grid-bg"})});return Q.createElement("g",{className:"recharts-cartesian-gridstripes-horizontal"},d)}function i6e(e){var n=e.vertical,t=n===void 0?!0:n,i=e.verticalFill,r=e.fillOpacity,a=e.x,o=e.y,l=e.width,f=e.height,c=e.verticalPoints;if(!t||!i||!i.length)return null;var h=c.map(function(p){return Math.round(p+a-a)}).sort(function(p,v){return p-v});a!==h[0]&&h.unshift(0);var d=h.map(function(p,v){var b=!h[v+1],w=b?a+l-p:h[v+1]-p;if(w<=0)return null;var k=v%i.length;return Q.createElement("rect",{key:"react-".concat(v),x:p,y:o,width:w,height:f,stroke:"none",fill:i[k],fillOpacity:r,className:"recharts-cartesian-grid-bg"})});return Q.createElement("g",{className:"recharts-cartesian-gridstripes-vertical"},d)}var r6e=function(n,t){var i=n.xAxis,r=n.width,a=n.height,o=n.offset;return mV(TA(Zi(Zi(Zi({},ad.defaultProps),i),{},{ticks:Go(i,!0),viewBox:{x:0,y:0,width:r,height:a}})),o.left,o.left+o.width,t)},a6e=function(n,t){var i=n.yAxis,r=n.width,a=n.height,o=n.offset;return mV(TA(Zi(Zi(Zi({},ad.defaultProps),i),{},{ticks:Go(i,!0),viewBox:{x:0,y:0,width:r,height:a}})),o.top,o.top+o.height,t)},Mf={horizontal:!0,vertical:!0,stroke:"#ccc",fill:"none",verticalFill:[],horizontalFill:[]};function X0(e){var n,t,i,r,a,o,l=OA(),f=jA(),c=WSe(),h=Zi(Zi({},e),{},{stroke:(n=e.stroke)!==null&&n!==void 0?n:Mf.stroke,fill:(t=e.fill)!==null&&t!==void 0?t:Mf.fill,horizontal:(i=e.horizontal)!==null&&i!==void 0?i:Mf.horizontal,horizontalFill:(r=e.horizontalFill)!==null&&r!==void 0?r:Mf.horizontalFill,vertical:(a=e.vertical)!==null&&a!==void 0?a:Mf.vertical,verticalFill:(o=e.verticalFill)!==null&&o!==void 0?o:Mf.verticalFill,x:Ve(e.x)?e.x:c.left,y:Ve(e.y)?e.y:c.top,width:Ve(e.width)?e.width:c.width,height:Ve(e.height)?e.height:c.height}),d=h.x,p=h.y,v=h.width,b=h.height,w=h.syncWithTicks,k=h.horizontalValues,_=h.verticalValues,C=HSe(),x=USe();if(!Ve(v)||v<=0||!Ve(b)||b<=0||!Ve(d)||d!==+d||!Ve(p)||p!==+p)return null;var E=h.verticalCoordinatesGenerator||r6e,O=h.horizontalCoordinatesGenerator||a6e,j=h.horizontalPoints,M=h.verticalPoints;if((!j||!j.length)&&In(O)){var P=k&&k.length,F=O({yAxis:x?Zi(Zi({},x),{},{ticks:P?k:x.ticks}):void 0,width:l,height:f,offset:c},P?!0:w);Qo(Array.isArray(F),"horizontalCoordinatesGenerator should return Array but instead it returned [".concat(Ou(F),"]")),Array.isArray(F)&&(j=F)}if((!M||!M.length)&&In(E)){var R=_&&_.length,L=E({xAxis:C?Zi(Zi({},C),{},{ticks:R?_:C.ticks}):void 0,width:l,height:f,offset:c},R?!0:w);Qo(Array.isArray(L),"verticalCoordinatesGenerator should return Array but instead it returned [".concat(Ou(L),"]")),Array.isArray(L)&&(M=L)}return Q.createElement("g",{className:"recharts-cartesian-grid"},Q.createElement(J4e,{fill:h.fill,fillOpacity:h.fillOpacity,x:h.x,y:h.y,width:h.width,height:h.height,ry:h.ry}),Q.createElement(e6e,cu({},h,{offset:c,horizontalPoints:j,xAxis:C,yAxis:x})),Q.createElement(n6e,cu({},h,{offset:c,verticalPoints:M,xAxis:C,yAxis:x})),Q.createElement(t6e,cu({},h,{horizontalPoints:j})),Q.createElement(i6e,cu({},h,{verticalPoints:M})))}X0.displayName="CartesianGrid";var o6e=["type","layout","connectNulls","ref"],s6e=["key"];function xc(e){"@babel/helpers - typeof";return xc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},xc(e)}function g$(e,n){if(e==null)return{};var t=l6e(e,n),i,r;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(t[i]=e[i])}return t}function l6e(e,n){if(e==null)return{};var t={};for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){if(n.indexOf(i)>=0)continue;t[i]=e[i]}return t}function Bh(){return Bh=Object.assign?Object.assign.bind():function(e){for(var n=1;ne.length)&&(n=e.length);for(var t=0,i=new Array(n);td){v=[].concat(Df(f.slice(0,b)),[d-w]);break}var k=v.length%2===0?[0,p]:[p];return[].concat(Df(n.repeat(f,h)),Df(v),k).map(function(_){return"".concat(_,"px")}).join(", ")}),Na(t,"id",ed("recharts-line-")),Na(t,"pathRef",function(o){t.mainCurve=o}),Na(t,"handleAnimationEnd",function(){t.setState({isAnimationFinished:!0}),t.props.onAnimationEnd&&t.props.onAnimationEnd()}),Na(t,"handleAnimationStart",function(){t.setState({isAnimationFinished:!1}),t.props.onAnimationStart&&t.props.onAnimationStart()}),t}return y6e(n,e),m6e(n,[{key:"componentDidMount",value:function(){if(this.props.isAnimationActive){var i=this.getTotalLength();this.setState({totalLength:i})}}},{key:"componentDidUpdate",value:function(){if(this.props.isAnimationActive){var i=this.getTotalLength();i!==this.state.totalLength&&this.setState({totalLength:i})}}},{key:"getTotalLength",value:function(){var i=this.mainCurve;try{return i&&i.getTotalLength&&i.getTotalLength()||0}catch{return 0}}},{key:"renderErrorBar",value:function(i,r){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var a=this.props,o=a.points,l=a.xAxis,f=a.yAxis,c=a.layout,h=a.children,d=va(h,vp);if(!d)return null;var p=function(w,k){return{x:w.x,y:w.y,value:w.value,errorVal:cr(w.payload,k)}},v={clipPath:i?"url(#clipPath-".concat(r,")"):null};return Q.createElement(It,v,d.map(function(b){return Q.cloneElement(b,{key:"bar-".concat(b.props.dataKey),data:o,xAxis:l,yAxis:f,layout:c,dataPointFormatter:p})}))}},{key:"renderDots",value:function(i,r,a){var o=this.props.isAnimationActive;if(o&&!this.state.isAnimationFinished)return null;var l=this.props,f=l.dot,c=l.points,h=l.dataKey,d=Hn(this.props,!1),p=Hn(f,!0),v=c.map(function(w,k){var _=Ir(Ir(Ir({key:"dot-".concat(k),r:3},d),p),{},{index:k,cx:w.x,cy:w.y,value:w.value,dataKey:h,payload:w.payload,points:c});return n.renderDotItem(f,_)}),b={clipPath:i?"url(#clipPath-".concat(r?"":"dots-").concat(a,")"):null};return Q.createElement(It,Bh({className:"recharts-line-dots",key:"dots"},b),v)}},{key:"renderCurveStatically",value:function(i,r,a,o){var l=this.props,f=l.type,c=l.layout,h=l.connectNulls;l.ref;var d=g$(l,o6e),p=Ir(Ir(Ir({},Hn(d,!0)),{},{fill:"none",className:"recharts-line-curve",clipPath:r?"url(#clipPath-".concat(a,")"):null,points:i},o),{},{type:f,layout:c,connectNulls:h});return Q.createElement(Yf,Bh({},p,{pathRef:this.pathRef}))}},{key:"renderCurveWithAnimation",value:function(i,r){var a=this,o=this.props,l=o.points,f=o.strokeDasharray,c=o.isAnimationActive,h=o.animationBegin,d=o.animationDuration,p=o.animationEasing,v=o.animationId,b=o.animateNewValues,w=o.width,k=o.height,_=this.state,C=_.prevPoints,x=_.totalLength;return Q.createElement(go,{begin:h,duration:d,isActive:c,easing:p,from:{t:0},to:{t:1},key:"line-".concat(v),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(E){var O=E.t;if(C){var j=C.length/l.length,M=l.map(function(B,G){var U=Math.floor(G*j);if(C[U]){var H=C[U],N=Bi(H.x,B.x),z=Bi(H.y,B.y);return Ir(Ir({},B),{},{x:N(O),y:z(O)})}if(b){var q=Bi(w*2,B.x),Y=Bi(k/2,B.y);return Ir(Ir({},B),{},{x:q(O),y:Y(O)})}return Ir(Ir({},B),{},{x:B.x,y:B.y})});return a.renderCurveStatically(M,i,r)}var P=Bi(0,x),F=P(O),R;if(f){var L="".concat(f).split(/[,\s]+/gim).map(function(B){return parseFloat(B)});R=a.getStrokeDasharray(F,x,L)}else R=a.generateSimpleStrokeDasharray(x,F);return a.renderCurveStatically(l,i,r,{strokeDasharray:R})})}},{key:"renderCurve",value:function(i,r){var a=this.props,o=a.points,l=a.isAnimationActive,f=this.state,c=f.prevPoints,h=f.totalLength;return l&&o&&o.length&&(!c&&h>0||!hc(c,o))?this.renderCurveWithAnimation(i,r):this.renderCurveStatically(o,i,r)}},{key:"render",value:function(){var i,r=this.props,a=r.hide,o=r.dot,l=r.points,f=r.className,c=r.xAxis,h=r.yAxis,d=r.top,p=r.left,v=r.width,b=r.height,w=r.isAnimationActive,k=r.id;if(a||!l||!l.length)return null;var _=this.state.isAnimationFinished,C=l.length===1,x=dn("recharts-line",f),E=c&&c.allowDataOverflow,O=h&&h.allowDataOverflow,j=E||O,M=Gn(k)?this.id:k,P=(i=Hn(o,!1))!==null&&i!==void 0?i:{r:3,strokeWidth:2},F=P.r,R=F===void 0?3:F,L=P.strokeWidth,B=L===void 0?2:L,G=gH(o)?o:{},U=G.clipDot,H=U===void 0?!0:U,N=R*2+B;return Q.createElement(It,{className:x},E||O?Q.createElement("defs",null,Q.createElement("clipPath",{id:"clipPath-".concat(M)},Q.createElement("rect",{x:E?p:p-v/2,y:O?d:d-b/2,width:E?v:v*2,height:O?b:b*2})),!H&&Q.createElement("clipPath",{id:"clipPath-dots-".concat(M)},Q.createElement("rect",{x:p-N/2,y:d-N/2,width:v+N,height:b+N}))):null,!C&&this.renderCurve(j,M),this.renderErrorBar(j,M),(C||o)&&this.renderDots(j,H,M),(!w||_)&&uo.renderCallByParent(this.props,l))}}],[{key:"getDerivedStateFromProps",value:function(i,r){return i.animationId!==r.prevAnimationId?{prevAnimationId:i.animationId,curPoints:i.points,prevPoints:r.curPoints}:i.points!==r.curPoints?{curPoints:i.points}:null}},{key:"repeat",value:function(i,r){for(var a=i.length%2!==0?[].concat(Df(i),[0]):i,o=[],l=0;l=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(t[i]=e[i])}return t}function _6e(e,n){if(e==null)return{};var t={};for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){if(n.indexOf(i)>=0)continue;t[i]=e[i]}return t}function du(){return du=Object.assign?Object.assign.bind():function(e){for(var n=1;n0||!hc(h,o)||!hc(d,l))?this.renderAreaWithAnimation(i,r):this.renderAreaStatically(o,l,i,r)}},{key:"render",value:function(){var i,r=this.props,a=r.hide,o=r.dot,l=r.points,f=r.className,c=r.top,h=r.left,d=r.xAxis,p=r.yAxis,v=r.width,b=r.height,w=r.isAnimationActive,k=r.id;if(a||!l||!l.length)return null;var _=this.state.isAnimationFinished,C=l.length===1,x=dn("recharts-area",f),E=d&&d.allowDataOverflow,O=p&&p.allowDataOverflow,j=E||O,M=Gn(k)?this.id:k,P=(i=Hn(o,!1))!==null&&i!==void 0?i:{r:3,strokeWidth:2},F=P.r,R=F===void 0?3:F,L=P.strokeWidth,B=L===void 0?2:L,G=gH(o)?o:{},U=G.clipDot,H=U===void 0?!0:U,N=R*2+B;return Q.createElement(It,{className:x},E||O?Q.createElement("defs",null,Q.createElement("clipPath",{id:"clipPath-".concat(M)},Q.createElement("rect",{x:E?h:h-v/2,y:O?c:c-b/2,width:E?v:v*2,height:O?b:b*2})),!H&&Q.createElement("clipPath",{id:"clipPath-dots-".concat(M)},Q.createElement("rect",{x:h-N/2,y:c-N/2,width:v+N,height:b+N}))):null,C?null:this.renderArea(j,M),(o||C)&&this.renderDots(j,H,M),(!w||_)&&uo.renderCallByParent(this.props,l))}}],[{key:"getDerivedStateFromProps",value:function(i,r){return i.animationId!==r.prevAnimationId?{prevAnimationId:i.animationId,curPoints:i.points,curBaseLine:i.baseLine,prevPoints:r.curPoints,prevBaseLine:r.curBaseLine}:i.points!==r.curPoints||i.baseLine!==r.curBaseLine?{curPoints:i.points,curBaseLine:i.baseLine}:null}}])})(A.PureComponent);iW=ls;ao(ls,"displayName","Area");ao(ls,"defaultProps",{stroke:"#3182bd",fill:"#3182bd",fillOpacity:.6,xAxisId:0,yAxisId:0,legendType:"line",connectNulls:!1,points:[],dot:!1,activeDot:!0,hide:!1,isAnimationActive:!Lu.isSsr,animationBegin:0,animationDuration:1500,animationEasing:"ease"});ao(ls,"getBaseValue",function(e,n,t,i){var r=e.layout,a=e.baseValue,o=n.props.baseValue,l=o??a;if(Ve(l)&&typeof l=="number")return l;var f=r==="horizontal"?i:t,c=f.scale.domain();if(f.type==="number"){var h=Math.max(c[0],c[1]),d=Math.min(c[0],c[1]);return l==="dataMin"?d:l==="dataMax"||h<0?h:Math.max(Math.min(c[0],c[1]),0)}return l==="dataMin"?c[0]:l==="dataMax"?c[1]:c[0]});ao(ls,"getComposedData",function(e){var n=e.props,t=e.item,i=e.xAxis,r=e.yAxis,a=e.xAxisTicks,o=e.yAxisTicks,l=e.bandSize,f=e.dataKey,c=e.stackedData,h=e.dataStartIndex,d=e.displayedData,p=e.offset,v=n.layout,b=c&&c.length,w=iW.getBaseValue(n,t,i,r),k=v==="horizontal",_=!1,C=d.map(function(E,O){var j;b?j=c[h+O]:(j=cr(E,f),Array.isArray(j)?_=!0:j=[w,j]);var M=j[1]==null||b&&cr(E,f)==null;return k?{x:S1({axis:i,ticks:a,bandSize:l,entry:E,index:O}),y:M?null:r.scale(j[1]),value:j,payload:E}:{x:M?null:i.scale(j[1]),y:S1({axis:r,ticks:o,bandSize:l,entry:E,index:O}),value:j,payload:E}}),x;return b||_?x=C.map(function(E){var O=Array.isArray(E.value)?E.value[0]:null;return k?{x:E.x,y:O!=null&&E.y!=null?r.scale(O):null}:{x:O!=null?i.scale(O):null,y:E.y}}):x=k?r.scale(w):i.scale(w),Vs({points:C,baseLine:x,layout:v,isRange:_},p)});ao(ls,"renderDotItem",function(e,n){var t;if(Q.isValidElement(e))t=Q.cloneElement(e,n);else if(In(e))t=e(n);else{var i=dn("recharts-area-dot",typeof e!="boolean"?e.className:""),r=n.key,a=rW(n,k6e);t=Q.createElement(q0,du({},a,{key:r,className:i}))}return t});function Cc(e){"@babel/helpers - typeof";return Cc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Cc(e)}function T6e(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function M6e(e,n){for(var t=0;te.length)&&(n=e.length);for(var t=0,i=new Array(n);t=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(t[i]=e[i])}return t}function yCe(e,n){if(e==null)return{};var t={};for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){if(n.indexOf(i)>=0)continue;t[i]=e[i]}return t}function bCe(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function wCe(e,n){for(var t=0;te.length)&&(n=e.length);for(var t=0,i=new Array(n);t0?o:n&&n.length&&Ve(r)&&Ve(a)?n.slice(r,a+1):[]};function bW(e){return e==="number"?[0,"auto"]:void 0}var y6=function(n,t,i,r){var a=n.graphicalItems,o=n.tooltipAxis,l=Z0(t,n);return i<0||!a||!a.length||i>=l.length?null:a.reduce(function(f,c){var h,d=(h=c.props.data)!==null&&h!==void 0?h:t;d&&n.dataStartIndex+n.dataEndIndex!==0&&n.dataEndIndex-n.dataStartIndex>=i&&(d=d.slice(n.dataStartIndex,n.dataEndIndex+1));var p;if(o.dataKey&&!o.allowDuplicatedCategory){var v=d===void 0?l:d;p=Xg(v,o.dataKey,r)}else p=d&&d[i]||l[i];return p?[].concat(jc(f),[vV(c,p)]):f},[])},j$=function(n,t,i,r){var a=r||{x:n.chartX,y:n.chartY},o=DCe(a,i),l=n.orderedTooltipTicks,f=n.tooltipAxis,c=n.tooltipTicks,h=zke(o,l,c,f);if(h>=0&&c){var d=c[h]&&c[h].value,p=y6(n,t,h,d),v=RCe(i,l,h,a);return{activeTooltipIndex:h,activeLabel:d,activePayload:p,activeCoordinate:v}}return null},PCe=function(n,t){var i=t.axes,r=t.graphicalItems,a=t.axisType,o=t.axisIdKey,l=t.stackGroups,f=t.dataStartIndex,c=t.dataEndIndex,h=n.layout,d=n.children,p=n.stackOffset,v=hV(h,a);return i.reduce(function(b,w){var k,_=w.type.defaultProps!==void 0?je(je({},w.type.defaultProps),w.props):w.props,C=_.type,x=_.dataKey,E=_.allowDataOverflow,O=_.allowDuplicatedCategory,j=_.scale,M=_.ticks,P=_.includeHidden,F=_[o];if(b[F])return b;var R=Z0(n.data,{graphicalItems:r.filter(function(W){var $,X=o in W.props?W.props[o]:($=W.type.defaultProps)===null||$===void 0?void 0:$[o];return X===F}),dataStartIndex:f,dataEndIndex:c}),L=R.length,B,G,U;oCe(_.domain,E,C)&&(B=N4(_.domain,null,E),v&&(C==="number"||j!=="auto")&&(U=Lh(R,x,"category")));var H=bW(C);if(!B||B.length===0){var N,z=(N=_.domain)!==null&&N!==void 0?N:H;if(x){if(B=Lh(R,x,C),C==="category"&&v){var q=Epe(B);O&&q?(G=B,B=N1(0,L)):O||(B=HP(z,B,w).reduce(function(W,$){return W.indexOf($)>=0?W:[].concat(jc(W),[$])},[]))}else if(C==="category")O?B=B.filter(function(W){return W!==""&&!Gn(W)}):B=HP(z,B,w).reduce(function(W,$){return W.indexOf($)>=0||$===""||Gn($)?W:[].concat(jc(W),[$])},[]);else if(C==="number"){var Y=qke(R,r.filter(function(W){var $,X,ee=o in W.props?W.props[o]:($=W.type.defaultProps)===null||$===void 0?void 0:$[o],re="hide"in W.props?W.props.hide:(X=W.type.defaultProps)===null||X===void 0?void 0:X.hide;return ee===F&&(P||!re)}),x,a,h);Y&&(B=Y)}v&&(C==="number"||j!=="auto")&&(U=Lh(R,x,"category"))}else v?B=N1(0,L):l&&l[F]&&l[F].hasStack&&C==="number"?B=p==="expand"?[0,1]:pV(l[F].stackGroups,f,c):B=dV(R,r.filter(function(W){var $=o in W.props?W.props[o]:W.type.defaultProps[o],X="hide"in W.props?W.props.hide:W.type.defaultProps.hide;return $===F&&(P||!X)}),C,h,!0);if(C==="number")B=p6(d,B,F,a,M),z&&(B=N4(z,B,E));else if(C==="category"&&z){var D=z,V=B.every(function(W){return D.indexOf(W)>=0});V&&(B=D)}}return je(je({},b),{},Sn({},F,je(je({},_),{},{axisType:a,domain:B,categoricalDomain:U,duplicateDomain:G,originalDomain:(k=_.domain)!==null&&k!==void 0?k:H,isCategorical:v,layout:h})))},{})},NCe=function(n,t){var i=t.graphicalItems,r=t.Axis,a=t.axisType,o=t.axisIdKey,l=t.stackGroups,f=t.dataStartIndex,c=t.dataEndIndex,h=n.layout,d=n.children,p=Z0(n.data,{graphicalItems:i,dataStartIndex:f,dataEndIndex:c}),v=p.length,b=hV(h,a),w=-1;return i.reduce(function(k,_){var C=_.type.defaultProps!==void 0?je(je({},_.type.defaultProps),_.props):_.props,x=C[o],E=bW("number");if(!k[x]){w++;var O;return b?O=N1(0,v):l&&l[x]&&l[x].hasStack?(O=pV(l[x].stackGroups,f,c),O=p6(d,O,x,a)):(O=N4(E,dV(p,i.filter(function(j){var M,P,F=o in j.props?j.props[o]:(M=j.type.defaultProps)===null||M===void 0?void 0:M[o],R="hide"in j.props?j.props.hide:(P=j.type.defaultProps)===null||P===void 0?void 0:P.hide;return F===x&&!R}),"number",h),r.defaultProps.allowDataOverflow),O=p6(d,O,x,a)),je(je({},k),{},Sn({},x,je(je({axisType:a},r.defaultProps),{},{hide:!0,orientation:pa(TCe,"".concat(a,".").concat(w%2),null),domain:O,originalDomain:E,isCategorical:b,layout:h})))}return k},{})},$Ce=function(n,t){var i=t.axisType,r=i===void 0?"xAxis":i,a=t.AxisComp,o=t.graphicalItems,l=t.stackGroups,f=t.dataStartIndex,c=t.dataEndIndex,h=n.children,d="".concat(r,"Id"),p=va(h,a),v={};return p&&p.length?v=PCe(n,{axes:p,graphicalItems:o,axisType:r,axisIdKey:d,stackGroups:l,dataStartIndex:f,dataEndIndex:c}):o&&o.length&&(v=NCe(n,{Axis:a,graphicalItems:o,axisType:r,axisIdKey:d,stackGroups:l,dataStartIndex:f,dataEndIndex:c})),v},zCe=function(n){var t=Zs(n),i=Go(t,!1,!0);return{tooltipTicks:i,orderedTooltipTicks:K9(i,function(r){return r.coordinate}),tooltipAxis:t,tooltipAxisBandSize:C1(t,i)}},E$=function(n){var t=n.children,i=n.defaultShowTooltip,r=qr(t,gc),a=0,o=0;return n.data&&n.data.length!==0&&(o=n.data.length-1),r&&r.props&&(r.props.startIndex>=0&&(a=r.props.startIndex),r.props.endIndex>=0&&(o=r.props.endIndex)),{chartX:0,chartY:0,dataStartIndex:a,dataEndIndex:o,activeTooltipIndex:-1,isTooltipActive:!!i}},LCe=function(n){return!n||!n.length?!1:n.some(function(t){var i=Zo(t&&t.type);return i&&i.indexOf("Bar")>=0})},T$=function(n){return n==="horizontal"?{numericAxisName:"yAxis",cateAxisName:"xAxis"}:n==="vertical"?{numericAxisName:"xAxis",cateAxisName:"yAxis"}:n==="centric"?{numericAxisName:"radiusAxis",cateAxisName:"angleAxis"}:{numericAxisName:"angleAxis",cateAxisName:"radiusAxis"}},ICe=function(n,t){var i=n.props,r=n.graphicalItems,a=n.xAxisMap,o=a===void 0?{}:a,l=n.yAxisMap,f=l===void 0?{}:l,c=i.width,h=i.height,d=i.children,p=i.margin||{},v=qr(d,gc),b=qr(d,Jo),w=Object.keys(f).reduce(function(O,j){var M=f[j],P=M.orientation;return!M.mirror&&!M.hide?je(je({},O),{},Sn({},P,O[P]+M.width)):O},{left:p.left||0,right:p.right||0}),k=Object.keys(o).reduce(function(O,j){var M=o[j],P=M.orientation;return!M.mirror&&!M.hide?je(je({},O),{},Sn({},P,pa(O,"".concat(P))+M.height)):O},{top:p.top||0,bottom:p.bottom||0}),_=je(je({},k),w),C=_.bottom;v&&(_.bottom+=v.props.height||gc.defaultProps.height),b&&t&&(_=Bke(_,r,i,t));var x=c-_.left-_.right,E=h-_.top-_.bottom;return je(je({brushBottom:C},_),{},{width:Math.max(x,0),height:Math.max(E,0)})},BCe=function(n,t){if(t==="xAxis")return n[t].width;if(t==="yAxis")return n[t].height},DA=function(n){var t=n.chartName,i=n.GraphicalChild,r=n.defaultTooltipEventType,a=r===void 0?"axis":r,o=n.validateTooltipEventTypes,l=o===void 0?["axis"]:o,f=n.axisComponents,c=n.legendContent,h=n.formatAxisMap,d=n.defaultProps,p=function(_,C){var x=C.graphicalItems,E=C.stackGroups,O=C.offset,j=C.updateId,M=C.dataStartIndex,P=C.dataEndIndex,F=_.barSize,R=_.layout,L=_.barGap,B=_.barCategoryGap,G=_.maxBarSize,U=T$(R),H=U.numericAxisName,N=U.cateAxisName,z=LCe(x),q=[];return x.forEach(function(Y,D){var V=Z0(_.data,{graphicalItems:[Y],dataStartIndex:M,dataEndIndex:P}),W=Y.type.defaultProps!==void 0?je(je({},Y.type.defaultProps),Y.props):Y.props,$=W.dataKey,X=W.maxBarSize,ee=W["".concat(H,"Id")],re=W["".concat(N,"Id")],se={},ye=f.reduce(function(Be,We){var Ue=C["".concat(We.axisType,"Map")],Xe=W["".concat(We.axisType,"Id")];Ue&&Ue[Xe]||We.axisType==="zAxis"||Au();var Qe=Ue[Xe];return je(je({},Be),{},Sn(Sn({},We.axisType,Qe),"".concat(We.axisType,"Ticks"),Go(Qe)))},se),ae=ye[N],le=ye["".concat(N,"Ticks")],_e=E&&E[ee]&&E[ee].hasStack&&e_e(Y,E[ee].stackGroups),ne=Zo(Y.type).indexOf("Bar")>=0,ze=C1(ae,le),we=[],Ce=z&&Lke({barSize:F,stackGroups:E,totalSize:BCe(ye,N)});if(ne){var Ne,ve,xe=Gn(X)?G:X,Pe=(Ne=(ve=C1(ae,le,!0))!==null&&ve!==void 0?ve:xe)!==null&&Ne!==void 0?Ne:0;we=Ike({barGap:L,barCategoryGap:B,bandSize:Pe!==ze?Pe:ze,sizeList:Ce[re],maxBarSize:xe}),Pe!==ze&&(we=we.map(function(Be){return je(je({},Be),{},{position:je(je({},Be.position),{},{offset:Be.position.offset-Pe/2})})}))}var ue=Y&&Y.type&&Y.type.getComposedData;ue&&q.push({props:je(je({},ue(je(je({},ye),{},{displayedData:V,props:_,dataKey:$,item:Y,bandSize:ze,barPosition:we,offset:O,stackedData:_e,layout:R,dataStartIndex:M,dataEndIndex:P}))),{},Sn(Sn(Sn({key:Y.key||"item-".concat(D)},H,ye[H]),N,ye[N]),"animationId",j)),childIndex:Fpe(Y,_.children),item:Y})}),q},v=function(_,C){var x=_.props,E=_.dataStartIndex,O=_.dataEndIndex,j=_.updateId;if(!rD({props:x}))return null;var M=x.children,P=x.layout,F=x.stackOffset,R=x.data,L=x.reverseStackOrder,B=T$(P),G=B.numericAxisName,U=B.cateAxisName,H=va(M,i),N=Zke(R,H,"".concat(G,"Id"),"".concat(U,"Id"),F,L),z=f.reduce(function(W,$){var X="".concat($.axisType,"Map");return je(je({},W),{},Sn({},X,$Ce(x,je(je({},$),{},{graphicalItems:H,stackGroups:$.axisType===G&&N,dataStartIndex:E,dataEndIndex:O}))))},{}),q=ICe(je(je({},z),{},{props:x,graphicalItems:H}),C==null?void 0:C.legendBBox);Object.keys(z).forEach(function(W){z[W]=h(x,z[W],q,W.replace("Map",""),t)});var Y=z["".concat(U,"Map")],D=zCe(Y),V=p(x,je(je({},z),{},{dataStartIndex:E,dataEndIndex:O,updateId:j,graphicalItems:H,stackGroups:N,offset:q}));return je(je({formattedGraphicalItems:V,graphicalItems:H,offset:q,stackGroups:N},D),z)},b=(function(k){function _(C){var x,E,O;return bCe(this,_),O=_Ce(this,_,[C]),Sn(O,"eventEmitterSymbol",Symbol("rechartsEventEmitter")),Sn(O,"accessibilityManager",new aCe),Sn(O,"handleLegendBBoxUpdate",function(j){if(j){var M=O.state,P=M.dataStartIndex,F=M.dataEndIndex,R=M.updateId;O.setState(je({legendBBox:j},v({props:O.props,dataStartIndex:P,dataEndIndex:F,updateId:R},je(je({},O.state),{},{legendBBox:j}))))}}),Sn(O,"handleReceiveSyncEvent",function(j,M,P){if(O.props.syncId===j){if(P===O.eventEmitterSymbol&&typeof O.props.syncMethod!="function")return;O.applySyncEvent(M)}}),Sn(O,"handleBrushChange",function(j){var M=j.startIndex,P=j.endIndex;if(M!==O.state.dataStartIndex||P!==O.state.dataEndIndex){var F=O.state.updateId;O.setState(function(){return je({dataStartIndex:M,dataEndIndex:P},v({props:O.props,dataStartIndex:M,dataEndIndex:P,updateId:F},O.state))}),O.triggerSyncEvent({dataStartIndex:M,dataEndIndex:P})}}),Sn(O,"handleMouseEnter",function(j){var M=O.getMouseInfo(j);if(M){var P=je(je({},M),{},{isTooltipActive:!0});O.setState(P),O.triggerSyncEvent(P);var F=O.props.onMouseEnter;In(F)&&F(P,j)}}),Sn(O,"triggeredAfterMouseMove",function(j){var M=O.getMouseInfo(j),P=M?je(je({},M),{},{isTooltipActive:!0}):{isTooltipActive:!1};O.setState(P),O.triggerSyncEvent(P);var F=O.props.onMouseMove;In(F)&&F(P,j)}),Sn(O,"handleItemMouseEnter",function(j){O.setState(function(){return{isTooltipActive:!0,activeItem:j,activePayload:j.tooltipPayload,activeCoordinate:j.tooltipPosition||{x:j.cx,y:j.cy}}})}),Sn(O,"handleItemMouseLeave",function(){O.setState(function(){return{isTooltipActive:!1}})}),Sn(O,"handleMouseMove",function(j){j.persist(),O.throttleTriggeredAfterMouseMove(j)}),Sn(O,"handleMouseLeave",function(j){O.throttleTriggeredAfterMouseMove.cancel();var M={isTooltipActive:!1};O.setState(M),O.triggerSyncEvent(M);var P=O.props.onMouseLeave;In(P)&&P(M,j)}),Sn(O,"handleOuterEvent",function(j){var M=Bpe(j),P=pa(O.props,"".concat(M));if(M&&In(P)){var F,R;/.*touch.*/i.test(M)?R=O.getMouseInfo(j.changedTouches[0]):R=O.getMouseInfo(j),P((F=R)!==null&&F!==void 0?F:{},j)}}),Sn(O,"handleClick",function(j){var M=O.getMouseInfo(j);if(M){var P=je(je({},M),{},{isTooltipActive:!0});O.setState(P),O.triggerSyncEvent(P);var F=O.props.onClick;In(F)&&F(P,j)}}),Sn(O,"handleMouseDown",function(j){var M=O.props.onMouseDown;if(In(M)){var P=O.getMouseInfo(j);M(P,j)}}),Sn(O,"handleMouseUp",function(j){var M=O.props.onMouseUp;if(In(M)){var P=O.getMouseInfo(j);M(P,j)}}),Sn(O,"handleTouchMove",function(j){j.changedTouches!=null&&j.changedTouches.length>0&&O.throttleTriggeredAfterMouseMove(j.changedTouches[0])}),Sn(O,"handleTouchStart",function(j){j.changedTouches!=null&&j.changedTouches.length>0&&O.handleMouseDown(j.changedTouches[0])}),Sn(O,"handleTouchEnd",function(j){j.changedTouches!=null&&j.changedTouches.length>0&&O.handleMouseUp(j.changedTouches[0])}),Sn(O,"handleDoubleClick",function(j){var M=O.props.onDoubleClick;if(In(M)){var P=O.getMouseInfo(j);M(P,j)}}),Sn(O,"handleContextMenu",function(j){var M=O.props.onContextMenu;if(In(M)){var P=O.getMouseInfo(j);M(P,j)}}),Sn(O,"triggerSyncEvent",function(j){O.props.syncId!==void 0&&eS.emit(nS,O.props.syncId,j,O.eventEmitterSymbol)}),Sn(O,"applySyncEvent",function(j){var M=O.props,P=M.layout,F=M.syncMethod,R=O.state.updateId,L=j.dataStartIndex,B=j.dataEndIndex;if(j.dataStartIndex!==void 0||j.dataEndIndex!==void 0)O.setState(je({dataStartIndex:L,dataEndIndex:B},v({props:O.props,dataStartIndex:L,dataEndIndex:B,updateId:R},O.state)));else if(j.activeTooltipIndex!==void 0){var G=j.chartX,U=j.chartY,H=j.activeTooltipIndex,N=O.state,z=N.offset,q=N.tooltipTicks;if(!z)return;if(typeof F=="function")H=F(q,j);else if(F==="value"){H=-1;for(var Y=0;Y=0){var _e,ne;if(G.dataKey&&!G.allowDuplicatedCategory){var ze=typeof G.dataKey=="function"?le:"payload.".concat(G.dataKey.toString());_e=Xg(Y,ze,H),ne=D&&V&&Xg(V,ze,H)}else _e=Y==null?void 0:Y[U],ne=D&&V&&V[U];if(re||ee){var we=j.props.activeIndex!==void 0?j.props.activeIndex:U;return[A.cloneElement(j,je(je(je({},F.props),ye),{},{activeIndex:we})),null,null]}if(!Gn(_e))return[ae].concat(jc(O.renderActivePoints({item:F,activePoint:_e,basePoint:ne,childIndex:U,isRange:D})))}else{var Ce,Ne=(Ce=O.getItemByXY(O.state.activeCoordinate))!==null&&Ce!==void 0?Ce:{graphicalItem:ae},ve=Ne.graphicalItem,xe=ve.item,Pe=xe===void 0?j:xe,ue=ve.childIndex,Be=je(je(je({},F.props),ye),{},{activeIndex:ue});return[A.cloneElement(Pe,Be),null,null]}return D?[ae,null,null]:[ae,null]}),Sn(O,"renderCustomized",function(j,M,P){return A.cloneElement(j,je(je({key:"recharts-customized-".concat(P)},O.props),O.state))}),Sn(O,"renderMap",{CartesianGrid:{handler:rg,once:!0},ReferenceArea:{handler:O.renderReferenceElement},ReferenceLine:{handler:rg},ReferenceDot:{handler:O.renderReferenceElement},XAxis:{handler:rg},YAxis:{handler:rg},Brush:{handler:O.renderBrush,once:!0},Bar:{handler:O.renderGraphicChild},Line:{handler:O.renderGraphicChild},Area:{handler:O.renderGraphicChild},Radar:{handler:O.renderGraphicChild},RadialBar:{handler:O.renderGraphicChild},Scatter:{handler:O.renderGraphicChild},Pie:{handler:O.renderGraphicChild},Funnel:{handler:O.renderGraphicChild},Tooltip:{handler:O.renderCursor,once:!0},PolarGrid:{handler:O.renderPolarGrid,once:!0},PolarAngleAxis:{handler:O.renderPolarAxis},PolarRadiusAxis:{handler:O.renderPolarAxis},Customized:{handler:O.renderCustomized}}),O.clipPathId="".concat((x=C.id)!==null&&x!==void 0?x:ed("recharts"),"-clip"),O.throttleTriggeredAfterMouseMove=fU(O.triggeredAfterMouseMove,(E=C.throttleDelay)!==null&&E!==void 0?E:1e3/60),O.state={},O}return CCe(_,k),kCe(_,[{key:"componentDidMount",value:function(){var x,E;this.addListener(),this.accessibilityManager.setDetails({container:this.container,offset:{left:(x=this.props.margin.left)!==null&&x!==void 0?x:0,top:(E=this.props.margin.top)!==null&&E!==void 0?E:0},coordinateList:this.state.tooltipTicks,mouseHandlerCallback:this.triggeredAfterMouseMove,layout:this.props.layout}),this.displayDefaultTooltip()}},{key:"displayDefaultTooltip",value:function(){var x=this.props,E=x.children,O=x.data,j=x.height,M=x.layout,P=qr(E,ca);if(P){var F=P.props.defaultIndex;if(!(typeof F!="number"||F<0||F>this.state.tooltipTicks.length-1)){var R=this.state.tooltipTicks[F]&&this.state.tooltipTicks[F].value,L=y6(this.state,O,F,R),B=this.state.tooltipTicks[F].coordinate,G=(this.state.offset.top+j)/2,U=M==="horizontal",H=U?{x:B,y:G}:{y:B,x:G},N=this.state.formattedGraphicalItems.find(function(q){var Y=q.item;return Y.type.name==="Scatter"});N&&(H=je(je({},H),N.props.points[F].tooltipPosition),L=N.props.points[F].tooltipPayload);var z={activeTooltipIndex:F,isTooltipActive:!0,activeLabel:R,activePayload:L,activeCoordinate:H};this.setState(z),this.renderCursor(P),this.accessibilityManager.setIndex(F)}}}},{key:"getSnapshotBeforeUpdate",value:function(x,E){if(!this.props.accessibilityLayer)return null;if(this.state.tooltipTicks!==E.tooltipTicks&&this.accessibilityManager.setDetails({coordinateList:this.state.tooltipTicks}),this.props.layout!==x.layout&&this.accessibilityManager.setDetails({layout:this.props.layout}),this.props.margin!==x.margin){var O,j;this.accessibilityManager.setDetails({offset:{left:(O=this.props.margin.left)!==null&&O!==void 0?O:0,top:(j=this.props.margin.top)!==null&&j!==void 0?j:0}})}return null}},{key:"componentDidUpdate",value:function(x){i4([qr(x.children,ca)],[qr(this.props.children,ca)])||this.displayDefaultTooltip()}},{key:"componentWillUnmount",value:function(){this.removeListener(),this.throttleTriggeredAfterMouseMove.cancel()}},{key:"getTooltipEventType",value:function(){var x=qr(this.props.children,ca);if(x&&typeof x.props.shared=="boolean"){var E=x.props.shared?"axis":"item";return l.indexOf(E)>=0?E:a}return a}},{key:"getMouseInfo",value:function(x){if(!this.container)return null;var E=this.container,O=E.getBoundingClientRect(),j=Oye(O),M={chartX:Math.round(x.pageX-j.left),chartY:Math.round(x.pageY-j.top)},P=O.width/E.offsetWidth||1,F=this.inRange(M.chartX,M.chartY,P);if(!F)return null;var R=this.state,L=R.xAxisMap,B=R.yAxisMap,G=this.getTooltipEventType(),U=j$(this.state,this.props.data,this.props.layout,F);if(G!=="axis"&&L&&B){var H=Zs(L).scale,N=Zs(B).scale,z=H&&H.invert?H.invert(M.chartX):null,q=N&&N.invert?N.invert(M.chartY):null;return je(je({},M),{},{xValue:z,yValue:q},U)}return U?je(je({},M),U):null}},{key:"inRange",value:function(x,E){var O=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,j=this.props.layout,M=x/O,P=E/O;if(j==="horizontal"||j==="vertical"){var F=this.state.offset,R=M>=F.left&&M<=F.left+F.width&&P>=F.top&&P<=F.top+F.height;return R?{x:M,y:P}:null}var L=this.state,B=L.angleAxisMap,G=L.radiusAxisMap;if(B&&G){var U=Zs(B);return WP({x:M,y:P},U)}return null}},{key:"parseEventsOfWrapper",value:function(){var x=this.props.children,E=this.getTooltipEventType(),O=qr(x,ca),j={};O&&E==="axis"&&(O.props.trigger==="click"?j={onClick:this.handleClick}:j={onMouseEnter:this.handleMouseEnter,onDoubleClick:this.handleDoubleClick,onMouseMove:this.handleMouseMove,onMouseLeave:this.handleMouseLeave,onTouchMove:this.handleTouchMove,onTouchStart:this.handleTouchStart,onTouchEnd:this.handleTouchEnd,onContextMenu:this.handleContextMenu});var M=Zg(this.props,this.handleOuterEvent);return je(je({},M),j)}},{key:"addListener",value:function(){eS.on(nS,this.handleReceiveSyncEvent)}},{key:"removeListener",value:function(){eS.removeListener(nS,this.handleReceiveSyncEvent)}},{key:"filterFormatItem",value:function(x,E,O){for(var j=this.state.formattedGraphicalItems,M=0,P=j.length;M({root:{"--chart-text-color":n?st(n,e):void 0,"--chart-grid-color":t?st(t,e):void 0,"--chart-cursor-fill":i?st(i,e):void 0,"--chart-bar-label-color":r?st(r,e):void 0}});function WCe(e,n){let t=0,i=0;return e.map(r=>{if(r.standalone)for(const a in r)typeof r[a]=="number"&&a!==n&&(r[a]=[0,r[a]]);else for(const a in r)typeof r[a]=="number"&&a!==n&&(i+=r[a],r[a]=[t,i],t=i);return r})}function GCe(e,n){return typeof e=="function"?e(n).fill:e==null?void 0:e.fill}const il=Re(e=>{const n=be("BarChart",VCe,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,data:f,withLegend:c,legendProps:h,series:d,onMouseLeave:p,dataKey:v,withTooltip:b,withXAxis:w,withYAxis:k,gridAxis:_,tickLine:C,xAxisProps:x,yAxisProps:E,unit:O,tooltipAnimationDuration:j,strokeDasharray:M,gridProps:P,tooltipProps:F,referenceLines:R,fillOpacity:L,barChartProps:B,type:G,orientation:U,dir:H,valueFormatter:N,children:z,barProps:q,xAxisLabel:Y,yAxisLabel:D,withBarValueLabel:V,valueLabelProps:W,withRightYAxis:$,rightYAxisLabel:X,rightYAxisProps:ee,minBarSize:re,maxBarWidth:se,mod:ye,getBarColor:ae,gridColor:le,textColor:_e,attributes:ne,...ze}=n,we=li(),Ce=_!=="none"&&(C==="x"||C==="xy"),Ne=_!=="none"&&(C==="y"||C==="xy"),[ve,xe]=A.useState(null),Pe=ve!==null,ue=G==="stacked"||G==="percent",Be=G==="percent"?UCe:N,We=Se=>{xe(null),p==null||p(Se)},{resolvedClassNames:Ue,resolvedStyles:Xe}=Hi({classNames:t,styles:a,props:n}),Qe=G==="waterfall"?WCe(f,v):f,ie=Ze({name:"BarChart",classes:w0,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:ne,vars:l,varsResolver:wW}),he=d.map(Se=>{const tn=st(Se.color,we),cn=Pe&&ve!==Se.name,On=typeof q=="function"?q(Se):q,mn=On==null?void 0:On.shape;return A.createElement(qu,{...ie("bar"),key:Se.name,name:Se.name,dataKey:Se.name,fill:tn,stroke:tn,isAnimationActive:!1,fillOpacity:cn?.1:L,strokeOpacity:cn?.2:0,stackId:ue?"stack":Se.stackId||void 0,yAxisId:Se.yAxisId||void 0,minPointSize:re,...On,shape:an=>{const en=an.payload,Rn=en!=null&&en.color?st(en.color,we):typeof ae=="function"?st(ae(en==null?void 0:en[Se.name],Se),we):GCe(q,Se)||tn,De={...an,fill:Rn};return typeof mn=="function"?mn(De):Q.isValidElement(mn)?Q.cloneElement(mn,De):typeof mn=="object"&&mn?y.jsx(Om,{...De,...mn}):y.jsx(Om,{...De})}},V&&y.jsx(uo,{position:U==="vertical"?"right":"top",fontSize:12,fill:"var(--chart-bar-label-color, var(--mantine-color-dimmed))",formatter:an=>Be==null?void 0:Be(an),...typeof W=="function"?W(Se):W}))}),Ge=R==null?void 0:R.map((Se,tn)=>{const cn=st(Se.color,we);return y.jsx(gp,{stroke:Se.color?cn:"var(--chart-grid-color)",strokeWidth:1,yAxisId:Se.yAxisId||void 0,...Se,label:{fill:Se.color?cn:"currentColor",fontSize:12,position:Se.labelPosition??"insideBottomLeft",...typeof Se.label=="object"?Se.label:{value:Se.label}},...ie("referenceLine")},tn)}),Je={axisLine:!1,...U==="vertical"?{dataKey:v,type:"category"}:{type:"number"},tickLine:Ne?{stroke:"currentColor"}:!1,allowDecimals:!0,unit:O,tickFormatter:U==="vertical"?void 0:Be,...ie("axis")};return y.jsx(ge,{...ie("root"),onMouseLeave:We,dir:H||"ltr",mod:[{orientation:U},ye],...ze,children:y.jsx(Z9,{...ie("container"),children:y.jsxs(qCe,{data:Qe,stackOffset:G==="percent"?"expand":void 0,layout:U,maxBarSize:se,margin:{bottom:Y?30:void 0,left:D?10:void 0,right:D?5:void 0},...B,children:[c&&y.jsx(Jo,{verticalAlign:"top",content:Se=>y.jsx(b0,{payload:Se.payload,onHighlight:xe,legendPosition:(h==null?void 0:h.verticalAlign)||"top",classNames:Ue,styles:Xe,series:d,showColor:G!=="waterfall",attributes:ne}),...h}),y.jsxs(Al,{hide:!w,...U==="vertical"?{type:"number"}:{dataKey:v},tick:{transform:"translate(0, 10)",fontSize:12,fill:"currentColor"},stroke:"",interval:"preserveStartEnd",tickLine:Ce?{stroke:"currentColor"}:!1,minTickGap:5,tickFormatter:U==="vertical"?Be:void 0,...ie("axis"),...x,children:[Y&&y.jsx(ni,{position:"insideBottom",offset:-20,fontSize:12,...ie("axisLabel"),children:Y}),x==null?void 0:x.children]}),y.jsxs(yo,{orientation:"left",tick:{transform:"translate(-10, 0)",fontSize:12,fill:"currentColor"},hide:!k,...Je,...E,children:[D&&y.jsx(ni,{position:"insideLeft",angle:-90,textAnchor:"middle",fontSize:12,offset:-5,...ie("axisLabel"),children:D}),E==null?void 0:E.children]}),y.jsxs(yo,{yAxisId:"right",orientation:"right",tick:{transform:"translate(10, 0)",fontSize:12,fill:"currentColor"},hide:!$,...Je,...ee,children:[X&&y.jsx(ni,{position:"insideRight",angle:90,textAnchor:"middle",fontSize:12,offset:-5,...ie("axisLabel"),children:X}),E==null?void 0:E.children]}),y.jsx(X0,{strokeDasharray:M,vertical:_==="y"||_==="xy",horizontal:_==="x"||_==="xy",...ie("grid"),...P}),b&&y.jsx(ca,{animationDuration:j,isAnimationActive:j!==0,position:U==="vertical"?{}:{y:0},cursor:{stroke:"var(--chart-grid-color)",strokeWidth:1,strokeDasharray:M,fill:"var(--chart-cursor-fill)"},content:({label:Se,payload:tn,labelFormatter:cn})=>y.jsx(j9,{label:cn&&tn?cn(Se,tn):Se,payload:tn,type:G==="waterfall"?"scatter":void 0,unit:O,classNames:Ue,styles:Xe,series:d,valueFormatter:N,attributes:ne}),...F}),he,Ge,z]})})})});il.displayName="@mantine/charts/BarChart";il.classes=w0;il.varsResolver=wW;const YCe={withXAxis:!0,withYAxis:!0,withTooltip:!0,tooltipAnimationDuration:0,fillOpacity:1,tickLine:"y",strokeDasharray:"5 5",gridAxis:"x",withDots:!0,connectNulls:!0,strokeWidth:2,curveType:"monotone",gradientStops:[{offset:0,color:"red"},{offset:100,color:"blue"}]},kW=(e,{textColor:n,gridColor:t})=>({root:{"--chart-text-color":n?st(n,e):void 0,"--chart-grid-color":t?st(t,e):void 0}}),Q0=Re(e=>{const n=be("LineChart",YCe,e),{classNames:t,className:i,style:r,styles:a,unstyled:o,vars:l,data:f,withLegend:c,legendProps:h,series:d,onMouseLeave:p,dataKey:v,withTooltip:b,withXAxis:w,withYAxis:k,gridAxis:_,tickLine:C,xAxisProps:x,yAxisProps:E,unit:O,tooltipAnimationDuration:j,strokeDasharray:M,gridProps:P,tooltipProps:F,referenceLines:R,withDots:L,dotProps:B,activeDotProps:G,strokeWidth:U,lineChartProps:H,connectNulls:N,fillOpacity:z,curveType:q,orientation:Y,dir:D,valueFormatter:V,children:W,lineProps:$,xAxisLabel:X,yAxisLabel:ee,type:re,gradientStops:se,withRightYAxis:ye,rightYAxisLabel:ae,rightYAxisProps:le,withPointLabels:_e,attributes:ne,gridColor:ze,...we}=n,Ce=li(),Ne=_!=="none"&&(C==="x"||C==="xy"),ve=_!=="none"&&(C==="y"||C==="xy"),[xe,Pe]=A.useState(null),ue=xe!==null,Be=Se=>{Pe(null),p==null||p(Se)},{resolvedClassNames:We,resolvedStyles:Ue}=Hi({classNames:t,styles:a,props:n}),Xe=Ze({name:"LineChart",classes:w0,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:ne,vars:l,varsResolver:kW}),Qe=`line-chart-gradient-${qi()}`,ie=se==null?void 0:se.map(Se=>y.jsx("stop",{offset:`${Se.offset}%`,stopColor:st(Se.color,Ce)},Se.color)),he=d.map(Se=>{const tn=st(Se.color,Ce),cn=ue&&xe!==Se.name;return A.createElement(yp,{...Xe("line"),key:Se.name,name:Se.name,dataKey:Se.name,dot:L?{fillOpacity:cn?0:1,strokeOpacity:cn?0:1,strokeWidth:1,fill:re==="gradient"?"var(--mantine-color-gray-7)":tn,stroke:re==="gradient"?"white":tn,...B}:!1,activeDot:L?{fill:re==="gradient"?"var(--mantine-color-gray-7)":tn,stroke:re==="gradient"?"white":tn,...G}:!1,fill:tn,stroke:re==="gradient"?`url(#${Qe})`:tn,strokeWidth:U,isAnimationActive:!1,fillOpacity:cn?0:z,strokeOpacity:cn?.5:z,connectNulls:N,type:Se.curveType??q,strokeDasharray:Se.strokeDasharray,yAxisId:Se.yAxisId||void 0,label:_e?y.jsx(Bme,{valueFormatter:V}):void 0,...typeof $=="function"?$(Se):$})}),Ge=R==null?void 0:R.map((Se,tn)=>{const cn=st(Se.color,Ce);return y.jsx(gp,{stroke:Se.color?cn:"var(--chart-grid-color)",strokeWidth:1,yAxisId:Se.yAxisId||void 0,...Se,label:{fill:Se.color?cn:"currentColor",fontSize:12,position:Se.labelPosition??"insideBottomLeft",...typeof Se.label=="object"?Se.label:{value:Se.label}},...Xe("referenceLine")},tn)}),Je={axisLine:!1,...Y==="vertical"?{dataKey:v,type:"category"}:{type:"number"},tickLine:ve?{stroke:"currentColor"}:!1,allowDecimals:!0,unit:O,tickFormatter:Y==="vertical"?void 0:V,...Xe("axis")};return y.jsx(ge,{...Xe("root"),onMouseLeave:Be,dir:D||"ltr",...we,children:y.jsx(Z9,{...Xe("container"),children:y.jsxs(FCe,{data:f,layout:Y,margin:{bottom:X?30:void 0,left:ee?10:void 0,right:ee?5:void 0},...H,children:[re==="gradient"&&y.jsx("defs",{children:y.jsx("linearGradient",{id:Qe,x1:"0",y1:"0",x2:"0",y2:"1",children:ie})}),c&&y.jsx(Jo,{verticalAlign:"top",content:Se=>y.jsx(b0,{payload:Se.payload,onHighlight:Pe,legendPosition:(h==null?void 0:h.verticalAlign)||"top",classNames:We,styles:Ue,series:d,showColor:re!=="gradient",attributes:ne}),...h}),y.jsxs(Al,{hide:!w,...Y==="vertical"?{type:"number"}:{dataKey:v},tick:{transform:"translate(0, 10)",fontSize:12,fill:"currentColor"},stroke:"",interval:"preserveStartEnd",tickLine:Ne?{stroke:"currentColor"}:!1,minTickGap:5,tickFormatter:Y==="vertical"?V:void 0,...Xe("axis"),...x,children:[X&&y.jsx(ni,{position:"insideBottom",offset:-20,fontSize:12,...Xe("axisLabel"),children:X}),x==null?void 0:x.children]}),y.jsxs(yo,{tick:{transform:"translate(-10, 0)",fontSize:12,fill:"currentColor"},hide:!k,...Je,...E,children:[ee&&y.jsx(ni,{position:"insideLeft",angle:-90,textAnchor:"middle",fontSize:12,offset:-5,...Xe("axisLabel"),children:ee}),E==null?void 0:E.children]}),y.jsxs(yo,{yAxisId:"right",orientation:"right",tick:{transform:"translate(10, 0)",fontSize:12,fill:"currentColor"},hide:!ye,...Je,...le,children:[ae&&y.jsx(ni,{position:"insideRight",angle:90,textAnchor:"middle",fontSize:12,offset:-5,...Xe("axisLabel"),children:ae}),E==null?void 0:E.children]}),y.jsx(X0,{strokeDasharray:M,vertical:_==="y"||_==="xy",horizontal:_==="x"||_==="xy",...Xe("grid"),...P}),b&&y.jsx(ca,{animationDuration:j,isAnimationActive:j!==0,position:Y==="vertical"?{}:{y:0},cursor:{stroke:"var(--chart-grid-color)",strokeWidth:1,strokeDasharray:M},content:({label:Se,payload:tn,labelFormatter:cn})=>y.jsx(j9,{label:cn&&tn?cn(Se,tn):Se,payload:tn,unit:O,classNames:We,styles:Ue,series:d,valueFormatter:V,showColor:re!=="gradient",attributes:ne}),...F}),he,Ge,W]})})})});Q0.displayName="@mantine/charts/LineChart";Q0.classes=w0;Q0.varsResolver=kW;function KCe(e){try{return new Date(e+"T00:00:00").toLocaleDateString("es-ES",{weekday:"long",day:"2-digit",month:"long",year:"numeric"})}catch{return e}}function Rf({label:e,value:n,color:t,icon:i,sub:r}){return y.jsxs(Lt,{p:"sm",withBorder:!0,radius:"md",children:[y.jsxs(Ke,{gap:6,mb:2,align:"center",children:[i,y.jsx(Te,{size:"xs",c:"dimmed",tt:"uppercase",fw:600,children:e})]}),y.jsx(Te,{fz:28,fw:700,c:t,children:n}),r&&y.jsx(Te,{size:"xs",c:"dimmed",children:r})]})}function ag({title:e,rows:n,emptyText:t,withAvatar:i=!1}){return y.jsxs($a,{withBorder:!0,radius:"md",p:"sm",children:[y.jsx(Te,{fw:600,size:"sm",mb:6,children:e}),n.length===0?y.jsx(Te,{size:"xs",c:"dimmed",children:t}):y.jsx(Wn,{gap:4,children:n.map((r,a)=>y.jsxs(Ke,{gap:6,wrap:"nowrap",justify:"space-between",children:[y.jsxs(Ke,{gap:6,wrap:"nowrap",style:{minWidth:0,flex:1},children:[i&&y.jsx(rs,{size:22,radius:"xl",color:ic(r.name||String(a)),children:(r.name||"?").slice(0,2).toUpperCase()}),y.jsx(Te,{size:"sm",truncate:!0,children:r.name||"(sin nombre)"})]}),y.jsx(ct,{size:"sm",variant:"light",color:a===0?"teal":"gray",children:r.count})]},(r.user_id||r.name)+a))})]})}function XCe({date:e,onJumpToCard:n}){const[t,i]=A.useState(null),[r,a]=A.useState(null);A.useEffect(()=>{i(null),a(null),Eie(e).then(i).catch(c=>a(c.message))},[e]);const o=A.useMemo(()=>t?t.hourly_moves.map((c,h)=>({hora:String(h).padStart(2,"0")+":00",movimientos:c})):[],[t]);if(r)return y.jsx(by,{color:"red",icon:y.jsx(WF,{size:14}),children:r});if(!t)return y.jsx(Ke,{justify:"center",p:"xl",children:y.jsx(Mi,{size:"sm"})});const l=t.kpis,f=l.deadlines_met+l.deadlines_missed>0?Math.round(l.deadlines_met/(l.deadlines_met+l.deadlines_missed)*100):null;return y.jsxs(Wn,{gap:"md",children:[y.jsxs(Ke,{justify:"space-between",wrap:"wrap",children:[y.jsxs(Ke,{gap:6,children:[y.jsx(zoe,{size:20}),y.jsx(gl,{order:4,children:"Reporte diario"})]}),y.jsx(Te,{size:"sm",c:"dimmed",tt:"capitalize",children:KCe(t.date)})]}),y.jsxs(Uo,{cols:{base:2,sm:4,md:6},spacing:"xs",children:[y.jsx(Rf,{label:"Hechas",value:l.done,color:"teal",icon:y.jsx(nc,{size:14,color:"var(--mantine-color-teal-6)"})}),y.jsx(Rf,{label:"Creadas",value:l.created,icon:y.jsx(tc,{size:14})}),y.jsx(Rf,{label:"Movimientos",value:l.moves,icon:y.jsx(JF,{size:14})}),y.jsx(Rf,{label:"Bloqueado",value:si(l.blocked_ms),color:"yellow",icon:y.jsx(el,{size:14,color:"var(--mantine-color-yellow-6)"})}),y.jsx(Rf,{label:"Reabiertas",value:l.reopened,color:l.reopened>0?"orange":void 0,icon:y.jsx(Hg,{size:14})}),y.jsx(Rf,{label:"Deadlines",value:f!=null?`${f}%`:"—",color:f==null?"dimmed":f>=80?"teal":"red",sub:`${l.deadlines_met} on-time / ${l.deadlines_missed} vencidos`,icon:y.jsx(Vg,{size:14})})]}),y.jsxs(Uo,{cols:{base:1,sm:2,md:4},spacing:"xs",children:[y.jsx(ag,{title:"Asignado: mas hechas",rows:t.top_assignees_done,emptyText:"Sin hechas con asignado.",withAvatar:!0}),y.jsx(ag,{title:"Asignado: mas creadas",rows:t.top_assignees_created,emptyText:"Sin actor en creadas.",withAvatar:!0}),y.jsx(ag,{title:"Solicitante: mas atendidas",rows:t.top_requesters_done,emptyText:"Sin solicitantes con hechas."}),y.jsx(ag,{title:"Solicitante: mas aportadas",rows:t.top_requesters_added,emptyText:"Sin nuevas con solicitante."})]}),y.jsxs($a,{withBorder:!0,radius:"md",p:"sm",children:[y.jsxs(Ke,{justify:"space-between",mb:"xs",children:[y.jsx(Te,{fw:600,size:"sm",children:"Tareas hechas"}),y.jsxs(Ke,{gap:6,children:[y.jsxs(ct,{size:"xs",variant:"light",children:["N ",l.done]}),y.jsxs(Te,{size:"xs",c:"dimmed",children:["Lead time avg ",t.lead_time.samples>0?si(t.lead_time.avg_ms):"—"," · p50"," ",t.lead_time.samples>0?si(t.lead_time.p50_ms):"—"," · p95"," ",t.lead_time.samples>0?si(t.lead_time.p95_ms):"—"]})]})]}),t.done_cards.length===0?y.jsx(Te,{size:"xs",c:"dimmed",children:"Sin hechas en este dia."}):y.jsx(_a,{style:{maxHeight:280},type:"auto",children:y.jsxs(vn,{verticalSpacing:4,fz:"xs",highlightOnHover:!0,striped:"even",children:[y.jsx(vn.Thead,{children:y.jsxs(vn.Tr,{children:[y.jsx(vn.Th,{style:{width:70},children:"#"}),y.jsx(vn.Th,{children:"Titulo"}),y.jsx(vn.Th,{children:"Solicitante"}),y.jsx(vn.Th,{children:"Asignado"}),y.jsx(vn.Th,{children:"Tags"}),y.jsx(vn.Th,{style:{width:110},children:"Lead time"})]})}),y.jsx(vn.Tbody,{children:t.done_cards.map(c=>y.jsxs(vn.Tr,{children:[y.jsx(vn.Td,{children:y.jsx(Te,{size:"xs",c:"dimmed",children:String(c.seq_num).padStart(5,"0")})}),y.jsx(vn.Td,{children:y.jsx(Tt,{onClick:()=>n==null?void 0:n(c.id),style:{textAlign:"left"},children:y.jsx(Te,{size:"xs",fw:500,td:"underline",children:c.title})})}),y.jsx(vn.Td,{children:y.jsx(Te,{size:"xs",children:c.requester||"—"})}),y.jsx(vn.Td,{children:y.jsx(Te,{size:"xs",children:c.assignee_name||"—"})}),y.jsx(vn.Td,{children:y.jsx(Ke,{gap:2,wrap:"wrap",children:(c.tags||[]).slice(0,3).map(h=>y.jsx(ct,{size:"xs",variant:"light",color:ic(h),radius:"sm",children:h},h))})}),y.jsx(vn.Td,{children:y.jsx(Te,{size:"xs",c:"dimmed",children:si(c.lead_time_ms)})})]},c.id))})]})})]}),y.jsxs(Uo,{cols:{base:1,sm:2},spacing:"xs",children:[y.jsxs($a,{withBorder:!0,radius:"md",p:"sm",children:[y.jsxs(Ke,{justify:"space-between",mb:6,children:[y.jsx(Te,{fw:600,size:"sm",children:"Movimientos por hora"}),y.jsx(ct,{size:"xs",variant:"light",children:l.moves})]}),l.moves===0?y.jsx(Te,{size:"xs",c:"dimmed",children:"Sin movimientos."}):y.jsx(il,{h:160,data:o,dataKey:"hora",series:[{name:"movimientos",color:"blue.6"}],tickLine:"y",withTooltip:!0,valueFormatter:c=>String(c)})]}),y.jsxs($a,{withBorder:!0,radius:"md",p:"sm",children:[y.jsx(Te,{fw:600,size:"sm",mb:6,children:"Tags trabajadas"}),t.tags_done.length===0?y.jsx(Te,{size:"xs",c:"dimmed",children:"Sin tags."}):y.jsx(Ke,{gap:4,wrap:"wrap",children:t.tags_done.map(c=>y.jsxs(ct,{variant:"light",color:ic(c.name),size:"sm",children:[c.name," · ",c.count]},c.name))})]})]}),t.reopened_cards.length>0&&y.jsxs($a,{withBorder:!0,radius:"md",p:"sm",children:[y.jsxs(Ke,{gap:6,mb:6,children:[y.jsx(Hg,{size:14,color:"var(--mantine-color-orange-6)"}),y.jsx(Te,{fw:600,size:"sm",children:"Reabiertas (Done → otra)"}),y.jsx(ct,{size:"xs",variant:"light",color:"orange",children:t.reopened_cards.length})]}),y.jsx(Wn,{gap:4,children:t.reopened_cards.map(c=>y.jsxs(Ke,{gap:6,wrap:"nowrap",justify:"space-between",children:[y.jsx(Tt,{onClick:()=>n==null?void 0:n(c.card_id),style:{minWidth:0,flex:1},children:y.jsx(Te,{size:"xs",truncate:!0,td:"underline",children:c.title})}),y.jsxs(Te,{size:"xs",c:"dimmed",children:[c.from_column," → ",c.to_column]}),c.actor_name&&y.jsx(ct,{size:"xs",variant:"light",color:"cyan",children:c.actor_name})]},c.card_id+c.ts))})]}),(t.deadlines.missed>0||t.deadlines.met>0)&&y.jsxs($a,{withBorder:!0,radius:"md",p:"sm",children:[y.jsxs(Ke,{gap:6,mb:6,children:[y.jsx(Vg,{size:14}),y.jsx(Te,{fw:600,size:"sm",children:"Deadlines"}),y.jsxs(ct,{size:"xs",variant:"light",color:"teal",children:[t.deadlines.met," on-time"]}),y.jsxs(ct,{size:"xs",variant:"light",color:"red",children:[t.deadlines.missed," vencidos"]})]}),t.deadlines.list.length>0&&y.jsx(Wn,{gap:4,children:t.deadlines.list.map(c=>y.jsxs(Ke,{gap:6,justify:"space-between",wrap:"nowrap",children:[y.jsx(Tt,{onClick:()=>n==null?void 0:n(c.card_id),style:{minWidth:0,flex:1},children:y.jsx(Te,{size:"xs",truncate:!0,td:"underline",children:c.title})}),y.jsxs(Te,{size:"xs",c:"red",children:["+",si(c.late_ms)," tarde"]})]},c.card_id))})]}),y.jsxs($a,{withBorder:!0,radius:"md",p:"sm",children:[y.jsxs(Ke,{gap:6,mb:6,children:[y.jsx(BS,{size:14}),y.jsx(Te,{fw:600,size:"sm",children:"Cards estancadas (al final del dia)"}),y.jsxs(ct,{size:"xs",variant:"light",color:"orange",children:[t.stale_cards.d7.length,"d7"]}),y.jsxs(ct,{size:"xs",variant:"light",color:"red",children:[t.stale_cards.d14.length,"d14"]}),y.jsxs(ct,{size:"xs",variant:"filled",color:"red",children:[t.stale_cards.d30.length,"d30"]})]}),y.jsxs(Uo,{cols:{base:1,sm:3},spacing:"xs",children:[y.jsxs(ge,{children:[y.jsx(Te,{size:"xs",fw:500,c:"orange",mb:4,children:"7-13 dias"}),y.jsxs(Wn,{gap:2,children:[t.stale_cards.d7.slice(0,8).map(c=>y.jsx(Tt,{onClick:()=>n==null?void 0:n(c.card_id),children:y.jsxs(Te,{size:"xs",truncate:!0,children:[c.title," ",y.jsxs(Te,{span:!0,c:"dimmed",size:"xs",children:["· ",c.column_name," · ",c.days,"d"]})]})},c.card_id)),t.stale_cards.d7.length===0&&y.jsx(Te,{size:"xs",c:"dimmed",children:"Ninguna."})]})]}),y.jsxs(ge,{children:[y.jsx(Te,{size:"xs",fw:500,c:"red",mb:4,children:"14-29 dias"}),y.jsxs(Wn,{gap:2,children:[t.stale_cards.d14.slice(0,8).map(c=>y.jsx(Tt,{onClick:()=>n==null?void 0:n(c.card_id),children:y.jsxs(Te,{size:"xs",truncate:!0,children:[c.title," ",y.jsxs(Te,{span:!0,c:"dimmed",size:"xs",children:["· ",c.column_name," · ",c.days,"d"]})]})},c.card_id)),t.stale_cards.d14.length===0&&y.jsx(Te,{size:"xs",c:"dimmed",children:"Ninguna."})]})]}),y.jsxs(ge,{children:[y.jsx(Te,{size:"xs",fw:500,c:"red.8",mb:4,children:"30+ dias"}),y.jsxs(Wn,{gap:2,children:[t.stale_cards.d30.slice(0,8).map(c=>y.jsx(Tt,{onClick:()=>n==null?void 0:n(c.card_id),children:y.jsxs(Te,{size:"xs",truncate:!0,fw:600,children:[c.title," ",y.jsxs(Te,{span:!0,c:"dimmed",size:"xs",fw:400,children:["· ",c.column_name," · ",c.days,"d"]})]})},c.card_id)),t.stale_cards.d30.length===0&&y.jsx(Te,{size:"xs",c:"dimmed",children:"Ninguna."})]})]})]})]}),y.jsx(Bc,{}),y.jsx(Ke,{gap:6,justify:"space-between",children:y.jsxs(Ke,{gap:4,children:[y.jsx(Ug,{size:14}),y.jsxs(Te,{size:"xs",c:"dimmed",children:["TZ: ",t.tz," · cards archivadas hoy: ",t.archived_today]})]})})]})}function M$(e){if(e)return Ie(e).format("YYYY-MM-DD")}function ph({icon:e,label:n,value:t,hint:i,color:r}){return y.jsx(Lt,{withBorder:!0,p:"md",radius:"md",children:y.jsxs(Wn,{gap:4,children:[y.jsxs(Ke,{gap:6,c:"dimmed",children:[e,y.jsx(Te,{size:"xs",tt:"uppercase",fw:600,children:n})]}),y.jsx(Te,{size:"xl",fw:700,c:r,children:t}),i&&y.jsx(Te,{size:"xs",c:"dimmed",children:i})]})})}function ZCe({users:e}){const[n,t]=A.useState(()=>Ie().subtract(30,"day").toDate()),[i,r]=A.useState(()=>new Date),[a,o]=A.useState(null),[l,f]=A.useState(null),[c,h]=A.useState([]),[d,p]=A.useState([]),[v,b]=A.useState(null),[w,k]=A.useState(!1),[_,C]=A.useState([]);A.useEffect(()=>{FB().then(p).catch(()=>{})},[]),A.useEffect(()=>{let R=!1;return k(!0),qB({from:M$(n),to:M$(i),assignee_id:a||void 0,requester:l||void 0,tags:c.length>0?c:void 0}).then(L=>{R||(b(L),C(B=>{const G=new Set(B);for(const U of L.top_requesters??[])G.add(U.requester);return Array.from(G).sort()}))}).catch(()=>{}).finally(()=>{R||k(!1)}),()=>{R=!0}},[n,i,a,l,c]);const x=A.useMemo(()=>e.map(R=>({value:R.id,label:R.display_name||R.username})),[e]),E=A.useMemo(()=>{if(!v)return[];const R=v.cumulative_flow??[],L=R.findIndex(G=>G.total>0||G.done>0);return(L<=0?R:R.slice(Math.max(0,L-1))).map(G=>({date:G.date,done:G.done,wip:Math.max(0,G.total-G.done),total:G.total}))},[v]),O=A.useMemo(()=>{if(!v)return[];const R=new Map;for(const L of v.throughput_daily??[])R.set(L.date,{date:L.date,completed:L.count,created:0});for(const L of v.created_daily??[]){const B=R.get(L.date)??{date:L.date,completed:0,created:0};B.created=L.count,R.set(L.date,B)}return Array.from(R.values()).sort((L,B)=>L.date.localeCompare(B.date))},[v]),j=A.useMemo(()=>v?(v.by_column??[]).map(R=>({column:R.name+(R.is_done?" ✓":""),tarjetas:R.count})):[],[v]),M=A.useMemo(()=>v?(v.top_assignees??[]).slice().sort((R,L)=>L.completed_in_range+L.active-(R.completed_in_range+R.active)).slice(0,8).map(R=>({usuario:R.display_name||R.username,completadas:R.completed_in_range,activas:R.active})):[],[v]),P=A.useMemo(()=>v?(v.top_requesters??[]).map(R=>({solicitante:R.requester,activas:R.active,completadas:R.completed_in_range})):[],[v]),F=A.useMemo(()=>v?(v.movements_by_user??[]).filter(R=>R.moves>0).slice(0,8).map(R=>({usuario:R.display_name||R.username,movimientos:R.moves})):[],[v]);return y.jsx(ge,{p:"md",children:y.jsxs(Wn,{gap:"md",children:[y.jsxs(Ke,{justify:"space-between",children:[y.jsx(gl,{order:3,children:"Dashboard"}),y.jsxs(Ke,{gap:"xs",wrap:"nowrap",children:[y.jsx(wu,{label:"Desde",value:n,onChange:R=>t(R),size:"xs",clearable:!1,valueFormat:"YYYY-MM-DD",style:{minWidth:140}}),y.jsx(wu,{label:"Hasta",value:i,onChange:R=>r(R),size:"xs",clearable:!1,valueFormat:"YYYY-MM-DD",style:{minWidth:140}}),y.jsx(mo,{label:"Asignado",size:"xs",placeholder:"Todos",value:a,onChange:o,data:x,clearable:!0,searchable:!0,style:{minWidth:160}}),y.jsx(mo,{label:"Solicitante",size:"xs",placeholder:"Todos",value:l,onChange:f,data:_.map(R=>({value:R,label:R})),clearable:!0,searchable:!0,style:{minWidth:160}}),y.jsx(Uy,{label:"Tags",size:"xs",placeholder:"Todas",value:c,onChange:h,data:d,clearable:!0,searchable:!0,style:{minWidth:200}})]})]}),w&&!v&&y.jsx(zc,{p:"xl",children:y.jsx(Mi,{})}),v&&(()=>{const R=v.totals??{},L=v.lead_time??{n:0,p50_ms:0,p90_ms:0},B=G=>R[G]??0;return y.jsxs(y.Fragment,{children:[y.jsxs(Uo,{cols:{base:2,md:5},spacing:"md",children:[y.jsx(ph,{icon:y.jsx(iM,{size:14}),label:"Totales",value:B("cards"),hint:`${B("columns")} columnas, ${B("users")} usuarios`}),y.jsx(ph,{icon:y.jsx(iM,{size:14}),label:"Activas",value:B("cards_active"),hint:"Sin completar",color:"blue"}),y.jsx(ph,{icon:y.jsx(Jh,{size:14}),label:"Completadas (rango)",value:B("cards_completed_in_range"),hint:`${B("cards_done")} completadas total · ${B("cards_created_in_range")} creadas rango`,color:"green"}),y.jsx(ph,{icon:y.jsx(Yoe,{size:14}),label:"Lead time p50",value:L.n>0?si(L.p50_ms):0,hint:`p90 ${L.n>0?si(L.p90_ms):0} · n=${L.n}`}),y.jsx(ph,{icon:y.jsx(el,{size:14}),label:"Bloqueos activos",value:B("active_locks"),hint:`Total bloqueado: ${si(v.lock_total_ms??0)}`,color:B("active_locks")>0?"yellow":void 0})]}),y.jsxs(Lt,{withBorder:!0,p:"md",radius:"md",children:[y.jsxs(Ke,{gap:6,mb:"sm",children:[y.jsx(BS,{size:16}),y.jsx(Te,{fw:600,children:"Cumulative Flow Diagram"}),y.jsx(Te,{size:"xs",c:"dimmed",children:"total vs hechas (acumulado)"})]}),E.length===0?y.jsx(Te,{c:"dimmed",size:"sm",children:"Sin datos."}):y.jsx("div",{style:{height:260,width:"100%"},children:y.jsx(Z9,{width:"100%",height:"100%",children:y.jsxs(HCe,{data:E,margin:{top:10,right:16,left:0,bottom:0},children:[y.jsx(X0,{strokeDasharray:"5 5",stroke:"var(--mantine-color-gray-4)"}),y.jsx(Al,{dataKey:"date",tick:{fontSize:12,fill:"currentColor"}}),y.jsx(yo,{allowDecimals:!1,tick:{fontSize:12,fill:"currentColor"}}),y.jsx(ca,{contentStyle:{background:"var(--mantine-color-body)",border:"1px solid var(--mantine-color-gray-3)",borderRadius:6,fontSize:12}}),y.jsx(Jo,{wrapperStyle:{fontSize:12}}),y.jsx(ls,{type:"linear",dataKey:"done",name:"Hechas",stackId:"cfd",stroke:"var(--mantine-color-green-6)",fill:"var(--mantine-color-green-6)",fillOpacity:.55,strokeWidth:2,isAnimationActive:!1,dot:{r:3,fill:"var(--mantine-color-green-6)",strokeWidth:0},activeDot:{r:5}}),y.jsx(ls,{type:"linear",dataKey:"wip",name:"En curso",stackId:"cfd",stroke:"var(--mantine-color-blue-6)",fill:"var(--mantine-color-blue-6)",fillOpacity:.55,strokeWidth:2,isAnimationActive:!1,dot:{r:3,fill:"var(--mantine-color-blue-6)",strokeWidth:0},activeDot:{r:5}})]})})})]}),y.jsxs(Fr,{children:[y.jsx(Fr.Col,{span:{base:12,md:8},children:y.jsxs(Lt,{withBorder:!0,p:"md",radius:"md",children:[y.jsxs(Ke,{gap:6,mb:"sm",children:[y.jsx(BS,{size:16}),y.jsx(Te,{fw:600,children:"Throughput diario"})]}),O.length===0?y.jsx(Te,{c:"dimmed",size:"sm",children:"Sin datos en el rango."}):y.jsx(Q0,{h:240,data:O,dataKey:"date",curveType:"monotone",withLegend:!0,series:[{name:"completed",label:"Completadas",color:"green.6"},{name:"created",label:"Creadas",color:"blue.6"}]})]})}),y.jsx(Fr.Col,{span:{base:12,md:4},children:y.jsxs(Lt,{withBorder:!0,p:"md",radius:"md",children:[y.jsx(Te,{fw:600,mb:"sm",children:"Tarjetas por columna"}),j.length===0?y.jsx(Te,{c:"dimmed",size:"sm",children:"Sin columnas."}):y.jsx(il,{h:240,data:j,dataKey:"column",orientation:"vertical",yAxisProps:{width:100},series:[{name:"tarjetas",label:"Tarjetas",color:"blue.6"}]})]})})]}),y.jsxs(Fr,{children:[y.jsx(Fr.Col,{span:{base:12,md:6},children:y.jsxs(Lt,{withBorder:!0,p:"md",radius:"md",children:[y.jsx(Te,{fw:600,mb:"sm",children:"Top asignados"}),M.length===0?y.jsx(Te,{c:"dimmed",size:"sm",children:"Sin asignaciones."}):y.jsx(il,{h:240,data:M,dataKey:"usuario",orientation:"vertical",yAxisProps:{width:120},withLegend:!0,series:[{name:"completadas",label:"Completadas",color:"green.6"},{name:"activas",label:"Activas",color:"blue.6"}],type:"stacked"})]})}),y.jsx(Fr.Col,{span:{base:12,md:6},children:y.jsxs(Lt,{withBorder:!0,p:"md",radius:"md",children:[y.jsx(Te,{fw:600,mb:"sm",children:"Top solicitantes"}),P.length===0?y.jsx(Te,{c:"dimmed",size:"sm",children:"Sin solicitantes en el rango."}):y.jsx(il,{h:Math.max(240,P.length*32),data:P,dataKey:"solicitante",orientation:"vertical",yAxisProps:{width:160,interval:0},withLegend:!0,series:[{name:"completadas",label:"Completadas",color:"green.6"},{name:"activas",label:"Activas",color:"violet.6"}],type:"stacked"})]})})]}),y.jsxs(Fr,{children:[y.jsx(Fr.Col,{span:{base:12,md:6},children:y.jsxs(Lt,{withBorder:!0,p:"md",radius:"md",children:[y.jsx(Te,{fw:600,mb:"sm",children:"Movimientos por usuario (rango)"}),F.length===0?y.jsx(Te,{c:"dimmed",size:"sm",children:"Sin movimientos registrados."}):y.jsx(il,{h:240,data:F,dataKey:"usuario",orientation:"vertical",yAxisProps:{width:120},series:[{name:"movimientos",label:"Movimientos",color:"orange.6"}]})]})}),y.jsx(Fr.Col,{span:{base:12,md:6},children:y.jsxs(Lt,{withBorder:!0,p:"md",radius:"md",children:[y.jsx(Te,{fw:600,mb:"sm",children:"Tiempo en columna (cycle time)"}),y.jsxs(vn,{striped:!0,highlightOnHover:!0,withTableBorder:!0,withColumnBorders:!0,fz:"xs",children:[y.jsx(vn.Thead,{children:y.jsxs(vn.Tr,{children:[y.jsx(vn.Th,{children:"Columna"}),y.jsx(vn.Th,{children:"n"}),y.jsx(vn.Th,{children:"p50"}),y.jsx(vn.Th,{children:"p90"}),y.jsx(vn.Th,{children:"avg"})]})}),y.jsx(vn.Tbody,{children:(v.cycle_time_per_column??[]).map(G=>y.jsxs(vn.Tr,{children:[y.jsx(vn.Td,{children:y.jsxs(Ke,{gap:6,wrap:"nowrap",children:[y.jsx(Te,{size:"xs",fw:500,children:G.name}),G.is_done&&y.jsx(ct,{size:"xs",color:"green",variant:"light",children:"done"})]})}),y.jsx(vn.Td,{children:G.stats.n}),y.jsx(vn.Td,{children:G.stats.n>0?si(G.stats.p50_ms):"—"}),y.jsx(vn.Td,{children:G.stats.n>0?si(G.stats.p90_ms):"—"}),y.jsx(vn.Td,{children:G.stats.n>0?si(G.stats.avg_ms):"—"})]},G.column_id))})]})]})})]})]})})()]})})}function QCe(e){try{return JSON.parse(e)}catch{return{}}}function JCe(e){const n=QCe(e.payload);switch(e.kind){case"created":return{id:e.id,ts:e.created_at,kind:"Creada",actorID:e.actor_id,detail:String(n.title||""),icon:y.jsx(tc,{size:12}),color:"green"};case"title_changed":return{id:e.id,ts:e.created_at,kind:"Titulo",actorID:e.actor_id,detail:`"${n.old}" → "${n.new}"`,icon:y.jsx(kh,{size:12}),color:"blue"};case"requester_changed":return{id:e.id,ts:e.created_at,kind:"Solicitante",actorID:e.actor_id,detail:`"${n.old||"(vacio)"}" → "${n.new||"(vacio)"}"`,icon:y.jsx(kh,{size:12}),color:"orange"};case"description_changed":return{id:e.id,ts:e.created_at,kind:"Descripcion",actorID:e.actor_id,detail:"edicion",icon:y.jsx(kh,{size:12}),color:"blue"};case"color_changed":return{id:e.id,ts:e.created_at,kind:"Color",actorID:e.actor_id,detail:String(n.color||""),icon:y.jsx(o9,{size:12}),color:"violet"};case"tags_changed":return{id:e.id,ts:e.created_at,kind:"Tags",actorID:e.actor_id,detail:Array.isArray(n.tags)?n.tags.join(", ")||"(sin tags)":"",icon:y.jsx(Nse,{size:12}),color:"grape"};case"assigned":return{id:e.id,ts:e.created_at,kind:"Asignada",actorID:e.actor_id,detail:String(n.assignee_id||""),icon:y.jsx(Vse,{size:12}),color:"teal"};case"unassigned":return{id:e.id,ts:e.created_at,kind:"Sin asignar",actorID:e.actor_id,detail:"",icon:y.jsx(Hse,{size:12}),color:"gray"};case"deadline_set":{const t=String(n.deadline||"");return{id:e.id,ts:e.created_at,kind:"Deadline",actorID:e.actor_id,detail:t?t.slice(0,10):"",icon:y.jsx(YF,{size:12}),color:"orange"}}case"deadline_cleared":return{id:e.id,ts:e.created_at,kind:"Deadline quitado",actorID:e.actor_id,detail:n.prev?String(n.prev).slice(0,10):"",icon:y.jsx(Noe,{size:12}),color:"gray"};default:return{id:e.id,ts:e.created_at,kind:e.kind,actorID:e.actor_id,detail:e.payload,icon:y.jsx(kh,{size:12}),color:"gray"}}}function e9e({card:e,columns:n=[]}){const[t,i]=A.useState(null),[r,a]=A.useState([]),o=A.useMemo(()=>{const _=new Map;for(const C of n)_.set(C.id,C);return _},[n]),l=_=>{var C;return((C=o.get(_))==null?void 0:C.is_done)===!0};A.useEffect(()=>{Mie(e.id).then(i).catch(()=>i({column_history:[],lock_periods:[],events:[],total_locked_ms:0,currently_locked:!1})),BB().then(a).catch(()=>{})},[e.id]);const f=A.useMemo(()=>{const _=new Map;for(const C of r)_.set(C.id,C);return _},[r]),c=A.useMemo(()=>{if(!t)return[];const _=[];for(const C of t.events||[])_.push(JCe(C));for(const C of t.column_history||[]){const x=l(C.column_id);_.push({id:"h_in_"+C.id,ts:C.entered_at,kind:x?"Hecho en columna":"Mueve a columna",actorID:C.actor_id,detail:C.column_name||C.column_id,icon:x?y.jsx(nc,{size:12}):y.jsx(Doe,{size:12}),color:x?"green":"blue",doneColumn:x})}for(const C of t.lock_periods||[])_.push({id:"lk_"+C.id,ts:C.locked_at,kind:"Bloqueada",actorID:C.actor_id,detail:"",icon:y.jsx(el,{size:12}),color:"yellow"}),C.unlocked_at&&_.push({id:"lku_"+C.id,ts:C.unlocked_at,kind:"Desbloqueada",actorID:C.actor_id,detail:si(C.duration_ms),icon:y.jsx(ZF,{size:12}),color:"yellow"});return _.sort((C,x)=>C.ts.localeCompare(x.ts))},[t,o]);if(!t)return y.jsx(Ke,{justify:"center",p:"xl",children:y.jsx(Mi,{size:"sm"})});const{column_history:h,total_locked_ms:d,currently_locked:p}=t;if(c.length===0)return y.jsx(Te,{c:"dimmed",children:"Sin historial."});const v=Date.now(),b=new Map;for(const _ of h){const C=_.exited_at?_.duration_ms:Math.max(0,v-new Date(_.entered_at).getTime()),x=_.column_id,E=b.get(x),O=o.get(x);b.set(x,{name:_.column_name||(O==null?void 0:O.name)||x,isDone:(O==null?void 0:O.is_done)??!1,ms:((E==null?void 0:E.ms)??0)+C,visits:((E==null?void 0:E.visits)??0)+1})}const w=Array.from(b.entries()).map(([_,C])=>({id:_,...C})).sort((_,C)=>C.ms-_.ms),k=_=>{if(!_)return"";const C=f.get(_);return C?C.display_name||C.username:_};return y.jsxs(Wn,{gap:"md",children:[y.jsx(Te,{size:"sm",c:"dimmed",children:"Linea de tiempo completa de la tarjeta."}),y.jsx(ec,{active:c.length,bulletSize:22,lineWidth:2,children:c.map(_=>y.jsx(ec.Item,{bullet:_.icon,color:_.color,lineVariant:_.doneColumn?"solid":void 0,title:y.jsxs(Ke,{gap:6,wrap:"wrap",children:[y.jsx(Te,{fw:500,size:"sm",children:_.kind}),_.actorID&&y.jsx(ct,{size:"xs",variant:"light",color:"cyan",leftSection:y.jsx(Kse,{size:10}),children:k(_.actorID)}),_.detail&&y.jsx(ct,{size:"xs",variant:"outline",color:_.color,children:_.detail})]}),children:y.jsx(Te,{size:"xs",c:"dimmed",children:new Date(_.ts).toLocaleString()})},_.id))}),y.jsx(Bc,{}),y.jsxs(Wn,{gap:6,children:[y.jsxs(Ke,{gap:6,align:"center",wrap:"wrap",children:[y.jsx(Zoe,{size:14}),y.jsx(Te,{fw:500,size:"sm",children:"Tiempo por columna"}),y.jsxs(ct,{size:"xs",variant:"light",color:"gray",children:[h.length," entradas"]}),y.jsxs(Te,{size:"xs",c:"dimmed",ml:"auto",children:[y.jsx(el,{size:11,style:{verticalAlign:"middle"}})," ",y.jsx(Te,{span:!0,size:"xs",fw:500,c:d>0?"yellow":"dimmed",children:si(d)})," ","bloqueada",p?" (en curso)":""]})]}),w.length>0?y.jsxs(vn,{withTableBorder:!0,withColumnBorders:!0,striped:"even",verticalSpacing:4,fz:"xs",children:[y.jsx(vn.Thead,{children:y.jsxs(vn.Tr,{children:[y.jsx(vn.Th,{children:"Columna"}),y.jsx(vn.Th,{style:{width:60},children:"Visitas"}),y.jsx(vn.Th,{style:{width:130},children:"Tiempo total"})]})}),y.jsx(vn.Tbody,{children:w.map(_=>y.jsxs(vn.Tr,{children:[y.jsx(vn.Td,{children:y.jsxs(Ke,{gap:4,wrap:"nowrap",children:[_.isDone&&y.jsx(nc,{size:12,color:"var(--mantine-color-green-6)"}),y.jsx(Te,{size:"xs",fw:_.isDone?600:400,children:_.name})]})}),y.jsx(vn.Td,{children:_.visits}),y.jsx(vn.Td,{children:si(_.ms)})]},_.id))})]}):y.jsx(Te,{size:"xs",c:"dimmed",children:"Sin movimientos entre columnas."})]})]})}const og=26;function _W({value:e,onChange:n,options:t=iq,onOpenCustom:i}){const[r,a]=A.useState(!1),[o,l]=A.useState(e&&e.startsWith("#")?e:"#888888"),f=!!e&&e.startsWith("#")&&!t.some(c=>c.value===e);return y.jsxs(y.Fragment,{children:[y.jsxs(Ke,{gap:6,maw:280,children:[t.map(c=>{const h=e===c.value;return y.jsx(pi,{label:c.label,withArrow:!0,children:y.jsx(ge,{role:"button",onClick:d=>{d.stopPropagation(),n(c.value)},"aria-label":c.label,style:{width:og,height:og,borderRadius:"50%",background:Qse(c.value),border:`2px solid ${h?"var(--mantine-color-white)":u9(c.value)}`,boxShadow:h?"0 0 0 2px var(--mantine-color-blue-5)":void 0,cursor:"pointer",flexShrink:0,transition:"transform .1s"}})},c.value||"default")}),y.jsx(pi,{label:"Color personalizado",withArrow:!0,children:y.jsx(ge,{role:"button",onMouseDown:c=>{c.stopPropagation()},onClick:c=>{c.stopPropagation(),i?i():a(!0)},"aria-label":"Color personalizado",style:{width:og,height:og,borderRadius:"50%",background:f?o:"transparent",border:`2px dashed ${f?o:"var(--mantine-color-gray-5)"}`,boxShadow:f?"0 0 0 2px var(--mantine-color-blue-5)":void 0,cursor:"pointer",flexShrink:0,display:"flex",alignItems:"center",justifyContent:"center",color:"var(--mantine-color-gray-3)"},children:y.jsx(o9,{size:14})})})]}),!i&&y.jsx(b6,{opened:r,onClose:()=>a(!1),value:o,onAccept:c=>{l(c),n(c)}})]})}const vh=/^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/;function b6({opened:e,onClose:n,value:t,onAccept:i}){const[r,a]=A.useState(t||"#888888"),[o,l]=A.useState(t||"#888888");A.useEffect(()=>{if(e){const d=t&&vh.test(t)?t:"#888888";a(d),l(d)}},[e,t]);const f=d=>{let p=d.trim();p&&!p.startsWith("#")&&(p="#"+p),l(p),vh.test(p)&&a(p)},c=d=>{a(d),l(d)},h=()=>{i(r),n()};return y.jsx(Gr,{opened:e,onClose:n,title:"Color personalizado",size:"auto",centered:!0,withinPortal:!0,zIndex:2e3,closeOnClickOutside:!0,closeOnEscape:!1,trapFocus:!1,withCloseButton:!1,children:y.jsxs(Wn,{gap:"sm",onMouseDown:d=>d.stopPropagation(),onPointerDown:d=>d.stopPropagation(),onClick:d=>d.stopPropagation(),children:[y.jsx(Py,{value:r,onChange:c,format:"hex",swatches:["#1c7ed6","#15aabf","#12b886","#37b24d","#82c91e","#fab005","#fd7e14","#fa5252","#e64980","#be4bdb","#7950f2","#4c6ef5","#868e96","#212529"],fullWidth:!0}),y.jsxs(Ke,{align:"end",gap:"xs",children:[y.jsx(dl,{label:"Hex",value:o,onChange:d=>f(d.currentTarget.value),error:o&&!vh.test(o)?"Hex invalido":void 0,size:"xs",style:{flex:1},placeholder:"#rrggbb"}),y.jsx(ge,{style:{width:32,height:32,borderRadius:4,background:vh.test(o)?o:"transparent",border:"1px solid var(--mantine-color-dark-4)"}})]}),y.jsxs(Ke,{justify:"flex-end",gap:"xs",children:[y.jsx(zt,{variant:"default",size:"xs",onClick:n,children:"Cancelar"}),y.jsx(zt,{size:"xs",onClick:h,disabled:!vh.test(r),children:"Aceptar"})]})]})})}function n9e(){const e=window;e._cardRenderProbe&&(e._cardRenderCount=(e._cardRenderCount||0)+1)}function t9e(){const e=window;e._cardRenderProbe&&(e._cardBodyRenderCount=(e._cardBodyRenderCount||0)+1)}const i9e=A.memo(function({card:n,isDone:t,isOverlay:i,activeSticker:r,cardElRef:a,now:o,users:l,assignee:f,requesterOptions:c,menuOpen:h,setMenuOpen:d,onDelete:p,onEdit:v,onDuplicate:b,onChangeColor:w,onShowHistory:k,onToggleLock:_,onAssign:C,onSetDeadline:x,onSetRequester:E,onArchive:O,onOpenCustomColor:j,onRemoveSticker:M,onMoveSticker:P,onCommitSticker:F}){t9e();const R=!!r,[L,B]=A.useState(!1),[G,U]=A.useState(!1),[H,N]=A.useState(!1),[z,q]=A.useState(!1),[Y,D]=A.useState(n.requester||""),V=A.useRef(null),W=n.entered_at?new Date(n.entered_at).getTime():o,$=Math.max(0,o-W),X=n.deadline?new Date(n.deadline).getTime():0,ee=X?X-o:0,re=X?ee<0:!1,se=n.created_at?new Date(n.created_at).getTime():0,ye=X&&se?X-se:0,ae=ye>0?ee/ye:0;let le="blue",_e="light";re?(le="red.9",_e="filled"):ae<.1?(le="red",_e="filled"):ae<.5&&(le="yellow",_e="light");const ne=n.locked_at?new Date(n.locked_at).getTime():0,ze=n.locked&&ne?Math.max(0,o-ne):0,we=n.created_at?new Date(n.created_at).getTime():0,Ce=n.completed_at?new Date(n.completed_at).getTime():0,Ne=t&&we&&Ce?Math.max(0,Ce-we):0,ve=ue=>Be=>{var ie;if(!R||i||!P||Be.button!==0)return;Be.stopPropagation(),Be.preventDefault();const We=(ie=a.current)==null?void 0:ie.getBoundingClientRect();if(!We)return;V.current=ue;const Ue=Be.currentTarget;Ue.setPointerCapture(Be.pointerId);const Xe=he=>{const Ge=V.current;if(Ge===null)return;const Je=(he.clientX-We.left)/We.width,Se=(he.clientY-We.top)/We.height;P(n.id,Ge,Math.max(0,Math.min(1,Je)),Math.max(0,Math.min(1,Se)))},Qe=he=>{var Ge;(Ge=Ue.releasePointerCapture)==null||Ge.call(Ue,he.pointerId),Ue.removeEventListener("pointermove",Xe),Ue.removeEventListener("pointerup",Qe),Ue.removeEventListener("pointercancel",Qe),V.current=null,F==null||F(n.id)};Ue.addEventListener("pointermove",Xe),Ue.addEventListener("pointerup",Qe),Ue.addEventListener("pointercancel",Qe)},xe=ue=>Be=>{!R||i||(Be.preventDefault(),Be.stopPropagation(),M==null||M(n.id,ue))},Pe=h?y.jsxs(y.Fragment,{children:[y.jsx(Un.Label,{children:"Acciones"}),y.jsx(Un.Item,{leftSection:y.jsx(kh,{size:14}),onClick:()=>{d(!1),v(n)},children:"Editar"}),b&&y.jsx(Un.Item,{leftSection:y.jsx(Joe,{size:14}),onClick:()=>{d(!1),b(n.id)},children:"Duplicar"}),y.jsxs(En,{opened:L,onChange:B,position:"right-start",withArrow:!0,shadow:"md",children:[y.jsx(En.Target,{children:y.jsx(Un.Item,{leftSection:y.jsx(o9,{size:14}),onClick:ue=>{ue.preventDefault(),ue.stopPropagation(),B(Be=>!Be)},closeMenuOnClick:!1,children:"Color"})}),y.jsx(En.Dropdown,{p:"xs",onDoubleClick:ue=>ue.stopPropagation(),onClick:ue=>ue.stopPropagation(),onMouseDown:ue=>ue.stopPropagation(),children:y.jsx(_W,{value:n.color,onChange:ue=>w(n.id,ue),onOpenCustom:j?()=>j(n.id,n.color||"#888888"):void 0})})]}),y.jsxs(En,{opened:G,onChange:U,position:"right-start",withArrow:!0,shadow:"md",withinPortal:!1,children:[y.jsx(En.Target,{children:y.jsxs(Un.Item,{leftSection:y.jsx(Fse,{size:14}),onClick:ue=>{ue.preventDefault(),ue.stopPropagation(),U(Be=>!Be)},closeMenuOnClick:!1,children:["Asignar a ",f?`(${f.display_name||f.username})`:"..."]})}),y.jsx(En.Dropdown,{p:"xs",onDoubleClick:ue=>ue.stopPropagation(),onClick:ue=>ue.stopPropagation(),onMouseDown:ue=>ue.stopPropagation(),children:y.jsx(mo,{placeholder:"Sin asignar",value:n.assignee_id??null,onChange:ue=>{C(n.id,ue),U(!1),d(!1)},data:l.map(ue=>({value:ue.id,label:ue.display_name||ue.username})),clearable:!0,searchable:!0,autoFocus:!0,comboboxProps:{withinPortal:!1}})})]}),y.jsxs(En,{opened:H,onChange:N,position:"right-start",withArrow:!0,shadow:"md",withinPortal:!1,children:[y.jsx(En.Target,{children:y.jsxs(Un.Item,{leftSection:y.jsx(Gse,{size:14}),onClick:ue=>{ue.preventDefault(),ue.stopPropagation(),D(n.requester||""),N(Be=>!Be)},closeMenuOnClick:!1,children:["Solicitante ",n.requester?`(${n.requester})`:"..."]})}),y.jsx(En.Dropdown,{p:"xs",onDoubleClick:ue=>ue.stopPropagation(),onClick:ue=>ue.stopPropagation(),onMouseDown:ue=>ue.stopPropagation(),children:y.jsx(Ay,{placeholder:"Sin solicitante",value:Y,onChange:D,data:c||[],autoFocus:!0,comboboxProps:{withinPortal:!1},onKeyDown:ue=>{ue.key==="Enter"?(ue.preventDefault(),E==null||E(n.id,Y.trim()),N(!1),d(!1)):ue.key==="Escape"&&N(!1)},onOptionSubmit:ue=>{D(ue),E==null||E(n.id,ue),N(!1),d(!1)}})})]}),y.jsx(Un.Item,{leftSection:n.locked?y.jsx(ZF,{size:14}):y.jsx(el,{size:14}),color:n.locked?"yellow":void 0,onClick:()=>{d(!1),_(n.id,!n.locked)},children:n.locked?"Desbloquear":"Bloquear"}),y.jsx(Un.Item,{leftSection:y.jsx(lse,{size:14}),onClick:()=>{d(!1),k(n)},children:"Historial"}),x&&y.jsxs(En,{opened:z,onChange:q,position:"right-start",withArrow:!0,shadow:"md",withinPortal:!1,children:[y.jsx(En.Target,{children:y.jsx(Un.Item,{leftSection:y.jsx(YF,{size:14}),onClick:ue=>{ue.preventDefault(),ue.stopPropagation(),q(Be=>!Be)},closeMenuOnClick:!1,children:n.deadline?`Deadline (${n.deadline.slice(0,10)})`:"Deadline..."})}),y.jsxs(En.Dropdown,{p:"xs",onDoubleClick:ue=>ue.stopPropagation(),onClick:ue=>ue.stopPropagation(),onMouseDown:ue=>ue.stopPropagation(),children:[y.jsx(wu,{value:n.deadline?n.deadline.slice(0,10):null,onChange:ue=>{const Be=ue?typeof ue=="string"?ue.slice(0,10):new Date(ue).toISOString().slice(0,10):null;x(n.id,Be?`${Be}T23:59:59Z`:null),q(!1),d(!1)},clearable:!0,valueFormat:"DD/MM/YYYY",size:"xs",placeholder:"Elegir fecha",popoverProps:{withinPortal:!1}}),n.deadline&&y.jsx(pi,{label:"Quitar deadline",withArrow:!0,children:y.jsx(Et,{size:"sm",variant:"subtle",color:"red",mt:6,onClick:()=>{x(n.id,null),q(!1),d(!1)},children:y.jsx(ku,{size:12})})})]})]}),t&&O&&y.jsx(Un.Item,{leftSection:y.jsx(GF,{size:14}),color:"teal",onClick:()=>{d(!1),O(n.id)},children:"Archivar"}),y.jsx(Un.Divider,{}),y.jsx(Un.Item,{leftSection:y.jsx(ku,{size:14}),color:"red",onClick:()=>{d(!1),p(n.id)},children:"Borrar"})]}):null;return y.jsxs(y.Fragment,{children:[y.jsxs(Wn,{gap:6,style:{position:"relative",zIndex:1,pointerEvents:R?"none":void 0},children:[y.jsxs(Ke,{justify:"space-between",gap:4,wrap:"nowrap",align:"flex-start",children:[y.jsxs(Ke,{gap:4,wrap:"nowrap",style:{flex:1,minWidth:0},align:"flex-start",children:[y.jsx(XF,{size:14,color:"var(--mantine-color-dark-2)",style:{flexShrink:0,marginTop:4}}),n.locked&&y.jsx(pi,{label:"Bloqueada",withArrow:!0,children:y.jsx(el,{size:14,color:"var(--mantine-color-yellow-6)",style:{flexShrink:0,marginTop:4}})}),y.jsx(Te,{size:"sm",fw:500,style:{flex:1,wordBreak:"break-word",whiteSpace:"normal",textDecoration:t?"line-through":"none",opacity:t?.7:1},children:n.title})]}),y.jsxs(Un,{opened:h,onChange:d,position:"bottom-end",shadow:"md",withArrow:!0,children:[y.jsx(Un.Target,{children:y.jsx(Et,{variant:"subtle",color:"gray",size:"sm","aria-label":"Acciones",style:{flexShrink:0},onPointerDown:ue=>ue.stopPropagation(),children:y.jsx(KF,{size:14})})}),y.jsx(Un.Dropdown,{onDoubleClick:ue=>ue.stopPropagation(),onClick:ue=>ue.stopPropagation(),onMouseDown:ue=>ue.stopPropagation(),onContextMenu:ue=>ue.stopPropagation(),children:Pe})]})]}),(n.requester||f)&&y.jsxs(Ke,{gap:6,wrap:"nowrap",style:{minWidth:0},children:[n.requester&&y.jsxs(y.Fragment,{children:[y.jsx(rs,{size:18,radius:"xs",color:ic(n.requester),style:{flexShrink:0},children:n.requester.slice(0,2).toUpperCase()}),y.jsx(Te,{size:"xs",c:"dimmed",truncate:!0,children:n.requester})]}),n.requester&&f&&y.jsx(Te,{size:"xs",c:"dimmed",style:{flexShrink:0},children:"-"}),f&&y.jsxs(y.Fragment,{children:[y.jsx(rs,{size:18,radius:"xl",color:f.color||"blue",style:{flexShrink:0},children:(f.display_name||f.username).slice(0,2).toUpperCase()}),y.jsx(Te,{size:"xs",c:"dimmed",truncate:!0,children:f.display_name||f.username})]})]}),n.description&&y.jsx(Te,{size:"xs",c:"dimmed",lineClamp:3,children:n.description}),n.tags&&n.tags.length>0&&y.jsx(Ke,{gap:4,wrap:"wrap",children:n.tags.map(ue=>y.jsx(ct,{size:"xs",variant:"light",color:ic(ue),radius:"sm",children:ue},ue))}),y.jsxs(Ke,{gap:4,wrap:"wrap",children:[n.locked&&y.jsx(ct,{size:"xs",variant:"light",color:"yellow",leftSection:y.jsx(el,{size:10}),children:si(ze)}),!n.locked&&t&&n.completed_at?y.jsxs(y.Fragment,{children:[y.jsx(ct,{size:"xs",variant:"light",color:"teal",leftSection:y.jsx(nc,{size:10}),children:qS(n.completed_at)}),y.jsxs(ct,{size:"xs",variant:"light",color:"gray",leftSection:y.jsx(Ug,{size:10}),children:["Total: ",si(Ne)]}),n.total_locked_ms>0&&y.jsx(ct,{size:"xs",variant:"light",color:"yellow",leftSection:y.jsx(el,{size:10}),children:si(n.total_locked_ms)})]}):n.locked?null:n.deadline?y.jsx(pi,{label:`Vence: ${qS(n.deadline)}`,withArrow:!0,children:y.jsx(ct,{size:"xs",variant:_e,color:le,leftSection:y.jsx(Vg,{size:10}),children:re?`-${si(-ee)}`:si(ee)})}):y.jsx(ct,{size:"xs",variant:"light",color:"gray",leftSection:y.jsx(Ug,{size:10}),children:si($)})]}),n.seq_num>0&&y.jsxs(Te,{size:"xs",c:"dimmed",style:{marginTop:-2},children:["#",String(n.seq_num).padStart(5,"0")]})]}),n.stickers&&n.stickers.length>0&&y.jsx("div",{"data-sticker-overlay":!0,style:{position:"absolute",inset:0,pointerEvents:"none",overflow:"hidden",borderRadius:"inherit",zIndex:0},children:n.stickers.map((ue,Be)=>y.jsx("span",{onPointerDown:ve(Be),onContextMenu:xe(Be),title:R?"Arrastra para mover. Click derecho para borrar.":"",style:{position:"absolute",left:`${ue.x*100}%`,top:`${ue.y*100}%`,transform:"translate(-50%, -50%)",fontSize:48,lineHeight:1,opacity:1,userSelect:"none",cursor:R&&!i?"grab":"default",pointerEvents:R&&!i?"auto":"none",touchAction:"none"},children:ue.emoji},Be))})]})});function r9e({card:e,now:n,onDelete:t,onEdit:i,onDuplicate:r,onChangeColor:a,onShowHistory:o,onToggleLock:l,onAssign:f,onSetDeadline:c,onSetRequester:h,onArchive:d,requesterOptions:p,onOpenCustomColor:v,activeSticker:b,onAddSticker:w,onRemoveSticker:k,onMoveSticker:_,onCommitSticker:C,users:x,assignee:E,inDoneColumn:O,columnOverdue:j,isOverlay:M,highlight:P}){n9e();const F=O||!!e.completed_at,[R,L]=A.useState(!1),B=A.useRef(null),G=!!b,U=A.useMemo(()=>({type:"card",columnId:e.column_id,locked:e.locked}),[e.column_id,e.locked]),{attributes:H,listeners:N,setNodeRef:z,transform:q,transition:Y,isDragging:D}=gF({id:e.id,data:U,disabled:G,animateLayoutChanges:()=>!1}),V=A.useCallback(re=>{B.current=re,z(re)},[z]);A.useEffect(()=>{P&&B.current&&B.current.scrollIntoView({behavior:"smooth",block:"center"})},[P]);const W=re=>{if(!G||!w||M||re.target.closest("[data-sticker-overlay]"))return;const se=re.currentTarget.getBoundingClientRect(),ye=(re.clientX-se.left)/se.width,ae=(re.clientY-se.top)/se.height;w(e.id,Math.max(0,Math.min(1,ye)),Math.max(0,Math.min(1,ae)))},$=P?"var(--mantine-color-blue-5)":j?"var(--mantine-color-red-6)":e.locked?"var(--mantine-color-yellow-6)":u9(e.color),X={transform:po.Transform.toString(q),transition:Y,opacity:D?.4:1,background:tq(e.color),borderColor:$,borderWidth:P||e.locked||j?2:1,boxShadow:P?"0 0 0 3px var(--mantine-color-blue-4)":j?"0 0 0 2px var(--mantine-color-red-3)":void 0,filter:F?"brightness(0.55) saturate(0.7)":void 0},ee=re=>{re.preventDefault(),L(!0)};return y.jsx(Lt,{ref:V,style:{...X,position:"relative",cursor:G?"copy":"grab",touchAction:"none"},withBorder:!0,p:"xs",shadow:M?"lg":"xs",radius:"md","data-card-id":e.id,"data-column-overdue":j?"true":"false","data-locked":e.locked?"true":"false",onContextMenu:ee,onClick:W,onDoubleClick:re=>{re.stopPropagation(),i(e)},...H,...G?{}:N,children:y.jsx(i9e,{card:e,isDone:F,isOverlay:M,highlight:P,activeSticker:b,cardElRef:B,now:n,users:x,assignee:E,requesterOptions:p,menuOpen:R,setMenuOpen:L,onDelete:t,onEdit:i,onDuplicate:r,onChangeColor:a,onShowHistory:o,onToggleLock:l,onAssign:f,onSetDeadline:c,onSetRequester:h,onArchive:d,onOpenCustomColor:v,onRemoveSticker:k,onMoveSticker:_,onCommitSticker:C})})}const xW=A.memo(r9e),D$={minutes:1,hours:60,days:1440,weeks:1440*7,months:1440*30},w6={minutes:"minutos",hours:"horas",days:"dias",weeks:"semanas",months:"meses"},a9e=Object.keys(w6).map(e=>({value:e,label:w6[e]}));function o9e({column:e,cards:n,now:t,collapsed:i,onAddCard:r,onRenameColumn:a,onResizeColumn:o,onMoveColumnLocation:l,onDeleteColumn:f,onSetWIPLimit:c,onSetMaxTimeMinutes:h,onPickRandom:d,onToggleDone:p,onEditCard:v,onDeleteCard:b,onDuplicateCard:w,onChangeCardColor:k,onShowHistory:_,onToggleCardLock:C,onAssignCard:x,onSetCardDeadline:E,onSetRequester:O,onArchiveCard:j,requesterOptions:M,onOpenCustomCardColor:P,activeSticker:F,onAddSticker:R,onRemoveSticker:L,onMoveSticker:B,onCommitSticker:G,users:U,usersById:H,highlightCardId:N}){const[z,q]=A.useState(!1),[Y,D]=A.useState(e.name),[V,W]=A.useState(null),[$,X]=A.useState(!1),[ee,re]=A.useState(e.wip_limit),[se,ye]=A.useState(!1),ae=Fe=>Fe<=0?"minutes":Fe%43200===0?"months":Fe%10080===0?"weeks":Fe%1440===0?"days":Fe%60===0?"hours":"minutes",le=(Fe,jn)=>{const yn=D$[jn];return Fe>0?Math.max(1,Math.round(Fe/yn)):0},[_e,ne]=A.useState(()=>ae(e.max_time_minutes||0)),[ze,we]=A.useState(()=>le(e.max_time_minutes||0,ae(e.max_time_minutes||0))),[Ce,Ne]=A.useState(()=>i?localStorage.getItem(`kanban_col_body_${e.id}`)==="1":!1);A.useEffect(()=>{i&&localStorage.setItem(`kanban_col_body_${e.id}`,Ce?"1":"0")},[Ce,i,e.id]);const ve=e.wip_limit,xe=ve>0&&n.length>ve;A.useEffect(()=>{W(null)},[e.width]);const Pe=A.useMemo(()=>({type:"column",columnId:e.id,location:e.location}),[e.id,e.location]),{attributes:ue,listeners:Be,setNodeRef:We,transform:Ue,transition:Xe,isDragging:Qe}=gF({id:`column-${e.id}`,data:Pe}),ie=i?"100%":V??e.width,he=i?{transform:po.Transform.toString(Ue),transition:Xe,opacity:Qe?.4:1,width:"100%",display:"flex",flexDirection:"column",position:"relative",flex:Ce?"0 0 auto":"1 1 auto",minHeight:0}:{transform:po.Transform.toString(Ue),transition:Xe,opacity:Qe?.4:1,width:ie,minWidth:ie,maxWidth:ie,display:"flex",flexDirection:"column",height:"100%",position:"relative"},Ge=n.map(Fe=>Fe.id),Je=()=>{const Fe=Y.trim();Fe&&Fe!==e.name&&a(e.id,Fe),q(!1)},Se=A.useRef(null),tn=Fe=>{Fe.preventDefault(),Fe.stopPropagation(),Se.current={startX:Fe.clientX,startWidth:e.width},document.body.style.cursor="col-resize",document.body.style.userSelect="none";const jn=gn=>{if(!Se.current)return;const bn=gn.clientX-Se.current.startX,tt=Math.min(800,Math.max(200,Se.current.startWidth+bn));W(tt)},yn=()=>{Se.current&&cn.current!==null&&o(e.id,cn.current),Se.current=null,document.body.style.cursor="",document.body.style.userSelect="",window.removeEventListener("mousemove",jn),window.removeEventListener("mouseup",yn)};window.addEventListener("mousemove",jn),window.addEventListener("mouseup",yn)},cn=A.useRef(null);A.useEffect(()=>{cn.current=V},[V]);const On=e.location==="sidebar",mn=On?"Restaurar al board":"Mover al sidebar",an=On?joe:GF,en=()=>{const Fe=typeof ee=="number"?ee:parseInt(String(ee),10),jn=Number.isFinite(Fe)&&Fe>=0?Math.floor(Fe):0;jn!==e.wip_limit&&c(e.id,jn),X(!1)},Rn=xe?"var(--mantine-color-red-9)":"var(--mantine-color-dark-7)",De=xe?"var(--mantine-color-red-6)":void 0;return y.jsxs(Lt,{ref:We,style:{...he,background:Rn,borderColor:De,borderWidth:xe?2:1},withBorder:!0,radius:"md",p:"sm","data-column-id":e.id,"data-column-location":e.location,children:[y.jsxs(Ke,{justify:"space-between",mb:"xs",wrap:"nowrap",children:[y.jsxs(Ke,{gap:4,wrap:"nowrap",style:{flex:1,minWidth:0},children:[y.jsx(Et,{variant:"subtle",color:"gray",size:"sm",...ue,...Be,style:{cursor:"grab"},"aria-label":"Drag column",children:y.jsx(XF,{size:14})}),z?y.jsx(dl,{size:"xs",value:Y,onChange:Fe=>D(Fe.currentTarget.value),autoFocus:!0,onBlur:Je,onKeyDown:Fe=>{Fe.key==="Enter"&&Je(),Fe.key==="Escape"&&(D(e.name),q(!1))},style:{flex:1}}):y.jsx(Te,{fw:600,size:"sm",truncate:!0,onDoubleClick:()=>{D(e.name),q(!0)},style:{flex:1,cursor:"text"},title:"Doble click para renombrar",children:e.name}),y.jsxs(En,{opened:$,onChange:Fe=>{X(Fe),Fe&&re(e.wip_limit)},position:"bottom",withArrow:!0,shadow:"md",children:[y.jsx(En.Target,{children:y.jsx(pi,{label:ve>0?`WIP ${n.length}/${ve}${xe?" (excedido)":""}`:"Click para limitar WIP",withArrow:!0,children:y.jsx(ct,{size:"xs",variant:xe?"filled":"light",color:xe?"red":ve>0?"yellow":"gray",leftSection:xe?y.jsx(WF,{size:10}):null,style:{cursor:"pointer"},onClick:()=>X(Fe=>!Fe),children:ve>0?`${n.length}/${ve}`:n.length})})}),y.jsx(En.Dropdown,{p:"xs",children:y.jsxs(Wn,{gap:"xs",children:[y.jsx(Te,{size:"xs",c:"dimmed",children:"Maximo de tarjetas (0 = sin limite)"}),y.jsx(Kh,{size:"xs",value:ee,onChange:re,min:0,max:999,autoFocus:!0,onKeyDown:Fe=>{Fe.key==="Enter"&&en(),Fe.key==="Escape"&&X(!1)}}),y.jsxs(Ke,{justify:"flex-end",gap:4,children:[y.jsx(zt,{size:"xs",variant:"subtle",onClick:()=>X(!1),children:"Cancelar"}),y.jsx(zt,{size:"xs",onClick:en,children:"Guardar"})]})]})})]})]}),y.jsx(Ke,{gap:2,wrap:"nowrap",children:z?y.jsxs(y.Fragment,{children:[y.jsx(Et,{variant:"subtle",color:"green",size:"sm",onClick:Je,"aria-label":"Save",children:y.jsx(nc,{size:14})}),y.jsx(Et,{variant:"subtle",color:"gray",size:"sm",onClick:()=>{D(e.name),q(!1)},"aria-label":"Cancel",children:y.jsx(_h,{size:14})})]}):y.jsxs(y.Fragment,{children:[i&&y.jsx(pi,{label:Ce?"Expandir":"Colapsar",withArrow:!0,children:y.jsx(Et,{variant:"subtle",color:"gray",size:"sm",onClick:()=>Ne(Fe=>!Fe),"aria-label":Ce?"Expandir columna":"Colapsar columna",children:Ce?y.jsx(LS,{size:14}):y.jsx(zS,{size:14})})}),e.is_done&&y.jsx(pi,{label:"Columna Done",withArrow:!0,children:y.jsx(ct,{size:"xs",color:"green",variant:"filled",leftSection:y.jsx(Jh,{size:10}),children:"done"})}),y.jsxs(Un,{position:"bottom-end",shadow:"md",withArrow:!0,children:[y.jsx(Un.Target,{children:y.jsx(Et,{variant:"subtle",color:"gray",size:"sm","aria-label":"Acciones columna",children:y.jsx(KF,{size:14})})}),y.jsxs(Un.Dropdown,{children:[y.jsx(Un.Label,{children:"Columna"}),y.jsx(Un.Item,{leftSection:y.jsx(jse,{size:14}),onClick:()=>{D(e.name),q(!0)},children:"Renombrar"}),y.jsx(Un.Item,{leftSection:y.jsx(Jh,{size:14}),color:e.is_done?"yellow":"green",onClick:()=>p(e.id,!e.is_done),children:e.is_done?"Quitar marca Done":"Marcar como Done"}),y.jsxs(En,{opened:se,onChange:Fe=>{if(ye(Fe),Fe){const jn=ae(e.max_time_minutes||0);ne(jn),we(le(e.max_time_minutes||0,jn))}},position:"right-start",withArrow:!0,shadow:"md",withinPortal:!1,children:[y.jsx(En.Target,{children:y.jsxs(Un.Item,{leftSection:y.jsx(Ug,{size:14}),"data-test":"column-max-time",closeMenuOnClick:!1,onClick:Fe=>{Fe.preventDefault(),Fe.stopPropagation(),ye(jn=>!jn)},children:["Tiempo maximo",e.max_time_minutes>0?` (${(()=>{const Fe=ae(e.max_time_minutes);return`${le(e.max_time_minutes,Fe)} ${w6[Fe]}`})()})`:""]})}),y.jsx(En.Dropdown,{p:"xs",onClick:Fe=>Fe.stopPropagation(),onMouseDown:Fe=>Fe.stopPropagation(),onDoubleClick:Fe=>Fe.stopPropagation(),children:y.jsxs(Wn,{gap:6,style:{minWidth:240},children:[y.jsx(Te,{size:"xs",c:"dimmed",children:"Cards que pasen este tiempo se pintaran con borde rojo. 0 = sin limite. Columnas Done no aplican."}),y.jsxs(Ke,{gap:6,wrap:"nowrap",children:[y.jsx(Kh,{size:"xs",min:0,max:999,value:ze,onChange:we,placeholder:"0",style:{width:90},"data-test":"column-max-time-input"}),y.jsx(mo,{size:"xs",value:_e,onChange:Fe=>Fe&&ne(Fe),data:a9e,style:{width:130},allowDeselect:!1,"data-test":"column-max-time-unit"})]}),y.jsxs(Ke,{justify:"space-between",gap:6,children:[y.jsx(pi,{label:"Quitar limite",withArrow:!0,disabled:!e.max_time_minutes,children:y.jsx(Et,{size:"sm",variant:"subtle",color:"red",disabled:!e.max_time_minutes,onClick:()=>{h(e.id,0),we(0),ye(!1)},children:y.jsx(ku,{size:12})})}),y.jsx(zt,{size:"xs","data-test":"column-max-time-save",onClick:()=>{const Fe=typeof ze=="number"?ze:parseInt(String(ze),10),yn=(Number.isFinite(Fe)&&Fe>=0?Fe:0)*D$[_e];yn!==e.max_time_minutes&&h(e.id,yn),ye(!1)},children:"Guardar"})]})]})})]}),!e.is_done&&y.jsx(Un.Item,{leftSection:y.jsx(nse,{size:14}),"data-test":"column-random-pick",disabled:n.filter(Fe=>!Fe.locked).length===0,onClick:()=>d(e.id),children:"Seleccionar Aleatorio"}),y.jsx(Un.Item,{leftSection:y.jsx(an,{size:14}),onClick:()=>l(e.id,On?"board":"sidebar"),children:mn}),y.jsx(Un.Divider,{}),y.jsx(Un.Item,{leftSection:y.jsx(ku,{size:14}),color:"red",onClick:()=>f(e.id),children:"Borrar columna"})]})]})]})})]}),!(i&&Ce)&&y.jsxs(y.Fragment,{children:[y.jsx(_a,{style:{flex:1},type:"auto",children:y.jsx(NS,{items:Ge,strategy:hF,children:y.jsx(Wn,{gap:"xs",pb:"xs",style:{minHeight:40},children:n.map(Fe=>y.jsx(xW,{card:Fe,now:t,onDelete:b,onEdit:v,onDuplicate:w,onChangeColor:k,onShowHistory:_,onToggleLock:C,onAssign:x,onSetDeadline:E,onSetRequester:O,onArchive:j,requesterOptions:M,onOpenCustomColor:P,users:U,assignee:Fe.assignee_id?H.get(Fe.assignee_id):void 0,inDoneColumn:e.is_done,columnOverdue:!e.is_done&&e.max_time_minutes>0&&Fe.time_in_column_ms>e.max_time_minutes*6e4,highlight:N===Fe.id,activeSticker:F,onAddSticker:R,onRemoveSticker:L,onMoveSticker:B,onCommitSticker:G},Fe.id))})})}),y.jsx(zt,{variant:"subtle",color:"gray",size:"xs",leftSection:y.jsx(tc,{size:14}),onClick:()=>r(e.id),mt:"xs",fullWidth:!0,"data-test":"add-card",children:"Anadir tarjeta"})]}),!On&&y.jsx(ge,{onMouseDown:tn,style:{position:"absolute",top:0,right:-3,width:6,height:"100%",cursor:"col-resize",zIndex:5},"aria-label":"Resize column"})]})}const R$=A.memo(o9e),s9e=JSON.parse('[{"id":"people","emojis":["grinning","smiley","smile","grin","laughing","sweat_smile","rolling_on_the_floor_laughing","joy","slightly_smiling_face","upside_down_face","melting_face","wink","blush","innocent","smiling_face_with_3_hearts","heart_eyes","star-struck","kissing_heart","kissing","relaxed","kissing_closed_eyes","kissing_smiling_eyes","smiling_face_with_tear","yum","stuck_out_tongue","stuck_out_tongue_winking_eye","zany_face","stuck_out_tongue_closed_eyes","money_mouth_face","hugging_face","face_with_hand_over_mouth","face_with_open_eyes_and_hand_over_mouth","face_with_peeking_eye","shushing_face","thinking_face","saluting_face","zipper_mouth_face","face_with_raised_eyebrow","neutral_face","expressionless","no_mouth","dotted_line_face","face_in_clouds","smirk","unamused","face_with_rolling_eyes","grimacing","face_exhaling","lying_face","shaking_face","relieved","pensive","sleepy","drooling_face","sleeping","mask","face_with_thermometer","face_with_head_bandage","nauseated_face","face_vomiting","sneezing_face","hot_face","cold_face","woozy_face","dizzy_face","face_with_spiral_eyes","exploding_head","face_with_cowboy_hat","partying_face","disguised_face","sunglasses","nerd_face","face_with_monocle","confused","face_with_diagonal_mouth","worried","slightly_frowning_face","white_frowning_face","open_mouth","hushed","astonished","flushed","pleading_face","face_holding_back_tears","frowning","anguished","fearful","cold_sweat","disappointed_relieved","cry","sob","scream","confounded","persevere","disappointed","sweat","weary","tired_face","yawning_face","triumph","rage","angry","face_with_symbols_on_mouth","smiling_imp","imp","skull","skull_and_crossbones","hankey","clown_face","japanese_ogre","japanese_goblin","ghost","alien","space_invader","wave","raised_back_of_hand","raised_hand_with_fingers_splayed","hand","spock-hand","rightwards_hand","leftwards_hand","palm_down_hand","palm_up_hand","leftwards_pushing_hand","rightwards_pushing_hand","ok_hand","pinched_fingers","pinching_hand","v","crossed_fingers","hand_with_index_finger_and_thumb_crossed","i_love_you_hand_sign","the_horns","call_me_hand","point_left","point_right","point_up_2","middle_finger","point_down","point_up","index_pointing_at_the_viewer","+1","-1","fist","facepunch","left-facing_fist","right-facing_fist","clap","raised_hands","heart_hands","open_hands","palms_up_together","handshake","pray","writing_hand","nail_care","selfie","muscle","mechanical_arm","mechanical_leg","leg","foot","ear","ear_with_hearing_aid","nose","brain","anatomical_heart","lungs","tooth","bone","eyes","eye","tongue","lips","biting_lip","baby","child","boy","girl","adult","person_with_blond_hair","man","bearded_person","man_with_beard","woman_with_beard","red_haired_man","curly_haired_man","white_haired_man","bald_man","woman","red_haired_woman","red_haired_person","curly_haired_woman","curly_haired_person","white_haired_woman","white_haired_person","bald_woman","bald_person","blond-haired-woman","blond-haired-man","older_adult","older_man","older_woman","person_frowning","man-frowning","woman-frowning","person_with_pouting_face","man-pouting","woman-pouting","no_good","man-gesturing-no","woman-gesturing-no","ok_woman","man-gesturing-ok","woman-gesturing-ok","information_desk_person","man-tipping-hand","woman-tipping-hand","raising_hand","man-raising-hand","woman-raising-hand","deaf_person","deaf_man","deaf_woman","bow","man-bowing","woman-bowing","face_palm","man-facepalming","woman-facepalming","shrug","man-shrugging","woman-shrugging","health_worker","male-doctor","female-doctor","student","male-student","female-student","teacher","male-teacher","female-teacher","judge","male-judge","female-judge","farmer","male-farmer","female-farmer","cook","male-cook","female-cook","mechanic","male-mechanic","female-mechanic","factory_worker","male-factory-worker","female-factory-worker","office_worker","male-office-worker","female-office-worker","scientist","male-scientist","female-scientist","technologist","male-technologist","female-technologist","singer","male-singer","female-singer","artist","male-artist","female-artist","pilot","male-pilot","female-pilot","astronaut","male-astronaut","female-astronaut","firefighter","male-firefighter","female-firefighter","cop","male-police-officer","female-police-officer","sleuth_or_spy","male-detective","female-detective","guardsman","male-guard","female-guard","ninja","construction_worker","male-construction-worker","female-construction-worker","person_with_crown","prince","princess","man_with_turban","man-wearing-turban","woman-wearing-turban","man_with_gua_pi_mao","person_with_headscarf","person_in_tuxedo","man_in_tuxedo","woman_in_tuxedo","bride_with_veil","man_with_veil","woman_with_veil","pregnant_woman","pregnant_man","pregnant_person","breast-feeding","woman_feeding_baby","man_feeding_baby","person_feeding_baby","angel","santa","mrs_claus","mx_claus","superhero","male_superhero","female_superhero","supervillain","male_supervillain","female_supervillain","mage","male_mage","female_mage","fairy","male_fairy","female_fairy","vampire","male_vampire","female_vampire","merperson","merman","mermaid","elf","male_elf","female_elf","genie","male_genie","female_genie","zombie","male_zombie","female_zombie","troll","massage","man-getting-massage","woman-getting-massage","haircut","man-getting-haircut","woman-getting-haircut","walking","man-walking","woman-walking","standing_person","man_standing","woman_standing","kneeling_person","man_kneeling","woman_kneeling","person_with_probing_cane","man_with_probing_cane","woman_with_probing_cane","person_in_motorized_wheelchair","man_in_motorized_wheelchair","woman_in_motorized_wheelchair","person_in_manual_wheelchair","man_in_manual_wheelchair","woman_in_manual_wheelchair","runner","man-running","woman-running","dancer","man_dancing","man_in_business_suit_levitating","dancers","men-with-bunny-ears-partying","women-with-bunny-ears-partying","person_in_steamy_room","man_in_steamy_room","woman_in_steamy_room","person_climbing","man_climbing","woman_climbing","fencer","horse_racing","skier","snowboarder","golfer","man-golfing","woman-golfing","surfer","man-surfing","woman-surfing","rowboat","man-rowing-boat","woman-rowing-boat","swimmer","man-swimming","woman-swimming","person_with_ball","man-bouncing-ball","woman-bouncing-ball","weight_lifter","man-lifting-weights","woman-lifting-weights","bicyclist","man-biking","woman-biking","mountain_bicyclist","man-mountain-biking","woman-mountain-biking","person_doing_cartwheel","man-cartwheeling","woman-cartwheeling","wrestlers","man-wrestling","woman-wrestling","water_polo","man-playing-water-polo","woman-playing-water-polo","handball","man-playing-handball","woman-playing-handball","juggling","man-juggling","woman-juggling","person_in_lotus_position","man_in_lotus_position","woman_in_lotus_position","bath","sleeping_accommodation","people_holding_hands","two_women_holding_hands","man_and_woman_holding_hands","two_men_holding_hands","couplekiss","woman-kiss-man","man-kiss-man","woman-kiss-woman","couple_with_heart","woman-heart-man","man-heart-man","woman-heart-woman","family","man-woman-boy","man-woman-girl","man-woman-girl-boy","man-woman-boy-boy","man-woman-girl-girl","man-man-boy","man-man-girl","man-man-girl-boy","man-man-boy-boy","man-man-girl-girl","woman-woman-boy","woman-woman-girl","woman-woman-girl-boy","woman-woman-boy-boy","woman-woman-girl-girl","man-boy","man-boy-boy","man-girl","man-girl-boy","man-girl-girl","woman-boy","woman-boy-boy","woman-girl","woman-girl-boy","woman-girl-girl","speaking_head_in_silhouette","bust_in_silhouette","busts_in_silhouette","people_hugging","footprints","robot_face","smiley_cat","smile_cat","joy_cat","heart_eyes_cat","smirk_cat","kissing_cat","scream_cat","crying_cat_face","pouting_cat","see_no_evil","hear_no_evil","speak_no_evil","love_letter","cupid","gift_heart","sparkling_heart","heartpulse","heartbeat","revolving_hearts","two_hearts","heart_decoration","heavy_heart_exclamation_mark_ornament","broken_heart","heart_on_fire","mending_heart","heart","pink_heart","orange_heart","yellow_heart","green_heart","blue_heart","light_blue_heart","purple_heart","brown_heart","black_heart","grey_heart","white_heart","kiss","100","anger","boom","dizzy","sweat_drops","dash","hole","speech_balloon","eye-in-speech-bubble","left_speech_bubble","right_anger_bubble","thought_balloon","zzz"]},{"id":"nature","emojis":["monkey_face","monkey","gorilla","orangutan","dog","dog2","guide_dog","service_dog","poodle","wolf","fox_face","raccoon","cat","cat2","black_cat","lion_face","tiger","tiger2","leopard","horse","moose","donkey","racehorse","unicorn_face","zebra_face","deer","bison","cow","ox","water_buffalo","cow2","pig","pig2","boar","pig_nose","ram","sheep","goat","dromedary_camel","camel","llama","giraffe_face","elephant","mammoth","rhinoceros","hippopotamus","mouse","mouse2","rat","hamster","rabbit","rabbit2","chipmunk","beaver","hedgehog","bat","bear","polar_bear","koala","panda_face","sloth","otter","skunk","kangaroo","badger","feet","turkey","chicken","rooster","hatching_chick","baby_chick","hatched_chick","bird","penguin","dove_of_peace","eagle","duck","swan","owl","dodo","feather","flamingo","peacock","parrot","wing","black_bird","goose","frog","crocodile","turtle","lizard","snake","dragon_face","dragon","sauropod","t-rex","whale","whale2","dolphin","seal","fish","tropical_fish","blowfish","shark","octopus","shell","coral","jellyfish","snail","butterfly","bug","ant","bee","beetle","ladybug","cricket","cockroach","spider","spider_web","scorpion","mosquito","fly","worm","microbe","bouquet","cherry_blossom","white_flower","lotus","rosette","rose","wilted_flower","hibiscus","sunflower","blossom","tulip","hyacinth","seedling","potted_plant","evergreen_tree","deciduous_tree","palm_tree","cactus","ear_of_rice","herb","shamrock","four_leaf_clover","maple_leaf","fallen_leaf","leaves","empty_nest","nest_with_eggs","mushroom"]},{"id":"foods","emojis":["grapes","melon","watermelon","tangerine","lemon","banana","pineapple","mango","apple","green_apple","pear","peach","cherries","strawberry","blueberries","kiwifruit","tomato","olive","coconut","avocado","eggplant","potato","carrot","corn","hot_pepper","bell_pepper","cucumber","leafy_green","broccoli","garlic","onion","peanuts","beans","chestnut","ginger_root","pea_pod","bread","croissant","baguette_bread","flatbread","pretzel","bagel","pancakes","waffle","cheese_wedge","meat_on_bone","poultry_leg","cut_of_meat","bacon","hamburger","fries","pizza","hotdog","sandwich","taco","burrito","tamale","stuffed_flatbread","falafel","egg","fried_egg","shallow_pan_of_food","stew","fondue","bowl_with_spoon","green_salad","popcorn","butter","salt","canned_food","bento","rice_cracker","rice_ball","rice","curry","ramen","spaghetti","sweet_potato","oden","sushi","fried_shrimp","fish_cake","moon_cake","dango","dumpling","fortune_cookie","takeout_box","crab","lobster","shrimp","squid","oyster","icecream","shaved_ice","ice_cream","doughnut","cookie","birthday","cake","cupcake","pie","chocolate_bar","candy","lollipop","custard","honey_pot","baby_bottle","glass_of_milk","coffee","teapot","tea","sake","champagne","wine_glass","cocktail","tropical_drink","beer","beers","clinking_glasses","tumbler_glass","pouring_liquid","cup_with_straw","bubble_tea","beverage_box","mate_drink","ice_cube","chopsticks","knife_fork_plate","fork_and_knife","spoon","hocho","jar","amphora"]},{"id":"activity","emojis":["jack_o_lantern","christmas_tree","fireworks","sparkler","firecracker","sparkles","balloon","tada","confetti_ball","tanabata_tree","bamboo","dolls","flags","wind_chime","rice_scene","red_envelope","ribbon","gift","reminder_ribbon","admission_tickets","ticket","medal","trophy","sports_medal","first_place_medal","second_place_medal","third_place_medal","soccer","baseball","softball","basketball","volleyball","football","rugby_football","tennis","flying_disc","bowling","cricket_bat_and_ball","field_hockey_stick_and_ball","ice_hockey_stick_and_puck","lacrosse","table_tennis_paddle_and_ball","badminton_racquet_and_shuttlecock","boxing_glove","martial_arts_uniform","goal_net","golf","ice_skate","fishing_pole_and_fish","diving_mask","running_shirt_with_sash","ski","sled","curling_stone","dart","yo-yo","kite","gun","8ball","crystal_ball","magic_wand","video_game","joystick","slot_machine","game_die","jigsaw","teddy_bear","pinata","mirror_ball","nesting_dolls","spades","hearts","diamonds","clubs","chess_pawn","black_joker","mahjong","flower_playing_cards","performing_arts","frame_with_picture","art","thread","sewing_needle","yarn","knot"]},{"id":"places","emojis":["earth_africa","earth_americas","earth_asia","globe_with_meridians","world_map","japan","compass","snow_capped_mountain","mountain","volcano","mount_fuji","camping","beach_with_umbrella","desert","desert_island","national_park","stadium","classical_building","building_construction","bricks","rock","wood","hut","house_buildings","derelict_house_building","house","house_with_garden","office","post_office","european_post_office","hospital","bank","hotel","love_hotel","convenience_store","school","department_store","factory","japanese_castle","european_castle","wedding","tokyo_tower","statue_of_liberty","church","mosque","hindu_temple","synagogue","shinto_shrine","kaaba","fountain","tent","foggy","night_with_stars","cityscape","sunrise_over_mountains","sunrise","city_sunset","city_sunrise","bridge_at_night","hotsprings","carousel_horse","playground_slide","ferris_wheel","roller_coaster","barber","circus_tent","steam_locomotive","railway_car","bullettrain_side","bullettrain_front","train2","metro","light_rail","station","tram","monorail","mountain_railway","train","bus","oncoming_bus","trolleybus","minibus","ambulance","fire_engine","police_car","oncoming_police_car","taxi","oncoming_taxi","car","oncoming_automobile","blue_car","pickup_truck","truck","articulated_lorry","tractor","racing_car","racing_motorcycle","motor_scooter","manual_wheelchair","motorized_wheelchair","auto_rickshaw","bike","scooter","skateboard","roller_skate","busstop","motorway","railway_track","oil_drum","fuelpump","wheel","rotating_light","traffic_light","vertical_traffic_light","octagonal_sign","construction","anchor","ring_buoy","boat","canoe","speedboat","passenger_ship","ferry","motor_boat","ship","airplane","small_airplane","airplane_departure","airplane_arriving","parachute","seat","helicopter","suspension_railway","mountain_cableway","aerial_tramway","satellite","rocket","flying_saucer","bellhop_bell","luggage","hourglass","hourglass_flowing_sand","watch","alarm_clock","stopwatch","timer_clock","mantelpiece_clock","clock12","clock1230","clock1","clock130","clock2","clock230","clock3","clock330","clock4","clock430","clock5","clock530","clock6","clock630","clock7","clock730","clock8","clock830","clock9","clock930","clock10","clock1030","clock11","clock1130","new_moon","waxing_crescent_moon","first_quarter_moon","moon","full_moon","waning_gibbous_moon","last_quarter_moon","waning_crescent_moon","crescent_moon","new_moon_with_face","first_quarter_moon_with_face","last_quarter_moon_with_face","thermometer","sunny","full_moon_with_face","sun_with_face","ringed_planet","star","star2","stars","milky_way","cloud","partly_sunny","thunder_cloud_and_rain","mostly_sunny","barely_sunny","partly_sunny_rain","rain_cloud","snow_cloud","lightning","tornado","fog","wind_blowing_face","cyclone","rainbow","closed_umbrella","umbrella","umbrella_with_rain_drops","umbrella_on_ground","zap","snowflake","snowman","snowman_without_snow","comet","fire","droplet","ocean"]},{"id":"objects","emojis":["eyeglasses","dark_sunglasses","goggles","lab_coat","safety_vest","necktie","shirt","jeans","scarf","gloves","coat","socks","dress","kimono","sari","one-piece_swimsuit","briefs","shorts","bikini","womans_clothes","folding_hand_fan","purse","handbag","pouch","shopping_bags","school_satchel","thong_sandal","mans_shoe","athletic_shoe","hiking_boot","womans_flat_shoe","high_heel","sandal","ballet_shoes","boot","hair_pick","crown","womans_hat","tophat","mortar_board","billed_cap","military_helmet","helmet_with_white_cross","prayer_beads","lipstick","ring","gem","mute","speaker","sound","loud_sound","loudspeaker","mega","postal_horn","bell","no_bell","musical_score","musical_note","notes","studio_microphone","level_slider","control_knobs","microphone","headphones","radio","saxophone","accordion","guitar","musical_keyboard","trumpet","violin","banjo","drum_with_drumsticks","long_drum","maracas","flute","iphone","calling","phone","telephone_receiver","pager","fax","battery","low_battery","electric_plug","computer","desktop_computer","printer","keyboard","three_button_mouse","trackball","minidisc","floppy_disk","cd","dvd","abacus","movie_camera","film_frames","film_projector","clapper","tv","camera","camera_with_flash","video_camera","vhs","mag","mag_right","candle","bulb","flashlight","izakaya_lantern","diya_lamp","notebook_with_decorative_cover","closed_book","book","green_book","blue_book","orange_book","books","notebook","ledger","page_with_curl","scroll","page_facing_up","newspaper","rolled_up_newspaper","bookmark_tabs","bookmark","label","moneybag","coin","yen","dollar","euro","pound","money_with_wings","credit_card","receipt","chart","email","e-mail","incoming_envelope","envelope_with_arrow","outbox_tray","inbox_tray","package","mailbox","mailbox_closed","mailbox_with_mail","mailbox_with_no_mail","postbox","ballot_box_with_ballot","pencil2","black_nib","lower_left_fountain_pen","lower_left_ballpoint_pen","lower_left_paintbrush","lower_left_crayon","memo","briefcase","file_folder","open_file_folder","card_index_dividers","date","calendar","spiral_note_pad","spiral_calendar_pad","card_index","chart_with_upwards_trend","chart_with_downwards_trend","bar_chart","clipboard","pushpin","round_pushpin","paperclip","linked_paperclips","straight_ruler","triangular_ruler","scissors","card_file_box","file_cabinet","wastebasket","lock","unlock","lock_with_ink_pen","closed_lock_with_key","key","old_key","hammer","axe","pick","hammer_and_pick","hammer_and_wrench","dagger_knife","crossed_swords","bomb","boomerang","bow_and_arrow","shield","carpentry_saw","wrench","screwdriver","nut_and_bolt","gear","compression","scales","probing_cane","link","chains","hook","toolbox","magnet","ladder","alembic","test_tube","petri_dish","dna","microscope","telescope","satellite_antenna","syringe","drop_of_blood","pill","adhesive_bandage","crutch","stethoscope","x-ray","door","elevator","mirror","window","bed","couch_and_lamp","chair","toilet","plunger","shower","bathtub","mouse_trap","razor","lotion_bottle","safety_pin","broom","basket","roll_of_paper","bucket","soap","bubbles","toothbrush","sponge","fire_extinguisher","shopping_trolley","smoking","coffin","headstone","funeral_urn","nazar_amulet","hamsa","moyai","placard","identification_card"]},{"id":"symbols","emojis":["atm","put_litter_in_its_place","potable_water","wheelchair","mens","womens","restroom","baby_symbol","wc","passport_control","customs","baggage_claim","left_luggage","warning","children_crossing","no_entry","no_entry_sign","no_bicycles","no_smoking","do_not_litter","non-potable_water","no_pedestrians","no_mobile_phones","underage","radioactive_sign","biohazard_sign","arrow_up","arrow_upper_right","arrow_right","arrow_lower_right","arrow_down","arrow_lower_left","arrow_left","arrow_upper_left","arrow_up_down","left_right_arrow","leftwards_arrow_with_hook","arrow_right_hook","arrow_heading_up","arrow_heading_down","arrows_clockwise","arrows_counterclockwise","back","end","on","soon","top","place_of_worship","atom_symbol","om_symbol","star_of_david","wheel_of_dharma","yin_yang","latin_cross","orthodox_cross","star_and_crescent","peace_symbol","menorah_with_nine_branches","six_pointed_star","khanda","aries","taurus","gemini","cancer","leo","virgo","libra","scorpius","sagittarius","capricorn","aquarius","pisces","ophiuchus","twisted_rightwards_arrows","repeat","repeat_one","arrow_forward","fast_forward","black_right_pointing_double_triangle_with_vertical_bar","black_right_pointing_triangle_with_double_vertical_bar","arrow_backward","rewind","black_left_pointing_double_triangle_with_vertical_bar","arrow_up_small","arrow_double_up","arrow_down_small","arrow_double_down","double_vertical_bar","black_square_for_stop","black_circle_for_record","eject","cinema","low_brightness","high_brightness","signal_strength","wireless","vibration_mode","mobile_phone_off","female_sign","male_sign","transgender_symbol","heavy_multiplication_x","heavy_plus_sign","heavy_minus_sign","heavy_division_sign","heavy_equals_sign","infinity","bangbang","interrobang","question","grey_question","grey_exclamation","exclamation","wavy_dash","currency_exchange","heavy_dollar_sign","medical_symbol","recycle","fleur_de_lis","trident","name_badge","beginner","o","white_check_mark","ballot_box_with_check","heavy_check_mark","x","negative_squared_cross_mark","curly_loop","loop","part_alternation_mark","eight_spoked_asterisk","eight_pointed_black_star","sparkle","copyright","registered","tm","hash","keycap_star","zero","one","two","three","four","five","six","seven","eight","nine","keycap_ten","capital_abcd","abcd","1234","symbols","abc","a","ab","b","cl","cool","free","information_source","id","m","new","ng","o2","ok","parking","sos","up","vs","koko","sa","u6708","u6709","u6307","ideograph_advantage","u5272","u7121","u7981","accept","u7533","u5408","u7a7a","congratulations","secret","u55b6","u6e80","red_circle","large_orange_circle","large_yellow_circle","large_green_circle","large_blue_circle","large_purple_circle","large_brown_circle","black_circle","white_circle","large_red_square","large_orange_square","large_yellow_square","large_green_square","large_blue_square","large_purple_square","large_brown_square","black_large_square","white_large_square","black_medium_square","white_medium_square","black_medium_small_square","white_medium_small_square","black_small_square","white_small_square","large_orange_diamond","large_blue_diamond","small_orange_diamond","small_blue_diamond","small_red_triangle","small_red_triangle_down","diamond_shape_with_a_dot_inside","radio_button","white_square_button","black_square_button"]},{"id":"flags","emojis":["checkered_flag","cn","crossed_flags","de","es","flag-ac","flag-ad","flag-ae","flag-af","flag-ag","flag-ai","flag-al","flag-am","flag-ao","flag-aq","flag-ar","flag-as","flag-at","flag-au","flag-aw","flag-ax","flag-az","flag-ba","flag-bb","flag-bd","flag-be","flag-bf","flag-bg","flag-bh","flag-bi","flag-bj","flag-bl","flag-bm","flag-bn","flag-bo","flag-bq","flag-br","flag-bs","flag-bt","flag-bv","flag-bw","flag-by","flag-bz","flag-ca","flag-cc","flag-cd","flag-cf","flag-cg","flag-ch","flag-ci","flag-ck","flag-cl","flag-cm","flag-co","flag-cp","flag-cr","flag-cu","flag-cv","flag-cw","flag-cx","flag-cy","flag-cz","flag-dg","flag-dj","flag-dk","flag-dm","flag-do","flag-dz","flag-ea","flag-ec","flag-ee","flag-eg","flag-eh","flag-england","flag-er","flag-et","flag-eu","flag-fi","flag-fj","flag-fk","flag-fm","flag-fo","flag-ga","flag-gd","flag-ge","flag-gf","flag-gg","flag-gh","flag-gi","flag-gl","flag-gm","flag-gn","flag-gp","flag-gq","flag-gr","flag-gs","flag-gt","flag-gu","flag-gw","flag-gy","flag-hk","flag-hm","flag-hn","flag-hr","flag-ht","flag-hu","flag-ic","flag-id","flag-ie","flag-il","flag-im","flag-in","flag-io","flag-iq","flag-ir","flag-is","flag-je","flag-jm","flag-jo","flag-ke","flag-kg","flag-kh","flag-ki","flag-km","flag-kn","flag-kp","flag-kw","flag-ky","flag-kz","flag-la","flag-lb","flag-lc","flag-li","flag-lk","flag-lr","flag-ls","flag-lt","flag-lu","flag-lv","flag-ly","flag-ma","flag-mc","flag-md","flag-me","flag-mf","flag-mg","flag-mh","flag-mk","flag-ml","flag-mm","flag-mn","flag-mo","flag-mp","flag-mq","flag-mr","flag-ms","flag-mt","flag-mu","flag-mv","flag-mw","flag-mx","flag-my","flag-mz","flag-na","flag-nc","flag-ne","flag-nf","flag-ng","flag-ni","flag-nl","flag-no","flag-np","flag-nr","flag-nu","flag-nz","flag-om","flag-pa","flag-pe","flag-pf","flag-pg","flag-ph","flag-pk","flag-pl","flag-pm","flag-pn","flag-pr","flag-ps","flag-pt","flag-pw","flag-py","flag-qa","flag-re","flag-ro","flag-rs","flag-rw","flag-sa","flag-sb","flag-sc","flag-scotland","flag-sd","flag-se","flag-sg","flag-sh","flag-si","flag-sj","flag-sk","flag-sl","flag-sm","flag-sn","flag-so","flag-sr","flag-ss","flag-st","flag-sv","flag-sx","flag-sy","flag-sz","flag-ta","flag-tc","flag-td","flag-tf","flag-tg","flag-th","flag-tj","flag-tk","flag-tl","flag-tm","flag-tn","flag-to","flag-tr","flag-tt","flag-tv","flag-tw","flag-tz","flag-ua","flag-ug","flag-um","flag-un","flag-uy","flag-uz","flag-va","flag-vc","flag-ve","flag-vg","flag-vi","flag-vn","flag-vu","flag-wales","flag-wf","flag-ws","flag-xk","flag-ye","flag-yt","flag-za","flag-zm","flag-zw","fr","gb","it","jp","kr","pirate_flag","rainbow-flag","ru","transgender_flag","triangular_flag_on_post","us","waving_black_flag","waving_white_flag"]}]'),l9e=JSON.parse(`{"100":{"id":"100","name":"Hundred Points","keywords":["100","score","perfect","numbers","century","exam","quiz","test","pass"],"skins":[{"unified":"1f4af","native":"💯"}],"version":1},"1234":{"id":"1234","name":"Input Numbers","keywords":["1234","blue","square","1","2","3","4"],"skins":[{"unified":"1f522","native":"🔢"}],"version":1},"grinning":{"id":"grinning","name":"Grinning Face","emoticons":[":D"],"keywords":["smile","happy","joy",":D","grin"],"skins":[{"unified":"1f600","native":"😀"}],"version":1},"smiley":{"id":"smiley","name":"Grinning Face with Big Eyes","emoticons":[":)","=)","=-)"],"keywords":["smiley","happy","joy","haha",":D",":)","smile","funny"],"skins":[{"unified":"1f603","native":"😃"}],"version":1},"smile":{"id":"smile","name":"Grinning Face with Smiling Eyes","emoticons":[":)","C:","c:",":D",":-D"],"keywords":["smile","happy","joy","funny","haha","laugh","like",":D",":)"],"skins":[{"unified":"1f604","native":"😄"}],"version":1},"grin":{"id":"grin","name":"Beaming Face with Smiling Eyes","keywords":["grin","happy","smile","joy","kawaii"],"skins":[{"unified":"1f601","native":"😁"}],"version":1},"laughing":{"id":"laughing","name":"Grinning Squinting Face","emoticons":[":>",":->"],"keywords":["laughing","satisfied","happy","joy","lol","haha","glad","XD","laugh"],"skins":[{"unified":"1f606","native":"😆"}],"version":1},"sweat_smile":{"id":"sweat_smile","name":"Grinning Face with Sweat","keywords":["smile","hot","happy","laugh","relief"],"skins":[{"unified":"1f605","native":"😅"}],"version":1},"rolling_on_the_floor_laughing":{"id":"rolling_on_the_floor_laughing","name":"Rolling on the Floor Laughing","keywords":["face","lol","haha","rofl"],"skins":[{"unified":"1f923","native":"🤣"}],"version":3},"joy":{"id":"joy","name":"Face with Tears of Joy","keywords":["cry","weep","happy","happytears","haha"],"skins":[{"unified":"1f602","native":"😂"}],"version":1},"slightly_smiling_face":{"id":"slightly_smiling_face","name":"Slightly Smiling Face","emoticons":[":)","(:",":-)"],"keywords":["smile"],"skins":[{"unified":"1f642","native":"🙂"}],"version":1},"upside_down_face":{"id":"upside_down_face","name":"Upside-Down Face","keywords":["upside","down","flipped","silly","smile"],"skins":[{"unified":"1f643","native":"🙃"}],"version":1},"melting_face":{"id":"melting_face","name":"Melting Face","keywords":["hot","heat"],"skins":[{"unified":"1fae0","native":"🫠"}],"version":14},"wink":{"id":"wink","name":"Winking Face","emoticons":[";)",";-)"],"keywords":["wink","happy","mischievous","secret",";)","smile","eye"],"skins":[{"unified":"1f609","native":"😉"}],"version":1},"blush":{"id":"blush","name":"Smiling Face with Smiling Eyes","emoticons":[":)"],"keywords":["blush","smile","happy","flushed","crush","embarrassed","shy","joy"],"skins":[{"unified":"1f60a","native":"😊"}],"version":1},"innocent":{"id":"innocent","name":"Smiling Face with Halo","keywords":["innocent","angel","heaven"],"skins":[{"unified":"1f607","native":"😇"}],"version":1},"smiling_face_with_3_hearts":{"id":"smiling_face_with_3_hearts","name":"Smiling Face with Hearts","keywords":["3","love","like","affection","valentines","infatuation","crush","adore"],"skins":[{"unified":"1f970","native":"🥰"}],"version":11},"heart_eyes":{"id":"heart_eyes","name":"Smiling Face with Heart-Eyes","keywords":["heart","eyes","love","like","affection","valentines","infatuation","crush"],"skins":[{"unified":"1f60d","native":"😍"}],"version":1},"star-struck":{"id":"star-struck","name":"Star-Struck","keywords":["star","struck","grinning","face","with","eyes","smile","starry"],"skins":[{"unified":"1f929","native":"🤩"}],"version":5},"kissing_heart":{"id":"kissing_heart","name":"Face Blowing a Kiss","emoticons":[":*",":-*"],"keywords":["kissing","heart","love","like","affection","valentines","infatuation"],"skins":[{"unified":"1f618","native":"😘"}],"version":1},"kissing":{"id":"kissing","name":"Kissing Face","keywords":["love","like","3","valentines","infatuation","kiss"],"skins":[{"unified":"1f617","native":"😗"}],"version":1},"relaxed":{"id":"relaxed","name":"Smiling Face","keywords":["relaxed","blush","massage","happiness"],"skins":[{"unified":"263a-fe0f","native":"☺️"}],"version":1},"kissing_closed_eyes":{"id":"kissing_closed_eyes","name":"Kissing Face with Closed Eyes","keywords":["love","like","affection","valentines","infatuation","kiss"],"skins":[{"unified":"1f61a","native":"😚"}],"version":1},"kissing_smiling_eyes":{"id":"kissing_smiling_eyes","name":"Kissing Face with Smiling Eyes","keywords":["affection","valentines","infatuation","kiss"],"skins":[{"unified":"1f619","native":"😙"}],"version":1},"smiling_face_with_tear":{"id":"smiling_face_with_tear","name":"Smiling Face with Tear","keywords":["sad","cry","pretend"],"skins":[{"unified":"1f972","native":"🥲"}],"version":13},"yum":{"id":"yum","name":"Face Savoring Food","keywords":["yum","happy","joy","tongue","smile","silly","yummy","nom","delicious","savouring"],"skins":[{"unified":"1f60b","native":"😋"}],"version":1},"stuck_out_tongue":{"id":"stuck_out_tongue","name":"Face with Tongue","emoticons":[":p",":-p",":P",":-P",":b",":-b"],"keywords":["stuck","out","prank","childish","playful","mischievous","smile"],"skins":[{"unified":"1f61b","native":"😛"}],"version":1},"stuck_out_tongue_winking_eye":{"id":"stuck_out_tongue_winking_eye","name":"Winking Face with Tongue","emoticons":[";p",";-p",";b",";-b",";P",";-P"],"keywords":["stuck","out","eye","prank","childish","playful","mischievous","smile","wink"],"skins":[{"unified":"1f61c","native":"😜"}],"version":1},"zany_face":{"id":"zany_face","name":"Zany Face","keywords":["grinning","with","one","large","and","small","eye","goofy","crazy"],"skins":[{"unified":"1f92a","native":"🤪"}],"version":5},"stuck_out_tongue_closed_eyes":{"id":"stuck_out_tongue_closed_eyes","name":"Squinting Face with Tongue","keywords":["stuck","out","closed","eyes","prank","playful","mischievous","smile"],"skins":[{"unified":"1f61d","native":"😝"}],"version":1},"money_mouth_face":{"id":"money_mouth_face","name":"Money-Mouth Face","keywords":["money","mouth","rich","dollar"],"skins":[{"unified":"1f911","native":"🤑"}],"version":1},"hugging_face":{"id":"hugging_face","name":"Hugging Face","keywords":["smile","hug"],"skins":[{"unified":"1f917","native":"🤗"}],"version":1},"face_with_hand_over_mouth":{"id":"face_with_hand_over_mouth","name":"Face with Hand over Mouth","keywords":["smiling","eyes","and","covering","whoops","shock","surprise"],"skins":[{"unified":"1f92d","native":"🤭"}],"version":5},"face_with_open_eyes_and_hand_over_mouth":{"id":"face_with_open_eyes_and_hand_over_mouth","name":"Face with Open Eyes and Hand over Mouth","keywords":["silence","secret","shock","surprise"],"skins":[{"unified":"1fae2","native":"🫢"}],"version":14},"face_with_peeking_eye":{"id":"face_with_peeking_eye","name":"Face with Peeking Eye","keywords":["scared","frightening","embarrassing","shy"],"skins":[{"unified":"1fae3","native":"🫣"}],"version":14},"shushing_face":{"id":"shushing_face","name":"Shushing Face","keywords":["with","finger","covering","closed","lips","quiet","shhh"],"skins":[{"unified":"1f92b","native":"🤫"}],"version":5},"thinking_face":{"id":"thinking_face","name":"Thinking Face","keywords":["hmmm","think","consider"],"skins":[{"unified":"1f914","native":"🤔"}],"version":1},"saluting_face":{"id":"saluting_face","name":"Saluting Face","keywords":["respect","salute"],"skins":[{"unified":"1fae1","native":"🫡"}],"version":14},"zipper_mouth_face":{"id":"zipper_mouth_face","name":"Zipper-Mouth Face","keywords":["zipper","mouth","sealed","secret"],"skins":[{"unified":"1f910","native":"🤐"}],"version":1},"face_with_raised_eyebrow":{"id":"face_with_raised_eyebrow","name":"Face with Raised Eyebrow","keywords":["one","distrust","scepticism","disapproval","disbelief","surprise"],"skins":[{"unified":"1f928","native":"🤨"}],"version":5},"neutral_face":{"id":"neutral_face","name":"Neutral Face","emoticons":[":|",":-|"],"keywords":["indifference","meh",":",""],"skins":[{"unified":"1f610","native":"😐"}],"version":1},"expressionless":{"id":"expressionless","name":"Expressionless Face","emoticons":["-_-"],"keywords":["indifferent","-","","meh","deadpan"],"skins":[{"unified":"1f611","native":"😑"}],"version":1},"no_mouth":{"id":"no_mouth","name":"Face Without Mouth","keywords":["no","hellokitty"],"skins":[{"unified":"1f636","native":"😶"}],"version":1},"dotted_line_face":{"id":"dotted_line_face","name":"Dotted Line Face","keywords":["invisible","lonely","isolation","depression"],"skins":[{"unified":"1fae5","native":"🫥"}],"version":14},"face_in_clouds":{"id":"face_in_clouds","name":"Face in Clouds","keywords":["shower","steam","dream"],"skins":[{"unified":"1f636-200d-1f32b-fe0f","native":"😶‍🌫️"}],"version":13.1},"smirk":{"id":"smirk","name":"Smirking Face","keywords":["smirk","smile","mean","prank","smug","sarcasm"],"skins":[{"unified":"1f60f","native":"😏"}],"version":1},"unamused":{"id":"unamused","name":"Unamused Face","emoticons":[":("],"keywords":["indifference","bored","straight","serious","sarcasm","unimpressed","skeptical","dubious","side","eye"],"skins":[{"unified":"1f612","native":"😒"}],"version":1},"face_with_rolling_eyes":{"id":"face_with_rolling_eyes","name":"Face with Rolling Eyes","keywords":["eyeroll","frustrated"],"skins":[{"unified":"1f644","native":"🙄"}],"version":1},"grimacing":{"id":"grimacing","name":"Grimacing Face","keywords":["grimace","teeth"],"skins":[{"unified":"1f62c","native":"😬"}],"version":1},"face_exhaling":{"id":"face_exhaling","name":"Face Exhaling","keywords":["relieve","relief","tired","sigh"],"skins":[{"unified":"1f62e-200d-1f4a8","native":"😮‍💨"}],"version":13.1},"lying_face":{"id":"lying_face","name":"Lying Face","keywords":["lie","pinocchio"],"skins":[{"unified":"1f925","native":"🤥"}],"version":3},"shaking_face":{"id":"shaking_face","name":"Shaking Face","keywords":["dizzy","shock","blurry","earthquake"],"skins":[{"unified":"1fae8","native":"🫨"}],"version":15},"relieved":{"id":"relieved","name":"Relieved Face","keywords":["relaxed","phew","massage","happiness"],"skins":[{"unified":"1f60c","native":"😌"}],"version":1},"pensive":{"id":"pensive","name":"Pensive Face","keywords":["sad","depressed","upset"],"skins":[{"unified":"1f614","native":"😔"}],"version":1},"sleepy":{"id":"sleepy","name":"Sleepy Face","keywords":["tired","rest","nap"],"skins":[{"unified":"1f62a","native":"😪"}],"version":1},"drooling_face":{"id":"drooling_face","name":"Drooling Face","keywords":[],"skins":[{"unified":"1f924","native":"🤤"}],"version":3},"sleeping":{"id":"sleeping","name":"Sleeping Face","keywords":["tired","sleepy","night","zzz"],"skins":[{"unified":"1f634","native":"😴"}],"version":1},"mask":{"id":"mask","name":"Face with Medical Mask","keywords":["sick","ill","disease","covid"],"skins":[{"unified":"1f637","native":"😷"}],"version":1},"face_with_thermometer":{"id":"face_with_thermometer","name":"Face with Thermometer","keywords":["sick","temperature","cold","fever","covid"],"skins":[{"unified":"1f912","native":"🤒"}],"version":1},"face_with_head_bandage":{"id":"face_with_head_bandage","name":"Face with Head-Bandage","keywords":["head","bandage","injured","clumsy","hurt"],"skins":[{"unified":"1f915","native":"🤕"}],"version":1},"nauseated_face":{"id":"nauseated_face","name":"Nauseated Face","keywords":["vomit","gross","green","sick","throw","up","ill"],"skins":[{"unified":"1f922","native":"🤢"}],"version":3},"face_vomiting":{"id":"face_vomiting","name":"Face Vomiting","keywords":["with","open","mouth","sick"],"skins":[{"unified":"1f92e","native":"🤮"}],"version":5},"sneezing_face":{"id":"sneezing_face","name":"Sneezing Face","keywords":["gesundheit","sneeze","sick","allergy"],"skins":[{"unified":"1f927","native":"🤧"}],"version":3},"hot_face":{"id":"hot_face","name":"Hot Face","keywords":["feverish","heat","red","sweating"],"skins":[{"unified":"1f975","native":"🥵"}],"version":11},"cold_face":{"id":"cold_face","name":"Cold Face","keywords":["blue","freezing","frozen","frostbite","icicles"],"skins":[{"unified":"1f976","native":"🥶"}],"version":11},"woozy_face":{"id":"woozy_face","name":"Woozy Face","keywords":["dizzy","intoxicated","tipsy","wavy"],"skins":[{"unified":"1f974","native":"🥴"}],"version":11},"dizzy_face":{"id":"dizzy_face","name":"Dizzy Face","keywords":["spent","unconscious","xox"],"skins":[{"unified":"1f635","native":"😵"}],"version":1},"face_with_spiral_eyes":{"id":"face_with_spiral_eyes","name":"Face with Spiral Eyes","keywords":["sick","ill","confused","nauseous","nausea"],"skins":[{"unified":"1f635-200d-1f4ab","native":"😵‍💫"}],"version":13.1},"exploding_head":{"id":"exploding_head","name":"Exploding Head","keywords":["shocked","face","with","mind","blown"],"skins":[{"unified":"1f92f","native":"🤯"}],"version":5},"face_with_cowboy_hat":{"id":"face_with_cowboy_hat","name":"Cowboy Hat Face","keywords":["with","cowgirl"],"skins":[{"unified":"1f920","native":"🤠"}],"version":3},"partying_face":{"id":"partying_face","name":"Partying Face","keywords":["celebration","woohoo"],"skins":[{"unified":"1f973","native":"🥳"}],"version":11},"disguised_face":{"id":"disguised_face","name":"Disguised Face","keywords":["pretent","brows","glasses","moustache"],"skins":[{"unified":"1f978","native":"🥸"}],"version":13},"sunglasses":{"id":"sunglasses","name":"Smiling Face with Sunglasses","emoticons":["8)"],"keywords":["cool","smile","summer","beach","sunglass"],"skins":[{"unified":"1f60e","native":"😎"}],"version":1},"nerd_face":{"id":"nerd_face","name":"Nerd Face","keywords":["nerdy","geek","dork"],"skins":[{"unified":"1f913","native":"🤓"}],"version":1},"face_with_monocle":{"id":"face_with_monocle","name":"Face with Monocle","keywords":["stuffy","wealthy"],"skins":[{"unified":"1f9d0","native":"🧐"}],"version":5},"confused":{"id":"confused","name":"Confused Face","emoticons":[":\\\\",":-\\\\",":/",":-/"],"keywords":["indifference","huh","weird","hmmm",":/"],"skins":[{"unified":"1f615","native":"😕"}],"version":1},"face_with_diagonal_mouth":{"id":"face_with_diagonal_mouth","name":"Face with Diagonal Mouth","keywords":["skeptic","confuse","frustrated","indifferent"],"skins":[{"unified":"1fae4","native":"🫤"}],"version":14},"worried":{"id":"worried","name":"Worried Face","keywords":["concern","nervous",":("],"skins":[{"unified":"1f61f","native":"😟"}],"version":1},"slightly_frowning_face":{"id":"slightly_frowning_face","name":"Slightly Frowning Face","keywords":["disappointed","sad","upset"],"skins":[{"unified":"1f641","native":"🙁"}],"version":1},"white_frowning_face":{"id":"white_frowning_face","name":"Frowning Face","keywords":["white","sad","upset","frown"],"skins":[{"unified":"2639-fe0f","native":"☹️"}],"version":1},"open_mouth":{"id":"open_mouth","name":"Face with Open Mouth","emoticons":[":o",":-o",":O",":-O"],"keywords":["surprise","impressed","wow","whoa",":O"],"skins":[{"unified":"1f62e","native":"😮"}],"version":1},"hushed":{"id":"hushed","name":"Hushed Face","keywords":["woo","shh"],"skins":[{"unified":"1f62f","native":"😯"}],"version":1},"astonished":{"id":"astonished","name":"Astonished Face","keywords":["xox","surprised","poisoned"],"skins":[{"unified":"1f632","native":"😲"}],"version":1},"flushed":{"id":"flushed","name":"Flushed Face","keywords":["blush","shy","flattered"],"skins":[{"unified":"1f633","native":"😳"}],"version":1},"pleading_face":{"id":"pleading_face","name":"Pleading Face","keywords":["begging","mercy","cry","tears","sad","grievance"],"skins":[{"unified":"1f97a","native":"🥺"}],"version":11},"face_holding_back_tears":{"id":"face_holding_back_tears","name":"Face Holding Back Tears","keywords":["touched","gratitude","cry"],"skins":[{"unified":"1f979","native":"🥹"}],"version":14},"frowning":{"id":"frowning","name":"Frowning Face with Open Mouth","keywords":["aw","what"],"skins":[{"unified":"1f626","native":"😦"}],"version":1},"anguished":{"id":"anguished","name":"Anguished Face","emoticons":["D:"],"keywords":["stunned","nervous"],"skins":[{"unified":"1f627","native":"😧"}],"version":1},"fearful":{"id":"fearful","name":"Fearful Face","keywords":["scared","terrified","nervous"],"skins":[{"unified":"1f628","native":"😨"}],"version":1},"cold_sweat":{"id":"cold_sweat","name":"Anxious Face with Sweat","keywords":["cold","nervous"],"skins":[{"unified":"1f630","native":"😰"}],"version":1},"disappointed_relieved":{"id":"disappointed_relieved","name":"Sad but Relieved Face","keywords":["disappointed","phew","sweat","nervous"],"skins":[{"unified":"1f625","native":"😥"}],"version":1},"cry":{"id":"cry","name":"Crying Face","emoticons":[":'("],"keywords":["cry","tears","sad","depressed","upset",":'("],"skins":[{"unified":"1f622","native":"😢"}],"version":1},"sob":{"id":"sob","name":"Loudly Crying Face","emoticons":[":'("],"keywords":["sob","cry","tears","sad","upset","depressed"],"skins":[{"unified":"1f62d","native":"😭"}],"version":1},"scream":{"id":"scream","name":"Face Screaming in Fear","keywords":["scream","munch","scared","omg"],"skins":[{"unified":"1f631","native":"😱"}],"version":1},"confounded":{"id":"confounded","name":"Confounded Face","keywords":["confused","sick","unwell","oops",":S"],"skins":[{"unified":"1f616","native":"😖"}],"version":1},"persevere":{"id":"persevere","name":"Persevering Face","keywords":["persevere","sick","no","upset","oops"],"skins":[{"unified":"1f623","native":"😣"}],"version":1},"disappointed":{"id":"disappointed","name":"Disappointed Face","emoticons":["):",":(",":-("],"keywords":["sad","upset","depressed",":("],"skins":[{"unified":"1f61e","native":"😞"}],"version":1},"sweat":{"id":"sweat","name":"Face with Cold Sweat","keywords":["downcast","hot","sad","tired","exercise"],"skins":[{"unified":"1f613","native":"😓"}],"version":1},"weary":{"id":"weary","name":"Weary Face","keywords":["tired","sleepy","sad","frustrated","upset"],"skins":[{"unified":"1f629","native":"😩"}],"version":1},"tired_face":{"id":"tired_face","name":"Tired Face","keywords":["sick","whine","upset","frustrated"],"skins":[{"unified":"1f62b","native":"😫"}],"version":1},"yawning_face":{"id":"yawning_face","name":"Yawning Face","keywords":["tired","sleepy"],"skins":[{"unified":"1f971","native":"🥱"}],"version":12},"triumph":{"id":"triumph","name":"Face with Look of Triumph","keywords":["steam","from","nose","gas","phew","proud","pride"],"skins":[{"unified":"1f624","native":"😤"}],"version":1},"rage":{"id":"rage","name":"Pouting Face","keywords":["rage","angry","mad","hate","despise"],"skins":[{"unified":"1f621","native":"😡"}],"version":1},"angry":{"id":"angry","name":"Angry Face","emoticons":[">:(",">:-("],"keywords":["mad","annoyed","frustrated"],"skins":[{"unified":"1f620","native":"😠"}],"version":1},"face_with_symbols_on_mouth":{"id":"face_with_symbols_on_mouth","name":"Face with Symbols on Mouth","keywords":["serious","covering","swearing","cursing","cussing","profanity","expletive"],"skins":[{"unified":"1f92c","native":"🤬"}],"version":5},"smiling_imp":{"id":"smiling_imp","name":"Smiling Face with Horns","keywords":["imp","devil"],"skins":[{"unified":"1f608","native":"😈"}],"version":1},"imp":{"id":"imp","name":"Imp","keywords":["angry","face","with","horns","devil"],"skins":[{"unified":"1f47f","native":"👿"}],"version":1},"skull":{"id":"skull","name":"Skull","keywords":["dead","skeleton","creepy","death"],"skins":[{"unified":"1f480","native":"💀"}],"version":1},"skull_and_crossbones":{"id":"skull_and_crossbones","name":"Skull and Crossbones","keywords":["poison","danger","deadly","scary","death","pirate","evil"],"skins":[{"unified":"2620-fe0f","native":"☠️"}],"version":1},"hankey":{"id":"hankey","name":"Pile of Poo","keywords":["hankey","poop","shit","shitface","fail","turd"],"skins":[{"unified":"1f4a9","native":"💩"}],"version":1},"clown_face":{"id":"clown_face","name":"Clown Face","keywords":[],"skins":[{"unified":"1f921","native":"🤡"}],"version":3},"japanese_ogre":{"id":"japanese_ogre","name":"Ogre","keywords":["japanese","monster","red","mask","halloween","scary","creepy","devil","demon"],"skins":[{"unified":"1f479","native":"👹"}],"version":1},"japanese_goblin":{"id":"japanese_goblin","name":"Goblin","keywords":["japanese","red","evil","mask","monster","scary","creepy"],"skins":[{"unified":"1f47a","native":"👺"}],"version":1},"ghost":{"id":"ghost","name":"Ghost","keywords":["halloween","spooky","scary"],"skins":[{"unified":"1f47b","native":"👻"}],"version":1},"alien":{"id":"alien","name":"Alien","keywords":["UFO","paul","weird","outer","space"],"skins":[{"unified":"1f47d","native":"👽"}],"version":1},"space_invader":{"id":"space_invader","name":"Alien Monster","keywords":["space","invader","game","arcade","play"],"skins":[{"unified":"1f47e","native":"👾"}],"version":1},"robot_face":{"id":"robot_face","name":"Robot","keywords":["face","computer","machine","bot"],"skins":[{"unified":"1f916","native":"🤖"}],"version":1},"smiley_cat":{"id":"smiley_cat","name":"Grinning Cat","keywords":["smiley","animal","cats","happy","smile"],"skins":[{"unified":"1f63a","native":"😺"}],"version":1},"smile_cat":{"id":"smile_cat","name":"Grinning Cat with Smiling Eyes","keywords":["smile","animal","cats"],"skins":[{"unified":"1f638","native":"😸"}],"version":1},"joy_cat":{"id":"joy_cat","name":"Cat with Tears of Joy","keywords":["animal","cats","haha","happy"],"skins":[{"unified":"1f639","native":"😹"}],"version":1},"heart_eyes_cat":{"id":"heart_eyes_cat","name":"Smiling Cat with Heart-Eyes","keywords":["heart","eyes","animal","love","like","affection","cats","valentines"],"skins":[{"unified":"1f63b","native":"😻"}],"version":1},"smirk_cat":{"id":"smirk_cat","name":"Cat with Wry Smile","keywords":["smirk","animal","cats"],"skins":[{"unified":"1f63c","native":"😼"}],"version":1},"kissing_cat":{"id":"kissing_cat","name":"Kissing Cat","keywords":["animal","cats","kiss"],"skins":[{"unified":"1f63d","native":"😽"}],"version":1},"scream_cat":{"id":"scream_cat","name":"Weary Cat","keywords":["scream","animal","cats","munch","scared"],"skins":[{"unified":"1f640","native":"🙀"}],"version":1},"crying_cat_face":{"id":"crying_cat_face","name":"Crying Cat","keywords":["face","animal","tears","weep","sad","cats","upset","cry"],"skins":[{"unified":"1f63f","native":"😿"}],"version":1},"pouting_cat":{"id":"pouting_cat","name":"Pouting Cat","keywords":["animal","cats"],"skins":[{"unified":"1f63e","native":"😾"}],"version":1},"see_no_evil":{"id":"see_no_evil","name":"See-No-Evil Monkey","keywords":["see","no","evil","animal","nature","haha"],"skins":[{"unified":"1f648","native":"🙈"}],"version":1},"hear_no_evil":{"id":"hear_no_evil","name":"Hear-No-Evil Monkey","keywords":["hear","no","evil","animal","nature"],"skins":[{"unified":"1f649","native":"🙉"}],"version":1},"speak_no_evil":{"id":"speak_no_evil","name":"Speak-No-Evil Monkey","keywords":["speak","no","evil","animal","nature","omg"],"skins":[{"unified":"1f64a","native":"🙊"}],"version":1},"love_letter":{"id":"love_letter","name":"Love Letter","keywords":["email","like","affection","envelope","valentines"],"skins":[{"unified":"1f48c","native":"💌"}],"version":1},"cupid":{"id":"cupid","name":"Heart with Arrow","keywords":["cupid","love","like","affection","valentines"],"skins":[{"unified":"1f498","native":"💘"}],"version":1},"gift_heart":{"id":"gift_heart","name":"Heart with Ribbon","keywords":["gift","love","valentines"],"skins":[{"unified":"1f49d","native":"💝"}],"version":1},"sparkling_heart":{"id":"sparkling_heart","name":"Sparkling Heart","keywords":["love","like","affection","valentines"],"skins":[{"unified":"1f496","native":"💖"}],"version":1},"heartpulse":{"id":"heartpulse","name":"Growing Heart","keywords":["heartpulse","like","love","affection","valentines","pink"],"skins":[{"unified":"1f497","native":"💗"}],"version":1},"heartbeat":{"id":"heartbeat","name":"Beating Heart","keywords":["heartbeat","love","like","affection","valentines","pink"],"skins":[{"unified":"1f493","native":"💓"}],"version":1},"revolving_hearts":{"id":"revolving_hearts","name":"Revolving Hearts","keywords":["love","like","affection","valentines"],"skins":[{"unified":"1f49e","native":"💞"}],"version":1},"two_hearts":{"id":"two_hearts","name":"Two Hearts","keywords":["love","like","affection","valentines","heart"],"skins":[{"unified":"1f495","native":"💕"}],"version":1},"heart_decoration":{"id":"heart_decoration","name":"Heart Decoration","keywords":["purple","square","love","like"],"skins":[{"unified":"1f49f","native":"💟"}],"version":1},"heavy_heart_exclamation_mark_ornament":{"id":"heavy_heart_exclamation_mark_ornament","name":"Heart Exclamation","keywords":["heavy","mark","ornament","decoration","love"],"skins":[{"unified":"2763-fe0f","native":"❣️"}],"version":1},"broken_heart":{"id":"broken_heart","name":"Broken Heart","emoticons":["2&&(o.children=arguments.length>3?J0.call(arguments,2):t),typeof e=="function"&&e.defaultProps!=null)for(a in e.defaultProps)o[a]===void 0&&(o[a]=e.defaultProps[a]);return _g(e,o,i,r,null)}function _g(e,n,t,i,r){var a={type:e,props:n,key:t,ref:i,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:r??++CW};return r==null&&xn.vnode!=null&&xn.vnode(a),a}function Fo(){return{current:null}}function Ec(e){return e.children}function co(e,n){this.props=e,this.context=n}function Tc(e,n){if(n==null)return e.__?Tc(e.__,e.__.__k.indexOf(e)+1):null;for(var t;n0?_g(v.type,v.props,v.key,null,v.__v):v)!=null){if(v.__=t,v.__b=t.__b+1,(p=_[h])===null||p&&v.key==p.key&&v.type===p.type)_[h]=void 0;else for(d=0;d{let e=null;try{navigator.userAgent.includes("jsdom")||(e=document.createElement("canvas").getContext("2d",{willReadFrequently:!0}))}catch{}if(!e)return()=>!1;const n=25,t=20,i=Math.floor(n/2);return e.font=i+"px Arial, Sans-Serif",e.textBaseline="top",e.canvas.width=t*2,e.canvas.height=n,r=>{e.clearRect(0,0,t*2,n),e.fillStyle="#FF0000",e.fillText(r,0,22),e.fillStyle="#0000FF",e.fillText(r,t,22);const a=e.getImageData(0,0,t,n).data,o=a.length;let l=0;for(;l=o)return!1;const f=t+l/4%t,c=Math.floor(l/4/t),h=e.getImageData(f,c,1,1).data;return!(a[l]!==h[0]||a[l+2]!==h[2]||e.measureText(r).width>=t)}})();var I$={latestVersion:w9e,noCountryFlags:k9e};const _6=["+1","grinning","kissing_heart","heart_eyes","laughing","stuck_out_tongue_winking_eye","sweat_smile","joy","scream","disappointed","unamused","weary","sob","sunglasses","heart"];let Ii=null;function x9e(e){Ii||(Ii=sl.get("frequently")||{});const n=e.id||e;n&&(Ii[n]||(Ii[n]=0),Ii[n]+=1,sl.set("last",n),sl.set("frequently",Ii))}function S9e({maxFrequentRows:e,perLine:n}){if(!e)return[];Ii||(Ii=sl.get("frequently"));let t=[];if(!Ii){Ii={};for(let a in _6.slice(0,n)){const o=_6[a];Ii[o]=n-a,t.push(o)}return t}const i=e*n,r=sl.get("last");for(let a in Ii)t.push(a);if(t.sort((a,o)=>{const l=Ii[o],f=Ii[a];return l==f?a.localeCompare(o):l-f}),t.length>i){const a=t.slice(i);t=t.slice(0,i);for(let o of a)o!=r&&delete Ii[o];r&&t.indexOf(r)==-1&&(delete Ii[t[t.length-1]],t.splice(-1,1,r)),sl.set("frequently",Ii)}return t}var LW={add:x9e,get:S9e,DEFAULTS:_6},IW={};IW=JSON.parse('{"search":"Search","search_no_results_1":"Oh no!","search_no_results_2":"That emoji couldn’t be found","pick":"Pick an emoji…","add_custom":"Add custom emoji","categories":{"activity":"Activity","custom":"Custom","flags":"Flags","foods":"Food & Drink","frequent":"Frequently used","nature":"Animals & Nature","objects":"Objects","people":"Smileys & People","places":"Travel & Places","search":"Search Results","symbols":"Symbols"},"skins":{"1":"Default","2":"Light","3":"Medium-Light","4":"Medium","5":"Medium-Dark","6":"Dark","choose":"Choose default skin tone"}}');var Ho={autoFocus:{value:!1},dynamicWidth:{value:!1},emojiButtonColors:{value:null},emojiButtonRadius:{value:"100%"},emojiButtonSize:{value:36},emojiSize:{value:24},emojiVersion:{value:15,choices:[1,2,3,4,5,11,12,12.1,13,13.1,14,15]},exceptEmojis:{value:[]},icons:{value:"auto",choices:["auto","outline","solid"]},locale:{value:"en",choices:["en","ar","be","cs","de","es","fa","fi","fr","hi","it","ja","ko","nl","pl","pt","ru","sa","tr","uk","vi","zh"]},maxFrequentRows:{value:4},navPosition:{value:"top",choices:["top","bottom","none"]},noCountryFlags:{value:!1},noResultsEmoji:{value:null},perLine:{value:9},previewEmoji:{value:null},previewPosition:{value:"bottom",choices:["top","bottom","none"]},searchPosition:{value:"sticky",choices:["sticky","static","none"]},set:{value:"native",choices:["native","apple","facebook","google","twitter"]},skin:{value:1,choices:[1,2,3,4,5,6]},skinTonePosition:{value:"preview",choices:["preview","search","none"]},theme:{value:"auto",choices:["auto","light","dark"]},categories:null,categoryIcons:null,custom:null,data:null,i18n:null,getImageURL:null,getSpritesheetURL:null,onAddCustomEmoji:null,onClickOutside:null,onEmojiSelect:null,stickySearch:{deprecated:!0,value:!0}};let Yi=null,Xn=null;const rS={};async function B$(e){if(rS[e])return rS[e];const t=await(await fetch(e)).json();return rS[e]=t,t}let aS=null,BW=null,FW=!1;function eb(e,{caller:n}={}){return aS||(aS=new Promise(t=>{BW=t})),e?C9e(e):n&&!FW&&console.warn(`\`${n}\` requires data to be initialized first. Promise will be pending until \`init\` is called.`),aS}async function C9e(e){FW=!0;let{emojiVersion:n,set:t,locale:i}=e;if(n||(n=Ho.emojiVersion.value),t||(t=Ho.set.value),i||(i=Ho.locale.value),Xn)Xn.categories=Xn.categories.filter(f=>!f.name);else{Xn=(typeof e.data=="function"?await e.data():e.data)||await B$(`https://cdn.jsdelivr.net/npm/@emoji-mart/data@latest/sets/${n}/${t}.json`),Xn.emoticons={},Xn.natives={},Xn.categories.unshift({id:"frequent",emojis:[]});for(const f in Xn.aliases){const c=Xn.aliases[f],h=Xn.emojis[c];h&&(h.aliases||(h.aliases=[]),h.aliases.push(f))}Xn.originalCategories=Xn.categories}if(Yi=(typeof e.i18n=="function"?await e.i18n():e.i18n)||(i=="en"?SW(IW):await B$(`https://cdn.jsdelivr.net/npm/@emoji-mart/data@latest/i18n/${i}.json`)),e.custom)for(let f in e.custom){f=parseInt(f);const c=e.custom[f],h=e.custom[f-1];if(!(!c.emojis||!c.emojis.length)){c.id||(c.id=`custom_${f+1}`),c.name||(c.name=Yi.categories.custom),h&&!c.icon&&(c.target=h.target||h),Xn.categories.push(c);for(const d of c.emojis)Xn.emojis[d.id]=d}}e.categories&&(Xn.categories=Xn.originalCategories.filter(f=>e.categories.indexOf(f.id)!=-1).sort((f,c)=>{const h=e.categories.indexOf(f.id),d=e.categories.indexOf(c.id);return h-d}));let r=null,a=null;t=="native"&&(r=I$.latestVersion(),a=e.noCountryFlags||I$.noCountryFlags());let o=Xn.categories.length,l=!1;for(;o--;){const f=Xn.categories[o];if(f.id=="frequent"){let{maxFrequentRows:d,perLine:p}=e;d=d>=0?d:Ho.maxFrequentRows.value,p||(p=Ho.perLine.value),f.emojis=LW.get({maxFrequentRows:d,perLine:p})}if(!f.emojis||!f.emojis.length){Xn.categories.splice(o,1);continue}const{categoryIcons:c}=e;if(c){const d=c[f.id];d&&!f.icon&&(f.icon=d)}let h=f.emojis.length;for(;h--;){const d=f.emojis[h],p=d.id?d:Xn.emojis[d],v=()=>{f.emojis.splice(h,1)};if(!p||e.exceptEmojis&&e.exceptEmojis.includes(p.id)){v();continue}if(r&&p.version>r){v();continue}if(a&&f.id=="flags"&&!T9e.includes(p.id)){v();continue}if(!p.search){if(l=!0,p.search=","+[[p.id,!1],[p.name,!0],[p.keywords,!1],[p.emoticons,!1]].map(([w,k])=>{if(w)return(Array.isArray(w)?w:[w]).map(_=>(k?_.split(/[-|_|\s]+/):[_]).map(C=>C.toLowerCase())).flat()}).flat().filter(w=>w&&w.trim()).join(","),p.emoticons)for(const w of p.emoticons)Xn.emoticons[w]||(Xn.emoticons[w]=p.id);let b=0;for(const w of p.skins){if(!w)continue;b++;const{native:k}=w;k&&(Xn.natives[k]=p.id,p.search+=`,${k}`);const _=b==1?"":`:skin-tone-${b}:`;w.shortcodes=`:${p.id}:${_}`}}}}l&&Kf.reset(),BW()}function qW(e,n,t){e||(e={});const i={};for(let r in n)i[r]=HW(r,e,n,t);return i}function HW(e,n,t,i){const r=t[e];let a=i&&i.getAttribute(e)||(n[e]!=null&&n[e]!=null?n[e]:null);return r&&(a!=null&&r.value&&typeof r.value!=typeof a&&(typeof r.value=="boolean"?a=a!="false":a=r.value.constructor(a)),r.transform&&a&&(a=r.transform(a)),(a==null||r.choices&&r.choices.indexOf(a)==-1)&&(a=r.value)),a}const A9e=/^(?:\:([^\:]+)\:)(?:\:skin-tone-(\d)\:)?$/;let x6=null;function O9e(e){return e.id?e:Xn.emojis[e]||Xn.emojis[Xn.aliases[e]]||Xn.emojis[Xn.natives[e]]}function j9e(){x6=null}async function E9e(e,{maxResults:n,caller:t}={}){if(!e||!e.trim().length)return null;n||(n=90),await eb(null,{caller:t||"SearchIndex.search"});const i=e.toLowerCase().replace(/(\w)-/,"$1 ").split(/[\s|,]+/).filter((l,f,c)=>l.trim()&&c.indexOf(l)==f);if(!i.length)return;let r=x6||(x6=Object.values(Xn.emojis)),a,o;for(const l of i){if(!r.length)break;a=[],o={};for(const f of r){if(!f.search)continue;const c=f.search.indexOf(`,${l}`);c!=-1&&(a.push(f),o[f.id]||(o[f.id]=0),o[f.id]+=f.id==l?0:c+1)}r=a}return a.length<2||(a.sort((l,f)=>{const c=o[l.id],h=o[f.id];return c==h?l.id.localeCompare(f.id):c-h}),a.length>n&&(a=a.slice(0,n))),a}var Kf={search:E9e,get:O9e,reset:j9e,SHORTCODES_REGEX:A9e};const T9e=["checkered_flag","crossed_flags","pirate_flag","rainbow-flag","transgender_flag","triangular_flag_on_post","waving_black_flag","waving_white_flag"];function M9e(e,n){return Array.isArray(e)&&Array.isArray(n)&&e.length===n.length&&e.every((t,i)=>t==n[i])}async function D9e(e=1){for(let n in[...Array(e).keys()])await new Promise(requestAnimationFrame)}function R9e(e,{skinIndex:n=0}={}){const t=e.skins[n]||(n=0,e.skins[n]),i={id:e.id,name:e.name,native:t.native,unified:t.unified,keywords:e.keywords,shortcodes:t.shortcodes||e.shortcodes};return e.skins.length>1&&(i.skin=n+1),t.src&&(i.src=t.src),e.aliases&&e.aliases.length&&(i.aliases=e.aliases),e.emoticons&&e.emoticons.length&&(i.emoticons=e.emoticons),i}const P9e={activity:{outline:$e("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:$e("path",{d:"M12 0C5.373 0 0 5.372 0 12c0 6.627 5.373 12 12 12 6.628 0 12-5.373 12-12 0-6.628-5.372-12-12-12m9.949 11H17.05c.224-2.527 1.232-4.773 1.968-6.113A9.966 9.966 0 0 1 21.949 11M13 11V2.051a9.945 9.945 0 0 1 4.432 1.564c-.858 1.491-2.156 4.22-2.392 7.385H13zm-2 0H8.961c-.238-3.165-1.536-5.894-2.393-7.385A9.95 9.95 0 0 1 11 2.051V11zm0 2v8.949a9.937 9.937 0 0 1-4.432-1.564c.857-1.492 2.155-4.221 2.393-7.385H11zm4.04 0c.236 3.164 1.534 5.893 2.392 7.385A9.92 9.92 0 0 1 13 21.949V13h2.04zM4.982 4.887C5.718 6.227 6.726 8.473 6.951 11h-4.9a9.977 9.977 0 0 1 2.931-6.113M2.051 13h4.9c-.226 2.527-1.233 4.771-1.969 6.113A9.972 9.972 0 0 1 2.051 13m16.967 6.113c-.735-1.342-1.744-3.586-1.968-6.113h4.899a9.961 9.961 0 0 1-2.931 6.113"})}),solid:$e("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",children:$e("path",{d:"M16.17 337.5c0 44.98 7.565 83.54 13.98 107.9C35.22 464.3 50.46 496 174.9 496c9.566 0 19.59-.4707 29.84-1.271L17.33 307.3C16.53 317.6 16.17 327.7 16.17 337.5zM495.8 174.5c0-44.98-7.565-83.53-13.98-107.9c-4.688-17.54-18.34-31.23-36.04-35.95C435.5 27.91 392.9 16 337 16c-9.564 0-19.59 .4707-29.84 1.271l187.5 187.5C495.5 194.4 495.8 184.3 495.8 174.5zM26.77 248.8l236.3 236.3c142-36.1 203.9-150.4 222.2-221.1L248.9 26.87C106.9 62.96 45.07 177.2 26.77 248.8zM256 335.1c0 9.141-7.474 16-16 16c-4.094 0-8.188-1.564-11.31-4.689L164.7 283.3C161.6 280.2 160 276.1 160 271.1c0-8.529 6.865-16 16-16c4.095 0 8.189 1.562 11.31 4.688l64.01 64C254.4 327.8 256 331.9 256 335.1zM304 287.1c0 9.141-7.474 16-16 16c-4.094 0-8.188-1.564-11.31-4.689L212.7 235.3C209.6 232.2 208 228.1 208 223.1c0-9.141 7.473-16 16-16c4.094 0 8.188 1.562 11.31 4.688l64.01 64.01C302.5 279.8 304 283.9 304 287.1zM256 175.1c0-9.141 7.473-16 16-16c4.094 0 8.188 1.562 11.31 4.688l64.01 64.01c3.125 3.125 4.688 7.219 4.688 11.31c0 9.133-7.468 16-16 16c-4.094 0-8.189-1.562-11.31-4.688l-64.01-64.01C257.6 184.2 256 180.1 256 175.1z"})})},custom:$e("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512",children:$e("path",{d:"M417.1 368c-5.937 10.27-16.69 16-27.75 16c-5.422 0-10.92-1.375-15.97-4.281L256 311.4V448c0 17.67-14.33 32-31.1 32S192 465.7 192 448V311.4l-118.3 68.29C68.67 382.6 63.17 384 57.75 384c-11.06 0-21.81-5.734-27.75-16c-8.828-15.31-3.594-34.88 11.72-43.72L159.1 256L41.72 187.7C26.41 178.9 21.17 159.3 29.1 144C36.63 132.5 49.26 126.7 61.65 128.2C65.78 128.7 69.88 130.1 73.72 132.3L192 200.6V64c0-17.67 14.33-32 32-32S256 46.33 256 64v136.6l118.3-68.29c3.838-2.213 7.939-3.539 12.07-4.051C398.7 126.7 411.4 132.5 417.1 144c8.828 15.31 3.594 34.88-11.72 43.72L288 256l118.3 68.28C421.6 333.1 426.8 352.7 417.1 368z"})}),flags:{outline:$e("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:$e("path",{d:"M0 0l6.084 24H8L1.916 0zM21 5h-4l-1-4H4l3 12h3l1 4h13L21 5zM6.563 3h7.875l2 8H8.563l-2-8zm8.832 10l-2.856 1.904L12.063 13h3.332zM19 13l-1.5-6h1.938l2 8H16l3-2z"})}),solid:$e("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",children:$e("path",{d:"M64 496C64 504.8 56.75 512 48 512h-32C7.25 512 0 504.8 0 496V32c0-17.75 14.25-32 32-32s32 14.25 32 32V496zM476.3 0c-6.365 0-13.01 1.35-19.34 4.233c-45.69 20.86-79.56 27.94-107.8 27.94c-59.96 0-94.81-31.86-163.9-31.87C160.9 .3055 131.6 4.867 96 15.75v350.5c32-9.984 59.87-14.1 84.85-14.1c73.63 0 124.9 31.78 198.6 31.78c31.91 0 68.02-5.971 111.1-23.09C504.1 355.9 512 344.4 512 332.1V30.73C512 11.1 495.3 0 476.3 0z"})})},foods:{outline:$e("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:$e("path",{d:"M17 4.978c-1.838 0-2.876.396-3.68.934.513-1.172 1.768-2.934 4.68-2.934a1 1 0 0 0 0-2c-2.921 0-4.629 1.365-5.547 2.512-.064.078-.119.162-.18.244C11.73 1.838 10.798.023 9.207.023 8.579.022 7.85.306 7 .978 5.027 2.54 5.329 3.902 6.492 4.999 3.609 5.222 0 7.352 0 12.969c0 4.582 4.961 11.009 9 11.009 1.975 0 2.371-.486 3-1 .629.514 1.025 1 3 1 4.039 0 9-6.418 9-11 0-5.953-4.055-8-7-8M8.242 2.546c.641-.508.943-.523.965-.523.426.169.975 1.405 1.357 3.055-1.527-.629-2.741-1.352-2.98-1.846.059-.112.241-.356.658-.686M15 21.978c-1.08 0-1.21-.109-1.559-.402l-.176-.146c-.367-.302-.816-.452-1.266-.452s-.898.15-1.266.452l-.176.146c-.347.292-.477.402-1.557.402-2.813 0-7-5.389-7-9.009 0-5.823 4.488-5.991 5-5.991 1.939 0 2.484.471 3.387 1.251l.323.276a1.995 1.995 0 0 0 2.58 0l.323-.276c.902-.78 1.447-1.251 3.387-1.251.512 0 5 .168 5 6 0 3.617-4.187 9-7 9"})}),solid:$e("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",children:$e("path",{d:"M481.9 270.1C490.9 279.1 496 291.3 496 304C496 316.7 490.9 328.9 481.9 337.9C472.9 346.9 460.7 352 448 352H64C51.27 352 39.06 346.9 30.06 337.9C21.06 328.9 16 316.7 16 304C16 291.3 21.06 279.1 30.06 270.1C39.06 261.1 51.27 256 64 256H448C460.7 256 472.9 261.1 481.9 270.1zM475.3 388.7C478.3 391.7 480 395.8 480 400V416C480 432.1 473.3 449.3 461.3 461.3C449.3 473.3 432.1 480 416 480H96C79.03 480 62.75 473.3 50.75 461.3C38.74 449.3 32 432.1 32 416V400C32 395.8 33.69 391.7 36.69 388.7C39.69 385.7 43.76 384 48 384H464C468.2 384 472.3 385.7 475.3 388.7zM50.39 220.8C45.93 218.6 42.03 215.5 38.97 211.6C35.91 207.7 33.79 203.2 32.75 198.4C31.71 193.5 31.8 188.5 32.99 183.7C54.98 97.02 146.5 32 256 32C365.5 32 457 97.02 479 183.7C480.2 188.5 480.3 193.5 479.2 198.4C478.2 203.2 476.1 207.7 473 211.6C469.1 215.5 466.1 218.6 461.6 220.8C457.2 222.9 452.3 224 447.3 224H64.67C59.73 224 54.84 222.9 50.39 220.8zM372.7 116.7C369.7 119.7 368 123.8 368 128C368 131.2 368.9 134.3 370.7 136.9C372.5 139.5 374.1 141.6 377.9 142.8C380.8 143.1 384 144.3 387.1 143.7C390.2 143.1 393.1 141.6 395.3 139.3C397.6 137.1 399.1 134.2 399.7 131.1C400.3 128 399.1 124.8 398.8 121.9C397.6 118.1 395.5 116.5 392.9 114.7C390.3 112.9 387.2 111.1 384 111.1C379.8 111.1 375.7 113.7 372.7 116.7V116.7zM244.7 84.69C241.7 87.69 240 91.76 240 96C240 99.16 240.9 102.3 242.7 104.9C244.5 107.5 246.1 109.6 249.9 110.8C252.8 111.1 256 112.3 259.1 111.7C262.2 111.1 265.1 109.6 267.3 107.3C269.6 105.1 271.1 102.2 271.7 99.12C272.3 96.02 271.1 92.8 270.8 89.88C269.6 86.95 267.5 84.45 264.9 82.7C262.3 80.94 259.2 79.1 256 79.1C251.8 79.1 247.7 81.69 244.7 84.69V84.69zM116.7 116.7C113.7 119.7 112 123.8 112 128C112 131.2 112.9 134.3 114.7 136.9C116.5 139.5 118.1 141.6 121.9 142.8C124.8 143.1 128 144.3 131.1 143.7C134.2 143.1 137.1 141.6 139.3 139.3C141.6 137.1 143.1 134.2 143.7 131.1C144.3 128 143.1 124.8 142.8 121.9C141.6 118.1 139.5 116.5 136.9 114.7C134.3 112.9 131.2 111.1 128 111.1C123.8 111.1 119.7 113.7 116.7 116.7L116.7 116.7z"})})},frequent:{outline:$e("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[$e("path",{d:"M13 4h-2l-.001 7H9v2h2v2h2v-2h4v-2h-4z"}),$e("path",{d:"M12 0C5.373 0 0 5.373 0 12s5.373 12 12 12 12-5.373 12-12S18.627 0 12 0m0 22C6.486 22 2 17.514 2 12S6.486 2 12 2s10 4.486 10 10-4.486 10-10 10"})]}),solid:$e("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",children:$e("path",{d:"M256 512C114.6 512 0 397.4 0 256C0 114.6 114.6 0 256 0C397.4 0 512 114.6 512 256C512 397.4 397.4 512 256 512zM232 256C232 264 236 271.5 242.7 275.1L338.7 339.1C349.7 347.3 364.6 344.3 371.1 333.3C379.3 322.3 376.3 307.4 365.3 300L280 243.2V120C280 106.7 269.3 96 255.1 96C242.7 96 231.1 106.7 231.1 120L232 256z"})})},nature:{outline:$e("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[$e("path",{d:"M15.5 8a1.5 1.5 0 1 0 .001 3.001A1.5 1.5 0 0 0 15.5 8M8.5 8a1.5 1.5 0 1 0 .001 3.001A1.5 1.5 0 0 0 8.5 8"}),$e("path",{d:"M18.933 0h-.027c-.97 0-2.138.787-3.018 1.497-1.274-.374-2.612-.51-3.887-.51-1.285 0-2.616.133-3.874.517C7.245.79 6.069 0 5.093 0h-.027C3.352 0 .07 2.67.002 7.026c-.039 2.479.276 4.238 1.04 5.013.254.258.882.677 1.295.882.191 3.177.922 5.238 2.536 6.38.897.637 2.187.949 3.2 1.102C8.04 20.6 8 20.795 8 21c0 1.773 2.35 3 4 3 1.648 0 4-1.227 4-3 0-.201-.038-.393-.072-.586 2.573-.385 5.435-1.877 5.925-7.587.396-.22.887-.568 1.104-.788.763-.774 1.079-2.534 1.04-5.013C23.929 2.67 20.646 0 18.933 0M3.223 9.135c-.237.281-.837 1.155-.884 1.238-.15-.41-.368-1.349-.337-3.291.051-3.281 2.478-4.972 3.091-5.031.256.015.731.27 1.265.646-1.11 1.171-2.275 2.915-2.352 5.125-.133.546-.398.858-.783 1.313M12 22c-.901 0-1.954-.693-2-1 0-.654.475-1.236 1-1.602V20a1 1 0 1 0 2 0v-.602c.524.365 1 .947 1 1.602-.046.307-1.099 1-2 1m3-3.48v.02a4.752 4.752 0 0 0-1.262-1.02c1.092-.516 2.239-1.334 2.239-2.217 0-1.842-1.781-2.195-3.977-2.195-2.196 0-3.978.354-3.978 2.195 0 .883 1.148 1.701 2.238 2.217A4.8 4.8 0 0 0 9 18.539v-.025c-1-.076-2.182-.281-2.973-.842-1.301-.92-1.838-3.045-1.853-6.478l.023-.041c.496-.826 1.49-1.45 1.804-3.102 0-2.047 1.357-3.631 2.362-4.522C9.37 3.178 10.555 3 11.948 3c1.447 0 2.685.192 3.733.57 1 .9 2.316 2.465 2.316 4.48.313 1.651 1.307 2.275 1.803 3.102.035.058.068.117.102.178-.059 5.967-1.949 7.01-4.902 7.19m6.628-8.202c-.037-.065-.074-.13-.113-.195a7.587 7.587 0 0 0-.739-.987c-.385-.455-.648-.768-.782-1.313-.076-2.209-1.241-3.954-2.353-5.124.531-.376 1.004-.63 1.261-.647.636.071 3.044 1.764 3.096 5.031.027 1.81-.347 3.218-.37 3.235"})]}),solid:$e("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 576 512",children:$e("path",{d:"M332.7 19.85C334.6 8.395 344.5 0 356.1 0C363.6 0 370.6 3.52 375.1 9.502L392 32H444.1C456.8 32 469.1 37.06 478.1 46.06L496 64H552C565.3 64 576 74.75 576 88V112C576 156.2 540.2 192 496 192H426.7L421.6 222.5L309.6 158.5L332.7 19.85zM448 64C439.2 64 432 71.16 432 80C432 88.84 439.2 96 448 96C456.8 96 464 88.84 464 80C464 71.16 456.8 64 448 64zM416 256.1V480C416 497.7 401.7 512 384 512H352C334.3 512 320 497.7 320 480V364.8C295.1 377.1 268.8 384 240 384C211.2 384 184 377.1 160 364.8V480C160 497.7 145.7 512 128 512H96C78.33 512 64 497.7 64 480V249.8C35.23 238.9 12.64 214.5 4.836 183.3L.9558 167.8C-3.331 150.6 7.094 133.2 24.24 128.1C41.38 124.7 58.76 135.1 63.05 152.2L66.93 167.8C70.49 182 83.29 191.1 97.97 191.1H303.8L416 256.1z"})})},objects:{outline:$e("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[$e("path",{d:"M12 0a9 9 0 0 0-5 16.482V21s2.035 3 5 3 5-3 5-3v-4.518A9 9 0 0 0 12 0zm0 2c3.86 0 7 3.141 7 7s-3.14 7-7 7-7-3.141-7-7 3.14-7 7-7zM9 17.477c.94.332 1.946.523 3 .523s2.06-.19 3-.523v.834c-.91.436-1.925.689-3 .689a6.924 6.924 0 0 1-3-.69v-.833zm.236 3.07A8.854 8.854 0 0 0 12 21c.965 0 1.888-.167 2.758-.451C14.155 21.173 13.153 22 12 22c-1.102 0-2.117-.789-2.764-1.453z"}),$e("path",{d:"M14.745 12.449h-.004c-.852-.024-1.188-.858-1.577-1.824-.421-1.061-.703-1.561-1.182-1.566h-.009c-.481 0-.783.497-1.235 1.537-.436.982-.801 1.811-1.636 1.791l-.276-.043c-.565-.171-.853-.691-1.284-1.794-.125-.313-.202-.632-.27-.913-.051-.213-.127-.53-.195-.634C7.067 9.004 7.039 9 6.99 9A1 1 0 0 1 7 7h.01c1.662.017 2.015 1.373 2.198 2.134.486-.981 1.304-2.058 2.797-2.075 1.531.018 2.28 1.153 2.731 2.141l.002-.008C14.944 8.424 15.327 7 16.979 7h.032A1 1 0 1 1 17 9h-.011c-.149.076-.256.474-.319.709a6.484 6.484 0 0 1-.311.951c-.429.973-.79 1.789-1.614 1.789"})]}),solid:$e("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 384 512",children:$e("path",{d:"M112.1 454.3c0 6.297 1.816 12.44 5.284 17.69l17.14 25.69c5.25 7.875 17.17 14.28 26.64 14.28h61.67c9.438 0 21.36-6.401 26.61-14.28l17.08-25.68c2.938-4.438 5.348-12.37 5.348-17.7L272 415.1h-160L112.1 454.3zM191.4 .0132C89.44 .3257 16 82.97 16 175.1c0 44.38 16.44 84.84 43.56 115.8c16.53 18.84 42.34 58.23 52.22 91.45c.0313 .25 .0938 .5166 .125 .7823h160.2c.0313-.2656 .0938-.5166 .125-.7823c9.875-33.22 35.69-72.61 52.22-91.45C351.6 260.8 368 220.4 368 175.1C368 78.61 288.9-.2837 191.4 .0132zM192 96.01c-44.13 0-80 35.89-80 79.1C112 184.8 104.8 192 96 192S80 184.8 80 176c0-61.76 50.25-111.1 112-111.1c8.844 0 16 7.159 16 16S200.8 96.01 192 96.01z"})})},people:{outline:$e("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[$e("path",{d:"M12 0C5.373 0 0 5.373 0 12s5.373 12 12 12 12-5.373 12-12S18.627 0 12 0m0 22C6.486 22 2 17.514 2 12S6.486 2 12 2s10 4.486 10 10-4.486 10-10 10"}),$e("path",{d:"M8 7a2 2 0 1 0-.001 3.999A2 2 0 0 0 8 7M16 7a2 2 0 1 0-.001 3.999A2 2 0 0 0 16 7M15.232 15c-.693 1.195-1.87 2-3.349 2-1.477 0-2.655-.805-3.347-2H15m3-2H6a6 6 0 1 0 12 0"})]}),solid:$e("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",children:$e("path",{d:"M0 256C0 114.6 114.6 0 256 0C397.4 0 512 114.6 512 256C512 397.4 397.4 512 256 512C114.6 512 0 397.4 0 256zM256 432C332.1 432 396.2 382 415.2 314.1C419.1 300.4 407.8 288 393.6 288H118.4C104.2 288 92.92 300.4 96.76 314.1C115.8 382 179.9 432 256 432V432zM176.4 160C158.7 160 144.4 174.3 144.4 192C144.4 209.7 158.7 224 176.4 224C194 224 208.4 209.7 208.4 192C208.4 174.3 194 160 176.4 160zM336.4 224C354 224 368.4 209.7 368.4 192C368.4 174.3 354 160 336.4 160C318.7 160 304.4 174.3 304.4 192C304.4 209.7 318.7 224 336.4 224z"})})},places:{outline:$e("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[$e("path",{d:"M6.5 12C5.122 12 4 13.121 4 14.5S5.122 17 6.5 17 9 15.879 9 14.5 7.878 12 6.5 12m0 3c-.275 0-.5-.225-.5-.5s.225-.5.5-.5.5.225.5.5-.225.5-.5.5M17.5 12c-1.378 0-2.5 1.121-2.5 2.5s1.122 2.5 2.5 2.5 2.5-1.121 2.5-2.5-1.122-2.5-2.5-2.5m0 3c-.275 0-.5-.225-.5-.5s.225-.5.5-.5.5.225.5.5-.225.5-.5.5"}),$e("path",{d:"M22.482 9.494l-1.039-.346L21.4 9h.6c.552 0 1-.439 1-.992 0-.006-.003-.008-.003-.008H23c0-1-.889-2-1.984-2h-.642l-.731-1.717C19.262 3.012 18.091 2 16.764 2H7.236C5.909 2 4.738 3.012 4.357 4.283L3.626 6h-.642C1.889 6 1 7 1 8h.003S1 8.002 1 8.008C1 8.561 1.448 9 2 9h.6l-.043.148-1.039.346a2.001 2.001 0 0 0-1.359 2.097l.751 7.508a1 1 0 0 0 .994.901H3v1c0 1.103.896 2 2 2h2c1.104 0 2-.897 2-2v-1h6v1c0 1.103.896 2 2 2h2c1.104 0 2-.897 2-2v-1h1.096a.999.999 0 0 0 .994-.901l.751-7.508a2.001 2.001 0 0 0-1.359-2.097M6.273 4.857C6.402 4.43 6.788 4 7.236 4h9.527c.448 0 .834.43.963.857L19.313 9H4.688l1.585-4.143zM7 21H5v-1h2v1zm12 0h-2v-1h2v1zm2.189-3H2.811l-.662-6.607L3 11h18l.852.393L21.189 18z"})]}),solid:$e("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",children:$e("path",{d:"M39.61 196.8L74.8 96.29C88.27 57.78 124.6 32 165.4 32H346.6C387.4 32 423.7 57.78 437.2 96.29L472.4 196.8C495.6 206.4 512 229.3 512 256V448C512 465.7 497.7 480 480 480H448C430.3 480 416 465.7 416 448V400H96V448C96 465.7 81.67 480 64 480H32C14.33 480 0 465.7 0 448V256C0 229.3 16.36 206.4 39.61 196.8V196.8zM109.1 192H402.9L376.8 117.4C372.3 104.6 360.2 96 346.6 96H165.4C151.8 96 139.7 104.6 135.2 117.4L109.1 192zM96 256C78.33 256 64 270.3 64 288C64 305.7 78.33 320 96 320C113.7 320 128 305.7 128 288C128 270.3 113.7 256 96 256zM416 320C433.7 320 448 305.7 448 288C448 270.3 433.7 256 416 256C398.3 256 384 270.3 384 288C384 305.7 398.3 320 416 320z"})})},symbols:{outline:$e("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:$e("path",{d:"M0 0h11v2H0zM4 11h3V6h4V4H0v2h4zM15.5 17c1.381 0 2.5-1.116 2.5-2.493s-1.119-2.493-2.5-2.493S13 13.13 13 14.507 14.119 17 15.5 17m0-2.986c.276 0 .5.222.5.493 0 .272-.224.493-.5.493s-.5-.221-.5-.493.224-.493.5-.493M21.5 19.014c-1.381 0-2.5 1.116-2.5 2.493S20.119 24 21.5 24s2.5-1.116 2.5-2.493-1.119-2.493-2.5-2.493m0 2.986a.497.497 0 0 1-.5-.493c0-.271.224-.493.5-.493s.5.222.5.493a.497.497 0 0 1-.5.493M22 13l-9 9 1.513 1.5 8.99-9.009zM17 11c2.209 0 4-1.119 4-2.5V2s.985-.161 1.498.949C23.01 4.055 23 6 23 6s1-1.119 1-3.135C24-.02 21 0 21 0h-2v6.347A5.853 5.853 0 0 0 17 6c-2.209 0-4 1.119-4 2.5s1.791 2.5 4 2.5M10.297 20.482l-1.475-1.585a47.54 47.54 0 0 1-1.442 1.129c-.307-.288-.989-1.016-2.045-2.183.902-.836 1.479-1.466 1.729-1.892s.376-.871.376-1.336c0-.592-.273-1.178-.818-1.759-.546-.581-1.329-.871-2.349-.871-1.008 0-1.79.293-2.344.879-.556.587-.832 1.181-.832 1.784 0 .813.419 1.748 1.256 2.805-.847.614-1.444 1.208-1.794 1.784a3.465 3.465 0 0 0-.523 1.833c0 .857.308 1.56.924 2.107.616.549 1.423.823 2.42.823 1.173 0 2.444-.379 3.813-1.137L8.235 24h2.819l-2.09-2.383 1.333-1.135zm-6.736-6.389a1.02 1.02 0 0 1 .73-.286c.31 0 .559.085.747.254a.849.849 0 0 1 .283.659c0 .518-.419 1.112-1.257 1.784-.536-.651-.805-1.231-.805-1.742a.901.901 0 0 1 .302-.669M3.74 22c-.427 0-.778-.116-1.057-.349-.279-.232-.418-.487-.418-.766 0-.594.509-1.288 1.527-2.083.968 1.134 1.717 1.946 2.248 2.438-.921.507-1.686.76-2.3.76"})}),solid:$e("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",children:$e("path",{d:"M500.3 7.251C507.7 13.33 512 22.41 512 31.1V175.1C512 202.5 483.3 223.1 447.1 223.1C412.7 223.1 383.1 202.5 383.1 175.1C383.1 149.5 412.7 127.1 447.1 127.1V71.03L351.1 90.23V207.1C351.1 234.5 323.3 255.1 287.1 255.1C252.7 255.1 223.1 234.5 223.1 207.1C223.1 181.5 252.7 159.1 287.1 159.1V63.1C287.1 48.74 298.8 35.61 313.7 32.62L473.7 .6198C483.1-1.261 492.9 1.173 500.3 7.251H500.3zM74.66 303.1L86.5 286.2C92.43 277.3 102.4 271.1 113.1 271.1H174.9C185.6 271.1 195.6 277.3 201.5 286.2L213.3 303.1H239.1C266.5 303.1 287.1 325.5 287.1 351.1V463.1C287.1 490.5 266.5 511.1 239.1 511.1H47.1C21.49 511.1-.0019 490.5-.0019 463.1V351.1C-.0019 325.5 21.49 303.1 47.1 303.1H74.66zM143.1 359.1C117.5 359.1 95.1 381.5 95.1 407.1C95.1 434.5 117.5 455.1 143.1 455.1C170.5 455.1 191.1 434.5 191.1 407.1C191.1 381.5 170.5 359.1 143.1 359.1zM440.3 367.1H496C502.7 367.1 508.6 372.1 510.1 378.4C513.3 384.6 511.6 391.7 506.5 396L378.5 508C372.9 512.1 364.6 513.3 358.6 508.9C352.6 504.6 350.3 496.6 353.3 489.7L391.7 399.1H336C329.3 399.1 323.4 395.9 321 389.6C318.7 383.4 320.4 376.3 325.5 371.1L453.5 259.1C459.1 255 467.4 254.7 473.4 259.1C479.4 263.4 481.6 271.4 478.7 278.3L440.3 367.1zM116.7 219.1L19.85 119.2C-8.112 90.26-6.614 42.31 24.85 15.34C51.82-8.137 93.26-3.642 118.2 21.83L128.2 32.32L137.7 21.83C162.7-3.642 203.6-8.137 231.6 15.34C262.6 42.31 264.1 90.26 236.1 119.2L139.7 219.1C133.2 225.6 122.7 225.6 116.7 219.1H116.7z"})})}},N9e={loupe:$e("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",children:$e("path",{d:"M12.9 14.32a8 8 0 1 1 1.41-1.41l5.35 5.33-1.42 1.42-5.33-5.34zM8 14A6 6 0 1 0 8 2a6 6 0 0 0 0 12z"})}),delete:$e("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",children:$e("path",{d:"M10 8.586L2.929 1.515 1.515 2.929 8.586 10l-7.071 7.071 1.414 1.414L10 11.414l7.071 7.071 1.414-1.414L11.414 10l7.071-7.071-1.414-1.414L10 8.586z"})})};var ey={categories:P9e,search:N9e};function S6(e){let{id:n,skin:t,emoji:i}=e;if(e.shortcodes){const l=e.shortcodes.match(Kf.SHORTCODES_REGEX);l&&(n=l[1],l[2]&&(t=l[2]))}if(i||(i=Kf.get(n||e.native)),!i)return e.fallback;const r=i.skins[t-1]||i.skins[0],a=r.src||(e.set!="native"&&!e.spritesheet?typeof e.getImageURL=="function"?e.getImageURL(e.set,r.unified):`https://cdn.jsdelivr.net/npm/emoji-datasource-${e.set}@15.0.1/img/${e.set}/64/${r.unified}.png`:void 0),o=typeof e.getSpritesheetURL=="function"?e.getSpritesheetURL(e.set):`https://cdn.jsdelivr.net/npm/emoji-datasource-${e.set}@15.0.1/img/${e.set}/sheets-256/64.png`;return $e("span",{class:"emoji-mart-emoji","data-emoji-set":e.set,children:a?$e("img",{style:{maxWidth:e.size||"1em",maxHeight:e.size||"1em",display:"inline-block"},alt:r.native||r.shortcodes,src:a}):e.set=="native"?$e("span",{style:{fontSize:e.size,fontFamily:'"EmojiMart", "Segoe UI Emoji", "Segoe UI Symbol", "Segoe UI", "Apple Color Emoji", "Twemoji Mozilla", "Noto Color Emoji", "Android Emoji"'},children:r.native}):$e("span",{style:{display:"block",width:e.size,height:e.size,backgroundImage:`url(${o})`,backgroundSize:`${100*Xn.sheet.cols}% ${100*Xn.sheet.rows}%`,backgroundPosition:`${100/(Xn.sheet.cols-1)*r.x}% ${100/(Xn.sheet.rows-1)*r.y}%`}})})}const $9e=typeof window<"u"&&window.HTMLElement?window.HTMLElement:Object;class UW extends $9e{static get observedAttributes(){return Object.keys(this.Props)}update(n={}){for(let t in n)this.attributeChangedCallback(t,null,n[t])}attributeChangedCallback(n,t,i){if(!this.component)return;const r=HW(n,{[n]:i},this.constructor.Props,this);this.component.componentWillReceiveProps?this.component.componentWillReceiveProps({[n]:r}):(this.component.props[n]=r,this.component.forceUpdate())}disconnectedCallback(){this.disconnected=!0,this.component&&this.component.unregister&&this.component.unregister()}constructor(n={}){if(super(),this.props=n,n.parent||n.ref){let t=null;const i=n.parent||(t=n.ref&&n.ref.current);t&&(t.innerHTML=""),i&&i.appendChild(this)}}}class z9e extends UW{setShadow(){this.attachShadow({mode:"open"})}injectStyles(n){if(!n)return;const t=document.createElement("style");t.textContent=n,this.shadowRoot.insertBefore(t,this.shadowRoot.firstChild)}constructor(n,{styles:t}={}){super(n),this.setShadow(),this.injectStyles(t)}}var VW={fallback:"",id:"",native:"",shortcodes:"",size:{value:"",transform:e=>/\D/.test(e)?e:`${e}px`},set:Ho.set,skin:Ho.skin};class WW extends UW{async connectedCallback(){const n=qW(this.props,VW,this);n.element=this,n.ref=t=>{this.component=t},await eb(),!this.disconnected&&$W($e(S6,{...n}),this)}constructor(n){super(n)}}ua(WW,"Props",VW);typeof customElements<"u"&&!customElements.get("em-emoji")&&customElements.define("em-emoji",WW);var F$,C6=[],q$=xn.__b,H$=xn.__r,U$=xn.diffed,V$=xn.__c,W$=xn.unmount;function L9e(){var e;for(C6.sort(function(n,t){return n.__v.__b-t.__v.__b});e=C6.pop();)if(e.__P)try{e.__H.__h.forEach(xg),e.__H.__h.forEach(A6),e.__H.__h=[]}catch(n){e.__H.__h=[],xn.__e(n,e.__v)}}xn.__b=function(e){q$&&q$(e)},xn.__r=function(e){H$&&H$(e);var n=e.__c.__H;n&&(n.__h.forEach(xg),n.__h.forEach(A6),n.__h=[])},xn.diffed=function(e){U$&&U$(e);var n=e.__c;n&&n.__H&&n.__H.__h.length&&(C6.push(n)!==1&&F$===xn.requestAnimationFrame||((F$=xn.requestAnimationFrame)||function(t){var i,r=function(){clearTimeout(a),G$&&cancelAnimationFrame(i),setTimeout(t)},a=setTimeout(r,100);G$&&(i=requestAnimationFrame(r))})(L9e))},xn.__c=function(e,n){n.some(function(t){try{t.__h.forEach(xg),t.__h=t.__h.filter(function(i){return!i.__||A6(i)})}catch(i){n.some(function(r){r.__h&&(r.__h=[])}),n=[],xn.__e(i,t.__v)}}),V$&&V$(e,n)},xn.unmount=function(e){W$&&W$(e);var n,t=e.__c;t&&t.__H&&(t.__H.__.forEach(function(i){try{xg(i)}catch(r){n=r}}),n&&xn.__e(n,t.__v))};var G$=typeof requestAnimationFrame=="function";function xg(e){var n=e.__c;typeof n=="function"&&(e.__c=void 0,n())}function A6(e){e.__c=e.__()}function I9e(e,n){for(var t in n)e[t]=n[t];return e}function Y$(e,n){for(var t in e)if(t!=="__source"&&!(t in n))return!0;for(var i in n)if(i!=="__source"&&e[i]!==n[i])return!0;return!1}function ny(e){this.props=e}(ny.prototype=new co).isPureReactComponent=!0,ny.prototype.shouldComponentUpdate=function(e,n){return Y$(this.props,e)||Y$(this.state,n)};var K$=xn.__b;xn.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),K$&&K$(e)};var B9e=xn.__e;xn.__e=function(e,n,t){if(e.then){for(var i,r=n;r=r.__;)if((i=r.__c)&&i.__c)return n.__e==null&&(n.__e=t.__e,n.__k=t.__k),i.__c(e,n)}B9e(e,n,t)};var X$=xn.unmount;function oS(){this.__u=0,this.t=null,this.__b=null}function GW(e){var n=e.__.__c;return n&&n.__e&&n.__e(e)}function sg(){this.u=null,this.o=null}xn.unmount=function(e){var n=e.__c;n&&n.__R&&n.__R(),n&&e.__h===!0&&(e.type=null),X$&&X$(e)},(oS.prototype=new co).__c=function(e,n){var t=n.__c,i=this;i.t==null&&(i.t=[]),i.t.push(t);var r=GW(i.__v),a=!1,o=function(){a||(a=!0,t.__R=null,r?r(l):l())};t.__R=o;var l=function(){if(!--i.__u){if(i.state.__e){var c=i.state.__e;i.__v.__k[0]=(function d(p,v,b){return p&&(p.__v=null,p.__k=p.__k&&p.__k.map(function(w){return d(w,v,b)}),p.__c&&p.__c.__P===v&&(p.__e&&b.insertBefore(p.__e,p.__d),p.__c.__e=!0,p.__c.__P=b)),p})(c,c.__c.__P,c.__c.__O)}var h;for(i.setState({__e:i.__b=null});h=i.t.pop();)h.forceUpdate()}},f=n.__h===!0;i.__u++||f||i.setState({__e:i.__b=i.__v.__k[0]}),e.then(o,o)},oS.prototype.componentWillUnmount=function(){this.t=[]},oS.prototype.render=function(e,n){if(this.__b){if(this.__v.__k){var t=document.createElement("div"),i=this.__v.__k[0].__c;this.__v.__k[0]=(function a(o,l,f){return o&&(o.__c&&o.__c.__H&&(o.__c.__H.__.forEach(function(c){typeof c.__c=="function"&&c.__c()}),o.__c.__H=null),(o=I9e({},o)).__c!=null&&(o.__c.__P===f&&(o.__c.__P=l),o.__c=null),o.__k=o.__k&&o.__k.map(function(c){return a(c,l,f)})),o})(this.__b,t,i.__O=i.__P)}this.__b=null}var r=n.__e&&k6(Ec,null,e.fallback);return r&&(r.__h=null),[k6(Ec,null,n.__e?null:e.children),r]};var Z$=function(e,n,t){if(++t[1]===t[0]&&e.o.delete(n),e.props.revealOrder&&(e.props.revealOrder[0]!=="t"||!e.o.size))for(t=e.u;t;){for(;t.length>3;)t.pop()();if(t[1]{const r=t.name||Yi.categories[t.id],a=!this.props.unfocused&&t.id==this.state.categoryId;return a&&(n=i),$e("button",{"aria-label":r,"aria-selected":a||void 0,title:r,type:"button",class:"flex flex-grow flex-center",onMouseDown:o=>o.preventDefault(),onClick:()=>{this.props.onClick({category:t,i})},children:this.renderIcon(t)})}),$e("div",{class:"bar",style:{width:`${100/this.categories.length}%`,opacity:n==null?0:1,transform:this.props.dir==="rtl"?`scaleX(-1) translateX(${n*100}%)`:`translateX(${n*100}%)`}})]})})}constructor(){super(),this.categories=Xn.categories.filter(n=>!n.target),this.state={categoryId:this.categories[0].id}}}class X9e extends ny{shouldComponentUpdate(n){for(let t in n)if(t!="children"&&n[t]!=this.props[t])return!0;return!1}render(){return this.props.children}}const lg={rowsPerRender:10};class Z9e extends co{getInitialState(n=this.props){return{skin:sl.get("skin")||n.skin,theme:this.initTheme(n.theme)}}componentWillMount(){this.dir=Yi.rtl?"rtl":"ltr",this.refs={menu:Fo(),navigation:Fo(),scroll:Fo(),search:Fo(),searchInput:Fo(),skinToneButton:Fo(),skinToneRadio:Fo()},this.initGrid(),this.props.stickySearch==!1&&this.props.searchPosition=="sticky"&&(console.warn("[EmojiMart] Deprecation warning: `stickySearch` has been renamed `searchPosition`."),this.props.searchPosition="static")}componentDidMount(){if(this.register(),this.shadowRoot=this.base.parentNode,this.props.autoFocus){const{searchInput:n}=this.refs;n.current&&n.current.focus()}}componentWillReceiveProps(n){this.nextState||(this.nextState={});for(const t in n)this.nextState[t]=n[t];clearTimeout(this.nextStateTimer),this.nextStateTimer=setTimeout(()=>{let t=!1;for(const r in this.nextState)this.props[r]=this.nextState[r],(r==="custom"||r==="categories")&&(t=!0);delete this.nextState;const i=this.getInitialState();if(t)return this.reset(i);this.setState(i)})}componentWillUnmount(){this.unregister()}async reset(n={}){await eb(this.props),this.initGrid(),this.unobserve(),this.setState(n,()=>{this.observeCategories(),this.observeRows()})}register(){document.addEventListener("click",this.handleClickOutside),this.observe()}unregister(){var n;document.removeEventListener("click",this.handleClickOutside),(n=this.darkMedia)==null||n.removeEventListener("change",this.darkMediaCallback),this.unobserve()}observe(){this.observeCategories(),this.observeRows()}unobserve({except:n=[]}={}){Array.isArray(n)||(n=[n]);for(const t of this.observers)n.includes(t)||t.disconnect();this.observers=[].concat(n)}initGrid(){const{categories:n}=Xn;this.refs.categories=new Map;const t=Xn.categories.map(r=>r.id).join(",");this.navKey&&this.navKey!=t&&this.refs.scroll.current&&(this.refs.scroll.current.scrollTop=0),this.navKey=t,this.grid=[],this.grid.setsize=0;const i=(r,a)=>{const o=[];o.__categoryId=a.id,o.__index=r.length,this.grid.push(o);const l=this.grid.length-1,f=l%lg.rowsPerRender?{}:Fo();return f.index=l,f.posinset=this.grid.setsize+1,r.push(f),o};for(let r of n){const a=[];let o=i(a,r);for(let l of r.emojis)o.length==this.getPerLine()&&(o=i(a,r)),this.grid.setsize+=1,o.push(l);this.refs.categories.set(r.id,{root:Fo(),rows:a})}}initTheme(n){if(n!="auto")return n;if(!this.darkMedia){if(this.darkMedia=matchMedia("(prefers-color-scheme: dark)"),this.darkMedia.media.match(/^not/))return"light";this.darkMedia.addEventListener("change",this.darkMediaCallback)}return this.darkMedia.matches?"dark":"light"}initDynamicPerLine(n=this.props){if(!n.dynamicWidth)return;const{element:t,emojiButtonSize:i}=n,r=()=>{const{width:o}=t.getBoundingClientRect();return Math.floor(o/i)},a=new ResizeObserver(()=>{this.unobserve({except:a}),this.setState({perLine:r()},()=>{this.initGrid(),this.forceUpdate(()=>{this.observeCategories(),this.observeRows()})})});return a.observe(t),this.observers.push(a),r()}getPerLine(){return this.state.perLine||this.props.perLine}getEmojiByPos([n,t]){const i=this.state.searchResults||this.grid,r=i[n]&&i[n][t];if(r)return Kf.get(r)}observeCategories(){const n=this.refs.navigation.current;if(!n)return;const t=new Map,i=o=>{o!=n.state.categoryId&&n.setState({categoryId:o})},r={root:this.refs.scroll.current,threshold:[0,1]},a=new IntersectionObserver(o=>{for(const f of o){const c=f.target.dataset.id;t.set(c,f.intersectionRatio)}const l=[...t];for(const[f,c]of l)if(c){i(f);break}},r);for(const{root:o}of this.refs.categories.values())a.observe(o.current);this.observers.push(a)}observeRows(){const n={...this.state.visibleRows},t=new IntersectionObserver(i=>{for(const r of i){const a=parseInt(r.target.dataset.index);r.isIntersecting?n[a]=!0:delete n[a]}this.setState({visibleRows:n})},{root:this.refs.scroll.current,rootMargin:`${this.props.emojiButtonSize*(lg.rowsPerRender+5)}px 0px ${this.props.emojiButtonSize*lg.rowsPerRender}px`});for(const{rows:i}of this.refs.categories.values())for(const r of i)r.current&&t.observe(r.current);this.observers.push(t)}preventDefault(n){n.preventDefault()}unfocusSearch(){const n=this.refs.searchInput.current;n&&n.blur()}navigate({e:n,input:t,left:i,right:r,up:a,down:o}){const l=this.state.searchResults||this.grid;if(!l.length)return;let[f,c]=this.state.pos;const h=(()=>{if(f==0&&c==0&&!n.repeat&&(i||a))return null;if(f==-1)return!n.repeat&&(r||o)&&t.selectionStart==t.value.length?[0,0]:null;if(i||r){let d=l[f];const p=i?-1:1;if(c+=p,!d[c]){if(f+=p,d=l[f],!d)return f=i?0:l.length-1,c=i?0:l[f].length-1,[f,c];c=i?d.length-1:0}return[f,c]}if(a||o){f+=a?-1:1;const d=l[f];return d?(d[c]||(c=d.length-1),[f,c]):(f=a?0:l.length-1,c=a?0:l[f].length-1,[f,c])}})();if(h)n.preventDefault();else{this.state.pos[0]>-1&&this.setState({pos:[-1,-1]});return}this.setState({pos:h,keyboard:!0},()=>{this.scrollTo({row:h[0]})})}scrollTo({categoryId:n,row:t}){const i=this.state.searchResults||this.grid;if(!i.length)return;const r=this.refs.scroll.current,a=r.getBoundingClientRect();let o=0;if(t>=0&&(n=i[t].__categoryId),n&&(o=(this.refs[n]||this.refs.categories.get(n).root).current.getBoundingClientRect().top-(a.top-r.scrollTop)+1),t>=0)if(!t)o=0;else{const l=i[t].__index,f=o+l*this.props.emojiButtonSize,c=f+this.props.emojiButtonSize+this.props.emojiButtonSize*.88;if(fr.scrollTop+a.height)o=c-a.height;else return}this.ignoreMouse(),r.scrollTop=o}ignoreMouse(){this.mouseIsIgnored=!0,clearTimeout(this.ignoreMouseTimer),this.ignoreMouseTimer=setTimeout(()=>{delete this.mouseIsIgnored},100)}handleEmojiOver(n){this.mouseIsIgnored||this.state.showSkins||this.setState({pos:n||[-1,-1],keyboard:!1})}handleEmojiClick({e:n,emoji:t,pos:i}){if(this.props.onEmojiSelect&&(!t&&i&&(t=this.getEmojiByPos(i)),t)){const r=R9e(t,{skinIndex:this.state.skin-1});this.props.maxFrequentRows&&LW.add(r,this.props),this.props.onEmojiSelect(r,n)}}closeSkins(){this.state.showSkins&&(this.setState({showSkins:null,tempSkin:null}),this.base.removeEventListener("click",this.handleBaseClick),this.base.removeEventListener("keydown",this.handleBaseKeydown))}handleSkinMouseOver(n){this.setState({tempSkin:n})}handleSkinClick(n){this.ignoreMouse(),this.closeSkins(),this.setState({skin:n,tempSkin:null}),sl.set("skin",n)}renderNav(){return $e(K9e,{ref:this.refs.navigation,icons:this.props.icons,theme:this.state.theme,dir:this.dir,unfocused:!!this.state.searchResults,position:this.props.navPosition,onClick:this.handleCategoryClick},this.navKey)}renderPreview(){const n=this.getEmojiByPos(this.state.pos),t=this.state.searchResults&&!this.state.searchResults.length;return $e("div",{id:"preview",class:"flex flex-middle",dir:this.dir,"data-position":this.props.previewPosition,children:[$e("div",{class:"flex flex-middle flex-grow",children:[$e("div",{class:"flex flex-auto flex-middle flex-center",style:{height:this.props.emojiButtonSize,fontSize:this.props.emojiButtonSize},children:$e(S6,{emoji:n,id:t?this.props.noResultsEmoji||"cry":this.props.previewEmoji||(this.props.previewPosition=="top"?"point_down":"point_up"),set:this.props.set,size:this.props.emojiButtonSize,skin:this.state.tempSkin||this.state.skin,spritesheet:!0,getSpritesheetURL:this.props.getSpritesheetURL})}),$e("div",{class:`margin-${this.dir[0]}`,children:n||t?$e("div",{class:`padding-${this.dir[2]} align-${this.dir[0]}`,children:[$e("div",{class:"preview-title ellipsis",children:n?n.name:Yi.search_no_results_1}),$e("div",{class:"preview-subtitle ellipsis color-c",children:n?n.skins[0].shortcodes:Yi.search_no_results_2})]}):$e("div",{class:"preview-placeholder color-c",children:Yi.pick})})]}),!n&&this.props.skinTonePosition=="preview"&&this.renderSkinToneButton()]})}renderEmojiButton(n,{pos:t,posinset:i,grid:r}){const a=this.props.emojiButtonSize,o=this.state.tempSkin||this.state.skin,f=(n.skins[o-1]||n.skins[0]).native,c=M9e(this.state.pos,t),h=t.concat(n.id).join("");return $e(X9e,{selected:c,skin:o,size:a,children:$e("button",{"aria-label":f,"aria-selected":c||void 0,"aria-posinset":i,"aria-setsize":r.setsize,"data-keyboard":this.state.keyboard,title:this.props.previewPosition=="none"?n.name:void 0,type:"button",class:"flex flex-center flex-middle",tabindex:"-1",onClick:d=>this.handleEmojiClick({e:d,emoji:n}),onMouseEnter:()=>this.handleEmojiOver(t),onMouseLeave:()=>this.handleEmojiOver(),style:{width:this.props.emojiButtonSize,height:this.props.emojiButtonSize,fontSize:this.props.emojiSize,lineHeight:0},children:[$e("div",{"aria-hidden":"true",class:"background",style:{borderRadius:this.props.emojiButtonRadius,backgroundColor:this.props.emojiButtonColors?this.props.emojiButtonColors[(i-1)%this.props.emojiButtonColors.length]:void 0}}),$e(S6,{emoji:n,set:this.props.set,size:this.props.emojiSize,skin:o,spritesheet:!0,getSpritesheetURL:this.props.getSpritesheetURL})]})},h)}renderSearch(){const n=this.props.previewPosition=="none"||this.props.skinTonePosition=="search";return $e("div",{children:[$e("div",{class:"spacer"}),$e("div",{class:"flex flex-middle",children:[$e("div",{class:"search relative flex-grow",children:[$e("input",{type:"search",ref:this.refs.searchInput,placeholder:Yi.search,onClick:this.handleSearchClick,onInput:this.handleSearchInput,onKeyDown:this.handleSearchKeyDown,autoComplete:"off"}),$e("span",{class:"icon loupe flex",children:ey.search.loupe}),this.state.searchResults&&$e("button",{title:"Clear","aria-label":"Clear",type:"button",class:"icon delete flex",onClick:this.clearSearch,onMouseDown:this.preventDefault,children:ey.search.delete})]}),n&&this.renderSkinToneButton()]})]})}renderSearchResults(){const{searchResults:n}=this.state;return n?$e("div",{class:"category",ref:this.refs.search,children:[$e("div",{class:`sticky padding-small align-${this.dir[0]}`,children:Yi.categories.search}),$e("div",{children:n.length?n.map((t,i)=>$e("div",{class:"flex",children:t.map((r,a)=>this.renderEmojiButton(r,{pos:[i,a],posinset:i*this.props.perLine+a+1,grid:n}))})):$e("div",{class:`padding-small align-${this.dir[0]}`,children:this.props.onAddCustomEmoji&&$e("a",{onClick:this.props.onAddCustomEmoji,children:Yi.add_custom})})})]}):null}renderCategories(){const{categories:n}=Xn,t=!!this.state.searchResults,i=this.getPerLine();return $e("div",{style:{visibility:t?"hidden":void 0,display:t?"none":void 0,height:"100%"},children:n.map(r=>{const{root:a,rows:o}=this.refs.categories.get(r.id);return $e("div",{"data-id":r.target?r.target.id:r.id,class:"category",ref:a,children:[$e("div",{class:`sticky padding-small align-${this.dir[0]}`,children:r.name||Yi.categories[r.id]}),$e("div",{class:"relative",style:{height:o.length*this.props.emojiButtonSize},children:o.map((l,f)=>{const c=l.index-l.index%lg.rowsPerRender,h=this.state.visibleRows[c],d="current"in l?l:void 0;if(!h&&!d)return null;const p=f*i,v=p+i,b=r.emojis.slice(p,v);return b.length{if(!w)return $e("div",{style:{width:this.props.emojiButtonSize,height:this.props.emojiButtonSize}});const _=Kf.get(w);return this.renderEmojiButton(_,{pos:[l.index,k],posinset:l.posinset+k,grid:this.grid})})},l.index)})})]})})})}renderSkinToneButton(){return this.props.skinTonePosition=="none"?null:$e("div",{class:"flex flex-auto flex-center flex-middle",style:{position:"relative",width:this.props.emojiButtonSize,height:this.props.emojiButtonSize},children:$e("button",{type:"button",ref:this.refs.skinToneButton,class:"skin-tone-button flex flex-auto flex-center flex-middle","aria-selected":this.state.showSkins?"":void 0,"aria-label":Yi.skins.choose,title:Yi.skins.choose,onClick:this.openSkins,style:{width:this.props.emojiSize,height:this.props.emojiSize},children:$e("span",{class:`skin-tone skin-tone-${this.state.skin}`})})})}renderLiveRegion(){const n=this.getEmojiByPos(this.state.pos),t=n?n.name:"";return $e("div",{"aria-live":"polite",class:"sr-only",children:t})}renderSkins(){const t=this.refs.skinToneButton.current.getBoundingClientRect(),i=this.base.getBoundingClientRect(),r={};return this.dir=="ltr"?r.right=i.right-t.right-3:r.left=t.left-i.left-3,this.props.previewPosition=="bottom"&&this.props.skinTonePosition=="preview"?r.bottom=i.bottom-t.top+6:(r.top=t.bottom-i.top+3,r.bottom="auto"),$e("div",{ref:this.refs.menu,role:"radiogroup",dir:this.dir,"aria-label":Yi.skins.choose,class:"menu hidden","data-position":r.top?"top":"bottom",style:r,children:[...Array(6).keys()].map(a=>{const o=a+1,l=this.state.skin==o;return $e("div",{children:[$e("input",{type:"radio",name:"skin-tone",value:o,"aria-label":Yi.skins[o],ref:l?this.refs.skinToneRadio:null,defaultChecked:l,onChange:()=>this.handleSkinMouseOver(o),onKeyDown:f=>{(f.code=="Enter"||f.code=="Space"||f.code=="Tab")&&(f.preventDefault(),this.handleSkinClick(o))}}),$e("button",{"aria-hidden":"true",tabindex:"-1",onClick:()=>this.handleSkinClick(o),onMouseEnter:()=>this.handleSkinMouseOver(o),onMouseLeave:()=>this.handleSkinMouseOver(),class:"option flex flex-grow flex-middle",children:[$e("span",{class:`skin-tone skin-tone-${o}`}),$e("span",{class:"margin-small-lr",children:Yi.skins[o]})]})]})})})}render(){const n=this.props.perLine*this.props.emojiButtonSize;return $e("section",{id:"root",class:"flex flex-column",dir:this.dir,style:{width:this.props.dynamicWidth?"100%":`calc(${n}px + (var(--padding) + var(--sidebar-width)))`},"data-emoji-set":this.props.set,"data-theme":this.state.theme,"data-menu":this.state.showSkins?"":void 0,children:[this.props.previewPosition=="top"&&this.renderPreview(),this.props.navPosition=="top"&&this.renderNav(),this.props.searchPosition=="sticky"&&$e("div",{class:"padding-lr",children:this.renderSearch()}),$e("div",{ref:this.refs.scroll,class:"scroll flex-grow padding-lr",children:$e("div",{style:{width:this.props.dynamicWidth?"100%":n,height:"100%"},children:[this.props.searchPosition=="static"&&this.renderSearch(),this.renderSearchResults(),this.renderCategories()]})}),this.props.navPosition=="bottom"&&this.renderNav(),this.props.previewPosition=="bottom"&&this.renderPreview(),this.state.showSkins&&this.renderSkins(),this.renderLiveRegion()]})}constructor(n){super(),ua(this,"darkMediaCallback",()=>{this.props.theme=="auto"&&this.setState({theme:this.darkMedia.matches?"dark":"light"})}),ua(this,"handleClickOutside",t=>{const{element:i}=this.props;t.target!=i&&(this.state.showSkins&&this.closeSkins(),this.props.onClickOutside&&this.props.onClickOutside(t))}),ua(this,"handleBaseClick",t=>{this.state.showSkins&&(t.target.closest(".menu")||(t.preventDefault(),t.stopImmediatePropagation(),this.closeSkins()))}),ua(this,"handleBaseKeydown",t=>{this.state.showSkins&&t.key=="Escape"&&(t.preventDefault(),t.stopImmediatePropagation(),this.closeSkins())}),ua(this,"handleSearchClick",()=>{this.getEmojiByPos(this.state.pos)&&this.setState({pos:[-1,-1]})}),ua(this,"handleSearchInput",async()=>{const t=this.refs.searchInput.current;if(!t)return;const{value:i}=t,r=await Kf.search(i),a=()=>{this.refs.scroll.current&&(this.refs.scroll.current.scrollTop=0)};if(!r)return this.setState({searchResults:r,pos:[-1,-1]},a);const o=t.selectionStart==t.value.length?[0,0]:[-1,-1],l=[];l.setsize=r.length;let f=null;for(let c of r)(!l.length||f.length==this.getPerLine())&&(f=[],f.__categoryId="search",f.__index=l.length,l.push(f)),f.push(c);this.ignoreMouse(),this.setState({searchResults:l,pos:o},a)}),ua(this,"handleSearchKeyDown",t=>{const i=t.currentTarget;switch(t.stopImmediatePropagation(),t.key){case"ArrowLeft":this.navigate({e:t,input:i,left:!0});break;case"ArrowRight":this.navigate({e:t,input:i,right:!0});break;case"ArrowUp":this.navigate({e:t,input:i,up:!0});break;case"ArrowDown":this.navigate({e:t,input:i,down:!0});break;case"Enter":t.preventDefault(),this.handleEmojiClick({e:t,pos:this.state.pos});break;case"Escape":t.preventDefault(),this.state.searchResults?this.clearSearch():this.unfocusSearch();break}}),ua(this,"clearSearch",()=>{const t=this.refs.searchInput.current;t&&(t.value="",t.focus(),this.handleSearchInput())}),ua(this,"handleCategoryClick",({category:t,i})=>{this.scrollTo(i==0?{row:-1}:{categoryId:t.id})}),ua(this,"openSkins",t=>{const{currentTarget:i}=t,r=i.getBoundingClientRect();this.setState({showSkins:r},async()=>{await D9e(2);const a=this.refs.menu.current;a&&(a.classList.remove("hidden"),this.refs.skinToneRadio.current.focus(),this.base.addEventListener("click",this.handleBaseClick,!0),this.base.addEventListener("keydown",this.handleBaseKeydown,!0))})}),this.observers=[],this.state={pos:[-1,-1],perLine:this.initDynamicPerLine(n),visibleRows:{0:!0},...this.getInitialState(n)}}}class PA extends z9e{async connectedCallback(){const n=qW(this.props,Ho,this);n.element=this,n.ref=t=>{this.component=t},await eb(n),!this.disconnected&&$W($e(Z9e,{...n}),this.shadowRoot)}constructor(n){super(n,{styles:SW(YW)})}}ua(PA,"Props",Ho);typeof customElements<"u"&&!customElements.get("em-emoji-picker")&&customElements.define("em-emoji-picker",PA);var YW={};YW=`:host { + width: min-content; + height: 435px; + min-height: 230px; + border-radius: var(--border-radius); + box-shadow: var(--shadow); + --border-radius: 10px; + --category-icon-size: 18px; + --font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif; + --font-size: 15px; + --preview-placeholder-size: 21px; + --preview-title-size: 1.1em; + --preview-subtitle-size: .9em; + --shadow-color: 0deg 0% 0%; + --shadow: .3px .5px 2.7px hsl(var(--shadow-color) / .14), .4px .8px 1px -3.2px hsl(var(--shadow-color) / .14), 1px 2px 2.5px -4.5px hsl(var(--shadow-color) / .14); + display: flex; +} + +[data-theme="light"] { + --em-rgb-color: var(--rgb-color, 34, 36, 39); + --em-rgb-accent: var(--rgb-accent, 34, 102, 237); + --em-rgb-background: var(--rgb-background, 255, 255, 255); + --em-rgb-input: var(--rgb-input, 255, 255, 255); + --em-color-border: var(--color-border, rgba(0, 0, 0, .05)); + --em-color-border-over: var(--color-border-over, rgba(0, 0, 0, .1)); +} + +[data-theme="dark"] { + --em-rgb-color: var(--rgb-color, 222, 222, 221); + --em-rgb-accent: var(--rgb-accent, 58, 130, 247); + --em-rgb-background: var(--rgb-background, 21, 22, 23); + --em-rgb-input: var(--rgb-input, 0, 0, 0); + --em-color-border: var(--color-border, rgba(255, 255, 255, .1)); + --em-color-border-over: var(--color-border-over, rgba(255, 255, 255, .2)); +} + +#root { + --color-a: rgb(var(--em-rgb-color)); + --color-b: rgba(var(--em-rgb-color), .65); + --color-c: rgba(var(--em-rgb-color), .45); + --padding: 12px; + --padding-small: calc(var(--padding) / 2); + --sidebar-width: 16px; + --duration: 225ms; + --duration-fast: 125ms; + --duration-instant: 50ms; + --easing: cubic-bezier(.4, 0, .2, 1); + width: 100%; + text-align: left; + border-radius: var(--border-radius); + background-color: rgb(var(--em-rgb-background)); + position: relative; +} + +@media (prefers-reduced-motion) { + #root { + --duration: 0; + --duration-fast: 0; + --duration-instant: 0; + } +} + +#root[data-menu] button { + cursor: auto; +} + +#root[data-menu] .menu button { + cursor: pointer; +} + +:host, #root, input, button { + color: rgb(var(--em-rgb-color)); + font-family: var(--font-family); + font-size: var(--font-size); + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + line-height: normal; +} + +*, :before, :after { + box-sizing: border-box; + min-width: 0; + margin: 0; + padding: 0; +} + +.relative { + position: relative; +} + +.flex { + display: flex; +} + +.flex-auto { + flex: none; +} + +.flex-center { + justify-content: center; +} + +.flex-column { + flex-direction: column; +} + +.flex-grow { + flex: auto; +} + +.flex-middle { + align-items: center; +} + +.flex-wrap { + flex-wrap: wrap; +} + +.padding { + padding: var(--padding); +} + +.padding-t { + padding-top: var(--padding); +} + +.padding-lr { + padding-left: var(--padding); + padding-right: var(--padding); +} + +.padding-r { + padding-right: var(--padding); +} + +.padding-small { + padding: var(--padding-small); +} + +.padding-small-b { + padding-bottom: var(--padding-small); +} + +.padding-small-lr { + padding-left: var(--padding-small); + padding-right: var(--padding-small); +} + +.margin { + margin: var(--padding); +} + +.margin-r { + margin-right: var(--padding); +} + +.margin-l { + margin-left: var(--padding); +} + +.margin-small-l { + margin-left: var(--padding-small); +} + +.margin-small-lr { + margin-left: var(--padding-small); + margin-right: var(--padding-small); +} + +.align-l { + text-align: left; +} + +.align-r { + text-align: right; +} + +.color-a { + color: var(--color-a); +} + +.color-b { + color: var(--color-b); +} + +.color-c { + color: var(--color-c); +} + +.ellipsis { + white-space: nowrap; + max-width: 100%; + width: auto; + text-overflow: ellipsis; + overflow: hidden; +} + +.sr-only { + width: 1px; + height: 1px; + position: absolute; + top: auto; + left: -10000px; + overflow: hidden; +} + +a { + cursor: pointer; + color: rgb(var(--em-rgb-accent)); +} + +a:hover { + text-decoration: underline; +} + +.spacer { + height: 10px; +} + +[dir="rtl"] .scroll { + padding-left: 0; + padding-right: var(--padding); +} + +.scroll { + padding-right: 0; + overflow-x: hidden; + overflow-y: auto; +} + +.scroll::-webkit-scrollbar { + width: var(--sidebar-width); + height: var(--sidebar-width); +} + +.scroll::-webkit-scrollbar-track { + border: 0; +} + +.scroll::-webkit-scrollbar-button { + width: 0; + height: 0; + display: none; +} + +.scroll::-webkit-scrollbar-corner { + background-color: rgba(0, 0, 0, 0); +} + +.scroll::-webkit-scrollbar-thumb { + min-height: 20%; + min-height: 65px; + border: 4px solid rgb(var(--em-rgb-background)); + border-radius: 8px; +} + +.scroll::-webkit-scrollbar-thumb:hover { + background-color: var(--em-color-border-over) !important; +} + +.scroll:hover::-webkit-scrollbar-thumb { + background-color: var(--em-color-border); +} + +.sticky { + z-index: 1; + background-color: rgba(var(--em-rgb-background), .9); + -webkit-backdrop-filter: blur(4px); + backdrop-filter: blur(4px); + font-weight: 500; + position: sticky; + top: -1px; +} + +[dir="rtl"] .search input[type="search"] { + padding: 10px 2.2em 10px 2em; +} + +[dir="rtl"] .search .loupe { + left: auto; + right: .7em; +} + +[dir="rtl"] .search .delete { + left: .7em; + right: auto; +} + +.search { + z-index: 2; + position: relative; +} + +.search input, .search button { + font-size: calc(var(--font-size) - 1px); +} + +.search input[type="search"] { + width: 100%; + background-color: var(--em-color-border); + transition-duration: var(--duration); + transition-property: background-color, box-shadow; + transition-timing-function: var(--easing); + border: 0; + border-radius: 10px; + outline: 0; + padding: 10px 2em 10px 2.2em; + display: block; +} + +.search input[type="search"]::-ms-input-placeholder { + color: inherit; + opacity: .6; +} + +.search input[type="search"]::placeholder { + color: inherit; + opacity: .6; +} + +.search input[type="search"], .search input[type="search"]::-webkit-search-decoration, .search input[type="search"]::-webkit-search-cancel-button, .search input[type="search"]::-webkit-search-results-button, .search input[type="search"]::-webkit-search-results-decoration { + -webkit-appearance: none; + -ms-appearance: none; + appearance: none; +} + +.search input[type="search"]:focus { + background-color: rgb(var(--em-rgb-input)); + box-shadow: inset 0 0 0 1px rgb(var(--em-rgb-accent)), 0 1px 3px rgba(65, 69, 73, .2); +} + +.search .icon { + z-index: 1; + color: rgba(var(--em-rgb-color), .7); + position: absolute; + top: 50%; + transform: translateY(-50%); +} + +.search .loupe { + pointer-events: none; + left: .7em; +} + +.search .delete { + right: .7em; +} + +svg { + fill: currentColor; + width: 1em; + height: 1em; +} + +button { + -webkit-appearance: none; + -ms-appearance: none; + appearance: none; + cursor: pointer; + color: currentColor; + background-color: rgba(0, 0, 0, 0); + border: 0; +} + +#nav { + z-index: 2; + padding-top: 12px; + padding-bottom: 12px; + padding-right: var(--sidebar-width); + position: relative; +} + +#nav button { + color: var(--color-b); + transition: color var(--duration) var(--easing); +} + +#nav button:hover { + color: var(--color-a); +} + +#nav svg, #nav img { + width: var(--category-icon-size); + height: var(--category-icon-size); +} + +#nav[dir="rtl"] .bar { + left: auto; + right: 0; +} + +#nav .bar { + width: 100%; + height: 3px; + background-color: rgb(var(--em-rgb-accent)); + transition: transform var(--duration) var(--easing); + border-radius: 3px 3px 0 0; + position: absolute; + bottom: -12px; + left: 0; +} + +#nav button[aria-selected] { + color: rgb(var(--em-rgb-accent)); +} + +#preview { + z-index: 2; + padding: calc(var(--padding) + 4px) var(--padding); + padding-right: var(--sidebar-width); + position: relative; +} + +#preview .preview-placeholder { + font-size: var(--preview-placeholder-size); +} + +#preview .preview-title { + font-size: var(--preview-title-size); +} + +#preview .preview-subtitle { + font-size: var(--preview-subtitle-size); +} + +#nav:before, #preview:before { + content: ""; + height: 2px; + position: absolute; + left: 0; + right: 0; +} + +#nav[data-position="top"]:before, #preview[data-position="top"]:before { + background: linear-gradient(to bottom, var(--em-color-border), transparent); + top: 100%; +} + +#nav[data-position="bottom"]:before, #preview[data-position="bottom"]:before { + background: linear-gradient(to top, var(--em-color-border), transparent); + bottom: 100%; +} + +.category:last-child { + min-height: calc(100% + 1px); +} + +.category button { + font-family: -apple-system, BlinkMacSystemFont, Helvetica Neue, sans-serif; + position: relative; +} + +.category button > * { + position: relative; +} + +.category button .background { + opacity: 0; + background-color: var(--em-color-border); + transition: opacity var(--duration-fast) var(--easing) var(--duration-instant); + position: absolute; + top: 0; + bottom: 0; + left: 0; + right: 0; +} + +.category button:hover .background { + transition-duration: var(--duration-instant); + transition-delay: 0s; +} + +.category button[aria-selected] .background { + opacity: 1; +} + +.category button[data-keyboard] .background { + transition: none; +} + +.row { + width: 100%; + position: absolute; + top: 0; + left: 0; +} + +.skin-tone-button { + border: 1px solid rgba(0, 0, 0, 0); + border-radius: 100%; +} + +.skin-tone-button:hover { + border-color: var(--em-color-border); +} + +.skin-tone-button:active .skin-tone { + transform: scale(.85) !important; +} + +.skin-tone-button .skin-tone { + transition: transform var(--duration) var(--easing); +} + +.skin-tone-button[aria-selected] { + background-color: var(--em-color-border); + border-top-color: rgba(0, 0, 0, .05); + border-bottom-color: rgba(0, 0, 0, 0); + border-left-width: 0; + border-right-width: 0; +} + +.skin-tone-button[aria-selected] .skin-tone { + transform: scale(.9); +} + +.menu { + z-index: 2; + white-space: nowrap; + border: 1px solid var(--em-color-border); + background-color: rgba(var(--em-rgb-background), .9); + -webkit-backdrop-filter: blur(4px); + backdrop-filter: blur(4px); + transition-property: opacity, transform; + transition-duration: var(--duration); + transition-timing-function: var(--easing); + border-radius: 10px; + padding: 4px; + position: absolute; + box-shadow: 1px 1px 5px rgba(0, 0, 0, .05); +} + +.menu.hidden { + opacity: 0; +} + +.menu[data-position="bottom"] { + transform-origin: 100% 100%; +} + +.menu[data-position="bottom"].hidden { + transform: scale(.9)rotate(-3deg)translateY(5%); +} + +.menu[data-position="top"] { + transform-origin: 100% 0; +} + +.menu[data-position="top"].hidden { + transform: scale(.9)rotate(3deg)translateY(-5%); +} + +.menu input[type="radio"] { + clip: rect(0 0 0 0); + width: 1px; + height: 1px; + border: 0; + margin: 0; + padding: 0; + position: absolute; + overflow: hidden; +} + +.menu input[type="radio"]:checked + .option { + box-shadow: 0 0 0 2px rgb(var(--em-rgb-accent)); +} + +.option { + width: 100%; + border-radius: 6px; + padding: 4px 6px; +} + +.option:hover { + color: #fff; + background-color: rgb(var(--em-rgb-accent)); +} + +.skin-tone { + width: 16px; + height: 16px; + border-radius: 100%; + display: inline-block; + position: relative; + overflow: hidden; +} + +.skin-tone:after { + content: ""; + mix-blend-mode: overlay; + background: linear-gradient(rgba(255, 255, 255, .2), rgba(0, 0, 0, 0)); + border: 1px solid rgba(0, 0, 0, .8); + border-radius: 100%; + position: absolute; + top: 0; + bottom: 0; + left: 0; + right: 0; + box-shadow: inset 0 -2px 3px #000, inset 0 1px 2px #fff; +} + +.skin-tone-1 { + background-color: #ffc93a; +} + +.skin-tone-2 { + background-color: #ffdab7; +} + +.skin-tone-3 { + background-color: #e7b98f; +} + +.skin-tone-4 { + background-color: #c88c61; +} + +.skin-tone-5 { + background-color: #a46134; +} + +.skin-tone-6 { + background-color: #5d4437; +} + +[data-index] { + justify-content: space-between; +} + +[data-emoji-set="twitter"] .skin-tone:after { + box-shadow: none; + border-color: rgba(0, 0, 0, .5); +} + +[data-emoji-set="twitter"] .skin-tone-1 { + background-color: #fade72; +} + +[data-emoji-set="twitter"] .skin-tone-2 { + background-color: #f3dfd0; +} + +[data-emoji-set="twitter"] .skin-tone-3 { + background-color: #eed3a8; +} + +[data-emoji-set="twitter"] .skin-tone-4 { + background-color: #cfad8d; +} + +[data-emoji-set="twitter"] .skin-tone-5 { + background-color: #a8805d; +} + +[data-emoji-set="twitter"] .skin-tone-6 { + background-color: #765542; +} + +[data-emoji-set="google"] .skin-tone:after { + box-shadow: inset 0 0 2px 2px rgba(0, 0, 0, .4); +} + +[data-emoji-set="google"] .skin-tone-1 { + background-color: #f5c748; +} + +[data-emoji-set="google"] .skin-tone-2 { + background-color: #f1d5aa; +} + +[data-emoji-set="google"] .skin-tone-3 { + background-color: #d4b48d; +} + +[data-emoji-set="google"] .skin-tone-4 { + background-color: #aa876b; +} + +[data-emoji-set="google"] .skin-tone-5 { + background-color: #916544; +} + +[data-emoji-set="google"] .skin-tone-6 { + background-color: #61493f; +} + +[data-emoji-set="facebook"] .skin-tone:after { + border-color: rgba(0, 0, 0, .4); + box-shadow: inset 0 -2px 3px #000, inset 0 1px 4px #fff; +} + +[data-emoji-set="facebook"] .skin-tone-1 { + background-color: #f5c748; +} + +[data-emoji-set="facebook"] .skin-tone-2 { + background-color: #f1d5aa; +} + +[data-emoji-set="facebook"] .skin-tone-3 { + background-color: #d4b48d; +} + +[data-emoji-set="facebook"] .skin-tone-4 { + background-color: #aa876b; +} + +[data-emoji-set="facebook"] .skin-tone-5 { + background-color: #916544; +} + +[data-emoji-set="facebook"] .skin-tone-6 { + background-color: #61493f; +} + +`;function Q9e({opened:e,onClose:n,onSelect:t,target:i}){return y.jsxs(En,{opened:e,onChange:r=>{r||n()},onDismiss:n,position:"bottom-start",withArrow:!0,shadow:"md",withinPortal:!0,closeOnClickOutside:!0,closeOnEscape:!0,trapFocus:!1,children:[y.jsx(En.Target,{children:i}),y.jsx(En.Dropdown,{p:0,style:{background:"transparent",border:"none"},children:y.jsx(J9e,{onSelect:r=>{t(r),n()}})})]})}function J9e({onSelect:e}){const n=A.useRef(null),t=A.useRef(null),i=A.useRef(e);return i.current=e,A.useEffect(()=>{if(n.current)return t.current=new PA({data:c9e,onEmojiSelect:r=>{const a=i.current;r.native?a(r.native):r.shortcodes&&a(r.shortcodes)},theme:"dark",previewPosition:"none",skinTonePosition:"search",autoFocus:!0,maxFrequentRows:2,ref:n}),()=>{n.current&&(n.current.innerHTML=""),t.current=null}},[]),y.jsx("div",{ref:n})}const Oh="column-";function eAe(e){return e==="column"?n=>{const t=n.droppableContainers.filter(r=>String(r.id).startsWith(Oh)),i=KB({...n,droppableContainers:t});return i.length>0?i:ore({...n,droppableContainers:t})}:n=>{const t=ure(n);return t.length>0?t:YB(n)}}function nAe(){const e=WC(),[n,t]=A.useState(null),[i,r]=A.useState([]),[a,o]=A.useState(null),[l,f]=A.useState(null),[c,h]=A.useState(void 0),[d,p]=A.useState(!1),[v,b]=A.useState(""),[w,k]=A.useState(Date.now()),[_,C]=A.useState(!1),[x,E]=A.useState("board"),[O,j]=A.useState([]),[M,P]=A.useState(!1),[F,R]=A.useState([]),[L,B]=A.useState(!1),[G,U]=A.useState([]),[H,N]=A.useState([]),[z,q]=A.useState(""),[Y,D]=A.useState(null),[V,W]=A.useState(null),[$,X]=A.useState([]),[ee,re]=A.useState(!1),[se,ye]=A.useState(null),[ae,le]=A.useState(null),[_e,ne]=A.useState(!1),[ze,we]=A.useState(null),[Ce,Ne]=A.useState(!1),[ve,xe]=A.useState(null),[Pe,ue]=A.useState(!1),[Be,We]=A.useState("#888888"),[Ue,Xe]=A.useState(null),[Qe,ie]=A.useState(!1),[he,Ge]=A.useState(()=>{const Z=localStorage.getItem("kanban_nav_width"),pe=Z?parseInt(Z,10):NaN;return Number.isFinite(pe)&&pe>=180&&pe<=600?pe:240}),Je=A.useRef(he);A.useEffect(()=>{Je.current=he,localStorage.setItem("kanban_nav_width",String(he))},[he]);const Se=Z=>{Z.preventDefault();const pe=Z.clientX,Ae=Je.current;document.body.style.cursor="col-resize",document.body.style.userSelect="none";const Ye=_t=>{const lt=_t.clientX-pe,Ot=Math.min(600,Math.max(180,Ae+lt));Ge(Ot)},$n=()=>{document.body.style.cursor="",document.body.style.userSelect="",window.removeEventListener("mousemove",Ye),window.removeEventListener("mouseup",$n)};window.addEventListener("mousemove",Ye),window.addEventListener("mouseup",$n)},tn=ire(I5(e9,{activationConstraint:{distance:5}}),I5(QC,{coordinateGetter:Nae})),cn=32,On=400,mn=a!==null||l!==null,[an,en]=A.useState(!1),Rn=A.useRef(Qe);A.useEffect(()=>{Rn.current=Qe},[Qe]),A.useEffect(()=>{if(!mn){en(!1);return}let Z=null,pe=!1,Ae=!1;const Ye=()=>{Z!==null&&(window.clearTimeout(Z),Z=null)},$n=_t=>{const lt=_t.clientX<=cn;if(lt===pe)return;if(pe=lt,en(lt),!lt){Ae=!0,Ye();return}if(!(!Rn.current||Ae))return;Ye();const Pt=!Rn.current;Z=window.setTimeout(()=>{ie(Pt),Ae=!1},On)};return document.addEventListener("mousemove",$n),()=>{document.removeEventListener("mousemove",$n),Ye(),en(!1)}},[mn]);const De=A.useCallback(async()=>{try{const Z=await vie();t(Z)}catch(Z){Ln.show({color:"red",message:Z.message})}},[]);A.useEffect(()=>{De()},[De]);const Fe=A.useCallback(async()=>{try{const Z=await BB();r(Z)}catch(Z){console.warn("listUsers failed",Z)}},[]),jn=A.useCallback(async()=>{try{const Z=await xie();j(Z)}catch(Z){console.warn("listTrash failed",Z)}},[]),yn=A.useCallback(async()=>{try{const Z=await Aie();R(Z)}catch(Z){console.warn("listArchive failed",Z)}},[]),gn=A.useCallback(async()=>{try{const Z=await FB();U(Z)}catch(Z){console.warn("listTags failed",Z)}},[]),bn=A.useCallback(async()=>{try{const Z=await Fie();N(Z)}catch(Z){console.warn("listRequesters failed",Z)}},[]);A.useEffect(()=>{Fe()},[Fe]),A.useEffect(()=>{jn()},[jn]),A.useEffect(()=>{yn()},[yn]),A.useEffect(()=>{gn(),bn()},[gn,bn]),A.useEffect(()=>{if(a||l)return;const Z=setInterval(()=>k(Date.now()),1e3);return()=>clearInterval(Z)},[a,l]),A.useEffect(()=>{const Z=setInterval(()=>{De()},3e4);return()=>clearInterval(Z)},[De]),A.useEffect(()=>{if(!ve)return;const Z=pe=>{pe.key==="Escape"&&xe(null)};return window.addEventListener("keydown",Z),()=>window.removeEventListener("keydown",Z)},[ve]);const tt=A.useMemo(()=>{const Z=new Map;for(const pe of i)Z.set(pe.id,pe);return Z},[i]),wt=A.useMemo(()=>n?[...n.columns].sort((Z,pe)=>Z.position-pe.position):[],[n]),Le=A.useMemo(()=>wt.filter(Z=>Z.location!=="sidebar"),[wt]),qe=A.useMemo(()=>wt.filter(Z=>Z.location==="sidebar"),[wt]),Nn=A.useMemo(()=>Le.map(Z=>`${Oh}${Z.id}`),[Le]),ot=A.useMemo(()=>qe.map(Z=>`${Oh}${Z.id}`),[qe]),Mn=A.useCallback(Z=>{const pe=z.trim().toLowerCase();if(pe&&![Z.title,Z.description,Z.requester,...Z.tags||[]].filter(Boolean).join(" ").toLowerCase().includes(pe)||Y&&Z.assignee_id!==Y||ee&&Z.assignee_id||V&&Z.requester!==V)return!1;if($.length>0){const Ae=new Set(Z.tags||[]);for(const Ye of $)if(!Ae.has(Ye))return!1}if(_e&&!Z.deadline)return!1;if(se||ae){const Ae=se?new Date(se).setHours(0,0,0,0):-1/0,Ye=ae?new Date(ae).setHours(23,59,59,999):1/0,$n=Z.created_at?new Date(Z.created_at).getTime():NaN,_t=Z.entered_at?new Date(Z.entered_at).getTime():NaN,lt=Ot=>!isNaN(Ot)&&Ot>=Ae&&Ot<=Ye;if(!lt($n)&&!lt(_t))return!1}return!0},[z,Y,ee,V,$,se,ae,_e]),nn=A.useMemo(()=>{const Z=new Map;if(!n)return Z;for(const pe of n.columns)Z.set(pe.id,[]);for(const pe of[...n.cards].sort((Ae,Ye)=>Ae.position-Ye.position)){if(!Mn(pe))continue;const Ae=Z.get(pe.column_id);Ae&&Ae.push(pe)}return Z},[n,Mn]),rn=!!z.trim()||!!Y||ee||!!V||$.length>0||!!se||!!ae||_e,on=Z=>n==null?void 0:n.cards.find(pe=>pe.id===Z),Bn=Z=>n==null?void 0:n.columns.find(pe=>pe.id===Z),Vn=Z=>{var pe;return(pe=on(Z))==null?void 0:pe.column_id},kt=Z=>Z.startsWith(Oh),Cn=Z=>Z.slice(Oh.length),An=Z=>{if(n)return kt(Z)?Cn(Z):Vn(Z)},Qn=Z=>{var $n;const pe=Z.active.id,Ae=($n=Z.active.data.current)==null?void 0:$n.type;if(h(Ae),Ae==="column"){f(Cn(pe));return}const Ye=on(pe);Ye&&o(Ye)},Xt=Z=>{var _t,lt;if(!n||((_t=Z.active.data.current)==null?void 0:_t.type)!=="card")return;const pe=Z.active.id,Ae=(lt=Z.over)==null?void 0:lt.id;if(!Ae)return;const Ye=Vn(pe),$n=An(Ae);!Ye||!$n||Ye===$n||t(Ot=>{if(!Ot)return Ot;const Pt=Ot.cards.map(rr=>rr.id===pe?{...rr,column_id:$n}:rr);return{...Ot,cards:Pt}})},Ci=async Z=>{var rr,ri;const pe=(rr=Z.active.data.current)==null?void 0:rr.type,Ae=Z.active.id,Ye=(ri=Z.over)==null?void 0:ri.id;if(o(null),f(null),h(void 0),!n||!Ye)return;if(pe==="column"){if(!kt(Ye))return;const Jn=Cn(Ae),Zt=Cn(Ye);if(Jn===Zt)return;const ar=Bn(Jn),Vi=Bn(Zt);if(!ar||!Vi)return;const ja=Vi.location,Wi=wt.filter(Ri=>Ri.location===ja).map(Ri=>Ri.id),Dl=Wi.indexOf(Jn),Xa=Wi.indexOf(Zt);let Tr;if(Dl===-1){const Ri=Xa===-1?Wi.length:Xa;Tr=[...Wi.slice(0,Ri),Jn,...Wi.slice(Ri)]}else{if(Dl===Xa)return;Tr=Fg(Wi,Dl,Xa)}t(Ri=>{if(!Ri)return Ri;const ws=new Map(Tr.map((or,Vu)=>[or,Vu])),xp=Ri.columns.map(or=>or.id===Jn?{...or,location:ja,position:ws.get(or.id)??or.position}:ws.has(or.id)?{...or,position:ws.get(or.id)}:or);return{...Ri,columns:xp}});try{ar.location!==ja&&await Zl(Jn,{location:ja}),await wie(Tr)}catch(Ri){Ln.show({color:"red",message:Ri.message})}De();return}const $n=An(Ye);if(!$n)return;const _t=n.cards.find(Jn=>Jn.id===Ae);if(_t!=null&&_t.locked&&_t.column_id!==$n){Ln.show({color:"yellow",message:"Card bloqueada: no se puede mover entre columnas"}),De();return}const lt=n.cards.filter(Jn=>Jn.column_id===$n).sort((Jn,Zt)=>Jn.position-Zt.position),Ot=lt.findIndex(Jn=>Jn.id===Ae);let Pt;if(kt(Ye)||Ot===-1)Pt=[...lt.filter(Jn=>Jn.id!==Ae).map(Jn=>Jn.id),Ae];else{const Jn=lt.findIndex(Zt=>Zt.id===Ye);Pt=Fg(lt.map(Zt=>Zt.id),Ot,Jn)}t(Jn=>{if(!Jn)return Jn;const Zt=new Map(Pt.map((Vi,ja)=>[Vi,ja])),ar=Jn.cards.map(Vi=>Vi.column_id===$n&&Zt.has(Vi.id)?{...Vi,position:Zt.get(Vi.id)}:Vi);return{...Jn,cards:ar}});try{await Tie(Ae,$n,Pt)}catch(Jn){Ln.show({color:"red",message:Jn.message})}De()},nr=async()=>{const Z=v.trim();if(Z)try{await yie(Z),b(""),p(!1),De()}catch(pe){Ln.show({color:"red",message:pe.message})}},Aa=A.useCallback(async(Z,pe)=>{try{await Zl(Z,{name:pe}),De()}catch(Ae){Ln.show({color:"red",message:Ae.message})}},[De]),Ga=A.useCallback(async(Z,pe)=>{try{await Zl(Z,{width:pe}),De()}catch(Ae){Ln.show({color:"red",message:Ae.message})}},[De]),Oa=A.useCallback(async(Z,pe)=>{try{await Zl(Z,{location:pe}),De()}catch(Ae){Ln.show({color:"red",message:Ae.message})}},[De]),Yr=A.useCallback(Z=>{Da.openConfirmModal({title:"Eliminar columna",children:y.jsx(Te,{size:"sm",children:"Se borraran todas sus tarjetas. Continuar?"}),labels:{confirm:"Eliminar",cancel:"Cancelar"},confirmProps:{color:"red"},onConfirm:async()=>{try{await bie(Z),De()}catch(pe){Ln.show({color:"red",message:pe.message})}}})},[De]),Ya=A.useCallback(Z=>{const pe=Da.open({title:"Nueva tarjeta",size:"md",children:y.jsx(nq,{users:i,requesterOptions:H,tagOptions:G,initial:{requester:""},submitLabel:"Crear",onCancel:()=>Da.close(pe),onSubmit:async Ae=>{try{await kie({column_id:Z,requester:Ae.requester,title:Ae.title,description:Ae.description,assignee_id:Ae.assignee_id,tags:Ae.tags}),Da.close(pe),De(),gn(),bn()}catch(Ye){Ln.show({color:"red",message:Ye.message})}}})})},[De,i,e.user,H,G]),Ar=A.useCallback(Z=>{var Ae;const pe=Da.open({title:"Editar tarjeta",size:"85%",children:y.jsx(rle,{card:Z,users:i,currentUserId:(Ae=e.user)==null?void 0:Ae.id,requesterOptions:H,tagOptions:G,onCancel:()=>Da.close(pe),onSubmit:async Ye=>{try{await Af(Z.id,{requester:Ye.requester,title:Ye.title,description:Ye.description,assignee_id:Ye.assignee_id,tags:Ye.tags}),Da.close(pe),De(),gn(),bn()}catch($n){Ln.show({color:"red",message:$n.message})}}})})},[De,i,e.user,H,G]),Or=A.useCallback(async Z=>{try{const pe=await Nie(Z);await De(),Ln.show({color:"teal",message:`Duplicada: ${pe.title}`})}catch(pe){Ln.show({color:"red",message:pe.message})}},[De]),hn=A.useCallback(async(Z,pe)=>{t(Ae=>Ae&&{...Ae,cards:Ae.cards.map(Ye=>Ye.id===Z?{...Ye,requester:pe}:Ye)});try{await Af(Z,{requester:pe})}catch(Ae){Ln.show({color:"red",message:Ae.message}),De()}},[De]),ii=A.useCallback(Z=>{E("board"),we(Z),window.setTimeout(()=>we(null),3e3)},[]),un=A.useCallback(Z=>{const pe=Da.open({title:"Reporte diario",size:"90%",children:y.jsx(XCe,{date:Z,onJumpToCard:Ae=>{Da.close(pe),ii(Ae)}})})},[ii]),jr=A.useCallback(async(Z,pe)=>{t(Ae=>Ae&&{...Ae,cards:Ae.cards.map(Ye=>Ye.id===Z?{...Ye,deadline:pe}:Ye)});try{await Af(Z,{deadline:pe})}catch(Ae){Ln.show({color:"red",message:Ae.message}),De()}},[De]),Ka=A.useCallback(async(Z,pe)=>{t(Ae=>Ae&&{...Ae,cards:Ae.cards.map(Ye=>Ye.id===Z?{...Ye,assignee_id:pe}:Ye)});try{await Af(Z,{assignee_id:pe})}catch(Ae){Ln.show({color:"red",message:Ae.message}),De()}},[De]),Er=A.useCallback(async Z=>{try{await _ie(Z),De(),jn()}catch(pe){Ln.show({color:"red",message:pe.message})}},[De,jn]),Kr=A.useCallback(async Z=>{try{await Sie(Z),De(),jn()}catch(pe){Ln.show({color:"red",message:pe.message})}},[De,jn]),nb=A.useCallback(async Z=>{try{await jie(Z),De(),yn()}catch(pe){Ln.show({color:"red",message:pe.message})}},[De,yn]),od=A.useCallback(async Z=>{try{await Oie(Z),De(),yn()}catch(pe){Ln.show({color:"red",message:pe.message})}},[De,yn]),bp=A.useCallback(async Z=>{Da.openConfirmModal({title:"Borrar permanentemente",children:y.jsx(Te,{size:"sm",children:"Esta accion no se puede deshacer."}),labels:{confirm:"Borrar",cancel:"Cancelar"},confirmProps:{color:"red"},onConfirm:async()=>{try{await Cie(Z),jn()}catch(pe){Ln.show({color:"red",message:pe.message})}}})},[jn]),sd=A.useCallback(async(Z,pe)=>{t(Ae=>Ae&&{...Ae,cards:Ae.cards.map(Ye=>Ye.id===Z?{...Ye,color:pe}:Ye)});try{await Af(Z,{color:pe})}catch(Ae){Ln.show({color:"red",message:Ae.message}),De()}},[De]),Ol=A.useCallback(async(Z,pe)=>{t(Ae=>Ae&&{...Ae,cards:Ae.cards.map(Ye=>Ye.id===Z?{...Ye,stickers:pe}:Ye)});try{await Nk(Z,pe)}catch(Ae){Ln.show({color:"red",message:Ae.message}),De()}},[De]),jl=A.useCallback((Z,pe,Ae)=>{ve&&t(Ye=>{if(!Ye)return Ye;const $n=Ye.cards.map(_t=>{if(_t.id!==Z)return _t;const lt=[..._t.stickers||[],{emoji:ve,x:pe,y:Ae}];return Nk(Z,lt).catch(Ot=>{Ln.show({color:"red",message:Ot.message}),De()}),{..._t,stickers:lt}});return{...Ye,cards:$n}})},[ve,De]),Xr=A.useCallback((Z,pe)=>{t(Ae=>{if(!Ae)return Ae;const Ye=Ae.cards.map($n=>{if($n.id!==Z)return $n;const _t=($n.stickers||[]).filter((lt,Ot)=>Ot!==pe);return Nk(Z,_t).catch(lt=>{Ln.show({color:"red",message:lt.message}),De()}),{...$n,stickers:_t}});return{...Ae,cards:Ye}})},[De]),tr=A.useCallback((Z,pe,Ae,Ye)=>{t($n=>{if(!$n)return $n;const _t=$n.cards.map(lt=>{if(lt.id!==Z)return lt;const Ot=(lt.stickers||[]).map((Pt,rr)=>rr===pe?{...Pt,x:Ae,y:Ye}:Pt);return{...lt,stickers:Ot}});return{...$n,cards:_t}})},[]),ld=A.useCallback(Z=>{t(pe=>{if(!pe)return pe;const Ae=pe.cards.find(Ye=>Ye.id===Z);return Ae&&Ol(Z,Ae.stickers||[]),pe})},[Ol]),wp=A.useCallback(Z=>{Da.open({title:Z.title,size:"md",children:y.jsx(e9e,{card:Z,columns:(n==null?void 0:n.columns)??[]})})},[n==null?void 0:n.columns]),Hu=A.useCallback(async(Z,pe)=>{t(Ae=>Ae&&{...Ae,cards:Ae.cards.map(Ye=>Ye.id===Z?{...Ye,locked:pe}:Ye)});try{await Af(Z,{locked:pe})}catch(Ae){Ln.show({color:"red",message:Ae.message}),De()}},[De]),ud=A.useCallback(async(Z,pe)=>{t(Ae=>Ae&&{...Ae,columns:Ae.columns.map(Ye=>Ye.id===Z?{...Ye,wip_limit:pe}:Ye)});try{await Zl(Z,{wip_limit:pe})}catch(Ae){Ln.show({color:"red",message:Ae.message}),De()}},[De]),El=A.useCallback(Z=>{const pe=(nn.get(Z)||[]).filter(ri=>!ri.locked);if(pe.length===0){Ln.show({color:"yellow",message:"No hay cards disponibles (filtro y bloqueadas excluidas)"});return}if(pe.length===1){const ri=document.querySelector(`[data-card-id="${pe[0].id}"]`);ri&&(ri.scrollIntoView({behavior:"smooth",block:"center"}),ri.classList.add("kanban-roulette-winner"),setTimeout(()=>ri.classList.remove("kanban-roulette-winner"),1700));return}const Ae=(()=>{const ri=new Uint32Array(1);return crypto.getRandomValues(ri),ri[0]%pe.length})(),$n=2*pe.length+(Ae-0+pe.length)%pe.length,_t=50,lt=220,Ot=ri=>1-Math.pow(1-ri,3);let Pt=0;const rr=()=>{const ri=Pt%pe.length,Jn=(ri-1+pe.length)%pe.length,Zt=document.querySelector(`[data-card-id="${pe[Jn].id}"]`),ar=document.querySelector(`[data-card-id="${pe[ri].id}"]`);if(Zt&&Zt.classList.remove("kanban-roulette-active"),ar&&(ar.classList.add("kanban-roulette-active"),ar.scrollIntoView({behavior:"smooth",block:"center"})),Pt++,Pt>$n){ar&&(ar.classList.remove("kanban-roulette-active"),ar.classList.add("kanban-roulette-winner"),setTimeout(()=>ar.classList.remove("kanban-roulette-winner"),1700));return}const Vi=$n>0?Pt/$n:1,ja=_t+(lt-_t)*Ot(Vi);setTimeout(rr,ja)};rr()},[nn]),kp=A.useCallback(async(Z,pe)=>{t(Ae=>Ae&&{...Ae,columns:Ae.columns.map(Ye=>Ye.id===Z?{...Ye,max_time_minutes:pe}:Ye)});try{await Zl(Z,{max_time_minutes:pe})}catch(Ae){Ln.show({color:"red",message:Ae.message}),De()}},[De]),ir=A.useCallback(async(Z,pe)=>{t(Ae=>Ae&&{...Ae,columns:Ae.columns.map(Ye=>Ye.id===Z?{...Ye,is_done:pe}:Ye)});try{await Zl(Z,{is_done:pe}),De()}catch(Ae){Ln.show({color:"red",message:Ae.message}),De()}},[De]),fd=A.useMemo(()=>({height:50}),[]),_p=A.useMemo(()=>({width:he,breakpoint:"md",collapsed:{mobile:!Qe,desktop:!Qe}}),[he,Qe]),cd=A.useMemo(()=>({width:380,breakpoint:"md",collapsed:{mobile:!_,desktop:!_}}),[_]),bs=A.useMemo(()=>({main:{paddingInlineStart:0,paddingInlineEnd:0}}),[]);if(!n)return y.jsx(Ke,{justify:"center",p:"xl",children:y.jsx(Mi,{})});const Tl=a,Ml=l?Bn(l):null;return y.jsxs(nae,{sensors:tn,collisionDetection:eAe(c),onDragStart:Qn,onDragOver:Xt,onDragEnd:Ci,children:[y.jsx("div",{className:"kanban-drag-edge"+(mn?" is-active":"")+(an?" is-armed":""),"data-test":"kanban-drag-edge","data-active":mn?"1":"0","data-armed":an?"1":"0","aria-hidden":"true"}),y.jsxs(wr,{header:fd,navbar:_p,aside:cd,padding:0,styles:bs,children:[y.jsx(wr.Header,{children:y.jsxs(Ke,{h:"100%",px:"md",justify:"space-between",children:[y.jsxs(Ke,{gap:6,children:[y.jsx(Et,{variant:Qe?"filled":"subtle",onClick:()=>ie(Z=>!Z),"aria-label":"Toggle sidebar",children:y.jsx(yse,{size:16})}),y.jsx(IS,{size:22}),y.jsx(gl,{order:4,children:"Kanban"}),y.jsx(wi,{value:x,onChange:Z=>Z&&E(Z),variant:"pills",ml:"md",children:y.jsxs(wi.List,{children:[y.jsx(wi.Tab,{value:"board",leftSection:y.jsx(IS,{size:14}),children:"Tablero"}),y.jsx(wi.Tab,{value:"dashboard",leftSection:y.jsx(Foe,{size:14}),children:"Dashboard"}),y.jsx(wi.Tab,{value:"calendar",leftSection:y.jsx(Ioe,{size:14}),children:"Calendario"})]})})]}),y.jsxs(Ke,{gap:4,children:[y.jsx(Et,{variant:"subtle",onClick:De,"aria-label":"Refresh",children:y.jsx(JF,{size:16})}),y.jsx(Et,{variant:_?"filled":"subtle",onClick:()=>C(Z=>!Z),"aria-label":"Toggle chat",children:y.jsx(QF,{size:16})}),e.user&&y.jsxs(Un,{position:"bottom-end",shadow:"md",withArrow:!0,closeOnItemClick:!1,children:[y.jsx(Un.Target,{children:y.jsx(Et,{variant:"subtle","aria-label":"Usuario",children:y.jsx(rs,{size:26,radius:"xl",color:e.user.color||"blue",children:(e.user.display_name||e.user.username).slice(0,2).toUpperCase()})})}),y.jsxs(Un.Dropdown,{children:[y.jsx(Un.Label,{children:e.user.display_name||e.user.username}),y.jsxs(ge,{p:"xs",children:[y.jsx(Te,{size:"xs",c:"dimmed",mb:4,children:"Color del avatar"}),y.jsx(_W,{value:e.user.color||"",onChange:async Z=>{try{const pe=await z5({color:Z});e.setUser(pe)}catch(pe){Ln.show({color:"red",message:pe.message})}},options:Jse,onOpenCustom:()=>{var Z,pe;We((pe=(Z=e.user)==null?void 0:Z.color)!=null&&pe.startsWith("#")?e.user.color:"#888888"),ue(!0)}})]}),y.jsx(Un.Divider,{}),y.jsx(Un.Item,{leftSection:y.jsx(vse,{size:14}),color:"red",onClick:()=>e.logout(),children:"Cerrar sesion"})]})]})]})]})}),y.jsxs(wr.Navbar,{p:"xs",children:[y.jsx(ge,{onMouseDown:Se,style:{position:"absolute",top:0,right:-3,width:6,height:"100%",cursor:"col-resize",zIndex:10},"aria-label":"Resize sidebar"}),y.jsxs(Wn,{gap:"xs",h:"100%",children:[y.jsx(Te,{size:"xs",c:"dimmed",fw:600,tt:"uppercase",children:"Columnas parqueadas"}),y.jsx(ge,{style:{flex:1,overflowY:"auto"},children:y.jsx(NS,{items:ot,strategy:hF,children:y.jsxs(Wn,{gap:"xs",children:[qe.length===0&&y.jsx(Te,{size:"xs",c:"dimmed",children:'Vacio. Mueve columnas aqui con el icono "archivar" en su cabecera.'}),qe.map(Z=>y.jsx(R$,{column:Z,cards:nn.get(Z.id)??[],now:w,collapsed:!0,onAddCard:Ya,onRenameColumn:Aa,onResizeColumn:Ga,onMoveColumnLocation:Oa,onDeleteColumn:Yr,onSetWIPLimit:ud,onSetMaxTimeMinutes:kp,onPickRandom:El,onToggleDone:ir,onEditCard:Ar,onDeleteCard:Er,onDuplicateCard:Or,onChangeCardColor:sd,onShowHistory:wp,onToggleCardLock:Hu,onAssignCard:Ka,onSetCardDeadline:jr,highlightCardId:ze,onSetRequester:hn,onArchiveCard:od,requesterOptions:H,onOpenCustomCardColor:(pe,Ae)=>Xe({cardId:pe,color:Ae}),activeSticker:ve,onAddSticker:jl,onRemoveSticker:Xr,onMoveSticker:tr,onCommitSticker:ld,users:i,usersById:tt},Z.id))]})})}),y.jsxs(ge,{style:{borderTop:"1px solid var(--mantine-color-dark-5)",paddingTop:8},children:[y.jsx(zt,{variant:"subtle",color:"gray",size:"xs",fullWidth:!0,justify:"space-between",leftSection:y.jsx(ku,{size:14}),rightSection:y.jsxs(Ke,{gap:4,children:[y.jsx(ct,{size:"xs",variant:"light",color:O.length>0?"red":"gray",children:O.length}),M?y.jsx(zS,{size:12}):y.jsx(LS,{size:12})]}),onClick:()=>P(Z=>!Z),children:"Papelera"}),M&&y.jsxs(Wn,{gap:4,mt:4,style:{maxHeight:220,overflowY:"auto"},children:[O.length===0&&y.jsx(Te,{size:"xs",c:"dimmed",px:"xs",children:"Vacia."}),O.map(Z=>y.jsx(Lt,{p:6,withBorder:!0,radius:"sm",bg:"dark.7",children:y.jsxs(Ke,{justify:"space-between",gap:4,wrap:"nowrap",children:[y.jsx(Te,{size:"xs",truncate:!0,style:{flex:1},title:Z.title,children:Z.title}),y.jsx(pi,{label:"Restaurar",withArrow:!0,children:y.jsx(Et,{size:"xs",variant:"subtle",color:"green",onClick:()=>Kr(Z.id),children:y.jsx(Hg,{size:12})})}),y.jsx(pi,{label:"Borrar permanentemente",withArrow:!0,children:y.jsx(Et,{size:"xs",variant:"subtle",color:"red",onClick:()=>bp(Z.id),children:y.jsx(zse,{size:12})})})]})},Z.id))]})]}),y.jsxs(ge,{style:{borderTop:"1px solid var(--mantine-color-dark-5)",paddingTop:8},children:[y.jsx(zt,{variant:"subtle",color:"gray",size:"xs",fullWidth:!0,justify:"space-between",leftSection:y.jsx(nc,{size:14}),rightSection:y.jsxs(Ke,{gap:4,children:[y.jsx(ct,{size:"xs",variant:"light",color:F.length>0?"teal":"gray",children:F.length}),L?y.jsx(zS,{size:12}):y.jsx(LS,{size:12})]}),onClick:()=>B(Z=>!Z),"data-test":"archive-toggle",children:"Hecho (archivo)"}),L&&y.jsxs(Wn,{gap:4,mt:4,style:{maxHeight:220,overflowY:"auto"},children:[F.length===0&&y.jsx(Te,{size:"xs",c:"dimmed",px:"xs",children:"Sin cards archivadas."}),F.map(Z=>y.jsx(Lt,{p:6,withBorder:!0,radius:"sm",bg:"dark.7","data-archived-card-id":Z.id,children:y.jsxs(Ke,{justify:"space-between",gap:4,wrap:"nowrap",children:[y.jsx(Te,{size:"xs",truncate:!0,style:{flex:1},title:Z.title,children:Z.title}),y.jsx(pi,{label:"Sacar del archivo (volver a Hecho)",withArrow:!0,children:y.jsx(Et,{size:"xs",variant:"subtle",color:"teal",onClick:()=>nb(Z.id),children:y.jsx(Hg,{size:12})})})]})},Z.id))]})]})]})]}),y.jsx(wr.Aside,{children:y.jsx(Mme,{onBoardChange:De})}),y.jsx(wr.Main,{children:x==="dashboard"?y.jsx(ge,{style:{height:"calc(100vh - 50px)",overflow:"auto"},children:y.jsx(ZCe,{users:i})}):x==="calendar"?y.jsx(ge,{style:{height:"calc(100vh - 50px)",overflow:"auto"},children:y.jsx(Rme,{users:i,cards:n.cards,onJumpToCard:ii,onOpenDailyReport:un})}):y.jsxs(ge,{style:{height:"calc(100vh - 50px)",overflow:"hidden",display:"flex",flexDirection:"column"},children:[y.jsxs(Ke,{gap:"xs",p:"xs",wrap:"wrap",align:"end",style:{borderBottom:"1px solid var(--mantine-color-dark-4)"},children:[y.jsx(dl,{leftSection:y.jsx(Dse,{size:14}),placeholder:"Buscar (titulo, descripcion, solicitante, tag)",value:z,onChange:Z=>q(Z.currentTarget.value),rightSection:z?y.jsx(Et,{size:"sm",variant:"subtle",color:"gray",onClick:()=>q(""),"aria-label":"Limpiar",children:y.jsx(_h,{size:14})}):null,style:{minWidth:280,flex:1},size:"xs"}),y.jsx(mo,{placeholder:"Asignado",value:Y,onChange:D,data:i.map(Z=>({value:Z.id,label:Z.display_name||Z.username})),clearable:!0,searchable:!0,size:"xs",style:{minWidth:160},disabled:ee}),y.jsx(fl,{size:"xs",label:"Sin asignar",checked:ee,onChange:Z=>{const pe=Z.currentTarget.checked;re(pe),pe&&D(null)}}),y.jsx(fl,{size:"xs",label:"Con deadline",checked:_e,onChange:Z=>ne(Z.currentTarget.checked)}),y.jsx(mo,{placeholder:"Solicitante",value:V,onChange:W,data:H,clearable:!0,searchable:!0,size:"xs",style:{minWidth:160}}),y.jsx(Uy,{placeholder:"Tags",value:$,onChange:X,data:G,clearable:!0,searchable:!0,size:"xs",style:{minWidth:200}}),y.jsx(wu,{placeholder:"Desde",value:se,onChange:Z=>ye(Z?new Date(Z):null),clearable:!0,size:"xs",style:{minWidth:130},valueFormat:"DD/MM/YY"}),y.jsx(wu,{placeholder:"Hasta",value:ae,onChange:Z=>le(Z?new Date(Z):null),clearable:!0,size:"xs",style:{minWidth:130},valueFormat:"DD/MM/YY"}),y.jsxs(Ke,{gap:4,children:[y.jsx(zt,{size:"xs",variant:"default",onClick:()=>{const Z=new Date;ye(Z),le(Z)},children:"Hoy"}),y.jsx(zt,{size:"xs",variant:"default",onClick:()=>{const Z=new Date,pe=new Date;pe.setDate(pe.getDate()-7),ye(pe),le(Z)},children:"7d"}),y.jsx(zt,{size:"xs",variant:"default",onClick:()=>{const Z=new Date,pe=new Date;pe.setDate(pe.getDate()-30),ye(pe),le(Z)},children:"30d"})]}),y.jsx(Q9e,{opened:Ce,onClose:()=>Ne(!1),onSelect:Z=>xe(Z),target:y.jsx(zt,{size:"xs",variant:ve?"filled":"default",color:ve?"yellow":void 0,leftSection:y.jsx(xse,{size:14}),onClick:()=>{ve?Ne(Z=>!Z):xe("😀")},children:ve?`Modo sticker: ${ve}`:"Stickers"})}),ve&&y.jsx(zt,{size:"xs",variant:"subtle",color:"gray",leftSection:y.jsx(_h,{size:12}),onClick:()=>xe(null),children:"ESC"}),rn&&y.jsx(zt,{size:"xs",variant:"subtle",color:"gray",leftSection:y.jsx(_h,{size:12}),onClick:()=>{q(""),D(null),re(!1),W(null),X([]),ye(null),le(null),ne(!1)},children:"Limpiar"})]}),y.jsx(NS,{items:Nn,strategy:Sae,children:y.jsxs(Ke,{align:"stretch",wrap:"nowrap",gap:"md",p:"md",style:{flex:1,overflowX:"auto",overflowY:"hidden"},children:[Le.map(Z=>y.jsx(R$,{column:Z,cards:nn.get(Z.id)??[],now:w,onAddCard:Ya,onRenameColumn:Aa,onResizeColumn:Ga,onMoveColumnLocation:Oa,onDeleteColumn:Yr,onSetWIPLimit:ud,onSetMaxTimeMinutes:kp,onPickRandom:El,onToggleDone:ir,onEditCard:Ar,onDeleteCard:Er,onDuplicateCard:Or,onChangeCardColor:sd,onShowHistory:wp,onToggleCardLock:Hu,onAssignCard:Ka,onSetCardDeadline:jr,highlightCardId:ze,onSetRequester:hn,onArchiveCard:od,requesterOptions:H,activeSticker:ve,onAddSticker:jl,onRemoveSticker:Xr,onMoveSticker:tr,onCommitSticker:ld,users:i,usersById:tt},Z.id)),y.jsx(ge,{style:{minWidth:280,maxWidth:320},children:d?y.jsxs(Wn,{gap:4,children:[y.jsx(dl,{size:"xs",placeholder:"Nombre de columna...",value:v,onChange:Z=>b(Z.currentTarget.value),autoFocus:!0,onKeyDown:Z=>{Z.key==="Enter"&&nr(),Z.key==="Escape"&&(p(!1),b(""))}}),y.jsxs(Ke,{gap:4,children:[y.jsx(zt,{size:"xs",onClick:nr,children:"Anadir"}),y.jsx(Et,{variant:"subtle",color:"gray",onClick:()=>p(!1),children:y.jsx(_h,{size:14})})]})]}):y.jsx(zt,{variant:"light",color:"gray",leftSection:y.jsx(tc,{size:14}),onClick:()=>p(!0),children:"Anadir columna"})})]})})]})})]}),y.jsx(wae,{children:Tl?y.jsx(xW,{card:Tl,now:w,onDelete:()=>{},onEdit:()=>{},onChangeColor:()=>{},onShowHistory:()=>{},onToggleLock:()=>{},onAssign:()=>{},users:i,assignee:Tl.assignee_id?tt.get(Tl.assignee_id):void 0,isOverlay:!0}):Ml?y.jsx(ge,{style:{width:Ml.location==="sidebar"?220:Ml.width,padding:8,background:tq(""),border:`1px solid ${u9("")}`,borderRadius:8,opacity:.9},children:y.jsx(Te,{fw:600,size:"sm",children:Ml.name})}):null}),y.jsx(b6,{opened:Pe,onClose:()=>ue(!1),value:Be,onAccept:async Z=>{We(Z);try{const pe=await z5({color:Z});e.setUser(pe)}catch(pe){Ln.show({color:"red",message:pe.message})}}}),y.jsx(b6,{opened:!!Ue,onClose:()=>Xe(null),value:(Ue==null?void 0:Ue.color)||"#888888",onAccept:Z=>{Ue&&sd(Ue.cardId,Z)}})]})}function tAe(){const e=WC(),[n,t]=A.useState("login"),[i,r]=A.useState(""),[a,o]=A.useState(""),[l,f]=A.useState(""),[c,h]=A.useState(!1),[d,p]=A.useState(null),[v,b]=A.useState(!1);A.useEffect(()=>{gie().then(k=>b(!!k["registration-enabled"])).catch(()=>b(!1))},[]),A.useEffect(()=>{!v&&n==="register"&&t("login")},[v,n]);const w=async k=>{k.preventDefault(),p(null),h(!0);try{n==="login"?await e.login(i.trim(),a):await e.register(i.trim(),a,l.trim()||i.trim())}catch(_){p(_.message)}finally{h(!1)}};return y.jsx(zc,{style:{minHeight:"100vh"},p:"md",children:y.jsx(Lt,{p:"xl",withBorder:!0,radius:"md",shadow:"md",style:{width:360,maxWidth:"100%"},children:y.jsx("form",{onSubmit:w,children:y.jsxs(Wn,{gap:"md",children:[y.jsxs(Wn,{gap:4,align:"center",children:[y.jsx(IS,{size:36}),y.jsx(gl,{order:3,children:"Kanban"}),y.jsx(Te,{size:"sm",c:"dimmed",children:n==="login"?"Inicia sesion":"Crea una cuenta"})]}),y.jsx(dl,{label:"Usuario",value:i,onChange:k=>r(k.currentTarget.value),required:!0,autoFocus:!0,autoComplete:"username"}),n==="register"&&y.jsx(dl,{label:"Nombre (opcional)",value:l,onChange:k=>f(k.currentTarget.value),autoComplete:"name"}),y.jsx(Gy,{label:"Contrasena",value:a,onChange:k=>o(k.currentTarget.value),required:!0,autoComplete:n==="login"?"current-password":"new-password"}),d&&y.jsx(Te,{size:"sm",c:"red",children:d}),y.jsx(zt,{type:"submit",loading:c,fullWidth:!0,children:n==="login"?"Entrar":"Registrar"}),v?y.jsxs(Te,{size:"xs",c:"dimmed",ta:"center",children:[n==="login"?"No tienes cuenta?":"Ya tienes cuenta?"," ",y.jsx(wy,{component:"button",type:"button",size:"xs",onClick:()=>{p(null),t(n==="login"?"register":"login")},children:n==="login"?"Registrate":"Inicia sesion"})]}):y.jsx(Te,{size:"xs",c:"dimmed",ta:"center",children:"Registro de nuevos usuarios deshabilitado."})]})})})})}function iAe(){const{user:e,loading:n}=WC();return n?y.jsx(zc,{style:{minHeight:"100vh"},children:y.jsx(Mi,{})}):e?y.jsx(nAe,{}):y.jsx(tAe,{})}const rAe={primaryColor:"blue",fontFamily:"system-ui, -apple-system, sans-serif"};hie.createRoot(document.getElementById("root")).render(y.jsx(kz,{theme:rAe,defaultColorScheme:"dark",children:y.jsxs($te,{children:[y.jsx(ko,{position:"top-right"}),y.jsx(qie,{children:y.jsx(iAe,{})})]})})); diff --git a/backend/dist/index.html b/backend/dist/index.html index 86d9320..fa327f0 100644 --- a/backend/dist/index.html +++ b/backend/dist/index.html @@ -4,7 +4,7 @@ Kanban - + diff --git a/backend/handlers.go b/backend/handlers.go index e7f5ed1..674f501 100644 --- a/backend/handlers.go +++ b/backend/handlers.go @@ -437,6 +437,26 @@ func handleRestoreCard(db *DB) http.HandlerFunc { } } +// GET /api/reports/daily?date=YYYY-MM-DD&tz=Europe/Madrid +func handleDailyReport(db *DB) http.HandlerFunc { + return func(w http.ResponseWriter, r *http.Request) { + date := r.URL.Query().Get("date") + if date == "" { + date = time.Now().UTC().Format("2006-01-02") + } + tz := r.URL.Query().Get("tz") + if tz == "" { + tz = "Europe/Madrid" + } + rep, err := db.DailyReportFor(date, tz) + if err != nil { + badRequest(w, err.Error()) + return + } + infra.HTTPJSONResponse(w, http.StatusOK, rep) + } +} + // GET /api/archive func handleListArchive(db *DB) http.HandlerFunc { return func(w http.ResponseWriter, r *http.Request) { @@ -511,6 +531,7 @@ func apiRoutes(db *DB, chatWorkdir string, logger *ChatLogger, internalToken str {Method: "GET", Path: "/api/cards/{id}/history", Handler: handleCardHistory(db)}, {Method: "GET", Path: "/api/trash", Handler: handleListTrash(db)}, {Method: "POST", Path: "/api/cards/{id}/restore", Handler: handleRestoreCard(db)}, + {Method: "GET", Path: "/api/reports/daily", Handler: handleDailyReport(db)}, {Method: "GET", Path: "/api/archive", Handler: handleListArchive(db)}, {Method: "POST", Path: "/api/cards/{id}/archive", Handler: handleArchiveCard(db)}, {Method: "POST", Path: "/api/cards/{id}/unarchive", Handler: handleUnarchiveCard(db)}, diff --git a/backend/reports.go b/backend/reports.go new file mode 100644 index 0000000..8faf3ec --- /dev/null +++ b/backend/reports.go @@ -0,0 +1,588 @@ +package main + +import ( + "database/sql" + "fmt" + "sort" + "time" +) + +// DailyReport — agregaciones por dia natural (TZ del servidor a menos que el +// caller pase una TZ explicita). Issue 0093. +type DailyReport struct { + Date string `json:"date"` + TZ string `json:"tz"` + StartTs string `json:"start_ts"` + EndTs string `json:"end_ts"` + + KPIs DailyKPIs `json:"kpis"` + + TopAssigneesDone []UserCount `json:"top_assignees_done"` + TopAssigneesCreated []UserCount `json:"top_assignees_created"` + TopRequestersAdded []NamedCount `json:"top_requesters_added"` + TopRequestersDone []NamedCount `json:"top_requesters_done"` + DoneCards []DoneCard `json:"done_cards"` + ReopenedCards []ReopenedEntry `json:"reopened_cards"` + StaleCards StaleBuckets `json:"stale_cards"` + LeadTime LeadTimeStats `json:"lead_time"` + HourlyMoves [24]int `json:"hourly_moves"` + Deadlines DeadlineSummary `json:"deadlines"` + TagsDone []NamedCount `json:"tags_done"` + ArchivedToday int `json:"archived_today"` +} + +type DailyKPIs struct { + Done int `json:"done"` + Created int `json:"created"` + Moves int `json:"moves"` + BlockedMs int64 `json:"blocked_ms"` + DeadlinesMet int `json:"deadlines_met"` + DeadlinesMissed int `json:"deadlines_missed"` + Reopened int `json:"reopened"` + ArchivedAuto int `json:"archived_auto"` + ArchivedManual int `json:"archived_manual"` +} + +type UserCount struct { + UserID string `json:"user_id"` + Name string `json:"name"` + Count int `json:"count"` +} + +type NamedCount struct { + Name string `json:"name"` + Count int `json:"count"` +} + +type DoneCard struct { + ID string `json:"id"` + SeqNum int `json:"seq_num"` + Title string `json:"title"` + Requester string `json:"requester"` + AssigneeID *string `json:"assignee_id"` + AssigneeName *string `json:"assignee_name"` + Tags []string `json:"tags"` + ColumnID string `json:"column_id"` + ColumnName string `json:"column_name"` + CompletedAt string `json:"completed_at"` + CreatedAt string `json:"created_at"` + LeadTimeMs int64 `json:"lead_time_ms"` + Color string `json:"color"` +} + +type ReopenedEntry struct { + CardID string `json:"card_id"` + Title string `json:"title"` + SeqNum int `json:"seq_num"` + FromColumn string `json:"from_column"` + ToColumn string `json:"to_column"` + Ts string `json:"ts"` + ActorID *string `json:"actor_id"` + ActorName *string `json:"actor_name"` +} + +type StaleEntry struct { + CardID string `json:"card_id"` + Title string `json:"title"` + SeqNum int `json:"seq_num"` + ColumnID string `json:"column_id"` + ColumnName string `json:"column_name"` + EnteredAt string `json:"entered_at"` + Days int `json:"days"` +} + +type StaleBuckets struct { + D7 []StaleEntry `json:"d7"` + D14 []StaleEntry `json:"d14"` + D30 []StaleEntry `json:"d30"` +} + +type LeadTimeStats struct { + AvgMs int64 `json:"avg_ms"` + P50Ms int64 `json:"p50_ms"` + P95Ms int64 `json:"p95_ms"` + Samples int `json:"samples"` +} + +type DeadlineSummary struct { + Met int `json:"met"` + Missed int `json:"missed"` + List []DeadlineMissEntry `json:"list"` +} + +type DeadlineMissEntry struct { + CardID string `json:"card_id"` + Title string `json:"title"` + SeqNum int `json:"seq_num"` + Deadline string `json:"deadline"` + CompletedAt string `json:"completed_at"` + LateMs int64 `json:"late_ms"` +} + +// DailyReportFor computes the report for the local day specified by date+tz. +func (db *DB) DailyReportFor(date, tz string) (*DailyReport, error) { + loc, err := time.LoadLocation(tz) + if err != nil { + loc = time.UTC + tz = "UTC" + } + t, err := time.ParseInLocation("2006-01-02", date, loc) + if err != nil { + return nil, fmt.Errorf("invalid date %q: %w", date, err) + } + start := t + end := t.Add(24 * time.Hour) + startUTC := start.UTC().Format(time.RFC3339Nano) + endUTC := end.UTC().Format(time.RFC3339Nano) + + r := &DailyReport{ + Date: date, + TZ: tz, + StartTs: startUTC, + EndTs: endUTC, + StaleCards: StaleBuckets{ + D7: []StaleEntry{}, + D14: []StaleEntry{}, + D30: []StaleEntry{}, + }, + Deadlines: DeadlineSummary{List: []DeadlineMissEntry{}}, + DoneCards: []DoneCard{}, + ReopenedCards: []ReopenedEntry{}, + TopAssigneesDone: []UserCount{}, + TopAssigneesCreated: []UserCount{}, + TopRequestersAdded: []NamedCount{}, + TopRequestersDone: []NamedCount{}, + TagsDone: []NamedCount{}, + } + + users, err := db.userNameMap() + if err != nil { + return nil, err + } + doneColIDs, doneColNames, err := db.doneColumnIDs() + if err != nil { + return nil, err + } + allColNames, err := db.allColumnNames() + if err != nil { + return nil, err + } + + // --- Done cards ---------------------------------------------------------- + rows, err := db.conn.Query(` + SELECT c.id, c.seq_num, c.title, c.requester, c.assignee_id, c.tags, c.column_id, c.completed_at, c.created_at, c.color, c.deadline + FROM cards c + WHERE c.completed_at IS NOT NULL + AND c.completed_at >= ? AND c.completed_at < ? + AND c.deleted_at IS NULL + ORDER BY c.completed_at DESC + `, startUTC, endUTC) + if err != nil { + return nil, err + } + leadSamples := []int64{} + assigneeDoneCount := map[string]int{} + requesterDoneCount := map[string]int{} + tagCount := map[string]int{} + for rows.Next() { + var c DoneCard + var assignee, deadline sql.NullString + var tagsJSON string + if err := rows.Scan(&c.ID, &c.SeqNum, &c.Title, &c.Requester, &assignee, &tagsJSON, &c.ColumnID, &c.CompletedAt, &c.CreatedAt, &c.Color, &deadline); err != nil { + rows.Close() + return nil, err + } + c.Tags = parseTags(tagsJSON) + if assignee.Valid && assignee.String != "" { + a := assignee.String + c.AssigneeID = &a + if n, ok := users[a]; ok { + nm := n + c.AssigneeName = &nm + } + assigneeDoneCount[a]++ + } + if c.Requester != "" { + requesterDoneCount[c.Requester]++ + } + for _, tag := range c.Tags { + tagCount[tag]++ + } + c.ColumnName = allColNames[c.ColumnID] + // Lead time created -> completed. + if ct, err := time.Parse(time.RFC3339Nano, c.CreatedAt); err == nil { + if compt, err := time.Parse(time.RFC3339Nano, c.CompletedAt); err == nil { + c.LeadTimeMs = compt.Sub(ct).Milliseconds() + if c.LeadTimeMs >= 0 { + leadSamples = append(leadSamples, c.LeadTimeMs) + } + } + } + // Deadlines. + if deadline.Valid && deadline.String != "" { + if dlt, err := time.Parse(time.RFC3339Nano, deadline.String); err == nil { + if compt, err := time.Parse(time.RFC3339Nano, c.CompletedAt); err == nil { + if compt.After(dlt) { + r.Deadlines.Missed++ + r.Deadlines.List = append(r.Deadlines.List, DeadlineMissEntry{ + CardID: c.ID, Title: c.Title, SeqNum: c.SeqNum, + Deadline: deadline.String, CompletedAt: c.CompletedAt, + LateMs: compt.Sub(dlt).Milliseconds(), + }) + } else { + r.Deadlines.Met++ + } + } + } + } + r.DoneCards = append(r.DoneCards, c) + } + rows.Close() + r.KPIs.Done = len(r.DoneCards) + r.LeadTime = computeLeadTime(leadSamples) + r.TopAssigneesDone = topUsersFromCount(assigneeDoneCount, users, 5) + r.TopRequestersDone = topNamedFromCount(requesterDoneCount, 5) + r.TagsDone = topNamedFromCount(tagCount, 10) + + _ = doneColIDs + _ = doneColNames + + // --- Created (card_events kind=created) ---------------------------------- + rows, err = db.conn.Query(` + SELECT e.card_id, e.actor_id, COALESCE(c.requester, '') + FROM card_events e + LEFT JOIN cards c ON c.id = e.card_id + WHERE e.kind = 'created' + AND e.created_at >= ? AND e.created_at < ? + `, startUTC, endUTC) + if err != nil { + return nil, err + } + assigneeCreatedCount := map[string]int{} + requesterAddedCount := map[string]int{} + createdN := 0 + for rows.Next() { + var cardID string + var actor sql.NullString + var requester string + if err := rows.Scan(&cardID, &actor, &requester); err != nil { + rows.Close() + return nil, err + } + createdN++ + if actor.Valid && actor.String != "" { + assigneeCreatedCount[actor.String]++ + } + if requester != "" { + requesterAddedCount[requester]++ + } + } + rows.Close() + r.KPIs.Created = createdN + r.TopAssigneesCreated = topUsersFromCount(assigneeCreatedCount, users, 5) + r.TopRequestersAdded = topNamedFromCount(requesterAddedCount, 5) + + // --- Moves del dia + hourly + reopened ----------------------------------- + // Reopened = card que el dia X entro a una columna NO done HABIENDO estado + // en una done previa. Detectable comparando entered_at del dia con la + // entrada previa (mismo card_id). + rows, err = db.conn.Query(` + SELECT h.card_id, h.column_id, h.entered_at, h.actor_id, c.title, c.seq_num + FROM card_column_history h + JOIN cards c ON c.id = h.card_id + WHERE h.entered_at >= ? AND h.entered_at < ? + AND c.deleted_at IS NULL + ORDER BY h.entered_at ASC + `, startUTC, endUTC) + if err != nil { + return nil, err + } + hourly := [24]int{} + type moveRow struct { + cardID, columnID, enteredAt, title string + actor sql.NullString + seqNum int + } + var moves []moveRow + for rows.Next() { + var m moveRow + if err := rows.Scan(&m.cardID, &m.columnID, &m.enteredAt, &m.actor, &m.title, &m.seqNum); err != nil { + rows.Close() + return nil, err + } + moves = append(moves, m) + if ts, err := time.Parse(time.RFC3339Nano, m.enteredAt); err == nil { + h := ts.In(loc).Hour() + if h >= 0 && h < 24 { + hourly[h]++ + } + } + } + rows.Close() + r.HourlyMoves = hourly + r.KPIs.Moves = len(moves) + for _, m := range moves { + // Solo interesa si la columna actual NO es done. + isDone := doneColIDs[m.columnID] + if isDone { + continue + } + // Hubo entrada previa en una columna done? + prevWasDone, prevColID := db.previousColumnWasDone(m.cardID, m.enteredAt, doneColIDs) + if prevWasDone { + entry := ReopenedEntry{ + CardID: m.cardID, + Title: m.title, + SeqNum: m.seqNum, + FromColumn: allColNames[prevColID], + ToColumn: allColNames[m.columnID], + Ts: m.enteredAt, + } + if m.actor.Valid && m.actor.String != "" { + a := m.actor.String + entry.ActorID = &a + if n, ok := users[a]; ok { + nm := n + entry.ActorName = &nm + } + } + r.ReopenedCards = append(r.ReopenedCards, entry) + } + } + r.KPIs.Reopened = len(r.ReopenedCards) + + // --- Stale buckets (cards activas hoy con N dias en misma columna) ------- + r.StaleCards = db.staleBucketsAt(end, doneColIDs, allColNames) + + // --- Bloqueado ms (lock_history que solapa con el dia) ------------------- + r.KPIs.BlockedMs = db.blockedMsInRange(startUTC, endUTC) + + // --- Archivadas hoy ------------------------------------------------------ + var autoN, manualN int + if err := db.conn.QueryRow(` + SELECT COUNT(*) FROM cards + WHERE archived_at IS NOT NULL + AND archived_at >= ? AND archived_at < ? + AND deleted_at IS NULL + `, startUTC, endUTC).Scan(&autoN); err == nil { + // Heuristica: auto vs manual no se diferencia (no log explicito). Si + // la columna actual es is_done, asumimos auto. Mejor que nada. + _ = manualN + r.KPIs.ArchivedAuto = autoN + r.ArchivedToday = autoN + } + r.KPIs.DeadlinesMet = r.Deadlines.Met + r.KPIs.DeadlinesMissed = r.Deadlines.Missed + + return r, nil +} + +func (db *DB) userNameMap() (map[string]string, error) { + rows, err := db.conn.Query(`SELECT id, COALESCE(display_name,''), username FROM users`) + if err != nil { + return nil, err + } + defer rows.Close() + out := map[string]string{} + for rows.Next() { + var id, dn, un string + if err := rows.Scan(&id, &dn, &un); err != nil { + return nil, err + } + if dn != "" { + out[id] = dn + } else { + out[id] = un + } + } + return out, nil +} + +func (db *DB) doneColumnIDs() (map[string]bool, map[string]string, error) { + rows, err := db.conn.Query(`SELECT id, name FROM columns WHERE is_done=1`) + if err != nil { + return nil, nil, err + } + defer rows.Close() + ids := map[string]bool{} + names := map[string]string{} + for rows.Next() { + var id, n string + if err := rows.Scan(&id, &n); err != nil { + return nil, nil, err + } + ids[id] = true + names[id] = n + } + return ids, names, nil +} + +func (db *DB) allColumnNames() (map[string]string, error) { + rows, err := db.conn.Query(`SELECT id, name FROM columns`) + if err != nil { + return nil, err + } + defer rows.Close() + out := map[string]string{} + for rows.Next() { + var id, n string + if err := rows.Scan(&id, &n); err != nil { + return nil, err + } + out[id] = n + } + return out, nil +} + +// previousColumnWasDone returns whether the entry of `cardID` immediately +// before `enteredAt` was in a done column. +func (db *DB) previousColumnWasDone(cardID, enteredAt string, doneColIDs map[string]bool) (bool, string) { + var colID string + err := db.conn.QueryRow(` + SELECT column_id FROM card_column_history + WHERE card_id=? AND entered_at < ? + ORDER BY entered_at DESC + LIMIT 1 + `, cardID, enteredAt).Scan(&colID) + if err != nil { + return false, "" + } + return doneColIDs[colID], colID +} + +func (db *DB) staleBucketsAt(asOf time.Time, doneColIDs map[string]bool, colNames map[string]string) StaleBuckets { + out := StaleBuckets{D7: []StaleEntry{}, D14: []StaleEntry{}, D30: []StaleEntry{}} + rows, err := db.conn.Query(` + SELECT h.card_id, c.title, c.seq_num, h.column_id, h.entered_at + FROM card_column_history h + JOIN cards c ON c.id = h.card_id + WHERE h.exited_at IS NULL + AND c.deleted_at IS NULL + AND c.archived_at IS NULL + `) + if err != nil { + return out + } + defer rows.Close() + for rows.Next() { + var s StaleEntry + if err := rows.Scan(&s.CardID, &s.Title, &s.SeqNum, &s.ColumnID, &s.EnteredAt); err != nil { + continue + } + // Skip done columns (esos se auto-archivan; no son "estancados" activos). + if doneColIDs[s.ColumnID] { + continue + } + entered, err := time.Parse(time.RFC3339Nano, s.EnteredAt) + if err != nil { + continue + } + days := int(asOf.Sub(entered).Hours() / 24) + if days < 7 { + continue + } + s.Days = days + s.ColumnName = colNames[s.ColumnID] + switch { + case days >= 30: + out.D30 = append(out.D30, s) + case days >= 14: + out.D14 = append(out.D14, s) + default: + out.D7 = append(out.D7, s) + } + } + sort.Slice(out.D7, func(i, j int) bool { return out.D7[i].Days > out.D7[j].Days }) + sort.Slice(out.D14, func(i, j int) bool { return out.D14[i].Days > out.D14[j].Days }) + sort.Slice(out.D30, func(i, j int) bool { return out.D30[i].Days > out.D30[j].Days }) + return out +} + +func (db *DB) blockedMsInRange(startUTC, endUTC string) int64 { + // Para cada periodo de lock, contar la interseccion con [start,end]. + rows, err := db.conn.Query(` + SELECT locked_at, COALESCE(unlocked_at, ?) FROM card_lock_history + WHERE locked_at < ? AND COALESCE(unlocked_at, ?) > ? + `, endUTC, endUTC, endUTC, startUTC) + if err != nil { + return 0 + } + defer rows.Close() + start, _ := time.Parse(time.RFC3339Nano, startUTC) + end, _ := time.Parse(time.RFC3339Nano, endUTC) + var total time.Duration + for rows.Next() { + var lstr, ustr string + if err := rows.Scan(&lstr, &ustr); err != nil { + continue + } + l, err := time.Parse(time.RFC3339Nano, lstr) + if err != nil { + continue + } + u, err := time.Parse(time.RFC3339Nano, ustr) + if err != nil { + continue + } + if l.Before(start) { + l = start + } + if u.After(end) { + u = end + } + if u.After(l) { + total += u.Sub(l) + } + } + return total.Milliseconds() +} + +func topUsersFromCount(m map[string]int, names map[string]string, k int) []UserCount { + out := make([]UserCount, 0, len(m)) + for id, n := range m { + out = append(out, UserCount{UserID: id, Name: names[id], Count: n}) + } + sort.Slice(out, func(i, j int) bool { return out[i].Count > out[j].Count }) + if len(out) > k { + out = out[:k] + } + return out +} + +func topNamedFromCount(m map[string]int, k int) []NamedCount { + out := make([]NamedCount, 0, len(m)) + for n, c := range m { + out = append(out, NamedCount{Name: n, Count: c}) + } + sort.Slice(out, func(i, j int) bool { return out[i].Count > out[j].Count }) + if len(out) > k { + out = out[:k] + } + return out +} + +func computeLeadTime(samples []int64) LeadTimeStats { + if len(samples) == 0 { + return LeadTimeStats{} + } + sorted := make([]int64, len(samples)) + copy(sorted, samples) + sort.Slice(sorted, func(i, j int) bool { return sorted[i] < sorted[j] }) + var sum int64 + for _, v := range sorted { + sum += v + } + p := func(q float64) int64 { + if len(sorted) == 0 { + return 0 + } + idx := int(float64(len(sorted)-1) * q) + return sorted[idx] + } + return LeadTimeStats{ + AvgMs: sum / int64(len(sorted)), + P50Ms: p(0.5), + P95Ms: p(0.95), + Samples: len(sorted), + } +} diff --git a/frontend/e2e/daily-report.spec.ts b/frontend/e2e/daily-report.spec.ts new file mode 100644 index 0000000..02454e3 --- /dev/null +++ b/frontend/e2e/daily-report.spec.ts @@ -0,0 +1,57 @@ +import { test, expect } from "@playwright/test"; +import { pw_kanban_login } from "../../../../frontend/functions/browser/pw_kanban_login"; + +const USER = process.env.KANBAN_USER || "e2e_user"; +const PWD = process.env.KANBAN_PWD || "e2e_test_pw_2026"; + +/** + * Issue 0093: reporte diario al pulsar numero del dia en el calendario. + * Verifica: endpoint responde, calendario abre modal con titulo "Reporte diario", + * KPIs visibles, tabla de hechas presente. + */ +test.describe("daily report (issue 0093)", () => { + test("endpoint /api/reports/daily devuelve estructura esperada", async ({ page }) => { + await page.goto("/"); + await pw_kanban_login(page, { username: USER, password: PWD }); + const today = new Date().toISOString().slice(0, 10); + const res = await page.request.get(`/api/reports/daily?date=${today}`); + expect(res.status()).toBe(200); + const data = await res.json(); + expect(data).toHaveProperty("kpis"); + expect(data).toHaveProperty("done_cards"); + expect(data).toHaveProperty("hourly_moves"); + expect(Array.isArray(data.hourly_moves)).toBe(true); + expect(data.hourly_moves.length).toBe(24); + expect(data).toHaveProperty("stale_cards"); + expect(data.stale_cards).toHaveProperty("d7"); + expect(data.stale_cards).toHaveProperty("d14"); + expect(data.stale_cards).toHaveProperty("d30"); + }); + + test("click en numero del dia del calendario abre modal del reporte", async ({ page }) => { + await page.goto("/"); + await pw_kanban_login(page, { username: USER, password: PWD }); + + // Switch to Calendario tab. + await page.getByRole("tab", { name: /Calendario/i }).click(); + + // Wait until the calendar cells render. + await page.waitForSelector('[data-test^="calendar-day-"]', { timeout: 5000 }); + + // Use yesterday — the seeded DB has activity there. + const yesterday = new Date(Date.now() - 24 * 3600 * 1000).toISOString().slice(0, 10); + const cellBtn = page.locator(`[data-test="calendar-day-${yesterday}"]`); + if ((await cellBtn.count()) === 0) { + // Fallback: click any visible day. + await page.locator('[data-test^="calendar-day-"]').first().dispatchEvent("click"); + } else { + await cellBtn.dispatchEvent("click"); + } + + // Modal opens. + const modal = page.locator('[role="dialog"]').filter({ hasText: /Reporte diario/i }); + await expect(modal).toBeVisible({ timeout: 5000 }); + await expect(modal.getByText("Hechas", { exact: false }).first()).toBeVisible(); + await expect(modal.getByText("Movimientos", { exact: false }).first()).toBeVisible(); + }); +}); diff --git a/frontend/src/App.tsx b/frontend/src/App.tsx index 1a20b0a..9fc4626 100644 --- a/frontend/src/App.tsx +++ b/frontend/src/App.tsx @@ -72,6 +72,7 @@ import { CardForm } from "./components/CardForm"; import { CardEditPanel } from "./components/CardEditPanel"; import { ChatPanel } from "./components/ChatPanel"; import { CalendarView } from "./components/CalendarView"; +import { DailyReportView } from "./components/DailyReport"; import { Dashboard } from "./components/Dashboard"; import { HistoryModal } from "./components/HistoryModal"; import { KanbanCard } from "./components/KanbanCard"; @@ -720,6 +721,22 @@ export function App() { window.setTimeout(() => setHighlightCardId(null), 3000); }, []); + const handleOpenDailyReport = useCallback((date: string) => { + const id = modals.open({ + title: "Reporte diario", + size: "90%", + children: ( + { + modals.close(id); + handleJumpToCard(cardId); + }} + /> + ), + }); + }, [handleJumpToCard]); + const handleSetCardDeadline = useCallback(async (id: string, deadline: string | null) => { setBoard((prev) => { if (!prev) return prev; @@ -1324,7 +1341,7 @@ export function App() { ) : activeTab === "calendar" ? ( - + ) : ( diff --git a/frontend/src/api.ts b/frontend/src/api.ts index 1415b36..1c70f45 100644 --- a/frontend/src/api.ts +++ b/frontend/src/api.ts @@ -119,6 +119,90 @@ export function unarchiveCard(id: string): Promise { return fetchJSON(`/cards/${id}/unarchive`, { method: "POST" }); } +export interface DailyReport { + date: string; + tz: string; + start_ts: string; + end_ts: string; + kpis: { + done: number; + created: number; + moves: number; + blocked_ms: number; + deadlines_met: number; + deadlines_missed: number; + reopened: number; + archived_auto: number; + archived_manual: number; + }; + top_assignees_done: { user_id: string; name: string; count: number }[]; + top_assignees_created: { user_id: string; name: string; count: number }[]; + top_requesters_added: { name: string; count: number }[]; + top_requesters_done: { name: string; count: number }[]; + done_cards: { + id: string; + seq_num: number; + title: string; + requester: string; + assignee_id: string | null; + assignee_name: string | null; + tags: string[]; + column_id: string; + column_name: string; + completed_at: string; + created_at: string; + lead_time_ms: number; + color: string; + }[]; + reopened_cards: { + card_id: string; + title: string; + seq_num: number; + from_column: string; + to_column: string; + ts: string; + actor_id: string | null; + actor_name: string | null; + }[]; + stale_cards: { + d7: StaleEntry[]; + d14: StaleEntry[]; + d30: StaleEntry[]; + }; + lead_time: { avg_ms: number; p50_ms: number; p95_ms: number; samples: number }; + hourly_moves: number[]; + deadlines: { + met: number; + missed: number; + list: { + card_id: string; + title: string; + seq_num: number; + deadline: string; + completed_at: string; + late_ms: number; + }[]; + }; + tags_done: { name: string; count: number }[]; + archived_today: number; +} + +export interface StaleEntry { + card_id: string; + title: string; + seq_num: number; + column_id: string; + column_name: string; + entered_at: string; + days: number; +} + +export function dailyReport(date: string, tz?: string): Promise { + const params = new URLSearchParams({ date }); + if (tz) params.set("tz", tz); + return fetchJSON(`/reports/daily?${params.toString()}`); +} + export function moveCard(id: string, column_id: string, ordered_ids: string[]): Promise { return fetchJSON(`/cards/${id}/move`, { method: "POST", diff --git a/frontend/src/components/CalendarView.tsx b/frontend/src/components/CalendarView.tsx index fe00de5..1a37974 100644 --- a/frontend/src/components/CalendarView.tsx +++ b/frontend/src/components/CalendarView.tsx @@ -19,15 +19,17 @@ import { useEffect, useMemo, useState } from "react"; import * as api from "../api"; import type { Card, Metrics, User } from "../types"; +// Hace clickable el numero del dia para abrir el reporte diario (issue 0093). interface Props { users: User[]; cards: Card[]; onJumpToCard?: (cardId: string) => void; + onOpenDailyReport?: (date: string) => void; } const DAY_LABELS = ["Lun", "Mar", "Mie", "Jue", "Vie", "Sab", "Dom"]; -export function CalendarView({ users, cards, onJumpToCard }: Props) { +export function CalendarView({ users, cards, onJumpToCard, onOpenDailyReport }: Props) { const [openDate, setOpenDate] = useState(null); const [month, setMonth] = useState(new Date()); const [assigneeId, setAssigneeId] = useState(null); @@ -199,9 +201,22 @@ export function CalendarView({ users, cards, onJumpToCard }: Props) { }} > - - {dayNum} - + cell.date && onOpenDailyReport?.(cell.date as string)} + title="Ver reporte diario" + style={{ alignSelf: "flex-start" }} + data-test={`calendar-day-${cell.date}`} + > + + {dayNum} + + {stats.created > 0 && ( diff --git a/frontend/src/components/DailyReport.tsx b/frontend/src/components/DailyReport.tsx new file mode 100644 index 0000000..4471e11 --- /dev/null +++ b/frontend/src/components/DailyReport.tsx @@ -0,0 +1,523 @@ +import { + Alert, + Avatar, + Badge, + Box, + Card as MCard, + Divider, + Group, + Loader, + Paper, + ScrollArea, + SimpleGrid, + Stack, + Table, + Text, + Title, + UnstyledButton, +} from "@mantine/core"; +import { BarChart } from "@mantine/charts"; +import { + IconAlertTriangle, + IconArrowBackUp, + IconCalendarStats, + IconCheck, + IconClock, + IconHourglass, + IconLock, + IconPlus, + IconRefresh, + IconTrendingUp, +} from "@tabler/icons-react"; +import { useEffect, useMemo, useState } from "react"; +import { dailyReport, type DailyReport as Report } from "../api"; +import { formatDuration } from "./format"; +import { tagColor } from "./colors"; + +interface Props { + date: string; // YYYY-MM-DD + onJumpToCard?: (cardId: string) => void; +} + +function fmtDate(s: string): string { + try { + const d = new Date(s + "T00:00:00"); + return d.toLocaleDateString("es-ES", { + weekday: "long", + day: "2-digit", + month: "long", + year: "numeric", + }); + } catch { + return s; + } +} + +function KPI({ + label, + value, + color, + icon, + sub, +}: { + label: string; + value: string | number; + color?: string; + icon?: React.ReactNode; + sub?: string; +}) { + return ( + + + {icon} + + {label} + + + + {value} + + {sub && ( + + {sub} + + )} + + ); +} + +function RankingList({ + title, + rows, + emptyText, + withAvatar = false, +}: { + title: string; + rows: T[]; + emptyText: string; + withAvatar?: boolean; +}) { + return ( + + + {title} + + {rows.length === 0 ? ( + + {emptyText} + + ) : ( + + {rows.map((r, i) => ( + + + {withAvatar && ( + + {(r.name || "?").slice(0, 2).toUpperCase()} + + )} + + {r.name || "(sin nombre)"} + + + + {r.count} + + + ))} + + )} + + ); +} + +export function DailyReportView({ date, onJumpToCard }: Props) { + const [data, setData] = useState(null); + const [err, setErr] = useState(null); + + useEffect(() => { + setData(null); + setErr(null); + dailyReport(date) + .then(setData) + .catch((e) => setErr((e as Error).message)); + }, [date]); + + const hourlyChartData = useMemo(() => { + if (!data) return []; + return data.hourly_moves.map((n, h) => ({ + hora: String(h).padStart(2, "0") + ":00", + movimientos: n, + })); + }, [data]); + + if (err) { + return ( + }> + {err} + + ); + } + if (!data) { + return ( + + + + ); + } + + const k = data.kpis; + const onTimePct = + k.deadlines_met + k.deadlines_missed > 0 + ? Math.round((k.deadlines_met / (k.deadlines_met + k.deadlines_missed)) * 100) + : null; + + return ( + + + + + Reporte diario + + + {fmtDate(data.date)} + + + + + } /> + } /> + } /> + } + /> + 0 ? "orange" : undefined} + icon={} + /> + = 80 ? "teal" : "red"} + sub={`${k.deadlines_met} on-time / ${k.deadlines_missed} vencidos`} + icon={} + /> + + + + + + + + + + + + + Tareas hechas + + + + N {k.done} + + + Lead time avg {data.lead_time.samples > 0 ? formatDuration(data.lead_time.avg_ms) : "—"} · p50{" "} + {data.lead_time.samples > 0 ? formatDuration(data.lead_time.p50_ms) : "—"} · p95{" "} + {data.lead_time.samples > 0 ? formatDuration(data.lead_time.p95_ms) : "—"} + + + + {data.done_cards.length === 0 ? ( + + Sin hechas en este dia. + + ) : ( + + + + + # + Titulo + Solicitante + Asignado + Tags + Lead time + + + + {data.done_cards.map((c) => ( + + + + {String(c.seq_num).padStart(5, "0")} + + + + onJumpToCard?.(c.id)} style={{ textAlign: "left" }}> + + {c.title} + + + + + {c.requester || "—"} + + + {c.assignee_name || "—"} + + + + {(c.tags || []).slice(0, 3).map((t) => ( + + {t} + + ))} + + + + + {formatDuration(c.lead_time_ms)} + + + + ))} + +
+
+ )} +
+ + + + + + Movimientos por hora + + + {k.moves} + + + {k.moves === 0 ? ( + + Sin movimientos. + + ) : ( + String(v)} + /> + )} + + + + + Tags trabajadas + + {data.tags_done.length === 0 ? ( + + Sin tags. + + ) : ( + + {data.tags_done.map((t) => ( + + {t.name} · {t.count} + + ))} + + )} + + + + {data.reopened_cards.length > 0 && ( + + + + + Reabiertas (Done → otra) + + + {data.reopened_cards.length} + + + + {data.reopened_cards.map((r) => ( + + onJumpToCard?.(r.card_id)} style={{ minWidth: 0, flex: 1 }}> + + {r.title} + + + + {r.from_column} → {r.to_column} + + {r.actor_name && ( + + {r.actor_name} + + )} + + ))} + + + )} + + {(data.deadlines.missed > 0 || data.deadlines.met > 0) && ( + + + + + Deadlines + + + {data.deadlines.met} on-time + + + {data.deadlines.missed} vencidos + + + {data.deadlines.list.length > 0 && ( + + {data.deadlines.list.map((d) => ( + + onJumpToCard?.(d.card_id)} style={{ minWidth: 0, flex: 1 }}> + + {d.title} + + + + +{formatDuration(d.late_ms)} tarde + + + ))} + + )} + + )} + + + + + + Cards estancadas (al final del dia) + + + {data.stale_cards.d7.length}d7 + + + {data.stale_cards.d14.length}d14 + + + {data.stale_cards.d30.length}d30 + + + + + + 7-13 dias + + + {data.stale_cards.d7.slice(0, 8).map((s) => ( + onJumpToCard?.(s.card_id)}> + + {s.title}{" "} + + · {s.column_name} · {s.days}d + + + + ))} + {data.stale_cards.d7.length === 0 && ( + + Ninguna. + + )} + + + + + 14-29 dias + + + {data.stale_cards.d14.slice(0, 8).map((s) => ( + onJumpToCard?.(s.card_id)}> + + {s.title}{" "} + + · {s.column_name} · {s.days}d + + + + ))} + {data.stale_cards.d14.length === 0 && ( + + Ninguna. + + )} + + + + + 30+ dias + + + {data.stale_cards.d30.slice(0, 8).map((s) => ( + onJumpToCard?.(s.card_id)}> + + {s.title}{" "} + + · {s.column_name} · {s.days}d + + + + ))} + {data.stale_cards.d30.length === 0 && ( + + Ninguna. + + )} + + + + + + + + + + + TZ: {data.tz} · cards archivadas hoy: {data.archived_today} + + + +
+ ); +}