diff --git a/backend/daily_summary.go b/backend/daily_summary.go new file mode 100644 index 0000000..05b0457 --- /dev/null +++ b/backend/daily_summary.go @@ -0,0 +1,143 @@ +package main + +import ( + "bytes" + "context" + "database/sql" + "encoding/json" + "fmt" + "os/exec" + "strings" + "time" +) + +// DailySummary persisted row. +type DailySummary struct { + Date string `json:"date"` + Summary string `json:"summary"` + Prompt string `json:"prompt"` + Model string `json:"model"` + GeneratedAt string `json:"generated_at"` + GeneratedBy *string `json:"generated_by"` +} + +func (db *DB) GetDailySummary(date string) (*DailySummary, error) { + row := db.conn.QueryRow(`SELECT date, summary, prompt, model, generated_at, generated_by FROM daily_summaries WHERE date=?`, date) + var s DailySummary + var by sql.NullString + if err := row.Scan(&s.Date, &s.Summary, &s.Prompt, &s.Model, &s.GeneratedAt, &by); err != nil { + if err == sql.ErrNoRows { + return nil, nil + } + return nil, err + } + if by.Valid { + v := by.String + s.GeneratedBy = &v + } + return &s, nil +} + +func (db *DB) UpsertDailySummary(s DailySummary) error { + var by any = nil + if s.GeneratedBy != nil { + by = *s.GeneratedBy + } + _, err := db.conn.Exec(` + INSERT INTO daily_summaries (date, summary, prompt, model, generated_at, generated_by) + VALUES (?,?,?,?,?,?) + ON CONFLICT(date) DO UPDATE SET + summary=excluded.summary, + prompt=excluded.prompt, + model=excluded.model, + generated_at=excluded.generated_at, + generated_by=excluded.generated_by + `, s.Date, s.Summary, s.Prompt, s.Model, s.GeneratedAt, by) + return err +} + +func (db *DB) GetSetting(key string) (string, error) { + var v string + err := db.conn.QueryRow(`SELECT value FROM settings WHERE key=?`, key).Scan(&v) + if err == sql.ErrNoRows { + return "", nil + } + return v, err +} + +func (db *DB) SetSetting(key, value string, by *string) error { + now := nowRFC3339() + var byArg any = nil + if by != nil { + byArg = *by + } + _, err := db.conn.Exec(` + INSERT INTO settings (key, value, updated_at, updated_by) VALUES (?,?,?,?) + ON CONFLICT(key) DO UPDATE SET value=excluded.value, updated_at=excluded.updated_at, updated_by=excluded.updated_by + `, key, value, now, byArg) + return err +} + +// runClaudePrompt executes `claude -p` with the given user prompt; returns +// stdout trimmed. Times out via claudeTimeout from chat.go. +func runClaudePrompt(ctx context.Context, prompt string) (string, error) { + ctx, cancel := context.WithTimeout(ctx, claudeTimeout) + defer cancel() + cmd := exec.CommandContext(ctx, claudeBinary(), "-p", "--model", claudeModel()) + cmd.Stdin = strings.NewReader(prompt) + var out, errb bytes.Buffer + cmd.Stdout = &out + cmd.Stderr = &errb + if err := cmd.Run(); err != nil { + return "", fmt.Errorf("claude -p failed: %v: %s", err, strings.TrimSpace(errb.String())) + } + return strings.TrimSpace(out.String()), nil +} + +// BuildDailySummaryPrompt composes the prompt for the LLM by interpolating the +// configurable instruction template with the JSON of the report. +func BuildDailySummaryPrompt(template string, report *DailyReport) (string, error) { + js, err := json.MarshalIndent(report, "", " ") + if err != nil { + return "", err + } + return fmt.Sprintf("%s\n\n\n%s\n\n", template, string(js)), nil +} + +// GenerateDailySummary builds the prompt, calls Claude, persists and returns +// the resulting summary. actorID is optional (empty = anon/system). +func (db *DB) GenerateDailySummary(ctx context.Context, date, tz, actorID string) (*DailySummary, error) { + rep, err := db.DailyReportFor(date, tz) + if err != nil { + return nil, err + } + tmpl, err := db.GetSetting("daily_report_prompt") + if err != nil { + return nil, err + } + if tmpl == "" { + tmpl = "Resume el reporte diario en 4 frases cortas, en castellano, sin inventar datos." + } + prompt, err := BuildDailySummaryPrompt(tmpl, rep) + if err != nil { + return nil, err + } + summary, err := runClaudePrompt(ctx, prompt) + if err != nil { + return nil, err + } + rec := DailySummary{ + Date: date, + Summary: summary, + Prompt: tmpl, + Model: claudeModel(), + GeneratedAt: time.Now().UTC().Format(time.RFC3339Nano), + } + if actorID != "" { + rec.GeneratedBy = &actorID + } + if err := db.UpsertDailySummary(rec); err != nil { + return nil, err + } + return &rec, nil +} diff --git a/backend/dist/assets/index-D_Kep7Fb.js b/backend/dist/assets/index-D_Kep7Fb.js new file mode 100644 index 0000000..abe84ea --- /dev/null +++ b/backend/dist/assets/index-D_Kep7Fb.js @@ -0,0 +1,1250 @@ +function JY(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 Tv=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function mt(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 h5;function eK(){if(h5)return Zd;h5=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 m5;function nK(){return m5||(m5=1,ek.exports=eK()),ek.exports}var y=nK();function Pt(e){return Object.keys(e)}function nk(e){return e&&typeof e=="object"&&!Array.isArray(e)}function T6(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]=T6(t[r],i[r]):t[r]=i[r]}),t}function tK(e){return e.replace(/[A-Z]/g,n=>`-${n.toLowerCase()}`)}function iK(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=iK(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 p5(e){return e==="0rem"?"0rem":`calc(${e} * var(--mantine-scale))`}function oz(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?p5(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?p5(a):a}}return i}return t}const me=oz("rem",{shouldScale:!0}),Cg=oz("em");function Eu(e){return Object.keys(e).reduce((n,t)=>(e[t]!==void 0&&(n[t]=e[t]),n),{})}function sz(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 v5;function rK(){if(v5)return Dn;v5=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(W){return W===null||typeof W!="object"?null:(W=p&&W[p]||W["@@iterator"],typeof W=="function"?W:null)}var b={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},w=Object.assign,k={};function _(W,V,L){this.props=W,this.context=V,this.refs=k,this.updater=L||b}_.prototype.isReactComponent={},_.prototype.setState=function(W,V){if(typeof W!="object"&&typeof W!="function"&&W!=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,W,V,"setState")},_.prototype.forceUpdate=function(W){this.updater.enqueueForceUpdate(this,W,"forceUpdate")};function C(){}C.prototype=_.prototype;function x(W,V,L){this.props=W,this.context=V,this.refs=k,this.updater=L||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},N=Object.prototype.hasOwnProperty;function H(W,V,L){var X=L.ref;return{$$typeof:e,type:W,key:V,ref:X!==void 0?X:null,props:L}}function P(W,V){return H(W.type,V,W.props)}function z(W){return typeof W=="object"&&W!==null&&W.$$typeof===e}function F(W){var V={"=":"=0",":":"=2"};return"$"+W.replace(/[=:]/g,function(L){return V[L]})}var G=/\/+/g;function U(W,V){return typeof W=="object"&&W!==null&&W.key!=null?F(""+W.key):V.toString(36)}function $(W){switch(W.status){case"fulfilled":return W.value;case"rejected":throw W.reason;default:switch(typeof W.status=="string"?W.then(j,j):(W.status="pending",W.then(function(V){W.status==="pending"&&(W.status="fulfilled",W.value=V)},function(V){W.status==="pending"&&(W.status="rejected",W.reason=V)})),W.status){case"fulfilled":return W.value;case"rejected":throw W.reason}}throw W}function R(W,V,L,X,ee){var re=typeof W;(re==="undefined"||re==="boolean")&&(W=null);var se=!1;if(W===null)se=!0;else switch(re){case"bigint":case"string":case"number":se=!0;break;case"object":switch(W.$$typeof){case e:case n:se=!0;break;case h:return se=W._init,R(se(W._payload),V,L,X,ee)}}if(se)return ee=ee(W),se=X===""?"."+U(W,0):X,O(ee)?(L="",se!=null&&(L=se.replace(G,"$&/")+"/"),R(ee,V,L,"",function(le){return le})):ee!=null&&(z(ee)&&(ee=P(ee,L+(ee.key==null||W&&W.key===ee.key?"":(""+ee.key).replace(G,"$&/")+"/")+se)),V.push(ee)),1;se=0;var ye=X===""?".":X+":";if(O(W))for(var ae=0;ae{const i=A.use(n);if(i===null)throw new Error(e);return i}]}function y5(e,n){return t=>{if(typeof t!="string"||t.trim().length===0)throw new Error(n);return`${e}-${t}`}}function Ag(e,n){let t=e;for(;(t=t.parentElement)&&!t.matches(n););return t}function aK(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 oK(e,n,t){for(let i=e+1;i{var b;t==null||t(l);const f=Array.from(((b=Ag(l.currentTarget,e))==null?void 0:b.querySelectorAll(n))||[]).filter(w=>sK(l.currentTarget,w,e)),c=f.findIndex(w=>l.currentTarget===w),h=oK(c,f,i),d=aK(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 lK={app:100,modal:200,popover:300,overlay:400,max:9999};function wa(e){return lK[e]}const lS=()=>{};function uK(e,n={active:!0}){return typeof e!="function"||!n.active?n.onKeyDown||lS: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 sz(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 ri(e){return Pn(e,"mantine-font-size")}function fK(e){return Pn(e,"mantine-line-height",!1)}function P6(e){if(e)return Pn(e,"mantine-shadow",!1)}function kr(e,n){return t=>{e==null||e(t),n==null||n(t)}}function N6(e,n){return e in n?qh(n[e]):qh(e)}function Hh(e,n){const t=e.map(i=>({value:i,px:N6(i,n)}));return t.sort((i,r)=>i.px-r.px),t}function Vr(e){return typeof e=="object"&&e!==null?"base"in e?e.base:void 0:e}function cK(e,n,t){var i;return t?Array.from(((i=Ag(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 iy(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 dK=["mousedown","touchstart"];function hK(e,n,t,i=!0){const r=A.useRef(null),a=n||dK,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 mK(e,n){return typeof window<"u"&&"matchMedia"in window?window.matchMedia(e).matches:!1}function pK(e,n,{getInitialValueInEffect:t}={getInitialValueInEffect:!0}){const[i,r]=A.useState(t?n:mK(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 uz({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 vK=/input|select|textarea|button|object/,fz="a, input, select, textarea, button, object, [tabindex]";function gK(e){return e.style.display==="none"}function yK(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(gK(n))return!1;n=n.parentNode}return!0}function cz(e){let n=e.getAttribute("tabindex");return n===null&&(n=void 0),parseInt(n,10)}function uS(e){const n=e.nodeName.toLowerCase(),t=!Number.isNaN(cz(e));return(vK.test(n)&&!e.disabled||e instanceof HTMLAnchorElement&&e.href||t)&&yK(e)}function dz(e){const n=cz(e);return(Number.isNaN(n)||n>=0)&&uS(e)}function bK(e){return Array.from(e.querySelectorAll(fz)).filter(dz)}function wK(e,n){const t=bK(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 kK(e=!0){const n=A.useRef(null),t=r=>{let a=r.querySelector("[data-autofocus]");if(!a){const o=Array.from(r.querySelectorAll(fz));a=o.find(dz)||o.find(uS)||null,!a&&uS(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&&wK(n.current,a)};return document.addEventListener("keydown",r),()=>document.removeEventListener("keydown",r)},[e]),i}const _K=e=>(e+1)%1e6;function xK(){const[,e]=A.useReducer(_K,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 hz(e,n,t){const i=A.useEffectEvent(n);A.useEffect(()=>(window.addEventListener(e,i,t),()=>window.removeEventListener(e,i,t)),[e])}function Og(e,n){if(typeof e=="function")return e(n);typeof e=="object"&&e!==null&&"current"in e&&(e.current=n)}function SK(...e){const n=new Map;return t=>{if(e.forEach(i=>{const r=Og(i,t);r&&n.set(i,r)}),n.size>0)return()=>{e.forEach(i=>{const r=n.get(i);r&&typeof r=="function"?r():Og(i,null)}),n.clear()}}}function Wt(...e){return A.useCallback(SK(...e),e)}function mz(e){return{x:Yo(e.x,0,1),y:Yo(e.y,0,1)}}function pz(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 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 $6(e,n){return pK("(prefers-reduced-motion: reduce)",e,n)}function vz(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 CK(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 b5;function AK(){if(b5)return Gi;b5=1;var e=M6();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=AK(),ik.exports}var Qs=gz();const yh=mt(Qs);function OK(e,n){window.dispatchEvent(new CustomEvent(e,{detail:n}))}function jK(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)=>OK(`${e}:${String(i)}`,r[0])}return[n,t]}var EK={};function TK(){return"development"}function ry(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 fg(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 DK((Array.isArray(n)?n:[n]).map(r=>typeof r=="function"?r(e,t,i):r||MK))}function jg({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 k5(e){return e==="auto"||e==="dark"||e==="light"}function RK({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 k5(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&&k5(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 PK(e){return/^#?([0-9A-F]{3}){1,2}([0-9A-F]{2})?$/i.test(e)}function NK(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 $K(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 zK(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 z6(e){return PK(e)?NK(e):e.startsWith("rgb")?$K(e):e.startsWith("hsl")?zK(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 LK(e){const n=e.match(/oklch\((.*?)%\s/);return n?parseFloat(n[1]):null}function bz(e){if(e.startsWith("oklch("))return(LK(e)||0)/100;const{r:n,g:t,b:i}=z6(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:bz(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 lt(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}=z6(e),o=1-n,l=f=>Math.round(f*o);return`rgba(${l(t)}, ${l(i)}, ${l(r)}, ${a})`}function fS(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=lt(t.from,n),r=lt(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}=z6(e);return`rgba(${t}, ${i}, ${r}, ${n})`}const _5=Ws,IK=({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:fS(i,n),hover:fS(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 Im({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 x5(e,n){return Im({color:e.colors[e.primaryColor][Vh(e,n)],theme:e,autoContrast:null})}function ay(e,n){return typeof e=="boolean"?e:n.autoContrast}const wz=A.createContext(null);function bo(){const e=A.use(wz);if(!e)throw new Error("[@mantine/core] MantineProvider was not found in tree");return e}function BK(){return bo().cssVariablesResolver}function FK(){return bo().classNamesPrefix}function L6(){return bo().getStyleNonce}function qK(){return bo().withStaticClasses}function HK(){return bo().headless}function UK(){var e;return(e=bo().stylesTransform)==null?void 0:e.sx}function VK(){var e;return(e=bo().stylesTransform)==null?void 0:e.styles}function Bm(){return bo().env||"default"}function WK(){return bo().deduplicateInlineStyles}function xf(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 GK({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||(xf(h,t),o(h),e.set(h))},[e.set,l,i]),c=A.useCallback(()=>{o(n),xf(n,t),e.clear()},[e.clear,n]);return A.useEffect(()=>(e.subscribe(f),e.unsubscribe),[e.subscribe,e.unsubscribe]),us(()=>{xf(e.get(n),t)},[]),A.useEffect(()=>{var d;if(i)return xf(i,t),()=>{};i===void 0&&xf(a,t),typeof window<"u"&&"matchMedia"in window&&(r.current=window.matchMedia("(prefers-color-scheme: dark)"));const h=p=>{a==="auto"&&xf(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 YK={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"]},S5="-apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji",I6={scale:1,fontSmoothing:!0,focusRing:"auto",white:"#fff",black:"#000",colors:YK,primaryShade:{light:6,dark:8},primaryColor:"blue",variantColorResolver:IK,autoContrast:!1,luminanceThreshold:.3,fontFamily:S5,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:S5,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:{}},KK="[@mantine/core] MantineProvider: Invalid theme.primaryColor, it accepts only key of theme.colors, learn more – https://mantine.dev/theming/colors/#primary-color",C5="[@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 A5(e){if(!(e.primaryColor in e.colors))throw new Error(KK);if(typeof e.primaryShade=="object"&&(!ak(e.primaryShade.dark)||!ak(e.primaryShade.light)))throw new Error(C5);if(typeof e.primaryShade=="number"&&!ak(e.primaryShade))throw new Error(C5)}function XK(e,n){var i;if(!n)return A5(e),e;const t=T6(e,n);return n.fontFamily&&!((i=n.headings)!=null&&i.fontFamily)&&(t.headings.fontFamily=n.fontFamily),A5(t),t}const B6=A.createContext(null),ZK=()=>A.use(B6)||I6;function ui(){const e=A.use(B6);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 kz({theme:e,children:n,inherit:t=!0}){const i=ZK();return y.jsx(B6,{value:A.useMemo(()=>XK(t?i:I6,e),[e,i,t]),children:n})}kz.displayName="@mantine/core/MantineThemeProvider";function ok(e){return Object.entries(e).map(([n,t])=>`${n}: ${t};`).join("")}function _z(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 Mv({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`]:_5(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`]:_5(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 QK(e){return!!e&&typeof e=="object"&&"mantine-virtual-color"in e}function Kl(e,n,t){Pt(n).forEach(i=>Object.assign(e,{[`--mantine-${t}-${i}`]:n[i]}))}const xz=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":x5(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":x5(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})`}),Pt(e.colors).forEach(a=>{const o=e.colors[a];if(QK(o)){Object.assign(i.light,Mv({theme:e,name:o.name,color:o.light,colorScheme:"light",withColorValues:!0})),Object.assign(i.dark,Mv({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,Mv({theme:e,color:a,colorScheme:"light",withColorValues:!1})),Object.assign(i.dark,Mv({theme:e,color:a,colorScheme:"dark",withColorValues:!1}))});const r=e.headings.sizes;return Pt(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 JK(){const e=ui(),n=L6(),t=Pt(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`:Cg(o-.1)}) {.mantine-visible-from-${r} {display: none !important;}}@media (min-width: ${a?`${o}px`:Cg(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 eX({theme:e,generator:n}){const t=xz(e),i=n==null?void 0:n(e);return i?T6(t,i):t}const sk=xz(I6);function nX(e){const n={variables:{},light:{},dark:{}};return Pt(e.variables).forEach(t=>{sk.variables[t]!==e.variables[t]&&(n.variables[t]=e.variables[t])}),Pt(e.light).forEach(t=>{sk.light[t]!==e.light[t]&&(n.light[t]=e.light[t])}),Pt(e.dark).forEach(t=>{sk.dark[t]!==e.dark[t]&&(n.dark[t]=e.dark[t])}),n}function tX(e){return _z({variables:{},dark:{"--mantine-color-scheme":"dark"},light:{"--mantine-color-scheme":"light"}},e)}function Sz({cssVariablesSelector:e,deduplicateCssVariables:n}){const t=ui(),i=L6(),r=eX({theme:t,generator:BK()}),a=(e===void 0||e===":root"||e===":host")&&n,o=_z(a?nX(r):r,e);return o?y.jsx("style",{"data-mantine-styles":!0,nonce:i==null?void 0:i(),dangerouslySetInnerHTML:{__html:`${o}${a?"":tX(e)}`}}):null}Sz.displayName="@mantine/CssVariables";function iX({respectReducedMotion:e,getRootElement:n}){us(()=>{var t;e&&((t=n())==null||t.setAttribute("data-respect-reduced-motion","true"))},[e])}function Cz({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=RK(),defaultColorScheme:h="light",getRootElement:d=()=>document.documentElement,cssVariablesResolver:p,forceColorScheme:v,stylesTransform:b,env:w,deduplicateInlineStyles:k=!1}){const{colorScheme:_,setColorScheme:C,clearColorScheme:x}=GK({defaultColorScheme:h,forceColorScheme:v,manager:c,getRootElement:d});return iX({respectReducedMotion:(e==null?void 0:e.respectReducedMotion)||!1,getRootElement:d}),y.jsx(wz,{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(kz,{theme:e,children:[o&&y.jsx(Sz,{cssVariablesSelector:l,deduplicateCssVariables:a}),r&&y.jsx(JK,{}),n]})})}Cz.displayName="@mantine/core/MantineProvider";function be(e,n,t){var o;const i=ui(),r=(o=i.components[e])==null?void 0:o.defaultProps,a=typeof r=="function"?r(i):r;return{...n,...a,...Eu(t)}}function Hi({classNames:e,styles:n,props:t,stylesCtx:i}){const r=ui();return{resolvedClassNames:e===void 0?void 0:Uh({theme:r,classNames:e,props:t,stylesCtx:i||void 0}),resolvedStyles:n===void 0?void 0:jg({theme:r,styles:n,props:t,stylesCtx:i||void 0})}}const rX={always:"mantine-focus-always",auto:"mantine-focus-auto",never:"mantine-focus-never"};function aX({theme:e,options:n,unstyled:t}){return dn((n==null?void 0:n.focusable)&&!t&&(e.focusClassName||rX[e.focusRing]),(n==null?void 0:n.active)&&!t&&e.activeClassName)}function oX({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 sX({selector:e,stylesCtx:n,theme:t,classNames:i,props:r}){return Uh({theme:t,classNames:i,props:r,stylesCtx:n})[e]}function lX({rootSelector:e,selector:n,className:t}){return e===n?t:void 0}function uX({selector:e,classes:n,unstyled:t}){return t?void 0:n[e]}function fX({themeName:e,classNamesPrefix:n,selector:t,withStaticClass:i}){return i===!1?[]:e.map(r=>`${n}-${r}-${t}`)}function cX({options:e,classes:n,selector:t,unstyled:i}){return e!=null&&e.variant&&!i?n[`${t}--${e.variant}`]:void 0}function dX({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(aX({theme:e,options:n,unstyled:f||b}),o.map(k=>k[i]),cX({options:n,classes:l,selector:i,unstyled:f||b}),a[i],sX({selector:i,stylesCtx:p,theme:e,classNames:w,props:d}),oX({selector:i,stylesCtx:p,options:n,props:d,theme:e}),lX({rootSelector:h,selector:i,className:c}),uX({selector:i,classes:l,unstyled:f||b}),v&&!b&&fX({themeName:t,classNamesPrefix:r,selector:i,withStaticClass:n==null?void 0:n.withStaticClass}),n==null?void 0:n.className)}function F6({style:e,theme:n}){return Array.isArray(e)?e.reduce((t,i)=>({...t,...F6({style:i,theme:n})}),{}):typeof e=="function"?e(n):e??{}}function hX({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&&jg({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,...F6({style:t==null?void 0:t.style,theme:e})}}function mX(e){return e.reduce((n,t)=>(t&&Object.keys(t).forEach(i=>{n[i]={...n[i],...Eu(t[i])}}),n),{})}function pX({props:e,stylesCtx:n,themeName:t,theme:i}){var o;const r=(o=VK())==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 P;const v=ui(),b=FK(),w=qK(),k=HK(),_=(Array.isArray(e)?e:[e]).filter(z=>z),{withStylesTransform:C,getTransformedStyles:x}=pX({props:t,stylesCtx:i,themeName:_,theme:v}),E=Uh({theme:v,classNames:f,props:t,stylesCtx:i}),O=_.map(z=>{var F;return Uh({theme:v,classNames:(F=v.components[z])==null?void 0:F.classNames,props:t,stylesCtx:i})}),j=C?{}:jg({theme:v,styles:c,props:t,stylesCtx:i}),M={};if(!C)for(const z of _){const F=jg({theme:v,styles:(P=v.components[z])==null?void 0:P.styles,props:t,stylesCtx:i});for(const G of Object.keys(F))M[G]={...M[G],...F[G]}}const N=mX([k?{}:d==null?void 0:d(v,t,i),..._.map(z=>{var F,G,U;return(U=(G=(F=v.components)==null?void 0:F[z])==null?void 0:G.vars)==null?void 0:U.call(G,v,t,i)}),h==null?void 0:h(v,t,i)]),H=F6({style:a,theme:v});return(z,F)=>({...p==null?void 0:p[z],className:dX({theme:v,options:F,themeName:_,selector:z,classNamesPrefix:b,resolvedClassNames:E,resolvedThemeClassNames:O,classes:n,unstyled:l,className:r,rootSelector:o,props:t,stylesCtx:i,withStaticClasses:w,headless:k,transformedStyles:x([F==null?void 0:F.styles,c])}),style:hX({theme:v,selector:z,options:F,props:t,stylesCtx:i,rootSelector:o,withStylesTransform:C,resolvedStyles:j,resolvedThemeStyles:M,resolvedVars:N,resolvedRootStyle:H})})}function jh(e){return Pt(e).reduce((n,t)=>e[t]!==void 0?`${n}${tK(t)}:${e[t]};`:n,"").trim()}function vX({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 gX(e){let n=5381;for(let t=0;t>>0).toString(36)}function Mc({deduplicate:e,...n}){const t=L6(),i=vX(n);return e?y.jsx("style",{href:`mantine-${gX(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 yX(e){let n=5381;for(let t=0;t>>0).toString(36)}function bX(e,n){return`__mdi__-${yX(`${e?jh(e):""}|${Array.isArray(n)?n.map(t=>`${t.query}:${jh(t.styles)}`).join("|"):""}`)}`}function Mu(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:N,bg:H,c:P,opacity:z,ff:F,fz:G,fw:U,lts:$,ta:R,lh:I,fs:q,tt:Y,td:D,w:W,miw:V,maw:L,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:ge,flex:xe,hiddenFrom:Pe,visibleFrom:ue,lightHidden:Be,darkHidden:Ge,sx:Ve,...Xe}=e;return{styleProps:Eu({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:H,c:P,opacity:z,ff:F,fz:G,fw:U,lts:$,ta:R,lh:I,fs:q,tt:Y,td:D,w:W,miw:V,maw:L,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:ge,flex:xe,bdrs:N,hiddenFrom:Pe,visibleFrom:ue,lightHidden:Be,darkHidden:Ge,sx:Ve}),rest:Xe}}const wX={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 q6(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 kX(e,n){const t=fs({color:e,theme:n});return t.isThemeColor&&t.shade===void 0?`var(--mantine-color-${t.color}-text)`:q6(e,n)}function _X(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+=` ${q6(r.join(" "),n)}`),a.trim()}return e}const O5={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 xX(e){return typeof e=="string"&&e in O5?O5[e]:e}const SX=["h1","h2","h3","h4","h5","h6"];function CX(e,n){return typeof e=="string"&&e in n.fontSizes?`var(--mantine-font-size-${e})`:typeof e=="string"&&SX.includes(e)?`var(--mantine-${e}-font-size)`:typeof e=="number"||typeof e=="string"?me(e):e}function AX(e){return e}const OX=["h1","h2","h3","h4","h5","h6"];function jX(e,n){return typeof e=="string"&&e in n.lineHeights?`var(--mantine-line-height-${e})`:typeof e=="string"&&OX.includes(e)?`var(--mantine-${e}-line-height)`:e}function EX(e,n){return typeof e=="string"&&e in n.radius?`var(--mantine-radius-${e})`:typeof e=="number"||typeof e=="string"?me(e):e}function TX(e){return typeof e=="number"?me(e):e}function MX(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:q6,textColor:kX,fontSize:CX,spacing:MX,radius:EX,identity:AX,size:TX,lineHeight:jX,fontFamily:xX,border:_X};function j5(e){return e.replace("(min-width: ","").replace("em)","")}function DX({media:e,...n}){const t=Object.keys(e).sort((i,r)=>Number(j5(i))-Number(j5(r))).map(i=>({query:i,styles:e[i]}));return{...n,media:t}}function RX(e){if(typeof e!="object"||e===null)return!1;const n=Object.keys(e);return!(n.length===1&&n[0]==="base")}function PX(e){return typeof e=="object"&&e!==null?"base"in e?e.base:void 0:e}function NX(e){return typeof e=="object"&&e!==null?Pt(e).filter(n=>n!=="base"):[]}function $X(e,n){return typeof e=="object"&&e!==null&&n in e?e[n]:e}function zX({styleProps:e,data:n,theme:t}){return DX(Pt(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=PX(e[r]);if(!RX(e[r]))return o.forEach(c=>{i.inlineStyles[c]=lk[a.type](l,t)}),i;i.hasResponsiveStyles=!0;const f=NX(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]($X(e[r],h),t)}})}),i},{hasResponsiveStyles:!1,styles:{},inlineStyles:{},media:{}}))}function oy(){return`__m__-${A.useId().replace(/[:«»]/g,"")}`}function Az(e,n){return Array.isArray(e)?[...e].reduce((t,i)=>({...t,...Az(i,n)}),{}):typeof e=="function"?e(n):e??{}}function LX(e){return e}const IX=LX;function Oz(e){return e}function Re(e){const n=e;return n.extend=Oz,n.withProps=t=>{const i=r=>y.jsx(n,{...t,...r});return i.extend=n.extend,i.displayName=`WithProps(${n.displayName})`,i},n}function sy(e){return Re(e)}function Si(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=Oz,n}function jz(e){return`data-${(e.startsWith("data-")?e.slice(5):e).replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}`}function BX(e){return Object.keys(e).reduce((n,t)=>{const i=e[t];return i===void 0||i===""||i===!1||i===null||(n[jz(t)]=e[t]),n},{})}function Ez(e){return e?typeof e=="string"?{[jz(e)]:!0}:Array.isArray(e)?[...e].reduce((n,t)=>({...n,...Ez(t)}),{}):BX(e):null}function cS(e,n){return Array.isArray(e)?[...e].reduce((t,i)=>({...t,...cS(i,n)}),{}):typeof e=="function"?e(n):e??{}}function FX({theme:e,style:n,vars:t,styleProps:i}){const r=cS(n,e),a=cS(t,e);return{...r,...a,...i}}function Tz({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 H,P;const w=ui(),k=e||"div",{styleProps:_,rest:C}=Mu(b),x=(P=(H=UK())==null?void 0:H())==null?void 0:P(_.sx),E=oy(),O=zX({styleProps:_,theme:w,data:wX}),j=WK(),M=j&&O.hasResponsiveStyles?bX(O.styles,O.media):E,N={ref:v,style:FX({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":sz(o)?void 0:o||void 0,size:p,...Ez(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(N):y.jsx(k,{...N})]})}Tz.displayName="@mantine/core/Box";const ve=IX(Tz),qX=A.createContext({dir:"ltr",toggleDirection:()=>{},setDirection:()=>{}});function Du(){return A.use(qX)}const[HX,ka]=Gr("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 UX(e){const{style:n,...t}=e,i=ka(),[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 VX(e){const n=ka(),t=!!(n.scrollbarX&&n.scrollbarY);return n.type!=="scroll"&&t?y.jsx(UX,{...e}):null}const WX={scrollHideDelay:1e3,type:"hover"};function Mz(e){const{type:n,scrollHideDelay:t,scrollbars:i,getStyles:r,ref:a,...o}=be("ScrollAreaRoot",WX,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,N]=A.useState(!1),H=Wt(a,P=>f(P));return y.jsx(HX,{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:N,onCornerWidthChange:C,onCornerHeightChange:E,getStyles:r},children:y.jsx(ve,{...o,ref:H,__vars:{"--sa-corner-width":i!=="xy"?"0px":`${_}px`,"--sa-corner-height":i!=="xy"?"0px":`${x}px`}})})}Mz.displayName="@mantine/core/ScrollAreaRoot";function Dz(e,n){const t=e/n;return Number.isNaN(t)?0:t}function ly(e){const n=Dz(e.viewport,e.content),t=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,i=(e.scrollbar.size-t)*n;return Math.max(i,18)}function Rz(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 GX(e,[n,t]){return Math.min(t,Math.max(n,e))}function E5(e,n,t="ltr"){const i=ly(n),r=n.scrollbar.paddingStart+n.scrollbar.paddingEnd,a=n.scrollbar.size-r,o=n.content-n.viewport,l=a-i,f=GX(e,t==="ltr"?[0,o]:[o*-1,0]);return Rz([0,o],[0,l])(f)}function YX(e,n,t,i="ltr"){const r=ly(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 Rz([f,c],d)(e)}function Pz(e,n){return e>0&&e{e==null||e(i),(t===!1||!i.defaultPrevented)&&(n==null||n(i))}}const[KX,Nz]=Gr("ScrollAreaScrollbar was not found in tree");function $z(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=Wt(h,N=>b(N)),k=A.useRef(null),_=A.useRef(""),{viewport:C}=p,x=n.content-n.viewport,E=A.useEffectEvent(f),O=gh(o),j=iy(c,10),M=N=>{k.current&&l({x:N.clientX-k.current.left,y:N.clientY-k.current.top})};return A.useEffect(()=>{const N=H=>{const P=H.target;v!=null&&v.contains(P)&&E(H,x)};return document.addEventListener("wheel",N,{passive:!1}),()=>document.removeEventListener("wheel",N,{passive:!1})},[C,v,x]),A.useEffect(O,[n,O]),ll(v,j),ll(p.content,j),y.jsx(KX,{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,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:hu(e.onPointerMove,M),onPointerUp:hu(e.onPointerUp,N=>{const H=N.target;H.hasPointerCapture(N.pointerId)&&(N.preventDefault(),H.releasePointerCapture(N.pointerId))}),onLostPointerCapture:()=>{document.body.style.webkitUserSelect=_.current,k.current=null}})})}const zz=e=>{const{sizes:n,onSizesChange:t,style:i,ref:r,...a}=e,o=ka(),[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($z,{"data-orientation":"horizontal",...a,ref:h,sizes:n,style:{...i,"--sa-thumb-width":`${ly(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),Pz(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:Eg(l.paddingLeft),paddingEnd:Eg(l.paddingRight)}})}})};zz.displayName="@mantine/core/ScrollAreaScrollbarX";function Lz(e){const{sizes:n,onSizesChange:t,style:i,ref:r,...a}=e,o=ka(),[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($z,{...a,"data-orientation":"vertical",ref:h,sizes:n,style:{"--sa-thumb-height":`${ly(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),Pz(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:Eg(l.paddingTop),paddingEnd:Eg(l.paddingBottom)}})}})}Lz.displayName="@mantine/core/ScrollAreaScrollbarY";function uy(e){const{orientation:n="vertical",...t}=e,{dir:i}=Du(),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=Dz(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)=>YX(p,o.current,l,v);return n==="horizontal"?y.jsx(zz,{...h,onThumbPositionChange:()=>{if(r.viewport&&a.current){const p=r.viewport.scrollLeft,v=E5(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(Lz,{...h,onThumbPositionChange:()=>{if(r.viewport&&a.current){const p=r.viewport.scrollTop,v=E5(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}uy.displayName="@mantine/core/ScrollAreaScrollbarVisible";function H6(e){const n=ka(),{forceMount:t,...i}=e,[r,a]=A.useState(!1),o=e.orientation==="horizontal",l=iy(()=>{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(H6,{"data-state":r?"visible":"hidden",...t}):null}Iz.displayName="@mantine/core/ScrollAreaScrollbarHover";function XX(e){const{forceMount:n,...t}=e,i=ka(),r=e.orientation==="horizontal",[a,o]=A.useState("hidden"),l=iy(()=>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(uy,{"data-state":a==="hidden"?"hidden":"visible",...t,onPointerEnter:hu(e.onPointerEnter,()=>o("interacting")),onPointerLeave:hu(e.onPointerLeave,()=>o("idle"))}):null}function dS(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(Iz,{...t,forceMount:n}):i.type==="scroll"?y.jsx(XX,{...t,forceMount:n}):i.type==="auto"?y.jsx(H6,{...t,forceMount:n}):i.type==="always"?y.jsx(uy,{...t}):null}dS.displayName="@mantine/core/ScrollAreaScrollbar";function ZX(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 Bz(e){const{style:n,ref:t,...i}=e,r=ka(),a=Nz(),{onThumbPositionChange:o}=a,l=Wt(t,h=>a.onThumbChange(h)),f=A.useRef(void 0),c=iy(()=>{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=ZX(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)})}Bz.displayName="@mantine/core/ScrollAreaThumb";function hS(e){const{forceMount:n,...t}=e,i=Nz();return n||i.hasThumb?y.jsx(Bz,{...t}):null}hS.displayName="@mantine/core/ScrollAreaThumb";function Fz({children:e,style:n,ref:t,onWheel:i,...r}){const a=ka(),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(ve,{...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})})}Fz.displayName="@mantine/core/ScrollAreaViewport";var U6={root:"m_d57069b5",content:"m_b1336c6",viewport:"m_c0783ff9",viewportInner:"m_f8f631dd",scrollbar:"m_c44ba933",thumb:"m_d8b5e363",corner:"m_21657268"};function fy(){return typeof window<"u"}function Dc(e){return qz(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=(qz(e)?e.ownerDocument:e.document)||window.document)==null?void 0:n.documentElement}function qz(e){return fy()?e instanceof Node||e instanceof xr(e).Node:!1}function Ut(e){return fy()?e instanceof Element||e instanceof xr(e).Element:!1}function _a(e){return fy()?e instanceof HTMLElement||e instanceof xr(e).HTMLElement:!1}function mS(e){return!fy()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof xr(e).ShadowRoot}function Fm(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 QX(e){return/^(table|td|th)$/.test(Dc(e))}function cy(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const JX=/transform|translate|scale|rotate|perspective|filter/,eZ=/paint|layout|strict|content/,Xl=e=>!!e&&e!=="none";let uk;function V6(e){const n=Ut(e)?ga(e):e;return Xl(n.transform)||Xl(n.translate)||Xl(n.scale)||Xl(n.rotate)||Xl(n.perspective)||!dy()&&(Xl(n.backdropFilter)||Xl(n.filter))||JX.test(n.willChange||"")||eZ.test(n.contain||"")}function nZ(e){let n=ts(e);for(;_a(n)&&!Ko(n);){if(V6(n))return n;if(cy(n))return null;n=ts(n)}return null}function dy(){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 hy(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||mS(e)&&e.host||wo(e);return mS(n)?n.host:n}function Hz(e){const n=ts(e);return Ko(n)?e.ownerDocument?e.ownerDocument.body:e.body:_a(n)&&Fm(n)?n:Hz(n)}function Xo(e,n,t){var i;n===void 0&&(n=[]),t===void 0&&(t=!0);const r=Hz(e),a=r===((i=e.ownerDocument)==null?void 0:i.body),o=xr(r);if(a){const l=pS(o);return n.concat(o,o.visualViewport||[],Fm(r)?r:[],l&&t?Xo(l):[])}else return n.concat(r,Xo(r,[],t))}function pS(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}const tZ=["top","right","bottom","left"],Ha=Math.min,Xi=Math.max,Tg=Math.round,Dv=Math.floor,so=e=>({x:e,y:e}),iZ={left:"right",right:"left",bottom:"top",top:"bottom"};function vS(e,n,t){return Xi(e,Ha(n,t))}function mo(e,n){return typeof e=="function"?e(n):e}function Ua(e){return e.split("-")[0]}function Rc(e){return e.split("-")[1]}function W6(e){return e==="x"?"y":"x"}function G6(e){return e==="y"?"height":"width"}function Ia(e){const n=e[0];return n==="t"||n==="b"?"y":"x"}function Y6(e){return W6(Ia(e))}function rZ(e,n,t){t===void 0&&(t=!1);const i=Rc(e),r=Y6(e),a=G6(r);let o=r==="x"?i===(t?"end":"start")?"right":"left":i==="start"?"bottom":"top";return n.reference[a]>n.floating[a]&&(o=Mg(o)),[o,Mg(o)]}function aZ(e){const n=Mg(e);return[gS(e),n,gS(n)]}function gS(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const T5=["left","right"],M5=["right","left"],oZ=["top","bottom"],sZ=["bottom","top"];function lZ(e,n,t){switch(e){case"top":case"bottom":return t?n?M5:T5:n?T5:M5;case"left":case"right":return n?oZ:sZ;default:return[]}}function uZ(e,n,t,i){const r=Rc(e);let a=lZ(Ua(e),t==="start",i);return r&&(a=a.map(o=>o+"-"+r),n&&(a=a.concat(a.map(gS)))),a}function Mg(e){const n=Ua(e);return iZ[n]+e.slice(n.length)}function fZ(e){return{top:0,right:0,bottom:0,left:0,...e}}function K6(e){return typeof e!="number"?fZ(e):{top:e,right:e,bottom:e,left:e}}function Zf(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 cZ(){const e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform}function dZ(){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 hZ(){return/apple/i.test(navigator.vendor)}function mZ(){return cZ().toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints}function pZ(){return dZ().includes("jsdom/")}const D5="data-floating-ui-focusable",vZ="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function R5(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&&mS(t)){let i=n;for(;i;){if(e===i)return!0;i=i.parentNode||i.host}}return!1}function Nf(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 gZ(e){return e.matches("html,body")}function ou(e){return(e==null?void 0:e.ownerDocument)||document}function yZ(e){return _a(e)&&e.matches(vZ)}function bZ(e){if(!e||pZ())return!0;try{return e.matches(":focus-visible")}catch{return!0}}function wZ(e){return e?e.hasAttribute(D5)?e:e.querySelector("["+D5+"]")||e:null}function cg(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,...cg(e,r.id,t)])}function kZ(e){return"nativeEvent"in e}function yS(e,n){const t=["mouse","pen"];return t.push("",void 0),t.includes(e)}var _Z=typeof document<"u",xZ=function(){},lo=_Z?A.useLayoutEffect:xZ;const SZ={...lz};function Rv(e){const n=A.useRef(e);return lo(()=>{n.current=e}),n}const CZ=SZ.useInsertionEffect,AZ=CZ||(e=>e());function io(e){const n=A.useRef(()=>{});return AZ(()=>{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:OZ},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}=P5(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}=mo(e,n)||{};if(c==null)return{};const d=K6(h),p={x:t,y:i},v=Y6(r),b=G6(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 N=E/2-O/2,H=M/2-w[b]/2-1,P=Ha(d[_],H),z=Ha(d[C],H),F=P,G=M-w[b]-z,U=M/2-w[b]/2+N,$=vS(F,U,G),R=!f.arrow&&Rc(r)!=null&&U!==$&&a.reference[b]/2-(UU<=0)){var z,F;const U=(((z=a.flip)==null?void 0:z.index)||0)+1,$=M[U];if($&&(!(d==="alignment"?C!==Ia($):!1)||P.every(q=>Ia(q.placement)===C?q.overflows[0]>0:!0)))return{data:{index:U,overflows:P},reset:{placement:$}};let R=(F=P.filter(I=>I.overflows[0]<=0).sort((I,q)=>I.overflows[1]-q.overflows[1])[0])==null?void 0:F.placement;if(!R)switch(v){case"bestFit":{var G;const I=(G=P.filter(q=>{if(j){const Y=Ia(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];I&&(R=I);break}case"initialPlacement":R=l;break}if(r!==R)return{reset:{placement:R}}}return{}}}};function N5(e,n){return{top:e.top-n.height,right:e.right-n.width,bottom:e.bottom-n.height,left:e.left-n.width}}function $5(e){return tZ.some(n=>e[n]>=0)}const DZ=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(n){const{rects:t,platform:i}=n,{strategy:r="referenceHidden",...a}=mo(e,n);switch(r){case"referenceHidden":{const o=await i.detectOverflow(n,{...a,elementContext:"reference"}),l=N5(o,t.reference);return{data:{referenceHiddenOffsets:l,referenceHidden:$5(l)}}}case"escaped":{const o=await i.detectOverflow(n,{...a,altBoundary:!0}),l=N5(o,t.floating);return{data:{escapedOffsets:l,escaped:$5(l)}}}default:return{}}}}};function Uz(e){const n=Ha(...e.map(a=>a.left)),t=Ha(...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 RZ(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=>Zf(Uz(r)))}const PZ=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}=mo(e,n),h=Array.from(await(a.getClientRects==null?void 0:a.getClientRects(i.reference))||[]),d=RZ(h),p=Zf(Uz(h)),v=K6(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(Ia(t)==="y"){const P=d[0],z=d[d.length-1],F=Ua(t)==="top",G=P.top,U=z.bottom,$=F?P.left:z.left,R=F?P.right:z.right,I=R-$,q=U-G;return{top:G,bottom:U,left:$,right:R,width:I,height:q,x:$,y:G}}const k=Ua(t)==="left",_=Xi(...d.map(P=>P.right)),C=Ha(...d.map(P=>P.left)),x=d.filter(P=>k?P.left===C:P.right===_),E=x[0].top,O=x[x.length-1].bottom,j=C,M=_,N=M-j,H=O-E;return{top:E,bottom:O,left:j,right:M,width:N,height:H,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}}:{}}}},Vz=new Set(["left","top"]);async function NZ(e,n){const{placement:t,platform:i,elements:r}=e,a=await(i.isRTL==null?void 0:i.isRTL(r.floating)),o=Ua(t),l=Rc(t),f=Ia(t)==="y",c=Vz.has(o)?-1:1,h=a&&f?-1:1,d=mo(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 $Z=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 NZ(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}}}}},zZ=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}=mo(e,n),h={x:t,y:i},d=await a.detectOverflow(n,c),p=Ia(Ua(r)),v=W6(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=vS(x,b,E)}if(l){const _=p==="y"?"top":"left",C=p==="y"?"bottom":"right",x=w+d[_],E=w-d[C];w=vS(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}}}}}},LZ=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}=mo(e,n),h={x:t,y:i},d=Ia(r),p=W6(d);let v=h[p],b=h[d];const w=mo(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=Vz.has(Ua(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}}}},IZ=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}=mo(e,n),h=await o.detectOverflow(n,c),d=Ua(r),p=Rc(r),v=Ia(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=Ha(w-h[k],C),O=Ha(b-h[_],x),j=!n.middlewareData.shift;let M=E,N=O;if((t=n.middlewareData.shift)!=null&&t.enabled.x&&(N=x),(i=n.middlewareData.shift)!=null&&i.enabled.y&&(M=C),j&&!p){const P=Xi(h.left,0),z=Xi(h.right,0),F=Xi(h.top,0),G=Xi(h.bottom,0);v?N=b-2*(P!==0||z!==0?P+z:Xi(h.left,h.right)):M=w-2*(F!==0||G!==0?F+G:Xi(h.top,h.bottom))}await f({...n,availableWidth:N,availableHeight:M});const H=await o.getDimensions(l.floating);return b!==H.width||w!==H.height?{reset:{rects:!0}}:{}}}};function Wz(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=Tg(t)!==a||Tg(i)!==o;return l&&(t=a,i=o),{width:t,height:i,$:l}}function X6(e){return Ut(e)?e:e.contextElement}function qf(e){const n=X6(e);if(!_a(n))return so(1);const t=n.getBoundingClientRect(),{width:i,height:r,$:a}=Wz(n);let o=(a?Tg(t.width):t.width)/i,l=(a?Tg(t.height):t.height)/r;return(!o||!Number.isFinite(o))&&(o=1),(!l||!Number.isFinite(l))&&(l=1),{x:o,y:l}}const BZ=so(0);function Gz(e){const n=xr(e);return!dy()||!n.visualViewport?BZ:{x:n.visualViewport.offsetLeft,y:n.visualViewport.offsetTop}}function FZ(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=X6(e);let o=so(1);n&&(i?Ut(i)&&(o=qf(i)):o=qf(e));const l=FZ(a,t,i)?Gz(a):so(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=pS(b);for(;w&&i&&v!==b;){const k=qf(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=pS(b)}}return Zf({width:h,height:d,x:f,y:c})}function my(e,n){const t=hy(e).scrollLeft;return n?n.left+t:vu(wo(e)).left+t}function Yz(e,n){const t=e.getBoundingClientRect(),i=t.left+n.scrollLeft-my(e,t),r=t.top+n.scrollTop;return{x:i,y:r}}function qZ(e){let{elements:n,rect:t,offsetParent:i,strategy:r}=e;const a=r==="fixed",o=wo(i),l=n?cy(n.floating):!1;if(i===o||l&&a)return t;let f={scrollLeft:0,scrollTop:0},c=so(1);const h=so(0),d=_a(i);if((d||!d&&!a)&&((Dc(i)!=="body"||Fm(o))&&(f=hy(i)),d)){const v=vu(i);c=qf(i),h.x=v.x+i.clientLeft,h.y=v.y+i.clientTop}const p=o&&!d&&!a?Yz(o,f):so(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 HZ(e){return Array.from(e.getClientRects())}function UZ(e){const n=wo(e),t=hy(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+my(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 z5=25;function VZ(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=dy();(!h||h&&n==="fixed")&&(l=r.offsetLeft,f=r.offsetTop)}const c=my(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<=z5&&(a-=b)}else c<=z5&&(a+=c);return{width:a,height:o,x:l,y:f}}function WZ(e,n){const t=vu(e,!0,n==="fixed"),i=t.top+e.clientTop,r=t.left+e.clientLeft,a=_a(e)?qf(e):so(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 L5(e,n,t){let i;if(n==="viewport")i=VZ(e,t);else if(n==="document")i=UZ(wo(e));else if(Ut(n))i=WZ(n,t);else{const r=Gz(e);i={x:n.x-r.x,y:n.y-r.y,width:n.width,height:n.height}}return Zf(i)}function Kz(e,n){const t=ts(e);return t===n||!Ut(t)||Ko(t)?!1:ga(t).position==="fixed"||Kz(t,n)}function GZ(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=V6(o);!f&&l.position==="fixed"&&(r=null),(a?!f&&!r:!f&&l.position==="static"&&!!r&&(r.position==="absolute"||r.position==="fixed")||Fm(o)&&!f&&Kz(e,o))?i=i.filter(h=>h!==o):r=l,o=ts(o)}return n.set(e,i),i}function YZ(e){let{element:n,boundary:t,rootBoundary:i,strategy:r}=e;const o=[...t==="clippingAncestors"?cy(n)?[]:GZ(n,this._c):[].concat(t),i],l=L5(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&&!Zz(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 bS(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=X6(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?eQ(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&&!Zz(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 nQ=$Z,tQ=zZ,iQ=MZ,rQ=IZ,aQ=DZ,B5=TZ,oQ=PZ,sQ=LZ,lQ=(e,n,t)=>{const i=new Map,r={platform:JZ,...t},a={...r.platform,_c:i};return EZ(e,n,{...r,platform:a})};var uQ=typeof document<"u",fQ=function(){},dg=uQ?A.useLayoutEffect:fQ;function Dg(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(!Dg(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)&&!Dg(e[a],n[a]))return!1}return!0}return e!==e&&n!==n}function Qz(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function F5(e,n){const t=Qz(e);return Math.round(n*t)/t}function dk(e){const n=A.useRef(e);return dg(()=>{n.current=e}),n}function cQ(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);Dg(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),N=A.useRef(h),H=f!=null,P=dk(f),z=dk(r),F=dk(c),G=A.useCallback(()=>{if(!j.current||!M.current)return;const q={placement:n,strategy:t,middleware:p};z.current&&(q.platform=z.current),lQ(j.current,M.current,q).then(Y=>{const D={...Y,isPositioned:F.current!==!1};U.current&&!Dg(N.current,D)&&(N.current=D,Qs.flushSync(()=>{d(D)}))})},[p,n,t,z,F]);dg(()=>{c===!1&&N.current.isPositioned&&(N.current.isPositioned=!1,d(q=>({...q,isPositioned:!1})))},[c]);const U=A.useRef(!1);dg(()=>(U.current=!0,()=>{U.current=!1}),[]),dg(()=>{if(E&&(j.current=E),O&&(M.current=O),E&&O){if(P.current)return P.current(E,O,G);G()}},[E,O,G,P,H]);const $=A.useMemo(()=>({reference:j,floating:M,setReference:C,setFloating:x}),[C,x]),R=A.useMemo(()=>({reference:E,floating:O}),[E,O]),I=A.useMemo(()=>{const q={position:t,left:0,top:0};if(!R.floating)return q;const Y=F5(R.floating,h.x),D=F5(R.floating,h.y);return l?{...q,transform:"translate("+Y+"px, "+D+"px)",...Qz(R.floating)>=1.5&&{willChange:"transform"}}:{position:t,left:Y,top:D}},[t,l,R.floating,h.x,h.y]);return A.useMemo(()=>({...h,update:G,refs:$,elements:R,floatingStyles:I}),[h,G,$,R,I])}const dQ=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?B5({element:i.current,padding:r}).fn(t):{}:i?B5({element:i,padding:r}).fn(t):{}}}},Jz=(e,n)=>{const t=nQ(e);return{name:t.name,fn:t.fn,options:[e,n]}},Z6=(e,n)=>{const t=tQ(e);return{name:t.name,fn:t.fn,options:[e,n]}},q5=(e,n)=>({fn:sQ(e).fn,options:[e,n]}),Rg=(e,n)=>{const t=iQ(e);return{name:t.name,fn:t.fn,options:[e,n]}},hQ=(e,n)=>{const t=rQ(e);return{name:t.name,fn:t.fn,options:[e,n]}},mQ=(e,n)=>{const t=aQ(e);return{name:t.name,fn:t.fn,options:[e,n]}},Eh=(e,n)=>{const t=oQ(e);return{name:t.name,fn:t.fn,options:[e,n]}},eL=(e,n)=>{const t=dQ(e);return{name:t.name,fn:t.fn,options:[e,n]}};function nL(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 pQ="data-floating-ui-focusable",H5="active",U5="selected",vQ={...lz};let V5=!1,gQ=0;const W5=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+gQ++;function yQ(){const[e,n]=A.useState(()=>V5?W5():void 0);return lo(()=>{e==null&&n(W5())},[]),A.useEffect(()=>{V5=!0},[]),e}const bQ=vQ.useId,tL=bQ||yQ;function wQ(){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 kQ=A.createContext(null),_Q=A.createContext(null),Q6=()=>{var e;return((e=A.useContext(kQ))==null?void 0:e.id)||null},J6=()=>A.useContext(_Q);function eC(e){return"data-floating-ui-"+e}function la(e){e.current!==-1&&(clearTimeout(e.current),e.current=-1)}const G5=eC("safe-polygon");function hg(e,n,t){if(t&&!yS(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 xQ(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=J6(),b=Q6(),w=Rv(c),k=Rv(f),_=Rv(t),C=Rv(d),x=A.useRef(),E=A.useRef(-1),O=A.useRef(),j=A.useRef(-1),M=A.useRef(!0),N=A.useRef(!1),H=A.useRef(()=>{}),P=A.useRef(!1),z=io(()=>{var I;const q=(I=r.current.openEvent)==null?void 0:I.type;return(q==null?void 0:q.includes("mouse"))&&q!=="mousedown"});A.useEffect(()=>{if(!l)return;function I(q){let{open:Y}=q;Y||(la(E),la(j),M.current=!0,P.current=!1)}return a.on("openchange",I),()=>{a.off("openchange",I)}},[l,a]),A.useEffect(()=>{if(!l||!w.current||!t)return;function I(Y){z()&&i(!1,Y,"hover")}const q=ou(o.floating).documentElement;return q.addEventListener("mouseleave",I),()=>{q.removeEventListener("mouseleave",I)}},[o.floating,t,i,l,w,z]);const F=A.useCallback(function(I,q,Y){q===void 0&&(q=!0),Y===void 0&&(Y="hover");const D=hg(k.current,"close",x.current);D&&!O.current?(la(E),E.current=window.setTimeout(()=>i(!1,I,Y),D)):q&&(la(E),i(!1,I,Y))},[k,i]),G=io(()=>{H.current(),O.current=void 0}),U=io(()=>{if(N.current){const I=ou(o.floating).body;I.style.pointerEvents="",I.removeAttribute(G5),N.current=!1}}),$=io(()=>r.current.openEvent?["click","mousedown"].includes(r.current.openEvent.type):!1);A.useEffect(()=>{if(!l)return;function I(V){if(la(E),M.current=!1,h&&!yS(x.current)||hk(C.current)>0&&!hg(k.current,"open"))return;const L=hg(k.current,"open",x.current);L?E.current=window.setTimeout(()=>{_.current||i(!0,V,"hover")},L):t||i(!0,V,"hover")}function q(V){if($()){U();return}H.current();const L=ou(o.floating);if(la(j),P.current=!1,w.current&&r.current.floatingContext){t||la(E),O.current=w.current({...r.current.floatingContext,tree:v,x:V.clientX,y:V.clientY,onClose(){U(),G(),$()||F(V,!0,"safe-polygon")}});const ee=O.current;L.addEventListener("mousemove",ee),H.current=()=>{L.removeEventListener("mousemove",ee)};return}(x.current==="touch"?!Wh(o.floating,V.relatedTarget):!0)&&F(V)}function Y(V){$()||r.current.floatingContext&&(w.current==null||w.current({...r.current.floatingContext,tree:v,x:V.clientX,y:V.clientY,onClose(){U(),G(),$()||F(V)}})(V))}function D(){la(E)}function W(V){$()||F(V,!1)}if(Ut(o.domReference)){const V=o.domReference,L=o.floating;return t&&V.addEventListener("mouseleave",Y),p&&V.addEventListener("mousemove",I,{once:!0}),V.addEventListener("mouseenter",I),V.addEventListener("mouseleave",q),L&&(L.addEventListener("mouseleave",Y),L.addEventListener("mouseenter",D),L.addEventListener("mouseleave",W)),()=>{t&&V.removeEventListener("mouseleave",Y),p&&V.removeEventListener("mousemove",I),V.removeEventListener("mouseenter",I),V.removeEventListener("mouseleave",q),L&&(L.removeEventListener("mouseleave",Y),L.removeEventListener("mouseenter",D),L.removeEventListener("mouseleave",W))}}},[o,l,e,h,p,F,G,U,i,t,_,v,k,w,r,$,C]),lo(()=>{var I;if(l&&t&&(I=w.current)!=null&&(I=I.__options)!=null&&I.blockPointerEvents&&z()){N.current=!0;const Y=o.floating;if(Ut(o.domReference)&&Y){var q;const D=ou(o.floating).body;D.setAttribute(G5,"");const W=o.domReference,V=v==null||(q=v.nodesRef.current.find(L=>L.id===b))==null||(q=q.context)==null?void 0:q.elements.floating;return V&&(V.style.pointerEvents=""),D.style.pointerEvents="none",W.style.pointerEvents="auto",Y.style.pointerEvents="auto",()=>{D.style.pointerEvents="",W.style.pointerEvents="",Y.style.pointerEvents=""}}}},[l,t,b,o,v,w,z]),lo(()=>{t||(x.current=void 0,P.current=!1,G(),U())},[t,G,U]),A.useEffect(()=>()=>{G(),la(E),la(j),U()},[l,o.domReference,G,U]);const R=A.useMemo(()=>{function I(q){x.current=q.pointerType}return{onPointerDown:I,onPointerEnter:I,onMouseMove(q){const{nativeEvent:Y}=q;function D(){!M.current&&!_.current&&i(!0,Y,"hover")}h&&!yS(x.current)||t||hk(C.current)===0||P.current&&q.movementX**2+q.movementY**2<2||(la(j),x.current==="touch"?D():(P.current=!0,j.current=window.setTimeout(D,hk(C.current))))}}},[h,i,t,_,C]);return A.useMemo(()=>l?{reference:R}:{},[l,R])}const wS=()=>{},iL=A.createContext({delay:0,initialDelay:0,timeoutMs:0,currentId:null,setCurrentId:wS,setState:wS,isInstantPhase:!1}),SQ=()=>A.useContext(iL);function CQ(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 lo(()=>{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(iL.Provider,{value:A.useMemo(()=>({...r,setState:a,setCurrentId:l}),[r,l]),children:n})}function AQ(e,n){n===void 0&&(n={});const{open:t,onOpenChange:i,floatingId:r}=e,{id:a,enabled:o=!0}=n,l=a??r,f=SQ(),{currentId:c,setCurrentId:h,initialDelay:d,setState:p,timeoutMs:v}=f;return lo(()=>{o&&c&&(p({delay:{open:1,close:hg(d,"close")}}),c!==l&&i(!1))},[o,l,i,p,c,d]),lo(()=>{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]),lo(()=>{o&&(h===wS||!t||h(l))},[o,t,h,l]),f}const OQ={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},jQ={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},Y5=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 EQ(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=J6(),k=io(typeof f=="function"?f:()=>!1),_=typeof f=="function"?k:f,C=A.useRef(!1),{escapeKey:x,outsidePress:E}=Y5(v),{escapeKey:O,outsidePress:j}=Y5(b),M=A.useRef(!1),N=io(U=>{var $;if(!t||!o||!l||U.key!=="Escape"||M.current)return;const R=($=a.current.floatingContext)==null?void 0:$.nodeId,I=w?cg(w.nodesRef.current,R):[];if(!x&&(U.stopPropagation(),I.length>0)){let q=!0;if(I.forEach(Y=>{var D;if((D=Y.context)!=null&&D.open&&!Y.context.dataRef.current.__escapeKeyBubbles){q=!1;return}}),!q)return}i(!1,kZ(U)?U.nativeEvent:U,"escape-key")}),H=io(U=>{var $;const R=()=>{var I;N(U),(I=Nf(U))==null||I.removeEventListener("keydown",R)};($=Nf(U))==null||$.addEventListener("keydown",R)}),P=io(U=>{var $;const R=a.current.insideReactTree;a.current.insideReactTree=!1;const I=C.current;if(C.current=!1,c==="click"&&I||R||typeof _=="function"&&!_(U))return;const q=Nf(U),Y="["+eC("inert")+"]",D=ou(r.floating).querySelectorAll(Y);let W=Ut(q)?q:null;for(;W&&!Ko(W);){const ee=ts(W);if(Ko(ee)||!Ut(ee))break;W=ee}if(D.length&&Ut(q)&&!gZ(q)&&!Wh(q,r.floating)&&Array.from(D).every(ee=>!Wh(W,ee)))return;if(_a(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 V=($=a.current.floatingContext)==null?void 0:$.nodeId,L=w&&cg(w.nodesRef.current,V).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)||L)return;const X=w?cg(w.nodesRef.current,V):[];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")}),z=io(U=>{var $;const R=()=>{var I;P(U),(I=Nf(U))==null||I.removeEventListener(c,R)};($=Nf(U))==null||$.addEventListener(c,R)});A.useEffect(()=>{if(!t||!o)return;a.current.__escapeKeyBubbles=x,a.current.__outsidePressBubbles=E;let U=-1;function $(D){i(!1,D,"ancestor-scroll")}function R(){window.clearTimeout(U),M.current=!0}function I(){U=window.setTimeout(()=>{M.current=!1},dy()?5:0)}const q=ou(r.floating);l&&(q.addEventListener("keydown",O?H:N,O),q.addEventListener("compositionstart",R),q.addEventListener("compositionend",I)),_&&q.addEventListener(c,j?z:P,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 W;return D!==((W=q.defaultView)==null?void 0:W.visualViewport)}),Y.forEach(D=>{D.addEventListener("scroll",$,{passive:!0})}),()=>{l&&(q.removeEventListener("keydown",O?H:N,O),q.removeEventListener("compositionstart",R),q.removeEventListener("compositionend",I)),_&&q.removeEventListener(c,j?z:P,j),Y.forEach(D=>{D.removeEventListener("scroll",$)}),window.clearTimeout(U)}},[a,r,l,_,c,t,i,p,o,x,E,N,O,H,P,j,z]),A.useEffect(()=>{a.current.insideReactTree=!1},[a,_,c]);const F=A.useMemo(()=>({onKeyDown:N,...h&&{[OQ[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($){$.button===0&&(C.current=!0)}return{onKeyDown:N,onMouseDown:U,onMouseUp:U,[jQ[c]]:()=>{a.current.insideReactTree=!0}}},[N,c,a]);return A.useMemo(()=>o?{reference:F,floating:G}:{},[o,F,G])}function TQ(e){const{open:n=!1,onOpenChange:t,elements:i}=e,r=tL(),a=A.useRef({}),[o]=A.useState(()=>wQ()),l=Q6()!=null,[f,c]=A.useState(i.reference),h=io((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 nC(e){e===void 0&&(e={});const{nodeId:n}=e,t=TQ({...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=J6();lo(()=>{h&&(d.current=h)},[h]);const v=cQ({...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 lo(()=>{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 mZ()&&hZ()}function MQ(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&&_a(o.domReference)&&o.domReference===R5(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=Nf(v.nativeEvent);if(f&&Ut(b)){if(mk()&&!v.relatedTarget){if(!d.current&&!yZ(b))return}else if(!bZ(b))return}i(!0,v.nativeEvent,"focus")},onBlur(v){c.current=!1;const b=v.relatedTarget,w=v.nativeEvent,k=Ut(b)&&b.hasAttribute(eC("focus-guard"))&&b.getAttribute("data-type")==="outside";h.current=window.setTimeout(()=>{var _;const C=R5(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{[H5]:o,[U5]:l,...f}=e;a=f}return{...t==="floating"&&{tabIndex:-1,[pQ]:""},...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&&[H5,U5].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 DQ(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 RQ=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function PQ(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=tL(),h=((t=a.domReference)==null?void 0:t.id)||c,d=A.useMemo(()=>{var C;return((C=wZ(a.floating))==null?void 0:C.id)||o},[a.floating,o]),p=(i=RQ.get(f))!=null?i:f,b=Q6()!=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 rL={scrollHideDelay:1e3,type:"hover",scrollbars:"xy"},aL=(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}}},xa=Re(e=>{const n=be("ScrollArea",rL,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,...N}=n,[H,P]=A.useState(!1),[z,F]=A.useState(!1),[G,U]=A.useState(!1),$=A.useRef(!0),R=A.useRef(!1),I=A.useRef(!0),q=A.useRef(!1),Y=Ze({name:"ScrollArea",props:n,classes:U6,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:M,vars:f,varsResolver:aL}),D=A.useRef(null),[W,V]=A.useState(null),L=nL([p,D,A.useCallback(X=>{V(ee=>ee===X?ee:X)},[])]);return ll(w==="present"?W:null,()=>{const X=D.current;X&&(F(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(Mz,{getStyles:Y,type:c==="never"?"always":c,scrollHideDelay:h,scrollbars:k,...Y("root"),...N,children:[y.jsx(Fz,{...d,...Y("viewport",{style:d==null?void 0:d.style}),ref:L,"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"&&!z?"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&&!R.current&&(_==null||_()),ne&&!$.current&&(C==null||C()),R.current=_e,$.current=ne;const ze=ye-(ae-le)>=-.8,we=ye===0;ze&&!q.current&&(E==null||E()),we&&!I.current&&(x==null||x()),q.current=ze,I.current=we},children:b}),(k==="xy"||k==="x")&&y.jsx(dS,{...Y("scrollbar"),orientation:"horizontal","data-hidden":c==="never"||w==="present"&&!G?!0:void 0,forceMount:!0,onMouseEnter:()=>P(!0),onMouseLeave:()=>P(!1),children:y.jsx(hS,{...Y("thumb")})}),(k==="xy"||k==="y")&&y.jsx(dS,{...Y("scrollbar"),orientation:"vertical","data-hidden":c==="never"||w==="present"&&!z?!0:void 0,forceMount:!0,onMouseEnter:()=>P(!0),onMouseLeave:()=>P(!1),children:y.jsx(hS,{...Y("thumb")})}),y.jsx(VX,{...Y("corner"),"data-hovered":H||void 0,"data-hidden":c==="never"||void 0})]})});xa.displayName="@mantine/core/ScrollArea";const tC=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",rL,e),M=A.useRef(null),[N,H]=A.useState(null),P=nL([h,M,A.useCallback(U=>{H($=>$===U?$:U)},[])]),z=A.useRef(!1),F=A.useRef(!1),G=A.useEffectEvent(()=>{const U=M.current;if(!U||!O)return;const $=U.scrollHeight>U.clientHeight;$!==z.current&&(F.current?O($):(F.current=!0,$&&O(!0)),z.current=$)});return ll(O?N:null,G),y.jsx(ve,{...j,variant:v,style:[{display:"flex",overflow:"hidden"},k],children:y.jsx(ve,{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(xa,{classNames:t,styles:i,scrollHideDelay:a,scrollbarSize:r,type:o,dir:l,offsetScrollbars:f,overscrollBehavior:c,viewportRef:P,onScrollPositionChange:d,unstyled:p,variant:v,viewportProps:b,vars:_,scrollbars:w,onBottomReached:C,onTopReached:x,startScrollPosition:E,"data-autosize":"true",children:n})})})});xa.classes=U6;xa.varsResolver=aL;tC.displayName="@mantine/core/ScrollAreaAutosize";tC.classes=U6;xa.Autosize=tC;var oL={root:"m_87cf2631"};const NQ={__staticSelector:"UnstyledButton"},Dt=Si(e=>{const n=be("UnstyledButton",NQ,e),{className:t,component:i="button",__staticSelector:r,unstyled:a,classNames:o,styles:l,style:f,attributes:c,...h}=n;return y.jsx(ve,{...Ze({name:r,props:n,classes:oL,className:t,style:f,classNames:o,styles:l,unstyled:a,attributes:c})("root",{focusable:!0}),component:i,type:i==="button"?"button":void 0,...h})});Dt.classes=oL;Dt.displayName="@mantine/core/UnstyledButton";var sL={root:"m_515a97f8"};const iC=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(ve,{component:"span",...Ze({name:"VisuallyHidden",classes:sL,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:f})("root"),...c})});iC.classes=sL;iC.displayName="@mantine/core/VisuallyHidden";var lL={root:"m_1b7284a3"};const uL=(e,{radius:n,shadow:t})=>({root:{"--paper-radius":n===void 0?void 0:Kt(n),"--paper-shadow":P6(t)}}),Mt=Si(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:lL,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:v,vars:f,varsResolver:uL});return y.jsx(ve,{mod:[{"data-with-border":l},p],...w("root"),variant:d,...b})});Mt.classes=lL;Mt.varsResolver=uL;Mt.displayName="@mantine/core/Paper";function K5(e,n,t,i){return e==="center"||i==="center"?{top:n}:e==="end"?{bottom:t}:e==="start"?{top:t}:{}}function X5(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 $Q={bottom:"borderTopLeftRadius",left:"borderTopRightRadius",right:"borderBottomLeftRadius",top:"borderBottomRightRadius"};function zQ({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",[$Q[f]]:i},d=-n/2;return f==="left"?{...h,...K5(c,o,t,r),right:d,borderLeftColor:"transparent",borderBottomColor:"transparent",clipPath:"polygon(100% 0, 0 0, 100% 100%)"}:f==="right"?{...h,...K5(c,o,t,r),left:d,borderRightColor:"transparent",borderTopColor:"transparent",clipPath:"polygon(0 100%, 0 0, 100% 100%)"}:f==="top"?{...h,...X5(c,a,t,r,l),bottom:d,borderTopColor:"transparent",borderLeftColor:"transparent",clipPath:"polygon(0 100%, 100% 100%, 100% 0)"}:f==="bottom"?{...h,...X5(c,a,t,r,l),top:d,borderBottomColor:"transparent",borderRightColor:"transparent",clipPath:"polygon(0 100%, 0 0, 100% 0)"}:{}}function Pg({position:e,arrowSize:n,arrowOffset:t,arrowRadius:i,arrowPosition:r,visible:a,arrowX:o,arrowY:l,style:f,...c}){const{dir:h}=Du();return a?y.jsx("div",{...c,style:{...f,...zQ({position:e,arrowSize:n,arrowOffset:t,arrowRadius:i,arrowPosition:r,dir:h,arrowX:o,arrowY:l})}}):null}Pg.displayName="@mantine/core/FloatingArrow";function fL(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 cL({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 dL={root:"m_9814e45f"};const LQ={zIndex:wa("modal")},hL=(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()}}),qm=Si(e=>{const n=be("Overlay",LQ,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(ve,{...Ze({name:"Overlay",props:n,classes:dL,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:C,vars:l,varsResolver:hL})("root"),mod:[{center:c,fixed:f},_],...x,children:h})});qm.classes=dL;qm.varsResolver=hL;qm.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 IQ({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 BQ={reuseTargetNode:!0},mL=Re(e=>{const{children:n,target:t,reuseTargetNode:i,ref:r,...a}=be("Portal",BQ,e),[o,l]=A.useState(!1),f=A.useRef(null);return us(()=>(l(!0),f.current=IQ({target:t,reuseTargetNode:i,...a}),Og(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)});mL.displayName="@mantine/core/Portal";const ul=Re(({withinPortal:e=!0,children:n,...t})=>Bm()==="test"||!e?y.jsx(y.Fragment,{children:n}):y.jsx(mL,{...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"}),Pv={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"}}},Z5={entering:"in",entered:"in",exiting:"out",exited:"out","pre-exiting":"out","pre-entering":"out"};function Q5({transition:e,state:n,duration:t,timingFunction:i}){const r={WebkitBackfaceVisibility:"hidden",transitionDuration:`${t}ms`,transitionTimingFunction:i};return typeof e=="string"?e in Pv?{transitionProperty:Pv[e].transitionProperty,...r,...Pv[e].common,...Pv[e][Z5[n]]}:{}:{transitionProperty:e.transitionProperty,...r,...e.common,...e[Z5[n]]}}function FQ({duration:e,exitDuration:n,timingFunction:t,mounted:i,onEnter:r,onExit:a,onEntered:o,onExited:l,enterDelay:f,exitDelay:c}){const h=ui(),d=$6(),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 N=M?r:a,H=M?o:l,P=p?0:M?e:n;b(P),P===0?(typeof N=="function"&&N(),typeof H=="function"&&H(),k(M?"entered":"exited")):x.current=requestAnimationFrame(()=>{yh.flushSync(()=>{k(M?"pre-entering":"pre-exiting")}),x.current=requestAnimationFrame(()=>{typeof N=="function"&&N(),k(M?"entering":"exiting"),_.current=window.setTimeout(()=>{typeof H=="function"&&H(),k(M?"entered":"exited")},P)})})},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=Bm(),{transitionDuration:b,transitionStatus:w,transitionTimingFunction:k}=FQ({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(_?{}:Q5({transition:n,duration:b,state:w,timingFunction:k}))}):_?null:y.jsx(y.Fragment,{children:a(Q5({transition:n,duration:b,state:w,timingFunction:k}))})}is.displayName="@mantine/core/Transition";const qQ={duration:100,transition:"fade"};function J5(e,n){return{...qQ,...n,...e}}const[HQ,pL]=Gr("Popover component was not found in the tree");function py({children:e,active:n=!0,refProp:t="ref",innerRef:i}){const r=Wt(kK(n),i),a=Tu(e);return a?A.cloneElement(a,{[t]:r}):e}function vL(e){return y.jsx(iC,{tabIndex:-1,"data-autofocus":!0,...e})}py.displayName="@mantine/core/FocusTrap";vL.displayName="@mantine/core/FocusTrapInitialFocus";py.InitialFocus=vL;var gL={dropdown:"m_38a85659",arrow:"m_a31dc6c1",overlay:"m_3d7bc908"};const rC=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=pL(),v=uz({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(py,{active:p.trapFocus&&p.opened,innerRef:w,children:y.jsxs(ve,{...b,...d,variant:l,onKeyDownCapture:uK(()=>{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(Pg,{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})})]})})}})})});rC.classes=gL;rC.displayName="@mantine/core/PopoverDropdown";const UQ={refProp:"ref",popupType:"dialog"},yL=Re(e=>{const{children:n,refProp:t,popupType:i,ref:r,...a}=be("PopoverTarget",UQ,e),o=Tu(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=pL(),c=Wt(f.reference,ry(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)}}})});yL.displayName="@mantine/core/PopoverTarget";function VQ(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 WQ(e,n,t){const i=VQ(e.middlewares),r=[Jz(e.offset),mQ()];return e.dropdownVisible&&t!=="test"&&e.preventPositionChangeWhenVisible&&(i.flip=!1),i.flip&&r.push(typeof i.flip=="boolean"?Rg():Rg(i.flip)),i.shift&&r.push(Z6(typeof i.shift=="boolean"?{limiter:q5(),padding:5}:{limiter:q5(),padding:5,...i.shift})),i.inline&&r.push(typeof i.inline=="boolean"?Eh():Eh(i.inline)),r.push(eL({element:e.arrowRef,padding:e.arrowOffset})),(i.size||e.width==="target")&&r.push(hQ({...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 GQ(e){const n=Bm(),[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=nC({strategy:e.strategy,placement:e.preventPositionChangeWhenVisible?e.positionRef.current:e.position,middleware:WQ(e,()=>l,n),whileElementsMounted:e.keepMounted?void 0:bS});return A.useEffect(()=>{if(!(!l.refs.reference.current||!l.refs.floating.current)&&t)return bS(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 YQ={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"},bL=(e,{radius:n,shadow:t})=>({dropdown:{"--popover-radius":n===void 0?void 0:Kt(n),"--popover-shadow":P6(t)}});function En(e){var tn,cn,On,mn,an,en,Rn;const n=be("Popover",YQ,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:N,trapFocus:H,onClose:P,onDismiss:z,onOpen:F,onChange:G,zIndex:U,radius:$,shadow:R,id:I,defaultOpened:q,__staticSelector:Y,withRoles:D,disabled:W,returnFocus:V,variant:L,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:gL,classNames:C,styles:x,unstyled:_,attributes:le,rootSelector:"dropdown",vars:ee,varsResolver:bL}),{resolvedStyles:we}=Hi({classNames:C,styles:x,props:n}),[Ce,Ne]=A.useState(o??q??!1),ge=A.useRef(i),xe=A.useRef(null),[Pe,ue]=A.useState(null),[Be,Ge]=A.useState(null),{dir:Ve}=Du(),Xe=Bm(),Qe=qi(I),ie=GQ({middlewares:d,width:h,position:fL(Ve,i),offset:typeof r=="number"?r+(p?v/2:0):r,arrowRef:xe,arrowOffset:b,onPositionChange:a,opened:o,defaultOpened:q,onChange:G,onOpen:F,onClose:P,onDismiss:z,strategy:re,dropdownVisible:Ce,setDropdownVisible:Ne,positionRef:ge,disabled:W,preventPositionChangeWhenVisible:_e,keepMounted:X});hK(()=>{E&&(ie.onClose(),z==null||z())},N,[Pe,Be]);const he=A.useCallback(De=>{ue(De),ie.floating.refs.setReference(De)},[ie.floating.refs.setReference]),Ye=A.useCallback(De=>{Ge(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||(ge.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(HQ,{value:{returnFocus:V,disabled:W,controlled:ie.controlled,reference:he,floating:Ye,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:H,withinPortal:O,portalProps:j,zIndex:U,radius:$,shadow:R,closeOnEscape:M,onDismiss:z,onClose:ie.onClose,onToggle:ie.onToggle,getTargetId:()=>Qe,getDropdownId:()=>`${Qe}-dropdown`,withRoles:D,targetProps:ne,__staticSelector:Y,classNames:C,styles:x,unstyled:_,variant:L,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(qm,{...ye,...ze("overlay",{className:ye==null?void 0:ye.className,style:[De,ye==null?void 0:ye.style]})})})})]})}En.Target=yL;En.Dropdown=rC;En.varsResolver=bL;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 Ba={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 wL=({className:e,...n})=>y.jsxs(ve,{component:"span",className:dn(Ba.barsLoader,e),...n,children:[y.jsx("span",{className:Ba.bar}),y.jsx("span",{className:Ba.bar}),y.jsx("span",{className:Ba.bar})]});wL.displayName="@mantine/core/Bars";const kL=({className:e,...n})=>y.jsxs(ve,{component:"span",className:dn(Ba.dotsLoader,e),...n,children:[y.jsx("span",{className:Ba.dot}),y.jsx("span",{className:Ba.dot}),y.jsx("span",{className:Ba.dot})]});kL.displayName="@mantine/core/Dots";const _L=({className:e,...n})=>y.jsx(ve,{component:"span",className:dn(Ba.ovalLoader,e),...n});_L.displayName="@mantine/core/Oval";const xL={bars:wL,oval:_L,dots:kL},KQ={loaders:xL,type:"oval"},SL=(e,{size:n,color:t})=>({root:{"--loader-size":Pn(n,"loader-size"),"--loader-color":t?lt(t,e):void 0}}),xi=Re(e=>{const n=be("Loader",KQ,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:Ba,className:o,style:l,classNames:f,styles:c,unstyled:h,attributes:b,vars:a,varsResolver:SL});return v?y.jsx(ve,{...k("root"),...w,children:v}):y.jsx(ve,{...k("root"),component:d[r],variant:p,size:t,...w})});xi.defaultLoaders=xL;xi.classes=Ba;xi.varsResolver=SL;xi.displayName="@mantine/core/Loader";var Pc={root:"m_8d3f4000",icon:"m_8d3afb97",loader:"m_302b9fb1",group:"m_1a0f1b21",groupSection:"m_437b6484"};const eT={orientation:"horizontal"},CL=(e,{borderWidth:n})=>({group:{"--ai-border-width":me(n)}}),vy=Re(e=>{const n=be("ActionIconGroup",eT,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",eT,e);return y.jsx(ve,{...Ze({name:"ActionIconGroup",props:n,classes:Pc,className:t,style:i,classNames:r,styles:a,unstyled:o,attributes:p,vars:f,varsResolver:CL,rootSelector:"group"})("group"),variant:h,mod:[{"data-orientation":l},d],role:"group",...v})});vy.classes=Pc;vy.varsResolver=CL;vy.displayName="@mantine/core/ActionIconGroup";const AL=(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":ri(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}}},gy=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(ve,{...Ze({name:"ActionIconGroupSection",props:n,classes:Pc,className:t,style:i,classNames:r,styles:a,unstyled:o,attributes:p,vars:l,varsResolver:AL,rootSelector:"groupSection"})("groupSection"),variant:f,...v})});gy.classes=Pc;gy.varsResolver=AL;gy.displayName="@mantine/core/ActionIconGroupSection";const OL=(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}}},kt=Si(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:OL});return y.jsxs(Dt,{...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:N=>y.jsx(ve,{component:"span",...M("loader",{style:N}),"aria-hidden":!0,children:y.jsx(xi,{color:"var(--ai-color)",size:"calc(var(--ai-size) * 0.55)",...c})})}),y.jsx(ve,{component:"span",mod:{loading:f},...M("icon"),children:k})]})});kt.classes=Pc;kt.varsResolver=OL;kt.displayName="@mantine/core/ActionIcon";kt.Group=vy;kt.GroupSection=gy;function jL({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"})})}jL.displayName="@mantine/core/CloseIcon";var EL={root:"m_86a44da5","root--subtle":"m_220c80f2"};const XQ={variant:"subtle"},TL=(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=Si(e=>{const n=be("CloseButton",XQ,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:EL,classNames:l,styles:c,unstyled:h,attributes:k,vars:r,varsResolver:TL});return y.jsxs(Dt,{...C,unstyled:h,variant:v,disabled:p,mod:[{disabled:p||d},w],...x("root",{variant:v,active:!p&&!d}),children:[b||y.jsx(jL,{}),i]})});hl.classes=EL;hl.varsResolver=TL;hl.displayName="@mantine/core/CloseButton";function ZQ(e){return A.Children.toArray(e).filter(Boolean)}var ML={root:"m_4081bf90"};const QQ={preventGrowOverflow:!0,gap:"md",align:"center",justify:"flex-start",wrap:"wrap"},DL=(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}}),Ue=Re(e=>{const n=be("Group",QQ,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=ZQ(l),O=E.length,j=Ht(f??"md");return y.jsx(ve,{...Ze({name:"Group",props:n,stylesCtx:{childWidth:`calc(${100/O}% - (${j} - ${j} / ${O}))`},className:i,style:r,classes:ML,classNames:t,styles:a,unstyled:o,attributes:C,vars:b,varsResolver:DL})("root"),variant:w,mod:[{grow:p},_],size:k,...x,children:E})});Ue.classes=ML;Ue.varsResolver=DL;Ue.displayName="@mantine/core/Group";const[JQ,cs]=Gr("ModalBase component was not found in tree");function eJ({opened:e,transitionDuration:n}){const[t,i]=A.useState(e),r=A.useRef(-1),a=$6()?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 nJ({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=eJ({opened:t,transitionDuration:typeof(n==null?void 0:n.duration)=="number"?n==null?void 0:n.duration:200});return hz("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}),uz({opened:t,shouldReturnFocus:i&&o}),{_id:l,titleMounted:f,bodyMounted:h,shouldLockScroll:p,setTitleMounted:c,setBodyMounted:d}}var ro=function(){return ro=Object.assign||function(n){for(var t,i=1,r=arguments.length;i"u")return yJ;var n=bJ(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])}},kJ=$L(),Hf="data-scroll-locked",_J=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(iJ,` { + overflow: hidden `).concat(i,`; + padding-right: `).concat(l,"px ").concat(i,`; + } + body[`).concat(Hf,`] { + 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(mg,` { + right: `).concat(l,"px ").concat(i,`; + } + + .`).concat(pg,` { + margin-right: `).concat(l,"px ").concat(i,`; + } + + .`).concat(mg," .").concat(mg,` { + right: 0 `).concat(i,`; + } + + .`).concat(pg," .").concat(pg,` { + margin-right: 0 `).concat(i,`; + } + + body[`).concat(Hf,`] { + `).concat(rJ,": ").concat(l,`px; + } +`)},tT=function(){var e=parseInt(document.body.getAttribute(Hf)||"0",10);return isFinite(e)?e:0},xJ=function(){A.useEffect(function(){return document.body.setAttribute(Hf,(tT()+1).toString()),function(){var e=tT()-1;e<=0?document.body.removeAttribute(Hf):document.body.setAttribute(Hf,e.toString())}},[])},SJ=function(e){var n=e.noRelative,t=e.noImportant,i=e.gapMode,r=i===void 0?"margin":i;xJ();var a=A.useMemo(function(){return wJ(r)},[r]);return A.createElement(kJ,{styles:_J(a,!n,r,t?"":"!important")})},kS=!1;if(typeof window<"u")try{var Nv=Object.defineProperty({},"passive",{get:function(){return kS=!0,!0}});window.addEventListener("test",Nv,Nv),window.removeEventListener("test",Nv,Nv)}catch{kS=!1}var Sf=kS?{passive:!1}:!1,CJ=function(e){return e.tagName==="TEXTAREA"},zL=function(e,n){if(!(e instanceof Element))return!1;var t=window.getComputedStyle(e);return t[n]!=="hidden"&&!(t.overflowY===t.overflowX&&!CJ(e)&&t[n]==="visible")},AJ=function(e){return zL(e,"overflowY")},OJ=function(e){return zL(e,"overflowX")},iT=function(e,n){var t=n.ownerDocument,i=n;do{typeof ShadowRoot<"u"&&i instanceof ShadowRoot&&(i=i.host);var r=LL(e,i);if(r){var a=IL(e,i),o=a[1],l=a[2];if(o>l)return!0}i=i.parentNode}while(i&&i!==t.body);return!1},jJ=function(e){var n=e.scrollTop,t=e.scrollHeight,i=e.clientHeight;return[n,t,i]},EJ=function(e){var n=e.scrollLeft,t=e.scrollWidth,i=e.clientWidth;return[n,t,i]},LL=function(e,n){return e==="v"?AJ(n):OJ(n)},IL=function(e,n){return e==="v"?jJ(n):EJ(n)},TJ=function(e,n){return e==="h"&&n==="rtl"?-1:1},MJ=function(e,n,t,i,r){var a=TJ(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=IL(e,l),b=v[0],w=v[1],k=v[2],_=w-k-a*b;(b||_)&&LL(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},$v=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},rT=function(e){return[e.deltaX,e.deltaY]},aT=function(e){return e&&"current"in e?e.current:e},DJ=function(e,n){return e[0]===n[0]&&e[1]===n[1]},RJ=function(e){return` + .block-interactivity-`.concat(e,` {pointer-events: none;} + .allow-interactivity-`).concat(e,` {pointer-events: all;} +`)},PJ=0,Cf=[];function NJ(e){var n=A.useRef([]),t=A.useRef([0,0]),i=A.useRef(),r=A.useState(PJ++)[0],a=A.useState($L)[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=tJ([e.lockRef.current],(e.shards||[]).map(aT),!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 _=$v(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 N=window.getSelection(),H=N&&N.anchorNode,P=H?H===j||H.contains(j):!1;if(P)return!1;var z=iT(M,j);if(!z)return!0;if(z?O=M:(O=M==="v"?"h":"v",z=iT(M,j)),!z)return!1;if(!i.current&&"changedTouches"in w&&(x||E)&&(i.current=O),!O)return!0;var F=i.current||O;return MJ(F,k,w,F==="h"?x:E)},[]),f=A.useCallback(function(w){var k=w;if(!(!Cf.length||Cf[Cf.length-1]!==a)){var _="deltaY"in k?rT(k):$v(k),C=n.current.filter(function(O){return O.name===k.type&&(O.target===k.target||k.target===O.shadowParent)&&DJ(O.delta,_)})[0];if(C&&C.should){k.cancelable&&k.preventDefault();return}if(!C){var x=(o.current.shards||[]).map(aT).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:$J(_)};n.current.push(x),setTimeout(function(){n.current=n.current.filter(function(E){return E!==x})},1)},[]),h=A.useCallback(function(w){t.current=$v(w),i.current=void 0},[]),d=A.useCallback(function(w){c(w.type,rT(w),w.target,l(w,e.lockRef.current))},[]),p=A.useCallback(function(w){c(w.type,$v(w),w.target,l(w,e.lockRef.current))},[]);A.useEffect(function(){return Cf.push(a),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:p}),document.addEventListener("wheel",f,Sf),document.addEventListener("touchmove",f,Sf),document.addEventListener("touchstart",h,Sf),function(){Cf=Cf.filter(function(w){return w!==a}),document.removeEventListener("wheel",f,Sf),document.removeEventListener("touchmove",f,Sf),document.removeEventListener("touchstart",h,Sf)}},[]);var v=e.removeScrollBar,b=e.inert;return A.createElement(A.Fragment,null,b?A.createElement(a,{styles:RJ(r)}):null,v?A.createElement(SJ,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function $J(e){for(var n=null;e!==null;)e instanceof ShadowRoot&&(n=e.host,e=e.host),e=e.parentNode;return n}const zJ=cJ(NL,NJ);var gu=A.forwardRef(function(e,n){return A.createElement(yy,ro({},e,{ref:n,sideCar:zJ}))});gu.classNames=yy.classNames;function BL({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:N,shouldLockScroll:H,setTitleMounted:P,setBodyMounted:z}=nJ({id:i,transitionProps:r,opened:n,trapFocus:l,closeOnEscape:f,onClose:t,returnFocus:c}),{key:F,...G}=E||{};return y.jsx(ul,{...p,withinPortal:d,children:y.jsx(JQ,{value:{opened:n,onClose:t,closeOnClickOutside:h,onExitTransitionEnd:a,onEnterTransitionEnd:o,transitionProps:{...r,keepMounted:e},getTitleId:()=>`${j}-title`,getBodyId:()=>`${j}-body`,titleMounted:M,bodyMounted:N,setTitleMounted:P,setBodyMounted:z,trapFocus:l,closeOnEscape:f,zIndex:w,unstyled:x},children:y.jsx(gu,{enabled:H&&v,...G,children:y.jsx(ve,{...O,id:j,__vars:{...C,"--mb-z-index":(w||wa("modal")).toString(),"--mb-shadow":P6(k),"--mb-padding":Ht(_)},children:b})},F)})})}BL.displayName="@mantine/core/ModalBase";function LJ(){const e=cs();return A.useEffect(()=>(e.setBodyMounted(!0),()=>e.setBodyMounted(!1)),[]),e.getBodyId()}var Qf={title:"m_615af6c9",header:"m_b5489c3c",inner:"m_60c222c7",content:"m_fd1ab0aa",close:"m_606cb269",body:"m_5df29311"};function FL({className:e,...n}){const t=LJ(),i=cs();return y.jsx(ve,{id:t,className:dn({[Qf.body]:!i.unstyled},e),...n})}FL.displayName="@mantine/core/ModalBaseBody";function qL({className:e,onClick:n,...t}){const i=cs();return y.jsx(hl,{...t,onClick:r=>{i.onClose(),n==null||n(r)},className:dn({[Qf.close]:!i.unstyled},e),unstyled:i.unstyled})}qL.displayName="@mantine/core/ModalBaseCloseButton";function HL({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({[Qf.inner]:!l.unstyled},t.className),children:y.jsx(py,{active:l.opened&&l.trapFocus,innerRef:a,children:y.jsx(Mt,{...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({[Qf.content]:!l.unstyled},n),unstyled:l.unstyled,children:o.children})})})})}HL.displayName="@mantine/core/ModalBaseContent";function UL({className:e,...n}){const t=cs();return y.jsx(ve,{component:"header",className:dn({[Qf.header]:!t.unstyled},e),...n})}UL.displayName="@mantine/core/ModalBaseHeader";const IJ={duration:200,timingFunction:"ease",transition:"fade"};function BJ(e){const n=cs();return{...IJ,...n.transitionProps,...e}}function VL({onClick:e,transitionProps:n,style:t,visible:i,...r}){const a=cs(),o=BJ(n);return y.jsx(is,{mounted:i!==void 0?i:a.opened,...o,transition:"fade",children:l=>y.jsx(qm,{fixed:!0,style:[t,l],zIndex:a.zIndex,unstyled:a.unstyled,onClick:f=>{e==null||e(f),a.closeOnClickOutside&&a.onClose()},...r})})}VL.displayName="@mantine/core/ModalBaseOverlay";function FJ(){const e=cs();return A.useEffect(()=>(e.setTitleMounted(!0),()=>e.setTitleMounted(!1)),[]),e.getTitleId()}function WL({className:e,...n}){const t=FJ(),i=cs();return y.jsx(ve,{component:"h2",className:dn({[Qf.title]:!i.unstyled},e),id:t,...n})}WL.displayName="@mantine/core/ModalBaseTitle";function qJ({children:e}){return y.jsx(y.Fragment,{children:e})}const GL=A.createContext({size:"sm"}),YL=Re(e=>{const n=be("InputClearButton",null,e),{size:t,variant:i,vars:r,classNames:a,styles:o,...l}=n,f=A.use(GL),{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})});YL.displayName="@mantine/core/InputClearButton";const HJ={xs:7,sm:8,md:10,lg:12,xl:15};function UJ({__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:HJ[r]},children:[o,t||i]}):t===null?null:t||o||i}const Ru=A.createContext({offsetBottom:!1,offsetTop:!1,describedBy:void 0,getStyles:null,inputId:void 0,labelId:void 0});var Sa={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 KL=(e,{size:n})=>({description:{"--input-description-size":n===void 0?void 0:`calc(${ri(n)} - ${me(2)})`}}),Hm=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(Ru),v=Ze({name:["InputWrapper",f],props:n,classes:Sa,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:h,rootSelector:"description",vars:l,varsResolver:KL});return y.jsx(ve,{component:"p",...(c&&(p==null?void 0:p.getStyles)||v)("description",p!=null&&p.getStyles?{className:i,style:r}:void 0),...d})});Hm.classes=Sa;Hm.varsResolver=KL;Hm.displayName="@mantine/core/InputDescription";const XL=(e,{size:n})=>({error:{"--input-error-size":n===void 0?void 0:`calc(${ri(n)} - ${me(2)})`}}),Um=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:Sa,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:f,rootSelector:"error",vars:l,varsResolver:XL}),v=A.use(Ru);return y.jsx(ve,{component:"p",...(h&&(v==null?void 0:v.getStyles)||p)("error",v!=null&&v.getStyles?{className:i,style:r}:void 0),...d})});Um.classes=Sa;Um.varsResolver=XL;Um.displayName="@mantine/core/InputError";const VJ={labelElement:"label"},ZL=(e,{size:n})=>({label:{"--input-label-size":ri(n),"--input-asterisk-color":void 0}}),Vm=Re(e=>{const n=be("InputLabel",VJ,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:Sa,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:w,rootSelector:"label",vars:l,varsResolver:ZL}),C=A.use(Ru),x=(C==null?void 0:C.getStyles)||_;return y.jsxs(ve,{...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:" *"})]})});Vm.classes=Sa;Vm.varsResolver=ZL;Vm.displayName="@mantine/core/InputLabel";const aC=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(ve,{...Ze({name:["InputPlaceholder",f],props:n,classes:Sa,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:d,rootSelector:"placeholder"})("placeholder"),mod:[{error:!!c},h],component:"span",...p})});aC.classes=Sa;aC.displayName="@mantine/core/InputPlaceholder";function WJ(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 GJ={labelElement:"label",inputContainer:e=>e,inputWrapperOrder:["label","description","input","error"]},QL=(e,{size:n})=>({label:{"--input-label-size":ri(n),"--input-asterisk-color":void 0},error:{"--input-error-size":n===void 0?void 0:`calc(${ri(n)} - ${me(2)})`},description:{"--input-description-size":n===void 0?void 0:`calc(${ri(n)} - ${me(2)})`}}),by=Re(e=>{const n=be("InputWrapper",GJ,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:N,mod:H,attributes:P,...z}=n,F=Ze({name:["InputWrapper",h],props:N||n,classes:Sa,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:P,vars:l,varsResolver:QL}),G={size:f,variant:c,__staticSelector:h},U=qi(j),$=typeof O=="boolean"?O:M,R=(C==null?void 0:C.id)||`${U}-error`,I=(_==null?void 0:_.id)||`${U}-description`,q=U,Y=!!b&&typeof b!="boolean",D=!!w,W=`${Y?R:""} ${D?I:""}`,V=W.trim().length>0?W.trim():void 0,L=(k==null?void 0:k.id)||`${U}-label`,X=v&&y.jsx(Vm,{labelElement:x,id:L,htmlFor:q,required:$,...G,...k,children:v},"label"),ee=D&&y.jsx(Hm,{..._,...G,size:(_==null?void 0:_.size)||G.size,id:(_==null?void 0:_.id)||I,children:w},"description"),re=y.jsx(A.Fragment,{children:d(E)},"input"),se=Y&&A.createElement(Um,{...C,...G,size:(C==null?void 0:C.size)||G.size,key:"error",id:(C==null?void 0:C.id)||R},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(Ru,{value:{getStyles:F,describedBy:V,inputId:q,labelId:L,...WJ(p,{hasDescription:D,hasError:Y})},children:y.jsx(ve,{variant:c,size:f,mod:[{error:!!b},H],id:x==="label"?void 0:j,...F("root"),...z,children:ye})})});by.classes=Sa;by.varsResolver=QL;by.displayName="@mantine/core/InputWrapper";const YJ={variant:"default",leftSectionPointerEvents:"none",rightSectionPointerEvents:"none",withAria:!0,withErrorStyles:!0,size:"sm",loading:!1,loadingPosition:"right"},JL=(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":ri(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=Si(e=>{const n=be("Input",YJ,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:N,multiline:H,radius:P,id:z,withAria:F,withErrorStyles:G,mod:U,inputSize:$,attributes:R,__clearSection:I,__clearable:q,__clearSectionMode:Y,__defaultRightSection:D,loading:W,loadingPosition:V,rootRef:L,...X}=n,{styleProps:ee,rest:re}=Mu(X),se=A.use(Ru),ye={offsetBottom:se==null?void 0:se.offsetBottom,offsetTop:se==null?void 0:se.offsetTop},ae=Ze({name:["Input",f],props:c||n,classes:Sa,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:R,stylesCtx:ye,rootSelector:"wrapper",vars:M,varsResolver:JL}),le=F?{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)||z}:{},_e=W?y.jsx(xi,{size:V==="left"?"calc(var(--input-left-section-size) / 2)":"calc(var(--input-right-section-size) / 2)"}):null,ne=W&&V==="left"?_e:b,ze=UJ({__clearable:q,__clearSection:I,rightSection:W&&V==="right"?_e:_,__defaultRightSection:D,size:h,__clearSectionMode:Y});return y.jsx(GL,{value:{size:h||"sm"},children:y.jsxs(ve,{ref:L,...ae("wrapper"),...ee,...d,mod:[{error:!!p&&G,pointer:N,disabled:v,multiline:H,"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(ve,{component:"input",...re,...le,required:l,mod:{disabled:v,error:!!p&&G},variant:j,__size:$,...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=Sa;Vt.varsResolver=JL;Vt.Wrapper=by;Vt.Label=Vm;Vt.Error=Um;Vt.Description=Hm;Vt.Placeholder=aC;Vt.ClearButton=YL;Vt.displayName="@mantine/core/Input";function eI(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:N,vars:H,mod:P,attributes:z,...F}=i,{styleProps:G,rest:U}=Mu(F),$={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:N,id:C,mod:P,attributes:z,..._};return{...U,classNames:f,styles:c,unstyled:d,wrapperProps:{...$,...G},inputProps:{required:l,classNames:f,styles:c,unstyled:d,size:x,__staticSelector:p,__stylesApiProps:v||i,error:o,variant:N,id:C,attributes:z}}}const KJ={__staticSelector:"InputBase",withAria:!0,size:"sm"},Ui=Si(e=>{const{inputProps:n,wrapperProps:t,...i}=eI("InputBase",KJ,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 Ng({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"})})}Ng.displayName="@mantine/core/AccordionChevron";var nI={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 tI=(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}}},Gh=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:nI,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:E,vars:l,varsResolver:tI}),M=qi(p),N=h&&`${M}-title`||void 0,H=`${M}-body`;return y.jsx(ve,{id:M,...j("root",{variant:_}),variant:_,...O,role:x||"alert","aria-describedby":d?H:void 0,"aria-labelledby":h?N: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:N,...j("label"),children:h})}),d&&y.jsx("div",{id:H,...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})]})})});Gh.classes=nI;Gh.varsResolver=tI;Gh.displayName="@mantine/core/Alert";var iI={root:"m_b6d8b162"};function XJ(e){if(e==="start")return"start";if(e==="end"||e)return"end"}const ZJ={inherit:!1},rI=(e,{variant:n,lineClamp:t,gradient:i,size:r})=>({root:{"--text-fz":ri(r),"--text-lh":fK(r),"--text-gradient":n==="gradient"?fS(i,e):void 0,"--text-line-clamp":typeof t=="number"?t.toString():void 0}}),Ee=Si(e=>{const n=be("Text",ZJ,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(ve,{...Ze({name:["Text",f],props:n,classes:iI,className:h,style:d,classNames:p,styles:v,unstyled:b,attributes:C,vars:c,varsResolver:rI})("root",{focusable:!0}),component:l?"span":"p",variant:w,mod:[{"data-truncate":XJ(i),"data-line-clamp":typeof t=="number","data-inline":r,"data-inherit":a},k],size:_,...x})});Ee.classes=iI;Ee.varsResolver=rI;Ee.displayName="@mantine/core/Text";var aI={root:"m_849cf0da"};const QJ={underline:"hover"},wy=Si(e=>{const{underline:n,className:t,unstyled:i,mod:r,...a}=be("Anchor",QJ,e);return y.jsx(Ee,{component:"a",className:dn({[aI.root]:!i},t),...a,mod:[{underline:n},r],__staticSelector:"Anchor",unstyled:i})});wy.classes=aI;wy.displayName="@mantine/core/Anchor";const[JJ,Nc]=Gr("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 oC=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(ve,{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)`}})});oC.classes=ml;oC.displayName="@mantine/core/AppShellAside";const sC=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(ve,{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()}})});sC.classes=ml;sC.displayName="@mantine/core/AppShellFooter";const lC=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(ve,{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()}})});lC.classes=ml;lC.displayName="@mantine/core/AppShellHeader";const uC=Re(e=>{const{classNames:n,className:t,style:i,styles:r,vars:a,...o}=be("AppShellMain",null,e);return y.jsx(ve,{component:"main",...Nc().getStyles("main",{className:t,style:i,classNames:n,styles:r}),...o})});uC.classes=ml;uC.displayName="@mantine/core/AppShellMain";const fC=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(ve,{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)`}})});fC.classes=ml;fC.displayName="@mantine/core/AppShellNavbar";const cC=Si(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(ve,{mod:[{grow:o},l],...c.getStyles("section",{className:t,style:i,classNames:n,styles:r}),...f})});cC.classes=ml;cC.displayName="@mantine/core/AppShellSection";function Wm(e){return typeof e=="object"?e.base:e}function Gm(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 Ym(e){return!(typeof e!="object"||e===null||Object.keys(e).length===1&&"base"in e)}function eee({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")),Gm(o)){const p=me(Wm(o));e["--app-shell-aside-width"]=p,e["--app-shell-aside-offset"]=p}if(Ym(o)&&(typeof o.base<"u"&&(e["--app-shell-aside-width"]=me(o.base),e["--app-shell-aside-offset"]=me(o.base)),Pt(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=N6(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 nee({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"),Gm(r)){const l=me(Wm(r));e["--app-shell-footer-height"]=l,o&&(e["--app-shell-footer-offset"]=l)}Ym(r)&&(typeof r.base<"u"&&(e["--app-shell-footer-height"]=me(r.base),o&&(e["--app-shell-footer-offset"]=me(r.base))),Pt(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 tee({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"),Gm(r)){const l=me(Wm(r));e["--app-shell-header-height"]=l,o&&(e["--app-shell-header-offset"]=l)}Ym(r)&&(typeof r.base<"u"&&(e["--app-shell-header-height"]=me(r.base),o&&(e["--app-shell-header-offset"]=me(r.base))),Pt(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 iee({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")),Gm(o)){const p=me(Wm(o));e["--app-shell-navbar-width"]=p,e["--app-shell-navbar-offset"]=p,a==="static"&&(e["--app-shell-navbar-grid-width"]=p)}if(Ym(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))),Pt(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=N6(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 ree({padding:e,baseStyles:n,minMediaStyles:t}){Gm(e)&&(n["--app-shell-padding"]=wk(Wm(e))),Ym(e)&&(e.base&&(n["--app-shell-padding"]=wk(e.base)),Pt(e).forEach(i=>{i!=="base"&&(t[i]=t[i]||{},t[i]["--app-shell-padding"]=wk(e[i]))}))}function aee({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"),iee({baseStyles:c,minMediaStyles:l,maxMediaStyles:f,navbar:e,theme:a,mode:o}),eee({baseStyles:c,minMediaStyles:l,maxMediaStyles:f,aside:i,theme:a,mode:o}),tee({baseStyles:c,minMediaStyles:l,header:n,mode:o}),nee({baseStyles:c,minMediaStyles:l,footer:t,mode:o}),ree({baseStyles:c,minMediaStyles:l,padding:r});const h=Hh(Pt(l),a.breakpoints).map(p=>({query:`(min-width: ${Cg(p.px)})`,styles:l[p.value]})),d=Hh(Pt(f),a.breakpoints).map(p=>({query:`(max-width: ${Cg(p.px)})`,styles:f[p.value]}));return{baseStyles:c,media:[...h,...d]}}function oee({navbar:e,header:n,aside:t,footer:i,padding:r,mode:a,selector:o}){const l=ui(),f=bo(),{media:c,baseStyles:h}=aee({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 see({transitionDuration:e,disabled:n}){const[t,i]=A.useState(!0),r=A.useRef(-1),a=A.useRef(-1);return hz("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 lee={withBorder:!0,padding:0,transitionDuration:200,transitionTimingFunction:"ease",zIndex:wa("app"),mode:"fixed"},oI=(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",lee,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,...N}=n,H=Ze({name:"AppShell",classes:ml,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:j,vars:l,varsResolver:oI}),P=see({disabled:k,transitionDuration:d}),z=qi(M);return y.jsxs(JJ,{value:{getStyles:H,withBorder:c,zIndex:b,disabled:k,offsetScrollbars:x,mode:E},children:[y.jsx(oee,{navbar:f,header:v,aside:_,footer:C,padding:h,mode:E,selector:E==="static"?`#${z}`:void 0}),y.jsx(ve,{...H("root"),id:z,mod:[{resizing:P,layout:w,disabled:k,mode:E},O],...N})]})});wr.classes=ml;wr.varsResolver=oI;wr.displayName="@mantine/core/AppShell";wr.Navbar=fC;wr.Header=lC;wr.Main=uC;wr.Aside=oC;wr.Footer=sC;wr.Section=cC;function sI(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=>sI(n))}:typeof e=="number"||typeof e=="bigint"||typeof e=="boolean"?{value:e,label:`${e}`}:e}function ky(e){return e?e.map(n=>sI(n)):[]}function Km(e){return e.reduce((n,t)=>"group"in t?{...n,...Km(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 uee={error:null},lI=(e,{size:n,color:t})=>({chevron:{"--combobox-chevron-size":Pn(n,"combobox-chevron-size"),"--combobox-chevron-color":t?lt(t,e):void 0}}),_y=Re(e=>{const n=be("ComboboxChevron",uee,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:lI,attributes:h,rootSelector:"chevron"});return y.jsx(ve,{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=lI;_y.displayName="@mantine/core/ComboboxChevron";const[fee,Ca]=Gr("Combobox component was not found in tree");function uI({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)}})}uI.displayName="@mantine/core/ComboboxClearButton";const dC=Re(e=>{const{classNames:n,styles:t,className:i,style:r,hidden:a,...o}=be("ComboboxDropdown",null,e),l=Ca();return y.jsx(En.Dropdown,{...o,role:"presentation","data-hidden":a||void 0,...l.getStyles("dropdown",{className:i,style:r,classNames:n,styles:t})})});dC.classes=fr;dC.displayName="@mantine/core/ComboboxDropdown";const cee={refProp:"ref"},fI=Re(e=>{const{children:n,refProp:t,ref:i}=be("ComboboxDropdownTarget",cee,e);if(Ca(),!D6(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})});fI.displayName="@mantine/core/ComboboxDropdownTarget";const hC=Re(e=>{const{classNames:n,className:t,style:i,styles:r,vars:a,...o}=be("ComboboxEmpty",null,e);return y.jsx(ve,{...Ca().getStyles("empty",{className:t,classNames:n,styles:r,style:i}),...o})});hC.classes=fr;hC.displayName="@mantine/core/ComboboxEmpty";function mC({onKeyDown:e,onClick:n,withKeyboardNavigation:t,withAriaAttributes:i,withExpandedAttribute:r,targetType:a,autoComplete:o}){const l=Ca(),[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 dee={refProp:"ref",targetType:"input",withKeyboardNavigation:!0,withAriaAttributes:!0,withExpandedAttribute:!1,autoComplete:"off"},cI=Re(e=>{const{children:n,refProp:t,withKeyboardNavigation:i,withAriaAttributes:r,withExpandedAttribute:a,targetType:o,autoComplete:l,ref:f,...c}=be("ComboboxEventsTarget",dee,e),h=Tu(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=Ca();return A.cloneElement(h,{...mC({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,ry(h))})});cI.displayName="@mantine/core/ComboboxEventsTarget";const pC=Re(e=>{const{classNames:n,className:t,style:i,styles:r,vars:a,...o}=be("ComboboxFooter",null,e);return y.jsx(ve,{...Ca().getStyles("footer",{className:t,classNames:n,style:i,styles:r}),...o,onMouseDown:l=>{l.preventDefault()}})});pC.classes=fr;pC.displayName="@mantine/core/ComboboxFooter";const vC=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=Ca(),d=qi(f);return y.jsxs(ve,{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]})});vC.classes=fr;vC.displayName="@mantine/core/ComboboxGroup";const gC=Re(e=>{const{classNames:n,className:t,style:i,styles:r,vars:a,...o}=be("ComboboxHeader",null,e);return y.jsx(ve,{...Ca().getStyles("header",{className:t,classNames:n,style:i,styles:r}),...o,onMouseDown:l=>{l.preventDefault()}})});gC.classes=fr;gC.displayName="@mantine/core/ComboboxHeader";function dI({value:e,valuesDivider:n=",",...t}){return y.jsx("input",{type:"hidden",value:Array.isArray(e)?e.join(n):e?`${e}`:"",...t})}dI.displayName="@mantine/core/ComboboxHiddenInput";const yC=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=Ca(),_=A.useId(),C=f||_;return y.jsx(ve,{...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)}})});yC.classes=fr;yC.displayName="@mantine/core/ComboboxOption";const bC=Re(e=>{const{classNames:n,className:t,style:i,styles:r,id:a,onMouseDown:o,labelledBy:l,...f}=be("ComboboxOptions",null,e),c=Ca(),h=qi(a);return A.useEffect(()=>{c.store.setListId(h)},[h]),y.jsx(ve,{...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)}})});bC.classes=fr;bC.displayName="@mantine/core/ComboboxOptions";const hee={withAriaAttributes:!0,withKeyboardNavigation:!0},wC=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",hee,e),p=Ca(),v=p.getStyles("search"),b=mC({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"})});wC.classes=fr;wC.displayName="@mantine/core/ComboboxSearch";const mee={refProp:"ref",targetType:"input",withKeyboardNavigation:!0,withAriaAttributes:!0,withExpandedAttribute:!1,autoComplete:"off"},hI=Re(e=>{const{children:n,refProp:t,withKeyboardNavigation:i,withAriaAttributes:r,withExpandedAttribute:a,targetType:o,autoComplete:l,ref:f,...c}=be("ComboboxTarget",mee,e),h=Tu(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=Ca(),p=A.cloneElement(h,{...mC({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})});hI.displayName="@mantine/core/ComboboxTarget";function pee(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 vee(e,n,t){for(let i=e+1;i{l||(f(!0),r==null||r(R))},[f,r,l]),_=A.useCallback((R="unknown")=>{l&&(f(!1),i==null||i(R))},[f,i,l]),C=A.useCallback((R="unknown")=>{l?_(R):k(R)},[_,k,l]),x=A.useCallback(()=>{const R=Io(p.current),I=fg(`#${c.current} [data-combobox-selected]`,R);I==null||I.removeAttribute("data-combobox-selected"),I==null||I.removeAttribute("aria-selected")},[]),E=A.useCallback(R=>{const I=Io(p.current),q=fg(`#${c.current}`,I),Y=q?qo("[data-combobox-option]",q):null;if(!Y)return null;const D=R>=Y.length?0:R<0?Y.length-1:R;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 R=Io(p.current),I=fg(`#${c.current} [data-combobox-active]`,R);return E(I?qo(`#${c.current} [data-combobox-option]`,R).findIndex(q=>q===I):0)},[E]),j=A.useCallback(()=>{const R=Io(p.current),I=qo(`#${c.current} [data-combobox-option]`,R);return E(vee(h.current,I,a))},[E,a]),M=A.useCallback(()=>{const R=Io(p.current),I=qo(`#${c.current} [data-combobox-option]`,R);return E(pee(h.current,I,a))},[E,a]),N=A.useCallback(()=>{const R=Io(p.current);return E(gee(qo(`#${c.current} [data-combobox-option]`,R)))},[E]),H=A.useCallback((R="selected",I)=>{var q;if(typeof R=="number"){h.current=R;const Y=Io(p.current),D=qo(`#${c.current} [data-combobox-option]`,Y);I!=null&&I.scrollIntoView&&((q=D[R])==null||q.scrollIntoView({block:"nearest",behavior:o}));return}w.current=window.setTimeout(()=>{var V;const Y=Io(p.current),D=qo(`#${c.current} [data-combobox-option]`,Y),W=D.findIndex(L=>L.hasAttribute(`data-combobox-${R}`));h.current=W,I!=null&&I.scrollIntoView&&((V=D[W])==null||V.scrollIntoView({block:"nearest",behavior:o}))},0)},[]),P=A.useCallback(()=>{h.current=-1,x()},[x]),z=A.useCallback(()=>{var I,q;const R=Io(p.current);(q=(I=qo(`#${c.current} [data-combobox-option]`,R))==null?void 0:I[h.current])==null||q.click()},[]),F=A.useCallback(R=>{c.current=R},[]),G=A.useCallback(()=>{v.current=window.setTimeout(()=>{var R;return(R=d.current)==null?void 0:R.focus()},0)},[]),U=A.useCallback(()=>{b.current=window.setTimeout(()=>{var R;return(R=p.current)==null?void 0:R.focus()},0)},[]),$=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:$,selectOption:E,selectFirstOption:N,selectActiveOption:O,selectNextOption:j,selectPreviousOption:M,resetSelectedOption:P,updateSelectedOptionIndex:H,listId:c.current,setListId:F,clickSelectedOption:z,searchRef:d,focusSearchInput:G,targetRef:p,focusTarget:U}}const yee={keepMounted:!0,withinPortal:!0,resetSelectionOnOptionHover:!1,width:"target",transitionProps:{transition:"fade",duration:0},size:"sm"},mI=(e,{size:n,dropdownPadding:t})=>({options:{"--combobox-option-fz":ri(n),"--combobox-option-padding":Pn(n,"combobox-option-padding")},dropdown:{"--combobox-padding":t===void 0?void 0:me(t),"--combobox-option-fz":ri(n),"--combobox-option-padding":Pn(n,"combobox-option-padding")}}),Tn=e=>{const n=be("Combobox",yee,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,_=Xm(),C=o||_,x=Ze({name:v||"Combobox",classes:fr,props:n,classNames:t,styles:i,unstyled:r,attributes:w,vars:l,varsResolver:mI}),E=()=>{c==null||c(),C.closeDropdown()};return y.jsx(fee,{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})})},bee=e=>e;Tn.extend=bee;Tn.classes=fr;Tn.varsResolver=mI;Tn.displayName="@mantine/core/Combobox";Tn.Target=hI;Tn.Dropdown=dC;Tn.Options=bC;Tn.Option=yC;Tn.Search=wC;Tn.Empty=hC;Tn.Chevron=_y;Tn.Footer=pC;Tn.Header=gC;Tn.EventsTarget=cI;Tn.DropdownTarget=fI;Tn.Group=vC;Tn.ClearButton=uI;Tn.HiddenInput=dI;function wee({children:e,role:n}){const t=A.use(Ru);return t?y.jsx("div",{role:n,"aria-labelledby":t.labelId,"aria-describedby":t.describedBy,children:e}):y.jsx(y.Fragment,{children:e})}const kC=A.createContext(null),kee={hiddenInputValuesSeparator:","},_C=sy((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",kee,e),[b,w]=Mi({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(kC,{value:{value:b,onChange:k,size:r,isDisabled:_},children:y.jsxs(Vt.Wrapper,{size:r,...a,...v,labelElement:"div",__staticSelector:"CheckboxGroup",children:[y.jsx(wee,{role:"group",children:o}),y.jsx("input",{type:"hidden",name:f,value:C,...h})]})})}));_C.classes=Vt.Wrapper.classes;_C.displayName="@mantine/core/CheckboxGroup";var pI={card:"m_26775b0a"};const vI=A.createContext(null),_ee={withBorder:!0},gI=(e,{radius:n})=>({card:{"--card-radius":Kt(n)}}),xy=Re(e=>{const n=be("CheckboxCard",_ee,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:pI,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:w,vars:l,varsResolver:gI,rootSelector:"card"}),C=A.use(kC),[x,E]=Mi({value:typeof f=="boolean"?f:C?C.value.includes(d||""):void 0,defaultValue:v,finalValue:!1,onChange:b});return y.jsx(vI,{value:{checked:x},children:y.jsx(Dt,{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=pI;xy.varsResolver=gI;function xC({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 yI({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(xC,{...n})}var bI={indicator:"m_5e5256ee",icon:"m_1b1c543a","indicator--outline":"m_76e20374"};const xee={icon:yI,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{indicator:{"--checkbox-size":Pn(i,"checkbox-size"),"--checkbox-radius":n===void 0?void 0:Kt(n),"--checkbox-color":a==="outline"?f:lt(t,e),"--checkbox-icon-color":r?lt(r,e):ay(o,e)?Im({color:t,theme:e,autoContrast:o}):void 0}}},Sy=Re(e=>{const n=be("CheckboxIndicator",xee,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:bI,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:C,vars:l,varsResolver:wI,rootSelector:"indicator"}),O=A.use(vI),j=typeof b=="boolean"||typeof c=="boolean"?b||c:(O==null?void 0:O.checked)||!1;return y.jsx(ve,{...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=bI;Sy.varsResolver=wI;var kI={root:"m_5f75b09e",body:"m_5f6e695e",labelWrapper:"m_d3ea56bb",label:"m_8ee546b8",description:"m_328f68c0",error:"m_8e8a99cc"};const See=kI;function _I({__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:kI,classNames:i,styles:r,unstyled:a,attributes:E});return y.jsx(ve,{...j("root"),__vars:{"--label-fz":ri(p),"--label-lh":Pn(p,"label-lh")},mod:[{"label-position":v},x],variant:k,size:p,...O,children:y.jsxs(ve,{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(ve,{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})]})]})})}_I.displayName="@mantine/core/InlineInput";var xI={root:"m_bf2d988c",inner:"m_26062bec",input:"m_26063560",icon:"m_bf295423","input--outline":"m_215c4542"};const Cee={labelPosition:"right",icon:yI,withErrorStyles:!0,variant:"filled",radius:"sm"},SI=(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:lt(t,e),"--checkbox-icon-color":r?lt(r,e):ay(o,e)?Im({color:t,theme:e,autoContrast:o}):void 0}}},fl=Re(e=>{var se;const n=be("Checkbox",Cee,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:N,autoContrast:H,mod:P,attributes:z,readOnly:F,onClick:G,withErrorStyles:U,ref:$,...R}=n,I=A.useRef(null),q=A.use(kC),Y=d||(q==null?void 0:q.size),D=Ze({name:"Checkbox",props:n,classes:xI,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:z,vars:l,varsResolver:SI}),{styleProps:W,rest:V}=Mu(R),L=qi(h),X={checked:(q==null?void 0:q.value.includes(V.value))??b,onChange:ye=>{q==null||q.onChange(ye),N==null||N(ye)}},ee=((se=q==null?void 0:q.isDisabled)==null?void 0:se.call(q,V.value))??!1,re=C||ee;return A.useEffect(()=>{I.current&&(I.current.indeterminate=E||!1,E?I.current.setAttribute("data-indeterminate","true"):I.current.removeAttribute("data-indeterminate"))},[E]),y.jsx(_I,{...D("root"),__staticSelector:"Checkbox",__stylesApiProps:n,id:L,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:P,attributes:z,inert:V.inert,...W,...v,children:y.jsxs(ve,{...D("inner"),mod:{"data-label-position":w},children:[y.jsx(ve,{component:"input",id:L,ref:Wt(I,$),mod:{error:!!_},...D("input",{focusable:!0,variant:x}),...V,...X,disabled:re,inert:V.inert,type:"checkbox",onClick:ye=>{F&&ye.preventDefault(),G==null||G(ye)}}),y.jsx(O,{indeterminate:E,...D("icon")})]})})});fl.classes={...xI,...See};fl.varsResolver=SI;fl.displayName="@mantine/core/Checkbox";fl.Group=_C;fl.Indicator=Sy;fl.Card=xy;function yu(e){return"group"in e}function CI({options:e,search:n,limit:t}){const i=n.trim().toLowerCase(),r=[];for(let a=0;a0)return!1;return!0}function AI(e,n=new Set){if(Array.isArray(e))for(const t of e)if(yu(t))AI(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 Oee(e,n){return Array.isArray(e)?e.includes(n):e===n}function OI({data:e,withCheckIcon:n,withAlignedLabels:t,value:i,checkIconPosition:r,unstyled:a,renderOption:o}){if(!yu(e)){const f=Oee(i,e.value),c=n&&(f?y.jsx(xC,{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(OI,{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}){AI(e);const x=typeof r=="string"?(i||CI)({options:e,search:f?r:"",limit:a??1/0}):e,E=Aee(x),O=x.map(j=>y.jsx(OI,{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(xa.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:N,withScrollArea:H,maxDropdownHeight:P,size:z,id:F,renderOption:G,autoComplete:U,scrollAreaProps:$,onClear:R,clearButtonProps:I,error:q,clearable:Y,clearSectionMode:D,rightSection:W,autoSelectOnBlur:V,openOnFocus:L=!0,attributes:X,...ee}=n,re=qi(F),se=ky(b),ye=Km(se),[ae,le]=Mi({value:w,defaultValue:k,finalValue:"",onChange:v}),_e=Xm({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,{...I,onClear:()=>{ne(""),R==null||R()}});return y.jsxs(Tn,{store:_e,__staticSelector:"Autocomplete",classNames:ze,styles:we,unstyled:r,readOnly:O,size:z,attributes:X,keepMounted:V,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:z,__staticSelector:"Autocomplete",__clearSection:Ce,__clearable:Y&&!!ae&&!j&&!O,__clearSectionMode:D,rightSection:W,disabled:j,readOnly:O,value:ae,error:q,onChange:Ne=>{ne(Ne.currentTarget.value),_e.openDropdown(),_&&_e.selectFirstOption()},onFocus:Ne=>{L&&_e.openDropdown(),h==null||h(Ne)},onBlur:Ne=>{V&&_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:N,hiddenWhenEmpty:!0,withScrollArea:H,maxDropdownHeight:P,unstyled:r,labelId:ee.label?`${re}-label`:void 0,"aria-label":ee.label?void 0:ee["aria-label"],renderOption:G,scrollAreaProps:$})]})});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 jI=A.createContext({withinGroup:!1}),EI=(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(jI,{value:{withinGroup:!0},children:y.jsx(ve,{...Ze({name:"AvatarGroup",classes:Oy,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:c,vars:l,varsResolver:EI,rootSelector:"group"})("group"),...h})})});jy.classes=Oy;jy.varsResolver=EI;jy.displayName="@mantine/core/AvatarGroup";function jee(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 Eee(e){let n=0;for(let t=0;ti[0]).slice(0,n).join("").toUpperCase()}const TI=(e,{size:n,radius:t,variant:i,gradient:r,color:a,autoContrast:o,name:l,allowedInitialsColors:f})=>{const c=a==="initials"&&typeof l=="string"?Mee(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=Si(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(jI),[j,M]=A.useState(!f),N=Ze({name:"Avatar",props:n,classes:Oy,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:x,vars:l,varsResolver:TI});return A.useEffect(()=>M(!f),[f]),y.jsx(ve,{...N("root"),mod:[{"within-group":O.withinGroup},k],...E,children:j||!f?y.jsx("span",{...N("placeholder"),title:c,children:b||typeof _=="string"&&Dee(_)||y.jsx(jee,{})}):y.jsx("img",{...v,...N("image"),src:f,alt:c,onError:H=>{var P;M(!0),(P=v==null?void 0:v.onError)==null||P.call(v,H)}})})});rs.classes=Oy;rs.varsResolver=TI;rs.displayName="@mantine/core/Avatar";rs.Group=jy;var MI={root:"m_347db0ec","root--dot":"m_fbd81e3d",label:"m_5add502a",section:"m_91fdda9b"};const DI=(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"?lt(t,e):void 0}}},dt=Si(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:MI,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:x,vars:l,varsResolver:DI});return y.jsxs(ve,{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})]})});dt.classes=MI;dt.varsResolver=DI;dt.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 oT={orientation:"horizontal"},RI=(e,{borderWidth:n})=>({group:{"--button-border-width":me(n)}}),Ey=Re(e=>{const n=be("ButtonGroup",oT,e),{className:t,style:i,classNames:r,styles:a,unstyled:o,orientation:l,vars:f,borderWidth:c,mod:h,attributes:d,...p}=be("ButtonGroup",oT,e);return y.jsx(ve,{...Ze({name:"ButtonGroup",props:n,classes:$c,className:t,style:i,classNames:r,styles:a,unstyled:o,attributes:d,vars:f,varsResolver:RI,rootSelector:"group"})("group"),mod:[{"data-orientation":l},h],role:"group",...p})});Ey.classes=$c;Ey.varsResolver=RI;Ey.displayName="@mantine/core/ButtonGroup";const PI=(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")?ri(o.replace("compact-","")):ri(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(ve,{...Ze({name:"ButtonGroupSection",props:n,classes:$c,className:t,style:i,classNames:r,styles:a,unstyled:o,attributes:d,vars:l,varsResolver:PI,rootSelector:"groupSection"})("groupSection"),...p})});Ty.classes=$c;Ty.varsResolver=PI;Ty.displayName="@mantine/core/ButtonGroupSection";const Ree={in:{opacity:1,transform:`translate(-50%, calc(-50% + ${me(1)}))`},out:{opacity:0,transform:"translate(-50%, -200%)"},common:{transformOrigin:"center"},transitionProperty:"transform, opacity"},NI=(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")?ri(a.replace("compact-","")):ri(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}}},yt=Si(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,N=Ze({name:"Button",props:n,classes:$c,className:r,style:t,classNames:k,styles:_,unstyled:C,attributes:j,vars:i,varsResolver:NI}),H=!!f,P=!!c;return y.jsxs(Dt,{...N("root",{active:!o&&!v&&!x}),unstyled:C,variant:d,disabled:o||v,mod:[{disabled:o||x,loading:v,block:h,"with-left-section":H,"with-right-section":P},O],...M,children:[typeof v=="boolean"&&y.jsx(is,{mounted:v,transition:Ree,duration:150,children:z=>y.jsx(ve,{component:"span",...N("loader",{style:z}),"aria-hidden":!0,children:y.jsx(xi,{color:"var(--button-color)",size:"calc(var(--button-height) / 1.8)",...b})})}),y.jsxs("span",{...N("inner"),children:[f&&y.jsx(ve,{component:"span",...N("section"),mod:{position:"left"},children:f}),y.jsx(ve,{component:"span",mod:{loading:v},...N("label"),children:l}),c&&y.jsx(ve,{component:"span",...N("section"),mod:{position:"right"},children:c})]})]})});yt.classes=$c;yt.varsResolver=NI;yt.displayName="@mantine/core/Button";yt.Group=Ey;yt.GroupSection=Ty;const[Pee,Nee]=Gr("Card component was not found in tree");var SC={root:"m_e615b15f",section:"m_599a2148"};const My=Si(e=>{const{classNames:n,className:t,style:i,styles:r,vars:a,withBorder:o,inheritPadding:l,mod:f,...c}=be("CardSection",null,e),h=Nee();return y.jsx(ve,{mod:[{"with-border":o,"inherit-padding":l},f],...h.getStyles("section",{className:t,style:i,styles:r,classNames:n}),...c})});My.classes=SC;My.displayName="@mantine/core/CardSection";const $I=(e,{padding:n})=>({root:{"--card-padding":Ht(n)}}),$ee={orientation:"vertical"},za=Si(e=>{const n=be("Card",$ee,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:SC,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:h,vars:l,varsResolver:$I}),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(Pee,{value:{getStyles:v},children:y.jsx(Mt,{unstyled:o,"data-orientation":d,...v("root"),...p,children:w})})});za.classes=SC;za.varsResolver=$I;za.displayName="@mantine/core/Card";za.Section=My;var zI={root:"m_4451eb3a"};const zc=Si(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:zI,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:h,vars:l});return y.jsx(ve,{mod:[{inline:f},c],...p("root"),...d})});zc.classes=zI;zc.displayName="@mantine/core/Center";var LI={root:"m_de3d2490",colorOverlay:"m_862f3d1b",shadowOverlay:"m_98ae7f22",alphaOverlay:"m_95709ac0",childrenOverlay:"m_93e74e3"};const sT={withShadow:!0},II=(e,{radius:n,size:t})=>({root:{"--cs-radius":n===void 0?void 0:Kt(n),"--cs-size":me(t)}}),Lc=Si(e=>{const n=be("ColorSwatch",sT,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",sT,n),b=Ze({name:"ColorSwatch",props:n,classes:LI,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:p,vars:l,varsResolver:II});return y.jsxs(ve,{...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=LI;Lc.varsResolver=II;Lc.displayName="@mantine/core/ColorSwatch";function ha(e,n=0,t=10**n){return Math.round(t*e)/t}function zee({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 Lee={grad:360/400,turn:360,rad:360/(Math.PI*2)};function Iee(e,n="deg"){return Number(e)*(Lee[n]||1)}const Bee=/hsla?\(?\s*(-?\d*\.?\d+)(deg|rad|grad|turn)?[,\s]+(-?\d*\.?\d+)%?[,\s]+(-?\d*\.?\d+)%?,?\s*[/\s]*(-?\d*\.?\d+)?(%)?\s*\)?/i;function lT(e){const n=Bee.exec(e);return n?zee({h:Iee(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 _S({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 xS(e){const n=e[0]==="#"?e.slice(1):e;return n.length===3?_S({r:parseInt(n[0]+n[0],16),g:parseInt(n[1]+n[1],16),b:parseInt(n[2]+n[2],16),a:1}):_S({r:parseInt(n.slice(0,2),16),g:parseInt(n.slice(2,4),16),b:parseInt(n.slice(4,6),16),a:1})}function Fee(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{...xS(a),a:o}}const i=n.slice(0,6),r=t(n.slice(6,8));return{...xS(i),a:r}}const qee=/rgba?\(?\s*(-?\d*\.?\d+)(%)?[,\s]+(-?\d*\.?\d+)(%)?[,\s]+(-?\d*\.?\d+)(%)?,?\s*[/\s]*(-?\d*\.?\d+)?(%)?\s*\)?/i;function uT(e){const n=qee.exec(e);return n?_S({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 BI={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},Hee={hex:xS,hexa:Fee,rgb:uT,rgba:uT,hsl:lT,hsla:lT};function Uee(e){for(const[,n]of Object.entries(BI))if(n.test(e))return!0;return!1}function zv(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(BI))if(i.test(n))return Hee[t](n);return{h:0,s:0,v:0,a:1}}const Dy=A.createContext(null);function CC({position:e,...n}){return y.jsx(ve,{__vars:{"--thumb-y-offset":`${e.y*100}%`,"--thumb-x-offset":`${e.x*100}%`},...n})}CC.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"}),N=((q=A.use(Dy))==null?void 0:q.getStyles)||M,H=ui(),[P,z]=A.useState({y:0,x:b/h}),F=A.useRef(P),G=Y=>d?Math.round(Y*h):Y*h,{ref:U}=pz(({x:Y,y:D})=>{F.current={x:Y,y:D},f==null||f(G(Y))},{onScrubEnd:()=>{const{x:Y}=F.current;c==null||c(G(Y)),C==null||C()},onScrubStart:_});ns(()=>{z({y:0,x:b/h})},[b]);const $=(Y,D)=>{Y.preventDefault();const W=mz(D);f==null||f(G(W.x)),c==null||c(G(W.x))},R=Y=>{switch(Y.key){case"ArrowRight":$(Y,{x:P.x+.05,y:P.y});break;case"ArrowLeft":$(Y,{x:P.x-.05,y:P.y});break}},I=w.map((Y,D)=>A.createElement("div",{...N("sliderOverlay"),style:Y,key:D}));return y.jsxs(ve,{...j,ref:Wt(U,O),...N("slider"),size:p,role:"slider","aria-valuenow":b,"aria-valuemax":h,"aria-valuemin":0,tabIndex:v?0:-1,onKeyDown:R,"data-focus-ring":H.focusRing,__vars:{"--cp-thumb-size":`var(--cp-thumb-size-${p})`},children:[I,y.jsx(CC,{position:P,...N("thumb",{style:{top:me(1),background:k}})})]})});Ic.displayName="@mantine/core/ColorSlider";Ic.classes=Ry;const Vee={__staticSelector:"AlphaSlider"},AC=Re(e=>{const{value:n,onChange:t,onChangeEnd:i,color:r,...a}=be("AlphaSlider",Vee,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`}]})});AC.displayName="@mantine/core/AlphaSlider";AC.classes=Ic.classes;function FI({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 fT(e,n){const{r:t,g:i,b:r,a}=FI(e);return n?`rgba(${t}, ${i}, ${r}, ${ha(a,2)})`:`rgb(${t}, ${i}, ${r})`}function cT({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 vg(e){const n=e.toString(16);return n.length<2?`0${n}`:n}function qI(e){const{r:n,g:t,b:i}=FI(e);return`#${vg(n)}${vg(t)}${vg(i)}`}function Wee(e){const n=Math.round(e.a*255);return`${qI(e)}${vg(n)}`}const kk={hex:qI,hexa:e=>Wee(e),rgb:e=>fT(e,!1),rgba:e=>fT(e,!0),hsl:e=>cT(e,!1),hsla:e=>cT(e,!0)};function Us(e,n){return n?e in kk?kk[e](n):kk.hex(n):"#000000"}const Gee={__staticSelector:"HueSlider"},OC=Re(e=>{const{value:n,onChange:t,onChangeEnd:i,color:r,...a}=be("HueSlider",Gee,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`}]})});OC.displayName="@mantine/core/HueSlider";OC.classes=Ic.classes;function HI({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}=pz(({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=mz(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(ve,{...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(CC,{position:p,...d("thumb",{style:{backgroundColor:l}})})]})}HI.displayName="@mantine/core/Saturation";function UI({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(xC,{size:"35%",color:bz(p)<.5?"white":"black"})));return y.jsx(ve,{...h.getStyles("swatches"),...c,children:d})}UI.displayName="@mantine/core/Swatches";const Yee={swatchesPerRow:7,withPicker:!0,focusable:!0,size:"md",__staticSelector:"ColorPicker"},VI=(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",Yee,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:N,attributes:H,name:P,hiddenInputProps:z,...F}=n,G=Ze({name:M,props:n,classes:Ry,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:H,rootSelector:"wrapper",vars:l,varsResolver:VI}),U=A.useRef(f||"hex"),$=A.useRef(""),R=A.useRef(-1),I=A.useRef(!1),q=f==="hexa"||f==="rgba"||f==="hsla",[Y,D,W]=Mi({value:c,defaultValue:h,finalValue:"#FFFFFF",onChange:d}),[V,L]=A.useState(zv(Y)),X=()=>{window.clearTimeout(R.current),I.current=!0},ee=()=>{window.clearTimeout(R.current),R.current=window.setTimeout(()=>{I.current=!1},200)},re=se=>{L(ye=>{const ae={...ye,...se};return $.current=Us(U.current,ae),ae}),D($.current)};return ns(()=>{typeof c=="string"&&Uee(c)&&!I.current&&L(zv(c))},[c]),ns(()=>{U.current=f||"hex",D(Us(U.current,V))},[f]),y.jsx(Dy,{value:{getStyles:G,unstyled:o},children:y.jsxs(ve,{...G("wrapper"),size:b,mod:[{"full-width":O},N],...F,children:[P&&y.jsx("input",{type:"hidden",name:P,value:Y,...z}),v&&y.jsxs(y.Fragment,{children:[y.jsx(HI,{value:V,onChange:re,onChangeEnd:({s:se,v:ye})=>p==null?void 0:p(Us(U.current,{...V,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(OC,{value:V.h,onChange:se=>re({h:se}),onChangeEnd:se=>p==null?void 0:p(Us(U.current,{...V,h:se})),size:b,focusable:C,"aria-label":k,onScrubStart:X,onScrubEnd:ee}),q&&y.jsx(AC,{value:V.a,onChange:se=>re({a:se}),onChangeEnd:se=>{p==null||p(Us(U.current,{...V,a:se}))},size:b,color:Us("hex",V),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(UI,{data:x,swatchesPerRow:E,focusable:C,setValue:D,value:Y,onChangeEnd:se=>{const ye=Us(f,zv(se));j==null||j(ye),p==null||p(ye),W||L(zv(se))}})]})})});Py.classes=Ry;Py.varsResolver=VI;Py.displayName="@mantine/core/ColorPicker";var WI={root:"m_3eebeb36",label:"m_9e365f20"};const Kee={orientation:"horizontal"},GI=(e,{color:n,variant:t,size:i})=>({root:{"--divider-color":n?lt(n,e):void 0,"--divider-border-style":t,"--divider-size":Pn(i,"divider-size")}}),Bc=Re(e=>{const n=be("Divider",Kee,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:WI,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:v,vars:l,varsResolver:GI});return y.jsx(ve,{mod:[{orientation:c,withLabel:!!h},p],role:"separator",...w("root"),...b,children:h&&y.jsx(ve,{component:"span",mod:{position:d},...w("label"),children:h})})});Bc.classes=WI;Bc.varsResolver=GI;Bc.displayName="@mantine/core/Divider";const[dT,YI]=Gr("Grid component was not found in tree"),SS=(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))`},hT=(e,n,t)=>t||e==="auto"?"100%":e==="content"?"unset":SS(e,n),mT=(e,n)=>{if(e)return e==="auto"||n?"1":"auto"},pT=(e,n)=>{if(e===0)return"0";if(e)return`calc(${100*e/n}% + ${e/n} * var(--grid-column-gap))`};function Xee({span:e,order:n,offset:t,align:i,selector:r}){var v;const a=ui(),o=YI(),l=o.breakpoints||a.breakpoints,f=Vr(e),c=f===void 0?12:f,h=Eu({"--col-order":(v=Vr(n))==null?void 0:v.toString(),"--col-flex-grow":mT(c,o.grow),"--col-flex-basis":SS(c,o.columns),"--col-width":c==="content"?"auto":void 0,"--col-max-width":hT(c,o.columns,o.grow),"--col-offset":pT(Vr(t),o.columns),"--col-align-self":Vr(i)}),d=Pt(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"]=mT(e[w],o.grow),b[w]["--col-flex-basis"]=SS(e[w],o.columns),b[w]["--col-width"]=e[w]==="content"?"auto":void 0,b[w]["--col-max-width"]=hT(e[w],o.columns,o.grow)),typeof t=="object"&&t[w]!==void 0&&(b[w]["--col-offset"]=pT(t[w],o.columns)),typeof i=="object"&&i[w]!==void 0&&(b[w]["--col-align-self"]=i[w]),b},{}),p=Hh(Pt(d),l).filter(b=>Pt(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 jC={container:"m_8478a6da",root:"m_410352e9",inner:"m_dee7bd2f",col:"m_96bdd299"};const Zee={span:12},EC=Re(e=>{const{classNames:n,className:t,style:i,styles:r,vars:a,span:o,order:l,offset:f,align:c,...h}=be("GridCol",Zee,e),d=YI(),p=oy();return y.jsxs(y.Fragment,{children:[y.jsx(Xee,{selector:`.${p}`,span:o,order:l,offset:f,align:c}),y.jsx(ve,{...d.getStyles("col",{className:dn(t,p),style:i,classNames:n,styles:r}),...h})]})});EC.classes=jC;EC.displayName="@mantine/core/GridCol";function vT({gap:e,rowGap:n,columnGap:t,selector:i,breakpoints:r,type:a}){const o=ui(),l=r||o.breakpoints,f=Eu({"--grid-gap":Ht(Vr(e)),"--grid-row-gap":Ht(Vr(n)),"--grid-column-gap":Ht(Vr(t))}),c=Pt(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(Pt(c),l).filter(d=>Pt(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 Qee={gap:"md",columns:12},KI=(e,{justify:n,align:t,overflow:i})=>({root:{"--grid-justify":n,"--grid-align":t,"--grid-overflow":i}}),qr=Re(e=>{const n=be("Grid",Qee,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:jC,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:C,vars:l,varsResolver:KI}),O=oy();return _==="container"&&k?y.jsxs(dT,{value:{getStyles:E,grow:f,columns:p,breakpoints:k,type:_},children:[y.jsx(vT,{selector:`.${O}`,...n}),y.jsx("div",{...E("container"),children:y.jsx(ve,{...E("root",{className:O}),...x,children:y.jsx("div",{...E("inner"),children:w})})})]}):y.jsxs(dT,{value:{getStyles:E,grow:f,columns:p,breakpoints:k,type:_},children:[y.jsx(vT,{selector:`.${O}`,...n}),y.jsx(ve,{...E("root",{className:O}),...x,children:y.jsx("div",{...E("inner"),children:w})})]})});qr.classes=jC;qr.varsResolver=KI;qr.displayName="@mantine/core/Grid";qr.Col=EC;const Jee=["borderBottomWidth","borderLeftWidth","borderRightWidth","borderTopWidth","boxSizing","fontFamily","fontSize","fontStyle","fontWeight","letterSpacing","lineHeight","paddingBottom","paddingLeft","paddingRight","paddingTop","tabSize","textIndent","textRendering","textTransform","width","wordBreak","wordSpacing","scrollbarGutter"],gT={"min-height":"0","max-height":"none",height:"0",visibility:"hidden",overflow:"hidden",position:"absolute","z-index":"-1000",top:"0",right:"0",display:"block"};function yT(e){Object.keys(gT).forEach(n=>{e.style.setProperty(n,gT[n],"important")})}function ene(e){const n=window.getComputedStyle(e);if(n===null)return null;const t={};for(const i of Jee)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 ji=null;function nne(e,n,t=1,i=1/0){ji||(ji=document.createElement("textarea"),ji.setAttribute("tabindex","-1"),ji.setAttribute("aria-hidden","true"),ji.setAttribute("aria-label","autosize measurement"),yT(ji)),ji.parentNode===null&&document.body.appendChild(ji);const{paddingSize:r,borderSize:a,sizingStyle:o}=e,{boxSizing:l}=o;Object.keys(o).forEach(p=>{ji.style[p]=o[p]}),yT(ji),ji.value=n;let f=l==="border-box"?ji.scrollHeight+a:ji.scrollHeight-r;ji.value=n,f=l==="border-box"?ji.scrollHeight+a:ji.scrollHeight-r,ji.value="x";const c=ji.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 tne({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=ene(d);if(!p)return;const[v]=nne(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 ine={size:"sm"},bu=Re(e=>{const{autosize:n,maxRows:t,minRows:i,__staticSelector:r,resize:a,...o}=be("Textarea",ine,e),l=n&&TK()!=="test",f=l?{maxRows:t,minRows:i}:{};return y.jsx(Ui,{component:l?tne:"textarea",...o,__staticSelector:r||"Textarea",multiline:!0,"data-no-overflow":n&&t===void 0||void 0,__vars:{"--input-resize":a},...f})});bu.classes=Ui.classes;bu.displayName="@mantine/core/Textarea";const[rne,pl]=Gr("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 TC=Re(e=>{const{classNames:n,className:t,style:i,styles:r,vars:a,...o}=be("MenuDivider",null,e);return y.jsx(ve,{...pl().getStyles("divider",{className:t,style:i,styles:r,classNames:n}),...o})});TC.classes=vl;TC.displayName="@mantine/core/MenuDivider";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("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]})});MC.classes=vl;MC.displayName="@mantine/core/MenuDropdown";const Yh=A.createContext(null),DC=Si(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(Yh),_=ui(),{dir:C}=Du(),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,N=kr(E.onKeyDown,H=>{H.key==="ArrowLeft"&&k&&(k.close(),k.focusParentItem())});return y.jsxs(Dt,{onMouseDown:H=>H.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:R6({siblingSelector:"[data-menu-item]:not([data-disabled])",parentSelector:"[data-menu-dropdown]",activateOnFocus:!1,loop:w.loop,dir:C,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)`: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})]})});DC.classes=vl;DC.displayName="@mantine/core/MenuItem";const RC=Re(e=>{const{classNames:n,className:t,style:i,styles:r,vars:a,...o}=be("MenuLabel",null,e);return y.jsx(ve,{...pl().getStyles("label",{className:t,style:i,styles:r,classNames:n}),...o})});RC.classes=vl;RC.displayName="@mantine/core/MenuLabel";const PC=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(Yh),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})});PC.classes=vl;PC.displayName="@mantine/core/MenuSubDropdown";const NC=Si(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(Yh),_=ui(),{dir:C}=Du(),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,z=>{z.key==="ArrowRight"&&(k==null||k.open(),k==null||k.focusFirstItem()),z.key==="ArrowLeft"&&(k!=null&&k.parentContext)&&(k.parentContext.close(),k.parentContext.focusParentItem())}),N=kr(E.onClick,()=>{!d&&p&&w.closeDropdownImmediately()}),H=kr(E.onMouseEnter,k==null?void 0:k.open),P=kr(E.onMouseLeave,k==null?void 0:k.close);return y.jsxs(Dt,{onMouseDown:z=>z.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:H,onMouseLeave:P,onClick:N,onKeyDown:R6({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(Ng,{...w.getStyles("chevron"),size:14})})]})});NC.classes=vl;NC.displayName="@mantine/core/MenuSubItem";function XI({children:e,refProp:n}){if(!D6(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})}XI.displayName="@mantine/core/MenuSubTarget";const ane={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",ane,e),a=qi(),[o,{open:l,close:f}]=vz(!1),c=A.use(Yh),{openDropdown:h,closeDropdown:d}=cL({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(Yh,{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=XI;Fc.Dropdown=PC;Fc.Item=NC;const one={refProp:"ref"};function ZI(e){const{children:n,refProp:t,...i}=be("MenuTarget",one,e),r=Tu(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})})}ZI.displayName="@mantine/core/MenuTarget";const sne={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",sne,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,...N}=n,H=Ze({name:"Menu",classes:vl,props:n,classNames:w,styles:k,unstyled:_,attributes:M}),[P,z]=Mi({value:a,defaultValue:o,finalValue:!1,onChange:f}),[F,G]=A.useState(!1),U=()=>{z(!1),G(!1),P&&(r==null||r())},$=()=>{z(!0),!P&&(i==null||i())},R=()=>{P?U():$()},{openDropdown:I,closeDropdown:q}=cL({open:$,close:U,closeDelay:b,openDelay:v}),Y=V=>cK("[data-menu-item]","[data-menu-dropdown]",V),{resolvedClassNames:D,resolvedStyles:W}=Hi({classNames:w,styles:k,props:n});return y.jsx(rne,{value:{getStyles:H,opened:P,toggleDropdown:R,getItemIndex:Y,openedViaClick:F,setOpenedViaClick:G,closeOnItemClick:c,closeDropdown:p==="click"?U:q,openDropdown:p==="click"?$:I,closeDropdownImmediately:U,loop:h,trigger:p,unstyled:_,menuItemTabIndex:E,withInitialFocusPlaceholder:j},children:y.jsx(En,{returnFocus:!0,...N,opened:P,onChange:R,defaultOpened:o,trapFocus:O?!1:l,closeOnEscape:d,__staticSelector:"Menu",classNames:D,styles:W,unstyled:_,variant:C,keepMounted:O,children:t})})});Un.displayName="@mantine/core/Menu";Un.classes=vl;Un.Item=DC;Un.Label=RC;Un.Dropdown=MC;Un.Target=ZI;Un.Divider=TC;Un.Sub=Fc;const[lne,qc]=Gr("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(FL,{...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(qL,{...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||qJ;return y.jsx(HL,{...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(UL,{...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(VL,{...qc().getStyles("overlay",{classNames:n,style:i,styles:r,className:t}),...o})});Iy.classes=ds;Iy.displayName="@mantine/core/ModalOverlay";const une={__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"},QI=(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)}}),Zm=Re(e=>{const n=be("ModalRoot",une,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:QI});return y.jsx(lne,{value:{yOffset:f,scrollAreaComponent:c,getStyles:_,fullScreen:d},children:y.jsx(BL,{..._("root"),"data-full-screen":d||void 0,"data-centered":p||void 0,"data-offset-scrollbars":c===xa.Autosize||void 0,unstyled:o,...k})})});Zm.classes=ds;Zm.varsResolver=QI;Zm.displayName="@mantine/core/ModalRoot";const JI=A.createContext(null);function eB({children:e}){const[n,t]=A.useState([]),[i,r]=A.useState(wa("modal"));return y.jsx(JI,{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})}eB.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(WL,{...qc().getStyles("title",{classNames:n,style:i,styles:r,className:t}),...o})});By.classes=ds;By.displayName="@mantine/core/ModalTitle";const fne={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},Sr=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",fne,e),p=A.use(JI),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(Zm,{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})]})]})});Sr.classes=ds;Sr.displayName="@mantine/core/Modal";Sr.Root=Zm;Sr.Overlay=Iy;Sr.Content=zy;Sr.Body=Ny;Sr.Header=Ly;Sr.Title=By;Sr.CloseButton=$y;Sr.Stack=eB;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 nB=A.createContext(null),tB=(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:tB,stylesCtx:{size:p},rootSelector:"group"});return y.jsx(nB,{value:{size:p,disabled:c},children:y.jsx(ve,{size:p,...v("group"),...d})})});Hy.classes=qy;Hy.varsResolver=tB;Hy.displayName="@mantine/core/PillGroup";const cne={variant:"default"},iB=(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",cne,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(nB),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:iB,stylesCtx:{size:O}});return y.jsxs(ve,{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:N=>{var H;N.preventDefault(),N.stopPropagation(),(H=p==null?void 0:p.onMouseDown)==null||H.call(p,N)},onClick:N=>{var H;N.stopPropagation(),d==null||d(),(H=p==null?void 0:p.onClick)==null||H.call(p,N)}})]})});cl.classes=qy;cl.varsResolver=iB;cl.displayName="@mantine/core/Pill";cl.Group=Hy;var rB={field:"m_45c4369d"};const dne={type:"visible"},$C=Re(e=>{const n=be("PillsInputField",dne,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(Ru),C=Ze({name:"PillsInputField",classes:rB,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(ve,{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()})});$C.classes=rB;$C.displayName="@mantine/core/PillsInputField";const hne={size:"sm"},wu=Re(e=>{const{children:n,onMouseDown:t,onClick:i,size:r,disabled:a,__staticSelector:o,error:l,variant:f,...c}=be("PillsInput",hne,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})})});wu.displayName="@mantine/core/PillsInput";wu.classes=Ui.classes;wu.Field=$C;function _k(e){return typeof e=="string"?e.trim().toLowerCase():e}function mne({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 bT={xs:41,sm:50,md:60,lg:72,xl:89},pne={maxValues:1/0,withCheckIcon:!0,checkIconPosition:"left",hiddenInputValuesDivider:",",clearSearchOnChange:!0,openOnFocus:!0,size:"sm"},Uy=sy(e=>{const n=be("MultiSelect",pne,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:N,withScrollArea:H,maxDropdownHeight:P,searchValue:z,defaultSearchValue:F,onSearchChange:G,readOnly:U,disabled:$,onFocus:R,onBlur:I,radius:q,rightSection:Y,rightSectionWidth:D,rightSectionPointerEvents:W,rightSectionProps:V,leftSection:L,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:ge,searchable:xe,nothingFoundMessage:Pe,withCheckIcon:ue,withAlignedLabels:Be,checkIconPosition:Ge,hidePickedOptions:Ve,withErrorStyles:Xe,name:Qe,form:ie,id:he,clearable:Ye,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:bn,chevronColor:yn,attributes:wn,clearSearchOnChange:it,openOnFocus:_t,loading:Le,loadingPosition:qe,...Nn}=n,st=qi(he),Mn=ky(b),nn=Km(Mn),rn=A.useRef({}),on=Xm({opened:w,defaultOpened:k,onDropdownOpen:()=>{_==null||_(),E&&on.selectFirstOption()},onDropdownClose:()=>{C==null||C(),on.resetSelectedOption()}}),{styleProps:Bn,rest:{type:Wn,autoComplete:xt,...Cn}}=Mu(Nn),[An,Qn]=Mi({value:c,defaultValue:h,finalValue:[],onChange:d}),[Xt,Ai]=Mi({value:z,defaultValue:F,finalValue:"",onChange:G}),nr=un=>{Ai(un),on.resetSelectedOption()},Oa=Ze({name:"MultiSelect",classes:{},props:n,classNames:t,styles:a,unstyled:o,attributes:wn}),{resolvedClassNames:Ya,resolvedStyles:ja}=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)))},Ka=An.map((un,Er)=>{var Tr;const Xa=nn[`${un}`]||rn.current[`${un}`];return Rn?y.jsx(A.Fragment,{children:Rn({option:Xa,value:un,onRemove:()=>{Qn(An.filter(Kr=>un!==Kr)),De==null||De(un)},disabled:$})},`${un}-${Er}`):y.jsx(cl,{withRemoveButton:!U&&!((Tr=nn[`${un}`])!=null&&Tr.disabled),onRemove:()=>{Qn(An.filter(Kr=>un!==Kr)),De==null||De(un)},unstyled:o,disabled:$,...Oa("pill"),children:(Xa==null?void 0:Xa.label)||un},`${un}-${Er}`)});A.useEffect(()=>{x&&on.selectFirstOption()},[x,Xt]),A.useEffect(()=>{An.forEach(un=>{`${un}`in nn&&(rn.current[`${un}`]=nn[`${un}`])})},[nn,An]);const Or=y.jsx(Tn.ClearButton,{...Se,onClear:()=>{Fe==null||Fe(),Qn([]),nr("")}}),jr=mne({data:Mn,value:An}),hn=Ye&&An.length>0&&!$&&!U,ai=hn?{paddingInlineEnd:bT[f]??bT.sm}:void 0;return y.jsxs(y.Fragment,{children:[y.jsxs(Tn,{store:on,classNames:Ya,styles:ja,unstyled:o,size:f,readOnly:U,__staticSelector:"MultiSelect",attributes:wn,onOptionSubmit:un=>{O==null||O(un),it&&nr(""),on.updateSelectedOptionIndex("selected"),An.includes(nn[`${un}`].value)?(Qn(An.filter(Er=>Er!==nn[`${un}`].value)),De==null||De(nn[`${un}`].value)):An.lengthxe?on.openDropdown():on.toggleDropdown(),"data-expanded":on.dropdownOpened||void 0,id:st,required:mn,mod:an,attributes:wn,children:y.jsxs(cl.Group,{attributes:wn,disabled:$,unstyled:o,...Oa("pillsList",{style:ai}),children:[Ka,y.jsx(Tn.EventsTarget,{autoComplete:xt,withExpandedAttribute:!0,children:y.jsx(wu.Field,{...Cn,id:st,placeholder:cn,type:!xe&&!cn?"hidden":"visible",...Oa("inputField"),unstyled:o,onFocus:un=>{R==null||R(un),_t&&xe&&on.openDropdown()},onBlur:un=>{I==null||I(un),on.closeDropdown(),nr("")},onKeyDown:Yr,value:Xt,onChange:un=>{nr(un.currentTarget.value),xe&&on.openDropdown(),x&&on.selectFirstOption()},disabled:$,readOnly:U||!xe,pointer:!xe})})]})})}),y.jsx(Cy,{data:Ve?jr:Mn,hidden:U||$,filter:M,search:Xt,limit:N,hiddenWhenEmpty:!Pe,withScrollArea:H,maxDropdownHeight:P,filterOptions:xe,value:An,checkIconPosition:Ge,withCheckIcon:ue,withAlignedLabels:Be,nothingFoundMessage:Pe,unstyled:o,labelId:Ce?`${st}-label`:void 0,"aria-label":Ce?void 0:Nn["aria-label"],renderOption:en,scrollAreaProps:bn})]}),y.jsx(Tn.HiddenInput,{name:Qe,valuesDivider:On,value:An,form:ie,disabled:$,...tn})]})});Uy.classes={...Ui.classes,...Tn.classes};Uy.displayName="@mantine/core/MultiSelect";var aB={root:"m_a513464",icon:"m_a4ceffb",loader:"m_b0920b15",body:"m_a49ed24",title:"m_3feedf16",description:"m_3d733a3a",closeButton:"m_919a4d88"};const vne={withCloseButton:!0},oB=(e,{radius:n,color:t})=>({root:{"--notification-radius":n===void 0?void 0:Kt(n),"--notification-color":t?lt(t,e):void 0}}),Vy=Re(e=>{const n=be("Notification",vne,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:aB,props:n,className:t,style:b,classNames:v,styles:w,unstyled:k,attributes:O,vars:_,varsResolver:oB});return y.jsxs(ve,{...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(xi,{size:28,color:i,...M("loader"),...x}),y.jsxs("div",{...M("body"),children:[f&&y.jsx("div",{...M("title"),children:f}),y.jsx(ve,{...M("description"),mod:{"data-with-title":!!f},children:h})]}),o&&y.jsx(hl,{iconSize:16,color:"gray",...p,unstyled:k,onClick:N=>{var H;(H=p==null?void 0:p.onClick)==null||H.call(p,N),d==null||d()},...M("closeButton")})]})});Vy.classes=aB;Vy.varsResolver=oB;Vy.displayName="@mantine/core/Notification";function sB(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+kT("0",o-l):r=(r.substring(0,o)||"0")+"."+r.substring(o),t+r}function _T(e,n,t){if(["","-"].indexOf(e)!==-1)return e;var i=(e.indexOf(".")!==-1||t)&&n,r=zC(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=fB(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 dB=gne(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}}}),_ne=function(e,n){var t=Math.min(e.selectionStart,n);return{from:{start:t,end:e.selectionEnd},to:{start:t,end:n}}};function xne(e,n,t){return Math.min(Math.max(e,n),t)}function xk(e){return Math.max(e.selectionStart,e.selectionEnd)}function Sne(){return typeof navigator<"u"&&!(navigator.platform&&/iPhone|iPod/.test(navigator.platform))}function Cne(e){return{from:{start:0,end:0},to:{start:0,end:e.length},lastValue:""}}function Ane(e){var n=e.currentValue,t=e.formattedValue,i=e.currentValueIndex,r=e.formattedValueIndex;return n[i]===t[r]}function One(e,n,t,i,r,a,o){o===void 0&&(o=Ane);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 jne(e){for(var n=Array.from({length:e.length+1}).map(function(){return!0}),t=0,i=n.length;tM.length-o.length||jz||d>e.length-o.length)&&(P=d),e=e.substring(0,P),e=Dne(x?"-"+e:e,r),e=(e.match(Rne(b))||[]).join("");var F=e.indexOf(b);e=e.replace(new RegExp(uB(b),"g"),function(I,q){return q===F?".":""});var G=zC(e,r),U=G.beforeDecimal,$=G.afterDecimal,R=G.addNegation;return c.end-c.startW?!1:D>=ee.start&&Dt?t:e}function qne(e){return e.toString().replace(".","").length}function Hne(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:[".",","]},vB=(e,{size:n})=>({controls:{"--ni-chevron-size":Pn(n,"ni-chevron-size")}});function Vne(e,n,t){const i=e.toString(),r=mB.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 Wne(e,n){if(e===""||e==="-")return e;const t=bh(e);return t===null?e:n.clampBehavior==="blur"?gg(t,n.min,n.max):t}const Xh=sy(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:N,disabled:H,rightSectionPointerEvents:P,allowNegative:z,readOnly:F,size:G,rightSectionWidth:U,stepHoldInterval:$,stepHoldDelay:R,allowLeadingZeros:I,withKeyboardEvents:q,trimLeadingZeroesOnBlur:Y,allowedDecimalSeparators:D,selectAllOnFocus:W,onMinReached:V,onMaxReached:L,onFocus:X,attributes:ee,ref:re,...se}=n,ye=z??!0,ae=I??!0,le=Ze({name:"NumberInput",classes:CS,props:n,classNames:i,styles:r,unstyled:a,attributes:ee,vars:o,varsResolver:vB}),{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]=Mi({value:c,defaultValue:h,finalValue:"",onChange:l}),ge=R!==void 0&&$!==void 0,xe=A.useRef(null),Pe=A.useRef(null),ue=A.useRef(0),Be=typeof p=="number"?p:void 0,Ge=typeof d=="number"?d:void 0,Ve=typeof v=="number"?v:Ok.step,Xe=typeof N=="number"?N:Ok.startValue,Qe=Lv(p),ie=Lv(d),he=Lv(v)??BigInt(1),Ye=Lv(N)??BigInt(0),Je=Le=>!pB(Le,ye)||ae&&AT.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):Hne(Le.floatValue,Le.value)&&!Bne.test(Le.value)&&!(ae&&AT.test(Le.value))&&!Fne.test(Le.value)&&!mB.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(lS);mn.current=()=>{if(we){if(!Ak(Ce,ye))return;let rn;const on=Ce;if(typeof on=="bigint"){const Wn=on+he;ie!==void 0&&Wn>ie&&(L==null||L()),rn=ie!==void 0&&Wn>ie?ie:Wn}else if(typeof on=="string"&&on!==""){const Wn=bh(on);if(Wn===null)return;const xt=Wn+he;ie!==void 0&&xt>ie&&(L==null||L()),rn=ie!==void 0&&xt>ie?ie:xt}else rn=gg(Ye,Qe,ie);const Bn=rn.toString();Ne(rn),f==null||f({floatValue:Se(rn),formattedValue:Bn,value:Bn},{source:"increment"}),setTimeout(()=>{var Wn;return On((Wn=xe.current)==null?void 0:Wn.value.length)},0);return}if(!Ck(Ce))return;let Le;const qe=cn(Ce),Nn=cn(Ve),st=Math.max(qe,Nn),Mn=10**st;if(!AS(Ce)&&(typeof Ce!="number"||Number.isNaN(Ce)))Le=Yo(Xe,Be,Ge);else if(Ge!==void 0){const rn=(Math.round(Number(Ce)*Mn)+Math.round(Ve*Mn))/Mn;rn>Ge&&(L==null||L()),Le=rn<=Ge?rn:Ge}else Le=(Math.round(Number(Ce)*Mn)+Math.round(Ve*Mn))/Mn;const nn=Le.toFixed(st);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(lS);an.current=()=>{if(we){if(!Ak(Ce,ye))return;let on;const Bn=Qe!==void 0?Qe:ye?void 0:BigInt(0),Wn=Ce;if(typeof Wn=="bigint"){const Cn=Wn-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),st=cn(Ve),Mn=Math.max(Nn,st),nn=10**Mn;if(!AS(Ce)&&typeof Ce!="number"||Number.isNaN(Ce))Le=Yo(Xe,qe,Ge);else{const on=(Math.round(Number(Ce)*nn)-Math.round(Ve*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||".",st=(D||[".",","]).filter(on=>on!==Nn);if(st.some(on=>qe.includes(on))){Le.preventDefault();let on=qe;st.forEach(Wn=>{on=on.split(Wn).join(Nn)});const Bn=xe.current;if(Bn){const Wn=Bn.selectionStart??0,xt=Bn.selectionEnd??0,Cn=Bn.value,An=Cn.substring(0,Wn)+on+Cn.substring(xt);(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=Wn+on.length;setTimeout(()=>On(Qn),0)}}(rn=se.onPaste)==null||rn.call(se,Le)},Rn=Le=>{var qe,Nn;O==null||O(Le),!(F||!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=>{W&&setTimeout(()=>Le.currentTarget.select(),0),X==null||X(Le)},jn=Le=>{let qe=Ce;we?(_==="blur"&&typeof qe=="bigint"&&(qe=gg(qe,Qe,ie)),Y&&typeof qe=="string"&&(qe=Wne(qe,{min:Qe,max:ie,clampBehavior:_}))):(_==="blur"&&typeof qe=="number"&&(qe=Yo(qe,Be,Ge)),Y&&typeof qe=="string"&&cn(qe)<15&&(qe=Vne(qe,Ge,Be))),Ce!==qe&&Ne(qe),C==null||C(Le)};Og(M,{increment:mn.current,decrement:an.current});const bn=Le=>{var qe,Nn;Le?(qe=mn.current)==null||qe.call(mn):(Nn=an.current)==null||Nn.call(an),ue.current+=1},yn=Le=>{if(bn(Le),ge){const qe=typeof $=="number"?$:$(ue.current);Pe.current=window.setTimeout(()=>yn(Le),qe)}},wn=(Le,qe)=>{var Nn;Le.preventDefault(),(Nn=xe.current)==null||Nn.focus(),bn(qe),ge&&(Pe.current=window.setTimeout(()=>yn(qe),R))},it=()=>{Pe.current&&window.clearTimeout(Pe.current),Pe.current=null,ue.current=0},_t=y.jsxs("div",{...le("controls"),children:[y.jsx(Dt,{...le("control"),tabIndex:-1,"aria-hidden":!0,disabled:H||typeof Ce=="number"&&Ge!==void 0&&Ce>=Ge||typeof Ce=="bigint"&&ie!==void 0&&Ce>=ie,mod:{direction:"up"},onMouseDown:Le=>Le.preventDefault(),onPointerDown:Le=>{wn(Le,!0)},onPointerUp:it,onPointerLeave:it,children:y.jsx(CT,{direction:"up"})}),y.jsx(Dt,{...le("control"),tabIndex:-1,"aria-hidden":!0,disabled:H||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=>{wn(Le,!1)},onPointerUp:it,onPointerLeave:it,children:y.jsx(CT,{direction:"down"})})]});return y.jsx(Ui,{component:Ine,allowNegative:z,className:dn(CS.root,t),size:G,...se,inputMode:we?"numeric":"decimal",readOnly:F,disabled:H,value:typeof Ce=="bigint"?Ce.toString():Ce,getInputRef:Wt(re,xe),onValueChange:tn,rightSection:b||F||!(we?Ak(Ce,ye):Ck(Ce))?w:w||_t,classNames:_e,styles:ne,unstyled:a,__staticSelector:"NumberInput",decimalScale:we?0:x?E:0,onPaste:en,onFocus:Fe,onKeyDown:Rn,onKeyDownCapture:De,rightSectionPointerEvents:P??(H?"none":void 0),rightSectionWidth:U??`var(--ni-right-section-width-${G||"sm"})`,allowLeadingZeros:I,allowedDecimalSeparators:D,onBlur:jn,attributes:ee,isAllowed:Le=>{if(!(!k||k(Le)))return!1;if(_!=="strict")return!0;if(!we)return Une(Le.floatValue,Be,Ge);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)}})});Xh.classes={...Ui.classes,...CS};Xh.varsResolver=vB;Xh.displayName="@mantine/core/NumberInput";function Gne({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 OS={root:"m_f61ca620",input:"m_ccf8da4c",innerInput:"m_f2d85dd2",visibilityToggle:"m_b1072d44"};const Yne={visibilityToggleIcon:Gne,size:"sm"},gB=(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",Yne,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:N,rightSection:H,rightSectionWidth:P,rightSectionPointerEvents:z,leftSectionWidth:F,visible:G,defaultVisible:U,onVisibilityChange:$,visibilityToggleIcon:R,visibilityToggleButtonProps:I,rightSectionProps:q,leftSectionProps:Y,leftSectionPointerEvents:D,withErrorStyles:W,mod:V,attributes:L,...X}=n,ee=qi(p),[re,se]=Mi({value:G,defaultValue:U,finalValue:!1,onChange:$}),ye=()=>se(!re),ae=Ze({name:"PasswordInput",classes:OS,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:L,vars:l,varsResolver:gB}),{resolvedClassNames:le,resolvedStyles:_e}=Hi({classNames:t,styles:a,props:n}),{styleProps:ne,rest:ze}=Mu(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:""}`,ge=Ne.trim().length>0?Ne.trim():void 0,xe=y.jsx(kt,{...ae("visibilityToggle"),disabled:d,radius:N,"aria-pressed":re,tabIndex:-1,"aria-label":"Toggle password visibility",...I,variant:(I==null?void 0:I.variant)??"subtle",color:"gray",unstyled:o,onTouchEnd:Pe=>{var ue;Pe.preventDefault(),(ue=I==null?void 0:I.onTouchEnd)==null||ue.call(I,Pe),ye()},onMouseDown:Pe=>{var ue;Pe.preventDefault(),(ue=I==null?void 0:I.onMouseDown)==null||ue.call(I,Pe),ye()},onKeyDown:Pe=>{var ue;(ue=I==null?void 0:I.onKeyDown)==null||ue.call(I,Pe),Pe.key===" "&&(Pe.preventDefault(),ye())},children:y.jsx(R,{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:V,attributes:L,...ae("root"),...ne,...M,children:y.jsx(Vt,{component:"div",error:c,leftSection:h,size:_,classNames:{...le,input:dn(OS.input,le==null?void 0:le.input)},styles:_e,radius:N,disabled:d,__staticSelector:"PasswordInput",__stylesApiProps:n,rightSectionWidth:P,rightSection:H??xe,variant:v,unstyled:o,leftSectionWidth:F,rightSectionPointerEvents:z||"all",rightSectionProps:q,leftSectionProps:Y,leftSectionPointerEvents:D,withAria:!1,withErrorStyles:W,attributes:L,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":ge,autoComplete:ze.autoComplete||"off",type:re?"text":"password"})})})});Gy.classes={...Ui.classes,...OS};Gy.varsResolver=gB;Gy.displayName="@mantine/core/PasswordInput";function Kne({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}=nC({placement:n,middleware:[Z6({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 Xne={refProp:"ref",withinPortal:!0,offset:10,position:"right",zIndex:wa("popover")},yB=(e,{radius:n,color:t})=>({tooltip:{"--tooltip-radius":n===void 0?void 0:Kt(n),"--tooltip-bg":t?lt(t,e):void 0,"--tooltip-color":t?"var(--mantine-color-white)":void 0}}),Ky=Re(e=>{const n=be("TooltipFloating",Xne,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,...N}=n,H=ui(),P=Ze({name:"TooltipFloating",props:n,classes:Yy,className:o,style:a,classNames:l,styles:f,unstyled:c,attributes:j,rootSelector:"tooltip",vars:E,varsResolver:yB}),{handleMouseMove:z,x:F,y:G,opened:U,boundaryRef:$,floating:R,setOpened:I}=Kne({offset:v,position:b,defaultOpened:C}),q=Tu(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($,ry(q),M),D=q.props,W=L=>{var X;(X=D.onMouseEnter)==null||X.call(D,L),z(L),I(!0)},V=L=>{var X;(X=D.onMouseLeave)==null||X.call(D,L),I(!1)};return y.jsxs(y.Fragment,{children:[y.jsx(ul,{...O,withinPortal:r,children:y.jsx(ve,{...N,...P("tooltip",{style:{...Az(a,H),zIndex:k,display:!_&&U?"block":"none",top:(G&&Math.round(G))??"",left:(F&&Math.round(F))??""}}),variant:x,ref:R,mod:{multiline:w},children:p})}),A.cloneElement(q,{...D,[i]:Y,onMouseEnter:W,onMouseLeave:V})]})});Ky.classes=Yy;Ky.varsResolver=yB;Ky.displayName="@mantine/core/TooltipFloating";const bB=A.createContext({withinGroup:!1}),Zne={openDelay:0,closeDelay:0};function LC(e){const{openDelay:n,closeDelay:t,children:i}=be("TooltipGroup",Zne,e);return y.jsx(bB,{value:{withinGroup:!0},children:y.jsx(CQ,{delay:{open:n,close:t},children:i})})}LC.displayName="@mantine/core/TooltipGroup";LC.extend=e=>e;function Qne(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 Jne(e){const n=Qne(e.middlewares),t=[Jz(e.offset)];return n.shift&&t.push(Z6(typeof n.shift=="boolean"?{padding:8}:{padding:8,...n.shift})),n.flip&&t.push(typeof n.flip=="boolean"?Rg():Rg(n.flip)),t.push(eL({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 ete(e){var E,O,j;const[n,t]=A.useState(e.defaultOpened),i=typeof e.opened=="boolean"?e.opened:n,r=A.use(bB).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}={}}}=nC({strategy:e.strategy,placement:e.position,open:i,onOpenChange:o,middleware:Jne(e),whileElementsMounted:bS}),{delay:b,currentId:w,setCurrentId:k}=AQ(c,{id:a}),{getReferenceProps:_,getFloatingProps:C}=DQ([xQ(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)}),MQ(c,{enabled:(j=e.events)==null?void 0:j.focus,visibleOnly:!0}),PQ(c,{role:"tooltip"}),EQ(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 nte={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}},wB=(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}}},ii=Re(e=>{const n=be("Tooltip",nte,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:N,transitionProps:H,multiline:P,events:z,zIndex:F,disabled:G,onClick:U,onMouseEnter:$,onMouseLeave:R,inline:I,variant:q,keepMounted:Y,vars:D,portalProps:W,mod:V,floatingStrategy:L,middlewares:X,autoContrast:ee,attributes:re,target:se,ref:ye,...ae}=n,{dir:le}=Du(),_e=A.useRef(null),ne=ete({position:fL(le,i),closeDelay:l,openDelay:o,onPositionChange:f,opened:c,defaultOpened:h,events:z,arrowRef:_e,arrowOffset:O,offset:typeof N=="number"?N+(x?E/2:0):N,inline:I,strategy:L,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:wB}),we=Tu(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=J5(H,{duration:100,transition:"fade"});return y.jsx(y.Fragment,{children:y.jsx(ul,{...W,withinPortal:d,children:y.jsx(is,{...Pe,keepMounted:Y,mounted:!G&&!!ne.opened,duration:ne.isGroupPhase?10:Pe.duration,children:ue=>y.jsxs(ve,{...ae,"data-fixed":L==="fixed"||void 0,variant:q,mod:[{multiline:P},V],...Ce,...ne.getFloatingProps({ref:ne.floating,className:Ce.className,style:{...Ce.style,...ue,zIndex:F,top:ne.y??0,left:ne.x??0}}),children:[a,y.jsx(Pg,{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,ge=Wt(ne.reference,ry(we),ye),xe=J5(H,{duration:100,transition:"fade"});return y.jsxs(y.Fragment,{children:[y.jsx(ul,{...W,withinPortal:d,children:y.jsx(is,{...xe,keepMounted:Y,mounted:!G&&!!ne.opened,duration:ne.isGroupPhase?10:xe.duration,children:Pe=>y.jsxs(ve,{...ae,"data-fixed":L==="fixed"||void 0,variant:q,mod:[{multiline:P},V],...ne.getFloatingProps({ref:ne.floating,className:ze("tooltip").className,style:{...ze("tooltip").style,...Pe,zIndex:F,top:ne.y??0,left:ne.x??0}}),children:[a,y.jsx(Pg,{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:$,onMouseLeave:R,onMouseMove:n.onMouseMove,onPointerDown:n.onPointerDown,onPointerEnter:n.onPointerEnter,...Ne,className:dn(C,Ne.className),[r]:ge}))]})});ii.classes=Yy;ii.varsResolver=wB;ii.displayName="@mantine/core/Tooltip";ii.Floating=Ky;ii.Group=LC;const tte={size:"sm",withCheckIcon:!0,allowDeselect:!0,checkIconPosition:"left",openOnFocus:!0},ya=sy(e=>{const n=be("Select",tte,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:N,withScrollArea:H,maxDropdownHeight:P,size:z,searchable:F,rightSection:G,checkIconPosition:U,withCheckIcon:$,withAlignedLabels:R,nothingFoundMessage:I,name:q,form:Y,searchValue:D,defaultSearchValue:W,onSearchChange:V,allowDeselect:L,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:ge,chevronColor:xe,autoSelectOnBlur:Pe,openOnFocus:ue,attributes:Be,...Ge}=n,Ve=A.useMemo(()=>ky(b),[b]),Xe=A.useRef({}),Qe=A.useMemo(()=>Km(Ve),[Ve]),ie=qi(re),[he,Ye,Je]=Mi({value:w,defaultValue:k,finalValue:null,onChange:v}),Se=he!=null?`${he}`in Qe?Qe[`${he}`]:Xe.current[`${he}`]:void 0,tn=CK(Se),[cn,On,mn]=Mi({value:D,defaultValue:W,finalValue:Se?Se.label:"",onChange:V}),an=Xm({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=bn=>{On(bn),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 bn,yn;!Je&&!mn&&en(he!=null?`${he}`in Qe?(bn=Qe[`${he}`])==null?void 0:bn.label:((yn=Xe.current[`${he}`])==null?void 0:yn.label)||"":"")},[Qe,he]),A.useEffect(()=>{he&&`${he}`in Qe&&(Xe.current[`${he}`]=Qe[`${he}`])},[Qe,he]);const Fe=y.jsx(Tn.ClearButton,{...ae,onClear:()=>{Ye(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:z,attributes:Be,keepMounted:Pe,onOptionSubmit:bn=>{x==null||x(bn);const yn=L&&`${Qe[bn].value}`==`${he}`?null:Qe[bn],wn=yn?yn.value:null;wn!==he&&Ye(wn,yn),!Je&&en(wn!=null&&(yn==null?void 0:yn.label)||""),an.closeDropdown()},...E,children:[y.jsx(Tn.Target,{targetType:F?"input":"button",autoComplete:ze,withExpandedAttribute:!0,children:y.jsx(Ui,{id:ie,__defaultRightSection:y.jsx(Tn.Chevron,{size:z,error:X,unstyled:r,color:xe}),__clearSection:Fe,__clearable:jn,__clearSectionMode:ye,rightSection:G,rightSectionPointerEvents:ee||"none",...Ge,size:z,__staticSelector:"Select",disabled:j,readOnly:O||!F,value:cn,onChange:bn=>{en(bn.currentTarget.value),an.openDropdown(),_&&an.selectFirstOption()},onFocus:bn=>{ue&&F&&an.openDropdown(),h==null||h(bn)},onBlur:bn=>{Pe&&an.clickSelectedOption(),F&&an.closeDropdown();const yn=he!=null&&(`${he}`in Qe?Qe[`${he}`]:Xe.current[`${he}`]);en(yn&&yn.label||""),d==null||d(bn)},onClick:bn=>{F?an.openDropdown():an.toggleDropdown(),p==null||p(bn)},classNames:Rn,styles:De,unstyled:r,pointer:!F,error:X,attributes:Be})}),y.jsx(Cy,{data:Ve,hidden:O||j,filter:M,search:cn,limit:N,hiddenWhenEmpty:!I,withScrollArea:H,maxDropdownHeight:P,filterOptions:!!F&&(Se==null?void 0:Se.label)!==cn,value:he,checkIconPosition:U,withCheckIcon:$,withAlignedLabels:R,nothingFoundMessage:I,unstyled:r,labelId:Ge.label?`${ie}-label`:void 0,"aria-label":Ge.label?void 0:Ge["aria-label"],renderOption:_e,scrollAreaProps:we})]}),y.jsx(Tn.HiddenInput,{value:he,name:q,form:Y,disabled:j,...le})]})});ya.classes={...Ui.classes,...Tn.classes};ya.displayName="@mantine/core/Select";function kB(e){if(e!==void 0)return typeof e=="number"?me(e):e}function ite({spacing:e,verticalSpacing:n,cols:t,minColWidth:i,autoRows:r,selector:a}){var d;const o=ui(),l=n===void 0?e:n,f=i!==void 0,c=Eu({"--sg-spacing-x":Ht(Vr(e)),"--sg-spacing-y":Ht(Vr(l)),"--sg-auto-rows":r,...f?{"--sg-min-col-width":kB(i)}:{"--sg-cols":(d=Vr(t))==null?void 0:d.toString()}}),h=Pt(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(Pt(h),o.breakpoints).filter(p=>Pt(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?Pt(e):[]}function rte(e){return e.sort((n,t)=>qh(n)-qh(t))}function ate({spacing:e,verticalSpacing:n,cols:t,minColWidth:i}){return rte(Array.from(new Set([...jk(e),...jk(n),...i!==void 0?[]:jk(t)])))}function ote({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=Eu({"--sg-spacing-x":Ht(Vr(e)),"--sg-spacing-y":Ht(Vr(o)),"--sg-auto-rows":r,...l?{"--sg-min-col-width":kB(i)}:{"--sg-cols":(d=Vr(t))==null?void 0:d.toString()}}),c=ate({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 _B={container:"m_925c2d2c",root:"m_2415a157"};const ste={cols:1,spacing:"md",type:"media"},Uo=Re(e=>{const n=be("SimpleGrid",ste,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:_B,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:w,vars:l}),C=oy(),x=p!==void 0?v||"auto-fill":void 0;return d==="container"?y.jsxs(y.Fragment,{children:[y.jsx(ote,{...n,selector:`.${C}`}),y.jsx("div",{..._("container"),children:y.jsx(ve,{..._("root",{className:C}),...k,"data-auto-cols":x})})]}):y.jsxs(y.Fragment,{children:[y.jsx(ite,{...n,selector:`.${C}`}),y.jsx(ve,{..._("root",{className:C}),...k,"data-auto-cols":x})]})});Uo.classes=_B;Uo.displayName="@mantine/core/SimpleGrid";var xB={root:"m_6d731127"};const lte={gap:"md",align:"stretch",justify:"flex-start"},SB=(e,{gap:n,align:t,justify:i})=>({root:{"--stack-gap":Ht(n),"--stack-align":t,"--stack-justify":i}}),Vn=Re(e=>{const n=be("Stack",lte,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(ve,{...Ze({name:"Stack",props:n,classes:xB,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:p,vars:l,varsResolver:SB})("root"),variant:d,...v})});Vn.classes=xB;Vn.varsResolver=SB;Vn.displayName="@mantine/core/Stack";const[ute,fte]=Gr("Table component was not found in the tree");var Qm={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 cte(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 Pu(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=fte();return y.jsx(ve,{component:e,...cte(d,n),...d.getStyles(e,{className:l,classNames:o,style:f,styles:c,props:a}),...h})});return i.displayName=`@mantine/core/${t}`,i.classes=Qm,i}const jS=Pu("th",{columnBorder:!0}),CB=Pu("td",{columnBorder:!0}),yg=Pu("tr",{rowBorder:!0,striped:!0,highlightOnHover:!0}),AB=Pu("thead",{stickyHeader:!0}),OB=Pu("tbody"),jB=Pu("tfoot"),EB=Pu("caption",{captionSide:!0}),dte={type:"scrollarea"},TB=(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",dte,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:Qm,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:v,vars:l,varsResolver:TB,rootSelector:"scrollContainer"});return y.jsx(ve,{component:d==="scrollarea"?xa:"div",...d==="scrollarea"?h?{offsetScrollbars:"xy",...p}:{offsetScrollbars:"x",...p}:{},...w("scrollContainer"),...b,children:y.jsx("div",{...w("scrollContainerInner"),children:f})})});Xy.classes=Qm;Xy.varsResolver=TB;Xy.displayName="@mantine/core/TableScrollContainer";function IC({data:e}){return y.jsxs(y.Fragment,{children:[e.caption&&y.jsx(EB,{children:e.caption}),e.head&&y.jsx(AB,{children:y.jsx(yg,{children:e.head.map((n,t)=>y.jsx(jS,{children:n},t))})}),e.body&&y.jsx(OB,{children:e.body.map((n,t)=>y.jsx(yg,{children:n.map((i,r)=>y.jsx(CB,{children:i},r))},t))}),e.foot&&y.jsx(jB,{children:y.jsx(yg,{children:e.foot.map((n,t)=>y.jsx(jS,{children:n},t))})})]})}IC.displayName="@mantine/core/TableDataRenderer";const hte={withRowBorders:!0,verticalSpacing:7},MB=(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?lt(a,e):void 0,"--table-striped-color":f&&o?lt(o,e):void 0,"--table-highlight-on-hover-color":c&&l?lt(l,e):void 0,"--table-sticky-header-offset":d?me(h):void 0}}),vn=Re(e=>{const n=be("Table",hte,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:N,tabularNums:H,attributes:P,...z}=n,F=Ze({name:"Table",props:n,className:i,style:r,classes:Qm,classNames:t,styles:a,unstyled:o,attributes:P,rootSelector:"table",vars:l,varsResolver:MB});return y.jsx(ute,{value:{getStyles:F,stickyHeader:j,striped:v===!0?"odd":v||void 0,highlightOnHover:b,withColumnBorders:w,withRowBorders:k,captionSide:h||"bottom"},children:y.jsx(ve,{component:"table",mod:[{"data-with-table-border":_,"data-tabular-nums":H},N],...F("table"),...z,children:O||!!E&&y.jsx(IC,{data:E})})})});vn.classes=Qm;vn.varsResolver=MB;vn.displayName="@mantine/core/Table";vn.Td=CB;vn.Th=jS;vn.Tr=yg;vn.Thead=AB;vn.Tbody=OB;vn.Tfoot=jB;vn.Caption=EB;vn.ScrollContainer=Xy;vn.DataRenderer=IC;const[mte,BC]=Gr("Tabs component was not found in the tree");var Jm={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 FC=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=BC();return y.jsx(ve,{...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})});FC.classes=Jm;FC.displayName="@mantine/core/TabsList";const qC=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=Bm(),p=BC(),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(ve,{...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})});qC.classes=Jm;qC.displayName="@mantine/core/TabsPanel";const HC=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=ui(),{dir:x}=Du(),E=BC(),O=o===E.value,j=N=>{E.onChange(E.allowTabDeactivation&&o===E.value?null:o),l==null||l(N)},M={classNames:p,styles:v,props:n};return y.jsxs(Dt,{...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?lt(h,C):void 0},onKeyDown:R6({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})]})});HC.classes=Jm;HC.displayName="@mantine/core/TabsTab";const OT="Tabs.Tab or Tabs.Panel component was rendered with invalid value or without value",pte={keepMounted:!0,keepMountedMode:"activity",orientation:"horizontal",loop:!0,activateTabWithKeyboard:!0,variant:"default",placement:"left"},DB=(e,{radius:n,color:t,autoContrast:i})=>({root:{"--tabs-radius":Kt(n),"--tabs-color":lt(t,e),"--tabs-text-color":ay(i,e)?Im({color:t,theme:e,autoContrast:i}):void 0}}),wi=Re(e=>{const n=be("Tabs",pte,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:N,mod:H,attributes:P,...z}=n,F=qi(f),[G,U]=Mi({value:i,defaultValue:t,finalValue:null,onChange:r}),$=Ze({name:"Tabs",props:n,classes:Jm,className:O,style:j,classNames:C,styles:x,unstyled:E,attributes:P,vars:M,varsResolver:DB});return y.jsx(mte,{value:{placement:w,value:G,orientation:a,id:F,loop:l,activateTabWithKeyboard:c,getTabId:y5(`${F}-tab`,OT),getPanelId:y5(`${F}-panel`,OT),onChange:U,allowTabDeactivation:h,variant:d,color:p,radius:v,inverted:b,keepMounted:k,keepMountedMode:_,unstyled:E,getStyles:$},children:y.jsx(ve,{id:F,variant:d,mod:[{orientation:a,inverted:a==="horizontal"&&b,placement:a==="vertical"&&w},H],...$("root"),...z,children:o})})});wi.classes=Jm;wi.varsResolver=DB;wi.displayName="@mantine/core/Tabs";wi.Tab=HC;wi.Panel=qC;wi.List=FC;function vte({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 gte(e,n){return e?n.split(new RegExp(`[${e.join("")}]`)).map(t=>t.trim()).filter(t=>t!==""):[n]}function jT({splitChars:e,allowDuplicates:n,maxTags:t,value:i,currentTags:r,isDuplicate:a,onDuplicate:o}){const l=gte(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 yte={maxTags:1/0,acceptValueOnBlur:!0,splitChars:[","],hiddenInputValuesDivider:",",openOnFocus:!0,size:"sm"},UC=Re(e=>{const n=be("TagsInput",yte,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:N,comboboxProps:H,filter:P,limit:z,withScrollArea:F,maxDropdownHeight:G,searchValue:U,defaultSearchValue:$,onSearchChange:R,readOnly:I,disabled:q,splitChars:Y,onFocus:D,onBlur:W,onPaste:V,radius:L,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:ge,errorProps:xe,wrapperProps:Pe,description:ue,label:Be,error:Ge,withErrorStyles:Ve,name:Xe,form:Qe,id:ie,clearable:he,clearSectionMode:Ye,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:bn,attributes:yn,ref:wn,loading:it,loadingPosition:_t,...Le}=n,qe=qi(ie),Nn=ky(_),st=Km(Nn),Mn=A.useRef(null),nn=Wt(Mn,wn),rn=Xm({opened:C,defaultOpened:x,onDropdownOpen:()=>{E==null||E(),M&&rn.selectFirstOption()},onDropdownClose:()=>{O==null||O(),rn.resetSelectedOption()}}),{styleProps:on,rest:{type:Bn,autoComplete:Wn,...xt}}=Mu(Le),[Cn,An]=Mi({value:c,defaultValue:h,finalValue:[],onChange:d}),[Qn,Xt]=Mi({value:U,defaultValue:$,finalValue:"",onChange:R}),Ai=hn=>{Xt(hn),rn.resetSelectedOption()},nr=Ze({name:"TagsInput",classes:{},props:n,classNames:t,styles:a,unstyled:o}),{resolvedClassNames:Oa,resolvedStyles:Ya}=Hi({props:n,styles:a,classNames:t}),ja=hn=>{if((jn?jn(hn,Cn):Cn.some(ai=>ai.toLowerCase()===hn.toLowerCase()))&&(w==null||w(hn),!b)){Ai("");return}if(Cn.length>=v){Rn==null||Rn(hn);return}N==null||N(hn),Ai(""),hn.length>0&&An([...Cn,hn])},Yr=hn=>{if(p==null||p(hn),hn.isPropagationStopped())return;const ai=Qn.trim(),{length:un}=ai;if(Y.includes(hn.key)&&un>0&&(An(jT({splitChars:Y,allowDuplicates:b,maxTags:v,value:Qn,currentTags:Cn,isDuplicate:jn,onDuplicate:w})),Ai(""),hn.preventDefault()),hn.key==="Enter"&&un>0&&!hn.nativeEvent.isComposing){if(hn.preventDefault(),document.querySelector(`#${rn.listId} [data-combobox-option][data-combobox-selected]`))return;ja(ai)}hn.key==="Backspace"&&un===0&&Cn.length>0&&!hn.nativeEvent.isComposing&&!I&&(an==null||an(Cn[Cn.length-1]),An(Cn.slice(0,Cn.length-1)))},Ka=hn=>{V==null||V(hn),hn.preventDefault(),hn.clipboardData&&(An(jT({splitChars:Y,allowDuplicates:b,maxTags:v,value:`${Qn}${hn.clipboardData.getData("text/plain")}`,currentTags:Cn,isDuplicate:jn,onDuplicate:w})),Ai(""))},Or=Cn.map((hn,ai)=>{const un=()=>{const Er=Cn.slice();Er.splice(ai,1),An(Er),an==null||an(hn)};return mn?y.jsx(A.Fragment,{children:mn({option:st[hn]||{value:hn,label:hn,disabled:!1},value:hn,onRemove:un,disabled:q||I})},`${hn}-${ai}`):y.jsx(cl,{withRemoveButton:!I,onRemove:un,unstyled:o,disabled:q,attributes:yn,...nr("pill"),children:hn},`${hn}-${ai}`)});A.useEffect(()=>{j&&rn.selectFirstOption()},[j,Cn,Qn]);const jr=y.jsx(Tn.ClearButton,{...Je,onClear:()=>{var hn;An([]),Ai(""),(hn=Mn.current)==null||hn.focus(),rn.openDropdown(),en==null||en()}});return y.jsxs(y.Fragment,{children:[y.jsxs(Tn,{store:rn,classNames:Oa,styles:Ya,unstyled:o,size:f,readOnly:I,__staticSelector:"TagsInput",attributes:yn,onOptionSubmit:hn=>{N==null||N(hn),Ai(""),Cn.length>=v?Rn==null||Rn(hn):An([...Cn,st[hn].value]),rn.resetSelectedOption()},...H,children:[y.jsx(Tn.DropdownTarget,{children:y.jsx(wu,{...on,__staticSelector:"TagsInput",classNames:Oa,styles:Ya,unstyled:o,size:f,className:i,style:r,variant:k,disabled:q,radius:L,rightSection:X,__clearSection:jr,__clearable:he&&Cn.length>0&&!q&&!I,__clearSectionMode:Ye,rightSectionWidth:ee,rightSectionPointerEvents:re,rightSectionProps:se,leftSection:ye,leftSectionWidth:ae,leftSectionPointerEvents:le,leftSectionProps:_e,loading:it,loadingPosition:_t,inputContainer:ne,inputWrapperOrder:ze,withAsterisk:we,required:Ce,labelProps:Ne,descriptionProps:ge,errorProps:xe,wrapperProps:Pe,description:ue,label:Be,error:Ge,withErrorStyles:Ve,__stylesApiProps:{...n,multiline:!0},id:qe,mod:cn,attributes:yn,children:y.jsxs(cl.Group,{disabled:q,unstyled:o,...nr("pillsList"),children:[Or,y.jsx(Tn.EventsTarget,{autoComplete:Wn,withExpandedAttribute:!0,children:y.jsx(wu.Field,{...xt,ref:nn,...nr("inputField"),unstyled:o,onKeyDown:Yr,onFocus:hn=>{D==null||D(hn),bn&&rn.openDropdown()},onBlur:hn=>{W==null||W(hn),Fe&&ja(Qn),rn.closeDropdown()},onPaste:Ka,value:Qn,onChange:hn=>Ai(hn.currentTarget.value),required:Ce&&Cn.length===0,disabled:q,readOnly:I,id:qe})})]})})}),y.jsx(Cy,{data:vte({data:Nn,value:Cn}),hidden:I||q,filter:P,search:Qn,limit:z,hiddenWhenEmpty:!0,withScrollArea:F,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})]})});UC.classes={...Ui.classes,...Tn.classes};UC.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[bte,wte]=Gr("Timeline component was not found in tree");var VC={root:"m_43657ece",itemTitle:"m_2ebe8099",item:"m_436178ff",itemBullet:"m_8affcee1",itemBody:"m_540e8f41"};const WC=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=wte(),x=ui(),E={classNames:n,styles:r};return y.jsxs(ve,{...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?lt(p,x):void 0,"--tli-border-style":v||void 0},..._,children:[y.jsx(ve,{...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})]})]})});WC.classes=VC;WC.displayName="@mantine/core/TimelineItem";const kte={active:-1,align:"left"},RB=(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?lt(r,e):void 0,"--tl-icon-color":ay(a,e)?Im({color:r,theme:e,autoContrast:a}):void 0}}),ec=Re(e=>{const n=be("Timeline",kte,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:VC,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:C,vars:l,varsResolver:RB}),O=A.Children.toArray(f),j=O.map((M,N)=>{var H,P;return A.cloneElement(M,{unstyled:o,__align:v,__active:((H=M.props)==null?void 0:H.active)||(w?c>=O.length-N-1:c>=N),__lineActive:((P=M.props)==null?void 0:P.lineActive)||(w?c>=O.length-N-1:c-1>=N)})});return y.jsx(bte,{value:{getStyles:E},children:y.jsx(ve,{...E("root"),mod:[{align:v},k],...x,children:j})})});ec.classes=VC;ec.varsResolver=RB;ec.displayName="@mantine/core/Timeline";ec.Item=WC;const _te=["h1","h2","h3","h4","h5","h6"],xte=["xs","sm","md","lg","xl"];function Ste(e,n){const t=n!==void 0?n:`h${e}`;return _te.includes(t)?{fontSize:`var(--mantine-${t}-font-size)`,fontWeight:`var(--mantine-${t}-font-weight)`,lineHeight:`var(--mantine-${t}-line-height)`}:xte.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 PB={root:"m_8a5d1357"};const Cte={order:1},NB=(e,{order:n,size:t,lineClamp:i,textWrap:r})=>{const a=Ste(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",Cte,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:PB,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:b,vars:f,varsResolver:NB});return[1,2,3,4,5,6].includes(l)?y.jsx(ve,{...k("root"),component:`h${l}`,variant:h,mod:[{order:l,"data-line-clamp":typeof d=="number"},v],size:c,...w}):null});gl.classes=PB;gl.varsResolver=NB;gl.displayName="@mantine/core/Title";const GC=A.createContext(null);GC.displayName="@mantine/modals/ModalsContext";function Ate(){const e=A.use(GC);if(!e)throw new Error("[@mantine/modals] useModals hook was called outside of context, wrap your app with ModalsProvider component");return e}const[Ote,Nu]=jK("mantine-modals"),jte=e=>{const n=e.modalId||al();return Nu("openModal")({...e,modalId:n}),n},Ete=e=>{const n=e.modalId||al();return Nu("openConfirmModal")({...e,modalId:n}),n},Tte=e=>{const n=e.modalId||al();return Nu("openContextModal")({...e,modalId:n}),n},Mte=Nu("closeModal"),Dte=Nu("closeAllModals"),Rte=e=>Nu("updateModal")(e),Pte=e=>Nu("updateContextModal")(e),Ra={open:jte,close:Mte,closeAll:Dte,openConfirmModal:Ete,openContextModal:Tte,updateModal:Rte,updateContextModal:Pte};function Nte({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=Ate(),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(ve,{mb:"md",children:c}),y.jsxs(Ue,{mt:c?0:"md",justify:"flex-end",...o,children:[y.jsx(yt,{variant:"default",...n,onClick:v,children:(n==null?void 0:n.children)||h}),y.jsx(yt,{...t,onClick:b,children:(t==null?void 0:t.children)||d})]})]})}function ET(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 $te(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 zte(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 Lte({children:e,modalProps:n,labels:t,modals:i}){const[r,a]=A.useReducer($te,{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=>{ET(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,ET(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]);Ote({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}=zte(x.props);return{modalProps:E,content:y.jsx(Nte,{...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(GC,{value:w,children:[y.jsx(Sr,{zIndex:wa("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 Ite(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 Bte(e){return A.useSyncExternalStore(e.subscribe,()=>e.getState(),()=>e.getState())}function Fte(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 qte=()=>Ite({notifications:[],queue:[],defaultPosition:"bottom-right",limit:5}),$u=qte(),Hte=(e=$u)=>Bte(e);function Hc(e,n){const t=e.getState(),i=Fte(n([...t.notifications,...t.queue]),t.defaultPosition,t.limit);e.setState({notifications:i.notifications,queue:i.queue,limit:t.limit,defaultPosition:t.defaultPosition})}function Ute(e,n=$u){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 $B(e,n=$u){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 Vte(e,n=$u){return Hc(n,t=>t.map(i=>i.id===e.id?{...i,...e}:i)),e.id}function Wte(e=$u){Hc(e,()=>[])}function Gte(e=$u){Hc(e,n=>n.slice(0,e.getState().limit))}const Ln={show:Ute,hide:$B,update:Vte,clean:Wte,cleanQueue:Gte,updateState:Hc},zB=["bottom-center","bottom-left","bottom-right","top-center","top-left","top-right"];function Yte(e,n){return e.reduce((t,i)=>(t[i.position||n].push(i),t),zB.reduce((t,i)=>(t[i]=[],t),{}))}const TT={left:"translateX(-100%)",right:"translateX(100%)","top-center":"translateY(-100%)","bottom-center":"translateY(100%)"},Kte={left:"translateX(0)",right:"translateX(0)","top-center":"translateY(0)","bottom-center":"translateY(0)"};function Xte({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:TT[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:Kte[o]},c={opacity:0,maxHeight:0,transform:TT[o]};return{...l,...{entering:f,entered:f,exiting:c,exited:c}[e]}}function Zte(e,n){return typeof n=="number"?n:n===!1||e===!1?!1:e}function LB({data:e,onHide:n,autoClose:t,paused:i,onHoverStart:r,onHoverEnd:a,...o}){const{autoClose:l,message:f,onOpen:c,...h}=e,d=Zte(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})}LB.displayName="@mantine/notifications/NotificationContainer";var IB={root:"m_b37d9ac7",notification:"m_5ed0edd0"};function ES(){return ES=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",fie,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=ui(),j=Hte(k),M=xK(),N=$6(),H=A.useRef({}),P=A.useRef(0),[z,F]=A.useState(0),G=A.useCallback(()=>F(Y=>Y+1),[]),U=A.useCallback(()=>F(Y=>Math.max(0,Y-1)),[]),$=O.respectReducedMotion&&N?1:d,R=Ze({name:"Notifications",classes:IB,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:f,vars:l,varsResolver:qB});A.useEffect(()=>{k==null||k.updateState(Y=>({...Y,limit:b||5,defaultPosition:c}))},[b,c]),ns(()=>{j.notifications.length>P.current&&setTimeout(()=>M(),0),P.current=j.notifications.length},[j.notifications]);const I=Yte(j.notifications,c),q=zB.reduce((Y,D)=>(Y[D]=I[D].map(({style:W,...V})=>y.jsx(uie,{timeout:$,onEnter:()=>H.current[V.id].offsetHeight,nodeRef:{current:H.current[V.id]},children:L=>y.jsx(LB,{ref:X=>{X&&(H.current[V.id]=X)},data:V,onHide:X=>$B(X,k),autoClose:h,paused:x==="all"?z>0:!1,onHoverStart:G,onHoverEnd:U,...R("notification",{style:{...Xte({state:L,position:D,transitionDuration:$,maxHeight:v}),...W}})})},V.id)),Y),{});return y.jsxs(ul,{withinPortal:C,..._,children:[y.jsx(ve,{...R("root"),"data-position":"top-center",...E,children:y.jsx(Gs,{children:q["top-center"]})}),y.jsx(ve,{...R("root"),"data-position":"top-left",...E,children:y.jsx(Gs,{children:q["top-left"]})}),y.jsx(ve,{...R("root",{className:gu.classNames.fullWidth}),"data-position":"top-right",...E,children:y.jsx(Gs,{children:q["top-right"]})}),y.jsx(ve,{...R("root",{className:gu.classNames.fullWidth}),"data-position":"bottom-right",...E,children:y.jsx(Gs,{children:q["bottom-right"]})}),y.jsx(ve,{...R("root"),"data-position":"bottom-left",...E,children:y.jsx(Gs,{children:q["bottom-left"]})}),y.jsx(ve,{...R("root"),"data-position":"bottom-center",...E,children:y.jsx(Gs,{children:q["bottom-center"]})})]})});ko.classes=IB;ko.varsResolver=qB;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 NT;function cie(){return NT||(NT=1,(function(e){function n(R,I){var q=R.length;R.push(I);e:for(;0>>1,D=R[Y];if(0>>1;Yr(L,q))Xr(ee,L)?(R[Y]=ee,R[X]=q,Y=X):(R[Y]=L,R[V]=q,Y=V);else if(Xr(ee,q))R[Y]=ee,R[X]=q,Y=X;else break e}}return I}function r(R,I){var q=R.sortIndex-I.sortIndex;return q!==0?q:R.id-I.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(R){for(var I=t(c);I!==null;){if(I.callback===null)i(c);else if(I.startTime<=R)i(c),I.sortIndex=I.expirationTime,n(f,I);else break;I=t(c)}}function O(R){if(w=!1,E(R),!b)if(t(f)!==null)b=!0,j||(j=!0,F());else{var I=t(c);I!==null&&$(O,I.startTime-R)}}var j=!1,M=-1,N=5,H=-1;function P(){return k?!0:!(e.unstable_now()-HR&&P());){var Y=d.callback;if(typeof Y=="function"){d.callback=null,p=d.priorityLevel;var D=Y(d.expirationTime<=R);if(R=e.unstable_now(),typeof D=="function"){d.callback=D,E(R),I=!0;break n}d===t(f)&&i(f),E(R)}else i(f);d=t(f)}if(d!==null)I=!0;else{var W=t(c);W!==null&&$(O,W.startTime-R),I=!1}}break e}finally{d=null,p=q,v=!1}I=void 0}}finally{I?F():j=!1}}}var F;if(typeof x=="function")F=function(){x(z)};else if(typeof MessageChannel<"u"){var G=new MessageChannel,U=G.port2;G.port1.onmessage=z,F=function(){U.postMessage(null)}}else F=function(){_(z,0)};function $(R,I){M=_(function(){R(e.unstable_now())},I)}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(R){R.callback=null},e.unstable_forceFrameRate=function(R){0>R||125Y?(R.sortIndex=q,n(c,R),t(f)===null&&R===t(c)&&(w?(C(M),M=-1):w=!0,$(O,q-Y))):(R.sortIndex=D,n(f,R),b||v||(b=!0,j||(j=!0,F()))),R},e.unstable_shouldYield=P,e.unstable_wrapCallback=function(R){var I=p;return function(){var q=p;p=I;try{return R.apply(this,arguments)}finally{p=q}}}})(Pk)),Pk}var $T;function die(){return $T||($T=1,Rk.exports=cie()),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 zT;function hie(){if(zT)return eh;zT=1;var e=die(),n=M6(),t=gz();function i(s){var u="https://react.dev/errors/"+s;if(1D||(s.current=Y[D],Y[D]=null,D--)}function L(s,u){D++,Y[D]=s.current,s.current=u}var X=W(null),ee=W(null),re=W(null),se=W(null);function ye(s,u){switch(L(re,u),L(ee,s),L(X,null),u.nodeType){case 9:case 11:s=(s=u.documentElement)&&(s=s.namespaceURI)?$E(s):0;break;default:if(s=u.tagName,u=u.namespaceURI)u=$E(u),s=zE(u,s);else switch(s){case"svg":s=1;break;case"math":s=2;break;default:s=0}}V(X),L(X,s)}function ae(){V(X),V(ee),V(re)}function le(s){s.memoizedState!==null&&L(se,s);var u=X.current,m=zE(u,s.type);u!==m&&(L(ee,s),L(X,m))}function _e(s){ee.current===s&&(V(X),V(ee)),se.current===s&&(V(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 ge(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+=ge(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,Ge=e.unstable_shouldYield,Ve=e.unstable_requestPaint,Xe=e.unstable_now,Qe=e.unstable_getCurrentPriorityLevel,ie=e.unstable_ImmediatePriority,he=e.unstable_UserBlockingPriority,Ye=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,bn=262144,yn=4194304;function wn(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 it(s,u,m){var g=s.pendingLanes;if(g===0)return 0;var S=0,T=s.suspendedLanes,B=s.pingedLanes;s=s.warmLanes;var K=g&134217727;return K!==0?(g=K&~T,g!==0?S=wn(g):(B&=K,B!==0?S=wn(B):m||(m=K&~s,m!==0&&(S=wn(m))))):(K=g&~T,K!==0?S=wn(K):B!==0?S=wn(B):m||(m=g&~s,m!==0&&(S=wn(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 _t(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=yn;return yn<<=1,(yn&62914560)===0&&(yn=4194304),s}function Nn(s){for(var u=[],m=0;31>m;m++)u.push(s);return u}function st(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 B=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=B&~m;0"u")return null;try{return s.activeElement||s.body}catch{return s.body}}var _p=/[\n"\\]/g;function ir(s){return s.replace(_p,function(u){return"\\"+u.charCodeAt(0).toString(16)+" "})}function fd(s,u,m,g,S,T,B,K){s.name="",B!=null&&typeof B!="function"&&typeof B!="symbol"&&typeof B!="boolean"?s.type=B:s.removeAttribute("type"),u!=null?B==="number"?(u===0&&s.value===""||s.value!=u)&&(s.value=""+tr(u)):s.value!==""+tr(u)&&(s.value=""+tr(u)):B!=="submit"&&B!=="reset"||s.removeAttribute("value"),u!=null?cd(s,B,tr(u)):m!=null?cd(s,B,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 xp(s,u,m,g,S,T,B,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)){Uu(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,B!=null&&typeof B!="function"&&typeof B!="symbol"&&typeof B!="boolean"&&(s.name=B),Uu(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 Za={};Object.defineProperty(Za,"passive",{get:function(){Dl=!0}}),window.addEventListener("test",Za,Za),window.removeEventListener("test",Za,Za)}catch{Dl=!1}var Mr=null,Ri=null,ws=null;function Sp(){if(ws)return ws;var s,u=Ri,m=u.length,g,S="value"in Mr?Mr.value:Mr.textContent,T=S.length;for(s=0;s=md),HA=" ",UA=!1;function VA(s,u){switch(s){case"keyup":return kG.indexOf(u.keyCode)!==-1;case"keydown":return u.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function WA(s){return s=s.detail,typeof s=="object"&&"data"in s?s.data:null}var Gu=!1;function xG(s,u){switch(s){case"compositionend":return WA(u);case"keypress":return u.which!==32?null:(UA=!0,HA);case"textInput":return s=u.data,s===HA&&UA?null:s;default:return null}}function SG(s,u){if(Gu)return s==="compositionend"||!ob&&VA(s,u)?(s=Sp(),ws=Ri=Mr=null,Gu=!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=eO(m)}}function tO(s,u){return s&&u?s===u?!0:s&&s.nodeType===3?!1:u&&u.nodeType===3?tO(s,u.parentNode):"contains"in s?s.contains(u):s.compareDocumentPosition?!!(s.compareDocumentPosition(u)&16):!1:!1}function iO(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 DG=Wi&&"documentMode"in document&&11>=document.documentMode,Yu=null,fb=null,yd=null,cb=!1;function rO(s,u,m){var g=m.window===m?m.document:m.nodeType===9?m:m.ownerDocument;cb||Yu==null||Yu!==El(g)||(g=Yu,"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=pv(fb,"onSelect"),0>=B,S-=B,Qa=1<<32-en(u)+S|m<Fn?(nt=fn,fn=null):nt=fn.sibling;var ct=de(oe,fn,fe[Fn],Te);if(ct===null){fn===null&&(fn=nt);break}s&&fn&&ct.alternate===null&&u(oe,fn),te=T(ct,te,Fn),ft===null?pn=ct:ft.sibling=ct,ft=ct,fn=nt}if(Fn===fe.length)return m(oe,fn),rt&&Co(oe,Fn),pn;if(fn===null){for(;FnFn?(nt=fn,fn=null):nt=fn.sibling;var qs=de(oe,fn,ct.value,Te);if(qs===null){fn===null&&(fn=nt);break}s&&fn&&qs.alternate===null&&u(oe,fn),te=T(qs,te,Fn),ft===null?pn=qs:ft.sibling=qs,ft=qs,fn=nt}if(ct.done)return m(oe,fn),rt&&Co(oe,Fn),pn;if(fn===null){for(;!ct.done;Fn++,ct=fe.next())ct=Me(oe,ct.value,Te),ct!==null&&(te=T(ct,te,Fn),ft===null?pn=ct:ft.sibling=ct,ft=ct);return rt&&Co(oe,Fn),pn}for(fn=g(fn);!ct.done;Fn++,ct=fe.next())ct=ke(fn,oe,Fn,ct.value,Te),ct!==null&&(s&&ct.alternate!==null&&fn.delete(ct.key===null?Fn:ct.key),te=T(ct,te,Fn),ft===null?pn=ct:ft.sibling=ct,ft=ct);return s&&fn.forEach(function(QY){return u(oe,QY)}),rt&&Co(oe,Fn),pn}function Ot(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&&ql(pn)===te.type){m(oe,te.sibling),Te=S(te,fe.props),Sd(Te,fe),Te.return=oe,oe=Te;break e}m(oe,te);break}else u(oe,te);te=te.sibling}fe.type===w?(Te=zl(fe.props.children,oe.mode,Te,fe.key),Te.return=oe,oe=Te):(Te=Dp(fe.type,fe.key,fe.props,null,oe.mode,Te),Sd(Te,fe),Te.return=oe,oe=Te)}return B(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=yb(fe,oe.mode,Te),Te.return=oe,oe=Te}return B(oe);case N:return fe=ql(fe),Ot(oe,te,fe,Te)}if($(fe))return ln(oe,te,fe,Te);if(F(fe)){if(pn=F(fe),typeof pn!="function")throw Error(i(150));return fe=pn.call(fe),_n(oe,te,fe,Te)}if(typeof fe.then=="function")return Ot(oe,te,Ip(fe),Te);if(fe.$$typeof===x)return Ot(oe,te,Np(oe,fe),Te);Bp(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=gb(fe,oe.mode,Te),Te.return=oe,oe=Te),B(oe)):m(oe,te)}return function(oe,te,fe,Te){try{xd=0;var pn=Ot(oe,te,fe,Te);return of=null,pn}catch(fn){if(fn===af||fn===zp)throw fn;var ft=Rr(29,fn,null,oe.mode);return ft.lanes=Te,ft.return=oe,ft}finally{}}}var Ul=OO(!0),jO=OO(!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=Mp(s),cO(s,null,m),u}return Tp(s,g,u,m),Mp(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 B={lane:m.lane,tag:m.tag,payload:m.payload,callback:null,next:null};T===null?S=T=B:T=T.next=B,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=rf;if(s!==null)throw s}}function Od(s,u,m,g){Rb=!1;var S=s.updateQueue;Cs=!1;var T=S.firstBaseUpdate,B=S.lastBaseUpdate,K=S.shared.pending;if(K!==null){S.shared.pending=null;var J=K,ce=J.next;J.next=null,B===null?T=ce:B.next=ce,B=J;var Oe=s.alternate;Oe!==null&&(Oe=Oe.updateQueue,K=Oe.lastBaseUpdate,K!==B&&(K===null?Oe.firstBaseUpdate=ce:K.next=ce,Oe.lastBaseUpdate=J))}if(T!==null){var Me=S.baseState;B=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===tf&&(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 Ot=m;switch(_n.tag){case 1:if(ln=_n.payload,typeof ln=="function"){Me=ln.call(Ot,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(Ot,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,B|=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|=B,s.lanes=B,s.memoizedState=Me}}function EO(s,u){if(typeof s!="function")throw Error(i(191,s));s.call(u)}function TO(s,u){var m=s.callbacks;if(m!==null)for(s.callbacks=null,s=0;sT?T:8;var B=R.T,K={};R.T=K,Qb(s,!1,u,m);try{var J=S(),ce=R.S;if(ce!==null&&ce(K,J),J!==null&&typeof J=="object"&&typeof J.then=="function"){var Oe=FG(J,g);Td(s,u,Oe,Lr(s))}else Td(s,u,g,Lr(s))}catch(Me){Td(s,u,{then:function(){},status:"rejected",reason:Me},Lr())}finally{I.p=T,B!==null&&K.types!==null&&(B.types=K.types),R.T=B}}function GG(){}function Xb(s,u,m,g){if(s.tag!==5)throw Error(i(476));var S=lj(s).queue;sj(s,S,u,q,m===null?GG:function(){return uj(s),m(g)})}function lj(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 uj(s){var u=lj(s);u.next===null&&(u=s.alternate.memoizedState),Td(s,u.next.queue,{},Lr())}function Zb(){return Ni(Gd)}function fj(){return li().memoizedState}function cj(){return li().memoizedState}function YG(s){for(var u=s.return;u!==null;){switch(u.tag){case 24:case 3:var m=Lr();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 KG(s,u,m){var g=Lr();m={lane:g,revertLane:0,gesture:null,action:m,hasEagerState:!1,eagerState:null,next:null},Xp(s)?hj(u,m):(m=pb(s,u,m,g),m!==null&&(yr(m,s,g),mj(m,u,g)))}function dj(s,u,m){var g=Lr();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(Xp(s))hj(u,S);else{var T=s.alternate;if(s.lanes===0&&(T===null||T.lanes===0)&&(T=u.lastRenderedReducer,T!==null))try{var B=u.lastRenderedState,K=T(B,m);if(S.hasEagerState=!0,S.eagerState=K,Dr(K,B))return Tp(s,u,S,0),Tt===null&&Ep(),!1}catch{}finally{}if(m=pb(s,u,S,g),m!==null)return yr(m,s,g),mj(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},Xp(s)){if(u)throw Error(i(479))}else u=pb(s,m,g,2),u!==null&&yr(u,s,2)}function Xp(s){var u=s.alternate;return s===zn||u!==null&&u===zn}function hj(s,u){lf=Hp=!0;var m=s.pending;m===null?u.next=u:(u.next=m.next,m.next=u),s.pending=u}function mj(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:Wp,useCallback:Jt,useContext:Jt,useEffect:Jt,useImperativeHandle:Jt,useLayoutEffect:Jt,useInsertionEffect:Jt,useMemo:Jt,useReducer:Jt,useRef:Jt,useState:Jt,useDebugValue:Jt,useDeferredValue:Jt,useTransition:Jt,useSyncExternalStore:Jt,useId:Jt,useHostTransitionStatus:Jt,useFormState:Jt,useActionState:Jt,useOptimistic:Jt,useMemoCache:Jt,useCacheRefresh:Jt};Md.useEffectEvent=Jt;var pj={readContext:Ni,use:Wp,useCallback:function(s,u){return sr().memoizedState=[s,u===void 0?null:u],s},useContext:Ni,useEffect:QO,useImperativeHandle:function(s,u,m){m=m!=null?m.concat([s]):null,Yp(4194308,4,tj.bind(null,u,s),m)},useLayoutEffect:function(s,u){return Yp(4194308,4,s,u)},useInsertionEffect:function(s,u){Yp(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=KG.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=dj.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=sj.bind(null,zn,s.queue,!0,!1),sr().memoizedState=s,[!1,s]},useSyncExternalStore:function(s,u,m){var g=zn,S=sr();if(rt){if(m===void 0)throw Error(i(407));m=m()}else{if(m=u(),Tt===null)throw Error(i(349));(et&127)!==0||$O(g,u,m)}S.memoizedState=m;var T={value:m,getSnapshot:u};return S.queue=T,QO(LO.bind(null,g,T,s),[s]),g.flags|=2048,ff(9,{destroy:void 0},zO.bind(null,g,T,m,u),null),m},useId:function(){var s=sr(),u=Tt.identifierPrefix;if(rt){var m=Ja,g=Qa;m=(g&~(1<<32-en(g)-1)).toString(32)+m,u="_"+u+"R_"+m,m=Up++,0<\/script>",T=T.removeChild(T.firstChild);break;case"select":T=typeof g.is=="string"?B.createElement("select",{is:g.is}):B.createElement("select"),g.multiple?T.multiple=!0:g.size&&(T.size=g.size);break;default:T=typeof g.is=="string"?B.createElement(S,{is:g.is}):B.createElement(S)}}T[Qn]=u,T[Xt]=g;e:for(B=u.child;B!==null;){if(B.tag===5||B.tag===6)T.appendChild(B.stateNode);else if(B.tag!==4&&B.tag!==27&&B.child!==null){B.child.return=B,B=B.child;continue}if(B===u)break e;for(;B.sibling===null;){if(B.return===null||B.return===u)break e;B=B.return}B.sibling.return=B.return,B=B.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,ef(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||PE(s.nodeValue,m)),s||xs(u,!0)}else s=vv(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=ef(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?(Nr(u),u):(Nr(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=ef(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?(Nr(u),u):(Nr(u),null)}return Nr(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),nv(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(V(si),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(ei!==0||s!==null&&(s.flags&128)!==0)for(s=u.child;s!==null;){if(T=qp(s),T!==null){for(u.flags|=128,Rd(g,!1),s=T.updateQueue,u.updateQueue=s,nv(u,s),u.subtreeFlags=0,s=m,m=u.child;m!==null;)dO(m,s),m=m.sibling;return L(si,si.current&1|2),rt&&Co(u,g.treeForkCount),u.child}s=s.sibling}g.tail!==null&&Xe()>ov&&(u.flags|=128,S=!0,Rd(g,!1),u.lanes=4194304)}else{if(!S)if(s=qp(T),s!==null){if(u.flags|=128,S=!0,s=s.updateQueue,u.updateQueue=s,nv(u,s),Rd(g,!0),g.tail===null&&g.tailMode==="hidden"&&!T.alternate&&!rt)return Ft(u),null}else 2*Xe()-g.renderingStartTime>ov&&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=si.current,L(si,S?m&1|2:m&1),rt&&Co(u,g.treeForkCount),s):(Ft(u),null);case 22:case 23:return Nr(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&&nv(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&&V(Fl),null;case 24:return m=null,s!==null&&(m=s.memoizedState.cache),u.memoizedState.cache!==m&&(u.flags|=2048),Oo(fi),Ft(u),null;case 25:return null;case 30:return null}throw Error(i(156,u.tag))}function eY(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(fi),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(Nr(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(Nr(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 V(si),null;case 4:return ae(),null;case 10:return Oo(u.type),null;case 22:case 23:return Nr(u),Nb(),s!==null&&V(Fl),s=u.flags,s&65536?(u.flags=s&-65537|128,u):null;case 24:return Oo(fi),null;case 25:return null;default:return null}}function Ij(s,u){switch(wb(u),u.tag){case 3:Oo(fi),ae();break;case 26:case 27:case 5:_e(u);break;case 4:ae();break;case 31:u.memoizedState!==null&&Nr(u);break;case 13:Nr(u);break;case 19:V(si);break;case 10:Oo(u.type);break;case 22:case 23:Nr(u),Nb(),s!==null&&V(Fl);break;case 24:Oo(fi)}}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,B=m.inst;g=T(),B.destroy=g}m=m.next}while(m!==S)}}catch(K){wt(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 B=g.inst,K=B.destroy;if(K!==void 0){B.destroy=void 0,S=u;var J=m,ce=K;try{ce()}catch(Oe){wt(S,J,Oe)}}}g=g.next}while(g!==T)}}catch(Oe){wt(u,u.return,Oe)}}function Bj(s){var u=s.updateQueue;if(u!==null){var m=s.stateNode;try{TO(u,m)}catch(g){wt(s,s.return,g)}}}function Fj(s,u,m){m.props=Wl(s.type,s.memoizedProps),m.state=s.memoizedState;try{m.componentWillUnmount()}catch(g){wt(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){wt(s,u,S)}}function eo(s,u){var m=s.ref,g=s.refCleanup;if(m!==null)if(typeof g=="function")try{g()}catch(S){wt(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){wt(s,u,S)}else m.current=null}function qj(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){wt(s,s.return,S)}}function hw(s,u,m){try{var g=s.stateNode;_Y(g,s.type,m,u),g[Xt]=u}catch(S){wt(s,s.return,S)}}function Hj(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||Hj(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=$t));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 tv(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(tv(s,u,m),s=s.sibling;s!==null;)tv(s,u,m),s=s.sibling}function Uj(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){wt(s,s.return,T)}}var Do=!1,hi=!1,vw=!1,Vj=typeof WeakSet=="function"?WeakSet:Set,Oi=null;function nY(s,u){if(s=s.containerInfo,zw=xv,s=iO(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 B=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=B+S),Me!==T||g!==0&&Me.nodeType!==3||(J=B+g),Me.nodeType===3&&(B+=Me.nodeValue.length),(ke=Me.firstChild)!==null;)de=Me,Me=ke;for(;;){if(Me===s)break n;if(de===m&&++ce===S&&(K=B),de===T&&++Oe===g&&(J=B),(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},xv=!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,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 B=ZE("link","href",S).get(g+(m.href||""));if(B){for(var K=0;KOt&&(B=Ot,Ot=_n,_n=B);var oe=nO(K,_n),te=nO(K,Ot);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>Ot?(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,R.T=null,m=xw,xw=null;var T=Ps,B=zo;if(gi=0,pf=Ps=null,zo=0,(pt&6)!==0)throw Error(i(331));var K=pt;if(pt|=4,tE(T.current),Jj(T,T.current,B,m),pt=K,Fd(0,!1),mn&&typeof mn.onPostCommitFiberRoot=="function")try{mn.onPostCommitFiberRoot(On,T)}catch{}return!0}finally{I.p=S,R.T=g,wE(s,u)}}function _E(s,u,m){u=Qr(m,u),u=tw(s.stateNode,u,2),s=Os(s,u,2),s!==null&&(st(s,2),no(s))}function wt(s,u,m){if(s.tag===3)_E(s,s,m);else for(;u!==null;){if(u.tag===3){_E(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=xj(2),g=Os(u,m,2),g!==null&&(Sj(m,g,u,s),st(g,2),no(g));break}}u=u.return}}function Ow(s,u,m){var g=s.pingCache;if(g===null){g=s.pingCache=new rY;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=uY.bind(null,s,u,m),u.then(s,s))}function uY(s,u,m){var g=s.pingCache;g!==null&&g.delete(u),s.pingedLanes|=s.suspendedLanes&m,s.warmLanes&=~m,Tt===s&&(et&m)===m&&(ei===4||ei===3&&(et&62914560)===et&&300>Xe()-av?(pt&2)===0&&vf(s,0):ww|=m,mf===et&&(mf=0)),no(s)}function xE(s,u){u===0&&(u=qe()),s=$l(s,u),s!==null&&(st(s,u),no(s))}function fY(s){var u=s.memoizedState,m=0;u!==null&&(m=u.retryLane),xE(s,m)}function cY(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),xE(s,m)}function dY(s,u){return ue(s,u)}var dv=null,yf=null,jw=!1,hv=!1,Ew=!1,$s=0;function no(s){s!==yf&&s.next===null&&(yf===null?dv=yf=s:yf=yf.next=s),hv=!0,jw||(jw=!0,mY())}function Fd(s,u){if(!Ew&&hv){Ew=!0;do for(var m=!1,g=dv;g!==null;){if(s!==0){var S=g.pendingLanes;if(S===0)var T=0;else{var B=g.suspendedLanes,K=g.pingedLanes;T=(1<<31-en(42|s)+1)-1,T&=S&~(B&~K),T=T&201326741?T&201326741|1:T?T|2:0}T!==0&&(m=!0,OE(g,T))}else T=et,T=it(g,g===Tt?T:0,g.cancelPendingCommit!==null||g.timeoutHandle!==-1),(T&3)===0||_t(g,T)||(m=!0,OE(g,T));g=g.next}while(m);Ew=!1}}function hY(){SE()}function SE(){hv=jw=!1;var s=0;$s!==0&&SY()&&(s=$s);for(var u=Xe(),m=null,g=dv;g!==null;){var S=g.next,T=CE(g,u);T===0?(g.next=null,m===null?dv=S:m.next=S,S===null&&(yf=m)):(m=g,(s!==0||(T&3)!==0)&&(hv=!0)),g=S}gi!==0&&gi!==5||Fd(s),$s!==0&&($s=0)}function CE(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&&NE(Me)&&(J=J.responseEnd,B+=Oe*(J"u"?null:document;function GE(s,u,m){var g=bf;if(g&&typeof u=="string"&&u){var S=ir(u);S='link[rel="'+s+'"][href="'+S+'"]',typeof m=="string"&&(S+='[crossorigin="'+m+'"]'),WE.has(S)||(WE.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 RY(s){Lo.D(s),GE("dns-prefetch",s,null)}function PY(s,u){Lo.C(s,u),GE("preconnect",s,u)}function NY(s,u,m){Lo.L(s,u,m);var g=bf;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=wf(s);break;case"script":T=kf(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 $Y(s,u){Lo.m(s,u);var m=bf;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=kf(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 zY(s,u,m){Lo.S(s,u,m);var g=bf;if(g&&s){var S=ai(g).hoistableStyles,T=wf(s);u=u||"default";var B=S.get(T);if(!B){var K={loading:0,preload:null};if(B=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=B=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,yv(B,u,g)}B={type:"stylesheet",instance:B,count:1,state:K},S.set(T,B)}}}function LY(s,u){Lo.X(s,u);var m=bf;if(m&&s){var g=ai(m).hoistableScripts,S=kf(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 IY(s,u){Lo.M(s,u);var m=bf;if(m&&s){var g=ai(m).hoistableScripts,S=kf(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 YE(s,u,m,g){var S=(S=re.current)?gv(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=wf(m.href),m=ai(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=wf(m.href);var T=ai(S).hoistableStyles,B=T.get(s);if(B||(S=S.ownerDocument||S,B={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},T.set(s,B),(T=S.querySelector(Vd(s)))&&!T._p&&(B.instance=T,B.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||BY(S,s,m,B.state))),u&&g===null)throw Error(i(528,""));return B}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=kf(m),m=ai(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 wf(s){return'href="'+ir(s)+'"'}function Vd(s){return'link[rel="stylesheet"]['+s+"]"}function KE(s){return d({},s,{"data-precedence":s.precedence,precedence:null})}function BY(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 kf(s){return'[src="'+ir(s)+'"]'}function Wd(s){return"script[async]"+s}function XE(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),yv(g,m.precedence,s),u.instance=g;case"stylesheet":S=wf(m.href);var T=s.querySelector(Vd(S));if(T)return u.state.loading|=4,u.instance=T,un(T),T;g=KE(m),(S=ra.get(S))&&Vw(g,S),T=(s.ownerDocument||s).createElement("link"),un(T);var B=T;return B._p=new Promise(function(K,J){B.onload=K,B.onerror=J}),zi(T,"link",g),u.state.loading|=4,yv(T,m.precedence,s),u.instance=T;case"script":return T=kf(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,yv(g,m.precedence,s));return u.instance}function yv(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,B=0;B title"):null)}function FY(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 JE(s){return!(s.type==="stylesheet"&&(s.state.loading&3)===0)}function qY(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=wf(g.href),T=u.querySelector(Vd(S));if(T){u=T._p,u!==null&&typeof u=="object"&&typeof u.then=="function"&&(s.count++,s=wv.bind(s),u.then(s,s)),m.state.loading|=4,m.instance=T,un(T);return}T=u.ownerDocument||u,g=KE(g),(S=ra.get(S))&&Vw(g,S),T=T.createElement("link"),un(T);var B=T;B._p=new Promise(function(K,J){B.onload=K,B.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=wv.bind(s),u.addEventListener("load",m),u.addEventListener("error",m))}}var Gw=0;function HY(s,u){return s.stylesheets&&s.count===0&&_v(s,s.stylesheets),0Gw?50:800)+u);return s.unsuspend=m,function(){s.unsuspend=null,clearTimeout(g),clearTimeout(S)}}:null}function wv(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)_v(this,this.stylesheets);else if(this.unsuspend){var s=this.unsuspend;this.unsuspend=null,s()}}}var kv=null;function _v(s,u){s.stylesheets=null,s.unsuspend!==null&&(s.count++,kv=new Map,u.forEach(UY,s),kv=null,wv.call(s))}function UY(s,u){if(!(u.state.loading&4)){var m=kv.get(s);if(m)var g=m.get(null);else{m=new Map,kv.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=hie(),Dk.exports}var pie=mie();class HB extends Error{constructor(n,t){super(t),this.status=n,this.name="HTTPError"}}async function vie(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 HB(i.status,r.Message??r.message??i.statusText)}if(i.status!==204)return i.json()}const gie="/api";function tt(e,n){return vie(e,n,gie)}function yie(){return tt("/board")}function bie(){return tt("/flags")}function wie(e){return tt("/columns",{method:"POST",body:JSON.stringify({name:e})})}function Zl(e,n){return tt(`/columns/${e}`,{method:"PATCH",body:JSON.stringify(n)})}function kie(e){return tt(`/columns/${e}`,{method:"DELETE"})}function _ie(e){return tt("/columns/reorder",{method:"POST",body:JSON.stringify({ids:e})})}function xie(e){return tt("/cards",{method:"POST",body:JSON.stringify(e)})}function Of(e,n){return tt(`/cards/${e}`,{method:"PATCH",body:JSON.stringify(n)})}function Sie(e){return tt(`/cards/${e}`,{method:"DELETE"})}function Nk(e,n){return tt(`/cards/${e}/stickers`,{method:"PUT",body:JSON.stringify({stickers:n})})}function Cie(){return tt("/trash")}function Aie(e){return tt(`/cards/${e}/restore`,{method:"POST"})}function Oie(e){return tt(`/cards/${e}/purge`,{method:"DELETE"})}function jie(){return tt("/archive")}function Eie(e){return tt(`/cards/${e}/archive`,{method:"POST"})}function Tie(e){return tt(`/cards/${e}/unarchive`,{method:"POST"})}function Mie(e,n){const t=new URLSearchParams({date:e});return tt(`/reports/daily?${t.toString()}`)}function Die(e){return tt(`/reports/daily/summary?date=${encodeURIComponent(e)}`)}function Rie(e,n){const t=new URLSearchParams({date:e});return tt(`/reports/daily/summary?${t.toString()}`,{method:"POST"})}function Pie(e){return tt(`/settings/${encodeURIComponent(e)}`)}function Nie(e,n){return tt(`/settings/${encodeURIComponent(e)}`,{method:"PUT",body:JSON.stringify({value:n})})}function $ie(e,n,t){return tt(`/cards/${e}/move`,{method:"POST",body:JSON.stringify({column_id:n,ordered_ids:t})})}function zie(e){return tt(`/cards/${e}/history`)}function Lie(e){return tt(`/cards/${e}/messages`)}function Iie(e,n){return tt(`/cards/${e}/messages`,{method:"POST",body:JSON.stringify({body:n})})}function Bie(e,n){return tt(`/cards/${e}/messages/${n}`,{method:"DELETE"})}function Fie(e){return tt(`/cards/${e}/duplicate`,{method:"POST"})}function qie(){return`${window.location.protocol==="https:"?"wss:":"ws:"}//${window.location.host}/api/chat/ws`}function Hie(e,n,t){return new Promise((i,r)=>{const a=new WebSocket(qie());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 IT(e,n){return tt("/auth/login",{method:"POST",body:JSON.stringify({username:e,password:n})})}function Uie(e,n,t){return tt("/auth/register",{method:"POST",body:JSON.stringify({username:e,password:n,display_name:t})})}function Vie(){return tt("/auth/logout",{method:"POST"})}function Wie(){return tt("/me")}function BT(e){return tt("/me",{method:"PATCH",body:JSON.stringify(e)})}function UB(){return tt("/users")}function VB(){return tt("/tags")}function Gie(){return tt("/requesters")}function WB(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 tt(`/metrics${t?`?${t}`:""}`)}const GB=A.createContext(null);function Yie({children:e}){const[n,t]=A.useState(null),[i,r]=A.useState(!0);A.useEffect(()=>{Wie().then(t).catch(f=>{(!(f instanceof HB)||f.status!==401)&&console.warn("getMe failed",f)}).finally(()=>r(!1))},[]);const a=A.useCallback(async(f,c)=>{const h=await IT(f,c);t(h)},[]),o=A.useCallback(async(f,c,h)=>{await Uie(f,c,h);const d=await IT(f,c);t(d)},[]),l=A.useCallback(async()=>{await Vie(),t(null)},[]);return y.jsx(GB.Provider,{value:{user:n,loading:i,login:a,register:o,logout:l,setUser:t},children:e})}function KC(){const e=A.useContext(GB);if(!e)throw new Error("useAuth: missing AuthProvider");return e}function Kie(){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 XC(e){return"nodeType"in e}function dr(e){var n,t;return e?Uc(e)?e:XC(e)&&(n=(t=e.ownerDocument)==null?void 0:t.defaultView)!=null?n:window:window}function ZC(e){const{Document:n}=dr(e);return e instanceof n}function ep(e){return Uc(e)?!1:e instanceof dr(e).HTMLElement}function YB(e){return e instanceof dr(e).SVGElement}function Vc(e){return e?Uc(e)?e.document:XC(e)?ZC(e)?e:ep(e)||YB(e)?e.ownerDocument:document:document:document}const Va=Zy?A.useLayoutEffect:A.useEffect;function Qy(e){const n=A.useRef(e);return Va(()=>{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 Zh(e,n){n===void 0&&(n=[e]);const t=A.useRef(e);return Va(()=>{t.current!==e&&(t.current=e)},n),t}function np(e,n){const t=A.useRef();return A.useMemo(()=>{const i=e(t.current);return t.current=i,i},[...n])}function zg(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 Lg(e){const n=A.useRef();return A.useEffect(()=>{n.current=e},[e]),n.current}let $k={};function tp(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 KB(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 Uf=KB(1),Qh=KB(-1);function Zie(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 Qie(e){if(!e)return!1;const{TouchEvent:n}=dr(e.target);return n&&e instanceof n}function Ig(e){if(Qie(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 Zie(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}}}),FT="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function Jie(e){return e.matches(FT)?e:e.querySelector(FT)}const ere={display:"none"};function nre(e){let{id:n,value:t}=e;return Q.createElement("div",{id:n,style:ere},t)}function tre(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 ire(){const[e,n]=A.useState("");return{announce:A.useCallback(i=>{i!=null&&n(i)},[]),announcement:e}}const XB=A.createContext(null);function rre(e){const n=A.useContext(XB);A.useEffect(()=>{if(!n)throw new Error("useDndMonitor must be used within a children of ");return n(e)},[e,n])}function are(){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 ore={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. + `},sre={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 lre(e){let{announcements:n=sre,container:t,hiddenTextDescribedById:i,screenReaderInstructions:r=ore}=e;const{announce:a,announcement:o}=ire(),l=tp("DndLiveRegion"),[f,c]=A.useState(!1);if(A.useEffect(()=>{c(!0)},[]),rre(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(nre,{id:i,value:r.draggable}),Q.createElement(tre,{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 Bg(){}function qT(e,n){return A.useMemo(()=>({sensor:e,options:n??{}}),[e,n])}function ure(){for(var e=arguments.length,n=new Array(e),t=0;t[...n].filter(i=>i!=null),[...n])}const Wa=Object.freeze({x:0,y:0});function QC(e,n){return Math.sqrt(Math.pow(e.x-n.x,2)+Math.pow(e.y-n.y,2))}function fre(e,n){const t=Ig(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 JC(e,n){let{data:{value:t}}=e,{data:{value:i}}=n;return t-i}function cre(e,n){let{data:{value:t}}=e,{data:{value:i}}=n;return i-t}function DS(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 HT(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 dre=e=>{let{collisionRect:n,droppableRects:t,droppableContainers:i}=e;const r=HT(n,n.left,n.top),a=[];for(const o of i){const{id:l}=o,f=t.get(l);if(f){const c=QC(HT(f),r);a.push({id:l,data:{droppableContainer:o,value:c}})}}return a.sort(JC)},QB=e=>{let{collisionRect:n,droppableRects:t,droppableContainers:i}=e;const r=DS(n),a=[];for(const o of i){const{id:l}=o,f=t.get(l);if(f){const c=DS(f),h=r.reduce((p,v,b)=>p+QC(c[b],v),0),d=Number((h/4).toFixed(4));a.push({id:l,data:{droppableContainer:o,value:d}})}}return a.sort(JC)};function hre(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=hre(l,n);f>0&&r.push({id:o,data:{droppableContainer:a,value:f}})}}return r.sort(cre)};function mre(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 pre=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&&mre(i,l)){const c=DS(l).reduce((d,p)=>d+QC(i,p),0),h=Number((c/4).toFixed(4));r.push({id:o,data:{droppableContainer:a,value:h}})}}return r.sort(JC)};function vre(e,n,t){return{...e,scaleX:n&&t?n.width/t.width:1,scaleY:n&&t?n.height/t.height:1}}function eF(e,n){return e&&n?{x:e.left-n.left,y:e.top-n.top}:Wa}function gre(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 yre=gre(1);function nF(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 bre(e,n,t){const i=nF(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 wre={ignoreTransform:!1};function Wc(e,n){n===void 0&&(n=wre);let t=e.getBoundingClientRect();if(n.ignoreTransform){const{transform:c,transformOrigin:h}=dr(e).getComputedStyle(e);c&&(t=bre(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 UT(e){return Wc(e,{ignoreTransform:!0})}function kre(e){const n=e.innerWidth,t=e.innerHeight;return{top:0,left:0,right:n,bottom:t,width:n,height:t}}function _re(e,n){return n===void 0&&(n=dr(e).getComputedStyle(e)),n.position==="fixed"}function xre(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(ZC(r)&&r.scrollingElement!=null&&!t.includes(r.scrollingElement))return t.push(r.scrollingElement),t;if(!ep(r)||YB(r)||t.includes(r))return t;const a=dr(e).getComputedStyle(r);return r!==e&&xre(r,a)&&t.push(r),_re(r,a)?t:i(r.parentNode)}return e?i(e):t}function tF(e){const[n]=e0(e,1);return n??null}function zk(e){return!Zy||!e?null:Uc(e)?e:XC(e)?ZC(e)||e===Vc(e).scrollingElement?window:ep(e)?e:null:null}function iF(e){return Uc(e)?e.scrollX:e.scrollLeft}function rF(e){return Uc(e)?e.scrollY:e.scrollTop}function RS(e){return{x:iF(e),y:rF(e)}}var Ti;(function(e){e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward"})(Ti||(Ti={}));function aF(e){return!Zy||!e?!1:e===document.scrollingElement}function oF(e){const n={x:0,y:0},t=aF(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 Sre={x:.2,y:.2};function Cre(e,n,t,i,r){let{top:a,left:o,right:l,bottom:f}=t;i===void 0&&(i=10),r===void 0&&(r=Sre);const{isTop:c,isBottom:h,isLeft:d,isRight:p}=oF(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=Ti.Backward,b.y=i*Math.abs((n.top+w.height-a)/w.height)):!h&&f>=n.bottom-w.height&&(v.y=Ti.Forward,b.y=i*Math.abs((n.bottom-w.height-f)/w.height)),!p&&l>=n.right-w.width?(v.x=Ti.Forward,b.x=i*Math.abs((n.right-w.width-l)/w.width)):!d&&o<=n.left+w.width&&(v.x=Ti.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 sF(e){return e.reduce((n,t)=>Uf(n,RS(t)),Wa)}function Ore(e){return e.reduce((n,t)=>n+iF(t),0)}function jre(e){return e.reduce((n,t)=>n+rF(t),0)}function lF(e,n){if(n===void 0&&(n=Wc),!e)return;const{top:t,left:i,bottom:r,right:a}=n(e);tF(e)&&(r<=0||a<=0||t>=window.innerHeight||i>=window.innerWidth)&&e.scrollIntoView({block:"center",inline:"center"})}const Ere=[["x",["left","right"],Ore],["y",["top","bottom"],jre]];class e9{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=sF(i);this.rect={...n},this.width=n.width,this.height=n.height;for(const[a,o,l]of Ere)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 Tre(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 VT(e){e.preventDefault()}function Mre(e){e.stopPropagation()}var at;(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"})(at||(at={}));const uF={start:[at.Space,at.Enter],cancel:[at.Esc],end:[at.Space,at.Enter,at.Tab]},Dre=(e,n)=>{let{currentCoordinates:t}=n;switch(e.code){case at.Right:return{...t,x:t.x+25};case at.Left:return{...t,x:t.x-25};case at.Down:return{...t,y:t.y+25};case at.Up:return{...t,y:t.y-25}}};class n9{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&&lF(i),t(Wa)}handleKeyDown(n){if(Jy(n)){const{active:t,context:i,options:r}=this.props,{keyboardCodes:a=uF,coordinateGetter:o=Dre,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}:Wa;this.referenceCoordinates||(this.referenceCoordinates=h);const d=o(n,{active:t,context:i.current,currentCoordinates:h});if(d){const p=Qh(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}=oF(w),M=Are(w),N={x:Math.min(k===at.Right?M.right-M.width/2:M.right,Math.max(k===at.Right?M.left:M.left+M.width/2,d.x)),y:Math.min(k===at.Down?M.bottom-M.height/2:M.bottom,Math.max(k===at.Down?M.top:M.top+M.height/2,d.y))},H=k===at.Right&&!C||k===at.Left&&!x,P=k===at.Down&&!E||k===at.Up&&!_;if(H&&N.x!==d.x){const z=w.scrollLeft+p.x,F=k===at.Right&&z<=O.x||k===at.Left&&z>=j.x;if(F&&!p.y){w.scrollTo({left:z,behavior:l});return}F?v.x=w.scrollLeft-z:v.x=k===at.Right?w.scrollLeft-O.x:w.scrollLeft-j.x,v.x&&w.scrollBy({left:-v.x,behavior:l});break}else if(P&&N.y!==d.y){const z=w.scrollTop+p.y,F=k===at.Down&&z<=O.y||k===at.Up&&z>=j.y;if(F&&!p.x){w.scrollTo({top:z,behavior:l});return}F?v.y=w.scrollTop-z:v.y=k===at.Down?w.scrollTop-O.y:w.scrollTop-j.y,v.y&&w.scrollBy({top:-v.y,behavior:l});break}}this.handleMove(n,Uf(Qh(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()}}n9.activators=[{eventName:"onKeyDown",handler:(e,n,t)=>{let{keyboardCodes:i=uF,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 WT(e){return!!(e&&"distance"in e)}function GT(e){return!!(e&&"delay"in e)}class t9{constructor(n,t,i){var r;i===void 0&&(i=Tre(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=Ig(a))!=null?r:Wa,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,VT),this.windowListeners.add(fa.VisibilityChange,this.handleCancel),this.windowListeners.add(fa.ContextMenu,VT),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(GT(t)){this.timeoutId=setTimeout(this.handleStart,t.delay),this.handlePending(t);return}if(WT(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,Mre,{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=Ig(n))!=null?t:Wa,c=Qh(r,f);if(!i&&l){if(WT(l)){if(l.tolerance!=null&&Lk(c,l.tolerance))return this.handleCancel();if(Lk(c,l.distance))return this.handleStart()}if(GT(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===at.Esc&&this.handleCancel()}removeTextSelection(){var n;(n=this.document.getSelection())==null||n.removeAllRanges()}}const Rre={cancel:{name:"pointercancel"},move:{name:"pointermove"},end:{name:"pointerup"}};class i9 extends t9{constructor(n){const{event:t}=n,i=Vc(t.target);super(n,Rre,i)}}i9.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 Pre={move:{name:"mousemove"},end:{name:"mouseup"}};var PS;(function(e){e[e.RightClick=2]="RightClick"})(PS||(PS={}));class Nre extends t9{constructor(n){super(n,Pre,Vc(n.event.target))}}Nre.activators=[{eventName:"onMouseDown",handler:(e,n)=>{let{nativeEvent:t}=e,{onActivation:i}=n;return t.button===PS.RightClick?!1:(i==null||i({event:t}),!0)}}];const Ik={cancel:{name:"touchcancel"},move:{name:"touchmove"},end:{name:"touchend"}};class $re extends t9{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(){}}}$re.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 Fg;(function(e){e[e.TreeOrder=0]="TreeOrder",e[e.ReversedTreeOrder=1]="ReversedTreeOrder"})(Fg||(Fg={}));function zre(e){let{acceleration:n,activator:t=Mh.Pointer,canScroll:i,draggingRect:r,enabled:a,interval:o=5,order:l=Fg.TreeOrder,pointerCoordinates:f,scrollableAncestors:c,scrollableAncestorRects:h,delta:d,threshold:p}=e;const v=Ire({delta:d,disabled:!a}),[b,w]=Xie(),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,N=k.current.y*_.current.y;j.scrollBy(M,N)},[]),O=A.useMemo(()=>l===Fg.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),N=h[M];if(!N)continue;const{direction:H,speed:P}=Cre(j,N,C,n,p);for(const z of["x","y"])v[z][H[z]]||(P[z]=0,H[z]=0);if(P.x>0||P.y>0){w(),x.current=j,b(E,o),k.current=P,_.current=H;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 Lre={x:{[Ti.Backward]:!1,[Ti.Forward]:!1},y:{[Ti.Backward]:!1,[Ti.Forward]:!1}};function Ire(e){let{delta:n,disabled:t}=e;const i=Lg(n);return np(r=>{if(t||!i||!r)return Lre;const a={x:Math.sign(n.x-i.x),y:Math.sign(n.y-i.y)};return{x:{[Ti.Backward]:r.x[Ti.Backward]||a.x===-1,[Ti.Forward]:r.x[Ti.Forward]||a.x===1},y:{[Ti.Backward]:r.y[Ti.Backward]||a.y===-1,[Ti.Forward]:r.y[Ti.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 np(r=>{var a;return n==null?null:(a=i??r)!=null?a:null},[i,n])}function Fre(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 Jh;(function(e){e[e.Always=0]="Always",e[e.BeforeDragging=1]="BeforeDragging",e[e.WhileDragging=2]="WhileDragging"})(Jh||(Jh={}));var NS;(function(e){e.Optimized="optimized"})(NS||(NS={}));const YT=new Map;function qre(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=Zh(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=np(_=>{if(d&&!t)return YT;if(!_||_===YT||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 e9(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 Jh.Always:return!1;case Jh.BeforeDragging:return t;default:return!t}}}function r9(e,n){return np(t=>e?t||(typeof n=="function"?n(e):e):null,[n,e])}function Hre(e,n){return r9(e,n)}function Ure(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 Vre(e){return new e9(Wc(e),e)}function KT(e,n,t){n===void 0&&(n=Vre);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=Ure({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 Va(()=>{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 Wre(e){const n=r9(e);return eF(e,n)}const XT=[];function Gre(e){const n=A.useRef(e),t=np(i=>e?i&&i!==XT&&e&&n.current&&e.parentNode===n.current.parentNode?i:e0(e):XT,[e]);return A.useEffect(()=>{n.current=e},[e]),t}function Yre(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,RS(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,RS(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)=>Uf(a,o),Wa):sF(e):Wa,[e,n])}function ZT(e,n){n===void 0&&(n=[]);const t=A.useRef(null);return A.useEffect(()=>{t.current=null},n),A.useEffect(()=>{const i=e!==Wa;i&&!t.current&&(t.current=e),!i&&t.current&&(t.current=null)},[e]),t.current?Qh(e,t.current):Wa}function Kre(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 Xre(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 fF(e){return A.useMemo(()=>e?kre(e):null,[e])}const QT=[];function Zre(e,n){n===void 0&&(n=Wc);const[t]=e,i=fF(t?dr(t):null),[r,a]=A.useState(QT);function o(){a(()=>e.length?e.map(f=>aF(f)?i:new e9(n(f),f)):QT)}const l=n0({callback:o});return Va(()=>{l==null||l.disconnect(),o(),e.forEach(f=>l==null?void 0:l.observe(f))},[e]),r}function cF(e){if(!e)return null;if(e.children.length>1)return e;const n=e.children[0];return ep(n)?n:e}function Qre(e){let{measure:n}=e;const[t,i]=A.useState(null),r=A.useCallback(c=>{for(const{target:h}of c)if(ep(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=cF(c);a==null||a.disconnect(),h&&(a==null||a.observe(h)),i(h?n(h):null)},[n,a]),[l,f]=zg(o);return A.useMemo(()=>({nodeRef:l,rect:t,setRef:f}),[t,l,f])}const Jre=[{sensor:i9,options:{}},{sensor:n9,options:{}}],eae={current:{}},bg={draggable:{measure:UT},droppable:{measure:UT,strategy:Jh.WhileDragging,frequency:NS.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 nae={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:Bg},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:bg,measureDroppableContainers:Bg,windowRect:null,measuringScheduled:!1},dF={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:Bg,draggableNodes:new Map,over:null,measureDroppableContainers:Bg},ip=A.createContext(dF),hF=A.createContext(nae);function tae(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new Dh}}}function iae(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 rae(e){let{disabled:n}=e;const{active:t,activatorEvent:i,draggableNodes:r}=A.useContext(ip),a=Lg(i),o=Lg(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=Jie(h);if(d){d.focus();break}}})}},[i,n,r,o,a]),null}function mF(e,n){let{transform:t,...i}=n;return e!=null&&e.length?e.reduce((r,a)=>a({transform:r,...i}),t):t}function aae(e){return A.useMemo(()=>({draggable:{...bg.draggable,...e==null?void 0:e.draggable},droppable:{...bg.droppable,...e==null?void 0:e.droppable},dragOverlay:{...bg.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 oae(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;Va(()=>{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=eF(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=tF(c);p&&p.scrollBy({top:d.y,left:d.x})}},[n,o,l,i,t])}const t0=A.createContext({...Wa,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 sae=A.memo(function(n){var t,i,r,a;let{id:o,accessibility:l,autoScroll:f=!0,children:c,sensors:h=Jre,collisionDetection:d=JB,measuring:p,modifiers:v,...b}=n;const w=A.useReducer(iae,void 0,tae),[k,_]=w,[C,x]=are(),[E,O]=A.useState(Ys.Uninitialized),j=E===Ys.Initialized,{draggable:{active:M,nodes:N,translate:H},droppable:{containers:P}}=k,z=M!=null?N.get(M):null,F=A.useRef({initial:null,translated:null}),G=A.useMemo(()=>{var yn;return M!=null?{id:M,data:(yn=z==null?void 0:z.data)!=null?yn:eae,rect:F}:null},[M,z]),U=A.useRef(null),[$,R]=A.useState(null),[I,q]=A.useState(null),Y=Zh(b,Object.values(b)),D=tp("DndDescribedBy",o),W=A.useMemo(()=>P.getEnabled(),[P]),V=aae(p),{droppableRects:L,measureDroppableContainers:X,measuringScheduled:ee}=qre(W,{dragging:j,dependencies:[H.x,H.y],config:V.droppable}),re=Bre(N,M),se=A.useMemo(()=>I?Ig(I):null,[I]),ye=bn(),ae=Hre(re,V.draggable.measure);oae({activeNode:M!=null?N.get(M):null,config:ye.layoutShiftCompensation,initialRect:ae,measure:V.draggable.measure});const le=KT(re,V.draggable.measure,ae),_e=KT(re?re.parentElement:null),ne=A.useRef({activatorEvent:null,active:null,activeNode:re,collisionRect:null,collisions:null,droppableRects:L,draggableNodes:N,draggingNode:null,draggingNodeRect:null,droppableContainers:P,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),ze=P.getNodeFor((t=ne.current.over)==null?void 0:t.id),we=Qre({measure:V.dragOverlay.measure}),Ce=(i=we.nodeRef.current)!=null?i:re,Ne=j?(r=we.rect)!=null?r:le:null,ge=!!(we.nodeRef.current&&we.rect),xe=Wre(ge?null:le),Pe=fF(Ce?dr(Ce):null),ue=Gre(j?ze??re:null),Be=Zre(ue),Ge=mF(v,{transform:{x:H.x-xe.x,y:H.y-xe.y,scaleX:1,scaleY:1},activatorEvent:I,active:G,activeNodeRect:le,containerNodeRect:_e,draggingNodeRect:Ne,over:ne.current.over,overlayNodeRect:we.rect,scrollableAncestors:ue,scrollableAncestorRects:Be,windowRect:Pe}),Ve=se?Uf(se,H):null,Xe=Yre(ue),Qe=ZT(Xe),ie=ZT(Xe,[le]),he=Uf(Ge,Qe),Ye=Ne?yre(Ne,Ge):null,Je=G&&Ye?d({active:G,collisionRect:Ye,droppableRects:L,droppableContainers:W,pointerCoordinates:Ve}):null,Se=ZB(Je,"id"),[tn,cn]=A.useState(null),On=ge?Ge:Uf(Ge,ie),mn=vre(On,(a=tn==null?void 0:tn.rect)!=null?a:null,le),an=A.useRef(null),en=A.useCallback((yn,wn)=>{let{sensor:it,options:_t}=wn;if(U.current==null)return;const Le=N.get(U.current);if(!Le)return;const qe=yn.nativeEvent,Nn=new it({active:U.current,activeNode:Le,event:qe,options:_t,context:ne,onAbort(Mn){if(!N.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(!N.get(Mn))return;const{onDragPending:Wn}=Y.current,xt={id:Mn,constraint:nn,initialCoordinates:rn,offset:on};Wn==null||Wn(xt),C({type:"onDragPending",event:xt})},onStart(Mn){const nn=U.current;if(nn==null)return;const rn=N.get(nn);if(!rn)return;const{onDragStart:on}=Y.current,Bn={activatorEvent:qe,active:{id:nn,data:rn.data,rect:F}};Qs.unstable_batchedUpdates(()=>{on==null||on(Bn),O(Ys.Initializing),_({type:ki.DragStart,initialCoordinates:Mn,active:nn}),C({type:"onDragStart",event:Bn}),R(an.current),q(qe)})},onMove(Mn){_({type:ki.DragMove,coordinates:Mn})},onEnd:st(ki.DragEnd),onCancel:st(ki.DragCancel)});an.current=Nn;function st(Mn){return async function(){const{active:rn,collisions:on,over:Bn,scrollAdjustedTranslate:Wn}=ne.current;let xt=null;if(rn&&Wn){const{cancelDrop:Cn}=Y.current;xt={activatorEvent:qe,active:rn,collisions:on,delta:Wn,over:Bn},Mn===ki.DragEnd&&typeof Cn=="function"&&await Promise.resolve(Cn(xt))&&(Mn=ki.DragCancel)}U.current=null,Qs.unstable_batchedUpdates(()=>{_({type:Mn}),O(Ys.Uninitialized),cn(null),R(null),q(null),an.current=null;const Cn=Mn===ki.DragEnd?"onDragEnd":"onDragCancel";if(xt){const An=Y.current[Cn];An==null||An(xt),C({type:Cn,event:xt})}})}}},[N]),Rn=A.useCallback((yn,wn)=>(it,_t)=>{const Le=it.nativeEvent,qe=N.get(_t);if(U.current!==null||!qe||Le.dndKit||Le.defaultPrevented)return;const Nn={active:qe};yn(it,wn.options,Nn)===!0&&(Le.dndKit={capturedBy:wn.sensor},U.current=_t,en(it,wn))},[N,en]),De=Fre(h,Rn);Kre(h),Va(()=>{le&&E===Ys.Initializing&&O(Ys.Initialized)},[le,E]),A.useEffect(()=>{const{onDragMove:yn}=Y.current,{active:wn,activatorEvent:it,collisions:_t,over:Le}=ne.current;if(!wn||!it)return;const qe={active:wn,activatorEvent:it,collisions:_t,delta:{x:he.x,y:he.y},over:Le};Qs.unstable_batchedUpdates(()=>{yn==null||yn(qe),C({type:"onDragMove",event:qe})})},[he.x,he.y]),A.useEffect(()=>{const{active:yn,activatorEvent:wn,collisions:it,droppableContainers:_t,scrollAdjustedTranslate:Le}=ne.current;if(!yn||U.current==null||!wn||!Le)return;const{onDragOver:qe}=Y.current,Nn=_t.get(Se),st=Nn&&Nn.rect.current?{id:Nn.id,rect:Nn.rect.current,data:Nn.data,disabled:Nn.disabled}:null,Mn={active:yn,activatorEvent:wn,collisions:it,delta:{x:Le.x,y:Le.y},over:st};Qs.unstable_batchedUpdates(()=>{cn(st),qe==null||qe(Mn),C({type:"onDragOver",event:Mn})})},[Se]),Va(()=>{ne.current={activatorEvent:I,active:G,activeNode:re,collisionRect:Ye,collisions:Je,droppableRects:L,draggableNodes:N,draggingNode:Ce,draggingNodeRect:Ne,droppableContainers:P,over:tn,scrollableAncestors:ue,scrollAdjustedTranslate:he},F.current={initial:Ne,translated:Ye}},[G,re,Je,Ye,N,Ce,Ne,L,P,tn,ue,he]),zre({...ye,delta:H,draggingRect:Ye,pointerCoordinates:Ve,scrollableAncestors:ue,scrollableAncestorRects:Be});const Fe=A.useMemo(()=>({active:G,activeNode:re,activeNodeRect:le,activatorEvent:I,collisions:Je,containerNodeRect:_e,dragOverlay:we,draggableNodes:N,droppableContainers:P,droppableRects:L,over:tn,measureDroppableContainers:X,scrollableAncestors:ue,scrollableAncestorRects:Be,measuringConfiguration:V,measuringScheduled:ee,windowRect:Pe}),[G,re,le,I,Je,_e,we,N,P,L,tn,X,ue,Be,V,ee,Pe]),jn=A.useMemo(()=>({activatorEvent:I,activators:De,active:G,activeNodeRect:le,ariaDescribedById:{draggable:D},dispatch:_,draggableNodes:N,over:tn,measureDroppableContainers:X}),[I,De,G,le,_,D,N,tn,X]);return Q.createElement(XB.Provider,{value:x},Q.createElement(ip.Provider,{value:jn},Q.createElement(hF.Provider,{value:Fe},Q.createElement(t0.Provider,{value:mn},c)),Q.createElement(rae,{disabled:(l==null?void 0:l.restoreFocus)===!1})),Q.createElement(lre,{...l,hiddenTextDescribedById:D}));function bn(){const yn=($==null?void 0:$.autoScrollEnabled)===!1,wn=typeof f=="object"?f.enabled===!1:f===!1,it=j&&!yn&&!wn;return typeof f=="object"?{...f,enabled:it}:{enabled:it}}}),lae=A.createContext(null),JT="button",uae="Draggable";function fae(e){let{id:n,data:t,disabled:i=!1,attributes:r}=e;const a=tp(uae),{activators:o,activatorEvent:l,active:f,activeNodeRect:c,ariaDescribedById:h,draggableNodes:d,over:p}=A.useContext(ip),{role:v=JT,roleDescription:b="draggable",tabIndex:w=0}=r??{},k=(f==null?void 0:f.id)===n,_=A.useContext(k?t0:lae),[C,x]=zg(),[E,O]=zg(),j=Xre(o,n),M=Zh(t);Va(()=>(d.set(n,{id:n,key:a,node:C,activatorNode:E,data:M}),()=>{const H=d.get(n);H&&H.key===a&&d.delete(n)}),[d,n]);const N=A.useMemo(()=>({role:v,tabIndex:w,"aria-disabled":i,"aria-pressed":k&&v===JT?!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:j,node:C,over:p,setNodeRef:x,setActivatorNodeRef:O,transform:_}}function pF(){return A.useContext(hF)}const cae="Droppable",dae={timeout:25};function hae(e){let{data:n,disabled:t=!1,id:i,resizeObserverConfig:r}=e;const a=tp(cae),{active:o,dispatch:l,over:f,measureDroppableContainers:c}=A.useContext(ip),h=A.useRef({disabled:t}),d=A.useRef(!1),p=A.useRef(null),v=A.useRef(null),{disabled:b,updateMeasurementsFor:w,timeout:k}={...dae,...r},_=Zh(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((N,H)=>{x&&(H&&(x.unobserve(H),d.current=!1),N&&x.observe(N))},[x]),[O,j]=zg(E),M=Zh(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 mae(e){let{animation:n,children:t}=e;const[i,r]=A.useState(null),[a,o]=A.useState(null),l=Lg(t);return!t&&!i&&l&&r(l),Va(()=>{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 pae={x:0,y:0,scaleX:1,scaleY:1};function vae(e){let{children:n}=e;return Q.createElement(ip.Provider,{value:dF},Q.createElement(t0.Provider,{value:pae},n))}const gae={position:"fixed",touchAction:"none"},yae=e=>Jy(e)?"transform 250ms ease":void 0,bae=A.forwardRef((e,n)=>{let{as:t,activatorEvent:i,adjustScale:r,children:a,className:o,rect:l,style:f,transform:c,transition:h=yae}=e;if(!l)return null;const d=r?c:{...c,scaleX:1,scaleY:1},p={...gae,width:l.width,height:l.height,top:l.top,left:l.left,transform:po.Transform.toString(d),transformOrigin:r&&i?fre(i,l):void 0,transition:typeof h=="function"?h(i):h,...f};return Q.createElement(t,{className:o,style:p,ref:n},a)}),wae=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)}},kae=e=>{let{transform:{initial:n,final:t}}=e;return[{transform:po.Transform.toString(n)},{transform:po.Transform.toString(t)}]},_ae={duration:250,easing:"ease",keyframes:kae,sideEffects:wae({styles:{active:{opacity:"0"}}})};function xae(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=cF(o);if(!c)return;const{transform:h}=dr(o).getComputedStyle(o),d=nF(h);if(!d)return;const p=typeof n=="function"?n:Sae(n);return lF(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 Sae(e){const{duration:n,easing:t,sideEffects:i,keyframes:r}={..._ae,...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 eM=0;function Cae(e){return A.useMemo(()=>{if(e!=null)return eM++,eM},[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:C,scrollableAncestors:x,scrollableAncestorRects:E,windowRect:O}=pF(),j=A.useContext(t0),M=Cae(d==null?void 0:d.id),N=mF(o,{activatorEvent:h,active:d,activeNodeRect:p,containerNodeRect:v,draggingNodeRect:k.rect,over:_,overlayNodeRect:k.rect,scrollableAncestors:x,scrollableAncestorRects:E,transform:j,windowRect:O}),H=r9(p),P=xae({config:i,draggableNodes:b,droppableContainers:w,measuringConfiguration:C}),z=H?k.setRef:void 0;return Q.createElement(vae,null,Q.createElement(mae,{animation:P},d&&M?Q.createElement(bae,{key:M,id:d.id,ref:z,as:l,activatorEvent:h,adjustScale:n,className:f,transition:a,rect:H,style:{zIndex:c,...r},transform:N},t):null))});function qg(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 Iv(e){return e!==null&&e>=0}function jae(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=Mae(t,o,r);if(o===r){const c=t[a];return c?{x:rr&&o<=a?{x:-l.width-f,y:0,...Bv}:o=a?{x:l.width+f,y:0,...Bv}:{x:0,y:0,...Bv}};function Mae(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=qg(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}},Fv={scaleX:1,scaleY:1},gF=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,...Fv}:r=o?{x:0,y:l.height+f,...Fv}:{x:0,y:0,...Fv}};function Dae(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=!jae(v,_.current),x=k!==-1&&w===-1||C,E=Eae(a);Va(()=>{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:Oae(v,f),strategy:r}),[w,d,E.draggable,E.droppable,x,v,k,f,p,r]);return Q.createElement(bF.Provider,{value:O},n)}const Rae=e=>{let{id:n,items:t,activeIndex:i,overIndex:r}=e;return qg(t,i,r).indexOf(n)},Pae=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},Nae={duration:200,easing:"ease"},wF="transform",$ae=po.Transition.toString({property:wF,duration:0,easing:"linear"}),zae={roleDescription:"sortable"};function Lae(e){let{disabled:n,index:t,node:i,rect:r}=e;const[a,o]=A.useState(null),l=A.useRef(t);return Va(()=>{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 kF(e){let{animateLayoutChanges:n=Pae,attributes:t,disabled:i,data:r,getNewIndex:a=Rae,id:o,strategy:l,resizeObserverConfig:f,transition:c=Nae}=e;const{items:h,containerId:d,activeIndex:p,disabled:v,disableTransforms:b,sortedRects:w,overIndex:k,useDragOverlay:_,strategy:C}=A.useContext(bF),x=Iae(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:N,isOver:H,setNodeRef:P}=hae({id:o,data:O,disabled:x.droppable,resizeObserverConfig:{updateMeasurementsFor:j,...f}}),{active:z,activatorEvent:F,activeNodeRect:G,attributes:U,setNodeRef:$,listeners:R,isDragging:I,over:q,setActivatorNodeRef:Y,transform:D}=fae({id:o,data:O,attributes:{...zae,...t},disabled:x.draggable}),W=Kie(P,$),V=!!z,L=V&&!b&&Iv(p)&&Iv(k),X=!_&&I,ee=X&&L?D:null,se=L?ee??(l??C)({rects:w,activeNodeRect:G,activeIndex:p,overIndex:k,index:E}):null,ye=Iv(p)&&Iv(k)?a({id:o,items:h,activeIndex:p,overIndex:k}):E,ae=z==null?void 0:z.id,le=A.useRef({activeId:ae,items:h,newIndex:ye,containerId:d}),_e=h!==le.current.items,ne=n({active:z,containerId:d,isDragging:I,isSorting:V,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=Lae({disabled:!ne,index:E,node:N,rect:M});return A.useEffect(()=>{V&&le.current.newIndex!==ye&&(le.current.newIndex=ye),d!==le.current.containerId&&(le.current.containerId=d),h!==le.current.items&&(le.current.items=h)},[V,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:z,activeIndex:p,attributes:U,data:O,rect:M,index:E,newIndex:ye,items:h,isOver:H,isSorting:V,isDragging:I,listeners:R,node:N,overIndex:k,over:q,setNodeRef:W,setActivatorNodeRef:Y,setDroppableNodeRef:P,setDraggableNodeRef:$,transform:ze??se,transition:we()};function we(){if(ze||_e&&le.current.newIndex===E)return $ae;if(!(X&&!Jy(F)||!c)&&(V||ne))return po.Transition.toString({...c,property:wF})}}function Iae(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 Hg(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=[at.Down,at.Right,at.Up,at.Left],Fae=(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 at.Down:i.topp.top&&f.push(d);break;case at.Left:i.left>p.left&&f.push(d);break;case at.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),_=_F(d,p),C=qae(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:Qh(E,x)}}}};function _F(e,n){return!Hg(e)||!Hg(n)?!1:e.data.current.sortable.containerId===n.data.current.sortable.containerId}function qae(e,n){return!Hg(e)||!Hg(n)||!_F(e,n)?!1:e.data.current.sortable.index=$?U:""+Array($+1-I.length).join(R)+U},E={s:x,z:function(U){var $=-U.utcOffset(),R=Math.abs($),I=Math.floor(R/60),q=R%60;return($<=0?"+":"-")+x(I,2,"0")+":"+x(q,2,"0")},m:function U($,R){if($.date()1)return U(D[0])}else{var W=$.name;j[W]=$,q=W}return!I&&q&&(O=q),q||!I&&O},P=function(U,$){if(N(U))return U.clone();var R=typeof $=="object"?$:{};return R.date=U,R.args=arguments,new F(R)},z=E;z.l=H,z.i=N,z.w=function(U,$){return P(U,{locale:$.$L,utc:$.$u,x:$.$x,$offset:$.$offset})};var F=(function(){function U(R){this.$L=H(R.locale,null,!0),this.parse(R),this.$x=this.$x||R.x||{},this[M]=!0}var $=U.prototype;return $.parse=function(R){this.$d=(function(I){var q=I.date,Y=I.utc;if(q===null)return new Date(NaN);if(z.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 W=D[2]-1||0,V=(D[7]||"0").substring(0,3);return Y?new Date(Date.UTC(D[1],W,D[3]||1,D[4]||0,D[5]||0,D[6]||0,V)):new Date(D[1],W,D[3]||1,D[4]||0,D[5]||0,D[6]||0,V)}}return new Date(q)})(R),this.init()},$.init=function(){var R=this.$d;this.$y=R.getFullYear(),this.$M=R.getMonth(),this.$D=R.getDate(),this.$W=R.getDay(),this.$H=R.getHours(),this.$m=R.getMinutes(),this.$s=R.getSeconds(),this.$ms=R.getMilliseconds()},$.$utils=function(){return z},$.isValid=function(){return this.$d.toString()!==w},$.isSame=function(R,I){var q=P(R);return this.startOf(I)<=q&&q<=this.endOf(I)},$.isAfter=function(R,I){return P(R)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 Gae({formatter:e,...n}){return(e||Wae)(n)}function Yae({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 xF({controlsRef:e,direction:n,levelIndex:t,rowIndex:i,cellIndex:r,size:a}){var f,c,h;const o=Yae({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")?xF({controlsRef:e,direction:n,levelIndex:o.levelIndex,cellIndex:o.cellIndex,rowIndex:o.rowIndex,size:a}):l.focus())}function Kae(e){switch(e){case"ArrowDown":return"down";case"ArrowUp":return"up";case"ArrowRight":return"right";case"ArrowLeft":return"left";default:return null}}function Xae(e){var n;return(n=e.current)==null?void 0:n.map(t=>t.map(i=>i.length))}function a9({controlsRef:e,levelIndex:n,rowIndex:t,cellIndex:i,event:r}){const a=Kae(r.key);a&&(r.preventDefault(),xF({controlsRef:e,direction:a,levelIndex:n,rowIndex:t,cellIndex:i,size:Xae(e)}))}function Qi(e){return e==null||e===""?e:Ie(e).format("YYYY-MM-DD")}function SF(e){return e==null||e===""?e:Ie(e).format("YYYY-MM-DD HH:mm:ss")}function zS({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 Zae={locale:"en",firstDayOfWeek:1,weekendDays:[0,6],labelSeparator:"–",consistentWeeks:!1},Qae=A.createContext(Zae);function yl(){const e=A.use(Qae),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 Jae({value:e,type:n,withTime:t}){const i=t?SF: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 CF({value:e,type:n,name:t,form:i,withTime:r=!1}){return y.jsx("input",{type:"hidden",value:Jae({value:e,type:n,withTime:r}),name:t,form:i})}CF.displayName="@mantine/dates/HiddenDatesInput";var AF={day:"m_396ce5cb"};const OF=(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(Dt,{...Ze({name:h||"Day",classes:AF,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:j,vars:l,varsResolver:OF,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=AF;i0.varsResolver=OF;i0.displayName="@mantine/dates/Day";function eoe({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 jF={weekday:"m_18a3eca"};const EF=(e,{size:n})=>({weekdaysRow:{"--wr-fz":ri(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:jF,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:b,vars:l,varsResolver:EF,rootSelector:"weekdaysRow"}),_=yl(),C=eoe({locale:_.getLocale(f),format:h,firstDayOfWeek:_.getFirstDayOfWeek(c)}).map((x,E)=>y.jsx(d,{...k("weekday"),children:x},E));return y.jsxs(ve,{component:"tr",...k("weekdaysRow"),...w,children:[v&&y.jsx(d,{...k("weekday"),children:"#"}),C]})});r0.classes=jF;r0.varsResolver=EF;r0.displayName="@mantine/dates/WeekdaysRow";function noe(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 toe(e,n=1){let t=Ie(e);for(;t.day()!==n;)t=t.subtract(1,"day");return t.format("YYYY-MM-DD")}function ioe({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=noe(i.add(+i.daysInMonth()-1,"day").format("YYYY-MM-DD"),n),o=[];let l=Ie(toe(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 o9(e,n){return Ie(e).format("YYYY-MM")===Ie(n).format("YYYY-MM")}function TF(e,n){return n?Ie(e).isAfter(Ie(n).subtract(1,"day"),"day"):!0}function MF(e,n){return n?Ie(e).isBefore(Ie(n).add(1,"day"),"day"):!0}function roe({dates:e,minDate:n,maxDate:t,getDayProps:i,excludeDate:r,hideOutsideDates:a,month:o}){const l=e.flat().filter(h=>{var d;return MF(h,t)&&TF(h,n)&&!(r!=null&&r(h))&&!((d=i==null?void 0:i(h))!=null&&d.disabled)&&(!a||o9(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 kg={exports:{}},aoe=kg.exports,tM;function ooe(){return tM||(tM=1,(function(e,n){(function(t,i){e.exports=i()})(aoe,(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)}}}))})(kg)),kg.exports}var soe=ooe();const loe=mt(soe);Ie.extend(loe);function uoe(e){return Ie(e.find(n=>Ie(n).day()===1)).isoWeek()}var DF={month:"m_cc9820d3",monthCell:"m_8f457cd5",weekNumber:"m_6cff9dea"};const foe={withCellSpacing:!0},RF=(e,{size:n})=>({weekNumber:{"--wn-fz":ri(n),"--wn-size":Pn(n,"wn-size")}}),rp=Re(e=>{const n=be("Month",foe,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:N,__onDayClick:H,__onDayMouseEnter:P,__preventFocus:z,__stopPropagation:F,withCellSpacing:G,size:U,highlightToday:$,withWeekNumbers:R,fullWidth:I,attributes:q,...Y}=n,D=Ze({name:f||"Month",classes:DF,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:q,vars:l,varsResolver:RF,rootSelector:"month"}),W=yl(),V=ioe({month:p,firstDayOfWeek:W.getFirstDayOfWeek(h),consistentWeeks:W.consistentWeeks}),L=roe({dates:V,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=V.map((se,ye)=>{const ae=se.map((le,_e)=>{const ne=!o9(le,p),ze=(O==null?void 0:O(le))||Ie(le).locale(c||W.locale).format("D MMMM YYYY"),we=b==null?void 0:b(le),Ce=Ie(le).isSame(L,"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":F||void 0,highlightToday:$,renderDay:C,date:le,size:U,weekend:W.getWeekendDays(v).includes(Ie(le).get("day")),outside:ne,hidden:x?ne:!1,"aria-label":ze,static:j,fullWidth:I,disabled:(w==null?void 0:w(le))||!MF(le,Qi(_))||!TF(le,Qi(k)),ref:Ne=>{Ne&&(M==null||M(ye,_e,Ne))},...we,onKeyDown:Ne=>{var ge;(ge=we==null?void 0:we.onKeyDown)==null||ge.call(we,Ne),N==null||N(Ne,{rowIndex:ye,cellIndex:_e,date:le})},onMouseEnter:Ne=>{var ge;(ge=we==null?void 0:we.onMouseEnter)==null||ge.call(we,Ne),P==null||P(Ne,le)},onClick:Ne=>{var ge;(ge=we==null?void 0:we.onClick)==null||ge.call(we,Ne),H==null||H(Ne,le)},onMouseDown:Ne=>{var ge;(ge=we==null?void 0:we.onMouseDown)==null||ge.call(we,Ne),z&&Ne.preventDefault()},tabIndex:z||!Ce?-1:0})},le.toString())});return y.jsxs("tr",{...D("monthRow"),children:[R&&y.jsx("td",{...D("weekNumber"),children:uoe(se)}),ae]},ye)});return y.jsxs(ve,{component:"table",...D("month"),size:U,"data-full-width":I||void 0,...Y,children:[!E&&y.jsx("thead",{...D("monthThead"),children:y.jsx(r0,{__staticSelector:f||"Month",locale:c,firstDayOfWeek:h,weekdayFormat:d,withWeekNumbers:R,size:U,classNames:X,styles:ee,unstyled:o,attributes:q})}),y.jsx("tbody",{...D("monthTbody"),children:re})]})});rp.classes=DF;rp.varsResolver=RF;rp.displayName="@mantine/dates/Month";var PF={pickerControl:"m_dc6a3c71"};const NF=(e,{size:n})=>({pickerControl:{"--dpc-fz":ri(n),"--dpc-size":Pn(n,"dpc-size")}}),ap=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(Dt,{...Ze({name:d||"PickerControl",classes:PF,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:w,vars:l,varsResolver:NF,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})});ap.classes=PF;ap.varsResolver=NF;ap.displayName="@mantine/dates/PickerControl";function $F({year:e,minDate:n,maxDate:t}){return!n&&!t?!1:!!(n&&Ie(e).isBefore(n,"year")||t&&Ie(e).isAfter(t,"year"))}function coe({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=>Ie().isSame(l,"year"));return o||r[0]}function zF(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",doe,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:N,...H}=n,P=Ze({name:b||"YearsList",classes:LF,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:N,vars:l,rootSelector:"yearsList"}),z=yl(),F=zF(f),G=coe({years:F,minDate:d,maxDate:p,getYearControlProps:v}),U=F.map(($,R)=>{const I=$.map((q,Y)=>{const D=v==null?void 0:v(q),W=Ie(q).isSame(G,"year");return y.jsx("td",{...P("yearsListCell"),"data-with-spacing":O||void 0,children:y.jsx(ap,{...P("yearsListControl"),size:M,unstyled:o,fullWidth:j,"data-mantine-stop-propagation":E||void 0,disabled:$F({year:q,minDate:d,maxDate:p}),ref:V=>{V&&(w==null||w(R,Y,V))},...D,onKeyDown:V=>{var L;(L=D==null?void 0:D.onKeyDown)==null||L.call(D,V),k==null||k(V,{rowIndex:R,cellIndex:Y,date:q})},onClick:V=>{var L;(L=D==null?void 0:D.onClick)==null||L.call(D,V),_==null||_(V,q)},onMouseEnter:V=>{var L;(L=D==null?void 0:D.onMouseEnter)==null||L.call(D,V),C==null||C(V,q)},onMouseDown:V=>{var L;(L=D==null?void 0:D.onMouseDown)==null||L.call(D,V),x&&V.preventDefault()},tabIndex:x||!W?-1:0,children:(D==null?void 0:D.children)??Ie(q).locale(z.getLocale(h)).format(c)})},Y)});return y.jsx("tr",{...P("yearsListRow"),children:I},R)});return y.jsx(ve,{component:"table",size:M,...P("yearsList"),"data-full-width":j||void 0,...H,children:y.jsx("tbody",{children:U})})});a0.classes=LF;a0.displayName="@mantine/dates/YearsList";function IF({month:e,minDate:n,maxDate:t}){return!n&&!t?!1:!!(n&&Ie(e).isBefore(n,"month")||t&&Ie(e).isAfter(t,"month"))}function hoe({months:e,minDate:n,maxDate:t,getMonthControlProps:i}){const r=e.flat().filter(l=>{var f;return!IF({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 moe(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 BF={monthsList:"m_2a6c32d",monthsListCell:"m_fe27622f"};const poe={monthsListFormat:"MMM",withCellSpacing:!0},o0=Re(e=>{const n=be("MonthsList",poe,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:N,...H}=n,P=Ze({name:f||"MonthsList",classes:BF,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:N,vars:l,rootSelector:"monthsList"}),z=yl(),F=moe(c),G=hoe({months:F,minDate:Qi(p),maxDate:Qi(v),getMonthControlProps:b}),U=F.map(($,R)=>{const I=$.map((q,Y)=>{const D=b==null?void 0:b(q),W=Ie(q).isSame(G,"month");return y.jsx("td",{...P("monthsListCell"),"data-with-spacing":O||void 0,children:y.jsx(ap,{...P("monthsListControl"),size:M,unstyled:o,fullWidth:j,__staticSelector:f||"MonthsList","data-mantine-stop-propagation":E||void 0,disabled:IF({month:q,minDate:Qi(p),maxDate:Qi(v)}),ref:V=>{V&&(w==null||w(R,Y,V))},...D,onKeyDown:V=>{var L;(L=D==null?void 0:D.onKeyDown)==null||L.call(D,V),k==null||k(V,{rowIndex:R,cellIndex:Y,date:q})},onClick:V=>{var L;(L=D==null?void 0:D.onClick)==null||L.call(D,V),_==null||_(V,q)},onMouseEnter:V=>{var L;(L=D==null?void 0:D.onMouseEnter)==null||L.call(D,V),C==null||C(V,q)},onMouseDown:V=>{var L;(L=D==null?void 0:D.onMouseDown)==null||L.call(D,V),x&&V.preventDefault()},tabIndex:x||!W?-1:0,children:(D==null?void 0:D.children)??Ie(q).locale(z.getLocale(d)).format(h)})},Y)});return y.jsx("tr",{...P("monthsListRow"),children:I},R)});return y.jsx(ve,{component:"table",size:M,...P("monthsList"),"data-full-width":j||void 0,...H,children:y.jsx("tbody",{children:U})})});o0.classes=BF;o0.displayName="@mantine/dates/MonthsList";var FF={calendarHeader:"m_730a79ed",calendarHeaderLevel:"m_f6645d97",calendarHeaderControl:"m_2351eeb0",calendarHeaderControlIcon:"m_367dc749"};const voe={hasNextLevel:!0,withNext:!0,withPrevious:!0,headerControlsOrder:["previous","level","next"]},qF=(e,{size:n})=>({calendarHeader:{"--dch-control-size":Pn(n,"dch-control-size"),"--dch-fz":ri(n)}}),ms=Re(e=>{const n=be("CalendarHeader",voe,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:N,__preventFocus:H,__stopPropagation:P,attributes:z,...F}=n,G=Ze({name:N||"CalendarHeader",classes:FF,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:z,vars:l,varsResolver:qF,rootSelector:"calendarHeader"}),U=H?Y=>Y.preventDefault():void 0,$=O&&A.createElement(Dt,{...G("calendarHeaderControl"),key:"previous","data-direction":"previous","aria-label":d,onClick:v,unstyled:o,onMouseDown:U,disabled:_,"data-disabled":_||void 0,tabIndex:H||_?-1:0,"data-mantine-stop-propagation":P||void 0},c||y.jsx(Ng,{...G("calendarHeaderControlIcon"),"data-direction":"previous",size:"45%"})),R=A.createElement(Dt,{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:H||!C?-1:0,"data-mantine-stop-propagation":P||void 0},w),I=E&&A.createElement(Dt,{...G("calendarHeaderControl"),key:"next","data-direction":"next","aria-label":h,onClick:p,unstyled:o,onMouseDown:U,disabled:k,"data-disabled":k||void 0,tabIndex:H||k?-1:0,"data-mantine-stop-propagation":P||void 0},f||y.jsx(Ng,{...G("calendarHeaderControlIcon"),"data-direction":"next",size:"45%"})),q=j.map(Y=>Y==="previous"?$:Y==="level"?R:Y==="next"?I:null);return y.jsx(ve,{...G("calendarHeader"),"data-full-width":M||void 0,...F,children:q})});ms.classes=FF;ms.varsResolver=qF;ms.displayName="@mantine/dates/CalendarHeader";function goe(e){const n=zF(e);return[n[0][0],n[3][0]]}const yoe={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:N,decadeLabelFormat:H,classNames:P,styles:z,unstyled:F,__staticSelector:G,__stopPropagation:U,size:$,fullWidth:R,attributes:I,...q}=be("DecadeLevel",yoe,e),Y=yl(),[D,W]=goe(n),V={__staticSelector:G||"DecadeLevel",classNames:P,styles:z,unstyled:F,size:$,attributes:I},L=typeof x=="boolean"?x:r?!Ie(W).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(ve,{"data-decade-level":!0,size:$,...q,children:[y.jsx(ms,{label:typeof H=="function"?H(D,W):`${ee(D,H)} – ${ee(W,H)}`,__preventFocus:p,__stopPropagation:U,nextIcon:v,previousIcon:b,nextLabel:w,previousLabel:k,onNext:_,onPrevious:C,nextDisabled:L,previousDisabled:X,hasNextLevel:!1,levelControlAriaLabel:O,withNext:j,withPrevious:M,headerControlsOrder:N,fullWidth:R,...V}),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:R,...V})]})});s0.classes={...a0.classes,...ms.classes};s0.displayName="@mantine/dates/DecadeLevel";const boe={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:N,withPrevious:H,headerControlsOrder:P,yearLabelFormat:z,__staticSelector:F,__stopPropagation:G,size:U,classNames:$,styles:R,unstyled:I,fullWidth:q,attributes:Y,...D}=be("YearLevel",boe,e),W=yl(),V={__staticSelector:F||"YearLevel",classNames:$,styles:R,unstyled:I,size:U,attributes:Y},L=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(ve,{"data-year-level":!0,size:U,...D,children:[y.jsx(ms,{label:typeof z=="function"?z(n):Ie(n).locale(t||W.locale).format(z),__preventFocus:p,__stopPropagation:G,nextIcon:v,previousIcon:b,nextLabel:w,previousLabel:k,onNext:_,onPrevious:C,onLevelClick:x,nextDisabled:L,previousDisabled:X,hasNextLevel:j,levelControlAriaLabel:M,withNext:N,withPrevious:H,headerControlsOrder:P,fullWidth:q,...V}),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,...V})]})});l0.classes={...ms.classes,...o0.classes};l0.displayName="@mantine/dates/YearLevel";const woe={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:N,nextLabel:H,previousLabel:P,onNext:z,onPrevious:F,onLevelClick:G,nextDisabled:U,previousDisabled:$,hasNextLevel:R,levelControlAriaLabel:I,withNext:q,withPrevious:Y,headerControlsOrder:D,monthLabelFormat:W,classNames:V,styles:L,unstyled:X,__staticSelector:ee,size:re,static:se,fullWidth:ye,attributes:ae,...le}=be("MonthLevel",woe,e),_e=yl(),ne={__staticSelector:ee||"MonthLevel",classNames:V,styles:L,unstyled:X,size:re,attributes:ae},ze=typeof U=="boolean"?U:c?!Ie(n).endOf("month").isBefore(c):!1,we=typeof $=="boolean"?$:f?!Ie(n).startOf("month").isAfter(f):!1;return y.jsxs(ve,{"data-month-level":!0,size:re,...le,children:[y.jsx(ms,{label:typeof W=="function"?W(n):Ie(n).locale(t||_e.locale).format(W),__preventFocus:O,__stopPropagation:j,nextIcon:M,previousIcon:N,nextLabel:H,previousLabel:P,onNext:z,onPrevious:F,onLevelClick:G,nextDisabled:ze,previousDisabled:we,hasNextLevel:R,levelControlAriaLabel:I,withNext:q,withPrevious:Y,headerControlsOrder:D,fullWidth:ye,...ne}),y.jsx(rp,{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={...rp.classes,...ms.classes};u0.displayName="@mantine/dates/MonthLevel";var HF={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(ve,{...Ze({name:f||"LevelsGroup",classes:HF,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=HF;bl.displayName="@mantine/dates/LevelsGroup";const koe={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:N,numberOfColumns:H,levelControlAriaLabel:P,decadeLabelFormat:z,size:F,fullWidth:G,vars:U,attributes:$,...R}=be("DecadeLevelGroup",koe,e),I=A.useRef([]),q=Array(H).fill(0).map((Y,D)=>{const W=Ie(n).add(D*10,"years").format("YYYY-MM-DD");return y.jsx(s0,{size:F,yearsListFormat:a,decade:W,withNext:D===H-1,withPrevious:D===0,decadeLabelFormat:z,__onControlClick:l,__onControlMouseEnter:f,__onControlKeyDown:(V,L)=>a9({levelIndex:D,rowIndex:L.rowIndex,cellIndex:L.cellIndex,event:V,controlsRef:I}),__getControlRef:(V,L,X)=>{Array.isArray(I.current[D])||(I.current[D]=[]),Array.isArray(I.current[D][V])||(I.current[D][V]=[]),I.current[D][V][L]=X},levelControlAriaLabel:typeof P=="function"?P(W):P,locale:t,minDate:i,maxDate:r,__preventFocus:h,__stopPropagation:N,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:$},D)});return y.jsx(bl,{classNames:E,styles:O,__staticSelector:M||"DecadeLevelGroup",size:F,unstyled:j,fullWidth:G,attributes:$,...R,children:q})});f0.classes={...bl.classes,...s0.classes};f0.displayName="@mantine/dates/DecadeLevelGroup";const _oe={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:N,__staticSelector:H,__stopPropagation:P,numberOfColumns:z,levelControlAriaLabel:F,yearLabelFormat:G,size:U,fullWidth:$,vars:R,attributes:I,...q}=be("YearLevelGroup",_oe,e),Y=A.useRef([]),D=Array(z).fill(0).map((W,V)=>{const L=Ie(n).add(V,"years").format("YYYY-MM-DD");return y.jsx(l0,{size:U,monthsListFormat:a,year:L,withNext:V===z-1,withPrevious:V===0,yearLabelFormat:G,__stopPropagation:P,__onControlClick:l,__onControlMouseEnter:f,__onControlKeyDown:(X,ee)=>a9({levelIndex:V,rowIndex:ee.rowIndex,cellIndex:ee.cellIndex,event:X,controlsRef:Y}),__getControlRef:(X,ee,re)=>{Array.isArray(Y.current[V])||(Y.current[V]=[]),Array.isArray(Y.current[V][X])||(Y.current[V][X]=[]),Y.current[V][X][ee]=re},levelControlAriaLabel:typeof F=="function"?F(L):F,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:N,__staticSelector:H||"YearLevelGroup",withCellSpacing:c,headerControlsOrder:O,fullWidth:$,attributes:I},V)});return y.jsx(bl,{classNames:j,styles:M,__staticSelector:H||"YearLevelGroup",size:U,unstyled:N,fullWidth:$,attributes:I,...q,children:D})});c0.classes={...l0.classes,...bl.classes};c0.displayName="@mantine/dates/YearLevelGroup";const xoe={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:N,onPrevious:H,onLevelClick:P,nextDisabled:z,previousDisabled:F,hasNextLevel:G,headerControlsOrder:U,classNames:$,styles:R,unstyled:I,numberOfColumns:q,levelControlAriaLabel:Y,monthLabelFormat:D,__staticSelector:W,__stopPropagation:V,size:L,static:X,fullWidth:ee,vars:re,attributes:se,...ye}=be("MonthLevelGroup",xoe,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:V,__onDayClick:b,__onDayMouseEnter:w,__onDayKeyDown:(we,Ce)=>a9({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:N,onPrevious:H,onLevelClick:P,nextDisabled:z,previousDisabled:F,hasNextLevel:G,classNames:$,styles:R,unstyled:I,__staticSelector:W||"MonthLevelGroup",size:L,static:X,withCellSpacing:k,highlightToday:_,withWeekNumbers:C,headerControlsOrder:U,fullWidth:ee,attributes:se},ne)});return y.jsx(bl,{classNames:$,styles:R,__staticSelector:W||"MonthLevelGroup",size:L,fullWidth:ee,attributes:se,...ye,children:le})});d0.classes={...bl.classes,...u0.classes};d0.displayName="@mantine/dates/MonthLevelGroup";var UF={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:N,form:H,type:P,onDropdownClose:z,withTime:F,...G}=eI("PickerInputBase",{size:"sm"},e),U=y.jsx(Vt.ClearButton,{onClick:_,unstyled:o,...C}),$=()=>{P==="range"&&Array.isArray(M)&&M[0]&&!M[1]&&_(),p.close()};return y.jsxs(y.Fragment,{children:[c==="modal"&&!O&&y.jsx(Sr,{opened:v,onClose:$,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:z,...l,disabled:(l==null?void 0:l.disabled)||c==="modal"||O,onChange:R=>{var I;R||((I=l==null?void 0:l.onClose)==null||I.call(l),$())},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:R=>{b==null||b(R),p.toggle()},__clearSection:U,__clearable:w&&E&&!O&&!j,__clearSectionMode:k,rightSection:x,...n,classNames:{...r,input:dn(UF.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(CF,{value:M,name:N,form:H,type:P,withTime:F})]})});Gc.classes=UF;Gc.displayName="@mantine/dates/PickerInputBase";const iM=e=>e==="range"?[null,null]:e==="multiple"?[]:null,rM=(e,n)=>{const t=n?SF:Qi;return Array.isArray(e)?e.map(t):t(e)};function s9({type:e,value:n,defaultValue:t,onChange:i,withTime:r=!1}){const a=A.useRef(e),[o,l,f]=Mi({value:rM(n,r),defaultValue:rM(t,r),finalValue:iM(e),onChange:i});let c=o;return a.current!==e&&(a.current=e,n===void 0&&(c=t!==void 0?t:iM(e),l(c))),[c,l,f]}function Bk(e,n){return e?e==="month"?0:e==="year"?1:2:n||0}function Soe(e){return e===0?"month":e===1?"year":"decade"}function nh(e,n,t){return Soe(Yo(Bk(e,0),Bk(n,0),Bk(t,2)))}const Coe={maxLevel:"decade",minLevel:"month",__updateDateOnYearSelect:!0,__updateDateOnMonthSelect:!0,enableKeyboardNavigation:!0},Yc=Re(e=>{const n=be("Calendar",Coe,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:N,firstDayOfWeek:H,weekdayFormat:P,weekendDays:z,getDayProps:F,excludeDate:G,renderDay:U,hideOutsideDates:$,hideWeekdays:R,getDayAriaLabel:I,monthLabelFormat:q,nextIcon:Y,previousIcon:D,__onDayClick:W,__onDayMouseEnter:V,withCellSpacing:L,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:ge,__staticSelector:xe,size:Pe,__preventFocus:ue,__stopPropagation:Be,onNextDecade:Ge,onPreviousDecade:Ve,onNextYear:Xe,onPreviousYear:Qe,onNextMonth:ie,onPreviousMonth:he,static:Ye,enableKeyboardNavigation:Je,fullWidth:Se,attributes:tn,ref:cn,...On}=n,{resolvedClassNames:mn,resolvedStyles:an}=Hi({classNames:ne,styles:ze,props:n}),[en,Rn]=Mi({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]=s9({type:"default",value:Qi(f),defaultValue:Qi(c),onChange:h});A.useImperativeHandle(M,()=>nn=>{Fe(nn)}),A.useImperativeHandle(N,()=>nn=>{Rn(nn)});const jn={__staticSelector:xe||"Calendar",styles:an,classNames:mn,unstyled:we,size:Pe,attributes:tn},bn=p||d||1,yn=A.useRef(null);if(yn.current===null){const nn=new Date;yn.current=Ce&&Ie(nn).isAfter(Ce)?Ce:Ie(nn).format("YYYY-MM-DD")}const wn=De||yn.current,it=()=>{const nn=Ie(wn).add(bn,"month").format("YYYY-MM-DD");ie==null||ie(nn),Fe(nn)},_t=()=>{const nn=Ie(wn).subtract(bn,"month").format("YYYY-MM-DD");he==null||he(nn),Fe(nn)},Le=()=>{const nn=Ie(wn).add(bn,"year").format("YYYY-MM-DD");Xe==null||Xe(nn),Fe(nn)},qe=()=>{const nn=Ie(wn).subtract(bn,"year").format("YYYY-MM-DD");Qe==null||Qe(nn),Fe(nn)},Nn=()=>{const nn=Ie(wn).add(10*bn,"year").format("YYYY-MM-DD");Ge==null||Ge(nn),Fe(nn)},st=()=>{const nn=Ie(wn).subtract(10*bn,"year").format("YYYY-MM-DD");Ve==null||Ve(nn),Fe(nn)},Mn=A.useRef(null);return A.useEffect(()=>{if(!Je||Ye)return;const nn=rn=>{var Wn;if(!((Wn=Mn.current)!=null&&Wn.contains(document.activeElement)))return;const on=rn.ctrlKey||rn.metaKey,Bn=rn.shiftKey;switch(rn.key){case"ArrowUp":on&&Bn?(rn.preventDefault(),st()):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,Ye,en,Le,qe,Nn,st]),y.jsxs(ve,{ref:Wt(Mn,cn),size:Pe,"data-calendar":!0,"data-full-width":Se||void 0,...On,children:[en==="month"&&y.jsx(d0,{month:wn,minDate:Ce,maxDate:Ne,firstDayOfWeek:H,weekdayFormat:P,weekendDays:z,getDayProps:F,excludeDate:G,renderDay:U,hideOutsideDates:$,hideWeekdays:R,getDayAriaLabel:I,onNext:it,onPrevious:_t,hasNextLevel:i!=="month",onLevelClick:()=>Rn("year"),numberOfColumns:d,locale:ge,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:W,__onDayMouseEnter:V,__preventFocus:ue,__stopPropagation:Be,static:Ye,withCellSpacing:L,highlightToday:X,withWeekNumbers:ee,headerControlsOrder:E,fullWidth:Se,...jn}),en==="year"&&y.jsx(c0,{year:wn,numberOfColumns:d,minDate:Ce,maxDate:Ne,monthsListFormat:re,getMonthControlProps:se,locale:ge,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:L,headerControlsOrder:E,fullWidth:Se,...jn}),en==="decade"&&y.jsx(f0,{decade:wn,minDate:Ce,maxDate:Ne,yearsListFormat:ae,getYearControlProps:le,locale:ge,onNext:Nn,onPrevious:st,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:L,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:N,onPreviousDecade:H,withCellSpacing:P,highlightToday:z,__updateDateOnYearSelect:F,__updateDateOnMonthSelect:G,__setDateRef:U,__setLevelRef:$,withWeekNumbers:R,headerControlsOrder:I,firstDayOfWeek:q,weekdayFormat:Y,weekendDays:D,getDayProps:W,excludeDate:V,renderDay:L,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:ge,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:N,onPreviousDecade:H,withCellSpacing:P,highlightToday:z,__updateDateOnYearSelect:F,__updateDateOnMonthSelect:G,__setDateRef:U,withWeekNumbers:R,headerControlsOrder:I,firstDayOfWeek:q,weekdayFormat:Y,weekendDays:D,getDayProps:W,excludeDate:V,renderDay:L,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:ge,locale:xe},others:Pe}}function aM(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 VF({type:e,level:n,value:t,defaultValue:i,onChange:r,allowSingleDateInRange:a,allowDeselect:o,onMouseLeave:l}){const[f,c]=s9({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,N)=>Ie(M).isAfter(Ie(N))?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?aM(O,[p,h]):f[0]&&f[1]?aM(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 WF={monthPickerRoot:"m_53c9e871",presetsList:"m_cccb8ff3",presetButton:"m_7b4fbf50"};const GF=(e,{size:n})=>({monthPickerRoot:{"--preset-font-size":ri(n)}}),Aoe={type:"default"},op=Re(e=>{const n=be("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:C,className:x,style:E,unstyled:O,size:j,attributes:M,onLevelChange:N,...H}=n,{calendarProps:P,others:z}=h0(H),F=A.useRef(null),G=A.useRef(null),U=Ze({name:c||"MonthPicker",classes:WF,props:n,className:x,style:E,classNames:t,styles:i,unstyled:O,attributes:M,rootSelector:C?"monthPickerRoot":void 0,varsResolver:GF,vars:r}),{onDateChange:$,onRootMouseLeave:R,onHoveredDateChange:I,getControlProps:q,setValue:Y}=VF({type:a,level:"month",allowDeselect:p,allowSingleDateInRange:d,value:l,defaultValue:o,onChange:f,onMouseLeave:v}),{resolvedClassNames:D,resolvedStyles:W}=Hi({classNames:t,styles:i,props:n}),V=y.jsx(Yc,{classNames:D,styles:W,size:j,...P,...C?{}:z,minLevel:"year",__updateDateOnMonthSelect:w??!1,__staticSelector:c||"MonthPicker",onMouseLeave:R,onMonthMouseEnter:(ee,re)=>I(re),onMonthSelect:ee=>{$(ee),b==null||b(ee)},getMonthControlProps:ee=>({...q(ee),...h==null?void 0:h(ee)}),onLevelChange:N,__setDateRef:F,__setLevelRef:G,__stopPropagation:_,attributes:M,...C?{}:{className:x,style:E}});if(!C)return V;const L=ee=>{var se,ye;const re=Array.isArray(ee)?ee[0]:ee;re!==void 0&&((se=F.current)==null||se.call(F,re),(ye=G.current)==null||ye.call(G,"year"),k?k(re):Y(ee))},X=C.map((ee,re)=>y.jsx(Dt,{...U("presetButton"),onClick:()=>L(ee.value),onMouseDown:se=>se.preventDefault(),"data-mantine-stop-propagation":_||void 0,children:ee.label},re));return y.jsxs(ve,{...U("monthPickerRoot"),size:j,...z,children:[y.jsx("div",{...U("presetsList"),children:X}),V]})});op.classes={...Yc.classes,...WF};op.varsResolver=GF;op.displayName="@mantine/dates/MonthPicker";var Ooe={datePickerRoot:"m_765a40cf",presetsList:"m_d6a681e1",presetButton:"m_acd30b22"};const YF=(e,{size:n})=>({datePickerRoot:{"--preset-font-size":ri(n)}}),joe={type:"default",defaultLevel:"month",numberOfColumns:1,size:"sm"},sp=Re(e=>{const n=be("DatePicker",joe,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:N}=h0(j),H=A.useRef(null),P=A.useRef(null),z=Ze({name:h||"DatePicker",classes:Ooe,props:n,className:k,style:_,classNames:f,styles:c,unstyled:C,attributes:O,rootSelector:w?"datePickerRoot":void 0,varsResolver:YF,vars:E}),{onDateChange:F,onRootMouseLeave:G,onHoveredDateChange:U,getControlProps:$,_value:R,setValue:I}=VF({type:N.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?{}:N,__stopPropagation:b,__setDateRef:H,__setLevelRef:P,minLevel:M.minLevel||"month",__onDayMouseEnter:(L,X)=>{U(X),p==null||p(L,X)},__onDayClick:(L,X)=>{F(X),d==null||d(L,X)},getDayProps:L=>{var X;return{...$(L),...(X=M.getDayProps)==null?void 0:X.call(M,L)}},getMonthControlProps:L=>{var X;return{selected:typeof R=="string"?o9(L,R):!1,...(X=M.getMonthControlProps)==null?void 0:X.call(M,L)}},getYearControlProps:L=>{var X;return{selected:typeof R=="string"?Ie(L).isSame(R,"year"):!1,...(X=M.getYearControlProps)==null?void 0:X.call(M,L)}},hideOutsideDates:M.hideOutsideDates??M.numberOfColumns!==1,attributes:O,...w?{}:{className:k,style:_}});if(!w)return D;const W=L=>{var ee,re;const X=Array.isArray(L)?L[0]:L;X!==void 0&&((ee=H.current)==null||ee.call(H,X),(re=P.current)==null||re.call(P,"month"),v?v(X):I(L))},V=w.map((L,X)=>y.jsx(Dt,{...z("presetButton"),onClick:()=>W(L.value),onMouseDown:ee=>ee.preventDefault(),"data-mantine-stop-propagation":b||void 0,children:L.label},X));return y.jsxs(ve,{...z("datePickerRoot"),size:x,...N,children:[y.jsx("div",{...z("presetsList"),children:V}),D]})});sp.classes=Yc.classes;sp.varsResolver=YF;sp.displayName="@mantine/dates/DatePicker";function KF({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]=vz(!1),[v,b]=s9({type:e,value:n,defaultValue:t,onChange:i}),w=Gae({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 Eoe={type:"default",size:"sm",valueFormat:"MMMM YYYY",closeOnChange:!0,sortDates:!0,dropdownType:"popover"},l9=Re(e=>{const n=be("MonthPickerInput",Eoe,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:N,resolvedStyles:H}=Hi({classNames:c,styles:h,props:n}),{calendarProps:P,others:z}=h0(M),{_value:F,setValue:G,formattedValue:U,dropdownHandlers:$,dropdownOpened:R,onClear:I,shouldClear:q}=KF({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:R,dropdownHandlers:$,classNames:N,styles:H,unstyled:d,onClear:I,shouldClear:q,value:F,size:v,variant:b,dropdownType:w,...z,attributes:j,type:t,__staticSelector:"MonthPickerInput",children:y.jsx(op,{...P,size:v,variant:b,type:t,value:F,defaultDate:P.defaultDate||(Array.isArray(F)?F[0]||zS({maxDate:C,minDate:_}):F||zS({maxDate:C,minDate:_})),onChange:G,locale:f,classNames:N,styles:H,unstyled:d,__staticSelector:"MonthPickerInput",__stopPropagation:w==="popover",minDate:_,maxDate:C,presets:O,attributes:j})})});l9.classes={...Gc.classes,...op.classes};l9.displayName="@mantine/dates/MonthPickerInput";const Toe={type:"default",size:"sm",valueFormat:"MMMM D, YYYY",closeOnChange:!0,sortDates:!0,dropdownType:"popover"},ku=Re(e=>{const n=be("DatePickerInput",Toe,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,...N}=n,{resolvedClassNames:H,resolvedStyles:P}=Hi({classNames:c,styles:h,props:n}),{calendarProps:z,others:F}=h0(N),{_value:G,setValue:U,formattedValue:$,dropdownHandlers:R,dropdownOpened:I,onClear:q,shouldClear:Y}=KF({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:$,dropdownOpened:I,dropdownHandlers:R,classNames:H,styles:P,unstyled:d,onClear:q,shouldClear:Y,value:G,size:v,variant:b,dropdownType:w,...F,type:t,__staticSelector:"DatePickerInput",attributes:M,children:y.jsx(sp,{...z,size:v,variant:b,type:t,value:G,defaultDate:D||zS({maxDate:C,minDate:_}),onChange:U,locale:f,classNames:H,styles:P,unstyled:d,__staticSelector:"DatePickerInput",__stopPropagation:w==="popover",minDate:_,maxDate:C,presets:j,attributes:M})})});ku.classes={...Gc.classes,...sp.classes};ku.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 Moe={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 gn=(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,...Moe[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 Doe=[["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"}]],LS=gn("outline","alert-triangle","AlertTriangle",Doe);/** + * @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:"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"}]],Poe=gn("outline","archive-off","ArchiveOff",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 Noe=[["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"}]],XF=gn("outline","archive","Archive",Noe);/** + * @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:"M9 14l-4 -4l4 -4",key:"svg-0"}],["path",{d:"M5 10h11a4 4 0 1 1 0 8h-1",key:"svg-1"}]],Ug=gn("outline","arrow-back-up","ArrowBackUp",$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 zoe=[["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"}]],Loe=gn("outline","arrows-horizontal","ArrowsHorizontal",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 Ioe=[["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=gn("outline","calendar-due","CalendarDue",Ioe);/** + * @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:"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"}]],Foe=gn("outline","calendar-off","CalendarOff",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:"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"}]],Hoe=gn("outline","calendar-stats","CalendarStats",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:"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"}]],Voe=gn("outline","calendar","Calendar",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 Woe=[["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"}]],Goe=gn("outline","chart-bar","ChartBar",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 Yoe=[["path",{d:"M5 12l5 5l10 -10",key:"svg-0"}]],nc=gn("outline","check","Check",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 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"}]],em=gn("outline","checkbox","Checkbox",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:"M6 9l6 6l6 -6",key:"svg-0"}]],IS=gn("outline","chevron-down","ChevronDown",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 Zoe=[["path",{d:"M9 6l6 6l-6 6",key:"svg-0"}]],BS=gn("outline","chevron-right","ChevronRight",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:"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"}]],oM=gn("outline","clipboard-list","ClipboardList",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:"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"}]],ese=gn("outline","clock-hour-4","ClockHour4",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:"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"}]],Vg=gn("outline","clock","Clock",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 tse=[["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"}]],ise=gn("outline","columns-3","Columns3",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 rse=[["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"}]],ase=gn("outline","copy","Copy",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 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"}]],sse=gn("outline","dice-5","Dice5",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:"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"}]],QF=gn("outline","dots-vertical","DotsVertical",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:"M4 17v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2 -2v-2",key:"svg-0"}],["path",{d:"M7 11l5 5l5 -5",key:"svg-1"}],["path",{d:"M12 4l0 12",key:"svg-2"}]],fse=gn("outline","download","Download",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:"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=gn("outline","edit","Edit",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 dse=[["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"}]],hse=gn("outline","external-link","ExternalLink",dse);/** + * @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:"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"}]],JF=gn("outline","grip-vertical","GripVertical",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:"M12 8l0 4l2 2",key:"svg-0"}],["path",{d:"M3.05 11a9 9 0 1 1 .5 4m-.5 5v-5h5",key:"svg-1"}]],vse=gn("outline","history","History",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:"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"}]],Wg=gn("outline","hourglass","Hourglass",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 yse=[["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"}]],FS=gn("outline","layout-kanban","LayoutKanban",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:"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"}]],wse=gn("outline","link","Link",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:"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"}]],eq=gn("outline","lock-open","LockOpen",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 _se=[["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=gn("outline","lock","Lock",_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 xse=[["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"}]],Sse=gn("outline","logout","Logout",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 Cse=[["path",{d:"M4 6l16 0",key:"svg-0"}],["path",{d:"M4 12l16 0",key:"svg-1"}],["path",{d:"M4 18l16 0",key:"svg-2"}]],Ase=gn("outline","menu-2","Menu2",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:"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"}]],nq=gn("outline","message-chatbot","MessageChatbot",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 jse=[["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"}]],Ese=gn("outline","message","Message",jse);/** + * @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:"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"}]],Mse=gn("outline","mood-smile","MoodSmile",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 Dse=[["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"}]],u9=gn("outline","palette","Palette",Dse);/** + * @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:"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"}]],Pse=gn("outline","paperclip","Paperclip",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:"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"}]],$se=gn("outline","pencil","Pencil",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 zse=[["path",{d:"M12 5l0 14",key:"svg-0"}],["path",{d:"M5 12l14 0",key:"svg-1"}]],tc=gn("outline","plus","Plus",zse);/** + * @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:"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"}]],qS=gn("outline","refresh","Refresh",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 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"}]],Bse=gn("outline","search","Search",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 Fse=[["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"}]],tq=gn("outline","send","Send",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 qse=[["path",{d:"M10.325 4.317c.426 -1.756 2.924 -1.756 3.35 0a1.724 1.724 0 0 0 2.573 1.066c1.543 -.94 3.31 .826 2.37 2.37a1.724 1.724 0 0 0 1.065 2.572c1.756 .426 1.756 2.924 0 3.35a1.724 1.724 0 0 0 -1.066 2.573c.94 1.543 -.826 3.31 -2.37 2.37a1.724 1.724 0 0 0 -2.572 1.065c-.426 1.756 -2.924 1.756 -3.35 0a1.724 1.724 0 0 0 -2.573 -1.066c-1.543 .94 -3.31 -.826 -2.37 -2.37a1.724 1.724 0 0 0 -1.065 -2.572c-1.756 -.426 -1.756 -2.924 0 -3.35a1.724 1.724 0 0 0 1.066 -2.573c-.94 -1.543 .826 -3.31 2.37 -2.37c1 .608 2.296 .07 2.572 -1.065",key:"svg-0"}],["path",{d:"M9 12a3 3 0 1 0 6 0a3 3 0 0 0 -6 0",key:"svg-1"}]],Hse=gn("outline","settings","Settings",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:"M16 18a2 2 0 0 1 2 2a2 2 0 0 1 2 -2a2 2 0 0 1 -2 -2a2 2 0 0 1 -2 2m0 -12a2 2 0 0 1 2 2a2 2 0 0 1 2 -2a2 2 0 0 1 -2 -2a2 2 0 0 1 -2 2m-7 12a6 6 0 0 1 6 -6a6 6 0 0 1 -6 -6a6 6 0 0 1 -6 6a6 6 0 0 1 6 6",key:"svg-0"}]],Vse=gn("outline","sparkles","Sparkles",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:"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"}]],Gse=gn("outline","tag","Tag",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:"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"}]],Kse=gn("outline","trash-x","TrashX",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:"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"}]],_u=gn("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 Zse=[["path",{d:"M3 17l6 -6l4 4l8 -8",key:"svg-0"}],["path",{d:"M14 7l7 0l0 7",key:"svg-1"}]],HS=gn("outline","trending-up","TrendingUp",Zse);/** + * @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:"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"}]],Jse=gn("outline","user-circle","UserCircle",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 ele=[["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"}]],nle=gn("outline","user-minus","UserMinus",ele);/** + * @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 tle=[["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"}]],ile=gn("outline","user-plus","UserPlus",tle);/** + * @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 rle=[["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"}]],ale=gn("outline","user-square","UserSquare",rle);/** + * @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 ole=[["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"}]],sle=gn("outline","user","User",ole);/** + * @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 lle=[["path",{d:"M18 6l-12 12",key:"svg-0"}],["path",{d:"M6 6l12 12",key:"svg-1"}]],_h=gn("outline","x","X",lle);function iq({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(Vn,{gap:"sm",children:[y.jsx(bu,{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(bu,{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(ya,{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(UC,{label:"Tags",value:w,onChange:k,data:r,clearable:!0,tabIndex:5,placeholder:"Enter para añadir; sugiere existentes",splitChars:[","," "]}),y.jsxs(Ue,{justify:"flex-end",gap:"xs",mt:"xs",children:[y.jsx(yt,{variant:"subtle",color:"gray",tabIndex:7,type:"button",onClick:o,children:"Cancelar"}),y.jsx(yt,{tabIndex:6,type:"submit",disabled:!c.trim(),children:n})]})]})})}function ule(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 f9=new Set(["blue","cyan","teal","green","lime","yellow","orange","red","pink","grape","violet","indigo","gray","dark"]);function c9(e){return/^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/.test(e)}function rq(e){return e?c9(e)?`color-mix(in srgb, ${e} 18%, var(--mantine-color-dark-6))`:f9.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 d9(e){return e?c9(e)?`color-mix(in srgb, ${e} 30%, var(--mantine-color-dark-4))`:f9.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 fle(e){return e?c9(e)?e:f9.has(e)?`var(--mantine-color-${e}-7)`:"var(--mantine-color-dark-3)":"var(--mantine-color-dark-3)"}const aq=[{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"}],cle=aq,dle=["blue","cyan","teal","green","lime","yellow","orange","red","pink","grape","violet","indigo"];function ic(e){return ule(e,dle)}const US=6e4,xh=60*US,Lf=24*xh,qv=7*Lf,Fk=30*Lf;function Zt(e){if(!Number.isFinite(e)||e<0)return"0m";if(e[C.id,C])),b=A.useCallback(async()=>{try{const C=await Lie(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 Iie(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 Bie(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(Vn,{gap:"xs",style:{height:"100%",minHeight:0},children:[y.jsx(xa,{viewportRef:p,style:{flex:1,minHeight:200},type:"auto",offsetScrollbars:!0,children:o?y.jsx(Ue,{justify:"center",p:"md",children:y.jsx(xi,{size:"sm"})}):r.length===0?y.jsx(Ee,{size:"sm",c:"dimmed",ta:"center",p:"md",children:"Sin mensajes aun. Escribe el primero."}):y.jsx(Vn,{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(Mt,{withBorder:!0,p:"xs",radius:"sm",bg:E?"var(--mantine-color-blue-light)":void 0,children:y.jsxs(Ue,{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(ve,{style:{flex:1,minWidth:0},children:[y.jsxs(Ue,{gap:6,wrap:"nowrap",justify:"space-between",children:[y.jsxs(Ue,{gap:6,wrap:"nowrap",children:[y.jsx(Ee,{size:"xs",fw:600,children:O}),y.jsx(Ee,{size:"xs",c:"dimmed",children:VS(C.created_at)})]}),E&&y.jsx(ii,{label:"Borrar",withArrow:!0,children:y.jsx(kt,{size:"xs",variant:"subtle",color:"red",onClick:()=>k(C.id),children:y.jsx(_u,{size:12})})})]}),y.jsx(Ee,{size:"sm",style:{whiteSpace:"pre-wrap",wordBreak:"break-word"},children:C.body})]})]})},C.id)})})}),y.jsxs(Ue,{gap:"xs",align:"flex-end",children:[y.jsx(bu,{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(ii,{label:"Enviar",withArrow:!0,children:y.jsx(kt,{size:"lg",variant:"filled",color:"blue",onClick:w,disabled:!f.trim()||h,"aria-label":"Enviar",children:y.jsx(tq,{size:16})})})]})]})}const sM=/(https?:\/\/[^\s<>()"']+)/gi;function qk(e,n){if(!n)return[];const t=[],i=new Set;let r;for(sM.lastIndex=0;(r=sM.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 mle(e){try{return new URL(e).hostname}catch{return e}}function ple({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(Vn,{gap:"xs",p:"md",align:"center",justify:"center",style:{minHeight:200},children:[y.jsx(Ee,{size:"sm",c:"dimmed",children:"Sin enlaces detectados"}),y.jsx(Ee,{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(Vn,{gap:6,p:4,children:t.map(a=>y.jsx(Mt,{withBorder:!0,p:"xs",radius:"sm",children:y.jsxs(Ue,{gap:"xs",wrap:"nowrap",justify:"space-between",align:"flex-start",children:[y.jsxs(ve,{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(Ue,{gap:4,wrap:"nowrap",align:"center",children:[y.jsx(hse,{size:12}),y.jsx("span",{children:mle(a.url)})]})}),y.jsx(Ee,{size:"xs",c:"dimmed",style:{wordBreak:"break-all"},children:a.url})]}),y.jsx(dt,{size:"xs",variant:"light",color:i(a.source),children:r(a.source)})]})},a.url))})}function vle({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(Ue,{align:"stretch",gap:"md",wrap:"nowrap",style:{minHeight:460},children:[y.jsx(ve,{style:{flex:"1 1 0",minWidth:320},children:y.jsx(iq,{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(ve,{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(Ese,{size:14}),children:"Chat"}),y.jsx(wi.Tab,{value:"links",leftSection:y.jsx(wse,{size:14}),children:"Enlaces"}),y.jsx(wi.Tab,{value:"files",leftSection:y.jsx(Pse,{size:14}),disabled:!0,children:"Archivos"})]}),y.jsxs(ve,{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(ve,{style:{flex:1,minHeight:0,display:"flex",flexDirection:"column",width:"100%"},children:y.jsx(hle,{cardId:c.id,users:n,currentUserId:t,onMessagesChange:f})})}),y.jsx(wi.Panel,{value:"links",children:y.jsx(ple,{card:c,messages:l})}),y.jsx(wi.Panel,{value:"files",children:y.jsx(Ee,{size:"sm",c:"dimmed",ta:"center",p:"md",children:"Proximamente: adjuntos de archivos."})})]})]})})]})}function gle(e,n){const t={};return(e[e.length-1]===""?[...e,""]:e).join((t.padRight?" ":"")+","+(t.padLeft===!1?"":" ")).trim()}const yle=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,ble=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,wle={};function lM(e,n){return(wle.jsx?ble:yle).test(e)}const kle=/[ \t\n\f\r]/g;function _le(e){return typeof e=="object"?e.type==="text"?uM(e.value):!1:uM(e)}function uM(e){return e.replace(kle,"")===""}class lp{constructor(n,t,i){this.normal=t,this.property=n,i&&(this.space=i)}}lp.prototype.normal={};lp.prototype.property={};lp.prototype.space=void 0;function oq(e,n){const t={},i={};for(const r of e)Object.assign(t,r.property),Object.assign(i,r.normal);return new lp(t,i,n)}function WS(e){return e.toLowerCase()}class Cr{constructor(n,t){this.attribute=t,this.property=n}}Cr.prototype.attribute="";Cr.prototype.booleanish=!1;Cr.prototype.boolean=!1;Cr.prototype.commaOrSpaceSeparated=!1;Cr.prototype.commaSeparated=!1;Cr.prototype.defined=!1;Cr.prototype.mustUseProperty=!1;Cr.prototype.number=!1;Cr.prototype.overloadedBoolean=!1;Cr.prototype.property="";Cr.prototype.spaceSeparated=!1;Cr.prototype.space=void 0;let xle=0;const qn=zu(),mi=zu(),GS=zu(),He=zu(),zt=zu(),Vf=zu(),Ir=zu();function zu(){return 2**++xle}const YS=Object.freeze(Object.defineProperty({__proto__:null,boolean:qn,booleanish:mi,commaOrSpaceSeparated:Ir,commaSeparated:Vf,number:He,overloadedBoolean:GS,spaceSeparated:zt},Symbol.toStringTag,{value:"Module"})),Hk=Object.keys(YS);class h9 extends Cr{constructor(n,t,i,r){let a=-1;if(super(n,t),fM(this,"space",r),typeof i=="number")for(;++a4&&t.slice(0,4)==="data"&&jle.test(n)){if(n.charAt(4)==="-"){const a=n.slice(5).replace(cM,Mle);i="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=n.slice(4);if(!cM.test(a)){let o=a.replace(Ole,Tle);o.charAt(0)!=="-"&&(o="-"+o),n="data"+o}}r=h9}return new r(i,n)}function Tle(e){return"-"+e.toLowerCase()}function Mle(e){return e.charAt(1).toUpperCase()}const Dle=oq([sq,Sle,fq,cq,dq],"html"),m9=oq([sq,Cle,fq,cq,dq],"svg");function Rle(e){return e.join(" ").trim()}var jf={},Uk,dM;function Ple(){if(dM)return Uk;dM=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 $=U.match(n);$&&(C+=$.length);var R=U.lastIndexOf(f);x=~R?U.length-R:x+U.length}function O(){var U={line:C,column:x};return function($){return $.position=new j(U),H(),$}}function j(U){this.start=U,this.end={line:C,column:x},this.source=_.source}j.prototype.content=k;function M(U){var $=new Error(_.source+":"+C+":"+x+": "+U);if($.reason=U,$.filename=_.source,$.line=C,$.column=x,$.source=k,!_.silent)throw $}function N(U){var $=U.exec(k);if($){var R=$[0];return E(R),k=k.slice(R.length),$}}function H(){N(t)}function P(U){var $;for(U=U||[];$=z();)$!==!1&&U.push($);return U}function z(){var U=O();if(!(c!=k.charAt(0)||h!=k.charAt(1))){for(var $=2;d!=k.charAt($)&&(h!=k.charAt($)||c!=k.charAt($+1));)++$;if($+=2,d===k.charAt($-1))return M("End of comment missing");var R=k.slice(2,$-2);return x+=2,E(R),k=k.slice($),x+=2,U({type:p,comment:R})}}function F(){var U=O(),$=N(i);if($){if(z(),!N(r))return M("property missing ':'");var R=N(a),I=U({type:v,property:w($[0].replace(e,d)),value:R?w(R[0].replace(e,d)):d});return N(o),I}}function G(){var U=[];P(U);for(var $;$=F();)$!==!1&&(U.push($),P(U));return U}return H(),G()}function w(k){return k?k.replace(l,d):d}return Uk=b,Uk}var hM;function Nle(){if(hM)return jf;hM=1;var e=jf&&jf.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(jf,"__esModule",{value:!0}),jf.default=t;const n=e(Ple());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 jf}var th={},mM;function $le(){if(mM)return th;mM=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,pM;function zle(){if(pM)return ih;pM=1;var e=ih&&ih.__importDefault||function(r){return r&&r.__esModule?r:{default:r}},n=e(Nle()),t=$le();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 Lle=zle();const Ile=mt(Lle),hq=mq("end"),p9=mq("start");function mq(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 Ble(e){const n=p9(e),t=hq(e);if(n&&t)return{start:n,end:t}}function Rh(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?vM(e.position):"start"in e||"end"in e?vM(e):"line"in e||"column"in e?KS(e):""}function KS(e){return gM(e&&e.line)+":"+gM(e&&e.column)}function vM(e){return KS(e&&e.start)+"-"+KS(e&&e.end)}function gM(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 v9={}.hasOwnProperty,Fle=new Map,qle=/[A-Z]/g,Hle=new Set(["table","tbody","thead","tfoot","tr"]),Ule=new Set(["td","th"]),pq="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function Vle(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=Jle(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=Qle(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"?m9:Dle,stylePropertyNameCase:n.stylePropertyNameCase||"dom",tableCellAlignToStyle:n.tableCellAlignToStyle!==!1},a=vq(r,e,void 0);return a&&typeof a!="string"?a:r.create(e,r.Fragment,{children:a||void 0},void 0)}function vq(e,n,t){if(n.type==="element")return Wle(e,n,t);if(n.type==="mdxFlowExpression"||n.type==="mdxTextExpression")return Gle(e,n);if(n.type==="mdxJsxFlowElement"||n.type==="mdxJsxTextElement")return Kle(e,n,t);if(n.type==="mdxjsEsm")return Yle(e,n);if(n.type==="root")return Xle(e,n,t);if(n.type==="text")return Zle(e,n)}function Wle(e,n,t){const i=e.schema;let r=i;n.tagName.toLowerCase()==="svg"&&i.space==="html"&&(r=m9,e.schema=r),e.ancestors.push(n);const a=yq(e,n.tagName,!1),o=eue(e,n);let l=y9(e,n);return Hle.has(n.tagName)&&(l=l.filter(function(f){return typeof f=="string"?!_le(f):!0})),gq(e,o,a,n),g9(o,l),e.ancestors.pop(),e.schema=i,e.create(n,a,o,t)}function Gle(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)}nm(e,n.position)}function Yle(e,n){if(n.data&&n.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(n.data.estree);nm(e,n.position)}function Kle(e,n,t){const i=e.schema;let r=i;n.name==="svg"&&i.space==="html"&&(r=m9,e.schema=r),e.ancestors.push(n);const a=n.name===null?e.Fragment:yq(e,n.name,!0),o=nue(e,n),l=y9(e,n);return gq(e,o,a,n),g9(o,l),e.ancestors.pop(),e.schema=i,e.create(n,a,o,t)}function Xle(e,n,t){const i={};return g9(i,y9(e,n)),e.create(n,e.Fragment,i,t)}function Zle(e,n){return n.value}function gq(e,n,t,i){typeof t!="string"&&t!==e.Fragment&&e.passNode&&(n.node=i)}function g9(e,n){if(n.length>0){const t=n.length>1?n:n[0];t&&(e.children=t)}}function Qle(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 Jle(e,n){return t;function t(i,r,a,o){const l=Array.isArray(a.children),f=p9(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 eue(e,n){const t={};let i,r;for(r in n.properties)if(r!=="children"&&v9.call(n.properties,r)){const a=tue(e,r,n.properties[r]);if(a){const[o,l]=a;e.tableCellAlignToStyle&&o==="align"&&typeof l=="string"&&Ule.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 nue(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 nm(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 nm(e,n.position);else a=i.value===null?!0:i.value;t[r]=a}return t}function y9(e,n){const t=[];let i=-1;const r=e.passKeys?new Map:Fle;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?(Wr(e,e.length,0,n),e):n}const wM={}.hasOwnProperty;function wq(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 qa(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const lr=wl(/[A-Za-z]/),Ji=wl(/[\dA-Za-z]/),cue=wl(/[#-'*+\--9=?A-Z^-~]/);function Gg(e){return e!==null&&(e<32||e===127)}const XS=wl(/\d/),due=wl(/[\dA-Fa-f]/),hue=wl(/[!-/:-@[-`{-~]/);function kn(e){return e!==null&&e<-2}function Nt(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")),xu=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 ot(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 N=M,H,P;for(;N--;)if(n.events[N][0]==="exit"&&n.events[N][1].type==="chunkFlow"){if(H){P=n.events[N][1].end;break}H=!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 yue(e,n,t){return ot(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||Nt(e)||xu(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};_M(d,-f),_M(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,Wr(e,i-1,t-i+3,c),t=i+c.length-h-2;break}}for(t=-1;++t0&&Zn(j)?ot(e,C,"linePrefix",a+1)(j):C(j)}function C(j){return j===null||kn(j)?e.check(xM,w,E)(j):(e.enter("codeFlowValue"),x(j))}function x(j){return j===null||kn(j)?(e.exit("codeFlowValue"),C(j)):(e.consume(j),x)}function E(j){return e.exit("codeFenced"),n(j)}function O(j,M,N){let H=0;return P;function P($){return j.enter("lineEnding"),j.consume($),j.exit("lineEnding"),z}function z($){return j.enter("codeFencedFence"),Zn($)?ot(j,F,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)($):F($)}function F($){return $===l?(j.enter("codeFencedFenceSequence"),G($)):N($)}function G($){return $===l?(H++,j.consume($),G):H>=o?(j.exit("codeFencedFenceSequence"),Zn($)?ot(j,U,"whitespace")($):U($)):N($)}function U($){return $===null||kn($)?(j.exit("codeFencedFence"),M($)):N($)}}}function Tue(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:Due},Mue={partial:!0,tokenize:Rue};function Due(e,n,t){const i=this;return r;function r(c){return e.enter("codeIndented"),ot(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):kn(c)?e.attempt(Mue,o,f)(c):(e.enter("codeFlowValue"),l(c))}function l(c){return c===null||kn(c)?(e.exit("codeFlowValue"),o(c)):(e.consume(c),l)}function f(c){return e.exit("codeIndented"),n(c)}}function Rue(e,n,t){const i=this;return r;function r(o){return i.parser.lazy[i.now().line]?t(o):kn(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),r):ot(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):kn(o)?r(o):t(o)}}const Pue={name:"codeText",previous:$ue,resolve:Nue,tokenize:zue};function Nue(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 Aq(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||Gg(_)?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||kn(_)?t(_):(e.consume(_),_===92?b:v)}function b(_){return _===60||_===62||_===92?(e.consume(_),v):v(_)}function w(_){return!h&&(_===null||_===41||Nt(_))?(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):kn(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||kn(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 jq(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):kn(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),ot(e,c,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),h(p))}function h(p){return p===o||p===null||kn(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 kn(r)?(e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),t=!0,i):Zn(r)?ot(e,i,t?"linePrefix":"lineSuffix")(r):n(r)}}const Vue={name:"definition",tokenize:Gue},Wue={partial:!0,tokenize:Yue};function Gue(e,n,t){const i=this;let r;return a;function a(v){return e.enter("definition"),o(v)}function o(v){return Oq.call(i,e,l,t,"definitionLabel","definitionLabelMarker","definitionLabelString")(v)}function l(v){return r=qa(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 Nt(v)?Ph(e,c)(v):c(v)}function c(v){return Aq(e,h,t,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(v)}function h(v){return e.attempt(Wue,d,d)(v)}function d(v){return Zn(v)?ot(e,p,"whitespace")(v):p(v)}function p(v){return v===null||kn(v)?(e.exit("definition"),i.parser.defined.push(r),n(v)):t(v)}}function Yue(e,n,t){return i;function i(l){return Nt(l)?Ph(e,r)(l):t(l)}function r(l){return jq(e,a,t,"definitionTitle","definitionTitleMarker","definitionTitleString")(l)}function a(l){return Zn(l)?ot(e,o,"whitespace")(l):o(l)}function o(l){return l===null||kn(l)?n(l):t(l)}}const Kue={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 kn(a)?(e.exit("hardBreakEscape"),n(a)):t(a)}}const Zue={name:"headingAtx",resolve:Que,tokenize:Jue};function Que(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"},Wr(e,i,t-i+1,[["enter",r,n],["enter",a,n],["exit",a,n],["exit",r,n]])),e}function Jue(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||Nt(h)?(e.exit("atxHeadingSequence"),l(h)):t(h)}function l(h){return h===35?(e.enter("atxHeadingSequence"),f(h)):h===null||kn(h)?(e.exit("atxHeading"),n(h)):Zn(h)?ot(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||Nt(h)?(e.exit("atxHeadingText"),l(h)):(e.consume(h),c)}}const efe=["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"],CM=["pre","script","style","textarea"],nfe={concrete:!0,name:"htmlFlow",resolveTo:rfe,tokenize:afe},tfe={partial:!0,tokenize:sfe},ife={partial:!0,tokenize:ofe};function rfe(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 afe(e,n,t){const i=this;let r,a,o,l,f;return c;function c(L){return h(L)}function h(L){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(L),d}function d(L){return L===33?(e.consume(L),p):L===47?(e.consume(L),a=!0,w):L===63?(e.consume(L),r=3,i.interrupt?n:D):lr(L)?(e.consume(L),o=String.fromCharCode(L),k):t(L)}function p(L){return L===45?(e.consume(L),r=2,v):L===91?(e.consume(L),r=5,l=0,b):lr(L)?(e.consume(L),r=4,i.interrupt?n:D):t(L)}function v(L){return L===45?(e.consume(L),i.interrupt?n:D):t(L)}function b(L){const X="CDATA[";return L===X.charCodeAt(l++)?(e.consume(L),l===X.length?i.interrupt?n:F:b):t(L)}function w(L){return lr(L)?(e.consume(L),o=String.fromCharCode(L),k):t(L)}function k(L){if(L===null||L===47||L===62||Nt(L)){const X=L===47,ee=o.toLowerCase();return!X&&!a&&CM.includes(ee)?(r=1,i.interrupt?n(L):F(L)):efe.includes(o.toLowerCase())?(r=6,X?(e.consume(L),_):i.interrupt?n(L):F(L)):(r=7,i.interrupt&&!i.parser.lazy[i.now().line]?t(L):a?C(L):x(L))}return L===45||Ji(L)?(e.consume(L),o+=String.fromCharCode(L),k):t(L)}function _(L){return L===62?(e.consume(L),i.interrupt?n:F):t(L)}function C(L){return Zn(L)?(e.consume(L),C):P(L)}function x(L){return L===47?(e.consume(L),P):L===58||L===95||lr(L)?(e.consume(L),E):Zn(L)?(e.consume(L),x):P(L)}function E(L){return L===45||L===46||L===58||L===95||Ji(L)?(e.consume(L),E):O(L)}function O(L){return L===61?(e.consume(L),j):Zn(L)?(e.consume(L),O):x(L)}function j(L){return L===null||L===60||L===61||L===62||L===96?t(L):L===34||L===39?(e.consume(L),f=L,M):Zn(L)?(e.consume(L),j):N(L)}function M(L){return L===f?(e.consume(L),f=null,H):L===null||kn(L)?t(L):(e.consume(L),M)}function N(L){return L===null||L===34||L===39||L===47||L===60||L===61||L===62||L===96||Nt(L)?O(L):(e.consume(L),N)}function H(L){return L===47||L===62||Zn(L)?x(L):t(L)}function P(L){return L===62?(e.consume(L),z):t(L)}function z(L){return L===null||kn(L)?F(L):Zn(L)?(e.consume(L),z):t(L)}function F(L){return L===45&&r===2?(e.consume(L),R):L===60&&r===1?(e.consume(L),I):L===62&&r===4?(e.consume(L),W):L===63&&r===3?(e.consume(L),D):L===93&&r===5?(e.consume(L),Y):kn(L)&&(r===6||r===7)?(e.exit("htmlFlowData"),e.check(tfe,V,G)(L)):L===null||kn(L)?(e.exit("htmlFlowData"),G(L)):(e.consume(L),F)}function G(L){return e.check(ife,U,V)(L)}function U(L){return e.enter("lineEnding"),e.consume(L),e.exit("lineEnding"),$}function $(L){return L===null||kn(L)?G(L):(e.enter("htmlFlowData"),F(L))}function R(L){return L===45?(e.consume(L),D):F(L)}function I(L){return L===47?(e.consume(L),o="",q):F(L)}function q(L){if(L===62){const X=o.toLowerCase();return CM.includes(X)?(e.consume(L),W):F(L)}return lr(L)&&o.length<8?(e.consume(L),o+=String.fromCharCode(L),q):F(L)}function Y(L){return L===93?(e.consume(L),D):F(L)}function D(L){return L===62?(e.consume(L),W):L===45&&r===2?(e.consume(L),D):F(L)}function W(L){return L===null||kn(L)?(e.exit("htmlFlowData"),V(L)):(e.consume(L),W)}function V(L){return e.exit("htmlFlow"),n(L)}}function ofe(e,n,t){const i=this;return r;function r(o){return kn(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 sfe(e,n,t){return i;function i(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),e.attempt(up,n,t)}}const lfe={name:"htmlText",tokenize:ufe};function ufe(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),N):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):kn(D)?(o=d,I(D)):(e.consume(D),d)}function p(D){return D===45?(e.consume(D),v):d(D)}function v(D){return D===62?R(D):D===45?p(D):d(D)}function b(D){const W="CDATA[";return D===W.charCodeAt(a++)?(e.consume(D),a===W.length?w:b):t(D)}function w(D){return D===null?t(D):D===93?(e.consume(D),k):kn(D)?(o=w,I(D)):(e.consume(D),w)}function k(D){return D===93?(e.consume(D),_):w(D)}function _(D){return D===62?R(D):D===93?(e.consume(D),_):w(D)}function C(D){return D===null||D===62?R(D):kn(D)?(o=C,I(D)):(e.consume(D),C)}function x(D){return D===null?t(D):D===63?(e.consume(D),E):kn(D)?(o=x,I(D)):(e.consume(D),x)}function E(D){return D===62?R(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 kn(D)?(o=M,I(D)):Zn(D)?(e.consume(D),M):R(D)}function N(D){return D===45||Ji(D)?(e.consume(D),N):D===47||D===62||Nt(D)?H(D):t(D)}function H(D){return D===47?(e.consume(D),R):D===58||D===95||lr(D)?(e.consume(D),P):kn(D)?(o=H,I(D)):Zn(D)?(e.consume(D),H):R(D)}function P(D){return D===45||D===46||D===58||D===95||Ji(D)?(e.consume(D),P):z(D)}function z(D){return D===61?(e.consume(D),F):kn(D)?(o=z,I(D)):Zn(D)?(e.consume(D),z):H(D)}function F(D){return D===null||D===60||D===61||D===62||D===96?t(D):D===34||D===39?(e.consume(D),r=D,G):kn(D)?(o=F,I(D)):Zn(D)?(e.consume(D),F):(e.consume(D),U)}function G(D){return D===r?(e.consume(D),r=void 0,$):D===null?t(D):kn(D)?(o=G,I(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||Nt(D)?H(D):(e.consume(D),U)}function $(D){return D===47||D===62||Nt(D)?H(D):t(D)}function R(D){return D===62?(e.consume(D),e.exit("htmlTextData"),e.exit("htmlText"),n):t(D)}function I(D){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(D),e.exit("lineEnding"),q}function q(D){return Zn(D)?ot(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 k9={name:"labelEnd",resolveAll:hfe,resolveTo:mfe,tokenize:pfe},ffe={tokenize:vfe},cfe={tokenize:gfe},dfe={tokenize:yfe};function hfe(e){let n=-1;const t=[];for(;++n=3&&(c===null||kn(c))?(e.exit("thematicBreak"),n(c)):t(c)}function f(c){return c===r?(e.consume(c),i++,f):(e.exit("thematicBreakSequence"),Zn(c)?ot(e,l,"whitespace")(c):l(c))}}const br={continuation:{tokenize:jfe},exit:Tfe,name:"list",tokenize:Ofe},Cfe={partial:!0,tokenize:Mfe},Afe={partial:!0,tokenize:Efe};function Ofe(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:XS(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(_g,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 XS(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(up,i.interrupt?t:h,e.attempt(Cfe,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 jfe(e,n,t){const i=this;return i.containerState._closeFlow=void 0,e.check(up,r,a);function r(l){return i.containerState.furtherBlankLines=i.containerState.furtherBlankLines||i.containerState.initialBlankLine,ot(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(Afe,n,o)(l))}function o(l){return i.containerState._closeFlow=!0,i.interrupt=void 0,ot(e,e.attempt(br,n,t),"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(l)}}function Efe(e,n,t){const i=this;return ot(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 Tfe(e){e.exit(this.containerState.type)}function Mfe(e,n,t){const i=this;return ot(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 AM={name:"setextUnderline",resolveTo:Dfe,tokenize:Rfe};function Dfe(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 Rfe(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)?ot(e,f,"lineSuffix")(c):f(c))}function f(c){return c===null||kn(c)?(e.exit("setextHeadingLine"),n(c)):t(c)}}const Pfe={tokenize:Nfe};function Nfe(e){const n=this,t=e.attempt(up,i,e.attempt(this.parser.constructs.flowInitial,r,ot(e,e.attempt(this.parser.constructs.flow,r,e.attempt(Bue,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 $fe={resolveAll:Tq()},zfe=Eq("string"),Lfe=Eq("text");function Eq(e){return{resolveAll:Tq(e==="text"?Ife: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 Qfe(e,n){let t=-1;const i=[];let r;for(;++t0){const tn=Ye.tokenStack[Ye.tokenStack.length-1];(tn[1]||jM).call(Ye,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 dce(e,n){const t={type:"element",tagName:"del",properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)}function hce(e,n){const t={type:"element",tagName:"em",properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)}function mce(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 pce(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 vce(e,n){if(e.options.allowDangerousHtml){const t={type:"raw",value:n.value};return e.patch(n,t),e.applyData(n,t)}}function Rq(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 gce(e,n){const t=String(n.identifier).toUpperCase(),i=e.definitionById.get(t);if(!i)return Rq(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 yce(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 bce(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 wce(e,n){const t=String(n.identifier).toUpperCase(),i=e.definitionById.get(t);if(!i)return Rq(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 kce(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 _ce(e,n,t){const i=e.all(n),r=t?xce(t):Pq(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 Sce(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=p9(n.children[1]),f=hq(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 Ece(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(MM(n.slice(r),r>0,!1)),a.join("")}function MM(e,n,t){let i=0,r=e.length;if(n){let a=e.codePointAt(i);for(;a===EM||a===TM;)i++,a=e.codePointAt(i)}if(t){let a=e.codePointAt(r-1);for(;a===EM||a===TM;)r--,a=e.codePointAt(r-1)}return r>i?e.slice(i,r):""}function Dce(e,n){const t={type:"text",value:Mce(String(n.value))};return e.patch(n,t),e.applyData(n,t)}function Rce(e,n){const t={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(n,t),e.applyData(n,t)}const Pce={blockquote:uce,break:fce,code:cce,delete:dce,emphasis:hce,footnoteReference:mce,heading:pce,html:vce,imageReference:gce,image:yce,inlineCode:bce,linkReference:wce,link:kce,listItem:_ce,list:Sce,paragraph:Cce,root:Ace,strong:Oce,table:jce,tableCell:Tce,tableRow:Ece,text:Dce,thematicBreak:Rce,toml:Hv,yaml:Hv,definition:Hv,footnoteDefinition:Hv};function Hv(){}const Nq=-1,v0=0,Nh=1,Yg=2,_9=3,x9=4,S9=5,C9=6,$q=7,zq=8,Nce=typeof self=="object"?self:globalThis,DM=(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 Nce[e](n)},$ce=(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 Nq:return t(o,r);case Nh:{const l=t([],r);for(const f of o)l.push(i(f));return l}case Yg:{const l=t({},r);for(const[f,c]of o)l[i(f)]=i(c);return l}case _9:return t(new Date(o),r);case x9:{const{source:l,flags:f}=o;return t(new RegExp(l,f),r)}case S9:{const l=t(new Map,r);for(const[f,c]of o)l.set(i(f),i(c));return l}case C9:{const l=t(new Set,r);for(const f of o)l.add(i(f));return l}case $q:{const{name:l,message:f}=o;return t(DM(l,f),r)}case zq: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(DM(a,o),r)};return i},RM=e=>$ce(new Map,e)(0),Ef="",{toString:zce}={},{keys:Lce}=Object,ah=e=>{const n=typeof e;if(n!=="object"||!e)return[v0,n];const t=zce.call(e).slice(8,-1);switch(t){case"Array":return[Nh,Ef];case"Object":return[Yg,Ef];case"Date":return[_9,Ef];case"RegExp":return[x9,Ef];case"Map":return[S9,Ef];case"Set":return[C9,Ef];case"DataView":return[Nh,t]}return t.includes("Array")?[Nh,t]:t.includes("Error")?[$q,t]:[Yg,t]},Uv=([e,n])=>e===v0&&(n==="function"||n==="symbol"),Ice=(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=zq,h=o.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+f);h=null;break;case"undefined":return r([Nq],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 Yg:{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 Lce(o))(e||!Uv(ah(o[p])))&&h.push([a(p),a(o[p])]);return d}case _9:return r([l,o.toISOString()],o);case x9:{const{source:h,flags:d}=o;return r([l,{source:h,flags:d}],o)}case S9:{const h=[],d=r([l,h],o);for(const[p,v]of o)(e||!(Uv(ah(p))||Uv(ah(v))))&&h.push([a(p),a(v)]);return d}case C9:{const h=[],d=r([l,h],o);for(const p of o)(e||!Uv(ah(p)))&&h.push(a(p));return d}}const{message:c}=o;return r([l,{name:f,message:c}],o)};return a},PM=(e,{json:n,lossy:t}={})=>{const i=[];return Ice(!(n||t),!!n,new Map,i)(e),i},Kg=typeof structuredClone=="function"?(e,n)=>n&&("json"in n||"lossy"in n)?RM(PM(e,n)):structuredClone(e):(e,n)=>RM(PM(e,n));function Bce(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 Fce(e,n){return"Back to reference "+(e+1)+(n>1?"-"+n:"")}function qce(e){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",t=e.options.footnoteBackContent||Bce,i=e.options.footnoteBackLabel||Fce,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:{...Kg(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 Wce;if(typeof e=="function")return y0(e);if(typeof e=="object")return Array.isArray(e)?Hce(e):Uce(e);if(typeof e=="string")return Vce(e);throw new Error("Expected function, string, or object as test")});function Hce(e){const n=[];let t=-1;for(;++t":""))+")"})}return p;function p(){let v=Lq,b,w,k;if((!n||a(f,c,h[h.length-1]||void 0))&&(v=Xce(t(f,h)),v[0]===QS))return v;if("children"in f&&f.children){const _=f;if(_.children&&v[0]!==Kce)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]===QS)return b;w=typeof b[1]=="number"?b[1]:w+o}}return v}}}function Xce(e){return Array.isArray(e)?e:typeof e=="number"?[Yce,e]:e==null?Lq:[e]}function A9(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),Iq(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 JS={}.hasOwnProperty,Zce={};function Qce(e,n){const t=n||Zce,i=new Map,r=new Map,a=new Map,o={...Pce,...t.handlers},l={all:c,applyData:ede,definitionById:i,footnoteById:r,footnoteCounts:a,footnoteOrder:[],handlers:o,one:f,options:t,patch:Jce,wrap:tde};return A9(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(JS.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,_=Kg(k);return _.children=l.all(h),_}return Kg(h)}return(l.options.unknownHandler||nde)(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 NM(e){let n=0,t=e.charCodeAt(n);for(;t===9||t===32;)n++,t=e.charCodeAt(n);return e.slice(n)}function $M(e,n){const t=Qce(e,n),i=t.one(e,void 0),r=qce(t),a=Array.isArray(i)?{type:"root",children:i}:i||{type:"root",children:[]};return r&&a.children.push({type:"text",value:` +`},r),a}function ide(e,n){return e&&"run"in e?async function(t,i){const r=$M(t,{file:i,...n});await e.run(r,i)}:function(t,i){return $M(t,{file:i,...e||n})}}function zM(e){if(e)throw e}var Yk,LM;function rde(){if(LM)return Yk;LM=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 ade=rde();const Kk=mt(ade);function e4(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 ode(){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 to={basename:lde,dirname:ude,extname:fde,join:cde,sep:"/"};function lde(e,n){if(n!==void 0&&typeof n!="string")throw new TypeError('"ext" argument must be a string');fp(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 ude(e){if(fp(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 fde(e){fp(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 cde(...e){let n=-1,t;for(;++n0&&e.codePointAt(e.length-1)===47&&(t+="/"),n?"/"+t:t}function hde(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 fp(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const mde={cwd:pde};function pde(){return"/"}function n4(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function vde(e){if(typeof e=="string")e=new URL(e);else if(!n4(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 gde(e)}function gde(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];e4(w)&&e4(v)&&(v=Kk(!0,w,v)),i[p]=[c,v,...b]}}}}const kde=new O9().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 BM(e){if(!e4(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function FM(e,n,t){if(!t)throw new Error("`"+e+"` finished async. Use `"+n+"` instead")}function Vv(e){return _de(e)?e:new Bq(e)}function _de(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function xde(e){return typeof e=="string"||Sde(e)}function Sde(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const Cde="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",qM=[],HM={allowDangerousHtml:!0},Ade=/^(https?|ircs?|mailto|xmpp)$/i,Ode=[{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 jde(e){const n=Ede(e),t=Tde(e);return Mde(n.runSync(n.parse(t),t),e)}function Ede(e){const n=e.rehypePlugins||qM,t=e.remarkPlugins||qM,i=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...HM}:HM;return kde().use(lce).use(t).use(ide,i).use(n)}function Tde(e){const n=e.children||"",t=new Bq;return typeof n=="string"&&(t.value=n),t}function Mde(e,n){const t=n.allowedElements,i=n.allowElement,r=n.components,a=n.disallowedElements,o=n.skipHtml,l=n.unwrapDisallowed,f=n.urlTransform||Dde;for(const h of Ode)Object.hasOwn(n,h.from)&&(""+h.from+(h.to?"use `"+h.to+"` instead":"remove it")+Cde+h.id,void 0);return A9(e,c),Vle(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 Dde(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||Ade.test(e.slice(0,n))?e:""}function UM(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 Rde(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function Pde(e,n,t){const r=g0((t||{}).ignore||[]),a=Nde(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=UM(e,"(");let a=UM(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 Fq(e,n){const t=e.input.charCodeAt(e.index-1);return(e.index===0||xu(t)||m0(t))&&(!n||t!==47)}qq.peek=rhe;function Xde(){this.buffer()}function Zde(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function Qde(){this.buffer()}function Jde(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function ehe(e){const n=this.resume(),t=this.stack[this.stack.length-1];t.type,t.identifier=qa(this.sliceSerialize(e)).toLowerCase(),t.label=n}function nhe(e){this.exit(e)}function the(e){const n=this.resume(),t=this.stack[this.stack.length-1];t.type,t.identifier=qa(this.sliceSerialize(e)).toLowerCase(),t.label=n}function ihe(e){this.exit(e)}function rhe(){return"["}function qq(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 ahe(){return{enter:{gfmFootnoteCallString:Xde,gfmFootnoteCall:Zde,gfmFootnoteDefinitionLabelString:Qde,gfmFootnoteDefinition:Jde},exit:{gfmFootnoteCallString:ehe,gfmFootnoteCall:nhe,gfmFootnoteDefinitionLabelString:the,gfmFootnoteDefinition:ihe}}}function ohe(e){let n=!1;return e&&e.firstLineBlank&&(n=!0),{handlers:{footnoteDefinition:t,footnoteReference:qq},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?Hq:she))),c(),f}}function she(e,n,t){return n===0?e:Hq(e,n,t)}function Hq(e,n,t){return(t?"":" ")+e}const lhe=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];Uq.peek=hhe;function uhe(){return{canContainEols:["delete"],enter:{strikethrough:che},exit:{strikethrough:dhe}}}function fhe(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:lhe}],handlers:{delete:Uq}}}function che(e){this.enter({type:"delete",children:[]},e)}function dhe(e){this.exit(e)}function Uq(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 hhe(){return"~"}function mhe(e){return e.length}function phe(e,n){const t=n||{},i=(t.align||[]).concat(),r=t.stringLength||mhe,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()),yhe);return r(),o}function yhe(e,n,t){return">"+(t?"":" ")+e}function bhe(e,n){return WM(e,n.inConstruct,!0)&&!WM(e,n.notInConstruct,!1)}function WM(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 khe(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 _he(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 xhe(e,n,t,i){const r=_he(t),a=e.value||"",o=r==="`"?"GraveAccent":"Tilde";if(khe(e,t)){const d=t.enter("codeIndented"),p=t.indentLines(a,She);return d(),p}const l=t.createTracker(i),f=r.repeat(Math.max(whe(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 She(e,n,t){return(t?"":" ")+e}function j9(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 Che(e,n,t,i){const r=j9(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 Ahe(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 tm(e){return"&#x"+e.toString(16).toUpperCase()+";"}function Xg(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}}Vq.peek=Ohe;function Vq(e,n,t,i){const r=Ahe(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=Xg(i.before.charCodeAt(i.before.length-1),c,r);h.inside&&(f=tm(c)+f.slice(1));const d=f.charCodeAt(f.length-1),p=Xg(i.after.charCodeAt(0),d,r);p.inside&&(f=f.slice(0,-1)+tm(d));const v=o.move(r);return a(),t.attentionEncodeSurroundingInfo={after:p.outside,before:h.outside},l+f+v}function Ohe(e,n,t){return t.options.emphasis||"*"}function jhe(e,n){let t=!1;return A9(e,function(i){if("value"in i&&/\r?\n|\r/.test(i.value)||i.type==="break")return t=!0,QS}),!!((!e.depth||e.depth<3)&&b9(e)&&(n.options.setext||t))}function Ehe(e,n,t,i){const r=Math.max(Math.min(6,e.depth||1),1),a=t.createTracker(i);if(jhe(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=tm(c.charCodeAt(0))+c.slice(1)),c=c?o+" "+c:o,t.options.closeAtx&&(c+=" "+o),f(),l(),c}Wq.peek=The;function Wq(e){return e.value||""}function The(){return"<"}Gq.peek=Mhe;function Gq(e,n,t,i){const r=j9(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 Mhe(){return"!"}Yq.peek=Dhe;function Yq(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 Dhe(){return"!"}Kq.peek=Rhe;function Kq(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))}Zq.peek=Phe;function Zq(e,n,t,i){const r=j9(t),a=r==='"'?"Quote":"Apostrophe",o=t.createTracker(i);let l,f;if(Xq(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 Phe(e,n,t){return Xq(e,t)?"<":"["}Qq.peek=Nhe;function Qq(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 Nhe(){return"["}function E9(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 $he(e){const n=E9(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 zhe(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 Jq(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 Lhe(e,n,t,i){const r=t.enter("list"),a=t.bulletCurrent;let o=e.ordered?zhe(t):E9(t);const l=e.ordered?o==="."?")":".":$he(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),Jq(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 Fhe(e,n,t,i){const r=t.enter("paragraph"),a=t.enter("phrasing"),o=t.containerPhrasing(e,i);return a(),r(),o}const qhe=g0(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function Hhe(e,n,t,i){return(e.children.some(function(o){return qhe(o)})?t.containerPhrasing:t.containerFlow).call(t,e,i)}function Uhe(e){const n=e.options.strong||"*";if(n!=="*"&&n!=="_")throw new Error("Cannot serialize strong with `"+n+"` for `options.strong`, expected `*`, or `_`");return n}eH.peek=Vhe;function eH(e,n,t,i){const r=Uhe(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=Xg(i.before.charCodeAt(i.before.length-1),c,r);h.inside&&(f=tm(c)+f.slice(1));const d=f.charCodeAt(f.length-1),p=Xg(i.after.charCodeAt(0),d,r);p.inside&&(f=f.slice(0,-1)+tm(d));const v=o.move(r+r);return a(),t.attentionEncodeSurroundingInfo={after:p.outside,before:h.outside},l+f+v}function Vhe(e,n,t){return t.options.strong||"*"}function Whe(e,n,t,i){return t.safe(e.value,i)}function Ghe(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 Yhe(e,n,t){const i=(Jq(t)+(t.options.ruleSpaces?" ":"")).repeat(Ghe(t));return t.options.ruleSpaces?i.slice(0,-1):i}const nH={blockquote:ghe,break:GM,code:xhe,definition:Che,emphasis:Vq,hardBreak:GM,heading:Ehe,html:Wq,image:Gq,imageReference:Yq,inlineCode:Kq,link:Zq,linkReference:Qq,list:Lhe,listItem:Bhe,paragraph:Fhe,root:Hhe,strong:eH,text:Whe,thematicBreak:Yhe};function Khe(){return{enter:{table:Xhe,tableData:YM,tableHeader:YM,tableRow:Qhe},exit:{codeText:Jhe,table:Zhe,tableData:a_,tableHeader:a_,tableRow:a_}}}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 Zhe(e){this.exit(e),this.data.inTable=void 0}function Qhe(e){this.enter({type:"tableRow",children:[]},e)}function a_(e){this.exit(e)}function YM(e){this.enter({type:"tableCell",children:[]},e)}function Jhe(e){let n=this.resume();this.data.inTable&&(n=n.replace(/\\([\\|])/g,eme));const t=this.stack[this.stack.length-1];t.type,t.value=n,this.exit(e)}function eme(e,n){return n==="|"?n:e}function nme(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 phe(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 bme={tokenize:Ome,partial:!0};function wme(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:Sme,continuation:{tokenize:Cme},exit:Ame}},text:{91:{name:"gfmFootnoteCall",tokenize:xme},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:kme,resolveTo:_me}}}}function kme(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=qa(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 _me(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 xme(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||Nt(d))return t(d);if(d===93){e.exit("chunkString");const p=e.exit("gfmFootnoteCallString");return r.includes(qa(i.sliceSerialize(p)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),n):t(d)}return Nt(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 Sme(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||Nt(b))return t(b);if(b===93){e.exit("chunkString");const w=e.exit("gfmFootnoteDefinitionLabelString");return a=qa(i.sliceSerialize(w)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(b),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),p}return Nt(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),ot(e,v,"gfmFootnoteDefinitionWhitespace")):t(b)}function v(b){return n(b)}}function Cme(e,n,t){return e.check(up,n,e.attempt(bme,n,t))}function Ame(e){e.exit("gfmFootnoteDefinition")}function Ome(e,n,t){const i=this;return ot(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 jme(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 Eme{constructor(){this.map=[]}add(n,t,i){Tme(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 Tme(e,n,t,i){let r=0;if(!(t===0&&i.length===0)){for(;r-1;){const U=i.events[z][1].type;if(U==="lineEnding"||U==="linePrefix")z--;else break}const F=z>-1?i.events[z][1].type:null,G=F==="tableHead"||F==="tableRow"?j:f;return G===j&&i.parser.lazy[i.now().line]?t(P):G(P)}function f(P){return e.enter("tableHead"),e.enter("tableRow"),c(P)}function c(P){return P===124||(o=!0,a+=1),h(P)}function h(P){return P===null?t(P):kn(P)?a>1?(a=0,i.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(P),e.exit("lineEnding"),v):t(P):Zn(P)?ot(e,h,"whitespace")(P):(a+=1,o&&(o=!1,r+=1),P===124?(e.enter("tableCellDivider"),e.consume(P),e.exit("tableCellDivider"),o=!0,h):(e.enter("data"),d(P)))}function d(P){return P===null||P===124||Nt(P)?(e.exit("data"),h(P)):(e.consume(P),P===92?p:d)}function p(P){return P===92||P===124?(e.consume(P),d):d(P)}function v(P){return i.interrupt=!1,i.parser.lazy[i.now().line]?t(P):(e.enter("tableDelimiterRow"),o=!1,Zn(P)?ot(e,b,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(P):b(P))}function b(P){return P===45||P===58?k(P):P===124?(o=!0,e.enter("tableCellDivider"),e.consume(P),e.exit("tableCellDivider"),w):O(P)}function w(P){return Zn(P)?ot(e,k,"whitespace")(P):k(P)}function k(P){return P===58?(a+=1,o=!0,e.enter("tableDelimiterMarker"),e.consume(P),e.exit("tableDelimiterMarker"),_):P===45?(a+=1,_(P)):P===null||kn(P)?E(P):O(P)}function _(P){return P===45?(e.enter("tableDelimiterFiller"),C(P)):O(P)}function C(P){return P===45?(e.consume(P),C):P===58?(o=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(P),e.exit("tableDelimiterMarker"),x):(e.exit("tableDelimiterFiller"),x(P))}function x(P){return Zn(P)?ot(e,E,"whitespace")(P):E(P)}function E(P){return P===124?b(P):P===null||kn(P)?!o||r!==a?O(P):(e.exit("tableDelimiterRow"),e.exit("tableHead"),n(P)):O(P)}function O(P){return t(P)}function j(P){return e.enter("tableRow"),M(P)}function M(P){return P===124?(e.enter("tableCellDivider"),e.consume(P),e.exit("tableCellDivider"),M):P===null||kn(P)?(e.exit("tableRow"),n(P)):Zn(P)?ot(e,M,"whitespace")(P):(e.enter("data"),N(P))}function N(P){return P===null||P===124||Nt(P)?(e.exit("data"),M(P)):(e.consume(P),P===92?H:N)}function H(P){return P===92||P===124?(e.consume(P),N):N(P)}}function Pme(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 Eme;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({},zf(n.events,r)),e.add(r,0,[["exit",a,n]]),a=void 0),a}function XM(e,n,t,i,r){const a=[],o=zf(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 zf(e,n){const t=e[n],i=t[0]==="enter"?"start":"end";return t[1][i]}const Nme={name:"tasklistCheck",tokenize:zme};function $me(){return{text:{91:Nme}}}function zme(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 Nt(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 kn(f)?n(f):Zn(f)?e.check({tokenize:Lme},n,t)(f):t(f)}}function Lme(e,n,t){return ot(e,i,"whitespace");function i(r){return r===null?t(r):n(r)}}function Ime(e){return wq([fme(),wme(),jme(e),Dme(),$me()])}const Bme={};function Fme(e){const n=this,t=e||Bme,i=n.data(),r=i.micromarkExtensions||(i.micromarkExtensions=[]),a=i.fromMarkdownExtensions||(i.fromMarkdownExtensions=[]),o=i.toMarkdownExtensions||(i.toMarkdownExtensions=[]);r.push(Ime(t)),a.push(ome()),o.push(sme(t))}const i4="kanban_chat_v1";function qme(){try{const e=localStorage.getItem(i4);if(!e)return[];const n=JSON.parse(e);if(Array.isArray(n))return n}catch{}return[]}function Hme({onBoardChange:e}){const[n,t]=A.useState(()=>qme()),[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(i4,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 N=x[M];if(N.error===void 0&&N.ok){j.is_error&&(N.ok=!1,N.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 Hie(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(i4)};return y.jsxs(Vn,{gap:0,h:"100%",children:[y.jsxs(Ue,{justify:"space-between",p:"xs",style:{borderBottom:"1px solid var(--mantine-color-dark-4)"},children:[y.jsxs(Ue,{gap:6,children:[y.jsx(nq,{size:18}),y.jsx(Ee,{fw:600,size:"sm",children:"Asistente"})]}),y.jsx(ii,{label:"Limpiar conversacion",withArrow:!0,children:y.jsx(kt,{variant:"subtle",color:"gray",size:"sm",onClick:b,disabled:n.length===0,children:y.jsx(_u,{size:14})})})]}),y.jsx(xa,{viewportRef:d,style:{flex:1},type:"auto",p:"xs",children:y.jsxs(Vn,{gap:"xs",children:[n.length===0&&!a&&y.jsxs(Ee,{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(ZM,{msg:w},k)),a&&y.jsx(ZM,{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(Ue,{gap:6,pl:"xs",children:[y.jsx(xi,{size:"xs"}),y.jsx(Ee,{size:"xs",c:"dimmed",children:"Pensando..."})]})]})}),y.jsx(Vn,{gap:4,p:"xs",style:{borderTop:"1px solid var(--mantine-color-dark-4)"},children:y.jsxs(Ue,{align:"flex-end",gap:4,wrap:"nowrap",children:[y.jsx(bu,{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(kt,{size:"lg",variant:"filled",onClick:p,disabled:!i.trim()||a,"aria-label":"Send",children:a?y.jsx(xi,{size:"xs",color:"white"}):y.jsx(tq,{size:16})})]})})]})}function ZM({msg:e,streaming:n=!1}){const t=e.role==="user";return y.jsx(Mt,{p:"xs",radius:"md",withBorder:!0,bg:t?"blue.9":"dark.6",style:{alignSelf:t?"flex-end":"flex-start",maxWidth:"92%"},children:y.jsxs(Vn,{gap:4,children:[e.content&&y.jsx(ve,{className:"kanban-md",style:{fontSize:13,lineHeight:1.45,color:"var(--mantine-color-text)"},children:y.jsx(jde,{remarkPlugins:[Fme],children:e.content})}),n&&e.content&&y.jsx(ve,{style:{display:"inline-block",width:8,height:14,background:"currentColor",opacity:.6}}),e.tool_calls&&e.tool_calls.length>0&&y.jsx(Ue,{gap:4,wrap:"wrap",children:e.tool_calls.map((i,r)=>y.jsxs(dt,{size:"xs",color:i.ok?"teal":"red",variant:"light",title:i.error||"",leftSection:i.ok&&n?y.jsx(xi,{size:8,color:"teal"}):null,children:[i.tool,!i.ok&&i.error?`: ${i.error}`:""]},r))})]})})}const Ume=["Lun","Mar","Mie","Jue","Vie","Sab","Dom"];function Vme({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 WB({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(ve,{p:"md",children:y.jsxs(Vn,{gap:"md",children:[y.jsxs(Ue,{justify:"space-between",children:[y.jsx(gl,{order:3,children:"Calendario"}),y.jsxs(Ue,{gap:"xs",wrap:"nowrap",children:[y.jsx(l9,{label:"Mes",size:"xs",value:o,onChange:x=>x&&l(typeof x=="string"?new Date(x):x),style:{minWidth:160},clearable:!1}),y.jsx(ya,{label:"Asignado",size:"xs",placeholder:"Todos",value:f,onChange:c,data:b,clearable:!0,searchable:!0,style:{minWidth:180}})]})]}),y.jsxs(Ue,{gap:"md",children:[y.jsx(Mt,{withBorder:!0,p:"sm",radius:"md",children:y.jsxs(Ue,{gap:6,children:[y.jsx(tc,{size:14,color:"var(--mantine-color-blue-5)"}),y.jsx(Ee,{size:"sm",fw:600,children:_}),y.jsx(Ee,{size:"xs",c:"dimmed",children:"creadas"})]})}),y.jsx(Mt,{withBorder:!0,p:"sm",radius:"md",children:y.jsxs(Ue,{gap:6,children:[y.jsx(em,{size:14,color:"var(--mantine-color-green-5)"}),y.jsx(Ee,{size:"sm",fw:600,children:C}),y.jsx(Ee,{size:"xs",c:"dimmed",children:"hechas"})]})})]}),p&&!h?y.jsx(zc,{p:"xl",children:y.jsx(xi,{})}):y.jsxs(Mt,{withBorder:!0,p:"md",radius:"md",children:[y.jsx(Uo,{cols:7,spacing:4,mb:4,children:Ume.map(x=>y.jsx(Ee,{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(ve,{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"),N=Ie().startOf("day").valueOf(),P=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(Vn,{gap:2,children:[y.jsx(Dt,{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(Ee,{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(Ue,{gap:3,wrap:"nowrap",children:[y.jsx(tc,{size:10,color:"var(--mantine-color-blue-5)"}),y.jsx(Ee,{size:"xs",c:"blue",children:O.created})]}),O.done>0&&y.jsxs(Ue,{gap:3,wrap:"nowrap",children:[y.jsx(em,{size:10,color:"var(--mantine-color-green-5)"}),y.jsx(Ee,{size:"xs",c:"green",children:O.done})]}),O.deadlines.length>0&&y.jsxs(En,{opened:r===x.date,onChange:z=>a(z?x.date:null),position:"bottom",withArrow:!0,shadow:"md",width:280,children:[y.jsx(En.Target,{children:y.jsx(Dt,{onClick:()=>a(r===x.date?null:x.date),style:{textAlign:"left"},children:y.jsx(Vn,{gap:1,children:y.jsxs(Ue,{gap:3,wrap:"nowrap",children:[y.jsx(Wg,{size:10,color:P?"var(--mantine-color-red-5)":"var(--mantine-color-orange-5)"}),y.jsxs(Ee,{size:"xs",c:P?"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(Vn,{gap:2,children:[y.jsxs(Ee,{size:"xs",c:"dimmed",fw:600,mb:2,children:["Vencen el ",Ie(x.date).format("DD/MM/YYYY")]}),O.deadlines.map(z=>y.jsx(Dt,{onClick:()=>{a(null),t==null||t(z.id)},style:{padding:"4px 6px",borderRadius:4,background:"var(--mantine-color-dark-6)"},children:y.jsxs(Ue,{gap:6,wrap:"nowrap",children:[y.jsxs(Ee,{size:"xs",c:"dimmed",ff:"monospace",children:["#",String(z.seq_num).padStart(5,"0")]}),y.jsx(Ee,{size:"xs",lineClamp:1,title:z.title,children:z.title})]})},z.id))]})})]})]})},E)})})]})]})})}function fH(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 Wme={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 Gme(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 Yme(e,n){const t=Gme(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 Kme={type:"area",showColor:!0},M9=Re(e=>{var P,z;const n=be("ChartTooltip",Kme,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=ui(),E=Ze({name:"ChartTooltip",classes:Wme,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:_});if(!f)return null;const O=Yme(f,p),j=d==="scatter"?(z=(P=f[0])==null?void 0:P.payload)==null?void 0:z.name:null,M=fH(b),N=c||j,H=O.map(F=>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:lt(F.color,x),width:12,height:12,cx:6,cy:6})}),y.jsx("div",{...E("tooltipItemName"),children:M[F.name]||F.name})]}),y.jsxs("div",{...E("tooltipItemData"),children:[typeof w=="function"?w(QM(F,d)):QM(F,d),h||F.unit]})]},(F==null?void 0:F.key)??F.name));return y.jsxs(ve,{...E("tooltip"),mod:[{type:d},v],...C,children:[N&&y.jsx("div",{...E("tooltipLabel"),children:N}),y.jsx("div",{...E("tooltipBody"),children:H})]})});M9.displayName="@mantine/charts/ChartTooltip";var cH={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 Zme(e){return Xme(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:cH,props:n,className:i,style:r,classNames:t,styles:a,unstyled:o,attributes:w,rootSelector:"legend"});if(!f)return null;const C=Zme(f),x=fH(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(ve,{mod:[{position:h,centered:b},d],..._("legend"),...k,children:E})});b0.displayName="@mantine/charts/ChartLegend";b0.classes=cH;function Qme({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_,JM;function Ar(){if(JM)return o_;JM=1;var e=Array.isArray;return o_=e,o_}var s_,e8;function dH(){if(e8)return s_;e8=1;var e=typeof Tv=="object"&&Tv&&Tv.Object===Object&&Tv;return s_=e,s_}var l_,n8;function xo(){if(n8)return l_;n8=1;var e=dH(),n=typeof self=="object"&&self&&self.Object===Object&&self,t=e||n||Function("return this")();return l_=t,l_}var u_,t8;function cp(){if(t8)return u_;t8=1;var e=xo(),n=e.Symbol;return u_=n,u_}var f_,i8;function Jme(){if(i8)return f_;i8=1;var e=cp(),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_,r8;function epe(){if(r8)return c_;r8=1;var e=Object.prototype,n=e.toString;function t(i){return n.call(i)}return c_=t,c_}var d_,a8;function vs(){if(a8)return d_;a8=1;var e=cp(),n=Jme(),t=epe(),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_,o8;function gs(){if(o8)return h_;o8=1;function e(n){return n!=null&&typeof n=="object"}return h_=e,h_}var m_,s8;function Zc(){if(s8)return m_;s8=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_,l8;function D9(){if(l8)return p_;l8=1;var e=Ar(),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_,u8;function kl(){if(u8)return v_;u8=1;function e(n){var t=typeof n;return n!=null&&(t=="object"||t=="function")}return v_=e,v_}var g_,f8;function R9(){if(f8)return g_;f8=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_,c8;function npe(){if(c8)return y_;c8=1;var e=xo(),n=e["__core-js_shared__"];return y_=n,y_}var b_,d8;function tpe(){if(d8)return b_;d8=1;var e=npe(),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_,h8;function hH(){if(h8)return w_;h8=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_,m8;function ipe(){if(m8)return k_;m8=1;var e=R9(),n=tpe(),t=kl(),i=hH(),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 __,p8;function rpe(){if(p8)return __;p8=1;function e(n,t){return n==null?void 0:n[t]}return __=e,__}var x_,v8;function Lu(){if(v8)return x_;v8=1;var e=ipe(),n=rpe();function t(i,r){var a=n(i,r);return e(a)?a:void 0}return x_=t,x_}var S_,g8;function k0(){if(g8)return S_;g8=1;var e=Lu(),n=e(Object,"create");return S_=n,S_}var C_,y8;function ape(){if(y8)return C_;y8=1;var e=k0();function n(){this.__data__=e?e(null):{},this.size=0}return C_=n,C_}var A_,b8;function ope(){if(b8)return A_;b8=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_,w8;function spe(){if(w8)return O_;w8=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_,k8;function lpe(){if(k8)return j_;k8=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_,_8;function upe(){if(_8)return E_;_8=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_,x8;function fpe(){if(x8)return T_;x8=1;var e=ape(),n=ope(),t=spe(),i=lpe(),r=upe();function a(o){var l=-1,f=o==null?0:o.length;for(this.clear();++l-1}return $_=n,$_}var z_,T8;function ppe(){if(T8)return z_;T8=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_,M8;function x0(){if(M8)return L_;M8=1;var e=cpe(),n=dpe(),t=hpe(),i=mpe(),r=ppe();function a(o){var l=-1,f=o==null?0:o.length;for(this.clear();++l0?1:-1},lu=function(n){return Su(n)&&n.indexOf("%")===n.length-1},We=function(n){return Lpe(n)&&!Jc(n)},Ipe=function(n){return Gn(n)},_i=function(n){return We(n)||Su(n)},Bpe=0,ed=function(n){var t=++Bpe;return"".concat(n||"").concat(t)},Cu=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(!We(n)&&!Su(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},Fpe=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 Ype(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){"@babel/helpers - typeof";return a4=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},a4(e)}var aD={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":""},oD=null,f2=null,B9=function e(n){if(n===oD&&Array.isArray(f2))return f2;var t=[];return A.Children.forEach(n,function(i){Gn(i)||(Ppe.isFragment(i)?t=t.concat(e(i.props.children)):t.push(i))}),f2=t,oD=n,t};function va(e,n){var t=[],i=[];return Array.isArray(n)?i=n.map(function(r){return Zo(r)}):i=[Zo(n)],B9(e).forEach(function(r){var a=pa(r,"type.displayName")||pa(r,"type.name");i.indexOf(a)!==-1&&t.push(r)}),t}function Hr(e,n){var t=va(e,n);return t&&t[0]}var sD=function(n){if(!n||!n.props)return!1;var t=n.props,i=t.width,r=t.height;return!(!We(i)||i<=0||!We(r)||r<=0)},Kpe=["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&&Su(n.type)&&Kpe.indexOf(n.type)>=0},bH=function(n){return n&&a4(n)==="object"&&"clipDot"in n},Zpe=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)||Upe.includes(t))||i&&I9.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;Zpe((l=r)===null||l===void 0?void 0:l[o],o,t,i)&&(a[o]=r[o])}),a},o4=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 lD(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 tve(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 l4(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=nve(e,eve),h=r||{width:t,height:i,x:0,y:0},d=dn("recharts-surface",a);return Q.createElement("svg",s4({},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 ive=["children","className"];function u4(){return u4=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 ave(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=rve(e,ive),a=dn("recharts-layer",i);return Q.createElement("g",u4({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,dD;function wH(){if(dD)return h2;dD=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,hD;function lve(){if(hD)return m2;hD=1;function e(n){return n.split("")}return m2=e,m2}var p2,mD;function uve(){if(mD)return p2;mD=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,pD;function fve(){if(pD)return v2;pD=1;var e=lve(),n=wH(),t=uve();function i(r){return n(r)?t(r):e(r)}return v2=i,v2}var g2,vD;function cve(){if(vD)return g2;vD=1;var e=sve(),n=wH(),t=fve(),i=pH();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,gD;function dve(){if(gD)return y2;gD=1;var e=cve(),n=e("toUpperCase");return y2=n,y2}var hve=dve();const A0=mt(hve);function Lt(e){return function(){return e}}const kH=Math.cos,e1=Math.sin,Ga=Math.sqrt,n1=Math.PI,O0=2*n1,f4=Math.PI,c4=2*f4,tu=1e-6,mve=c4-tu;function _H(e){this._+=e[0];for(let n=1,t=e.length;n=0))throw new Error(`invalid digits: ${e}`);if(n>15)return _H;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((f4-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%c4+c4),p>mve?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>=f4)},${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 F9(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 vve(n)}function q9(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function xH(e){this._context=e}xH.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 xH(e)}function SH(e){return e[0]}function CH(e){return e[1]}function AH(e,n){var t=Lt(!0),i=null,r=j0,a=null,o=F9(l);e=typeof e=="function"?e:e===void 0?SH:Lt(e),n=typeof n=="function"?n:n===void 0?CH:Lt(n);function l(f){var c,h=(f=q9(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 AH().defined(r).curve(o).context(a)}return c.x=function(d){return arguments.length?(e=typeof d=="function"?d:Lt(+d),i=null,c):e},c.x0=function(d){return arguments.length?(e=typeof d=="function"?d:Lt(+d),c):e},c.x1=function(d){return arguments.length?(i=d==null?null:typeof d=="function"?d:Lt(+d),c):i},c.y=function(d){return arguments.length?(n=typeof d=="function"?d:Lt(+d),t=null,c):n},c.y0=function(d){return arguments.length?(n=typeof d=="function"?d:Lt(+d),c):n},c.y1=function(d){return arguments.length?(t=d==null?null:typeof d=="function"?d:Lt(+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:Lt(!!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 OH{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 gve(e){return new OH(e,!0)}function yve(e){return new OH(e,!1)}const H9={draw(e,n){const t=Ga(n/n1);e.moveTo(t,0),e.arc(0,0,t,0,O0)}},bve={draw(e,n){const t=Ga(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()}},jH=Ga(1/3),wve=jH*2,kve={draw(e,n){const t=Ga(n/wve),i=t*jH;e.moveTo(0,-t),e.lineTo(i,0),e.lineTo(0,t),e.lineTo(-i,0),e.closePath()}},_ve={draw(e,n){const t=Ga(n),i=-t/2;e.rect(i,i,t,t)}},xve=.8908130915292852,EH=e1(n1/10)/e1(7*n1/10),Sve=e1(O0/10)*EH,Cve=-kH(O0/10)*EH,Ave={draw(e,n){const t=Ga(n*xve),i=Sve*t,r=Cve*t;e.moveTo(0,-t),e.lineTo(i,r);for(let a=1;a<5;++a){const o=O0*a/5,l=kH(o),f=e1(o);e.lineTo(f*t,-l*t),e.lineTo(l*i-f*r,f*i+l*r)}e.closePath()}},b2=Ga(3),Ove={draw(e,n){const t=-Ga(n/(b2*3));e.moveTo(0,t*2),e.lineTo(-b2*t,-t),e.lineTo(b2*t,-t),e.closePath()}},aa=-.5,oa=Ga(3)/2,d4=1/Ga(12),jve=(d4/2+1)*3,Eve={draw(e,n){const t=Ga(n/jve),i=t/2,r=t*d4,a=i,o=t*d4+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 Tve(e,n){let t=null,i=F9(r);e=typeof e=="function"?e:Lt(e||H9),n=typeof n=="function"?n:Lt(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:Lt(a),r):e},r.size=function(a){return arguments.length?(n=typeof a=="function"?a:Lt(+a),r):n},r.context=function(a){return arguments.length?(t=a??null,r):t},r}function t1(){}function i1(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 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(){switch(this._point){case 3:i1(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:i1(this,e,n);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=n}};function Mve(e){return new TH(e)}function MH(e){this._context=e}MH.prototype={areaStart:t1,areaEnd:t1,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:i1(this,e,n);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=n}};function Dve(e){return new MH(e)}function DH(e){this._context=e}DH.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:i1(this,e,n);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=n}};function Rve(e){return new DH(e)}function RH(e){this._context=e}RH.prototype={areaStart:t1,areaEnd:t1,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 Pve(e){return new RH(e)}function yD(e){return e<0?-1:1}function bD(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(yD(a)+yD(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(l))||0}function wD(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 r1(e){this._context=e}r1.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,wD(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,wD(this,t=bD(this,e,n)),t);break;default:w2(this,this._t0,t=bD(this,e,n));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=n,this._t0=t}}};function PH(e){this._context=new NH(e)}(PH.prototype=Object.create(r1.prototype)).point=function(e,n){r1.prototype.point.call(this,n,e)};function NH(e){this._context=e}NH.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 Nve(e){return new r1(e)}function $ve(e){return new PH(e)}function $H(e){this._context=e}$H.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=kD(e),r=kD(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 Lve(e){return new E0(e,.5)}function Ive(e){return new E0(e,0)}function Bve(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 Fve(e,n){return e[n]}function qve(e){const n=[];return n.key=e,n}function Hve(){var e=Lt([]),n=h4,t=ac,i=Fve;function r(a){var o=Array.from(e.apply(this,arguments),qve),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 Qve(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 zH={symbolCircle:H9,symbolCross:bve,symbolDiamond:kve,symbolSquare:_ve,symbolStar:Ave,symbolTriangle:Ove,symbolWye:Eve},Jve=Math.PI/180,ege=function(n){var t="symbol".concat(A0(n));return zH[t]||H9},nge=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*Jve;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}},tge=function(n,t){zH["symbol".concat(A0(n))]=t},U9=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=Zve(n,Gve),c=xD(xD({},f),{},{type:i,size:a,sizeType:l}),h=function(){var k=ege(i),_=Tve().type(k).size(nge(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",m4({},b,{className:dn("recharts-symbols",d),transform:"translate(".concat(p,", ").concat(v,")"),d:h()})):null};U9.registerSymbol=tge;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 p4(){return p4=Object.assign?Object.assign.bind():function(e){for(var n=1;n`);var C=v.inactive?c:v.color;return Q.createElement("li",p4({className:k,style:d,key:"legend-item-".concat(b)},Jg(i.props,v,b)),Q.createElement(l4,{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);rm(V9,"displayName","Legend");rm(V9,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"middle",inactiveColor:"#ccc"});var k2,CD;function dge(){if(CD)return k2;CD=1;var e=x0();function n(){this.__data__=new e,this.size=0}return k2=n,k2}var _2,AD;function hge(){if(AD)return _2;AD=1;function e(n){var t=this.__data__,i=t.delete(n);return this.size=t.size,i}return _2=e,_2}var x2,OD;function mge(){if(OD)return x2;OD=1;function e(n){return this.__data__.get(n)}return x2=e,x2}var S2,jD;function pge(){if(jD)return S2;jD=1;function e(n){return this.__data__.has(n)}return S2=e,S2}var C2,ED;function vge(){if(ED)return C2;ED=1;var e=x0(),n=N9(),t=$9(),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,JD;function Ege(){if(JD)return Y2;JD=1;var e=vs(),n=K9(),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]",N="[object Uint8ClampedArray]",H="[object Uint16Array]",P="[object Uint32Array]",z={};z[C]=z[x]=z[E]=z[O]=z[j]=z[M]=z[N]=z[H]=z[P]=!0,z[i]=z[r]=z[k]=z[a]=z[_]=z[o]=z[l]=z[f]=z[c]=z[h]=z[d]=z[p]=z[v]=z[b]=z[w]=!1;function F(G){return t(G)&&n(G.length)&&!!z[e(G)]}return Y2=F,Y2}var K2,e7;function GH(){if(e7)return K2;e7=1;function e(n){return function(t){return n(t)}}return K2=e,K2}var Ch={exports:{}};Ch.exports;var n7;function Tge(){return n7||(n7=1,(function(e,n){var t=dH(),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,t7;function YH(){if(t7)return X2;t7=1;var e=Ege(),n=GH(),t=Tge(),i=t&&t.isTypedArray,r=i?n(i):e;return X2=r,X2}var Z2,i7;function Mge(){if(i7)return Z2;i7=1;var e=Age(),n=G9(),t=Ar(),i=WH(),r=Y9(),a=YH(),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,r7;function Dge(){if(r7)return Q2;r7=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,a7;function KH(){if(a7)return J2;a7=1;function e(n,t){return function(i){return n(t(i))}}return J2=e,J2}var ex,o7;function Rge(){if(o7)return ex;o7=1;var e=KH(),n=e(Object.keys,Object);return ex=n,ex}var nx,s7;function Pge(){if(s7)return nx;s7=1;var e=Dge(),n=Rge(),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,l7;function dp(){if(l7)return tx;l7=1;var e=R9(),n=K9();function t(i){return i!=null&&n(i.length)&&!e(i)}return tx=t,tx}var ix,u7;function T0(){if(u7)return ix;u7=1;var e=Mge(),n=Pge(),t=dp();function i(r){return t(r)?e(r):n(r)}return ix=i,ix}var rx,f7;function Nge(){if(f7)return rx;f7=1;var e=_ge(),n=Cge(),t=T0();function i(r){return e(r,t,n)}return rx=i,rx}var ax,c7;function $ge(){if(c7)return ax;c7=1;var e=Nge(),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,L7;function t1e(){if(L7)return Dx;L7=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 g1e(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 y1e(e){return e.value}function b1e(e,n){if(Q.isValidElement(e))return Q.cloneElement(e,n);if(typeof e=="function")return Q.createElement(e,n);n.ref;var t=v1e(n,l1e);return Q.createElement(V9,t)}var W7=1,Jo=(function(e){function n(){var t;u1e(this,n);for(var i=arguments.length,r=new Array(i),a=0;aW7||Math.abs(r.height-this.lastBoundingBox.height)>W7)&&(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}},b1e(a,Bo(Bo({},this.props),{},{payload:eU(h,c,y1e)})))}}],[{key:"getWithHeight",value:function(i,r){var a=Bo(Bo({},this.defaultProps),i.props),o=a.layout;return o==="vertical"&&We(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,G7;function w1e(){if(G7)return zx;G7=1;var e=cp(),n=G9(),t=Ar(),i=e?e.isConcatSpreadable:void 0;function r(a){return t(a)||n(a)||!!(i&&a&&a[i])}return zx=r,zx}var Lx,Y7;function iU(){if(Y7)return Lx;Y7=1;var e=VH(),n=w1e();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,K7;function k1e(){if(K7)return Ix;K7=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,X7;function _1e(){if(X7)return Bx;X7=1;var e=k1e(),n=e();return Bx=n,Bx}var Fx,Z7;function rU(){if(Z7)return Fx;Z7=1;var e=_1e(),n=T0();function t(i,r){return i&&e(i,r,n)}return Fx=t,Fx}var qx,Q7;function x1e(){if(Q7)return qx;Q7=1;var e=dp();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,rR;function O1e(){if(rR)return Yx;rR=1;var e=z9(),n=L9(),t=_l(),i=aU(),r=S1e(),a=GH(),o=A1e(),l=nd(),f=Ar();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,aR;function j1e(){if(aR)return Kx;aR=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,oR;function E1e(){if(oR)return Xx;oR=1;var e=j1e(),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,cR;function R1e(){if(cR)return n3;cR=1;var e=M1e(),n=D1e(),t=n(e);return n3=t,n3}var t3,dR;function P1e(){if(dR)return t3;dR=1;var e=nd(),n=E1e(),t=R1e();function i(r,a){return t(n(r,a,e),r+"")}return t3=i,t3}var i3,hR;function D0(){if(hR)return i3;hR=1;var e=P9(),n=dp(),t=Y9(),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,mR;function N1e(){if(mR)return r3;mR=1;var e=iU(),n=O1e(),t=P1e(),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 $1e=N1e();const Q9=mt($1e);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 y4(){return y4=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"),We(t)&&n&&We(n.x)&&t=n.y),"".concat(oh,"-top"),We(i)&&n&&We(n.y)&&iw?Math.max(h,f[i]):Math.max(d,f[i])}function Z1e(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 Q1e(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=gR({allowEscapeViewBox:n,coordinate:t,key:"x",offsetTopLeft:i,position:r,reverseDirection:a,tooltipDimension:o.width,viewBox:f,viewBoxDimension:f.width}),d=gR({allowEscapeViewBox:n,coordinate:t,key:"y",offsetTopLeft:i,position:r,reverseDirection:a,tooltipDimension:o.height,viewBox:f,viewBoxDimension:f.height}),c=Z1e({translateX:h,translateY:d,useTranslate3d:l})):c=K1e,{cssProperties:c,cssClasses:X1e({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 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;nwR||Math.abs(i.height-this.state.lastBoundingBox.height)>wR)&&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=Q1e({allowEscapeViewBox:o,coordinate:h,offsetTopLeft:v,position:b,reverseDirection:w,tooltipBox:this.state.lastBoundingBox,useTranslate3d:k,viewBox:_}),E=x.cssClasses,O=x.cssProperties,j=bR(bR({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(N){i.wrapperNode=N}},c)}}])})(A.PureComponent),lye=function(){return!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout)},Iu={isSsr:lye()};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 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 _R(e){for(var n=1;n0;return Q.createElement(sye,{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},yye(c,_R(_R({},this.props),{},{payload:O})))}}])})(A.PureComponent);J9(ca,"displayName","Tooltip");J9(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:!Iu.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,xR;function bye(){if(xR)return o3;xR=1;var e=xo(),n=function(){return e.Date.now()};return o3=n,o3}var s3,SR;function wye(){if(SR)return s3;SR=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,CR;function kye(){if(CR)return l3;CR=1;var e=wye(),n=/^\s+/;function t(i){return i&&i.slice(0,e(i)+1).replace(n,"")}return l3=t,l3}var u3,AR;function cU(){if(AR)return u3;AR=1;var e=kye(),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,OR;function _ye(){if(OR)return f3;OR=1;var e=kl(),n=bye(),t=cU(),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,$=d;return h=d=void 0,k=G,v=l.apply($,U),v}function O(G){return k=G,b=setTimeout(N,f),_?E(G):v}function j(G){var U=G-w,$=G-k,R=f-U;return C?a(R,p-$):R}function M(G){var U=G-w,$=G-k;return w===void 0||U>=f||U<0||C&&$>=p}function N(){var G=n();if(M(G))return H(G);b=setTimeout(N,j(G))}function H(G){return b=void 0,x&&h?E(G):(h=d=void 0,v)}function P(){b!==void 0&&clearTimeout(b),k=0,h=w=d=b=void 0}function z(){return b===void 0?v:H(n())}function F(){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(N,f),E(w)}return b===void 0&&(b=setTimeout(N,f)),v}return F.cancel=P,F.flush=z,F}return f3=o,f3}var c3,jR;function xye(){if(jR)return c3;jR=1;var e=_ye(),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 Sye=xye();const dU=mt(Sye);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 ER(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 Kv(e){for(var n=1;ne.length)&&(n=e.length);for(var t=0,i=new Array(n);t0&&(G=dU(G,w,{trailing:!0,leading:!1}));var U=new ResizeObserver(G),$=O.current.getBoundingClientRect(),R=$.width,I=$.height;return z(R,I),U.observe(O.current),function(){U.disconnect()}},[z,w]);var F=A.useMemo(function(){var G=H.containerWidth,U=H.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 $=lu(o)?G:o,R=lu(f)?U:f;t&&t>0&&($?R=$/t:R&&($=R*t),p&&R>p&&(R=p)),Qo($>0||R>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.`,$,R,o,f,h,d,t);var I=!Array.isArray(v)&&Zo(v.type).endsWith("Chart");return Q.Children.map(v,function(q){return Q.isValidElement(q)?A.cloneElement(q,Kv({width:$,height:R},I?{style:Kv({height:"100%",width:"100%",maxHeight:R,maxWidth:$},q.props.style)}:{})):q})},[t,v,f,p,d,h,H,o]);return Q.createElement("div",{id:k?"".concat(k):void 0,className:dn("recharts-responsive-container",_),style:Kv(Kv({},E),{},{width:o,height:f,minWidth:h,minHeight:d,maxHeight:p}),ref:O},F)}),hU=function(n){return null};hU.displayName="Cell";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 MR(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 _4(e){for(var n=1;n1&&arguments[1]!==void 0?arguments[1]:{};if(n==null||Iu.isSsr)return{width:0,height:0};var i=Lye(t),r=JSON.stringify({text:n,copyStyle:i});if(Tf.widthCache[r])return Tf.widthCache[r];try{var a=document.getElementById(DR);a||(a=document.createElement("span"),a.setAttribute("id",DR),a.setAttribute("aria-hidden","true"),document.body.appendChild(a));var o=_4(_4({},zye),i);Object.assign(a.style,o),a.textContent="".concat(n);var l=a.getBoundingClientRect(),f={width:l.width,height:l.height};return Tf.widthCache[r]=f,++Tf.cacheCount>$ye&&(Tf.cacheCount=0,Tf.widthCache={}),f}catch{return{width:0,height:0}}},Iye=function(n){return{top:n.top+window.scrollY-document.documentElement.clientTop,left:n.left+window.scrollX-document.documentElement.clientLeft}};function um(e){"@babel/helpers - typeof";return um=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},um(e)}function u1(e,n){return Hye(e)||qye(e,n)||Fye(e,n)||Bye()}function Bye(){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 Fye(e,n){if(e){if(typeof e=="string")return RR(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 RR(e,n)}}function RR(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 i0e(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 IR(e,n){return s0e(e)||o0e(e,n)||a0e(e,n)||r0e()}function r0e(){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 a0e(e,n){if(e){if(typeof e=="string")return BR(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 BR(e,n)}}function BR(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 $.reduce(function(R,I){var q=I.word,Y=I.width,D=R[R.length-1];if(D&&(r==null||a||D.width+Y+iI.width?R:I})};if(!h)return v;for(var w="…",k=function($){var R=d.slice(0,$),I=gU({breakAll:c,style:f,children:R+w}).wordsWithComputedWidth,q=p(I),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),N=IR(M,2),H=N[0],P=N[1],z=k(O),F=IR(z,1),G=F[0];if(!H&&!G&&(_=O+1),H&&G&&(C=O-1),!H&&G){E=P;break}x++}return E||v},FR=function(n){var t=Gn(n)?[]:n.toString().split(vU);return[{words:t}]},u0e=function(n){var t=n.width,i=n.scaleToFit,r=n.children,a=n.style,o=n.breakAll,l=n.maxLines;if((t||i)&&!Iu.isSsr){var f,c,h=gU({breakAll:o,children:r,style:a});if(h){var d=h.wordsWithComputedWidth,p=h.spaceWidth;f=d,c=p}else return FR(r);return l0e({breakAll:o,children:r,maxLines:l,style:a},f,c,t,i)}return FR(r)},qR="#808080",f1=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?qR:k,C=LR(n,n0e),x=A.useMemo(function(){return u0e({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,N=C.breakAll,H=LR(C,t0e);if(!_i(i)||!_i(a))return null;var P=i+(We(E)?E:0),z=a+(We(O)?O:0),F;switch(w){case"start":F=d3("calc(".concat(c,")"));break;case"middle":F=d3("calc(".concat((x.length-1)/2," * -").concat(l," + (").concat(c," / 2))"));break;default:F=d3("calc(".concat(x.length-1," * -").concat(l,")"));break}var G=[];if(d){var U=x[0].width,$=C.width;G.push("scale(".concat((We($)?$/U:1)/U,")"))}return j&&G.push("rotate(".concat(j,", ").concat(P,", ").concat(z,")")),G.length&&(H.transform=G.join(" ")),Q.createElement("text",x4({},Hn(H,!0),{x:P,y:z,className:dn("recharts-text",M),textAnchor:v,fill:_.includes("url")?qR:_}),x.map(function(R,I){var q=R.words.join(N?"":" ");return Q.createElement("tspan",{x:P,dy:I===0?F:l,key:"".concat(q,"-").concat(I)},q)}))};function ol(e,n){return e==null||n==null?NaN:en?1:e>=n?0:NaN}function f0e(e,n){return e==null||n==null?NaN:ne?1:n>=e?0:NaN}function nA(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===f0e?e:c0e,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 c0e(){return 0}function yU(e){return e===null?NaN:+e}function*d0e(e,n){for(let t of e)t!=null&&(t=+t)>=t&&(yield t)}const h0e=nA(ol),hp=h0e.right;nA(yU).center;class HR extends Map{constructor(n,t=v0e){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(UR(this,n))}has(n){return super.has(UR(this,n))}set(n,t){return super.set(m0e(this,n),t)}delete(n){return super.delete(p0e(this,n))}}function UR({_intern:e,_key:n},t){const i=n(t);return e.has(i)?e.get(i):t}function m0e({_intern:e,_key:n},t){const i=n(t);return e.has(i)?e.get(i):(e.set(i,t),t)}function p0e({_intern:e,_key:n},t){const i=n(t);return e.has(i)&&(t=e.get(i),e.delete(i)),t}function v0e(e){return e!==null&&typeof e=="object"?e.valueOf():e}function g0e(e=ol){if(e===ol)return bU;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 bU(e,n){return(e==null||!(e>=e))-(n==null||!(n>=n))||(en?1:0)}const y0e=Math.sqrt(50),b0e=Math.sqrt(10),w0e=Math.sqrt(2);function c1(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>=y0e?10:a>=b0e?5:a>=w0e?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 WR(e,n){let t;for(const i of e)i!=null&&(t>i||t===void 0&&i>=i)&&(t=i);return t}function wU(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?bU:g0e(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));wU(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 k0e(e,n,t){if(e=Float64Array.from(d0e(e)),!(!(i=e.length)||isNaN(n=+n))){if(n<=0||i<2)return WR(e);if(n>=1)return VR(e);var i,r=(i-1)*n,a=Math.floor(r),o=VR(wU(e,a).subarray(0,a+1)),l=WR(e.subarray(a+1));return o+(l-o)*(r-a)}}function _0e(e,n,t=yU){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 x0e(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?Zv(n>>24&255,n>>16&255,n>>8&255,(n&255)/255):t===4?Zv(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=C0e.exec(e))?new _r(n[1],n[2],n[3],1):(n=A0e.exec(e))?new _r(n[1]*255/100,n[2]*255/100,n[3]*255/100,1):(n=O0e.exec(e))?Zv(n[1],n[2],n[3],n[4]):(n=j0e.exec(e))?Zv(n[1]*255/100,n[2]*255/100,n[3]*255/100,n[4]):(n=E0e.exec(e))?JR(n[1],n[2]/100,n[3]/100,1):(n=T0e.exec(e))?JR(n[1],n[2]/100,n[3]/100,n[4]):GR.hasOwnProperty(e)?XR(GR[e]):e==="transparent"?new _r(NaN,NaN,NaN,0):null}function XR(e){return new _r(e>>16&255,e>>8&255,e&255,1)}function Zv(e,n,t,i){return i<=0&&(e=n=t=NaN),new _r(e,n,t,i)}function R0e(e){return e instanceof mp||(e=hm(e)),e?(e=e.rgb(),new _r(e.r,e.g,e.b,e.opacity)):new _r}function j4(e,n,t,i){return arguments.length===1?R0e(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}iA(_r,j4,_U(mp,{brighter(e){return e=e==null?d1:Math.pow(d1,e),new _r(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?cm:Math.pow(cm,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),h1(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:ZR,formatHex:ZR,formatHex8:P0e,formatRgb:QR,toString:QR}));function ZR(){return`#${uu(this.r)}${uu(this.g)}${uu(this.b)}`}function P0e(){return`#${uu(this.r)}${uu(this.g)}${uu(this.b)}${uu((isNaN(this.opacity)?1:this.opacity)*255)}`}function QR(){const e=h1(this.opacity);return`${e===1?"rgb(":"rgba("}${mu(this.r)}, ${mu(this.g)}, ${mu(this.b)}${e===1?")":`, ${e})`}`}function h1(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 JR(e,n,t,i){return i<=0?e=n=t=NaN:t<=0||t>=1?e=n=NaN:n<=0&&(e=NaN),new La(e,n,t,i)}function xU(e){if(e instanceof La)return new La(e.h,e.s,e.l,e.opacity);if(e instanceof mp||(e=hm(e)),!e)return new La;if(e instanceof La)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 La(o,l,f,e.opacity)}function N0e(e,n,t,i){return arguments.length===1?xU(e):new La(e,n,t,i??1)}function La(e,n,t,i){this.h=+e,this.s=+n,this.l=+t,this.opacity=+i}iA(La,N0e,_U(mp,{brighter(e){return e=e==null?d1:Math.pow(d1,e),new La(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?cm:Math.pow(cm,e),new La(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 La(eP(this.h),Qv(this.s),Qv(this.l),h1(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=h1(this.opacity);return`${e===1?"hsl(":"hsla("}${eP(this.h)}, ${Qv(this.s)*100}%, ${Qv(this.l)*100}%${e===1?")":`, ${e})`}`}}));function eP(e){return e=(e||0)%360,e<0?e+360:e}function Qv(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 rA=e=>()=>e;function $0e(e,n){return function(t){return e+t*n}}function z0e(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 L0e(e){return(e=+e)==1?SU:function(n,t){return t-n?z0e(n,t,e):rA(isNaN(n)?t:n)}}function SU(e,n){var t=n-e;return t?$0e(e,t):rA(isNaN(e)?n:e)}const nP=(function e(n){var t=L0e(n);function i(r,a){var o=t((r=j4(r)).r,(a=j4(a)).r),l=t(r.g,a.g),f=t(r.b,a.b),c=SU(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 I0e(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:m1(i,r)})),t=m3.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?Z0e: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),m1)))(p)))},d.domain=function(p){return arguments.length?(e=Array.from(p,p1),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=aA,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 oA(){return R0()(ur,ur)}function Q0e(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function v1(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=v1(Math.abs(e)),e?e[1]:NaN}function J0e(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 ebe(e){return function(n){return n.replace(/[0-9]/g,function(t){return e[+t]})}}var nbe=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function mm(e){if(!(n=nbe.exec(e)))throw new Error("invalid format: "+e);var n;return new sA({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]})}mm.prototype=sA.prototype;function sA(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+""}sA.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 tbe(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 g1;function ibe(e,n){var t=v1(e,n);if(!t)return g1=void 0,e.toPrecision(n);var i=t[0],r=t[1],a=r-(g1=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")+v1(e,Math.max(0,n+a-1))[0]}function iP(e,n){var t=v1(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 rP={"%":(e,n)=>(e*100).toFixed(n),b:e=>Math.round(e).toString(2),c:e=>e+"",d:Q0e,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)=>iP(e*100,n),r:iP,s:ibe,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function aP(e){return e}var oP=Array.prototype.map,sP=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function rbe(e){var n=e.grouping===void 0||e.thousands===void 0?aP:J0e(oP.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?aP:ebe(oP.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=mm(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"):rP[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():""),N=(k==="$"?i:/[%p]/.test(j)?o:"")+(p&&p.suffix!==void 0?p.suffix:""),H=rP[j],P=/[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 z(F){var G=M,U=N,$,R,I;if(j==="c")U=H(F)+U,F="";else{F=+F;var q=F<0||1/F<0;if(F=isNaN(F)?f:H(Math.abs(F),E),O&&(F=tbe(F)),q&&+F==0&&w!=="+"&&(q=!1),G=(q?w==="("?w:l:w==="-"||w==="("?"":w)+G,U=(j==="s"&&!isNaN(F)&&g1!==void 0?sP[8+g1/3]:"")+U+(q&&w==="("?")":""),P){for($=-1,R=F.length;++$I||I>57){U=(I===46?r+F.slice($+1):F.slice($))+U,F=F.slice(0,$);break}}}x&&!_&&(F=n(F,1/0));var Y=G.length+F.length+U.length,D=Y>1)+G+F+U+D.slice(Y);break;default:F=D+G+F+U;break}return a(F)}return z.toString=function(){return d+""},z}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=mm(d),d.type="f",d),{suffix:sP[8+v/3]});return function(k){return w(b*k)}}return{format:c,formatPrefix:h}}var Jv,lA,CU;abe({thousands:",",grouping:[3],currency:["$",""]});function abe(e){return Jv=rbe(e),lA=Jv.format,CU=Jv.formatPrefix,Jv}function obe(e){return Math.max(0,-fc(Math.abs(e)))}function sbe(e,n){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(fc(n)/3)))*3-fc(Math.abs(e)))}function lbe(e,n){return e=Math.abs(e),n=Math.abs(n)-e,Math.max(0,fc(n)-fc(e))+1}function AU(e,n,t,i){var r=A4(e,n,t),a;switch(i=mm(i??",f"),i.type){case"s":{var o=Math.max(Math.abs(e),Math.abs(n));return i.precision==null&&!isNaN(a=sbe(r,o))&&(i.precision=a),CU(i,o)}case"":case"e":case"g":case"p":case"r":{i.precision==null&&!isNaN(a=lbe(r,Math.max(Math.abs(e),Math.abs(n))))&&(i.precision=a-(i.type==="e"));break}case"f":case"%":{i.precision==null&&!isNaN(a=obe(r))&&(i.precision=a-(i.type==="%")*2);break}}return lA(i)}function xl(e){var n=e.domain;return e.ticks=function(t){var i=n();return S4(i[0],i[i.length-1],t??10)},e.tickFormat=function(t,i){var r=n();return AU(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=C4(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 y1(){var e=oA();return e.copy=function(){return pp(e,y1())},Aa.apply(e,arguments),xl(e)}function OU(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,p1),t):e.slice()},t.unknown=function(i){return arguments.length?(n=i,t):n},t.copy=function(){return OU(e).unknown(n)},e=arguments.length?Array.from(e,p1):[0,1],xl(t)}function jU(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 hbe(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 fP(e){return(n,t)=>-e(-n,t)}function uA(e){const n=e(lP,uP),t=n.domain;let i=10,r,a;function o(){return r=hbe(i),a=dbe(i),t()[0]<0?(r=fP(r),a=fP(a),e(ube,fbe)):e(lP,uP),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=mm(f)).precision==null&&(f.trim=!0),f=lA(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(jU(t(),{floor:l=>a(Math.floor(r(l))),ceil:l=>a(Math.ceil(r(l)))})),n}function EU(){const e=uA(R0()).domain([1,10]);return e.copy=()=>pp(e,EU()).base(e.base()),Aa.apply(e,arguments),e}function cP(e){return function(n){return Math.sign(n)*Math.log1p(Math.abs(n/e))}}function dP(e){return function(n){return Math.sign(n)*Math.expm1(Math.abs(n))*e}}function fA(e){var n=1,t=e(cP(n),dP(n));return t.constant=function(i){return arguments.length?e(cP(n=+i),dP(n)):n},xl(t)}function TU(){var e=fA(R0());return e.copy=function(){return pp(e,TU()).constant(e.constant())},Aa.apply(e,arguments)}function hP(e){return function(n){return n<0?-Math.pow(-n,e):Math.pow(n,e)}}function mbe(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function pbe(e){return e<0?-e*e:e*e}function cA(e){var n=e(ur,ur),t=1;function i(){return t===1?e(ur,ur):t===.5?e(mbe,pbe):e(hP(t),hP(1/t))}return n.exponent=function(r){return arguments.length?(t=+r,i()):t},xl(n)}function dA(){var e=cA(R0());return e.copy=function(){return pp(e,dA()).exponent(e.exponent())},Aa.apply(e,arguments),e}function vbe(){return dA.apply(null,arguments).exponent(.5)}function mP(e){return Math.sign(e)*e*e}function gbe(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function MU(){var e=oA(),n=[0,1],t=!1,i;function r(a){var o=gbe(e(a));return isNaN(o)?i:t?Math.round(o):o}return r.invert=function(a){return e.invert(mP(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,p1)).map(mP)),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 MU(e.domain(),n).round(t).clamp(e.clamp()).unknown(i)},Aa.apply(r,arguments),xl(r)}function DU(){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 RU().domain([e,n]).range(r).unknown(a)},Aa.apply(xl(o),arguments)}function PU(){var e=[.5],n=[0,1],t,i=1;function r(a){return a!=null&&a<=a?n[hp(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 PU().domain(e).range(n).unknown(t)},Aa.apply(r,arguments)}const p3=new Date,v3=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)=>(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 b1=Ci(()=>{},(e,n)=>{e.setTime(+e+n)},(e,n)=>n-e);b1.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):b1);b1.range;const Vo=1e3,ma=Vo*60,Wo=ma*60,as=Wo*24,hA=as*7,pP=as*30,g3=as*365,fu=Ci(e=>{e.setTime(e-e.getMilliseconds())},(e,n)=>{e.setTime(+e+n*Vo)},(e,n)=>(n-e)/Vo,e=>e.getUTCSeconds());fu.range;const mA=Ci(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Vo)},(e,n)=>{e.setTime(+e+n*ma)},(e,n)=>(n-e)/ma,e=>e.getMinutes());mA.range;const pA=Ci(e=>{e.setUTCSeconds(0,0)},(e,n)=>{e.setTime(+e+n*ma)},(e,n)=>(n-e)/ma,e=>e.getUTCMinutes());pA.range;const vA=Ci(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());vA.range;const gA=Ci(e=>{e.setUTCMinutes(0,0,0)},(e,n)=>{e.setTime(+e+n*Wo)},(e,n)=>(n-e)/Wo,e=>e.getUTCHours());gA.range;const vp=Ci(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);vp.range;const P0=Ci(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 NU=Ci(e=>{e.setUTCHours(0,0,0,0)},(e,n)=>{e.setUTCDate(e.getUTCDate()+n)},(e,n)=>(n-e)/as,e=>Math.floor(e/as));NU.range;function Bu(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)/hA)}const N0=Bu(0),w1=Bu(1),ybe=Bu(2),bbe=Bu(3),cc=Bu(4),wbe=Bu(5),kbe=Bu(6);N0.range;w1.range;ybe.range;bbe.range;cc.range;wbe.range;kbe.range;function Fu(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)/hA)}const $0=Fu(0),k1=Fu(1),_be=Fu(2),xbe=Fu(3),dc=Fu(4),Sbe=Fu(5),Cbe=Fu(6);$0.range;k1.range;_be.range;xbe.range;dc.range;Sbe.range;Cbe.range;const yA=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());yA.range;const bA=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());bA.range;const os=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());os.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)});os.range;const ss=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());ss.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)});ss.range;function $U(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,hA],[n,1,pP],[n,3,3*pP],[e,1,g3]];function l(c,h,d){const p=hk).right(o,p);if(v===o.length)return e.every(A4(c/g3,h/g3,d));if(v===0)return b1.every(Math.max(A4(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?k1.ceil(we):k1(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?w1.ceil(we):w1(we),we=vp.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 N(ae,le,_e,ne){for(var ze=0,we=le.length,Ce=_e.length,Ne,ge;ze=Ce)return-1;if(Ne=le.charCodeAt(ze++),Ne===37){if(Ne=le.charAt(ze++),ge=O[Ne in vP?le.charAt(ze++):Ne],!ge||(ne=ge(ae,_e,ne))<0)return-1}else if(Ne!=_e.charCodeAt(ne++))return-1}return ne}function H(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 P(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 z(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 F(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 N(ae,n,le,_e)}function $(ae,le,_e){return N(ae,t,le,_e)}function R(ae,le,_e){return N(ae,i,le,_e)}function I(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 W(ae){return r[+(ae.getHours()>=12)]}function V(ae){return 1+~~(ae.getMonth()/3)}function L(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 vP={"-":"",_:" ",0:"0"},Di=/^\s*\d+/,Mbe=/^%/,Dbe=/[\\^$*+?|[\]().{}]/g;function ht(e,n,t){var i=e<0?"-":"",r=(i?-e:e)+"",a=r.length;return i+(a[n.toLowerCase(),t]))}function Pbe(e,n,t){var i=Di.exec(n.slice(t,t+1));return i?(e.w=+i[0],t+i[0].length):-1}function Nbe(e,n,t){var i=Di.exec(n.slice(t,t+1));return i?(e.u=+i[0],t+i[0].length):-1}function $be(e,n,t){var i=Di.exec(n.slice(t,t+2));return i?(e.U=+i[0],t+i[0].length):-1}function zbe(e,n,t){var i=Di.exec(n.slice(t,t+2));return i?(e.V=+i[0],t+i[0].length):-1}function Lbe(e,n,t){var i=Di.exec(n.slice(t,t+2));return i?(e.W=+i[0],t+i[0].length):-1}function gP(e,n,t){var i=Di.exec(n.slice(t,t+4));return i?(e.y=+i[0],t+i[0].length):-1}function yP(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 Ibe(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 Bbe(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 Fbe(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 bP(e,n,t){var i=Di.exec(n.slice(t,t+2));return i?(e.d=+i[0],t+i[0].length):-1}function qbe(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 wP(e,n,t){var i=Di.exec(n.slice(t,t+2));return i?(e.H=+i[0],t+i[0].length):-1}function Hbe(e,n,t){var i=Di.exec(n.slice(t,t+2));return i?(e.M=+i[0],t+i[0].length):-1}function Ube(e,n,t){var i=Di.exec(n.slice(t,t+2));return i?(e.S=+i[0],t+i[0].length):-1}function Vbe(e,n,t){var i=Di.exec(n.slice(t,t+3));return i?(e.L=+i[0],t+i[0].length):-1}function Wbe(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 Gbe(e,n,t){var i=Mbe.exec(n.slice(t,t+1));return i?t+i[0].length:-1}function Ybe(e,n,t){var i=Di.exec(n.slice(t));return i?(e.Q=+i[0],t+i[0].length):-1}function Kbe(e,n,t){var i=Di.exec(n.slice(t));return i?(e.s=+i[0],t+i[0].length):-1}function kP(e,n){return ht(e.getDate(),n,2)}function Xbe(e,n){return ht(e.getHours(),n,2)}function Zbe(e,n){return ht(e.getHours()%12||12,n,2)}function Qbe(e,n){return ht(1+vp.count(os(e),e),n,3)}function zU(e,n){return ht(e.getMilliseconds(),n,3)}function Jbe(e,n){return zU(e,n)+"000"}function ewe(e,n){return ht(e.getMonth()+1,n,2)}function nwe(e,n){return ht(e.getMinutes(),n,2)}function twe(e,n){return ht(e.getSeconds(),n,2)}function iwe(e){var n=e.getDay();return n===0?7:n}function rwe(e,n){return ht(N0.count(os(e)-1,e),n,2)}function LU(e){var n=e.getDay();return n>=4||n===0?cc(e):cc.ceil(e)}function awe(e,n){return e=LU(e),ht(cc.count(os(e),e)+(os(e).getDay()===4),n,2)}function owe(e){return e.getDay()}function swe(e,n){return ht(w1.count(os(e)-1,e),n,2)}function lwe(e,n){return ht(e.getFullYear()%100,n,2)}function uwe(e,n){return e=LU(e),ht(e.getFullYear()%100,n,2)}function fwe(e,n){return ht(e.getFullYear()%1e4,n,4)}function cwe(e,n){var t=e.getDay();return e=t>=4||t===0?cc(e):cc.ceil(e),ht(e.getFullYear()%1e4,n,4)}function dwe(e){var n=e.getTimezoneOffset();return(n>0?"-":(n*=-1,"+"))+ht(n/60|0,"0",2)+ht(n%60,"0",2)}function _P(e,n){return ht(e.getUTCDate(),n,2)}function hwe(e,n){return ht(e.getUTCHours(),n,2)}function mwe(e,n){return ht(e.getUTCHours()%12||12,n,2)}function pwe(e,n){return ht(1+P0.count(ss(e),e),n,3)}function IU(e,n){return ht(e.getUTCMilliseconds(),n,3)}function vwe(e,n){return IU(e,n)+"000"}function gwe(e,n){return ht(e.getUTCMonth()+1,n,2)}function ywe(e,n){return ht(e.getUTCMinutes(),n,2)}function bwe(e,n){return ht(e.getUTCSeconds(),n,2)}function wwe(e){var n=e.getUTCDay();return n===0?7:n}function kwe(e,n){return ht($0.count(ss(e)-1,e),n,2)}function BU(e){var n=e.getUTCDay();return n>=4||n===0?dc(e):dc.ceil(e)}function _we(e,n){return e=BU(e),ht(dc.count(ss(e),e)+(ss(e).getUTCDay()===4),n,2)}function xwe(e){return e.getUTCDay()}function Swe(e,n){return ht(k1.count(ss(e)-1,e),n,2)}function Cwe(e,n){return ht(e.getUTCFullYear()%100,n,2)}function Awe(e,n){return e=BU(e),ht(e.getUTCFullYear()%100,n,2)}function Owe(e,n){return ht(e.getUTCFullYear()%1e4,n,4)}function jwe(e,n){var t=e.getUTCDay();return e=t>=4||t===0?dc(e):dc.ceil(e),ht(e.getUTCFullYear()%1e4,n,4)}function Ewe(){return"+0000"}function xP(){return"%"}function SP(e){return+e}function CP(e){return Math.floor(+e/1e3)}var Mf,FU,qU;Twe({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 Twe(e){return Mf=Tbe(e),FU=Mf.format,Mf.parse,qU=Mf.utcFormat,Mf.utcParse,Mf}function Mwe(e){return new Date(e)}function Dwe(e){return e instanceof Date?+e:+new Date(+e)}function wA(e,n,t,i,r,a,o,l,f,c){var h=oA(),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)=>k0e(e,a/i))},t.copy=function(){return WU(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,EP;function Lwe(){if(EP)return _3;EP=1;var e=XU(),n=zwe(),t=nd();function i(r){return r&&r.length?e(r,t,n):void 0}return _3=i,_3}var Iwe=Lwe();const nl=mt(Iwe);var x3,TP;function Bwe(){if(TP)return x3;TP=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 Rt(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(Ur))throw Error(ba+"NaN");if(t.s<1)throw Error(ba+(t.s?"NaN":"-Infinity"));return t.eq(Ur)?new i(0):(Yt=!1,n=es(pm(t,a),pm(e,a),a),Yt=!0,Rt(n,r))};sn.minus=sn.sub=function(e){var n=this;return e=new n.constructor(e),n.s==e.s?eV(n,e):QU(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(ba+"NaN");return t.s?(Yt=!1,n=es(t,e,0,1).times(e),Yt=!0,t.minus(n)):Rt(new i(t),r)};sn.naturalExponential=sn.exp=function(){return JU(this)};sn.naturalLogarithm=sn.ln=function(){return pm(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?QU(n,e):eV(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(ba+"NaN")}for(e=vi(l),Yt=!1,r=Math.sqrt(+l),r==0||r==1/0?(n=ao(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),ao(a.d).slice(0,o)===(n=ao(i.d)).slice(0,o)){if(n=n.slice(o-3,o+1),r==o&&n=="4999"){if(Rt(a,t+1,0),a.times(a).eq(l)){i=a;break}}else if(n!="9999")break;o+=4}return Yt=!0,Rt(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%Ei|0,n=l/Ei|0;a[r]=(a[r]+n)%Ei|0}for(;!a[--o];)a.pop();return n?++t:a.shift(),e.d=a,e.e=t,Yt?Rt(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),Rt(t,e+vi(t)+1,n))};sn.toExponential=function(e,n){var t,i=this,r=i.constructor;return e===void 0?t=Au(i,!0):(vo(e,0,id),n===void 0?n=r.rounding:vo(n,0,8),i=Rt(new r(i),e+1,n),t=Au(i,!0,e+1)),t};sn.toFixed=function(e,n){var t,i,r=this,a=r.constructor;return e===void 0?Au(r):(vo(e,0,id),n===void 0?n=a.rounding:vo(n,0,8),i=Rt(new a(r),e+vi(r)+1,n),t=Au(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 Rt(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(Ur);if(l=new f(l),!l.s){if(e.s<1)throw Error(ba+"Infinity");return l}if(l.eq(Ur))return l;if(i=f.precision,e.eq(Ur))return Rt(l,i);if(n=e.e,t=e.d.length-1,o=n>=t,a=l.s,o){if((t=h<0?-h:h)<=ZU){for(r=new f(Ur),n=Math.ceil(i/qt+4),Yt=!1;t%2&&(r=r.times(l),$P(r.d,n)),t=rd(t/2),t!==0;)l=l.times(l),$P(l.d,n);return Yt=!0,e.s<0?new f(Ur).div(r):Rt(r,i)}}else if(a<0)throw Error(ba+"NaN");return a=a<0&&e.d[Math.max(n,t)]&1?-1:1,l.s=1,Yt=!1,r=e.times(pm(l,i+c)),Yt=!0,r=JU(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=Au(r,t<=a.toExpNeg||t>=a.toExpPos)):(vo(e,1,id),n===void 0?n=a.rounding:vo(n,0,8),r=Rt(new a(r),e,n),t=vi(r),i=Au(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)),Rt(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 Au(e,n<=t.toExpNeg||n>=t.toExpPos)};function QU(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?Rt(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)/Ei|0,f[a]%=Ei;for(t&&(f.unshift(t),++r),l=f.length;f[--l]==0;)f.pop();return n.d=f,n.e=r,Yt?Rt(n,d):n}function vo(e,n,t){if(e!==~~e||et)throw Error(pu+e)}function ao(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,N,H=i.constructor,P=i.s==r.s?1:-1,z=i.d,F=r.d;if(!i.s)return new H(i);if(!r.s)throw Error(ba+"Division by zero");for(f=i.e-r.e,M=F.length,O=z.length,v=new H(P),b=v.d=[],c=0;F[c]==(z[c]||0);)++c;if(F[c]>(z[c]||0)&&--f,a==null?C=a=H.precision:o?C=a+(vi(i)-vi(r))+1:C=a,C<0)return new H(0);if(C=C/qt+2|0,c=0,M==1)for(h=0,F=F[0],C++;(c1&&(F=e(F,h),z=e(z,h),M=F.length,O=z.length),E=M,w=z.slice(0,M),k=w.length;k=Ei/2&&++j;do h=0,l=n(F,w,M,k),l<0?(_=w[0],M!=k&&(_=_*Ei+(w[1]||0)),h=_/j|0,h>1?(h>=Ei&&(h=Ei-1),d=e(F,h),p=d.length,k=w.length,l=n(d,w,p,k),l==1&&(h--,t(d,M16)throw Error(xA+vi(e));if(!e.s)return new h(Ur);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(Ur),h.precision=l;;){if(r=Rt(r.times(e),l),t=t.times(++f),o=a.plus(es(r,t,l)),ao(o.d).slice(0,l)===ao(a.d).slice(0,l)){for(;c--;)a=Rt(a.times(a),l);return h.precision=d,n==null?(Yt=!0,Rt(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(ba+"LN10 precision limit exceeded");return Rt(new e(e.LN10),n)}function Ks(e){for(var n="";e--;)n+="0";return n}function pm(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(ba+(v.s?"NaN":"-Infinity"));if(v.eq(Ur))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=ao(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=ao(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=pm(new w(i+"."+t.slice(1)),c-p).plus(f),w.precision=k,n==null?(Yt=!0,Rt(v,k)):v;for(l=o=v=es(v.minus(Ur),v.plus(Ur),c),h=Rt(v.times(v),c),r=3;;){if(o=Rt(o.times(h),c),f=l.plus(es(o,new w(r),c)),ao(f.d).slice(0,c)===ao(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,Rt(l,k)):l;l=f,r+=2}}function NP(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),i_1||e.e<-_1))throw Error(xA+t)}else e.s=0,e.e=0,e.d=[0];return e}function Rt(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)==Ei&&(d[0]=1,++e.e);break}else{if(d[h]+=a,d[h]!=Ei)break;d[h--]=0,a=1}for(i=d.length;d[--i]===0;)d.pop();if(Yt&&(e.e>_1||e.e<-_1))throw Error(xA+vi(e));return e}function eV(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?Rt(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 $P(e,n){if(e.length>n)return e.length=n,!0}function nV(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 NP(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,Xwe.test(a))NP(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=nV,r.config=r.set=Zwe,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 SA=nV(Kwe);Ur=new SA(1);const jt=SA;function Qwe(e){return tke(e)||nke(e)||eke(e)||Jwe()}function Jwe(){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 eke(e,n){if(e){if(typeof e=="string")return M4(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 M4(e,n)}}function nke(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function tke(e){if(Array.isArray(e))return M4(e)}function M4(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,zP(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 gke(e){if(Array.isArray(e))return e}function oV(e){var n=vm(e,2),t=n[0],i=n[1],r=t,a=i;return t>i&&(r=i,a=t),[r,a]}function sV(e,n,t){if(e.lte(0))return new jt(0);var i=F0.getDigitCount(e.toNumber()),r=new jt(10).pow(i),a=e.div(r),o=i!==1?.05:.1,l=new jt(Math.ceil(a.div(o).toNumber())).add(t).mul(o),f=l.mul(r);return n?f:new jt(Math.ceil(f))}function yke(e,n,t){var i=1,r=new jt(e);if(!r.isint()&&t){var a=Math.abs(e);a<1?(i=new jt(10).pow(F0.getDigitCount(e)-1),r=new jt(Math.floor(r.div(i).toNumber())).mul(i)):a>1&&(r=new jt(Math.floor(e)))}else e===0?r=new jt(Math.floor((n-1)/2)):t||(r=new jt(Math.floor(e)));var o=Math.floor((n-1)/2),l=oke(ake(function(f){return r.add(new jt(f-o).mul(i)).toNumber()}),D4);return l(0,n)}function lV(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 jt(0),tickMin:new jt(0),tickMax:new jt(0)};var a=sV(new jt(n).sub(e).div(t-1),i,r),o;e<=0&&n>=0?o=new jt(0):(o=new jt(e).add(n).div(2),o=o.sub(new jt(o).mod(a)));var l=Math.ceil(o.sub(e).div(a).toNumber()),f=Math.ceil(new jt(n).sub(o).div(a).toNumber()),c=l+f+1;return c>t?lV(e,n,t,i,r+1):(c0?f+(t-c):f,l=n>0?l:l+(t-c)),{step:a,tickMin:o.sub(new jt(l).mul(a)),tickMax:o.add(new jt(f).mul(a))})}function bke(e){var n=vm(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=oV([t,i]),f=vm(l,2),c=f[0],h=f[1];if(c===-1/0||h===1/0){var d=h===1/0?[c].concat(P4(D4(0,r-1).map(function(){return 1/0}))):[].concat(P4(D4(0,r-1).map(function(){return-1/0})),[h]);return t>i?R4(d):d}if(c===h)return yke(c,r,a);var p=lV(c,h,o,a),v=p.step,b=p.tickMin,w=p.tickMax,k=F0.rangeStep(b,w.add(new jt(.1).mul(v)),v);return t>i?R4(k):k}function wke(e,n){var t=vm(e,2),i=t[0],r=t[1],a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,o=oV([i,r]),l=vm(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=sV(new jt(c).sub(f).div(h-1),a,0),p=[].concat(P4(F0.rangeStep(new jt(f),new jt(c).sub(new jt(.99).mul(d)),d)),[c]);return i>r?R4(p):p}var kke=rV(bke),_ke=rV(wke),xke="Invariant failed";function Ou(e,n){throw new Error(xke)}var Ske=["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 x1(){return x1=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 Mke(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 Dke(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function Rke(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(Fa(d-h)!==Fa(p-d)){var b=[];if(Fa(p-d)===Fa(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},CA=function(n){var t,i=n,r=i.type.displayName,a=(t=n.type)!==null&&t!==void 0&&t.defaultProps?ni(ni({},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 C=_[0].type.defaultProps,x=C!==void 0?ni(ni({},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:Cu(j,i,0)})}}return o},Zke=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=Cu(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(BP(E),[j]);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 _=Cu(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(BP(E),[{item:O.item,position:{offset:_+(C+c)*j+(C-x)/2,size:x}}]);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},Qke=function(n,t,i,r){var a=i.children,o=i.width,l=i.margin,f=o-(l.left||0)-(l.right||0),c=dV({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"&&We(n[v]))return ni(ni({},n),{},Yf({},v,n[v]+(d||0)));if((w==="horizontal"||w==="vertical"&&v==="center")&&b!=="middle"&&We(n[b]))return ni(ni({},n),{},Yf({},b,n[b]+(p||0)))}return n},Jke=function(n,t,i){return Gn(t)?!0:n==="horizontal"?t==="yAxis":n==="vertical"||i==="x"?t==="xAxis":i==="y"?t==="yAxis":!0},hV=function(n,t,i,r,a){var o=t.props.children,l=va(o,gp).filter(function(c){return Jke(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},e_e=function(n,t,i,r,a){var o=t.map(function(l){return hV(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},mV=function(n,t,i,r,a){var o=t.map(function(f){var c=f.props.dataKey;return i==="number"&&c&&hV(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?Fa(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,eg=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},n_e=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:fm(),realScaleType:"band"}:o==="radial"&&l==="angleAxis"?{scale:y1(),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:fm(),realScaleType:"band"}:{scale:y1(),realScaleType:"linear"};if(Su(r)){var f="scale".concat(A0(r));return{scale:(AP[f]||zh)(),realScaleType:AP[f]?f:"point"}}return In(r)?{scale:r}:{scale:zh(),realScaleType:"point"}},qP=1e-4,t_e=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])-qP,o=Math.max(r[0],r[1])+qP,l=n(t[0]),f=n(t[i-1]);(lo||fo)&&n.domain([t[0],t[i-1]])}},i_e=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])}},o_e=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)}},s_e={sign:a_e,expand:Uve,none:ac,silhouette:Vve,wiggle:Wve,positive:o_e},l_e=function(n,t,i){var r=t.map(function(l){return l.props.dataKey}),a=s_e[i],o=Hve().keys(r).value(function(l,f){return+cr(l,f,0)}).order(h4).offset(a);return o(n)},u_e=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?ni(ni({},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 ni(ni({},d),{},Yf({},_,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 ni(ni({},w),{},Yf({},k,{numericAxisId:i,cateAxisId:r,items:_.items,stackedData:l_e(n,_.items,a)}))},b)}return ni(ni({},d),{},Yf({},p,v))},h)},f_e=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=kke(c,a,l);return n.domain([I0(h),nl(h)]),{niceTicks:h}}if(a&&r==="number"){var d=n.domain(),p=_ke(d,a,l);return{niceTicks:p}}return null};function C1(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=Zg(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 HP=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},c_e=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]},d_e=function(n,t){var i,r=(i=n.type)!==null&&i!==void 0&&i.defaultProps?ni(ni({},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},h_e=function(n){return n.reduce(function(t,i){return[I0(i.concat([t[0]]).filter(We)),nl(i.concat([t[1]]).filter(We))]},[1/0,-1/0])},gV=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=h_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})},UP=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,VP=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,L4=function(n,t,i){if(In(n))return n(t,i);if(!Array.isArray(n))return t;var r=[];if(We(n[0]))r[0]=i?n[0]:Math.min(n[0],t[0]);else if(UP.test(n[0])){var a=+UP.exec(n[0])[1];r[0]=t[0]-a}else In(n[0])?r[0]=n[0](t[0]):r[0]=t[0];if(We(n[1]))r[1]=i?n[1]:Math.max(n[1],t[1]);else if(VP.test(n[1])){var o=+VP.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},A1=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=Q9(t,function(d){return d.coordinate}),o=1/0,l=1,f=a.length;lo&&(c=2*Math.PI-c),{radius:l,angle:g_e(c),angleInRadian:c}},w_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}},k_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},KP=function(n,t){var i=n.x,r=n.y,a=b_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=w_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?YP(YP({},t),{},{radius:o,angle:k_e(v,t)}):null};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)}var __e=["offset"];function x_e(e){return O_e(e)||A_e(e)||C_e(e)||S_e()}function S_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 C_e(e,n){if(e){if(typeof e=="string")return I4(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 I4(e,n)}}function A_e(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function O_e(e){if(Array.isArray(e))return I4(e)}function I4(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 E_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 XP(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),N=Gn(n.id)?ed("recharts-radial-line-"):n.id;return Q.createElement("text",km({},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))},$_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"}},z_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)&&(We(a.x)||lu(a.x))&&(We(a.y)||lu(a.y))?bi({x:l+Cu(a.x,c),y:f+Cu(a.y,h),textAnchor:"end",verticalAnchor:"end"},M):bi({x:l+c/2,y:f+h/2,textAnchor:"middle",verticalAnchor:"middle"},M)},L_e=function(n){return"cx"in n&&We(n.cx)};function ti(e){var n=e.offset,t=n===void 0?5:n,i=j_e(e,__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=R_e(r);var b=L_e(a),w=Hn(r,!0);if(b&&(o==="insideStart"||o==="insideEnd"||o==="end"))return N_e(r,v,w);var k=b?$_e(r):z_e(r);return Q.createElement(f1,km({className:dn("recharts-label",d)},w,k,{breakAll:p}),v)}ti.displayName="Label";var bV=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(We(w)&&We(k)){if(We(d)&&We(p))return{x:d,y:p,width:w,height:k};if(We(v)&&We(b))return{x:v,y:b,width:w,height:k}}return We(d)&&We(p)?{x:d,y:p,width:0,height:0}:We(t)&&We(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:{}},I_e=function(n,t){return n?n===!0?Q.createElement(ti,{key:"label-implicit",viewBox:t}):_i(n)?Q.createElement(ti,{key:"label-implicit",viewBox:t,value:n}):A.isValidElement(n)?n.type===ti?A.cloneElement(n,{key:"label-implicit",viewBox:t}):Q.createElement(ti,{key:"label-implicit",content:n,viewBox:t}):In(n)?Q.createElement(ti,{key:"label-implicit",content:n,viewBox:t}):Qc(n)?Q.createElement(ti,km({viewBox:t},n,{key:"label-implicit"})):null:null},B_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=bV(n),o=va(r,ti).map(function(f,c){return A.cloneElement(f,{viewBox:t||a,key:"label-".concat(c)})});if(!i)return o;var l=I_e(n.label,t||a);return[l].concat(x_e(o))};ti.parseViewBox=bV;ti.renderCallByParent=B_e;var T3,ZP;function F_e(){if(ZP)return T3;ZP=1;function e(n){var t=n==null?0:n.length;return t?n[t-1]:void 0}return T3=e,T3}var q_e=F_e();const H_e=mt(q_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)}var U_e=["valueAccessor"],V_e=["data","dataKey","clockWise","id","textBreakAll"];function W_e(e){return X_e(e)||K_e(e)||Y_e(e)||G_e()}function G_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 Y_e(e,n){if(e){if(typeof e=="string")return B4(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 B4(e,n)}}function K_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 B4(e)}function B4(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 e2e(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 n2e=function(n){return Array.isArray(n.value)?H_e(n.value):n.value};function fo(e){var n=e.valueAccessor,t=n===void 0?n2e:n,i=eN(e,U_e),r=i.data,a=i.dataKey,o=i.clockWise,l=i.id,f=i.textBreakAll,c=eN(i,V_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(ti,j1({},Hn(h,!0),c,v,{parentViewBox:h.parentViewBox,value:p,textBreakAll:f,viewBox:ti.parseViewBox(Gn(o)?h:JP(JP({},h),{},{clockWise:o})),key:"label-".concat(d),index:d}))}))}fo.displayName="LabelList";function t2e(e,n){return e?e===!0?Q.createElement(fo,{key:"labelList-implicit",data:n}):Q.isValidElement(e)||In(e)?Q.createElement(fo,{key:"labelList-implicit",data:n,content:e}):Qc(e)?Q.createElement(fo,j1({data:n},e,{key:"labelList-implicit"})):null:null}function i2e(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,fo).map(function(o,l){return A.cloneElement(o,{data:n,key:"labelList-".concat(l)})});if(!t)return r;var a=t2e(e.label,n);return[a].concat(W_e(r))}fo.renderCallByParent=i2e;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 F4(){return F4=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},l2e=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=Fa(h-c),p=ng({cx:t,cy:i,radius:a,angle:c,sign:d,cornerRadius:o,cornerIsExternal:f}),v=p.circleTangency,b=p.lineTangency,w=p.theta,k=ng({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 + `):wV({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=ng({cx:t,cy:i,radius:r,angle:c,sign:d,isExternal:!0,cornerRadius:o,cornerIsExternal:f}),M=j.circleTangency,N=j.lineTangency,H=j.theta,P=ng({cx:t,cy:i,radius:r,angle:h,sign:-d,isExternal:!0,cornerRadius:o,cornerIsExternal:f}),z=P.circleTangency,F=P.lineTangency,G=P.theta,U=f?Math.abs(c-h):Math.abs(c-h)-H-G;if(U<0&&o===0)return"".concat(O,"L").concat(t,",").concat(i,"Z");O+="L".concat(F.x,",").concat(F.y,` + A`).concat(o,",").concat(o,",0,0,").concat(+(d<0),",").concat(z.x,",").concat(z.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},u2e={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},kV=function(n){var t=tN(tN({},u2e),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=l2e({cx:i,cy:r,innerRadius:a,outerRadius:o,cornerRadius:Math.min(w,b/2),forceCornerRadius:f,cornerIsExternal:c,startAngle:h,endAngle:d}):k=wV({cx:i,cy:r,innerRadius:a,outerRadius:o,startAngle:h,endAngle:d}),Q.createElement("path",F4({},Hn(t,!0),{className:v,d:k,role:"img"}))};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 q4(){return q4=Object.assign?Object.assign.bind():function(e){for(var n=1;ng2e.call(e,n));function qu(e,n){return e===n||!e&&!n&&e!==e&&n!==n}const w2e="__v",k2e="__o",_2e="_owner",{getOwnPropertyDescriptor:sN,keys:lN}=Object;function x2e(e,n){return e.byteLength===n.byteLength&&E1(new Uint8Array(e),new Uint8Array(n))}function S2e(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 C2e(e,n){return e.byteLength===n.byteLength&&E1(new Uint8Array(e.buffer,e.byteOffset,e.byteLength),new Uint8Array(n.buffer,n.byteOffset,n.byteLength))}function A2e(e,n){return qu(e.getTime(),n.getTime())}function O2e(e,n){return e.name===n.name&&e.message===n.message&&e.cause===n.cause&&e.stack===n.stack}function j2e(e,n){return e===n}function uN(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 E2e=qu;function T2e(e,n,t){const i=lN(e);let r=i.length;if(lN(n).length!==r)return!1;for(;r-- >0;)if(!_V(e,n,t,i[r]))return!1;return!0}function hh(e,n,t){const i=oN(e);let r=i.length;if(oN(n).length!==r)return!1;let a,o,l;for(;r-- >0;)if(a=i[r],!_V(e,n,t,a)||(o=sN(e,a),l=sN(n,a),(o||l)&&(!o||!l||o.configurable!==l.configurable||o.enumerable!==l.enumerable||o.writable!==l.writable)))return!1;return!0}function M2e(e,n){return qu(e.valueOf(),n.valueOf())}function D2e(e,n){return e.source===n.source&&e.flags===n.flags}function fN(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 E1(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 R2e(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 _V(e,n,t,i){return(i===_2e||i===k2e||i===w2e)&&(e.$$typeof||n.$$typeof)?!0:b2e(n,i)&&t.equals(e[i],n[i],i,i,e,n,t)}const P2e="[object ArrayBuffer]",N2e="[object Arguments]",$2e="[object Boolean]",z2e="[object DataView]",L2e="[object Date]",I2e="[object Error]",B2e="[object Map]",F2e="[object Number]",q2e="[object Object]",H2e="[object RegExp]",U2e="[object Set]",V2e="[object String]",W2e={"[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},G2e="[object URL]",Y2e=Object.prototype.toString;function K2e({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=Y2e.call(k);if(O===L2e)return i(k,_,C);if(O===H2e)return h(k,_,C);if(O===B2e)return o(k,_,C);if(O===U2e)return d(k,_,C);if(O===q2e)return typeof k.then!="function"&&typeof _.then!="function"&&f(k,_,C);if(O===G2e)return v(k,_,C);if(O===I2e)return r(k,_,C);if(O===N2e)return f(k,_,C);if(W2e[O])return p(k,_,C);if(O===P2e)return e(k,_,C);if(O===z2e)return t(k,_,C);if(O===$2e||O===F2e||O===V2e)return c(k,_,C);if(b){let j=b[O];if(!j){const M=y2e(k);M&&(j=b[M])}if(j)return j(k,_,C)}return!1}}function X2e({circular:e,createCustomConfig:n,strict:t}){let i={areArrayBuffersEqual:x2e,areArraysEqual:t?hh:S2e,areDataViewsEqual:C2e,areDatesEqual:A2e,areErrorsEqual:O2e,areFunctionsEqual:j2e,areMapsEqual:t?M3(uN,hh):uN,areNumbersEqual:E2e,areObjectsEqual:t?hh:T2e,arePrimitiveWrappersEqual:M2e,areRegExpsEqual:D2e,areSetsEqual:t?M3(fN,hh):fN,areTypedArraysEqual:t?M3(E1,hh):E1,areUrlsEqual:R2e,unknownTagComparators:void 0};if(n&&(i=Object.assign({},i,n(i))),e){const r=ig(i.areArraysEqual),a=ig(i.areMapsEqual),o=ig(i.areObjectsEqual),l=ig(i.areSetsEqual);i=Object.assign({},i,{areArraysEqual:r,areMapsEqual:a,areObjectsEqual:o,areSetsEqual:l})}return i}function Z2e(e){return function(n,t,i,r,a,o,l){return e(n,t,l)}}function Q2e({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 J2e=Cl();Cl({strict:!0});Cl({circular:!0});Cl({circular:!0,strict:!0});Cl({createInternalComparator:()=>qu});Cl({strict:!0,createInternalComparator:()=>qu});Cl({circular:!0,createInternalComparator:()=>qu});Cl({circular:!0,createInternalComparator:()=>qu,strict:!0});function Cl(e={}){const{circular:n=!1,createInternalComparator:t,createState:i,strict:r=!1}=e,a=X2e(e),o=K2e(a),l=t?t(o):Z2e(o);return Q2e({circular:n,comparator:o,createState:i,equals:l,strict:r})}function exe(e){typeof requestAnimationFrame<"u"&&requestAnimationFrame(e)}function cN(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):exe(r)};requestAnimationFrame(i)}function H4(e){"@babel/helpers - typeof";return H4=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},H4(e)}function nxe(e){return axe(e)||rxe(e)||ixe(e)||txe()}function txe(){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 ixe(e,n){if(e){if(typeof e=="string")return dN(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 dN(e,n)}}function dN(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 $xe(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 Bxe(e)||Ixe(e)||Lxe(e)||zxe()}function zxe(){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 Lxe(e,n){if(e){if(typeof e=="string")return Y4(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 Y4(e,n)}}function Ixe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Bxe(e){if(Array.isArray(e))return Y4(e)}function Y4(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 D1(e){return D1=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},D1(e)}var go=(function(e){Vxe(t,e);var n=Wxe(t);function t(i,r){var a;Fxe(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(Z4(a)),a.changeStyle=a.changeStyle.bind(Z4(a)),!l||v<=0)return a.state={style:{}},typeof p=="function"&&(a.state={style:h}),X4(a);if(d&&d.length)a.state={style:d[0].style};else if(c){if(typeof p=="function")return a.state={style:c},X4(a);a.state={style:f?Ah({},f,c):c}}else a.state={style:{}};return a}return Hxe(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(!(J2e(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(Pa(Pa({},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=Rxe(o,l,_xe(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,N=_>0?o[_-1]:k,H=j||Object.keys(O);if(typeof E=="function"||E==="spring")return[].concat(D3(w),[a.runJSAnimation.bind(a,{from:N.style,to:O,duration:C,easing:E}),C]);var P=pN(H,C,E),z=Pa(Pa(Pa({},N.style),O),{},{transition:P});return[].concat(D3(w),[z,C,M]).filter(fxe)};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=oxe());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=pN(Object.keys(w),o,c);b.start([h,a,Pa(Pa({},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=Nxe(r,Pxe),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,Pa(Pa({},f),{},{style:Pa(Pa({},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 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 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);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},t3e=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},i3e={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},jm=function(n){var t=xN(xN({},i3e),n),i=A.useRef(),r=A.useState(-1),a=Yxe(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,N=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",R1({},Hn(t,!0),{className:x,d:SN(M,N,O,j,p),ref:i})))}):Q.createElement("path",R1({},Hn(t,!0),{className:x,d:SN(f,c,h,d,p)}))};function Q4(){return Q4=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 f3e(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 c3e=function(n,t,i,r,a,o){return"M".concat(n,",").concat(a,"v").concat(r,"M").concat(o,",").concat(t,"h").concat(i)},d3e=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=u3e(n,r3e),k=a3e({x:i,y:a,top:l,left:c,width:d,height:v},w);return!We(i)||!We(a)||!We(d)||!We(v)||!We(l)||!We(c)?null:Q.createElement("path",J4({},Hn(k,!0),{className:dn("recharts-cross",b),d:c3e(i,a,d,v,l,c)}))},R3,AN;function h3e(){if(AN)return R3;AN=1;var e=KH(),n=e(Object.getPrototypeOf,Object);return R3=n,R3}var P3,ON;function m3e(){if(ON)return P3;ON=1;var e=vs(),n=h3e(),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 p3e=m3e();const v3e=mt(p3e);var N3,jN;function g3e(){if(jN)return N3;jN=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 y3e=g3e();const b3e=mt(y3e);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 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);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,N=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",P1({},Hn(t,!0),{className:C,d:DN(M,N,E,O,j),ref:i})))}):Q.createElement("g",null,Q.createElement("path",P1({},Hn(t,!0),{className:C,d:DN(f,c,h,d,p)})))},T3e=["option","shapeType","propTransformer","activeClassName","isActive"];function Mm(e){"@babel/helpers - typeof";return Mm=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},Mm(e)}function M3e(e,n){if(e==null)return{};var t=D3e(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 D3e(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 RN(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 N1(e){for(var n=1;n0&&i.handleDrag(r.changedTouches[0])}),Fr(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()}),Fr(i,"handleLeaveWrapper",function(){(i.state.isTravellerMoving||i.state.isSlideMoving)&&(i.leaveTimer=window.setTimeout(i.handleDragEnd,i.props.leaveTimeOut))}),Fr(i,"handleEnterSlideOrTraveller",function(){i.setState({isTextActive:!0})}),Fr(i,"handleLeaveSlideOrTraveller",function(){i.setState({isTextActive:!1})}),Fr(i,"handleSlideDragStart",function(r){var a=HN(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 oSe(n,e),tSe(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=HN(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 N=k.length-1;return o==="startX"&&(l>f?E%w===0:O%w===0)||lf?O%w===0:E%w===0)||l>f&&O===N};this.setState(Fr(Fr({},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(Fr({},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(f1,z1({textAnchor:"end",verticalAnchor:"middle",x:Math.min(d,p)-v,y:o+l/2},b),this.getTextOfTick(r)),Q.createElement(f1,z1({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||!We(l)||!We(f)||!We(c)||!We(h)||c<=0||h<=0)return null;var x=dn("recharts-brush",a),E=Q.Children.count(o)===1,O=eSe("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?lSe({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);Fr(gc,"displayName","Brush");Fr(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,UN;function uSe(){if(UN)return F3;UN=1;var e=Z9();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,VN;function fSe(){if(VN)return q3;VN=1;var e=qH(),n=_l(),t=uSe(),i=Ar(),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 cSe=fSe();const dSe=mt(cSe);var co=function(n,t){var i=n.alwaysShow,r=n.ifOverflow;return i&&(r="extendDomain"),r===t},H3,WN;function hSe(){if(WN)return H3;WN=1;var e=oU();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,GN;function mSe(){if(GN)return U3;GN=1;var e=hSe(),n=rU(),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 pSe=mSe();const vSe=mt(pSe);var V3,YN;function gSe(){if(YN)return V3;YN=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 ASe(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 OSe(e,n){var t=e.x,i=e.y,r=CSe(e,kSe),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 QN(e){return Q.createElement(I3e,n6({shapeType:"rectangle",propTransformer:OSe,activeClassName:"recharts-active-bar"},e))}var jSe=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=We(i)||Ipe(i);return a?n(i,r):(a||Ou(),t)}},ESe=["value","background"],PV;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 TSe(e,n){if(e==null)return{};var t=MSe(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 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 I1(){return I1=Object.assign?Object.assign.bind():function(e){for(var n=1;n0&&Math.abs($)0&&Math.abs(U)0&&(G=Math.min((X||0)-(U[ee-1]||0),G))}),Number.isFinite(G)){var $=G/F,R=w.layout==="vertical"?i.height:i.width;if(w.padding==="gap"&&(M=$*R/2),w.padding==="no-gap"){var I=Cu(n.barCategoryGap,$*R),q=$*R/2;M=q-I-(q-I)/R*I}}}r==="xAxis"?N=[i.left+(x.left||0)+(M||0),i.left+i.width-(x.right||0)-(M||0)]:r==="yAxis"?N=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)]:N=w.range,O&&(N=[N[1],N[0]]);var Y=n_e(w,a,p),D=Y.scale,W=Y.realScaleType;D.domain(_).range(N),t_e(D);var V=f_e(D,Na(Na({},w),{},{realScaleType:W}));r==="xAxis"?(z=k==="top"&&!E||k==="bottom"&&E,H=i.left,P=d[j]-z*w.height):r==="yAxis"&&(z=k==="left"&&!E||k==="right"&&E,H=d[j]-z*w.width,P=i.top);var L=Na(Na(Na({},w),V),{},{realScaleType:W,x:H,y:P,scale:D,width:r==="xAxis"?i.width:w.width,height:r==="yAxis"?i.height:w.height});return L.bandSize=A1(L,V),!w.hide&&r==="xAxis"?d[j]+=(z?-1:1)*L.height:w.hide||(d[j]+=(z?-1:1)*L.width),Na(Na({},v),{},V0({},b,L))},{})},LV=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)}},qSe=function(n){var t=n.x1,i=n.y1,r=n.x2,a=n.y2;return LV({x:t,y:i},{x:r,y:a})},IV=(function(){function e(n){ISe(this,e),this.scale=n}return BSe(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(IV,"EPS",1e-4);var OA=function(n){var t=Object.keys(n).reduce(function(i,r){return Na(Na({},i),{},V0({},r,IV.create(n[r])))},{});return Na(Na({},t),{},{apply:function(r){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=a.bandAware,l=a.position;return vSe(r,function(f,c){return t[c].apply(f,{bandAware:o,position:l})})},isInRange:function(r){return RV(r,function(a,o){return t[o].isInRange(a)})}})};function HSe(e){return(e%180+180)%180}var USe=function(n){var t=n.width,i=n.height,r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,a=HSe(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,r$;function WSe(){if(r$)return K3;r$=1;var e=EV();function n(t){var i=e(t),r=i%1;return i===i?r?i-r:i:0}return K3=n,K3}var X3,a$;function GSe(){if(a$)return X3;a$=1;var e=JH(),n=_l(),t=WSe(),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,o$;function YSe(){if(o$)return Z3;o$=1;var e=VSe(),n=GSe(),t=e(n);return Z3=t,Z3}var KSe=YSe();const XSe=mt(KSe);var ZSe=mH();const QSe=mt(ZSe);var JSe=QSe(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("")}),jA=A.createContext(void 0),EA=A.createContext(void 0),BV=A.createContext(void 0),FV=A.createContext({}),qV=A.createContext(void 0),HV=A.createContext(0),UV=A.createContext(0),s$=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=JSe(a);return Q.createElement(jA.Provider,{value:i},Q.createElement(EA.Provider,{value:r},Q.createElement(FV.Provider,{value:a},Q.createElement(BV.Provider,{value:h},Q.createElement(qV.Provider,{value:o},Q.createElement(HV.Provider,{value:c},Q.createElement(UV.Provider,{value:f},l)))))))},e4e=function(){return A.useContext(qV)},VV=function(n){var t=A.useContext(jA);t==null&&Ou();var i=t[n];return i==null&&Ou(),i},n4e=function(){var n=A.useContext(jA);return Zs(n)},t4e=function(){var n=A.useContext(EA),t=XSe(n,function(i){return RV(i.domain,Number.isFinite)});return t||Zs(n)},WV=function(n){var t=A.useContext(EA);t==null&&Ou();var i=t[n];return i==null&&Ou(),i},i4e=function(){var n=A.useContext(BV);return n},r4e=function(){return A.useContext(FV)},TA=function(){return A.useContext(UV)},MA=function(){return A.useContext(HV)};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 a4e(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function o4e(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 F4e(e,n){return JV(e,n+1)}function q4e(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:JV(i,c)};var w=f,k,_=function(){return k===void 0&&(k=t(b,w)),k},C=b.coordinate,x=f===0||U1(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 $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 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 Ki(e){for(var n=1;n0?v.coordinate-k*e:v.coordinate})}else a[p]=v=Ki(Ki({},v),{},{tickCoord:v.coordinate});var _=U1(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 G4e(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=U1(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=U1(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?Fa(r[1].coordinate-r[0].coordinate):1,_=B4e(a,k,v);return f==="equidistantPreserveStart"?q4e(k,_,w,r,o):(f==="preserveStart"||f==="preserveStartEnd"?p=G4e(k,_,w,r,o,f==="preserveStartEnd"):p=W4e(k,_,w,r,o),p.filter(function(C){return C.isShow}))}var Y4e=["viewBox"],K4e=["viewBox"],X4e=["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 Bf(){return Bf=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 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}function Q4e(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function g$(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),ti.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(f1,Bf({},r,{className:"recharts-cartesian-axis-tick-value"}),a),o}}])})(A.Component);PA(ad,"displayName","CartesianAxis");PA(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 a6e=["x1","y1","x2","y2","key"],o6e=["offset"];function ju(e){"@babel/helpers - typeof";return ju=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},ju(e)}function y$(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 f6e(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 c6e=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 tW(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=b$(n,a6e),c=Hn(f,!1);c.offset;var h=b$(c,o6e);t=Q.createElement("line",cu({},h,{x1:i,y1:r,x2:a,y2:o,fill:"none",key:l}))}return t}function d6e(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 tW(r,c)});return Q.createElement("g",{className:"recharts-cartesian-grid-horizontal"},o)}function h6e(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 tW(r,c)});return Q.createElement("g",{className:"recharts-cartesian-grid-vertical"},o)}function m6e(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 p6e(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 v6e=function(n,t){var i=n.xAxis,r=n.width,a=n.height,o=n.offset;return vV(RA(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)},g6e=function(n,t){var i=n.yAxis,r=n.width,a=n.height,o=n.offset;return vV(RA(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)},Df={horizontal:!0,vertical:!0,stroke:"#ccc",fill:"none",verticalFill:[],horizontalFill:[]};function X0(e){var n,t,i,r,a,o,l=TA(),f=MA(),c=r4e(),h=Zi(Zi({},e),{},{stroke:(n=e.stroke)!==null&&n!==void 0?n:Df.stroke,fill:(t=e.fill)!==null&&t!==void 0?t:Df.fill,horizontal:(i=e.horizontal)!==null&&i!==void 0?i:Df.horizontal,horizontalFill:(r=e.horizontalFill)!==null&&r!==void 0?r:Df.horizontalFill,vertical:(a=e.vertical)!==null&&a!==void 0?a:Df.vertical,verticalFill:(o=e.verticalFill)!==null&&o!==void 0?o:Df.verticalFill,x:We(e.x)?e.x:c.left,y:We(e.y)?e.y:c.top,width:We(e.width)?e.width:c.width,height:We(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=n4e(),x=t4e();if(!We(v)||v<=0||!We(b)||b<=0||!We(d)||d!==+d||!We(p)||p!==+p)return null;var E=h.verticalCoordinatesGenerator||v6e,O=h.horizontalCoordinatesGenerator||g6e,j=h.horizontalPoints,M=h.verticalPoints;if((!j||!j.length)&&In(O)){var N=k&&k.length,H=O({yAxis:x?Zi(Zi({},x),{},{ticks:N?k:x.ticks}):void 0,width:l,height:f,offset:c},N?!0:w);Qo(Array.isArray(H),"horizontalCoordinatesGenerator should return Array but instead it returned [".concat(ju(H),"]")),Array.isArray(H)&&(j=H)}if((!M||!M.length)&&In(E)){var P=_&&_.length,z=E({xAxis:C?Zi(Zi({},C),{},{ticks:P?_:C.ticks}):void 0,width:l,height:f,offset:c},P?!0:w);Qo(Array.isArray(z),"verticalCoordinatesGenerator should return Array but instead it returned [".concat(ju(z),"]")),Array.isArray(z)&&(M=z)}return Q.createElement("g",{className:"recharts-cartesian-grid"},Q.createElement(c6e,{fill:h.fill,fillOpacity:h.fillOpacity,x:h.x,y:h.y,width:h.width,height:h.height,ry:h.ry}),Q.createElement(d6e,cu({},h,{offset:c,horizontalPoints:j,xAxis:C,yAxis:x})),Q.createElement(h6e,cu({},h,{offset:c,verticalPoints:M,xAxis:C,yAxis:x})),Q.createElement(m6e,cu({},h,{horizontalPoints:j})),Q.createElement(p6e,cu({},h,{verticalPoints:M})))}X0.displayName="CartesianGrid";var y6e=["type","layout","connectNulls","ref"],b6e=["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 w$(e,n){if(e==null)return{};var t=w6e(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 w6e(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(Rf(f.slice(0,b)),[d-w]);break}var k=v.length%2===0?[0,p]:[p];return[].concat(Rf(n.repeat(f,h)),Rf(v),k).map(function(_){return"".concat(_,"px")}).join(", ")}),$a(t,"id",ed("recharts-line-")),$a(t,"pathRef",function(o){t.mainCurve=o}),$a(t,"handleAnimationEnd",function(){t.setState({isAnimationFinished:!0}),t.props.onAnimationEnd&&t.props.onAnimationEnd()}),$a(t,"handleAnimationStart",function(){t.setState({isAnimationFinished:!1}),t.props.onAnimationStart&&t.props.onAnimationStart()}),t}return T6e(n,e),A6e(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,gp);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 _=Br(Br(Br({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=w$(l,y6e),p=Br(Br(Br({},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(Kf,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(F,G){var U=Math.floor(G*j);if(C[U]){var $=C[U],R=Bi($.x,F.x),I=Bi($.y,F.y);return Br(Br({},F),{},{x:R(O),y:I(O)})}if(b){var q=Bi(w*2,F.x),Y=Bi(k/2,F.y);return Br(Br({},F),{},{x:q(O),y:Y(O)})}return Br(Br({},F),{},{x:F.x,y:F.y})});return a.renderCurveStatically(M,i,r)}var N=Bi(0,x),H=N(O),P;if(f){var z="".concat(f).split(/[,\s]+/gim).map(function(F){return parseFloat(F)});P=a.getStrokeDasharray(H,x,z)}else P=a.generateSimpleStrokeDasharray(x,H);return a.renderCurveStatically(l,i,r,{strokeDasharray:P})})}},{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,N=(i=Hn(o,!1))!==null&&i!==void 0?i:{r:3,strokeWidth:2},H=N.r,P=H===void 0?3:H,z=N.strokeWidth,F=z===void 0?2:z,G=bH(o)?o:{},U=G.clipDot,$=U===void 0?!0:U,R=P*2+F;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})),!$&&Q.createElement("clipPath",{id:"clipPath-dots-".concat(M)},Q.createElement("rect",{x:p-R/2,y:d-R/2,width:v+R,height:b+R}))):null,!C&&this.renderCurve(j,M),this.renderErrorBar(j,M),(C||o)&&this.renderDots(j,$,M),(!w||_)&&fo.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(Rf(i),[0]):i,o=[],l=0;l=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(t[i]=e[i])}return t}function P6e(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,N=(i=Hn(o,!1))!==null&&i!==void 0?i:{r:3,strokeWidth:2},H=N.r,P=H===void 0?3:H,z=N.strokeWidth,F=z===void 0?2:z,G=bH(o)?o:{},U=G.clipDot,$=U===void 0?!0:U,R=P*2+F;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})),!$&&Q.createElement("clipPath",{id:"clipPath-dots-".concat(M)},Q.createElement("rect",{x:h-R/2,y:c-R/2,width:v+R,height:b+R}))):null,C?null:this.renderArea(j,M),(o||C)&&this.renderDots(j,$,M),(!w||_)&&fo.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);aW=ls;oo(ls,"displayName","Area");oo(ls,"defaultProps",{stroke:"#3182bd",fill:"#3182bd",fillOpacity:.6,xAxisId:0,yAxisId:0,legendType:"line",connectNulls:!1,points:[],dot:!1,activeDot:!0,hide:!1,isAnimationActive:!Iu.isSsr,animationBegin:0,animationDuration:1500,animationEasing:"ease"});oo(ls,"getBaseValue",function(e,n,t,i){var r=e.layout,a=e.baseValue,o=n.props.baseValue,l=o??a;if(We(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]});oo(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=aW.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:C1({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:C1({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)});oo(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=oW(n,R6e);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 q6e(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function H6e(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 TCe(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 MCe(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function DCe(e,n){for(var t=0;te.length)&&(n=e.length);for(var t=0,i=new Array(n);t0?o:n&&n.length&&We(r)&&We(a)?n.slice(r,a+1):[]};function kW(e){return e==="number"?[0,"auto"]:void 0}var k6=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=Zg(v,o.dataKey,r)}else p=d&&d[i]||l[i];return p?[].concat(jc(f),[yV(c,p)]):f},[])},M$=function(n,t,i,r){var a=r||{x:n.chartX,y:n.chartY},o=UCe(a,i),l=n.orderedTooltipTicks,f=n.tooltipAxis,c=n.tooltipTicks,h=Kke(o,l,c,f);if(h>=0&&c){var d=c[h]&&c[h].value,p=k6(n,t,h,d),v=VCe(i,l,h,a);return{activeTooltipIndex:h,activeLabel:d,activePayload:p,activeCoordinate:v}}return null},WCe=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=pV(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,N=_.includeHidden,H=_[o];if(b[H])return b;var P=Z0(n.data,{graphicalItems:r.filter(function(V){var L,X=o in V.props?V.props[o]:(L=V.type.defaultProps)===null||L===void 0?void 0:L[o];return X===H}),dataStartIndex:f,dataEndIndex:c}),z=P.length,F,G,U;yCe(_.domain,E,C)&&(F=L4(_.domain,null,E),v&&(C==="number"||j!=="auto")&&(U=Lh(P,x,"category")));var $=kW(C);if(!F||F.length===0){var R,I=(R=_.domain)!==null&&R!==void 0?R:$;if(x){if(F=Lh(P,x,C),C==="category"&&v){var q=Fpe(F);O&&q?(G=F,F=$1(0,z)):O||(F=WP(I,F,w).reduce(function(V,L){return V.indexOf(L)>=0?V:[].concat(jc(V),[L])},[]))}else if(C==="category")O?F=F.filter(function(V){return V!==""&&!Gn(V)}):F=WP(I,F,w).reduce(function(V,L){return V.indexOf(L)>=0||L===""||Gn(L)?V:[].concat(jc(V),[L])},[]);else if(C==="number"){var Y=e_e(P,r.filter(function(V){var L,X,ee=o in V.props?V.props[o]:(L=V.type.defaultProps)===null||L===void 0?void 0:L[o],re="hide"in V.props?V.props.hide:(X=V.type.defaultProps)===null||X===void 0?void 0:X.hide;return ee===H&&(N||!re)}),x,a,h);Y&&(F=Y)}v&&(C==="number"||j!=="auto")&&(U=Lh(P,x,"category"))}else v?F=$1(0,z):l&&l[H]&&l[H].hasStack&&C==="number"?F=p==="expand"?[0,1]:gV(l[H].stackGroups,f,c):F=mV(P,r.filter(function(V){var L=o in V.props?V.props[o]:V.type.defaultProps[o],X="hide"in V.props?V.props.hide:V.type.defaultProps.hide;return L===H&&(N||!X)}),C,h,!0);if(C==="number")F=y6(d,F,H,a,M),I&&(F=L4(I,F,E));else if(C==="category"&&I){var D=I,W=F.every(function(V){return D.indexOf(V)>=0});W&&(F=D)}}return je(je({},b),{},Sn({},H,je(je({},_),{},{axisType:a,domain:F,categoricalDomain:U,duplicateDomain:G,originalDomain:(k=_.domain)!==null&&k!==void 0?k:$,isCategorical:v,layout:h})))},{})},GCe=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=pV(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=kW("number");if(!k[x]){w++;var O;return b?O=$1(0,v):l&&l[x]&&l[x].hasStack?(O=gV(l[x].stackGroups,f,c),O=y6(d,O,x,a)):(O=L4(E,mV(p,i.filter(function(j){var M,N,H=o in j.props?j.props[o]:(M=j.type.defaultProps)===null||M===void 0?void 0:M[o],P="hide"in j.props?j.props.hide:(N=j.type.defaultProps)===null||N===void 0?void 0:N.hide;return H===x&&!P}),"number",h),r.defaultProps.allowDataOverflow),O=y6(d,O,x,a)),je(je({},k),{},Sn({},x,je(je({axisType:a},r.defaultProps),{},{hide:!0,orientation:pa(qCe,"".concat(a,".").concat(w%2),null),domain:O,originalDomain:E,isCategorical:b,layout:h})))}return k},{})},YCe=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=WCe(n,{axes:p,graphicalItems:o,axisType:r,axisIdKey:d,stackGroups:l,dataStartIndex:f,dataEndIndex:c}):o&&o.length&&(v=GCe(n,{Axis:a,graphicalItems:o,axisType:r,axisIdKey:d,stackGroups:l,dataStartIndex:f,dataEndIndex:c})),v},KCe=function(n){var t=Zs(n),i=Go(t,!1,!0);return{tooltipTicks:i,orderedTooltipTicks:Q9(i,function(r){return r.coordinate}),tooltipAxis:t,tooltipAxisBandSize:A1(t,i)}},D$=function(n){var t=n.children,i=n.defaultShowTooltip,r=Hr(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}},XCe=function(n){return!n||!n.length?!1:n.some(function(t){var i=Zo(t&&t.type);return i&&i.indexOf("Bar")>=0})},R$=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"}},ZCe=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=Hr(d,gc),b=Hr(d,Jo),w=Object.keys(f).reduce(function(O,j){var M=f[j],N=M.orientation;return!M.mirror&&!M.hide?je(je({},O),{},Sn({},N,O[N]+M.width)):O},{left:p.left||0,right:p.right||0}),k=Object.keys(o).reduce(function(O,j){var M=o[j],N=M.orientation;return!M.mirror&&!M.hide?je(je({},O),{},Sn({},N,pa(O,"".concat(N))+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&&(_=Qke(_,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)})},QCe=function(n,t){if(t==="xAxis")return n[t].width;if(t==="yAxis")return n[t].height},NA=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,N=C.dataEndIndex,H=_.barSize,P=_.layout,z=_.barGap,F=_.barCategoryGap,G=_.maxBarSize,U=R$(P),$=U.numericAxisName,R=U.cateAxisName,I=XCe(x),q=[];return x.forEach(function(Y,D){var W=Z0(_.data,{graphicalItems:[Y],dataStartIndex:M,dataEndIndex:N}),V=Y.type.defaultProps!==void 0?je(je({},Y.type.defaultProps),Y.props):Y.props,L=V.dataKey,X=V.maxBarSize,ee=V["".concat($,"Id")],re=V["".concat(R,"Id")],se={},ye=f.reduce(function(Be,Ge){var Ve=C["".concat(Ge.axisType,"Map")],Xe=V["".concat(Ge.axisType,"Id")];Ve&&Ve[Xe]||Ge.axisType==="zAxis"||Ou();var Qe=Ve[Xe];return je(je({},Be),{},Sn(Sn({},Ge.axisType,Qe),"".concat(Ge.axisType,"Ticks"),Go(Qe)))},se),ae=ye[R],le=ye["".concat(R,"Ticks")],_e=E&&E[ee]&&E[ee].hasStack&&d_e(Y,E[ee].stackGroups),ne=Zo(Y.type).indexOf("Bar")>=0,ze=A1(ae,le),we=[],Ce=I&&Xke({barSize:H,stackGroups:E,totalSize:QCe(ye,R)});if(ne){var Ne,ge,xe=Gn(X)?G:X,Pe=(Ne=(ge=A1(ae,le,!0))!==null&&ge!==void 0?ge:xe)!==null&&Ne!==void 0?Ne:0;we=Zke({barGap:z,barCategoryGap:F,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:W,props:_,dataKey:L,item:Y,bandSize:ze,barPosition:we,offset:O,stackedData:_e,layout:P,dataStartIndex:M,dataEndIndex:N}))),{},Sn(Sn(Sn({key:Y.key||"item-".concat(D)},$,ye[$]),R,ye[R]),"animationId",j)),childIndex:Jpe(Y,_.children),item:Y})}),q},v=function(_,C){var x=_.props,E=_.dataStartIndex,O=_.dataEndIndex,j=_.updateId;if(!sD({props:x}))return null;var M=x.children,N=x.layout,H=x.stackOffset,P=x.data,z=x.reverseStackOrder,F=R$(N),G=F.numericAxisName,U=F.cateAxisName,$=va(M,i),R=u_e(P,$,"".concat(G,"Id"),"".concat(U,"Id"),H,z),I=f.reduce(function(V,L){var X="".concat(L.axisType,"Map");return je(je({},V),{},Sn({},X,YCe(x,je(je({},L),{},{graphicalItems:$,stackGroups:L.axisType===G&&R,dataStartIndex:E,dataEndIndex:O}))))},{}),q=ZCe(je(je({},I),{},{props:x,graphicalItems:$}),C==null?void 0:C.legendBBox);Object.keys(I).forEach(function(V){I[V]=h(x,I[V],q,V.replace("Map",""),t)});var Y=I["".concat(U,"Map")],D=KCe(Y),W=p(x,je(je({},I),{},{dataStartIndex:E,dataEndIndex:O,updateId:j,graphicalItems:$,stackGroups:R,offset:q}));return je(je({formattedGraphicalItems:W,graphicalItems:$,offset:q,stackGroups:R},D),I)},b=(function(k){function _(C){var x,E,O;return MCe(this,_),O=PCe(this,_,[C]),Sn(O,"eventEmitterSymbol",Symbol("rechartsEventEmitter")),Sn(O,"accessibilityManager",new gCe),Sn(O,"handleLegendBBoxUpdate",function(j){if(j){var M=O.state,N=M.dataStartIndex,H=M.dataEndIndex,P=M.updateId;O.setState(je({legendBBox:j},v({props:O.props,dataStartIndex:N,dataEndIndex:H,updateId:P},je(je({},O.state),{},{legendBBox:j}))))}}),Sn(O,"handleReceiveSyncEvent",function(j,M,N){if(O.props.syncId===j){if(N===O.eventEmitterSymbol&&typeof O.props.syncMethod!="function")return;O.applySyncEvent(M)}}),Sn(O,"handleBrushChange",function(j){var M=j.startIndex,N=j.endIndex;if(M!==O.state.dataStartIndex||N!==O.state.dataEndIndex){var H=O.state.updateId;O.setState(function(){return je({dataStartIndex:M,dataEndIndex:N},v({props:O.props,dataStartIndex:M,dataEndIndex:N,updateId:H},O.state))}),O.triggerSyncEvent({dataStartIndex:M,dataEndIndex:N})}}),Sn(O,"handleMouseEnter",function(j){var M=O.getMouseInfo(j);if(M){var N=je(je({},M),{},{isTooltipActive:!0});O.setState(N),O.triggerSyncEvent(N);var H=O.props.onMouseEnter;In(H)&&H(N,j)}}),Sn(O,"triggeredAfterMouseMove",function(j){var M=O.getMouseInfo(j),N=M?je(je({},M),{},{isTooltipActive:!0}):{isTooltipActive:!1};O.setState(N),O.triggerSyncEvent(N);var H=O.props.onMouseMove;In(H)&&H(N,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 N=O.props.onMouseLeave;In(N)&&N(M,j)}),Sn(O,"handleOuterEvent",function(j){var M=Qpe(j),N=pa(O.props,"".concat(M));if(M&&In(N)){var H,P;/.*touch.*/i.test(M)?P=O.getMouseInfo(j.changedTouches[0]):P=O.getMouseInfo(j),N((H=P)!==null&&H!==void 0?H:{},j)}}),Sn(O,"handleClick",function(j){var M=O.getMouseInfo(j);if(M){var N=je(je({},M),{},{isTooltipActive:!0});O.setState(N),O.triggerSyncEvent(N);var H=O.props.onClick;In(H)&&H(N,j)}}),Sn(O,"handleMouseDown",function(j){var M=O.props.onMouseDown;if(In(M)){var N=O.getMouseInfo(j);M(N,j)}}),Sn(O,"handleMouseUp",function(j){var M=O.props.onMouseUp;if(In(M)){var N=O.getMouseInfo(j);M(N,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 N=O.getMouseInfo(j);M(N,j)}}),Sn(O,"handleContextMenu",function(j){var M=O.props.onContextMenu;if(In(M)){var N=O.getMouseInfo(j);M(N,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,N=M.layout,H=M.syncMethod,P=O.state.updateId,z=j.dataStartIndex,F=j.dataEndIndex;if(j.dataStartIndex!==void 0||j.dataEndIndex!==void 0)O.setState(je({dataStartIndex:z,dataEndIndex:F},v({props:O.props,dataStartIndex:z,dataEndIndex:F,updateId:P},O.state)));else if(j.activeTooltipIndex!==void 0){var G=j.chartX,U=j.chartY,$=j.activeTooltipIndex,R=O.state,I=R.offset,q=R.tooltipTicks;if(!I)return;if(typeof H=="function")$=H(q,j);else if(H==="value"){$=-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=Zg(Y,ze,$),ne=D&&W&&Zg(W,ze,$)}else _e=Y==null?void 0:Y[U],ne=D&&W&&W[U];if(re||ee){var we=j.props.activeIndex!==void 0?j.props.activeIndex:U;return[A.cloneElement(j,je(je(je({},H.props),ye),{},{activeIndex:we})),null,null]}if(!Gn(_e))return[ae].concat(jc(O.renderActivePoints({item:H,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},ge=Ne.graphicalItem,xe=ge.item,Pe=xe===void 0?j:xe,ue=ge.childIndex,Be=je(je(je({},H.props),ye),{},{activeIndex:ue});return[A.cloneElement(Pe,Be),null,null]}return D?[ae,null,null]:[ae,null]}),Sn(O,"renderCustomized",function(j,M,N){return A.cloneElement(j,je(je({key:"recharts-customized-".concat(N)},O.props),O.state))}),Sn(O,"renderMap",{CartesianGrid:{handler:ag,once:!0},ReferenceArea:{handler:O.renderReferenceElement},ReferenceLine:{handler:ag},ReferenceDot:{handler:O.renderReferenceElement},XAxis:{handler:ag},YAxis:{handler:ag},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=dU(O.triggeredAfterMouseMove,(E=C.throttleDelay)!==null&&E!==void 0?E:1e3/60),O.state={},O}return zCe(_,k),RCe(_,[{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,N=Hr(E,ca);if(N){var H=N.props.defaultIndex;if(!(typeof H!="number"||H<0||H>this.state.tooltipTicks.length-1)){var P=this.state.tooltipTicks[H]&&this.state.tooltipTicks[H].value,z=k6(this.state,O,H,P),F=this.state.tooltipTicks[H].coordinate,G=(this.state.offset.top+j)/2,U=M==="horizontal",$=U?{x:F,y:G}:{y:F,x:G},R=this.state.formattedGraphicalItems.find(function(q){var Y=q.item;return Y.type.name==="Scatter"});R&&($=je(je({},$),R.props.points[H].tooltipPosition),z=R.props.points[H].tooltipPayload);var I={activeTooltipIndex:H,isTooltipActive:!0,activeLabel:P,activePayload:z,activeCoordinate:$};this.setState(I),this.renderCursor(N),this.accessibilityManager.setIndex(H)}}}},{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){o4([Hr(x.children,ca)],[Hr(this.props.children,ca)])||this.displayDefaultTooltip()}},{key:"componentWillUnmount",value:function(){this.removeListener(),this.throttleTriggeredAfterMouseMove.cancel()}},{key:"getTooltipEventType",value:function(){var x=Hr(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=Iye(O),M={chartX:Math.round(x.pageX-j.left),chartY:Math.round(x.pageY-j.top)},N=O.width/E.offsetWidth||1,H=this.inRange(M.chartX,M.chartY,N);if(!H)return null;var P=this.state,z=P.xAxisMap,F=P.yAxisMap,G=this.getTooltipEventType(),U=M$(this.state,this.props.data,this.props.layout,H);if(G!=="axis"&&z&&F){var $=Zs(z).scale,R=Zs(F).scale,I=$&&$.invert?$.invert(M.chartX):null,q=R&&R.invert?R.invert(M.chartY):null;return je(je({},M),{},{xValue:I,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,N=E/O;if(j==="horizontal"||j==="vertical"){var H=this.state.offset,P=M>=H.left&&M<=H.left+H.width&&N>=H.top&&N<=H.top+H.height;return P?{x:M,y:N}:null}var z=this.state,F=z.angleAxisMap,G=z.radiusAxisMap;if(F&&G){var U=Zs(F);return KP({x:M,y:N},U)}return null}},{key:"parseEventsOfWrapper",value:function(){var x=this.props.children,E=this.getTooltipEventType(),O=Hr(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=Qg(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,N=j.length;M({root:{"--chart-text-color":n?lt(n,e):void 0,"--chart-grid-color":t?lt(t,e):void 0,"--chart-cursor-fill":i?lt(i,e):void 0,"--chart-bar-label-color":r?lt(r,e):void 0}});function r9e(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 a9e(e,n){return typeof e=="function"?e(n).fill:e==null?void 0:e.fill}const il=Re(e=>{const n=be("BarChart",i9e,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:N,tooltipProps:H,referenceLines:P,fillOpacity:z,barChartProps:F,type:G,orientation:U,dir:$,valueFormatter:R,children:I,barProps:q,xAxisLabel:Y,yAxisLabel:D,withBarValueLabel:W,valueLabelProps:V,withRightYAxis:L,rightYAxisLabel:X,rightYAxisProps:ee,minBarSize:re,maxBarWidth:se,mod:ye,getBarColor:ae,gridColor:le,textColor:_e,attributes:ne,...ze}=n,we=ui(),Ce=_!=="none"&&(C==="x"||C==="xy"),Ne=_!=="none"&&(C==="y"||C==="xy"),[ge,xe]=A.useState(null),Pe=ge!==null,ue=G==="stacked"||G==="percent",Be=G==="percent"?t9e:R,Ge=Se=>{xe(null),p==null||p(Se)},{resolvedClassNames:Ve,resolvedStyles:Xe}=Hi({classNames:t,styles:a,props:n}),Qe=G==="waterfall"?r9e(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:_W}),he=d.map(Se=>{const tn=lt(Se.color,we),cn=Pe&&ge!==Se.name,On=typeof q=="function"?q(Se):q,mn=On==null?void 0:On.shape;return A.createElement(Hu,{...ie("bar"),key:Se.name,name:Se.name,dataKey:Se.name,fill:tn,stroke:tn,isAnimationActive:!1,fillOpacity:cn?.1:z,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?lt(en.color,we):typeof ae=="function"?lt(ae(en==null?void 0:en[Se.name],Se),we):a9e(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(jm,{...De,...mn}):y.jsx(jm,{...De})}},W&&y.jsx(fo,{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 V=="function"?V(Se):V}))}),Ye=P==null?void 0:P.map((Se,tn)=>{const cn=lt(Se.color,we);return y.jsx(yp,{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(ve,{...ie("root"),onMouseLeave:Ge,dir:$||"ltr",mod:[{orientation:U},ye],...ze,children:y.jsx(eA,{...ie("container"),children:y.jsxs(e9e,{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},...F,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:Ve,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(ti,{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(ti,{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:!L,...Je,...ee,children:[X&&y.jsx(ti,{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"),...N}),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(M9,{label:cn&&tn?cn(Se,tn):Se,payload:tn,type:G==="waterfall"?"scatter":void 0,unit:O,classNames:Ve,styles:Xe,series:d,valueFormatter:R,attributes:ne}),...H}),he,Ye,I]})})})});il.displayName="@mantine/charts/BarChart";il.classes=w0;il.varsResolver=_W;const o9e={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"}]},xW=(e,{textColor:n,gridColor:t})=>({root:{"--chart-text-color":n?lt(n,e):void 0,"--chart-grid-color":t?lt(t,e):void 0}}),Q0=Re(e=>{const n=be("LineChart",o9e,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:N,tooltipProps:H,referenceLines:P,withDots:z,dotProps:F,activeDotProps:G,strokeWidth:U,lineChartProps:$,connectNulls:R,fillOpacity:I,curveType:q,orientation:Y,dir:D,valueFormatter:W,children:V,lineProps:L,xAxisLabel:X,yAxisLabel:ee,type:re,gradientStops:se,withRightYAxis:ye,rightYAxisLabel:ae,rightYAxisProps:le,withPointLabels:_e,attributes:ne,gridColor:ze,...we}=n,Ce=ui(),Ne=_!=="none"&&(C==="x"||C==="xy"),ge=_!=="none"&&(C==="y"||C==="xy"),[xe,Pe]=A.useState(null),ue=xe!==null,Be=Se=>{Pe(null),p==null||p(Se)},{resolvedClassNames:Ge,resolvedStyles:Ve}=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:xW}),Qe=`line-chart-gradient-${qi()}`,ie=se==null?void 0:se.map(Se=>y.jsx("stop",{offset:`${Se.offset}%`,stopColor:lt(Se.color,Ce)},Se.color)),he=d.map(Se=>{const tn=lt(Se.color,Ce),cn=ue&&xe!==Se.name;return A.createElement(bp,{...Xe("line"),key:Se.name,name:Se.name,dataKey:Se.name,dot:z?{fillOpacity:cn?0:1,strokeOpacity:cn?0:1,strokeWidth:1,fill:re==="gradient"?"var(--mantine-color-gray-7)":tn,stroke:re==="gradient"?"white":tn,...F}:!1,activeDot:z?{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:I,strokeOpacity:cn?.5:I,connectNulls:R,type:Se.curveType??q,strokeDasharray:Se.strokeDasharray,yAxisId:Se.yAxisId||void 0,label:_e?y.jsx(Qme,{valueFormatter:W}):void 0,...typeof L=="function"?L(Se):L})}),Ye=P==null?void 0:P.map((Se,tn)=>{const cn=lt(Se.color,Ce);return y.jsx(yp,{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:ge?{stroke:"currentColor"}:!1,allowDecimals:!0,unit:O,tickFormatter:Y==="vertical"?void 0:W,...Xe("axis")};return y.jsx(ve,{...Xe("root"),onMouseLeave:Be,dir:D||"ltr",...we,children:y.jsx(eA,{...Xe("container"),children:y.jsxs(JCe,{data:f,layout:Y,margin:{bottom:X?30:void 0,left:ee?10:void 0,right:ee?5:void 0},...$,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:Ge,styles:Ve,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"?W:void 0,...Xe("axis"),...x,children:[X&&y.jsx(ti,{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(ti,{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(ti,{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"),...N}),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(M9,{label:cn&&tn?cn(Se,tn):Se,payload:tn,unit:O,classNames:Ge,styles:Ve,series:d,valueFormatter:W,showColor:re!=="gradient",attributes:ne}),...H}),he,Ye,V]})})})});Q0.displayName="@mantine/charts/LineChart";Q0.classes=w0;Q0.varsResolver=xW;const P$="daily_report_prompt",iS="Eres un coach de equipo. Resume el reporte diario en un MAXIMO de 4 frases cortas, mencionando: (1) total de tareas hechas y quien destaco, (2) cualquier card reabierta o deadline vencido que merezca atencion, (3) cards estancadas criticas (30+ dias) si las hay, (4) una frase corta de animo o aviso si toca. Tono natural, primera persona del plural, sin emojis. No inventes datos; usa solo los del JSON del reporte.";function s9e(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 Pf({label:e,value:n,color:t,icon:i,sub:r}){return y.jsxs(Mt,{p:"sm",withBorder:!0,radius:"md",children:[y.jsxs(Ue,{gap:6,mb:2,align:"center",children:[i,y.jsx(Ee,{size:"xs",c:"dimmed",tt:"uppercase",fw:600,children:e})]}),y.jsx(Ee,{fz:28,fw:700,c:t,children:n}),r&&y.jsx(Ee,{size:"xs",c:"dimmed",children:r})]})}function og({title:e,rows:n,emptyText:t,withAvatar:i=!1}){return y.jsxs(za,{withBorder:!0,radius:"md",p:"sm",children:[y.jsx(Ee,{fw:600,size:"sm",mb:6,children:e}),n.length===0?y.jsx(Ee,{size:"xs",c:"dimmed",children:t}):y.jsx(Vn,{gap:4,children:n.map((r,a)=>y.jsxs(Ue,{gap:6,wrap:"nowrap",justify:"space-between",children:[y.jsxs(Ue,{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(Ee,{size:"sm",truncate:!0,children:r.name||"(sin nombre)"})]}),y.jsx(dt,{size:"sm",variant:"light",color:a===0?"teal":"gray",children:r.count})]},(r.user_id||r.name)+a))})]})}function l9e({date:e,onJumpToCard:n}){const[t,i]=A.useState(null),[r,a]=A.useState(null),[o,l]=A.useState(null),[f,c]=A.useState(!1),[h,d]=A.useState(null),[p,v]=A.useState(!1),[b,w]=A.useState(""),[k,_]=A.useState(null),[C,x]=A.useState(null);A.useEffect(()=>{i(null),a(null),Mie(e).then(i).catch($=>a($.message)),l(null),d(null),Die(e).then($=>l($.exists?$:null)).catch(()=>{})},[e]);const E=async()=>{c(!0),d(null);try{const $=await Rie(e);l({...$,exists:!0})}catch($){d($.message)}finally{c(!1)}},O=async()=>{try{const $=await Pie(P$);w($.value||iS)}catch{w(iS)}v(!0)},j=async()=>{await Nie(P$,b),v(!1)},M=()=>w(iS),N=A.useMemo(()=>t?t.hourly_moves.map(($,R)=>({hora:String(R).padStart(2,"0")+":00",movimientos:$})):[],[t]),H=A.useMemo(()=>{if(!t)return[];const $=new Set;for(const R of t.done_cards)R.requester&&$.add(R.requester);return Array.from($).sort()},[t]),P=A.useMemo(()=>{if(!t)return[];const $=new Map;for(const R of t.done_cards)R.assignee_id&&$.set(R.assignee_id,R.assignee_name||R.assignee_id);return Array.from($.entries()).map(([R,I])=>({value:R,label:I}))},[t]),z=A.useMemo(()=>t?t.done_cards.filter($=>!(k&&$.requester!==k||C&&$.assignee_id!==C)):[],[t,k,C]),F=()=>{if(!t)return;const $=window.open("","_blank");if(!$)return;const R=window.location.origin,I=(()=>{try{return new Date(t.date+"T00:00:00").toLocaleDateString("es-ES",{weekday:"long",day:"2-digit",month:"long",year:"numeric"})}catch{return t.date}})(),q=[];if(k&&q.push(`solicitante=${k}`),C){const V=P.find(L=>L.value===C);q.push(`asignado=${(V==null?void 0:V.label)||C}`)}const Y=V=>V.replace(/&/g,"&").replace(//g,">").replace(/"/g,"""),D=z.map(V=>{const L=(V.tags||[]).map(Y).join(", "),X=`${R}/?card=${V.id}`;return` + ${String(V.seq_num).padStart(5,"0")} + ${Y(V.title)} + ${Y(V.requester||"")} + ${Y(V.assignee_name||"")} + ${Y(L)} + ${Zt(V.lead_time_ms)} + `}).join(""),W=` + +Reporte ${t.date} + +

Reporte diario · ${Y(I)}

+
${Y(t.date)} · ${Y(t.tz)}${q.length?" · filtros: "+q.map(Y).join(", "):""}
+
+
Hechas
${z.length}
+
Lead time avg
${Zt(t.lead_time.avg_ms)}
+
Deadlines on-time
${t.deadlines.met}/${t.deadlines.met+t.deadlines.missed}
+
Reabiertas
${t.kpis.reopened}
+
+${o!=null&&o.summary?`

${Y(o.summary)}

`:""} + + + + + + + + + + ${D||''} +
#TituloSolicitanteAsignadoTagsLead time
Sin tareas que cumplan el filtro.
+
Generado por kanban · ${Y(R)}
+ + diff --git a/backend/handlers.go b/backend/handlers.go index 674f501..13d74ca 100644 --- a/backend/handlers.go +++ b/backend/handlers.go @@ -457,6 +457,89 @@ func handleDailyReport(db *DB) http.HandlerFunc { } } +// GET /api/reports/daily/summary?date=YYYY-MM-DD +func handleGetDailySummary(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") + } + s, err := db.GetDailySummary(date) + if err != nil { + serverError(w, err) + return + } + if s == nil { + infra.HTTPJSONResponse(w, http.StatusOK, map[string]any{"date": date, "summary": "", "exists": false}) + return + } + infra.HTTPJSONResponse(w, http.StatusOK, map[string]any{ + "date": s.Date, "summary": s.Summary, "prompt": s.Prompt, + "model": s.Model, "generated_at": s.GeneratedAt, "generated_by": s.GeneratedBy, + "exists": true, + }) + } +} + +// POST /api/reports/daily/summary?date=YYYY-MM-DD&tz=Europe/Madrid +// Regenera el resumen del dia y lo persiste. +func handleGenerateDailySummary(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" + } + actor, _ := infra.UserIDFromContext(r.Context(), userCtxKey) + rec, err := db.GenerateDailySummary(r.Context(), date, tz, actor) + if err != nil { + serverError(w, err) + return + } + infra.HTTPJSONResponse(w, http.StatusOK, rec) + } +} + +// GET /api/settings/{key} +func handleGetSetting(db *DB) http.HandlerFunc { + return func(w http.ResponseWriter, r *http.Request) { + key := r.PathValue("key") + v, err := db.GetSetting(key) + if err != nil { + serverError(w, err) + return + } + infra.HTTPJSONResponse(w, http.StatusOK, map[string]any{"key": key, "value": v}) + } +} + +// PUT /api/settings/{key} body: {"value": "..."} +func handlePutSetting(db *DB) http.HandlerFunc { + return func(w http.ResponseWriter, r *http.Request) { + key := r.PathValue("key") + var body struct { + Value string `json:"value"` + } + if err := infra.HTTPParseBody(r, &body, maxBodyBytes); err != nil { + badRequest(w, err.Error()) + return + } + actor, _ := infra.UserIDFromContext(r.Context(), userCtxKey) + var actorPtr *string + if actor != "" { + actorPtr = &actor + } + if err := db.SetSetting(key, body.Value, actorPtr); err != nil { + serverError(w, err) + return + } + w.WriteHeader(http.StatusNoContent) + } +} + // GET /api/archive func handleListArchive(db *DB) http.HandlerFunc { return func(w http.ResponseWriter, r *http.Request) { @@ -532,6 +615,10 @@ func apiRoutes(db *DB, chatWorkdir string, logger *ChatLogger, internalToken str {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/reports/daily/summary", Handler: handleGetDailySummary(db)}, + {Method: "POST", Path: "/api/reports/daily/summary", Handler: handleGenerateDailySummary(db)}, + {Method: "GET", Path: "/api/settings/{key}", Handler: handleGetSetting(db)}, + {Method: "PUT", Path: "/api/settings/{key}", Handler: handlePutSetting(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/migrations/013_daily_summaries_settings.sql b/backend/migrations/013_daily_summaries_settings.sql new file mode 100644 index 0000000..df797ca --- /dev/null +++ b/backend/migrations/013_daily_summaries_settings.sql @@ -0,0 +1,23 @@ +-- Issue 0094: resumen de IA por dia + tabla settings clave/valor. +CREATE TABLE IF NOT EXISTS daily_summaries ( + date TEXT PRIMARY KEY, + summary TEXT NOT NULL DEFAULT '', + prompt TEXT NOT NULL DEFAULT '', + model TEXT NOT NULL DEFAULT '', + generated_at TEXT NOT NULL, + generated_by TEXT +); + +CREATE TABLE IF NOT EXISTS settings ( + key TEXT PRIMARY KEY, + value TEXT NOT NULL DEFAULT '', + updated_at TEXT NOT NULL, + updated_by TEXT +); + +INSERT OR IGNORE INTO settings (key, value, updated_at) +VALUES ( + 'daily_report_prompt', + 'Eres un coach de equipo. Resume el reporte diario en un MAXIMO de 4 frases cortas, mencionando: (1) total de tareas hechas y quien destaco, (2) cualquier card reabierta o deadline vencido que merezca atencion, (3) cards estancadas criticas (30+ dias) si las hay, (4) una frase corta de animo o aviso si toca. Tono natural, primera persona del plural, sin emojis. No inventes datos; usa solo los del JSON del reporte.', + datetime('now') +); diff --git a/frontend/e2e/daily-summary-pdf.spec.ts b/frontend/e2e/daily-summary-pdf.spec.ts new file mode 100644 index 0000000..477e7e8 --- /dev/null +++ b/frontend/e2e/daily-summary-pdf.spec.ts @@ -0,0 +1,56 @@ +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 0094: bocadillo del agente + settings de prompt + PDF. + * No invocamos claude binario; testeamos endpoints settings y la UI estatica. + */ +test.describe("daily summary + pdf (issue 0094)", () => { + test("settings prompt CRUD roundtrip", async ({ page }) => { + await page.goto("/"); + await pw_kanban_login(page, { username: USER, password: PWD }); + + // Lectura inicial: existe seed. + const initial = await page.request.get("/api/settings/daily_report_prompt").then((r) => r.json()); + expect(initial.value).toContain("MAXIMO"); + + // Cambio. + const newVal = "test prompt " + Date.now(); + const put = await page.request.put("/api/settings/daily_report_prompt", { data: { value: newVal } }); + expect([200, 204]).toContain(put.status()); + + // Verifica. + const after = await page.request.get("/api/settings/daily_report_prompt").then((r) => r.json()); + expect(after.value).toBe(newVal); + + // Restaurar. + await page.request.put("/api/settings/daily_report_prompt", { data: { value: initial.value } }); + }); + + test("daily summary GET vacio inicialmente, persiste si guardas manualmente", async ({ page }) => { + await page.goto("/"); + await pw_kanban_login(page, { username: USER, password: PWD }); + const today = new Date().toISOString().slice(0, 10); + const before = await page.request.get(`/api/reports/daily/summary?date=${today}`).then((r) => r.json()); + // Either exists=false OR exists=true with a string summary. Both valid. + expect(typeof before.exists).toBe("boolean"); + expect(typeof before.summary === "string").toBe(true); + }); + + test("UI: bocadillo + boton PDF + boton settings visibles en modal", async ({ page }) => { + await page.goto("/"); + await pw_kanban_login(page, { username: USER, password: PWD }); + await page.getByRole("tab", { name: /Calendario/i }).click(); + await page.waitForSelector('[data-test^="calendar-day-"]', { timeout: 5000 }); + await page.locator('[data-test^="calendar-day-"]').first().dispatchEvent("click"); + + const modal = page.locator('[role="dialog"]').filter({ hasText: /Reporte diario/i }); + await expect(modal).toBeVisible(); + await expect(modal.locator('[data-test="daily-report-pdf"]')).toBeVisible(); + await expect(modal.getByRole("button", { name: /Configurar prompt/i })).toBeVisible(); + await expect(modal.getByRole("button", { name: /Regenerar|Generar/i }).first()).toBeVisible(); + }); +}); diff --git a/frontend/src/api.ts b/frontend/src/api.ts index 1c70f45..ecaabc1 100644 --- a/frontend/src/api.ts +++ b/frontend/src/api.ts @@ -203,6 +203,37 @@ export function dailyReport(date: string, tz?: string): Promise { return fetchJSON(`/reports/daily?${params.toString()}`); } +export interface DailySummary { + date: string; + summary: string; + prompt?: string; + model?: string; + generated_at?: string; + generated_by?: string | null; + exists: boolean; +} + +export function getDailySummary(date: string): Promise { + return fetchJSON(`/reports/daily/summary?date=${encodeURIComponent(date)}`); +} + +export function generateDailySummary(date: string, tz?: string): Promise { + const params = new URLSearchParams({ date }); + if (tz) params.set("tz", tz); + return fetchJSON(`/reports/daily/summary?${params.toString()}`, { method: "POST" }); +} + +export function getSetting(key: string): Promise<{ key: string; value: string }> { + return fetchJSON(`/settings/${encodeURIComponent(key)}`); +} + +export function setSetting(key: string, value: string): Promise { + return fetchJSON(`/settings/${encodeURIComponent(key)}`, { + method: "PUT", + body: JSON.stringify({ value }), + }); +} + 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/DailyReport.tsx b/frontend/src/components/DailyReport.tsx index 4471e11..16ea7d0 100644 --- a/frontend/src/components/DailyReport.tsx +++ b/frontend/src/components/DailyReport.tsx @@ -1,19 +1,25 @@ import { + ActionIcon, Alert, Avatar, Badge, Box, + Button, Card as MCard, Divider, Group, Loader, + Modal, Paper, ScrollArea, + Select, SimpleGrid, Stack, Table, Text, + Textarea, Title, + Tooltip, UnstyledButton, } from "@mantine/core"; import { BarChart } from "@mantine/charts"; @@ -23,14 +29,25 @@ import { IconCalendarStats, IconCheck, IconClock, + IconDownload, IconHourglass, IconLock, IconPlus, IconRefresh, + IconSettings, + IconSparkles, IconTrendingUp, } from "@tabler/icons-react"; import { useEffect, useMemo, useState } from "react"; -import { dailyReport, type DailyReport as Report } from "../api"; +import { + dailyReport, + generateDailySummary, + getDailySummary, + getSetting, + setSetting, + type DailyReport as Report, + type DailySummary, +} from "../api"; import { formatDuration } from "./format"; import { tagColor } from "./colors"; @@ -39,6 +56,10 @@ interface Props { onJumpToCard?: (cardId: string) => void; } +const PROMPT_KEY = "daily_report_prompt"; +const PROMPT_DEFAULT = + "Eres un coach de equipo. Resume el reporte diario en un MAXIMO de 4 frases cortas, mencionando: (1) total de tareas hechas y quien destaco, (2) cualquier card reabierta o deadline vencido que merezca atencion, (3) cards estancadas criticas (30+ dias) si las hay, (4) una frase corta de animo o aviso si toca. Tono natural, primera persona del plural, sin emojis. No inventes datos; usa solo los del JSON del reporte."; + function fmtDate(s: string): string { try { const d = new Date(s + "T00:00:00"); @@ -134,6 +155,13 @@ function RankingList(null); const [err, setErr] = useState(null); + const [summary, setSummary] = useState(null); + const [summaryLoading, setSummaryLoading] = useState(false); + const [summaryErr, setSummaryErr] = useState(null); + const [settingsOpen, setSettingsOpen] = useState(false); + const [promptDraft, setPromptDraft] = useState(""); + const [filterRequester, setFilterRequester] = useState(null); + const [filterAssignee, setFilterAssignee] = useState(null); useEffect(() => { setData(null); @@ -141,8 +169,43 @@ export function DailyReportView({ date, onJumpToCard }: Props) { dailyReport(date) .then(setData) .catch((e) => setErr((e as Error).message)); + setSummary(null); + setSummaryErr(null); + getDailySummary(date) + .then((s) => setSummary(s.exists ? s : null)) + .catch(() => {}); }, [date]); + const regenerateSummary = async () => { + setSummaryLoading(true); + setSummaryErr(null); + try { + const s = await generateDailySummary(date); + setSummary({ ...s, exists: true }); + } catch (e) { + setSummaryErr((e as Error).message); + } finally { + setSummaryLoading(false); + } + }; + + const openSettings = async () => { + try { + const s = await getSetting(PROMPT_KEY); + setPromptDraft(s.value || PROMPT_DEFAULT); + } catch { + setPromptDraft(PROMPT_DEFAULT); + } + setSettingsOpen(true); + }; + + const saveSettings = async () => { + await setSetting(PROMPT_KEY, promptDraft); + setSettingsOpen(false); + }; + + const resetSettings = () => setPromptDraft(PROMPT_DEFAULT); + const hourlyChartData = useMemo(() => { if (!data) return []; return data.hourly_moves.map((n, h) => ({ @@ -151,6 +214,119 @@ export function DailyReportView({ date, onJumpToCard }: Props) { })); }, [data]); + const requesterOptions = useMemo(() => { + if (!data) return []; + const set = new Set(); + for (const c of data.done_cards) if (c.requester) set.add(c.requester); + return Array.from(set).sort(); + }, [data]); + + const assigneeOptions = useMemo(() => { + if (!data) return []; + const m = new Map(); + for (const c of data.done_cards) { + if (c.assignee_id) m.set(c.assignee_id, c.assignee_name || c.assignee_id); + } + return Array.from(m.entries()).map(([value, label]) => ({ value, label })); + }, [data]); + + const filteredDoneCards = useMemo(() => { + if (!data) return []; + return data.done_cards.filter((c) => { + if (filterRequester && c.requester !== filterRequester) return false; + if (filterAssignee && c.assignee_id !== filterAssignee) return false; + return true; + }); + }, [data, filterRequester, filterAssignee]); + + const exportPDF = () => { + if (!data) return; + const win = window.open("", "_blank"); + if (!win) return; + const origin = window.location.origin; + const dateLabel = (() => { + try { + return new Date(data.date + "T00:00:00").toLocaleDateString("es-ES", { + weekday: "long", + day: "2-digit", + month: "long", + year: "numeric", + }); + } catch { + return data.date; + } + })(); + const filterSub: string[] = []; + if (filterRequester) filterSub.push(`solicitante=${filterRequester}`); + if (filterAssignee) { + const a = assigneeOptions.find((o) => o.value === filterAssignee); + filterSub.push(`asignado=${a?.label || filterAssignee}`); + } + const escape = (s: string) => + s.replace(/&/g, "&").replace(//g, ">").replace(/"/g, """); + const rows = filteredDoneCards + .map((c) => { + const tags = (c.tags || []).map(escape).join(", "); + const link = `${origin}/?card=${c.id}`; + return ` + ${String(c.seq_num).padStart(5, "0")} + ${escape(c.title)} + ${escape(c.requester || "")} + ${escape(c.assignee_name || "")} + ${escape(tags)} + ${formatDuration(c.lead_time_ms)} + `; + }) + .join(""); + const html = ` + +Reporte ${data.date} + +

Reporte diario · ${escape(dateLabel)}

+
${escape(data.date)} · ${escape(data.tz)}${ + filterSub.length ? " · filtros: " + filterSub.map(escape).join(", ") : "" + }
+
+
Hechas
${filteredDoneCards.length}
+
Lead time avg
${formatDuration(data.lead_time.avg_ms)}
+
Deadlines on-time
${data.deadlines.met}/${data.deadlines.met + data.deadlines.missed}
+
Reabiertas
${data.kpis.reopened}
+
+${summary?.summary ? `

${escape(summary.summary)}

` : ""} + + + + + + + + + + ${rows || ''} +
#TituloSolicitanteAsignadoTagsLead time
Sin tareas que cumplan el filtro.
+
Generado por kanban · ${escape(origin)}
+ +`; + win.document.write(html); + win.document.close(); + }; + if (err) { return ( }> @@ -234,14 +410,63 @@ export function DailyReportView({ date, onJumpToCard }: Props) { /> + {/* Bocadillo de agente — encima de tareas hechas */} + + + + + + {summaryErr && ( + }> + {summaryErr} + + )} + {summaryLoading ? ( + Generando resumen… + ) : summary?.summary ? ( + <> + {summary.summary} + {summary.generated_at && ( + + Generado {new Date(summary.generated_at).toLocaleString()} · {summary.model} + + )} + + ) : ( + Aun no hay resumen del dia. Pulsa "Generar". + )} + + + + + + + + + + + + + + + + + - - - Tareas hechas - - + + + + Tareas hechas + - N {k.done} + N {filteredDoneCards.length} + {filteredDoneCards.length !== data.done_cards.length ? ` / ${data.done_cards.length}` : ""} Lead time avg {data.lead_time.samples > 0 ? formatDuration(data.lead_time.avg_ms) : "—"} · p50{" "} @@ -249,8 +474,41 @@ export function DailyReportView({ date, onJumpToCard }: Props) { {data.lead_time.samples > 0 ? formatDuration(data.lead_time.p95_ms) : "—"} + + + + - {data.done_cards.length === 0 ? ( + {filteredDoneCards.length === 0 ? ( Sin hechas en este dia. @@ -268,7 +526,7 @@ export function DailyReportView({ date, onJumpToCard }: Props) { - {data.done_cards.map((c) => ( + {filteredDoneCards.map((c) => ( @@ -518,6 +776,35 @@ export function DailyReportView({ date, onJumpToCard }: Props) { + + setSettingsOpen(false)} title="Prompt del agente diario" size="lg" zIndex={500}> + + + Plantilla que el agente recibe junto al JSON del reporte. Compartida por todos los usuarios. + +