diff options
author | Baitinq <30861839+Baitinq@users.noreply.github.com> | 2024-08-18 18:40:20 +0000 |
---|---|---|
committer | Baitinq <30861839+Baitinq@users.noreply.github.com> | 2024-08-18 18:40:20 +0000 |
commit | eb032d3e4a174d009c5524d9d4187debc7b99794 (patch) | |
tree | 5da14c5398cb246701b5485dacfb389af67c411a | |
parent | Deploying to gh-pages from @ Baitinq/fs-tracer-frontend@6b8b2d50918c86a1785e2... (diff) | |
download | fs-tracer-frontend-gh-pages.tar.gz fs-tracer-frontend-gh-pages.tar.bz2 fs-tracer-frontend-gh-pages.zip |
Deploying to gh-pages from @ Baitinq/fs-tracer-frontend@bada1bfa4f54cd3a5624e3c74e7205aaabbc60ff 🚀 gh-pages
-rw-r--r-- | assets/browser-CNT5ya24.js (renamed from assets/browser-Dp_p5C6a.js) | 2 | ||||
-rw-r--r-- | assets/index-CEEOsXoe.js (renamed from assets/index-DU0kmLFG.js) | 4 | ||||
-rw-r--r-- | index.html | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/assets/browser-Dp_p5C6a.js b/assets/browser-CNT5ya24.js index 2862b92..eef8ce8 100644 --- a/assets/browser-Dp_p5C6a.js +++ b/assets/browser-CNT5ya24.js @@ -1 +1 @@ -import{g as e}from"./index-DU0kmLFG.js";var o=function(){throw new Error("ws does not work in the browser. Browser clients must use the native WebSocket object")};const r=e(o),s=Object.freeze(Object.defineProperty({__proto__:null,default:r},Symbol.toStringTag,{value:"Module"}));export{s as b}; +import{g as e}from"./index-CEEOsXoe.js";var o=function(){throw new Error("ws does not work in the browser. Browser clients must use the native WebSocket object")};const r=e(o),s=Object.freeze(Object.defineProperty({__proto__:null,default:r},Symbol.toStringTag,{value:"Module"}));export{s as b}; diff --git a/assets/index-DU0kmLFG.js b/assets/index-CEEOsXoe.js index 059a8e4..0512c9b 100644 --- a/assets/index-DU0kmLFG.js +++ b/assets/index-CEEOsXoe.js @@ -64,7 +64,7 @@ Error generating stack: `+a.message+` * LICENSE.md file in the root directory of this source tree. * * @license MIT - */const HA="6";try{window.__reactRouterVersion=HA}catch{}const KA="startTransition",c2=UR[KA];function YA(e){let{basename:t,children:n,future:r,window:i}=e,a=y.useRef();a.current==null&&(a.current=tA({window:i,v5Compat:!0}));let s=a.current,[o,l]=y.useState({action:s.action,location:s.location}),{v7_startTransition:u}=r||{},c=y.useCallback(d=>{u&&c2?c2(()=>l(d)):l(d)},[l,u]);return y.useLayoutEffect(()=>s.listen(c),[s,c]),y.createElement(WA,{basename:t,children:n,location:o.location,navigationType:o.action,navigator:s,future:r})}var d2;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(d2||(d2={}));var f2;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(f2||(f2={}));const qA="modulepreload",GA=function(e,t){return new URL(e,t).href},h2={},$s=function(t,n,r){let i=Promise.resolve();if(n&&n.length>0){const a=document.getElementsByTagName("link"),s=document.querySelector("meta[property=csp-nonce]"),o=(s==null?void 0:s.nonce)||(s==null?void 0:s.getAttribute("nonce"));i=Promise.all(n.map(l=>{if(l=GA(l,r),l in h2)return;h2[l]=!0;const u=l.endsWith(".css"),c=u?'[rel="stylesheet"]':"";if(!!r)for(let h=a.length-1;h>=0;h--){const p=a[h];if(p.href===l&&(!u||p.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${l}"]${c}`))return;const f=document.createElement("link");if(f.rel=u?"stylesheet":qA,u||(f.as="script",f.crossOrigin=""),f.href=l,o&&f.setAttribute("nonce",o),document.head.appendChild(f),u)return new Promise((h,p)=>{f.addEventListener("load",h),f.addEventListener("error",()=>p(new Error(`Unable to preload CSS for ${l}`)))})}))}return i.then(()=>t()).catch(a=>{const s=new Event("vite:preloadError",{cancelable:!0});if(s.payload=a,window.dispatchEvent(s),!s.defaultPrevented)throw a})},ZA=e=>{let t;return e?t=e:typeof fetch>"u"?t=(...n)=>$s(async()=>{const{default:r}=await Promise.resolve().then(()=>Ms);return{default:r}},void 0,import.meta.url).then(({default:r})=>r(...n)):t=fetch,(...n)=>t(...n)};class t$ extends Error{constructor(t,n="FunctionsError",r){super(t),this.name=n,this.context=r}}class XA extends t${constructor(t){super("Failed to send a request to the Edge Function","FunctionsFetchError",t)}}class QA extends t${constructor(t){super("Relay Error invoking the Edge Function","FunctionsRelayError",t)}}class JA extends t${constructor(t){super("Edge Function returned a non-2xx status code","FunctionsHttpError",t)}}var ym;(function(e){e.Any="any",e.ApNortheast1="ap-northeast-1",e.ApNortheast2="ap-northeast-2",e.ApSouth1="ap-south-1",e.ApSoutheast1="ap-southeast-1",e.ApSoutheast2="ap-southeast-2",e.CaCentral1="ca-central-1",e.EuCentral1="eu-central-1",e.EuWest1="eu-west-1",e.EuWest2="eu-west-2",e.EuWest3="eu-west-3",e.SaEast1="sa-east-1",e.UsEast1="us-east-1",e.UsWest1="us-west-1",e.UsWest2="us-west-2"})(ym||(ym={}));var eO=function(e,t,n,r){function i(a){return a instanceof n?a:new n(function(s){s(a)})}return new(n||(n=Promise))(function(a,s){function o(c){try{u(r.next(c))}catch(d){s(d)}}function l(c){try{u(r.throw(c))}catch(d){s(d)}}function u(c){c.done?a(c.value):i(c.value).then(o,l)}u((r=r.apply(e,t||[])).next())})};class tO{constructor(t,{headers:n={},customFetch:r,region:i=ym.Any}={}){this.url=t,this.headers=n,this.region=i,this.fetch=ZA(r)}setAuth(t){this.headers.Authorization=`Bearer ${t}`}invoke(t,n={}){var r;return eO(this,void 0,void 0,function*(){try{const{headers:i,method:a,body:s}=n;let o={},{region:l}=n;l||(l=this.region),l&&l!=="any"&&(o["x-region"]=l);let u;s&&(i&&!Object.prototype.hasOwnProperty.call(i,"Content-Type")||!i)&&(typeof Blob<"u"&&s instanceof Blob||s instanceof ArrayBuffer?(o["Content-Type"]="application/octet-stream",u=s):typeof s=="string"?(o["Content-Type"]="text/plain",u=s):typeof FormData<"u"&&s instanceof FormData?u=s:(o["Content-Type"]="application/json",u=JSON.stringify(s)));const c=yield this.fetch(`${this.url}/${t}`,{method:a||"POST",headers:Object.assign(Object.assign(Object.assign({},o),this.headers),i),body:u}).catch(p=>{throw new XA(p)}),d=c.headers.get("x-relay-error");if(d&&d==="true")throw new QA(c);if(!c.ok)throw new JA(c);let f=((r=c.headers.get("Content-Type"))!==null&&r!==void 0?r:"text/plain").split(";")[0].trim(),h;return f==="application/json"?h=yield c.json():f==="application/octet-stream"?h=yield c.blob():f==="text/event-stream"?h=c:f==="multipart/form-data"?h=yield c.formData():h=yield c.text(),{data:h,error:null}}catch(i){return{data:null,error:i}}})}}var yn={},n$={},bf={},Al={},yf={},$f={},nO=function(){if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global;throw new Error("unable to locate global object")},xs=nO();const rO=xs.fetch,W_=xs.fetch.bind(xs),U_=xs.Headers,iO=xs.Request,aO=xs.Response,Ms=Object.freeze(Object.defineProperty({__proto__:null,Headers:U_,Request:iO,Response:aO,default:W_,fetch:rO},Symbol.toStringTag,{value:"Module"})),sO=kR(Ms);var r$={};Object.defineProperty(r$,"__esModule",{value:!0});class oO extends Error{constructor(t){super(t.message),this.name="PostgrestError",this.details=t.details,this.hint=t.hint,this.code=t.code}}r$.default=oO;var H_=Dn&&Dn.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty($f,"__esModule",{value:!0});const lO=H_(sO),uO=H_(r$);let cO=class{constructor(t){this.shouldThrowOnError=!1,this.method=t.method,this.url=t.url,this.headers=t.headers,this.schema=t.schema,this.body=t.body,this.shouldThrowOnError=t.shouldThrowOnError,this.signal=t.signal,this.isMaybeSingle=t.isMaybeSingle,t.fetch?this.fetch=t.fetch:typeof fetch>"u"?this.fetch=lO.default:this.fetch=fetch}throwOnError(){return this.shouldThrowOnError=!0,this}then(t,n){this.schema===void 0||(["GET","HEAD"].includes(this.method)?this.headers["Accept-Profile"]=this.schema:this.headers["Content-Profile"]=this.schema),this.method!=="GET"&&this.method!=="HEAD"&&(this.headers["Content-Type"]="application/json");const r=this.fetch;let i=r(this.url.toString(),{method:this.method,headers:this.headers,body:JSON.stringify(this.body),signal:this.signal}).then(async a=>{var s,o,l;let u=null,c=null,d=null,f=a.status,h=a.statusText;if(a.ok){if(this.method!=="HEAD"){const v=await a.text();v===""||(this.headers.Accept==="text/csv"||this.headers.Accept&&this.headers.Accept.includes("application/vnd.pgrst.plan+text")?c=v:c=JSON.parse(v))}const g=(s=this.headers.Prefer)===null||s===void 0?void 0:s.match(/count=(exact|planned|estimated)/),b=(o=a.headers.get("content-range"))===null||o===void 0?void 0:o.split("/");g&&b&&b.length>1&&(d=parseInt(b[1])),this.isMaybeSingle&&this.method==="GET"&&Array.isArray(c)&&(c.length>1?(u={code:"PGRST116",details:`Results contain ${c.length} rows, application/vnd.pgrst.object+json requires 1 row`,hint:null,message:"JSON object requested, multiple (or no) rows returned"},c=null,d=null,f=406,h="Not Acceptable"):c.length===1?c=c[0]:c=null)}else{const g=await a.text();try{u=JSON.parse(g),Array.isArray(u)&&a.status===404&&(c=[],u=null,f=200,h="OK")}catch{a.status===404&&g===""?(f=204,h="No Content"):u={message:g}}if(u&&this.isMaybeSingle&&(!((l=u==null?void 0:u.details)===null||l===void 0)&&l.includes("0 rows"))&&(u=null,f=200,h="OK"),u&&this.shouldThrowOnError)throw new uO.default(u)}return{error:u,data:c,count:d,status:f,statusText:h}});return this.shouldThrowOnError||(i=i.catch(a=>{var s,o,l;return{error:{message:`${(s=a==null?void 0:a.name)!==null&&s!==void 0?s:"FetchError"}: ${a==null?void 0:a.message}`,details:`${(o=a==null?void 0:a.stack)!==null&&o!==void 0?o:""}`,hint:"",code:`${(l=a==null?void 0:a.code)!==null&&l!==void 0?l:""}`},data:null,count:null,status:0,statusText:""}})),i.then(t,n)}};$f.default=cO;var dO=Dn&&Dn.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(yf,"__esModule",{value:!0});const fO=dO($f);let hO=class extends fO.default{select(t){let n=!1;const r=(t??"*").split("").map(i=>/\s/.test(i)&&!n?"":(i==='"'&&(n=!n),i)).join("");return this.url.searchParams.set("select",r),this.headers.Prefer&&(this.headers.Prefer+=","),this.headers.Prefer+="return=representation",this}order(t,{ascending:n=!0,nullsFirst:r,foreignTable:i,referencedTable:a=i}={}){const s=a?`${a}.order`:"order",o=this.url.searchParams.get(s);return this.url.searchParams.set(s,`${o?`${o},`:""}${t}.${n?"asc":"desc"}${r===void 0?"":r?".nullsfirst":".nullslast"}`),this}limit(t,{foreignTable:n,referencedTable:r=n}={}){const i=typeof r>"u"?"limit":`${r}.limit`;return this.url.searchParams.set(i,`${t}`),this}range(t,n,{foreignTable:r,referencedTable:i=r}={}){const a=typeof i>"u"?"offset":`${i}.offset`,s=typeof i>"u"?"limit":`${i}.limit`;return this.url.searchParams.set(a,`${t}`),this.url.searchParams.set(s,`${n-t+1}`),this}abortSignal(t){return this.signal=t,this}single(){return this.headers.Accept="application/vnd.pgrst.object+json",this}maybeSingle(){return this.method==="GET"?this.headers.Accept="application/json":this.headers.Accept="application/vnd.pgrst.object+json",this.isMaybeSingle=!0,this}csv(){return this.headers.Accept="text/csv",this}geojson(){return this.headers.Accept="application/geo+json",this}explain({analyze:t=!1,verbose:n=!1,settings:r=!1,buffers:i=!1,wal:a=!1,format:s="text"}={}){var o;const l=[t?"analyze":null,n?"verbose":null,r?"settings":null,i?"buffers":null,a?"wal":null].filter(Boolean).join("|"),u=(o=this.headers.Accept)!==null&&o!==void 0?o:"application/json";return this.headers.Accept=`application/vnd.pgrst.plan+${s}; for="${u}"; options=${l};`,s==="json"?this:this}rollback(){var t;return((t=this.headers.Prefer)!==null&&t!==void 0?t:"").trim().length>0?this.headers.Prefer+=",tx=rollback":this.headers.Prefer="tx=rollback",this}returns(){return this}};yf.default=hO;var pO=Dn&&Dn.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Al,"__esModule",{value:!0});const mO=pO(yf);let gO=class extends mO.default{eq(t,n){return this.url.searchParams.append(t,`eq.${n}`),this}neq(t,n){return this.url.searchParams.append(t,`neq.${n}`),this}gt(t,n){return this.url.searchParams.append(t,`gt.${n}`),this}gte(t,n){return this.url.searchParams.append(t,`gte.${n}`),this}lt(t,n){return this.url.searchParams.append(t,`lt.${n}`),this}lte(t,n){return this.url.searchParams.append(t,`lte.${n}`),this}like(t,n){return this.url.searchParams.append(t,`like.${n}`),this}likeAllOf(t,n){return this.url.searchParams.append(t,`like(all).{${n.join(",")}}`),this}likeAnyOf(t,n){return this.url.searchParams.append(t,`like(any).{${n.join(",")}}`),this}ilike(t,n){return this.url.searchParams.append(t,`ilike.${n}`),this}ilikeAllOf(t,n){return this.url.searchParams.append(t,`ilike(all).{${n.join(",")}}`),this}ilikeAnyOf(t,n){return this.url.searchParams.append(t,`ilike(any).{${n.join(",")}}`),this}is(t,n){return this.url.searchParams.append(t,`is.${n}`),this}in(t,n){const r=Array.from(new Set(n)).map(i=>typeof i=="string"&&new RegExp("[,()]").test(i)?`"${i}"`:`${i}`).join(",");return this.url.searchParams.append(t,`in.(${r})`),this}contains(t,n){return typeof n=="string"?this.url.searchParams.append(t,`cs.${n}`):Array.isArray(n)?this.url.searchParams.append(t,`cs.{${n.join(",")}}`):this.url.searchParams.append(t,`cs.${JSON.stringify(n)}`),this}containedBy(t,n){return typeof n=="string"?this.url.searchParams.append(t,`cd.${n}`):Array.isArray(n)?this.url.searchParams.append(t,`cd.{${n.join(",")}}`):this.url.searchParams.append(t,`cd.${JSON.stringify(n)}`),this}rangeGt(t,n){return this.url.searchParams.append(t,`sr.${n}`),this}rangeGte(t,n){return this.url.searchParams.append(t,`nxl.${n}`),this}rangeLt(t,n){return this.url.searchParams.append(t,`sl.${n}`),this}rangeLte(t,n){return this.url.searchParams.append(t,`nxr.${n}`),this}rangeAdjacent(t,n){return this.url.searchParams.append(t,`adj.${n}`),this}overlaps(t,n){return typeof n=="string"?this.url.searchParams.append(t,`ov.${n}`):this.url.searchParams.append(t,`ov.{${n.join(",")}}`),this}textSearch(t,n,{config:r,type:i}={}){let a="";i==="plain"?a="pl":i==="phrase"?a="ph":i==="websearch"&&(a="w");const s=r===void 0?"":`(${r})`;return this.url.searchParams.append(t,`${a}fts${s}.${n}`),this}match(t){return Object.entries(t).forEach(([n,r])=>{this.url.searchParams.append(n,`eq.${r}`)}),this}not(t,n,r){return this.url.searchParams.append(t,`not.${n}.${r}`),this}or(t,{foreignTable:n,referencedTable:r=n}={}){const i=r?`${r}.or`:"or";return this.url.searchParams.append(i,`(${t})`),this}filter(t,n,r){return this.url.searchParams.append(t,`${n}.${r}`),this}};Al.default=gO;var vO=Dn&&Dn.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(bf,"__esModule",{value:!0});const Hs=vO(Al);let bO=class{constructor(t,{headers:n={},schema:r,fetch:i}){this.url=t,this.headers=n,this.schema=r,this.fetch=i}select(t,{head:n=!1,count:r}={}){const i=n?"HEAD":"GET";let a=!1;const s=(t??"*").split("").map(o=>/\s/.test(o)&&!a?"":(o==='"'&&(a=!a),o)).join("");return this.url.searchParams.set("select",s),r&&(this.headers.Prefer=`count=${r}`),new Hs.default({method:i,url:this.url,headers:this.headers,schema:this.schema,fetch:this.fetch,allowEmpty:!1})}insert(t,{count:n,defaultToNull:r=!0}={}){const i="POST",a=[];if(this.headers.Prefer&&a.push(this.headers.Prefer),n&&a.push(`count=${n}`),r||a.push("missing=default"),this.headers.Prefer=a.join(","),Array.isArray(t)){const s=t.reduce((o,l)=>o.concat(Object.keys(l)),[]);if(s.length>0){const o=[...new Set(s)].map(l=>`"${l}"`);this.url.searchParams.set("columns",o.join(","))}}return new Hs.default({method:i,url:this.url,headers:this.headers,schema:this.schema,body:t,fetch:this.fetch,allowEmpty:!1})}upsert(t,{onConflict:n,ignoreDuplicates:r=!1,count:i,defaultToNull:a=!0}={}){const s="POST",o=[`resolution=${r?"ignore":"merge"}-duplicates`];if(n!==void 0&&this.url.searchParams.set("on_conflict",n),this.headers.Prefer&&o.push(this.headers.Prefer),i&&o.push(`count=${i}`),a||o.push("missing=default"),this.headers.Prefer=o.join(","),Array.isArray(t)){const l=t.reduce((u,c)=>u.concat(Object.keys(c)),[]);if(l.length>0){const u=[...new Set(l)].map(c=>`"${c}"`);this.url.searchParams.set("columns",u.join(","))}}return new Hs.default({method:s,url:this.url,headers:this.headers,schema:this.schema,body:t,fetch:this.fetch,allowEmpty:!1})}update(t,{count:n}={}){const r="PATCH",i=[];return this.headers.Prefer&&i.push(this.headers.Prefer),n&&i.push(`count=${n}`),this.headers.Prefer=i.join(","),new Hs.default({method:r,url:this.url,headers:this.headers,schema:this.schema,body:t,fetch:this.fetch,allowEmpty:!1})}delete({count:t}={}){const n="DELETE",r=[];return t&&r.push(`count=${t}`),this.headers.Prefer&&r.unshift(this.headers.Prefer),this.headers.Prefer=r.join(","),new Hs.default({method:n,url:this.url,headers:this.headers,schema:this.schema,fetch:this.fetch,allowEmpty:!1})}};bf.default=bO;var xf={},wf={};Object.defineProperty(wf,"__esModule",{value:!0});wf.version=void 0;wf.version="0.0.0-automated";Object.defineProperty(xf,"__esModule",{value:!0});xf.DEFAULT_HEADERS=void 0;const yO=wf;xf.DEFAULT_HEADERS={"X-Client-Info":`postgrest-js/${yO.version}`};var K_=Dn&&Dn.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(n$,"__esModule",{value:!0});const $O=K_(bf),xO=K_(Al),wO=xf;let DO=class Y_{constructor(t,{headers:n={},schema:r,fetch:i}={}){this.url=t,this.headers=Object.assign(Object.assign({},wO.DEFAULT_HEADERS),n),this.schemaName=r,this.fetch=i}from(t){const n=new URL(`${this.url}/${t}`);return new $O.default(n,{headers:Object.assign({},this.headers),schema:this.schemaName,fetch:this.fetch})}schema(t){return new Y_(this.url,{headers:this.headers,schema:t,fetch:this.fetch})}rpc(t,n={},{head:r=!1,get:i=!1,count:a}={}){let s;const o=new URL(`${this.url}/rpc/${t}`);let l;r||i?(s=r?"HEAD":"GET",Object.entries(n).filter(([c,d])=>d!==void 0).map(([c,d])=>[c,Array.isArray(d)?`{${d.join(",")}}`:`${d}`]).forEach(([c,d])=>{o.searchParams.append(c,d)})):(s="POST",l=n);const u=Object.assign({},this.headers);return a&&(u.Prefer=`count=${a}`),new xO.default({method:s,url:o,headers:u,schema:this.schemaName,body:l,fetch:this.fetch,allowEmpty:!1})}};n$.default=DO;var Ol=Dn&&Dn.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(yn,"__esModule",{value:!0});yn.PostgrestBuilder=yn.PostgrestTransformBuilder=yn.PostgrestFilterBuilder=yn.PostgrestQueryBuilder=yn.PostgrestClient=void 0;const q_=Ol(n$);yn.PostgrestClient=q_.default;const G_=Ol(bf);yn.PostgrestQueryBuilder=G_.default;const Z_=Ol(Al);yn.PostgrestFilterBuilder=Z_.default;const X_=Ol(yf);yn.PostgrestTransformBuilder=X_.default;const Q_=Ol($f);yn.PostgrestBuilder=Q_.default;var _O=yn.default={PostgrestClient:q_.default,PostgrestQueryBuilder:G_.default,PostgrestFilterBuilder:Z_.default,PostgrestTransformBuilder:X_.default,PostgrestBuilder:Q_.default};const{PostgrestClient:EO,PostgrestQueryBuilder:IG,PostgrestFilterBuilder:LG,PostgrestTransformBuilder:NG,PostgrestBuilder:jG}=_O,SO="2.10.2",CO={"X-Client-Info":`realtime-js/${SO}`},kO="1.0.0",J_=1e4,PO=1e3;var rs;(function(e){e[e.connecting=0]="connecting",e[e.open=1]="open",e[e.closing=2]="closing",e[e.closed=3]="closed"})(rs||(rs={}));var Jt;(function(e){e.closed="closed",e.errored="errored",e.joined="joined",e.joining="joining",e.leaving="leaving"})(Jt||(Jt={}));var Rn;(function(e){e.close="phx_close",e.error="phx_error",e.join="phx_join",e.reply="phx_reply",e.leave="phx_leave",e.access_token="access_token"})(Rn||(Rn={}));var $m;(function(e){e.websocket="websocket"})($m||($m={}));var Bi;(function(e){e.Connecting="connecting",e.Open="open",e.Closing="closing",e.Closed="closed"})(Bi||(Bi={}));class TO{constructor(){this.HEADER_LENGTH=1}decode(t,n){return t.constructor===ArrayBuffer?n(this._binaryDecode(t)):n(typeof t=="string"?JSON.parse(t):{})}_binaryDecode(t){const n=new DataView(t),r=new TextDecoder;return this._decodeBroadcast(t,n,r)}_decodeBroadcast(t,n,r){const i=n.getUint8(1),a=n.getUint8(2);let s=this.HEADER_LENGTH+2;const o=r.decode(t.slice(s,s+i));s=s+i;const l=r.decode(t.slice(s,s+a));s=s+a;const u=JSON.parse(r.decode(t.slice(s,t.byteLength)));return{ref:null,topic:o,event:l,payload:u}}}class e8{constructor(t,n){this.callback=t,this.timerCalc=n,this.timer=void 0,this.tries=0,this.callback=t,this.timerCalc=n}reset(){this.tries=0,clearTimeout(this.timer)}scheduleTimeout(){clearTimeout(this.timer),this.timer=setTimeout(()=>{this.tries=this.tries+1,this.callback()},this.timerCalc(this.tries+1))}}var we;(function(e){e.abstime="abstime",e.bool="bool",e.date="date",e.daterange="daterange",e.float4="float4",e.float8="float8",e.int2="int2",e.int4="int4",e.int4range="int4range",e.int8="int8",e.int8range="int8range",e.json="json",e.jsonb="jsonb",e.money="money",e.numeric="numeric",e.oid="oid",e.reltime="reltime",e.text="text",e.time="time",e.timestamp="timestamp",e.timestamptz="timestamptz",e.timetz="timetz",e.tsrange="tsrange",e.tstzrange="tstzrange"})(we||(we={}));const p2=(e,t,n={})=>{var r;const i=(r=n.skipTypes)!==null&&r!==void 0?r:[];return Object.keys(t).reduce((a,s)=>(a[s]=RO(s,e,t,i),a),{})},RO=(e,t,n,r)=>{const i=t.find(o=>o.name===e),a=i==null?void 0:i.type,s=n[e];return a&&!r.includes(a)?t8(a,s):xm(s)},t8=(e,t)=>{if(e.charAt(0)==="_"){const n=e.slice(1,e.length);return OO(t,n)}switch(e){case we.bool:return MO(t);case we.float4:case we.float8:case we.int2:case we.int4:case we.int8:case we.numeric:case we.oid:return FO(t);case we.json:case we.jsonb:return AO(t);case we.timestamp:return BO(t);case we.abstime:case we.date:case we.daterange:case we.int4range:case we.int8range:case we.money:case we.reltime:case we.text:case we.time:case we.timestamptz:case we.timetz:case we.tsrange:case we.tstzrange:return xm(t);default:return xm(t)}},xm=e=>e,MO=e=>{switch(e){case"t":return!0;case"f":return!1;default:return e}},FO=e=>{if(typeof e=="string"){const t=parseFloat(e);if(!Number.isNaN(t))return t}return e},AO=e=>{if(typeof e=="string")try{return JSON.parse(e)}catch(t){return console.log(`JSON parse error: ${t}`),e}return e},OO=(e,t)=>{if(typeof e!="string")return e;const n=e.length-1,r=e[n];if(e[0]==="{"&&r==="}"){let a;const s=e.slice(1,n);try{a=JSON.parse("["+s+"]")}catch{a=s?s.split(","):[]}return a.map(o=>t8(t,o))}return e},BO=e=>typeof e=="string"?e.replace(" ","T"):e,n8=e=>{let t=e;return t=t.replace(/^ws/i,"http"),t=t.replace(/(\/socket\/websocket|\/socket|\/websocket)\/?$/i,""),t.replace(/\/+$/,"")};class Dh{constructor(t,n,r={},i=J_){this.channel=t,this.event=n,this.payload=r,this.timeout=i,this.sent=!1,this.timeoutTimer=void 0,this.ref="",this.receivedResp=null,this.recHooks=[],this.refEvent=null}resend(t){this.timeout=t,this._cancelRefEvent(),this.ref="",this.refEvent=null,this.receivedResp=null,this.sent=!1,this.send()}send(){this._hasReceived("timeout")||(this.startTimeout(),this.sent=!0,this.channel.socket.push({topic:this.channel.topic,event:this.event,payload:this.payload,ref:this.ref,join_ref:this.channel._joinRef()}))}updatePayload(t){this.payload=Object.assign(Object.assign({},this.payload),t)}receive(t,n){var r;return this._hasReceived(t)&&n((r=this.receivedResp)===null||r===void 0?void 0:r.response),this.recHooks.push({status:t,callback:n}),this}startTimeout(){if(this.timeoutTimer)return;this.ref=this.channel.socket._makeRef(),this.refEvent=this.channel._replyEventName(this.ref);const t=n=>{this._cancelRefEvent(),this._cancelTimeout(),this.receivedResp=n,this._matchReceive(n)};this.channel._on(this.refEvent,{},t),this.timeoutTimer=setTimeout(()=>{this.trigger("timeout",{})},this.timeout)}trigger(t,n){this.refEvent&&this.channel._trigger(this.refEvent,{status:t,response:n})}destroy(){this._cancelRefEvent(),this._cancelTimeout()}_cancelRefEvent(){this.refEvent&&this.channel._off(this.refEvent,{})}_cancelTimeout(){clearTimeout(this.timeoutTimer),this.timeoutTimer=void 0}_matchReceive({status:t,response:n}){this.recHooks.filter(r=>r.status===t).forEach(r=>r.callback(n))}_hasReceived(t){return this.receivedResp&&this.receivedResp.status===t}}var m2;(function(e){e.SYNC="sync",e.JOIN="join",e.LEAVE="leave"})(m2||(m2={}));class Fo{constructor(t,n){this.channel=t,this.state={},this.pendingDiffs=[],this.joinRef=null,this.caller={onJoin:()=>{},onLeave:()=>{},onSync:()=>{}};const r=(n==null?void 0:n.events)||{state:"presence_state",diff:"presence_diff"};this.channel._on(r.state,{},i=>{const{onJoin:a,onLeave:s,onSync:o}=this.caller;this.joinRef=this.channel._joinRef(),this.state=Fo.syncState(this.state,i,a,s),this.pendingDiffs.forEach(l=>{this.state=Fo.syncDiff(this.state,l,a,s)}),this.pendingDiffs=[],o()}),this.channel._on(r.diff,{},i=>{const{onJoin:a,onLeave:s,onSync:o}=this.caller;this.inPendingSyncState()?this.pendingDiffs.push(i):(this.state=Fo.syncDiff(this.state,i,a,s),o())}),this.onJoin((i,a,s)=>{this.channel._trigger("presence",{event:"join",key:i,currentPresences:a,newPresences:s})}),this.onLeave((i,a,s)=>{this.channel._trigger("presence",{event:"leave",key:i,currentPresences:a,leftPresences:s})}),this.onSync(()=>{this.channel._trigger("presence",{event:"sync"})})}static syncState(t,n,r,i){const a=this.cloneDeep(t),s=this.transformState(n),o={},l={};return this.map(a,(u,c)=>{s[u]||(l[u]=c)}),this.map(s,(u,c)=>{const d=a[u];if(d){const f=c.map(b=>b.presence_ref),h=d.map(b=>b.presence_ref),p=c.filter(b=>h.indexOf(b.presence_ref)<0),g=d.filter(b=>f.indexOf(b.presence_ref)<0);p.length>0&&(o[u]=p),g.length>0&&(l[u]=g)}else o[u]=c}),this.syncDiff(a,{joins:o,leaves:l},r,i)}static syncDiff(t,n,r,i){const{joins:a,leaves:s}={joins:this.transformState(n.joins),leaves:this.transformState(n.leaves)};return r||(r=()=>{}),i||(i=()=>{}),this.map(a,(o,l)=>{var u;const c=(u=t[o])!==null&&u!==void 0?u:[];if(t[o]=this.cloneDeep(l),c.length>0){const d=t[o].map(h=>h.presence_ref),f=c.filter(h=>d.indexOf(h.presence_ref)<0);t[o].unshift(...f)}r(o,c,l)}),this.map(s,(o,l)=>{let u=t[o];if(!u)return;const c=l.map(d=>d.presence_ref);u=u.filter(d=>c.indexOf(d.presence_ref)<0),t[o]=u,i(o,u,l),u.length===0&&delete t[o]}),t}static map(t,n){return Object.getOwnPropertyNames(t).map(r=>n(r,t[r]))}static transformState(t){return t=this.cloneDeep(t),Object.getOwnPropertyNames(t).reduce((n,r)=>{const i=t[r];return"metas"in i?n[r]=i.metas.map(a=>(a.presence_ref=a.phx_ref,delete a.phx_ref,delete a.phx_ref_prev,a)):n[r]=i,n},{})}static cloneDeep(t){return JSON.parse(JSON.stringify(t))}onJoin(t){this.caller.onJoin=t}onLeave(t){this.caller.onLeave=t}onSync(t){this.caller.onSync=t}inPendingSyncState(){return!this.joinRef||this.joinRef!==this.channel._joinRef()}}var g2;(function(e){e.ALL="*",e.INSERT="INSERT",e.UPDATE="UPDATE",e.DELETE="DELETE"})(g2||(g2={}));var v2;(function(e){e.BROADCAST="broadcast",e.PRESENCE="presence",e.POSTGRES_CHANGES="postgres_changes"})(v2||(v2={}));var b2;(function(e){e.SUBSCRIBED="SUBSCRIBED",e.TIMED_OUT="TIMED_OUT",e.CLOSED="CLOSED",e.CHANNEL_ERROR="CHANNEL_ERROR"})(b2||(b2={}));class i${constructor(t,n={config:{}},r){this.topic=t,this.params=n,this.socket=r,this.bindings={},this.state=Jt.closed,this.joinedOnce=!1,this.pushBuffer=[],this.subTopic=t.replace(/^realtime:/i,""),this.params.config=Object.assign({broadcast:{ack:!1,self:!1},presence:{key:""},private:!1},n.config),this.timeout=this.socket.timeout,this.joinPush=new Dh(this,Rn.join,this.params,this.timeout),this.rejoinTimer=new e8(()=>this._rejoinUntilConnected(),this.socket.reconnectAfterMs),this.joinPush.receive("ok",()=>{this.state=Jt.joined,this.rejoinTimer.reset(),this.pushBuffer.forEach(i=>i.send()),this.pushBuffer=[]}),this._onClose(()=>{this.rejoinTimer.reset(),this.socket.log("channel",`close ${this.topic} ${this._joinRef()}`),this.state=Jt.closed,this.socket._remove(this)}),this._onError(i=>{this._isLeaving()||this._isClosed()||(this.socket.log("channel",`error ${this.topic}`,i),this.state=Jt.errored,this.rejoinTimer.scheduleTimeout())}),this.joinPush.receive("timeout",()=>{this._isJoining()&&(this.socket.log("channel",`timeout ${this.topic}`,this.joinPush.timeout),this.state=Jt.errored,this.rejoinTimer.scheduleTimeout())}),this._on(Rn.reply,{},(i,a)=>{this._trigger(this._replyEventName(a),i)}),this.presence=new Fo(this),this.broadcastEndpointURL=n8(this.socket.endPoint)+"/api/broadcast"}subscribe(t,n=this.timeout){var r,i;if(this.socket.isConnected()||this.socket.connect(),this.joinedOnce)throw"tried to subscribe multiple times. 'subscribe' can only be called a single time per channel instance";{const{config:{broadcast:a,presence:s,private:o}}=this.params;this._onError(c=>t&&t("CHANNEL_ERROR",c)),this._onClose(()=>t&&t("CLOSED"));const l={},u={broadcast:a,presence:s,postgres_changes:(i=(r=this.bindings.postgres_changes)===null||r===void 0?void 0:r.map(c=>c.filter))!==null&&i!==void 0?i:[],private:o};this.socket.accessToken&&(l.access_token=this.socket.accessToken),this.updateJoinPayload(Object.assign({config:u},l)),this.joinedOnce=!0,this._rejoin(n),this.joinPush.receive("ok",({postgres_changes:c})=>{var d;if(this.socket.accessToken&&this.socket.setAuth(this.socket.accessToken),c===void 0){t&&t("SUBSCRIBED");return}else{const f=this.bindings.postgres_changes,h=(d=f==null?void 0:f.length)!==null&&d!==void 0?d:0,p=[];for(let g=0;g<h;g++){const b=f[g],{filter:{event:v,schema:m,table:$,filter:w}}=b,D=c&&c[g];if(D&&D.event===v&&D.schema===m&&D.table===$&&D.filter===w)p.push(Object.assign(Object.assign({},b),{id:D.id}));else{this.unsubscribe(),t&&t("CHANNEL_ERROR",new Error("mismatch between server and client bindings for postgres changes"));return}}this.bindings.postgres_changes=p,t&&t("SUBSCRIBED");return}}).receive("error",c=>{t&&t("CHANNEL_ERROR",new Error(JSON.stringify(Object.values(c).join(", ")||"error")))}).receive("timeout",()=>{t&&t("TIMED_OUT")})}return this}presenceState(){return this.presence.state}async track(t,n={}){return await this.send({type:"presence",event:"track",payload:t},n.timeout||this.timeout)}async untrack(t={}){return await this.send({type:"presence",event:"untrack"},t)}on(t,n,r){return this._on(t,n,r)}async send(t,n={}){var r,i;if(!this._canPush()&&t.type==="broadcast"){const{event:a,payload:s}=t,o={method:"POST",headers:{Authorization:this.socket.accessToken?`Bearer ${this.socket.accessToken}`:"",apikey:this.socket.apiKey?this.socket.apiKey:"","Content-Type":"application/json"},body:JSON.stringify({messages:[{topic:this.subTopic,event:a,payload:s}]})};try{const l=await this._fetchWithTimeout(this.broadcastEndpointURL,o,(r=n.timeout)!==null&&r!==void 0?r:this.timeout);return await((i=l.body)===null||i===void 0?void 0:i.cancel()),l.ok?"ok":"error"}catch(l){return l.name==="AbortError"?"timed out":"error"}}else return new Promise(a=>{var s,o,l;const u=this._push(t.type,t,n.timeout||this.timeout);t.type==="broadcast"&&!(!((l=(o=(s=this.params)===null||s===void 0?void 0:s.config)===null||o===void 0?void 0:o.broadcast)===null||l===void 0)&&l.ack)&&a("ok"),u.receive("ok",()=>a("ok")),u.receive("error",()=>a("error")),u.receive("timeout",()=>a("timed out"))})}updateJoinPayload(t){this.joinPush.updatePayload(t)}unsubscribe(t=this.timeout){this.state=Jt.leaving;const n=()=>{this.socket.log("channel",`leave ${this.topic}`),this._trigger(Rn.close,"leave",this._joinRef())};return this.rejoinTimer.reset(),this.joinPush.destroy(),new Promise(r=>{const i=new Dh(this,Rn.leave,{},t);i.receive("ok",()=>{n(),r("ok")}).receive("timeout",()=>{n(),r("timed out")}).receive("error",()=>{r("error")}),i.send(),this._canPush()||i.trigger("ok",{})})}async _fetchWithTimeout(t,n,r){const i=new AbortController,a=setTimeout(()=>i.abort(),r),s=await this.socket.fetch(t,Object.assign(Object.assign({},n),{signal:i.signal}));return clearTimeout(a),s}_push(t,n,r=this.timeout){if(!this.joinedOnce)throw`tried to push '${t}' to '${this.topic}' before joining. Use channel.subscribe() before pushing events`;let i=new Dh(this,t,n,r);return this._canPush()?i.send():(i.startTimeout(),this.pushBuffer.push(i)),i}_onMessage(t,n,r){return n}_isMember(t){return this.topic===t}_joinRef(){return this.joinPush.ref}_trigger(t,n,r){var i,a;const s=t.toLocaleLowerCase(),{close:o,error:l,leave:u,join:c}=Rn;if(r&&[o,l,u,c].indexOf(s)>=0&&r!==this._joinRef())return;let f=this._onMessage(s,n,r);if(n&&!f)throw"channel onMessage callbacks must return the payload, modified or unmodified";["insert","update","delete"].includes(s)?(i=this.bindings.postgres_changes)===null||i===void 0||i.filter(h=>{var p,g,b;return((p=h.filter)===null||p===void 0?void 0:p.event)==="*"||((b=(g=h.filter)===null||g===void 0?void 0:g.event)===null||b===void 0?void 0:b.toLocaleLowerCase())===s}).map(h=>h.callback(f,r)):(a=this.bindings[s])===null||a===void 0||a.filter(h=>{var p,g,b,v,m,$;if(["broadcast","presence","postgres_changes"].includes(s))if("id"in h){const w=h.id,D=(p=h.filter)===null||p===void 0?void 0:p.event;return w&&((g=n.ids)===null||g===void 0?void 0:g.includes(w))&&(D==="*"||(D==null?void 0:D.toLocaleLowerCase())===((b=n.data)===null||b===void 0?void 0:b.type.toLocaleLowerCase()))}else{const w=(m=(v=h==null?void 0:h.filter)===null||v===void 0?void 0:v.event)===null||m===void 0?void 0:m.toLocaleLowerCase();return w==="*"||w===(($=n==null?void 0:n.event)===null||$===void 0?void 0:$.toLocaleLowerCase())}else return h.type.toLocaleLowerCase()===s}).map(h=>{if(typeof f=="object"&&"ids"in f){const p=f.data,{schema:g,table:b,commit_timestamp:v,type:m,errors:$}=p;f=Object.assign(Object.assign({},{schema:g,table:b,commit_timestamp:v,eventType:m,new:{},old:{},errors:$}),this._getPayloadRecords(p))}h.callback(f,r)})}_isClosed(){return this.state===Jt.closed}_isJoined(){return this.state===Jt.joined}_isJoining(){return this.state===Jt.joining}_isLeaving(){return this.state===Jt.leaving}_replyEventName(t){return`chan_reply_${t}`}_on(t,n,r){const i=t.toLocaleLowerCase(),a={type:i,filter:n,callback:r};return this.bindings[i]?this.bindings[i].push(a):this.bindings[i]=[a],this}_off(t,n){const r=t.toLocaleLowerCase();return this.bindings[r]=this.bindings[r].filter(i=>{var a;return!(((a=i.type)===null||a===void 0?void 0:a.toLocaleLowerCase())===r&&i$.isEqual(i.filter,n))}),this}static isEqual(t,n){if(Object.keys(t).length!==Object.keys(n).length)return!1;for(const r in t)if(t[r]!==n[r])return!1;return!0}_rejoinUntilConnected(){this.rejoinTimer.scheduleTimeout(),this.socket.isConnected()&&this._rejoin()}_onClose(t){this._on(Rn.close,{},t)}_onError(t){this._on(Rn.error,{},n=>t(n))}_canPush(){return this.socket.isConnected()&&this._isJoined()}_rejoin(t=this.timeout){this._isLeaving()||(this.socket._leaveOpenTopic(this.topic),this.state=Jt.joining,this.joinPush.resend(t))}_getPayloadRecords(t){const n={new:{},old:{}};return(t.type==="INSERT"||t.type==="UPDATE")&&(n.new=p2(t.columns,t.record)),(t.type==="UPDATE"||t.type==="DELETE")&&(n.old=p2(t.columns,t.old_record)),n}}const IO=()=>{},LO=typeof WebSocket<"u";class NO{constructor(t,n){var r;this.accessToken=null,this.apiKey=null,this.channels=[],this.endPoint="",this.httpEndpoint="",this.headers=CO,this.params={},this.timeout=J_,this.heartbeatIntervalMs=3e4,this.heartbeatTimer=void 0,this.pendingHeartbeatRef=null,this.ref=0,this.logger=IO,this.conn=null,this.sendBuffer=[],this.serializer=new TO,this.stateChangeCallbacks={open:[],close:[],error:[],message:[]},this._resolveFetch=a=>{let s;return a?s=a:typeof fetch>"u"?s=(...o)=>$s(async()=>{const{default:l}=await Promise.resolve().then(()=>Ms);return{default:l}},void 0,import.meta.url).then(({default:l})=>l(...o)):s=fetch,(...o)=>s(...o)},this.endPoint=`${t}/${$m.websocket}`,this.httpEndpoint=n8(t),n!=null&&n.transport?this.transport=n.transport:this.transport=null,n!=null&&n.params&&(this.params=n.params),n!=null&&n.headers&&(this.headers=Object.assign(Object.assign({},this.headers),n.headers)),n!=null&&n.timeout&&(this.timeout=n.timeout),n!=null&&n.logger&&(this.logger=n.logger),n!=null&&n.heartbeatIntervalMs&&(this.heartbeatIntervalMs=n.heartbeatIntervalMs);const i=(r=n==null?void 0:n.params)===null||r===void 0?void 0:r.apikey;i&&(this.accessToken=i,this.apiKey=i),this.reconnectAfterMs=n!=null&&n.reconnectAfterMs?n.reconnectAfterMs:a=>[1e3,2e3,5e3,1e4][a-1]||1e4,this.encode=n!=null&&n.encode?n.encode:(a,s)=>s(JSON.stringify(a)),this.decode=n!=null&&n.decode?n.decode:this.serializer.decode.bind(this.serializer),this.reconnectTimer=new e8(async()=>{this.disconnect(),this.connect()},this.reconnectAfterMs),this.fetch=this._resolveFetch(n==null?void 0:n.fetch)}connect(){if(!this.conn){if(this.transport){this.conn=new this.transport(this._endPointURL(),void 0,{headers:this.headers});return}if(LO){this.conn=new WebSocket(this._endPointURL()),this.setupConnection();return}this.conn=new jO(this._endPointURL(),void 0,{close:()=>{this.conn=null}}),$s(async()=>{const{default:t}=await import("./browser-Dp_p5C6a.js").then(n=>n.b);return{default:t}},[],import.meta.url).then(({default:t})=>{this.conn=new t(this._endPointURL(),void 0,{headers:this.headers}),this.setupConnection()})}}disconnect(t,n){this.conn&&(this.conn.onclose=function(){},t?this.conn.close(t,n??""):this.conn.close(),this.conn=null,this.heartbeatTimer&&clearInterval(this.heartbeatTimer),this.reconnectTimer.reset())}getChannels(){return this.channels}async removeChannel(t){const n=await t.unsubscribe();return this.channels.length===0&&this.disconnect(),n}async removeAllChannels(){const t=await Promise.all(this.channels.map(n=>n.unsubscribe()));return this.disconnect(),t}log(t,n,r){this.logger(t,n,r)}connectionState(){switch(this.conn&&this.conn.readyState){case rs.connecting:return Bi.Connecting;case rs.open:return Bi.Open;case rs.closing:return Bi.Closing;default:return Bi.Closed}}isConnected(){return this.connectionState()===Bi.Open}channel(t,n={config:{}}){const r=new i$(`realtime:${t}`,n,this);return this.channels.push(r),r}push(t){const{topic:n,event:r,payload:i,ref:a}=t,s=()=>{this.encode(t,o=>{var l;(l=this.conn)===null||l===void 0||l.send(o)})};this.log("push",`${n} ${r} (${a})`,i),this.isConnected()?s():this.sendBuffer.push(s)}setAuth(t){this.accessToken=t,this.channels.forEach(n=>{t&&n.updateJoinPayload({access_token:t}),n.joinedOnce&&n._isJoined()&&n._push(Rn.access_token,{access_token:t})})}_makeRef(){let t=this.ref+1;return t===this.ref?this.ref=0:this.ref=t,this.ref.toString()}_leaveOpenTopic(t){let n=this.channels.find(r=>r.topic===t&&(r._isJoined()||r._isJoining()));n&&(this.log("transport",`leaving duplicate topic "${t}"`),n.unsubscribe())}_remove(t){this.channels=this.channels.filter(n=>n._joinRef()!==t._joinRef())}setupConnection(){this.conn&&(this.conn.binaryType="arraybuffer",this.conn.onopen=()=>this._onConnOpen(),this.conn.onerror=t=>this._onConnError(t),this.conn.onmessage=t=>this._onConnMessage(t),this.conn.onclose=t=>this._onConnClose(t))}_endPointURL(){return this._appendParams(this.endPoint,Object.assign({},this.params,{vsn:kO}))}_onConnMessage(t){this.decode(t.data,n=>{let{topic:r,event:i,payload:a,ref:s}=n;(s&&s===this.pendingHeartbeatRef||i===(a==null?void 0:a.type))&&(this.pendingHeartbeatRef=null),this.log("receive",`${a.status||""} ${r} ${i} ${s&&"("+s+")"||""}`,a),this.channels.filter(o=>o._isMember(r)).forEach(o=>o._trigger(i,a,s)),this.stateChangeCallbacks.message.forEach(o=>o(n))})}_onConnOpen(){this.log("transport",`connected to ${this._endPointURL()}`),this._flushSendBuffer(),this.reconnectTimer.reset(),this.heartbeatTimer&&clearInterval(this.heartbeatTimer),this.heartbeatTimer=setInterval(()=>this._sendHeartbeat(),this.heartbeatIntervalMs),this.stateChangeCallbacks.open.forEach(t=>t())}_onConnClose(t){this.log("transport","close",t),this._triggerChanError(),this.heartbeatTimer&&clearInterval(this.heartbeatTimer),this.reconnectTimer.scheduleTimeout(),this.stateChangeCallbacks.close.forEach(n=>n(t))}_onConnError(t){this.log("transport",t.message),this._triggerChanError(),this.stateChangeCallbacks.error.forEach(n=>n(t))}_triggerChanError(){this.channels.forEach(t=>t._trigger(Rn.error))}_appendParams(t,n){if(Object.keys(n).length===0)return t;const r=t.match(/\?/)?"&":"?",i=new URLSearchParams(n);return`${t}${r}${i}`}_flushSendBuffer(){this.isConnected()&&this.sendBuffer.length>0&&(this.sendBuffer.forEach(t=>t()),this.sendBuffer=[])}_sendHeartbeat(){var t;if(this.isConnected()){if(this.pendingHeartbeatRef){this.pendingHeartbeatRef=null,this.log("transport","heartbeat timeout. Attempting to re-establish connection"),(t=this.conn)===null||t===void 0||t.close(PO,"hearbeat timeout");return}this.pendingHeartbeatRef=this._makeRef(),this.push({topic:"phoenix",event:"heartbeat",payload:{},ref:this.pendingHeartbeatRef}),this.setAuth(this.accessToken)}}}class jO{constructor(t,n,r){this.binaryType="arraybuffer",this.onclose=()=>{},this.onerror=()=>{},this.onmessage=()=>{},this.onopen=()=>{},this.readyState=rs.connecting,this.send=()=>{},this.url=null,this.url=t,this.close=r.close}}class a$ extends Error{constructor(t){super(t),this.__isStorageError=!0,this.name="StorageError"}}function _t(e){return typeof e=="object"&&e!==null&&"__isStorageError"in e}class zO extends a${constructor(t,n){super(t),this.name="StorageApiError",this.status=n}toJSON(){return{name:this.name,message:this.message,status:this.status}}}class y2 extends a${constructor(t,n){super(t),this.name="StorageUnknownError",this.originalError=n}}var VO=function(e,t,n,r){function i(a){return a instanceof n?a:new n(function(s){s(a)})}return new(n||(n=Promise))(function(a,s){function o(c){try{u(r.next(c))}catch(d){s(d)}}function l(c){try{u(r.throw(c))}catch(d){s(d)}}function u(c){c.done?a(c.value):i(c.value).then(o,l)}u((r=r.apply(e,t||[])).next())})};const r8=e=>{let t;return e?t=e:typeof fetch>"u"?t=(...n)=>$s(async()=>{const{default:r}=await Promise.resolve().then(()=>Ms);return{default:r}},void 0,import.meta.url).then(({default:r})=>r(...n)):t=fetch,(...n)=>t(...n)},WO=()=>VO(void 0,void 0,void 0,function*(){return typeof Response>"u"?(yield $s(()=>Promise.resolve().then(()=>Ms),void 0,import.meta.url)).Response:Response});var Fs=function(e,t,n,r){function i(a){return a instanceof n?a:new n(function(s){s(a)})}return new(n||(n=Promise))(function(a,s){function o(c){try{u(r.next(c))}catch(d){s(d)}}function l(c){try{u(r.throw(c))}catch(d){s(d)}}function u(c){c.done?a(c.value):i(c.value).then(o,l)}u((r=r.apply(e,t||[])).next())})};const _h=e=>e.msg||e.message||e.error_description||e.error||JSON.stringify(e),UO=(e,t)=>Fs(void 0,void 0,void 0,function*(){const n=yield WO();e instanceof n?e.json().then(r=>{t(new zO(_h(r),e.status||500))}).catch(r=>{t(new y2(_h(r),r))}):t(new y2(_h(e),e))}),HO=(e,t,n,r)=>{const i={method:e,headers:(t==null?void 0:t.headers)||{}};return e==="GET"?i:(i.headers=Object.assign({"Content-Type":"application/json"},t==null?void 0:t.headers),i.body=JSON.stringify(r),Object.assign(Object.assign({},i),n))};function Df(e,t,n,r,i,a){return Fs(this,void 0,void 0,function*(){return new Promise((s,o)=>{e(n,HO(t,r,i,a)).then(l=>{if(!l.ok)throw l;return r!=null&&r.noResolveJson?l:l.json()}).then(l=>s(l)).catch(l=>UO(l,o))})})}function wm(e,t,n,r){return Fs(this,void 0,void 0,function*(){return Df(e,"GET",t,n,r)})}function Ir(e,t,n,r,i){return Fs(this,void 0,void 0,function*(){return Df(e,"POST",t,r,i,n)})}function KO(e,t,n,r,i){return Fs(this,void 0,void 0,function*(){return Df(e,"PUT",t,r,i,n)})}function i8(e,t,n,r,i){return Fs(this,void 0,void 0,function*(){return Df(e,"DELETE",t,r,i,n)})}var dn=function(e,t,n,r){function i(a){return a instanceof n?a:new n(function(s){s(a)})}return new(n||(n=Promise))(function(a,s){function o(c){try{u(r.next(c))}catch(d){s(d)}}function l(c){try{u(r.throw(c))}catch(d){s(d)}}function u(c){c.done?a(c.value):i(c.value).then(o,l)}u((r=r.apply(e,t||[])).next())})};const YO={limit:100,offset:0,sortBy:{column:"name",order:"asc"}},$2={cacheControl:"3600",contentType:"text/plain;charset=UTF-8",upsert:!1};class qO{constructor(t,n={},r,i){this.url=t,this.headers=n,this.bucketId=r,this.fetch=r8(i)}uploadOrUpdate(t,n,r,i){return dn(this,void 0,void 0,function*(){try{let a;const s=Object.assign(Object.assign({},$2),i),o=Object.assign(Object.assign({},this.headers),t==="POST"&&{"x-upsert":String(s.upsert)});typeof Blob<"u"&&r instanceof Blob?(a=new FormData,a.append("cacheControl",s.cacheControl),a.append("",r)):typeof FormData<"u"&&r instanceof FormData?(a=r,a.append("cacheControl",s.cacheControl)):(a=r,o["cache-control"]=`max-age=${s.cacheControl}`,o["content-type"]=s.contentType);const l=this._removeEmptyFolders(n),u=this._getFinalPath(l),c=yield this.fetch(`${this.url}/object/${u}`,Object.assign({method:t,body:a,headers:o},s!=null&&s.duplex?{duplex:s.duplex}:{})),d=yield c.json();return c.ok?{data:{path:l,id:d.Id,fullPath:d.Key},error:null}:{data:null,error:d}}catch(a){if(_t(a))return{data:null,error:a};throw a}})}upload(t,n,r){return dn(this,void 0,void 0,function*(){return this.uploadOrUpdate("POST",t,n,r)})}uploadToSignedUrl(t,n,r,i){return dn(this,void 0,void 0,function*(){const a=this._removeEmptyFolders(t),s=this._getFinalPath(a),o=new URL(this.url+`/object/upload/sign/${s}`);o.searchParams.set("token",n);try{let l;const u=Object.assign({upsert:$2.upsert},i),c=Object.assign(Object.assign({},this.headers),{"x-upsert":String(u.upsert)});typeof Blob<"u"&&r instanceof Blob?(l=new FormData,l.append("cacheControl",u.cacheControl),l.append("",r)):typeof FormData<"u"&&r instanceof FormData?(l=r,l.append("cacheControl",u.cacheControl)):(l=r,c["cache-control"]=`max-age=${u.cacheControl}`,c["content-type"]=u.contentType);const d=yield this.fetch(o.toString(),{method:"PUT",body:l,headers:c}),f=yield d.json();return d.ok?{data:{path:a,fullPath:f.Key},error:null}:{data:null,error:f}}catch(l){if(_t(l))return{data:null,error:l};throw l}})}createSignedUploadUrl(t,n){return dn(this,void 0,void 0,function*(){try{let r=this._getFinalPath(t);const i=Object.assign({},this.headers);n!=null&&n.upsert&&(i["x-upsert"]="true");const a=yield Ir(this.fetch,`${this.url}/object/upload/sign/${r}`,{},{headers:i}),s=new URL(this.url+a.url),o=s.searchParams.get("token");if(!o)throw new a$("No token returned by API");return{data:{signedUrl:s.toString(),path:t,token:o},error:null}}catch(r){if(_t(r))return{data:null,error:r};throw r}})}update(t,n,r){return dn(this,void 0,void 0,function*(){return this.uploadOrUpdate("PUT",t,n,r)})}move(t,n,r){return dn(this,void 0,void 0,function*(){try{return{data:yield Ir(this.fetch,`${this.url}/object/move`,{bucketId:this.bucketId,sourceKey:t,destinationKey:n,destinationBucket:r==null?void 0:r.destinationBucket},{headers:this.headers}),error:null}}catch(i){if(_t(i))return{data:null,error:i};throw i}})}copy(t,n,r){return dn(this,void 0,void 0,function*(){try{return{data:{path:(yield Ir(this.fetch,`${this.url}/object/copy`,{bucketId:this.bucketId,sourceKey:t,destinationKey:n,destinationBucket:r==null?void 0:r.destinationBucket},{headers:this.headers})).Key},error:null}}catch(i){if(_t(i))return{data:null,error:i};throw i}})}createSignedUrl(t,n,r){return dn(this,void 0,void 0,function*(){try{let i=this._getFinalPath(t),a=yield Ir(this.fetch,`${this.url}/object/sign/${i}`,Object.assign({expiresIn:n},r!=null&&r.transform?{transform:r.transform}:{}),{headers:this.headers});const s=r!=null&&r.download?`&download=${r.download===!0?"":r.download}`:"";return a={signedUrl:encodeURI(`${this.url}${a.signedURL}${s}`)},{data:a,error:null}}catch(i){if(_t(i))return{data:null,error:i};throw i}})}createSignedUrls(t,n,r){return dn(this,void 0,void 0,function*(){try{const i=yield Ir(this.fetch,`${this.url}/object/sign/${this.bucketId}`,{expiresIn:n,paths:t},{headers:this.headers}),a=r!=null&&r.download?`&download=${r.download===!0?"":r.download}`:"";return{data:i.map(s=>Object.assign(Object.assign({},s),{signedUrl:s.signedURL?encodeURI(`${this.url}${s.signedURL}${a}`):null})),error:null}}catch(i){if(_t(i))return{data:null,error:i};throw i}})}download(t,n){return dn(this,void 0,void 0,function*(){const i=typeof(n==null?void 0:n.transform)<"u"?"render/image/authenticated":"object",a=this.transformOptsToQueryString((n==null?void 0:n.transform)||{}),s=a?`?${a}`:"";try{const o=this._getFinalPath(t);return{data:yield(yield wm(this.fetch,`${this.url}/${i}/${o}${s}`,{headers:this.headers,noResolveJson:!0})).blob(),error:null}}catch(o){if(_t(o))return{data:null,error:o};throw o}})}getPublicUrl(t,n){const r=this._getFinalPath(t),i=[],a=n!=null&&n.download?`download=${n.download===!0?"":n.download}`:"";a!==""&&i.push(a);const o=typeof(n==null?void 0:n.transform)<"u"?"render/image":"object",l=this.transformOptsToQueryString((n==null?void 0:n.transform)||{});l!==""&&i.push(l);let u=i.join("&");return u!==""&&(u=`?${u}`),{data:{publicUrl:encodeURI(`${this.url}/${o}/public/${r}${u}`)}}}remove(t){return dn(this,void 0,void 0,function*(){try{return{data:yield i8(this.fetch,`${this.url}/object/${this.bucketId}`,{prefixes:t},{headers:this.headers}),error:null}}catch(n){if(_t(n))return{data:null,error:n};throw n}})}list(t,n,r){return dn(this,void 0,void 0,function*(){try{const i=Object.assign(Object.assign(Object.assign({},YO),n),{prefix:t||""});return{data:yield Ir(this.fetch,`${this.url}/object/list/${this.bucketId}`,i,{headers:this.headers},r),error:null}}catch(i){if(_t(i))return{data:null,error:i};throw i}})}_getFinalPath(t){return`${this.bucketId}/${t}`}_removeEmptyFolders(t){return t.replace(/^\/|\/$/g,"").replace(/\/+/g,"/")}transformOptsToQueryString(t){const n=[];return t.width&&n.push(`width=${t.width}`),t.height&&n.push(`height=${t.height}`),t.resize&&n.push(`resize=${t.resize}`),t.format&&n.push(`format=${t.format}`),t.quality&&n.push(`quality=${t.quality}`),n.join("&")}}const GO="2.6.0",ZO={"X-Client-Info":`storage-js/${GO}`};var wa=function(e,t,n,r){function i(a){return a instanceof n?a:new n(function(s){s(a)})}return new(n||(n=Promise))(function(a,s){function o(c){try{u(r.next(c))}catch(d){s(d)}}function l(c){try{u(r.throw(c))}catch(d){s(d)}}function u(c){c.done?a(c.value):i(c.value).then(o,l)}u((r=r.apply(e,t||[])).next())})};class XO{constructor(t,n={},r){this.url=t,this.headers=Object.assign(Object.assign({},ZO),n),this.fetch=r8(r)}listBuckets(){return wa(this,void 0,void 0,function*(){try{return{data:yield wm(this.fetch,`${this.url}/bucket`,{headers:this.headers}),error:null}}catch(t){if(_t(t))return{data:null,error:t};throw t}})}getBucket(t){return wa(this,void 0,void 0,function*(){try{return{data:yield wm(this.fetch,`${this.url}/bucket/${t}`,{headers:this.headers}),error:null}}catch(n){if(_t(n))return{data:null,error:n};throw n}})}createBucket(t,n={public:!1}){return wa(this,void 0,void 0,function*(){try{return{data:yield Ir(this.fetch,`${this.url}/bucket`,{id:t,name:t,public:n.public,file_size_limit:n.fileSizeLimit,allowed_mime_types:n.allowedMimeTypes},{headers:this.headers}),error:null}}catch(r){if(_t(r))return{data:null,error:r};throw r}})}updateBucket(t,n){return wa(this,void 0,void 0,function*(){try{return{data:yield KO(this.fetch,`${this.url}/bucket/${t}`,{id:t,name:t,public:n.public,file_size_limit:n.fileSizeLimit,allowed_mime_types:n.allowedMimeTypes},{headers:this.headers}),error:null}}catch(r){if(_t(r))return{data:null,error:r};throw r}})}emptyBucket(t){return wa(this,void 0,void 0,function*(){try{return{data:yield Ir(this.fetch,`${this.url}/bucket/${t}/empty`,{},{headers:this.headers}),error:null}}catch(n){if(_t(n))return{data:null,error:n};throw n}})}deleteBucket(t){return wa(this,void 0,void 0,function*(){try{return{data:yield i8(this.fetch,`${this.url}/bucket/${t}`,{},{headers:this.headers}),error:null}}catch(n){if(_t(n))return{data:null,error:n};throw n}})}}class QO extends XO{constructor(t,n={},r){super(t,n,r)}from(t){return new qO(this.url,this.headers,t,this.fetch)}}const JO="2.44.3";let ho="";typeof Deno<"u"?ho="deno":typeof document<"u"?ho="web":typeof navigator<"u"&&navigator.product==="ReactNative"?ho="react-native":ho="node";const eB={"X-Client-Info":`supabase-js-${ho}/${JO}`},tB={headers:eB},nB={schema:"public"},rB={autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,flowType:"implicit"},iB={};var aB=function(e,t,n,r){function i(a){return a instanceof n?a:new n(function(s){s(a)})}return new(n||(n=Promise))(function(a,s){function o(c){try{u(r.next(c))}catch(d){s(d)}}function l(c){try{u(r.throw(c))}catch(d){s(d)}}function u(c){c.done?a(c.value):i(c.value).then(o,l)}u((r=r.apply(e,t||[])).next())})};const sB=e=>{let t;return e?t=e:typeof fetch>"u"?t=W_:t=fetch,(...n)=>t(...n)},oB=()=>typeof Headers>"u"?U_:Headers,lB=(e,t,n)=>{const r=sB(n),i=oB();return(a,s)=>aB(void 0,void 0,void 0,function*(){var o;const l=(o=yield t())!==null&&o!==void 0?o:e;let u=new i(s==null?void 0:s.headers);return u.has("apikey")||u.set("apikey",e),u.has("Authorization")||u.set("Authorization",`Bearer ${l}`),r(a,Object.assign(Object.assign({},s),{headers:u}))})};function uB(e){return e.replace(/\/$/,"")}function cB(e,t){const{db:n,auth:r,realtime:i,global:a}=e,{db:s,auth:o,realtime:l,global:u}=t;return{db:Object.assign(Object.assign({},s),n),auth:Object.assign(Object.assign({},o),r),realtime:Object.assign(Object.assign({},l),i),global:Object.assign(Object.assign({},u),a)}}const a8="2.64.2",dB="http://localhost:9999",fB="supabase.auth.token",hB={"X-Client-Info":`gotrue-js/${a8}`},x2=10,Dm="X-Supabase-Api-Version",s8={"2024-01-01":{timestamp:Date.parse("2024-01-01T00:00:00.0Z"),name:"2024-01-01"}};function pB(e){return Math.round(Date.now()/1e3)+e}function mB(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){const t=Math.random()*16|0;return(e=="x"?t:t&3|8).toString(16)})}const kn=()=>typeof document<"u",$i={tested:!1,writable:!1},Ao=()=>{if(!kn())return!1;try{if(typeof globalThis.localStorage!="object")return!1}catch{return!1}if($i.tested)return $i.writable;const e=`lswt-${Math.random()}${Math.random()}`;try{globalThis.localStorage.setItem(e,e),globalThis.localStorage.removeItem(e),$i.tested=!0,$i.writable=!0}catch{$i.tested=!0,$i.writable=!1}return $i.writable};function Eh(e){const t={},n=new URL(e);if(n.hash&&n.hash[0]==="#")try{new URLSearchParams(n.hash.substring(1)).forEach((i,a)=>{t[a]=i})}catch{}return n.searchParams.forEach((r,i)=>{t[i]=r}),t}const o8=e=>{let t;return e?t=e:typeof fetch>"u"?t=(...n)=>$s(async()=>{const{default:r}=await Promise.resolve().then(()=>Ms);return{default:r}},void 0,import.meta.url).then(({default:r})=>r(...n)):t=fetch,(...n)=>t(...n)},gB=e=>typeof e=="object"&&e!==null&&"status"in e&&"ok"in e&&"json"in e&&typeof e.json=="function",l8=async(e,t,n)=>{await e.setItem(t,JSON.stringify(n))},uu=async(e,t)=>{const n=await e.getItem(t);if(!n)return null;try{return JSON.parse(n)}catch{return n}},Sh=async(e,t)=>{await e.removeItem(t)};function vB(e){const t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";let n="",r,i,a,s,o,l,u,c=0;for(e=e.replace("-","+").replace("_","/");c<e.length;)s=t.indexOf(e.charAt(c++)),o=t.indexOf(e.charAt(c++)),l=t.indexOf(e.charAt(c++)),u=t.indexOf(e.charAt(c++)),r=s<<2|o>>4,i=(o&15)<<4|l>>2,a=(l&3)<<6|u,n=n+String.fromCharCode(r),l!=64&&i!=0&&(n=n+String.fromCharCode(i)),u!=64&&a!=0&&(n=n+String.fromCharCode(a));return n}class _f{constructor(){this.promise=new _f.promiseConstructor((t,n)=>{this.resolve=t,this.reject=n})}}_f.promiseConstructor=Promise;function w2(e){const t=/^([a-z0-9_-]{4})*($|[a-z0-9_-]{3}=?$|[a-z0-9_-]{2}(==)?$)$/i,n=e.split(".");if(n.length!==3)throw new Error("JWT is not valid: not a JWT structure");if(!t.test(n[1]))throw new Error("JWT is not valid: payload is not in base64url format");const r=n[1];return JSON.parse(vB(r))}async function bB(e){return await new Promise(t=>{setTimeout(()=>t(null),e)})}function yB(e,t){return new Promise((r,i)=>{(async()=>{for(let a=0;a<1/0;a++)try{const s=await e(a);if(!t(a,null,s)){r(s);return}}catch(s){if(!t(a,s)){i(s);return}}})()})}function $B(e){return("0"+e.toString(16)).substr(-2)}function xB(){const t=new Uint32Array(56);if(typeof crypto>"u"){const n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~",r=n.length;let i="";for(let a=0;a<56;a++)i+=n.charAt(Math.floor(Math.random()*r));return i}return crypto.getRandomValues(t),Array.from(t,$B).join("")}async function wB(e){const n=new TextEncoder().encode(e),r=await crypto.subtle.digest("SHA-256",n),i=new Uint8Array(r);return Array.from(i).map(a=>String.fromCharCode(a)).join("")}function DB(e){return btoa(e).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}async function _B(e){if(!(typeof crypto<"u"&&typeof crypto.subtle<"u"&&typeof TextEncoder<"u"))return console.warn("WebCrypto API is not supported. Code challenge method will default to use plain instead of sha256."),e;const n=await wB(e);return DB(n)}async function Da(e,t,n=!1){const r=xB();let i=r;n&&(i+="/PASSWORD_RECOVERY"),await l8(e,`${t}-code-verifier`,i);const a=await _B(r);return[a,r===a?"plain":"s256"]}const EB=/^2[0-9]{3}-(0[1-9]|1[0-2])-(0[1-9]|1[0-9]|2[0-9]|3[0-1])$/i;function SB(e){const t=e.headers.get(Dm);if(!t||!t.match(EB))return null;try{return new Date(`${t}T00:00:00.0Z`)}catch{return null}}class s$ extends Error{constructor(t,n,r){super(t),this.__isAuthError=!0,this.name="AuthError",this.status=n,this.code=r}}function re(e){return typeof e=="object"&&e!==null&&"__isAuthError"in e}class CB extends s${constructor(t,n,r){super(t,n,r),this.name="AuthApiError",this.status=n,this.code=r}}function kB(e){return re(e)&&e.name==="AuthApiError"}class u8 extends s${constructor(t,n){super(t),this.name="AuthUnknownError",this.originalError=n}}class ha extends s${constructor(t,n,r,i){super(t,r,i),this.name=n,this.status=r}}class xi extends ha{constructor(){super("Auth session missing!","AuthSessionMissingError",400,void 0)}}class Ch extends ha{constructor(){super("Auth session or user missing","AuthInvalidTokenResponseError",500,void 0)}}class cu extends ha{constructor(t){super(t,"AuthInvalidCredentialsError",400,void 0)}}class du extends ha{constructor(t,n=null){super(t,"AuthImplicitGrantRedirectError",500,void 0),this.details=null,this.details=n}toJSON(){return{name:this.name,message:this.message,status:this.status,details:this.details}}}class D2 extends ha{constructor(t,n=null){super(t,"AuthPKCEGrantCodeExchangeError",500,void 0),this.details=null,this.details=n}toJSON(){return{name:this.name,message:this.message,status:this.status,details:this.details}}}class _m extends ha{constructor(t,n){super(t,"AuthRetryableFetchError",n,void 0)}}function kh(e){return re(e)&&e.name==="AuthRetryableFetchError"}class _2 extends ha{constructor(t,n,r){super(t,"AuthWeakPasswordError",n,"weak_password"),this.reasons=r}}var PB=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};const Ti=e=>e.msg||e.message||e.error_description||e.error||JSON.stringify(e),TB=[502,503,504];async function E2(e){var t;if(!gB(e))throw new _m(Ti(e),0);if(TB.includes(e.status))throw new _m(Ti(e),e.status);let n;try{n=await e.json()}catch(a){throw new u8(Ti(a),a)}let r;const i=SB(e);if(i&&i.getTime()>=s8["2024-01-01"].timestamp&&typeof n=="object"&&n&&typeof n.code=="string"?r=n.code:typeof n=="object"&&n&&typeof n.error_code=="string"&&(r=n.error_code),r){if(r==="weak_password")throw new _2(Ti(n),e.status,((t=n.weak_password)===null||t===void 0?void 0:t.reasons)||[])}else if(typeof n=="object"&&n&&typeof n.weak_password=="object"&&n.weak_password&&Array.isArray(n.weak_password.reasons)&&n.weak_password.reasons.length&&n.weak_password.reasons.reduce((a,s)=>a&&typeof s=="string",!0))throw new _2(Ti(n),e.status,n.weak_password.reasons);throw new CB(Ti(n),e.status||500,r)}const RB=(e,t,n,r)=>{const i={method:e,headers:(t==null?void 0:t.headers)||{}};return e==="GET"?i:(i.headers=Object.assign({"Content-Type":"application/json;charset=UTF-8"},t==null?void 0:t.headers),i.body=JSON.stringify(r),Object.assign(Object.assign({},i),n))};async function oe(e,t,n,r){var i;const a=Object.assign({},r==null?void 0:r.headers);a[Dm]||(a[Dm]=s8["2024-01-01"].name),r!=null&&r.jwt&&(a.Authorization=`Bearer ${r.jwt}`);const s=(i=r==null?void 0:r.query)!==null&&i!==void 0?i:{};r!=null&&r.redirectTo&&(s.redirect_to=r.redirectTo);const o=Object.keys(s).length?"?"+new URLSearchParams(s).toString():"",l=await MB(e,t,n+o,{headers:a,noResolveJson:r==null?void 0:r.noResolveJson},{},r==null?void 0:r.body);return r!=null&&r.xform?r==null?void 0:r.xform(l):{data:Object.assign({},l),error:null}}async function MB(e,t,n,r,i,a){const s=RB(t,r,i,a);let o;try{o=await e(n,Object.assign({},s))}catch(l){throw console.error(l),new _m(Ti(l),0)}if(o.ok||await E2(o),r!=null&&r.noResolveJson)return o;try{return await o.json()}catch(l){await E2(l)}}function Fr(e){var t;let n=null;BB(e)&&(n=Object.assign({},e),e.expires_at||(n.expires_at=pB(e.expires_in)));const r=(t=e.user)!==null&&t!==void 0?t:e;return{data:{session:n,user:r},error:null}}function S2(e){const t=Fr(e);return!t.error&&e.weak_password&&typeof e.weak_password=="object"&&Array.isArray(e.weak_password.reasons)&&e.weak_password.reasons.length&&e.weak_password.message&&typeof e.weak_password.message=="string"&&e.weak_password.reasons.reduce((n,r)=>n&&typeof r=="string",!0)&&(t.data.weak_password=e.weak_password),t}function zr(e){var t;return{data:{user:(t=e.user)!==null&&t!==void 0?t:e},error:null}}function FB(e){return{data:e,error:null}}function AB(e){const{action_link:t,email_otp:n,hashed_token:r,redirect_to:i,verification_type:a}=e,s=PB(e,["action_link","email_otp","hashed_token","redirect_to","verification_type"]),o={action_link:t,email_otp:n,hashed_token:r,redirect_to:i,verification_type:a},l=Object.assign({},s);return{data:{properties:o,user:l},error:null}}function OB(e){return e}function BB(e){return e.access_token&&e.refresh_token&&e.expires_in}var IB=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};class LB{constructor({url:t="",headers:n={},fetch:r}){this.url=t,this.headers=n,this.fetch=o8(r),this.mfa={listFactors:this._listFactors.bind(this),deleteFactor:this._deleteFactor.bind(this)}}async signOut(t,n="global"){try{return await oe(this.fetch,"POST",`${this.url}/logout?scope=${n}`,{headers:this.headers,jwt:t,noResolveJson:!0}),{data:null,error:null}}catch(r){if(re(r))return{data:null,error:r};throw r}}async inviteUserByEmail(t,n={}){try{return await oe(this.fetch,"POST",`${this.url}/invite`,{body:{email:t,data:n.data},headers:this.headers,redirectTo:n.redirectTo,xform:zr})}catch(r){if(re(r))return{data:{user:null},error:r};throw r}}async generateLink(t){try{const{options:n}=t,r=IB(t,["options"]),i=Object.assign(Object.assign({},r),n);return"newEmail"in r&&(i.new_email=r==null?void 0:r.newEmail,delete i.newEmail),await oe(this.fetch,"POST",`${this.url}/admin/generate_link`,{body:i,headers:this.headers,xform:AB,redirectTo:n==null?void 0:n.redirectTo})}catch(n){if(re(n))return{data:{properties:null,user:null},error:n};throw n}}async createUser(t){try{return await oe(this.fetch,"POST",`${this.url}/admin/users`,{body:t,headers:this.headers,xform:zr})}catch(n){if(re(n))return{data:{user:null},error:n};throw n}}async listUsers(t){var n,r,i,a,s,o,l;try{const u={nextPage:null,lastPage:0,total:0},c=await oe(this.fetch,"GET",`${this.url}/admin/users`,{headers:this.headers,noResolveJson:!0,query:{page:(r=(n=t==null?void 0:t.page)===null||n===void 0?void 0:n.toString())!==null&&r!==void 0?r:"",per_page:(a=(i=t==null?void 0:t.perPage)===null||i===void 0?void 0:i.toString())!==null&&a!==void 0?a:""},xform:OB});if(c.error)throw c.error;const d=await c.json(),f=(s=c.headers.get("x-total-count"))!==null&&s!==void 0?s:0,h=(l=(o=c.headers.get("link"))===null||o===void 0?void 0:o.split(","))!==null&&l!==void 0?l:[];return h.length>0&&(h.forEach(p=>{const g=parseInt(p.split(";")[0].split("=")[1].substring(0,1)),b=JSON.parse(p.split(";")[1].split("=")[1]);u[`${b}Page`]=g}),u.total=parseInt(f)),{data:Object.assign(Object.assign({},d),u),error:null}}catch(u){if(re(u))return{data:{users:[]},error:u};throw u}}async getUserById(t){try{return await oe(this.fetch,"GET",`${this.url}/admin/users/${t}`,{headers:this.headers,xform:zr})}catch(n){if(re(n))return{data:{user:null},error:n};throw n}}async updateUserById(t,n){try{return await oe(this.fetch,"PUT",`${this.url}/admin/users/${t}`,{body:n,headers:this.headers,xform:zr})}catch(r){if(re(r))return{data:{user:null},error:r};throw r}}async deleteUser(t,n=!1){try{return await oe(this.fetch,"DELETE",`${this.url}/admin/users/${t}`,{headers:this.headers,body:{should_soft_delete:n},xform:zr})}catch(r){if(re(r))return{data:{user:null},error:r};throw r}}async _listFactors(t){try{const{data:n,error:r}=await oe(this.fetch,"GET",`${this.url}/admin/users/${t.userId}/factors`,{headers:this.headers,xform:i=>({data:{factors:i},error:null})});return{data:n,error:r}}catch(n){if(re(n))return{data:null,error:n};throw n}}async _deleteFactor(t){try{return{data:await oe(this.fetch,"DELETE",`${this.url}/admin/users/${t.userId}/factors/${t.id}`,{headers:this.headers}),error:null}}catch(n){if(re(n))return{data:null,error:n};throw n}}}const NB={getItem:e=>Ao()?globalThis.localStorage.getItem(e):null,setItem:(e,t)=>{Ao()&&globalThis.localStorage.setItem(e,t)},removeItem:e=>{Ao()&&globalThis.localStorage.removeItem(e)}};function C2(e={}){return{getItem:t=>e[t]||null,setItem:(t,n)=>{e[t]=n},removeItem:t=>{delete e[t]}}}function jB(){if(typeof globalThis!="object")try{Object.defineProperty(Object.prototype,"__magic__",{get:function(){return this},configurable:!0}),__magic__.globalThis=__magic__,delete Object.prototype.__magic__}catch{typeof self<"u"&&(self.globalThis=self)}}const _a={debug:!!(globalThis&&Ao()&&globalThis.localStorage&&globalThis.localStorage.getItem("supabase.gotrue-js.locks.debug")==="true")};class c8 extends Error{constructor(t){super(t),this.isAcquireTimeout=!0}}class zB extends c8{}async function VB(e,t,n){_a.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquire lock",e,t);const r=new globalThis.AbortController;return t>0&&setTimeout(()=>{r.abort(),_a.debug&&console.log("@supabase/gotrue-js: navigatorLock acquire timed out",e)},t),await globalThis.navigator.locks.request(e,t===0?{mode:"exclusive",ifAvailable:!0}:{mode:"exclusive",signal:r.signal},async i=>{if(i){_a.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquired",e,i.name);try{return await n()}finally{_a.debug&&console.log("@supabase/gotrue-js: navigatorLock: released",e,i.name)}}else{if(t===0)throw _a.debug&&console.log("@supabase/gotrue-js: navigatorLock: not immediately available",e),new zB(`Acquiring an exclusive Navigator LockManager lock "${e}" immediately failed`);if(_a.debug)try{const a=await globalThis.navigator.locks.query();console.log("@supabase/gotrue-js: Navigator LockManager state",JSON.stringify(a,null," "))}catch(a){console.warn("@supabase/gotrue-js: Error when querying Navigator LockManager state",a)}return console.warn("@supabase/gotrue-js: Navigator LockManager returned a null lock when using #request without ifAvailable set to true, it appears this browser is not following the LockManager spec https://developer.mozilla.org/en-US/docs/Web/API/LockManager/request"),await n()}})}jB();const WB={url:dB,storageKey:fB,autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,headers:hB,flowType:"implicit",debug:!1,hasCustomAuthorizationHeader:!1},Ks=30*1e3,k2=3;async function P2(e,t,n){return await n()}class ll{constructor(t){var n,r;this.memoryStorage=null,this.stateChangeEmitters=new Map,this.autoRefreshTicker=null,this.visibilityChangedCallback=null,this.refreshingDeferred=null,this.initializePromise=null,this.detectSessionInUrl=!0,this.hasCustomAuthorizationHeader=!1,this.suppressGetSessionWarning=!1,this.lockAcquired=!1,this.pendingInLock=[],this.broadcastChannel=null,this.logger=console.log,this.instanceID=ll.nextInstanceID,ll.nextInstanceID+=1,this.instanceID>0&&kn()&&console.warn("Multiple GoTrueClient instances detected in the same browser context. It is not an error, but this should be avoided as it may produce undefined behavior when used concurrently under the same storage key.");const i=Object.assign(Object.assign({},WB),t);if(this.logDebugMessages=!!i.debug,typeof i.debug=="function"&&(this.logger=i.debug),this.persistSession=i.persistSession,this.storageKey=i.storageKey,this.autoRefreshToken=i.autoRefreshToken,this.admin=new LB({url:i.url,headers:i.headers,fetch:i.fetch}),this.url=i.url,this.headers=i.headers,this.fetch=o8(i.fetch),this.lock=i.lock||P2,this.detectSessionInUrl=i.detectSessionInUrl,this.flowType=i.flowType,this.hasCustomAuthorizationHeader=i.hasCustomAuthorizationHeader,i.lock?this.lock=i.lock:kn()&&(!((n=globalThis==null?void 0:globalThis.navigator)===null||n===void 0)&&n.locks)?this.lock=VB:this.lock=P2,this.mfa={verify:this._verify.bind(this),enroll:this._enroll.bind(this),unenroll:this._unenroll.bind(this),challenge:this._challenge.bind(this),listFactors:this._listFactors.bind(this),challengeAndVerify:this._challengeAndVerify.bind(this),getAuthenticatorAssuranceLevel:this._getAuthenticatorAssuranceLevel.bind(this)},this.persistSession?i.storage?this.storage=i.storage:Ao()?this.storage=NB:(this.memoryStorage={},this.storage=C2(this.memoryStorage)):(this.memoryStorage={},this.storage=C2(this.memoryStorage)),kn()&&globalThis.BroadcastChannel&&this.persistSession&&this.storageKey){try{this.broadcastChannel=new globalThis.BroadcastChannel(this.storageKey)}catch(a){console.error("Failed to create a new BroadcastChannel, multi-tab state changes will not be available",a)}(r=this.broadcastChannel)===null||r===void 0||r.addEventListener("message",async a=>{this._debug("received broadcast notification from other tab or client",a),await this._notifyAllSubscribers(a.data.event,a.data.session,!1)})}this.initialize()}_debug(...t){return this.logDebugMessages&&this.logger(`GoTrueClient@${this.instanceID} (${a8}) ${new Date().toISOString()}`,...t),this}async initialize(){return this.initializePromise?await this.initializePromise:(this.initializePromise=(async()=>await this._acquireLock(-1,async()=>await this._initialize()))(),await this.initializePromise)}async _initialize(){try{const t=kn()?await this._isPKCEFlow():!1;if(this._debug("#_initialize()","begin","is PKCE flow",t),t||this.detectSessionInUrl&&this._isImplicitGrantFlow()){const{data:n,error:r}=await this._getSessionFromURL(t);if(r)return this._debug("#_initialize()","error detecting session from URL",r),(r==null?void 0:r.message)==="Identity is already linked"||(r==null?void 0:r.message)==="Identity is already linked to another user"?{error:r}:(await this._removeSession(),{error:r});const{session:i,redirectType:a}=n;return this._debug("#_initialize()","detected session in URL",i,"redirect type",a),await this._saveSession(i),setTimeout(async()=>{a==="recovery"?await this._notifyAllSubscribers("PASSWORD_RECOVERY",i):await this._notifyAllSubscribers("SIGNED_IN",i)},0),{error:null}}return await this._recoverAndRefresh(),{error:null}}catch(t){return re(t)?{error:t}:{error:new u8("Unexpected error during initialization",t)}}finally{await this._handleVisibilityChange(),this._debug("#_initialize()","end")}}async signInAnonymously(t){var n,r,i;try{await this._removeSession();const a=await oe(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{data:(r=(n=t==null?void 0:t.options)===null||n===void 0?void 0:n.data)!==null&&r!==void 0?r:{},gotrue_meta_security:{captcha_token:(i=t==null?void 0:t.options)===null||i===void 0?void 0:i.captchaToken}},xform:Fr}),{data:s,error:o}=a;if(o||!s)return{data:{user:null,session:null},error:o};const l=s.session,u=s.user;return s.session&&(await this._saveSession(s.session),await this._notifyAllSubscribers("SIGNED_IN",l)),{data:{user:u,session:l},error:null}}catch(a){if(re(a))return{data:{user:null,session:null},error:a};throw a}}async signUp(t){var n,r,i;try{await this._removeSession();let a;if("email"in t){const{email:c,password:d,options:f}=t;let h=null,p=null;this.flowType==="pkce"&&([h,p]=await Da(this.storage,this.storageKey)),a=await oe(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,redirectTo:f==null?void 0:f.emailRedirectTo,body:{email:c,password:d,data:(n=f==null?void 0:f.data)!==null&&n!==void 0?n:{},gotrue_meta_security:{captcha_token:f==null?void 0:f.captchaToken},code_challenge:h,code_challenge_method:p},xform:Fr})}else if("phone"in t){const{phone:c,password:d,options:f}=t;a=await oe(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{phone:c,password:d,data:(r=f==null?void 0:f.data)!==null&&r!==void 0?r:{},channel:(i=f==null?void 0:f.channel)!==null&&i!==void 0?i:"sms",gotrue_meta_security:{captcha_token:f==null?void 0:f.captchaToken}},xform:Fr})}else throw new cu("You must provide either an email or phone number and a password");const{data:s,error:o}=a;if(o||!s)return{data:{user:null,session:null},error:o};const l=s.session,u=s.user;return s.session&&(await this._saveSession(s.session),await this._notifyAllSubscribers("SIGNED_IN",l)),{data:{user:u,session:l},error:null}}catch(a){if(re(a))return{data:{user:null,session:null},error:a};throw a}}async signInWithPassword(t){try{await this._removeSession();let n;if("email"in t){const{email:a,password:s,options:o}=t;n=await oe(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{email:a,password:s,gotrue_meta_security:{captcha_token:o==null?void 0:o.captchaToken}},xform:S2})}else if("phone"in t){const{phone:a,password:s,options:o}=t;n=await oe(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{phone:a,password:s,gotrue_meta_security:{captcha_token:o==null?void 0:o.captchaToken}},xform:S2})}else throw new cu("You must provide either an email or phone number and a password");const{data:r,error:i}=n;return i?{data:{user:null,session:null},error:i}:!r||!r.session||!r.user?{data:{user:null,session:null},error:new Ch}:(r.session&&(await this._saveSession(r.session),await this._notifyAllSubscribers("SIGNED_IN",r.session)),{data:Object.assign({user:r.user,session:r.session},r.weak_password?{weakPassword:r.weak_password}:null),error:i})}catch(n){if(re(n))return{data:{user:null,session:null},error:n};throw n}}async signInWithOAuth(t){var n,r,i,a;return await this._removeSession(),await this._handleProviderSignIn(t.provider,{redirectTo:(n=t.options)===null||n===void 0?void 0:n.redirectTo,scopes:(r=t.options)===null||r===void 0?void 0:r.scopes,queryParams:(i=t.options)===null||i===void 0?void 0:i.queryParams,skipBrowserRedirect:(a=t.options)===null||a===void 0?void 0:a.skipBrowserRedirect})}async exchangeCodeForSession(t){return await this.initializePromise,this._acquireLock(-1,async()=>this._exchangeCodeForSession(t))}async _exchangeCodeForSession(t){const n=await uu(this.storage,`${this.storageKey}-code-verifier`),[r,i]=(n??"").split("/"),{data:a,error:s}=await oe(this.fetch,"POST",`${this.url}/token?grant_type=pkce`,{headers:this.headers,body:{auth_code:t,code_verifier:r},xform:Fr});return await Sh(this.storage,`${this.storageKey}-code-verifier`),s?{data:{user:null,session:null,redirectType:null},error:s}:!a||!a.session||!a.user?{data:{user:null,session:null,redirectType:null},error:new Ch}:(a.session&&(await this._saveSession(a.session),await this._notifyAllSubscribers("SIGNED_IN",a.session)),{data:Object.assign(Object.assign({},a),{redirectType:i??null}),error:s})}async signInWithIdToken(t){await this._removeSession();try{const{options:n,provider:r,token:i,access_token:a,nonce:s}=t,o=await oe(this.fetch,"POST",`${this.url}/token?grant_type=id_token`,{headers:this.headers,body:{provider:r,id_token:i,access_token:a,nonce:s,gotrue_meta_security:{captcha_token:n==null?void 0:n.captchaToken}},xform:Fr}),{data:l,error:u}=o;return u?{data:{user:null,session:null},error:u}:!l||!l.session||!l.user?{data:{user:null,session:null},error:new Ch}:(l.session&&(await this._saveSession(l.session),await this._notifyAllSubscribers("SIGNED_IN",l.session)),{data:l,error:u})}catch(n){if(re(n))return{data:{user:null,session:null},error:n};throw n}}async signInWithOtp(t){var n,r,i,a,s;try{if(await this._removeSession(),"email"in t){const{email:o,options:l}=t;let u=null,c=null;this.flowType==="pkce"&&([u,c]=await Da(this.storage,this.storageKey));const{error:d}=await oe(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{email:o,data:(n=l==null?void 0:l.data)!==null&&n!==void 0?n:{},create_user:(r=l==null?void 0:l.shouldCreateUser)!==null&&r!==void 0?r:!0,gotrue_meta_security:{captcha_token:l==null?void 0:l.captchaToken},code_challenge:u,code_challenge_method:c},redirectTo:l==null?void 0:l.emailRedirectTo});return{data:{user:null,session:null},error:d}}if("phone"in t){const{phone:o,options:l}=t,{data:u,error:c}=await oe(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{phone:o,data:(i=l==null?void 0:l.data)!==null&&i!==void 0?i:{},create_user:(a=l==null?void 0:l.shouldCreateUser)!==null&&a!==void 0?a:!0,gotrue_meta_security:{captcha_token:l==null?void 0:l.captchaToken},channel:(s=l==null?void 0:l.channel)!==null&&s!==void 0?s:"sms"}});return{data:{user:null,session:null,messageId:u==null?void 0:u.message_id},error:c}}throw new cu("You must provide either an email or phone number.")}catch(o){if(re(o))return{data:{user:null,session:null},error:o};throw o}}async verifyOtp(t){var n,r;try{t.type!=="email_change"&&t.type!=="phone_change"&&await this._removeSession();let i,a;"options"in t&&(i=(n=t.options)===null||n===void 0?void 0:n.redirectTo,a=(r=t.options)===null||r===void 0?void 0:r.captchaToken);const{data:s,error:o}=await oe(this.fetch,"POST",`${this.url}/verify`,{headers:this.headers,body:Object.assign(Object.assign({},t),{gotrue_meta_security:{captcha_token:a}}),redirectTo:i,xform:Fr});if(o)throw o;if(!s)throw new Error("An error occurred on token verification.");const l=s.session,u=s.user;return l!=null&&l.access_token&&(await this._saveSession(l),await this._notifyAllSubscribers(t.type=="recovery"?"PASSWORD_RECOVERY":"SIGNED_IN",l)),{data:{user:u,session:l},error:null}}catch(i){if(re(i))return{data:{user:null,session:null},error:i};throw i}}async signInWithSSO(t){var n,r,i;try{await this._removeSession();let a=null,s=null;return this.flowType==="pkce"&&([a,s]=await Da(this.storage,this.storageKey)),await oe(this.fetch,"POST",`${this.url}/sso`,{body:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},"providerId"in t?{provider_id:t.providerId}:null),"domain"in t?{domain:t.domain}:null),{redirect_to:(r=(n=t.options)===null||n===void 0?void 0:n.redirectTo)!==null&&r!==void 0?r:void 0}),!((i=t==null?void 0:t.options)===null||i===void 0)&&i.captchaToken?{gotrue_meta_security:{captcha_token:t.options.captchaToken}}:null),{skip_http_redirect:!0,code_challenge:a,code_challenge_method:s}),headers:this.headers,xform:FB})}catch(a){if(re(a))return{data:null,error:a};throw a}}async reauthenticate(){return await this.initializePromise,await this._acquireLock(-1,async()=>await this._reauthenticate())}async _reauthenticate(){try{return await this._useSession(async t=>{const{data:{session:n},error:r}=t;if(r)throw r;if(!n)throw new xi;const{error:i}=await oe(this.fetch,"GET",`${this.url}/reauthenticate`,{headers:this.headers,jwt:n.access_token});return{data:{user:null,session:null},error:i}})}catch(t){if(re(t))return{data:{user:null,session:null},error:t};throw t}}async resend(t){try{t.type!="email_change"&&t.type!="phone_change"&&await this._removeSession();const n=`${this.url}/resend`;if("email"in t){const{email:r,type:i,options:a}=t,{error:s}=await oe(this.fetch,"POST",n,{headers:this.headers,body:{email:r,type:i,gotrue_meta_security:{captcha_token:a==null?void 0:a.captchaToken}},redirectTo:a==null?void 0:a.emailRedirectTo});return{data:{user:null,session:null},error:s}}else if("phone"in t){const{phone:r,type:i,options:a}=t,{data:s,error:o}=await oe(this.fetch,"POST",n,{headers:this.headers,body:{phone:r,type:i,gotrue_meta_security:{captcha_token:a==null?void 0:a.captchaToken}}});return{data:{user:null,session:null,messageId:s==null?void 0:s.message_id},error:o}}throw new cu("You must provide either an email or phone number and a type")}catch(n){if(re(n))return{data:{user:null,session:null},error:n};throw n}}async getSession(){return await this.initializePromise,await this._acquireLock(-1,async()=>this._useSession(async n=>n))}async _acquireLock(t,n){this._debug("#_acquireLock","begin",t);try{if(this.lockAcquired){const r=this.pendingInLock.length?this.pendingInLock[this.pendingInLock.length-1]:Promise.resolve(),i=(async()=>(await r,await n()))();return this.pendingInLock.push((async()=>{try{await i}catch{}})()),i}return await this.lock(`lock:${this.storageKey}`,t,async()=>{this._debug("#_acquireLock","lock acquired for storage key",this.storageKey);try{this.lockAcquired=!0;const r=n();for(this.pendingInLock.push((async()=>{try{await r}catch{}})()),await r;this.pendingInLock.length;){const i=[...this.pendingInLock];await Promise.all(i),this.pendingInLock.splice(0,i.length)}return await r}finally{this._debug("#_acquireLock","lock released for storage key",this.storageKey),this.lockAcquired=!1}})}finally{this._debug("#_acquireLock","end")}}async _useSession(t){this._debug("#_useSession","begin");try{const n=await this.__loadSession();return await t(n)}finally{this._debug("#_useSession","end")}}async __loadSession(){this._debug("#__loadSession()","begin"),this.lockAcquired||this._debug("#__loadSession()","used outside of an acquired lock!",new Error().stack);try{let t=null;const n=await uu(this.storage,this.storageKey);if(this._debug("#getSession()","session from storage",n),n!==null&&(this._isValidSession(n)?t=n:(this._debug("#getSession()","session from storage is not valid"),await this._removeSession())),!t)return{data:{session:null},error:null};const r=t.expires_at?t.expires_at<=Date.now()/1e3:!1;if(this._debug("#__loadSession()",`session has${r?"":" not"} expired`,"expires_at",t.expires_at),!r){if(this.storage.isServer){const s=this.suppressGetSessionWarning;t=new Proxy(t,{get(l,u,c){return!s&&u==="user"&&console.warn("Using the user object as returned from supabase.auth.getSession() or from some supabase.auth.onAuthStateChange() events could be insecure! This value comes directly from the storage medium (usually cookies on the server) and many not be authentic. Use supabase.auth.getUser() instead which authenticates the data by contacting the Supabase Auth server."),Reflect.get(l,u,c)}})}return{data:{session:t},error:null}}const{session:i,error:a}=await this._callRefreshToken(t.refresh_token);return a?{data:{session:null},error:a}:{data:{session:i},error:null}}finally{this._debug("#__loadSession()","end")}}async getUser(t){return t?await this._getUser(t):(await this.initializePromise,await this._acquireLock(-1,async()=>await this._getUser()))}async _getUser(t){try{return t?await oe(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:t,xform:zr}):await this._useSession(async n=>{var r,i,a;const{data:s,error:o}=n;if(o)throw o;return!(!((r=s.session)===null||r===void 0)&&r.access_token)&&!this.hasCustomAuthorizationHeader?{data:{user:null},error:new xi}:await oe(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:(a=(i=s.session)===null||i===void 0?void 0:i.access_token)!==null&&a!==void 0?a:void 0,xform:zr})})}catch(n){if(re(n))return{data:{user:null},error:n};throw n}}async updateUser(t,n={}){return await this.initializePromise,await this._acquireLock(-1,async()=>await this._updateUser(t,n))}async _updateUser(t,n={}){try{return await this._useSession(async r=>{const{data:i,error:a}=r;if(a)throw a;if(!i.session)throw new xi;const s=i.session;let o=null,l=null;this.flowType==="pkce"&&t.email!=null&&([o,l]=await Da(this.storage,this.storageKey));const{data:u,error:c}=await oe(this.fetch,"PUT",`${this.url}/user`,{headers:this.headers,redirectTo:n==null?void 0:n.emailRedirectTo,body:Object.assign(Object.assign({},t),{code_challenge:o,code_challenge_method:l}),jwt:s.access_token,xform:zr});if(c)throw c;return s.user=u.user,await this._saveSession(s),await this._notifyAllSubscribers("USER_UPDATED",s),{data:{user:s.user},error:null}})}catch(r){if(re(r))return{data:{user:null},error:r};throw r}}_decodeJWT(t){return w2(t)}async setSession(t){return await this.initializePromise,await this._acquireLock(-1,async()=>await this._setSession(t))}async _setSession(t){try{if(!t.access_token||!t.refresh_token)throw new xi;const n=Date.now()/1e3;let r=n,i=!0,a=null;const s=w2(t.access_token);if(s.exp&&(r=s.exp,i=r<=n),i){const{session:o,error:l}=await this._callRefreshToken(t.refresh_token);if(l)return{data:{user:null,session:null},error:l};if(!o)return{data:{user:null,session:null},error:null};a=o}else{const{data:o,error:l}=await this._getUser(t.access_token);if(l)throw l;a={access_token:t.access_token,refresh_token:t.refresh_token,user:o.user,token_type:"bearer",expires_in:r-n,expires_at:r},await this._saveSession(a),await this._notifyAllSubscribers("SIGNED_IN",a)}return{data:{user:a.user,session:a},error:null}}catch(n){if(re(n))return{data:{session:null,user:null},error:n};throw n}}async refreshSession(t){return await this.initializePromise,await this._acquireLock(-1,async()=>await this._refreshSession(t))}async _refreshSession(t){try{return await this._useSession(async n=>{var r;if(!t){const{data:s,error:o}=n;if(o)throw o;t=(r=s.session)!==null&&r!==void 0?r:void 0}if(!(t!=null&&t.refresh_token))throw new xi;const{session:i,error:a}=await this._callRefreshToken(t.refresh_token);return a?{data:{user:null,session:null},error:a}:i?{data:{user:i.user,session:i},error:null}:{data:{user:null,session:null},error:null}})}catch(n){if(re(n))return{data:{user:null,session:null},error:n};throw n}}async _getSessionFromURL(t){try{if(!kn())throw new du("No browser detected.");if(this.flowType==="implicit"&&!this._isImplicitGrantFlow())throw new du("Not a valid implicit grant flow url.");if(this.flowType=="pkce"&&!t)throw new D2("Not a valid PKCE flow url.");const n=Eh(window.location.href);if(t){if(!n.code)throw new D2("No code detected.");const{data:m,error:$}=await this._exchangeCodeForSession(n.code);if($)throw $;const w=new URL(window.location.href);return w.searchParams.delete("code"),window.history.replaceState(window.history.state,"",w.toString()),{data:{session:m.session,redirectType:null},error:null}}if(n.error||n.error_description||n.error_code)throw new du(n.error_description||"Error in URL with unspecified error_description",{error:n.error||"unspecified_error",code:n.error_code||"unspecified_code"});const{provider_token:r,provider_refresh_token:i,access_token:a,refresh_token:s,expires_in:o,expires_at:l,token_type:u}=n;if(!a||!o||!s||!u)throw new du("No session defined in URL");const c=Math.round(Date.now()/1e3),d=parseInt(o);let f=c+d;l&&(f=parseInt(l));const h=f-c;h*1e3<=Ks&&console.warn(`@supabase/gotrue-js: Session as retrieved from URL expires in ${h}s, should have been closer to ${d}s`);const p=f-d;c-p>=120?console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued over 120s ago, URL could be stale",p,f,c):c-p<0&&console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued in the future? Check the device clok for skew",p,f,c);const{data:g,error:b}=await this._getUser(a);if(b)throw b;const v={provider_token:r,provider_refresh_token:i,access_token:a,expires_in:d,expires_at:f,refresh_token:s,token_type:u,user:g.user};return window.location.hash="",this._debug("#_getSessionFromURL()","clearing window.location.hash"),{data:{session:v,redirectType:n.type},error:null}}catch(n){if(re(n))return{data:{session:null,redirectType:null},error:n};throw n}}_isImplicitGrantFlow(){const t=Eh(window.location.href);return!!(kn()&&(t.access_token||t.error_description))}async _isPKCEFlow(){const t=Eh(window.location.href),n=await uu(this.storage,`${this.storageKey}-code-verifier`);return!!(t.code&&n)}async signOut(t={scope:"global"}){return await this.initializePromise,await this._acquireLock(-1,async()=>await this._signOut(t))}async _signOut({scope:t}={scope:"global"}){return await this._useSession(async n=>{var r;const{data:i,error:a}=n;if(a)return{error:a};const s=(r=i.session)===null||r===void 0?void 0:r.access_token;if(s){const{error:o}=await this.admin.signOut(s,t);if(o&&!(kB(o)&&(o.status===404||o.status===401||o.status===403)))return{error:o}}return t!=="others"&&(await this._removeSession(),await Sh(this.storage,`${this.storageKey}-code-verifier`),await this._notifyAllSubscribers("SIGNED_OUT",null)),{error:null}})}onAuthStateChange(t){const n=mB(),r={id:n,callback:t,unsubscribe:()=>{this._debug("#unsubscribe()","state change callback with id removed",n),this.stateChangeEmitters.delete(n)}};return this._debug("#onAuthStateChange()","registered callback with id",n),this.stateChangeEmitters.set(n,r),(async()=>(await this.initializePromise,await this._acquireLock(-1,async()=>{this._emitInitialSession(n)})))(),{data:{subscription:r}}}async _emitInitialSession(t){return await this._useSession(async n=>{var r,i;try{const{data:{session:a},error:s}=n;if(s)throw s;await((r=this.stateChangeEmitters.get(t))===null||r===void 0?void 0:r.callback("INITIAL_SESSION",a)),this._debug("INITIAL_SESSION","callback id",t,"session",a)}catch(a){await((i=this.stateChangeEmitters.get(t))===null||i===void 0?void 0:i.callback("INITIAL_SESSION",null)),this._debug("INITIAL_SESSION","callback id",t,"error",a),console.error(a)}})}async resetPasswordForEmail(t,n={}){let r=null,i=null;this.flowType==="pkce"&&([r,i]=await Da(this.storage,this.storageKey,!0));try{return await oe(this.fetch,"POST",`${this.url}/recover`,{body:{email:t,code_challenge:r,code_challenge_method:i,gotrue_meta_security:{captcha_token:n.captchaToken}},headers:this.headers,redirectTo:n.redirectTo})}catch(a){if(re(a))return{data:null,error:a};throw a}}async getUserIdentities(){var t;try{const{data:n,error:r}=await this.getUser();if(r)throw r;return{data:{identities:(t=n.user.identities)!==null&&t!==void 0?t:[]},error:null}}catch(n){if(re(n))return{data:null,error:n};throw n}}async linkIdentity(t){var n;try{const{data:r,error:i}=await this._useSession(async a=>{var s,o,l,u,c;const{data:d,error:f}=a;if(f)throw f;const h=await this._getUrlForProvider(`${this.url}/user/identities/authorize`,t.provider,{redirectTo:(s=t.options)===null||s===void 0?void 0:s.redirectTo,scopes:(o=t.options)===null||o===void 0?void 0:o.scopes,queryParams:(l=t.options)===null||l===void 0?void 0:l.queryParams,skipBrowserRedirect:!0});return await oe(this.fetch,"GET",h,{headers:this.headers,jwt:(c=(u=d.session)===null||u===void 0?void 0:u.access_token)!==null&&c!==void 0?c:void 0})});if(i)throw i;return kn()&&!(!((n=t.options)===null||n===void 0)&&n.skipBrowserRedirect)&&window.location.assign(r==null?void 0:r.url),{data:{provider:t.provider,url:r==null?void 0:r.url},error:null}}catch(r){if(re(r))return{data:{provider:t.provider,url:null},error:r};throw r}}async unlinkIdentity(t){try{return await this._useSession(async n=>{var r,i;const{data:a,error:s}=n;if(s)throw s;return await oe(this.fetch,"DELETE",`${this.url}/user/identities/${t.identity_id}`,{headers:this.headers,jwt:(i=(r=a.session)===null||r===void 0?void 0:r.access_token)!==null&&i!==void 0?i:void 0})})}catch(n){if(re(n))return{data:null,error:n};throw n}}async _refreshAccessToken(t){const n=`#_refreshAccessToken(${t.substring(0,5)}...)`;this._debug(n,"begin");try{const r=Date.now();return await yB(async i=>(i>0&&await bB(200*Math.pow(2,i-1)),this._debug(n,"refreshing attempt",i),await oe(this.fetch,"POST",`${this.url}/token?grant_type=refresh_token`,{body:{refresh_token:t},headers:this.headers,xform:Fr})),(i,a)=>{const s=200*Math.pow(2,i);return a&&kh(a)&&Date.now()+s-r<Ks})}catch(r){if(this._debug(n,"error",r),re(r))return{data:{session:null,user:null},error:r};throw r}finally{this._debug(n,"end")}}_isValidSession(t){return typeof t=="object"&&t!==null&&"access_token"in t&&"refresh_token"in t&&"expires_at"in t}async _handleProviderSignIn(t,n){const r=await this._getUrlForProvider(`${this.url}/authorize`,t,{redirectTo:n.redirectTo,scopes:n.scopes,queryParams:n.queryParams});return this._debug("#_handleProviderSignIn()","provider",t,"options",n,"url",r),kn()&&!n.skipBrowserRedirect&&window.location.assign(r),{data:{provider:t,url:r},error:null}}async _recoverAndRefresh(){var t;const n="#_recoverAndRefresh()";this._debug(n,"begin");try{const r=await uu(this.storage,this.storageKey);if(this._debug(n,"session from storage",r),!this._isValidSession(r)){this._debug(n,"session is not valid"),r!==null&&await this._removeSession();return}const i=Math.round(Date.now()/1e3),a=((t=r.expires_at)!==null&&t!==void 0?t:1/0)<i+x2;if(this._debug(n,`session has${a?"":" not"} expired with margin of ${x2}s`),a){if(this.autoRefreshToken&&r.refresh_token){const{error:s}=await this._callRefreshToken(r.refresh_token);s&&(console.error(s),kh(s)||(this._debug(n,"refresh failed with a non-retryable error, removing the session",s),await this._removeSession()))}}else await this._notifyAllSubscribers("SIGNED_IN",r)}catch(r){this._debug(n,"error",r),console.error(r);return}finally{this._debug(n,"end")}}async _callRefreshToken(t){var n,r;if(!t)throw new xi;if(this.refreshingDeferred)return this.refreshingDeferred.promise;const i=`#_callRefreshToken(${t.substring(0,5)}...)`;this._debug(i,"begin");try{this.refreshingDeferred=new _f;const{data:a,error:s}=await this._refreshAccessToken(t);if(s)throw s;if(!a.session)throw new xi;await this._saveSession(a.session),await this._notifyAllSubscribers("TOKEN_REFRESHED",a.session);const o={session:a.session,error:null};return this.refreshingDeferred.resolve(o),o}catch(a){if(this._debug(i,"error",a),re(a)){const s={session:null,error:a};return kh(a)||(await this._removeSession(),await this._notifyAllSubscribers("SIGNED_OUT",null)),(n=this.refreshingDeferred)===null||n===void 0||n.resolve(s),s}throw(r=this.refreshingDeferred)===null||r===void 0||r.reject(a),a}finally{this.refreshingDeferred=null,this._debug(i,"end")}}async _notifyAllSubscribers(t,n,r=!0){const i=`#_notifyAllSubscribers(${t})`;this._debug(i,"begin",n,`broadcast = ${r}`);try{this.broadcastChannel&&r&&this.broadcastChannel.postMessage({event:t,session:n});const a=[],s=Array.from(this.stateChangeEmitters.values()).map(async o=>{try{await o.callback(t,n)}catch(l){a.push(l)}});if(await Promise.all(s),a.length>0){for(let o=0;o<a.length;o+=1)console.error(a[o]);throw a[0]}}finally{this._debug(i,"end")}}async _saveSession(t){this._debug("#_saveSession()",t),this.suppressGetSessionWarning=!0,await l8(this.storage,this.storageKey,t)}async _removeSession(){this._debug("#_removeSession()"),await Sh(this.storage,this.storageKey)}_removeVisibilityChangedCallback(){this._debug("#_removeVisibilityChangedCallback()");const t=this.visibilityChangedCallback;this.visibilityChangedCallback=null;try{t&&kn()&&(window!=null&&window.removeEventListener)&&window.removeEventListener("visibilitychange",t)}catch(n){console.error("removing visibilitychange callback failed",n)}}async _startAutoRefresh(){await this._stopAutoRefresh(),this._debug("#_startAutoRefresh()");const t=setInterval(()=>this._autoRefreshTokenTick(),Ks);this.autoRefreshTicker=t,t&&typeof t=="object"&&typeof t.unref=="function"?t.unref():typeof Deno<"u"&&typeof Deno.unrefTimer=="function"&&Deno.unrefTimer(t),setTimeout(async()=>{await this.initializePromise,await this._autoRefreshTokenTick()},0)}async _stopAutoRefresh(){this._debug("#_stopAutoRefresh()");const t=this.autoRefreshTicker;this.autoRefreshTicker=null,t&&clearInterval(t)}async startAutoRefresh(){this._removeVisibilityChangedCallback(),await this._startAutoRefresh()}async stopAutoRefresh(){this._removeVisibilityChangedCallback(),await this._stopAutoRefresh()}async _autoRefreshTokenTick(){this._debug("#_autoRefreshTokenTick()","begin");try{await this._acquireLock(0,async()=>{try{const t=Date.now();try{return await this._useSession(async n=>{const{data:{session:r}}=n;if(!r||!r.refresh_token||!r.expires_at){this._debug("#_autoRefreshTokenTick()","no session");return}const i=Math.floor((r.expires_at*1e3-t)/Ks);this._debug("#_autoRefreshTokenTick()",`access token expires in ${i} ticks, a tick lasts ${Ks}ms, refresh threshold is ${k2} ticks`),i<=k2&&await this._callRefreshToken(r.refresh_token)})}catch(n){console.error("Auto refresh tick failed with error. This is likely a transient error.",n)}}finally{this._debug("#_autoRefreshTokenTick()","end")}})}catch(t){if(t.isAcquireTimeout||t instanceof c8)this._debug("auto refresh token tick lock not available");else throw t}}async _handleVisibilityChange(){if(this._debug("#_handleVisibilityChange()"),!kn()||!(window!=null&&window.addEventListener))return this.autoRefreshToken&&this.startAutoRefresh(),!1;try{this.visibilityChangedCallback=async()=>await this._onVisibilityChanged(!1),window==null||window.addEventListener("visibilitychange",this.visibilityChangedCallback),await this._onVisibilityChanged(!0)}catch(t){console.error("_handleVisibilityChange",t)}}async _onVisibilityChanged(t){const n=`#_onVisibilityChanged(${t})`;this._debug(n,"visibilityState",document.visibilityState),document.visibilityState==="visible"?(this.autoRefreshToken&&this._startAutoRefresh(),t||(await this.initializePromise,await this._acquireLock(-1,async()=>{if(document.visibilityState!=="visible"){this._debug(n,"acquired the lock to recover the session, but the browser visibilityState is no longer visible, aborting");return}await this._recoverAndRefresh()}))):document.visibilityState==="hidden"&&this.autoRefreshToken&&this._stopAutoRefresh()}async _getUrlForProvider(t,n,r){const i=[`provider=${encodeURIComponent(n)}`];if(r!=null&&r.redirectTo&&i.push(`redirect_to=${encodeURIComponent(r.redirectTo)}`),r!=null&&r.scopes&&i.push(`scopes=${encodeURIComponent(r.scopes)}`),this.flowType==="pkce"){const[a,s]=await Da(this.storage,this.storageKey),o=new URLSearchParams({code_challenge:`${encodeURIComponent(a)}`,code_challenge_method:`${encodeURIComponent(s)}`});i.push(o.toString())}if(r!=null&&r.queryParams){const a=new URLSearchParams(r.queryParams);i.push(a.toString())}return r!=null&&r.skipBrowserRedirect&&i.push(`skip_http_redirect=${r.skipBrowserRedirect}`),`${t}?${i.join("&")}`}async _unenroll(t){try{return await this._useSession(async n=>{var r;const{data:i,error:a}=n;return a?{data:null,error:a}:await oe(this.fetch,"DELETE",`${this.url}/factors/${t.factorId}`,{headers:this.headers,jwt:(r=i==null?void 0:i.session)===null||r===void 0?void 0:r.access_token})})}catch(n){if(re(n))return{data:null,error:n};throw n}}async _enroll(t){try{return await this._useSession(async n=>{var r,i;const{data:a,error:s}=n;if(s)return{data:null,error:s};const{data:o,error:l}=await oe(this.fetch,"POST",`${this.url}/factors`,{body:{friendly_name:t.friendlyName,factor_type:t.factorType,issuer:t.issuer},headers:this.headers,jwt:(r=a==null?void 0:a.session)===null||r===void 0?void 0:r.access_token});return l?{data:null,error:l}:(!((i=o==null?void 0:o.totp)===null||i===void 0)&&i.qr_code&&(o.totp.qr_code=`data:image/svg+xml;utf-8,${o.totp.qr_code}`),{data:o,error:null})})}catch(n){if(re(n))return{data:null,error:n};throw n}}async _verify(t){return this._acquireLock(-1,async()=>{try{return await this._useSession(async n=>{var r;const{data:i,error:a}=n;if(a)return{data:null,error:a};const{data:s,error:o}=await oe(this.fetch,"POST",`${this.url}/factors/${t.factorId}/verify`,{body:{code:t.code,challenge_id:t.challengeId},headers:this.headers,jwt:(r=i==null?void 0:i.session)===null||r===void 0?void 0:r.access_token});return o?{data:null,error:o}:(await this._saveSession(Object.assign({expires_at:Math.round(Date.now()/1e3)+s.expires_in},s)),await this._notifyAllSubscribers("MFA_CHALLENGE_VERIFIED",s),{data:s,error:o})})}catch(n){if(re(n))return{data:null,error:n};throw n}})}async _challenge(t){return this._acquireLock(-1,async()=>{try{return await this._useSession(async n=>{var r;const{data:i,error:a}=n;return a?{data:null,error:a}:await oe(this.fetch,"POST",`${this.url}/factors/${t.factorId}/challenge`,{headers:this.headers,jwt:(r=i==null?void 0:i.session)===null||r===void 0?void 0:r.access_token})})}catch(n){if(re(n))return{data:null,error:n};throw n}})}async _challengeAndVerify(t){const{data:n,error:r}=await this._challenge({factorId:t.factorId});return r?{data:null,error:r}:await this._verify({factorId:t.factorId,challengeId:n.id,code:t.code})}async _listFactors(){const{data:{user:t},error:n}=await this.getUser();if(n)return{data:null,error:n};const r=(t==null?void 0:t.factors)||[],i=r.filter(a=>a.factor_type==="totp"&&a.status==="verified");return{data:{all:r,totp:i},error:null}}async _getAuthenticatorAssuranceLevel(){return this._acquireLock(-1,async()=>await this._useSession(async t=>{var n,r;const{data:{session:i},error:a}=t;if(a)return{data:null,error:a};if(!i)return{data:{currentLevel:null,nextLevel:null,currentAuthenticationMethods:[]},error:null};const s=this._decodeJWT(i.access_token);let o=null;s.aal&&(o=s.aal);let l=o;((r=(n=i.user.factors)===null||n===void 0?void 0:n.filter(d=>d.status==="verified"))!==null&&r!==void 0?r:[]).length>0&&(l="aal2");const c=s.amr||[];return{data:{currentLevel:o,nextLevel:l,currentAuthenticationMethods:c},error:null}}))}}ll.nextInstanceID=0;const UB=ll;class HB extends UB{constructor(t){super(t)}}var KB=function(e,t,n,r){function i(a){return a instanceof n?a:new n(function(s){s(a)})}return new(n||(n=Promise))(function(a,s){function o(c){try{u(r.next(c))}catch(d){s(d)}}function l(c){try{u(r.throw(c))}catch(d){s(d)}}function u(c){c.done?a(c.value):i(c.value).then(o,l)}u((r=r.apply(e,t||[])).next())})};class YB{constructor(t,n,r){var i,a,s;if(this.supabaseUrl=t,this.supabaseKey=n,!t)throw new Error("supabaseUrl is required.");if(!n)throw new Error("supabaseKey is required.");const o=uB(t);this.realtimeUrl=`${o}/realtime/v1`.replace(/^http/i,"ws"),this.authUrl=`${o}/auth/v1`,this.storageUrl=`${o}/storage/v1`,this.functionsUrl=`${o}/functions/v1`;const l=`sb-${new URL(this.authUrl).hostname.split(".")[0]}-auth-token`,u={db:nB,realtime:iB,auth:Object.assign(Object.assign({},rB),{storageKey:l}),global:tB},c=cB(r??{},u);this.storageKey=(i=c.auth.storageKey)!==null&&i!==void 0?i:"",this.headers=(a=c.global.headers)!==null&&a!==void 0?a:{},this.auth=this._initSupabaseAuthClient((s=c.auth)!==null&&s!==void 0?s:{},this.headers,c.global.fetch),this.fetch=lB(n,this._getAccessToken.bind(this),c.global.fetch),this.realtime=this._initRealtimeClient(Object.assign({headers:this.headers},c.realtime)),this.rest=new EO(`${o}/rest/v1`,{headers:this.headers,schema:c.db.schema,fetch:this.fetch}),this._listenForAuthEvents()}get functions(){return new tO(this.functionsUrl,{headers:this.headers,customFetch:this.fetch})}get storage(){return new QO(this.storageUrl,this.headers,this.fetch)}from(t){return this.rest.from(t)}schema(t){return this.rest.schema(t)}rpc(t,n={},r={}){return this.rest.rpc(t,n,r)}channel(t,n={config:{}}){return this.realtime.channel(t,n)}getChannels(){return this.realtime.getChannels()}removeChannel(t){return this.realtime.removeChannel(t)}removeAllChannels(){return this.realtime.removeAllChannels()}_getAccessToken(){var t,n;return KB(this,void 0,void 0,function*(){const{data:r}=yield this.auth.getSession();return(n=(t=r.session)===null||t===void 0?void 0:t.access_token)!==null&&n!==void 0?n:null})}_initSupabaseAuthClient({autoRefreshToken:t,persistSession:n,detectSessionInUrl:r,storage:i,storageKey:a,flowType:s,debug:o},l,u){var c;const d={Authorization:`Bearer ${this.supabaseKey}`,apikey:`${this.supabaseKey}`};return new HB({url:this.authUrl,headers:Object.assign(Object.assign({},d),l),storageKey:a,autoRefreshToken:t,persistSession:n,detectSessionInUrl:r,storage:i,flowType:s,debug:o,fetch:u,hasCustomAuthorizationHeader:(c="Authorization"in this.headers)!==null&&c!==void 0?c:!1})}_initRealtimeClient(t){return new NO(this.realtimeUrl,Object.assign(Object.assign({},t),{params:Object.assign({apikey:this.supabaseKey},t==null?void 0:t.params)}))}_listenForAuthEvents(){return this.auth.onAuthStateChange((n,r)=>{this._handleTokenChanged(n,"CLIENT",r==null?void 0:r.access_token)})}_handleTokenChanged(t,n,r){(t==="TOKEN_REFRESHED"||t==="SIGNED_IN")&&this.changedAccessToken!==r?(this.realtime.setAuth(r??null),this.changedAccessToken=r):t==="SIGNED_OUT"&&(this.realtime.setAuth(this.supabaseKey),n=="STORAGE"&&this.auth.signOut(),this.changedAccessToken=void 0)}}const qB=(e,t,n)=>new YB(e,t,n);function ne(e,t,n,r){Object.defineProperty(e,t,{get:n,set:r,enumerable:!0,configurable:!0})}var Z={};ne(Z,"focus-ring",()=>Em,e=>Em=e);ne(Z,"i18nFontFamily",()=>jc,e=>jc=e);ne(Z,"is-active",()=>Sm,e=>Sm=e);ne(Z,"is-disabled",()=>Cm,e=>Cm=e);ne(Z,"is-focused",()=>km,e=>km=e);ne(Z,"is-hovered",()=>Pm,e=>Pm=e);ne(Z,"is-open",()=>Tm,e=>Tm=e);ne(Z,"is-placeholder",()=>Rm,e=>Rm=e);ne(Z,"is-selected",()=>Mm,e=>Mm=e);ne(Z,"spectrum-BaseButton",()=>li,e=>li=e);ne(Z,"spectrum-FocusRing-ring",()=>zc,e=>zc=e);ne(Z,"spectrum-FocusRing",()=>ui,e=>ui=e);ne(Z,"spectrum-ActionButton",()=>Fm,e=>Fm=e);ne(Z,"spectrum-ActionButton--emphasized",()=>Am,e=>Am=e);ne(Z,"spectrum-ActionButton--quiet",()=>Om,e=>Om=e);ne(Z,"spectrum-ActionButton--staticBlack",()=>Bm,e=>Bm=e);ne(Z,"spectrum-ActionButton--staticColor",()=>Im,e=>Im=e);ne(Z,"spectrum-ActionButton--staticWhite",()=>Lm,e=>Lm=e);ne(Z,"spectrum-ActionButton-hold",()=>Nm,e=>Nm=e);ne(Z,"spectrum-ActionButton-label",()=>jm,e=>jm=e);ne(Z,"spectrum-ActionGroup-itemIcon",()=>zm,e=>zm=e);ne(Z,"spectrum-Button",()=>Vm,e=>Vm=e);ne(Z,"spectrum-Button--iconOnly",()=>Wm,e=>Wm=e);ne(Z,"spectrum-Button--overBackground",()=>Um,e=>Um=e);ne(Z,"spectrum-Button--pending",()=>Hm,e=>Hm=e);ne(Z,"spectrum-Button-circleLoader",()=>Km,e=>Km=e);ne(Z,"spectrum-Button-label",()=>Ym,e=>Ym=e);ne(Z,"spectrum-ClearButton",()=>qm,e=>qm=e);ne(Z,"spectrum-ClearButton--overBackground",()=>Gm,e=>Gm=e);ne(Z,"spectrum-ClearButton--small",()=>Zm,e=>Zm=e);ne(Z,"spectrum-FieldButton",()=>Xm,e=>Xm=e);ne(Z,"spectrum-FieldButton--invalid",()=>Qm,e=>Qm=e);ne(Z,"spectrum-FocusRing--quiet",()=>Vc,e=>Vc=e);ne(Z,"spectrum-FieldButton--quiet",()=>Jm,e=>Jm=e);ne(Z,"spectrum-Icon",()=>eg,e=>eg=e);ne(Z,"spectrum-LogicButton",()=>tg,e=>tg=e);ne(Z,"spectrum-LogicButton--and",()=>ng,e=>ng=e);ne(Z,"spectrum-LogicButton--or",()=>rg,e=>rg=e);var Em,jc,Sm,Cm,km,Pm,Tm,Rm,Mm,li,zc,ui,Fm,Am,Om,Bm,Im,Lm,Nm,jm,zm,Vm,Wm,Um,Hm,Km,Ym,qm,Gm,Zm,Xm,Qm,Vc,Jm,eg,tg,ng,rg;Em="Dniwja_focus-ring";jc="Dniwja_i18nFontFamily";Sm="Dniwja_is-active";Cm="Dniwja_is-disabled";km="Dniwja_is-focused";Pm="Dniwja_is-hovered";Tm="Dniwja_is-open";Rm="Dniwja_is-placeholder";Mm="Dniwja_is-selected";li=`Dniwja_spectrum-BaseButton ${jc}`;zc="Dniwja_spectrum-FocusRing-ring";ui=`Dniwja_spectrum-FocusRing ${zc}`;Fm=`Dniwja_spectrum-ActionButton ${li} ${ui}`;Am="Dniwja_spectrum-ActionButton--emphasized";Om="Dniwja_spectrum-ActionButton--quiet";Bm="Dniwja_spectrum-ActionButton--staticBlack";Im="Dniwja_spectrum-ActionButton--staticColor";Lm="Dniwja_spectrum-ActionButton--staticWhite";Nm="Dniwja_spectrum-ActionButton-hold";jm="Dniwja_spectrum-ActionButton-label";zm="Dniwja_spectrum-ActionGroup-itemIcon";Vm=`Dniwja_spectrum-Button ${li} ${ui}`;Wm="Dniwja_spectrum-Button--iconOnly";Um="Dniwja_spectrum-Button--overBackground";Hm="Dniwja_spectrum-Button--pending";Km="Dniwja_spectrum-Button-circleLoader";Ym="Dniwja_spectrum-Button-label";qm=`Dniwja_spectrum-ClearButton ${li} ${ui}`;Gm="Dniwja_spectrum-ClearButton--overBackground";Zm="Dniwja_spectrum-ClearButton--small";Xm=`Dniwja_spectrum-FieldButton ${li} ${ui}`;Qm="Dniwja_spectrum-FieldButton--invalid";Vc="Dniwja_spectrum-FocusRing--quiet";Jm=`Dniwja_spectrum-FieldButton--quiet ${Vc}`;eg="Dniwja_spectrum-Icon";tg=`Dniwja_spectrum-LogicButton ${li} ${ui}`;ng="Dniwja_spectrum-LogicButton--and";rg="Dniwja_spectrum-LogicButton--or";function d8(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=d8(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Ef(){for(var e,t,n=0,r="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=d8(e))&&(r&&(r+=" "),r+=t);return r}let fu=!1;function V(e,...t){let n=[];for(let r of t)if(typeof r=="object"&&r){let i={};for(let a in r)e[a]&&(i[e[a]]=r[a]),e[a]||(i[a]=r[a]);n.push(i)}else typeof r=="string"?(e[r]&&n.push(e[r]),e[r]||n.push(r)):n.push(r);return Ef(...n)}const Wc={prefix:String(Math.round(Math.random()*1e10)),current:0},f8=_.createContext(Wc),GB=_.createContext(!1);let ZB=!!(typeof window<"u"&&window.document&&window.document.createElement),Ph=new WeakMap;function XB(e=!1){let t=y.useContext(f8),n=y.useRef(null);if(n.current===null&&!e){var r,i;let a=(i=_.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED)===null||i===void 0||(r=i.ReactCurrentOwner)===null||r===void 0?void 0:r.current;if(a){let s=Ph.get(a);s==null?Ph.set(a,{id:t.current,state:a.memoizedState}):a.memoizedState!==s.state&&(t.current=s.id,Ph.delete(a))}n.current=++t.current}return n.current}function QB(e){let t=y.useContext(f8);t===Wc&&!ZB&&console.warn("When server rendering, you must wrap your application in an <SSRProvider> to ensure consistent ids are generated between the client and server.");let n=XB(!!e),r=`react-aria${t.prefix}`;return e||`${r}-${n}`}function JB(e){let t=_.useId(),[n]=y.useState(pa()),r=n?"react-aria":`react-aria${Wc.prefix}`;return e||`${r}-${t}`}const eI=typeof _.useId=="function"?JB:QB;function tI(){return!1}function nI(){return!0}function rI(e){return()=>{}}function pa(){return typeof _.useSyncExternalStore=="function"?_.useSyncExternalStore(rI,tI,nI):y.useContext(GB)}function ig(e){let t=typeof window<"u"&&typeof window.matchMedia=="function",[n,r]=y.useState(()=>t?window.matchMedia(e).matches:!1);return y.useEffect(()=>{if(!t)return;let a=window.matchMedia(e),s=o=>{r(o.matches)};return a.addListener(s),()=>{a.removeListener(s)}},[t,e]),pa()?!1:n}function Sf(e){return{UNSAFE_getDOMNode(){return e.current}}}function iI(e,t=e){return{...Sf(e),focus(){t.current&&t.current.focus()}}}function Nn(e){let t=y.useRef(null);return y.useImperativeHandle(e,()=>Sf(t)),t}function h8(e,t){let n=y.useRef(null);return y.useImperativeHandle(e,()=>iI(n,t)),n}function hu(e){return{get current(){return e.current&&e.current.UNSAFE_getDOMNode()}}}const o$=_.createContext(null);o$.displayName="BreakpointContext";function aI(e){let{children:t,matchedBreakpoints:n}=e;return _.createElement(o$.Provider,{value:{matchedBreakpoints:n}},t)}function sI(e){let t=Object.entries(e).sort(([,l],[,u])=>u-l),n=t.map(([,l])=>`(min-width: ${l}px)`),r=typeof window<"u"&&typeof window.matchMedia=="function",i=()=>{let l=[];for(let u in n){let c=n[u];window.matchMedia(c).matches&&l.push(t[u][0])}return l.push("base"),l},[a,s]=y.useState(()=>r?i():["base"]);return y.useEffect(()=>{if(!r)return;let l=()=>{const u=i();s(c=>c.length!==u.length||c.some((d,f)=>d!==u[f])?[...u]:c)};return window.addEventListener("resize",l),()=>{window.removeEventListener("resize",l)}},[r]),pa()?["base"]:a}function p8(){return y.useContext(o$)}const oI=new Set(["Arab","Syrc","Samr","Mand","Thaa","Mend","Nkoo","Adlm","Rohg","Hebr"]),lI=new Set(["ae","ar","arc","bcc","bqi","ckb","dv","fa","glk","he","ku","mzn","nqo","pnb","ps","sd","ug","ur","yi"]);function m8(e){if(Intl.Locale){let n=new Intl.Locale(e).maximize(),r=typeof n.getTextInfo=="function"?n.getTextInfo():n.textInfo;if(r)return r.direction==="rtl";if(n.script)return oI.has(n.script)}let t=e.split("-")[0];return lI.has(t)}const uI=Symbol.for("react-aria.i18n.locale");function g8(){let e=typeof window<"u"&&window[uI]||typeof navigator<"u"&&(navigator.language||navigator.userLanguage)||"en-US";try{Intl.DateTimeFormat.supportedLocalesOf([e])}catch{e="en-US"}return{locale:e,direction:m8(e)?"rtl":"ltr"}}let ag=g8(),po=new Set;function T2(){ag=g8();for(let e of po)e(ag)}function v8(){let e=pa(),[t,n]=y.useState(ag);return y.useEffect(()=>(po.size===0&&window.addEventListener("languagechange",T2),po.add(n),()=>{po.delete(n),po.size===0&&window.removeEventListener("languagechange",T2)}),[]),e?{locale:"en-US",direction:"ltr"}:t}const b8=_.createContext(null);function cI(e){let{locale:t,children:n}=e,r=v8(),i=_.useMemo(()=>t?{locale:t,direction:m8(t)?"rtl":"ltr"}:r,[r,t]);return _.createElement(b8.Provider,{value:i},n)}function Qe(){let e=v8();return y.useContext(b8)||e}const dI=Symbol.for("react-aria.i18n.locale"),fI=Symbol.for("react-aria.i18n.strings");let Ea;class gi{getStringForLocale(t,n){let i=this.getStringsForLocale(n)[t];if(!i)throw new Error(`Could not find intl message ${t} in ${n} locale`);return i}getStringsForLocale(t){let n=this.strings[t];return n||(n=hI(t,this.strings,this.defaultLocale),this.strings[t]=n),n}static getGlobalDictionaryForPackage(t){if(typeof window>"u")return null;let n=window[dI];if(Ea===void 0){let i=window[fI];if(!i)return null;Ea={};for(let a in i)Ea[a]=new gi({[n]:i[a]},n)}let r=Ea==null?void 0:Ea[t];if(!r)throw new Error(`Strings for package "${t}" were not included by LocalizedStringProvider. Please add it to the list passed to createLocalizedStringDictionary.`);return r}constructor(t,n="en-US"){this.strings=Object.fromEntries(Object.entries(t).filter(([,r])=>r)),this.defaultLocale=n}}function hI(e,t,n="en-US"){if(t[e])return t[e];let r=pI(e);if(t[r])return t[r];for(let i in t)if(i.startsWith(r+"-"))return t[i];return t[n]}function pI(e){return Intl.Locale?new Intl.Locale(e).language:e.split("-")[0]}const R2=new Map,M2=new Map;class y8{format(t,n){let r=this.strings.getStringForLocale(t,this.locale);return typeof r=="function"?r(n,this):r}plural(t,n,r="cardinal"){let i=n["="+t];if(i)return typeof i=="function"?i():i;let a=this.locale+":"+r,s=R2.get(a);s||(s=new Intl.PluralRules(this.locale,{type:r}),R2.set(a,s));let o=s.select(t);return i=n[o]||n.other,typeof i=="function"?i():i}number(t){let n=M2.get(this.locale);return n||(n=new Intl.NumberFormat(this.locale),M2.set(this.locale,n)),n.format(t)}select(t,n){let r=t[n]||t.other;return typeof r=="function"?r():r}constructor(t,n){this.locale=t,this.strings=n}}const F2=new WeakMap;function mI(e){let t=F2.get(e);return t||(t=new gi(e),F2.set(e,t)),t}function $8(e,t){return t&&gi.getGlobalDictionaryForPackage(t)||mI(e)}function Sn(e,t){let{locale:n}=Qe(),r=$8(e,t);return y.useMemo(()=>new y8(n,r),[n,r])}function is(e,t){return e-t*Math.floor(e/t)}const x8=1721426;function Vi(e,t,n,r){t=Bl(e,t);let i=t-1,a=-2;return n<=2?a=0:Hr(t)&&(a=-1),x8-1+365*i+Math.floor(i/4)-Math.floor(i/100)+Math.floor(i/400)+Math.floor((367*n-362)/12+a+r)}function Hr(e){return e%4===0&&(e%100!==0||e%400===0)}function Bl(e,t){return e==="BC"?1-t:t}function Cf(e){let t="AD";return e<=0&&(t="BC",e=1-e),[t,e]}const gI={standard:[31,28,31,30,31,30,31,31,30,31,30,31],leapyear:[31,29,31,30,31,30,31,31,30,31,30,31]};class Ft{fromJulianDay(t){let n=t,r=n-x8,i=Math.floor(r/146097),a=is(r,146097),s=Math.floor(a/36524),o=is(a,36524),l=Math.floor(o/1461),u=is(o,1461),c=Math.floor(u/365),d=i*400+s*100+l*4+c+(s!==4&&c!==4?1:0),[f,h]=Cf(d),p=n-Vi(f,h,1,1),g=2;n<Vi(f,h,3,1)?g=0:Hr(h)&&(g=1);let b=Math.floor(((p+g)*12+373)/367),v=n-Vi(f,h,b,1)+1;return new Je(f,h,b,v)}toJulianDay(t){return Vi(t.era,t.year,t.month,t.day)}getDaysInMonth(t){return gI[Hr(t.year)?"leapyear":"standard"][t.month-1]}getMonthsInYear(t){return 12}getDaysInYear(t){return Hr(t.year)?366:365}getYearsInEra(t){return 9999}getEras(){return["BC","AD"]}isInverseEra(t){return t.era==="BC"}balanceDate(t){t.year<=0&&(t.era=t.era==="BC"?"AD":"BC",t.year=1-t.year)}constructor(){this.identifier="gregory"}}const vI={"001":1,AD:1,AE:6,AF:6,AI:1,AL:1,AM:1,AN:1,AR:1,AT:1,AU:1,AX:1,AZ:1,BA:1,BE:1,BG:1,BH:6,BM:1,BN:1,BY:1,CH:1,CL:1,CM:1,CN:1,CR:1,CY:1,CZ:1,DE:1,DJ:6,DK:1,DZ:6,EC:1,EE:1,EG:6,ES:1,FI:1,FJ:1,FO:1,FR:1,GB:1,GE:1,GF:1,GP:1,GR:1,HR:1,HU:1,IE:1,IQ:6,IR:6,IS:1,IT:1,JO:6,KG:1,KW:6,KZ:1,LB:1,LI:1,LK:1,LT:1,LU:1,LV:1,LY:6,MC:1,MD:1,ME:1,MK:1,MN:1,MQ:1,MV:5,MY:1,NL:1,NO:1,NZ:1,OM:6,PL:1,QA:6,RE:1,RO:1,RS:1,RU:1,SD:6,SE:1,SI:1,SK:1,SM:1,SY:6,TJ:1,TM:1,TR:1,UA:1,UY:1,UZ:1,VA:1,VN:1,XK:1};function Ze(e,t){return t=Oe(t,e.calendar),e.era===t.era&&e.year===t.year&&e.month===t.month&&e.day===t.day}function A2(e,t){return t=Oe(t,e.calendar),e=na(e),t=na(t),e.era===t.era&&e.year===t.year&&e.month===t.month}function sg(e,t){return e.calendar.identifier===t.calendar.identifier&&e.era===t.era&&e.year===t.year&&e.month===t.month&&e.day===t.day}function w8(e,t){return Ze(e,Il(t))}function kf(e,t){let n=e.calendar.toJulianDay(e),r=Math.ceil(n+1-DI(t))%7;return r<0&&(r+=7),r}function D8(e){return hr(Date.now(),e)}function Il(e){return Zt(D8(e))}function _8(e,t){return e.calendar.toJulianDay(e)-t.calendar.toJulianDay(t)}function E8(e,t){return O2(e)-O2(t)}function O2(e){return e.hour*36e5+e.minute*6e4+e.second*1e3+e.millisecond}let Th=null;function Pf(){return Th==null&&(Th=new Intl.DateTimeFormat().resolvedOptions().timeZone),Th}function na(e){return e.subtract({days:e.day-1})}function Uc(e){return e.add({days:e.calendar.getDaysInMonth(e)-e.day})}function bI(e){return na(e.subtract({months:e.month-1}))}function yI(e){return e.calendar.getMinimumMonthInYear?e.calendar.getMinimumMonthInYear(e):1}function $I(e){return e.calendar.getMinimumDayInMonth?e.calendar.getMinimumDayInMonth(e):1}function ul(e,t){let n=kf(e,t);return e.subtract({days:n})}function xI(e,t){return ul(e,t).add({days:6})}const B2=new Map;function wI(e){if(Intl.Locale){let n=B2.get(e);return n||(n=new Intl.Locale(e).maximize().region,n&&B2.set(e,n)),n}let t=e.split("-")[1];return t==="u"?void 0:t}function DI(e){let t=wI(e);return t&&vI[t]||0}function _I(e,t){let n=e.calendar.getDaysInMonth(e);return Math.ceil((kf(na(e),t)+n)/7)}function l$(e,t){return e&&t?e.compare(t)<=0?e:t:e||t}function u$(e,t){return e&&t?e.compare(t)>=0?e:t:e||t}function ws(e){e=Oe(e,new Ft);let t=Bl(e.era,e.year);return S8(t,e.month,e.day,e.hour,e.minute,e.second,e.millisecond)}function S8(e,t,n,r,i,a,s){let o=new Date;return o.setUTCHours(r,i,a,s),o.setUTCFullYear(e,t-1,n),o.getTime()}function og(e,t){if(t==="UTC")return 0;if(e>0&&t===Pf())return new Date(e).getTimezoneOffset()*-6e4;let{year:n,month:r,day:i,hour:a,minute:s,second:o}=C8(e,t);return S8(n,r,i,a,s,o,0)-Math.floor(e/1e3)*1e3}const I2=new Map;function C8(e,t){let n=I2.get(t);n||(n=new Intl.DateTimeFormat("en-US",{timeZone:t,hour12:!1,era:"short",year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"}),I2.set(t,n));let r=n.formatToParts(new Date(e)),i={};for(let a of r)a.type!=="literal"&&(i[a.type]=a.value);return{year:i.era==="BC"||i.era==="B"?-i.year+1:+i.year,month:+i.month,day:+i.day,hour:i.hour==="24"?0:+i.hour,minute:+i.minute,second:+i.second}}const L2=864e5;function EI(e,t,n,r){return(n===r?[n]:[n,r]).filter(a=>SI(e,t,a))}function SI(e,t,n){let r=C8(n,t);return e.year===r.year&&e.month===r.month&&e.day===r.day&&e.hour===r.hour&&e.minute===r.minute&&e.second===r.second}function cr(e,t,n="compatible"){let r=Xn(e);if(t==="UTC")return ws(r);if(t===Pf()&&n==="compatible"){r=Oe(r,new Ft);let l=new Date,u=Bl(r.era,r.year);return l.setFullYear(u,r.month-1,r.day),l.setHours(r.hour,r.minute,r.second,r.millisecond),l.getTime()}let i=ws(r),a=og(i-L2,t),s=og(i+L2,t),o=EI(r,t,i-a,i-s);if(o.length===1)return o[0];if(o.length>1)switch(n){case"compatible":case"earlier":return o[0];case"later":return o[o.length-1];case"reject":throw new RangeError("Multiple possible absolute times found")}switch(n){case"earlier":return Math.min(i-a,i-s);case"compatible":case"later":return Math.max(i-a,i-s);case"reject":throw new RangeError("No such absolute time found")}}function k8(e,t,n="compatible"){return new Date(cr(e,t,n))}function hr(e,t){let n=og(e,t),r=new Date(e+n),i=r.getUTCFullYear(),a=r.getUTCMonth()+1,s=r.getUTCDate(),o=r.getUTCHours(),l=r.getUTCMinutes(),u=r.getUTCSeconds(),c=r.getUTCMilliseconds();return new dl(i,a,s,t,n,o,l,u,c)}function Zt(e){return new Je(e.calendar,e.era,e.year,e.month,e.day)}function Xn(e,t){let n=0,r=0,i=0,a=0;if("timeZone"in e)({hour:n,minute:r,second:i,millisecond:a}=e);else if("hour"in e&&!t)return e;return t&&({hour:n,minute:r,second:i,millisecond:a}=t),new Hc(e.calendar,e.era,e.year,e.month,e.day,n,r,i,a)}function N2(e){return new Nl(e.hour,e.minute,e.second,e.millisecond)}function Oe(e,t){if(e.calendar.identifier===t.identifier)return e;let n=t.fromJulianDay(e.calendar.toJulianDay(e)),r=e.copy();return r.calendar=t,r.era=n.era,r.year=n.year,r.month=n.month,r.day=n.day,ra(r),r}function P8(e,t,n){if(e instanceof dl)return e.timeZone===t?e:kI(e,t);let r=cr(e,t,n);return hr(r,t)}function CI(e){let t=ws(e)-e.offset;return new Date(t)}function kI(e,t){let n=ws(e)-e.offset;return Oe(hr(n,t),e.calendar)}const Ys=36e5;function Tf(e,t){let n=e.copy(),r="hour"in n?F8(n,t):0;lg(n,t.years||0),n.calendar.balanceYearMonth&&n.calendar.balanceYearMonth(n,e),n.month+=t.months||0,ug(n),T8(n),n.day+=(t.weeks||0)*7,n.day+=t.days||0,n.day+=r,PI(n),n.calendar.balanceDate&&n.calendar.balanceDate(n),n.year<1&&(n.year=1,n.month=1,n.day=1);let i=n.calendar.getYearsInEra(n);if(n.year>i){var a,s;let l=(a=(s=n.calendar).isInverseEra)===null||a===void 0?void 0:a.call(s,n);n.year=i,n.month=l?1:n.calendar.getMonthsInYear(n),n.day=l?1:n.calendar.getDaysInMonth(n)}n.month<1&&(n.month=1,n.day=1);let o=n.calendar.getMonthsInYear(n);return n.month>o&&(n.month=o,n.day=n.calendar.getDaysInMonth(n)),n.day=Math.max(1,Math.min(n.calendar.getDaysInMonth(n),n.day)),n}function lg(e,t){var n,r;!((n=(r=e.calendar).isInverseEra)===null||n===void 0)&&n.call(r,e)&&(t=-t),e.year+=t}function ug(e){for(;e.month<1;)lg(e,-1),e.month+=e.calendar.getMonthsInYear(e);let t=0;for(;e.month>(t=e.calendar.getMonthsInYear(e));)e.month-=t,lg(e,1)}function PI(e){for(;e.day<1;)e.month--,ug(e),e.day+=e.calendar.getDaysInMonth(e);for(;e.day>e.calendar.getDaysInMonth(e);)e.day-=e.calendar.getDaysInMonth(e),e.month++,ug(e)}function T8(e){e.month=Math.max(1,Math.min(e.calendar.getMonthsInYear(e),e.month)),e.day=Math.max(1,Math.min(e.calendar.getDaysInMonth(e),e.day))}function ra(e){e.calendar.constrainDate&&e.calendar.constrainDate(e),e.year=Math.max(1,Math.min(e.calendar.getYearsInEra(e),e.year)),T8(e)}function c$(e){let t={};for(let n in e)typeof e[n]=="number"&&(t[n]=-e[n]);return t}function R8(e,t){return Tf(e,c$(t))}function d$(e,t){let n=e.copy();return t.era!=null&&(n.era=t.era),t.year!=null&&(n.year=t.year),t.month!=null&&(n.month=t.month),t.day!=null&&(n.day=t.day),ra(n),n}function cl(e,t){let n=e.copy();return t.hour!=null&&(n.hour=t.hour),t.minute!=null&&(n.minute=t.minute),t.second!=null&&(n.second=t.second),t.millisecond!=null&&(n.millisecond=t.millisecond),M8(n),n}function TI(e){e.second+=Math.floor(e.millisecond/1e3),e.millisecond=pu(e.millisecond,1e3),e.minute+=Math.floor(e.second/60),e.second=pu(e.second,60),e.hour+=Math.floor(e.minute/60),e.minute=pu(e.minute,60);let t=Math.floor(e.hour/24);return e.hour=pu(e.hour,24),t}function M8(e){e.millisecond=Math.max(0,Math.min(e.millisecond,1e3)),e.second=Math.max(0,Math.min(e.second,59)),e.minute=Math.max(0,Math.min(e.minute,59)),e.hour=Math.max(0,Math.min(e.hour,23))}function pu(e,t){let n=e%t;return n<0&&(n+=t),n}function F8(e,t){return e.hour+=t.hours||0,e.minute+=t.minutes||0,e.second+=t.seconds||0,e.millisecond+=t.milliseconds||0,TI(e)}function A8(e,t){let n=e.copy();return F8(n,t),n}function RI(e,t){return A8(e,c$(t))}function f$(e,t,n,r){let i=e.copy();switch(t){case"era":{let o=e.calendar.getEras(),l=o.indexOf(e.era);if(l<0)throw new Error("Invalid era: "+e.era);l=pr(l,n,0,o.length-1,r==null?void 0:r.round),i.era=o[l],ra(i);break}case"year":var a,s;!((a=(s=i.calendar).isInverseEra)===null||a===void 0)&&a.call(s,i)&&(n=-n),i.year=pr(e.year,n,-1/0,9999,r==null?void 0:r.round),i.year===-1/0&&(i.year=1),i.calendar.balanceYearMonth&&i.calendar.balanceYearMonth(i,e);break;case"month":i.month=pr(e.month,n,1,e.calendar.getMonthsInYear(e),r==null?void 0:r.round);break;case"day":i.day=pr(e.day,n,1,e.calendar.getDaysInMonth(e),r==null?void 0:r.round);break;default:throw new Error("Unsupported field "+t)}return e.calendar.balanceDate&&e.calendar.balanceDate(i),ra(i),i}function h$(e,t,n,r){let i=e.copy();switch(t){case"hour":{let a=e.hour,s=0,o=23;if((r==null?void 0:r.hourCycle)===12){let l=a>=12;s=l?12:0,o=l?23:11}i.hour=pr(a,n,s,o,r==null?void 0:r.round);break}case"minute":i.minute=pr(e.minute,n,0,59,r==null?void 0:r.round);break;case"second":i.second=pr(e.second,n,0,59,r==null?void 0:r.round);break;case"millisecond":i.millisecond=pr(e.millisecond,n,0,999,r==null?void 0:r.round);break;default:throw new Error("Unsupported field "+t)}return i}function pr(e,t,n,r,i=!1){if(i){e+=Math.sign(t),e<n&&(e=r);let a=Math.abs(t);t>0?e=Math.ceil(e/a)*a:e=Math.floor(e/a)*a,e>r&&(e=n)}else e+=t,e<n?e=r-(n-e-1):e>r&&(e=n+(e-r-1));return e}function O8(e,t){let n;if(t.years!=null&&t.years!==0||t.months!=null&&t.months!==0||t.weeks!=null&&t.weeks!==0||t.days!=null&&t.days!==0){let i=Tf(Xn(e),{years:t.years,months:t.months,weeks:t.weeks,days:t.days});n=cr(i,e.timeZone)}else n=ws(e)-e.offset;n+=t.milliseconds||0,n+=(t.seconds||0)*1e3,n+=(t.minutes||0)*6e4,n+=(t.hours||0)*36e5;let r=hr(n,e.timeZone);return Oe(r,e.calendar)}function MI(e,t){return O8(e,c$(t))}function FI(e,t,n,r){switch(t){case"hour":{let i=0,a=23;if((r==null?void 0:r.hourCycle)===12){let p=e.hour>=12;i=p?12:0,a=p?23:11}let s=Xn(e),o=Oe(cl(s,{hour:i}),new Ft),l=[cr(o,e.timeZone,"earlier"),cr(o,e.timeZone,"later")].filter(p=>hr(p,e.timeZone).day===o.day)[0],u=Oe(cl(s,{hour:a}),new Ft),c=[cr(u,e.timeZone,"earlier"),cr(u,e.timeZone,"later")].filter(p=>hr(p,e.timeZone).day===u.day).pop(),d=ws(e)-e.offset,f=Math.floor(d/Ys),h=d%Ys;return d=pr(f,n,Math.floor(l/Ys),Math.floor(c/Ys),r==null?void 0:r.round)*Ys+h,Oe(hr(d,e.timeZone),e.calendar)}case"minute":case"second":case"millisecond":return h$(e,t,n,r);case"era":case"year":case"month":case"day":{let i=f$(Xn(e),t,n,r),a=cr(i,e.timeZone);return Oe(hr(a,e.timeZone),e.calendar)}default:throw new Error("Unsupported field "+t)}}function AI(e,t,n){let r=Xn(e),i=cl(d$(r,t),t);if(i.compare(r)===0)return e;let a=cr(i,e.timeZone,n);return Oe(hr(a,e.timeZone),e.calendar)}function B8(e){return`${String(e.hour).padStart(2,"0")}:${String(e.minute).padStart(2,"0")}:${String(e.second).padStart(2,"0")}${e.millisecond?String(e.millisecond/1e3).slice(1):""}`}function I8(e){let t=Oe(e,new Ft);return`${String(t.year).padStart(4,"0")}-${String(t.month).padStart(2,"0")}-${String(t.day).padStart(2,"0")}`}function L8(e){return`${I8(e)}T${B8(e)}`}function OI(e){let t=Math.sign(e)<0?"-":"+";e=Math.abs(e);let n=Math.floor(e/36e5),r=e%36e5/6e4;return`${t}${String(n).padStart(2,"0")}:${String(r).padStart(2,"0")}`}function BI(e){return`${L8(e)}${OI(e.offset)}[${e.timeZone}]`}function II(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Ll(e,t,n){II(e,t),t.set(e,n)}function p$(e){let t=typeof e[0]=="object"?e.shift():new Ft,n;if(typeof e[0]=="string")n=e.shift();else{let s=t.getEras();n=s[s.length-1]}let r=e.shift(),i=e.shift(),a=e.shift();return[t,n,r,i,a]}var LI=new WeakMap;class Je{copy(){return this.era?new Je(this.calendar,this.era,this.year,this.month,this.day):new Je(this.calendar,this.year,this.month,this.day)}add(t){return Tf(this,t)}subtract(t){return R8(this,t)}set(t){return d$(this,t)}cycle(t,n,r){return f$(this,t,n,r)}toDate(t){return k8(this,t)}toString(){return I8(this)}compare(t){return _8(this,t)}constructor(...t){Ll(this,LI,{writable:!0,value:void 0});let[n,r,i,a,s]=p$(t);this.calendar=n,this.era=r,this.year=i,this.month=a,this.day=s,ra(this)}}var NI=new WeakMap;class Nl{copy(){return new Nl(this.hour,this.minute,this.second,this.millisecond)}add(t){return A8(this,t)}subtract(t){return RI(this,t)}set(t){return cl(this,t)}cycle(t,n,r){return h$(this,t,n,r)}toString(){return B8(this)}compare(t){return E8(this,t)}constructor(t=0,n=0,r=0,i=0){Ll(this,NI,{writable:!0,value:void 0}),this.hour=t,this.minute=n,this.second=r,this.millisecond=i,M8(this)}}var jI=new WeakMap;class Hc{copy(){return this.era?new Hc(this.calendar,this.era,this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond):new Hc(this.calendar,this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond)}add(t){return Tf(this,t)}subtract(t){return R8(this,t)}set(t){return d$(cl(this,t),t)}cycle(t,n,r){switch(t){case"era":case"year":case"month":case"day":return f$(this,t,n,r);default:return h$(this,t,n,r)}}toDate(t,n){return k8(this,t,n)}toString(){return L8(this)}compare(t){let n=_8(this,t);return n===0?E8(this,Xn(t)):n}constructor(...t){Ll(this,jI,{writable:!0,value:void 0});let[n,r,i,a,s]=p$(t);this.calendar=n,this.era=r,this.year=i,this.month=a,this.day=s,this.hour=t.shift()||0,this.minute=t.shift()||0,this.second=t.shift()||0,this.millisecond=t.shift()||0,ra(this)}}var zI=new WeakMap;class dl{copy(){return this.era?new dl(this.calendar,this.era,this.year,this.month,this.day,this.timeZone,this.offset,this.hour,this.minute,this.second,this.millisecond):new dl(this.calendar,this.year,this.month,this.day,this.timeZone,this.offset,this.hour,this.minute,this.second,this.millisecond)}add(t){return O8(this,t)}subtract(t){return MI(this,t)}set(t,n){return AI(this,t,n)}cycle(t,n,r){return FI(this,t,n,r)}toDate(){return CI(this)}toString(){return BI(this)}toAbsoluteString(){return this.toDate().toISOString()}compare(t){return this.toDate().getTime()-P8(t,this.timeZone).toDate().getTime()}constructor(...t){Ll(this,zI,{writable:!0,value:void 0});let[n,r,i,a,s]=p$(t),o=t.shift(),l=t.shift();this.calendar=n,this.era=r,this.year=i,this.month=a,this.day=s,this.timeZone=o,this.offset=l,this.hour=t.shift()||0,this.minute=t.shift()||0,this.second=t.shift()||0,this.millisecond=t.shift()||0,ra(this)}}const as=[[1868,9,8],[1912,7,30],[1926,12,25],[1989,1,8],[2019,5,1]],VI=[[1912,7,29],[1926,12,24],[1989,1,7],[2019,4,30]],rc=[1867,1911,1925,1988,2018],Lr=["meiji","taisho","showa","heisei","reiwa"];function j2(e){const t=as.findIndex(([n,r,i])=>e.year<n||e.year===n&&e.month<r||e.year===n&&e.month===r&&e.day<i);return t===-1?as.length-1:t===0?0:t-1}function Rh(e){let t=rc[Lr.indexOf(e.era)];if(!t)throw new Error("Unknown era: "+e.era);return new Je(e.year+t,e.month,e.day)}class WI extends Ft{fromJulianDay(t){let n=super.fromJulianDay(t),r=j2(n);return new Je(this,Lr[r],n.year-rc[r],n.month,n.day)}toJulianDay(t){return super.toJulianDay(Rh(t))}balanceDate(t){let n=Rh(t),r=j2(n);Lr[r]!==t.era&&(t.era=Lr[r],t.year=n.year-rc[r]),this.constrainDate(t)}constrainDate(t){let n=Lr.indexOf(t.era),r=VI[n];if(r!=null){let[i,a,s]=r,o=i-rc[n];t.year=Math.max(1,Math.min(o,t.year)),t.year===o&&(t.month=Math.min(a,t.month),t.month===a&&(t.day=Math.min(s,t.day)))}if(t.year===1&&n>=0){let[,i,a]=as[n];t.month=Math.max(i,t.month),t.month===i&&(t.day=Math.max(a,t.day))}}getEras(){return Lr}getYearsInEra(t){let n=Lr.indexOf(t.era),r=as[n],i=as[n+1];if(i==null)return 9999-r[0]+1;let a=i[0]-r[0];return(t.month<i[1]||t.month===i[1]&&t.day<i[2])&&a++,a}getDaysInMonth(t){return super.getDaysInMonth(Rh(t))}getMinimumMonthInYear(t){let n=z2(t);return n?n[1]:1}getMinimumDayInMonth(t){let n=z2(t);return n&&t.month===n[1]?n[2]:1}constructor(...t){super(...t),this.identifier="japanese"}}function z2(e){if(e.year===1){let t=Lr.indexOf(e.era);return as[t]}}const N8=-543;class UI extends Ft{fromJulianDay(t){let n=super.fromJulianDay(t),r=Bl(n.era,n.year);return new Je(this,r-N8,n.month,n.day)}toJulianDay(t){return super.toJulianDay(V2(t))}getEras(){return["BE"]}getDaysInMonth(t){return super.getDaysInMonth(V2(t))}balanceDate(){}constructor(...t){super(...t),this.identifier="buddhist"}}function V2(e){let[t,n]=Cf(e.year+N8);return new Je(t,n,e.month,e.day)}const Kc=1911;function j8(e){return e.era==="minguo"?e.year+Kc:1-e.year+Kc}function W2(e){let t=e-Kc;return t>0?["minguo",t]:["before_minguo",1-t]}class HI extends Ft{fromJulianDay(t){let n=super.fromJulianDay(t),r=Bl(n.era,n.year),[i,a]=W2(r);return new Je(this,i,a,n.month,n.day)}toJulianDay(t){return super.toJulianDay(U2(t))}getEras(){return["before_minguo","minguo"]}balanceDate(t){let[n,r]=W2(j8(t));t.era=n,t.year=r}isInverseEra(t){return t.era==="before_minguo"}getDaysInMonth(t){return super.getDaysInMonth(U2(t))}getYearsInEra(t){return t.era==="before_minguo"?9999:9999-Kc}constructor(...t){super(...t),this.identifier="roc"}}function U2(e){let[t,n]=Cf(j8(e));return new Je(t,n,e.month,e.day)}const H2=1948320,K2=[0,31,62,93,124,155,186,216,246,276,306,336];class KI{fromJulianDay(t){let n=t-H2,r=1+Math.floor((33*n+3)/12053),i=365*(r-1)+Math.floor((8*r+21)/33),a=n-i,s=a<216?Math.floor(a/31):Math.floor((a-6)/30),o=a-K2[s]+1;return new Je(this,r,s+1,o)}toJulianDay(t){let n=H2-1+365*(t.year-1)+Math.floor((8*t.year+21)/33);return n+=K2[t.month-1],n+=t.day,n}getMonthsInYear(){return 12}getDaysInMonth(t){return t.month<=6?31:t.month<=11||is(25*t.year+11,33)<8?30:29}getEras(){return["AP"]}getYearsInEra(){return 9377}constructor(){this.identifier="persian"}}const Mh=78,Y2=80;class YI extends Ft{fromJulianDay(t){let n=super.fromJulianDay(t),r=n.year-Mh,i=t-Vi(n.era,n.year,1,1),a;i<Y2?(r--,a=Hr(n.year-1)?31:30,i+=a+155+90+10):(a=Hr(n.year)?31:30,i-=Y2);let s,o;if(i<a)s=1,o=i+1;else{let l=i-a;l<155?(s=Math.floor(l/31)+2,o=l%31+1):(l-=155,s=Math.floor(l/30)+7,o=l%30+1)}return new Je(this,r,s,o)}toJulianDay(t){let n=t.year+Mh,[r,i]=Cf(n),a,s;return Hr(i)?(a=31,s=Vi(r,i,3,21)):(a=30,s=Vi(r,i,3,22)),t.month===1?s+t.day-1:(s+=a+Math.min(t.month-2,5)*31,t.month>=8&&(s+=(t.month-7)*30),s+=t.day-1,s)}getDaysInMonth(t){return t.month===1&&Hr(t.year+Mh)||t.month>=2&&t.month<=6?31:30}getYearsInEra(){return 9919}getEras(){return["saka"]}balanceDate(){}constructor(...t){super(...t),this.identifier="indian"}}const Yc=1948440,q2=1948439,pn=1300,Sa=1600,qI=460322;function qc(e,t,n,r){return r+Math.ceil(29.5*(n-1))+(t-1)*354+Math.floor((3+11*t)/30)+e-1}function z8(e,t,n){let r=Math.floor((30*(n-t)+10646)/10631),i=Math.min(12,Math.ceil((n-(29+qc(t,r,1,1)))/29.5)+1),a=n-qc(t,r,i,1)+1;return new Je(e,r,i,a)}function G2(e){return(14+11*e)%30<11}class m${fromJulianDay(t){return z8(this,Yc,t)}toJulianDay(t){return qc(Yc,t.year,t.month,t.day)}getDaysInMonth(t){let n=29+t.month%2;return t.month===12&&G2(t.year)&&n++,n}getMonthsInYear(){return 12}getDaysInYear(t){return G2(t.year)?355:354}getYearsInEra(){return 9665}getEras(){return["AH"]}constructor(){this.identifier="islamic-civil"}}class GI extends m${fromJulianDay(t){return z8(this,q2,t)}toJulianDay(t){return qc(q2,t.year,t.month,t.day)}constructor(...t){super(...t),this.identifier="islamic-tbla"}}const ZI="qgpUDckO1AbqBmwDrQpVBakGkgepC9QF2gpcBS0NlQZKB1QLagutBa4ETwoXBYsGpQbVCtYCWwmdBE0KJg2VDawFtgm6AlsKKwWVCsoG6Qr0AnYJtgJWCcoKpAvSC9kF3AJtCU0FpQpSC6ULtAW2CVcFlwJLBaMGUgdlC2oFqworBZUMSg2lDcoF1gpXCasESwmlClILagt1BXYCtwhbBFUFqQW0BdoJ3QRuAjYJqgpUDbIN1QXaAlsJqwRVCkkLZAtxC7QFtQpVCiUNkg7JDtQG6QprCasEkwpJDaQNsg25CroEWworBZUKKgtVC1wFvQQ9Ah0JlQpKC1oLbQW2AjsJmwRVBqkGVAdqC2wFrQpVBSkLkgupC9QF2gpaBasKlQVJB2QHqgu1BbYCVgpNDiULUgtqC60FrgIvCZcESwalBqwG1gpdBZ0ETQoWDZUNqgW1BdoCWwmtBJUFygbkBuoK9QS2AlYJqgpUC9IL2QXqAm0JrQSVCkoLpQuyBbUJ1gSXCkcFkwZJB1ULagVrCisFiwpGDaMNygXWCtsEawJLCaUKUgtpC3UFdgG3CFsCKwVlBbQF2gntBG0BtgimClINqQ3UBdoKWwmrBFMGKQdiB6kLsgW1ClUFJQuSDckO0gbpCmsFqwRVCikNVA2qDbUJugQ7CpsETQqqCtUK2gJdCV4ELgqaDFUNsga5BroEXQotBZUKUguoC7QLuQXaAloJSgukDdEO6AZqC20FNQWVBkoNqA3UDdoGWwWdAisGFQtKC5ULqgWuCi4JjwwnBZUGqgbWCl0FnQI=";let cg,ss;function ic(e){return qI+ss[e-pn]}function mo(e,t){let n=e-pn,r=1<<11-(t-1);return cg[n]&r?30:29}function Z2(e,t){let n=ic(e);for(let r=1;r<t;r++)n+=mo(e,r);return n}function X2(e){return ss[e+1-pn]-ss[e-pn]}class XI extends m${fromJulianDay(t){let n=t-Yc,r=ic(pn),i=ic(Sa);if(n<r||n>i)return super.fromJulianDay(t);{let a=pn-1,s=1,o=1;for(;o>0;){a++,o=n-ic(a)+1;let l=X2(a);if(o===l){s=12;break}else if(o<l){let u=mo(a,s);for(s=1;o>u;)o-=u,s++,u=mo(a,s);break}}return new Je(this,a,s,n-Z2(a,s)+1)}}toJulianDay(t){return t.year<pn||t.year>Sa?super.toJulianDay(t):Yc+Z2(t.year,t.month)+(t.day-1)}getDaysInMonth(t){return t.year<pn||t.year>Sa?super.getDaysInMonth(t):mo(t.year,t.month)}getDaysInYear(t){return t.year<pn||t.year>Sa?super.getDaysInYear(t):X2(t.year)}constructor(){if(super(),this.identifier="islamic-umalqura",cg||(cg=new Uint16Array(Uint8Array.from(atob(ZI),t=>t.charCodeAt(0)).buffer)),!ss){ss=new Uint32Array(Sa-pn+1);let t=0;for(let n=pn;n<=Sa;n++){ss[n-pn]=t;for(let r=1;r<=12;r++)t+=mo(n,r)}}}}const Q2=347997,V8=1080,W8=24*V8,QI=29,JI=12*V8+793,eL=QI*W8+JI;function Ii(e){return is(e*7+1,19)<7}function ac(e){let t=Math.floor((235*e-234)/19),n=12084+13753*t,r=t*29+Math.floor(n/25920);return is(3*(r+1),7)<3&&(r+=1),r}function tL(e){let t=ac(e-1),n=ac(e);return ac(e+1)-n===356?2:n-t===382?1:0}function Oo(e){return ac(e)+tL(e)}function U8(e){return Oo(e+1)-Oo(e)}function nL(e){let t=U8(e);switch(t>380&&(t-=30),t){case 353:return 0;case 354:return 1;case 355:return 2}}function mu(e,t){if(t>=6&&!Ii(e)&&t++,t===4||t===7||t===9||t===11||t===13)return 29;let n=nL(e);return t===2?n===2?30:29:t===3?n===0?29:30:t===6?Ii(e)?30:0:30}class rL{fromJulianDay(t){let n=t-Q2,r=n*W8/eL,i=Math.floor((19*r+234)/235)+1,a=Oo(i),s=Math.floor(n-a);for(;s<1;)i--,a=Oo(i),s=Math.floor(n-a);let o=1,l=0;for(;l<s;)l+=mu(i,o),o++;o--,l-=mu(i,o);let u=s-l;return new Je(this,i,o,u)}toJulianDay(t){let n=Oo(t.year);for(let r=1;r<t.month;r++)n+=mu(t.year,r);return n+t.day+Q2}getDaysInMonth(t){return mu(t.year,t.month)}getMonthsInYear(t){return Ii(t.year)?13:12}getDaysInYear(t){return U8(t.year)}getYearsInEra(){return 9999}getEras(){return["AM"]}balanceYearMonth(t,n){n.year!==t.year&&(Ii(n.year)&&!Ii(t.year)&&n.month>6?t.month--:!Ii(n.year)&&Ii(t.year)&&n.month>6&&t.month++)}constructor(){this.identifier="hebrew"}}const dg=1723856,J2=1824665,fg=5500;function Gc(e,t,n,r){return e+365*t+Math.floor(t/4)+30*(n-1)+r-1}function g$(e,t){let n=Math.floor(4*(t-e)/1461),r=1+Math.floor((t-Gc(e,n,1,1))/30),i=t+1-Gc(e,n,r,1);return[n,r,i]}function H8(e){return Math.floor(e%4/3)}function K8(e,t){return t%13!==0?30:H8(e)+5}class v${fromJulianDay(t){let[n,r,i]=g$(dg,t),a="AM";return n<=0&&(a="AA",n+=fg),new Je(this,a,n,r,i)}toJulianDay(t){let n=t.year;return t.era==="AA"&&(n-=fg),Gc(dg,n,t.month,t.day)}getDaysInMonth(t){return K8(t.year,t.month)}getMonthsInYear(){return 13}getDaysInYear(t){return 365+H8(t.year)}getYearsInEra(t){return t.era==="AA"?9999:9991}getEras(){return["AA","AM"]}constructor(){this.identifier="ethiopic"}}class iL extends v${fromJulianDay(t){let[n,r,i]=g$(dg,t);return n+=fg,new Je(this,"AA",n,r,i)}getEras(){return["AA"]}getYearsInEra(){return 9999}constructor(...t){super(...t),this.identifier="ethioaa"}}class aL extends v${fromJulianDay(t){let[n,r,i]=g$(J2,t),a="CE";return n<=0&&(a="BCE",n=1-n),new Je(this,a,n,r,i)}toJulianDay(t){let n=t.year;return t.era==="BCE"&&(n=1-n),Gc(J2,n,t.month,t.day)}getDaysInMonth(t){let n=t.year;return t.era==="BCE"&&(n=1-n),K8(n,t.month)}isInverseEra(t){return t.era==="BCE"}balanceDate(t){t.year<=0&&(t.era=t.era==="BCE"?"CE":"BCE",t.year=1-t.year)}getEras(){return["BCE","CE"]}getYearsInEra(t){return t.era==="BCE"?9999:9715}constructor(...t){super(...t),this.identifier="coptic"}}function Y8(e){switch(e){case"buddhist":return new UI;case"ethiopic":return new v$;case"ethioaa":return new iL;case"coptic":return new aL;case"hebrew":return new rL;case"indian":return new YI;case"islamic-civil":return new m$;case"islamic-tbla":return new GI;case"islamic-umalqura":return new XI;case"japanese":return new WI;case"persian":return new KI;case"roc":return new HI;case"gregory":default:return new Ft}}let Fh=new Map;class ii{format(t){return this.formatter.format(t)}formatToParts(t){return this.formatter.formatToParts(t)}formatRange(t,n){if(typeof this.formatter.formatRange=="function")return this.formatter.formatRange(t,n);if(n<t)throw new RangeError("End date must be >= start date");return`${this.formatter.format(t)} – ${this.formatter.format(n)}`}formatRangeToParts(t,n){if(typeof this.formatter.formatRangeToParts=="function")return this.formatter.formatRangeToParts(t,n);if(n<t)throw new RangeError("End date must be >= start date");let r=this.formatter.formatToParts(t),i=this.formatter.formatToParts(n);return[...r.map(a=>({...a,source:"startRange"})),{type:"literal",value:" – ",source:"shared"},...i.map(a=>({...a,source:"endRange"}))]}resolvedOptions(){let t=this.formatter.resolvedOptions();return lL()&&(this.resolvedHourCycle||(this.resolvedHourCycle=uL(t.locale,this.options)),t.hourCycle=this.resolvedHourCycle,t.hour12=this.resolvedHourCycle==="h11"||this.resolvedHourCycle==="h12"),t.calendar==="ethiopic-amete-alem"&&(t.calendar="ethioaa"),t}constructor(t,n={}){this.formatter=q8(t,n),this.options=n}}const sL={true:{ja:"h11"},false:{}};function q8(e,t={}){if(typeof t.hour12=="boolean"&&oL()){t={...t};let i=sL[String(t.hour12)][e.split("-")[0]],a=t.hour12?"h12":"h23";t.hourCycle=i??a,delete t.hour12}let n=e+(t?Object.entries(t).sort((i,a)=>i[0]<a[0]?-1:1).join():"");if(Fh.has(n))return Fh.get(n);let r=new Intl.DateTimeFormat(e,t);return Fh.set(n,r),r}let Ah=null;function oL(){return Ah==null&&(Ah=new Intl.DateTimeFormat("en-US",{hour:"numeric",hour12:!1}).format(new Date(2020,2,3,0))==="24"),Ah}let Oh=null;function lL(){return Oh==null&&(Oh=new Intl.DateTimeFormat("fr",{hour:"numeric",hour12:!1}).resolvedOptions().hourCycle==="h12"),Oh}function uL(e,t){if(!t.timeStyle&&!t.hour)return;e=e.replace(/(-u-)?-nu-[a-zA-Z0-9]+/,""),e+=(e.includes("-u-")?"":"-u")+"-nu-latn";let n=q8(e,{...t,timeZone:void 0}),r=parseInt(n.formatToParts(new Date(2020,2,3,0)).find(a=>a.type==="hour").value,10),i=parseInt(n.formatToParts(new Date(2020,2,3,23)).find(a=>a.type==="hour").value,10);if(r===0&&i===23)return"h23";if(r===24&&i===23)return"h24";if(r===0&&i===11)return"h11";if(r===12&&i===11)return"h12";throw new Error("Unexpected hour cycle result")}const he=typeof document<"u"?_.useLayoutEffect:()=>{};function pt(e){const t=y.useRef(null);return he(()=>{t.current=e},[e]),y.useCallback((...n)=>{const r=t.current;return r==null?void 0:r(...n)},[])}function G8(e){let[t,n]=y.useState(e),r=y.useRef(null),i=pt(()=>{if(!r.current)return;let s=r.current.next();if(s.done){r.current=null;return}t===s.value?i():n(s.value)});he(()=>{r.current&&i()});let a=pt(s=>{r.current=s(t),i()});return[t,a]}let cL=!!(typeof window<"u"&&window.document&&window.document.createElement),Zc=new Map;function Qn(e){let[t,n]=y.useState(e),r=y.useRef(null),i=eI(t),a=y.useCallback(s=>{r.current=s},[]);return cL&&Zc.set(i,a),he(()=>{let s=i;return()=>{Zc.delete(s)}},[i]),y.useEffect(()=>{let s=r.current;s&&(r.current=null,n(s))}),i}function dL(e,t){if(e===t)return e;let n=Zc.get(e);if(n)return n(t),t;let r=Zc.get(t);return r?(r(e),e):t}function Xc(e=[]){let t=Qn(),[n,r]=G8(t),i=y.useCallback(()=>{r(function*(){yield t,yield document.getElementById(t)?t:void 0})},[t,r]);return he(i,[t,i,...e]),n}function fl(...e){return(...t)=>{for(let n of e)typeof n=="function"&&n(...t)}}const ye=e=>{var t;return(t=e==null?void 0:e.ownerDocument)!==null&&t!==void 0?t:document},Fn=e=>e&&"window"in e&&e.window===e?e:ye(e).defaultView||window;function de(...e){let t={...e[0]};for(let n=1;n<e.length;n++){let r=e[n];for(let i in r){let a=t[i],s=r[i];typeof a=="function"&&typeof s=="function"&&i[0]==="o"&&i[1]==="n"&&i.charCodeAt(2)>=65&&i.charCodeAt(2)<=90?t[i]=fl(a,s):(i==="className"||i==="UNSAFE_className")&&typeof a=="string"&&typeof s=="string"?t[i]=Ef(a,s):i==="id"&&a&&s?t.id=dL(a,s):t[i]=s!==void 0?s:a}}return t}function fL(...e){return e.length===1?e[0]:t=>{for(let n of e)typeof n=="function"?n(t):n!=null&&(n.current=t)}}const hL=new Set(["id"]),pL=new Set(["aria-label","aria-labelledby","aria-describedby","aria-details"]),mL=new Set(["href","hrefLang","target","rel","download","ping","referrerPolicy"]),gL=/^(data-.*)$/;function Xt(e,t={}){let{labelable:n,isLink:r,propNames:i}=t,a={};for(const s in e)Object.prototype.hasOwnProperty.call(e,s)&&(hL.has(s)||n&&pL.has(s)||r&&mL.has(s)||i!=null&&i.has(s)||gL.test(s))&&(a[s]=e[s]);return a}function Kr(e){if(vL())e.focus({preventScroll:!0});else{let t=bL(e);e.focus(),yL(t)}}let gu=null;function vL(){if(gu==null){gu=!1;try{document.createElement("div").focus({get preventScroll(){return gu=!0,!0}})}catch{}}return gu}function bL(e){let t=e.parentNode,n=[],r=document.scrollingElement||document.documentElement;for(;t instanceof HTMLElement&&t!==r;)(t.offsetHeight<t.scrollHeight||t.offsetWidth<t.scrollWidth)&&n.push({element:t,scrollTop:t.scrollTop,scrollLeft:t.scrollLeft}),t=t.parentNode;return r instanceof HTMLElement&&n.push({element:r,scrollTop:r.scrollTop,scrollLeft:r.scrollLeft}),n}function yL(e){for(let{element:t,scrollTop:n,scrollLeft:r}of e)t.scrollTop=n,t.scrollLeft=r}function Rf(e){var t;return typeof window>"u"||window.navigator==null?!1:((t=window.navigator.userAgentData)===null||t===void 0?void 0:t.brands.some(n=>e.test(n.brand)))||e.test(window.navigator.userAgent)}function b$(e){var t;return typeof window<"u"&&window.navigator!=null?e.test(((t=window.navigator.userAgentData)===null||t===void 0?void 0:t.platform)||window.navigator.platform):!1}function Ds(){return b$(/^Mac/i)}function $L(){return b$(/^iPhone/i)}function Z8(){return b$(/^iPad/i)||Ds()&&navigator.maxTouchPoints>1}function Mf(){return $L()||Z8()}function X8(){return Rf(/AppleWebKit/i)&&!xL()}function xL(){return Rf(/Chrome/i)}function Q8(){return Rf(/Android/i)}function wL(){return Rf(/Firefox/i)}const DL=y.createContext({isNative:!0,open:SL,useHref:e=>e});function _L(e){let{children:t,navigate:n,useHref:r}=e,i=y.useMemo(()=>({isNative:!1,open:(a,s,o,l)=>{J8(a,u=>{EL(u,s)?n(o,l):ia(u,s)})},useHref:r||(a=>a)}),[n,r]);return _.createElement(DL.Provider,{value:i},t)}function EL(e,t){let n=e.getAttribute("target");return(!n||n==="_self")&&e.origin===location.origin&&!e.hasAttribute("download")&&!t.metaKey&&!t.ctrlKey&&!t.altKey&&!t.shiftKey}function ia(e,t,n=!0){var r,i;let{metaKey:a,ctrlKey:s,altKey:o,shiftKey:l}=t;wL()&&(!((i=window.event)===null||i===void 0||(r=i.type)===null||r===void 0)&&r.startsWith("key"))&&e.target==="_blank"&&(Ds()?a=!0:s=!0);let u=X8()&&Ds()&&!Z8()?new KeyboardEvent("keydown",{keyIdentifier:"Enter",metaKey:a,ctrlKey:s,altKey:o,shiftKey:l}):new MouseEvent("click",{metaKey:a,ctrlKey:s,altKey:o,shiftKey:l,bubbles:!0,cancelable:!0});ia.isOpening=n,Kr(e),e.dispatchEvent(u),ia.isOpening=!1}ia.isOpening=!1;function J8(e,t){if(e instanceof HTMLAnchorElement)t(e);else if(e.hasAttribute("data-href")){let n=document.createElement("a");n.href=e.getAttribute("data-href"),e.hasAttribute("data-target")&&(n.target=e.getAttribute("data-target")),e.hasAttribute("data-rel")&&(n.rel=e.getAttribute("data-rel")),e.hasAttribute("data-download")&&(n.download=e.getAttribute("data-download")),e.hasAttribute("data-ping")&&(n.ping=e.getAttribute("data-ping")),e.hasAttribute("data-referrer-policy")&&(n.referrerPolicy=e.getAttribute("data-referrer-policy")),e.appendChild(n),t(n),e.removeChild(n)}}function SL(e,t){J8(e,n=>ia(n,t))}let Aa=new Map,hg=new Set;function e5(){if(typeof window>"u")return;function e(r){return"propertyName"in r}let t=r=>{if(!e(r)||!r.target)return;let i=Aa.get(r.target);i||(i=new Set,Aa.set(r.target,i),r.target.addEventListener("transitioncancel",n,{once:!0})),i.add(r.propertyName)},n=r=>{if(!e(r)||!r.target)return;let i=Aa.get(r.target);if(i&&(i.delete(r.propertyName),i.size===0&&(r.target.removeEventListener("transitioncancel",n),Aa.delete(r.target)),Aa.size===0)){for(let a of hg)a();hg.clear()}};document.body.addEventListener("transitionrun",t),document.body.addEventListener("transitionend",n)}typeof document<"u"&&(document.readyState!=="loading"?e5():document.addEventListener("DOMContentLoaded",e5));function eE(e){requestAnimationFrame(()=>{Aa.size===0?e():hg.add(e)})}function tE(){let e=y.useRef(new Map),t=y.useCallback((i,a,s,o)=>{let l=o!=null&&o.once?(...u)=>{e.current.delete(s),s(...u)}:s;e.current.set(s,{type:a,eventTarget:i,fn:l,options:o}),i.addEventListener(a,s,o)},[]),n=y.useCallback((i,a,s,o)=>{var l;let u=((l=e.current.get(s))===null||l===void 0?void 0:l.fn)||s;i.removeEventListener(a,u,o),e.current.delete(s)},[]),r=y.useCallback(()=>{e.current.forEach((i,a)=>{n(i.eventTarget,i.type,a,i.options)})},[n]);return y.useEffect(()=>r,[r]),{addGlobalListener:t,removeGlobalListener:n,removeAllGlobalListeners:r}}function jl(e,t){let{id:n,"aria-label":r,"aria-labelledby":i}=e;return n=Qn(n),i&&r?i=[...new Set([n,...i.trim().split(/\s+/)])].join(" "):i&&(i=i.trim().split(/\s+/).join(" ")),!r&&!i&&t&&(r=t),{id:n,"aria-label":r,"aria-labelledby":i}}function CL(e){const t=y.useRef(null);return y.useMemo(()=>({get current(){return t.current},set current(n){t.current=n,typeof e=="function"?e(n):e&&(e.current=n)}}),[e])}function t5(e,t){const n=y.useRef(!0),r=y.useRef(null);y.useEffect(()=>(n.current=!0,()=>{n.current=!1}),[]),y.useEffect(()=>{n.current?n.current=!1:(!r.current||t.some((i,a)=>!Object.is(i,r[a])))&&e(),r.current=t},t)}function kL(){return typeof window.ResizeObserver<"u"}function nE(e){const{ref:t,onResize:n}=e;y.useEffect(()=>{let r=t==null?void 0:t.current;if(r)if(kL()){const i=new window.ResizeObserver(a=>{a.length&&n()});return i.observe(r),()=>{r&&i.unobserve(r)}}else return window.addEventListener("resize",n,!1),()=>{window.removeEventListener("resize",n,!1)}},[n,t])}function y$(e,t){he(()=>{if(e&&e.ref&&t)return e.ref.current=t.current,()=>{e.ref&&(e.ref.current=null)}})}function pg(e,t){let n=window.getComputedStyle(e),r=/(auto|scroll)/.test(n.overflow+n.overflowX+n.overflowY);return r&&t&&(r=e.scrollHeight!==e.clientHeight||e.scrollWidth!==e.clientWidth),r}function Ff(e,t){let n=e;for(pg(n,t)&&(n=n.parentElement);n&&!pg(n,t);)n=n.parentElement;return n||document.scrollingElement||document.documentElement}function PL(e,t){const n=[];for(;e&&e!==document.documentElement;)pg(e,t)&&n.push(e),e=e.parentElement;return n}let mn=typeof document<"u"&&window.visualViewport;function rE(){let e=pa(),[t,n]=y.useState(()=>e?{width:0,height:0}:n5());return y.useEffect(()=>{let r=()=>{n(i=>{let a=n5();return a.width===i.width&&a.height===i.height?i:a})};return mn?mn.addEventListener("resize",r):window.addEventListener("resize",r),()=>{mn?mn.removeEventListener("resize",r):window.removeEventListener("resize",r)}},[]),t}function n5(){return{width:mn&&(mn==null?void 0:mn.width)||window.innerWidth,height:mn&&(mn==null?void 0:mn.height)||window.innerHeight}}let TL=0;const Bh=new Map;function $$(e){let[t,n]=y.useState();return he(()=>{if(!e)return;let r=Bh.get(e);if(r)n(r.element.id);else{let i=`react-aria-description-${TL++}`;n(i);let a=document.createElement("div");a.id=i,a.style.display="none",a.textContent=e,document.body.appendChild(a),r={refCount:0,element:a},Bh.set(e,r)}return r.refCount++,()=>{r&&--r.refCount===0&&(r.element.remove(),Bh.delete(e))}},[e]),{"aria-describedby":e?t:void 0}}function os(e,t,n,r){let i=pt(n),a=n==null;y.useEffect(()=>{if(a||!e.current)return;let s=e.current;return s.addEventListener(t,i,r),()=>{s.removeEventListener(t,i,r)}},[e,t,r,a,i])}function RL(e,t){let n=r5(e,t,"left"),r=r5(e,t,"top"),i=t.offsetWidth,a=t.offsetHeight,s=e.scrollLeft,o=e.scrollTop,{borderTopWidth:l,borderLeftWidth:u}=getComputedStyle(e),c=e.scrollLeft+parseInt(u,10),d=e.scrollTop+parseInt(l,10),f=c+e.clientWidth,h=d+e.clientHeight;n<=s?s=n-parseInt(u,10):n+i>f&&(s+=n+i-f),r<=d?o=r-parseInt(l,10):r+a>h&&(o+=r+a-h),e.scrollLeft=s,e.scrollTop=o}function r5(e,t,n){const r=n==="left"?"offsetLeft":"offsetTop";let i=0;for(;t.offsetParent&&(i+=t[r],t.offsetParent!==e);){if(t.offsetParent.contains(e)){i-=e[r];break}t=t.offsetParent}return i}function iE(e,t){if(document.contains(e)){let s=document.scrollingElement||document.documentElement;if(window.getComputedStyle(s).overflow==="hidden"){let l=PL(e);for(let u of l)RL(u,e)}else{var n;let{left:l,top:u}=e.getBoundingClientRect();e==null||(n=e.scrollIntoView)===null||n===void 0||n.call(e,{block:"nearest"});let{left:c,top:d}=e.getBoundingClientRect();if(Math.abs(l-c)>1||Math.abs(u-d)>1){var r,i,a;t==null||(i=t.containingElement)===null||i===void 0||(r=i.scrollIntoView)===null||r===void 0||r.call(i,{block:"center",inline:"center"}),(a=e.scrollIntoView)===null||a===void 0||a.call(e,{block:"nearest"})}}}}function mg(e){return e.mozInputSource===0&&e.isTrusted?!0:Q8()&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function ML(e){return!Q8()&&e.width===0&&e.height===0||e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType==="mouse"}function aE(e,t){let n=y.useRef(null);return e&&n.current&&t(e,n.current)&&(e=n.current),n.current=e,e}function FL(e,t,n){let r=y.useRef(t),i=pt(()=>{n&&n(r.current)});y.useEffect(()=>{var a;let s=e==null||(a=e.current)===null||a===void 0?void 0:a.form;return s==null||s.addEventListener("reset",i),()=>{s==null||s.removeEventListener("reset",i)}},[e,i])}function aa(e,t,n){let[r,i]=y.useState(e||t),a=y.useRef(e!==void 0),s=e!==void 0;y.useEffect(()=>{let u=a.current;u!==s&&console.warn(`WARN: A component changed from ${u?"controlled":"uncontrolled"} to ${s?"controlled":"uncontrolled"}.`),a.current=s},[s]);let o=s?e:r,l=y.useCallback((u,...c)=>{let d=(f,...h)=>{n&&(Object.is(o,f)||n(f,...h)),s||(o=f)};typeof u=="function"?(console.warn("We can not support a function callback. See Github Issues for details https://github.com/adobe/react-spectrum/issues/2320"),i((h,...p)=>{let g=u(s?o:h,...p);return d(g,...c),s?h:g})):(s||i(u),d(u,...c))},[s,o,n]);return[o,l]}function gg(e,t=-1/0,n=1/0){return Math.min(Math.max(e,t),n)}function xn(e){e=aE(e??{},AL);let{locale:t}=Qe();return y.useMemo(()=>new ii(t,e),[t,e])}function AL(e,t){if(e===t)return!0;let n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let i of n)if(t[i]!==e[i])return!1;return!0}let Ih=new Map,vg=!1;try{vg=new Intl.NumberFormat("de-DE",{signDisplay:"exceptZero"}).resolvedOptions().signDisplay==="exceptZero"}catch{}let Qc=!1;try{Qc=new Intl.NumberFormat("de-DE",{style:"unit",unit:"degree"}).resolvedOptions().style==="unit"}catch{}const sE={degree:{narrow:{default:"°","ja-JP":" 度","zh-TW":"度","sl-SI":" °"}}};class OL{format(t){let n="";if(!vg&&this.options.signDisplay!=null?n=IL(this.numberFormatter,this.options.signDisplay,t):n=this.numberFormatter.format(t),this.options.style==="unit"&&!Qc){var r;let{unit:i,unitDisplay:a="short",locale:s}=this.resolvedOptions();if(!i)return n;let o=(r=sE[i])===null||r===void 0?void 0:r[a];n+=o[s]||o.default}return n}formatToParts(t){return this.numberFormatter.formatToParts(t)}formatRange(t,n){if(typeof this.numberFormatter.formatRange=="function")return this.numberFormatter.formatRange(t,n);if(n<t)throw new RangeError("End date must be >= start date");return`${this.format(t)} – ${this.format(n)}`}formatRangeToParts(t,n){if(typeof this.numberFormatter.formatRangeToParts=="function")return this.numberFormatter.formatRangeToParts(t,n);if(n<t)throw new RangeError("End date must be >= start date");let r=this.numberFormatter.formatToParts(t),i=this.numberFormatter.formatToParts(n);return[...r.map(a=>({...a,source:"startRange"})),{type:"literal",value:" – ",source:"shared"},...i.map(a=>({...a,source:"endRange"}))]}resolvedOptions(){let t=this.numberFormatter.resolvedOptions();return!vg&&this.options.signDisplay!=null&&(t={...t,signDisplay:this.options.signDisplay}),!Qc&&this.options.style==="unit"&&(t={...t,style:"unit",unit:this.options.unit,unitDisplay:this.options.unitDisplay}),t}constructor(t,n={}){this.numberFormatter=BL(t,n),this.options=n}}function BL(e,t={}){let{numberingSystem:n}=t;if(n&&e.includes("-nu-")&&(e.includes("-u-")||(e+="-u-"),e+=`-nu-${n}`),t.style==="unit"&&!Qc){var r;let{unit:s,unitDisplay:o="short"}=t;if(!s)throw new Error('unit option must be provided with style: "unit"');if(!(!((r=sE[s])===null||r===void 0)&&r[o]))throw new Error(`Unsupported unit ${s} with unitDisplay = ${o}`);t={...t,style:"decimal"}}let i=e+(t?Object.entries(t).sort((s,o)=>s[0]<o[0]?-1:1).join():"");if(Ih.has(i))return Ih.get(i);let a=new Intl.NumberFormat(e,t);return Ih.set(i,a),a}function IL(e,t,n){if(t==="auto")return e.format(n);if(t==="never")return e.format(Math.abs(n));{let r=!1;if(t==="always"?r=n>0||Object.is(n,0):t==="exceptZero"&&(Object.is(n,-0)||Object.is(n,0)?n=Math.abs(n):r=n>0),r){let i=e.format(-n),a=e.format(n),s=i.replace(a,"").replace(/\u200e|\u061C/,"");return[...s].length!==1&&console.warn("@react-aria/i18n polyfill for NumberFormat signDisplay: Unsupported case"),i.replace(a,"!!!").replace(s,"+").replace("!!!",a)}else return e.format(n)}}const LL=new RegExp("^.*\\(.*\\).*$"),NL=["latn","arab","hanidec"];class oE{parse(t){return Lh(this.locale,this.options,t).parse(t)}isValidPartialNumber(t,n,r){return Lh(this.locale,this.options,t).isValidPartialNumber(t,n,r)}getNumberingSystem(t){return Lh(this.locale,this.options,t).options.numberingSystem}constructor(t,n={}){this.locale=t,this.options=n}}const i5=new Map;function Lh(e,t,n){let r=a5(e,t);if(!e.includes("-nu-")&&!r.isValidPartialNumber(n)){for(let i of NL)if(i!==r.options.numberingSystem){let a=a5(e+(e.includes("-u-")?"-nu-":"-u-nu-")+i,t);if(a.isValidPartialNumber(n))return a}}return r}function a5(e,t){let n=e+(t?Object.entries(t).sort((i,a)=>i[0]<a[0]?-1:1).join():""),r=i5.get(n);return r||(r=new jL(e,t),i5.set(n,r)),r}class jL{parse(t){let n=this.sanitize(t);if(this.symbols.group&&(n=vu(n,this.symbols.group,"")),this.symbols.decimal&&(n=n.replace(this.symbols.decimal,".")),this.symbols.minusSign&&(n=n.replace(this.symbols.minusSign,"-")),n=n.replace(this.symbols.numeral,this.symbols.index),this.options.style==="percent"){let s=n.indexOf("-");n=n.replace("-","");let o=n.indexOf(".");o===-1&&(o=n.length),n=n.replace(".",""),o-2===0?n=`0.${n}`:o-2===-1?n=`0.0${n}`:o-2===-2?n="0.00":n=`${n.slice(0,o-2)}.${n.slice(o-2)}`,s>-1&&(n=`-${n}`)}let r=n?+n:NaN;if(isNaN(r))return NaN;if(this.options.style==="percent"){var i,a;let s={...this.options,style:"decimal",minimumFractionDigits:Math.min(((i=this.options.minimumFractionDigits)!==null&&i!==void 0?i:0)+2,20),maximumFractionDigits:Math.min(((a=this.options.maximumFractionDigits)!==null&&a!==void 0?a:0)+2,20)};return new oE(this.locale,s).parse(new OL(this.locale,s).format(r))}return this.options.currencySign==="accounting"&&LL.test(t)&&(r=-1*r),r}sanitize(t){return t=t.replace(this.symbols.literals,""),this.symbols.minusSign&&(t=t.replace("-",this.symbols.minusSign)),this.options.numberingSystem==="arab"&&(this.symbols.decimal&&(t=t.replace(",",this.symbols.decimal),t=t.replace("،",this.symbols.decimal)),this.symbols.group&&(t=vu(t,".",this.symbols.group))),this.options.locale==="fr-FR"&&(t=vu(t,"."," ")),t}isValidPartialNumber(t,n=-1/0,r=1/0){return t=this.sanitize(t),this.symbols.minusSign&&t.startsWith(this.symbols.minusSign)&&n<0?t=t.slice(this.symbols.minusSign.length):this.symbols.plusSign&&t.startsWith(this.symbols.plusSign)&&r>0&&(t=t.slice(this.symbols.plusSign.length)),this.symbols.group&&t.startsWith(this.symbols.group)||this.symbols.decimal&&t.indexOf(this.symbols.decimal)>-1&&this.options.maximumFractionDigits===0?!1:(this.symbols.group&&(t=vu(t,this.symbols.group,"")),t=t.replace(this.symbols.numeral,""),this.symbols.decimal&&(t=t.replace(this.symbols.decimal,"")),t.length===0)}constructor(t,n={}){this.locale=t,this.formatter=new Intl.NumberFormat(t,n),this.options=this.formatter.resolvedOptions(),this.symbols=VL(t,this.formatter,this.options,n);var r,i;this.options.style==="percent"&&(((r=this.options.minimumFractionDigits)!==null&&r!==void 0?r:0)>18||((i=this.options.maximumFractionDigits)!==null&&i!==void 0?i:0)>18)&&console.warn("NumberParser cannot handle percentages with greater than 18 decimal places, please reduce the number in your options.")}}const s5=new Set(["decimal","fraction","integer","minusSign","plusSign","group"]),zL=[0,4,2,1,11,20,3,7,100,21,.1,1.1];function VL(e,t,n,r){var i,a,s,o;let l=new Intl.NumberFormat(e,{...n,minimumSignificantDigits:1,maximumSignificantDigits:21}),u=l.formatToParts(-10000.111),c=l.formatToParts(10000.111),d=zL.map(P=>l.formatToParts(P));var f;let h=(f=(i=u.find(P=>P.type==="minusSign"))===null||i===void 0?void 0:i.value)!==null&&f!==void 0?f:"-",p=(a=c.find(P=>P.type==="plusSign"))===null||a===void 0?void 0:a.value;!p&&((r==null?void 0:r.signDisplay)==="exceptZero"||(r==null?void 0:r.signDisplay)==="always")&&(p="+");let b=(s=new Intl.NumberFormat(e,{...n,minimumFractionDigits:2,maximumFractionDigits:2}).formatToParts(.001).find(P=>P.type==="decimal"))===null||s===void 0?void 0:s.value,v=(o=u.find(P=>P.type==="group"))===null||o===void 0?void 0:o.value,m=u.filter(P=>!s5.has(P.type)).map(P=>o5(P.value)),$=d.flatMap(P=>P.filter(E=>!s5.has(E.type)).map(E=>o5(E.value))),w=[...new Set([...m,...$])].sort((P,E)=>E.length-P.length),D=w.length===0?new RegExp("[\\p{White_Space}]","gu"):new RegExp(`${w.join("|")}|[\\p{White_Space}]`,"gu"),S=[...new Intl.NumberFormat(n.locale,{useGrouping:!1}).format(9876543210)].reverse(),k=new Map(S.map((P,E)=>[P,E])),x=new RegExp(`[${S.join("")}]`,"g");return{minusSign:h,plusSign:p,decimal:b,group:v,literals:D,numeral:x,index:P=>String(k.get(P))}}function vu(e,t,n){return e.replaceAll?e.replaceAll(t,n):e.split(t).join(n)}function o5(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}let Nh=new Map;function WL(e){let{locale:t}=Qe(),n=t+(e?Object.entries(e).sort((i,a)=>i[0]<a[0]?-1:1).join():"");if(Nh.has(n))return Nh.get(n);let r=new Intl.Collator(t,e);return Nh.set(n,r),r}function UL(e){let t=WL({usage:"search",...e}),n=y.useCallback((a,s)=>s.length===0?!0:(a=a.normalize("NFC"),s=s.normalize("NFC"),t.compare(a.slice(0,s.length),s)===0),[t]),r=y.useCallback((a,s)=>s.length===0?!0:(a=a.normalize("NFC"),s=s.normalize("NFC"),t.compare(a.slice(-s.length),s)===0),[t]),i=y.useCallback((a,s)=>{if(s.length===0)return!0;a=a.normalize("NFC"),s=s.normalize("NFC");let o=0,l=s.length;for(;o+l<=a.length;o++){let u=a.slice(o,o+l);if(t.compare(s,u)===0)return!0}return!1},[t]);return y.useMemo(()=>({startsWith:n,endsWith:r,contains:i}),[n,r,i])}const Af={margin:["margin",le],marginStart:[Vt("marginLeft","marginRight"),le],marginEnd:[Vt("marginRight","marginLeft"),le],marginTop:["marginTop",le],marginBottom:["marginBottom",le],marginX:[["marginLeft","marginRight"],le],marginY:[["marginTop","marginBottom"],le],width:["width",le],height:["height",le],minWidth:["minWidth",le],minHeight:["minHeight",le],maxWidth:["maxWidth",le],maxHeight:["maxHeight",le],isHidden:["display",GL],alignSelf:["alignSelf",tt],justifySelf:["justifySelf",tt],position:["position",zh],zIndex:["zIndex",zh],top:["top",le],bottom:["bottom",le],start:[Vt("left","right"),le],end:[Vt("right","left"),le],left:["left",le],right:["right",le],order:["order",zh],flex:["flex",ZL],flexGrow:["flexGrow",tt],flexShrink:["flexShrink",tt],flexBasis:["flexBasis",tt],gridArea:["gridArea",tt],gridColumn:["gridColumn",tt],gridColumnEnd:["gridColumnEnd",tt],gridColumnStart:["gridColumnStart",tt],gridRow:["gridRow",tt],gridRowEnd:["gridRowEnd",tt],gridRowStart:["gridRowStart",tt]};({...Af,borderStartWidth:Vt("borderLeftWidth","borderRightWidth"),borderEndWidth:Vt("borderRightWidth","borderLeftWidth"),borderStartColor:Vt("borderLeftColor","borderRightColor"),borderEndColor:Vt("borderRightColor","borderLeftColor"),borderTopStartRadius:Vt("borderTopLeftRadius","borderTopRightRadius"),borderTopEndRadius:Vt("borderTopRightRadius","borderTopLeftRadius"),borderBottomStartRadius:Vt("borderBottomLeftRadius","borderBottomRightRadius"),borderBottomEndRadius:Vt("borderBottomRightRadius","borderBottomLeftRadius"),paddingStart:Vt("paddingLeft","paddingRight"),paddingEnd:Vt("paddingRight","paddingLeft")});const l5={borderWidth:"borderStyle",borderLeftWidth:"borderLeftStyle",borderRightWidth:"borderRightStyle",borderTopWidth:"borderTopStyle",borderBottomWidth:"borderBottomStyle"};function Vt(e,t){return n=>n==="rtl"?t:e}const HL=/(%|px|em|rem|vw|vh|auto|cm|mm|in|pt|pc|ex|ch|rem|vmin|vmax|fr)$/,KL=/^\s*\w+\(/,YL=/(static-)?size-\d+|single-line-(height|width)/g;function le(e){if(typeof e=="number")return e+"px";if(e)return HL.test(e)?e:KL.test(e)?e.replace(YL,"var(--spectrum-global-dimension-$&, var(--spectrum-alias-$&))"):`var(--spectrum-global-dimension-${e}, var(--spectrum-alias-${e}))`}function jh(e,t){return e=x$(e,t),le(e)}function lE(e,t="default",n=5){return n>5?`var(--spectrum-${e}, var(--spectrum-semantic-${e}-color-${t}))`:`var(--spectrum-legacy-color-${e}, var(--spectrum-global-color-${e}, var(--spectrum-semantic-${e}-color-${t})))`}function qL(e,t=5){if(e)return`var(--spectrum-alias-background-color-${e}, ${lE(e,"background",t)})`}function Jn(e,t=5){if(e)return e==="default"?"var(--spectrum-alias-border-color)":`var(--spectrum-alias-border-color-${e}, ${lE(e,"border",t)})`}function er(e){return e&&e!=="none"?`var(--spectrum-alias-border-size-${e})`:"0"}function tr(e){if(e)return`var(--spectrum-alias-border-radius-${e})`}function GL(e){return e?"none":void 0}function zh(e){return e}function ZL(e){return typeof e=="boolean"?e?"1":void 0:""+e}function XL(e,t,n,r){let i={};for(let a in e){let s=t[a];if(!s||e[a]==null)continue;let[o,l]=s;typeof o=="function"&&(o=o(n));let u=x$(e[a],r),c=l(u,e.colorVersion);if(Array.isArray(o))for(let d of o)i[d]=c;else i[o]=c}for(let a in l5)i[a]&&(i[l5[a]]="solid",i.boxSizing="border-box");return i}function st(e,t=Af,n={}){let{UNSAFE_className:r,UNSAFE_style:i,...a}=e,s=p8(),{direction:o}=Qe(),{matchedBreakpoints:l=(s==null?void 0:s.matchedBreakpoints)||["base"]}=n,u=XL(e,t,o,l),c={...i,...u};a.className&&console.warn("The className prop is unsafe and is unsupported in React Spectrum v3. Please use style props with Spectrum variables, or UNSAFE_className if you absolutely must do something custom. Note that this may break in future versions due to DOM structure changes."),a.style&&console.warn("The style prop is unsafe and is unsupported in React Spectrum v3. Please use style props with Spectrum variables, or UNSAFE_style if you absolutely must do something custom. Note that this may break in future versions due to DOM structure changes.");let d={style:c,className:r};return x$(e.isHidden,l)&&(d.hidden=!0),{styleProps:d}}function tt(e){return e}function x$(e,t){if(e&&typeof e=="object"&&!Array.isArray(e)){for(let n=0;n<t.length;n++){let r=t[n];if(e[r]!=null)return e[r]}return e.base}return e}let Jc=_.createContext(null);function ci(e,t){let n=e.slot||t,{[n]:r={}}=y.useContext(Jc)||{};return de(e,de(r,{id:e.id}))}function Of(e){let t=y.useContext(Jc)||{},{slots:n={},children:r}=e,i=y.useMemo(()=>Object.keys(t).concat(Object.keys(n)).reduce((a,s)=>({...a,[s]:de(t[s]||{},n[s]||{})}),{}),[t,n]);return _.createElement(Jc.Provider,{value:i},r)}function uE(e){let{children:t,...n}=e,r=t;return _.Children.toArray(t).length<=1&&typeof t=="function"&&(r=_.cloneElement(_.Children.only(t),n)),_.createElement(Jc.Provider,{value:{}},r)}function bu(e,t){let[n,r]=y.useState(!0);return he(()=>{r(!!(t.current&&t.current.querySelector(e)))},[r,e,t]),n}const QL=700;function JL(){return pa()||typeof window>"u"?!1:window.screen.width<=QL}let qa="default",bg="",sc=new WeakMap;function u5(e){if(Mf()){if(qa==="default"){const t=ye(e);bg=t.documentElement.style.webkitUserSelect,t.documentElement.style.webkitUserSelect="none"}qa="disabled"}else(e instanceof HTMLElement||e instanceof SVGElement)&&(sc.set(e,e.style.userSelect),e.style.userSelect="none")}function yu(e){if(Mf()){if(qa!=="disabled")return;qa="restoring",setTimeout(()=>{eE(()=>{if(qa==="restoring"){const t=ye(e);t.documentElement.style.webkitUserSelect==="none"&&(t.documentElement.style.webkitUserSelect=bg||""),bg="",qa="default"}})},300)}else if((e instanceof HTMLElement||e instanceof SVGElement)&&e&&sc.has(e)){let t=sc.get(e);e.style.userSelect==="none"&&(e.style.userSelect=t),e.getAttribute("style")===""&&e.removeAttribute("style"),sc.delete(e)}}const hl=_.createContext({register:()=>{}});hl.displayName="PressResponderContext";function eN(e,t){return t.get?t.get.call(e):t.value}function cE(e,t,n){if(!t.has(e))throw new TypeError("attempted to "+n+" private field on non-instance");return t.get(e)}function tN(e,t){var n=cE(e,t,"get");return eN(e,n)}function nN(e,t,n){if(t.set)t.set.call(e,n);else{if(!t.writable)throw new TypeError("attempted to set read only private field");t.value=n}}function c5(e,t,n){var r=cE(e,t,"set");return nN(e,r,n),n}function rN(e){let t=y.useContext(hl);if(t){let{register:n,...r}=t;e=de(r,e),n()}return y$(t,e.ref),e}var $u=new WeakMap;class xu{continuePropagation(){c5(this,$u,!1)}get shouldStopPropagation(){return tN(this,$u)}constructor(t,n,r){Ll(this,$u,{writable:!0,value:void 0}),c5(this,$u,!0),this.type=t,this.pointerType=n,this.target=r.currentTarget,this.shiftKey=r.shiftKey,this.metaKey=r.metaKey,this.ctrlKey=r.ctrlKey,this.altKey=r.altKey}}const d5=Symbol("linkClicked");function w$(e){let{onPress:t,onPressChange:n,onPressStart:r,onPressEnd:i,onPressUp:a,isDisabled:s,isPressed:o,preventFocusOnPress:l,shouldCancelOnPointerExit:u,allowTextSelectionOnPress:c,ref:d,...f}=rN(e),[h,p]=y.useState(!1),g=y.useRef({isPressed:!1,ignoreEmulatedMouseEvents:!1,ignoreClickAfterPress:!1,didFirePressStart:!1,isTriggeringEvent:!1,activePointerId:null,target:null,isOverTarget:!1,pointerType:null}),{addGlobalListener:b,removeAllGlobalListeners:v}=tE(),m=pt((x,T)=>{let P=g.current;if(s||P.didFirePressStart)return!1;let E=!0;if(P.isTriggeringEvent=!0,r){let A=new xu("pressstart",T,x);r(A),E=A.shouldStopPropagation}return n&&n(!0),P.isTriggeringEvent=!1,P.didFirePressStart=!0,p(!0),E}),$=pt((x,T,P=!0)=>{let E=g.current;if(!E.didFirePressStart)return!1;E.ignoreClickAfterPress=!0,E.didFirePressStart=!1,E.isTriggeringEvent=!0;let A=!0;if(i){let R=new xu("pressend",T,x);i(R),A=R.shouldStopPropagation}if(n&&n(!1),p(!1),t&&P&&!s){let R=new xu("press",T,x);t(R),A&&(A=R.shouldStopPropagation)}return E.isTriggeringEvent=!1,A}),w=pt((x,T)=>{let P=g.current;if(s)return!1;if(a){P.isTriggeringEvent=!0;let E=new xu("pressup",T,x);return a(E),P.isTriggeringEvent=!1,E.shouldStopPropagation}return!0}),D=pt(x=>{let T=g.current;T.isPressed&&T.target&&(T.isOverTarget&&T.pointerType!=null&&$(nr(T.target,x),T.pointerType,!1),T.isPressed=!1,T.isOverTarget=!1,T.activePointerId=null,T.pointerType=null,v(),c||yu(T.target))}),S=pt(x=>{u&&D(x)}),k=y.useMemo(()=>{let x=g.current,T={onKeyDown(E){if(Vh(E.nativeEvent,E.currentTarget)&&E.currentTarget.contains(E.target)){var A;h5(E.target,E.key)&&E.preventDefault();let R=!0;if(!x.isPressed&&!E.repeat){x.target=E.currentTarget,x.isPressed=!0,R=m(E,"keyboard");let F=E.currentTarget,z=B=>{Vh(B,F)&&!B.repeat&&F.contains(B.target)&&x.target&&w(nr(x.target,B),"keyboard")};b(ye(E.currentTarget),"keyup",fl(z,P),!0)}R&&E.stopPropagation(),E.metaKey&&Ds()&&((A=x.metaKeyEvents)===null||A===void 0||A.set(E.key,E.nativeEvent))}else E.key==="Meta"&&(x.metaKeyEvents=new Map)},onClick(E){if(!(E&&!E.currentTarget.contains(E.target))&&E&&E.button===0&&!x.isTriggeringEvent&&!ia.isOpening){let A=!0;if(s&&E.preventDefault(),!x.ignoreClickAfterPress&&!x.ignoreEmulatedMouseEvents&&!x.isPressed&&(x.pointerType==="virtual"||mg(E.nativeEvent))){!s&&!l&&Kr(E.currentTarget);let R=m(E,"virtual"),F=w(E,"virtual"),z=$(E,"virtual");A=R&&F&&z}x.ignoreEmulatedMouseEvents=!1,x.ignoreClickAfterPress=!1,A&&E.stopPropagation()}}},P=E=>{var A;if(x.isPressed&&x.target&&Vh(E,x.target)){var R;h5(E.target,E.key)&&E.preventDefault();let z=E.target;$(nr(x.target,E),"keyboard",x.target.contains(z)),v(),E.key!=="Enter"&&D$(x.target)&&x.target.contains(z)&&!E[d5]&&(E[d5]=!0,ia(x.target,E,!1)),x.isPressed=!1,(R=x.metaKeyEvents)===null||R===void 0||R.delete(E.key)}else if(E.key==="Meta"&&(!((A=x.metaKeyEvents)===null||A===void 0)&&A.size)){var F;let z=x.metaKeyEvents;x.metaKeyEvents=void 0;for(let B of z.values())(F=x.target)===null||F===void 0||F.dispatchEvent(new KeyboardEvent("keyup",B))}};if(typeof PointerEvent<"u"){T.onPointerDown=F=>{if(F.button!==0||!F.currentTarget.contains(F.target))return;if(ML(F.nativeEvent)){x.pointerType="virtual";return}Wh(F.currentTarget)&&F.preventDefault(),x.pointerType=F.pointerType;let z=!0;x.isPressed||(x.isPressed=!0,x.isOverTarget=!0,x.activePointerId=F.pointerId,x.target=F.currentTarget,!s&&!l&&Kr(F.currentTarget),c||u5(x.target),z=m(F,x.pointerType),b(ye(F.currentTarget),"pointermove",E,!1),b(ye(F.currentTarget),"pointerup",A,!1),b(ye(F.currentTarget),"pointercancel",R,!1)),z&&F.stopPropagation()},T.onMouseDown=F=>{F.currentTarget.contains(F.target)&&F.button===0&&(Wh(F.currentTarget)&&F.preventDefault(),F.stopPropagation())},T.onPointerUp=F=>{!F.currentTarget.contains(F.target)||x.pointerType==="virtual"||F.button===0&&Ca(F,F.currentTarget)&&w(F,x.pointerType||F.pointerType)};let E=F=>{F.pointerId===x.activePointerId&&(x.target&&Ca(F,x.target)?!x.isOverTarget&&x.pointerType!=null&&(x.isOverTarget=!0,m(nr(x.target,F),x.pointerType)):x.target&&x.isOverTarget&&x.pointerType!=null&&(x.isOverTarget=!1,$(nr(x.target,F),x.pointerType,!1),S(F)))},A=F=>{F.pointerId===x.activePointerId&&x.isPressed&&F.button===0&&x.target&&(Ca(F,x.target)&&x.pointerType!=null?$(nr(x.target,F),x.pointerType):x.isOverTarget&&x.pointerType!=null&&$(nr(x.target,F),x.pointerType,!1),x.isPressed=!1,x.isOverTarget=!1,x.activePointerId=null,x.pointerType=null,v(),c||yu(x.target))},R=F=>{D(F)};T.onDragStart=F=>{F.currentTarget.contains(F.target)&&D(F)}}else{T.onMouseDown=R=>{if(R.button!==0||!R.currentTarget.contains(R.target))return;if(Wh(R.currentTarget)&&R.preventDefault(),x.ignoreEmulatedMouseEvents){R.stopPropagation();return}x.isPressed=!0,x.isOverTarget=!0,x.target=R.currentTarget,x.pointerType=mg(R.nativeEvent)?"virtual":"mouse",!s&&!l&&Kr(R.currentTarget),m(R,x.pointerType)&&R.stopPropagation(),b(ye(R.currentTarget),"mouseup",E,!1)},T.onMouseEnter=R=>{if(!R.currentTarget.contains(R.target))return;let F=!0;x.isPressed&&!x.ignoreEmulatedMouseEvents&&x.pointerType!=null&&(x.isOverTarget=!0,F=m(R,x.pointerType)),F&&R.stopPropagation()},T.onMouseLeave=R=>{if(!R.currentTarget.contains(R.target))return;let F=!0;x.isPressed&&!x.ignoreEmulatedMouseEvents&&x.pointerType!=null&&(x.isOverTarget=!1,F=$(R,x.pointerType,!1),S(R)),F&&R.stopPropagation()},T.onMouseUp=R=>{R.currentTarget.contains(R.target)&&!x.ignoreEmulatedMouseEvents&&R.button===0&&w(R,x.pointerType||"mouse")};let E=R=>{if(R.button===0){if(x.isPressed=!1,v(),x.ignoreEmulatedMouseEvents){x.ignoreEmulatedMouseEvents=!1;return}x.target&&Ca(R,x.target)&&x.pointerType!=null?$(nr(x.target,R),x.pointerType):x.target&&x.isOverTarget&&x.pointerType!=null&&$(nr(x.target,R),x.pointerType,!1),x.isOverTarget=!1}};T.onTouchStart=R=>{if(!R.currentTarget.contains(R.target))return;let F=iN(R.nativeEvent);if(!F)return;x.activePointerId=F.identifier,x.ignoreEmulatedMouseEvents=!0,x.isOverTarget=!0,x.isPressed=!0,x.target=R.currentTarget,x.pointerType="touch",!s&&!l&&Kr(R.currentTarget),c||u5(x.target),m(R,x.pointerType)&&R.stopPropagation(),b(Fn(R.currentTarget),"scroll",A,!0)},T.onTouchMove=R=>{if(!R.currentTarget.contains(R.target))return;if(!x.isPressed){R.stopPropagation();return}let F=f5(R.nativeEvent,x.activePointerId),z=!0;F&&Ca(F,R.currentTarget)?!x.isOverTarget&&x.pointerType!=null&&(x.isOverTarget=!0,z=m(R,x.pointerType)):x.isOverTarget&&x.pointerType!=null&&(x.isOverTarget=!1,z=$(R,x.pointerType,!1),S(R)),z&&R.stopPropagation()},T.onTouchEnd=R=>{if(!R.currentTarget.contains(R.target))return;if(!x.isPressed){R.stopPropagation();return}let F=f5(R.nativeEvent,x.activePointerId),z=!0;F&&Ca(F,R.currentTarget)&&x.pointerType!=null?(w(R,x.pointerType),z=$(R,x.pointerType)):x.isOverTarget&&x.pointerType!=null&&(z=$(R,x.pointerType,!1)),z&&R.stopPropagation(),x.isPressed=!1,x.activePointerId=null,x.isOverTarget=!1,x.ignoreEmulatedMouseEvents=!0,x.target&&!c&&yu(x.target),v()},T.onTouchCancel=R=>{R.currentTarget.contains(R.target)&&(R.stopPropagation(),x.isPressed&&D(R))};let A=R=>{x.isPressed&&R.target.contains(x.target)&&D({currentTarget:x.target,shiftKey:!1,ctrlKey:!1,metaKey:!1,altKey:!1})};T.onDragStart=R=>{R.currentTarget.contains(R.target)&&D(R)}}return T},[b,s,l,v,c,D,S,$,m,w]);return y.useEffect(()=>()=>{var x;c||yu((x=g.current.target)!==null&&x!==void 0?x:void 0)},[c]),{isPressed:o||h,pressProps:de(f,k)}}function D$(e){return e.tagName==="A"&&e.hasAttribute("href")}function Vh(e,t){const{key:n,code:r}=e,i=t,a=i.getAttribute("role");return(n==="Enter"||n===" "||n==="Spacebar"||r==="Space")&&!(i instanceof Fn(i).HTMLInputElement&&!dE(i,n)||i instanceof Fn(i).HTMLTextAreaElement||i.isContentEditable)&&!((a==="link"||!a&&D$(i))&&n!=="Enter")}function iN(e){const{targetTouches:t}=e;return t.length>0?t[0]:null}function f5(e,t){const n=e.changedTouches;for(let r=0;r<n.length;r++){const i=n[r];if(i.identifier===t)return i}return null}function nr(e,t){return{currentTarget:e,shiftKey:t.shiftKey,ctrlKey:t.ctrlKey,metaKey:t.metaKey,altKey:t.altKey}}function aN(e){let t=0,n=0;return e.width!==void 0?t=e.width/2:e.radiusX!==void 0&&(t=e.radiusX),e.height!==void 0?n=e.height/2:e.radiusY!==void 0&&(n=e.radiusY),{top:e.clientY-n,right:e.clientX+t,bottom:e.clientY+n,left:e.clientX-t}}function sN(e,t){return!(e.left>t.right||t.left>e.right||e.top>t.bottom||t.top>e.bottom)}function Ca(e,t){let n=t.getBoundingClientRect(),r=aN(e);return sN(n,r)}function Wh(e){return!(e instanceof HTMLElement)||!e.hasAttribute("draggable")}function h5(e,t){return e instanceof HTMLInputElement?!dE(e,t):e instanceof HTMLButtonElement?e.type!=="submit"&&e.type!=="reset":!D$(e)}const oN=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function dE(e,t){return e.type==="checkbox"||e.type==="radio"?t===" ":oN.has(e.type)}const lN=_.forwardRef(({children:e,...t},n)=>{let r=y.useRef(!1),i=y.useContext(hl);n=CL(n||(i==null?void 0:i.ref));let a=de(i||{},{...t,ref:n,register(){r.current=!0,i&&i.register()}});return y$(i,n),y.useEffect(()=>{r.current||(console.warn("A PressResponder was rendered without a pressable child. Either call the usePress hook, or wrap your DOM node with <Pressable> component."),r.current=!0)},[]),_.createElement(hl.Provider,{value:a},e)});function uN({children:e}){let t=y.useMemo(()=>({register:()=>{}}),[]);return _.createElement(hl.Provider,{value:t},e)}class cN{isDefaultPrevented(){return this.nativeEvent.defaultPrevented}preventDefault(){this.defaultPrevented=!0,this.nativeEvent.preventDefault()}stopPropagation(){this.nativeEvent.stopPropagation(),this.isPropagationStopped=()=>!0}isPropagationStopped(){return!1}persist(){}constructor(t,n){this.nativeEvent=n,this.target=n.target,this.currentTarget=n.currentTarget,this.relatedTarget=n.relatedTarget,this.bubbles=n.bubbles,this.cancelable=n.cancelable,this.defaultPrevented=n.defaultPrevented,this.eventPhase=n.eventPhase,this.isTrusted=n.isTrusted,this.timeStamp=n.timeStamp,this.type=t}}function fE(e){let t=y.useRef({isFocused:!1,observer:null});he(()=>{const r=t.current;return()=>{r.observer&&(r.observer.disconnect(),r.observer=null)}},[]);let n=pt(r=>{e==null||e(r)});return y.useCallback(r=>{if(r.target instanceof HTMLButtonElement||r.target instanceof HTMLInputElement||r.target instanceof HTMLTextAreaElement||r.target instanceof HTMLSelectElement){t.current.isFocused=!0;let i=r.target,a=s=>{t.current.isFocused=!1,i.disabled&&n(new cN("blur",s)),t.current.observer&&(t.current.observer.disconnect(),t.current.observer=null)};i.addEventListener("focusout",a,{once:!0}),t.current.observer=new MutationObserver(()=>{if(t.current.isFocused&&i.disabled){var s;(s=t.current.observer)===null||s===void 0||s.disconnect();let o=i===document.activeElement?null:document.activeElement;i.dispatchEvent(new FocusEvent("blur",{relatedTarget:o})),i.dispatchEvent(new FocusEvent("focusout",{bubbles:!0,relatedTarget:o}))}}),t.current.observer.observe(i,{attributes:!0,attributeFilter:["disabled"]})}},[n])}function hE(e){let{isDisabled:t,onFocus:n,onBlur:r,onFocusChange:i}=e;const a=y.useCallback(l=>{if(l.target===l.currentTarget)return r&&r(l),i&&i(!1),!0},[r,i]),s=fE(a),o=y.useCallback(l=>{const u=ye(l.target);l.target===l.currentTarget&&u.activeElement===l.target&&(n&&n(l),i&&i(!0),s(l))},[i,n,s]);return{focusProps:{onFocus:!t&&(n||i||r)?o:void 0,onBlur:!t&&(r||i)?a:void 0}}}let ma=null,yg=new Set,Bo=new Map,sa=!1,$g=!1;const dN={Tab:!0,Escape:!0};function Bf(e,t){for(let n of yg)n(e,t)}function fN(e){return!(e.metaKey||!Ds()&&e.altKey||e.ctrlKey||e.key==="Control"||e.key==="Shift"||e.key==="Meta")}function ed(e){sa=!0,fN(e)&&(ma="keyboard",Bf("keyboard",e))}function bn(e){ma="pointer",(e.type==="mousedown"||e.type==="pointerdown")&&(sa=!0,Bf("pointer",e))}function pE(e){mg(e)&&(sa=!0,ma="virtual")}function mE(e){e.target===window||e.target===document||(!sa&&!$g&&(ma="virtual",Bf("virtual",e)),sa=!1,$g=!1)}function gE(){sa=!1,$g=!0}function xg(e){if(typeof window>"u"||Bo.get(Fn(e)))return;const t=Fn(e),n=ye(e);let r=t.HTMLElement.prototype.focus;t.HTMLElement.prototype.focus=function(){sa=!0,r.apply(this,arguments)},n.addEventListener("keydown",ed,!0),n.addEventListener("keyup",ed,!0),n.addEventListener("click",pE,!0),t.addEventListener("focus",mE,!0),t.addEventListener("blur",gE,!1),typeof PointerEvent<"u"?(n.addEventListener("pointerdown",bn,!0),n.addEventListener("pointermove",bn,!0),n.addEventListener("pointerup",bn,!0)):(n.addEventListener("mousedown",bn,!0),n.addEventListener("mousemove",bn,!0),n.addEventListener("mouseup",bn,!0)),t.addEventListener("beforeunload",()=>{vE(e)},{once:!0}),Bo.set(t,{focus:r})}const vE=(e,t)=>{const n=Fn(e),r=ye(e);t&&r.removeEventListener("DOMContentLoaded",t),Bo.has(n)&&(n.HTMLElement.prototype.focus=Bo.get(n).focus,r.removeEventListener("keydown",ed,!0),r.removeEventListener("keyup",ed,!0),r.removeEventListener("click",pE,!0),n.removeEventListener("focus",mE,!0),n.removeEventListener("blur",gE,!1),typeof PointerEvent<"u"?(r.removeEventListener("pointerdown",bn,!0),r.removeEventListener("pointermove",bn,!0),r.removeEventListener("pointerup",bn,!0)):(r.removeEventListener("mousedown",bn,!0),r.removeEventListener("mousemove",bn,!0),r.removeEventListener("mouseup",bn,!0)),Bo.delete(n))};function hN(e){const t=ye(e);let n;return t.readyState!=="loading"?xg(e):(n=()=>{xg(e)},t.addEventListener("DOMContentLoaded",n)),()=>vE(e,n)}typeof document<"u"&&hN();function bE(){return ma!=="pointer"}function yE(){return ma}function pN(e){ma=e,Bf(e,null)}const mN=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function gN(e,t,n){var r;const i=typeof window<"u"?Fn(n==null?void 0:n.target).HTMLInputElement:HTMLInputElement,a=typeof window<"u"?Fn(n==null?void 0:n.target).HTMLTextAreaElement:HTMLTextAreaElement,s=typeof window<"u"?Fn(n==null?void 0:n.target).HTMLElement:HTMLElement,o=typeof window<"u"?Fn(n==null?void 0:n.target).KeyboardEvent:KeyboardEvent;return e=e||(n==null?void 0:n.target)instanceof i&&!mN.has(n==null||(r=n.target)===null||r===void 0?void 0:r.type)||(n==null?void 0:n.target)instanceof a||(n==null?void 0:n.target)instanceof s&&(n==null?void 0:n.target.isContentEditable),!(e&&t==="keyboard"&&n instanceof o&&!dN[n.key])}function vN(e,t,n){xg(),y.useEffect(()=>{let r=(i,a)=>{gN(!!(n!=null&&n.isTextInput),i,a)&&e(bE())};return yg.add(r),()=>{yg.delete(r)}},t)}function As(e){let{isDisabled:t,onBlurWithin:n,onFocusWithin:r,onFocusWithinChange:i}=e,a=y.useRef({isFocusWithin:!1}),s=y.useCallback(u=>{a.current.isFocusWithin&&!u.currentTarget.contains(u.relatedTarget)&&(a.current.isFocusWithin=!1,n&&n(u),i&&i(!1))},[n,i,a]),o=fE(s),l=y.useCallback(u=>{!a.current.isFocusWithin&&document.activeElement===u.target&&(r&&r(u),i&&i(!0),a.current.isFocusWithin=!0,o(u))},[r,i,o]);return t?{focusWithinProps:{onFocus:void 0,onBlur:void 0}}:{focusWithinProps:{onFocus:l,onBlur:s}}}let td=!1,Uh=0;function wg(){td=!0,setTimeout(()=>{td=!1},50)}function p5(e){e.pointerType==="touch"&&wg()}function bN(){if(!(typeof document>"u"))return typeof PointerEvent<"u"?document.addEventListener("pointerup",p5):document.addEventListener("touchend",wg),Uh++,()=>{Uh--,!(Uh>0)&&(typeof PointerEvent<"u"?document.removeEventListener("pointerup",p5):document.removeEventListener("touchend",wg))}}function If(e){let{onHoverStart:t,onHoverChange:n,onHoverEnd:r,isDisabled:i}=e,[a,s]=y.useState(!1),o=y.useRef({isHovered:!1,ignoreEmulatedMouseEvents:!1,pointerType:"",target:null}).current;y.useEffect(bN,[]);let{hoverProps:l,triggerHoverEnd:u}=y.useMemo(()=>{let c=(h,p)=>{if(o.pointerType=p,i||p==="touch"||o.isHovered||!h.currentTarget.contains(h.target))return;o.isHovered=!0;let g=h.currentTarget;o.target=g,t&&t({type:"hoverstart",target:g,pointerType:p}),n&&n(!0),s(!0)},d=(h,p)=>{if(o.pointerType="",o.target=null,p==="touch"||!o.isHovered)return;o.isHovered=!1;let g=h.currentTarget;r&&r({type:"hoverend",target:g,pointerType:p}),n&&n(!1),s(!1)},f={};return typeof PointerEvent<"u"?(f.onPointerEnter=h=>{td&&h.pointerType==="mouse"||c(h,h.pointerType)},f.onPointerLeave=h=>{!i&&h.currentTarget.contains(h.target)&&d(h,h.pointerType)}):(f.onTouchStart=()=>{o.ignoreEmulatedMouseEvents=!0},f.onMouseEnter=h=>{!o.ignoreEmulatedMouseEvents&&!td&&c(h,"mouse"),o.ignoreEmulatedMouseEvents=!1},f.onMouseLeave=h=>{!i&&h.currentTarget.contains(h.target)&&d(h,"mouse")}),{hoverProps:f,triggerHoverEnd:d}},[t,n,r,i,o]);return y.useEffect(()=>{i&&u({currentTarget:o.target},o.pointerType)},[i]),{hoverProps:l,isHovered:a}}function yN(e){let{ref:t,onInteractOutside:n,isDisabled:r,onInteractOutsideStart:i}=e,a=y.useRef({isPointerDown:!1,ignoreEmulatedMouseEvents:!1}),s=pt(l=>{n&&wu(l,t)&&(i&&i(l),a.current.isPointerDown=!0)}),o=pt(l=>{n&&n(l)});y.useEffect(()=>{let l=a.current;if(r)return;const u=t.current,c=ye(u);if(typeof PointerEvent<"u"){let d=f=>{l.isPointerDown&&wu(f,t)&&o(f),l.isPointerDown=!1};return c.addEventListener("pointerdown",s,!0),c.addEventListener("pointerup",d,!0),()=>{c.removeEventListener("pointerdown",s,!0),c.removeEventListener("pointerup",d,!0)}}else{let d=h=>{l.ignoreEmulatedMouseEvents?l.ignoreEmulatedMouseEvents=!1:l.isPointerDown&&wu(h,t)&&o(h),l.isPointerDown=!1},f=h=>{l.ignoreEmulatedMouseEvents=!0,l.isPointerDown&&wu(h,t)&&o(h),l.isPointerDown=!1};return c.addEventListener("mousedown",s,!0),c.addEventListener("mouseup",d,!0),c.addEventListener("touchstart",s,!0),c.addEventListener("touchend",f,!0),()=>{c.removeEventListener("mousedown",s,!0),c.removeEventListener("mouseup",d,!0),c.removeEventListener("touchstart",s,!0),c.removeEventListener("touchend",f,!0)}}},[t,r,s,o])}function wu(e,t){if(e.button>0)return!1;if(e.target){const n=e.target.ownerDocument;if(!n||!n.documentElement.contains(e.target)||e.target.closest("[data-react-aria-top-layer]"))return!1}return t.current&&!t.current.contains(e.target)}function m5(e){if(!e)return;let t=!0;return n=>{let r={...n,preventDefault(){n.preventDefault()},isDefaultPrevented(){return n.isDefaultPrevented()},stopPropagation(){console.error("stopPropagation is now the default behavior for events in React Spectrum. You can use continuePropagation() to revert this behavior.")},continuePropagation(){t=!1}};e(r),t&&n.stopPropagation()}}function $N(e){return{keyboardProps:e.isDisabled?{}:{onKeyDown:m5(e.onKeyDown),onKeyUp:m5(e.onKeyUp)}}}function nd(e){const t=ye(e);if(yE()==="virtual"){let n=t.activeElement;eE(()=>{t.activeElement===n&&e.isConnected&&Kr(e)})}else Kr(e)}function xN(e){const t=Fn(e);if(!(e instanceof t.HTMLElement)&&!(e instanceof t.SVGElement))return!1;let{display:n,visibility:r}=e.style,i=n!=="none"&&r!=="hidden"&&r!=="collapse";if(i){const{getComputedStyle:a}=e.ownerDocument.defaultView;let{display:s,visibility:o}=a(e);i=s!=="none"&&o!=="hidden"&&o!=="collapse"}return i}function wN(e,t){return!e.hasAttribute("hidden")&&!e.hasAttribute("data-react-aria-prevent-focus")&&(e.nodeName==="DETAILS"&&t&&t.nodeName!=="SUMMARY"?e.hasAttribute("open"):!0)}function $E(e,t){return e.nodeName!=="#comment"&&xN(e)&&wN(e,t)&&(!e.parentElement||$E(e.parentElement,e))}const g5=_.createContext(null);let _e=null;function DN(e){let{children:t,contain:n,restoreFocus:r,autoFocus:i}=e,a=y.useRef(null),s=y.useRef(null),o=y.useRef([]),{parentNode:l}=y.useContext(g5)||{},u=y.useMemo(()=>new Dg({scopeRef:o}),[o]);he(()=>{let f=l||Ge.root;if(Ge.getTreeNode(f.scopeRef)&&_e&&!id(_e,f.scopeRef)){let h=Ge.getTreeNode(_e);h&&(f=h)}f.addChild(u),Ge.addNode(u)},[u,l]),he(()=>{let f=Ge.getTreeNode(o);f&&(f.contain=!!n)},[n]),he(()=>{var f;let h=(f=a.current)===null||f===void 0?void 0:f.nextSibling,p=[];for(;h&&h!==s.current;)p.push(h),h=h.nextSibling;o.current=p},[t]),TN(o,r,n),CN(o,n),MN(o,r,n),PN(o,i),y.useEffect(()=>{const f=ye(o.current?o.current[0]:void 0).activeElement;let h=null;if(St(f,o.current)){for(let p of Ge.traverse())p.scopeRef&&St(f,p.scopeRef.current)&&(h=p);h===Ge.getTreeNode(o)&&(_e=h.scopeRef)}},[o]),he(()=>()=>{var f,h,p;let g=(p=(h=Ge.getTreeNode(o))===null||h===void 0||(f=h.parent)===null||f===void 0?void 0:f.scopeRef)!==null&&p!==void 0?p:null;(o===_e||id(o,_e))&&(!g||Ge.getTreeNode(g))&&(_e=g),Ge.removeTreeNode(o)},[o]);let c=y.useMemo(()=>_N(o),[]),d=y.useMemo(()=>({focusManager:c,parentNode:u}),[u,c]);return _.createElement(g5.Provider,{value:d},_.createElement("span",{"data-focus-scope-start":!0,hidden:!0,ref:a}),t,_.createElement("span",{"data-focus-scope-end":!0,hidden:!0,ref:s}))}function _N(e){return{focusNext(t={}){let n=e.current,{from:r,tabbable:i,wrap:a,accept:s}=t,o=r||ye(n[0]).activeElement,l=n[0].previousElementSibling,u=Wi(n),c=an(u,{tabbable:i,accept:s},n);c.currentNode=St(o,n)?o:l;let d=c.nextNode();return!d&&a&&(c.currentNode=l,d=c.nextNode()),d&&Ut(d,!0),d},focusPrevious(t={}){let n=e.current,{from:r,tabbable:i,wrap:a,accept:s}=t,o=r||ye(n[0]).activeElement,l=n[n.length-1].nextElementSibling,u=Wi(n),c=an(u,{tabbable:i,accept:s},n);c.currentNode=St(o,n)?o:l;let d=c.previousNode();return!d&&a&&(c.currentNode=l,d=c.previousNode()),d&&Ut(d,!0),d},focusFirst(t={}){let n=e.current,{tabbable:r,accept:i}=t,a=Wi(n),s=an(a,{tabbable:r,accept:i},n);s.currentNode=n[0].previousElementSibling;let o=s.nextNode();return o&&Ut(o,!0),o},focusLast(t={}){let n=e.current,{tabbable:r,accept:i}=t,a=Wi(n),s=an(a,{tabbable:r,accept:i},n);s.currentNode=n[n.length-1].nextElementSibling;let o=s.previousNode();return o&&Ut(o,!0),o}}}const _$=["input:not([disabled]):not([type=hidden])","select:not([disabled])","textarea:not([disabled])","button:not([disabled])","a[href]","area[href]","summary","iframe","object","embed","audio[controls]","video[controls]","[contenteditable]"],EN=_$.join(":not([hidden]),")+",[tabindex]:not([disabled]):not([hidden])";_$.push('[tabindex]:not([tabindex="-1"]):not([disabled])');const SN=_$.join(':not([hidden]):not([tabindex="-1"]),');function Wi(e){return e[0].parentElement}function go(e){let t=Ge.getTreeNode(_e);for(;t&&t.scopeRef!==e;){if(t.contain)return!1;t=t.parent}return!0}function CN(e,t){let n=y.useRef(),r=y.useRef();he(()=>{let i=e.current;if(!t){r.current&&(cancelAnimationFrame(r.current),r.current=void 0);return}const a=ye(i?i[0]:void 0);let s=u=>{if(u.key!=="Tab"||u.altKey||u.ctrlKey||u.metaKey||!go(e)||u.isComposing)return;let c=a.activeElement,d=e.current;if(!d||!St(c,d))return;let f=Wi(d),h=an(f,{tabbable:!0},d);if(!c)return;h.currentNode=c;let p=u.shiftKey?h.previousNode():h.nextNode();p||(h.currentNode=u.shiftKey?d[d.length-1].nextElementSibling:d[0].previousElementSibling,p=u.shiftKey?h.previousNode():h.nextNode()),u.preventDefault(),p&&Ut(p,!0)},o=u=>{(!_e||id(_e,e))&&St(u.target,e.current)?(_e=e,n.current=u.target):go(e)&&!rd(u.target,e)?n.current?n.current.focus():_e&&_e.current&&ad(_e.current):go(e)&&(n.current=u.target)},l=u=>{r.current&&cancelAnimationFrame(r.current),r.current=requestAnimationFrame(()=>{if(a.activeElement&&go(e)&&!rd(a.activeElement,e))if(_e=e,a.body.contains(u.target)){var c;n.current=u.target,(c=n.current)===null||c===void 0||c.focus()}else _e.current&&ad(_e.current)})};return a.addEventListener("keydown",s,!1),a.addEventListener("focusin",o,!1),i==null||i.forEach(u=>u.addEventListener("focusin",o,!1)),i==null||i.forEach(u=>u.addEventListener("focusout",l,!1)),()=>{a.removeEventListener("keydown",s,!1),a.removeEventListener("focusin",o,!1),i==null||i.forEach(u=>u.removeEventListener("focusin",o,!1)),i==null||i.forEach(u=>u.removeEventListener("focusout",l,!1))}},[e,t]),he(()=>()=>{r.current&&cancelAnimationFrame(r.current)},[r])}function xE(e){return rd(e)}function St(e,t){return!e||!t?!1:t.some(n=>n.contains(e))}function rd(e,t=null){if(e instanceof Element&&e.closest("[data-react-aria-top-layer]"))return!0;for(let{scopeRef:n}of Ge.traverse(Ge.getTreeNode(t)))if(n&&St(e,n.current))return!0;return!1}function kN(e){return rd(e,_e)}function id(e,t){var n;let r=(n=Ge.getTreeNode(t))===null||n===void 0?void 0:n.parent;for(;r;){if(r.scopeRef===e)return!0;r=r.parent}return!1}function Ut(e,t=!1){if(e!=null&&!t)try{nd(e)}catch{}else if(e!=null)try{e.focus()}catch{}}function ad(e,t=!0){let n=e[0].previousElementSibling,r=Wi(e),i=an(r,{tabbable:t},e);i.currentNode=n;let a=i.nextNode();t&&!a&&(r=Wi(e),i=an(r,{tabbable:!1},e),i.currentNode=n,a=i.nextNode()),Ut(a)}function PN(e,t){const n=_.useRef(t);y.useEffect(()=>{if(n.current){_e=e;const r=ye(e.current?e.current[0]:void 0);!St(r.activeElement,_e.current)&&e.current&&ad(e.current)}n.current=!1},[e])}function TN(e,t,n){he(()=>{if(t||n)return;let r=e.current;const i=ye(r?r[0]:void 0);let a=s=>{let o=s.target;St(o,e.current)?_e=e:xE(o)||(_e=null)};return i.addEventListener("focusin",a,!1),r==null||r.forEach(s=>s.addEventListener("focusin",a,!1)),()=>{i.removeEventListener("focusin",a,!1),r==null||r.forEach(s=>s.removeEventListener("focusin",a,!1))}},[e,t,n])}function RN(e){let t=Ge.getTreeNode(_e);for(;t&&t.scopeRef!==e;){if(t.nodeToRestore)return!1;t=t.parent}return(t==null?void 0:t.scopeRef)===e}function MN(e,t,n){const r=y.useRef(typeof document<"u"?ye(e.current?e.current[0]:void 0).activeElement:null);he(()=>{let i=e.current;const a=ye(i?i[0]:void 0);if(!t||n)return;let s=()=>{(!_e||id(_e,e))&&St(a.activeElement,e.current)&&(_e=e)};return a.addEventListener("focusin",s,!1),i==null||i.forEach(o=>o.addEventListener("focusin",s,!1)),()=>{a.removeEventListener("focusin",s,!1),i==null||i.forEach(o=>o.removeEventListener("focusin",s,!1))}},[e,n]),he(()=>{const i=ye(e.current?e.current[0]:void 0);if(!t)return;let a=s=>{if(s.key!=="Tab"||s.altKey||s.ctrlKey||s.metaKey||!go(e)||s.isComposing)return;let o=i.activeElement;if(!St(o,e.current))return;let l=Ge.getTreeNode(e);if(!l)return;let u=l.nodeToRestore,c=an(i.body,{tabbable:!0});c.currentNode=o;let d=s.shiftKey?c.previousNode():c.nextNode();if((!u||!i.body.contains(u)||u===i.body)&&(u=void 0,l.nodeToRestore=void 0),(!d||!St(d,e.current))&&u){c.currentNode=u;do d=s.shiftKey?c.previousNode():c.nextNode();while(St(d,e.current));s.preventDefault(),s.stopPropagation(),d?Ut(d,!0):xE(u)?Ut(u,!0):o.blur()}};return n||i.addEventListener("keydown",a,!0),()=>{n||i.removeEventListener("keydown",a,!0)}},[e,t,n]),he(()=>{const i=ye(e.current?e.current[0]:void 0);if(!t)return;let a=Ge.getTreeNode(e);if(a){var s;return a.nodeToRestore=(s=r.current)!==null&&s!==void 0?s:void 0,()=>{let o=Ge.getTreeNode(e);if(!o)return;let l=o.nodeToRestore;if(t&&l&&(St(i.activeElement,e.current)||i.activeElement===i.body&&RN(e))){let u=Ge.clone();requestAnimationFrame(()=>{if(i.activeElement===i.body){let c=u.getTreeNode(e);for(;c;){if(c.nodeToRestore&&c.nodeToRestore.isConnected){Ut(c.nodeToRestore);return}c=c.parent}for(c=u.getTreeNode(e);c;){if(c.scopeRef&&c.scopeRef.current&&Ge.getTreeNode(c.scopeRef)){ad(c.scopeRef.current,!0);return}c=c.parent}}})}}}},[e,t])}function an(e,t,n){let r=t!=null&&t.tabbable?SN:EN,i=ye(e).createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode(a){var s;return!(t==null||(s=t.from)===null||s===void 0)&&s.contains(a)?NodeFilter.FILTER_REJECT:a.matches(r)&&$E(a)&&(!n||St(a,n))&&(!(t!=null&&t.accept)||t.accept(a))?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});return t!=null&&t.from&&(i.currentNode=t.from),i}function Lf(e,t={}){return{focusNext(n={}){let r=e.current;if(!r)return null;let{from:i,tabbable:a=t.tabbable,wrap:s=t.wrap,accept:o=t.accept}=n,l=i||ye(r).activeElement,u=an(r,{tabbable:a,accept:o});r.contains(l)&&(u.currentNode=l);let c=u.nextNode();return!c&&s&&(u.currentNode=r,c=u.nextNode()),c&&Ut(c,!0),c},focusPrevious(n=t){let r=e.current;if(!r)return null;let{from:i,tabbable:a=t.tabbable,wrap:s=t.wrap,accept:o=t.accept}=n,l=i||ye(r).activeElement,u=an(r,{tabbable:a,accept:o});if(r.contains(l))u.currentNode=l;else{let d=Hh(u);return d&&Ut(d,!0),d??null}let c=u.previousNode();if(!c&&s){u.currentNode=r;let d=Hh(u);if(!d)return null;c=d}return c&&Ut(c,!0),c??null},focusFirst(n=t){let r=e.current;if(!r)return null;let{tabbable:i=t.tabbable,accept:a=t.accept}=n,o=an(r,{tabbable:i,accept:a}).nextNode();return o&&Ut(o,!0),o},focusLast(n=t){let r=e.current;if(!r)return null;let{tabbable:i=t.tabbable,accept:a=t.accept}=n,s=an(r,{tabbable:i,accept:a}),o=Hh(s);return o&&Ut(o,!0),o??null}}}function Hh(e){let t,n;do n=e.lastChild(),n&&(t=n);while(n);return t}class E${get size(){return this.fastMap.size}getTreeNode(t){return this.fastMap.get(t)}addTreeNode(t,n,r){let i=this.fastMap.get(n??null);if(!i)return;let a=new Dg({scopeRef:t});i.addChild(a),a.parent=i,this.fastMap.set(t,a),r&&(a.nodeToRestore=r)}addNode(t){this.fastMap.set(t.scopeRef,t)}removeTreeNode(t){if(t===null)return;let n=this.fastMap.get(t);if(!n)return;let r=n.parent;for(let a of this.traverse())a!==n&&n.nodeToRestore&&a.nodeToRestore&&n.scopeRef&&n.scopeRef.current&&St(a.nodeToRestore,n.scopeRef.current)&&(a.nodeToRestore=n.nodeToRestore);let i=n.children;r&&(r.removeChild(n),i.size>0&&i.forEach(a=>r&&r.addChild(a))),this.fastMap.delete(n.scopeRef)}*traverse(t=this.root){if(t.scopeRef!=null&&(yield t),t.children.size>0)for(let n of t.children)yield*this.traverse(n)}clone(){var t;let n=new E$;var r;for(let i of this.traverse())n.addTreeNode(i.scopeRef,(r=(t=i.parent)===null||t===void 0?void 0:t.scopeRef)!==null&&r!==void 0?r:null,i.nodeToRestore);return n}constructor(){this.fastMap=new Map,this.root=new Dg({scopeRef:null}),this.fastMap.set(null,this.root)}}class Dg{addChild(t){this.children.add(t),t.parent=this}removeChild(t){this.children.delete(t),t.parent=void 0}constructor(t){this.children=new Set,this.contain=!1,this.scopeRef=t.scopeRef}}let Ge=new E$;function pl(e={}){let{autoFocus:t=!1,isTextInput:n,within:r}=e,i=y.useRef({isFocused:!1,isFocusVisible:t||bE()}),[a,s]=y.useState(!1),[o,l]=y.useState(()=>i.current.isFocused&&i.current.isFocusVisible),u=y.useCallback(()=>l(i.current.isFocused&&i.current.isFocusVisible),[]),c=y.useCallback(h=>{i.current.isFocused=h,s(h),u()},[u]);vN(h=>{i.current.isFocusVisible=h,u()},[],{isTextInput:n});let{focusProps:d}=hE({isDisabled:r,onFocusChange:c}),{focusWithinProps:f}=As({isDisabled:!r,onFocusWithinChange:c});return{isFocused:a,isFocusVisible:o,focusProps:r?f:d}}function wE(e){let{children:t,focusClass:n,focusRingClass:r}=e,{isFocused:i,isFocusVisible:a,focusProps:s}=pl(e),o=_.Children.only(t);return _.cloneElement(o,de(o.props,{...s,className:Ef({[n||""]:i,[r||""]:a})}))}let FN=_.createContext(null);function AN(e){let t=y.useContext(FN)||{};y$(t,e);let{ref:n,...r}=t;return r}function ON(e,t){let{focusProps:n}=hE(e),{keyboardProps:r}=$N(e),i=de(n,r),a=AN(t),s=e.isDisabled?{}:a,o=y.useRef(e.autoFocus);return y.useEffect(()=>{o.current&&t.current&&nd(t.current),o.current=!1},[t]),{focusableProps:de({...i,tabIndex:e.excludeFromTabOrder&&!e.isDisabled?-1:void 0},s)}}function BN(e){let{id:t,label:n,"aria-labelledby":r,"aria-label":i,labelElementType:a="label"}=e;t=Qn(t);let s=Qn(),o={};n?(r=r?`${s} ${r}`:s,o={id:s,htmlFor:a==="label"?t:void 0}):!r&&!i&&console.warn("If you do not provide a visible label, you must specify an aria-label or aria-labelledby attribute for accessibility");let l=jl({id:t,"aria-label":i,"aria-labelledby":r});return{labelProps:o,fieldProps:l}}function DE(e){let{description:t,errorMessage:n,isInvalid:r,validationState:i}=e,{labelProps:a,fieldProps:s}=BN(e),o=Xc([!!t,!!n,r,i]),l=Xc([!!t,!!n,r,i]);return s=de(s,{"aria-describedby":[o,l,e["aria-describedby"]].filter(Boolean).join(" ")||void 0}),{labelProps:a,fieldProps:s,descriptionProps:{id:o},errorMessageProps:{id:l}}}function IN(e,t){e=ci(e,"text");let{children:n,...r}=e,{styleProps:i}=st(r),a=Nn(t);return _.createElement("span",{...Xt(r),...i,ref:a},n)}const LN=y.forwardRef(IN);function _E(e,t){let{elementType:n="button",isDisabled:r,onPress:i,onPressStart:a,onPressEnd:s,onPressUp:o,onPressChange:l,preventFocusOnPress:u,allowFocusWhenDisabled:c,onClick:d,href:f,target:h,rel:p,type:g="button"}=e,b;n==="button"?b={type:g,disabled:r}:b={role:"button",tabIndex:r?void 0:0,href:n==="a"&&r?void 0:f,target:n==="a"?h:void 0,type:n==="input"?g:void 0,disabled:n==="input"?r:void 0,"aria-disabled":!r||n==="input"?void 0:r,rel:n==="a"?p:void 0};let{pressProps:v,isPressed:m}=w$({onPressStart:a,onPressEnd:s,onPressChange:l,onPress:i,onPressUp:o,isDisabled:r,preventFocusOnPress:u,ref:t}),{focusableProps:$}=ON(e,t);c&&($.tabIndex=r?-1:$.tabIndex);let w=de($,v,Xt(e,{labelable:!0}));return{isPressed:m,buttonProps:de(b,w,{"aria-haspopup":e["aria-haspopup"],"aria-expanded":e["aria-expanded"],"aria-controls":e["aria-controls"],"aria-pressed":e["aria-pressed"],onClick:D=>{d&&(d(D),console.warn("onClick is deprecated, please use onPress"))}})}}var EE={};EE={dateRange:e=>`${e.startDate} إلى ${e.endDate}`,dateSelected:e=>`${e.date} المحدد`,finishRangeSelectionPrompt:"انقر لإنهاء عملية تحديد نطاق التاريخ",maximumDate:"آخر تاريخ متاح",minimumDate:"أول تاريخ متاح",next:"التالي",previous:"السابق",selectedDateDescription:e=>`تاريخ محدد: ${e.date}`,selectedRangeDescription:e=>`المدى الزمني المحدد: ${e.dateRange}`,startRangeSelectionPrompt:"انقر لبدء عملية تحديد نطاق التاريخ",todayDate:e=>`اليوم، ${e.date}`,todayDateSelected:e=>`اليوم، ${e.date} محدد`};var SE={};SE={dateRange:e=>`${e.startDate} до ${e.endDate}`,dateSelected:e=>`Избрано е ${e.date}`,finishRangeSelectionPrompt:"Натиснете, за да довършите избора на времеви интервал",maximumDate:"Последна налична дата",minimumDate:"Първа налична дата",next:"Напред",previous:"Назад",selectedDateDescription:e=>`Избрана дата: ${e.date}`,selectedRangeDescription:e=>`Избран диапазон: ${e.dateRange}`,startRangeSelectionPrompt:"Натиснете, за да пристъпите към избора на времеви интервал",todayDate:e=>`Днес, ${e.date}`,todayDateSelected:e=>`Днес, ${e.date} са избрани`};var CE={};CE={dateRange:e=>`${e.startDate} až ${e.endDate}`,dateSelected:e=>`Vybráno ${e.date}`,finishRangeSelectionPrompt:"Kliknutím dokončíte výběr rozsahu dat",maximumDate:"Poslední dostupné datum",minimumDate:"První dostupné datum",next:"Další",previous:"Předchozí",selectedDateDescription:e=>`Vybrané datum: ${e.date}`,selectedRangeDescription:e=>`Vybrané období: ${e.dateRange}`,startRangeSelectionPrompt:"Kliknutím zahájíte výběr rozsahu dat",todayDate:e=>`Dnes, ${e.date}`,todayDateSelected:e=>`Dnes, vybráno ${e.date}`};var kE={};kE={dateRange:e=>`${e.startDate} til ${e.endDate}`,dateSelected:e=>`${e.date} valgt`,finishRangeSelectionPrompt:"Klik for at fuldføre valg af datoområde",maximumDate:"Sidste ledige dato",minimumDate:"Første ledige dato",next:"Næste",previous:"Forrige",selectedDateDescription:e=>`Valgt dato: ${e.date}`,selectedRangeDescription:e=>`Valgt interval: ${e.dateRange}`,startRangeSelectionPrompt:"Klik for at starte valg af datoområde",todayDate:e=>`I dag, ${e.date}`,todayDateSelected:e=>`I dag, ${e.date} valgt`};var PE={};PE={dateRange:e=>`${e.startDate} bis ${e.endDate}`,dateSelected:e=>`${e.date} ausgewählt`,finishRangeSelectionPrompt:"Klicken, um die Auswahl des Datumsbereichs zu beenden",maximumDate:"Letztes verfügbares Datum",minimumDate:"Erstes verfügbares Datum",next:"Weiter",previous:"Zurück",selectedDateDescription:e=>`Ausgewähltes Datum: ${e.date}`,selectedRangeDescription:e=>`Ausgewählter Bereich: ${e.dateRange}`,startRangeSelectionPrompt:"Klicken, um die Auswahl des Datumsbereichs zu beginnen",todayDate:e=>`Heute, ${e.date}`,todayDateSelected:e=>`Heute, ${e.date} ausgewählt`};var TE={};TE={dateRange:e=>`${e.startDate} έως ${e.endDate}`,dateSelected:e=>`Επιλέχθηκε ${e.date}`,finishRangeSelectionPrompt:"Κάντε κλικ για να ολοκληρώσετε την επιλογή εύρους ημερομηνιών",maximumDate:"Τελευταία διαθέσιμη ημερομηνία",minimumDate:"Πρώτη διαθέσιμη ημερομηνία",next:"Επόμενο",previous:"Προηγούμενο",selectedDateDescription:e=>`Επιλεγμένη ημερομηνία: ${e.date}`,selectedRangeDescription:e=>`Επιλεγμένο εύρος: ${e.dateRange}`,startRangeSelectionPrompt:"Κάντε κλικ για να ξεκινήσετε την επιλογή εύρους ημερομηνιών",todayDate:e=>`Σήμερα, ${e.date}`,todayDateSelected:e=>`Σήμερα, επιλέχτηκε ${e.date}`};var RE={};RE={previous:"Previous",next:"Next",selectedDateDescription:e=>`Selected Date: ${e.date}`,selectedRangeDescription:e=>`Selected Range: ${e.dateRange}`,todayDate:e=>`Today, ${e.date}`,todayDateSelected:e=>`Today, ${e.date} selected`,dateSelected:e=>`${e.date} selected`,startRangeSelectionPrompt:"Click to start selecting date range",finishRangeSelectionPrompt:"Click to finish selecting date range",minimumDate:"First available date",maximumDate:"Last available date",dateRange:e=>`${e.startDate} to ${e.endDate}`};var ME={};ME={dateRange:e=>`${e.startDate} a ${e.endDate}`,dateSelected:e=>`${e.date} seleccionado`,finishRangeSelectionPrompt:"Haga clic para terminar de seleccionar rango de fechas",maximumDate:"Última fecha disponible",minimumDate:"Primera fecha disponible",next:"Siguiente",previous:"Anterior",selectedDateDescription:e=>`Fecha seleccionada: ${e.date}`,selectedRangeDescription:e=>`Intervalo seleccionado: ${e.dateRange}`,startRangeSelectionPrompt:"Haga clic para comenzar a seleccionar un rango de fechas",todayDate:e=>`Hoy, ${e.date}`,todayDateSelected:e=>`Hoy, ${e.date} seleccionado`};var FE={};FE={dateRange:e=>`${e.startDate} kuni ${e.endDate}`,dateSelected:e=>`${e.date} valitud`,finishRangeSelectionPrompt:"Klõpsake kuupäevavahemiku valimise lõpetamiseks",maximumDate:"Viimane saadaolev kuupäev",minimumDate:"Esimene saadaolev kuupäev",next:"Järgmine",previous:"Eelmine",selectedDateDescription:e=>`Valitud kuupäev: ${e.date}`,selectedRangeDescription:e=>`Valitud vahemik: ${e.dateRange}`,startRangeSelectionPrompt:"Klõpsake kuupäevavahemiku valimiseks",todayDate:e=>`Täna, ${e.date}`,todayDateSelected:e=>`Täna, ${e.date} valitud`};var AE={};AE={dateRange:e=>`${e.startDate} – ${e.endDate}`,dateSelected:e=>`${e.date} valittu`,finishRangeSelectionPrompt:"Lopeta päivämääräalueen valinta napsauttamalla tätä.",maximumDate:"Viimeinen varattavissa oleva päivämäärä",minimumDate:"Ensimmäinen varattavissa oleva päivämäärä",next:"Seuraava",previous:"Edellinen",selectedDateDescription:e=>`Valittu päivämäärä: ${e.date}`,selectedRangeDescription:e=>`Valittu aikaväli: ${e.dateRange}`,startRangeSelectionPrompt:"Aloita päivämääräalueen valinta napsauttamalla tätä.",todayDate:e=>`Tänään, ${e.date}`,todayDateSelected:e=>`Tänään, ${e.date} valittu`};var OE={};OE={dateRange:e=>`${e.startDate} à ${e.endDate}`,dateSelected:e=>`${e.date} sélectionné`,finishRangeSelectionPrompt:"Cliquer pour finir de sélectionner la plage de dates",maximumDate:"Dernière date disponible",minimumDate:"Première date disponible",next:"Suivant",previous:"Précédent",selectedDateDescription:e=>`Date sélectionnée : ${e.date}`,selectedRangeDescription:e=>`Plage sélectionnée : ${e.dateRange}`,startRangeSelectionPrompt:"Cliquer pour commencer à sélectionner la plage de dates",todayDate:e=>`Aujourd'hui, ${e.date}`,todayDateSelected:e=>`Aujourd’hui, ${e.date} sélectionné`};var BE={};BE={dateRange:e=>`${e.startDate} עד ${e.endDate}`,dateSelected:e=>`${e.date} נבחר`,finishRangeSelectionPrompt:"חץ כדי לסיים את בחירת טווח התאריכים",maximumDate:"תאריך פנוי אחרון",minimumDate:"תאריך פנוי ראשון",next:"הבא",previous:"הקודם",selectedDateDescription:e=>`תאריך נבחר: ${e.date}`,selectedRangeDescription:e=>`טווח נבחר: ${e.dateRange}`,startRangeSelectionPrompt:"לחץ כדי להתחיל בבחירת טווח התאריכים",todayDate:e=>`היום, ${e.date}`,todayDateSelected:e=>`היום, ${e.date} נבחר`};var IE={};IE={dateRange:e=>`${e.startDate} do ${e.endDate}`,dateSelected:e=>`${e.date} odabran`,finishRangeSelectionPrompt:"Kliknite da dovršite raspon odabranih datuma",maximumDate:"Posljednji raspoloživi datum",minimumDate:"Prvi raspoloživi datum",next:"Sljedeći",previous:"Prethodni",selectedDateDescription:e=>`Odabrani datum: ${e.date}`,selectedRangeDescription:e=>`Odabrani raspon: ${e.dateRange}`,startRangeSelectionPrompt:"Kliknite da započnete raspon odabranih datuma",todayDate:e=>`Danas, ${e.date}`,todayDateSelected:e=>`Danas, odabran ${e.date}`};var LE={};LE={dateRange:e=>`${e.startDate}–${e.endDate}`,dateSelected:e=>`${e.date} kiválasztva`,finishRangeSelectionPrompt:"Kattintson a dátumtartomány kijelölésének befejezéséhez",maximumDate:"Utolsó elérhető dátum",minimumDate:"Az első elérhető dátum",next:"Következő",previous:"Előző",selectedDateDescription:e=>`Kijelölt dátum: ${e.date}`,selectedRangeDescription:e=>`Kijelölt tartomány: ${e.dateRange}`,startRangeSelectionPrompt:"Kattintson a dátumtartomány kijelölésének indításához",todayDate:e=>`Ma, ${e.date}`,todayDateSelected:e=>`Ma, ${e.date} kijelölve`};var NE={};NE={dateRange:e=>`Da ${e.startDate} a ${e.endDate}`,dateSelected:e=>`${e.date} selezionata`,finishRangeSelectionPrompt:"Fai clic per completare la selezione dell’intervallo di date",maximumDate:"Ultima data disponibile",minimumDate:"Prima data disponibile",next:"Successivo",previous:"Precedente",selectedDateDescription:e=>`Data selezionata: ${e.date}`,selectedRangeDescription:e=>`Intervallo selezionato: ${e.dateRange}`,startRangeSelectionPrompt:"Fai clic per selezionare l’intervallo di date",todayDate:e=>`Oggi, ${e.date}`,todayDateSelected:e=>`Oggi, ${e.date} selezionata`};var jE={};jE={dateRange:e=>`${e.startDate} から ${e.endDate}`,dateSelected:e=>`${e.date} を選択`,finishRangeSelectionPrompt:"クリックして日付範囲の選択を終了",maximumDate:"最終利用可能日",minimumDate:"最初の利用可能日",next:"次へ",previous:"前へ",selectedDateDescription:e=>`選択した日付 : ${e.date}`,selectedRangeDescription:e=>`選択範囲 : ${e.dateRange}`,startRangeSelectionPrompt:"クリックして日付範囲の選択を開始",todayDate:e=>`本日、${e.date}`,todayDateSelected:e=>`本日、${e.date} を選択`};var zE={};zE={dateRange:e=>`${e.startDate} ~ ${e.endDate}`,dateSelected:e=>`${e.date} 선택됨`,finishRangeSelectionPrompt:"날짜 범위 선택을 완료하려면 클릭하십시오.",maximumDate:"마지막으로 사용 가능한 일자",minimumDate:"처음으로 사용 가능한 일자",next:"다음",previous:"이전",selectedDateDescription:e=>`선택 일자: ${e.date}`,selectedRangeDescription:e=>`선택 범위: ${e.dateRange}`,startRangeSelectionPrompt:"날짜 범위 선택을 시작하려면 클릭하십시오.",todayDate:e=>`오늘, ${e.date}`,todayDateSelected:e=>`오늘, ${e.date} 선택됨`};var VE={};VE={dateRange:e=>`Nuo ${e.startDate} iki ${e.endDate}`,dateSelected:e=>`Pasirinkta ${e.date}`,finishRangeSelectionPrompt:"Spustelėkite, kad baigtumėte pasirinkti datų intervalą",maximumDate:"Paskutinė galima data",minimumDate:"Pirmoji galima data",next:"Paskesnis",previous:"Ankstesnis",selectedDateDescription:e=>`Pasirinkta data: ${e.date}`,selectedRangeDescription:e=>`Pasirinktas intervalas: ${e.dateRange}`,startRangeSelectionPrompt:"Spustelėkite, kad pradėtumėte pasirinkti datų intervalą",todayDate:e=>`Šiandien, ${e.date}`,todayDateSelected:e=>`Šiandien, pasirinkta ${e.date}`};var WE={};WE={dateRange:e=>`No ${e.startDate} līdz ${e.endDate}`,dateSelected:e=>`Atlasīts: ${e.date}`,finishRangeSelectionPrompt:"Noklikšķiniet, lai pabeigtu datumu diapazona atlasi",maximumDate:"Pēdējais pieejamais datums",minimumDate:"Pirmais pieejamais datums",next:"Tālāk",previous:"Atpakaļ",selectedDateDescription:e=>`Atlasītais datums: ${e.date}`,selectedRangeDescription:e=>`Atlasītais diapazons: ${e.dateRange}`,startRangeSelectionPrompt:"Noklikšķiniet, lai sāktu datumu diapazona atlasi",todayDate:e=>`Šodien, ${e.date}`,todayDateSelected:e=>`Atlasīta šodiena, ${e.date}`};var UE={};UE={dateRange:e=>`${e.startDate} til ${e.endDate}`,dateSelected:e=>`${e.date} valgt`,finishRangeSelectionPrompt:"Klikk for å fullføre valg av datoområde",maximumDate:"Siste tilgjengelige dato",minimumDate:"Første tilgjengelige dato",next:"Neste",previous:"Forrige",selectedDateDescription:e=>`Valgt dato: ${e.date}`,selectedRangeDescription:e=>`Valgt område: ${e.dateRange}`,startRangeSelectionPrompt:"Klikk for å starte valg av datoområde",todayDate:e=>`I dag, ${e.date}`,todayDateSelected:e=>`I dag, ${e.date} valgt`};var HE={};HE={dateRange:e=>`${e.startDate} tot ${e.endDate}`,dateSelected:e=>`${e.date} geselecteerd`,finishRangeSelectionPrompt:"Klik om de selectie van het datumbereik te voltooien",maximumDate:"Laatste beschikbare datum",minimumDate:"Eerste beschikbare datum",next:"Volgende",previous:"Vorige",selectedDateDescription:e=>`Geselecteerde datum: ${e.date}`,selectedRangeDescription:e=>`Geselecteerd bereik: ${e.dateRange}`,startRangeSelectionPrompt:"Klik om het datumbereik te selecteren",todayDate:e=>`Vandaag, ${e.date}`,todayDateSelected:e=>`Vandaag, ${e.date} geselecteerd`};var KE={};KE={dateRange:e=>`${e.startDate} do ${e.endDate}`,dateSelected:e=>`Wybrano ${e.date}`,finishRangeSelectionPrompt:"Kliknij, aby zakończyć wybór zakresu dat",maximumDate:"Ostatnia dostępna data",minimumDate:"Pierwsza dostępna data",next:"Dalej",previous:"Wstecz",selectedDateDescription:e=>`Wybrana data: ${e.date}`,selectedRangeDescription:e=>`Wybrany zakres: ${e.dateRange}`,startRangeSelectionPrompt:"Kliknij, aby rozpocząć wybór zakresu dat",todayDate:e=>`Dzisiaj, ${e.date}`,todayDateSelected:e=>`Dzisiaj wybrano ${e.date}`};var YE={};YE={dateRange:e=>`${e.startDate} a ${e.endDate}`,dateSelected:e=>`${e.date} selecionado`,finishRangeSelectionPrompt:"Clique para concluir a seleção do intervalo de datas",maximumDate:"Última data disponível",minimumDate:"Primeira data disponível",next:"Próximo",previous:"Anterior",selectedDateDescription:e=>`Data selecionada: ${e.date}`,selectedRangeDescription:e=>`Intervalo selecionado: ${e.dateRange}`,startRangeSelectionPrompt:"Clique para iniciar a seleção do intervalo de datas",todayDate:e=>`Hoje, ${e.date}`,todayDateSelected:e=>`Hoje, ${e.date} selecionado`};var qE={};qE={dateRange:e=>`${e.startDate} a ${e.endDate}`,dateSelected:e=>`${e.date} selecionado`,finishRangeSelectionPrompt:"Clique para terminar de selecionar o intervalo de datas",maximumDate:"Última data disponível",minimumDate:"Primeira data disponível",next:"Próximo",previous:"Anterior",selectedDateDescription:e=>`Data selecionada: ${e.date}`,selectedRangeDescription:e=>`Intervalo selecionado: ${e.dateRange}`,startRangeSelectionPrompt:"Clique para começar a selecionar o intervalo de datas",todayDate:e=>`Hoje, ${e.date}`,todayDateSelected:e=>`Hoje, ${e.date} selecionado`};var GE={};GE={dateRange:e=>`De la ${e.startDate} până la ${e.endDate}`,dateSelected:e=>`${e.date} selectată`,finishRangeSelectionPrompt:"Apăsaţi pentru a finaliza selecţia razei pentru dată",maximumDate:"Ultima dată disponibilă",minimumDate:"Prima dată disponibilă",next:"Următorul",previous:"Înainte",selectedDateDescription:e=>`Dată selectată: ${e.date}`,selectedRangeDescription:e=>`Interval selectat: ${e.dateRange}`,startRangeSelectionPrompt:"Apăsaţi pentru a începe selecţia razei pentru dată",todayDate:e=>`Astăzi, ${e.date}`,todayDateSelected:e=>`Azi, ${e.date} selectată`};var ZE={};ZE={dateRange:e=>`С ${e.startDate} по ${e.endDate}`,dateSelected:e=>`Выбрано ${e.date}`,finishRangeSelectionPrompt:"Щелкните, чтобы завершить выбор диапазона дат",maximumDate:"Последняя доступная дата",minimumDate:"Первая доступная дата",next:"Далее",previous:"Назад",selectedDateDescription:e=>`Выбранная дата: ${e.date}`,selectedRangeDescription:e=>`Выбранный диапазон: ${e.dateRange}`,startRangeSelectionPrompt:"Щелкните, чтобы начать выбор диапазона дат",todayDate:e=>`Сегодня, ${e.date}`,todayDateSelected:e=>`Сегодня, выбрано ${e.date}`};var XE={};XE={dateRange:e=>`Od ${e.startDate} do ${e.endDate}`,dateSelected:e=>`Vybratý dátum ${e.date}`,finishRangeSelectionPrompt:"Kliknutím dokončíte výber rozsahu dátumov",maximumDate:"Posledný dostupný dátum",minimumDate:"Prvý dostupný dátum",next:"Nasledujúce",previous:"Predchádzajúce",selectedDateDescription:e=>`Vybratý dátum: ${e.date}`,selectedRangeDescription:e=>`Vybratý rozsah: ${e.dateRange}`,startRangeSelectionPrompt:"Kliknutím spustíte výber rozsahu dátumov",todayDate:e=>`Dnes ${e.date}`,todayDateSelected:e=>`Vybratý dnešný dátum ${e.date}`};var QE={};QE={dateRange:e=>`${e.startDate} do ${e.endDate}`,dateSelected:e=>`${e.date} izbrano`,finishRangeSelectionPrompt:"Kliknite za dokončanje izbire datumskega obsega",maximumDate:"Zadnji razpoložljivi datum",minimumDate:"Prvi razpoložljivi datum",next:"Naprej",previous:"Nazaj",selectedDateDescription:e=>`Izbrani datum: ${e.date}`,selectedRangeDescription:e=>`Izbrano območje: ${e.dateRange}`,startRangeSelectionPrompt:"Kliknite za začetek izbire datumskega obsega",todayDate:e=>`Danes, ${e.date}`,todayDateSelected:e=>`Danes, ${e.date} izbrano`};var JE={};JE={dateRange:e=>`${e.startDate} do ${e.endDate}`,dateSelected:e=>`${e.date} izabran`,finishRangeSelectionPrompt:"Kliknite da dovršite opseg izabranih datuma",maximumDate:"Zadnji raspoloživi datum",minimumDate:"Prvi raspoloživi datum",next:"Sledeći",previous:"Prethodni",selectedDateDescription:e=>`Izabrani datum: ${e.date}`,selectedRangeDescription:e=>`Izabrani period: ${e.dateRange}`,startRangeSelectionPrompt:"Kliknite da započnete opseg izabranih datuma",todayDate:e=>`Danas, ${e.date}`,todayDateSelected:e=>`Danas, izabran ${e.date}`};var e7={};e7={dateRange:e=>`${e.startDate} till ${e.endDate}`,dateSelected:e=>`${e.date} har valts`,finishRangeSelectionPrompt:"Klicka för att avsluta val av datumintervall",maximumDate:"Sista tillgängliga datum",minimumDate:"Första tillgängliga datum",next:"Nästa",previous:"Föregående",selectedDateDescription:e=>`Valt datum: ${e.date}`,selectedRangeDescription:e=>`Valt intervall: ${e.dateRange}`,startRangeSelectionPrompt:"Klicka för att välja datumintervall",todayDate:e=>`Idag, ${e.date}`,todayDateSelected:e=>`Idag, ${e.date} har valts`};var t7={};t7={dateRange:e=>`${e.startDate} - ${e.endDate}`,dateSelected:e=>`${e.date} seçildi`,finishRangeSelectionPrompt:"Tarih aralığı seçimini tamamlamak için tıklayın",maximumDate:"Son müsait tarih",minimumDate:"İlk müsait tarih",next:"Sonraki",previous:"Önceki",selectedDateDescription:e=>`Seçilen Tarih: ${e.date}`,selectedRangeDescription:e=>`Seçilen Aralık: ${e.dateRange}`,startRangeSelectionPrompt:"Tarih aralığı seçimini başlatmak için tıklayın",todayDate:e=>`Bugün, ${e.date}`,todayDateSelected:e=>`Bugün, ${e.date} seçildi`};var n7={};n7={dateRange:e=>`${e.startDate} — ${e.endDate}`,dateSelected:e=>`Вибрано ${e.date}`,finishRangeSelectionPrompt:"Натисніть, щоб завершити вибір діапазону дат",maximumDate:"Остання доступна дата",minimumDate:"Перша доступна дата",next:"Наступний",previous:"Попередній",selectedDateDescription:e=>`Вибрана дата: ${e.date}`,selectedRangeDescription:e=>`Вибраний діапазон: ${e.dateRange}`,startRangeSelectionPrompt:"Натисніть, щоб почати вибір діапазону дат",todayDate:e=>`Сьогодні, ${e.date}`,todayDateSelected:e=>`Сьогодні, вибрано ${e.date}`};var r7={};r7={dateRange:e=>`${e.startDate} 至 ${e.endDate}`,dateSelected:e=>`已选择 ${e.date}`,finishRangeSelectionPrompt:"单击以完成选择日期范围",maximumDate:"最后一个可用日期",minimumDate:"第一个可用日期",next:"下一页",previous:"上一页",selectedDateDescription:e=>`选定的日期:${e.date}`,selectedRangeDescription:e=>`选定的范围:${e.dateRange}`,startRangeSelectionPrompt:"单击以开始选择日期范围",todayDate:e=>`今天,即 ${e.date}`,todayDateSelected:e=>`已选择今天,即 ${e.date}`};var i7={};i7={dateRange:e=>`${e.startDate} 至 ${e.endDate}`,dateSelected:e=>`已選取 ${e.date}`,finishRangeSelectionPrompt:"按一下以完成選取日期範圍",maximumDate:"最後一個可用日期",minimumDate:"第一個可用日期",next:"下一頁",previous:"上一頁",selectedDateDescription:e=>`選定的日期:${e.date}`,selectedRangeDescription:e=>`選定的範圍:${e.dateRange}`,startRangeSelectionPrompt:"按一下以開始選取日期範圍",todayDate:e=>`今天,${e.date}`,todayDateSelected:e=>`已選取今天,${e.date}`};var zl={};zl={"ar-AE":EE,"bg-BG":SE,"cs-CZ":CE,"da-DK":kE,"de-DE":PE,"el-GR":TE,"en-US":RE,"es-ES":ME,"et-EE":FE,"fi-FI":AE,"fr-FR":OE,"he-IL":BE,"hr-HR":IE,"hu-HU":LE,"it-IT":NE,"ja-JP":jE,"ko-KR":zE,"lt-LT":VE,"lv-LV":WE,"nb-NO":UE,"nl-NL":HE,"pl-PL":KE,"pt-BR":YE,"pt-PT":qE,"ro-RO":GE,"ru-RU":ZE,"sk-SK":XE,"sl-SI":QE,"sr-SP":JE,"sv-SE":e7,"tr-TR":t7,"uk-UA":n7,"zh-CN":r7,"zh-TW":i7};function a7(e){return e&&e.__esModule?e.default:e}const S$=new WeakMap;function ml(e){return(e==null?void 0:e.calendar.identifier)==="gregory"&&e.era==="BC"?"short":void 0}function NN(e){let t=Sn(a7(zl),"@react-aria/calendar"),n,r;"highlightedRange"in e?{start:n,end:r}=e.highlightedRange||{}:n=r=e.value;let i=xn({weekday:"long",month:"long",year:"numeric",day:"numeric",era:ml(n)||ml(r),timeZone:e.timeZone}),a="anchorDate"in e?e.anchorDate:null;return y.useMemo(()=>{if(!a&&n&&r)if(Ze(n,r)){let s=i.format(n.toDate(e.timeZone));return t.format("selectedDateDescription",{date:s})}else{let s=Eg(i,t,n,r,e.timeZone);return t.format("selectedRangeDescription",{dateRange:s})}return""},[n,r,a,e.timeZone,t,i])}function _g(e,t,n,r){let i=Sn(a7(zl),"@react-aria/calendar"),a=ml(e)||ml(t),s=xn({month:"long",year:"numeric",era:a,calendar:e.calendar.identifier,timeZone:n}),o=xn({month:"long",year:"numeric",day:"numeric",era:a,calendar:e.calendar.identifier,timeZone:n});return y.useMemo(()=>{if(Ze(e,na(e))){if(Ze(t,Uc(e)))return s.format(e.toDate(n));if(Ze(t,Uc(t)))return r?Eg(s,i,e,t,n):s.formatRange(e.toDate(n),t.toDate(n))}return r?Eg(o,i,e,t,n):o.formatRange(e.toDate(n),t.toDate(n))},[e,t,s,o,i,n,r])}function Eg(e,t,n,r,i){let a=e.formatRangeToParts(n.toDate(i),r.toDate(i)),s=-1;for(let u=0;u<a.length;u++){let c=a[u];if(c.source==="shared"&&c.type==="literal")s=u;else if(c.source==="endRange")break}let o="",l="";for(let u=0;u<a.length;u++)u<s?o+=a[u].value:u>s&&(l+=a[u].value);return t.format("dateRange",{startDate:o,endDate:l})}const s7=7e3;let Io=null;function Sg(e,t="assertive",n=s7){Io||(Io=new zN),Io.announce(e,t,n)}function jN(e){Io&&Io.clear(e)}class zN{createLog(t){let n=document.createElement("div");return n.setAttribute("role","log"),n.setAttribute("aria-live",t),n.setAttribute("aria-relevant","additions"),n}destroy(){this.node&&(document.body.removeChild(this.node),this.node=null)}announce(t,n="assertive",r=s7){if(!this.node)return;let i=document.createElement("div");i.textContent=t,n==="assertive"?this.assertiveLog.appendChild(i):this.politeLog.appendChild(i),t!==""&&setTimeout(()=>{i.remove()},r)}clear(t){this.node&&((!t||t==="assertive")&&(this.assertiveLog.innerHTML=""),(!t||t==="polite")&&(this.politeLog.innerHTML=""))}constructor(){this.node=document.createElement("div"),this.node.dataset.liveAnnouncer="true",Object.assign(this.node.style,{border:0,clip:"rect(0 0 0 0)",clipPath:"inset(50%)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap"}),this.assertiveLog=this.createLog("assertive"),this.node.appendChild(this.assertiveLog),this.politeLog=this.createLog("polite"),this.node.appendChild(this.politeLog),document.body.prepend(this.node)}}function VN(e){return e&&e.__esModule?e.default:e}function WN(e,t){let n=Sn(VN(zl),"@react-aria/calendar"),r=Xt(e),i=_g(t.visibleRange.start,t.visibleRange.end,t.timeZone,!1),a=_g(t.visibleRange.start,t.visibleRange.end,t.timeZone,!0);t5(()=>{t.isFocused||Sg(a)},[a]);let s=NN(t);t5(()=>{s&&Sg(s,"polite",4e3)},[s]);let o=Xc([!!e.errorMessage,e.isInvalid,e.validationState]);S$.set(t,{ariaLabel:e["aria-label"],ariaLabelledBy:e["aria-labelledby"],errorMessageId:o,selectedDateDescription:s});let[l,u]=y.useState(!1),c=e.isDisabled||t.isNextVisibleRangeInvalid();c&&l&&(u(!1),t.setFocused(!0));let[d,f]=y.useState(!1),h=e.isDisabled||t.isPreviousVisibleRangeInvalid();h&&d&&(f(!1),t.setFocused(!0));let p=jl({id:e.id,"aria-label":[e["aria-label"],a].filter(Boolean).join(", "),"aria-labelledby":e["aria-labelledby"]});return{calendarProps:de(r,p,{role:"application","aria-describedby":e["aria-describedby"]||void 0}),nextButtonProps:{onPress:()=>t.focusNextPage(),"aria-label":n.format("next"),isDisabled:c,onFocusChange:u},prevButtonProps:{onPress:()=>t.focusPreviousPage(),"aria-label":n.format("previous"),isDisabled:h,onFocusChange:f},errorMessageProps:{id:o},title:i}}function UN(e,t,n){let r=WN(e,t),i=y.useRef(!1),a=y.useRef(typeof window<"u"?window:null);return os(a,"pointerdown",o=>{i.current=o.width===0&&o.height===0}),os(a,"pointerup",o=>{if(i.current){i.current=!1;return}if(t.setDragging(!1),!t.anchorDate)return;let l=o.target;n.current&&n.current.contains(document.activeElement)&&(!n.current.contains(l)||!l.closest('button, [role="button"]'))&&t.selectFocusedDate()}),r.calendarProps.onBlur=o=>{n.current&&(!o.relatedTarget||!n.current.contains(o.relatedTarget))&&t.anchorDate&&t.selectFocusedDate()},os(n,"touchmove",o=>{t.isDragging&&o.preventDefault()},{passive:!1,capture:!0}),r}function HN(e,t){let{startDate:n=t.visibleRange.start,endDate:r=t.visibleRange.end}=e,{direction:i}=Qe(),a=h=>{switch(h.key){case"Enter":case" ":h.preventDefault(),t.selectFocusedDate();break;case"PageUp":h.preventDefault(),h.stopPropagation(),t.focusPreviousSection(h.shiftKey);break;case"PageDown":h.preventDefault(),h.stopPropagation(),t.focusNextSection(h.shiftKey);break;case"End":h.preventDefault(),h.stopPropagation(),t.focusSectionEnd();break;case"Home":h.preventDefault(),h.stopPropagation(),t.focusSectionStart();break;case"ArrowLeft":h.preventDefault(),h.stopPropagation(),i==="rtl"?t.focusNextDay():t.focusPreviousDay();break;case"ArrowUp":h.preventDefault(),h.stopPropagation(),t.focusPreviousRow();break;case"ArrowRight":h.preventDefault(),h.stopPropagation(),i==="rtl"?t.focusPreviousDay():t.focusNextDay();break;case"ArrowDown":h.preventDefault(),h.stopPropagation(),t.focusNextRow();break;case"Escape":"setAnchorDate"in t&&(h.preventDefault(),t.setAnchorDate(null));break}},s=_g(n,r,t.timeZone,!0),{ariaLabel:o,ariaLabelledBy:l}=S$.get(t),u=jl({"aria-label":[o,s].filter(Boolean).join(", "),"aria-labelledby":l}),c=xn({weekday:e.weekdayStyle||"narrow",timeZone:t.timeZone}),{locale:d}=Qe(),f=y.useMemo(()=>{let h=ul(Il(t.timeZone),d);return[...new Array(7).keys()].map(p=>{let b=h.add({days:p}).toDate(t.timeZone);return c.format(b)})},[d,t.timeZone,c]);return{gridProps:de(u,{role:"grid","aria-readonly":t.isReadOnly||null,"aria-disabled":t.isDisabled||null,"aria-multiselectable":"highlightedRange"in t||void 0,onKeyDown:a,onFocus:()=>t.setFocused(!0),onBlur:()=>t.setFocused(!1)}),headerProps:{"aria-hidden":!0},weekDays:f}}function KN(e){return e&&e.__esModule?e.default:e}function YN(e,t,n){let{date:r,isDisabled:i}=e,{errorMessageId:a,selectedDateDescription:s}=S$.get(t),o=Sn(KN(zl),"@react-aria/calendar"),l=xn({weekday:"long",day:"numeric",month:"long",year:"numeric",era:ml(r),timeZone:t.timeZone}),u=t.isSelected(r),c=t.isCellFocused(r);i=i||t.isCellDisabled(r);let d=t.isCellUnavailable(r),f=!i&&!d,h=t.isValueInvalid&&("highlightedRange"in t?!t.anchorDate&&t.highlightedRange&&r.compare(t.highlightedRange.start)>=0&&r.compare(t.highlightedRange.end)<=0:t.value&&Ze(t.value,r));h&&(u=!0),r=aE(r,sg);let p=y.useMemo(()=>r.toDate(t.timeZone),[r,t.timeZone]),g=w8(r,t.timeZone),b=y.useMemo(()=>{let E="";return"highlightedRange"in t&&t.value&&!t.anchorDate&&(Ze(r,t.value.start)||Ze(r,t.value.end))&&(E=s+", "),E+=l.format(p),g?E=o.format(u?"todayDateSelected":"todayDate",{date:E}):u&&(E=o.format("dateSelected",{date:E})),t.minValue&&Ze(r,t.minValue)?E+=", "+o.format("minimumDate"):t.maxValue&&Ze(r,t.maxValue)&&(E+=", "+o.format("maximumDate")),E},[l,p,o,u,g,r,t,s]),v="";"anchorDate"in t&&c&&!t.isReadOnly&&f&&(t.anchorDate?v=o.format("finishRangeSelectionPrompt"):v=o.format("startRangeSelectionPrompt"));let m=$$(v),$=y.useRef(!1),w=y.useRef(!1),D=y.useRef(null),{pressProps:S,isPressed:k}=w$({shouldCancelOnPointerExit:"anchorDate"in t&&!!t.anchorDate,preventFocusOnPress:!0,isDisabled:!f||t.isReadOnly,onPressStart(E){if(t.isReadOnly){t.setFocusedDate(r);return}if("highlightedRange"in t&&!t.anchorDate&&(E.pointerType==="mouse"||E.pointerType==="touch")){if(t.highlightedRange&&!h){if(Ze(r,t.highlightedRange.start)){t.setAnchorDate(t.highlightedRange.end),t.setFocusedDate(r),t.setDragging(!0),w.current=!0;return}else if(Ze(r,t.highlightedRange.end)){t.setAnchorDate(t.highlightedRange.start),t.setFocusedDate(r),t.setDragging(!0),w.current=!0;return}}let A=()=>{t.setDragging(!0),D.current=null,t.selectDate(r),t.setFocusedDate(r),$.current=!0};E.pointerType==="touch"?D.current=setTimeout(A,200):A()}},onPressEnd(){w.current=!1,$.current=!1,clearTimeout(D.current),D.current=null},onPress(){!("anchorDate"in t)&&!t.isReadOnly&&(t.selectDate(r),t.setFocusedDate(r))},onPressUp(E){if(!t.isReadOnly&&("anchorDate"in t&&D.current&&(t.selectDate(r),t.setFocusedDate(r)),"anchorDate"in t))if(w.current)t.setAnchorDate(r);else if(t.anchorDate&&!$.current)t.selectDate(r),t.setFocusedDate(r);else if(E.pointerType==="keyboard"&&!t.anchorDate){t.selectDate(r);let A=r.add({days:1});t.isInvalid(A)&&(A=r.subtract({days:1})),t.isInvalid(A)||t.setFocusedDate(A)}else E.pointerType==="virtual"&&(t.selectDate(r),t.setFocusedDate(r))}}),x=null;i||(x=Ze(r,t.focusedDate)?0:-1),y.useEffect(()=>{c&&n.current&&(Kr(n.current),yE()!=="pointer"&&document.activeElement===n.current&&iE(n.current,{containingElement:Ff(n.current)}))},[c,n]);let T=xn({day:"numeric",timeZone:t.timeZone,calendar:r.calendar.identifier}),P=y.useMemo(()=>T.formatToParts(p).find(E=>E.type==="day").value,[T,p]);return{cellProps:{role:"gridcell","aria-disabled":!f||null,"aria-selected":u||null,"aria-invalid":h||null},buttonProps:de(S,{onFocus(){i||t.setFocusedDate(r)},tabIndex:x,role:"button","aria-disabled":!f||null,"aria-label":b,"aria-invalid":h||null,"aria-describedby":[h?a:null,m["aria-describedby"]].filter(Boolean).join(" ")||void 0,onPointerEnter(E){"highlightDate"in t&&(E.pointerType!=="touch"||t.isDragging)&&f&&t.highlightDate(r)},onPointerDown(E){"releasePointerCapture"in E.target&&E.target.releasePointerCapture(E.pointerId)},onContextMenu(E){E.preventDefault()}}),isPressed:k,isFocused:c,isSelected:u,isDisabled:i,isUnavailable:d,isOutsideVisibleRange:r.compare(t.visibleRange.start)<0||r.compare(t.visibleRange.end)>0,isInvalid:h,formattedDate:P}}function qN(e,t,n){let{validationBehavior:r,focus:i}=e;he(()=>{if(r==="native"&&(n!=null&&n.current)){let l=t.realtimeValidation.isInvalid?t.realtimeValidation.validationErrors.join(" ")||"Invalid value.":"";n.current.setCustomValidity(l),n.current.hasAttribute("title")||(n.current.title=""),t.realtimeValidation.isInvalid||t.updateValidation(ZN(n.current))}});let a=pt(()=>{t.resetValidation()}),s=pt(l=>{var u;t.displayValidation.isInvalid||t.commitValidation();let c=n==null||(u=n.current)===null||u===void 0?void 0:u.form;if(!l.defaultPrevented&&n&&c&&XN(c)===n.current){var d;i?i():(d=n.current)===null||d===void 0||d.focus(),pN("keyboard")}l.preventDefault()}),o=pt(()=>{t.commitValidation()});y.useEffect(()=>{let l=n==null?void 0:n.current;if(!l)return;let u=l.form;return l.addEventListener("invalid",s),l.addEventListener("change",o),u==null||u.addEventListener("reset",a),()=>{l.removeEventListener("invalid",s),l.removeEventListener("change",o),u==null||u.removeEventListener("reset",a)}},[n,s,o,a,r])}function GN(e){let t=e.validity;return{badInput:t.badInput,customError:t.customError,patternMismatch:t.patternMismatch,rangeOverflow:t.rangeOverflow,rangeUnderflow:t.rangeUnderflow,stepMismatch:t.stepMismatch,tooLong:t.tooLong,tooShort:t.tooShort,typeMismatch:t.typeMismatch,valueMissing:t.valueMissing,valid:t.valid}}function ZN(e){return{isInvalid:!e.validity.valid,validationDetails:GN(e),validationErrors:e.validationMessage?[e.validationMessage]:[]}}function XN(e){for(let t=0;t<e.elements.length;t++){let n=e.elements[t];if(!n.validity.valid)return n}return null}const Nf={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valueMissing:!1,valid:!0},o7={...Nf,customError:!0,valid:!1},Li={isInvalid:!1,validationDetails:Nf,validationErrors:[]},QN=y.createContext({}),sd="__formValidationState"+Date.now();function l7(e){if(e[sd]){let{realtimeValidation:t,displayValidation:n,updateValidation:r,resetValidation:i,commitValidation:a}=e[sd];return{realtimeValidation:t,displayValidation:n,updateValidation:r,resetValidation:i,commitValidation:a}}return JN(e)}function JN(e){let{isInvalid:t,validationState:n,name:r,value:i,builtinValidation:a,validate:s,validationBehavior:o="aria"}=e;n&&(t||(t=n==="invalid"));let l=t!==void 0?{isInvalid:t,validationErrors:[],validationDetails:o7}:null,u=y.useMemo(()=>v5(ej(s,i)),[s,i]);a!=null&&a.validationDetails.valid&&(a=null);let c=y.useContext(QN),d=y.useMemo(()=>r?Array.isArray(r)?r.flatMap(P=>Cg(c[P])):Cg(c[r]):[],[c,r]),[f,h]=y.useState(c),[p,g]=y.useState(!1);c!==f&&(h(c),g(!1));let b=y.useMemo(()=>v5(p?[]:d),[p,d]),v=y.useRef(Li),[m,$]=y.useState(Li),w=y.useRef(Li),D=()=>{if(!S)return;k(!1);let P=u||a||v.current;Kh(P,w.current)||(w.current=P,$(P))},[S,k]=y.useState(!1);return y.useEffect(D),{realtimeValidation:l||b||u||a||Li,displayValidation:o==="native"?l||b||m:l||b||u||a||m,updateValidation(P){o==="aria"&&!Kh(m,P)?$(P):v.current=P},resetValidation(){let P=Li;Kh(P,w.current)||(w.current=P,$(P)),o==="native"&&k(!1),g(!0)},commitValidation(){o==="native"&&k(!0),g(!0)}}}function Cg(e){return e?Array.isArray(e)?e:[e]:[]}function ej(e,t){if(typeof e=="function"){let n=e(t);if(n&&typeof n!="boolean")return Cg(n)}return[]}function v5(e){return e.length?{isInvalid:!0,validationErrors:e,validationDetails:o7}:null}function Kh(e,t){return e===t?!0:e&&t&&e.isInvalid===t.isInvalid&&e.validationErrors.length===t.validationErrors.length&&e.validationErrors.every((n,r)=>n===t.validationErrors[r])&&Object.entries(e.validationDetails).every(([n,r])=>t.validationDetails[n]===r)}function od(...e){let t=new Set,n=!1,r={...Nf};for(let s of e){var i,a;for(let o of s.validationErrors)t.add(o);n||(n=s.isInvalid);for(let o in r)(i=r)[a=o]||(i[a]=s.validationDetails[o])}return r.valid=!n,{isInvalid:n,validationErrors:[...t],validationDetails:r}}const Ga={top:"top",bottom:"top",left:"left",right:"left"},ld={top:"bottom",bottom:"top",left:"right",right:"left"},tj={top:"left",left:"top"},kg={top:"height",left:"width"},u7={width:"totalWidth",height:"totalHeight"},Du={};let Lt=typeof document<"u"&&window.visualViewport;function b5(e){let t=0,n=0,r=0,i=0,a=0,s=0,o={},l=(Lt==null?void 0:Lt.scale)>1;if(e.tagName==="BODY"){let d=document.documentElement;r=d.clientWidth,i=d.clientHeight;var u;t=(u=Lt==null?void 0:Lt.width)!==null&&u!==void 0?u:r;var c;n=(c=Lt==null?void 0:Lt.height)!==null&&c!==void 0?c:i,o.top=d.scrollTop||e.scrollTop,o.left=d.scrollLeft||e.scrollLeft,Lt&&(a=Lt.offsetTop,s=Lt.offsetLeft)}else({width:t,height:n,top:a,left:s}=ls(e)),o.top=e.scrollTop,o.left=e.scrollLeft,r=t,i=n;return X8()&&(e.tagName==="BODY"||e.tagName==="HTML")&&l&&(o.top=0,o.left=0,a=Lt.pageTop,s=Lt.pageLeft),{width:t,height:n,totalWidth:r,totalHeight:i,scroll:o,top:a,left:s}}function nj(e){return{top:e.scrollTop,left:e.scrollLeft,width:e.scrollWidth,height:e.scrollHeight}}function y5(e,t,n,r,i,a,s){let o=i.scroll[e],l=r[kg[e]],u=r.scroll[Ga[e]]+a,c=l+r.scroll[Ga[e]]-a,d=t-o+s[e]-r[Ga[e]],f=t-o+n+s[e]-r[Ga[e]];return d<u?u-d:f>c?Math.max(c-f,u-d):0}function rj(e){let t=window.getComputedStyle(e);return{top:parseInt(t.marginTop,10)||0,bottom:parseInt(t.marginBottom,10)||0,left:parseInt(t.marginLeft,10)||0,right:parseInt(t.marginRight,10)||0}}function $5(e){if(Du[e])return Du[e];let[t,n]=e.split(" "),r=Ga[t]||"right",i=tj[r];Ga[n]||(n="center");let a=kg[r],s=kg[i];return Du[e]={placement:t,crossPlacement:n,axis:r,crossAxis:i,size:a,crossSize:s},Du[e]}function Yh(e,t,n,r,i,a,s,o,l,u){let{placement:c,crossPlacement:d,axis:f,crossAxis:h,size:p,crossSize:g}=r,b={};b[h]=e[h],d==="center"?b[h]+=(e[g]-n[g])/2:d!==h&&(b[h]+=e[g]-n[g]),b[h]+=a;const v=e[h]-n[g]+l+u,m=e[h]+e[g]-l-u;if(b[h]=gg(b[h],v,m),c===f){const $=o?s[p]:t[u7[p]];b[ld[f]]=Math.floor($-e[f]+i)}else b[f]=Math.floor(e[f]+e[p]+i);return b}function ij(e,t,n,r,i,a,s,o){const l=r?n.height:t[u7.height];let u=e.top!=null?n.top+e.top:n.top+(l-e.bottom-s),c=o!=="top"?Math.max(0,t.height+t.top+t.scroll.top-u-(i.top+i.bottom+a)):Math.max(0,u+s-(t.top+t.scroll.top)-(i.top+i.bottom+a));return Math.min(t.height-a*2,c)}function x5(e,t,n,r,i,a){let{placement:s,axis:o,size:l}=a;return s===o?Math.max(0,n[o]-e[o]-e.scroll[o]+t[o]-r[o]-r[ld[o]]-i):Math.max(0,e[l]+e[o]+e.scroll[o]-t[o]-n[o]-n[l]-r[o]-r[ld[o]]-i)}function aj(e,t,n,r,i,a,s,o,l,u,c,d,f,h,p,g){let b=$5(e),{size:v,crossAxis:m,crossSize:$,placement:w,crossPlacement:D}=b,S=Yh(t,o,n,b,c,d,u,f,p,g),k=c,x=x5(o,u,t,i,a+c,b);if(s&&r[v]>x){let I=$5(`${ld[w]} ${D}`),N=Yh(t,o,n,I,c,d,u,f,p,g);x5(o,u,t,i,a+c,I)>x&&(b=I,S=N,k=c)}let T="bottom";b.axis==="top"?b.placement==="top"?T="top":b.placement==="bottom"&&(T="bottom"):b.crossAxis==="top"&&(b.crossPlacement==="top"?T="bottom":b.crossPlacement==="bottom"&&(T="top"));let P=y5(m,S[m],n[$],o,l,a,u);S[m]+=P;let E=ij(S,o,u,f,i,a,n.height,T);h&&h<E&&(E=h),n.height=Math.min(n.height,E),S=Yh(t,o,n,b,k,d,u,f,p,g),P=y5(m,S[m],n[$],o,l,a,u),S[m]+=P;let A={},R=t[m]+.5*t[$]-S[m];const F=p/2+g,z=n[$]-p/2-g,B=t[m]-S[m]+p/2,C=t[m]+t[$]-S[m]-p/2,O=gg(R,B,C);return A[m]=gg(O,F,z),{position:S,maxHeight:E,arrowOffsetLeft:A.left,arrowOffsetTop:A.top,placement:b.placement}}function sj(e){let{placement:t,targetNode:n,overlayNode:r,scrollNode:i,padding:a,shouldFlip:s,boundaryElement:o,offset:l,crossOffset:u,maxHeight:c,arrowSize:d=0,arrowBoundaryOffset:f=0}=e,h=r instanceof HTMLElement?oj(r):document.documentElement,p=h===document.documentElement;const g=window.getComputedStyle(h).position;let b=!!g&&g!=="static",v=p?ls(n):w5(n,h);if(!p){let{marginTop:x,marginLeft:T}=window.getComputedStyle(n);v.top+=parseInt(x,10)||0,v.left+=parseInt(T,10)||0}let m=ls(r),$=rj(r);m.width+=$.left+$.right,m.height+=$.top+$.bottom;let w=nj(i),D=b5(o),S=b5(h),k=o.tagName==="BODY"?ls(h):w5(h,o);return h.tagName==="HTML"&&o.tagName==="BODY"&&(S.scroll.top=0,S.scroll.left=0),aj(t,v,m,w,$,a,s,D,S,k,l,u,b,c,d,f)}function ls(e){let{top:t,left:n,width:r,height:i}=e.getBoundingClientRect(),{scrollTop:a,scrollLeft:s,clientTop:o,clientLeft:l}=document.documentElement;return{top:t+a-o,left:n+s-l,width:r,height:i}}function w5(e,t){let n=window.getComputedStyle(e),r;if(n.position==="fixed"){let{top:i,left:a,width:s,height:o}=e.getBoundingClientRect();r={top:i,left:a,width:s,height:o}}else{r=ls(e);let i=ls(t),a=window.getComputedStyle(t);i.top+=(parseInt(a.borderTopWidth,10)||0)-t.scrollTop,i.left+=(parseInt(a.borderLeftWidth,10)||0)-t.scrollLeft,r.top-=i.top,r.left-=i.left}return r.top-=parseInt(n.marginTop,10)||0,r.left-=parseInt(n.marginLeft,10)||0,r}function oj(e){let t=e.offsetParent;if(t&&t===document.body&&window.getComputedStyle(t).position==="static"&&!D5(t)&&(t=document.documentElement),t==null)for(t=e.parentElement;t&&!D5(t);)t=t.parentElement;return t||document.documentElement}function D5(e){let t=window.getComputedStyle(e);return t.transform!=="none"||/transform|perspective/.test(t.willChange)||t.filter!=="none"||t.contain==="paint"||"backdropFilter"in t&&t.backdropFilter!=="none"||"WebkitBackdropFilter"in t&&t.WebkitBackdropFilter!=="none"}const c7=new WeakMap;function lj(e){let{triggerRef:t,isOpen:n,onClose:r}=e;y.useEffect(()=>{if(!n||r===null)return;let i=a=>{let s=a.target;if(!t.current||s instanceof Node&&!s.contains(t.current))return;let o=r||c7.get(t.current);o&&o()};return window.addEventListener("scroll",i,!0),()=>{window.removeEventListener("scroll",i,!0)}},[n,r,t])}let Ke=typeof document<"u"&&window.visualViewport;function uj(e){let{direction:t}=Qe(),{arrowSize:n=0,targetRef:r,overlayRef:i,scrollRef:a=i,placement:s="bottom",containerPadding:o=12,shouldFlip:l=!0,boundaryElement:u=typeof document<"u"?document.body:null,offset:c=0,crossOffset:d=0,shouldUpdatePosition:f=!0,isOpen:h=!0,onClose:p,maxHeight:g,arrowBoundaryOffset:b=0}=e,[v,m]=y.useState({position:{},arrowOffsetLeft:void 0,arrowOffsetTop:void 0,maxHeight:void 0,placement:void 0}),$=[f,s,i.current,r.current,a.current,o,l,u,c,d,h,t,g,b,n],w=y.useRef(Ke==null?void 0:Ke.scale);y.useEffect(()=>{h&&(w.current=Ke==null?void 0:Ke.scale)},[h]);let D=y.useCallback(()=>{if(f===!1||!h||!i.current||!r.current||!a.current||!u||(Ke==null?void 0:Ke.scale)!==w.current)return;let x=i.current;if(!g&&i.current){var T;x.style.top="0px",x.style.bottom="";var P;x.style.maxHeight=((P=(T=window.visualViewport)===null||T===void 0?void 0:T.height)!==null&&P!==void 0?P:window.innerHeight)+"px"}let E=sj({placement:dj(s,t),overlayNode:i.current,targetNode:r.current,scrollNode:a.current,padding:o,shouldFlip:l,boundaryElement:u,offset:c,crossOffset:d,maxHeight:g,arrowSize:n,arrowBoundaryOffset:b});x.style.top="",x.style.bottom="",Object.keys(E.position).forEach(A=>x.style[A]=E.position[A]+"px"),x.style.maxHeight=E.maxHeight!=null?E.maxHeight+"px":void 0,m(E)},$);he(D,$),cj(D),nE({ref:i,onResize:D});let S=y.useRef(!1);he(()=>{let x,T=()=>{S.current=!0,clearTimeout(x),x=setTimeout(()=>{S.current=!1},500),D()},P=()=>{S.current&&T()};return Ke==null||Ke.addEventListener("resize",T),Ke==null||Ke.addEventListener("scroll",P),()=>{Ke==null||Ke.removeEventListener("resize",T),Ke==null||Ke.removeEventListener("scroll",P)}},[D]);let k=y.useCallback(()=>{S.current||p()},[p,S]);return lj({triggerRef:r,isOpen:h,onClose:p&&k}),{overlayProps:{style:{position:"absolute",zIndex:1e5,...v.position,maxHeight:v.maxHeight}},placement:v.placement,arrowProps:{"aria-hidden":"true",role:"presentation",style:{left:v.arrowOffsetLeft,top:v.arrowOffsetTop}},updatePosition:D}}function cj(e){he(()=>(window.addEventListener("resize",e,!1),()=>{window.removeEventListener("resize",e,!1)}),[e])}function dj(e,t){return t==="rtl"?e.replace("start","right").replace("end","left"):e.replace("start","left").replace("end","right")}const rr=[];function d7(e,t){let{onClose:n,shouldCloseOnBlur:r,isOpen:i,isDismissable:a=!1,isKeyboardDismissDisabled:s=!1,shouldCloseOnInteractOutside:o}=e;y.useEffect(()=>(i&&rr.push(t),()=>{let p=rr.indexOf(t);p>=0&&rr.splice(p,1)}),[i,t]);let l=()=>{rr[rr.length-1]===t&&n&&n()},u=p=>{(!o||o(p.target))&&rr[rr.length-1]===t&&(p.stopPropagation(),p.preventDefault())},c=p=>{(!o||o(p.target))&&(rr[rr.length-1]===t&&(p.stopPropagation(),p.preventDefault()),l())},d=p=>{p.key==="Escape"&&!s&&!p.nativeEvent.isComposing&&(p.stopPropagation(),p.preventDefault(),l())};yN({ref:t,onInteractOutside:a&&i?c:null,onInteractOutsideStart:u});let{focusWithinProps:f}=As({isDisabled:!r,onBlurWithin:p=>{!p.relatedTarget||kN(p.relatedTarget)||(!o||o(p.relatedTarget))&&n()}}),h=p=>{p.target===p.currentTarget&&p.preventDefault()};return{overlayProps:{onKeyDown:d,...f},underlayProps:{onPointerDown:h}}}function fj(e,t,n){let{type:r}=e,{isOpen:i}=t;y.useEffect(()=>{n&&n.current&&c7.set(n.current,t.close)});let a;r==="menu"?a=!0:r==="listbox"&&(a="listbox");let s=Qn();return{triggerProps:{"aria-haspopup":a,"aria-expanded":i,"aria-controls":i?s:null,onPress:t.toggle},overlayProps:{id:s}}}const qh=typeof document<"u"&&window.visualViewport,hj=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);let _u=0,Gh;function f7(e={}){let{isDisabled:t}=e;he(()=>{if(!t)return _u++,_u===1&&(Mf()?Gh=mj():Gh=pj()),()=>{_u--,_u===0&&Gh()}},[t])}function pj(){return fl(Za(document.documentElement,"paddingRight",`${window.innerWidth-document.documentElement.clientWidth}px`),Za(document.documentElement,"overflow","hidden"))}function mj(){let e,t,n=u=>{e=Ff(u.target,!0),!(e===document.documentElement&&e===document.body)&&e instanceof HTMLElement&&window.getComputedStyle(e).overscrollBehavior==="auto"&&(t=Za(e,"overscrollBehavior","contain"))},r=u=>{if(!e||e===document.documentElement||e===document.body){u.preventDefault();return}e.scrollHeight===e.clientHeight&&e.scrollWidth===e.clientWidth&&u.preventDefault()},i=u=>{let c=u.target;E5(c)&&c!==document.activeElement&&(u.preventDefault(),o(),c.style.transform="translateY(-2000px)",c.focus(),requestAnimationFrame(()=>{c.style.transform=""})),t&&t()},a=u=>{let c=u.target;E5(c)&&(o(),c.style.transform="translateY(-2000px)",requestAnimationFrame(()=>{c.style.transform="",qh&&(qh.height<window.innerHeight?requestAnimationFrame(()=>{_5(c)}):qh.addEventListener("resize",()=>_5(c),{once:!0}))}))},s=null,o=()=>{if(s)return;let u=()=>{window.scrollTo(0,0)},c=window.pageXOffset,d=window.pageYOffset;s=fl(qs(window,"scroll",u),Za(document.documentElement,"paddingRight",`${window.innerWidth-document.documentElement.clientWidth}px`),Za(document.documentElement,"overflow","hidden"),Za(document.body,"marginTop",`-${d}px`),()=>{window.scrollTo(c,d)}),window.scrollTo(0,0)},l=fl(qs(document,"touchstart",n,{passive:!1,capture:!0}),qs(document,"touchmove",r,{passive:!1,capture:!0}),qs(document,"touchend",i,{passive:!1,capture:!0}),qs(document,"focus",a,!0));return()=>{t==null||t(),s==null||s(),l()}}function Za(e,t,n){let r=e.style[t];return e.style[t]=n,()=>{e.style[t]=r}}function qs(e,t,n,r){return e.addEventListener(t,n,r),()=>{e.removeEventListener(t,n,r)}}function _5(e){let t=document.scrollingElement||document.documentElement;for(;e&&e!==t;){let n=Ff(e);if(n!==document.documentElement&&n!==document.body&&n!==e){let r=n.getBoundingClientRect().top,i=e.getBoundingClientRect().top;i>r+e.clientHeight&&(n.scrollTop+=i-r)}e=n.parentElement}}function E5(e){return e instanceof HTMLInputElement&&!hj.has(e.type)||e instanceof HTMLTextAreaElement||e instanceof HTMLElement&&e.isContentEditable}const Pg=_.createContext(null);function gj(e){let{children:t}=e,n=y.useContext(Pg),[r,i]=y.useState(0),a=y.useMemo(()=>({parent:n,modalCount:r,addModal(){i(s=>s+1),n&&n.addModal()},removeModal(){i(s=>s-1),n&&n.removeModal()}}),[n,r]);return _.createElement(Pg.Provider,{value:a},t)}function vj(){let e=y.useContext(Pg);return{modalProviderProps:{"aria-hidden":e&&e.modalCount>0?!0:null}}}var h7={};h7={dismiss:"تجاهل"};var p7={};p7={dismiss:"Отхвърляне"};var m7={};m7={dismiss:"Odstranit"};var g7={};g7={dismiss:"Luk"};var v7={};v7={dismiss:"Schließen"};var b7={};b7={dismiss:"Απόρριψη"};var y7={};y7={dismiss:"Dismiss"};var $7={};$7={dismiss:"Descartar"};var x7={};x7={dismiss:"Lõpeta"};var w7={};w7={dismiss:"Hylkää"};var D7={};D7={dismiss:"Rejeter"};var _7={};_7={dismiss:"התעלם"};var E7={};E7={dismiss:"Odbaci"};var S7={};S7={dismiss:"Elutasítás"};var C7={};C7={dismiss:"Ignora"};var k7={};k7={dismiss:"閉じる"};var P7={};P7={dismiss:"무시"};var T7={};T7={dismiss:"Atmesti"};var R7={};R7={dismiss:"Nerādīt"};var M7={};M7={dismiss:"Lukk"};var F7={};F7={dismiss:"Negeren"};var A7={};A7={dismiss:"Zignoruj"};var O7={};O7={dismiss:"Descartar"};var B7={};B7={dismiss:"Dispensar"};var I7={};I7={dismiss:"Revocare"};var L7={};L7={dismiss:"Пропустить"};var N7={};N7={dismiss:"Zrušiť"};var j7={};j7={dismiss:"Opusti"};var z7={};z7={dismiss:"Odbaci"};var V7={};V7={dismiss:"Avvisa"};var W7={};W7={dismiss:"Kapat"};var U7={};U7={dismiss:"Скасувати"};var H7={};H7={dismiss:"取消"};var K7={};K7={dismiss:"關閉"};var Y7={};Y7={"ar-AE":h7,"bg-BG":p7,"cs-CZ":m7,"da-DK":g7,"de-DE":v7,"el-GR":b7,"en-US":y7,"es-ES":$7,"et-EE":x7,"fi-FI":w7,"fr-FR":D7,"he-IL":_7,"hr-HR":E7,"hu-HU":S7,"it-IT":C7,"ja-JP":k7,"ko-KR":P7,"lt-LT":T7,"lv-LV":R7,"nb-NO":M7,"nl-NL":F7,"pl-PL":A7,"pt-BR":O7,"pt-PT":B7,"ro-RO":I7,"ru-RU":L7,"sk-SK":N7,"sl-SI":j7,"sr-SP":z7,"sv-SE":V7,"tr-TR":W7,"uk-UA":U7,"zh-CN":H7,"zh-TW":K7};const S5={border:0,clip:"rect(0 0 0 0)",clipPath:"inset(50%)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap"};function bj(e={}){let{style:t,isFocusable:n}=e,[r,i]=y.useState(!1),{focusWithinProps:a}=As({isDisabled:!n,onFocusWithinChange:o=>i(o)}),s=y.useMemo(()=>r?t:t?{...S5,...t}:S5,[r]);return{visuallyHiddenProps:{...a,style:s}}}function Tg(e){let{children:t,elementType:n="div",isFocusable:r,style:i,...a}=e,{visuallyHiddenProps:s}=bj(e);return _.createElement(n,de(a,s),t)}function yj(e){return e&&e.__esModule?e.default:e}function ud(e){let{onDismiss:t,...n}=e,r=Sn(yj(Y7),"@react-aria/overlays"),i=jl(n,r.format("dismiss")),a=()=>{t&&t()};return _.createElement(Tg,null,_.createElement("button",{...i,tabIndex:-1,onClick:a,style:{width:1,height:1}}))}let Gs=new WeakMap,fn=[];function q7(e,t=document.body){let n=new Set(e),r=new Set,i=l=>{for(let f of l.querySelectorAll("[data-live-announcer], [data-react-aria-top-layer]"))n.add(f);let u=f=>{if(n.has(f)||r.has(f.parentElement)&&f.parentElement.getAttribute("role")!=="row")return NodeFilter.FILTER_REJECT;for(let h of n)if(f.contains(h))return NodeFilter.FILTER_SKIP;return NodeFilter.FILTER_ACCEPT},c=document.createTreeWalker(l,NodeFilter.SHOW_ELEMENT,{acceptNode:u}),d=u(l);if(d===NodeFilter.FILTER_ACCEPT&&a(l),d!==NodeFilter.FILTER_REJECT){let f=c.nextNode();for(;f!=null;)a(f),f=c.nextNode()}},a=l=>{var u;let c=(u=Gs.get(l))!==null&&u!==void 0?u:0;l.getAttribute("aria-hidden")==="true"&&c===0||(c===0&&l.setAttribute("aria-hidden","true"),r.add(l),Gs.set(l,c+1))};fn.length&&fn[fn.length-1].disconnect(),i(t);let s=new MutationObserver(l=>{for(let u of l)if(!(u.type!=="childList"||u.addedNodes.length===0)&&![...n,...r].some(c=>c.contains(u.target))){for(let c of u.removedNodes)c instanceof Element&&(n.delete(c),r.delete(c));for(let c of u.addedNodes)(c instanceof HTMLElement||c instanceof SVGElement)&&(c.dataset.liveAnnouncer==="true"||c.dataset.reactAriaTopLayer==="true")?n.add(c):c instanceof Element&&i(c)}});s.observe(t,{childList:!0,subtree:!0});let o={observe(){s.observe(t,{childList:!0,subtree:!0})},disconnect(){s.disconnect()}};return fn.push(o),()=>{s.disconnect();for(let l of r){let u=Gs.get(l);u===1?(l.removeAttribute("aria-hidden"),Gs.delete(l)):Gs.set(l,u-1)}o===fn[fn.length-1]?(fn.pop(),fn.length&&fn[fn.length-1].observe()):fn.splice(fn.indexOf(o),1)}}function $j(e,t){let{triggerRef:n,popoverRef:r,isNonModal:i,isKeyboardDismissDisabled:a,shouldCloseOnInteractOutside:s,...o}=e,{overlayProps:l,underlayProps:u}=d7({isOpen:t.isOpen,onClose:t.close,shouldCloseOnBlur:!0,isDismissable:!i,isKeyboardDismissDisabled:a,shouldCloseOnInteractOutside:s},r),{overlayProps:c,arrowProps:d,placement:f}=uj({...o,targetRef:n,overlayRef:r,isOpen:t.isOpen,onClose:i?t.close:null});return f7({isDisabled:i||!t.isOpen}),he(()=>{if(t.isOpen&&!i&&r.current)return q7([r.current])},[i,t.isOpen,r]),{popoverProps:de(l,c),arrowProps:d,underlayProps:u,placement:f}}const xj=y.createContext({});function wj(){var e;return(e=y.useContext(xj))!==null&&e!==void 0?e:{}}const G7=_.createContext(null);function Dj(e){let t=pa(),{portalContainer:n=t?null:document.body,isExiting:r}=e,[i,a]=y.useState(!1),s=y.useMemo(()=>({contain:i,setContain:a}),[i,a]),{getContainer:o}=wj();if(!e.portalContainer&&o&&(n=o()),!n)return null;let l=e.children;return e.disableFocusManagement||(l=_.createElement(DN,{restoreFocus:!0,contain:i&&!r},l)),l=_.createElement(G7.Provider,{value:s},_.createElement(uN,null,l)),fo.createPortal(l,n)}function Z7(){let e=y.useContext(G7),t=e==null?void 0:e.setContain;he(()=>{t==null||t(!0)},[t])}function X7(e,t,n){let{overlayProps:r,underlayProps:i}=d7({...e,isOpen:t.isOpen,onClose:t.close},n);return f7({isDisabled:!t.isOpen}),Z7(),y.useEffect(()=>{if(t.isOpen)return q7([n.current])},[t.isOpen,n]),{modalProps:de(r),underlayProps:i}}var Q7={};Q7={calendar:"التقويم",day:"يوم",dayPeriod:"ص/م",endDate:"تاريخ الانتهاء",era:"العصر",hour:"الساعات",minute:"الدقائق",month:"الشهر",second:"الثواني",selectedDateDescription:e=>`تاريخ محدد: ${e.date}`,selectedRangeDescription:e=>`المدى الزمني المحدد: ${e.startDate} إلى ${e.endDate}`,selectedTimeDescription:e=>`الوقت المحدد: ${e.time}`,startDate:"تاريخ البدء",timeZoneName:"التوقيت",weekday:"اليوم",year:"السنة"};var J7={};J7={calendar:"Календар",day:"ден",dayPeriod:"пр.об./сл.об.",endDate:"Крайна дата",era:"ера",hour:"час",minute:"минута",month:"месец",second:"секунда",selectedDateDescription:e=>`Избрана дата: ${e.date}`,selectedRangeDescription:e=>`Избран диапазон: ${e.startDate} до ${e.endDate}`,selectedTimeDescription:e=>`Избрано време: ${e.time}`,startDate:"Начална дата",timeZoneName:"часова зона",weekday:"ден от седмицата",year:"година"};var e9={};e9={calendar:"Kalendář",day:"den",dayPeriod:"část dne",endDate:"Konečné datum",era:"letopočet",hour:"hodina",minute:"minuta",month:"měsíc",second:"sekunda",selectedDateDescription:e=>`Vybrané datum: ${e.date}`,selectedRangeDescription:e=>`Vybrané období: ${e.startDate} až ${e.endDate}`,selectedTimeDescription:e=>`Vybraný čas: ${e.time}`,startDate:"Počáteční datum",timeZoneName:"časové pásmo",weekday:"den v týdnu",year:"rok"};var t9={};t9={calendar:"Kalender",day:"dag",dayPeriod:"AM/PM",endDate:"Slutdato",era:"æra",hour:"time",minute:"minut",month:"måned",second:"sekund",selectedDateDescription:e=>`Valgt dato: ${e.date}`,selectedRangeDescription:e=>`Valgt interval: ${e.startDate} til ${e.endDate}`,selectedTimeDescription:e=>`Valgt tidspunkt: ${e.time}`,startDate:"Startdato",timeZoneName:"tidszone",weekday:"ugedag",year:"år"};var n9={};n9={calendar:"Kalender",day:"Tag",dayPeriod:"Tageshälfte",endDate:"Enddatum",era:"Epoche",hour:"Stunde",minute:"Minute",month:"Monat",second:"Sekunde",selectedDateDescription:e=>`Ausgewähltes Datum: ${e.date}`,selectedRangeDescription:e=>`Ausgewählter Bereich: ${e.startDate} bis ${e.endDate}`,selectedTimeDescription:e=>`Ausgewählte Zeit: ${e.time}`,startDate:"Anfangsdatum",timeZoneName:"Zeitzone",weekday:"Wochentag",year:"Jahr"};var r9={};r9={calendar:"Ημερολόγιο",day:"ημέρα",dayPeriod:"π.μ./μ.μ.",endDate:"Ημερομηνία λήξης",era:"περίοδος",hour:"ώρα",minute:"λεπτό",month:"μήνας",second:"δευτερόλεπτο",selectedDateDescription:e=>`Επιλεγμένη ημερομηνία: ${e.date}`,selectedRangeDescription:e=>`Επιλεγμένο εύρος: ${e.startDate} έως ${e.endDate}`,selectedTimeDescription:e=>`Επιλεγμένη ώρα: ${e.time}`,startDate:"Ημερομηνία έναρξης",timeZoneName:"ζώνη ώρας",weekday:"καθημερινή",year:"έτος"};var i9={};i9={era:"era",year:"year",month:"month",day:"day",hour:"hour",minute:"minute",second:"second",dayPeriod:"AM/PM",calendar:"Calendar",startDate:"Start Date",endDate:"End Date",weekday:"day of the week",timeZoneName:"time zone",selectedDateDescription:e=>`Selected Date: ${e.date}`,selectedRangeDescription:e=>`Selected Range: ${e.startDate} to ${e.endDate}`,selectedTimeDescription:e=>`Selected Time: ${e.time}`};var a9={};a9={calendar:"Calendario",day:"día",dayPeriod:"a. m./p. m.",endDate:"Fecha final",era:"era",hour:"hora",minute:"minuto",month:"mes",second:"segundo",selectedDateDescription:e=>`Fecha seleccionada: ${e.date}`,selectedRangeDescription:e=>`Rango seleccionado: ${e.startDate} a ${e.endDate}`,selectedTimeDescription:e=>`Hora seleccionada: ${e.time}`,startDate:"Fecha de inicio",timeZoneName:"zona horaria",weekday:"día de la semana",year:"año"};var s9={};s9={calendar:"Kalender",day:"päev",dayPeriod:"enne/pärast lõunat",endDate:"Lõppkuupäev",era:"ajastu",hour:"tund",minute:"minut",month:"kuu",second:"sekund",selectedDateDescription:e=>`Valitud kuupäev: ${e.date}`,selectedRangeDescription:e=>`Valitud vahemik: ${e.startDate} kuni ${e.endDate}`,selectedTimeDescription:e=>`Valitud aeg: ${e.time}`,startDate:"Alguskuupäev",timeZoneName:"ajavöönd",weekday:"nädalapäev",year:"aasta"};var o9={};o9={calendar:"Kalenteri",day:"päivä",dayPeriod:"vuorokaudenaika",endDate:"Päättymispäivä",era:"aikakausi",hour:"tunti",minute:"minuutti",month:"kuukausi",second:"sekunti",selectedDateDescription:e=>`Valittu päivämäärä: ${e.date}`,selectedRangeDescription:e=>`Valittu aikaväli: ${e.startDate} – ${e.endDate}`,selectedTimeDescription:e=>`Valittu aika: ${e.time}`,startDate:"Alkamispäivä",timeZoneName:"aikavyöhyke",weekday:"viikonpäivä",year:"vuosi"};var l9={};l9={calendar:"Calendrier",day:"jour",dayPeriod:"cadran",endDate:"Date de fin",era:"ère",hour:"heure",minute:"minute",month:"mois",second:"seconde",selectedDateDescription:e=>`Date sélectionnée : ${e.date}`,selectedRangeDescription:e=>`Plage sélectionnée : ${e.startDate} au ${e.endDate}`,selectedTimeDescription:e=>`Heure choisie : ${e.time}`,startDate:"Date de début",timeZoneName:"fuseau horaire",weekday:"jour de la semaine",year:"année"};var u9={};u9={calendar:"לוח שנה",day:"יום",dayPeriod:"לפנה״צ/אחה״צ",endDate:"תאריך סיום",era:"תקופה",hour:"שעה",minute:"דקה",month:"חודש",second:"שנייה",selectedDateDescription:e=>`תאריך נבחר: ${e.date}`,selectedRangeDescription:e=>`טווח נבחר: ${e.startDate} עד ${e.endDate}`,selectedTimeDescription:e=>`זמן נבחר: ${e.time}`,startDate:"תאריך התחלה",timeZoneName:"אזור זמן",weekday:"יום בשבוע",year:"שנה"};var c9={};c9={calendar:"Kalendar",day:"dan",dayPeriod:"AM/PM",endDate:"Datum završetka",era:"era",hour:"sat",minute:"minuta",month:"mjesec",second:"sekunda",selectedDateDescription:e=>`Odabrani datum: ${e.date}`,selectedRangeDescription:e=>`Odabrani raspon: ${e.startDate} do ${e.endDate}`,selectedTimeDescription:e=>`Odabrano vrijeme: ${e.time}`,startDate:"Datum početka",timeZoneName:"vremenska zona",weekday:"dan u tjednu",year:"godina"};var d9={};d9={calendar:"Naptár",day:"nap",dayPeriod:"napszak",endDate:"Befejező dátum",era:"éra",hour:"óra",minute:"perc",month:"hónap",second:"másodperc",selectedDateDescription:e=>`Kijelölt dátum: ${e.date}`,selectedRangeDescription:e=>`Kijelölt tartomány: ${e.startDate}–${e.endDate}`,selectedTimeDescription:e=>`Kijelölt idő: ${e.time}`,startDate:"Kezdő dátum",timeZoneName:"időzóna",weekday:"hét napja",year:"év"};var f9={};f9={calendar:"Calendario",day:"giorno",dayPeriod:"AM/PM",endDate:"Data finale",era:"era",hour:"ora",minute:"minuto",month:"mese",second:"secondo",selectedDateDescription:e=>`Data selezionata: ${e.date}`,selectedRangeDescription:e=>`Intervallo selezionato: da ${e.startDate} a ${e.endDate}`,selectedTimeDescription:e=>`Ora selezionata: ${e.time}`,startDate:"Data iniziale",timeZoneName:"fuso orario",weekday:"giorno della settimana",year:"anno"};var h9={};h9={calendar:"カレンダー",day:"日",dayPeriod:"午前/午後",endDate:"終了日",era:"時代",hour:"時",minute:"分",month:"月",second:"秒",selectedDateDescription:e=>`選択した日付 : ${e.date}`,selectedRangeDescription:e=>`選択範囲 : ${e.startDate} から ${e.endDate}`,selectedTimeDescription:e=>`選択した時間 : ${e.time}`,startDate:"開始日",timeZoneName:"タイムゾーン",weekday:"曜日",year:"年"};var p9={};p9={calendar:"달력",day:"일",dayPeriod:"오전/오후",endDate:"종료일",era:"연호",hour:"시",minute:"분",month:"월",second:"초",selectedDateDescription:e=>`선택 일자: ${e.date}`,selectedRangeDescription:e=>`선택 범위: ${e.startDate} ~ ${e.endDate}`,selectedTimeDescription:e=>`선택 시간: ${e.time}`,startDate:"시작일",timeZoneName:"시간대",weekday:"요일",year:"년"};var m9={};m9={calendar:"Kalendorius",day:"diena",dayPeriod:"iki pietų / po pietų",endDate:"Pabaigos data",era:"era",hour:"valanda",minute:"minutė",month:"mėnuo",second:"sekundė",selectedDateDescription:e=>`Pasirinkta data: ${e.date}`,selectedRangeDescription:e=>`Pasirinktas intervalas: nuo ${e.startDate} iki ${e.endDate}`,selectedTimeDescription:e=>`Pasirinktas laikas: ${e.time}`,startDate:"Pradžios data",timeZoneName:"laiko juosta",weekday:"savaitės diena",year:"metai"};var g9={};g9={calendar:"Kalendārs",day:"diena",dayPeriod:"priekšpusdienā/pēcpusdienā",endDate:"Beigu datums",era:"ēra",hour:"stundas",minute:"minūtes",month:"mēnesis",second:"sekundes",selectedDateDescription:e=>`Atlasītais datums: ${e.date}`,selectedRangeDescription:e=>`Atlasītais diapazons: no ${e.startDate} līdz ${e.endDate}`,selectedTimeDescription:e=>`Atlasītais laiks: ${e.time}`,startDate:"Sākuma datums",timeZoneName:"laika josla",weekday:"nedēļas diena",year:"gads"};var v9={};v9={calendar:"Kalender",day:"dag",dayPeriod:"a.m./p.m.",endDate:"Sluttdato",era:"tidsalder",hour:"time",minute:"minutt",month:"måned",second:"sekund",selectedDateDescription:e=>`Valgt dato: ${e.date}`,selectedRangeDescription:e=>`Valgt område: ${e.startDate} til ${e.endDate}`,selectedTimeDescription:e=>`Valgt tid: ${e.time}`,startDate:"Startdato",timeZoneName:"tidssone",weekday:"ukedag",year:"år"};var b9={};b9={calendar:"Kalender",day:"dag",dayPeriod:"a.m./p.m.",endDate:"Einddatum",era:"tijdperk",hour:"uur",minute:"minuut",month:"maand",second:"seconde",selectedDateDescription:e=>`Geselecteerde datum: ${e.date}`,selectedRangeDescription:e=>`Geselecteerd bereik: ${e.startDate} tot ${e.endDate}`,selectedTimeDescription:e=>`Geselecteerde tijd: ${e.time}`,startDate:"Startdatum",timeZoneName:"tijdzone",weekday:"dag van de week",year:"jaar"};var y9={};y9={calendar:"Kalendarz",day:"dzień",dayPeriod:"rano / po południu / wieczorem",endDate:"Data końcowa",era:"era",hour:"godzina",minute:"minuta",month:"miesiąc",second:"sekunda",selectedDateDescription:e=>`Wybrana data: ${e.date}`,selectedRangeDescription:e=>`Wybrany zakres: ${e.startDate} do ${e.endDate}`,selectedTimeDescription:e=>`Wybrany czas: ${e.time}`,startDate:"Data początkowa",timeZoneName:"strefa czasowa",weekday:"dzień tygodnia",year:"rok"};var $9={};$9={calendar:"Calendário",day:"dia",dayPeriod:"AM/PM",endDate:"Data final",era:"era",hour:"hora",minute:"minuto",month:"mês",second:"segundo",selectedDateDescription:e=>`Data selecionada: ${e.date}`,selectedRangeDescription:e=>`Intervalo selecionado: ${e.startDate} a ${e.endDate}`,selectedTimeDescription:e=>`Hora selecionada: ${e.time}`,startDate:"Data inicial",timeZoneName:"fuso horário",weekday:"dia da semana",year:"ano"};var x9={};x9={calendar:"Calendário",day:"dia",dayPeriod:"am/pm",endDate:"Data de Término",era:"era",hour:"hora",minute:"minuto",month:"mês",second:"segundo",selectedDateDescription:e=>`Data selecionada: ${e.date}`,selectedRangeDescription:e=>`Intervalo selecionado: ${e.startDate} a ${e.endDate}`,selectedTimeDescription:e=>`Hora selecionada: ${e.time}`,startDate:"Data de Início",timeZoneName:"fuso horário",weekday:"dia da semana",year:"ano"};var w9={};w9={calendar:"Calendar",day:"zi",dayPeriod:"a.m/p.m.",endDate:"Dată final",era:"eră",hour:"oră",minute:"minut",month:"lună",second:"secundă",selectedDateDescription:e=>`Dată selectată: ${e.date}`,selectedRangeDescription:e=>`Interval selectat: de la ${e.startDate} până la ${e.endDate}`,selectedTimeDescription:e=>`Ora selectată: ${e.time}`,startDate:"Dată început",timeZoneName:"fus orar",weekday:"ziua din săptămână",year:"an"};var D9={};D9={calendar:"Календарь",day:"день",dayPeriod:"AM/PM",endDate:"Дата окончания",era:"эра",hour:"час",minute:"минута",month:"месяц",second:"секунда",selectedDateDescription:e=>`Выбранная дата: ${e.date}`,selectedRangeDescription:e=>`Выбранный диапазон: с ${e.startDate} по ${e.endDate}`,selectedTimeDescription:e=>`Выбранное время: ${e.time}`,startDate:"Дата начала",timeZoneName:"часовой пояс",weekday:"день недели",year:"год"};var _9={};_9={calendar:"Kalendár",day:"deň",dayPeriod:"AM/PM",endDate:"Dátum ukončenia",era:"letopočet",hour:"hodina",minute:"minúta",month:"mesiac",second:"sekunda",selectedDateDescription:e=>`Vybratý dátum: ${e.date}`,selectedRangeDescription:e=>`Vybratý rozsah: od ${e.startDate} do ${e.endDate}`,selectedTimeDescription:e=>`Vybratý čas: ${e.time}`,startDate:"Dátum začatia",timeZoneName:"časové pásmo",weekday:"deň týždňa",year:"rok"};var E9={};E9={calendar:"Koledar",day:"dan",dayPeriod:"dop/pop",endDate:"Datum konca",era:"doba",hour:"ura",minute:"minuta",month:"mesec",second:"sekunda",selectedDateDescription:e=>`Izbrani datum: ${e.date}`,selectedRangeDescription:e=>`Izbrano območje: ${e.startDate} do ${e.endDate}`,selectedTimeDescription:e=>`Izbrani čas: ${e.time}`,startDate:"Datum začetka",timeZoneName:"časovni pas",weekday:"dan v tednu",year:"leto"};var S9={};S9={calendar:"Kalendar",day:"дан",dayPeriod:"пре подне/по подне",endDate:"Datum završetka",era:"ера",hour:"сат",minute:"минут",month:"месец",second:"секунд",selectedDateDescription:e=>`Izabrani datum: ${e.date}`,selectedRangeDescription:e=>`Izabrani opseg: od ${e.startDate} do ${e.endDate}`,selectedTimeDescription:e=>`Izabrano vreme: ${e.time}`,startDate:"Datum početka",timeZoneName:"временска зона",weekday:"дан у недељи",year:"година"};var C9={};C9={calendar:"Kalender",day:"dag",dayPeriod:"fm/em",endDate:"Slutdatum",era:"era",hour:"timme",minute:"minut",month:"månad",second:"sekund",selectedDateDescription:e=>`Valt datum: ${e.date}`,selectedRangeDescription:e=>`Valt intervall: ${e.startDate} till ${e.endDate}`,selectedTimeDescription:e=>`Vald tid: ${e.time}`,startDate:"Startdatum",timeZoneName:"tidszon",weekday:"veckodag",year:"år"};var k9={};k9={calendar:"Takvim",day:"gün",dayPeriod:"ÖÖ/ÖS",endDate:"Bitiş Tarihi",era:"çağ",hour:"saat",minute:"dakika",month:"ay",second:"saniye",selectedDateDescription:e=>`Seçilen Tarih: ${e.date}`,selectedRangeDescription:e=>`Seçilen Aralık: ${e.startDate} - ${e.endDate}`,selectedTimeDescription:e=>`Seçilen Zaman: ${e.time}`,startDate:"Başlangıç Tarihi",timeZoneName:"saat dilimi",weekday:"haftanın günü",year:"yıl"};var P9={};P9={calendar:"Календар",day:"день",dayPeriod:"дп/пп",endDate:"Дата завершення",era:"ера",hour:"година",minute:"хвилина",month:"місяць",second:"секунда",selectedDateDescription:e=>`Вибрана дата: ${e.date}`,selectedRangeDescription:e=>`Вибраний діапазон: ${e.startDate} — ${e.endDate}`,selectedTimeDescription:e=>`Вибраний час: ${e.time}`,startDate:"Дата початку",timeZoneName:"часовий пояс",weekday:"день тижня",year:"рік"};var T9={};T9={calendar:"日历",day:"日",dayPeriod:"上午/下午",endDate:"结束日期",era:"纪元",hour:"小时",minute:"分钟",month:"月",second:"秒",selectedDateDescription:e=>`选定的日期:${e.date}`,selectedRangeDescription:e=>`选定的范围:${e.startDate} 至 ${e.endDate}`,selectedTimeDescription:e=>`选定的时间:${e.time}`,startDate:"开始日期",timeZoneName:"时区",weekday:"工作日",year:"年"};var R9={};R9={calendar:"日曆",day:"日",dayPeriod:"上午/下午",endDate:"結束日期",era:"纪元",hour:"小时",minute:"分钟",month:"月",second:"秒",selectedDateDescription:e=>`選定的日期:${e.date}`,selectedRangeDescription:e=>`選定的範圍:${e.startDate} 至 ${e.endDate}`,selectedTimeDescription:e=>`選定的時間:${e.time}`,startDate:"開始日期",timeZoneName:"时区",weekday:"工作日",year:"年"};var jf={};jf={"ar-AE":Q7,"bg-BG":J7,"cs-CZ":e9,"da-DK":t9,"de-DE":n9,"el-GR":r9,"en-US":i9,"es-ES":a9,"et-EE":s9,"fi-FI":o9,"fr-FR":l9,"he-IL":u9,"hr-HR":c9,"hu-HU":d9,"it-IT":f9,"ja-JP":h9,"ko-KR":p9,"lt-LT":m9,"lv-LV":g9,"nb-NO":v9,"nl-NL":b9,"pl-PL":y9,"pt-BR":$9,"pt-PT":x9,"ro-RO":w9,"ru-RU":D9,"sk-SK":_9,"sl-SI":E9,"sr-SP":S9,"sv-SE":C9,"tr-TR":k9,"uk-UA":P9,"zh-CN":T9,"zh-TW":R9};function M9(e,t,n){let{direction:r}=Qe(),i=y.useMemo(()=>Lf(t),[t]),a=l=>{if(l.currentTarget.contains(l.target)&&(l.altKey&&(l.key==="ArrowDown"||l.key==="ArrowUp")&&"setOpen"in e&&(l.preventDefault(),l.stopPropagation(),e.setOpen(!0)),!n))switch(l.key){case"ArrowLeft":l.preventDefault(),l.stopPropagation(),r==="rtl"?i.focusNext():i.focusPrevious();break;case"ArrowRight":l.preventDefault(),l.stopPropagation(),r==="rtl"?i.focusPrevious():i.focusNext();break}},s=()=>{var l;let u=(l=window.event)===null||l===void 0?void 0:l.target,c=an(t.current,{tabbable:!0});if(u&&(c.currentNode=u,u=c.previousNode()),!u){let d;do d=c.lastChild(),d&&(u=d);while(d)}for(;u!=null&&u.hasAttribute("data-placeholder");){let d=c.previousNode();if(d&&d.hasAttribute("data-placeholder"))u=d;else break}u&&u.focus()},{pressProps:o}=w$({preventFocusOnPress:!0,allowTextSelectionOnPress:!0,onPressStart(l){l.pointerType==="mouse"&&s()},onPress(l){l.pointerType!=="mouse"&&s()}});return de(o,{onKeyDown:a})}function _j(e){return e&&e.__esModule?e.default:e}const F9=new WeakMap,oc="__role_"+Date.now(),A9="__focusManager_"+Date.now();function O9(e,t,n){var r;let{isInvalid:i,validationErrors:a,validationDetails:s}=t.displayValidation,{labelProps:o,fieldProps:l,descriptionProps:u,errorMessageProps:c}=DE({...e,labelElementType:"span",isInvalid:i,errorMessage:e.errorMessage||a}),d=y.useRef(null),{focusWithinProps:f}=As({...e,onFocusWithin(P){var E;d.current=t.value,(E=e.onFocus)===null||E===void 0||E.call(e,P)},onBlurWithin:P=>{var E;t.confirmPlaceholder(),t.value!==d.current&&t.commitValidation(),(E=e.onBlur)===null||E===void 0||E.call(e,P)},onFocusWithinChange:e.onFocusChange}),h=Sn(_j(jf),"@react-aria/datepicker"),p=t.maxGranularity==="hour"?"selectedTimeDescription":"selectedDateDescription",g=t.maxGranularity==="hour"?"time":"date",b=t.value?h.format(p,{[g]:t.formatValue({month:"long"})}):"",v=$$(b),m=e[oc]==="presentation"?l["aria-describedby"]:[v["aria-describedby"],l["aria-describedby"]].filter(Boolean).join(" ")||void 0,$=e[A9],w=y.useMemo(()=>$||Lf(n),[$,n]),D=M9(t,n,e[oc]==="presentation");F9.set(t,{ariaLabel:e["aria-label"],ariaLabelledBy:[o.id,e["aria-labelledby"]].filter(Boolean).join(" ")||void 0,ariaDescribedBy:m,focusManager:w});let S=y.useRef(e.autoFocus),k;e[oc]==="presentation"?k={role:"presentation"}:k=de(l,{role:"group","aria-disabled":e.isDisabled||void 0,"aria-describedby":m}),y.useEffect(()=>{S.current&&w.focusFirst(),S.current=!1},[w]),FL(e.inputRef,t.value,t.setValue),qN({...e,focus(){w.focusFirst()}},t,e.inputRef);let x={type:"hidden",name:e.name,value:((r=t.value)===null||r===void 0?void 0:r.toString())||""};e.validationBehavior==="native"&&(x.type="text",x.hidden=!0,x.required=e.isRequired,x.onChange=()=>{});let T=Xt(e);return{labelProps:{...o,onClick:()=>{w.focusFirst()}},fieldProps:de(T,k,D,f,{onKeyDown(P){e.onKeyDown&&e.onKeyDown(P)},onKeyUp(P){e.onKeyUp&&e.onKeyUp(P)}}),inputProps:x,descriptionProps:u,errorMessageProps:c,isInvalid:i,validationErrors:a,validationDetails:s}}function Ej(e,t,n){var r;let i=O9(e,t,n);return i.inputProps.value=((r=t.timeValue)===null||r===void 0?void 0:r.toString())||"",i}function Sj(e){return e&&e.__esModule?e.default:e}function B9(){let{locale:e}=Qe(),t=$8(Sj(jf),"@react-aria/datepicker");return y.useMemo(()=>{try{return new Intl.DisplayNames(e,{type:"dateTimeField"})}catch{return new Cj(e,t)}},[e,t])}class Cj{of(t){return this.dictionary.getStringForLocale(t,this.locale)}constructor(t,n){this.locale=t,this.dictionary=n}}var I9={};I9={Empty:"فارغ"};var L9={};L9={Empty:"Изпразни"};var N9={};N9={Empty:"Prázdné"};var j9={};j9={Empty:"Tom"};var z9={};z9={Empty:"Leer"};var V9={};V9={Empty:"Άδειο"};var W9={};W9={Empty:"Empty"};var U9={};U9={Empty:"Vacío"};var H9={};H9={Empty:"Tühjenda"};var K9={};K9={Empty:"Tyhjä"};var Y9={};Y9={Empty:"Vide"};var q9={};q9={Empty:"ריק"};var G9={};G9={Empty:"Prazno"};var Z9={};Z9={Empty:"Üres"};var X9={};X9={Empty:"Vuoto"};var Q9={};Q9={Empty:"空"};var J9={};J9={Empty:"비어 있음"};var eS={};eS={Empty:"Tuščias"};var tS={};tS={Empty:"Tukšs"};var nS={};nS={Empty:"Tom"};var rS={};rS={Empty:"Leeg"};var iS={};iS={Empty:"Pusty"};var aS={};aS={Empty:"Vazio"};var sS={};sS={Empty:"Vazio"};var oS={};oS={Empty:"Gol"};var lS={};lS={Empty:"Не заполнено"};var uS={};uS={Empty:"Prázdne"};var cS={};cS={Empty:"Prazen"};var dS={};dS={Empty:"Prazno"};var fS={};fS={Empty:"Tomt"};var hS={};hS={Empty:"Boş"};var pS={};pS={Empty:"Пусто"};var mS={};mS={Empty:"空"};var gS={};gS={Empty:"空白"};var vS={};vS={"ar-AE":I9,"bg-BG":L9,"cs-CZ":N9,"da-DK":j9,"de-DE":z9,"el-GR":V9,"en-US":W9,"es-ES":U9,"et-EE":H9,"fi-FI":K9,"fr-FR":Y9,"he-IL":q9,"hr-HR":G9,"hu-HU":Z9,"it-IT":X9,"ja-JP":Q9,"ko-KR":J9,"lt-LT":eS,"lv-LV":tS,"nb-NO":nS,"nl-NL":rS,"pl-PL":iS,"pt-BR":aS,"pt-PT":sS,"ro-RO":oS,"ru-RU":lS,"sk-SK":uS,"sl-SI":cS,"sr-SP":dS,"sv-SE":fS,"tr-TR":hS,"uk-UA":pS,"zh-CN":mS,"zh-TW":gS};function kj(e){return e&&e.__esModule?e.default:e}function Pj(e){const t=y.useRef();let{value:n,textValue:r,minValue:i,maxValue:a,isDisabled:s,isReadOnly:o,isRequired:l,onIncrement:u,onIncrementPage:c,onDecrement:d,onDecrementPage:f,onDecrementToMin:h,onIncrementToMax:p}=e;const g=Sn(kj(vS),"@react-aria/spinbutton"),b=()=>clearTimeout(t.current);y.useEffect(()=>()=>b(),[]);let v=E=>{if(!(E.ctrlKey||E.metaKey||E.shiftKey||E.altKey||o))switch(E.key){case"PageUp":if(c){E.preventDefault(),c==null||c();break}case"ArrowUp":case"Up":u&&(E.preventDefault(),u==null||u());break;case"PageDown":if(f){E.preventDefault(),f==null||f();break}case"ArrowDown":case"Down":d&&(E.preventDefault(),d==null||d());break;case"Home":h&&(E.preventDefault(),h==null||h());break;case"End":p&&(E.preventDefault(),p==null||p());break}},m=y.useRef(!1),$=()=>{m.current=!0},w=()=>{m.current=!1},D=r===""?g.format("Empty"):(r||`${n}`).replace("-","−");y.useEffect(()=>{m.current&&(jN("assertive"),Sg(D,"assertive"))},[D]);const S=pt(E=>{b(),u==null||u(),t.current=window.setTimeout(()=>{(a===void 0||isNaN(a)||n===void 0||isNaN(n)||n<a)&&S(60)},E)}),k=pt(E=>{b(),d==null||d(),t.current=window.setTimeout(()=>{(i===void 0||isNaN(i)||n===void 0||isNaN(n)||n>i)&&k(60)},E)});let x=E=>{E.preventDefault()},{addGlobalListener:T,removeAllGlobalListeners:P}=tE();return{spinButtonProps:{role:"spinbutton","aria-valuenow":n!==void 0&&!isNaN(n)?n:void 0,"aria-valuetext":D,"aria-valuemin":i,"aria-valuemax":a,"aria-disabled":s||void 0,"aria-readonly":o||void 0,"aria-required":l||void 0,onKeyDown:v,onFocus:$,onBlur:w},incrementButtonProps:{onPressStart:()=>{S(400),T(window,"contextmenu",x)},onPressEnd:()=>{b(),P()},onFocus:$,onBlur:w},decrementButtonProps:{onPressStart:()=>{k(400),T(window,"contextmenu",x)},onPressEnd:()=>{b(),P()},onFocus:$,onBlur:w}}}function Tj(e,t,n){let r=y.useRef(""),{locale:i}=Qe(),a=B9(),{ariaLabel:s,ariaLabelledBy:o,ariaDescribedBy:l,focusManager:u}=F9.get(t),c=e.isPlaceholder?"":e.text,d=y.useMemo(()=>t.dateFormatter.resolvedOptions(),[t.dateFormatter]),f=xn({month:"long",timeZone:d.timeZone}),h=xn({hour:"numeric",hour12:d.hour12,timeZone:d.timeZone});if(e.type==="month"&&!e.isPlaceholder){let C=f.format(t.dateValue);c=C!==c?`${c} – ${C}`:C}else e.type==="hour"&&!e.isPlaceholder&&(c=h.format(t.dateValue));let{spinButtonProps:p}=Pj({value:e.value,textValue:c,minValue:e.minValue,maxValue:e.maxValue,isDisabled:t.isDisabled,isReadOnly:t.isReadOnly||!e.isEditable,isRequired:t.isRequired,onIncrement:()=>{r.current="",t.increment(e.type)},onDecrement:()=>{r.current="",t.decrement(e.type)},onIncrementPage:()=>{r.current="",t.incrementPage(e.type)},onDecrementPage:()=>{r.current="",t.decrementPage(e.type)},onIncrementToMax:()=>{r.current="",t.setSegment(e.type,e.maxValue)},onDecrementToMin:()=>{r.current="",t.setSegment(e.type,e.minValue)}}),g=y.useMemo(()=>new oE(i,{maximumFractionDigits:0}),[i]),b=()=>{if(e.text===e.placeholder&&u.focusPrevious(),g.isValidPartialNumber(e.text)&&!t.isReadOnly&&!e.isPlaceholder){let C=e.text.slice(0,-1),O=g.parse(C);C=O===0?"":C,C.length===0||O===0?t.clearSegment(e.type):t.setSegment(e.type,O),r.current=C}else e.type==="dayPeriod"&&t.clearSegment(e.type)},v=C=>{if(C.key==="a"&&(Ds()?C.metaKey:C.ctrlKey)&&C.preventDefault(),!(C.ctrlKey||C.metaKey||C.shiftKey||C.altKey))switch(C.key){case"Backspace":case"Delete":C.preventDefault(),C.stopPropagation(),b();break}},{startsWith:m}=UL({sensitivity:"base"}),$=xn({hour:"numeric",hour12:!0}),w=y.useMemo(()=>{let C=new Date;return C.setHours(0),$.formatToParts(C).find(O=>O.type==="dayPeriod").value},[$]),D=y.useMemo(()=>{let C=new Date;return C.setHours(12),$.formatToParts(C).find(O=>O.type==="dayPeriod").value},[$]),S=xn({year:"numeric",era:"narrow",timeZone:"UTC"}),k=y.useMemo(()=>{if(e.type!=="era")return[];let C=Oe(new Je(1,1,1),t.calendar),O=t.calendar.getEras().map(N=>{let X=C.set({year:1,month:1,day:1,era:N}).toDate("UTC"),je=S.formatToParts(X).find($e=>$e.type==="era").value;return{era:N,formatted:je}}),I=Rj(O.map(N=>N.formatted));if(I)for(let N of O)N.formatted=N.formatted.slice(I);return O},[S,t.calendar,e.type]),x=C=>{if(t.isDisabled||t.isReadOnly)return;let O=r.current+C;switch(e.type){case"dayPeriod":if(m(w,C))t.setSegment("dayPeriod",0);else if(m(D,C))t.setSegment("dayPeriod",12);else break;u.focusNext();break;case"era":{let I=k.find(N=>m(N.formatted,C));I&&(t.setSegment("era",I.era),u.focusNext());break}case"day":case"hour":case"minute":case"second":case"month":case"year":{if(!g.isValidPartialNumber(O))return;let I=g.parse(O),N=I,X=e.minValue===0;if(e.type==="hour"&&t.dateFormatter.resolvedOptions().hour12){switch(t.dateFormatter.resolvedOptions().hourCycle){case"h11":I>11&&(N=g.parse(C));break;case"h12":X=!1,I>12&&(N=g.parse(C));break}e.value>=12&&I>1&&(I+=12)}else I>e.maxValue&&(N=g.parse(C));if(isNaN(I))return;let Q=N!==0||X;Q&&t.setSegment(e.type,N),+(I+"0")>e.maxValue||O.length>=String(e.maxValue).length?(r.current="",Q&&u.focusNext()):r.current=O;break}}},T=()=>{r.current="",iE(n.current,{containingElement:Ff(n.current)}),window.getSelection().collapse(n.current)},P=y.useRef("");os(n,"beforeinput",C=>{switch(C.preventDefault(),C.inputType){case"deleteContentBackward":case"deleteContentForward":g.isValidPartialNumber(e.text)&&!t.isReadOnly&&b();break;case"insertCompositionText":P.current=n.current.textContent,n.current.textContent=n.current.textContent;break;default:C.data!=null&&x(C.data);break}}),os(n,"input",C=>{let{inputType:O,data:I}=C;switch(O){case"insertCompositionText":n.current.textContent=P.current,(m(w,I)||m(D,I))&&x(I);break}}),he(()=>{let C=n.current;return()=>{document.activeElement===C&&(u.focusPrevious()||u.focusNext())}},[n,u]);let E=Mf()||e.type==="timeZoneName"?{role:"textbox","aria-valuemax":null,"aria-valuemin":null,"aria-valuetext":null,"aria-valuenow":null}:{},A=y.useMemo(()=>t.segments.find(C=>C.isEditable),[t.segments]);e!==A&&!t.isInvalid&&(l=void 0);let R=Qn(),F=!t.isDisabled&&!t.isReadOnly&&e.isEditable,z=e.type==="literal"?"":a.of(e.type),B=jl({"aria-label":`${z}${s?`, ${s}`:""}${o?", ":""}`,"aria-labelledby":o});return e.type==="literal"?{segmentProps:{"aria-hidden":!0}}:{segmentProps:de(p,B,{id:R,...E,"aria-invalid":t.isInvalid?"true":void 0,"aria-describedby":l,"aria-readonly":t.isReadOnly||!e.isEditable?"true":void 0,"data-placeholder":e.isPlaceholder||void 0,contentEditable:F,suppressContentEditableWarning:F,spellCheck:F?"false":void 0,autoCapitalize:F?"off":void 0,autoCorrect:F?"off":void 0,[parseInt(_.version,10)>=17?"enterKeyHint":"enterkeyhint"]:F?"next":void 0,inputMode:t.isDisabled||e.type==="dayPeriod"||e.type==="era"||!F?void 0:"numeric",tabIndex:t.isDisabled?void 0:0,onKeyDown:v,onFocus:T,style:{caretColor:"transparent"},onPointerDown(C){C.stopPropagation()},onMouseDown(C){C.stopPropagation()}})}}function Rj(e){e.sort();let t=e[0],n=e[e.length-1];for(let r=0;r<t.length;r++)if(t[r]!==n[r])return r;return 0}function Mj(e){return e&&e.__esModule?e.default:e}function Fj(e,t,n){var r,i;let a=Sn(Mj(jf),"@react-aria/datepicker"),{isInvalid:s,validationErrors:o,validationDetails:l}=t.displayValidation,{labelProps:u,fieldProps:c,descriptionProps:d,errorMessageProps:f}=DE({...e,labelElementType:"span",isInvalid:s,errorMessage:e.errorMessage||o}),h=c["aria-labelledby"]||c.id,{locale:p}=Qe(),g=t.formatValue(p,{month:"long"}),b=g?a.format("selectedRangeDescription",{startDate:g.start,endDate:g.end}):"",v=$$(b),m={"aria-label":a.format("startDate"),"aria-labelledby":h},$={"aria-label":a.format("endDate"),"aria-labelledby":h},w=Qn(),D=Qn(),S=M9(t,n),k=[v["aria-describedby"],c["aria-describedby"]].filter(Boolean).join(" ")||void 0,x=y.useMemo(()=>Lf(n,{accept:F=>F.id!==w}),[n,w]),T={[A9]:x,[oc]:"presentation","aria-describedby":k,placeholderValue:e.placeholderValue,hideTimeZone:e.hideTimeZone,hourCycle:e.hourCycle,granularity:e.granularity,shouldForceLeadingZeros:e.shouldForceLeadingZeros,isDisabled:e.isDisabled,isReadOnly:e.isReadOnly,isRequired:e.isRequired,validationBehavior:e.validationBehavior},P=Xt(e),{focusWithinProps:E}=As({...e,isDisabled:t.isOpen,onBlurWithin:e.onBlur,onFocusWithin:e.onFocus,onFocusWithinChange:e.onFocusChange}),A=y.useRef(Li),R=y.useRef(Li);return{groupProps:de(P,S,c,v,E,{role:"group","aria-disabled":e.isDisabled||null,"aria-describedby":k,onKeyDown(F){t.isOpen||e.onKeyDown&&e.onKeyDown(F)},onKeyUp(F){t.isOpen||e.onKeyUp&&e.onKeyUp(F)}}),labelProps:{...u,onClick:()=>{x.focusFirst()}},buttonProps:{...v,id:w,"aria-haspopup":"dialog","aria-label":a.format("calendar"),"aria-labelledby":`${w} ${h}`,"aria-describedby":k,"aria-expanded":t.isOpen,isDisabled:e.isDisabled||e.isReadOnly,onPress:()=>t.setOpen(!0)},dialogProps:{id:D,"aria-labelledby":`${w} ${h}`},startFieldProps:{...m,...T,value:(r=t.value)===null||r===void 0?void 0:r.start,onChange:F=>t.setDateTime("start",F),autoFocus:e.autoFocus,name:e.startName,[sd]:{realtimeValidation:t.realtimeValidation,displayValidation:t.displayValidation,updateValidation(F){A.current=F,t.updateValidation(od(F,R.current))},resetValidation:t.resetValidation,commitValidation:t.commitValidation}},endFieldProps:{...$,...T,value:(i=t.value)===null||i===void 0?void 0:i.end,onChange:F=>t.setDateTime("end",F),name:e.endName,[sd]:{realtimeValidation:t.realtimeValidation,displayValidation:t.displayValidation,updateValidation(F){R.current=F,t.updateValidation(od(A.current,F))},resetValidation:t.resetValidation,commitValidation:t.commitValidation}},descriptionProps:d,errorMessageProps:f,calendarProps:{autoFocus:!0,value:t.dateRange,onChange:t.setDateRange,minValue:e.minValue,maxValue:e.maxValue,isDisabled:e.isDisabled,isReadOnly:e.isReadOnly,isDateUnavailable:e.isDateUnavailable,allowsNonContiguousRanges:e.allowsNonContiguousRanges,defaultFocusedValue:t.dateRange?void 0:e.placeholderValue,isInvalid:t.isInvalid,errorMessage:typeof e.errorMessage=="function"?e.errorMessage(t.displayValidation):e.errorMessage||t.displayValidation.validationErrors.join(" ")},isInvalid:s,validationErrors:o,validationDetails:l}}function Aj(e,t){let{role:n="dialog"}=e,r=Xc();r=e["aria-label"]?void 0:r;let i=y.useRef(!1);return y.useEffect(()=>{if(t.current&&!t.current.contains(document.activeElement)){nd(t.current);let a=setTimeout(()=>{document.activeElement===t.current&&(i.current=!0,t.current&&(t.current.blur(),nd(t.current)),i.current=!1)},500);return()=>{clearTimeout(a)}}},[t]),Z7(),{dialogProps:{...Xt(e,{labelable:!0}),role:n,tabIndex:-1,"aria-labelledby":e["aria-labelledby"]||r,onBlur:a=>{i.current&&a.stopPropagation()}},titleProps:{id:r}}}function us(e,t,n){return t!=null&&e.compare(t)<0||n!=null&&e.compare(n)>0}function Rg(e,t,n,r,i){let a={};for(let o in t)a[o]=Math.floor(t[o]/2),a[o]>0&&t[o]%2===0&&a[o]--;let s=Ui(e,t,n).subtract(a);return gl(e,s,t,n,r,i)}function Ui(e,t,n,r,i){let a=e;return t.years?a=bI(e):t.months?a=na(e):t.weeks&&(a=ul(e,n)),gl(e,a,t,n,r,i)}function Mg(e,t,n,r,i){let a={...t};t.days?a.days--:t.weeks?a.weeks--:t.months?a.months--:t.years&&a.years--;let s=Ui(e,t,n).subtract(a);return gl(e,s,t,n,r,i)}function gl(e,t,n,r,i,a){return i&&e.compare(i)>=0&&(t=u$(t,Ui(Zt(i),n,r))),a&&e.compare(a)<=0&&(t=l$(t,Mg(Zt(a),n,r))),t}function Ar(e,t,n){return t&&(e=u$(e,Zt(t))),n&&(e=l$(e,Zt(n))),e}function bS(e,t,n){if(!n)return e;for(;e.compare(t)>=0&&n(e);)e=e.subtract({days:1});if(e.compare(t)>=0)return e}function Oj(e){let t=y.useMemo(()=>new ii(e.locale),[e.locale]),n=y.useMemo(()=>t.resolvedOptions(),[t]),{locale:r,createCalendar:i,visibleDuration:a={months:1},minValue:s,maxValue:o,selectionAlignment:l,isDateUnavailable:u,pageBehavior:c="visible"}=e,d=y.useMemo(()=>i(n.calendar),[i,n.calendar]),[f,h]=aa(e.value,e.defaultValue,e.onChange),p=y.useMemo(()=>f?Oe(Zt(f),d):null,[f,d]),g=y.useMemo(()=>f&&"timeZone"in f?f.timeZone:n.timeZone,[f,n.timeZone]),b=y.useMemo(()=>e.focusedValue?Ar(Oe(Zt(e.focusedValue),d),s,o):void 0,[e.focusedValue,d,s,o]),v=y.useMemo(()=>Ar(e.defaultFocusedValue?Oe(Zt(e.defaultFocusedValue),d):p||Oe(Il(g),d),s,o),[e.defaultFocusedValue,p,g,d,s,o]),[m,$]=aa(b,v,e.onFocusChange),[w,D]=y.useState(()=>{switch(l){case"start":return Ui(m,a,r,s,o);case"end":return Mg(m,a,r,s,o);case"center":default:return Rg(m,a,r,s,o)}}),[S,k]=y.useState(e.autoFocus||!1),x=y.useMemo(()=>{let C={...a};return C.days?C.days--:C.days=-1,w.add(C)},[w,a]),[T,P]=y.useState(d.identifier);if(d.identifier!==T){let C=Oe(m,d);D(Rg(C,a,r,s,o)),$(C),P(d.identifier)}us(m,s,o)?$(Ar(m,s,o)):m.compare(w)<0?D(Mg(m,a,r,s,o)):m.compare(x)>0&&D(Ui(m,a,r,s,o));function E(C){C=Ar(C,s,o),$(C)}function A(C){if(!e.isDisabled&&!e.isReadOnly){if(C===null){h(null);return}if(C=Ar(C,s,o),C=bS(C,w,u),!C)return;C=Oe(C,(f==null?void 0:f.calendar)||new Ft),f&&"hour"in f?h(f.set(C)):h(C)}}let R=y.useMemo(()=>p?u&&u(p)?!0:us(p,s,o):!1,[p,u,s,o]),F=e.isInvalid||e.validationState==="invalid"||R,z=F?"invalid":null,B=y.useMemo(()=>c==="visible"?a:Zh(a),[c,a]);return{isDisabled:e.isDisabled,isReadOnly:e.isReadOnly,value:p,setValue:A,visibleRange:{start:w,end:x},minValue:s,maxValue:o,focusedDate:m,timeZone:g,validationState:z,isValueInvalid:F,setFocusedDate(C){E(C),k(!0)},focusNextDay(){E(m.add({days:1}))},focusPreviousDay(){E(m.subtract({days:1}))},focusNextRow(){a.days?this.focusNextPage():(a.weeks||a.months||a.years)&&E(m.add({weeks:1}))},focusPreviousRow(){a.days?this.focusPreviousPage():(a.weeks||a.months||a.years)&&E(m.subtract({weeks:1}))},focusNextPage(){let C=w.add(B);$(Ar(m.add(B),s,o)),D(Ui(gl(m,C,B,r,s,o),B,r))},focusPreviousPage(){let C=w.subtract(B);$(Ar(m.subtract(B),s,o)),D(Ui(gl(m,C,B,r,s,o),B,r))},focusSectionStart(){a.days?E(w):a.weeks?E(ul(m,r)):(a.months||a.years)&&E(na(m))},focusSectionEnd(){a.days?E(x):a.weeks?E(xI(m,r)):(a.months||a.years)&&E(Uc(m))},focusNextSection(C){if(!C&&!a.days){E(m.add(Zh(a)));return}a.days?this.focusNextPage():a.weeks?E(m.add({months:1})):(a.months||a.years)&&E(m.add({years:1}))},focusPreviousSection(C){if(!C&&!a.days){E(m.subtract(Zh(a)));return}a.days?this.focusPreviousPage():a.weeks?E(m.subtract({months:1})):(a.months||a.years)&&E(m.subtract({years:1}))},selectFocusedDate(){A(m)},selectDate(C){A(C)},isFocused:S,setFocused:k,isInvalid(C){return us(C,s,o)},isSelected(C){return p!=null&&Ze(C,p)&&!this.isCellDisabled(C)&&!this.isCellUnavailable(C)},isCellFocused(C){return S&&m&&Ze(C,m)},isCellDisabled(C){return e.isDisabled||C.compare(w)<0||C.compare(x)>0||this.isInvalid(C,s,o)},isCellUnavailable(C){return e.isDateUnavailable&&e.isDateUnavailable(C)},isPreviousVisibleRangeInvalid(){let C=w.subtract({days:1});return Ze(C,w)||this.isInvalid(C,s,o)},isNextVisibleRangeInvalid(){let C=x.add({days:1});return Ze(C,x)||this.isInvalid(C,s,o)},getDatesInWeek(C,O=w){let I=O.add({weeks:C}),N=[];I=ul(I,r);let X=kf(I,r);for(let Q=0;Q<X;Q++)N.push(null);for(;N.length<7;){N.push(I);let Q=I.add({days:1});if(Ze(I,Q))break;I=Q}for(;N.length<7;)N.push(null);return N}}}function Zh(e){let t={...e};for(let n in e)t[n]=1;return t}function Bj(e){let{value:t,defaultValue:n,onChange:r,createCalendar:i,locale:a,visibleDuration:s={months:1},minValue:o,maxValue:l,...u}=e,[c,d]=aa(t,n||null,r),[f,h]=y.useState(null),p="center";if(c&&c.start&&c.end){let O=Rg(Zt(c.start),s,a,o,l).add(s).subtract({days:1});c.end.compare(O)>0&&(p="start")}let g=y.useRef(null),[b,v]=y.useState(null),m=y.useMemo(()=>u$(o,b==null?void 0:b.start),[o,b]),$=y.useMemo(()=>l$(l,b==null?void 0:b.end),[l,b]),w=Oj({...u,value:c&&c.start,createCalendar:i,locale:a,visibleDuration:s,minValue:m,maxValue:$,selectionAlignment:p}),D=C=>{C&&e.isDateUnavailable&&!e.allowsNonContiguousRanges?(g.current={start:k5(C,w,-1),end:k5(C,w,1)},v(g.current)):(g.current=null,v(null))},[S,k]=y.useState(w.visibleRange);(!sg(w.visibleRange.start,S.start)||!sg(w.visibleRange.end,S.end))&&(D(f),k(w.visibleRange));let x=C=>{C?(h(C),D(C)):(h(null),D(null))},T=f?Xh(f,w.focusedDate):c&&Xh(c.start,c.end),P=C=>{if(!e.isReadOnly&&(C=Ar(C,m,$),C=bS(C,w.visibleRange.start,e.isDateUnavailable),!!C))if(!f)x(C);else{let O=Xh(f,C);d({start:C5(O.start,c==null?void 0:c.start),end:C5(O.end,c==null?void 0:c.end)}),x(null)}},[E,A]=y.useState(!1),{isDateUnavailable:R}=e,F=y.useMemo(()=>!c||f?!1:R&&(R(c.start)||R(c.end))?!0:us(c.start,o,l)||us(c.end,o,l),[R,c,f,o,l]),z=e.isInvalid||e.validationState==="invalid"||F;return{...w,value:c,setValue:d,anchorDate:f,setAnchorDate:x,highlightedRange:T,validationState:z?"invalid":null,isValueInvalid:z,selectFocusedDate(){P(w.focusedDate)},selectDate:P,highlightDate(C){f&&w.setFocusedDate(C)},isSelected(C){return T&&C.compare(T.start)>=0&&C.compare(T.end)<=0&&!w.isCellDisabled(C)&&!w.isCellUnavailable(C)},isInvalid(C){var O,I;return w.isInvalid(C)||us(C,(O=g.current)===null||O===void 0?void 0:O.start,(I=g.current)===null||I===void 0?void 0:I.end)},isDragging:E,setDragging:A}}function Xh(e,t){return!e||!t?null:(t.compare(e)<0&&([e,t]=[t,e]),{start:Zt(e),end:Zt(t)})}function C5(e,t){return e=Oe(e,(t==null?void 0:t.calendar)||new Ft),t&&"hour"in t?t.set(e):e}function k5(e,t,n){let r=e.add({days:n});for(;(n<0?r.compare(t.visibleRange.start)>=0:r.compare(t.visibleRange.end)<=0)&&!t.isCellUnavailable(r);)r=r.add({days:n});return t.isCellUnavailable(r)?r.add({days:-n}):null}function yS(e){let[t,n]=aa(e.isOpen,e.defaultOpen||!1,e.onOpenChange);const r=y.useCallback(()=>{n(!0)},[n]),i=y.useCallback(()=>{n(!1)},[n]),a=y.useCallback(()=>{n(!t)},[n,t]);return{isOpen:t,setOpen:n,open:r,close:i,toggle:a}}var $S={};$S={rangeOverflow:e=>`يجب أن تكون القيمة ${e.maxValue} أو قبل ذلك.`,rangeReversed:"تاريخ البدء يجب أن يكون قبل تاريخ الانتهاء.",rangeUnderflow:e=>`يجب أن تكون القيمة ${e.minValue} أو بعد ذلك.`,unavailableDate:"البيانات المحددة غير متاحة."};var xS={};xS={rangeOverflow:e=>`Стойността трябва да е ${e.maxValue} или по-ранна.`,rangeReversed:"Началната дата трябва да е преди крайната.",rangeUnderflow:e=>`Стойността трябва да е ${e.minValue} или по-късно.`,unavailableDate:"Избраната дата не е налична."};var wS={};wS={rangeOverflow:e=>`Hodnota musí být ${e.maxValue} nebo dřívější.`,rangeReversed:"Datum zahájení musí předcházet datu ukončení.",rangeUnderflow:e=>`Hodnota musí být ${e.minValue} nebo pozdější.`,unavailableDate:"Vybrané datum není k dispozici."};var DS={};DS={rangeOverflow:e=>`Værdien skal være ${e.maxValue} eller tidligere.`,rangeReversed:"Startdatoen skal være før slutdatoen.",rangeUnderflow:e=>`Værdien skal være ${e.minValue} eller nyere.`,unavailableDate:"Den valgte dato er ikke tilgængelig."};var _S={};_S={rangeOverflow:e=>`Der Wert muss ${e.maxValue} oder früher sein.`,rangeReversed:"Das Anfangsdatum muss vor dem Enddatum liegen.",rangeUnderflow:e=>`Der Wert muss ${e.minValue} oder später sein.`,unavailableDate:"Das ausgewählte Datum ist nicht verfügbar."};var ES={};ES={rangeOverflow:e=>`Η τιμή πρέπει να είναι ${e.maxValue} ή παλαιότερη.`,rangeReversed:"Η ημερομηνία έναρξης πρέπει να είναι πριν από την ημερομηνία λήξης.",rangeUnderflow:e=>`Η τιμή πρέπει να είναι ${e.minValue} ή μεταγενέστερη.`,unavailableDate:"Η επιλεγμένη ημερομηνία δεν είναι διαθέσιμη."};var SS={};SS={rangeUnderflow:e=>`Value must be ${e.minValue} or later.`,rangeOverflow:e=>`Value must be ${e.maxValue} or earlier.`,rangeReversed:"Start date must be before end date.",unavailableDate:"Selected date unavailable."};var CS={};CS={rangeOverflow:e=>`El valor debe ser ${e.maxValue} o anterior.`,rangeReversed:"La fecha de inicio debe ser anterior a la fecha de finalización.",rangeUnderflow:e=>`El valor debe ser ${e.minValue} o posterior.`,unavailableDate:"Fecha seleccionada no disponible."};var kS={};kS={rangeOverflow:e=>`Väärtus peab olema ${e.maxValue} või varasem.`,rangeReversed:"Alguskuupäev peab olema enne lõppkuupäeva.",rangeUnderflow:e=>`Väärtus peab olema ${e.minValue} või hilisem.`,unavailableDate:"Valitud kuupäev pole saadaval."};var PS={};PS={rangeOverflow:e=>`Arvon on oltava ${e.maxValue} tai sitä aikaisempi.`,rangeReversed:"Aloituspäivän on oltava ennen lopetuspäivää.",rangeUnderflow:e=>`Arvon on oltava ${e.minValue} tai sitä myöhäisempi.`,unavailableDate:"Valittu päivämäärä ei ole käytettävissä."};var TS={};TS={rangeOverflow:e=>`La valeur doit être ${e.maxValue} ou antérieure.`,rangeReversed:"La date de début doit être antérieure à la date de fin.",rangeUnderflow:e=>`La valeur doit être ${e.minValue} ou ultérieure.`,unavailableDate:"La date sélectionnée n’est pas disponible."};var RS={};RS={rangeOverflow:e=>`הערך חייב להיות ${e.maxValue} או מוקדם יותר.`,rangeReversed:"תאריך ההתחלה חייב להיות לפני תאריך הסיום.",rangeUnderflow:e=>`הערך חייב להיות ${e.minValue} או מאוחר יותר.`,unavailableDate:"התאריך הנבחר אינו זמין."};var MS={};MS={rangeOverflow:e=>`Vrijednost mora biti ${e.maxValue} ili ranije.`,rangeReversed:"Datum početka mora biti prije datuma završetka.",rangeUnderflow:e=>`Vrijednost mora biti ${e.minValue} ili kasnije.`,unavailableDate:"Odabrani datum nije dostupan."};var FS={};FS={rangeOverflow:e=>`Az értéknek ${e.maxValue} vagy korábbinak kell lennie.`,rangeReversed:"A kezdő dátumnak a befejező dátumnál korábbinak kell lennie.",rangeUnderflow:e=>`Az értéknek ${e.minValue} vagy későbbinek kell lennie.`,unavailableDate:"A kiválasztott dátum nem érhető el."};var AS={};AS={rangeOverflow:e=>`Il valore deve essere ${e.maxValue} o precedente.`,rangeReversed:"La data di inizio deve essere antecedente alla data di fine.",rangeUnderflow:e=>`Il valore deve essere ${e.minValue} o successivo.`,unavailableDate:"Data selezionata non disponibile."};var OS={};OS={rangeOverflow:e=>`値は ${e.maxValue} 以下にする必要があります。`,rangeReversed:"開始日は終了日より前にする必要があります。",rangeUnderflow:e=>`値は ${e.minValue} 以上にする必要があります。`,unavailableDate:"選択した日付は使用できません。"};var BS={};BS={rangeOverflow:e=>`값은 ${e.maxValue} 이전이어야 합니다.`,rangeReversed:"시작일은 종료일 이전이어야 합니다.",rangeUnderflow:e=>`값은 ${e.minValue} 이상이어야 합니다.`,unavailableDate:"선택한 날짜를 사용할 수 없습니다."};var IS={};IS={rangeOverflow:e=>`Reikšmė turi būti ${e.maxValue} arba ankstesnė.`,rangeReversed:"Pradžios data turi būti ankstesnė nei pabaigos data.",rangeUnderflow:e=>`Reikšmė turi būti ${e.minValue} arba naujesnė.`,unavailableDate:"Pasirinkta data nepasiekiama."};var LS={};LS={rangeOverflow:e=>`Vērtībai ir jābūt ${e.maxValue} vai agrākai.`,rangeReversed:"Sākuma datumam ir jābūt pirms beigu datuma.",rangeUnderflow:e=>`Vērtībai ir jābūt ${e.minValue} vai vēlākai.`,unavailableDate:"Atlasītais datums nav pieejams."};var NS={};NS={rangeOverflow:e=>`Verdien må være ${e.maxValue} eller tidligere.`,rangeReversed:"Startdatoen må være før sluttdatoen.",rangeUnderflow:e=>`Verdien må være ${e.minValue} eller senere.`,unavailableDate:"Valgt dato utilgjengelig."};var jS={};jS={rangeOverflow:e=>`Waarde moet ${e.maxValue} of eerder zijn.`,rangeReversed:"De startdatum moet voor de einddatum liggen.",rangeUnderflow:e=>`Waarde moet ${e.minValue} of later zijn.`,unavailableDate:"Geselecteerde datum niet beschikbaar."};var zS={};zS={rangeOverflow:e=>`Wartość musi mieć wartość ${e.maxValue} lub wcześniejszą.`,rangeReversed:"Data rozpoczęcia musi być wcześniejsza niż data zakończenia.",rangeUnderflow:e=>`Wartość musi mieć wartość ${e.minValue} lub późniejszą.`,unavailableDate:"Wybrana data jest niedostępna."};var VS={};VS={rangeOverflow:e=>`O valor deve ser ${e.maxValue} ou anterior.`,rangeReversed:"A data inicial deve ser anterior à data final.",rangeUnderflow:e=>`O valor deve ser ${e.minValue} ou posterior.`,unavailableDate:"Data selecionada indisponível."};var WS={};WS={rangeOverflow:e=>`O valor tem de ser ${e.maxValue} ou anterior.`,rangeReversed:"A data de início deve ser anterior à data de fim.",rangeUnderflow:e=>`O valor tem de ser ${e.minValue} ou posterior.`,unavailableDate:"Data selecionada indisponível."};var US={};US={rangeOverflow:e=>`Valoarea trebuie să fie ${e.maxValue} sau anterioară.`,rangeReversed:"Data de început trebuie să fie anterioară datei de sfârșit.",rangeUnderflow:e=>`Valoarea trebuie să fie ${e.minValue} sau ulterioară.`,unavailableDate:"Data selectată nu este disponibilă."};var HS={};HS={rangeOverflow:e=>`Значение должно быть не позже ${e.maxValue}.`,rangeReversed:"Дата начала должна предшествовать дате окончания.",rangeUnderflow:e=>`Значение должно быть не раньше ${e.minValue}.`,unavailableDate:"Выбранная дата недоступна."};var KS={};KS={rangeOverflow:e=>`Hodnota musí byť ${e.maxValue} alebo skoršia.`,rangeReversed:"Dátum začiatku musí byť skorší ako dátum konca.",rangeUnderflow:e=>`Hodnota musí byť ${e.minValue} alebo neskoršia.`,unavailableDate:"Vybratý dátum je nedostupný."};var YS={};YS={rangeOverflow:e=>`Vrednost mora biti ${e.maxValue} ali starejša.`,rangeReversed:"Začetni datum mora biti pred končnim datumom.",rangeUnderflow:e=>`Vrednost mora biti ${e.minValue} ali novejša.`,unavailableDate:"Izbrani datum ni na voljo."};var qS={};qS={rangeOverflow:e=>`Vrednost mora da bude ${e.maxValue} ili starija.`,rangeReversed:"Datum početka mora biti pre datuma završetka.",rangeUnderflow:e=>`Vrednost mora da bude ${e.minValue} ili novija.`,unavailableDate:"Izabrani datum nije dostupan."};var GS={};GS={rangeOverflow:e=>`Värdet måste vara ${e.maxValue} eller tidigare.`,rangeReversed:"Startdatumet måste vara före slutdatumet.",rangeUnderflow:e=>`Värdet måste vara ${e.minValue} eller senare.`,unavailableDate:"Det valda datumet är inte tillgängligt."};var ZS={};ZS={rangeOverflow:e=>`Değer, ${e.maxValue} veya öncesi olmalıdır.`,rangeReversed:"Başlangıç tarihi bitiş tarihinden önce olmalıdır.",rangeUnderflow:e=>`Değer, ${e.minValue} veya sonrası olmalıdır.`,unavailableDate:"Seçilen tarih kullanılamıyor."};var XS={};XS={rangeOverflow:e=>`Значення має бути не пізніше ${e.maxValue}.`,rangeReversed:"Дата початку має передувати даті завершення.",rangeUnderflow:e=>`Значення має бути не раніше ${e.minValue}.`,unavailableDate:"Вибрана дата недоступна."};var QS={};QS={rangeOverflow:e=>`值必须是 ${e.maxValue} 或更早日期。`,rangeReversed:"开始日期必须早于结束日期。",rangeUnderflow:e=>`值必须是 ${e.minValue} 或更晚日期。`,unavailableDate:"所选日期不可用。"};var JS={};JS={rangeOverflow:e=>`值必須是 ${e.maxValue} 或更早。`,rangeReversed:"開始日期必須在結束日期之前。",rangeUnderflow:e=>`值必須是 ${e.minValue} 或更晚。`,unavailableDate:"所選日期無法使用。"};var eC={};eC={"ar-AE":$S,"bg-BG":xS,"cs-CZ":wS,"da-DK":DS,"de-DE":_S,"el-GR":ES,"en-US":SS,"es-ES":CS,"et-EE":kS,"fi-FI":PS,"fr-FR":TS,"he-IL":RS,"hr-HR":MS,"hu-HU":FS,"it-IT":AS,"ja-JP":OS,"ko-KR":BS,"lt-LT":IS,"lv-LV":LS,"nb-NO":NS,"nl-NL":jS,"pl-PL":zS,"pt-BR":VS,"pt-PT":WS,"ro-RO":US,"ru-RU":HS,"sk-SK":KS,"sl-SI":YS,"sr-SP":qS,"sv-SE":GS,"tr-TR":ZS,"uk-UA":XS,"zh-CN":QS,"zh-TW":JS};function Ij(e){return e&&e.__esModule?e.default:e}const tC=new gi(Ij(eC));function nC(){return typeof navigator<"u"&&(navigator.language||navigator.userLanguage)||"en-US"}function Fg(e,t,n,r,i){let a=e!=null&&n!=null&&e.compare(n)>0,s=e!=null&&t!=null&&e.compare(t)<0,o=e!=null&&(r==null?void 0:r(e))||!1,l=a||s||o,u=[];if(l){let c=nC(),d=gi.getGlobalDictionaryForPackage("@react-stately/datepicker")||tC,f=new y8(c,d),h=new ii(c,vl({},i)),p=h.resolvedOptions().timeZone;s&&u.push(f.format("rangeUnderflow",{minValue:h.format(t.toDate(p))})),a&&u.push(f.format("rangeOverflow",{maxValue:h.format(n.toDate(p))})),o&&u.push(f.format("unavailableDate"))}return{isInvalid:l,validationErrors:u,validationDetails:{badInput:o,customError:!1,patternMismatch:!1,rangeOverflow:a,rangeUnderflow:s,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valueMissing:!1,valid:!l}}}function Lj(e,t,n,r,i){let a=Fg(e==null?void 0:e.start,t,n,r,i),s=Fg(e==null?void 0:e.end,t,n,r,i),o=od(a,s);if(e.end!=null&&e.start!=null&&e.end.compare(e.start)<0){let l=gi.getGlobalDictionaryForPackage("@react-stately/datepicker")||tC;o=od(o,{isInvalid:!0,validationErrors:[l.getStringForLocale("rangeReversed",nC())],validationDetails:{...Nf,rangeUnderflow:!0,rangeOverflow:!0,valid:!1}})}return o}const Nj={year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"2-digit",second:"2-digit"},jj={year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"};function vl(e,t){e={...t.shouldForceLeadingZeros?jj:Nj,...e};let r=t.granularity||"minute",i=Object.keys(e);var a;let s=i.indexOf((a=t.maxGranularity)!==null&&a!==void 0?a:"year");s<0&&(s=0);let o=i.indexOf(r);if(o<0&&(o=2),s>o)throw new Error("maxGranularity must be greater than granularity");let l=i.slice(s,o+1).reduce((c,d)=>(c[d]=e[d],c),{});return t.hourCycle!=null&&(l.hour12=t.hourCycle===12),l.timeZone=t.timeZone||"UTC",(r==="hour"||r==="minute"||r==="second")&&t.timeZone&&!t.hideTimeZone&&(l.timeZoneName="short"),t.showEra&&s===0&&(l.era="short"),l}function Eu(e){return e&&"hour"in e?e:new Nl}function rC(e,t){if(e===null)return null;if(e)return Oe(e,t)}function Zs(e,t,n,r){if(e)return rC(e,n);let i=Oe(D8(r).set({hour:0,minute:0,second:0,millisecond:0}),n);return t==="year"||t==="month"||t==="day"?Zt(i):r?i:Xn(i)}function iC(e,t){let n=e&&"timeZone"in e?e.timeZone:void 0,r=e&&"minute"in e?"minute":"day";if(e&&t&&!(t in e))throw new Error("Invalid granularity "+t+" for value "+e.toString());let[i,a]=y.useState([r,n]);e&&(i[0]!==r||i[1]!==n)&&a([r,n]),t||(t=e?r:i[0]);let s=e?n:i[1];return[t,s]}const zj=new gi({ach:{year:"mwaka",month:"dwe",day:"nino"},af:{year:"jjjj",month:"mm",day:"dd"},am:{year:"ዓዓዓዓ",month:"ሚሜ",day:"ቀቀ"},an:{year:"aaaa",month:"mm",day:"dd"},ar:{year:"سنة",month:"شهر",day:"يوم"},ast:{year:"aaaa",month:"mm",day:"dd"},az:{year:"iiii",month:"aa",day:"gg"},be:{year:"гггг",month:"мм",day:"дд"},bg:{year:"гггг",month:"мм",day:"дд"},bn:{year:"yyyy",month:"মিমি",day:"dd"},br:{year:"bbbb",month:"mm",day:"dd"},bs:{year:"gggg",month:"mm",day:"dd"},ca:{year:"aaaa",month:"mm",day:"dd"},cak:{year:"jjjj",month:"ii",day:"q'q'"},ckb:{year:"ساڵ",month:"مانگ",day:"ڕۆژ"},cs:{year:"rrrr",month:"mm",day:"dd"},cy:{year:"bbbb",month:"mm",day:"dd"},da:{year:"åååå",month:"mm",day:"dd"},de:{year:"jjjj",month:"mm",day:"tt"},dsb:{year:"llll",month:"mm",day:"źź"},el:{year:"εεεε",month:"μμ",day:"ηη"},en:{year:"yyyy",month:"mm",day:"dd"},eo:{year:"jjjj",month:"mm",day:"tt"},es:{year:"aaaa",month:"mm",day:"dd"},et:{year:"aaaa",month:"kk",day:"pp"},eu:{year:"uuuu",month:"hh",day:"ee"},fa:{year:"سال",month:"ماه",day:"روز"},ff:{year:"hhhh",month:"ll",day:"ññ"},fi:{year:"vvvv",month:"kk",day:"pp"},fr:{year:"aaaa",month:"mm",day:"jj"},fy:{year:"jjjj",month:"mm",day:"dd"},ga:{year:"bbbb",month:"mm",day:"ll"},gd:{year:"bbbb",month:"mm",day:"ll"},gl:{year:"aaaa",month:"mm",day:"dd"},he:{year:"שנה",month:"חודש",day:"יום"},hr:{year:"gggg",month:"mm",day:"dd"},hsb:{year:"llll",month:"mm",day:"dd"},hu:{year:"éééé",month:"hh",day:"nn"},ia:{year:"aaaa",month:"mm",day:"dd"},id:{year:"tttt",month:"bb",day:"hh"},it:{year:"aaaa",month:"mm",day:"gg"},ja:{year:" 年 ",month:"月",day:"日"},ka:{year:"წწწწ",month:"თთ",day:"რრ"},kk:{year:"жжжж",month:"аа",day:"кк"},kn:{year:"ವವವವ",month:"ಮಿಮೀ",day:"ದಿದಿ"},ko:{year:"연도",month:"월",day:"일"},lb:{year:"jjjj",month:"mm",day:"dd"},lo:{year:"ປປປປ",month:"ດດ",day:"ວວ"},lt:{year:"mmmm",month:"mm",day:"dd"},lv:{year:"gggg",month:"mm",day:"dd"},meh:{year:"aaaa",month:"mm",day:"dd"},ml:{year:"വർഷം",month:"മാസം",day:"തീയതി"},ms:{year:"tttt",month:"mm",day:"hh"},nl:{year:"jjjj",month:"mm",day:"dd"},nn:{year:"åååå",month:"mm",day:"dd"},no:{year:"åååå",month:"mm",day:"dd"},oc:{year:"aaaa",month:"mm",day:"jj"},pl:{year:"rrrr",month:"mm",day:"dd"},pt:{year:"aaaa",month:"mm",day:"dd"},rm:{year:"oooo",month:"mm",day:"dd"},ro:{year:"aaaa",month:"ll",day:"zz"},ru:{year:"гггг",month:"мм",day:"дд"},sc:{year:"aaaa",month:"mm",day:"dd"},scn:{year:"aaaa",month:"mm",day:"jj"},sk:{year:"rrrr",month:"mm",day:"dd"},sl:{year:"llll",month:"mm",day:"dd"},sr:{year:"гггг",month:"мм",day:"дд"},sv:{year:"åååå",month:"mm",day:"dd"},szl:{year:"rrrr",month:"mm",day:"dd"},tg:{year:"сссс",month:"мм",day:"рр"},th:{year:"ปปปป",month:"ดด",day:"วว"},tr:{year:"yyyy",month:"aa",day:"gg"},uk:{year:"рррр",month:"мм",day:"дд"},"zh-CN":{year:"年",month:"月",day:"日"},"zh-TW":{year:"年",month:"月",day:"日"}},"en");function Vj(e,t,n){return e==="era"||e==="dayPeriod"?t:e==="year"||e==="month"||e==="day"?zj.getStringForLocale(e,n):"––"}const Su={year:!0,month:!0,day:!0,hour:!0,minute:!0,second:!0,dayPeriod:!0,era:!0},P5={year:5,month:2,day:7,hour:2,minute:15,second:15},Wj={dayperiod:"dayPeriod"};function aC(e){let{locale:t,createCalendar:n,hideTimeZone:r,isDisabled:i,isReadOnly:a,isRequired:s,minValue:o,maxValue:l,isDateUnavailable:u}=e,c=e.value||e.defaultValue||e.placeholderValue,[d,f]=iC(c,e.granularity),h=f||"UTC";if(c&&!(d in c))throw new Error("Invalid granularity "+d+" for value "+c.toString());let p=y.useMemo(()=>new ii(t),[t]),g=y.useMemo(()=>n(p.resolvedOptions().calendar),[n,p]),[b,v]=aa(e.value,e.defaultValue,e.onChange),m=y.useMemo(()=>rC(b,g),[b,g]),[$,w]=y.useState(()=>Zs(e.placeholderValue,d,g,f)),D=m||$,S=g.identifier==="gregory"&&D.era==="BC",k=y.useMemo(()=>{var W;return{granularity:d,maxGranularity:(W=e.maxGranularity)!==null&&W!==void 0?W:"year",timeZone:f,hideTimeZone:r,hourCycle:e.hourCycle,showEra:S,shouldForceLeadingZeros:e.shouldForceLeadingZeros}},[e.maxGranularity,d,e.hourCycle,e.shouldForceLeadingZeros,f,r,S]),x=y.useMemo(()=>vl({},k),[k]),T=y.useMemo(()=>new ii(t,x),[t,x]),P=y.useMemo(()=>T.resolvedOptions(),[T]),E=y.useMemo(()=>T.formatToParts(new Date).filter(W=>Su[W.type]).reduce((W,Ce)=>(W[Ce.type]=!0,W),{}),[T]),[A,R]=y.useState(()=>e.value||e.defaultValue?{...E}:{}),F=y.useRef(),z=y.useRef(g.identifier);y.useEffect(()=>{g.identifier!==z.current&&(z.current=g.identifier,w(W=>Object.keys(A).length>0?Oe(W,g):Zs(e.placeholderValue,d,g,f)))},[g,d,A,f,e.placeholderValue]),b&&Object.keys(A).length<Object.keys(E).length&&(A={...E},R(A)),b==null&&Object.keys(A).length===Object.keys(E).length&&(A={},R(A),w(Zs(e.placeholderValue,d,g,f)));let B=m&&Object.keys(A).length>=Object.keys(E).length?m:$,C=W=>{if(e.isDisabled||e.isReadOnly)return;let Ce=Object.keys(A),et=Object.keys(E);W==null?(v(null),w(Zs(e.placeholderValue,d,g,f)),R({})):Ce.length>=et.length||Ce.length===et.length-1&&E.dayPeriod&&!A.dayPeriod&&F.current!=="dayPeriod"?(W=Oe(W,(c==null?void 0:c.calendar)||new Ft),v(W)):w(W),F.current=null},O=y.useMemo(()=>B.toDate(h),[B,h]),I=y.useMemo(()=>T.formatToParts(O).map(W=>{let Ce=Su[W.type];W.type==="era"&&g.getEras().length===1&&(Ce=!1);let et=Su[W.type]&&!A[W.type],yt=Su[W.type]?Vj(W.type,W.value,t):null;return{type:Wj[W.type]||W.type,text:et?yt:W.value,...Uj(B,W.type,P),isPlaceholder:et,placeholder:yt,isEditable:Ce}}),[O,A,T,P,B,g,t]);E.era&&A.year&&!A.era?(A.era=!0,R({...A})):!E.era&&A.era&&(delete A.era,R({...A}));let N=W=>{A[W]=!0,W==="year"&&E.era&&(A.era=!0),R({...A})},X=(W,Ce)=>{if(A[W])C(Hj(B,W,Ce,P));else{N(W);let et=Object.keys(A),yt=Object.keys(E);(et.length>=yt.length||et.length===yt.length-1&&E.dayPeriod&&!A.dayPeriod)&&C(B)}},Q=y.useMemo(()=>Fg(b,o,l,u,k),[b,o,l,u,k]),je=l7({...e,value:b,builtinValidation:Q}),$e=je.displayValidation.isInvalid,lt=e.validationState||($e?"invalid":null);var xe;return{...je,value:m,dateValue:O,calendar:g,setValue:C,segments:I,dateFormatter:T,validationState:lt,isInvalid:$e,granularity:d,maxGranularity:(xe=e.maxGranularity)!==null&&xe!==void 0?xe:"year",isDisabled:i,isReadOnly:a,isRequired:s,increment(W){X(W,1)},decrement(W){X(W,-1)},incrementPage(W){X(W,P5[W]||1)},decrementPage(W){X(W,-(P5[W]||1))},setSegment(W,Ce){N(W),C(Kj(B,W,Ce,P))},confirmPlaceholder(){if(e.isDisabled||e.isReadOnly)return;let W=Object.keys(A),Ce=Object.keys(E);W.length===Ce.length-1&&E.dayPeriod&&!A.dayPeriod&&(A={...E},R(A),C(B.copy()))},clearSegment(W){delete A[W],F.current=W,R({...A});let Ce=Zs(e.placeholderValue,d,g,f),et=B;if(W==="dayPeriod"&&"hour"in B&&"hour"in Ce){let yt=B.hour>=12,ut=Ce.hour>=12;yt&&!ut?et=B.set({hour:B.hour-12}):!yt&&ut&&(et=B.set({hour:B.hour+12}))}else W in B&&(et=B.set({[W]:Ce[W]}));v(null),C(et)},formatValue(W){if(!m)return"";let Ce=vl(W,k);return new ii(t,Ce).format(O)}}}function Uj(e,t,n){switch(t){case"era":{let r=e.calendar.getEras();return{value:r.indexOf(e.era),minValue:0,maxValue:r.length-1}}case"year":return{value:e.year,minValue:1,maxValue:e.calendar.getYearsInEra(e)};case"month":return{value:e.month,minValue:yI(e),maxValue:e.calendar.getMonthsInYear(e)};case"day":return{value:e.day,minValue:$I(e),maxValue:e.calendar.getDaysInMonth(e)}}if("hour"in e)switch(t){case"dayPeriod":return{value:e.hour>=12?12:0,minValue:0,maxValue:12};case"hour":if(n.hour12){let r=e.hour>=12;return{value:e.hour,minValue:r?12:0,maxValue:r?23:11}}return{value:e.hour,minValue:0,maxValue:23};case"minute":return{value:e.minute,minValue:0,maxValue:59};case"second":return{value:e.second,minValue:0,maxValue:59}}return{}}function Hj(e,t,n,r){switch(t){case"era":case"year":case"month":case"day":return e.cycle(t,n,{round:t==="year"})}if("hour"in e)switch(t){case"dayPeriod":{let i=e.hour,a=i>=12;return e.set({hour:a?i-12:i+12})}case"hour":case"minute":case"second":return e.cycle(t,n,{round:t!=="hour",hourCycle:r.hour12?12:24})}}function Kj(e,t,n,r){switch(t){case"day":case"month":case"year":case"era":return e.set({[t]:n})}if("hour"in e)switch(t){case"dayPeriod":{let i=e.hour,a=i>=12;return n>=12===a?e:e.set({hour:a?i-12:i+12})}case"hour":if(r.hour12){let a=e.hour>=12;!a&&n===12&&(n=0),a&&n<12&&(n+=12)}case"minute":case"second":return e.set({[t]:n})}}function Yj(e){var t,n;let r=yS(e),[i,a]=aa(e.value,e.defaultValue||null,e.onChange),[s,o]=y.useState(()=>i||{start:null,end:null});i==null&&s.start&&s.end&&(s={start:null,end:null},o(s));let l=i||s,u=B=>{o(B||{start:null,end:null}),B!=null&&B.start&&B.end?a(B):a(null)},c=(l==null?void 0:l.start)||(l==null?void 0:l.end)||e.placeholderValue,[d,f]=iC(c,e.granularity),h=d==="hour"||d==="minute"||d==="second";var p;let g=(p=e.shouldCloseOnSelect)!==null&&p!==void 0?p:!0,[b,v]=y.useState(null),[m,$]=y.useState(null);l&&l.start&&l.end&&(b=l,"hour"in l.start&&(m=l));let w=(B,C)=>{u({start:"timeZone"in C.start?C.start.set(Zt(B.start)):Xn(B.start,C.start),end:"timeZone"in C.end?C.end.set(Zt(B.end)):Xn(B.end,C.end)}),v(null),$(null),R.commitValidation()},D=B=>{let C=typeof g=="function"?g():g;h?C||B.start&&B.end&&(m!=null&&m.start)&&(m!=null&&m.end)?w(B,{start:(m==null?void 0:m.start)||Eu(e.placeholderValue),end:(m==null?void 0:m.end)||Eu(e.placeholderValue)}):v(B):B.start&&B.end?(u(B),R.commitValidation()):v(B),C&&r.setOpen(!1)},S=B=>{b!=null&&b.start&&(b!=null&&b.end)&&B.start&&B.end?w(b,B):$(B)},k=(l==null||(t=l.start)===null||t===void 0?void 0:t.calendar.identifier)==="gregory"&&l.start.era==="BC"||(l==null||(n=l.end)===null||n===void 0?void 0:n.calendar.identifier)==="gregory"&&l.end.era==="BC",x=y.useMemo(()=>({granularity:d,timeZone:f,hideTimeZone:e.hideTimeZone,hourCycle:e.hourCycle,shouldForceLeadingZeros:e.shouldForceLeadingZeros,showEra:k}),[d,e.hourCycle,e.shouldForceLeadingZeros,f,e.hideTimeZone,k]),{minValue:T,maxValue:P,isDateUnavailable:E}=e,A=y.useMemo(()=>Lj(l,T,P,E,x),[l,T,P,E,x]),R=l7({...e,value:i,name:y.useMemo(()=>[e.startName,e.endName],[e.startName,e.endName]),builtinValidation:A}),F=R.displayValidation.isInvalid,z=e.validationState||(F?"invalid":null);return{...R,value:l,setValue:u,dateRange:b,timeRange:m,granularity:d,hasTime:h,setDate(B,C){D({...b,[B]:C})},setTime(B,C){S({...m,[B]:C})},setDateTime(B,C){u({...l,[B]:C})},setDateRange:D,setTimeRange:S,...r,setOpen(B){!B&&!(l!=null&&l.start&&(l!=null&&l.end))&&(b!=null&&b.start)&&(b!=null&&b.end)&&h&&w(b,{start:(m==null?void 0:m.start)||Eu(e.placeholderValue),end:(m==null?void 0:m.end)||Eu(e.placeholderValue)}),r.setOpen(B)},validationState:z,isInvalid:F,formatValue(B,C){if(!l||!l.start||!l.end)return null;let O="timeZone"in l.start?l.start.timeZone:void 0,I=e.granularity||(l.start&&"minute"in l.start?"minute":"day"),N="timeZone"in l.end?l.end.timeZone:void 0,X=e.granularity||(l.end&&"minute"in l.end?"minute":"day"),Q=vl(C,{granularity:I,timeZone:O,hideTimeZone:e.hideTimeZone,hourCycle:e.hourCycle,showEra:l.start.calendar.identifier==="gregory"&&l.start.era==="BC"||l.end.calendar.identifier==="gregory"&&l.end.era==="BC"}),je=l.start.toDate(O||"UTC"),$e=l.end.toDate(N||"UTC"),lt=new ii(B,Q),xe;if(O===N&&I===X&&l.start.compare(l.end)!==0){try{let W=lt.formatRangeToParts(je,$e),Ce=-1;for(let ut=0;ut<W.length;ut++){let Gf=W[ut];if(Gf.source==="shared"&&Gf.type==="literal")Ce=ut;else if(Gf.source==="endRange")break}let et="",yt="";for(let ut=0;ut<W.length;ut++)ut<Ce?et+=W[ut].value:ut>Ce&&(yt+=W[ut].value);return{start:et,end:yt}}catch{}xe=lt}else{let W=vl(C,{granularity:X,timeZone:N,hideTimeZone:e.hideTimeZone,hourCycle:e.hourCycle});xe=new ii(B,W)}return{start:lt.format(je),end:xe.format($e)}}}}function qj(e){let{placeholderValue:t=new Nl,minValue:n,maxValue:r,granularity:i,validate:a}=e,[s,o]=aa(e.value,e.defaultValue,e.onChange),l=s||t,u=l&&"day"in l?l:void 0,c=e.defaultValue&&"timeZone"in e.defaultValue?e.defaultValue.timeZone:void 0,d=y.useMemo(()=>{let m=l&&"timeZone"in l?l.timeZone:void 0;return(m||c)&&t?P8(Xs(t),m||c):Xs(t)},[t,l,c]),f=y.useMemo(()=>Xs(n,u),[n,u]),h=y.useMemo(()=>Xs(r,u),[r,u]),p=y.useMemo(()=>s&&"day"in s?N2(s):s,[s]),g=y.useMemo(()=>s==null?null:Xs(s),[s]);return{...aC({...e,value:g,defaultValue:void 0,minValue:f,maxValue:h,onChange:m=>{o(u||c?m:m&&N2(m))},granularity:i||"minute",maxGranularity:"hour",placeholderValue:d,createCalendar:()=>new Ft,validate:y.useCallback(()=>a==null?void 0:a(s),[a,s])}),timeValue:p}}function Xs(e,t=Il(Pf())){return e?"day"in e?e:Xn(t,e):null}const C$=_.createContext(null);C$.displayName="ProviderContext";function Os(e,t,n,r){Object.defineProperty(e,t,{get:n,set:r,enumerable:!0,configurable:!0})}var ga={};Os(ga,"focus-ring",()=>Ag,e=>Ag=e);Os(ga,"i18nFontFamily",()=>Og,e=>Og=e);Os(ga,"spectrum",()=>Bg,e=>Bg=e);Os(ga,"spectrum-FocusRing-ring",()=>cd,e=>cd=e);Os(ga,"spectrum-FocusRing",()=>Ig,e=>Ig=e);Os(ga,"spectrum-FocusRing--quiet",()=>Lg,e=>Lg=e);var Ag,Og,Bg,cd,Ig,Lg;Ag="JuTe6q_focus-ring";Og="JuTe6q_i18nFontFamily";Bg="JuTe6q_spectrum";cd="JuTe6q_spectrum-FocusRing-ring";Ig=`JuTe6q_spectrum-FocusRing ${cd}`;Lg="JuTe6q_spectrum-FocusRing--quiet";function vi(e,t,n,r){Object.defineProperty(e,t,{get:n,set:r,enumerable:!0,configurable:!0})}var _r={};vi(_r,"focus-ring",()=>Ng,e=>Ng=e);vi(_r,"i18nFontFamily",()=>dd,e=>dd=e);vi(_r,"spectrum",()=>jg,e=>jg=e);vi(_r,"spectrum-Body",()=>zg,e=>zg=e);vi(_r,"spectrum-Body--italic",()=>Vg,e=>Vg=e);vi(_r,"spectrum-FocusRing-ring",()=>fd,e=>fd=e);vi(_r,"spectrum-FocusRing",()=>Wg,e=>Wg=e);vi(_r,"spectrum-FocusRing--quiet",()=>Ug,e=>Ug=e);var Ng,dd,jg,zg,Vg,fd,Wg,Ug;Ng="_5QszkG_focus-ring";dd="_5QszkG_i18nFontFamily";jg=`_5QszkG_spectrum ${dd}`;zg="_5QszkG_spectrum-Body";Vg="_5QszkG_spectrum-Body--italic";fd="_5QszkG_spectrum-FocusRing-ring";Wg=`_5QszkG_spectrum-FocusRing ${fd}`;Ug="_5QszkG_spectrum-FocusRing--quiet";function Gj(e,t){let n=ig("(prefers-color-scheme: dark)"),r=ig("(prefers-color-scheme: light)");return e.dark&&n?"dark":e.light&&r?"light":e.dark&&t==="dark"?"dark":e.light&&t==="light"||!e.dark||e.light?"light":"dark"}function Zj(e){return ig("(any-pointer: fine)")&&e.medium?"medium":e.large?"large":"medium"}var sC={};sC=JSON.parse('{"name":"@react-spectrum/provider","version":"3.9.6","description":"Spectrum UI components in React","license":"Apache-2.0","main":"dist/main.js","module":"dist/module.js","exports":{"types":"./dist/types.d.ts","import":"./dist/import.mjs","require":"./dist/main.js"},"types":"dist/types.d.ts","source":"src/index.ts","files":["dist","src"],"sideEffects":["*.css"],"targets":{"main":{"includeNodeModules":["@adobe/spectrum-css-temp"]},"module":{"includeNodeModules":["@adobe/spectrum-css-temp"]}},"repository":{"type":"git","url":"https://github.com/adobe/react-spectrum"},"dependencies":{"@react-aria/i18n":"^3.11.0","@react-aria/overlays":"^3.22.0","@react-aria/utils":"^3.24.0","@react-spectrum/utils":"^3.11.6","@react-types/provider":"^3.8.0","@react-types/shared":"^3.23.0","@swc/helpers":"^0.5.0","clsx":"^2.0.0"},"devDependencies":{"@adobe/spectrum-css-temp":"3.0.0-alpha.1"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0-rc.1 || ^18.0.0","react-dom":"^16.8.0 || ^17.0.0-rc.1 || ^18.0.0"},"publishConfig":{"access":"public"}}');function T5(e){return e&&e.__esModule?e.default:e}const Xj={S:640,M:768,L:1024,XL:1280,XXL:1536};function Qj(e,t){let n=va(),r=n&&n.colorScheme,i=n&&n.breakpoints,{theme:a=n&&n.theme,defaultColorScheme:s}=e;if(!a)throw new Error("theme not found, the parent provider must have a theme provided");let o=Gj(a,s),l=Zj(a),{locale:u}=Qe(),c=!!a[r],{colorScheme:d=c?r:o,scale:f=n?n.scale:l,locale:h=n?u:null,breakpoints:p=n?i:Xj,children:g,isQuiet:b,isEmphasized:v,isDisabled:m,isRequired:$,isReadOnly:w,validationState:D,router:S,...k}=e,x={version:sC.version,theme:a,breakpoints:p,colorScheme:d,scale:f,isQuiet:b,isEmphasized:v,isDisabled:m,isRequired:$,isReadOnly:w,validationState:D},T=sI(p),P={};Object.entries(x).forEach(([z,B])=>B!==void 0&&(P[z]=B));let E=Object.assign({},n,P),A=g,R=Xt(k),{styleProps:F}=st(k,void 0,{matchedBreakpoints:T});return(!n||e.locale||a!==n.theme||d!==n.colorScheme||f!==n.scale||Object.keys(R).length>0||k.UNSAFE_className||Object.keys(F.style).length>0)&&(A=_.createElement(Jj,{...e,UNSAFE_style:{isolation:n?void 0:"isolate",...F.style},ref:t},A)),S&&(A=_.createElement(_L,S,A)),_.createElement(C$.Provider,{value:E},_.createElement(cI,{locale:h},_.createElement(aI,{matchedBreakpoints:T},_.createElement(gj,null,A))))}let oC=_.forwardRef(Qj);const Jj=_.forwardRef(function(t,n){let{children:r,...i}=t,{locale:a,direction:s}=Qe(),{theme:o,colorScheme:l,scale:u}=va(),{modalProviderProps:c}=vj(),{styleProps:d}=st(i),f=Nn(n),h=Object.keys(o[l])[0],p=Object.keys(o[u])[0],g=Ef(d.className,T5(ga).spectrum,T5(_r).spectrum,Object.values(o[l]),Object.values(o[u]),o.global?Object.values(o.global):null,{"react-spectrum-provider":fu,spectrum:fu,[h]:fu,[p]:fu});var b,v;let m={...d.style,colorScheme:(v=(b=t.colorScheme)!==null&&b!==void 0?b:l)!==null&&v!==void 0?v:Object.keys(o).filter(w=>w==="light"||w==="dark").join(" ")},$=y.useRef(!1);return y.useEffect(()=>{if(s&&f.current){let w=f.current.parentElement.closest("[dir]"),D=w&&w.getAttribute("dir");D&&D!==s&&!$.current&&(console.warn(`Language directions cannot be nested. ${s} inside ${D}.`),$.current=!0)}},[s,f,$]),_.createElement("div",{...Xt(i),...d,...c,className:g,style:m,lang:a,dir:s,ref:f},r)});function va(){return y.useContext(C$)}function Vl(e){let t=va();return t?Object.assign({},{isQuiet:t.isQuiet,isEmphasized:t.isEmphasized,isDisabled:t.isDisabled,isRequired:t.isRequired,isReadOnly:t.isReadOnly,validationState:t.validationState},e):e}var lC={};Object.defineProperty(lC,"__esModule",{value:!0});var ez=lC.CornerTriangle=uC,Qh=tz(y);function tz(e){return e&&e.__esModule?e:{default:e}}function Hg(){return Hg=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Hg.apply(this,arguments)}function nz(e,t){if(e==null)return{};var n=rz(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function rz(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function uC(e){var t=e.scale,n=t===void 0?"M":t,r=nz(e,["scale"]);return Qh.default.createElement("svg",Hg({},r,r),n==="L"&&Qh.default.createElement("path",{d:"M5.74.01a.25.25 0 0 0-.177.073l-5.48 5.48a.25.25 0 0 0 .177.427h5.48a.25.25 0 0 0 .25-.25V.26a.25.25 0 0 0-.25-.25z"}),n==="M"&&Qh.default.createElement("path",{d:"M4.74.01a.25.25 0 0 0-.177.073l-4.48 4.48a.25.25 0 0 0 .177.427h4.48a.25.25 0 0 0 .25-.25V.26a.25.25 0 0 0-.25-.25z"}))}uC.displayName="CornerTriangle";function G(e,t,n,r){Object.defineProperty(e,t,{get:n,set:r,enumerable:!0,configurable:!0})}var Y={};G(Y,"spectrum--large",()=>Kg,e=>Kg=e);G(Y,"spectrum--medium",()=>Yg,e=>Yg=e);G(Y,"spectrum-Icon",()=>qg,e=>qg=e);G(Y,"spectrum-Icon--sizeL",()=>Gg,e=>Gg=e);G(Y,"spectrum-Icon--sizeM",()=>Zg,e=>Zg=e);G(Y,"spectrum-Icon--sizeS",()=>Xg,e=>Xg=e);G(Y,"spectrum-Icon--sizeXL",()=>Qg,e=>Qg=e);G(Y,"spectrum-Icon--sizeXS",()=>Jg,e=>Jg=e);G(Y,"spectrum-Icon--sizeXXL",()=>e0,e=>e0=e);G(Y,"spectrum-Icon--sizeXXS",()=>t0,e=>t0=e);G(Y,"spectrum-UIIcon",()=>n0,e=>n0=e);G(Y,"spectrum-UIIcon--large",()=>r0,e=>r0=e);G(Y,"spectrum-UIIcon--medium",()=>i0,e=>i0=e);G(Y,"spectrum-UIIcon-AlertMedium",()=>a0,e=>a0=e);G(Y,"spectrum-UIIcon-AlertSmall",()=>s0,e=>s0=e);G(Y,"spectrum-UIIcon-ArrowDownSmall",()=>o0,e=>o0=e);G(Y,"spectrum-UIIcon-ArrowLeftMedium",()=>l0,e=>l0=e);G(Y,"spectrum-UIIcon-Asterisk",()=>u0,e=>u0=e);G(Y,"spectrum-UIIcon-CheckmarkMedium",()=>c0,e=>c0=e);G(Y,"spectrum-UIIcon-CheckmarkSmall",()=>d0,e=>d0=e);G(Y,"spectrum-UIIcon-ChevronDownMedium",()=>f0,e=>f0=e);G(Y,"spectrum-UIIcon-ChevronDownSmall",()=>h0,e=>h0=e);G(Y,"spectrum-UIIcon-ChevronLeftLarge",()=>p0,e=>p0=e);G(Y,"spectrum-UIIcon-ChevronLeftMedium",()=>m0,e=>m0=e);G(Y,"spectrum-UIIcon-ChevronRightLarge",()=>g0,e=>g0=e);G(Y,"spectrum-UIIcon-ChevronRightMedium",()=>v0,e=>v0=e);G(Y,"spectrum-UIIcon-ChevronRightSmall",()=>b0,e=>b0=e);G(Y,"spectrum-UIIcon-ChevronUpSmall",()=>y0,e=>y0=e);G(Y,"spectrum-UIIcon-CornerTriangle",()=>$0,e=>$0=e);G(Y,"spectrum-UIIcon-CrossLarge",()=>x0,e=>x0=e);G(Y,"spectrum-UIIcon-CrossMedium",()=>w0,e=>w0=e);G(Y,"spectrum-UIIcon-CrossSmall",()=>D0,e=>D0=e);G(Y,"spectrum-UIIcon-DashSmall",()=>_0,e=>_0=e);G(Y,"spectrum-UIIcon-DoubleGripper",()=>E0,e=>E0=e);G(Y,"spectrum-UIIcon-FolderBreadcrumb",()=>S0,e=>S0=e);G(Y,"spectrum-UIIcon-HelpMedium",()=>C0,e=>C0=e);G(Y,"spectrum-UIIcon-HelpSmall",()=>k0,e=>k0=e);G(Y,"spectrum-UIIcon-InfoMedium",()=>P0,e=>P0=e);G(Y,"spectrum-UIIcon-InfoSmall",()=>T0,e=>T0=e);G(Y,"spectrum-UIIcon-ListGripper",()=>R0,e=>R0=e);G(Y,"spectrum-UIIcon-Magnifier",()=>M0,e=>M0=e);G(Y,"spectrum-UIIcon-SkipLeft",()=>F0,e=>F0=e);G(Y,"spectrum-UIIcon-SkipRight",()=>A0,e=>A0=e);G(Y,"spectrum-UIIcon-Star",()=>O0,e=>O0=e);G(Y,"spectrum-UIIcon-StarOutline",()=>B0,e=>B0=e);G(Y,"spectrum-UIIcon-SuccessMedium",()=>I0,e=>I0=e);G(Y,"spectrum-UIIcon-SuccessSmall",()=>L0,e=>L0=e);G(Y,"spectrum-UIIcon-TripleGripper",()=>N0,e=>N0=e);var Kg,Yg,qg,Gg,Zg,Xg,Qg,Jg,e0,t0,n0,r0,i0,a0,s0,o0,l0,u0,c0,d0,f0,h0,p0,m0,g0,v0,b0,y0,$0,x0,w0,D0,_0,E0,S0,C0,k0,P0,T0,R0,M0,F0,A0,O0,B0,I0,L0,N0;Kg="yxBNXG_spectrum--large";Yg="yxBNXG_spectrum--medium";qg="yxBNXG_spectrum-Icon";Gg="yxBNXG_spectrum-Icon--sizeL";Zg="yxBNXG_spectrum-Icon--sizeM";Xg="yxBNXG_spectrum-Icon--sizeS";Qg="yxBNXG_spectrum-Icon--sizeXL";Jg="yxBNXG_spectrum-Icon--sizeXS";e0="yxBNXG_spectrum-Icon--sizeXXL";t0="yxBNXG_spectrum-Icon--sizeXXS";n0="yxBNXG_spectrum-UIIcon";r0="yxBNXG_spectrum-UIIcon--large";i0="yxBNXG_spectrum-UIIcon--medium";a0="yxBNXG_spectrum-UIIcon-AlertMedium";s0="yxBNXG_spectrum-UIIcon-AlertSmall";o0="yxBNXG_spectrum-UIIcon-ArrowDownSmall";l0="yxBNXG_spectrum-UIIcon-ArrowLeftMedium";u0="yxBNXG_spectrum-UIIcon-Asterisk";c0="yxBNXG_spectrum-UIIcon-CheckmarkMedium";d0="yxBNXG_spectrum-UIIcon-CheckmarkSmall";f0="yxBNXG_spectrum-UIIcon-ChevronDownMedium";h0="yxBNXG_spectrum-UIIcon-ChevronDownSmall";p0="yxBNXG_spectrum-UIIcon-ChevronLeftLarge";m0="yxBNXG_spectrum-UIIcon-ChevronLeftMedium";g0="yxBNXG_spectrum-UIIcon-ChevronRightLarge";v0="yxBNXG_spectrum-UIIcon-ChevronRightMedium";b0="yxBNXG_spectrum-UIIcon-ChevronRightSmall";y0="yxBNXG_spectrum-UIIcon-ChevronUpSmall";$0="yxBNXG_spectrum-UIIcon-CornerTriangle";x0="yxBNXG_spectrum-UIIcon-CrossLarge";w0="yxBNXG_spectrum-UIIcon-CrossMedium";D0="yxBNXG_spectrum-UIIcon-CrossSmall";_0="yxBNXG_spectrum-UIIcon-DashSmall";E0="yxBNXG_spectrum-UIIcon-DoubleGripper";S0="yxBNXG_spectrum-UIIcon-FolderBreadcrumb";C0="yxBNXG_spectrum-UIIcon-HelpMedium";k0="yxBNXG_spectrum-UIIcon-HelpSmall";P0="yxBNXG_spectrum-UIIcon-InfoMedium";T0="yxBNXG_spectrum-UIIcon-InfoSmall";R0="yxBNXG_spectrum-UIIcon-ListGripper";M0="yxBNXG_spectrum-UIIcon-Magnifier";F0="yxBNXG_spectrum-UIIcon-SkipLeft";A0="yxBNXG_spectrum-UIIcon-SkipRight";O0="yxBNXG_spectrum-UIIcon-Star";B0="yxBNXG_spectrum-UIIcon-StarOutline";I0="yxBNXG_spectrum-UIIcon-SuccessMedium";L0="yxBNXG_spectrum-UIIcon-SuccessSmall";N0="yxBNXG_spectrum-UIIcon-TripleGripper";function iz(e){return e&&e.__esModule?e.default:e}function az(e){return`var(--spectrum-semantic-${e}-color-icon)`}const sz={...Af,color:["color",az]};function oz(e){e=ci(e,"icon");let{children:t,size:n,"aria-label":r,"aria-hidden":i,...a}=e,{styleProps:s}=st(a,sz),o=va(),l="M";o!==null&&(l=o.scale==="large"?"L":"M"),i||(i=void 0);let u=n||l;return _.cloneElement(t,{...Xt(a),...s,focusable:"false","aria-label":r,"aria-hidden":r?i||void 0:!0,role:"img",className:V(iz(Y),t.props.className,"spectrum-Icon",`spectrum-Icon--size${u}`,s.className)})}function lz(e){return e&&e.__esModule?e.default:e}function ba(e){e=ci(e,"icon");let{children:t,"aria-label":n,"aria-hidden":r,...i}=e,{styleProps:a}=st(i),s=va(),o="M";return s!==null&&(o=s.scale==="large"?"L":"M"),r||(r=void 0),_.cloneElement(t,{...Xt(i),...a,scale:o,focusable:"false","aria-label":n,"aria-hidden":n?r||void 0:!0,role:"img",className:V(lz(Y),t.props.className,"spectrum-Icon",{[`spectrum-UIIcon-${t.type.displayName}`]:t.type.displayName},a.className)})}function uz(e){return _.createElement(ba,e,_.createElement(ez,null))}function Qs(e){return e&&e.__esModule?e.default:e}function cz(e,t){e=Vl(e),e=ci(e,"actionButton");let n=ci({UNSAFE_className:V(Qs(Z),"spectrum-ActionButton-label")},"text"),{isQuiet:r,isDisabled:i,staticColor:a,children:s,autoFocus:o,holdAffordance:l,hideButtonText:u,...c}=e,d=h8(t),{buttonProps:f,isPressed:h}=_E(e,d),{hoverProps:p,isHovered:g}=If({isDisabled:i}),{styleProps:b}=st(c),v=_.Children.toArray(e.children).every(m=>!_.isValidElement(m));return _.createElement(wE,{focusRingClass:V(Qs(Z),"focus-ring"),autoFocus:o},_.createElement("button",{...b,...de(f,p),ref:d,className:V(Qs(Z),"spectrum-ActionButton",{"spectrum-ActionButton--quiet":r,"spectrum-ActionButton--staticColor":!!a,"spectrum-ActionButton--staticWhite":a==="white","spectrum-ActionButton--staticBlack":a==="black","is-active":h,"is-disabled":i,"is-hovered":g},b.className)},l&&_.createElement(uz,{UNSAFE_className:V(Qs(Z),"spectrum-ActionButton-hold")}),_.createElement(uE,null,_.createElement(Of,{slots:{icon:{size:"S",UNSAFE_className:V(Qs(Z),"spectrum-Icon",{"spectrum-ActionGroup-itemIcon":u})},text:{...n}}},typeof s=="string"||v?_.createElement(LN,null,s):s))))}let j0=_.forwardRef(cz);function Jh(e){return e&&e.__esModule?e.default:e}function dz(e,t){e=ci(e,"button");let{isQuiet:n,isDisabled:r,validationState:i,isInvalid:a,children:s,autoFocus:o,isActive:l,focusRingClass:u,...c}=e,d=h8(t),{buttonProps:f,isPressed:h}=_E(e,d),{hoverProps:p,isHovered:g}=If({isDisabled:r}),{styleProps:b}=st(c);return _.createElement(wE,{focusRingClass:V(Jh(Z),"focus-ring",u),autoFocus:o},_.createElement("button",{...de(f,p),ref:d,className:V(Jh(Z),"spectrum-FieldButton",{"spectrum-FieldButton--quiet":n,"is-active":l||h,"is-disabled":r,"spectrum-FieldButton--invalid":a||i==="invalid","is-hovered":g},b.className)},_.createElement(Of,{slots:{icon:{size:"S",UNSAFE_className:V(Jh(Z),"spectrum-Icon")}}},s)))}let fz=_.forwardRef(dz);function z0(){return z0=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},z0.apply(null,arguments)}function hz(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function V0(e,t){return V0=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},V0(e,t)}function pz(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,V0(e,t)}const R5={disabled:!1},cC=_.createContext(null);var mz=function(t){return t.scrollTop},vo="unmounted",Ri="exited",Mi="entering",Oa="entered",W0="exiting",Er=function(e){pz(t,e);function t(r,i){var a;a=e.call(this,r,i)||this;var s=i,o=s&&!s.isMounting?r.enter:r.appear,l;return a.appearStatus=null,r.in?o?(l=Ri,a.appearStatus=Mi):l=Oa:r.unmountOnExit||r.mountOnEnter?l=vo:l=Ri,a.state={status:l},a.nextCallback=null,a}t.getDerivedStateFromProps=function(i,a){var s=i.in;return s&&a.status===vo?{status:Ri}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(i){var a=null;if(i!==this.props){var s=this.state.status;this.props.in?s!==Mi&&s!==Oa&&(a=Mi):(s===Mi||s===Oa)&&(a=W0)}this.updateStatus(!1,a)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var i=this.props.timeout,a,s,o;return a=s=o=i,i!=null&&typeof i!="number"&&(a=i.exit,s=i.enter,o=i.appear!==void 0?i.appear:s),{exit:a,enter:s,appear:o}},n.updateStatus=function(i,a){if(i===void 0&&(i=!1),a!==null)if(this.cancelNextCallback(),a===Mi){if(this.props.unmountOnExit||this.props.mountOnEnter){var s=this.props.nodeRef?this.props.nodeRef.current:fo.findDOMNode(this);s&&mz(s)}this.performEnter(i)}else this.performExit();else this.props.unmountOnExit&&this.state.status===Ri&&this.setState({status:vo})},n.performEnter=function(i){var a=this,s=this.props.enter,o=this.context?this.context.isMounting:i,l=this.props.nodeRef?[o]:[fo.findDOMNode(this),o],u=l[0],c=l[1],d=this.getTimeouts(),f=o?d.appear:d.enter;if(!i&&!s||R5.disabled){this.safeSetState({status:Oa},function(){a.props.onEntered(u)});return}this.props.onEnter(u,c),this.safeSetState({status:Mi},function(){a.props.onEntering(u,c),a.onTransitionEnd(f,function(){a.safeSetState({status:Oa},function(){a.props.onEntered(u,c)})})})},n.performExit=function(){var i=this,a=this.props.exit,s=this.getTimeouts(),o=this.props.nodeRef?void 0:fo.findDOMNode(this);if(!a||R5.disabled){this.safeSetState({status:Ri},function(){i.props.onExited(o)});return}this.props.onExit(o),this.safeSetState({status:W0},function(){i.props.onExiting(o),i.onTransitionEnd(s.exit,function(){i.safeSetState({status:Ri},function(){i.props.onExited(o)})})})},n.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(i,a){a=this.setNextCallback(a),this.setState(i,a)},n.setNextCallback=function(i){var a=this,s=!0;return this.nextCallback=function(o){s&&(s=!1,a.nextCallback=null,i(o))},this.nextCallback.cancel=function(){s=!1},this.nextCallback},n.onTransitionEnd=function(i,a){this.setNextCallback(a);var s=this.props.nodeRef?this.props.nodeRef.current:fo.findDOMNode(this),o=i==null&&!this.props.addEndListener;if(!s||o){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var l=this.props.nodeRef?[this.nextCallback]:[s,this.nextCallback],u=l[0],c=l[1];this.props.addEndListener(u,c)}i!=null&&setTimeout(this.nextCallback,i)},n.render=function(){var i=this.state.status;if(i===vo)return null;var a=this.props,s=a.children;a.in,a.mountOnEnter,a.unmountOnExit,a.appear,a.enter,a.exit,a.timeout,a.addEndListener,a.onEnter,a.onEntering,a.onEntered,a.onExit,a.onExiting,a.onExited,a.nodeRef;var o=hz(a,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return _.createElement(cC.Provider,{value:null},typeof s=="function"?s(i,o):_.cloneElement(_.Children.only(s),o))},t}(_.Component);Er.contextType=cC;Er.propTypes={};function ka(){}Er.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:ka,onEntering:ka,onEntered:ka,onExit:ka,onExiting:ka,onExited:ka};Er.UNMOUNTED=vo;Er.EXITED=Ri;Er.ENTERING=Mi;Er.ENTERED=Oa;Er.EXITING=W0;const gz={entering:!1,entered:!0};function vz(e){return _.createElement(Er,{timeout:{enter:0,exit:350},...e},t=>_.Children.map(e.children,n=>n&&_.cloneElement(n,{isOpen:!!gz[t]})))}function bz(e,t){let{children:n,isOpen:r,disableFocusManagement:i,container:a,onEnter:s,onEntering:o,onEntered:l,onExit:u,onExiting:c,onExited:d,nodeRef:f}=e,[h,p]=y.useState(!r),g=y.useCallback(()=>{p(!1),l&&l()},[l]),b=y.useCallback(()=>{p(!0),d&&d()},[d]);return r||!h?_.createElement(Dj,{portalContainer:a,disableFocusManagement:i,isExiting:!r},_.createElement(oC,{ref:t,UNSAFE_style:{background:"transparent",isolation:"isolate"},isDisabled:!1},_.createElement(vz,{in:r,appear:!0,onExit:u,onExiting:c,onExited:b,onEnter:s,onEntering:o,onEntered:g,nodeRef:f},n))):null}let k$=_.forwardRef(bz);function Sr(e,t,n,r){Object.defineProperty(e,t,{get:n,set:r,enumerable:!0,configurable:!0})}var ln={};Sr(ln,"react-spectrum-Modal",()=>U0,e=>U0=e);Sr(ln,"react-spectrum-Modal-wrapper",()=>H0,e=>H0=e);Sr(ln,"react-spectrum-Popover",()=>K0,e=>K0=e);Sr(ln,"react-spectrum-Tray",()=>Y0,e=>Y0=e);Sr(ln,"spectrum-Dialog-content",()=>q0,e=>q0=e);Sr(ln,"spectrum-Modal",()=>G0,e=>G0=e);Sr(ln,"spectrum-Modal-wrapper",()=>Z0,e=>Z0=e);Sr(ln,"spectrum-Popover",()=>X0,e=>X0=e);Sr(ln,"spectrum-Tray",()=>Q0,e=>Q0=e);var U0,H0,K0,Y0,q0,G0,Z0,X0,Q0;U0="OhnpTq_react-spectrum-Modal";H0="OhnpTq_react-spectrum-Modal-wrapper";K0="OhnpTq_react-spectrum-Popover";Y0="OhnpTq_react-spectrum-Tray";q0="OhnpTq_spectrum-Dialog-content";G0="OhnpTq_spectrum-Modal";Z0="OhnpTq_spectrum-Modal-wrapper";X0="OhnpTq_spectrum-Popover";Q0="OhnpTq_spectrum-Tray";function Fe(e,t,n,r){Object.defineProperty(e,t,{get:n,set:r,enumerable:!0,configurable:!0})}var be={};Fe(be,"focus-ring",()=>J0,e=>J0=e);Fe(be,"i18nFontFamily",()=>ev,e=>ev=e);Fe(be,"spectrum-overlay--open",()=>hd,e=>hd=e);Fe(be,"is-open",()=>tv,e=>tv=e);Fe(be,"spectrum-overlay--bottom--open",()=>pd,e=>pd=e);Fe(be,"is-open--bottom",()=>nv,e=>nv=e);Fe(be,"spectrum-overlay--left--open",()=>md,e=>md=e);Fe(be,"is-open--left",()=>rv,e=>rv=e);Fe(be,"spectrum-overlay--right--open",()=>gd,e=>gd=e);Fe(be,"is-open--right",()=>iv,e=>iv=e);Fe(be,"spectrum-overlay--top--open",()=>vd,e=>vd=e);Fe(be,"is-open--top",()=>av,e=>av=e);Fe(be,"spectrum-FocusRing-ring",()=>bd,e=>bd=e);Fe(be,"spectrum-FocusRing",()=>sv,e=>sv=e);Fe(be,"spectrum-FocusRing--quiet",()=>ov,e=>ov=e);Fe(be,"spectrum-overlay",()=>yd,e=>yd=e);Fe(be,"spectrum-Popover",()=>lv,e=>lv=e);Fe(be,"spectrum-Popover--bottom",()=>uv,e=>uv=e);Fe(be,"spectrum-Popover--dialog",()=>cv,e=>cv=e);Fe(be,"spectrum-Popover--left",()=>dv,e=>dv=e);Fe(be,"spectrum-Popover--right",()=>fv,e=>fv=e);Fe(be,"spectrum-Popover--top",()=>hv,e=>hv=e);Fe(be,"spectrum-Popover--withTip",()=>pv,e=>pv=e);Fe(be,"spectrum-Popover-tip",()=>mv,e=>mv=e);Fe(be,"spectrum-Popover-tip-triangle",()=>gv,e=>gv=e);var J0,ev,hd,tv,pd,nv,md,rv,gd,iv,vd,av,bd,sv,ov,yd,lv,uv,cv,dv,fv,hv,pv,mv,gv;J0="cH0MeW_focus-ring";ev="cH0MeW_i18nFontFamily";hd="cH0MeW_spectrum-overlay--open";tv=`cH0MeW_is-open ${hd}`;pd="cH0MeW_spectrum-overlay--bottom--open";nv=`cH0MeW_is-open--bottom ${pd}`;md="cH0MeW_spectrum-overlay--left--open";rv=`cH0MeW_is-open--left ${md}`;gd="cH0MeW_spectrum-overlay--right--open";iv=`cH0MeW_is-open--right ${gd}`;vd="cH0MeW_spectrum-overlay--top--open";av=`cH0MeW_is-open--top ${vd}`;bd="cH0MeW_spectrum-FocusRing-ring";sv=`cH0MeW_spectrum-FocusRing ${bd}`;ov="cH0MeW_spectrum-FocusRing--quiet";yd="cH0MeW_spectrum-overlay";lv=`cH0MeW_spectrum-Popover ${yd}`;uv="cH0MeW_spectrum-Popover--bottom";cv="cH0MeW_spectrum-Popover--dialog";dv="cH0MeW_spectrum-Popover--left";fv="cH0MeW_spectrum-Popover--right";hv="cH0MeW_spectrum-Popover--top";pv="cH0MeW_spectrum-Popover--withTip";mv="cH0MeW_spectrum-Popover-tip";gv="cH0MeW_spectrum-Popover-tip-triangle";function Qt(e,t,n,r){Object.defineProperty(e,t,{get:n,set:r,enumerable:!0,configurable:!0})}var Bt={};Qt(Bt,"focus-ring",()=>vv,e=>vv=e);Qt(Bt,"i18nFontFamily",()=>bv,e=>bv=e);Qt(Bt,"spectrum-overlay--open",()=>$d,e=>$d=e);Qt(Bt,"is-open",()=>yv,e=>yv=e);Qt(Bt,"spectrum-FocusRing-ring",()=>xd,e=>xd=e);Qt(Bt,"spectrum-FocusRing",()=>$v,e=>$v=e);Qt(Bt,"spectrum-FocusRing--quiet",()=>xv,e=>xv=e);Qt(Bt,"spectrum-overlay",()=>wd,e=>wd=e);Qt(Bt,"spectrum-Underlay",()=>wv,e=>wv=e);Qt(Bt,"spectrum-Underlay--transparent",()=>Dv,e=>Dv=e);Qt(Bt,"spectrum-overlay--bottom--open",()=>_v,e=>_v=e);Qt(Bt,"spectrum-overlay--left--open",()=>Ev,e=>Ev=e);Qt(Bt,"spectrum-overlay--right--open",()=>Sv,e=>Sv=e);Qt(Bt,"spectrum-overlay--top--open",()=>Cv,e=>Cv=e);var vv,bv,$d,yv,xd,$v,xv,wd,wv,Dv,_v,Ev,Sv,Cv;vv="F-oYUa_focus-ring";bv="F-oYUa_i18nFontFamily";$d="F-oYUa_spectrum-overlay--open";yv=`F-oYUa_is-open ${$d}`;xd="F-oYUa_spectrum-FocusRing-ring";$v=`F-oYUa_spectrum-FocusRing ${xd}`;xv="F-oYUa_spectrum-FocusRing--quiet";wd="F-oYUa_spectrum-overlay";wv=`F-oYUa_spectrum-Underlay ${wd}`;Dv="F-oYUa_spectrum-Underlay--transparent";_v="F-oYUa_spectrum-overlay--bottom--open";Ev="F-oYUa_spectrum-overlay--left--open";Sv="F-oYUa_spectrum-overlay--right--open";Cv="F-oYUa_spectrum-overlay--top--open";function yz(e){return e&&e.__esModule?e.default:e}function P$({isOpen:e,isTransparent:t,...n}){return _.createElement("div",{"data-testid":"underlay",...n,className:V(yz(Bt),"spectrum-Underlay",{"is-open":e,"spectrum-Underlay--transparent":t})})}function Dd(e){return e&&e.__esModule?e.default:e}let $z={left:"right",right:"right",top:"bottom",bottom:"bottom"};function xz(e,t){let{children:n,state:r,...i}=e,a=Nn(t),s=y.useRef(null);return _.createElement(k$,{...i,isOpen:r.isOpen,nodeRef:s},_.createElement(wz,{ref:a,...e,wrapperRef:s},n))}const wz=y.forwardRef((e,t)=>{let{children:n,isOpen:r,hideArrow:i,isNonModal:a,enableBothDismissButtons:s,state:o,wrapperRef:l,onDismissButtonPress:u=()=>o.close()}=e,{styleProps:c}=st(e),{size:d,borderWidth:f,arrowRef:h}=_z();const p=Dz(t);let g=f*Math.SQRT2,b=d+g,v=b*2,{popoverProps:m,arrowProps:$,underlayProps:w,placement:D}=$j({...e,popoverRef:t,maxHeight:null,arrowSize:i?0:v,arrowBoundaryOffset:p},o),{focusWithinProps:S}=As(e);return _.createElement("div",{ref:l},!a&&_.createElement(P$,{isTransparent:!0,...de(w),isOpen:r}),_.createElement("div",{...c,...de(m,S),style:{...c.style,...m.style},ref:t,className:V(Dd(be),"spectrum-Popover",`spectrum-Popover--${D}`,{"spectrum-Popover--withTip":!i,"is-open":r,[`is-open--${D}`]:r},V(Dd(ln),"spectrum-Popover","react-spectrum-Popover"),c.className),role:"presentation","data-testid":"popover"},(!a||s)&&_.createElement(ud,{onDismiss:u}),n,i?null:_.createElement(Ez,{arrowProps:$,isLandscape:$z[D]==="bottom",arrowRef:h,primary:b,secondary:v,borderDiagonal:g}),_.createElement(ud,{onDismiss:u})))});function Dz(e){let[t,n]=y.useState(0);return he(()=>{if(e.current){let r=window.getComputedStyle(e.current).borderRadius;r!==""&&n(parseInt(r,10))}},[e]),t}function _z(){let[e,t]=y.useState(20),[n,r]=y.useState(1),i=y.useRef(null);return he(()=>{if(i.current){let a=window.getComputedStyle(i.current).getPropertyValue("--spectrum-popover-tip-size");a!==""&&t(parseInt(a,10)/2);let s=window.getComputedStyle(i.current).getPropertyValue("--spectrum-popover-tip-borderWidth");s!==""&&r(parseInt(s,10))}},[]),{size:e,borderWidth:n,arrowRef:i}}function Ez(e){let{primary:t,secondary:n,isLandscape:r,arrowProps:i,borderDiagonal:a,arrowRef:s}=e,o=a/2,l=0,u=t-o,c=o,d=n/2,f=n-o,h=r?["M",c,l,"L",d,u,"L",f,l]:["M",l,c,"L",u,d,"L",l,f];return _.createElement("svg",{xmlns:"http://www.w3.org/svg/2000",width:Math.ceil(r?n:t),height:Math.ceil(r?t:n),className:V(Dd(be),"spectrum-Popover-tip"),ref:s,...i},_.createElement("path",{className:V(Dd(be),"spectrum-Popover-tip-triangle"),d:h.join(" ")}))}let Sz=y.forwardRef(xz);function bt(e,t,n,r){Object.defineProperty(e,t,{get:n,set:r,enumerable:!0,configurable:!0})}var ot={};bt(ot,"focus-ring",()=>kv,e=>kv=e);bt(ot,"i18nFontFamily",()=>Pv,e=>Pv=e);bt(ot,"spectrum-overlay--open",()=>_d,e=>_d=e);bt(ot,"is-open",()=>Tv,e=>Tv=e);bt(ot,"spectrum-FocusRing-ring",()=>Ed,e=>Ed=e);bt(ot,"spectrum-FocusRing",()=>Rv,e=>Rv=e);bt(ot,"spectrum-FocusRing--quiet",()=>Mv,e=>Mv=e);bt(ot,"spectrum-overlay",()=>Sd,e=>Sd=e);bt(ot,"spectrum-Modal",()=>Fv,e=>Fv=e);bt(ot,"spectrum-Modal--fullscreen",()=>Av,e=>Av=e);bt(ot,"spectrum-Modal--fullscreenTakeover",()=>Ov,e=>Ov=e);bt(ot,"spectrum-Modal--responsive",()=>Bv,e=>Bv=e);bt(ot,"spectrum-Modal-wrapper",()=>Iv,e=>Iv=e);bt(ot,"spectrum-overlay--bottom--open",()=>Lv,e=>Lv=e);bt(ot,"spectrum-overlay--left--open",()=>Nv,e=>Nv=e);bt(ot,"spectrum-overlay--right--open",()=>jv,e=>jv=e);bt(ot,"spectrum-overlay--top--open",()=>zv,e=>zv=e);var kv,Pv,_d,Tv,Ed,Rv,Mv,Sd,Fv,Av,Ov,Bv,Iv,Lv,Nv,jv,zv;kv="_0YML2q_focus-ring";Pv="_0YML2q_i18nFontFamily";_d="_0YML2q_spectrum-overlay--open";Tv=`_0YML2q_is-open ${_d}`;Ed="_0YML2q_spectrum-FocusRing-ring";Rv=`_0YML2q_spectrum-FocusRing ${Ed}`;Mv="_0YML2q_spectrum-FocusRing--quiet";Sd="_0YML2q_spectrum-overlay";Fv=`_0YML2q_spectrum-Modal ${Sd}`;Av="_0YML2q_spectrum-Modal--fullscreen";Ov="_0YML2q_spectrum-Modal--fullscreenTakeover";Bv="_0YML2q_spectrum-Modal--responsive";Iv="_0YML2q_spectrum-Modal-wrapper";Lv="_0YML2q_spectrum-overlay--bottom--open";Nv="_0YML2q_spectrum-overlay--left--open";jv="_0YML2q_spectrum-overlay--right--open";zv="_0YML2q_spectrum-overlay--top--open";function Cu(e){return e&&e.__esModule?e.default:e}function Cz(e,t){let{children:n,state:r,...i}=e,a=Nn(t),s=y.useRef(null);return _.createElement(k$,{...i,isOpen:r.isOpen,nodeRef:s},_.createElement(Pz,{...e,wrapperRef:s,ref:a},n))}let kz={fullscreen:"fullscreen",fullscreenTakeover:"fullscreenTakeover"},Pz=y.forwardRef(function(e,t){let{type:n,children:r,state:i,isOpen:a,wrapperRef:s}=e,o=kz[n],{styleProps:l}=st(e),{modalProps:u,underlayProps:c}=X7(e,i,t),d=V(Cu(ot),"spectrum-Modal-wrapper",V(Cu(ln),"spectrum-Modal-wrapper","react-spectrum-Modal-wrapper")),f=V(Cu(ot),"spectrum-Modal",{"is-open":a},V(Cu(ln),"spectrum-Modal","react-spectrum-Modal"),{[`spectrum-Modal--${o}`]:o},l.className),p={"--spectrum-visual-viewport-height":rE().height+"px"};return _.createElement("div",{ref:s},_.createElement(P$,{...c,isOpen:a}),_.createElement("div",{className:d,style:p},_.createElement("div",{...l,...u,ref:t,className:f,"data-testid":"modal"},r)))}),Tz=y.forwardRef(Cz);function It(e,t,n,r){Object.defineProperty(e,t,{get:n,set:r,enumerable:!0,configurable:!0})}var vt={};It(vt,"focus-ring",()=>Vv,e=>Vv=e);It(vt,"i18nFontFamily",()=>Wv,e=>Wv=e);It(vt,"spectrum-overlay--open",()=>Cd,e=>Cd=e);It(vt,"is-open",()=>Uv,e=>Uv=e);It(vt,"spectrum-FocusRing-ring",()=>kd,e=>kd=e);It(vt,"spectrum-FocusRing",()=>Hv,e=>Hv=e);It(vt,"spectrum-FocusRing--quiet",()=>Kv,e=>Kv=e);It(vt,"spectrum-overlay",()=>Pd,e=>Pd=e);It(vt,"spectrum-Tray",()=>Yv,e=>Yv=e);It(vt,"spectrum-Tray--fixedHeight",()=>qv,e=>qv=e);It(vt,"spectrum-Tray-wrapper",()=>Gv,e=>Gv=e);It(vt,"spectrum-overlay--bottom--open",()=>Zv,e=>Zv=e);It(vt,"spectrum-overlay--left--open",()=>Xv,e=>Xv=e);It(vt,"spectrum-overlay--right--open",()=>Qv,e=>Qv=e);It(vt,"spectrum-overlay--top--open",()=>Jv,e=>Jv=e);var Vv,Wv,Cd,Uv,kd,Hv,Kv,Pd,Yv,qv,Gv,Zv,Xv,Qv,Jv;Vv="UuxJvG_focus-ring";Wv="UuxJvG_i18nFontFamily";Cd="UuxJvG_spectrum-overlay--open";Uv=`UuxJvG_is-open ${Cd}`;kd="UuxJvG_spectrum-FocusRing-ring";Hv=`UuxJvG_spectrum-FocusRing ${kd}`;Kv="UuxJvG_spectrum-FocusRing--quiet";Pd="UuxJvG_spectrum-overlay";Yv=`UuxJvG_spectrum-Tray ${Pd}`;qv="UuxJvG_spectrum-Tray--fixedHeight";Gv="UuxJvG_spectrum-Tray-wrapper";Zv="UuxJvG_spectrum-overlay--bottom--open";Xv="UuxJvG_spectrum-overlay--left--open";Qv="UuxJvG_spectrum-overlay--right--open";Jv="UuxJvG_spectrum-overlay--top--open";function ep(e){return e&&e.__esModule?e.default:e}function Rz(e,t){let{children:n,state:r,...i}=e,a=Nn(t),s=y.useRef(null);return _.createElement(k$,{...i,isOpen:r.isOpen,nodeRef:s},_.createElement(Mz,{...e,wrapperRef:s,ref:a},n))}let Mz=y.forwardRef(function(e,t){let{children:n,isOpen:r,isFixedHeight:i,state:a,wrapperRef:s}=e,{styleProps:o}=st(e),{modalProps:l,underlayProps:u}=X7({...e,isDismissable:!0},a,t),d={"--spectrum-visual-viewport-height":rE().height+"px"},f=V(ep(vt),"spectrum-Tray-wrapper"),h=V(ep(vt),"spectrum-Tray",{"is-open":r,"spectrum-Tray--fixedHeight":i},V(ep(ln),"spectrum-Tray","react-spectrum-Tray"),o.className);return _.createElement("div",{ref:s},_.createElement(P$,{...u,isOpen:r}),_.createElement("div",{className:f,style:d},_.createElement("div",{...o,...l,className:h,ref:t,"data-testid":"tray"},_.createElement(ud,{onDismiss:a.close}),n,_.createElement(ud,{onDismiss:a.close}))))}),Fz=y.forwardRef(Rz);var dC={};Object.defineProperty(dC,"__esModule",{value:!0});var Az=dC.CheckmarkMedium=fC,tp=Oz(y);function Oz(e){return e&&e.__esModule?e:{default:e}}function e1(){return e1=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},e1.apply(this,arguments)}function Bz(e,t){if(e==null)return{};var n=Iz(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Iz(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function fC(e){var t=e.scale,n=t===void 0?"M":t,r=Bz(e,["scale"]);return tp.default.createElement("svg",e1({},r,r),n==="L"&&tp.default.createElement("path",{d:"M6 14a1 1 0 0 1-.789-.385l-4-5a1 1 0 1 1 1.577-1.23L6 11.376l7.213-8.99a1 1 0 1 1 1.576 1.23l-8 10a1 1 0 0 1-.789.384z"}),n==="M"&&tp.default.createElement("path",{d:"M4.5 10a1.022 1.022 0 0 1-.799-.384l-2.488-3a1 1 0 0 1 1.576-1.233L4.5 7.376l4.712-5.991a1 1 0 1 1 1.576 1.23l-5.51 7A.978.978 0 0 1 4.5 10z"}))}fC.displayName="CheckmarkMedium";function Lz(e){return _.createElement(ba,e,_.createElement(Az,null))}const Nz={...Af,autoFlow:["gridAutoFlow",tt],autoColumns:["gridAutoColumns",Td],autoRows:["gridAutoRows",Td],areas:["gridTemplateAreas",zz],columns:["gridTemplateColumns",M5],rows:["gridTemplateRows",M5],gap:["gap",le],rowGap:["rowGap",le],columnGap:["columnGap",le],justifyItems:["justifyItems",tt],justifyContent:["justifyContent",tt],alignItems:["alignItems",tt],alignContent:["alignContent",tt]};function jz(e,t){let{children:n,...r}=e,{styleProps:i}=st(r,Nz);i.style.display="grid";let a=Nn(t);return _.createElement("div",{...Xt(r),...i,ref:a},n)}function zz(e){return e.map(t=>`"${t}"`).join(` + */const HA="6";try{window.__reactRouterVersion=HA}catch{}const KA="startTransition",c2=UR[KA];function YA(e){let{basename:t,children:n,future:r,window:i}=e,a=y.useRef();a.current==null&&(a.current=tA({window:i,v5Compat:!0}));let s=a.current,[o,l]=y.useState({action:s.action,location:s.location}),{v7_startTransition:u}=r||{},c=y.useCallback(d=>{u&&c2?c2(()=>l(d)):l(d)},[l,u]);return y.useLayoutEffect(()=>s.listen(c),[s,c]),y.createElement(WA,{basename:t,children:n,location:o.location,navigationType:o.action,navigator:s,future:r})}var d2;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(d2||(d2={}));var f2;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(f2||(f2={}));const qA="modulepreload",GA=function(e,t){return new URL(e,t).href},h2={},$s=function(t,n,r){let i=Promise.resolve();if(n&&n.length>0){const a=document.getElementsByTagName("link"),s=document.querySelector("meta[property=csp-nonce]"),o=(s==null?void 0:s.nonce)||(s==null?void 0:s.getAttribute("nonce"));i=Promise.all(n.map(l=>{if(l=GA(l,r),l in h2)return;h2[l]=!0;const u=l.endsWith(".css"),c=u?'[rel="stylesheet"]':"";if(!!r)for(let h=a.length-1;h>=0;h--){const p=a[h];if(p.href===l&&(!u||p.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${l}"]${c}`))return;const f=document.createElement("link");if(f.rel=u?"stylesheet":qA,u||(f.as="script",f.crossOrigin=""),f.href=l,o&&f.setAttribute("nonce",o),document.head.appendChild(f),u)return new Promise((h,p)=>{f.addEventListener("load",h),f.addEventListener("error",()=>p(new Error(`Unable to preload CSS for ${l}`)))})}))}return i.then(()=>t()).catch(a=>{const s=new Event("vite:preloadError",{cancelable:!0});if(s.payload=a,window.dispatchEvent(s),!s.defaultPrevented)throw a})},ZA=e=>{let t;return e?t=e:typeof fetch>"u"?t=(...n)=>$s(async()=>{const{default:r}=await Promise.resolve().then(()=>Ms);return{default:r}},void 0,import.meta.url).then(({default:r})=>r(...n)):t=fetch,(...n)=>t(...n)};class t$ extends Error{constructor(t,n="FunctionsError",r){super(t),this.name=n,this.context=r}}class XA extends t${constructor(t){super("Failed to send a request to the Edge Function","FunctionsFetchError",t)}}class QA extends t${constructor(t){super("Relay Error invoking the Edge Function","FunctionsRelayError",t)}}class JA extends t${constructor(t){super("Edge Function returned a non-2xx status code","FunctionsHttpError",t)}}var ym;(function(e){e.Any="any",e.ApNortheast1="ap-northeast-1",e.ApNortheast2="ap-northeast-2",e.ApSouth1="ap-south-1",e.ApSoutheast1="ap-southeast-1",e.ApSoutheast2="ap-southeast-2",e.CaCentral1="ca-central-1",e.EuCentral1="eu-central-1",e.EuWest1="eu-west-1",e.EuWest2="eu-west-2",e.EuWest3="eu-west-3",e.SaEast1="sa-east-1",e.UsEast1="us-east-1",e.UsWest1="us-west-1",e.UsWest2="us-west-2"})(ym||(ym={}));var eO=function(e,t,n,r){function i(a){return a instanceof n?a:new n(function(s){s(a)})}return new(n||(n=Promise))(function(a,s){function o(c){try{u(r.next(c))}catch(d){s(d)}}function l(c){try{u(r.throw(c))}catch(d){s(d)}}function u(c){c.done?a(c.value):i(c.value).then(o,l)}u((r=r.apply(e,t||[])).next())})};class tO{constructor(t,{headers:n={},customFetch:r,region:i=ym.Any}={}){this.url=t,this.headers=n,this.region=i,this.fetch=ZA(r)}setAuth(t){this.headers.Authorization=`Bearer ${t}`}invoke(t,n={}){var r;return eO(this,void 0,void 0,function*(){try{const{headers:i,method:a,body:s}=n;let o={},{region:l}=n;l||(l=this.region),l&&l!=="any"&&(o["x-region"]=l);let u;s&&(i&&!Object.prototype.hasOwnProperty.call(i,"Content-Type")||!i)&&(typeof Blob<"u"&&s instanceof Blob||s instanceof ArrayBuffer?(o["Content-Type"]="application/octet-stream",u=s):typeof s=="string"?(o["Content-Type"]="text/plain",u=s):typeof FormData<"u"&&s instanceof FormData?u=s:(o["Content-Type"]="application/json",u=JSON.stringify(s)));const c=yield this.fetch(`${this.url}/${t}`,{method:a||"POST",headers:Object.assign(Object.assign(Object.assign({},o),this.headers),i),body:u}).catch(p=>{throw new XA(p)}),d=c.headers.get("x-relay-error");if(d&&d==="true")throw new QA(c);if(!c.ok)throw new JA(c);let f=((r=c.headers.get("Content-Type"))!==null&&r!==void 0?r:"text/plain").split(";")[0].trim(),h;return f==="application/json"?h=yield c.json():f==="application/octet-stream"?h=yield c.blob():f==="text/event-stream"?h=c:f==="multipart/form-data"?h=yield c.formData():h=yield c.text(),{data:h,error:null}}catch(i){return{data:null,error:i}}})}}var yn={},n$={},bf={},Al={},yf={},$f={},nO=function(){if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global;throw new Error("unable to locate global object")},xs=nO();const rO=xs.fetch,W_=xs.fetch.bind(xs),U_=xs.Headers,iO=xs.Request,aO=xs.Response,Ms=Object.freeze(Object.defineProperty({__proto__:null,Headers:U_,Request:iO,Response:aO,default:W_,fetch:rO},Symbol.toStringTag,{value:"Module"})),sO=kR(Ms);var r$={};Object.defineProperty(r$,"__esModule",{value:!0});class oO extends Error{constructor(t){super(t.message),this.name="PostgrestError",this.details=t.details,this.hint=t.hint,this.code=t.code}}r$.default=oO;var H_=Dn&&Dn.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty($f,"__esModule",{value:!0});const lO=H_(sO),uO=H_(r$);let cO=class{constructor(t){this.shouldThrowOnError=!1,this.method=t.method,this.url=t.url,this.headers=t.headers,this.schema=t.schema,this.body=t.body,this.shouldThrowOnError=t.shouldThrowOnError,this.signal=t.signal,this.isMaybeSingle=t.isMaybeSingle,t.fetch?this.fetch=t.fetch:typeof fetch>"u"?this.fetch=lO.default:this.fetch=fetch}throwOnError(){return this.shouldThrowOnError=!0,this}then(t,n){this.schema===void 0||(["GET","HEAD"].includes(this.method)?this.headers["Accept-Profile"]=this.schema:this.headers["Content-Profile"]=this.schema),this.method!=="GET"&&this.method!=="HEAD"&&(this.headers["Content-Type"]="application/json");const r=this.fetch;let i=r(this.url.toString(),{method:this.method,headers:this.headers,body:JSON.stringify(this.body),signal:this.signal}).then(async a=>{var s,o,l;let u=null,c=null,d=null,f=a.status,h=a.statusText;if(a.ok){if(this.method!=="HEAD"){const v=await a.text();v===""||(this.headers.Accept==="text/csv"||this.headers.Accept&&this.headers.Accept.includes("application/vnd.pgrst.plan+text")?c=v:c=JSON.parse(v))}const g=(s=this.headers.Prefer)===null||s===void 0?void 0:s.match(/count=(exact|planned|estimated)/),b=(o=a.headers.get("content-range"))===null||o===void 0?void 0:o.split("/");g&&b&&b.length>1&&(d=parseInt(b[1])),this.isMaybeSingle&&this.method==="GET"&&Array.isArray(c)&&(c.length>1?(u={code:"PGRST116",details:`Results contain ${c.length} rows, application/vnd.pgrst.object+json requires 1 row`,hint:null,message:"JSON object requested, multiple (or no) rows returned"},c=null,d=null,f=406,h="Not Acceptable"):c.length===1?c=c[0]:c=null)}else{const g=await a.text();try{u=JSON.parse(g),Array.isArray(u)&&a.status===404&&(c=[],u=null,f=200,h="OK")}catch{a.status===404&&g===""?(f=204,h="No Content"):u={message:g}}if(u&&this.isMaybeSingle&&(!((l=u==null?void 0:u.details)===null||l===void 0)&&l.includes("0 rows"))&&(u=null,f=200,h="OK"),u&&this.shouldThrowOnError)throw new uO.default(u)}return{error:u,data:c,count:d,status:f,statusText:h}});return this.shouldThrowOnError||(i=i.catch(a=>{var s,o,l;return{error:{message:`${(s=a==null?void 0:a.name)!==null&&s!==void 0?s:"FetchError"}: ${a==null?void 0:a.message}`,details:`${(o=a==null?void 0:a.stack)!==null&&o!==void 0?o:""}`,hint:"",code:`${(l=a==null?void 0:a.code)!==null&&l!==void 0?l:""}`},data:null,count:null,status:0,statusText:""}})),i.then(t,n)}};$f.default=cO;var dO=Dn&&Dn.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(yf,"__esModule",{value:!0});const fO=dO($f);let hO=class extends fO.default{select(t){let n=!1;const r=(t??"*").split("").map(i=>/\s/.test(i)&&!n?"":(i==='"'&&(n=!n),i)).join("");return this.url.searchParams.set("select",r),this.headers.Prefer&&(this.headers.Prefer+=","),this.headers.Prefer+="return=representation",this}order(t,{ascending:n=!0,nullsFirst:r,foreignTable:i,referencedTable:a=i}={}){const s=a?`${a}.order`:"order",o=this.url.searchParams.get(s);return this.url.searchParams.set(s,`${o?`${o},`:""}${t}.${n?"asc":"desc"}${r===void 0?"":r?".nullsfirst":".nullslast"}`),this}limit(t,{foreignTable:n,referencedTable:r=n}={}){const i=typeof r>"u"?"limit":`${r}.limit`;return this.url.searchParams.set(i,`${t}`),this}range(t,n,{foreignTable:r,referencedTable:i=r}={}){const a=typeof i>"u"?"offset":`${i}.offset`,s=typeof i>"u"?"limit":`${i}.limit`;return this.url.searchParams.set(a,`${t}`),this.url.searchParams.set(s,`${n-t+1}`),this}abortSignal(t){return this.signal=t,this}single(){return this.headers.Accept="application/vnd.pgrst.object+json",this}maybeSingle(){return this.method==="GET"?this.headers.Accept="application/json":this.headers.Accept="application/vnd.pgrst.object+json",this.isMaybeSingle=!0,this}csv(){return this.headers.Accept="text/csv",this}geojson(){return this.headers.Accept="application/geo+json",this}explain({analyze:t=!1,verbose:n=!1,settings:r=!1,buffers:i=!1,wal:a=!1,format:s="text"}={}){var o;const l=[t?"analyze":null,n?"verbose":null,r?"settings":null,i?"buffers":null,a?"wal":null].filter(Boolean).join("|"),u=(o=this.headers.Accept)!==null&&o!==void 0?o:"application/json";return this.headers.Accept=`application/vnd.pgrst.plan+${s}; for="${u}"; options=${l};`,s==="json"?this:this}rollback(){var t;return((t=this.headers.Prefer)!==null&&t!==void 0?t:"").trim().length>0?this.headers.Prefer+=",tx=rollback":this.headers.Prefer="tx=rollback",this}returns(){return this}};yf.default=hO;var pO=Dn&&Dn.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Al,"__esModule",{value:!0});const mO=pO(yf);let gO=class extends mO.default{eq(t,n){return this.url.searchParams.append(t,`eq.${n}`),this}neq(t,n){return this.url.searchParams.append(t,`neq.${n}`),this}gt(t,n){return this.url.searchParams.append(t,`gt.${n}`),this}gte(t,n){return this.url.searchParams.append(t,`gte.${n}`),this}lt(t,n){return this.url.searchParams.append(t,`lt.${n}`),this}lte(t,n){return this.url.searchParams.append(t,`lte.${n}`),this}like(t,n){return this.url.searchParams.append(t,`like.${n}`),this}likeAllOf(t,n){return this.url.searchParams.append(t,`like(all).{${n.join(",")}}`),this}likeAnyOf(t,n){return this.url.searchParams.append(t,`like(any).{${n.join(",")}}`),this}ilike(t,n){return this.url.searchParams.append(t,`ilike.${n}`),this}ilikeAllOf(t,n){return this.url.searchParams.append(t,`ilike(all).{${n.join(",")}}`),this}ilikeAnyOf(t,n){return this.url.searchParams.append(t,`ilike(any).{${n.join(",")}}`),this}is(t,n){return this.url.searchParams.append(t,`is.${n}`),this}in(t,n){const r=Array.from(new Set(n)).map(i=>typeof i=="string"&&new RegExp("[,()]").test(i)?`"${i}"`:`${i}`).join(",");return this.url.searchParams.append(t,`in.(${r})`),this}contains(t,n){return typeof n=="string"?this.url.searchParams.append(t,`cs.${n}`):Array.isArray(n)?this.url.searchParams.append(t,`cs.{${n.join(",")}}`):this.url.searchParams.append(t,`cs.${JSON.stringify(n)}`),this}containedBy(t,n){return typeof n=="string"?this.url.searchParams.append(t,`cd.${n}`):Array.isArray(n)?this.url.searchParams.append(t,`cd.{${n.join(",")}}`):this.url.searchParams.append(t,`cd.${JSON.stringify(n)}`),this}rangeGt(t,n){return this.url.searchParams.append(t,`sr.${n}`),this}rangeGte(t,n){return this.url.searchParams.append(t,`nxl.${n}`),this}rangeLt(t,n){return this.url.searchParams.append(t,`sl.${n}`),this}rangeLte(t,n){return this.url.searchParams.append(t,`nxr.${n}`),this}rangeAdjacent(t,n){return this.url.searchParams.append(t,`adj.${n}`),this}overlaps(t,n){return typeof n=="string"?this.url.searchParams.append(t,`ov.${n}`):this.url.searchParams.append(t,`ov.{${n.join(",")}}`),this}textSearch(t,n,{config:r,type:i}={}){let a="";i==="plain"?a="pl":i==="phrase"?a="ph":i==="websearch"&&(a="w");const s=r===void 0?"":`(${r})`;return this.url.searchParams.append(t,`${a}fts${s}.${n}`),this}match(t){return Object.entries(t).forEach(([n,r])=>{this.url.searchParams.append(n,`eq.${r}`)}),this}not(t,n,r){return this.url.searchParams.append(t,`not.${n}.${r}`),this}or(t,{foreignTable:n,referencedTable:r=n}={}){const i=r?`${r}.or`:"or";return this.url.searchParams.append(i,`(${t})`),this}filter(t,n,r){return this.url.searchParams.append(t,`${n}.${r}`),this}};Al.default=gO;var vO=Dn&&Dn.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(bf,"__esModule",{value:!0});const Hs=vO(Al);let bO=class{constructor(t,{headers:n={},schema:r,fetch:i}){this.url=t,this.headers=n,this.schema=r,this.fetch=i}select(t,{head:n=!1,count:r}={}){const i=n?"HEAD":"GET";let a=!1;const s=(t??"*").split("").map(o=>/\s/.test(o)&&!a?"":(o==='"'&&(a=!a),o)).join("");return this.url.searchParams.set("select",s),r&&(this.headers.Prefer=`count=${r}`),new Hs.default({method:i,url:this.url,headers:this.headers,schema:this.schema,fetch:this.fetch,allowEmpty:!1})}insert(t,{count:n,defaultToNull:r=!0}={}){const i="POST",a=[];if(this.headers.Prefer&&a.push(this.headers.Prefer),n&&a.push(`count=${n}`),r||a.push("missing=default"),this.headers.Prefer=a.join(","),Array.isArray(t)){const s=t.reduce((o,l)=>o.concat(Object.keys(l)),[]);if(s.length>0){const o=[...new Set(s)].map(l=>`"${l}"`);this.url.searchParams.set("columns",o.join(","))}}return new Hs.default({method:i,url:this.url,headers:this.headers,schema:this.schema,body:t,fetch:this.fetch,allowEmpty:!1})}upsert(t,{onConflict:n,ignoreDuplicates:r=!1,count:i,defaultToNull:a=!0}={}){const s="POST",o=[`resolution=${r?"ignore":"merge"}-duplicates`];if(n!==void 0&&this.url.searchParams.set("on_conflict",n),this.headers.Prefer&&o.push(this.headers.Prefer),i&&o.push(`count=${i}`),a||o.push("missing=default"),this.headers.Prefer=o.join(","),Array.isArray(t)){const l=t.reduce((u,c)=>u.concat(Object.keys(c)),[]);if(l.length>0){const u=[...new Set(l)].map(c=>`"${c}"`);this.url.searchParams.set("columns",u.join(","))}}return new Hs.default({method:s,url:this.url,headers:this.headers,schema:this.schema,body:t,fetch:this.fetch,allowEmpty:!1})}update(t,{count:n}={}){const r="PATCH",i=[];return this.headers.Prefer&&i.push(this.headers.Prefer),n&&i.push(`count=${n}`),this.headers.Prefer=i.join(","),new Hs.default({method:r,url:this.url,headers:this.headers,schema:this.schema,body:t,fetch:this.fetch,allowEmpty:!1})}delete({count:t}={}){const n="DELETE",r=[];return t&&r.push(`count=${t}`),this.headers.Prefer&&r.unshift(this.headers.Prefer),this.headers.Prefer=r.join(","),new Hs.default({method:n,url:this.url,headers:this.headers,schema:this.schema,fetch:this.fetch,allowEmpty:!1})}};bf.default=bO;var xf={},wf={};Object.defineProperty(wf,"__esModule",{value:!0});wf.version=void 0;wf.version="0.0.0-automated";Object.defineProperty(xf,"__esModule",{value:!0});xf.DEFAULT_HEADERS=void 0;const yO=wf;xf.DEFAULT_HEADERS={"X-Client-Info":`postgrest-js/${yO.version}`};var K_=Dn&&Dn.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(n$,"__esModule",{value:!0});const $O=K_(bf),xO=K_(Al),wO=xf;let DO=class Y_{constructor(t,{headers:n={},schema:r,fetch:i}={}){this.url=t,this.headers=Object.assign(Object.assign({},wO.DEFAULT_HEADERS),n),this.schemaName=r,this.fetch=i}from(t){const n=new URL(`${this.url}/${t}`);return new $O.default(n,{headers:Object.assign({},this.headers),schema:this.schemaName,fetch:this.fetch})}schema(t){return new Y_(this.url,{headers:this.headers,schema:t,fetch:this.fetch})}rpc(t,n={},{head:r=!1,get:i=!1,count:a}={}){let s;const o=new URL(`${this.url}/rpc/${t}`);let l;r||i?(s=r?"HEAD":"GET",Object.entries(n).filter(([c,d])=>d!==void 0).map(([c,d])=>[c,Array.isArray(d)?`{${d.join(",")}}`:`${d}`]).forEach(([c,d])=>{o.searchParams.append(c,d)})):(s="POST",l=n);const u=Object.assign({},this.headers);return a&&(u.Prefer=`count=${a}`),new xO.default({method:s,url:o,headers:u,schema:this.schemaName,body:l,fetch:this.fetch,allowEmpty:!1})}};n$.default=DO;var Ol=Dn&&Dn.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(yn,"__esModule",{value:!0});yn.PostgrestBuilder=yn.PostgrestTransformBuilder=yn.PostgrestFilterBuilder=yn.PostgrestQueryBuilder=yn.PostgrestClient=void 0;const q_=Ol(n$);yn.PostgrestClient=q_.default;const G_=Ol(bf);yn.PostgrestQueryBuilder=G_.default;const Z_=Ol(Al);yn.PostgrestFilterBuilder=Z_.default;const X_=Ol(yf);yn.PostgrestTransformBuilder=X_.default;const Q_=Ol($f);yn.PostgrestBuilder=Q_.default;var _O=yn.default={PostgrestClient:q_.default,PostgrestQueryBuilder:G_.default,PostgrestFilterBuilder:Z_.default,PostgrestTransformBuilder:X_.default,PostgrestBuilder:Q_.default};const{PostgrestClient:EO,PostgrestQueryBuilder:IG,PostgrestFilterBuilder:LG,PostgrestTransformBuilder:NG,PostgrestBuilder:jG}=_O,SO="2.10.2",CO={"X-Client-Info":`realtime-js/${SO}`},kO="1.0.0",J_=1e4,PO=1e3;var rs;(function(e){e[e.connecting=0]="connecting",e[e.open=1]="open",e[e.closing=2]="closing",e[e.closed=3]="closed"})(rs||(rs={}));var Jt;(function(e){e.closed="closed",e.errored="errored",e.joined="joined",e.joining="joining",e.leaving="leaving"})(Jt||(Jt={}));var Rn;(function(e){e.close="phx_close",e.error="phx_error",e.join="phx_join",e.reply="phx_reply",e.leave="phx_leave",e.access_token="access_token"})(Rn||(Rn={}));var $m;(function(e){e.websocket="websocket"})($m||($m={}));var Bi;(function(e){e.Connecting="connecting",e.Open="open",e.Closing="closing",e.Closed="closed"})(Bi||(Bi={}));class TO{constructor(){this.HEADER_LENGTH=1}decode(t,n){return t.constructor===ArrayBuffer?n(this._binaryDecode(t)):n(typeof t=="string"?JSON.parse(t):{})}_binaryDecode(t){const n=new DataView(t),r=new TextDecoder;return this._decodeBroadcast(t,n,r)}_decodeBroadcast(t,n,r){const i=n.getUint8(1),a=n.getUint8(2);let s=this.HEADER_LENGTH+2;const o=r.decode(t.slice(s,s+i));s=s+i;const l=r.decode(t.slice(s,s+a));s=s+a;const u=JSON.parse(r.decode(t.slice(s,t.byteLength)));return{ref:null,topic:o,event:l,payload:u}}}class e8{constructor(t,n){this.callback=t,this.timerCalc=n,this.timer=void 0,this.tries=0,this.callback=t,this.timerCalc=n}reset(){this.tries=0,clearTimeout(this.timer)}scheduleTimeout(){clearTimeout(this.timer),this.timer=setTimeout(()=>{this.tries=this.tries+1,this.callback()},this.timerCalc(this.tries+1))}}var we;(function(e){e.abstime="abstime",e.bool="bool",e.date="date",e.daterange="daterange",e.float4="float4",e.float8="float8",e.int2="int2",e.int4="int4",e.int4range="int4range",e.int8="int8",e.int8range="int8range",e.json="json",e.jsonb="jsonb",e.money="money",e.numeric="numeric",e.oid="oid",e.reltime="reltime",e.text="text",e.time="time",e.timestamp="timestamp",e.timestamptz="timestamptz",e.timetz="timetz",e.tsrange="tsrange",e.tstzrange="tstzrange"})(we||(we={}));const p2=(e,t,n={})=>{var r;const i=(r=n.skipTypes)!==null&&r!==void 0?r:[];return Object.keys(t).reduce((a,s)=>(a[s]=RO(s,e,t,i),a),{})},RO=(e,t,n,r)=>{const i=t.find(o=>o.name===e),a=i==null?void 0:i.type,s=n[e];return a&&!r.includes(a)?t8(a,s):xm(s)},t8=(e,t)=>{if(e.charAt(0)==="_"){const n=e.slice(1,e.length);return OO(t,n)}switch(e){case we.bool:return MO(t);case we.float4:case we.float8:case we.int2:case we.int4:case we.int8:case we.numeric:case we.oid:return FO(t);case we.json:case we.jsonb:return AO(t);case we.timestamp:return BO(t);case we.abstime:case we.date:case we.daterange:case we.int4range:case we.int8range:case we.money:case we.reltime:case we.text:case we.time:case we.timestamptz:case we.timetz:case we.tsrange:case we.tstzrange:return xm(t);default:return xm(t)}},xm=e=>e,MO=e=>{switch(e){case"t":return!0;case"f":return!1;default:return e}},FO=e=>{if(typeof e=="string"){const t=parseFloat(e);if(!Number.isNaN(t))return t}return e},AO=e=>{if(typeof e=="string")try{return JSON.parse(e)}catch(t){return console.log(`JSON parse error: ${t}`),e}return e},OO=(e,t)=>{if(typeof e!="string")return e;const n=e.length-1,r=e[n];if(e[0]==="{"&&r==="}"){let a;const s=e.slice(1,n);try{a=JSON.parse("["+s+"]")}catch{a=s?s.split(","):[]}return a.map(o=>t8(t,o))}return e},BO=e=>typeof e=="string"?e.replace(" ","T"):e,n8=e=>{let t=e;return t=t.replace(/^ws/i,"http"),t=t.replace(/(\/socket\/websocket|\/socket|\/websocket)\/?$/i,""),t.replace(/\/+$/,"")};class Dh{constructor(t,n,r={},i=J_){this.channel=t,this.event=n,this.payload=r,this.timeout=i,this.sent=!1,this.timeoutTimer=void 0,this.ref="",this.receivedResp=null,this.recHooks=[],this.refEvent=null}resend(t){this.timeout=t,this._cancelRefEvent(),this.ref="",this.refEvent=null,this.receivedResp=null,this.sent=!1,this.send()}send(){this._hasReceived("timeout")||(this.startTimeout(),this.sent=!0,this.channel.socket.push({topic:this.channel.topic,event:this.event,payload:this.payload,ref:this.ref,join_ref:this.channel._joinRef()}))}updatePayload(t){this.payload=Object.assign(Object.assign({},this.payload),t)}receive(t,n){var r;return this._hasReceived(t)&&n((r=this.receivedResp)===null||r===void 0?void 0:r.response),this.recHooks.push({status:t,callback:n}),this}startTimeout(){if(this.timeoutTimer)return;this.ref=this.channel.socket._makeRef(),this.refEvent=this.channel._replyEventName(this.ref);const t=n=>{this._cancelRefEvent(),this._cancelTimeout(),this.receivedResp=n,this._matchReceive(n)};this.channel._on(this.refEvent,{},t),this.timeoutTimer=setTimeout(()=>{this.trigger("timeout",{})},this.timeout)}trigger(t,n){this.refEvent&&this.channel._trigger(this.refEvent,{status:t,response:n})}destroy(){this._cancelRefEvent(),this._cancelTimeout()}_cancelRefEvent(){this.refEvent&&this.channel._off(this.refEvent,{})}_cancelTimeout(){clearTimeout(this.timeoutTimer),this.timeoutTimer=void 0}_matchReceive({status:t,response:n}){this.recHooks.filter(r=>r.status===t).forEach(r=>r.callback(n))}_hasReceived(t){return this.receivedResp&&this.receivedResp.status===t}}var m2;(function(e){e.SYNC="sync",e.JOIN="join",e.LEAVE="leave"})(m2||(m2={}));class Fo{constructor(t,n){this.channel=t,this.state={},this.pendingDiffs=[],this.joinRef=null,this.caller={onJoin:()=>{},onLeave:()=>{},onSync:()=>{}};const r=(n==null?void 0:n.events)||{state:"presence_state",diff:"presence_diff"};this.channel._on(r.state,{},i=>{const{onJoin:a,onLeave:s,onSync:o}=this.caller;this.joinRef=this.channel._joinRef(),this.state=Fo.syncState(this.state,i,a,s),this.pendingDiffs.forEach(l=>{this.state=Fo.syncDiff(this.state,l,a,s)}),this.pendingDiffs=[],o()}),this.channel._on(r.diff,{},i=>{const{onJoin:a,onLeave:s,onSync:o}=this.caller;this.inPendingSyncState()?this.pendingDiffs.push(i):(this.state=Fo.syncDiff(this.state,i,a,s),o())}),this.onJoin((i,a,s)=>{this.channel._trigger("presence",{event:"join",key:i,currentPresences:a,newPresences:s})}),this.onLeave((i,a,s)=>{this.channel._trigger("presence",{event:"leave",key:i,currentPresences:a,leftPresences:s})}),this.onSync(()=>{this.channel._trigger("presence",{event:"sync"})})}static syncState(t,n,r,i){const a=this.cloneDeep(t),s=this.transformState(n),o={},l={};return this.map(a,(u,c)=>{s[u]||(l[u]=c)}),this.map(s,(u,c)=>{const d=a[u];if(d){const f=c.map(b=>b.presence_ref),h=d.map(b=>b.presence_ref),p=c.filter(b=>h.indexOf(b.presence_ref)<0),g=d.filter(b=>f.indexOf(b.presence_ref)<0);p.length>0&&(o[u]=p),g.length>0&&(l[u]=g)}else o[u]=c}),this.syncDiff(a,{joins:o,leaves:l},r,i)}static syncDiff(t,n,r,i){const{joins:a,leaves:s}={joins:this.transformState(n.joins),leaves:this.transformState(n.leaves)};return r||(r=()=>{}),i||(i=()=>{}),this.map(a,(o,l)=>{var u;const c=(u=t[o])!==null&&u!==void 0?u:[];if(t[o]=this.cloneDeep(l),c.length>0){const d=t[o].map(h=>h.presence_ref),f=c.filter(h=>d.indexOf(h.presence_ref)<0);t[o].unshift(...f)}r(o,c,l)}),this.map(s,(o,l)=>{let u=t[o];if(!u)return;const c=l.map(d=>d.presence_ref);u=u.filter(d=>c.indexOf(d.presence_ref)<0),t[o]=u,i(o,u,l),u.length===0&&delete t[o]}),t}static map(t,n){return Object.getOwnPropertyNames(t).map(r=>n(r,t[r]))}static transformState(t){return t=this.cloneDeep(t),Object.getOwnPropertyNames(t).reduce((n,r)=>{const i=t[r];return"metas"in i?n[r]=i.metas.map(a=>(a.presence_ref=a.phx_ref,delete a.phx_ref,delete a.phx_ref_prev,a)):n[r]=i,n},{})}static cloneDeep(t){return JSON.parse(JSON.stringify(t))}onJoin(t){this.caller.onJoin=t}onLeave(t){this.caller.onLeave=t}onSync(t){this.caller.onSync=t}inPendingSyncState(){return!this.joinRef||this.joinRef!==this.channel._joinRef()}}var g2;(function(e){e.ALL="*",e.INSERT="INSERT",e.UPDATE="UPDATE",e.DELETE="DELETE"})(g2||(g2={}));var v2;(function(e){e.BROADCAST="broadcast",e.PRESENCE="presence",e.POSTGRES_CHANGES="postgres_changes"})(v2||(v2={}));var b2;(function(e){e.SUBSCRIBED="SUBSCRIBED",e.TIMED_OUT="TIMED_OUT",e.CLOSED="CLOSED",e.CHANNEL_ERROR="CHANNEL_ERROR"})(b2||(b2={}));class i${constructor(t,n={config:{}},r){this.topic=t,this.params=n,this.socket=r,this.bindings={},this.state=Jt.closed,this.joinedOnce=!1,this.pushBuffer=[],this.subTopic=t.replace(/^realtime:/i,""),this.params.config=Object.assign({broadcast:{ack:!1,self:!1},presence:{key:""},private:!1},n.config),this.timeout=this.socket.timeout,this.joinPush=new Dh(this,Rn.join,this.params,this.timeout),this.rejoinTimer=new e8(()=>this._rejoinUntilConnected(),this.socket.reconnectAfterMs),this.joinPush.receive("ok",()=>{this.state=Jt.joined,this.rejoinTimer.reset(),this.pushBuffer.forEach(i=>i.send()),this.pushBuffer=[]}),this._onClose(()=>{this.rejoinTimer.reset(),this.socket.log("channel",`close ${this.topic} ${this._joinRef()}`),this.state=Jt.closed,this.socket._remove(this)}),this._onError(i=>{this._isLeaving()||this._isClosed()||(this.socket.log("channel",`error ${this.topic}`,i),this.state=Jt.errored,this.rejoinTimer.scheduleTimeout())}),this.joinPush.receive("timeout",()=>{this._isJoining()&&(this.socket.log("channel",`timeout ${this.topic}`,this.joinPush.timeout),this.state=Jt.errored,this.rejoinTimer.scheduleTimeout())}),this._on(Rn.reply,{},(i,a)=>{this._trigger(this._replyEventName(a),i)}),this.presence=new Fo(this),this.broadcastEndpointURL=n8(this.socket.endPoint)+"/api/broadcast"}subscribe(t,n=this.timeout){var r,i;if(this.socket.isConnected()||this.socket.connect(),this.joinedOnce)throw"tried to subscribe multiple times. 'subscribe' can only be called a single time per channel instance";{const{config:{broadcast:a,presence:s,private:o}}=this.params;this._onError(c=>t&&t("CHANNEL_ERROR",c)),this._onClose(()=>t&&t("CLOSED"));const l={},u={broadcast:a,presence:s,postgres_changes:(i=(r=this.bindings.postgres_changes)===null||r===void 0?void 0:r.map(c=>c.filter))!==null&&i!==void 0?i:[],private:o};this.socket.accessToken&&(l.access_token=this.socket.accessToken),this.updateJoinPayload(Object.assign({config:u},l)),this.joinedOnce=!0,this._rejoin(n),this.joinPush.receive("ok",({postgres_changes:c})=>{var d;if(this.socket.accessToken&&this.socket.setAuth(this.socket.accessToken),c===void 0){t&&t("SUBSCRIBED");return}else{const f=this.bindings.postgres_changes,h=(d=f==null?void 0:f.length)!==null&&d!==void 0?d:0,p=[];for(let g=0;g<h;g++){const b=f[g],{filter:{event:v,schema:m,table:$,filter:w}}=b,D=c&&c[g];if(D&&D.event===v&&D.schema===m&&D.table===$&&D.filter===w)p.push(Object.assign(Object.assign({},b),{id:D.id}));else{this.unsubscribe(),t&&t("CHANNEL_ERROR",new Error("mismatch between server and client bindings for postgres changes"));return}}this.bindings.postgres_changes=p,t&&t("SUBSCRIBED");return}}).receive("error",c=>{t&&t("CHANNEL_ERROR",new Error(JSON.stringify(Object.values(c).join(", ")||"error")))}).receive("timeout",()=>{t&&t("TIMED_OUT")})}return this}presenceState(){return this.presence.state}async track(t,n={}){return await this.send({type:"presence",event:"track",payload:t},n.timeout||this.timeout)}async untrack(t={}){return await this.send({type:"presence",event:"untrack"},t)}on(t,n,r){return this._on(t,n,r)}async send(t,n={}){var r,i;if(!this._canPush()&&t.type==="broadcast"){const{event:a,payload:s}=t,o={method:"POST",headers:{Authorization:this.socket.accessToken?`Bearer ${this.socket.accessToken}`:"",apikey:this.socket.apiKey?this.socket.apiKey:"","Content-Type":"application/json"},body:JSON.stringify({messages:[{topic:this.subTopic,event:a,payload:s}]})};try{const l=await this._fetchWithTimeout(this.broadcastEndpointURL,o,(r=n.timeout)!==null&&r!==void 0?r:this.timeout);return await((i=l.body)===null||i===void 0?void 0:i.cancel()),l.ok?"ok":"error"}catch(l){return l.name==="AbortError"?"timed out":"error"}}else return new Promise(a=>{var s,o,l;const u=this._push(t.type,t,n.timeout||this.timeout);t.type==="broadcast"&&!(!((l=(o=(s=this.params)===null||s===void 0?void 0:s.config)===null||o===void 0?void 0:o.broadcast)===null||l===void 0)&&l.ack)&&a("ok"),u.receive("ok",()=>a("ok")),u.receive("error",()=>a("error")),u.receive("timeout",()=>a("timed out"))})}updateJoinPayload(t){this.joinPush.updatePayload(t)}unsubscribe(t=this.timeout){this.state=Jt.leaving;const n=()=>{this.socket.log("channel",`leave ${this.topic}`),this._trigger(Rn.close,"leave",this._joinRef())};return this.rejoinTimer.reset(),this.joinPush.destroy(),new Promise(r=>{const i=new Dh(this,Rn.leave,{},t);i.receive("ok",()=>{n(),r("ok")}).receive("timeout",()=>{n(),r("timed out")}).receive("error",()=>{r("error")}),i.send(),this._canPush()||i.trigger("ok",{})})}async _fetchWithTimeout(t,n,r){const i=new AbortController,a=setTimeout(()=>i.abort(),r),s=await this.socket.fetch(t,Object.assign(Object.assign({},n),{signal:i.signal}));return clearTimeout(a),s}_push(t,n,r=this.timeout){if(!this.joinedOnce)throw`tried to push '${t}' to '${this.topic}' before joining. Use channel.subscribe() before pushing events`;let i=new Dh(this,t,n,r);return this._canPush()?i.send():(i.startTimeout(),this.pushBuffer.push(i)),i}_onMessage(t,n,r){return n}_isMember(t){return this.topic===t}_joinRef(){return this.joinPush.ref}_trigger(t,n,r){var i,a;const s=t.toLocaleLowerCase(),{close:o,error:l,leave:u,join:c}=Rn;if(r&&[o,l,u,c].indexOf(s)>=0&&r!==this._joinRef())return;let f=this._onMessage(s,n,r);if(n&&!f)throw"channel onMessage callbacks must return the payload, modified or unmodified";["insert","update","delete"].includes(s)?(i=this.bindings.postgres_changes)===null||i===void 0||i.filter(h=>{var p,g,b;return((p=h.filter)===null||p===void 0?void 0:p.event)==="*"||((b=(g=h.filter)===null||g===void 0?void 0:g.event)===null||b===void 0?void 0:b.toLocaleLowerCase())===s}).map(h=>h.callback(f,r)):(a=this.bindings[s])===null||a===void 0||a.filter(h=>{var p,g,b,v,m,$;if(["broadcast","presence","postgres_changes"].includes(s))if("id"in h){const w=h.id,D=(p=h.filter)===null||p===void 0?void 0:p.event;return w&&((g=n.ids)===null||g===void 0?void 0:g.includes(w))&&(D==="*"||(D==null?void 0:D.toLocaleLowerCase())===((b=n.data)===null||b===void 0?void 0:b.type.toLocaleLowerCase()))}else{const w=(m=(v=h==null?void 0:h.filter)===null||v===void 0?void 0:v.event)===null||m===void 0?void 0:m.toLocaleLowerCase();return w==="*"||w===(($=n==null?void 0:n.event)===null||$===void 0?void 0:$.toLocaleLowerCase())}else return h.type.toLocaleLowerCase()===s}).map(h=>{if(typeof f=="object"&&"ids"in f){const p=f.data,{schema:g,table:b,commit_timestamp:v,type:m,errors:$}=p;f=Object.assign(Object.assign({},{schema:g,table:b,commit_timestamp:v,eventType:m,new:{},old:{},errors:$}),this._getPayloadRecords(p))}h.callback(f,r)})}_isClosed(){return this.state===Jt.closed}_isJoined(){return this.state===Jt.joined}_isJoining(){return this.state===Jt.joining}_isLeaving(){return this.state===Jt.leaving}_replyEventName(t){return`chan_reply_${t}`}_on(t,n,r){const i=t.toLocaleLowerCase(),a={type:i,filter:n,callback:r};return this.bindings[i]?this.bindings[i].push(a):this.bindings[i]=[a],this}_off(t,n){const r=t.toLocaleLowerCase();return this.bindings[r]=this.bindings[r].filter(i=>{var a;return!(((a=i.type)===null||a===void 0?void 0:a.toLocaleLowerCase())===r&&i$.isEqual(i.filter,n))}),this}static isEqual(t,n){if(Object.keys(t).length!==Object.keys(n).length)return!1;for(const r in t)if(t[r]!==n[r])return!1;return!0}_rejoinUntilConnected(){this.rejoinTimer.scheduleTimeout(),this.socket.isConnected()&&this._rejoin()}_onClose(t){this._on(Rn.close,{},t)}_onError(t){this._on(Rn.error,{},n=>t(n))}_canPush(){return this.socket.isConnected()&&this._isJoined()}_rejoin(t=this.timeout){this._isLeaving()||(this.socket._leaveOpenTopic(this.topic),this.state=Jt.joining,this.joinPush.resend(t))}_getPayloadRecords(t){const n={new:{},old:{}};return(t.type==="INSERT"||t.type==="UPDATE")&&(n.new=p2(t.columns,t.record)),(t.type==="UPDATE"||t.type==="DELETE")&&(n.old=p2(t.columns,t.old_record)),n}}const IO=()=>{},LO=typeof WebSocket<"u";class NO{constructor(t,n){var r;this.accessToken=null,this.apiKey=null,this.channels=[],this.endPoint="",this.httpEndpoint="",this.headers=CO,this.params={},this.timeout=J_,this.heartbeatIntervalMs=3e4,this.heartbeatTimer=void 0,this.pendingHeartbeatRef=null,this.ref=0,this.logger=IO,this.conn=null,this.sendBuffer=[],this.serializer=new TO,this.stateChangeCallbacks={open:[],close:[],error:[],message:[]},this._resolveFetch=a=>{let s;return a?s=a:typeof fetch>"u"?s=(...o)=>$s(async()=>{const{default:l}=await Promise.resolve().then(()=>Ms);return{default:l}},void 0,import.meta.url).then(({default:l})=>l(...o)):s=fetch,(...o)=>s(...o)},this.endPoint=`${t}/${$m.websocket}`,this.httpEndpoint=n8(t),n!=null&&n.transport?this.transport=n.transport:this.transport=null,n!=null&&n.params&&(this.params=n.params),n!=null&&n.headers&&(this.headers=Object.assign(Object.assign({},this.headers),n.headers)),n!=null&&n.timeout&&(this.timeout=n.timeout),n!=null&&n.logger&&(this.logger=n.logger),n!=null&&n.heartbeatIntervalMs&&(this.heartbeatIntervalMs=n.heartbeatIntervalMs);const i=(r=n==null?void 0:n.params)===null||r===void 0?void 0:r.apikey;i&&(this.accessToken=i,this.apiKey=i),this.reconnectAfterMs=n!=null&&n.reconnectAfterMs?n.reconnectAfterMs:a=>[1e3,2e3,5e3,1e4][a-1]||1e4,this.encode=n!=null&&n.encode?n.encode:(a,s)=>s(JSON.stringify(a)),this.decode=n!=null&&n.decode?n.decode:this.serializer.decode.bind(this.serializer),this.reconnectTimer=new e8(async()=>{this.disconnect(),this.connect()},this.reconnectAfterMs),this.fetch=this._resolveFetch(n==null?void 0:n.fetch)}connect(){if(!this.conn){if(this.transport){this.conn=new this.transport(this._endPointURL(),void 0,{headers:this.headers});return}if(LO){this.conn=new WebSocket(this._endPointURL()),this.setupConnection();return}this.conn=new jO(this._endPointURL(),void 0,{close:()=>{this.conn=null}}),$s(async()=>{const{default:t}=await import("./browser-CNT5ya24.js").then(n=>n.b);return{default:t}},[],import.meta.url).then(({default:t})=>{this.conn=new t(this._endPointURL(),void 0,{headers:this.headers}),this.setupConnection()})}}disconnect(t,n){this.conn&&(this.conn.onclose=function(){},t?this.conn.close(t,n??""):this.conn.close(),this.conn=null,this.heartbeatTimer&&clearInterval(this.heartbeatTimer),this.reconnectTimer.reset())}getChannels(){return this.channels}async removeChannel(t){const n=await t.unsubscribe();return this.channels.length===0&&this.disconnect(),n}async removeAllChannels(){const t=await Promise.all(this.channels.map(n=>n.unsubscribe()));return this.disconnect(),t}log(t,n,r){this.logger(t,n,r)}connectionState(){switch(this.conn&&this.conn.readyState){case rs.connecting:return Bi.Connecting;case rs.open:return Bi.Open;case rs.closing:return Bi.Closing;default:return Bi.Closed}}isConnected(){return this.connectionState()===Bi.Open}channel(t,n={config:{}}){const r=new i$(`realtime:${t}`,n,this);return this.channels.push(r),r}push(t){const{topic:n,event:r,payload:i,ref:a}=t,s=()=>{this.encode(t,o=>{var l;(l=this.conn)===null||l===void 0||l.send(o)})};this.log("push",`${n} ${r} (${a})`,i),this.isConnected()?s():this.sendBuffer.push(s)}setAuth(t){this.accessToken=t,this.channels.forEach(n=>{t&&n.updateJoinPayload({access_token:t}),n.joinedOnce&&n._isJoined()&&n._push(Rn.access_token,{access_token:t})})}_makeRef(){let t=this.ref+1;return t===this.ref?this.ref=0:this.ref=t,this.ref.toString()}_leaveOpenTopic(t){let n=this.channels.find(r=>r.topic===t&&(r._isJoined()||r._isJoining()));n&&(this.log("transport",`leaving duplicate topic "${t}"`),n.unsubscribe())}_remove(t){this.channels=this.channels.filter(n=>n._joinRef()!==t._joinRef())}setupConnection(){this.conn&&(this.conn.binaryType="arraybuffer",this.conn.onopen=()=>this._onConnOpen(),this.conn.onerror=t=>this._onConnError(t),this.conn.onmessage=t=>this._onConnMessage(t),this.conn.onclose=t=>this._onConnClose(t))}_endPointURL(){return this._appendParams(this.endPoint,Object.assign({},this.params,{vsn:kO}))}_onConnMessage(t){this.decode(t.data,n=>{let{topic:r,event:i,payload:a,ref:s}=n;(s&&s===this.pendingHeartbeatRef||i===(a==null?void 0:a.type))&&(this.pendingHeartbeatRef=null),this.log("receive",`${a.status||""} ${r} ${i} ${s&&"("+s+")"||""}`,a),this.channels.filter(o=>o._isMember(r)).forEach(o=>o._trigger(i,a,s)),this.stateChangeCallbacks.message.forEach(o=>o(n))})}_onConnOpen(){this.log("transport",`connected to ${this._endPointURL()}`),this._flushSendBuffer(),this.reconnectTimer.reset(),this.heartbeatTimer&&clearInterval(this.heartbeatTimer),this.heartbeatTimer=setInterval(()=>this._sendHeartbeat(),this.heartbeatIntervalMs),this.stateChangeCallbacks.open.forEach(t=>t())}_onConnClose(t){this.log("transport","close",t),this._triggerChanError(),this.heartbeatTimer&&clearInterval(this.heartbeatTimer),this.reconnectTimer.scheduleTimeout(),this.stateChangeCallbacks.close.forEach(n=>n(t))}_onConnError(t){this.log("transport",t.message),this._triggerChanError(),this.stateChangeCallbacks.error.forEach(n=>n(t))}_triggerChanError(){this.channels.forEach(t=>t._trigger(Rn.error))}_appendParams(t,n){if(Object.keys(n).length===0)return t;const r=t.match(/\?/)?"&":"?",i=new URLSearchParams(n);return`${t}${r}${i}`}_flushSendBuffer(){this.isConnected()&&this.sendBuffer.length>0&&(this.sendBuffer.forEach(t=>t()),this.sendBuffer=[])}_sendHeartbeat(){var t;if(this.isConnected()){if(this.pendingHeartbeatRef){this.pendingHeartbeatRef=null,this.log("transport","heartbeat timeout. Attempting to re-establish connection"),(t=this.conn)===null||t===void 0||t.close(PO,"hearbeat timeout");return}this.pendingHeartbeatRef=this._makeRef(),this.push({topic:"phoenix",event:"heartbeat",payload:{},ref:this.pendingHeartbeatRef}),this.setAuth(this.accessToken)}}}class jO{constructor(t,n,r){this.binaryType="arraybuffer",this.onclose=()=>{},this.onerror=()=>{},this.onmessage=()=>{},this.onopen=()=>{},this.readyState=rs.connecting,this.send=()=>{},this.url=null,this.url=t,this.close=r.close}}class a$ extends Error{constructor(t){super(t),this.__isStorageError=!0,this.name="StorageError"}}function _t(e){return typeof e=="object"&&e!==null&&"__isStorageError"in e}class zO extends a${constructor(t,n){super(t),this.name="StorageApiError",this.status=n}toJSON(){return{name:this.name,message:this.message,status:this.status}}}class y2 extends a${constructor(t,n){super(t),this.name="StorageUnknownError",this.originalError=n}}var VO=function(e,t,n,r){function i(a){return a instanceof n?a:new n(function(s){s(a)})}return new(n||(n=Promise))(function(a,s){function o(c){try{u(r.next(c))}catch(d){s(d)}}function l(c){try{u(r.throw(c))}catch(d){s(d)}}function u(c){c.done?a(c.value):i(c.value).then(o,l)}u((r=r.apply(e,t||[])).next())})};const r8=e=>{let t;return e?t=e:typeof fetch>"u"?t=(...n)=>$s(async()=>{const{default:r}=await Promise.resolve().then(()=>Ms);return{default:r}},void 0,import.meta.url).then(({default:r})=>r(...n)):t=fetch,(...n)=>t(...n)},WO=()=>VO(void 0,void 0,void 0,function*(){return typeof Response>"u"?(yield $s(()=>Promise.resolve().then(()=>Ms),void 0,import.meta.url)).Response:Response});var Fs=function(e,t,n,r){function i(a){return a instanceof n?a:new n(function(s){s(a)})}return new(n||(n=Promise))(function(a,s){function o(c){try{u(r.next(c))}catch(d){s(d)}}function l(c){try{u(r.throw(c))}catch(d){s(d)}}function u(c){c.done?a(c.value):i(c.value).then(o,l)}u((r=r.apply(e,t||[])).next())})};const _h=e=>e.msg||e.message||e.error_description||e.error||JSON.stringify(e),UO=(e,t)=>Fs(void 0,void 0,void 0,function*(){const n=yield WO();e instanceof n?e.json().then(r=>{t(new zO(_h(r),e.status||500))}).catch(r=>{t(new y2(_h(r),r))}):t(new y2(_h(e),e))}),HO=(e,t,n,r)=>{const i={method:e,headers:(t==null?void 0:t.headers)||{}};return e==="GET"?i:(i.headers=Object.assign({"Content-Type":"application/json"},t==null?void 0:t.headers),i.body=JSON.stringify(r),Object.assign(Object.assign({},i),n))};function Df(e,t,n,r,i,a){return Fs(this,void 0,void 0,function*(){return new Promise((s,o)=>{e(n,HO(t,r,i,a)).then(l=>{if(!l.ok)throw l;return r!=null&&r.noResolveJson?l:l.json()}).then(l=>s(l)).catch(l=>UO(l,o))})})}function wm(e,t,n,r){return Fs(this,void 0,void 0,function*(){return Df(e,"GET",t,n,r)})}function Ir(e,t,n,r,i){return Fs(this,void 0,void 0,function*(){return Df(e,"POST",t,r,i,n)})}function KO(e,t,n,r,i){return Fs(this,void 0,void 0,function*(){return Df(e,"PUT",t,r,i,n)})}function i8(e,t,n,r,i){return Fs(this,void 0,void 0,function*(){return Df(e,"DELETE",t,r,i,n)})}var dn=function(e,t,n,r){function i(a){return a instanceof n?a:new n(function(s){s(a)})}return new(n||(n=Promise))(function(a,s){function o(c){try{u(r.next(c))}catch(d){s(d)}}function l(c){try{u(r.throw(c))}catch(d){s(d)}}function u(c){c.done?a(c.value):i(c.value).then(o,l)}u((r=r.apply(e,t||[])).next())})};const YO={limit:100,offset:0,sortBy:{column:"name",order:"asc"}},$2={cacheControl:"3600",contentType:"text/plain;charset=UTF-8",upsert:!1};class qO{constructor(t,n={},r,i){this.url=t,this.headers=n,this.bucketId=r,this.fetch=r8(i)}uploadOrUpdate(t,n,r,i){return dn(this,void 0,void 0,function*(){try{let a;const s=Object.assign(Object.assign({},$2),i),o=Object.assign(Object.assign({},this.headers),t==="POST"&&{"x-upsert":String(s.upsert)});typeof Blob<"u"&&r instanceof Blob?(a=new FormData,a.append("cacheControl",s.cacheControl),a.append("",r)):typeof FormData<"u"&&r instanceof FormData?(a=r,a.append("cacheControl",s.cacheControl)):(a=r,o["cache-control"]=`max-age=${s.cacheControl}`,o["content-type"]=s.contentType);const l=this._removeEmptyFolders(n),u=this._getFinalPath(l),c=yield this.fetch(`${this.url}/object/${u}`,Object.assign({method:t,body:a,headers:o},s!=null&&s.duplex?{duplex:s.duplex}:{})),d=yield c.json();return c.ok?{data:{path:l,id:d.Id,fullPath:d.Key},error:null}:{data:null,error:d}}catch(a){if(_t(a))return{data:null,error:a};throw a}})}upload(t,n,r){return dn(this,void 0,void 0,function*(){return this.uploadOrUpdate("POST",t,n,r)})}uploadToSignedUrl(t,n,r,i){return dn(this,void 0,void 0,function*(){const a=this._removeEmptyFolders(t),s=this._getFinalPath(a),o=new URL(this.url+`/object/upload/sign/${s}`);o.searchParams.set("token",n);try{let l;const u=Object.assign({upsert:$2.upsert},i),c=Object.assign(Object.assign({},this.headers),{"x-upsert":String(u.upsert)});typeof Blob<"u"&&r instanceof Blob?(l=new FormData,l.append("cacheControl",u.cacheControl),l.append("",r)):typeof FormData<"u"&&r instanceof FormData?(l=r,l.append("cacheControl",u.cacheControl)):(l=r,c["cache-control"]=`max-age=${u.cacheControl}`,c["content-type"]=u.contentType);const d=yield this.fetch(o.toString(),{method:"PUT",body:l,headers:c}),f=yield d.json();return d.ok?{data:{path:a,fullPath:f.Key},error:null}:{data:null,error:f}}catch(l){if(_t(l))return{data:null,error:l};throw l}})}createSignedUploadUrl(t,n){return dn(this,void 0,void 0,function*(){try{let r=this._getFinalPath(t);const i=Object.assign({},this.headers);n!=null&&n.upsert&&(i["x-upsert"]="true");const a=yield Ir(this.fetch,`${this.url}/object/upload/sign/${r}`,{},{headers:i}),s=new URL(this.url+a.url),o=s.searchParams.get("token");if(!o)throw new a$("No token returned by API");return{data:{signedUrl:s.toString(),path:t,token:o},error:null}}catch(r){if(_t(r))return{data:null,error:r};throw r}})}update(t,n,r){return dn(this,void 0,void 0,function*(){return this.uploadOrUpdate("PUT",t,n,r)})}move(t,n,r){return dn(this,void 0,void 0,function*(){try{return{data:yield Ir(this.fetch,`${this.url}/object/move`,{bucketId:this.bucketId,sourceKey:t,destinationKey:n,destinationBucket:r==null?void 0:r.destinationBucket},{headers:this.headers}),error:null}}catch(i){if(_t(i))return{data:null,error:i};throw i}})}copy(t,n,r){return dn(this,void 0,void 0,function*(){try{return{data:{path:(yield Ir(this.fetch,`${this.url}/object/copy`,{bucketId:this.bucketId,sourceKey:t,destinationKey:n,destinationBucket:r==null?void 0:r.destinationBucket},{headers:this.headers})).Key},error:null}}catch(i){if(_t(i))return{data:null,error:i};throw i}})}createSignedUrl(t,n,r){return dn(this,void 0,void 0,function*(){try{let i=this._getFinalPath(t),a=yield Ir(this.fetch,`${this.url}/object/sign/${i}`,Object.assign({expiresIn:n},r!=null&&r.transform?{transform:r.transform}:{}),{headers:this.headers});const s=r!=null&&r.download?`&download=${r.download===!0?"":r.download}`:"";return a={signedUrl:encodeURI(`${this.url}${a.signedURL}${s}`)},{data:a,error:null}}catch(i){if(_t(i))return{data:null,error:i};throw i}})}createSignedUrls(t,n,r){return dn(this,void 0,void 0,function*(){try{const i=yield Ir(this.fetch,`${this.url}/object/sign/${this.bucketId}`,{expiresIn:n,paths:t},{headers:this.headers}),a=r!=null&&r.download?`&download=${r.download===!0?"":r.download}`:"";return{data:i.map(s=>Object.assign(Object.assign({},s),{signedUrl:s.signedURL?encodeURI(`${this.url}${s.signedURL}${a}`):null})),error:null}}catch(i){if(_t(i))return{data:null,error:i};throw i}})}download(t,n){return dn(this,void 0,void 0,function*(){const i=typeof(n==null?void 0:n.transform)<"u"?"render/image/authenticated":"object",a=this.transformOptsToQueryString((n==null?void 0:n.transform)||{}),s=a?`?${a}`:"";try{const o=this._getFinalPath(t);return{data:yield(yield wm(this.fetch,`${this.url}/${i}/${o}${s}`,{headers:this.headers,noResolveJson:!0})).blob(),error:null}}catch(o){if(_t(o))return{data:null,error:o};throw o}})}getPublicUrl(t,n){const r=this._getFinalPath(t),i=[],a=n!=null&&n.download?`download=${n.download===!0?"":n.download}`:"";a!==""&&i.push(a);const o=typeof(n==null?void 0:n.transform)<"u"?"render/image":"object",l=this.transformOptsToQueryString((n==null?void 0:n.transform)||{});l!==""&&i.push(l);let u=i.join("&");return u!==""&&(u=`?${u}`),{data:{publicUrl:encodeURI(`${this.url}/${o}/public/${r}${u}`)}}}remove(t){return dn(this,void 0,void 0,function*(){try{return{data:yield i8(this.fetch,`${this.url}/object/${this.bucketId}`,{prefixes:t},{headers:this.headers}),error:null}}catch(n){if(_t(n))return{data:null,error:n};throw n}})}list(t,n,r){return dn(this,void 0,void 0,function*(){try{const i=Object.assign(Object.assign(Object.assign({},YO),n),{prefix:t||""});return{data:yield Ir(this.fetch,`${this.url}/object/list/${this.bucketId}`,i,{headers:this.headers},r),error:null}}catch(i){if(_t(i))return{data:null,error:i};throw i}})}_getFinalPath(t){return`${this.bucketId}/${t}`}_removeEmptyFolders(t){return t.replace(/^\/|\/$/g,"").replace(/\/+/g,"/")}transformOptsToQueryString(t){const n=[];return t.width&&n.push(`width=${t.width}`),t.height&&n.push(`height=${t.height}`),t.resize&&n.push(`resize=${t.resize}`),t.format&&n.push(`format=${t.format}`),t.quality&&n.push(`quality=${t.quality}`),n.join("&")}}const GO="2.6.0",ZO={"X-Client-Info":`storage-js/${GO}`};var wa=function(e,t,n,r){function i(a){return a instanceof n?a:new n(function(s){s(a)})}return new(n||(n=Promise))(function(a,s){function o(c){try{u(r.next(c))}catch(d){s(d)}}function l(c){try{u(r.throw(c))}catch(d){s(d)}}function u(c){c.done?a(c.value):i(c.value).then(o,l)}u((r=r.apply(e,t||[])).next())})};class XO{constructor(t,n={},r){this.url=t,this.headers=Object.assign(Object.assign({},ZO),n),this.fetch=r8(r)}listBuckets(){return wa(this,void 0,void 0,function*(){try{return{data:yield wm(this.fetch,`${this.url}/bucket`,{headers:this.headers}),error:null}}catch(t){if(_t(t))return{data:null,error:t};throw t}})}getBucket(t){return wa(this,void 0,void 0,function*(){try{return{data:yield wm(this.fetch,`${this.url}/bucket/${t}`,{headers:this.headers}),error:null}}catch(n){if(_t(n))return{data:null,error:n};throw n}})}createBucket(t,n={public:!1}){return wa(this,void 0,void 0,function*(){try{return{data:yield Ir(this.fetch,`${this.url}/bucket`,{id:t,name:t,public:n.public,file_size_limit:n.fileSizeLimit,allowed_mime_types:n.allowedMimeTypes},{headers:this.headers}),error:null}}catch(r){if(_t(r))return{data:null,error:r};throw r}})}updateBucket(t,n){return wa(this,void 0,void 0,function*(){try{return{data:yield KO(this.fetch,`${this.url}/bucket/${t}`,{id:t,name:t,public:n.public,file_size_limit:n.fileSizeLimit,allowed_mime_types:n.allowedMimeTypes},{headers:this.headers}),error:null}}catch(r){if(_t(r))return{data:null,error:r};throw r}})}emptyBucket(t){return wa(this,void 0,void 0,function*(){try{return{data:yield Ir(this.fetch,`${this.url}/bucket/${t}/empty`,{},{headers:this.headers}),error:null}}catch(n){if(_t(n))return{data:null,error:n};throw n}})}deleteBucket(t){return wa(this,void 0,void 0,function*(){try{return{data:yield i8(this.fetch,`${this.url}/bucket/${t}`,{},{headers:this.headers}),error:null}}catch(n){if(_t(n))return{data:null,error:n};throw n}})}}class QO extends XO{constructor(t,n={},r){super(t,n,r)}from(t){return new qO(this.url,this.headers,t,this.fetch)}}const JO="2.44.3";let ho="";typeof Deno<"u"?ho="deno":typeof document<"u"?ho="web":typeof navigator<"u"&&navigator.product==="ReactNative"?ho="react-native":ho="node";const eB={"X-Client-Info":`supabase-js-${ho}/${JO}`},tB={headers:eB},nB={schema:"public"},rB={autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,flowType:"implicit"},iB={};var aB=function(e,t,n,r){function i(a){return a instanceof n?a:new n(function(s){s(a)})}return new(n||(n=Promise))(function(a,s){function o(c){try{u(r.next(c))}catch(d){s(d)}}function l(c){try{u(r.throw(c))}catch(d){s(d)}}function u(c){c.done?a(c.value):i(c.value).then(o,l)}u((r=r.apply(e,t||[])).next())})};const sB=e=>{let t;return e?t=e:typeof fetch>"u"?t=W_:t=fetch,(...n)=>t(...n)},oB=()=>typeof Headers>"u"?U_:Headers,lB=(e,t,n)=>{const r=sB(n),i=oB();return(a,s)=>aB(void 0,void 0,void 0,function*(){var o;const l=(o=yield t())!==null&&o!==void 0?o:e;let u=new i(s==null?void 0:s.headers);return u.has("apikey")||u.set("apikey",e),u.has("Authorization")||u.set("Authorization",`Bearer ${l}`),r(a,Object.assign(Object.assign({},s),{headers:u}))})};function uB(e){return e.replace(/\/$/,"")}function cB(e,t){const{db:n,auth:r,realtime:i,global:a}=e,{db:s,auth:o,realtime:l,global:u}=t;return{db:Object.assign(Object.assign({},s),n),auth:Object.assign(Object.assign({},o),r),realtime:Object.assign(Object.assign({},l),i),global:Object.assign(Object.assign({},u),a)}}const a8="2.64.2",dB="http://localhost:9999",fB="supabase.auth.token",hB={"X-Client-Info":`gotrue-js/${a8}`},x2=10,Dm="X-Supabase-Api-Version",s8={"2024-01-01":{timestamp:Date.parse("2024-01-01T00:00:00.0Z"),name:"2024-01-01"}};function pB(e){return Math.round(Date.now()/1e3)+e}function mB(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){const t=Math.random()*16|0;return(e=="x"?t:t&3|8).toString(16)})}const kn=()=>typeof document<"u",$i={tested:!1,writable:!1},Ao=()=>{if(!kn())return!1;try{if(typeof globalThis.localStorage!="object")return!1}catch{return!1}if($i.tested)return $i.writable;const e=`lswt-${Math.random()}${Math.random()}`;try{globalThis.localStorage.setItem(e,e),globalThis.localStorage.removeItem(e),$i.tested=!0,$i.writable=!0}catch{$i.tested=!0,$i.writable=!1}return $i.writable};function Eh(e){const t={},n=new URL(e);if(n.hash&&n.hash[0]==="#")try{new URLSearchParams(n.hash.substring(1)).forEach((i,a)=>{t[a]=i})}catch{}return n.searchParams.forEach((r,i)=>{t[i]=r}),t}const o8=e=>{let t;return e?t=e:typeof fetch>"u"?t=(...n)=>$s(async()=>{const{default:r}=await Promise.resolve().then(()=>Ms);return{default:r}},void 0,import.meta.url).then(({default:r})=>r(...n)):t=fetch,(...n)=>t(...n)},gB=e=>typeof e=="object"&&e!==null&&"status"in e&&"ok"in e&&"json"in e&&typeof e.json=="function",l8=async(e,t,n)=>{await e.setItem(t,JSON.stringify(n))},uu=async(e,t)=>{const n=await e.getItem(t);if(!n)return null;try{return JSON.parse(n)}catch{return n}},Sh=async(e,t)=>{await e.removeItem(t)};function vB(e){const t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";let n="",r,i,a,s,o,l,u,c=0;for(e=e.replace("-","+").replace("_","/");c<e.length;)s=t.indexOf(e.charAt(c++)),o=t.indexOf(e.charAt(c++)),l=t.indexOf(e.charAt(c++)),u=t.indexOf(e.charAt(c++)),r=s<<2|o>>4,i=(o&15)<<4|l>>2,a=(l&3)<<6|u,n=n+String.fromCharCode(r),l!=64&&i!=0&&(n=n+String.fromCharCode(i)),u!=64&&a!=0&&(n=n+String.fromCharCode(a));return n}class _f{constructor(){this.promise=new _f.promiseConstructor((t,n)=>{this.resolve=t,this.reject=n})}}_f.promiseConstructor=Promise;function w2(e){const t=/^([a-z0-9_-]{4})*($|[a-z0-9_-]{3}=?$|[a-z0-9_-]{2}(==)?$)$/i,n=e.split(".");if(n.length!==3)throw new Error("JWT is not valid: not a JWT structure");if(!t.test(n[1]))throw new Error("JWT is not valid: payload is not in base64url format");const r=n[1];return JSON.parse(vB(r))}async function bB(e){return await new Promise(t=>{setTimeout(()=>t(null),e)})}function yB(e,t){return new Promise((r,i)=>{(async()=>{for(let a=0;a<1/0;a++)try{const s=await e(a);if(!t(a,null,s)){r(s);return}}catch(s){if(!t(a,s)){i(s);return}}})()})}function $B(e){return("0"+e.toString(16)).substr(-2)}function xB(){const t=new Uint32Array(56);if(typeof crypto>"u"){const n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~",r=n.length;let i="";for(let a=0;a<56;a++)i+=n.charAt(Math.floor(Math.random()*r));return i}return crypto.getRandomValues(t),Array.from(t,$B).join("")}async function wB(e){const n=new TextEncoder().encode(e),r=await crypto.subtle.digest("SHA-256",n),i=new Uint8Array(r);return Array.from(i).map(a=>String.fromCharCode(a)).join("")}function DB(e){return btoa(e).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}async function _B(e){if(!(typeof crypto<"u"&&typeof crypto.subtle<"u"&&typeof TextEncoder<"u"))return console.warn("WebCrypto API is not supported. Code challenge method will default to use plain instead of sha256."),e;const n=await wB(e);return DB(n)}async function Da(e,t,n=!1){const r=xB();let i=r;n&&(i+="/PASSWORD_RECOVERY"),await l8(e,`${t}-code-verifier`,i);const a=await _B(r);return[a,r===a?"plain":"s256"]}const EB=/^2[0-9]{3}-(0[1-9]|1[0-2])-(0[1-9]|1[0-9]|2[0-9]|3[0-1])$/i;function SB(e){const t=e.headers.get(Dm);if(!t||!t.match(EB))return null;try{return new Date(`${t}T00:00:00.0Z`)}catch{return null}}class s$ extends Error{constructor(t,n,r){super(t),this.__isAuthError=!0,this.name="AuthError",this.status=n,this.code=r}}function re(e){return typeof e=="object"&&e!==null&&"__isAuthError"in e}class CB extends s${constructor(t,n,r){super(t,n,r),this.name="AuthApiError",this.status=n,this.code=r}}function kB(e){return re(e)&&e.name==="AuthApiError"}class u8 extends s${constructor(t,n){super(t),this.name="AuthUnknownError",this.originalError=n}}class ha extends s${constructor(t,n,r,i){super(t,r,i),this.name=n,this.status=r}}class xi extends ha{constructor(){super("Auth session missing!","AuthSessionMissingError",400,void 0)}}class Ch extends ha{constructor(){super("Auth session or user missing","AuthInvalidTokenResponseError",500,void 0)}}class cu extends ha{constructor(t){super(t,"AuthInvalidCredentialsError",400,void 0)}}class du extends ha{constructor(t,n=null){super(t,"AuthImplicitGrantRedirectError",500,void 0),this.details=null,this.details=n}toJSON(){return{name:this.name,message:this.message,status:this.status,details:this.details}}}class D2 extends ha{constructor(t,n=null){super(t,"AuthPKCEGrantCodeExchangeError",500,void 0),this.details=null,this.details=n}toJSON(){return{name:this.name,message:this.message,status:this.status,details:this.details}}}class _m extends ha{constructor(t,n){super(t,"AuthRetryableFetchError",n,void 0)}}function kh(e){return re(e)&&e.name==="AuthRetryableFetchError"}class _2 extends ha{constructor(t,n,r){super(t,"AuthWeakPasswordError",n,"weak_password"),this.reasons=r}}var PB=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};const Ti=e=>e.msg||e.message||e.error_description||e.error||JSON.stringify(e),TB=[502,503,504];async function E2(e){var t;if(!gB(e))throw new _m(Ti(e),0);if(TB.includes(e.status))throw new _m(Ti(e),e.status);let n;try{n=await e.json()}catch(a){throw new u8(Ti(a),a)}let r;const i=SB(e);if(i&&i.getTime()>=s8["2024-01-01"].timestamp&&typeof n=="object"&&n&&typeof n.code=="string"?r=n.code:typeof n=="object"&&n&&typeof n.error_code=="string"&&(r=n.error_code),r){if(r==="weak_password")throw new _2(Ti(n),e.status,((t=n.weak_password)===null||t===void 0?void 0:t.reasons)||[])}else if(typeof n=="object"&&n&&typeof n.weak_password=="object"&&n.weak_password&&Array.isArray(n.weak_password.reasons)&&n.weak_password.reasons.length&&n.weak_password.reasons.reduce((a,s)=>a&&typeof s=="string",!0))throw new _2(Ti(n),e.status,n.weak_password.reasons);throw new CB(Ti(n),e.status||500,r)}const RB=(e,t,n,r)=>{const i={method:e,headers:(t==null?void 0:t.headers)||{}};return e==="GET"?i:(i.headers=Object.assign({"Content-Type":"application/json;charset=UTF-8"},t==null?void 0:t.headers),i.body=JSON.stringify(r),Object.assign(Object.assign({},i),n))};async function oe(e,t,n,r){var i;const a=Object.assign({},r==null?void 0:r.headers);a[Dm]||(a[Dm]=s8["2024-01-01"].name),r!=null&&r.jwt&&(a.Authorization=`Bearer ${r.jwt}`);const s=(i=r==null?void 0:r.query)!==null&&i!==void 0?i:{};r!=null&&r.redirectTo&&(s.redirect_to=r.redirectTo);const o=Object.keys(s).length?"?"+new URLSearchParams(s).toString():"",l=await MB(e,t,n+o,{headers:a,noResolveJson:r==null?void 0:r.noResolveJson},{},r==null?void 0:r.body);return r!=null&&r.xform?r==null?void 0:r.xform(l):{data:Object.assign({},l),error:null}}async function MB(e,t,n,r,i,a){const s=RB(t,r,i,a);let o;try{o=await e(n,Object.assign({},s))}catch(l){throw console.error(l),new _m(Ti(l),0)}if(o.ok||await E2(o),r!=null&&r.noResolveJson)return o;try{return await o.json()}catch(l){await E2(l)}}function Fr(e){var t;let n=null;BB(e)&&(n=Object.assign({},e),e.expires_at||(n.expires_at=pB(e.expires_in)));const r=(t=e.user)!==null&&t!==void 0?t:e;return{data:{session:n,user:r},error:null}}function S2(e){const t=Fr(e);return!t.error&&e.weak_password&&typeof e.weak_password=="object"&&Array.isArray(e.weak_password.reasons)&&e.weak_password.reasons.length&&e.weak_password.message&&typeof e.weak_password.message=="string"&&e.weak_password.reasons.reduce((n,r)=>n&&typeof r=="string",!0)&&(t.data.weak_password=e.weak_password),t}function zr(e){var t;return{data:{user:(t=e.user)!==null&&t!==void 0?t:e},error:null}}function FB(e){return{data:e,error:null}}function AB(e){const{action_link:t,email_otp:n,hashed_token:r,redirect_to:i,verification_type:a}=e,s=PB(e,["action_link","email_otp","hashed_token","redirect_to","verification_type"]),o={action_link:t,email_otp:n,hashed_token:r,redirect_to:i,verification_type:a},l=Object.assign({},s);return{data:{properties:o,user:l},error:null}}function OB(e){return e}function BB(e){return e.access_token&&e.refresh_token&&e.expires_in}var IB=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};class LB{constructor({url:t="",headers:n={},fetch:r}){this.url=t,this.headers=n,this.fetch=o8(r),this.mfa={listFactors:this._listFactors.bind(this),deleteFactor:this._deleteFactor.bind(this)}}async signOut(t,n="global"){try{return await oe(this.fetch,"POST",`${this.url}/logout?scope=${n}`,{headers:this.headers,jwt:t,noResolveJson:!0}),{data:null,error:null}}catch(r){if(re(r))return{data:null,error:r};throw r}}async inviteUserByEmail(t,n={}){try{return await oe(this.fetch,"POST",`${this.url}/invite`,{body:{email:t,data:n.data},headers:this.headers,redirectTo:n.redirectTo,xform:zr})}catch(r){if(re(r))return{data:{user:null},error:r};throw r}}async generateLink(t){try{const{options:n}=t,r=IB(t,["options"]),i=Object.assign(Object.assign({},r),n);return"newEmail"in r&&(i.new_email=r==null?void 0:r.newEmail,delete i.newEmail),await oe(this.fetch,"POST",`${this.url}/admin/generate_link`,{body:i,headers:this.headers,xform:AB,redirectTo:n==null?void 0:n.redirectTo})}catch(n){if(re(n))return{data:{properties:null,user:null},error:n};throw n}}async createUser(t){try{return await oe(this.fetch,"POST",`${this.url}/admin/users`,{body:t,headers:this.headers,xform:zr})}catch(n){if(re(n))return{data:{user:null},error:n};throw n}}async listUsers(t){var n,r,i,a,s,o,l;try{const u={nextPage:null,lastPage:0,total:0},c=await oe(this.fetch,"GET",`${this.url}/admin/users`,{headers:this.headers,noResolveJson:!0,query:{page:(r=(n=t==null?void 0:t.page)===null||n===void 0?void 0:n.toString())!==null&&r!==void 0?r:"",per_page:(a=(i=t==null?void 0:t.perPage)===null||i===void 0?void 0:i.toString())!==null&&a!==void 0?a:""},xform:OB});if(c.error)throw c.error;const d=await c.json(),f=(s=c.headers.get("x-total-count"))!==null&&s!==void 0?s:0,h=(l=(o=c.headers.get("link"))===null||o===void 0?void 0:o.split(","))!==null&&l!==void 0?l:[];return h.length>0&&(h.forEach(p=>{const g=parseInt(p.split(";")[0].split("=")[1].substring(0,1)),b=JSON.parse(p.split(";")[1].split("=")[1]);u[`${b}Page`]=g}),u.total=parseInt(f)),{data:Object.assign(Object.assign({},d),u),error:null}}catch(u){if(re(u))return{data:{users:[]},error:u};throw u}}async getUserById(t){try{return await oe(this.fetch,"GET",`${this.url}/admin/users/${t}`,{headers:this.headers,xform:zr})}catch(n){if(re(n))return{data:{user:null},error:n};throw n}}async updateUserById(t,n){try{return await oe(this.fetch,"PUT",`${this.url}/admin/users/${t}`,{body:n,headers:this.headers,xform:zr})}catch(r){if(re(r))return{data:{user:null},error:r};throw r}}async deleteUser(t,n=!1){try{return await oe(this.fetch,"DELETE",`${this.url}/admin/users/${t}`,{headers:this.headers,body:{should_soft_delete:n},xform:zr})}catch(r){if(re(r))return{data:{user:null},error:r};throw r}}async _listFactors(t){try{const{data:n,error:r}=await oe(this.fetch,"GET",`${this.url}/admin/users/${t.userId}/factors`,{headers:this.headers,xform:i=>({data:{factors:i},error:null})});return{data:n,error:r}}catch(n){if(re(n))return{data:null,error:n};throw n}}async _deleteFactor(t){try{return{data:await oe(this.fetch,"DELETE",`${this.url}/admin/users/${t.userId}/factors/${t.id}`,{headers:this.headers}),error:null}}catch(n){if(re(n))return{data:null,error:n};throw n}}}const NB={getItem:e=>Ao()?globalThis.localStorage.getItem(e):null,setItem:(e,t)=>{Ao()&&globalThis.localStorage.setItem(e,t)},removeItem:e=>{Ao()&&globalThis.localStorage.removeItem(e)}};function C2(e={}){return{getItem:t=>e[t]||null,setItem:(t,n)=>{e[t]=n},removeItem:t=>{delete e[t]}}}function jB(){if(typeof globalThis!="object")try{Object.defineProperty(Object.prototype,"__magic__",{get:function(){return this},configurable:!0}),__magic__.globalThis=__magic__,delete Object.prototype.__magic__}catch{typeof self<"u"&&(self.globalThis=self)}}const _a={debug:!!(globalThis&&Ao()&&globalThis.localStorage&&globalThis.localStorage.getItem("supabase.gotrue-js.locks.debug")==="true")};class c8 extends Error{constructor(t){super(t),this.isAcquireTimeout=!0}}class zB extends c8{}async function VB(e,t,n){_a.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquire lock",e,t);const r=new globalThis.AbortController;return t>0&&setTimeout(()=>{r.abort(),_a.debug&&console.log("@supabase/gotrue-js: navigatorLock acquire timed out",e)},t),await globalThis.navigator.locks.request(e,t===0?{mode:"exclusive",ifAvailable:!0}:{mode:"exclusive",signal:r.signal},async i=>{if(i){_a.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquired",e,i.name);try{return await n()}finally{_a.debug&&console.log("@supabase/gotrue-js: navigatorLock: released",e,i.name)}}else{if(t===0)throw _a.debug&&console.log("@supabase/gotrue-js: navigatorLock: not immediately available",e),new zB(`Acquiring an exclusive Navigator LockManager lock "${e}" immediately failed`);if(_a.debug)try{const a=await globalThis.navigator.locks.query();console.log("@supabase/gotrue-js: Navigator LockManager state",JSON.stringify(a,null," "))}catch(a){console.warn("@supabase/gotrue-js: Error when querying Navigator LockManager state",a)}return console.warn("@supabase/gotrue-js: Navigator LockManager returned a null lock when using #request without ifAvailable set to true, it appears this browser is not following the LockManager spec https://developer.mozilla.org/en-US/docs/Web/API/LockManager/request"),await n()}})}jB();const WB={url:dB,storageKey:fB,autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,headers:hB,flowType:"implicit",debug:!1,hasCustomAuthorizationHeader:!1},Ks=30*1e3,k2=3;async function P2(e,t,n){return await n()}class ll{constructor(t){var n,r;this.memoryStorage=null,this.stateChangeEmitters=new Map,this.autoRefreshTicker=null,this.visibilityChangedCallback=null,this.refreshingDeferred=null,this.initializePromise=null,this.detectSessionInUrl=!0,this.hasCustomAuthorizationHeader=!1,this.suppressGetSessionWarning=!1,this.lockAcquired=!1,this.pendingInLock=[],this.broadcastChannel=null,this.logger=console.log,this.instanceID=ll.nextInstanceID,ll.nextInstanceID+=1,this.instanceID>0&&kn()&&console.warn("Multiple GoTrueClient instances detected in the same browser context. It is not an error, but this should be avoided as it may produce undefined behavior when used concurrently under the same storage key.");const i=Object.assign(Object.assign({},WB),t);if(this.logDebugMessages=!!i.debug,typeof i.debug=="function"&&(this.logger=i.debug),this.persistSession=i.persistSession,this.storageKey=i.storageKey,this.autoRefreshToken=i.autoRefreshToken,this.admin=new LB({url:i.url,headers:i.headers,fetch:i.fetch}),this.url=i.url,this.headers=i.headers,this.fetch=o8(i.fetch),this.lock=i.lock||P2,this.detectSessionInUrl=i.detectSessionInUrl,this.flowType=i.flowType,this.hasCustomAuthorizationHeader=i.hasCustomAuthorizationHeader,i.lock?this.lock=i.lock:kn()&&(!((n=globalThis==null?void 0:globalThis.navigator)===null||n===void 0)&&n.locks)?this.lock=VB:this.lock=P2,this.mfa={verify:this._verify.bind(this),enroll:this._enroll.bind(this),unenroll:this._unenroll.bind(this),challenge:this._challenge.bind(this),listFactors:this._listFactors.bind(this),challengeAndVerify:this._challengeAndVerify.bind(this),getAuthenticatorAssuranceLevel:this._getAuthenticatorAssuranceLevel.bind(this)},this.persistSession?i.storage?this.storage=i.storage:Ao()?this.storage=NB:(this.memoryStorage={},this.storage=C2(this.memoryStorage)):(this.memoryStorage={},this.storage=C2(this.memoryStorage)),kn()&&globalThis.BroadcastChannel&&this.persistSession&&this.storageKey){try{this.broadcastChannel=new globalThis.BroadcastChannel(this.storageKey)}catch(a){console.error("Failed to create a new BroadcastChannel, multi-tab state changes will not be available",a)}(r=this.broadcastChannel)===null||r===void 0||r.addEventListener("message",async a=>{this._debug("received broadcast notification from other tab or client",a),await this._notifyAllSubscribers(a.data.event,a.data.session,!1)})}this.initialize()}_debug(...t){return this.logDebugMessages&&this.logger(`GoTrueClient@${this.instanceID} (${a8}) ${new Date().toISOString()}`,...t),this}async initialize(){return this.initializePromise?await this.initializePromise:(this.initializePromise=(async()=>await this._acquireLock(-1,async()=>await this._initialize()))(),await this.initializePromise)}async _initialize(){try{const t=kn()?await this._isPKCEFlow():!1;if(this._debug("#_initialize()","begin","is PKCE flow",t),t||this.detectSessionInUrl&&this._isImplicitGrantFlow()){const{data:n,error:r}=await this._getSessionFromURL(t);if(r)return this._debug("#_initialize()","error detecting session from URL",r),(r==null?void 0:r.message)==="Identity is already linked"||(r==null?void 0:r.message)==="Identity is already linked to another user"?{error:r}:(await this._removeSession(),{error:r});const{session:i,redirectType:a}=n;return this._debug("#_initialize()","detected session in URL",i,"redirect type",a),await this._saveSession(i),setTimeout(async()=>{a==="recovery"?await this._notifyAllSubscribers("PASSWORD_RECOVERY",i):await this._notifyAllSubscribers("SIGNED_IN",i)},0),{error:null}}return await this._recoverAndRefresh(),{error:null}}catch(t){return re(t)?{error:t}:{error:new u8("Unexpected error during initialization",t)}}finally{await this._handleVisibilityChange(),this._debug("#_initialize()","end")}}async signInAnonymously(t){var n,r,i;try{await this._removeSession();const a=await oe(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{data:(r=(n=t==null?void 0:t.options)===null||n===void 0?void 0:n.data)!==null&&r!==void 0?r:{},gotrue_meta_security:{captcha_token:(i=t==null?void 0:t.options)===null||i===void 0?void 0:i.captchaToken}},xform:Fr}),{data:s,error:o}=a;if(o||!s)return{data:{user:null,session:null},error:o};const l=s.session,u=s.user;return s.session&&(await this._saveSession(s.session),await this._notifyAllSubscribers("SIGNED_IN",l)),{data:{user:u,session:l},error:null}}catch(a){if(re(a))return{data:{user:null,session:null},error:a};throw a}}async signUp(t){var n,r,i;try{await this._removeSession();let a;if("email"in t){const{email:c,password:d,options:f}=t;let h=null,p=null;this.flowType==="pkce"&&([h,p]=await Da(this.storage,this.storageKey)),a=await oe(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,redirectTo:f==null?void 0:f.emailRedirectTo,body:{email:c,password:d,data:(n=f==null?void 0:f.data)!==null&&n!==void 0?n:{},gotrue_meta_security:{captcha_token:f==null?void 0:f.captchaToken},code_challenge:h,code_challenge_method:p},xform:Fr})}else if("phone"in t){const{phone:c,password:d,options:f}=t;a=await oe(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{phone:c,password:d,data:(r=f==null?void 0:f.data)!==null&&r!==void 0?r:{},channel:(i=f==null?void 0:f.channel)!==null&&i!==void 0?i:"sms",gotrue_meta_security:{captcha_token:f==null?void 0:f.captchaToken}},xform:Fr})}else throw new cu("You must provide either an email or phone number and a password");const{data:s,error:o}=a;if(o||!s)return{data:{user:null,session:null},error:o};const l=s.session,u=s.user;return s.session&&(await this._saveSession(s.session),await this._notifyAllSubscribers("SIGNED_IN",l)),{data:{user:u,session:l},error:null}}catch(a){if(re(a))return{data:{user:null,session:null},error:a};throw a}}async signInWithPassword(t){try{await this._removeSession();let n;if("email"in t){const{email:a,password:s,options:o}=t;n=await oe(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{email:a,password:s,gotrue_meta_security:{captcha_token:o==null?void 0:o.captchaToken}},xform:S2})}else if("phone"in t){const{phone:a,password:s,options:o}=t;n=await oe(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{phone:a,password:s,gotrue_meta_security:{captcha_token:o==null?void 0:o.captchaToken}},xform:S2})}else throw new cu("You must provide either an email or phone number and a password");const{data:r,error:i}=n;return i?{data:{user:null,session:null},error:i}:!r||!r.session||!r.user?{data:{user:null,session:null},error:new Ch}:(r.session&&(await this._saveSession(r.session),await this._notifyAllSubscribers("SIGNED_IN",r.session)),{data:Object.assign({user:r.user,session:r.session},r.weak_password?{weakPassword:r.weak_password}:null),error:i})}catch(n){if(re(n))return{data:{user:null,session:null},error:n};throw n}}async signInWithOAuth(t){var n,r,i,a;return await this._removeSession(),await this._handleProviderSignIn(t.provider,{redirectTo:(n=t.options)===null||n===void 0?void 0:n.redirectTo,scopes:(r=t.options)===null||r===void 0?void 0:r.scopes,queryParams:(i=t.options)===null||i===void 0?void 0:i.queryParams,skipBrowserRedirect:(a=t.options)===null||a===void 0?void 0:a.skipBrowserRedirect})}async exchangeCodeForSession(t){return await this.initializePromise,this._acquireLock(-1,async()=>this._exchangeCodeForSession(t))}async _exchangeCodeForSession(t){const n=await uu(this.storage,`${this.storageKey}-code-verifier`),[r,i]=(n??"").split("/"),{data:a,error:s}=await oe(this.fetch,"POST",`${this.url}/token?grant_type=pkce`,{headers:this.headers,body:{auth_code:t,code_verifier:r},xform:Fr});return await Sh(this.storage,`${this.storageKey}-code-verifier`),s?{data:{user:null,session:null,redirectType:null},error:s}:!a||!a.session||!a.user?{data:{user:null,session:null,redirectType:null},error:new Ch}:(a.session&&(await this._saveSession(a.session),await this._notifyAllSubscribers("SIGNED_IN",a.session)),{data:Object.assign(Object.assign({},a),{redirectType:i??null}),error:s})}async signInWithIdToken(t){await this._removeSession();try{const{options:n,provider:r,token:i,access_token:a,nonce:s}=t,o=await oe(this.fetch,"POST",`${this.url}/token?grant_type=id_token`,{headers:this.headers,body:{provider:r,id_token:i,access_token:a,nonce:s,gotrue_meta_security:{captcha_token:n==null?void 0:n.captchaToken}},xform:Fr}),{data:l,error:u}=o;return u?{data:{user:null,session:null},error:u}:!l||!l.session||!l.user?{data:{user:null,session:null},error:new Ch}:(l.session&&(await this._saveSession(l.session),await this._notifyAllSubscribers("SIGNED_IN",l.session)),{data:l,error:u})}catch(n){if(re(n))return{data:{user:null,session:null},error:n};throw n}}async signInWithOtp(t){var n,r,i,a,s;try{if(await this._removeSession(),"email"in t){const{email:o,options:l}=t;let u=null,c=null;this.flowType==="pkce"&&([u,c]=await Da(this.storage,this.storageKey));const{error:d}=await oe(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{email:o,data:(n=l==null?void 0:l.data)!==null&&n!==void 0?n:{},create_user:(r=l==null?void 0:l.shouldCreateUser)!==null&&r!==void 0?r:!0,gotrue_meta_security:{captcha_token:l==null?void 0:l.captchaToken},code_challenge:u,code_challenge_method:c},redirectTo:l==null?void 0:l.emailRedirectTo});return{data:{user:null,session:null},error:d}}if("phone"in t){const{phone:o,options:l}=t,{data:u,error:c}=await oe(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{phone:o,data:(i=l==null?void 0:l.data)!==null&&i!==void 0?i:{},create_user:(a=l==null?void 0:l.shouldCreateUser)!==null&&a!==void 0?a:!0,gotrue_meta_security:{captcha_token:l==null?void 0:l.captchaToken},channel:(s=l==null?void 0:l.channel)!==null&&s!==void 0?s:"sms"}});return{data:{user:null,session:null,messageId:u==null?void 0:u.message_id},error:c}}throw new cu("You must provide either an email or phone number.")}catch(o){if(re(o))return{data:{user:null,session:null},error:o};throw o}}async verifyOtp(t){var n,r;try{t.type!=="email_change"&&t.type!=="phone_change"&&await this._removeSession();let i,a;"options"in t&&(i=(n=t.options)===null||n===void 0?void 0:n.redirectTo,a=(r=t.options)===null||r===void 0?void 0:r.captchaToken);const{data:s,error:o}=await oe(this.fetch,"POST",`${this.url}/verify`,{headers:this.headers,body:Object.assign(Object.assign({},t),{gotrue_meta_security:{captcha_token:a}}),redirectTo:i,xform:Fr});if(o)throw o;if(!s)throw new Error("An error occurred on token verification.");const l=s.session,u=s.user;return l!=null&&l.access_token&&(await this._saveSession(l),await this._notifyAllSubscribers(t.type=="recovery"?"PASSWORD_RECOVERY":"SIGNED_IN",l)),{data:{user:u,session:l},error:null}}catch(i){if(re(i))return{data:{user:null,session:null},error:i};throw i}}async signInWithSSO(t){var n,r,i;try{await this._removeSession();let a=null,s=null;return this.flowType==="pkce"&&([a,s]=await Da(this.storage,this.storageKey)),await oe(this.fetch,"POST",`${this.url}/sso`,{body:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},"providerId"in t?{provider_id:t.providerId}:null),"domain"in t?{domain:t.domain}:null),{redirect_to:(r=(n=t.options)===null||n===void 0?void 0:n.redirectTo)!==null&&r!==void 0?r:void 0}),!((i=t==null?void 0:t.options)===null||i===void 0)&&i.captchaToken?{gotrue_meta_security:{captcha_token:t.options.captchaToken}}:null),{skip_http_redirect:!0,code_challenge:a,code_challenge_method:s}),headers:this.headers,xform:FB})}catch(a){if(re(a))return{data:null,error:a};throw a}}async reauthenticate(){return await this.initializePromise,await this._acquireLock(-1,async()=>await this._reauthenticate())}async _reauthenticate(){try{return await this._useSession(async t=>{const{data:{session:n},error:r}=t;if(r)throw r;if(!n)throw new xi;const{error:i}=await oe(this.fetch,"GET",`${this.url}/reauthenticate`,{headers:this.headers,jwt:n.access_token});return{data:{user:null,session:null},error:i}})}catch(t){if(re(t))return{data:{user:null,session:null},error:t};throw t}}async resend(t){try{t.type!="email_change"&&t.type!="phone_change"&&await this._removeSession();const n=`${this.url}/resend`;if("email"in t){const{email:r,type:i,options:a}=t,{error:s}=await oe(this.fetch,"POST",n,{headers:this.headers,body:{email:r,type:i,gotrue_meta_security:{captcha_token:a==null?void 0:a.captchaToken}},redirectTo:a==null?void 0:a.emailRedirectTo});return{data:{user:null,session:null},error:s}}else if("phone"in t){const{phone:r,type:i,options:a}=t,{data:s,error:o}=await oe(this.fetch,"POST",n,{headers:this.headers,body:{phone:r,type:i,gotrue_meta_security:{captcha_token:a==null?void 0:a.captchaToken}}});return{data:{user:null,session:null,messageId:s==null?void 0:s.message_id},error:o}}throw new cu("You must provide either an email or phone number and a type")}catch(n){if(re(n))return{data:{user:null,session:null},error:n};throw n}}async getSession(){return await this.initializePromise,await this._acquireLock(-1,async()=>this._useSession(async n=>n))}async _acquireLock(t,n){this._debug("#_acquireLock","begin",t);try{if(this.lockAcquired){const r=this.pendingInLock.length?this.pendingInLock[this.pendingInLock.length-1]:Promise.resolve(),i=(async()=>(await r,await n()))();return this.pendingInLock.push((async()=>{try{await i}catch{}})()),i}return await this.lock(`lock:${this.storageKey}`,t,async()=>{this._debug("#_acquireLock","lock acquired for storage key",this.storageKey);try{this.lockAcquired=!0;const r=n();for(this.pendingInLock.push((async()=>{try{await r}catch{}})()),await r;this.pendingInLock.length;){const i=[...this.pendingInLock];await Promise.all(i),this.pendingInLock.splice(0,i.length)}return await r}finally{this._debug("#_acquireLock","lock released for storage key",this.storageKey),this.lockAcquired=!1}})}finally{this._debug("#_acquireLock","end")}}async _useSession(t){this._debug("#_useSession","begin");try{const n=await this.__loadSession();return await t(n)}finally{this._debug("#_useSession","end")}}async __loadSession(){this._debug("#__loadSession()","begin"),this.lockAcquired||this._debug("#__loadSession()","used outside of an acquired lock!",new Error().stack);try{let t=null;const n=await uu(this.storage,this.storageKey);if(this._debug("#getSession()","session from storage",n),n!==null&&(this._isValidSession(n)?t=n:(this._debug("#getSession()","session from storage is not valid"),await this._removeSession())),!t)return{data:{session:null},error:null};const r=t.expires_at?t.expires_at<=Date.now()/1e3:!1;if(this._debug("#__loadSession()",`session has${r?"":" not"} expired`,"expires_at",t.expires_at),!r){if(this.storage.isServer){const s=this.suppressGetSessionWarning;t=new Proxy(t,{get(l,u,c){return!s&&u==="user"&&console.warn("Using the user object as returned from supabase.auth.getSession() or from some supabase.auth.onAuthStateChange() events could be insecure! This value comes directly from the storage medium (usually cookies on the server) and many not be authentic. Use supabase.auth.getUser() instead which authenticates the data by contacting the Supabase Auth server."),Reflect.get(l,u,c)}})}return{data:{session:t},error:null}}const{session:i,error:a}=await this._callRefreshToken(t.refresh_token);return a?{data:{session:null},error:a}:{data:{session:i},error:null}}finally{this._debug("#__loadSession()","end")}}async getUser(t){return t?await this._getUser(t):(await this.initializePromise,await this._acquireLock(-1,async()=>await this._getUser()))}async _getUser(t){try{return t?await oe(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:t,xform:zr}):await this._useSession(async n=>{var r,i,a;const{data:s,error:o}=n;if(o)throw o;return!(!((r=s.session)===null||r===void 0)&&r.access_token)&&!this.hasCustomAuthorizationHeader?{data:{user:null},error:new xi}:await oe(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:(a=(i=s.session)===null||i===void 0?void 0:i.access_token)!==null&&a!==void 0?a:void 0,xform:zr})})}catch(n){if(re(n))return{data:{user:null},error:n};throw n}}async updateUser(t,n={}){return await this.initializePromise,await this._acquireLock(-1,async()=>await this._updateUser(t,n))}async _updateUser(t,n={}){try{return await this._useSession(async r=>{const{data:i,error:a}=r;if(a)throw a;if(!i.session)throw new xi;const s=i.session;let o=null,l=null;this.flowType==="pkce"&&t.email!=null&&([o,l]=await Da(this.storage,this.storageKey));const{data:u,error:c}=await oe(this.fetch,"PUT",`${this.url}/user`,{headers:this.headers,redirectTo:n==null?void 0:n.emailRedirectTo,body:Object.assign(Object.assign({},t),{code_challenge:o,code_challenge_method:l}),jwt:s.access_token,xform:zr});if(c)throw c;return s.user=u.user,await this._saveSession(s),await this._notifyAllSubscribers("USER_UPDATED",s),{data:{user:s.user},error:null}})}catch(r){if(re(r))return{data:{user:null},error:r};throw r}}_decodeJWT(t){return w2(t)}async setSession(t){return await this.initializePromise,await this._acquireLock(-1,async()=>await this._setSession(t))}async _setSession(t){try{if(!t.access_token||!t.refresh_token)throw new xi;const n=Date.now()/1e3;let r=n,i=!0,a=null;const s=w2(t.access_token);if(s.exp&&(r=s.exp,i=r<=n),i){const{session:o,error:l}=await this._callRefreshToken(t.refresh_token);if(l)return{data:{user:null,session:null},error:l};if(!o)return{data:{user:null,session:null},error:null};a=o}else{const{data:o,error:l}=await this._getUser(t.access_token);if(l)throw l;a={access_token:t.access_token,refresh_token:t.refresh_token,user:o.user,token_type:"bearer",expires_in:r-n,expires_at:r},await this._saveSession(a),await this._notifyAllSubscribers("SIGNED_IN",a)}return{data:{user:a.user,session:a},error:null}}catch(n){if(re(n))return{data:{session:null,user:null},error:n};throw n}}async refreshSession(t){return await this.initializePromise,await this._acquireLock(-1,async()=>await this._refreshSession(t))}async _refreshSession(t){try{return await this._useSession(async n=>{var r;if(!t){const{data:s,error:o}=n;if(o)throw o;t=(r=s.session)!==null&&r!==void 0?r:void 0}if(!(t!=null&&t.refresh_token))throw new xi;const{session:i,error:a}=await this._callRefreshToken(t.refresh_token);return a?{data:{user:null,session:null},error:a}:i?{data:{user:i.user,session:i},error:null}:{data:{user:null,session:null},error:null}})}catch(n){if(re(n))return{data:{user:null,session:null},error:n};throw n}}async _getSessionFromURL(t){try{if(!kn())throw new du("No browser detected.");if(this.flowType==="implicit"&&!this._isImplicitGrantFlow())throw new du("Not a valid implicit grant flow url.");if(this.flowType=="pkce"&&!t)throw new D2("Not a valid PKCE flow url.");const n=Eh(window.location.href);if(t){if(!n.code)throw new D2("No code detected.");const{data:m,error:$}=await this._exchangeCodeForSession(n.code);if($)throw $;const w=new URL(window.location.href);return w.searchParams.delete("code"),window.history.replaceState(window.history.state,"",w.toString()),{data:{session:m.session,redirectType:null},error:null}}if(n.error||n.error_description||n.error_code)throw new du(n.error_description||"Error in URL with unspecified error_description",{error:n.error||"unspecified_error",code:n.error_code||"unspecified_code"});const{provider_token:r,provider_refresh_token:i,access_token:a,refresh_token:s,expires_in:o,expires_at:l,token_type:u}=n;if(!a||!o||!s||!u)throw new du("No session defined in URL");const c=Math.round(Date.now()/1e3),d=parseInt(o);let f=c+d;l&&(f=parseInt(l));const h=f-c;h*1e3<=Ks&&console.warn(`@supabase/gotrue-js: Session as retrieved from URL expires in ${h}s, should have been closer to ${d}s`);const p=f-d;c-p>=120?console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued over 120s ago, URL could be stale",p,f,c):c-p<0&&console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued in the future? Check the device clok for skew",p,f,c);const{data:g,error:b}=await this._getUser(a);if(b)throw b;const v={provider_token:r,provider_refresh_token:i,access_token:a,expires_in:d,expires_at:f,refresh_token:s,token_type:u,user:g.user};return window.location.hash="",this._debug("#_getSessionFromURL()","clearing window.location.hash"),{data:{session:v,redirectType:n.type},error:null}}catch(n){if(re(n))return{data:{session:null,redirectType:null},error:n};throw n}}_isImplicitGrantFlow(){const t=Eh(window.location.href);return!!(kn()&&(t.access_token||t.error_description))}async _isPKCEFlow(){const t=Eh(window.location.href),n=await uu(this.storage,`${this.storageKey}-code-verifier`);return!!(t.code&&n)}async signOut(t={scope:"global"}){return await this.initializePromise,await this._acquireLock(-1,async()=>await this._signOut(t))}async _signOut({scope:t}={scope:"global"}){return await this._useSession(async n=>{var r;const{data:i,error:a}=n;if(a)return{error:a};const s=(r=i.session)===null||r===void 0?void 0:r.access_token;if(s){const{error:o}=await this.admin.signOut(s,t);if(o&&!(kB(o)&&(o.status===404||o.status===401||o.status===403)))return{error:o}}return t!=="others"&&(await this._removeSession(),await Sh(this.storage,`${this.storageKey}-code-verifier`),await this._notifyAllSubscribers("SIGNED_OUT",null)),{error:null}})}onAuthStateChange(t){const n=mB(),r={id:n,callback:t,unsubscribe:()=>{this._debug("#unsubscribe()","state change callback with id removed",n),this.stateChangeEmitters.delete(n)}};return this._debug("#onAuthStateChange()","registered callback with id",n),this.stateChangeEmitters.set(n,r),(async()=>(await this.initializePromise,await this._acquireLock(-1,async()=>{this._emitInitialSession(n)})))(),{data:{subscription:r}}}async _emitInitialSession(t){return await this._useSession(async n=>{var r,i;try{const{data:{session:a},error:s}=n;if(s)throw s;await((r=this.stateChangeEmitters.get(t))===null||r===void 0?void 0:r.callback("INITIAL_SESSION",a)),this._debug("INITIAL_SESSION","callback id",t,"session",a)}catch(a){await((i=this.stateChangeEmitters.get(t))===null||i===void 0?void 0:i.callback("INITIAL_SESSION",null)),this._debug("INITIAL_SESSION","callback id",t,"error",a),console.error(a)}})}async resetPasswordForEmail(t,n={}){let r=null,i=null;this.flowType==="pkce"&&([r,i]=await Da(this.storage,this.storageKey,!0));try{return await oe(this.fetch,"POST",`${this.url}/recover`,{body:{email:t,code_challenge:r,code_challenge_method:i,gotrue_meta_security:{captcha_token:n.captchaToken}},headers:this.headers,redirectTo:n.redirectTo})}catch(a){if(re(a))return{data:null,error:a};throw a}}async getUserIdentities(){var t;try{const{data:n,error:r}=await this.getUser();if(r)throw r;return{data:{identities:(t=n.user.identities)!==null&&t!==void 0?t:[]},error:null}}catch(n){if(re(n))return{data:null,error:n};throw n}}async linkIdentity(t){var n;try{const{data:r,error:i}=await this._useSession(async a=>{var s,o,l,u,c;const{data:d,error:f}=a;if(f)throw f;const h=await this._getUrlForProvider(`${this.url}/user/identities/authorize`,t.provider,{redirectTo:(s=t.options)===null||s===void 0?void 0:s.redirectTo,scopes:(o=t.options)===null||o===void 0?void 0:o.scopes,queryParams:(l=t.options)===null||l===void 0?void 0:l.queryParams,skipBrowserRedirect:!0});return await oe(this.fetch,"GET",h,{headers:this.headers,jwt:(c=(u=d.session)===null||u===void 0?void 0:u.access_token)!==null&&c!==void 0?c:void 0})});if(i)throw i;return kn()&&!(!((n=t.options)===null||n===void 0)&&n.skipBrowserRedirect)&&window.location.assign(r==null?void 0:r.url),{data:{provider:t.provider,url:r==null?void 0:r.url},error:null}}catch(r){if(re(r))return{data:{provider:t.provider,url:null},error:r};throw r}}async unlinkIdentity(t){try{return await this._useSession(async n=>{var r,i;const{data:a,error:s}=n;if(s)throw s;return await oe(this.fetch,"DELETE",`${this.url}/user/identities/${t.identity_id}`,{headers:this.headers,jwt:(i=(r=a.session)===null||r===void 0?void 0:r.access_token)!==null&&i!==void 0?i:void 0})})}catch(n){if(re(n))return{data:null,error:n};throw n}}async _refreshAccessToken(t){const n=`#_refreshAccessToken(${t.substring(0,5)}...)`;this._debug(n,"begin");try{const r=Date.now();return await yB(async i=>(i>0&&await bB(200*Math.pow(2,i-1)),this._debug(n,"refreshing attempt",i),await oe(this.fetch,"POST",`${this.url}/token?grant_type=refresh_token`,{body:{refresh_token:t},headers:this.headers,xform:Fr})),(i,a)=>{const s=200*Math.pow(2,i);return a&&kh(a)&&Date.now()+s-r<Ks})}catch(r){if(this._debug(n,"error",r),re(r))return{data:{session:null,user:null},error:r};throw r}finally{this._debug(n,"end")}}_isValidSession(t){return typeof t=="object"&&t!==null&&"access_token"in t&&"refresh_token"in t&&"expires_at"in t}async _handleProviderSignIn(t,n){const r=await this._getUrlForProvider(`${this.url}/authorize`,t,{redirectTo:n.redirectTo,scopes:n.scopes,queryParams:n.queryParams});return this._debug("#_handleProviderSignIn()","provider",t,"options",n,"url",r),kn()&&!n.skipBrowserRedirect&&window.location.assign(r),{data:{provider:t,url:r},error:null}}async _recoverAndRefresh(){var t;const n="#_recoverAndRefresh()";this._debug(n,"begin");try{const r=await uu(this.storage,this.storageKey);if(this._debug(n,"session from storage",r),!this._isValidSession(r)){this._debug(n,"session is not valid"),r!==null&&await this._removeSession();return}const i=Math.round(Date.now()/1e3),a=((t=r.expires_at)!==null&&t!==void 0?t:1/0)<i+x2;if(this._debug(n,`session has${a?"":" not"} expired with margin of ${x2}s`),a){if(this.autoRefreshToken&&r.refresh_token){const{error:s}=await this._callRefreshToken(r.refresh_token);s&&(console.error(s),kh(s)||(this._debug(n,"refresh failed with a non-retryable error, removing the session",s),await this._removeSession()))}}else await this._notifyAllSubscribers("SIGNED_IN",r)}catch(r){this._debug(n,"error",r),console.error(r);return}finally{this._debug(n,"end")}}async _callRefreshToken(t){var n,r;if(!t)throw new xi;if(this.refreshingDeferred)return this.refreshingDeferred.promise;const i=`#_callRefreshToken(${t.substring(0,5)}...)`;this._debug(i,"begin");try{this.refreshingDeferred=new _f;const{data:a,error:s}=await this._refreshAccessToken(t);if(s)throw s;if(!a.session)throw new xi;await this._saveSession(a.session),await this._notifyAllSubscribers("TOKEN_REFRESHED",a.session);const o={session:a.session,error:null};return this.refreshingDeferred.resolve(o),o}catch(a){if(this._debug(i,"error",a),re(a)){const s={session:null,error:a};return kh(a)||(await this._removeSession(),await this._notifyAllSubscribers("SIGNED_OUT",null)),(n=this.refreshingDeferred)===null||n===void 0||n.resolve(s),s}throw(r=this.refreshingDeferred)===null||r===void 0||r.reject(a),a}finally{this.refreshingDeferred=null,this._debug(i,"end")}}async _notifyAllSubscribers(t,n,r=!0){const i=`#_notifyAllSubscribers(${t})`;this._debug(i,"begin",n,`broadcast = ${r}`);try{this.broadcastChannel&&r&&this.broadcastChannel.postMessage({event:t,session:n});const a=[],s=Array.from(this.stateChangeEmitters.values()).map(async o=>{try{await o.callback(t,n)}catch(l){a.push(l)}});if(await Promise.all(s),a.length>0){for(let o=0;o<a.length;o+=1)console.error(a[o]);throw a[0]}}finally{this._debug(i,"end")}}async _saveSession(t){this._debug("#_saveSession()",t),this.suppressGetSessionWarning=!0,await l8(this.storage,this.storageKey,t)}async _removeSession(){this._debug("#_removeSession()"),await Sh(this.storage,this.storageKey)}_removeVisibilityChangedCallback(){this._debug("#_removeVisibilityChangedCallback()");const t=this.visibilityChangedCallback;this.visibilityChangedCallback=null;try{t&&kn()&&(window!=null&&window.removeEventListener)&&window.removeEventListener("visibilitychange",t)}catch(n){console.error("removing visibilitychange callback failed",n)}}async _startAutoRefresh(){await this._stopAutoRefresh(),this._debug("#_startAutoRefresh()");const t=setInterval(()=>this._autoRefreshTokenTick(),Ks);this.autoRefreshTicker=t,t&&typeof t=="object"&&typeof t.unref=="function"?t.unref():typeof Deno<"u"&&typeof Deno.unrefTimer=="function"&&Deno.unrefTimer(t),setTimeout(async()=>{await this.initializePromise,await this._autoRefreshTokenTick()},0)}async _stopAutoRefresh(){this._debug("#_stopAutoRefresh()");const t=this.autoRefreshTicker;this.autoRefreshTicker=null,t&&clearInterval(t)}async startAutoRefresh(){this._removeVisibilityChangedCallback(),await this._startAutoRefresh()}async stopAutoRefresh(){this._removeVisibilityChangedCallback(),await this._stopAutoRefresh()}async _autoRefreshTokenTick(){this._debug("#_autoRefreshTokenTick()","begin");try{await this._acquireLock(0,async()=>{try{const t=Date.now();try{return await this._useSession(async n=>{const{data:{session:r}}=n;if(!r||!r.refresh_token||!r.expires_at){this._debug("#_autoRefreshTokenTick()","no session");return}const i=Math.floor((r.expires_at*1e3-t)/Ks);this._debug("#_autoRefreshTokenTick()",`access token expires in ${i} ticks, a tick lasts ${Ks}ms, refresh threshold is ${k2} ticks`),i<=k2&&await this._callRefreshToken(r.refresh_token)})}catch(n){console.error("Auto refresh tick failed with error. This is likely a transient error.",n)}}finally{this._debug("#_autoRefreshTokenTick()","end")}})}catch(t){if(t.isAcquireTimeout||t instanceof c8)this._debug("auto refresh token tick lock not available");else throw t}}async _handleVisibilityChange(){if(this._debug("#_handleVisibilityChange()"),!kn()||!(window!=null&&window.addEventListener))return this.autoRefreshToken&&this.startAutoRefresh(),!1;try{this.visibilityChangedCallback=async()=>await this._onVisibilityChanged(!1),window==null||window.addEventListener("visibilitychange",this.visibilityChangedCallback),await this._onVisibilityChanged(!0)}catch(t){console.error("_handleVisibilityChange",t)}}async _onVisibilityChanged(t){const n=`#_onVisibilityChanged(${t})`;this._debug(n,"visibilityState",document.visibilityState),document.visibilityState==="visible"?(this.autoRefreshToken&&this._startAutoRefresh(),t||(await this.initializePromise,await this._acquireLock(-1,async()=>{if(document.visibilityState!=="visible"){this._debug(n,"acquired the lock to recover the session, but the browser visibilityState is no longer visible, aborting");return}await this._recoverAndRefresh()}))):document.visibilityState==="hidden"&&this.autoRefreshToken&&this._stopAutoRefresh()}async _getUrlForProvider(t,n,r){const i=[`provider=${encodeURIComponent(n)}`];if(r!=null&&r.redirectTo&&i.push(`redirect_to=${encodeURIComponent(r.redirectTo)}`),r!=null&&r.scopes&&i.push(`scopes=${encodeURIComponent(r.scopes)}`),this.flowType==="pkce"){const[a,s]=await Da(this.storage,this.storageKey),o=new URLSearchParams({code_challenge:`${encodeURIComponent(a)}`,code_challenge_method:`${encodeURIComponent(s)}`});i.push(o.toString())}if(r!=null&&r.queryParams){const a=new URLSearchParams(r.queryParams);i.push(a.toString())}return r!=null&&r.skipBrowserRedirect&&i.push(`skip_http_redirect=${r.skipBrowserRedirect}`),`${t}?${i.join("&")}`}async _unenroll(t){try{return await this._useSession(async n=>{var r;const{data:i,error:a}=n;return a?{data:null,error:a}:await oe(this.fetch,"DELETE",`${this.url}/factors/${t.factorId}`,{headers:this.headers,jwt:(r=i==null?void 0:i.session)===null||r===void 0?void 0:r.access_token})})}catch(n){if(re(n))return{data:null,error:n};throw n}}async _enroll(t){try{return await this._useSession(async n=>{var r,i;const{data:a,error:s}=n;if(s)return{data:null,error:s};const{data:o,error:l}=await oe(this.fetch,"POST",`${this.url}/factors`,{body:{friendly_name:t.friendlyName,factor_type:t.factorType,issuer:t.issuer},headers:this.headers,jwt:(r=a==null?void 0:a.session)===null||r===void 0?void 0:r.access_token});return l?{data:null,error:l}:(!((i=o==null?void 0:o.totp)===null||i===void 0)&&i.qr_code&&(o.totp.qr_code=`data:image/svg+xml;utf-8,${o.totp.qr_code}`),{data:o,error:null})})}catch(n){if(re(n))return{data:null,error:n};throw n}}async _verify(t){return this._acquireLock(-1,async()=>{try{return await this._useSession(async n=>{var r;const{data:i,error:a}=n;if(a)return{data:null,error:a};const{data:s,error:o}=await oe(this.fetch,"POST",`${this.url}/factors/${t.factorId}/verify`,{body:{code:t.code,challenge_id:t.challengeId},headers:this.headers,jwt:(r=i==null?void 0:i.session)===null||r===void 0?void 0:r.access_token});return o?{data:null,error:o}:(await this._saveSession(Object.assign({expires_at:Math.round(Date.now()/1e3)+s.expires_in},s)),await this._notifyAllSubscribers("MFA_CHALLENGE_VERIFIED",s),{data:s,error:o})})}catch(n){if(re(n))return{data:null,error:n};throw n}})}async _challenge(t){return this._acquireLock(-1,async()=>{try{return await this._useSession(async n=>{var r;const{data:i,error:a}=n;return a?{data:null,error:a}:await oe(this.fetch,"POST",`${this.url}/factors/${t.factorId}/challenge`,{headers:this.headers,jwt:(r=i==null?void 0:i.session)===null||r===void 0?void 0:r.access_token})})}catch(n){if(re(n))return{data:null,error:n};throw n}})}async _challengeAndVerify(t){const{data:n,error:r}=await this._challenge({factorId:t.factorId});return r?{data:null,error:r}:await this._verify({factorId:t.factorId,challengeId:n.id,code:t.code})}async _listFactors(){const{data:{user:t},error:n}=await this.getUser();if(n)return{data:null,error:n};const r=(t==null?void 0:t.factors)||[],i=r.filter(a=>a.factor_type==="totp"&&a.status==="verified");return{data:{all:r,totp:i},error:null}}async _getAuthenticatorAssuranceLevel(){return this._acquireLock(-1,async()=>await this._useSession(async t=>{var n,r;const{data:{session:i},error:a}=t;if(a)return{data:null,error:a};if(!i)return{data:{currentLevel:null,nextLevel:null,currentAuthenticationMethods:[]},error:null};const s=this._decodeJWT(i.access_token);let o=null;s.aal&&(o=s.aal);let l=o;((r=(n=i.user.factors)===null||n===void 0?void 0:n.filter(d=>d.status==="verified"))!==null&&r!==void 0?r:[]).length>0&&(l="aal2");const c=s.amr||[];return{data:{currentLevel:o,nextLevel:l,currentAuthenticationMethods:c},error:null}}))}}ll.nextInstanceID=0;const UB=ll;class HB extends UB{constructor(t){super(t)}}var KB=function(e,t,n,r){function i(a){return a instanceof n?a:new n(function(s){s(a)})}return new(n||(n=Promise))(function(a,s){function o(c){try{u(r.next(c))}catch(d){s(d)}}function l(c){try{u(r.throw(c))}catch(d){s(d)}}function u(c){c.done?a(c.value):i(c.value).then(o,l)}u((r=r.apply(e,t||[])).next())})};class YB{constructor(t,n,r){var i,a,s;if(this.supabaseUrl=t,this.supabaseKey=n,!t)throw new Error("supabaseUrl is required.");if(!n)throw new Error("supabaseKey is required.");const o=uB(t);this.realtimeUrl=`${o}/realtime/v1`.replace(/^http/i,"ws"),this.authUrl=`${o}/auth/v1`,this.storageUrl=`${o}/storage/v1`,this.functionsUrl=`${o}/functions/v1`;const l=`sb-${new URL(this.authUrl).hostname.split(".")[0]}-auth-token`,u={db:nB,realtime:iB,auth:Object.assign(Object.assign({},rB),{storageKey:l}),global:tB},c=cB(r??{},u);this.storageKey=(i=c.auth.storageKey)!==null&&i!==void 0?i:"",this.headers=(a=c.global.headers)!==null&&a!==void 0?a:{},this.auth=this._initSupabaseAuthClient((s=c.auth)!==null&&s!==void 0?s:{},this.headers,c.global.fetch),this.fetch=lB(n,this._getAccessToken.bind(this),c.global.fetch),this.realtime=this._initRealtimeClient(Object.assign({headers:this.headers},c.realtime)),this.rest=new EO(`${o}/rest/v1`,{headers:this.headers,schema:c.db.schema,fetch:this.fetch}),this._listenForAuthEvents()}get functions(){return new tO(this.functionsUrl,{headers:this.headers,customFetch:this.fetch})}get storage(){return new QO(this.storageUrl,this.headers,this.fetch)}from(t){return this.rest.from(t)}schema(t){return this.rest.schema(t)}rpc(t,n={},r={}){return this.rest.rpc(t,n,r)}channel(t,n={config:{}}){return this.realtime.channel(t,n)}getChannels(){return this.realtime.getChannels()}removeChannel(t){return this.realtime.removeChannel(t)}removeAllChannels(){return this.realtime.removeAllChannels()}_getAccessToken(){var t,n;return KB(this,void 0,void 0,function*(){const{data:r}=yield this.auth.getSession();return(n=(t=r.session)===null||t===void 0?void 0:t.access_token)!==null&&n!==void 0?n:null})}_initSupabaseAuthClient({autoRefreshToken:t,persistSession:n,detectSessionInUrl:r,storage:i,storageKey:a,flowType:s,debug:o},l,u){var c;const d={Authorization:`Bearer ${this.supabaseKey}`,apikey:`${this.supabaseKey}`};return new HB({url:this.authUrl,headers:Object.assign(Object.assign({},d),l),storageKey:a,autoRefreshToken:t,persistSession:n,detectSessionInUrl:r,storage:i,flowType:s,debug:o,fetch:u,hasCustomAuthorizationHeader:(c="Authorization"in this.headers)!==null&&c!==void 0?c:!1})}_initRealtimeClient(t){return new NO(this.realtimeUrl,Object.assign(Object.assign({},t),{params:Object.assign({apikey:this.supabaseKey},t==null?void 0:t.params)}))}_listenForAuthEvents(){return this.auth.onAuthStateChange((n,r)=>{this._handleTokenChanged(n,"CLIENT",r==null?void 0:r.access_token)})}_handleTokenChanged(t,n,r){(t==="TOKEN_REFRESHED"||t==="SIGNED_IN")&&this.changedAccessToken!==r?(this.realtime.setAuth(r??null),this.changedAccessToken=r):t==="SIGNED_OUT"&&(this.realtime.setAuth(this.supabaseKey),n=="STORAGE"&&this.auth.signOut(),this.changedAccessToken=void 0)}}const qB=(e,t,n)=>new YB(e,t,n);function ne(e,t,n,r){Object.defineProperty(e,t,{get:n,set:r,enumerable:!0,configurable:!0})}var Z={};ne(Z,"focus-ring",()=>Em,e=>Em=e);ne(Z,"i18nFontFamily",()=>jc,e=>jc=e);ne(Z,"is-active",()=>Sm,e=>Sm=e);ne(Z,"is-disabled",()=>Cm,e=>Cm=e);ne(Z,"is-focused",()=>km,e=>km=e);ne(Z,"is-hovered",()=>Pm,e=>Pm=e);ne(Z,"is-open",()=>Tm,e=>Tm=e);ne(Z,"is-placeholder",()=>Rm,e=>Rm=e);ne(Z,"is-selected",()=>Mm,e=>Mm=e);ne(Z,"spectrum-BaseButton",()=>li,e=>li=e);ne(Z,"spectrum-FocusRing-ring",()=>zc,e=>zc=e);ne(Z,"spectrum-FocusRing",()=>ui,e=>ui=e);ne(Z,"spectrum-ActionButton",()=>Fm,e=>Fm=e);ne(Z,"spectrum-ActionButton--emphasized",()=>Am,e=>Am=e);ne(Z,"spectrum-ActionButton--quiet",()=>Om,e=>Om=e);ne(Z,"spectrum-ActionButton--staticBlack",()=>Bm,e=>Bm=e);ne(Z,"spectrum-ActionButton--staticColor",()=>Im,e=>Im=e);ne(Z,"spectrum-ActionButton--staticWhite",()=>Lm,e=>Lm=e);ne(Z,"spectrum-ActionButton-hold",()=>Nm,e=>Nm=e);ne(Z,"spectrum-ActionButton-label",()=>jm,e=>jm=e);ne(Z,"spectrum-ActionGroup-itemIcon",()=>zm,e=>zm=e);ne(Z,"spectrum-Button",()=>Vm,e=>Vm=e);ne(Z,"spectrum-Button--iconOnly",()=>Wm,e=>Wm=e);ne(Z,"spectrum-Button--overBackground",()=>Um,e=>Um=e);ne(Z,"spectrum-Button--pending",()=>Hm,e=>Hm=e);ne(Z,"spectrum-Button-circleLoader",()=>Km,e=>Km=e);ne(Z,"spectrum-Button-label",()=>Ym,e=>Ym=e);ne(Z,"spectrum-ClearButton",()=>qm,e=>qm=e);ne(Z,"spectrum-ClearButton--overBackground",()=>Gm,e=>Gm=e);ne(Z,"spectrum-ClearButton--small",()=>Zm,e=>Zm=e);ne(Z,"spectrum-FieldButton",()=>Xm,e=>Xm=e);ne(Z,"spectrum-FieldButton--invalid",()=>Qm,e=>Qm=e);ne(Z,"spectrum-FocusRing--quiet",()=>Vc,e=>Vc=e);ne(Z,"spectrum-FieldButton--quiet",()=>Jm,e=>Jm=e);ne(Z,"spectrum-Icon",()=>eg,e=>eg=e);ne(Z,"spectrum-LogicButton",()=>tg,e=>tg=e);ne(Z,"spectrum-LogicButton--and",()=>ng,e=>ng=e);ne(Z,"spectrum-LogicButton--or",()=>rg,e=>rg=e);var Em,jc,Sm,Cm,km,Pm,Tm,Rm,Mm,li,zc,ui,Fm,Am,Om,Bm,Im,Lm,Nm,jm,zm,Vm,Wm,Um,Hm,Km,Ym,qm,Gm,Zm,Xm,Qm,Vc,Jm,eg,tg,ng,rg;Em="Dniwja_focus-ring";jc="Dniwja_i18nFontFamily";Sm="Dniwja_is-active";Cm="Dniwja_is-disabled";km="Dniwja_is-focused";Pm="Dniwja_is-hovered";Tm="Dniwja_is-open";Rm="Dniwja_is-placeholder";Mm="Dniwja_is-selected";li=`Dniwja_spectrum-BaseButton ${jc}`;zc="Dniwja_spectrum-FocusRing-ring";ui=`Dniwja_spectrum-FocusRing ${zc}`;Fm=`Dniwja_spectrum-ActionButton ${li} ${ui}`;Am="Dniwja_spectrum-ActionButton--emphasized";Om="Dniwja_spectrum-ActionButton--quiet";Bm="Dniwja_spectrum-ActionButton--staticBlack";Im="Dniwja_spectrum-ActionButton--staticColor";Lm="Dniwja_spectrum-ActionButton--staticWhite";Nm="Dniwja_spectrum-ActionButton-hold";jm="Dniwja_spectrum-ActionButton-label";zm="Dniwja_spectrum-ActionGroup-itemIcon";Vm=`Dniwja_spectrum-Button ${li} ${ui}`;Wm="Dniwja_spectrum-Button--iconOnly";Um="Dniwja_spectrum-Button--overBackground";Hm="Dniwja_spectrum-Button--pending";Km="Dniwja_spectrum-Button-circleLoader";Ym="Dniwja_spectrum-Button-label";qm=`Dniwja_spectrum-ClearButton ${li} ${ui}`;Gm="Dniwja_spectrum-ClearButton--overBackground";Zm="Dniwja_spectrum-ClearButton--small";Xm=`Dniwja_spectrum-FieldButton ${li} ${ui}`;Qm="Dniwja_spectrum-FieldButton--invalid";Vc="Dniwja_spectrum-FocusRing--quiet";Jm=`Dniwja_spectrum-FieldButton--quiet ${Vc}`;eg="Dniwja_spectrum-Icon";tg=`Dniwja_spectrum-LogicButton ${li} ${ui}`;ng="Dniwja_spectrum-LogicButton--and";rg="Dniwja_spectrum-LogicButton--or";function d8(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=d8(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Ef(){for(var e,t,n=0,r="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=d8(e))&&(r&&(r+=" "),r+=t);return r}let fu=!1;function V(e,...t){let n=[];for(let r of t)if(typeof r=="object"&&r){let i={};for(let a in r)e[a]&&(i[e[a]]=r[a]),e[a]||(i[a]=r[a]);n.push(i)}else typeof r=="string"?(e[r]&&n.push(e[r]),e[r]||n.push(r)):n.push(r);return Ef(...n)}const Wc={prefix:String(Math.round(Math.random()*1e10)),current:0},f8=_.createContext(Wc),GB=_.createContext(!1);let ZB=!!(typeof window<"u"&&window.document&&window.document.createElement),Ph=new WeakMap;function XB(e=!1){let t=y.useContext(f8),n=y.useRef(null);if(n.current===null&&!e){var r,i;let a=(i=_.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED)===null||i===void 0||(r=i.ReactCurrentOwner)===null||r===void 0?void 0:r.current;if(a){let s=Ph.get(a);s==null?Ph.set(a,{id:t.current,state:a.memoizedState}):a.memoizedState!==s.state&&(t.current=s.id,Ph.delete(a))}n.current=++t.current}return n.current}function QB(e){let t=y.useContext(f8);t===Wc&&!ZB&&console.warn("When server rendering, you must wrap your application in an <SSRProvider> to ensure consistent ids are generated between the client and server.");let n=XB(!!e),r=`react-aria${t.prefix}`;return e||`${r}-${n}`}function JB(e){let t=_.useId(),[n]=y.useState(pa()),r=n?"react-aria":`react-aria${Wc.prefix}`;return e||`${r}-${t}`}const eI=typeof _.useId=="function"?JB:QB;function tI(){return!1}function nI(){return!0}function rI(e){return()=>{}}function pa(){return typeof _.useSyncExternalStore=="function"?_.useSyncExternalStore(rI,tI,nI):y.useContext(GB)}function ig(e){let t=typeof window<"u"&&typeof window.matchMedia=="function",[n,r]=y.useState(()=>t?window.matchMedia(e).matches:!1);return y.useEffect(()=>{if(!t)return;let a=window.matchMedia(e),s=o=>{r(o.matches)};return a.addListener(s),()=>{a.removeListener(s)}},[t,e]),pa()?!1:n}function Sf(e){return{UNSAFE_getDOMNode(){return e.current}}}function iI(e,t=e){return{...Sf(e),focus(){t.current&&t.current.focus()}}}function Nn(e){let t=y.useRef(null);return y.useImperativeHandle(e,()=>Sf(t)),t}function h8(e,t){let n=y.useRef(null);return y.useImperativeHandle(e,()=>iI(n,t)),n}function hu(e){return{get current(){return e.current&&e.current.UNSAFE_getDOMNode()}}}const o$=_.createContext(null);o$.displayName="BreakpointContext";function aI(e){let{children:t,matchedBreakpoints:n}=e;return _.createElement(o$.Provider,{value:{matchedBreakpoints:n}},t)}function sI(e){let t=Object.entries(e).sort(([,l],[,u])=>u-l),n=t.map(([,l])=>`(min-width: ${l}px)`),r=typeof window<"u"&&typeof window.matchMedia=="function",i=()=>{let l=[];for(let u in n){let c=n[u];window.matchMedia(c).matches&&l.push(t[u][0])}return l.push("base"),l},[a,s]=y.useState(()=>r?i():["base"]);return y.useEffect(()=>{if(!r)return;let l=()=>{const u=i();s(c=>c.length!==u.length||c.some((d,f)=>d!==u[f])?[...u]:c)};return window.addEventListener("resize",l),()=>{window.removeEventListener("resize",l)}},[r]),pa()?["base"]:a}function p8(){return y.useContext(o$)}const oI=new Set(["Arab","Syrc","Samr","Mand","Thaa","Mend","Nkoo","Adlm","Rohg","Hebr"]),lI=new Set(["ae","ar","arc","bcc","bqi","ckb","dv","fa","glk","he","ku","mzn","nqo","pnb","ps","sd","ug","ur","yi"]);function m8(e){if(Intl.Locale){let n=new Intl.Locale(e).maximize(),r=typeof n.getTextInfo=="function"?n.getTextInfo():n.textInfo;if(r)return r.direction==="rtl";if(n.script)return oI.has(n.script)}let t=e.split("-")[0];return lI.has(t)}const uI=Symbol.for("react-aria.i18n.locale");function g8(){let e=typeof window<"u"&&window[uI]||typeof navigator<"u"&&(navigator.language||navigator.userLanguage)||"en-US";try{Intl.DateTimeFormat.supportedLocalesOf([e])}catch{e="en-US"}return{locale:e,direction:m8(e)?"rtl":"ltr"}}let ag=g8(),po=new Set;function T2(){ag=g8();for(let e of po)e(ag)}function v8(){let e=pa(),[t,n]=y.useState(ag);return y.useEffect(()=>(po.size===0&&window.addEventListener("languagechange",T2),po.add(n),()=>{po.delete(n),po.size===0&&window.removeEventListener("languagechange",T2)}),[]),e?{locale:"en-US",direction:"ltr"}:t}const b8=_.createContext(null);function cI(e){let{locale:t,children:n}=e,r=v8(),i=_.useMemo(()=>t?{locale:t,direction:m8(t)?"rtl":"ltr"}:r,[r,t]);return _.createElement(b8.Provider,{value:i},n)}function Qe(){let e=v8();return y.useContext(b8)||e}const dI=Symbol.for("react-aria.i18n.locale"),fI=Symbol.for("react-aria.i18n.strings");let Ea;class gi{getStringForLocale(t,n){let i=this.getStringsForLocale(n)[t];if(!i)throw new Error(`Could not find intl message ${t} in ${n} locale`);return i}getStringsForLocale(t){let n=this.strings[t];return n||(n=hI(t,this.strings,this.defaultLocale),this.strings[t]=n),n}static getGlobalDictionaryForPackage(t){if(typeof window>"u")return null;let n=window[dI];if(Ea===void 0){let i=window[fI];if(!i)return null;Ea={};for(let a in i)Ea[a]=new gi({[n]:i[a]},n)}let r=Ea==null?void 0:Ea[t];if(!r)throw new Error(`Strings for package "${t}" were not included by LocalizedStringProvider. Please add it to the list passed to createLocalizedStringDictionary.`);return r}constructor(t,n="en-US"){this.strings=Object.fromEntries(Object.entries(t).filter(([,r])=>r)),this.defaultLocale=n}}function hI(e,t,n="en-US"){if(t[e])return t[e];let r=pI(e);if(t[r])return t[r];for(let i in t)if(i.startsWith(r+"-"))return t[i];return t[n]}function pI(e){return Intl.Locale?new Intl.Locale(e).language:e.split("-")[0]}const R2=new Map,M2=new Map;class y8{format(t,n){let r=this.strings.getStringForLocale(t,this.locale);return typeof r=="function"?r(n,this):r}plural(t,n,r="cardinal"){let i=n["="+t];if(i)return typeof i=="function"?i():i;let a=this.locale+":"+r,s=R2.get(a);s||(s=new Intl.PluralRules(this.locale,{type:r}),R2.set(a,s));let o=s.select(t);return i=n[o]||n.other,typeof i=="function"?i():i}number(t){let n=M2.get(this.locale);return n||(n=new Intl.NumberFormat(this.locale),M2.set(this.locale,n)),n.format(t)}select(t,n){let r=t[n]||t.other;return typeof r=="function"?r():r}constructor(t,n){this.locale=t,this.strings=n}}const F2=new WeakMap;function mI(e){let t=F2.get(e);return t||(t=new gi(e),F2.set(e,t)),t}function $8(e,t){return t&&gi.getGlobalDictionaryForPackage(t)||mI(e)}function Sn(e,t){let{locale:n}=Qe(),r=$8(e,t);return y.useMemo(()=>new y8(n,r),[n,r])}function is(e,t){return e-t*Math.floor(e/t)}const x8=1721426;function Vi(e,t,n,r){t=Bl(e,t);let i=t-1,a=-2;return n<=2?a=0:Hr(t)&&(a=-1),x8-1+365*i+Math.floor(i/4)-Math.floor(i/100)+Math.floor(i/400)+Math.floor((367*n-362)/12+a+r)}function Hr(e){return e%4===0&&(e%100!==0||e%400===0)}function Bl(e,t){return e==="BC"?1-t:t}function Cf(e){let t="AD";return e<=0&&(t="BC",e=1-e),[t,e]}const gI={standard:[31,28,31,30,31,30,31,31,30,31,30,31],leapyear:[31,29,31,30,31,30,31,31,30,31,30,31]};class Ft{fromJulianDay(t){let n=t,r=n-x8,i=Math.floor(r/146097),a=is(r,146097),s=Math.floor(a/36524),o=is(a,36524),l=Math.floor(o/1461),u=is(o,1461),c=Math.floor(u/365),d=i*400+s*100+l*4+c+(s!==4&&c!==4?1:0),[f,h]=Cf(d),p=n-Vi(f,h,1,1),g=2;n<Vi(f,h,3,1)?g=0:Hr(h)&&(g=1);let b=Math.floor(((p+g)*12+373)/367),v=n-Vi(f,h,b,1)+1;return new Je(f,h,b,v)}toJulianDay(t){return Vi(t.era,t.year,t.month,t.day)}getDaysInMonth(t){return gI[Hr(t.year)?"leapyear":"standard"][t.month-1]}getMonthsInYear(t){return 12}getDaysInYear(t){return Hr(t.year)?366:365}getYearsInEra(t){return 9999}getEras(){return["BC","AD"]}isInverseEra(t){return t.era==="BC"}balanceDate(t){t.year<=0&&(t.era=t.era==="BC"?"AD":"BC",t.year=1-t.year)}constructor(){this.identifier="gregory"}}const vI={"001":1,AD:1,AE:6,AF:6,AI:1,AL:1,AM:1,AN:1,AR:1,AT:1,AU:1,AX:1,AZ:1,BA:1,BE:1,BG:1,BH:6,BM:1,BN:1,BY:1,CH:1,CL:1,CM:1,CN:1,CR:1,CY:1,CZ:1,DE:1,DJ:6,DK:1,DZ:6,EC:1,EE:1,EG:6,ES:1,FI:1,FJ:1,FO:1,FR:1,GB:1,GE:1,GF:1,GP:1,GR:1,HR:1,HU:1,IE:1,IQ:6,IR:6,IS:1,IT:1,JO:6,KG:1,KW:6,KZ:1,LB:1,LI:1,LK:1,LT:1,LU:1,LV:1,LY:6,MC:1,MD:1,ME:1,MK:1,MN:1,MQ:1,MV:5,MY:1,NL:1,NO:1,NZ:1,OM:6,PL:1,QA:6,RE:1,RO:1,RS:1,RU:1,SD:6,SE:1,SI:1,SK:1,SM:1,SY:6,TJ:1,TM:1,TR:1,UA:1,UY:1,UZ:1,VA:1,VN:1,XK:1};function Ze(e,t){return t=Oe(t,e.calendar),e.era===t.era&&e.year===t.year&&e.month===t.month&&e.day===t.day}function A2(e,t){return t=Oe(t,e.calendar),e=na(e),t=na(t),e.era===t.era&&e.year===t.year&&e.month===t.month}function sg(e,t){return e.calendar.identifier===t.calendar.identifier&&e.era===t.era&&e.year===t.year&&e.month===t.month&&e.day===t.day}function w8(e,t){return Ze(e,Il(t))}function kf(e,t){let n=e.calendar.toJulianDay(e),r=Math.ceil(n+1-DI(t))%7;return r<0&&(r+=7),r}function D8(e){return hr(Date.now(),e)}function Il(e){return Zt(D8(e))}function _8(e,t){return e.calendar.toJulianDay(e)-t.calendar.toJulianDay(t)}function E8(e,t){return O2(e)-O2(t)}function O2(e){return e.hour*36e5+e.minute*6e4+e.second*1e3+e.millisecond}let Th=null;function Pf(){return Th==null&&(Th=new Intl.DateTimeFormat().resolvedOptions().timeZone),Th}function na(e){return e.subtract({days:e.day-1})}function Uc(e){return e.add({days:e.calendar.getDaysInMonth(e)-e.day})}function bI(e){return na(e.subtract({months:e.month-1}))}function yI(e){return e.calendar.getMinimumMonthInYear?e.calendar.getMinimumMonthInYear(e):1}function $I(e){return e.calendar.getMinimumDayInMonth?e.calendar.getMinimumDayInMonth(e):1}function ul(e,t){let n=kf(e,t);return e.subtract({days:n})}function xI(e,t){return ul(e,t).add({days:6})}const B2=new Map;function wI(e){if(Intl.Locale){let n=B2.get(e);return n||(n=new Intl.Locale(e).maximize().region,n&&B2.set(e,n)),n}let t=e.split("-")[1];return t==="u"?void 0:t}function DI(e){let t=wI(e);return t&&vI[t]||0}function _I(e,t){let n=e.calendar.getDaysInMonth(e);return Math.ceil((kf(na(e),t)+n)/7)}function l$(e,t){return e&&t?e.compare(t)<=0?e:t:e||t}function u$(e,t){return e&&t?e.compare(t)>=0?e:t:e||t}function ws(e){e=Oe(e,new Ft);let t=Bl(e.era,e.year);return S8(t,e.month,e.day,e.hour,e.minute,e.second,e.millisecond)}function S8(e,t,n,r,i,a,s){let o=new Date;return o.setUTCHours(r,i,a,s),o.setUTCFullYear(e,t-1,n),o.getTime()}function og(e,t){if(t==="UTC")return 0;if(e>0&&t===Pf())return new Date(e).getTimezoneOffset()*-6e4;let{year:n,month:r,day:i,hour:a,minute:s,second:o}=C8(e,t);return S8(n,r,i,a,s,o,0)-Math.floor(e/1e3)*1e3}const I2=new Map;function C8(e,t){let n=I2.get(t);n||(n=new Intl.DateTimeFormat("en-US",{timeZone:t,hour12:!1,era:"short",year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"}),I2.set(t,n));let r=n.formatToParts(new Date(e)),i={};for(let a of r)a.type!=="literal"&&(i[a.type]=a.value);return{year:i.era==="BC"||i.era==="B"?-i.year+1:+i.year,month:+i.month,day:+i.day,hour:i.hour==="24"?0:+i.hour,minute:+i.minute,second:+i.second}}const L2=864e5;function EI(e,t,n,r){return(n===r?[n]:[n,r]).filter(a=>SI(e,t,a))}function SI(e,t,n){let r=C8(n,t);return e.year===r.year&&e.month===r.month&&e.day===r.day&&e.hour===r.hour&&e.minute===r.minute&&e.second===r.second}function cr(e,t,n="compatible"){let r=Xn(e);if(t==="UTC")return ws(r);if(t===Pf()&&n==="compatible"){r=Oe(r,new Ft);let l=new Date,u=Bl(r.era,r.year);return l.setFullYear(u,r.month-1,r.day),l.setHours(r.hour,r.minute,r.second,r.millisecond),l.getTime()}let i=ws(r),a=og(i-L2,t),s=og(i+L2,t),o=EI(r,t,i-a,i-s);if(o.length===1)return o[0];if(o.length>1)switch(n){case"compatible":case"earlier":return o[0];case"later":return o[o.length-1];case"reject":throw new RangeError("Multiple possible absolute times found")}switch(n){case"earlier":return Math.min(i-a,i-s);case"compatible":case"later":return Math.max(i-a,i-s);case"reject":throw new RangeError("No such absolute time found")}}function k8(e,t,n="compatible"){return new Date(cr(e,t,n))}function hr(e,t){let n=og(e,t),r=new Date(e+n),i=r.getUTCFullYear(),a=r.getUTCMonth()+1,s=r.getUTCDate(),o=r.getUTCHours(),l=r.getUTCMinutes(),u=r.getUTCSeconds(),c=r.getUTCMilliseconds();return new dl(i,a,s,t,n,o,l,u,c)}function Zt(e){return new Je(e.calendar,e.era,e.year,e.month,e.day)}function Xn(e,t){let n=0,r=0,i=0,a=0;if("timeZone"in e)({hour:n,minute:r,second:i,millisecond:a}=e);else if("hour"in e&&!t)return e;return t&&({hour:n,minute:r,second:i,millisecond:a}=t),new Hc(e.calendar,e.era,e.year,e.month,e.day,n,r,i,a)}function N2(e){return new Nl(e.hour,e.minute,e.second,e.millisecond)}function Oe(e,t){if(e.calendar.identifier===t.identifier)return e;let n=t.fromJulianDay(e.calendar.toJulianDay(e)),r=e.copy();return r.calendar=t,r.era=n.era,r.year=n.year,r.month=n.month,r.day=n.day,ra(r),r}function P8(e,t,n){if(e instanceof dl)return e.timeZone===t?e:kI(e,t);let r=cr(e,t,n);return hr(r,t)}function CI(e){let t=ws(e)-e.offset;return new Date(t)}function kI(e,t){let n=ws(e)-e.offset;return Oe(hr(n,t),e.calendar)}const Ys=36e5;function Tf(e,t){let n=e.copy(),r="hour"in n?F8(n,t):0;lg(n,t.years||0),n.calendar.balanceYearMonth&&n.calendar.balanceYearMonth(n,e),n.month+=t.months||0,ug(n),T8(n),n.day+=(t.weeks||0)*7,n.day+=t.days||0,n.day+=r,PI(n),n.calendar.balanceDate&&n.calendar.balanceDate(n),n.year<1&&(n.year=1,n.month=1,n.day=1);let i=n.calendar.getYearsInEra(n);if(n.year>i){var a,s;let l=(a=(s=n.calendar).isInverseEra)===null||a===void 0?void 0:a.call(s,n);n.year=i,n.month=l?1:n.calendar.getMonthsInYear(n),n.day=l?1:n.calendar.getDaysInMonth(n)}n.month<1&&(n.month=1,n.day=1);let o=n.calendar.getMonthsInYear(n);return n.month>o&&(n.month=o,n.day=n.calendar.getDaysInMonth(n)),n.day=Math.max(1,Math.min(n.calendar.getDaysInMonth(n),n.day)),n}function lg(e,t){var n,r;!((n=(r=e.calendar).isInverseEra)===null||n===void 0)&&n.call(r,e)&&(t=-t),e.year+=t}function ug(e){for(;e.month<1;)lg(e,-1),e.month+=e.calendar.getMonthsInYear(e);let t=0;for(;e.month>(t=e.calendar.getMonthsInYear(e));)e.month-=t,lg(e,1)}function PI(e){for(;e.day<1;)e.month--,ug(e),e.day+=e.calendar.getDaysInMonth(e);for(;e.day>e.calendar.getDaysInMonth(e);)e.day-=e.calendar.getDaysInMonth(e),e.month++,ug(e)}function T8(e){e.month=Math.max(1,Math.min(e.calendar.getMonthsInYear(e),e.month)),e.day=Math.max(1,Math.min(e.calendar.getDaysInMonth(e),e.day))}function ra(e){e.calendar.constrainDate&&e.calendar.constrainDate(e),e.year=Math.max(1,Math.min(e.calendar.getYearsInEra(e),e.year)),T8(e)}function c$(e){let t={};for(let n in e)typeof e[n]=="number"&&(t[n]=-e[n]);return t}function R8(e,t){return Tf(e,c$(t))}function d$(e,t){let n=e.copy();return t.era!=null&&(n.era=t.era),t.year!=null&&(n.year=t.year),t.month!=null&&(n.month=t.month),t.day!=null&&(n.day=t.day),ra(n),n}function cl(e,t){let n=e.copy();return t.hour!=null&&(n.hour=t.hour),t.minute!=null&&(n.minute=t.minute),t.second!=null&&(n.second=t.second),t.millisecond!=null&&(n.millisecond=t.millisecond),M8(n),n}function TI(e){e.second+=Math.floor(e.millisecond/1e3),e.millisecond=pu(e.millisecond,1e3),e.minute+=Math.floor(e.second/60),e.second=pu(e.second,60),e.hour+=Math.floor(e.minute/60),e.minute=pu(e.minute,60);let t=Math.floor(e.hour/24);return e.hour=pu(e.hour,24),t}function M8(e){e.millisecond=Math.max(0,Math.min(e.millisecond,1e3)),e.second=Math.max(0,Math.min(e.second,59)),e.minute=Math.max(0,Math.min(e.minute,59)),e.hour=Math.max(0,Math.min(e.hour,23))}function pu(e,t){let n=e%t;return n<0&&(n+=t),n}function F8(e,t){return e.hour+=t.hours||0,e.minute+=t.minutes||0,e.second+=t.seconds||0,e.millisecond+=t.milliseconds||0,TI(e)}function A8(e,t){let n=e.copy();return F8(n,t),n}function RI(e,t){return A8(e,c$(t))}function f$(e,t,n,r){let i=e.copy();switch(t){case"era":{let o=e.calendar.getEras(),l=o.indexOf(e.era);if(l<0)throw new Error("Invalid era: "+e.era);l=pr(l,n,0,o.length-1,r==null?void 0:r.round),i.era=o[l],ra(i);break}case"year":var a,s;!((a=(s=i.calendar).isInverseEra)===null||a===void 0)&&a.call(s,i)&&(n=-n),i.year=pr(e.year,n,-1/0,9999,r==null?void 0:r.round),i.year===-1/0&&(i.year=1),i.calendar.balanceYearMonth&&i.calendar.balanceYearMonth(i,e);break;case"month":i.month=pr(e.month,n,1,e.calendar.getMonthsInYear(e),r==null?void 0:r.round);break;case"day":i.day=pr(e.day,n,1,e.calendar.getDaysInMonth(e),r==null?void 0:r.round);break;default:throw new Error("Unsupported field "+t)}return e.calendar.balanceDate&&e.calendar.balanceDate(i),ra(i),i}function h$(e,t,n,r){let i=e.copy();switch(t){case"hour":{let a=e.hour,s=0,o=23;if((r==null?void 0:r.hourCycle)===12){let l=a>=12;s=l?12:0,o=l?23:11}i.hour=pr(a,n,s,o,r==null?void 0:r.round);break}case"minute":i.minute=pr(e.minute,n,0,59,r==null?void 0:r.round);break;case"second":i.second=pr(e.second,n,0,59,r==null?void 0:r.round);break;case"millisecond":i.millisecond=pr(e.millisecond,n,0,999,r==null?void 0:r.round);break;default:throw new Error("Unsupported field "+t)}return i}function pr(e,t,n,r,i=!1){if(i){e+=Math.sign(t),e<n&&(e=r);let a=Math.abs(t);t>0?e=Math.ceil(e/a)*a:e=Math.floor(e/a)*a,e>r&&(e=n)}else e+=t,e<n?e=r-(n-e-1):e>r&&(e=n+(e-r-1));return e}function O8(e,t){let n;if(t.years!=null&&t.years!==0||t.months!=null&&t.months!==0||t.weeks!=null&&t.weeks!==0||t.days!=null&&t.days!==0){let i=Tf(Xn(e),{years:t.years,months:t.months,weeks:t.weeks,days:t.days});n=cr(i,e.timeZone)}else n=ws(e)-e.offset;n+=t.milliseconds||0,n+=(t.seconds||0)*1e3,n+=(t.minutes||0)*6e4,n+=(t.hours||0)*36e5;let r=hr(n,e.timeZone);return Oe(r,e.calendar)}function MI(e,t){return O8(e,c$(t))}function FI(e,t,n,r){switch(t){case"hour":{let i=0,a=23;if((r==null?void 0:r.hourCycle)===12){let p=e.hour>=12;i=p?12:0,a=p?23:11}let s=Xn(e),o=Oe(cl(s,{hour:i}),new Ft),l=[cr(o,e.timeZone,"earlier"),cr(o,e.timeZone,"later")].filter(p=>hr(p,e.timeZone).day===o.day)[0],u=Oe(cl(s,{hour:a}),new Ft),c=[cr(u,e.timeZone,"earlier"),cr(u,e.timeZone,"later")].filter(p=>hr(p,e.timeZone).day===u.day).pop(),d=ws(e)-e.offset,f=Math.floor(d/Ys),h=d%Ys;return d=pr(f,n,Math.floor(l/Ys),Math.floor(c/Ys),r==null?void 0:r.round)*Ys+h,Oe(hr(d,e.timeZone),e.calendar)}case"minute":case"second":case"millisecond":return h$(e,t,n,r);case"era":case"year":case"month":case"day":{let i=f$(Xn(e),t,n,r),a=cr(i,e.timeZone);return Oe(hr(a,e.timeZone),e.calendar)}default:throw new Error("Unsupported field "+t)}}function AI(e,t,n){let r=Xn(e),i=cl(d$(r,t),t);if(i.compare(r)===0)return e;let a=cr(i,e.timeZone,n);return Oe(hr(a,e.timeZone),e.calendar)}function B8(e){return`${String(e.hour).padStart(2,"0")}:${String(e.minute).padStart(2,"0")}:${String(e.second).padStart(2,"0")}${e.millisecond?String(e.millisecond/1e3).slice(1):""}`}function I8(e){let t=Oe(e,new Ft);return`${String(t.year).padStart(4,"0")}-${String(t.month).padStart(2,"0")}-${String(t.day).padStart(2,"0")}`}function L8(e){return`${I8(e)}T${B8(e)}`}function OI(e){let t=Math.sign(e)<0?"-":"+";e=Math.abs(e);let n=Math.floor(e/36e5),r=e%36e5/6e4;return`${t}${String(n).padStart(2,"0")}:${String(r).padStart(2,"0")}`}function BI(e){return`${L8(e)}${OI(e.offset)}[${e.timeZone}]`}function II(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Ll(e,t,n){II(e,t),t.set(e,n)}function p$(e){let t=typeof e[0]=="object"?e.shift():new Ft,n;if(typeof e[0]=="string")n=e.shift();else{let s=t.getEras();n=s[s.length-1]}let r=e.shift(),i=e.shift(),a=e.shift();return[t,n,r,i,a]}var LI=new WeakMap;class Je{copy(){return this.era?new Je(this.calendar,this.era,this.year,this.month,this.day):new Je(this.calendar,this.year,this.month,this.day)}add(t){return Tf(this,t)}subtract(t){return R8(this,t)}set(t){return d$(this,t)}cycle(t,n,r){return f$(this,t,n,r)}toDate(t){return k8(this,t)}toString(){return I8(this)}compare(t){return _8(this,t)}constructor(...t){Ll(this,LI,{writable:!0,value:void 0});let[n,r,i,a,s]=p$(t);this.calendar=n,this.era=r,this.year=i,this.month=a,this.day=s,ra(this)}}var NI=new WeakMap;class Nl{copy(){return new Nl(this.hour,this.minute,this.second,this.millisecond)}add(t){return A8(this,t)}subtract(t){return RI(this,t)}set(t){return cl(this,t)}cycle(t,n,r){return h$(this,t,n,r)}toString(){return B8(this)}compare(t){return E8(this,t)}constructor(t=0,n=0,r=0,i=0){Ll(this,NI,{writable:!0,value:void 0}),this.hour=t,this.minute=n,this.second=r,this.millisecond=i,M8(this)}}var jI=new WeakMap;class Hc{copy(){return this.era?new Hc(this.calendar,this.era,this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond):new Hc(this.calendar,this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond)}add(t){return Tf(this,t)}subtract(t){return R8(this,t)}set(t){return d$(cl(this,t),t)}cycle(t,n,r){switch(t){case"era":case"year":case"month":case"day":return f$(this,t,n,r);default:return h$(this,t,n,r)}}toDate(t,n){return k8(this,t,n)}toString(){return L8(this)}compare(t){let n=_8(this,t);return n===0?E8(this,Xn(t)):n}constructor(...t){Ll(this,jI,{writable:!0,value:void 0});let[n,r,i,a,s]=p$(t);this.calendar=n,this.era=r,this.year=i,this.month=a,this.day=s,this.hour=t.shift()||0,this.minute=t.shift()||0,this.second=t.shift()||0,this.millisecond=t.shift()||0,ra(this)}}var zI=new WeakMap;class dl{copy(){return this.era?new dl(this.calendar,this.era,this.year,this.month,this.day,this.timeZone,this.offset,this.hour,this.minute,this.second,this.millisecond):new dl(this.calendar,this.year,this.month,this.day,this.timeZone,this.offset,this.hour,this.minute,this.second,this.millisecond)}add(t){return O8(this,t)}subtract(t){return MI(this,t)}set(t,n){return AI(this,t,n)}cycle(t,n,r){return FI(this,t,n,r)}toDate(){return CI(this)}toString(){return BI(this)}toAbsoluteString(){return this.toDate().toISOString()}compare(t){return this.toDate().getTime()-P8(t,this.timeZone).toDate().getTime()}constructor(...t){Ll(this,zI,{writable:!0,value:void 0});let[n,r,i,a,s]=p$(t),o=t.shift(),l=t.shift();this.calendar=n,this.era=r,this.year=i,this.month=a,this.day=s,this.timeZone=o,this.offset=l,this.hour=t.shift()||0,this.minute=t.shift()||0,this.second=t.shift()||0,this.millisecond=t.shift()||0,ra(this)}}const as=[[1868,9,8],[1912,7,30],[1926,12,25],[1989,1,8],[2019,5,1]],VI=[[1912,7,29],[1926,12,24],[1989,1,7],[2019,4,30]],rc=[1867,1911,1925,1988,2018],Lr=["meiji","taisho","showa","heisei","reiwa"];function j2(e){const t=as.findIndex(([n,r,i])=>e.year<n||e.year===n&&e.month<r||e.year===n&&e.month===r&&e.day<i);return t===-1?as.length-1:t===0?0:t-1}function Rh(e){let t=rc[Lr.indexOf(e.era)];if(!t)throw new Error("Unknown era: "+e.era);return new Je(e.year+t,e.month,e.day)}class WI extends Ft{fromJulianDay(t){let n=super.fromJulianDay(t),r=j2(n);return new Je(this,Lr[r],n.year-rc[r],n.month,n.day)}toJulianDay(t){return super.toJulianDay(Rh(t))}balanceDate(t){let n=Rh(t),r=j2(n);Lr[r]!==t.era&&(t.era=Lr[r],t.year=n.year-rc[r]),this.constrainDate(t)}constrainDate(t){let n=Lr.indexOf(t.era),r=VI[n];if(r!=null){let[i,a,s]=r,o=i-rc[n];t.year=Math.max(1,Math.min(o,t.year)),t.year===o&&(t.month=Math.min(a,t.month),t.month===a&&(t.day=Math.min(s,t.day)))}if(t.year===1&&n>=0){let[,i,a]=as[n];t.month=Math.max(i,t.month),t.month===i&&(t.day=Math.max(a,t.day))}}getEras(){return Lr}getYearsInEra(t){let n=Lr.indexOf(t.era),r=as[n],i=as[n+1];if(i==null)return 9999-r[0]+1;let a=i[0]-r[0];return(t.month<i[1]||t.month===i[1]&&t.day<i[2])&&a++,a}getDaysInMonth(t){return super.getDaysInMonth(Rh(t))}getMinimumMonthInYear(t){let n=z2(t);return n?n[1]:1}getMinimumDayInMonth(t){let n=z2(t);return n&&t.month===n[1]?n[2]:1}constructor(...t){super(...t),this.identifier="japanese"}}function z2(e){if(e.year===1){let t=Lr.indexOf(e.era);return as[t]}}const N8=-543;class UI extends Ft{fromJulianDay(t){let n=super.fromJulianDay(t),r=Bl(n.era,n.year);return new Je(this,r-N8,n.month,n.day)}toJulianDay(t){return super.toJulianDay(V2(t))}getEras(){return["BE"]}getDaysInMonth(t){return super.getDaysInMonth(V2(t))}balanceDate(){}constructor(...t){super(...t),this.identifier="buddhist"}}function V2(e){let[t,n]=Cf(e.year+N8);return new Je(t,n,e.month,e.day)}const Kc=1911;function j8(e){return e.era==="minguo"?e.year+Kc:1-e.year+Kc}function W2(e){let t=e-Kc;return t>0?["minguo",t]:["before_minguo",1-t]}class HI extends Ft{fromJulianDay(t){let n=super.fromJulianDay(t),r=Bl(n.era,n.year),[i,a]=W2(r);return new Je(this,i,a,n.month,n.day)}toJulianDay(t){return super.toJulianDay(U2(t))}getEras(){return["before_minguo","minguo"]}balanceDate(t){let[n,r]=W2(j8(t));t.era=n,t.year=r}isInverseEra(t){return t.era==="before_minguo"}getDaysInMonth(t){return super.getDaysInMonth(U2(t))}getYearsInEra(t){return t.era==="before_minguo"?9999:9999-Kc}constructor(...t){super(...t),this.identifier="roc"}}function U2(e){let[t,n]=Cf(j8(e));return new Je(t,n,e.month,e.day)}const H2=1948320,K2=[0,31,62,93,124,155,186,216,246,276,306,336];class KI{fromJulianDay(t){let n=t-H2,r=1+Math.floor((33*n+3)/12053),i=365*(r-1)+Math.floor((8*r+21)/33),a=n-i,s=a<216?Math.floor(a/31):Math.floor((a-6)/30),o=a-K2[s]+1;return new Je(this,r,s+1,o)}toJulianDay(t){let n=H2-1+365*(t.year-1)+Math.floor((8*t.year+21)/33);return n+=K2[t.month-1],n+=t.day,n}getMonthsInYear(){return 12}getDaysInMonth(t){return t.month<=6?31:t.month<=11||is(25*t.year+11,33)<8?30:29}getEras(){return["AP"]}getYearsInEra(){return 9377}constructor(){this.identifier="persian"}}const Mh=78,Y2=80;class YI extends Ft{fromJulianDay(t){let n=super.fromJulianDay(t),r=n.year-Mh,i=t-Vi(n.era,n.year,1,1),a;i<Y2?(r--,a=Hr(n.year-1)?31:30,i+=a+155+90+10):(a=Hr(n.year)?31:30,i-=Y2);let s,o;if(i<a)s=1,o=i+1;else{let l=i-a;l<155?(s=Math.floor(l/31)+2,o=l%31+1):(l-=155,s=Math.floor(l/30)+7,o=l%30+1)}return new Je(this,r,s,o)}toJulianDay(t){let n=t.year+Mh,[r,i]=Cf(n),a,s;return Hr(i)?(a=31,s=Vi(r,i,3,21)):(a=30,s=Vi(r,i,3,22)),t.month===1?s+t.day-1:(s+=a+Math.min(t.month-2,5)*31,t.month>=8&&(s+=(t.month-7)*30),s+=t.day-1,s)}getDaysInMonth(t){return t.month===1&&Hr(t.year+Mh)||t.month>=2&&t.month<=6?31:30}getYearsInEra(){return 9919}getEras(){return["saka"]}balanceDate(){}constructor(...t){super(...t),this.identifier="indian"}}const Yc=1948440,q2=1948439,pn=1300,Sa=1600,qI=460322;function qc(e,t,n,r){return r+Math.ceil(29.5*(n-1))+(t-1)*354+Math.floor((3+11*t)/30)+e-1}function z8(e,t,n){let r=Math.floor((30*(n-t)+10646)/10631),i=Math.min(12,Math.ceil((n-(29+qc(t,r,1,1)))/29.5)+1),a=n-qc(t,r,i,1)+1;return new Je(e,r,i,a)}function G2(e){return(14+11*e)%30<11}class m${fromJulianDay(t){return z8(this,Yc,t)}toJulianDay(t){return qc(Yc,t.year,t.month,t.day)}getDaysInMonth(t){let n=29+t.month%2;return t.month===12&&G2(t.year)&&n++,n}getMonthsInYear(){return 12}getDaysInYear(t){return G2(t.year)?355:354}getYearsInEra(){return 9665}getEras(){return["AH"]}constructor(){this.identifier="islamic-civil"}}class GI extends m${fromJulianDay(t){return z8(this,q2,t)}toJulianDay(t){return qc(q2,t.year,t.month,t.day)}constructor(...t){super(...t),this.identifier="islamic-tbla"}}const ZI="qgpUDckO1AbqBmwDrQpVBakGkgepC9QF2gpcBS0NlQZKB1QLagutBa4ETwoXBYsGpQbVCtYCWwmdBE0KJg2VDawFtgm6AlsKKwWVCsoG6Qr0AnYJtgJWCcoKpAvSC9kF3AJtCU0FpQpSC6ULtAW2CVcFlwJLBaMGUgdlC2oFqworBZUMSg2lDcoF1gpXCasESwmlClILagt1BXYCtwhbBFUFqQW0BdoJ3QRuAjYJqgpUDbIN1QXaAlsJqwRVCkkLZAtxC7QFtQpVCiUNkg7JDtQG6QprCasEkwpJDaQNsg25CroEWworBZUKKgtVC1wFvQQ9Ah0JlQpKC1oLbQW2AjsJmwRVBqkGVAdqC2wFrQpVBSkLkgupC9QF2gpaBasKlQVJB2QHqgu1BbYCVgpNDiULUgtqC60FrgIvCZcESwalBqwG1gpdBZ0ETQoWDZUNqgW1BdoCWwmtBJUFygbkBuoK9QS2AlYJqgpUC9IL2QXqAm0JrQSVCkoLpQuyBbUJ1gSXCkcFkwZJB1ULagVrCisFiwpGDaMNygXWCtsEawJLCaUKUgtpC3UFdgG3CFsCKwVlBbQF2gntBG0BtgimClINqQ3UBdoKWwmrBFMGKQdiB6kLsgW1ClUFJQuSDckO0gbpCmsFqwRVCikNVA2qDbUJugQ7CpsETQqqCtUK2gJdCV4ELgqaDFUNsga5BroEXQotBZUKUguoC7QLuQXaAloJSgukDdEO6AZqC20FNQWVBkoNqA3UDdoGWwWdAisGFQtKC5ULqgWuCi4JjwwnBZUGqgbWCl0FnQI=";let cg,ss;function ic(e){return qI+ss[e-pn]}function mo(e,t){let n=e-pn,r=1<<11-(t-1);return cg[n]&r?30:29}function Z2(e,t){let n=ic(e);for(let r=1;r<t;r++)n+=mo(e,r);return n}function X2(e){return ss[e+1-pn]-ss[e-pn]}class XI extends m${fromJulianDay(t){let n=t-Yc,r=ic(pn),i=ic(Sa);if(n<r||n>i)return super.fromJulianDay(t);{let a=pn-1,s=1,o=1;for(;o>0;){a++,o=n-ic(a)+1;let l=X2(a);if(o===l){s=12;break}else if(o<l){let u=mo(a,s);for(s=1;o>u;)o-=u,s++,u=mo(a,s);break}}return new Je(this,a,s,n-Z2(a,s)+1)}}toJulianDay(t){return t.year<pn||t.year>Sa?super.toJulianDay(t):Yc+Z2(t.year,t.month)+(t.day-1)}getDaysInMonth(t){return t.year<pn||t.year>Sa?super.getDaysInMonth(t):mo(t.year,t.month)}getDaysInYear(t){return t.year<pn||t.year>Sa?super.getDaysInYear(t):X2(t.year)}constructor(){if(super(),this.identifier="islamic-umalqura",cg||(cg=new Uint16Array(Uint8Array.from(atob(ZI),t=>t.charCodeAt(0)).buffer)),!ss){ss=new Uint32Array(Sa-pn+1);let t=0;for(let n=pn;n<=Sa;n++){ss[n-pn]=t;for(let r=1;r<=12;r++)t+=mo(n,r)}}}}const Q2=347997,V8=1080,W8=24*V8,QI=29,JI=12*V8+793,eL=QI*W8+JI;function Ii(e){return is(e*7+1,19)<7}function ac(e){let t=Math.floor((235*e-234)/19),n=12084+13753*t,r=t*29+Math.floor(n/25920);return is(3*(r+1),7)<3&&(r+=1),r}function tL(e){let t=ac(e-1),n=ac(e);return ac(e+1)-n===356?2:n-t===382?1:0}function Oo(e){return ac(e)+tL(e)}function U8(e){return Oo(e+1)-Oo(e)}function nL(e){let t=U8(e);switch(t>380&&(t-=30),t){case 353:return 0;case 354:return 1;case 355:return 2}}function mu(e,t){if(t>=6&&!Ii(e)&&t++,t===4||t===7||t===9||t===11||t===13)return 29;let n=nL(e);return t===2?n===2?30:29:t===3?n===0?29:30:t===6?Ii(e)?30:0:30}class rL{fromJulianDay(t){let n=t-Q2,r=n*W8/eL,i=Math.floor((19*r+234)/235)+1,a=Oo(i),s=Math.floor(n-a);for(;s<1;)i--,a=Oo(i),s=Math.floor(n-a);let o=1,l=0;for(;l<s;)l+=mu(i,o),o++;o--,l-=mu(i,o);let u=s-l;return new Je(this,i,o,u)}toJulianDay(t){let n=Oo(t.year);for(let r=1;r<t.month;r++)n+=mu(t.year,r);return n+t.day+Q2}getDaysInMonth(t){return mu(t.year,t.month)}getMonthsInYear(t){return Ii(t.year)?13:12}getDaysInYear(t){return U8(t.year)}getYearsInEra(){return 9999}getEras(){return["AM"]}balanceYearMonth(t,n){n.year!==t.year&&(Ii(n.year)&&!Ii(t.year)&&n.month>6?t.month--:!Ii(n.year)&&Ii(t.year)&&n.month>6&&t.month++)}constructor(){this.identifier="hebrew"}}const dg=1723856,J2=1824665,fg=5500;function Gc(e,t,n,r){return e+365*t+Math.floor(t/4)+30*(n-1)+r-1}function g$(e,t){let n=Math.floor(4*(t-e)/1461),r=1+Math.floor((t-Gc(e,n,1,1))/30),i=t+1-Gc(e,n,r,1);return[n,r,i]}function H8(e){return Math.floor(e%4/3)}function K8(e,t){return t%13!==0?30:H8(e)+5}class v${fromJulianDay(t){let[n,r,i]=g$(dg,t),a="AM";return n<=0&&(a="AA",n+=fg),new Je(this,a,n,r,i)}toJulianDay(t){let n=t.year;return t.era==="AA"&&(n-=fg),Gc(dg,n,t.month,t.day)}getDaysInMonth(t){return K8(t.year,t.month)}getMonthsInYear(){return 13}getDaysInYear(t){return 365+H8(t.year)}getYearsInEra(t){return t.era==="AA"?9999:9991}getEras(){return["AA","AM"]}constructor(){this.identifier="ethiopic"}}class iL extends v${fromJulianDay(t){let[n,r,i]=g$(dg,t);return n+=fg,new Je(this,"AA",n,r,i)}getEras(){return["AA"]}getYearsInEra(){return 9999}constructor(...t){super(...t),this.identifier="ethioaa"}}class aL extends v${fromJulianDay(t){let[n,r,i]=g$(J2,t),a="CE";return n<=0&&(a="BCE",n=1-n),new Je(this,a,n,r,i)}toJulianDay(t){let n=t.year;return t.era==="BCE"&&(n=1-n),Gc(J2,n,t.month,t.day)}getDaysInMonth(t){let n=t.year;return t.era==="BCE"&&(n=1-n),K8(n,t.month)}isInverseEra(t){return t.era==="BCE"}balanceDate(t){t.year<=0&&(t.era=t.era==="BCE"?"CE":"BCE",t.year=1-t.year)}getEras(){return["BCE","CE"]}getYearsInEra(t){return t.era==="BCE"?9999:9715}constructor(...t){super(...t),this.identifier="coptic"}}function Y8(e){switch(e){case"buddhist":return new UI;case"ethiopic":return new v$;case"ethioaa":return new iL;case"coptic":return new aL;case"hebrew":return new rL;case"indian":return new YI;case"islamic-civil":return new m$;case"islamic-tbla":return new GI;case"islamic-umalqura":return new XI;case"japanese":return new WI;case"persian":return new KI;case"roc":return new HI;case"gregory":default:return new Ft}}let Fh=new Map;class ii{format(t){return this.formatter.format(t)}formatToParts(t){return this.formatter.formatToParts(t)}formatRange(t,n){if(typeof this.formatter.formatRange=="function")return this.formatter.formatRange(t,n);if(n<t)throw new RangeError("End date must be >= start date");return`${this.formatter.format(t)} – ${this.formatter.format(n)}`}formatRangeToParts(t,n){if(typeof this.formatter.formatRangeToParts=="function")return this.formatter.formatRangeToParts(t,n);if(n<t)throw new RangeError("End date must be >= start date");let r=this.formatter.formatToParts(t),i=this.formatter.formatToParts(n);return[...r.map(a=>({...a,source:"startRange"})),{type:"literal",value:" – ",source:"shared"},...i.map(a=>({...a,source:"endRange"}))]}resolvedOptions(){let t=this.formatter.resolvedOptions();return lL()&&(this.resolvedHourCycle||(this.resolvedHourCycle=uL(t.locale,this.options)),t.hourCycle=this.resolvedHourCycle,t.hour12=this.resolvedHourCycle==="h11"||this.resolvedHourCycle==="h12"),t.calendar==="ethiopic-amete-alem"&&(t.calendar="ethioaa"),t}constructor(t,n={}){this.formatter=q8(t,n),this.options=n}}const sL={true:{ja:"h11"},false:{}};function q8(e,t={}){if(typeof t.hour12=="boolean"&&oL()){t={...t};let i=sL[String(t.hour12)][e.split("-")[0]],a=t.hour12?"h12":"h23";t.hourCycle=i??a,delete t.hour12}let n=e+(t?Object.entries(t).sort((i,a)=>i[0]<a[0]?-1:1).join():"");if(Fh.has(n))return Fh.get(n);let r=new Intl.DateTimeFormat(e,t);return Fh.set(n,r),r}let Ah=null;function oL(){return Ah==null&&(Ah=new Intl.DateTimeFormat("en-US",{hour:"numeric",hour12:!1}).format(new Date(2020,2,3,0))==="24"),Ah}let Oh=null;function lL(){return Oh==null&&(Oh=new Intl.DateTimeFormat("fr",{hour:"numeric",hour12:!1}).resolvedOptions().hourCycle==="h12"),Oh}function uL(e,t){if(!t.timeStyle&&!t.hour)return;e=e.replace(/(-u-)?-nu-[a-zA-Z0-9]+/,""),e+=(e.includes("-u-")?"":"-u")+"-nu-latn";let n=q8(e,{...t,timeZone:void 0}),r=parseInt(n.formatToParts(new Date(2020,2,3,0)).find(a=>a.type==="hour").value,10),i=parseInt(n.formatToParts(new Date(2020,2,3,23)).find(a=>a.type==="hour").value,10);if(r===0&&i===23)return"h23";if(r===24&&i===23)return"h24";if(r===0&&i===11)return"h11";if(r===12&&i===11)return"h12";throw new Error("Unexpected hour cycle result")}const he=typeof document<"u"?_.useLayoutEffect:()=>{};function pt(e){const t=y.useRef(null);return he(()=>{t.current=e},[e]),y.useCallback((...n)=>{const r=t.current;return r==null?void 0:r(...n)},[])}function G8(e){let[t,n]=y.useState(e),r=y.useRef(null),i=pt(()=>{if(!r.current)return;let s=r.current.next();if(s.done){r.current=null;return}t===s.value?i():n(s.value)});he(()=>{r.current&&i()});let a=pt(s=>{r.current=s(t),i()});return[t,a]}let cL=!!(typeof window<"u"&&window.document&&window.document.createElement),Zc=new Map;function Qn(e){let[t,n]=y.useState(e),r=y.useRef(null),i=eI(t),a=y.useCallback(s=>{r.current=s},[]);return cL&&Zc.set(i,a),he(()=>{let s=i;return()=>{Zc.delete(s)}},[i]),y.useEffect(()=>{let s=r.current;s&&(r.current=null,n(s))}),i}function dL(e,t){if(e===t)return e;let n=Zc.get(e);if(n)return n(t),t;let r=Zc.get(t);return r?(r(e),e):t}function Xc(e=[]){let t=Qn(),[n,r]=G8(t),i=y.useCallback(()=>{r(function*(){yield t,yield document.getElementById(t)?t:void 0})},[t,r]);return he(i,[t,i,...e]),n}function fl(...e){return(...t)=>{for(let n of e)typeof n=="function"&&n(...t)}}const ye=e=>{var t;return(t=e==null?void 0:e.ownerDocument)!==null&&t!==void 0?t:document},Fn=e=>e&&"window"in e&&e.window===e?e:ye(e).defaultView||window;function de(...e){let t={...e[0]};for(let n=1;n<e.length;n++){let r=e[n];for(let i in r){let a=t[i],s=r[i];typeof a=="function"&&typeof s=="function"&&i[0]==="o"&&i[1]==="n"&&i.charCodeAt(2)>=65&&i.charCodeAt(2)<=90?t[i]=fl(a,s):(i==="className"||i==="UNSAFE_className")&&typeof a=="string"&&typeof s=="string"?t[i]=Ef(a,s):i==="id"&&a&&s?t.id=dL(a,s):t[i]=s!==void 0?s:a}}return t}function fL(...e){return e.length===1?e[0]:t=>{for(let n of e)typeof n=="function"?n(t):n!=null&&(n.current=t)}}const hL=new Set(["id"]),pL=new Set(["aria-label","aria-labelledby","aria-describedby","aria-details"]),mL=new Set(["href","hrefLang","target","rel","download","ping","referrerPolicy"]),gL=/^(data-.*)$/;function Xt(e,t={}){let{labelable:n,isLink:r,propNames:i}=t,a={};for(const s in e)Object.prototype.hasOwnProperty.call(e,s)&&(hL.has(s)||n&&pL.has(s)||r&&mL.has(s)||i!=null&&i.has(s)||gL.test(s))&&(a[s]=e[s]);return a}function Kr(e){if(vL())e.focus({preventScroll:!0});else{let t=bL(e);e.focus(),yL(t)}}let gu=null;function vL(){if(gu==null){gu=!1;try{document.createElement("div").focus({get preventScroll(){return gu=!0,!0}})}catch{}}return gu}function bL(e){let t=e.parentNode,n=[],r=document.scrollingElement||document.documentElement;for(;t instanceof HTMLElement&&t!==r;)(t.offsetHeight<t.scrollHeight||t.offsetWidth<t.scrollWidth)&&n.push({element:t,scrollTop:t.scrollTop,scrollLeft:t.scrollLeft}),t=t.parentNode;return r instanceof HTMLElement&&n.push({element:r,scrollTop:r.scrollTop,scrollLeft:r.scrollLeft}),n}function yL(e){for(let{element:t,scrollTop:n,scrollLeft:r}of e)t.scrollTop=n,t.scrollLeft=r}function Rf(e){var t;return typeof window>"u"||window.navigator==null?!1:((t=window.navigator.userAgentData)===null||t===void 0?void 0:t.brands.some(n=>e.test(n.brand)))||e.test(window.navigator.userAgent)}function b$(e){var t;return typeof window<"u"&&window.navigator!=null?e.test(((t=window.navigator.userAgentData)===null||t===void 0?void 0:t.platform)||window.navigator.platform):!1}function Ds(){return b$(/^Mac/i)}function $L(){return b$(/^iPhone/i)}function Z8(){return b$(/^iPad/i)||Ds()&&navigator.maxTouchPoints>1}function Mf(){return $L()||Z8()}function X8(){return Rf(/AppleWebKit/i)&&!xL()}function xL(){return Rf(/Chrome/i)}function Q8(){return Rf(/Android/i)}function wL(){return Rf(/Firefox/i)}const DL=y.createContext({isNative:!0,open:SL,useHref:e=>e});function _L(e){let{children:t,navigate:n,useHref:r}=e,i=y.useMemo(()=>({isNative:!1,open:(a,s,o,l)=>{J8(a,u=>{EL(u,s)?n(o,l):ia(u,s)})},useHref:r||(a=>a)}),[n,r]);return _.createElement(DL.Provider,{value:i},t)}function EL(e,t){let n=e.getAttribute("target");return(!n||n==="_self")&&e.origin===location.origin&&!e.hasAttribute("download")&&!t.metaKey&&!t.ctrlKey&&!t.altKey&&!t.shiftKey}function ia(e,t,n=!0){var r,i;let{metaKey:a,ctrlKey:s,altKey:o,shiftKey:l}=t;wL()&&(!((i=window.event)===null||i===void 0||(r=i.type)===null||r===void 0)&&r.startsWith("key"))&&e.target==="_blank"&&(Ds()?a=!0:s=!0);let u=X8()&&Ds()&&!Z8()?new KeyboardEvent("keydown",{keyIdentifier:"Enter",metaKey:a,ctrlKey:s,altKey:o,shiftKey:l}):new MouseEvent("click",{metaKey:a,ctrlKey:s,altKey:o,shiftKey:l,bubbles:!0,cancelable:!0});ia.isOpening=n,Kr(e),e.dispatchEvent(u),ia.isOpening=!1}ia.isOpening=!1;function J8(e,t){if(e instanceof HTMLAnchorElement)t(e);else if(e.hasAttribute("data-href")){let n=document.createElement("a");n.href=e.getAttribute("data-href"),e.hasAttribute("data-target")&&(n.target=e.getAttribute("data-target")),e.hasAttribute("data-rel")&&(n.rel=e.getAttribute("data-rel")),e.hasAttribute("data-download")&&(n.download=e.getAttribute("data-download")),e.hasAttribute("data-ping")&&(n.ping=e.getAttribute("data-ping")),e.hasAttribute("data-referrer-policy")&&(n.referrerPolicy=e.getAttribute("data-referrer-policy")),e.appendChild(n),t(n),e.removeChild(n)}}function SL(e,t){J8(e,n=>ia(n,t))}let Aa=new Map,hg=new Set;function e5(){if(typeof window>"u")return;function e(r){return"propertyName"in r}let t=r=>{if(!e(r)||!r.target)return;let i=Aa.get(r.target);i||(i=new Set,Aa.set(r.target,i),r.target.addEventListener("transitioncancel",n,{once:!0})),i.add(r.propertyName)},n=r=>{if(!e(r)||!r.target)return;let i=Aa.get(r.target);if(i&&(i.delete(r.propertyName),i.size===0&&(r.target.removeEventListener("transitioncancel",n),Aa.delete(r.target)),Aa.size===0)){for(let a of hg)a();hg.clear()}};document.body.addEventListener("transitionrun",t),document.body.addEventListener("transitionend",n)}typeof document<"u"&&(document.readyState!=="loading"?e5():document.addEventListener("DOMContentLoaded",e5));function eE(e){requestAnimationFrame(()=>{Aa.size===0?e():hg.add(e)})}function tE(){let e=y.useRef(new Map),t=y.useCallback((i,a,s,o)=>{let l=o!=null&&o.once?(...u)=>{e.current.delete(s),s(...u)}:s;e.current.set(s,{type:a,eventTarget:i,fn:l,options:o}),i.addEventListener(a,s,o)},[]),n=y.useCallback((i,a,s,o)=>{var l;let u=((l=e.current.get(s))===null||l===void 0?void 0:l.fn)||s;i.removeEventListener(a,u,o),e.current.delete(s)},[]),r=y.useCallback(()=>{e.current.forEach((i,a)=>{n(i.eventTarget,i.type,a,i.options)})},[n]);return y.useEffect(()=>r,[r]),{addGlobalListener:t,removeGlobalListener:n,removeAllGlobalListeners:r}}function jl(e,t){let{id:n,"aria-label":r,"aria-labelledby":i}=e;return n=Qn(n),i&&r?i=[...new Set([n,...i.trim().split(/\s+/)])].join(" "):i&&(i=i.trim().split(/\s+/).join(" ")),!r&&!i&&t&&(r=t),{id:n,"aria-label":r,"aria-labelledby":i}}function CL(e){const t=y.useRef(null);return y.useMemo(()=>({get current(){return t.current},set current(n){t.current=n,typeof e=="function"?e(n):e&&(e.current=n)}}),[e])}function t5(e,t){const n=y.useRef(!0),r=y.useRef(null);y.useEffect(()=>(n.current=!0,()=>{n.current=!1}),[]),y.useEffect(()=>{n.current?n.current=!1:(!r.current||t.some((i,a)=>!Object.is(i,r[a])))&&e(),r.current=t},t)}function kL(){return typeof window.ResizeObserver<"u"}function nE(e){const{ref:t,onResize:n}=e;y.useEffect(()=>{let r=t==null?void 0:t.current;if(r)if(kL()){const i=new window.ResizeObserver(a=>{a.length&&n()});return i.observe(r),()=>{r&&i.unobserve(r)}}else return window.addEventListener("resize",n,!1),()=>{window.removeEventListener("resize",n,!1)}},[n,t])}function y$(e,t){he(()=>{if(e&&e.ref&&t)return e.ref.current=t.current,()=>{e.ref&&(e.ref.current=null)}})}function pg(e,t){let n=window.getComputedStyle(e),r=/(auto|scroll)/.test(n.overflow+n.overflowX+n.overflowY);return r&&t&&(r=e.scrollHeight!==e.clientHeight||e.scrollWidth!==e.clientWidth),r}function Ff(e,t){let n=e;for(pg(n,t)&&(n=n.parentElement);n&&!pg(n,t);)n=n.parentElement;return n||document.scrollingElement||document.documentElement}function PL(e,t){const n=[];for(;e&&e!==document.documentElement;)pg(e,t)&&n.push(e),e=e.parentElement;return n}let mn=typeof document<"u"&&window.visualViewport;function rE(){let e=pa(),[t,n]=y.useState(()=>e?{width:0,height:0}:n5());return y.useEffect(()=>{let r=()=>{n(i=>{let a=n5();return a.width===i.width&&a.height===i.height?i:a})};return mn?mn.addEventListener("resize",r):window.addEventListener("resize",r),()=>{mn?mn.removeEventListener("resize",r):window.removeEventListener("resize",r)}},[]),t}function n5(){return{width:mn&&(mn==null?void 0:mn.width)||window.innerWidth,height:mn&&(mn==null?void 0:mn.height)||window.innerHeight}}let TL=0;const Bh=new Map;function $$(e){let[t,n]=y.useState();return he(()=>{if(!e)return;let r=Bh.get(e);if(r)n(r.element.id);else{let i=`react-aria-description-${TL++}`;n(i);let a=document.createElement("div");a.id=i,a.style.display="none",a.textContent=e,document.body.appendChild(a),r={refCount:0,element:a},Bh.set(e,r)}return r.refCount++,()=>{r&&--r.refCount===0&&(r.element.remove(),Bh.delete(e))}},[e]),{"aria-describedby":e?t:void 0}}function os(e,t,n,r){let i=pt(n),a=n==null;y.useEffect(()=>{if(a||!e.current)return;let s=e.current;return s.addEventListener(t,i,r),()=>{s.removeEventListener(t,i,r)}},[e,t,r,a,i])}function RL(e,t){let n=r5(e,t,"left"),r=r5(e,t,"top"),i=t.offsetWidth,a=t.offsetHeight,s=e.scrollLeft,o=e.scrollTop,{borderTopWidth:l,borderLeftWidth:u}=getComputedStyle(e),c=e.scrollLeft+parseInt(u,10),d=e.scrollTop+parseInt(l,10),f=c+e.clientWidth,h=d+e.clientHeight;n<=s?s=n-parseInt(u,10):n+i>f&&(s+=n+i-f),r<=d?o=r-parseInt(l,10):r+a>h&&(o+=r+a-h),e.scrollLeft=s,e.scrollTop=o}function r5(e,t,n){const r=n==="left"?"offsetLeft":"offsetTop";let i=0;for(;t.offsetParent&&(i+=t[r],t.offsetParent!==e);){if(t.offsetParent.contains(e)){i-=e[r];break}t=t.offsetParent}return i}function iE(e,t){if(document.contains(e)){let s=document.scrollingElement||document.documentElement;if(window.getComputedStyle(s).overflow==="hidden"){let l=PL(e);for(let u of l)RL(u,e)}else{var n;let{left:l,top:u}=e.getBoundingClientRect();e==null||(n=e.scrollIntoView)===null||n===void 0||n.call(e,{block:"nearest"});let{left:c,top:d}=e.getBoundingClientRect();if(Math.abs(l-c)>1||Math.abs(u-d)>1){var r,i,a;t==null||(i=t.containingElement)===null||i===void 0||(r=i.scrollIntoView)===null||r===void 0||r.call(i,{block:"center",inline:"center"}),(a=e.scrollIntoView)===null||a===void 0||a.call(e,{block:"nearest"})}}}}function mg(e){return e.mozInputSource===0&&e.isTrusted?!0:Q8()&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function ML(e){return!Q8()&&e.width===0&&e.height===0||e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType==="mouse"}function aE(e,t){let n=y.useRef(null);return e&&n.current&&t(e,n.current)&&(e=n.current),n.current=e,e}function FL(e,t,n){let r=y.useRef(t),i=pt(()=>{n&&n(r.current)});y.useEffect(()=>{var a;let s=e==null||(a=e.current)===null||a===void 0?void 0:a.form;return s==null||s.addEventListener("reset",i),()=>{s==null||s.removeEventListener("reset",i)}},[e,i])}function aa(e,t,n){let[r,i]=y.useState(e||t),a=y.useRef(e!==void 0),s=e!==void 0;y.useEffect(()=>{let u=a.current;u!==s&&console.warn(`WARN: A component changed from ${u?"controlled":"uncontrolled"} to ${s?"controlled":"uncontrolled"}.`),a.current=s},[s]);let o=s?e:r,l=y.useCallback((u,...c)=>{let d=(f,...h)=>{n&&(Object.is(o,f)||n(f,...h)),s||(o=f)};typeof u=="function"?(console.warn("We can not support a function callback. See Github Issues for details https://github.com/adobe/react-spectrum/issues/2320"),i((h,...p)=>{let g=u(s?o:h,...p);return d(g,...c),s?h:g})):(s||i(u),d(u,...c))},[s,o,n]);return[o,l]}function gg(e,t=-1/0,n=1/0){return Math.min(Math.max(e,t),n)}function xn(e){e=aE(e??{},AL);let{locale:t}=Qe();return y.useMemo(()=>new ii(t,e),[t,e])}function AL(e,t){if(e===t)return!0;let n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let i of n)if(t[i]!==e[i])return!1;return!0}let Ih=new Map,vg=!1;try{vg=new Intl.NumberFormat("de-DE",{signDisplay:"exceptZero"}).resolvedOptions().signDisplay==="exceptZero"}catch{}let Qc=!1;try{Qc=new Intl.NumberFormat("de-DE",{style:"unit",unit:"degree"}).resolvedOptions().style==="unit"}catch{}const sE={degree:{narrow:{default:"°","ja-JP":" 度","zh-TW":"度","sl-SI":" °"}}};class OL{format(t){let n="";if(!vg&&this.options.signDisplay!=null?n=IL(this.numberFormatter,this.options.signDisplay,t):n=this.numberFormatter.format(t),this.options.style==="unit"&&!Qc){var r;let{unit:i,unitDisplay:a="short",locale:s}=this.resolvedOptions();if(!i)return n;let o=(r=sE[i])===null||r===void 0?void 0:r[a];n+=o[s]||o.default}return n}formatToParts(t){return this.numberFormatter.formatToParts(t)}formatRange(t,n){if(typeof this.numberFormatter.formatRange=="function")return this.numberFormatter.formatRange(t,n);if(n<t)throw new RangeError("End date must be >= start date");return`${this.format(t)} – ${this.format(n)}`}formatRangeToParts(t,n){if(typeof this.numberFormatter.formatRangeToParts=="function")return this.numberFormatter.formatRangeToParts(t,n);if(n<t)throw new RangeError("End date must be >= start date");let r=this.numberFormatter.formatToParts(t),i=this.numberFormatter.formatToParts(n);return[...r.map(a=>({...a,source:"startRange"})),{type:"literal",value:" – ",source:"shared"},...i.map(a=>({...a,source:"endRange"}))]}resolvedOptions(){let t=this.numberFormatter.resolvedOptions();return!vg&&this.options.signDisplay!=null&&(t={...t,signDisplay:this.options.signDisplay}),!Qc&&this.options.style==="unit"&&(t={...t,style:"unit",unit:this.options.unit,unitDisplay:this.options.unitDisplay}),t}constructor(t,n={}){this.numberFormatter=BL(t,n),this.options=n}}function BL(e,t={}){let{numberingSystem:n}=t;if(n&&e.includes("-nu-")&&(e.includes("-u-")||(e+="-u-"),e+=`-nu-${n}`),t.style==="unit"&&!Qc){var r;let{unit:s,unitDisplay:o="short"}=t;if(!s)throw new Error('unit option must be provided with style: "unit"');if(!(!((r=sE[s])===null||r===void 0)&&r[o]))throw new Error(`Unsupported unit ${s} with unitDisplay = ${o}`);t={...t,style:"decimal"}}let i=e+(t?Object.entries(t).sort((s,o)=>s[0]<o[0]?-1:1).join():"");if(Ih.has(i))return Ih.get(i);let a=new Intl.NumberFormat(e,t);return Ih.set(i,a),a}function IL(e,t,n){if(t==="auto")return e.format(n);if(t==="never")return e.format(Math.abs(n));{let r=!1;if(t==="always"?r=n>0||Object.is(n,0):t==="exceptZero"&&(Object.is(n,-0)||Object.is(n,0)?n=Math.abs(n):r=n>0),r){let i=e.format(-n),a=e.format(n),s=i.replace(a,"").replace(/\u200e|\u061C/,"");return[...s].length!==1&&console.warn("@react-aria/i18n polyfill for NumberFormat signDisplay: Unsupported case"),i.replace(a,"!!!").replace(s,"+").replace("!!!",a)}else return e.format(n)}}const LL=new RegExp("^.*\\(.*\\).*$"),NL=["latn","arab","hanidec"];class oE{parse(t){return Lh(this.locale,this.options,t).parse(t)}isValidPartialNumber(t,n,r){return Lh(this.locale,this.options,t).isValidPartialNumber(t,n,r)}getNumberingSystem(t){return Lh(this.locale,this.options,t).options.numberingSystem}constructor(t,n={}){this.locale=t,this.options=n}}const i5=new Map;function Lh(e,t,n){let r=a5(e,t);if(!e.includes("-nu-")&&!r.isValidPartialNumber(n)){for(let i of NL)if(i!==r.options.numberingSystem){let a=a5(e+(e.includes("-u-")?"-nu-":"-u-nu-")+i,t);if(a.isValidPartialNumber(n))return a}}return r}function a5(e,t){let n=e+(t?Object.entries(t).sort((i,a)=>i[0]<a[0]?-1:1).join():""),r=i5.get(n);return r||(r=new jL(e,t),i5.set(n,r)),r}class jL{parse(t){let n=this.sanitize(t);if(this.symbols.group&&(n=vu(n,this.symbols.group,"")),this.symbols.decimal&&(n=n.replace(this.symbols.decimal,".")),this.symbols.minusSign&&(n=n.replace(this.symbols.minusSign,"-")),n=n.replace(this.symbols.numeral,this.symbols.index),this.options.style==="percent"){let s=n.indexOf("-");n=n.replace("-","");let o=n.indexOf(".");o===-1&&(o=n.length),n=n.replace(".",""),o-2===0?n=`0.${n}`:o-2===-1?n=`0.0${n}`:o-2===-2?n="0.00":n=`${n.slice(0,o-2)}.${n.slice(o-2)}`,s>-1&&(n=`-${n}`)}let r=n?+n:NaN;if(isNaN(r))return NaN;if(this.options.style==="percent"){var i,a;let s={...this.options,style:"decimal",minimumFractionDigits:Math.min(((i=this.options.minimumFractionDigits)!==null&&i!==void 0?i:0)+2,20),maximumFractionDigits:Math.min(((a=this.options.maximumFractionDigits)!==null&&a!==void 0?a:0)+2,20)};return new oE(this.locale,s).parse(new OL(this.locale,s).format(r))}return this.options.currencySign==="accounting"&&LL.test(t)&&(r=-1*r),r}sanitize(t){return t=t.replace(this.symbols.literals,""),this.symbols.minusSign&&(t=t.replace("-",this.symbols.minusSign)),this.options.numberingSystem==="arab"&&(this.symbols.decimal&&(t=t.replace(",",this.symbols.decimal),t=t.replace("،",this.symbols.decimal)),this.symbols.group&&(t=vu(t,".",this.symbols.group))),this.options.locale==="fr-FR"&&(t=vu(t,"."," ")),t}isValidPartialNumber(t,n=-1/0,r=1/0){return t=this.sanitize(t),this.symbols.minusSign&&t.startsWith(this.symbols.minusSign)&&n<0?t=t.slice(this.symbols.minusSign.length):this.symbols.plusSign&&t.startsWith(this.symbols.plusSign)&&r>0&&(t=t.slice(this.symbols.plusSign.length)),this.symbols.group&&t.startsWith(this.symbols.group)||this.symbols.decimal&&t.indexOf(this.symbols.decimal)>-1&&this.options.maximumFractionDigits===0?!1:(this.symbols.group&&(t=vu(t,this.symbols.group,"")),t=t.replace(this.symbols.numeral,""),this.symbols.decimal&&(t=t.replace(this.symbols.decimal,"")),t.length===0)}constructor(t,n={}){this.locale=t,this.formatter=new Intl.NumberFormat(t,n),this.options=this.formatter.resolvedOptions(),this.symbols=VL(t,this.formatter,this.options,n);var r,i;this.options.style==="percent"&&(((r=this.options.minimumFractionDigits)!==null&&r!==void 0?r:0)>18||((i=this.options.maximumFractionDigits)!==null&&i!==void 0?i:0)>18)&&console.warn("NumberParser cannot handle percentages with greater than 18 decimal places, please reduce the number in your options.")}}const s5=new Set(["decimal","fraction","integer","minusSign","plusSign","group"]),zL=[0,4,2,1,11,20,3,7,100,21,.1,1.1];function VL(e,t,n,r){var i,a,s,o;let l=new Intl.NumberFormat(e,{...n,minimumSignificantDigits:1,maximumSignificantDigits:21}),u=l.formatToParts(-10000.111),c=l.formatToParts(10000.111),d=zL.map(P=>l.formatToParts(P));var f;let h=(f=(i=u.find(P=>P.type==="minusSign"))===null||i===void 0?void 0:i.value)!==null&&f!==void 0?f:"-",p=(a=c.find(P=>P.type==="plusSign"))===null||a===void 0?void 0:a.value;!p&&((r==null?void 0:r.signDisplay)==="exceptZero"||(r==null?void 0:r.signDisplay)==="always")&&(p="+");let b=(s=new Intl.NumberFormat(e,{...n,minimumFractionDigits:2,maximumFractionDigits:2}).formatToParts(.001).find(P=>P.type==="decimal"))===null||s===void 0?void 0:s.value,v=(o=u.find(P=>P.type==="group"))===null||o===void 0?void 0:o.value,m=u.filter(P=>!s5.has(P.type)).map(P=>o5(P.value)),$=d.flatMap(P=>P.filter(E=>!s5.has(E.type)).map(E=>o5(E.value))),w=[...new Set([...m,...$])].sort((P,E)=>E.length-P.length),D=w.length===0?new RegExp("[\\p{White_Space}]","gu"):new RegExp(`${w.join("|")}|[\\p{White_Space}]`,"gu"),S=[...new Intl.NumberFormat(n.locale,{useGrouping:!1}).format(9876543210)].reverse(),k=new Map(S.map((P,E)=>[P,E])),x=new RegExp(`[${S.join("")}]`,"g");return{minusSign:h,plusSign:p,decimal:b,group:v,literals:D,numeral:x,index:P=>String(k.get(P))}}function vu(e,t,n){return e.replaceAll?e.replaceAll(t,n):e.split(t).join(n)}function o5(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}let Nh=new Map;function WL(e){let{locale:t}=Qe(),n=t+(e?Object.entries(e).sort((i,a)=>i[0]<a[0]?-1:1).join():"");if(Nh.has(n))return Nh.get(n);let r=new Intl.Collator(t,e);return Nh.set(n,r),r}function UL(e){let t=WL({usage:"search",...e}),n=y.useCallback((a,s)=>s.length===0?!0:(a=a.normalize("NFC"),s=s.normalize("NFC"),t.compare(a.slice(0,s.length),s)===0),[t]),r=y.useCallback((a,s)=>s.length===0?!0:(a=a.normalize("NFC"),s=s.normalize("NFC"),t.compare(a.slice(-s.length),s)===0),[t]),i=y.useCallback((a,s)=>{if(s.length===0)return!0;a=a.normalize("NFC"),s=s.normalize("NFC");let o=0,l=s.length;for(;o+l<=a.length;o++){let u=a.slice(o,o+l);if(t.compare(s,u)===0)return!0}return!1},[t]);return y.useMemo(()=>({startsWith:n,endsWith:r,contains:i}),[n,r,i])}const Af={margin:["margin",le],marginStart:[Vt("marginLeft","marginRight"),le],marginEnd:[Vt("marginRight","marginLeft"),le],marginTop:["marginTop",le],marginBottom:["marginBottom",le],marginX:[["marginLeft","marginRight"],le],marginY:[["marginTop","marginBottom"],le],width:["width",le],height:["height",le],minWidth:["minWidth",le],minHeight:["minHeight",le],maxWidth:["maxWidth",le],maxHeight:["maxHeight",le],isHidden:["display",GL],alignSelf:["alignSelf",tt],justifySelf:["justifySelf",tt],position:["position",zh],zIndex:["zIndex",zh],top:["top",le],bottom:["bottom",le],start:[Vt("left","right"),le],end:[Vt("right","left"),le],left:["left",le],right:["right",le],order:["order",zh],flex:["flex",ZL],flexGrow:["flexGrow",tt],flexShrink:["flexShrink",tt],flexBasis:["flexBasis",tt],gridArea:["gridArea",tt],gridColumn:["gridColumn",tt],gridColumnEnd:["gridColumnEnd",tt],gridColumnStart:["gridColumnStart",tt],gridRow:["gridRow",tt],gridRowEnd:["gridRowEnd",tt],gridRowStart:["gridRowStart",tt]};({...Af,borderStartWidth:Vt("borderLeftWidth","borderRightWidth"),borderEndWidth:Vt("borderRightWidth","borderLeftWidth"),borderStartColor:Vt("borderLeftColor","borderRightColor"),borderEndColor:Vt("borderRightColor","borderLeftColor"),borderTopStartRadius:Vt("borderTopLeftRadius","borderTopRightRadius"),borderTopEndRadius:Vt("borderTopRightRadius","borderTopLeftRadius"),borderBottomStartRadius:Vt("borderBottomLeftRadius","borderBottomRightRadius"),borderBottomEndRadius:Vt("borderBottomRightRadius","borderBottomLeftRadius"),paddingStart:Vt("paddingLeft","paddingRight"),paddingEnd:Vt("paddingRight","paddingLeft")});const l5={borderWidth:"borderStyle",borderLeftWidth:"borderLeftStyle",borderRightWidth:"borderRightStyle",borderTopWidth:"borderTopStyle",borderBottomWidth:"borderBottomStyle"};function Vt(e,t){return n=>n==="rtl"?t:e}const HL=/(%|px|em|rem|vw|vh|auto|cm|mm|in|pt|pc|ex|ch|rem|vmin|vmax|fr)$/,KL=/^\s*\w+\(/,YL=/(static-)?size-\d+|single-line-(height|width)/g;function le(e){if(typeof e=="number")return e+"px";if(e)return HL.test(e)?e:KL.test(e)?e.replace(YL,"var(--spectrum-global-dimension-$&, var(--spectrum-alias-$&))"):`var(--spectrum-global-dimension-${e}, var(--spectrum-alias-${e}))`}function jh(e,t){return e=x$(e,t),le(e)}function lE(e,t="default",n=5){return n>5?`var(--spectrum-${e}, var(--spectrum-semantic-${e}-color-${t}))`:`var(--spectrum-legacy-color-${e}, var(--spectrum-global-color-${e}, var(--spectrum-semantic-${e}-color-${t})))`}function qL(e,t=5){if(e)return`var(--spectrum-alias-background-color-${e}, ${lE(e,"background",t)})`}function Jn(e,t=5){if(e)return e==="default"?"var(--spectrum-alias-border-color)":`var(--spectrum-alias-border-color-${e}, ${lE(e,"border",t)})`}function er(e){return e&&e!=="none"?`var(--spectrum-alias-border-size-${e})`:"0"}function tr(e){if(e)return`var(--spectrum-alias-border-radius-${e})`}function GL(e){return e?"none":void 0}function zh(e){return e}function ZL(e){return typeof e=="boolean"?e?"1":void 0:""+e}function XL(e,t,n,r){let i={};for(let a in e){let s=t[a];if(!s||e[a]==null)continue;let[o,l]=s;typeof o=="function"&&(o=o(n));let u=x$(e[a],r),c=l(u,e.colorVersion);if(Array.isArray(o))for(let d of o)i[d]=c;else i[o]=c}for(let a in l5)i[a]&&(i[l5[a]]="solid",i.boxSizing="border-box");return i}function st(e,t=Af,n={}){let{UNSAFE_className:r,UNSAFE_style:i,...a}=e,s=p8(),{direction:o}=Qe(),{matchedBreakpoints:l=(s==null?void 0:s.matchedBreakpoints)||["base"]}=n,u=XL(e,t,o,l),c={...i,...u};a.className&&console.warn("The className prop is unsafe and is unsupported in React Spectrum v3. Please use style props with Spectrum variables, or UNSAFE_className if you absolutely must do something custom. Note that this may break in future versions due to DOM structure changes."),a.style&&console.warn("The style prop is unsafe and is unsupported in React Spectrum v3. Please use style props with Spectrum variables, or UNSAFE_style if you absolutely must do something custom. Note that this may break in future versions due to DOM structure changes.");let d={style:c,className:r};return x$(e.isHidden,l)&&(d.hidden=!0),{styleProps:d}}function tt(e){return e}function x$(e,t){if(e&&typeof e=="object"&&!Array.isArray(e)){for(let n=0;n<t.length;n++){let r=t[n];if(e[r]!=null)return e[r]}return e.base}return e}let Jc=_.createContext(null);function ci(e,t){let n=e.slot||t,{[n]:r={}}=y.useContext(Jc)||{};return de(e,de(r,{id:e.id}))}function Of(e){let t=y.useContext(Jc)||{},{slots:n={},children:r}=e,i=y.useMemo(()=>Object.keys(t).concat(Object.keys(n)).reduce((a,s)=>({...a,[s]:de(t[s]||{},n[s]||{})}),{}),[t,n]);return _.createElement(Jc.Provider,{value:i},r)}function uE(e){let{children:t,...n}=e,r=t;return _.Children.toArray(t).length<=1&&typeof t=="function"&&(r=_.cloneElement(_.Children.only(t),n)),_.createElement(Jc.Provider,{value:{}},r)}function bu(e,t){let[n,r]=y.useState(!0);return he(()=>{r(!!(t.current&&t.current.querySelector(e)))},[r,e,t]),n}const QL=700;function JL(){return pa()||typeof window>"u"?!1:window.screen.width<=QL}let qa="default",bg="",sc=new WeakMap;function u5(e){if(Mf()){if(qa==="default"){const t=ye(e);bg=t.documentElement.style.webkitUserSelect,t.documentElement.style.webkitUserSelect="none"}qa="disabled"}else(e instanceof HTMLElement||e instanceof SVGElement)&&(sc.set(e,e.style.userSelect),e.style.userSelect="none")}function yu(e){if(Mf()){if(qa!=="disabled")return;qa="restoring",setTimeout(()=>{eE(()=>{if(qa==="restoring"){const t=ye(e);t.documentElement.style.webkitUserSelect==="none"&&(t.documentElement.style.webkitUserSelect=bg||""),bg="",qa="default"}})},300)}else if((e instanceof HTMLElement||e instanceof SVGElement)&&e&&sc.has(e)){let t=sc.get(e);e.style.userSelect==="none"&&(e.style.userSelect=t),e.getAttribute("style")===""&&e.removeAttribute("style"),sc.delete(e)}}const hl=_.createContext({register:()=>{}});hl.displayName="PressResponderContext";function eN(e,t){return t.get?t.get.call(e):t.value}function cE(e,t,n){if(!t.has(e))throw new TypeError("attempted to "+n+" private field on non-instance");return t.get(e)}function tN(e,t){var n=cE(e,t,"get");return eN(e,n)}function nN(e,t,n){if(t.set)t.set.call(e,n);else{if(!t.writable)throw new TypeError("attempted to set read only private field");t.value=n}}function c5(e,t,n){var r=cE(e,t,"set");return nN(e,r,n),n}function rN(e){let t=y.useContext(hl);if(t){let{register:n,...r}=t;e=de(r,e),n()}return y$(t,e.ref),e}var $u=new WeakMap;class xu{continuePropagation(){c5(this,$u,!1)}get shouldStopPropagation(){return tN(this,$u)}constructor(t,n,r){Ll(this,$u,{writable:!0,value:void 0}),c5(this,$u,!0),this.type=t,this.pointerType=n,this.target=r.currentTarget,this.shiftKey=r.shiftKey,this.metaKey=r.metaKey,this.ctrlKey=r.ctrlKey,this.altKey=r.altKey}}const d5=Symbol("linkClicked");function w$(e){let{onPress:t,onPressChange:n,onPressStart:r,onPressEnd:i,onPressUp:a,isDisabled:s,isPressed:o,preventFocusOnPress:l,shouldCancelOnPointerExit:u,allowTextSelectionOnPress:c,ref:d,...f}=rN(e),[h,p]=y.useState(!1),g=y.useRef({isPressed:!1,ignoreEmulatedMouseEvents:!1,ignoreClickAfterPress:!1,didFirePressStart:!1,isTriggeringEvent:!1,activePointerId:null,target:null,isOverTarget:!1,pointerType:null}),{addGlobalListener:b,removeAllGlobalListeners:v}=tE(),m=pt((x,T)=>{let P=g.current;if(s||P.didFirePressStart)return!1;let E=!0;if(P.isTriggeringEvent=!0,r){let A=new xu("pressstart",T,x);r(A),E=A.shouldStopPropagation}return n&&n(!0),P.isTriggeringEvent=!1,P.didFirePressStart=!0,p(!0),E}),$=pt((x,T,P=!0)=>{let E=g.current;if(!E.didFirePressStart)return!1;E.ignoreClickAfterPress=!0,E.didFirePressStart=!1,E.isTriggeringEvent=!0;let A=!0;if(i){let R=new xu("pressend",T,x);i(R),A=R.shouldStopPropagation}if(n&&n(!1),p(!1),t&&P&&!s){let R=new xu("press",T,x);t(R),A&&(A=R.shouldStopPropagation)}return E.isTriggeringEvent=!1,A}),w=pt((x,T)=>{let P=g.current;if(s)return!1;if(a){P.isTriggeringEvent=!0;let E=new xu("pressup",T,x);return a(E),P.isTriggeringEvent=!1,E.shouldStopPropagation}return!0}),D=pt(x=>{let T=g.current;T.isPressed&&T.target&&(T.isOverTarget&&T.pointerType!=null&&$(nr(T.target,x),T.pointerType,!1),T.isPressed=!1,T.isOverTarget=!1,T.activePointerId=null,T.pointerType=null,v(),c||yu(T.target))}),S=pt(x=>{u&&D(x)}),k=y.useMemo(()=>{let x=g.current,T={onKeyDown(E){if(Vh(E.nativeEvent,E.currentTarget)&&E.currentTarget.contains(E.target)){var A;h5(E.target,E.key)&&E.preventDefault();let R=!0;if(!x.isPressed&&!E.repeat){x.target=E.currentTarget,x.isPressed=!0,R=m(E,"keyboard");let F=E.currentTarget,z=B=>{Vh(B,F)&&!B.repeat&&F.contains(B.target)&&x.target&&w(nr(x.target,B),"keyboard")};b(ye(E.currentTarget),"keyup",fl(z,P),!0)}R&&E.stopPropagation(),E.metaKey&&Ds()&&((A=x.metaKeyEvents)===null||A===void 0||A.set(E.key,E.nativeEvent))}else E.key==="Meta"&&(x.metaKeyEvents=new Map)},onClick(E){if(!(E&&!E.currentTarget.contains(E.target))&&E&&E.button===0&&!x.isTriggeringEvent&&!ia.isOpening){let A=!0;if(s&&E.preventDefault(),!x.ignoreClickAfterPress&&!x.ignoreEmulatedMouseEvents&&!x.isPressed&&(x.pointerType==="virtual"||mg(E.nativeEvent))){!s&&!l&&Kr(E.currentTarget);let R=m(E,"virtual"),F=w(E,"virtual"),z=$(E,"virtual");A=R&&F&&z}x.ignoreEmulatedMouseEvents=!1,x.ignoreClickAfterPress=!1,A&&E.stopPropagation()}}},P=E=>{var A;if(x.isPressed&&x.target&&Vh(E,x.target)){var R;h5(E.target,E.key)&&E.preventDefault();let z=E.target;$(nr(x.target,E),"keyboard",x.target.contains(z)),v(),E.key!=="Enter"&&D$(x.target)&&x.target.contains(z)&&!E[d5]&&(E[d5]=!0,ia(x.target,E,!1)),x.isPressed=!1,(R=x.metaKeyEvents)===null||R===void 0||R.delete(E.key)}else if(E.key==="Meta"&&(!((A=x.metaKeyEvents)===null||A===void 0)&&A.size)){var F;let z=x.metaKeyEvents;x.metaKeyEvents=void 0;for(let B of z.values())(F=x.target)===null||F===void 0||F.dispatchEvent(new KeyboardEvent("keyup",B))}};if(typeof PointerEvent<"u"){T.onPointerDown=F=>{if(F.button!==0||!F.currentTarget.contains(F.target))return;if(ML(F.nativeEvent)){x.pointerType="virtual";return}Wh(F.currentTarget)&&F.preventDefault(),x.pointerType=F.pointerType;let z=!0;x.isPressed||(x.isPressed=!0,x.isOverTarget=!0,x.activePointerId=F.pointerId,x.target=F.currentTarget,!s&&!l&&Kr(F.currentTarget),c||u5(x.target),z=m(F,x.pointerType),b(ye(F.currentTarget),"pointermove",E,!1),b(ye(F.currentTarget),"pointerup",A,!1),b(ye(F.currentTarget),"pointercancel",R,!1)),z&&F.stopPropagation()},T.onMouseDown=F=>{F.currentTarget.contains(F.target)&&F.button===0&&(Wh(F.currentTarget)&&F.preventDefault(),F.stopPropagation())},T.onPointerUp=F=>{!F.currentTarget.contains(F.target)||x.pointerType==="virtual"||F.button===0&&Ca(F,F.currentTarget)&&w(F,x.pointerType||F.pointerType)};let E=F=>{F.pointerId===x.activePointerId&&(x.target&&Ca(F,x.target)?!x.isOverTarget&&x.pointerType!=null&&(x.isOverTarget=!0,m(nr(x.target,F),x.pointerType)):x.target&&x.isOverTarget&&x.pointerType!=null&&(x.isOverTarget=!1,$(nr(x.target,F),x.pointerType,!1),S(F)))},A=F=>{F.pointerId===x.activePointerId&&x.isPressed&&F.button===0&&x.target&&(Ca(F,x.target)&&x.pointerType!=null?$(nr(x.target,F),x.pointerType):x.isOverTarget&&x.pointerType!=null&&$(nr(x.target,F),x.pointerType,!1),x.isPressed=!1,x.isOverTarget=!1,x.activePointerId=null,x.pointerType=null,v(),c||yu(x.target))},R=F=>{D(F)};T.onDragStart=F=>{F.currentTarget.contains(F.target)&&D(F)}}else{T.onMouseDown=R=>{if(R.button!==0||!R.currentTarget.contains(R.target))return;if(Wh(R.currentTarget)&&R.preventDefault(),x.ignoreEmulatedMouseEvents){R.stopPropagation();return}x.isPressed=!0,x.isOverTarget=!0,x.target=R.currentTarget,x.pointerType=mg(R.nativeEvent)?"virtual":"mouse",!s&&!l&&Kr(R.currentTarget),m(R,x.pointerType)&&R.stopPropagation(),b(ye(R.currentTarget),"mouseup",E,!1)},T.onMouseEnter=R=>{if(!R.currentTarget.contains(R.target))return;let F=!0;x.isPressed&&!x.ignoreEmulatedMouseEvents&&x.pointerType!=null&&(x.isOverTarget=!0,F=m(R,x.pointerType)),F&&R.stopPropagation()},T.onMouseLeave=R=>{if(!R.currentTarget.contains(R.target))return;let F=!0;x.isPressed&&!x.ignoreEmulatedMouseEvents&&x.pointerType!=null&&(x.isOverTarget=!1,F=$(R,x.pointerType,!1),S(R)),F&&R.stopPropagation()},T.onMouseUp=R=>{R.currentTarget.contains(R.target)&&!x.ignoreEmulatedMouseEvents&&R.button===0&&w(R,x.pointerType||"mouse")};let E=R=>{if(R.button===0){if(x.isPressed=!1,v(),x.ignoreEmulatedMouseEvents){x.ignoreEmulatedMouseEvents=!1;return}x.target&&Ca(R,x.target)&&x.pointerType!=null?$(nr(x.target,R),x.pointerType):x.target&&x.isOverTarget&&x.pointerType!=null&&$(nr(x.target,R),x.pointerType,!1),x.isOverTarget=!1}};T.onTouchStart=R=>{if(!R.currentTarget.contains(R.target))return;let F=iN(R.nativeEvent);if(!F)return;x.activePointerId=F.identifier,x.ignoreEmulatedMouseEvents=!0,x.isOverTarget=!0,x.isPressed=!0,x.target=R.currentTarget,x.pointerType="touch",!s&&!l&&Kr(R.currentTarget),c||u5(x.target),m(R,x.pointerType)&&R.stopPropagation(),b(Fn(R.currentTarget),"scroll",A,!0)},T.onTouchMove=R=>{if(!R.currentTarget.contains(R.target))return;if(!x.isPressed){R.stopPropagation();return}let F=f5(R.nativeEvent,x.activePointerId),z=!0;F&&Ca(F,R.currentTarget)?!x.isOverTarget&&x.pointerType!=null&&(x.isOverTarget=!0,z=m(R,x.pointerType)):x.isOverTarget&&x.pointerType!=null&&(x.isOverTarget=!1,z=$(R,x.pointerType,!1),S(R)),z&&R.stopPropagation()},T.onTouchEnd=R=>{if(!R.currentTarget.contains(R.target))return;if(!x.isPressed){R.stopPropagation();return}let F=f5(R.nativeEvent,x.activePointerId),z=!0;F&&Ca(F,R.currentTarget)&&x.pointerType!=null?(w(R,x.pointerType),z=$(R,x.pointerType)):x.isOverTarget&&x.pointerType!=null&&(z=$(R,x.pointerType,!1)),z&&R.stopPropagation(),x.isPressed=!1,x.activePointerId=null,x.isOverTarget=!1,x.ignoreEmulatedMouseEvents=!0,x.target&&!c&&yu(x.target),v()},T.onTouchCancel=R=>{R.currentTarget.contains(R.target)&&(R.stopPropagation(),x.isPressed&&D(R))};let A=R=>{x.isPressed&&R.target.contains(x.target)&&D({currentTarget:x.target,shiftKey:!1,ctrlKey:!1,metaKey:!1,altKey:!1})};T.onDragStart=R=>{R.currentTarget.contains(R.target)&&D(R)}}return T},[b,s,l,v,c,D,S,$,m,w]);return y.useEffect(()=>()=>{var x;c||yu((x=g.current.target)!==null&&x!==void 0?x:void 0)},[c]),{isPressed:o||h,pressProps:de(f,k)}}function D$(e){return e.tagName==="A"&&e.hasAttribute("href")}function Vh(e,t){const{key:n,code:r}=e,i=t,a=i.getAttribute("role");return(n==="Enter"||n===" "||n==="Spacebar"||r==="Space")&&!(i instanceof Fn(i).HTMLInputElement&&!dE(i,n)||i instanceof Fn(i).HTMLTextAreaElement||i.isContentEditable)&&!((a==="link"||!a&&D$(i))&&n!=="Enter")}function iN(e){const{targetTouches:t}=e;return t.length>0?t[0]:null}function f5(e,t){const n=e.changedTouches;for(let r=0;r<n.length;r++){const i=n[r];if(i.identifier===t)return i}return null}function nr(e,t){return{currentTarget:e,shiftKey:t.shiftKey,ctrlKey:t.ctrlKey,metaKey:t.metaKey,altKey:t.altKey}}function aN(e){let t=0,n=0;return e.width!==void 0?t=e.width/2:e.radiusX!==void 0&&(t=e.radiusX),e.height!==void 0?n=e.height/2:e.radiusY!==void 0&&(n=e.radiusY),{top:e.clientY-n,right:e.clientX+t,bottom:e.clientY+n,left:e.clientX-t}}function sN(e,t){return!(e.left>t.right||t.left>e.right||e.top>t.bottom||t.top>e.bottom)}function Ca(e,t){let n=t.getBoundingClientRect(),r=aN(e);return sN(n,r)}function Wh(e){return!(e instanceof HTMLElement)||!e.hasAttribute("draggable")}function h5(e,t){return e instanceof HTMLInputElement?!dE(e,t):e instanceof HTMLButtonElement?e.type!=="submit"&&e.type!=="reset":!D$(e)}const oN=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function dE(e,t){return e.type==="checkbox"||e.type==="radio"?t===" ":oN.has(e.type)}const lN=_.forwardRef(({children:e,...t},n)=>{let r=y.useRef(!1),i=y.useContext(hl);n=CL(n||(i==null?void 0:i.ref));let a=de(i||{},{...t,ref:n,register(){r.current=!0,i&&i.register()}});return y$(i,n),y.useEffect(()=>{r.current||(console.warn("A PressResponder was rendered without a pressable child. Either call the usePress hook, or wrap your DOM node with <Pressable> component."),r.current=!0)},[]),_.createElement(hl.Provider,{value:a},e)});function uN({children:e}){let t=y.useMemo(()=>({register:()=>{}}),[]);return _.createElement(hl.Provider,{value:t},e)}class cN{isDefaultPrevented(){return this.nativeEvent.defaultPrevented}preventDefault(){this.defaultPrevented=!0,this.nativeEvent.preventDefault()}stopPropagation(){this.nativeEvent.stopPropagation(),this.isPropagationStopped=()=>!0}isPropagationStopped(){return!1}persist(){}constructor(t,n){this.nativeEvent=n,this.target=n.target,this.currentTarget=n.currentTarget,this.relatedTarget=n.relatedTarget,this.bubbles=n.bubbles,this.cancelable=n.cancelable,this.defaultPrevented=n.defaultPrevented,this.eventPhase=n.eventPhase,this.isTrusted=n.isTrusted,this.timeStamp=n.timeStamp,this.type=t}}function fE(e){let t=y.useRef({isFocused:!1,observer:null});he(()=>{const r=t.current;return()=>{r.observer&&(r.observer.disconnect(),r.observer=null)}},[]);let n=pt(r=>{e==null||e(r)});return y.useCallback(r=>{if(r.target instanceof HTMLButtonElement||r.target instanceof HTMLInputElement||r.target instanceof HTMLTextAreaElement||r.target instanceof HTMLSelectElement){t.current.isFocused=!0;let i=r.target,a=s=>{t.current.isFocused=!1,i.disabled&&n(new cN("blur",s)),t.current.observer&&(t.current.observer.disconnect(),t.current.observer=null)};i.addEventListener("focusout",a,{once:!0}),t.current.observer=new MutationObserver(()=>{if(t.current.isFocused&&i.disabled){var s;(s=t.current.observer)===null||s===void 0||s.disconnect();let o=i===document.activeElement?null:document.activeElement;i.dispatchEvent(new FocusEvent("blur",{relatedTarget:o})),i.dispatchEvent(new FocusEvent("focusout",{bubbles:!0,relatedTarget:o}))}}),t.current.observer.observe(i,{attributes:!0,attributeFilter:["disabled"]})}},[n])}function hE(e){let{isDisabled:t,onFocus:n,onBlur:r,onFocusChange:i}=e;const a=y.useCallback(l=>{if(l.target===l.currentTarget)return r&&r(l),i&&i(!1),!0},[r,i]),s=fE(a),o=y.useCallback(l=>{const u=ye(l.target);l.target===l.currentTarget&&u.activeElement===l.target&&(n&&n(l),i&&i(!0),s(l))},[i,n,s]);return{focusProps:{onFocus:!t&&(n||i||r)?o:void 0,onBlur:!t&&(r||i)?a:void 0}}}let ma=null,yg=new Set,Bo=new Map,sa=!1,$g=!1;const dN={Tab:!0,Escape:!0};function Bf(e,t){for(let n of yg)n(e,t)}function fN(e){return!(e.metaKey||!Ds()&&e.altKey||e.ctrlKey||e.key==="Control"||e.key==="Shift"||e.key==="Meta")}function ed(e){sa=!0,fN(e)&&(ma="keyboard",Bf("keyboard",e))}function bn(e){ma="pointer",(e.type==="mousedown"||e.type==="pointerdown")&&(sa=!0,Bf("pointer",e))}function pE(e){mg(e)&&(sa=!0,ma="virtual")}function mE(e){e.target===window||e.target===document||(!sa&&!$g&&(ma="virtual",Bf("virtual",e)),sa=!1,$g=!1)}function gE(){sa=!1,$g=!0}function xg(e){if(typeof window>"u"||Bo.get(Fn(e)))return;const t=Fn(e),n=ye(e);let r=t.HTMLElement.prototype.focus;t.HTMLElement.prototype.focus=function(){sa=!0,r.apply(this,arguments)},n.addEventListener("keydown",ed,!0),n.addEventListener("keyup",ed,!0),n.addEventListener("click",pE,!0),t.addEventListener("focus",mE,!0),t.addEventListener("blur",gE,!1),typeof PointerEvent<"u"?(n.addEventListener("pointerdown",bn,!0),n.addEventListener("pointermove",bn,!0),n.addEventListener("pointerup",bn,!0)):(n.addEventListener("mousedown",bn,!0),n.addEventListener("mousemove",bn,!0),n.addEventListener("mouseup",bn,!0)),t.addEventListener("beforeunload",()=>{vE(e)},{once:!0}),Bo.set(t,{focus:r})}const vE=(e,t)=>{const n=Fn(e),r=ye(e);t&&r.removeEventListener("DOMContentLoaded",t),Bo.has(n)&&(n.HTMLElement.prototype.focus=Bo.get(n).focus,r.removeEventListener("keydown",ed,!0),r.removeEventListener("keyup",ed,!0),r.removeEventListener("click",pE,!0),n.removeEventListener("focus",mE,!0),n.removeEventListener("blur",gE,!1),typeof PointerEvent<"u"?(r.removeEventListener("pointerdown",bn,!0),r.removeEventListener("pointermove",bn,!0),r.removeEventListener("pointerup",bn,!0)):(r.removeEventListener("mousedown",bn,!0),r.removeEventListener("mousemove",bn,!0),r.removeEventListener("mouseup",bn,!0)),Bo.delete(n))};function hN(e){const t=ye(e);let n;return t.readyState!=="loading"?xg(e):(n=()=>{xg(e)},t.addEventListener("DOMContentLoaded",n)),()=>vE(e,n)}typeof document<"u"&&hN();function bE(){return ma!=="pointer"}function yE(){return ma}function pN(e){ma=e,Bf(e,null)}const mN=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function gN(e,t,n){var r;const i=typeof window<"u"?Fn(n==null?void 0:n.target).HTMLInputElement:HTMLInputElement,a=typeof window<"u"?Fn(n==null?void 0:n.target).HTMLTextAreaElement:HTMLTextAreaElement,s=typeof window<"u"?Fn(n==null?void 0:n.target).HTMLElement:HTMLElement,o=typeof window<"u"?Fn(n==null?void 0:n.target).KeyboardEvent:KeyboardEvent;return e=e||(n==null?void 0:n.target)instanceof i&&!mN.has(n==null||(r=n.target)===null||r===void 0?void 0:r.type)||(n==null?void 0:n.target)instanceof a||(n==null?void 0:n.target)instanceof s&&(n==null?void 0:n.target.isContentEditable),!(e&&t==="keyboard"&&n instanceof o&&!dN[n.key])}function vN(e,t,n){xg(),y.useEffect(()=>{let r=(i,a)=>{gN(!!(n!=null&&n.isTextInput),i,a)&&e(bE())};return yg.add(r),()=>{yg.delete(r)}},t)}function As(e){let{isDisabled:t,onBlurWithin:n,onFocusWithin:r,onFocusWithinChange:i}=e,a=y.useRef({isFocusWithin:!1}),s=y.useCallback(u=>{a.current.isFocusWithin&&!u.currentTarget.contains(u.relatedTarget)&&(a.current.isFocusWithin=!1,n&&n(u),i&&i(!1))},[n,i,a]),o=fE(s),l=y.useCallback(u=>{!a.current.isFocusWithin&&document.activeElement===u.target&&(r&&r(u),i&&i(!0),a.current.isFocusWithin=!0,o(u))},[r,i,o]);return t?{focusWithinProps:{onFocus:void 0,onBlur:void 0}}:{focusWithinProps:{onFocus:l,onBlur:s}}}let td=!1,Uh=0;function wg(){td=!0,setTimeout(()=>{td=!1},50)}function p5(e){e.pointerType==="touch"&&wg()}function bN(){if(!(typeof document>"u"))return typeof PointerEvent<"u"?document.addEventListener("pointerup",p5):document.addEventListener("touchend",wg),Uh++,()=>{Uh--,!(Uh>0)&&(typeof PointerEvent<"u"?document.removeEventListener("pointerup",p5):document.removeEventListener("touchend",wg))}}function If(e){let{onHoverStart:t,onHoverChange:n,onHoverEnd:r,isDisabled:i}=e,[a,s]=y.useState(!1),o=y.useRef({isHovered:!1,ignoreEmulatedMouseEvents:!1,pointerType:"",target:null}).current;y.useEffect(bN,[]);let{hoverProps:l,triggerHoverEnd:u}=y.useMemo(()=>{let c=(h,p)=>{if(o.pointerType=p,i||p==="touch"||o.isHovered||!h.currentTarget.contains(h.target))return;o.isHovered=!0;let g=h.currentTarget;o.target=g,t&&t({type:"hoverstart",target:g,pointerType:p}),n&&n(!0),s(!0)},d=(h,p)=>{if(o.pointerType="",o.target=null,p==="touch"||!o.isHovered)return;o.isHovered=!1;let g=h.currentTarget;r&&r({type:"hoverend",target:g,pointerType:p}),n&&n(!1),s(!1)},f={};return typeof PointerEvent<"u"?(f.onPointerEnter=h=>{td&&h.pointerType==="mouse"||c(h,h.pointerType)},f.onPointerLeave=h=>{!i&&h.currentTarget.contains(h.target)&&d(h,h.pointerType)}):(f.onTouchStart=()=>{o.ignoreEmulatedMouseEvents=!0},f.onMouseEnter=h=>{!o.ignoreEmulatedMouseEvents&&!td&&c(h,"mouse"),o.ignoreEmulatedMouseEvents=!1},f.onMouseLeave=h=>{!i&&h.currentTarget.contains(h.target)&&d(h,"mouse")}),{hoverProps:f,triggerHoverEnd:d}},[t,n,r,i,o]);return y.useEffect(()=>{i&&u({currentTarget:o.target},o.pointerType)},[i]),{hoverProps:l,isHovered:a}}function yN(e){let{ref:t,onInteractOutside:n,isDisabled:r,onInteractOutsideStart:i}=e,a=y.useRef({isPointerDown:!1,ignoreEmulatedMouseEvents:!1}),s=pt(l=>{n&&wu(l,t)&&(i&&i(l),a.current.isPointerDown=!0)}),o=pt(l=>{n&&n(l)});y.useEffect(()=>{let l=a.current;if(r)return;const u=t.current,c=ye(u);if(typeof PointerEvent<"u"){let d=f=>{l.isPointerDown&&wu(f,t)&&o(f),l.isPointerDown=!1};return c.addEventListener("pointerdown",s,!0),c.addEventListener("pointerup",d,!0),()=>{c.removeEventListener("pointerdown",s,!0),c.removeEventListener("pointerup",d,!0)}}else{let d=h=>{l.ignoreEmulatedMouseEvents?l.ignoreEmulatedMouseEvents=!1:l.isPointerDown&&wu(h,t)&&o(h),l.isPointerDown=!1},f=h=>{l.ignoreEmulatedMouseEvents=!0,l.isPointerDown&&wu(h,t)&&o(h),l.isPointerDown=!1};return c.addEventListener("mousedown",s,!0),c.addEventListener("mouseup",d,!0),c.addEventListener("touchstart",s,!0),c.addEventListener("touchend",f,!0),()=>{c.removeEventListener("mousedown",s,!0),c.removeEventListener("mouseup",d,!0),c.removeEventListener("touchstart",s,!0),c.removeEventListener("touchend",f,!0)}}},[t,r,s,o])}function wu(e,t){if(e.button>0)return!1;if(e.target){const n=e.target.ownerDocument;if(!n||!n.documentElement.contains(e.target)||e.target.closest("[data-react-aria-top-layer]"))return!1}return t.current&&!t.current.contains(e.target)}function m5(e){if(!e)return;let t=!0;return n=>{let r={...n,preventDefault(){n.preventDefault()},isDefaultPrevented(){return n.isDefaultPrevented()},stopPropagation(){console.error("stopPropagation is now the default behavior for events in React Spectrum. You can use continuePropagation() to revert this behavior.")},continuePropagation(){t=!1}};e(r),t&&n.stopPropagation()}}function $N(e){return{keyboardProps:e.isDisabled?{}:{onKeyDown:m5(e.onKeyDown),onKeyUp:m5(e.onKeyUp)}}}function nd(e){const t=ye(e);if(yE()==="virtual"){let n=t.activeElement;eE(()=>{t.activeElement===n&&e.isConnected&&Kr(e)})}else Kr(e)}function xN(e){const t=Fn(e);if(!(e instanceof t.HTMLElement)&&!(e instanceof t.SVGElement))return!1;let{display:n,visibility:r}=e.style,i=n!=="none"&&r!=="hidden"&&r!=="collapse";if(i){const{getComputedStyle:a}=e.ownerDocument.defaultView;let{display:s,visibility:o}=a(e);i=s!=="none"&&o!=="hidden"&&o!=="collapse"}return i}function wN(e,t){return!e.hasAttribute("hidden")&&!e.hasAttribute("data-react-aria-prevent-focus")&&(e.nodeName==="DETAILS"&&t&&t.nodeName!=="SUMMARY"?e.hasAttribute("open"):!0)}function $E(e,t){return e.nodeName!=="#comment"&&xN(e)&&wN(e,t)&&(!e.parentElement||$E(e.parentElement,e))}const g5=_.createContext(null);let _e=null;function DN(e){let{children:t,contain:n,restoreFocus:r,autoFocus:i}=e,a=y.useRef(null),s=y.useRef(null),o=y.useRef([]),{parentNode:l}=y.useContext(g5)||{},u=y.useMemo(()=>new Dg({scopeRef:o}),[o]);he(()=>{let f=l||Ge.root;if(Ge.getTreeNode(f.scopeRef)&&_e&&!id(_e,f.scopeRef)){let h=Ge.getTreeNode(_e);h&&(f=h)}f.addChild(u),Ge.addNode(u)},[u,l]),he(()=>{let f=Ge.getTreeNode(o);f&&(f.contain=!!n)},[n]),he(()=>{var f;let h=(f=a.current)===null||f===void 0?void 0:f.nextSibling,p=[];for(;h&&h!==s.current;)p.push(h),h=h.nextSibling;o.current=p},[t]),TN(o,r,n),CN(o,n),MN(o,r,n),PN(o,i),y.useEffect(()=>{const f=ye(o.current?o.current[0]:void 0).activeElement;let h=null;if(St(f,o.current)){for(let p of Ge.traverse())p.scopeRef&&St(f,p.scopeRef.current)&&(h=p);h===Ge.getTreeNode(o)&&(_e=h.scopeRef)}},[o]),he(()=>()=>{var f,h,p;let g=(p=(h=Ge.getTreeNode(o))===null||h===void 0||(f=h.parent)===null||f===void 0?void 0:f.scopeRef)!==null&&p!==void 0?p:null;(o===_e||id(o,_e))&&(!g||Ge.getTreeNode(g))&&(_e=g),Ge.removeTreeNode(o)},[o]);let c=y.useMemo(()=>_N(o),[]),d=y.useMemo(()=>({focusManager:c,parentNode:u}),[u,c]);return _.createElement(g5.Provider,{value:d},_.createElement("span",{"data-focus-scope-start":!0,hidden:!0,ref:a}),t,_.createElement("span",{"data-focus-scope-end":!0,hidden:!0,ref:s}))}function _N(e){return{focusNext(t={}){let n=e.current,{from:r,tabbable:i,wrap:a,accept:s}=t,o=r||ye(n[0]).activeElement,l=n[0].previousElementSibling,u=Wi(n),c=an(u,{tabbable:i,accept:s},n);c.currentNode=St(o,n)?o:l;let d=c.nextNode();return!d&&a&&(c.currentNode=l,d=c.nextNode()),d&&Ut(d,!0),d},focusPrevious(t={}){let n=e.current,{from:r,tabbable:i,wrap:a,accept:s}=t,o=r||ye(n[0]).activeElement,l=n[n.length-1].nextElementSibling,u=Wi(n),c=an(u,{tabbable:i,accept:s},n);c.currentNode=St(o,n)?o:l;let d=c.previousNode();return!d&&a&&(c.currentNode=l,d=c.previousNode()),d&&Ut(d,!0),d},focusFirst(t={}){let n=e.current,{tabbable:r,accept:i}=t,a=Wi(n),s=an(a,{tabbable:r,accept:i},n);s.currentNode=n[0].previousElementSibling;let o=s.nextNode();return o&&Ut(o,!0),o},focusLast(t={}){let n=e.current,{tabbable:r,accept:i}=t,a=Wi(n),s=an(a,{tabbable:r,accept:i},n);s.currentNode=n[n.length-1].nextElementSibling;let o=s.previousNode();return o&&Ut(o,!0),o}}}const _$=["input:not([disabled]):not([type=hidden])","select:not([disabled])","textarea:not([disabled])","button:not([disabled])","a[href]","area[href]","summary","iframe","object","embed","audio[controls]","video[controls]","[contenteditable]"],EN=_$.join(":not([hidden]),")+",[tabindex]:not([disabled]):not([hidden])";_$.push('[tabindex]:not([tabindex="-1"]):not([disabled])');const SN=_$.join(':not([hidden]):not([tabindex="-1"]),');function Wi(e){return e[0].parentElement}function go(e){let t=Ge.getTreeNode(_e);for(;t&&t.scopeRef!==e;){if(t.contain)return!1;t=t.parent}return!0}function CN(e,t){let n=y.useRef(),r=y.useRef();he(()=>{let i=e.current;if(!t){r.current&&(cancelAnimationFrame(r.current),r.current=void 0);return}const a=ye(i?i[0]:void 0);let s=u=>{if(u.key!=="Tab"||u.altKey||u.ctrlKey||u.metaKey||!go(e)||u.isComposing)return;let c=a.activeElement,d=e.current;if(!d||!St(c,d))return;let f=Wi(d),h=an(f,{tabbable:!0},d);if(!c)return;h.currentNode=c;let p=u.shiftKey?h.previousNode():h.nextNode();p||(h.currentNode=u.shiftKey?d[d.length-1].nextElementSibling:d[0].previousElementSibling,p=u.shiftKey?h.previousNode():h.nextNode()),u.preventDefault(),p&&Ut(p,!0)},o=u=>{(!_e||id(_e,e))&&St(u.target,e.current)?(_e=e,n.current=u.target):go(e)&&!rd(u.target,e)?n.current?n.current.focus():_e&&_e.current&&ad(_e.current):go(e)&&(n.current=u.target)},l=u=>{r.current&&cancelAnimationFrame(r.current),r.current=requestAnimationFrame(()=>{if(a.activeElement&&go(e)&&!rd(a.activeElement,e))if(_e=e,a.body.contains(u.target)){var c;n.current=u.target,(c=n.current)===null||c===void 0||c.focus()}else _e.current&&ad(_e.current)})};return a.addEventListener("keydown",s,!1),a.addEventListener("focusin",o,!1),i==null||i.forEach(u=>u.addEventListener("focusin",o,!1)),i==null||i.forEach(u=>u.addEventListener("focusout",l,!1)),()=>{a.removeEventListener("keydown",s,!1),a.removeEventListener("focusin",o,!1),i==null||i.forEach(u=>u.removeEventListener("focusin",o,!1)),i==null||i.forEach(u=>u.removeEventListener("focusout",l,!1))}},[e,t]),he(()=>()=>{r.current&&cancelAnimationFrame(r.current)},[r])}function xE(e){return rd(e)}function St(e,t){return!e||!t?!1:t.some(n=>n.contains(e))}function rd(e,t=null){if(e instanceof Element&&e.closest("[data-react-aria-top-layer]"))return!0;for(let{scopeRef:n}of Ge.traverse(Ge.getTreeNode(t)))if(n&&St(e,n.current))return!0;return!1}function kN(e){return rd(e,_e)}function id(e,t){var n;let r=(n=Ge.getTreeNode(t))===null||n===void 0?void 0:n.parent;for(;r;){if(r.scopeRef===e)return!0;r=r.parent}return!1}function Ut(e,t=!1){if(e!=null&&!t)try{nd(e)}catch{}else if(e!=null)try{e.focus()}catch{}}function ad(e,t=!0){let n=e[0].previousElementSibling,r=Wi(e),i=an(r,{tabbable:t},e);i.currentNode=n;let a=i.nextNode();t&&!a&&(r=Wi(e),i=an(r,{tabbable:!1},e),i.currentNode=n,a=i.nextNode()),Ut(a)}function PN(e,t){const n=_.useRef(t);y.useEffect(()=>{if(n.current){_e=e;const r=ye(e.current?e.current[0]:void 0);!St(r.activeElement,_e.current)&&e.current&&ad(e.current)}n.current=!1},[e])}function TN(e,t,n){he(()=>{if(t||n)return;let r=e.current;const i=ye(r?r[0]:void 0);let a=s=>{let o=s.target;St(o,e.current)?_e=e:xE(o)||(_e=null)};return i.addEventListener("focusin",a,!1),r==null||r.forEach(s=>s.addEventListener("focusin",a,!1)),()=>{i.removeEventListener("focusin",a,!1),r==null||r.forEach(s=>s.removeEventListener("focusin",a,!1))}},[e,t,n])}function RN(e){let t=Ge.getTreeNode(_e);for(;t&&t.scopeRef!==e;){if(t.nodeToRestore)return!1;t=t.parent}return(t==null?void 0:t.scopeRef)===e}function MN(e,t,n){const r=y.useRef(typeof document<"u"?ye(e.current?e.current[0]:void 0).activeElement:null);he(()=>{let i=e.current;const a=ye(i?i[0]:void 0);if(!t||n)return;let s=()=>{(!_e||id(_e,e))&&St(a.activeElement,e.current)&&(_e=e)};return a.addEventListener("focusin",s,!1),i==null||i.forEach(o=>o.addEventListener("focusin",s,!1)),()=>{a.removeEventListener("focusin",s,!1),i==null||i.forEach(o=>o.removeEventListener("focusin",s,!1))}},[e,n]),he(()=>{const i=ye(e.current?e.current[0]:void 0);if(!t)return;let a=s=>{if(s.key!=="Tab"||s.altKey||s.ctrlKey||s.metaKey||!go(e)||s.isComposing)return;let o=i.activeElement;if(!St(o,e.current))return;let l=Ge.getTreeNode(e);if(!l)return;let u=l.nodeToRestore,c=an(i.body,{tabbable:!0});c.currentNode=o;let d=s.shiftKey?c.previousNode():c.nextNode();if((!u||!i.body.contains(u)||u===i.body)&&(u=void 0,l.nodeToRestore=void 0),(!d||!St(d,e.current))&&u){c.currentNode=u;do d=s.shiftKey?c.previousNode():c.nextNode();while(St(d,e.current));s.preventDefault(),s.stopPropagation(),d?Ut(d,!0):xE(u)?Ut(u,!0):o.blur()}};return n||i.addEventListener("keydown",a,!0),()=>{n||i.removeEventListener("keydown",a,!0)}},[e,t,n]),he(()=>{const i=ye(e.current?e.current[0]:void 0);if(!t)return;let a=Ge.getTreeNode(e);if(a){var s;return a.nodeToRestore=(s=r.current)!==null&&s!==void 0?s:void 0,()=>{let o=Ge.getTreeNode(e);if(!o)return;let l=o.nodeToRestore;if(t&&l&&(St(i.activeElement,e.current)||i.activeElement===i.body&&RN(e))){let u=Ge.clone();requestAnimationFrame(()=>{if(i.activeElement===i.body){let c=u.getTreeNode(e);for(;c;){if(c.nodeToRestore&&c.nodeToRestore.isConnected){Ut(c.nodeToRestore);return}c=c.parent}for(c=u.getTreeNode(e);c;){if(c.scopeRef&&c.scopeRef.current&&Ge.getTreeNode(c.scopeRef)){ad(c.scopeRef.current,!0);return}c=c.parent}}})}}}},[e,t])}function an(e,t,n){let r=t!=null&&t.tabbable?SN:EN,i=ye(e).createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode(a){var s;return!(t==null||(s=t.from)===null||s===void 0)&&s.contains(a)?NodeFilter.FILTER_REJECT:a.matches(r)&&$E(a)&&(!n||St(a,n))&&(!(t!=null&&t.accept)||t.accept(a))?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});return t!=null&&t.from&&(i.currentNode=t.from),i}function Lf(e,t={}){return{focusNext(n={}){let r=e.current;if(!r)return null;let{from:i,tabbable:a=t.tabbable,wrap:s=t.wrap,accept:o=t.accept}=n,l=i||ye(r).activeElement,u=an(r,{tabbable:a,accept:o});r.contains(l)&&(u.currentNode=l);let c=u.nextNode();return!c&&s&&(u.currentNode=r,c=u.nextNode()),c&&Ut(c,!0),c},focusPrevious(n=t){let r=e.current;if(!r)return null;let{from:i,tabbable:a=t.tabbable,wrap:s=t.wrap,accept:o=t.accept}=n,l=i||ye(r).activeElement,u=an(r,{tabbable:a,accept:o});if(r.contains(l))u.currentNode=l;else{let d=Hh(u);return d&&Ut(d,!0),d??null}let c=u.previousNode();if(!c&&s){u.currentNode=r;let d=Hh(u);if(!d)return null;c=d}return c&&Ut(c,!0),c??null},focusFirst(n=t){let r=e.current;if(!r)return null;let{tabbable:i=t.tabbable,accept:a=t.accept}=n,o=an(r,{tabbable:i,accept:a}).nextNode();return o&&Ut(o,!0),o},focusLast(n=t){let r=e.current;if(!r)return null;let{tabbable:i=t.tabbable,accept:a=t.accept}=n,s=an(r,{tabbable:i,accept:a}),o=Hh(s);return o&&Ut(o,!0),o??null}}}function Hh(e){let t,n;do n=e.lastChild(),n&&(t=n);while(n);return t}class E${get size(){return this.fastMap.size}getTreeNode(t){return this.fastMap.get(t)}addTreeNode(t,n,r){let i=this.fastMap.get(n??null);if(!i)return;let a=new Dg({scopeRef:t});i.addChild(a),a.parent=i,this.fastMap.set(t,a),r&&(a.nodeToRestore=r)}addNode(t){this.fastMap.set(t.scopeRef,t)}removeTreeNode(t){if(t===null)return;let n=this.fastMap.get(t);if(!n)return;let r=n.parent;for(let a of this.traverse())a!==n&&n.nodeToRestore&&a.nodeToRestore&&n.scopeRef&&n.scopeRef.current&&St(a.nodeToRestore,n.scopeRef.current)&&(a.nodeToRestore=n.nodeToRestore);let i=n.children;r&&(r.removeChild(n),i.size>0&&i.forEach(a=>r&&r.addChild(a))),this.fastMap.delete(n.scopeRef)}*traverse(t=this.root){if(t.scopeRef!=null&&(yield t),t.children.size>0)for(let n of t.children)yield*this.traverse(n)}clone(){var t;let n=new E$;var r;for(let i of this.traverse())n.addTreeNode(i.scopeRef,(r=(t=i.parent)===null||t===void 0?void 0:t.scopeRef)!==null&&r!==void 0?r:null,i.nodeToRestore);return n}constructor(){this.fastMap=new Map,this.root=new Dg({scopeRef:null}),this.fastMap.set(null,this.root)}}class Dg{addChild(t){this.children.add(t),t.parent=this}removeChild(t){this.children.delete(t),t.parent=void 0}constructor(t){this.children=new Set,this.contain=!1,this.scopeRef=t.scopeRef}}let Ge=new E$;function pl(e={}){let{autoFocus:t=!1,isTextInput:n,within:r}=e,i=y.useRef({isFocused:!1,isFocusVisible:t||bE()}),[a,s]=y.useState(!1),[o,l]=y.useState(()=>i.current.isFocused&&i.current.isFocusVisible),u=y.useCallback(()=>l(i.current.isFocused&&i.current.isFocusVisible),[]),c=y.useCallback(h=>{i.current.isFocused=h,s(h),u()},[u]);vN(h=>{i.current.isFocusVisible=h,u()},[],{isTextInput:n});let{focusProps:d}=hE({isDisabled:r,onFocusChange:c}),{focusWithinProps:f}=As({isDisabled:!r,onFocusWithinChange:c});return{isFocused:a,isFocusVisible:o,focusProps:r?f:d}}function wE(e){let{children:t,focusClass:n,focusRingClass:r}=e,{isFocused:i,isFocusVisible:a,focusProps:s}=pl(e),o=_.Children.only(t);return _.cloneElement(o,de(o.props,{...s,className:Ef({[n||""]:i,[r||""]:a})}))}let FN=_.createContext(null);function AN(e){let t=y.useContext(FN)||{};y$(t,e);let{ref:n,...r}=t;return r}function ON(e,t){let{focusProps:n}=hE(e),{keyboardProps:r}=$N(e),i=de(n,r),a=AN(t),s=e.isDisabled?{}:a,o=y.useRef(e.autoFocus);return y.useEffect(()=>{o.current&&t.current&&nd(t.current),o.current=!1},[t]),{focusableProps:de({...i,tabIndex:e.excludeFromTabOrder&&!e.isDisabled?-1:void 0},s)}}function BN(e){let{id:t,label:n,"aria-labelledby":r,"aria-label":i,labelElementType:a="label"}=e;t=Qn(t);let s=Qn(),o={};n?(r=r?`${s} ${r}`:s,o={id:s,htmlFor:a==="label"?t:void 0}):!r&&!i&&console.warn("If you do not provide a visible label, you must specify an aria-label or aria-labelledby attribute for accessibility");let l=jl({id:t,"aria-label":i,"aria-labelledby":r});return{labelProps:o,fieldProps:l}}function DE(e){let{description:t,errorMessage:n,isInvalid:r,validationState:i}=e,{labelProps:a,fieldProps:s}=BN(e),o=Xc([!!t,!!n,r,i]),l=Xc([!!t,!!n,r,i]);return s=de(s,{"aria-describedby":[o,l,e["aria-describedby"]].filter(Boolean).join(" ")||void 0}),{labelProps:a,fieldProps:s,descriptionProps:{id:o},errorMessageProps:{id:l}}}function IN(e,t){e=ci(e,"text");let{children:n,...r}=e,{styleProps:i}=st(r),a=Nn(t);return _.createElement("span",{...Xt(r),...i,ref:a},n)}const LN=y.forwardRef(IN);function _E(e,t){let{elementType:n="button",isDisabled:r,onPress:i,onPressStart:a,onPressEnd:s,onPressUp:o,onPressChange:l,preventFocusOnPress:u,allowFocusWhenDisabled:c,onClick:d,href:f,target:h,rel:p,type:g="button"}=e,b;n==="button"?b={type:g,disabled:r}:b={role:"button",tabIndex:r?void 0:0,href:n==="a"&&r?void 0:f,target:n==="a"?h:void 0,type:n==="input"?g:void 0,disabled:n==="input"?r:void 0,"aria-disabled":!r||n==="input"?void 0:r,rel:n==="a"?p:void 0};let{pressProps:v,isPressed:m}=w$({onPressStart:a,onPressEnd:s,onPressChange:l,onPress:i,onPressUp:o,isDisabled:r,preventFocusOnPress:u,ref:t}),{focusableProps:$}=ON(e,t);c&&($.tabIndex=r?-1:$.tabIndex);let w=de($,v,Xt(e,{labelable:!0}));return{isPressed:m,buttonProps:de(b,w,{"aria-haspopup":e["aria-haspopup"],"aria-expanded":e["aria-expanded"],"aria-controls":e["aria-controls"],"aria-pressed":e["aria-pressed"],onClick:D=>{d&&(d(D),console.warn("onClick is deprecated, please use onPress"))}})}}var EE={};EE={dateRange:e=>`${e.startDate} إلى ${e.endDate}`,dateSelected:e=>`${e.date} المحدد`,finishRangeSelectionPrompt:"انقر لإنهاء عملية تحديد نطاق التاريخ",maximumDate:"آخر تاريخ متاح",minimumDate:"أول تاريخ متاح",next:"التالي",previous:"السابق",selectedDateDescription:e=>`تاريخ محدد: ${e.date}`,selectedRangeDescription:e=>`المدى الزمني المحدد: ${e.dateRange}`,startRangeSelectionPrompt:"انقر لبدء عملية تحديد نطاق التاريخ",todayDate:e=>`اليوم، ${e.date}`,todayDateSelected:e=>`اليوم، ${e.date} محدد`};var SE={};SE={dateRange:e=>`${e.startDate} до ${e.endDate}`,dateSelected:e=>`Избрано е ${e.date}`,finishRangeSelectionPrompt:"Натиснете, за да довършите избора на времеви интервал",maximumDate:"Последна налична дата",minimumDate:"Първа налична дата",next:"Напред",previous:"Назад",selectedDateDescription:e=>`Избрана дата: ${e.date}`,selectedRangeDescription:e=>`Избран диапазон: ${e.dateRange}`,startRangeSelectionPrompt:"Натиснете, за да пристъпите към избора на времеви интервал",todayDate:e=>`Днес, ${e.date}`,todayDateSelected:e=>`Днес, ${e.date} са избрани`};var CE={};CE={dateRange:e=>`${e.startDate} až ${e.endDate}`,dateSelected:e=>`Vybráno ${e.date}`,finishRangeSelectionPrompt:"Kliknutím dokončíte výběr rozsahu dat",maximumDate:"Poslední dostupné datum",minimumDate:"První dostupné datum",next:"Další",previous:"Předchozí",selectedDateDescription:e=>`Vybrané datum: ${e.date}`,selectedRangeDescription:e=>`Vybrané období: ${e.dateRange}`,startRangeSelectionPrompt:"Kliknutím zahájíte výběr rozsahu dat",todayDate:e=>`Dnes, ${e.date}`,todayDateSelected:e=>`Dnes, vybráno ${e.date}`};var kE={};kE={dateRange:e=>`${e.startDate} til ${e.endDate}`,dateSelected:e=>`${e.date} valgt`,finishRangeSelectionPrompt:"Klik for at fuldføre valg af datoområde",maximumDate:"Sidste ledige dato",minimumDate:"Første ledige dato",next:"Næste",previous:"Forrige",selectedDateDescription:e=>`Valgt dato: ${e.date}`,selectedRangeDescription:e=>`Valgt interval: ${e.dateRange}`,startRangeSelectionPrompt:"Klik for at starte valg af datoområde",todayDate:e=>`I dag, ${e.date}`,todayDateSelected:e=>`I dag, ${e.date} valgt`};var PE={};PE={dateRange:e=>`${e.startDate} bis ${e.endDate}`,dateSelected:e=>`${e.date} ausgewählt`,finishRangeSelectionPrompt:"Klicken, um die Auswahl des Datumsbereichs zu beenden",maximumDate:"Letztes verfügbares Datum",minimumDate:"Erstes verfügbares Datum",next:"Weiter",previous:"Zurück",selectedDateDescription:e=>`Ausgewähltes Datum: ${e.date}`,selectedRangeDescription:e=>`Ausgewählter Bereich: ${e.dateRange}`,startRangeSelectionPrompt:"Klicken, um die Auswahl des Datumsbereichs zu beginnen",todayDate:e=>`Heute, ${e.date}`,todayDateSelected:e=>`Heute, ${e.date} ausgewählt`};var TE={};TE={dateRange:e=>`${e.startDate} έως ${e.endDate}`,dateSelected:e=>`Επιλέχθηκε ${e.date}`,finishRangeSelectionPrompt:"Κάντε κλικ για να ολοκληρώσετε την επιλογή εύρους ημερομηνιών",maximumDate:"Τελευταία διαθέσιμη ημερομηνία",minimumDate:"Πρώτη διαθέσιμη ημερομηνία",next:"Επόμενο",previous:"Προηγούμενο",selectedDateDescription:e=>`Επιλεγμένη ημερομηνία: ${e.date}`,selectedRangeDescription:e=>`Επιλεγμένο εύρος: ${e.dateRange}`,startRangeSelectionPrompt:"Κάντε κλικ για να ξεκινήσετε την επιλογή εύρους ημερομηνιών",todayDate:e=>`Σήμερα, ${e.date}`,todayDateSelected:e=>`Σήμερα, επιλέχτηκε ${e.date}`};var RE={};RE={previous:"Previous",next:"Next",selectedDateDescription:e=>`Selected Date: ${e.date}`,selectedRangeDescription:e=>`Selected Range: ${e.dateRange}`,todayDate:e=>`Today, ${e.date}`,todayDateSelected:e=>`Today, ${e.date} selected`,dateSelected:e=>`${e.date} selected`,startRangeSelectionPrompt:"Click to start selecting date range",finishRangeSelectionPrompt:"Click to finish selecting date range",minimumDate:"First available date",maximumDate:"Last available date",dateRange:e=>`${e.startDate} to ${e.endDate}`};var ME={};ME={dateRange:e=>`${e.startDate} a ${e.endDate}`,dateSelected:e=>`${e.date} seleccionado`,finishRangeSelectionPrompt:"Haga clic para terminar de seleccionar rango de fechas",maximumDate:"Última fecha disponible",minimumDate:"Primera fecha disponible",next:"Siguiente",previous:"Anterior",selectedDateDescription:e=>`Fecha seleccionada: ${e.date}`,selectedRangeDescription:e=>`Intervalo seleccionado: ${e.dateRange}`,startRangeSelectionPrompt:"Haga clic para comenzar a seleccionar un rango de fechas",todayDate:e=>`Hoy, ${e.date}`,todayDateSelected:e=>`Hoy, ${e.date} seleccionado`};var FE={};FE={dateRange:e=>`${e.startDate} kuni ${e.endDate}`,dateSelected:e=>`${e.date} valitud`,finishRangeSelectionPrompt:"Klõpsake kuupäevavahemiku valimise lõpetamiseks",maximumDate:"Viimane saadaolev kuupäev",minimumDate:"Esimene saadaolev kuupäev",next:"Järgmine",previous:"Eelmine",selectedDateDescription:e=>`Valitud kuupäev: ${e.date}`,selectedRangeDescription:e=>`Valitud vahemik: ${e.dateRange}`,startRangeSelectionPrompt:"Klõpsake kuupäevavahemiku valimiseks",todayDate:e=>`Täna, ${e.date}`,todayDateSelected:e=>`Täna, ${e.date} valitud`};var AE={};AE={dateRange:e=>`${e.startDate} – ${e.endDate}`,dateSelected:e=>`${e.date} valittu`,finishRangeSelectionPrompt:"Lopeta päivämääräalueen valinta napsauttamalla tätä.",maximumDate:"Viimeinen varattavissa oleva päivämäärä",minimumDate:"Ensimmäinen varattavissa oleva päivämäärä",next:"Seuraava",previous:"Edellinen",selectedDateDescription:e=>`Valittu päivämäärä: ${e.date}`,selectedRangeDescription:e=>`Valittu aikaväli: ${e.dateRange}`,startRangeSelectionPrompt:"Aloita päivämääräalueen valinta napsauttamalla tätä.",todayDate:e=>`Tänään, ${e.date}`,todayDateSelected:e=>`Tänään, ${e.date} valittu`};var OE={};OE={dateRange:e=>`${e.startDate} à ${e.endDate}`,dateSelected:e=>`${e.date} sélectionné`,finishRangeSelectionPrompt:"Cliquer pour finir de sélectionner la plage de dates",maximumDate:"Dernière date disponible",minimumDate:"Première date disponible",next:"Suivant",previous:"Précédent",selectedDateDescription:e=>`Date sélectionnée : ${e.date}`,selectedRangeDescription:e=>`Plage sélectionnée : ${e.dateRange}`,startRangeSelectionPrompt:"Cliquer pour commencer à sélectionner la plage de dates",todayDate:e=>`Aujourd'hui, ${e.date}`,todayDateSelected:e=>`Aujourd’hui, ${e.date} sélectionné`};var BE={};BE={dateRange:e=>`${e.startDate} עד ${e.endDate}`,dateSelected:e=>`${e.date} נבחר`,finishRangeSelectionPrompt:"חץ כדי לסיים את בחירת טווח התאריכים",maximumDate:"תאריך פנוי אחרון",minimumDate:"תאריך פנוי ראשון",next:"הבא",previous:"הקודם",selectedDateDescription:e=>`תאריך נבחר: ${e.date}`,selectedRangeDescription:e=>`טווח נבחר: ${e.dateRange}`,startRangeSelectionPrompt:"לחץ כדי להתחיל בבחירת טווח התאריכים",todayDate:e=>`היום, ${e.date}`,todayDateSelected:e=>`היום, ${e.date} נבחר`};var IE={};IE={dateRange:e=>`${e.startDate} do ${e.endDate}`,dateSelected:e=>`${e.date} odabran`,finishRangeSelectionPrompt:"Kliknite da dovršite raspon odabranih datuma",maximumDate:"Posljednji raspoloživi datum",minimumDate:"Prvi raspoloživi datum",next:"Sljedeći",previous:"Prethodni",selectedDateDescription:e=>`Odabrani datum: ${e.date}`,selectedRangeDescription:e=>`Odabrani raspon: ${e.dateRange}`,startRangeSelectionPrompt:"Kliknite da započnete raspon odabranih datuma",todayDate:e=>`Danas, ${e.date}`,todayDateSelected:e=>`Danas, odabran ${e.date}`};var LE={};LE={dateRange:e=>`${e.startDate}–${e.endDate}`,dateSelected:e=>`${e.date} kiválasztva`,finishRangeSelectionPrompt:"Kattintson a dátumtartomány kijelölésének befejezéséhez",maximumDate:"Utolsó elérhető dátum",minimumDate:"Az első elérhető dátum",next:"Következő",previous:"Előző",selectedDateDescription:e=>`Kijelölt dátum: ${e.date}`,selectedRangeDescription:e=>`Kijelölt tartomány: ${e.dateRange}`,startRangeSelectionPrompt:"Kattintson a dátumtartomány kijelölésének indításához",todayDate:e=>`Ma, ${e.date}`,todayDateSelected:e=>`Ma, ${e.date} kijelölve`};var NE={};NE={dateRange:e=>`Da ${e.startDate} a ${e.endDate}`,dateSelected:e=>`${e.date} selezionata`,finishRangeSelectionPrompt:"Fai clic per completare la selezione dell’intervallo di date",maximumDate:"Ultima data disponibile",minimumDate:"Prima data disponibile",next:"Successivo",previous:"Precedente",selectedDateDescription:e=>`Data selezionata: ${e.date}`,selectedRangeDescription:e=>`Intervallo selezionato: ${e.dateRange}`,startRangeSelectionPrompt:"Fai clic per selezionare l’intervallo di date",todayDate:e=>`Oggi, ${e.date}`,todayDateSelected:e=>`Oggi, ${e.date} selezionata`};var jE={};jE={dateRange:e=>`${e.startDate} から ${e.endDate}`,dateSelected:e=>`${e.date} を選択`,finishRangeSelectionPrompt:"クリックして日付範囲の選択を終了",maximumDate:"最終利用可能日",minimumDate:"最初の利用可能日",next:"次へ",previous:"前へ",selectedDateDescription:e=>`選択した日付 : ${e.date}`,selectedRangeDescription:e=>`選択範囲 : ${e.dateRange}`,startRangeSelectionPrompt:"クリックして日付範囲の選択を開始",todayDate:e=>`本日、${e.date}`,todayDateSelected:e=>`本日、${e.date} を選択`};var zE={};zE={dateRange:e=>`${e.startDate} ~ ${e.endDate}`,dateSelected:e=>`${e.date} 선택됨`,finishRangeSelectionPrompt:"날짜 범위 선택을 완료하려면 클릭하십시오.",maximumDate:"마지막으로 사용 가능한 일자",minimumDate:"처음으로 사용 가능한 일자",next:"다음",previous:"이전",selectedDateDescription:e=>`선택 일자: ${e.date}`,selectedRangeDescription:e=>`선택 범위: ${e.dateRange}`,startRangeSelectionPrompt:"날짜 범위 선택을 시작하려면 클릭하십시오.",todayDate:e=>`오늘, ${e.date}`,todayDateSelected:e=>`오늘, ${e.date} 선택됨`};var VE={};VE={dateRange:e=>`Nuo ${e.startDate} iki ${e.endDate}`,dateSelected:e=>`Pasirinkta ${e.date}`,finishRangeSelectionPrompt:"Spustelėkite, kad baigtumėte pasirinkti datų intervalą",maximumDate:"Paskutinė galima data",minimumDate:"Pirmoji galima data",next:"Paskesnis",previous:"Ankstesnis",selectedDateDescription:e=>`Pasirinkta data: ${e.date}`,selectedRangeDescription:e=>`Pasirinktas intervalas: ${e.dateRange}`,startRangeSelectionPrompt:"Spustelėkite, kad pradėtumėte pasirinkti datų intervalą",todayDate:e=>`Šiandien, ${e.date}`,todayDateSelected:e=>`Šiandien, pasirinkta ${e.date}`};var WE={};WE={dateRange:e=>`No ${e.startDate} līdz ${e.endDate}`,dateSelected:e=>`Atlasīts: ${e.date}`,finishRangeSelectionPrompt:"Noklikšķiniet, lai pabeigtu datumu diapazona atlasi",maximumDate:"Pēdējais pieejamais datums",minimumDate:"Pirmais pieejamais datums",next:"Tālāk",previous:"Atpakaļ",selectedDateDescription:e=>`Atlasītais datums: ${e.date}`,selectedRangeDescription:e=>`Atlasītais diapazons: ${e.dateRange}`,startRangeSelectionPrompt:"Noklikšķiniet, lai sāktu datumu diapazona atlasi",todayDate:e=>`Šodien, ${e.date}`,todayDateSelected:e=>`Atlasīta šodiena, ${e.date}`};var UE={};UE={dateRange:e=>`${e.startDate} til ${e.endDate}`,dateSelected:e=>`${e.date} valgt`,finishRangeSelectionPrompt:"Klikk for å fullføre valg av datoområde",maximumDate:"Siste tilgjengelige dato",minimumDate:"Første tilgjengelige dato",next:"Neste",previous:"Forrige",selectedDateDescription:e=>`Valgt dato: ${e.date}`,selectedRangeDescription:e=>`Valgt område: ${e.dateRange}`,startRangeSelectionPrompt:"Klikk for å starte valg av datoområde",todayDate:e=>`I dag, ${e.date}`,todayDateSelected:e=>`I dag, ${e.date} valgt`};var HE={};HE={dateRange:e=>`${e.startDate} tot ${e.endDate}`,dateSelected:e=>`${e.date} geselecteerd`,finishRangeSelectionPrompt:"Klik om de selectie van het datumbereik te voltooien",maximumDate:"Laatste beschikbare datum",minimumDate:"Eerste beschikbare datum",next:"Volgende",previous:"Vorige",selectedDateDescription:e=>`Geselecteerde datum: ${e.date}`,selectedRangeDescription:e=>`Geselecteerd bereik: ${e.dateRange}`,startRangeSelectionPrompt:"Klik om het datumbereik te selecteren",todayDate:e=>`Vandaag, ${e.date}`,todayDateSelected:e=>`Vandaag, ${e.date} geselecteerd`};var KE={};KE={dateRange:e=>`${e.startDate} do ${e.endDate}`,dateSelected:e=>`Wybrano ${e.date}`,finishRangeSelectionPrompt:"Kliknij, aby zakończyć wybór zakresu dat",maximumDate:"Ostatnia dostępna data",minimumDate:"Pierwsza dostępna data",next:"Dalej",previous:"Wstecz",selectedDateDescription:e=>`Wybrana data: ${e.date}`,selectedRangeDescription:e=>`Wybrany zakres: ${e.dateRange}`,startRangeSelectionPrompt:"Kliknij, aby rozpocząć wybór zakresu dat",todayDate:e=>`Dzisiaj, ${e.date}`,todayDateSelected:e=>`Dzisiaj wybrano ${e.date}`};var YE={};YE={dateRange:e=>`${e.startDate} a ${e.endDate}`,dateSelected:e=>`${e.date} selecionado`,finishRangeSelectionPrompt:"Clique para concluir a seleção do intervalo de datas",maximumDate:"Última data disponível",minimumDate:"Primeira data disponível",next:"Próximo",previous:"Anterior",selectedDateDescription:e=>`Data selecionada: ${e.date}`,selectedRangeDescription:e=>`Intervalo selecionado: ${e.dateRange}`,startRangeSelectionPrompt:"Clique para iniciar a seleção do intervalo de datas",todayDate:e=>`Hoje, ${e.date}`,todayDateSelected:e=>`Hoje, ${e.date} selecionado`};var qE={};qE={dateRange:e=>`${e.startDate} a ${e.endDate}`,dateSelected:e=>`${e.date} selecionado`,finishRangeSelectionPrompt:"Clique para terminar de selecionar o intervalo de datas",maximumDate:"Última data disponível",minimumDate:"Primeira data disponível",next:"Próximo",previous:"Anterior",selectedDateDescription:e=>`Data selecionada: ${e.date}`,selectedRangeDescription:e=>`Intervalo selecionado: ${e.dateRange}`,startRangeSelectionPrompt:"Clique para começar a selecionar o intervalo de datas",todayDate:e=>`Hoje, ${e.date}`,todayDateSelected:e=>`Hoje, ${e.date} selecionado`};var GE={};GE={dateRange:e=>`De la ${e.startDate} până la ${e.endDate}`,dateSelected:e=>`${e.date} selectată`,finishRangeSelectionPrompt:"Apăsaţi pentru a finaliza selecţia razei pentru dată",maximumDate:"Ultima dată disponibilă",minimumDate:"Prima dată disponibilă",next:"Următorul",previous:"Înainte",selectedDateDescription:e=>`Dată selectată: ${e.date}`,selectedRangeDescription:e=>`Interval selectat: ${e.dateRange}`,startRangeSelectionPrompt:"Apăsaţi pentru a începe selecţia razei pentru dată",todayDate:e=>`Astăzi, ${e.date}`,todayDateSelected:e=>`Azi, ${e.date} selectată`};var ZE={};ZE={dateRange:e=>`С ${e.startDate} по ${e.endDate}`,dateSelected:e=>`Выбрано ${e.date}`,finishRangeSelectionPrompt:"Щелкните, чтобы завершить выбор диапазона дат",maximumDate:"Последняя доступная дата",minimumDate:"Первая доступная дата",next:"Далее",previous:"Назад",selectedDateDescription:e=>`Выбранная дата: ${e.date}`,selectedRangeDescription:e=>`Выбранный диапазон: ${e.dateRange}`,startRangeSelectionPrompt:"Щелкните, чтобы начать выбор диапазона дат",todayDate:e=>`Сегодня, ${e.date}`,todayDateSelected:e=>`Сегодня, выбрано ${e.date}`};var XE={};XE={dateRange:e=>`Od ${e.startDate} do ${e.endDate}`,dateSelected:e=>`Vybratý dátum ${e.date}`,finishRangeSelectionPrompt:"Kliknutím dokončíte výber rozsahu dátumov",maximumDate:"Posledný dostupný dátum",minimumDate:"Prvý dostupný dátum",next:"Nasledujúce",previous:"Predchádzajúce",selectedDateDescription:e=>`Vybratý dátum: ${e.date}`,selectedRangeDescription:e=>`Vybratý rozsah: ${e.dateRange}`,startRangeSelectionPrompt:"Kliknutím spustíte výber rozsahu dátumov",todayDate:e=>`Dnes ${e.date}`,todayDateSelected:e=>`Vybratý dnešný dátum ${e.date}`};var QE={};QE={dateRange:e=>`${e.startDate} do ${e.endDate}`,dateSelected:e=>`${e.date} izbrano`,finishRangeSelectionPrompt:"Kliknite za dokončanje izbire datumskega obsega",maximumDate:"Zadnji razpoložljivi datum",minimumDate:"Prvi razpoložljivi datum",next:"Naprej",previous:"Nazaj",selectedDateDescription:e=>`Izbrani datum: ${e.date}`,selectedRangeDescription:e=>`Izbrano območje: ${e.dateRange}`,startRangeSelectionPrompt:"Kliknite za začetek izbire datumskega obsega",todayDate:e=>`Danes, ${e.date}`,todayDateSelected:e=>`Danes, ${e.date} izbrano`};var JE={};JE={dateRange:e=>`${e.startDate} do ${e.endDate}`,dateSelected:e=>`${e.date} izabran`,finishRangeSelectionPrompt:"Kliknite da dovršite opseg izabranih datuma",maximumDate:"Zadnji raspoloživi datum",minimumDate:"Prvi raspoloživi datum",next:"Sledeći",previous:"Prethodni",selectedDateDescription:e=>`Izabrani datum: ${e.date}`,selectedRangeDescription:e=>`Izabrani period: ${e.dateRange}`,startRangeSelectionPrompt:"Kliknite da započnete opseg izabranih datuma",todayDate:e=>`Danas, ${e.date}`,todayDateSelected:e=>`Danas, izabran ${e.date}`};var e7={};e7={dateRange:e=>`${e.startDate} till ${e.endDate}`,dateSelected:e=>`${e.date} har valts`,finishRangeSelectionPrompt:"Klicka för att avsluta val av datumintervall",maximumDate:"Sista tillgängliga datum",minimumDate:"Första tillgängliga datum",next:"Nästa",previous:"Föregående",selectedDateDescription:e=>`Valt datum: ${e.date}`,selectedRangeDescription:e=>`Valt intervall: ${e.dateRange}`,startRangeSelectionPrompt:"Klicka för att välja datumintervall",todayDate:e=>`Idag, ${e.date}`,todayDateSelected:e=>`Idag, ${e.date} har valts`};var t7={};t7={dateRange:e=>`${e.startDate} - ${e.endDate}`,dateSelected:e=>`${e.date} seçildi`,finishRangeSelectionPrompt:"Tarih aralığı seçimini tamamlamak için tıklayın",maximumDate:"Son müsait tarih",minimumDate:"İlk müsait tarih",next:"Sonraki",previous:"Önceki",selectedDateDescription:e=>`Seçilen Tarih: ${e.date}`,selectedRangeDescription:e=>`Seçilen Aralık: ${e.dateRange}`,startRangeSelectionPrompt:"Tarih aralığı seçimini başlatmak için tıklayın",todayDate:e=>`Bugün, ${e.date}`,todayDateSelected:e=>`Bugün, ${e.date} seçildi`};var n7={};n7={dateRange:e=>`${e.startDate} — ${e.endDate}`,dateSelected:e=>`Вибрано ${e.date}`,finishRangeSelectionPrompt:"Натисніть, щоб завершити вибір діапазону дат",maximumDate:"Остання доступна дата",minimumDate:"Перша доступна дата",next:"Наступний",previous:"Попередній",selectedDateDescription:e=>`Вибрана дата: ${e.date}`,selectedRangeDescription:e=>`Вибраний діапазон: ${e.dateRange}`,startRangeSelectionPrompt:"Натисніть, щоб почати вибір діапазону дат",todayDate:e=>`Сьогодні, ${e.date}`,todayDateSelected:e=>`Сьогодні, вибрано ${e.date}`};var r7={};r7={dateRange:e=>`${e.startDate} 至 ${e.endDate}`,dateSelected:e=>`已选择 ${e.date}`,finishRangeSelectionPrompt:"单击以完成选择日期范围",maximumDate:"最后一个可用日期",minimumDate:"第一个可用日期",next:"下一页",previous:"上一页",selectedDateDescription:e=>`选定的日期:${e.date}`,selectedRangeDescription:e=>`选定的范围:${e.dateRange}`,startRangeSelectionPrompt:"单击以开始选择日期范围",todayDate:e=>`今天,即 ${e.date}`,todayDateSelected:e=>`已选择今天,即 ${e.date}`};var i7={};i7={dateRange:e=>`${e.startDate} 至 ${e.endDate}`,dateSelected:e=>`已選取 ${e.date}`,finishRangeSelectionPrompt:"按一下以完成選取日期範圍",maximumDate:"最後一個可用日期",minimumDate:"第一個可用日期",next:"下一頁",previous:"上一頁",selectedDateDescription:e=>`選定的日期:${e.date}`,selectedRangeDescription:e=>`選定的範圍:${e.dateRange}`,startRangeSelectionPrompt:"按一下以開始選取日期範圍",todayDate:e=>`今天,${e.date}`,todayDateSelected:e=>`已選取今天,${e.date}`};var zl={};zl={"ar-AE":EE,"bg-BG":SE,"cs-CZ":CE,"da-DK":kE,"de-DE":PE,"el-GR":TE,"en-US":RE,"es-ES":ME,"et-EE":FE,"fi-FI":AE,"fr-FR":OE,"he-IL":BE,"hr-HR":IE,"hu-HU":LE,"it-IT":NE,"ja-JP":jE,"ko-KR":zE,"lt-LT":VE,"lv-LV":WE,"nb-NO":UE,"nl-NL":HE,"pl-PL":KE,"pt-BR":YE,"pt-PT":qE,"ro-RO":GE,"ru-RU":ZE,"sk-SK":XE,"sl-SI":QE,"sr-SP":JE,"sv-SE":e7,"tr-TR":t7,"uk-UA":n7,"zh-CN":r7,"zh-TW":i7};function a7(e){return e&&e.__esModule?e.default:e}const S$=new WeakMap;function ml(e){return(e==null?void 0:e.calendar.identifier)==="gregory"&&e.era==="BC"?"short":void 0}function NN(e){let t=Sn(a7(zl),"@react-aria/calendar"),n,r;"highlightedRange"in e?{start:n,end:r}=e.highlightedRange||{}:n=r=e.value;let i=xn({weekday:"long",month:"long",year:"numeric",day:"numeric",era:ml(n)||ml(r),timeZone:e.timeZone}),a="anchorDate"in e?e.anchorDate:null;return y.useMemo(()=>{if(!a&&n&&r)if(Ze(n,r)){let s=i.format(n.toDate(e.timeZone));return t.format("selectedDateDescription",{date:s})}else{let s=Eg(i,t,n,r,e.timeZone);return t.format("selectedRangeDescription",{dateRange:s})}return""},[n,r,a,e.timeZone,t,i])}function _g(e,t,n,r){let i=Sn(a7(zl),"@react-aria/calendar"),a=ml(e)||ml(t),s=xn({month:"long",year:"numeric",era:a,calendar:e.calendar.identifier,timeZone:n}),o=xn({month:"long",year:"numeric",day:"numeric",era:a,calendar:e.calendar.identifier,timeZone:n});return y.useMemo(()=>{if(Ze(e,na(e))){if(Ze(t,Uc(e)))return s.format(e.toDate(n));if(Ze(t,Uc(t)))return r?Eg(s,i,e,t,n):s.formatRange(e.toDate(n),t.toDate(n))}return r?Eg(o,i,e,t,n):o.formatRange(e.toDate(n),t.toDate(n))},[e,t,s,o,i,n,r])}function Eg(e,t,n,r,i){let a=e.formatRangeToParts(n.toDate(i),r.toDate(i)),s=-1;for(let u=0;u<a.length;u++){let c=a[u];if(c.source==="shared"&&c.type==="literal")s=u;else if(c.source==="endRange")break}let o="",l="";for(let u=0;u<a.length;u++)u<s?o+=a[u].value:u>s&&(l+=a[u].value);return t.format("dateRange",{startDate:o,endDate:l})}const s7=7e3;let Io=null;function Sg(e,t="assertive",n=s7){Io||(Io=new zN),Io.announce(e,t,n)}function jN(e){Io&&Io.clear(e)}class zN{createLog(t){let n=document.createElement("div");return n.setAttribute("role","log"),n.setAttribute("aria-live",t),n.setAttribute("aria-relevant","additions"),n}destroy(){this.node&&(document.body.removeChild(this.node),this.node=null)}announce(t,n="assertive",r=s7){if(!this.node)return;let i=document.createElement("div");i.textContent=t,n==="assertive"?this.assertiveLog.appendChild(i):this.politeLog.appendChild(i),t!==""&&setTimeout(()=>{i.remove()},r)}clear(t){this.node&&((!t||t==="assertive")&&(this.assertiveLog.innerHTML=""),(!t||t==="polite")&&(this.politeLog.innerHTML=""))}constructor(){this.node=document.createElement("div"),this.node.dataset.liveAnnouncer="true",Object.assign(this.node.style,{border:0,clip:"rect(0 0 0 0)",clipPath:"inset(50%)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap"}),this.assertiveLog=this.createLog("assertive"),this.node.appendChild(this.assertiveLog),this.politeLog=this.createLog("polite"),this.node.appendChild(this.politeLog),document.body.prepend(this.node)}}function VN(e){return e&&e.__esModule?e.default:e}function WN(e,t){let n=Sn(VN(zl),"@react-aria/calendar"),r=Xt(e),i=_g(t.visibleRange.start,t.visibleRange.end,t.timeZone,!1),a=_g(t.visibleRange.start,t.visibleRange.end,t.timeZone,!0);t5(()=>{t.isFocused||Sg(a)},[a]);let s=NN(t);t5(()=>{s&&Sg(s,"polite",4e3)},[s]);let o=Xc([!!e.errorMessage,e.isInvalid,e.validationState]);S$.set(t,{ariaLabel:e["aria-label"],ariaLabelledBy:e["aria-labelledby"],errorMessageId:o,selectedDateDescription:s});let[l,u]=y.useState(!1),c=e.isDisabled||t.isNextVisibleRangeInvalid();c&&l&&(u(!1),t.setFocused(!0));let[d,f]=y.useState(!1),h=e.isDisabled||t.isPreviousVisibleRangeInvalid();h&&d&&(f(!1),t.setFocused(!0));let p=jl({id:e.id,"aria-label":[e["aria-label"],a].filter(Boolean).join(", "),"aria-labelledby":e["aria-labelledby"]});return{calendarProps:de(r,p,{role:"application","aria-describedby":e["aria-describedby"]||void 0}),nextButtonProps:{onPress:()=>t.focusNextPage(),"aria-label":n.format("next"),isDisabled:c,onFocusChange:u},prevButtonProps:{onPress:()=>t.focusPreviousPage(),"aria-label":n.format("previous"),isDisabled:h,onFocusChange:f},errorMessageProps:{id:o},title:i}}function UN(e,t,n){let r=WN(e,t),i=y.useRef(!1),a=y.useRef(typeof window<"u"?window:null);return os(a,"pointerdown",o=>{i.current=o.width===0&&o.height===0}),os(a,"pointerup",o=>{if(i.current){i.current=!1;return}if(t.setDragging(!1),!t.anchorDate)return;let l=o.target;n.current&&n.current.contains(document.activeElement)&&(!n.current.contains(l)||!l.closest('button, [role="button"]'))&&t.selectFocusedDate()}),r.calendarProps.onBlur=o=>{n.current&&(!o.relatedTarget||!n.current.contains(o.relatedTarget))&&t.anchorDate&&t.selectFocusedDate()},os(n,"touchmove",o=>{t.isDragging&&o.preventDefault()},{passive:!1,capture:!0}),r}function HN(e,t){let{startDate:n=t.visibleRange.start,endDate:r=t.visibleRange.end}=e,{direction:i}=Qe(),a=h=>{switch(h.key){case"Enter":case" ":h.preventDefault(),t.selectFocusedDate();break;case"PageUp":h.preventDefault(),h.stopPropagation(),t.focusPreviousSection(h.shiftKey);break;case"PageDown":h.preventDefault(),h.stopPropagation(),t.focusNextSection(h.shiftKey);break;case"End":h.preventDefault(),h.stopPropagation(),t.focusSectionEnd();break;case"Home":h.preventDefault(),h.stopPropagation(),t.focusSectionStart();break;case"ArrowLeft":h.preventDefault(),h.stopPropagation(),i==="rtl"?t.focusNextDay():t.focusPreviousDay();break;case"ArrowUp":h.preventDefault(),h.stopPropagation(),t.focusPreviousRow();break;case"ArrowRight":h.preventDefault(),h.stopPropagation(),i==="rtl"?t.focusPreviousDay():t.focusNextDay();break;case"ArrowDown":h.preventDefault(),h.stopPropagation(),t.focusNextRow();break;case"Escape":"setAnchorDate"in t&&(h.preventDefault(),t.setAnchorDate(null));break}},s=_g(n,r,t.timeZone,!0),{ariaLabel:o,ariaLabelledBy:l}=S$.get(t),u=jl({"aria-label":[o,s].filter(Boolean).join(", "),"aria-labelledby":l}),c=xn({weekday:e.weekdayStyle||"narrow",timeZone:t.timeZone}),{locale:d}=Qe(),f=y.useMemo(()=>{let h=ul(Il(t.timeZone),d);return[...new Array(7).keys()].map(p=>{let b=h.add({days:p}).toDate(t.timeZone);return c.format(b)})},[d,t.timeZone,c]);return{gridProps:de(u,{role:"grid","aria-readonly":t.isReadOnly||null,"aria-disabled":t.isDisabled||null,"aria-multiselectable":"highlightedRange"in t||void 0,onKeyDown:a,onFocus:()=>t.setFocused(!0),onBlur:()=>t.setFocused(!1)}),headerProps:{"aria-hidden":!0},weekDays:f}}function KN(e){return e&&e.__esModule?e.default:e}function YN(e,t,n){let{date:r,isDisabled:i}=e,{errorMessageId:a,selectedDateDescription:s}=S$.get(t),o=Sn(KN(zl),"@react-aria/calendar"),l=xn({weekday:"long",day:"numeric",month:"long",year:"numeric",era:ml(r),timeZone:t.timeZone}),u=t.isSelected(r),c=t.isCellFocused(r);i=i||t.isCellDisabled(r);let d=t.isCellUnavailable(r),f=!i&&!d,h=t.isValueInvalid&&("highlightedRange"in t?!t.anchorDate&&t.highlightedRange&&r.compare(t.highlightedRange.start)>=0&&r.compare(t.highlightedRange.end)<=0:t.value&&Ze(t.value,r));h&&(u=!0),r=aE(r,sg);let p=y.useMemo(()=>r.toDate(t.timeZone),[r,t.timeZone]),g=w8(r,t.timeZone),b=y.useMemo(()=>{let E="";return"highlightedRange"in t&&t.value&&!t.anchorDate&&(Ze(r,t.value.start)||Ze(r,t.value.end))&&(E=s+", "),E+=l.format(p),g?E=o.format(u?"todayDateSelected":"todayDate",{date:E}):u&&(E=o.format("dateSelected",{date:E})),t.minValue&&Ze(r,t.minValue)?E+=", "+o.format("minimumDate"):t.maxValue&&Ze(r,t.maxValue)&&(E+=", "+o.format("maximumDate")),E},[l,p,o,u,g,r,t,s]),v="";"anchorDate"in t&&c&&!t.isReadOnly&&f&&(t.anchorDate?v=o.format("finishRangeSelectionPrompt"):v=o.format("startRangeSelectionPrompt"));let m=$$(v),$=y.useRef(!1),w=y.useRef(!1),D=y.useRef(null),{pressProps:S,isPressed:k}=w$({shouldCancelOnPointerExit:"anchorDate"in t&&!!t.anchorDate,preventFocusOnPress:!0,isDisabled:!f||t.isReadOnly,onPressStart(E){if(t.isReadOnly){t.setFocusedDate(r);return}if("highlightedRange"in t&&!t.anchorDate&&(E.pointerType==="mouse"||E.pointerType==="touch")){if(t.highlightedRange&&!h){if(Ze(r,t.highlightedRange.start)){t.setAnchorDate(t.highlightedRange.end),t.setFocusedDate(r),t.setDragging(!0),w.current=!0;return}else if(Ze(r,t.highlightedRange.end)){t.setAnchorDate(t.highlightedRange.start),t.setFocusedDate(r),t.setDragging(!0),w.current=!0;return}}let A=()=>{t.setDragging(!0),D.current=null,t.selectDate(r),t.setFocusedDate(r),$.current=!0};E.pointerType==="touch"?D.current=setTimeout(A,200):A()}},onPressEnd(){w.current=!1,$.current=!1,clearTimeout(D.current),D.current=null},onPress(){!("anchorDate"in t)&&!t.isReadOnly&&(t.selectDate(r),t.setFocusedDate(r))},onPressUp(E){if(!t.isReadOnly&&("anchorDate"in t&&D.current&&(t.selectDate(r),t.setFocusedDate(r)),"anchorDate"in t))if(w.current)t.setAnchorDate(r);else if(t.anchorDate&&!$.current)t.selectDate(r),t.setFocusedDate(r);else if(E.pointerType==="keyboard"&&!t.anchorDate){t.selectDate(r);let A=r.add({days:1});t.isInvalid(A)&&(A=r.subtract({days:1})),t.isInvalid(A)||t.setFocusedDate(A)}else E.pointerType==="virtual"&&(t.selectDate(r),t.setFocusedDate(r))}}),x=null;i||(x=Ze(r,t.focusedDate)?0:-1),y.useEffect(()=>{c&&n.current&&(Kr(n.current),yE()!=="pointer"&&document.activeElement===n.current&&iE(n.current,{containingElement:Ff(n.current)}))},[c,n]);let T=xn({day:"numeric",timeZone:t.timeZone,calendar:r.calendar.identifier}),P=y.useMemo(()=>T.formatToParts(p).find(E=>E.type==="day").value,[T,p]);return{cellProps:{role:"gridcell","aria-disabled":!f||null,"aria-selected":u||null,"aria-invalid":h||null},buttonProps:de(S,{onFocus(){i||t.setFocusedDate(r)},tabIndex:x,role:"button","aria-disabled":!f||null,"aria-label":b,"aria-invalid":h||null,"aria-describedby":[h?a:null,m["aria-describedby"]].filter(Boolean).join(" ")||void 0,onPointerEnter(E){"highlightDate"in t&&(E.pointerType!=="touch"||t.isDragging)&&f&&t.highlightDate(r)},onPointerDown(E){"releasePointerCapture"in E.target&&E.target.releasePointerCapture(E.pointerId)},onContextMenu(E){E.preventDefault()}}),isPressed:k,isFocused:c,isSelected:u,isDisabled:i,isUnavailable:d,isOutsideVisibleRange:r.compare(t.visibleRange.start)<0||r.compare(t.visibleRange.end)>0,isInvalid:h,formattedDate:P}}function qN(e,t,n){let{validationBehavior:r,focus:i}=e;he(()=>{if(r==="native"&&(n!=null&&n.current)){let l=t.realtimeValidation.isInvalid?t.realtimeValidation.validationErrors.join(" ")||"Invalid value.":"";n.current.setCustomValidity(l),n.current.hasAttribute("title")||(n.current.title=""),t.realtimeValidation.isInvalid||t.updateValidation(ZN(n.current))}});let a=pt(()=>{t.resetValidation()}),s=pt(l=>{var u;t.displayValidation.isInvalid||t.commitValidation();let c=n==null||(u=n.current)===null||u===void 0?void 0:u.form;if(!l.defaultPrevented&&n&&c&&XN(c)===n.current){var d;i?i():(d=n.current)===null||d===void 0||d.focus(),pN("keyboard")}l.preventDefault()}),o=pt(()=>{t.commitValidation()});y.useEffect(()=>{let l=n==null?void 0:n.current;if(!l)return;let u=l.form;return l.addEventListener("invalid",s),l.addEventListener("change",o),u==null||u.addEventListener("reset",a),()=>{l.removeEventListener("invalid",s),l.removeEventListener("change",o),u==null||u.removeEventListener("reset",a)}},[n,s,o,a,r])}function GN(e){let t=e.validity;return{badInput:t.badInput,customError:t.customError,patternMismatch:t.patternMismatch,rangeOverflow:t.rangeOverflow,rangeUnderflow:t.rangeUnderflow,stepMismatch:t.stepMismatch,tooLong:t.tooLong,tooShort:t.tooShort,typeMismatch:t.typeMismatch,valueMissing:t.valueMissing,valid:t.valid}}function ZN(e){return{isInvalid:!e.validity.valid,validationDetails:GN(e),validationErrors:e.validationMessage?[e.validationMessage]:[]}}function XN(e){for(let t=0;t<e.elements.length;t++){let n=e.elements[t];if(!n.validity.valid)return n}return null}const Nf={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valueMissing:!1,valid:!0},o7={...Nf,customError:!0,valid:!1},Li={isInvalid:!1,validationDetails:Nf,validationErrors:[]},QN=y.createContext({}),sd="__formValidationState"+Date.now();function l7(e){if(e[sd]){let{realtimeValidation:t,displayValidation:n,updateValidation:r,resetValidation:i,commitValidation:a}=e[sd];return{realtimeValidation:t,displayValidation:n,updateValidation:r,resetValidation:i,commitValidation:a}}return JN(e)}function JN(e){let{isInvalid:t,validationState:n,name:r,value:i,builtinValidation:a,validate:s,validationBehavior:o="aria"}=e;n&&(t||(t=n==="invalid"));let l=t!==void 0?{isInvalid:t,validationErrors:[],validationDetails:o7}:null,u=y.useMemo(()=>v5(ej(s,i)),[s,i]);a!=null&&a.validationDetails.valid&&(a=null);let c=y.useContext(QN),d=y.useMemo(()=>r?Array.isArray(r)?r.flatMap(P=>Cg(c[P])):Cg(c[r]):[],[c,r]),[f,h]=y.useState(c),[p,g]=y.useState(!1);c!==f&&(h(c),g(!1));let b=y.useMemo(()=>v5(p?[]:d),[p,d]),v=y.useRef(Li),[m,$]=y.useState(Li),w=y.useRef(Li),D=()=>{if(!S)return;k(!1);let P=u||a||v.current;Kh(P,w.current)||(w.current=P,$(P))},[S,k]=y.useState(!1);return y.useEffect(D),{realtimeValidation:l||b||u||a||Li,displayValidation:o==="native"?l||b||m:l||b||u||a||m,updateValidation(P){o==="aria"&&!Kh(m,P)?$(P):v.current=P},resetValidation(){let P=Li;Kh(P,w.current)||(w.current=P,$(P)),o==="native"&&k(!1),g(!0)},commitValidation(){o==="native"&&k(!0),g(!0)}}}function Cg(e){return e?Array.isArray(e)?e:[e]:[]}function ej(e,t){if(typeof e=="function"){let n=e(t);if(n&&typeof n!="boolean")return Cg(n)}return[]}function v5(e){return e.length?{isInvalid:!0,validationErrors:e,validationDetails:o7}:null}function Kh(e,t){return e===t?!0:e&&t&&e.isInvalid===t.isInvalid&&e.validationErrors.length===t.validationErrors.length&&e.validationErrors.every((n,r)=>n===t.validationErrors[r])&&Object.entries(e.validationDetails).every(([n,r])=>t.validationDetails[n]===r)}function od(...e){let t=new Set,n=!1,r={...Nf};for(let s of e){var i,a;for(let o of s.validationErrors)t.add(o);n||(n=s.isInvalid);for(let o in r)(i=r)[a=o]||(i[a]=s.validationDetails[o])}return r.valid=!n,{isInvalid:n,validationErrors:[...t],validationDetails:r}}const Ga={top:"top",bottom:"top",left:"left",right:"left"},ld={top:"bottom",bottom:"top",left:"right",right:"left"},tj={top:"left",left:"top"},kg={top:"height",left:"width"},u7={width:"totalWidth",height:"totalHeight"},Du={};let Lt=typeof document<"u"&&window.visualViewport;function b5(e){let t=0,n=0,r=0,i=0,a=0,s=0,o={},l=(Lt==null?void 0:Lt.scale)>1;if(e.tagName==="BODY"){let d=document.documentElement;r=d.clientWidth,i=d.clientHeight;var u;t=(u=Lt==null?void 0:Lt.width)!==null&&u!==void 0?u:r;var c;n=(c=Lt==null?void 0:Lt.height)!==null&&c!==void 0?c:i,o.top=d.scrollTop||e.scrollTop,o.left=d.scrollLeft||e.scrollLeft,Lt&&(a=Lt.offsetTop,s=Lt.offsetLeft)}else({width:t,height:n,top:a,left:s}=ls(e)),o.top=e.scrollTop,o.left=e.scrollLeft,r=t,i=n;return X8()&&(e.tagName==="BODY"||e.tagName==="HTML")&&l&&(o.top=0,o.left=0,a=Lt.pageTop,s=Lt.pageLeft),{width:t,height:n,totalWidth:r,totalHeight:i,scroll:o,top:a,left:s}}function nj(e){return{top:e.scrollTop,left:e.scrollLeft,width:e.scrollWidth,height:e.scrollHeight}}function y5(e,t,n,r,i,a,s){let o=i.scroll[e],l=r[kg[e]],u=r.scroll[Ga[e]]+a,c=l+r.scroll[Ga[e]]-a,d=t-o+s[e]-r[Ga[e]],f=t-o+n+s[e]-r[Ga[e]];return d<u?u-d:f>c?Math.max(c-f,u-d):0}function rj(e){let t=window.getComputedStyle(e);return{top:parseInt(t.marginTop,10)||0,bottom:parseInt(t.marginBottom,10)||0,left:parseInt(t.marginLeft,10)||0,right:parseInt(t.marginRight,10)||0}}function $5(e){if(Du[e])return Du[e];let[t,n]=e.split(" "),r=Ga[t]||"right",i=tj[r];Ga[n]||(n="center");let a=kg[r],s=kg[i];return Du[e]={placement:t,crossPlacement:n,axis:r,crossAxis:i,size:a,crossSize:s},Du[e]}function Yh(e,t,n,r,i,a,s,o,l,u){let{placement:c,crossPlacement:d,axis:f,crossAxis:h,size:p,crossSize:g}=r,b={};b[h]=e[h],d==="center"?b[h]+=(e[g]-n[g])/2:d!==h&&(b[h]+=e[g]-n[g]),b[h]+=a;const v=e[h]-n[g]+l+u,m=e[h]+e[g]-l-u;if(b[h]=gg(b[h],v,m),c===f){const $=o?s[p]:t[u7[p]];b[ld[f]]=Math.floor($-e[f]+i)}else b[f]=Math.floor(e[f]+e[p]+i);return b}function ij(e,t,n,r,i,a,s,o){const l=r?n.height:t[u7.height];let u=e.top!=null?n.top+e.top:n.top+(l-e.bottom-s),c=o!=="top"?Math.max(0,t.height+t.top+t.scroll.top-u-(i.top+i.bottom+a)):Math.max(0,u+s-(t.top+t.scroll.top)-(i.top+i.bottom+a));return Math.min(t.height-a*2,c)}function x5(e,t,n,r,i,a){let{placement:s,axis:o,size:l}=a;return s===o?Math.max(0,n[o]-e[o]-e.scroll[o]+t[o]-r[o]-r[ld[o]]-i):Math.max(0,e[l]+e[o]+e.scroll[o]-t[o]-n[o]-n[l]-r[o]-r[ld[o]]-i)}function aj(e,t,n,r,i,a,s,o,l,u,c,d,f,h,p,g){let b=$5(e),{size:v,crossAxis:m,crossSize:$,placement:w,crossPlacement:D}=b,S=Yh(t,o,n,b,c,d,u,f,p,g),k=c,x=x5(o,u,t,i,a+c,b);if(s&&r[v]>x){let I=$5(`${ld[w]} ${D}`),N=Yh(t,o,n,I,c,d,u,f,p,g);x5(o,u,t,i,a+c,I)>x&&(b=I,S=N,k=c)}let T="bottom";b.axis==="top"?b.placement==="top"?T="top":b.placement==="bottom"&&(T="bottom"):b.crossAxis==="top"&&(b.crossPlacement==="top"?T="bottom":b.crossPlacement==="bottom"&&(T="top"));let P=y5(m,S[m],n[$],o,l,a,u);S[m]+=P;let E=ij(S,o,u,f,i,a,n.height,T);h&&h<E&&(E=h),n.height=Math.min(n.height,E),S=Yh(t,o,n,b,k,d,u,f,p,g),P=y5(m,S[m],n[$],o,l,a,u),S[m]+=P;let A={},R=t[m]+.5*t[$]-S[m];const F=p/2+g,z=n[$]-p/2-g,B=t[m]-S[m]+p/2,C=t[m]+t[$]-S[m]-p/2,O=gg(R,B,C);return A[m]=gg(O,F,z),{position:S,maxHeight:E,arrowOffsetLeft:A.left,arrowOffsetTop:A.top,placement:b.placement}}function sj(e){let{placement:t,targetNode:n,overlayNode:r,scrollNode:i,padding:a,shouldFlip:s,boundaryElement:o,offset:l,crossOffset:u,maxHeight:c,arrowSize:d=0,arrowBoundaryOffset:f=0}=e,h=r instanceof HTMLElement?oj(r):document.documentElement,p=h===document.documentElement;const g=window.getComputedStyle(h).position;let b=!!g&&g!=="static",v=p?ls(n):w5(n,h);if(!p){let{marginTop:x,marginLeft:T}=window.getComputedStyle(n);v.top+=parseInt(x,10)||0,v.left+=parseInt(T,10)||0}let m=ls(r),$=rj(r);m.width+=$.left+$.right,m.height+=$.top+$.bottom;let w=nj(i),D=b5(o),S=b5(h),k=o.tagName==="BODY"?ls(h):w5(h,o);return h.tagName==="HTML"&&o.tagName==="BODY"&&(S.scroll.top=0,S.scroll.left=0),aj(t,v,m,w,$,a,s,D,S,k,l,u,b,c,d,f)}function ls(e){let{top:t,left:n,width:r,height:i}=e.getBoundingClientRect(),{scrollTop:a,scrollLeft:s,clientTop:o,clientLeft:l}=document.documentElement;return{top:t+a-o,left:n+s-l,width:r,height:i}}function w5(e,t){let n=window.getComputedStyle(e),r;if(n.position==="fixed"){let{top:i,left:a,width:s,height:o}=e.getBoundingClientRect();r={top:i,left:a,width:s,height:o}}else{r=ls(e);let i=ls(t),a=window.getComputedStyle(t);i.top+=(parseInt(a.borderTopWidth,10)||0)-t.scrollTop,i.left+=(parseInt(a.borderLeftWidth,10)||0)-t.scrollLeft,r.top-=i.top,r.left-=i.left}return r.top-=parseInt(n.marginTop,10)||0,r.left-=parseInt(n.marginLeft,10)||0,r}function oj(e){let t=e.offsetParent;if(t&&t===document.body&&window.getComputedStyle(t).position==="static"&&!D5(t)&&(t=document.documentElement),t==null)for(t=e.parentElement;t&&!D5(t);)t=t.parentElement;return t||document.documentElement}function D5(e){let t=window.getComputedStyle(e);return t.transform!=="none"||/transform|perspective/.test(t.willChange)||t.filter!=="none"||t.contain==="paint"||"backdropFilter"in t&&t.backdropFilter!=="none"||"WebkitBackdropFilter"in t&&t.WebkitBackdropFilter!=="none"}const c7=new WeakMap;function lj(e){let{triggerRef:t,isOpen:n,onClose:r}=e;y.useEffect(()=>{if(!n||r===null)return;let i=a=>{let s=a.target;if(!t.current||s instanceof Node&&!s.contains(t.current))return;let o=r||c7.get(t.current);o&&o()};return window.addEventListener("scroll",i,!0),()=>{window.removeEventListener("scroll",i,!0)}},[n,r,t])}let Ke=typeof document<"u"&&window.visualViewport;function uj(e){let{direction:t}=Qe(),{arrowSize:n=0,targetRef:r,overlayRef:i,scrollRef:a=i,placement:s="bottom",containerPadding:o=12,shouldFlip:l=!0,boundaryElement:u=typeof document<"u"?document.body:null,offset:c=0,crossOffset:d=0,shouldUpdatePosition:f=!0,isOpen:h=!0,onClose:p,maxHeight:g,arrowBoundaryOffset:b=0}=e,[v,m]=y.useState({position:{},arrowOffsetLeft:void 0,arrowOffsetTop:void 0,maxHeight:void 0,placement:void 0}),$=[f,s,i.current,r.current,a.current,o,l,u,c,d,h,t,g,b,n],w=y.useRef(Ke==null?void 0:Ke.scale);y.useEffect(()=>{h&&(w.current=Ke==null?void 0:Ke.scale)},[h]);let D=y.useCallback(()=>{if(f===!1||!h||!i.current||!r.current||!a.current||!u||(Ke==null?void 0:Ke.scale)!==w.current)return;let x=i.current;if(!g&&i.current){var T;x.style.top="0px",x.style.bottom="";var P;x.style.maxHeight=((P=(T=window.visualViewport)===null||T===void 0?void 0:T.height)!==null&&P!==void 0?P:window.innerHeight)+"px"}let E=sj({placement:dj(s,t),overlayNode:i.current,targetNode:r.current,scrollNode:a.current,padding:o,shouldFlip:l,boundaryElement:u,offset:c,crossOffset:d,maxHeight:g,arrowSize:n,arrowBoundaryOffset:b});x.style.top="",x.style.bottom="",Object.keys(E.position).forEach(A=>x.style[A]=E.position[A]+"px"),x.style.maxHeight=E.maxHeight!=null?E.maxHeight+"px":void 0,m(E)},$);he(D,$),cj(D),nE({ref:i,onResize:D});let S=y.useRef(!1);he(()=>{let x,T=()=>{S.current=!0,clearTimeout(x),x=setTimeout(()=>{S.current=!1},500),D()},P=()=>{S.current&&T()};return Ke==null||Ke.addEventListener("resize",T),Ke==null||Ke.addEventListener("scroll",P),()=>{Ke==null||Ke.removeEventListener("resize",T),Ke==null||Ke.removeEventListener("scroll",P)}},[D]);let k=y.useCallback(()=>{S.current||p()},[p,S]);return lj({triggerRef:r,isOpen:h,onClose:p&&k}),{overlayProps:{style:{position:"absolute",zIndex:1e5,...v.position,maxHeight:v.maxHeight}},placement:v.placement,arrowProps:{"aria-hidden":"true",role:"presentation",style:{left:v.arrowOffsetLeft,top:v.arrowOffsetTop}},updatePosition:D}}function cj(e){he(()=>(window.addEventListener("resize",e,!1),()=>{window.removeEventListener("resize",e,!1)}),[e])}function dj(e,t){return t==="rtl"?e.replace("start","right").replace("end","left"):e.replace("start","left").replace("end","right")}const rr=[];function d7(e,t){let{onClose:n,shouldCloseOnBlur:r,isOpen:i,isDismissable:a=!1,isKeyboardDismissDisabled:s=!1,shouldCloseOnInteractOutside:o}=e;y.useEffect(()=>(i&&rr.push(t),()=>{let p=rr.indexOf(t);p>=0&&rr.splice(p,1)}),[i,t]);let l=()=>{rr[rr.length-1]===t&&n&&n()},u=p=>{(!o||o(p.target))&&rr[rr.length-1]===t&&(p.stopPropagation(),p.preventDefault())},c=p=>{(!o||o(p.target))&&(rr[rr.length-1]===t&&(p.stopPropagation(),p.preventDefault()),l())},d=p=>{p.key==="Escape"&&!s&&!p.nativeEvent.isComposing&&(p.stopPropagation(),p.preventDefault(),l())};yN({ref:t,onInteractOutside:a&&i?c:null,onInteractOutsideStart:u});let{focusWithinProps:f}=As({isDisabled:!r,onBlurWithin:p=>{!p.relatedTarget||kN(p.relatedTarget)||(!o||o(p.relatedTarget))&&n()}}),h=p=>{p.target===p.currentTarget&&p.preventDefault()};return{overlayProps:{onKeyDown:d,...f},underlayProps:{onPointerDown:h}}}function fj(e,t,n){let{type:r}=e,{isOpen:i}=t;y.useEffect(()=>{n&&n.current&&c7.set(n.current,t.close)});let a;r==="menu"?a=!0:r==="listbox"&&(a="listbox");let s=Qn();return{triggerProps:{"aria-haspopup":a,"aria-expanded":i,"aria-controls":i?s:null,onPress:t.toggle},overlayProps:{id:s}}}const qh=typeof document<"u"&&window.visualViewport,hj=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);let _u=0,Gh;function f7(e={}){let{isDisabled:t}=e;he(()=>{if(!t)return _u++,_u===1&&(Mf()?Gh=mj():Gh=pj()),()=>{_u--,_u===0&&Gh()}},[t])}function pj(){return fl(Za(document.documentElement,"paddingRight",`${window.innerWidth-document.documentElement.clientWidth}px`),Za(document.documentElement,"overflow","hidden"))}function mj(){let e,t,n=u=>{e=Ff(u.target,!0),!(e===document.documentElement&&e===document.body)&&e instanceof HTMLElement&&window.getComputedStyle(e).overscrollBehavior==="auto"&&(t=Za(e,"overscrollBehavior","contain"))},r=u=>{if(!e||e===document.documentElement||e===document.body){u.preventDefault();return}e.scrollHeight===e.clientHeight&&e.scrollWidth===e.clientWidth&&u.preventDefault()},i=u=>{let c=u.target;E5(c)&&c!==document.activeElement&&(u.preventDefault(),o(),c.style.transform="translateY(-2000px)",c.focus(),requestAnimationFrame(()=>{c.style.transform=""})),t&&t()},a=u=>{let c=u.target;E5(c)&&(o(),c.style.transform="translateY(-2000px)",requestAnimationFrame(()=>{c.style.transform="",qh&&(qh.height<window.innerHeight?requestAnimationFrame(()=>{_5(c)}):qh.addEventListener("resize",()=>_5(c),{once:!0}))}))},s=null,o=()=>{if(s)return;let u=()=>{window.scrollTo(0,0)},c=window.pageXOffset,d=window.pageYOffset;s=fl(qs(window,"scroll",u),Za(document.documentElement,"paddingRight",`${window.innerWidth-document.documentElement.clientWidth}px`),Za(document.documentElement,"overflow","hidden"),Za(document.body,"marginTop",`-${d}px`),()=>{window.scrollTo(c,d)}),window.scrollTo(0,0)},l=fl(qs(document,"touchstart",n,{passive:!1,capture:!0}),qs(document,"touchmove",r,{passive:!1,capture:!0}),qs(document,"touchend",i,{passive:!1,capture:!0}),qs(document,"focus",a,!0));return()=>{t==null||t(),s==null||s(),l()}}function Za(e,t,n){let r=e.style[t];return e.style[t]=n,()=>{e.style[t]=r}}function qs(e,t,n,r){return e.addEventListener(t,n,r),()=>{e.removeEventListener(t,n,r)}}function _5(e){let t=document.scrollingElement||document.documentElement;for(;e&&e!==t;){let n=Ff(e);if(n!==document.documentElement&&n!==document.body&&n!==e){let r=n.getBoundingClientRect().top,i=e.getBoundingClientRect().top;i>r+e.clientHeight&&(n.scrollTop+=i-r)}e=n.parentElement}}function E5(e){return e instanceof HTMLInputElement&&!hj.has(e.type)||e instanceof HTMLTextAreaElement||e instanceof HTMLElement&&e.isContentEditable}const Pg=_.createContext(null);function gj(e){let{children:t}=e,n=y.useContext(Pg),[r,i]=y.useState(0),a=y.useMemo(()=>({parent:n,modalCount:r,addModal(){i(s=>s+1),n&&n.addModal()},removeModal(){i(s=>s-1),n&&n.removeModal()}}),[n,r]);return _.createElement(Pg.Provider,{value:a},t)}function vj(){let e=y.useContext(Pg);return{modalProviderProps:{"aria-hidden":e&&e.modalCount>0?!0:null}}}var h7={};h7={dismiss:"تجاهل"};var p7={};p7={dismiss:"Отхвърляне"};var m7={};m7={dismiss:"Odstranit"};var g7={};g7={dismiss:"Luk"};var v7={};v7={dismiss:"Schließen"};var b7={};b7={dismiss:"Απόρριψη"};var y7={};y7={dismiss:"Dismiss"};var $7={};$7={dismiss:"Descartar"};var x7={};x7={dismiss:"Lõpeta"};var w7={};w7={dismiss:"Hylkää"};var D7={};D7={dismiss:"Rejeter"};var _7={};_7={dismiss:"התעלם"};var E7={};E7={dismiss:"Odbaci"};var S7={};S7={dismiss:"Elutasítás"};var C7={};C7={dismiss:"Ignora"};var k7={};k7={dismiss:"閉じる"};var P7={};P7={dismiss:"무시"};var T7={};T7={dismiss:"Atmesti"};var R7={};R7={dismiss:"Nerādīt"};var M7={};M7={dismiss:"Lukk"};var F7={};F7={dismiss:"Negeren"};var A7={};A7={dismiss:"Zignoruj"};var O7={};O7={dismiss:"Descartar"};var B7={};B7={dismiss:"Dispensar"};var I7={};I7={dismiss:"Revocare"};var L7={};L7={dismiss:"Пропустить"};var N7={};N7={dismiss:"Zrušiť"};var j7={};j7={dismiss:"Opusti"};var z7={};z7={dismiss:"Odbaci"};var V7={};V7={dismiss:"Avvisa"};var W7={};W7={dismiss:"Kapat"};var U7={};U7={dismiss:"Скасувати"};var H7={};H7={dismiss:"取消"};var K7={};K7={dismiss:"關閉"};var Y7={};Y7={"ar-AE":h7,"bg-BG":p7,"cs-CZ":m7,"da-DK":g7,"de-DE":v7,"el-GR":b7,"en-US":y7,"es-ES":$7,"et-EE":x7,"fi-FI":w7,"fr-FR":D7,"he-IL":_7,"hr-HR":E7,"hu-HU":S7,"it-IT":C7,"ja-JP":k7,"ko-KR":P7,"lt-LT":T7,"lv-LV":R7,"nb-NO":M7,"nl-NL":F7,"pl-PL":A7,"pt-BR":O7,"pt-PT":B7,"ro-RO":I7,"ru-RU":L7,"sk-SK":N7,"sl-SI":j7,"sr-SP":z7,"sv-SE":V7,"tr-TR":W7,"uk-UA":U7,"zh-CN":H7,"zh-TW":K7};const S5={border:0,clip:"rect(0 0 0 0)",clipPath:"inset(50%)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap"};function bj(e={}){let{style:t,isFocusable:n}=e,[r,i]=y.useState(!1),{focusWithinProps:a}=As({isDisabled:!n,onFocusWithinChange:o=>i(o)}),s=y.useMemo(()=>r?t:t?{...S5,...t}:S5,[r]);return{visuallyHiddenProps:{...a,style:s}}}function Tg(e){let{children:t,elementType:n="div",isFocusable:r,style:i,...a}=e,{visuallyHiddenProps:s}=bj(e);return _.createElement(n,de(a,s),t)}function yj(e){return e&&e.__esModule?e.default:e}function ud(e){let{onDismiss:t,...n}=e,r=Sn(yj(Y7),"@react-aria/overlays"),i=jl(n,r.format("dismiss")),a=()=>{t&&t()};return _.createElement(Tg,null,_.createElement("button",{...i,tabIndex:-1,onClick:a,style:{width:1,height:1}}))}let Gs=new WeakMap,fn=[];function q7(e,t=document.body){let n=new Set(e),r=new Set,i=l=>{for(let f of l.querySelectorAll("[data-live-announcer], [data-react-aria-top-layer]"))n.add(f);let u=f=>{if(n.has(f)||r.has(f.parentElement)&&f.parentElement.getAttribute("role")!=="row")return NodeFilter.FILTER_REJECT;for(let h of n)if(f.contains(h))return NodeFilter.FILTER_SKIP;return NodeFilter.FILTER_ACCEPT},c=document.createTreeWalker(l,NodeFilter.SHOW_ELEMENT,{acceptNode:u}),d=u(l);if(d===NodeFilter.FILTER_ACCEPT&&a(l),d!==NodeFilter.FILTER_REJECT){let f=c.nextNode();for(;f!=null;)a(f),f=c.nextNode()}},a=l=>{var u;let c=(u=Gs.get(l))!==null&&u!==void 0?u:0;l.getAttribute("aria-hidden")==="true"&&c===0||(c===0&&l.setAttribute("aria-hidden","true"),r.add(l),Gs.set(l,c+1))};fn.length&&fn[fn.length-1].disconnect(),i(t);let s=new MutationObserver(l=>{for(let u of l)if(!(u.type!=="childList"||u.addedNodes.length===0)&&![...n,...r].some(c=>c.contains(u.target))){for(let c of u.removedNodes)c instanceof Element&&(n.delete(c),r.delete(c));for(let c of u.addedNodes)(c instanceof HTMLElement||c instanceof SVGElement)&&(c.dataset.liveAnnouncer==="true"||c.dataset.reactAriaTopLayer==="true")?n.add(c):c instanceof Element&&i(c)}});s.observe(t,{childList:!0,subtree:!0});let o={observe(){s.observe(t,{childList:!0,subtree:!0})},disconnect(){s.disconnect()}};return fn.push(o),()=>{s.disconnect();for(let l of r){let u=Gs.get(l);u===1?(l.removeAttribute("aria-hidden"),Gs.delete(l)):Gs.set(l,u-1)}o===fn[fn.length-1]?(fn.pop(),fn.length&&fn[fn.length-1].observe()):fn.splice(fn.indexOf(o),1)}}function $j(e,t){let{triggerRef:n,popoverRef:r,isNonModal:i,isKeyboardDismissDisabled:a,shouldCloseOnInteractOutside:s,...o}=e,{overlayProps:l,underlayProps:u}=d7({isOpen:t.isOpen,onClose:t.close,shouldCloseOnBlur:!0,isDismissable:!i,isKeyboardDismissDisabled:a,shouldCloseOnInteractOutside:s},r),{overlayProps:c,arrowProps:d,placement:f}=uj({...o,targetRef:n,overlayRef:r,isOpen:t.isOpen,onClose:i?t.close:null});return f7({isDisabled:i||!t.isOpen}),he(()=>{if(t.isOpen&&!i&&r.current)return q7([r.current])},[i,t.isOpen,r]),{popoverProps:de(l,c),arrowProps:d,underlayProps:u,placement:f}}const xj=y.createContext({});function wj(){var e;return(e=y.useContext(xj))!==null&&e!==void 0?e:{}}const G7=_.createContext(null);function Dj(e){let t=pa(),{portalContainer:n=t?null:document.body,isExiting:r}=e,[i,a]=y.useState(!1),s=y.useMemo(()=>({contain:i,setContain:a}),[i,a]),{getContainer:o}=wj();if(!e.portalContainer&&o&&(n=o()),!n)return null;let l=e.children;return e.disableFocusManagement||(l=_.createElement(DN,{restoreFocus:!0,contain:i&&!r},l)),l=_.createElement(G7.Provider,{value:s},_.createElement(uN,null,l)),fo.createPortal(l,n)}function Z7(){let e=y.useContext(G7),t=e==null?void 0:e.setContain;he(()=>{t==null||t(!0)},[t])}function X7(e,t,n){let{overlayProps:r,underlayProps:i}=d7({...e,isOpen:t.isOpen,onClose:t.close},n);return f7({isDisabled:!t.isOpen}),Z7(),y.useEffect(()=>{if(t.isOpen)return q7([n.current])},[t.isOpen,n]),{modalProps:de(r),underlayProps:i}}var Q7={};Q7={calendar:"التقويم",day:"يوم",dayPeriod:"ص/م",endDate:"تاريخ الانتهاء",era:"العصر",hour:"الساعات",minute:"الدقائق",month:"الشهر",second:"الثواني",selectedDateDescription:e=>`تاريخ محدد: ${e.date}`,selectedRangeDescription:e=>`المدى الزمني المحدد: ${e.startDate} إلى ${e.endDate}`,selectedTimeDescription:e=>`الوقت المحدد: ${e.time}`,startDate:"تاريخ البدء",timeZoneName:"التوقيت",weekday:"اليوم",year:"السنة"};var J7={};J7={calendar:"Календар",day:"ден",dayPeriod:"пр.об./сл.об.",endDate:"Крайна дата",era:"ера",hour:"час",minute:"минута",month:"месец",second:"секунда",selectedDateDescription:e=>`Избрана дата: ${e.date}`,selectedRangeDescription:e=>`Избран диапазон: ${e.startDate} до ${e.endDate}`,selectedTimeDescription:e=>`Избрано време: ${e.time}`,startDate:"Начална дата",timeZoneName:"часова зона",weekday:"ден от седмицата",year:"година"};var e9={};e9={calendar:"Kalendář",day:"den",dayPeriod:"část dne",endDate:"Konečné datum",era:"letopočet",hour:"hodina",minute:"minuta",month:"měsíc",second:"sekunda",selectedDateDescription:e=>`Vybrané datum: ${e.date}`,selectedRangeDescription:e=>`Vybrané období: ${e.startDate} až ${e.endDate}`,selectedTimeDescription:e=>`Vybraný čas: ${e.time}`,startDate:"Počáteční datum",timeZoneName:"časové pásmo",weekday:"den v týdnu",year:"rok"};var t9={};t9={calendar:"Kalender",day:"dag",dayPeriod:"AM/PM",endDate:"Slutdato",era:"æra",hour:"time",minute:"minut",month:"måned",second:"sekund",selectedDateDescription:e=>`Valgt dato: ${e.date}`,selectedRangeDescription:e=>`Valgt interval: ${e.startDate} til ${e.endDate}`,selectedTimeDescription:e=>`Valgt tidspunkt: ${e.time}`,startDate:"Startdato",timeZoneName:"tidszone",weekday:"ugedag",year:"år"};var n9={};n9={calendar:"Kalender",day:"Tag",dayPeriod:"Tageshälfte",endDate:"Enddatum",era:"Epoche",hour:"Stunde",minute:"Minute",month:"Monat",second:"Sekunde",selectedDateDescription:e=>`Ausgewähltes Datum: ${e.date}`,selectedRangeDescription:e=>`Ausgewählter Bereich: ${e.startDate} bis ${e.endDate}`,selectedTimeDescription:e=>`Ausgewählte Zeit: ${e.time}`,startDate:"Anfangsdatum",timeZoneName:"Zeitzone",weekday:"Wochentag",year:"Jahr"};var r9={};r9={calendar:"Ημερολόγιο",day:"ημέρα",dayPeriod:"π.μ./μ.μ.",endDate:"Ημερομηνία λήξης",era:"περίοδος",hour:"ώρα",minute:"λεπτό",month:"μήνας",second:"δευτερόλεπτο",selectedDateDescription:e=>`Επιλεγμένη ημερομηνία: ${e.date}`,selectedRangeDescription:e=>`Επιλεγμένο εύρος: ${e.startDate} έως ${e.endDate}`,selectedTimeDescription:e=>`Επιλεγμένη ώρα: ${e.time}`,startDate:"Ημερομηνία έναρξης",timeZoneName:"ζώνη ώρας",weekday:"καθημερινή",year:"έτος"};var i9={};i9={era:"era",year:"year",month:"month",day:"day",hour:"hour",minute:"minute",second:"second",dayPeriod:"AM/PM",calendar:"Calendar",startDate:"Start Date",endDate:"End Date",weekday:"day of the week",timeZoneName:"time zone",selectedDateDescription:e=>`Selected Date: ${e.date}`,selectedRangeDescription:e=>`Selected Range: ${e.startDate} to ${e.endDate}`,selectedTimeDescription:e=>`Selected Time: ${e.time}`};var a9={};a9={calendar:"Calendario",day:"día",dayPeriod:"a. m./p. m.",endDate:"Fecha final",era:"era",hour:"hora",minute:"minuto",month:"mes",second:"segundo",selectedDateDescription:e=>`Fecha seleccionada: ${e.date}`,selectedRangeDescription:e=>`Rango seleccionado: ${e.startDate} a ${e.endDate}`,selectedTimeDescription:e=>`Hora seleccionada: ${e.time}`,startDate:"Fecha de inicio",timeZoneName:"zona horaria",weekday:"día de la semana",year:"año"};var s9={};s9={calendar:"Kalender",day:"päev",dayPeriod:"enne/pärast lõunat",endDate:"Lõppkuupäev",era:"ajastu",hour:"tund",minute:"minut",month:"kuu",second:"sekund",selectedDateDescription:e=>`Valitud kuupäev: ${e.date}`,selectedRangeDescription:e=>`Valitud vahemik: ${e.startDate} kuni ${e.endDate}`,selectedTimeDescription:e=>`Valitud aeg: ${e.time}`,startDate:"Alguskuupäev",timeZoneName:"ajavöönd",weekday:"nädalapäev",year:"aasta"};var o9={};o9={calendar:"Kalenteri",day:"päivä",dayPeriod:"vuorokaudenaika",endDate:"Päättymispäivä",era:"aikakausi",hour:"tunti",minute:"minuutti",month:"kuukausi",second:"sekunti",selectedDateDescription:e=>`Valittu päivämäärä: ${e.date}`,selectedRangeDescription:e=>`Valittu aikaväli: ${e.startDate} – ${e.endDate}`,selectedTimeDescription:e=>`Valittu aika: ${e.time}`,startDate:"Alkamispäivä",timeZoneName:"aikavyöhyke",weekday:"viikonpäivä",year:"vuosi"};var l9={};l9={calendar:"Calendrier",day:"jour",dayPeriod:"cadran",endDate:"Date de fin",era:"ère",hour:"heure",minute:"minute",month:"mois",second:"seconde",selectedDateDescription:e=>`Date sélectionnée : ${e.date}`,selectedRangeDescription:e=>`Plage sélectionnée : ${e.startDate} au ${e.endDate}`,selectedTimeDescription:e=>`Heure choisie : ${e.time}`,startDate:"Date de début",timeZoneName:"fuseau horaire",weekday:"jour de la semaine",year:"année"};var u9={};u9={calendar:"לוח שנה",day:"יום",dayPeriod:"לפנה״צ/אחה״צ",endDate:"תאריך סיום",era:"תקופה",hour:"שעה",minute:"דקה",month:"חודש",second:"שנייה",selectedDateDescription:e=>`תאריך נבחר: ${e.date}`,selectedRangeDescription:e=>`טווח נבחר: ${e.startDate} עד ${e.endDate}`,selectedTimeDescription:e=>`זמן נבחר: ${e.time}`,startDate:"תאריך התחלה",timeZoneName:"אזור זמן",weekday:"יום בשבוע",year:"שנה"};var c9={};c9={calendar:"Kalendar",day:"dan",dayPeriod:"AM/PM",endDate:"Datum završetka",era:"era",hour:"sat",minute:"minuta",month:"mjesec",second:"sekunda",selectedDateDescription:e=>`Odabrani datum: ${e.date}`,selectedRangeDescription:e=>`Odabrani raspon: ${e.startDate} do ${e.endDate}`,selectedTimeDescription:e=>`Odabrano vrijeme: ${e.time}`,startDate:"Datum početka",timeZoneName:"vremenska zona",weekday:"dan u tjednu",year:"godina"};var d9={};d9={calendar:"Naptár",day:"nap",dayPeriod:"napszak",endDate:"Befejező dátum",era:"éra",hour:"óra",minute:"perc",month:"hónap",second:"másodperc",selectedDateDescription:e=>`Kijelölt dátum: ${e.date}`,selectedRangeDescription:e=>`Kijelölt tartomány: ${e.startDate}–${e.endDate}`,selectedTimeDescription:e=>`Kijelölt idő: ${e.time}`,startDate:"Kezdő dátum",timeZoneName:"időzóna",weekday:"hét napja",year:"év"};var f9={};f9={calendar:"Calendario",day:"giorno",dayPeriod:"AM/PM",endDate:"Data finale",era:"era",hour:"ora",minute:"minuto",month:"mese",second:"secondo",selectedDateDescription:e=>`Data selezionata: ${e.date}`,selectedRangeDescription:e=>`Intervallo selezionato: da ${e.startDate} a ${e.endDate}`,selectedTimeDescription:e=>`Ora selezionata: ${e.time}`,startDate:"Data iniziale",timeZoneName:"fuso orario",weekday:"giorno della settimana",year:"anno"};var h9={};h9={calendar:"カレンダー",day:"日",dayPeriod:"午前/午後",endDate:"終了日",era:"時代",hour:"時",minute:"分",month:"月",second:"秒",selectedDateDescription:e=>`選択した日付 : ${e.date}`,selectedRangeDescription:e=>`選択範囲 : ${e.startDate} から ${e.endDate}`,selectedTimeDescription:e=>`選択した時間 : ${e.time}`,startDate:"開始日",timeZoneName:"タイムゾーン",weekday:"曜日",year:"年"};var p9={};p9={calendar:"달력",day:"일",dayPeriod:"오전/오후",endDate:"종료일",era:"연호",hour:"시",minute:"분",month:"월",second:"초",selectedDateDescription:e=>`선택 일자: ${e.date}`,selectedRangeDescription:e=>`선택 범위: ${e.startDate} ~ ${e.endDate}`,selectedTimeDescription:e=>`선택 시간: ${e.time}`,startDate:"시작일",timeZoneName:"시간대",weekday:"요일",year:"년"};var m9={};m9={calendar:"Kalendorius",day:"diena",dayPeriod:"iki pietų / po pietų",endDate:"Pabaigos data",era:"era",hour:"valanda",minute:"minutė",month:"mėnuo",second:"sekundė",selectedDateDescription:e=>`Pasirinkta data: ${e.date}`,selectedRangeDescription:e=>`Pasirinktas intervalas: nuo ${e.startDate} iki ${e.endDate}`,selectedTimeDescription:e=>`Pasirinktas laikas: ${e.time}`,startDate:"Pradžios data",timeZoneName:"laiko juosta",weekday:"savaitės diena",year:"metai"};var g9={};g9={calendar:"Kalendārs",day:"diena",dayPeriod:"priekšpusdienā/pēcpusdienā",endDate:"Beigu datums",era:"ēra",hour:"stundas",minute:"minūtes",month:"mēnesis",second:"sekundes",selectedDateDescription:e=>`Atlasītais datums: ${e.date}`,selectedRangeDescription:e=>`Atlasītais diapazons: no ${e.startDate} līdz ${e.endDate}`,selectedTimeDescription:e=>`Atlasītais laiks: ${e.time}`,startDate:"Sākuma datums",timeZoneName:"laika josla",weekday:"nedēļas diena",year:"gads"};var v9={};v9={calendar:"Kalender",day:"dag",dayPeriod:"a.m./p.m.",endDate:"Sluttdato",era:"tidsalder",hour:"time",minute:"minutt",month:"måned",second:"sekund",selectedDateDescription:e=>`Valgt dato: ${e.date}`,selectedRangeDescription:e=>`Valgt område: ${e.startDate} til ${e.endDate}`,selectedTimeDescription:e=>`Valgt tid: ${e.time}`,startDate:"Startdato",timeZoneName:"tidssone",weekday:"ukedag",year:"år"};var b9={};b9={calendar:"Kalender",day:"dag",dayPeriod:"a.m./p.m.",endDate:"Einddatum",era:"tijdperk",hour:"uur",minute:"minuut",month:"maand",second:"seconde",selectedDateDescription:e=>`Geselecteerde datum: ${e.date}`,selectedRangeDescription:e=>`Geselecteerd bereik: ${e.startDate} tot ${e.endDate}`,selectedTimeDescription:e=>`Geselecteerde tijd: ${e.time}`,startDate:"Startdatum",timeZoneName:"tijdzone",weekday:"dag van de week",year:"jaar"};var y9={};y9={calendar:"Kalendarz",day:"dzień",dayPeriod:"rano / po południu / wieczorem",endDate:"Data końcowa",era:"era",hour:"godzina",minute:"minuta",month:"miesiąc",second:"sekunda",selectedDateDescription:e=>`Wybrana data: ${e.date}`,selectedRangeDescription:e=>`Wybrany zakres: ${e.startDate} do ${e.endDate}`,selectedTimeDescription:e=>`Wybrany czas: ${e.time}`,startDate:"Data początkowa",timeZoneName:"strefa czasowa",weekday:"dzień tygodnia",year:"rok"};var $9={};$9={calendar:"Calendário",day:"dia",dayPeriod:"AM/PM",endDate:"Data final",era:"era",hour:"hora",minute:"minuto",month:"mês",second:"segundo",selectedDateDescription:e=>`Data selecionada: ${e.date}`,selectedRangeDescription:e=>`Intervalo selecionado: ${e.startDate} a ${e.endDate}`,selectedTimeDescription:e=>`Hora selecionada: ${e.time}`,startDate:"Data inicial",timeZoneName:"fuso horário",weekday:"dia da semana",year:"ano"};var x9={};x9={calendar:"Calendário",day:"dia",dayPeriod:"am/pm",endDate:"Data de Término",era:"era",hour:"hora",minute:"minuto",month:"mês",second:"segundo",selectedDateDescription:e=>`Data selecionada: ${e.date}`,selectedRangeDescription:e=>`Intervalo selecionado: ${e.startDate} a ${e.endDate}`,selectedTimeDescription:e=>`Hora selecionada: ${e.time}`,startDate:"Data de Início",timeZoneName:"fuso horário",weekday:"dia da semana",year:"ano"};var w9={};w9={calendar:"Calendar",day:"zi",dayPeriod:"a.m/p.m.",endDate:"Dată final",era:"eră",hour:"oră",minute:"minut",month:"lună",second:"secundă",selectedDateDescription:e=>`Dată selectată: ${e.date}`,selectedRangeDescription:e=>`Interval selectat: de la ${e.startDate} până la ${e.endDate}`,selectedTimeDescription:e=>`Ora selectată: ${e.time}`,startDate:"Dată început",timeZoneName:"fus orar",weekday:"ziua din săptămână",year:"an"};var D9={};D9={calendar:"Календарь",day:"день",dayPeriod:"AM/PM",endDate:"Дата окончания",era:"эра",hour:"час",minute:"минута",month:"месяц",second:"секунда",selectedDateDescription:e=>`Выбранная дата: ${e.date}`,selectedRangeDescription:e=>`Выбранный диапазон: с ${e.startDate} по ${e.endDate}`,selectedTimeDescription:e=>`Выбранное время: ${e.time}`,startDate:"Дата начала",timeZoneName:"часовой пояс",weekday:"день недели",year:"год"};var _9={};_9={calendar:"Kalendár",day:"deň",dayPeriod:"AM/PM",endDate:"Dátum ukončenia",era:"letopočet",hour:"hodina",minute:"minúta",month:"mesiac",second:"sekunda",selectedDateDescription:e=>`Vybratý dátum: ${e.date}`,selectedRangeDescription:e=>`Vybratý rozsah: od ${e.startDate} do ${e.endDate}`,selectedTimeDescription:e=>`Vybratý čas: ${e.time}`,startDate:"Dátum začatia",timeZoneName:"časové pásmo",weekday:"deň týždňa",year:"rok"};var E9={};E9={calendar:"Koledar",day:"dan",dayPeriod:"dop/pop",endDate:"Datum konca",era:"doba",hour:"ura",minute:"minuta",month:"mesec",second:"sekunda",selectedDateDescription:e=>`Izbrani datum: ${e.date}`,selectedRangeDescription:e=>`Izbrano območje: ${e.startDate} do ${e.endDate}`,selectedTimeDescription:e=>`Izbrani čas: ${e.time}`,startDate:"Datum začetka",timeZoneName:"časovni pas",weekday:"dan v tednu",year:"leto"};var S9={};S9={calendar:"Kalendar",day:"дан",dayPeriod:"пре подне/по подне",endDate:"Datum završetka",era:"ера",hour:"сат",minute:"минут",month:"месец",second:"секунд",selectedDateDescription:e=>`Izabrani datum: ${e.date}`,selectedRangeDescription:e=>`Izabrani opseg: od ${e.startDate} do ${e.endDate}`,selectedTimeDescription:e=>`Izabrano vreme: ${e.time}`,startDate:"Datum početka",timeZoneName:"временска зона",weekday:"дан у недељи",year:"година"};var C9={};C9={calendar:"Kalender",day:"dag",dayPeriod:"fm/em",endDate:"Slutdatum",era:"era",hour:"timme",minute:"minut",month:"månad",second:"sekund",selectedDateDescription:e=>`Valt datum: ${e.date}`,selectedRangeDescription:e=>`Valt intervall: ${e.startDate} till ${e.endDate}`,selectedTimeDescription:e=>`Vald tid: ${e.time}`,startDate:"Startdatum",timeZoneName:"tidszon",weekday:"veckodag",year:"år"};var k9={};k9={calendar:"Takvim",day:"gün",dayPeriod:"ÖÖ/ÖS",endDate:"Bitiş Tarihi",era:"çağ",hour:"saat",minute:"dakika",month:"ay",second:"saniye",selectedDateDescription:e=>`Seçilen Tarih: ${e.date}`,selectedRangeDescription:e=>`Seçilen Aralık: ${e.startDate} - ${e.endDate}`,selectedTimeDescription:e=>`Seçilen Zaman: ${e.time}`,startDate:"Başlangıç Tarihi",timeZoneName:"saat dilimi",weekday:"haftanın günü",year:"yıl"};var P9={};P9={calendar:"Календар",day:"день",dayPeriod:"дп/пп",endDate:"Дата завершення",era:"ера",hour:"година",minute:"хвилина",month:"місяць",second:"секунда",selectedDateDescription:e=>`Вибрана дата: ${e.date}`,selectedRangeDescription:e=>`Вибраний діапазон: ${e.startDate} — ${e.endDate}`,selectedTimeDescription:e=>`Вибраний час: ${e.time}`,startDate:"Дата початку",timeZoneName:"часовий пояс",weekday:"день тижня",year:"рік"};var T9={};T9={calendar:"日历",day:"日",dayPeriod:"上午/下午",endDate:"结束日期",era:"纪元",hour:"小时",minute:"分钟",month:"月",second:"秒",selectedDateDescription:e=>`选定的日期:${e.date}`,selectedRangeDescription:e=>`选定的范围:${e.startDate} 至 ${e.endDate}`,selectedTimeDescription:e=>`选定的时间:${e.time}`,startDate:"开始日期",timeZoneName:"时区",weekday:"工作日",year:"年"};var R9={};R9={calendar:"日曆",day:"日",dayPeriod:"上午/下午",endDate:"結束日期",era:"纪元",hour:"小时",minute:"分钟",month:"月",second:"秒",selectedDateDescription:e=>`選定的日期:${e.date}`,selectedRangeDescription:e=>`選定的範圍:${e.startDate} 至 ${e.endDate}`,selectedTimeDescription:e=>`選定的時間:${e.time}`,startDate:"開始日期",timeZoneName:"时区",weekday:"工作日",year:"年"};var jf={};jf={"ar-AE":Q7,"bg-BG":J7,"cs-CZ":e9,"da-DK":t9,"de-DE":n9,"el-GR":r9,"en-US":i9,"es-ES":a9,"et-EE":s9,"fi-FI":o9,"fr-FR":l9,"he-IL":u9,"hr-HR":c9,"hu-HU":d9,"it-IT":f9,"ja-JP":h9,"ko-KR":p9,"lt-LT":m9,"lv-LV":g9,"nb-NO":v9,"nl-NL":b9,"pl-PL":y9,"pt-BR":$9,"pt-PT":x9,"ro-RO":w9,"ru-RU":D9,"sk-SK":_9,"sl-SI":E9,"sr-SP":S9,"sv-SE":C9,"tr-TR":k9,"uk-UA":P9,"zh-CN":T9,"zh-TW":R9};function M9(e,t,n){let{direction:r}=Qe(),i=y.useMemo(()=>Lf(t),[t]),a=l=>{if(l.currentTarget.contains(l.target)&&(l.altKey&&(l.key==="ArrowDown"||l.key==="ArrowUp")&&"setOpen"in e&&(l.preventDefault(),l.stopPropagation(),e.setOpen(!0)),!n))switch(l.key){case"ArrowLeft":l.preventDefault(),l.stopPropagation(),r==="rtl"?i.focusNext():i.focusPrevious();break;case"ArrowRight":l.preventDefault(),l.stopPropagation(),r==="rtl"?i.focusPrevious():i.focusNext();break}},s=()=>{var l;let u=(l=window.event)===null||l===void 0?void 0:l.target,c=an(t.current,{tabbable:!0});if(u&&(c.currentNode=u,u=c.previousNode()),!u){let d;do d=c.lastChild(),d&&(u=d);while(d)}for(;u!=null&&u.hasAttribute("data-placeholder");){let d=c.previousNode();if(d&&d.hasAttribute("data-placeholder"))u=d;else break}u&&u.focus()},{pressProps:o}=w$({preventFocusOnPress:!0,allowTextSelectionOnPress:!0,onPressStart(l){l.pointerType==="mouse"&&s()},onPress(l){l.pointerType!=="mouse"&&s()}});return de(o,{onKeyDown:a})}function _j(e){return e&&e.__esModule?e.default:e}const F9=new WeakMap,oc="__role_"+Date.now(),A9="__focusManager_"+Date.now();function O9(e,t,n){var r;let{isInvalid:i,validationErrors:a,validationDetails:s}=t.displayValidation,{labelProps:o,fieldProps:l,descriptionProps:u,errorMessageProps:c}=DE({...e,labelElementType:"span",isInvalid:i,errorMessage:e.errorMessage||a}),d=y.useRef(null),{focusWithinProps:f}=As({...e,onFocusWithin(P){var E;d.current=t.value,(E=e.onFocus)===null||E===void 0||E.call(e,P)},onBlurWithin:P=>{var E;t.confirmPlaceholder(),t.value!==d.current&&t.commitValidation(),(E=e.onBlur)===null||E===void 0||E.call(e,P)},onFocusWithinChange:e.onFocusChange}),h=Sn(_j(jf),"@react-aria/datepicker"),p=t.maxGranularity==="hour"?"selectedTimeDescription":"selectedDateDescription",g=t.maxGranularity==="hour"?"time":"date",b=t.value?h.format(p,{[g]:t.formatValue({month:"long"})}):"",v=$$(b),m=e[oc]==="presentation"?l["aria-describedby"]:[v["aria-describedby"],l["aria-describedby"]].filter(Boolean).join(" ")||void 0,$=e[A9],w=y.useMemo(()=>$||Lf(n),[$,n]),D=M9(t,n,e[oc]==="presentation");F9.set(t,{ariaLabel:e["aria-label"],ariaLabelledBy:[o.id,e["aria-labelledby"]].filter(Boolean).join(" ")||void 0,ariaDescribedBy:m,focusManager:w});let S=y.useRef(e.autoFocus),k;e[oc]==="presentation"?k={role:"presentation"}:k=de(l,{role:"group","aria-disabled":e.isDisabled||void 0,"aria-describedby":m}),y.useEffect(()=>{S.current&&w.focusFirst(),S.current=!1},[w]),FL(e.inputRef,t.value,t.setValue),qN({...e,focus(){w.focusFirst()}},t,e.inputRef);let x={type:"hidden",name:e.name,value:((r=t.value)===null||r===void 0?void 0:r.toString())||""};e.validationBehavior==="native"&&(x.type="text",x.hidden=!0,x.required=e.isRequired,x.onChange=()=>{});let T=Xt(e);return{labelProps:{...o,onClick:()=>{w.focusFirst()}},fieldProps:de(T,k,D,f,{onKeyDown(P){e.onKeyDown&&e.onKeyDown(P)},onKeyUp(P){e.onKeyUp&&e.onKeyUp(P)}}),inputProps:x,descriptionProps:u,errorMessageProps:c,isInvalid:i,validationErrors:a,validationDetails:s}}function Ej(e,t,n){var r;let i=O9(e,t,n);return i.inputProps.value=((r=t.timeValue)===null||r===void 0?void 0:r.toString())||"",i}function Sj(e){return e&&e.__esModule?e.default:e}function B9(){let{locale:e}=Qe(),t=$8(Sj(jf),"@react-aria/datepicker");return y.useMemo(()=>{try{return new Intl.DisplayNames(e,{type:"dateTimeField"})}catch{return new Cj(e,t)}},[e,t])}class Cj{of(t){return this.dictionary.getStringForLocale(t,this.locale)}constructor(t,n){this.locale=t,this.dictionary=n}}var I9={};I9={Empty:"فارغ"};var L9={};L9={Empty:"Изпразни"};var N9={};N9={Empty:"Prázdné"};var j9={};j9={Empty:"Tom"};var z9={};z9={Empty:"Leer"};var V9={};V9={Empty:"Άδειο"};var W9={};W9={Empty:"Empty"};var U9={};U9={Empty:"Vacío"};var H9={};H9={Empty:"Tühjenda"};var K9={};K9={Empty:"Tyhjä"};var Y9={};Y9={Empty:"Vide"};var q9={};q9={Empty:"ריק"};var G9={};G9={Empty:"Prazno"};var Z9={};Z9={Empty:"Üres"};var X9={};X9={Empty:"Vuoto"};var Q9={};Q9={Empty:"空"};var J9={};J9={Empty:"비어 있음"};var eS={};eS={Empty:"Tuščias"};var tS={};tS={Empty:"Tukšs"};var nS={};nS={Empty:"Tom"};var rS={};rS={Empty:"Leeg"};var iS={};iS={Empty:"Pusty"};var aS={};aS={Empty:"Vazio"};var sS={};sS={Empty:"Vazio"};var oS={};oS={Empty:"Gol"};var lS={};lS={Empty:"Не заполнено"};var uS={};uS={Empty:"Prázdne"};var cS={};cS={Empty:"Prazen"};var dS={};dS={Empty:"Prazno"};var fS={};fS={Empty:"Tomt"};var hS={};hS={Empty:"Boş"};var pS={};pS={Empty:"Пусто"};var mS={};mS={Empty:"空"};var gS={};gS={Empty:"空白"};var vS={};vS={"ar-AE":I9,"bg-BG":L9,"cs-CZ":N9,"da-DK":j9,"de-DE":z9,"el-GR":V9,"en-US":W9,"es-ES":U9,"et-EE":H9,"fi-FI":K9,"fr-FR":Y9,"he-IL":q9,"hr-HR":G9,"hu-HU":Z9,"it-IT":X9,"ja-JP":Q9,"ko-KR":J9,"lt-LT":eS,"lv-LV":tS,"nb-NO":nS,"nl-NL":rS,"pl-PL":iS,"pt-BR":aS,"pt-PT":sS,"ro-RO":oS,"ru-RU":lS,"sk-SK":uS,"sl-SI":cS,"sr-SP":dS,"sv-SE":fS,"tr-TR":hS,"uk-UA":pS,"zh-CN":mS,"zh-TW":gS};function kj(e){return e&&e.__esModule?e.default:e}function Pj(e){const t=y.useRef();let{value:n,textValue:r,minValue:i,maxValue:a,isDisabled:s,isReadOnly:o,isRequired:l,onIncrement:u,onIncrementPage:c,onDecrement:d,onDecrementPage:f,onDecrementToMin:h,onIncrementToMax:p}=e;const g=Sn(kj(vS),"@react-aria/spinbutton"),b=()=>clearTimeout(t.current);y.useEffect(()=>()=>b(),[]);let v=E=>{if(!(E.ctrlKey||E.metaKey||E.shiftKey||E.altKey||o))switch(E.key){case"PageUp":if(c){E.preventDefault(),c==null||c();break}case"ArrowUp":case"Up":u&&(E.preventDefault(),u==null||u());break;case"PageDown":if(f){E.preventDefault(),f==null||f();break}case"ArrowDown":case"Down":d&&(E.preventDefault(),d==null||d());break;case"Home":h&&(E.preventDefault(),h==null||h());break;case"End":p&&(E.preventDefault(),p==null||p());break}},m=y.useRef(!1),$=()=>{m.current=!0},w=()=>{m.current=!1},D=r===""?g.format("Empty"):(r||`${n}`).replace("-","−");y.useEffect(()=>{m.current&&(jN("assertive"),Sg(D,"assertive"))},[D]);const S=pt(E=>{b(),u==null||u(),t.current=window.setTimeout(()=>{(a===void 0||isNaN(a)||n===void 0||isNaN(n)||n<a)&&S(60)},E)}),k=pt(E=>{b(),d==null||d(),t.current=window.setTimeout(()=>{(i===void 0||isNaN(i)||n===void 0||isNaN(n)||n>i)&&k(60)},E)});let x=E=>{E.preventDefault()},{addGlobalListener:T,removeAllGlobalListeners:P}=tE();return{spinButtonProps:{role:"spinbutton","aria-valuenow":n!==void 0&&!isNaN(n)?n:void 0,"aria-valuetext":D,"aria-valuemin":i,"aria-valuemax":a,"aria-disabled":s||void 0,"aria-readonly":o||void 0,"aria-required":l||void 0,onKeyDown:v,onFocus:$,onBlur:w},incrementButtonProps:{onPressStart:()=>{S(400),T(window,"contextmenu",x)},onPressEnd:()=>{b(),P()},onFocus:$,onBlur:w},decrementButtonProps:{onPressStart:()=>{k(400),T(window,"contextmenu",x)},onPressEnd:()=>{b(),P()},onFocus:$,onBlur:w}}}function Tj(e,t,n){let r=y.useRef(""),{locale:i}=Qe(),a=B9(),{ariaLabel:s,ariaLabelledBy:o,ariaDescribedBy:l,focusManager:u}=F9.get(t),c=e.isPlaceholder?"":e.text,d=y.useMemo(()=>t.dateFormatter.resolvedOptions(),[t.dateFormatter]),f=xn({month:"long",timeZone:d.timeZone}),h=xn({hour:"numeric",hour12:d.hour12,timeZone:d.timeZone});if(e.type==="month"&&!e.isPlaceholder){let C=f.format(t.dateValue);c=C!==c?`${c} – ${C}`:C}else e.type==="hour"&&!e.isPlaceholder&&(c=h.format(t.dateValue));let{spinButtonProps:p}=Pj({value:e.value,textValue:c,minValue:e.minValue,maxValue:e.maxValue,isDisabled:t.isDisabled,isReadOnly:t.isReadOnly||!e.isEditable,isRequired:t.isRequired,onIncrement:()=>{r.current="",t.increment(e.type)},onDecrement:()=>{r.current="",t.decrement(e.type)},onIncrementPage:()=>{r.current="",t.incrementPage(e.type)},onDecrementPage:()=>{r.current="",t.decrementPage(e.type)},onIncrementToMax:()=>{r.current="",t.setSegment(e.type,e.maxValue)},onDecrementToMin:()=>{r.current="",t.setSegment(e.type,e.minValue)}}),g=y.useMemo(()=>new oE(i,{maximumFractionDigits:0}),[i]),b=()=>{if(e.text===e.placeholder&&u.focusPrevious(),g.isValidPartialNumber(e.text)&&!t.isReadOnly&&!e.isPlaceholder){let C=e.text.slice(0,-1),O=g.parse(C);C=O===0?"":C,C.length===0||O===0?t.clearSegment(e.type):t.setSegment(e.type,O),r.current=C}else e.type==="dayPeriod"&&t.clearSegment(e.type)},v=C=>{if(C.key==="a"&&(Ds()?C.metaKey:C.ctrlKey)&&C.preventDefault(),!(C.ctrlKey||C.metaKey||C.shiftKey||C.altKey))switch(C.key){case"Backspace":case"Delete":C.preventDefault(),C.stopPropagation(),b();break}},{startsWith:m}=UL({sensitivity:"base"}),$=xn({hour:"numeric",hour12:!0}),w=y.useMemo(()=>{let C=new Date;return C.setHours(0),$.formatToParts(C).find(O=>O.type==="dayPeriod").value},[$]),D=y.useMemo(()=>{let C=new Date;return C.setHours(12),$.formatToParts(C).find(O=>O.type==="dayPeriod").value},[$]),S=xn({year:"numeric",era:"narrow",timeZone:"UTC"}),k=y.useMemo(()=>{if(e.type!=="era")return[];let C=Oe(new Je(1,1,1),t.calendar),O=t.calendar.getEras().map(N=>{let X=C.set({year:1,month:1,day:1,era:N}).toDate("UTC"),je=S.formatToParts(X).find($e=>$e.type==="era").value;return{era:N,formatted:je}}),I=Rj(O.map(N=>N.formatted));if(I)for(let N of O)N.formatted=N.formatted.slice(I);return O},[S,t.calendar,e.type]),x=C=>{if(t.isDisabled||t.isReadOnly)return;let O=r.current+C;switch(e.type){case"dayPeriod":if(m(w,C))t.setSegment("dayPeriod",0);else if(m(D,C))t.setSegment("dayPeriod",12);else break;u.focusNext();break;case"era":{let I=k.find(N=>m(N.formatted,C));I&&(t.setSegment("era",I.era),u.focusNext());break}case"day":case"hour":case"minute":case"second":case"month":case"year":{if(!g.isValidPartialNumber(O))return;let I=g.parse(O),N=I,X=e.minValue===0;if(e.type==="hour"&&t.dateFormatter.resolvedOptions().hour12){switch(t.dateFormatter.resolvedOptions().hourCycle){case"h11":I>11&&(N=g.parse(C));break;case"h12":X=!1,I>12&&(N=g.parse(C));break}e.value>=12&&I>1&&(I+=12)}else I>e.maxValue&&(N=g.parse(C));if(isNaN(I))return;let Q=N!==0||X;Q&&t.setSegment(e.type,N),+(I+"0")>e.maxValue||O.length>=String(e.maxValue).length?(r.current="",Q&&u.focusNext()):r.current=O;break}}},T=()=>{r.current="",iE(n.current,{containingElement:Ff(n.current)}),window.getSelection().collapse(n.current)},P=y.useRef("");os(n,"beforeinput",C=>{switch(C.preventDefault(),C.inputType){case"deleteContentBackward":case"deleteContentForward":g.isValidPartialNumber(e.text)&&!t.isReadOnly&&b();break;case"insertCompositionText":P.current=n.current.textContent,n.current.textContent=n.current.textContent;break;default:C.data!=null&&x(C.data);break}}),os(n,"input",C=>{let{inputType:O,data:I}=C;switch(O){case"insertCompositionText":n.current.textContent=P.current,(m(w,I)||m(D,I))&&x(I);break}}),he(()=>{let C=n.current;return()=>{document.activeElement===C&&(u.focusPrevious()||u.focusNext())}},[n,u]);let E=Mf()||e.type==="timeZoneName"?{role:"textbox","aria-valuemax":null,"aria-valuemin":null,"aria-valuetext":null,"aria-valuenow":null}:{},A=y.useMemo(()=>t.segments.find(C=>C.isEditable),[t.segments]);e!==A&&!t.isInvalid&&(l=void 0);let R=Qn(),F=!t.isDisabled&&!t.isReadOnly&&e.isEditable,z=e.type==="literal"?"":a.of(e.type),B=jl({"aria-label":`${z}${s?`, ${s}`:""}${o?", ":""}`,"aria-labelledby":o});return e.type==="literal"?{segmentProps:{"aria-hidden":!0}}:{segmentProps:de(p,B,{id:R,...E,"aria-invalid":t.isInvalid?"true":void 0,"aria-describedby":l,"aria-readonly":t.isReadOnly||!e.isEditable?"true":void 0,"data-placeholder":e.isPlaceholder||void 0,contentEditable:F,suppressContentEditableWarning:F,spellCheck:F?"false":void 0,autoCapitalize:F?"off":void 0,autoCorrect:F?"off":void 0,[parseInt(_.version,10)>=17?"enterKeyHint":"enterkeyhint"]:F?"next":void 0,inputMode:t.isDisabled||e.type==="dayPeriod"||e.type==="era"||!F?void 0:"numeric",tabIndex:t.isDisabled?void 0:0,onKeyDown:v,onFocus:T,style:{caretColor:"transparent"},onPointerDown(C){C.stopPropagation()},onMouseDown(C){C.stopPropagation()}})}}function Rj(e){e.sort();let t=e[0],n=e[e.length-1];for(let r=0;r<t.length;r++)if(t[r]!==n[r])return r;return 0}function Mj(e){return e&&e.__esModule?e.default:e}function Fj(e,t,n){var r,i;let a=Sn(Mj(jf),"@react-aria/datepicker"),{isInvalid:s,validationErrors:o,validationDetails:l}=t.displayValidation,{labelProps:u,fieldProps:c,descriptionProps:d,errorMessageProps:f}=DE({...e,labelElementType:"span",isInvalid:s,errorMessage:e.errorMessage||o}),h=c["aria-labelledby"]||c.id,{locale:p}=Qe(),g=t.formatValue(p,{month:"long"}),b=g?a.format("selectedRangeDescription",{startDate:g.start,endDate:g.end}):"",v=$$(b),m={"aria-label":a.format("startDate"),"aria-labelledby":h},$={"aria-label":a.format("endDate"),"aria-labelledby":h},w=Qn(),D=Qn(),S=M9(t,n),k=[v["aria-describedby"],c["aria-describedby"]].filter(Boolean).join(" ")||void 0,x=y.useMemo(()=>Lf(n,{accept:F=>F.id!==w}),[n,w]),T={[A9]:x,[oc]:"presentation","aria-describedby":k,placeholderValue:e.placeholderValue,hideTimeZone:e.hideTimeZone,hourCycle:e.hourCycle,granularity:e.granularity,shouldForceLeadingZeros:e.shouldForceLeadingZeros,isDisabled:e.isDisabled,isReadOnly:e.isReadOnly,isRequired:e.isRequired,validationBehavior:e.validationBehavior},P=Xt(e),{focusWithinProps:E}=As({...e,isDisabled:t.isOpen,onBlurWithin:e.onBlur,onFocusWithin:e.onFocus,onFocusWithinChange:e.onFocusChange}),A=y.useRef(Li),R=y.useRef(Li);return{groupProps:de(P,S,c,v,E,{role:"group","aria-disabled":e.isDisabled||null,"aria-describedby":k,onKeyDown(F){t.isOpen||e.onKeyDown&&e.onKeyDown(F)},onKeyUp(F){t.isOpen||e.onKeyUp&&e.onKeyUp(F)}}),labelProps:{...u,onClick:()=>{x.focusFirst()}},buttonProps:{...v,id:w,"aria-haspopup":"dialog","aria-label":a.format("calendar"),"aria-labelledby":`${w} ${h}`,"aria-describedby":k,"aria-expanded":t.isOpen,isDisabled:e.isDisabled||e.isReadOnly,onPress:()=>t.setOpen(!0)},dialogProps:{id:D,"aria-labelledby":`${w} ${h}`},startFieldProps:{...m,...T,value:(r=t.value)===null||r===void 0?void 0:r.start,onChange:F=>t.setDateTime("start",F),autoFocus:e.autoFocus,name:e.startName,[sd]:{realtimeValidation:t.realtimeValidation,displayValidation:t.displayValidation,updateValidation(F){A.current=F,t.updateValidation(od(F,R.current))},resetValidation:t.resetValidation,commitValidation:t.commitValidation}},endFieldProps:{...$,...T,value:(i=t.value)===null||i===void 0?void 0:i.end,onChange:F=>t.setDateTime("end",F),name:e.endName,[sd]:{realtimeValidation:t.realtimeValidation,displayValidation:t.displayValidation,updateValidation(F){R.current=F,t.updateValidation(od(A.current,F))},resetValidation:t.resetValidation,commitValidation:t.commitValidation}},descriptionProps:d,errorMessageProps:f,calendarProps:{autoFocus:!0,value:t.dateRange,onChange:t.setDateRange,minValue:e.minValue,maxValue:e.maxValue,isDisabled:e.isDisabled,isReadOnly:e.isReadOnly,isDateUnavailable:e.isDateUnavailable,allowsNonContiguousRanges:e.allowsNonContiguousRanges,defaultFocusedValue:t.dateRange?void 0:e.placeholderValue,isInvalid:t.isInvalid,errorMessage:typeof e.errorMessage=="function"?e.errorMessage(t.displayValidation):e.errorMessage||t.displayValidation.validationErrors.join(" ")},isInvalid:s,validationErrors:o,validationDetails:l}}function Aj(e,t){let{role:n="dialog"}=e,r=Xc();r=e["aria-label"]?void 0:r;let i=y.useRef(!1);return y.useEffect(()=>{if(t.current&&!t.current.contains(document.activeElement)){nd(t.current);let a=setTimeout(()=>{document.activeElement===t.current&&(i.current=!0,t.current&&(t.current.blur(),nd(t.current)),i.current=!1)},500);return()=>{clearTimeout(a)}}},[t]),Z7(),{dialogProps:{...Xt(e,{labelable:!0}),role:n,tabIndex:-1,"aria-labelledby":e["aria-labelledby"]||r,onBlur:a=>{i.current&&a.stopPropagation()}},titleProps:{id:r}}}function us(e,t,n){return t!=null&&e.compare(t)<0||n!=null&&e.compare(n)>0}function Rg(e,t,n,r,i){let a={};for(let o in t)a[o]=Math.floor(t[o]/2),a[o]>0&&t[o]%2===0&&a[o]--;let s=Ui(e,t,n).subtract(a);return gl(e,s,t,n,r,i)}function Ui(e,t,n,r,i){let a=e;return t.years?a=bI(e):t.months?a=na(e):t.weeks&&(a=ul(e,n)),gl(e,a,t,n,r,i)}function Mg(e,t,n,r,i){let a={...t};t.days?a.days--:t.weeks?a.weeks--:t.months?a.months--:t.years&&a.years--;let s=Ui(e,t,n).subtract(a);return gl(e,s,t,n,r,i)}function gl(e,t,n,r,i,a){return i&&e.compare(i)>=0&&(t=u$(t,Ui(Zt(i),n,r))),a&&e.compare(a)<=0&&(t=l$(t,Mg(Zt(a),n,r))),t}function Ar(e,t,n){return t&&(e=u$(e,Zt(t))),n&&(e=l$(e,Zt(n))),e}function bS(e,t,n){if(!n)return e;for(;e.compare(t)>=0&&n(e);)e=e.subtract({days:1});if(e.compare(t)>=0)return e}function Oj(e){let t=y.useMemo(()=>new ii(e.locale),[e.locale]),n=y.useMemo(()=>t.resolvedOptions(),[t]),{locale:r,createCalendar:i,visibleDuration:a={months:1},minValue:s,maxValue:o,selectionAlignment:l,isDateUnavailable:u,pageBehavior:c="visible"}=e,d=y.useMemo(()=>i(n.calendar),[i,n.calendar]),[f,h]=aa(e.value,e.defaultValue,e.onChange),p=y.useMemo(()=>f?Oe(Zt(f),d):null,[f,d]),g=y.useMemo(()=>f&&"timeZone"in f?f.timeZone:n.timeZone,[f,n.timeZone]),b=y.useMemo(()=>e.focusedValue?Ar(Oe(Zt(e.focusedValue),d),s,o):void 0,[e.focusedValue,d,s,o]),v=y.useMemo(()=>Ar(e.defaultFocusedValue?Oe(Zt(e.defaultFocusedValue),d):p||Oe(Il(g),d),s,o),[e.defaultFocusedValue,p,g,d,s,o]),[m,$]=aa(b,v,e.onFocusChange),[w,D]=y.useState(()=>{switch(l){case"start":return Ui(m,a,r,s,o);case"end":return Mg(m,a,r,s,o);case"center":default:return Rg(m,a,r,s,o)}}),[S,k]=y.useState(e.autoFocus||!1),x=y.useMemo(()=>{let C={...a};return C.days?C.days--:C.days=-1,w.add(C)},[w,a]),[T,P]=y.useState(d.identifier);if(d.identifier!==T){let C=Oe(m,d);D(Rg(C,a,r,s,o)),$(C),P(d.identifier)}us(m,s,o)?$(Ar(m,s,o)):m.compare(w)<0?D(Mg(m,a,r,s,o)):m.compare(x)>0&&D(Ui(m,a,r,s,o));function E(C){C=Ar(C,s,o),$(C)}function A(C){if(!e.isDisabled&&!e.isReadOnly){if(C===null){h(null);return}if(C=Ar(C,s,o),C=bS(C,w,u),!C)return;C=Oe(C,(f==null?void 0:f.calendar)||new Ft),f&&"hour"in f?h(f.set(C)):h(C)}}let R=y.useMemo(()=>p?u&&u(p)?!0:us(p,s,o):!1,[p,u,s,o]),F=e.isInvalid||e.validationState==="invalid"||R,z=F?"invalid":null,B=y.useMemo(()=>c==="visible"?a:Zh(a),[c,a]);return{isDisabled:e.isDisabled,isReadOnly:e.isReadOnly,value:p,setValue:A,visibleRange:{start:w,end:x},minValue:s,maxValue:o,focusedDate:m,timeZone:g,validationState:z,isValueInvalid:F,setFocusedDate(C){E(C),k(!0)},focusNextDay(){E(m.add({days:1}))},focusPreviousDay(){E(m.subtract({days:1}))},focusNextRow(){a.days?this.focusNextPage():(a.weeks||a.months||a.years)&&E(m.add({weeks:1}))},focusPreviousRow(){a.days?this.focusPreviousPage():(a.weeks||a.months||a.years)&&E(m.subtract({weeks:1}))},focusNextPage(){let C=w.add(B);$(Ar(m.add(B),s,o)),D(Ui(gl(m,C,B,r,s,o),B,r))},focusPreviousPage(){let C=w.subtract(B);$(Ar(m.subtract(B),s,o)),D(Ui(gl(m,C,B,r,s,o),B,r))},focusSectionStart(){a.days?E(w):a.weeks?E(ul(m,r)):(a.months||a.years)&&E(na(m))},focusSectionEnd(){a.days?E(x):a.weeks?E(xI(m,r)):(a.months||a.years)&&E(Uc(m))},focusNextSection(C){if(!C&&!a.days){E(m.add(Zh(a)));return}a.days?this.focusNextPage():a.weeks?E(m.add({months:1})):(a.months||a.years)&&E(m.add({years:1}))},focusPreviousSection(C){if(!C&&!a.days){E(m.subtract(Zh(a)));return}a.days?this.focusPreviousPage():a.weeks?E(m.subtract({months:1})):(a.months||a.years)&&E(m.subtract({years:1}))},selectFocusedDate(){A(m)},selectDate(C){A(C)},isFocused:S,setFocused:k,isInvalid(C){return us(C,s,o)},isSelected(C){return p!=null&&Ze(C,p)&&!this.isCellDisabled(C)&&!this.isCellUnavailable(C)},isCellFocused(C){return S&&m&&Ze(C,m)},isCellDisabled(C){return e.isDisabled||C.compare(w)<0||C.compare(x)>0||this.isInvalid(C,s,o)},isCellUnavailable(C){return e.isDateUnavailable&&e.isDateUnavailable(C)},isPreviousVisibleRangeInvalid(){let C=w.subtract({days:1});return Ze(C,w)||this.isInvalid(C,s,o)},isNextVisibleRangeInvalid(){let C=x.add({days:1});return Ze(C,x)||this.isInvalid(C,s,o)},getDatesInWeek(C,O=w){let I=O.add({weeks:C}),N=[];I=ul(I,r);let X=kf(I,r);for(let Q=0;Q<X;Q++)N.push(null);for(;N.length<7;){N.push(I);let Q=I.add({days:1});if(Ze(I,Q))break;I=Q}for(;N.length<7;)N.push(null);return N}}}function Zh(e){let t={...e};for(let n in e)t[n]=1;return t}function Bj(e){let{value:t,defaultValue:n,onChange:r,createCalendar:i,locale:a,visibleDuration:s={months:1},minValue:o,maxValue:l,...u}=e,[c,d]=aa(t,n||null,r),[f,h]=y.useState(null),p="center";if(c&&c.start&&c.end){let O=Rg(Zt(c.start),s,a,o,l).add(s).subtract({days:1});c.end.compare(O)>0&&(p="start")}let g=y.useRef(null),[b,v]=y.useState(null),m=y.useMemo(()=>u$(o,b==null?void 0:b.start),[o,b]),$=y.useMemo(()=>l$(l,b==null?void 0:b.end),[l,b]),w=Oj({...u,value:c&&c.start,createCalendar:i,locale:a,visibleDuration:s,minValue:m,maxValue:$,selectionAlignment:p}),D=C=>{C&&e.isDateUnavailable&&!e.allowsNonContiguousRanges?(g.current={start:k5(C,w,-1),end:k5(C,w,1)},v(g.current)):(g.current=null,v(null))},[S,k]=y.useState(w.visibleRange);(!sg(w.visibleRange.start,S.start)||!sg(w.visibleRange.end,S.end))&&(D(f),k(w.visibleRange));let x=C=>{C?(h(C),D(C)):(h(null),D(null))},T=f?Xh(f,w.focusedDate):c&&Xh(c.start,c.end),P=C=>{if(!e.isReadOnly&&(C=Ar(C,m,$),C=bS(C,w.visibleRange.start,e.isDateUnavailable),!!C))if(!f)x(C);else{let O=Xh(f,C);d({start:C5(O.start,c==null?void 0:c.start),end:C5(O.end,c==null?void 0:c.end)}),x(null)}},[E,A]=y.useState(!1),{isDateUnavailable:R}=e,F=y.useMemo(()=>!c||f?!1:R&&(R(c.start)||R(c.end))?!0:us(c.start,o,l)||us(c.end,o,l),[R,c,f,o,l]),z=e.isInvalid||e.validationState==="invalid"||F;return{...w,value:c,setValue:d,anchorDate:f,setAnchorDate:x,highlightedRange:T,validationState:z?"invalid":null,isValueInvalid:z,selectFocusedDate(){P(w.focusedDate)},selectDate:P,highlightDate(C){f&&w.setFocusedDate(C)},isSelected(C){return T&&C.compare(T.start)>=0&&C.compare(T.end)<=0&&!w.isCellDisabled(C)&&!w.isCellUnavailable(C)},isInvalid(C){var O,I;return w.isInvalid(C)||us(C,(O=g.current)===null||O===void 0?void 0:O.start,(I=g.current)===null||I===void 0?void 0:I.end)},isDragging:E,setDragging:A}}function Xh(e,t){return!e||!t?null:(t.compare(e)<0&&([e,t]=[t,e]),{start:Zt(e),end:Zt(t)})}function C5(e,t){return e=Oe(e,(t==null?void 0:t.calendar)||new Ft),t&&"hour"in t?t.set(e):e}function k5(e,t,n){let r=e.add({days:n});for(;(n<0?r.compare(t.visibleRange.start)>=0:r.compare(t.visibleRange.end)<=0)&&!t.isCellUnavailable(r);)r=r.add({days:n});return t.isCellUnavailable(r)?r.add({days:-n}):null}function yS(e){let[t,n]=aa(e.isOpen,e.defaultOpen||!1,e.onOpenChange);const r=y.useCallback(()=>{n(!0)},[n]),i=y.useCallback(()=>{n(!1)},[n]),a=y.useCallback(()=>{n(!t)},[n,t]);return{isOpen:t,setOpen:n,open:r,close:i,toggle:a}}var $S={};$S={rangeOverflow:e=>`يجب أن تكون القيمة ${e.maxValue} أو قبل ذلك.`,rangeReversed:"تاريخ البدء يجب أن يكون قبل تاريخ الانتهاء.",rangeUnderflow:e=>`يجب أن تكون القيمة ${e.minValue} أو بعد ذلك.`,unavailableDate:"البيانات المحددة غير متاحة."};var xS={};xS={rangeOverflow:e=>`Стойността трябва да е ${e.maxValue} или по-ранна.`,rangeReversed:"Началната дата трябва да е преди крайната.",rangeUnderflow:e=>`Стойността трябва да е ${e.minValue} или по-късно.`,unavailableDate:"Избраната дата не е налична."};var wS={};wS={rangeOverflow:e=>`Hodnota musí být ${e.maxValue} nebo dřívější.`,rangeReversed:"Datum zahájení musí předcházet datu ukončení.",rangeUnderflow:e=>`Hodnota musí být ${e.minValue} nebo pozdější.`,unavailableDate:"Vybrané datum není k dispozici."};var DS={};DS={rangeOverflow:e=>`Værdien skal være ${e.maxValue} eller tidligere.`,rangeReversed:"Startdatoen skal være før slutdatoen.",rangeUnderflow:e=>`Værdien skal være ${e.minValue} eller nyere.`,unavailableDate:"Den valgte dato er ikke tilgængelig."};var _S={};_S={rangeOverflow:e=>`Der Wert muss ${e.maxValue} oder früher sein.`,rangeReversed:"Das Anfangsdatum muss vor dem Enddatum liegen.",rangeUnderflow:e=>`Der Wert muss ${e.minValue} oder später sein.`,unavailableDate:"Das ausgewählte Datum ist nicht verfügbar."};var ES={};ES={rangeOverflow:e=>`Η τιμή πρέπει να είναι ${e.maxValue} ή παλαιότερη.`,rangeReversed:"Η ημερομηνία έναρξης πρέπει να είναι πριν από την ημερομηνία λήξης.",rangeUnderflow:e=>`Η τιμή πρέπει να είναι ${e.minValue} ή μεταγενέστερη.`,unavailableDate:"Η επιλεγμένη ημερομηνία δεν είναι διαθέσιμη."};var SS={};SS={rangeUnderflow:e=>`Value must be ${e.minValue} or later.`,rangeOverflow:e=>`Value must be ${e.maxValue} or earlier.`,rangeReversed:"Start date must be before end date.",unavailableDate:"Selected date unavailable."};var CS={};CS={rangeOverflow:e=>`El valor debe ser ${e.maxValue} o anterior.`,rangeReversed:"La fecha de inicio debe ser anterior a la fecha de finalización.",rangeUnderflow:e=>`El valor debe ser ${e.minValue} o posterior.`,unavailableDate:"Fecha seleccionada no disponible."};var kS={};kS={rangeOverflow:e=>`Väärtus peab olema ${e.maxValue} või varasem.`,rangeReversed:"Alguskuupäev peab olema enne lõppkuupäeva.",rangeUnderflow:e=>`Väärtus peab olema ${e.minValue} või hilisem.`,unavailableDate:"Valitud kuupäev pole saadaval."};var PS={};PS={rangeOverflow:e=>`Arvon on oltava ${e.maxValue} tai sitä aikaisempi.`,rangeReversed:"Aloituspäivän on oltava ennen lopetuspäivää.",rangeUnderflow:e=>`Arvon on oltava ${e.minValue} tai sitä myöhäisempi.`,unavailableDate:"Valittu päivämäärä ei ole käytettävissä."};var TS={};TS={rangeOverflow:e=>`La valeur doit être ${e.maxValue} ou antérieure.`,rangeReversed:"La date de début doit être antérieure à la date de fin.",rangeUnderflow:e=>`La valeur doit être ${e.minValue} ou ultérieure.`,unavailableDate:"La date sélectionnée n’est pas disponible."};var RS={};RS={rangeOverflow:e=>`הערך חייב להיות ${e.maxValue} או מוקדם יותר.`,rangeReversed:"תאריך ההתחלה חייב להיות לפני תאריך הסיום.",rangeUnderflow:e=>`הערך חייב להיות ${e.minValue} או מאוחר יותר.`,unavailableDate:"התאריך הנבחר אינו זמין."};var MS={};MS={rangeOverflow:e=>`Vrijednost mora biti ${e.maxValue} ili ranije.`,rangeReversed:"Datum početka mora biti prije datuma završetka.",rangeUnderflow:e=>`Vrijednost mora biti ${e.minValue} ili kasnije.`,unavailableDate:"Odabrani datum nije dostupan."};var FS={};FS={rangeOverflow:e=>`Az értéknek ${e.maxValue} vagy korábbinak kell lennie.`,rangeReversed:"A kezdő dátumnak a befejező dátumnál korábbinak kell lennie.",rangeUnderflow:e=>`Az értéknek ${e.minValue} vagy későbbinek kell lennie.`,unavailableDate:"A kiválasztott dátum nem érhető el."};var AS={};AS={rangeOverflow:e=>`Il valore deve essere ${e.maxValue} o precedente.`,rangeReversed:"La data di inizio deve essere antecedente alla data di fine.",rangeUnderflow:e=>`Il valore deve essere ${e.minValue} o successivo.`,unavailableDate:"Data selezionata non disponibile."};var OS={};OS={rangeOverflow:e=>`値は ${e.maxValue} 以下にする必要があります。`,rangeReversed:"開始日は終了日より前にする必要があります。",rangeUnderflow:e=>`値は ${e.minValue} 以上にする必要があります。`,unavailableDate:"選択した日付は使用できません。"};var BS={};BS={rangeOverflow:e=>`값은 ${e.maxValue} 이전이어야 합니다.`,rangeReversed:"시작일은 종료일 이전이어야 합니다.",rangeUnderflow:e=>`값은 ${e.minValue} 이상이어야 합니다.`,unavailableDate:"선택한 날짜를 사용할 수 없습니다."};var IS={};IS={rangeOverflow:e=>`Reikšmė turi būti ${e.maxValue} arba ankstesnė.`,rangeReversed:"Pradžios data turi būti ankstesnė nei pabaigos data.",rangeUnderflow:e=>`Reikšmė turi būti ${e.minValue} arba naujesnė.`,unavailableDate:"Pasirinkta data nepasiekiama."};var LS={};LS={rangeOverflow:e=>`Vērtībai ir jābūt ${e.maxValue} vai agrākai.`,rangeReversed:"Sākuma datumam ir jābūt pirms beigu datuma.",rangeUnderflow:e=>`Vērtībai ir jābūt ${e.minValue} vai vēlākai.`,unavailableDate:"Atlasītais datums nav pieejams."};var NS={};NS={rangeOverflow:e=>`Verdien må være ${e.maxValue} eller tidligere.`,rangeReversed:"Startdatoen må være før sluttdatoen.",rangeUnderflow:e=>`Verdien må være ${e.minValue} eller senere.`,unavailableDate:"Valgt dato utilgjengelig."};var jS={};jS={rangeOverflow:e=>`Waarde moet ${e.maxValue} of eerder zijn.`,rangeReversed:"De startdatum moet voor de einddatum liggen.",rangeUnderflow:e=>`Waarde moet ${e.minValue} of later zijn.`,unavailableDate:"Geselecteerde datum niet beschikbaar."};var zS={};zS={rangeOverflow:e=>`Wartość musi mieć wartość ${e.maxValue} lub wcześniejszą.`,rangeReversed:"Data rozpoczęcia musi być wcześniejsza niż data zakończenia.",rangeUnderflow:e=>`Wartość musi mieć wartość ${e.minValue} lub późniejszą.`,unavailableDate:"Wybrana data jest niedostępna."};var VS={};VS={rangeOverflow:e=>`O valor deve ser ${e.maxValue} ou anterior.`,rangeReversed:"A data inicial deve ser anterior à data final.",rangeUnderflow:e=>`O valor deve ser ${e.minValue} ou posterior.`,unavailableDate:"Data selecionada indisponível."};var WS={};WS={rangeOverflow:e=>`O valor tem de ser ${e.maxValue} ou anterior.`,rangeReversed:"A data de início deve ser anterior à data de fim.",rangeUnderflow:e=>`O valor tem de ser ${e.minValue} ou posterior.`,unavailableDate:"Data selecionada indisponível."};var US={};US={rangeOverflow:e=>`Valoarea trebuie să fie ${e.maxValue} sau anterioară.`,rangeReversed:"Data de început trebuie să fie anterioară datei de sfârșit.",rangeUnderflow:e=>`Valoarea trebuie să fie ${e.minValue} sau ulterioară.`,unavailableDate:"Data selectată nu este disponibilă."};var HS={};HS={rangeOverflow:e=>`Значение должно быть не позже ${e.maxValue}.`,rangeReversed:"Дата начала должна предшествовать дате окончания.",rangeUnderflow:e=>`Значение должно быть не раньше ${e.minValue}.`,unavailableDate:"Выбранная дата недоступна."};var KS={};KS={rangeOverflow:e=>`Hodnota musí byť ${e.maxValue} alebo skoršia.`,rangeReversed:"Dátum začiatku musí byť skorší ako dátum konca.",rangeUnderflow:e=>`Hodnota musí byť ${e.minValue} alebo neskoršia.`,unavailableDate:"Vybratý dátum je nedostupný."};var YS={};YS={rangeOverflow:e=>`Vrednost mora biti ${e.maxValue} ali starejša.`,rangeReversed:"Začetni datum mora biti pred končnim datumom.",rangeUnderflow:e=>`Vrednost mora biti ${e.minValue} ali novejša.`,unavailableDate:"Izbrani datum ni na voljo."};var qS={};qS={rangeOverflow:e=>`Vrednost mora da bude ${e.maxValue} ili starija.`,rangeReversed:"Datum početka mora biti pre datuma završetka.",rangeUnderflow:e=>`Vrednost mora da bude ${e.minValue} ili novija.`,unavailableDate:"Izabrani datum nije dostupan."};var GS={};GS={rangeOverflow:e=>`Värdet måste vara ${e.maxValue} eller tidigare.`,rangeReversed:"Startdatumet måste vara före slutdatumet.",rangeUnderflow:e=>`Värdet måste vara ${e.minValue} eller senare.`,unavailableDate:"Det valda datumet är inte tillgängligt."};var ZS={};ZS={rangeOverflow:e=>`Değer, ${e.maxValue} veya öncesi olmalıdır.`,rangeReversed:"Başlangıç tarihi bitiş tarihinden önce olmalıdır.",rangeUnderflow:e=>`Değer, ${e.minValue} veya sonrası olmalıdır.`,unavailableDate:"Seçilen tarih kullanılamıyor."};var XS={};XS={rangeOverflow:e=>`Значення має бути не пізніше ${e.maxValue}.`,rangeReversed:"Дата початку має передувати даті завершення.",rangeUnderflow:e=>`Значення має бути не раніше ${e.minValue}.`,unavailableDate:"Вибрана дата недоступна."};var QS={};QS={rangeOverflow:e=>`值必须是 ${e.maxValue} 或更早日期。`,rangeReversed:"开始日期必须早于结束日期。",rangeUnderflow:e=>`值必须是 ${e.minValue} 或更晚日期。`,unavailableDate:"所选日期不可用。"};var JS={};JS={rangeOverflow:e=>`值必須是 ${e.maxValue} 或更早。`,rangeReversed:"開始日期必須在結束日期之前。",rangeUnderflow:e=>`值必須是 ${e.minValue} 或更晚。`,unavailableDate:"所選日期無法使用。"};var eC={};eC={"ar-AE":$S,"bg-BG":xS,"cs-CZ":wS,"da-DK":DS,"de-DE":_S,"el-GR":ES,"en-US":SS,"es-ES":CS,"et-EE":kS,"fi-FI":PS,"fr-FR":TS,"he-IL":RS,"hr-HR":MS,"hu-HU":FS,"it-IT":AS,"ja-JP":OS,"ko-KR":BS,"lt-LT":IS,"lv-LV":LS,"nb-NO":NS,"nl-NL":jS,"pl-PL":zS,"pt-BR":VS,"pt-PT":WS,"ro-RO":US,"ru-RU":HS,"sk-SK":KS,"sl-SI":YS,"sr-SP":qS,"sv-SE":GS,"tr-TR":ZS,"uk-UA":XS,"zh-CN":QS,"zh-TW":JS};function Ij(e){return e&&e.__esModule?e.default:e}const tC=new gi(Ij(eC));function nC(){return typeof navigator<"u"&&(navigator.language||navigator.userLanguage)||"en-US"}function Fg(e,t,n,r,i){let a=e!=null&&n!=null&&e.compare(n)>0,s=e!=null&&t!=null&&e.compare(t)<0,o=e!=null&&(r==null?void 0:r(e))||!1,l=a||s||o,u=[];if(l){let c=nC(),d=gi.getGlobalDictionaryForPackage("@react-stately/datepicker")||tC,f=new y8(c,d),h=new ii(c,vl({},i)),p=h.resolvedOptions().timeZone;s&&u.push(f.format("rangeUnderflow",{minValue:h.format(t.toDate(p))})),a&&u.push(f.format("rangeOverflow",{maxValue:h.format(n.toDate(p))})),o&&u.push(f.format("unavailableDate"))}return{isInvalid:l,validationErrors:u,validationDetails:{badInput:o,customError:!1,patternMismatch:!1,rangeOverflow:a,rangeUnderflow:s,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valueMissing:!1,valid:!l}}}function Lj(e,t,n,r,i){let a=Fg(e==null?void 0:e.start,t,n,r,i),s=Fg(e==null?void 0:e.end,t,n,r,i),o=od(a,s);if(e.end!=null&&e.start!=null&&e.end.compare(e.start)<0){let l=gi.getGlobalDictionaryForPackage("@react-stately/datepicker")||tC;o=od(o,{isInvalid:!0,validationErrors:[l.getStringForLocale("rangeReversed",nC())],validationDetails:{...Nf,rangeUnderflow:!0,rangeOverflow:!0,valid:!1}})}return o}const Nj={year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"2-digit",second:"2-digit"},jj={year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"};function vl(e,t){e={...t.shouldForceLeadingZeros?jj:Nj,...e};let r=t.granularity||"minute",i=Object.keys(e);var a;let s=i.indexOf((a=t.maxGranularity)!==null&&a!==void 0?a:"year");s<0&&(s=0);let o=i.indexOf(r);if(o<0&&(o=2),s>o)throw new Error("maxGranularity must be greater than granularity");let l=i.slice(s,o+1).reduce((c,d)=>(c[d]=e[d],c),{});return t.hourCycle!=null&&(l.hour12=t.hourCycle===12),l.timeZone=t.timeZone||"UTC",(r==="hour"||r==="minute"||r==="second")&&t.timeZone&&!t.hideTimeZone&&(l.timeZoneName="short"),t.showEra&&s===0&&(l.era="short"),l}function Eu(e){return e&&"hour"in e?e:new Nl}function rC(e,t){if(e===null)return null;if(e)return Oe(e,t)}function Zs(e,t,n,r){if(e)return rC(e,n);let i=Oe(D8(r).set({hour:0,minute:0,second:0,millisecond:0}),n);return t==="year"||t==="month"||t==="day"?Zt(i):r?i:Xn(i)}function iC(e,t){let n=e&&"timeZone"in e?e.timeZone:void 0,r=e&&"minute"in e?"minute":"day";if(e&&t&&!(t in e))throw new Error("Invalid granularity "+t+" for value "+e.toString());let[i,a]=y.useState([r,n]);e&&(i[0]!==r||i[1]!==n)&&a([r,n]),t||(t=e?r:i[0]);let s=e?n:i[1];return[t,s]}const zj=new gi({ach:{year:"mwaka",month:"dwe",day:"nino"},af:{year:"jjjj",month:"mm",day:"dd"},am:{year:"ዓዓዓዓ",month:"ሚሜ",day:"ቀቀ"},an:{year:"aaaa",month:"mm",day:"dd"},ar:{year:"سنة",month:"شهر",day:"يوم"},ast:{year:"aaaa",month:"mm",day:"dd"},az:{year:"iiii",month:"aa",day:"gg"},be:{year:"гггг",month:"мм",day:"дд"},bg:{year:"гггг",month:"мм",day:"дд"},bn:{year:"yyyy",month:"মিমি",day:"dd"},br:{year:"bbbb",month:"mm",day:"dd"},bs:{year:"gggg",month:"mm",day:"dd"},ca:{year:"aaaa",month:"mm",day:"dd"},cak:{year:"jjjj",month:"ii",day:"q'q'"},ckb:{year:"ساڵ",month:"مانگ",day:"ڕۆژ"},cs:{year:"rrrr",month:"mm",day:"dd"},cy:{year:"bbbb",month:"mm",day:"dd"},da:{year:"åååå",month:"mm",day:"dd"},de:{year:"jjjj",month:"mm",day:"tt"},dsb:{year:"llll",month:"mm",day:"źź"},el:{year:"εεεε",month:"μμ",day:"ηη"},en:{year:"yyyy",month:"mm",day:"dd"},eo:{year:"jjjj",month:"mm",day:"tt"},es:{year:"aaaa",month:"mm",day:"dd"},et:{year:"aaaa",month:"kk",day:"pp"},eu:{year:"uuuu",month:"hh",day:"ee"},fa:{year:"سال",month:"ماه",day:"روز"},ff:{year:"hhhh",month:"ll",day:"ññ"},fi:{year:"vvvv",month:"kk",day:"pp"},fr:{year:"aaaa",month:"mm",day:"jj"},fy:{year:"jjjj",month:"mm",day:"dd"},ga:{year:"bbbb",month:"mm",day:"ll"},gd:{year:"bbbb",month:"mm",day:"ll"},gl:{year:"aaaa",month:"mm",day:"dd"},he:{year:"שנה",month:"חודש",day:"יום"},hr:{year:"gggg",month:"mm",day:"dd"},hsb:{year:"llll",month:"mm",day:"dd"},hu:{year:"éééé",month:"hh",day:"nn"},ia:{year:"aaaa",month:"mm",day:"dd"},id:{year:"tttt",month:"bb",day:"hh"},it:{year:"aaaa",month:"mm",day:"gg"},ja:{year:" 年 ",month:"月",day:"日"},ka:{year:"წწწწ",month:"თთ",day:"რრ"},kk:{year:"жжжж",month:"аа",day:"кк"},kn:{year:"ವವವವ",month:"ಮಿಮೀ",day:"ದಿದಿ"},ko:{year:"연도",month:"월",day:"일"},lb:{year:"jjjj",month:"mm",day:"dd"},lo:{year:"ປປປປ",month:"ດດ",day:"ວວ"},lt:{year:"mmmm",month:"mm",day:"dd"},lv:{year:"gggg",month:"mm",day:"dd"},meh:{year:"aaaa",month:"mm",day:"dd"},ml:{year:"വർഷം",month:"മാസം",day:"തീയതി"},ms:{year:"tttt",month:"mm",day:"hh"},nl:{year:"jjjj",month:"mm",day:"dd"},nn:{year:"åååå",month:"mm",day:"dd"},no:{year:"åååå",month:"mm",day:"dd"},oc:{year:"aaaa",month:"mm",day:"jj"},pl:{year:"rrrr",month:"mm",day:"dd"},pt:{year:"aaaa",month:"mm",day:"dd"},rm:{year:"oooo",month:"mm",day:"dd"},ro:{year:"aaaa",month:"ll",day:"zz"},ru:{year:"гггг",month:"мм",day:"дд"},sc:{year:"aaaa",month:"mm",day:"dd"},scn:{year:"aaaa",month:"mm",day:"jj"},sk:{year:"rrrr",month:"mm",day:"dd"},sl:{year:"llll",month:"mm",day:"dd"},sr:{year:"гггг",month:"мм",day:"дд"},sv:{year:"åååå",month:"mm",day:"dd"},szl:{year:"rrrr",month:"mm",day:"dd"},tg:{year:"сссс",month:"мм",day:"рр"},th:{year:"ปปปป",month:"ดด",day:"วว"},tr:{year:"yyyy",month:"aa",day:"gg"},uk:{year:"рррр",month:"мм",day:"дд"},"zh-CN":{year:"年",month:"月",day:"日"},"zh-TW":{year:"年",month:"月",day:"日"}},"en");function Vj(e,t,n){return e==="era"||e==="dayPeriod"?t:e==="year"||e==="month"||e==="day"?zj.getStringForLocale(e,n):"––"}const Su={year:!0,month:!0,day:!0,hour:!0,minute:!0,second:!0,dayPeriod:!0,era:!0},P5={year:5,month:2,day:7,hour:2,minute:15,second:15},Wj={dayperiod:"dayPeriod"};function aC(e){let{locale:t,createCalendar:n,hideTimeZone:r,isDisabled:i,isReadOnly:a,isRequired:s,minValue:o,maxValue:l,isDateUnavailable:u}=e,c=e.value||e.defaultValue||e.placeholderValue,[d,f]=iC(c,e.granularity),h=f||"UTC";if(c&&!(d in c))throw new Error("Invalid granularity "+d+" for value "+c.toString());let p=y.useMemo(()=>new ii(t),[t]),g=y.useMemo(()=>n(p.resolvedOptions().calendar),[n,p]),[b,v]=aa(e.value,e.defaultValue,e.onChange),m=y.useMemo(()=>rC(b,g),[b,g]),[$,w]=y.useState(()=>Zs(e.placeholderValue,d,g,f)),D=m||$,S=g.identifier==="gregory"&&D.era==="BC",k=y.useMemo(()=>{var W;return{granularity:d,maxGranularity:(W=e.maxGranularity)!==null&&W!==void 0?W:"year",timeZone:f,hideTimeZone:r,hourCycle:e.hourCycle,showEra:S,shouldForceLeadingZeros:e.shouldForceLeadingZeros}},[e.maxGranularity,d,e.hourCycle,e.shouldForceLeadingZeros,f,r,S]),x=y.useMemo(()=>vl({},k),[k]),T=y.useMemo(()=>new ii(t,x),[t,x]),P=y.useMemo(()=>T.resolvedOptions(),[T]),E=y.useMemo(()=>T.formatToParts(new Date).filter(W=>Su[W.type]).reduce((W,Ce)=>(W[Ce.type]=!0,W),{}),[T]),[A,R]=y.useState(()=>e.value||e.defaultValue?{...E}:{}),F=y.useRef(),z=y.useRef(g.identifier);y.useEffect(()=>{g.identifier!==z.current&&(z.current=g.identifier,w(W=>Object.keys(A).length>0?Oe(W,g):Zs(e.placeholderValue,d,g,f)))},[g,d,A,f,e.placeholderValue]),b&&Object.keys(A).length<Object.keys(E).length&&(A={...E},R(A)),b==null&&Object.keys(A).length===Object.keys(E).length&&(A={},R(A),w(Zs(e.placeholderValue,d,g,f)));let B=m&&Object.keys(A).length>=Object.keys(E).length?m:$,C=W=>{if(e.isDisabled||e.isReadOnly)return;let Ce=Object.keys(A),et=Object.keys(E);W==null?(v(null),w(Zs(e.placeholderValue,d,g,f)),R({})):Ce.length>=et.length||Ce.length===et.length-1&&E.dayPeriod&&!A.dayPeriod&&F.current!=="dayPeriod"?(W=Oe(W,(c==null?void 0:c.calendar)||new Ft),v(W)):w(W),F.current=null},O=y.useMemo(()=>B.toDate(h),[B,h]),I=y.useMemo(()=>T.formatToParts(O).map(W=>{let Ce=Su[W.type];W.type==="era"&&g.getEras().length===1&&(Ce=!1);let et=Su[W.type]&&!A[W.type],yt=Su[W.type]?Vj(W.type,W.value,t):null;return{type:Wj[W.type]||W.type,text:et?yt:W.value,...Uj(B,W.type,P),isPlaceholder:et,placeholder:yt,isEditable:Ce}}),[O,A,T,P,B,g,t]);E.era&&A.year&&!A.era?(A.era=!0,R({...A})):!E.era&&A.era&&(delete A.era,R({...A}));let N=W=>{A[W]=!0,W==="year"&&E.era&&(A.era=!0),R({...A})},X=(W,Ce)=>{if(A[W])C(Hj(B,W,Ce,P));else{N(W);let et=Object.keys(A),yt=Object.keys(E);(et.length>=yt.length||et.length===yt.length-1&&E.dayPeriod&&!A.dayPeriod)&&C(B)}},Q=y.useMemo(()=>Fg(b,o,l,u,k),[b,o,l,u,k]),je=l7({...e,value:b,builtinValidation:Q}),$e=je.displayValidation.isInvalid,lt=e.validationState||($e?"invalid":null);var xe;return{...je,value:m,dateValue:O,calendar:g,setValue:C,segments:I,dateFormatter:T,validationState:lt,isInvalid:$e,granularity:d,maxGranularity:(xe=e.maxGranularity)!==null&&xe!==void 0?xe:"year",isDisabled:i,isReadOnly:a,isRequired:s,increment(W){X(W,1)},decrement(W){X(W,-1)},incrementPage(W){X(W,P5[W]||1)},decrementPage(W){X(W,-(P5[W]||1))},setSegment(W,Ce){N(W),C(Kj(B,W,Ce,P))},confirmPlaceholder(){if(e.isDisabled||e.isReadOnly)return;let W=Object.keys(A),Ce=Object.keys(E);W.length===Ce.length-1&&E.dayPeriod&&!A.dayPeriod&&(A={...E},R(A),C(B.copy()))},clearSegment(W){delete A[W],F.current=W,R({...A});let Ce=Zs(e.placeholderValue,d,g,f),et=B;if(W==="dayPeriod"&&"hour"in B&&"hour"in Ce){let yt=B.hour>=12,ut=Ce.hour>=12;yt&&!ut?et=B.set({hour:B.hour-12}):!yt&&ut&&(et=B.set({hour:B.hour+12}))}else W in B&&(et=B.set({[W]:Ce[W]}));v(null),C(et)},formatValue(W){if(!m)return"";let Ce=vl(W,k);return new ii(t,Ce).format(O)}}}function Uj(e,t,n){switch(t){case"era":{let r=e.calendar.getEras();return{value:r.indexOf(e.era),minValue:0,maxValue:r.length-1}}case"year":return{value:e.year,minValue:1,maxValue:e.calendar.getYearsInEra(e)};case"month":return{value:e.month,minValue:yI(e),maxValue:e.calendar.getMonthsInYear(e)};case"day":return{value:e.day,minValue:$I(e),maxValue:e.calendar.getDaysInMonth(e)}}if("hour"in e)switch(t){case"dayPeriod":return{value:e.hour>=12?12:0,minValue:0,maxValue:12};case"hour":if(n.hour12){let r=e.hour>=12;return{value:e.hour,minValue:r?12:0,maxValue:r?23:11}}return{value:e.hour,minValue:0,maxValue:23};case"minute":return{value:e.minute,minValue:0,maxValue:59};case"second":return{value:e.second,minValue:0,maxValue:59}}return{}}function Hj(e,t,n,r){switch(t){case"era":case"year":case"month":case"day":return e.cycle(t,n,{round:t==="year"})}if("hour"in e)switch(t){case"dayPeriod":{let i=e.hour,a=i>=12;return e.set({hour:a?i-12:i+12})}case"hour":case"minute":case"second":return e.cycle(t,n,{round:t!=="hour",hourCycle:r.hour12?12:24})}}function Kj(e,t,n,r){switch(t){case"day":case"month":case"year":case"era":return e.set({[t]:n})}if("hour"in e)switch(t){case"dayPeriod":{let i=e.hour,a=i>=12;return n>=12===a?e:e.set({hour:a?i-12:i+12})}case"hour":if(r.hour12){let a=e.hour>=12;!a&&n===12&&(n=0),a&&n<12&&(n+=12)}case"minute":case"second":return e.set({[t]:n})}}function Yj(e){var t,n;let r=yS(e),[i,a]=aa(e.value,e.defaultValue||null,e.onChange),[s,o]=y.useState(()=>i||{start:null,end:null});i==null&&s.start&&s.end&&(s={start:null,end:null},o(s));let l=i||s,u=B=>{o(B||{start:null,end:null}),B!=null&&B.start&&B.end?a(B):a(null)},c=(l==null?void 0:l.start)||(l==null?void 0:l.end)||e.placeholderValue,[d,f]=iC(c,e.granularity),h=d==="hour"||d==="minute"||d==="second";var p;let g=(p=e.shouldCloseOnSelect)!==null&&p!==void 0?p:!0,[b,v]=y.useState(null),[m,$]=y.useState(null);l&&l.start&&l.end&&(b=l,"hour"in l.start&&(m=l));let w=(B,C)=>{u({start:"timeZone"in C.start?C.start.set(Zt(B.start)):Xn(B.start,C.start),end:"timeZone"in C.end?C.end.set(Zt(B.end)):Xn(B.end,C.end)}),v(null),$(null),R.commitValidation()},D=B=>{let C=typeof g=="function"?g():g;h?C||B.start&&B.end&&(m!=null&&m.start)&&(m!=null&&m.end)?w(B,{start:(m==null?void 0:m.start)||Eu(e.placeholderValue),end:(m==null?void 0:m.end)||Eu(e.placeholderValue)}):v(B):B.start&&B.end?(u(B),R.commitValidation()):v(B),C&&r.setOpen(!1)},S=B=>{b!=null&&b.start&&(b!=null&&b.end)&&B.start&&B.end?w(b,B):$(B)},k=(l==null||(t=l.start)===null||t===void 0?void 0:t.calendar.identifier)==="gregory"&&l.start.era==="BC"||(l==null||(n=l.end)===null||n===void 0?void 0:n.calendar.identifier)==="gregory"&&l.end.era==="BC",x=y.useMemo(()=>({granularity:d,timeZone:f,hideTimeZone:e.hideTimeZone,hourCycle:e.hourCycle,shouldForceLeadingZeros:e.shouldForceLeadingZeros,showEra:k}),[d,e.hourCycle,e.shouldForceLeadingZeros,f,e.hideTimeZone,k]),{minValue:T,maxValue:P,isDateUnavailable:E}=e,A=y.useMemo(()=>Lj(l,T,P,E,x),[l,T,P,E,x]),R=l7({...e,value:i,name:y.useMemo(()=>[e.startName,e.endName],[e.startName,e.endName]),builtinValidation:A}),F=R.displayValidation.isInvalid,z=e.validationState||(F?"invalid":null);return{...R,value:l,setValue:u,dateRange:b,timeRange:m,granularity:d,hasTime:h,setDate(B,C){D({...b,[B]:C})},setTime(B,C){S({...m,[B]:C})},setDateTime(B,C){u({...l,[B]:C})},setDateRange:D,setTimeRange:S,...r,setOpen(B){!B&&!(l!=null&&l.start&&(l!=null&&l.end))&&(b!=null&&b.start)&&(b!=null&&b.end)&&h&&w(b,{start:(m==null?void 0:m.start)||Eu(e.placeholderValue),end:(m==null?void 0:m.end)||Eu(e.placeholderValue)}),r.setOpen(B)},validationState:z,isInvalid:F,formatValue(B,C){if(!l||!l.start||!l.end)return null;let O="timeZone"in l.start?l.start.timeZone:void 0,I=e.granularity||(l.start&&"minute"in l.start?"minute":"day"),N="timeZone"in l.end?l.end.timeZone:void 0,X=e.granularity||(l.end&&"minute"in l.end?"minute":"day"),Q=vl(C,{granularity:I,timeZone:O,hideTimeZone:e.hideTimeZone,hourCycle:e.hourCycle,showEra:l.start.calendar.identifier==="gregory"&&l.start.era==="BC"||l.end.calendar.identifier==="gregory"&&l.end.era==="BC"}),je=l.start.toDate(O||"UTC"),$e=l.end.toDate(N||"UTC"),lt=new ii(B,Q),xe;if(O===N&&I===X&&l.start.compare(l.end)!==0){try{let W=lt.formatRangeToParts(je,$e),Ce=-1;for(let ut=0;ut<W.length;ut++){let Gf=W[ut];if(Gf.source==="shared"&&Gf.type==="literal")Ce=ut;else if(Gf.source==="endRange")break}let et="",yt="";for(let ut=0;ut<W.length;ut++)ut<Ce?et+=W[ut].value:ut>Ce&&(yt+=W[ut].value);return{start:et,end:yt}}catch{}xe=lt}else{let W=vl(C,{granularity:X,timeZone:N,hideTimeZone:e.hideTimeZone,hourCycle:e.hourCycle});xe=new ii(B,W)}return{start:lt.format(je),end:xe.format($e)}}}}function qj(e){let{placeholderValue:t=new Nl,minValue:n,maxValue:r,granularity:i,validate:a}=e,[s,o]=aa(e.value,e.defaultValue,e.onChange),l=s||t,u=l&&"day"in l?l:void 0,c=e.defaultValue&&"timeZone"in e.defaultValue?e.defaultValue.timeZone:void 0,d=y.useMemo(()=>{let m=l&&"timeZone"in l?l.timeZone:void 0;return(m||c)&&t?P8(Xs(t),m||c):Xs(t)},[t,l,c]),f=y.useMemo(()=>Xs(n,u),[n,u]),h=y.useMemo(()=>Xs(r,u),[r,u]),p=y.useMemo(()=>s&&"day"in s?N2(s):s,[s]),g=y.useMemo(()=>s==null?null:Xs(s),[s]);return{...aC({...e,value:g,defaultValue:void 0,minValue:f,maxValue:h,onChange:m=>{o(u||c?m:m&&N2(m))},granularity:i||"minute",maxGranularity:"hour",placeholderValue:d,createCalendar:()=>new Ft,validate:y.useCallback(()=>a==null?void 0:a(s),[a,s])}),timeValue:p}}function Xs(e,t=Il(Pf())){return e?"day"in e?e:Xn(t,e):null}const C$=_.createContext(null);C$.displayName="ProviderContext";function Os(e,t,n,r){Object.defineProperty(e,t,{get:n,set:r,enumerable:!0,configurable:!0})}var ga={};Os(ga,"focus-ring",()=>Ag,e=>Ag=e);Os(ga,"i18nFontFamily",()=>Og,e=>Og=e);Os(ga,"spectrum",()=>Bg,e=>Bg=e);Os(ga,"spectrum-FocusRing-ring",()=>cd,e=>cd=e);Os(ga,"spectrum-FocusRing",()=>Ig,e=>Ig=e);Os(ga,"spectrum-FocusRing--quiet",()=>Lg,e=>Lg=e);var Ag,Og,Bg,cd,Ig,Lg;Ag="JuTe6q_focus-ring";Og="JuTe6q_i18nFontFamily";Bg="JuTe6q_spectrum";cd="JuTe6q_spectrum-FocusRing-ring";Ig=`JuTe6q_spectrum-FocusRing ${cd}`;Lg="JuTe6q_spectrum-FocusRing--quiet";function vi(e,t,n,r){Object.defineProperty(e,t,{get:n,set:r,enumerable:!0,configurable:!0})}var _r={};vi(_r,"focus-ring",()=>Ng,e=>Ng=e);vi(_r,"i18nFontFamily",()=>dd,e=>dd=e);vi(_r,"spectrum",()=>jg,e=>jg=e);vi(_r,"spectrum-Body",()=>zg,e=>zg=e);vi(_r,"spectrum-Body--italic",()=>Vg,e=>Vg=e);vi(_r,"spectrum-FocusRing-ring",()=>fd,e=>fd=e);vi(_r,"spectrum-FocusRing",()=>Wg,e=>Wg=e);vi(_r,"spectrum-FocusRing--quiet",()=>Ug,e=>Ug=e);var Ng,dd,jg,zg,Vg,fd,Wg,Ug;Ng="_5QszkG_focus-ring";dd="_5QszkG_i18nFontFamily";jg=`_5QszkG_spectrum ${dd}`;zg="_5QszkG_spectrum-Body";Vg="_5QszkG_spectrum-Body--italic";fd="_5QszkG_spectrum-FocusRing-ring";Wg=`_5QszkG_spectrum-FocusRing ${fd}`;Ug="_5QszkG_spectrum-FocusRing--quiet";function Gj(e,t){let n=ig("(prefers-color-scheme: dark)"),r=ig("(prefers-color-scheme: light)");return e.dark&&n?"dark":e.light&&r?"light":e.dark&&t==="dark"?"dark":e.light&&t==="light"||!e.dark||e.light?"light":"dark"}function Zj(e){return ig("(any-pointer: fine)")&&e.medium?"medium":e.large?"large":"medium"}var sC={};sC=JSON.parse('{"name":"@react-spectrum/provider","version":"3.9.6","description":"Spectrum UI components in React","license":"Apache-2.0","main":"dist/main.js","module":"dist/module.js","exports":{"types":"./dist/types.d.ts","import":"./dist/import.mjs","require":"./dist/main.js"},"types":"dist/types.d.ts","source":"src/index.ts","files":["dist","src"],"sideEffects":["*.css"],"targets":{"main":{"includeNodeModules":["@adobe/spectrum-css-temp"]},"module":{"includeNodeModules":["@adobe/spectrum-css-temp"]}},"repository":{"type":"git","url":"https://github.com/adobe/react-spectrum"},"dependencies":{"@react-aria/i18n":"^3.11.0","@react-aria/overlays":"^3.22.0","@react-aria/utils":"^3.24.0","@react-spectrum/utils":"^3.11.6","@react-types/provider":"^3.8.0","@react-types/shared":"^3.23.0","@swc/helpers":"^0.5.0","clsx":"^2.0.0"},"devDependencies":{"@adobe/spectrum-css-temp":"3.0.0-alpha.1"},"peerDependencies":{"react":"^16.8.0 || ^17.0.0-rc.1 || ^18.0.0","react-dom":"^16.8.0 || ^17.0.0-rc.1 || ^18.0.0"},"publishConfig":{"access":"public"}}');function T5(e){return e&&e.__esModule?e.default:e}const Xj={S:640,M:768,L:1024,XL:1280,XXL:1536};function Qj(e,t){let n=va(),r=n&&n.colorScheme,i=n&&n.breakpoints,{theme:a=n&&n.theme,defaultColorScheme:s}=e;if(!a)throw new Error("theme not found, the parent provider must have a theme provided");let o=Gj(a,s),l=Zj(a),{locale:u}=Qe(),c=!!a[r],{colorScheme:d=c?r:o,scale:f=n?n.scale:l,locale:h=n?u:null,breakpoints:p=n?i:Xj,children:g,isQuiet:b,isEmphasized:v,isDisabled:m,isRequired:$,isReadOnly:w,validationState:D,router:S,...k}=e,x={version:sC.version,theme:a,breakpoints:p,colorScheme:d,scale:f,isQuiet:b,isEmphasized:v,isDisabled:m,isRequired:$,isReadOnly:w,validationState:D},T=sI(p),P={};Object.entries(x).forEach(([z,B])=>B!==void 0&&(P[z]=B));let E=Object.assign({},n,P),A=g,R=Xt(k),{styleProps:F}=st(k,void 0,{matchedBreakpoints:T});return(!n||e.locale||a!==n.theme||d!==n.colorScheme||f!==n.scale||Object.keys(R).length>0||k.UNSAFE_className||Object.keys(F.style).length>0)&&(A=_.createElement(Jj,{...e,UNSAFE_style:{isolation:n?void 0:"isolate",...F.style},ref:t},A)),S&&(A=_.createElement(_L,S,A)),_.createElement(C$.Provider,{value:E},_.createElement(cI,{locale:h},_.createElement(aI,{matchedBreakpoints:T},_.createElement(gj,null,A))))}let oC=_.forwardRef(Qj);const Jj=_.forwardRef(function(t,n){let{children:r,...i}=t,{locale:a,direction:s}=Qe(),{theme:o,colorScheme:l,scale:u}=va(),{modalProviderProps:c}=vj(),{styleProps:d}=st(i),f=Nn(n),h=Object.keys(o[l])[0],p=Object.keys(o[u])[0],g=Ef(d.className,T5(ga).spectrum,T5(_r).spectrum,Object.values(o[l]),Object.values(o[u]),o.global?Object.values(o.global):null,{"react-spectrum-provider":fu,spectrum:fu,[h]:fu,[p]:fu});var b,v;let m={...d.style,colorScheme:(v=(b=t.colorScheme)!==null&&b!==void 0?b:l)!==null&&v!==void 0?v:Object.keys(o).filter(w=>w==="light"||w==="dark").join(" ")},$=y.useRef(!1);return y.useEffect(()=>{if(s&&f.current){let w=f.current.parentElement.closest("[dir]"),D=w&&w.getAttribute("dir");D&&D!==s&&!$.current&&(console.warn(`Language directions cannot be nested. ${s} inside ${D}.`),$.current=!0)}},[s,f,$]),_.createElement("div",{...Xt(i),...d,...c,className:g,style:m,lang:a,dir:s,ref:f},r)});function va(){return y.useContext(C$)}function Vl(e){let t=va();return t?Object.assign({},{isQuiet:t.isQuiet,isEmphasized:t.isEmphasized,isDisabled:t.isDisabled,isRequired:t.isRequired,isReadOnly:t.isReadOnly,validationState:t.validationState},e):e}var lC={};Object.defineProperty(lC,"__esModule",{value:!0});var ez=lC.CornerTriangle=uC,Qh=tz(y);function tz(e){return e&&e.__esModule?e:{default:e}}function Hg(){return Hg=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Hg.apply(this,arguments)}function nz(e,t){if(e==null)return{};var n=rz(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function rz(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function uC(e){var t=e.scale,n=t===void 0?"M":t,r=nz(e,["scale"]);return Qh.default.createElement("svg",Hg({},r,r),n==="L"&&Qh.default.createElement("path",{d:"M5.74.01a.25.25 0 0 0-.177.073l-5.48 5.48a.25.25 0 0 0 .177.427h5.48a.25.25 0 0 0 .25-.25V.26a.25.25 0 0 0-.25-.25z"}),n==="M"&&Qh.default.createElement("path",{d:"M4.74.01a.25.25 0 0 0-.177.073l-4.48 4.48a.25.25 0 0 0 .177.427h4.48a.25.25 0 0 0 .25-.25V.26a.25.25 0 0 0-.25-.25z"}))}uC.displayName="CornerTriangle";function G(e,t,n,r){Object.defineProperty(e,t,{get:n,set:r,enumerable:!0,configurable:!0})}var Y={};G(Y,"spectrum--large",()=>Kg,e=>Kg=e);G(Y,"spectrum--medium",()=>Yg,e=>Yg=e);G(Y,"spectrum-Icon",()=>qg,e=>qg=e);G(Y,"spectrum-Icon--sizeL",()=>Gg,e=>Gg=e);G(Y,"spectrum-Icon--sizeM",()=>Zg,e=>Zg=e);G(Y,"spectrum-Icon--sizeS",()=>Xg,e=>Xg=e);G(Y,"spectrum-Icon--sizeXL",()=>Qg,e=>Qg=e);G(Y,"spectrum-Icon--sizeXS",()=>Jg,e=>Jg=e);G(Y,"spectrum-Icon--sizeXXL",()=>e0,e=>e0=e);G(Y,"spectrum-Icon--sizeXXS",()=>t0,e=>t0=e);G(Y,"spectrum-UIIcon",()=>n0,e=>n0=e);G(Y,"spectrum-UIIcon--large",()=>r0,e=>r0=e);G(Y,"spectrum-UIIcon--medium",()=>i0,e=>i0=e);G(Y,"spectrum-UIIcon-AlertMedium",()=>a0,e=>a0=e);G(Y,"spectrum-UIIcon-AlertSmall",()=>s0,e=>s0=e);G(Y,"spectrum-UIIcon-ArrowDownSmall",()=>o0,e=>o0=e);G(Y,"spectrum-UIIcon-ArrowLeftMedium",()=>l0,e=>l0=e);G(Y,"spectrum-UIIcon-Asterisk",()=>u0,e=>u0=e);G(Y,"spectrum-UIIcon-CheckmarkMedium",()=>c0,e=>c0=e);G(Y,"spectrum-UIIcon-CheckmarkSmall",()=>d0,e=>d0=e);G(Y,"spectrum-UIIcon-ChevronDownMedium",()=>f0,e=>f0=e);G(Y,"spectrum-UIIcon-ChevronDownSmall",()=>h0,e=>h0=e);G(Y,"spectrum-UIIcon-ChevronLeftLarge",()=>p0,e=>p0=e);G(Y,"spectrum-UIIcon-ChevronLeftMedium",()=>m0,e=>m0=e);G(Y,"spectrum-UIIcon-ChevronRightLarge",()=>g0,e=>g0=e);G(Y,"spectrum-UIIcon-ChevronRightMedium",()=>v0,e=>v0=e);G(Y,"spectrum-UIIcon-ChevronRightSmall",()=>b0,e=>b0=e);G(Y,"spectrum-UIIcon-ChevronUpSmall",()=>y0,e=>y0=e);G(Y,"spectrum-UIIcon-CornerTriangle",()=>$0,e=>$0=e);G(Y,"spectrum-UIIcon-CrossLarge",()=>x0,e=>x0=e);G(Y,"spectrum-UIIcon-CrossMedium",()=>w0,e=>w0=e);G(Y,"spectrum-UIIcon-CrossSmall",()=>D0,e=>D0=e);G(Y,"spectrum-UIIcon-DashSmall",()=>_0,e=>_0=e);G(Y,"spectrum-UIIcon-DoubleGripper",()=>E0,e=>E0=e);G(Y,"spectrum-UIIcon-FolderBreadcrumb",()=>S0,e=>S0=e);G(Y,"spectrum-UIIcon-HelpMedium",()=>C0,e=>C0=e);G(Y,"spectrum-UIIcon-HelpSmall",()=>k0,e=>k0=e);G(Y,"spectrum-UIIcon-InfoMedium",()=>P0,e=>P0=e);G(Y,"spectrum-UIIcon-InfoSmall",()=>T0,e=>T0=e);G(Y,"spectrum-UIIcon-ListGripper",()=>R0,e=>R0=e);G(Y,"spectrum-UIIcon-Magnifier",()=>M0,e=>M0=e);G(Y,"spectrum-UIIcon-SkipLeft",()=>F0,e=>F0=e);G(Y,"spectrum-UIIcon-SkipRight",()=>A0,e=>A0=e);G(Y,"spectrum-UIIcon-Star",()=>O0,e=>O0=e);G(Y,"spectrum-UIIcon-StarOutline",()=>B0,e=>B0=e);G(Y,"spectrum-UIIcon-SuccessMedium",()=>I0,e=>I0=e);G(Y,"spectrum-UIIcon-SuccessSmall",()=>L0,e=>L0=e);G(Y,"spectrum-UIIcon-TripleGripper",()=>N0,e=>N0=e);var Kg,Yg,qg,Gg,Zg,Xg,Qg,Jg,e0,t0,n0,r0,i0,a0,s0,o0,l0,u0,c0,d0,f0,h0,p0,m0,g0,v0,b0,y0,$0,x0,w0,D0,_0,E0,S0,C0,k0,P0,T0,R0,M0,F0,A0,O0,B0,I0,L0,N0;Kg="yxBNXG_spectrum--large";Yg="yxBNXG_spectrum--medium";qg="yxBNXG_spectrum-Icon";Gg="yxBNXG_spectrum-Icon--sizeL";Zg="yxBNXG_spectrum-Icon--sizeM";Xg="yxBNXG_spectrum-Icon--sizeS";Qg="yxBNXG_spectrum-Icon--sizeXL";Jg="yxBNXG_spectrum-Icon--sizeXS";e0="yxBNXG_spectrum-Icon--sizeXXL";t0="yxBNXG_spectrum-Icon--sizeXXS";n0="yxBNXG_spectrum-UIIcon";r0="yxBNXG_spectrum-UIIcon--large";i0="yxBNXG_spectrum-UIIcon--medium";a0="yxBNXG_spectrum-UIIcon-AlertMedium";s0="yxBNXG_spectrum-UIIcon-AlertSmall";o0="yxBNXG_spectrum-UIIcon-ArrowDownSmall";l0="yxBNXG_spectrum-UIIcon-ArrowLeftMedium";u0="yxBNXG_spectrum-UIIcon-Asterisk";c0="yxBNXG_spectrum-UIIcon-CheckmarkMedium";d0="yxBNXG_spectrum-UIIcon-CheckmarkSmall";f0="yxBNXG_spectrum-UIIcon-ChevronDownMedium";h0="yxBNXG_spectrum-UIIcon-ChevronDownSmall";p0="yxBNXG_spectrum-UIIcon-ChevronLeftLarge";m0="yxBNXG_spectrum-UIIcon-ChevronLeftMedium";g0="yxBNXG_spectrum-UIIcon-ChevronRightLarge";v0="yxBNXG_spectrum-UIIcon-ChevronRightMedium";b0="yxBNXG_spectrum-UIIcon-ChevronRightSmall";y0="yxBNXG_spectrum-UIIcon-ChevronUpSmall";$0="yxBNXG_spectrum-UIIcon-CornerTriangle";x0="yxBNXG_spectrum-UIIcon-CrossLarge";w0="yxBNXG_spectrum-UIIcon-CrossMedium";D0="yxBNXG_spectrum-UIIcon-CrossSmall";_0="yxBNXG_spectrum-UIIcon-DashSmall";E0="yxBNXG_spectrum-UIIcon-DoubleGripper";S0="yxBNXG_spectrum-UIIcon-FolderBreadcrumb";C0="yxBNXG_spectrum-UIIcon-HelpMedium";k0="yxBNXG_spectrum-UIIcon-HelpSmall";P0="yxBNXG_spectrum-UIIcon-InfoMedium";T0="yxBNXG_spectrum-UIIcon-InfoSmall";R0="yxBNXG_spectrum-UIIcon-ListGripper";M0="yxBNXG_spectrum-UIIcon-Magnifier";F0="yxBNXG_spectrum-UIIcon-SkipLeft";A0="yxBNXG_spectrum-UIIcon-SkipRight";O0="yxBNXG_spectrum-UIIcon-Star";B0="yxBNXG_spectrum-UIIcon-StarOutline";I0="yxBNXG_spectrum-UIIcon-SuccessMedium";L0="yxBNXG_spectrum-UIIcon-SuccessSmall";N0="yxBNXG_spectrum-UIIcon-TripleGripper";function iz(e){return e&&e.__esModule?e.default:e}function az(e){return`var(--spectrum-semantic-${e}-color-icon)`}const sz={...Af,color:["color",az]};function oz(e){e=ci(e,"icon");let{children:t,size:n,"aria-label":r,"aria-hidden":i,...a}=e,{styleProps:s}=st(a,sz),o=va(),l="M";o!==null&&(l=o.scale==="large"?"L":"M"),i||(i=void 0);let u=n||l;return _.cloneElement(t,{...Xt(a),...s,focusable:"false","aria-label":r,"aria-hidden":r?i||void 0:!0,role:"img",className:V(iz(Y),t.props.className,"spectrum-Icon",`spectrum-Icon--size${u}`,s.className)})}function lz(e){return e&&e.__esModule?e.default:e}function ba(e){e=ci(e,"icon");let{children:t,"aria-label":n,"aria-hidden":r,...i}=e,{styleProps:a}=st(i),s=va(),o="M";return s!==null&&(o=s.scale==="large"?"L":"M"),r||(r=void 0),_.cloneElement(t,{...Xt(i),...a,scale:o,focusable:"false","aria-label":n,"aria-hidden":n?r||void 0:!0,role:"img",className:V(lz(Y),t.props.className,"spectrum-Icon",{[`spectrum-UIIcon-${t.type.displayName}`]:t.type.displayName},a.className)})}function uz(e){return _.createElement(ba,e,_.createElement(ez,null))}function Qs(e){return e&&e.__esModule?e.default:e}function cz(e,t){e=Vl(e),e=ci(e,"actionButton");let n=ci({UNSAFE_className:V(Qs(Z),"spectrum-ActionButton-label")},"text"),{isQuiet:r,isDisabled:i,staticColor:a,children:s,autoFocus:o,holdAffordance:l,hideButtonText:u,...c}=e,d=h8(t),{buttonProps:f,isPressed:h}=_E(e,d),{hoverProps:p,isHovered:g}=If({isDisabled:i}),{styleProps:b}=st(c),v=_.Children.toArray(e.children).every(m=>!_.isValidElement(m));return _.createElement(wE,{focusRingClass:V(Qs(Z),"focus-ring"),autoFocus:o},_.createElement("button",{...b,...de(f,p),ref:d,className:V(Qs(Z),"spectrum-ActionButton",{"spectrum-ActionButton--quiet":r,"spectrum-ActionButton--staticColor":!!a,"spectrum-ActionButton--staticWhite":a==="white","spectrum-ActionButton--staticBlack":a==="black","is-active":h,"is-disabled":i,"is-hovered":g},b.className)},l&&_.createElement(uz,{UNSAFE_className:V(Qs(Z),"spectrum-ActionButton-hold")}),_.createElement(uE,null,_.createElement(Of,{slots:{icon:{size:"S",UNSAFE_className:V(Qs(Z),"spectrum-Icon",{"spectrum-ActionGroup-itemIcon":u})},text:{...n}}},typeof s=="string"||v?_.createElement(LN,null,s):s))))}let j0=_.forwardRef(cz);function Jh(e){return e&&e.__esModule?e.default:e}function dz(e,t){e=ci(e,"button");let{isQuiet:n,isDisabled:r,validationState:i,isInvalid:a,children:s,autoFocus:o,isActive:l,focusRingClass:u,...c}=e,d=h8(t),{buttonProps:f,isPressed:h}=_E(e,d),{hoverProps:p,isHovered:g}=If({isDisabled:r}),{styleProps:b}=st(c);return _.createElement(wE,{focusRingClass:V(Jh(Z),"focus-ring",u),autoFocus:o},_.createElement("button",{...de(f,p),ref:d,className:V(Jh(Z),"spectrum-FieldButton",{"spectrum-FieldButton--quiet":n,"is-active":l||h,"is-disabled":r,"spectrum-FieldButton--invalid":a||i==="invalid","is-hovered":g},b.className)},_.createElement(Of,{slots:{icon:{size:"S",UNSAFE_className:V(Jh(Z),"spectrum-Icon")}}},s)))}let fz=_.forwardRef(dz);function z0(){return z0=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},z0.apply(null,arguments)}function hz(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function V0(e,t){return V0=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},V0(e,t)}function pz(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,V0(e,t)}const R5={disabled:!1},cC=_.createContext(null);var mz=function(t){return t.scrollTop},vo="unmounted",Ri="exited",Mi="entering",Oa="entered",W0="exiting",Er=function(e){pz(t,e);function t(r,i){var a;a=e.call(this,r,i)||this;var s=i,o=s&&!s.isMounting?r.enter:r.appear,l;return a.appearStatus=null,r.in?o?(l=Ri,a.appearStatus=Mi):l=Oa:r.unmountOnExit||r.mountOnEnter?l=vo:l=Ri,a.state={status:l},a.nextCallback=null,a}t.getDerivedStateFromProps=function(i,a){var s=i.in;return s&&a.status===vo?{status:Ri}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(i){var a=null;if(i!==this.props){var s=this.state.status;this.props.in?s!==Mi&&s!==Oa&&(a=Mi):(s===Mi||s===Oa)&&(a=W0)}this.updateStatus(!1,a)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var i=this.props.timeout,a,s,o;return a=s=o=i,i!=null&&typeof i!="number"&&(a=i.exit,s=i.enter,o=i.appear!==void 0?i.appear:s),{exit:a,enter:s,appear:o}},n.updateStatus=function(i,a){if(i===void 0&&(i=!1),a!==null)if(this.cancelNextCallback(),a===Mi){if(this.props.unmountOnExit||this.props.mountOnEnter){var s=this.props.nodeRef?this.props.nodeRef.current:fo.findDOMNode(this);s&&mz(s)}this.performEnter(i)}else this.performExit();else this.props.unmountOnExit&&this.state.status===Ri&&this.setState({status:vo})},n.performEnter=function(i){var a=this,s=this.props.enter,o=this.context?this.context.isMounting:i,l=this.props.nodeRef?[o]:[fo.findDOMNode(this),o],u=l[0],c=l[1],d=this.getTimeouts(),f=o?d.appear:d.enter;if(!i&&!s||R5.disabled){this.safeSetState({status:Oa},function(){a.props.onEntered(u)});return}this.props.onEnter(u,c),this.safeSetState({status:Mi},function(){a.props.onEntering(u,c),a.onTransitionEnd(f,function(){a.safeSetState({status:Oa},function(){a.props.onEntered(u,c)})})})},n.performExit=function(){var i=this,a=this.props.exit,s=this.getTimeouts(),o=this.props.nodeRef?void 0:fo.findDOMNode(this);if(!a||R5.disabled){this.safeSetState({status:Ri},function(){i.props.onExited(o)});return}this.props.onExit(o),this.safeSetState({status:W0},function(){i.props.onExiting(o),i.onTransitionEnd(s.exit,function(){i.safeSetState({status:Ri},function(){i.props.onExited(o)})})})},n.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(i,a){a=this.setNextCallback(a),this.setState(i,a)},n.setNextCallback=function(i){var a=this,s=!0;return this.nextCallback=function(o){s&&(s=!1,a.nextCallback=null,i(o))},this.nextCallback.cancel=function(){s=!1},this.nextCallback},n.onTransitionEnd=function(i,a){this.setNextCallback(a);var s=this.props.nodeRef?this.props.nodeRef.current:fo.findDOMNode(this),o=i==null&&!this.props.addEndListener;if(!s||o){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var l=this.props.nodeRef?[this.nextCallback]:[s,this.nextCallback],u=l[0],c=l[1];this.props.addEndListener(u,c)}i!=null&&setTimeout(this.nextCallback,i)},n.render=function(){var i=this.state.status;if(i===vo)return null;var a=this.props,s=a.children;a.in,a.mountOnEnter,a.unmountOnExit,a.appear,a.enter,a.exit,a.timeout,a.addEndListener,a.onEnter,a.onEntering,a.onEntered,a.onExit,a.onExiting,a.onExited,a.nodeRef;var o=hz(a,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return _.createElement(cC.Provider,{value:null},typeof s=="function"?s(i,o):_.cloneElement(_.Children.only(s),o))},t}(_.Component);Er.contextType=cC;Er.propTypes={};function ka(){}Er.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:ka,onEntering:ka,onEntered:ka,onExit:ka,onExiting:ka,onExited:ka};Er.UNMOUNTED=vo;Er.EXITED=Ri;Er.ENTERING=Mi;Er.ENTERED=Oa;Er.EXITING=W0;const gz={entering:!1,entered:!0};function vz(e){return _.createElement(Er,{timeout:{enter:0,exit:350},...e},t=>_.Children.map(e.children,n=>n&&_.cloneElement(n,{isOpen:!!gz[t]})))}function bz(e,t){let{children:n,isOpen:r,disableFocusManagement:i,container:a,onEnter:s,onEntering:o,onEntered:l,onExit:u,onExiting:c,onExited:d,nodeRef:f}=e,[h,p]=y.useState(!r),g=y.useCallback(()=>{p(!1),l&&l()},[l]),b=y.useCallback(()=>{p(!0),d&&d()},[d]);return r||!h?_.createElement(Dj,{portalContainer:a,disableFocusManagement:i,isExiting:!r},_.createElement(oC,{ref:t,UNSAFE_style:{background:"transparent",isolation:"isolate"},isDisabled:!1},_.createElement(vz,{in:r,appear:!0,onExit:u,onExiting:c,onExited:b,onEnter:s,onEntering:o,onEntered:g,nodeRef:f},n))):null}let k$=_.forwardRef(bz);function Sr(e,t,n,r){Object.defineProperty(e,t,{get:n,set:r,enumerable:!0,configurable:!0})}var ln={};Sr(ln,"react-spectrum-Modal",()=>U0,e=>U0=e);Sr(ln,"react-spectrum-Modal-wrapper",()=>H0,e=>H0=e);Sr(ln,"react-spectrum-Popover",()=>K0,e=>K0=e);Sr(ln,"react-spectrum-Tray",()=>Y0,e=>Y0=e);Sr(ln,"spectrum-Dialog-content",()=>q0,e=>q0=e);Sr(ln,"spectrum-Modal",()=>G0,e=>G0=e);Sr(ln,"spectrum-Modal-wrapper",()=>Z0,e=>Z0=e);Sr(ln,"spectrum-Popover",()=>X0,e=>X0=e);Sr(ln,"spectrum-Tray",()=>Q0,e=>Q0=e);var U0,H0,K0,Y0,q0,G0,Z0,X0,Q0;U0="OhnpTq_react-spectrum-Modal";H0="OhnpTq_react-spectrum-Modal-wrapper";K0="OhnpTq_react-spectrum-Popover";Y0="OhnpTq_react-spectrum-Tray";q0="OhnpTq_spectrum-Dialog-content";G0="OhnpTq_spectrum-Modal";Z0="OhnpTq_spectrum-Modal-wrapper";X0="OhnpTq_spectrum-Popover";Q0="OhnpTq_spectrum-Tray";function Fe(e,t,n,r){Object.defineProperty(e,t,{get:n,set:r,enumerable:!0,configurable:!0})}var be={};Fe(be,"focus-ring",()=>J0,e=>J0=e);Fe(be,"i18nFontFamily",()=>ev,e=>ev=e);Fe(be,"spectrum-overlay--open",()=>hd,e=>hd=e);Fe(be,"is-open",()=>tv,e=>tv=e);Fe(be,"spectrum-overlay--bottom--open",()=>pd,e=>pd=e);Fe(be,"is-open--bottom",()=>nv,e=>nv=e);Fe(be,"spectrum-overlay--left--open",()=>md,e=>md=e);Fe(be,"is-open--left",()=>rv,e=>rv=e);Fe(be,"spectrum-overlay--right--open",()=>gd,e=>gd=e);Fe(be,"is-open--right",()=>iv,e=>iv=e);Fe(be,"spectrum-overlay--top--open",()=>vd,e=>vd=e);Fe(be,"is-open--top",()=>av,e=>av=e);Fe(be,"spectrum-FocusRing-ring",()=>bd,e=>bd=e);Fe(be,"spectrum-FocusRing",()=>sv,e=>sv=e);Fe(be,"spectrum-FocusRing--quiet",()=>ov,e=>ov=e);Fe(be,"spectrum-overlay",()=>yd,e=>yd=e);Fe(be,"spectrum-Popover",()=>lv,e=>lv=e);Fe(be,"spectrum-Popover--bottom",()=>uv,e=>uv=e);Fe(be,"spectrum-Popover--dialog",()=>cv,e=>cv=e);Fe(be,"spectrum-Popover--left",()=>dv,e=>dv=e);Fe(be,"spectrum-Popover--right",()=>fv,e=>fv=e);Fe(be,"spectrum-Popover--top",()=>hv,e=>hv=e);Fe(be,"spectrum-Popover--withTip",()=>pv,e=>pv=e);Fe(be,"spectrum-Popover-tip",()=>mv,e=>mv=e);Fe(be,"spectrum-Popover-tip-triangle",()=>gv,e=>gv=e);var J0,ev,hd,tv,pd,nv,md,rv,gd,iv,vd,av,bd,sv,ov,yd,lv,uv,cv,dv,fv,hv,pv,mv,gv;J0="cH0MeW_focus-ring";ev="cH0MeW_i18nFontFamily";hd="cH0MeW_spectrum-overlay--open";tv=`cH0MeW_is-open ${hd}`;pd="cH0MeW_spectrum-overlay--bottom--open";nv=`cH0MeW_is-open--bottom ${pd}`;md="cH0MeW_spectrum-overlay--left--open";rv=`cH0MeW_is-open--left ${md}`;gd="cH0MeW_spectrum-overlay--right--open";iv=`cH0MeW_is-open--right ${gd}`;vd="cH0MeW_spectrum-overlay--top--open";av=`cH0MeW_is-open--top ${vd}`;bd="cH0MeW_spectrum-FocusRing-ring";sv=`cH0MeW_spectrum-FocusRing ${bd}`;ov="cH0MeW_spectrum-FocusRing--quiet";yd="cH0MeW_spectrum-overlay";lv=`cH0MeW_spectrum-Popover ${yd}`;uv="cH0MeW_spectrum-Popover--bottom";cv="cH0MeW_spectrum-Popover--dialog";dv="cH0MeW_spectrum-Popover--left";fv="cH0MeW_spectrum-Popover--right";hv="cH0MeW_spectrum-Popover--top";pv="cH0MeW_spectrum-Popover--withTip";mv="cH0MeW_spectrum-Popover-tip";gv="cH0MeW_spectrum-Popover-tip-triangle";function Qt(e,t,n,r){Object.defineProperty(e,t,{get:n,set:r,enumerable:!0,configurable:!0})}var Bt={};Qt(Bt,"focus-ring",()=>vv,e=>vv=e);Qt(Bt,"i18nFontFamily",()=>bv,e=>bv=e);Qt(Bt,"spectrum-overlay--open",()=>$d,e=>$d=e);Qt(Bt,"is-open",()=>yv,e=>yv=e);Qt(Bt,"spectrum-FocusRing-ring",()=>xd,e=>xd=e);Qt(Bt,"spectrum-FocusRing",()=>$v,e=>$v=e);Qt(Bt,"spectrum-FocusRing--quiet",()=>xv,e=>xv=e);Qt(Bt,"spectrum-overlay",()=>wd,e=>wd=e);Qt(Bt,"spectrum-Underlay",()=>wv,e=>wv=e);Qt(Bt,"spectrum-Underlay--transparent",()=>Dv,e=>Dv=e);Qt(Bt,"spectrum-overlay--bottom--open",()=>_v,e=>_v=e);Qt(Bt,"spectrum-overlay--left--open",()=>Ev,e=>Ev=e);Qt(Bt,"spectrum-overlay--right--open",()=>Sv,e=>Sv=e);Qt(Bt,"spectrum-overlay--top--open",()=>Cv,e=>Cv=e);var vv,bv,$d,yv,xd,$v,xv,wd,wv,Dv,_v,Ev,Sv,Cv;vv="F-oYUa_focus-ring";bv="F-oYUa_i18nFontFamily";$d="F-oYUa_spectrum-overlay--open";yv=`F-oYUa_is-open ${$d}`;xd="F-oYUa_spectrum-FocusRing-ring";$v=`F-oYUa_spectrum-FocusRing ${xd}`;xv="F-oYUa_spectrum-FocusRing--quiet";wd="F-oYUa_spectrum-overlay";wv=`F-oYUa_spectrum-Underlay ${wd}`;Dv="F-oYUa_spectrum-Underlay--transparent";_v="F-oYUa_spectrum-overlay--bottom--open";Ev="F-oYUa_spectrum-overlay--left--open";Sv="F-oYUa_spectrum-overlay--right--open";Cv="F-oYUa_spectrum-overlay--top--open";function yz(e){return e&&e.__esModule?e.default:e}function P$({isOpen:e,isTransparent:t,...n}){return _.createElement("div",{"data-testid":"underlay",...n,className:V(yz(Bt),"spectrum-Underlay",{"is-open":e,"spectrum-Underlay--transparent":t})})}function Dd(e){return e&&e.__esModule?e.default:e}let $z={left:"right",right:"right",top:"bottom",bottom:"bottom"};function xz(e,t){let{children:n,state:r,...i}=e,a=Nn(t),s=y.useRef(null);return _.createElement(k$,{...i,isOpen:r.isOpen,nodeRef:s},_.createElement(wz,{ref:a,...e,wrapperRef:s},n))}const wz=y.forwardRef((e,t)=>{let{children:n,isOpen:r,hideArrow:i,isNonModal:a,enableBothDismissButtons:s,state:o,wrapperRef:l,onDismissButtonPress:u=()=>o.close()}=e,{styleProps:c}=st(e),{size:d,borderWidth:f,arrowRef:h}=_z();const p=Dz(t);let g=f*Math.SQRT2,b=d+g,v=b*2,{popoverProps:m,arrowProps:$,underlayProps:w,placement:D}=$j({...e,popoverRef:t,maxHeight:null,arrowSize:i?0:v,arrowBoundaryOffset:p},o),{focusWithinProps:S}=As(e);return _.createElement("div",{ref:l},!a&&_.createElement(P$,{isTransparent:!0,...de(w),isOpen:r}),_.createElement("div",{...c,...de(m,S),style:{...c.style,...m.style},ref:t,className:V(Dd(be),"spectrum-Popover",`spectrum-Popover--${D}`,{"spectrum-Popover--withTip":!i,"is-open":r,[`is-open--${D}`]:r},V(Dd(ln),"spectrum-Popover","react-spectrum-Popover"),c.className),role:"presentation","data-testid":"popover"},(!a||s)&&_.createElement(ud,{onDismiss:u}),n,i?null:_.createElement(Ez,{arrowProps:$,isLandscape:$z[D]==="bottom",arrowRef:h,primary:b,secondary:v,borderDiagonal:g}),_.createElement(ud,{onDismiss:u})))});function Dz(e){let[t,n]=y.useState(0);return he(()=>{if(e.current){let r=window.getComputedStyle(e.current).borderRadius;r!==""&&n(parseInt(r,10))}},[e]),t}function _z(){let[e,t]=y.useState(20),[n,r]=y.useState(1),i=y.useRef(null);return he(()=>{if(i.current){let a=window.getComputedStyle(i.current).getPropertyValue("--spectrum-popover-tip-size");a!==""&&t(parseInt(a,10)/2);let s=window.getComputedStyle(i.current).getPropertyValue("--spectrum-popover-tip-borderWidth");s!==""&&r(parseInt(s,10))}},[]),{size:e,borderWidth:n,arrowRef:i}}function Ez(e){let{primary:t,secondary:n,isLandscape:r,arrowProps:i,borderDiagonal:a,arrowRef:s}=e,o=a/2,l=0,u=t-o,c=o,d=n/2,f=n-o,h=r?["M",c,l,"L",d,u,"L",f,l]:["M",l,c,"L",u,d,"L",l,f];return _.createElement("svg",{xmlns:"http://www.w3.org/svg/2000",width:Math.ceil(r?n:t),height:Math.ceil(r?t:n),className:V(Dd(be),"spectrum-Popover-tip"),ref:s,...i},_.createElement("path",{className:V(Dd(be),"spectrum-Popover-tip-triangle"),d:h.join(" ")}))}let Sz=y.forwardRef(xz);function bt(e,t,n,r){Object.defineProperty(e,t,{get:n,set:r,enumerable:!0,configurable:!0})}var ot={};bt(ot,"focus-ring",()=>kv,e=>kv=e);bt(ot,"i18nFontFamily",()=>Pv,e=>Pv=e);bt(ot,"spectrum-overlay--open",()=>_d,e=>_d=e);bt(ot,"is-open",()=>Tv,e=>Tv=e);bt(ot,"spectrum-FocusRing-ring",()=>Ed,e=>Ed=e);bt(ot,"spectrum-FocusRing",()=>Rv,e=>Rv=e);bt(ot,"spectrum-FocusRing--quiet",()=>Mv,e=>Mv=e);bt(ot,"spectrum-overlay",()=>Sd,e=>Sd=e);bt(ot,"spectrum-Modal",()=>Fv,e=>Fv=e);bt(ot,"spectrum-Modal--fullscreen",()=>Av,e=>Av=e);bt(ot,"spectrum-Modal--fullscreenTakeover",()=>Ov,e=>Ov=e);bt(ot,"spectrum-Modal--responsive",()=>Bv,e=>Bv=e);bt(ot,"spectrum-Modal-wrapper",()=>Iv,e=>Iv=e);bt(ot,"spectrum-overlay--bottom--open",()=>Lv,e=>Lv=e);bt(ot,"spectrum-overlay--left--open",()=>Nv,e=>Nv=e);bt(ot,"spectrum-overlay--right--open",()=>jv,e=>jv=e);bt(ot,"spectrum-overlay--top--open",()=>zv,e=>zv=e);var kv,Pv,_d,Tv,Ed,Rv,Mv,Sd,Fv,Av,Ov,Bv,Iv,Lv,Nv,jv,zv;kv="_0YML2q_focus-ring";Pv="_0YML2q_i18nFontFamily";_d="_0YML2q_spectrum-overlay--open";Tv=`_0YML2q_is-open ${_d}`;Ed="_0YML2q_spectrum-FocusRing-ring";Rv=`_0YML2q_spectrum-FocusRing ${Ed}`;Mv="_0YML2q_spectrum-FocusRing--quiet";Sd="_0YML2q_spectrum-overlay";Fv=`_0YML2q_spectrum-Modal ${Sd}`;Av="_0YML2q_spectrum-Modal--fullscreen";Ov="_0YML2q_spectrum-Modal--fullscreenTakeover";Bv="_0YML2q_spectrum-Modal--responsive";Iv="_0YML2q_spectrum-Modal-wrapper";Lv="_0YML2q_spectrum-overlay--bottom--open";Nv="_0YML2q_spectrum-overlay--left--open";jv="_0YML2q_spectrum-overlay--right--open";zv="_0YML2q_spectrum-overlay--top--open";function Cu(e){return e&&e.__esModule?e.default:e}function Cz(e,t){let{children:n,state:r,...i}=e,a=Nn(t),s=y.useRef(null);return _.createElement(k$,{...i,isOpen:r.isOpen,nodeRef:s},_.createElement(Pz,{...e,wrapperRef:s,ref:a},n))}let kz={fullscreen:"fullscreen",fullscreenTakeover:"fullscreenTakeover"},Pz=y.forwardRef(function(e,t){let{type:n,children:r,state:i,isOpen:a,wrapperRef:s}=e,o=kz[n],{styleProps:l}=st(e),{modalProps:u,underlayProps:c}=X7(e,i,t),d=V(Cu(ot),"spectrum-Modal-wrapper",V(Cu(ln),"spectrum-Modal-wrapper","react-spectrum-Modal-wrapper")),f=V(Cu(ot),"spectrum-Modal",{"is-open":a},V(Cu(ln),"spectrum-Modal","react-spectrum-Modal"),{[`spectrum-Modal--${o}`]:o},l.className),p={"--spectrum-visual-viewport-height":rE().height+"px"};return _.createElement("div",{ref:s},_.createElement(P$,{...c,isOpen:a}),_.createElement("div",{className:d,style:p},_.createElement("div",{...l,...u,ref:t,className:f,"data-testid":"modal"},r)))}),Tz=y.forwardRef(Cz);function It(e,t,n,r){Object.defineProperty(e,t,{get:n,set:r,enumerable:!0,configurable:!0})}var vt={};It(vt,"focus-ring",()=>Vv,e=>Vv=e);It(vt,"i18nFontFamily",()=>Wv,e=>Wv=e);It(vt,"spectrum-overlay--open",()=>Cd,e=>Cd=e);It(vt,"is-open",()=>Uv,e=>Uv=e);It(vt,"spectrum-FocusRing-ring",()=>kd,e=>kd=e);It(vt,"spectrum-FocusRing",()=>Hv,e=>Hv=e);It(vt,"spectrum-FocusRing--quiet",()=>Kv,e=>Kv=e);It(vt,"spectrum-overlay",()=>Pd,e=>Pd=e);It(vt,"spectrum-Tray",()=>Yv,e=>Yv=e);It(vt,"spectrum-Tray--fixedHeight",()=>qv,e=>qv=e);It(vt,"spectrum-Tray-wrapper",()=>Gv,e=>Gv=e);It(vt,"spectrum-overlay--bottom--open",()=>Zv,e=>Zv=e);It(vt,"spectrum-overlay--left--open",()=>Xv,e=>Xv=e);It(vt,"spectrum-overlay--right--open",()=>Qv,e=>Qv=e);It(vt,"spectrum-overlay--top--open",()=>Jv,e=>Jv=e);var Vv,Wv,Cd,Uv,kd,Hv,Kv,Pd,Yv,qv,Gv,Zv,Xv,Qv,Jv;Vv="UuxJvG_focus-ring";Wv="UuxJvG_i18nFontFamily";Cd="UuxJvG_spectrum-overlay--open";Uv=`UuxJvG_is-open ${Cd}`;kd="UuxJvG_spectrum-FocusRing-ring";Hv=`UuxJvG_spectrum-FocusRing ${kd}`;Kv="UuxJvG_spectrum-FocusRing--quiet";Pd="UuxJvG_spectrum-overlay";Yv=`UuxJvG_spectrum-Tray ${Pd}`;qv="UuxJvG_spectrum-Tray--fixedHeight";Gv="UuxJvG_spectrum-Tray-wrapper";Zv="UuxJvG_spectrum-overlay--bottom--open";Xv="UuxJvG_spectrum-overlay--left--open";Qv="UuxJvG_spectrum-overlay--right--open";Jv="UuxJvG_spectrum-overlay--top--open";function ep(e){return e&&e.__esModule?e.default:e}function Rz(e,t){let{children:n,state:r,...i}=e,a=Nn(t),s=y.useRef(null);return _.createElement(k$,{...i,isOpen:r.isOpen,nodeRef:s},_.createElement(Mz,{...e,wrapperRef:s,ref:a},n))}let Mz=y.forwardRef(function(e,t){let{children:n,isOpen:r,isFixedHeight:i,state:a,wrapperRef:s}=e,{styleProps:o}=st(e),{modalProps:l,underlayProps:u}=X7({...e,isDismissable:!0},a,t),d={"--spectrum-visual-viewport-height":rE().height+"px"},f=V(ep(vt),"spectrum-Tray-wrapper"),h=V(ep(vt),"spectrum-Tray",{"is-open":r,"spectrum-Tray--fixedHeight":i},V(ep(ln),"spectrum-Tray","react-spectrum-Tray"),o.className);return _.createElement("div",{ref:s},_.createElement(P$,{...u,isOpen:r}),_.createElement("div",{className:f,style:d},_.createElement("div",{...o,...l,className:h,ref:t,"data-testid":"tray"},_.createElement(ud,{onDismiss:a.close}),n,_.createElement(ud,{onDismiss:a.close}))))}),Fz=y.forwardRef(Rz);var dC={};Object.defineProperty(dC,"__esModule",{value:!0});var Az=dC.CheckmarkMedium=fC,tp=Oz(y);function Oz(e){return e&&e.__esModule?e:{default:e}}function e1(){return e1=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},e1.apply(this,arguments)}function Bz(e,t){if(e==null)return{};var n=Iz(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Iz(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function fC(e){var t=e.scale,n=t===void 0?"M":t,r=Bz(e,["scale"]);return tp.default.createElement("svg",e1({},r,r),n==="L"&&tp.default.createElement("path",{d:"M6 14a1 1 0 0 1-.789-.385l-4-5a1 1 0 1 1 1.577-1.23L6 11.376l7.213-8.99a1 1 0 1 1 1.576 1.23l-8 10a1 1 0 0 1-.789.384z"}),n==="M"&&tp.default.createElement("path",{d:"M4.5 10a1.022 1.022 0 0 1-.799-.384l-2.488-3a1 1 0 0 1 1.576-1.233L4.5 7.376l4.712-5.991a1 1 0 1 1 1.576 1.23l-5.51 7A.978.978 0 0 1 4.5 10z"}))}fC.displayName="CheckmarkMedium";function Lz(e){return _.createElement(ba,e,_.createElement(Az,null))}const Nz={...Af,autoFlow:["gridAutoFlow",tt],autoColumns:["gridAutoColumns",Td],autoRows:["gridAutoRows",Td],areas:["gridTemplateAreas",zz],columns:["gridTemplateColumns",M5],rows:["gridTemplateRows",M5],gap:["gap",le],rowGap:["rowGap",le],columnGap:["columnGap",le],justifyItems:["justifyItems",tt],justifyContent:["justifyContent",tt],alignItems:["alignItems",tt],alignContent:["alignContent",tt]};function jz(e,t){let{children:n,...r}=e,{styleProps:i}=st(r,Nz);i.style.display="grid";let a=Nn(t);return _.createElement("div",{...Xt(r),...i,ref:a},n)}function zz(e){return e.map(t=>`"${t}"`).join(` `)}function Td(e){return/^max-content|min-content|minmax|auto|fit-content|repeat|subgrid/.test(e)?e:le(e)}function M5(e){return Array.isArray(e)?e.map(Td).join(" "):Td(e)}const Vz=y.forwardRef(jz);function T$(e,t,n,r){Object.defineProperty(e,t,{get:n,set:r,enumerable:!0,configurable:!0})}var zf={};T$(zf,"flex",()=>t1,e=>t1=e);T$(zf,"flex-container",()=>n1,e=>n1=e);T$(zf,"flex-gap",()=>r1,e=>r1=e);var t1,n1,r1;t1="NW91UW_flex";n1="NW91UW_flex-container";r1="NW91UW_flex-gap";function Wz(e){return e&&e.__esModule?e.default:e}const Uz={direction:["flexDirection",tt],wrap:["flexWrap",Kz],justifyContent:["justifyContent",np],alignItems:["alignItems",np],alignContent:["alignContent",np]};function Hz(e,t){let{children:n,...r}=e,i=p8(),a=(i==null?void 0:i.matchedBreakpoints)||["base"],{styleProps:s}=st(r),{styleProps:o}=st(r,Uz),l=Nn(t),u={...s.style,...o.style};return e.gap!=null&&(u.gap=jh(e.gap,a)),e.columnGap!=null&&(u.columnGap=jh(e.columnGap,a)),e.rowGap!=null&&(u.rowGap=jh(e.rowGap,a)),_.createElement("div",{...Xt(r),className:V(Wz(zf),"flex",s.className),style:u,ref:l},n)}function np(e){return e==="start"?"flex-start":e==="end"?"flex-end":e}function Kz(e){return typeof e=="boolean"?e?"wrap":"nowrap":e}const hC=y.forwardRef(Hz);var pC={};Object.defineProperty(pC,"__esModule",{value:!0});var Yz=pC.CrossLarge=mC,rp=qz(y);function qz(e){return e&&e.__esModule?e:{default:e}}function i1(){return i1=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i1.apply(this,arguments)}function Gz(e,t){if(e==null)return{};var n=Zz(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Zz(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function mC(e){var t=e.scale,n=t===void 0?"M":t,r=Gz(e,["scale"]);return rp.default.createElement("svg",i1({},r,r),n==="L"&&rp.default.createElement("path",{d:"M15.697 14.283L9.414 8l6.283-6.283A1 1 0 1 0 14.283.303L8 6.586 1.717.303A1 1 0 1 0 .303 1.717L6.586 8 .303 14.283a1 1 0 1 0 1.414 1.414L8 9.414l6.283 6.283a1 1 0 1 0 1.414-1.414z"}),n==="M"&&rp.default.createElement("path",{d:"M11.697 10.283L7.414 6l4.283-4.283A1 1 0 1 0 10.283.303L6 4.586 1.717.303A1 1 0 1 0 .303 1.717L4.586 6 .303 10.283a1 1 0 1 0 1.414 1.414L6 7.414l4.283 4.283a1 1 0 1 0 1.414-1.414z"}))}mC.displayName="CrossLarge";function Xz(e){return _.createElement(ba,e,_.createElement(Yz,null))}function se(e,t,n,r){Object.defineProperty(e,t,{get:n,set:r,enumerable:!0,configurable:!0})}var q={};se(q,"focus-ring",()=>a1,e=>a1=e);se(q,"i18nFontFamily",()=>s1,e=>s1=e);se(q,"is-disabled",()=>o1,e=>o1=e);se(q,"is-focused",()=>l1,e=>l1=e);se(q,"is-hovered",()=>u1,e=>u1=e);se(q,"is-invalid",()=>c1,e=>c1=e);se(q,"is-outsideMonth",()=>d1,e=>d1=e);se(q,"is-pressed",()=>f1,e=>f1=e);se(q,"is-range-end",()=>h1,e=>h1=e);se(q,"is-range-selection",()=>p1,e=>p1=e);se(q,"is-range-start",()=>m1,e=>m1=e);se(q,"is-selected",()=>g1,e=>g1=e);se(q,"is-selection-end",()=>v1,e=>v1=e);se(q,"is-selection-start",()=>b1,e=>b1=e);se(q,"is-today",()=>y1,e=>y1=e);se(q,"is-unavailable",()=>$1,e=>$1=e);se(q,"next",()=>x1,e=>x1=e);se(q,"prev",()=>w1,e=>w1=e);se(q,"spectrum-Calendar",()=>D1,e=>D1=e);se(q,"spectrum-Calendar--padded",()=>_1,e=>_1=e);se(q,"spectrum-Calendar-body",()=>E1,e=>E1=e);se(q,"spectrum-Calendar-date",()=>S1,e=>S1=e);se(q,"spectrum-Calendar-dateText",()=>C1,e=>C1=e);se(q,"spectrum-Calendar-dayOfWeek",()=>k1,e=>k1=e);se(q,"spectrum-Calendar-header",()=>P1,e=>P1=e);se(q,"spectrum-Calendar-monthHeader",()=>T1,e=>T1=e);se(q,"spectrum-Calendar-months",()=>R1,e=>R1=e);se(q,"spectrum-Calendar-nextMonth",()=>M1,e=>M1=e);se(q,"spectrum-Calendar-prevMonth",()=>F1,e=>F1=e);se(q,"spectrum-Calendar-table",()=>A1,e=>A1=e);se(q,"spectrum-Calendar-tableCell",()=>O1,e=>O1=e);se(q,"spectrum-Calendar-title",()=>B1,e=>B1=e);se(q,"spectrum-FocusRing-ring",()=>Rd,e=>Rd=e);se(q,"spectrum-FocusRing",()=>I1,e=>I1=e);se(q,"spectrum-FocusRing--quiet",()=>L1,e=>L1=e);se(q,"title",()=>N1,e=>N1=e);var a1,s1,o1,l1,u1,c1,d1,f1,h1,p1,m1,g1,v1,b1,y1,$1,x1,w1,D1,_1,E1,S1,C1,k1,P1,T1,R1,M1,F1,A1,O1,B1,Rd,I1,L1,N1;a1="EuwYBq_focus-ring";s1="EuwYBq_i18nFontFamily";o1="EuwYBq_is-disabled";l1="EuwYBq_is-focused";u1="EuwYBq_is-hovered";c1="EuwYBq_is-invalid";d1="EuwYBq_is-outsideMonth";f1="EuwYBq_is-pressed";h1="EuwYBq_is-range-end";p1="EuwYBq_is-range-selection";m1="EuwYBq_is-range-start";g1="EuwYBq_is-selected";v1="EuwYBq_is-selection-end";b1="EuwYBq_is-selection-start";y1="EuwYBq_is-today";$1="EuwYBq_is-unavailable";x1="EuwYBq_next";w1="EuwYBq_prev";D1="EuwYBq_spectrum-Calendar";_1="EuwYBq_spectrum-Calendar--padded";E1="EuwYBq_spectrum-Calendar-body";S1="EuwYBq_spectrum-Calendar-date";C1="EuwYBq_spectrum-Calendar-dateText";k1="EuwYBq_spectrum-Calendar-dayOfWeek";P1="EuwYBq_spectrum-Calendar-header";T1="EuwYBq_spectrum-Calendar-monthHeader";R1="EuwYBq_spectrum-Calendar-months";M1="EuwYBq_spectrum-Calendar-nextMonth";F1="EuwYBq_spectrum-Calendar-prevMonth";A1="EuwYBq_spectrum-Calendar-table";O1="EuwYBq_spectrum-Calendar-tableCell";B1="EuwYBq_spectrum-Calendar-title";Rd="EuwYBq_spectrum-FocusRing-ring";I1=`EuwYBq_spectrum-FocusRing ${Rd}`;L1="EuwYBq_spectrum-FocusRing--quiet";N1="EuwYBq_title";function ip(e){return e&&e.__esModule?e.default:e}function Qz({state:e,currentMonth:t,...n}){let r=y.useRef(),{cellProps:i,buttonProps:a,isPressed:s,isSelected:o,isDisabled:l,isFocused:u,isInvalid:c,formattedDate:d}=YN({...n,isDisabled:!A2(n.date,t)},e,r),f=e.isCellUnavailable(n.date)&&!l,h=!l&&!c&&e.isCellUnavailable(n.date.add({days:1})),p=!l&&!c&&e.isCellUnavailable(n.date.subtract({days:1})),g="highlightedRange"in e&&e.highlightedRange,b=o&&g&&Ze(n.date,g.start),v=o&&g&&Ze(n.date,g.end),{locale:m}=Qe(),$=kf(n.date,m),w=o&&(p||$===0||n.date.day===1),D=o&&(h||$===6||n.date.day===t.calendar.getDaysInMonth(t)),{focusProps:S,isFocusVisible:k}=pl(),{hoverProps:x,isHovered:T}=If({isDisabled:l||f||e.isReadOnly});return _.createElement("td",{...i,className:V(ip(q),"spectrum-Calendar-tableCell")},_.createElement("span",{...de(a,x,S),ref:r,className:V(ip(q),"spectrum-Calendar-date",{"is-today":w8(n.date,e.timeZone),"is-selected":o,"is-focused":u&&k,"is-disabled":l&&!c,"is-unavailable":f||c&&l,"is-outsideMonth":!A2(n.date,t),"is-range-start":w,"is-range-end":D,"is-range-selection":o&&"highlightedRange"in e,"is-selection-start":b,"is-selection-end":v,"is-hovered":T,"is-pressed":s&&!e.isReadOnly,"is-invalid":c})},_.createElement("span",{className:V(ip(q),"spectrum-Calendar-dateText")},_.createElement("span",null,d))))}function ap(e){return e&&e.__esModule?e.default:e}function Jz(e){let{state:t,startDate:n}=e,{gridProps:r,headerProps:i,weekDays:a}=HN({...e,endDate:Uc(n)},t),{locale:s}=Qe(),o=_I(n,s);return _.createElement("table",{...r,className:V(ap(q),"spectrum-Calendar-body","spectrum-Calendar-table")},_.createElement("thead",i,_.createElement("tr",null,a.map((l,u)=>_.createElement("th",{key:u,className:V(ap(q),"spectrum-Calendar-tableCell")},_.createElement("span",{className:V(ap(q),"spectrum-Calendar-dayOfWeek")},l))))),_.createElement("tbody",null,[...new Array(o).keys()].map(l=>_.createElement("tr",{key:l},t.getDatesInWeek(l,n).map((u,c)=>u?_.createElement(Qz,{key:c,state:t,date:u,currentMonth:n}):_.createElement("td",{key:c}))))))}var gC={};gC={invalidSelection:(e,t)=>`${t.plural(e.selectedCount,{one:"التاريخ",other:"التواريخ"})} المحدد/المحددة غير متوفرة.`};var vC={};vC={invalidSelection:(e,t)=>`${t.plural(e.selectedCount,{one:"Избраната дата не е налична",other:"Избраните дати не са налични"})}.`};var bC={};bC={invalidSelection:(e,t)=>`${t.plural(e.selectedCount,{one:"Vybrané datum není",other:"Vybraná data nejsou"})} k dispozici.`};var yC={};yC={invalidSelection:(e,t)=>`Valgte ${t.plural(e.selectedCount,{one:"dato",other:"datoer"})} ikke ledige.`};var $C={};$C={invalidSelection:(e,t)=>`Ausgewählte(s) ${t.plural(e.selectedCount,{one:"Datum",other:"Daten"})} nicht verfügbar.`};var xC={};xC={invalidSelection:(e,t)=>`${t.plural(e.selectedCount,{one:"Η επιλεγμένη ημερομηνία δεν είναι διαθέσιμη",other:"Οι επιλεγμένες ημερομηνίες δεν είναι διαθέσιμες"})}.`};var wC={};wC={invalidSelection:(e,t)=>`Selected ${t.plural(e.selectedCount,{one:"date",other:"dates"})} unavailable.`};var DC={};DC={invalidSelection:(e,t)=>`${t.plural(e.selectedCount,{one:"La fecha seleccionada no está disponible",other:"Las fechas seleccionadas no están disponibles"})}.`};var _C={};_C={invalidSelection:(e,t)=>`Valitud ${t.plural(e.selectedCount,{one:"kuupäev",other:"kuupäevad"})} pole saadaval.`};var EC={};EC={invalidSelection:(e,t)=>`${t.plural(e.selectedCount,{one:"Valittu päivämäärä ei ole",other:"Valitut päivämäärät eivät ole"})} saatavilla.`};var SC={};SC={invalidSelection:(e,t)=>`${t.plural(e.selectedCount,{one:"La date sélectionnée est indisponible",other:"Les dates sélectionnées sont indisponibles"})}.`};var CC={};CC={invalidSelection:(e,t)=>`נבחר ${t.plural(e.selectedCount,{one:"תאריך",other:"תאריכים"})} אינו זמין.`};var kC={};kC={invalidSelection:(e,t)=>`${t.plural(e.selectedCount,{one:"Odabrani datum nije dostupan",other:"Odabrani datumi nisu dostupni"})}.`};var PC={};PC={invalidSelection:(e,t)=>`A kijelölt ${t.plural(e.selectedCount,{one:"dátum nem érhető el",other:"dátumok nem érhetőek el"})}.`};var TC={};TC={invalidSelection:(e,t)=>`${t.plural(e.selectedCount,{one:"Data selezionata non disponibile",other:"Date selezionate non disponibili"})}.`};var RC={};RC={invalidSelection:(e,t)=>`選択した${t.plural(e.selectedCount,{one:"日付",other:"日付"})}は使用できません。`};var MC={};MC={invalidSelection:(e,t)=>`선택한 ${t.plural(e.selectedCount,{one:"일자를",other:"일자를"})} 사용할 수 없습니다.`};var FC={};FC={invalidSelection:(e,t)=>`${t.plural(e.selectedCount,{one:"Datos",other:"Datų"})} pasirinkimas negalimas.`};var AC={};AC={invalidSelection:(e,t)=>`Atlasītais(-ie) ${t.plural(e.selectedCount,{one:"date",other:"dates"})} nav pieejams(-i).`};var OC={};OC={invalidSelection:(e,t)=>`Valgt(e) ${t.plural(e.selectedCount,{one:"dato",other:"datoer"})} er utilgjengelig.`};var BC={};BC={invalidSelection:(e,t)=>`Geselecteerde ${t.plural(e.selectedCount,{one:"datum",other:"datums"})} niet beschikbaar.`};var IC={};IC={invalidSelection:(e,t)=>`${t.plural(e.selectedCount,{one:"Wybrana data jest niedostępna",other:"Wybrane daty są niedostępne"})}.`};var LC={};LC={invalidSelection:(e,t)=>`${t.plural(e.selectedCount,{one:"Data",other:"Datas"})} selecionada(s) indisponível(is).`};var NC={};NC={invalidSelection:(e,t)=>`A(s) ${t.plural(e.selectedCount,{one:"data",other:"datas"})} selecionada(s) não está(ão) disponível/disponível(eis).`};var jC={};jC={invalidSelection:(e,t)=>`${t.plural(e.selectedCount,{one:"Data selectată nu este disponibilă",other:"Datele selectate nu sunt disponibile"})}.`};var zC={};zC={invalidSelection:(e,t)=>`Выбранные ${t.plural(e.selectedCount,{one:"дата",other:"даты"})} недоступны.`};var VC={};VC={invalidSelection:(e,t)=>`${t.plural(e.selectedCount,{one:"Vybratý dátum",other:"Vybraté dátumy"})}: nedostupné.`};var WC={};WC={invalidSelection:(e,t)=>`Izbrano ${t.plural(e.selectedCount,{one:"date",other:"dates"})} ni na voljo.`};var UC={};UC={invalidSelection:(e,t)=>`Izabrani ${t.plural(e.selectedCount,{one:"date",other:"dates"})} nije dostupan.`};var HC={};HC={invalidSelection:(e,t)=>`${t.plural(e.selectedCount,{one:"Valt datum är inte tillgängligt.",other:"Valda datum är inte tillgängliga."})}`};var KC={};KC={invalidSelection:(e,t)=>`Seçilen ${t.plural(e.selectedCount,{one:"tarih",other:"tarihler"})} müsait değil.`};var YC={};YC={invalidSelection:(e,t)=>`${t.plural(e.selectedCount,{one:"Вибрана дата недоступна",other:"Вибрані дати недоступні"})}.`};var qC={};qC={invalidSelection:(e,t)=>`选定的 ${t.plural(e.selectedCount,{one:"个日期",other:"个日期"})} 不可用。`};var GC={};GC={invalidSelection:(e,t)=>`所選的${t.plural(e.selectedCount,{one:"日期",other:"日期"})}無法使用。`};var ZC={};ZC={"ar-AE":gC,"bg-BG":vC,"cs-CZ":bC,"da-DK":yC,"de-DE":$C,"el-GR":xC,"en-US":wC,"es-ES":DC,"et-EE":_C,"fi-FI":EC,"fr-FR":SC,"he-IL":CC,"hr-HR":kC,"hu-HU":PC,"it-IT":TC,"ja-JP":RC,"ko-KR":MC,"lt-LT":FC,"lv-LV":AC,"nb-NO":OC,"nl-NL":BC,"pl-PL":IC,"pt-BR":LC,"pt-PT":NC,"ro-RO":jC,"ru-RU":zC,"sk-SK":VC,"sl-SI":WC,"sr-SP":UC,"sv-SE":HC,"tr-TR":KC,"uk-UA":YC,"zh-CN":qC,"zh-TW":GC};var XC={};Object.defineProperty(XC,"__esModule",{value:!0});var eV=XC.ChevronLeftLarge=QC,sp=tV(y);function tV(e){return e&&e.__esModule?e:{default:e}}function j1(){return j1=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},j1.apply(this,arguments)}function nV(e,t){if(e==null)return{};var n=rV(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function rV(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function QC(e){var t=e.scale,n=t===void 0?"M":t,r=nV(e,["scale"]);return sp.default.createElement("svg",j1({},r,r),n==="L"&&sp.default.createElement("path",{d:"M12.109 17.853l-8.066-7.849 8.066-7.84a1.243 1.243 0 0 0 .381-.894 1.24 1.24 0 0 0-2.12-.894L1.379 9.108a1.246 1.246 0 0 0 .003 1.79l8.99 8.744a1.247 1.247 0 1 0 1.738-1.789z"}),n==="M"&&sp.default.createElement("path",{d:"M9.605 13.843L3.55 8l6.056-5.84A1.248 1.248 0 1 0 7.876.363L.882 7.1a1.243 1.243 0 0 0 .003 1.797l6.988 6.742a1.248 1.248 0 1 0 1.732-1.796z"}))}QC.displayName="ChevronLeftLarge";function F5(e){return _.createElement(ba,e,_.createElement(eV,null))}var JC={};Object.defineProperty(JC,"__esModule",{value:!0});var iV=JC.ChevronRightLarge=ek,op=aV(y);function aV(e){return e&&e.__esModule?e:{default:e}}function z1(){return z1=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},z1.apply(this,arguments)}function sV(e,t){if(e==null)return{};var n=oV(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function oV(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function ek(e){var t=e.scale,n=t===void 0?"M":t,r=sV(e,["scale"]);return op.default.createElement("svg",z1({},r,r),n==="L"&&op.default.createElement("path",{d:"M15 10.004a1.243 1.243 0 0 0-.38-.894L5.631.364a1.249 1.249 0 1 0-1.741 1.79l8.066 7.85-8.069 7.847a1.249 1.249 0 0 0 1.741 1.79l8.992-8.74a1.246 1.246 0 0 0 .379-.897z"}),n==="M"&&op.default.createElement("path",{d:"M11.5 8a1.241 1.241 0 0 0-.386-.897L4.128.36a1.248 1.248 0 1 0-1.733 1.797L8.45 8l-6.058 5.84a1.248 1.248 0 1 0 1.733 1.797L11.117 8.9A1.245 1.245 0 0 0 11.5 8z"}))}ek.displayName="ChevronRightLarge";function A5(e){return _.createElement(ba,e,_.createElement(iV,null))}function jn(e,t,n,r){Object.defineProperty(e,t,{get:n,set:r,enumerable:!0,configurable:!0})}var Rt={};jn(Rt,"focus-ring",()=>V1,e=>V1=e);jn(Rt,"i18nFontFamily",()=>W1,e=>W1=e);jn(Rt,"is-disabled",()=>U1,e=>U1=e);jn(Rt,"spectrum-FocusRing-ring",()=>Md,e=>Md=e);jn(Rt,"spectrum-FocusRing",()=>H1,e=>H1=e);jn(Rt,"spectrum-FocusRing--quiet",()=>K1,e=>K1=e);jn(Rt,"spectrum-HelpText",()=>Y1,e=>Y1=e);jn(Rt,"spectrum-HelpText--negative",()=>q1,e=>q1=e);jn(Rt,"spectrum-HelpText--neutral",()=>G1,e=>G1=e);jn(Rt,"spectrum-HelpText-text",()=>Z1,e=>Z1=e);jn(Rt,"spectrum-HelpText-validationIcon",()=>X1,e=>X1=e);var V1,W1,U1,Md,H1,K1,Y1,q1,G1,Z1,X1;V1="a1Qy2q_focus-ring";W1="a1Qy2q_i18nFontFamily";U1="a1Qy2q_is-disabled";Md="a1Qy2q_spectrum-FocusRing-ring";H1=`a1Qy2q_spectrum-FocusRing ${Md}`;K1="a1Qy2q_spectrum-FocusRing--quiet";Y1="a1Qy2q_spectrum-HelpText";q1="a1Qy2q_spectrum-HelpText--negative";G1="a1Qy2q_spectrum-HelpText--neutral";Z1="a1Qy2q_spectrum-HelpText-text";X1="a1Qy2q_spectrum-HelpText-validationIcon";var tk={};Object.defineProperty(tk,"__esModule",{value:!0});var nk=tk.AlertMedium=rk,lp=lV(y);function lV(e){return e&&e.__esModule?e:{default:e}}function Q1(){return Q1=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Q1.apply(this,arguments)}function uV(e,t){if(e==null)return{};var n=cV(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function cV(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function rk(e){var t=e.scale,n=t===void 0?"M":t,r=uV(e,["scale"]);return lp.default.createElement("svg",Q1({},r,r),n==="L"&&lp.default.createElement("path",{d:"M10.563 2.206l-9.249 16.55a.5.5 0 0 0 .436.744h18.5a.5.5 0 0 0 .436-.744l-9.251-16.55a.5.5 0 0 0-.872 0zm1.436 15.044a.25.25 0 0 1-.25.25h-1.5a.25.25 0 0 1-.25-.25v-1.5a.25.25 0 0 1 .25-.25h1.5a.25.25 0 0 1 .25.25zm0-3.5a.25.25 0 0 1-.25.25h-1.5a.25.25 0 0 1-.25-.25v-6a.25.25 0 0 1 .25-.25h1.5a.25.25 0 0 1 .25.25z"}),n==="M"&&lp.default.createElement("path",{d:"M8.564 1.289L.2 16.256A.5.5 0 0 0 .636 17h16.728a.5.5 0 0 0 .436-.744L9.436 1.289a.5.5 0 0 0-.872 0zM10 14.75a.25.25 0 0 1-.25.25h-1.5a.25.25 0 0 1-.25-.25v-1.5a.25.25 0 0 1 .25-.25h1.5a.25.25 0 0 1 .25.25zm0-3a.25.25 0 0 1-.25.25h-1.5a.25.25 0 0 1-.25-.25v-6a.25.25 0 0 1 .25-.25h1.5a.25.25 0 0 1 .25.25z"}))}rk.displayName="AlertMedium";const ik=e=>_.createElement("svg",z0({viewBox:"0 0 18 18"},e),_.createElement("path",{d:"M9 10.5a1 1 0 0 1-1-1V5a1 1 0 1 1 2 0v4.5a1 1 0 0 1-1 1Zm0 1.25A1.25 1.25 0 1 0 10.25 13 1.25 1.25 0 0 0 9 11.75Zm8.497 3.589a3.49 3.49 0 0 0 .079-3.474L12 1.815a3.385 3.385 0 0 0-5.994-.007L.416 11.88a3.485 3.485 0 0 0 .089 3.459A3.375 3.375 0 0 0 3.416 17h11.169a3.375 3.375 0 0 0 2.912-1.661ZM10.244 2.77l5.575 10.05a1.497 1.497 0 0 1-.037 1.489 1.374 1.374 0 0 1-1.197.69H3.416a1.374 1.374 0 0 1-1.197-.69 1.493 1.493 0 0 1-.046-1.474l5.593-10.08a1.386 1.386 0 0 1 2.478.015Z"}));ik.displayName=nk.displayName;function ak(e){var t;let n=va();return _.createElement(ba,e,n!=null&&(t=n.theme)!=null&&(t=t.global)!=null&&t.express?_.createElement(ik,null):_.createElement(nk,null))}function ku(e){return e&&e.__esModule?e.default:e}function dV(e,t){let{description:n,errorMessage:r,validationState:i,isInvalid:a,isDisabled:s,showErrorIcon:o,descriptionProps:l,errorMessageProps:u}=e,c=Nn(t),d=r&&(a||i==="invalid"),{styleProps:f}=st(e);return _.createElement("div",{...f,className:V(ku(Rt),"spectrum-HelpText",`spectrum-HelpText--${d?"negative":"neutral"}`,{"is-disabled":s},f.className),ref:c},d?_.createElement(_.Fragment,null,o&&_.createElement(ak,{UNSAFE_className:V(ku(Rt),"spectrum-HelpText-validationIcon")}),_.createElement("div",{...u,className:V(ku(Rt),"spectrum-HelpText-text")},r)):_.createElement("div",{...l,className:V(ku(Rt),"spectrum-HelpText-text")},n))}const sk=_.forwardRef(dV);var ok={};ok={"(optional)":"(اختياري)","(required)":"(مطلوب)"};var lk={};lk={"(optional)":"(незадължително)","(required)":"(задължително)"};var uk={};uk={"(optional)":"(volitelně)","(required)":"(požadováno)"};var ck={};ck={"(optional)":"(valgfrit)","(required)":"(obligatorisk)"};var dk={};dk={"(optional)":"(optional)","(required)":"(erforderlich)"};var fk={};fk={"(optional)":"(προαιρετικό)","(required)":"(απαιτείται)"};var hk={};hk={"(required)":"(required)","(optional)":"(optional)"};var pk={};pk={"(optional)":"(opcional)","(required)":"(obligatorio)"};var mk={};mk={"(optional)":"(valikuline)","(required)":"(nõutav)"};var gk={};gk={"(optional)":"(valinnainen)","(required)":"(pakollinen)"};var vk={};vk={"(optional)":"(facultatif)","(required)":"(requis)"};var bk={};bk={"(optional)":"(אופציונלי)","(required)":"(נדרש)"};var yk={};yk={"(optional)":"(opcionalno)","(required)":"(obvezno)"};var $k={};$k={"(optional)":"(opcionális)","(required)":"(kötelező)"};var xk={};xk={"(optional)":"(facoltativo)","(required)":"(obbligatorio)"};var wk={};wk={"(optional)":"(オプション)","(required)":"(必須)"};var Dk={};Dk={"(optional)":"(선택 사항)","(required)":"(필수 사항)"};var _k={};_k={"(optional)":"(pasirenkama)","(required)":"(privaloma)"};var Ek={};Ek={"(optional)":"(neobligāti)","(required)":"(obligāti)"};var Sk={};Sk={"(optional)":"(valgfritt)","(required)":"(obligatorisk)"};var Ck={};Ck={"(optional)":"(optioneel)","(required)":"(vereist)"};var kk={};kk={"(optional)":"(opcjonalne)","(required)":"(wymagane)"};var Pk={};Pk={"(optional)":"(opcional)","(required)":"(obrigatório)"};var Tk={};Tk={"(optional)":"(opcional)","(required)":"(obrigatório)"};var Rk={};Rk={"(optional)":"(opţional)","(required)":"(obligatoriu)"};var Mk={};Mk={"(optional)":"(дополнительно)","(required)":"(обязательно)"};var Fk={};Fk={"(optional)":"(nepovinné)","(required)":"(povinné)"};var Ak={};Ak={"(optional)":"(opcijsko)","(required)":"(obvezno)"};var Ok={};Ok={"(optional)":"(opciono)","(required)":"(obavezno)"};var Bk={};Bk={"(optional)":"(valfritt)","(required)":"(krävs)"};var Ik={};Ik={"(optional)":"(isteğe bağlı)","(required)":"(gerekli)"};var Lk={};Lk={"(optional)":"(необов’язково)","(required)":"(обов’язково)"};var Nk={};Nk={"(optional)":"(可选)","(required)":"(必填)"};var jk={};jk={"(optional)":"(選填)","(required)":"(必填)"};var zk={};zk={"ar-AE":ok,"bg-BG":lk,"cs-CZ":uk,"da-DK":ck,"de-DE":dk,"el-GR":fk,"en-US":hk,"es-ES":pk,"et-EE":mk,"fi-FI":gk,"fr-FR":vk,"he-IL":bk,"hr-HR":yk,"hu-HU":$k,"it-IT":xk,"ja-JP":wk,"ko-KR":Dk,"lt-LT":_k,"lv-LV":Ek,"nb-NO":Sk,"nl-NL":Ck,"pl-PL":kk,"pt-BR":Pk,"pt-PT":Tk,"ro-RO":Rk,"ru-RU":Mk,"sk-SK":Fk,"sl-SI":Ak,"sr-SP":Ok,"sv-SE":Bk,"tr-TR":Ik,"uk-UA":Lk,"zh-CN":Nk,"zh-TW":jk};function ve(e,t,n,r){Object.defineProperty(e,t,{get:n,set:r,enumerable:!0,configurable:!0})}var te={};ve(te,"contextualHelp",()=>J1,e=>J1=e);ve(te,"field",()=>eb,e=>eb=e);ve(te,"focus-ring",()=>tb,e=>tb=e);ve(te,"helpText",()=>nb,e=>nb=e);ve(te,"i18nFontFamily",()=>rb,e=>rb=e);ve(te,"is-disabled",()=>ib,e=>ib=e);ve(te,"label",()=>ab,e=>ab=e);ve(te,"spectrum-Field",()=>sb,e=>sb=e);ve(te,"spectrum-Field--alignEnd",()=>ob,e=>ob=e);ve(te,"spectrum-Field--hasContextualHelp",()=>lb,e=>lb=e);ve(te,"spectrum-Field--positionSide",()=>ub,e=>ub=e);ve(te,"spectrum-Field--positionTop",()=>cb,e=>cb=e);ve(te,"spectrum-Field-contextualHelp",()=>db,e=>db=e);ve(te,"spectrum-Field-field",()=>fb,e=>fb=e);ve(te,"spectrum-Field-labelCell",()=>hb,e=>hb=e);ve(te,"spectrum-Field-labelWrapper",()=>pb,e=>pb=e);ve(te,"spectrum-Field-wrapper",()=>mb,e=>mb=e);ve(te,"spectrum-FieldLabel",()=>gb,e=>gb=e);ve(te,"spectrum-FieldLabel--alignEnd",()=>vb,e=>vb=e);ve(te,"spectrum-FieldLabel--positionSide",()=>bb,e=>bb=e);ve(te,"spectrum-FieldLabel-requiredIcon",()=>yb,e=>yb=e);ve(te,"spectrum-FocusRing-ring",()=>Fd,e=>Fd=e);ve(te,"spectrum-FocusRing",()=>$b,e=>$b=e);ve(te,"spectrum-FocusRing--quiet",()=>xb,e=>xb=e);ve(te,"spectrum-Form",()=>wb,e=>wb=e);ve(te,"spectrum-Form--positionSide",()=>Db,e=>Db=e);ve(te,"spectrum-Form--positionTop",()=>_b,e=>_b=e);ve(te,"spectrum-Form-itemLabel",()=>Eb,e=>Eb=e);ve(te,"spectrum-LabeledValue",()=>Sb,e=>Sb=e);var J1,eb,tb,nb,rb,ib,ab,sb,ob,lb,ub,cb,db,fb,hb,pb,mb,gb,vb,bb,yb,Fd,$b,xb,wb,Db,_b,Eb,Sb;J1="A-HlBa_contextualHelp";eb="A-HlBa_field";tb="A-HlBa_focus-ring";nb="A-HlBa_helpText";rb="A-HlBa_i18nFontFamily";ib="A-HlBa_is-disabled";ab="A-HlBa_label";sb="A-HlBa_spectrum-Field";ob="A-HlBa_spectrum-Field--alignEnd";lb="A-HlBa_spectrum-Field--hasContextualHelp";ub="A-HlBa_spectrum-Field--positionSide";cb="A-HlBa_spectrum-Field--positionTop";db="A-HlBa_spectrum-Field-contextualHelp";fb="A-HlBa_spectrum-Field-field";hb="A-HlBa_spectrum-Field-labelCell";pb="A-HlBa_spectrum-Field-labelWrapper";mb="A-HlBa_spectrum-Field-wrapper";gb="A-HlBa_spectrum-FieldLabel";vb="A-HlBa_spectrum-FieldLabel--alignEnd";bb="A-HlBa_spectrum-FieldLabel--positionSide";yb="A-HlBa_spectrum-FieldLabel-requiredIcon";Fd="A-HlBa_spectrum-FocusRing-ring";$b=`A-HlBa_spectrum-FocusRing ${Fd}`;xb="A-HlBa_spectrum-FocusRing--quiet";wb="A-HlBa_spectrum-Form";Db="A-HlBa_spectrum-Form--positionSide";_b="A-HlBa_spectrum-Form--positionTop";Eb="A-HlBa_spectrum-Form-itemLabel";Sb="A-HlBa_spectrum-LabeledValue";var Vk={};Object.defineProperty(Vk,"__esModule",{value:!0});var fV=Vk.Asterisk=Wk,up=hV(y);function hV(e){return e&&e.__esModule?e:{default:e}}function Cb(){return Cb=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Cb.apply(this,arguments)}function pV(e,t){if(e==null)return{};var n=mV(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function mV(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function Wk(e){var t=e.scale,n=t===void 0?"M":t,r=pV(e,["scale"]);return up.default.createElement("svg",Cb({},r,r),n==="L"&&up.default.createElement("path",{d:"M7.867 7.872c.061.062.103.145 0 .228l-1.283.827c-.104.061-.145.02-.186-.083L4.804 6.07l-2.09 2.297c-.021.042-.083.083-.145 0l-.994-1.035c-.103-.062-.082-.124 0-.186l2.36-1.966-2.691-1.014c-.042 0-.104-.083-.062-.186l.703-1.41a.11.11 0 0 1 .187-.04L4.43 4.06l.145-3.02A.109.109 0 0 1 4.7.917l1.718.227c.104 0 .124.042.104.145l-.808 2.96 2.734-.828c.061-.042.124-.042.165.082l.27 1.532c.02.103 0 .145-.084.145l-2.856.227z"}),n==="M"&&up.default.createElement("path",{d:"M6.573 6.558c.056.055.092.13 0 .204l-1.148.74c-.093.056-.13.02-.167-.073L3.832 4.947l-1.87 2.055c-.02.037-.075.074-.13 0l-.889-.926c-.092-.055-.074-.111 0-.167l2.111-1.76-2.408-.906c-.037 0-.092-.074-.055-.167l.63-1.259a.097.097 0 0 1 .166-.036l2.111 1.37.13-2.704a.097.097 0 0 1 .111-.11L5.277.54c.092 0 .11.037.092.13l-.722 2.647 2.444-.74c.056-.038.111-.038.148.073l.241 1.37c.019.093 0 .13-.074.13l-2.556.204z"}))}Wk.displayName="Asterisk";function gV(e){return _.createElement(ba,e,_.createElement(fV,null))}function cp(e){return e&&e.__esModule?e.default:e}function vV(e,t){e=Vl(e);let{children:n,labelPosition:r="top",labelAlign:i=r==="side"?"start":null,isRequired:a,necessityIndicator:s=a!=null?"icon":null,includeNecessityIndicatorInAccessibilityName:o=!1,htmlFor:l,for:u,elementType:c="label",onClick:d,...f}=e,h=Nn(t),{styleProps:p}=st(f),g=Sn(cp(zk),"@react-spectrum/label"),b=a?g.format("(required)"):g.format("(optional)"),v=_.createElement(gV,{UNSAFE_className:V(cp(te),"spectrum-FieldLabel-requiredIcon"),"aria-label":o?g.format("(required)"):void 0}),m=V(cp(te),"spectrum-FieldLabel",{"spectrum-FieldLabel--positionSide":r==="side","spectrum-FieldLabel--alignEnd":i==="end"},p.className);return _.createElement(c,{...Xt(f),...p,onClick:d,ref:h,className:m,htmlFor:c==="label"?u||l:void 0},n,(s==="label"||s==="icon"&&a)&&" ",s==="label"&&_.createElement("span",{"aria-hidden":o?void 0:a},b),s==="icon"&&a&&v)}let bV=_.forwardRef(vV),yV=_.createContext(null);function R$(e){let t=y.useContext(yV);return t?{...t,...e}:e}function wi(e){return e&&e.__esModule?e.default:e}function $V(e,t){let n=R$(e),r=n!==e;e=n;let{label:i,labelPosition:a="top",labelAlign:s,isRequired:o,necessityIndicator:l,includeNecessityIndicatorInAccessibilityName:u,validationState:c,isInvalid:d,description:f,errorMessage:h=N=>N.validationErrors.join(" "),validationErrors:p,validationDetails:g,isDisabled:b,showErrorIcon:v,contextualHelp:m,children:$,labelProps:w={},descriptionProps:D={},errorMessageProps:S={},elementType:k,wrapperClassName:x,wrapperProps:T={},...P}=e,{styleProps:E}=st(P),A=null;typeof h=="function"?A=d!=null&&p!=null&&g!=null?h({isInvalid:d,validationErrors:p,validationDetails:g}):null:A=h;let R=!!f||A&&(d||c==="invalid"),F=Qn(),z=Qn();i&&m&&!w.id&&(w.id=z);let B=V(wi(te),"spectrum-Field",{"spectrum-Field--positionTop":a==="top","spectrum-Field--positionSide":a==="side","spectrum-Field--alignEnd":s==="end","spectrum-Field--hasContextualHelp":!!e.contextualHelp},E.className,x);$=_.cloneElement($,de($.props,{className:V(wi(te),"spectrum-Field-field")}));let C=()=>_.createElement(sk,{descriptionProps:D,errorMessageProps:S,description:f,errorMessage:A,validationState:c,isInvalid:d,isDisabled:b,showErrorIcon:v,gridArea:wi(te).helpText}),O=()=>a==="side"?_.createElement(hC,{direction:"column",UNSAFE_className:V(wi(te),"spectrum-Field-wrapper")},$,R&&C()):_.createElement(_.Fragment,null,$,R&&C()),I=_.createElement(_.Fragment,null,i&&_.createElement(bV,{...w,labelPosition:a,labelAlign:s,isRequired:o,necessityIndicator:l,includeNecessityIndicatorInAccessibilityName:u,elementType:k},i),i&&m&&_.createElement(Of,{slots:{actionButton:{UNSAFE_className:V(wi(te),"spectrum-Field-contextualHelp"),id:F,"aria-labelledby":w!=null&&w.id?`${w.id} ${F}`:void 0}}},m));return r&&a==="side"&&i&&m&&(I=_.createElement("div",{className:V(wi(te),"spectrum-Field-labelCell")},_.createElement("div",{className:V(wi(te),"spectrum-Field-labelWrapper")},I))),_.createElement("div",{...E,...T,ref:t,className:B},I,O())}let Uk=_.forwardRef($V);function Pr(e){return e&&e.__esModule?e.default:e}function xV(e){let{state:t,calendarProps:n,nextButtonProps:r,prevButtonProps:i,errorMessageProps:a,calendarRef:s,visibleMonths:o=1}=e,{styleProps:l}=st(e),u=Sn(Pr(ZC),"@react-spectrum/calendar"),{direction:c}=Qe(),d=t.visibleRange.start,f=xn({month:"long",year:"numeric",era:d.calendar.identifier==="gregory"&&d.era==="BC"?"short":void 0,calendar:d.calendar.identifier,timeZone:t.timeZone}),h=[],p=[];for(let g=0;g<o;g++){let b=d.add({months:g});h.push(_.createElement("div",{key:g,className:V(Pr(q),"spectrum-Calendar-monthHeader")},g===0&&_.createElement(j0,{...i,UNSAFE_className:V(Pr(q),"spectrum-Calendar-prevMonth"),isQuiet:!0},c==="rtl"?_.createElement(A5,null):_.createElement(F5,null)),_.createElement("h2",{"aria-hidden":!0,className:V(Pr(q),"spectrum-Calendar-title")},f.format(b.toDate(t.timeZone))),g===o-1&&_.createElement(j0,{...r,UNSAFE_className:V(Pr(q),"spectrum-Calendar-nextMonth"),isQuiet:!0},c==="rtl"?_.createElement(F5,null):_.createElement(A5,null)))),p.push(_.createElement(Jz,{...e,key:g,state:t,startDate:b}))}return _.createElement("div",{...l,...n,ref:s,className:V(Pr(q),"spectrum-Calendar",l.className)},_.createElement(Tg,null,_.createElement("h2",null,n["aria-label"])),_.createElement("div",{className:V(Pr(q),"spectrum-Calendar-header")},h),_.createElement("div",{className:V(Pr(q),"spectrum-Calendar-months")},p),_.createElement(Tg,null,_.createElement("button",{"aria-label":r["aria-label"],disabled:r.isDisabled,onClick:()=>t.focusNextPage(),tabIndex:-1})),t.isValueInvalid&&_.createElement(sk,{showErrorIcon:!0,errorMessage:e.errorMessage||u.format("invalidSelection",{selectedCount:"highlightedRange"in t?2:1}),errorMessageProps:a,isInvalid:!0,UNSAFE_className:"spectrum-Calendar-helpText"}))}function wV(e,t){e=Vl(e);let{visibleMonths:n=1}=e;n=Math.max(n,1);let r=y.useMemo(()=>({months:n}),[n]),{locale:i}=Qe(),a=Bj({...e,locale:i,visibleDuration:r,createCalendar:Y8}),s=y.useRef();y.useImperativeHandle(t,()=>({...Sf(s),focus(){a.setFocused(!0)}}));let{calendarProps:o,prevButtonProps:l,nextButtonProps:u,errorMessageProps:c}=UN(e,a,s);return _.createElement(xV,{...e,visibleMonths:n,state:a,calendarRef:s,calendarProps:o,prevButtonProps:l,nextButtonProps:u,errorMessageProps:c})}const DV=_.forwardRef(wV),Hk=_.createContext(null);var Kk={};Kk={alert:"تنبيه",dismiss:"تجاهل"};var Yk={};Yk={alert:"Сигнал",dismiss:"Отхвърляне"};var qk={};qk={alert:"Výstraha",dismiss:"Odstranit"};var Gk={};Gk={alert:"Advarsel",dismiss:"Luk"};var Zk={};Zk={alert:"Warnhinweis",dismiss:"Schließen"};var Xk={};Xk={alert:"Ειδοποίηση",dismiss:"Απόρριψη"};var Qk={};Qk={dismiss:"Dismiss",alert:"Alert"};var Jk={};Jk={alert:"Alerta",dismiss:"Descartar"};var eP={};eP={alert:"Teade",dismiss:"Lõpeta"};var tP={};tP={alert:"Hälytys",dismiss:"Hylkää"};var nP={};nP={alert:"Alerte",dismiss:"Rejeter"};var rP={};rP={alert:"התראה",dismiss:"התעלם"};var iP={};iP={alert:"Upozorenje",dismiss:"Odbaci"};var aP={};aP={alert:"Figyelmeztetés",dismiss:"Elutasítás"};var sP={};sP={alert:"Avviso",dismiss:"Ignora"};var oP={};oP={alert:"アラート",dismiss:"閉じる"};var lP={};lP={alert:"경고",dismiss:"무시"};var uP={};uP={alert:"Įspėjimas",dismiss:"Atmesti"};var cP={};cP={alert:"Brīdinājums",dismiss:"Nerādīt"};var dP={};dP={alert:"Varsel",dismiss:"Lukk"};var fP={};fP={alert:"Melding",dismiss:"Negeren"};var hP={};hP={alert:"Ostrzeżenie",dismiss:"Zignoruj"};var pP={};pP={alert:"Alerta",dismiss:"Descartar"};var mP={};mP={alert:"Alerta",dismiss:"Dispensar"};var gP={};gP={alert:"Alertă",dismiss:"Revocare"};var vP={};vP={alert:"Предупреждение",dismiss:"Пропустить"};var bP={};bP={alert:"Upozornenie",dismiss:"Zrušiť"};var yP={};yP={alert:"Opozorilo",dismiss:"Opusti"};var $P={};$P={alert:"Upozorenje",dismiss:"Odbaci"};var xP={};xP={alert:"Varning",dismiss:"Avvisa"};var wP={};wP={alert:"Uyarı",dismiss:"Kapat"};var DP={};DP={alert:"Сигнал тривоги",dismiss:"Скасувати"};var _P={};_P={alert:"警报",dismiss:"取消"};var EP={};EP={alert:"警示",dismiss:"關閉"};var SP={};SP={"ar-AE":Kk,"bg-BG":Yk,"cs-CZ":qk,"da-DK":Gk,"de-DE":Zk,"el-GR":Xk,"en-US":Qk,"es-ES":Jk,"et-EE":eP,"fi-FI":tP,"fr-FR":nP,"he-IL":rP,"hr-HR":iP,"hu-HU":aP,"it-IT":sP,"ja-JP":oP,"ko-KR":lP,"lt-LT":uP,"lv-LV":cP,"nb-NO":dP,"nl-NL":fP,"pl-PL":hP,"pt-BR":pP,"pt-PT":mP,"ro-RO":gP,"ru-RU":vP,"sk-SK":bP,"sl-SI":yP,"sr-SP":$P,"sv-SE":xP,"tr-TR":wP,"uk-UA":DP,"zh-CN":_P,"zh-TW":EP};function K(e,t,n,r){Object.defineProperty(e,t,{get:n,set:r,enumerable:!0,configurable:!0})}var H={};K(H,"buttonGroup",()=>kb,e=>kb=e);K(H,"buttonGroup-end",()=>Pb,e=>Pb=e);K(H,"closeButton",()=>Tb,e=>Tb=e);K(H,"content",()=>Rb,e=>Rb=e);K(H,"divider",()=>Mb,e=>Mb=e);K(H,"focus-ring",()=>Fb,e=>Fb=e);K(H,"footer",()=>Ab,e=>Ab=e);K(H,"footer-start",()=>Ob,e=>Ob=e);K(H,"header",()=>Bb,e=>Bb=e);K(H,"header-end",()=>Ib,e=>Ib=e);K(H,"header-start",()=>Lb,e=>Lb=e);K(H,"heading",()=>Nb,e=>Nb=e);K(H,"heading-start",()=>jb,e=>jb=e);K(H,"hero",()=>zb,e=>zb=e);K(H,"i18nFontFamily",()=>Vb,e=>Vb=e);K(H,"spectrum-Button",()=>Wb,e=>Wb=e);K(H,"spectrum-Dialog",()=>Ub,e=>Ub=e);K(H,"spectrum-Dialog--dismissable",()=>Hb,e=>Hb=e);K(H,"spectrum-Dialog--error",()=>Kb,e=>Kb=e);K(H,"spectrum-Dialog--fullscreen",()=>Yb,e=>Yb=e);K(H,"spectrum-Dialog--fullscreenTakeover",()=>qb,e=>qb=e);K(H,"spectrum-Dialog--large",()=>Gb,e=>Gb=e);K(H,"spectrum-Dialog--medium",()=>Zb,e=>Zb=e);K(H,"spectrum-Dialog--noDivider",()=>Xb,e=>Xb=e);K(H,"spectrum-Dialog--small",()=>Qb,e=>Qb=e);K(H,"spectrum-Dialog--warning",()=>Jb,e=>Jb=e);K(H,"spectrum-Dialog-buttonGroup",()=>e4,e=>e4=e);K(H,"spectrum-Dialog-buttonGroup--noFooter",()=>t4,e=>t4=e);K(H,"spectrum-Dialog-closeButton",()=>n4,e=>n4=e);K(H,"spectrum-Dialog-content",()=>r4,e=>r4=e);K(H,"spectrum-Dialog-divider",()=>i4,e=>i4=e);K(H,"spectrum-Dialog-footer",()=>a4,e=>a4=e);K(H,"spectrum-Dialog-grid",()=>s4,e=>s4=e);K(H,"spectrum-Dialog-header",()=>o4,e=>o4=e);K(H,"spectrum-Dialog-header--noTypeIcon",()=>l4,e=>l4=e);K(H,"spectrum-Dialog-heading",()=>u4,e=>u4=e);K(H,"spectrum-Dialog-heading--noHeader",()=>c4,e=>c4=e);K(H,"spectrum-Dialog-heading--noTypeIcon",()=>d4,e=>d4=e);K(H,"spectrum-Dialog-hero",()=>f4,e=>f4=e);K(H,"spectrum-Dialog-typeIcon",()=>h4,e=>h4=e);K(H,"spectrum-FocusRing-ring",()=>Ad,e=>Ad=e);K(H,"spectrum-FocusRing",()=>p4,e=>p4=e);K(H,"spectrum-FocusRing--quiet",()=>m4,e=>m4=e);K(H,"spectrum-overlay",()=>g4,e=>g4=e);K(H,"spectrum-overlay--bottom--open",()=>v4,e=>v4=e);K(H,"spectrum-overlay--left--open",()=>b4,e=>b4=e);K(H,"spectrum-overlay--open",()=>y4,e=>y4=e);K(H,"spectrum-overlay--right--open",()=>$4,e=>$4=e);K(H,"spectrum-overlay--top--open",()=>x4,e=>x4=e);K(H,"typeIcon",()=>w4,e=>w4=e);K(H,"typeIcon-end",()=>D4,e=>D4=e);var kb,Pb,Tb,Rb,Mb,Fb,Ab,Ob,Bb,Ib,Lb,Nb,jb,zb,Vb,Wb,Ub,Hb,Kb,Yb,qb,Gb,Zb,Xb,Qb,Jb,e4,t4,n4,r4,i4,a4,s4,o4,l4,u4,c4,d4,f4,h4,Ad,p4,m4,g4,v4,b4,y4,$4,x4,w4,D4;kb="h_OVWW_buttonGroup";Pb="h_OVWW_buttonGroup-end";Tb="h_OVWW_closeButton";Rb="h_OVWW_content";Mb="h_OVWW_divider";Fb="h_OVWW_focus-ring";Ab="h_OVWW_footer";Ob="h_OVWW_footer-start";Bb="h_OVWW_header";Ib="h_OVWW_header-end";Lb="h_OVWW_header-start";Nb="h_OVWW_heading";jb="h_OVWW_heading-start";zb="h_OVWW_hero";Vb="h_OVWW_i18nFontFamily";Wb="h_OVWW_spectrum-Button";Ub="h_OVWW_spectrum-Dialog";Hb="h_OVWW_spectrum-Dialog--dismissable";Kb="h_OVWW_spectrum-Dialog--error";Yb="h_OVWW_spectrum-Dialog--fullscreen";qb="h_OVWW_spectrum-Dialog--fullscreenTakeover";Gb="h_OVWW_spectrum-Dialog--large";Zb="h_OVWW_spectrum-Dialog--medium";Xb="h_OVWW_spectrum-Dialog--noDivider";Qb="h_OVWW_spectrum-Dialog--small";Jb="h_OVWW_spectrum-Dialog--warning";e4="h_OVWW_spectrum-Dialog-buttonGroup";t4="h_OVWW_spectrum-Dialog-buttonGroup--noFooter";n4="h_OVWW_spectrum-Dialog-closeButton";r4="h_OVWW_spectrum-Dialog-content";i4="h_OVWW_spectrum-Dialog-divider";a4="h_OVWW_spectrum-Dialog-footer";s4="h_OVWW_spectrum-Dialog-grid";o4="h_OVWW_spectrum-Dialog-header";l4="h_OVWW_spectrum-Dialog-header--noTypeIcon";u4="h_OVWW_spectrum-Dialog-heading";c4="h_OVWW_spectrum-Dialog-heading--noHeader";d4="h_OVWW_spectrum-Dialog-heading--noTypeIcon";f4="h_OVWW_spectrum-Dialog-hero";h4="h_OVWW_spectrum-Dialog-typeIcon";Ad="h_OVWW_spectrum-FocusRing-ring";p4=`h_OVWW_spectrum-FocusRing ${Ad}`;m4="h_OVWW_spectrum-FocusRing--quiet";g4="h_OVWW_spectrum-overlay";v4="h_OVWW_spectrum-overlay--bottom--open";b4="h_OVWW_spectrum-overlay--left--open";y4="h_OVWW_spectrum-overlay--open";$4="h_OVWW_spectrum-overlay--right--open";x4="h_OVWW_spectrum-overlay--top--open";w4="h_OVWW_typeIcon";D4="h_OVWW_typeIcon-end";function wt(e){return e&&e.__esModule?e.default:e}let O5={S:"small",M:"medium",L:"large",fullscreen:"fullscreen",fullscreenTakeover:"fullscreenTakeover"};function _V(e,t){e=ci(e,"dialog");let{type:n="modal",...r}=y.useContext(Hk)||{},{children:i,isDismissable:a=r.isDismissable,onDismiss:s=r.onClose,size:o,...l}=e,u=Sn(wt(SP),"@react-spectrum/dialog"),{styleProps:c}=st(l);o=n==="popover"?o||"S":o||"L";let d=Nn(t),f=y.useRef(null),h=O5[n]||O5[o],{dialogProps:p,titleProps:g}=Aj(de(r,e),d),b=bu(`.${wt(H)["spectrum-Dialog-header"]}`,hu(f)),v=bu(`.${wt(H)["spectrum-Dialog-heading"]}`,hu(f)),m=bu(`.${wt(H)["spectrum-Dialog-footer"]}`,hu(f)),$=bu(`.${wt(H)["spectrum-Dialog-typeIcon"]}`,hu(f)),w=y.useMemo(()=>({hero:{UNSAFE_className:wt(H)["spectrum-Dialog-hero"]},heading:{UNSAFE_className:V(wt(H),"spectrum-Dialog-heading",{"spectrum-Dialog-heading--noHeader":!b,"spectrum-Dialog-heading--noTypeIcon":!$}),level:2,...g},header:{UNSAFE_className:V(wt(H),"spectrum-Dialog-header",{"spectrum-Dialog-header--noHeading":!v,"spectrum-Dialog-header--noTypeIcon":!$})},typeIcon:{UNSAFE_className:wt(H)["spectrum-Dialog-typeIcon"]},divider:{UNSAFE_className:wt(H)["spectrum-Dialog-divider"],size:"M"},content:{UNSAFE_className:wt(H)["spectrum-Dialog-content"]},footer:{UNSAFE_className:wt(H)["spectrum-Dialog-footer"]},buttonGroup:{UNSAFE_className:V(wt(H),"spectrum-Dialog-buttonGroup",{"spectrum-Dialog-buttonGroup--noFooter":!m}),align:"end"}}),[m,b,g]);return _.createElement("section",{...c,...p,className:V(wt(H),"spectrum-Dialog",{[`spectrum-Dialog--${h}`]:h,"spectrum-Dialog--dismissable":a},c.className),ref:d},_.createElement(Vz,{ref:f,UNSAFE_className:wt(H)["spectrum-Dialog-grid"]},_.createElement(Of,{slots:w},i),a&&_.createElement(j0,{UNSAFE_className:wt(H)["spectrum-Dialog-closeButton"],isQuiet:!0,"aria-label":u.format("dismiss"),onPress:s},_.createElement(Xz,null))))}let EV=_.forwardRef(_V);function SV(e,t){e=ci(e,"content");let{children:n,...r}=e,{styleProps:i}=st(r),a=Nn(t);return _.createElement("section",{...Xt(r),...i,ref:a},_.createElement(uE,null,n))}const CV=y.forwardRef(SV);function _4(e){let{children:t,type:n="modal",mobileType:r=n==="popover"?"modal":n,hideArrow:i,targetRef:a,isDismissable:s,isKeyboardDismissDisabled:o,...l}=e;if(!Array.isArray(t)||t.length>2)throw new Error("DialogTrigger must have exactly 2 children");let[u,c]=t;JL()&&(n!=="modal"&&r==="modal"&&(s=!0),n=r);let f=yS(e),h=y.useRef(!1);y.useEffect(()=>{h.current=f.isOpen},[f.isOpen]);let p=y.useRef(!1),g=()=>p.current=!0,b=()=>p.current=!1;if(y.useEffect(()=>()=>{(h.current||p.current)&&n!=="popover"&&n!=="tray"&&console.warn("A DialogTrigger unmounted while open. This is likely due to being placed within a trigger that unmounts or inside a conditional. Consider using a DialogContainer instead.")},[]),n==="popover")return _.createElement(PV,{...l,state:f,targetRef:a,trigger:u,content:c,isKeyboardDismissDisabled:o,hideArrow:i});let v=()=>{switch(n){case"fullscreen":case"fullscreenTakeover":case"modal":return _.createElement(Tz,{state:f,isDismissable:n==="modal"?s:!1,type:n,isKeyboardDismissDisabled:o,onExiting:g,onExited:b},typeof c=="function"?c(f.close):c);case"tray":return _.createElement(Fz,{state:f,isKeyboardDismissDisabled:o},typeof c=="function"?c(f.close):c)}};return _.createElement(CP,{type:n,state:f,isDismissable:s,trigger:u,overlay:v()})}_4.getCollectionNode=function*(e){let[t]=_.Children.toArray(e.children),[,n]=e.children;yield{element:t,wrapper:r=>_.createElement(_4,{key:r.key,...e},r,n)}};let kV=_4;function PV({state:e,targetRef:t,trigger:n,content:r,hideArrow:i,...a}){let s=y.useRef(null),{triggerProps:o,overlayProps:l}=fj({type:"dialog"},e,s),u={...o,ref:t?void 0:s},c=_.createElement(Sz,{...a,hideArrow:i,triggerRef:t||s,state:e},typeof r=="function"?r(e.close):r);return _.createElement(CP,{type:"popover",state:e,triggerProps:u,dialogProps:l,trigger:n,overlay:c})}function CP({type:e,state:t,isDismissable:n,dialogProps:r={},triggerProps:i={},overlay:a,trigger:s}){let o={type:e,onClose:t.close,isDismissable:n,...r};return _.createElement(y.Fragment,null,_.createElement(lN,{...i,onPress:t.toggle,isPressed:t.isOpen&&e!=="modal"&&e!=="fullscreen"&&e!=="fullscreenTakeover"},s),_.createElement(Hk.Provider,{value:o},a))}function Ue(e,t,n,r){Object.defineProperty(e,t,{get:n,set:r,enumerable:!0,configurable:!0})}var ee={};Ue(ee,"is-invalid",()=>E4,e=>E4=e);Ue(ee,"is-placeholder",()=>S4,e=>S4=e);Ue(ee,"is-read-only",()=>C4,e=>C4=e);Ue(ee,"react-spectrum-DateField",()=>k4,e=>k4=e);Ue(ee,"react-spectrum-DateField-Input",()=>P4,e=>P4=e);Ue(ee,"react-spectrum-DatePicker-cell",()=>T4,e=>T4=e);Ue(ee,"react-spectrum-DatePicker-placeholder",()=>R4,e=>R4=e);Ue(ee,"react-spectrum-Datepicker-calendar",()=>M4,e=>M4=e);Ue(ee,"react-spectrum-Datepicker-dialog",()=>F4,e=>F4=e);Ue(ee,"react-spectrum-Datepicker-dialogContent",()=>A4,e=>A4=e);Ue(ee,"react-spectrum-Datepicker-endField",()=>O4,e=>O4=e);Ue(ee,"react-spectrum-Datepicker-field",()=>B4,e=>B4=e);Ue(ee,"react-spectrum-Datepicker-fieldWrapper",()=>I4,e=>I4=e);Ue(ee,"react-spectrum-Datepicker-input",()=>L4,e=>L4=e);Ue(ee,"react-spectrum-Datepicker-inputContents",()=>N4,e=>N4=e);Ue(ee,"react-spectrum-Datepicker-literal",()=>j4,e=>j4=e);Ue(ee,"react-spectrum-Datepicker-rangeDash",()=>z4,e=>z4=e);Ue(ee,"react-spectrum-Datepicker-segments",()=>V4,e=>V4=e);Ue(ee,"react-spectrum-Datepicker-startField",()=>W4,e=>W4=e);Ue(ee,"react-spectrum-Datepicker-timeFields",()=>U4,e=>U4=e);Ue(ee,"react-spectrum-TimeField",()=>H4,e=>H4=e);Ue(ee,"react-spectrum-TimeField-fieldWrapper",()=>K4,e=>K4=e);var E4,S4,C4,k4,P4,T4,R4,M4,F4,A4,O4,B4,I4,L4,N4,j4,z4,V4,W4,U4,H4,K4;E4="_2n04KW_is-invalid";S4="_2n04KW_is-placeholder";C4="_2n04KW_is-read-only";k4="_2n04KW_react-spectrum-DateField";P4="_2n04KW_react-spectrum-DateField-Input";T4="_2n04KW_react-spectrum-DatePicker-cell";R4="_2n04KW_react-spectrum-DatePicker-placeholder";M4="_2n04KW_react-spectrum-Datepicker-calendar";F4="_2n04KW_react-spectrum-Datepicker-dialog";A4="_2n04KW_react-spectrum-Datepicker-dialogContent";O4="_2n04KW_react-spectrum-Datepicker-endField";B4="_2n04KW_react-spectrum-Datepicker-field";I4="_2n04KW_react-spectrum-Datepicker-fieldWrapper";L4="_2n04KW_react-spectrum-Datepicker-input";N4="_2n04KW_react-spectrum-Datepicker-inputContents";j4="_2n04KW_react-spectrum-Datepicker-literal";z4="_2n04KW_react-spectrum-Datepicker-rangeDash";V4="_2n04KW_react-spectrum-Datepicker-segments";W4="_2n04KW_react-spectrum-Datepicker-startField";U4="_2n04KW_react-spectrum-Datepicker-timeFields";H4="_2n04KW_react-spectrum-TimeField";K4="_2n04KW_react-spectrum-TimeField-fieldWrapper";function Y4(e){return e&&e.__esModule?e.default:e}function kP({segment:e,state:t,...n}){switch(e.type){case"literal":return _.createElement(TV,{segment:e});default:return _.createElement(RV,{segment:e,state:t,...n})}}function TV({segment:e}){return _.createElement("span",{"aria-hidden":"true",className:V(Y4(ee),"react-spectrum-Datepicker-literal"),"data-testid":e.type==="literal"?void 0:e.type},e.text)}function RV({segment:e,state:t}){let n=y.useRef(),{segmentProps:r}=Tj(e,t,n);return _.createElement("div",{...r,ref:n,className:V(Y4(ee),"react-spectrum-DatePicker-cell",{"is-placeholder":e.isPlaceholder,"is-read-only":!e.isEditable}),style:{...r.style,minWidth:e.maxValue!=null?String(e.maxValue).length+"ch":null},"data-testid":e.type},_.createElement("span",{"aria-hidden":"true",className:V(Y4(ee),"react-spectrum-DatePicker-placeholder")},e.placeholder),e.isPlaceholder?"":e.text)}function MV(e){return e&&e.__esModule?e.default:e}function B5(e){let{isDisabled:t,isReadOnly:n,isRequired:r,inputClassName:i}=e,a=y.useRef(),{locale:s}=Qe(),o=aC({...e,locale:s,createCalendar:Y8}),l=y.useRef(),{fieldProps:u,inputProps:c}=O9({...e,inputRef:l},o,a);return _.createElement("div",{...u,"data-testid":e["data-testid"],className:V(MV(ee),"react-spectrum-Datepicker-segments",i),ref:a},o.segments.map((d,f)=>_.createElement(kP,{key:f,segment:d,state:o,isDisabled:t,isReadOnly:n,isRequired:r})),_.createElement("input",{...c,ref:l}))}function He(e,t,n,r){Object.defineProperty(e,t,{get:n,set:r,enumerable:!0,configurable:!0})}var Re={};He(Re,"focus-ring",()=>q4,e=>q4=e);He(Re,"i18nFontFamily",()=>Od,e=>Od=e);He(Re,"is-disabled",()=>G4,e=>G4=e);He(Re,"is-focused",()=>Z4,e=>Z4=e);He(Re,"is-hovered",()=>X4,e=>X4=e);He(Re,"is-placeholder",()=>Q4,e=>Q4=e);He(Re,"spectrum-FocusRing-ring",()=>Bd,e=>Bd=e);He(Re,"spectrum-FocusRing",()=>Id,e=>Id=e);He(Re,"spectrum-FocusRing--quiet",()=>Ld,e=>Ld=e);He(Re,"spectrum-Textfield",()=>J4,e=>J4=e);He(Re,"spectrum-Textfield--invalid",()=>ey,e=>ey=e);He(Re,"spectrum-Textfield--loadable",()=>ty,e=>ty=e);He(Re,"spectrum-Textfield--multiline",()=>ny,e=>ny=e);He(Re,"spectrum-Textfield--quiet",()=>ry,e=>ry=e);He(Re,"spectrum-Textfield--valid",()=>iy,e=>iy=e);He(Re,"spectrum-Textfield-circleLoader",()=>ay,e=>ay=e);He(Re,"spectrum-Textfield-icon",()=>sy,e=>sy=e);He(Re,"spectrum-Textfield-input",()=>oy,e=>oy=e);He(Re,"spectrum-Textfield-inputIcon",()=>ly,e=>ly=e);He(Re,"spectrum-Textfield-validationIcon",()=>uy,e=>uy=e);He(Re,"spectrum-Textfield-wrapper",()=>cy,e=>cy=e);He(Re,"spectrum-Textfield-wrapper--quiet",()=>dy,e=>dy=e);var q4,Od,G4,Z4,X4,Q4,Bd,Id,Ld,J4,ey,ty,ny,ry,iy,ay,sy,oy,ly,uy,cy,dy;q4="YO3Nla_focus-ring";Od="YO3Nla_i18nFontFamily";G4="YO3Nla_is-disabled";Z4="YO3Nla_is-focused";X4="YO3Nla_is-hovered";Q4="YO3Nla_is-placeholder";Bd="YO3Nla_spectrum-FocusRing-ring";Id=`YO3Nla_spectrum-FocusRing ${Bd}`;Ld="YO3Nla_spectrum-FocusRing--quiet";J4=`YO3Nla_spectrum-Textfield ${Id}`;ey="YO3Nla_spectrum-Textfield--invalid";ty="YO3Nla_spectrum-Textfield--loadable";ny="YO3Nla_spectrum-Textfield--multiline";ry=`YO3Nla_spectrum-Textfield--quiet ${Ld}`;iy="YO3Nla_spectrum-Textfield--valid";ay="YO3Nla_spectrum-Textfield-circleLoader";sy="YO3Nla_spectrum-Textfield-icon";oy=`YO3Nla_spectrum-Textfield-input ${Od}`;ly="YO3Nla_spectrum-Textfield-inputIcon";uy="YO3Nla_spectrum-Textfield-validationIcon";cy="YO3Nla_spectrum-Textfield-wrapper";dy="YO3Nla_spectrum-Textfield-wrapper--quiet";function Di(e){return e&&e.__esModule?e.default:e}function FV(e,t){let n=y.useRef(null),{isDisabled:r,isQuiet:i,inputClassName:a,validationState:s,children:o,fieldProps:l,className:u,style:c,disableFocusRing:d}=e,[f,h]=G8(!1),p=y.useCallback(()=>h(function*(k){if(n.current){if(k){if(n.current.scrollWidth>n.current.offsetWidth){let x=n.current.parentElement.offsetWidth;yield!1,n.current.parentElement.offsetWidth!==x&&(yield!0)}}else if(n.current.offsetWidth>=n.current.scrollWidth){let x=n.current.parentElement.offsetWidth;yield!0,n.current.parentElement.offsetWidth===x&&(yield!1)}}}),[n,h]);he(p,[p]),nE({ref:n,onResize:p}),os(y.useRef(typeof window<"u"?window:null),"resize",p);let{focusProps:g,isFocusVisible:b,isFocused:v}=pl({isTextInput:!0,within:!0}),m=s==="invalid"&&!r,$=V(Di(Re),"spectrum-Textfield",{"spectrum-Textfield--invalid":m,"spectrum-Textfield--valid":s==="valid"&&!r,"spectrum-Textfield--quiet":i,"focus-ring":b&&!d},V(Di(ee),"react-spectrum-Datepicker-field"),u),w=V(Di(Re),"spectrum-Textfield-input",{"is-disabled":r,"is-focused":v},V(Di(ee),"react-spectrum-DateField-Input"),f&&V(Di(ee),"react-spectrum-Datepicker-input"),a),D=V(Di(Re),"spectrum-Textfield-validationIcon"),S=null;return s==="invalid"&&!r?S=_.createElement(ak,{"data-testid":"invalid-icon",UNSAFE_className:D}):s==="valid"&&!r&&(S=_.createElement(Lz,{"data-testid":"valid-icon",UNSAFE_className:D})),_.createElement("div",{role:"presentation",...de(l,g),className:$,style:c},_.createElement("div",{role:"presentation",className:w},_.createElement("div",{role:"presentation",className:V(Di(ee),"react-spectrum-Datepicker-inputContents"),ref:fL(t,n)},o)),S)}const PP=_.forwardRef(FV);var TP={};TP={endTime:"وقت الانتهاء",startTime:"وقت البدء",time:"الوقت"};var RP={};RP={endTime:"Краен час",startTime:"Начален час",time:"Време"};var MP={};MP={endTime:"Konečný čas",startTime:"Počáteční čas",time:"Čas"};var FP={};FP={endTime:"Sluttidspunkt",startTime:"Starttidspunkt",time:"Klokkeslæt"};var AP={};AP={endTime:"Endzeit",startTime:"Startzeit",time:"Uhrzeit"};var OP={};OP={endTime:"Χρόνος λήξης",startTime:"Ώρα έναρξης",time:"Χρόνος"};var BP={};BP={time:"Time",startTime:"Start time",endTime:"End time"};var IP={};IP={endTime:"Hora de finalización",startTime:"Hora de inicio",time:"Hora"};var LP={};LP={endTime:"Lõpuaeg",startTime:"Algusaeg",time:"Aeg"};var NP={};NP={endTime:"Päättymisaika",startTime:"Alkamisaika",time:"Aika"};var jP={};jP={endTime:"Heure de fin",startTime:"Heure de début",time:"Heure"};var zP={};zP={endTime:"שעת סיום",startTime:"שעת התחלה",time:"זמן"};var VP={};VP={endTime:"Vrijeme završetka",startTime:"Vrijeme početka",time:"Vrijeme"};var WP={};WP={endTime:"Befejezés ideje",startTime:"Kezdés ideje",time:"Idő"};var UP={};UP={endTime:"Ora di fine",startTime:"Ora di inizio",time:"Ora"};var HP={};HP={endTime:"終了時刻",startTime:"開始時刻",time:"時刻"};var KP={};KP={endTime:"종료 시간",startTime:"시작 시간",time:"시간"};var YP={};YP={endTime:"Pabaigos laikas",startTime:"Pradžios laikas",time:"Laikas"};var qP={};qP={endTime:"Beigu laiks",startTime:"Sākuma laiks",time:"Laiks"};var GP={};GP={endTime:"Sluttid",startTime:"Starttid",time:"Tid"};var ZP={};ZP={endTime:"Eindtijd",startTime:"Starttijd",time:"Tijd"};var XP={};XP={endTime:"Godzina końcowa",startTime:"Godzina początkowa",time:"Godzina"};var QP={};QP={endTime:"Hora final",startTime:"Hora inicial",time:"Hora"};var JP={};JP={endTime:"Terminar tempo",startTime:"Iniciar tempo",time:"Tempo"};var eT={};eT={endTime:"Ora de sfârșit",startTime:"Ora de început",time:"Ora"};var tT={};tT={endTime:"Время окончания",startTime:"Время начала",time:"Время"};var nT={};nT={endTime:"Čas ukončenia",startTime:"Čas začiatku",time:"Čas"};var rT={};rT={endTime:"Končni čas",startTime:"Začetni čas",time:"Čas"};var iT={};iT={endTime:"Završno vreme",startTime:"Početno vreme",time:"Vreme"};var aT={};aT={endTime:"Sluttid",startTime:"Starttid",time:"Tid"};var sT={};sT={endTime:"Bitiş saati",startTime:"Başlangıç saati",time:"Saat"};var oT={};oT={endTime:"Час завершення",startTime:"Час початку",time:"Час"};var lT={};lT={endTime:"结束时间",startTime:"开始时间",time:"时间"};var uT={};uT={endTime:"結束時間",startTime:"開始時間",time:"時間"};var cT={};cT={"ar-AE":TP,"bg-BG":RP,"cs-CZ":MP,"da-DK":FP,"de-DE":AP,"el-GR":OP,"en-US":BP,"es-ES":IP,"et-EE":LP,"fi-FI":NP,"fr-FR":jP,"he-IL":zP,"hr-HR":VP,"hu-HU":WP,"it-IT":UP,"ja-JP":HP,"ko-KR":KP,"lt-LT":YP,"lv-LV":qP,"nb-NO":GP,"nl-NL":ZP,"pl-PL":XP,"pt-BR":QP,"pt-PT":JP,"ro-RO":eT,"ru-RU":tT,"sk-SK":nT,"sl-SI":rT,"sr-SP":iT,"sv-SE":aT,"tr-TR":sT,"uk-UA":oT,"zh-CN":lT,"zh-TW":uT};function Se(e,t,n,r){Object.defineProperty(e,t,{get:n,set:r,enumerable:!0,configurable:!0})}var fe={};Se(fe,"focus-ring",()=>fy,e=>fy=e);Se(fe,"i18nFontFamily",()=>hy,e=>hy=e);Se(fe,"is-disabled",()=>py,e=>py=e);Se(fe,"is-focused",()=>my,e=>my=e);Se(fe,"is-hovered",()=>gy,e=>gy=e);Se(fe,"is-selected",()=>vy,e=>vy=e);Se(fe,"spectrum-Datepicker--datetimeRange",()=>by,e=>by=e);Se(fe,"spectrum-Datepicker--range",()=>yy,e=>yy=e);Se(fe,"spectrum-Datepicker--rangeDash",()=>$y,e=>$y=e);Se(fe,"spectrum-Datepicker-endField",()=>xy,e=>xy=e);Se(fe,"spectrum-Datepicker-focusRing",()=>wy,e=>wy=e);Se(fe,"spectrum-Datepicker-startField",()=>Dy,e=>Dy=e);Se(fe,"spectrum-FieldButton",()=>_y,e=>_y=e);Se(fe,"spectrum-FieldButton--invalid",()=>Ey,e=>Ey=e);Se(fe,"spectrum-FocusRing-ring",()=>Nd,e=>Nd=e);Se(fe,"spectrum-FocusRing",()=>jd,e=>jd=e);Se(fe,"spectrum-FocusRing--quiet",()=>zd,e=>zd=e);Se(fe,"spectrum-InputGroup",()=>Sy,e=>Sy=e);Se(fe,"spectrum-InputGroup--invalid",()=>Cy,e=>Cy=e);Se(fe,"spectrum-InputGroup--quiet",()=>ky,e=>ky=e);Se(fe,"spectrum-InputGroup-field",()=>Py,e=>Py=e);Se(fe,"spectrum-InputGroup-icon",()=>Ty,e=>Ty=e);Se(fe,"spectrum-InputGroup-input",()=>Ry,e=>Ry=e);Se(fe,"spectrum-InputGroup-input-circleLoader",()=>My,e=>My=e);Se(fe,"spectrum-InputGroup-input-validationIcon",()=>Fy,e=>Fy=e);Se(fe,"spectrum-InputGroup-popover--quiet",()=>Ay,e=>Ay=e);var fy,hy,py,my,gy,vy,by,yy,$y,xy,wy,Dy,_y,Ey,Nd,jd,zd,Sy,Cy,ky,Py,Ty,Ry,My,Fy,Ay;fy="ZTA2ya_focus-ring";hy="ZTA2ya_i18nFontFamily";py="ZTA2ya_is-disabled";my="ZTA2ya_is-focused";gy="ZTA2ya_is-hovered";vy="ZTA2ya_is-selected";by="ZTA2ya_spectrum-Datepicker--datetimeRange";yy="ZTA2ya_spectrum-Datepicker--range";$y="ZTA2ya_spectrum-Datepicker--rangeDash";xy="ZTA2ya_spectrum-Datepicker-endField";wy="ZTA2ya_spectrum-Datepicker-focusRing";Dy="ZTA2ya_spectrum-Datepicker-startField";_y="ZTA2ya_spectrum-FieldButton";Ey="ZTA2ya_spectrum-FieldButton--invalid";Nd="ZTA2ya_spectrum-FocusRing-ring";jd=`ZTA2ya_spectrum-FocusRing ${Nd}`;zd="ZTA2ya_spectrum-FocusRing--quiet";Sy=`ZTA2ya_spectrum-InputGroup ${jd}`;Cy="ZTA2ya_spectrum-InputGroup--invalid";ky=`ZTA2ya_spectrum-InputGroup--quiet ${zd}`;Py="ZTA2ya_spectrum-InputGroup-field";Ty="ZTA2ya_spectrum-InputGroup-icon";Ry="ZTA2ya_spectrum-InputGroup-input";My="ZTA2ya_spectrum-InputGroup-input-circleLoader";Fy="ZTA2ya_spectrum-InputGroup-input-validationIcon";Ay="ZTA2ya_spectrum-InputGroup-popover--quiet";function AV(e){let t=xn({dateStyle:"short"}),n=B9();return y.useMemo(()=>e.description?e.description:e.showFormatHelpText?t.formatToParts(new Date).map(r=>r.type==="literal"?r.value:n.of(r.type)).join(" "):"",[e.description,e.showFormatHelpText,t,n])}function OV(e){let{scale:t}=va(),[n,r]=y.useState(I5(t));return he(()=>{let i=()=>r(I5(t));return i(),window.addEventListener("resize",i),()=>{window.removeEventListener("resize",i)}},[t]),Math.max(1,Math.min(n,e,3))}function I5(e){if(typeof window>"u")return 1;let t=e==="large"?336:280,n=e==="large"?30:24,r=e==="large"?32:48;return Math.floor((window.innerWidth-r*2)/(t+n))}function dT(e){let t=y.useRef();return y.useImperativeHandle(e,()=>({...Sf(t),focus(){Lf(t).focusFirst({tabbable:!0})}})),t}function L5(e){return e&&e.__esModule?e.default:e}function BV(e,t){e=Vl(e),e=R$(e);let{autoFocus:n,isDisabled:r,isReadOnly:i,isRequired:a,isQuiet:s}=e,o=dT(t),{locale:l}=Qe(),u=qj({...e,locale:l}),c=y.useRef(null),d=y.useRef(null),{labelProps:f,fieldProps:h,inputProps:p,descriptionProps:g,errorMessageProps:b,isInvalid:v,validationErrors:m,validationDetails:$}=Ej({...e,inputRef:d},u,c),w=u.validationState||(v?"invalid":null);return _.createElement(Uk,{...e,ref:o,elementType:"span",labelProps:f,descriptionProps:g,errorMessageProps:b,validationState:w,isInvalid:v,validationErrors:m,validationDetails:$,wrapperClassName:V(L5(ee),"react-spectrum-TimeField-fieldWrapper")},_.createElement(PP,{ref:c,fieldProps:h,isDisabled:r,isQuiet:s,autoFocus:n,validationState:w,className:V(L5(ee),"react-spectrum-TimeField")},u.segments.map((D,S)=>_.createElement(kP,{key:S,segment:D,state:u,isDisabled:r,isReadOnly:i,isRequired:a})),_.createElement("input",{...p,ref:d})))}const N5=_.forwardRef(BV);var fT={};Object.defineProperty(fT,"__esModule",{value:!0});var IV=fT.A4uCalendar=NV,Nt=LV(y);function LV(e){return e&&e.__esModule?e:{default:e}}function Vd(){return Vd=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Vd.apply(this,arguments)}function NV(e){var t=Vd({},e);return Nt.default.createElement("svg",Vd({viewBox:"0 0 36 36"},t,t),Nt.default.createElement("path",{fillRule:"evenodd",d:"M33,6H28V3a1,1,0,0,0-1-1H25a1,1,0,0,0-1,1V6H10V3A1,1,0,0,0,9,2H7A1,1,0,0,0,6,3V6H1A1,1,0,0,0,0,7V33a1,1,0,0,0,1,1H33a1,1,0,0,0,1-1V7A1,1,0,0,0,33,6ZM32,32H2V8H6V9a1,1,0,0,0,1,1H9a1,1,0,0,0,1-1V8H24V9a1,1,0,0,0,1,1h2a1,1,0,0,0,1-1V8h4Z"}),Nt.default.createElement("rect",{fillRule:"evenodd",x:"6",y:"12",width:"4",height:"4"}),Nt.default.createElement("rect",{fillRule:"evenodd",x:"12",y:"12",width:"4",height:"4"}),Nt.default.createElement("rect",{fillRule:"evenodd",x:"18",y:"12",width:"4",height:"4"}),Nt.default.createElement("rect",{fillRule:"evenodd",x:"24",y:"12",width:"4",height:"4"}),Nt.default.createElement("rect",{fillRule:"evenodd",x:"6",y:"18",width:"4",height:"4"}),Nt.default.createElement("rect",{fillRule:"evenodd",x:"12",y:"18",width:"4",height:"4"}),Nt.default.createElement("rect",{fillRule:"evenodd",x:"18",y:"18",width:"4",height:"4"}),Nt.default.createElement("rect",{fillRule:"evenodd",x:"24",y:"18",width:"4",height:"4"}),Nt.default.createElement("rect",{fillRule:"evenodd",x:"6",y:"24",width:"4",height:"4"}),Nt.default.createElement("rect",{fillRule:"evenodd",x:"12",y:"24",width:"4",height:"4"}),Nt.default.createElement("rect",{fillRule:"evenodd",x:"18",y:"24",width:"4",height:"4"}),Nt.default.createElement("rect",{fillRule:"evenodd",x:"24",y:"24",width:"4",height:"4"}))}function jV(e){return _.createElement(oz,e,_.createElement(IV,null))}function zt(e){return e&&e.__esModule?e.default:e}function zV(e,t){var n,r;e=Vl(e),e=R$(e);let{isQuiet:i,isDisabled:a,autoFocus:s,placeholderValue:o,maxVisibleMonths:l=1,pageBehavior:u}=e,{hoverProps:c,isHovered:d}=If({isDisabled:a}),f=y.useRef(),h=Yj({...e,shouldCloseOnSelect:()=>!h.hasTime}),{labelProps:p,groupProps:g,buttonProps:b,dialogProps:v,startFieldProps:m,endFieldProps:$,descriptionProps:w,errorMessageProps:D,calendarProps:S,isInvalid:k,validationErrors:x,validationDetails:T}=Fj(e,h,f),{isOpen:P,setOpen:E}=h,{direction:A}=Qe(),R=dT(t),F=Sn(zt(cT),"@react-spectrum/datepicker"),{isFocused:z,isFocusVisible:B,focusProps:C}=pl({within:!0,isTextInput:!0,autoFocus:s}),{isFocused:O,focusProps:I}=pl({within:!1,isTextInput:!1,autoFocus:s}),N=V(zt(fe),"spectrum-InputGroup",{"spectrum-InputGroup--quiet":i,"spectrum-InputGroup--invalid":k&&!a,"is-disabled":a,"is-hovered":d,"is-focused":z,"focus-ring":B&&!O}),X=V(zt(fe),"spectrum-InputGroup-input",{"is-disabled":a,"is-invalid":k&&!a}),Q=AV(e);Q&&!e.description&&(w.id=null);let je=o,$e=je&&"hour"in je?je:null,lt=e.minValue&&"hour"in e.minValue?e.minValue:null,xe=e.maxValue&&"hour"in e.maxValue?e.maxValue:null,W=h.granularity==="hour"||h.granularity==="minute"||h.granularity==="second"?h.granularity:null,Ce=!!W,et=OV(l),yt=h.validationState||(k?"invalid":null);return _.createElement(Uk,{...e,ref:R,elementType:"span",description:Q,labelProps:p,descriptionProps:w,errorMessageProps:D,validationState:yt,isInvalid:k,validationErrors:x,validationDetails:T,wrapperClassName:V(zt(ee),"react-spectrum-Datepicker-fieldWrapper")},_.createElement("div",{...de(g,c,C),className:N,ref:f},_.createElement(PP,{isDisabled:a,isQuiet:i,validationState:yt,className:V(zt(fe),"spectrum-InputGroup-field"),inputClassName:X,disableFocusRing:!0},_.createElement(B5,{...m,"data-testid":"start-date",isQuiet:e.isQuiet,inputClassName:V(zt(ee),"react-spectrum-Datepicker-startField")}),_.createElement(VV,null),_.createElement(B5,{...$,"data-testid":"end-date",isQuiet:e.isQuiet,inputClassName:V(zt(fe),"spectrum-Datepicker-endField",V(zt(ee),"react-spectrum-Datepicker-endField"))})),_.createElement(kV,{type:"popover",mobileType:"tray",placement:A==="rtl"?"bottom right":"bottom left",targetRef:f,hideArrow:!0,isOpen:P,onOpenChange:E,shouldFlip:e.shouldFlip},_.createElement(fz,{...de(b,I),UNSAFE_className:V(zt(fe),"spectrum-FieldButton"),isQuiet:i,validationState:yt},_.createElement(jV,null)),_.createElement(EV,{UNSAFE_className:V(zt(ee),"react-spectrum-Datepicker-dialog"),...v},_.createElement(CV,null,_.createElement("div",{className:V(zt(ee),"react-spectrum-Datepicker-dialogContent")},_.createElement(DV,{...S,visibleMonths:et,pageBehavior:u,UNSAFE_className:V(zt(ee),"react-spectrum-Datepicker-calendar",{"is-invalid":yt==="invalid"})}),Ce&&_.createElement(hC,{gap:"size-100",marginTop:"size-100",UNSAFE_className:V(zt(ee),"react-spectrum-Datepicker-timeFields")},_.createElement(N5,{label:F.format("startTime"),value:((n=h.timeRange)===null||n===void 0?void 0:n.start)||null,onChange:ut=>h.setTime("start",ut),placeholderValue:$e,granularity:W,minValue:lt,maxValue:xe,hourCycle:e.hourCycle,hideTimeZone:e.hideTimeZone,flex:!0}),_.createElement(N5,{label:F.format("endTime"),value:((r=h.timeRange)===null||r===void 0?void 0:r.end)||null,onChange:ut=>h.setTime("end",ut),placeholderValue:$e,granularity:W,minValue:lt,maxValue:xe,hourCycle:e.hourCycle,hideTimeZone:e.hideTimeZone,flex:!0}))))))))}function VV(){return _.createElement("div",{"aria-hidden":"true","data-testid":"date-range-dash",className:V(zt(ee),"react-spectrum-Datepicker-rangeDash")})}const WV=_.forwardRef(zV);function UV(e,t,n,r){Object.defineProperty(e,t,{get:n,set:r,enumerable:!0,configurable:!0})}var hT={};UV(hT,"spectrum--darkest",()=>Oy,e=>Oy=e);var Oy;Oy="gP7gvq_spectrum--darkest";function ya(e,t,n,r){Object.defineProperty(e,t,{get:n,set:r,enumerable:!0,configurable:!0})}var bi={};ya(bi,"spectrum",()=>By,e=>By=e);ya(bi,"spectrum--dark",()=>Iy,e=>Iy=e);ya(bi,"spectrum--darkest",()=>Ly,e=>Ly=e);ya(bi,"spectrum--large",()=>Ny,e=>Ny=e);ya(bi,"spectrum--light",()=>jy,e=>jy=e);ya(bi,"spectrum--lightest",()=>zy,e=>zy=e);ya(bi,"spectrum--medium",()=>Vy,e=>Vy=e);var By,Iy,Ly,Ny,jy,zy,Vy;By="zA6MfG_spectrum";Iy="zA6MfG_spectrum--dark";Ly="zA6MfG_spectrum--darkest";Ny="zA6MfG_spectrum--large";jy="zA6MfG_spectrum--light";zy="zA6MfG_spectrum--lightest";Vy="zA6MfG_spectrum--medium";function HV(e,t,n,r){Object.defineProperty(e,t,{get:n,set:r,enumerable:!0,configurable:!0})}var pT={};HV(pT,"spectrum--large",()=>Wy,e=>Wy=e);var Wy;Wy="HAZavG_spectrum--large";function KV(e,t,n,r){Object.defineProperty(e,t,{get:n,set:r,enumerable:!0,configurable:!0})}var mT={};KV(mT,"spectrum--light",()=>Uy,e=>Uy=e);var Uy;Uy="PFjRbG_spectrum--light";function YV(e,t,n,r){Object.defineProperty(e,t,{get:n,set:r,enumerable:!0,configurable:!0})}var gT={};YV(gT,"spectrum--medium",()=>Hy,e=>Hy=e);var Hy;Hy="xSyFOq_spectrum--medium";function Js(e){return e&&e.__esModule?e.default:e}let qV={global:Js(bi),light:Js(mT),dark:Js(hT),medium:Js(gT),large:Js(pT)};function Pa(e){let t="flex items-center w-full p-3 leading-tight transition-all rounded-lg outline-none text-start hover:bg-blue-500";return e.name===e.currentPage&&(t+=" border-2 border-black"),M.jsx("a",{href:e.href,children:M.jsxs("div",{role:"button",className:t,children:[M.jsx("div",{className:"grid mr-4 place-items-center",children:M.jsx("i",{className:e.icon})}),e.name]})})}function Vf(e){return M.jsxs("div",{className:"relative flex h-full w-full max-w-[20rem] flex-col bg-white bg-clip-border text-gray-700 shadow-xl shadow-blue-gray-900/5",children:[M.jsx("div",{className:"p-4 mb-2",children:M.jsx("h5",{className:"block font-sans text-xl antialiased font-semibold leading-snug tracking-normal text-blue-gray-900",children:M.jsx("a",{href:"/",children:"fs-tracer"})})}),M.jsxs("nav",{className:"flex min-w-[240px] flex-col gap-1 font-sans text-base font-normal text-blue-gray-700",children:[M.jsx(Pa,{name:"Home",icon:"fa-solid fa-house",href:"/",currentPage:e.currentPage}),M.jsx(Pa,{name:"Recent files",icon:"fa-solid fa-folder",href:"/recent",currentPage:e.currentPage}),M.jsx(Pa,{name:"Search",icon:"fa-solid fa-magnifying-glass",href:"/search",currentPage:e.currentPage}),M.jsx(Pa,{name:"Monitoring",icon:"fa-solid fa-chart-column",href:"/monitoring",currentPage:e.currentPage}),M.jsx(Pa,{name:"Setup",icon:"fa-solid fa-gear",href:"/setup",currentPage:e.currentPage}),M.jsx(Pa,{name:"Logout",icon:"fa-solid fa-right-from-bracket",href:"/logout",currentPage:e.currentPage})]})]})}/*! * @kurkle/color v0.3.2 * https://github.com/kurkle/color#readme @@ -82,4 +82,4 @@ Error generating stack: `+a.message+` * Released under the MIT License */class AU{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(t,n,r,i){const a=n.listeners[i],s=n.duration;a.forEach(o=>o({chart:t,initial:n.initial,numSteps:s,currentStep:Math.min(r-n.start,s)}))}_refresh(){this._request||(this._running=!0,this._request=ST.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(t=Date.now()){let n=0;this._charts.forEach((r,i)=>{if(!r.running||!r.items.length)return;const a=r.items;let s=a.length-1,o=!1,l;for(;s>=0;--s)l=a[s],l._active?(l._total>r.duration&&(r.duration=l._total),l.tick(t),o=!0):(a[s]=a[a.length-1],a.pop());o&&(i.draw(),this._notify(i,r,t,"progress")),a.length||(r.running=!1,this._notify(i,r,t,"complete"),r.initial=!1),n+=a.length}),this._lastDate=t,n===0&&(this._running=!1)}_getAnims(t){const n=this._charts;let r=n.get(t);return r||(r={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},n.set(t,r)),r}listen(t,n,r){this._getAnims(t).listeners[n].push(r)}add(t,n){!n||!n.length||this._getAnims(t).items.push(...n)}has(t){return this._getAnims(t).items.length>0}start(t){const n=this._charts.get(t);n&&(n.running=!0,n.start=Date.now(),n.duration=n.items.reduce((r,i)=>Math.max(r,i._duration),0),this._refresh())}running(t){if(!this._running)return!1;const n=this._charts.get(t);return!(!n||!n.running||!n.items.length)}stop(t){const n=this._charts.get(t);if(!n||!n.items.length)return;const r=n.items;let i=r.length-1;for(;i>=0;--i)r[i].cancel();n.items=[],this._notify(t,n,Date.now(),"complete")}remove(t){return this._charts.delete(t)}}var ar=new AU;const l6="transparent",OU={boolean(e,t,n){return n>.5?t:e},color(e,t,n){const r=Q5(e||l6),i=r.valid&&Q5(t||l6);return i&&i.valid?i.mix(r,n).hexString():t},number(e,t,n){return e+(t-e)*n}};class BU{constructor(t,n,r,i){const a=n[r];i=yo([t.to,i,a,t.from]);const s=yo([t.from,a,i]);this._active=!0,this._fn=t.fn||OU[t.type||typeof s],this._easing=jo[t.easing]||jo.linear,this._start=Math.floor(Date.now()+(t.delay||0)),this._duration=this._total=Math.floor(t.duration),this._loop=!!t.loop,this._target=n,this._prop=r,this._from=s,this._to=i,this._promises=void 0}active(){return this._active}update(t,n,r){if(this._active){this._notify(!1);const i=this._target[this._prop],a=r-this._start,s=this._duration-a;this._start=r,this._duration=Math.floor(Math.max(s,t.duration)),this._total+=a,this._loop=!!t.loop,this._to=yo([t.to,n,i,t.from]),this._from=yo([t.from,i,n])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(t){const n=t-this._start,r=this._duration,i=this._prop,a=this._from,s=this._loop,o=this._to;let l;if(this._active=a!==o&&(s||n<r),!this._active){this._target[i]=o,this._notify(!0);return}if(n<0){this._target[i]=a;return}l=n/r%2,l=s&&l>1?2-l:l,l=this._easing(Math.min(1,Math.max(0,l))),this._target[i]=this._fn(a,o,l)}wait(){const t=this._promises||(this._promises=[]);return new Promise((n,r)=>{t.push({res:n,rej:r})})}_notify(t){const n=t?"res":"rej",r=this._promises||[];for(let i=0;i<r.length;i++)r[i][n]()}}class UT{constructor(t,n){this._chart=t,this._properties=new Map,this.configure(n)}configure(t){if(!ae(t))return;const n=Object.keys(We.animation),r=this._properties;Object.getOwnPropertyNames(t).forEach(i=>{const a=t[i];if(!ae(a))return;const s={};for(const o of n)s[o]=a[o];(Be(a.properties)&&a.properties||[i]).forEach(o=>{(o===i||!r.has(o))&&r.set(o,s)})})}_animateOptions(t,n){const r=n.options,i=LU(t,r);if(!i)return[];const a=this._createAnimations(i,r);return r.$shared&&IU(t.options.$animations,r).then(()=>{t.options=r},()=>{}),a}_createAnimations(t,n){const r=this._properties,i=[],a=t.$animations||(t.$animations={}),s=Object.keys(n),o=Date.now();let l;for(l=s.length-1;l>=0;--l){const u=s[l];if(u.charAt(0)==="$")continue;if(u==="options"){i.push(...this._animateOptions(t,n));continue}const c=n[u];let d=a[u];const f=r.get(u);if(d)if(f&&d.active()){d.update(f,c,o);continue}else d.cancel();if(!f||!f.duration){t[u]=c;continue}a[u]=d=new BU(f,t,u,c),i.push(d)}return i}update(t,n){if(this._properties.size===0){Object.assign(t,n);return}const r=this._createAnimations(t,n);if(r.length)return ar.add(this._chart,r),!0}}function IU(e,t){const n=[],r=Object.keys(t);for(let i=0;i<r.length;i++){const a=e[r[i]];a&&a.active()&&n.push(a.wait())}return Promise.all(n)}function LU(e,t){if(!t)return;let n=e.options;if(!n){e.options=t;return}return n.$shared&&(e.options=n=Object.assign({},n,{$shared:!1,$animations:{}})),n}function u6(e,t){const n=e&&e.options||{},r=n.reverse,i=n.min===void 0?t:0,a=n.max===void 0?t:0;return{start:r?a:i,end:r?i:a}}function NU(e,t,n){if(n===!1)return!1;const r=u6(e,n),i=u6(t,n);return{top:i.end,right:r.end,bottom:i.start,left:r.start}}function jU(e){let t,n,r,i;return ae(e)?(t=e.top,n=e.right,r=e.bottom,i=e.left):t=n=r=i=e,{top:t,right:n,bottom:r,left:i,disabled:e===!1}}function HT(e,t){const n=[],r=e._getSortedDatasetMetas(t);let i,a;for(i=0,a=r.length;i<a;++i)n.push(r[i].index);return n}function c6(e,t,n,r={}){const i=e.keys,a=r.mode==="single";let s,o,l,u;if(t!==null){for(s=0,o=i.length;s<o;++s){if(l=+i[s],l===n){if(r.all)continue;break}u=e.values[l],Ve(u)&&(a||t===0||Zn(t)===Zn(u))&&(t+=u)}return t}}function zU(e,t){const{iScale:n,vScale:r}=t,i=n.axis==="x"?"x":"y",a=r.axis==="x"?"x":"y",s=Object.keys(e),o=new Array(s.length);let l,u,c;for(l=0,u=s.length;l<u;++l)c=s[l],o[l]={[i]:c,[a]:e[c]};return o}function d6(e,t){const n=e&&e.options.stacked;return n||n===void 0&&t.stack!==void 0}function VU(e,t,n){return`${e.id}.${t.id}.${n.stack||n.type}`}function WU(e){const{min:t,max:n,minDefined:r,maxDefined:i}=e.getUserBounds();return{min:r?t:Number.NEGATIVE_INFINITY,max:i?n:Number.POSITIVE_INFINITY}}function UU(e,t,n){const r=e[t]||(e[t]={});return r[n]||(r[n]={})}function f6(e,t,n,r){for(const i of t.getMatchingVisibleMetas(r).reverse()){const a=e[i.index];if(n&&a>0||!n&&a<0)return i.index}return null}function h6(e,t){const{chart:n,_cachedMeta:r}=e,i=n._stacks||(n._stacks={}),{iScale:a,vScale:s,index:o}=r,l=a.axis,u=s.axis,c=VU(a,s,r),d=t.length;let f;for(let h=0;h<d;++h){const p=t[h],{[l]:g,[u]:b}=p,v=p._stacks||(p._stacks={});f=v[u]=UU(i,c,g),f[o]=b,f._top=f6(f,s,!0,r.type),f._bottom=f6(f,s,!1,r.type);const m=f._visualValues||(f._visualValues={});m[o]=b}}function pp(e,t){const n=e.scales;return Object.keys(n).filter(r=>n[r].axis===t).shift()}function HU(e,t){return yi(e,{active:!1,dataset:void 0,datasetIndex:t,index:t,mode:"default",type:"dataset"})}function KU(e,t,n){return yi(e,{active:!1,dataIndex:t,parsed:void 0,raw:void 0,element:n,index:t,mode:"default",type:"data"})}function eo(e,t){const n=e.controller.index,r=e.vScale&&e.vScale.axis;if(r){t=t||e._parsed;for(const i of t){const a=i._stacks;if(!a||a[r]===void 0||a[r][n]===void 0)return;delete a[r][n],a[r]._visualValues!==void 0&&a[r]._visualValues[n]!==void 0&&delete a[r]._visualValues[n]}}}const mp=e=>e==="reset"||e==="none",p6=(e,t)=>t?e:Object.assign({},e),YU=(e,t,n)=>e&&!t.hidden&&t._stacked&&{keys:HT(n,!0),values:null};class In{constructor(t,n){this.chart=t,this._ctx=t.ctx,this.index=n,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.supportsDecimation=!1,this.$context=void 0,this._syncList=[],this.datasetElementType=new.target.datasetElementType,this.dataElementType=new.target.dataElementType,this.initialize()}initialize(){const t=this._cachedMeta;this.configure(),this.linkScales(),t._stacked=d6(t.vScale,t),this.addElements(),this.options.fill&&!this.chart.isPluginEnabled("filler")&&console.warn("Tried to use the 'fill' option without the 'Filler' plugin enabled. Please import and register the 'Filler' plugin and make sure it is not disabled in the options")}updateIndex(t){this.index!==t&&eo(this._cachedMeta),this.index=t}linkScales(){const t=this.chart,n=this._cachedMeta,r=this.getDataset(),i=(d,f,h,p)=>d==="x"?f:d==="r"?p:h,a=n.xAxisID=J(r.xAxisID,pp(t,"x")),s=n.yAxisID=J(r.yAxisID,pp(t,"y")),o=n.rAxisID=J(r.rAxisID,pp(t,"r")),l=n.indexAxis,u=n.iAxisID=i(l,a,s,o),c=n.vAxisID=i(l,s,a,o);n.xScale=this.getScaleForId(a),n.yScale=this.getScaleForId(s),n.rScale=this.getScaleForId(o),n.iScale=this.getScaleForId(u),n.vScale=this.getScaleForId(c)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(t){return this.chart.scales[t]}_getOtherScale(t){const n=this._cachedMeta;return t===n.iScale?n.vScale:n.iScale}reset(){this._update("reset")}_destroy(){const t=this._cachedMeta;this._data&&G5(this._data,this),t._stacked&&eo(t)}_dataCheck(){const t=this.getDataset(),n=t.data||(t.data=[]),r=this._data;if(ae(n)){const i=this._cachedMeta;this._data=zU(n,i)}else if(r!==n){if(r){G5(r,this);const i=this._cachedMeta;eo(i),i._parsed=[]}n&&Object.isExtensible(n)&&MW(n,this),this._syncList=[],this._data=n}}addElements(){const t=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(t.dataset=new this.datasetElementType)}buildOrUpdateElements(t){const n=this._cachedMeta,r=this.getDataset();let i=!1;this._dataCheck();const a=n._stacked;n._stacked=d6(n.vScale,n),n.stack!==r.stack&&(i=!0,eo(n),n.stack=r.stack),this._resyncElements(t),(i||a!==n._stacked)&&h6(this,n._parsed)}configure(){const t=this.chart.config,n=t.datasetScopeKeys(this._type),r=t.getOptionScopes(this.getDataset(),n,!0);this.options=t.createResolver(r,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(t,n){const{_cachedMeta:r,_data:i}=this,{iScale:a,_stacked:s}=r,o=a.axis;let l=t===0&&n===i.length?!0:r._sorted,u=t>0&&r._parsed[t-1],c,d,f;if(this._parsing===!1)r._parsed=i,r._sorted=!0,f=i;else{Be(i[t])?f=this.parseArrayData(r,i,t,n):ae(i[t])?f=this.parseObjectData(r,i,t,n):f=this.parsePrimitiveData(r,i,t,n);const h=()=>d[o]===null||u&&d[o]<u[o];for(c=0;c<n;++c)r._parsed[c+t]=d=f[c],l&&(h()&&(l=!1),u=d);r._sorted=l}s&&h6(this,f)}parsePrimitiveData(t,n,r,i){const{iScale:a,vScale:s}=t,o=a.axis,l=s.axis,u=a.getLabels(),c=a===s,d=new Array(i);let f,h,p;for(f=0,h=i;f<h;++f)p=f+r,d[f]={[o]:c||a.parse(u[p],p),[l]:s.parse(n[p],p)};return d}parseArrayData(t,n,r,i){const{xScale:a,yScale:s}=t,o=new Array(i);let l,u,c,d;for(l=0,u=i;l<u;++l)c=l+r,d=n[c],o[l]={x:a.parse(d[0],c),y:s.parse(d[1],c)};return o}parseObjectData(t,n,r,i){const{xScale:a,yScale:s}=t,{xAxisKey:o="x",yAxisKey:l="y"}=this._parsing,u=new Array(i);let c,d,f,h;for(c=0,d=i;c<d;++c)f=c+r,h=n[f],u[c]={x:a.parse(di(h,o),f),y:s.parse(di(h,l),f)};return u}getParsed(t){return this._cachedMeta._parsed[t]}getDataElement(t){return this._cachedMeta.data[t]}applyStack(t,n,r){const i=this.chart,a=this._cachedMeta,s=n[t.axis],o={keys:HT(i,!0),values:n._stacks[t.axis]._visualValues};return c6(o,s,a.index,{mode:r})}updateRangeFromParsed(t,n,r,i){const a=r[n.axis];let s=a===null?NaN:a;const o=i&&r._stacks[n.axis];i&&o&&(i.values=o,s=c6(i,a,this._cachedMeta.index)),t.min=Math.min(t.min,s),t.max=Math.max(t.max,s)}getMinMax(t,n){const r=this._cachedMeta,i=r._parsed,a=r._sorted&&t===r.iScale,s=i.length,o=this._getOtherScale(t),l=YU(n,r,this.chart),u={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:c,max:d}=WU(o);let f,h;function p(){h=i[f];const g=h[o.axis];return!Ve(h[t.axis])||c>g||d<g}for(f=0;f<s&&!(!p()&&(this.updateRangeFromParsed(u,t,h,l),a));++f);if(a){for(f=s-1;f>=0;--f)if(!p()){this.updateRangeFromParsed(u,t,h,l);break}}return u}getAllParsedValues(t){const n=this._cachedMeta._parsed,r=[];let i,a,s;for(i=0,a=n.length;i<a;++i)s=n[i][t.axis],Ve(s)&&r.push(s);return r}getMaxOverflow(){return!1}getLabelAndValue(t){const n=this._cachedMeta,r=n.iScale,i=n.vScale,a=this.getParsed(t);return{label:r?""+r.getLabelForValue(a[r.axis]):"",value:i?""+i.getLabelForValue(a[i.axis]):""}}_update(t){const n=this._cachedMeta;this.update(t||"default"),n._clip=jU(J(this.options.clip,NU(n.xScale,n.yScale,this.getMaxOverflow())))}update(t){}draw(){const t=this._ctx,n=this.chart,r=this._cachedMeta,i=r.data||[],a=n.chartArea,s=[],o=this._drawStart||0,l=this._drawCount||i.length-o,u=this.options.drawActiveElementsOnTop;let c;for(r.dataset&&r.dataset.draw(t,a,o,l),c=o;c<o+l;++c){const d=i[c];d.hidden||(d.active&&u?s.push(d):d.draw(t,a))}for(c=0;c<s.length;++c)s[c].draw(t,a)}getStyle(t,n){const r=n?"active":"default";return t===void 0&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(r):this.resolveDataElementOptions(t||0,r)}getContext(t,n,r){const i=this.getDataset();let a;if(t>=0&&t<this._cachedMeta.data.length){const s=this._cachedMeta.data[t];a=s.$context||(s.$context=KU(this.getContext(),t,s)),a.parsed=this.getParsed(t),a.raw=i.data[t],a.index=a.dataIndex=t}else a=this.$context||(this.$context=HU(this.chart.getContext(),this.index)),a.dataset=i,a.index=a.datasetIndex=this.index;return a.active=!!n,a.mode=r,a}resolveDatasetElementOptions(t){return this._resolveElementOptions(this.datasetElementType.id,t)}resolveDataElementOptions(t,n){return this._resolveElementOptions(this.dataElementType.id,n,t)}_resolveElementOptions(t,n="default",r){const i=n==="active",a=this._cachedDataOpts,s=t+"-"+n,o=a[s],l=this.enableOptionSharing&&$l(r);if(o)return p6(o,l);const u=this.chart.config,c=u.datasetElementScopeKeys(this._type,t),d=i?[`${t}Hover`,"hover",t,""]:[t,""],f=u.getOptionScopes(this.getDataset(),c),h=Object.keys(We.elements[t]),p=()=>this.getContext(r,i,n),g=u.resolveNamedOptions(f,h,p,d);return g.$shared&&(g.$shared=l,a[s]=Object.freeze(p6(g,l))),g}_resolveAnimations(t,n,r){const i=this.chart,a=this._cachedDataOpts,s=`animation-${n}`,o=a[s];if(o)return o;let l;if(i.options.animation!==!1){const c=this.chart.config,d=c.datasetAnimationScopeKeys(this._type,n),f=c.getOptionScopes(this.getDataset(),d);l=c.createResolver(f,this.getContext(t,r,n))}const u=new UT(i,l&&l.animations);return l&&l._cacheable&&(a[s]=Object.freeze(u)),u}getSharedOptions(t){if(t.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}includeOptions(t,n){return!n||mp(t)||this.chart._animationsDisabled}_getSharedOptions(t,n){const r=this.resolveDataElementOptions(t,n),i=this._sharedOptions,a=this.getSharedOptions(r),s=this.includeOptions(n,a)||a!==i;return this.updateSharedOptions(a,n,r),{sharedOptions:a,includeOptions:s}}updateElement(t,n,r,i){mp(i)?Object.assign(t,r):this._resolveAnimations(n,i).update(t,r)}updateSharedOptions(t,n,r){t&&!mp(n)&&this._resolveAnimations(void 0,n).update(t,r)}_setStyle(t,n,r,i){t.active=i;const a=this.getStyle(n,i);this._resolveAnimations(n,r,i).update(t,{options:!i&&this.getSharedOptions(a)||a})}removeHoverStyle(t,n,r){this._setStyle(t,r,"active",!1)}setHoverStyle(t,n,r){this._setStyle(t,r,"active",!0)}_removeDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!1)}_setDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!0)}_resyncElements(t){const n=this._data,r=this._cachedMeta.data;for(const[o,l,u]of this._syncList)this[o](l,u);this._syncList=[];const i=r.length,a=n.length,s=Math.min(a,i);s&&this.parse(0,s),a>i?this._insertElements(i,a-i,t):a<i&&this._removeElements(a,i-a)}_insertElements(t,n,r=!0){const i=this._cachedMeta,a=i.data,s=t+n;let o;const l=u=>{for(u.length+=n,o=u.length-1;o>=s;o--)u[o]=u[o-n]};for(l(a),o=t;o<s;++o)a[o]=new this.dataElementType;this._parsing&&l(i._parsed),this.parse(t,n),r&&this.updateElements(a,t,n,"reset")}updateElements(t,n,r,i){}_removeElements(t,n){const r=this._cachedMeta;if(this._parsing){const i=r._parsed.splice(t,n);r._stacked&&eo(r,i)}r.data.splice(t,n)}_sync(t){if(this._parsing)this._syncList.push(t);else{const[n,r,i]=t;this[n](r,i)}this.chart._dataChanges.push([this.index,...t])}_onDataPush(){const t=arguments.length;this._sync(["_insertElements",this.getDataset().data.length-t,t])}_onDataPop(){this._sync(["_removeElements",this._cachedMeta.data.length-1,1])}_onDataShift(){this._sync(["_removeElements",0,1])}_onDataSplice(t,n){n&&this._sync(["_removeElements",t,n]);const r=arguments.length-2;r&&this._sync(["_insertElements",t,r])}_onDataUnshift(){this._sync(["_insertElements",0,arguments.length])}}j(In,"defaults",{}),j(In,"datasetElementType",null),j(In,"dataElementType",null);function qU(e,t){if(!e._cache.$bar){const n=e.getMatchingVisibleMetas(t);let r=[];for(let i=0,a=n.length;i<a;i++)r=r.concat(n[i].controller.getAllParsedValues(e));e._cache.$bar=ET(r.sort((i,a)=>i-a))}return e._cache.$bar}function GU(e){const t=e.iScale,n=qU(t,e.type);let r=t._length,i,a,s,o;const l=()=>{s===32767||s===-32768||($l(o)&&(r=Math.min(r,Math.abs(s-o)||r)),o=s)};for(i=0,a=n.length;i<a;++i)s=t.getPixelForValue(n[i]),l();for(o=void 0,i=0,a=t.ticks.length;i<a;++i)s=t.getPixelForTick(i),l();return r}function ZU(e,t,n,r){const i=n.barThickness;let a,s;return ce(i)?(a=t.min*n.categoryPercentage,s=n.barPercentage):(a=i*r,s=1),{chunk:a/r,ratio:s,start:t.pixels[e]-a/2}}function XU(e,t,n,r){const i=t.pixels,a=i[e];let s=e>0?i[e-1]:null,o=e<i.length-1?i[e+1]:null;const l=n.categoryPercentage;s===null&&(s=a-(o===null?t.end-t.start:o-a)),o===null&&(o=a+a-s);const u=a-(a-Math.min(s,o))/2*l;return{chunk:Math.abs(o-s)/2*l/r,ratio:n.barPercentage,start:u}}function QU(e,t,n,r){const i=n.parse(e[0],r),a=n.parse(e[1],r),s=Math.min(i,a),o=Math.max(i,a);let l=s,u=o;Math.abs(s)>Math.abs(o)&&(l=o,u=s),t[n.axis]=u,t._custom={barStart:l,barEnd:u,start:i,end:a,min:s,max:o}}function KT(e,t,n,r){return Be(e)?QU(e,t,n,r):t[n.axis]=n.parse(e,r),t}function m6(e,t,n,r){const i=e.iScale,a=e.vScale,s=i.getLabels(),o=i===a,l=[];let u,c,d,f;for(u=n,c=n+r;u<c;++u)f=t[u],d={},d[i.axis]=o||i.parse(s[u],u),l.push(KT(f,d,a,u));return l}function gp(e){return e&&e.barStart!==void 0&&e.barEnd!==void 0}function JU(e,t,n){return e!==0?Zn(e):(t.isHorizontal()?1:-1)*(t.min>=n?1:-1)}function eH(e){let t,n,r,i,a;return e.horizontal?(t=e.base>e.x,n="left",r="right"):(t=e.base<e.y,n="bottom",r="top"),t?(i="end",a="start"):(i="start",a="end"),{start:n,end:r,reverse:t,top:i,bottom:a}}function tH(e,t,n,r){let i=t.borderSkipped;const a={};if(!i){e.borderSkipped=a;return}if(i===!0){e.borderSkipped={top:!0,right:!0,bottom:!0,left:!0};return}const{start:s,end:o,reverse:l,top:u,bottom:c}=eH(e);i==="middle"&&n&&(e.enableBorderRadius=!0,(n._top||0)===r?i=u:(n._bottom||0)===r?i=c:(a[g6(c,s,o,l)]=!0,i=u)),a[g6(i,s,o,l)]=!0,e.borderSkipped=a}function g6(e,t,n,r){return r?(e=nH(e,t,n),e=v6(e,n,t)):e=v6(e,t,n),e}function nH(e,t,n){return e===t?n:e===n?t:e}function v6(e,t,n){return e==="start"?t:e==="end"?n:e}function rH(e,{inflateAmount:t},n){e.inflateAmount=t==="auto"?n===1?.33:0:t}class lc extends In{parsePrimitiveData(t,n,r,i){return m6(t,n,r,i)}parseArrayData(t,n,r,i){return m6(t,n,r,i)}parseObjectData(t,n,r,i){const{iScale:a,vScale:s}=t,{xAxisKey:o="x",yAxisKey:l="y"}=this._parsing,u=a.axis==="x"?o:l,c=s.axis==="x"?o:l,d=[];let f,h,p,g;for(f=r,h=r+i;f<h;++f)g=n[f],p={},p[a.axis]=a.parse(di(g,u),f),d.push(KT(di(g,c),p,s,f));return d}updateRangeFromParsed(t,n,r,i){super.updateRangeFromParsed(t,n,r,i);const a=r._custom;a&&n===this._cachedMeta.vScale&&(t.min=Math.min(t.min,a.min),t.max=Math.max(t.max,a.max))}getMaxOverflow(){return 0}getLabelAndValue(t){const n=this._cachedMeta,{iScale:r,vScale:i}=n,a=this.getParsed(t),s=a._custom,o=gp(s)?"["+s.start+", "+s.end+"]":""+i.getLabelForValue(a[i.axis]);return{label:""+r.getLabelForValue(a[r.axis]),value:o}}initialize(){this.enableOptionSharing=!0,super.initialize();const t=this._cachedMeta;t.stack=this.getDataset().stack}update(t){const n=this._cachedMeta;this.updateElements(n.data,0,n.data.length,t)}updateElements(t,n,r,i){const a=i==="reset",{index:s,_cachedMeta:{vScale:o}}=this,l=o.getBasePixel(),u=o.isHorizontal(),c=this._getRuler(),{sharedOptions:d,includeOptions:f}=this._getSharedOptions(n,i);for(let h=n;h<n+r;h++){const p=this.getParsed(h),g=a||ce(p[o.axis])?{base:l,head:l}:this._calculateBarValuePixels(h),b=this._calculateBarIndexPixels(h,c),v=(p._stacks||{})[o.axis],m={horizontal:u,base:g.base,enableBorderRadius:!v||gp(p._custom)||s===v._top||s===v._bottom,x:u?g.head:b.center,y:u?b.center:g.head,height:u?b.size:Math.abs(g.size),width:u?Math.abs(g.size):b.size};f&&(m.options=d||this.resolveDataElementOptions(h,t[h].active?"active":i));const $=m.options||t[h].options;tH(m,$,v,s),rH(m,$,c.ratio),this.updateElement(t[h],h,m,i)}}_getStacks(t,n){const{iScale:r}=this._cachedMeta,i=r.getMatchingVisibleMetas(this._type).filter(l=>l.controller.options.grouped),a=r.options.stacked,s=[],o=l=>{const u=l.controller.getParsed(n),c=u&&u[l.vScale.axis];if(ce(c)||isNaN(c))return!0};for(const l of i)if(!(n!==void 0&&o(l))&&((a===!1||s.indexOf(l.stack)===-1||a===void 0&&l.stack===void 0)&&s.push(l.stack),l.index===t))break;return s.length||s.push(void 0),s}_getStackCount(t){return this._getStacks(void 0,t).length}_getStackIndex(t,n,r){const i=this._getStacks(t,r),a=n!==void 0?i.indexOf(n):-1;return a===-1?i.length-1:a}_getRuler(){const t=this.options,n=this._cachedMeta,r=n.iScale,i=[];let a,s;for(a=0,s=n.data.length;a<s;++a)i.push(r.getPixelForValue(this.getParsed(a)[r.axis],a));const o=t.barThickness;return{min:o||GU(n),pixels:i,start:r._startPixel,end:r._endPixel,stackCount:this._getStackCount(),scale:r,grouped:t.grouped,ratio:o?1:t.categoryPercentage*t.barPercentage}}_calculateBarValuePixels(t){const{_cachedMeta:{vScale:n,_stacked:r,index:i},options:{base:a,minBarLength:s}}=this,o=a||0,l=this.getParsed(t),u=l._custom,c=gp(u);let d=l[n.axis],f=0,h=r?this.applyStack(n,l,r):d,p,g;h!==d&&(f=h-d,h=d),c&&(d=u.barStart,h=u.barEnd-u.barStart,d!==0&&Zn(d)!==Zn(u.barEnd)&&(f=0),f+=d);const b=!ce(a)&&!c?a:f;let v=n.getPixelForValue(b);if(this.chart.getDataVisibility(t)?p=n.getPixelForValue(f+h):p=v,g=p-v,Math.abs(g)<s){g=JU(g,n,o)*s,d===o&&(v-=g/2);const m=n.getPixelForDecimal(0),$=n.getPixelForDecimal(1),w=Math.min(m,$),D=Math.max(m,$);v=Math.max(Math.min(v,D),w),p=v+g,r&&!c&&(l._stacks[n.axis]._visualValues[i]=n.getValueForPixel(p)-n.getValueForPixel(v))}if(v===n.getPixelForValue(o)){const m=Zn(g)*n.getLineWidthForValue(o)/2;v+=m,g-=m}return{size:g,base:v,head:p,center:p+g/2}}_calculateBarIndexPixels(t,n){const r=n.scale,i=this.options,a=i.skipNull,s=J(i.maxBarThickness,1/0);let o,l;if(n.grouped){const u=a?this._getStackCount(t):n.stackCount,c=i.barThickness==="flex"?XU(t,n,i,u):ZU(t,n,i,u),d=this._getStackIndex(this.index,this._cachedMeta.stack,a?t:void 0);o=c.start+c.chunk*d+c.chunk/2,l=Math.min(s,c.chunk*c.ratio)}else o=r.getPixelForValue(this.getParsed(t)[r.axis],t),l=Math.min(s,n.min*n.ratio);return{base:o-l/2,head:o+l/2,center:o,size:l}}draw(){const t=this._cachedMeta,n=t.vScale,r=t.data,i=r.length;let a=0;for(;a<i;++a)this.getParsed(a)[n.axis]!==null&&!r[a].hidden&&r[a].draw(this._ctx)}}j(lc,"id","bar"),j(lc,"defaults",{datasetElementType:!1,dataElementType:"bar",categoryPercentage:.8,barPercentage:.9,grouped:!0,animations:{numbers:{type:"number",properties:["x","y","base","width","height"]}}}),j(lc,"overrides",{scales:{_index_:{type:"category",offset:!0,grid:{offset:!0}},_value_:{type:"linear",beginAtZero:!0}}});class uc extends In{initialize(){this.enableOptionSharing=!0,super.initialize()}parsePrimitiveData(t,n,r,i){const a=super.parsePrimitiveData(t,n,r,i);for(let s=0;s<a.length;s++)a[s]._custom=this.resolveDataElementOptions(s+r).radius;return a}parseArrayData(t,n,r,i){const a=super.parseArrayData(t,n,r,i);for(let s=0;s<a.length;s++){const o=n[r+s];a[s]._custom=J(o[2],this.resolveDataElementOptions(s+r).radius)}return a}parseObjectData(t,n,r,i){const a=super.parseObjectData(t,n,r,i);for(let s=0;s<a.length;s++){const o=n[r+s];a[s]._custom=J(o&&o.r&&+o.r,this.resolveDataElementOptions(s+r).radius)}return a}getMaxOverflow(){const t=this._cachedMeta.data;let n=0;for(let r=t.length-1;r>=0;--r)n=Math.max(n,t[r].size(this.resolveDataElementOptions(r))/2);return n>0&&n}getLabelAndValue(t){const n=this._cachedMeta,r=this.chart.data.labels||[],{xScale:i,yScale:a}=n,s=this.getParsed(t),o=i.getLabelForValue(s.x),l=a.getLabelForValue(s.y),u=s._custom;return{label:r[t]||"",value:"("+o+", "+l+(u?", "+u:"")+")"}}update(t){const n=this._cachedMeta.data;this.updateElements(n,0,n.length,t)}updateElements(t,n,r,i){const a=i==="reset",{iScale:s,vScale:o}=this._cachedMeta,{sharedOptions:l,includeOptions:u}=this._getSharedOptions(n,i),c=s.axis,d=o.axis;for(let f=n;f<n+r;f++){const h=t[f],p=!a&&this.getParsed(f),g={},b=g[c]=a?s.getPixelForDecimal(.5):s.getPixelForValue(p[c]),v=g[d]=a?o.getBasePixel():o.getPixelForValue(p[d]);g.skip=isNaN(b)||isNaN(v),u&&(g.options=l||this.resolveDataElementOptions(f,h.active?"active":i),a&&(g.options.radius=0)),this.updateElement(h,f,g,i)}}resolveDataElementOptions(t,n){const r=this.getParsed(t);let i=super.resolveDataElementOptions(t,n);i.$shared&&(i=Object.assign({},i,{$shared:!1}));const a=i.radius;return n!=="active"&&(i.radius=0),i.radius+=J(r&&r._custom,a),i}}j(uc,"id","bubble"),j(uc,"defaults",{datasetElementType:!1,dataElementType:"point",animations:{numbers:{type:"number",properties:["x","y","borderWidth","radius"]}}}),j(uc,"overrides",{scales:{x:{type:"linear"},y:{type:"linear"}}});function iH(e,t,n){let r=1,i=1,a=0,s=0;if(t<Te){const o=e,l=o+t,u=Math.cos(o),c=Math.sin(o),d=Math.cos(l),f=Math.sin(l),h=($,w,D)=>xl($,o,l,!0)?1:Math.max(w,w*n,D,D*n),p=($,w,D)=>xl($,o,l,!0)?-1:Math.min(w,w*n,D,D*n),g=h(0,u,d),b=h(qe,c,f),v=p(Me,u,d),m=p(Me+qe,c,f);r=(g-v)/2,i=(b-m)/2,a=-(g+v)/2,s=-(b+m)/2}return{ratioX:r,ratioY:i,offsetX:a,offsetY:s}}class Hi extends In{constructor(t,n){super(t,n),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(t,n){const r=this.getDataset().data,i=this._cachedMeta;if(this._parsing===!1)i._parsed=r;else{let a=l=>+r[l];if(ae(r[t])){const{key:l="value"}=this._parsing;a=u=>+di(r[u],l)}let s,o;for(s=t,o=t+n;s<o;++s)i._parsed[s]=a(s)}}_getRotation(){return An(this.options.rotation-90)}_getCircumference(){return An(this.options.circumference)}_getRotationExtents(){let t=Te,n=-Te;for(let r=0;r<this.chart.data.datasets.length;++r)if(this.chart.isDatasetVisible(r)&&this.chart.getDatasetMeta(r).type===this._type){const i=this.chart.getDatasetMeta(r).controller,a=i._getRotation(),s=i._getCircumference();t=Math.min(t,a),n=Math.max(n,a+s)}return{rotation:t,circumference:n-t}}update(t){const n=this.chart,{chartArea:r}=n,i=this._cachedMeta,a=i.data,s=this.getMaxBorderWidth()+this.getMaxOffset(a)+this.options.spacing,o=Math.max((Math.min(r.width,r.height)-s)/2,0),l=Math.min(bW(this.options.cutout,o),1),u=this._getRingWeight(this.index),{circumference:c,rotation:d}=this._getRotationExtents(),{ratioX:f,ratioY:h,offsetX:p,offsetY:g}=iH(d,c,l),b=(r.width-s)/f,v=(r.height-s)/h,m=Math.max(Math.min(b,v)/2,0),$=$T(this.options.radius,m),w=Math.max($*l,0),D=($-w)/this._getVisibleDatasetWeightTotal();this.offsetX=p*$,this.offsetY=g*$,i.total=this.calculateTotal(),this.outerRadius=$-D*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-D*u,0),this.updateElements(a,0,a.length,t)}_circumference(t,n){const r=this.options,i=this._cachedMeta,a=this._getCircumference();return n&&r.animation.animateRotate||!this.chart.getDataVisibility(t)||i._parsed[t]===null||i.data[t].hidden?0:this.calculateCircumference(i._parsed[t]*a/Te)}updateElements(t,n,r,i){const a=i==="reset",s=this.chart,o=s.chartArea,u=s.options.animation,c=(o.left+o.right)/2,d=(o.top+o.bottom)/2,f=a&&u.animateScale,h=f?0:this.innerRadius,p=f?0:this.outerRadius,{sharedOptions:g,includeOptions:b}=this._getSharedOptions(n,i);let v=this._getRotation(),m;for(m=0;m<n;++m)v+=this._circumference(m,a);for(m=n;m<n+r;++m){const $=this._circumference(m,a),w=t[m],D={x:c+this.offsetX,y:d+this.offsetY,startAngle:v,endAngle:v+$,circumference:$,outerRadius:p,innerRadius:h};b&&(D.options=g||this.resolveDataElementOptions(m,w.active?"active":i)),v+=$,this.updateElement(w,m,D,i)}}calculateTotal(){const t=this._cachedMeta,n=t.data;let r=0,i;for(i=0;i<n.length;i++){const a=t._parsed[i];a!==null&&!isNaN(a)&&this.chart.getDataVisibility(i)&&!n[i].hidden&&(r+=Math.abs(a))}return r}calculateCircumference(t){const n=this._cachedMeta.total;return n>0&&!isNaN(t)?Te*(Math.abs(t)/n):0}getLabelAndValue(t){const n=this._cachedMeta,r=this.chart,i=r.data.labels||[],a=Ul(n._parsed[t],r.options.locale);return{label:i[t]||"",value:a}}getMaxBorderWidth(t){let n=0;const r=this.chart;let i,a,s,o,l;if(!t){for(i=0,a=r.data.datasets.length;i<a;++i)if(r.isDatasetVisible(i)){s=r.getDatasetMeta(i),t=s.data,o=s.controller;break}}if(!t)return 0;for(i=0,a=t.length;i<a;++i)l=o.resolveDataElementOptions(i),l.borderAlign!=="inner"&&(n=Math.max(n,l.borderWidth||0,l.hoverBorderWidth||0));return n}getMaxOffset(t){let n=0;for(let r=0,i=t.length;r<i;++r){const a=this.resolveDataElementOptions(r);n=Math.max(n,a.offset||0,a.hoverOffset||0)}return n}_getRingWeightOffset(t){let n=0;for(let r=0;r<t;++r)this.chart.isDatasetVisible(r)&&(n+=this._getRingWeight(r));return n}_getRingWeight(t){return Math.max(J(this.chart.data.datasets[t].weight,1),0)}_getVisibleDatasetWeightTotal(){return this._getRingWeightOffset(this.chart.data.datasets.length)||1}}j(Hi,"id","doughnut"),j(Hi,"defaults",{datasetElementType:!1,dataElementType:"arc",animation:{animateRotate:!0,animateScale:!1},animations:{numbers:{type:"number",properties:["circumference","endAngle","innerRadius","outerRadius","startAngle","x","y","offset","borderWidth","spacing"]}},cutout:"50%",rotation:0,circumference:360,radius:"100%",spacing:0,indexAxis:"r"}),j(Hi,"descriptors",{_scriptable:t=>t!=="spacing",_indexable:t=>t!=="spacing"&&!t.startsWith("borderDash")&&!t.startsWith("hoverBorderDash")}),j(Hi,"overrides",{aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const n=t.data;if(n.labels.length&&n.datasets.length){const{labels:{pointStyle:r,color:i}}=t.legend.options;return n.labels.map((a,s)=>{const l=t.getDatasetMeta(0).controller.getStyle(s);return{text:a,fillStyle:l.backgroundColor,strokeStyle:l.borderColor,fontColor:i,lineWidth:l.borderWidth,pointStyle:r,hidden:!t.getDataVisibility(s),index:s}})}return[]}},onClick(t,n,r){r.chart.toggleDataVisibility(n.index),r.chart.update()}}}});class Vo extends In{initialize(){this.enableOptionSharing=!0,this.supportsDecimation=!0,super.initialize()}update(t){const n=this._cachedMeta,{dataset:r,data:i=[],_dataset:a}=n,s=this.chart._animationsDisabled;let{start:o,count:l}=kT(n,i,s);this._drawStart=o,this._drawCount=l,PT(n)&&(o=0,l=i.length),r._chart=this.chart,r._datasetIndex=this.index,r._decimated=!!a._decimated,r.points=i;const u=this.resolveDatasetElementOptions(t);this.options.showLine||(u.borderWidth=0),u.segment=this.options.segment,this.updateElement(r,void 0,{animated:!s,options:u},t),this.updateElements(i,o,l,t)}updateElements(t,n,r,i){const a=i==="reset",{iScale:s,vScale:o,_stacked:l,_dataset:u}=this._cachedMeta,{sharedOptions:c,includeOptions:d}=this._getSharedOptions(n,i),f=s.axis,h=o.axis,{spanGaps:p,segment:g}=this.options,b=_s(p)?p:Number.POSITIVE_INFINITY,v=this.chart._animationsDisabled||a||i==="none",m=n+r,$=t.length;let w=n>0&&this.getParsed(n-1);for(let D=0;D<$;++D){const S=t[D],k=v?S:{};if(D<n||D>=m){k.skip=!0;continue}const x=this.getParsed(D),T=ce(x[h]),P=k[f]=s.getPixelForValue(x[f],D),E=k[h]=a||T?o.getBasePixel():o.getPixelForValue(l?this.applyStack(o,x,l):x[h],D);k.skip=isNaN(P)||isNaN(E)||T,k.stop=D>0&&Math.abs(x[f]-w[f])>b,g&&(k.parsed=x,k.raw=u.data[D]),d&&(k.options=c||this.resolveDataElementOptions(D,S.active?"active":i)),v||this.updateElement(S,D,k,i),w=x}}getMaxOverflow(){const t=this._cachedMeta,n=t.dataset,r=n.options&&n.options.borderWidth||0,i=t.data||[];if(!i.length)return r;const a=i[0].size(this.resolveDataElementOptions(0)),s=i[i.length-1].size(this.resolveDataElementOptions(i.length-1));return Math.max(r,a,s)/2}draw(){const t=this._cachedMeta;t.dataset.updateControlPoints(this.chart.chartArea,t.iScale.axis),super.draw()}}j(Vo,"id","line"),j(Vo,"defaults",{datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1}),j(Vo,"overrides",{scales:{_index_:{type:"category"},_value_:{type:"linear"}}});class ds extends In{constructor(t,n){super(t,n),this.innerRadius=void 0,this.outerRadius=void 0}getLabelAndValue(t){const n=this._cachedMeta,r=this.chart,i=r.data.labels||[],a=Ul(n._parsed[t].r,r.options.locale);return{label:i[t]||"",value:a}}parseObjectData(t,n,r,i){return IT.bind(this)(t,n,r,i)}update(t){const n=this._cachedMeta.data;this._updateRadius(),this.updateElements(n,0,n.length,t)}getMinMax(){const t=this._cachedMeta,n={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY};return t.data.forEach((r,i)=>{const a=this.getParsed(i).r;!isNaN(a)&&this.chart.getDataVisibility(i)&&(a<n.min&&(n.min=a),a>n.max&&(n.max=a))}),n}_updateRadius(){const t=this.chart,n=t.chartArea,r=t.options,i=Math.min(n.right-n.left,n.bottom-n.top),a=Math.max(i/2,0),s=Math.max(r.cutoutPercentage?a/100*r.cutoutPercentage:1,0),o=(a-s)/t.getVisibleDatasetCount();this.outerRadius=a-o*this.index,this.innerRadius=this.outerRadius-o}updateElements(t,n,r,i){const a=i==="reset",s=this.chart,l=s.options.animation,u=this._cachedMeta.rScale,c=u.xCenter,d=u.yCenter,f=u.getIndexAngle(0)-.5*Me;let h=f,p;const g=360/this.countVisibleElements();for(p=0;p<n;++p)h+=this._computeAngle(p,i,g);for(p=n;p<n+r;p++){const b=t[p];let v=h,m=h+this._computeAngle(p,i,g),$=s.getDataVisibility(p)?u.getDistanceFromCenterForValue(this.getParsed(p).r):0;h=m,a&&(l.animateScale&&($=0),l.animateRotate&&(v=m=f));const w={x:c,y:d,innerRadius:0,outerRadius:$,startAngle:v,endAngle:m,options:this.resolveDataElementOptions(p,b.active?"active":i)};this.updateElement(b,p,w,i)}}countVisibleElements(){const t=this._cachedMeta;let n=0;return t.data.forEach((r,i)=>{!isNaN(this.getParsed(i).r)&&this.chart.getDataVisibility(i)&&n++}),n}_computeAngle(t,n,r){return this.chart.getDataVisibility(t)?An(this.resolveDataElementOptions(t,n).angle||r):0}}j(ds,"id","polarArea"),j(ds,"defaults",{dataElementType:"arc",animation:{animateRotate:!0,animateScale:!0},animations:{numbers:{type:"number",properties:["x","y","startAngle","endAngle","innerRadius","outerRadius"]}},indexAxis:"r",startAngle:0}),j(ds,"overrides",{aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const n=t.data;if(n.labels.length&&n.datasets.length){const{labels:{pointStyle:r,color:i}}=t.legend.options;return n.labels.map((a,s)=>{const l=t.getDatasetMeta(0).controller.getStyle(s);return{text:a,fillStyle:l.backgroundColor,strokeStyle:l.borderColor,fontColor:i,lineWidth:l.borderWidth,pointStyle:r,hidden:!t.getDataVisibility(s),index:s}})}return[]}},onClick(t,n,r){r.chart.toggleDataVisibility(n.index),r.chart.update()}}},scales:{r:{type:"radialLinear",angleLines:{display:!1},beginAtZero:!0,grid:{circular:!0},pointLabels:{display:!1},startAngle:0}}});class Zy extends Hi{}j(Zy,"id","pie"),j(Zy,"defaults",{cutout:0,rotation:0,circumference:360,radius:"100%"});class cc extends In{getLabelAndValue(t){const n=this._cachedMeta.vScale,r=this.getParsed(t);return{label:n.getLabels()[t],value:""+n.getLabelForValue(r[n.axis])}}parseObjectData(t,n,r,i){return IT.bind(this)(t,n,r,i)}update(t){const n=this._cachedMeta,r=n.dataset,i=n.data||[],a=n.iScale.getLabels();if(r.points=i,t!=="resize"){const s=this.resolveDatasetElementOptions(t);this.options.showLine||(s.borderWidth=0);const o={_loop:!0,_fullLoop:a.length===i.length,options:s};this.updateElement(r,void 0,o,t)}this.updateElements(i,0,i.length,t)}updateElements(t,n,r,i){const a=this._cachedMeta.rScale,s=i==="reset";for(let o=n;o<n+r;o++){const l=t[o],u=this.resolveDataElementOptions(o,l.active?"active":i),c=a.getPointPositionForValue(o,this.getParsed(o).r),d=s?a.xCenter:c.x,f=s?a.yCenter:c.y,h={x:d,y:f,angle:c.angle,skip:isNaN(d)||isNaN(f),options:u};this.updateElement(l,o,h,i)}}}j(cc,"id","radar"),j(cc,"defaults",{datasetElementType:"line",dataElementType:"point",indexAxis:"r",showLine:!0,elements:{line:{fill:"start"}}}),j(cc,"overrides",{aspectRatio:1,scales:{r:{type:"radialLinear"}}});class dc extends In{getLabelAndValue(t){const n=this._cachedMeta,r=this.chart.data.labels||[],{xScale:i,yScale:a}=n,s=this.getParsed(t),o=i.getLabelForValue(s.x),l=a.getLabelForValue(s.y);return{label:r[t]||"",value:"("+o+", "+l+")"}}update(t){const n=this._cachedMeta,{data:r=[]}=n,i=this.chart._animationsDisabled;let{start:a,count:s}=kT(n,r,i);if(this._drawStart=a,this._drawCount=s,PT(n)&&(a=0,s=r.length),this.options.showLine){this.datasetElementType||this.addElements();const{dataset:o,_dataset:l}=n;o._chart=this.chart,o._datasetIndex=this.index,o._decimated=!!l._decimated,o.points=r;const u=this.resolveDatasetElementOptions(t);u.segment=this.options.segment,this.updateElement(o,void 0,{animated:!i,options:u},t)}else this.datasetElementType&&(delete n.dataset,this.datasetElementType=!1);this.updateElements(r,a,s,t)}addElements(){const{showLine:t}=this.options;!this.datasetElementType&&t&&(this.datasetElementType=this.chart.registry.getElement("line")),super.addElements()}updateElements(t,n,r,i){const a=i==="reset",{iScale:s,vScale:o,_stacked:l,_dataset:u}=this._cachedMeta,c=this.resolveDataElementOptions(n,i),d=this.getSharedOptions(c),f=this.includeOptions(i,d),h=s.axis,p=o.axis,{spanGaps:g,segment:b}=this.options,v=_s(g)?g:Number.POSITIVE_INFINITY,m=this.chart._animationsDisabled||a||i==="none";let $=n>0&&this.getParsed(n-1);for(let w=n;w<n+r;++w){const D=t[w],S=this.getParsed(w),k=m?D:{},x=ce(S[p]),T=k[h]=s.getPixelForValue(S[h],w),P=k[p]=a||x?o.getBasePixel():o.getPixelForValue(l?this.applyStack(o,S,l):S[p],w);k.skip=isNaN(T)||isNaN(P)||x,k.stop=w>0&&Math.abs(S[h]-$[h])>v,b&&(k.parsed=S,k.raw=u.data[w]),f&&(k.options=d||this.resolveDataElementOptions(w,D.active?"active":i)),m||this.updateElement(D,w,k,i),$=S}this.updateSharedOptions(d,i,c)}getMaxOverflow(){const t=this._cachedMeta,n=t.data||[];if(!this.options.showLine){let o=0;for(let l=n.length-1;l>=0;--l)o=Math.max(o,n[l].size(this.resolveDataElementOptions(l))/2);return o>0&&o}const r=t.dataset,i=r.options&&r.options.borderWidth||0;if(!n.length)return i;const a=n[0].size(this.resolveDataElementOptions(0)),s=n[n.length-1].size(this.resolveDataElementOptions(n.length-1));return Math.max(i,a,s)/2}}j(dc,"id","scatter"),j(dc,"defaults",{datasetElementType:!1,dataElementType:"point",showLine:!1,fill:!1}),j(dc,"overrides",{interaction:{mode:"point"},scales:{x:{type:"linear"},y:{type:"linear"}}});var aH=Object.freeze({__proto__:null,BarController:lc,BubbleController:uc,DoughnutController:Hi,LineController:Vo,PieController:Zy,PolarAreaController:ds,RadarController:cc,ScatterController:dc});function Si(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class K${constructor(t){j(this,"options");this.options=t||{}}static override(t){Object.assign(K$.prototype,t)}init(){}formats(){return Si()}parse(){return Si()}format(){return Si()}add(){return Si()}diff(){return Si()}startOf(){return Si()}endOf(){return Si()}}var sH={_date:K$};function oH(e,t,n,r){const{controller:i,data:a,_sorted:s}=e,o=i._cachedMeta.iScale;if(o&&t===o.axis&&t!=="r"&&s&&a.length){const l=o._reversePixels?TW:gr;if(r){if(i._sharedOptions){const u=a[0],c=typeof u.getRange=="function"&&u.getRange(t);if(c){const d=l(a,t,n-c),f=l(a,t,n+c);return{lo:d.lo,hi:f.hi}}}}else return l(a,t,n)}return{lo:0,hi:a.length-1}}function Hl(e,t,n,r,i){const a=e.getSortedVisibleDatasetMetas(),s=n[t];for(let o=0,l=a.length;o<l;++o){const{index:u,data:c}=a[o],{lo:d,hi:f}=oH(a[o],t,s,i);for(let h=d;h<=f;++h){const p=c[h];p.skip||r(p,u,h)}}}function lH(e){const t=e.indexOf("x")!==-1,n=e.indexOf("y")!==-1;return function(r,i){const a=t?Math.abs(r.x-i.x):0,s=n?Math.abs(r.y-i.y):0;return Math.sqrt(Math.pow(a,2)+Math.pow(s,2))}}function vp(e,t,n,r,i){const a=[];return!i&&!e.isPointInArea(t)||Hl(e,n,t,function(o,l,u){!i&&!vr(o,e.chartArea,0)||o.inRange(t.x,t.y,r)&&a.push({element:o,datasetIndex:l,index:u})},!0),a}function uH(e,t,n,r){let i=[];function a(s,o,l){const{startAngle:u,endAngle:c}=s.getProps(["startAngle","endAngle"],r),{angle:d}=DT(s,{x:t.x,y:t.y});xl(d,u,c)&&i.push({element:s,datasetIndex:o,index:l})}return Hl(e,n,t,a),i}function cH(e,t,n,r,i,a){let s=[];const o=lH(n);let l=Number.POSITIVE_INFINITY;function u(c,d,f){const h=c.inRange(t.x,t.y,i);if(r&&!h)return;const p=c.getCenterPoint(i);if(!(!!a||e.isPointInArea(p))&&!h)return;const b=o(t,p);b<l?(s=[{element:c,datasetIndex:d,index:f}],l=b):b===l&&s.push({element:c,datasetIndex:d,index:f})}return Hl(e,n,t,u),s}function bp(e,t,n,r,i,a){return!a&&!e.isPointInArea(t)?[]:n==="r"&&!r?uH(e,t,n,i):cH(e,t,n,r,i,a)}function b6(e,t,n,r,i){const a=[],s=n==="x"?"inXRange":"inYRange";let o=!1;return Hl(e,n,t,(l,u,c)=>{l[s](t[n],i)&&(a.push({element:l,datasetIndex:u,index:c}),o=o||l.inRange(t.x,t.y,i))}),r&&!o?[]:a}var dH={evaluateInteractionItems:Hl,modes:{index(e,t,n,r){const i=Fi(t,e),a=n.axis||"x",s=n.includeInvisible||!1,o=n.intersect?vp(e,i,a,r,s):bp(e,i,a,!1,r,s),l=[];return o.length?(e.getSortedVisibleDatasetMetas().forEach(u=>{const c=o[0].index,d=u.data[c];d&&!d.skip&&l.push({element:d,datasetIndex:u.index,index:c})}),l):[]},dataset(e,t,n,r){const i=Fi(t,e),a=n.axis||"xy",s=n.includeInvisible||!1;let o=n.intersect?vp(e,i,a,r,s):bp(e,i,a,!1,r,s);if(o.length>0){const l=o[0].datasetIndex,u=e.getDatasetMeta(l).data;o=[];for(let c=0;c<u.length;++c)o.push({element:u[c],datasetIndex:l,index:c})}return o},point(e,t,n,r){const i=Fi(t,e),a=n.axis||"xy",s=n.includeInvisible||!1;return vp(e,i,a,r,s)},nearest(e,t,n,r){const i=Fi(t,e),a=n.axis||"xy",s=n.includeInvisible||!1;return bp(e,i,a,n.intersect,r,s)},x(e,t,n,r){const i=Fi(t,e);return b6(e,i,"x",n.intersect,r)},y(e,t,n,r){const i=Fi(t,e);return b6(e,i,"y",n.intersect,r)}}};const YT=["left","top","right","bottom"];function to(e,t){return e.filter(n=>n.pos===t)}function y6(e,t){return e.filter(n=>YT.indexOf(n.pos)===-1&&n.box.axis===t)}function no(e,t){return e.sort((n,r)=>{const i=t?r:n,a=t?n:r;return i.weight===a.weight?i.index-a.index:i.weight-a.weight})}function fH(e){const t=[];let n,r,i,a,s,o;for(n=0,r=(e||[]).length;n<r;++n)i=e[n],{position:a,options:{stack:s,stackWeight:o=1}}=i,t.push({index:n,box:i,pos:a,horizontal:i.isHorizontal(),weight:i.weight,stack:s&&a+s,stackWeight:o});return t}function hH(e){const t={};for(const n of e){const{stack:r,pos:i,stackWeight:a}=n;if(!r||!YT.includes(i))continue;const s=t[r]||(t[r]={count:0,placed:0,weight:0,size:0});s.count++,s.weight+=a}return t}function pH(e,t){const n=hH(e),{vBoxMaxWidth:r,hBoxMaxHeight:i}=t;let a,s,o;for(a=0,s=e.length;a<s;++a){o=e[a];const{fullSize:l}=o.box,u=n[o.stack],c=u&&o.stackWeight/u.weight;o.horizontal?(o.width=c?c*r:l&&t.availableWidth,o.height=i):(o.width=r,o.height=c?c*i:l&&t.availableHeight)}return n}function mH(e){const t=fH(e),n=no(t.filter(u=>u.box.fullSize),!0),r=no(to(t,"left"),!0),i=no(to(t,"right")),a=no(to(t,"top"),!0),s=no(to(t,"bottom")),o=y6(t,"x"),l=y6(t,"y");return{fullSize:n,leftAndTop:r.concat(a),rightAndBottom:i.concat(l).concat(s).concat(o),chartArea:to(t,"chartArea"),vertical:r.concat(i).concat(l),horizontal:a.concat(s).concat(o)}}function $6(e,t,n,r){return Math.max(e[n],t[n])+Math.max(e[r],t[r])}function qT(e,t){e.top=Math.max(e.top,t.top),e.left=Math.max(e.left,t.left),e.bottom=Math.max(e.bottom,t.bottom),e.right=Math.max(e.right,t.right)}function gH(e,t,n,r){const{pos:i,box:a}=n,s=e.maxPadding;if(!ae(i)){n.size&&(e[i]-=n.size);const d=r[n.stack]||{size:0,count:1};d.size=Math.max(d.size,n.horizontal?a.height:a.width),n.size=d.size/d.count,e[i]+=n.size}a.getPadding&&qT(s,a.getPadding());const o=Math.max(0,t.outerWidth-$6(s,e,"left","right")),l=Math.max(0,t.outerHeight-$6(s,e,"top","bottom")),u=o!==e.w,c=l!==e.h;return e.w=o,e.h=l,n.horizontal?{same:u,other:c}:{same:c,other:u}}function vH(e){const t=e.maxPadding;function n(r){const i=Math.max(t[r]-e[r],0);return e[r]+=i,i}e.y+=n("top"),e.x+=n("left"),n("right"),n("bottom")}function bH(e,t){const n=t.maxPadding;function r(i){const a={left:0,top:0,right:0,bottom:0};return i.forEach(s=>{a[s]=Math.max(t[s],n[s])}),a}return r(e?["left","right"]:["top","bottom"])}function $o(e,t,n,r){const i=[];let a,s,o,l,u,c;for(a=0,s=e.length,u=0;a<s;++a){o=e[a],l=o.box,l.update(o.width||t.w,o.height||t.h,bH(o.horizontal,t));const{same:d,other:f}=gH(t,n,o,r);u|=d&&i.length,c=c||f,l.fullSize||i.push(o)}return u&&$o(i,t,n,r)||c}function Ou(e,t,n,r,i){e.top=n,e.left=t,e.right=t+r,e.bottom=n+i,e.width=r,e.height=i}function x6(e,t,n,r){const i=n.padding;let{x:a,y:s}=t;for(const o of e){const l=o.box,u=r[o.stack]||{count:1,placed:0,weight:1},c=o.stackWeight/u.weight||1;if(o.horizontal){const d=t.w*c,f=u.size||l.height;$l(u.start)&&(s=u.start),l.fullSize?Ou(l,i.left,s,n.outerWidth-i.right-i.left,f):Ou(l,t.left+u.placed,s,d,f),u.start=s,u.placed+=d,s=l.bottom}else{const d=t.h*c,f=u.size||l.width;$l(u.start)&&(a=u.start),l.fullSize?Ou(l,a,i.top,f,n.outerHeight-i.bottom-i.top):Ou(l,a,t.top+u.placed,f,d),u.start=a,u.placed+=d,a=l.right}}t.x=a,t.y=s}var Ct={addBox(e,t){e.boxes||(e.boxes=[]),t.fullSize=t.fullSize||!1,t.position=t.position||"top",t.weight=t.weight||0,t._layers=t._layers||function(){return[{z:0,draw(n){t.draw(n)}}]},e.boxes.push(t)},removeBox(e,t){const n=e.boxes?e.boxes.indexOf(t):-1;n!==-1&&e.boxes.splice(n,1)},configure(e,t,n){t.fullSize=n.fullSize,t.position=n.position,t.weight=n.weight},update(e,t,n,r){if(!e)return;const i=Pt(e.options.layout.padding),a=Math.max(t-i.width,0),s=Math.max(n-i.height,0),o=mH(e.boxes),l=o.vertical,u=o.horizontal;me(e.boxes,g=>{typeof g.beforeLayout=="function"&&g.beforeLayout()});const c=l.reduce((g,b)=>b.box.options&&b.box.options.display===!1?g:g+1,0)||1,d=Object.freeze({outerWidth:t,outerHeight:n,padding:i,availableWidth:a,availableHeight:s,vBoxMaxWidth:a/2/c,hBoxMaxHeight:s/2}),f=Object.assign({},i);qT(f,Pt(r));const h=Object.assign({maxPadding:f,w:a,h:s,x:i.left,y:i.top},i),p=pH(l.concat(u),d);$o(o.fullSize,h,d,p),$o(l,h,d,p),$o(u,h,d,p)&&$o(l,h,d,p),vH(h),x6(o.leftAndTop,h,d,p),h.x+=h.w,h.y+=h.h,x6(o.rightAndBottom,h,d,p),e.chartArea={left:h.left,top:h.top,right:h.left+h.w,bottom:h.top+h.h,height:h.h,width:h.w},me(o.chartArea,g=>{const b=g.box;Object.assign(b,e.chartArea),b.update(h.w,h.h,{left:0,top:0,right:0,bottom:0})})}};class GT{acquireContext(t,n){}releaseContext(t){return!1}addEventListener(t,n,r){}removeEventListener(t,n,r){}getDevicePixelRatio(){return 1}getMaximumSize(t,n,r,i){return n=Math.max(0,n||t.width),r=r||t.height,{width:n,height:Math.max(0,i?Math.floor(n/i):r)}}isAttached(t){return!0}updateConfig(t){}}class yH extends GT{acquireContext(t){return t&&t.getContext&&t.getContext("2d")||null}updateConfig(t){t.options.animation=!1}}const fc="$chartjs",$H={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},w6=e=>e===null||e==="";function xH(e,t){const n=e.style,r=e.getAttribute("height"),i=e.getAttribute("width");if(e[fc]={initial:{height:r,width:i,style:{display:n.display,height:n.height,width:n.width}}},n.display=n.display||"block",n.boxSizing=n.boxSizing||"border-box",w6(i)){const a=i6(e,"width");a!==void 0&&(e.width=a)}if(w6(r))if(e.style.height==="")e.height=e.width/(t||2);else{const a=i6(e,"height");a!==void 0&&(e.height=a)}return e}const ZT=DU?{passive:!0}:!1;function wH(e,t,n){e&&e.addEventListener(t,n,ZT)}function DH(e,t,n){e&&e.canvas&&e.canvas.removeEventListener(t,n,ZT)}function _H(e,t){const n=$H[e.type]||e.type,{x:r,y:i}=Fi(e,t);return{type:n,chart:t,native:e,x:r!==void 0?r:null,y:i!==void 0?i:null}}function qd(e,t){for(const n of e)if(n===t||n.contains(t))return!0}function EH(e,t,n){const r=e.canvas,i=new MutationObserver(a=>{let s=!1;for(const o of a)s=s||qd(o.addedNodes,r),s=s&&!qd(o.removedNodes,r);s&&n()});return i.observe(document,{childList:!0,subtree:!0}),i}function SH(e,t,n){const r=e.canvas,i=new MutationObserver(a=>{let s=!1;for(const o of a)s=s||qd(o.removedNodes,r),s=s&&!qd(o.addedNodes,r);s&&n()});return i.observe(document,{childList:!0,subtree:!0}),i}const Dl=new Map;let D6=0;function XT(){const e=window.devicePixelRatio;e!==D6&&(D6=e,Dl.forEach((t,n)=>{n.currentDevicePixelRatio!==e&&t()}))}function CH(e,t){Dl.size||window.addEventListener("resize",XT),Dl.set(e,t)}function kH(e){Dl.delete(e),Dl.size||window.removeEventListener("resize",XT)}function PH(e,t,n){const r=e.canvas,i=r&&H$(r);if(!i)return;const a=CT((o,l)=>{const u=i.clientWidth;n(o,l),u<i.clientWidth&&n()},window),s=new ResizeObserver(o=>{const l=o[0],u=l.contentRect.width,c=l.contentRect.height;u===0&&c===0||a(u,c)});return s.observe(i),CH(e,a),s}function yp(e,t,n){n&&n.disconnect(),t==="resize"&&kH(e)}function TH(e,t,n){const r=e.canvas,i=CT(a=>{e.ctx!==null&&n(_H(a,e))},e);return wH(r,t,i),i}class RH extends GT{acquireContext(t,n){const r=t&&t.getContext&&t.getContext("2d");return r&&r.canvas===t?(xH(t,n),r):null}releaseContext(t){const n=t.canvas;if(!n[fc])return!1;const r=n[fc].initial;["height","width"].forEach(a=>{const s=r[a];ce(s)?n.removeAttribute(a):n.setAttribute(a,s)});const i=r.style||{};return Object.keys(i).forEach(a=>{n.style[a]=i[a]}),n.width=n.width,delete n[fc],!0}addEventListener(t,n,r){this.removeEventListener(t,n);const i=t.$proxies||(t.$proxies={}),s={attach:EH,detach:SH,resize:PH}[n]||TH;i[n]=s(t,n,r)}removeEventListener(t,n){const r=t.$proxies||(t.$proxies={}),i=r[n];if(!i)return;({attach:yp,detach:yp,resize:yp}[n]||DH)(t,n,i),r[n]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(t,n,r,i){return wU(t,n,r,i)}isAttached(t){const n=t&&H$(t);return!!(n&&n.isConnected)}}function MH(e){return!U$()||typeof OffscreenCanvas<"u"&&e instanceof OffscreenCanvas?yH:RH}var Uu;let Cr=(Uu=class{constructor(){j(this,"x");j(this,"y");j(this,"active",!1);j(this,"options");j(this,"$animations")}tooltipPosition(t){const{x:n,y:r}=this.getProps(["x","y"],t);return{x:n,y:r}}hasValue(){return _s(this.x)&&_s(this.y)}getProps(t,n){const r=this.$animations;if(!n||!r)return this;const i={};return t.forEach(a=>{i[a]=r[a]&&r[a].active()?r[a]._to:this[a]}),i}},j(Uu,"defaults",{}),j(Uu,"defaultRoutes"),Uu);function FH(e,t){const n=e.options.ticks,r=AH(e),i=Math.min(n.maxTicksLimit||r,r),a=n.major.enabled?BH(t):[],s=a.length,o=a[0],l=a[s-1],u=[];if(s>i)return IH(t,u,a,s/i),u;const c=OH(a,t,i);if(s>0){let d,f;const h=s>1?Math.round((l-o)/(s-1)):null;for(Bu(t,u,c,ce(h)?0:o-h,o),d=0,f=s-1;d<f;d++)Bu(t,u,c,a[d],a[d+1]);return Bu(t,u,c,l,ce(h)?t.length:l+h),u}return Bu(t,u,c),u}function AH(e){const t=e.options.offset,n=e._tickSize(),r=e._length/n+(t?0:1),i=e._maxLength/n;return Math.floor(Math.min(r,i))}function OH(e,t,n){const r=LH(e),i=t.length/n;if(!r)return Math.max(i,1);const a=SW(r);for(let s=0,o=a.length-1;s<o;s++){const l=a[s];if(l>i)return l}return Math.max(i,1)}function BH(e){const t=[];let n,r;for(n=0,r=e.length;n<r;n++)e[n].major&&t.push(n);return t}function IH(e,t,n,r){let i=0,a=n[0],s;for(r=Math.ceil(r),s=0;s<e.length;s++)s===a&&(t.push(e[s]),i++,a=n[i*r])}function Bu(e,t,n,r,i){const a=J(r,0),s=Math.min(J(i,e.length),e.length);let o=0,l,u,c;for(n=Math.ceil(n),i&&(l=i-r,n=l/Math.floor(l/n)),c=a;c<0;)o++,c=Math.round(a+o*n);for(u=Math.max(a,0);u<s;u++)u===c&&(t.push(e[u]),o++,c=Math.round(a+o*n))}function LH(e){const t=e.length;let n,r;if(t<2)return!1;for(r=e[0],n=1;n<t;++n)if(e[n]-e[n-1]!==r)return!1;return r}const NH=e=>e==="left"?"right":e==="right"?"left":e,_6=(e,t,n)=>t==="top"||t==="left"?e[t]+n:e[t]-n,E6=(e,t)=>Math.min(t||e,e);function S6(e,t){const n=[],r=e.length/t,i=e.length;let a=0;for(;a<i;a+=r)n.push(e[Math.floor(a)]);return n}function jH(e,t,n){const r=e.ticks.length,i=Math.min(t,r-1),a=e._startPixel,s=e._endPixel,o=1e-6;let l=e.getPixelForTick(i),u;if(!(n&&(r===1?u=Math.max(l-a,s-l):t===0?u=(e.getPixelForTick(1)-l)/2:u=(l-e.getPixelForTick(i-1))/2,l+=i<t?u:-u,l<a-o||l>s+o)))return l}function zH(e,t){me(e,n=>{const r=n.gc,i=r.length/2;let a;if(i>t){for(a=0;a<i;++a)delete n.data[r[a]];r.splice(0,i)}})}function ro(e){return e.drawTicks?e.tickLength:0}function C6(e,t){if(!e.display)return 0;const n=it(e.font,t),r=Pt(e.padding);return(Be(e.text)?e.text.length:1)*n.lineHeight+r.height}function VH(e,t){return yi(e,{scale:t,type:"scale"})}function WH(e,t,n){return yi(e,{tick:n,index:t,type:"tick"})}function UH(e,t,n){let r=L$(e);return(n&&t!=="right"||!n&&t==="right")&&(r=NH(r)),r}function HH(e,t,n,r){const{top:i,left:a,bottom:s,right:o,chart:l}=e,{chartArea:u,scales:c}=l;let d=0,f,h,p;const g=s-i,b=o-a;if(e.isHorizontal()){if(h=Dt(r,a,o),ae(n)){const v=Object.keys(n)[0],m=n[v];p=c[v].getPixelForValue(m)+g-t}else n==="center"?p=(u.bottom+u.top)/2+g-t:p=_6(e,n,t);f=o-a}else{if(ae(n)){const v=Object.keys(n)[0],m=n[v];h=c[v].getPixelForValue(m)-b+t}else n==="center"?h=(u.left+u.right)/2-b+t:h=_6(e,n,t);p=Dt(r,s,i),d=n==="left"?-qe:qe}return{titleX:h,titleY:p,maxWidth:f,rotation:d}}class $a extends Cr{constructor(t){super(),this.id=t.id,this.type=t.type,this.options=void 0,this.ctx=t.ctx,this.chart=t.chart,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this._margins={left:0,right:0,top:0,bottom:0},this.maxWidth=void 0,this.maxHeight=void 0,this.paddingTop=void 0,this.paddingBottom=void 0,this.paddingLeft=void 0,this.paddingRight=void 0,this.axis=void 0,this.labelRotation=void 0,this.min=void 0,this.max=void 0,this._range=void 0,this.ticks=[],this._gridLineItems=null,this._labelItems=null,this._labelSizes=null,this._length=0,this._maxLength=0,this._longestTextCache={},this._startPixel=void 0,this._endPixel=void 0,this._reversePixels=!1,this._userMax=void 0,this._userMin=void 0,this._suggestedMax=void 0,this._suggestedMin=void 0,this._ticksLength=0,this._borderValue=0,this._cache={},this._dataLimitsCached=!1,this.$context=void 0}init(t){this.options=t.setContext(this.getContext()),this.axis=t.axis,this._userMin=this.parse(t.min),this._userMax=this.parse(t.max),this._suggestedMin=this.parse(t.suggestedMin),this._suggestedMax=this.parse(t.suggestedMax)}parse(t,n){return t}getUserBounds(){let{_userMin:t,_userMax:n,_suggestedMin:r,_suggestedMax:i}=this;return t=en(t,Number.POSITIVE_INFINITY),n=en(n,Number.NEGATIVE_INFINITY),r=en(r,Number.POSITIVE_INFINITY),i=en(i,Number.NEGATIVE_INFINITY),{min:en(t,r),max:en(n,i),minDefined:Ve(t),maxDefined:Ve(n)}}getMinMax(t){let{min:n,max:r,minDefined:i,maxDefined:a}=this.getUserBounds(),s;if(i&&a)return{min:n,max:r};const o=this.getMatchingVisibleMetas();for(let l=0,u=o.length;l<u;++l)s=o[l].controller.getMinMax(this,t),i||(n=Math.min(n,s.min)),a||(r=Math.max(r,s.max));return n=a&&n>r?r:n,r=i&&n>r?n:r,{min:en(n,en(r,n)),max:en(r,en(n,r))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){const t=this.chart.data;return this.options.labels||(this.isHorizontal()?t.xLabels:t.yLabels)||t.labels||[]}getLabelItems(t=this.chart.chartArea){return this._labelItems||(this._labelItems=this._computeLabelItems(t))}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){De(this.options.beforeUpdate,[this])}update(t,n,r){const{beginAtZero:i,grace:a,ticks:s}=this.options,o=s.sampleSize;this.beforeUpdate(),this.maxWidth=t,this.maxHeight=n,this._margins=r=Object.assign({left:0,right:0,top:0,bottom:0},r),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+r.left+r.right:this.height+r.top+r.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=eU(this,a,i),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const l=o<this.ticks.length;this._convertTicksToLabels(l?S6(this.ticks,o):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),s.display&&(s.autoSkip||s.source==="auto")&&(this.ticks=FH(this,this.ticks),this._labelSizes=null,this.afterAutoSkip()),l&&this._convertTicksToLabels(this.ticks),this.beforeFit(),this.fit(),this.afterFit(),this.afterUpdate()}configure(){let t=this.options.reverse,n,r;this.isHorizontal()?(n=this.left,r=this.right):(n=this.top,r=this.bottom,t=!t),this._startPixel=n,this._endPixel=r,this._reversePixels=t,this._length=r-n,this._alignToPixels=this.options.alignToPixels}afterUpdate(){De(this.options.afterUpdate,[this])}beforeSetDimensions(){De(this.options.beforeSetDimensions,[this])}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=0,this.right=this.width):(this.height=this.maxHeight,this.top=0,this.bottom=this.height),this.paddingLeft=0,this.paddingTop=0,this.paddingRight=0,this.paddingBottom=0}afterSetDimensions(){De(this.options.afterSetDimensions,[this])}_callHooks(t){this.chart.notifyPlugins(t,this.getContext()),De(this.options[t],[this])}beforeDataLimits(){this._callHooks("beforeDataLimits")}determineDataLimits(){}afterDataLimits(){this._callHooks("afterDataLimits")}beforeBuildTicks(){this._callHooks("beforeBuildTicks")}buildTicks(){return[]}afterBuildTicks(){this._callHooks("afterBuildTicks")}beforeTickToLabelConversion(){De(this.options.beforeTickToLabelConversion,[this])}generateTickLabels(t){const n=this.options.ticks;let r,i,a;for(r=0,i=t.length;r<i;r++)a=t[r],a.label=De(n.callback,[a.value,r,t],this)}afterTickToLabelConversion(){De(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){De(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){const t=this.options,n=t.ticks,r=E6(this.ticks.length,t.ticks.maxTicksLimit),i=n.minRotation||0,a=n.maxRotation;let s=i,o,l,u;if(!this._isVisible()||!n.display||i>=a||r<=1||!this.isHorizontal()){this.labelRotation=i;return}const c=this._getLabelSizes(),d=c.widest.width,f=c.highest.height,h=dt(this.chart.width-d,0,this.maxWidth);o=t.offset?this.maxWidth/r:h/(r-1),d+6>o&&(o=h/(r-(t.offset?.5:1)),l=this.maxHeight-ro(t.grid)-n.padding-C6(t.title,this.chart.options.font),u=Math.sqrt(d*d+f*f),s=B$(Math.min(Math.asin(dt((c.highest.height+6)/o,-1,1)),Math.asin(dt(l/u,-1,1))-Math.asin(dt(f/u,-1,1)))),s=Math.max(i,Math.min(a,s))),this.labelRotation=s}afterCalculateLabelRotation(){De(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){De(this.options.beforeFit,[this])}fit(){const t={width:0,height:0},{chart:n,options:{ticks:r,title:i,grid:a}}=this,s=this._isVisible(),o=this.isHorizontal();if(s){const l=C6(i,n.options.font);if(o?(t.width=this.maxWidth,t.height=ro(a)+l):(t.height=this.maxHeight,t.width=ro(a)+l),r.display&&this.ticks.length){const{first:u,last:c,widest:d,highest:f}=this._getLabelSizes(),h=r.padding*2,p=An(this.labelRotation),g=Math.cos(p),b=Math.sin(p);if(o){const v=r.mirror?0:b*d.width+g*f.height;t.height=Math.min(this.maxHeight,t.height+v+h)}else{const v=r.mirror?0:g*d.width+b*f.height;t.width=Math.min(this.maxWidth,t.width+v+h)}this._calculatePadding(u,c,b,g)}}this._handleMargins(),o?(this.width=this._length=n.width-this._margins.left-this._margins.right,this.height=t.height):(this.width=t.width,this.height=this._length=n.height-this._margins.top-this._margins.bottom)}_calculatePadding(t,n,r,i){const{ticks:{align:a,padding:s},position:o}=this.options,l=this.labelRotation!==0,u=o!=="top"&&this.axis==="x";if(this.isHorizontal()){const c=this.getPixelForTick(0)-this.left,d=this.right-this.getPixelForTick(this.ticks.length-1);let f=0,h=0;l?u?(f=i*t.width,h=r*n.height):(f=r*t.height,h=i*n.width):a==="start"?h=n.width:a==="end"?f=t.width:a!=="inner"&&(f=t.width/2,h=n.width/2),this.paddingLeft=Math.max((f-c+s)*this.width/(this.width-c),0),this.paddingRight=Math.max((h-d+s)*this.width/(this.width-d),0)}else{let c=n.height/2,d=t.height/2;a==="start"?(c=0,d=t.height):a==="end"&&(c=n.height,d=0),this.paddingTop=c+s,this.paddingBottom=d+s}}_handleMargins(){this._margins&&(this._margins.left=Math.max(this.paddingLeft,this._margins.left),this._margins.top=Math.max(this.paddingTop,this._margins.top),this._margins.right=Math.max(this.paddingRight,this._margins.right),this._margins.bottom=Math.max(this.paddingBottom,this._margins.bottom))}afterFit(){De(this.options.afterFit,[this])}isHorizontal(){const{axis:t,position:n}=this.options;return n==="top"||n==="bottom"||t==="x"}isFullSize(){return this.options.fullSize}_convertTicksToLabels(t){this.beforeTickToLabelConversion(),this.generateTickLabels(t);let n,r;for(n=0,r=t.length;n<r;n++)ce(t[n].label)&&(t.splice(n,1),r--,n--);this.afterTickToLabelConversion()}_getLabelSizes(){let t=this._labelSizes;if(!t){const n=this.options.ticks.sampleSize;let r=this.ticks;n<r.length&&(r=S6(r,n)),this._labelSizes=t=this._computeLabelSizes(r,r.length,this.options.ticks.maxTicksLimit)}return t}_computeLabelSizes(t,n,r){const{ctx:i,_longestTextCache:a}=this,s=[],o=[],l=Math.floor(n/E6(n,r));let u=0,c=0,d,f,h,p,g,b,v,m,$,w,D;for(d=0;d<n;d+=l){if(p=t[d].label,g=this._resolveTickFontOptions(d),i.font=b=g.string,v=a[b]=a[b]||{data:{},gc:[]},m=g.lineHeight,$=w=0,!ce(p)&&!Be(p))$=Kd(i,v.data,v.gc,$,p),w=m;else if(Be(p))for(f=0,h=p.length;f<h;++f)D=p[f],!ce(D)&&!Be(D)&&($=Kd(i,v.data,v.gc,$,D),w+=m);s.push($),o.push(w),u=Math.max($,u),c=Math.max(w,c)}zH(a,n);const S=s.indexOf(u),k=o.indexOf(c),x=T=>({width:s[T]||0,height:o[T]||0});return{first:x(0),last:x(n-1),widest:x(S),highest:x(k),widths:s,heights:o}}getLabelForValue(t){return t}getPixelForValue(t,n){return NaN}getValueForPixel(t){}getPixelForTick(t){const n=this.ticks;return t<0||t>n.length-1?null:this.getPixelForValue(n[t].value)}getPixelForDecimal(t){this._reversePixels&&(t=1-t);const n=this._startPixel+t*this._length;return PW(this._alignToPixels?Ei(this.chart,n,0):n)}getDecimalForPixel(t){const n=(t-this._startPixel)/this._length;return this._reversePixels?1-n:n}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:t,max:n}=this;return t<0&&n<0?n:t>0&&n>0?t:0}getContext(t){const n=this.ticks||[];if(t>=0&&t<n.length){const r=n[t];return r.$context||(r.$context=WH(this.getContext(),t,r))}return this.$context||(this.$context=VH(this.chart.getContext(),this))}_tickSize(){const t=this.options.ticks,n=An(this.labelRotation),r=Math.abs(Math.cos(n)),i=Math.abs(Math.sin(n)),a=this._getLabelSizes(),s=t.autoSkipPadding||0,o=a?a.widest.width+s:0,l=a?a.highest.height+s:0;return this.isHorizontal()?l*r>o*i?o/r:l/i:l*i<o*r?l/r:o/i}_isVisible(){const t=this.options.display;return t!=="auto"?!!t:this.getMatchingVisibleMetas().length>0}_computeGridLineItems(t){const n=this.axis,r=this.chart,i=this.options,{grid:a,position:s,border:o}=i,l=a.offset,u=this.isHorizontal(),d=this.ticks.length+(l?1:0),f=ro(a),h=[],p=o.setContext(this.getContext()),g=p.display?p.width:0,b=g/2,v=function(B){return Ei(r,B,g)};let m,$,w,D,S,k,x,T,P,E,A,R;if(s==="top")m=v(this.bottom),k=this.bottom-f,T=m-b,E=v(t.top)+b,R=t.bottom;else if(s==="bottom")m=v(this.top),E=t.top,R=v(t.bottom)-b,k=m+b,T=this.top+f;else if(s==="left")m=v(this.right),S=this.right-f,x=m-b,P=v(t.left)+b,A=t.right;else if(s==="right")m=v(this.left),P=t.left,A=v(t.right)-b,S=m+b,x=this.left+f;else if(n==="x"){if(s==="center")m=v((t.top+t.bottom)/2+.5);else if(ae(s)){const B=Object.keys(s)[0],C=s[B];m=v(this.chart.scales[B].getPixelForValue(C))}E=t.top,R=t.bottom,k=m+b,T=k+f}else if(n==="y"){if(s==="center")m=v((t.left+t.right)/2);else if(ae(s)){const B=Object.keys(s)[0],C=s[B];m=v(this.chart.scales[B].getPixelForValue(C))}S=m-b,x=S-f,P=t.left,A=t.right}const F=J(i.ticks.maxTicksLimit,d),z=Math.max(1,Math.ceil(d/F));for($=0;$<d;$+=z){const B=this.getContext($),C=a.setContext(B),O=o.setContext(B),I=C.lineWidth,N=C.color,X=O.dash||[],Q=O.dashOffset,je=C.tickWidth,$e=C.tickColor,lt=C.tickBorderDash||[],xe=C.tickBorderDashOffset;w=jH(this,$,l),w!==void 0&&(D=Ei(r,w,I),u?S=x=P=A=D:k=T=E=R=D,h.push({tx1:S,ty1:k,tx2:x,ty2:T,x1:P,y1:E,x2:A,y2:R,width:I,color:N,borderDash:X,borderDashOffset:Q,tickWidth:je,tickColor:$e,tickBorderDash:lt,tickBorderDashOffset:xe}))}return this._ticksLength=d,this._borderValue=m,h}_computeLabelItems(t){const n=this.axis,r=this.options,{position:i,ticks:a}=r,s=this.isHorizontal(),o=this.ticks,{align:l,crossAlign:u,padding:c,mirror:d}=a,f=ro(r.grid),h=f+c,p=d?-c:h,g=-An(this.labelRotation),b=[];let v,m,$,w,D,S,k,x,T,P,E,A,R="middle";if(i==="top")S=this.bottom-p,k=this._getXAxisLabelAlignment();else if(i==="bottom")S=this.top+p,k=this._getXAxisLabelAlignment();else if(i==="left"){const z=this._getYAxisLabelAlignment(f);k=z.textAlign,D=z.x}else if(i==="right"){const z=this._getYAxisLabelAlignment(f);k=z.textAlign,D=z.x}else if(n==="x"){if(i==="center")S=(t.top+t.bottom)/2+h;else if(ae(i)){const z=Object.keys(i)[0],B=i[z];S=this.chart.scales[z].getPixelForValue(B)+h}k=this._getXAxisLabelAlignment()}else if(n==="y"){if(i==="center")D=(t.left+t.right)/2-h;else if(ae(i)){const z=Object.keys(i)[0],B=i[z];D=this.chart.scales[z].getPixelForValue(B)}k=this._getYAxisLabelAlignment(f).textAlign}n==="y"&&(l==="start"?R="top":l==="end"&&(R="bottom"));const F=this._getLabelSizes();for(v=0,m=o.length;v<m;++v){$=o[v],w=$.label;const z=a.setContext(this.getContext(v));x=this.getPixelForTick(v)+a.labelOffset,T=this._resolveTickFontOptions(v),P=T.lineHeight,E=Be(w)?w.length:1;const B=E/2,C=z.color,O=z.textStrokeColor,I=z.textStrokeWidth;let N=k;s?(D=x,k==="inner"&&(v===m-1?N=this.options.reverse?"left":"right":v===0?N=this.options.reverse?"right":"left":N="center"),i==="top"?u==="near"||g!==0?A=-E*P+P/2:u==="center"?A=-F.highest.height/2-B*P+P:A=-F.highest.height+P/2:u==="near"||g!==0?A=P/2:u==="center"?A=F.highest.height/2-B*P:A=F.highest.height-E*P,d&&(A*=-1),g!==0&&!z.showLabelBackdrop&&(D+=P/2*Math.sin(g))):(S=x,A=(1-E)*P/2);let X;if(z.showLabelBackdrop){const Q=Pt(z.backdropPadding),je=F.heights[v],$e=F.widths[v];let lt=A-Q.top,xe=0-Q.left;switch(R){case"middle":lt-=je/2;break;case"bottom":lt-=je;break}switch(k){case"center":xe-=$e/2;break;case"right":xe-=$e;break;case"inner":v===m-1?xe-=$e:v>0&&(xe-=$e/2);break}X={left:xe,top:lt,width:$e+Q.width,height:je+Q.height,color:z.backdropColor}}b.push({label:w,font:T,textOffset:A,options:{rotation:g,color:C,strokeColor:O,strokeWidth:I,textAlign:N,textBaseline:R,translation:[D,S],backdrop:X}})}return b}_getXAxisLabelAlignment(){const{position:t,ticks:n}=this.options;if(-An(this.labelRotation))return t==="top"?"left":"right";let i="center";return n.align==="start"?i="left":n.align==="end"?i="right":n.align==="inner"&&(i="inner"),i}_getYAxisLabelAlignment(t){const{position:n,ticks:{crossAlign:r,mirror:i,padding:a}}=this.options,s=this._getLabelSizes(),o=t+a,l=s.widest.width;let u,c;return n==="left"?i?(c=this.right+a,r==="near"?u="left":r==="center"?(u="center",c+=l/2):(u="right",c+=l)):(c=this.right-o,r==="near"?u="right":r==="center"?(u="center",c-=l/2):(u="left",c=this.left)):n==="right"?i?(c=this.left+a,r==="near"?u="right":r==="center"?(u="center",c-=l/2):(u="left",c-=l)):(c=this.left+o,r==="near"?u="left":r==="center"?(u="center",c+=l/2):(u="right",c=this.right)):u="right",{textAlign:u,x:c}}_computeLabelArea(){if(this.options.ticks.mirror)return;const t=this.chart,n=this.options.position;if(n==="left"||n==="right")return{top:0,left:this.left,bottom:t.height,right:this.right};if(n==="top"||n==="bottom")return{top:this.top,left:0,bottom:this.bottom,right:t.width}}drawBackground(){const{ctx:t,options:{backgroundColor:n},left:r,top:i,width:a,height:s}=this;n&&(t.save(),t.fillStyle=n,t.fillRect(r,i,a,s),t.restore())}getLineWidthForValue(t){const n=this.options.grid;if(!this._isVisible()||!n.display)return 0;const i=this.ticks.findIndex(a=>a.value===t);return i>=0?n.setContext(this.getContext(i)).lineWidth:0}drawGrid(t){const n=this.options.grid,r=this.ctx,i=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(t));let a,s;const o=(l,u,c)=>{!c.width||!c.color||(r.save(),r.lineWidth=c.width,r.strokeStyle=c.color,r.setLineDash(c.borderDash||[]),r.lineDashOffset=c.borderDashOffset,r.beginPath(),r.moveTo(l.x,l.y),r.lineTo(u.x,u.y),r.stroke(),r.restore())};if(n.display)for(a=0,s=i.length;a<s;++a){const l=i[a];n.drawOnChartArea&&o({x:l.x1,y:l.y1},{x:l.x2,y:l.y2},l),n.drawTicks&&o({x:l.tx1,y:l.ty1},{x:l.tx2,y:l.ty2},{color:l.tickColor,width:l.tickWidth,borderDash:l.tickBorderDash,borderDashOffset:l.tickBorderDashOffset})}}drawBorder(){const{chart:t,ctx:n,options:{border:r,grid:i}}=this,a=r.setContext(this.getContext()),s=r.display?a.width:0;if(!s)return;const o=i.setContext(this.getContext(0)).lineWidth,l=this._borderValue;let u,c,d,f;this.isHorizontal()?(u=Ei(t,this.left,s)-s/2,c=Ei(t,this.right,o)+o/2,d=f=l):(d=Ei(t,this.top,s)-s/2,f=Ei(t,this.bottom,o)+o/2,u=c=l),n.save(),n.lineWidth=a.width,n.strokeStyle=a.color,n.beginPath(),n.moveTo(u,d),n.lineTo(c,f),n.stroke(),n.restore()}drawLabels(t){if(!this.options.ticks.display)return;const r=this.ctx,i=this._computeLabelArea();i&&Uf(r,i);const a=this.getLabelItems(t);for(const s of a){const o=s.options,l=s.font,u=s.label,c=s.textOffset;la(r,u,0,c,l,o)}i&&Hf(r)}drawTitle(){const{ctx:t,options:{position:n,title:r,reverse:i}}=this;if(!r.display)return;const a=it(r.font),s=Pt(r.padding),o=r.align;let l=a.lineHeight/2;n==="bottom"||n==="center"||ae(n)?(l+=s.bottom,Be(r.text)&&(l+=a.lineHeight*(r.text.length-1))):l+=s.top;const{titleX:u,titleY:c,maxWidth:d,rotation:f}=HH(this,l,n,o);la(t,r.text,0,0,a,{color:r.color,maxWidth:d,rotation:f,textAlign:UH(o,n,i),textBaseline:"middle",translation:[u,c]})}draw(t){this._isVisible()&&(this.drawBackground(),this.drawGrid(t),this.drawBorder(),this.drawTitle(),this.drawLabels(t))}_layers(){const t=this.options,n=t.ticks&&t.ticks.z||0,r=J(t.grid&&t.grid.z,-1),i=J(t.border&&t.border.z,0);return!this._isVisible()||this.draw!==$a.prototype.draw?[{z:n,draw:a=>{this.draw(a)}}]:[{z:r,draw:a=>{this.drawBackground(),this.drawGrid(a),this.drawTitle()}},{z:i,draw:()=>{this.drawBorder()}},{z:n,draw:a=>{this.drawLabels(a)}}]}getMatchingVisibleMetas(t){const n=this.chart.getSortedVisibleDatasetMetas(),r=this.axis+"AxisID",i=[];let a,s;for(a=0,s=n.length;a<s;++a){const o=n[a];o[r]===this.id&&(!t||o.type===t)&&i.push(o)}return i}_resolveTickFontOptions(t){const n=this.options.ticks.setContext(this.getContext(t));return it(n.font)}_maxDigits(){const t=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/t}}class Iu{constructor(t,n,r){this.type=t,this.scope=n,this.override=r,this.items=Object.create(null)}isForType(t){return Object.prototype.isPrototypeOf.call(this.type.prototype,t.prototype)}register(t){const n=Object.getPrototypeOf(t);let r;qH(n)&&(r=this.register(n));const i=this.items,a=t.id,s=this.scope+"."+a;if(!a)throw new Error("class does not have id: "+t);return a in i||(i[a]=t,KH(t,s,r),this.override&&We.override(t.id,t.overrides)),s}get(t){return this.items[t]}unregister(t){const n=this.items,r=t.id,i=this.scope;r in n&&delete n[r],i&&r in We[i]&&(delete We[i][r],this.override&&delete oa[r])}}function KH(e,t,n){const r=yl(Object.create(null),[n?We.get(n):{},We.get(t),e.defaults]);We.set(t,r),e.defaultRoutes&&YH(t,e.defaultRoutes),e.descriptors&&We.describe(t,e.descriptors)}function YH(e,t){Object.keys(t).forEach(n=>{const r=n.split("."),i=r.pop(),a=[e].concat(r).join("."),s=t[n].split("."),o=s.pop(),l=s.join(".");We.route(a,i,l,o)})}function qH(e){return"id"in e&&"defaults"in e}class GH{constructor(){this.controllers=new Iu(In,"datasets",!0),this.elements=new Iu(Cr,"elements"),this.plugins=new Iu(Object,"plugins"),this.scales=new Iu($a,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...t){this._each("register",t)}remove(...t){this._each("unregister",t)}addControllers(...t){this._each("register",t,this.controllers)}addElements(...t){this._each("register",t,this.elements)}addPlugins(...t){this._each("register",t,this.plugins)}addScales(...t){this._each("register",t,this.scales)}getController(t){return this._get(t,this.controllers,"controller")}getElement(t){return this._get(t,this.elements,"element")}getPlugin(t){return this._get(t,this.plugins,"plugin")}getScale(t){return this._get(t,this.scales,"scale")}removeControllers(...t){this._each("unregister",t,this.controllers)}removeElements(...t){this._each("unregister",t,this.elements)}removePlugins(...t){this._each("unregister",t,this.plugins)}removeScales(...t){this._each("unregister",t,this.scales)}_each(t,n,r){[...n].forEach(i=>{const a=r||this._getRegistryForType(i);r||a.isForType(i)||a===this.plugins&&i.id?this._exec(t,a,i):me(i,s=>{const o=r||this._getRegistryForType(s);this._exec(t,o,s)})})}_exec(t,n,r){const i=O$(t);De(r["before"+i],[],r),n[t](r),De(r["after"+i],[],r)}_getRegistryForType(t){for(let n=0;n<this._typedRegistries.length;n++){const r=this._typedRegistries[n];if(r.isForType(t))return r}return this.plugins}_get(t,n,r){const i=n.get(t);if(i===void 0)throw new Error('"'+t+'" is not a registered '+r+".");return i}}var Hn=new GH;class ZH{constructor(){this._init=[]}notify(t,n,r,i){n==="beforeInit"&&(this._init=this._createDescriptors(t,!0),this._notify(this._init,t,"install"));const a=i?this._descriptors(t).filter(i):this._descriptors(t),s=this._notify(a,t,n,r);return n==="afterDestroy"&&(this._notify(a,t,"stop"),this._notify(this._init,t,"uninstall")),s}_notify(t,n,r,i){i=i||{};for(const a of t){const s=a.plugin,o=s[r],l=[n,i,a.options];if(De(o,l,s)===!1&&i.cancelable)return!1}return!0}invalidate(){ce(this._cache)||(this._oldCache=this._cache,this._cache=void 0)}_descriptors(t){if(this._cache)return this._cache;const n=this._cache=this._createDescriptors(t);return this._notifyStateChanges(t),n}_createDescriptors(t,n){const r=t&&t.config,i=J(r.options&&r.options.plugins,{}),a=XH(r);return i===!1&&!n?[]:JH(t,a,i,n)}_notifyStateChanges(t){const n=this._oldCache||[],r=this._cache,i=(a,s)=>a.filter(o=>!s.some(l=>o.plugin.id===l.plugin.id));this._notify(i(n,r),t,"stop"),this._notify(i(r,n),t,"start")}}function XH(e){const t={},n=[],r=Object.keys(Hn.plugins.items);for(let a=0;a<r.length;a++)n.push(Hn.getPlugin(r[a]));const i=e.plugins||[];for(let a=0;a<i.length;a++){const s=i[a];n.indexOf(s)===-1&&(n.push(s),t[s.id]=!0)}return{plugins:n,localIds:t}}function QH(e,t){return!t&&e===!1?null:e===!0?{}:e}function JH(e,{plugins:t,localIds:n},r,i){const a=[],s=e.getContext();for(const o of t){const l=o.id,u=QH(r[l],i);u!==null&&a.push({plugin:o,options:eK(e.config,{plugin:o,local:n[l]},u,s)})}return a}function eK(e,{plugin:t,local:n},r,i){const a=e.pluginScopeKeys(t),s=e.getOptionScopes(r,a);return n&&t.defaults&&s.push(t.defaults),e.createResolver(s,i,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function Xy(e,t){const n=We.datasets[e]||{};return((t.datasets||{})[e]||{}).indexAxis||t.indexAxis||n.indexAxis||"x"}function tK(e,t){let n=e;return e==="_index_"?n=t:e==="_value_"&&(n=t==="x"?"y":"x"),n}function nK(e,t){return e===t?"_index_":"_value_"}function k6(e){if(e==="x"||e==="y"||e==="r")return e}function rK(e){if(e==="top"||e==="bottom")return"x";if(e==="left"||e==="right")return"y"}function Qy(e,...t){if(k6(e))return e;for(const n of t){const r=n.axis||rK(n.position)||e.length>1&&k6(e[0].toLowerCase());if(r)return r}throw new Error(`Cannot determine type of '${e}' axis. Please provide 'axis' or 'position' option.`)}function P6(e,t,n){if(n[t+"AxisID"]===e)return{axis:t}}function iK(e,t){if(t.data&&t.data.datasets){const n=t.data.datasets.filter(r=>r.xAxisID===e||r.yAxisID===e);if(n.length)return P6(e,"x",n[0])||P6(e,"y",n[0])}return{}}function aK(e,t){const n=oa[e.type]||{scales:{}},r=t.scales||{},i=Xy(e.type,t),a=Object.create(null);return Object.keys(r).forEach(s=>{const o=r[s];if(!ae(o))return console.error(`Invalid scale configuration for scale: ${s}`);if(o._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${s}`);const l=Qy(s,o,iK(s,e),We.scales[o.type]),u=nK(l,i),c=n.scales||{};a[s]=Lo(Object.create(null),[{axis:l},o,c[l],c[u]])}),e.data.datasets.forEach(s=>{const o=s.type||e.type,l=s.indexAxis||Xy(o,t),c=(oa[o]||{}).scales||{};Object.keys(c).forEach(d=>{const f=tK(d,l),h=s[f+"AxisID"]||f;a[h]=a[h]||Object.create(null),Lo(a[h],[{axis:f},r[h],c[d]])})}),Object.keys(a).forEach(s=>{const o=a[s];Lo(o,[We.scales[o.type],We.scale])}),a}function QT(e){const t=e.options||(e.options={});t.plugins=J(t.plugins,{}),t.scales=aK(e,t)}function JT(e){return e=e||{},e.datasets=e.datasets||[],e.labels=e.labels||[],e}function sK(e){return e=e||{},e.data=JT(e.data),QT(e),e}const T6=new Map,eR=new Set;function Lu(e,t){let n=T6.get(e);return n||(n=t(),T6.set(e,n),eR.add(n)),n}const io=(e,t,n)=>{const r=di(t,n);r!==void 0&&e.add(r)};class oK{constructor(t){this._config=sK(t),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(t){this._config.type=t}get data(){return this._config.data}set data(t){this._config.data=JT(t)}get options(){return this._config.options}set options(t){this._config.options=t}get plugins(){return this._config.plugins}update(){const t=this._config;this.clearCache(),QT(t)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(t){return Lu(t,()=>[[`datasets.${t}`,""]])}datasetAnimationScopeKeys(t,n){return Lu(`${t}.transition.${n}`,()=>[[`datasets.${t}.transitions.${n}`,`transitions.${n}`],[`datasets.${t}`,""]])}datasetElementScopeKeys(t,n){return Lu(`${t}-${n}`,()=>[[`datasets.${t}.elements.${n}`,`datasets.${t}`,`elements.${n}`,""]])}pluginScopeKeys(t){const n=t.id,r=this.type;return Lu(`${r}-plugin-${n}`,()=>[[`plugins.${n}`,...t.additionalOptionScopes||[]]])}_cachedScopes(t,n){const r=this._scopeCache;let i=r.get(t);return(!i||n)&&(i=new Map,r.set(t,i)),i}getOptionScopes(t,n,r){const{options:i,type:a}=this,s=this._cachedScopes(t,r),o=s.get(n);if(o)return o;const l=new Set;n.forEach(c=>{t&&(l.add(t),c.forEach(d=>io(l,t,d))),c.forEach(d=>io(l,i,d)),c.forEach(d=>io(l,oa[a]||{},d)),c.forEach(d=>io(l,We,d)),c.forEach(d=>io(l,qy,d))});const u=Array.from(l);return u.length===0&&u.push(Object.create(null)),eR.has(n)&&s.set(n,u),u}chartOptionScopes(){const{options:t,type:n}=this;return[t,oa[n]||{},We.datasets[n]||{},{type:n},We,qy]}resolveNamedOptions(t,n,r,i=[""]){const a={$shared:!0},{resolver:s,subPrefixes:o}=R6(this._resolverCache,t,i);let l=s;if(uK(s,n)){a.$shared=!1,r=fi(r)?r():r;const u=this.createResolver(t,r,o);l=Es(s,r,u)}for(const u of n)a[u]=l[u];return a}createResolver(t,n,r=[""],i){const{resolver:a}=R6(this._resolverCache,t,r);return ae(n)?Es(a,n,void 0,i):a}}function R6(e,t,n){let r=e.get(t);r||(r=new Map,e.set(t,r));const i=n.join();let a=r.get(i);return a||(a={resolver:z$(t,n),subPrefixes:n.filter(o=>!o.toLowerCase().includes("hover"))},r.set(i,a)),a}const lK=e=>ae(e)&&Object.getOwnPropertyNames(e).some(t=>fi(e[t]));function uK(e,t){const{isScriptable:n,isIndexable:r}=FT(e);for(const i of t){const a=n(i),s=r(i),o=(s||a)&&e[i];if(a&&(fi(o)||lK(o))||s&&Be(o))return!0}return!1}var cK="4.4.3";const dK=["top","bottom","left","right","chartArea"];function M6(e,t){return e==="top"||e==="bottom"||dK.indexOf(e)===-1&&t==="x"}function F6(e,t){return function(n,r){return n[e]===r[e]?n[t]-r[t]:n[e]-r[e]}}function A6(e){const t=e.chart,n=t.options.animation;t.notifyPlugins("afterRender"),De(n&&n.onComplete,[e],t)}function fK(e){const t=e.chart,n=t.options.animation;De(n&&n.onProgress,[e],t)}function tR(e){return U$()&&typeof e=="string"?e=document.getElementById(e):e&&e.length&&(e=e[0]),e&&e.canvas&&(e=e.canvas),e}const hc={},O6=e=>{const t=tR(e);return Object.values(hc).filter(n=>n.canvas===t).pop()};function hK(e,t,n){const r=Object.keys(e);for(const i of r){const a=+i;if(a>=t){const s=e[i];delete e[i],(n>0||a>t)&&(e[a+n]=s)}}}function pK(e,t,n,r){return!n||e.type==="mouseout"?null:r?t:e}function Nu(e,t,n){return e.options.clip?e[n]:t[n]}function mK(e,t){const{xScale:n,yScale:r}=e;return n&&r?{left:Nu(n,t,"left"),right:Nu(n,t,"right"),top:Nu(r,t,"top"),bottom:Nu(r,t,"bottom")}:t}var Rr;let Bs=(Rr=class{static register(...t){Hn.add(...t),B6()}static unregister(...t){Hn.remove(...t),B6()}constructor(t,n){const r=this.config=new oK(n),i=tR(t),a=O6(i);if(a)throw new Error("Canvas is already in use. Chart with ID '"+a.id+"' must be destroyed before the canvas with ID '"+a.canvas.id+"' can be reused.");const s=r.createResolver(r.chartOptionScopes(),this.getContext());this.platform=new(r.platform||MH(i)),this.platform.updateConfig(r);const o=this.platform.acquireContext(i,s.aspectRatio),l=o&&o.canvas,u=l&&l.height,c=l&&l.width;if(this.id=vW(),this.ctx=o,this.canvas=l,this.width=c,this.height=u,this._options=s,this._aspectRatio=this.aspectRatio,this._layers=[],this._metasets=[],this._stacks=void 0,this.boxes=[],this.currentDevicePixelRatio=void 0,this.chartArea=void 0,this._active=[],this._lastEvent=void 0,this._listeners={},this._responsiveListeners=void 0,this._sortedMetasets=[],this.scales={},this._plugins=new ZH,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=FW(d=>this.update(d),s.resizeDelay||0),this._dataChanges=[],hc[this.id]=this,!o||!l){console.error("Failed to create chart: can't acquire context from the given item");return}ar.listen(this,"complete",A6),ar.listen(this,"progress",fK),this._initialize(),this.attached&&this.update()}get aspectRatio(){const{options:{aspectRatio:t,maintainAspectRatio:n},width:r,height:i,_aspectRatio:a}=this;return ce(t)?n&&a?a:i?r/i:null:t}get data(){return this.config.data}set data(t){this.config.data=t}get options(){return this._options}set options(t){this.config.options=t}get registry(){return Hn}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():r6(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return e6(this.canvas,this.ctx),this}stop(){return ar.stop(this),this}resize(t,n){ar.running(this)?this._resizeBeforeDraw={width:t,height:n}:this._resize(t,n)}_resize(t,n){const r=this.options,i=this.canvas,a=r.maintainAspectRatio&&this.aspectRatio,s=this.platform.getMaximumSize(i,t,n,a),o=r.devicePixelRatio||this.platform.getDevicePixelRatio(),l=this.width?"resize":"attach";this.width=s.width,this.height=s.height,this._aspectRatio=this.aspectRatio,r6(this,o,!0)&&(this.notifyPlugins("resize",{size:s}),De(r.onResize,[this,s],this),this.attached&&this._doResize(l)&&this.render())}ensureScalesHaveIDs(){const n=this.options.scales||{};me(n,(r,i)=>{r.id=i})}buildOrUpdateScales(){const t=this.options,n=t.scales,r=this.scales,i=Object.keys(r).reduce((s,o)=>(s[o]=!1,s),{});let a=[];n&&(a=a.concat(Object.keys(n).map(s=>{const o=n[s],l=Qy(s,o),u=l==="r",c=l==="x";return{options:o,dposition:u?"chartArea":c?"bottom":"left",dtype:u?"radialLinear":c?"category":"linear"}}))),me(a,s=>{const o=s.options,l=o.id,u=Qy(l,o),c=J(o.type,s.dtype);(o.position===void 0||M6(o.position,u)!==M6(s.dposition))&&(o.position=s.dposition),i[l]=!0;let d=null;if(l in r&&r[l].type===c)d=r[l];else{const f=Hn.getScale(c);d=new f({id:l,type:c,ctx:this.ctx,chart:this}),r[d.id]=d}d.init(o,t)}),me(i,(s,o)=>{s||delete r[o]}),me(r,s=>{Ct.configure(this,s,s.options),Ct.addBox(this,s)})}_updateMetasets(){const t=this._metasets,n=this.data.datasets.length,r=t.length;if(t.sort((i,a)=>i.index-a.index),r>n){for(let i=n;i<r;++i)this._destroyDatasetMeta(i);t.splice(n,r-n)}this._sortedMetasets=t.slice(0).sort(F6("order","index"))}_removeUnreferencedMetasets(){const{_metasets:t,data:{datasets:n}}=this;t.length>n.length&&delete this._stacks,t.forEach((r,i)=>{n.filter(a=>a===r._dataset).length===0&&this._destroyDatasetMeta(i)})}buildOrUpdateControllers(){const t=[],n=this.data.datasets;let r,i;for(this._removeUnreferencedMetasets(),r=0,i=n.length;r<i;r++){const a=n[r];let s=this.getDatasetMeta(r);const o=a.type||this.config.type;if(s.type&&s.type!==o&&(this._destroyDatasetMeta(r),s=this.getDatasetMeta(r)),s.type=o,s.indexAxis=a.indexAxis||Xy(o,this.options),s.order=a.order||0,s.index=r,s.label=""+a.label,s.visible=this.isDatasetVisible(r),s.controller)s.controller.updateIndex(r),s.controller.linkScales();else{const l=Hn.getController(o),{datasetElementType:u,dataElementType:c}=We.datasets[o];Object.assign(l,{dataElementType:Hn.getElement(c),datasetElementType:u&&Hn.getElement(u)}),s.controller=new l(this,r),t.push(s.controller)}}return this._updateMetasets(),t}_resetElements(){me(this.data.datasets,(t,n)=>{this.getDatasetMeta(n).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(t){const n=this.config;n.update();const r=this._options=n.createResolver(n.chartOptionScopes(),this.getContext()),i=this._animationsDisabled=!r.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),this.notifyPlugins("beforeUpdate",{mode:t,cancelable:!0})===!1)return;const a=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let s=0;for(let u=0,c=this.data.datasets.length;u<c;u++){const{controller:d}=this.getDatasetMeta(u),f=!i&&a.indexOf(d)===-1;d.buildOrUpdateElements(f),s=Math.max(+d.getMaxOverflow(),s)}s=this._minPadding=r.layout.autoPadding?s:0,this._updateLayout(s),i||me(a,u=>{u.reset()}),this._updateDatasets(t),this.notifyPlugins("afterUpdate",{mode:t}),this._layers.sort(F6("z","_idx"));const{_active:o,_lastEvent:l}=this;l?this._eventHandler(l,!0):o.length&&this._updateHoverStyles(o,o,!0),this.render()}_updateScales(){me(this.scales,t=>{Ct.removeBox(this,t)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const t=this.options,n=new Set(Object.keys(this._listeners)),r=new Set(t.events);(!H5(n,r)||!!this._responsiveListeners!==t.responsive)&&(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:t}=this,n=this._getUniformDataChanges()||[];for(const{method:r,start:i,count:a}of n){const s=r==="_removeElements"?-a:a;hK(t,i,s)}}_getUniformDataChanges(){const t=this._dataChanges;if(!t||!t.length)return;this._dataChanges=[];const n=this.data.datasets.length,r=a=>new Set(t.filter(s=>s[0]===a).map((s,o)=>o+","+s.splice(1).join(","))),i=r(0);for(let a=1;a<n;a++)if(!H5(i,r(a)))return;return Array.from(i).map(a=>a.split(",")).map(a=>({method:a[1],start:+a[2],count:+a[3]}))}_updateLayout(t){if(this.notifyPlugins("beforeLayout",{cancelable:!0})===!1)return;Ct.update(this,this.width,this.height,t);const n=this.chartArea,r=n.width<=0||n.height<=0;this._layers=[],me(this.boxes,i=>{r&&i.position==="chartArea"||(i.configure&&i.configure(),this._layers.push(...i._layers()))},this),this._layers.forEach((i,a)=>{i._idx=a}),this.notifyPlugins("afterLayout")}_updateDatasets(t){if(this.notifyPlugins("beforeDatasetsUpdate",{mode:t,cancelable:!0})!==!1){for(let n=0,r=this.data.datasets.length;n<r;++n)this.getDatasetMeta(n).controller.configure();for(let n=0,r=this.data.datasets.length;n<r;++n)this._updateDataset(n,fi(t)?t({datasetIndex:n}):t);this.notifyPlugins("afterDatasetsUpdate",{mode:t})}}_updateDataset(t,n){const r=this.getDatasetMeta(t),i={meta:r,index:t,mode:n,cancelable:!0};this.notifyPlugins("beforeDatasetUpdate",i)!==!1&&(r.controller._update(n),i.cancelable=!1,this.notifyPlugins("afterDatasetUpdate",i))}render(){this.notifyPlugins("beforeRender",{cancelable:!0})!==!1&&(ar.has(this)?this.attached&&!ar.running(this)&&ar.start(this):(this.draw(),A6({chart:this})))}draw(){let t;if(this._resizeBeforeDraw){const{width:r,height:i}=this._resizeBeforeDraw;this._resize(r,i),this._resizeBeforeDraw=null}if(this.clear(),this.width<=0||this.height<=0||this.notifyPlugins("beforeDraw",{cancelable:!0})===!1)return;const n=this._layers;for(t=0;t<n.length&&n[t].z<=0;++t)n[t].draw(this.chartArea);for(this._drawDatasets();t<n.length;++t)n[t].draw(this.chartArea);this.notifyPlugins("afterDraw")}_getSortedDatasetMetas(t){const n=this._sortedMetasets,r=[];let i,a;for(i=0,a=n.length;i<a;++i){const s=n[i];(!t||s.visible)&&r.push(s)}return r}getSortedVisibleDatasetMetas(){return this._getSortedDatasetMetas(!0)}_drawDatasets(){if(this.notifyPlugins("beforeDatasetsDraw",{cancelable:!0})===!1)return;const t=this.getSortedVisibleDatasetMetas();for(let n=t.length-1;n>=0;--n)this._drawDataset(t[n]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(t){const n=this.ctx,r=t._clip,i=!r.disabled,a=mK(t,this.chartArea),s={meta:t,index:t.index,cancelable:!0};this.notifyPlugins("beforeDatasetDraw",s)!==!1&&(i&&Uf(n,{left:r.left===!1?0:a.left-r.left,right:r.right===!1?this.width:a.right+r.right,top:r.top===!1?0:a.top-r.top,bottom:r.bottom===!1?this.height:a.bottom+r.bottom}),t.controller.draw(),i&&Hf(n),s.cancelable=!1,this.notifyPlugins("afterDatasetDraw",s))}isPointInArea(t){return vr(t,this.chartArea,this._minPadding)}getElementsAtEventForMode(t,n,r,i){const a=dH.modes[n];return typeof a=="function"?a(this,t,r,i):[]}getDatasetMeta(t){const n=this.data.datasets[t],r=this._metasets;let i=r.filter(a=>a&&a._dataset===n).pop();return i||(i={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:n&&n.order||0,index:t,_dataset:n,_parsed:[],_sorted:!1},r.push(i)),i}getContext(){return this.$context||(this.$context=yi(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(t){const n=this.data.datasets[t];if(!n)return!1;const r=this.getDatasetMeta(t);return typeof r.hidden=="boolean"?!r.hidden:!n.hidden}setDatasetVisibility(t,n){const r=this.getDatasetMeta(t);r.hidden=!n}toggleDataVisibility(t){this._hiddenIndices[t]=!this._hiddenIndices[t]}getDataVisibility(t){return!this._hiddenIndices[t]}_updateVisibility(t,n,r){const i=r?"show":"hide",a=this.getDatasetMeta(t),s=a.controller._resolveAnimations(void 0,i);$l(n)?(a.data[n].hidden=!r,this.update()):(this.setDatasetVisibility(t,r),s.update(a,{visible:r}),this.update(o=>o.datasetIndex===t?i:void 0))}hide(t,n){this._updateVisibility(t,n,!1)}show(t,n){this._updateVisibility(t,n,!0)}_destroyDatasetMeta(t){const n=this._metasets[t];n&&n.controller&&n.controller._destroy(),delete this._metasets[t]}_stop(){let t,n;for(this.stop(),ar.remove(this),t=0,n=this.data.datasets.length;t<n;++t)this._destroyDatasetMeta(t)}destroy(){this.notifyPlugins("beforeDestroy");const{canvas:t,ctx:n}=this;this._stop(),this.config.clearCache(),t&&(this.unbindEvents(),e6(t,n),this.platform.releaseContext(n),this.canvas=null,this.ctx=null),delete hc[this.id],this.notifyPlugins("afterDestroy")}toBase64Image(...t){return this.canvas.toDataURL(...t)}bindEvents(){this.bindUserEvents(),this.options.responsive?this.bindResponsiveEvents():this.attached=!0}bindUserEvents(){const t=this._listeners,n=this.platform,r=(a,s)=>{n.addEventListener(this,a,s),t[a]=s},i=(a,s,o)=>{a.offsetX=s,a.offsetY=o,this._eventHandler(a)};me(this.options.events,a=>r(a,i))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const t=this._responsiveListeners,n=this.platform,r=(l,u)=>{n.addEventListener(this,l,u),t[l]=u},i=(l,u)=>{t[l]&&(n.removeEventListener(this,l,u),delete t[l])},a=(l,u)=>{this.canvas&&this.resize(l,u)};let s;const o=()=>{i("attach",o),this.attached=!0,this.resize(),r("resize",a),r("detach",s)};s=()=>{this.attached=!1,i("resize",a),this._stop(),this._resize(0,0),r("attach",o)},n.isAttached(this.canvas)?o():s()}unbindEvents(){me(this._listeners,(t,n)=>{this.platform.removeEventListener(this,n,t)}),this._listeners={},me(this._responsiveListeners,(t,n)=>{this.platform.removeEventListener(this,n,t)}),this._responsiveListeners=void 0}updateHoverStyle(t,n,r){const i=r?"set":"remove";let a,s,o,l;for(n==="dataset"&&(a=this.getDatasetMeta(t[0].datasetIndex),a.controller["_"+i+"DatasetHoverStyle"]()),o=0,l=t.length;o<l;++o){s=t[o];const u=s&&this.getDatasetMeta(s.datasetIndex).controller;u&&u[i+"HoverStyle"](s.element,s.datasetIndex,s.index)}}getActiveElements(){return this._active||[]}setActiveElements(t){const n=this._active||[],r=t.map(({datasetIndex:a,index:s})=>{const o=this.getDatasetMeta(a);if(!o)throw new Error("No dataset found at index "+a);return{datasetIndex:a,element:o.data[s],index:s}});!Wd(r,n)&&(this._active=r,this._lastEvent=null,this._updateHoverStyles(r,n))}notifyPlugins(t,n,r){return this._plugins.notify(this,t,n,r)}isPluginEnabled(t){return this._plugins._cache.filter(n=>n.plugin.id===t).length===1}_updateHoverStyles(t,n,r){const i=this.options.hover,a=(l,u)=>l.filter(c=>!u.some(d=>c.datasetIndex===d.datasetIndex&&c.index===d.index)),s=a(n,t),o=r?t:a(t,n);s.length&&this.updateHoverStyle(s,i.mode,!1),o.length&&i.mode&&this.updateHoverStyle(o,i.mode,!0)}_eventHandler(t,n){const r={event:t,replay:n,cancelable:!0,inChartArea:this.isPointInArea(t)},i=s=>(s.options.events||this.options.events).includes(t.native.type);if(this.notifyPlugins("beforeEvent",r,i)===!1)return;const a=this._handleEvent(t,n,r.inChartArea);return r.cancelable=!1,this.notifyPlugins("afterEvent",r,i),(a||r.changed)&&this.render(),this}_handleEvent(t,n,r){const{_active:i=[],options:a}=this,s=n,o=this._getActiveElements(t,i,r,s),l=DW(t),u=pK(t,this._lastEvent,r,l);r&&(this._lastEvent=null,De(a.onHover,[t,o,this],this),l&&De(a.onClick,[t,o,this],this));const c=!Wd(o,i);return(c||n)&&(this._active=o,this._updateHoverStyles(o,i,n)),this._lastEvent=u,c}_getActiveElements(t,n,r,i){if(t.type==="mouseout")return[];if(!r)return n;const a=this.options.hover;return this.getElementsAtEventForMode(t,a.mode,a,i)}},j(Rr,"defaults",We),j(Rr,"instances",hc),j(Rr,"overrides",oa),j(Rr,"registry",Hn),j(Rr,"version",cK),j(Rr,"getChart",O6),Rr);function B6(){return me(Bs.instances,e=>e._plugins.invalidate())}function gK(e,t,n){const{startAngle:r,pixelMargin:i,x:a,y:s,outerRadius:o,innerRadius:l}=t;let u=i/o;e.beginPath(),e.arc(a,s,o,r-u,n+u),l>i?(u=i/l,e.arc(a,s,l,n+u,r-u,!0)):e.arc(a,s,i,n+qe,r-qe),e.closePath(),e.clip()}function vK(e){return j$(e,["outerStart","outerEnd","innerStart","innerEnd"])}function bK(e,t,n,r){const i=vK(e.options.borderRadius),a=(n-t)/2,s=Math.min(a,r*t/2),o=l=>{const u=(n-Math.min(a,l))*r/2;return dt(l,0,Math.min(a,u))};return{outerStart:o(i.outerStart),outerEnd:o(i.outerEnd),innerStart:dt(i.innerStart,0,s),innerEnd:dt(i.innerEnd,0,s)}}function Ra(e,t,n,r){return{x:n+e*Math.cos(t),y:r+e*Math.sin(t)}}function Gd(e,t,n,r,i,a){const{x:s,y:o,startAngle:l,pixelMargin:u,innerRadius:c}=t,d=Math.max(t.outerRadius+r+n-u,0),f=c>0?c+r+n+u:0;let h=0;const p=i-l;if(r){const z=c>0?c-r:0,B=d>0?d-r:0,C=(z+B)/2,O=C!==0?p*C/(C+r):p;h=(p-O)/2}const g=Math.max(.001,p*d-n/Me)/d,b=(p-g)/2,v=l+b+h,m=i-b-h,{outerStart:$,outerEnd:w,innerStart:D,innerEnd:S}=bK(t,f,d,m-v),k=d-$,x=d-w,T=v+$/k,P=m-w/x,E=f+D,A=f+S,R=v+D/E,F=m-S/A;if(e.beginPath(),a){const z=(T+P)/2;if(e.arc(s,o,d,T,z),e.arc(s,o,d,z,P),w>0){const I=Ra(x,P,s,o);e.arc(I.x,I.y,w,P,m+qe)}const B=Ra(A,m,s,o);if(e.lineTo(B.x,B.y),S>0){const I=Ra(A,F,s,o);e.arc(I.x,I.y,S,m+qe,F+Math.PI)}const C=(m-S/f+(v+D/f))/2;if(e.arc(s,o,f,m-S/f,C,!0),e.arc(s,o,f,C,v+D/f,!0),D>0){const I=Ra(E,R,s,o);e.arc(I.x,I.y,D,R+Math.PI,v-qe)}const O=Ra(k,v,s,o);if(e.lineTo(O.x,O.y),$>0){const I=Ra(k,T,s,o);e.arc(I.x,I.y,$,v-qe,T)}}else{e.moveTo(s,o);const z=Math.cos(T)*d+s,B=Math.sin(T)*d+o;e.lineTo(z,B);const C=Math.cos(P)*d+s,O=Math.sin(P)*d+o;e.lineTo(C,O)}e.closePath()}function yK(e,t,n,r,i){const{fullCircles:a,startAngle:s,circumference:o}=t;let l=t.endAngle;if(a){Gd(e,t,n,r,l,i);for(let u=0;u<a;++u)e.fill();isNaN(o)||(l=s+(o%Te||Te))}return Gd(e,t,n,r,l,i),e.fill(),l}function $K(e,t,n,r,i){const{fullCircles:a,startAngle:s,circumference:o,options:l}=t,{borderWidth:u,borderJoinStyle:c,borderDash:d,borderDashOffset:f}=l,h=l.borderAlign==="inner";if(!u)return;e.setLineDash(d||[]),e.lineDashOffset=f,h?(e.lineWidth=u*2,e.lineJoin=c||"round"):(e.lineWidth=u,e.lineJoin=c||"bevel");let p=t.endAngle;if(a){Gd(e,t,n,r,p,i);for(let g=0;g<a;++g)e.stroke();isNaN(o)||(p=s+(o%Te||Te))}h&&gK(e,t,p),a||(Gd(e,t,n,r,p,i),e.stroke())}class xo extends Cr{constructor(n){super();j(this,"circumference");j(this,"endAngle");j(this,"fullCircles");j(this,"innerRadius");j(this,"outerRadius");j(this,"pixelMargin");j(this,"startAngle");this.options=void 0,this.circumference=void 0,this.startAngle=void 0,this.endAngle=void 0,this.innerRadius=void 0,this.outerRadius=void 0,this.pixelMargin=0,this.fullCircles=0,n&&Object.assign(this,n)}inRange(n,r,i){const a=this.getProps(["x","y"],i),{angle:s,distance:o}=DT(a,{x:n,y:r}),{startAngle:l,endAngle:u,innerRadius:c,outerRadius:d,circumference:f}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],i),h=(this.options.spacing+this.options.borderWidth)/2,g=J(f,u-l)>=Te||xl(s,l,u),b=mr(o,c+h,d+h);return g&&b}getCenterPoint(n){const{x:r,y:i,startAngle:a,endAngle:s,innerRadius:o,outerRadius:l}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius"],n),{offset:u,spacing:c}=this.options,d=(a+s)/2,f=(o+l+c+u)/2;return{x:r+Math.cos(d)*f,y:i+Math.sin(d)*f}}tooltipPosition(n){return this.getCenterPoint(n)}draw(n){const{options:r,circumference:i}=this,a=(r.offset||0)/4,s=(r.spacing||0)/2,o=r.circular;if(this.pixelMargin=r.borderAlign==="inner"?.33:0,this.fullCircles=i>Te?Math.floor(i/Te):0,i===0||this.innerRadius<0||this.outerRadius<0)return;n.save();const l=(this.startAngle+this.endAngle)/2;n.translate(Math.cos(l)*a,Math.sin(l)*a);const u=1-Math.sin(Math.min(Me,i||0)),c=a*u;n.fillStyle=r.backgroundColor,n.strokeStyle=r.borderColor,yK(n,this,c,s,o),$K(n,this,c,s,o),n.restore()}}j(xo,"id","arc"),j(xo,"defaults",{borderAlign:"center",borderColor:"#fff",borderDash:[],borderDashOffset:0,borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0,circular:!0}),j(xo,"defaultRoutes",{backgroundColor:"backgroundColor"}),j(xo,"descriptors",{_scriptable:!0,_indexable:n=>n!=="borderDash"});function nR(e,t,n=t){e.lineCap=J(n.borderCapStyle,t.borderCapStyle),e.setLineDash(J(n.borderDash,t.borderDash)),e.lineDashOffset=J(n.borderDashOffset,t.borderDashOffset),e.lineJoin=J(n.borderJoinStyle,t.borderJoinStyle),e.lineWidth=J(n.borderWidth,t.borderWidth),e.strokeStyle=J(n.borderColor,t.borderColor)}function xK(e,t,n){e.lineTo(n.x,n.y)}function wK(e){return e.stepped?HW:e.tension||e.cubicInterpolationMode==="monotone"?KW:xK}function rR(e,t,n={}){const r=e.length,{start:i=0,end:a=r-1}=n,{start:s,end:o}=t,l=Math.max(i,s),u=Math.min(a,o),c=i<s&&a<s||i>o&&a>o;return{count:r,start:l,loop:t.loop,ilen:u<l&&!c?r+u-l:u-l}}function DK(e,t,n,r){const{points:i,options:a}=t,{count:s,start:o,loop:l,ilen:u}=rR(i,n,r),c=wK(a);let{move:d=!0,reverse:f}=r||{},h,p,g;for(h=0;h<=u;++h)p=i[(o+(f?u-h:h))%s],!p.skip&&(d?(e.moveTo(p.x,p.y),d=!1):c(e,g,p,f,a.stepped),g=p);return l&&(p=i[(o+(f?u:0))%s],c(e,g,p,f,a.stepped)),!!l}function _K(e,t,n,r){const i=t.points,{count:a,start:s,ilen:o}=rR(i,n,r),{move:l=!0,reverse:u}=r||{};let c=0,d=0,f,h,p,g,b,v;const m=w=>(s+(u?o-w:w))%a,$=()=>{g!==b&&(e.lineTo(c,b),e.lineTo(c,g),e.lineTo(c,v))};for(l&&(h=i[m(0)],e.moveTo(h.x,h.y)),f=0;f<=o;++f){if(h=i[m(f)],h.skip)continue;const w=h.x,D=h.y,S=w|0;S===p?(D<g?g=D:D>b&&(b=D),c=(d*c+w)/++d):($(),e.lineTo(w,D),p=S,d=0,g=b=D),v=D}$()}function Jy(e){const t=e.options,n=t.borderDash&&t.borderDash.length;return!e._decimated&&!e._loop&&!t.tension&&t.cubicInterpolationMode!=="monotone"&&!t.stepped&&!n?_K:DK}function EK(e){return e.stepped?_U:e.tension||e.cubicInterpolationMode==="monotone"?EU:Ai}function SK(e,t,n,r){let i=t._path;i||(i=t._path=new Path2D,t.path(i,n,r)&&i.closePath()),nR(e,t.options),e.stroke(i)}function CK(e,t,n,r){const{segments:i,options:a}=t,s=Jy(t);for(const o of i)nR(e,a,o.style),e.beginPath(),s(e,t,o,{start:n,end:n+r-1})&&e.closePath(),e.stroke()}const kK=typeof Path2D=="function";function PK(e,t,n,r){kK&&!t.options.segment?SK(e,t,n,r):CK(e,t,n,r)}class Yn extends Cr{constructor(t){super(),this.animated=!0,this.options=void 0,this._chart=void 0,this._loop=void 0,this._fullLoop=void 0,this._path=void 0,this._points=void 0,this._segments=void 0,this._decimated=!1,this._pointsUpdated=!1,this._datasetIndex=void 0,t&&Object.assign(this,t)}updateControlPoints(t,n){const r=this.options;if((r.tension||r.cubicInterpolationMode==="monotone")&&!r.stepped&&!this._pointsUpdated){const i=r.spanGaps?this._loop:this._fullLoop;gU(this._points,r,t,i,n),this._pointsUpdated=!0}}set points(t){this._points=t,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=RU(this,this.options.segment))}first(){const t=this.segments,n=this.points;return t.length&&n[t[0].start]}last(){const t=this.segments,n=this.points,r=t.length;return r&&n[t[r-1].end]}interpolate(t,n){const r=this.options,i=t[n],a=this.points,s=WT(this,{property:n,start:i,end:i});if(!s.length)return;const o=[],l=EK(r);let u,c;for(u=0,c=s.length;u<c;++u){const{start:d,end:f}=s[u],h=a[d],p=a[f];if(h===p){o.push(h);continue}const g=Math.abs((i-h[n])/(p[n]-h[n])),b=l(h,p,g,r.stepped);b[n]=t[n],o.push(b)}return o.length===1?o[0]:o}pathSegment(t,n,r){return Jy(this)(t,this,n,r)}path(t,n,r){const i=this.segments,a=Jy(this);let s=this._loop;n=n||0,r=r||this.points.length-n;for(const o of i)s&=a(t,this,o,{start:n,end:n+r-1});return!!s}draw(t,n,r,i){const a=this.options||{};(this.points||[]).length&&a.borderWidth&&(t.save(),PK(t,this,r,i),t.restore()),this.animated&&(this._pointsUpdated=!1,this._path=void 0)}}j(Yn,"id","line"),j(Yn,"defaults",{borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:3,capBezierPoints:!0,cubicInterpolationMode:"default",fill:!1,spanGaps:!1,stepped:!1,tension:0}),j(Yn,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"}),j(Yn,"descriptors",{_scriptable:!0,_indexable:t=>t!=="borderDash"&&t!=="fill"});function I6(e,t,n,r){const i=e.options,{[n]:a}=e.getProps([n],r);return Math.abs(t-a)<i.radius+i.hitRadius}class fs extends Cr{constructor(n){super();j(this,"parsed");j(this,"skip");j(this,"stop");this.options=void 0,this.parsed=void 0,this.skip=void 0,this.stop=void 0,n&&Object.assign(this,n)}inRange(n,r,i){const a=this.options,{x:s,y:o}=this.getProps(["x","y"],i);return Math.pow(n-s,2)+Math.pow(r-o,2)<Math.pow(a.hitRadius+a.radius,2)}inXRange(n,r){return I6(this,n,"x",r)}inYRange(n,r){return I6(this,n,"y",r)}getCenterPoint(n){const{x:r,y:i}=this.getProps(["x","y"],n);return{x:r,y:i}}size(n){n=n||this.options||{};let r=n.radius||0;r=Math.max(r,r&&n.hoverRadius||0);const i=r&&n.borderWidth||0;return(r+i)*2}draw(n,r){const i=this.options;this.skip||i.radius<.1||!vr(this,r,this.size(i)/2)||(n.strokeStyle=i.borderColor,n.lineWidth=i.borderWidth,n.fillStyle=i.backgroundColor,Gy(n,i,this.x,this.y))}getRange(){const n=this.options||{};return n.radius+n.hitRadius}}j(fs,"id","point"),j(fs,"defaults",{borderWidth:1,hitRadius:1,hoverBorderWidth:1,hoverRadius:4,pointStyle:"circle",radius:3,rotation:0}),j(fs,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"});function iR(e,t){const{x:n,y:r,base:i,width:a,height:s}=e.getProps(["x","y","base","width","height"],t);let o,l,u,c,d;return e.horizontal?(d=s/2,o=Math.min(n,i),l=Math.max(n,i),u=r-d,c=r+d):(d=a/2,o=n-d,l=n+d,u=Math.min(r,i),c=Math.max(r,i)),{left:o,top:u,right:l,bottom:c}}function Gr(e,t,n,r){return e?0:dt(t,n,r)}function TK(e,t,n){const r=e.options.borderWidth,i=e.borderSkipped,a=MT(r);return{t:Gr(i.top,a.top,0,n),r:Gr(i.right,a.right,0,t),b:Gr(i.bottom,a.bottom,0,n),l:Gr(i.left,a.left,0,t)}}function RK(e,t,n){const{enableBorderRadius:r}=e.getProps(["enableBorderRadius"]),i=e.options.borderRadius,a=Gi(i),s=Math.min(t,n),o=e.borderSkipped,l=r||ae(i);return{topLeft:Gr(!l||o.top||o.left,a.topLeft,0,s),topRight:Gr(!l||o.top||o.right,a.topRight,0,s),bottomLeft:Gr(!l||o.bottom||o.left,a.bottomLeft,0,s),bottomRight:Gr(!l||o.bottom||o.right,a.bottomRight,0,s)}}function MK(e){const t=iR(e),n=t.right-t.left,r=t.bottom-t.top,i=TK(e,n/2,r/2),a=RK(e,n/2,r/2);return{outer:{x:t.left,y:t.top,w:n,h:r,radius:a},inner:{x:t.left+i.l,y:t.top+i.t,w:n-i.l-i.r,h:r-i.t-i.b,radius:{topLeft:Math.max(0,a.topLeft-Math.max(i.t,i.l)),topRight:Math.max(0,a.topRight-Math.max(i.t,i.r)),bottomLeft:Math.max(0,a.bottomLeft-Math.max(i.b,i.l)),bottomRight:Math.max(0,a.bottomRight-Math.max(i.b,i.r))}}}}function $p(e,t,n,r){const i=t===null,a=n===null,o=e&&!(i&&a)&&iR(e,r);return o&&(i||mr(t,o.left,o.right))&&(a||mr(n,o.top,o.bottom))}function FK(e){return e.topLeft||e.topRight||e.bottomLeft||e.bottomRight}function AK(e,t){e.rect(t.x,t.y,t.w,t.h)}function xp(e,t,n={}){const r=e.x!==n.x?-t:0,i=e.y!==n.y?-t:0,a=(e.x+e.w!==n.x+n.w?t:0)-r,s=(e.y+e.h!==n.y+n.h?t:0)-i;return{x:e.x+r,y:e.y+i,w:e.w+a,h:e.h+s,radius:e.radius}}class pc extends Cr{constructor(t){super(),this.options=void 0,this.horizontal=void 0,this.base=void 0,this.width=void 0,this.height=void 0,this.inflateAmount=void 0,t&&Object.assign(this,t)}draw(t){const{inflateAmount:n,options:{borderColor:r,backgroundColor:i}}=this,{inner:a,outer:s}=MK(this),o=FK(s.radius)?wl:AK;t.save(),(s.w!==a.w||s.h!==a.h)&&(t.beginPath(),o(t,xp(s,n,a)),t.clip(),o(t,xp(a,-n,s)),t.fillStyle=r,t.fill("evenodd")),t.beginPath(),o(t,xp(a,n)),t.fillStyle=i,t.fill(),t.restore()}inRange(t,n,r){return $p(this,t,n,r)}inXRange(t,n){return $p(this,t,null,n)}inYRange(t,n){return $p(this,null,t,n)}getCenterPoint(t){const{x:n,y:r,base:i,horizontal:a}=this.getProps(["x","y","base","horizontal"],t);return{x:a?(n+i)/2:n,y:a?r:(r+i)/2}}getRange(t){return t==="x"?this.width/2:this.height/2}}j(pc,"id","bar"),j(pc,"defaults",{borderSkipped:"start",borderWidth:0,borderRadius:0,inflateAmount:"auto",pointStyle:void 0}),j(pc,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"});var OK=Object.freeze({__proto__:null,ArcElement:xo,BarElement:pc,LineElement:Yn,PointElement:fs});const e3=["rgb(54, 162, 235)","rgb(255, 99, 132)","rgb(255, 159, 64)","rgb(255, 205, 86)","rgb(75, 192, 192)","rgb(153, 102, 255)","rgb(201, 203, 207)"],L6=e3.map(e=>e.replace("rgb(","rgba(").replace(")",", 0.5)"));function aR(e){return e3[e%e3.length]}function sR(e){return L6[e%L6.length]}function BK(e,t){return e.borderColor=aR(t),e.backgroundColor=sR(t),++t}function IK(e,t){return e.backgroundColor=e.data.map(()=>aR(t++)),t}function LK(e,t){return e.backgroundColor=e.data.map(()=>sR(t++)),t}function NK(e){let t=0;return(n,r)=>{const i=e.getDatasetMeta(r).controller;i instanceof Hi?t=IK(n,t):i instanceof ds?t=LK(n,t):i&&(t=BK(n,t))}}function N6(e){let t;for(t in e)if(e[t].borderColor||e[t].backgroundColor)return!0;return!1}function jK(e){return e&&(e.borderColor||e.backgroundColor)}var zK={id:"colors",defaults:{enabled:!0,forceOverride:!1},beforeLayout(e,t,n){if(!n.enabled)return;const{data:{datasets:r},options:i}=e.config,{elements:a}=i;if(!n.forceOverride&&(N6(r)||jK(i)||a&&N6(a)))return;const s=NK(e);r.forEach(s)}};function VK(e,t,n,r,i){const a=i.samples||r;if(a>=n)return e.slice(t,t+n);const s=[],o=(n-2)/(a-2);let l=0;const u=t+n-1;let c=t,d,f,h,p,g;for(s[l++]=e[c],d=0;d<a-2;d++){let b=0,v=0,m;const $=Math.floor((d+1)*o)+1+t,w=Math.min(Math.floor((d+2)*o)+1,n)+t,D=w-$;for(m=$;m<w;m++)b+=e[m].x,v+=e[m].y;b/=D,v/=D;const S=Math.floor(d*o)+1+t,k=Math.min(Math.floor((d+1)*o)+1,n)+t,{x,y:T}=e[c];for(h=p=-1,m=S;m<k;m++)p=.5*Math.abs((x-b)*(e[m].y-T)-(x-e[m].x)*(v-T)),p>h&&(h=p,f=e[m],g=m);s[l++]=f,c=g}return s[l++]=e[u],s}function WK(e,t,n,r){let i=0,a=0,s,o,l,u,c,d,f,h,p,g;const b=[],v=t+n-1,m=e[t].x,w=e[v].x-m;for(s=t;s<t+n;++s){o=e[s],l=(o.x-m)/w*r,u=o.y;const D=l|0;if(D===c)u<p?(p=u,d=s):u>g&&(g=u,f=s),i=(a*i+o.x)/++a;else{const S=s-1;if(!ce(d)&&!ce(f)){const k=Math.min(d,f),x=Math.max(d,f);k!==h&&k!==S&&b.push({...e[k],x:i}),x!==h&&x!==S&&b.push({...e[x],x:i})}s>0&&S!==h&&b.push(e[S]),b.push(o),c=D,a=0,p=g=u,d=f=h=s}}return b}function oR(e){if(e._decimated){const t=e._data;delete e._decimated,delete e._data,Object.defineProperty(e,"data",{configurable:!0,enumerable:!0,writable:!0,value:t})}}function j6(e){e.data.datasets.forEach(t=>{oR(t)})}function UK(e,t){const n=t.length;let r=0,i;const{iScale:a}=e,{min:s,max:o,minDefined:l,maxDefined:u}=a.getUserBounds();return l&&(r=dt(gr(t,a.axis,s).lo,0,n-1)),u?i=dt(gr(t,a.axis,o).hi+1,r,n)-r:i=n-r,{start:r,count:i}}var HK={id:"decimation",defaults:{algorithm:"min-max",enabled:!1},beforeElementsUpdate:(e,t,n)=>{if(!n.enabled){j6(e);return}const r=e.width;e.data.datasets.forEach((i,a)=>{const{_data:s,indexAxis:o}=i,l=e.getDatasetMeta(a),u=s||i.data;if(yo([o,e.options.indexAxis])==="y"||!l.controller.supportsDecimation)return;const c=e.scales[l.xAxisID];if(c.type!=="linear"&&c.type!=="time"||e.options.parsing)return;let{start:d,count:f}=UK(l,u);const h=n.threshold||4*r;if(f<=h){oR(i);return}ce(s)&&(i._data=u,delete i.data,Object.defineProperty(i,"data",{configurable:!0,enumerable:!0,get:function(){return this._decimated},set:function(g){this._data=g}}));let p;switch(n.algorithm){case"lttb":p=VK(u,d,f,r,n);break;case"min-max":p=WK(u,d,f,r);break;default:throw new Error(`Unsupported decimation algorithm '${n.algorithm}'`)}i._decimated=p})},destroy(e){j6(e)}};function KK(e,t,n){const r=e.segments,i=e.points,a=t.points,s=[];for(const o of r){let{start:l,end:u}=o;u=Y$(l,u,i);const c=t3(n,i[l],i[u],o.loop);if(!t.segments){s.push({source:o,target:c,start:i[l],end:i[u]});continue}const d=WT(t,c);for(const f of d){const h=t3(n,a[f.start],a[f.end],f.loop),p=VT(o,i,h);for(const g of p)s.push({source:g,target:f,start:{[n]:z6(c,h,"start",Math.max)},end:{[n]:z6(c,h,"end",Math.min)}})}}return s}function t3(e,t,n,r){if(r)return;let i=t[e],a=n[e];return e==="angle"&&(i=nn(i),a=nn(a)),{property:e,start:i,end:a}}function YK(e,t){const{x:n=null,y:r=null}=e||{},i=t.points,a=[];return t.segments.forEach(({start:s,end:o})=>{o=Y$(s,o,i);const l=i[s],u=i[o];r!==null?(a.push({x:l.x,y:r}),a.push({x:u.x,y:r})):n!==null&&(a.push({x:n,y:l.y}),a.push({x:n,y:u.y}))}),a}function Y$(e,t,n){for(;t>e;t--){const r=n[t];if(!isNaN(r.x)&&!isNaN(r.y))break}return t}function z6(e,t,n,r){return e&&t?r(e[n],t[n]):e?e[n]:t?t[n]:0}function lR(e,t){let n=[],r=!1;return Be(e)?(r=!0,n=e):n=YK(e,t),n.length?new Yn({points:n,options:{tension:0},_loop:r,_fullLoop:r}):null}function V6(e){return e&&e.fill!==!1}function qK(e,t,n){let i=e[t].fill;const a=[t];let s;if(!n)return i;for(;i!==!1&&a.indexOf(i)===-1;){if(!Ve(i))return i;if(s=e[i],!s)return!1;if(s.visible)return i;a.push(i),i=s.fill}return!1}function GK(e,t,n){const r=JK(e);if(ae(r))return isNaN(r.value)?!1:r;let i=parseFloat(r);return Ve(i)&&Math.floor(i)===i?ZK(r[0],t,i,n):["origin","start","end","stack","shape"].indexOf(r)>=0&&r}function ZK(e,t,n,r){return(e==="-"||e==="+")&&(n=t+n),n===t||n<0||n>=r?!1:n}function XK(e,t){let n=null;return e==="start"?n=t.bottom:e==="end"?n=t.top:ae(e)?n=t.getPixelForValue(e.value):t.getBasePixel&&(n=t.getBasePixel()),n}function QK(e,t,n){let r;return e==="start"?r=n:e==="end"?r=t.options.reverse?t.min:t.max:ae(e)?r=e.value:r=t.getBaseValue(),r}function JK(e){const t=e.options,n=t.fill;let r=J(n&&n.target,n);return r===void 0&&(r=!!t.backgroundColor),r===!1||r===null?!1:r===!0?"origin":r}function eY(e){const{scale:t,index:n,line:r}=e,i=[],a=r.segments,s=r.points,o=tY(t,n);o.push(lR({x:null,y:t.bottom},r));for(let l=0;l<a.length;l++){const u=a[l];for(let c=u.start;c<=u.end;c++)nY(i,s[c],o)}return new Yn({points:i,options:{}})}function tY(e,t){const n=[],r=e.getMatchingVisibleMetas("line");for(let i=0;i<r.length;i++){const a=r[i];if(a.index===t)break;a.hidden||n.unshift(a.dataset)}return n}function nY(e,t,n){const r=[];for(let i=0;i<n.length;i++){const a=n[i],{first:s,last:o,point:l}=rY(a,t,"x");if(!(!l||s&&o)){if(s)r.unshift(l);else if(e.push(l),!o)break}}e.push(...r)}function rY(e,t,n){const r=e.interpolate(t,n);if(!r)return{};const i=r[n],a=e.segments,s=e.points;let o=!1,l=!1;for(let u=0;u<a.length;u++){const c=a[u],d=s[c.start][n],f=s[c.end][n];if(mr(i,d,f)){o=i===d,l=i===f;break}}return{first:o,last:l,point:r}}class uR{constructor(t){this.x=t.x,this.y=t.y,this.radius=t.radius}pathSegment(t,n,r){const{x:i,y:a,radius:s}=this;return n=n||{start:0,end:Te},t.arc(i,a,s,n.end,n.start,!0),!r.bounds}interpolate(t){const{x:n,y:r,radius:i}=this,a=t.angle;return{x:n+Math.cos(a)*i,y:r+Math.sin(a)*i,angle:a}}}function iY(e){const{chart:t,fill:n,line:r}=e;if(Ve(n))return aY(t,n);if(n==="stack")return eY(e);if(n==="shape")return!0;const i=sY(e);return i instanceof uR?i:lR(i,r)}function aY(e,t){const n=e.getDatasetMeta(t);return n&&e.isDatasetVisible(t)?n.dataset:null}function sY(e){return(e.scale||{}).getPointPositionForValue?lY(e):oY(e)}function oY(e){const{scale:t={},fill:n}=e,r=XK(n,t);if(Ve(r)){const i=t.isHorizontal();return{x:i?r:null,y:i?null:r}}return null}function lY(e){const{scale:t,fill:n}=e,r=t.options,i=t.getLabels().length,a=r.reverse?t.max:t.min,s=QK(n,t,a),o=[];if(r.grid.circular){const l=t.getPointPositionForValue(0,a);return new uR({x:l.x,y:l.y,radius:t.getDistanceFromCenterForValue(s)})}for(let l=0;l<i;++l)o.push(t.getPointPositionForValue(l,s));return o}function wp(e,t,n){const r=iY(t),{line:i,scale:a,axis:s}=t,o=i.options,l=o.fill,u=o.backgroundColor,{above:c=u,below:d=u}=l||{};r&&i.points.length&&(Uf(e,n),uY(e,{line:i,target:r,above:c,below:d,area:n,scale:a,axis:s}),Hf(e))}function uY(e,t){const{line:n,target:r,above:i,below:a,area:s,scale:o}=t,l=n._loop?"angle":t.axis;e.save(),l==="x"&&a!==i&&(W6(e,r,s.top),U6(e,{line:n,target:r,color:i,scale:o,property:l}),e.restore(),e.save(),W6(e,r,s.bottom)),U6(e,{line:n,target:r,color:a,scale:o,property:l}),e.restore()}function W6(e,t,n){const{segments:r,points:i}=t;let a=!0,s=!1;e.beginPath();for(const o of r){const{start:l,end:u}=o,c=i[l],d=i[Y$(l,u,i)];a?(e.moveTo(c.x,c.y),a=!1):(e.lineTo(c.x,n),e.lineTo(c.x,c.y)),s=!!t.pathSegment(e,o,{move:s}),s?e.closePath():e.lineTo(d.x,n)}e.lineTo(t.first().x,n),e.closePath(),e.clip()}function U6(e,t){const{line:n,target:r,property:i,color:a,scale:s}=t,o=KK(n,r,i);for(const{source:l,target:u,start:c,end:d}of o){const{style:{backgroundColor:f=a}={}}=l,h=r!==!0;e.save(),e.fillStyle=f,cY(e,s,h&&t3(i,c,d)),e.beginPath();const p=!!n.pathSegment(e,l);let g;if(h){p?e.closePath():H6(e,r,d,i);const b=!!r.pathSegment(e,u,{move:p,reverse:!0});g=p&&b,g||H6(e,r,c,i)}e.closePath(),e.fill(g?"evenodd":"nonzero"),e.restore()}}function cY(e,t,n){const{top:r,bottom:i}=t.chart.chartArea,{property:a,start:s,end:o}=n||{};a==="x"&&(e.beginPath(),e.rect(s,r,o-s,i-r),e.clip())}function H6(e,t,n,r){const i=t.interpolate(n,r);i&&e.lineTo(i.x,i.y)}var dY={id:"filler",afterDatasetsUpdate(e,t,n){const r=(e.data.datasets||[]).length,i=[];let a,s,o,l;for(s=0;s<r;++s)a=e.getDatasetMeta(s),o=a.dataset,l=null,o&&o.options&&o instanceof Yn&&(l={visible:e.isDatasetVisible(s),index:s,fill:GK(o,s,r),chart:e,axis:a.controller.options.indexAxis,scale:a.vScale,line:o}),a.$filler=l,i.push(l);for(s=0;s<r;++s)l=i[s],!(!l||l.fill===!1)&&(l.fill=qK(i,s,n.propagate))},beforeDraw(e,t,n){const r=n.drawTime==="beforeDraw",i=e.getSortedVisibleDatasetMetas(),a=e.chartArea;for(let s=i.length-1;s>=0;--s){const o=i[s].$filler;o&&(o.line.updateControlPoints(a,o.axis),r&&o.fill&&wp(e.ctx,o,a))}},beforeDatasetsDraw(e,t,n){if(n.drawTime!=="beforeDatasetsDraw")return;const r=e.getSortedVisibleDatasetMetas();for(let i=r.length-1;i>=0;--i){const a=r[i].$filler;V6(a)&&wp(e.ctx,a,e.chartArea)}},beforeDatasetDraw(e,t,n){const r=t.meta.$filler;!V6(r)||n.drawTime!=="beforeDatasetDraw"||wp(e.ctx,r,e.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}};const K6=(e,t)=>{let{boxHeight:n=t,boxWidth:r=t}=e;return e.usePointStyle&&(n=Math.min(n,t),r=e.pointStyleWidth||Math.min(r,t)),{boxWidth:r,boxHeight:n,itemHeight:Math.max(t,n)}},fY=(e,t)=>e!==null&&t!==null&&e.datasetIndex===t.datasetIndex&&e.index===t.index;class Y6 extends Cr{constructor(t){super(),this._added=!1,this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1,this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this.legendItems=void 0,this.columnSizes=void 0,this.lineWidths=void 0,this.maxHeight=void 0,this.maxWidth=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.height=void 0,this.width=void 0,this._margins=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,n,r){this.maxWidth=t,this.maxHeight=n,this._margins=r,this.setDimensions(),this.buildLabels(),this.fit()}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=this._margins.left,this.right=this.width):(this.height=this.maxHeight,this.top=this._margins.top,this.bottom=this.height)}buildLabels(){const t=this.options.labels||{};let n=De(t.generateLabels,[this.chart],this)||[];t.filter&&(n=n.filter(r=>t.filter(r,this.chart.data))),t.sort&&(n=n.sort((r,i)=>t.sort(r,i,this.chart.data))),this.options.reverse&&n.reverse(),this.legendItems=n}fit(){const{options:t,ctx:n}=this;if(!t.display){this.width=this.height=0;return}const r=t.labels,i=it(r.font),a=i.size,s=this._computeTitleHeight(),{boxWidth:o,itemHeight:l}=K6(r,a);let u,c;n.font=i.string,this.isHorizontal()?(u=this.maxWidth,c=this._fitRows(s,a,o,l)+10):(c=this.maxHeight,u=this._fitCols(s,i,o,l)+10),this.width=Math.min(u,t.maxWidth||this.maxWidth),this.height=Math.min(c,t.maxHeight||this.maxHeight)}_fitRows(t,n,r,i){const{ctx:a,maxWidth:s,options:{labels:{padding:o}}}=this,l=this.legendHitBoxes=[],u=this.lineWidths=[0],c=i+o;let d=t;a.textAlign="left",a.textBaseline="middle";let f=-1,h=-c;return this.legendItems.forEach((p,g)=>{const b=r+n/2+a.measureText(p.text).width;(g===0||u[u.length-1]+b+2*o>s)&&(d+=c,u[u.length-(g>0?0:1)]=0,h+=c,f++),l[g]={left:0,top:h,row:f,width:b,height:i},u[u.length-1]+=b+o}),d}_fitCols(t,n,r,i){const{ctx:a,maxHeight:s,options:{labels:{padding:o}}}=this,l=this.legendHitBoxes=[],u=this.columnSizes=[],c=s-t;let d=o,f=0,h=0,p=0,g=0;return this.legendItems.forEach((b,v)=>{const{itemWidth:m,itemHeight:$}=hY(r,n,a,b,i);v>0&&h+$+2*o>c&&(d+=f+o,u.push({width:f,height:h}),p+=f+o,g++,f=h=0),l[v]={left:p,top:h,col:g,width:m,height:$},f=Math.max(f,m),h+=$+o}),d+=f,u.push({width:f,height:h}),d}adjustHitBoxes(){if(!this.options.display)return;const t=this._computeTitleHeight(),{legendHitBoxes:n,options:{align:r,labels:{padding:i},rtl:a}}=this,s=cs(a,this.left,this.width);if(this.isHorizontal()){let o=0,l=Dt(r,this.left+i,this.right-this.lineWidths[o]);for(const u of n)o!==u.row&&(o=u.row,l=Dt(r,this.left+i,this.right-this.lineWidths[o])),u.top+=this.top+t+i,u.left=s.leftForLtr(s.x(l),u.width),l+=u.width+i}else{let o=0,l=Dt(r,this.top+t+i,this.bottom-this.columnSizes[o].height);for(const u of n)u.col!==o&&(o=u.col,l=Dt(r,this.top+t+i,this.bottom-this.columnSizes[o].height)),u.top=l,u.left+=this.left+i,u.left=s.leftForLtr(s.x(u.left),u.width),l+=u.height+i}}isHorizontal(){return this.options.position==="top"||this.options.position==="bottom"}draw(){if(this.options.display){const t=this.ctx;Uf(t,this),this._draw(),Hf(t)}}_draw(){const{options:t,columnSizes:n,lineWidths:r,ctx:i}=this,{align:a,labels:s}=t,o=We.color,l=cs(t.rtl,this.left,this.width),u=it(s.font),{padding:c}=s,d=u.size,f=d/2;let h;this.drawTitle(),i.textAlign=l.textAlign("left"),i.textBaseline="middle",i.lineWidth=.5,i.font=u.string;const{boxWidth:p,boxHeight:g,itemHeight:b}=K6(s,d),v=function(S,k,x){if(isNaN(p)||p<=0||isNaN(g)||g<0)return;i.save();const T=J(x.lineWidth,1);if(i.fillStyle=J(x.fillStyle,o),i.lineCap=J(x.lineCap,"butt"),i.lineDashOffset=J(x.lineDashOffset,0),i.lineJoin=J(x.lineJoin,"miter"),i.lineWidth=T,i.strokeStyle=J(x.strokeStyle,o),i.setLineDash(J(x.lineDash,[])),s.usePointStyle){const P={radius:g*Math.SQRT2/2,pointStyle:x.pointStyle,rotation:x.rotation,borderWidth:T},E=l.xPlus(S,p/2),A=k+f;RT(i,P,E,A,s.pointStyleWidth&&p)}else{const P=k+Math.max((d-g)/2,0),E=l.leftForLtr(S,p),A=Gi(x.borderRadius);i.beginPath(),Object.values(A).some(R=>R!==0)?wl(i,{x:E,y:P,w:p,h:g,radius:A}):i.rect(E,P,p,g),i.fill(),T!==0&&i.stroke()}i.restore()},m=function(S,k,x){la(i,x.text,S,k+b/2,u,{strikethrough:x.hidden,textAlign:l.textAlign(x.textAlign)})},$=this.isHorizontal(),w=this._computeTitleHeight();$?h={x:Dt(a,this.left+c,this.right-r[0]),y:this.top+c+w,line:0}:h={x:this.left+c,y:Dt(a,this.top+w+c,this.bottom-n[0].height),line:0},NT(this.ctx,t.textDirection);const D=b+c;this.legendItems.forEach((S,k)=>{i.strokeStyle=S.fontColor,i.fillStyle=S.fontColor;const x=i.measureText(S.text).width,T=l.textAlign(S.textAlign||(S.textAlign=s.textAlign)),P=p+f+x;let E=h.x,A=h.y;l.setWidth(this.width),$?k>0&&E+P+c>this.right&&(A=h.y+=D,h.line++,E=h.x=Dt(a,this.left+c,this.right-r[h.line])):k>0&&A+D>this.bottom&&(E=h.x=E+n[h.line].width+c,h.line++,A=h.y=Dt(a,this.top+w+c,this.bottom-n[h.line].height));const R=l.x(E);if(v(R,A,S),E=AW(T,E+p+f,$?E+P:this.right,t.rtl),m(l.x(E),A,S),$)h.x+=P+c;else if(typeof S.text!="string"){const F=u.lineHeight;h.y+=cR(S,F)+c}else h.y+=D}),jT(this.ctx,t.textDirection)}drawTitle(){const t=this.options,n=t.title,r=it(n.font),i=Pt(n.padding);if(!n.display)return;const a=cs(t.rtl,this.left,this.width),s=this.ctx,o=n.position,l=r.size/2,u=i.top+l;let c,d=this.left,f=this.width;if(this.isHorizontal())f=Math.max(...this.lineWidths),c=this.top+u,d=Dt(t.align,d,this.right-f);else{const p=this.columnSizes.reduce((g,b)=>Math.max(g,b.height),0);c=u+Dt(t.align,this.top,this.bottom-p-t.labels.padding-this._computeTitleHeight())}const h=Dt(o,d,d+f);s.textAlign=a.textAlign(L$(o)),s.textBaseline="middle",s.strokeStyle=n.color,s.fillStyle=n.color,s.font=r.string,la(s,n.text,h,c,r)}_computeTitleHeight(){const t=this.options.title,n=it(t.font),r=Pt(t.padding);return t.display?n.lineHeight+r.height:0}_getLegendItemAt(t,n){let r,i,a;if(mr(t,this.left,this.right)&&mr(n,this.top,this.bottom)){for(a=this.legendHitBoxes,r=0;r<a.length;++r)if(i=a[r],mr(t,i.left,i.left+i.width)&&mr(n,i.top,i.top+i.height))return this.legendItems[r]}return null}handleEvent(t){const n=this.options;if(!gY(t.type,n))return;const r=this._getLegendItemAt(t.x,t.y);if(t.type==="mousemove"||t.type==="mouseout"){const i=this._hoveredItem,a=fY(i,r);i&&!a&&De(n.onLeave,[t,i,this],this),this._hoveredItem=r,r&&!a&&De(n.onHover,[t,r,this],this)}else r&&De(n.onClick,[t,r,this],this)}}function hY(e,t,n,r,i){const a=pY(r,e,t,n),s=mY(i,r,t.lineHeight);return{itemWidth:a,itemHeight:s}}function pY(e,t,n,r){let i=e.text;return i&&typeof i!="string"&&(i=i.reduce((a,s)=>a.length>s.length?a:s)),t+n.size/2+r.measureText(i).width}function mY(e,t,n){let r=e;return typeof t.text!="string"&&(r=cR(t,n)),r}function cR(e,t){const n=e.text?e.text.length:0;return t*n}function gY(e,t){return!!((e==="mousemove"||e==="mouseout")&&(t.onHover||t.onLeave)||t.onClick&&(e==="click"||e==="mouseup"))}var vY={id:"legend",_element:Y6,start(e,t,n){const r=e.legend=new Y6({ctx:e.ctx,options:n,chart:e});Ct.configure(e,r,n),Ct.addBox(e,r)},stop(e){Ct.removeBox(e,e.legend),delete e.legend},beforeUpdate(e,t,n){const r=e.legend;Ct.configure(e,r,n),r.options=n},afterUpdate(e){const t=e.legend;t.buildLabels(),t.adjustHitBoxes()},afterEvent(e,t){t.replay||e.legend.handleEvent(t.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(e,t,n){const r=t.datasetIndex,i=n.chart;i.isDatasetVisible(r)?(i.hide(r),t.hidden=!0):(i.show(r),t.hidden=!1)},onHover:null,onLeave:null,labels:{color:e=>e.chart.options.color,boxWidth:40,padding:10,generateLabels(e){const t=e.data.datasets,{labels:{usePointStyle:n,pointStyle:r,textAlign:i,color:a,useBorderRadius:s,borderRadius:o}}=e.legend.options;return e._getSortedDatasetMetas().map(l=>{const u=l.controller.getStyle(n?0:void 0),c=Pt(u.borderWidth);return{text:t[l.index].label,fillStyle:u.backgroundColor,fontColor:a,hidden:!l.visible,lineCap:u.borderCapStyle,lineDash:u.borderDash,lineDashOffset:u.borderDashOffset,lineJoin:u.borderJoinStyle,lineWidth:(c.width+c.height)/4,strokeStyle:u.borderColor,pointStyle:r||u.pointStyle,rotation:u.rotation,textAlign:i||u.textAlign,borderRadius:s&&(o||u.borderRadius),datasetIndex:l.index}},this)}},title:{color:e=>e.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:e=>!e.startsWith("on"),labels:{_scriptable:e=>!["generateLabels","filter","sort"].includes(e)}}};class q$ extends Cr{constructor(t){super(),this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this._padding=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,n){const r=this.options;if(this.left=0,this.top=0,!r.display){this.width=this.height=this.right=this.bottom=0;return}this.width=this.right=t,this.height=this.bottom=n;const i=Be(r.text)?r.text.length:1;this._padding=Pt(r.padding);const a=i*it(r.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=a:this.width=a}isHorizontal(){const t=this.options.position;return t==="top"||t==="bottom"}_drawArgs(t){const{top:n,left:r,bottom:i,right:a,options:s}=this,o=s.align;let l=0,u,c,d;return this.isHorizontal()?(c=Dt(o,r,a),d=n+t,u=a-r):(s.position==="left"?(c=r+t,d=Dt(o,i,n),l=Me*-.5):(c=a-t,d=Dt(o,n,i),l=Me*.5),u=i-n),{titleX:c,titleY:d,maxWidth:u,rotation:l}}draw(){const t=this.ctx,n=this.options;if(!n.display)return;const r=it(n.font),a=r.lineHeight/2+this._padding.top,{titleX:s,titleY:o,maxWidth:l,rotation:u}=this._drawArgs(a);la(t,n.text,0,0,r,{color:n.color,maxWidth:l,rotation:u,textAlign:L$(n.align),textBaseline:"middle",translation:[s,o]})}}function bY(e,t){const n=new q$({ctx:e.ctx,options:t,chart:e});Ct.configure(e,n,t),Ct.addBox(e,n),e.titleBlock=n}var yY={id:"title",_element:q$,start(e,t,n){bY(e,n)},stop(e){const t=e.titleBlock;Ct.removeBox(e,t),delete e.titleBlock},beforeUpdate(e,t,n){const r=e.titleBlock;Ct.configure(e,r,n),r.options=n},defaults:{align:"center",display:!1,font:{weight:"bold"},fullSize:!0,padding:10,position:"top",text:"",weight:2e3},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const ju=new WeakMap;var $Y={id:"subtitle",start(e,t,n){const r=new q$({ctx:e.ctx,options:n,chart:e});Ct.configure(e,r,n),Ct.addBox(e,r),ju.set(e,r)},stop(e){Ct.removeBox(e,ju.get(e)),ju.delete(e)},beforeUpdate(e,t,n){const r=ju.get(e);Ct.configure(e,r,n),r.options=n},defaults:{align:"center",display:!1,font:{weight:"normal"},fullSize:!0,padding:0,position:"top",text:"",weight:1500},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const wo={average(e){if(!e.length)return!1;let t,n,r=new Set,i=0,a=0;for(t=0,n=e.length;t<n;++t){const o=e[t].element;if(o&&o.hasValue()){const l=o.tooltipPosition();r.add(l.x),i+=l.y,++a}}return{x:[...r].reduce((o,l)=>o+l)/r.size,y:i/a}},nearest(e,t){if(!e.length)return!1;let n=t.x,r=t.y,i=Number.POSITIVE_INFINITY,a,s,o;for(a=0,s=e.length;a<s;++a){const l=e[a].element;if(l&&l.hasValue()){const u=l.getCenterPoint(),c=Yy(t,u);c<i&&(i=c,o=l)}}if(o){const l=o.tooltipPosition();n=l.x,r=l.y}return{x:n,y:r}}};function Wn(e,t){return t&&(Be(t)?Array.prototype.push.apply(e,t):e.push(t)),e}function sr(e){return(typeof e=="string"||e instanceof String)&&e.indexOf(` `)>-1?e.split(` -`):e}function xY(e,t){const{element:n,datasetIndex:r,index:i}=t,a=e.getDatasetMeta(r).controller,{label:s,value:o}=a.getLabelAndValue(i);return{chart:e,label:s,parsed:a.getParsed(i),raw:e.data.datasets[r].data[i],formattedValue:o,dataset:a.getDataset(),dataIndex:i,datasetIndex:r,element:n}}function q6(e,t){const n=e.chart.ctx,{body:r,footer:i,title:a}=e,{boxWidth:s,boxHeight:o}=t,l=it(t.bodyFont),u=it(t.titleFont),c=it(t.footerFont),d=a.length,f=i.length,h=r.length,p=Pt(t.padding);let g=p.height,b=0,v=r.reduce((w,D)=>w+D.before.length+D.lines.length+D.after.length,0);if(v+=e.beforeBody.length+e.afterBody.length,d&&(g+=d*u.lineHeight+(d-1)*t.titleSpacing+t.titleMarginBottom),v){const w=t.displayColors?Math.max(o,l.lineHeight):l.lineHeight;g+=h*w+(v-h)*l.lineHeight+(v-1)*t.bodySpacing}f&&(g+=t.footerMarginTop+f*c.lineHeight+(f-1)*t.footerSpacing);let m=0;const $=function(w){b=Math.max(b,n.measureText(w).width+m)};return n.save(),n.font=u.string,me(e.title,$),n.font=l.string,me(e.beforeBody.concat(e.afterBody),$),m=t.displayColors?s+2+t.boxPadding:0,me(r,w=>{me(w.before,$),me(w.lines,$),me(w.after,$)}),m=0,n.font=c.string,me(e.footer,$),n.restore(),b+=p.width,{width:b,height:g}}function wY(e,t){const{y:n,height:r}=t;return n<r/2?"top":n>e.height-r/2?"bottom":"center"}function DY(e,t,n,r){const{x:i,width:a}=r,s=n.caretSize+n.caretPadding;if(e==="left"&&i+a+s>t.width||e==="right"&&i-a-s<0)return!0}function _Y(e,t,n,r){const{x:i,width:a}=n,{width:s,chartArea:{left:o,right:l}}=e;let u="center";return r==="center"?u=i<=(o+l)/2?"left":"right":i<=a/2?u="left":i>=s-a/2&&(u="right"),DY(u,e,t,n)&&(u="center"),u}function G6(e,t,n){const r=n.yAlign||t.yAlign||wY(e,n);return{xAlign:n.xAlign||t.xAlign||_Y(e,t,n,r),yAlign:r}}function EY(e,t){let{x:n,width:r}=e;return t==="right"?n-=r:t==="center"&&(n-=r/2),n}function SY(e,t,n){let{y:r,height:i}=e;return t==="top"?r+=n:t==="bottom"?r-=i+n:r-=i/2,r}function Z6(e,t,n,r){const{caretSize:i,caretPadding:a,cornerRadius:s}=e,{xAlign:o,yAlign:l}=n,u=i+a,{topLeft:c,topRight:d,bottomLeft:f,bottomRight:h}=Gi(s);let p=EY(t,o);const g=SY(t,l,u);return l==="center"?o==="left"?p+=u:o==="right"&&(p-=u):o==="left"?p-=Math.max(c,f)+i:o==="right"&&(p+=Math.max(d,h)+i),{x:dt(p,0,r.width-t.width),y:dt(g,0,r.height-t.height)}}function zu(e,t,n){const r=Pt(n.padding);return t==="center"?e.x+e.width/2:t==="right"?e.x+e.width-r.right:e.x+r.left}function X6(e){return Wn([],sr(e))}function CY(e,t,n){return yi(e,{tooltip:t,tooltipItems:n,type:"tooltip"})}function Q6(e,t){const n=t&&t.dataset&&t.dataset.tooltip&&t.dataset.tooltip.callbacks;return n?e.override(n):e}const dR={beforeTitle:ir,title(e){if(e.length>0){const t=e[0],n=t.chart.data.labels,r=n?n.length:0;if(this&&this.options&&this.options.mode==="dataset")return t.dataset.label||"";if(t.label)return t.label;if(r>0&&t.dataIndex<r)return n[t.dataIndex]}return""},afterTitle:ir,beforeBody:ir,beforeLabel:ir,label(e){if(this&&this.options&&this.options.mode==="dataset")return e.label+": "+e.formattedValue||e.formattedValue;let t=e.dataset.label||"";t&&(t+=": ");const n=e.formattedValue;return ce(n)||(t+=n),t},labelColor(e){const n=e.chart.getDatasetMeta(e.datasetIndex).controller.getStyle(e.dataIndex);return{borderColor:n.borderColor,backgroundColor:n.backgroundColor,borderWidth:n.borderWidth,borderDash:n.borderDash,borderDashOffset:n.borderDashOffset,borderRadius:0}},labelTextColor(){return this.options.bodyColor},labelPointStyle(e){const n=e.chart.getDatasetMeta(e.datasetIndex).controller.getStyle(e.dataIndex);return{pointStyle:n.pointStyle,rotation:n.rotation}},afterLabel:ir,afterBody:ir,beforeFooter:ir,footer:ir,afterFooter:ir};function jt(e,t,n,r){const i=e[t].call(n,r);return typeof i>"u"?dR[t].call(n,r):i}class n3 extends Cr{constructor(t){super(),this.opacity=0,this._active=[],this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.chart=t.chart,this.options=t.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(t){this.options=t,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const t=this._cachedAnimations;if(t)return t;const n=this.chart,r=this.options.setContext(this.getContext()),i=r.enabled&&n.options.animation&&r.animations,a=new UT(this.chart,i);return i._cacheable&&(this._cachedAnimations=Object.freeze(a)),a}getContext(){return this.$context||(this.$context=CY(this.chart.getContext(),this,this._tooltipItems))}getTitle(t,n){const{callbacks:r}=n,i=jt(r,"beforeTitle",this,t),a=jt(r,"title",this,t),s=jt(r,"afterTitle",this,t);let o=[];return o=Wn(o,sr(i)),o=Wn(o,sr(a)),o=Wn(o,sr(s)),o}getBeforeBody(t,n){return X6(jt(n.callbacks,"beforeBody",this,t))}getBody(t,n){const{callbacks:r}=n,i=[];return me(t,a=>{const s={before:[],lines:[],after:[]},o=Q6(r,a);Wn(s.before,sr(jt(o,"beforeLabel",this,a))),Wn(s.lines,jt(o,"label",this,a)),Wn(s.after,sr(jt(o,"afterLabel",this,a))),i.push(s)}),i}getAfterBody(t,n){return X6(jt(n.callbacks,"afterBody",this,t))}getFooter(t,n){const{callbacks:r}=n,i=jt(r,"beforeFooter",this,t),a=jt(r,"footer",this,t),s=jt(r,"afterFooter",this,t);let o=[];return o=Wn(o,sr(i)),o=Wn(o,sr(a)),o=Wn(o,sr(s)),o}_createItems(t){const n=this._active,r=this.chart.data,i=[],a=[],s=[];let o=[],l,u;for(l=0,u=n.length;l<u;++l)o.push(xY(this.chart,n[l]));return t.filter&&(o=o.filter((c,d,f)=>t.filter(c,d,f,r))),t.itemSort&&(o=o.sort((c,d)=>t.itemSort(c,d,r))),me(o,c=>{const d=Q6(t.callbacks,c);i.push(jt(d,"labelColor",this,c)),a.push(jt(d,"labelPointStyle",this,c)),s.push(jt(d,"labelTextColor",this,c))}),this.labelColors=i,this.labelPointStyles=a,this.labelTextColors=s,this.dataPoints=o,o}update(t,n){const r=this.options.setContext(this.getContext()),i=this._active;let a,s=[];if(!i.length)this.opacity!==0&&(a={opacity:0});else{const o=wo[r.position].call(this,i,this._eventPosition);s=this._createItems(r),this.title=this.getTitle(s,r),this.beforeBody=this.getBeforeBody(s,r),this.body=this.getBody(s,r),this.afterBody=this.getAfterBody(s,r),this.footer=this.getFooter(s,r);const l=this._size=q6(this,r),u=Object.assign({},o,l),c=G6(this.chart,r,u),d=Z6(r,u,c,this.chart);this.xAlign=c.xAlign,this.yAlign=c.yAlign,a={opacity:1,x:d.x,y:d.y,width:l.width,height:l.height,caretX:o.x,caretY:o.y}}this._tooltipItems=s,this.$context=void 0,a&&this._resolveAnimations().update(this,a),t&&r.external&&r.external.call(this,{chart:this.chart,tooltip:this,replay:n})}drawCaret(t,n,r,i){const a=this.getCaretPosition(t,r,i);n.lineTo(a.x1,a.y1),n.lineTo(a.x2,a.y2),n.lineTo(a.x3,a.y3)}getCaretPosition(t,n,r){const{xAlign:i,yAlign:a}=this,{caretSize:s,cornerRadius:o}=r,{topLeft:l,topRight:u,bottomLeft:c,bottomRight:d}=Gi(o),{x:f,y:h}=t,{width:p,height:g}=n;let b,v,m,$,w,D;return a==="center"?(w=h+g/2,i==="left"?(b=f,v=b-s,$=w+s,D=w-s):(b=f+p,v=b+s,$=w-s,D=w+s),m=b):(i==="left"?v=f+Math.max(l,c)+s:i==="right"?v=f+p-Math.max(u,d)-s:v=this.caretX,a==="top"?($=h,w=$-s,b=v-s,m=v+s):($=h+g,w=$+s,b=v+s,m=v-s),D=$),{x1:b,x2:v,x3:m,y1:$,y2:w,y3:D}}drawTitle(t,n,r){const i=this.title,a=i.length;let s,o,l;if(a){const u=cs(r.rtl,this.x,this.width);for(t.x=zu(this,r.titleAlign,r),n.textAlign=u.textAlign(r.titleAlign),n.textBaseline="middle",s=it(r.titleFont),o=r.titleSpacing,n.fillStyle=r.titleColor,n.font=s.string,l=0;l<a;++l)n.fillText(i[l],u.x(t.x),t.y+s.lineHeight/2),t.y+=s.lineHeight+o,l+1===a&&(t.y+=r.titleMarginBottom-o)}}_drawColorBox(t,n,r,i,a){const s=this.labelColors[r],o=this.labelPointStyles[r],{boxHeight:l,boxWidth:u}=a,c=it(a.bodyFont),d=zu(this,"left",a),f=i.x(d),h=l<c.lineHeight?(c.lineHeight-l)/2:0,p=n.y+h;if(a.usePointStyle){const g={radius:Math.min(u,l)/2,pointStyle:o.pointStyle,rotation:o.rotation,borderWidth:1},b=i.leftForLtr(f,u)+u/2,v=p+l/2;t.strokeStyle=a.multiKeyBackground,t.fillStyle=a.multiKeyBackground,Gy(t,g,b,v),t.strokeStyle=s.borderColor,t.fillStyle=s.backgroundColor,Gy(t,g,b,v)}else{t.lineWidth=ae(s.borderWidth)?Math.max(...Object.values(s.borderWidth)):s.borderWidth||1,t.strokeStyle=s.borderColor,t.setLineDash(s.borderDash||[]),t.lineDashOffset=s.borderDashOffset||0;const g=i.leftForLtr(f,u),b=i.leftForLtr(i.xPlus(f,1),u-2),v=Gi(s.borderRadius);Object.values(v).some(m=>m!==0)?(t.beginPath(),t.fillStyle=a.multiKeyBackground,wl(t,{x:g,y:p,w:u,h:l,radius:v}),t.fill(),t.stroke(),t.fillStyle=s.backgroundColor,t.beginPath(),wl(t,{x:b,y:p+1,w:u-2,h:l-2,radius:v}),t.fill()):(t.fillStyle=a.multiKeyBackground,t.fillRect(g,p,u,l),t.strokeRect(g,p,u,l),t.fillStyle=s.backgroundColor,t.fillRect(b,p+1,u-2,l-2))}t.fillStyle=this.labelTextColors[r]}drawBody(t,n,r){const{body:i}=this,{bodySpacing:a,bodyAlign:s,displayColors:o,boxHeight:l,boxWidth:u,boxPadding:c}=r,d=it(r.bodyFont);let f=d.lineHeight,h=0;const p=cs(r.rtl,this.x,this.width),g=function(x){n.fillText(x,p.x(t.x+h),t.y+f/2),t.y+=f+a},b=p.textAlign(s);let v,m,$,w,D,S,k;for(n.textAlign=s,n.textBaseline="middle",n.font=d.string,t.x=zu(this,b,r),n.fillStyle=r.bodyColor,me(this.beforeBody,g),h=o&&b!=="right"?s==="center"?u/2+c:u+2+c:0,w=0,S=i.length;w<S;++w){for(v=i[w],m=this.labelTextColors[w],n.fillStyle=m,me(v.before,g),$=v.lines,o&&$.length&&(this._drawColorBox(n,t,w,p,r),f=Math.max(d.lineHeight,l)),D=0,k=$.length;D<k;++D)g($[D]),f=d.lineHeight;me(v.after,g)}h=0,f=d.lineHeight,me(this.afterBody,g),t.y-=a}drawFooter(t,n,r){const i=this.footer,a=i.length;let s,o;if(a){const l=cs(r.rtl,this.x,this.width);for(t.x=zu(this,r.footerAlign,r),t.y+=r.footerMarginTop,n.textAlign=l.textAlign(r.footerAlign),n.textBaseline="middle",s=it(r.footerFont),n.fillStyle=r.footerColor,n.font=s.string,o=0;o<a;++o)n.fillText(i[o],l.x(t.x),t.y+s.lineHeight/2),t.y+=s.lineHeight+r.footerSpacing}}drawBackground(t,n,r,i){const{xAlign:a,yAlign:s}=this,{x:o,y:l}=t,{width:u,height:c}=r,{topLeft:d,topRight:f,bottomLeft:h,bottomRight:p}=Gi(i.cornerRadius);n.fillStyle=i.backgroundColor,n.strokeStyle=i.borderColor,n.lineWidth=i.borderWidth,n.beginPath(),n.moveTo(o+d,l),s==="top"&&this.drawCaret(t,n,r,i),n.lineTo(o+u-f,l),n.quadraticCurveTo(o+u,l,o+u,l+f),s==="center"&&a==="right"&&this.drawCaret(t,n,r,i),n.lineTo(o+u,l+c-p),n.quadraticCurveTo(o+u,l+c,o+u-p,l+c),s==="bottom"&&this.drawCaret(t,n,r,i),n.lineTo(o+h,l+c),n.quadraticCurveTo(o,l+c,o,l+c-h),s==="center"&&a==="left"&&this.drawCaret(t,n,r,i),n.lineTo(o,l+d),n.quadraticCurveTo(o,l,o+d,l),n.closePath(),n.fill(),i.borderWidth>0&&n.stroke()}_updateAnimationTarget(t){const n=this.chart,r=this.$animations,i=r&&r.x,a=r&&r.y;if(i||a){const s=wo[t.position].call(this,this._active,this._eventPosition);if(!s)return;const o=this._size=q6(this,t),l=Object.assign({},s,this._size),u=G6(n,t,l),c=Z6(t,l,u,n);(i._to!==c.x||a._to!==c.y)&&(this.xAlign=u.xAlign,this.yAlign=u.yAlign,this.width=o.width,this.height=o.height,this.caretX=s.x,this.caretY=s.y,this._resolveAnimations().update(this,c))}}_willRender(){return!!this.opacity}draw(t){const n=this.options.setContext(this.getContext());let r=this.opacity;if(!r)return;this._updateAnimationTarget(n);const i={width:this.width,height:this.height},a={x:this.x,y:this.y};r=Math.abs(r)<.001?0:r;const s=Pt(n.padding),o=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;n.enabled&&o&&(t.save(),t.globalAlpha=r,this.drawBackground(a,t,i,n),NT(t,n.textDirection),a.y+=s.top,this.drawTitle(a,t,n),this.drawBody(a,t,n),this.drawFooter(a,t,n),jT(t,n.textDirection),t.restore())}getActiveElements(){return this._active||[]}setActiveElements(t,n){const r=this._active,i=t.map(({datasetIndex:o,index:l})=>{const u=this.chart.getDatasetMeta(o);if(!u)throw new Error("Cannot find a dataset at index "+o);return{datasetIndex:o,element:u.data[l],index:l}}),a=!Wd(r,i),s=this._positionChanged(i,n);(a||s)&&(this._active=i,this._eventPosition=n,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(t,n,r=!0){if(n&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const i=this.options,a=this._active||[],s=this._getActiveElements(t,a,n,r),o=this._positionChanged(s,t),l=n||!Wd(s,a)||o;return l&&(this._active=s,(i.enabled||i.external)&&(this._eventPosition={x:t.x,y:t.y},this.update(!0,n))),l}_getActiveElements(t,n,r,i){const a=this.options;if(t.type==="mouseout")return[];if(!i)return n.filter(o=>this.chart.data.datasets[o.datasetIndex]&&this.chart.getDatasetMeta(o.datasetIndex).controller.getParsed(o.index)!==void 0);const s=this.chart.getElementsAtEventForMode(t,a.mode,a,r);return a.reverse&&s.reverse(),s}_positionChanged(t,n){const{caretX:r,caretY:i,options:a}=this,s=wo[a.position].call(this,t,n);return s!==!1&&(r!==s.x||i!==s.y)}}j(n3,"positioners",wo);var G$={id:"tooltip",_element:n3,positioners:wo,afterInit(e,t,n){n&&(e.tooltip=new n3({chart:e,options:n}))},beforeUpdate(e,t,n){e.tooltip&&e.tooltip.initialize(n)},reset(e,t,n){e.tooltip&&e.tooltip.initialize(n)},afterDraw(e){const t=e.tooltip;if(t&&t._willRender()){const n={tooltip:t};if(e.notifyPlugins("beforeTooltipDraw",{...n,cancelable:!0})===!1)return;t.draw(e.ctx),e.notifyPlugins("afterTooltipDraw",n)}},afterEvent(e,t){if(e.tooltip){const n=t.replay;e.tooltip.handleEvent(t.event,n,t.inChartArea)&&(t.changed=!0)}},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(e,t)=>t.bodyFont.size,boxWidth:(e,t)=>t.bodyFont.size,multiKeyBackground:"#fff",displayColors:!0,boxPadding:0,borderColor:"rgba(0,0,0,0)",borderWidth:0,animation:{duration:400,easing:"easeOutQuart"},animations:{numbers:{type:"number",properties:["x","y","width","height","caretX","caretY"]},opacity:{easing:"linear",duration:200}},callbacks:dR},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:e=>e!=="filter"&&e!=="itemSort"&&e!=="external",_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]},kY=Object.freeze({__proto__:null,Colors:zK,Decimation:HK,Filler:dY,Legend:vY,SubTitle:$Y,Title:yY,Tooltip:G$});const PY=(e,t,n,r)=>(typeof t=="string"?(n=e.push(t)-1,r.unshift({index:n,label:t})):isNaN(t)&&(n=null),n);function TY(e,t,n,r){const i=e.indexOf(t);if(i===-1)return PY(e,t,n,r);const a=e.lastIndexOf(t);return i!==a?n:i}const RY=(e,t)=>e===null?null:dt(Math.round(e),0,t);function J6(e){const t=this.getLabels();return e>=0&&e<t.length?t[e]:e}class _l extends $a{constructor(t){super(t),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(t){const n=this._addedLabels;if(n.length){const r=this.getLabels();for(const{index:i,label:a}of n)r[i]===a&&r.splice(i,1);this._addedLabels=[]}super.init(t)}parse(t,n){if(ce(t))return null;const r=this.getLabels();return n=isFinite(n)&&r[n]===t?n:TY(r,t,J(n,t),this._addedLabels),RY(n,r.length-1)}determineDataLimits(){const{minDefined:t,maxDefined:n}=this.getUserBounds();let{min:r,max:i}=this.getMinMax(!0);this.options.bounds==="ticks"&&(t||(r=0),n||(i=this.getLabels().length-1)),this.min=r,this.max=i}buildTicks(){const t=this.min,n=this.max,r=this.options.offset,i=[];let a=this.getLabels();a=t===0&&n===a.length-1?a:a.slice(t,n+1),this._valueRange=Math.max(a.length-(r?0:1),1),this._startValue=this.min-(r?.5:0);for(let s=t;s<=n;s++)i.push({value:s});return i}getLabelForValue(t){return J6.call(this,t)}configure(){super.configure(),this.isHorizontal()||(this._reversePixels=!this._reversePixels)}getPixelForValue(t){return typeof t!="number"&&(t=this.parse(t)),t===null?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getPixelForTick(t){const n=this.ticks;return t<0||t>n.length-1?null:this.getPixelForValue(n[t].value)}getValueForPixel(t){return Math.round(this._startValue+this.getDecimalForPixel(t)*this._valueRange)}getBasePixel(){return this.bottom}}j(_l,"id","category"),j(_l,"defaults",{ticks:{callback:J6}});function MY(e,t){const n=[],{bounds:i,step:a,min:s,max:o,precision:l,count:u,maxTicks:c,maxDigits:d,includeBounds:f}=e,h=a||1,p=c-1,{min:g,max:b}=t,v=!ce(s),m=!ce(o),$=!ce(u),w=(b-g)/(d+1);let D=Y5((b-g)/p/h)*h,S,k,x,T;if(D<1e-14&&!v&&!m)return[{value:g},{value:b}];T=Math.ceil(b/D)-Math.floor(g/D),T>p&&(D=Y5(T*D/p/h)*h),ce(l)||(S=Math.pow(10,l),D=Math.ceil(D*S)/S),i==="ticks"?(k=Math.floor(g/D)*D,x=Math.ceil(b/D)*D):(k=g,x=b),v&&m&&a&&CW((o-s)/a,D/1e3)?(T=Math.round(Math.min((o-s)/D,c)),D=(o-s)/T,k=s,x=o):$?(k=v?s:k,x=m?o:x,T=u-1,D=(x-k)/T):(T=(x-k)/D,No(T,Math.round(T),D/1e3)?T=Math.round(T):T=Math.ceil(T));const P=Math.max(q5(D),q5(k));S=Math.pow(10,ce(l)?P:l),k=Math.round(k*S)/S,x=Math.round(x*S)/S;let E=0;for(v&&(f&&k!==s?(n.push({value:s}),k<s&&E++,No(Math.round((k+E*D)*S)/S,s,ew(s,w,e))&&E++):k<s&&E++);E<T;++E){const A=Math.round((k+E*D)*S)/S;if(m&&A>o)break;n.push({value:A})}return m&&f&&x!==o?n.length&&No(n[n.length-1].value,o,ew(o,w,e))?n[n.length-1].value=o:n.push({value:o}):(!m||x===o)&&n.push({value:x}),n}function ew(e,t,{horizontal:n,minRotation:r}){const i=An(r),a=(n?Math.sin(i):Math.cos(i))||.001,s=.75*t*(""+e).length;return Math.min(t/a,s)}class Zd extends $a{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(t,n){return ce(t)||(typeof t=="number"||t instanceof Number)&&!isFinite(+t)?null:+t}handleTickRangeOptions(){const{beginAtZero:t}=this.options,{minDefined:n,maxDefined:r}=this.getUserBounds();let{min:i,max:a}=this;const s=l=>i=n?i:l,o=l=>a=r?a:l;if(t){const l=Zn(i),u=Zn(a);l<0&&u<0?o(0):l>0&&u>0&&s(0)}if(i===a){let l=a===0?1:Math.abs(a*.05);o(a+l),t||s(i-l)}this.min=i,this.max=a}getTickLimit(){const t=this.options.ticks;let{maxTicksLimit:n,stepSize:r}=t,i;return r?(i=Math.ceil(this.max/r)-Math.floor(this.min/r)+1,i>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${r} would result generating up to ${i} ticks. Limiting to 1000.`),i=1e3)):(i=this.computeTickLimit(),n=n||11),n&&(i=Math.min(n,i)),i}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const t=this.options,n=t.ticks;let r=this.getTickLimit();r=Math.max(2,r);const i={maxTicks:r,bounds:t.bounds,min:t.min,max:t.max,precision:n.precision,step:n.stepSize,count:n.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:n.minRotation||0,includeBounds:n.includeBounds!==!1},a=this._range||this,s=MY(i,a);return t.bounds==="ticks"&&wT(s,this,"value"),t.reverse?(s.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),s}configure(){const t=this.ticks;let n=this.min,r=this.max;if(super.configure(),this.options.offset&&t.length){const i=(r-n)/Math.max(t.length-1,1)/2;n-=i,r+=i}this._startValue=n,this._endValue=r,this._valueRange=r-n}getLabelForValue(t){return Ul(t,this.chart.options.locale,this.options.ticks.format)}}class El extends Zd{determineDataLimits(){const{min:t,max:n}=this.getMinMax(!0);this.min=Ve(t)?t:0,this.max=Ve(n)?n:1,this.handleTickRangeOptions()}computeTickLimit(){const t=this.isHorizontal(),n=t?this.width:this.height,r=An(this.options.ticks.minRotation),i=(t?Math.sin(r):Math.cos(r))||.001,a=this._resolveTickFontOptions(0);return Math.ceil(n/Math.min(40,a.lineHeight/i))}getPixelForValue(t){return t===null?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getValueForPixel(t){return this._startValue+this.getDecimalForPixel(t)*this._valueRange}}j(El,"id","linear"),j(El,"defaults",{ticks:{callback:Wf.formatters.numeric}});const Sl=e=>Math.floor(qr(e)),Ci=(e,t)=>Math.pow(10,Sl(e)+t);function tw(e){return e/Math.pow(10,Sl(e))===1}function nw(e,t,n){const r=Math.pow(10,n),i=Math.floor(e/r);return Math.ceil(t/r)-i}function FY(e,t){const n=t-e;let r=Sl(n);for(;nw(e,t,r)>10;)r++;for(;nw(e,t,r)<10;)r--;return Math.min(r,Sl(e))}function AY(e,{min:t,max:n}){t=en(e.min,t);const r=[],i=Sl(t);let a=FY(t,n),s=a<0?Math.pow(10,Math.abs(a)):1;const o=Math.pow(10,a),l=i>a?Math.pow(10,i):0,u=Math.round((t-l)*s)/s,c=Math.floor((t-l)/o/10)*o*10;let d=Math.floor((u-c)/Math.pow(10,a)),f=en(e.min,Math.round((l+c+d*Math.pow(10,a))*s)/s);for(;f<n;)r.push({value:f,major:tw(f),significand:d}),d>=10?d=d<15?15:20:d++,d>=20&&(a++,d=2,s=a>=0?1:s),f=Math.round((l+c+d*Math.pow(10,a))*s)/s;const h=en(e.max,f);return r.push({value:h,major:tw(h),significand:d}),r}class r3 extends $a{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0}parse(t,n){const r=Zd.prototype.parse.apply(this,[t,n]);if(r===0){this._zero=!0;return}return Ve(r)&&r>0?r:null}determineDataLimits(){const{min:t,max:n}=this.getMinMax(!0);this.min=Ve(t)?Math.max(0,t):null,this.max=Ve(n)?Math.max(0,n):null,this.options.beginAtZero&&(this._zero=!0),this._zero&&this.min!==this._suggestedMin&&!Ve(this._userMin)&&(this.min=t===Ci(this.min,0)?Ci(this.min,-1):Ci(this.min,0)),this.handleTickRangeOptions()}handleTickRangeOptions(){const{minDefined:t,maxDefined:n}=this.getUserBounds();let r=this.min,i=this.max;const a=o=>r=t?r:o,s=o=>i=n?i:o;r===i&&(r<=0?(a(1),s(10)):(a(Ci(r,-1)),s(Ci(i,1)))),r<=0&&a(Ci(i,-1)),i<=0&&s(Ci(r,1)),this.min=r,this.max=i}buildTicks(){const t=this.options,n={min:this._userMin,max:this._userMax},r=AY(n,this);return t.bounds==="ticks"&&wT(r,this,"value"),t.reverse?(r.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),r}getLabelForValue(t){return t===void 0?"0":Ul(t,this.chart.options.locale,this.options.ticks.format)}configure(){const t=this.min;super.configure(),this._startValue=qr(t),this._valueRange=qr(this.max)-qr(t)}getPixelForValue(t){return(t===void 0||t===0)&&(t=this.min),t===null||isNaN(t)?NaN:this.getPixelForDecimal(t===this.min?0:(qr(t)-this._startValue)/this._valueRange)}getValueForPixel(t){const n=this.getDecimalForPixel(t);return Math.pow(10,this._startValue+n*this._valueRange)}}j(r3,"id","logarithmic"),j(r3,"defaults",{ticks:{callback:Wf.formatters.logarithmic,major:{enabled:!0}}});function i3(e){const t=e.ticks;if(t.display&&e.display){const n=Pt(t.backdropPadding);return J(t.font&&t.font.size,We.font.size)+n.height}return 0}function OY(e,t,n){return n=Be(n)?n:[n],{w:UW(e,t.string,n),h:n.length*t.lineHeight}}function rw(e,t,n,r,i){return e===r||e===i?{start:t-n/2,end:t+n/2}:e<r||e>i?{start:t-n,end:t}:{start:t,end:t+n}}function BY(e){const t={l:e.left+e._padding.left,r:e.right-e._padding.right,t:e.top+e._padding.top,b:e.bottom-e._padding.bottom},n=Object.assign({},t),r=[],i=[],a=e._pointLabels.length,s=e.options.pointLabels,o=s.centerPointLabels?Me/a:0;for(let l=0;l<a;l++){const u=s.setContext(e.getPointLabelContext(l));i[l]=u.padding;const c=e.getPointPosition(l,e.drawingArea+i[l],o),d=it(u.font),f=OY(e.ctx,d,e._pointLabels[l]);r[l]=f;const h=nn(e.getIndexAngle(l)+o),p=Math.round(B$(h)),g=rw(p,c.x,f.w,0,180),b=rw(p,c.y,f.h,90,270);IY(n,t,h,g,b)}e.setCenterPoint(t.l-n.l,n.r-t.r,t.t-n.t,n.b-t.b),e._pointLabelItems=jY(e,r,i)}function IY(e,t,n,r,i){const a=Math.abs(Math.sin(n)),s=Math.abs(Math.cos(n));let o=0,l=0;r.start<t.l?(o=(t.l-r.start)/a,e.l=Math.min(e.l,t.l-o)):r.end>t.r&&(o=(r.end-t.r)/a,e.r=Math.max(e.r,t.r+o)),i.start<t.t?(l=(t.t-i.start)/s,e.t=Math.min(e.t,t.t-l)):i.end>t.b&&(l=(i.end-t.b)/s,e.b=Math.max(e.b,t.b+l))}function LY(e,t,n){const r=e.drawingArea,{extra:i,additionalAngle:a,padding:s,size:o}=n,l=e.getPointPosition(t,r+i+s,a),u=Math.round(B$(nn(l.angle+qe))),c=WY(l.y,o.h,u),d=zY(u),f=VY(l.x,o.w,d);return{visible:!0,x:l.x,y:c,textAlign:d,left:f,top:c,right:f+o.w,bottom:c+o.h}}function NY(e,t){if(!t)return!0;const{left:n,top:r,right:i,bottom:a}=e;return!(vr({x:n,y:r},t)||vr({x:n,y:a},t)||vr({x:i,y:r},t)||vr({x:i,y:a},t))}function jY(e,t,n){const r=[],i=e._pointLabels.length,a=e.options,{centerPointLabels:s,display:o}=a.pointLabels,l={extra:i3(a)/2,additionalAngle:s?Me/i:0};let u;for(let c=0;c<i;c++){l.padding=n[c],l.size=t[c];const d=LY(e,c,l);r.push(d),o==="auto"&&(d.visible=NY(d,u),d.visible&&(u=d))}return r}function zY(e){return e===0||e===180?"center":e<180?"left":"right"}function VY(e,t,n){return n==="right"?e-=t:n==="center"&&(e-=t/2),e}function WY(e,t,n){return n===90||n===270?e-=t/2:(n>270||n<90)&&(e-=t),e}function UY(e,t,n){const{left:r,top:i,right:a,bottom:s}=n,{backdropColor:o}=t;if(!ce(o)){const l=Gi(t.borderRadius),u=Pt(t.backdropPadding);e.fillStyle=o;const c=r-u.left,d=i-u.top,f=a-r+u.width,h=s-i+u.height;Object.values(l).some(p=>p!==0)?(e.beginPath(),wl(e,{x:c,y:d,w:f,h,radius:l}),e.fill()):e.fillRect(c,d,f,h)}}function HY(e,t){const{ctx:n,options:{pointLabels:r}}=e;for(let i=t-1;i>=0;i--){const a=e._pointLabelItems[i];if(!a.visible)continue;const s=r.setContext(e.getPointLabelContext(i));UY(n,s,a);const o=it(s.font),{x:l,y:u,textAlign:c}=a;la(n,e._pointLabels[i],l,u+o.lineHeight/2,o,{color:s.color,textAlign:c,textBaseline:"middle"})}}function fR(e,t,n,r){const{ctx:i}=e;if(n)i.arc(e.xCenter,e.yCenter,t,0,Te);else{let a=e.getPointPosition(0,t);i.moveTo(a.x,a.y);for(let s=1;s<r;s++)a=e.getPointPosition(s,t),i.lineTo(a.x,a.y)}}function KY(e,t,n,r,i){const a=e.ctx,s=t.circular,{color:o,lineWidth:l}=t;!s&&!r||!o||!l||n<0||(a.save(),a.strokeStyle=o,a.lineWidth=l,a.setLineDash(i.dash),a.lineDashOffset=i.dashOffset,a.beginPath(),fR(e,n,s,r),a.closePath(),a.stroke(),a.restore())}function YY(e,t,n){return yi(e,{label:n,index:t,type:"pointLabel"})}class Do extends Zd{constructor(t){super(t),this.xCenter=void 0,this.yCenter=void 0,this.drawingArea=void 0,this._pointLabels=[],this._pointLabelItems=[]}setDimensions(){const t=this._padding=Pt(i3(this.options)/2),n=this.width=this.maxWidth-t.width,r=this.height=this.maxHeight-t.height;this.xCenter=Math.floor(this.left+n/2+t.left),this.yCenter=Math.floor(this.top+r/2+t.top),this.drawingArea=Math.floor(Math.min(n,r)/2)}determineDataLimits(){const{min:t,max:n}=this.getMinMax(!1);this.min=Ve(t)&&!isNaN(t)?t:0,this.max=Ve(n)&&!isNaN(n)?n:0,this.handleTickRangeOptions()}computeTickLimit(){return Math.ceil(this.drawingArea/i3(this.options))}generateTickLabels(t){Zd.prototype.generateTickLabels.call(this,t),this._pointLabels=this.getLabels().map((n,r)=>{const i=De(this.options.pointLabels.callback,[n,r],this);return i||i===0?i:""}).filter((n,r)=>this.chart.getDataVisibility(r))}fit(){const t=this.options;t.display&&t.pointLabels.display?BY(this):this.setCenterPoint(0,0,0,0)}setCenterPoint(t,n,r,i){this.xCenter+=Math.floor((t-n)/2),this.yCenter+=Math.floor((r-i)/2),this.drawingArea-=Math.min(this.drawingArea/2,Math.max(t,n,r,i))}getIndexAngle(t){const n=Te/(this._pointLabels.length||1),r=this.options.startAngle||0;return nn(t*n+An(r))}getDistanceFromCenterForValue(t){if(ce(t))return NaN;const n=this.drawingArea/(this.max-this.min);return this.options.reverse?(this.max-t)*n:(t-this.min)*n}getValueForDistanceFromCenter(t){if(ce(t))return NaN;const n=t/(this.drawingArea/(this.max-this.min));return this.options.reverse?this.max-n:this.min+n}getPointLabelContext(t){const n=this._pointLabels||[];if(t>=0&&t<n.length){const r=n[t];return YY(this.getContext(),t,r)}}getPointPosition(t,n,r=0){const i=this.getIndexAngle(t)-qe+r;return{x:Math.cos(i)*n+this.xCenter,y:Math.sin(i)*n+this.yCenter,angle:i}}getPointPositionForValue(t,n){return this.getPointPosition(t,this.getDistanceFromCenterForValue(n))}getBasePosition(t){return this.getPointPositionForValue(t||0,this.getBaseValue())}getPointLabelPosition(t){const{left:n,top:r,right:i,bottom:a}=this._pointLabelItems[t];return{left:n,top:r,right:i,bottom:a}}drawBackground(){const{backgroundColor:t,grid:{circular:n}}=this.options;if(t){const r=this.ctx;r.save(),r.beginPath(),fR(this,this.getDistanceFromCenterForValue(this._endValue),n,this._pointLabels.length),r.closePath(),r.fillStyle=t,r.fill(),r.restore()}}drawGrid(){const t=this.ctx,n=this.options,{angleLines:r,grid:i,border:a}=n,s=this._pointLabels.length;let o,l,u;if(n.pointLabels.display&&HY(this,s),i.display&&this.ticks.forEach((c,d)=>{if(d!==0||d===0&&this.min<0){l=this.getDistanceFromCenterForValue(c.value);const f=this.getContext(d),h=i.setContext(f),p=a.setContext(f);KY(this,h,l,s,p)}}),r.display){for(t.save(),o=s-1;o>=0;o--){const c=r.setContext(this.getPointLabelContext(o)),{color:d,lineWidth:f}=c;!f||!d||(t.lineWidth=f,t.strokeStyle=d,t.setLineDash(c.borderDash),t.lineDashOffset=c.borderDashOffset,l=this.getDistanceFromCenterForValue(n.ticks.reverse?this.min:this.max),u=this.getPointPosition(o,l),t.beginPath(),t.moveTo(this.xCenter,this.yCenter),t.lineTo(u.x,u.y),t.stroke())}t.restore()}}drawBorder(){}drawLabels(){const t=this.ctx,n=this.options,r=n.ticks;if(!r.display)return;const i=this.getIndexAngle(0);let a,s;t.save(),t.translate(this.xCenter,this.yCenter),t.rotate(i),t.textAlign="center",t.textBaseline="middle",this.ticks.forEach((o,l)=>{if(l===0&&this.min>=0&&!n.reverse)return;const u=r.setContext(this.getContext(l)),c=it(u.font);if(a=this.getDistanceFromCenterForValue(this.ticks[l].value),u.showLabelBackdrop){t.font=c.string,s=t.measureText(o.label).width,t.fillStyle=u.backdropColor;const d=Pt(u.backdropPadding);t.fillRect(-s/2-d.left,-a-c.size/2-d.top,s+d.width,c.size+d.height)}la(t,o.label,0,-a,c,{color:u.color,strokeColor:u.textStrokeColor,strokeWidth:u.textStrokeWidth})}),t.restore()}drawTitle(){}}j(Do,"id","radialLinear"),j(Do,"defaults",{display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:Wf.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback(t){return t},padding:5,centerPointLabels:!1}}),j(Do,"defaultRoutes",{"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"}),j(Do,"descriptors",{angleLines:{_fallback:"grid"}});const Yf={millisecond:{common:!0,size:1,steps:1e3},second:{common:!0,size:1e3,steps:60},minute:{common:!0,size:6e4,steps:60},hour:{common:!0,size:36e5,steps:24},day:{common:!0,size:864e5,steps:30},week:{common:!1,size:6048e5,steps:4},month:{common:!0,size:2628e6,steps:12},quarter:{common:!1,size:7884e6,steps:4},year:{common:!0,size:3154e7}},Ht=Object.keys(Yf);function iw(e,t){return e-t}function aw(e,t){if(ce(t))return null;const n=e._adapter,{parser:r,round:i,isoWeekday:a}=e._parseOpts;let s=t;return typeof r=="function"&&(s=r(s)),Ve(s)||(s=typeof r=="string"?n.parse(s,r):n.parse(s)),s===null?null:(i&&(s=i==="week"&&(_s(a)||a===!0)?n.startOf(s,"isoWeek",a):n.startOf(s,i)),+s)}function sw(e,t,n,r){const i=Ht.length;for(let a=Ht.indexOf(e);a<i-1;++a){const s=Yf[Ht[a]],o=s.steps?s.steps:Number.MAX_SAFE_INTEGER;if(s.common&&Math.ceil((n-t)/(o*s.size))<=r)return Ht[a]}return Ht[i-1]}function qY(e,t,n,r,i){for(let a=Ht.length-1;a>=Ht.indexOf(n);a--){const s=Ht[a];if(Yf[s].common&&e._adapter.diff(i,r,s)>=t-1)return s}return Ht[n?Ht.indexOf(n):0]}function GY(e){for(let t=Ht.indexOf(e)+1,n=Ht.length;t<n;++t)if(Yf[Ht[t]].common)return Ht[t]}function ow(e,t,n){if(!n)e[t]=!0;else if(n.length){const{lo:r,hi:i}=I$(n,t),a=n[r]>=t?n[r]:n[i];e[a]=!0}}function ZY(e,t,n,r){const i=e._adapter,a=+i.startOf(t[0].value,r),s=t[t.length-1].value;let o,l;for(o=a;o<=s;o=+i.add(o,1,r))l=n[o],l>=0&&(t[l].major=!0);return t}function lw(e,t,n){const r=[],i={},a=t.length;let s,o;for(s=0;s<a;++s)o=t[s],i[o]=s,r.push({value:o,major:!1});return a===0||!n?r:ZY(e,r,i,n)}class Cl extends $a{constructor(t){super(t),this._cache={data:[],labels:[],all:[]},this._unit="day",this._majorUnit=void 0,this._offsets={},this._normalized=!1,this._parseOpts=void 0}init(t,n={}){const r=t.time||(t.time={}),i=this._adapter=new sH._date(t.adapters.date);i.init(n),Lo(r.displayFormats,i.formats()),this._parseOpts={parser:r.parser,round:r.round,isoWeekday:r.isoWeekday},super.init(t),this._normalized=n.normalized}parse(t,n){return t===void 0?null:aw(this,t)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const t=this.options,n=this._adapter,r=t.time.unit||"day";let{min:i,max:a,minDefined:s,maxDefined:o}=this.getUserBounds();function l(u){!s&&!isNaN(u.min)&&(i=Math.min(i,u.min)),!o&&!isNaN(u.max)&&(a=Math.max(a,u.max))}(!s||!o)&&(l(this._getLabelBounds()),(t.bounds!=="ticks"||t.ticks.source!=="labels")&&l(this.getMinMax(!1))),i=Ve(i)&&!isNaN(i)?i:+n.startOf(Date.now(),r),a=Ve(a)&&!isNaN(a)?a:+n.endOf(Date.now(),r)+1,this.min=Math.min(i,a-1),this.max=Math.max(i+1,a)}_getLabelBounds(){const t=this.getLabelTimestamps();let n=Number.POSITIVE_INFINITY,r=Number.NEGATIVE_INFINITY;return t.length&&(n=t[0],r=t[t.length-1]),{min:n,max:r}}buildTicks(){const t=this.options,n=t.time,r=t.ticks,i=r.source==="labels"?this.getLabelTimestamps():this._generate();t.bounds==="ticks"&&i.length&&(this.min=this._userMin||i[0],this.max=this._userMax||i[i.length-1]);const a=this.min,s=this.max,o=RW(i,a,s);return this._unit=n.unit||(r.autoSkip?sw(n.minUnit,this.min,this.max,this._getLabelCapacity(a)):qY(this,o.length,n.minUnit,this.min,this.max)),this._majorUnit=!r.major.enabled||this._unit==="year"?void 0:GY(this._unit),this.initOffsets(i),t.reverse&&o.reverse(),lw(this,o,this._majorUnit)}afterAutoSkip(){this.options.offsetAfterAutoskip&&this.initOffsets(this.ticks.map(t=>+t.value))}initOffsets(t=[]){let n=0,r=0,i,a;this.options.offset&&t.length&&(i=this.getDecimalForValue(t[0]),t.length===1?n=1-i:n=(this.getDecimalForValue(t[1])-i)/2,a=this.getDecimalForValue(t[t.length-1]),t.length===1?r=a:r=(a-this.getDecimalForValue(t[t.length-2]))/2);const s=t.length<3?.5:.25;n=dt(n,0,s),r=dt(r,0,s),this._offsets={start:n,end:r,factor:1/(n+1+r)}}_generate(){const t=this._adapter,n=this.min,r=this.max,i=this.options,a=i.time,s=a.unit||sw(a.minUnit,n,r,this._getLabelCapacity(n)),o=J(i.ticks.stepSize,1),l=s==="week"?a.isoWeekday:!1,u=_s(l)||l===!0,c={};let d=n,f,h;if(u&&(d=+t.startOf(d,"isoWeek",l)),d=+t.startOf(d,u?"day":s),t.diff(r,n,s)>1e5*o)throw new Error(n+" and "+r+" are too far apart with stepSize of "+o+" "+s);const p=i.ticks.source==="data"&&this.getDataTimestamps();for(f=d,h=0;f<r;f=+t.add(f,o,s),h++)ow(c,f,p);return(f===r||i.bounds==="ticks"||h===1)&&ow(c,f,p),Object.keys(c).sort(iw).map(g=>+g)}getLabelForValue(t){const n=this._adapter,r=this.options.time;return r.tooltipFormat?n.format(t,r.tooltipFormat):n.format(t,r.displayFormats.datetime)}format(t,n){const i=this.options.time.displayFormats,a=this._unit,s=n||i[a];return this._adapter.format(t,s)}_tickFormatFunction(t,n,r,i){const a=this.options,s=a.ticks.callback;if(s)return De(s,[t,n,r],this);const o=a.time.displayFormats,l=this._unit,u=this._majorUnit,c=l&&o[l],d=u&&o[u],f=r[n],h=u&&d&&f&&f.major;return this._adapter.format(t,i||(h?d:c))}generateTickLabels(t){let n,r,i;for(n=0,r=t.length;n<r;++n)i=t[n],i.label=this._tickFormatFunction(i.value,n,t)}getDecimalForValue(t){return t===null?NaN:(t-this.min)/(this.max-this.min)}getPixelForValue(t){const n=this._offsets,r=this.getDecimalForValue(t);return this.getPixelForDecimal((n.start+r)*n.factor)}getValueForPixel(t){const n=this._offsets,r=this.getDecimalForPixel(t)/n.factor-n.end;return this.min+r*(this.max-this.min)}_getLabelSize(t){const n=this.options.ticks,r=this.ctx.measureText(t).width,i=An(this.isHorizontal()?n.maxRotation:n.minRotation),a=Math.cos(i),s=Math.sin(i),o=this._resolveTickFontOptions(0).size;return{w:r*a+o*s,h:r*s+o*a}}_getLabelCapacity(t){const n=this.options.time,r=n.displayFormats,i=r[n.unit]||r.millisecond,a=this._tickFormatFunction(t,0,lw(this,[t],this._majorUnit),i),s=this._getLabelSize(a),o=Math.floor(this.isHorizontal()?this.width/s.w:this.height/s.h)-1;return o>0?o:1}getDataTimestamps(){let t=this._cache.data||[],n,r;if(t.length)return t;const i=this.getMatchingVisibleMetas();if(this._normalized&&i.length)return this._cache.data=i[0].controller.getAllParsedValues(this);for(n=0,r=i.length;n<r;++n)t=t.concat(i[n].controller.getAllParsedValues(this));return this._cache.data=this.normalize(t)}getLabelTimestamps(){const t=this._cache.labels||[];let n,r;if(t.length)return t;const i=this.getLabels();for(n=0,r=i.length;n<r;++n)t.push(aw(this,i[n]));return this._cache.labels=this._normalized?t:this.normalize(t)}normalize(t){return ET(t.sort(iw))}}j(Cl,"id","time"),j(Cl,"defaults",{bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",callback:!1,major:{enabled:!1}}});function Vu(e,t,n){let r=0,i=e.length-1,a,s,o,l;n?(t>=e[r].pos&&t<=e[i].pos&&({lo:r,hi:i}=gr(e,"pos",t)),{pos:a,time:o}=e[r],{pos:s,time:l}=e[i]):(t>=e[r].time&&t<=e[i].time&&({lo:r,hi:i}=gr(e,"time",t)),{time:a,pos:o}=e[r],{time:s,pos:l}=e[i]);const u=s-a;return u?o+(l-o)*(t-a)/u:o}class a3 extends Cl{constructor(t){super(t),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const t=this._getTimestampsForTable(),n=this._table=this.buildLookupTable(t);this._minPos=Vu(n,this.min),this._tableRange=Vu(n,this.max)-this._minPos,super.initOffsets(t)}buildLookupTable(t){const{min:n,max:r}=this,i=[],a=[];let s,o,l,u,c;for(s=0,o=t.length;s<o;++s)u=t[s],u>=n&&u<=r&&i.push(u);if(i.length<2)return[{time:n,pos:0},{time:r,pos:1}];for(s=0,o=i.length;s<o;++s)c=i[s+1],l=i[s-1],u=i[s],Math.round((c+l)/2)!==u&&a.push({time:u,pos:s/(o-1)});return a}_generate(){const t=this.min,n=this.max;let r=super.getDataTimestamps();return(!r.includes(t)||!r.length)&&r.splice(0,0,t),(!r.includes(n)||r.length===1)&&r.push(n),r.sort((i,a)=>i-a)}_getTimestampsForTable(){let t=this._cache.all||[];if(t.length)return t;const n=this.getDataTimestamps(),r=this.getLabelTimestamps();return n.length&&r.length?t=this.normalize(n.concat(r)):t=n.length?n:r,t=this._cache.all=t,t}getDecimalForValue(t){return(Vu(this._table,t)-this._minPos)/this._tableRange}getValueForPixel(t){const n=this._offsets,r=this.getDecimalForPixel(t)/n.factor-n.end;return Vu(this._table,r*this._tableRange+this._minPos,!0)}}j(a3,"id","timeseries"),j(a3,"defaults",Cl.defaults);var XY=Object.freeze({__proto__:null,CategoryScale:_l,LinearScale:El,LogarithmicScale:r3,RadialLinearScale:Do,TimeScale:Cl,TimeSeriesScale:a3});const QY=[aH,OK,kY,XY];Bs.register(...QY);function zn(e){const t=Object.prototype.toString.call(e);return e instanceof Date||typeof e=="object"&&t==="[object Date]"?new e.constructor(+e):typeof e=="number"||t==="[object Number]"||typeof e=="string"||t==="[object String]"?new Date(e):new Date(NaN)}function ua(e,t){return e instanceof Date?new e.constructor(t):new Date(t)}const hR=6048e5,JY=864e5;let eq={};function qf(){return eq}function kl(e,t){var o,l,u,c;const n=qf(),r=(t==null?void 0:t.weekStartsOn)??((l=(o=t==null?void 0:t.locale)==null?void 0:o.options)==null?void 0:l.weekStartsOn)??n.weekStartsOn??((c=(u=n.locale)==null?void 0:u.options)==null?void 0:c.weekStartsOn)??0,i=zn(e),a=i.getDay(),s=(a<r?7:0)+a-r;return i.setDate(i.getDate()-s),i.setHours(0,0,0,0),i}function Xd(e){return kl(e,{weekStartsOn:1})}function pR(e){const t=zn(e),n=t.getFullYear(),r=ua(e,0);r.setFullYear(n+1,0,4),r.setHours(0,0,0,0);const i=Xd(r),a=ua(e,0);a.setFullYear(n,0,4),a.setHours(0,0,0,0);const s=Xd(a);return t.getTime()>=i.getTime()?n+1:t.getTime()>=s.getTime()?n:n-1}function uw(e){const t=zn(e);return t.setHours(0,0,0,0),t}function cw(e){const t=zn(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),+e-+n}function tq(e,t){const n=uw(e),r=uw(t),i=+n-cw(n),a=+r-cw(r);return Math.round((i-a)/JY)}function nq(e){const t=pR(e),n=ua(e,0);return n.setFullYear(t,0,4),n.setHours(0,0,0,0),Xd(n)}function rq(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function iq(e){if(!rq(e)&&typeof e!="number")return!1;const t=zn(e);return!isNaN(Number(t))}function aq(e){const t=zn(e),n=ua(e,0);return n.setFullYear(t.getFullYear(),0,1),n.setHours(0,0,0,0),n}const sq={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},oq=(e,t,n)=>{let r;const i=sq[e];return typeof i=="string"?r=i:t===1?r=i.one:r=i.other.replace("{{count}}",t.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};function Dp(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const lq={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},uq={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},cq={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},dq={date:Dp({formats:lq,defaultWidth:"full"}),time:Dp({formats:uq,defaultWidth:"full"}),dateTime:Dp({formats:cq,defaultWidth:"full"})},fq={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},hq=(e,t,n,r)=>fq[e];function ao(e){return(t,n)=>{const r=n!=null&&n.context?String(n.context):"standalone";let i;if(r==="formatting"&&e.formattingValues){const s=e.defaultFormattingWidth||e.defaultWidth,o=n!=null&&n.width?String(n.width):s;i=e.formattingValues[o]||e.formattingValues[s]}else{const s=e.defaultWidth,o=n!=null&&n.width?String(n.width):e.defaultWidth;i=e.values[o]||e.values[s]}const a=e.argumentCallback?e.argumentCallback(t):t;return i[a]}}const pq={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},mq={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},gq={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},vq={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},bq={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},yq={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},$q=(e,t)=>{const n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},xq={ordinalNumber:$q,era:ao({values:pq,defaultWidth:"wide"}),quarter:ao({values:mq,defaultWidth:"wide",argumentCallback:e=>e-1}),month:ao({values:gq,defaultWidth:"wide"}),day:ao({values:vq,defaultWidth:"wide"}),dayPeriod:ao({values:bq,defaultWidth:"wide",formattingValues:yq,defaultFormattingWidth:"wide"})};function so(e){return(t,n={})=>{const r=n.width,i=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],a=t.match(i);if(!a)return null;const s=a[0],o=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(o)?Dq(o,d=>d.test(s)):wq(o,d=>d.test(s));let u;u=e.valueCallback?e.valueCallback(l):l,u=n.valueCallback?n.valueCallback(u):u;const c=t.slice(s.length);return{value:u,rest:c}}}function wq(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function Dq(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function _q(e){return(t,n={})=>{const r=t.match(e.matchPattern);if(!r)return null;const i=r[0],a=t.match(e.parsePattern);if(!a)return null;let s=e.valueCallback?e.valueCallback(a[0]):a[0];s=n.valueCallback?n.valueCallback(s):s;const o=t.slice(i.length);return{value:s,rest:o}}}const Eq=/^(\d+)(th|st|nd|rd)?/i,Sq=/\d+/i,Cq={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},kq={any:[/^b/i,/^(a|c)/i]},Pq={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},Tq={any:[/1/i,/2/i,/3/i,/4/i]},Rq={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},Mq={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},Fq={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},Aq={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},Oq={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},Bq={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},Iq={ordinalNumber:_q({matchPattern:Eq,parsePattern:Sq,valueCallback:e=>parseInt(e,10)}),era:so({matchPatterns:Cq,defaultMatchWidth:"wide",parsePatterns:kq,defaultParseWidth:"any"}),quarter:so({matchPatterns:Pq,defaultMatchWidth:"wide",parsePatterns:Tq,defaultParseWidth:"any",valueCallback:e=>e+1}),month:so({matchPatterns:Rq,defaultMatchWidth:"wide",parsePatterns:Mq,defaultParseWidth:"any"}),day:so({matchPatterns:Fq,defaultMatchWidth:"wide",parsePatterns:Aq,defaultParseWidth:"any"}),dayPeriod:so({matchPatterns:Oq,defaultMatchWidth:"any",parsePatterns:Bq,defaultParseWidth:"any"})},Lq={code:"en-US",formatDistance:oq,formatLong:dq,formatRelative:hq,localize:xq,match:Iq,options:{weekStartsOn:0,firstWeekContainsDate:1}};function Nq(e){const t=zn(e);return tq(t,aq(t))+1}function jq(e){const t=zn(e),n=+Xd(t)-+nq(t);return Math.round(n/hR)+1}function mR(e,t){var c,d,f,h;const n=zn(e),r=n.getFullYear(),i=qf(),a=(t==null?void 0:t.firstWeekContainsDate)??((d=(c=t==null?void 0:t.locale)==null?void 0:c.options)==null?void 0:d.firstWeekContainsDate)??i.firstWeekContainsDate??((h=(f=i.locale)==null?void 0:f.options)==null?void 0:h.firstWeekContainsDate)??1,s=ua(e,0);s.setFullYear(r+1,0,a),s.setHours(0,0,0,0);const o=kl(s,t),l=ua(e,0);l.setFullYear(r,0,a),l.setHours(0,0,0,0);const u=kl(l,t);return n.getTime()>=o.getTime()?r+1:n.getTime()>=u.getTime()?r:r-1}function zq(e,t){var o,l,u,c;const n=qf(),r=(t==null?void 0:t.firstWeekContainsDate)??((l=(o=t==null?void 0:t.locale)==null?void 0:o.options)==null?void 0:l.firstWeekContainsDate)??n.firstWeekContainsDate??((c=(u=n.locale)==null?void 0:u.options)==null?void 0:c.firstWeekContainsDate)??1,i=mR(e,t),a=ua(e,0);return a.setFullYear(i,0,r),a.setHours(0,0,0,0),kl(a,t)}function Vq(e,t){const n=zn(e),r=+kl(n,t)-+zq(n,t);return Math.round(r/hR)+1}function pe(e,t){const n=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return n+r}const Tr={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return pe(t==="yy"?r%100:r,t.length)},M(e,t){const n=e.getMonth();return t==="M"?String(n+1):pe(n+1,2)},d(e,t){return pe(e.getDate(),t.length)},a(e,t){const n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h(e,t){return pe(e.getHours()%12||12,t.length)},H(e,t){return pe(e.getHours(),t.length)},m(e,t){return pe(e.getMinutes(),t.length)},s(e,t){return pe(e.getSeconds(),t.length)},S(e,t){const n=t.length,r=e.getMilliseconds(),i=Math.trunc(r*Math.pow(10,n-3));return pe(i,t.length)}},Ma={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},dw={G:function(e,t,n){const r=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});case"GGGG":default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if(t==="yo"){const r=e.getFullYear(),i=r>0?r:1-r;return n.ordinalNumber(i,{unit:"year"})}return Tr.y(e,t)},Y:function(e,t,n,r){const i=mR(e,r),a=i>0?i:1-i;if(t==="YY"){const s=a%100;return pe(s,2)}return t==="Yo"?n.ordinalNumber(a,{unit:"year"}):pe(a,t.length)},R:function(e,t){const n=pR(e);return pe(n,t.length)},u:function(e,t){const n=e.getFullYear();return pe(n,t.length)},Q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return pe(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return pe(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){const r=e.getMonth();switch(t){case"M":case"MM":return Tr.M(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){const r=e.getMonth();switch(t){case"L":return String(r+1);case"LL":return pe(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){const i=Vq(e,r);return t==="wo"?n.ordinalNumber(i,{unit:"week"}):pe(i,t.length)},I:function(e,t,n){const r=jq(e);return t==="Io"?n.ordinalNumber(r,{unit:"week"}):pe(r,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getDate(),{unit:"date"}):Tr.d(e,t)},D:function(e,t,n){const r=Nq(e);return t==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):pe(r,t.length)},E:function(e,t,n){const r=e.getDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});case"EEEE":default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){const i=e.getDay(),a=(i-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(a);case"ee":return pe(a,2);case"eo":return n.ordinalNumber(a,{unit:"day"});case"eee":return n.day(i,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(i,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(i,{width:"short",context:"formatting"});case"eeee":default:return n.day(i,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){const i=e.getDay(),a=(i-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(a);case"cc":return pe(a,t.length);case"co":return n.ordinalNumber(a,{unit:"day"});case"ccc":return n.day(i,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(i,{width:"narrow",context:"standalone"});case"cccccc":return n.day(i,{width:"short",context:"standalone"});case"cccc":default:return n.day(i,{width:"wide",context:"standalone"})}},i:function(e,t,n){const r=e.getDay(),i=r===0?7:r;switch(t){case"i":return String(i);case"ii":return pe(i,t.length);case"io":return n.ordinalNumber(i,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});case"iiii":default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){const i=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},b:function(e,t,n){const r=e.getHours();let i;switch(r===12?i=Ma.noon:r===0?i=Ma.midnight:i=r/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},B:function(e,t,n){const r=e.getHours();let i;switch(r>=17?i=Ma.evening:r>=12?i=Ma.afternoon:r>=4?i=Ma.morning:i=Ma.night,t){case"B":case"BB":case"BBB":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},h:function(e,t,n){if(t==="ho"){let r=e.getHours()%12;return r===0&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return Tr.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getHours(),{unit:"hour"}):Tr.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return t==="Ko"?n.ordinalNumber(r,{unit:"hour"}):pe(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t==="ko"?n.ordinalNumber(r,{unit:"hour"}):pe(r,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):Tr.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getSeconds(),{unit:"second"}):Tr.s(e,t)},S:function(e,t){return Tr.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return hw(r);case"XXXX":case"XX":return Oi(r);case"XXXXX":case"XXX":default:return Oi(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return hw(r);case"xxxx":case"xx":return Oi(r);case"xxxxx":case"xxx":default:return Oi(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+fw(r,":");case"OOOO":default:return"GMT"+Oi(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+fw(r,":");case"zzzz":default:return"GMT"+Oi(r,":")}},t:function(e,t,n){const r=Math.trunc(e.getTime()/1e3);return pe(r,t.length)},T:function(e,t,n){const r=e.getTime();return pe(r,t.length)}};function fw(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),i=Math.trunc(r/60),a=r%60;return a===0?n+String(i):n+String(i)+t+pe(a,2)}function hw(e,t){return e%60===0?(e>0?"-":"+")+pe(Math.abs(e)/60,2):Oi(e,t)}function Oi(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),i=pe(Math.trunc(r/60),2),a=pe(r%60,2);return n+i+t+a}const pw=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}},gR=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}},Wq=(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],i=n[2];if(!i)return pw(e,t);let a;switch(r){case"P":a=t.dateTime({width:"short"});break;case"PP":a=t.dateTime({width:"medium"});break;case"PPP":a=t.dateTime({width:"long"});break;case"PPPP":default:a=t.dateTime({width:"full"});break}return a.replace("{{date}}",pw(r,t)).replace("{{time}}",gR(i,t))},Uq={p:gR,P:Wq},Hq=/^D+$/,Kq=/^Y+$/,Yq=["D","DD","YY","YYYY"];function qq(e){return Hq.test(e)}function Gq(e){return Kq.test(e)}function Zq(e,t,n){const r=Xq(e,t,n);if(console.warn(r),Yq.includes(e))throw new RangeError(r)}function Xq(e,t,n){const r=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const Qq=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Jq=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,eG=/^'([^]*?)'?$/,tG=/''/g,nG=/[a-zA-Z]/;function rG(e,t,n){var c,d,f,h;const r=qf(),i=r.locale??Lq,a=r.firstWeekContainsDate??((d=(c=r.locale)==null?void 0:c.options)==null?void 0:d.firstWeekContainsDate)??1,s=r.weekStartsOn??((h=(f=r.locale)==null?void 0:f.options)==null?void 0:h.weekStartsOn)??0,o=zn(e);if(!iq(o))throw new RangeError("Invalid time value");let l=t.match(Jq).map(p=>{const g=p[0];if(g==="p"||g==="P"){const b=Uq[g];return b(p,i.formatLong)}return p}).join("").match(Qq).map(p=>{if(p==="''")return{isToken:!1,value:"'"};const g=p[0];if(g==="'")return{isToken:!1,value:iG(p)};if(dw[g])return{isToken:!0,value:p};if(g.match(nG))throw new RangeError("Format string contains an unescaped latin alphabet character `"+g+"`");return{isToken:!1,value:p}});i.localize.preprocessor&&(l=i.localize.preprocessor(o,l));const u={firstWeekContainsDate:a,weekStartsOn:s,locale:i};return l.map(p=>{if(!p.isToken)return p.value;const g=p.value;(Gq(g)||qq(g))&&Zq(g,t,String(e));const b=dw[g[0]];return b(o,g,i.localize,u)}).join("")}function iG(e){const t=e.match(eG);return t?t[1].replace(tG,"'"):e}const vR="label";function mw(e,t){typeof e=="function"?e(t):e&&(e.current=t)}function aG(e,t){const n=e.options;n&&t&&Object.assign(n,t)}function bR(e,t){e.labels=t}function yR(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:vR;const r=[];e.datasets=t.map(i=>{const a=e.datasets.find(s=>s[n]===i[n]);return!a||!i.data||r.includes(a)?{...i}:(r.push(a),Object.assign(a,i),a)})}function sG(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:vR;const n={labels:[],datasets:[]};return bR(n,e.labels),yR(n,e.datasets,t),n}function oG(e,t){const{height:n=150,width:r=300,redraw:i=!1,datasetIdKey:a,type:s,data:o,options:l,plugins:u=[],fallbackContent:c,updateMode:d,...f}=e,h=y.useRef(null),p=y.useRef(),g=()=>{h.current&&(p.current=new Bs(h.current,{type:s,data:sG(o,a),options:l&&{...l},plugins:u}),mw(t,p.current))},b=()=>{mw(t,null),p.current&&(p.current.destroy(),p.current=null)};return y.useEffect(()=>{!i&&p.current&&l&&aG(p.current,l)},[i,l]),y.useEffect(()=>{!i&&p.current&&bR(p.current.config.data,o.labels)},[i,o.labels]),y.useEffect(()=>{!i&&p.current&&o.datasets&&yR(p.current.config.data,o.datasets,a)},[i,o.datasets]),y.useEffect(()=>{p.current&&(i?(b(),setTimeout(g)):p.current.update(d))},[i,l,o.labels,o.datasets,d]),y.useEffect(()=>{p.current&&(b(),setTimeout(g))},[s]),y.useEffect(()=>(g(),()=>b()),[]),_.createElement("canvas",Object.assign({ref:h,role:"img",height:n,width:r},f),c)}const lG=y.forwardRef(oG);function $R(e,t){return Bs.register(t),y.forwardRef((n,r)=>_.createElement(lG,Object.assign({},n,{ref:r,type:e})))}const uG=$R("line",Vo),cG=$R("polarArea",ds);function xR(){return M.jsx(M.Fragment,{children:M.jsx("div",{className:"block bg-white-500 border border-gray-200 rounded-lg shadow",children:M.jsx("div",{children:"No data"})})})}Bs.register(_l,El,fs,Yn,G$);function dG(e){const t={responsive:!0,scales:{x:{grid:{display:!1}},y:{min:0,ticks:{stepSize:1,callback:function(i,a,s){return i+"wps"}},grid:{display:!1}}}},[n,r]=y.useState({labels:[],datasets:[]});return y.useEffect(()=>{(async()=>{const a=e.timeframe.end.toDate(),s=e.timeframe.start.toDate();s.setHours(s.getHours()-12);const o=12,{data:l}=await e.supabase.from("file").select("timestamp").gte("timestamp",s.toISOString()).lte("timestamp",a.toISOString());if(console.log(l),l.length===0)return;const u=new Date(s),d=(+new Date(a)-+u)/o;let f=Array(o).fill(""),h=Array(o).fill(0);for(let p=0;p<o;p++){const g=new Date(u.getTime()+p*d),b=new Date(u.getTime()+(p+1)*d);f[p]=rG(b,"MM/dd - HH:mm"),h[p]=l.filter(v=>{const m=new Date(v.timestamp);return m>=g&&m<b}).length}console.log("LABELS",f),console.log("POINTS",h),r({labels:f,datasets:[{label:"Dataset",data:h,borderColor:"rgb(53, 162, 235)",backgroundColor:"rgba(53, 162, 235, 0.5)"}]})})()},[e.timeframe]),M.jsxs("div",{children:[M.jsx("p",{className:"text-center",children:e.name}),n.datasets.length>0?M.jsx(uG,{data:n,options:t}):M.jsx(xR,{})]})}function fG(e){return M.jsx(M.Fragment,{children:M.jsx(WV,{"aria-label":"timeframe",value:e.timeframe,onChange:e.setTimeframe})})}function Wu(e,t){var n=e.length*t;if(e.length===0)throw new Error("quantile requires at least one data point.");if(t<0||t>1)throw new Error("quantiles must be between 0 and 1");return t===1?e[e.length-1]:t===0?e[0]:n%1!==0?e[Math.ceil(n)-1]:e.length%2===0?(e[n-1]+e[n])/2:e[n]}Bs.register(_l,El,fs,Yn,G$);function hG(e){const t={responsive:!0},[n,r]=y.useState({labels:[],datasets:[]});return y.useEffect(()=>{(async()=>{const a=e.timeframe.end.toDate(),s=e.timeframe.start.toDate();s.setHours(s.getHours()-12);const{data:o}=await e.supabase.from("file").select("contents").gte("timestamp",s.toISOString()).lte("timestamp",a.toISOString());if(console.log("RAWDATA",o),o.length===0)return;let l=o.map(h=>h.contents.length).sort((h,p)=>h-p);console.log("TOP LENGTHS",l);let u=Wu(l,.25),c=Wu(l,.5),d=Wu(l,.75),f=Wu(l,1);console.log("p25: ",u),console.log("p50: ",c),console.log("p75: ",d),console.log("p100: ",f),r({labels:["p25","p50","p75","p100"],datasets:[{data:[u,c,d,f]}]})})()},[e.timeframe]),console.log("length: aaa",n.datasets.length),M.jsxs("div",{className:"flex-grow flex-1",children:[M.jsx("p",{className:"text-center",children:e.name}),n.datasets.length>0?M.jsx(cG,{data:n,options:t}):M.jsx(xR,{})]})}function pG(e){const t=Rs(),[n,r]=y.useState([]);y.useEffect(()=>{e.session||t("/login")},[e.session]);const i=y.useCallback(async()=>{const{data:a,error:s}=await e.supabase.from("file").select();if(s){console.error(s);return}r(a.map(o=>o))},[e.supabase]);return y.useEffect(()=>{i()},[]),M.jsx(M.Fragment,{children:M.jsxs("div",{className:"flex h-screen",children:[M.jsx(Vf,{currentPage:"Home"}),M.jsx("main",{className:"overflow-y-auto flex flex-col flex-1 mx-5",children:M.jsxs("div",{className:"flex flex-col w-full gap-7 flex-grow",children:[M.jsx("div",{className:"flex flex-row gap-7 flex-grow",children:M.jsx("div",{className:"ml-auto mt-2",children:M.jsx(fG,{timeframe:e.timeframe,setTimeframe:e.setTimeframe})})}),M.jsxs("div",{className:"flex flex-row gap-7 flex-grow",children:[M.jsxs("div",{className:"w-1/2 flex flex-col",children:[M.jsx("p",{className:"text-center",children:"Active hosts"}),M.jsx("div",{className:"flex-grow block bg-white-500 border border-gray-200 rounded-lg shadow",children:M.jsxs("ol",{children:[M.jsx("li",{children:"Host 1"}),M.jsx("li",{children:"Host 2"})]})})]}),M.jsx("div",{className:"w-1/2 ml-auto",children:M.jsx(dG,{name:"File writes per second",supabase:e.supabase,timeframe:e.timeframe})})]}),M.jsxs("div",{className:"flex flex-row gap-7 mb-5 flex-grow",children:[M.jsx("div",{className:"w-1/2 mr-auto",children:M.jsx(hG,{name:"File writes size percentiles",supabase:e.supabase,timeframe:e.timeframe})}),M.jsxs("div",{className:"w-1/2 flex flex-col",children:[M.jsx("p",{className:"text-center",children:"Most edited files"}),M.jsx("div",{className:"flex-grow block bg-white-500 border border-gray-200 rounded-lg shadow",children:M.jsxs("ol",{children:[M.jsx("li",{children:"File 1"}),M.jsx("li",{children:"File 2"})]})})]})]})]})})]})})}function mG(e={}){const{nonce:t,onScriptLoadSuccess:n,onScriptLoadError:r}=e,[i,a]=y.useState(!1),s=y.useRef(n);s.current=n;const o=y.useRef(r);return o.current=r,y.useEffect(()=>{const l=document.createElement("script");return l.src="https://accounts.google.com/gsi/client",l.async=!0,l.defer=!0,l.nonce=t,l.onload=()=>{var u;a(!0),(u=s.current)===null||u===void 0||u.call(s)},l.onerror=()=>{var u;a(!1),(u=o.current)===null||u===void 0||u.call(o)},document.body.appendChild(l),()=>{document.body.removeChild(l)}},[t]),i}const wR=y.createContext(null);function gG({clientId:e,nonce:t,onScriptLoadSuccess:n,onScriptLoadError:r,children:i}){const a=mG({nonce:t,onScriptLoadSuccess:n,onScriptLoadError:r}),s=y.useMemo(()=>({clientId:e,scriptLoadedSuccessfully:a}),[e,a]);return _.createElement(wR.Provider,{value:s},i)}function vG(){const e=y.useContext(wR);if(!e)throw new Error("Google OAuth components must be used within GoogleOAuthProvider");return e}function bG(e){var t;return(t=e==null?void 0:e.clientId)!==null&&t!==void 0?t:e==null?void 0:e.client_id}const yG={large:40,medium:32,small:20};function $G({onSuccess:e,onError:t,useOneTap:n,promptMomentNotification:r,type:i="standard",theme:a="outline",size:s="large",text:o,shape:l,logo_alignment:u,width:c,locale:d,click_listener:f,containerProps:h,...p}){const g=y.useRef(null),{clientId:b,scriptLoadedSuccessfully:v}=vG(),m=y.useRef(e);m.current=e;const $=y.useRef(t);$.current=t;const w=y.useRef(r);return w.current=r,y.useEffect(()=>{var D,S,k,x,T,P,E,A,R;if(v)return(k=(S=(D=window==null?void 0:window.google)===null||D===void 0?void 0:D.accounts)===null||S===void 0?void 0:S.id)===null||k===void 0||k.initialize({client_id:b,callback:F=>{var z;if(!(F!=null&&F.credential))return(z=$.current)===null||z===void 0?void 0:z.call($);const{credential:B,select_by:C}=F;m.current({credential:B,clientId:bG(F),select_by:C})},...p}),(P=(T=(x=window==null?void 0:window.google)===null||x===void 0?void 0:x.accounts)===null||T===void 0?void 0:T.id)===null||P===void 0||P.renderButton(g.current,{type:i,theme:a,size:s,text:o,shape:l,logo_alignment:u,width:c,locale:d,click_listener:f}),n&&((R=(A=(E=window==null?void 0:window.google)===null||E===void 0?void 0:E.accounts)===null||A===void 0?void 0:A.id)===null||R===void 0||R.prompt(w.current)),()=>{var F,z,B;n&&((B=(z=(F=window==null?void 0:window.google)===null||F===void 0?void 0:F.accounts)===null||z===void 0?void 0:z.id)===null||B===void 0||B.cancel())}},[b,v,n,i,a,s,o,l,u,c,d]),_.createElement("div",{...h,ref:g,style:{height:yG[s],...h==null?void 0:h.style}})}function xG(e){const t=Rs();return y.useEffect(()=>{e.supabase.auth.getSession().then(({data:{session:r}})=>{e.setSession(r),console.log("LOGIN SESSION",r)});const{data:{subscription:n}}=e.supabase.auth.onAuthStateChange((r,i)=>{e.setSession(i),console.log("SESSION CHANGE",i)});return()=>n.unsubscribe()},[e.supabase]),y.useEffect(()=>{e.session&&t("/")},[e.session]),M.jsx(M.Fragment,{children:M.jsx("div",{className:"flex flex-col items-center h-screen w-screen",children:M.jsxs("div",{className:"flex flex-row items-center gap-x-8 m-auto",children:[M.jsx("div",{children:M.jsx("h1",{className:"text-4xl text-bold font-sans antialiased text-blue-700 tracking-wide",children:"fs-tracer"})}),M.jsx("div",{className:"block max-w-sm p-6 bg-white border border-gray-200 rounded-lg shadow",children:M.jsxs("div",{className:"mx-7 my-5",children:[M.jsx("h5",{className:"mb-2 text-2xl font-bold font-sans antialiased text-gray-900",children:"Hello!"}),M.jsxs("div",{className:"flex flex-row items-center gap-2",children:[M.jsx("span",{className:"font-normal text-gray-700",children:"Continue with"}),M.jsx("span",{children:M.jsx(gG,{clientId:"952965459060-nrnrsdoq22mf646vfa72hk410pvdda5q.apps.googleusercontent.com",children:M.jsx($G,{onSuccess:async n=>{await e.supabase.auth.signInWithIdToken({provider:"google",token:n.credential})},onError:()=>{console.log("Login Failed")},width:7777,size:"large",type:"icon"})})})]})]})})]})})})}function wG(e){const t=Rs();return y.useEffect(()=>{(async()=>{await e.supabase.auth.signOut()})(),t("/login")},[e.session]),M.jsx(M.Fragment,{})}function DR(e){return M.jsx("a",{href:`/file/${encodeURIComponent(e.file.id)}`,children:M.jsxs("p",{className:"underline",children:["file: ",e.file.absolute_path]})})}function DG(e){const t=Rs(),n=20,[r,i]=y.useState([]),[a,s]=y.useState(0);y.useEffect(()=>{e.session||t("/login")},[e.session]);const o=y.useCallback(async()=>{console.log("FETCHIN FILES, pagination: ",a);const{data:l,error:u}=await e.supabase.from("file").select().order("timestamp",{ascending:!1}).range(a,a+n-1);if(u){console.error(u);return}console.log("RAW FILES: ",l),i(l.map(c=>c)),console.log("FETCHED FILES")},[e.supabase,a]);return y.useEffect(()=>{console.log("Aaa"),o()},[a]),M.jsx(M.Fragment,{children:M.jsxs("div",{className:"flex h-screen",children:[M.jsx(Vf,{currentPage:"Recent"}),M.jsxs("main",{className:"flex-1 overflow-y-auto my-4",children:[M.jsx("div",{className:"flex flex-col items-center",children:M.jsx("div",{className:"flex flex-col gap-2",children:r.map(l=>M.jsx("div",{role:"button",children:M.jsx(DR,{file:l})},l.id))})}),M.jsxs("div",{className:"flex flex-row gap-2 mt-4",children:[M.jsx("button",{className:"ml-7 bg-blue-500 hover:bg-blue-700 text-white font-bold py-2 px-4 rounded",onClick:()=>s(a+-n),children:"prev"}),M.jsx("button",{className:"mr-7 ml-auto bg-blue-500 hover:bg-blue-700 text-white font-bold py-2 px-4 rounded",onClick:()=>s(a+n),children:"next"})]})]})]})})}function _G(e){const t=Rs();let{fileID:n}=TA();console.log("FILEID: ",n);const[r,i]=y.useState([]),[a,s]=y.useState(),o=20;y.useEffect(()=>{e.session||t("/login")},[e.session]);const l=y.useCallback(async()=>{console.log("FETCHING FILE");const{data:c,error:d}=await e.supabase.from("file").select().eq("id",n);if(d){console.error(d);return}if(c.length===0)return;let f=c[0];s(f),console.log("FETCHIN FILES",JSON.stringify(f));const{data:h,error:p}=await e.supabase.from("file").select().eq("absolute_path",f.absolute_path).order("timestamp",{ascending:!1}).range(0,o);if(p){console.error(p);return}console.log("RAW FILES: ",h),i(h.map(g=>g)),console.log("FETCHED FILES")},[e.supabase]);y.useEffect(()=>{l()},[e.supabase]);const u=c=>{const d=c.split("/");return d[d.length-1]};return M.jsx(M.Fragment,{children:M.jsxs("div",{className:"flex h-screen",children:[M.jsx(Vf,{}),M.jsx("main",{className:"flex-1 overflow-y-auto my-4",children:n&&a!==void 0?M.jsxs(M.Fragment,{children:[M.jsx("div",{className:"flex flex-col items-center",children:u(a.absolute_path)}),M.jsx("div",{className:"mt-5 flex flex-col items-center",children:M.jsx("div",{className:"block border rounded shadowpy-5 px-5 bg-blue",children:M.jsx(EG,{file:a})})}),M.jsx("div",{className:"mt-5 flex flex-col items-center",children:M.jsx("div",{className:"block border rounded shadow py-5 px-5 bg-blue",children:r.map(c=>M.jsx("div",{children:M.jsxs("p",{children:[c.absolute_path," - ",c.timestamp," ",c.id===a.id&&"*"]})},c.id))})})]}):M.jsx(M.Fragment,{children:M.jsx("div",{className:"flex flex-col items-center",children:M.jsx("p",{children:"File not found"})})})})]})})}function EG(e){return M.jsxs(M.Fragment,{children:[M.jsxs("p",{children:["Absolute path: ",e.file.absolute_path]}),M.jsxs("p",{children:["Timestamp: ",e.file.timestamp]}),M.jsxs("p",{children:["Content: ",e.file.contents]}),M.jsxs("p",{children:["ID: ",e.file.id]})]})}function _R(e,t){window.dispatchEvent(new StorageEvent("storage",{key:e,newValue:t}))}const gw=(e,t)=>{const n=JSON.stringify(t);window.localStorage.setItem(e,n),_R(e,n)},SG=e=>{window.localStorage.removeItem(e),_R(e,null)},vw=e=>window.localStorage.getItem(e),CG=e=>(window.addEventListener("storage",e),()=>window.removeEventListener("storage",e)),kG=()=>{throw Error("useLocalStorage is a client-only hook")};function PG(e,t){const n=()=>vw(e),r=y.useSyncExternalStore(CG,n,kG),i=y.useCallback(a=>{try{const s=typeof a=="function"?a(JSON.parse(r)):a;s==null?SG(e):gw(e,s)}catch(s){console.warn(s)}},[e,r]);return y.useEffect(()=>{vw(e)===null&&typeof t<"u"&&gw(e,t)},[e,t]),[r?JSON.parse(r):t,i]}function TG(e){const t=Rs(),n=20,[r,i]=y.useState([]),[a,s]=y.useState(""),[o,l]=y.useState(0);y.useEffect(()=>{e.session||t("/login")},[e.session]);const u=y.useCallback(async()=>{console.log("FETCHIN FILES, pagination: ",o," search: ",a);const{data:c,error:d}=await e.supabase.from("file").select().ilike("absolute_path",`%${a}%`).order("timestamp",{ascending:!1}).range(o,o+n-1);if(d){console.error(d);return}console.log("RAW FILES: ",c),i(c.map(f=>f)),console.log("FETCHED FILES")},[e.supabase,o,a]);return y.useEffect(()=>{u()},[o]),M.jsx(M.Fragment,{children:M.jsxs("div",{className:"flex h-screen",children:[M.jsx(Vf,{currentPage:"Recent"}),M.jsxs("main",{className:"flex-1 overflow-y-auto my-4",children:[M.jsxs("div",{className:"flex flex-col items-center",children:[M.jsx("label",{children:"filename"}),M.jsx("input",{placeholder:"filename",onChange:c=>s(c.target.value),className:"block bg-white w-1/2 rounded"})]}),M.jsx("div",{className:"my-4 flex flex-col items-center",children:M.jsx("button",{className:"w-20 bg-blue-500 hover:bg-blue-700 text-white font-bold py-2 px-4 rounded",onClick:()=>u(),children:"search"})}),M.jsx("div",{className:"flex flex-col items-center",children:M.jsx("div",{className:"flex flex-col gap-2",children:r.map(c=>M.jsx("div",{role:"button",children:M.jsx(DR,{file:c})},c.id))})}),M.jsxs("div",{className:"flex flex-row gap-2 mt-4",children:[M.jsx("button",{className:"ml-7 bg-blue-500 hover:bg-blue-700 text-white font-bold py-2 px-4 rounded",onClick:()=>l(o+-n),children:"prev"}),M.jsx("button",{className:"mr-7 ml-auto bg-blue-500 hover:bg-blue-700 text-white font-bold py-2 px-4 rounded",onClick:()=>l(o+n),children:"next"})]})]})]})})}const Fa=qB("https://slpoocycjgqsuoedhkbn.supabase.co","eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6InNscG9vY3ljamdxc3VvZWRoa2JuIiwicm9sZSI6ImFub24iLCJpYXQiOjE3MTUyMDU0MjUsImV4cCI6MjAzMDc4MTQyNX0.xZYRTRN65rlms1Hb96IBAQvw3EGtMzUxlGPP5TVey34");function RG(){const[e,t]=PG("session",null),n=Il(Pf()),[r,i]=y.useState({start:n.subtract({days:7}),end:n});return M.jsx(M.Fragment,{children:M.jsx(oC,{theme:qV,children:M.jsx(YA,{basename:"/fs-tracer-frontend",children:M.jsxs(UA,{children:[M.jsx(Mr,{index:!0,element:M.jsx(pG,{supabase:Fa,session:e,timeframe:r,setTimeframe:i})}),M.jsx(Mr,{path:"/recent",element:M.jsx(DG,{supabase:Fa,session:e,timeframe:r,setTimeframe:i})}),M.jsx(Mr,{path:"/search",element:M.jsx(TG,{supabase:Fa,session:e,timeframe:r,setTimeframe:i})}),M.jsx(Mr,{path:"/login",element:M.jsx(xG,{supabase:Fa,session:e,setSession:t,timeframe:r,setTimeframe:i})}),M.jsx(Mr,{path:"/logout",element:M.jsx(wG,{supabase:Fa,session:e,setSession:t,timeframe:r,setTimeframe:i})}),M.jsx(Mr,{path:"/file/:fileID",element:M.jsx(_G,{supabase:Fa,session:e,setSession:t})}),M.jsx(Mr,{path:"*",element:M.jsx("p",{children:"notfound"})})]})})})})}_p.createRoot(document.getElementById("root")).render(M.jsx(_.StrictMode,{children:M.jsx(RG,{})}));export{bw as g}; +`):e}function xY(e,t){const{element:n,datasetIndex:r,index:i}=t,a=e.getDatasetMeta(r).controller,{label:s,value:o}=a.getLabelAndValue(i);return{chart:e,label:s,parsed:a.getParsed(i),raw:e.data.datasets[r].data[i],formattedValue:o,dataset:a.getDataset(),dataIndex:i,datasetIndex:r,element:n}}function q6(e,t){const n=e.chart.ctx,{body:r,footer:i,title:a}=e,{boxWidth:s,boxHeight:o}=t,l=it(t.bodyFont),u=it(t.titleFont),c=it(t.footerFont),d=a.length,f=i.length,h=r.length,p=Pt(t.padding);let g=p.height,b=0,v=r.reduce((w,D)=>w+D.before.length+D.lines.length+D.after.length,0);if(v+=e.beforeBody.length+e.afterBody.length,d&&(g+=d*u.lineHeight+(d-1)*t.titleSpacing+t.titleMarginBottom),v){const w=t.displayColors?Math.max(o,l.lineHeight):l.lineHeight;g+=h*w+(v-h)*l.lineHeight+(v-1)*t.bodySpacing}f&&(g+=t.footerMarginTop+f*c.lineHeight+(f-1)*t.footerSpacing);let m=0;const $=function(w){b=Math.max(b,n.measureText(w).width+m)};return n.save(),n.font=u.string,me(e.title,$),n.font=l.string,me(e.beforeBody.concat(e.afterBody),$),m=t.displayColors?s+2+t.boxPadding:0,me(r,w=>{me(w.before,$),me(w.lines,$),me(w.after,$)}),m=0,n.font=c.string,me(e.footer,$),n.restore(),b+=p.width,{width:b,height:g}}function wY(e,t){const{y:n,height:r}=t;return n<r/2?"top":n>e.height-r/2?"bottom":"center"}function DY(e,t,n,r){const{x:i,width:a}=r,s=n.caretSize+n.caretPadding;if(e==="left"&&i+a+s>t.width||e==="right"&&i-a-s<0)return!0}function _Y(e,t,n,r){const{x:i,width:a}=n,{width:s,chartArea:{left:o,right:l}}=e;let u="center";return r==="center"?u=i<=(o+l)/2?"left":"right":i<=a/2?u="left":i>=s-a/2&&(u="right"),DY(u,e,t,n)&&(u="center"),u}function G6(e,t,n){const r=n.yAlign||t.yAlign||wY(e,n);return{xAlign:n.xAlign||t.xAlign||_Y(e,t,n,r),yAlign:r}}function EY(e,t){let{x:n,width:r}=e;return t==="right"?n-=r:t==="center"&&(n-=r/2),n}function SY(e,t,n){let{y:r,height:i}=e;return t==="top"?r+=n:t==="bottom"?r-=i+n:r-=i/2,r}function Z6(e,t,n,r){const{caretSize:i,caretPadding:a,cornerRadius:s}=e,{xAlign:o,yAlign:l}=n,u=i+a,{topLeft:c,topRight:d,bottomLeft:f,bottomRight:h}=Gi(s);let p=EY(t,o);const g=SY(t,l,u);return l==="center"?o==="left"?p+=u:o==="right"&&(p-=u):o==="left"?p-=Math.max(c,f)+i:o==="right"&&(p+=Math.max(d,h)+i),{x:dt(p,0,r.width-t.width),y:dt(g,0,r.height-t.height)}}function zu(e,t,n){const r=Pt(n.padding);return t==="center"?e.x+e.width/2:t==="right"?e.x+e.width-r.right:e.x+r.left}function X6(e){return Wn([],sr(e))}function CY(e,t,n){return yi(e,{tooltip:t,tooltipItems:n,type:"tooltip"})}function Q6(e,t){const n=t&&t.dataset&&t.dataset.tooltip&&t.dataset.tooltip.callbacks;return n?e.override(n):e}const dR={beforeTitle:ir,title(e){if(e.length>0){const t=e[0],n=t.chart.data.labels,r=n?n.length:0;if(this&&this.options&&this.options.mode==="dataset")return t.dataset.label||"";if(t.label)return t.label;if(r>0&&t.dataIndex<r)return n[t.dataIndex]}return""},afterTitle:ir,beforeBody:ir,beforeLabel:ir,label(e){if(this&&this.options&&this.options.mode==="dataset")return e.label+": "+e.formattedValue||e.formattedValue;let t=e.dataset.label||"";t&&(t+=": ");const n=e.formattedValue;return ce(n)||(t+=n),t},labelColor(e){const n=e.chart.getDatasetMeta(e.datasetIndex).controller.getStyle(e.dataIndex);return{borderColor:n.borderColor,backgroundColor:n.backgroundColor,borderWidth:n.borderWidth,borderDash:n.borderDash,borderDashOffset:n.borderDashOffset,borderRadius:0}},labelTextColor(){return this.options.bodyColor},labelPointStyle(e){const n=e.chart.getDatasetMeta(e.datasetIndex).controller.getStyle(e.dataIndex);return{pointStyle:n.pointStyle,rotation:n.rotation}},afterLabel:ir,afterBody:ir,beforeFooter:ir,footer:ir,afterFooter:ir};function jt(e,t,n,r){const i=e[t].call(n,r);return typeof i>"u"?dR[t].call(n,r):i}class n3 extends Cr{constructor(t){super(),this.opacity=0,this._active=[],this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.chart=t.chart,this.options=t.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(t){this.options=t,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const t=this._cachedAnimations;if(t)return t;const n=this.chart,r=this.options.setContext(this.getContext()),i=r.enabled&&n.options.animation&&r.animations,a=new UT(this.chart,i);return i._cacheable&&(this._cachedAnimations=Object.freeze(a)),a}getContext(){return this.$context||(this.$context=CY(this.chart.getContext(),this,this._tooltipItems))}getTitle(t,n){const{callbacks:r}=n,i=jt(r,"beforeTitle",this,t),a=jt(r,"title",this,t),s=jt(r,"afterTitle",this,t);let o=[];return o=Wn(o,sr(i)),o=Wn(o,sr(a)),o=Wn(o,sr(s)),o}getBeforeBody(t,n){return X6(jt(n.callbacks,"beforeBody",this,t))}getBody(t,n){const{callbacks:r}=n,i=[];return me(t,a=>{const s={before:[],lines:[],after:[]},o=Q6(r,a);Wn(s.before,sr(jt(o,"beforeLabel",this,a))),Wn(s.lines,jt(o,"label",this,a)),Wn(s.after,sr(jt(o,"afterLabel",this,a))),i.push(s)}),i}getAfterBody(t,n){return X6(jt(n.callbacks,"afterBody",this,t))}getFooter(t,n){const{callbacks:r}=n,i=jt(r,"beforeFooter",this,t),a=jt(r,"footer",this,t),s=jt(r,"afterFooter",this,t);let o=[];return o=Wn(o,sr(i)),o=Wn(o,sr(a)),o=Wn(o,sr(s)),o}_createItems(t){const n=this._active,r=this.chart.data,i=[],a=[],s=[];let o=[],l,u;for(l=0,u=n.length;l<u;++l)o.push(xY(this.chart,n[l]));return t.filter&&(o=o.filter((c,d,f)=>t.filter(c,d,f,r))),t.itemSort&&(o=o.sort((c,d)=>t.itemSort(c,d,r))),me(o,c=>{const d=Q6(t.callbacks,c);i.push(jt(d,"labelColor",this,c)),a.push(jt(d,"labelPointStyle",this,c)),s.push(jt(d,"labelTextColor",this,c))}),this.labelColors=i,this.labelPointStyles=a,this.labelTextColors=s,this.dataPoints=o,o}update(t,n){const r=this.options.setContext(this.getContext()),i=this._active;let a,s=[];if(!i.length)this.opacity!==0&&(a={opacity:0});else{const o=wo[r.position].call(this,i,this._eventPosition);s=this._createItems(r),this.title=this.getTitle(s,r),this.beforeBody=this.getBeforeBody(s,r),this.body=this.getBody(s,r),this.afterBody=this.getAfterBody(s,r),this.footer=this.getFooter(s,r);const l=this._size=q6(this,r),u=Object.assign({},o,l),c=G6(this.chart,r,u),d=Z6(r,u,c,this.chart);this.xAlign=c.xAlign,this.yAlign=c.yAlign,a={opacity:1,x:d.x,y:d.y,width:l.width,height:l.height,caretX:o.x,caretY:o.y}}this._tooltipItems=s,this.$context=void 0,a&&this._resolveAnimations().update(this,a),t&&r.external&&r.external.call(this,{chart:this.chart,tooltip:this,replay:n})}drawCaret(t,n,r,i){const a=this.getCaretPosition(t,r,i);n.lineTo(a.x1,a.y1),n.lineTo(a.x2,a.y2),n.lineTo(a.x3,a.y3)}getCaretPosition(t,n,r){const{xAlign:i,yAlign:a}=this,{caretSize:s,cornerRadius:o}=r,{topLeft:l,topRight:u,bottomLeft:c,bottomRight:d}=Gi(o),{x:f,y:h}=t,{width:p,height:g}=n;let b,v,m,$,w,D;return a==="center"?(w=h+g/2,i==="left"?(b=f,v=b-s,$=w+s,D=w-s):(b=f+p,v=b+s,$=w-s,D=w+s),m=b):(i==="left"?v=f+Math.max(l,c)+s:i==="right"?v=f+p-Math.max(u,d)-s:v=this.caretX,a==="top"?($=h,w=$-s,b=v-s,m=v+s):($=h+g,w=$+s,b=v+s,m=v-s),D=$),{x1:b,x2:v,x3:m,y1:$,y2:w,y3:D}}drawTitle(t,n,r){const i=this.title,a=i.length;let s,o,l;if(a){const u=cs(r.rtl,this.x,this.width);for(t.x=zu(this,r.titleAlign,r),n.textAlign=u.textAlign(r.titleAlign),n.textBaseline="middle",s=it(r.titleFont),o=r.titleSpacing,n.fillStyle=r.titleColor,n.font=s.string,l=0;l<a;++l)n.fillText(i[l],u.x(t.x),t.y+s.lineHeight/2),t.y+=s.lineHeight+o,l+1===a&&(t.y+=r.titleMarginBottom-o)}}_drawColorBox(t,n,r,i,a){const s=this.labelColors[r],o=this.labelPointStyles[r],{boxHeight:l,boxWidth:u}=a,c=it(a.bodyFont),d=zu(this,"left",a),f=i.x(d),h=l<c.lineHeight?(c.lineHeight-l)/2:0,p=n.y+h;if(a.usePointStyle){const g={radius:Math.min(u,l)/2,pointStyle:o.pointStyle,rotation:o.rotation,borderWidth:1},b=i.leftForLtr(f,u)+u/2,v=p+l/2;t.strokeStyle=a.multiKeyBackground,t.fillStyle=a.multiKeyBackground,Gy(t,g,b,v),t.strokeStyle=s.borderColor,t.fillStyle=s.backgroundColor,Gy(t,g,b,v)}else{t.lineWidth=ae(s.borderWidth)?Math.max(...Object.values(s.borderWidth)):s.borderWidth||1,t.strokeStyle=s.borderColor,t.setLineDash(s.borderDash||[]),t.lineDashOffset=s.borderDashOffset||0;const g=i.leftForLtr(f,u),b=i.leftForLtr(i.xPlus(f,1),u-2),v=Gi(s.borderRadius);Object.values(v).some(m=>m!==0)?(t.beginPath(),t.fillStyle=a.multiKeyBackground,wl(t,{x:g,y:p,w:u,h:l,radius:v}),t.fill(),t.stroke(),t.fillStyle=s.backgroundColor,t.beginPath(),wl(t,{x:b,y:p+1,w:u-2,h:l-2,radius:v}),t.fill()):(t.fillStyle=a.multiKeyBackground,t.fillRect(g,p,u,l),t.strokeRect(g,p,u,l),t.fillStyle=s.backgroundColor,t.fillRect(b,p+1,u-2,l-2))}t.fillStyle=this.labelTextColors[r]}drawBody(t,n,r){const{body:i}=this,{bodySpacing:a,bodyAlign:s,displayColors:o,boxHeight:l,boxWidth:u,boxPadding:c}=r,d=it(r.bodyFont);let f=d.lineHeight,h=0;const p=cs(r.rtl,this.x,this.width),g=function(x){n.fillText(x,p.x(t.x+h),t.y+f/2),t.y+=f+a},b=p.textAlign(s);let v,m,$,w,D,S,k;for(n.textAlign=s,n.textBaseline="middle",n.font=d.string,t.x=zu(this,b,r),n.fillStyle=r.bodyColor,me(this.beforeBody,g),h=o&&b!=="right"?s==="center"?u/2+c:u+2+c:0,w=0,S=i.length;w<S;++w){for(v=i[w],m=this.labelTextColors[w],n.fillStyle=m,me(v.before,g),$=v.lines,o&&$.length&&(this._drawColorBox(n,t,w,p,r),f=Math.max(d.lineHeight,l)),D=0,k=$.length;D<k;++D)g($[D]),f=d.lineHeight;me(v.after,g)}h=0,f=d.lineHeight,me(this.afterBody,g),t.y-=a}drawFooter(t,n,r){const i=this.footer,a=i.length;let s,o;if(a){const l=cs(r.rtl,this.x,this.width);for(t.x=zu(this,r.footerAlign,r),t.y+=r.footerMarginTop,n.textAlign=l.textAlign(r.footerAlign),n.textBaseline="middle",s=it(r.footerFont),n.fillStyle=r.footerColor,n.font=s.string,o=0;o<a;++o)n.fillText(i[o],l.x(t.x),t.y+s.lineHeight/2),t.y+=s.lineHeight+r.footerSpacing}}drawBackground(t,n,r,i){const{xAlign:a,yAlign:s}=this,{x:o,y:l}=t,{width:u,height:c}=r,{topLeft:d,topRight:f,bottomLeft:h,bottomRight:p}=Gi(i.cornerRadius);n.fillStyle=i.backgroundColor,n.strokeStyle=i.borderColor,n.lineWidth=i.borderWidth,n.beginPath(),n.moveTo(o+d,l),s==="top"&&this.drawCaret(t,n,r,i),n.lineTo(o+u-f,l),n.quadraticCurveTo(o+u,l,o+u,l+f),s==="center"&&a==="right"&&this.drawCaret(t,n,r,i),n.lineTo(o+u,l+c-p),n.quadraticCurveTo(o+u,l+c,o+u-p,l+c),s==="bottom"&&this.drawCaret(t,n,r,i),n.lineTo(o+h,l+c),n.quadraticCurveTo(o,l+c,o,l+c-h),s==="center"&&a==="left"&&this.drawCaret(t,n,r,i),n.lineTo(o,l+d),n.quadraticCurveTo(o,l,o+d,l),n.closePath(),n.fill(),i.borderWidth>0&&n.stroke()}_updateAnimationTarget(t){const n=this.chart,r=this.$animations,i=r&&r.x,a=r&&r.y;if(i||a){const s=wo[t.position].call(this,this._active,this._eventPosition);if(!s)return;const o=this._size=q6(this,t),l=Object.assign({},s,this._size),u=G6(n,t,l),c=Z6(t,l,u,n);(i._to!==c.x||a._to!==c.y)&&(this.xAlign=u.xAlign,this.yAlign=u.yAlign,this.width=o.width,this.height=o.height,this.caretX=s.x,this.caretY=s.y,this._resolveAnimations().update(this,c))}}_willRender(){return!!this.opacity}draw(t){const n=this.options.setContext(this.getContext());let r=this.opacity;if(!r)return;this._updateAnimationTarget(n);const i={width:this.width,height:this.height},a={x:this.x,y:this.y};r=Math.abs(r)<.001?0:r;const s=Pt(n.padding),o=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;n.enabled&&o&&(t.save(),t.globalAlpha=r,this.drawBackground(a,t,i,n),NT(t,n.textDirection),a.y+=s.top,this.drawTitle(a,t,n),this.drawBody(a,t,n),this.drawFooter(a,t,n),jT(t,n.textDirection),t.restore())}getActiveElements(){return this._active||[]}setActiveElements(t,n){const r=this._active,i=t.map(({datasetIndex:o,index:l})=>{const u=this.chart.getDatasetMeta(o);if(!u)throw new Error("Cannot find a dataset at index "+o);return{datasetIndex:o,element:u.data[l],index:l}}),a=!Wd(r,i),s=this._positionChanged(i,n);(a||s)&&(this._active=i,this._eventPosition=n,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(t,n,r=!0){if(n&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const i=this.options,a=this._active||[],s=this._getActiveElements(t,a,n,r),o=this._positionChanged(s,t),l=n||!Wd(s,a)||o;return l&&(this._active=s,(i.enabled||i.external)&&(this._eventPosition={x:t.x,y:t.y},this.update(!0,n))),l}_getActiveElements(t,n,r,i){const a=this.options;if(t.type==="mouseout")return[];if(!i)return n.filter(o=>this.chart.data.datasets[o.datasetIndex]&&this.chart.getDatasetMeta(o.datasetIndex).controller.getParsed(o.index)!==void 0);const s=this.chart.getElementsAtEventForMode(t,a.mode,a,r);return a.reverse&&s.reverse(),s}_positionChanged(t,n){const{caretX:r,caretY:i,options:a}=this,s=wo[a.position].call(this,t,n);return s!==!1&&(r!==s.x||i!==s.y)}}j(n3,"positioners",wo);var G$={id:"tooltip",_element:n3,positioners:wo,afterInit(e,t,n){n&&(e.tooltip=new n3({chart:e,options:n}))},beforeUpdate(e,t,n){e.tooltip&&e.tooltip.initialize(n)},reset(e,t,n){e.tooltip&&e.tooltip.initialize(n)},afterDraw(e){const t=e.tooltip;if(t&&t._willRender()){const n={tooltip:t};if(e.notifyPlugins("beforeTooltipDraw",{...n,cancelable:!0})===!1)return;t.draw(e.ctx),e.notifyPlugins("afterTooltipDraw",n)}},afterEvent(e,t){if(e.tooltip){const n=t.replay;e.tooltip.handleEvent(t.event,n,t.inChartArea)&&(t.changed=!0)}},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(e,t)=>t.bodyFont.size,boxWidth:(e,t)=>t.bodyFont.size,multiKeyBackground:"#fff",displayColors:!0,boxPadding:0,borderColor:"rgba(0,0,0,0)",borderWidth:0,animation:{duration:400,easing:"easeOutQuart"},animations:{numbers:{type:"number",properties:["x","y","width","height","caretX","caretY"]},opacity:{easing:"linear",duration:200}},callbacks:dR},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:e=>e!=="filter"&&e!=="itemSort"&&e!=="external",_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]},kY=Object.freeze({__proto__:null,Colors:zK,Decimation:HK,Filler:dY,Legend:vY,SubTitle:$Y,Title:yY,Tooltip:G$});const PY=(e,t,n,r)=>(typeof t=="string"?(n=e.push(t)-1,r.unshift({index:n,label:t})):isNaN(t)&&(n=null),n);function TY(e,t,n,r){const i=e.indexOf(t);if(i===-1)return PY(e,t,n,r);const a=e.lastIndexOf(t);return i!==a?n:i}const RY=(e,t)=>e===null?null:dt(Math.round(e),0,t);function J6(e){const t=this.getLabels();return e>=0&&e<t.length?t[e]:e}class _l extends $a{constructor(t){super(t),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(t){const n=this._addedLabels;if(n.length){const r=this.getLabels();for(const{index:i,label:a}of n)r[i]===a&&r.splice(i,1);this._addedLabels=[]}super.init(t)}parse(t,n){if(ce(t))return null;const r=this.getLabels();return n=isFinite(n)&&r[n]===t?n:TY(r,t,J(n,t),this._addedLabels),RY(n,r.length-1)}determineDataLimits(){const{minDefined:t,maxDefined:n}=this.getUserBounds();let{min:r,max:i}=this.getMinMax(!0);this.options.bounds==="ticks"&&(t||(r=0),n||(i=this.getLabels().length-1)),this.min=r,this.max=i}buildTicks(){const t=this.min,n=this.max,r=this.options.offset,i=[];let a=this.getLabels();a=t===0&&n===a.length-1?a:a.slice(t,n+1),this._valueRange=Math.max(a.length-(r?0:1),1),this._startValue=this.min-(r?.5:0);for(let s=t;s<=n;s++)i.push({value:s});return i}getLabelForValue(t){return J6.call(this,t)}configure(){super.configure(),this.isHorizontal()||(this._reversePixels=!this._reversePixels)}getPixelForValue(t){return typeof t!="number"&&(t=this.parse(t)),t===null?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getPixelForTick(t){const n=this.ticks;return t<0||t>n.length-1?null:this.getPixelForValue(n[t].value)}getValueForPixel(t){return Math.round(this._startValue+this.getDecimalForPixel(t)*this._valueRange)}getBasePixel(){return this.bottom}}j(_l,"id","category"),j(_l,"defaults",{ticks:{callback:J6}});function MY(e,t){const n=[],{bounds:i,step:a,min:s,max:o,precision:l,count:u,maxTicks:c,maxDigits:d,includeBounds:f}=e,h=a||1,p=c-1,{min:g,max:b}=t,v=!ce(s),m=!ce(o),$=!ce(u),w=(b-g)/(d+1);let D=Y5((b-g)/p/h)*h,S,k,x,T;if(D<1e-14&&!v&&!m)return[{value:g},{value:b}];T=Math.ceil(b/D)-Math.floor(g/D),T>p&&(D=Y5(T*D/p/h)*h),ce(l)||(S=Math.pow(10,l),D=Math.ceil(D*S)/S),i==="ticks"?(k=Math.floor(g/D)*D,x=Math.ceil(b/D)*D):(k=g,x=b),v&&m&&a&&CW((o-s)/a,D/1e3)?(T=Math.round(Math.min((o-s)/D,c)),D=(o-s)/T,k=s,x=o):$?(k=v?s:k,x=m?o:x,T=u-1,D=(x-k)/T):(T=(x-k)/D,No(T,Math.round(T),D/1e3)?T=Math.round(T):T=Math.ceil(T));const P=Math.max(q5(D),q5(k));S=Math.pow(10,ce(l)?P:l),k=Math.round(k*S)/S,x=Math.round(x*S)/S;let E=0;for(v&&(f&&k!==s?(n.push({value:s}),k<s&&E++,No(Math.round((k+E*D)*S)/S,s,ew(s,w,e))&&E++):k<s&&E++);E<T;++E){const A=Math.round((k+E*D)*S)/S;if(m&&A>o)break;n.push({value:A})}return m&&f&&x!==o?n.length&&No(n[n.length-1].value,o,ew(o,w,e))?n[n.length-1].value=o:n.push({value:o}):(!m||x===o)&&n.push({value:x}),n}function ew(e,t,{horizontal:n,minRotation:r}){const i=An(r),a=(n?Math.sin(i):Math.cos(i))||.001,s=.75*t*(""+e).length;return Math.min(t/a,s)}class Zd extends $a{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(t,n){return ce(t)||(typeof t=="number"||t instanceof Number)&&!isFinite(+t)?null:+t}handleTickRangeOptions(){const{beginAtZero:t}=this.options,{minDefined:n,maxDefined:r}=this.getUserBounds();let{min:i,max:a}=this;const s=l=>i=n?i:l,o=l=>a=r?a:l;if(t){const l=Zn(i),u=Zn(a);l<0&&u<0?o(0):l>0&&u>0&&s(0)}if(i===a){let l=a===0?1:Math.abs(a*.05);o(a+l),t||s(i-l)}this.min=i,this.max=a}getTickLimit(){const t=this.options.ticks;let{maxTicksLimit:n,stepSize:r}=t,i;return r?(i=Math.ceil(this.max/r)-Math.floor(this.min/r)+1,i>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${r} would result generating up to ${i} ticks. Limiting to 1000.`),i=1e3)):(i=this.computeTickLimit(),n=n||11),n&&(i=Math.min(n,i)),i}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const t=this.options,n=t.ticks;let r=this.getTickLimit();r=Math.max(2,r);const i={maxTicks:r,bounds:t.bounds,min:t.min,max:t.max,precision:n.precision,step:n.stepSize,count:n.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:n.minRotation||0,includeBounds:n.includeBounds!==!1},a=this._range||this,s=MY(i,a);return t.bounds==="ticks"&&wT(s,this,"value"),t.reverse?(s.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),s}configure(){const t=this.ticks;let n=this.min,r=this.max;if(super.configure(),this.options.offset&&t.length){const i=(r-n)/Math.max(t.length-1,1)/2;n-=i,r+=i}this._startValue=n,this._endValue=r,this._valueRange=r-n}getLabelForValue(t){return Ul(t,this.chart.options.locale,this.options.ticks.format)}}class El extends Zd{determineDataLimits(){const{min:t,max:n}=this.getMinMax(!0);this.min=Ve(t)?t:0,this.max=Ve(n)?n:1,this.handleTickRangeOptions()}computeTickLimit(){const t=this.isHorizontal(),n=t?this.width:this.height,r=An(this.options.ticks.minRotation),i=(t?Math.sin(r):Math.cos(r))||.001,a=this._resolveTickFontOptions(0);return Math.ceil(n/Math.min(40,a.lineHeight/i))}getPixelForValue(t){return t===null?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getValueForPixel(t){return this._startValue+this.getDecimalForPixel(t)*this._valueRange}}j(El,"id","linear"),j(El,"defaults",{ticks:{callback:Wf.formatters.numeric}});const Sl=e=>Math.floor(qr(e)),Ci=(e,t)=>Math.pow(10,Sl(e)+t);function tw(e){return e/Math.pow(10,Sl(e))===1}function nw(e,t,n){const r=Math.pow(10,n),i=Math.floor(e/r);return Math.ceil(t/r)-i}function FY(e,t){const n=t-e;let r=Sl(n);for(;nw(e,t,r)>10;)r++;for(;nw(e,t,r)<10;)r--;return Math.min(r,Sl(e))}function AY(e,{min:t,max:n}){t=en(e.min,t);const r=[],i=Sl(t);let a=FY(t,n),s=a<0?Math.pow(10,Math.abs(a)):1;const o=Math.pow(10,a),l=i>a?Math.pow(10,i):0,u=Math.round((t-l)*s)/s,c=Math.floor((t-l)/o/10)*o*10;let d=Math.floor((u-c)/Math.pow(10,a)),f=en(e.min,Math.round((l+c+d*Math.pow(10,a))*s)/s);for(;f<n;)r.push({value:f,major:tw(f),significand:d}),d>=10?d=d<15?15:20:d++,d>=20&&(a++,d=2,s=a>=0?1:s),f=Math.round((l+c+d*Math.pow(10,a))*s)/s;const h=en(e.max,f);return r.push({value:h,major:tw(h),significand:d}),r}class r3 extends $a{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0}parse(t,n){const r=Zd.prototype.parse.apply(this,[t,n]);if(r===0){this._zero=!0;return}return Ve(r)&&r>0?r:null}determineDataLimits(){const{min:t,max:n}=this.getMinMax(!0);this.min=Ve(t)?Math.max(0,t):null,this.max=Ve(n)?Math.max(0,n):null,this.options.beginAtZero&&(this._zero=!0),this._zero&&this.min!==this._suggestedMin&&!Ve(this._userMin)&&(this.min=t===Ci(this.min,0)?Ci(this.min,-1):Ci(this.min,0)),this.handleTickRangeOptions()}handleTickRangeOptions(){const{minDefined:t,maxDefined:n}=this.getUserBounds();let r=this.min,i=this.max;const a=o=>r=t?r:o,s=o=>i=n?i:o;r===i&&(r<=0?(a(1),s(10)):(a(Ci(r,-1)),s(Ci(i,1)))),r<=0&&a(Ci(i,-1)),i<=0&&s(Ci(r,1)),this.min=r,this.max=i}buildTicks(){const t=this.options,n={min:this._userMin,max:this._userMax},r=AY(n,this);return t.bounds==="ticks"&&wT(r,this,"value"),t.reverse?(r.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),r}getLabelForValue(t){return t===void 0?"0":Ul(t,this.chart.options.locale,this.options.ticks.format)}configure(){const t=this.min;super.configure(),this._startValue=qr(t),this._valueRange=qr(this.max)-qr(t)}getPixelForValue(t){return(t===void 0||t===0)&&(t=this.min),t===null||isNaN(t)?NaN:this.getPixelForDecimal(t===this.min?0:(qr(t)-this._startValue)/this._valueRange)}getValueForPixel(t){const n=this.getDecimalForPixel(t);return Math.pow(10,this._startValue+n*this._valueRange)}}j(r3,"id","logarithmic"),j(r3,"defaults",{ticks:{callback:Wf.formatters.logarithmic,major:{enabled:!0}}});function i3(e){const t=e.ticks;if(t.display&&e.display){const n=Pt(t.backdropPadding);return J(t.font&&t.font.size,We.font.size)+n.height}return 0}function OY(e,t,n){return n=Be(n)?n:[n],{w:UW(e,t.string,n),h:n.length*t.lineHeight}}function rw(e,t,n,r,i){return e===r||e===i?{start:t-n/2,end:t+n/2}:e<r||e>i?{start:t-n,end:t}:{start:t,end:t+n}}function BY(e){const t={l:e.left+e._padding.left,r:e.right-e._padding.right,t:e.top+e._padding.top,b:e.bottom-e._padding.bottom},n=Object.assign({},t),r=[],i=[],a=e._pointLabels.length,s=e.options.pointLabels,o=s.centerPointLabels?Me/a:0;for(let l=0;l<a;l++){const u=s.setContext(e.getPointLabelContext(l));i[l]=u.padding;const c=e.getPointPosition(l,e.drawingArea+i[l],o),d=it(u.font),f=OY(e.ctx,d,e._pointLabels[l]);r[l]=f;const h=nn(e.getIndexAngle(l)+o),p=Math.round(B$(h)),g=rw(p,c.x,f.w,0,180),b=rw(p,c.y,f.h,90,270);IY(n,t,h,g,b)}e.setCenterPoint(t.l-n.l,n.r-t.r,t.t-n.t,n.b-t.b),e._pointLabelItems=jY(e,r,i)}function IY(e,t,n,r,i){const a=Math.abs(Math.sin(n)),s=Math.abs(Math.cos(n));let o=0,l=0;r.start<t.l?(o=(t.l-r.start)/a,e.l=Math.min(e.l,t.l-o)):r.end>t.r&&(o=(r.end-t.r)/a,e.r=Math.max(e.r,t.r+o)),i.start<t.t?(l=(t.t-i.start)/s,e.t=Math.min(e.t,t.t-l)):i.end>t.b&&(l=(i.end-t.b)/s,e.b=Math.max(e.b,t.b+l))}function LY(e,t,n){const r=e.drawingArea,{extra:i,additionalAngle:a,padding:s,size:o}=n,l=e.getPointPosition(t,r+i+s,a),u=Math.round(B$(nn(l.angle+qe))),c=WY(l.y,o.h,u),d=zY(u),f=VY(l.x,o.w,d);return{visible:!0,x:l.x,y:c,textAlign:d,left:f,top:c,right:f+o.w,bottom:c+o.h}}function NY(e,t){if(!t)return!0;const{left:n,top:r,right:i,bottom:a}=e;return!(vr({x:n,y:r},t)||vr({x:n,y:a},t)||vr({x:i,y:r},t)||vr({x:i,y:a},t))}function jY(e,t,n){const r=[],i=e._pointLabels.length,a=e.options,{centerPointLabels:s,display:o}=a.pointLabels,l={extra:i3(a)/2,additionalAngle:s?Me/i:0};let u;for(let c=0;c<i;c++){l.padding=n[c],l.size=t[c];const d=LY(e,c,l);r.push(d),o==="auto"&&(d.visible=NY(d,u),d.visible&&(u=d))}return r}function zY(e){return e===0||e===180?"center":e<180?"left":"right"}function VY(e,t,n){return n==="right"?e-=t:n==="center"&&(e-=t/2),e}function WY(e,t,n){return n===90||n===270?e-=t/2:(n>270||n<90)&&(e-=t),e}function UY(e,t,n){const{left:r,top:i,right:a,bottom:s}=n,{backdropColor:o}=t;if(!ce(o)){const l=Gi(t.borderRadius),u=Pt(t.backdropPadding);e.fillStyle=o;const c=r-u.left,d=i-u.top,f=a-r+u.width,h=s-i+u.height;Object.values(l).some(p=>p!==0)?(e.beginPath(),wl(e,{x:c,y:d,w:f,h,radius:l}),e.fill()):e.fillRect(c,d,f,h)}}function HY(e,t){const{ctx:n,options:{pointLabels:r}}=e;for(let i=t-1;i>=0;i--){const a=e._pointLabelItems[i];if(!a.visible)continue;const s=r.setContext(e.getPointLabelContext(i));UY(n,s,a);const o=it(s.font),{x:l,y:u,textAlign:c}=a;la(n,e._pointLabels[i],l,u+o.lineHeight/2,o,{color:s.color,textAlign:c,textBaseline:"middle"})}}function fR(e,t,n,r){const{ctx:i}=e;if(n)i.arc(e.xCenter,e.yCenter,t,0,Te);else{let a=e.getPointPosition(0,t);i.moveTo(a.x,a.y);for(let s=1;s<r;s++)a=e.getPointPosition(s,t),i.lineTo(a.x,a.y)}}function KY(e,t,n,r,i){const a=e.ctx,s=t.circular,{color:o,lineWidth:l}=t;!s&&!r||!o||!l||n<0||(a.save(),a.strokeStyle=o,a.lineWidth=l,a.setLineDash(i.dash),a.lineDashOffset=i.dashOffset,a.beginPath(),fR(e,n,s,r),a.closePath(),a.stroke(),a.restore())}function YY(e,t,n){return yi(e,{label:n,index:t,type:"pointLabel"})}class Do extends Zd{constructor(t){super(t),this.xCenter=void 0,this.yCenter=void 0,this.drawingArea=void 0,this._pointLabels=[],this._pointLabelItems=[]}setDimensions(){const t=this._padding=Pt(i3(this.options)/2),n=this.width=this.maxWidth-t.width,r=this.height=this.maxHeight-t.height;this.xCenter=Math.floor(this.left+n/2+t.left),this.yCenter=Math.floor(this.top+r/2+t.top),this.drawingArea=Math.floor(Math.min(n,r)/2)}determineDataLimits(){const{min:t,max:n}=this.getMinMax(!1);this.min=Ve(t)&&!isNaN(t)?t:0,this.max=Ve(n)&&!isNaN(n)?n:0,this.handleTickRangeOptions()}computeTickLimit(){return Math.ceil(this.drawingArea/i3(this.options))}generateTickLabels(t){Zd.prototype.generateTickLabels.call(this,t),this._pointLabels=this.getLabels().map((n,r)=>{const i=De(this.options.pointLabels.callback,[n,r],this);return i||i===0?i:""}).filter((n,r)=>this.chart.getDataVisibility(r))}fit(){const t=this.options;t.display&&t.pointLabels.display?BY(this):this.setCenterPoint(0,0,0,0)}setCenterPoint(t,n,r,i){this.xCenter+=Math.floor((t-n)/2),this.yCenter+=Math.floor((r-i)/2),this.drawingArea-=Math.min(this.drawingArea/2,Math.max(t,n,r,i))}getIndexAngle(t){const n=Te/(this._pointLabels.length||1),r=this.options.startAngle||0;return nn(t*n+An(r))}getDistanceFromCenterForValue(t){if(ce(t))return NaN;const n=this.drawingArea/(this.max-this.min);return this.options.reverse?(this.max-t)*n:(t-this.min)*n}getValueForDistanceFromCenter(t){if(ce(t))return NaN;const n=t/(this.drawingArea/(this.max-this.min));return this.options.reverse?this.max-n:this.min+n}getPointLabelContext(t){const n=this._pointLabels||[];if(t>=0&&t<n.length){const r=n[t];return YY(this.getContext(),t,r)}}getPointPosition(t,n,r=0){const i=this.getIndexAngle(t)-qe+r;return{x:Math.cos(i)*n+this.xCenter,y:Math.sin(i)*n+this.yCenter,angle:i}}getPointPositionForValue(t,n){return this.getPointPosition(t,this.getDistanceFromCenterForValue(n))}getBasePosition(t){return this.getPointPositionForValue(t||0,this.getBaseValue())}getPointLabelPosition(t){const{left:n,top:r,right:i,bottom:a}=this._pointLabelItems[t];return{left:n,top:r,right:i,bottom:a}}drawBackground(){const{backgroundColor:t,grid:{circular:n}}=this.options;if(t){const r=this.ctx;r.save(),r.beginPath(),fR(this,this.getDistanceFromCenterForValue(this._endValue),n,this._pointLabels.length),r.closePath(),r.fillStyle=t,r.fill(),r.restore()}}drawGrid(){const t=this.ctx,n=this.options,{angleLines:r,grid:i,border:a}=n,s=this._pointLabels.length;let o,l,u;if(n.pointLabels.display&&HY(this,s),i.display&&this.ticks.forEach((c,d)=>{if(d!==0||d===0&&this.min<0){l=this.getDistanceFromCenterForValue(c.value);const f=this.getContext(d),h=i.setContext(f),p=a.setContext(f);KY(this,h,l,s,p)}}),r.display){for(t.save(),o=s-1;o>=0;o--){const c=r.setContext(this.getPointLabelContext(o)),{color:d,lineWidth:f}=c;!f||!d||(t.lineWidth=f,t.strokeStyle=d,t.setLineDash(c.borderDash),t.lineDashOffset=c.borderDashOffset,l=this.getDistanceFromCenterForValue(n.ticks.reverse?this.min:this.max),u=this.getPointPosition(o,l),t.beginPath(),t.moveTo(this.xCenter,this.yCenter),t.lineTo(u.x,u.y),t.stroke())}t.restore()}}drawBorder(){}drawLabels(){const t=this.ctx,n=this.options,r=n.ticks;if(!r.display)return;const i=this.getIndexAngle(0);let a,s;t.save(),t.translate(this.xCenter,this.yCenter),t.rotate(i),t.textAlign="center",t.textBaseline="middle",this.ticks.forEach((o,l)=>{if(l===0&&this.min>=0&&!n.reverse)return;const u=r.setContext(this.getContext(l)),c=it(u.font);if(a=this.getDistanceFromCenterForValue(this.ticks[l].value),u.showLabelBackdrop){t.font=c.string,s=t.measureText(o.label).width,t.fillStyle=u.backdropColor;const d=Pt(u.backdropPadding);t.fillRect(-s/2-d.left,-a-c.size/2-d.top,s+d.width,c.size+d.height)}la(t,o.label,0,-a,c,{color:u.color,strokeColor:u.textStrokeColor,strokeWidth:u.textStrokeWidth})}),t.restore()}drawTitle(){}}j(Do,"id","radialLinear"),j(Do,"defaults",{display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:Wf.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback(t){return t},padding:5,centerPointLabels:!1}}),j(Do,"defaultRoutes",{"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"}),j(Do,"descriptors",{angleLines:{_fallback:"grid"}});const Yf={millisecond:{common:!0,size:1,steps:1e3},second:{common:!0,size:1e3,steps:60},minute:{common:!0,size:6e4,steps:60},hour:{common:!0,size:36e5,steps:24},day:{common:!0,size:864e5,steps:30},week:{common:!1,size:6048e5,steps:4},month:{common:!0,size:2628e6,steps:12},quarter:{common:!1,size:7884e6,steps:4},year:{common:!0,size:3154e7}},Ht=Object.keys(Yf);function iw(e,t){return e-t}function aw(e,t){if(ce(t))return null;const n=e._adapter,{parser:r,round:i,isoWeekday:a}=e._parseOpts;let s=t;return typeof r=="function"&&(s=r(s)),Ve(s)||(s=typeof r=="string"?n.parse(s,r):n.parse(s)),s===null?null:(i&&(s=i==="week"&&(_s(a)||a===!0)?n.startOf(s,"isoWeek",a):n.startOf(s,i)),+s)}function sw(e,t,n,r){const i=Ht.length;for(let a=Ht.indexOf(e);a<i-1;++a){const s=Yf[Ht[a]],o=s.steps?s.steps:Number.MAX_SAFE_INTEGER;if(s.common&&Math.ceil((n-t)/(o*s.size))<=r)return Ht[a]}return Ht[i-1]}function qY(e,t,n,r,i){for(let a=Ht.length-1;a>=Ht.indexOf(n);a--){const s=Ht[a];if(Yf[s].common&&e._adapter.diff(i,r,s)>=t-1)return s}return Ht[n?Ht.indexOf(n):0]}function GY(e){for(let t=Ht.indexOf(e)+1,n=Ht.length;t<n;++t)if(Yf[Ht[t]].common)return Ht[t]}function ow(e,t,n){if(!n)e[t]=!0;else if(n.length){const{lo:r,hi:i}=I$(n,t),a=n[r]>=t?n[r]:n[i];e[a]=!0}}function ZY(e,t,n,r){const i=e._adapter,a=+i.startOf(t[0].value,r),s=t[t.length-1].value;let o,l;for(o=a;o<=s;o=+i.add(o,1,r))l=n[o],l>=0&&(t[l].major=!0);return t}function lw(e,t,n){const r=[],i={},a=t.length;let s,o;for(s=0;s<a;++s)o=t[s],i[o]=s,r.push({value:o,major:!1});return a===0||!n?r:ZY(e,r,i,n)}class Cl extends $a{constructor(t){super(t),this._cache={data:[],labels:[],all:[]},this._unit="day",this._majorUnit=void 0,this._offsets={},this._normalized=!1,this._parseOpts=void 0}init(t,n={}){const r=t.time||(t.time={}),i=this._adapter=new sH._date(t.adapters.date);i.init(n),Lo(r.displayFormats,i.formats()),this._parseOpts={parser:r.parser,round:r.round,isoWeekday:r.isoWeekday},super.init(t),this._normalized=n.normalized}parse(t,n){return t===void 0?null:aw(this,t)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const t=this.options,n=this._adapter,r=t.time.unit||"day";let{min:i,max:a,minDefined:s,maxDefined:o}=this.getUserBounds();function l(u){!s&&!isNaN(u.min)&&(i=Math.min(i,u.min)),!o&&!isNaN(u.max)&&(a=Math.max(a,u.max))}(!s||!o)&&(l(this._getLabelBounds()),(t.bounds!=="ticks"||t.ticks.source!=="labels")&&l(this.getMinMax(!1))),i=Ve(i)&&!isNaN(i)?i:+n.startOf(Date.now(),r),a=Ve(a)&&!isNaN(a)?a:+n.endOf(Date.now(),r)+1,this.min=Math.min(i,a-1),this.max=Math.max(i+1,a)}_getLabelBounds(){const t=this.getLabelTimestamps();let n=Number.POSITIVE_INFINITY,r=Number.NEGATIVE_INFINITY;return t.length&&(n=t[0],r=t[t.length-1]),{min:n,max:r}}buildTicks(){const t=this.options,n=t.time,r=t.ticks,i=r.source==="labels"?this.getLabelTimestamps():this._generate();t.bounds==="ticks"&&i.length&&(this.min=this._userMin||i[0],this.max=this._userMax||i[i.length-1]);const a=this.min,s=this.max,o=RW(i,a,s);return this._unit=n.unit||(r.autoSkip?sw(n.minUnit,this.min,this.max,this._getLabelCapacity(a)):qY(this,o.length,n.minUnit,this.min,this.max)),this._majorUnit=!r.major.enabled||this._unit==="year"?void 0:GY(this._unit),this.initOffsets(i),t.reverse&&o.reverse(),lw(this,o,this._majorUnit)}afterAutoSkip(){this.options.offsetAfterAutoskip&&this.initOffsets(this.ticks.map(t=>+t.value))}initOffsets(t=[]){let n=0,r=0,i,a;this.options.offset&&t.length&&(i=this.getDecimalForValue(t[0]),t.length===1?n=1-i:n=(this.getDecimalForValue(t[1])-i)/2,a=this.getDecimalForValue(t[t.length-1]),t.length===1?r=a:r=(a-this.getDecimalForValue(t[t.length-2]))/2);const s=t.length<3?.5:.25;n=dt(n,0,s),r=dt(r,0,s),this._offsets={start:n,end:r,factor:1/(n+1+r)}}_generate(){const t=this._adapter,n=this.min,r=this.max,i=this.options,a=i.time,s=a.unit||sw(a.minUnit,n,r,this._getLabelCapacity(n)),o=J(i.ticks.stepSize,1),l=s==="week"?a.isoWeekday:!1,u=_s(l)||l===!0,c={};let d=n,f,h;if(u&&(d=+t.startOf(d,"isoWeek",l)),d=+t.startOf(d,u?"day":s),t.diff(r,n,s)>1e5*o)throw new Error(n+" and "+r+" are too far apart with stepSize of "+o+" "+s);const p=i.ticks.source==="data"&&this.getDataTimestamps();for(f=d,h=0;f<r;f=+t.add(f,o,s),h++)ow(c,f,p);return(f===r||i.bounds==="ticks"||h===1)&&ow(c,f,p),Object.keys(c).sort(iw).map(g=>+g)}getLabelForValue(t){const n=this._adapter,r=this.options.time;return r.tooltipFormat?n.format(t,r.tooltipFormat):n.format(t,r.displayFormats.datetime)}format(t,n){const i=this.options.time.displayFormats,a=this._unit,s=n||i[a];return this._adapter.format(t,s)}_tickFormatFunction(t,n,r,i){const a=this.options,s=a.ticks.callback;if(s)return De(s,[t,n,r],this);const o=a.time.displayFormats,l=this._unit,u=this._majorUnit,c=l&&o[l],d=u&&o[u],f=r[n],h=u&&d&&f&&f.major;return this._adapter.format(t,i||(h?d:c))}generateTickLabels(t){let n,r,i;for(n=0,r=t.length;n<r;++n)i=t[n],i.label=this._tickFormatFunction(i.value,n,t)}getDecimalForValue(t){return t===null?NaN:(t-this.min)/(this.max-this.min)}getPixelForValue(t){const n=this._offsets,r=this.getDecimalForValue(t);return this.getPixelForDecimal((n.start+r)*n.factor)}getValueForPixel(t){const n=this._offsets,r=this.getDecimalForPixel(t)/n.factor-n.end;return this.min+r*(this.max-this.min)}_getLabelSize(t){const n=this.options.ticks,r=this.ctx.measureText(t).width,i=An(this.isHorizontal()?n.maxRotation:n.minRotation),a=Math.cos(i),s=Math.sin(i),o=this._resolveTickFontOptions(0).size;return{w:r*a+o*s,h:r*s+o*a}}_getLabelCapacity(t){const n=this.options.time,r=n.displayFormats,i=r[n.unit]||r.millisecond,a=this._tickFormatFunction(t,0,lw(this,[t],this._majorUnit),i),s=this._getLabelSize(a),o=Math.floor(this.isHorizontal()?this.width/s.w:this.height/s.h)-1;return o>0?o:1}getDataTimestamps(){let t=this._cache.data||[],n,r;if(t.length)return t;const i=this.getMatchingVisibleMetas();if(this._normalized&&i.length)return this._cache.data=i[0].controller.getAllParsedValues(this);for(n=0,r=i.length;n<r;++n)t=t.concat(i[n].controller.getAllParsedValues(this));return this._cache.data=this.normalize(t)}getLabelTimestamps(){const t=this._cache.labels||[];let n,r;if(t.length)return t;const i=this.getLabels();for(n=0,r=i.length;n<r;++n)t.push(aw(this,i[n]));return this._cache.labels=this._normalized?t:this.normalize(t)}normalize(t){return ET(t.sort(iw))}}j(Cl,"id","time"),j(Cl,"defaults",{bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",callback:!1,major:{enabled:!1}}});function Vu(e,t,n){let r=0,i=e.length-1,a,s,o,l;n?(t>=e[r].pos&&t<=e[i].pos&&({lo:r,hi:i}=gr(e,"pos",t)),{pos:a,time:o}=e[r],{pos:s,time:l}=e[i]):(t>=e[r].time&&t<=e[i].time&&({lo:r,hi:i}=gr(e,"time",t)),{time:a,pos:o}=e[r],{time:s,pos:l}=e[i]);const u=s-a;return u?o+(l-o)*(t-a)/u:o}class a3 extends Cl{constructor(t){super(t),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const t=this._getTimestampsForTable(),n=this._table=this.buildLookupTable(t);this._minPos=Vu(n,this.min),this._tableRange=Vu(n,this.max)-this._minPos,super.initOffsets(t)}buildLookupTable(t){const{min:n,max:r}=this,i=[],a=[];let s,o,l,u,c;for(s=0,o=t.length;s<o;++s)u=t[s],u>=n&&u<=r&&i.push(u);if(i.length<2)return[{time:n,pos:0},{time:r,pos:1}];for(s=0,o=i.length;s<o;++s)c=i[s+1],l=i[s-1],u=i[s],Math.round((c+l)/2)!==u&&a.push({time:u,pos:s/(o-1)});return a}_generate(){const t=this.min,n=this.max;let r=super.getDataTimestamps();return(!r.includes(t)||!r.length)&&r.splice(0,0,t),(!r.includes(n)||r.length===1)&&r.push(n),r.sort((i,a)=>i-a)}_getTimestampsForTable(){let t=this._cache.all||[];if(t.length)return t;const n=this.getDataTimestamps(),r=this.getLabelTimestamps();return n.length&&r.length?t=this.normalize(n.concat(r)):t=n.length?n:r,t=this._cache.all=t,t}getDecimalForValue(t){return(Vu(this._table,t)-this._minPos)/this._tableRange}getValueForPixel(t){const n=this._offsets,r=this.getDecimalForPixel(t)/n.factor-n.end;return Vu(this._table,r*this._tableRange+this._minPos,!0)}}j(a3,"id","timeseries"),j(a3,"defaults",Cl.defaults);var XY=Object.freeze({__proto__:null,CategoryScale:_l,LinearScale:El,LogarithmicScale:r3,RadialLinearScale:Do,TimeScale:Cl,TimeSeriesScale:a3});const QY=[aH,OK,kY,XY];Bs.register(...QY);function zn(e){const t=Object.prototype.toString.call(e);return e instanceof Date||typeof e=="object"&&t==="[object Date]"?new e.constructor(+e):typeof e=="number"||t==="[object Number]"||typeof e=="string"||t==="[object String]"?new Date(e):new Date(NaN)}function ua(e,t){return e instanceof Date?new e.constructor(t):new Date(t)}const hR=6048e5,JY=864e5;let eq={};function qf(){return eq}function kl(e,t){var o,l,u,c;const n=qf(),r=(t==null?void 0:t.weekStartsOn)??((l=(o=t==null?void 0:t.locale)==null?void 0:o.options)==null?void 0:l.weekStartsOn)??n.weekStartsOn??((c=(u=n.locale)==null?void 0:u.options)==null?void 0:c.weekStartsOn)??0,i=zn(e),a=i.getDay(),s=(a<r?7:0)+a-r;return i.setDate(i.getDate()-s),i.setHours(0,0,0,0),i}function Xd(e){return kl(e,{weekStartsOn:1})}function pR(e){const t=zn(e),n=t.getFullYear(),r=ua(e,0);r.setFullYear(n+1,0,4),r.setHours(0,0,0,0);const i=Xd(r),a=ua(e,0);a.setFullYear(n,0,4),a.setHours(0,0,0,0);const s=Xd(a);return t.getTime()>=i.getTime()?n+1:t.getTime()>=s.getTime()?n:n-1}function uw(e){const t=zn(e);return t.setHours(0,0,0,0),t}function cw(e){const t=zn(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),+e-+n}function tq(e,t){const n=uw(e),r=uw(t),i=+n-cw(n),a=+r-cw(r);return Math.round((i-a)/JY)}function nq(e){const t=pR(e),n=ua(e,0);return n.setFullYear(t,0,4),n.setHours(0,0,0,0),Xd(n)}function rq(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function iq(e){if(!rq(e)&&typeof e!="number")return!1;const t=zn(e);return!isNaN(Number(t))}function aq(e){const t=zn(e),n=ua(e,0);return n.setFullYear(t.getFullYear(),0,1),n.setHours(0,0,0,0),n}const sq={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},oq=(e,t,n)=>{let r;const i=sq[e];return typeof i=="string"?r=i:t===1?r=i.one:r=i.other.replace("{{count}}",t.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};function Dp(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const lq={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},uq={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},cq={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},dq={date:Dp({formats:lq,defaultWidth:"full"}),time:Dp({formats:uq,defaultWidth:"full"}),dateTime:Dp({formats:cq,defaultWidth:"full"})},fq={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},hq=(e,t,n,r)=>fq[e];function ao(e){return(t,n)=>{const r=n!=null&&n.context?String(n.context):"standalone";let i;if(r==="formatting"&&e.formattingValues){const s=e.defaultFormattingWidth||e.defaultWidth,o=n!=null&&n.width?String(n.width):s;i=e.formattingValues[o]||e.formattingValues[s]}else{const s=e.defaultWidth,o=n!=null&&n.width?String(n.width):e.defaultWidth;i=e.values[o]||e.values[s]}const a=e.argumentCallback?e.argumentCallback(t):t;return i[a]}}const pq={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},mq={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},gq={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},vq={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},bq={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},yq={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},$q=(e,t)=>{const n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},xq={ordinalNumber:$q,era:ao({values:pq,defaultWidth:"wide"}),quarter:ao({values:mq,defaultWidth:"wide",argumentCallback:e=>e-1}),month:ao({values:gq,defaultWidth:"wide"}),day:ao({values:vq,defaultWidth:"wide"}),dayPeriod:ao({values:bq,defaultWidth:"wide",formattingValues:yq,defaultFormattingWidth:"wide"})};function so(e){return(t,n={})=>{const r=n.width,i=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],a=t.match(i);if(!a)return null;const s=a[0],o=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(o)?Dq(o,d=>d.test(s)):wq(o,d=>d.test(s));let u;u=e.valueCallback?e.valueCallback(l):l,u=n.valueCallback?n.valueCallback(u):u;const c=t.slice(s.length);return{value:u,rest:c}}}function wq(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function Dq(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function _q(e){return(t,n={})=>{const r=t.match(e.matchPattern);if(!r)return null;const i=r[0],a=t.match(e.parsePattern);if(!a)return null;let s=e.valueCallback?e.valueCallback(a[0]):a[0];s=n.valueCallback?n.valueCallback(s):s;const o=t.slice(i.length);return{value:s,rest:o}}}const Eq=/^(\d+)(th|st|nd|rd)?/i,Sq=/\d+/i,Cq={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},kq={any:[/^b/i,/^(a|c)/i]},Pq={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},Tq={any:[/1/i,/2/i,/3/i,/4/i]},Rq={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},Mq={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},Fq={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},Aq={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},Oq={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},Bq={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},Iq={ordinalNumber:_q({matchPattern:Eq,parsePattern:Sq,valueCallback:e=>parseInt(e,10)}),era:so({matchPatterns:Cq,defaultMatchWidth:"wide",parsePatterns:kq,defaultParseWidth:"any"}),quarter:so({matchPatterns:Pq,defaultMatchWidth:"wide",parsePatterns:Tq,defaultParseWidth:"any",valueCallback:e=>e+1}),month:so({matchPatterns:Rq,defaultMatchWidth:"wide",parsePatterns:Mq,defaultParseWidth:"any"}),day:so({matchPatterns:Fq,defaultMatchWidth:"wide",parsePatterns:Aq,defaultParseWidth:"any"}),dayPeriod:so({matchPatterns:Oq,defaultMatchWidth:"any",parsePatterns:Bq,defaultParseWidth:"any"})},Lq={code:"en-US",formatDistance:oq,formatLong:dq,formatRelative:hq,localize:xq,match:Iq,options:{weekStartsOn:0,firstWeekContainsDate:1}};function Nq(e){const t=zn(e);return tq(t,aq(t))+1}function jq(e){const t=zn(e),n=+Xd(t)-+nq(t);return Math.round(n/hR)+1}function mR(e,t){var c,d,f,h;const n=zn(e),r=n.getFullYear(),i=qf(),a=(t==null?void 0:t.firstWeekContainsDate)??((d=(c=t==null?void 0:t.locale)==null?void 0:c.options)==null?void 0:d.firstWeekContainsDate)??i.firstWeekContainsDate??((h=(f=i.locale)==null?void 0:f.options)==null?void 0:h.firstWeekContainsDate)??1,s=ua(e,0);s.setFullYear(r+1,0,a),s.setHours(0,0,0,0);const o=kl(s,t),l=ua(e,0);l.setFullYear(r,0,a),l.setHours(0,0,0,0);const u=kl(l,t);return n.getTime()>=o.getTime()?r+1:n.getTime()>=u.getTime()?r:r-1}function zq(e,t){var o,l,u,c;const n=qf(),r=(t==null?void 0:t.firstWeekContainsDate)??((l=(o=t==null?void 0:t.locale)==null?void 0:o.options)==null?void 0:l.firstWeekContainsDate)??n.firstWeekContainsDate??((c=(u=n.locale)==null?void 0:u.options)==null?void 0:c.firstWeekContainsDate)??1,i=mR(e,t),a=ua(e,0);return a.setFullYear(i,0,r),a.setHours(0,0,0,0),kl(a,t)}function Vq(e,t){const n=zn(e),r=+kl(n,t)-+zq(n,t);return Math.round(r/hR)+1}function pe(e,t){const n=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return n+r}const Tr={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return pe(t==="yy"?r%100:r,t.length)},M(e,t){const n=e.getMonth();return t==="M"?String(n+1):pe(n+1,2)},d(e,t){return pe(e.getDate(),t.length)},a(e,t){const n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h(e,t){return pe(e.getHours()%12||12,t.length)},H(e,t){return pe(e.getHours(),t.length)},m(e,t){return pe(e.getMinutes(),t.length)},s(e,t){return pe(e.getSeconds(),t.length)},S(e,t){const n=t.length,r=e.getMilliseconds(),i=Math.trunc(r*Math.pow(10,n-3));return pe(i,t.length)}},Ma={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},dw={G:function(e,t,n){const r=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});case"GGGG":default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if(t==="yo"){const r=e.getFullYear(),i=r>0?r:1-r;return n.ordinalNumber(i,{unit:"year"})}return Tr.y(e,t)},Y:function(e,t,n,r){const i=mR(e,r),a=i>0?i:1-i;if(t==="YY"){const s=a%100;return pe(s,2)}return t==="Yo"?n.ordinalNumber(a,{unit:"year"}):pe(a,t.length)},R:function(e,t){const n=pR(e);return pe(n,t.length)},u:function(e,t){const n=e.getFullYear();return pe(n,t.length)},Q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return pe(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return pe(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){const r=e.getMonth();switch(t){case"M":case"MM":return Tr.M(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){const r=e.getMonth();switch(t){case"L":return String(r+1);case"LL":return pe(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){const i=Vq(e,r);return t==="wo"?n.ordinalNumber(i,{unit:"week"}):pe(i,t.length)},I:function(e,t,n){const r=jq(e);return t==="Io"?n.ordinalNumber(r,{unit:"week"}):pe(r,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getDate(),{unit:"date"}):Tr.d(e,t)},D:function(e,t,n){const r=Nq(e);return t==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):pe(r,t.length)},E:function(e,t,n){const r=e.getDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});case"EEEE":default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){const i=e.getDay(),a=(i-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(a);case"ee":return pe(a,2);case"eo":return n.ordinalNumber(a,{unit:"day"});case"eee":return n.day(i,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(i,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(i,{width:"short",context:"formatting"});case"eeee":default:return n.day(i,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){const i=e.getDay(),a=(i-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(a);case"cc":return pe(a,t.length);case"co":return n.ordinalNumber(a,{unit:"day"});case"ccc":return n.day(i,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(i,{width:"narrow",context:"standalone"});case"cccccc":return n.day(i,{width:"short",context:"standalone"});case"cccc":default:return n.day(i,{width:"wide",context:"standalone"})}},i:function(e,t,n){const r=e.getDay(),i=r===0?7:r;switch(t){case"i":return String(i);case"ii":return pe(i,t.length);case"io":return n.ordinalNumber(i,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});case"iiii":default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){const i=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},b:function(e,t,n){const r=e.getHours();let i;switch(r===12?i=Ma.noon:r===0?i=Ma.midnight:i=r/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},B:function(e,t,n){const r=e.getHours();let i;switch(r>=17?i=Ma.evening:r>=12?i=Ma.afternoon:r>=4?i=Ma.morning:i=Ma.night,t){case"B":case"BB":case"BBB":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},h:function(e,t,n){if(t==="ho"){let r=e.getHours()%12;return r===0&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return Tr.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getHours(),{unit:"hour"}):Tr.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return t==="Ko"?n.ordinalNumber(r,{unit:"hour"}):pe(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t==="ko"?n.ordinalNumber(r,{unit:"hour"}):pe(r,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):Tr.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getSeconds(),{unit:"second"}):Tr.s(e,t)},S:function(e,t){return Tr.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return hw(r);case"XXXX":case"XX":return Oi(r);case"XXXXX":case"XXX":default:return Oi(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return hw(r);case"xxxx":case"xx":return Oi(r);case"xxxxx":case"xxx":default:return Oi(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+fw(r,":");case"OOOO":default:return"GMT"+Oi(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+fw(r,":");case"zzzz":default:return"GMT"+Oi(r,":")}},t:function(e,t,n){const r=Math.trunc(e.getTime()/1e3);return pe(r,t.length)},T:function(e,t,n){const r=e.getTime();return pe(r,t.length)}};function fw(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),i=Math.trunc(r/60),a=r%60;return a===0?n+String(i):n+String(i)+t+pe(a,2)}function hw(e,t){return e%60===0?(e>0?"-":"+")+pe(Math.abs(e)/60,2):Oi(e,t)}function Oi(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),i=pe(Math.trunc(r/60),2),a=pe(r%60,2);return n+i+t+a}const pw=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}},gR=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}},Wq=(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],i=n[2];if(!i)return pw(e,t);let a;switch(r){case"P":a=t.dateTime({width:"short"});break;case"PP":a=t.dateTime({width:"medium"});break;case"PPP":a=t.dateTime({width:"long"});break;case"PPPP":default:a=t.dateTime({width:"full"});break}return a.replace("{{date}}",pw(r,t)).replace("{{time}}",gR(i,t))},Uq={p:gR,P:Wq},Hq=/^D+$/,Kq=/^Y+$/,Yq=["D","DD","YY","YYYY"];function qq(e){return Hq.test(e)}function Gq(e){return Kq.test(e)}function Zq(e,t,n){const r=Xq(e,t,n);if(console.warn(r),Yq.includes(e))throw new RangeError(r)}function Xq(e,t,n){const r=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const Qq=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Jq=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,eG=/^'([^]*?)'?$/,tG=/''/g,nG=/[a-zA-Z]/;function rG(e,t,n){var c,d,f,h;const r=qf(),i=r.locale??Lq,a=r.firstWeekContainsDate??((d=(c=r.locale)==null?void 0:c.options)==null?void 0:d.firstWeekContainsDate)??1,s=r.weekStartsOn??((h=(f=r.locale)==null?void 0:f.options)==null?void 0:h.weekStartsOn)??0,o=zn(e);if(!iq(o))throw new RangeError("Invalid time value");let l=t.match(Jq).map(p=>{const g=p[0];if(g==="p"||g==="P"){const b=Uq[g];return b(p,i.formatLong)}return p}).join("").match(Qq).map(p=>{if(p==="''")return{isToken:!1,value:"'"};const g=p[0];if(g==="'")return{isToken:!1,value:iG(p)};if(dw[g])return{isToken:!0,value:p};if(g.match(nG))throw new RangeError("Format string contains an unescaped latin alphabet character `"+g+"`");return{isToken:!1,value:p}});i.localize.preprocessor&&(l=i.localize.preprocessor(o,l));const u={firstWeekContainsDate:a,weekStartsOn:s,locale:i};return l.map(p=>{if(!p.isToken)return p.value;const g=p.value;(Gq(g)||qq(g))&&Zq(g,t,String(e));const b=dw[g[0]];return b(o,g,i.localize,u)}).join("")}function iG(e){const t=e.match(eG);return t?t[1].replace(tG,"'"):e}const vR="label";function mw(e,t){typeof e=="function"?e(t):e&&(e.current=t)}function aG(e,t){const n=e.options;n&&t&&Object.assign(n,t)}function bR(e,t){e.labels=t}function yR(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:vR;const r=[];e.datasets=t.map(i=>{const a=e.datasets.find(s=>s[n]===i[n]);return!a||!i.data||r.includes(a)?{...i}:(r.push(a),Object.assign(a,i),a)})}function sG(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:vR;const n={labels:[],datasets:[]};return bR(n,e.labels),yR(n,e.datasets,t),n}function oG(e,t){const{height:n=150,width:r=300,redraw:i=!1,datasetIdKey:a,type:s,data:o,options:l,plugins:u=[],fallbackContent:c,updateMode:d,...f}=e,h=y.useRef(null),p=y.useRef(),g=()=>{h.current&&(p.current=new Bs(h.current,{type:s,data:sG(o,a),options:l&&{...l},plugins:u}),mw(t,p.current))},b=()=>{mw(t,null),p.current&&(p.current.destroy(),p.current=null)};return y.useEffect(()=>{!i&&p.current&&l&&aG(p.current,l)},[i,l]),y.useEffect(()=>{!i&&p.current&&bR(p.current.config.data,o.labels)},[i,o.labels]),y.useEffect(()=>{!i&&p.current&&o.datasets&&yR(p.current.config.data,o.datasets,a)},[i,o.datasets]),y.useEffect(()=>{p.current&&(i?(b(),setTimeout(g)):p.current.update(d))},[i,l,o.labels,o.datasets,d]),y.useEffect(()=>{p.current&&(b(),setTimeout(g))},[s]),y.useEffect(()=>(g(),()=>b()),[]),_.createElement("canvas",Object.assign({ref:h,role:"img",height:n,width:r},f),c)}const lG=y.forwardRef(oG);function $R(e,t){return Bs.register(t),y.forwardRef((n,r)=>_.createElement(lG,Object.assign({},n,{ref:r,type:e})))}const uG=$R("line",Vo),cG=$R("polarArea",ds);function xR(){return M.jsx(M.Fragment,{children:M.jsx("div",{className:"block bg-white-500 border border-gray-200 rounded-lg shadow",children:M.jsx("div",{children:"No data"})})})}Bs.register(_l,El,fs,Yn,G$);function dG(e){const t={responsive:!0,scales:{x:{grid:{display:!1}},y:{min:0,ticks:{stepSize:1,callback:function(i,a,s){return i+"wps"}},grid:{display:!1}}}},[n,r]=y.useState({labels:[],datasets:[]});return y.useEffect(()=>{(async()=>{const a=e.timeframe.end.toDate(),s=e.timeframe.start.toDate();s.setHours(s.getHours()-12);const o=12,{data:l}=await e.supabase.from("file").select("timestamp").gte("timestamp",s.toISOString()).lte("timestamp",a.toISOString());if(console.log(l),l.length===0)return;const u=new Date(s),d=(+new Date(a)-+u)/o;let f=Array(o).fill(""),h=Array(o).fill(0);for(let p=0;p<o;p++){const g=new Date(u.getTime()+p*d),b=new Date(u.getTime()+(p+1)*d);f[p]=rG(b,"MM/dd - HH:mm"),h[p]=l.filter(v=>{const m=new Date(v.timestamp);return m>=g&&m<b}).length}console.log("LABELS",f),console.log("POINTS",h),r({labels:f,datasets:[{label:"Dataset",data:h,borderColor:"rgb(53, 162, 235)",backgroundColor:"rgba(53, 162, 235, 0.5)"}]})})()},[e.timeframe]),M.jsxs("div",{children:[M.jsx("p",{className:"text-center",children:e.name}),n.datasets.length>0?M.jsx(uG,{data:n,options:t}):M.jsx(xR,{})]})}function fG(e){return M.jsx(M.Fragment,{children:M.jsx(WV,{"aria-label":"timeframe",value:e.timeframe,onChange:e.setTimeframe})})}function Wu(e,t){var n=e.length*t;if(e.length===0)throw new Error("quantile requires at least one data point.");if(t<0||t>1)throw new Error("quantiles must be between 0 and 1");return t===1?e[e.length-1]:t===0?e[0]:n%1!==0?e[Math.ceil(n)-1]:e.length%2===0?(e[n-1]+e[n])/2:e[n]}Bs.register(_l,El,fs,Yn,G$);function hG(e){const t={responsive:!0},[n,r]=y.useState({labels:[],datasets:[]});return y.useEffect(()=>{(async()=>{const a=e.timeframe.end.toDate(),s=e.timeframe.start.toDate();s.setHours(s.getHours()-12);const{data:o}=await e.supabase.from("file").select("contents").gte("timestamp",s.toISOString()).lte("timestamp",a.toISOString());if(console.log("RAWDATA",o),o.length===0)return;let l=o.map(h=>h.contents.length).sort((h,p)=>h-p);console.log("TOP LENGTHS",l);let u=Wu(l,.25),c=Wu(l,.5),d=Wu(l,.75),f=Wu(l,1);console.log("p25: ",u),console.log("p50: ",c),console.log("p75: ",d),console.log("p100: ",f),r({labels:["p25","p50","p75","p100"],datasets:[{data:[u,c,d,f]}]})})()},[e.timeframe]),console.log("length: aaa",n.datasets.length),M.jsxs("div",{className:"flex-grow flex-1",children:[M.jsx("p",{className:"text-center",children:e.name}),n.datasets.length>0?M.jsx(cG,{data:n,options:t}):M.jsx(xR,{})]})}function pG(e){const t=Rs(),[n,r]=y.useState([]);y.useEffect(()=>{e.session||t("/login")},[e.session]);const i=y.useCallback(async()=>{const{data:a,error:s}=await e.supabase.from("file").select();if(s){console.error(s);return}r(a.map(o=>o))},[e.supabase]);return y.useEffect(()=>{i()},[]),M.jsx(M.Fragment,{children:M.jsxs("div",{className:"flex h-screen",children:[M.jsx(Vf,{currentPage:"Home"}),M.jsx("main",{className:"overflow-y-auto flex flex-col flex-1 mx-5",children:M.jsxs("div",{className:"flex flex-col w-full gap-7 flex-grow",children:[M.jsx("div",{className:"flex flex-row gap-7 flex-grow",children:M.jsx("div",{className:"ml-auto mt-2",children:M.jsx(fG,{timeframe:e.timeframe,setTimeframe:e.setTimeframe})})}),M.jsxs("div",{className:"flex flex-row gap-7 flex-grow",children:[M.jsxs("div",{className:"w-1/2 flex flex-col",children:[M.jsx("p",{className:"text-center",children:"Active hosts"}),M.jsx("div",{className:"flex-grow block bg-white-500 border border-gray-200 rounded-lg shadow",children:M.jsxs("ol",{children:[M.jsx("li",{children:"Host 1"}),M.jsx("li",{children:"Host 2"})]})})]}),M.jsx("div",{className:"w-1/2 ml-auto",children:M.jsx(dG,{name:"File writes per second",supabase:e.supabase,timeframe:e.timeframe})})]}),M.jsxs("div",{className:"flex flex-row gap-7 mb-5 flex-grow",children:[M.jsx("div",{className:"w-1/2 mr-auto",children:M.jsx(hG,{name:"File writes size percentiles",supabase:e.supabase,timeframe:e.timeframe})}),M.jsxs("div",{className:"w-1/2 flex flex-col",children:[M.jsx("p",{className:"text-center",children:"Most edited files"}),M.jsx("div",{className:"flex-grow block bg-white-500 border border-gray-200 rounded-lg shadow",children:M.jsxs("ol",{children:[M.jsx("li",{children:"File 1"}),M.jsx("li",{children:"File 2"})]})})]})]})]})})]})})}function mG(e={}){const{nonce:t,onScriptLoadSuccess:n,onScriptLoadError:r}=e,[i,a]=y.useState(!1),s=y.useRef(n);s.current=n;const o=y.useRef(r);return o.current=r,y.useEffect(()=>{const l=document.createElement("script");return l.src="https://accounts.google.com/gsi/client",l.async=!0,l.defer=!0,l.nonce=t,l.onload=()=>{var u;a(!0),(u=s.current)===null||u===void 0||u.call(s)},l.onerror=()=>{var u;a(!1),(u=o.current)===null||u===void 0||u.call(o)},document.body.appendChild(l),()=>{document.body.removeChild(l)}},[t]),i}const wR=y.createContext(null);function gG({clientId:e,nonce:t,onScriptLoadSuccess:n,onScriptLoadError:r,children:i}){const a=mG({nonce:t,onScriptLoadSuccess:n,onScriptLoadError:r}),s=y.useMemo(()=>({clientId:e,scriptLoadedSuccessfully:a}),[e,a]);return _.createElement(wR.Provider,{value:s},i)}function vG(){const e=y.useContext(wR);if(!e)throw new Error("Google OAuth components must be used within GoogleOAuthProvider");return e}function bG(e){var t;return(t=e==null?void 0:e.clientId)!==null&&t!==void 0?t:e==null?void 0:e.client_id}const yG={large:40,medium:32,small:20};function $G({onSuccess:e,onError:t,useOneTap:n,promptMomentNotification:r,type:i="standard",theme:a="outline",size:s="large",text:o,shape:l,logo_alignment:u,width:c,locale:d,click_listener:f,containerProps:h,...p}){const g=y.useRef(null),{clientId:b,scriptLoadedSuccessfully:v}=vG(),m=y.useRef(e);m.current=e;const $=y.useRef(t);$.current=t;const w=y.useRef(r);return w.current=r,y.useEffect(()=>{var D,S,k,x,T,P,E,A,R;if(v)return(k=(S=(D=window==null?void 0:window.google)===null||D===void 0?void 0:D.accounts)===null||S===void 0?void 0:S.id)===null||k===void 0||k.initialize({client_id:b,callback:F=>{var z;if(!(F!=null&&F.credential))return(z=$.current)===null||z===void 0?void 0:z.call($);const{credential:B,select_by:C}=F;m.current({credential:B,clientId:bG(F),select_by:C})},...p}),(P=(T=(x=window==null?void 0:window.google)===null||x===void 0?void 0:x.accounts)===null||T===void 0?void 0:T.id)===null||P===void 0||P.renderButton(g.current,{type:i,theme:a,size:s,text:o,shape:l,logo_alignment:u,width:c,locale:d,click_listener:f}),n&&((R=(A=(E=window==null?void 0:window.google)===null||E===void 0?void 0:E.accounts)===null||A===void 0?void 0:A.id)===null||R===void 0||R.prompt(w.current)),()=>{var F,z,B;n&&((B=(z=(F=window==null?void 0:window.google)===null||F===void 0?void 0:F.accounts)===null||z===void 0?void 0:z.id)===null||B===void 0||B.cancel())}},[b,v,n,i,a,s,o,l,u,c,d]),_.createElement("div",{...h,ref:g,style:{height:yG[s],...h==null?void 0:h.style}})}function xG(e){const t=Rs();return y.useEffect(()=>{e.supabase.auth.getSession().then(({data:{session:r}})=>{e.setSession(r),console.log("LOGIN SESSION",r)});const{data:{subscription:n}}=e.supabase.auth.onAuthStateChange((r,i)=>{e.setSession(i),console.log("SESSION CHANGE",i)});return()=>n.unsubscribe()},[e.supabase]),y.useEffect(()=>{e.session&&t("/")},[e.session]),M.jsx(M.Fragment,{children:M.jsx("div",{className:"flex flex-col items-center h-screen w-screen",children:M.jsxs("div",{className:"flex flex-row items-center gap-x-8 m-auto",children:[M.jsx("div",{children:M.jsx("h1",{className:"text-4xl text-bold font-sans antialiased text-blue-700 tracking-wide",children:"fs-tracer"})}),M.jsx("div",{className:"block max-w-sm p-6 bg-white border border-gray-200 rounded-lg shadow",children:M.jsxs("div",{className:"mx-7 my-5",children:[M.jsx("h5",{className:"mb-2 text-2xl font-bold font-sans antialiased text-gray-900",children:"Hello!"}),M.jsxs("div",{className:"flex flex-row items-center gap-2",children:[M.jsx("span",{className:"font-normal text-gray-700",children:"Continue with"}),M.jsx("span",{children:M.jsx(gG,{clientId:"952965459060-nrnrsdoq22mf646vfa72hk410pvdda5q.apps.googleusercontent.com",children:M.jsx($G,{onSuccess:async n=>{await e.supabase.auth.signInWithIdToken({provider:"google",token:n.credential})},onError:()=>{console.log("Login Failed")},width:7777,size:"large",type:"icon"})})})]})]})})]})})})}function wG(e){const t=Rs();return y.useEffect(()=>{(async()=>{await e.supabase.auth.signOut()})(),t("/login")},[e.session]),M.jsx(M.Fragment,{})}function DR(e){return M.jsx("a",{href:`/file/${encodeURIComponent(e.file.id)}`,children:M.jsxs("p",{className:"underline",children:["file: ",e.file.absolute_path]})})}function DG(e){const t=Rs(),n=20,[r,i]=y.useState([]),[a,s]=y.useState(0);y.useEffect(()=>{e.session||t("/login")},[e.session]);const o=y.useCallback(async()=>{console.log("FETCHIN FILES, pagination: ",a);const{data:l,error:u}=await e.supabase.from("file").select().order("timestamp",{ascending:!1}).range(a,a+n-1);if(u){console.error(u);return}console.log("RAW FILES: ",l),i(l.map(c=>c)),console.log("FETCHED FILES")},[e.supabase,a]);return y.useEffect(()=>{console.log("Aaa"),o()},[a]),M.jsx(M.Fragment,{children:M.jsxs("div",{className:"flex h-screen",children:[M.jsx(Vf,{currentPage:"Recent"}),M.jsxs("main",{className:"flex-1 overflow-y-auto my-4",children:[M.jsx("div",{className:"flex flex-col items-center",children:M.jsx("div",{className:"flex flex-col gap-2",children:r.map(l=>M.jsx("div",{role:"button",children:M.jsx(DR,{file:l})},l.id))})}),M.jsxs("div",{className:"flex flex-row gap-2 mt-4",children:[M.jsx("button",{className:"ml-7 bg-blue-500 hover:bg-blue-700 text-white font-bold py-2 px-4 rounded",onClick:()=>s(a+-n),children:"prev"}),M.jsx("button",{className:"mr-7 ml-auto bg-blue-500 hover:bg-blue-700 text-white font-bold py-2 px-4 rounded",onClick:()=>s(a+n),children:"next"})]})]})]})})}function _G(e){const t=Rs();let{fileID:n}=TA();console.log("FILEID: ",n);const[r,i]=y.useState([]),[a,s]=y.useState(),o=20;y.useEffect(()=>{e.session||t("/login")},[e.session]);const l=y.useCallback(async()=>{console.log("FETCHING FILE");const{data:c,error:d}=await e.supabase.from("file").select().eq("id",n);if(d){console.error(d);return}if(c.length===0)return;let f=c[0];s(f),console.log("FETCHIN FILES",JSON.stringify(f));const{data:h,error:p}=await e.supabase.from("file").select().eq("absolute_path",f.absolute_path).order("timestamp",{ascending:!1}).range(0,o);if(p){console.error(p);return}console.log("RAW FILES: ",h),i(h.map(g=>g)),console.log("FETCHED FILES")},[e.supabase]);y.useEffect(()=>{l()},[e.supabase]);const u=c=>{const d=c.split("/");return d[d.length-1]};return M.jsx(M.Fragment,{children:M.jsxs("div",{className:"flex h-screen",children:[M.jsx(Vf,{}),M.jsx("main",{className:"flex-1 overflow-y-auto my-4",children:n&&a!==void 0?M.jsxs(M.Fragment,{children:[M.jsx("div",{className:"flex flex-col items-center",children:u(a.absolute_path)}),M.jsx("div",{className:"mt-5 flex flex-col items-center",children:M.jsx("div",{className:"block border rounded shadowpy-5 px-5 bg-blue",children:M.jsx(EG,{file:a})})}),M.jsx("div",{className:"mt-5 flex flex-col items-center",children:M.jsx("div",{className:"block border rounded shadow py-5 px-5 bg-blue",children:r.map(c=>M.jsx("div",{children:M.jsxs("p",{children:[c.absolute_path," - ",c.timestamp," ",c.id===a.id&&"*"]})},c.id))})})]}):M.jsx(M.Fragment,{children:M.jsx("div",{className:"flex flex-col items-center",children:M.jsx("p",{children:"File not found"})})})})]})})}function EG(e){return M.jsxs(M.Fragment,{children:[M.jsxs("p",{children:["Absolute path: ",e.file.absolute_path]}),M.jsxs("p",{children:["Timestamp: ",e.file.timestamp]}),M.jsxs("p",{children:["Content: ",e.file.contents]}),M.jsxs("p",{children:["ID: ",e.file.id]})]})}function _R(e,t){window.dispatchEvent(new StorageEvent("storage",{key:e,newValue:t}))}const gw=(e,t)=>{const n=JSON.stringify(t);window.localStorage.setItem(e,n),_R(e,n)},SG=e=>{window.localStorage.removeItem(e),_R(e,null)},vw=e=>window.localStorage.getItem(e),CG=e=>(window.addEventListener("storage",e),()=>window.removeEventListener("storage",e)),kG=()=>{throw Error("useLocalStorage is a client-only hook")};function PG(e,t){const n=()=>vw(e),r=y.useSyncExternalStore(CG,n,kG),i=y.useCallback(a=>{try{const s=typeof a=="function"?a(JSON.parse(r)):a;s==null?SG(e):gw(e,s)}catch(s){console.warn(s)}},[e,r]);return y.useEffect(()=>{vw(e)===null&&typeof t<"u"&&gw(e,t)},[e,t]),[r?JSON.parse(r):t,i]}function TG(e){const t=Rs(),n=20,[r,i]=y.useState([]),[a,s]=y.useState(""),[o,l]=y.useState(0);y.useEffect(()=>{e.session||t("/login")},[e.session]);const u=y.useCallback(async()=>{console.log("FETCHIN FILES, pagination: ",o," search: ",a);const{data:c,error:d}=await e.supabase.from("file").select().ilike("absolute_path",`%${a}%`).order("timestamp",{ascending:!1}).range(o,o+n-1);if(d){console.error(d);return}console.log("RAW FILES: ",c),i(c.map(f=>f)),console.log("FETCHED FILES")},[e.supabase,o,a]);return y.useEffect(()=>{u()},[o]),M.jsx(M.Fragment,{children:M.jsxs("div",{className:"flex h-screen",children:[M.jsx(Vf,{currentPage:"Recent"}),M.jsxs("main",{className:"flex-1 overflow-y-auto my-4",children:[M.jsxs("div",{className:"flex flex-col items-center",children:[M.jsx("label",{children:"filename"}),M.jsx("input",{placeholder:"filename",onChange:c=>s(c.target.value),className:"block bg-white w-1/2 rounded"})]}),M.jsx("div",{className:"my-4 flex flex-col items-center",children:M.jsx("button",{className:"w-20 bg-blue-500 hover:bg-blue-700 text-white font-bold py-2 px-4 rounded",onClick:()=>u(),children:"search"})}),M.jsx("div",{className:"flex flex-col items-center",children:M.jsx("div",{className:"flex flex-col gap-2",children:r.map(c=>M.jsx("div",{role:"button",children:M.jsx(DR,{file:c})},c.id))})}),M.jsxs("div",{className:"flex flex-row gap-2 mt-4",children:[M.jsx("button",{className:"ml-7 bg-blue-500 hover:bg-blue-700 text-white font-bold py-2 px-4 rounded",onClick:()=>l(o+-n),children:"prev"}),M.jsx("button",{className:"mr-7 ml-auto bg-blue-500 hover:bg-blue-700 text-white font-bold py-2 px-4 rounded",onClick:()=>l(o+n),children:"next"})]})]})]})})}const Fa=qB("https://slpoocycjgqsuoedhkbn.supabase.co","eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6InNscG9vY3ljamdxc3VvZWRoa2JuIiwicm9sZSI6ImFub24iLCJpYXQiOjE3MTUyMDU0MjUsImV4cCI6MjAzMDc4MTQyNX0.xZYRTRN65rlms1Hb96IBAQvw3EGtMzUxlGPP5TVey34");function RG(){const[e,t]=PG("session",null),n=Il(Pf()),[r,i]=y.useState({start:n.subtract({days:7}),end:n.add({days:1})});return M.jsx(M.Fragment,{children:M.jsx(oC,{theme:qV,children:M.jsx(YA,{basename:"/fs-tracer-frontend",children:M.jsxs(UA,{children:[M.jsx(Mr,{index:!0,element:M.jsx(pG,{supabase:Fa,session:e,timeframe:r,setTimeframe:i})}),M.jsx(Mr,{path:"/recent",element:M.jsx(DG,{supabase:Fa,session:e,timeframe:r,setTimeframe:i})}),M.jsx(Mr,{path:"/search",element:M.jsx(TG,{supabase:Fa,session:e,timeframe:r,setTimeframe:i})}),M.jsx(Mr,{path:"/login",element:M.jsx(xG,{supabase:Fa,session:e,setSession:t,timeframe:r,setTimeframe:i})}),M.jsx(Mr,{path:"/logout",element:M.jsx(wG,{supabase:Fa,session:e,setSession:t,timeframe:r,setTimeframe:i})}),M.jsx(Mr,{path:"/file/:fileID",element:M.jsx(_G,{supabase:Fa,session:e,setSession:t})}),M.jsx(Mr,{path:"*",element:M.jsx("p",{children:"notfound"})})]})})})})}_p.createRoot(document.getElementById("root")).render(M.jsx(_.StrictMode,{children:M.jsx(RG,{})}));export{bw as g}; diff --git a/index.html b/index.html index fb0e629..85610c9 100644 --- a/index.html +++ b/index.html @@ -32,7 +32,7 @@ href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.2/css/all.min.css" }(window.location)) </script> <!-- End Single Page Apps for GitHub Pages --> - <script type="module" crossorigin src="./assets/index-DU0kmLFG.js"></script> + <script type="module" crossorigin src="./assets/index-CEEOsXoe.js"></script> <link rel="stylesheet" crossorigin href="./assets/index-CMU_0p9U.css"> </head> <body> |